yes
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ edition = "2024"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
csv = "1.4.0"
|
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-sdk-time = "0.7.0"
|
||||||
dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false }
|
dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false }
|
||||||
reqwest = "0.12.25"
|
reqwest = "0.12.25"
|
||||||
|
|||||||
@@ -346,3 +346,4 @@
|
|||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use dioxus_primitives::select::{
|
use dioxus_primitives::select::{
|
||||||
self, SelectGroupLabelProps, SelectGroupProps, SelectListProps, SelectMultiProps,
|
self, SelectGroupLabelProps, SelectGroupProps, SelectListProps, SelectOptionProps, SelectProps,
|
||||||
SelectOptionProps, SelectProps, SelectTriggerProps, SelectValueProps,
|
SelectTriggerProps, SelectValueProps,
|
||||||
};
|
};
|
||||||
use dioxus_primitives::icon;
|
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn Select<T: Clone + PartialEq + 'static>(props: SelectProps<T>) -> Element {
|
pub fn Select<T: Clone + PartialEq + 'static>(props: SelectProps<T>) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
select::Select {
|
select::Select {
|
||||||
class: "dx-select",
|
class: "select",
|
||||||
value: props.value,
|
value: props.value,
|
||||||
default_value: props.default_value,
|
default_value: props.default_value,
|
||||||
on_value_change: props.on_value_change,
|
on_value_change: props.on_value_change,
|
||||||
@@ -23,34 +22,15 @@ pub fn Select<T: Clone + PartialEq + 'static>(props: SelectProps<T>) -> Element
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[component]
|
|
||||||
pub fn SelectMulti<T: Clone + PartialEq + 'static>(props: SelectMultiProps<T>) -> 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]
|
#[component]
|
||||||
pub fn SelectTrigger(props: SelectTriggerProps) -> Element {
|
pub fn SelectTrigger(props: SelectTriggerProps) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
select::SelectTrigger { class: "dx-select-trigger", attributes: props.attributes,
|
select::SelectTrigger { attributes: props.attributes,
|
||||||
{props.children}
|
{props.children}
|
||||||
icon::Icon {
|
svg {
|
||||||
class: "dx-select-expand-icon",
|
class: "select-expand-icon",
|
||||||
width: "20px",
|
view_box: "0 0 24 24",
|
||||||
height: "20px",
|
xmlns: "http://www.w3.org/2000/svg",
|
||||||
stroke: "var(--primary-color-7)",
|
|
||||||
polyline { points: "6 9 12 15 18 9" }
|
polyline { points: "6 9 12 15 18 9" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,7 +42,7 @@ pub fn SelectValue(props: SelectValueProps) -> Element {
|
|||||||
rsx! {
|
rsx! {
|
||||||
select::SelectValue {
|
select::SelectValue {
|
||||||
placeholder: props.placeholder,
|
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 {
|
pub fn SelectList(props: SelectListProps) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
select::SelectList {
|
select::SelectList {
|
||||||
class: "dx-select-list",
|
class: "select-list",
|
||||||
id: props.id,
|
id: props.id,
|
||||||
attributes: props.attributes,
|
attributes: props.attributes,
|
||||||
{props.children}
|
{props.children}
|
||||||
@@ -83,7 +63,7 @@ pub fn SelectList(props: SelectListProps) -> Element {
|
|||||||
pub fn SelectGroup(props: SelectGroupProps) -> Element {
|
pub fn SelectGroup(props: SelectGroupProps) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
select::SelectGroup {
|
select::SelectGroup {
|
||||||
class: "dx-select-group",
|
class: "select-group",
|
||||||
disabled: props.disabled,
|
disabled: props.disabled,
|
||||||
id: props.id,
|
id: props.id,
|
||||||
attributes: props.attributes,
|
attributes: props.attributes,
|
||||||
@@ -96,7 +76,7 @@ pub fn SelectGroup(props: SelectGroupProps) -> Element {
|
|||||||
pub fn SelectGroupLabel(props: SelectGroupLabelProps) -> Element {
|
pub fn SelectGroupLabel(props: SelectGroupLabelProps) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
select::SelectGroupLabel {
|
select::SelectGroupLabel {
|
||||||
class: "dx-select-group-label",
|
class: "select-group-label",
|
||||||
id: props.id,
|
id: props.id,
|
||||||
attributes: props.attributes,
|
attributes: props.attributes,
|
||||||
{props.children}
|
{props.children}
|
||||||
@@ -108,7 +88,7 @@ pub fn SelectGroupLabel(props: SelectGroupLabelProps) -> Element {
|
|||||||
pub fn SelectOption<T: Clone + PartialEq + 'static>(props: SelectOptionProps<T>) -> Element {
|
pub fn SelectOption<T: Clone + PartialEq + 'static>(props: SelectOptionProps<T>) -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
select::SelectOption::<T> {
|
select::SelectOption::<T> {
|
||||||
class: "dx-select-option",
|
class: "select-option",
|
||||||
value: props.value,
|
value: props.value,
|
||||||
text_value: props.text_value,
|
text_value: props.text_value,
|
||||||
disabled: props.disabled,
|
disabled: props.disabled,
|
||||||
@@ -126,8 +106,8 @@ pub fn SelectOption<T: Clone + PartialEq + 'static>(props: SelectOptionProps<T>)
|
|||||||
pub fn SelectItemIndicator() -> Element {
|
pub fn SelectItemIndicator() -> Element {
|
||||||
rsx! {
|
rsx! {
|
||||||
select::SelectItemIndicator {
|
select::SelectItemIndicator {
|
||||||
icon::Icon {
|
svg {
|
||||||
class: "dx-select-check-icon",
|
class: "select-check-icon",
|
||||||
width: "1rem",
|
width: "1rem",
|
||||||
height: "1rem",
|
height: "1rem",
|
||||||
stroke: "var(--secondary-color-5)",
|
stroke: "var(--secondary-color-5)",
|
||||||
|
|||||||
Reference in New Issue
Block a user