diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index f20db47..8a2d197 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -7331,6 +7331,12 @@ pub fn IconsR1() -> Element { }, "Receipt Text", ), + ( + rsx! { + RectangleCircle {} + }, + "Rectangle Circle", + ), ( rsx! { RectangleEllipsis {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index 42ffbf1..0cdc627 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -1541,6 +1541,7 @@ pub fn IconsR() -> impl IntoView { (view! { }.into_any(), "Receipt Russian Ruble"), (view! { }.into_any(), "Receipt Swiss Franc"), (view! { }.into_any(), "Receipt Text"), + (view! { }.into_any(), "Rectangle Circle"), (view! { }.into_any(), "Rectangle Ellipsis"), (view! { }.into_any(), "Rectangle Goggles"), (view! { }.into_any(), "Rectangle Horizontal"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index 344a727..1e17cd9 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -1564,6 +1564,7 @@ pub fn IconsR() -> Html { (html! { }, "Receipt Russian Ruble"), (html! { }, "Receipt Swiss Franc"), (html! { }, "Receipt Text"), + (html! { }, "Rectangle Circle"), (html! { }, "Rectangle Ellipsis"), (html! { }, "Rectangle Goggles"), (html! { }, "Rectangle Horizontal"), diff --git a/packages/dioxus/src/house_plus.rs b/packages/dioxus/src/house_plus.rs index bc1b4e7..57e78ed 100644 --- a/packages/dioxus/src/house_plus.rs +++ b/packages/dioxus/src/house_plus.rs @@ -34,10 +34,10 @@ pub fn HousePlus(props: HousePlusProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M13.22 2.416a2 2 0 0 0-2.511.057l-7 5.999A2 2 0 0 0 3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7.354" } - path { "d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" } - path { "d": "M15 6h6" } - path { "d": "M18 3v6" } + path { "d": "M12.662 21H5a2 2 0 0 1-2-2v-9a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v2.475" } + path { "d": "M14.959 12.717A1 1 0 0 0 14 12h-4a1 1 0 0 0-1 1v8" } + path { "d": "M15 18h6" } + path { "d": "M18 15v6" } } } } diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index a49443b..0f84747 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -2846,6 +2846,8 @@ mod receipt_russian_ruble; mod receipt_swiss_franc; #[cfg(any(feature = "finance", feature = "travel"))] mod receipt_text; +#[cfg(any(feature = "development", feature = "text"))] +mod rectangle_circle; #[cfg(any(feature = "text", feature = "development"))] mod rectangle_ellipsis; #[cfg(any( @@ -6912,6 +6914,8 @@ pub use receipt_russian_ruble::*; pub use receipt_swiss_franc::*; #[cfg(any(feature = "finance", feature = "travel"))] pub use receipt_text::*; +#[cfg(any(feature = "development", feature = "text"))] +pub use rectangle_circle::*; #[cfg(any(feature = "text", feature = "development"))] pub use rectangle_ellipsis::*; #[cfg(any( diff --git a/packages/dioxus/src/radiation.rs b/packages/dioxus/src/radiation.rs index a7d4532..b2885a6 100644 --- a/packages/dioxus/src/radiation.rs +++ b/packages/dioxus/src/radiation.rs @@ -35,9 +35,9 @@ pub fn Radiation(props: RadiationProps) -> Element { "stroke-linecap": "round", "stroke-linejoin": "round", path { "d": "M12 12h.01" } - path { "d": "M7.5 4.2c-.3-.5-.9-.7-1.3-.4C3.9 5.5 2.3 8.1 2 11c-.1.5.4 1 1 1h5c0-1.5.8-2.8 2-3.4-1.1-1.9-2-3.5-2.5-4.4z" } - path { "d": "M21 12c.6 0 1-.4 1-1-.3-2.9-1.8-5.5-4.1-7.1-.4-.3-1.1-.2-1.3.3-.6.9-1.5 2.5-2.6 4.3 1.2.7 2 2 2 3.5h5z" } - path { "d": "M7.5 19.8c-.3.5-.1 1.1.4 1.3 2.6 1.2 5.6 1.2 8.2 0 .5-.2.7-.8.4-1.3-.5-.9-1.4-2.5-2.5-4.3-1.2.7-2.8.7-4 0-1.1 1.8-2 3.4-2.5 4.3z" } + path { "d": "M14 15.4641a4 4 0 0 1-4 0L7.52786 19.74597 A 1 1 0 0 0 7.99303 21.16211 10 10 0 0 0 16.00697 21.16211 1 1 0 0 0 16.47214 19.74597z" } + path { "d": "M16 12a4 4 0 0 0-2-3.464l2.472-4.282a1 1 0 0 1 1.46-.305 10 10 0 0 1 4.006 6.94A1 1 0 0 1 21 12z" } + path { "d": "M8 12a4 4 0 0 1 2-3.464L7.528 4.254a1 1 0 0 0-1.46-.305 10 10 0 0 0-4.006 6.94A1 1 0 0 0 3 12z" } } } } diff --git a/packages/dioxus/src/rectangle_circle.rs b/packages/dioxus/src/rectangle_circle.rs new file mode 100644 index 0000000..e0dedfb --- /dev/null +++ b/packages/dioxus/src/rectangle_circle.rs @@ -0,0 +1,41 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct RectangleCircleProps { + #[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 RectangleCircle(props: RectangleCircleProps) -> 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 4v16H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z" } + circle { "cx": "14", "cy": "12", "r": "8" } + } + } +} diff --git a/packages/leptos/src/house_plus.rs b/packages/leptos/src/house_plus.rs index 0310fce..5bb07fe 100644 --- a/packages/leptos/src/house_plus.rs +++ b/packages/leptos/src/house_plus.rs @@ -29,10 +29,10 @@ pub fn HousePlus( stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + } } diff --git a/packages/leptos/src/lib.rs b/packages/leptos/src/lib.rs index 5c6c31c..5be6716 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -2846,6 +2846,8 @@ mod receipt_russian_ruble; mod receipt_swiss_franc; #[cfg(any(feature = "finance", feature = "travel"))] mod receipt_text; +#[cfg(any(feature = "development", feature = "text"))] +mod rectangle_circle; #[cfg(any(feature = "text", feature = "development"))] mod rectangle_ellipsis; #[cfg(any( @@ -6912,6 +6914,8 @@ pub use receipt_russian_ruble::*; pub use receipt_swiss_franc::*; #[cfg(any(feature = "finance", feature = "travel"))] pub use receipt_text::*; +#[cfg(any(feature = "development", feature = "text"))] +pub use rectangle_circle::*; #[cfg(any(feature = "text", feature = "development"))] pub use rectangle_ellipsis::*; #[cfg(any( diff --git a/packages/leptos/src/radiation.rs b/packages/leptos/src/radiation.rs index 2b8bc9b..b25fd20 100644 --- a/packages/leptos/src/radiation.rs +++ b/packages/leptos/src/radiation.rs @@ -30,9 +30,9 @@ pub fn Radiation( stroke-linejoin="round" > - - - + + + } } diff --git a/packages/leptos/src/rectangle_circle.rs b/packages/leptos/src/rectangle_circle.rs new file mode 100644 index 0000000..d75b0cb --- /dev/null +++ b/packages/leptos/src/rectangle_circle.rs @@ -0,0 +1,36 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn RectangleCircle( + #[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/house_plus.rs b/packages/yew/src/house_plus.rs index 3550621..37309ed 100644 --- a/packages/yew/src/house_plus.rs +++ b/packages/yew/src/house_plus.rs @@ -42,11 +42,11 @@ pub fn HousePlus(props: &HousePlusProps) -> Html { stroke-linejoin="round" > - - - + + + } } diff --git a/packages/yew/src/lib.rs b/packages/yew/src/lib.rs index fd09c80..9087b19 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -2848,6 +2848,8 @@ mod receipt_russian_ruble; mod receipt_swiss_franc; #[cfg(any(feature = "finance", feature = "travel"))] mod receipt_text; +#[cfg(any(feature = "development", feature = "text"))] +mod rectangle_circle; #[cfg(any(feature = "text", feature = "development"))] mod rectangle_ellipsis; #[cfg(any( @@ -6914,6 +6916,8 @@ pub use receipt_russian_ruble::*; pub use receipt_swiss_franc::*; #[cfg(any(feature = "finance", feature = "travel"))] pub use receipt_text::*; +#[cfg(any(feature = "development", feature = "text"))] +pub use rectangle_circle::*; #[cfg(any(feature = "text", feature = "development"))] pub use rectangle_ellipsis::*; #[cfg(any( diff --git a/packages/yew/src/radiation.rs b/packages/yew/src/radiation.rs index ca0a5d2..02dcf72 100644 --- a/packages/yew/src/radiation.rs +++ b/packages/yew/src/radiation.rs @@ -43,13 +43,13 @@ pub fn Radiation(props: &RadiationProps) -> Html { > } diff --git a/packages/yew/src/rectangle_circle.rs b/packages/yew/src/rectangle_circle.rs new file mode 100644 index 0000000..30fca67 --- /dev/null +++ b/packages/yew/src/rectangle_circle.rs @@ -0,0 +1,48 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct RectangleCircleProps { + #[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 RectangleCircle(props: &RectangleCircleProps) -> 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 b88dff4..5ddf106 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.514.0"; +pub const UPSTREAM_GIT_REF: &str = "0.515.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";