Skip to content

Commit 13275f5

Browse files
feat: update to upstream v0.551.0
1 parent b950e63 commit 13275f5

10 files changed

Lines changed: 155 additions & 7 deletions

File tree

book-examples/dioxus/src/icons.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,6 +2604,12 @@ pub fn IconsC2() -> Element {
26042604
},
26052605
"Clock Arrow Up",
26062606
),
2607+
(
2608+
rsx! {
2609+
ClockCheck {}
2610+
},
2611+
"Clock Check",
2612+
),
26072613
(
26082614
rsx! {
26092615
ClockFading {}
@@ -2772,12 +2778,6 @@ pub fn IconsC2() -> Element {
27722778
},
27732779
"Codesandbox",
27742780
),
2775-
(
2776-
rsx! {
2777-
Coffee {}
2778-
},
2779-
"Coffee",
2780-
),
27812781
];
27822782
rsx! {
27832783
for (icon , name) in icons {
@@ -2793,6 +2793,12 @@ pub fn IconsC2() -> Element {
27932793
#[component]
27942794
pub fn IconsC3() -> Element {
27952795
let icons = [
2796+
(
2797+
rsx! {
2798+
Coffee {}
2799+
},
2800+
"Coffee",
2801+
),
27962802
(
27972803
rsx! {
27982804
Cog {}

book-examples/leptos/src/icons.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ pub fn IconsC() -> impl IntoView {
537537
(view! { <ClockAlert /> }.into_any(), "Clock Alert"),
538538
(view! { <ClockArrowDown /> }.into_any(), "Clock Arrow Down"),
539539
(view! { <ClockArrowUp /> }.into_any(), "Clock Arrow Up"),
540+
(view! { <ClockCheck /> }.into_any(), "Clock Check"),
540541
(view! { <ClockFading /> }.into_any(), "Clock Fading"),
541542
(view! { <ClockPlus /> }.into_any(), "Clock Plus"),
542543
(view! { <ClosedCaption /> }.into_any(), "Closed Caption"),

book-examples/yew/src/icons.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ pub fn IconsC() -> Html {
566566
(html! { <ClockAlert /> }, "Clock Alert"),
567567
(html! { <ClockArrowDown /> }, "Clock Arrow Down"),
568568
(html! { <ClockArrowUp /> }, "Clock Arrow Up"),
569+
(html! { <ClockCheck /> }, "Clock Check"),
569570
(html! { <ClockFading /> }, "Clock Fading"),
570571
(html! { <ClockPlus /> }, "Clock Plus"),
571572
(html! { <ClosedCaption /> }, "Closed Caption"),

packages/dioxus/src/clock_check.rs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
use dioxus::prelude::*;
2+
#[derive(Clone, PartialEq, Props)]
3+
pub struct ClockCheckProps {
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 ClockCheck(props: ClockCheckProps) -> 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": "M12 6v6l4 2" }
38+
path { "d": "M22 12a10 10 0 1 0-11 9.95" }
39+
path { "d": "m22 16-5.5 5.5L14 19" }
40+
}
41+
}
42+
}

packages/dioxus/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,8 @@ mod clock_arrow_down;
976976
#[cfg(feature = "time")]
977977
mod clock_arrow_up;
978978
#[cfg(feature = "time")]
979+
mod clock_check;
980+
#[cfg(feature = "time")]
979981
mod clock_fading;
980982
#[cfg(feature = "time")]
981983
mod clock_plus;
@@ -5152,6 +5154,8 @@ pub use clock_arrow_down::*;
51525154
#[cfg(feature = "time")]
51535155
pub use clock_arrow_up::*;
51545156
#[cfg(feature = "time")]
5157+
pub use clock_check::*;
5158+
#[cfg(feature = "time")]
51555159
pub use clock_fading::*;
51565160
#[cfg(feature = "time")]
51575161
pub use clock_plus::*;

packages/leptos/src/clock_check.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
use leptos::{prelude::*, svg::Svg};
2+
#[component]
3+
pub fn ClockCheck(
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="M12 6v6l4 2" />
33+
<path d="M22 12a10 10 0 1 0-11 9.95" />
34+
<path d="m22 16-5.5 5.5L14 19" />
35+
</svg>
36+
}
37+
}

packages/leptos/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,8 @@ mod clock_arrow_down;
976976
#[cfg(feature = "time")]
977977
mod clock_arrow_up;
978978
#[cfg(feature = "time")]
979+
mod clock_check;
980+
#[cfg(feature = "time")]
979981
mod clock_fading;
980982
#[cfg(feature = "time")]
981983
mod clock_plus;
@@ -5152,6 +5154,8 @@ pub use clock_arrow_down::*;
51525154
#[cfg(feature = "time")]
51535155
pub use clock_arrow_up::*;
51545156
#[cfg(feature = "time")]
5157+
pub use clock_check::*;
5158+
#[cfg(feature = "time")]
51555159
pub use clock_fading::*;
51565160
#[cfg(feature = "time")]
51575161
pub use clock_plus::*;

packages/yew/src/clock_check.rs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
use yew::prelude::*;
2+
#[derive(PartialEq, Properties)]
3+
pub struct ClockCheckProps {
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+
#[function_component]
22+
pub fn ClockCheck(props: &ClockCheckProps) -> 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 d="M12 6v6l4 2" />
45+
<path d="M22 12a10 10 0 1 0-11 9.95" />
46+
<path d="m22 16-5.5 5.5L14 19" />
47+
</svg>
48+
}
49+
}

packages/yew/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,8 @@ mod clock_arrow_down;
978978
#[cfg(feature = "time")]
979979
mod clock_arrow_up;
980980
#[cfg(feature = "time")]
981+
mod clock_check;
982+
#[cfg(feature = "time")]
981983
mod clock_fading;
982984
#[cfg(feature = "time")]
983985
mod clock_plus;
@@ -5154,6 +5156,8 @@ pub use clock_arrow_down::*;
51545156
#[cfg(feature = "time")]
51555157
pub use clock_arrow_up::*;
51565158
#[cfg(feature = "time")]
5159+
pub use clock_check::*;
5160+
#[cfg(feature = "time")]
51575161
pub use clock_fading::*;
51585162
#[cfg(feature = "time")]
51595163
pub use clock_plus::*;

scripts/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ pub const GITHUB_OWNER: &str = "RustForWeb";
1111
pub const GITHUB_REPO: &str = "lucide";
1212

1313
pub const UPSTREAM_GIT_URL: &str = "https://github.com/lucide-icons/lucide.git";
14-
pub const UPSTREAM_GIT_REF: &str = "0.550.0";
14+
pub const UPSTREAM_GIT_REF: &str = "0.551.0";
1515
pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";

0 commit comments

Comments
 (0)