@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
|
@@ -116,13 +116,22 @@
|
|
|
116
116
|
* Year Cell
|
|
117
117
|
* -------------------------------------------------------------------------- */
|
|
118
118
|
.calendar-year-picker__year-cell {
|
|
119
|
-
@apply relative inline-flex h-8 items-center justify-center rounded-
|
|
119
|
+
@apply relative inline-flex h-8 items-center justify-center rounded-component px-2.5 text-sm font-medium outline-none select-none no-highlight;
|
|
120
120
|
touch-action: manipulation;
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
/* The fill and label, per state — selected and hovered land together on the current year. */
|
|
123
|
+
--calendar-year-picker-year-cell-bg: transparent;
|
|
124
|
+
--calendar-year-picker-year-cell-bg-hover: var(--state-layer);
|
|
125
|
+
--calendar-year-picker-year-cell-bg-selected: var(--accent);
|
|
126
|
+
--calendar-year-picker-year-cell-bg-selected-hover: var(--accent-hover);
|
|
127
|
+
--calendar-year-picker-year-cell-fg: currentcolor;
|
|
128
|
+
--calendar-year-picker-year-cell-fg-hover: var(--default-foreground);
|
|
129
|
+
--calendar-year-picker-year-cell-fg-selected: var(--accent-foreground);
|
|
130
|
+
|
|
131
|
+
background-color: var(--calendar-year-picker-year-cell-bg);
|
|
132
|
+
color: var(--calendar-year-picker-year-cell-fg);
|
|
133
|
+
|
|
134
|
+
/* Same as `.tag`. */
|
|
126
135
|
transition:
|
|
127
136
|
color 100ms var(--ease-smooth),
|
|
128
137
|
scale 100ms var(--ease-smooth),
|
|
@@ -136,19 +145,22 @@
|
|
|
136
145
|
/* Hover state (when not selected) – only on devices that support hover */
|
|
137
146
|
@media (hover: hover) and (pointer: fine) {
|
|
138
147
|
&:is(:hover, [data-hovered="true"]):not([data-selected="true"]) {
|
|
139
|
-
|
|
148
|
+
background-color: var(--calendar-year-picker-year-cell-bg-hover);
|
|
149
|
+
color: var(--calendar-year-picker-year-cell-fg-hover);
|
|
140
150
|
}
|
|
141
151
|
}
|
|
142
152
|
|
|
143
153
|
/* Selected state (current year) – same as .tag[data-selected] */
|
|
144
154
|
&[data-selected="true"],
|
|
145
155
|
&[aria-selected="true"] {
|
|
146
|
-
|
|
156
|
+
background-color: var(--calendar-year-picker-year-cell-bg-selected);
|
|
157
|
+
color: var(--calendar-year-picker-year-cell-fg-selected);
|
|
158
|
+
|
|
147
159
|
@apply forced-selected;
|
|
148
160
|
|
|
149
161
|
@media (hover: hover) and (pointer: fine) {
|
|
150
162
|
&:is(:hover, [data-hovered="true"]) {
|
|
151
|
-
|
|
163
|
+
background-color: var(--calendar-year-picker-year-cell-bg-selected-hover);
|
|
152
164
|
}
|
|
153
165
|
}
|
|
154
166
|
}
|
|
@@ -80,14 +80,12 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.calendar__nav-button {
|
|
83
|
-
@apply flex size-6 items-center justify-center
|
|
83
|
+
@apply flex size-6 items-center justify-center text-accent-soft-foreground;
|
|
84
|
+
|
|
85
|
+
border-radius: min(32px, var(--component-radius));
|
|
84
86
|
|
|
85
87
|
will-change: scale;
|
|
86
88
|
|
|
87
|
-
/**
|
|
88
|
-
* Transitions
|
|
89
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
90
|
-
*/
|
|
91
89
|
transition:
|
|
92
90
|
transform 250ms var(--ease-out),
|
|
93
91
|
background-color 100ms var(--ease-out),
|
|
@@ -101,7 +99,7 @@
|
|
|
101
99
|
@media (hover: hover) {
|
|
102
100
|
&:hover,
|
|
103
101
|
&[data-hovered="true"] {
|
|
104
|
-
@apply bg-
|
|
102
|
+
@apply bg-state-layer;
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
105
|
|
|
@@ -183,13 +181,30 @@
|
|
|
183
181
|
* -------------------------------------------------------------------------- */
|
|
184
182
|
.calendar__cell {
|
|
185
183
|
/* Cell (td) wrapper styles - margins now work with grid layout */
|
|
186
|
-
@apply relative flex aspect-square size-full items-center justify-center
|
|
184
|
+
@apply relative flex aspect-square size-full items-center justify-center text-center text-sm font-medium outline-none no-highlight;
|
|
185
|
+
|
|
186
|
+
border-radius: min(32px, var(--component-radius));
|
|
187
|
+
|
|
188
|
+
/* Eight states repaint a day, several of them in pairs — today and hovered, selected and
|
|
189
|
+
* pressed, selected and outside the month. One declaration cannot tell them apart, so each
|
|
190
|
+
* reads its own. */
|
|
191
|
+
--calendar-cell-bg: transparent;
|
|
192
|
+
--calendar-cell-bg-hover: var(--state-layer);
|
|
193
|
+
--calendar-cell-bg-pressed: var(--calendar-cell-bg-hover);
|
|
194
|
+
--calendar-cell-bg-today: var(--accent-soft);
|
|
195
|
+
--calendar-cell-bg-today-hover: var(--accent-soft-hover);
|
|
196
|
+
--calendar-cell-bg-selected: var(--accent);
|
|
197
|
+
--calendar-cell-bg-selected-pressed: var(--accent-hover);
|
|
198
|
+
--calendar-cell-bg-selected-outside-month: var(--state-layer);
|
|
199
|
+
--calendar-cell-fg: currentcolor;
|
|
200
|
+
--calendar-cell-fg-today: var(--accent-soft-foreground);
|
|
201
|
+
--calendar-cell-fg-selected: var(--accent-foreground);
|
|
202
|
+
--calendar-cell-fg-outside-month: var(--muted);
|
|
203
|
+
|
|
204
|
+
background-color: var(--calendar-cell-bg);
|
|
205
|
+
color: var(--calendar-cell-fg);
|
|
187
206
|
|
|
188
207
|
will-change: scale;
|
|
189
|
-
/**
|
|
190
|
-
* Transitions
|
|
191
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
192
|
-
*/
|
|
193
208
|
transition:
|
|
194
209
|
transform 250ms var(--ease-out),
|
|
195
210
|
box-shadow 100ms var(--ease-out);
|
|
@@ -205,7 +220,8 @@
|
|
|
205
220
|
|
|
206
221
|
/* Today indicator */
|
|
207
222
|
&[data-today="true"] {
|
|
208
|
-
|
|
223
|
+
background-color: var(--calendar-cell-bg-today);
|
|
224
|
+
color: var(--calendar-cell-fg-today);
|
|
209
225
|
|
|
210
226
|
/* A tinted background is all that marks today, and forced colors flattens it onto the page.
|
|
211
227
|
* An edge rather than a fill, so today still reads as itself once it is also selected. */
|
|
@@ -217,25 +233,27 @@
|
|
|
217
233
|
@media (hover: hover) {
|
|
218
234
|
&:hover:not([data-selected="true"]),
|
|
219
235
|
&[data-hovered="true"]:not([data-selected="true"]) {
|
|
220
|
-
|
|
236
|
+
background-color: var(--calendar-cell-bg-today-hover);
|
|
221
237
|
}
|
|
222
238
|
}
|
|
223
239
|
}
|
|
224
240
|
|
|
225
241
|
/* Selected state */
|
|
226
242
|
&[data-selected="true"] {
|
|
227
|
-
|
|
243
|
+
background-color: var(--calendar-cell-bg-selected);
|
|
244
|
+
color: var(--calendar-cell-fg-selected);
|
|
245
|
+
|
|
228
246
|
@apply forced-selected;
|
|
229
247
|
}
|
|
230
248
|
|
|
231
249
|
/* Pressed state */
|
|
232
250
|
&:active,
|
|
233
251
|
&[data-pressed="true"] {
|
|
234
|
-
|
|
252
|
+
background-color: var(--calendar-cell-bg-pressed);
|
|
235
253
|
transform: scale(0.95);
|
|
236
254
|
|
|
237
255
|
&[data-selected="true"] {
|
|
238
|
-
|
|
256
|
+
background-color: var(--calendar-cell-bg-selected-pressed);
|
|
239
257
|
}
|
|
240
258
|
}
|
|
241
259
|
|
|
@@ -243,17 +261,19 @@
|
|
|
243
261
|
@media (hover: hover) {
|
|
244
262
|
&:hover:not([data-selected="true"]),
|
|
245
263
|
&[data-hovered="true"]:not([data-selected="true"]) {
|
|
246
|
-
|
|
264
|
+
background-color: var(--calendar-cell-bg-hover);
|
|
247
265
|
}
|
|
248
266
|
}
|
|
249
267
|
|
|
250
268
|
/* Outside month (previous/next month days) */
|
|
251
269
|
&[data-outside-month="true"] {
|
|
252
|
-
@apply
|
|
270
|
+
@apply opacity-50;
|
|
271
|
+
|
|
272
|
+
color: var(--calendar-cell-fg-outside-month);
|
|
253
273
|
}
|
|
254
274
|
|
|
255
275
|
&[data-selected="true"][data-outside-month="true"] {
|
|
256
|
-
|
|
276
|
+
background-color: var(--calendar-cell-bg-selected-outside-month);
|
|
257
277
|
}
|
|
258
278
|
|
|
259
279
|
/* Unavailable dates */
|
|
@@ -272,10 +292,15 @@
|
|
|
272
292
|
|
|
273
293
|
/* Cell indicator - small dot at bottom center of cell */
|
|
274
294
|
.calendar__cell-indicator {
|
|
275
|
-
@apply absolute bottom-1 left-1/2 size-[3px] -translate-x-1/2 rounded-xs
|
|
295
|
+
@apply absolute bottom-1 left-1/2 size-[3px] -translate-x-1/2 rounded-xs;
|
|
296
|
+
|
|
297
|
+
--calendar-cell-indicator-bg: var(--muted);
|
|
298
|
+
--calendar-cell-indicator-bg-selected: var(--accent-foreground);
|
|
299
|
+
|
|
300
|
+
background-color: var(--calendar-cell-indicator-bg);
|
|
276
301
|
|
|
277
302
|
/* Indicator color changes when cell is selected */
|
|
278
303
|
[data-selected="true"] > & {
|
|
279
|
-
|
|
304
|
+
background-color: var(--calendar-cell-indicator-bg-selected);
|
|
280
305
|
}
|
|
281
306
|
}
|
package/dist/components/card.css
CHANGED
|
@@ -41,7 +41,9 @@
|
|
|
41
41
|
|
|
42
42
|
/* Checkmark SVG indicator */
|
|
43
43
|
[data-slot="checkbox-default-indicator--checkmark"] {
|
|
44
|
-
@apply size-2.5 stroke-[2.5px]
|
|
44
|
+
@apply size-2.5 stroke-[2.5px];
|
|
45
|
+
|
|
46
|
+
color: var(--checkbox-control-fg-checked);
|
|
45
47
|
|
|
46
48
|
/**
|
|
47
49
|
* Transitions
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
&[data-invalid="true"][aria-checked="true"] [data-slot="checkbox-default-indicator--checkmark"],
|
|
59
61
|
&[aria-invalid="true"][data-selected="true"] [data-slot="checkbox-default-indicator--checkmark"],
|
|
60
62
|
&[aria-invalid="true"][aria-checked="true"] [data-slot="checkbox-default-indicator--checkmark"] {
|
|
61
|
-
|
|
63
|
+
color: var(--checkbox-control-fg-invalid);
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
/* Indeterminate line indicator */
|
|
@@ -73,7 +75,7 @@
|
|
|
73
75
|
[data-slot="checkbox-default-indicator--indeterminate"],
|
|
74
76
|
&[data-indeterminate="true"][aria-invalid="true"]
|
|
75
77
|
[data-slot="checkbox-default-indicator--indeterminate"] {
|
|
76
|
-
|
|
78
|
+
color: var(--checkbox-control-fg-invalid);
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
|
|
@@ -82,12 +84,32 @@
|
|
|
82
84
|
========================================================================== */
|
|
83
85
|
|
|
84
86
|
.checkbox__control {
|
|
85
|
-
@apply relative inline-flex size-4 shrink-0 items-center justify-center overflow-hidden
|
|
87
|
+
@apply relative inline-flex size-4 shrink-0 items-center justify-center overflow-hidden border [border-width:var(--border-width-field)] shadow-field outline-none no-highlight;
|
|
88
|
+
|
|
89
|
+
/* The cap is what keeps the box reading square at 16px: the field radius is set for a 36px
|
|
90
|
+
* control, and worn whole here it looks twice as round as the field beside it. */
|
|
91
|
+
border-radius: min(var(--field-radius, calc(var(--radius) * 0.75)), 25%);
|
|
92
|
+
|
|
93
|
+
/* Four things carry state here: the box's fill and edge, the glyph inside it, and the `::before`
|
|
94
|
+
* that scales in behind the glyph. Checked and indeterminate share a colour, as do the two
|
|
95
|
+
* invalid pairings, so each is named for what it means rather than for every combination.
|
|
96
|
+
* `--secondary` re-points the fill and nothing else. */
|
|
97
|
+
--checkbox-control-bg: var(--field-background, var(--default));
|
|
98
|
+
--checkbox-control-bg-checked: var(--accent);
|
|
99
|
+
--checkbox-control-bg-checked-pressed: var(--accent-hover);
|
|
100
|
+
--checkbox-control-bg-invalid: var(--danger);
|
|
101
|
+
--checkbox-control-border: var(--field-border, var(--border));
|
|
102
|
+
--checkbox-control-border-hover: var(--field-border-hover);
|
|
103
|
+
--checkbox-control-border-checked: transparent;
|
|
104
|
+
--checkbox-control-fg-checked: var(--accent-foreground);
|
|
105
|
+
--checkbox-control-fg-invalid: var(--danger-foreground);
|
|
106
|
+
--checkbox-control-fill: var(--accent);
|
|
107
|
+
--checkbox-control-fill-hover: var(--accent-hover);
|
|
108
|
+
--checkbox-control-fill-invalid: var(--danger);
|
|
109
|
+
|
|
110
|
+
background-color: var(--checkbox-control-bg);
|
|
111
|
+
border-color: var(--checkbox-control-border);
|
|
86
112
|
|
|
87
|
-
/**
|
|
88
|
-
* Transitions
|
|
89
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
90
|
-
*/
|
|
91
113
|
transition:
|
|
92
114
|
background-color 200ms var(--ease-out),
|
|
93
115
|
border-color 200ms var(--ease-out),
|
|
@@ -98,17 +120,16 @@
|
|
|
98
120
|
|
|
99
121
|
/* Background indicator pseudo-element */
|
|
100
122
|
&::before {
|
|
101
|
-
@apply pointer-events-none absolute inset-0 z-0 origin-center scale-70
|
|
123
|
+
@apply pointer-events-none absolute inset-0 z-0 origin-center scale-70 opacity-0 content-[''];
|
|
124
|
+
|
|
125
|
+
border-radius: inherit;
|
|
126
|
+
|
|
127
|
+
background-color: var(--checkbox-control-fill);
|
|
102
128
|
|
|
103
|
-
/**
|
|
104
|
-
* Transitions
|
|
105
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
106
|
-
*/
|
|
107
129
|
transition:
|
|
108
130
|
scale 100ms var(--ease-linear),
|
|
109
131
|
opacity 200ms var(--ease-linear),
|
|
110
132
|
background-color 200ms var(--ease-out);
|
|
111
|
-
@apply motion-reduce:transition-none;
|
|
112
133
|
}
|
|
113
134
|
|
|
114
135
|
/* Interactive states */
|
|
@@ -123,10 +144,10 @@
|
|
|
123
144
|
.checkbox:hover &,
|
|
124
145
|
.checkbox:has([data-slot="checkbox-content"][data-hovered="true"]) &,
|
|
125
146
|
.checkbox [data-slot="checkbox-content"][data-hovered="true"] & {
|
|
126
|
-
|
|
147
|
+
border-color: var(--checkbox-control-border-hover);
|
|
127
148
|
|
|
128
149
|
&::before {
|
|
129
|
-
|
|
150
|
+
background-color: var(--checkbox-control-fill-hover);
|
|
130
151
|
}
|
|
131
152
|
}
|
|
132
153
|
|
|
@@ -140,7 +161,8 @@
|
|
|
140
161
|
/* Selected */
|
|
141
162
|
.checkbox[aria-checked="true"] &,
|
|
142
163
|
.checkbox[data-selected="true"] & {
|
|
143
|
-
|
|
164
|
+
border-color: var(--checkbox-control-border-checked);
|
|
165
|
+
color: var(--checkbox-control-fg-checked);
|
|
144
166
|
|
|
145
167
|
&::before {
|
|
146
168
|
@apply scale-100 opacity-100;
|
|
@@ -149,14 +171,15 @@
|
|
|
149
171
|
|
|
150
172
|
/* Indeterminate */
|
|
151
173
|
.checkbox[data-indeterminate="true"] & {
|
|
152
|
-
|
|
174
|
+
background-color: var(--checkbox-control-bg-checked);
|
|
175
|
+
color: var(--checkbox-control-fg-checked);
|
|
153
176
|
}
|
|
154
177
|
|
|
155
178
|
/* Indeterminate + Pressed */
|
|
156
179
|
.checkbox:active[data-indeterminate="true"] &,
|
|
157
180
|
.checkbox[data-pressed="true"][data-indeterminate="true"] &,
|
|
158
181
|
.checkbox:has([data-slot="checkbox-content"][data-pressed="true"])[data-indeterminate="true"] & {
|
|
159
|
-
|
|
182
|
+
background-color: var(--checkbox-control-bg-checked-pressed);
|
|
160
183
|
}
|
|
161
184
|
|
|
162
185
|
/* Validation states */
|
|
@@ -177,17 +200,22 @@
|
|
|
177
200
|
.checkbox[data-invalid="true"][data-selected="true"] &,
|
|
178
201
|
.checkbox[aria-invalid="true"][aria-checked="true"] &,
|
|
179
202
|
.checkbox[aria-invalid="true"][data-selected="true"] & {
|
|
180
|
-
|
|
203
|
+
background-color: var(--checkbox-control-bg-invalid);
|
|
204
|
+
border-color: var(--checkbox-control-border-checked);
|
|
205
|
+
color: var(--checkbox-control-fg-invalid);
|
|
181
206
|
|
|
182
207
|
&::before {
|
|
183
|
-
@apply scale-100
|
|
208
|
+
@apply scale-100 opacity-100;
|
|
209
|
+
|
|
210
|
+
background-color: var(--checkbox-control-fill-invalid);
|
|
184
211
|
}
|
|
185
212
|
}
|
|
186
213
|
|
|
187
214
|
/* Invalid + Indeterminate */
|
|
188
215
|
.checkbox[data-indeterminate="true"][aria-invalid="true"] &,
|
|
189
216
|
.checkbox[data-indeterminate="true"][data-invalid="true"] & {
|
|
190
|
-
|
|
217
|
+
background-color: var(--checkbox-control-bg-invalid);
|
|
218
|
+
color: var(--checkbox-control-fg-invalid);
|
|
191
219
|
}
|
|
192
220
|
}
|
|
193
221
|
|
|
@@ -221,44 +249,14 @@
|
|
|
221
249
|
|
|
222
250
|
.checkbox--secondary .checkbox__control {
|
|
223
251
|
@apply shadow-none;
|
|
224
|
-
background-color: var(--checkbox-control-bg);
|
|
225
252
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
.checkbox:has([data-slot="checkbox-content"][data-hovered="true"]) &,
|
|
231
|
-
.checkbox [data-slot="checkbox-content"][data-hovered="true"] & {
|
|
232
|
-
@apply border-field-border-hover;
|
|
233
|
-
}
|
|
253
|
+
/* No border and no shadow leave the fill as the only thing drawing this box, so a flat neutral
|
|
254
|
+
* erases it against any surface of the same lightness — a hovered table row is exactly that.
|
|
255
|
+
* The state layer is an alpha, so it keeps its step over whatever it lands on. */
|
|
256
|
+
--checkbox-control-bg: var(--state-layer);
|
|
234
257
|
}
|
|
235
258
|
|
|
236
259
|
/* Checkbox content — the clickable label (control + label text) */
|
|
237
260
|
.checkbox__content {
|
|
238
261
|
@apply relative inline-flex cursor-[inherit] items-center gap-3 text-sm font-medium text-foreground outline-none select-none no-highlight;
|
|
239
262
|
}
|
|
240
|
-
|
|
241
|
-
/* Unselected state background for secondary variant */
|
|
242
|
-
.checkbox--secondary:not([aria-checked="true"]):not([data-selected="true"]):not(
|
|
243
|
-
[data-indeterminate="true"]
|
|
244
|
-
)
|
|
245
|
-
.checkbox__control {
|
|
246
|
-
background-color: var(--checkbox-control-bg);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* Selected state on secondary variant */
|
|
250
|
-
.checkbox--secondary[aria-checked="true"] .checkbox__control,
|
|
251
|
-
.checkbox--secondary[data-selected="true"] .checkbox__control {
|
|
252
|
-
&::before {
|
|
253
|
-
@apply bg-accent;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/* Indeterminate state on secondary variant */
|
|
258
|
-
.checkbox--secondary[data-indeterminate="true"] .checkbox__control {
|
|
259
|
-
@apply bg-accent;
|
|
260
|
-
|
|
261
|
-
&::before {
|
|
262
|
-
@apply bg-accent;
|
|
263
|
-
}
|
|
264
|
-
}
|
package/dist/components/chip.css
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* Base styles */
|
|
2
2
|
.chip {
|
|
3
|
-
@apply inline-flex w-fit shrink-0 items-center gap-0.5
|
|
3
|
+
@apply inline-flex w-fit shrink-0 items-center gap-0.5 px-2 py-0.5 text-xs leading-5 font-medium;
|
|
4
|
+
|
|
5
|
+
border-radius: min(32px, var(--component-radius));
|
|
4
6
|
|
|
5
7
|
/* Default tokens */
|
|
6
8
|
--chip-bg: var(--default);
|
|
@@ -7,10 +7,6 @@
|
|
|
7
7
|
/* Cursor */
|
|
8
8
|
cursor: var(--cursor-interactive);
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Transitions
|
|
12
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
13
|
-
*/
|
|
14
10
|
transition:
|
|
15
11
|
transform 250ms var(--ease-out-quart),
|
|
16
12
|
color 150ms var(--ease-out),
|
|
@@ -45,7 +41,12 @@
|
|
|
45
41
|
|
|
46
42
|
/* Variants */
|
|
47
43
|
.close-button--default {
|
|
48
|
-
@apply
|
|
44
|
+
@apply text-muted;
|
|
45
|
+
|
|
46
|
+
--close-button-bg: var(--default);
|
|
47
|
+
--close-button-bg-hover: var(--default-hover);
|
|
48
|
+
|
|
49
|
+
background-color: var(--close-button-bg);
|
|
49
50
|
|
|
50
51
|
/* Forced Colors Mode flattens the fill onto the page and strips the shadow, leaving a control
|
|
51
52
|
* with nothing to say it is one. `ButtonBorder` is the keyword the platform uses for a
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
@media (hover: hover) {
|
|
63
64
|
&:hover,
|
|
64
65
|
&[data-hovered="true"] {
|
|
65
|
-
|
|
66
|
+
background-color: var(--close-button-bg-hover);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
/* Base styles */
|
|
6
6
|
.color-area {
|
|
7
|
-
@apply relative w-full max-w-56 shrink-0
|
|
7
|
+
@apply relative w-full max-w-56 shrink-0 no-highlight;
|
|
8
|
+
|
|
9
|
+
border-radius: min(32px, var(--component-radius));
|
|
8
10
|
|
|
9
11
|
/* Square aspect ratio */
|
|
10
12
|
aspect-ratio: 1 / 1;
|
|
@@ -41,7 +43,9 @@
|
|
|
41
43
|
========================================================================== */
|
|
42
44
|
|
|
43
45
|
.color-area__thumb {
|
|
44
|
-
@apply size-4
|
|
46
|
+
@apply size-4 will-change-[width,height];
|
|
47
|
+
|
|
48
|
+
border-radius: min(32px, var(--component-radius));
|
|
45
49
|
|
|
46
50
|
/* Current color from React Aria */
|
|
47
51
|
background-color: var(--color-area-thumb-color);
|
|
@@ -54,10 +58,6 @@
|
|
|
54
58
|
0 0 0 1px rgba(0, 0, 0, 0.1),
|
|
55
59
|
inset 0 0 0 1px rgba(0, 0, 0, 0.1);
|
|
56
60
|
|
|
57
|
-
/**
|
|
58
|
-
* Transitions
|
|
59
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
60
|
-
*/
|
|
61
61
|
transition:
|
|
62
62
|
width 150ms var(--ease-out),
|
|
63
63
|
height 150ms var(--ease-out);
|
|
@@ -6,6 +6,15 @@ export declare const colorInputGroupVariants: import("tailwind-variants").TVRetu
|
|
|
6
6
|
base: string;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
+
size: {
|
|
10
|
+
lg: {
|
|
11
|
+
base: string;
|
|
12
|
+
};
|
|
13
|
+
md: {};
|
|
14
|
+
sm: {
|
|
15
|
+
base: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
9
18
|
variant: {
|
|
10
19
|
primary: {
|
|
11
20
|
base: string;
|
|
@@ -26,6 +35,15 @@ export declare const colorInputGroupVariants: import("tailwind-variants").TVRetu
|
|
|
26
35
|
base: string;
|
|
27
36
|
};
|
|
28
37
|
};
|
|
38
|
+
size: {
|
|
39
|
+
lg: {
|
|
40
|
+
base: string;
|
|
41
|
+
};
|
|
42
|
+
md: {};
|
|
43
|
+
sm: {
|
|
44
|
+
base: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
29
47
|
variant: {
|
|
30
48
|
primary: {
|
|
31
49
|
base: string;
|
|
@@ -46,6 +64,15 @@ export declare const colorInputGroupVariants: import("tailwind-variants").TVRetu
|
|
|
46
64
|
base: string;
|
|
47
65
|
};
|
|
48
66
|
};
|
|
67
|
+
size: {
|
|
68
|
+
lg: {
|
|
69
|
+
base: string;
|
|
70
|
+
};
|
|
71
|
+
md: {};
|
|
72
|
+
sm: {
|
|
73
|
+
base: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
49
76
|
variant: {
|
|
50
77
|
primary: {
|
|
51
78
|
base: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-input-group.styles.d.ts","sourceRoot":"","sources":["../../../src/components/color-input-group/color-input-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,uBAAuB;;
|
|
1
|
+
{"version":3,"file":"color-input-group.styles.d.ts","sourceRoot":"","sources":["../../../src/components/color-input-group/color-input-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,uBAAuB;;QAc9B,KAAK;QACL,IAAI;YACF,IAAI;;;;QAIN,EAAE;YACA,IAAI;;QAEN,EAAE;QACF,EAAE;YACA,IAAI;;;;QAIN,OAAO;YACL,IAAI;;QAEN,SAAS;YACP,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIV,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
const colorInputGroupVariants = tv({
|
|
4
4
|
defaultVariants: {
|
|
5
5
|
fullWidth: false,
|
|
6
|
+
size: "md",
|
|
6
7
|
variant: "primary"
|
|
7
8
|
},
|
|
8
9
|
slots: {
|
|
@@ -16,6 +17,11 @@ const colorInputGroupVariants = tv({
|
|
|
16
17
|
false: {},
|
|
17
18
|
true: { base: "color-input-group--full-width" }
|
|
18
19
|
},
|
|
20
|
+
size: {
|
|
21
|
+
lg: { base: "color-input-group--lg" },
|
|
22
|
+
md: {},
|
|
23
|
+
sm: { base: "color-input-group--sm" }
|
|
24
|
+
},
|
|
19
25
|
variant: {
|
|
20
26
|
primary: { base: "color-input-group--primary" },
|
|
21
27
|
secondary: { base: "color-input-group--secondary" }
|
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
/* Base styles */
|
|
6
6
|
.color-input-group {
|
|
7
|
-
@apply inline-flex h-9 items-center overflow-hidden rounded-field border
|
|
7
|
+
@apply inline-flex h-9 items-center overflow-hidden rounded-field border text-sm text-field-foreground shadow-field outline-none;
|
|
8
|
+
|
|
9
|
+
/* The fill, per state. The `--secondary` variant re-points these and declares nothing else. */
|
|
10
|
+
--color-input-group-bg: var(--field-background, var(--default));
|
|
11
|
+
--color-input-group-bg-hover: var(--field-hover);
|
|
12
|
+
--color-input-group-bg-focus: var(--field-focus);
|
|
13
|
+
|
|
14
|
+
background-color: var(--color-input-group-bg);
|
|
8
15
|
border-width: var(--border-width-field);
|
|
9
16
|
border-color: var(--field-border);
|
|
10
17
|
|
|
@@ -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),
|
|
@@ -31,7 +34,7 @@
|
|
|
31
34
|
@media (hover: hover) {
|
|
32
35
|
&:hover:not(:focus-within),
|
|
33
36
|
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
34
|
-
|
|
37
|
+
background-color: var(--color-input-group-bg-hover);
|
|
35
38
|
border-color: var(--field-border-hover);
|
|
36
39
|
}
|
|
37
40
|
}
|
|
@@ -45,7 +48,7 @@
|
|
|
45
48
|
/* Invalid state */
|
|
46
49
|
&[data-invalid="true"] {
|
|
47
50
|
@apply status-invalid-field;
|
|
48
|
-
background-color: var(--
|
|
51
|
+
background-color: var(--color-input-group-bg-focus);
|
|
49
52
|
border-color: var(--color-field-border-invalid);
|
|
50
53
|
}
|
|
51
54
|
|
|
@@ -61,7 +64,7 @@
|
|
|
61
64
|
========================================================================== */
|
|
62
65
|
|
|
63
66
|
.color-input-group__input {
|
|
64
|
-
@apply flex h-full flex-1 cursor-text items-center rounded-none border-0 bg-transparent px-3
|
|
67
|
+
@apply flex h-full flex-1 cursor-text items-center rounded-none border-0 bg-transparent px-3 field-line-md shadow-none outline-none;
|
|
65
68
|
|
|
66
69
|
/* Placeholder styling */
|
|
67
70
|
&::placeholder {
|
|
@@ -105,31 +108,11 @@
|
|
|
105
108
|
|
|
106
109
|
.color-input-group--secondary {
|
|
107
110
|
@apply shadow-none;
|
|
108
|
-
background-color: var(--color-input-group-bg);
|
|
109
111
|
|
|
110
112
|
--color-input-group-bg: var(--default);
|
|
111
113
|
--color-input-group-bg-hover: var(--default-hover);
|
|
112
114
|
--color-input-group-bg-focus: var(--default);
|
|
113
115
|
|
|
114
|
-
@media (hover: hover) {
|
|
115
|
-
&:hover:not(:focus-within),
|
|
116
|
-
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
117
|
-
background-color: var(--color-input-group-bg-hover);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&:focus-within,
|
|
122
|
-
&[data-focus-within="true"] {
|
|
123
|
-
background-color: var(--color-input-group-bg-focus);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/* Invalid state */
|
|
127
|
-
&[data-invalid="true"] {
|
|
128
|
-
@apply status-invalid-field;
|
|
129
|
-
border-color: var(--color-field-border-invalid);
|
|
130
|
-
background-color: var(--color-input-group-bg-focus);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
116
|
[data-slot="color-input-group-input"] {
|
|
134
117
|
@apply bg-transparent;
|
|
135
118
|
}
|
|
@@ -142,3 +125,23 @@
|
|
|
142
125
|
.color-input-group--full-width {
|
|
143
126
|
@apply w-full;
|
|
144
127
|
}
|
|
128
|
+
|
|
129
|
+
/* ==========================================================================
|
|
130
|
+
Size variants
|
|
131
|
+
========================================================================== */
|
|
132
|
+
|
|
133
|
+
.color-input-group--sm {
|
|
134
|
+
@apply h-8;
|
|
135
|
+
|
|
136
|
+
.color-input-group__input {
|
|
137
|
+
@apply field-line-sm;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.color-input-group--lg {
|
|
142
|
+
@apply h-10;
|
|
143
|
+
|
|
144
|
+
.color-input-group__input {
|
|
145
|
+
@apply field-line-lg;
|
|
146
|
+
}
|
|
147
|
+
}
|