├── packages ├── example │ ├── public │ │ └── .gitkeep │ ├── README.md │ ├── .gitignore │ ├── Cargo.toml │ ├── src │ │ └── main.rs │ ├── Dioxus.toml │ └── LICENSE ├── codegen │ ├── Cargo.toml │ └── src │ │ ├── main.rs │ │ └── create_icon_file.rs └── lib │ ├── src │ ├── lib.rs │ ├── icons │ │ ├── md_home_icons.rs │ │ ├── md_alert_icons.rs │ │ ├── md_toggle_icons.rs │ │ ├── md_file_icons.rs │ │ ├── md_navigation_icons.rs │ │ └── md_hardware_icons.rs │ ├── icons.rs │ └── icon_component.rs │ ├── Cargo.toml │ └── LICENSE ├── .gitignore ├── .github ├── workflows │ ├── publish.yml │ ├── ci.yml │ └── release-drafter.yml └── release-drafter.yml ├── Cargo.toml ├── .gitmodules ├── LICENSE └── README.md /packages/example/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/example/README.md: -------------------------------------------------------------------------------- 1 | # Example 2 | 3 | > a template for starting a dioxus project to be used with [dioxus-cli](https://github.com/DioxusLabs/cli) 4 | 5 | ## Usage 6 | 7 | #### Start a `dev-server` for the project: 8 | 9 | ``` 10 | dioxus serve 11 | ``` 12 | -------------------------------------------------------------------------------- /packages/codegen/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dioxus-fontawesome-examples" 3 | version = "0.2.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | codegen = "0.1.3" 10 | heck = "0.4.0" 11 | regex = "1.6.0" 12 | scraper = "0.13.0" 13 | walkdir = "2.3.2" 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 6 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 7 | Cargo.lock 8 | 9 | # These are backup files generated by rustfmt 10 | **/*.rs.bk 11 | 12 | 13 | # Added by cargo 14 | 15 | /target 16 | /Cargo.lock 17 | -------------------------------------------------------------------------------- /packages/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 6 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 7 | Cargo.lock 8 | 9 | # These are backup files generated by rustfmt 10 | **/*.rs.bk 11 | 12 | 13 | # Added by cargo 14 | 15 | /target 16 | 17 | /dist 18 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Cargo Publish 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | env: 8 | CARGO_TERM_COLOR: always 9 | 10 | jobs: 11 | publish: 12 | name: Publish to crate.io 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | - run: cargo publish 17 | working-directory: ./packages/lib 18 | env: 19 | CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} 20 | -------------------------------------------------------------------------------- /packages/example/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hello-dioxus" 3 | version = "0.1.0" 4 | authors = ["nissy-dev "] 5 | edition = "2021" 6 | 7 | [dependencies] 8 | dioxus = { workspace = true, features = ["launch", "web"] } 9 | dioxus-free-icons = { path = "../lib", features = ["font-awesome-brands"] } 10 | 11 | log = "0.4.6" 12 | 13 | # WebAssembly Debug 14 | wasm-logger = "0.2.0" 15 | console_error_panic_hook = "0.1.7" 16 | 17 | [profile.release] 18 | lto = true 19 | opt-level = 's' 20 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | # monorepo only work when using virtual manifest 2 | # see: https://github.com/rust-lang/cargo/issues/7467#issuecomment-867632379 3 | [workspace] 4 | resolver = "2" 5 | members = ["packages/codegen", "packages/example", "packages/lib"] 6 | 7 | [workspace.dependencies] 8 | dioxus = { version = "0.7", default-features = false, features = [ 9 | "html", 10 | "macro", 11 | "signals", 12 | ] } 13 | 14 | [profile] 15 | 16 | [profile.wasm-dev] 17 | inherits = "dev" 18 | opt-level = 1 19 | 20 | [profile.server-dev] 21 | inherits = "dev" 22 | 23 | [profile.android-dev] 24 | inherits = "dev" 25 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Cargo Build & Test 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [ "main" ] 7 | pull_request: 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build_and_test: 14 | name: Rust project - latest 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v3 18 | - name: Install the nightly toolchain 19 | uses: dtolnay/rust-toolchain@nightly 20 | - name: Install linux dependencies 21 | if: runner.os == 'Linux' 22 | run: | 23 | sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev 24 | - run: cargo build --verbose 25 | - run: cargo test --verbose -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | # pull_request event is required only for autolabeler 8 | pull_request: 9 | # Only following types are handled by the action, but one can default to all as well 10 | types: [opened, reopened, synchronize] 11 | # pull_request_target event is required for autolabeler to support PRs from forks 12 | # pull_request_target: 13 | # types: [opened, reopened, synchronize] 14 | 15 | jobs: 16 | update_release_draft: 17 | permissions: 18 | contents: write 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: release-drafter/release-drafter@v5 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | -------------------------------------------------------------------------------- /packages/lib/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! # dioxus-free-icons 2 | //! 3 | //! Use free svg icons in your Dioxus projects easily with dioxus-free-icons. 4 | //! This library provides Icon component, which will generate SVG for a Font Awesome icon. 5 | //! 6 | //! Basic usage: 7 | //! ```ignore 8 | //! use dioxus::prelude::*; 9 | //! use dioxus_free_icons::icons::fa_brands_icons::FaRust; 10 | //! use dioxus_free_icons::Icon; 11 | //! 12 | //! fn RustIcon() -> Element { 13 | //! rsx!( 14 | //! Icon { 15 | //! width: 30, 16 | //! height: 30, 17 | //! fill: "black", 18 | //! icon: Icon::FaRust, 19 | //! } 20 | //! ) 21 | //! } 22 | //! ``` 23 | mod icon_component; 24 | 25 | /// a collections of free icons 26 | pub mod icons; 27 | pub use crate::icon_component::{Icon, IconProps, IconShape}; 28 | -------------------------------------------------------------------------------- /packages/example/src/main.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | use dioxus_free_icons::icons::fa_brands_icons::FaRust; 4 | use dioxus_free_icons::Icon; 5 | 6 | fn main() { 7 | // init debug tool for WebAssembly 8 | wasm_logger::init(wasm_logger::Config::default()); 9 | console_error_panic_hook::set_once(); 10 | 11 | launch(app); 12 | } 13 | 14 | fn app() -> Element { 15 | rsx! ( 16 | div { 17 | style: "text-align: center;", 18 | h1 { "🌗 Dioxus 🚀" } 19 | h3 { "Frontend that scales." } 20 | p { "Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust." }, 21 | Icon { 22 | width: 60, 23 | height: 60, 24 | icon: FaRust, 25 | } 26 | } 27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /packages/example/Dioxus.toml: -------------------------------------------------------------------------------- 1 | [application] 2 | 3 | # App (Project) Name 4 | name = "hello-dioxus" 5 | 6 | # Dioxus App Default Platform 7 | # desktop, web, mobile, ssr 8 | default_platform = "web" 9 | 10 | # `build` & `serve` dist path 11 | out_dir = "dist" 12 | 13 | # resource (public) file folder 14 | asset_dir = "public" 15 | 16 | [web.app] 17 | 18 | # HTML title tag content 19 | title = "dioxus | ⛺" 20 | 21 | [web.watcher] 22 | 23 | # when watcher trigger, regenerate the `index.html` 24 | reload_html = true 25 | 26 | # which files or dirs will be watcher monitoring 27 | watch_path = ["src", "public"] 28 | 29 | # include `assets` in web platform 30 | [web.resource] 31 | 32 | # CSS style file 33 | style = [] 34 | 35 | # Javascript code file 36 | script = [] 37 | 38 | [web.resource.dev] 39 | 40 | # Javascript code file 41 | # serve: [dev-server] only 42 | script = [] 43 | -------------------------------------------------------------------------------- /packages/example/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022-Present Daiki Nishikawa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "icon_resources/font-awesome"] 2 | path = icon_resources/font-awesome 3 | url = https://github.com/FortAwesome/Font-Awesome 4 | [submodule "icon_resources/heroicons"] 5 | path = icon_resources/heroicons 6 | url = https://github.com/tailwindlabs/heroicons 7 | [submodule "icon_resources/ionicons"] 8 | path = icon_resources/ionicons 9 | url = https://github.com/ionic-team/ionicons 10 | [submodule "icon_resources/octicons"] 11 | path = icon_resources/octicons 12 | url = https://github.com/primer/octicons 13 | [submodule "icon_resources/bootstrap"] 14 | path = icon_resources/bootstrap 15 | url = https://github.com/twbs/icons 16 | [submodule "icon_resources/feather"] 17 | path = icon_resources/feather 18 | url = https://github.com/feathericons/feather 19 | [submodule "icon_resources/lucide"] 20 | path = icon_resources/lucide 21 | url = https://github.com/lucide-icons/lucide 22 | [submodule "icon_resources/material-design-icons"] 23 | path = icon_resources/material-design-icons 24 | url = https://github.com/google/material-design-icons 25 | [submodule "icon_resources/vscode-codicons"] 26 | path = icon_resources/vscode-codicons 27 | url = https://github.com/microsoft/vscode-codicons.git 28 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name-template: "Release v$RESOLVED_VERSION 🦀" 2 | tag-template: "v$RESOLVED_VERSION" 3 | categories: 4 | - title: "🚀 Features" 5 | label: "feature" 6 | - title: "🐛 Bug Fixes" 7 | label: "bug" 8 | - title: "♻️ Refactor" 9 | label: "refactor" 10 | - title: "📝 Documentation" 11 | label: "documentation" 12 | - title: "🧰 Maintenance" 13 | labels: 14 | - "chore" 15 | - "dependencies" 16 | change-template: "- $TITLE @$AUTHOR (#$NUMBER)" 17 | change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. 18 | version-resolver: 19 | major: 20 | labels: 21 | - "major" 22 | minor: 23 | labels: 24 | - "minor" 25 | patch: 26 | labels: 27 | - "patch" 28 | default: patch 29 | template: | 30 | ## Changes 31 | 32 | $CHANGES 33 | autolabeler: 34 | - label: feature 35 | branch: 36 | - "/^feat(ure)?[/-].+/" 37 | - label: bug 38 | branch: 39 | - "/^fix[/-].+/" 40 | - label: refactor 41 | branch: 42 | - "/(refactor|refactoring)[/-].+/" 43 | - label: documentation 44 | branch: 45 | - "/doc(s|umentation)[/-].+/" 46 | - label: chore 47 | branch: 48 | - "/^chore[/-].+/" 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022-Present Daiki Nishikawa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | --- 24 | Icons are taken from the other projects 25 | so please check each project licences accordingly. 26 | -------------------------------------------------------------------------------- /packages/lib/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dioxus-free-icons" 3 | version = "0.10.0" 4 | edition = "2021" 5 | authors = ["Daiki Nishikawa ", "Marc Espín "] 6 | description = "Use free svg icons in your Dioxus projects easily with dioxus-free-icons." 7 | license = "MIT" 8 | repository = "https://github.com/dioxus-community/dioxus-free-icons" 9 | readme = "../../README.md" 10 | 11 | [dependencies] 12 | dioxus = { workspace = true } 13 | 14 | [features] 15 | font-awesome-brands = [] 16 | font-awesome-regular = [] 17 | font-awesome-solid = [] 18 | bootstrap = [] 19 | feather = [] 20 | octicons = [] 21 | hero-icons-outline = [] 22 | hero-icons-solid = [] 23 | ionicons = [] 24 | lucide = [] 25 | material-design-icons-action = [] 26 | material-design-icons-alert = [] 27 | material-design-icons-av = [] 28 | material-design-icons-communication = [] 29 | material-design-icons-content = [] 30 | material-design-icons-device = [] 31 | material-design-icons-editor = [] 32 | material-design-icons-file = [] 33 | material-design-icons-hardware = [] 34 | material-design-icons-home = [] 35 | material-design-icons-image = [] 36 | material-design-icons-maps = [] 37 | material-design-icons-navigation = [] 38 | material-design-icons-notification = [] 39 | material-design-icons-places = [] 40 | material-design-icons-social = [] 41 | material-design-icons-toggle = [] 42 | codicons = [] 43 | 44 | [package.metadata.docs.rs] 45 | all-features = true 46 | -------------------------------------------------------------------------------- /packages/lib/src/icons/md_home_icons.rs: -------------------------------------------------------------------------------- 1 | use super::super::IconShape; 2 | use dioxus::prelude::*; 3 | 4 | #[derive(Copy, Clone, Debug, PartialEq)] 5 | pub struct MdSensorDoor; 6 | impl IconShape for MdSensorDoor { 7 | fn view_box(&self) -> &str { 8 | "0 0 24 24" 9 | } 10 | fn xmlns(&self) -> &str { 11 | "http://www.w3.org/2000/svg" 12 | } 13 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 14 | (user_color, "none", "0") 15 | } 16 | fn stroke_linecap(&self) -> &str { 17 | "butt" 18 | } 19 | fn stroke_linejoin(&self) -> &str { 20 | "miter" 21 | } 22 | fn child_elements(&self) -> Element { 23 | rsx! { 24 | path { 25 | 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", 26 | } 27 | } 28 | } 29 | } 30 | 31 | #[derive(Copy, Clone, Debug, PartialEq)] 32 | pub struct MdSensorWindow; 33 | impl IconShape for MdSensorWindow { 34 | fn view_box(&self) -> &str { 35 | "0 0 24 24" 36 | } 37 | fn xmlns(&self) -> &str { 38 | "http://www.w3.org/2000/svg" 39 | } 40 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 41 | (user_color, "none", "0") 42 | } 43 | fn stroke_linecap(&self) -> &str { 44 | "butt" 45 | } 46 | fn stroke_linejoin(&self) -> &str { 47 | "miter" 48 | } 49 | fn child_elements(&self) -> Element { 50 | rsx! { 51 | path { 52 | 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", 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /packages/lib/src/icons.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "bootstrap")] 2 | pub mod bs_icons; 3 | #[cfg(feature = "font-awesome-brands")] 4 | pub mod fa_brands_icons; 5 | #[cfg(feature = "font-awesome-regular")] 6 | pub mod fa_regular_icons; 7 | #[cfg(feature = "font-awesome-solid")] 8 | pub mod fa_solid_icons; 9 | #[cfg(feature = "feather")] 10 | pub mod fi_icons; 11 | #[cfg(feature = "octicons")] 12 | pub mod go_icons; 13 | #[cfg(feature = "hero-icons-outline")] 14 | pub mod hi_outline_icons; 15 | #[cfg(feature = "hero-icons-solid")] 16 | pub mod hi_solid_icons; 17 | #[cfg(feature = "ionicons")] 18 | pub mod io_icons; 19 | #[cfg(feature = "lucide")] 20 | pub mod ld_icons; 21 | #[cfg(feature = "material-design-icons-action")] 22 | pub mod md_action_icons; 23 | #[cfg(feature = "material-design-icons-alert")] 24 | pub mod md_alert_icons; 25 | #[cfg(feature = "material-design-icons-av")] 26 | pub mod md_av_icons; 27 | #[cfg(feature = "material-design-icons-communication")] 28 | pub mod md_communication_icons; 29 | #[cfg(feature = "material-design-icons-content")] 30 | pub mod md_content_icons; 31 | #[cfg(feature = "material-design-icons-device")] 32 | pub mod md_device_icons; 33 | #[cfg(feature = "material-design-icons-editor")] 34 | pub mod md_editor_icons; 35 | #[cfg(feature = "material-design-icons-file")] 36 | pub mod md_file_icons; 37 | #[cfg(feature = "material-design-icons-hardware")] 38 | pub mod md_hardware_icons; 39 | #[cfg(feature = "material-design-icons-home")] 40 | pub mod md_home_icons; 41 | #[cfg(feature = "material-design-icons-image")] 42 | pub mod md_image_icons; 43 | #[cfg(feature = "material-design-icons-maps")] 44 | pub mod md_maps_icons; 45 | #[cfg(feature = "material-design-icons-navigation")] 46 | pub mod md_navigation_icons; 47 | #[cfg(feature = "material-design-icons-notification")] 48 | pub mod md_notification_icons; 49 | #[cfg(feature = "material-design-icons-places")] 50 | pub mod md_places_icons; 51 | #[cfg(feature = "material-design-icons-social")] 52 | pub mod md_social_icons; 53 | #[cfg(feature = "material-design-icons-toggle")] 54 | pub mod md_toggle_icons; 55 | #[cfg(feature = "codicons")] 56 | pub mod vsc_icons; 57 | -------------------------------------------------------------------------------- /packages/lib/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022-Present Daiki Nishikawa 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | --- 24 | Icons are taken from the Font Awesome projects, 25 | so please check the project license accordingly. 26 | 27 | Bootstrap Icons - https://github.com/twbs/icons 28 | License: MIT License https://github.com/twbs/icons/blob/main/LICENSE.md 29 | 30 | Feather - https://feathericons.com/ 31 | License: MIT https://github.com/feathericons/feather/blob/master/LICENSE 32 | 33 | Font Awesome - https://fontawesome.com/ 34 | License: CC BY 4.0 License https://fontawesome.com/license/free 35 | 36 | Heroicons - https://heroicons.com/ 37 | License: MIT License https://github.com/tailwindlabs/heroicons/blob/master/LICENSE 38 | 39 | Ionicons - https://ionic.io/ionicons/ 40 | License: MIT License https://github.com/ionic-team/ionicons/blob/main/LICENSE 41 | 42 | Material Design icons - https://developers.google.com/fonts/docs/material_icons 43 | License: Apache License 2.0 https://github.com/google/material-design-icons/blob/master/LICENSE 44 | 45 | Octicons - https://primer.style/octicons/ 46 | License: MIT https://github.com/primer/octicons/blob/master/LICENSE 47 | -------------------------------------------------------------------------------- /packages/lib/src/icon_component.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | /// Icon shape trait 4 | pub trait IconShape { 5 | fn view_box(&self) -> &str; 6 | fn xmlns(&self) -> &str; 7 | fn child_elements(&self) -> Element; 8 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 9 | ("none", user_color, "0") 10 | } 11 | fn stroke_linecap(&self) -> &str { 12 | "butt" 13 | } 14 | fn stroke_linejoin(&self) -> &str { 15 | "miter" 16 | } 17 | } 18 | 19 | /// Icon component Props 20 | #[derive(PartialEq, Props, Clone)] 21 | pub struct IconProps { 22 | /// The icon shape to use. 23 | pub icon: T, 24 | /// The height of the `` element. Defaults to 20. Pass None to omit. 25 | #[props(default = Some(20))] 26 | pub height: Option, 27 | /// The width of the `` element. Defaults to 20. Pass None to omit. 28 | #[props(default = Some(20))] 29 | pub width: Option, 30 | /// The color to use for filling the icon. Defaults to "currentColor". 31 | #[props(default = "currentColor".to_string())] 32 | pub fill: String, 33 | /// An class for the `` element. 34 | #[props(default = "".to_string())] 35 | pub class: String, 36 | /// An accessible, short-text description for the icon. 37 | pub title: Option, 38 | /// The style of the `` element. 39 | pub style: Option, 40 | } 41 | 42 | /// Icon component which generates SVG elements 43 | #[allow(non_snake_case)] 44 | pub fn Icon(props: IconProps) -> Element { 45 | let (fill, stroke, stroke_width) = props.icon.fill_and_stroke(&props.fill); 46 | rsx!( 47 | svg { 48 | class: "{props.class}", 49 | style: props.style, 50 | height: props.height.map(|height| height.to_string()), 51 | width: props.width.map(|width| width.to_string()), 52 | view_box: "{props.icon.view_box()}", 53 | xmlns: "{props.icon.xmlns()}", 54 | fill, 55 | stroke, 56 | stroke_width, 57 | stroke_linecap: "{props.icon.stroke_linecap()}", 58 | stroke_linejoin: "{props.icon.stroke_linejoin()}", 59 | if let Some(title_text) = props.title { 60 | title { "{title_text}" } 61 | } 62 | {props.icon.child_elements()} 63 | } 64 | ) 65 | } 66 | -------------------------------------------------------------------------------- /packages/codegen/src/main.rs: -------------------------------------------------------------------------------- 1 | mod create_icon_file; 2 | 3 | fn main() { 4 | const OUTPUT_BASE_PATH: &str = "../lib/src/icons"; 5 | 6 | // create font awesome icons 7 | const FA_SVG_BASE_PATH: &str = "../../icon_resources/font-awesome/svgs"; 8 | for icon_type in vec!["brands", "regular", "solid"].into_iter() { 9 | let svg_path = format!("{}/{}", FA_SVG_BASE_PATH, icon_type); 10 | let output_path = format!("{}/fa_{}_icons.rs", OUTPUT_BASE_PATH, icon_type); 11 | create_icon_file::create_icon_file(&svg_path, &output_path, "Fa"); 12 | } 13 | 14 | // create hero icons 15 | const HI_SVG_BASE_PATH: &str = "../../icon_resources/heroicons/src"; 16 | for icon_type in vec!["outline", "solid"].into_iter() { 17 | let svg_path = format!("{}/{}", HI_SVG_BASE_PATH, icon_type); 18 | let output_path = format!("{}/hi_{}_icons.rs", OUTPUT_BASE_PATH, icon_type); 19 | create_icon_file::create_icon_file(&svg_path, &output_path, "Hi"); 20 | } 21 | 22 | // create ionicons 23 | const IO_SVG_BASE_PATH: &str = "../../icon_resources/ionicons/src/svg"; 24 | let output_path = format!("{}/io_icons.rs", OUTPUT_BASE_PATH); 25 | create_icon_file::create_icon_file(IO_SVG_BASE_PATH, &output_path, "Io"); 26 | 27 | // create octicons 28 | const GO_SVG_BASE_PATH: &str = "../../icon_resources/octicons/icons"; 29 | let go_output_path = format!("{}/go_icons.rs", OUTPUT_BASE_PATH); 30 | create_icon_file::create_icon_file(GO_SVG_BASE_PATH, &go_output_path, "Go"); 31 | 32 | // create bootstrap icons 33 | const BS_SVG_BASE_PATH: &str = "../../icon_resources/bootstrap/icons"; 34 | let bs_output_path = format!("{}/bs_icons.rs", OUTPUT_BASE_PATH); 35 | create_icon_file::create_icon_file(BS_SVG_BASE_PATH, &bs_output_path, "Bs"); 36 | 37 | // create feather icons 38 | const FI_SVG_BASE_PATH: &str = "../../icon_resources/feather/icons"; 39 | let fi_output_path = format!("{}/fi_icons.rs", OUTPUT_BASE_PATH); 40 | create_icon_file::create_icon_file(FI_SVG_BASE_PATH, &fi_output_path, "Fi"); 41 | 42 | // create feather icons 43 | const LD_SVG_BASE_PATH: &str = "../../icon_resources/lucide/icons"; 44 | let ld_output_path = format!("{}/ld_icons.rs", OUTPUT_BASE_PATH); 45 | create_icon_file::create_icon_file(LD_SVG_BASE_PATH, &ld_output_path, "Ld"); 46 | 47 | // create material design icons 48 | const MI_SVG_BASE_PATH: &str = "../../icon_resources/material-design-icons/src"; 49 | for icon_type in vec![ 50 | "action", 51 | "alert", 52 | "av", 53 | "communication", 54 | "content", 55 | "device", 56 | "editor", 57 | "file", 58 | "hardware", 59 | "home", 60 | "image", 61 | "maps", 62 | "navigation", 63 | "notification", 64 | "places", 65 | "social", 66 | "toggle", 67 | ] 68 | .into_iter() 69 | { 70 | let svg_path = format!("{}/{}", MI_SVG_BASE_PATH, icon_type); 71 | let output_path = format!("{}/md_{}_icons.rs", OUTPUT_BASE_PATH, icon_type); 72 | create_icon_file::create_icon_file(&svg_path, &output_path, "Md"); 73 | } 74 | 75 | // create vscode-codicons 76 | const VS_SVG_BASE_PATH: &str = "../../icon_resources/vscode-codicons/src/icons"; 77 | let vs_output_path = format!("{}/vsc_icons.rs", OUTPUT_BASE_PATH); 78 | create_icon_file::create_icon_file(VS_SVG_BASE_PATH, &vs_output_path, "Vsc"); 79 | } 80 | -------------------------------------------------------------------------------- /packages/lib/src/icons/md_alert_icons.rs: -------------------------------------------------------------------------------- 1 | use super::super::IconShape; 2 | use dioxus::prelude::*; 3 | 4 | #[derive(Copy, Clone, Debug, PartialEq)] 5 | pub struct MdAddAlert; 6 | impl IconShape for MdAddAlert { 7 | fn view_box(&self) -> &str { 8 | "0 0 24 24" 9 | } 10 | fn xmlns(&self) -> &str { 11 | "http://www.w3.org/2000/svg" 12 | } 13 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 14 | (user_color, "none", "0") 15 | } 16 | fn stroke_linecap(&self) -> &str { 17 | "butt" 18 | } 19 | fn stroke_linejoin(&self) -> &str { 20 | "miter" 21 | } 22 | fn child_elements(&self) -> Element { 23 | rsx! { 24 | path { 25 | 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", 26 | } 27 | } 28 | } 29 | } 30 | 31 | #[derive(Copy, Clone, Debug, PartialEq)] 32 | pub struct MdAutoDelete; 33 | impl IconShape for MdAutoDelete { 34 | fn view_box(&self) -> &str { 35 | "0 0 24 24" 36 | } 37 | fn xmlns(&self) -> &str { 38 | "http://www.w3.org/2000/svg" 39 | } 40 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 41 | (user_color, "none", "0") 42 | } 43 | fn stroke_linecap(&self) -> &str { 44 | "butt" 45 | } 46 | fn stroke_linejoin(&self) -> &str { 47 | "miter" 48 | } 49 | fn child_elements(&self) -> Element { 50 | rsx! { 51 | polygon { 52 | points: "15,2 11.5,2 10.5,1 5.5,1 4.5,2 1,2 1,4 15,4", 53 | } 54 | path { 55 | 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", 56 | } 57 | polygon { 58 | points: "16.5,12 15,12 15,17 18.6,19.1 19.4,17.9 16.5,16.2", 59 | } 60 | } 61 | } 62 | } 63 | 64 | #[derive(Copy, Clone, Debug, PartialEq)] 65 | pub struct MdError; 66 | impl IconShape for MdError { 67 | fn view_box(&self) -> &str { 68 | "0 0 24 24" 69 | } 70 | fn xmlns(&self) -> &str { 71 | "http://www.w3.org/2000/svg" 72 | } 73 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 74 | (user_color, "none", "0") 75 | } 76 | fn stroke_linecap(&self) -> &str { 77 | "butt" 78 | } 79 | fn stroke_linejoin(&self) -> &str { 80 | "miter" 81 | } 82 | fn child_elements(&self) -> Element { 83 | rsx! { 84 | path { 85 | 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", 86 | } 87 | } 88 | } 89 | } 90 | 91 | #[derive(Copy, Clone, Debug, PartialEq)] 92 | pub struct MdErrorOutline; 93 | impl IconShape for MdErrorOutline { 94 | fn view_box(&self) -> &str { 95 | "0 0 24 24" 96 | } 97 | fn xmlns(&self) -> &str { 98 | "http://www.w3.org/2000/svg" 99 | } 100 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 101 | (user_color, "none", "0") 102 | } 103 | fn stroke_linecap(&self) -> &str { 104 | "butt" 105 | } 106 | fn stroke_linejoin(&self) -> &str { 107 | "miter" 108 | } 109 | fn child_elements(&self) -> Element { 110 | rsx! { 111 | path { 112 | 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", 113 | } 114 | } 115 | } 116 | } 117 | 118 | #[derive(Copy, Clone, Debug, PartialEq)] 119 | pub struct MdNotificationImportant; 120 | impl IconShape for MdNotificationImportant { 121 | fn view_box(&self) -> &str { 122 | "0 0 24 24" 123 | } 124 | fn xmlns(&self) -> &str { 125 | "http://www.w3.org/2000/svg" 126 | } 127 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 128 | (user_color, "none", "0") 129 | } 130 | fn stroke_linecap(&self) -> &str { 131 | "butt" 132 | } 133 | fn stroke_linejoin(&self) -> &str { 134 | "miter" 135 | } 136 | fn child_elements(&self) -> Element { 137 | rsx! { 138 | path { 139 | 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", 140 | } 141 | } 142 | } 143 | } 144 | 145 | #[derive(Copy, Clone, Debug, PartialEq)] 146 | pub struct MdWarning; 147 | impl IconShape for MdWarning { 148 | fn view_box(&self) -> &str { 149 | "0 0 24 24" 150 | } 151 | fn xmlns(&self) -> &str { 152 | "http://www.w3.org/2000/svg" 153 | } 154 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 155 | (user_color, "none", "0") 156 | } 157 | fn stroke_linecap(&self) -> &str { 158 | "butt" 159 | } 160 | fn stroke_linejoin(&self) -> &str { 161 | "miter" 162 | } 163 | fn child_elements(&self) -> Element { 164 | rsx! { 165 | path { 166 | d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z", 167 | } 168 | } 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Discord Server](https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square)](https://discord.gg/sKJSVNSCDJ) 2 | [![Crates.io](https://img.shields.io/crates/v/dioxus-free-icons)](https://crates.io/crates/dioxus-free-icons) 3 | 4 | # dioxus-free-icons 🙂 5 | 6 | Use free svg icons in your [Dioxus](https://dioxuslabs.com/) projects easily with dioxus-free-icons. 7 | 8 | More information about this crate can be found in the [crate documentation](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/). 9 | 10 | ## Install 11 | 12 | To use `dioxus-free-icons`, add this to your Cargo.toml: 13 | 14 | ```toml 15 | [dependencies] 16 | dioxus-free-icons = { version = "0.9", features = ["font-awesome-brands"] } 17 | ``` 18 | 19 | ### Support features 20 | 21 | The following features are available. Please see [react-icons site](https://react-icons.github.io/react-icons) to check the icon name and icon design. 22 | 23 | - [bootstrap](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/bs_icons/index.html) 24 | - [codicons](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/vs_icons/index.html) 25 | - [font-awesome-brands](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/fa_brands_icons/index.html) 26 | - [font-awesome-regular](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/fa_regular_icons/index.html) 27 | - [font-awesome-solid](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/fa_solid_icons/index.html) 28 | - [feather](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/fi_icons/index.html) 29 | - [octicons](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/go_icons/index.html) 30 | - [hero-icons-outline](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/hi_outline_icons/index.html) 31 | - [hero-icons-solid](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/hi_solid_icons/index.html) 32 | - [ionicons](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/io_icons/index.html) 33 | - [lucide](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/ld_icons/index.html) 34 | - [material-design-icons-action](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_action_icons/index.html) 35 | - [material-design-icons-alert](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_alert_icons/index.html) 36 | - [material-design-icons-av](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_av_icons/index.html) 37 | - [material-design-icons-communication](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_communication_icons/index.html) 38 | - [material-design-icons-content](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_content_icons/index.html) 39 | - [material-design-icons-device](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/io_icons/index.html) 40 | - [material-design-icons-editor](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_editor_icons/index.html) 41 | - [material-design-icons-file](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_file_icons/index.html) 42 | - [material-design-icons-hardware](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_hardware_icons/index.html) 43 | - [material-design-icons-home](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_home_icons/index.html) 44 | - [material-design-icons-image](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_image_icons/index.html) 45 | - [material-design-icons-maps](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_maps_icons/index.html) 46 | - [material-design-icons-navigation](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_navigation_icons/index.html) 47 | - [material-design-icons-notification](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_notification_icons/index.html) 48 | - [material-design-icons-places](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_places_icons/index.html) 49 | - [material-design-icons-social](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_social_icons/index.html) 50 | - [material-design-icons-toggle](https://docs.rs/dioxus-free-icons/latest/dioxus_free_icons/icons/md_toggle_icons/index.html) 51 | 52 | ## Example 53 | 54 | This library provides Icon component, which will generate SVG for a Font Awesome icon. 55 | 56 | ```rust 57 | use dioxus::prelude::*; 58 | use dioxus_free_icons::icons::fa_brands_icons::FaRust; 59 | use dioxus_free_icons::Icon; 60 | 61 | fn RustIcon() -> Element { 62 | rsx!( 63 | Icon { 64 | width: 30, 65 | height: 30, 66 | fill: "black", 67 | icon: FaRust, 68 | } 69 | ) 70 | } 71 | ``` 72 | 73 | ## License 74 | 75 | This project is licensed under the MIT license. 76 | 77 | ### Icon 78 | 79 | Icon Library|License|Version 80 | ---|---|--- 81 | [Bootstrap Icons](https://icons.getbootstrap.com/)|[MIT License](https://github.com/twbs/icons/blob/main/LICENSE.md)| [1.8.3](https://github.com/twbs/icons/tree/v1.8.3) 82 | [Codicons](https://microsoft.github.io/vscode-codicons/dist/codicon.html)|[MIT License](https://github.com/microsoft/vscode-codicons/blob/main/LICENSE-CODE) & [CC BY 4.0 License](https://github.com/microsoft/vscode-codicons/blob/main/LICENSE) | [0.0.36](https://github.com/microsoft/vscode-codicons/tree/0.0.36) 83 | [Feather](https://feathericons.com/)|[MIT License](https://github.com/feathericons/feather/blob/master/LICENSE)| [4.29.0](https://github.com/feathericons/feather/tree/v4.29.0) 84 | [Font Awesome](https://fontawesome.com/)|[CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/)| [6.1.1](https://github.com/FortAwesome/Font-Awesome/tree/6.1.1) 85 | [Heroicons](https://heroicons.com/)|[MIT License](https://github.com/tailwindlabs/heroicons/blob/master/LICENSE)| [1.0.6](https://github.com/tailwindlabs/heroicons/tree/v1.0.6) 86 | [Ionicons](https://ionic.io/ionicons)|[MIT License](https://github.com/ionic-team/ionicons/blob/main/LICENSE)| [6.0.2](https://github.com/ionic-team/ionicons/tree/v6.0.2) 87 | [Lucide](https://lucide.dev)|[ISC License](https://github.com/lucide-icons/lucide/blob/main/LICENSE)| [0.555.0](https://github.com/lucide-icons/lucide/tree/v0.555.0) 88 | [Material Design icons](https://developers.google.com/fonts/docs/material_icons)|[Apache License 2.0](https://github.com/google/material-design-icons/blob/master/LICENSE)| [4.0.0](https://github.com/google/material-design-icons/tree/4.0.0) 89 | [Octicons](https://primer.style/octicons/)|[MIT License](https://github.com/primer/octicons/blob/main/LICENSE)| [17.3.0](https://github.com/primer/octicons/tree/v17.3.0) 90 | 91 | ## Contribution 92 | 93 | The project welcomes all contributions from anyone willing to work in good faith with other contributors and the community. 94 | In particular, contributions regarding support for other free icons such as Material Design icons or Ionicons are welcome. 95 | This library aims to be a react-icons-like library for dioxus projects. 96 | 97 | ### Development 98 | 99 | ```sh 100 | // generate icon files 101 | cd packages/codegen 102 | cargo run 103 | ``` 104 | 105 | ### Preview 106 | 107 | ```sh 108 | cd packages/exmaple 109 | cargo install dioxus-cli 110 | dx serve 111 | ``` 112 | 113 | ### Update icons 114 | 115 | 1. checkout a new tag in the icon resource submodule 116 | 2. create new icon files 117 | 3. Update README.md and check the LICENSE 118 | -------------------------------------------------------------------------------- /packages/codegen/src/create_icon_file.rs: -------------------------------------------------------------------------------- 1 | use std::fs; 2 | use std::fs::File; 3 | use std::io::Write; 4 | use std::path::PathBuf; 5 | use std::{ffi::OsStr, path::Path}; 6 | 7 | use heck::ToSnakeCase; 8 | use heck::ToUpperCamelCase; 9 | use regex::Regex; 10 | use scraper::node::Element; 11 | use scraper::ElementRef; 12 | use scraper::Html; 13 | use walkdir::WalkDir; 14 | 15 | const ICON_TEMPLATE: &str = r#"#[derive(Copy, Clone, Debug, PartialEq)] 16 | pub struct {ICON_NAME}; 17 | impl IconShape for {ICON_NAME} { 18 | fn view_box(&self) -> &str { 19 | "{VIEW_BOX}" 20 | } 21 | fn xmlns(&self) -> &str { 22 | "{XMLNS}" 23 | } 24 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 25 | ({FILL_COLOR}, {STROKE_COLOR}, {STROKE_WIDTH}) 26 | } 27 | fn stroke_linecap(&self) -> &str { 28 | "{STROKE_LINECAP}" 29 | } 30 | fn stroke_linejoin(&self) -> &str { 31 | "{STROKE_LINEJOIN}" 32 | } 33 | fn child_elements(&self) -> Element { 34 | rsx! { 35 | {CHILD_ELEMENTS} 36 | } 37 | } 38 | } 39 | "#; 40 | 41 | pub fn create_icon_file(svg_path: &str, output_path: &str, icon_prefix: &str) { 42 | let files = collect_svg_files(svg_path, icon_prefix); 43 | 44 | let icon_file = files 45 | .into_iter() 46 | .map(|file| { 47 | let svg_str = fs::read_to_string(&file).unwrap(); 48 | let fragment = Html::parse_fragment(&svg_str); 49 | 50 | let elements = fragment 51 | .tree 52 | .nodes() 53 | .filter_map(|node| { 54 | if node.value().is_element() { 55 | let element = ElementRef::wrap(node).unwrap().value(); 56 | if !element.attrs.is_empty() { 57 | return Some(element); 58 | } 59 | } 60 | None 61 | }) 62 | .collect::>(); 63 | 64 | let svg_element = &elements[0]; 65 | let svg_child_elements = &elements[1..]; 66 | let icon_name = icon_name(&file, icon_prefix); 67 | let (view_box, xmlns) = extract_svg_attrs(svg_element); 68 | let child_elements = extract_svg_child_elements(svg_child_elements, icon_prefix); 69 | let (fill_color, stroke_color, stroke_width) = extract_svg_colors(icon_prefix); 70 | let stroke_linecap = extract_stroke_linecap(icon_prefix); 71 | let stroke_linejoin = extract_stroke_linejoin(icon_prefix); 72 | 73 | ICON_TEMPLATE 74 | .replace("{ICON_NAME}", &format!("{}{}", icon_prefix, &icon_name)) 75 | .replace("{VIEW_BOX}", &view_box) 76 | .replace("{XMLNS}", &xmlns) 77 | .replace("{CHILD_ELEMENTS}", &child_elements) 78 | .replace("{FILL_COLOR}", &fill_color) 79 | .replace("{STROKE_COLOR}", &stroke_color) 80 | .replace("{STROKE_WIDTH}", &stroke_width) 81 | .replace("{STROKE_LINECAP}", &stroke_linecap) 82 | .replace("{STROKE_LINEJOIN}", &stroke_linejoin) 83 | }) 84 | .collect::>() 85 | .join("\n"); 86 | 87 | // write to file 88 | let mut file = File::create(output_path).unwrap(); 89 | file.write_all( 90 | format!( 91 | "{}\n\n{}", 92 | "use super::super::IconShape;\nuse dioxus::prelude::*;", icon_file 93 | ) 94 | .as_bytes(), 95 | ) 96 | .unwrap(); 97 | file.flush().unwrap(); 98 | } 99 | 100 | fn collect_svg_files(svg_path: &str, icon_prefix: &str) -> Vec { 101 | let dir_entries = WalkDir::new(svg_path) 102 | .sort_by_file_name() 103 | .into_iter() 104 | .filter_map(|e| e.ok()) 105 | .collect::>(); 106 | 107 | dir_entries 108 | .into_iter() 109 | .filter(|e| match icon_prefix { 110 | "Go" => { 111 | let re = Regex::new(r".*-16.svg$").unwrap(); 112 | return re.is_match(e.path().to_str().unwrap()); 113 | } 114 | "Md" => { 115 | let split_vec = e.path().components().collect::>(); 116 | return split_vec.iter().any(|c| c.as_os_str() == "materialicons") 117 | && e.file_name().to_str().unwrap() == "24px.svg"; 118 | } 119 | _ => return e.path().extension() == Some(OsStr::new("svg")), 120 | }) 121 | .map(|dir| PathBuf::from(dir.path())) 122 | .collect::>() 123 | } 124 | 125 | fn icon_name(path: &Path, icon_prefix: &str) -> String { 126 | match icon_prefix { 127 | "Go" => { 128 | let filename = path.file_name().unwrap().to_str().unwrap(); 129 | let name = filename.split('.').next().unwrap(); 130 | name.replace("-16", "").to_upper_camel_case() 131 | } 132 | "Md" => { 133 | let split_vec = path.components().collect::>(); 134 | let name = split_vec[split_vec.len() - 3]; 135 | name.as_os_str().to_str().unwrap().to_upper_camel_case() 136 | } 137 | _ => { 138 | let filename = path.file_name().unwrap().to_str().unwrap(); 139 | let name = filename.split('.').next().unwrap(); 140 | name.to_upper_camel_case() 141 | } 142 | } 143 | } 144 | 145 | fn extract_svg_attrs(element: &Element) -> (String, String) { 146 | let view_box = element.attr("viewBox").unwrap_or("0 0 16 16"); 147 | let xmlns = element 148 | .attr("xmlns") 149 | .unwrap_or("http://www.w3.org/2000/svg"); 150 | (String::from(view_box), String::from(xmlns)) 151 | } 152 | 153 | fn extract_svg_colors(icon_prefix: &str) -> (&str, &str, &str) { 154 | match icon_prefix { 155 | "Fi" => ("\"none\"", "user_color", "\"2\""), 156 | "Ld" => ("\"none\"", "user_color", "\"2\""), 157 | "Io" => ("user_color", "user_color", "\"0\""), 158 | _ => ("user_color", "\"none\"", "\"0\""), 159 | } 160 | } 161 | 162 | fn extract_stroke_linecap(icon_prefix: &str) -> &str { 163 | match icon_prefix { 164 | "Ld" => "round", 165 | "Fi" => "round", 166 | _ => "butt", 167 | } 168 | } 169 | 170 | fn extract_stroke_linejoin(icon_prefix: &str) -> &str { 171 | match icon_prefix { 172 | "Ld" => "round", 173 | "Fi" => "round", 174 | _ => "miter", 175 | } 176 | } 177 | 178 | fn extract_svg_child_elements(elements: &[&Element], icon_prefix: &str) -> String { 179 | let elements = match icon_prefix { 180 | "Md" => &elements[1..], 181 | _ => elements, 182 | }; 183 | elements 184 | .iter() 185 | .map(|element| { 186 | let tag_name = element.name(); 187 | let mut element_attrs = element 188 | .attrs() 189 | .filter_map(|(name, value)| { 190 | let value = if icon_prefix == "Io" { 191 | value.replace("fill:none;stroke:#000;", "") 192 | } else { 193 | value.to_string() 194 | }; 195 | let re = Regex::new(r"^data-.*$").unwrap(); 196 | if !re.is_match(name) && name != "fill" { 197 | Some(format!( 198 | " {}: \"{}\",", 199 | name.to_snake_case(), 200 | value 201 | )) 202 | } else { 203 | None 204 | } 205 | }) 206 | .collect::>(); 207 | element_attrs.sort(); 208 | let attrs_str = element_attrs.join("\n"); 209 | " {TAG_NAME} {\n{ATTRS}\n }" 210 | .replace("{TAG_NAME}", tag_name) 211 | .replace("{ATTRS}", &attrs_str) 212 | }) 213 | .collect::>() 214 | .join("\n") 215 | } 216 | -------------------------------------------------------------------------------- /packages/lib/src/icons/md_toggle_icons.rs: -------------------------------------------------------------------------------- 1 | use super::super::IconShape; 2 | use dioxus::prelude::*; 3 | 4 | #[derive(Copy, Clone, Debug, PartialEq)] 5 | pub struct MdCheckBox; 6 | impl IconShape for MdCheckBox { 7 | fn view_box(&self) -> &str { 8 | "0 0 24 24" 9 | } 10 | fn xmlns(&self) -> &str { 11 | "http://www.w3.org/2000/svg" 12 | } 13 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 14 | (user_color, "none", "0") 15 | } 16 | fn stroke_linecap(&self) -> &str { 17 | "butt" 18 | } 19 | fn stroke_linejoin(&self) -> &str { 20 | "miter" 21 | } 22 | fn child_elements(&self) -> Element { 23 | rsx! { 24 | path { 25 | 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", 26 | } 27 | } 28 | } 29 | } 30 | 31 | #[derive(Copy, Clone, Debug, PartialEq)] 32 | pub struct MdCheckBoxOutlineBlank; 33 | impl IconShape for MdCheckBoxOutlineBlank { 34 | fn view_box(&self) -> &str { 35 | "0 0 24 24" 36 | } 37 | fn xmlns(&self) -> &str { 38 | "http://www.w3.org/2000/svg" 39 | } 40 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 41 | (user_color, "none", "0") 42 | } 43 | fn stroke_linecap(&self) -> &str { 44 | "butt" 45 | } 46 | fn stroke_linejoin(&self) -> &str { 47 | "miter" 48 | } 49 | fn child_elements(&self) -> Element { 50 | rsx! { 51 | path { 52 | 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", 53 | } 54 | } 55 | } 56 | } 57 | 58 | #[derive(Copy, Clone, Debug, PartialEq)] 59 | pub struct MdIndeterminateCheckBox; 60 | impl IconShape for MdIndeterminateCheckBox { 61 | fn view_box(&self) -> &str { 62 | "0 0 24 24" 63 | } 64 | fn xmlns(&self) -> &str { 65 | "http://www.w3.org/2000/svg" 66 | } 67 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 68 | (user_color, "none", "0") 69 | } 70 | fn stroke_linecap(&self) -> &str { 71 | "butt" 72 | } 73 | fn stroke_linejoin(&self) -> &str { 74 | "miter" 75 | } 76 | fn child_elements(&self) -> Element { 77 | rsx! { 78 | path { 79 | 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", 80 | } 81 | } 82 | } 83 | } 84 | 85 | #[derive(Copy, Clone, Debug, PartialEq)] 86 | pub struct MdRadioButtonChecked; 87 | impl IconShape for MdRadioButtonChecked { 88 | fn view_box(&self) -> &str { 89 | "0 0 24 24" 90 | } 91 | fn xmlns(&self) -> &str { 92 | "http://www.w3.org/2000/svg" 93 | } 94 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 95 | (user_color, "none", "0") 96 | } 97 | fn stroke_linecap(&self) -> &str { 98 | "butt" 99 | } 100 | fn stroke_linejoin(&self) -> &str { 101 | "miter" 102 | } 103 | fn child_elements(&self) -> Element { 104 | rsx! { 105 | path { 106 | 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", 107 | } 108 | } 109 | } 110 | } 111 | 112 | #[derive(Copy, Clone, Debug, PartialEq)] 113 | pub struct MdRadioButtonUnchecked; 114 | impl IconShape for MdRadioButtonUnchecked { 115 | fn view_box(&self) -> &str { 116 | "0 0 24 24" 117 | } 118 | fn xmlns(&self) -> &str { 119 | "http://www.w3.org/2000/svg" 120 | } 121 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 122 | (user_color, "none", "0") 123 | } 124 | fn stroke_linecap(&self) -> &str { 125 | "butt" 126 | } 127 | fn stroke_linejoin(&self) -> &str { 128 | "miter" 129 | } 130 | fn child_elements(&self) -> Element { 131 | rsx! { 132 | path { 133 | 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", 134 | } 135 | } 136 | } 137 | } 138 | 139 | #[derive(Copy, Clone, Debug, PartialEq)] 140 | pub struct MdStar; 141 | impl IconShape for MdStar { 142 | fn view_box(&self) -> &str { 143 | "0 0 24 24" 144 | } 145 | fn xmlns(&self) -> &str { 146 | "http://www.w3.org/2000/svg" 147 | } 148 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 149 | (user_color, "none", "0") 150 | } 151 | fn stroke_linecap(&self) -> &str { 152 | "butt" 153 | } 154 | fn stroke_linejoin(&self) -> &str { 155 | "miter" 156 | } 157 | fn child_elements(&self) -> Element { 158 | rsx! { 159 | path { 160 | d: "M0 0h24v24H0z", 161 | } 162 | path { 163 | 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", 164 | } 165 | } 166 | } 167 | } 168 | 169 | #[derive(Copy, Clone, Debug, PartialEq)] 170 | pub struct MdStarBorder; 171 | impl IconShape for MdStarBorder { 172 | fn view_box(&self) -> &str { 173 | "0 0 24 24" 174 | } 175 | fn xmlns(&self) -> &str { 176 | "http://www.w3.org/2000/svg" 177 | } 178 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 179 | (user_color, "none", "0") 180 | } 181 | fn stroke_linecap(&self) -> &str { 182 | "butt" 183 | } 184 | fn stroke_linejoin(&self) -> &str { 185 | "miter" 186 | } 187 | fn child_elements(&self) -> Element { 188 | rsx! { 189 | path { 190 | 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", 191 | } 192 | } 193 | } 194 | } 195 | 196 | #[derive(Copy, Clone, Debug, PartialEq)] 197 | pub struct MdStarHalf; 198 | impl IconShape for MdStarHalf { 199 | fn view_box(&self) -> &str { 200 | "0 0 24 24" 201 | } 202 | fn xmlns(&self) -> &str { 203 | "http://www.w3.org/2000/svg" 204 | } 205 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 206 | (user_color, "none", "0") 207 | } 208 | fn stroke_linecap(&self) -> &str { 209 | "butt" 210 | } 211 | fn stroke_linejoin(&self) -> &str { 212 | "miter" 213 | } 214 | fn child_elements(&self) -> Element { 215 | rsx! { 216 | path { 217 | 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", 218 | } 219 | } 220 | } 221 | } 222 | 223 | #[derive(Copy, Clone, Debug, PartialEq)] 224 | pub struct MdStarOutline; 225 | impl IconShape for MdStarOutline { 226 | fn view_box(&self) -> &str { 227 | "0 0 24 24" 228 | } 229 | fn xmlns(&self) -> &str { 230 | "http://www.w3.org/2000/svg" 231 | } 232 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 233 | (user_color, "none", "0") 234 | } 235 | fn stroke_linecap(&self) -> &str { 236 | "butt" 237 | } 238 | fn stroke_linejoin(&self) -> &str { 239 | "miter" 240 | } 241 | fn child_elements(&self) -> Element { 242 | rsx! {} 243 | } 244 | } 245 | 246 | #[derive(Copy, Clone, Debug, PartialEq)] 247 | pub struct MdToggleOff; 248 | impl IconShape for MdToggleOff { 249 | fn view_box(&self) -> &str { 250 | "0 0 24 24" 251 | } 252 | fn xmlns(&self) -> &str { 253 | "http://www.w3.org/2000/svg" 254 | } 255 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 256 | (user_color, "none", "0") 257 | } 258 | fn stroke_linecap(&self) -> &str { 259 | "butt" 260 | } 261 | fn stroke_linejoin(&self) -> &str { 262 | "miter" 263 | } 264 | fn child_elements(&self) -> Element { 265 | rsx! { 266 | path { 267 | 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", 268 | } 269 | } 270 | } 271 | } 272 | 273 | #[derive(Copy, Clone, Debug, PartialEq)] 274 | pub struct MdToggleOn; 275 | impl IconShape for MdToggleOn { 276 | fn view_box(&self) -> &str { 277 | "0 0 24 24" 278 | } 279 | fn xmlns(&self) -> &str { 280 | "http://www.w3.org/2000/svg" 281 | } 282 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 283 | (user_color, "none", "0") 284 | } 285 | fn stroke_linecap(&self) -> &str { 286 | "butt" 287 | } 288 | fn stroke_linejoin(&self) -> &str { 289 | "miter" 290 | } 291 | fn child_elements(&self) -> Element { 292 | rsx! { 293 | path { 294 | 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", 295 | } 296 | } 297 | } 298 | } 299 | -------------------------------------------------------------------------------- /packages/lib/src/icons/md_file_icons.rs: -------------------------------------------------------------------------------- 1 | use super::super::IconShape; 2 | use dioxus::prelude::*; 3 | 4 | #[derive(Copy, Clone, Debug, PartialEq)] 5 | pub struct MdApproval; 6 | impl IconShape for MdApproval { 7 | fn view_box(&self) -> &str { 8 | "0 0 24 24" 9 | } 10 | fn xmlns(&self) -> &str { 11 | "http://www.w3.org/2000/svg" 12 | } 13 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 14 | (user_color, "none", "0") 15 | } 16 | fn stroke_linecap(&self) -> &str { 17 | "butt" 18 | } 19 | fn stroke_linejoin(&self) -> &str { 20 | "miter" 21 | } 22 | fn child_elements(&self) -> Element { 23 | rsx! { 24 | path { 25 | 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", 26 | } 27 | } 28 | } 29 | } 30 | 31 | #[derive(Copy, Clone, Debug, PartialEq)] 32 | pub struct MdAttachEmail; 33 | impl IconShape for MdAttachEmail { 34 | fn view_box(&self) -> &str { 35 | "0 0 24 24" 36 | } 37 | fn xmlns(&self) -> &str { 38 | "http://www.w3.org/2000/svg" 39 | } 40 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 41 | (user_color, "none", "0") 42 | } 43 | fn stroke_linecap(&self) -> &str { 44 | "butt" 45 | } 46 | fn stroke_linejoin(&self) -> &str { 47 | "miter" 48 | } 49 | fn child_elements(&self) -> Element { 50 | rsx! { 51 | path { 52 | 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", 53 | } 54 | path { 55 | 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", 56 | } 57 | } 58 | } 59 | } 60 | 61 | #[derive(Copy, Clone, Debug, PartialEq)] 62 | pub struct MdAttachment; 63 | impl IconShape for MdAttachment { 64 | fn view_box(&self) -> &str { 65 | "0 0 24 24" 66 | } 67 | fn xmlns(&self) -> &str { 68 | "http://www.w3.org/2000/svg" 69 | } 70 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 71 | (user_color, "none", "0") 72 | } 73 | fn stroke_linecap(&self) -> &str { 74 | "butt" 75 | } 76 | fn stroke_linejoin(&self) -> &str { 77 | "miter" 78 | } 79 | fn child_elements(&self) -> Element { 80 | rsx! { 81 | path { 82 | 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", 83 | } 84 | } 85 | } 86 | } 87 | 88 | #[derive(Copy, Clone, Debug, PartialEq)] 89 | pub struct MdCloud; 90 | impl IconShape for MdCloud { 91 | fn view_box(&self) -> &str { 92 | "0 0 24 24" 93 | } 94 | fn xmlns(&self) -> &str { 95 | "http://www.w3.org/2000/svg" 96 | } 97 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 98 | (user_color, "none", "0") 99 | } 100 | fn stroke_linecap(&self) -> &str { 101 | "butt" 102 | } 103 | fn stroke_linejoin(&self) -> &str { 104 | "miter" 105 | } 106 | fn child_elements(&self) -> Element { 107 | rsx! { 108 | path { 109 | 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", 110 | } 111 | } 112 | } 113 | } 114 | 115 | #[derive(Copy, Clone, Debug, PartialEq)] 116 | pub struct MdCloudCircle; 117 | impl IconShape for MdCloudCircle { 118 | fn view_box(&self) -> &str { 119 | "0 0 24 24" 120 | } 121 | fn xmlns(&self) -> &str { 122 | "http://www.w3.org/2000/svg" 123 | } 124 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 125 | (user_color, "none", "0") 126 | } 127 | fn stroke_linecap(&self) -> &str { 128 | "butt" 129 | } 130 | fn stroke_linejoin(&self) -> &str { 131 | "miter" 132 | } 133 | fn child_elements(&self) -> Element { 134 | rsx! { 135 | path { 136 | 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", 137 | } 138 | } 139 | } 140 | } 141 | 142 | #[derive(Copy, Clone, Debug, PartialEq)] 143 | pub struct MdCloudDone; 144 | impl IconShape for MdCloudDone { 145 | fn view_box(&self) -> &str { 146 | "0 0 24 24" 147 | } 148 | fn xmlns(&self) -> &str { 149 | "http://www.w3.org/2000/svg" 150 | } 151 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 152 | (user_color, "none", "0") 153 | } 154 | fn stroke_linecap(&self) -> &str { 155 | "butt" 156 | } 157 | fn stroke_linejoin(&self) -> &str { 158 | "miter" 159 | } 160 | fn child_elements(&self) -> Element { 161 | rsx! { 162 | path { 163 | 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", 164 | } 165 | } 166 | } 167 | } 168 | 169 | #[derive(Copy, Clone, Debug, PartialEq)] 170 | pub struct MdCloudDownload; 171 | impl IconShape for MdCloudDownload { 172 | fn view_box(&self) -> &str { 173 | "0 0 24 24" 174 | } 175 | fn xmlns(&self) -> &str { 176 | "http://www.w3.org/2000/svg" 177 | } 178 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 179 | (user_color, "none", "0") 180 | } 181 | fn stroke_linecap(&self) -> &str { 182 | "butt" 183 | } 184 | fn stroke_linejoin(&self) -> &str { 185 | "miter" 186 | } 187 | fn child_elements(&self) -> Element { 188 | rsx! { 189 | path { 190 | 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", 191 | } 192 | } 193 | } 194 | } 195 | 196 | #[derive(Copy, Clone, Debug, PartialEq)] 197 | pub struct MdCloudOff; 198 | impl IconShape for MdCloudOff { 199 | fn view_box(&self) -> &str { 200 | "0 0 24 24" 201 | } 202 | fn xmlns(&self) -> &str { 203 | "http://www.w3.org/2000/svg" 204 | } 205 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 206 | (user_color, "none", "0") 207 | } 208 | fn stroke_linecap(&self) -> &str { 209 | "butt" 210 | } 211 | fn stroke_linejoin(&self) -> &str { 212 | "miter" 213 | } 214 | fn child_elements(&self) -> Element { 215 | rsx! { 216 | path { 217 | 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", 218 | } 219 | } 220 | } 221 | } 222 | 223 | #[derive(Copy, Clone, Debug, PartialEq)] 224 | pub struct MdCloudQueue; 225 | impl IconShape for MdCloudQueue { 226 | fn view_box(&self) -> &str { 227 | "0 0 24 24" 228 | } 229 | fn xmlns(&self) -> &str { 230 | "http://www.w3.org/2000/svg" 231 | } 232 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 233 | (user_color, "none", "0") 234 | } 235 | fn stroke_linecap(&self) -> &str { 236 | "butt" 237 | } 238 | fn stroke_linejoin(&self) -> &str { 239 | "miter" 240 | } 241 | fn child_elements(&self) -> Element { 242 | rsx! { 243 | path { 244 | 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", 245 | } 246 | } 247 | } 248 | } 249 | 250 | #[derive(Copy, Clone, Debug, PartialEq)] 251 | pub struct MdCloudUpload; 252 | impl IconShape for MdCloudUpload { 253 | fn view_box(&self) -> &str { 254 | "0 0 24 24" 255 | } 256 | fn xmlns(&self) -> &str { 257 | "http://www.w3.org/2000/svg" 258 | } 259 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 260 | (user_color, "none", "0") 261 | } 262 | fn stroke_linecap(&self) -> &str { 263 | "butt" 264 | } 265 | fn stroke_linejoin(&self) -> &str { 266 | "miter" 267 | } 268 | fn child_elements(&self) -> Element { 269 | rsx! { 270 | path { 271 | 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", 272 | } 273 | } 274 | } 275 | } 276 | 277 | #[derive(Copy, Clone, Debug, PartialEq)] 278 | pub struct MdCreateNewFolder; 279 | impl IconShape for MdCreateNewFolder { 280 | fn view_box(&self) -> &str { 281 | "0 0 24 24" 282 | } 283 | fn xmlns(&self) -> &str { 284 | "http://www.w3.org/2000/svg" 285 | } 286 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 287 | (user_color, "none", "0") 288 | } 289 | fn stroke_linecap(&self) -> &str { 290 | "butt" 291 | } 292 | fn stroke_linejoin(&self) -> &str { 293 | "miter" 294 | } 295 | fn child_elements(&self) -> Element { 296 | rsx! { 297 | path { 298 | 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", 299 | } 300 | } 301 | } 302 | } 303 | 304 | #[derive(Copy, Clone, Debug, PartialEq)] 305 | pub struct MdDriveFileMove; 306 | impl IconShape for MdDriveFileMove { 307 | fn view_box(&self) -> &str { 308 | "0 0 24 24" 309 | } 310 | fn xmlns(&self) -> &str { 311 | "http://www.w3.org/2000/svg" 312 | } 313 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 314 | (user_color, "none", "0") 315 | } 316 | fn stroke_linecap(&self) -> &str { 317 | "butt" 318 | } 319 | fn stroke_linejoin(&self) -> &str { 320 | "miter" 321 | } 322 | fn child_elements(&self) -> Element { 323 | rsx! { 324 | path { 325 | 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", 326 | } 327 | } 328 | } 329 | } 330 | 331 | #[derive(Copy, Clone, Debug, PartialEq)] 332 | pub struct MdDriveFileMoveOutline; 333 | impl IconShape for MdDriveFileMoveOutline { 334 | fn view_box(&self) -> &str { 335 | "0 0 24 24" 336 | } 337 | fn xmlns(&self) -> &str { 338 | "http://www.w3.org/2000/svg" 339 | } 340 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 341 | (user_color, "none", "0") 342 | } 343 | fn stroke_linecap(&self) -> &str { 344 | "butt" 345 | } 346 | fn stroke_linejoin(&self) -> &str { 347 | "miter" 348 | } 349 | fn child_elements(&self) -> Element { 350 | rsx! { 351 | path { 352 | 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", 353 | } 354 | } 355 | } 356 | } 357 | 358 | #[derive(Copy, Clone, Debug, PartialEq)] 359 | pub struct MdDriveFileRenameOutline; 360 | impl IconShape for MdDriveFileRenameOutline { 361 | fn view_box(&self) -> &str { 362 | "0 0 24 24" 363 | } 364 | fn xmlns(&self) -> &str { 365 | "http://www.w3.org/2000/svg" 366 | } 367 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 368 | (user_color, "none", "0") 369 | } 370 | fn stroke_linecap(&self) -> &str { 371 | "butt" 372 | } 373 | fn stroke_linejoin(&self) -> &str { 374 | "miter" 375 | } 376 | fn child_elements(&self) -> Element { 377 | rsx! { 378 | path { 379 | 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", 380 | } 381 | } 382 | } 383 | } 384 | 385 | #[derive(Copy, Clone, Debug, PartialEq)] 386 | pub struct MdDriveFolderUpload; 387 | impl IconShape for MdDriveFolderUpload { 388 | fn view_box(&self) -> &str { 389 | "0 0 24 24" 390 | } 391 | fn xmlns(&self) -> &str { 392 | "http://www.w3.org/2000/svg" 393 | } 394 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 395 | (user_color, "none", "0") 396 | } 397 | fn stroke_linecap(&self) -> &str { 398 | "butt" 399 | } 400 | fn stroke_linejoin(&self) -> &str { 401 | "miter" 402 | } 403 | fn child_elements(&self) -> Element { 404 | rsx! { 405 | path { 406 | 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", 407 | } 408 | } 409 | } 410 | } 411 | 412 | #[derive(Copy, Clone, Debug, PartialEq)] 413 | pub struct MdFileDownload; 414 | impl IconShape for MdFileDownload { 415 | fn view_box(&self) -> &str { 416 | "0 0 24 24" 417 | } 418 | fn xmlns(&self) -> &str { 419 | "http://www.w3.org/2000/svg" 420 | } 421 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 422 | (user_color, "none", "0") 423 | } 424 | fn stroke_linecap(&self) -> &str { 425 | "butt" 426 | } 427 | fn stroke_linejoin(&self) -> &str { 428 | "miter" 429 | } 430 | fn child_elements(&self) -> Element { 431 | rsx! { 432 | path { 433 | d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z", 434 | } 435 | } 436 | } 437 | } 438 | 439 | #[derive(Copy, Clone, Debug, PartialEq)] 440 | pub struct MdFileDownloadDone; 441 | impl IconShape for MdFileDownloadDone { 442 | fn view_box(&self) -> &str { 443 | "0 0 24 24" 444 | } 445 | fn xmlns(&self) -> &str { 446 | "http://www.w3.org/2000/svg" 447 | } 448 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 449 | (user_color, "none", "0") 450 | } 451 | fn stroke_linecap(&self) -> &str { 452 | "butt" 453 | } 454 | fn stroke_linejoin(&self) -> &str { 455 | "miter" 456 | } 457 | fn child_elements(&self) -> Element { 458 | rsx! { 459 | path { 460 | d: "M5 18h14v2H5v-2zm4.6-2.7L5 10.7l2-1.9 2.6 2.6L17 4l2 2-9.4 9.3z", 461 | } 462 | } 463 | } 464 | } 465 | 466 | #[derive(Copy, Clone, Debug, PartialEq)] 467 | pub struct MdFileUpload; 468 | impl IconShape for MdFileUpload { 469 | fn view_box(&self) -> &str { 470 | "0 0 24 24" 471 | } 472 | fn xmlns(&self) -> &str { 473 | "http://www.w3.org/2000/svg" 474 | } 475 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 476 | (user_color, "none", "0") 477 | } 478 | fn stroke_linecap(&self) -> &str { 479 | "butt" 480 | } 481 | fn stroke_linejoin(&self) -> &str { 482 | "miter" 483 | } 484 | fn child_elements(&self) -> Element { 485 | rsx! { 486 | path { 487 | d: "M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z", 488 | } 489 | } 490 | } 491 | } 492 | 493 | #[derive(Copy, Clone, Debug, PartialEq)] 494 | pub struct MdFolder; 495 | impl IconShape for MdFolder { 496 | fn view_box(&self) -> &str { 497 | "0 0 24 24" 498 | } 499 | fn xmlns(&self) -> &str { 500 | "http://www.w3.org/2000/svg" 501 | } 502 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 503 | (user_color, "none", "0") 504 | } 505 | fn stroke_linecap(&self) -> &str { 506 | "butt" 507 | } 508 | fn stroke_linejoin(&self) -> &str { 509 | "miter" 510 | } 511 | fn child_elements(&self) -> Element { 512 | rsx! { 513 | path { 514 | 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", 515 | } 516 | } 517 | } 518 | } 519 | 520 | #[derive(Copy, Clone, Debug, PartialEq)] 521 | pub struct MdFolderOpen; 522 | impl IconShape for MdFolderOpen { 523 | fn view_box(&self) -> &str { 524 | "0 0 24 24" 525 | } 526 | fn xmlns(&self) -> &str { 527 | "http://www.w3.org/2000/svg" 528 | } 529 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 530 | (user_color, "none", "0") 531 | } 532 | fn stroke_linecap(&self) -> &str { 533 | "butt" 534 | } 535 | fn stroke_linejoin(&self) -> &str { 536 | "miter" 537 | } 538 | fn child_elements(&self) -> Element { 539 | rsx! { 540 | path { 541 | 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", 542 | } 543 | } 544 | } 545 | } 546 | 547 | #[derive(Copy, Clone, Debug, PartialEq)] 548 | pub struct MdFolderShared; 549 | impl IconShape for MdFolderShared { 550 | fn view_box(&self) -> &str { 551 | "0 0 24 24" 552 | } 553 | fn xmlns(&self) -> &str { 554 | "http://www.w3.org/2000/svg" 555 | } 556 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 557 | (user_color, "none", "0") 558 | } 559 | fn stroke_linecap(&self) -> &str { 560 | "butt" 561 | } 562 | fn stroke_linejoin(&self) -> &str { 563 | "miter" 564 | } 565 | fn child_elements(&self) -> Element { 566 | rsx! { 567 | path { 568 | 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", 569 | } 570 | } 571 | } 572 | } 573 | 574 | #[derive(Copy, Clone, Debug, PartialEq)] 575 | pub struct MdGridView; 576 | impl IconShape for MdGridView { 577 | fn view_box(&self) -> &str { 578 | "0 0 24 24" 579 | } 580 | fn xmlns(&self) -> &str { 581 | "http://www.w3.org/2000/svg" 582 | } 583 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 584 | (user_color, "none", "0") 585 | } 586 | fn stroke_linecap(&self) -> &str { 587 | "butt" 588 | } 589 | fn stroke_linejoin(&self) -> &str { 590 | "miter" 591 | } 592 | fn child_elements(&self) -> Element { 593 | rsx! { 594 | path { 595 | d: "M0 0h24v24H0z", 596 | } 597 | path { 598 | d: "M3 3v8h8V3H3zm6 6H5V5h4v4zm-6 4v8h8v-8H3zm6 6H5v-4h4v4zm4-16v8h8V3h-8zm6 6h-4V5h4v4zm-6 4v8h8v-8h-8zm6 6h-4v-4h4v4z", 599 | } 600 | } 601 | } 602 | } 603 | 604 | #[derive(Copy, Clone, Debug, PartialEq)] 605 | pub struct MdRequestQuote; 606 | impl IconShape for MdRequestQuote { 607 | fn view_box(&self) -> &str { 608 | "0 0 24 24" 609 | } 610 | fn xmlns(&self) -> &str { 611 | "http://www.w3.org/2000/svg" 612 | } 613 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 614 | (user_color, "none", "0") 615 | } 616 | fn stroke_linecap(&self) -> &str { 617 | "butt" 618 | } 619 | fn stroke_linejoin(&self) -> &str { 620 | "miter" 621 | } 622 | fn child_elements(&self) -> Element { 623 | rsx! { 624 | path { 625 | 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", 626 | } 627 | } 628 | } 629 | } 630 | 631 | #[derive(Copy, Clone, Debug, PartialEq)] 632 | pub struct MdRuleFolder; 633 | impl IconShape for MdRuleFolder { 634 | fn view_box(&self) -> &str { 635 | "0 0 24 24" 636 | } 637 | fn xmlns(&self) -> &str { 638 | "http://www.w3.org/2000/svg" 639 | } 640 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 641 | (user_color, "none", "0") 642 | } 643 | fn stroke_linecap(&self) -> &str { 644 | "butt" 645 | } 646 | fn stroke_linejoin(&self) -> &str { 647 | "miter" 648 | } 649 | fn child_elements(&self) -> Element { 650 | rsx! { 651 | path { 652 | 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", 653 | } 654 | } 655 | } 656 | } 657 | 658 | #[derive(Copy, Clone, Debug, PartialEq)] 659 | pub struct MdSnippetFolder; 660 | impl IconShape for MdSnippetFolder { 661 | fn view_box(&self) -> &str { 662 | "0 0 24 24" 663 | } 664 | fn xmlns(&self) -> &str { 665 | "http://www.w3.org/2000/svg" 666 | } 667 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 668 | (user_color, "none", "0") 669 | } 670 | fn stroke_linecap(&self) -> &str { 671 | "butt" 672 | } 673 | fn stroke_linejoin(&self) -> &str { 674 | "miter" 675 | } 676 | fn child_elements(&self) -> Element { 677 | rsx! { 678 | path { 679 | 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", 680 | } 681 | } 682 | } 683 | } 684 | 685 | #[derive(Copy, Clone, Debug, PartialEq)] 686 | pub struct MdTextSnippet; 687 | impl IconShape for MdTextSnippet { 688 | fn view_box(&self) -> &str { 689 | "0 0 24 24" 690 | } 691 | fn xmlns(&self) -> &str { 692 | "http://www.w3.org/2000/svg" 693 | } 694 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 695 | (user_color, "none", "0") 696 | } 697 | fn stroke_linecap(&self) -> &str { 698 | "butt" 699 | } 700 | fn stroke_linejoin(&self) -> &str { 701 | "miter" 702 | } 703 | fn child_elements(&self) -> Element { 704 | rsx! { 705 | path { 706 | 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", 707 | } 708 | } 709 | } 710 | } 711 | 712 | #[derive(Copy, Clone, Debug, PartialEq)] 713 | pub struct MdTopic; 714 | impl IconShape for MdTopic { 715 | fn view_box(&self) -> &str { 716 | "0 0 24 24" 717 | } 718 | fn xmlns(&self) -> &str { 719 | "http://www.w3.org/2000/svg" 720 | } 721 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 722 | (user_color, "none", "0") 723 | } 724 | fn stroke_linecap(&self) -> &str { 725 | "butt" 726 | } 727 | fn stroke_linejoin(&self) -> &str { 728 | "miter" 729 | } 730 | fn child_elements(&self) -> Element { 731 | rsx! { 732 | path { 733 | 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", 734 | } 735 | } 736 | } 737 | } 738 | 739 | #[derive(Copy, Clone, Debug, PartialEq)] 740 | pub struct MdUploadFile; 741 | impl IconShape for MdUploadFile { 742 | fn view_box(&self) -> &str { 743 | "0 0 24 24" 744 | } 745 | fn xmlns(&self) -> &str { 746 | "http://www.w3.org/2000/svg" 747 | } 748 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 749 | (user_color, "none", "0") 750 | } 751 | fn stroke_linecap(&self) -> &str { 752 | "butt" 753 | } 754 | fn stroke_linejoin(&self) -> &str { 755 | "miter" 756 | } 757 | fn child_elements(&self) -> Element { 758 | rsx! { 759 | path { 760 | 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", 761 | } 762 | } 763 | } 764 | } 765 | 766 | #[derive(Copy, Clone, Debug, PartialEq)] 767 | pub struct MdWorkspacesFilled; 768 | impl IconShape for MdWorkspacesFilled { 769 | fn view_box(&self) -> &str { 770 | "0 0 24 24" 771 | } 772 | fn xmlns(&self) -> &str { 773 | "http://www.w3.org/2000/svg" 774 | } 775 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 776 | (user_color, "none", "0") 777 | } 778 | fn stroke_linecap(&self) -> &str { 779 | "butt" 780 | } 781 | fn stroke_linejoin(&self) -> &str { 782 | "miter" 783 | } 784 | fn child_elements(&self) -> Element { 785 | rsx! { 786 | path { 787 | 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", 788 | } 789 | } 790 | } 791 | } 792 | 793 | #[derive(Copy, Clone, Debug, PartialEq)] 794 | pub struct MdWorkspacesOutline; 795 | impl IconShape for MdWorkspacesOutline { 796 | fn view_box(&self) -> &str { 797 | "0 0 24 24" 798 | } 799 | fn xmlns(&self) -> &str { 800 | "http://www.w3.org/2000/svg" 801 | } 802 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 803 | (user_color, "none", "0") 804 | } 805 | fn stroke_linecap(&self) -> &str { 806 | "butt" 807 | } 808 | fn stroke_linejoin(&self) -> &str { 809 | "miter" 810 | } 811 | fn child_elements(&self) -> Element { 812 | rsx! { 813 | path { 814 | 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", 815 | } 816 | } 817 | } 818 | } 819 | -------------------------------------------------------------------------------- /packages/lib/src/icons/md_navigation_icons.rs: -------------------------------------------------------------------------------- 1 | use super::super::IconShape; 2 | use dioxus::prelude::*; 3 | 4 | #[derive(Copy, Clone, Debug, PartialEq)] 5 | pub struct MdAppSettingsAlt; 6 | impl IconShape for MdAppSettingsAlt { 7 | fn view_box(&self) -> &str { 8 | "0 0 24 24" 9 | } 10 | fn xmlns(&self) -> &str { 11 | "http://www.w3.org/2000/svg" 12 | } 13 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 14 | (user_color, "none", "0") 15 | } 16 | fn stroke_linecap(&self) -> &str { 17 | "butt" 18 | } 19 | fn stroke_linejoin(&self) -> &str { 20 | "miter" 21 | } 22 | fn child_elements(&self) -> Element { 23 | rsx! { 24 | path { 25 | d: "M21.81 12.74l-.82-.63v-.22l.8-.63c.16-.12.2-.34.1-.51l-.85-1.48c-.07-.13-.21-.2-.35-.2-.05 0-.1.01-.15.03l-.95.38c-.08-.05-.11-.07-.19-.11l-.15-1.01c-.03-.21-.2-.36-.4-.36h-1.71c-.2 0-.37.15-.4.34l-.14 1.01c-.03.02-.07.03-.1.05l-.09.06-.95-.38c-.05-.02-.1-.03-.15-.03-.14 0-.27.07-.35.2l-.85 1.48c-.1.17-.06.39.1.51l.8.63v.23l-.8.63c-.16.12-.2.34-.1.51l.85 1.48c.07.13.21.2.35.2.05 0 .1-.01.15-.03l.95-.37c.08.05.12.07.2.11l.15 1.01c.03.2.2.34.4.34h1.71c.2 0 .37-.15.4-.34l.15-1.01c.03-.02.07-.03.1-.05l.09-.06.95.38c.05.02.1.03.15.03.14 0 .27-.07.35-.2l.85-1.48c.1-.17.06-.39-.1-.51zM18 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM17 17h2v4c0 1.1-.9 2-2 2H7c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2v4h-2V6H7v12h10v-1z", 26 | } 27 | } 28 | } 29 | } 30 | 31 | #[derive(Copy, Clone, Debug, PartialEq)] 32 | pub struct MdApps; 33 | impl IconShape for MdApps { 34 | fn view_box(&self) -> &str { 35 | "0 0 24 24" 36 | } 37 | fn xmlns(&self) -> &str { 38 | "http://www.w3.org/2000/svg" 39 | } 40 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 41 | (user_color, "none", "0") 42 | } 43 | fn stroke_linecap(&self) -> &str { 44 | "butt" 45 | } 46 | fn stroke_linejoin(&self) -> &str { 47 | "miter" 48 | } 49 | fn child_elements(&self) -> Element { 50 | rsx! { 51 | path { 52 | d: "M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z", 53 | } 54 | } 55 | } 56 | } 57 | 58 | #[derive(Copy, Clone, Debug, PartialEq)] 59 | pub struct MdArrowBack; 60 | impl IconShape for MdArrowBack { 61 | fn view_box(&self) -> &str { 62 | "0 0 24 24" 63 | } 64 | fn xmlns(&self) -> &str { 65 | "http://www.w3.org/2000/svg" 66 | } 67 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 68 | (user_color, "none", "0") 69 | } 70 | fn stroke_linecap(&self) -> &str { 71 | "butt" 72 | } 73 | fn stroke_linejoin(&self) -> &str { 74 | "miter" 75 | } 76 | fn child_elements(&self) -> Element { 77 | rsx! { 78 | path { 79 | d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z", 80 | } 81 | } 82 | } 83 | } 84 | 85 | #[derive(Copy, Clone, Debug, PartialEq)] 86 | pub struct MdArrowBackIos; 87 | impl IconShape for MdArrowBackIos { 88 | fn view_box(&self) -> &str { 89 | "0 0 24 24" 90 | } 91 | fn xmlns(&self) -> &str { 92 | "http://www.w3.org/2000/svg" 93 | } 94 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 95 | (user_color, "none", "0") 96 | } 97 | fn stroke_linecap(&self) -> &str { 98 | "butt" 99 | } 100 | fn stroke_linejoin(&self) -> &str { 101 | "miter" 102 | } 103 | fn child_elements(&self) -> Element { 104 | rsx! { 105 | path { 106 | d: "M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z", 107 | } 108 | } 109 | } 110 | } 111 | 112 | #[derive(Copy, Clone, Debug, PartialEq)] 113 | pub struct MdArrowDownward; 114 | impl IconShape for MdArrowDownward { 115 | fn view_box(&self) -> &str { 116 | "0 0 24 24" 117 | } 118 | fn xmlns(&self) -> &str { 119 | "http://www.w3.org/2000/svg" 120 | } 121 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 122 | (user_color, "none", "0") 123 | } 124 | fn stroke_linecap(&self) -> &str { 125 | "butt" 126 | } 127 | fn stroke_linejoin(&self) -> &str { 128 | "miter" 129 | } 130 | fn child_elements(&self) -> Element { 131 | rsx! { 132 | path { 133 | d: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z", 134 | } 135 | } 136 | } 137 | } 138 | 139 | #[derive(Copy, Clone, Debug, PartialEq)] 140 | pub struct MdArrowDropDown; 141 | impl IconShape for MdArrowDropDown { 142 | fn view_box(&self) -> &str { 143 | "0 0 24 24" 144 | } 145 | fn xmlns(&self) -> &str { 146 | "http://www.w3.org/2000/svg" 147 | } 148 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 149 | (user_color, "none", "0") 150 | } 151 | fn stroke_linecap(&self) -> &str { 152 | "butt" 153 | } 154 | fn stroke_linejoin(&self) -> &str { 155 | "miter" 156 | } 157 | fn child_elements(&self) -> Element { 158 | rsx! { 159 | path { 160 | d: "M7 10l5 5 5-5z", 161 | } 162 | } 163 | } 164 | } 165 | 166 | #[derive(Copy, Clone, Debug, PartialEq)] 167 | pub struct MdArrowDropDownCircle; 168 | impl IconShape for MdArrowDropDownCircle { 169 | fn view_box(&self) -> &str { 170 | "0 0 24 24" 171 | } 172 | fn xmlns(&self) -> &str { 173 | "http://www.w3.org/2000/svg" 174 | } 175 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 176 | (user_color, "none", "0") 177 | } 178 | fn stroke_linecap(&self) -> &str { 179 | "butt" 180 | } 181 | fn stroke_linejoin(&self) -> &str { 182 | "miter" 183 | } 184 | fn child_elements(&self) -> Element { 185 | rsx! { 186 | path { 187 | d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z", 188 | } 189 | } 190 | } 191 | } 192 | 193 | #[derive(Copy, Clone, Debug, PartialEq)] 194 | pub struct MdArrowDropUp; 195 | impl IconShape for MdArrowDropUp { 196 | fn view_box(&self) -> &str { 197 | "0 0 24 24" 198 | } 199 | fn xmlns(&self) -> &str { 200 | "http://www.w3.org/2000/svg" 201 | } 202 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 203 | (user_color, "none", "0") 204 | } 205 | fn stroke_linecap(&self) -> &str { 206 | "butt" 207 | } 208 | fn stroke_linejoin(&self) -> &str { 209 | "miter" 210 | } 211 | fn child_elements(&self) -> Element { 212 | rsx! { 213 | path { 214 | d: "M7 14l5-5 5 5z", 215 | } 216 | } 217 | } 218 | } 219 | 220 | #[derive(Copy, Clone, Debug, PartialEq)] 221 | pub struct MdArrowForward; 222 | impl IconShape for MdArrowForward { 223 | fn view_box(&self) -> &str { 224 | "0 0 24 24" 225 | } 226 | fn xmlns(&self) -> &str { 227 | "http://www.w3.org/2000/svg" 228 | } 229 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 230 | (user_color, "none", "0") 231 | } 232 | fn stroke_linecap(&self) -> &str { 233 | "butt" 234 | } 235 | fn stroke_linejoin(&self) -> &str { 236 | "miter" 237 | } 238 | fn child_elements(&self) -> Element { 239 | rsx! { 240 | path { 241 | d: "M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z", 242 | } 243 | } 244 | } 245 | } 246 | 247 | #[derive(Copy, Clone, Debug, PartialEq)] 248 | pub struct MdArrowForwardIos; 249 | impl IconShape for MdArrowForwardIos { 250 | fn view_box(&self) -> &str { 251 | "0 0 24 24" 252 | } 253 | fn xmlns(&self) -> &str { 254 | "http://www.w3.org/2000/svg" 255 | } 256 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 257 | (user_color, "none", "0") 258 | } 259 | fn stroke_linecap(&self) -> &str { 260 | "butt" 261 | } 262 | fn stroke_linejoin(&self) -> &str { 263 | "miter" 264 | } 265 | fn child_elements(&self) -> Element { 266 | rsx! { 267 | path { 268 | d: "M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z", 269 | } 270 | } 271 | } 272 | } 273 | 274 | #[derive(Copy, Clone, Debug, PartialEq)] 275 | pub struct MdArrowLeft; 276 | impl IconShape for MdArrowLeft { 277 | fn view_box(&self) -> &str { 278 | "0 0 24 24" 279 | } 280 | fn xmlns(&self) -> &str { 281 | "http://www.w3.org/2000/svg" 282 | } 283 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 284 | (user_color, "none", "0") 285 | } 286 | fn stroke_linecap(&self) -> &str { 287 | "butt" 288 | } 289 | fn stroke_linejoin(&self) -> &str { 290 | "miter" 291 | } 292 | fn child_elements(&self) -> Element { 293 | rsx! { 294 | path { 295 | d: "M24 0v24H0V0h24z", 296 | } 297 | } 298 | } 299 | } 300 | 301 | #[derive(Copy, Clone, Debug, PartialEq)] 302 | pub struct MdArrowRight; 303 | impl IconShape for MdArrowRight { 304 | fn view_box(&self) -> &str { 305 | "0 0 24 24" 306 | } 307 | fn xmlns(&self) -> &str { 308 | "http://www.w3.org/2000/svg" 309 | } 310 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 311 | (user_color, "none", "0") 312 | } 313 | fn stroke_linecap(&self) -> &str { 314 | "butt" 315 | } 316 | fn stroke_linejoin(&self) -> &str { 317 | "miter" 318 | } 319 | fn child_elements(&self) -> Element { 320 | rsx! { 321 | path { 322 | d: "M0 24V0h24v24H0z", 323 | } 324 | } 325 | } 326 | } 327 | 328 | #[derive(Copy, Clone, Debug, PartialEq)] 329 | pub struct MdArrowUpward; 330 | impl IconShape for MdArrowUpward { 331 | fn view_box(&self) -> &str { 332 | "0 0 24 24" 333 | } 334 | fn xmlns(&self) -> &str { 335 | "http://www.w3.org/2000/svg" 336 | } 337 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 338 | (user_color, "none", "0") 339 | } 340 | fn stroke_linecap(&self) -> &str { 341 | "butt" 342 | } 343 | fn stroke_linejoin(&self) -> &str { 344 | "miter" 345 | } 346 | fn child_elements(&self) -> Element { 347 | rsx! { 348 | path { 349 | d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z", 350 | } 351 | } 352 | } 353 | } 354 | 355 | #[derive(Copy, Clone, Debug, PartialEq)] 356 | pub struct MdAssistantDirection; 357 | impl IconShape for MdAssistantDirection { 358 | fn view_box(&self) -> &str { 359 | "0 0 24 24" 360 | } 361 | fn xmlns(&self) -> &str { 362 | "http://www.w3.org/2000/svg" 363 | } 364 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 365 | (user_color, "none", "0") 366 | } 367 | fn stroke_linecap(&self) -> &str { 368 | "butt" 369 | } 370 | fn stroke_linejoin(&self) -> &str { 371 | "miter" 372 | } 373 | fn child_elements(&self) -> Element { 374 | rsx! { 375 | path { 376 | d: "M14 10H9c-.6 0-1 .4-1 1v4h2v-3h4v2.5l3.5-3.5L14 7.5V10zm-2-9C5.9 1 1 5.9 1 12s4.9 11 11 11 11-4.9 11-11S18.1 1 12 1zm7.73 11.58l-7.19 7.22c-.35.27-.79.27-1.15 0L4.2 12.58c-.27-.36-.27-.8 0-1.16l7.19-7.22c.35-.27.79-.27 1.15 0l7.19 7.22c.36.27.36.8 0 1.16z", 377 | } 378 | } 379 | } 380 | } 381 | 382 | #[derive(Copy, Clone, Debug, PartialEq)] 383 | pub struct MdAssistantNavigation; 384 | impl IconShape for MdAssistantNavigation { 385 | fn view_box(&self) -> &str { 386 | "0 0 24 24" 387 | } 388 | fn xmlns(&self) -> &str { 389 | "http://www.w3.org/2000/svg" 390 | } 391 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 392 | (user_color, "none", "0") 393 | } 394 | fn stroke_linecap(&self) -> &str { 395 | "butt" 396 | } 397 | fn stroke_linejoin(&self) -> &str { 398 | "miter" 399 | } 400 | fn child_elements(&self) -> Element { 401 | rsx! { 402 | path { 403 | d: "M12 1C5.93 1 1 5.93 1 12s4.93 11 11 11 11-4.93 11-11S18.07 1 12 1zm3.57 16L12 15.42 8.43 17l-.37-.37L12 7l3.95 9.63-.38.37z", 404 | } 405 | } 406 | } 407 | } 408 | 409 | #[derive(Copy, Clone, Debug, PartialEq)] 410 | pub struct MdCampaign; 411 | impl IconShape for MdCampaign { 412 | fn view_box(&self) -> &str { 413 | "0 0 24 24" 414 | } 415 | fn xmlns(&self) -> &str { 416 | "http://www.w3.org/2000/svg" 417 | } 418 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 419 | (user_color, "none", "0") 420 | } 421 | fn stroke_linecap(&self) -> &str { 422 | "butt" 423 | } 424 | fn stroke_linejoin(&self) -> &str { 425 | "miter" 426 | } 427 | fn child_elements(&self) -> Element { 428 | rsx! { 429 | path { 430 | d: "M18 11v2h4v-2h-4zm-2 6.61c.96.71 2.21 1.65 3.2 2.39.4-.53.8-1.07 1.2-1.6-.99-.74-2.24-1.68-3.2-2.4-.4.54-.8 1.08-1.2 1.61zM20.4 5.6c-.4-.53-.8-1.07-1.2-1.6-.99.74-2.24 1.68-3.2 2.4.4.53.8 1.07 1.2 1.6.96-.72 2.21-1.65 3.2-2.4zM4 9c-1.1 0-2 .9-2 2v2c0 1.1.9 2 2 2h1v4h2v-4h1l5 3V6L8 9H4zm11.5 3c0-1.33-.58-2.53-1.5-3.35v6.69c.92-.81 1.5-2.01 1.5-3.34z", 431 | } 432 | } 433 | } 434 | } 435 | 436 | #[derive(Copy, Clone, Debug, PartialEq)] 437 | pub struct MdCancel; 438 | impl IconShape for MdCancel { 439 | fn view_box(&self) -> &str { 440 | "0 0 24 24" 441 | } 442 | fn xmlns(&self) -> &str { 443 | "http://www.w3.org/2000/svg" 444 | } 445 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 446 | (user_color, "none", "0") 447 | } 448 | fn stroke_linecap(&self) -> &str { 449 | "butt" 450 | } 451 | fn stroke_linejoin(&self) -> &str { 452 | "miter" 453 | } 454 | fn child_elements(&self) -> Element { 455 | rsx! { 456 | path { 457 | d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z", 458 | } 459 | } 460 | } 461 | } 462 | 463 | #[derive(Copy, Clone, Debug, PartialEq)] 464 | pub struct MdCheck; 465 | impl IconShape for MdCheck { 466 | fn view_box(&self) -> &str { 467 | "0 0 24 24" 468 | } 469 | fn xmlns(&self) -> &str { 470 | "http://www.w3.org/2000/svg" 471 | } 472 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 473 | (user_color, "none", "0") 474 | } 475 | fn stroke_linecap(&self) -> &str { 476 | "butt" 477 | } 478 | fn stroke_linejoin(&self) -> &str { 479 | "miter" 480 | } 481 | fn child_elements(&self) -> Element { 482 | rsx! { 483 | path { 484 | d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z", 485 | } 486 | } 487 | } 488 | } 489 | 490 | #[derive(Copy, Clone, Debug, PartialEq)] 491 | pub struct MdChevronLeft; 492 | impl IconShape for MdChevronLeft { 493 | fn view_box(&self) -> &str { 494 | "0 0 24 24" 495 | } 496 | fn xmlns(&self) -> &str { 497 | "http://www.w3.org/2000/svg" 498 | } 499 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 500 | (user_color, "none", "0") 501 | } 502 | fn stroke_linecap(&self) -> &str { 503 | "butt" 504 | } 505 | fn stroke_linejoin(&self) -> &str { 506 | "miter" 507 | } 508 | fn child_elements(&self) -> Element { 509 | rsx! { 510 | path { 511 | d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z", 512 | } 513 | } 514 | } 515 | } 516 | 517 | #[derive(Copy, Clone, Debug, PartialEq)] 518 | pub struct MdChevronRight; 519 | impl IconShape for MdChevronRight { 520 | fn view_box(&self) -> &str { 521 | "0 0 24 24" 522 | } 523 | fn xmlns(&self) -> &str { 524 | "http://www.w3.org/2000/svg" 525 | } 526 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 527 | (user_color, "none", "0") 528 | } 529 | fn stroke_linecap(&self) -> &str { 530 | "butt" 531 | } 532 | fn stroke_linejoin(&self) -> &str { 533 | "miter" 534 | } 535 | fn child_elements(&self) -> Element { 536 | rsx! { 537 | path { 538 | d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z", 539 | } 540 | } 541 | } 542 | } 543 | 544 | #[derive(Copy, Clone, Debug, PartialEq)] 545 | pub struct MdClose; 546 | impl IconShape for MdClose { 547 | fn view_box(&self) -> &str { 548 | "0 0 24 24" 549 | } 550 | fn xmlns(&self) -> &str { 551 | "http://www.w3.org/2000/svg" 552 | } 553 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 554 | (user_color, "none", "0") 555 | } 556 | fn stroke_linecap(&self) -> &str { 557 | "butt" 558 | } 559 | fn stroke_linejoin(&self) -> &str { 560 | "miter" 561 | } 562 | fn child_elements(&self) -> Element { 563 | rsx! { 564 | path { 565 | d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z", 566 | } 567 | } 568 | } 569 | } 570 | 571 | #[derive(Copy, Clone, Debug, PartialEq)] 572 | pub struct MdDoubleArrow; 573 | impl IconShape for MdDoubleArrow { 574 | fn view_box(&self) -> &str { 575 | "0 0 24 24" 576 | } 577 | fn xmlns(&self) -> &str { 578 | "http://www.w3.org/2000/svg" 579 | } 580 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 581 | (user_color, "none", "0") 582 | } 583 | fn stroke_linecap(&self) -> &str { 584 | "butt" 585 | } 586 | fn stroke_linejoin(&self) -> &str { 587 | "miter" 588 | } 589 | fn child_elements(&self) -> Element { 590 | rsx! { 591 | polygon { 592 | points: "15.5,5 11,5 16,12 11,19 15.5,19 20.5,12", 593 | } 594 | polygon { 595 | points: "8.5,5 4,5 9,12 4,19 8.5,19 13.5,12", 596 | } 597 | } 598 | } 599 | } 600 | 601 | #[derive(Copy, Clone, Debug, PartialEq)] 602 | pub struct MdEast; 603 | impl IconShape for MdEast { 604 | fn view_box(&self) -> &str { 605 | "0 0 24 24" 606 | } 607 | fn xmlns(&self) -> &str { 608 | "http://www.w3.org/2000/svg" 609 | } 610 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 611 | (user_color, "none", "0") 612 | } 613 | fn stroke_linecap(&self) -> &str { 614 | "butt" 615 | } 616 | fn stroke_linejoin(&self) -> &str { 617 | "miter" 618 | } 619 | fn child_elements(&self) -> Element { 620 | rsx! { 621 | path { 622 | d: "M15,5l-1.41,1.41L18.17,11H2V13h16.17l-4.59,4.59L15,19l7-7L15,5z", 623 | } 624 | } 625 | } 626 | } 627 | 628 | #[derive(Copy, Clone, Debug, PartialEq)] 629 | pub struct MdExpandLess; 630 | impl IconShape for MdExpandLess { 631 | fn view_box(&self) -> &str { 632 | "0 0 24 24" 633 | } 634 | fn xmlns(&self) -> &str { 635 | "http://www.w3.org/2000/svg" 636 | } 637 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 638 | (user_color, "none", "0") 639 | } 640 | fn stroke_linecap(&self) -> &str { 641 | "butt" 642 | } 643 | fn stroke_linejoin(&self) -> &str { 644 | "miter" 645 | } 646 | fn child_elements(&self) -> Element { 647 | rsx! { 648 | path { 649 | d: "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z", 650 | } 651 | } 652 | } 653 | } 654 | 655 | #[derive(Copy, Clone, Debug, PartialEq)] 656 | pub struct MdExpandMore; 657 | impl IconShape for MdExpandMore { 658 | fn view_box(&self) -> &str { 659 | "0 0 24 24" 660 | } 661 | fn xmlns(&self) -> &str { 662 | "http://www.w3.org/2000/svg" 663 | } 664 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 665 | (user_color, "none", "0") 666 | } 667 | fn stroke_linecap(&self) -> &str { 668 | "butt" 669 | } 670 | fn stroke_linejoin(&self) -> &str { 671 | "miter" 672 | } 673 | fn child_elements(&self) -> Element { 674 | rsx! { 675 | path { 676 | d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z", 677 | } 678 | } 679 | } 680 | } 681 | 682 | #[derive(Copy, Clone, Debug, PartialEq)] 683 | pub struct MdFirstPage; 684 | impl IconShape for MdFirstPage { 685 | fn view_box(&self) -> &str { 686 | "0 0 24 24" 687 | } 688 | fn xmlns(&self) -> &str { 689 | "http://www.w3.org/2000/svg" 690 | } 691 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 692 | (user_color, "none", "0") 693 | } 694 | fn stroke_linecap(&self) -> &str { 695 | "butt" 696 | } 697 | fn stroke_linejoin(&self) -> &str { 698 | "miter" 699 | } 700 | fn child_elements(&self) -> Element { 701 | rsx! { 702 | path { 703 | d: "M24 24H0V0h24v24z", 704 | } 705 | } 706 | } 707 | } 708 | 709 | #[derive(Copy, Clone, Debug, PartialEq)] 710 | pub struct MdFullscreen; 711 | impl IconShape for MdFullscreen { 712 | fn view_box(&self) -> &str { 713 | "0 0 24 24" 714 | } 715 | fn xmlns(&self) -> &str { 716 | "http://www.w3.org/2000/svg" 717 | } 718 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 719 | (user_color, "none", "0") 720 | } 721 | fn stroke_linecap(&self) -> &str { 722 | "butt" 723 | } 724 | fn stroke_linejoin(&self) -> &str { 725 | "miter" 726 | } 727 | fn child_elements(&self) -> Element { 728 | rsx! { 729 | path { 730 | d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z", 731 | } 732 | } 733 | } 734 | } 735 | 736 | #[derive(Copy, Clone, Debug, PartialEq)] 737 | pub struct MdFullscreenExit; 738 | impl IconShape for MdFullscreenExit { 739 | fn view_box(&self) -> &str { 740 | "0 0 24 24" 741 | } 742 | fn xmlns(&self) -> &str { 743 | "http://www.w3.org/2000/svg" 744 | } 745 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 746 | (user_color, "none", "0") 747 | } 748 | fn stroke_linecap(&self) -> &str { 749 | "butt" 750 | } 751 | fn stroke_linejoin(&self) -> &str { 752 | "miter" 753 | } 754 | fn child_elements(&self) -> Element { 755 | rsx! { 756 | path { 757 | d: "M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z", 758 | } 759 | } 760 | } 761 | } 762 | 763 | #[derive(Copy, Clone, Debug, PartialEq)] 764 | pub struct MdHomeWork; 765 | impl IconShape for MdHomeWork { 766 | fn view_box(&self) -> &str { 767 | "0 0 24 24" 768 | } 769 | fn xmlns(&self) -> &str { 770 | "http://www.w3.org/2000/svg" 771 | } 772 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 773 | (user_color, "none", "0") 774 | } 775 | fn stroke_linecap(&self) -> &str { 776 | "butt" 777 | } 778 | fn stroke_linejoin(&self) -> &str { 779 | "miter" 780 | } 781 | fn child_elements(&self) -> Element { 782 | rsx! { 783 | path { 784 | d: "M8.17 5.7L1 10.48V21h5v-8h4v8h5V10.25z", 785 | } 786 | path { 787 | d: "M17 7h2v2h-2z", 788 | } 789 | path { 790 | d: "M10 3v1.51l2 1.33L13.73 7H15v.85l2 1.34V11h2v2h-2v2h2v2h-2v4h6V3H10zm9 6h-2V7h2v2z", 791 | } 792 | } 793 | } 794 | } 795 | 796 | #[derive(Copy, Clone, Debug, PartialEq)] 797 | pub struct MdLastPage; 798 | impl IconShape for MdLastPage { 799 | fn view_box(&self) -> &str { 800 | "0 0 24 24" 801 | } 802 | fn xmlns(&self) -> &str { 803 | "http://www.w3.org/2000/svg" 804 | } 805 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 806 | (user_color, "none", "0") 807 | } 808 | fn stroke_linecap(&self) -> &str { 809 | "butt" 810 | } 811 | fn stroke_linejoin(&self) -> &str { 812 | "miter" 813 | } 814 | fn child_elements(&self) -> Element { 815 | rsx! { 816 | path { 817 | d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z", 818 | } 819 | } 820 | } 821 | } 822 | 823 | #[derive(Copy, Clone, Debug, PartialEq)] 824 | pub struct MdLegendToggle; 825 | impl IconShape for MdLegendToggle { 826 | fn view_box(&self) -> &str { 827 | "0 0 24 24" 828 | } 829 | fn xmlns(&self) -> &str { 830 | "http://www.w3.org/2000/svg" 831 | } 832 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 833 | (user_color, "none", "0") 834 | } 835 | fn stroke_linecap(&self) -> &str { 836 | "butt" 837 | } 838 | fn stroke_linejoin(&self) -> &str { 839 | "miter" 840 | } 841 | fn child_elements(&self) -> Element { 842 | rsx! { 843 | path { 844 | d: "M20,15H4v-2h16V15z M20,17H4v2h16V17z M15,11l5-3.55L20,5l-5,3.55L10,5L4,8.66L4,11l5.92-3.61L15,11z", 845 | } 846 | } 847 | } 848 | } 849 | 850 | #[derive(Copy, Clone, Debug, PartialEq)] 851 | pub struct MdMenu; 852 | impl IconShape for MdMenu { 853 | fn view_box(&self) -> &str { 854 | "0 0 24 24" 855 | } 856 | fn xmlns(&self) -> &str { 857 | "http://www.w3.org/2000/svg" 858 | } 859 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 860 | (user_color, "none", "0") 861 | } 862 | fn stroke_linecap(&self) -> &str { 863 | "butt" 864 | } 865 | fn stroke_linejoin(&self) -> &str { 866 | "miter" 867 | } 868 | fn child_elements(&self) -> Element { 869 | rsx! { 870 | path { 871 | d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z", 872 | } 873 | } 874 | } 875 | } 876 | 877 | #[derive(Copy, Clone, Debug, PartialEq)] 878 | pub struct MdMenuOpen; 879 | impl IconShape for MdMenuOpen { 880 | fn view_box(&self) -> &str { 881 | "0 0 24 24" 882 | } 883 | fn xmlns(&self) -> &str { 884 | "http://www.w3.org/2000/svg" 885 | } 886 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 887 | (user_color, "none", "0") 888 | } 889 | fn stroke_linecap(&self) -> &str { 890 | "butt" 891 | } 892 | fn stroke_linejoin(&self) -> &str { 893 | "miter" 894 | } 895 | fn child_elements(&self) -> Element { 896 | rsx! { 897 | path { 898 | d: "M3 18h13v-2H3v2zm0-5h10v-2H3v2zm0-7v2h13V6H3zm18 9.59L17.42 12 21 8.41 19.59 7l-5 5 5 5L21 15.59z", 899 | } 900 | } 901 | } 902 | } 903 | 904 | #[derive(Copy, Clone, Debug, PartialEq)] 905 | pub struct MdMoreHoriz; 906 | impl IconShape for MdMoreHoriz { 907 | fn view_box(&self) -> &str { 908 | "0 0 24 24" 909 | } 910 | fn xmlns(&self) -> &str { 911 | "http://www.w3.org/2000/svg" 912 | } 913 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 914 | (user_color, "none", "0") 915 | } 916 | fn stroke_linecap(&self) -> &str { 917 | "butt" 918 | } 919 | fn stroke_linejoin(&self) -> &str { 920 | "miter" 921 | } 922 | fn child_elements(&self) -> Element { 923 | rsx! { 924 | path { 925 | d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z", 926 | } 927 | } 928 | } 929 | } 930 | 931 | #[derive(Copy, Clone, Debug, PartialEq)] 932 | pub struct MdMoreVert; 933 | impl IconShape for MdMoreVert { 934 | fn view_box(&self) -> &str { 935 | "0 0 24 24" 936 | } 937 | fn xmlns(&self) -> &str { 938 | "http://www.w3.org/2000/svg" 939 | } 940 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 941 | (user_color, "none", "0") 942 | } 943 | fn stroke_linecap(&self) -> &str { 944 | "butt" 945 | } 946 | fn stroke_linejoin(&self) -> &str { 947 | "miter" 948 | } 949 | fn child_elements(&self) -> Element { 950 | rsx! { 951 | path { 952 | d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z", 953 | } 954 | } 955 | } 956 | } 957 | 958 | #[derive(Copy, Clone, Debug, PartialEq)] 959 | pub struct MdNorth; 960 | impl IconShape for MdNorth { 961 | fn view_box(&self) -> &str { 962 | "0 0 24 24" 963 | } 964 | fn xmlns(&self) -> &str { 965 | "http://www.w3.org/2000/svg" 966 | } 967 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 968 | (user_color, "none", "0") 969 | } 970 | fn stroke_linecap(&self) -> &str { 971 | "butt" 972 | } 973 | fn stroke_linejoin(&self) -> &str { 974 | "miter" 975 | } 976 | fn child_elements(&self) -> Element { 977 | rsx! { 978 | path { 979 | d: "M5,9l1.41,1.41L11,5.83V22H13V5.83l4.59,4.59L19,9l-7-7L5,9z", 980 | } 981 | } 982 | } 983 | } 984 | 985 | #[derive(Copy, Clone, Debug, PartialEq)] 986 | pub struct MdNorthEast; 987 | impl IconShape for MdNorthEast { 988 | fn view_box(&self) -> &str { 989 | "0 0 24 24" 990 | } 991 | fn xmlns(&self) -> &str { 992 | "http://www.w3.org/2000/svg" 993 | } 994 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 995 | (user_color, "none", "0") 996 | } 997 | fn stroke_linecap(&self) -> &str { 998 | "butt" 999 | } 1000 | fn stroke_linejoin(&self) -> &str { 1001 | "miter" 1002 | } 1003 | fn child_elements(&self) -> Element { 1004 | rsx! { 1005 | path { 1006 | d: "M9,5v2h6.59L4,18.59L5.41,20L17,8.41V15h2V5H9z", 1007 | } 1008 | } 1009 | } 1010 | } 1011 | 1012 | #[derive(Copy, Clone, Debug, PartialEq)] 1013 | pub struct MdNorthWest; 1014 | impl IconShape for MdNorthWest { 1015 | fn view_box(&self) -> &str { 1016 | "0 0 24 24" 1017 | } 1018 | fn xmlns(&self) -> &str { 1019 | "http://www.w3.org/2000/svg" 1020 | } 1021 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1022 | (user_color, "none", "0") 1023 | } 1024 | fn stroke_linecap(&self) -> &str { 1025 | "butt" 1026 | } 1027 | fn stroke_linejoin(&self) -> &str { 1028 | "miter" 1029 | } 1030 | fn child_elements(&self) -> Element { 1031 | rsx! { 1032 | path { 1033 | d: "M5,15h2V8.41L18.59,20L20,18.59L8.41,7H15V5H5V15z", 1034 | } 1035 | } 1036 | } 1037 | } 1038 | 1039 | #[derive(Copy, Clone, Debug, PartialEq)] 1040 | pub struct MdOfflineShare; 1041 | impl IconShape for MdOfflineShare { 1042 | fn view_box(&self) -> &str { 1043 | "0 0 24 24" 1044 | } 1045 | fn xmlns(&self) -> &str { 1046 | "http://www.w3.org/2000/svg" 1047 | } 1048 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1049 | (user_color, "none", "0") 1050 | } 1051 | fn stroke_linecap(&self) -> &str { 1052 | "butt" 1053 | } 1054 | fn stroke_linejoin(&self) -> &str { 1055 | "miter" 1056 | } 1057 | fn child_elements(&self) -> Element { 1058 | rsx! { 1059 | path { 1060 | d: "M14.6 10.26v1.31L17 9.33 14.6 7.1v1.28c-2.33.32-3.26 1.92-3.6 3.52.83-1.13 1.93-1.64 3.6-1.64zM16 23H6c-1.1 0-2-.9-2-2V5h2v16h10v2zm2-22h-8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 15h-8V4h8v12z", 1061 | } 1062 | } 1063 | } 1064 | } 1065 | 1066 | #[derive(Copy, Clone, Debug, PartialEq)] 1067 | pub struct MdPayments; 1068 | impl IconShape for MdPayments { 1069 | fn view_box(&self) -> &str { 1070 | "0 0 24 24" 1071 | } 1072 | fn xmlns(&self) -> &str { 1073 | "http://www.w3.org/2000/svg" 1074 | } 1075 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1076 | (user_color, "none", "0") 1077 | } 1078 | fn stroke_linecap(&self) -> &str { 1079 | "butt" 1080 | } 1081 | fn stroke_linejoin(&self) -> &str { 1082 | "miter" 1083 | } 1084 | fn child_elements(&self) -> Element { 1085 | rsx! { 1086 | path { 1087 | d: "M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-9-1c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-6v11c0 1.1-.9 2-2 2H4v-2h17V7h2z", 1088 | } 1089 | } 1090 | } 1091 | } 1092 | 1093 | #[derive(Copy, Clone, Debug, PartialEq)] 1094 | pub struct MdPivotTableChart; 1095 | impl IconShape for MdPivotTableChart { 1096 | fn view_box(&self) -> &str { 1097 | "0 0 24 24" 1098 | } 1099 | fn xmlns(&self) -> &str { 1100 | "http://www.w3.org/2000/svg" 1101 | } 1102 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1103 | (user_color, "none", "0") 1104 | } 1105 | fn stroke_linecap(&self) -> &str { 1106 | "butt" 1107 | } 1108 | fn stroke_linejoin(&self) -> &str { 1109 | "miter" 1110 | } 1111 | fn child_elements(&self) -> Element { 1112 | rsx! { 1113 | path { 1114 | d: "M10 8h11V5c0-1.1-.9-2-2-2h-9v5zM3 8h5V3H5c-1.1 0-2 .9-2 2v3zm2 13h3V10H3v9c0 1.1.9 2 2 2zm8 1l-4-4 4-4zm1-9l4-4 4 4z", 1115 | } 1116 | path { 1117 | d: "M14.58 19H13v-2h1.58c1.33 0 2.42-1.08 2.42-2.42V13h2v1.58c0 2.44-1.98 4.42-4.42 4.42z", 1118 | } 1119 | } 1120 | } 1121 | } 1122 | 1123 | #[derive(Copy, Clone, Debug, PartialEq)] 1124 | pub struct MdRefresh; 1125 | impl IconShape for MdRefresh { 1126 | fn view_box(&self) -> &str { 1127 | "0 0 24 24" 1128 | } 1129 | fn xmlns(&self) -> &str { 1130 | "http://www.w3.org/2000/svg" 1131 | } 1132 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1133 | (user_color, "none", "0") 1134 | } 1135 | fn stroke_linecap(&self) -> &str { 1136 | "butt" 1137 | } 1138 | fn stroke_linejoin(&self) -> &str { 1139 | "miter" 1140 | } 1141 | fn child_elements(&self) -> Element { 1142 | rsx! { 1143 | path { 1144 | d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z", 1145 | } 1146 | } 1147 | } 1148 | } 1149 | 1150 | #[derive(Copy, Clone, Debug, PartialEq)] 1151 | pub struct MdSouth; 1152 | impl IconShape for MdSouth { 1153 | fn view_box(&self) -> &str { 1154 | "0 0 24 24" 1155 | } 1156 | fn xmlns(&self) -> &str { 1157 | "http://www.w3.org/2000/svg" 1158 | } 1159 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1160 | (user_color, "none", "0") 1161 | } 1162 | fn stroke_linecap(&self) -> &str { 1163 | "butt" 1164 | } 1165 | fn stroke_linejoin(&self) -> &str { 1166 | "miter" 1167 | } 1168 | fn child_elements(&self) -> Element { 1169 | rsx! { 1170 | path { 1171 | d: "M19,15l-1.41-1.41L13,18.17V2H11v16.17l-4.59-4.59L5,15l7,7L19,15z", 1172 | } 1173 | } 1174 | } 1175 | } 1176 | 1177 | #[derive(Copy, Clone, Debug, PartialEq)] 1178 | pub struct MdSouthEast; 1179 | impl IconShape for MdSouthEast { 1180 | fn view_box(&self) -> &str { 1181 | "0 0 24 24" 1182 | } 1183 | fn xmlns(&self) -> &str { 1184 | "http://www.w3.org/2000/svg" 1185 | } 1186 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1187 | (user_color, "none", "0") 1188 | } 1189 | fn stroke_linecap(&self) -> &str { 1190 | "butt" 1191 | } 1192 | fn stroke_linejoin(&self) -> &str { 1193 | "miter" 1194 | } 1195 | fn child_elements(&self) -> Element { 1196 | rsx! { 1197 | path { 1198 | d: "M19,9h-2v6.59L5.41,4L4,5.41L15.59,17H9v2h10V9z", 1199 | } 1200 | } 1201 | } 1202 | } 1203 | 1204 | #[derive(Copy, Clone, Debug, PartialEq)] 1205 | pub struct MdSouthWest; 1206 | impl IconShape for MdSouthWest { 1207 | fn view_box(&self) -> &str { 1208 | "0 0 24 24" 1209 | } 1210 | fn xmlns(&self) -> &str { 1211 | "http://www.w3.org/2000/svg" 1212 | } 1213 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1214 | (user_color, "none", "0") 1215 | } 1216 | fn stroke_linecap(&self) -> &str { 1217 | "butt" 1218 | } 1219 | fn stroke_linejoin(&self) -> &str { 1220 | "miter" 1221 | } 1222 | fn child_elements(&self) -> Element { 1223 | rsx! { 1224 | path { 1225 | d: "M15,19v-2H8.41L20,5.41L18.59,4L7,15.59V9H5v10H15z", 1226 | } 1227 | } 1228 | } 1229 | } 1230 | 1231 | #[derive(Copy, Clone, Debug, PartialEq)] 1232 | pub struct MdSubdirectoryArrowLeft; 1233 | impl IconShape for MdSubdirectoryArrowLeft { 1234 | fn view_box(&self) -> &str { 1235 | "0 0 24 24" 1236 | } 1237 | fn xmlns(&self) -> &str { 1238 | "http://www.w3.org/2000/svg" 1239 | } 1240 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1241 | (user_color, "none", "0") 1242 | } 1243 | fn stroke_linecap(&self) -> &str { 1244 | "butt" 1245 | } 1246 | fn stroke_linejoin(&self) -> &str { 1247 | "miter" 1248 | } 1249 | fn child_elements(&self) -> Element { 1250 | rsx! { 1251 | path { 1252 | d: "M11 9l1.42 1.42L8.83 14H18V4h2v12H8.83l3.59 3.58L11 21l-6-6 6-6z", 1253 | } 1254 | } 1255 | } 1256 | } 1257 | 1258 | #[derive(Copy, Clone, Debug, PartialEq)] 1259 | pub struct MdSubdirectoryArrowRight; 1260 | impl IconShape for MdSubdirectoryArrowRight { 1261 | fn view_box(&self) -> &str { 1262 | "0 0 24 24" 1263 | } 1264 | fn xmlns(&self) -> &str { 1265 | "http://www.w3.org/2000/svg" 1266 | } 1267 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1268 | (user_color, "none", "0") 1269 | } 1270 | fn stroke_linecap(&self) -> &str { 1271 | "butt" 1272 | } 1273 | fn stroke_linejoin(&self) -> &str { 1274 | "miter" 1275 | } 1276 | fn child_elements(&self) -> Element { 1277 | rsx! { 1278 | path { 1279 | d: "M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z", 1280 | } 1281 | } 1282 | } 1283 | } 1284 | 1285 | #[derive(Copy, Clone, Debug, PartialEq)] 1286 | pub struct MdSwitchLeft; 1287 | impl IconShape for MdSwitchLeft { 1288 | fn view_box(&self) -> &str { 1289 | "0 0 24 24" 1290 | } 1291 | fn xmlns(&self) -> &str { 1292 | "http://www.w3.org/2000/svg" 1293 | } 1294 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1295 | (user_color, "none", "0") 1296 | } 1297 | fn stroke_linecap(&self) -> &str { 1298 | "butt" 1299 | } 1300 | fn stroke_linejoin(&self) -> &str { 1301 | "miter" 1302 | } 1303 | fn child_elements(&self) -> Element { 1304 | rsx! { 1305 | path { 1306 | d: "M8.5,8.62v6.76L5.12,12L8.5,8.62 M10,5l-7,7l7,7V5L10,5z M14,5v14l7-7L14,5z", 1307 | } 1308 | } 1309 | } 1310 | } 1311 | 1312 | #[derive(Copy, Clone, Debug, PartialEq)] 1313 | pub struct MdSwitchRight; 1314 | impl IconShape for MdSwitchRight { 1315 | fn view_box(&self) -> &str { 1316 | "0 0 24 24" 1317 | } 1318 | fn xmlns(&self) -> &str { 1319 | "http://www.w3.org/2000/svg" 1320 | } 1321 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1322 | (user_color, "none", "0") 1323 | } 1324 | fn stroke_linecap(&self) -> &str { 1325 | "butt" 1326 | } 1327 | fn stroke_linejoin(&self) -> &str { 1328 | "miter" 1329 | } 1330 | fn child_elements(&self) -> Element { 1331 | rsx! { 1332 | path { 1333 | d: "M15.5,15.38V8.62L18.88,12L15.5,15.38 M14,19l7-7l-7-7V19L14,19z M10,19V5l-7,7L10,19z", 1334 | } 1335 | } 1336 | } 1337 | } 1338 | 1339 | #[derive(Copy, Clone, Debug, PartialEq)] 1340 | pub struct MdUnfoldLess; 1341 | impl IconShape for MdUnfoldLess { 1342 | fn view_box(&self) -> &str { 1343 | "0 0 24 24" 1344 | } 1345 | fn xmlns(&self) -> &str { 1346 | "http://www.w3.org/2000/svg" 1347 | } 1348 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1349 | (user_color, "none", "0") 1350 | } 1351 | fn stroke_linecap(&self) -> &str { 1352 | "butt" 1353 | } 1354 | fn stroke_linejoin(&self) -> &str { 1355 | "miter" 1356 | } 1357 | fn child_elements(&self) -> Element { 1358 | rsx! { 1359 | path { 1360 | d: "M7.41 18.59L8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z", 1361 | } 1362 | } 1363 | } 1364 | } 1365 | 1366 | #[derive(Copy, Clone, Debug, PartialEq)] 1367 | pub struct MdUnfoldMore; 1368 | impl IconShape for MdUnfoldMore { 1369 | fn view_box(&self) -> &str { 1370 | "0 0 24 24" 1371 | } 1372 | fn xmlns(&self) -> &str { 1373 | "http://www.w3.org/2000/svg" 1374 | } 1375 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1376 | (user_color, "none", "0") 1377 | } 1378 | fn stroke_linecap(&self) -> &str { 1379 | "butt" 1380 | } 1381 | fn stroke_linejoin(&self) -> &str { 1382 | "miter" 1383 | } 1384 | fn child_elements(&self) -> Element { 1385 | rsx! { 1386 | path { 1387 | d: "M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z", 1388 | } 1389 | } 1390 | } 1391 | } 1392 | 1393 | #[derive(Copy, Clone, Debug, PartialEq)] 1394 | pub struct MdWaterfallChart; 1395 | impl IconShape for MdWaterfallChart { 1396 | fn view_box(&self) -> &str { 1397 | "0 0 24 24" 1398 | } 1399 | fn xmlns(&self) -> &str { 1400 | "http://www.w3.org/2000/svg" 1401 | } 1402 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1403 | (user_color, "none", "0") 1404 | } 1405 | fn stroke_linecap(&self) -> &str { 1406 | "butt" 1407 | } 1408 | fn stroke_linejoin(&self) -> &str { 1409 | "miter" 1410 | } 1411 | fn child_elements(&self) -> Element { 1412 | rsx! { 1413 | path { 1414 | d: "M18 4h3v16h-3zM3 13h3v7H3zm11-9h3v3h-3zm-4 1h3v4h-3zm-3 5h3v4H7z", 1415 | } 1416 | } 1417 | } 1418 | } 1419 | 1420 | #[derive(Copy, Clone, Debug, PartialEq)] 1421 | pub struct MdWest; 1422 | impl IconShape for MdWest { 1423 | fn view_box(&self) -> &str { 1424 | "0 0 24 24" 1425 | } 1426 | fn xmlns(&self) -> &str { 1427 | "http://www.w3.org/2000/svg" 1428 | } 1429 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1430 | (user_color, "none", "0") 1431 | } 1432 | fn stroke_linecap(&self) -> &str { 1433 | "butt" 1434 | } 1435 | fn stroke_linejoin(&self) -> &str { 1436 | "miter" 1437 | } 1438 | fn child_elements(&self) -> Element { 1439 | rsx! { 1440 | path { 1441 | d: "M9,19l1.41-1.41L5.83,13H22V11H5.83l4.59-4.59L9,5l-7,7L9,19z", 1442 | } 1443 | } 1444 | } 1445 | } 1446 | -------------------------------------------------------------------------------- /packages/lib/src/icons/md_hardware_icons.rs: -------------------------------------------------------------------------------- 1 | use super::super::IconShape; 2 | use dioxus::prelude::*; 3 | 4 | #[derive(Copy, Clone, Debug, PartialEq)] 5 | pub struct MdBrowserNotSupported; 6 | impl IconShape for MdBrowserNotSupported { 7 | fn view_box(&self) -> &str { 8 | "0 0 24 24" 9 | } 10 | fn xmlns(&self) -> &str { 11 | "http://www.w3.org/2000/svg" 12 | } 13 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 14 | (user_color, "none", "0") 15 | } 16 | fn stroke_linecap(&self) -> &str { 17 | "butt" 18 | } 19 | fn stroke_linejoin(&self) -> &str { 20 | "miter" 21 | } 22 | fn child_elements(&self) -> Element { 23 | rsx! { 24 | path { 25 | d: "M19,6v10.5l1.95,1.95C20.98,18.3,21,18.15,21,18V6c0-1.1-0.9-2-2-2H6.5l2,2H19z", 26 | } 27 | path { 28 | d: "M3.22,3.32L1.95,4.59L3,5.64L3,18c0,1.1,0.9,2,2,2h12.36l2.06,2.06l1.27-1.27L3.22,3.32z M15,18H5V7.64L15.36,18H15z", 29 | } 30 | } 31 | } 32 | } 33 | 34 | #[derive(Copy, Clone, Debug, PartialEq)] 35 | pub struct MdCast; 36 | impl IconShape for MdCast { 37 | fn view_box(&self) -> &str { 38 | "0 0 24 24" 39 | } 40 | fn xmlns(&self) -> &str { 41 | "http://www.w3.org/2000/svg" 42 | } 43 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 44 | (user_color, "none", "0") 45 | } 46 | fn stroke_linecap(&self) -> &str { 47 | "butt" 48 | } 49 | fn stroke_linejoin(&self) -> &str { 50 | "miter" 51 | } 52 | fn child_elements(&self) -> Element { 53 | rsx! { 54 | path { 55 | d: "M0 0h24v24H0z", 56 | opacity: ".1", 57 | } 58 | path { 59 | d: "M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z", 60 | } 61 | } 62 | } 63 | } 64 | 65 | #[derive(Copy, Clone, Debug, PartialEq)] 66 | pub struct MdCastConnected; 67 | impl IconShape for MdCastConnected { 68 | fn view_box(&self) -> &str { 69 | "0 0 24 24" 70 | } 71 | fn xmlns(&self) -> &str { 72 | "http://www.w3.org/2000/svg" 73 | } 74 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 75 | (user_color, "none", "0") 76 | } 77 | fn stroke_linecap(&self) -> &str { 78 | "butt" 79 | } 80 | fn stroke_linejoin(&self) -> &str { 81 | "miter" 82 | } 83 | fn child_elements(&self) -> Element { 84 | rsx! { 85 | path { 86 | d: "M0 0h24v24H0z", 87 | opacity: ".1", 88 | } 89 | path { 90 | d: "M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z", 91 | } 92 | } 93 | } 94 | } 95 | 96 | #[derive(Copy, Clone, Debug, PartialEq)] 97 | pub struct MdCastForEducation; 98 | impl IconShape for MdCastForEducation { 99 | fn view_box(&self) -> &str { 100 | "0 0 24 24" 101 | } 102 | fn xmlns(&self) -> &str { 103 | "http://www.w3.org/2000/svg" 104 | } 105 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 106 | (user_color, "none", "0") 107 | } 108 | fn stroke_linecap(&self) -> &str { 109 | "butt" 110 | } 111 | fn stroke_linejoin(&self) -> &str { 112 | "miter" 113 | } 114 | fn child_elements(&self) -> Element { 115 | rsx! { 116 | path { 117 | d: "M0,0h24v24H0V0z", 118 | } 119 | } 120 | } 121 | } 122 | 123 | #[derive(Copy, Clone, Debug, PartialEq)] 124 | pub struct MdComputer; 125 | impl IconShape for MdComputer { 126 | fn view_box(&self) -> &str { 127 | "0 0 24 24" 128 | } 129 | fn xmlns(&self) -> &str { 130 | "http://www.w3.org/2000/svg" 131 | } 132 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 133 | (user_color, "none", "0") 134 | } 135 | fn stroke_linecap(&self) -> &str { 136 | "butt" 137 | } 138 | fn stroke_linejoin(&self) -> &str { 139 | "miter" 140 | } 141 | fn child_elements(&self) -> Element { 142 | rsx! { 143 | path { 144 | d: "M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z", 145 | } 146 | } 147 | } 148 | } 149 | 150 | #[derive(Copy, Clone, Debug, PartialEq)] 151 | pub struct MdConnectedTv; 152 | impl IconShape for MdConnectedTv { 153 | fn view_box(&self) -> &str { 154 | "0 0 24 24" 155 | } 156 | fn xmlns(&self) -> &str { 157 | "http://www.w3.org/2000/svg" 158 | } 159 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 160 | (user_color, "none", "0") 161 | } 162 | fn stroke_linecap(&self) -> &str { 163 | "butt" 164 | } 165 | fn stroke_linejoin(&self) -> &str { 166 | "miter" 167 | } 168 | fn child_elements(&self) -> Element { 169 | rsx! { 170 | path { 171 | d: "M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12zM4 14v2h2c0-1.11-.89-2-2-2zm0-3v1.43c1.97 0 3.57 1.6 3.57 3.57H9c0-2.76-2.24-5-5-5zm0-3v1.45c3.61 0 6.55 2.93 6.55 6.55H12c0-4.42-3.59-8-8-8z", 172 | } 173 | } 174 | } 175 | } 176 | 177 | #[derive(Copy, Clone, Debug, PartialEq)] 178 | pub struct MdDesktopMac; 179 | impl IconShape for MdDesktopMac { 180 | fn view_box(&self) -> &str { 181 | "0 0 24 24" 182 | } 183 | fn xmlns(&self) -> &str { 184 | "http://www.w3.org/2000/svg" 185 | } 186 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 187 | (user_color, "none", "0") 188 | } 189 | fn stroke_linecap(&self) -> &str { 190 | "butt" 191 | } 192 | fn stroke_linejoin(&self) -> &str { 193 | "miter" 194 | } 195 | fn child_elements(&self) -> Element { 196 | rsx! { 197 | path { 198 | d: "M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7l-2 3v1h8v-1l-2-3h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 12H3V4h18v10z", 199 | } 200 | } 201 | } 202 | } 203 | 204 | #[derive(Copy, Clone, Debug, PartialEq)] 205 | pub struct MdDesktopWindows; 206 | impl IconShape for MdDesktopWindows { 207 | fn view_box(&self) -> &str { 208 | "0 0 24 24" 209 | } 210 | fn xmlns(&self) -> &str { 211 | "http://www.w3.org/2000/svg" 212 | } 213 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 214 | (user_color, "none", "0") 215 | } 216 | fn stroke_linecap(&self) -> &str { 217 | "butt" 218 | } 219 | fn stroke_linejoin(&self) -> &str { 220 | "miter" 221 | } 222 | fn child_elements(&self) -> Element { 223 | rsx! { 224 | path { 225 | d: "M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z", 226 | } 227 | } 228 | } 229 | } 230 | 231 | #[derive(Copy, Clone, Debug, PartialEq)] 232 | pub struct MdDeveloperBoard; 233 | impl IconShape for MdDeveloperBoard { 234 | fn view_box(&self) -> &str { 235 | "0 0 24 24" 236 | } 237 | fn xmlns(&self) -> &str { 238 | "http://www.w3.org/2000/svg" 239 | } 240 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 241 | (user_color, "none", "0") 242 | } 243 | fn stroke_linecap(&self) -> &str { 244 | "butt" 245 | } 246 | fn stroke_linejoin(&self) -> &str { 247 | "miter" 248 | } 249 | fn child_elements(&self) -> Element { 250 | rsx! { 251 | path { 252 | d: "M0 0h24v24H0zm0 0h24v24H0z", 253 | } 254 | } 255 | } 256 | } 257 | 258 | #[derive(Copy, Clone, Debug, PartialEq)] 259 | pub struct MdDeviceHub; 260 | impl IconShape for MdDeviceHub { 261 | fn view_box(&self) -> &str { 262 | "0 0 24 24" 263 | } 264 | fn xmlns(&self) -> &str { 265 | "http://www.w3.org/2000/svg" 266 | } 267 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 268 | (user_color, "none", "0") 269 | } 270 | fn stroke_linecap(&self) -> &str { 271 | "butt" 272 | } 273 | fn stroke_linejoin(&self) -> &str { 274 | "miter" 275 | } 276 | fn child_elements(&self) -> Element { 277 | rsx! { 278 | path { 279 | d: "M0 0h24v24H0V0z", 280 | } 281 | path { 282 | d: "M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z", 283 | } 284 | } 285 | } 286 | } 287 | 288 | #[derive(Copy, Clone, Debug, PartialEq)] 289 | pub struct MdDeviceUnknown; 290 | impl IconShape for MdDeviceUnknown { 291 | fn view_box(&self) -> &str { 292 | "0 0 24 24" 293 | } 294 | fn xmlns(&self) -> &str { 295 | "http://www.w3.org/2000/svg" 296 | } 297 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 298 | (user_color, "none", "0") 299 | } 300 | fn stroke_linecap(&self) -> &str { 301 | "butt" 302 | } 303 | fn stroke_linejoin(&self) -> &str { 304 | "miter" 305 | } 306 | fn child_elements(&self) -> Element { 307 | rsx! { 308 | path { 309 | d: "M17 1H7c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 18H7V5h10v14zM12 6.72c-1.96 0-3.5 1.52-3.5 3.47h1.75c0-.93.82-1.75 1.75-1.75s1.75.82 1.75 1.75c0 1.75-2.63 1.57-2.63 4.45h1.76c0-1.96 2.62-2.19 2.62-4.45 0-1.96-1.54-3.47-3.5-3.47zm-.88 8.8h1.76v1.76h-1.76z", 310 | } 311 | } 312 | } 313 | } 314 | 315 | #[derive(Copy, Clone, Debug, PartialEq)] 316 | pub struct MdDevicesOther; 317 | impl IconShape for MdDevicesOther { 318 | fn view_box(&self) -> &str { 319 | "0 0 24 24" 320 | } 321 | fn xmlns(&self) -> &str { 322 | "http://www.w3.org/2000/svg" 323 | } 324 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 325 | (user_color, "none", "0") 326 | } 327 | fn stroke_linecap(&self) -> &str { 328 | "butt" 329 | } 330 | fn stroke_linejoin(&self) -> &str { 331 | "miter" 332 | } 333 | fn child_elements(&self) -> Element { 334 | rsx! { 335 | path { 336 | d: "M3 6h18V4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V6zm10 6H9v1.78c-.61.55-1 1.33-1 2.22s.39 1.67 1 2.22V20h4v-1.78c.61-.55 1-1.34 1-2.22s-.39-1.67-1-2.22V12zm-2 5.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM22 8h-6c-.5 0-1 .5-1 1v10c0 .5.5 1 1 1h6c.5 0 1-.5 1-1V9c0-.5-.5-1-1-1zm-1 10h-4v-8h4v8z", 337 | } 338 | } 339 | } 340 | } 341 | 342 | #[derive(Copy, Clone, Debug, PartialEq)] 343 | pub struct MdDock; 344 | impl IconShape for MdDock { 345 | fn view_box(&self) -> &str { 346 | "0 0 24 24" 347 | } 348 | fn xmlns(&self) -> &str { 349 | "http://www.w3.org/2000/svg" 350 | } 351 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 352 | (user_color, "none", "0") 353 | } 354 | fn stroke_linecap(&self) -> &str { 355 | "butt" 356 | } 357 | fn stroke_linejoin(&self) -> &str { 358 | "miter" 359 | } 360 | fn child_elements(&self) -> Element { 361 | rsx! { 362 | path { 363 | d: "M8 23h8v-2H8v2zm8-21.99L8 1c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM16 15H8V5h8v10z", 364 | } 365 | } 366 | } 367 | } 368 | 369 | #[derive(Copy, Clone, Debug, PartialEq)] 370 | pub struct MdGamepad; 371 | impl IconShape for MdGamepad { 372 | fn view_box(&self) -> &str { 373 | "0 0 24 24" 374 | } 375 | fn xmlns(&self) -> &str { 376 | "http://www.w3.org/2000/svg" 377 | } 378 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 379 | (user_color, "none", "0") 380 | } 381 | fn stroke_linecap(&self) -> &str { 382 | "butt" 383 | } 384 | fn stroke_linejoin(&self) -> &str { 385 | "miter" 386 | } 387 | fn child_elements(&self) -> Element { 388 | rsx! { 389 | path { 390 | d: "M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z", 391 | } 392 | } 393 | } 394 | } 395 | 396 | #[derive(Copy, Clone, Debug, PartialEq)] 397 | pub struct MdHeadset; 398 | impl IconShape for MdHeadset { 399 | fn view_box(&self) -> &str { 400 | "0 0 24 24" 401 | } 402 | fn xmlns(&self) -> &str { 403 | "http://www.w3.org/2000/svg" 404 | } 405 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 406 | (user_color, "none", "0") 407 | } 408 | fn stroke_linecap(&self) -> &str { 409 | "butt" 410 | } 411 | fn stroke_linejoin(&self) -> &str { 412 | "miter" 413 | } 414 | fn child_elements(&self) -> Element { 415 | rsx! { 416 | path { 417 | d: "M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z", 418 | } 419 | } 420 | } 421 | } 422 | 423 | #[derive(Copy, Clone, Debug, PartialEq)] 424 | pub struct MdHeadsetMic; 425 | impl IconShape for MdHeadsetMic { 426 | fn view_box(&self) -> &str { 427 | "0 0 24 24" 428 | } 429 | fn xmlns(&self) -> &str { 430 | "http://www.w3.org/2000/svg" 431 | } 432 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 433 | (user_color, "none", "0") 434 | } 435 | fn stroke_linecap(&self) -> &str { 436 | "butt" 437 | } 438 | fn stroke_linejoin(&self) -> &str { 439 | "miter" 440 | } 441 | fn child_elements(&self) -> Element { 442 | rsx! { 443 | path { 444 | d: "M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h4v1h-7v2h6c1.66 0 3-1.34 3-3V10c0-4.97-4.03-9-9-9z", 445 | } 446 | } 447 | } 448 | } 449 | 450 | #[derive(Copy, Clone, Debug, PartialEq)] 451 | pub struct MdHeadsetOff; 452 | impl IconShape for MdHeadsetOff { 453 | fn view_box(&self) -> &str { 454 | "0 0 24 24" 455 | } 456 | fn xmlns(&self) -> &str { 457 | "http://www.w3.org/2000/svg" 458 | } 459 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 460 | (user_color, "none", "0") 461 | } 462 | fn stroke_linecap(&self) -> &str { 463 | "butt" 464 | } 465 | fn stroke_linejoin(&self) -> &str { 466 | "miter" 467 | } 468 | fn child_elements(&self) -> Element { 469 | rsx! { 470 | path { 471 | d: "M12 4c3.87 0 7 3.13 7 7v2h-2.92L21 17.92V11c0-4.97-4.03-9-9-9-1.95 0-3.76.62-5.23 1.68l1.44 1.44C9.3 4.41 10.6 4 12 4zM2.27 1.72L1 3l3.33 3.32C3.49 7.68 3 9.29 3 11v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-1.17.29-2.26.79-3.22L15 17v4h3c.3 0 .59-.06.86-.14L21 23l1.27-1.27-20-20.01z", 472 | } 473 | } 474 | } 475 | } 476 | 477 | #[derive(Copy, Clone, Debug, PartialEq)] 478 | pub struct MdKeyboard; 479 | impl IconShape for MdKeyboard { 480 | fn view_box(&self) -> &str { 481 | "0 0 24 24" 482 | } 483 | fn xmlns(&self) -> &str { 484 | "http://www.w3.org/2000/svg" 485 | } 486 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 487 | (user_color, "none", "0") 488 | } 489 | fn stroke_linecap(&self) -> &str { 490 | "butt" 491 | } 492 | fn stroke_linejoin(&self) -> &str { 493 | "miter" 494 | } 495 | fn child_elements(&self) -> Element { 496 | rsx! { 497 | path { 498 | d: "M0 0h24v24H0zm0 0h24v24H0z", 499 | } 500 | } 501 | } 502 | } 503 | 504 | #[derive(Copy, Clone, Debug, PartialEq)] 505 | pub struct MdKeyboardArrowDown; 506 | impl IconShape for MdKeyboardArrowDown { 507 | fn view_box(&self) -> &str { 508 | "0 0 24 24" 509 | } 510 | fn xmlns(&self) -> &str { 511 | "http://www.w3.org/2000/svg" 512 | } 513 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 514 | (user_color, "none", "0") 515 | } 516 | fn stroke_linecap(&self) -> &str { 517 | "butt" 518 | } 519 | fn stroke_linejoin(&self) -> &str { 520 | "miter" 521 | } 522 | fn child_elements(&self) -> Element { 523 | rsx! { 524 | path { 525 | d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z", 526 | } 527 | } 528 | } 529 | } 530 | 531 | #[derive(Copy, Clone, Debug, PartialEq)] 532 | pub struct MdKeyboardArrowLeft; 533 | impl IconShape for MdKeyboardArrowLeft { 534 | fn view_box(&self) -> &str { 535 | "0 0 24 24" 536 | } 537 | fn xmlns(&self) -> &str { 538 | "http://www.w3.org/2000/svg" 539 | } 540 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 541 | (user_color, "none", "0") 542 | } 543 | fn stroke_linecap(&self) -> &str { 544 | "butt" 545 | } 546 | fn stroke_linejoin(&self) -> &str { 547 | "miter" 548 | } 549 | fn child_elements(&self) -> Element { 550 | rsx! { 551 | path { 552 | d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z", 553 | } 554 | } 555 | } 556 | } 557 | 558 | #[derive(Copy, Clone, Debug, PartialEq)] 559 | pub struct MdKeyboardArrowRight; 560 | impl IconShape for MdKeyboardArrowRight { 561 | fn view_box(&self) -> &str { 562 | "0 0 24 24" 563 | } 564 | fn xmlns(&self) -> &str { 565 | "http://www.w3.org/2000/svg" 566 | } 567 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 568 | (user_color, "none", "0") 569 | } 570 | fn stroke_linecap(&self) -> &str { 571 | "butt" 572 | } 573 | fn stroke_linejoin(&self) -> &str { 574 | "miter" 575 | } 576 | fn child_elements(&self) -> Element { 577 | rsx! { 578 | path { 579 | d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z", 580 | } 581 | } 582 | } 583 | } 584 | 585 | #[derive(Copy, Clone, Debug, PartialEq)] 586 | pub struct MdKeyboardArrowUp; 587 | impl IconShape for MdKeyboardArrowUp { 588 | fn view_box(&self) -> &str { 589 | "0 0 24 24" 590 | } 591 | fn xmlns(&self) -> &str { 592 | "http://www.w3.org/2000/svg" 593 | } 594 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 595 | (user_color, "none", "0") 596 | } 597 | fn stroke_linecap(&self) -> &str { 598 | "butt" 599 | } 600 | fn stroke_linejoin(&self) -> &str { 601 | "miter" 602 | } 603 | fn child_elements(&self) -> Element { 604 | rsx! { 605 | path { 606 | d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z", 607 | } 608 | } 609 | } 610 | } 611 | 612 | #[derive(Copy, Clone, Debug, PartialEq)] 613 | pub struct MdKeyboardBackspace; 614 | impl IconShape for MdKeyboardBackspace { 615 | fn view_box(&self) -> &str { 616 | "0 0 24 24" 617 | } 618 | fn xmlns(&self) -> &str { 619 | "http://www.w3.org/2000/svg" 620 | } 621 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 622 | (user_color, "none", "0") 623 | } 624 | fn stroke_linecap(&self) -> &str { 625 | "butt" 626 | } 627 | fn stroke_linejoin(&self) -> &str { 628 | "miter" 629 | } 630 | fn child_elements(&self) -> Element { 631 | rsx! { 632 | path { 633 | d: "M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z", 634 | } 635 | } 636 | } 637 | } 638 | 639 | #[derive(Copy, Clone, Debug, PartialEq)] 640 | pub struct MdKeyboardCapslock; 641 | impl IconShape for MdKeyboardCapslock { 642 | fn view_box(&self) -> &str { 643 | "0 0 24 24" 644 | } 645 | fn xmlns(&self) -> &str { 646 | "http://www.w3.org/2000/svg" 647 | } 648 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 649 | (user_color, "none", "0") 650 | } 651 | fn stroke_linecap(&self) -> &str { 652 | "butt" 653 | } 654 | fn stroke_linejoin(&self) -> &str { 655 | "miter" 656 | } 657 | fn child_elements(&self) -> Element { 658 | rsx! { 659 | path { 660 | d: "M12 8.41L16.59 13 18 11.59l-6-6-6 6L7.41 13 12 8.41zM6 18h12v-2H6v2z", 661 | } 662 | } 663 | } 664 | } 665 | 666 | #[derive(Copy, Clone, Debug, PartialEq)] 667 | pub struct MdKeyboardHide; 668 | impl IconShape for MdKeyboardHide { 669 | fn view_box(&self) -> &str { 670 | "0 0 24 24" 671 | } 672 | fn xmlns(&self) -> &str { 673 | "http://www.w3.org/2000/svg" 674 | } 675 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 676 | (user_color, "none", "0") 677 | } 678 | fn stroke_linecap(&self) -> &str { 679 | "butt" 680 | } 681 | fn stroke_linejoin(&self) -> &str { 682 | "miter" 683 | } 684 | fn child_elements(&self) -> Element { 685 | rsx! { 686 | path { 687 | d: "M20 3H4c-1.1 0-1.99.9-1.99 2L2 15c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 3h2v2h-2V6zm0 3h2v2h-2V9zM8 6h2v2H8V6zm0 3h2v2H8V9zm-1 2H5V9h2v2zm0-3H5V6h2v2zm9 7H8v-2h8v2zm0-4h-2V9h2v2zm0-3h-2V6h2v2zm3 3h-2V9h2v2zm0-3h-2V6h2v2zm-7 15l4-4H8l4 4z", 688 | } 689 | } 690 | } 691 | } 692 | 693 | #[derive(Copy, Clone, Debug, PartialEq)] 694 | pub struct MdKeyboardReturn; 695 | impl IconShape for MdKeyboardReturn { 696 | fn view_box(&self) -> &str { 697 | "0 0 24 24" 698 | } 699 | fn xmlns(&self) -> &str { 700 | "http://www.w3.org/2000/svg" 701 | } 702 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 703 | (user_color, "none", "0") 704 | } 705 | fn stroke_linecap(&self) -> &str { 706 | "butt" 707 | } 708 | fn stroke_linejoin(&self) -> &str { 709 | "miter" 710 | } 711 | fn child_elements(&self) -> Element { 712 | rsx! { 713 | path { 714 | d: "M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z", 715 | } 716 | } 717 | } 718 | } 719 | 720 | #[derive(Copy, Clone, Debug, PartialEq)] 721 | pub struct MdKeyboardTab; 722 | impl IconShape for MdKeyboardTab { 723 | fn view_box(&self) -> &str { 724 | "0 0 24 24" 725 | } 726 | fn xmlns(&self) -> &str { 727 | "http://www.w3.org/2000/svg" 728 | } 729 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 730 | (user_color, "none", "0") 731 | } 732 | fn stroke_linecap(&self) -> &str { 733 | "butt" 734 | } 735 | fn stroke_linejoin(&self) -> &str { 736 | "miter" 737 | } 738 | fn child_elements(&self) -> Element { 739 | rsx! { 740 | path { 741 | d: "M11.59 7.41L15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z", 742 | } 743 | } 744 | } 745 | } 746 | 747 | #[derive(Copy, Clone, Debug, PartialEq)] 748 | pub struct MdKeyboardVoice; 749 | impl IconShape for MdKeyboardVoice { 750 | fn view_box(&self) -> &str { 751 | "0 0 24 24" 752 | } 753 | fn xmlns(&self) -> &str { 754 | "http://www.w3.org/2000/svg" 755 | } 756 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 757 | (user_color, "none", "0") 758 | } 759 | fn stroke_linecap(&self) -> &str { 760 | "butt" 761 | } 762 | fn stroke_linejoin(&self) -> &str { 763 | "miter" 764 | } 765 | fn child_elements(&self) -> Element { 766 | rsx! { 767 | path { 768 | d: "M12 15c1.66 0 2.99-1.34 2.99-3L15 6c0-1.66-1.34-3-3-3S9 4.34 9 6v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 15 6.7 12H5c0 3.42 2.72 6.23 6 6.72V22h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z", 769 | } 770 | } 771 | } 772 | } 773 | 774 | #[derive(Copy, Clone, Debug, PartialEq)] 775 | pub struct MdLaptop; 776 | impl IconShape for MdLaptop { 777 | fn view_box(&self) -> &str { 778 | "0 0 24 24" 779 | } 780 | fn xmlns(&self) -> &str { 781 | "http://www.w3.org/2000/svg" 782 | } 783 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 784 | (user_color, "none", "0") 785 | } 786 | fn stroke_linecap(&self) -> &str { 787 | "butt" 788 | } 789 | fn stroke_linejoin(&self) -> &str { 790 | "miter" 791 | } 792 | fn child_elements(&self) -> Element { 793 | rsx! { 794 | path { 795 | d: "M20,18c1.1,0,2-0.9,2-2V6c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6v10c0,1.1,0.9,2,2,2H0v2h24v-2H20z M4,6h16v10H4V6z", 796 | } 797 | } 798 | } 799 | } 800 | 801 | #[derive(Copy, Clone, Debug, PartialEq)] 802 | pub struct MdLaptopChromebook; 803 | impl IconShape for MdLaptopChromebook { 804 | fn view_box(&self) -> &str { 805 | "0 0 24 24" 806 | } 807 | fn xmlns(&self) -> &str { 808 | "http://www.w3.org/2000/svg" 809 | } 810 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 811 | (user_color, "none", "0") 812 | } 813 | fn stroke_linecap(&self) -> &str { 814 | "butt" 815 | } 816 | fn stroke_linejoin(&self) -> &str { 817 | "miter" 818 | } 819 | fn child_elements(&self) -> Element { 820 | rsx! { 821 | path { 822 | d: "M22 18V3H2v15H0v2h24v-2h-2zm-8 0h-4v-1h4v1zm6-3H4V5h16v10z", 823 | } 824 | } 825 | } 826 | } 827 | 828 | #[derive(Copy, Clone, Debug, PartialEq)] 829 | pub struct MdLaptopMac; 830 | impl IconShape for MdLaptopMac { 831 | fn view_box(&self) -> &str { 832 | "0 0 24 24" 833 | } 834 | fn xmlns(&self) -> &str { 835 | "http://www.w3.org/2000/svg" 836 | } 837 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 838 | (user_color, "none", "0") 839 | } 840 | fn stroke_linecap(&self) -> &str { 841 | "butt" 842 | } 843 | fn stroke_linejoin(&self) -> &str { 844 | "miter" 845 | } 846 | fn child_elements(&self) -> Element { 847 | rsx! { 848 | path { 849 | d: "M20 18c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2H0c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2h-4zM4 5h16v11H4V5zm8 14c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z", 850 | } 851 | } 852 | } 853 | } 854 | 855 | #[derive(Copy, Clone, Debug, PartialEq)] 856 | pub struct MdLaptopWindows; 857 | impl IconShape for MdLaptopWindows { 858 | fn view_box(&self) -> &str { 859 | "0 0 24 24" 860 | } 861 | fn xmlns(&self) -> &str { 862 | "http://www.w3.org/2000/svg" 863 | } 864 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 865 | (user_color, "none", "0") 866 | } 867 | fn stroke_linecap(&self) -> &str { 868 | "butt" 869 | } 870 | fn stroke_linejoin(&self) -> &str { 871 | "miter" 872 | } 873 | fn child_elements(&self) -> Element { 874 | rsx! { 875 | path { 876 | d: "M20 18v-1c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2v1H0v2h24v-2h-4zM4 5h16v10H4V5z", 877 | } 878 | } 879 | } 880 | } 881 | 882 | #[derive(Copy, Clone, Debug, PartialEq)] 883 | pub struct MdMemory; 884 | impl IconShape for MdMemory { 885 | fn view_box(&self) -> &str { 886 | "0 0 24 24" 887 | } 888 | fn xmlns(&self) -> &str { 889 | "http://www.w3.org/2000/svg" 890 | } 891 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 892 | (user_color, "none", "0") 893 | } 894 | fn stroke_linecap(&self) -> &str { 895 | "butt" 896 | } 897 | fn stroke_linejoin(&self) -> &str { 898 | "miter" 899 | } 900 | fn child_elements(&self) -> Element { 901 | rsx! { 902 | path { 903 | d: "M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2zm-4 6H7V7h10v10z", 904 | } 905 | } 906 | } 907 | } 908 | 909 | #[derive(Copy, Clone, Debug, PartialEq)] 910 | pub struct MdMonitor; 911 | impl IconShape for MdMonitor { 912 | fn view_box(&self) -> &str { 913 | "0 0 24 24" 914 | } 915 | fn xmlns(&self) -> &str { 916 | "http://www.w3.org/2000/svg" 917 | } 918 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 919 | (user_color, "none", "0") 920 | } 921 | fn stroke_linecap(&self) -> &str { 922 | "butt" 923 | } 924 | fn stroke_linejoin(&self) -> &str { 925 | "miter" 926 | } 927 | fn child_elements(&self) -> Element { 928 | rsx! {} 929 | } 930 | } 931 | 932 | #[derive(Copy, Clone, Debug, PartialEq)] 933 | pub struct MdMouse; 934 | impl IconShape for MdMouse { 935 | fn view_box(&self) -> &str { 936 | "0 0 24 24" 937 | } 938 | fn xmlns(&self) -> &str { 939 | "http://www.w3.org/2000/svg" 940 | } 941 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 942 | (user_color, "none", "0") 943 | } 944 | fn stroke_linecap(&self) -> &str { 945 | "butt" 946 | } 947 | fn stroke_linejoin(&self) -> &str { 948 | "miter" 949 | } 950 | fn child_elements(&self) -> Element { 951 | rsx! { 952 | path { 953 | d: "M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93zM4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4v4zm7-13.93C7.05 1.56 4 4.92 4 9h7V1.07z", 954 | } 955 | } 956 | } 957 | } 958 | 959 | #[derive(Copy, Clone, Debug, PartialEq)] 960 | pub struct MdPhoneAndroid; 961 | impl IconShape for MdPhoneAndroid { 962 | fn view_box(&self) -> &str { 963 | "0 0 24 24" 964 | } 965 | fn xmlns(&self) -> &str { 966 | "http://www.w3.org/2000/svg" 967 | } 968 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 969 | (user_color, "none", "0") 970 | } 971 | fn stroke_linecap(&self) -> &str { 972 | "butt" 973 | } 974 | fn stroke_linejoin(&self) -> &str { 975 | "miter" 976 | } 977 | fn child_elements(&self) -> Element { 978 | rsx! { 979 | path { 980 | d: "M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm-2 20h-4v-1h4v1zm3.25-3H6.75V4h10.5v14z", 981 | } 982 | } 983 | } 984 | } 985 | 986 | #[derive(Copy, Clone, Debug, PartialEq)] 987 | pub struct MdPhoneIphone; 988 | impl IconShape for MdPhoneIphone { 989 | fn view_box(&self) -> &str { 990 | "0 0 24 24" 991 | } 992 | fn xmlns(&self) -> &str { 993 | "http://www.w3.org/2000/svg" 994 | } 995 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 996 | (user_color, "none", "0") 997 | } 998 | fn stroke_linecap(&self) -> &str { 999 | "butt" 1000 | } 1001 | fn stroke_linejoin(&self) -> &str { 1002 | "miter" 1003 | } 1004 | fn child_elements(&self) -> Element { 1005 | rsx! { 1006 | path { 1007 | d: "M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z", 1008 | } 1009 | } 1010 | } 1011 | } 1012 | 1013 | #[derive(Copy, Clone, Debug, PartialEq)] 1014 | pub struct MdPhonelink; 1015 | impl IconShape for MdPhonelink { 1016 | fn view_box(&self) -> &str { 1017 | "0 0 24 24" 1018 | } 1019 | fn xmlns(&self) -> &str { 1020 | "http://www.w3.org/2000/svg" 1021 | } 1022 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1023 | (user_color, "none", "0") 1024 | } 1025 | fn stroke_linecap(&self) -> &str { 1026 | "butt" 1027 | } 1028 | fn stroke_linejoin(&self) -> &str { 1029 | "miter" 1030 | } 1031 | fn child_elements(&self) -> Element { 1032 | rsx! { 1033 | path { 1034 | d: "M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z", 1035 | } 1036 | } 1037 | } 1038 | } 1039 | 1040 | #[derive(Copy, Clone, Debug, PartialEq)] 1041 | pub struct MdPhonelinkOff; 1042 | impl IconShape for MdPhonelinkOff { 1043 | fn view_box(&self) -> &str { 1044 | "0 0 24 24" 1045 | } 1046 | fn xmlns(&self) -> &str { 1047 | "http://www.w3.org/2000/svg" 1048 | } 1049 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1050 | (user_color, "none", "0") 1051 | } 1052 | fn stroke_linecap(&self) -> &str { 1053 | "butt" 1054 | } 1055 | fn stroke_linejoin(&self) -> &str { 1056 | "miter" 1057 | } 1058 | fn child_elements(&self) -> Element { 1059 | rsx! { 1060 | path { 1061 | d: "M22 6V4H6.82l2 2H22zM1.92 1.65L.65 2.92l1.82 1.82C2.18 5.08 2 5.52 2 6v11H0v3h17.73l2.35 2.35 1.27-1.27L3.89 3.62 1.92 1.65zM4 6.27L14.73 17H4V6.27zM23 8h-6c-.55 0-1 .45-1 1v4.18l2 2V10h4v7h-2.18l3 3H23c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1z", 1062 | } 1063 | } 1064 | } 1065 | } 1066 | 1067 | #[derive(Copy, Clone, Debug, PartialEq)] 1068 | pub struct MdPointOfSale; 1069 | impl IconShape for MdPointOfSale { 1070 | fn view_box(&self) -> &str { 1071 | "0 0 24 24" 1072 | } 1073 | fn xmlns(&self) -> &str { 1074 | "http://www.w3.org/2000/svg" 1075 | } 1076 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1077 | (user_color, "none", "0") 1078 | } 1079 | fn stroke_linecap(&self) -> &str { 1080 | "butt" 1081 | } 1082 | fn stroke_linejoin(&self) -> &str { 1083 | "miter" 1084 | } 1085 | fn child_elements(&self) -> Element { 1086 | rsx! { 1087 | path { 1088 | d: "M17,2H7C5.9,2,5,2.9,5,4v2c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V4C19,2.9,18.1,2,17,2z M17,6H7V4h10V6z M20,22H4 c-1.1,0-2-0.9-2-2v-1h20v1C22,21.1,21.1,22,20,22z M18.53,10.19C18.21,9.47,17.49,9,16.7,9H7.3c-0.79,0-1.51,0.47-1.83,1.19L2,18 h20L18.53,10.19z M9.5,16h-1C8.22,16,8,15.78,8,15.5C8,15.22,8.22,15,8.5,15h1c0.28,0,0.5,0.22,0.5,0.5C10,15.78,9.78,16,9.5,16z M9.5,14h-1C8.22,14,8,13.78,8,13.5C8,13.22,8.22,13,8.5,13h1c0.28,0,0.5,0.22,0.5,0.5C10,13.78,9.78,14,9.5,14z M9.5,12h-1 C8.22,12,8,11.78,8,11.5C8,11.22,8.22,11,8.5,11h1c0.28,0,0.5,0.22,0.5,0.5C10,11.78,9.78,12,9.5,12z M12.5,16h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C13,15.78,12.78,16,12.5,16z M12.5,14h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C13,13.78,12.78,14,12.5,14z M12.5,12h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C13,11.78,12.78,12,12.5,12z M15.5,16h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C16,15.78,15.78,16,15.5,16z M15.5,14h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C16,13.78,15.78,14,15.5,14z M15.5,12h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C16,11.78,15.78,12,15.5,12z", 1089 | } 1090 | } 1091 | } 1092 | } 1093 | 1094 | #[derive(Copy, Clone, Debug, PartialEq)] 1095 | pub struct MdPowerInput; 1096 | impl IconShape for MdPowerInput { 1097 | fn view_box(&self) -> &str { 1098 | "0 0 24 24" 1099 | } 1100 | fn xmlns(&self) -> &str { 1101 | "http://www.w3.org/2000/svg" 1102 | } 1103 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1104 | (user_color, "none", "0") 1105 | } 1106 | fn stroke_linecap(&self) -> &str { 1107 | "butt" 1108 | } 1109 | fn stroke_linejoin(&self) -> &str { 1110 | "miter" 1111 | } 1112 | fn child_elements(&self) -> Element { 1113 | rsx! { 1114 | path { 1115 | d: "M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z", 1116 | } 1117 | } 1118 | } 1119 | } 1120 | 1121 | #[derive(Copy, Clone, Debug, PartialEq)] 1122 | pub struct MdRouter; 1123 | impl IconShape for MdRouter { 1124 | fn view_box(&self) -> &str { 1125 | "0 0 24 24" 1126 | } 1127 | fn xmlns(&self) -> &str { 1128 | "http://www.w3.org/2000/svg" 1129 | } 1130 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1131 | (user_color, "none", "0") 1132 | } 1133 | fn stroke_linecap(&self) -> &str { 1134 | "butt" 1135 | } 1136 | fn stroke_linejoin(&self) -> &str { 1137 | "miter" 1138 | } 1139 | fn child_elements(&self) -> Element { 1140 | rsx! { 1141 | path { 1142 | d: "M20.2 5.9l.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7zm-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1l.8-.8zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM8 18H6v-2h2v2zm3.5 0h-2v-2h2v2zm3.5 0h-2v-2h2v2z", 1143 | } 1144 | } 1145 | } 1146 | } 1147 | 1148 | #[derive(Copy, Clone, Debug, PartialEq)] 1149 | pub struct MdScanner; 1150 | impl IconShape for MdScanner { 1151 | fn view_box(&self) -> &str { 1152 | "0 0 24 24" 1153 | } 1154 | fn xmlns(&self) -> &str { 1155 | "http://www.w3.org/2000/svg" 1156 | } 1157 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1158 | (user_color, "none", "0") 1159 | } 1160 | fn stroke_linecap(&self) -> &str { 1161 | "butt" 1162 | } 1163 | fn stroke_linejoin(&self) -> &str { 1164 | "miter" 1165 | } 1166 | fn child_elements(&self) -> Element { 1167 | rsx! { 1168 | path { 1169 | d: "M19.8 10.7L4.2 5l-.7 1.9L17.6 12H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5.5c0-.8-.5-1.6-1.2-1.8zM7 17H5v-2h2v2zm12 0H9v-2h10v2z", 1170 | } 1171 | } 1172 | } 1173 | } 1174 | 1175 | #[derive(Copy, Clone, Debug, PartialEq)] 1176 | pub struct MdSecurity; 1177 | impl IconShape for MdSecurity { 1178 | fn view_box(&self) -> &str { 1179 | "0 0 24 24" 1180 | } 1181 | fn xmlns(&self) -> &str { 1182 | "http://www.w3.org/2000/svg" 1183 | } 1184 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1185 | (user_color, "none", "0") 1186 | } 1187 | fn stroke_linecap(&self) -> &str { 1188 | "butt" 1189 | } 1190 | fn stroke_linejoin(&self) -> &str { 1191 | "miter" 1192 | } 1193 | fn child_elements(&self) -> Element { 1194 | rsx! { 1195 | path { 1196 | d: "M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z", 1197 | } 1198 | } 1199 | } 1200 | } 1201 | 1202 | #[derive(Copy, Clone, Debug, PartialEq)] 1203 | pub struct MdSimCard; 1204 | impl IconShape for MdSimCard { 1205 | fn view_box(&self) -> &str { 1206 | "0 0 24 24" 1207 | } 1208 | fn xmlns(&self) -> &str { 1209 | "http://www.w3.org/2000/svg" 1210 | } 1211 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1212 | (user_color, "none", "0") 1213 | } 1214 | fn stroke_linecap(&self) -> &str { 1215 | "butt" 1216 | } 1217 | fn stroke_linejoin(&self) -> &str { 1218 | "miter" 1219 | } 1220 | fn child_elements(&self) -> Element { 1221 | rsx! { 1222 | path { 1223 | d: "M19.99 4c0-1.1-.89-2-1.99-2h-8L4 8v12c0 1.1.9 2 2 2h12.01c1.1 0 1.99-.9 1.99-2l-.01-16zM9 19H7v-2h2v2zm8 0h-2v-2h2v2zm-8-4H7v-4h2v4zm4 4h-2v-4h2v4zm0-6h-2v-2h2v2zm4 2h-2v-4h2v4z", 1224 | } 1225 | } 1226 | } 1227 | } 1228 | 1229 | #[derive(Copy, Clone, Debug, PartialEq)] 1230 | pub struct MdSmartphone; 1231 | impl IconShape for MdSmartphone { 1232 | fn view_box(&self) -> &str { 1233 | "0 0 24 24" 1234 | } 1235 | fn xmlns(&self) -> &str { 1236 | "http://www.w3.org/2000/svg" 1237 | } 1238 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1239 | (user_color, "none", "0") 1240 | } 1241 | fn stroke_linecap(&self) -> &str { 1242 | "butt" 1243 | } 1244 | fn stroke_linejoin(&self) -> &str { 1245 | "miter" 1246 | } 1247 | fn child_elements(&self) -> Element { 1248 | rsx! { 1249 | path { 1250 | d: "M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z", 1251 | } 1252 | } 1253 | } 1254 | } 1255 | 1256 | #[derive(Copy, Clone, Debug, PartialEq)] 1257 | pub struct MdSpeaker; 1258 | impl IconShape for MdSpeaker { 1259 | fn view_box(&self) -> &str { 1260 | "0 0 24 24" 1261 | } 1262 | fn xmlns(&self) -> &str { 1263 | "http://www.w3.org/2000/svg" 1264 | } 1265 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1266 | (user_color, "none", "0") 1267 | } 1268 | fn stroke_linecap(&self) -> &str { 1269 | "butt" 1270 | } 1271 | fn stroke_linejoin(&self) -> &str { 1272 | "miter" 1273 | } 1274 | fn child_elements(&self) -> Element { 1275 | rsx! { 1276 | path { 1277 | d: "M17 2H7c-1.1 0-2 .9-2 2v16c0 1.1.9 1.99 2 1.99L17 22c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 2c1.1 0 2 .9 2 2s-.9 2-2 2c-1.11 0-2-.9-2-2s.89-2 2-2zm0 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-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", 1278 | } 1279 | } 1280 | } 1281 | } 1282 | 1283 | #[derive(Copy, Clone, Debug, PartialEq)] 1284 | pub struct MdSpeakerGroup; 1285 | impl IconShape for MdSpeakerGroup { 1286 | fn view_box(&self) -> &str { 1287 | "0 0 24 24" 1288 | } 1289 | fn xmlns(&self) -> &str { 1290 | "http://www.w3.org/2000/svg" 1291 | } 1292 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1293 | (user_color, "none", "0") 1294 | } 1295 | fn stroke_linecap(&self) -> &str { 1296 | "butt" 1297 | } 1298 | fn stroke_linejoin(&self) -> &str { 1299 | "miter" 1300 | } 1301 | fn child_elements(&self) -> Element { 1302 | rsx! { 1303 | path { 1304 | d: "M18.2 1H9.8C8.81 1 8 1.81 8 2.8v14.4c0 .99.81 1.79 1.8 1.79l8.4.01c.99 0 1.8-.81 1.8-1.8V2.8c0-.99-.81-1.8-1.8-1.8zM14 3c1.1 0 2 .89 2 2s-.9 2-2 2-2-.89-2-2 .9-2 2-2zm0 13.5c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z", 1305 | } 1306 | circle { 1307 | cx: "14", 1308 | cy: "12.5", 1309 | r: "2.5", 1310 | } 1311 | path { 1312 | d: "M6 5H4v16c0 1.1.89 2 2 2h10v-2H6V5z", 1313 | } 1314 | } 1315 | } 1316 | } 1317 | 1318 | #[derive(Copy, Clone, Debug, PartialEq)] 1319 | pub struct MdTablet; 1320 | impl IconShape for MdTablet { 1321 | fn view_box(&self) -> &str { 1322 | "0 0 24 24" 1323 | } 1324 | fn xmlns(&self) -> &str { 1325 | "http://www.w3.org/2000/svg" 1326 | } 1327 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1328 | (user_color, "none", "0") 1329 | } 1330 | fn stroke_linecap(&self) -> &str { 1331 | "butt" 1332 | } 1333 | fn stroke_linejoin(&self) -> &str { 1334 | "miter" 1335 | } 1336 | fn child_elements(&self) -> Element { 1337 | rsx! { 1338 | path { 1339 | d: "M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2zm-2 14H5V6h14v12z", 1340 | } 1341 | } 1342 | } 1343 | } 1344 | 1345 | #[derive(Copy, Clone, Debug, PartialEq)] 1346 | pub struct MdTabletAndroid; 1347 | impl IconShape for MdTabletAndroid { 1348 | fn view_box(&self) -> &str { 1349 | "0 0 24 24" 1350 | } 1351 | fn xmlns(&self) -> &str { 1352 | "http://www.w3.org/2000/svg" 1353 | } 1354 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1355 | (user_color, "none", "0") 1356 | } 1357 | fn stroke_linecap(&self) -> &str { 1358 | "butt" 1359 | } 1360 | fn stroke_linejoin(&self) -> &str { 1361 | "miter" 1362 | } 1363 | fn child_elements(&self) -> Element { 1364 | rsx! { 1365 | path { 1366 | d: "M18,0H6C4.34,0,3,1.34,3,3v18c0,1.66,1.34,3,3,3h12c1.66,0,3-1.34,3-3V3C21,1.34,19.66,0,18,0z M14,22h-4v-1h4V22z M19.25,19H4.75V3h14.5V19z", 1367 | } 1368 | } 1369 | } 1370 | } 1371 | 1372 | #[derive(Copy, Clone, Debug, PartialEq)] 1373 | pub struct MdTabletMac; 1374 | impl IconShape for MdTabletMac { 1375 | fn view_box(&self) -> &str { 1376 | "0 0 24 24" 1377 | } 1378 | fn xmlns(&self) -> &str { 1379 | "http://www.w3.org/2000/svg" 1380 | } 1381 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1382 | (user_color, "none", "0") 1383 | } 1384 | fn stroke_linecap(&self) -> &str { 1385 | "butt" 1386 | } 1387 | fn stroke_linejoin(&self) -> &str { 1388 | "miter" 1389 | } 1390 | fn child_elements(&self) -> Element { 1391 | rsx! {} 1392 | } 1393 | } 1394 | 1395 | #[derive(Copy, Clone, Debug, PartialEq)] 1396 | pub struct MdToys; 1397 | impl IconShape for MdToys { 1398 | fn view_box(&self) -> &str { 1399 | "0 0 24 24" 1400 | } 1401 | fn xmlns(&self) -> &str { 1402 | "http://www.w3.org/2000/svg" 1403 | } 1404 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1405 | (user_color, "none", "0") 1406 | } 1407 | fn stroke_linecap(&self) -> &str { 1408 | "butt" 1409 | } 1410 | fn stroke_linejoin(&self) -> &str { 1411 | "miter" 1412 | } 1413 | fn child_elements(&self) -> Element { 1414 | rsx! { 1415 | path { 1416 | d: "M12 12c0-3 2.5-5.5 5.5-5.5S23 9 23 12H12zm0 0c0 3-2.5 5.5-5.5 5.5S1 15 1 12h11zm0 0c-3 0-5.5-2.5-5.5-5.5S9 1 12 1v11zm0 0c3 0 5.5 2.5 5.5 5.5S15 23 12 23V12z", 1417 | } 1418 | } 1419 | } 1420 | } 1421 | 1422 | #[derive(Copy, Clone, Debug, PartialEq)] 1423 | pub struct MdTv; 1424 | impl IconShape for MdTv { 1425 | fn view_box(&self) -> &str { 1426 | "0 0 24 24" 1427 | } 1428 | fn xmlns(&self) -> &str { 1429 | "http://www.w3.org/2000/svg" 1430 | } 1431 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1432 | (user_color, "none", "0") 1433 | } 1434 | fn stroke_linecap(&self) -> &str { 1435 | "butt" 1436 | } 1437 | fn stroke_linejoin(&self) -> &str { 1438 | "miter" 1439 | } 1440 | fn child_elements(&self) -> Element { 1441 | rsx! { 1442 | path { 1443 | d: "M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z", 1444 | } 1445 | } 1446 | } 1447 | } 1448 | 1449 | #[derive(Copy, Clone, Debug, PartialEq)] 1450 | pub struct MdVideogameAsset; 1451 | impl IconShape for MdVideogameAsset { 1452 | fn view_box(&self) -> &str { 1453 | "0 0 24 24" 1454 | } 1455 | fn xmlns(&self) -> &str { 1456 | "http://www.w3.org/2000/svg" 1457 | } 1458 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1459 | (user_color, "none", "0") 1460 | } 1461 | fn stroke_linecap(&self) -> &str { 1462 | "butt" 1463 | } 1464 | fn stroke_linejoin(&self) -> &str { 1465 | "miter" 1466 | } 1467 | fn child_elements(&self) -> Element { 1468 | rsx! { 1469 | path { 1470 | d: "M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-10 7H8v3H6v-3H3v-2h3V8h2v3h3v2zm4.5 2c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4-3c-.83 0-1.5-.67-1.5-1.5S18.67 9 19.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z", 1471 | } 1472 | } 1473 | } 1474 | } 1475 | 1476 | #[derive(Copy, Clone, Debug, PartialEq)] 1477 | pub struct MdWatch; 1478 | impl IconShape for MdWatch { 1479 | fn view_box(&self) -> &str { 1480 | "0 0 24 24" 1481 | } 1482 | fn xmlns(&self) -> &str { 1483 | "http://www.w3.org/2000/svg" 1484 | } 1485 | fn fill_and_stroke<'a>(&self, user_color: &'a str) -> (&'a str, &'a str, &'a str) { 1486 | (user_color, "none", "0") 1487 | } 1488 | fn stroke_linecap(&self) -> &str { 1489 | "butt" 1490 | } 1491 | fn stroke_linejoin(&self) -> &str { 1492 | "miter" 1493 | } 1494 | fn child_elements(&self) -> Element { 1495 | rsx! { 1496 | path { 1497 | d: "M20 12c0-2.54-1.19-4.81-3.04-6.27L16 0H8l-.95 5.73C5.19 7.19 4 9.45 4 12s1.19 4.81 3.05 6.27L8 24h8l.96-5.73C18.81 16.81 20 14.54 20 12zM6 12c0-3.31 2.69-6 6-6s6 2.69 6 6-2.69 6-6 6-6-2.69-6-6z", 1498 | } 1499 | } 1500 | } 1501 | } 1502 | --------------------------------------------------------------------------------