diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index db0cb668..7128af2b 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -1863,6 +1863,12 @@ pub fn IconsC1() -> Element { }, "Car", ), + ( + rsx! { + CarBattery {} + }, + "Car Battery", + ), ( rsx! { CarFront {} @@ -2235,12 +2241,6 @@ pub fn IconsC1() -> Element { }, "Chevrons Up", ), - ( - rsx! { - ChevronsUpDown {} - }, - "Chevrons Up Down", - ), ]; rsx! { for (icon, name) in icons { @@ -2256,6 +2256,12 @@ pub fn IconsC1() -> Element { #[component] pub fn IconsC2() -> Element { let icons = [ + ( + rsx! { + ChevronsUpDown {} + }, + "Chevrons Up Down", + ), ( rsx! { Church {} @@ -2850,12 +2856,6 @@ pub fn IconsC2() -> Element { }, "Cloud Moon Rain", ), - ( - rsx! { - CloudOff {} - }, - "Cloud Off", - ), ]; rsx! { for (icon, name) in icons { @@ -2871,6 +2871,12 @@ pub fn IconsC2() -> Element { #[component] pub fn IconsC3() -> Element { let icons = [ + ( + rsx! { + CloudOff {} + }, + "Cloud Off", + ), ( rsx! { CloudRain {} @@ -9395,15 +9401,15 @@ pub fn IconsS2() -> Element { ), ( rsx! { - SquareUser {} + SquareText {} }, - "Square User", + "Square Text", ), ( rsx! { - SquareUserRound {} + SquareUser {} }, - "Square User Round", + "Square User", ), ]; rsx! { @@ -9420,6 +9426,12 @@ pub fn IconsS2() -> Element { #[component] pub fn IconsS3() -> Element { let icons = [ + ( + rsx! { + SquareUserRound {} + }, + "Square User Round", + ), ( rsx! { SquareX {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index b5334fb0..2f42ca7c 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -450,6 +450,7 @@ pub fn IconsC1() -> impl IntoView { (view! { }.into_any(), "Captions"), (view! { }.into_any(), "Captions Off"), (view! { }.into_any(), "Car"), + (view! { }.into_any(), "Car Battery"), (view! { }.into_any(), "Car Front"), (view! { }.into_any(), "Car Taxi Front"), (view! { }.into_any(), "Caravan"), @@ -521,7 +522,6 @@ pub fn IconsC1() -> impl IntoView { (view! { }.into_any(), "Chevrons Right"), (view! { }.into_any(), "Chevrons Right Left"), (view! { }.into_any(), "Chevrons Up"), - (view! { }.into_any(), "Chevrons Up Down"), ] key=|icon| icon.1 children=move |(icon, name)| { @@ -539,6 +539,7 @@ pub fn IconsC2() -> impl IntoView { view! { }.into_any(), "Chevrons Up Down"), (view! { }.into_any(), "Church"), (view! { }.into_any(), "Cigarette"), (view! { }.into_any(), "Cigarette Off"), @@ -638,7 +639,6 @@ pub fn IconsC2() -> impl IntoView { (view! { }.into_any(), "Cloud Lightning"), (view! { }.into_any(), "Cloud Moon"), (view! { }.into_any(), "Cloud Moon Rain"), - (view! { }.into_any(), "Cloud Off"), ] key=|icon| icon.1 children=move |(icon, name)| { @@ -656,6 +656,7 @@ pub fn IconsC3() -> impl IntoView { view! { }.into_any(), "Cloud Off"), (view! { }.into_any(), "Cloud Rain"), (view! { }.into_any(), "Cloud Rain Wind"), (view! { }.into_any(), "Cloud Snow"), @@ -2051,8 +2052,8 @@ pub fn IconsS2() -> impl IntoView { (view! { }.into_any(), "Square Star"), (view! { }.into_any(), "Square Stop"), (view! { }.into_any(), "Square Terminal"), + (view! { }.into_any(), "Square Text"), (view! { }.into_any(), "Square User"), - (view! { }.into_any(), "Square User Round"), ] key=|icon| icon.1 children=move |(icon, name)| { @@ -2070,6 +2071,7 @@ pub fn IconsS3() -> impl IntoView { view! { }.into_any(), "Square User Round"), (view! { }.into_any(), "Square X"), (view! { }.into_any(), "Squares Exclude"), (view! { }.into_any(), "Squares Intersect"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index 46c50473..495ba5c2 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -417,6 +417,7 @@ pub fn IconsC() -> Html { (html! { }, "Captions"), (html! { }, "Captions Off"), (html! { }, "Car"), + (html! { }, "Car Battery"), (html! { }, "Car Front"), (html! { }, "Car Taxi Front"), (html! { }, "Caravan"), @@ -1969,6 +1970,7 @@ pub fn IconsS() -> Html { (html! { }, "Square Star"), (html! { }, "Square Stop"), (html! { }, "Square Terminal"), + (html! { }, "Square Text"), (html! { }, "Square User"), (html! { }, "Square User Round"), (html! { }, "Square X"), diff --git a/packages/dioxus/src/car_battery.rs b/packages/dioxus/src/car_battery.rs new file mode 100644 index 00000000..db7c41f3 --- /dev/null +++ b/packages/dioxus/src/car_battery.rs @@ -0,0 +1,51 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct CarBatteryProps { + #[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 CarBattery(props: CarBatteryProps) -> 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 13h4" } + path { "d": "M16 15v-4" } + path { "d": "M18 5v2" } + path { "d": "M6 13h4" } + path { "d": "M6 5v2" } + rect { + "x": "2", + "y": "7", + "width": "20", + "height": "12", + "rx": "2", + } + } + } +} diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index 88101f9c..8a906854 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -668,6 +668,8 @@ mod captions; mod captions_off; #[cfg(feature = "transportation")] mod car; +#[cfg(any(feature = "connectivity", feature = "transportation"))] +mod car_battery; #[cfg(feature = "transportation")] mod car_front; #[cfg(feature = "transportation")] @@ -3796,6 +3798,8 @@ mod square_star; mod square_stop; #[cfg(feature = "development")] mod square_terminal; +#[cfg(any(feature = "text", feature = "shapes", feature = "development"))] +mod square_text; #[cfg(feature = "account")] mod square_user; #[cfg(feature = "account")] @@ -5175,6 +5179,8 @@ pub use captions::*; pub use captions_off::*; #[cfg(feature = "transportation")] pub use car::*; +#[cfg(any(feature = "connectivity", feature = "transportation"))] +pub use car_battery::*; #[cfg(feature = "transportation")] pub use car_front::*; #[cfg(feature = "transportation")] @@ -8303,6 +8309,8 @@ pub use square_star::*; pub use square_stop::*; #[cfg(feature = "development")] pub use square_terminal::*; +#[cfg(any(feature = "text", feature = "shapes", feature = "development"))] +pub use square_text::*; #[cfg(feature = "account")] pub use square_user::*; #[cfg(feature = "account")] diff --git a/packages/dioxus/src/square_text.rs b/packages/dioxus/src/square_text.rs new file mode 100644 index 00000000..304fd626 --- /dev/null +++ b/packages/dioxus/src/square_text.rs @@ -0,0 +1,49 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct SquareTextProps { + #[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 SquareText(props: SquareTextProps) -> 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", + rect { + "width": "18", + "height": "18", + "x": "3", + "y": "3", + "rx": "2", + } + path { "d": "M7 8h8" } + path { "d": "M7 12h10" } + path { "d": "M7 16h6" } + } + } +} diff --git a/packages/icon-name/src/lib.rs b/packages/icon-name/src/lib.rs index 24f87d81..d7da927d 100644 --- a/packages/icon-name/src/lib.rs +++ b/packages/icon-name/src/lib.rs @@ -5,7 +5,7 @@ //! See [the Rust Lucide book](https://lucide.rustforweb.org/) for more documenation. /// [Lucide](https://lucide.dev/) icon names. -pub static ICON_NAMES: [&str; 1767usize] = [ +pub static ICON_NAMES: [&str; 1769usize] = [ "a-arrow-down", "a-arrow-up", "a-large-small", @@ -299,6 +299,7 @@ pub static ICON_NAMES: [&str; 1767usize] = [ "captions", "captions-off", "car", + "car-battery", "car-front", "car-taxi-front", "caravan", @@ -1499,6 +1500,7 @@ pub static ICON_NAMES: [&str; 1767usize] = [ "square-star", "square-stop", "square-terminal", + "square-text", "square-user", "square-user-round", "square-x", diff --git a/packages/leptos/src/car_battery.rs b/packages/leptos/src/car_battery.rs new file mode 100644 index 00000000..16adc0b9 --- /dev/null +++ b/packages/leptos/src/car_battery.rs @@ -0,0 +1,40 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn CarBattery( + #[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 67491409..2a77e87d 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -668,6 +668,8 @@ mod captions; mod captions_off; #[cfg(feature = "transportation")] mod car; +#[cfg(any(feature = "connectivity", feature = "transportation"))] +mod car_battery; #[cfg(feature = "transportation")] mod car_front; #[cfg(feature = "transportation")] @@ -3796,6 +3798,8 @@ mod square_star; mod square_stop; #[cfg(feature = "development")] mod square_terminal; +#[cfg(any(feature = "text", feature = "shapes", feature = "development"))] +mod square_text; #[cfg(feature = "account")] mod square_user; #[cfg(feature = "account")] @@ -5175,6 +5179,8 @@ pub use captions::*; pub use captions_off::*; #[cfg(feature = "transportation")] pub use car::*; +#[cfg(any(feature = "connectivity", feature = "transportation"))] +pub use car_battery::*; #[cfg(feature = "transportation")] pub use car_front::*; #[cfg(feature = "transportation")] @@ -8303,6 +8309,8 @@ pub use square_star::*; pub use square_stop::*; #[cfg(feature = "development")] pub use square_terminal::*; +#[cfg(any(feature = "text", feature = "shapes", feature = "development"))] +pub use square_text::*; #[cfg(feature = "account")] pub use square_user::*; #[cfg(feature = "account")] diff --git a/packages/leptos/src/square_text.rs b/packages/leptos/src/square_text.rs new file mode 100644 index 00000000..dc61035e --- /dev/null +++ b/packages/leptos/src/square_text.rs @@ -0,0 +1,38 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn SquareText( + #[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/car_battery.rs b/packages/yew/src/car_battery.rs new file mode 100644 index 00000000..628c3d95 --- /dev/null +++ b/packages/yew/src/car_battery.rs @@ -0,0 +1,52 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct CarBatteryProps { + #[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, +} +#[component] +pub fn CarBattery(props: &CarBatteryProps) -> 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 3ee7ef79..1e231926 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -670,6 +670,8 @@ mod captions; mod captions_off; #[cfg(feature = "transportation")] mod car; +#[cfg(any(feature = "connectivity", feature = "transportation"))] +mod car_battery; #[cfg(feature = "transportation")] mod car_front; #[cfg(feature = "transportation")] @@ -3798,6 +3800,8 @@ mod square_star; mod square_stop; #[cfg(feature = "development")] mod square_terminal; +#[cfg(any(feature = "text", feature = "shapes", feature = "development"))] +mod square_text; #[cfg(feature = "account")] mod square_user; #[cfg(feature = "account")] @@ -5177,6 +5181,8 @@ pub use captions::*; pub use captions_off::*; #[cfg(feature = "transportation")] pub use car::*; +#[cfg(any(feature = "connectivity", feature = "transportation"))] +pub use car_battery::*; #[cfg(feature = "transportation")] pub use car_front::*; #[cfg(feature = "transportation")] @@ -8305,6 +8311,8 @@ pub use square_star::*; pub use square_stop::*; #[cfg(feature = "development")] pub use square_terminal::*; +#[cfg(any(feature = "text", feature = "shapes", feature = "development"))] +pub use square_text::*; #[cfg(feature = "account")] pub use square_user::*; #[cfg(feature = "account")] diff --git a/packages/yew/src/square_text.rs b/packages/yew/src/square_text.rs new file mode 100644 index 00000000..ec21b664 --- /dev/null +++ b/packages/yew/src/square_text.rs @@ -0,0 +1,50 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct SquareTextProps { + #[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, +} +#[component] +pub fn SquareText(props: &SquareTextProps) -> 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 663b0751..6a50bf5a 100644 --- a/scripts/src/lib.rs +++ b/scripts/src/lib.rs @@ -10,5 +10,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 = "1.31.0"; +pub const UPSTREAM_GIT_REF: &str = "1.32.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";