@ropav/styles 0.4.0 → 0.6.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.
- package/README.md +89 -5
- package/dist/components/accordion.css +6 -14
- package/dist/components/alert-dialog.css +1 -13
- package/dist/components/alert.css +1 -1
- package/dist/components/autocomplete/autocomplete.styles.d.ts +33 -0
- package/dist/components/autocomplete/autocomplete.styles.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.styles.js +12 -0
- package/dist/components/autocomplete.css +54 -36
- package/dist/components/breadcrumbs.css +9 -2
- package/dist/components/button-group.css +6 -10
- package/dist/components/button.css +10 -18
- package/dist/components/calendar-year-picker.css +20 -8
- package/dist/components/calendar.css +46 -21
- package/dist/components/card.css +1 -1
- package/dist/components/checkbox.css +54 -56
- package/dist/components/chip.css +3 -1
- package/dist/components/close-button.css +7 -6
- package/dist/components/color-area.css +6 -6
- package/dist/components/color-input-group/color-input-group.styles.d.ts +27 -0
- package/dist/components/color-input-group/color-input-group.styles.d.ts.map +1 -1
- package/dist/components/color-input-group/color-input-group.styles.js +6 -0
- package/dist/components/color-input-group.css +31 -28
- package/dist/components/color-picker.css +1 -5
- package/dist/components/color-slider.css +14 -12
- package/dist/components/color-swatch-picker.css +2 -85
- package/dist/components/color-swatch.css +1 -1
- package/dist/components/combo-box/combo-box.styles.d.ts +27 -0
- package/dist/components/combo-box/combo-box.styles.d.ts.map +1 -1
- package/dist/components/combo-box/combo-box.styles.js +17 -7
- package/dist/components/combo-box.css +34 -4
- package/dist/components/date-input-group/date-input-group.styles.d.ts +27 -0
- package/dist/components/date-input-group/date-input-group.styles.d.ts.map +1 -1
- package/dist/components/date-input-group/date-input-group.styles.js +6 -0
- package/dist/components/date-input-group.css +55 -33
- package/dist/components/date-picker.css +1 -5
- package/dist/components/date-range-picker.css +1 -5
- package/dist/components/disclosure.css +0 -4
- package/dist/components/drawer.css +4 -8
- package/dist/components/drop-zone/drop-zone.styles.d.ts +34 -0
- package/dist/components/drop-zone/drop-zone.styles.d.ts.map +1 -0
- package/dist/components/drop-zone/drop-zone.styles.js +8 -0
- package/dist/components/drop-zone/index.d.ts +2 -0
- package/dist/components/drop-zone/index.d.ts.map +1 -0
- package/dist/components/drop-zone/index.js +2 -0
- package/dist/components/drop-zone.css +78 -0
- package/dist/components/dropdown.css +1 -5
- package/dist/components/error-message.css +0 -4
- package/dist/components/field-error.css +0 -4
- package/dist/components/index.css +5 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/input.styles.d.ts +15 -0
- package/dist/components/input/input.styles.d.ts.map +1 -1
- package/dist/components/input/input.styles.js +6 -0
- package/dist/components/input-group/input-group.styles.d.ts +27 -0
- package/dist/components/input-group/input-group.styles.d.ts.map +1 -1
- package/dist/components/input-group/input-group.styles.js +6 -0
- package/dist/components/input-group.css +35 -38
- package/dist/components/input-otp.css +14 -26
- package/dist/components/input.css +23 -32
- package/dist/components/kbd.css +3 -1
- package/dist/components/label.css +7 -2
- package/dist/components/link.css +13 -11
- package/dist/components/list-box/list-box.styles.d.ts +15 -0
- package/dist/components/list-box/list-box.styles.d.ts.map +1 -1
- package/dist/components/list-box/list-box.styles.js +15 -5
- package/dist/components/list-box-item.css +8 -12
- package/dist/components/list-box.css +19 -0
- package/dist/components/menu/menu.styles.d.ts +19 -1
- package/dist/components/menu/menu.styles.d.ts.map +1 -1
- package/dist/components/menu/menu.styles.js +9 -1
- package/dist/components/menu-item.css +4 -10
- package/dist/components/menu.css +19 -0
- package/dist/components/meter.css +8 -16
- package/dist/components/modal.css +1 -13
- package/dist/components/number-field/number-field.styles.d.ts +27 -0
- package/dist/components/number-field/number-field.styles.d.ts.map +1 -1
- package/dist/components/number-field/number-field.styles.js +6 -0
- package/dist/components/number-field.css +83 -36
- package/dist/components/pagination.css +6 -10
- package/dist/components/popover.css +15 -5
- package/dist/components/progress-bar/progress-bar.styles.d.ts +36 -0
- package/dist/components/progress-bar/progress-bar.styles.d.ts.map +1 -1
- package/dist/components/progress-bar/progress-bar.styles.js +10 -0
- package/dist/components/progress-bar.css +82 -16
- package/dist/components/progress-circle.css +0 -4
- package/dist/components/radio.css +7 -9
- package/dist/components/range-calendar.css +73 -31
- package/dist/components/search-field/search-field.styles.d.ts +27 -0
- package/dist/components/search-field/search-field.styles.d.ts.map +1 -1
- package/dist/components/search-field/search-field.styles.js +6 -0
- package/dist/components/search-field.css +36 -29
- package/dist/components/segmented-control/index.d.ts +2 -0
- package/dist/components/segmented-control/index.d.ts.map +1 -0
- package/dist/components/segmented-control/index.js +2 -0
- package/dist/components/segmented-control/segmented-control.styles.d.ts +73 -0
- package/dist/components/segmented-control/segmented-control.styles.d.ts.map +1 -0
- package/dist/components/segmented-control/segmented-control.styles.js +27 -0
- package/dist/components/segmented-control.css +188 -0
- package/dist/components/select/select.styles.d.ts +33 -0
- package/dist/components/select/select.styles.d.ts.map +1 -1
- package/dist/components/select/select.styles.js +12 -0
- package/dist/components/select.css +47 -33
- package/dist/components/sidebar/index.d.ts +2 -0
- package/dist/components/sidebar/index.d.ts.map +1 -0
- package/dist/components/sidebar/index.js +2 -0
- package/dist/components/sidebar/sidebar.styles.d.ts +226 -0
- package/dist/components/sidebar/sidebar.styles.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.styles.js +65 -0
- package/dist/components/sidebar.css +604 -0
- package/dist/components/slider.css +10 -11
- package/dist/components/splitter/index.d.ts +2 -0
- package/dist/components/splitter/index.d.ts.map +1 -0
- package/dist/components/splitter/index.js +2 -0
- package/dist/components/splitter/splitter.styles.d.ts +61 -0
- package/dist/components/splitter/splitter.styles.d.ts.map +1 -0
- package/dist/components/splitter/splitter.styles.js +26 -0
- package/dist/components/splitter.css +249 -0
- package/dist/components/switch.css +16 -15
- package/dist/components/table.css +72 -30
- package/dist/components/tabs.css +9 -20
- package/dist/components/tag.css +32 -24
- package/dist/components/textarea/textarea.styles.d.ts +15 -0
- package/dist/components/textarea/textarea.styles.d.ts.map +1 -1
- package/dist/components/textarea/textarea.styles.js +6 -0
- package/dist/components/textarea.css +23 -32
- package/dist/components/toast.css +4 -2
- package/dist/components/toggle-button-group.css +7 -11
- package/dist/components/toggle-button.css +9 -17
- package/dist/components/toolbar.css +1 -1
- package/dist/components/tooltip.css +15 -6
- package/dist/components/typography.css +12 -4
- package/dist/components/virtualizer/index.d.ts +2 -0
- package/dist/components/virtualizer/index.d.ts.map +1 -0
- package/dist/components/virtualizer/index.js +2 -0
- package/dist/components/virtualizer/virtualizer.styles.d.ts +44 -0
- package/dist/components/virtualizer/virtualizer.styles.d.ts.map +1 -0
- package/dist/components/virtualizer/virtualizer.styles.js +15 -0
- package/dist/components/virtualizer.css +72 -0
- package/dist/index.js +6 -1
- package/dist/ropav.min.css +2 -2
- package/dist/themes/airbnb.css +11 -4
- package/dist/themes/all.css +1 -0
- package/dist/themes/coinbase.css +11 -4
- package/dist/themes/default.css +40 -8
- package/dist/themes/discord.css +11 -4
- package/dist/themes/hero.css +282 -0
- package/dist/themes/lavender.css +11 -4
- package/dist/themes/mint.css +11 -4
- package/dist/themes/netflix.css +11 -4
- package/dist/themes/rabbit.css +11 -4
- package/dist/themes/shared/theme.css +20 -2
- package/dist/themes/sky.css +11 -4
- package/dist/themes/spotify.css +11 -4
- package/dist/themes/uber.css +11 -4
- package/dist/utilities/index.css +27 -0
- package/package.json +1 -1
- package/src/components/autocomplete/autocomplete.styles.ts +12 -0
- package/src/components/color-input-group/color-input-group.styles.ts +10 -0
- package/src/components/combo-box/combo-box.styles.ts +12 -0
- package/src/components/date-input-group/date-input-group.styles.ts +10 -0
- package/src/components/drop-zone/drop-zone.styles.ts +12 -0
- package/src/components/drop-zone/index.ts +1 -0
- package/src/components/index.ts +5 -0
- package/src/components/input/input.styles.ts +6 -0
- package/src/components/input-group/input-group.styles.ts +10 -0
- package/src/components/list-box/list-box.styles.ts +6 -0
- package/src/components/menu/menu.styles.ts +10 -0
- package/src/components/number-field/number-field.styles.ts +10 -0
- package/src/components/progress-bar/progress-bar.styles.ts +14 -0
- package/src/components/search-field/search-field.styles.ts +10 -0
- package/src/components/segmented-control/index.ts +1 -0
- package/src/components/segmented-control/segmented-control.styles.ts +37 -0
- package/src/components/select/select.styles.ts +12 -0
- package/src/components/sidebar/index.ts +1 -0
- package/src/components/sidebar/sidebar.styles.ts +117 -0
- package/src/components/splitter/index.ts +1 -0
- package/src/components/splitter/splitter.styles.ts +44 -0
- package/src/components/textarea/textarea.styles.ts +6 -0
- package/src/components/virtualizer/index.ts +1 -0
- package/src/components/virtualizer/virtualizer.styles.ts +15 -0
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
.table-root--primary {
|
|
26
26
|
@apply bg-surface-secondary px-1 pb-1;
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
border-radius: min(32px, var(--component-radius));
|
|
28
29
|
|
|
29
30
|
/* Forced Colors Mode flattens the fill onto the page and strips the shadow, so the container
|
|
30
31
|
* stops having any shape and its contents sit loose on the page. */
|
|
@@ -58,8 +59,8 @@
|
|
|
58
59
|
th.table__column:first-child,
|
|
59
60
|
[role="row"] > [role="presentation"]:first-of-type > .table__column
|
|
60
61
|
) {
|
|
61
|
-
border-start-start-radius: min(32px, var(--radius
|
|
62
|
-
border-end-start-radius: min(32px, var(--radius
|
|
62
|
+
border-start-start-radius: min(32px, var(--component-radius));
|
|
63
|
+
border-end-start-radius: min(32px, var(--component-radius));
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
.table-root--secondary
|
|
@@ -67,8 +68,8 @@
|
|
|
67
68
|
th.table__column:last-child,
|
|
68
69
|
[role="row"] > [role="presentation"]:last-of-type > .table__column
|
|
69
70
|
) {
|
|
70
|
-
border-start-end-radius: min(32px, var(--radius
|
|
71
|
-
border-end-end-radius: min(32px, var(--radius
|
|
71
|
+
border-start-end-radius: min(32px, var(--component-radius));
|
|
72
|
+
border-end-end-radius: min(32px, var(--component-radius));
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
/* Secondary: body has no shadow or rounded corners */
|
|
@@ -92,14 +93,10 @@
|
|
|
92
93
|
/* Secondary: rows are transparent and keep bottom border on every row */
|
|
93
94
|
.table-root--secondary .table__row {
|
|
94
95
|
.table__cell {
|
|
95
|
-
@apply border-b border-separator-tertiary/50
|
|
96
|
-
}
|
|
96
|
+
@apply border-b border-separator-tertiary/50;
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
&[data-hovered="true"] .table__cell {
|
|
101
|
-
@apply bg-default/50;
|
|
102
|
-
}
|
|
98
|
+
--table-cell-bg: transparent;
|
|
99
|
+
--table-cell-bg-hover: color-mix(in oklab, var(--state-layer) 50%, transparent);
|
|
103
100
|
}
|
|
104
101
|
}
|
|
105
102
|
|
|
@@ -126,7 +123,12 @@
|
|
|
126
123
|
Table Column (<th>)
|
|
127
124
|
-------------------------------------------------------------------------- */
|
|
128
125
|
.table__column {
|
|
129
|
-
@apply relative px-4 py-2.5 text-start text-xs font-medium
|
|
126
|
+
@apply relative px-4 py-2.5 text-start text-xs font-medium;
|
|
127
|
+
|
|
128
|
+
--table-column-fg: var(--muted);
|
|
129
|
+
--table-column-fg-hover: var(--foreground);
|
|
130
|
+
|
|
131
|
+
color: var(--table-column-fg);
|
|
130
132
|
|
|
131
133
|
/* Separator between columns — a short vertical line on the right edge */
|
|
132
134
|
&::after {
|
|
@@ -138,6 +140,13 @@
|
|
|
138
140
|
content: none;
|
|
139
141
|
}
|
|
140
142
|
|
|
143
|
+
/* A column holding nothing but the select-all box has no heading for the line to divide from
|
|
144
|
+
* the next one, and where the end padding is collapsed it lands on the box's own edge and
|
|
145
|
+
* reads as a border the box grew. */
|
|
146
|
+
&:has(> .checkbox:only-child)::after {
|
|
147
|
+
content: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
141
150
|
/* Sortable columns */
|
|
142
151
|
&[data-allows-sorting="true"] {
|
|
143
152
|
cursor: var(--cursor-interactive);
|
|
@@ -146,7 +155,7 @@
|
|
|
146
155
|
@media (hover: hover) {
|
|
147
156
|
&[data-allows-sorting="true"]:hover,
|
|
148
157
|
&[data-allows-sorting="true"][data-hovered="true"] {
|
|
149
|
-
|
|
158
|
+
color: var(--table-column-fg-hover);
|
|
150
159
|
}
|
|
151
160
|
}
|
|
152
161
|
|
|
@@ -193,24 +202,24 @@
|
|
|
193
202
|
(border-radius on <tbody> itself has no effect).
|
|
194
203
|
Logical properties so corners follow `dir` in RTL. */
|
|
195
204
|
& tr:first-child td:first-child {
|
|
196
|
-
border-start-start-radius: min(32px, var(--radius
|
|
205
|
+
border-start-start-radius: min(32px, var(--component-radius));
|
|
197
206
|
}
|
|
198
207
|
& tr:first-child td:last-child {
|
|
199
|
-
border-start-end-radius: min(32px, var(--radius
|
|
208
|
+
border-start-end-radius: min(32px, var(--component-radius));
|
|
200
209
|
}
|
|
201
210
|
& tr:last-child td:first-child {
|
|
202
|
-
border-end-start-radius: min(32px, var(--radius
|
|
211
|
+
border-end-start-radius: min(32px, var(--component-radius));
|
|
203
212
|
}
|
|
204
213
|
& tr:last-child td:last-child {
|
|
205
|
-
border-end-end-radius: min(32px, var(--radius
|
|
214
|
+
border-end-end-radius: min(32px, var(--component-radius));
|
|
206
215
|
}
|
|
207
216
|
|
|
208
|
-
/* Virtualized: elements are divs, not tr/td
|
|
209
|
-
|
|
210
|
-
itself and clip overflow instead. */
|
|
217
|
+
/* Virtualized: elements are divs, not tr/td, and only a window of the rows
|
|
218
|
+
is in the DOM, so :first-child/:last-child name the window's edges rather
|
|
219
|
+
than the table's. Round the body itself and clip overflow instead. */
|
|
211
220
|
&:not(tbody) {
|
|
212
221
|
@apply relative h-full overflow-clip;
|
|
213
|
-
border-radius: min(32px, var(--radius
|
|
222
|
+
border-radius: min(32px, var(--component-radius));
|
|
214
223
|
}
|
|
215
224
|
}
|
|
216
225
|
|
|
@@ -232,16 +241,26 @@
|
|
|
232
241
|
@media (hover: hover) {
|
|
233
242
|
&:hover .table__cell,
|
|
234
243
|
&[data-hovered="true"] .table__cell {
|
|
235
|
-
|
|
244
|
+
background-color: var(--table-cell-bg-hover);
|
|
236
245
|
}
|
|
237
246
|
}
|
|
238
247
|
|
|
239
248
|
/* Selected state */
|
|
240
249
|
&[data-selected="true"] .table__cell {
|
|
241
|
-
|
|
250
|
+
background-color: var(--table-cell-bg-selected);
|
|
251
|
+
|
|
242
252
|
@apply forced-selected;
|
|
243
253
|
}
|
|
244
254
|
|
|
255
|
+
/* A selected row still answers the pointer. Without this the rule above swallows the hover -
|
|
256
|
+
* it is later and equally specific, so the row that is both reads as merely selected. */
|
|
257
|
+
@media (hover: hover) {
|
|
258
|
+
&[data-selected="true"]:hover .table__cell,
|
|
259
|
+
&[data-selected="true"][data-hovered="true"] .table__cell {
|
|
260
|
+
background-color: var(--table-cell-bg-selected-hover);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
245
264
|
/* Disabled state */
|
|
246
265
|
&[aria-disabled="true"],
|
|
247
266
|
&[data-disabled="true"] {
|
|
@@ -261,7 +280,7 @@
|
|
|
261
280
|
|
|
262
281
|
/* Drop target state */
|
|
263
282
|
&[data-drop-target="true"] .table__cell {
|
|
264
|
-
|
|
283
|
+
background-color: var(--table-cell-bg-drop-target);
|
|
265
284
|
}
|
|
266
285
|
}
|
|
267
286
|
|
|
@@ -269,7 +288,17 @@
|
|
|
269
288
|
Table Cell (<td>)
|
|
270
289
|
-------------------------------------------------------------------------- */
|
|
271
290
|
.table__cell {
|
|
272
|
-
@apply h-full
|
|
291
|
+
@apply h-full px-4 py-3 align-middle text-sm text-foreground;
|
|
292
|
+
|
|
293
|
+
/* The row's fill, per state, declared on the cell because that is what paints — Firefox clips a
|
|
294
|
+
* row's own background outside the border radius. `.table-root--secondary` re-points two. */
|
|
295
|
+
--table-cell-bg: var(--surface);
|
|
296
|
+
--table-cell-bg-hover: var(--surface-hover);
|
|
297
|
+
--table-cell-bg-selected: var(--accent-soft);
|
|
298
|
+
--table-cell-bg-selected-hover: var(--accent-soft-hover);
|
|
299
|
+
--table-cell-bg-drop-target: var(--accent-soft);
|
|
300
|
+
|
|
301
|
+
background-color: var(--table-cell-bg);
|
|
273
302
|
|
|
274
303
|
@apply border-b border-separator-tertiary/50;
|
|
275
304
|
|
|
@@ -354,24 +383,37 @@
|
|
|
354
383
|
-------------------------------------------------------------------------- */
|
|
355
384
|
.table__column-resizer {
|
|
356
385
|
/* Match the ::after separator: absolute, right edge, short vertical line */
|
|
357
|
-
@apply absolute end-0 top-1/2 h-4 w-px -translate-y-1/2 rounded-sm
|
|
386
|
+
@apply absolute end-0 top-1/2 h-4 w-px -translate-y-1/2 rounded-sm;
|
|
358
387
|
/* Make it interactive — wider hit area with transparent padding */
|
|
359
388
|
@apply box-content translate-x-1/2 cursor-col-resize touch-none px-2;
|
|
360
389
|
/* Reset appearance */
|
|
361
390
|
@apply border-none bg-clip-content outline-none;
|
|
362
391
|
|
|
392
|
+
--table-resizer-bg: var(--separator);
|
|
393
|
+
--table-resizer-bg-hover: var(--accent);
|
|
394
|
+
--table-resizer-bg-resizing: var(--table-resizer-bg-hover);
|
|
395
|
+
--table-resizer-bg-focus-visible: var(--focus);
|
|
396
|
+
|
|
397
|
+
background-color: var(--table-resizer-bg);
|
|
398
|
+
|
|
363
399
|
&[data-hovered="true"],
|
|
364
400
|
&:hover {
|
|
365
|
-
@apply h-full w-0.5
|
|
401
|
+
@apply h-full w-0.5;
|
|
402
|
+
|
|
403
|
+
background-color: var(--table-resizer-bg-hover);
|
|
366
404
|
}
|
|
367
405
|
|
|
368
406
|
&[data-resizing="true"] {
|
|
369
|
-
@apply h-full w-0.5
|
|
407
|
+
@apply h-full w-0.5;
|
|
408
|
+
|
|
409
|
+
background-color: var(--table-resizer-bg-resizing);
|
|
370
410
|
}
|
|
371
411
|
|
|
372
412
|
&[data-focus-visible="true"],
|
|
373
413
|
&:focus-visible {
|
|
374
|
-
@apply h-full w-0.5
|
|
414
|
+
@apply h-full w-0.5;
|
|
415
|
+
|
|
416
|
+
background-color: var(--table-resizer-bg-focus-visible);
|
|
375
417
|
}
|
|
376
418
|
}
|
|
377
419
|
|
package/dist/components/tabs.css
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
.tabs__list-container {
|
|
17
17
|
@apply relative bg-default;
|
|
18
18
|
|
|
19
|
-
border-radius:
|
|
19
|
+
border-radius: min(32px, var(--component-radius));
|
|
20
20
|
|
|
21
21
|
/* Vertical scroller fills the container height so overflow detection
|
|
22
22
|
engages when the wrapper height is constrained (e.g. h-[240px]) */
|
|
@@ -29,10 +29,6 @@
|
|
|
29
29
|
> .tabs__list-container__scroll-next {
|
|
30
30
|
@apply absolute z-2 hidden size-4 cursor-(--cursor-interactive) items-center justify-center rounded-full border-0 bg-transparent p-0 text-foreground outline-none;
|
|
31
31
|
|
|
32
|
-
/**
|
|
33
|
-
* Transitions
|
|
34
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
35
|
-
*/
|
|
36
32
|
transition: opacity 150ms var(--ease-smooth);
|
|
37
33
|
@apply motion-reduce:transition-none;
|
|
38
34
|
|
|
@@ -121,15 +117,16 @@
|
|
|
121
117
|
|
|
122
118
|
/* Individual tab */
|
|
123
119
|
.tabs__tab {
|
|
124
|
-
@apply relative flex h-8 w-full items-center justify-center rounded-
|
|
120
|
+
@apply relative flex h-8 w-full items-center justify-center rounded-component px-4 text-center text-sm font-medium outline-none no-highlight;
|
|
121
|
+
|
|
122
|
+
--tabs-tab-fg: var(--muted);
|
|
123
|
+
--tabs-tab-fg-selected: var(--segment-foreground);
|
|
124
|
+
|
|
125
|
+
color: var(--tabs-tab-fg);
|
|
125
126
|
|
|
126
127
|
z-index: 1;
|
|
127
128
|
cursor: var(--cursor-interactive);
|
|
128
129
|
|
|
129
|
-
/**
|
|
130
|
-
* Transitions
|
|
131
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
132
|
-
*/
|
|
133
130
|
transition:
|
|
134
131
|
color 150ms var(--ease-smooth),
|
|
135
132
|
background-color 150ms var(--ease-smooth),
|
|
@@ -139,7 +136,7 @@
|
|
|
139
136
|
|
|
140
137
|
/* Selected state */
|
|
141
138
|
&[data-selected="true"] {
|
|
142
|
-
|
|
139
|
+
color: var(--tabs-tab-fg-selected);
|
|
143
140
|
|
|
144
141
|
/* Sits on top of the indicator, which forced colors paints `Highlight`. `forced-color-adjust`
|
|
145
142
|
* suppresses the `Canvas` backplate Chromium would otherwise paint behind this label - it
|
|
@@ -182,10 +179,6 @@
|
|
|
182
179
|
.tabs__separator {
|
|
183
180
|
@apply pointer-events-none absolute rounded-sm bg-muted/25;
|
|
184
181
|
|
|
185
|
-
/**
|
|
186
|
-
* Transitions
|
|
187
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
188
|
-
*/
|
|
189
182
|
transition: opacity 150ms var(--ease-smooth);
|
|
190
183
|
@apply motion-reduce:transition-none;
|
|
191
184
|
|
|
@@ -221,7 +214,7 @@
|
|
|
221
214
|
|
|
222
215
|
/* Tab indicator - React Aria's SelectionIndicator */
|
|
223
216
|
.tabs__indicator {
|
|
224
|
-
@apply absolute start-0 top-0 size-full rounded-
|
|
217
|
+
@apply absolute start-0 top-0 size-full rounded-component bg-segment shadow-surface;
|
|
225
218
|
|
|
226
219
|
z-index: -1;
|
|
227
220
|
|
|
@@ -232,10 +225,6 @@
|
|
|
232
225
|
background-color: Highlight;
|
|
233
226
|
}
|
|
234
227
|
|
|
235
|
-
/**
|
|
236
|
-
* Transitions
|
|
237
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
238
|
-
*/
|
|
239
228
|
transition-duration: 250ms;
|
|
240
229
|
transition-property: translate, width, height;
|
|
241
230
|
transition-timing-function: var(--ease-out-fluid);
|
package/dist/components/tag.css
CHANGED
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
.tag {
|
|
3
3
|
--optical-offset: 0.031em;
|
|
4
4
|
|
|
5
|
-
@apply relative inline-flex items-center gap-1
|
|
5
|
+
@apply relative inline-flex items-center gap-1 font-medium select-none no-highlight;
|
|
6
|
+
|
|
7
|
+
border-radius: min(32px, var(--component-radius));
|
|
8
|
+
|
|
9
|
+
/* The fill and label, per state. The variants re-point these and declare nothing else. */
|
|
10
|
+
--tag-bg: transparent;
|
|
11
|
+
--tag-bg-hover: var(--tag-bg);
|
|
12
|
+
--tag-bg-selected: var(--accent-soft);
|
|
13
|
+
--tag-bg-selected-hover: var(--accent-soft-hover);
|
|
14
|
+
--tag-fg: currentcolor;
|
|
15
|
+
--tag-fg-selected: var(--accent-soft-foreground);
|
|
16
|
+
|
|
17
|
+
background-color: var(--tag-bg);
|
|
18
|
+
color: var(--tag-fg);
|
|
6
19
|
|
|
7
|
-
/**
|
|
8
|
-
* Transitions
|
|
9
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
10
|
-
*/
|
|
11
20
|
transition:
|
|
12
21
|
color 100ms var(--ease-smooth),
|
|
13
22
|
scale 100ms var(--ease-smooth),
|
|
@@ -28,6 +37,13 @@
|
|
|
28
37
|
outline-offset: -1px;
|
|
29
38
|
}
|
|
30
39
|
|
|
40
|
+
/* Hover state (when not selected or disabled) */
|
|
41
|
+
@media (hover: hover) {
|
|
42
|
+
&:is(:hover, [data-hovered="true"]):not([data-selected="true"]):not([data-disabled="true"]) {
|
|
43
|
+
background-color: var(--tag-bg-hover);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
31
47
|
/* SVG icon styling */
|
|
32
48
|
& svg {
|
|
33
49
|
@apply pointer-events-none size-3 shrink-0 self-center text-current;
|
|
@@ -50,13 +66,15 @@
|
|
|
50
66
|
|
|
51
67
|
/* Selected state */
|
|
52
68
|
.tag:is([data-selected="true"], [aria-selected="true"]) {
|
|
53
|
-
|
|
69
|
+
background-color: var(--tag-bg-selected);
|
|
70
|
+
color: var(--tag-fg-selected);
|
|
71
|
+
|
|
54
72
|
@apply forced-selected;
|
|
55
73
|
|
|
56
74
|
/* Selected + Hover state */
|
|
57
75
|
@media (hover: hover) {
|
|
58
76
|
&:is(:hover, [data-hovered="true"]) {
|
|
59
|
-
|
|
77
|
+
background-color: var(--tag-bg-selected-hover);
|
|
60
78
|
}
|
|
61
79
|
}
|
|
62
80
|
}
|
|
@@ -71,30 +89,20 @@
|
|
|
71
89
|
}
|
|
72
90
|
|
|
73
91
|
.tag--lg {
|
|
74
|
-
@apply
|
|
92
|
+
@apply px-2.5 py-1.5 text-sm;
|
|
75
93
|
}
|
|
76
94
|
|
|
77
95
|
/* Variant */
|
|
78
96
|
.tag--default {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
@media (hover: hover) {
|
|
83
|
-
&:is(:hover, [data-hovered="true"]):not([data-selected="true"]):not([data-disabled="true"]) {
|
|
84
|
-
@apply bg-default-hover;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
97
|
+
--tag-bg: var(--default);
|
|
98
|
+
--tag-bg-hover: var(--default-hover);
|
|
99
|
+
--tag-fg: var(--default-foreground);
|
|
87
100
|
}
|
|
88
101
|
|
|
89
102
|
.tag--surface {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
@media (hover: hover) {
|
|
94
|
-
&:is(:hover, [data-hovered="true"]):not([data-selected="true"]):not([data-disabled="true"]) {
|
|
95
|
-
@apply bg-surface-hover;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
103
|
+
--tag-bg: var(--surface);
|
|
104
|
+
--tag-bg-hover: var(--surface-hover);
|
|
105
|
+
--tag-fg: var(--surface-foreground);
|
|
98
106
|
}
|
|
99
107
|
|
|
100
108
|
/* Remove Button */
|
|
@@ -4,6 +4,11 @@ export declare const textAreaVariants: import("tailwind-variants").TVReturnType<
|
|
|
4
4
|
false: "";
|
|
5
5
|
true: "textarea--full-width";
|
|
6
6
|
};
|
|
7
|
+
size: {
|
|
8
|
+
lg: "textarea--lg";
|
|
9
|
+
md: "";
|
|
10
|
+
sm: "textarea--sm";
|
|
11
|
+
};
|
|
7
12
|
variant: {
|
|
8
13
|
primary: "textarea--primary";
|
|
9
14
|
secondary: "textarea--secondary";
|
|
@@ -13,6 +18,11 @@ export declare const textAreaVariants: import("tailwind-variants").TVReturnType<
|
|
|
13
18
|
false: "";
|
|
14
19
|
true: "textarea--full-width";
|
|
15
20
|
};
|
|
21
|
+
size: {
|
|
22
|
+
lg: "textarea--lg";
|
|
23
|
+
md: "";
|
|
24
|
+
sm: "textarea--sm";
|
|
25
|
+
};
|
|
16
26
|
variant: {
|
|
17
27
|
primary: "textarea--primary";
|
|
18
28
|
secondary: "textarea--secondary";
|
|
@@ -22,6 +32,11 @@ export declare const textAreaVariants: import("tailwind-variants").TVReturnType<
|
|
|
22
32
|
false: "";
|
|
23
33
|
true: "textarea--full-width";
|
|
24
34
|
};
|
|
35
|
+
size: {
|
|
36
|
+
lg: "textarea--lg";
|
|
37
|
+
md: "";
|
|
38
|
+
sm: "textarea--sm";
|
|
39
|
+
};
|
|
25
40
|
variant: {
|
|
26
41
|
primary: "textarea--primary";
|
|
27
42
|
secondary: "textarea--secondary";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.styles.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/textarea.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"textarea.styles.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/textarea.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsB3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -4,6 +4,7 @@ const textAreaVariants = tv({
|
|
|
4
4
|
base: "textarea",
|
|
5
5
|
defaultVariants: {
|
|
6
6
|
fullWidth: false,
|
|
7
|
+
size: "md",
|
|
7
8
|
variant: "primary"
|
|
8
9
|
},
|
|
9
10
|
variants: {
|
|
@@ -11,6 +12,11 @@ const textAreaVariants = tv({
|
|
|
11
12
|
false: "",
|
|
12
13
|
true: "textarea--full-width"
|
|
13
14
|
},
|
|
15
|
+
size: {
|
|
16
|
+
lg: "textarea--lg",
|
|
17
|
+
md: "",
|
|
18
|
+
sm: "textarea--sm"
|
|
19
|
+
},
|
|
14
20
|
variant: {
|
|
15
21
|
primary: "textarea--primary",
|
|
16
22
|
secondary: "textarea--secondary"
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* use textarea instead of text-area to avoid conflict with Tailwind `text-` prefix */
|
|
2
2
|
.textarea {
|
|
3
|
-
@apply rounded-field border
|
|
3
|
+
@apply rounded-field border px-3 field-line-md text-field-foreground shadow-field outline-none placeholder:text-field-placeholder;
|
|
4
|
+
|
|
5
|
+
/* The fill, per state. The `--secondary` variant re-points these and declares nothing else. */
|
|
6
|
+
--textarea-bg: var(--field-background, var(--default));
|
|
7
|
+
--textarea-bg-hover: var(--field-hover);
|
|
8
|
+
--textarea-bg-focus: var(--field-focus);
|
|
9
|
+
|
|
10
|
+
background-color: var(--textarea-bg);
|
|
4
11
|
|
|
5
12
|
min-height: 38px;
|
|
6
13
|
|
|
@@ -17,10 +24,6 @@
|
|
|
17
24
|
outline-offset: -1px;
|
|
18
25
|
}
|
|
19
26
|
|
|
20
|
-
/**
|
|
21
|
-
* Transitions
|
|
22
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
23
|
-
*/
|
|
24
27
|
transition:
|
|
25
28
|
background-color 150ms var(--ease-smooth),
|
|
26
29
|
border-color 150ms var(--ease-smooth),
|
|
@@ -30,7 +33,7 @@
|
|
|
30
33
|
@media (hover: hover) {
|
|
31
34
|
&:hover:not(:focus):not(:focus-visible),
|
|
32
35
|
&[data-hovered="true"]:not([data-focused="true"]):not([data-focus-visible="true"]) {
|
|
33
|
-
|
|
36
|
+
background-color: var(--textarea-bg-hover);
|
|
34
37
|
border-color: var(--field-border-hover);
|
|
35
38
|
}
|
|
36
39
|
}
|
|
@@ -40,7 +43,7 @@
|
|
|
40
43
|
&[data-focused="true"] {
|
|
41
44
|
@apply status-focused-field;
|
|
42
45
|
border-color: var(--field-border-focus);
|
|
43
|
-
background-color: var(--
|
|
46
|
+
background-color: var(--textarea-bg-focus);
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
/* Focus visible state */
|
|
@@ -50,7 +53,7 @@
|
|
|
50
53
|
|
|
51
54
|
&[data-invalid="true"] {
|
|
52
55
|
@apply status-invalid-field;
|
|
53
|
-
background-color: var(--
|
|
56
|
+
background-color: var(--textarea-bg-focus);
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
/* Disabled state */
|
|
@@ -68,37 +71,25 @@
|
|
|
68
71
|
|
|
69
72
|
.textarea--secondary {
|
|
70
73
|
@apply shadow-none;
|
|
71
|
-
background-color: var(--textarea-bg);
|
|
72
74
|
|
|
73
75
|
--textarea-bg: var(--default);
|
|
74
76
|
--textarea-bg-hover: var(--default-hover);
|
|
75
77
|
--textarea-bg-focus: var(--default);
|
|
76
|
-
|
|
77
|
-
@media (hover: hover) {
|
|
78
|
-
&:hover:not(:focus):not(:focus-visible),
|
|
79
|
-
&[data-hovered="true"]:not([data-focused="true"]):not([data-focus-visible="true"]) {
|
|
80
|
-
background-color: var(--textarea-bg-hover);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&:focus,
|
|
85
|
-
&[data-focused="true"] {
|
|
86
|
-
background-color: var(--textarea-bg-focus);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* Focus visible state */
|
|
90
|
-
&:focus-visible:not(:focus),
|
|
91
|
-
&[data-focus-visible="true"] {
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/* Invalid state */
|
|
95
|
-
&[data-invalid="true"] {
|
|
96
|
-
@apply status-invalid-field;
|
|
97
|
-
background-color: var(--textarea-bg-focus);
|
|
98
|
-
}
|
|
99
78
|
}
|
|
100
79
|
|
|
101
80
|
/* Full width modifier */
|
|
102
81
|
.textarea--full-width {
|
|
103
82
|
@apply w-full;
|
|
104
83
|
}
|
|
84
|
+
|
|
85
|
+
/* ==========================================================================
|
|
86
|
+
Size variants
|
|
87
|
+
========================================================================== */
|
|
88
|
+
|
|
89
|
+
.textarea--sm {
|
|
90
|
+
@apply field-line-sm;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.textarea--lg {
|
|
94
|
+
@apply field-line-lg;
|
|
95
|
+
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
inset-inline-end: 0;
|
|
48
48
|
|
|
49
49
|
@apply pointer-events-auto flex flex-row items-start justify-start gap-1.5 bg-surface px-4 py-3 shadow-overlay;
|
|
50
|
-
border-radius: min(32px, var(--radius
|
|
50
|
+
border-radius: min(32px, var(--component-radius));
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.toast--bottom,
|
|
@@ -131,6 +131,8 @@
|
|
|
131
131
|
/* Toast close button */
|
|
132
132
|
.toast__close-button {
|
|
133
133
|
@apply pointer-events-none absolute -end-1 -top-1 size-5 border-border bg-default opacity-0 sm:border sm:bg-overlay;
|
|
134
|
+
|
|
135
|
+
--toast-close-button-bg-hover: var(--default);
|
|
134
136
|
transition: opacity 150ms var(--ease-smooth);
|
|
135
137
|
@apply motion-reduce:transition-none;
|
|
136
138
|
/* Overrides close button default icon size from 16px to 12px */
|
|
@@ -142,7 +144,7 @@
|
|
|
142
144
|
@media (hover: hover) {
|
|
143
145
|
&:hover,
|
|
144
146
|
&[data-hovered="true"] {
|
|
145
|
-
|
|
147
|
+
background-color: var(--toast-close-button-bg-hover);
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
150
|
}
|
|
@@ -38,32 +38,32 @@
|
|
|
38
38
|
|
|
39
39
|
/* Apply border radius to first button (start edge) */
|
|
40
40
|
.toggle-button-group--horizontal .toggle-button:first-child {
|
|
41
|
-
@apply rounded-s-
|
|
41
|
+
@apply rounded-s-component;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/* Apply border radius to last button (end edge) */
|
|
45
45
|
.toggle-button-group--horizontal .toggle-button:last-child {
|
|
46
|
-
@apply rounded-e-
|
|
46
|
+
@apply rounded-e-component;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/* If only one button, apply both rounded edges */
|
|
50
50
|
.toggle-button-group--horizontal .toggle-button:first-child:last-child {
|
|
51
|
-
@apply rounded-
|
|
51
|
+
@apply rounded-component;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/* Apply border radius to first button (top edge) in vertical */
|
|
55
55
|
.toggle-button-group--vertical .toggle-button:first-child {
|
|
56
|
-
@apply rounded-t-
|
|
56
|
+
@apply rounded-t-component;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/* Apply border radius to last button (bottom edge) in vertical */
|
|
60
60
|
.toggle-button-group--vertical .toggle-button:last-child {
|
|
61
|
-
@apply rounded-b-
|
|
61
|
+
@apply rounded-b-component;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/* If only one button in vertical, apply all rounded edges */
|
|
65
65
|
.toggle-button-group--vertical .toggle-button:first-child:last-child {
|
|
66
|
-
@apply rounded-
|
|
66
|
+
@apply rounded-component;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/* Remove scale transform on active/pressed state for buttons in group */
|
|
@@ -93,10 +93,6 @@
|
|
|
93
93
|
position: absolute;
|
|
94
94
|
pointer-events: none;
|
|
95
95
|
|
|
96
|
-
/**
|
|
97
|
-
* Transitions
|
|
98
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
99
|
-
*/
|
|
100
96
|
transition: opacity 150ms var(--ease-smooth);
|
|
101
97
|
@apply motion-reduce:transition-none;
|
|
102
98
|
|
|
@@ -127,7 +123,7 @@
|
|
|
127
123
|
|
|
128
124
|
/* Restore border radius in detached mode */
|
|
129
125
|
.toggle-button-group--detached .toggle-button {
|
|
130
|
-
@apply rounded-
|
|
126
|
+
@apply rounded-component;
|
|
131
127
|
}
|
|
132
128
|
|
|
133
129
|
/* Hide separators in detached mode */
|