From a6a5028c22aa10a278623bceaa8a2fec0594f7dd Mon Sep 17 00:00:00 2001 From: "rust-for-web[bot]" <191031261+rust-for-web[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 18:48:44 +0200 Subject: [PATCH] feat: update to upstream v0.540.0 (#140) Co-authored-by: rust-for-web[bot] <191031261+rust-for-web[bot]@users.noreply.github.com> --- book-examples/dioxus/src/icons.rs | 6 ++++ book-examples/leptos/src/icons.rs | 1 + book-examples/yew/src/icons.rs | 1 + packages/dioxus/src/camera.rs | 2 +- packages/dioxus/src/camera_off.rs | 13 +++---- packages/dioxus/src/lib.rs | 16 +++++++++ packages/dioxus/src/rose.rs | 44 ++++++++++++++++++++++++ packages/dioxus/src/umbrella.rs | 6 ++-- packages/dioxus/src/umbrella_off.rs | 7 ++-- packages/leptos/src/camera.rs | 2 +- packages/leptos/src/camera_off.rs | 8 ++--- packages/leptos/src/lib.rs | 16 +++++++++ packages/leptos/src/rose.rs | 39 +++++++++++++++++++++ packages/leptos/src/umbrella.rs | 6 ++-- packages/leptos/src/umbrella_off.rs | 7 ++-- packages/yew/src/camera.rs | 2 +- packages/yew/src/camera_off.rs | 10 +++--- packages/yew/src/lib.rs | 16 +++++++++ packages/yew/src/rose.rs | 53 +++++++++++++++++++++++++++++ packages/yew/src/umbrella.rs | 6 ++-- packages/yew/src/umbrella_off.rs | 7 ++-- scripts/src/lib.rs | 2 +- 22 files changed, 231 insertions(+), 39 deletions(-) create mode 100644 packages/dioxus/src/rose.rs create mode 100644 packages/leptos/src/rose.rs create mode 100644 packages/yew/src/rose.rs diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index 2c6529d..50d7a74 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -7595,6 +7595,12 @@ pub fn IconsR1() -> Element { }, "Roller Coaster", ), + ( + rsx! { + Rose {} + }, + "Rose", + ), ( rsx! { Rotate3D {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index ff3d11b..c8a9570 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -1588,6 +1588,7 @@ pub fn IconsR() -> impl IntoView { (view! { }.into_any(), "Rocket"), (view! { }.into_any(), "Rocking Chair"), (view! { }.into_any(), "Roller Coaster"), + (view! { }.into_any(), "Rose"), (view! { }.into_any(), "Rotate 3 D"), (view! { }.into_any(), "Rotate Ccw"), (view! { }.into_any(), "Rotate Ccw Key"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index b6321b1..47a4c27 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -1608,6 +1608,7 @@ pub fn IconsR() -> Html { (html! { }, "Rocket"), (html! { }, "Rocking Chair"), (html! { }, "Roller Coaster"), + (html! { }, "Rose"), (html! { }, "Rotate 3 D"), (html! { }, "Rotate Ccw"), (html! { }, "Rotate Ccw Key"), diff --git a/packages/dioxus/src/camera.rs b/packages/dioxus/src/camera.rs index ac3651c..aa65fc3 100644 --- a/packages/dioxus/src/camera.rs +++ b/packages/dioxus/src/camera.rs @@ -34,7 +34,7 @@ pub fn Camera(props: CameraProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z" } + path { "d": "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" } circle { "cx": "12", "cy": "13", "r": "3" } } } diff --git a/packages/dioxus/src/camera_off.rs b/packages/dioxus/src/camera_off.rs index f01af7e..1277dcc 100644 --- a/packages/dioxus/src/camera_off.rs +++ b/packages/dioxus/src/camera_off.rs @@ -34,15 +34,10 @@ pub fn CameraOff(props: CameraOffProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - line { - "x1": "2", - "x2": "22", - "y1": "2", - "y2": "22", - } - path { "d": "M7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16" } - path { "d": "M9.5 4h5L17 7h3a2 2 0 0 1 2 2v7.5" } - path { "d": "M14.121 15.121A3 3 0 1 1 9.88 10.88" } + path { "d": "M14.564 14.558a3 3 0 1 1-4.122-4.121" } + path { "d": "m2 2 20 20" } + path { "d": "M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175" } + path { "d": "M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344" } } } } diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index f2ed3f8..f63d8bc 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -2944,6 +2944,14 @@ mod rocket; mod rocking_chair; #[cfg(feature = "navigation")] mod roller_coaster; +#[cfg(any( + feature = "nature", + feature = "seasons", + feature = "sustainability", + feature = "home", + feature = "social" +))] +mod rose; #[cfg(feature = "design")] mod rotate_3_d; #[cfg(any(feature = "arrows", feature = "design", feature = "photography"))] @@ -7085,6 +7093,14 @@ pub use rocket::*; pub use rocking_chair::*; #[cfg(feature = "navigation")] pub use roller_coaster::*; +#[cfg(any( + feature = "nature", + feature = "seasons", + feature = "sustainability", + feature = "home", + feature = "social" +))] +pub use rose::*; #[cfg(feature = "design")] pub use rotate_3_d::*; #[cfg(any(feature = "arrows", feature = "design", feature = "photography"))] diff --git a/packages/dioxus/src/rose.rs b/packages/dioxus/src/rose.rs new file mode 100644 index 0000000..4d9ca81 --- /dev/null +++ b/packages/dioxus/src/rose.rs @@ -0,0 +1,44 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct RoseProps { + #[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 Rose(props: RoseProps) -> 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": "M17 10h-1a4 4 0 1 1 4-4v.534" } + path { "d": "M17 6h1a4 4 0 0 1 1.42 7.74l-2.29.87a6 6 0 0 1-5.339-10.68l2.069-1.31" } + path { "d": "M4.5 17c2.8-.5 4.4 0 5.5.8s1.8 2.2 2.3 3.7c-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2" } + path { "d": "M9.77 12C4 15 2 22 2 22" } + circle { "cx": "17", "cy": "8", "r": "2" } + } + } +} diff --git a/packages/dioxus/src/umbrella.rs b/packages/dioxus/src/umbrella.rs index 52b1120..d56e499 100644 --- a/packages/dioxus/src/umbrella.rs +++ b/packages/dioxus/src/umbrella.rs @@ -34,9 +34,9 @@ pub fn Umbrella(props: UmbrellaProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M22 12a10.06 10.06 1 0 0-20 0Z" } - path { "d": "M12 12v8a2 2 0 0 0 4 0" } - path { "d": "M12 2v1" } + path { "d": "M12 13v7a2 2 0 0 0 4 0" } + path { "d": "M12 2v2" } + path { "d": "M20.992 13a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-19.923 0A1 1 0 0 0 3 13z" } } } } diff --git a/packages/dioxus/src/umbrella_off.rs b/packages/dioxus/src/umbrella_off.rs index fbc48b0..de6c941 100644 --- a/packages/dioxus/src/umbrella_off.rs +++ b/packages/dioxus/src/umbrella_off.rs @@ -34,10 +34,11 @@ pub fn UmbrellaOff(props: UmbrellaOffProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M12 2v1" } - path { "d": "M15.5 21a1.85 1.85 0 0 1-3.5-1v-8H2a10 10 0 0 1 3.428-6.575" } - path { "d": "M17.5 12H22A10 10 0 0 0 9.004 3.455" } + path { "d": "M12 13v7a2 2 0 0 0 4 0" } + path { "d": "M12 2v2" } + path { "d": "M18.656 13h2.336a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-12.07-7.51" } path { "d": "m2 2 20 20" } + path { "d": "M5.961 5.957a10.28 10.28 0 0 0-3.922 5.769A1 1 0 0 0 3 13h10" } } } } diff --git a/packages/leptos/src/camera.rs b/packages/leptos/src/camera.rs index 76ec471..23d62f1 100644 --- a/packages/leptos/src/camera.rs +++ b/packages/leptos/src/camera.rs @@ -29,7 +29,7 @@ pub fn Camera( stroke-linecap="round" stroke-linejoin="round" > - + } diff --git a/packages/leptos/src/camera_off.rs b/packages/leptos/src/camera_off.rs index f4dd4c1..ef1aad9 100644 --- a/packages/leptos/src/camera_off.rs +++ b/packages/leptos/src/camera_off.rs @@ -29,10 +29,10 @@ pub fn CameraOff( stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + } } diff --git a/packages/leptos/src/lib.rs b/packages/leptos/src/lib.rs index fd51799..6a3fdb8 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -2944,6 +2944,14 @@ mod rocket; mod rocking_chair; #[cfg(feature = "navigation")] mod roller_coaster; +#[cfg(any( + feature = "nature", + feature = "seasons", + feature = "sustainability", + feature = "home", + feature = "social" +))] +mod rose; #[cfg(feature = "design")] mod rotate_3_d; #[cfg(any(feature = "arrows", feature = "design", feature = "photography"))] @@ -7085,6 +7093,14 @@ pub use rocket::*; pub use rocking_chair::*; #[cfg(feature = "navigation")] pub use roller_coaster::*; +#[cfg(any( + feature = "nature", + feature = "seasons", + feature = "sustainability", + feature = "home", + feature = "social" +))] +pub use rose::*; #[cfg(feature = "design")] pub use rotate_3_d::*; #[cfg(any(feature = "arrows", feature = "design", feature = "photography"))] diff --git a/packages/leptos/src/rose.rs b/packages/leptos/src/rose.rs new file mode 100644 index 0000000..3c10863 --- /dev/null +++ b/packages/leptos/src/rose.rs @@ -0,0 +1,39 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn Rose( + #[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/umbrella.rs b/packages/leptos/src/umbrella.rs index f801b7d..dc56a3b 100644 --- a/packages/leptos/src/umbrella.rs +++ b/packages/leptos/src/umbrella.rs @@ -29,9 +29,9 @@ pub fn Umbrella( stroke-linecap="round" stroke-linejoin="round" > - - - + + + } } diff --git a/packages/leptos/src/umbrella_off.rs b/packages/leptos/src/umbrella_off.rs index 9562680..340c9c4 100644 --- a/packages/leptos/src/umbrella_off.rs +++ b/packages/leptos/src/umbrella_off.rs @@ -29,10 +29,11 @@ pub fn UmbrellaOff( stroke-linecap="round" stroke-linejoin="round" > - - - + + + + } } diff --git a/packages/yew/src/camera.rs b/packages/yew/src/camera.rs index 5eff427..1186c4c 100644 --- a/packages/yew/src/camera.rs +++ b/packages/yew/src/camera.rs @@ -42,7 +42,7 @@ pub fn Camera(props: &CameraProps) -> Html { stroke-linejoin="round" > diff --git a/packages/yew/src/camera_off.rs b/packages/yew/src/camera_off.rs index 1ede0e2..19f514e 100644 --- a/packages/yew/src/camera_off.rs +++ b/packages/yew/src/camera_off.rs @@ -41,10 +41,12 @@ pub fn CameraOff(props: &CameraOffProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + } } diff --git a/packages/yew/src/lib.rs b/packages/yew/src/lib.rs index 849dee4..94a0ba3 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -2946,6 +2946,14 @@ mod rocket; mod rocking_chair; #[cfg(feature = "navigation")] mod roller_coaster; +#[cfg(any( + feature = "nature", + feature = "seasons", + feature = "sustainability", + feature = "home", + feature = "social" +))] +mod rose; #[cfg(feature = "design")] mod rotate_3_d; #[cfg(any(feature = "arrows", feature = "design", feature = "photography"))] @@ -7087,6 +7095,14 @@ pub use rocket::*; pub use rocking_chair::*; #[cfg(feature = "navigation")] pub use roller_coaster::*; +#[cfg(any( + feature = "nature", + feature = "seasons", + feature = "sustainability", + feature = "home", + feature = "social" +))] +pub use rose::*; #[cfg(feature = "design")] pub use rotate_3_d::*; #[cfg(any(feature = "arrows", feature = "design", feature = "photography"))] diff --git a/packages/yew/src/rose.rs b/packages/yew/src/rose.rs new file mode 100644 index 0000000..455521c --- /dev/null +++ b/packages/yew/src/rose.rs @@ -0,0 +1,53 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct RoseProps { + #[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 Rose(props: &RoseProps) -> 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/umbrella.rs b/packages/yew/src/umbrella.rs index 6092381..bba27b8 100644 --- a/packages/yew/src/umbrella.rs +++ b/packages/yew/src/umbrella.rs @@ -41,9 +41,9 @@ pub fn Umbrella(props: &UmbrellaProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - + + + } } diff --git a/packages/yew/src/umbrella_off.rs b/packages/yew/src/umbrella_off.rs index 6bbb325..8ceeeec 100644 --- a/packages/yew/src/umbrella_off.rs +++ b/packages/yew/src/umbrella_off.rs @@ -41,10 +41,11 @@ pub fn UmbrellaOff(props: &UmbrellaOffProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - + + + + } } diff --git a/scripts/src/lib.rs b/scripts/src/lib.rs index 3a674e3..b2d16ea 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.539.0"; +pub const UPSTREAM_GIT_REF: &str = "0.540.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";