Skip to content
Open
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
34 changes: 20 additions & 14 deletions book-examples/dioxus/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2402,9 +2402,9 @@ pub fn IconsC2() -> Element {
),
(
rsx! {
CircleEuroSign {}
CircleEuro {}
},
"Circle Euro Sign",
"Circle Euro",
),
(
rsx! {
Expand Down Expand Up @@ -8196,6 +8196,12 @@ pub fn IconsS1() -> Element {
},
"Scan Barcode",
),
(
rsx! {
ScanBox {}
},
"Scan Box",
),
(
rsx! {
ScanEye {}
Expand Down Expand Up @@ -8688,12 +8694,6 @@ pub fn IconsS1() -> Element {
},
"Slice",
),
(
rsx! {
SlidersHorizontal {}
},
"Sliders Horizontal",
),
];
rsx! {
for (icon, name) in icons {
Expand All @@ -8709,6 +8709,12 @@ pub fn IconsS1() -> Element {
#[component]
pub fn IconsS2() -> Element {
let icons = [
(
rsx! {
SlidersHorizontal {}
},
"Sliders Horizontal",
),
(
rsx! {
SlidersVertical {}
Expand Down Expand Up @@ -9303,12 +9309,6 @@ pub fn IconsS2() -> Element {
},
"Squares Exclude",
),
(
rsx! {
SquaresIntersect {}
},
"Squares Intersect",
),
];
rsx! {
for (icon, name) in icons {
Expand All @@ -9324,6 +9324,12 @@ pub fn IconsS2() -> Element {
#[component]
pub fn IconsS3() -> Element {
let icons = [
(
rsx! {
SquaresIntersect {}
},
"Squares Intersect",
),
(
rsx! {
SquaresSubtract {}
Expand Down
7 changes: 4 additions & 3 deletions book-examples/leptos/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ pub fn IconsC2() -> impl IntoView {
(view! { <CircleDotDashed /> }.into_any(), "Circle Dot Dashed"),
(view! { <CircleEllipsis /> }.into_any(), "Circle Ellipsis"),
(view! { <CircleEqual /> }.into_any(), "Circle Equal"),
(view! { <CircleEuroSign /> }.into_any(), "Circle Euro Sign"),
(view! { <CircleEuro /> }.into_any(), "Circle Euro"),
(view! { <CircleFadingArrowUp /> }.into_any(), "Circle Fading Arrow Up"),
(view! { <CircleFadingPlus /> }.into_any(), "Circle Fading Plus"),
(view! { <CircleGauge /> }.into_any(), "Circle Gauge"),
Expand Down Expand Up @@ -1828,6 +1828,7 @@ pub fn IconsS1() -> impl IntoView {
(view! { <Scaling /> }.into_any(), "Scaling"),
(view! { <Scan /> }.into_any(), "Scan"),
(view! { <ScanBarcode /> }.into_any(), "Scan Barcode"),
(view! { <ScanBox /> }.into_any(), "Scan Box"),
(view! { <ScanEye /> }.into_any(), "Scan Eye"),
(view! { <ScanFace /> }.into_any(), "Scan Face"),
(view! { <ScanHeart /> }.into_any(), "Scan Heart"),
Expand Down Expand Up @@ -1910,7 +1911,6 @@ pub fn IconsS1() -> impl IntoView {
(view! { <Skull /> }.into_any(), "Skull"),
(view! { <Slash /> }.into_any(), "Slash"),
(view! { <Slice /> }.into_any(), "Slice"),
(view! { <SlidersHorizontal /> }.into_any(), "Sliders Horizontal"),
]
key=|icon| icon.1
children=move |(icon, name)| {
Expand All @@ -1928,6 +1928,7 @@ pub fn IconsS2() -> impl IntoView {
view! {
<For
each=move || [
(view! { <SlidersHorizontal /> }.into_any(), "Sliders Horizontal"),
(view! { <SlidersVertical /> }.into_any(), "Sliders Vertical"),
(view! { <Smartphone /> }.into_any(), "Smartphone"),
(view! { <SmartphoneCharging /> }.into_any(), "Smartphone Charging"),
Expand Down Expand Up @@ -2036,7 +2037,6 @@ pub fn IconsS2() -> impl IntoView {
(view! { <SquareUserRound /> }.into_any(), "Square User Round"),
(view! { <SquareX /> }.into_any(), "Square X"),
(view! { <SquaresExclude /> }.into_any(), "Squares Exclude"),
(view! { <SquaresIntersect /> }.into_any(), "Squares Intersect"),
]
key=|icon| icon.1
children=move |(icon, name)| {
Expand All @@ -2054,6 +2054,7 @@ pub fn IconsS3() -> impl IntoView {
view! {
<For
each=move || [
(view! { <SquaresIntersect /> }.into_any(), "Squares Intersect"),
(view! { <SquaresSubtract /> }.into_any(), "Squares Subtract"),
(view! { <SquaresUnite /> }.into_any(), "Squares Unite"),
(view! { <Squircle /> }.into_any(), "Squircle"),
Expand Down
3 changes: 2 additions & 1 deletion book-examples/yew/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ pub fn IconsC() -> Html {
(html! { <CircleDotDashed /> }, "Circle Dot Dashed"),
(html! { <CircleEllipsis /> }, "Circle Ellipsis"),
(html! { <CircleEqual /> }, "Circle Equal"),
(html! { <CircleEuroSign /> }, "Circle Euro Sign"),
(html! { <CircleEuro /> }, "Circle Euro"),
(html! { <CircleFadingArrowUp /> }, "Circle Fading Arrow Up"),
(html! { <CircleFadingPlus /> }, "Circle Fading Plus"),
(html! { <CircleGauge /> }, "Circle Gauge"),
Expand Down Expand Up @@ -1727,6 +1727,7 @@ pub fn IconsS() -> Html {
(html! { <Scaling /> }, "Scaling"),
(html! { <Scan /> }, "Scan"),
(html! { <ScanBarcode /> }, "Scan Barcode"),
(html! { <ScanBox /> }, "Scan Box"),
(html! { <ScanEye /> }, "Scan Eye"),
(html! { <ScanFace /> }, "Scan Face"),
(html! { <ScanHeart /> }, "Scan Heart"),
Expand Down
42 changes: 42 additions & 0 deletions packages/dioxus/src/circle_euro.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
use dioxus::prelude::*;
#[derive(Clone, PartialEq, Props)]
pub struct CircleEuroProps {
#[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 CircleEuro(props: CircleEuroProps) -> 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": "M15 9.4a4 4 0 1 0 0 5.2" }
path { "d": "M7 12h5" }
circle { "cx": "12", "cy": "12", "r": "10" }
}
}
}
4 changes: 2 additions & 2 deletions packages/dioxus/src/ethernet_port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ pub fn EthernetPort(props: EthernetPortProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "m15 20 3-3h2a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h2l3 3z" }
path { "d": "M6 8v1" }
path { "d": "M10 8v1" }
path { "d": "M14 8v1" }
path { "d": "M18 8v1" }
path { "d": "M19 17a2 2 0 00-1.765 1.059l-.47.882A2 2 0 0115 20H9a2 2 0 01-1.765-1.059l-.47-.882A2 2 0 005 17H4a2 2 0 01-2-2V6a2 2 0 012-2h16a2 2 0 012 2v9a2 2 0 01-2 2z" }
path { "d": "M6 8v1" }
}
}
}
10 changes: 5 additions & 5 deletions packages/dioxus/src/file_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ pub fn FileBox(props: FileBoxProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M14.5 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.8" }
path { "d": "M14 2v5a1 1 0 0 0 1 1h5" }
path { "d": "M11.7 14.2 7 17l-4.7-2.8" }
path { "d": "M3 13.1a2 2 0 0 0-.999 1.76v3.24a2 2 0 0 0 .969 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01z" }
path { "d": "M7 17v5" }
path { "d": "M14 2v5a1 1 0 001 1h5" }
path { "d": "M14.692 22H18a2 2 0 002-2V8a2.4 2.4 0 00-.706-1.706l-3.588-3.588A2.4 2.4 0 0014 2H6a2 2 0 00-2 2v3.804" }
path { "d": "M2.264 13.752 7 16.5l4.737-2.748" }
path { "d": "M2.995 13.014A2 2 0 002 14.744v3.516a2 2 0 00.996 1.73l3 1.74a2 2 0 002.008 0l3-1.74A2 2 0 0012 18.26v-3.517a2 2 0 00-.995-1.73l-3-1.742a2 2 0 00-1.892-.064z" }
path { "d": "M7 16.5V22" }
}
}
}
4 changes: 2 additions & 2 deletions packages/dioxus/src/hdmi_port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pub fn HdmiPort(props: HdmiPortProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M22 9a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h1l2 2h12l2-2h1a1 1 0 0 0 1-1Z" }
path { "d": "M7.5 12h9" }
path { "d": "M22 9a1 1 0 00-1-1H3a1 1 0 00-1 1v4a1 1 0 001 1h.5a2 2 0 011.6.8l.3.4A2 2 0 007 16h10a2 2 0 001.6-.8l.3-.4a2 2 0 011.6-.8h.5a1 1 0 001-1z" }
path { "d": "M8 12h8" }
}
}
}
22 changes: 18 additions & 4 deletions packages/dioxus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ mod circle_ellipsis;
#[cfg(feature = "math")]
mod circle_equal;
#[cfg(any(feature = "shopping", feature = "finance"))]
mod circle_euro_sign;
mod circle_euro;
#[cfg(any(feature = "arrows", feature = "development"))]
mod circle_fading_arrow_up;
#[cfg(any(feature = "communication", feature = "social"))]
Expand Down Expand Up @@ -1418,7 +1418,7 @@ mod file_archive;
mod file_axis_3_d;
#[cfg(feature = "files")]
mod file_badge;
#[cfg(feature = "files")]
#[cfg(any(feature = "files", feature = "design", feature = "development"))]
mod file_box;
#[cfg(any(feature = "files", feature = "development"))]
mod file_braces;
Expand Down Expand Up @@ -3167,6 +3167,13 @@ mod scaling;
mod scan;
#[cfg(any(feature = "shopping", feature = "devices"))]
mod scan_barcode;
#[cfg(any(
feature = "design",
feature = "devices",
feature = "shopping",
feature = "gaming"
))]
mod scan_box;
#[cfg(any(
feature = "photography",
feature = "multimedia",
Expand Down Expand Up @@ -5310,7 +5317,7 @@ pub use circle_ellipsis::*;
#[cfg(feature = "math")]
pub use circle_equal::*;
#[cfg(any(feature = "shopping", feature = "finance"))]
pub use circle_euro_sign::*;
pub use circle_euro::*;
#[cfg(any(feature = "arrows", feature = "development"))]
pub use circle_fading_arrow_up::*;
#[cfg(any(feature = "communication", feature = "social"))]
Expand Down Expand Up @@ -5856,7 +5863,7 @@ pub use file_archive::*;
pub use file_axis_3_d::*;
#[cfg(feature = "files")]
pub use file_badge::*;
#[cfg(feature = "files")]
#[cfg(any(feature = "files", feature = "design", feature = "development"))]
pub use file_box::*;
#[cfg(any(feature = "files", feature = "development"))]
pub use file_braces::*;
Expand Down Expand Up @@ -7605,6 +7612,13 @@ pub use scaling::*;
pub use scan::*;
#[cfg(any(feature = "shopping", feature = "devices"))]
pub use scan_barcode::*;
#[cfg(any(
feature = "design",
feature = "devices",
feature = "shopping",
feature = "gaming"
))]
pub use scan_box::*;
#[cfg(any(
feature = "photography",
feature = "multimedia",
Expand Down
46 changes: 46 additions & 0 deletions packages/dioxus/src/scan_box.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
use dioxus::prelude::*;
#[derive(Clone, PartialEq, Props)]
pub struct ScanBoxProps {
#[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 ScanBox(props: ScanBoxProps) -> 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": "M12 12v5.5" }
path { "d": "M17 3h2a2 2 0 012 2v2" }
path { "d": "M21 17v2a2 2 0 01-2 2h-2" }
path { "d": "M3 7V5a2 2 0 012-2h2" }
path { "d": "M7 21H5a2 2 0 01-2-2v-2" }
path { "d": "M7.264 9.252 12 12l4.737-2.748" }
path { "d": "M7.995 8.514A2 2 0 007 10.244v3.516a2 2 0 00.996 1.73l3 1.74a2 2 0 002.008 0l3-1.74A2 2 0 0017 13.76v-3.517a2 2 0 00-.995-1.73l-3-1.742a2 2 0 00-1.892-.064z" }
}
}
}
5 changes: 3 additions & 2 deletions packages/icon-name/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! See [the Rust Lucide book](https://lucide.rustforweb.org/) for more documenation.

/// [Lucide](https://lucide.dev/) icon names.
pub static ICON_NAMES: [&str; 1747usize] = [
pub static ICON_NAMES: [&str; 1748usize] = [
"a-arrow-down",
"a-arrow-up",
"a-large-small",
Expand Down Expand Up @@ -386,7 +386,7 @@ pub static ICON_NAMES: [&str; 1747usize] = [
"circle-dot-dashed",
"circle-ellipsis",
"circle-equal",
"circle-euro-sign",
"circle-euro",
"circle-fading-arrow-up",
"circle-fading-plus",
"circle-gauge",
Expand Down Expand Up @@ -1302,6 +1302,7 @@ pub static ICON_NAMES: [&str; 1747usize] = [
"scaling",
"scan",
"scan-barcode",
"scan-box",
"scan-eye",
"scan-face",
"scan-heart",
Expand Down
Loading
Loading