@whatsaaaa/ui-vue 0.0.0-stage → 0.1.0

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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -2
  3. package/dist/color-mode.d.ts +14 -0
  4. package/dist/color-mode.js +34 -0
  5. package/dist/index.d.ts +12 -0
  6. package/dist/index.js +12 -0
  7. package/dist/theme/badge.d.ts +62 -0
  8. package/dist/theme/badge.js +123 -0
  9. package/dist/theme/button.d.ts +119 -0
  10. package/dist/theme/button.js +190 -0
  11. package/dist/theme/card.d.ts +29 -0
  12. package/dist/theme/card.js +44 -0
  13. package/dist/theme/checkbox.d.ts +159 -0
  14. package/dist/theme/checkbox.js +73 -0
  15. package/dist/theme/choice.d.ts +82 -0
  16. package/dist/theme/choice.js +124 -0
  17. package/dist/theme/field.d.ts +131 -0
  18. package/dist/theme/field.js +173 -0
  19. package/dist/theme/form-field.d.ts +44 -0
  20. package/dist/theme/form-field.js +34 -0
  21. package/dist/theme/index.d.ts +1288 -0
  22. package/dist/theme/index.js +112 -0
  23. package/dist/theme/input.d.ts +146 -0
  24. package/dist/theme/input.js +46 -0
  25. package/dist/theme/modal.d.ts +31 -0
  26. package/dist/theme/modal.js +44 -0
  27. package/dist/theme/radio-group.d.ts +177 -0
  28. package/dist/theme/radio-group.js +111 -0
  29. package/dist/theme/select-menu.d.ts +181 -0
  30. package/dist/theme/select-menu.js +22 -0
  31. package/dist/theme/select.d.ts +281 -0
  32. package/dist/theme/select.js +109 -0
  33. package/dist/theme/shared.d.ts +69 -0
  34. package/dist/theme/shared.js +103 -0
  35. package/dist/theme/table.d.ts +45 -0
  36. package/dist/theme/table.js +111 -0
  37. package/dist/theme/tabs.d.ts +95 -0
  38. package/dist/theme/tabs.js +144 -0
  39. package/package.json +65 -3
  40. package/src/index.css +123 -0
  41. package/src/nuxt-ui.css +148 -0
