@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
|
@@ -15,7 +15,14 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.number-field__group {
|
|
18
|
-
@apply grid h-9 items-center overflow-hidden rounded-field border
|
|
18
|
+
@apply grid h-9 items-center overflow-hidden rounded-field border text-sm text-field-foreground shadow-field outline-none;
|
|
19
|
+
|
|
20
|
+
/* The fill, per state. The `--secondary` variant re-points these and declares nothing else. */
|
|
21
|
+
--number-field-group-bg: var(--field-background, var(--default));
|
|
22
|
+
--number-field-group-bg-hover: var(--field-hover);
|
|
23
|
+
--number-field-group-bg-focus: var(--field-focus);
|
|
24
|
+
|
|
25
|
+
background-color: var(--number-field-group-bg);
|
|
19
26
|
border-width: var(--border-width-field);
|
|
20
27
|
border-color: var(--field-border);
|
|
21
28
|
|
|
@@ -40,10 +47,6 @@
|
|
|
40
47
|
grid-template-columns: 40px 1fr 40px;
|
|
41
48
|
}
|
|
42
49
|
|
|
43
|
-
/**
|
|
44
|
-
* Transitions
|
|
45
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
46
|
-
*/
|
|
47
50
|
transition:
|
|
48
51
|
background-color 150ms var(--ease-smooth),
|
|
49
52
|
border-color 150ms var(--ease-smooth),
|
|
@@ -54,7 +57,7 @@
|
|
|
54
57
|
@media (hover: hover) {
|
|
55
58
|
&:hover:not(:focus-within),
|
|
56
59
|
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
57
|
-
|
|
60
|
+
background-color: var(--number-field-group-bg-hover);
|
|
58
61
|
border-color: var(--field-border-hover);
|
|
59
62
|
}
|
|
60
63
|
}
|
|
@@ -64,13 +67,13 @@
|
|
|
64
67
|
&:focus-within {
|
|
65
68
|
@apply status-focused-field;
|
|
66
69
|
border-color: var(--field-border-focus);
|
|
67
|
-
background-color: var(--field-focus);
|
|
70
|
+
background-color: var(--number-field-group-bg-focus);
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
/* Invalid state */
|
|
71
74
|
&[data-invalid="true"] {
|
|
72
75
|
@apply status-invalid-field;
|
|
73
|
-
background-color: var(--field-focus);
|
|
76
|
+
background-color: var(--number-field-group-bg-focus);
|
|
74
77
|
border-color: var(--color-field-border-invalid);
|
|
75
78
|
}
|
|
76
79
|
|
|
@@ -91,13 +94,13 @@
|
|
|
91
94
|
*/
|
|
92
95
|
&:has([data-slot="number-field-input"]:-webkit-autofill),
|
|
93
96
|
&:has([data-slot="number-field-input"]:autofill) {
|
|
94
|
-
background-color: var(--field-focus);
|
|
97
|
+
background-color: var(--number-field-group-bg-focus);
|
|
95
98
|
border-color: var(--field-border-focus);
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
.number-field__input {
|
|
100
|
-
@apply min-w-0 rounded-none border-0 bg-transparent px-3
|
|
103
|
+
@apply min-w-0 rounded-none border-0 bg-transparent px-3 field-line-md tabular-nums shadow-none outline-none;
|
|
101
104
|
|
|
102
105
|
/* Remove border radius on left side when decrement button is present */
|
|
103
106
|
.number-field__group:has([slot="decrement"]) & {
|
|
@@ -137,15 +140,20 @@
|
|
|
137
140
|
|
|
138
141
|
.number-field__increment-button,
|
|
139
142
|
.number-field__decrement-button {
|
|
140
|
-
@apply flex h-full w-10 items-center justify-center rounded-none
|
|
143
|
+
@apply flex h-full w-10 items-center justify-center rounded-none text-field-foreground outline-none;
|
|
144
|
+
|
|
145
|
+
--number-field-button-bg: transparent;
|
|
146
|
+
--number-field-button-bg-pressed: color-mix(
|
|
147
|
+
in oklab,
|
|
148
|
+
var(--field-foreground, var(--foreground)) 10%,
|
|
149
|
+
transparent
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
background-color: var(--number-field-button-bg);
|
|
141
153
|
border-width: var(--border-width-field);
|
|
142
154
|
border-color: var(--field-border);
|
|
143
155
|
border-style: solid;
|
|
144
156
|
|
|
145
|
-
/**
|
|
146
|
-
* Transitions
|
|
147
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
148
|
-
*/
|
|
149
157
|
transition:
|
|
150
158
|
background-color 150ms var(--ease-smooth),
|
|
151
159
|
border-color 150ms var(--ease-smooth);
|
|
@@ -167,7 +175,7 @@
|
|
|
167
175
|
/* Pressed state */
|
|
168
176
|
&:active,
|
|
169
177
|
&[data-pressed="true"] {
|
|
170
|
-
|
|
178
|
+
background-color: var(--number-field-button-bg-pressed);
|
|
171
179
|
transform: scale(0.97);
|
|
172
180
|
}
|
|
173
181
|
|
|
@@ -200,31 +208,11 @@
|
|
|
200
208
|
|
|
201
209
|
.number-field--secondary .number-field__group {
|
|
202
210
|
@apply shadow-none;
|
|
203
|
-
background-color: var(--number-field-group-bg);
|
|
204
211
|
|
|
205
212
|
--number-field-group-bg: var(--default);
|
|
206
213
|
--number-field-group-bg-hover: var(--default-hover);
|
|
207
214
|
--number-field-group-bg-focus: var(--default);
|
|
208
215
|
|
|
209
|
-
@media (hover: hover) {
|
|
210
|
-
&:hover:not(:focus-within),
|
|
211
|
-
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
212
|
-
background-color: var(--number-field-group-bg-hover);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
&:focus-within,
|
|
217
|
-
&[data-focus-within="true"] {
|
|
218
|
-
background-color: var(--number-field-group-bg-focus);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/* Invalid state */
|
|
222
|
-
&[data-invalid="true"] {
|
|
223
|
-
@apply status-invalid-field;
|
|
224
|
-
border-color: var(--color-field-border-invalid);
|
|
225
|
-
background-color: var(--number-field-group-bg-focus);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
216
|
[data-slot="number-field-input"] {
|
|
229
217
|
@apply bg-transparent;
|
|
230
218
|
}
|
|
@@ -238,3 +226,62 @@
|
|
|
238
226
|
.number-field__group--full-width {
|
|
239
227
|
@apply w-full;
|
|
240
228
|
}
|
|
229
|
+
|
|
230
|
+
/* ==========================================================================
|
|
231
|
+
Size variants
|
|
232
|
+
========================================================================== */
|
|
233
|
+
|
|
234
|
+
/* The stepper column stays 4px wider than the field is tall, as it is at `md`. */
|
|
235
|
+
.number-field--sm {
|
|
236
|
+
.number-field__group {
|
|
237
|
+
@apply h-8;
|
|
238
|
+
|
|
239
|
+
&:has([slot="decrement"]) {
|
|
240
|
+
grid-template-columns: 36px 1fr;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&:has([slot="increment"]) {
|
|
244
|
+
grid-template-columns: 1fr 36px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&:has([slot="decrement"]):has([slot="increment"]) {
|
|
248
|
+
grid-template-columns: 36px 1fr 36px;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.number-field__input {
|
|
253
|
+
@apply field-line-sm;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.number-field__increment-button,
|
|
257
|
+
.number-field__decrement-button {
|
|
258
|
+
@apply w-9;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.number-field--lg {
|
|
263
|
+
.number-field__group {
|
|
264
|
+
@apply h-10;
|
|
265
|
+
|
|
266
|
+
&:has([slot="decrement"]) {
|
|
267
|
+
grid-template-columns: 44px 1fr;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&:has([slot="increment"]) {
|
|
271
|
+
grid-template-columns: 1fr 44px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&:has([slot="decrement"]):has([slot="increment"]) {
|
|
275
|
+
grid-template-columns: 44px 1fr 44px;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.number-field__input {
|
|
280
|
+
@apply field-line-lg;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.number-field__increment-button,
|
|
284
|
+
.number-field__decrement-button {
|
|
285
|
+
@apply w-11;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
@@ -24,14 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
/* Link - page number button (ghost button style) */
|
|
26
26
|
.pagination__link {
|
|
27
|
-
@apply relative isolate inline-flex size-
|
|
27
|
+
@apply relative isolate inline-flex size-8 origin-center items-center justify-center rounded-component text-sm font-medium whitespace-nowrap outline-none select-none no-highlight;
|
|
28
28
|
|
|
29
29
|
cursor: var(--cursor-interactive);
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
* Transitions
|
|
33
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
34
|
-
*/
|
|
35
31
|
transition:
|
|
36
32
|
transform 250ms var(--ease-smooth),
|
|
37
33
|
background-color 100ms var(--ease-out),
|
|
@@ -88,7 +84,7 @@
|
|
|
88
84
|
|
|
89
85
|
/* Ellipsis */
|
|
90
86
|
.pagination__ellipsis {
|
|
91
|
-
@apply inline-flex size-
|
|
87
|
+
@apply inline-flex size-8 items-center justify-center text-sm text-muted select-none;
|
|
92
88
|
}
|
|
93
89
|
|
|
94
90
|
/* Navigation buttons (Previous / Next) */
|
|
@@ -107,7 +103,7 @@
|
|
|
107
103
|
|
|
108
104
|
.pagination--sm {
|
|
109
105
|
.pagination__link {
|
|
110
|
-
@apply size-
|
|
106
|
+
@apply size-7 text-xs;
|
|
111
107
|
|
|
112
108
|
&:active,
|
|
113
109
|
&[data-pressed="true"] {
|
|
@@ -120,7 +116,7 @@
|
|
|
120
116
|
}
|
|
121
117
|
|
|
122
118
|
.pagination__ellipsis {
|
|
123
|
-
@apply size-
|
|
119
|
+
@apply size-7 text-xs;
|
|
124
120
|
}
|
|
125
121
|
|
|
126
122
|
.pagination__summary {
|
|
@@ -134,7 +130,7 @@
|
|
|
134
130
|
|
|
135
131
|
.pagination--lg {
|
|
136
132
|
.pagination__link {
|
|
137
|
-
@apply size-
|
|
133
|
+
@apply size-9 text-base;
|
|
138
134
|
|
|
139
135
|
&:active,
|
|
140
136
|
&[data-pressed="true"] {
|
|
@@ -147,7 +143,7 @@
|
|
|
147
143
|
}
|
|
148
144
|
|
|
149
145
|
.pagination__ellipsis {
|
|
150
|
-
@apply size-
|
|
146
|
+
@apply size-9 text-base;
|
|
151
147
|
}
|
|
152
148
|
|
|
153
149
|
.pagination__summary {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* Base popover styles */
|
|
4
4
|
.popover {
|
|
5
5
|
@apply origin-(--trigger-anchor-point) bg-overlay p-0 text-sm;
|
|
6
|
-
border-radius: min(32px, var(--radius
|
|
6
|
+
border-radius: min(32px, var(--component-radius));
|
|
7
7
|
box-shadow: var(--shadow-overlay);
|
|
8
8
|
|
|
9
9
|
/* Entering animations */
|
|
@@ -43,6 +43,20 @@
|
|
|
43
43
|
fill: var(--overlay);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* With an arrow, the edge treatment moves off the body and onto the pair.
|
|
48
|
+
*
|
|
49
|
+
* The arrow is a second shape filled with the body's own colour, overlapping it so no seam can
|
|
50
|
+
* open between them — which leaves nothing for a per-shape edge to be right about: a shadow or
|
|
51
|
+
* hairline painted on the body alone stops at the join, and one painted on the arrow crosses
|
|
52
|
+
* it. `--overlay-edge` is a filter, and a filter sees the two shapes as one image, so whatever
|
|
53
|
+
* edge it draws follows their combined silhouette.
|
|
54
|
+
*/
|
|
55
|
+
&:has([data-slot="popover-overlay-arrow-group"]) {
|
|
56
|
+
box-shadow: none;
|
|
57
|
+
filter: var(--overlay-edge, none);
|
|
58
|
+
}
|
|
59
|
+
|
|
46
60
|
/* Arrow rotation based on placement */
|
|
47
61
|
&[data-placement="bottom"] [data-slot="popover-overlay-arrow"] {
|
|
48
62
|
rotate: 180deg;
|
|
@@ -71,10 +85,6 @@
|
|
|
71
85
|
.popover__trigger {
|
|
72
86
|
@apply inline-block;
|
|
73
87
|
|
|
74
|
-
/**
|
|
75
|
-
* Transitions
|
|
76
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
77
|
-
*/
|
|
78
88
|
transition:
|
|
79
89
|
color 150ms var(--ease-smooth),
|
|
80
90
|
background-color 150ms var(--ease-smooth),
|
|
@@ -17,6 +17,18 @@ export declare const progressBarVariants: import("tailwind-variants").TVReturnTy
|
|
|
17
17
|
base: string;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
isAnimated: {
|
|
21
|
+
false: {};
|
|
22
|
+
true: {
|
|
23
|
+
base: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
isStriped: {
|
|
27
|
+
false: {};
|
|
28
|
+
true: {
|
|
29
|
+
base: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
20
32
|
size: {
|
|
21
33
|
lg: {
|
|
22
34
|
base: string;
|
|
@@ -51,6 +63,18 @@ export declare const progressBarVariants: import("tailwind-variants").TVReturnTy
|
|
|
51
63
|
base: string;
|
|
52
64
|
};
|
|
53
65
|
};
|
|
66
|
+
isAnimated: {
|
|
67
|
+
false: {};
|
|
68
|
+
true: {
|
|
69
|
+
base: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
isStriped: {
|
|
73
|
+
false: {};
|
|
74
|
+
true: {
|
|
75
|
+
base: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
54
78
|
size: {
|
|
55
79
|
lg: {
|
|
56
80
|
base: string;
|
|
@@ -85,6 +109,18 @@ export declare const progressBarVariants: import("tailwind-variants").TVReturnTy
|
|
|
85
109
|
base: string;
|
|
86
110
|
};
|
|
87
111
|
};
|
|
112
|
+
isAnimated: {
|
|
113
|
+
false: {};
|
|
114
|
+
true: {
|
|
115
|
+
base: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
isStriped: {
|
|
119
|
+
false: {};
|
|
120
|
+
true: {
|
|
121
|
+
base: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
88
124
|
size: {
|
|
89
125
|
lg: {
|
|
90
126
|
base: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.styles.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,mBAAmB;;
|
|
1
|
+
{"version":3,"file":"progress-bar.styles.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,mBAAmB;;QAe1B,MAAM;YACJ,IAAI;;QAEN,MAAM;YACJ,IAAI;;QAEN,OAAO;YACL,IAAI;;QAEN,OAAO;YACL,IAAI;;QAEN,OAAO;YACL,IAAI;;;;QAIN,KAAK;QACL,IAAI;YACF,IAAI;;;;QAIN,KAAK;QACL,IAAI;YACF,IAAI;;;;QAIN,EAAE;YACA,IAAI;;QAEN,EAAE;YACA,IAAI;;QAEN,EAAE;YACA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIV,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -3,6 +3,8 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
const progressBarVariants = tv({
|
|
4
4
|
defaultVariants: {
|
|
5
5
|
color: "accent",
|
|
6
|
+
isAnimated: false,
|
|
7
|
+
isStriped: false,
|
|
6
8
|
size: "md"
|
|
7
9
|
},
|
|
8
10
|
slots: {
|
|
@@ -19,6 +21,14 @@ const progressBarVariants = tv({
|
|
|
19
21
|
success: { base: "progress-bar--success" },
|
|
20
22
|
warning: { base: "progress-bar--warning" }
|
|
21
23
|
},
|
|
24
|
+
isAnimated: {
|
|
25
|
+
false: {},
|
|
26
|
+
true: { base: "progress-bar--animated" }
|
|
27
|
+
},
|
|
28
|
+
isStriped: {
|
|
29
|
+
false: {},
|
|
30
|
+
true: { base: "progress-bar--striped" }
|
|
31
|
+
},
|
|
22
32
|
size: {
|
|
23
33
|
lg: { base: "progress-bar--lg" },
|
|
24
34
|
md: { base: "progress-bar--md" },
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
/* Default color token (accent) */
|
|
14
14
|
--progress-bar-fill: var(--accent);
|
|
15
15
|
|
|
16
|
+
/* Derived from the fill rather than declared per colour: mixing toward the track's own colour
|
|
17
|
+
* lands lighter in the light theme and darker in the dark one, so the band separates whichever
|
|
18
|
+
* side of the fill it falls on. */
|
|
19
|
+
--progress-bar-stripe: color-mix(in oklab, var(--progress-bar-fill) 80%, var(--default));
|
|
20
|
+
--progress-bar-stripe-size: 1rem;
|
|
21
|
+
|
|
16
22
|
[data-slot="label"] {
|
|
17
23
|
@apply w-fit text-sm font-medium;
|
|
18
24
|
|
|
@@ -26,7 +32,9 @@
|
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
.progress-bar__track {
|
|
29
|
-
@apply relative overflow-hidden
|
|
35
|
+
@apply relative overflow-hidden bg-default;
|
|
36
|
+
|
|
37
|
+
border-radius: min(32px, var(--component-radius));
|
|
30
38
|
|
|
31
39
|
grid-area: track;
|
|
32
40
|
|
|
@@ -43,7 +51,9 @@
|
|
|
43
51
|
}
|
|
44
52
|
|
|
45
53
|
.progress-bar__fill {
|
|
46
|
-
@apply absolute start-0 top-0 h-full
|
|
54
|
+
@apply absolute start-0 top-0 h-full;
|
|
55
|
+
|
|
56
|
+
border-radius: min(32px, var(--component-radius));
|
|
47
57
|
|
|
48
58
|
background-color: var(--progress-bar-fill);
|
|
49
59
|
|
|
@@ -51,10 +61,6 @@
|
|
|
51
61
|
background-color: Highlight;
|
|
52
62
|
}
|
|
53
63
|
|
|
54
|
-
/**
|
|
55
|
-
* Transitions
|
|
56
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
57
|
-
*/
|
|
58
64
|
transition: width 300ms var(--ease-out);
|
|
59
65
|
@apply motion-reduce:transition-none;
|
|
60
66
|
}
|
|
@@ -100,12 +106,12 @@
|
|
|
100
106
|
========================================================================== */
|
|
101
107
|
|
|
102
108
|
.progress-bar--sm {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
109
|
+
/* One 1rem tile spans more than the track is tall, so a 4px bar would show a single smear
|
|
110
|
+
* rather than a run of stripes. The tile tracks the height instead. */
|
|
111
|
+
--progress-bar-stripe-size: 0.5rem;
|
|
106
112
|
|
|
107
|
-
.progress-
|
|
108
|
-
@apply
|
|
113
|
+
.progress-bar__track {
|
|
114
|
+
@apply h-1;
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
|
|
@@ -114,12 +120,10 @@
|
|
|
114
120
|
}
|
|
115
121
|
|
|
116
122
|
.progress-bar--lg {
|
|
117
|
-
|
|
118
|
-
@apply h-3 rounded-md;
|
|
119
|
-
}
|
|
123
|
+
--progress-bar-stripe-size: 1.25rem;
|
|
120
124
|
|
|
121
|
-
.progress-
|
|
122
|
-
@apply
|
|
125
|
+
.progress-bar__track {
|
|
126
|
+
@apply h-3;
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
129
|
|
|
@@ -146,3 +150,65 @@
|
|
|
146
150
|
.progress-bar--danger {
|
|
147
151
|
--progress-bar-fill: var(--danger);
|
|
148
152
|
}
|
|
153
|
+
|
|
154
|
+
/* ==========================================================================
|
|
155
|
+
Stripes
|
|
156
|
+
|
|
157
|
+
The band paints on the fill's `::after`, not on the fill. `animation` on the fill itself is
|
|
158
|
+
already spoken for by the indeterminate slide, at a specificity a modifier class does not
|
|
159
|
+
reach, so a band put there would be the one that loses. On a box of its own it composes with
|
|
160
|
+
the slide instead of trading places with it.
|
|
161
|
+
========================================================================== */
|
|
162
|
+
|
|
163
|
+
.progress-bar--striped,
|
|
164
|
+
.progress-bar--animated {
|
|
165
|
+
.progress-bar__fill::after {
|
|
166
|
+
@apply absolute inset-0 content-[''];
|
|
167
|
+
|
|
168
|
+
border-radius: inherit;
|
|
169
|
+
|
|
170
|
+
/* Tiled by `background-size` rather than repeated by the gradient, so one tile is exactly the
|
|
171
|
+
* distance the animation travels and the loop closes without a seam. */
|
|
172
|
+
background-image: linear-gradient(
|
|
173
|
+
45deg,
|
|
174
|
+
var(--progress-bar-stripe) 25%,
|
|
175
|
+
transparent 25% 50%,
|
|
176
|
+
var(--progress-bar-stripe) 50% 75%,
|
|
177
|
+
transparent 75%
|
|
178
|
+
);
|
|
179
|
+
background-size: var(--progress-bar-stripe-size) var(--progress-bar-stripe-size);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Forced colors flattens the fill to `Highlight` and leaves this `background-image` painting over
|
|
183
|
+
* it in author colours. */
|
|
184
|
+
@media (forced-colors: active) {
|
|
185
|
+
.progress-bar__fill::after {
|
|
186
|
+
content: none;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.progress-bar--animated {
|
|
192
|
+
.progress-bar__fill {
|
|
193
|
+
/* On the host, not inside the `::after` block: the variant carries its own `::before`/`::after`
|
|
194
|
+
* slot, and written under the pseudo-element instead its ancestor condition would land after
|
|
195
|
+
* the pseudo-element and compile to an empty `:is()`. Stopped this way the band stays put
|
|
196
|
+
* rather than disappearing, which is `--striped`. */
|
|
197
|
+
@apply motion-reduce:animate-none;
|
|
198
|
+
|
|
199
|
+
&::after {
|
|
200
|
+
animation: progress-bar-stripes 1s linear infinite;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Travelling toward the inline end is what reads as progress; in RTL that is the other way. */
|
|
204
|
+
&:dir(rtl)::after {
|
|
205
|
+
animation-direction: reverse;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@keyframes progress-bar-stripes {
|
|
211
|
+
to {
|
|
212
|
+
background-position-x: var(--progress-bar-stripe-size);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -54,10 +54,6 @@
|
|
|
54
54
|
.radio__control {
|
|
55
55
|
@apply relative inline-flex size-4 shrink-0 items-center justify-center rounded-lg border [border-width:var(--border-width-field)] border-field-border bg-field shadow-field outline-none no-highlight;
|
|
56
56
|
|
|
57
|
-
/**
|
|
58
|
-
* Transitions
|
|
59
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
60
|
-
*/
|
|
61
57
|
transition:
|
|
62
58
|
background-color 200ms var(--ease-out),
|
|
63
59
|
border-color 200ms var(--ease-out),
|
|
@@ -134,6 +130,13 @@
|
|
|
134
130
|
@apply absolute inset-0 flex items-center justify-center;
|
|
135
131
|
|
|
136
132
|
pointer-events: none;
|
|
133
|
+
|
|
134
|
+
/* On the indicator, not in `:empty::before` where the transition lives: the variant reaches a
|
|
135
|
+
* pseudo-element from its originating element, and appending its condition after `::before`
|
|
136
|
+
* matches nothing. `:empty` because without it this ties with that rule and loses on order. */
|
|
137
|
+
&:empty {
|
|
138
|
+
@apply motion-reduce:transition-none;
|
|
139
|
+
}
|
|
137
140
|
}
|
|
138
141
|
|
|
139
142
|
/* :empty pseudo-class ensures these styles only apply when the indicator has no custom children
|
|
@@ -146,14 +149,9 @@
|
|
|
146
149
|
height: 100%;
|
|
147
150
|
scale: 1;
|
|
148
151
|
|
|
149
|
-
/**
|
|
150
|
-
* Transitions
|
|
151
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
152
|
-
*/
|
|
153
152
|
transition:
|
|
154
153
|
scale 200ms var(--ease-out),
|
|
155
154
|
background-color 200ms var(--ease-out);
|
|
156
|
-
@apply motion-reduce:transition-none;
|
|
157
155
|
}
|
|
158
156
|
|
|
159
157
|
/* Selected state */
|