@whatsaaaa/ui-vue 0.1.0 → 0.2.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.
@@ -1,16 +1,21 @@
1
1
  import { byColor, forcedControlEdge } from "./shared.js";
2
2
  /*
3
- * What a text field, a select and a select menu share: the field of the design system's input
4
- * spec, specs/input.spec.json. The control height, the value in Inter, an edge in the field
5
- * border on the page color, the text color's secondary on hover. With an error the edge is the
6
- * danger color, two pixels wide. They read the component tier by name, --ws-field-* and
7
- * --ws-control-*, so a change of the tier reaches them.
3
+ * What a text field, a select and a select menu share, and the fields restyled on them: the pin
4
+ * input's cells, the tag field, the input menu and the date and time fields. The field of the
5
+ * design system's input spec, specs/input.spec.json: the control height, the value in Inter, an
6
+ * edge in the field border on the page color, the text color's secondary on hover. With an error
7
+ * the edge is the danger color, two pixels wide. They read the component tier by name,
8
+ * --ws-field-* and --ws-control-*, so a change of the tier reaches them.
8
9
  *
9
10
  * The edge is a border, not Nuxt UI's ring, so that forced colors keep it; the ring is taken off.
10
11
  * A border takes room, so the field is laid out from its outer edge: the value and an icon start
11
12
  * the padding and the rest edge in. An edge wider than the field's at rest, an error's or a
12
13
  * highlighted bare field's, takes what it adds, --field-edge-extra, off the paddings inside it,
13
14
  * so nothing moves when it changes.
15
+ *
16
+ * A field whose focus is on a part inside it, as a tag field's input or a date field's segments
17
+ * are, shows the focus as the field it is: its within classes read has-focus where the others
18
+ * read focus.
14
19
  */
15
20
  /**
16
21
  * The heights, paddings and value sizes, for the field and the icons in it. An input's icons sit
@@ -53,6 +58,34 @@ export const fieldSizes = {
53
58
  trailingIcon: 'size-(--ws-control-icon-size-xl)',
54
59
  },
55
60
  };
61
+ /**
62
+ * The icons of a field that draws them inside its edge, as a field of tags and a date field do:
63
+ * the padding in from the edge, less what an edge wider than at rest adds, so that they sit where
64
+ * a text field's do and stay there when the edge widens. On the bare field, which draws no edge,
65
+ * that is the padding in from its side, as on a bare text field.
66
+ */
67
+ export const iconsWithinSizes = {
68
+ xs: {
69
+ leading: 'ps-[calc(var(--ws-space-8)-var(--field-edge-extra,0px))]',
70
+ trailing: 'pe-[calc(var(--ws-space-8)-var(--field-edge-extra,0px))]',
71
+ },
72
+ sm: {
73
+ leading: 'ps-[calc(var(--ws-space-10)-var(--field-edge-extra,0px))]',
74
+ trailing: 'pe-[calc(var(--ws-space-10)-var(--field-edge-extra,0px))]',
75
+ },
76
+ md: {
77
+ leading: 'ps-[calc(var(--ws-space-12)-var(--field-edge-extra,0px))]',
78
+ trailing: 'pe-[calc(var(--ws-space-12)-var(--field-edge-extra,0px))]',
79
+ },
80
+ lg: {
81
+ leading: 'ps-[calc(var(--ws-space-14)-var(--field-edge-extra,0px))]',
82
+ trailing: 'pe-[calc(var(--ws-space-14)-var(--field-edge-extra,0px))]',
83
+ },
84
+ xl: {
85
+ leading: 'ps-[calc(var(--ws-space-16)-var(--field-edge-extra,0px))]',
86
+ trailing: 'pe-[calc(var(--ws-space-16)-var(--field-edge-extra,0px))]',
87
+ },
88
+ };
56
89
  /**
57
90
  * The field's edge, of the control's width: transparent where the variant draws none, so that
58
91
  * every field lays out alike, and forced colors draw one there. The bare field, inside another
@@ -69,11 +102,21 @@ export const fieldVariants = {
69
102
  ghost: `text-text bg-transparent hover:bg-raised focus:bg-raised disabled:bg-transparent ${edge} border-transparent ${forcedControlEdge}`,
70
103
  none: 'text-text bg-transparent',
71
104
  };
105
+ /** A disabled field's gray edge in forced colors, where Reka marks it data-disabled alone. */
106
+ const forcedWithinDisabled = 'forced-colors:data-disabled:border-[GrayText]';
107
+ /** The same, with the focus inside: disabled is Reka's data-disabled, on an element that is no control. */
108
+ export const fieldWithinVariants = {
109
+ ...fieldVariants,
110
+ outline: `${fieldVariants.outline} ${forcedWithinDisabled}`,
111
+ soft: `text-text bg-raised/60 hover:bg-raised has-focus:bg-raised data-disabled:bg-transparent ${edge} border-transparent ${forcedControlEdge} ${forcedWithinDisabled}`,
112
+ subtle: `${fieldVariants.subtle} ${forcedWithinDisabled}`,
113
+ ghost: `text-text bg-transparent hover:bg-raised has-focus:bg-raised data-disabled:bg-transparent ${edge} border-transparent ${forcedControlEdge} ${forcedWithinDisabled}`,
114
+ };
72
115
  /**
73
116
  * A highlighted field takes its color as the edge, and keeps it on hover and focus. A field in
74
117
  * error is highlighted in the error color: the invalid edge, wider.
75
118
  */
