@xmesh/system-design 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +472 -0
- package/assets/brand-lockup-dark.svg +9 -0
- package/assets/brand-lockup-light.svg +9 -0
- package/assets/brand-mark.svg +9 -0
- package/colors_and_type.css +11 -0
- package/dist/lit/components/alert/index.css +201 -0
- package/dist/lit/components/alert/index.d.ts +25 -0
- package/dist/lit/components/alert/index.js +191 -0
- package/dist/lit/components/app-bar/index.css +80 -0
- package/dist/lit/components/app-bar/index.d.ts +19 -0
- package/dist/lit/components/app-bar/index.js +120 -0
- package/dist/lit/components/artifact/index.css +166 -0
- package/dist/lit/components/artifact/index.d.ts +37 -0
- package/dist/lit/components/artifact/index.js +294 -0
- package/dist/lit/components/autocomplete/index.css +171 -0
- package/dist/lit/components/autocomplete/index.d.ts +47 -0
- package/dist/lit/components/autocomplete/index.js +404 -0
- package/dist/lit/components/avatar/index.css +62 -0
- package/dist/lit/components/avatar/index.d.ts +19 -0
- package/dist/lit/components/avatar/index.js +112 -0
- package/dist/lit/components/avatar-group/index.css +60 -0
- package/dist/lit/components/avatar-group/index.d.ts +19 -0
- package/dist/lit/components/avatar-group/index.js +97 -0
- package/dist/lit/components/badge/index.css +72 -0
- package/dist/lit/components/badge/index.d.ts +18 -0
- package/dist/lit/components/badge/index.js +115 -0
- package/dist/lit/components/brand-mark/index.css +109 -0
- package/dist/lit/components/brand-mark/index.d.ts +24 -0
- package/dist/lit/components/brand-mark/index.js +116 -0
- package/dist/lit/components/breadcrumbs/index.css +91 -0
- package/dist/lit/components/breadcrumbs/index.d.ts +19 -0
- package/dist/lit/components/breadcrumbs/index.js +104 -0
- package/dist/lit/components/bubble/index.css +182 -0
- package/dist/lit/components/bubble/index.d.ts +72 -0
- package/dist/lit/components/bubble/index.js +617 -0
- package/dist/lit/components/button/index.css +342 -0
- package/dist/lit/components/button/index.d.ts +32 -0
- package/dist/lit/components/button/index.js +202 -0
- package/dist/lit/components/card/index.css +99 -0
- package/dist/lit/components/card/index.d.ts +20 -0
- package/dist/lit/components/card/index.js +133 -0
- package/dist/lit/components/chat/index.css +292 -0
- package/dist/lit/components/chat/index.d.ts +74 -0
- package/dist/lit/components/chat/index.js +589 -0
- package/dist/lit/components/checkbox/index.css +126 -0
- package/dist/lit/components/checkbox/index.d.ts +21 -0
- package/dist/lit/components/checkbox/index.js +138 -0
- package/dist/lit/components/chip/index.css +145 -0
- package/dist/lit/components/chip/index.d.ts +30 -0
- package/dist/lit/components/chip/index.js +230 -0
- package/dist/lit/components/chip-group/index.css +19 -0
- package/dist/lit/components/chip-group/index.d.ts +24 -0
- package/dist/lit/components/chip-group/index.js +171 -0
- package/dist/lit/components/code/index.css +42 -0
- package/dist/lit/components/code/index.d.ts +12 -0
- package/dist/lit/components/code/index.js +68 -0
- package/dist/lit/components/composer/index.css +548 -0
- package/dist/lit/components/composer/index.d.ts +67 -0
- package/dist/lit/components/composer/index.js +713 -0
- package/dist/lit/components/data-table/index.css +166 -0
- package/dist/lit/components/data-table/index.d.ts +55 -0
- package/dist/lit/components/data-table/index.js +390 -0
- package/dist/lit/components/dialog/index.css +124 -0
- package/dist/lit/components/dialog/index.d.ts +24 -0
- package/dist/lit/components/dialog/index.js +199 -0
- package/dist/lit/components/divider/index.css +27 -0
- package/dist/lit/components/divider/index.d.ts +13 -0
- package/dist/lit/components/divider/index.js +67 -0
- package/dist/lit/components/empty-state/index.css +69 -0
- package/dist/lit/components/empty-state/index.d.ts +21 -0
- package/dist/lit/components/empty-state/index.js +123 -0
- package/dist/lit/components/expansion-panel/index.css +120 -0
- package/dist/lit/components/expansion-panel/index.d.ts +22 -0
- package/dist/lit/components/expansion-panel/index.js +174 -0
- package/dist/lit/components/field/index.css +223 -0
- package/dist/lit/components/field/index.d.ts +106 -0
- package/dist/lit/components/field/index.js +388 -0
- package/dist/lit/components/file-input/index.css +257 -0
- package/dist/lit/components/file-input/index.d.ts +30 -0
- package/dist/lit/components/file-input/index.js +298 -0
- package/dist/lit/components/form/index.css +29 -0
- package/dist/lit/components/form/index.d.ts +38 -0
- package/dist/lit/components/form/index.js +192 -0
- package/dist/lit/components/grid/index.css +53 -0
- package/dist/lit/components/grid/index.d.ts +14 -0
- package/dist/lit/components/grid/index.js +82 -0
- package/dist/lit/components/kbd/index.css +35 -0
- package/dist/lit/components/kbd/index.d.ts +11 -0
- package/dist/lit/components/kbd/index.js +43 -0
- package/dist/lit/components/list/index.css +15 -0
- package/dist/lit/components/list/index.d.ts +28 -0
- package/dist/lit/components/list/index.js +188 -0
- package/dist/lit/components/list-item/index.css +119 -0
- package/dist/lit/components/list-item/index.d.ts +20 -0
- package/dist/lit/components/list-item/index.js +127 -0
- package/dist/lit/components/menu/index.css +94 -0
- package/dist/lit/components/menu/index.d.ts +47 -0
- package/dist/lit/components/menu/index.js +386 -0
- package/dist/lit/components/navigation-drawer/index.css +114 -0
- package/dist/lit/components/navigation-drawer/index.d.ts +29 -0
- package/dist/lit/components/navigation-drawer/index.js +218 -0
- package/dist/lit/components/overlay/index.css +171 -0
- package/dist/lit/components/overlay/index.d.ts +65 -0
- package/dist/lit/components/overlay/index.js +566 -0
- package/dist/lit/components/pagination/index.css +102 -0
- package/dist/lit/components/pagination/index.d.ts +22 -0
- package/dist/lit/components/pagination/index.js +184 -0
- package/dist/lit/components/primitives/index.css +504 -0
- package/dist/lit/components/primitives/index.d.ts +25 -0
- package/dist/lit/components/primitives/index.js +283 -0
- package/dist/lit/components/progress/index.css +143 -0
- package/dist/lit/components/progress/index.d.ts +23 -0
- package/dist/lit/components/progress/index.js +180 -0
- package/dist/lit/components/radio-group/index.css +178 -0
- package/dist/lit/components/radio-group/index.d.ts +35 -0
- package/dist/lit/components/radio-group/index.js +292 -0
- package/dist/lit/components/select/index.css +151 -0
- package/dist/lit/components/select/index.d.ts +50 -0
- package/dist/lit/components/select/index.js +390 -0
- package/dist/lit/components/sidebar-item/index.css +133 -0
- package/dist/lit/components/sidebar-item/index.d.ts +20 -0
- package/dist/lit/components/sidebar-item/index.js +105 -0
- package/dist/lit/components/skeleton/index.css +81 -0
- package/dist/lit/components/skeleton/index.d.ts +19 -0
- package/dist/lit/components/skeleton/index.js +119 -0
- package/dist/lit/components/slider/index.css +171 -0
- package/dist/lit/components/slider/index.d.ts +36 -0
- package/dist/lit/components/slider/index.js +302 -0
- package/dist/lit/components/snackbar/index.css +279 -0
- package/dist/lit/components/snackbar/index.d.ts +33 -0
- package/dist/lit/components/snackbar/index.js +195 -0
- package/dist/lit/components/stack/index.css +41 -0
- package/dist/lit/components/stack/index.d.ts +20 -0
- package/dist/lit/components/stack/index.js +103 -0
- package/dist/lit/components/switch/index.css +126 -0
- package/dist/lit/components/switch/index.d.ts +17 -0
- package/dist/lit/components/switch/index.js +116 -0
- package/dist/lit/components/table/index.css +85 -0
- package/dist/lit/components/table/index.d.ts +25 -0
- package/dist/lit/components/table/index.js +139 -0
- package/dist/lit/components/tabs/index.css +116 -0
- package/dist/lit/components/tabs/index.d.ts +49 -0
- package/dist/lit/components/tabs/index.js +320 -0
- package/dist/lit/components/text-field/index.css +90 -0
- package/dist/lit/components/text-field/index.d.ts +17 -0
- package/dist/lit/components/text-field/index.js +101 -0
- package/dist/lit/components/textarea/index.css +55 -0
- package/dist/lit/components/textarea/index.d.ts +26 -0
- package/dist/lit/components/textarea/index.js +124 -0
- package/dist/lit/components/tooltip/index.css +37 -0
- package/dist/lit/components/tooltip/index.d.ts +31 -0
- package/dist/lit/components/tooltip/index.js +196 -0
- package/dist/lit/components/validation/index.css +386 -0
- package/dist/lit/components/validation/index.d.ts +45 -0
- package/dist/lit/components/validation/index.js +318 -0
- package/dist/lit/index.d.ts +50 -0
- package/dist/lit/index.js +59 -0
- package/package.json +81 -0
- package/styles/README.md +346 -0
- package/styles/_elevation.css +24 -0
- package/styles/_fonts.css +6 -0
- package/styles/_layout.css +37 -0
- package/styles/_primitives.css +154 -0
- package/styles/_scroll.css +75 -0
- package/styles/_semantic.css +146 -0
- package/styles/_space.css +61 -0
- package/styles/_type.css +139 -0
- package/styles/_xmesh-extensions.css +232 -0
- package/styles/index.css +44 -0
- package/styles/md3/_color.css +102 -0
- package/styles/md3/_elevation.css +26 -0
- package/styles/md3/_motion.css +35 -0
- package/styles/md3/_shape.css +22 -0
- package/styles/md3/_state.css +22 -0
- package/styles/md3/_type.css +111 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
/* validation.css — unified file-validation block.
|
|
2
|
+
Mirrors the in-app component at:
|
|
3
|
+
packages/shared/components/chat/latest/settings/SettingsDefinitionsField.vue
|
|
4
|
+
Token contract: --md-sys-* / --xm-* only.
|
|
5
|
+
Theme flips happen via primitives behind those tokens. */
|
|
6
|
+
|
|
7
|
+
/* ----- Block container (single border, single radius) ----- */
|
|
8
|
+
|
|
9
|
+
.ds-fvb {
|
|
10
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
11
|
+
border-radius: var(--md-sys-shape-corner-button);
|
|
12
|
+
background: var(--md-sys-color-inverse-surface);
|
|
13
|
+
font-family: var(--md-sys-typescale-body-large-font);
|
|
14
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 84px;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
transition:
|
|
23
|
+
border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
24
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Two-region states (file + error, drop + error) grow to fit their
|
|
28
|
+
content. Single-region states (idle, dragging, valid, standalone
|
|
29
|
+
error) keep the fixed 84px. */
|
|
30
|
+
.ds-fvb--invalid,
|
|
31
|
+
.ds-fvb--error-no-file {
|
|
32
|
+
height: auto;
|
|
33
|
+
min-height: 84px;
|
|
34
|
+
justify-content: flex-start;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ds-fvb--invalid .ds-fvb__file,
|
|
38
|
+
.ds-fvb--error-no-file .ds-fvb__drop {
|
|
39
|
+
flex: 0 0 auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ds-fvb--invalid .ds-fvb__error,
|
|
43
|
+
.ds-fvb--error-no-file .ds-fvb__error {
|
|
44
|
+
flex: 1 1 auto;
|
|
45
|
+
align-content: start;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ds-fvb--idle {
|
|
49
|
+
border-style: dashed;
|
|
50
|
+
border-color: var(--md-sys-color-outline);
|
|
51
|
+
background: var(--md-sys-color-surface-container-high);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ds-fvb--dragging {
|
|
55
|
+
border-style: solid;
|
|
56
|
+
border-color: var(--xm-color-primary-pressed);
|
|
57
|
+
background: color-mix(
|
|
58
|
+
in oklch,
|
|
59
|
+
var(--md-sys-color-primary-container) 50%,
|
|
60
|
+
var(--md-sys-color-surface-container-high)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ds-fvb--valid {
|
|
65
|
+
border-color: var(--md-sys-color-outline-variant);
|
|
66
|
+
background: var(--md-sys-color-inverse-surface);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ds-fvb--invalid,
|
|
70
|
+
.ds-fvb--error-no-file {
|
|
71
|
+
border-color: var(--md-sys-color-outline);
|
|
72
|
+
background: var(--md-sys-color-surface-container-high);
|
|
73
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ----- Drop region ----- */
|
|
77
|
+
|
|
78
|
+
.ds-fvb__drop {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: var(--s-0-5);
|
|
83
|
+
padding: var(--s-2-5) var(--s-3);
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ds-fvb__drop:focus-visible {
|
|
88
|
+
outline: 1px solid var(--xm-color-primary-pressed);
|
|
89
|
+
outline-offset: 2px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ds-fvb__drop[data-dragging="1"] {
|
|
93
|
+
background: color-mix(
|
|
94
|
+
in oklch,
|
|
95
|
+
var(--md-sys-color-primary-container) 35%,
|
|
96
|
+
transparent
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ds-fvb__drop-primary {
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
color: inherit;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.ds-fvb__drop-secondary {
|
|
107
|
+
font-size: 10.5px;
|
|
108
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ds-fvb--error-no-file .ds-fvb__drop-secondary {
|
|
112
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* ----- File region ----- */
|
|
116
|
+
|
|
117
|
+
.ds-fvb__file {
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: column;
|
|
120
|
+
gap: var(--s-0-5);
|
|
121
|
+
padding: var(--s-1-5) var(--s-2-5);
|
|
122
|
+
min-width: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ds-fvb--invalid .ds-fvb__file {
|
|
126
|
+
padding: var(--s-2) var(--s-3);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ds-fvb__file-row {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: var(--s-2);
|
|
133
|
+
min-width: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ds-fvb__file-actions {
|
|
137
|
+
display: inline-flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: var(--s-1);
|
|
140
|
+
margin-left: auto;
|
|
141
|
+
flex-shrink: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ds-fvb__file-name {
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
gap: var(--s-1-5);
|
|
148
|
+
font-size: 12px;
|
|
149
|
+
font-weight: 500;
|
|
150
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
151
|
+
min-width: 0;
|
|
152
|
+
flex: 1 1 auto;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.ds-fvb--invalid .ds-fvb__file-name {
|
|
156
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.ds-fvb__file-name-label {
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
text-overflow: ellipsis;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ds-fvb__file-sub {
|
|
166
|
+
font-size: 10.5px;
|
|
167
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
168
|
+
font-feature-settings: "tnum";
|
|
169
|
+
white-space: nowrap;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
text-overflow: ellipsis;
|
|
172
|
+
min-width: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.ds-fvb--invalid .ds-fvb__file-sub {
|
|
176
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* ----- Hairline divider between file/drop and error rows ----- */
|
|
180
|
+
|
|
181
|
+
.ds-fvb__divider {
|
|
182
|
+
height: 1px;
|
|
183
|
+
background: color-mix(in oklch, var(--xm-color-inverse-on-surface-muted) 22%, transparent);
|
|
184
|
+
margin: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* ----- Error region ----- */
|
|
188
|
+
|
|
189
|
+
.ds-fvb__error {
|
|
190
|
+
display: grid;
|
|
191
|
+
grid-template-columns: 12px 1fr 14px;
|
|
192
|
+
column-gap: var(--s-2);
|
|
193
|
+
row-gap: var(--s-0-5);
|
|
194
|
+
padding: var(--s-1-5) var(--s-2-5);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ds-fvb--invalid .ds-fvb__error {
|
|
198
|
+
padding: var(--s-2) var(--s-3);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.ds-fvb__error-icon {
|
|
202
|
+
grid-column: 1;
|
|
203
|
+
grid-row: 1;
|
|
204
|
+
display: inline-flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
width: 12px;
|
|
208
|
+
height: 12px;
|
|
209
|
+
margin-top: var(--s-0-5);
|
|
210
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.ds-fvb__error-title {
|
|
214
|
+
grid-column: 2;
|
|
215
|
+
grid-row: 1;
|
|
216
|
+
font-size: 12px;
|
|
217
|
+
font-weight: 600;
|
|
218
|
+
letter-spacing: -0.005em;
|
|
219
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
220
|
+
min-width: 0;
|
|
221
|
+
line-height: 1.35;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.ds-fvb__error-dismiss {
|
|
225
|
+
grid-column: 3;
|
|
226
|
+
grid-row: 1;
|
|
227
|
+
appearance: none;
|
|
228
|
+
border: none;
|
|
229
|
+
background: transparent;
|
|
230
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
231
|
+
width: 14px;
|
|
232
|
+
height: 14px;
|
|
233
|
+
border-radius: 4px;
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
display: inline-flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
margin-top: 1px;
|
|
239
|
+
transition:
|
|
240
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
241
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.ds-fvb__error-dismiss:hover {
|
|
245
|
+
background: var(--md-sys-color-outline-variant);
|
|
246
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.ds-fvb__error-message {
|
|
250
|
+
grid-column: 2 / 4;
|
|
251
|
+
grid-row: 2;
|
|
252
|
+
margin: 0;
|
|
253
|
+
font-size: 11px;
|
|
254
|
+
line-height: 1.4;
|
|
255
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
256
|
+
white-space: nowrap;
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
text-overflow: ellipsis;
|
|
259
|
+
min-width: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.ds-fvb__meta {
|
|
263
|
+
grid-column: 2 / 4;
|
|
264
|
+
grid-row: 3;
|
|
265
|
+
display: flex;
|
|
266
|
+
flex-wrap: nowrap;
|
|
267
|
+
align-items: center;
|
|
268
|
+
gap: var(--s-1) var(--s-1-5);
|
|
269
|
+
margin-top: 1px;
|
|
270
|
+
min-width: 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.ds-fvb__filename {
|
|
274
|
+
font-size: 10.5px;
|
|
275
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
276
|
+
font-weight: 500;
|
|
277
|
+
max-width: 100%;
|
|
278
|
+
white-space: nowrap;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
text-overflow: ellipsis;
|
|
281
|
+
min-width: 0;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ds-fvb__path {
|
|
285
|
+
font-size: 10.5px;
|
|
286
|
+
background: var(--md-sys-color-outline-variant);
|
|
287
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
288
|
+
padding: 1px 5px;
|
|
289
|
+
border-radius: 3px;
|
|
290
|
+
line-height: 1.4;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.ds-fvb__rule {
|
|
294
|
+
font-size: 10px;
|
|
295
|
+
background: var(--md-sys-color-outline-variant);
|
|
296
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
297
|
+
padding: 1px var(--s-1-5);
|
|
298
|
+
border-radius: 999px;
|
|
299
|
+
font-weight: 500;
|
|
300
|
+
letter-spacing: 0.02em;
|
|
301
|
+
text-transform: lowercase;
|
|
302
|
+
line-height: 1.4;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.ds-fvb__copy {
|
|
306
|
+
appearance: none;
|
|
307
|
+
margin-left: auto;
|
|
308
|
+
border: none;
|
|
309
|
+
background: transparent;
|
|
310
|
+
color: var(--xm-color-inverse-on-surface-muted);
|
|
311
|
+
font-size: 10px;
|
|
312
|
+
font-weight: 500;
|
|
313
|
+
padding: 1px 5px;
|
|
314
|
+
border-radius: 3px;
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
display: inline-flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
gap: 3px;
|
|
319
|
+
font-family: var(--md-sys-typescale-body-large-font);
|
|
320
|
+
line-height: 1.4;
|
|
321
|
+
transition:
|
|
322
|
+
background var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard),
|
|
323
|
+
color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.ds-fvb__copy:hover {
|
|
327
|
+
background: var(--md-sys-color-outline-variant);
|
|
328
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.ds-fvb__copy:focus-visible {
|
|
332
|
+
outline: 1px solid var(--md-sys-color-inverse-on-surface);
|
|
333
|
+
outline-offset: 1px;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* ----- Shared helpers (still used by the file row) ----- */
|
|
337
|
+
|
|
338
|
+
.ds-mono {
|
|
339
|
+
font-family: var(--xm-typescale-mono-font);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.ds-valid-tick {
|
|
343
|
+
display: inline-flex;
|
|
344
|
+
align-items: center;
|
|
345
|
+
justify-content: center;
|
|
346
|
+
width: 12px;
|
|
347
|
+
height: 12px;
|
|
348
|
+
border-radius: 50%;
|
|
349
|
+
background: var(--md-sys-color-inverse-on-surface);
|
|
350
|
+
color: var(--md-sys-color-inverse-surface);
|
|
351
|
+
flex-shrink: 0;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.ds-invalid-mark {
|
|
355
|
+
display: inline-flex;
|
|
356
|
+
align-items: center;
|
|
357
|
+
justify-content: center;
|
|
358
|
+
width: 12px;
|
|
359
|
+
height: 12px;
|
|
360
|
+
border-radius: 50%;
|
|
361
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
362
|
+
flex-shrink: 0;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* ----- Extension badges ----- */
|
|
366
|
+
|
|
367
|
+
.ds-ext-badge {
|
|
368
|
+
font-family: var(--xm-typescale-mono-font);
|
|
369
|
+
font-size: 9px;
|
|
370
|
+
font-weight: 700;
|
|
371
|
+
padding: var(--s-0-5) 5px;
|
|
372
|
+
border-radius: 3px;
|
|
373
|
+
letter-spacing: 0.05em;
|
|
374
|
+
flex-shrink: 0;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.ds-ext-yml,
|
|
378
|
+
.ds-ext-yaml {
|
|
379
|
+
background: var(--xm-ext-yml-bg);
|
|
380
|
+
color: var(--xm-ext-yml-ink);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.ds-ext-json {
|
|
384
|
+
background: var(--xm-ext-json-bg);
|
|
385
|
+
color: var(--xm-ext-json-ink);
|
|
386
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { TemplateResult } from "lit";
|
|
3
|
+
export type ValidationCode = "size" | "ext" | "parse" | "shape" | "empty" | "read";
|
|
4
|
+
export type ValidationState = "idle" | "dragging" | "valid" | "invalid" | "error-no-file";
|
|
5
|
+
export interface ValidationFile {
|
|
6
|
+
ext: string;
|
|
7
|
+
name: string;
|
|
8
|
+
summary?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ValidationError {
|
|
11
|
+
code: ValidationCode;
|
|
12
|
+
fileName?: string;
|
|
13
|
+
path?: string;
|
|
14
|
+
rule?: string;
|
|
15
|
+
message: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ValidationPreset extends ValidationError {
|
|
18
|
+
file?: ValidationFile;
|
|
19
|
+
}
|
|
20
|
+
export declare const VALIDATION_TITLE: Record<ValidationCode, string>;
|
|
21
|
+
export declare const VALIDATION_PRESETS: Record<ValidationCode, ValidationPreset>;
|
|
22
|
+
declare class XmFileValidationBlock extends LitElement {
|
|
23
|
+
state: ValidationState;
|
|
24
|
+
file: ValidationFile | null;
|
|
25
|
+
error: ValidationError | null;
|
|
26
|
+
hint: string;
|
|
27
|
+
fileCsv: string;
|
|
28
|
+
errorJson: string;
|
|
29
|
+
private _copyState;
|
|
30
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
31
|
+
connectedCallback(): void;
|
|
32
|
+
private _emit;
|
|
33
|
+
private _renderDropRow;
|
|
34
|
+
private _renderFileRow;
|
|
35
|
+
private _onCopyPath;
|
|
36
|
+
private _onDismiss;
|
|
37
|
+
private _renderErrorRow;
|
|
38
|
+
render(): TemplateResult;
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface HTMLElementTagNameMap {
|
|
42
|
+
"xm-file-validation-block": XmFileValidationBlock;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {};
|