euv_ui/component/data_display/
struct.rs1use super::*;
2
3#[derive(Clone, Data, New, Props)]
5pub struct EuvTag {
6 pub(crate) label: String,
8 #[get(type(copy))]
10 pub(crate) tone: EuvTone,
11 #[get(type(copy))]
13 pub(crate) tokens: ThemeTokens,
14}
15
16#[derive(Clone, Data, New, Props)]
18pub struct EuvAvatar {
19 pub(crate) initials: String,
21 #[get(type(copy))]
23 pub(crate) size: f32,
24 #[get(type(copy))]
26 pub(crate) tokens: ThemeTokens,
27}
28
29#[derive(Clone, Data, New, Props)]
31pub struct EuvIcon {
32 pub(crate) symbol: String,
34 #[get(type(copy))]
36 pub(crate) size: f32,
37 #[new(skip)]
39 #[get(type(copy))]
40 pub(crate) style: Option<Style>,
41 #[new(skip)]
43 #[get(type(copy))]
44 #[prop(default = None)]
45 pub(crate) icon: Option<EuvIconName>,
46}
47
48#[derive(Clone, Data, New, Props)]
50pub struct EuvKbd {
51 pub(crate) key: String,
53 #[get(type(copy))]
55 pub(crate) tokens: ThemeTokens,
56}
57
58#[derive(Clone, Data, New, Props)]
60pub struct EuvTypography {
61 pub(crate) text: String,
63 #[get(type(copy))]
65 pub(crate) variant: EuvTypographyVariant,
66 #[get(type(copy))]
68 pub(crate) tokens: ThemeTokens,
69}
70
71#[derive(Clone, Data, New, Props)]
73pub struct EuvEmpty {
74 pub(crate) title: String,
76 pub(crate) description: String,
78 #[get(type(copy))]
80 pub(crate) tokens: ThemeTokens,
81}
82
83#[derive(Clone, Data, New, Props)]
85pub struct EuvSkeleton {
86 #[get(type(copy))]
88 pub(crate) tokens: ThemeTokens,
89 #[new(skip)]
91 #[get(type(copy))]
92 pub(crate) style: Option<Style>,
93}
94
95#[derive(Clone, Data, New, Props)]
97pub struct EuvSpinner {
98 #[get(type(copy))]
100 pub(crate) size: f32,
101 #[get(type(copy))]
103 pub(crate) tokens: ThemeTokens,
104}
105
106#[derive(Clone, Debug, Eq, Getter, New, PartialEq)]
108pub struct EuvTimelineItem {
109 pub(crate) title: String,
111 pub(crate) timestamp: String,
113 pub(crate) detail: String,
115}
116
117#[derive(Clone, Data, New, Props)]
119pub struct EuvTimeline {
120 pub(crate) items: Vec<EuvTimelineItem>,
122 #[get(type(copy))]
124 pub(crate) tokens: ThemeTokens,
125}
126
127#[derive(Clone, Data, New, Props)]
129pub struct EuvList {
130 pub(crate) items: Vec<String>,
132 #[get(type(copy))]
134 pub(crate) tokens: ThemeTokens,
135}
136
137#[derive(Clone, Debug, Eq, Getter, New, PartialEq)]
139pub struct EuvTreeNode {
140 pub(crate) label: String,
142 pub(crate) children: Vec<Self>,
144}
145
146#[derive(Clone, Data, New, Props)]
148pub struct EuvTree {
149 pub(crate) roots: Vec<EuvTreeNode>,
151 #[new(skip)]
153 #[get(skip)]
154 #[prop(custom)]
155 pub(crate) selected: Option<Signal<Option<String>>>,
156 #[get(type(copy))]
158 pub(crate) tokens: ThemeTokens,
159}