Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions book-examples/dioxus/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6210,6 +6210,12 @@ pub fn IconsM1() -> Element {
},
"Monitor Check",
),
(
rsx! {
MonitorCloud {}
},
"Monitor Cloud",
),
(
rsx! {
MonitorCog {}
Expand Down Expand Up @@ -6312,12 +6318,6 @@ pub fn IconsM1() -> Element {
},
"Mouse",
),
(
rsx! {
MouseOff {}
},
"Mouse Off",
),
];
rsx! {
for (icon , name) in icons {
Expand All @@ -6333,6 +6333,12 @@ pub fn IconsM1() -> Element {
#[component]
pub fn IconsM2() -> Element {
let icons = [
(
rsx! {
MouseOff {}
},
"Mouse Off",
),
(
rsx! {
MousePointer {}
Expand Down
1 change: 1 addition & 0 deletions book-examples/leptos/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,7 @@ pub fn IconsM() -> impl IntoView {
(view! { <Minus /> }.into_any(), "Minus"),
(view! { <Monitor /> }.into_any(), "Monitor"),
(view! { <MonitorCheck /> }.into_any(), "Monitor Check"),
(view! { <MonitorCloud /> }.into_any(), "Monitor Cloud"),
(view! { <MonitorCog /> }.into_any(), "Monitor Cog"),
(view! { <MonitorDot /> }.into_any(), "Monitor Dot"),
(view! { <MonitorDown /> }.into_any(), "Monitor Down"),
Expand Down
1 change: 1 addition & 0 deletions book-examples/yew/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,7 @@ pub fn IconsM() -> Html {
(html! { <Minus /> }, "Minus"),
(html! { <Monitor /> }, "Monitor"),
(html! { <MonitorCheck /> }, "Monitor Check"),
(html! { <MonitorCloud /> }, "Monitor Cloud"),
(html! { <MonitorCog /> }, "Monitor Cog"),
(html! { <MonitorDot /> }, "Monitor Dot"),
(html! { <MonitorDown /> }, "Monitor Down"),
Expand Down
4 changes: 4 additions & 0 deletions packages/dioxus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2391,6 +2391,8 @@ mod minus;
mod monitor;
#[cfg(any(feature = "connectivity", feature = "devices"))]
mod monitor_check;
#[cfg(any(feature = "connectivity", feature = "devices", feature = "development"))]
mod monitor_cloud;
#[cfg(any(feature = "connectivity", feature = "devices"))]
mod monitor_cog;
#[cfg(any(feature = "connectivity", feature = "devices"))]
Expand Down Expand Up @@ -6552,6 +6554,8 @@ pub use minus::*;
pub use monitor::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
pub use monitor_check::*;
#[cfg(any(feature = "connectivity", feature = "devices", feature = "development"))]
pub use monitor_cloud::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
pub use monitor_cog::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
Expand Down
49 changes: 49 additions & 0 deletions packages/dioxus/src/monitor_cloud.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
use dioxus::prelude::*;
#[derive(Clone, PartialEq, Props)]
pub struct MonitorCloudProps {
#[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<String>,
pub style: Option<String>,
}
#[component]
pub fn MonitorCloud(props: MonitorCloudProps) -> 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": "M11 13a3 3 0 1 1 2.83-4H14a2 2 0 0 1 0 4z" }
path { "d": "M12 17v4" }
path { "d": "M8 21h8" }
rect {
"x": "2",
"y": "3",
"width": "20",
"height": "14",
"rx": "2",
}
}
}
}
4 changes: 2 additions & 2 deletions packages/dioxus/src/receipt_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ pub fn ReceiptText(props: ReceiptTextProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }
path { "d": "M13 16H8" }
path { "d": "M14 8H8" }
path { "d": "M16 12H8" }
path { "d": "M13 16H8" }
path { "d": "M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z" }
}
}
}
23 changes: 4 additions & 19 deletions packages/dioxus/src/sword.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,10 @@ pub fn Sword(props: SwordProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
polyline { "points": "14.5 17.5 3 6 3 3 6 3 17.5 14.5" }
line {
"x1": "13",
"x2": "19",
"y1": "19",
"y2": "13",
}
line {
"x1": "16",
"x2": "20",
"y1": "16",
"y2": "20",
}
line {
"x1": "19",
"x2": "21",
"y1": "21",
"y2": "19",
}
path { "d": "m11 19-6-6" }
path { "d": "m5 21-2-2" }
path { "d": "m8 16-4 4" }
path { "d": "M9.5 17.5 21 6V3h-3L6.5 14.5" }
}
}
}
4 changes: 4 additions & 0 deletions packages/leptos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2391,6 +2391,8 @@ mod minus;
mod monitor;
#[cfg(any(feature = "connectivity", feature = "devices"))]
mod monitor_check;
#[cfg(any(feature = "connectivity", feature = "devices", feature = "development"))]
mod monitor_cloud;
#[cfg(any(feature = "connectivity", feature = "devices"))]
mod monitor_cog;
#[cfg(any(feature = "connectivity", feature = "devices"))]
Expand Down Expand Up @@ -6552,6 +6554,8 @@ pub use minus::*;
pub use monitor::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
pub use monitor_check::*;
#[cfg(any(feature = "connectivity", feature = "devices", feature = "development"))]
pub use monitor_cloud::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
pub use monitor_cog::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
Expand Down
38 changes: 38 additions & 0 deletions packages/leptos/src/monitor_cloud.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
use leptos::{prelude::*, svg::Svg};
#[component]
pub fn MonitorCloud(
#[prop(default = 24.into(), into)] size: Signal<usize>,
#[prop(default = "currentColor".into(), into)] color: Signal<String>,
#[prop(default = "none".into(), into)] fill: Signal<String>,
#[prop(default = 2.into(), into)] stroke_width: Signal<usize>,
#[prop(default = false.into(), into)] absolute_stroke_width: Signal<bool>,
#[prop(optional)] node_ref: NodeRef<Svg>,
) -> impl IntoView {
let stroke_width = Signal::derive(move || {
if absolute_stroke_width.get() {
stroke_width.get() * 24 / size.get()
} else {
stroke_width.get()
}
});
view! {
<svg
node_ref=node_ref
class:lucide=true
xmlns="http://www.w3.org/2000/svg"
width=size
height=size
viewBox="0 0 24 24"
fill=fill
stroke=color
stroke-width=stroke_width
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M11 13a3 3 0 1 1 2.83-4H14a2 2 0 0 1 0 4z" />
<path d="M12 17v4" />
<path d="M8 21h8" />
<rect x="2" y="3" width="20" height="14" rx="2" />
</svg>
}
}
4 changes: 2 additions & 2 deletions packages/leptos/src/receipt_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ pub fn ReceiptText(
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" />
<path d="M13 16H8" />
<path d="M14 8H8" />
<path d="M16 12H8" />
<path d="M13 16H8" />
<path d="M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z" />
</svg>
}
}
8 changes: 4 additions & 4 deletions packages/leptos/src/sword.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ pub fn Sword(
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="14.5 17.5 3 6 3 3 6 3 17.5 14.5" />
<line x1="13" x2="19" y1="19" y2="13" />
<line x1="16" x2="20" y1="16" y2="20" />
<line x1="19" x2="21" y1="21" y2="19" />
<path d="m11 19-6-6" />
<path d="m5 21-2-2" />
<path d="m8 16-4 4" />
<path d="M9.5 17.5 21 6V3h-3L6.5 14.5" />
</svg>
}
}
4 changes: 4 additions & 0 deletions packages/yew/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2393,6 +2393,8 @@ mod minus;
mod monitor;
#[cfg(any(feature = "connectivity", feature = "devices"))]
mod monitor_check;
#[cfg(any(feature = "connectivity", feature = "devices", feature = "development"))]
mod monitor_cloud;
#[cfg(any(feature = "connectivity", feature = "devices"))]
mod monitor_cog;
#[cfg(any(feature = "connectivity", feature = "devices"))]
Expand Down Expand Up @@ -6554,6 +6556,8 @@ pub use minus::*;
pub use monitor::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
pub use monitor_check::*;
#[cfg(any(feature = "connectivity", feature = "devices", feature = "development"))]
pub use monitor_cloud::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
pub use monitor_cog::*;
#[cfg(any(feature = "connectivity", feature = "devices"))]
Expand Down
50 changes: 50 additions & 0 deletions packages/yew/src/monitor_cloud.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
use yew::prelude::*;
#[derive(PartialEq, Properties)]
pub struct MonitorCloudProps {
#[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<AttrValue>,
#[prop_or_default]
pub node_ref: NodeRef,
}
#[function_component]
pub fn MonitorCloud(props: &MonitorCloudProps) -> Html {
let stroke_width = if props.absolute_stroke_width {
props.stroke_width * 24 / props.size
} else {
props.stroke_width
};
html! {
<svg
ref={props.node_ref.clone()}
class={classes!("lucide", props.class
.clone())}
style={props.style.clone()}
xmlns="http://www.w3.org/2000/svg"
width={props.size.to_string()}
height={props.size.to_string()}
viewBox="0 0 24 24"
fill={& props.fill}
stroke={& props.color}
stroke-width={stroke_width.to_string()}
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M11 13a3 3 0 1 1 2.83-4H14a2 2 0 0 1 0 4z" />
<path d="M12 17v4" />
<path d="M8 21h8" />
<rect x="2" y="3" width="20" height="14" rx="2" />
</svg>
}
}
6 changes: 4 additions & 2 deletions packages/yew/src/receipt_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ pub fn ReceiptText(props: &ReceiptTextProps) -> Html {
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" />
<path d="M13 16H8" />
<path d="M14 8H8" />
<path d="M16 12H8" />
<path d="M13 16H8" />
<path
d="M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z"
/>
</svg>
}
}
8 changes: 4 additions & 4 deletions packages/yew/src/sword.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ pub fn Sword(props: &SwordProps) -> Html {
stroke-linecap="round"
stroke-linejoin="round"
>
<polyline points="14.5 17.5 3 6 3 3 6 3 17.5 14.5" />
<line x1="13" x2="19" y1="19" y2="13" />
<line x1="16" x2="20" y1="16" y2="20" />
<line x1="19" x2="21" y1="21" y2="19" />
<path d="m11 19-6-6" />
<path d="m5 21-2-2" />
<path d="m8 16-4 4" />
<path d="M9.5 17.5 21 6V3h-3L6.5 14.5" />
</svg>
}
}
2 changes: 1 addition & 1 deletion scripts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.545.0";
pub const UPSTREAM_GIT_REF: &str = "0.546.0";
pub const UPSTREAM_GITHUB_URL: &str = "https://github.com/lucide-icons/lucide";