diff --git a/book-examples/dioxus/src/icons.rs b/book-examples/dioxus/src/icons.rs index 34f02ce..588e71b 100644 --- a/book-examples/dioxus/src/icons.rs +++ b/book-examples/dioxus/src/icons.rs @@ -9785,6 +9785,12 @@ pub fn IconsV1() -> Element { }, "Vault", ), + ( + rsx! { + VectorSquare {} + }, + "Vector Square", + ), ( rsx! { Vegan {} diff --git a/book-examples/leptos/src/icons.rs b/book-examples/leptos/src/icons.rs index 01aede0..238cc43 100644 --- a/book-examples/leptos/src/icons.rs +++ b/book-examples/leptos/src/icons.rs @@ -2009,6 +2009,7 @@ pub fn IconsV() -> impl IntoView { each=move || [ (view! { }.into_any(), "Variable"), (view! { }.into_any(), "Vault"), + (view! { }.into_any(), "Vector Square"), (view! { }.into_any(), "Vegan"), (view! { }.into_any(), "Venetian Mask"), (view! { }.into_any(), "Venus"), diff --git a/book-examples/yew/src/icons.rs b/book-examples/yew/src/icons.rs index 32ef8cb..dd33c0c 100644 --- a/book-examples/yew/src/icons.rs +++ b/book-examples/yew/src/icons.rs @@ -2052,6 +2052,7 @@ pub fn IconsV() -> Html { let icons = [ (html! { }, "Variable"), (html! { }, "Vault"), + (html! { }, "Vector Square"), (html! { }, "Vegan"), (html! { }, "Venetian Mask"), (html! { }, "Venus"), diff --git a/packages/dioxus/src/calendar_clock.rs b/packages/dioxus/src/calendar_clock.rs index 3f61b90..e682dc3 100644 --- a/packages/dioxus/src/calendar_clock.rs +++ b/packages/dioxus/src/calendar_clock.rs @@ -34,11 +34,11 @@ pub fn CalendarClock(props: CalendarClockProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5" } + path { "d": "M16 14v2.2l1.6 1" } path { "d": "M16 2v4" } - path { "d": "M8 2v4" } + path { "d": "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5" } path { "d": "M3 10h5" } - path { "d": "M17.5 17.5 16 16.3V14" } + path { "d": "M8 2v4" } circle { "cx": "16", "cy": "16", "r": "6" } } } diff --git a/packages/dioxus/src/clock.rs b/packages/dioxus/src/clock.rs index ab8df30..eb06029 100644 --- a/packages/dioxus/src/clock.rs +++ b/packages/dioxus/src/clock.rs @@ -34,8 +34,8 @@ pub fn Clock(props: ClockProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l4 2" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 16 14" } } } } diff --git a/packages/dioxus/src/clock_1.rs b/packages/dioxus/src/clock_1.rs index fa5486b..e8aafb7 100644 --- a/packages/dioxus/src/clock_1.rs +++ b/packages/dioxus/src/clock_1.rs @@ -34,8 +34,8 @@ pub fn Clock1(props: Clock1Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l2-4" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 14.5 8" } } } } diff --git a/packages/dioxus/src/clock_10.rs b/packages/dioxus/src/clock_10.rs index 4c75201..83d0046 100644 --- a/packages/dioxus/src/clock_10.rs +++ b/packages/dioxus/src/clock_10.rs @@ -34,8 +34,8 @@ pub fn Clock10(props: Clock10Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l-4-2" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 8 10" } } } } diff --git a/packages/dioxus/src/clock_11.rs b/packages/dioxus/src/clock_11.rs index c256de9..b3679c9 100644 --- a/packages/dioxus/src/clock_11.rs +++ b/packages/dioxus/src/clock_11.rs @@ -34,8 +34,8 @@ pub fn Clock11(props: Clock11Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l-2-4" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 9.5 8" } } } } diff --git a/packages/dioxus/src/clock_12.rs b/packages/dioxus/src/clock_12.rs index fc29297..66088eb 100644 --- a/packages/dioxus/src/clock_12.rs +++ b/packages/dioxus/src/clock_12.rs @@ -34,8 +34,8 @@ pub fn Clock12(props: Clock12Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12" } } } } diff --git a/packages/dioxus/src/clock_2.rs b/packages/dioxus/src/clock_2.rs index ee947b9..414ce82 100644 --- a/packages/dioxus/src/clock_2.rs +++ b/packages/dioxus/src/clock_2.rs @@ -34,8 +34,8 @@ pub fn Clock2(props: Clock2Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l4-2" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 16 10" } } } } diff --git a/packages/dioxus/src/clock_3.rs b/packages/dioxus/src/clock_3.rs index 0f225ef..81af221 100644 --- a/packages/dioxus/src/clock_3.rs +++ b/packages/dioxus/src/clock_3.rs @@ -34,8 +34,8 @@ pub fn Clock3(props: Clock3Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6h4" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 16.5 12" } } } } diff --git a/packages/dioxus/src/clock_4.rs b/packages/dioxus/src/clock_4.rs index 69762d1..9470ea8 100644 --- a/packages/dioxus/src/clock_4.rs +++ b/packages/dioxus/src/clock_4.rs @@ -34,8 +34,8 @@ pub fn Clock4(props: Clock4Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l4 2" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 16 14" } } } } diff --git a/packages/dioxus/src/clock_5.rs b/packages/dioxus/src/clock_5.rs index 6f3c761..1302881 100644 --- a/packages/dioxus/src/clock_5.rs +++ b/packages/dioxus/src/clock_5.rs @@ -34,8 +34,8 @@ pub fn Clock5(props: Clock5Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l2 4" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 14.5 16" } } } } diff --git a/packages/dioxus/src/clock_6.rs b/packages/dioxus/src/clock_6.rs index 8a3f262..dcf4a05 100644 --- a/packages/dioxus/src/clock_6.rs +++ b/packages/dioxus/src/clock_6.rs @@ -34,7 +34,7 @@ pub fn Clock6(props: Clock6Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M12 16.5V6" } + path { "d": "M12 6v10" } circle { "cx": "12", "cy": "12", "r": "10" } } } diff --git a/packages/dioxus/src/clock_7.rs b/packages/dioxus/src/clock_7.rs index 18dc4d4..0ca2fac 100644 --- a/packages/dioxus/src/clock_7.rs +++ b/packages/dioxus/src/clock_7.rs @@ -34,8 +34,8 @@ pub fn Clock7(props: Clock7Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l-2 4" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 9.5 16" } } } } diff --git a/packages/dioxus/src/clock_8.rs b/packages/dioxus/src/clock_8.rs index e84d305..69b9440 100644 --- a/packages/dioxus/src/clock_8.rs +++ b/packages/dioxus/src/clock_8.rs @@ -34,8 +34,8 @@ pub fn Clock8(props: Clock8Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6l-4 2" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 8 14" } } } } diff --git a/packages/dioxus/src/clock_9.rs b/packages/dioxus/src/clock_9.rs index 82697ce..6bdfe34 100644 --- a/packages/dioxus/src/clock_9.rs +++ b/packages/dioxus/src/clock_9.rs @@ -34,8 +34,8 @@ pub fn Clock9(props: Clock9Props) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M12 6v6H8" } circle { "cx": "12", "cy": "12", "r": "10" } - polyline { "points": "12 6 12 12 7.5 12" } } } } diff --git a/packages/dioxus/src/clock_alert.rs b/packages/dioxus/src/clock_alert.rs index 68f77a9..606cf08 100644 --- a/packages/dioxus/src/clock_alert.rs +++ b/packages/dioxus/src/clock_alert.rs @@ -35,9 +35,9 @@ pub fn ClockAlert(props: ClockAlertProps) -> Element { "stroke-linecap": "round", "stroke-linejoin": "round", path { "d": "M12 6v6l4 2" } - path { "d": "M16 21.16a10 10 0 1 1 5-13.516" } - path { "d": "M20 11.5v6" } - path { "d": "M20 21.5h.01" } + path { "d": "M20 12v5" } + path { "d": "M20 21h.01" } + path { "d": "M21.25 8.2A10 10 0 1 0 16 21.16" } } } } diff --git a/packages/dioxus/src/clock_arrow_down.rs b/packages/dioxus/src/clock_arrow_down.rs index 6534395..7f18d03 100644 --- a/packages/dioxus/src/clock_arrow_down.rs +++ b/packages/dioxus/src/clock_arrow_down.rs @@ -34,8 +34,8 @@ pub fn ClockArrowDown(props: ClockArrowDownProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M12.338 21.994A10 10 0 1 1 21.925 13.227" } path { "d": "M12 6v6l2 1" } + path { "d": "M12.337 21.994a10 10 0 1 1 9.588-8.767" } path { "d": "m14 18 4 4 4-4" } path { "d": "M18 14v8" } } diff --git a/packages/dioxus/src/clock_arrow_up.rs b/packages/dioxus/src/clock_arrow_up.rs index 37b6438..c028f36 100644 --- a/packages/dioxus/src/clock_arrow_up.rs +++ b/packages/dioxus/src/clock_arrow_up.rs @@ -34,8 +34,8 @@ pub fn ClockArrowUp(props: ClockArrowUpProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M13.228 21.925A10 10 0 1 1 21.994 12.338" } - path { "d": "M12 6v6l1.562.781" } + path { "d": "M12 6v6l1.56.78" } + path { "d": "M13.227 21.925a10 10 0 1 1 8.767-9.588" } path { "d": "m14 18 4-4 4 4" } path { "d": "M18 22v-8" } } diff --git a/packages/dioxus/src/dessert.rs b/packages/dioxus/src/dessert.rs index e8dbafc..f3ac602 100644 --- a/packages/dioxus/src/dessert.rs +++ b/packages/dioxus/src/dessert.rs @@ -34,9 +34,9 @@ pub fn Dessert(props: DessertProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", + path { "d": "M10.162 3.167A10 10 0 0 0 2 13a2 2 0 0 0 4 0v-1a2 2 0 0 1 4 0v4a2 2 0 0 0 4 0v-4a2 2 0 0 1 4 0v1a2 2 0 0 0 4-.006 10 10 0 0 0-8.161-9.826" } + path { "d": "M20.804 14.869a9 9 0 0 1-17.608 0" } circle { "cx": "12", "cy": "4", "r": "2" } - path { "d": "M10.2 3.2C5.5 4 2 8.1 2 13a2 2 0 0 0 4 0v-1a2 2 0 0 1 4 0v4a2 2 0 0 0 4 0v-4a2 2 0 0 1 4 0v1a2 2 0 0 0 4 0c0-4.9-3.5-9-8.2-9.8" } - path { "d": "M3.2 14.8a9 9 0 0 0 17.6 0" } } } } diff --git a/packages/dioxus/src/file_clock.rs b/packages/dioxus/src/file_clock.rs index 9a6f234..762c2b8 100644 --- a/packages/dioxus/src/file_clock.rs +++ b/packages/dioxus/src/file_clock.rs @@ -34,10 +34,10 @@ pub fn FileClock(props: FileClockProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3" } path { "d": "M14 2v4a2 2 0 0 0 2 2h4" } + path { "d": "M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3" } + path { "d": "M8 14v2.2l1.6 1" } circle { "cx": "8", "cy": "16", "r": "6" } - path { "d": "M9.5 17.5 8 16.25V14" } } } } diff --git a/packages/dioxus/src/folder_clock.rs b/packages/dioxus/src/folder_clock.rs index b467a34..a95b659 100644 --- a/packages/dioxus/src/folder_clock.rs +++ b/packages/dioxus/src/folder_clock.rs @@ -34,9 +34,9 @@ pub fn FolderClock(props: FolderClockProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - circle { "cx": "16", "cy": "16", "r": "6" } + path { "d": "M16 14v2.2l1.6 1" } path { "d": "M7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2" } - path { "d": "M16 14v2l1 1" } + circle { "cx": "16", "cy": "16", "r": "6" } } } } diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs index 310a6c0..7c1b460 100644 --- a/packages/dioxus/src/lib.rs +++ b/packages/dioxus/src/lib.rs @@ -3883,6 +3883,13 @@ mod utility_pole; mod variable; #[cfg(any(feature = "security", feature = "travel", feature = "home"))] mod vault; +#[cfg(any( + feature = "shapes", + feature = "math", + feature = "design", + feature = "tools" +))] +mod vector_square; #[cfg(any(feature = "food-beverage", feature = "sustainability"))] mod vegan; #[cfg(any(feature = "account", feature = "gaming"))] @@ -7967,6 +7974,13 @@ pub use utility_pole::*; pub use variable::*; #[cfg(any(feature = "security", feature = "travel", feature = "home"))] pub use vault::*; +#[cfg(any( + feature = "shapes", + feature = "math", + feature = "design", + feature = "tools" +))] +pub use vector_square::*; #[cfg(any(feature = "food-beverage", feature = "sustainability"))] pub use vegan::*; #[cfg(any(feature = "account", feature = "gaming"))] diff --git a/packages/dioxus/src/ligature.rs b/packages/dioxus/src/ligature.rs index 7f24c3a..d65e6b6 100644 --- a/packages/dioxus/src/ligature.rs +++ b/packages/dioxus/src/ligature.rs @@ -34,11 +34,11 @@ pub fn Ligature(props: LigatureProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - path { "d": "M8 20V8c0-2.2 1.8-4 4-4 1.5 0 2.8.8 3.5 2" } - path { "d": "M6 12h4" } path { "d": "M14 12h2v8" } - path { "d": "M6 20h4" } path { "d": "M14 20h4" } + path { "d": "M6 12h4" } + path { "d": "M6 20h4" } + path { "d": "M8 20V8a4 4 0 0 1 7.464-2" } } } } diff --git a/packages/dioxus/src/vector_square.rs b/packages/dioxus/src/vector_square.rs new file mode 100644 index 0000000..5903970 --- /dev/null +++ b/packages/dioxus/src/vector_square.rs @@ -0,0 +1,71 @@ +use dioxus::prelude::*; +#[derive(Clone, PartialEq, Props)] +pub struct VectorSquareProps { + #[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 VectorSquare(props: VectorSquareProps) -> 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": "M19.5 7a24 24 0 0 1 0 10" } + path { "d": "M4.5 7a24 24 0 0 0 0 10" } + path { "d": "M7 19.5a24 24 0 0 0 10 0" } + path { "d": "M7 4.5a24 24 0 0 1 10 0" } + rect { + "x": "17", + "y": "17", + "width": "5", + "height": "5", + "rx": "1", + } + rect { + "x": "17", + "y": "2", + "width": "5", + "height": "5", + "rx": "1", + } + rect { + "x": "2", + "y": "17", + "width": "5", + "height": "5", + "rx": "1", + } + rect { + "x": "2", + "y": "2", + "width": "5", + "height": "5", + "rx": "1", + } + } + } +} diff --git a/packages/dioxus/src/watch.rs b/packages/dioxus/src/watch.rs index 278526c..c73b167 100644 --- a/packages/dioxus/src/watch.rs +++ b/packages/dioxus/src/watch.rs @@ -34,10 +34,10 @@ pub fn Watch(props: WatchProps) -> Element { "stroke-width": "{stroke_width}", "stroke-linecap": "round", "stroke-linejoin": "round", - circle { "cx": "12", "cy": "12", "r": "6" } - polyline { "points": "12 10 12 12 13 13" } + path { "d": "M12 10v2.2l1.6 1" } path { "d": "m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05" } path { "d": "m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05" } + circle { "cx": "12", "cy": "12", "r": "6" } } } } diff --git a/packages/leptos/src/calendar_clock.rs b/packages/leptos/src/calendar_clock.rs index 5c4deb8..ff180e1 100644 --- a/packages/leptos/src/calendar_clock.rs +++ b/packages/leptos/src/calendar_clock.rs @@ -29,11 +29,11 @@ pub fn CalendarClock( stroke-linecap="round" stroke-linejoin="round" > - + - + - + } diff --git a/packages/leptos/src/clock.rs b/packages/leptos/src/clock.rs index d182310..ad5b1a6 100644 --- a/packages/leptos/src/clock.rs +++ b/packages/leptos/src/clock.rs @@ -29,8 +29,8 @@ pub fn Clock( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_1.rs b/packages/leptos/src/clock_1.rs index 8844512..9eb32a4 100644 --- a/packages/leptos/src/clock_1.rs +++ b/packages/leptos/src/clock_1.rs @@ -29,8 +29,8 @@ pub fn Clock1( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_10.rs b/packages/leptos/src/clock_10.rs index 2969dbd..249ff13 100644 --- a/packages/leptos/src/clock_10.rs +++ b/packages/leptos/src/clock_10.rs @@ -29,8 +29,8 @@ pub fn Clock10( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_11.rs b/packages/leptos/src/clock_11.rs index b96859a..d04b229 100644 --- a/packages/leptos/src/clock_11.rs +++ b/packages/leptos/src/clock_11.rs @@ -29,8 +29,8 @@ pub fn Clock11( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_12.rs b/packages/leptos/src/clock_12.rs index 2f61d64..2d6cf49 100644 --- a/packages/leptos/src/clock_12.rs +++ b/packages/leptos/src/clock_12.rs @@ -29,8 +29,8 @@ pub fn Clock12( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_2.rs b/packages/leptos/src/clock_2.rs index ed79721..53b97a6 100644 --- a/packages/leptos/src/clock_2.rs +++ b/packages/leptos/src/clock_2.rs @@ -29,8 +29,8 @@ pub fn Clock2( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_3.rs b/packages/leptos/src/clock_3.rs index cafe839..0762cd3 100644 --- a/packages/leptos/src/clock_3.rs +++ b/packages/leptos/src/clock_3.rs @@ -29,8 +29,8 @@ pub fn Clock3( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_4.rs b/packages/leptos/src/clock_4.rs index 656a6d2..c237830 100644 --- a/packages/leptos/src/clock_4.rs +++ b/packages/leptos/src/clock_4.rs @@ -29,8 +29,8 @@ pub fn Clock4( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_5.rs b/packages/leptos/src/clock_5.rs index 1a035f7..6612535 100644 --- a/packages/leptos/src/clock_5.rs +++ b/packages/leptos/src/clock_5.rs @@ -29,8 +29,8 @@ pub fn Clock5( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_6.rs b/packages/leptos/src/clock_6.rs index 4859f3a..7dc6861 100644 --- a/packages/leptos/src/clock_6.rs +++ b/packages/leptos/src/clock_6.rs @@ -29,7 +29,7 @@ pub fn Clock6( stroke-linecap="round" stroke-linejoin="round" > - + } diff --git a/packages/leptos/src/clock_7.rs b/packages/leptos/src/clock_7.rs index f6ac046..375455b 100644 --- a/packages/leptos/src/clock_7.rs +++ b/packages/leptos/src/clock_7.rs @@ -29,8 +29,8 @@ pub fn Clock7( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_8.rs b/packages/leptos/src/clock_8.rs index cbf8806..527a1e6 100644 --- a/packages/leptos/src/clock_8.rs +++ b/packages/leptos/src/clock_8.rs @@ -29,8 +29,8 @@ pub fn Clock8( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_9.rs b/packages/leptos/src/clock_9.rs index 33ad6f5..8f674e8 100644 --- a/packages/leptos/src/clock_9.rs +++ b/packages/leptos/src/clock_9.rs @@ -29,8 +29,8 @@ pub fn Clock9( stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/leptos/src/clock_alert.rs b/packages/leptos/src/clock_alert.rs index bcf8092..8e7f4cb 100644 --- a/packages/leptos/src/clock_alert.rs +++ b/packages/leptos/src/clock_alert.rs @@ -30,9 +30,9 @@ pub fn ClockAlert( stroke-linejoin="round" > - - - + + + } } diff --git a/packages/leptos/src/clock_arrow_down.rs b/packages/leptos/src/clock_arrow_down.rs index 030b462..06d9165 100644 --- a/packages/leptos/src/clock_arrow_down.rs +++ b/packages/leptos/src/clock_arrow_down.rs @@ -29,8 +29,8 @@ pub fn ClockArrowDown( stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/packages/leptos/src/clock_arrow_up.rs b/packages/leptos/src/clock_arrow_up.rs index 91988cf..780faa0 100644 --- a/packages/leptos/src/clock_arrow_up.rs +++ b/packages/leptos/src/clock_arrow_up.rs @@ -29,8 +29,8 @@ pub fn ClockArrowUp( stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/packages/leptos/src/dessert.rs b/packages/leptos/src/dessert.rs index a4e973c..866738e 100644 --- a/packages/leptos/src/dessert.rs +++ b/packages/leptos/src/dessert.rs @@ -29,9 +29,9 @@ pub fn Dessert( stroke-linecap="round" stroke-linejoin="round" > + + - - } } diff --git a/packages/leptos/src/file_clock.rs b/packages/leptos/src/file_clock.rs index 1ecfe03..928b517 100644 --- a/packages/leptos/src/file_clock.rs +++ b/packages/leptos/src/file_clock.rs @@ -29,10 +29,10 @@ pub fn FileClock( stroke-linecap="round" stroke-linejoin="round" > - + + - } } diff --git a/packages/leptos/src/folder_clock.rs b/packages/leptos/src/folder_clock.rs index 6390789..bfbe3f8 100644 --- a/packages/leptos/src/folder_clock.rs +++ b/packages/leptos/src/folder_clock.rs @@ -29,9 +29,9 @@ pub fn FolderClock( stroke-linecap="round" stroke-linejoin="round" > - + - + } } diff --git a/packages/leptos/src/lib.rs b/packages/leptos/src/lib.rs index 16a1d00..47528a2 100644 --- a/packages/leptos/src/lib.rs +++ b/packages/leptos/src/lib.rs @@ -3883,6 +3883,13 @@ mod utility_pole; mod variable; #[cfg(any(feature = "security", feature = "travel", feature = "home"))] mod vault; +#[cfg(any( + feature = "shapes", + feature = "math", + feature = "design", + feature = "tools" +))] +mod vector_square; #[cfg(any(feature = "food-beverage", feature = "sustainability"))] mod vegan; #[cfg(any(feature = "account", feature = "gaming"))] @@ -7967,6 +7974,13 @@ pub use utility_pole::*; pub use variable::*; #[cfg(any(feature = "security", feature = "travel", feature = "home"))] pub use vault::*; +#[cfg(any( + feature = "shapes", + feature = "math", + feature = "design", + feature = "tools" +))] +pub use vector_square::*; #[cfg(any(feature = "food-beverage", feature = "sustainability"))] pub use vegan::*; #[cfg(any(feature = "account", feature = "gaming"))] diff --git a/packages/leptos/src/ligature.rs b/packages/leptos/src/ligature.rs index de391e9..77f56b3 100644 --- a/packages/leptos/src/ligature.rs +++ b/packages/leptos/src/ligature.rs @@ -29,11 +29,11 @@ pub fn Ligature( stroke-linecap="round" stroke-linejoin="round" > - - - + + + } } diff --git a/packages/leptos/src/vector_square.rs b/packages/leptos/src/vector_square.rs new file mode 100644 index 0000000..24a62eb --- /dev/null +++ b/packages/leptos/src/vector_square.rs @@ -0,0 +1,42 @@ +use leptos::{prelude::*, svg::Svg}; +#[component] +pub fn VectorSquare( + #[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/watch.rs b/packages/leptos/src/watch.rs index aacd5b0..51a1949 100644 --- a/packages/leptos/src/watch.rs +++ b/packages/leptos/src/watch.rs @@ -29,10 +29,10 @@ pub fn Watch( stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/packages/yew/src/calendar_clock.rs b/packages/yew/src/calendar_clock.rs index 41e3ff7..1b80854 100644 --- a/packages/yew/src/calendar_clock.rs +++ b/packages/yew/src/calendar_clock.rs @@ -41,11 +41,11 @@ pub fn CalendarClock(props: &CalendarClockProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - + - + - + } diff --git a/packages/yew/src/clock.rs b/packages/yew/src/clock.rs index c5cea49..97ba409 100644 --- a/packages/yew/src/clock.rs +++ b/packages/yew/src/clock.rs @@ -41,8 +41,8 @@ pub fn Clock(props: &ClockProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_1.rs b/packages/yew/src/clock_1.rs index 1fcd8ef..e27de21 100644 --- a/packages/yew/src/clock_1.rs +++ b/packages/yew/src/clock_1.rs @@ -41,8 +41,8 @@ pub fn Clock1(props: &Clock1Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_10.rs b/packages/yew/src/clock_10.rs index b6c220c..fcb44b3 100644 --- a/packages/yew/src/clock_10.rs +++ b/packages/yew/src/clock_10.rs @@ -41,8 +41,8 @@ pub fn Clock10(props: &Clock10Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_11.rs b/packages/yew/src/clock_11.rs index 25dff5a..dcf271b 100644 --- a/packages/yew/src/clock_11.rs +++ b/packages/yew/src/clock_11.rs @@ -41,8 +41,8 @@ pub fn Clock11(props: &Clock11Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_12.rs b/packages/yew/src/clock_12.rs index 8a0008e..d92d717 100644 --- a/packages/yew/src/clock_12.rs +++ b/packages/yew/src/clock_12.rs @@ -41,8 +41,8 @@ pub fn Clock12(props: &Clock12Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_2.rs b/packages/yew/src/clock_2.rs index 3778168..5b38fc8 100644 --- a/packages/yew/src/clock_2.rs +++ b/packages/yew/src/clock_2.rs @@ -41,8 +41,8 @@ pub fn Clock2(props: &Clock2Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_3.rs b/packages/yew/src/clock_3.rs index b92611f..e61ad1a 100644 --- a/packages/yew/src/clock_3.rs +++ b/packages/yew/src/clock_3.rs @@ -41,8 +41,8 @@ pub fn Clock3(props: &Clock3Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_4.rs b/packages/yew/src/clock_4.rs index 8df318e..d80f6be 100644 --- a/packages/yew/src/clock_4.rs +++ b/packages/yew/src/clock_4.rs @@ -41,8 +41,8 @@ pub fn Clock4(props: &Clock4Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_5.rs b/packages/yew/src/clock_5.rs index cffb4da..dbf7e4a 100644 --- a/packages/yew/src/clock_5.rs +++ b/packages/yew/src/clock_5.rs @@ -41,8 +41,8 @@ pub fn Clock5(props: &Clock5Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_6.rs b/packages/yew/src/clock_6.rs index a11ae95..80b7bf5 100644 --- a/packages/yew/src/clock_6.rs +++ b/packages/yew/src/clock_6.rs @@ -41,7 +41,7 @@ pub fn Clock6(props: &Clock6Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > - + } diff --git a/packages/yew/src/clock_7.rs b/packages/yew/src/clock_7.rs index f22aee9..9b10a2d 100644 --- a/packages/yew/src/clock_7.rs +++ b/packages/yew/src/clock_7.rs @@ -41,8 +41,8 @@ pub fn Clock7(props: &Clock7Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_8.rs b/packages/yew/src/clock_8.rs index 815894e..a13ae4f 100644 --- a/packages/yew/src/clock_8.rs +++ b/packages/yew/src/clock_8.rs @@ -41,8 +41,8 @@ pub fn Clock8(props: &Clock8Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_9.rs b/packages/yew/src/clock_9.rs index 77f2022..8a7281f 100644 --- a/packages/yew/src/clock_9.rs +++ b/packages/yew/src/clock_9.rs @@ -41,8 +41,8 @@ pub fn Clock9(props: &Clock9Props) -> Html { stroke-linecap="round" stroke-linejoin="round" > + - } } diff --git a/packages/yew/src/clock_alert.rs b/packages/yew/src/clock_alert.rs index 7590ff9..3923441 100644 --- a/packages/yew/src/clock_alert.rs +++ b/packages/yew/src/clock_alert.rs @@ -42,9 +42,9 @@ pub fn ClockAlert(props: &ClockAlertProps) -> Html { stroke-linejoin="round" > - - - + + + } } diff --git a/packages/yew/src/clock_arrow_down.rs b/packages/yew/src/clock_arrow_down.rs index f906cda..0d3e0de 100644 --- a/packages/yew/src/clock_arrow_down.rs +++ b/packages/yew/src/clock_arrow_down.rs @@ -41,8 +41,8 @@ pub fn ClockArrowDown(props: &ClockArrowDownProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/packages/yew/src/clock_arrow_up.rs b/packages/yew/src/clock_arrow_up.rs index 92580a3..75f9b1d 100644 --- a/packages/yew/src/clock_arrow_up.rs +++ b/packages/yew/src/clock_arrow_up.rs @@ -41,8 +41,8 @@ pub fn ClockArrowUp(props: &ClockArrowUpProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/packages/yew/src/dessert.rs b/packages/yew/src/dessert.rs index cb90e1c..9b64370 100644 --- a/packages/yew/src/dessert.rs +++ b/packages/yew/src/dessert.rs @@ -41,11 +41,11 @@ pub fn Dessert(props: &DessertProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/packages/yew/src/file_clock.rs b/packages/yew/src/file_clock.rs index 114a9d8..12ecd02 100644 --- a/packages/yew/src/file_clock.rs +++ b/packages/yew/src/file_clock.rs @@ -41,10 +41,10 @@ pub fn FileClock(props: &FileClockProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - + + - } } diff --git a/packages/yew/src/folder_clock.rs b/packages/yew/src/folder_clock.rs index 39d9458..0d927af 100644 --- a/packages/yew/src/folder_clock.rs +++ b/packages/yew/src/folder_clock.rs @@ -41,11 +41,11 @@ pub fn FolderClock(props: &FolderClockProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - + - + } } diff --git a/packages/yew/src/lib.rs b/packages/yew/src/lib.rs index 7b746f1..5ba62a2 100644 --- a/packages/yew/src/lib.rs +++ b/packages/yew/src/lib.rs @@ -3885,6 +3885,13 @@ mod utility_pole; mod variable; #[cfg(any(feature = "security", feature = "travel", feature = "home"))] mod vault; +#[cfg(any( + feature = "shapes", + feature = "math", + feature = "design", + feature = "tools" +))] +mod vector_square; #[cfg(any(feature = "food-beverage", feature = "sustainability"))] mod vegan; #[cfg(any(feature = "account", feature = "gaming"))] @@ -7969,6 +7976,13 @@ pub use utility_pole::*; pub use variable::*; #[cfg(any(feature = "security", feature = "travel", feature = "home"))] pub use vault::*; +#[cfg(any( + feature = "shapes", + feature = "math", + feature = "design", + feature = "tools" +))] +pub use vector_square::*; #[cfg(any(feature = "food-beverage", feature = "sustainability"))] pub use vegan::*; #[cfg(any(feature = "account", feature = "gaming"))] diff --git a/packages/yew/src/ligature.rs b/packages/yew/src/ligature.rs index ac9d0a7..020cf9e 100644 --- a/packages/yew/src/ligature.rs +++ b/packages/yew/src/ligature.rs @@ -41,11 +41,11 @@ pub fn Ligature(props: &LigatureProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - - + + + } } diff --git a/packages/yew/src/vector_square.rs b/packages/yew/src/vector_square.rs new file mode 100644 index 0000000..b8cc9a7 --- /dev/null +++ b/packages/yew/src/vector_square.rs @@ -0,0 +1,54 @@ +use yew::prelude::*; +#[derive(PartialEq, Properties)] +pub struct VectorSquareProps { + #[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 VectorSquare(props: &VectorSquareProps) -> 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/watch.rs b/packages/yew/src/watch.rs index 49c8921..250f848 100644 --- a/packages/yew/src/watch.rs +++ b/packages/yew/src/watch.rs @@ -41,10 +41,10 @@ pub fn Watch(props: &WatchProps) -> Html { stroke-linecap="round" stroke-linejoin="round" > - - + + } } diff --git a/scripts/src/lib.rs b/scripts/src/lib.rs index 6e99f6e..cae769d 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.523.0"; +pub const UPSTREAM_GIT_REF: &str = "0.524.0"; pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";