euv_ui/component/shadcn_complete/
struct.rs1use super::*;
2
3#[derive(Clone, Data, Debug, New, PartialEq)]
5pub struct EuvChartPoint {
6 pub(crate) label: String,
8 #[get(type(copy))]
10 pub(crate) value: f32,
11}
12
13#[derive(Clone, Data, Debug, New, Props)]
15pub struct EuvChart {
16 pub(crate) title: String,
18 #[get(type(copy))]
20 pub(crate) kind: EuvChartKind,
21 pub(crate) data: Vec<EuvChartPoint>,
23 #[get(type(copy))]
25 pub(crate) tokens: ThemeTokens,
26}
27
28#[derive(Clone, Data, Debug, New, Props)]
30pub struct EuvCombobox {
31 #[new(skip)]
33 #[prop(custom)]
34 pub(crate) placeholder: String,
35 pub(crate) options: Vec<String>,
37 #[new(skip)]
39 #[get(skip)]
40 #[prop(custom)]
41 pub(crate) query: Option<Signal<String>>,
42 #[get(type(copy))]
44 pub(crate) selected: Signal<usize>,
45 #[get(type(copy))]
47 pub(crate) open: Signal<bool>,
48 #[get(type(copy))]
50 pub(crate) tokens: ThemeTokens,
51}
52
53#[derive(Clone, Data, Debug, New, Props)]
55pub struct EuvDataTable {
56 pub(crate) headers: Vec<String>,
58 pub(crate) rows: Vec<Vec<String>>,
60 #[new(skip)]
62 #[get(skip)]
63 #[prop(custom)]
64 pub(crate) filter: Option<Signal<String>>,
65 #[new(skip)]
67 #[get(skip)]
68 #[prop(custom)]
69 pub(crate) sort_ascending: Option<Signal<bool>>,
70 #[new(skip)]
72 #[get(skip)]
73 #[prop(custom)]
74 pub(crate) selected_row: Option<Signal<Option<usize>>>,
75 #[get(type(copy))]
77 pub(crate) tokens: ThemeTokens,
78}
79
80#[derive(Clone, Data, Debug, New, Props)]
82pub struct EuvDatePicker {
83 pub(crate) month_label: String,
85 #[get(type(copy))]
87 pub(crate) selected_day: Signal<u32>,
88 #[get(type(copy))]
90 pub(crate) open: Signal<bool>,
91 #[get(type(copy))]
93 pub(crate) tokens: ThemeTokens,
94}
95
96#[derive(Clone, Data, Debug, New, Props)]
98pub struct EuvInputGroup {
99 #[new(skip)]
101 #[prop(custom)]
102 pub(crate) prefix: String,
103 #[get(type(copy))]
105 pub(crate) value: Signal<String>,
106 #[new(skip)]
108 #[prop(custom)]
109 pub(crate) placeholder: String,
110 #[new(skip)]
112 #[prop(custom)]
113 pub(crate) suffix: String,
114 #[get(type(copy))]
116 pub(crate) tokens: ThemeTokens,
117}
118
119#[derive(Clone, CustomDebug, Data, New, Props)]
121pub struct EuvItem {
122 #[new(skip)]
124 #[prop(custom)]
125 pub(crate) leading: String,
126 pub(crate) title: String,
128 #[new(skip)]
130 #[prop(custom)]
131 pub(crate) description: String,
132 #[new(skip)]
134 #[prop(custom)]
135 pub(crate) trailing: String,
136 #[new(skip)]
138 #[debug(skip)]
139 #[get(skip)]
140 #[prop(custom)]
141 pub(crate) on_click: Option<UiEventHandler>,
142 #[get(type(copy))]
144 pub(crate) tokens: ThemeTokens,
145}
146
147#[derive(Clone, Data, Debug, New, Props)]
149pub struct EuvNativeSelect {
150 pub(crate) options: Vec<String>,
152 #[get(type(copy))]
154 pub(crate) selected: Signal<usize>,
155 #[get(type(copy))]
157 pub(crate) tokens: ThemeTokens,
158}
159
160#[derive(Clone, Data, Debug, New, Props)]
162pub struct EuvNavigationMenu {
163 pub(crate) items: Vec<(String, String)>,
165 #[get(type(copy))]
167 pub(crate) active: Signal<Option<usize>>,
168 #[get(type(copy))]
170 pub(crate) tokens: ThemeTokens,
171}
172
173#[derive(Clone, Data, Debug, New, Props)]
175pub struct EuvResizable {
176 #[get(type(copy))]
178 pub(crate) left: NodeId,
179 #[get(type(copy))]
181 pub(crate) right: NodeId,
182 #[get(type(copy))]
184 pub(crate) split_ratio: Signal<f32>,
185 #[get(type(copy))]
187 pub(crate) tokens: ThemeTokens,
188}
189
190#[derive(Clone, Data, Debug, New, Props)]
192pub struct EuvSeparator {
193 pub(crate) label: String,
195 #[get(type(copy))]
197 pub(crate) tokens: ThemeTokens,
198}
199
200#[derive(Clone, Data, Debug, New, Props)]
202pub struct EuvSonner {
203 #[get(type(copy))]
205 pub(crate) messages: Signal<Vec<(String, String)>>,
206 #[get(type(copy))]
208 pub(crate) tokens: ThemeTokens,
209}
210
211#[derive(Clone, Data, Debug, New, Props)]
213pub struct EuvDirection {
214 #[get(type(copy))]
216 pub(crate) direction: EuvTextDirection,
217 #[get(type(copy))]
219 pub(crate) child: NodeId,
220 #[get(type(copy))]
222 pub(crate) tokens: ThemeTokens,
223}
224
225#[derive(Clone, Data, Debug, New, PartialEq)]
227pub struct EuvTraceSpan {
228 pub(crate) name: String,
230 #[get(type(copy))]
232 pub(crate) duration_ms: f32,
233 #[get(type(copy))]
235 pub(crate) offset_frac: f32,
236 #[get(type(copy))]
238 pub(crate) width_frac: f32,
239 #[get(type(copy))]
241 pub(crate) tone: EuvTone,
242}
243
244#[derive(Clone, Data, Debug, New, Props)]
246pub struct EuvTrace {
247 pub(crate) title: String,
249 pub(crate) spans: Vec<EuvTraceSpan>,
251 #[get(type(copy))]
253 pub(crate) tokens: ThemeTokens,
254}
255
256#[derive(Clone, CustomDebug, Data, New, Props)]
258pub struct EuvAttachment {
259 pub(crate) filename: String,
261 pub(crate) meta: String,
263 #[get(type(copy))]
265 pub(crate) visible: Signal<bool>,
266 #[get(type(copy))]
268 pub(crate) tokens: ThemeTokens,
269}
270
271#[derive(Clone, Data, Debug, New, Props)]
273pub struct EuvBubble {
274 pub(crate) author: String,
276 pub(crate) content: String,
278 #[new(skip)]
280 #[prop(custom)]
281 pub(crate) timestamp: String,
282 #[new(skip)]
284 #[get(type(copy))]
285 #[prop(custom)]
286 pub(crate) outgoing: bool,
287 #[get(type(copy))]
289 pub(crate) tokens: ThemeTokens,
290}
291
292#[derive(Clone, Data, Debug, New, Props)]
294pub struct EuvMarker {
295 pub(crate) code: String,
297 pub(crate) label: String,
299 #[get(type(copy))]
301 pub(crate) tone: EuvTone,
302 #[get(type(copy))]
304 pub(crate) tokens: ThemeTokens,
305}
306
307#[derive(Clone, Data, Debug, New, Props)]
309pub struct EuvQuestionnaire {
310 pub(crate) prompt: String,
312 pub(crate) options: Vec<String>,
314 #[get(type(copy))]
316 pub(crate) selected: Signal<Option<usize>>,
317 #[get(type(copy))]
319 pub(crate) tokens: ThemeTokens,
320}
321
322#[derive(Clone, Data, Debug, New, Props)]
324pub struct EuvContextMenu {
325 pub(crate) trigger_label: String,
327 pub(crate) items: Vec<String>,
329 #[new(skip)]
331 #[get(skip)]
332 #[prop(custom)]
333 pub(crate) open: Option<Signal<bool>>,
334 #[new(skip)]
336 #[get(skip)]
337 #[prop(custom)]
338 pub(crate) selected: Option<Signal<Option<usize>>>,
339 #[get(type(copy))]
341 pub(crate) tokens: ThemeTokens,
342}