UI overhaul rebase
This commit is contained in:
13
dioxus-free-icons/packages/codegen/Cargo.toml
Normal file
13
dioxus-free-icons/packages/codegen/Cargo.toml
Normal file
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "dioxus-fontawesome-examples"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
codegen = "0.1.3"
|
||||
heck = "0.4.0"
|
||||
regex = "1.6.0"
|
||||
scraper = "0.13.0"
|
||||
walkdir = "2.3.2"
|
||||
215
dioxus-free-icons/packages/codegen/src/create_icon_file.rs
Normal file
215
dioxus-free-icons/packages/codegen/src/create_icon_file.rs
Normal file
@@ -0,0 +1,215 @@
|
||||
use std::fs;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
use std::{ffi::OsStr, path::Path};
|
||||
|
||||
use heck::ToSnakeCase;
|
||||
use heck::ToUpperCamelCase;
|
||||
use regex::Regex;
|
||||
use scraper::node::Element;
|
||||
use scraper::ElementRef;
|
||||
use scraper::Html;
|
||||
use walkdir::WalkDir;
|
||||
|
||||
const ICON_TEMPLATE: &str = r#"#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct {ICON_NAME};
|
||||
impl IconShape for {ICON_NAME} {
|
||||
fn view_box(&self) -> &str {
|
||||
"{VIEW_BOX}"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"{XMLNS}"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
({FILL_COLOR}, {STROKE_COLOR}, {STROKE_WIDTH})
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"{STROKE_LINECAP}"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"{STROKE_LINEJOIN}"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
{CHILD_ELEMENTS}
|
||||
}
|
||||
}
|
||||
}
|
||||
"#;
|
||||
|
||||
pub fn create_icon_file(svg_path: &str, output_path: &str, icon_prefix: &str) {
|
||||
let files = collect_svg_files(svg_path, icon_prefix);
|
||||
|
||||
let icon_file = files
|
||||
.into_iter()
|
||||
.map(|file| {
|
||||
let svg_str = fs::read_to_string(&file).unwrap();
|
||||
let fragment = Html::parse_fragment(&svg_str);
|
||||
|
||||
let elements = fragment
|
||||
.tree
|
||||
.nodes()
|
||||
.filter_map(|node| {
|
||||
if node.value().is_element() {
|
||||
let element = ElementRef::wrap(node).unwrap().value();
|
||||
if !element.attrs.is_empty() {
|
||||
return Some(element);
|
||||
}
|
||||
}
|
||||
None
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let svg_element = &elements[0];
|
||||
let svg_child_elements = &elements[1..];
|
||||
let icon_name = icon_name(&file, icon_prefix);
|
||||
let (view_box, xmlns) = extract_svg_attrs(svg_element);
|
||||
let child_elements = extract_svg_child_elements(svg_child_elements, icon_prefix);
|
||||
let (fill_color, stroke_color, stroke_width) = extract_svg_colors(icon_prefix);
|
||||
let stroke_linecap = extract_stroke_linecap(icon_prefix);
|
||||
let stroke_linejoin = extract_stroke_linejoin(icon_prefix);
|
||||
|
||||
ICON_TEMPLATE
|
||||
.replace("{ICON_NAME}", &format!("{}{}", icon_prefix, &icon_name))
|
||||
.replace("{VIEW_BOX}", &view_box)
|
||||
.replace("{XMLNS}", &xmlns)
|
||||
.replace("{CHILD_ELEMENTS}", &child_elements)
|
||||
.replace("{FILL_COLOR}", &fill_color)
|
||||
.replace("{STROKE_COLOR}", &stroke_color)
|
||||
.replace("{STROKE_WIDTH}", &stroke_width)
|
||||
.replace("{STROKE_LINECAP}", &stroke_linecap)
|
||||
.replace("{STROKE_LINEJOIN}", &stroke_linejoin)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
|
||||
// write to file
|
||||
let mut file = File::create(output_path).unwrap();
|
||||
file.write_all(
|
||||
format!(
|
||||
"{}\n\n{}",
|
||||
"use super::super::IconShape;\nuse dioxus::prelude::*;", icon_file
|
||||
)
|
||||
.as_bytes(),
|
||||
)
|
||||
.unwrap();
|
||||
file.flush().unwrap();
|
||||
}
|
||||
|
||||
fn collect_svg_files(svg_path: &str, icon_prefix: &str) -> Vec<PathBuf> {
|
||||
let dir_entries = WalkDir::new(svg_path)
|
||||
.sort_by_file_name()
|
||||
.into_iter()
|
||||
.filter_map(|e| e.ok())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
dir_entries
|
||||
.into_iter()
|
||||
.filter(|e| match icon_prefix {
|
||||
"Go" => {
|
||||
let re = Regex::new(r".*-16.svg$").unwrap();
|
||||
return re.is_match(e.path().to_str().unwrap());
|
||||
}
|
||||
"Md" => {
|
||||
let split_vec = e.path().components().collect::<Vec<_>>();
|
||||
return split_vec.iter().any(|c| c.as_os_str() == "materialicons")
|
||||
&& e.file_name().to_str().unwrap() == "24px.svg";
|
||||
}
|
||||
_ => return e.path().extension() == Some(OsStr::new("svg")),
|
||||
})
|
||||
.map(|dir| PathBuf::from(dir.path()))
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
|
||||
fn icon_name(path: &Path, icon_prefix: &str) -> String {
|
||||
match icon_prefix {
|
||||
"Go" => {
|
||||
let filename = path.file_name().unwrap().to_str().unwrap();
|
||||
let name = filename.split('.').next().unwrap();
|
||||
name.replace("-16", "").to_upper_camel_case()
|
||||
}
|
||||
"Md" => {
|
||||
let split_vec = path.components().collect::<Vec<_>>();
|
||||
let name = split_vec[split_vec.len() - 3];
|
||||
name.as_os_str().to_str().unwrap().to_upper_camel_case()
|
||||
}
|
||||
_ => {
|
||||
let filename = path.file_name().unwrap().to_str().unwrap();
|
||||
let name = filename.split('.').next().unwrap();
|
||||
name.to_upper_camel_case()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn extract_svg_attrs(element: &Element) -> (String, String) {
|
||||
let view_box = element.attr("viewBox").unwrap_or("0 0 16 16");
|
||||
let xmlns = element
|
||||
.attr("xmlns")
|
||||
.unwrap_or("http://www.w3.org/2000/svg");
|
||||
(String::from(view_box), String::from(xmlns))
|
||||
}
|
||||
|
||||
fn extract_svg_colors(icon_prefix: &str) -> (&str, &str, &str) {
|
||||
match icon_prefix {
|
||||
"Fi" => ("\"none\"", "user_color", "\"2\""),
|
||||
"Ld" => ("\"none\"", "user_color", "\"2\""),
|
||||
"Io" => ("user_color", "user_color", "\"0\""),
|
||||
_ => ("user_color", "\"none\"", "\"0\""),
|
||||
}
|
||||
}
|
||||
|
||||
fn extract_stroke_linecap(icon_prefix: &str) -> &str {
|
||||
match icon_prefix {
|
||||
"Ld" => "round",
|
||||
"Fi" => "round",
|
||||
_ => "butt",
|
||||
}
|
||||
}
|
||||
|
||||
fn extract_stroke_linejoin(icon_prefix: &str) -> &str {
|
||||
match icon_prefix {
|
||||
"Ld" => "round",
|
||||
"Fi" => "round",
|
||||
_ => "miter",
|
||||
}
|
||||
}
|
||||
|
||||
fn extract_svg_child_elements(elements: &[&Element], icon_prefix: &str) -> String {
|
||||
let elements = match icon_prefix {
|
||||
"Md" => &elements[1..],
|
||||
_ => elements,
|
||||
};
|
||||
elements
|
||||
.iter()
|
||||
.map(|element| {
|
||||
let tag_name = element.name();
|
||||
let mut element_attrs = element
|
||||
.attrs()
|
||||
.filter_map(|(name, value)| {
|
||||
let value = if icon_prefix == "Io" {
|
||||
value.replace("fill:none;stroke:#000;", "")
|
||||
} else {
|
||||
value.to_string()
|
||||
};
|
||||
let re = Regex::new(r"^data-.*$").unwrap();
|
||||
if !re.is_match(name) && name != "fill" {
|
||||
Some(format!(
|
||||
" {}: \"{}\",",
|
||||
name.to_snake_case(),
|
||||
value
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
element_attrs.sort();
|
||||
let attrs_str = element_attrs.join("\n");
|
||||
" {TAG_NAME} {\n{ATTRS}\n }"
|
||||
.replace("{TAG_NAME}", tag_name)
|
||||
.replace("{ATTRS}", &attrs_str)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
}
|
||||
79
dioxus-free-icons/packages/codegen/src/main.rs
Normal file
79
dioxus-free-icons/packages/codegen/src/main.rs
Normal file
@@ -0,0 +1,79 @@
|
||||
mod create_icon_file;
|
||||
|
||||
fn main() {
|
||||
const OUTPUT_BASE_PATH: &str = "../lib/src/icons";
|
||||
|
||||
// create font awesome icons
|
||||
const FA_SVG_BASE_PATH: &str = "../../icon_resources/font-awesome/svgs";
|
||||
for icon_type in vec!["brands", "regular", "solid"].into_iter() {
|
||||
let svg_path = format!("{}/{}", FA_SVG_BASE_PATH, icon_type);
|
||||
let output_path = format!("{}/fa_{}_icons.rs", OUTPUT_BASE_PATH, icon_type);
|
||||
create_icon_file::create_icon_file(&svg_path, &output_path, "Fa");
|
||||
}
|
||||
|
||||
// create hero icons
|
||||
const HI_SVG_BASE_PATH: &str = "../../icon_resources/heroicons/src";
|
||||
for icon_type in vec!["outline", "solid"].into_iter() {
|
||||
let svg_path = format!("{}/{}", HI_SVG_BASE_PATH, icon_type);
|
||||
let output_path = format!("{}/hi_{}_icons.rs", OUTPUT_BASE_PATH, icon_type);
|
||||
create_icon_file::create_icon_file(&svg_path, &output_path, "Hi");
|
||||
}
|
||||
|
||||
// create ionicons
|
||||
const IO_SVG_BASE_PATH: &str = "../../icon_resources/ionicons/src/svg";
|
||||
let output_path = format!("{}/io_icons.rs", OUTPUT_BASE_PATH);
|
||||
create_icon_file::create_icon_file(IO_SVG_BASE_PATH, &output_path, "Io");
|
||||
|
||||
// create octicons
|
||||
const GO_SVG_BASE_PATH: &str = "../../icon_resources/octicons/icons";
|
||||
let go_output_path = format!("{}/go_icons.rs", OUTPUT_BASE_PATH);
|
||||
create_icon_file::create_icon_file(GO_SVG_BASE_PATH, &go_output_path, "Go");
|
||||
|
||||
// create bootstrap icons
|
||||
const BS_SVG_BASE_PATH: &str = "../../icon_resources/bootstrap/icons";
|
||||
let bs_output_path = format!("{}/bs_icons.rs", OUTPUT_BASE_PATH);
|
||||
create_icon_file::create_icon_file(BS_SVG_BASE_PATH, &bs_output_path, "Bs");
|
||||
|
||||
// create feather icons
|
||||
const FI_SVG_BASE_PATH: &str = "../../icon_resources/feather/icons";
|
||||
let fi_output_path = format!("{}/fi_icons.rs", OUTPUT_BASE_PATH);
|
||||
create_icon_file::create_icon_file(FI_SVG_BASE_PATH, &fi_output_path, "Fi");
|
||||
|
||||
// create feather icons
|
||||
const LD_SVG_BASE_PATH: &str = "../../icon_resources/lucide/icons";
|
||||
let ld_output_path = format!("{}/ld_icons.rs", OUTPUT_BASE_PATH);
|
||||
create_icon_file::create_icon_file(LD_SVG_BASE_PATH, &ld_output_path, "Ld");
|
||||
|
||||
// create material design icons
|
||||
const MI_SVG_BASE_PATH: &str = "../../icon_resources/material-design-icons/src";
|
||||
for icon_type in vec![
|
||||
"action",
|
||||
"alert",
|
||||
"av",
|
||||
"communication",
|
||||
"content",
|
||||
"device",
|
||||
"editor",
|
||||
"file",
|
||||
"hardware",
|
||||
"home",
|
||||
"image",
|
||||
"maps",
|
||||
"navigation",
|
||||
"notification",
|
||||
"places",
|
||||
"social",
|
||||
"toggle",
|
||||
]
|
||||
.into_iter()
|
||||
{
|
||||
let svg_path = format!("{}/{}", MI_SVG_BASE_PATH, icon_type);
|
||||
let output_path = format!("{}/md_{}_icons.rs", OUTPUT_BASE_PATH, icon_type);
|
||||
create_icon_file::create_icon_file(&svg_path, &output_path, "Md");
|
||||
}
|
||||
|
||||
// create vscode-codicons
|
||||
const VS_SVG_BASE_PATH: &str = "../../icon_resources/vscode-codicons/src/icons";
|
||||
let vs_output_path = format!("{}/vsc_icons.rs", OUTPUT_BASE_PATH);
|
||||
create_icon_file::create_icon_file(VS_SVG_BASE_PATH, &vs_output_path, "Vsc");
|
||||
}
|
||||
17
dioxus-free-icons/packages/example/.gitignore
vendored
Normal file
17
dioxus-free-icons/packages/example/.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
/target/
|
||||
|
||||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
||||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
||||
Cargo.lock
|
||||
|
||||
# These are backup files generated by rustfmt
|
||||
**/*.rs.bk
|
||||
|
||||
|
||||
# Added by cargo
|
||||
|
||||
/target
|
||||
|
||||
/dist
|
||||
19
dioxus-free-icons/packages/example/Cargo.toml
Normal file
19
dioxus-free-icons/packages/example/Cargo.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "hello-dioxus"
|
||||
version = "0.1.0"
|
||||
authors = ["nissy-dev <nd.12021218@gmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
dioxus = { workspace = true, features = ["launch", "web"] }
|
||||
dioxus-free-icons = { path = "../lib", features = ["font-awesome-brands"] }
|
||||
|
||||
log = "0.4.6"
|
||||
|
||||
# WebAssembly Debug
|
||||
wasm-logger = "0.2.0"
|
||||
console_error_panic_hook = "0.1.7"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
opt-level = 's'
|
||||
42
dioxus-free-icons/packages/example/Dioxus.toml
Normal file
42
dioxus-free-icons/packages/example/Dioxus.toml
Normal file
@@ -0,0 +1,42 @@
|
||||
[application]
|
||||
|
||||
# App (Project) Name
|
||||
name = "hello-dioxus"
|
||||
|
||||
# Dioxus App Default Platform
|
||||
# desktop, web, mobile, ssr
|
||||
default_platform = "web"
|
||||
|
||||
# `build` & `serve` dist path
|
||||
out_dir = "dist"
|
||||
|
||||
# resource (public) file folder
|
||||
asset_dir = "public"
|
||||
|
||||
[web.app]
|
||||
|
||||
# HTML title tag content
|
||||
title = "dioxus | ⛺"
|
||||
|
||||
[web.watcher]
|
||||
|
||||
# when watcher trigger, regenerate the `index.html`
|
||||
reload_html = true
|
||||
|
||||
# which files or dirs will be watcher monitoring
|
||||
watch_path = ["src", "public"]
|
||||
|
||||
# include `assets` in web platform
|
||||
[web.resource]
|
||||
|
||||
# CSS style file
|
||||
style = []
|
||||
|
||||
# Javascript code file
|
||||
script = []
|
||||
|
||||
[web.resource.dev]
|
||||
|
||||
# Javascript code file
|
||||
# serve: [dev-server] only
|
||||
script = []
|
||||
21
dioxus-free-icons/packages/example/LICENSE
Normal file
21
dioxus-free-icons/packages/example/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022-Present Daiki Nishikawa
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
11
dioxus-free-icons/packages/example/README.md
Normal file
11
dioxus-free-icons/packages/example/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Example
|
||||
|
||||
> a template for starting a dioxus project to be used with [dioxus-cli](https://github.com/DioxusLabs/cli)
|
||||
|
||||
## Usage
|
||||
|
||||
#### Start a `dev-server` for the project:
|
||||
|
||||
```
|
||||
dioxus serve
|
||||
```
|
||||
0
dioxus-free-icons/packages/example/public/.gitkeep
Normal file
0
dioxus-free-icons/packages/example/public/.gitkeep
Normal file
28
dioxus-free-icons/packages/example/src/main.rs
Normal file
28
dioxus-free-icons/packages/example/src/main.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use dioxus_free_icons::icons::fa_brands_icons::FaRust;
|
||||
use dioxus_free_icons::Icon;
|
||||
|
||||
fn main() {
|
||||
// init debug tool for WebAssembly
|
||||
wasm_logger::init(wasm_logger::Config::default());
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
launch(app);
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
rsx! (
|
||||
div {
|
||||
style: "text-align: center;",
|
||||
h1 { "🌗 Dioxus 🚀" }
|
||||
h3 { "Frontend that scales." }
|
||||
p { "Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust." },
|
||||
Icon {
|
||||
width: 60,
|
||||
height: 60,
|
||||
icon: FaRust,
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
45
dioxus-free-icons/packages/lib/Cargo.toml
Normal file
45
dioxus-free-icons/packages/lib/Cargo.toml
Normal file
@@ -0,0 +1,45 @@
|
||||
[package]
|
||||
name = "dioxus-free-icons"
|
||||
version = "0.10.0"
|
||||
edition = "2021"
|
||||
authors = ["Daiki Nishikawa <nd.12021218@gmail.com>", "Marc Espín <mespinsanz@gmail.com>"]
|
||||
description = "Use free svg icons in your Dioxus projects easily with dioxus-free-icons."
|
||||
license = "MIT"
|
||||
repository = "https://github.com/dioxus-community/dioxus-free-icons"
|
||||
readme = "../../README.md"
|
||||
|
||||
[dependencies]
|
||||
dioxus = { workspace = true }
|
||||
|
||||
[features]
|
||||
font-awesome-brands = []
|
||||
font-awesome-regular = []
|
||||
font-awesome-solid = []
|
||||
bootstrap = []
|
||||
feather = []
|
||||
octicons = []
|
||||
hero-icons-outline = []
|
||||
hero-icons-solid = []
|
||||
ionicons = []
|
||||
lucide = []
|
||||
material-design-icons-action = []
|
||||
material-design-icons-alert = []
|
||||
material-design-icons-av = []
|
||||
material-design-icons-communication = []
|
||||
material-design-icons-content = []
|
||||
material-design-icons-device = []
|
||||
material-design-icons-editor = []
|
||||
material-design-icons-file = []
|
||||
material-design-icons-hardware = []
|
||||
material-design-icons-home = []
|
||||
material-design-icons-image = []
|
||||
material-design-icons-maps = []
|
||||
material-design-icons-navigation = []
|
||||
material-design-icons-notification = []
|
||||
material-design-icons-places = []
|
||||
material-design-icons-social = []
|
||||
material-design-icons-toggle = []
|
||||
codicons = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
46
dioxus-free-icons/packages/lib/LICENSE
Normal file
46
dioxus-free-icons/packages/lib/LICENSE
Normal file
@@ -0,0 +1,46 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022-Present Daiki Nishikawa
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
Icons are taken from the Font Awesome projects,
|
||||
so please check the project license accordingly.
|
||||
|
||||
Bootstrap Icons - https://github.com/twbs/icons
|
||||
License: MIT License https://github.com/twbs/icons/blob/main/LICENSE.md
|
||||
|
||||
Feather - https://feathericons.com/
|
||||
License: MIT https://github.com/feathericons/feather/blob/master/LICENSE
|
||||
|
||||
Font Awesome - https://fontawesome.com/
|
||||
License: CC BY 4.0 License https://fontawesome.com/license/free
|
||||
|
||||
Heroicons - https://heroicons.com/
|
||||
License: MIT License https://github.com/tailwindlabs/heroicons/blob/master/LICENSE
|
||||
|
||||
Ionicons - https://ionic.io/ionicons/
|
||||
License: MIT License https://github.com/ionic-team/ionicons/blob/main/LICENSE
|
||||
|
||||
Material Design icons - https://developers.google.com/fonts/docs/material_icons
|
||||
License: Apache License 2.0 https://github.com/google/material-design-icons/blob/master/LICENSE
|
||||
|
||||
Octicons - https://primer.style/octicons/
|
||||
License: MIT https://github.com/primer/octicons/blob/master/LICENSE
|
||||
65
dioxus-free-icons/packages/lib/src/icon_component.rs
Normal file
65
dioxus-free-icons/packages/lib/src/icon_component.rs
Normal file
@@ -0,0 +1,65 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
/// Icon shape trait
|
||||
pub trait IconShape {
|
||||
fn view_box(&self) -> &str;
|
||||
fn xmlns(&self) -> &str;
|
||||
fn child_elements(&self) -> Element;
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
("none", user_color, "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
}
|
||||
|
||||
/// Icon component Props
|
||||
#[derive(PartialEq, Props, Clone)]
|
||||
pub struct IconProps<T: IconShape + Clone + PartialEq + 'static> {
|
||||
/// The icon shape to use.
|
||||
pub icon: T,
|
||||
/// The height of the `<svg>` element. Defaults to 20. Pass None to omit.
|
||||
#[props(default = Some(20))]
|
||||
pub height: Option<u32>,
|
||||
/// The width of the `<svg>` element. Defaults to 20. Pass None to omit.
|
||||
#[props(default = Some(20))]
|
||||
pub width: Option<u32>,
|
||||
/// The color to use for filling the icon. Defaults to "currentColor".
|
||||
#[props(default = "currentColor".to_string())]
|
||||
pub fill: String,
|
||||
/// An class for the `<svg>` element.
|
||||
#[props(default = "".to_string())]
|
||||
pub class: String,
|
||||
/// An accessible, short-text description for the icon.
|
||||
pub title: Option<String>,
|
||||
/// The style of the `<svg>` element.
|
||||
pub style: Option<String>,
|
||||
}
|
||||
|
||||
/// Icon component which generates SVG elements
|
||||
#[allow(non_snake_case)]
|
||||
pub fn Icon<T: IconShape + Clone + PartialEq + 'static>(props: IconProps<T>) -> Element {
|
||||
let (fill, stroke, stroke_width) = props.icon.fill_and_stroke(&props.fill);
|
||||
rsx!(
|
||||
svg {
|
||||
class: "{props.class}",
|
||||
style: props.style,
|
||||
height: props.height.map(|height| height.to_string()),
|
||||
width: props.width.map(|width| width.to_string()),
|
||||
view_box: "{props.icon.view_box()}",
|
||||
xmlns: "{props.icon.xmlns()}",
|
||||
fill,
|
||||
stroke,
|
||||
stroke_width,
|
||||
stroke_linecap: "{props.icon.stroke_linecap()}",
|
||||
stroke_linejoin: "{props.icon.stroke_linejoin()}",
|
||||
if let Some(title_text) = props.title {
|
||||
title { "{title_text}" }
|
||||
}
|
||||
{props.icon.child_elements()}
|
||||
}
|
||||
)
|
||||
}
|
||||
56
dioxus-free-icons/packages/lib/src/icons.rs
Normal file
56
dioxus-free-icons/packages/lib/src/icons.rs
Normal file
@@ -0,0 +1,56 @@
|
||||
#[cfg(feature = "bootstrap")]
|
||||
pub mod bs_icons;
|
||||
#[cfg(feature = "font-awesome-brands")]
|
||||
pub mod fa_brands_icons;
|
||||
#[cfg(feature = "font-awesome-regular")]
|
||||
pub mod fa_regular_icons;
|
||||
#[cfg(feature = "font-awesome-solid")]
|
||||
pub mod fa_solid_icons;
|
||||
#[cfg(feature = "feather")]
|
||||
pub mod fi_icons;
|
||||
#[cfg(feature = "octicons")]
|
||||
pub mod go_icons;
|
||||
#[cfg(feature = "hero-icons-outline")]
|
||||
pub mod hi_outline_icons;
|
||||
#[cfg(feature = "hero-icons-solid")]
|
||||
pub mod hi_solid_icons;
|
||||
#[cfg(feature = "ionicons")]
|
||||
pub mod io_icons;
|
||||
#[cfg(feature = "lucide")]
|
||||
pub mod ld_icons;
|
||||
#[cfg(feature = "material-design-icons-action")]
|
||||
pub mod md_action_icons;
|
||||
#[cfg(feature = "material-design-icons-alert")]
|
||||
pub mod md_alert_icons;
|
||||
#[cfg(feature = "material-design-icons-av")]
|
||||
pub mod md_av_icons;
|
||||
#[cfg(feature = "material-design-icons-communication")]
|
||||
pub mod md_communication_icons;
|
||||
#[cfg(feature = "material-design-icons-content")]
|
||||
pub mod md_content_icons;
|
||||
#[cfg(feature = "material-design-icons-device")]
|
||||
pub mod md_device_icons;
|
||||
#[cfg(feature = "material-design-icons-editor")]
|
||||
pub mod md_editor_icons;
|
||||
#[cfg(feature = "material-design-icons-file")]
|
||||
pub mod md_file_icons;
|
||||
#[cfg(feature = "material-design-icons-hardware")]
|
||||
pub mod md_hardware_icons;
|
||||
#[cfg(feature = "material-design-icons-home")]
|
||||
pub mod md_home_icons;
|
||||
#[cfg(feature = "material-design-icons-image")]
|
||||
pub mod md_image_icons;
|
||||
#[cfg(feature = "material-design-icons-maps")]
|
||||
pub mod md_maps_icons;
|
||||
#[cfg(feature = "material-design-icons-navigation")]
|
||||
pub mod md_navigation_icons;
|
||||
#[cfg(feature = "material-design-icons-notification")]
|
||||
pub mod md_notification_icons;
|
||||
#[cfg(feature = "material-design-icons-places")]
|
||||
pub mod md_places_icons;
|
||||
#[cfg(feature = "material-design-icons-social")]
|
||||
pub mod md_social_icons;
|
||||
#[cfg(feature = "material-design-icons-toggle")]
|
||||
pub mod md_toggle_icons;
|
||||
#[cfg(feature = "codicons")]
|
||||
pub mod vsc_icons;
|
||||
47631
dioxus-free-icons/packages/lib/src/icons/bs_icons.rs
Normal file
47631
dioxus-free-icons/packages/lib/src/icons/bs_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
14825
dioxus-free-icons/packages/lib/src/icons/fa_brands_icons.rs
Normal file
14825
dioxus-free-icons/packages/lib/src/icons/fa_brands_icons.rs
Normal file
File diff suppressed because one or more lines are too long
7373
dioxus-free-icons/packages/lib/src/icons/fa_regular_icons.rs
Normal file
7373
dioxus-free-icons/packages/lib/src/icons/fa_regular_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
53570
dioxus-free-icons/packages/lib/src/icons/fa_solid_icons.rs
Normal file
53570
dioxus-free-icons/packages/lib/src/icons/fa_solid_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
10535
dioxus-free-icons/packages/lib/src/icons/fi_icons.rs
Normal file
10535
dioxus-free-icons/packages/lib/src/icons/fi_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
7548
dioxus-free-icons/packages/lib/src/icons/go_icons.rs
Normal file
7548
dioxus-free-icons/packages/lib/src/icons/go_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
7300
dioxus-free-icons/packages/lib/src/icons/hi_outline_icons.rs
Normal file
7300
dioxus-free-icons/packages/lib/src/icons/hi_outline_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
6982
dioxus-free-icons/packages/lib/src/icons/hi_solid_icons.rs
Normal file
6982
dioxus-free-icons/packages/lib/src/icons/hi_solid_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
47947
dioxus-free-icons/packages/lib/src/icons/io_icons.rs
Normal file
47947
dioxus-free-icons/packages/lib/src/icons/io_icons.rs
Normal file
File diff suppressed because one or more lines are too long
62452
dioxus-free-icons/packages/lib/src/icons/ld_icons.rs
Normal file
62452
dioxus-free-icons/packages/lib/src/icons/ld_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
9442
dioxus-free-icons/packages/lib/src/icons/md_action_icons.rs
Normal file
9442
dioxus-free-icons/packages/lib/src/icons/md_action_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
170
dioxus-free-icons/packages/lib/src/icons/md_alert_icons.rs
Normal file
170
dioxus-free-icons/packages/lib/src/icons/md_alert_icons.rs
Normal file
@@ -0,0 +1,170 @@
|
||||
use super::super::IconShape;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdAddAlert;
|
||||
impl IconShape for MdAddAlert {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06l-2.12-2.12zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3v2.01z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdAutoDelete;
|
||||
impl IconShape for MdAutoDelete {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
polygon {
|
||||
points: "15,2 11.5,2 10.5,1 5.5,1 4.5,2 1,2 1,4 15,4",
|
||||
}
|
||||
path {
|
||||
d: "M16,9c-0.7,0-1.37,0.1-2,0.29V5H2v12c0,1.1,0.9,2,2,2h5.68c1.12,2.36,3.53,4,6.32,4c3.87,0,7-3.13,7-7 C23,12.13,19.87,9,16,9z M16,21c-2.76,0-5-2.24-5-5s2.24-5,5-5s5,2.24,5,5S18.76,21,16,21z",
|
||||
}
|
||||
polygon {
|
||||
points: "16.5,12 15,12 15,17 18.6,19.1 19.4,17.9 16.5,16.2",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdError;
|
||||
impl IconShape for MdError {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdErrorOutline;
|
||||
impl IconShape for MdErrorOutline {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdNotificationImportant;
|
||||
impl IconShape for MdNotificationImportant {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M18 16v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-5 0h-2v-2h2v2zm0-4h-2V8h2v4zm-1 10c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdWarning;
|
||||
impl IconShape for MdWarning {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3166
dioxus-free-icons/packages/lib/src/icons/md_av_icons.rs
Normal file
3166
dioxus-free-icons/packages/lib/src/icons/md_av_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
2418
dioxus-free-icons/packages/lib/src/icons/md_communication_icons.rs
Normal file
2418
dioxus-free-icons/packages/lib/src/icons/md_communication_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
1903
dioxus-free-icons/packages/lib/src/icons/md_content_icons.rs
Normal file
1903
dioxus-free-icons/packages/lib/src/icons/md_content_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
1720
dioxus-free-icons/packages/lib/src/icons/md_device_icons.rs
Normal file
1720
dioxus-free-icons/packages/lib/src/icons/md_device_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
2371
dioxus-free-icons/packages/lib/src/icons/md_editor_icons.rs
Normal file
2371
dioxus-free-icons/packages/lib/src/icons/md_editor_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
818
dioxus-free-icons/packages/lib/src/icons/md_file_icons.rs
Normal file
818
dioxus-free-icons/packages/lib/src/icons/md_file_icons.rs
Normal file
@@ -0,0 +1,818 @@
|
||||
use super::super::IconShape;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdApproval;
|
||||
impl IconShape for MdApproval {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M4 16v6h16v-6c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2zm14 2H6v-2h12v2zM12 2C9.24 2 7 4.24 7 7l5 7 5-7c0-2.76-2.24-5-5-5zm0 9L9 7c0-1.66 1.34-3 3-3s3 1.34 3 3l-3 4z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdAttachEmail;
|
||||
impl IconShape for MdAttachEmail {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M21,10V4c0-1.1-0.9-2-2-2H3C1.9,2,1.01,2.9,1.01,4L1,16c0,1.1,0.9,2,2,2h11v-5c0-1.66,1.34-3,3-3H21z M11,11L3,6V4l8,5 l8-5v2L11,11z",
|
||||
}
|
||||
path {
|
||||
d: "M21,14v4c0,1.1-0.9,2-2,2s-2-0.9-2-2v-4.5c0-0.28,0.22-0.5,0.5-0.5s0.5,0.22,0.5,0.5V18h2v-4.5c0-1.38-1.12-2.5-2.5-2.5 S15,12.12,15,13.5V18c0,2.21,1.79,4,4,4s4-1.79,4-4v-4H21z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdAttachment;
|
||||
impl IconShape for MdAttachment {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCloud;
|
||||
impl IconShape for MdCloud {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCloudCircle;
|
||||
impl IconShape for MdCloudCircle {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14H8c-1.66 0-3-1.34-3-3s1.34-3 3-3l.14.01C8.58 8.28 10.13 7 12 7c2.21 0 4 1.79 4 4h.5c1.38 0 2.5 1.12 2.5 2.5S17.88 16 16.5 16z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCloudDone;
|
||||
impl IconShape for MdCloudDone {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCloudDownload;
|
||||
impl IconShape for MdCloudDownload {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCloudOff;
|
||||
impl IconShape for MdCloudOff {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4 3 5.27zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h1.73z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCloudQueue;
|
||||
impl IconShape for MdCloudQueue {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h.71C7.37 7.69 9.48 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3s-1.34 3-3 3z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCloudUpload;
|
||||
impl IconShape for MdCloudUpload {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCreateNewFolder;
|
||||
impl IconShape for MdCreateNewFolder {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3v2z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdDriveFileMove;
|
||||
impl IconShape for MdDriveFileMove {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-6 12v-3h-4v-4h4V8l5 5-5 5z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdDriveFileMoveOutline;
|
||||
impl IconShape for MdDriveFileMoveOutline {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10zm-8.01-9l-1.41 1.41L12.16 12H8v2h4.16l-1.59 1.59L11.99 17 16 13.01 11.99 9z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdDriveFileRenameOutline;
|
||||
impl IconShape for MdDriveFileRenameOutline {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M18.41 5.8L17.2 4.59c-.78-.78-2.05-.78-2.83 0l-2.68 2.68L3 15.96V20h4.04l8.74-8.74 2.63-2.63c.79-.78.79-2.05 0-2.83zM6.21 18H5v-1.21l8.66-8.66 1.21 1.21L6.21 18zM11 20l4-4h6v4H11z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdDriveFolderUpload;
|
||||
impl IconShape for MdDriveFolderUpload {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10zM8 13.01l1.41 1.41L11 12.84V17h2v-4.16l1.59 1.59L16 13.01 12.01 9 8 13.01z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdFileDownload;
|
||||
impl IconShape for MdFileDownload {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdFileDownloadDone;
|
||||
impl IconShape for MdFileDownloadDone {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M5 18h14v2H5v-2zm4.6-2.7L5 10.7l2-1.9 2.6 2.6L17 4l2 2-9.4 9.3z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdFileUpload;
|
||||
impl IconShape for MdFileUpload {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdFolder;
|
||||
impl IconShape for MdFolder {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdFolderOpen;
|
||||
impl IconShape for MdFolderOpen {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdFolderShared;
|
||||
impl IconShape for MdFolderShared {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v-1c0-1.33 2.67-2 4-2s4 .67 4 2v1z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdGridView;
|
||||
impl IconShape for MdGridView {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M0 0h24v24H0z",
|
||||
}
|
||||
path {
|
||||
d: "M3 3v8h8V3H3zm6 6H5V5h4v4zm-6 4v8h8v-8H3zm6 6H5v-4h4v4zm4-16v8h8V3h-8zm6 6h-4V5h4v4zm-6 4v8h8v-8h-8zm6 6h-4v-4h4v4z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdRequestQuote;
|
||||
impl IconShape for MdRequestQuote {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M14,2H6C4.9,2,4.01,2.9,4.01,4L4,20c0,1.1,0.89,2,1.99,2H18c1.1,0,2-0.9,2-2V8L14,2z M15,12h-4v1h3c0.55,0,1,0.45,1,1v3 c0,0.55-0.45,1-1,1h-1v1h-2v-1H9v-2h4v-1h-3c-0.55,0-1-0.45-1-1v-3c0-0.55,0.45-1,1-1h1V9h2v1h2V12z M13,8V3.5L17.5,8H13z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdRuleFolder;
|
||||
impl IconShape for MdRuleFolder {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20,6h-8l-2-2H4C2.9,4,2.01,4.9,2.01,6L2,18c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M7.83,16L5,13.17 l1.41-1.41l1.41,1.41l3.54-3.54l1.41,1.41L7.83,16z M17.41,13L19,14.59L17.59,16L16,14.41L14.41,16L13,14.59L14.59,13L13,11.41 L14.41,10L16,11.59L17.59,10L19,11.41L17.41,13z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdSnippetFolder;
|
||||
impl IconShape for MdSnippetFolder {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M15.88,10.5l1.62,1.62v3.38l-3,0v-5H15.88z M22,8v10c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2L2.01,6C2.01,4.9,2.9,4,4,4h6l2,2 h8C21.1,6,22,6.9,22,8z M19,11.5L16.5,9H13v8l6,0V11.5z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdTextSnippet;
|
||||
impl IconShape for MdTextSnippet {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20.41,8.41l-4.83-4.83C15.21,3.21,14.7,3,14.17,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V9.83 C21,9.3,20.79,8.79,20.41,8.41z M7,7h7v2H7V7z M17,17H7v-2h10V17z M17,13H7v-2h10V13z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdTopic;
|
||||
impl IconShape for MdTopic {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M20,6h-8l-2-2H4C2.9,4,2.01,4.9,2.01,6L2,18c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M14,16H6v-2h8V16z M18,12H6v-2h12V12z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdUploadFile;
|
||||
impl IconShape for MdUploadFile {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdWorkspacesFilled;
|
||||
impl IconShape for MdWorkspacesFilled {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M6 13c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6-10C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6 10c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdWorkspacesOutline;
|
||||
impl IconShape for MdWorkspacesOutline {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M6 15c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6-8c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2C9.8 3 8 4.8 8 7s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm6 12c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0-2c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1501
dioxus-free-icons/packages/lib/src/icons/md_hardware_icons.rs
Normal file
1501
dioxus-free-icons/packages/lib/src/icons/md_hardware_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
56
dioxus-free-icons/packages/lib/src/icons/md_home_icons.rs
Normal file
56
dioxus-free-icons/packages/lib/src/icons/md_home_icons.rs
Normal file
@@ -0,0 +1,56 @@
|
||||
use super::super::IconShape;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdSensorDoor;
|
||||
impl IconShape for MdSensorDoor {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M18,2H6C4.9,2,4,2.9,4,4v18h16V4C20,2.9,19.1,2,18,2z M15.5,13.5c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5 S17,11.17,17,12S16.33,13.5,15.5,13.5z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdSensorWindow;
|
||||
impl IconShape for MdSensorWindow {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M18,4v16H6V4H18 M18,2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2L18,2z M7,19h10v-6H7 V19z M10,10h4v1h3V5H7v6h3V10z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
5941
dioxus-free-icons/packages/lib/src/icons/md_image_icons.rs
Normal file
5941
dioxus-free-icons/packages/lib/src/icons/md_image_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
4214
dioxus-free-icons/packages/lib/src/icons/md_maps_icons.rs
Normal file
4214
dioxus-free-icons/packages/lib/src/icons/md_maps_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
1445
dioxus-free-icons/packages/lib/src/icons/md_navigation_icons.rs
Normal file
1445
dioxus-free-icons/packages/lib/src/icons/md_navigation_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
1703
dioxus-free-icons/packages/lib/src/icons/md_notification_icons.rs
Normal file
1703
dioxus-free-icons/packages/lib/src/icons/md_notification_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
1879
dioxus-free-icons/packages/lib/src/icons/md_places_icons.rs
Normal file
1879
dioxus-free-icons/packages/lib/src/icons/md_places_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
2912
dioxus-free-icons/packages/lib/src/icons/md_social_icons.rs
Normal file
2912
dioxus-free-icons/packages/lib/src/icons/md_social_icons.rs
Normal file
File diff suppressed because it is too large
Load Diff
298
dioxus-free-icons/packages/lib/src/icons/md_toggle_icons.rs
Normal file
298
dioxus-free-icons/packages/lib/src/icons/md_toggle_icons.rs
Normal file
@@ -0,0 +1,298 @@
|
||||
use super::super::IconShape;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCheckBox;
|
||||
impl IconShape for MdCheckBox {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdCheckBoxOutlineBlank;
|
||||
impl IconShape for MdCheckBoxOutlineBlank {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdIndeterminateCheckBox;
|
||||
impl IconShape for MdIndeterminateCheckBox {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdRadioButtonChecked;
|
||||
impl IconShape for MdRadioButtonChecked {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdRadioButtonUnchecked;
|
||||
impl IconShape for MdRadioButtonUnchecked {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdStar;
|
||||
impl IconShape for MdStar {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M0 0h24v24H0z",
|
||||
}
|
||||
path {
|
||||
d: "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdStarBorder;
|
||||
impl IconShape for MdStarBorder {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdStarHalf;
|
||||
impl IconShape for MdStarHalf {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M22,9.24l-7.19-0.62L12,2L9.19,8.63L2,9.24l5.46,4.73L5.82,21L12,17.27L18.18,21l-1.63-7.03L22,9.24z M12,15.4V6.1 l1.71,4.04l4.38,0.38l-3.32,2.88l1,4.28L12,15.4z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdStarOutline;
|
||||
impl IconShape for MdStarOutline {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdToggleOff;
|
||||
impl IconShape for MdToggleOff {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5zM7 15c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct MdToggleOn;
|
||||
impl IconShape for MdToggleOn {
|
||||
fn view_box(&self) -> &str {
|
||||
"0 0 24 24"
|
||||
}
|
||||
fn xmlns(&self) -> &str {
|
||||
"http://www.w3.org/2000/svg"
|
||||
}
|
||||
fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) {
|
||||
(user_color, "none", "0")
|
||||
}
|
||||
fn stroke_linecap(&self) -> &str {
|
||||
"butt"
|
||||
}
|
||||
fn stroke_linejoin(&self) -> &str {
|
||||
"miter"
|
||||
}
|
||||
fn child_elements(&self) -> Element {
|
||||
rsx! {
|
||||
path {
|
||||
d: "M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5zm0 8c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14164
dioxus-free-icons/packages/lib/src/icons/vsc_icons.rs
Normal file
14164
dioxus-free-icons/packages/lib/src/icons/vsc_icons.rs
Normal file
File diff suppressed because one or more lines are too long
27
dioxus-free-icons/packages/lib/src/lib.rs
Normal file
27
dioxus-free-icons/packages/lib/src/lib.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
//! # dioxus-free-icons
|
||||
//!
|
||||
//! Use free svg icons in your Dioxus projects easily with dioxus-free-icons.
|
||||
//! This library provides Icon component, which will generate SVG for a Font Awesome icon.
|
||||
//!
|
||||
//! Basic usage:
|
||||
//! ```ignore
|
||||
//! use dioxus::prelude::*;
|
||||
//! use dioxus_free_icons::icons::fa_brands_icons::FaRust;
|
||||
//! use dioxus_free_icons::Icon;
|
||||
//!
|
||||
//! fn RustIcon() -> Element {
|
||||
//! rsx!(
|
||||
//! Icon {
|
||||
//! width: 30,
|
||||
//! height: 30,
|
||||
//! fill: "black",
|
||||
//! icon: Icon::FaRust,
|
||||
//! }
|
||||
//! )
|
||||
//! }
|
||||
//! ```
|
||||
mod icon_component;
|
||||
|
||||
/// a collections of free icons
|
||||
pub mod icons;
|
||||
pub use crate::icon_component::{Icon, IconProps, IconShape};
|
||||
Reference in New Issue
Block a user