Skip to content

Commit d12419c

Browse files
feat: update to upstream v0.572.0 (#279)
Co-authored-by: rust-for-web[bot] <191031261+rust-for-web[bot]@users.noreply.github.com>
1 parent 1826c2c commit d12419c

11 files changed

Lines changed: 157 additions & 9 deletions

File tree

book-examples/dioxus/src/icons.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6115,6 +6115,12 @@ pub fn IconsM1() -> Element {
61156115
},
61166116
"Message Circle",
61176117
),
6118+
(
6119+
rsx! {
6120+
MessageCircleCheck {}
6121+
},
6122+
"Message Circle Check",
6123+
),
61186124
(
61196125
rsx! {
61206126
MessageCircleCode {}
@@ -6463,12 +6469,6 @@ pub fn IconsM1() -> Element {
64636469
},
64646470
"Motorbike",
64656471
),
6466-
(
6467-
rsx! {
6468-
Mountain {}
6469-
},
6470-
"Mountain",
6471-
),
64726472
];
64736473
rsx! {
64746474
for (icon , name) in icons {
@@ -6484,6 +6484,12 @@ pub fn IconsM1() -> Element {
64846484
#[component]
64856485
pub fn IconsM2() -> Element {
64866486
let icons = [
6487+
(
6488+
rsx! {
6489+
Mountain {}
6490+
},
6491+
"Mountain",
6492+
),
64876493
(
64886494
rsx! {
64896495
MountainSnow {}

book-examples/leptos/src/icons.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,7 @@ pub fn IconsM1() -> impl IntoView {
13631363
(view! { <Menu /> }.into_any(), "Menu"),
13641364
(view! { <Merge /> }.into_any(), "Merge"),
13651365
(view! { <MessageCircle /> }.into_any(), "Message Circle"),
1366+
(view! { <MessageCircleCheck /> }.into_any(), "Message Circle Check"),
13661367
(view! { <MessageCircleCode /> }.into_any(), "Message Circle Code"),
13671368
(view! { <MessageCircleDashed /> }.into_any(), "Message Circle Dashed"),
13681369
(view! { <MessageCircleHeart /> }.into_any(), "Message Circle Heart"),
@@ -1424,7 +1425,6 @@ pub fn IconsM1() -> impl IntoView {
14241425
(view! { <Moon /> }.into_any(), "Moon"),
14251426
(view! { <MoonStar /> }.into_any(), "Moon Star"),
14261427
(view! { <Motorbike /> }.into_any(), "Motorbike"),
1427-
(view! { <Mountain /> }.into_any(), "Mountain"),
14281428
]
14291429
key=|icon| icon.1
14301430
children=move |(icon, name)| {
@@ -1442,6 +1442,7 @@ pub fn IconsM2() -> impl IntoView {
14421442
view! {
14431443
<For
14441444
each=move || [
1445+
(view! { <Mountain /> }.into_any(), "Mountain"),
14451446
(view! { <MountainSnow /> }.into_any(), "Mountain Snow"),
14461447
(view! { <Mouse /> }.into_any(), "Mouse"),
14471448
(view! { <MouseOff /> }.into_any(), "Mouse Off"),

book-examples/yew/src/icons.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,7 @@ pub fn IconsM() -> Html {
12961296
(html! { <Menu /> }, "Menu"),
12971297
(html! { <Merge /> }, "Merge"),
12981298
(html! { <MessageCircle /> }, "Message Circle"),
1299+
(html! { <MessageCircleCheck /> }, "Message Circle Check"),
12991300
(html! { <MessageCircleCode /> }, "Message Circle Code"),
13001301
(html! { <MessageCircleDashed /> }, "Message Circle Dashed"),
13011302
(html! { <MessageCircleHeart /> }, "Message Circle Heart"),

packages/dioxus/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2321,6 +2321,8 @@ mod menu;
23212321
mod merge;
23222322
#[cfg(feature = "social")]
23232323
mod message_circle;
2324+
#[cfg(any(feature = "social", feature = "account"))]
2325+
mod message_circle_check;
23242326
#[cfg(any(feature = "development", feature = "social"))]
23252327
mod message_circle_code;
23262328
#[cfg(feature = "social")]
@@ -6555,6 +6557,8 @@ pub use menu::*;
65556557
pub use merge::*;
65566558
#[cfg(feature = "social")]
65576559
pub use message_circle::*;
6560+
#[cfg(any(feature = "social", feature = "account"))]
6561+
pub use message_circle_check::*;
65586562
#[cfg(any(feature = "development", feature = "social"))]
65596563
pub use message_circle_code::*;
65606564
#[cfg(feature = "social")]
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
use dioxus::prelude::*;
2+
#[derive(Clone, PartialEq, Props)]
3+
pub struct MessageCircleCheckProps {
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 MessageCircleCheck(props: MessageCircleCheckProps) -> 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": "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }
38+
path { "d": "m9 12 2 2 4-4" }
39+
}
40+
}
41+
}

packages/icon-name/src/lib.rs

Lines changed: 2 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; 1680usize] = [
8+
pub static ICON_NAMES: [&str; 1681usize] = [
99
"a-arrow-down",
1010
"a-arrow-up",
1111
"a-large-small",
@@ -975,6 +975,7 @@ pub static ICON_NAMES: [&str; 1680usize] = [
975975
"menu",
976976
"merge",
977977
"message-circle",
978+
"message-circle-check",
978979
"message-circle-code",
979980
"message-circle-dashed",
980981
"message-circle-heart",

packages/leptos/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2321,6 +2321,8 @@ mod menu;
23212321
mod merge;
23222322
#[cfg(feature = "social")]
23232323
mod message_circle;
2324+
#[cfg(any(feature = "social", feature = "account"))]
2325+
mod message_circle_check;
23242326
#[cfg(any(feature = "development", feature = "social"))]
23252327
mod message_circle_code;
23262328
#[cfg(feature = "social")]
@@ -6555,6 +6557,8 @@ pub use menu::*;
65556557
pub use merge::*;
65566558
#[cfg(feature = "social")]
65576559
pub use message_circle::*;
6560+
#[cfg(any(feature = "social", feature = "account"))]
6561+
pub use message_circle_check::*;
65586562
#[cfg(any(feature = "development", feature = "social"))]
65596563
pub use message_circle_code::*;
65606564
#[cfg(feature = "social")]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
use leptos::{prelude::*, svg::Svg};
2+
#[component]
3+
pub fn MessageCircleCheck(
4+
#[prop(default = 24.into(), into)] size: Signal<usize>,
5+
#[prop(default = "currentColor".into(), into)] color: Signal<String>,
6+
#[prop(default = "none".into(), into)] fill: Signal<String>,
7+
#[prop(default = 2.into(), into)] stroke_width: Signal<usize>,
8+
#[prop(default = false.into(), into)] absolute_stroke_width: Signal<bool>,
9+
#[prop(optional)] node_ref: NodeRef<Svg>,
10+
) -> impl IntoView {
11+
let stroke_width = Signal::derive(move || {
12+
if absolute_stroke_width.get() {
13+
stroke_width.get() * 24 / size.get()
14+
} else {
15+
stroke_width.get()
16+
}
17+
});
18+
view! {
19+
<svg
20+
node_ref=node_ref
21+
class:lucide=true
22+
xmlns="http://www.w3.org/2000/svg"
23+
width=size
24+
height=size
25+
viewBox="0 0 24 24"
26+
fill=fill
27+
stroke=color
28+
stroke-width=stroke_width
29+
stroke-linecap="round"
30+
stroke-linejoin="round"
31+
>
32+
<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" />
33+
<path d="m9 12 2 2 4-4" />
34+
</svg>
35+
}
36+
}

packages/yew/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,6 +2323,8 @@ mod menu;
23232323
mod merge;
23242324
#[cfg(feature = "social")]
23252325
mod message_circle;
2326+
#[cfg(any(feature = "social", feature = "account"))]
2327+
mod message_circle_check;
23262328
#[cfg(any(feature = "development", feature = "social"))]
23272329
mod message_circle_code;
23282330
#[cfg(feature = "social")]
@@ -6557,6 +6559,8 @@ pub use menu::*;
65576559
pub use merge::*;
65586560
#[cfg(feature = "social")]
65596561
pub use message_circle::*;
6562+
#[cfg(any(feature = "social", feature = "account"))]
6563+
pub use message_circle_check::*;
65606564
#[cfg(any(feature = "development", feature = "social"))]
65616565
pub use message_circle_code::*;
65626566
#[cfg(feature = "social")]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
use yew::prelude::*;
2+
#[derive(PartialEq, Properties)]
3+
pub struct MessageCircleCheckProps {
4+
#[prop_or(24)]
5+
pub size: usize,
6+
#[prop_or(AttrValue::from("currentColor"))]
7+
pub color: AttrValue,
8+
#[prop_or(AttrValue::from("none"))]
9+
pub fill: AttrValue,
10+
#[prop_or(2)]
11+
pub stroke_width: usize,
12+
#[prop_or(false)]
13+
pub absolute_stroke_width: bool,
14+
#[prop_or_default]
15+
pub class: Classes,
16+
#[prop_or_default]
17+
pub style: std::option::Option<AttrValue>,
18+
#[prop_or_default]
19+
pub node_ref: NodeRef,
20+
}
21+
#[component]
22+
pub fn MessageCircleCheck(props: &MessageCircleCheckProps) -> Html {
23+
let stroke_width = if props.absolute_stroke_width {
24+
props.stroke_width * 24 / props.size
25+
} else {
26+
props.stroke_width
27+
};
28+
html! {
29+
<svg
30+
ref={props.node_ref.clone()}
31+
class={classes!("lucide", props.class
32+
.clone())}
33+
style={props.style.clone()}
34+
xmlns="http://www.w3.org/2000/svg"
35+
width={props.size.to_string()}
36+
height={props.size.to_string()}
37+
viewBox="0 0 24 24"
38+
fill={& props.fill}
39+
stroke={& props.color}
40+
stroke-width={stroke_width.to_string()}
41+
stroke-linecap="round"
42+
stroke-linejoin="round"
43+
>
44+
<path
45+
d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"
46+
/>
47+
<path d="m9 12 2 2 4-4" />
48+
</svg>
49+
}
50+
}

0 commit comments

Comments
 (0)