From c29ff0a38e0c7a8512f838e836524af675975e5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 23:04:34 +0000 Subject: [PATCH] feat: update to upstream v0.510.0 (#80) Co-authored-by: github-actions[bot] --- book-examples/dioxus/src/icons.rs | 30 +++++++++++-------- book-examples/leptos/src/icons.rs | 1 + book-examples/yew/src/icons.rs | 1 + packages/dioxus/src/brackets.rs | 4 +-- packages/dioxus/src/check_line.rs | 42 ++++++++++++++++++++++++++ packages/dioxus/src/lib.rs | 4 +++ packages/leptos/src/brackets.rs | 4 +-- packages/leptos/src/check_line.rs | 37 +++++++++++++++++++++++ packages/leptos/src/lib.rs | 4 +++ packages/yew/src/brackets.rs | 4 +-- packages/yew/src/check_line.rs | 49 +++++++++++++++++++++++++++++++ packages/yew/src/lib.rs | 4 +++ scripts/src/lib.rs | 2 +- 13 files changed, 167 insertions(+), 19 deletions(-) create mode 100644 packages/dioxus/src/check_line.rs create mode 100644 packages/leptos/src/check_line.rs create mode 100644 packages/yew/src/check_line.rs diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index 28838a4..0056fde 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -1982,6 +1982,12 @@ pub fn IconsC1() -> Element { }, "Check Check", ), + ( + rsx! { + CheckLine {} + }, + "Check Line", + ), ( rsx! { ChefHat {} @@ -2144,12 +2150,6 @@ pub fn IconsC1() -> Element { }, "Circle Arrow Out Down Right", ), - ( - rsx! { - CircleArrowOutUpLeft {} - }, - "Circle Arrow Out Up Left", - ), ]; rsx! { for (icon , name) in icons { @@ -2165,6 +2165,12 @@ pub fn IconsC1() -> Element { #[component] pub fn IconsC2() -> Element { let icons = [ + ( + rsx! { + CircleArrowOutUpLeft {} + }, + "Circle Arrow Out Up Left", + ), ( rsx! { CircleArrowOutUpRight {} @@ -2759,12 +2765,6 @@ pub fn IconsC2() -> Element { }, "Columns 4", ), - ( - rsx! { - Combine {} - }, - "Combine", - ), ]; rsx! { for (icon , name) in icons { @@ -2780,6 +2780,12 @@ pub fn IconsC2() -> Element { #[component] pub fn IconsC3() -> Element { let icons = [ + ( + rsx! { + Combine {} + }, + "Combine", + ), ( rsx! { Command {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index b40254d..1780abd 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -433,6 +433,7 @@ pub fn IconsC() -> impl IntoView { (view! { }.into_any(), "Chart Spline"), (view! { }.into_any(), "Check"), (view! { }.into_any(), "Check Check"), + (view! { }.into_any(), "Check Line"), (view! { }.into_any(), "Chef Hat"), (view! { }.into_any(), "Cherry"), (view! { }.into_any(), "Chevron Down"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index 09efe2b..bf4060b 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -450,6 +450,7 @@ pub fn IconsC() -> Html { (html! { }, "Chart Spline"), (html! { }, "Check"), (html! { }, "Check Check"), + (html! { }, "Check Line"), (html! { }, "Chef Hat"), (html! { }, "Cherry"), (html! { }, "Chevron Down"), diff --git a/packages/dioxus/src/brackets.rs b/packages/dioxus/src/brackets.rs index cc087a9..3d4523a 100644 --- a/packages/dioxus/src/brackets.rs +++ b/packages/dioxus/src/brackets.rs @@ -34,8 +34,8 @@ pub fn Brackets(props: BracketsProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M16 3h2a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-2" } - path { "d": "M8 21H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h2" } + path { "d": "M16 3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-3" } + path { "d": "M8 21H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h3" } } } } diff --git a/packages/dioxus/src/check_line.rs b/packages/dioxus/src/check_line.rs new file mode 100644 index 0000000..4b231a6 --- /dev/null +++ b/packages/dioxus/src/check_line.rs @@ -0,0 +1,42 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct CheckLineProps { + #[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 CheckLine(props: CheckLineProps) -> 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": "M20 4L9 15" } + path { "d": "M21 19L3 19" } + path { "d": "M9 15L4 10" } + } + } +} diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index 553ce48..77f6a87 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -738,6 +738,8 @@ mod chart_spline; mod check; #[cfg(feature = "notifications")] mod check_check; +#[cfg(feature = "notifications")] +mod check_line; #[cfg(feature = "food-beverage")] mod chef_hat; #[cfg(feature = "food-beverage")] @@ -4778,6 +4780,8 @@ pub use chart_spline::*; pub use check::*; #[cfg(feature = "notifications")] pub use check_check::*; +#[cfg(feature = "notifications")] +pub use check_line::*; #[cfg(feature = "food-beverage")] pub use chef_hat::*; #[cfg(feature = "food-beverage")] diff --git a/packages/leptos/src/brackets.rs b/packages/leptos/src/brackets.rs index 19c6477..94b8db9 100644 --- a/packages/leptos/src/brackets.rs +++ b/packages/leptos/src/brackets.rs @@ -29,8 +29,8 @@ pub fn Brackets( stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/packages/leptos/src/check_line.rs b/packages/leptos/src/check_line.rs new file mode 100644 index 0000000..104b56a --- /dev/null +++ b/packages/leptos/src/check_line.rs @@ -0,0 +1,37 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn CheckLine( + #[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/lib.rs b/packages/leptos/src/lib.rs index 1b7807a..deeafab 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -738,6 +738,8 @@ mod chart_spline; mod check; #[cfg(feature = "notifications")] mod check_check; +#[cfg(feature = "notifications")] +mod check_line; #[cfg(feature = "food-beverage")] mod chef_hat; #[cfg(feature = "food-beverage")] @@ -4778,6 +4780,8 @@ pub use chart_spline::*; pub use check::*; #[cfg(feature = "notifications")] pub use check_check::*; +#[cfg(feature = "notifications")] +pub use check_line::*; #[cfg(feature = "food-beverage")] pub use chef_hat::*; #[cfg(feature = "food-beverage")] diff --git a/packages/yew/src/brackets.rs b/packages/yew/src/brackets.rs index 731dfa0..347811e 100644 --- a/packages/yew/src/brackets.rs +++ b/packages/yew/src/brackets.rs @@ -41,8 +41,8 @@ pub fn Brackets(props: &BracketsProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/packages/yew/src/check_line.rs b/packages/yew/src/check_line.rs new file mode 100644 index 0000000..b8f153b --- /dev/null +++ b/packages/yew/src/check_line.rs @@ -0,0 +1,49 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct CheckLineProps { + #[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 CheckLine(props: &CheckLineProps) -> 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/lib.rs b/packages/yew/src/lib.rs index ba9d6e9..44a01af 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -740,6 +740,8 @@ mod chart_spline; mod check; #[cfg(feature = "notifications")] mod check_check; +#[cfg(feature = "notifications")] +mod check_line; #[cfg(feature = "food-beverage")] mod chef_hat; #[cfg(feature = "food-beverage")] @@ -4780,6 +4782,8 @@ pub use chart_spline::*; pub use check::*; #[cfg(feature = "notifications")] pub use check_check::*; +#[cfg(feature = "notifications")] +pub use check_line::*; #[cfg(feature = "food-beverage")] pub use chef_hat::*; #[cfg(feature = "food-beverage")] diff --git a/scripts/src/lib.rs b/scripts/src/lib.rs index 2000753..07c8c1c 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.509.0"; +pub const UPSTREAM_GIT_REF: &str = "0.510.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";