From 65098ce1e1c4ac2d28db13c5feb840eb89df442a Mon Sep 17 00:00:00 2001 From: "rust-for-web[bot]" <191031261+rust-for-web[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 11:49:05 +0200 Subject: [PATCH] feat: update to upstream v0.527.0 (#119) Co-authored-by: rust-for-web[bot] <191031261+rust-for-web[bot]@users.noreply.github.com> --- book-examples/dioxus/src/icons.rs | 18 ++++++---- book-examples/leptos/src/icons.rs | 1 + book-examples/yew/src/icons.rs | 1 + packages/dioxus/src/lib.rs | 14 ++++++++ packages/dioxus/src/monitor_dot.rs | 4 +-- packages/dioxus/src/spotlight.rs | 44 +++++++++++++++++++++++++ packages/leptos/src/lib.rs | 14 ++++++++ packages/leptos/src/monitor_dot.rs | 4 +-- packages/leptos/src/spotlight.rs | 39 ++++++++++++++++++++++ packages/yew/src/lib.rs | 14 ++++++++ packages/yew/src/monitor_dot.rs | 4 +-- packages/yew/src/spotlight.rs | 53 ++++++++++++++++++++++++++++++ scripts/src/lib.rs | 2 +- 13 files changed, 199 insertions(+), 13 deletions(-) create mode 100644 packages/dioxus/src/spotlight.rs create mode 100644 packages/leptos/src/spotlight.rs create mode 100644 packages/yew/src/spotlight.rs diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index 9b6fbe5..15c2e83 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -8357,6 +8357,12 @@ pub fn IconsS2() -> Element { }, "Spool", ), + ( + rsx! { + Spotlight {} + }, + "Spotlight", + ), ( rsx! { SprayCan {} @@ -8861,12 +8867,6 @@ pub fn IconsS2() -> Element { }, "Strikethrough", ), - ( - rsx! { - Subscript {} - }, - "Subscript", - ), ]; rsx! { for (icon , name) in icons { @@ -8882,6 +8882,12 @@ pub fn IconsS2() -> Element { #[component] pub fn IconsS3() -> Element { let icons = [ + ( + rsx! { + Subscript {} + }, + "Subscript", + ), ( rsx! { Sun {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index df36d30..cd748b4 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -1727,6 +1727,7 @@ pub fn IconsS() -> impl IntoView { (view! { }.into_any(), "Spline Pointer"), (view! { }.into_any(), "Split"), (view! { }.into_any(), "Spool"), + (view! { }.into_any(), "Spotlight"), (view! { }.into_any(), "Spray Can"), (view! { }.into_any(), "Sprout"), (view! { }.into_any(), "Square"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index ba17942..b400a98 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -1746,6 +1746,7 @@ pub fn IconsS() -> Html { (html! { }, "Spline Pointer"), (html! { }, "Split"), (html! { }, "Spool"), + (html! { }, "Spotlight"), (html! { }, "Spray Can"), (html! { }, "Sprout"), (html! { }, "Square"), diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index da27b44..1d5215e 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -3331,6 +3331,13 @@ mod spline_pointer; mod split; #[cfg(any(feature = "communication", feature = "tools", feature = "social"))] mod spool; +#[cfg(any( + feature = "devices", + feature = "photography", + feature = "multimedia", + feature = "communication" +))] +mod spotlight; #[cfg(any(feature = "design", feature = "tools"))] mod spray_can; #[cfg(any(feature = "nature", feature = "gaming", feature = "sustainability"))] @@ -7432,6 +7439,13 @@ pub use spline_pointer::*; pub use split::*; #[cfg(any(feature = "communication", feature = "tools", feature = "social"))] pub use spool::*; +#[cfg(any( + feature = "devices", + feature = "photography", + feature = "multimedia", + feature = "communication" +))] +pub use spotlight::*; #[cfg(any(feature = "design", feature = "tools"))] pub use spray_can::*; #[cfg(any(feature = "nature", feature = "gaming", feature = "sustainability"))] diff --git a/packages/dioxus/src/monitor_dot.rs b/packages/dioxus/src/monitor_dot.rs index fcc7baa..9e26941 100644 --- a/packages/dioxus/src/monitor_dot.rs +++ b/packages/dioxus/src/monitor_dot.rs @@ -34,10 +34,10 @@ pub fn MonitorDot(props: MonitorDotProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - circle { "cx": "19", "cy": "6", "r": "3" } - path { "d": "M22 12v3a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h9" } path { "d": "M12 17v4" } + path { "d": "M22 12.307V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.693" } path { "d": "M8 21h8" } + circle { "cx": "19", "cy": "6", "r": "3" } } } } diff --git a/packages/dioxus/src/spotlight.rs b/packages/dioxus/src/spotlight.rs new file mode 100644 index 0000000..28b80f8 --- /dev/null +++ b/packages/dioxus/src/spotlight.rs @@ -0,0 +1,44 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct SpotlightProps { + #[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 Spotlight(props: SpotlightProps) -> 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": "M15.295 19.562 16 22" } + path { "d": "m17 16 3.758 2.098" } + path { "d": "m19 12.5 3.026-.598" } + path { "d": "M7.61 6.3a3 3 0 0 0-3.92 1.3l-1.38 2.79a3 3 0 0 0 1.3 3.91l6.89 3.597a1 1 0 0 0 1.342-.447l3.106-6.211a1 1 0 0 0-.447-1.341z" } + path { "d": "M8 9V2" } + } + } +} diff --git a/packages/leptos/src/lib.rs b/packages/leptos/src/lib.rs index 8ef4f4b..c88a2de 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -3331,6 +3331,13 @@ mod spline_pointer; mod split; #[cfg(any(feature = "communication", feature = "tools", feature = "social"))] mod spool; +#[cfg(any( + feature = "devices", + feature = "photography", + feature = "multimedia", + feature = "communication" +))] +mod spotlight; #[cfg(any(feature = "design", feature = "tools"))] mod spray_can; #[cfg(any(feature = "nature", feature = "gaming", feature = "sustainability"))] @@ -7432,6 +7439,13 @@ pub use spline_pointer::*; pub use split::*; #[cfg(any(feature = "communication", feature = "tools", feature = "social"))] pub use spool::*; +#[cfg(any( + feature = "devices", + feature = "photography", + feature = "multimedia", + feature = "communication" +))] +pub use spotlight::*; #[cfg(any(feature = "design", feature = "tools"))] pub use spray_can::*; #[cfg(any(feature = "nature", feature = "gaming", feature = "sustainability"))] diff --git a/packages/leptos/src/monitor_dot.rs b/packages/leptos/src/monitor_dot.rs index d4fd8c6..4c92452 100644 --- a/packages/leptos/src/monitor_dot.rs +++ b/packages/leptos/src/monitor_dot.rs @@ -29,10 +29,10 @@ pub fn MonitorDot( stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/packages/leptos/src/spotlight.rs b/packages/leptos/src/spotlight.rs new file mode 100644 index 0000000..778b82f --- /dev/null +++ b/packages/leptos/src/spotlight.rs @@ -0,0 +1,39 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn Spotlight( + #[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/yew/src/lib.rs b/packages/yew/src/lib.rs index dbf2735..cc1fa75 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -3333,6 +3333,13 @@ mod spline_pointer; mod split; #[cfg(any(feature = "communication", feature = "tools", feature = "social"))] mod spool; +#[cfg(any( + feature = "devices", + feature = "photography", + feature = "multimedia", + feature = "communication" +))] +mod spotlight; #[cfg(any(feature = "design", feature = "tools"))] mod spray_can; #[cfg(any(feature = "nature", feature = "gaming", feature = "sustainability"))] @@ -7434,6 +7441,13 @@ pub use spline_pointer::*; pub use split::*; #[cfg(any(feature = "communication", feature = "tools", feature = "social"))] pub use spool::*; +#[cfg(any( + feature = "devices", + feature = "photography", + feature = "multimedia", + feature = "communication" +))] +pub use spotlight::*; #[cfg(any(feature = "design", feature = "tools"))] pub use spray_can::*; #[cfg(any(feature = "nature", feature = "gaming", feature = "sustainability"))] diff --git a/packages/yew/src/monitor_dot.rs b/packages/yew/src/monitor_dot.rs index f7591f0..50fd374 100644 --- a/packages/yew/src/monitor_dot.rs +++ b/packages/yew/src/monitor_dot.rs @@ -41,10 +41,10 @@ pub fn MonitorDot(props: &MonitorDotProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/packages/yew/src/spotlight.rs b/packages/yew/src/spotlight.rs new file mode 100644 index 0000000..2e87305 --- /dev/null +++ b/packages/yew/src/spotlight.rs @@ -0,0 +1,53 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct SpotlightProps { + #[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 Spotlight(props: &SpotlightProps) -> Html { + let stroke_width = if props.absolute_stroke_width { + props.stroke_width * 24 / props.size + } else { + props.stroke_width + }; + html! { + + + + + + + + } +} diff --git a/scripts/src/lib.rs b/scripts/src/lib.rs index f36fb38..ebbda5e 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.526.0"; +pub const UPSTREAM_GIT_REF: &str = "0.527.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";