@ropav/styles 0.5.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 +79 -0
- package/dist/components/accordion.css +1 -9
- package/dist/components/alert-dialog.css +0 -12
- package/dist/components/autocomplete.css +25 -35
- package/dist/components/breadcrumbs.css +9 -2
- package/dist/components/button-group.css +0 -4
- package/dist/components/button.css +3 -7
- package/dist/components/calendar-year-picker.css +19 -7
- package/dist/components/calendar.css +46 -21
- 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.css +10 -27
- 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.css +13 -3
- package/dist/components/date-input-group.css +34 -32
- 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 +0 -4
- package/dist/components/error-message.css +0 -4
- package/dist/components/field-error.css +0 -4
- package/dist/components/index.css +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input-group.css +12 -37
- package/dist/components/input-otp.css +14 -26
- package/dist/components/input.css +11 -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-item.css +4 -10
- package/dist/components/menu-item.css +4 -10
- package/dist/components/meter.css +8 -16
- package/dist/components/modal.css +0 -12
- package/dist/components/number-field.css +23 -35
- package/dist/components/pagination.css +0 -4
- package/dist/components/popover.css +0 -4
- 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.css +11 -28
- package/dist/components/segmented-control.css +9 -14
- package/dist/components/select.css +18 -32
- package/dist/components/sidebar/sidebar.styles.d.ts +36 -0
- package/dist/components/sidebar/sidebar.styles.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.styles.js +14 -1
- package/dist/components/sidebar.css +132 -38
- package/dist/components/slider.css +10 -11
- package/dist/components/splitter.css +44 -36
- package/dist/components/switch.css +16 -15
- package/dist/components/table.css +69 -27
- package/dist/components/tabs.css +8 -19
- package/dist/components/tag.css +32 -24
- package/dist/components/textarea.css +11 -32
- package/dist/components/toast.css +3 -1
- package/dist/components/toggle-button-group.css +0 -4
- package/dist/components/toggle-button.css +2 -6
- package/dist/components/tooltip.css +0 -4
- package/dist/components/typography.css +12 -4
- package/dist/components/virtualizer.css +11 -3
- package/dist/index.js +2 -1
- package/dist/ropav.min.css +1 -1
- package/dist/themes/airbnb.css +6 -4
- package/dist/themes/coinbase.css +6 -4
- package/dist/themes/default.css +24 -4
- package/dist/themes/discord.css +6 -4
- package/dist/themes/hero.css +24 -4
- package/dist/themes/lavender.css +6 -4
- package/dist/themes/mint.css +6 -4
- package/dist/themes/netflix.css +6 -4
- package/dist/themes/rabbit.css +6 -4
- package/dist/themes/shared/theme.css +1 -0
- package/dist/themes/sky.css +6 -4
- package/dist/themes/spotify.css +6 -4
- package/dist/themes/uber.css +6 -4
- package/package.json +1 -1
- 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 +1 -0
- package/src/components/progress-bar/progress-bar.styles.ts +14 -0
- package/src/components/sidebar/sidebar.styles.ts +23 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.switch__thumb {
|
|
25
|
-
|
|
25
|
+
background-color: var(--switch-thumb-bg-disabled);
|
|
26
26
|
|
|
27
27
|
@media (forced-colors: active) {
|
|
28
28
|
background-color: GrayText;
|
|
@@ -84,16 +84,14 @@
|
|
|
84
84
|
/* Switch control (track) */
|
|
85
85
|
.switch__control {
|
|
86
86
|
/* Default size (medium) */
|
|
87
|
-
@apply relative flex shrink-0 items-center overflow-hidden
|
|
87
|
+
@apply relative flex shrink-0 items-center overflow-hidden;
|
|
88
|
+
|
|
89
|
+
border-radius: min(32px, var(--component-radius));
|
|
88
90
|
height: 1.25rem; /* 20px on desktop (14px base), 20px on mobile (16px base) - scales with font-size */
|
|
89
91
|
width: 2.5rem; /* 35px on desktop, 40px on mobile - scales with font-size */
|
|
90
92
|
|
|
91
93
|
background-color: var(--switch-control-bg);
|
|
92
94
|
|
|
93
|
-
/**
|
|
94
|
-
* Transitions
|
|
95
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
96
|
-
*/
|
|
97
95
|
transition:
|
|
98
96
|
background-color 250ms var(--ease-smooth),
|
|
99
97
|
box-shadow 150ms var(--ease-out);
|
|
@@ -167,7 +165,6 @@
|
|
|
167
165
|
|
|
168
166
|
/* Size-specific control dimensions */
|
|
169
167
|
.switch--sm .switch__control {
|
|
170
|
-
@apply rounded-lg;
|
|
171
168
|
height: 1rem; /* ~14px on desktop, ~16px on mobile */
|
|
172
169
|
width: 2rem; /* ~32px on desktop, ~36px on mobile */
|
|
173
170
|
}
|
|
@@ -184,7 +181,15 @@
|
|
|
184
181
|
/* Switch thumb */
|
|
185
182
|
.switch__thumb {
|
|
186
183
|
/* Default size (medium) with margin-based positioning */
|
|
187
|
-
@apply ms-0.5 flex origin-center
|
|
184
|
+
@apply ms-0.5 flex origin-center text-black shadow-field;
|
|
185
|
+
|
|
186
|
+
border-radius: min(32px, var(--component-radius));
|
|
187
|
+
|
|
188
|
+
--switch-thumb-bg: var(--white);
|
|
189
|
+
--switch-thumb-bg-selected: var(--accent-foreground);
|
|
190
|
+
--switch-thumb-bg-disabled: color-mix(in oklab, var(--default-foreground) 20%, transparent);
|
|
191
|
+
|
|
192
|
+
background-color: var(--switch-thumb-bg);
|
|
188
193
|
height: 1rem; /* ~14px on desktop, ~16px on mobile */
|
|
189
194
|
width: 1.375rem; /* ~19px on desktop, ~22px on mobile */
|
|
190
195
|
|
|
@@ -195,10 +200,6 @@
|
|
|
195
200
|
color: Canvas;
|
|
196
201
|
}
|
|
197
202
|
|
|
198
|
-
/**
|
|
199
|
-
* Transitions
|
|
200
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
201
|
-
*/
|
|
202
203
|
transition:
|
|
203
204
|
margin 300ms var(--ease-out-fluid),
|
|
204
205
|
background-color 200ms var(--ease-out);
|
|
@@ -207,7 +208,9 @@
|
|
|
207
208
|
/* Selected/checked state - use margin instead of translate */
|
|
208
209
|
.switch[aria-checked="true"] &,
|
|
209
210
|
.switch[data-selected="true"] & {
|
|
210
|
-
@apply ms-[calc(100%-1.5rem)]
|
|
211
|
+
@apply ms-[calc(100%-1.5rem)] text-accent;
|
|
212
|
+
|
|
213
|
+
background-color: var(--switch-thumb-bg-selected);
|
|
211
214
|
box-shadow:
|
|
212
215
|
0px 0px 5px 0px rgb(0 0 0 / 0.02),
|
|
213
216
|
0px 2px 10px 0px rgb(0 0 0 / 0.06),
|
|
@@ -226,7 +229,6 @@
|
|
|
226
229
|
|
|
227
230
|
/* Size-specific thumb dimensions */
|
|
228
231
|
.switch--sm .switch__thumb {
|
|
229
|
-
@apply rounded-md;
|
|
230
232
|
height: 0.75rem; /* ~10.5px on desktop, ~12px on mobile */
|
|
231
233
|
width: 1.03125rem; /* ~14.4px on desktop, ~16.5px on mobile - maintains 1.375:1 ratio */
|
|
232
234
|
|
|
@@ -238,7 +240,6 @@
|
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
.switch--lg .switch__thumb {
|
|
241
|
-
@apply rounded-xl;
|
|
242
243
|
height: 1.25rem; /* ~17.5px on desktop, ~20px on mobile */
|
|
243
244
|
width: 1.71875rem; /* ~24px on desktop, ~27.5px on mobile - maintains 1.375:1 ratio */
|
|
244
245
|
|
|
@@ -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,16 +202,16 @@
|
|
|
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
217
|
/* Virtualized: elements are divs, not tr/td, and only a window of the rows
|
|
@@ -210,7 +219,7 @@
|
|
|
210
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-component px-4 text-center text-sm font-medium
|
|
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
|
|
|
@@ -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 */
|
|
@@ -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,34 +71,10 @@
|
|
|
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 */
|
|
@@ -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
|
}
|
|
@@ -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
|
|
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
.toggle-button {
|
|
7
7
|
@apply relative isolate inline-flex h-9 w-fit origin-center items-center justify-center gap-2 rounded-component px-4 text-sm font-medium whitespace-nowrap outline-none select-none no-highlight;
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Transitions
|
|
11
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
12
|
-
*/
|
|
13
9
|
transition:
|
|
14
10
|
transform 250ms var(--ease-smooth),
|
|
15
11
|
background-color 100ms var(--ease-out),
|
|
@@ -133,8 +129,8 @@
|
|
|
133
129
|
|
|
134
130
|
.toggle-button--ghost {
|
|
135
131
|
--toggle-button-bg: transparent;
|
|
136
|
-
--toggle-button-bg-hover: var(--
|
|
137
|
-
--toggle-button-bg-pressed: var(--
|
|
132
|
+
--toggle-button-bg-hover: var(--state-layer);
|
|
133
|
+
--toggle-button-bg-pressed: var(--state-layer);
|
|
138
134
|
--toggle-button-fg: var(--default-foreground);
|
|
139
135
|
}
|
|
140
136
|
|
|
@@ -75,10 +75,6 @@
|
|
|
75
75
|
.tooltip__trigger {
|
|
76
76
|
@apply inline-block;
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Transitions
|
|
80
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
81
|
-
*/
|
|
82
78
|
transition:
|
|
83
79
|
color 150ms var(--ease-smooth),
|
|
84
80
|
background-color 150ms var(--ease-smooth),
|
|
@@ -35,7 +35,9 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.typography-prose code {
|
|
38
|
-
@apply
|
|
38
|
+
@apply bg-default px-1.5 py-0.5 font-mono text-sm text-foreground;
|
|
39
|
+
|
|
40
|
+
border-radius: min(32px, var(--component-radius));
|
|
39
41
|
|
|
40
42
|
/* Code is marked out by a tinted background and nothing else, so forced colors leaves it
|
|
41
43
|
* indistinguishable from the prose around it - the monospace face is all that is left. */
|
|
@@ -70,7 +72,9 @@
|
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
.typography-prose pre {
|
|
73
|
-
@apply my-4 overflow-x-auto
|
|
75
|
+
@apply my-4 overflow-x-auto bg-default p-4 font-mono text-sm leading-relaxed;
|
|
76
|
+
|
|
77
|
+
border-radius: min(32px, var(--component-radius));
|
|
74
78
|
|
|
75
79
|
/* Code is marked out by a tinted background and nothing else, so forced colors leaves it
|
|
76
80
|
* indistinguishable from the prose around it - the monospace face is all that is left. */
|
|
@@ -89,7 +93,9 @@
|
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
.typography-prose img {
|
|
92
|
-
@apply my-4
|
|
96
|
+
@apply my-4;
|
|
97
|
+
|
|
98
|
+
border-radius: min(32px, var(--component-radius));
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
.typography--h1 {
|
|
@@ -129,7 +135,9 @@
|
|
|
129
135
|
}
|
|
130
136
|
|
|
131
137
|
.typography--code {
|
|
132
|
-
@apply
|
|
138
|
+
@apply bg-default px-1.5 py-0.5 font-mono text-sm text-foreground;
|
|
139
|
+
|
|
140
|
+
border-radius: min(32px, var(--component-radius));
|
|
133
141
|
|
|
134
142
|
/* Code is marked out by a tinted background and nothing else, so forced colors leaves it
|
|
135
143
|
* indistinguishable from the prose around it - the monospace face is all that is left. */
|