Skip to content

Commit a619ebd

Browse files
feat: update to upstream v0.568.0 (#273)
Co-authored-by: rust-for-web[bot] <191031261+rust-for-web[bot]@users.noreply.github.com>
1 parent 66b20eb commit a619ebd

14 files changed

Lines changed: 169 additions & 14 deletions

File tree

book-examples/dioxus/src/icons.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4615,6 +4615,12 @@ pub fn IconsG1() -> Element {
46154615
},
46164616
"Git Merge",
46174617
),
4618+
(
4619+
rsx! {
4620+
GitMergeConflict {}
4621+
},
4622+
"Git Merge Conflict",
4623+
),
46184624
(
46194625
rsx! {
46204626
GitPullRequest {}

book-examples/leptos/src/icons.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,7 @@ pub fn IconsG1() -> impl IntoView {
10231023
(view! { <GitFork /> }.into_any(), "Git Fork"),
10241024
(view! { <GitGraph /> }.into_any(), "Git Graph"),
10251025
(view! { <GitMerge /> }.into_any(), "Git Merge"),
1026+
(view! { <GitMergeConflict /> }.into_any(), "Git Merge Conflict"),
10261027
(view! { <GitPullRequest /> }.into_any(), "Git Pull Request"),
10271028
(view! { <GitPullRequestArrow /> }.into_any(), "Git Pull Request Arrow"),
10281029
(view! { <GitPullRequestClosed /> }.into_any(), "Git Pull Request Closed"),

book-examples/yew/src/icons.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ pub fn IconsG() -> Html {
953953
(html! { <GitFork /> }, "Git Fork"),
954954
(html! { <GitGraph /> }, "Git Graph"),
955955
(html! { <GitMerge /> }, "Git Merge"),
956+
(html! { <GitMergeConflict /> }, "Git Merge Conflict"),
956957
(html! { <GitPullRequest /> }, "Git Pull Request"),
957958
(html! { <GitPullRequestArrow /> }, "Git Pull Request Arrow"),
958959
(

packages/dioxus/src/clapperboard.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ pub fn Clapperboard(props: ClapperboardProps) -> Element {
3434
"stroke-width": "{stroke_width}",
3535
"stroke-linecap": "round",
3636
"stroke-linejoin": "round",
37-
path { "d": "M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z" }
38-
path { "d": "m6.2 5.3 3.1 3.9" }
39-
path { "d": "m12.4 3.4 3.1 4" }
40-
path { "d": "M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" }
37+
path { "d": "m12.296 3.464 3.02 3.956" }
38+
path { "d": "M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z" }
39+
path { "d": "M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }
40+
path { "d": "m6.18 5.276 3.1 3.899" }
4141
}
4242
}
4343
}
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 GitMergeConflictProps {
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 GitMergeConflict(props: GitMergeConflictProps) -> 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 6h4a2 2 0 0 1 2 2v7" }
38+
path { "d": "M6 12v9" }
39+
path { "d": "M9 3 3 9" }
40+
path { "d": "M9 9 3 3" }
41+
circle { "cx": "18", "cy": "18", "r": "3" }
42+
}
43+
}
44+
}

packages/dioxus/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,8 @@ mod git_graph;
17221722
#[cfg(feature = "development")]
17231723
mod git_merge;
17241724
#[cfg(feature = "development")]
1725+
mod git_merge_conflict;
1726+
#[cfg(feature = "development")]
17251727
mod git_pull_request;
17261728
#[cfg(any(feature = "development", feature = "arrows"))]
17271729
mod git_pull_request_arrow;
@@ -5946,6 +5948,8 @@ pub use git_graph::*;
59465948
#[cfg(feature = "development")]
59475949
pub use git_merge::*;
59485950
#[cfg(feature = "development")]
5951+
pub use git_merge_conflict::*;
5952+
#[cfg(feature = "development")]
59495953
pub use git_pull_request::*;
59505954
#[cfg(any(feature = "development", feature = "arrows"))]
59515955
pub use git_pull_request_arrow::*;

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; 1675usize] = [
8+
pub static ICON_NAMES: [&str; 1676usize] = [
99
"a-arrow-down",
1010
"a-arrow-up",
1111
"a-large-small",
@@ -740,6 +740,7 @@ pub static ICON_NAMES: [&str; 1675usize] = [
740740
"git-fork",
741741
"git-graph",
742742
"git-merge",
743+
"git-merge-conflict",
743744
"git-pull-request",
744745
"git-pull-request-arrow",
745746
"git-pull-request-closed",

packages/leptos/src/clapperboard.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ pub fn Clapperboard(
2929
stroke-linecap="round"
3030
stroke-linejoin="round"
3131
>
32-
<path d="M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z" />
33-
<path d="m6.2 5.3 3.1 3.9" />
34-
<path d="m12.4 3.4 3.1 4" />
35-
<path d="M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" />
32+
<path d="m12.296 3.464 3.02 3.956" />
33+
<path d="M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z" />
34+
<path d="M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
35+
<path d="m6.18 5.276 3.1 3.899" />
3636
</svg>
3737
}
3838
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
use leptos::{prelude::*, svg::Svg};
2+
#[component]
3+
pub fn GitMergeConflict(
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 6h4a2 2 0 0 1 2 2v7" />
33+
<path d="M6 12v9" />
34+
<path d="M9 3 3 9" />
35+
<path d="M9 9 3 3" />
36+
<circle cx="18" cy="18" r="3" />
37+
</svg>
38+
}
39+
}

packages/leptos/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,8 @@ mod git_graph;
17221722
#[cfg(feature = "development")]
17231723
mod git_merge;
17241724
#[cfg(feature = "development")]
1725+
mod git_merge_conflict;
1726+
#[cfg(feature = "development")]
17251727
mod git_pull_request;
17261728
#[cfg(any(feature = "development", feature = "arrows"))]
17271729
mod git_pull_request_arrow;
@@ -5946,6 +5948,8 @@ pub use git_graph::*;
59465948
#[cfg(feature = "development")]
59475949
pub use git_merge::*;
59485950
#[cfg(feature = "development")]
5951+
pub use git_merge_conflict::*;
5952+
#[cfg(feature = "development")]
59495953
pub use git_pull_request::*;
59505954
#[cfg(any(feature = "development", feature = "arrows"))]
59515955
pub use git_pull_request_arrow::*;

0 commit comments

Comments
 (0)