@frontile/theme 0.18.0-alpha.5 → 0.18.0-alpha.6
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 +20 -22
- package/declarations/colors/config.d.ts +8 -32
- package/declarations/colors/palette-absolute.d.ts +2 -2
- package/declarations/colors/palette.d.ts +1 -1
- package/declarations/colors/types.d.ts +102 -151
- package/declarations/components/button.d.ts +25 -0
- package/declarations/components/dropdown.d.ts +2 -2
- package/declarations/components/forms/forms.d.ts +9 -4
- package/declarations/components/listbox.d.ts +5 -0
- package/declarations/components/popover.d.ts +2 -2
- package/declarations/components/progress-bar.d.ts +15 -0
- package/declarations/components/spinner.d.ts +5 -0
- package/declarations/plugin/default-config.d.ts +8 -32
- package/dist/colors.js +1 -1
- package/dist/config-C7vXQ4-a.js +539 -0
- package/dist/config-C7vXQ4-a.js.map +1 -0
- package/dist/config-CBa5Uj8t.js +523 -0
- package/dist/config-CBa5Uj8t.js.map +1 -0
- package/dist/config-CHoxd5sI.js +523 -0
- package/dist/config-CHoxd5sI.js.map +1 -0
- package/dist/config-CWYC8yYP.js +535 -0
- package/dist/config-CWYC8yYP.js.map +1 -0
- package/dist/config-DloXBqGi.js +370 -0
- package/dist/config-DloXBqGi.js.map +1 -0
- package/dist/config-mOd3rEnK.js +414 -0
- package/dist/config-mOd3rEnK.js.map +1 -0
- package/dist/forms-legacy-CrC9B8no.js +1869 -0
- package/dist/forms-legacy-CrC9B8no.js.map +1 -0
- package/dist/forms-legacy-DpUs6ftu.js +1944 -0
- package/dist/forms-legacy-DpUs6ftu.js.map +1 -0
- package/dist/forms-legacy-zJdd4qoI.js +1944 -0
- package/dist/forms-legacy-zJdd4qoI.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/dist/styles/font-faces.css +52 -8
- package/dist/styles/typography.css +213 -117
- package/package.json +22 -20
- package/public/fonts/domine-variable.woff2 +0 -0
- package/public/fonts/open-sans-italic-variable.woff2 +0 -0
- package/public/fonts/open-sans-variable.woff2 +0 -0
- package/public/fonts/source-code-pro-italic-variable.woff2 +0 -0
- package/public/fonts/source-code-pro-variable.woff2 +0 -0
- package/src/styles/font-faces.css +52 -8
- package/src/styles/typography.css +213 -117
- package/public/fonts/stix-two-text-italic-variable.woff2 +0 -0
- package/public/fonts/stix-two-text-variable.woff2 +0 -0
|
@@ -0,0 +1,1944 @@
|
|
|
1
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
2
|
+
import { createTV } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
function flat(arr, target) {
|
|
5
|
+
arr.forEach(el => {
|
|
6
|
+
if (Array.isArray(el)) {
|
|
7
|
+
flat(el, target);
|
|
8
|
+
} else {
|
|
9
|
+
target.push(el);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function flatArray(arr) {
|
|
14
|
+
const flattened = [];
|
|
15
|
+
flat(arr, flattened);
|
|
16
|
+
return flattened;
|
|
17
|
+
}
|
|
18
|
+
const voidEmpty = value => value ? value : undefined;
|
|
19
|
+
const clsx = (...classes) => {
|
|
20
|
+
return voidEmpty(flatArray(classes).filter(Boolean).join(' '));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// Common size units used across all design tokens (icons, typography, etc.)
|
|
24
|
+
const COMMON_UNITS = ['pico', 'nano', 'micro', '3xs', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'kilo', 'mega'];
|
|
25
|
+
const ELEVATION_LEVELS = ['0', '1', '2', '3', '4', '5'];
|
|
26
|
+
const twMergeConfig = {
|
|
27
|
+
extend: {
|
|
28
|
+
classGroups: {
|
|
29
|
+
// Icon sizes
|
|
30
|
+
'icon-size': [{
|
|
31
|
+
'size-icon': COMMON_UNITS
|
|
32
|
+
}],
|
|
33
|
+
// Border widths (directional variants handled automatically)
|
|
34
|
+
'border-w': [{
|
|
35
|
+
border: ['thin', 'heavy', 'aggressive']
|
|
36
|
+
}],
|
|
37
|
+
// Border radius (extend existing rounded utilities)
|
|
38
|
+
rounded: [{
|
|
39
|
+
rounded: ['default', 'pill']
|
|
40
|
+
}],
|
|
41
|
+
// Elevation shadows
|
|
42
|
+
shadow: [{
|
|
43
|
+
'shadow-elevation': ELEVATION_LEVELS
|
|
44
|
+
}],
|
|
45
|
+
// Opacity
|
|
46
|
+
opacity: [{
|
|
47
|
+
opacity: ['hover', 'disabled']
|
|
48
|
+
}],
|
|
49
|
+
// Typography composite text styles (extend font-size class group)
|
|
50
|
+
// These set font-size + other properties, so they should conflict with text-* utilities
|
|
51
|
+
'font-size': [{
|
|
52
|
+
'text-marquee': [...COMMON_UNITS]
|
|
53
|
+
}, {
|
|
54
|
+
'text-header': [...COMMON_UNITS]
|
|
55
|
+
}, {
|
|
56
|
+
'text-body': [...COMMON_UNITS]
|
|
57
|
+
}, {
|
|
58
|
+
'text-code': [...COMMON_UNITS]
|
|
59
|
+
}, {
|
|
60
|
+
'text-caption': [...COMMON_UNITS]
|
|
61
|
+
}, {
|
|
62
|
+
'text-label': [...COMMON_UNITS]
|
|
63
|
+
}]
|
|
64
|
+
},
|
|
65
|
+
conflictingClassGroups: {
|
|
66
|
+
'icon-size': ['w', 'h', 'size']
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const twMergeBase = extendTailwindMerge(twMergeConfig);
|
|
71
|
+
function twMerge(defaultClass, overwrites) {
|
|
72
|
+
if (overwrites) {
|
|
73
|
+
return twMergeBase(clsx(defaultClass, overwrites));
|
|
74
|
+
}
|
|
75
|
+
return clsx(defaultClass);
|
|
76
|
+
}
|
|
77
|
+
const tv = createTV({
|
|
78
|
+
twMerge: true,
|
|
79
|
+
twMergeConfig
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const avatar = tv({
|
|
83
|
+
slots: {
|
|
84
|
+
base: ['flex', 'relative', 'justify-center', 'items-center', 'box-border', 'overflow-hidden', 'align-middle', 'text-neutral-strong', 'z-0', 'bg-neutral-subtle', 'ring-1 ring-default ring-offset-1 ring-offset-background'],
|
|
85
|
+
img: 'size-full',
|
|
86
|
+
name: ['w-full', 'font-label', 'text-center', 'text-inherit', 'absolute', 'top-1/2', 'left-1/2', '-translate-x-1/2', '-translate-y-1/2', 'select-none']
|
|
87
|
+
},
|
|
88
|
+
variants: {
|
|
89
|
+
shape: {
|
|
90
|
+
square: 'rounded-[20%]',
|
|
91
|
+
circle: 'rounded-full'
|
|
92
|
+
},
|
|
93
|
+
size: {
|
|
94
|
+
xs: {
|
|
95
|
+
base: 'size-5 text-label-2xs'
|
|
96
|
+
},
|
|
97
|
+
sm: {
|
|
98
|
+
base: 'size-6 text-label-xs'
|
|
99
|
+
},
|
|
100
|
+
md: {
|
|
101
|
+
base: 'size-8 text-label-sm'
|
|
102
|
+
},
|
|
103
|
+
lg: {
|
|
104
|
+
base: 'size-10 text-label-md'
|
|
105
|
+
},
|
|
106
|
+
xl: {
|
|
107
|
+
base: 'size-12 text-label-lg'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
defaultVariants: {
|
|
112
|
+
size: 'md',
|
|
113
|
+
shape: 'circle'
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const focusVisibleRing = ['outline-hidden', 'focus-visible:z-10', 'focus-visible:ring-3', 'focus-visible:ring-focus', 'focus-visible:ring-offset-2', 'focus-visible:ring-offset-background'];
|
|
118
|
+
const focusVisibleWithinRing = ['outline-hidden', 'has-focus-visible:z-10', 'has-focus-visible:ring-3', 'has-[:focus-visible]:ring-focus', 'has-focus-visible:ring-offset-2', 'has-[:focus-visible]:ring-offset-background'];
|
|
119
|
+
|
|
120
|
+
const baseButton = tv({
|
|
121
|
+
base: [
|
|
122
|
+
// label text role (Open Sans semibold); buttons stay single-line so keep tight leading
|
|
123
|
+
'leading-none', 'inline-flex items-center justify-center', '[&_svg]:size-[1em]', 'font-label', 'border', 'border-transparent', 'disabled:cursor-not-allowed', 'disabled:bg-surface-overlay-soft', 'disabled:text-neutral', 'disabled:border-neutral-soft', ...focusVisibleRing],
|
|
124
|
+
variants: {
|
|
125
|
+
appearance: {
|
|
126
|
+
outlined: ''
|
|
127
|
+
},
|
|
128
|
+
intent: {
|
|
129
|
+
default: '',
|
|
130
|
+
primary: 'focus-visible:ring-primary-soft',
|
|
131
|
+
accent: 'focus-visible:ring-accent-soft',
|
|
132
|
+
success: 'focus-visible:ring-success-soft',
|
|
133
|
+
warning: 'focus-visible:ring-warning-soft',
|
|
134
|
+
danger: 'focus-visible:ring-danger-soft'
|
|
135
|
+
},
|
|
136
|
+
size: {
|
|
137
|
+
xs: 'text-label-xs px-4 py-1 gap-1 rounded-full',
|
|
138
|
+
sm: 'text-label-sm px-5 py-1.5 gap-1.5 rounded-full',
|
|
139
|
+
md: 'text-label-md px-6 py-2 gap-1.5 rounded-full',
|
|
140
|
+
lg: 'text-label-xl px-8 py-2.5 gap-2 rounded-full',
|
|
141
|
+
xl: 'text-label-2xl px-10 py-3 gap-2.5 rounded-full',
|
|
142
|
+
'2xl': 'text-label-3xl px-12 py-3.5 gap-3 rounded-full',
|
|
143
|
+
// exceeds the label text scale (max 3xl); keep raw size with the label font
|
|
144
|
+
'3xl': 'text-5xl px-12 py-4 gap-3 rounded-full'
|
|
145
|
+
},
|
|
146
|
+
isInGroup: {
|
|
147
|
+
true: ['rounded-none first:rounded-s-full last:rounded-e-full', '[&:not(:first-child):not(:last-child)]:rounded-none', 'not-last-of-type:-me-px']
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
compoundVariants: [
|
|
151
|
+
// APPEARANCE: outlined
|
|
152
|
+
{
|
|
153
|
+
appearance: 'outlined',
|
|
154
|
+
intent: 'default',
|
|
155
|
+
class: 'text-neutral-bolder border-neutral-bolder hover:bg-neutral-subtle hover:border-neutral-bolder hover:text-neutral-bolder active:bg-neutral-muted active:border-neutral-strong active:text-neutral-strong'
|
|
156
|
+
}, {
|
|
157
|
+
appearance: 'outlined',
|
|
158
|
+
intent: 'primary',
|
|
159
|
+
class: 'text-primary-strong border-primary hover:bg-primary-subtle hover:border-primary-soft hover:text-primary-bolder active:bg-primary-muted active:border-primary-firm active:text-primary-bolder'
|
|
160
|
+
}, {
|
|
161
|
+
appearance: 'outlined',
|
|
162
|
+
intent: 'accent',
|
|
163
|
+
class: 'text-accent-strong border-accent hover:bg-accent-subtle hover:border-accent-soft hover:text-accent-bolder active:bg-accent-muted active:border-accent-firm active:text-accent-bolder'
|
|
164
|
+
}, {
|
|
165
|
+
appearance: 'outlined',
|
|
166
|
+
intent: 'success',
|
|
167
|
+
class: 'text-success-strong border-success hover:bg-success-subtle hover:border-success-soft hover:text-success-bolder active:bg-success-muted active:border-success-firm active:text-success-bolder'
|
|
168
|
+
}, {
|
|
169
|
+
appearance: 'outlined',
|
|
170
|
+
intent: 'warning',
|
|
171
|
+
class: 'text-warning-strong border-warning hover:bg-warning-subtle hover:border-warning-soft hover:text-warning-bolder active:bg-warning-muted active:border-warning-firm active:text-warning-bolder'
|
|
172
|
+
}, {
|
|
173
|
+
appearance: 'outlined',
|
|
174
|
+
intent: 'danger',
|
|
175
|
+
class: 'text-danger-strong border-danger hover:bg-danger-subtle hover:border-danger-soft hover:text-danger-bolder active:bg-danger-muted active:border-danger-firm active:text-danger-bolder'
|
|
176
|
+
}],
|
|
177
|
+
defaultVariants: {
|
|
178
|
+
size: 'md',
|
|
179
|
+
intent: 'default'
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
const button = tv({
|
|
183
|
+
extend: baseButton,
|
|
184
|
+
base: [''],
|
|
185
|
+
variants: {
|
|
186
|
+
appearance: {
|
|
187
|
+
default: 'shadow-elevation-2',
|
|
188
|
+
soft: '',
|
|
189
|
+
outlined: '',
|
|
190
|
+
minimal: '',
|
|
191
|
+
tonal: 'shadow-elevation-2',
|
|
192
|
+
custom: ''
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
compoundVariants: [
|
|
196
|
+
// APPEARANCE: default (filled)
|
|
197
|
+
// Text color is fixed to the rest on-color for all states — only the
|
|
198
|
+
// background walks the interaction trio. Switching the on-color per
|
|
199
|
+
// state causes the label to flip white/black mid-interaction whenever
|
|
200
|
+
// a state's background crosses the contrast threshold (e.g. primary's
|
|
201
|
+
// hover step is lighter than its rest step in light mode).
|
|
202
|
+
{
|
|
203
|
+
appearance: 'default',
|
|
204
|
+
intent: 'default',
|
|
205
|
+
class: 'bg-neutral-bolder text-on-neutral-bolder hover:bg-neutral-bolder active:bg-neutral-strong'
|
|
206
|
+
}, {
|
|
207
|
+
appearance: 'default',
|
|
208
|
+
intent: 'primary',
|
|
209
|
+
class: 'bg-primary text-on-primary hover:bg-primary-soft active:bg-primary-firm'
|
|
210
|
+
}, {
|
|
211
|
+
appearance: 'default',
|
|
212
|
+
intent: 'accent',
|
|
213
|
+
class: 'bg-accent text-on-accent hover:bg-accent-soft active:bg-accent-firm'
|
|
214
|
+
}, {
|
|
215
|
+
appearance: 'default',
|
|
216
|
+
intent: 'success',
|
|
217
|
+
class: 'bg-success text-on-success hover:bg-success-soft active:bg-success-firm'
|
|
218
|
+
}, {
|
|
219
|
+
appearance: 'default',
|
|
220
|
+
intent: 'warning',
|
|
221
|
+
class: 'bg-warning text-on-warning hover:bg-warning-soft active:bg-warning-firm'
|
|
222
|
+
}, {
|
|
223
|
+
appearance: 'default',
|
|
224
|
+
intent: 'danger',
|
|
225
|
+
class: 'bg-danger text-on-danger hover:bg-danger-soft active:bg-danger-firm'
|
|
226
|
+
},
|
|
227
|
+
// APPEARANCE: soft (tint fill + colored stroke)
|
|
228
|
+
{
|
|
229
|
+
appearance: 'soft',
|
|
230
|
+
intent: 'default',
|
|
231
|
+
class: 'bg-neutral-subtle border-neutral-bolder text-neutral-bolder hover:bg-neutral-muted hover:border-neutral-bolder hover:text-neutral-bolder active:bg-neutral-soft active:border-neutral-strong active:text-neutral-strong'
|
|
232
|
+
}, {
|
|
233
|
+
appearance: 'soft',
|
|
234
|
+
intent: 'primary',
|
|
235
|
+
class: 'bg-primary-subtle border-primary text-primary-strong hover:bg-primary-muted hover:border-primary-soft hover:text-primary-bolder active:bg-primary-soft active:border-primary-firm active:text-primary-bolder'
|
|
236
|
+
}, {
|
|
237
|
+
appearance: 'soft',
|
|
238
|
+
intent: 'accent',
|
|
239
|
+
class: 'bg-accent-subtle border-accent text-accent-strong hover:bg-accent-muted hover:border-accent-soft hover:text-accent-bolder active:bg-accent-soft active:border-accent-firm active:text-accent-bolder'
|
|
240
|
+
}, {
|
|
241
|
+
appearance: 'soft',
|
|
242
|
+
intent: 'success',
|
|
243
|
+
class: 'bg-success-subtle border-success text-success-strong hover:bg-success-muted hover:border-success-soft hover:text-success-bolder active:bg-success-soft active:border-success-firm active:text-success-bolder'
|
|
244
|
+
}, {
|
|
245
|
+
appearance: 'soft',
|
|
246
|
+
intent: 'warning',
|
|
247
|
+
class: 'bg-warning-subtle border-warning text-warning-strong hover:bg-warning-muted hover:border-warning-soft hover:text-warning-bolder active:bg-warning-soft active:border-warning-firm active:text-warning-bolder'
|
|
248
|
+
}, {
|
|
249
|
+
appearance: 'soft',
|
|
250
|
+
intent: 'danger',
|
|
251
|
+
class: 'bg-danger-subtle border-danger text-danger-strong hover:bg-danger-muted hover:border-danger-soft hover:text-danger-bolder active:bg-danger-soft active:border-danger-firm active:text-danger-bolder'
|
|
252
|
+
},
|
|
253
|
+
// APPEARANCE: minimal (ghost)
|
|
254
|
+
{
|
|
255
|
+
appearance: 'minimal',
|
|
256
|
+
intent: 'default',
|
|
257
|
+
class: 'text-neutral-bolder hover:bg-neutral-subtle hover:text-neutral-bolder active:bg-neutral-muted active:text-neutral-strong'
|
|
258
|
+
}, {
|
|
259
|
+
appearance: 'minimal',
|
|
260
|
+
intent: 'primary',
|
|
261
|
+
class: 'text-primary-strong hover:bg-primary-subtle hover:text-primary-bolder active:bg-primary-muted active:text-primary-bolder'
|
|
262
|
+
}, {
|
|
263
|
+
appearance: 'minimal',
|
|
264
|
+
intent: 'accent',
|
|
265
|
+
class: 'text-accent-strong hover:bg-accent-subtle hover:text-accent-bolder active:bg-accent-muted active:text-accent-bolder'
|
|
266
|
+
}, {
|
|
267
|
+
appearance: 'minimal',
|
|
268
|
+
intent: 'success',
|
|
269
|
+
class: 'text-success-strong hover:bg-success-subtle hover:text-success-bolder active:bg-success-muted active:text-success-bolder'
|
|
270
|
+
}, {
|
|
271
|
+
appearance: 'minimal',
|
|
272
|
+
intent: 'warning',
|
|
273
|
+
class: 'text-warning-strong hover:bg-warning-subtle hover:text-warning-bolder active:bg-warning-muted active:text-warning-bolder'
|
|
274
|
+
}, {
|
|
275
|
+
appearance: 'minimal',
|
|
276
|
+
intent: 'danger',
|
|
277
|
+
class: 'text-danger-strong hover:bg-danger-subtle hover:text-danger-bolder active:bg-danger-muted active:text-danger-bolder'
|
|
278
|
+
},
|
|
279
|
+
// APPEARANCE: tonal — text stays fixed (on-tonal); only the tint
|
|
280
|
+
// background walks tonal → tint-hover → tint-pressed.
|
|
281
|
+
{
|
|
282
|
+
appearance: 'tonal',
|
|
283
|
+
intent: 'default',
|
|
284
|
+
class: 'bg-neutral-subtle text-neutral-bolder hover:bg-neutral-muted active:bg-neutral-soft'
|
|
285
|
+
}, {
|
|
286
|
+
appearance: 'tonal',
|
|
287
|
+
intent: 'primary',
|
|
288
|
+
class: 'bg-primary-subtle text-primary-strong hover:bg-primary-muted active:bg-primary-soft'
|
|
289
|
+
}, {
|
|
290
|
+
appearance: 'tonal',
|
|
291
|
+
intent: 'accent',
|
|
292
|
+
class: 'bg-accent-subtle text-accent-strong hover:bg-accent-muted active:bg-accent-soft'
|
|
293
|
+
}, {
|
|
294
|
+
appearance: 'tonal',
|
|
295
|
+
intent: 'success',
|
|
296
|
+
class: 'bg-success-subtle text-success-strong hover:bg-success-muted active:bg-success-soft'
|
|
297
|
+
}, {
|
|
298
|
+
appearance: 'tonal',
|
|
299
|
+
intent: 'warning',
|
|
300
|
+
class: 'bg-warning-subtle text-warning-strong hover:bg-warning-muted active:bg-warning-soft'
|
|
301
|
+
}, {
|
|
302
|
+
appearance: 'tonal',
|
|
303
|
+
intent: 'danger',
|
|
304
|
+
class: 'bg-danger-subtle text-danger-strong hover:bg-danger-muted active:bg-danger-soft'
|
|
305
|
+
},
|
|
306
|
+
// APPEARANCE: custom
|
|
307
|
+
{
|
|
308
|
+
appearance: 'custom',
|
|
309
|
+
intent: 'default',
|
|
310
|
+
class: 'text-neutral-strong'
|
|
311
|
+
}, {
|
|
312
|
+
appearance: 'custom',
|
|
313
|
+
intent: 'primary',
|
|
314
|
+
class: 'text-primary-strong'
|
|
315
|
+
}, {
|
|
316
|
+
appearance: 'custom',
|
|
317
|
+
intent: 'accent',
|
|
318
|
+
class: 'text-accent-strong'
|
|
319
|
+
}, {
|
|
320
|
+
appearance: 'custom',
|
|
321
|
+
intent: 'success',
|
|
322
|
+
class: 'text-success-strong'
|
|
323
|
+
}, {
|
|
324
|
+
appearance: 'custom',
|
|
325
|
+
intent: 'warning',
|
|
326
|
+
class: 'text-warning-strong'
|
|
327
|
+
}, {
|
|
328
|
+
appearance: 'custom',
|
|
329
|
+
intent: 'danger',
|
|
330
|
+
class: 'text-danger-strong'
|
|
331
|
+
}],
|
|
332
|
+
defaultVariants: {
|
|
333
|
+
size: 'md',
|
|
334
|
+
intent: 'primary'
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
const toggleButton = tv({
|
|
338
|
+
extend: baseButton,
|
|
339
|
+
base: [''],
|
|
340
|
+
variants: {
|
|
341
|
+
isSelected: {
|
|
342
|
+
true: ''
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
compoundVariants: [{
|
|
346
|
+
appearance: 'outlined',
|
|
347
|
+
intent: 'default',
|
|
348
|
+
isSelected: true,
|
|
349
|
+
class: 'bg-neutral-bolder text-on-neutral-bolder hover:bg-neutral-bolder'
|
|
350
|
+
}, {
|
|
351
|
+
appearance: 'outlined',
|
|
352
|
+
intent: 'primary',
|
|
353
|
+
isSelected: true,
|
|
354
|
+
class: 'bg-primary text-on-primary hover:bg-primary-soft'
|
|
355
|
+
}, {
|
|
356
|
+
appearance: 'outlined',
|
|
357
|
+
intent: 'accent',
|
|
358
|
+
isSelected: true,
|
|
359
|
+
class: 'bg-accent text-on-accent hover:bg-accent-soft'
|
|
360
|
+
}, {
|
|
361
|
+
appearance: 'outlined',
|
|
362
|
+
intent: 'success',
|
|
363
|
+
isSelected: true,
|
|
364
|
+
class: 'bg-success text-on-success hover:bg-success-soft'
|
|
365
|
+
}, {
|
|
366
|
+
appearance: 'outlined',
|
|
367
|
+
intent: 'warning',
|
|
368
|
+
isSelected: true,
|
|
369
|
+
class: 'bg-warning text-on-warning hover:bg-warning-soft'
|
|
370
|
+
}, {
|
|
371
|
+
appearance: 'outlined',
|
|
372
|
+
intent: 'danger',
|
|
373
|
+
isSelected: true,
|
|
374
|
+
class: 'bg-danger text-on-danger hover:bg-danger-soft'
|
|
375
|
+
}]
|
|
376
|
+
});
|
|
377
|
+
const buttonGroup = tv({
|
|
378
|
+
base: ['inline-flex items-center justify-center h-auto']
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
const chip = tv({
|
|
382
|
+
slots: {
|
|
383
|
+
base: ['disabled:cursor-not-allowed', 'disabled:opacity-40', 'whitespace-nowrap', 'inline-flex items-center justify-between box-border'],
|
|
384
|
+
// label text role (size set per size variant)
|
|
385
|
+
content: ['flex-1 text-inherit font-label'],
|
|
386
|
+
dot: ['w-2', 'h-2', 'ml-1', 'rounded-full'],
|
|
387
|
+
closeButton: ['p-0.5']
|
|
388
|
+
},
|
|
389
|
+
variants: {
|
|
390
|
+
isDisabled: {
|
|
391
|
+
true: 'opacity-40'
|
|
392
|
+
},
|
|
393
|
+
appearance: {
|
|
394
|
+
default: '',
|
|
395
|
+
outlined: '',
|
|
396
|
+
faded: ''
|
|
397
|
+
},
|
|
398
|
+
intent: {
|
|
399
|
+
default: {
|
|
400
|
+
dot: 'bg-neutral-strong',
|
|
401
|
+
closeButton: ['bg-neutral-muted', 'text-on-neutral', 'hover:bg-neutral']
|
|
402
|
+
},
|
|
403
|
+
primary: {
|
|
404
|
+
dot: 'bg-primary',
|
|
405
|
+
closeButton: ['bg-primary-muted', 'text-on-primary', 'hover:bg-primary-firm', 'focus-visible:ring-primary-soft']
|
|
406
|
+
},
|
|
407
|
+
accent: {
|
|
408
|
+
dot: 'bg-accent',
|
|
409
|
+
closeButton: ['bg-accent-muted', 'text-on-accent', 'hover:bg-accent-firm', 'focus-visible:ring-accent-soft']
|
|
410
|
+
},
|
|
411
|
+
success: {
|
|
412
|
+
dot: 'bg-success',
|
|
413
|
+
closeButton: ['bg-success-muted', 'text-on-success', 'hover:bg-success-firm', 'focus-visible:ring-success-soft']
|
|
414
|
+
},
|
|
415
|
+
warning: {
|
|
416
|
+
dot: 'bg-warning',
|
|
417
|
+
closeButton: ['bg-warning-muted', 'text-on-warning', 'hover:bg-warning-firm', 'focus-visible:ring-warning-soft']
|
|
418
|
+
},
|
|
419
|
+
danger: {
|
|
420
|
+
dot: 'bg-danger',
|
|
421
|
+
closeButton: ['bg-danger-muted', 'text-on-danger', 'hover:bg-danger-firm', 'focus-visible:ring-danger-soft']
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
size: {
|
|
425
|
+
sm: {
|
|
426
|
+
base: 'text-label-2xs px-1 h-6',
|
|
427
|
+
content: 'px-1',
|
|
428
|
+
closeButton: 'text-label-2xs'
|
|
429
|
+
},
|
|
430
|
+
md: {
|
|
431
|
+
base: 'text-label-xs px-1 h-7',
|
|
432
|
+
content: 'px-2',
|
|
433
|
+
closeButton: 'text-label-xs'
|
|
434
|
+
},
|
|
435
|
+
lg: {
|
|
436
|
+
base: 'text-label-md px-2 h-8',
|
|
437
|
+
content: 'px-2',
|
|
438
|
+
closeButton: 'text-label-md'
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
radius: {
|
|
442
|
+
none: 'rounded-none',
|
|
443
|
+
sm: 'rounded-sm',
|
|
444
|
+
lg: 'rounded-lg',
|
|
445
|
+
full: 'rounded-full'
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
compoundVariants: [
|
|
449
|
+
// APPEARANCE: default (filled)
|
|
450
|
+
{
|
|
451
|
+
appearance: 'default',
|
|
452
|
+
intent: 'default',
|
|
453
|
+
class: {
|
|
454
|
+
base: 'bg-neutral-bolder text-on-neutral-bolder'
|
|
455
|
+
}
|
|
456
|
+
}, {
|
|
457
|
+
appearance: 'default',
|
|
458
|
+
intent: 'primary',
|
|
459
|
+
class: {
|
|
460
|
+
base: 'bg-primary text-on-primary'
|
|
461
|
+
}
|
|
462
|
+
}, {
|
|
463
|
+
appearance: 'default',
|
|
464
|
+
intent: 'accent',
|
|
465
|
+
class: {
|
|
466
|
+
base: 'bg-accent text-on-accent'
|
|
467
|
+
}
|
|
468
|
+
}, {
|
|
469
|
+
appearance: 'default',
|
|
470
|
+
intent: 'success',
|
|
471
|
+
class: {
|
|
472
|
+
base: 'bg-success text-on-success'
|
|
473
|
+
}
|
|
474
|
+
}, {
|
|
475
|
+
appearance: 'default',
|
|
476
|
+
intent: 'warning',
|
|
477
|
+
class: {
|
|
478
|
+
base: 'bg-warning text-on-warning'
|
|
479
|
+
}
|
|
480
|
+
}, {
|
|
481
|
+
appearance: 'default',
|
|
482
|
+
intent: 'danger',
|
|
483
|
+
class: {
|
|
484
|
+
base: 'bg-danger text-on-danger'
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
// APPEARANCE: faded (tonal)
|
|
488
|
+
{
|
|
489
|
+
appearance: 'faded',
|
|
490
|
+
intent: 'default',
|
|
491
|
+
class: {
|
|
492
|
+
base: 'text-neutral-strong bg-neutral-subtle'
|
|
493
|
+
}
|
|
494
|
+
}, {
|
|
495
|
+
appearance: 'faded',
|
|
496
|
+
intent: 'primary',
|
|
497
|
+
class: {
|
|
498
|
+
base: 'text-primary-strong bg-primary-subtle'
|
|
499
|
+
}
|
|
500
|
+
}, {
|
|
501
|
+
appearance: 'faded',
|
|
502
|
+
intent: 'accent',
|
|
503
|
+
class: {
|
|
504
|
+
base: 'text-accent-strong bg-accent-subtle'
|
|
505
|
+
}
|
|
506
|
+
}, {
|
|
507
|
+
appearance: 'faded',
|
|
508
|
+
intent: 'success',
|
|
509
|
+
class: {
|
|
510
|
+
base: 'text-success-strong bg-success-subtle'
|
|
511
|
+
}
|
|
512
|
+
}, {
|
|
513
|
+
appearance: 'faded',
|
|
514
|
+
intent: 'warning',
|
|
515
|
+
class: {
|
|
516
|
+
base: 'text-warning-strong bg-warning-subtle'
|
|
517
|
+
}
|
|
518
|
+
}, {
|
|
519
|
+
appearance: 'faded',
|
|
520
|
+
intent: 'danger',
|
|
521
|
+
class: {
|
|
522
|
+
base: 'text-danger-strong bg-danger-subtle'
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
// APPEARANCE: outlined
|
|
526
|
+
{
|
|
527
|
+
appearance: 'outlined',
|
|
528
|
+
intent: 'default',
|
|
529
|
+
class: {
|
|
530
|
+
base: 'text-neutral-strong border border-neutral'
|
|
531
|
+
}
|
|
532
|
+
}, {
|
|
533
|
+
appearance: 'outlined',
|
|
534
|
+
intent: 'primary',
|
|
535
|
+
class: {
|
|
536
|
+
base: 'text-primary-strong border border-primary'
|
|
537
|
+
}
|
|
538
|
+
}, {
|
|
539
|
+
appearance: 'outlined',
|
|
540
|
+
intent: 'accent',
|
|
541
|
+
class: {
|
|
542
|
+
base: 'text-accent-strong border border-accent'
|
|
543
|
+
}
|
|
544
|
+
}, {
|
|
545
|
+
appearance: 'outlined',
|
|
546
|
+
intent: 'success',
|
|
547
|
+
class: {
|
|
548
|
+
base: 'text-success-strong border border-success'
|
|
549
|
+
}
|
|
550
|
+
}, {
|
|
551
|
+
appearance: 'outlined',
|
|
552
|
+
intent: 'warning',
|
|
553
|
+
class: {
|
|
554
|
+
base: 'text-warning-strong border border-warning'
|
|
555
|
+
}
|
|
556
|
+
}, {
|
|
557
|
+
appearance: 'outlined',
|
|
558
|
+
intent: 'danger',
|
|
559
|
+
class: {
|
|
560
|
+
base: 'text-danger-strong border border-danger'
|
|
561
|
+
}
|
|
562
|
+
}],
|
|
563
|
+
defaultVariants: {
|
|
564
|
+
size: 'md',
|
|
565
|
+
intent: 'default',
|
|
566
|
+
appearance: 'default',
|
|
567
|
+
radius: 'full'
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
const progressBar = tv({
|
|
572
|
+
slots: {
|
|
573
|
+
base: ['overflow-hidden w-full bg-surface-overlay-soft'],
|
|
574
|
+
label: ['flex justify-between pb-1 gap-2 font-label text-label-sm'],
|
|
575
|
+
progress: [''],
|
|
576
|
+
description: ['text-neutral font-body text-body-micro pb-1']
|
|
577
|
+
},
|
|
578
|
+
variants: {
|
|
579
|
+
isIndeterminate: {
|
|
580
|
+
true: {
|
|
581
|
+
progress: ['animate-loading origin-left']
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
intent: {
|
|
585
|
+
default: {
|
|
586
|
+
progress: 'bg-neutral-strong'
|
|
587
|
+
},
|
|
588
|
+
primary: {
|
|
589
|
+
progress: 'bg-primary-soft'
|
|
590
|
+
},
|
|
591
|
+
accent: {
|
|
592
|
+
progress: 'bg-accent-soft'
|
|
593
|
+
},
|
|
594
|
+
success: {
|
|
595
|
+
progress: 'bg-success-soft'
|
|
596
|
+
},
|
|
597
|
+
warning: {
|
|
598
|
+
progress: 'bg-warning-soft'
|
|
599
|
+
},
|
|
600
|
+
danger: {
|
|
601
|
+
progress: 'bg-danger-soft'
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
size: {
|
|
605
|
+
xs: {
|
|
606
|
+
base: 'h-1',
|
|
607
|
+
progress: 'h-1',
|
|
608
|
+
label: 'text-label-2xs',
|
|
609
|
+
description: 'text-body-micro'
|
|
610
|
+
},
|
|
611
|
+
sm: {
|
|
612
|
+
base: 'h-2',
|
|
613
|
+
progress: 'h-2',
|
|
614
|
+
label: 'text-label-xs',
|
|
615
|
+
description: 'text-body-2xs'
|
|
616
|
+
},
|
|
617
|
+
md: {
|
|
618
|
+
base: 'h-4',
|
|
619
|
+
progress: 'h-4'
|
|
620
|
+
},
|
|
621
|
+
lg: {
|
|
622
|
+
base: 'h-8',
|
|
623
|
+
progress: 'h-8',
|
|
624
|
+
label: 'text-label-md',
|
|
625
|
+
description: 'text-body-sm'
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
radius: {
|
|
629
|
+
none: 'rounded-none',
|
|
630
|
+
sm: 'rounded-sm',
|
|
631
|
+
lg: 'rounded-lg',
|
|
632
|
+
full: 'rounded-full'
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
defaultVariants: {
|
|
636
|
+
size: 'md',
|
|
637
|
+
intent: 'default',
|
|
638
|
+
radius: 'sm'
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
const closeButton = tv({
|
|
643
|
+
slots: {
|
|
644
|
+
base: ['rounded-full transition transition-200 text-inherit', ...focusVisibleRing],
|
|
645
|
+
icon: 'size-[1em]'
|
|
646
|
+
},
|
|
647
|
+
variants: {
|
|
648
|
+
size: {
|
|
649
|
+
xs: {
|
|
650
|
+
base: 'text-sm p-1'
|
|
651
|
+
},
|
|
652
|
+
sm: {
|
|
653
|
+
base: 'text-base p-2'
|
|
654
|
+
},
|
|
655
|
+
md: {
|
|
656
|
+
base: 'text-xl p-2'
|
|
657
|
+
},
|
|
658
|
+
lg: {
|
|
659
|
+
base: 'text-2xl p-3'
|
|
660
|
+
},
|
|
661
|
+
xl: {
|
|
662
|
+
base: 'text-4xl p-3'
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
variant: {
|
|
666
|
+
transparent: {
|
|
667
|
+
base: ['bg-transparent', 'hover:bg-surface-overlay-subtle']
|
|
668
|
+
},
|
|
669
|
+
subtle: {
|
|
670
|
+
base: ['bg-neutral-subtle', 'text-on-neutral-subtle', 'hover:bg-surface-overlay-subtle']
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
defaultVariants: {
|
|
675
|
+
size: 'md',
|
|
676
|
+
variant: 'transparent'
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
const listbox = tv({
|
|
681
|
+
base: 'w-full flex flex-col gap-0.5 outline-hidden p-1'
|
|
682
|
+
});
|
|
683
|
+
const listboxItem = tv({
|
|
684
|
+
slots: {
|
|
685
|
+
base: ['flex', 'group', 'gap-2', 'items-center', 'justify-between', 'relative', 'px-2', 'py-1.5', 'w-full', 'h-full', 'box-border', 'rounded-sm', 'subpixel-antialiased', 'outline-hidden', 'cursor-pointer', 'tap-highlight-transparent'],
|
|
686
|
+
descriptionWrapper: 'w-full flex flex-col items-start justify-center',
|
|
687
|
+
label: 'flex-1 font-body text-body-2xs truncate',
|
|
688
|
+
description: ['w-full', 'font-body text-body-micro', 'text-neutral-firm', 'group-hover:text-current'],
|
|
689
|
+
selectedIcon: ['text-inherit', 'w-4', 'h-4', 'shrink-0'],
|
|
690
|
+
shortcut: ['px-1', 'py-0.5', 'rounded-sm', 'font-label', 'text-neutral', 'text-label-2xs', 'border', 'border-neutral-soft', 'group-data-is-active:border-current']
|
|
691
|
+
},
|
|
692
|
+
variants: {
|
|
693
|
+
appearance: {
|
|
694
|
+
default: {
|
|
695
|
+
base: ''
|
|
696
|
+
},
|
|
697
|
+
outlined: {
|
|
698
|
+
base: 'border border-transparent bg-transparent'
|
|
699
|
+
},
|
|
700
|
+
faded: {
|
|
701
|
+
base: ['border border-transparent']
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
intent: {
|
|
705
|
+
default: {},
|
|
706
|
+
primary: {},
|
|
707
|
+
secondary: {},
|
|
708
|
+
accent: {},
|
|
709
|
+
success: {},
|
|
710
|
+
warning: {},
|
|
711
|
+
danger: {}
|
|
712
|
+
},
|
|
713
|
+
isActive: {
|
|
714
|
+
true: {
|
|
715
|
+
base: []
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
withDivider: {
|
|
719
|
+
true: {
|
|
720
|
+
base: ['mb-1.5']
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
isDisabled: {
|
|
724
|
+
true: {
|
|
725
|
+
base: 'opacity-disabled pointer-events-none'
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
isSelected: {
|
|
729
|
+
true: {
|
|
730
|
+
base: ''
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
defaultVariants: {
|
|
735
|
+
appearance: 'default',
|
|
736
|
+
intent: 'default'
|
|
737
|
+
},
|
|
738
|
+
compoundVariants: [
|
|
739
|
+
// appearance: default
|
|
740
|
+
{
|
|
741
|
+
appearance: 'default',
|
|
742
|
+
intent: 'default',
|
|
743
|
+
class: {
|
|
744
|
+
base: ['data-is-active:bg-neutral-subtle', 'data-is-active:text-neutral-strong']
|
|
745
|
+
}
|
|
746
|
+
}, {
|
|
747
|
+
appearance: 'default',
|
|
748
|
+
intent: 'primary',
|
|
749
|
+
class: {
|
|
750
|
+
base: ['data-is-active:bg-primary-soft', 'data-is-active:text-on-primary-soft']
|
|
751
|
+
}
|
|
752
|
+
}, {
|
|
753
|
+
appearance: 'default',
|
|
754
|
+
intent: 'accent',
|
|
755
|
+
class: {
|
|
756
|
+
base: ['data-is-active:bg-accent-soft', 'data-is-active:text-on-accent-soft']
|
|
757
|
+
}
|
|
758
|
+
}, {
|
|
759
|
+
appearance: 'default',
|
|
760
|
+
intent: 'success',
|
|
761
|
+
class: {
|
|
762
|
+
base: ['data-is-active:bg-success-soft', 'data-is-active:text-on-success-soft']
|
|
763
|
+
}
|
|
764
|
+
}, {
|
|
765
|
+
appearance: 'default',
|
|
766
|
+
intent: 'warning',
|
|
767
|
+
class: {
|
|
768
|
+
base: ['data-is-active:bg-warning-soft', 'data-is-active:text-on-warning-soft']
|
|
769
|
+
}
|
|
770
|
+
}, {
|
|
771
|
+
appearance: 'default',
|
|
772
|
+
intent: 'danger',
|
|
773
|
+
class: {
|
|
774
|
+
base: ['data-is-active:bg-danger-soft', 'data-is-active:text-on-danger-soft']
|
|
775
|
+
}
|
|
776
|
+
}, {
|
|
777
|
+
appearance: 'default',
|
|
778
|
+
intent: 'default',
|
|
779
|
+
isActive: true,
|
|
780
|
+
class: {
|
|
781
|
+
shortcut: ['text-on-neutral', 'border-on-neutral/20']
|
|
782
|
+
}
|
|
783
|
+
}, {
|
|
784
|
+
appearance: 'default',
|
|
785
|
+
intent: 'primary',
|
|
786
|
+
isActive: true,
|
|
787
|
+
class: {
|
|
788
|
+
shortcut: ['text-on-primary-soft', 'border-on-primary-soft/20']
|
|
789
|
+
}
|
|
790
|
+
}, {
|
|
791
|
+
appearance: 'default',
|
|
792
|
+
intent: 'accent',
|
|
793
|
+
isActive: true,
|
|
794
|
+
class: {
|
|
795
|
+
shortcut: ['text-on-accent-soft', 'border-on-accent-soft/20']
|
|
796
|
+
}
|
|
797
|
+
}, {
|
|
798
|
+
appearance: 'default',
|
|
799
|
+
intent: 'success',
|
|
800
|
+
isActive: true,
|
|
801
|
+
class: {
|
|
802
|
+
shortcut: ['text-on-success-soft', 'border-on-success-soft/20']
|
|
803
|
+
}
|
|
804
|
+
}, {
|
|
805
|
+
appearance: 'default',
|
|
806
|
+
intent: 'warning',
|
|
807
|
+
isActive: true,
|
|
808
|
+
class: {
|
|
809
|
+
shortcut: ['text-on-warning-soft', 'border-on-warning-soft/20']
|
|
810
|
+
}
|
|
811
|
+
}, {
|
|
812
|
+
appearance: 'default',
|
|
813
|
+
intent: 'danger',
|
|
814
|
+
isActive: true,
|
|
815
|
+
class: {
|
|
816
|
+
shortcut: ['text-on-danger-soft', 'border-on-danger-soft/20']
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
// appearance: outlined
|
|
820
|
+
{
|
|
821
|
+
appearance: 'outlined',
|
|
822
|
+
intent: 'default',
|
|
823
|
+
class: {
|
|
824
|
+
base: ['data-is-active:border-neutral', 'data-is-active:text-neutral-strong']
|
|
825
|
+
}
|
|
826
|
+
}, {
|
|
827
|
+
appearance: 'outlined',
|
|
828
|
+
intent: 'primary',
|
|
829
|
+
class: {
|
|
830
|
+
base: ['data-is-active:border-primary', 'data-is-active:text-primary-strong']
|
|
831
|
+
}
|
|
832
|
+
}, {
|
|
833
|
+
appearance: 'outlined',
|
|
834
|
+
intent: 'accent',
|
|
835
|
+
class: {
|
|
836
|
+
base: ['data-is-active:border-accent', 'data-is-active:text-accent-strong']
|
|
837
|
+
}
|
|
838
|
+
}, {
|
|
839
|
+
appearance: 'outlined',
|
|
840
|
+
intent: 'success',
|
|
841
|
+
class: {
|
|
842
|
+
base: ['data-is-active:border-success', 'data-is-active:text-success-strong']
|
|
843
|
+
}
|
|
844
|
+
}, {
|
|
845
|
+
appearance: 'outlined',
|
|
846
|
+
intent: 'warning',
|
|
847
|
+
class: {
|
|
848
|
+
base: ['data-is-active:border-warning', 'data-is-active:text-warning-strong']
|
|
849
|
+
}
|
|
850
|
+
}, {
|
|
851
|
+
appearance: 'outlined',
|
|
852
|
+
intent: 'danger',
|
|
853
|
+
class: {
|
|
854
|
+
base: ['data-is-active:border-danger', 'data-is-active:text-danger-strong']
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
// appearance: faded
|
|
858
|
+
{
|
|
859
|
+
appearance: 'faded',
|
|
860
|
+
intent: 'default',
|
|
861
|
+
class: {
|
|
862
|
+
base: ['data-is-active:bg-neutral-soft/20', 'data-is-active:border-neutral', 'data-is-active:text-neutral-strong']
|
|
863
|
+
}
|
|
864
|
+
}, {
|
|
865
|
+
appearance: 'faded',
|
|
866
|
+
intent: 'primary',
|
|
867
|
+
class: {
|
|
868
|
+
base: ['data-is-active:bg-primary-soft/20', 'data-is-active:border-primary', 'data-is-active:text-primary-strong']
|
|
869
|
+
}
|
|
870
|
+
}, {
|
|
871
|
+
appearance: 'faded',
|
|
872
|
+
intent: 'accent',
|
|
873
|
+
class: {
|
|
874
|
+
base: ['data-is-active:bg-accent-soft/20', 'data-is-active:border-accent', 'data-is-active:text-accent-strong']
|
|
875
|
+
}
|
|
876
|
+
}, {
|
|
877
|
+
appearance: 'faded',
|
|
878
|
+
intent: 'success',
|
|
879
|
+
class: {
|
|
880
|
+
base: ['data-is-active:bg-success-soft/20', 'data-is-active:border-success', 'data-is-active:text-success-strong']
|
|
881
|
+
}
|
|
882
|
+
}, {
|
|
883
|
+
appearance: 'faded',
|
|
884
|
+
intent: 'warning',
|
|
885
|
+
class: {
|
|
886
|
+
base: ['data-is-active:bg-warning-soft/20', 'data-is-active:border-warning', 'data-is-active:text-warning-strong']
|
|
887
|
+
}
|
|
888
|
+
}, {
|
|
889
|
+
appearance: 'faded',
|
|
890
|
+
intent: 'danger',
|
|
891
|
+
class: {
|
|
892
|
+
base: ['data-is-active:bg-danger-soft/20', 'data-is-active:border-danger', 'data-is-active:text-danger-strong']
|
|
893
|
+
}
|
|
894
|
+
}]
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
const dropdownContent = tv({
|
|
898
|
+
base: 'bg-surface-input w-[260px] rounded-sm border border-neutral-subtle'
|
|
899
|
+
});
|
|
900
|
+
|
|
901
|
+
const popover = tv({
|
|
902
|
+
base: 'bg-surface-input rounded-sm border border-neutral-subtle',
|
|
903
|
+
variants: {
|
|
904
|
+
size: {
|
|
905
|
+
sm: 'w-40',
|
|
906
|
+
md: 'w-64',
|
|
907
|
+
lg: 'w-96',
|
|
908
|
+
xl: 'w-136',
|
|
909
|
+
trigger: 'w-(--trigger-width)'
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
defaultVariants: {
|
|
913
|
+
size: 'md'
|
|
914
|
+
}
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
const divider = tv({
|
|
918
|
+
base: 'shrink-0 bg-neutral-subtle border-none',
|
|
919
|
+
variants: {
|
|
920
|
+
orientation: {
|
|
921
|
+
horizontal: 'w-full h-px',
|
|
922
|
+
vertical: 'h-full w-px'
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
defaultVariants: {
|
|
926
|
+
orientation: 'horizontal'
|
|
927
|
+
}
|
|
928
|
+
});
|
|
929
|
+
|
|
930
|
+
const spinner = tv({
|
|
931
|
+
base: 'text-neutral-muted animate-spin',
|
|
932
|
+
variants: {
|
|
933
|
+
size: {
|
|
934
|
+
xs: 'w-4 h-4',
|
|
935
|
+
sm: 'w-6 h-6,',
|
|
936
|
+
md: 'w-8 h-8,',
|
|
937
|
+
lg: 'w-10 h-10',
|
|
938
|
+
xl: 'w-12 h-12'
|
|
939
|
+
},
|
|
940
|
+
intent: {
|
|
941
|
+
default: 'fill-neutral-strong',
|
|
942
|
+
primary: 'fill-primary',
|
|
943
|
+
accent: 'fill-accent',
|
|
944
|
+
success: 'fill-success',
|
|
945
|
+
warning: 'fill-warning',
|
|
946
|
+
danger: 'fill-danger'
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
defaultVariants: {
|
|
950
|
+
size: 'md',
|
|
951
|
+
intent: 'default'
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
const table = tv({
|
|
956
|
+
slots: {
|
|
957
|
+
base: ['w-full', 'caption-bottom', 'font-body text-body-2xs'],
|
|
958
|
+
wrapper: ['relative', 'isolate', 'overflow-auto', 'rounded-default', 'bg-surface-card'],
|
|
959
|
+
table: ['w-full', 'table-auto'],
|
|
960
|
+
thead: ['relative', 'bg-surface-overlay-subtle'],
|
|
961
|
+
tbody: ['divide-y', 'divide-surface-overlay-subtle', '[&>tr]:data-[selectable=true]:data-[selected=false]:hover:bg-neutral-subtle', '[&>tr]:data-[selectable=true]:transition-colors'],
|
|
962
|
+
tfoot: ['relative'],
|
|
963
|
+
tr: ['data-[disabled=true]:opacity-50', 'data-[disabled=true]:cursor-not-allowed', 'data-[disabled=true]:hover:bg-transparent', 'data-[selectable=true]:focus-visible:ring-2', 'data-[selectable=true]:focus-visible:ring-inset', 'data-[selectable=true]:focus-visible:ring-default', 'data-[selectable=true]:focus-visible:z-10', 'transition-colors', 'duration-150', 'outline-hidden'],
|
|
964
|
+
separator: ['absolute', 'z-2', 'left-0', 'w-full', 'h-px', 'bg-surface-overlay-medium'],
|
|
965
|
+
th: ['h-12', 'px-4', 'text-left', 'align-middle', 'font-label', 'text-neutral-bolder', '[&:has([role=checkbox])]:pr-0', 'data-[sortable=true]:cursor-pointer'],
|
|
966
|
+
sortButton: ['group/sort', 'inline-flex', 'items-center', 'gap-1', 'w-full', 'text-left', 'font-label', 'text-neutral-bolder', 'outline-hidden', 'focus-visible:z-10', 'focus-visible:ring-3', 'focus-visible:ring-focus', 'focus-visible:ring-offset-2', 'focus-visible:ring-offset-background'],
|
|
967
|
+
sortIcon: ['size-4', 'flex-shrink-0', 'text-neutral-soft', 'transition-opacity', 'data-[sorted=false]:opacity-0', 'group-hover/sort:data-[sorted=false]:opacity-100', 'data-[sorted=true]:opacity-100'],
|
|
968
|
+
columnVisibilityButton: ['flex'],
|
|
969
|
+
columnVisibilityIcon: ['size-6'],
|
|
970
|
+
td: ['p-4', 'align-middle', 'text-neutral-strong', '[&:has([role=checkbox])]:pr-0'],
|
|
971
|
+
empty: ['text-neutral-soft', 'align-middle', 'text-center', 'py-12']
|
|
972
|
+
},
|
|
973
|
+
variants: {
|
|
974
|
+
size: {
|
|
975
|
+
sm: {
|
|
976
|
+
th: 'h-10 px-3 py-2 text-label-2xs',
|
|
977
|
+
td: 'px-3 py-2 text-body-micro'
|
|
978
|
+
},
|
|
979
|
+
md: {
|
|
980
|
+
th: 'h-12 px-4 text-label-xs',
|
|
981
|
+
td: 'p-4 text-body-2xs'
|
|
982
|
+
},
|
|
983
|
+
lg: {
|
|
984
|
+
th: 'h-14 px-6 text-label-sm',
|
|
985
|
+
td: 'p-6 text-body-xs'
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
isLoading: {
|
|
989
|
+
true: {
|
|
990
|
+
thead: ['after:absolute', 'after:top-full', 'after:left-0', 'after:w-1/2', 'after:animate-swing', 'after:h-px', 'after:z-10']
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
loadingColor: {
|
|
994
|
+
default: {},
|
|
995
|
+
primary: {},
|
|
996
|
+
success: {},
|
|
997
|
+
warning: {},
|
|
998
|
+
danger: {}
|
|
999
|
+
},
|
|
1000
|
+
selectionColor: {
|
|
1001
|
+
default: {},
|
|
1002
|
+
primary: {},
|
|
1003
|
+
success: {},
|
|
1004
|
+
warning: {},
|
|
1005
|
+
danger: {}
|
|
1006
|
+
},
|
|
1007
|
+
layout: {
|
|
1008
|
+
auto: {
|
|
1009
|
+
table: 'table-auto'
|
|
1010
|
+
},
|
|
1011
|
+
fixed: {
|
|
1012
|
+
table: 'table-fixed'
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
striped: {
|
|
1016
|
+
true: {
|
|
1017
|
+
tbody: '[&_tr:nth-child(odd)]:bg-surface-overlay-subtle'
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
isSticky: {
|
|
1021
|
+
true: {}
|
|
1022
|
+
},
|
|
1023
|
+
stickyPosition: {
|
|
1024
|
+
left: {},
|
|
1025
|
+
right: {},
|
|
1026
|
+
top: {},
|
|
1027
|
+
bottom: {}
|
|
1028
|
+
},
|
|
1029
|
+
isScrollable: {
|
|
1030
|
+
true: {
|
|
1031
|
+
wrapper: ['overflow-auto']
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
hasStickyHeader: {
|
|
1035
|
+
true: {}
|
|
1036
|
+
},
|
|
1037
|
+
isInStickyRow: {
|
|
1038
|
+
true: {}
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1041
|
+
compoundVariants: [
|
|
1042
|
+
// Sticky header - highest priority for intersections with columns
|
|
1043
|
+
{
|
|
1044
|
+
isSticky: true,
|
|
1045
|
+
stickyPosition: 'top',
|
|
1046
|
+
class: {
|
|
1047
|
+
thead: ['sticky', 'top-0', 'z-2', 'bg-surface-card']
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
// Sticky footer
|
|
1051
|
+
{
|
|
1052
|
+
isSticky: true,
|
|
1053
|
+
stickyPosition: 'bottom',
|
|
1054
|
+
class: {
|
|
1055
|
+
tfoot: ['sticky', 'bottom-0', 'z-2', 'bg-surface-card']
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
// Sticky columns - medium priority, header cells get higher z-index
|
|
1059
|
+
{
|
|
1060
|
+
isSticky: true,
|
|
1061
|
+
stickyPosition: 'left',
|
|
1062
|
+
class: {
|
|
1063
|
+
th: ['sticky', 'left-0', 'z-3', 'bg-surface-card', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
|
|
1064
|
+
td: ['sticky', 'left-0', 'z-1', 'bg-surface-card']
|
|
1065
|
+
}
|
|
1066
|
+
}, {
|
|
1067
|
+
isSticky: true,
|
|
1068
|
+
stickyPosition: 'right',
|
|
1069
|
+
class: {
|
|
1070
|
+
th: ['sticky', 'right-0', 'z-3', 'bg-surface-card', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
|
|
1071
|
+
td: ['sticky', 'right-0', 'z-1', 'bg-surface-card']
|
|
1072
|
+
}
|
|
1073
|
+
},
|
|
1074
|
+
// Sticky rows - base layer
|
|
1075
|
+
{
|
|
1076
|
+
isSticky: true,
|
|
1077
|
+
stickyPosition: 'top',
|
|
1078
|
+
class: {
|
|
1079
|
+
tr: ['sticky', 'top-0', 'z-1', 'bg-surface-card']
|
|
1080
|
+
}
|
|
1081
|
+
}, {
|
|
1082
|
+
isSticky: true,
|
|
1083
|
+
stickyPosition: 'bottom',
|
|
1084
|
+
class: {
|
|
1085
|
+
tr: ['sticky', 'bottom-0', 'z-1', 'bg-surface-card']
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
// Sticky rows with sticky header - position after header
|
|
1089
|
+
{
|
|
1090
|
+
isSticky: true,
|
|
1091
|
+
stickyPosition: 'top',
|
|
1092
|
+
hasStickyHeader: true,
|
|
1093
|
+
class: {
|
|
1094
|
+
tr: ['sticky', 'z-2', 'bg-surface-card', '[&.sticky]:[top:var(--table-header-height,48px)]']
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
// Intersection cells: sticky column + sticky row - highest z-index
|
|
1098
|
+
{
|
|
1099
|
+
isSticky: true,
|
|
1100
|
+
stickyPosition: 'left',
|
|
1101
|
+
isInStickyRow: true,
|
|
1102
|
+
class: {
|
|
1103
|
+
td: ['sticky', 'left-0', 'z-2', 'bg-surface-card']
|
|
1104
|
+
}
|
|
1105
|
+
}, {
|
|
1106
|
+
isSticky: true,
|
|
1107
|
+
stickyPosition: 'right',
|
|
1108
|
+
isInStickyRow: true,
|
|
1109
|
+
class: {
|
|
1110
|
+
td: ['sticky', 'right-0', 'z-2', 'bg-surface-card']
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
// Loading states with color variants
|
|
1114
|
+
{
|
|
1115
|
+
isLoading: true,
|
|
1116
|
+
loadingColor: 'default',
|
|
1117
|
+
class: {
|
|
1118
|
+
thead: `after:bg-neutral`
|
|
1119
|
+
}
|
|
1120
|
+
}, {
|
|
1121
|
+
isLoading: true,
|
|
1122
|
+
loadingColor: 'primary',
|
|
1123
|
+
class: {
|
|
1124
|
+
thead: `after:bg-primary`
|
|
1125
|
+
}
|
|
1126
|
+
}, {
|
|
1127
|
+
isLoading: true,
|
|
1128
|
+
loadingColor: 'success',
|
|
1129
|
+
class: {
|
|
1130
|
+
thead: `after:bg-success`
|
|
1131
|
+
}
|
|
1132
|
+
}, {
|
|
1133
|
+
isLoading: true,
|
|
1134
|
+
loadingColor: 'warning',
|
|
1135
|
+
class: {
|
|
1136
|
+
thead: `after:bg-warning`
|
|
1137
|
+
}
|
|
1138
|
+
}, {
|
|
1139
|
+
isLoading: true,
|
|
1140
|
+
loadingColor: 'danger',
|
|
1141
|
+
class: {
|
|
1142
|
+
thead: `after:bg-danger`
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
// Selection color variants
|
|
1146
|
+
{
|
|
1147
|
+
selectionColor: 'default',
|
|
1148
|
+
class: {
|
|
1149
|
+
tbody: '[&>tr]:data-[selected=true]:bg-neutral-subtle/50',
|
|
1150
|
+
tr: ['data-[selectable=true]:focus-visible:ring-default']
|
|
1151
|
+
}
|
|
1152
|
+
}, {
|
|
1153
|
+
selectionColor: 'primary',
|
|
1154
|
+
class: {
|
|
1155
|
+
tbody: '[&>tr]:data-[selected=true]:bg-primary-subtle',
|
|
1156
|
+
tr: ['data-[selectable=true]:focus-visible:ring-primary-soft']
|
|
1157
|
+
}
|
|
1158
|
+
}, {
|
|
1159
|
+
selectionColor: 'success',
|
|
1160
|
+
class: {
|
|
1161
|
+
tbody: '[&>tr]:data-[selected=true]:bg-success-subtle',
|
|
1162
|
+
tr: ['data-[selectable=true]:focus-visible:ring-success']
|
|
1163
|
+
}
|
|
1164
|
+
}, {
|
|
1165
|
+
selectionColor: 'warning',
|
|
1166
|
+
class: {
|
|
1167
|
+
tbody: '[&>tr]:data-[selected=true]:bg-warning-subtle',
|
|
1168
|
+
tr: ['data-[selectable=true]:focus-visible:ring-warning']
|
|
1169
|
+
}
|
|
1170
|
+
}, {
|
|
1171
|
+
selectionColor: 'danger',
|
|
1172
|
+
class: {
|
|
1173
|
+
tbody: '[&>tr]:data-[selected=true]:bg-danger-subtle',
|
|
1174
|
+
tr: ['data-[selectable=true]:focus-visible:ring-danger']
|
|
1175
|
+
}
|
|
1176
|
+
}],
|
|
1177
|
+
defaultVariants: {
|
|
1178
|
+
size: 'md',
|
|
1179
|
+
layout: 'auto',
|
|
1180
|
+
loadingColor: 'default',
|
|
1181
|
+
selectionColor: 'primary'
|
|
1182
|
+
}
|
|
1183
|
+
});
|
|
1184
|
+
|
|
1185
|
+
const notificationsContainer = tv({
|
|
1186
|
+
base: ['w-full', 'max-h-full', 'overflow-hidden', 'px-4', 'fixed', 'max-w-lg', 'z-1000'],
|
|
1187
|
+
variants: {
|
|
1188
|
+
placement: {
|
|
1189
|
+
'top-left': 'top-0 left-0',
|
|
1190
|
+
'top-center': 'top-0 left-2/4 translate-x-[-50%]',
|
|
1191
|
+
'top-right': 'top-0 right-0',
|
|
1192
|
+
'bottom-left': 'bottom-0 left-0',
|
|
1193
|
+
'bottom-center': 'bottom-0 left-2/4 translate-x-[-50%]',
|
|
1194
|
+
'bottom-right': 'bottom-0 right-0 '
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
defaultVariants: {
|
|
1198
|
+
placement: 'bottom-right'
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
|
|
1202
|
+
const btn = ['transition transition-200', ...focusVisibleRing];
|
|
1203
|
+
const notificationCard = tv({
|
|
1204
|
+
slots: {
|
|
1205
|
+
base: 'py-3 px-4 overflow-hidden flex items-center justify-between relative min-h-16 font-body text-body-2xs rounded-sm shadow-sm transition-all transition-200 ease-in-out',
|
|
1206
|
+
message: 'grow',
|
|
1207
|
+
customActions: 'flex flex-nowrap',
|
|
1208
|
+
customActionButton: [...btn, 'first:ml-4 last:-mr-2 font-label text-label-xs py-1 px-2 rounded-sm hover:bg-surface-overlay-soft'],
|
|
1209
|
+
closeButton: [...btn, 'inline-block p-2 ml-2 -mr-2 rounded-full hover:bg-surface-overlay-soft']
|
|
1210
|
+
},
|
|
1211
|
+
variants: {
|
|
1212
|
+
appearance: {
|
|
1213
|
+
info: {
|
|
1214
|
+
base: 'bg-neutral-firm text-on-neutral-firm'
|
|
1215
|
+
},
|
|
1216
|
+
success: {
|
|
1217
|
+
base: 'bg-success-soft text-on-success-soft'
|
|
1218
|
+
},
|
|
1219
|
+
warning: {
|
|
1220
|
+
base: 'bg-warning-soft text-on-warning-soft'
|
|
1221
|
+
},
|
|
1222
|
+
error: {
|
|
1223
|
+
base: 'bg-danger-soft text-on-danger-soft'
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1227
|
+
defaultVariants: {
|
|
1228
|
+
appearance: 'info'
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1231
|
+
const zoomOut = {
|
|
1232
|
+
leaveTo: {
|
|
1233
|
+
transform: 'scale(0.80)',
|
|
1234
|
+
opacity: '0'
|
|
1235
|
+
},
|
|
1236
|
+
leave: {
|
|
1237
|
+
transform: 'translate3d(0,0,0)'
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1240
|
+
const notificationEnteringFrom = {
|
|
1241
|
+
right: {
|
|
1242
|
+
transform: 'translate3d(125%, 0, 0)'
|
|
1243
|
+
},
|
|
1244
|
+
left: {
|
|
1245
|
+
transform: 'translate3d(-125%, 0, 0)'
|
|
1246
|
+
},
|
|
1247
|
+
top: {
|
|
1248
|
+
transform: 'translate3d(0, -125%, 0)'
|
|
1249
|
+
},
|
|
1250
|
+
bottom: {
|
|
1251
|
+
transform: 'translate3d(0, 125%, 0)'
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
const notificationTransitions = {
|
|
1255
|
+
slideFromTopLeft: {
|
|
1256
|
+
...zoomOut,
|
|
1257
|
+
enter: {
|
|
1258
|
+
...notificationEnteringFrom.left
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
slideFromTopCenter: {
|
|
1262
|
+
...zoomOut,
|
|
1263
|
+
enter: notificationEnteringFrom.top
|
|
1264
|
+
},
|
|
1265
|
+
slideFromTopRight: {
|
|
1266
|
+
...zoomOut,
|
|
1267
|
+
enter: notificationEnteringFrom.right
|
|
1268
|
+
},
|
|
1269
|
+
slideFromBottomLeft: {
|
|
1270
|
+
...zoomOut,
|
|
1271
|
+
enter: notificationEnteringFrom.left
|
|
1272
|
+
},
|
|
1273
|
+
slideFromBottomCenter: {
|
|
1274
|
+
...zoomOut,
|
|
1275
|
+
enter: notificationEnteringFrom.bottom
|
|
1276
|
+
},
|
|
1277
|
+
slideFromBottomRight: {
|
|
1278
|
+
...zoomOut,
|
|
1279
|
+
enter: notificationEnteringFrom.right
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
const obscurer = `before:bg-linear-to-b before:to-surface-modal before:from-surface-modal/75 before:absolute before:left-0 before:w-full before:h-4 before:-top-4 before:content-['_']`;
|
|
1284
|
+
const overlay = tv({
|
|
1285
|
+
base: 'will-change-transform overflow-auto',
|
|
1286
|
+
variants: {
|
|
1287
|
+
enableFlexContent: {
|
|
1288
|
+
true: 'flex items-center fixed inset-0 flex-col'
|
|
1289
|
+
},
|
|
1290
|
+
inPlace: {
|
|
1291
|
+
true: 'absolute'
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
});
|
|
1295
|
+
const backdrop = tv({
|
|
1296
|
+
base: 'fixed inset-0 select-none',
|
|
1297
|
+
variants: {
|
|
1298
|
+
type: {
|
|
1299
|
+
none: '',
|
|
1300
|
+
transparent: '',
|
|
1301
|
+
blur: 'bg-surface-overlay-scrim backdrop-blur-sm',
|
|
1302
|
+
faded: 'bg-surface-overlay-scrim'
|
|
1303
|
+
},
|
|
1304
|
+
inPlace: {
|
|
1305
|
+
true: 'absolute'
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
const modal = tv({
|
|
1310
|
+
slots: {
|
|
1311
|
+
base: 'flex flex-col shrink-0 relative text-on-surface-modal bg-surface-modal border border-surface-overlay-medium rounded-2xl my-24 w-full outline-hidden overflow-clip',
|
|
1312
|
+
closeButton: 'absolute top-3 right-3',
|
|
1313
|
+
header: 'font-header text-header-lg px-6 pt-8 pb-2',
|
|
1314
|
+
body: 'px-6 py-2 grow overflow-y-auto',
|
|
1315
|
+
footer: 'flex justify-end items-center px-6 pt-6 pb-8 gap-4'
|
|
1316
|
+
},
|
|
1317
|
+
variants: {
|
|
1318
|
+
size: {
|
|
1319
|
+
xs: 'modal--xs',
|
|
1320
|
+
sm: 'modal--sm',
|
|
1321
|
+
md: 'modal--md',
|
|
1322
|
+
lg: 'modal--lg',
|
|
1323
|
+
xl: 'modal--xl',
|
|
1324
|
+
full: 'modal--full'
|
|
1325
|
+
},
|
|
1326
|
+
isCentered: {
|
|
1327
|
+
true: 'my-auto'
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
});
|
|
1331
|
+
const drawer = tv({
|
|
1332
|
+
slots: {
|
|
1333
|
+
base: 'flex flex-col absolute text-on-surface-modal bg-surface-modal border border-surface-overlay-medium rounded-2xl w-full h-full outline-hidden overflow-clip',
|
|
1334
|
+
closeButton: 'absolute top-3 right-3',
|
|
1335
|
+
header: 'font-header text-header-lg text-center px-8 pt-10 pb-2',
|
|
1336
|
+
body: 'px-8 py-4 grow overflow-y-auto',
|
|
1337
|
+
footer: `${obscurer} flex justify-end items-center relative border-t border-surface-overlay-medium bg-surface-modal p-8 gap-4`
|
|
1338
|
+
},
|
|
1339
|
+
variants: {
|
|
1340
|
+
size: {
|
|
1341
|
+
xs: '',
|
|
1342
|
+
sm: '',
|
|
1343
|
+
md: '',
|
|
1344
|
+
lg: '',
|
|
1345
|
+
xl: '',
|
|
1346
|
+
full: ''
|
|
1347
|
+
},
|
|
1348
|
+
placement: {
|
|
1349
|
+
top: 'top-0 right-0 left-0',
|
|
1350
|
+
bottom: 'bottom-0 right-0 left-0',
|
|
1351
|
+
left: 'top-0 bottom-0 left-0',
|
|
1352
|
+
right: 'top-0 bottom-0 right-0'
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
compoundVariants: [
|
|
1356
|
+
// vertical
|
|
1357
|
+
{
|
|
1358
|
+
placement: ['top', 'bottom'],
|
|
1359
|
+
size: 'xs',
|
|
1360
|
+
class: 'drawer--vertical-xs'
|
|
1361
|
+
}, {
|
|
1362
|
+
placement: ['top', 'bottom'],
|
|
1363
|
+
size: 'sm',
|
|
1364
|
+
class: 'drawer--vertical-sm'
|
|
1365
|
+
}, {
|
|
1366
|
+
placement: ['top', 'bottom'],
|
|
1367
|
+
size: 'md',
|
|
1368
|
+
class: 'drawer--vertical-md'
|
|
1369
|
+
}, {
|
|
1370
|
+
placement: ['top', 'bottom'],
|
|
1371
|
+
size: 'lg',
|
|
1372
|
+
class: 'drawer--vertical-lg'
|
|
1373
|
+
}, {
|
|
1374
|
+
placement: ['top', 'bottom'],
|
|
1375
|
+
size: 'xl',
|
|
1376
|
+
class: 'drawer--vertical-xl'
|
|
1377
|
+
}, {
|
|
1378
|
+
placement: ['top', 'bottom'],
|
|
1379
|
+
size: 'full',
|
|
1380
|
+
class: 'drawer--vertical-full'
|
|
1381
|
+
},
|
|
1382
|
+
// horizontal
|
|
1383
|
+
{
|
|
1384
|
+
placement: ['right', 'left'],
|
|
1385
|
+
size: 'xs',
|
|
1386
|
+
class: 'drawer--horizontal-xs'
|
|
1387
|
+
}, {
|
|
1388
|
+
placement: ['right', 'left'],
|
|
1389
|
+
size: 'sm',
|
|
1390
|
+
class: 'drawer--horizontal-sm'
|
|
1391
|
+
}, {
|
|
1392
|
+
placement: ['right', 'left'],
|
|
1393
|
+
size: 'md',
|
|
1394
|
+
class: 'drawer--horizontal-md'
|
|
1395
|
+
}, {
|
|
1396
|
+
placement: ['right', 'left'],
|
|
1397
|
+
size: 'lg',
|
|
1398
|
+
class: 'drawer--horizontal-lg'
|
|
1399
|
+
}, {
|
|
1400
|
+
placement: ['right', 'left'],
|
|
1401
|
+
size: 'xl',
|
|
1402
|
+
class: 'drawer--horizontal-xl'
|
|
1403
|
+
}, {
|
|
1404
|
+
placement: ['right', 'left'],
|
|
1405
|
+
size: 'full',
|
|
1406
|
+
class: 'drawer--horizontal-full'
|
|
1407
|
+
}]
|
|
1408
|
+
});
|
|
1409
|
+
const slideTransition = {
|
|
1410
|
+
enterActive: {
|
|
1411
|
+
transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)'
|
|
1412
|
+
},
|
|
1413
|
+
leaveActive: {
|
|
1414
|
+
transition: 'transform 0.2s cubic-bezier(0.37, 0, 0.63, 1)'
|
|
1415
|
+
}
|
|
1416
|
+
};
|
|
1417
|
+
const overlayTransitions = {
|
|
1418
|
+
fade: {
|
|
1419
|
+
enter: {
|
|
1420
|
+
opacity: '0'
|
|
1421
|
+
},
|
|
1422
|
+
enterActive: {
|
|
1423
|
+
transition: 'opacity 0.2s linear'
|
|
1424
|
+
},
|
|
1425
|
+
leave: {
|
|
1426
|
+
opacity: '1'
|
|
1427
|
+
},
|
|
1428
|
+
leaveActive: {
|
|
1429
|
+
transition: 'opacity 0.2s linear'
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
zoom: {
|
|
1433
|
+
enter: {
|
|
1434
|
+
opacity: '0',
|
|
1435
|
+
transform: 'scale(0.8)'
|
|
1436
|
+
},
|
|
1437
|
+
enterActive: {
|
|
1438
|
+
transition: 'all 0.2s ease-in-out'
|
|
1439
|
+
},
|
|
1440
|
+
leave: {
|
|
1441
|
+
opacity: '1',
|
|
1442
|
+
transform: 'scale(1)'
|
|
1443
|
+
},
|
|
1444
|
+
leaveActive: {
|
|
1445
|
+
transition: 'all 0.2s ease-in-out'
|
|
1446
|
+
}
|
|
1447
|
+
},
|
|
1448
|
+
slideFromLeft: {
|
|
1449
|
+
enter: {
|
|
1450
|
+
transform: 'translateX(-100%)'
|
|
1451
|
+
},
|
|
1452
|
+
leave: {
|
|
1453
|
+
transform: 'translateX(0%)'
|
|
1454
|
+
},
|
|
1455
|
+
...slideTransition
|
|
1456
|
+
},
|
|
1457
|
+
slideFromRight: {
|
|
1458
|
+
enter: {
|
|
1459
|
+
transform: 'translateX(100%)'
|
|
1460
|
+
},
|
|
1461
|
+
leave: {
|
|
1462
|
+
transform: 'translateX(0%)'
|
|
1463
|
+
},
|
|
1464
|
+
...slideTransition
|
|
1465
|
+
},
|
|
1466
|
+
slideFromTop: {
|
|
1467
|
+
enter: {
|
|
1468
|
+
transform: 'translateY(-100%)'
|
|
1469
|
+
},
|
|
1470
|
+
leave: {
|
|
1471
|
+
transform: 'translateY(0%)'
|
|
1472
|
+
},
|
|
1473
|
+
...slideTransition
|
|
1474
|
+
},
|
|
1475
|
+
slideFromBottom: {
|
|
1476
|
+
enter: {
|
|
1477
|
+
transform: 'translateY(100%)'
|
|
1478
|
+
},
|
|
1479
|
+
leave: {
|
|
1480
|
+
transform: 'translateY(0%)'
|
|
1481
|
+
},
|
|
1482
|
+
...slideTransition
|
|
1483
|
+
},
|
|
1484
|
+
scale: {
|
|
1485
|
+
enter: {
|
|
1486
|
+
opacity: '0',
|
|
1487
|
+
transform: 'scale(0.95)'
|
|
1488
|
+
},
|
|
1489
|
+
enterActive: {
|
|
1490
|
+
transitionProperty: 'transform, opacity',
|
|
1491
|
+
transitionDuration: '200ms',
|
|
1492
|
+
transitionTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)'
|
|
1493
|
+
},
|
|
1494
|
+
enterTo: {
|
|
1495
|
+
opacity: '1',
|
|
1496
|
+
transform: 'translate(scaleX(1) scaleY(1))'
|
|
1497
|
+
},
|
|
1498
|
+
leave: {
|
|
1499
|
+
opacity: '1',
|
|
1500
|
+
transform: 'translate(scaleX(1) scaleY(1))'
|
|
1501
|
+
},
|
|
1502
|
+
leaveActive: {
|
|
1503
|
+
transitionProperty: 'transform, opacity',
|
|
1504
|
+
transitionDuration: '100ms',
|
|
1505
|
+
transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)'
|
|
1506
|
+
},
|
|
1507
|
+
leaveTo: {
|
|
1508
|
+
opacity: '0',
|
|
1509
|
+
transform: 'scale(0.95)'
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
const label = tv({
|
|
1515
|
+
slots: {
|
|
1516
|
+
// label text role (Open Sans semibold, tight leading)
|
|
1517
|
+
base: 'text-neutral-bolder inline-block font-label text-label-sm pb-2',
|
|
1518
|
+
asterisk: 'text-danger'
|
|
1519
|
+
},
|
|
1520
|
+
variants: {
|
|
1521
|
+
size: {
|
|
1522
|
+
sm: {
|
|
1523
|
+
base: 'text-label-2xs'
|
|
1524
|
+
},
|
|
1525
|
+
md: {},
|
|
1526
|
+
lg: {
|
|
1527
|
+
base: 'text-label-md'
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1531
|
+
defaultVariants: {
|
|
1532
|
+
size: 'md'
|
|
1533
|
+
}
|
|
1534
|
+
});
|
|
1535
|
+
const formDescription = tv({
|
|
1536
|
+
// help/description text — body role
|
|
1537
|
+
base: 'text-neutral font-body text-body-micro pb-1 last:pb-0',
|
|
1538
|
+
variants: {
|
|
1539
|
+
size: {
|
|
1540
|
+
sm: 'text-body-micro',
|
|
1541
|
+
md: '',
|
|
1542
|
+
lg: 'text-body-sm'
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1545
|
+
defaultVariants: {
|
|
1546
|
+
size: 'md'
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
const formFeedback = tv({
|
|
1550
|
+
// validation/feedback text — body role
|
|
1551
|
+
base: 'font-body text-body-micro pt-1',
|
|
1552
|
+
variants: {
|
|
1553
|
+
intent: {
|
|
1554
|
+
primary: 'text-primary',
|
|
1555
|
+
accent: 'text-accent',
|
|
1556
|
+
success: 'text-success',
|
|
1557
|
+
danger: 'text-danger',
|
|
1558
|
+
warning: 'text-warning'
|
|
1559
|
+
},
|
|
1560
|
+
size: {
|
|
1561
|
+
sm: 'text-body-micro',
|
|
1562
|
+
md: '',
|
|
1563
|
+
lg: 'text-body-sm'
|
|
1564
|
+
}
|
|
1565
|
+
},
|
|
1566
|
+
defaultVariants: {
|
|
1567
|
+
size: 'sm'
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1570
|
+
const input = tv({
|
|
1571
|
+
slots: {
|
|
1572
|
+
base: '',
|
|
1573
|
+
innerContainer: 'relative flex',
|
|
1574
|
+
startContent: 'absolute inset-y-0 left-0 flex items-center',
|
|
1575
|
+
endContent: 'absolute inset-y-0 right-0 flex items-center',
|
|
1576
|
+
input: ['appearance-none', 'flex-1', 'w-full', 'bg-surface-input', 'text-neutral-strong', 'placeholder-neutral',
|
|
1577
|
+
// body role family; single-line controls keep tight leading (not the body relaxed leading)
|
|
1578
|
+
'font-body text-base text-left', 'border', 'border-neutral-soft', 'rounded-xl', 'leading-tight', 'focus:ring-3', 'focus:ring-focus', 'focus:outline-hidden', 'focus:border-primary-soft', 'selection:bg-surface-overlay-soft', 'disabled:border-neutral-subtle disabled:text-neutral-soft', 'aria-invalid:border-danger-soft', 'aria-invalid:focus:ring-danger-soft']
|
|
1579
|
+
},
|
|
1580
|
+
variants: {
|
|
1581
|
+
size: {
|
|
1582
|
+
sm: {
|
|
1583
|
+
input: 'p-2',
|
|
1584
|
+
startContent: 'pl-2',
|
|
1585
|
+
endContent: 'pr-2'
|
|
1586
|
+
},
|
|
1587
|
+
md: {
|
|
1588
|
+
input: 'p-3',
|
|
1589
|
+
startContent: 'pl-3',
|
|
1590
|
+
endContent: 'pr-3'
|
|
1591
|
+
},
|
|
1592
|
+
lg: {
|
|
1593
|
+
input: 'p-4',
|
|
1594
|
+
startContent: 'pl-4',
|
|
1595
|
+
endContent: 'pr-4'
|
|
1596
|
+
}
|
|
1597
|
+
},
|
|
1598
|
+
hasStartContent: {
|
|
1599
|
+
true: {
|
|
1600
|
+
input: 'ps-8'
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1603
|
+
hasEndContent: {
|
|
1604
|
+
true: {
|
|
1605
|
+
input: 'pe-10'
|
|
1606
|
+
}
|
|
1607
|
+
},
|
|
1608
|
+
startContentPointerEvents: {
|
|
1609
|
+
auto: {
|
|
1610
|
+
startContent: 'pointer-events-auto'
|
|
1611
|
+
},
|
|
1612
|
+
none: {
|
|
1613
|
+
startContent: 'pointer-events-none'
|
|
1614
|
+
}
|
|
1615
|
+
},
|
|
1616
|
+
endContentPointerEvents: {
|
|
1617
|
+
auto: {
|
|
1618
|
+
endContent: 'pointer-events-auto'
|
|
1619
|
+
},
|
|
1620
|
+
none: {
|
|
1621
|
+
endContent: 'pointer-events-none'
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
},
|
|
1625
|
+
defaultVariants: {
|
|
1626
|
+
size: 'md'
|
|
1627
|
+
}
|
|
1628
|
+
});
|
|
1629
|
+
const textarea = tv({
|
|
1630
|
+
extend: input,
|
|
1631
|
+
slots: {
|
|
1632
|
+
input: 'min-h-24'
|
|
1633
|
+
},
|
|
1634
|
+
variants: {
|
|
1635
|
+
size: {
|
|
1636
|
+
sm: {},
|
|
1637
|
+
md: {},
|
|
1638
|
+
lg: {}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
});
|
|
1642
|
+
const checkboxRadioBase = tv({
|
|
1643
|
+
slots: {
|
|
1644
|
+
base: ['max-w-fit flex items-center justify-start'],
|
|
1645
|
+
input: ['appearance-none', 'inline-block', 'align-middle', 'select-none', 'shrink-0', 'text-base', 'border-2 border-neutral', 'bg-surface-input', 'transition-colors', 'checked:bg-origin-border checked:bg-center checked:bg-no-repeat', 'checked:disabled:bg-neutral-soft checked:disabled:border-neutral-soft', ...focusVisibleRing],
|
|
1646
|
+
labelContainer: ['flex flex-col ml-2'],
|
|
1647
|
+
label: 'font-body text-body-xs pb-0'
|
|
1648
|
+
},
|
|
1649
|
+
variants: {
|
|
1650
|
+
size: {
|
|
1651
|
+
sm: {
|
|
1652
|
+
input: 'h-4 w-4'
|
|
1653
|
+
},
|
|
1654
|
+
md: {
|
|
1655
|
+
input: 'h-5 w-5'
|
|
1656
|
+
},
|
|
1657
|
+
lg: {
|
|
1658
|
+
input: 'h-6 w-6'
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
},
|
|
1662
|
+
defaultVariants: {
|
|
1663
|
+
size: 'md'
|
|
1664
|
+
}
|
|
1665
|
+
});
|
|
1666
|
+
const checkboxRadioGroupBase = tv({
|
|
1667
|
+
slots: {
|
|
1668
|
+
base: '',
|
|
1669
|
+
optionsContainer: ['flex flex-col flex-wrap gap-4 data-[orientation=horizontal]:flex-row'],
|
|
1670
|
+
label: 'pb-2'
|
|
1671
|
+
},
|
|
1672
|
+
variants: {
|
|
1673
|
+
size: {
|
|
1674
|
+
sm: '',
|
|
1675
|
+
md: '',
|
|
1676
|
+
lg: ''
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
});
|
|
1680
|
+
const checkbox = tv({
|
|
1681
|
+
extend: checkboxRadioBase,
|
|
1682
|
+
slots: {
|
|
1683
|
+
input: ['checked-bg-checkbox', 'indeterminate-bg-checkbox', 'rounded-sm', 'checked:bg-primary checked:border-primary',
|
|
1684
|
+
// Indeterminate state styles - show minus/dash icon
|
|
1685
|
+
'indeterminate:bg-primary', 'indeterminate:border-primary', 'indeterminate:bg-origin-border', 'indeterminate:bg-center', 'indeterminate:bg-no-repeat']
|
|
1686
|
+
},
|
|
1687
|
+
variants: {
|
|
1688
|
+
size: {
|
|
1689
|
+
sm: {},
|
|
1690
|
+
md: {},
|
|
1691
|
+
lg: {}
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
defaultVariants: {
|
|
1695
|
+
size: 'md'
|
|
1696
|
+
}
|
|
1697
|
+
});
|
|
1698
|
+
const radio = tv({
|
|
1699
|
+
extend: checkboxRadioBase,
|
|
1700
|
+
slots: {
|
|
1701
|
+
input: ['checked-bg-radio', 'rounded-full', 'checked:bg-primary checked:border-primary']
|
|
1702
|
+
},
|
|
1703
|
+
variants: {
|
|
1704
|
+
size: {
|
|
1705
|
+
sm: {},
|
|
1706
|
+
md: {},
|
|
1707
|
+
lg: {}
|
|
1708
|
+
}
|
|
1709
|
+
},
|
|
1710
|
+
defaultVariants: {
|
|
1711
|
+
size: 'md'
|
|
1712
|
+
}
|
|
1713
|
+
});
|
|
1714
|
+
const radioGroup = tv({
|
|
1715
|
+
extend: checkboxRadioGroupBase
|
|
1716
|
+
});
|
|
1717
|
+
const checkboxGroup = tv({
|
|
1718
|
+
extend: checkboxRadioGroupBase
|
|
1719
|
+
});
|
|
1720
|
+
const select = tv({
|
|
1721
|
+
extend: input,
|
|
1722
|
+
slots: {
|
|
1723
|
+
base: [],
|
|
1724
|
+
placeholder: 'text-neutral',
|
|
1725
|
+
listbox: 'scroll-py-6 max-h-64',
|
|
1726
|
+
icon: 'w-5 h-5',
|
|
1727
|
+
clearButton: 'pointer-events-auto',
|
|
1728
|
+
input: '[button]:cursor-default',
|
|
1729
|
+
emptyContent: 'p-2'
|
|
1730
|
+
},
|
|
1731
|
+
variants: {
|
|
1732
|
+
size: {
|
|
1733
|
+
sm: {},
|
|
1734
|
+
md: {},
|
|
1735
|
+
lg: {}
|
|
1736
|
+
}
|
|
1737
|
+
},
|
|
1738
|
+
defaultVariants: {
|
|
1739
|
+
size: 'md'
|
|
1740
|
+
}
|
|
1741
|
+
});
|
|
1742
|
+
const nativeSelect = tv({
|
|
1743
|
+
extend: input,
|
|
1744
|
+
slots: {
|
|
1745
|
+
input: ['appearance-none'],
|
|
1746
|
+
icon: 'w-5 h-5'
|
|
1747
|
+
},
|
|
1748
|
+
variants: {
|
|
1749
|
+
size: {
|
|
1750
|
+
sm: {},
|
|
1751
|
+
md: {},
|
|
1752
|
+
lg: {}
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
});
|
|
1756
|
+
const switchInput = tv({
|
|
1757
|
+
slots: {
|
|
1758
|
+
base: 'group relative max-w-fit inline-flex items-center justify-start',
|
|
1759
|
+
labelContainer: 'flex flex-col ml-2',
|
|
1760
|
+
label: 'font-body text-body-xs pb-0',
|
|
1761
|
+
wrapper: ['px-1', 'relative', 'inline-flex', 'items-center', 'justify-start', 'shrink-0', 'overflow-hidden', 'bg-neutral-soft', 'rounded-full', 'cursor-pointer touch-none tap-highlight-transparent select-none', 'transition-background', ...focusVisibleWithinRing],
|
|
1762
|
+
hiddenInput: ['font-inherit', 'text-[100%]', 'leading-[1.15]', 'm-0', 'p-0', 'overflow-visible', 'box-border', 'absolute', 'top-0', 'w-full', 'h-full', 'opacity-[0.0001]', 'z-1', 'cursor-pointer', 'disabled:cursor-default'],
|
|
1763
|
+
thumb: ['z-10', 'flex', 'items-center', 'justify-center', 'bg-white', 'shadow-small', 'rounded-full', 'origin-right', 'transition-all', 'pointer-events-none', 'text-black'],
|
|
1764
|
+
startContent: ['z-0 absolute start-1.5 text-current', 'opacity-0', 'scale-50', 'transition-transform-opacity', 'group-data-[selected=true]:scale-100', 'group-data-[selected=true]:opacity-100'],
|
|
1765
|
+
endContent: ['z-0 absolute end-1.5 text-neutral', 'opacity-100', 'transition-transform-opacity', 'group-data-[selected=true]:translate-x-3', 'group-data-[selected=true]:opacity-0']
|
|
1766
|
+
},
|
|
1767
|
+
variants: {
|
|
1768
|
+
isDisabled: {
|
|
1769
|
+
true: {
|
|
1770
|
+
wrapper: 'opacity-disabled pointer-events-none'
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
size: {
|
|
1774
|
+
sm: {
|
|
1775
|
+
wrapper: 'w-6 h-3 px-[2px]',
|
|
1776
|
+
thumb: ['w-2 h-2 text-xs', 'group-data-[selected=true]:ms-3'],
|
|
1777
|
+
endContent: 'text-xs',
|
|
1778
|
+
startContent: 'text-xs',
|
|
1779
|
+
label: 'text-small'
|
|
1780
|
+
},
|
|
1781
|
+
md: {
|
|
1782
|
+
wrapper: 'w-11 h-6',
|
|
1783
|
+
thumb: ['w-4 h-4 text-sm', 'group-data-[selected=true]:ms-5'],
|
|
1784
|
+
endContent: 'text-sm',
|
|
1785
|
+
startContent: 'text-sm',
|
|
1786
|
+
label: 'text-md'
|
|
1787
|
+
},
|
|
1788
|
+
lg: {
|
|
1789
|
+
wrapper: 'w-12 h-7',
|
|
1790
|
+
thumb: ['w-5 h-5 text-medium', 'group-data-[selected=true]:ms-5'],
|
|
1791
|
+
endContent: 'text-md',
|
|
1792
|
+
startContent: 'text-md',
|
|
1793
|
+
label: 'text-lg'
|
|
1794
|
+
}
|
|
1795
|
+
},
|
|
1796
|
+
intent: {
|
|
1797
|
+
default: {
|
|
1798
|
+
wrapper: ['group-data-[selected=true]:bg-neutral-firm', 'group-data-[selected=true]:text-on-neutral-firm']
|
|
1799
|
+
},
|
|
1800
|
+
primary: {
|
|
1801
|
+
wrapper: ['group-data-[selected=true]:bg-primary', 'group-data-[selected=true]:text-on-primary']
|
|
1802
|
+
},
|
|
1803
|
+
accent: {
|
|
1804
|
+
wrapper: ['group-data-[selected=true]:bg-accent', 'group-data-[selected=true]:text-on-accent']
|
|
1805
|
+
},
|
|
1806
|
+
success: {
|
|
1807
|
+
wrapper: ['group-data-[selected=true]:bg-success', 'group-data-[selected=true]:text-on-success']
|
|
1808
|
+
},
|
|
1809
|
+
warning: {
|
|
1810
|
+
wrapper: ['group-data-[selected=true]:bg-warning', 'group-data-[selected=true]:text-on-warning']
|
|
1811
|
+
},
|
|
1812
|
+
danger: {
|
|
1813
|
+
wrapper: ['group-data-[selected=true]:bg-danger', 'group-data-[selected=true]:text-on-danger']
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
defaultVariants: {
|
|
1818
|
+
size: 'md',
|
|
1819
|
+
intent: 'primary',
|
|
1820
|
+
isDisabled: false
|
|
1821
|
+
}
|
|
1822
|
+
});
|
|
1823
|
+
|
|
1824
|
+
const base = tv({
|
|
1825
|
+
slots: {
|
|
1826
|
+
base: 'flex flex-wrap flex-row items-center',
|
|
1827
|
+
labelContainer: 'leading-tight flex items-start',
|
|
1828
|
+
inputContainer: 'flex items-center',
|
|
1829
|
+
label: 'font-body text-body-xs pl-2 pb-0',
|
|
1830
|
+
hint: 'pl-2 flex basis-full before:content-["_"] before:inline-block before:w-[1em] before:h-[1em] shrink-0'
|
|
1831
|
+
},
|
|
1832
|
+
variants: {
|
|
1833
|
+
size: {
|
|
1834
|
+
sm: {
|
|
1835
|
+
label: 'text-body-2xs'
|
|
1836
|
+
},
|
|
1837
|
+
md: '',
|
|
1838
|
+
lg: ''
|
|
1839
|
+
}
|
|
1840
|
+
},
|
|
1841
|
+
defaultVariants: {
|
|
1842
|
+
size: 'md'
|
|
1843
|
+
}
|
|
1844
|
+
});
|
|
1845
|
+
const formCheckbox = tv({
|
|
1846
|
+
extend: base,
|
|
1847
|
+
slots: {
|
|
1848
|
+
checkbox: ''
|
|
1849
|
+
}
|
|
1850
|
+
});
|
|
1851
|
+
const formRadio = tv({
|
|
1852
|
+
extend: base,
|
|
1853
|
+
slots: {
|
|
1854
|
+
radio: ''
|
|
1855
|
+
}
|
|
1856
|
+
});
|
|
1857
|
+
const baseGroup = tv({
|
|
1858
|
+
slots: {
|
|
1859
|
+
base: '',
|
|
1860
|
+
label: 'pb-1 last:pb-0',
|
|
1861
|
+
hint: 'pb-1 last:pb-0',
|
|
1862
|
+
feedback: 'pt-0 flex-[1_100%]'
|
|
1863
|
+
},
|
|
1864
|
+
variants: {
|
|
1865
|
+
isInline: {
|
|
1866
|
+
true: {
|
|
1867
|
+
base: 'flex flex-wrap flex-row items-start',
|
|
1868
|
+
label: 'pr-4 pb-0',
|
|
1869
|
+
hint: 'pr-4 pb-0',
|
|
1870
|
+
feedback: 'pr-4 pb-0'
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
});
|
|
1875
|
+
const formCheckboxGroup = tv({
|
|
1876
|
+
extend: baseGroup,
|
|
1877
|
+
slots: {
|
|
1878
|
+
formCheckbox: 'pb-1 last:pb-0'
|
|
1879
|
+
},
|
|
1880
|
+
variants: {
|
|
1881
|
+
isInline: {
|
|
1882
|
+
true: {
|
|
1883
|
+
formCheckbox: 'pr-4 pb-0'
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
});
|
|
1888
|
+
const formRadioGroup = tv({
|
|
1889
|
+
extend: baseGroup,
|
|
1890
|
+
slots: {
|
|
1891
|
+
formRadio: 'pb-1 last:pb-0'
|
|
1892
|
+
},
|
|
1893
|
+
variants: {
|
|
1894
|
+
isInline: {
|
|
1895
|
+
true: {
|
|
1896
|
+
formRadio: 'pr-4 pb-0'
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
});
|
|
1901
|
+
const formInput = tv({
|
|
1902
|
+
slots: {
|
|
1903
|
+
base: 'flex flex-wrap flex-row',
|
|
1904
|
+
label: 'flex-[1_100%]',
|
|
1905
|
+
input: '',
|
|
1906
|
+
hint: 'flex-[1_100%]',
|
|
1907
|
+
feedback: 'flex-[1_100%]'
|
|
1908
|
+
},
|
|
1909
|
+
variants: {
|
|
1910
|
+
size: {
|
|
1911
|
+
sm: '',
|
|
1912
|
+
md: '',
|
|
1913
|
+
lg: ''
|
|
1914
|
+
}
|
|
1915
|
+
},
|
|
1916
|
+
defaultVariants: {
|
|
1917
|
+
size: 'md'
|
|
1918
|
+
}
|
|
1919
|
+
});
|
|
1920
|
+
const formTextarea = tv({
|
|
1921
|
+
extend: formInput
|
|
1922
|
+
});
|
|
1923
|
+
const formSelect = tv({
|
|
1924
|
+
slots: {
|
|
1925
|
+
base: 'flex flex-wrap flex-row',
|
|
1926
|
+
label: 'flex-[1_100%]',
|
|
1927
|
+
select: '',
|
|
1928
|
+
hint: 'flex-[1_100%]',
|
|
1929
|
+
feedback: 'flex-[1_100%]'
|
|
1930
|
+
},
|
|
1931
|
+
variants: {
|
|
1932
|
+
size: {
|
|
1933
|
+
sm: '',
|
|
1934
|
+
md: '',
|
|
1935
|
+
lg: ''
|
|
1936
|
+
}
|
|
1937
|
+
},
|
|
1938
|
+
defaultVariants: {
|
|
1939
|
+
size: 'md'
|
|
1940
|
+
}
|
|
1941
|
+
});
|
|
1942
|
+
|
|
1943
|
+
export { notificationCard as A, notificationTransitions as B, notificationsContainer as C, overlay as D, overlayTransitions as E, popover as F, progressBar as G, radio as H, radioGroup as I, select as J, spinner as K, switchInput as L, table as M, textarea as N, toggleButton as O, twMerge as P, tv as Q, avatar as a, backdrop as b, button as c, buttonGroup as d, checkbox as e, checkboxGroup as f, chip as g, closeButton as h, divider as i, drawer as j, dropdownContent as k, formCheckbox as l, formCheckboxGroup as m, formDescription as n, formFeedback as o, formInput as p, formRadio as q, formRadioGroup as r, formSelect as s, formTextarea as t, input as u, label as v, listbox as w, listboxItem as x, modal as y, nativeSelect as z };
|
|
1944
|
+
//# sourceMappingURL=forms-legacy-DpUs6ftu.js.map
|