From b7e685d2e78b3711210613297fdde34a5b06ca10 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 08:02:27 +0000 Subject: [PATCH] feat: update to upstream v0.514.0 (#89) 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/book_alert.rs | 42 +++++++++++++++++++++++++ packages/dioxus/src/lib.rs | 4 +++ packages/dioxus/src/settings_2.rs | 2 +- packages/dioxus/src/trophy.rs | 10 +++--- packages/leptos/src/book_alert.rs | 37 ++++++++++++++++++++++ packages/leptos/src/lib.rs | 4 +++ packages/leptos/src/settings_2.rs | 2 +- packages/leptos/src/trophy.rs | 10 +++--- packages/yew/src/book_alert.rs | 51 +++++++++++++++++++++++++++++++ packages/yew/src/lib.rs | 4 +++ packages/yew/src/settings_2.rs | 2 +- packages/yew/src/trophy.rs | 10 +++--- scripts/src/lib.rs | 2 +- 16 files changed, 175 insertions(+), 25 deletions(-) create mode 100644 packages/dioxus/src/book_alert.rs create mode 100644 packages/leptos/src/book_alert.rs create mode 100644 packages/yew/src/book_alert.rs diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index ead0f36..f20db47 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -1184,6 +1184,12 @@ pub fn IconsB1() -> Element { }, "Book A", ), + ( + rsx! { + BookAlert {} + }, + "Book Alert", + ), ( rsx! { BookAudio {} @@ -1316,12 +1322,6 @@ pub fn IconsB1() -> Element { }, "Book X", ), - ( - rsx! { - Bookmark {} - }, - "Bookmark", - ), ]; rsx! { for (icon , name) in icons { @@ -1337,6 +1337,12 @@ pub fn IconsB1() -> Element { #[component] pub fn IconsB2() -> Element { let icons = [ + ( + rsx! { + Bookmark {} + }, + "Bookmark", + ), ( rsx! { BookmarkCheck {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index 8dbc352..42ffbf1 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -282,6 +282,7 @@ pub fn IconsB() -> impl IntoView { (view! { }.into_any(), "Bone"), (view! { }.into_any(), "Book"), (view! { }.into_any(), "Book A"), + (view! { }.into_any(), "Book Alert"), (view! { }.into_any(), "Book Audio"), (view! { }.into_any(), "Book Check"), (view! { }.into_any(), "Book Copy"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index 51fd11e..344a727 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -291,6 +291,7 @@ pub fn IconsB() -> Html { (html! { }, "Bone"), (html! { }, "Book"), (html! { }, "Book A"), + (html! { }, "Book Alert"), (html! { }, "Book Audio"), (html! { }, "Book Check"), (html! { }, "Book Copy"), diff --git a/packages/dioxus/src/book_alert.rs b/packages/dioxus/src/book_alert.rs new file mode 100644 index 0000000..b4b2a4d --- /dev/null +++ b/packages/dioxus/src/book_alert.rs @@ -0,0 +1,42 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct BookAlertProps { + #[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 BookAlert(props: BookAlertProps) -> 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": "M12 13h.01" } + path { "d": "M12 6v3" } + path { "d": "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" } + } + } +} diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index f35c7db..a49443b 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -439,6 +439,8 @@ mod bone; mod book; #[cfg(any(feature = "text", feature = "gaming"))] mod book_a; +#[cfg(any(feature = "text", feature = "development", feature = "gaming"))] +mod book_alert; #[cfg(any(feature = "multimedia", feature = "text"))] mod book_audio; #[cfg(any(feature = "text", feature = "development", feature = "gaming"))] @@ -4503,6 +4505,8 @@ pub use bone::*; pub use book::*; #[cfg(any(feature = "text", feature = "gaming"))] pub use book_a::*; +#[cfg(any(feature = "text", feature = "development", feature = "gaming"))] +pub use book_alert::*; #[cfg(any(feature = "multimedia", feature = "text"))] pub use book_audio::*; #[cfg(any(feature = "text", feature = "development", feature = "gaming"))] diff --git a/packages/dioxus/src/settings_2.rs b/packages/dioxus/src/settings_2.rs index d42dc9f..756c5d5 100644 --- a/packages/dioxus/src/settings_2.rs +++ b/packages/dioxus/src/settings_2.rs @@ -34,8 +34,8 @@ pub fn Settings2(props: Settings2Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M20 7h-9" } path { "d": "M14 17H5" } + path { "d": "M19 7h-9" } circle { "cx": "17", "cy": "17", "r": "3" } circle { "cx": "7", "cy": "7", "r": "3" } } diff --git a/packages/dioxus/src/trophy.rs b/packages/dioxus/src/trophy.rs index 4cb1f10..11e4a34 100644 --- a/packages/dioxus/src/trophy.rs +++ b/packages/dioxus/src/trophy.rs @@ -34,12 +34,12 @@ pub fn Trophy(props: TrophyProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M6 9H4.5a2.5 2.5 0 0 1 0-5H6" } - path { "d": "M18 9h1.5a2.5 2.5 0 0 0 0-5H18" } + path { "d": "M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978" } + path { "d": "M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978" } + path { "d": "M18 9h1.5a1 1 0 0 0 0-5H18" } path { "d": "M4 22h16" } - path { "d": "M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22" } - path { "d": "M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22" } - path { "d": "M18 2H6v7a6 6 0 0 0 12 0V2Z" } + path { "d": "M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z" } + path { "d": "M6 9H4.5a1 1 0 0 1 0-5H6" } } } } diff --git a/packages/leptos/src/book_alert.rs b/packages/leptos/src/book_alert.rs new file mode 100644 index 0000000..56b977d --- /dev/null +++ b/packages/leptos/src/book_alert.rs @@ -0,0 +1,37 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn BookAlert( + #[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 6588897..5c6c31c 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -439,6 +439,8 @@ mod bone; mod book; #[cfg(any(feature = "text", feature = "gaming"))] mod book_a; +#[cfg(any(feature = "text", feature = "development", feature = "gaming"))] +mod book_alert; #[cfg(any(feature = "multimedia", feature = "text"))] mod book_audio; #[cfg(any(feature = "text", feature = "development", feature = "gaming"))] @@ -4503,6 +4505,8 @@ pub use bone::*; pub use book::*; #[cfg(any(feature = "text", feature = "gaming"))] pub use book_a::*; +#[cfg(any(feature = "text", feature = "development", feature = "gaming"))] +pub use book_alert::*; #[cfg(any(feature = "multimedia", feature = "text"))] pub use book_audio::*; #[cfg(any(feature = "text", feature = "development", feature = "gaming"))] diff --git a/packages/leptos/src/settings_2.rs b/packages/leptos/src/settings_2.rs index 53f5f62..b0f05f4 100644 --- a/packages/leptos/src/settings_2.rs +++ b/packages/leptos/src/settings_2.rs @@ -29,8 +29,8 @@ pub fn Settings2( stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/packages/leptos/src/trophy.rs b/packages/leptos/src/trophy.rs index 896b8e2..89f829d 100644 --- a/packages/leptos/src/trophy.rs +++ b/packages/leptos/src/trophy.rs @@ -29,12 +29,12 @@ pub fn Trophy( stroke-linecap="round" stroke-linejoin="round" > - - + + + - - - + + } } diff --git a/packages/yew/src/book_alert.rs b/packages/yew/src/book_alert.rs new file mode 100644 index 0000000..b4b6d6e --- /dev/null +++ b/packages/yew/src/book_alert.rs @@ -0,0 +1,51 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct BookAlertProps { + #[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 BookAlert(props: &BookAlertProps) -> 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 31f3d46..fd09c80 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -441,6 +441,8 @@ mod bone; mod book; #[cfg(any(feature = "text", feature = "gaming"))] mod book_a; +#[cfg(any(feature = "text", feature = "development", feature = "gaming"))] +mod book_alert; #[cfg(any(feature = "multimedia", feature = "text"))] mod book_audio; #[cfg(any(feature = "text", feature = "development", feature = "gaming"))] @@ -4505,6 +4507,8 @@ pub use bone::*; pub use book::*; #[cfg(any(feature = "text", feature = "gaming"))] pub use book_a::*; +#[cfg(any(feature = "text", feature = "development", feature = "gaming"))] +pub use book_alert::*; #[cfg(any(feature = "multimedia", feature = "text"))] pub use book_audio::*; #[cfg(any(feature = "text", feature = "development", feature = "gaming"))] diff --git a/packages/yew/src/settings_2.rs b/packages/yew/src/settings_2.rs index 99601ab..3eff90b 100644 --- a/packages/yew/src/settings_2.rs +++ b/packages/yew/src/settings_2.rs @@ -41,8 +41,8 @@ pub fn Settings2(props: &Settings2Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/packages/yew/src/trophy.rs b/packages/yew/src/trophy.rs index 9e2c947..7853c12 100644 --- a/packages/yew/src/trophy.rs +++ b/packages/yew/src/trophy.rs @@ -41,12 +41,12 @@ pub fn Trophy(props: &TrophyProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - + + + - - - + + } } diff --git a/scripts/src/lib.rs b/scripts/src/lib.rs index bcae277..b88dff4 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.513.0"; +pub const UPSTREAM_GIT_REF: &str = "0.514.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";