diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index 3273995..e4c7157 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -5535,6 +5535,12 @@ pub fn IconsL1() -> Element { }, "List Checks", ), + ( + rsx! { + ListChevronsDownUp {} + }, + "List Chevrons Down Up", + ), ( rsx! { ListCollapse {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index 960f371..3d391d8 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -1157,6 +1157,7 @@ pub fn IconsL() -> impl IntoView { (view! { }.into_any(), "List"), (view! { }.into_any(), "List Check"), (view! { }.into_any(), "List Checks"), + (view! { }.into_any(), "List Chevrons Down Up"), (view! { }.into_any(), "List Collapse"), (view! { }.into_any(), "List End"), (view! { }.into_any(), "List Filter"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index 7c8bb04..68c0422 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -1183,6 +1183,7 @@ pub fn IconsL() -> Html { (html! { }, "List"), (html! { }, "List Check"), (html! { }, "List Checks"), + (html! { }, "List Chevrons Down Up"), (html! { }, "List Collapse"), (html! { }, "List End"), (html! { }, "List Filter"), diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index cf63a20..3249013 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -2146,6 +2146,8 @@ mod list; mod list_check; #[cfg(feature = "text")] mod list_checks; +#[cfg(any(feature = "text", feature = "arrows"))] +mod list_chevrons_down_up; #[cfg(feature = "text")] mod list_collapse; #[cfg(any(feature = "multimedia", feature = "text"))] @@ -6299,6 +6301,8 @@ pub use list::*; pub use list_check::*; #[cfg(feature = "text")] pub use list_checks::*; +#[cfg(any(feature = "text", feature = "arrows"))] +pub use list_chevrons_down_up::*; #[cfg(feature = "text")] pub use list_collapse::*; #[cfg(any(feature = "multimedia", feature = "text"))] diff --git a/packages/dioxus/src/list_chevrons_down_up.rs b/packages/dioxus/src/list_chevrons_down_up.rs new file mode 100644 index 0000000..3231679 --- /dev/null +++ b/packages/dioxus/src/list_chevrons_down_up.rs @@ -0,0 +1,44 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct ListChevronsDownUpProps { + #[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 ListChevronsDownUp(props: ListChevronsDownUpProps) -> 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 18 3-3 3 3" } + path { "d": "m15 6 3 3 3-3" } + path { "d": "M3 12h8" } + path { "d": "M3 18h8" } + path { "d": "M3 6h8" } + } + } +} diff --git a/packages/leptos/src/lib.rs b/packages/leptos/src/lib.rs index f1b0af6..e8c3431 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -2146,6 +2146,8 @@ mod list; mod list_check; #[cfg(feature = "text")] mod list_checks; +#[cfg(any(feature = "text", feature = "arrows"))] +mod list_chevrons_down_up; #[cfg(feature = "text")] mod list_collapse; #[cfg(any(feature = "multimedia", feature = "text"))] @@ -6299,6 +6301,8 @@ pub use list::*; pub use list_check::*; #[cfg(feature = "text")] pub use list_checks::*; +#[cfg(any(feature = "text", feature = "arrows"))] +pub use list_chevrons_down_up::*; #[cfg(feature = "text")] pub use list_collapse::*; #[cfg(any(feature = "multimedia", feature = "text"))] diff --git a/packages/leptos/src/list_chevrons_down_up.rs b/packages/leptos/src/list_chevrons_down_up.rs new file mode 100644 index 0000000..bf684ab --- /dev/null +++ b/packages/leptos/src/list_chevrons_down_up.rs @@ -0,0 +1,39 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn ListChevronsDownUp( + #[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 d0ae971..0e6a8d3 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -2148,6 +2148,8 @@ mod list; mod list_check; #[cfg(feature = "text")] mod list_checks; +#[cfg(any(feature = "text", feature = "arrows"))] +mod list_chevrons_down_up; #[cfg(feature = "text")] mod list_collapse; #[cfg(any(feature = "multimedia", feature = "text"))] @@ -6301,6 +6303,8 @@ pub use list::*; pub use list_check::*; #[cfg(feature = "text")] pub use list_checks::*; +#[cfg(any(feature = "text", feature = "arrows"))] +pub use list_chevrons_down_up::*; #[cfg(feature = "text")] pub use list_collapse::*; #[cfg(any(feature = "multimedia", feature = "text"))] diff --git a/packages/yew/src/list_chevrons_down_up.rs b/packages/yew/src/list_chevrons_down_up.rs new file mode 100644 index 0000000..67bb014 --- /dev/null +++ b/packages/yew/src/list_chevrons_down_up.rs @@ -0,0 +1,51 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct ListChevronsDownUpProps { + #[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 ListChevronsDownUp(props: &ListChevronsDownUpProps) -> 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 de13770..0da1a30 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.541.0"; +pub const UPSTREAM_GIT_REF: &str = "0.542.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";