euv_ui/component/form_extra/
struct.rs1use super::*;
2
3#[derive(Clone, Data, New, Props)]
5pub struct EuvLabel {
6 pub(crate) text: String,
8 #[get(type(copy))]
10 pub(crate) required: bool,
11 #[get(type(copy))]
13 pub(crate) tokens: ThemeTokens,
14}
15
16#[derive(Clone, Data, New, Props)]
18pub struct EuvForm {
19 #[new(skip)]
21 pub(crate) fields: Vec<NodeId>,
22 #[get(type(copy))]
24 pub(crate) tokens: ThemeTokens,
25}
26
27#[derive(Clone, Data, New, Props)]
29pub struct EuvTextarea {
30 #[get(type(copy))]
32 pub(crate) value: Signal<String>,
33 pub(crate) placeholder: String,
35 #[get(type(copy))]
37 pub(crate) tokens: ThemeTokens,
38 #[new(skip)]
40 #[get(type(copy))]
41 pub(crate) style: Option<Style>,
42}
43
44#[derive(Clone, Data, New, Props)]
46pub struct EuvNumberInput {
47 #[get(type(copy))]
49 pub(crate) value: Signal<i64>,
50 #[new(skip)]
52 #[get(skip)]
53 pub(crate) min: Option<i64>,
54 #[new(skip)]
56 #[get(skip)]
57 pub(crate) max: Option<i64>,
58 #[new(skip)]
60 #[get(type(copy))]
61 #[prop(custom)]
62 pub(crate) step: i64,
63 #[get(type(copy))]
65 pub(crate) tokens: ThemeTokens,
66}
67
68#[derive(Clone, Data, New, Props)]
70pub struct EuvRadioGroup {
71 pub(crate) options: Vec<String>,
73 #[get(type(copy))]
75 pub(crate) selected: Signal<usize>,
76 #[get(type(copy))]
78 pub(crate) tokens: ThemeTokens,
79}
80
81#[derive(Clone, Data, New, Props)]
83pub struct EuvSlider {
84 #[get(type(copy))]
86 pub(crate) value: Signal<f32>,
87 #[get(type(copy))]
89 pub(crate) min: f32,
90 #[get(type(copy))]
92 pub(crate) max: f32,
93 #[get(type(copy))]
95 pub(crate) tokens: ThemeTokens,
96}
97
98#[derive(Clone, Data, New, Props)]
100pub struct EuvSelect {
101 pub(crate) options: Vec<String>,
103 #[get(type(copy))]
105 pub(crate) selected: Signal<usize>,
106 #[get(type(copy))]
108 pub(crate) open: Signal<bool>,
109 #[get(type(copy))]
111 pub(crate) tokens: ThemeTokens,
112}
113
114#[derive(Clone, Data, New, Props)]
116pub struct EuvRating {
117 #[get(type(copy))]
119 pub(crate) value: Signal<usize>,
120 #[get(type(copy))]
122 pub(crate) max_stars: usize,
123 #[get(type(copy))]
125 pub(crate) tokens: ThemeTokens,
126}
127
128#[derive(Clone, Data, New, Props)]
130pub struct EuvColorPicker {
131 #[get(type(copy))]
133 pub(crate) value: Signal<Color>,
134 #[new(skip)]
136 #[prop(custom)]
137 pub(crate) presets: Vec<Color>,
138 #[get(type(copy))]
140 pub(crate) tokens: ThemeTokens,
141}
142
143#[derive(Clone, Data, New, Props)]
145pub struct EuvTimePicker {
146 #[get(type(copy))]
148 pub(crate) value: Signal<(u8, u8)>,
149 #[get(type(copy))]
151 pub(crate) tokens: ThemeTokens,
152}
153
154#[derive(Clone, Data, New, Props)]
156pub struct EuvTagInput {
157 #[get(type(copy))]
159 pub(crate) tags: Signal<Vec<String>>,
160 #[new(skip)]
162 #[prop(custom)]
163 pub(crate) placeholder: String,
164 #[get(type(copy))]
166 pub(crate) tokens: ThemeTokens,
167}