@@ -0,0 +1,181 @@
1
+ declare const _default: {
2
+ slots: {
3
+ input: string;
4
+ base: string;
5
+ placeholder: string;
6
+ leadingIcon: string;
7
+ trailingIcon: string;
8
+ content: string;
9
+ arrow: string;
10
+ viewport: string;
11
+ group: string;
12
+ empty: string;
13
+ label: string;
14
+ separator: string;
15
+ item: string;
16
+ itemLeadingIcon: string;
17
+ itemTrailing: string;
18
+ itemTrailingIcon: string;
19
+ itemDescription: string;
20
+ };
21
+ variants: {
22
+ size: {
23
+ xs: {
24
+ leading: string;
25
+ trailing: string;
26
+ label: string;
27
+ item: string;
28
+ itemLeadingIcon: string;
29
+ itemTrailingIcon: string;
30
+ empty: string;
31
+ base: string;
32
+ leadingIcon: string;
33
+ trailingIcon: string;
34
+ };
35
+ sm: {
36
+ leading: string;
37
+ trailing: string;
38
+ label: string;
39
+ item: string;
40
+ itemLeadingIcon: string;
41
+ itemTrailingIcon: string;
42
+ empty: string;
43
+ base: string;
44
+ leadingIcon: string;
45
+ trailingIcon: string;
46
+ };
47
+ md: {
48
+ leading: string;
49
+ trailing: string;
50
+ label: string;
51
+ item: string;
52
+ itemLeadingIcon: string;
53
+ itemTrailingIcon: string;
54
+ empty: string;
55
+ base: string;
56
+ leadingIcon: string;
57
+ trailingIcon: string;
58
+ };
59
+ lg: {
60
+ leading: string;
61
+ trailing: string;
62
+ label: string;
63
+ item: string;
64
+ itemLeadingIcon: string;
65
+ itemTrailingIcon: string;
66
+ empty: string;
67
+ base: string;
68
+ leadingIcon: string;
69
+ trailingIcon: string;
70
+ };
71
+ xl: {
72
+ leading: string;
73
+ trailing: string;
74
+ label: string;
75
+ item: string;
76
+ itemLeadingIcon: string;
77
+ itemTrailingIcon: string;
78
+ empty: string;
79
+ base: string;
80
+ leadingIcon: string;
81
+ trailingIcon: string;
82
+ };
83
+ };
84
+ variant: {
85
+ outline: string;
86
+ subtle: string;
87
+ soft: string;
88
+ ghost: string;
89
+ none: string;
90
+ };
91
+ position: {
92
+ popper: {
93
+ content: string;
94
+ };
95
+ };
96
+ };
97
+ compoundVariants: ({
98
+ leading: boolean;
99
+ size: string;
100
+ class: string;
101
+ trailing?: undefined;
102
+ } | {
103
+ trailing: boolean;
104
+ size: string;
105
+ class: string;
106
+ leading?: undefined;
107
+ } | ({
108
+ highlight: boolean;
109
+ } & {
110
+ color: import("./shared.ts").Color;
111
+ class: string | Record<string, string>;
112
+ }) | {
113
+ variant: string[];
114
+ class: string;
115
+ highlight?: undefined;
116
+ color?: undefined;
117
+ fixed?: undefined;
118
+ size?: undefined;
119
+ loading?: undefined;
120
+ leading?: undefined;
121
+ trailing?: undefined;
122
+ } | {
123
+ variant: string;
124
+ highlight: boolean;
125
+ class: string;
126
+ color?: undefined;
127
+ fixed?: undefined;
128
+ size?: undefined;
129
+ loading?: undefined;
130
+ leading?: undefined;
131
+ trailing?: undefined;
132
+ } | {
133
+ variant: string;
134
+ highlight: boolean;
135
+ color: string;
136
+ class: string;
137
+ fixed?: undefined;
138
+ size?: undefined;
139
+ loading?: undefined;
140
+ leading?: undefined;
141
+ trailing?: undefined;
142
+ } | {
143
+ fixed: boolean;
144
+ size: string[];
145
+ class: string;
146
+ variant?: undefined;
147
+ highlight?: undefined;
148
+ color?: undefined;
149
+ loading?: undefined;
150
+ leading?: undefined;
151
+ trailing?: undefined;
152
+ } | {
153
+ loading: boolean;
154
+ leading: boolean;
155
+ class: {
156
+ leadingIcon: string;
157
+ trailingIcon?: undefined;
158
+ };
159
+ variant?: undefined;
160
+ highlight?: undefined;
161
+ color?: undefined;
162
+ fixed?: undefined;
163
+ size?: undefined;
164
+ trailing?: undefined;
165
+ } | {
166
+ loading: boolean;
167
+ leading: boolean;
168
+ trailing: boolean;
169
+ class: {
170
+ trailingIcon: string;
171
+ leadingIcon?: undefined;
172
+ };
173
+ variant?: undefined;
174
+ highlight?: undefined;
175
+ color?: undefined;
176
+ fixed?: undefined;
177
+ size?: undefined;
178
+ })[];
179
+ defaultVariants: object;
180
+ };
181
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { fieldCompoundVariants } from "./field.js";
2
+ import { selectSlots, selectVariants } from "./select.js";
3
+ /*
4
+ * A select with a search field at the top of its list: the bare field, at the control height of
5
+ * the select menu's size, on the panel's edge, with a line of the border color under it. Its
6
+ * icon is the field's, drawn unless an app passes a search field of its own.
7
+ */
8
+ /**
9
+ * The search field's icon, by default. Nuxt UI takes a default for any prop of a component from
10
+ * its defaultVariants in the app config, after the prop itself and UTheme's, though the app
11
+ * config's types take only the variants: so it is typed as an object.
12
+ */
13
+ const defaultVariants = { searchInput: { icon: 'i-lucide-search' } };
14
+ export default {
15
+ slots: {
16
+ ...selectSlots,
17
+ input: 'border-b-thin border-border',
18
+ },
19
+ variants: selectVariants,
20
+ compoundVariants: fieldCompoundVariants,
21
+ defaultVariants,
22
+ };
@@ -0,0 +1,281 @@
1
+ /** What a select and a select menu share. */
2
+ export declare const selectSlots: {
3
+ base: string;
4
+ placeholder: string;
5
+ leadingIcon: string;
6
+ trailingIcon: string;
7
+ content: string;
8
+ arrow: string;
9
+ viewport: string;
10
+ group: string;
11
+ empty: string;
12
+ label: string;
13
+ separator: string;
14
+ item: string;
15
+ itemLeadingIcon: string;
16
+ itemTrailing: string;
17
+ itemTrailingIcon: string;
18
+ itemDescription: string;
19
+ };
20
+ /** An open list fades in and grows a little, unless the reader asks for less motion. */
21
+ export declare const listMotion = "data-[state=open]:animate-[fade-in_var(--ws-motion-duration-fast)_var(--ws-motion-easing-out)] data-[state=closed]:animate-[fade-out_var(--ws-motion-duration-fast)_var(--ws-motion-easing-in)] motion-safe:data-[state=open]:animate-[scale-in_var(--ws-motion-duration-fast)_var(--ws-motion-easing-out)] motion-safe:data-[state=closed]:animate-[scale-out_var(--ws-motion-duration-fast)_var(--ws-motion-easing-in)]";
22
+ /**
23
+ * A select's icons sit inside its edge, as its value does. In the list an option's icon and its
24
+ * tick are the control's icon of the size, the icon centered on the option's first line, as the
25
+ * tick is, whatever lines follow.
26
+ */
27
+ export declare const selectVariants: {
28
+ size: {
29
+ xs: {
30
+ leading: string;
31
+ trailing: string;
32
+ label: string;
33
+ item: string;
34
+ itemLeadingIcon: string;
35
+ itemTrailingIcon: string;
36
+ empty: string;
37
+ base: string;
38
+ leadingIcon: string;
39
+ trailingIcon: string;
40
+ };
41
+ sm: {
42
+ leading: string;
43
+ trailing: string;
44
+ label: string;
45
+ item: string;
46
+ itemLeadingIcon: string;
47
+ itemTrailingIcon: string;
48
+ empty: string;
49
+ base: string;
50
+ leadingIcon: string;
51
+ trailingIcon: string;
52
+ };
53
+ md: {
54
+ leading: string;
55
+ trailing: string;
56
+ label: string;
57
+ item: string;
58
+ itemLeadingIcon: string;
59
+ itemTrailingIcon: string;
60
+ empty: string;
61
+ base: string;
62
+ leadingIcon: string;
63
+ trailingIcon: string;
64
+ };
65
+ lg: {
66
+ leading: string;
67
+ trailing: string;
68
+ label: string;
69
+ item: string;
70
+ itemLeadingIcon: string;
71
+ itemTrailingIcon: string;
72
+ empty: string;
73
+ base: string;
74
+ leadingIcon: string;
75
+ trailingIcon: string;
76
+ };
77
+ xl: {
78
+ leading: string;
79
+ trailing: string;
80
+ label: string;
81
+ item: string;
82
+ itemLeadingIcon: string;
83
+ itemTrailingIcon: string;
84
+ empty: string;
85
+ base: string;
86
+ leadingIcon: string;
87
+ trailingIcon: string;
88
+ };
89
+ };
90
+ variant: {
91
+ outline: string;
92
+ subtle: string;
93
+ soft: string;
94
+ ghost: string;
95
+ none: string;
96
+ };
97
+ position: {
98
+ popper: {
99
+ content: string;
100
+ };
101
+ };
102
+ };
103
+ declare const _default: {
104
+ slots: {
105
+ base: string;
106
+ placeholder: string;
107
+ leadingIcon: string;
108
+ trailingIcon: string;
109
+ content: string;
110
+ arrow: string;
111
+ viewport: string;
112
+ group: string;
113
+ empty: string;
114
+ label: string;
115
+ separator: string;
116
+ item: string;
117
+ itemLeadingIcon: string;
118
+ itemTrailing: string;
119
+ itemTrailingIcon: string;
120
+ itemDescription: string;
121
+ };
122
+ variants: {
123
+ size: {
124
+ xs: {
125
+ leading: string;
126
+ trailing: string;
127
+ label: string;
128
+ item: string;
129
+ itemLeadingIcon: string;
130
+ itemTrailingIcon: string;
131
+ empty: string;
132
+ base: string;
133
+ leadingIcon: string;
134
+ trailingIcon: string;
135
+ };
136
+ sm: {
137
+ leading: string;
138
+ trailing: string;
139
+ label: string;
140
+ item: string;
141
+ itemLeadingIcon: string;
142
+ itemTrailingIcon: string;
143
+ empty: string;
144
+ base: string;
145
+ leadingIcon: string;
146
+ trailingIcon: string;
147
+ };
148
+ md: {
149
+ leading: string;
150
+ trailing: string;
151
+ label: string;
152
+ item: string;
153
+ itemLeadingIcon: string;
154
+ itemTrailingIcon: string;
155
+ empty: string;
156
+ base: string;
157
+ leadingIcon: string;
158
+ trailingIcon: string;
159
+ };
160
+ lg: {
161
+ leading: string;
162
+ trailing: string;
163
+ label: string;
164
+ item: string;
165
+ itemLeadingIcon: string;
166
+ itemTrailingIcon: string;
167
+ empty: string;
168
+ base: string;
169
+ leadingIcon: string;
170
+ trailingIcon: string;
171
+ };
172
+ xl: {
173
+ leading: string;
174
+ trailing: string;
175
+ label: string;
176
+ item: string;
177
+ itemLeadingIcon: string;
178
+ itemTrailingIcon: string;
179
+ empty: string;
180
+ base: string;
181
+ leadingIcon: string;
182
+ trailingIcon: string;
183
+ };
184
+ };
185
+ variant: {
186
+ outline: string;
187
+ subtle: string;
188
+ soft: string;
189
+ ghost: string;
190
+ none: string;
191
+ };
192
+ position: {
193
+ popper: {
194
+ content: string;
195
+ };
196
+ };
197
+ };
198
+ compoundVariants: ({
199
+ leading: boolean;
200
+ size: string;
201
+ class: string;
202
+ trailing?: undefined;
203
+ } | {
204
+ trailing: boolean;
205
+ size: string;
206
+ class: string;
207
+ leading?: undefined;
208
+ } | ({
209
+ highlight: boolean;
210
+ } & {
211
+ color: import("./shared.ts").Color;
212
+ class: string | Record<string, string>;
213
+ }) | {
214
+ variant: string[];
215
+ class: string;
216
+ highlight?: undefined;
217
+ color?: undefined;
218
+ fixed?: undefined;
219
+ size?: undefined;
220
+ loading?: undefined;
221
+ leading?: undefined;
222
+ trailing?: undefined;
223
+ } | {
224
+ variant: string;
225
+ highlight: boolean;
226
+ class: string;
227
+ color?: undefined;
228
+ fixed?: undefined;
229
+ size?: undefined;
230
+ loading?: undefined;
231
+ leading?: undefined;
232
+ trailing?: undefined;
233
+ } | {
234
+ variant: string;
235
+ highlight: boolean;
236
+ color: string;
237
+ class: string;
238
+ fixed?: undefined;
239
+ size?: undefined;
240
+ loading?: undefined;
241
+ leading?: undefined;
242
+ trailing?: undefined;
243
+ } | {
244
+ fixed: boolean;
245
+ size: string[];
246
+ class: string;
247
+ variant?: undefined;
248
+ highlight?: undefined;
249
+ color?: undefined;
250
+ loading?: undefined;
251
+ leading?: undefined;
252
+ trailing?: undefined;
253
+ } | {
254
+ loading: boolean;
255
+ leading: boolean;
256
+ class: {
257
+ leadingIcon: string;
258
+ trailingIcon?: undefined;
259
+ };
260
+ variant?: undefined;
261
+ highlight?: undefined;
262
+ color?: undefined;
263
+ fixed?: undefined;
264
+ size?: undefined;
265
+ trailing?: undefined;
266
+ } | {
267
+ loading: boolean;
268
+ leading: boolean;
269
+ trailing: boolean;
270
+ class: {
271
+ trailingIcon: string;
272
+ leadingIcon?: undefined;
273
+ };
274
+ variant?: undefined;
275
+ highlight?: undefined;
276
+ color?: undefined;
277
+ fixed?: undefined;
278
+ size?: undefined;
279
+ })[];
280
+ };
281
+ export default _default;
@@ -0,0 +1,109 @@
1
+ import { fieldCompoundVariants, fieldSizes, fieldVariants } from "./field.js";
2
+ import { forcedIcon, transition } from "./shared.js";
3
+ /*
4
+ * The design system's select spec, specs/select.spec.json, and its select menu spec. The trigger
5
+ * is a field. The list opens on a panel of the overlay, --ws-overlay-*: the surface in the field
6
+ * border's edge, which reads at 3:1, and no shadow; the highlighted option raised, the chosen one
7
+ * ticked in the interactive color. Options are values, so they are in Inter; a group's name is an
8
+ * overline. The edge and the line between groups are borders, so forced colors keep them; there
9
+ * the highlighted option is outlined in the selection color.
10
+ */
11
+ /** What a select and a select menu share. */
12
+ export const selectSlots = {
13
+ base: `rounded-(--ws-control-radius) font-sans cursor-pointer disabled:text-(--ws-field-text-disabled) disabled:opacity-100 ${transition}`,
14
+ // often the only words in the trigger, so in the secondary text color, which reads at 4.5:1;
15
+ // faint with the rest of a disabled trigger
16
+ placeholder: 'truncate text-text-secondary group-disabled:text-(--ws-field-text-disabled)',
17
+ leadingIcon: `text-(--ws-field-icon-rest) ${forcedIcon}`,
18
+ trailingIcon: `text-(--ws-field-icon-rest) ${forcedIcon}`,
19
+ content: 'bg-(--ws-overlay-bg-rest) rounded-(--ws-overlay-list-radius) border-(length:--ws-overlay-border-width) border-(--ws-overlay-border-rest) ring-0 [box-shadow:none]',
20
+ arrow: 'fill-(--ws-overlay-bg-rest) stroke-(--ws-overlay-border-rest)',
21
+ viewport: 'divide-y divide-border',
22
+ group: 'p-(--ws-overlay-list-padding)',
23
+ empty: 'text-center text-text-secondary',
24
+ // an overline: mono, in capitals
25
+ label: 'font-mono font-(--ws-text-overline-font-weight) uppercase text-text-secondary',
26
+ // Nuxt UI's line is a fill a pixel high, which forced colors paint over: no height and no fill,
27
+ // or the border and the fill would draw a line of two
28
+ separator: '-mx-(--ws-overlay-list-padding) my-(--ws-overlay-list-padding) h-0 bg-transparent border-b-thin border-border',
29
+ item: `cursor-pointer font-sans before:rounded-(--ws-radius-sm) data-disabled:opacity-100 data-disabled:text-text-faint text-text data-highlighted:not-data-disabled:text-text data-highlighted:not-data-disabled:before:bg-raised forced-colors:data-highlighted:not-data-disabled:before:border forced-colors:data-highlighted:not-data-disabled:before:border-[Highlight] ${transition} motion-reduce:before:transition-none`,
30
+ itemLeadingIcon: `text-text-secondary group-data-highlighted:not-group-data-disabled:text-text ${forcedIcon} ${transition}`,
31
+ // the chosen option's tick, centered on the option's first line
32
+ itemTrailing: 'h-lh',
33
+ itemTrailingIcon: `text-interactive ${forcedIcon}`,
34
+ itemDescription: 'truncate text-text-secondary text-body-sm',
35
+ };
36
+ /** An open list fades in and grows a little, unless the reader asks for less motion. */
37
+ export const listMotion = 'data-[state=open]:animate-[fade-in_var(--ws-motion-duration-fast)_var(--ws-motion-easing-out)] data-[state=closed]:animate-[fade-out_var(--ws-motion-duration-fast)_var(--ws-motion-easing-in)] motion-safe:data-[state=open]:animate-[scale-in_var(--ws-motion-duration-fast)_var(--ws-motion-easing-out)] motion-safe:data-[state=closed]:animate-[scale-out_var(--ws-motion-duration-fast)_var(--ws-motion-easing-in)]';
38
+ /**
39
+ * A select's icons sit inside its edge, as its value does. In the list an option's icon and its
40
+ * tick are the control's icon of the size, the icon centered on the option's first line, as the
41
+ * tick is, whatever lines follow.
42
+ */
43
+ export const selectVariants = {
44
+ size: {
45
+ xs: {
46
+ ...fieldSizes.xs,
47
+ leading: 'ps-[calc(var(--ws-space-8)-var(--field-edge-extra,0px))]',
48
+ trailing: 'pe-[calc(var(--ws-space-8)-var(--field-edge-extra,0px))]',
49
+ label: 'px-(--ws-space-6) py-(--ws-space-4) text-overline',
50
+ item: 'px-(--ws-space-6) py-(--ws-space-4) gap-(--ws-control-gap-xs) text-body-sm',
51
+ itemLeadingIcon: 'size-(--ws-control-icon-size-xs) my-[calc((1lh-var(--ws-control-icon-size-xs))/2)]',
52
+ itemTrailingIcon: 'size-(--ws-control-icon-size-xs)',
53
+ empty: 'p-(--ws-space-8) text-body-sm',
54
+ },
55
+ sm: {
56
+ ...fieldSizes.sm,
57
+ leading: 'ps-[calc(var(--ws-space-10)-var(--field-edge-extra,0px))]',
58
+ trailing: 'pe-[calc(var(--ws-space-10)-var(--field-edge-extra,0px))]',
59
+ label: 'px-(--ws-space-8) py-(--ws-space-4) text-overline',
60
+ item: 'px-(--ws-space-8) py-(--ws-space-4) gap-(--ws-control-gap-sm) text-body-sm',
61
+ itemLeadingIcon: 'size-(--ws-control-icon-size-sm) my-[calc((1lh-var(--ws-control-icon-size-sm))/2)]',
62
+ itemTrailingIcon: 'size-(--ws-control-icon-size-sm)',
63
+ empty: 'p-(--ws-space-10) text-body-sm',
64
+ },
65
+ md: {
66
+ ...fieldSizes.md,
67
+ leading: 'ps-[calc(var(--ws-space-12)-var(--field-edge-extra,0px))]',
68
+ trailing: 'pe-[calc(var(--ws-space-12)-var(--field-edge-extra,0px))]',
69
+ label: 'px-(--ws-space-8) py-(--ws-space-6) text-overline',
70
+ item: 'px-(--ws-space-8) py-(--ws-space-6) gap-(--ws-control-gap-md) text-body',
71
+ itemLeadingIcon: 'size-(--ws-control-icon-size-md) my-[calc((1lh-var(--ws-control-icon-size-md))/2)]',
72
+ itemTrailingIcon: 'size-(--ws-control-icon-size-md)',
73
+ empty: 'p-(--ws-space-12) text-body-sm',
74
+ },
75
+ lg: {
76
+ ...fieldSizes.lg,
77
+ leading: 'ps-[calc(var(--ws-space-14)-var(--field-edge-extra,0px))]',
78
+ trailing: 'pe-[calc(var(--ws-space-14)-var(--field-edge-extra,0px))]',
79
+ label: 'px-(--ws-space-10) py-(--ws-space-6) text-overline',
80
+ item: 'px-(--ws-space-10) py-(--ws-space-8) gap-(--ws-control-gap-lg) text-body',
81
+ itemLeadingIcon: 'size-(--ws-control-icon-size-lg) my-[calc((1lh-var(--ws-control-icon-size-lg))/2)]',
82
+ itemTrailingIcon: 'size-(--ws-control-icon-size-lg)',
83
+ empty: 'p-(--ws-space-12) text-body',
84
+ },
85
+ xl: {
86
+ ...fieldSizes.xl,
87
+ leading: 'ps-[calc(var(--ws-space-16)-var(--field-edge-extra,0px))]',
88
+ trailing: 'pe-[calc(var(--ws-space-16)-var(--field-edge-extra,0px))]',
89
+ label: 'px-(--ws-space-12) py-(--ws-space-8) text-overline',
90
+ item: 'px-(--ws-space-12) py-(--ws-space-8) gap-(--ws-control-gap-xl) text-body',
91
+ itemLeadingIcon: 'size-(--ws-control-icon-size-xl) my-[calc((1lh-var(--ws-control-icon-size-xl))/2)]',
92
+ itemTrailingIcon: 'size-(--ws-control-icon-size-xl)',
93
+ empty: 'p-(--ws-space-12) text-body',
94
+ },
95
+ },
96
+ variant: {
97
+ ...fieldVariants,
98
+ outline: `${fieldVariants.outline} hover:bg-(--ws-field-bg-rest) disabled:bg-(--ws-field-bg-rest)`,
99
+ subtle: `${fieldVariants.subtle} hover:bg-raised disabled:bg-transparent`,
100
+ },
101
+ position: {
102
+ popper: { content: listMotion },
103
+ },
104
+ };
105
+ export default {
106
+ slots: selectSlots,
107
+ variants: selectVariants,
108
+ compoundVariants: fieldCompoundVariants,
109
+ };
@@ -0,0 +1,69 @@
1
+ /**
2
+ * What the component themes share. Tailwind finds the classes it builds by reading the
3
+ * compiled themes as text, so every class here and in the themes is written out whole: none is
4
+ * put together from parts, and each color has its own line.
5
+ *
6
+ * Every slot is a string, merged onto Nuxt UI's own classes, where a class of the same kind
7
+ * replaces Nuxt UI's: font-semibold its font-medium, disabled:opacity-100 its
8
+ * disabled:opacity-75. Nuxt UI can also take a function that replaces a slot whole, but its
9
+ * Vite plugin writes the config as JSON, so on Vue the function is lost.
10
+ */
11
+ /** The colors of the theme. Nuxt UI's secondary has no role in the design system. */
12
+ export declare const colors: readonly ["primary", "success", "info", "warning", "error"];
13
+ export type Color = (typeof colors)[number] | 'neutral';
14
+ /** One class list for each color, neutral included. */
15
+ export type ByColor = Record<Color, string>;
16
+ /**
17
+ * The design system's focus ring, as base.css draws it: two pixels of the interactive color,
18
+ * three pixels out. Nuxt UI tints the outline with the component's color and widens it to
19
+ * three pixels; these replace that.
20
+ */
21
+ export declare const focusRing = "outline-interactive focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-3";
22
+ /** The edge of a control: a border in the button border color, gray when it is disabled. */
23
+ export declare const forcedControlEdge = "forced-colors:border forced-colors:border-[ButtonBorder] forced-colors:disabled:border-[GrayText] forced-colors:aria-disabled:border-[GrayText]";
24
+ /** The edge of a panel or a tag: a border in the text color. */
25
+ export declare const forcedEdge = "forced-colors:border forced-colors:border-[CanvasText]";
26
+ /**
27
+ * A checked control's fill: the selection's colors, gray in a disabled control, kept as they are,
28
+ * so that its mark, painted in the text color, keeps the fill's text color.
29
+ */
30
+ export declare const forcedChecked = "forced-colors:bg-[Highlight] forced-colors:text-[HighlightText] forced-colors:forced-color-adjust-none forced-colors:in-disabled:bg-[GrayText] forced-colors:in-disabled:text-[Canvas]";
31
+ /**
32
+ * The mark of a checked control, where it is an icon drawn as a mask: in the fill's text color,
33
+ * where the stylesheet paints every icon in the text color of the page.
34
+ */
35
+ export declare const forcedMark = "forced-colors:not-[svg]:bg-[HighlightText] forced-colors:in-disabled:not-[svg]:bg-[Canvas]";
36
+ /**
37
+ * An icon drawn as a mask, in the text color, gray inside a disabled control as its label is: a
38
+ * button, a select's trigger or a tab. An input's icons sit beside the input, not inside it, so
39
+ * they keep the text color when it is disabled. An icon drawn as an SVG, as Nuxt UI draws them on
40
+ * Vue, already takes the text color, and a fill behind it would hide it.
41
+ */
42
+ export declare const forcedIcon = "forced-colors:not-[svg]:bg-[CanvasText] forced-colors:in-disabled:not-[svg]:bg-[GrayText] forced-colors:in-aria-disabled:not-[svg]:bg-[GrayText]";
43
+ /**
44
+ * Color changes on hover and focus, in the fast duration, unless the reader asks for less motion.
45
+ * Nuxt UI puts transition-colors on its controls; this adds it where it does not, and takes it
46
+ * off for a reader who asks for less motion.
47
+ */
48
+ export declare const transition = "transition-colors motion-reduce:transition-none";
49
+ /**
50
+ * Text on a solid fill. The fill of a status is its text color, which reads on the page in both
51
+ * themes, so the page color reads on it: in the light theme every status fill is the text
52
+ * color, and the word on it carries the status. For danger that is the brand fill and the text
53
+ * on it, a pair the design system checks.
54
+ */
55
+ export declare const solid: ByColor;
56
+ /** A tint of the color under its text color: the tag, and the status blocks of the system. */
57
+ export declare const tint: ByColor;
58
+ /** The color as text on the page. A status takes its text color, which can differ from it. */
59
+ export declare const text: ByColor;
60
+ /** The color as an outline drawn inside the box, which takes no room. */
61
+ export declare const ring: ByColor;
62
+ /**
63
+ * One compound variant for each color, from a class list for each. With a slot the classes go
64
+ * to that slot, without one to the component's first.
65
+ */
66
+ export declare function byColor<Conditions extends object>(classes: ByColor, conditions: Conditions, slot?: string): (Conditions & {
67
+ color: Color;
68
+ class: string | Record<string, string>;
69
+ })[];