From 925aeedfc027cf7b0b36d60ab2c7e4efd8b73c33 Mon Sep 17 00:00:00 2001 From: "rust-for-web[bot]" <191031261+rust-for-web[bot]@users.noreply.github.com> Date: Thu, 11 Sep 2025 21:08:39 +0200 Subject: [PATCH] feat: update to upstream v0.544.0 (#159) 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/ev_charger.rs | 44 ++++++++++++++++++++++++++ packages/dioxus/src/fuel.rs | 18 +++-------- packages/dioxus/src/lib.rs | 4 +++ packages/leptos/src/ev_charger.rs | 39 +++++++++++++++++++++++ packages/leptos/src/fuel.rs | 8 ++--- packages/leptos/src/lib.rs | 4 +++ packages/yew/src/ev_charger.rs | 51 +++++++++++++++++++++++++++++++ packages/yew/src/fuel.rs | 10 +++--- packages/yew/src/lib.rs | 4 +++ scripts/src/lib.rs | 2 +- 13 files changed, 167 insertions(+), 25 deletions(-) create mode 100644 packages/dioxus/src/ev_charger.rs create mode 100644 packages/leptos/src/ev_charger.rs create mode 100644 packages/yew/src/ev_charger.rs diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index e55e620..d034812 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -3489,6 +3489,12 @@ pub fn IconsE1() -> Element { }, "Euro", ), + ( + rsx! { + EvCharger {} + }, + "Ev Charger", + ), ( rsx! { Expand {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index 52766a3..08b9b2e 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -711,6 +711,7 @@ pub fn IconsE() -> impl IntoView { (view! { }.into_any(), "Eraser"), (view! { }.into_any(), "Ethernet Port"), (view! { }.into_any(), "Euro"), + (view! { }.into_any(), "Ev Charger"), (view! { }.into_any(), "Expand"), (view! { }.into_any(), "External Link"), (view! { }.into_any(), "Eye"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index d0a5062..193f908 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -738,6 +738,7 @@ pub fn IconsE() -> Html { (html! { }, "Eraser"), (html! { }, "Ethernet Port"), (html! { }, "Euro"), + (html! { }, "Ev Charger"), (html! { }, "Expand"), (html! { }, "External Link"), (html! { }, "Eye"), diff --git a/packages/dioxus/src/ev_charger.rs b/packages/dioxus/src/ev_charger.rs new file mode 100644 index 0000000..bbc20fe --- /dev/null +++ b/packages/dioxus/src/ev_charger.rs @@ -0,0 +1,44 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct EvChargerProps { + #[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 EvCharger(props: EvChargerProps) -> 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": "M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 4 0v-6.998a2 2 0 0 0-.59-1.42L18 5" } + path { "d": "M14 21V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16" } + path { "d": "M2 21h13" } + path { "d": "M3 7h11" } + path { "d": "m9 11-2 3h3l-2 3" } + } + } +} diff --git a/packages/dioxus/src/fuel.rs b/packages/dioxus/src/fuel.rs index 3b66260..29a6687 100644 --- a/packages/dioxus/src/fuel.rs +++ b/packages/dioxus/src/fuel.rs @@ -34,20 +34,10 @@ pub fn Fuel(props: FuelProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - line { - "x1": "3", - "x2": "15", - "y1": "22", - "y2": "22", - } - line { - "x1": "4", - "x2": "14", - "y1": "9", - "y2": "9", - } - path { "d": "M14 22V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v18" } - path { "d": "M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2a2 2 0 0 0 2-2V9.83a2 2 0 0 0-.59-1.42L18 5" } + path { "d": "M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 4 0v-6.998a2 2 0 0 0-.59-1.42L18 5" } + path { "d": "M14 21V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16" } + path { "d": "M2 21h13" } + path { "d": "M3 9h11" } } } } diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index ee7735b..88d81ac 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -1317,6 +1317,8 @@ mod eraser; mod ethernet_port; #[cfg(feature = "finance")] mod euro; +#[cfg(any(feature = "transportation", feature = "navigation"))] +mod ev_charger; #[cfg(any(feature = "text", feature = "arrows"))] mod expand; #[cfg(any(feature = "arrows", feature = "text", feature = "social"))] @@ -5474,6 +5476,8 @@ pub use eraser::*; pub use ethernet_port::*; #[cfg(feature = "finance")] pub use euro::*; +#[cfg(any(feature = "transportation", feature = "navigation"))] +pub use ev_charger::*; #[cfg(any(feature = "text", feature = "arrows"))] pub use expand::*; #[cfg(any(feature = "arrows", feature = "text", feature = "social"))] diff --git a/packages/leptos/src/ev_charger.rs b/packages/leptos/src/ev_charger.rs new file mode 100644 index 0000000..5a50f50 --- /dev/null +++ b/packages/leptos/src/ev_charger.rs @@ -0,0 +1,39 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn EvCharger( + #[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/fuel.rs b/packages/leptos/src/fuel.rs index c492e42..c6327cb 100644 --- a/packages/leptos/src/fuel.rs +++ b/packages/leptos/src/fuel.rs @@ -29,10 +29,10 @@ pub fn Fuel( stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + } } diff --git a/packages/leptos/src/lib.rs b/packages/leptos/src/lib.rs index e7b60c2..1b10ade 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -1317,6 +1317,8 @@ mod eraser; mod ethernet_port; #[cfg(feature = "finance")] mod euro; +#[cfg(any(feature = "transportation", feature = "navigation"))] +mod ev_charger; #[cfg(any(feature = "text", feature = "arrows"))] mod expand; #[cfg(any(feature = "arrows", feature = "text", feature = "social"))] @@ -5474,6 +5476,8 @@ pub use eraser::*; pub use ethernet_port::*; #[cfg(feature = "finance")] pub use euro::*; +#[cfg(any(feature = "transportation", feature = "navigation"))] +pub use ev_charger::*; #[cfg(any(feature = "text", feature = "arrows"))] pub use expand::*; #[cfg(any(feature = "arrows", feature = "text", feature = "social"))] diff --git a/packages/yew/src/ev_charger.rs b/packages/yew/src/ev_charger.rs new file mode 100644 index 0000000..fa18b20 --- /dev/null +++ b/packages/yew/src/ev_charger.rs @@ -0,0 +1,51 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct EvChargerProps { + #[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 EvCharger(props: &EvChargerProps) -> 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/fuel.rs b/packages/yew/src/fuel.rs index a27e262..266b484 100644 --- a/packages/yew/src/fuel.rs +++ b/packages/yew/src/fuel.rs @@ -41,12 +41,10 @@ pub fn Fuel(props: &FuelProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + } } diff --git a/packages/yew/src/lib.rs b/packages/yew/src/lib.rs index 896ae85..144810e 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -1319,6 +1319,8 @@ mod eraser; mod ethernet_port; #[cfg(feature = "finance")] mod euro; +#[cfg(any(feature = "transportation", feature = "navigation"))] +mod ev_charger; #[cfg(any(feature = "text", feature = "arrows"))] mod expand; #[cfg(any(feature = "arrows", feature = "text", feature = "social"))] @@ -5476,6 +5478,8 @@ pub use eraser::*; pub use ethernet_port::*; #[cfg(feature = "finance")] pub use euro::*; +#[cfg(any(feature = "transportation", feature = "navigation"))] +pub use ev_charger::*; #[cfg(any(feature = "text", feature = "arrows"))] pub use expand::*; #[cfg(any(feature = "arrows", feature = "text", feature = "social"))] diff --git a/scripts/src/lib.rs b/scripts/src/lib.rs index 52f71a0..a4f9171 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.543.0"; +pub const UPSTREAM_GIT_REF: &str = "0.544.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";