diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index d034812..52104a1 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -6288,6 +6288,12 @@ pub fn IconsM1() -> Element { }, "Moon Star", ), + ( + rsx! { + Motorbike {} + }, + "Motorbike", + ), ( rsx! { Mountain {} @@ -6312,12 +6318,6 @@ pub fn IconsM1() -> Element { }, "Mouse Off", ), - ( - rsx! { - MousePointer {} - }, - "Mouse Pointer", - ), ]; rsx! { for (icon , name) in icons { @@ -6333,6 +6333,12 @@ pub fn IconsM1() -> Element { #[component] pub fn IconsM2() -> Element { let icons = [ + ( + rsx! { + MousePointer {} + }, + "Mouse Pointer", + ), ( rsx! { MousePointer2 {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index 08b9b2e..b0cc6ba 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -1300,6 +1300,7 @@ pub fn IconsM() -> impl IntoView { (view! { }.into_any(), "Monitor X"), (view! { }.into_any(), "Moon"), (view! { }.into_any(), "Moon Star"), + (view! { }.into_any(), "Motorbike"), (view! { }.into_any(), "Mountain"), (view! { }.into_any(), "Mountain Snow"), (view! { }.into_any(), "Mouse"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index 193f908..af211fd 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -1325,6 +1325,7 @@ pub fn IconsM() -> Html { (html! { }, "Monitor X"), (html! { }, "Moon"), (html! { }, "Moon Star"), + (html! { }, "Motorbike"), (html! { }, "Mountain"), (html! { }, "Mountain Snow"), (html! { }, "Mouse"), diff --git a/packages/dioxus/src/building_2.rs b/packages/dioxus/src/building_2.rs index 01f5d4e..7328cfb 100644 --- a/packages/dioxus/src/building_2.rs +++ b/packages/dioxus/src/building_2.rs @@ -34,13 +34,11 @@ pub fn Building2(props: Building2Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" } - path { "d": "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" } - path { "d": "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" } - path { "d": "M10 6h4" } - path { "d": "M10 10h4" } - path { "d": "M10 14h4" } - path { "d": "M10 18h4" } + path { "d": "M10 12h4" } + path { "d": "M10 8h4" } + path { "d": "M14 21v-3a2 2 0 0 0-4 0v3" } + path { "d": "M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2" } + path { "d": "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16" } } } } diff --git a/packages/dioxus/src/combine.rs b/packages/dioxus/src/combine.rs index d827ef9..c62fb70 100644 --- a/packages/dioxus/src/combine.rs +++ b/packages/dioxus/src/combine.rs @@ -34,23 +34,23 @@ pub fn Combine(props: CombineProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M10 18H5a3 3 0 0 1-3-3v-1" } - path { "d": "M14 2a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" } - path { "d": "M20 2a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" } - path { "d": "m7 21 3-3-3-3" } + path { "d": "M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" } + path { "d": "M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" } + path { "d": "m7 15 3 3" } + path { "d": "m7 21 3-3H5a2 2 0 0 1-2-2v-2" } rect { "x": "14", "y": "14", - "width": "8", - "height": "8", - "rx": "2", + "width": "7", + "height": "7", + "rx": "1", } rect { - "x": "2", - "y": "2", - "width": "8", - "height": "8", - "rx": "2", + "x": "3", + "y": "3", + "width": "7", + "height": "7", + "rx": "1", } } } diff --git a/packages/dioxus/src/flame.rs b/packages/dioxus/src/flame.rs index 036b842..623eb94 100644 --- a/packages/dioxus/src/flame.rs +++ b/packages/dioxus/src/flame.rs @@ -34,7 +34,7 @@ pub fn Flame(props: FlameProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z" } + path { "d": "M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4" } } } } diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index 88d81ac..acc2a66 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -2417,6 +2417,8 @@ mod monitor_x; mod moon; #[cfg(any(feature = "accessibility", feature = "weather"))] mod moon_star; +#[cfg(feature = "transportation")] +mod motorbike; #[cfg(any(feature = "nature", feature = "gaming"))] mod mountain; #[cfg(feature = "nature")] @@ -6576,6 +6578,8 @@ pub use monitor_x::*; pub use moon::*; #[cfg(any(feature = "accessibility", feature = "weather"))] pub use moon_star::*; +#[cfg(feature = "transportation")] +pub use motorbike::*; #[cfg(any(feature = "nature", feature = "gaming"))] pub use mountain::*; #[cfg(feature = "nature")] diff --git a/packages/dioxus/src/motorbike.rs b/packages/dioxus/src/motorbike.rs new file mode 100644 index 0000000..7470fcf --- /dev/null +++ b/packages/dioxus/src/motorbike.rs @@ -0,0 +1,44 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct MotorbikeProps { + #[props(default = 24)] + pub size: usize, + #[props(default = "currentColor".to_owned())] + pub color: String, + #[props(default = "none".to_owned())] + pub fill: String, + #[props(default = 2)] + pub stroke_width: usize, + #[props(default = false)] + pub absolute_stroke_width: bool, + pub class: Option, + pub style: Option, +} +#[component] +pub fn Motorbike(props: MotorbikeProps) -> Element { + let stroke_width = if props.absolute_stroke_width { + props.stroke_width * 24 / props.size + } else { + props.stroke_width + }; + rsx! { + svg { + "xmlns": "http://www.w3.org/2000/svg", + "class": if let Some(class) = props.class { "{class}" }, + "style": if let Some(style) = props.style { "{style}" }, + "width": "{props.size}", + "height": "{props.size}", + "viewBox": "0 0 24 24", + "fill": "{props.fill}", + "stroke": "{props.color}", + "stroke-width": "{stroke_width}", + "stroke-linecap": "round", + "stroke-linejoin": "round", + path { "d": "m18 14-1-3" } + path { "d": "m3 9 6 2a2 2 0 0 1 2-2h2a2 2 0 0 1 1.99 1.81" } + path { "d": "M8 17h3a1 1 0 0 0 1-1 6 6 0 0 1 6-6 1 1 0 0 0 1-1v-.75A5 5 0 0 0 17 5" } + circle { "cx": "19", "cy": "17", "r": "3" } + circle { "cx": "5", "cy": "17", "r": "3" } + } + } +} diff --git a/packages/dioxus/src/replace.rs b/packages/dioxus/src/replace.rs index b6c2d52..83ed740 100644 --- a/packages/dioxus/src/replace.rs +++ b/packages/dioxus/src/replace.rs @@ -34,18 +34,18 @@ pub fn Replace(props: ReplaceProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M14 4a2 2 0 0 1 2-2" } - path { "d": "M16 10a2 2 0 0 1-2-2" } - path { "d": "M20 2a2 2 0 0 1 2 2" } - path { "d": "M22 8a2 2 0 0 1-2 2" } + path { "d": "M14 4a1 1 0 0 1 1-1" } + path { "d": "M15 10a1 1 0 0 1-1-1" } + path { "d": "M21 4a1 1 0 0 0-1-1" } + path { "d": "M21 9a1 1 0 0 1-1 1" } path { "d": "m3 7 3 3 3-3" } - path { "d": "M6 10V5a3 3 0 0 1 3-3h1" } + path { "d": "M6 10V5a2 2 0 0 1 2-2h2" } rect { - "x": "2", + "x": "3", "y": "14", - "width": "8", - "height": "8", - "rx": "2", + "width": "7", + "height": "7", + "rx": "1", } } } diff --git a/packages/dioxus/src/replace_all.rs b/packages/dioxus/src/replace_all.rs index 70a95c6..efc01e1 100644 --- a/packages/dioxus/src/replace_all.rs +++ b/packages/dioxus/src/replace_all.rs @@ -34,20 +34,20 @@ pub fn ReplaceAll(props: ReplaceAllProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M14 14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" } - path { "d": "M14 4a2 2 0 0 1 2-2" } - path { "d": "M16 10a2 2 0 0 1-2-2" } - path { "d": "M20 14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" } - path { "d": "M20 2a2 2 0 0 1 2 2" } - path { "d": "M22 8a2 2 0 0 1-2 2" } + path { "d": "M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" } + path { "d": "M14 4a1 1 0 0 1 1-1" } + path { "d": "M15 10a1 1 0 0 1-1-1" } + path { "d": "M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" } + path { "d": "M21 4a1 1 0 0 0-1-1" } + path { "d": "M21 9a1 1 0 0 1-1 1" } path { "d": "m3 7 3 3 3-3" } - path { "d": "M6 10V5a 3 3 0 0 1 3-3h1" } + path { "d": "M6 10V5a2 2 0 0 1 2-2h2" } rect { - "x": "2", + "x": "3", "y": "14", - "width": "8", - "height": "8", - "rx": "2", + "width": "7", + "height": "7", + "rx": "1", } } } diff --git a/packages/dioxus/src/square_m.rs b/packages/dioxus/src/square_m.rs index d5b6d8c..23f49ce 100644 --- a/packages/dioxus/src/square_m.rs +++ b/packages/dioxus/src/square_m.rs @@ -34,14 +34,14 @@ pub fn SquareM(props: SquareMProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M8 16V8.5a.5.5 0 0 1 .9-.3l2.7 3.599a.5.5 0 0 0 .8 0l2.7-3.6a.5.5 0 0 1 .9.3V16" } rect { - "width": "18", - "height": "18", "x": "3", "y": "3", + "width": "18", + "height": "18", "rx": "2", } - path { "d": "M8 16V8l4 4 4-4v8" } } } } diff --git a/packages/leptos/src/building_2.rs b/packages/leptos/src/building_2.rs index dd89458..00a2ab4 100644 --- a/packages/leptos/src/building_2.rs +++ b/packages/leptos/src/building_2.rs @@ -29,13 +29,11 @@ pub fn Building2( stroke-linecap="round" stroke-linejoin="round" > - - - - - - - + + + + + } } diff --git a/packages/leptos/src/combine.rs b/packages/leptos/src/combine.rs index c8fe6c9..fcaf75c 100644 --- a/packages/leptos/src/combine.rs +++ b/packages/leptos/src/combine.rs @@ -29,12 +29,12 @@ pub fn Combine( stroke-linecap="round" stroke-linejoin="round" > - - - - - - + + + + + + } } diff --git a/packages/leptos/src/flame.rs b/packages/leptos/src/flame.rs index ef8ff89..a90fb84 100644 --- a/packages/leptos/src/flame.rs +++ b/packages/leptos/src/flame.rs @@ -29,7 +29,7 @@ pub fn Flame( stroke-linecap="round" stroke-linejoin="round" > - + } } diff --git a/packages/leptos/src/lib.rs b/packages/leptos/src/lib.rs index 1b10ade..397e96e 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -2417,6 +2417,8 @@ mod monitor_x; mod moon; #[cfg(any(feature = "accessibility", feature = "weather"))] mod moon_star; +#[cfg(feature = "transportation")] +mod motorbike; #[cfg(any(feature = "nature", feature = "gaming"))] mod mountain; #[cfg(feature = "nature")] @@ -6576,6 +6578,8 @@ pub use monitor_x::*; pub use moon::*; #[cfg(any(feature = "accessibility", feature = "weather"))] pub use moon_star::*; +#[cfg(feature = "transportation")] +pub use motorbike::*; #[cfg(any(feature = "nature", feature = "gaming"))] pub use mountain::*; #[cfg(feature = "nature")] diff --git a/packages/leptos/src/motorbike.rs b/packages/leptos/src/motorbike.rs new file mode 100644 index 0000000..82c6ff2 --- /dev/null +++ b/packages/leptos/src/motorbike.rs @@ -0,0 +1,39 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn Motorbike( + #[prop(default = 24.into(), into)] size: Signal, + #[prop(default = "currentColor".into(), into)] color: Signal, + #[prop(default = "none".into(), into)] fill: Signal, + #[prop(default = 2.into(), into)] stroke_width: Signal, + #[prop(default = false.into(), into)] absolute_stroke_width: Signal, + #[prop(optional)] node_ref: NodeRef, +) -> impl IntoView { + let stroke_width = Signal::derive(move || { + if absolute_stroke_width.get() { + stroke_width.get() * 24 / size.get() + } else { + stroke_width.get() + } + }); + view! { + + + + + + + + } +} diff --git a/packages/leptos/src/replace.rs b/packages/leptos/src/replace.rs index e514d6c..a0a9025 100644 --- a/packages/leptos/src/replace.rs +++ b/packages/leptos/src/replace.rs @@ -29,13 +29,13 @@ pub fn Replace( stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + - - + + } } diff --git a/packages/leptos/src/replace_all.rs b/packages/leptos/src/replace_all.rs index e4e9c94..919427b 100644 --- a/packages/leptos/src/replace_all.rs +++ b/packages/leptos/src/replace_all.rs @@ -29,15 +29,15 @@ pub fn ReplaceAll( stroke-linecap="round" stroke-linejoin="round" > - - - - - - + + + + + + - - + + } } diff --git a/packages/leptos/src/square_m.rs b/packages/leptos/src/square_m.rs index 12e01fe..7e706f2 100644 --- a/packages/leptos/src/square_m.rs +++ b/packages/leptos/src/square_m.rs @@ -29,8 +29,8 @@ pub fn SquareM( stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/packages/yew/src/building_2.rs b/packages/yew/src/building_2.rs index 622dd81..4c2b5a1 100644 --- a/packages/yew/src/building_2.rs +++ b/packages/yew/src/building_2.rs @@ -41,13 +41,11 @@ pub fn Building2(props: &Building2Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - - - - - + + + + + } } diff --git a/packages/yew/src/combine.rs b/packages/yew/src/combine.rs index 1f591b3..5ebba0e 100644 --- a/packages/yew/src/combine.rs +++ b/packages/yew/src/combine.rs @@ -41,12 +41,12 @@ pub fn Combine(props: &CombineProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - - - - + + + + + + } } diff --git a/packages/yew/src/flame.rs b/packages/yew/src/flame.rs index 8b1404c..0ef5d81 100644 --- a/packages/yew/src/flame.rs +++ b/packages/yew/src/flame.rs @@ -42,7 +42,7 @@ pub fn Flame(props: &FlameProps) -> Html { stroke-linejoin="round" > } diff --git a/packages/yew/src/lib.rs b/packages/yew/src/lib.rs index 144810e..2e5ccbe 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -2419,6 +2419,8 @@ mod monitor_x; mod moon; #[cfg(any(feature = "accessibility", feature = "weather"))] mod moon_star; +#[cfg(feature = "transportation")] +mod motorbike; #[cfg(any(feature = "nature", feature = "gaming"))] mod mountain; #[cfg(feature = "nature")] @@ -6578,6 +6580,8 @@ pub use monitor_x::*; pub use moon::*; #[cfg(any(feature = "accessibility", feature = "weather"))] pub use moon_star::*; +#[cfg(feature = "transportation")] +pub use motorbike::*; #[cfg(any(feature = "nature", feature = "gaming"))] pub use mountain::*; #[cfg(feature = "nature")] diff --git a/packages/yew/src/motorbike.rs b/packages/yew/src/motorbike.rs new file mode 100644 index 0000000..9309c70 --- /dev/null +++ b/packages/yew/src/motorbike.rs @@ -0,0 +1,51 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct MotorbikeProps { + #[prop_or(24)] + pub size: usize, + #[prop_or(AttrValue::from("currentColor"))] + pub color: AttrValue, + #[prop_or(AttrValue::from("none"))] + pub fill: AttrValue, + #[prop_or(2)] + pub stroke_width: usize, + #[prop_or(false)] + pub absolute_stroke_width: bool, + #[prop_or_default] + pub class: Classes, + #[prop_or_default] + pub style: std::option::Option, + #[prop_or_default] + pub node_ref: NodeRef, +} +#[function_component] +pub fn Motorbike(props: &MotorbikeProps) -> Html { + let stroke_width = if props.absolute_stroke_width { + props.stroke_width * 24 / props.size + } else { + props.stroke_width + }; + html! { + + + + + + + + } +} diff --git a/packages/yew/src/replace.rs b/packages/yew/src/replace.rs index d29ed49..e33a756 100644 --- a/packages/yew/src/replace.rs +++ b/packages/yew/src/replace.rs @@ -41,13 +41,13 @@ pub fn Replace(props: &ReplaceProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + - - + + } } diff --git a/packages/yew/src/replace_all.rs b/packages/yew/src/replace_all.rs index 249164e..577bd3a 100644 --- a/packages/yew/src/replace_all.rs +++ b/packages/yew/src/replace_all.rs @@ -41,15 +41,15 @@ pub fn ReplaceAll(props: &ReplaceAllProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - - - - + + + + + + - - + + } } diff --git a/packages/yew/src/square_m.rs b/packages/yew/src/square_m.rs index 9f49442..1f1d1cc 100644 --- a/packages/yew/src/square_m.rs +++ b/packages/yew/src/square_m.rs @@ -41,8 +41,10 @@ pub fn SquareM(props: &SquareMProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/scripts/src/lib.rs b/scripts/src/lib.rs index a4f9171..c2ffabe 100644 --- a/scripts/src/lib.rs +++ b/scripts/src/lib.rs @@ -11,5 +11,5 @@ pub const GITHUB_OWNER: &str = "RustForWeb"; pub const GITHUB_REPO: &str = "lucide"; pub const UPSTREAM_GIT_URL: &str = "https://github.com/lucide-icons/lucide.git"; -pub const UPSTREAM_GIT_REF: &str = "0.544.0"; +pub const UPSTREAM_GIT_REF: &str = "0.545.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";