76
- const highlight = {
119
+ export const fieldHighlight = {
77
120
  primary: `${edge} border-interactive hover:border-interactive focus-visible:border-interactive`,
78
121
  success: `${edge} border-tip hover:border-tip focus-visible:border-tip`,
79
122
  info: `${edge} border-note hover:border-note focus-visible:border-note`,
@@ -81,60 +124,72 @@ const highlight = {
81
124
  error: `${invalidEdge} border-(--ws-field-border-invalid) hover:border-(--ws-field-border-invalid) focus-visible:border-(--ws-field-border-invalid)`,
82
125
  neutral: `${edge} border-text hover:border-text focus-visible:border-text`,
83
126
  };
84
- /** Text before or after the value starts past the icon: the field's padding, the icon and the gap. */
85
- const iconRoom = [
86
- {
87
- leading: true,
88
- size: 'xs',
89
- class: 'ps-[calc(var(--ws-space-8)+var(--ws-control-icon-size-xs)+var(--ws-control-gap-xs)-var(--field-edge-extra,0px))]',
90
- },
91
- {
92
- leading: true,
93
- size: 'sm',
94
- class: 'ps-[calc(var(--ws-space-10)+var(--ws-control-icon-size-sm)+var(--ws-control-gap-sm)-var(--field-edge-extra,0px))]',
95
- },
96
- {
97
- leading: true,
98
- size: 'md',
99
- class: 'ps-[calc(var(--ws-space-12)+var(--ws-control-icon-size-md)+var(--ws-control-gap-md)-var(--field-edge-extra,0px))]',
100
- },
101
- {
102
- leading: true,
103
- size: 'lg',
104
- class: 'ps-[calc(var(--ws-space-14)+var(--ws-control-icon-size-lg)+var(--ws-control-gap-lg)-var(--field-edge-extra,0px))]',
105
- },
106
- {
107
- leading: true,
108
- size: 'xl',
109
- class: 'ps-[calc(var(--ws-space-16)+var(--ws-control-icon-size-xl)+var(--ws-control-gap-xl)-var(--field-edge-extra,0px))]',
110
- },
111
- {
112
- trailing: true,
113
- size: 'xs',
114
- class: 'pe-[calc(var(--ws-space-8)+var(--ws-control-icon-size-xs)+var(--ws-control-gap-xs)-var(--field-edge-extra,0px))]',
115
- },
116
- {
117
- trailing: true,
118
- size: 'sm',
119
- class: 'pe-[calc(var(--ws-space-10)+var(--ws-control-icon-size-sm)+var(--ws-control-gap-sm)-var(--field-edge-extra,0px))]',
120
- },
127
+ const highlightWithin = {
128
+ primary: `${edge} border-interactive hover:border-interactive has-focus-visible:border-interactive`,
129
+ success: `${edge} border-tip hover:border-tip has-focus-visible:border-tip`,
130
+ info: `${edge} border-note hover:border-note has-focus-visible:border-note`,
131
+ warning: `${edge} border-warning hover:border-warning has-focus-visible:border-warning`,
132
+ error: `${invalidEdge} border-(--ws-field-border-invalid) hover:border-(--ws-field-border-invalid) has-focus-visible:border-(--ws-field-border-invalid)`,
133
+ neutral: `${edge} border-text hover:border-text has-focus-visible:border-text`,
134
+ };
135
+ /**
136
+ * The room for an icon at the start or the end of the field, where text before or after the value
137
+ * starts past it: the field's padding, the icon and the gap, less the extra edge.
138
+ */
139
+ export const iconRoomStart = {
140
+ xs: 'ps-[calc(var(--ws-space-8)+var(--ws-control-icon-size-xs)+var(--ws-control-gap-xs)-var(--field-edge-extra,0px))]',
141
+ sm: 'ps-[calc(var(--ws-space-10)+var(--ws-control-icon-size-sm)+var(--ws-control-gap-sm)-var(--field-edge-extra,0px))]',
142
+ md: 'ps-[calc(var(--ws-space-12)+var(--ws-control-icon-size-md)+var(--ws-control-gap-md)-var(--field-edge-extra,0px))]',
143
+ lg: 'ps-[calc(var(--ws-space-14)+var(--ws-control-icon-size-lg)+var(--ws-control-gap-lg)-var(--field-edge-extra,0px))]',
144
+ xl: 'ps-[calc(var(--ws-space-16)+var(--ws-control-icon-size-xl)+var(--ws-control-gap-xl)-var(--field-edge-extra,0px))]',
145
+ };
146
+ export const iconRoomEnd = {
147
+ xs: 'pe-[calc(var(--ws-space-8)+var(--ws-control-icon-size-xs)+var(--ws-control-gap-xs)-var(--field-edge-extra,0px))]',
148
+ sm: 'pe-[calc(var(--ws-space-10)+var(--ws-control-icon-size-sm)+var(--ws-control-gap-sm)-var(--field-edge-extra,0px))]',
149
+ md: 'pe-[calc(var(--ws-space-12)+var(--ws-control-icon-size-md)+var(--ws-control-gap-md)-var(--field-edge-extra,0px))]',
150
+ lg: 'pe-[calc(var(--ws-space-14)+var(--ws-control-icon-size-lg)+var(--ws-control-gap-lg)-var(--field-edge-extra,0px))]',
151
+ xl: 'pe-[calc(var(--ws-space-16)+var(--ws-control-icon-size-xl)+var(--ws-control-gap-xl)-var(--field-edge-extra,0px))]',
152
+ };
153
+ export const fieldSizeNames = Object.keys(iconRoomStart);
154
+ /** The bare field draws no edge at rest: highlighted, it gives back the whole edge it draws. */
155
+ const bareHighlight = [
121
156
  {
122
- trailing: true,
123
- size: 'md',
124
- class: 'pe-[calc(var(--ws-space-12)+var(--ws-control-icon-size-md)+var(--ws-control-gap-md)-var(--field-edge-extra,0px))]',
157
+ variant: 'none',
158
+ highlight: true,
159
+ class: '[--field-edge-extra:var(--ws-control-border-width-rest)]',
125
160
  },
126
161
  {
127
- trailing: true,
128
- size: 'lg',
129
- class: 'pe-[calc(var(--ws-space-14)+var(--ws-control-icon-size-lg)+var(--ws-control-gap-lg)-var(--field-edge-extra,0px))]',
162
+ variant: 'none',
163
+ highlight: true,
164
+ color: 'error',
165
+ class: '[--field-edge-extra:var(--ws-control-border-width-invalid)]',
130
166
  },
167
+ ];
168
+ /** Nuxt UI sets the value smaller from md up, where iOS would not zoom: the system keeps one size. */
169
+ const oneValueSize = [
170
+ { fixed: false, size: ['xs', 'sm'], class: 'md:text-body-sm' },
171
+ { fixed: false, size: ['md', 'lg', 'xl'], class: 'md:text-body' },
172
+ ];
173
+ /**
174
+ * A field's icons, wherever its focus is: text before or after the value starts past an icon,
175
+ * and the loading icon turns only for a reader who has not asked for less motion.
176
+ */
177
+ const fieldIcons = [
178
+ ...fieldSizeNames.map((size) => ({ leading: true, size, class: iconRoomStart[size] })),
179
+ ...fieldSizeNames.map((size) => ({ trailing: true, size, class: iconRoomEnd[size] })),
180
+ { loading: true, leading: true, class: { leadingIcon: 'animate-none motion-safe:animate-spin' } },
131
181
  {
182
+ loading: true,
183
+ leading: false,
132
184
  trailing: true,
133
- size: 'xl',
134
- class: 'pe-[calc(var(--ws-space-16)+var(--ws-control-icon-size-xl)+var(--ws-control-gap-xl)-var(--field-edge-extra,0px))]',
185
+ class: { trailingIcon: 'animate-none motion-safe:animate-spin' },
135
186
  },
136
187
  ];
137
- export const fieldCompoundVariants = [
188
+ /**
189
+ * What every field shares across its states: the edge on hover, on focus and disabled, the
190
+ * focus ring, the highlighted edge, and one size of the value at every width.
191
+ */
192
+ export const fieldStateVariants = [
138
193
  // The edge lightens on hover, stays as it is on focus, where the ring shows, and fades when
139
194
  // the field is disabled.
140
195
  {
@@ -145,29 +200,49 @@ export const fieldCompoundVariants = [
145
200
  variant: ['soft', 'ghost'],
146
201
  class: 'outline-interactive focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-3',
147
202
  },
148
- ...byColor(highlight, { highlight: true }),
149
- // The bare field draws no edge at rest: highlighted, it gives back the whole edge it draws.
203
+ ...byColor(fieldHighlight, { highlight: true }),
204
+ ...bareHighlight,
205
+ ...oneValueSize,
206
+ ];
207
+ export const fieldCompoundVariants = [...fieldStateVariants, ...fieldIcons];
208
+ /** The same, with the focus inside. */
209
+ export const fieldWithinCompoundVariants = [
150
210
  {
151
- variant: 'none',
152
- highlight: true,
153
- class: '[--field-edge-extra:var(--ws-control-border-width-rest)]',
211
+ variant: ['outline', 'subtle'],
212
+ class: 'hover:border-(--ws-field-border-hover) has-focus-visible:border-(--ws-field-border-rest) data-disabled:border-(--ws-field-border-disabled) outline-interactive has-focus-visible:outline-2 has-focus-visible:outline-solid has-focus-visible:outline-offset-3',
154
213
  },
155
214
  {
156
- variant: 'none',
157
- highlight: true,
158
- color: 'error',
159
- class: '[--field-edge-extra:var(--ws-control-border-width-invalid)]',
215
+ variant: ['soft', 'ghost'],
216
+ class: 'outline-interactive has-focus-visible:outline-2 has-focus-visible:outline-solid has-focus-visible:outline-offset-3',
160
217
  },
161
- ...iconRoom,
162
- // Nuxt UI sets the value smaller from md up, where iOS would not zoom: the system keeps one size.
163
- { fixed: false, size: ['xs', 'sm'], class: 'md:text-body-sm' },
164
- { fixed: false, size: ['md', 'lg', 'xl'], class: 'md:text-body' },
165
- // The loading icon turns only for a reader who has not asked for less motion.
166
- { loading: true, leading: true, class: { leadingIcon: 'animate-none motion-safe:animate-spin' } },
218
+ ...byColor(highlightWithin, { highlight: true }),
219
+ ...bareHighlight,
220
+ ...oneValueSize,
221
+ ...fieldIcons,
222
+ ];
223
+ /**
224
+ * In a field group each control's edge lies over the one before it, so that the two make one
225
+ * line. A field under the pointer comes over the controls beside it, so that the line is its
226
+ * edge, one in a color over those too, under the pointer or not, so that its color keeps the
227
+ * line, and one with the focus, on itself or on a part inside it, over all of them, so that its
228
+ * ring shows whole: on the part that is the group's item, the field itself, or the root around a
229
+ * text field.
230
+ */
231
+ export const inGroup = [
167
232
  {
168
- loading: true,
169
- leading: false,
170
- trailing: true,
171
- class: { trailingIcon: 'animate-none motion-safe:animate-spin' },
233
+ fieldGroup: ['horizontal', 'vertical'],
234
+ class: 'hover:z-[1] focus-visible:z-[3] has-focus-visible:z-[3]',
235
+ },
236
+ { fieldGroup: ['horizontal', 'vertical'], highlight: true, class: 'z-[2] hover:z-[2]' },
237
+ ];
238
+ export const inGroupRoot = [
239
+ {
240
+ fieldGroup: ['horizontal', 'vertical'],
241
+ class: { root: 'hover:z-[1] has-focus-visible:z-[3]' },
242
+ },
243
+ {
244
+ fieldGroup: ['horizontal', 'vertical'],
245
+ highlight: true,
246
+ class: { root: 'z-[2] hover:z-[2]' },
172
247
  },
173
248
  ];
@@ -0,0 +1,106 @@
1
+ declare const _default: {
2
+ slots: {
3
+ base: string;
4
+ icon: string;
5
+ avatar: string;
6
+ label: string;
7
+ description: string;
8
+ actions: string;
9
+ file: string;
10
+ fileName: string;
11
+ fileSize: string;
12
+ };
13
+ variants: {
14
+ size: {
15
+ xs: {
16
+ base: string;
17
+ icon: string;
18
+ avatar: string;
19
+ file: string;
20
+ fileSize: string;
21
+ };
22
+ sm: {
23
+ base: string;
24
+ icon: string;
25
+ avatar: string;
26
+ file: string;
27
+ fileSize: string;
28
+ };
29
+ md: {
30
+ base: string;
31
+ icon: string;
32
+ avatar: string;
33
+ file: string;
34
+ fileSize: string;
35
+ };
36
+ lg: {
37
+ base: string;
38
+ icon: string;
39
+ avatar: string;
40
+ file: string;
41
+ fileSize: string;
42
+ };
43
+ xl: {
44
+ base: string;
45
+ icon: string;
46
+ avatar: string;
47
+ file: string;
48
+ fileSize: string;
49
+ };
50
+ };
51
+ variant: {
52
+ area: {
53
+ base: string;
54
+ wrapper: string;
55
+ };
56
+ };
57
+ layout: {
58
+ list: {
59
+ files: string;
60
+ file: string;
61
+ };
62
+ grid: {
63
+ fileLeadingAvatar: string;
64
+ files: string;
65
+ };
66
+ };
67
+ };
68
+ compoundVariants: ({
69
+ variant: string;
70
+ size: "xs" | "sm" | "md" | "lg" | "xl";
71
+ class: {
72
+ base: string;
73
+ };
74
+ } | ({
75
+ highlight: boolean;
76
+ } & {
77
+ color: import("./shared.ts").Color;
78
+ class: string | Record<string, string>;
79
+ }) | {
80
+ class: string;
81
+ interactive?: undefined;
82
+ disabled?: undefined;
83
+ dropzone?: undefined;
84
+ } | {
85
+ interactive: boolean;
86
+ disabled: boolean;
87
+ class: string;
88
+ dropzone?: undefined;
89
+ } | {
90
+ disabled: boolean;
91
+ class: {
92
+ base: string;
93
+ icon: string;
94
+ label: string;
95
+ description: string;
96
+ };
97
+ interactive?: undefined;
98
+ dropzone?: undefined;
99
+ } | {
100
+ dropzone: boolean;
101
+ class: string;
102
+ interactive?: undefined;
103
+ disabled?: undefined;
104
+ })[];
105
+ };
106
+ export default _default;
@@ -0,0 +1,124 @@
1
+ import { fieldHighlight } from "./field.js";
2
+ import { byColor, focusRing, forcedControlEdge, forcedIcon, transition } from "./shared.js";
3
+ /*
4
+ * A file chosen or dropped: a drop area, or a button, in the field's edge, on the page color,
5
+ * with the system's focus ring. Nuxt UI dashes the drop area's edge; the system has no dashed
6
+ * edge, so it is solid, the field border, the text color's secondary under the pointer and while
7
+ * a file is dragged over it. A highlighted area takes its color as the edge, an area in error
8
+ * the danger color, wider, its padding taking what it adds. The edge is a border, so forced
9
+ * colors keep it, and draw it in the selection color while a file is over the area.
10
+ *
11
+ * The area's words are a label and its help: the label mono, the description in Inter in the
12
+ * secondary text, as a form field's. A chosen file is a row in the field's edge, its name the
13
+ * value and its size a caption.
14
+ */
15
+ /** The area's padding, and the button's side, at each size. */
16
+ const sizes = {
17
+ xs: {
18
+ base: 'text-body-sm',
19
+ icon: 'size-(--ws-control-icon-size-xs)',
20
+ avatar: 'size-(--ws-control-height-xs) text-(length:--ws-control-icon-size-xs)',
21
+ file: 'text-body-sm px-(--ws-space-8) py-(--ws-space-4) gap-(--ws-control-gap-xs)',
22
+ fileSize: 'text-caption',
23
+ },
24
+ sm: {
25
+ base: 'text-body-sm',
26
+ icon: 'size-(--ws-control-icon-size-sm)',
27
+ avatar: 'size-(--ws-control-height-sm) text-(length:--ws-control-icon-size-sm)',
28
+ file: 'text-body-sm px-(--ws-space-10) py-(--ws-space-6) gap-(--ws-control-gap-sm)',
29
+ fileSize: 'text-caption',
30
+ },
31
+ md: {
32
+ base: 'text-body-sm',
33
+ icon: 'size-(--ws-control-icon-size-md)',
34
+ avatar: 'size-(--ws-control-height-md) text-(length:--ws-control-icon-size-md)',
35
+ file: 'text-body-sm px-(--ws-space-12) py-(--ws-space-6) gap-(--ws-control-gap-md)',
36
+ fileSize: 'text-caption',
37
+ },
38
+ lg: {
39
+ base: 'text-body',
40
+ icon: 'size-(--ws-control-icon-size-lg)',
41
+ avatar: 'size-(--ws-control-height-lg) text-(length:--ws-control-icon-size-lg)',
42
+ file: 'text-body px-(--ws-space-14) py-(--ws-space-8) gap-(--ws-control-gap-lg)',
43
+ fileSize: 'text-caption',
44
+ },
45
+ xl: {
46
+ base: 'text-body',
47
+ icon: 'size-(--ws-control-icon-size-xl)',
48
+ avatar: 'size-(--ws-control-height-xl) text-(length:--ws-control-icon-size-xl)',
49
+ file: 'text-body px-(--ws-space-16) py-(--ws-space-8) gap-(--ws-control-gap-xl)',
50
+ fileSize: 'text-caption',
51
+ },
52
+ };
53
+ /** The button at each size: a square of the control's height around its icon. */
54
+ const buttons = ['xs', 'sm', 'md', 'lg', 'xl'].map((size) => ({
55
+ variant: 'button',
56
+ size,
57
+ class: {
58
+ base: {
59
+ xs: 'flex-none size-(--ws-control-height-xs) p-0 items-center',
60
+ sm: 'flex-none size-(--ws-control-height-sm) p-0 items-center',
61
+ md: 'flex-none size-(--ws-control-height-md) p-0 items-center',
62
+ lg: 'flex-none size-(--ws-control-height-lg) p-0 items-center',
63
+ xl: 'flex-none size-(--ws-control-height-xl) p-0 items-center',
64
+ }[size],
65
+ },
66
+ }));
67
+ export default {
68
+ slots: {
69
+ base: `bg-(--ws-field-bg-rest) border-(length:--ws-control-border-width-rest) border-solid border-(--ws-field-border-rest) rounded-(--ws-control-radius) ${forcedControlEdge} ${transition}`,
70
+ icon: `text-(--ws-field-icon-rest) ${forcedIcon}`,
71
+ avatar: 'bg-raised',
72
+ label: 'mt-(--ws-space-8) font-mono font-normal text-label text-(--ws-field-label-text-rest)',
73
+ description: 'mt-(--ws-space-4) font-sans text-text-secondary',
74
+ actions: 'mt-(--ws-space-16) gap-(--ws-space-8)',
75
+ file: 'font-sans text-(--ws-field-text-rest)',
76
+ fileName: 'text-(--ws-field-text-rest)',
77
+ fileSize: 'font-mono text-text-secondary',
78
+ },
79
+ variants: {
80
+ size: sizes,
81
+ variant: {
82
+ area: {
83
+ base: 'p-[calc(var(--ws-space-16)-var(--field-edge-extra,0px))]',
84
+ wrapper: 'px-(--ws-space-16) py-(--ws-space-12)',
85
+ },
86
+ },
87
+ layout: {
88
+ list: {
89
+ files: 'gap-(--ws-space-8)',
90
+ file: `border-(length:--ws-control-border-width-rest) border-(--ws-field-border-rest) rounded-(--ws-control-radius) ${forcedControlEdge}`,
91
+ },
92
+ grid: {
93
+ fileLeadingAvatar: 'rounded-(--ws-control-radius)',
94
+ files: 'gap-(--ws-space-16)',
95
+ },
96
+ },
97
+ },
98
+ compoundVariants: [
99
+ // over Nuxt UI's ring and edge in each color: the system's ring, the edge as it is at rest
100
+ { class: `${focusRing} focus-visible:border-(--ws-field-border-rest)` },
101
+ {
102
+ interactive: true,
103
+ disabled: false,
104
+ class: 'hover:bg-(--ws-field-bg-rest) hover:border-(--ws-field-border-hover)',
105
+ },
106
+ // disabled, unfaded: the edge and the words in the field's disabled colors
107
+ {
108
+ disabled: true,
109
+ class: {
110
+ base: 'opacity-100 border-(--ws-field-border-disabled)',
111
+ icon: 'text-(--ws-field-text-disabled)',
112
+ label: 'text-(--ws-field-text-disabled)',
113
+ description: 'text-(--ws-field-text-disabled)',
114
+ },
115
+ },
116
+ // solid, as every edge of the system, and under a file dragged over it as under the pointer
117
+ {
118
+ dropzone: true,
119
+ class: 'border-solid data-[dragging=true]:bg-(--ws-field-bg-rest) data-[dragging=true]:border-(--ws-field-border-hover) forced-colors:data-[dragging=true]:border-[Highlight]',
120
+ },
121
+ ...byColor(fieldHighlight, { highlight: true }),
122
+ ...buttons,
123
+ ],
124
+ };