From 5d60d192f96c86e8338d8bdf55adaf3a7834a3bb Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Sun, 10 May 2026 21:42:12 +0200 Subject: [PATCH] yes --- Cargo.toml | 2 +- assets/dx-components-theme.css | 1 + src/components/select/component.rs | 50 +++++++++--------------------- src/components/select/mod.rs | 2 +- 4 files changed, 18 insertions(+), 37 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d6bacd7..93aa487 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2024" [dependencies] csv = "1.4.0" -dioxus = { version = "0.7.6", features = ["router"] } +dioxus = { version = "0.7.9", features = ["router"] } dioxus-sdk-time = "0.7.0" dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false } reqwest = "0.12.25" diff --git a/assets/dx-components-theme.css b/assets/dx-components-theme.css index b893d23..fdab0be 100644 --- a/assets/dx-components-theme.css +++ b/assets/dx-components-theme.css @@ -346,3 +346,4 @@ cursor: not-allowed; opacity: 0.5; } + diff --git a/src/components/select/component.rs b/src/components/select/component.rs index 4ac0d89..ffd55f6 100644 --- a/src/components/select/component.rs +++ b/src/components/select/component.rs @@ -1,15 +1,14 @@ use dioxus::prelude::*; use dioxus_primitives::select::{ - self, SelectGroupLabelProps, SelectGroupProps, SelectListProps, SelectMultiProps, - SelectOptionProps, SelectProps, SelectTriggerProps, SelectValueProps, + self, SelectGroupLabelProps, SelectGroupProps, SelectListProps, SelectOptionProps, SelectProps, + SelectTriggerProps, SelectValueProps, }; -use dioxus_primitives::icon; #[component] pub fn Select(props: SelectProps) -> Element { rsx! { select::Select { - class: "dx-select", + class: "select", value: props.value, default_value: props.default_value, on_value_change: props.on_value_change, @@ -23,34 +22,15 @@ pub fn Select(props: SelectProps) -> Element } } -#[component] -pub fn SelectMulti(props: SelectMultiProps) -> Element { - rsx! { - select::SelectMulti { - class: "dx-select", - values: props.values, - default_values: props.default_values, - on_values_change: props.on_values_change, - disabled: props.disabled, - name: props.name, - roving_loop: props.roving_loop, - typeahead_timeout: props.typeahead_timeout, - attributes: props.attributes, - {props.children} - } - } -} - #[component] pub fn SelectTrigger(props: SelectTriggerProps) -> Element { rsx! { - select::SelectTrigger { class: "dx-select-trigger", attributes: props.attributes, + select::SelectTrigger { attributes: props.attributes, {props.children} - icon::Icon { - class: "dx-select-expand-icon", - width: "20px", - height: "20px", - stroke: "var(--primary-color-7)", + svg { + class: "select-expand-icon", + view_box: "0 0 24 24", + xmlns: "http://www.w3.org/2000/svg", polyline { points: "6 9 12 15 18 9" } } } @@ -62,7 +42,7 @@ pub fn SelectValue(props: SelectValueProps) -> Element { rsx! { select::SelectValue { placeholder: props.placeholder, - attributes: props.attributes, + attributes: props.attributes } } } @@ -71,7 +51,7 @@ pub fn SelectValue(props: SelectValueProps) -> Element { pub fn SelectList(props: SelectListProps) -> Element { rsx! { select::SelectList { - class: "dx-select-list", + class: "select-list", id: props.id, attributes: props.attributes, {props.children} @@ -83,7 +63,7 @@ pub fn SelectList(props: SelectListProps) -> Element { pub fn SelectGroup(props: SelectGroupProps) -> Element { rsx! { select::SelectGroup { - class: "dx-select-group", + class: "select-group", disabled: props.disabled, id: props.id, attributes: props.attributes, @@ -96,7 +76,7 @@ pub fn SelectGroup(props: SelectGroupProps) -> Element { pub fn SelectGroupLabel(props: SelectGroupLabelProps) -> Element { rsx! { select::SelectGroupLabel { - class: "dx-select-group-label", + class: "select-group-label", id: props.id, attributes: props.attributes, {props.children} @@ -108,7 +88,7 @@ pub fn SelectGroupLabel(props: SelectGroupLabelProps) -> Element { pub fn SelectOption(props: SelectOptionProps) -> Element { rsx! { select::SelectOption:: { - class: "dx-select-option", + class: "select-option", value: props.value, text_value: props.text_value, disabled: props.disabled, @@ -126,8 +106,8 @@ pub fn SelectOption(props: SelectOptionProps) pub fn SelectItemIndicator() -> Element { rsx! { select::SelectItemIndicator { - icon::Icon { - class: "dx-select-check-icon", + svg { + class: "select-check-icon", width: "1rem", height: "1rem", stroke: "var(--secondary-color-5)", diff --git a/src/components/select/mod.rs b/src/components/select/mod.rs index 2590c01..9a8ae55 100644 --- a/src/components/select/mod.rs +++ b/src/components/select/mod.rs @@ -1,2 +1,2 @@ mod component; -pub use component::*; +pub use component::*; \ No newline at end of file