Skip to content

Commit f1f87ad

Browse files
feat: update to upstream v0.569.0 (#274)
Co-authored-by: rust-for-web[bot] <191031261+rust-for-web[bot]@users.noreply.github.com>
1 parent 634f01d commit f1f87ad

17 files changed

Lines changed: 339 additions & 29 deletions

File tree

book-examples/dioxus/src/icons.rs

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6349,6 +6349,18 @@ pub fn IconsM1() -> Element {
63496349
},
63506350
"Minus",
63516351
),
6352+
(
6353+
rsx! {
6354+
MirrorRectangular {}
6355+
},
6356+
"Mirror Rectangular",
6357+
),
6358+
(
6359+
rsx! {
6360+
MirrorRound {}
6361+
},
6362+
"Mirror Round",
6363+
),
63526364
(
63536365
rsx! {
63546366
Monitor {}
@@ -6457,18 +6469,6 @@ pub fn IconsM1() -> Element {
64576469
},
64586470
"Mountain",
64596471
),
6460-
(
6461-
rsx! {
6462-
MountainSnow {}
6463-
},
6464-
"Mountain Snow",
6465-
),
6466-
(
6467-
rsx! {
6468-
Mouse {}
6469-
},
6470-
"Mouse",
6471-
),
64726472
];
64736473
rsx! {
64746474
for (icon , name) in icons {
@@ -6484,6 +6484,18 @@ pub fn IconsM1() -> Element {
64846484
#[component]
64856485
pub fn IconsM2() -> Element {
64866486
let icons = [
6487+
(
6488+
rsx! {
6489+
MountainSnow {}
6490+
},
6491+
"Mountain Snow",
6492+
),
6493+
(
6494+
rsx! {
6495+
Mouse {}
6496+
},
6497+
"Mouse",
6498+
),
64876499
(
64886500
rsx! {
64896501
MouseOff {}

book-examples/leptos/src/icons.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,8 @@ pub fn IconsM1() -> impl IntoView {
14051405
(view! { <Minimize /> }.into_any(), "Minimize"),
14061406
(view! { <Minimize2 /> }.into_any(), "Minimize 2"),
14071407
(view! { <Minus /> }.into_any(), "Minus"),
1408+
(view! { <MirrorRectangular /> }.into_any(), "Mirror Rectangular"),
1409+
(view! { <MirrorRound /> }.into_any(), "Mirror Round"),
14081410
(view! { <Monitor /> }.into_any(), "Monitor"),
14091411
(view! { <MonitorCheck /> }.into_any(), "Monitor Check"),
14101412
(view! { <MonitorCloud /> }.into_any(), "Monitor Cloud"),
@@ -1423,8 +1425,6 @@ pub fn IconsM1() -> impl IntoView {
14231425
(view! { <MoonStar /> }.into_any(), "Moon Star"),
14241426
(view! { <Motorbike /> }.into_any(), "Motorbike"),
14251427
(view! { <Mountain /> }.into_any(), "Mountain"),
1426-
(view! { <MountainSnow /> }.into_any(), "Mountain Snow"),
1427-
(view! { <Mouse /> }.into_any(), "Mouse"),
14281428
]
14291429
key=|icon| icon.1
14301430
children=move |(icon, name)| {
@@ -1442,6 +1442,8 @@ pub fn IconsM2() -> impl IntoView {
14421442
view! {
14431443
<For
14441444
each=move || [
1445+
(view! { <MountainSnow /> }.into_any(), "Mountain Snow"),
1446+
(view! { <Mouse /> }.into_any(), "Mouse"),
14451447
(view! { <MouseOff /> }.into_any(), "Mouse Off"),
14461448
(view! { <MousePointer /> }.into_any(), "Mouse Pointer"),
14471449
(view! { <MousePointer2 /> }.into_any(), "Mouse Pointer 2"),

book-examples/yew/src/icons.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,8 @@ pub fn IconsM() -> Html {
13381338
(html! { <Minimize /> }, "Minimize"),
13391339
(html! { <Minimize2 /> }, "Minimize 2"),
13401340
(html! { <Minus /> }, "Minus"),
1341+
(html! { <MirrorRectangular /> }, "Mirror Rectangular"),
1342+
(html! { <MirrorRound /> }, "Mirror Round"),
13411343
(html! { <Monitor /> }, "Monitor"),
13421344
(html! { <MonitorCheck /> }, "Monitor Check"),
13431345
(html! { <MonitorCloud /> }, "Monitor Cloud"),

packages/dioxus/src/clipboard_pen.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ pub fn ClipboardPen(props: ClipboardPenProps) -> Element {
3434
"stroke-width": "{stroke_width}",
3535
"stroke-linecap": "round",
3636
"stroke-linejoin": "round",
37+
path { "d": "M16 4h2a2 2 0 0 1 2 2v2" }
38+
path { "d": "M21.34 15.664a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }
39+
path { "d": "M8 22H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }
3740
rect {
38-
"width": "8",
39-
"height": "4",
4041
"x": "8",
4142
"y": "2",
43+
"width": "8",
44+
"height": "4",
4245
"rx": "1",
4346
}
44-
path { "d": "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-5.5" }
45-
path { "d": "M4 13.5V6a2 2 0 0 1 2-2h2" }
46-
path { "d": "M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }
4747
}
4848
}
4949
}

packages/dioxus/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,6 +2419,10 @@ mod minimize_2;
24192419
feature = "tools"
24202420
))]
24212421
mod minus;
2422+
#[cfg(any(feature = "science", feature = "home", feature = "tools"))]
2423+
mod mirror_rectangular;
2424+
#[cfg(any(feature = "science", feature = "home", feature = "tools"))]
2425+
mod mirror_round;
24222426
#[cfg(any(feature = "connectivity", feature = "devices"))]
24232427
mod monitor;
24242428
#[cfg(any(feature = "connectivity", feature = "devices"))]
@@ -6645,6 +6649,10 @@ pub use minimize_2::*;
66456649
feature = "tools"
66466650
))]
66476651
pub use minus::*;
6652+
#[cfg(any(feature = "science", feature = "home", feature = "tools"))]
6653+
pub use mirror_rectangular::*;
6654+
#[cfg(any(feature = "science", feature = "home", feature = "tools"))]
6655+
pub use mirror_round::*;
66486656
#[cfg(any(feature = "connectivity", feature = "devices"))]
66496657
pub use monitor::*;
66506658
#[cfg(any(feature = "connectivity", feature = "devices"))]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
use dioxus::prelude::*;
2+
#[derive(Clone, PartialEq, Props)]
3+
pub struct MirrorRectangularProps {
4+
#[props(default = 24)]
5+
pub size: usize,
6+
#[props(default = "currentColor".to_owned())]
7+
pub color: String,
8+
#[props(default = "none".to_owned())]
9+
pub fill: String,
10+
#[props(default = 2)]
11+
pub stroke_width: usize,
12+
#[props(default = false)]
13+
pub absolute_stroke_width: bool,
14+
pub class: Option<String>,
15+
pub style: Option<String>,
16+
}
17+
#[component]
18+
pub fn MirrorRectangular(props: MirrorRectangularProps) -> Element {
19+
let stroke_width = if props.absolute_stroke_width {
20+
props.stroke_width * 24 / props.size
21+
} else {
22+
props.stroke_width
23+
};
24+
rsx! {
25+
svg {
26+
"xmlns": "http://www.w3.org/2000/svg",
27+
"class": if let Some(class) = props.class { "{class}" },
28+
"style": if let Some(style) = props.style { "{style}" },
29+
"width": "{props.size}",
30+
"height": "{props.size}",
31+
"viewBox": "0 0 24 24",
32+
"fill": "{props.fill}",
33+
"stroke": "{props.color}",
34+
"stroke-width": "{stroke_width}",
35+
"stroke-linecap": "round",
36+
"stroke-linejoin": "round",
37+
path { "d": "M11 6 8 9" }
38+
path { "d": "m16 7-8 8" }
39+
rect {
40+
"x": "4",
41+
"y": "2",
42+
"width": "16",
43+
"height": "20",
44+
"rx": "2",
45+
}
46+
}
47+
}
48+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
use dioxus::prelude::*;
2+
#[derive(Clone, PartialEq, Props)]
3+
pub struct MirrorRoundProps {
4+
#[props(default = 24)]
5+
pub size: usize,
6+
#[props(default = "currentColor".to_owned())]
7+
pub color: String,
8+
#[props(default = "none".to_owned())]
9+
pub fill: String,
10+
#[props(default = 2)]
11+
pub stroke_width: usize,
12+
#[props(default = false)]
13+
pub absolute_stroke_width: bool,
14+
pub class: Option<String>,
15+
pub style: Option<String>,
16+
}
17+
#[component]
18+
pub fn MirrorRound(props: MirrorRoundProps) -> Element {
19+
let stroke_width = if props.absolute_stroke_width {
20+
props.stroke_width * 24 / props.size
21+
} else {
22+
props.stroke_width
23+
};
24+
rsx! {
25+
svg {
26+
"xmlns": "http://www.w3.org/2000/svg",
27+
"class": if let Some(class) = props.class { "{class}" },
28+
"style": if let Some(style) = props.style { "{style}" },
29+
"width": "{props.size}",
30+
"height": "{props.size}",
31+
"viewBox": "0 0 24 24",
32+
"fill": "{props.fill}",
33+
"stroke": "{props.color}",
34+
"stroke-width": "{stroke_width}",
35+
"stroke-linecap": "round",
36+
"stroke-linejoin": "round",
37+
path { "d": "M10 6.6 8.6 8" }
38+
path { "d": "M12 18v4" }
39+
path { "d": "M15 7.5 9.5 13" }
40+
path { "d": "M7 22h10" }
41+
circle { "cx": "12", "cy": "10", "r": "8" }
42+
}
43+
}
44+
}

packages/icon-name/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! See [the Rust Lucide book](https://lucide.rustforweb.org/) for more documenation.
66
77
/// [Lucide](https://lucide.dev/) icon names.
8-
pub static ICON_NAMES: [&str; 1676usize] = [
8+
pub static ICON_NAMES: [&str; 1678usize] = [
99
"a-arrow-down",
1010
"a-arrow-up",
1111
"a-large-small",
@@ -1014,6 +1014,8 @@ pub static ICON_NAMES: [&str; 1676usize] = [
10141014
"minimize",
10151015
"minimize-2",
10161016
"minus",
1017+
"mirror-rectangular",
1018+
"mirror-round",
10171019
"monitor",
10181020
"monitor-check",
10191021
"monitor-cloud",

packages/leptos/src/clipboard_pen.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ pub fn ClipboardPen(
2929
stroke-linecap="round"
3030
stroke-linejoin="round"
3131
>
32-
<rect width="8" height="4" x="8" y="2" rx="1" />
33-
<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-5.5" />
34-
<path d="M4 13.5V6a2 2 0 0 1 2-2h2" />
35-
<path d="M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" />
32+
<path d="M16 4h2a2 2 0 0 1 2 2v2" />
33+
<path d="M21.34 15.664a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" />
34+
<path d="M8 22H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" />
35+
<rect x="8" y="2" width="8" height="4" rx="1" />
3636
</svg>
3737
}
3838
}

packages/leptos/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,6 +2419,10 @@ mod minimize_2;
24192419
feature = "tools"
24202420
))]
24212421
mod minus;
2422+
#[cfg(any(feature = "science", feature = "home", feature = "tools"))]
2423+
mod mirror_rectangular;
2424+
#[cfg(any(feature = "science", feature = "home", feature = "tools"))]
2425+
mod mirror_round;
24222426
#[cfg(any(feature = "connectivity", feature = "devices"))]
24232427
mod monitor;
24242428
#[cfg(any(feature = "connectivity", feature = "devices"))]
@@ -6645,6 +6649,10 @@ pub use minimize_2::*;
66456649
feature = "tools"
66466650
))]
66476651
pub use minus::*;
6652+
#[cfg(any(feature = "science", feature = "home", feature = "tools"))]
6653+
pub use mirror_rectangular::*;
6654+
#[cfg(any(feature = "science", feature = "home", feature = "tools"))]
6655+
pub use mirror_round::*;
66486656
#[cfg(any(feature = "connectivity", feature = "devices"))]
66496657
pub use monitor::*;
66506658
#[cfg(any(feature = "connectivity", feature = "devices"))]

0 commit comments

Comments
 (0)