@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
|
@@ -80,14 +80,12 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.range-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
|
|
|
@@ -182,14 +180,35 @@
|
|
|
182
180
|
* RangeCalendar Cells
|
|
183
181
|
* -------------------------------------------------------------------------- */
|
|
184
182
|
.range-calendar__cell {
|
|
185
|
-
@apply relative z-1 mx-0 my-[2px]
|
|
183
|
+
@apply relative z-1 mx-0 my-[2px] p-0 outline-none;
|
|
184
|
+
|
|
185
|
+
--range-calendar-day-radius: min(32px, var(--component-radius));
|
|
186
|
+
--range-calendar-wrap-radius: calc(var(--range-calendar-day-radius) / 3);
|
|
187
|
+
|
|
188
|
+
border-radius: var(--range-calendar-day-radius);
|
|
186
189
|
cursor: var(--cursor-interactive);
|
|
187
190
|
|
|
191
|
+
/* The range track paints on the cell and the day paints on the button inside it, so both sets
|
|
192
|
+
* are declared here and the button reads them by inheritance. A cap is a day at either end of
|
|
193
|
+
* the range; several states land in pairs, and one declaration cannot tell them apart. */
|
|
194
|
+
--range-calendar-cell-bg: transparent;
|
|
195
|
+
--range-calendar-cell-bg-selected: var(--accent-soft);
|
|
196
|
+
--range-calendar-cell-bg-selected-outside-month: color-mix(
|
|
197
|
+
in oklab,
|
|
198
|
+
var(--state-layer) 20%,
|
|
199
|
+
transparent
|
|
200
|
+
);
|
|
201
|
+
--range-calendar-day-bg-hover: var(--state-layer);
|
|
202
|
+
--range-calendar-day-bg-today: var(--accent-soft);
|
|
203
|
+
--range-calendar-day-bg-today-hover: var(--accent-soft-hover);
|
|
204
|
+
--range-calendar-day-bg-cap: var(--accent);
|
|
205
|
+
--range-calendar-day-bg-cap-pressed: var(--accent-hover);
|
|
206
|
+
--range-calendar-day-fg-today: var(--accent-soft-foreground);
|
|
207
|
+
--range-calendar-day-fg-cap: var(--accent-foreground);
|
|
208
|
+
|
|
209
|
+
background-color: var(--range-calendar-cell-bg);
|
|
210
|
+
|
|
188
211
|
will-change: background-color, border-color;
|
|
189
|
-
/**
|
|
190
|
-
* Transitions
|
|
191
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
192
|
-
*/
|
|
193
212
|
transition:
|
|
194
213
|
box-shadow 100ms var(--ease-out),
|
|
195
214
|
border-color 100ms var(--ease-out);
|
|
@@ -197,7 +216,9 @@
|
|
|
197
216
|
|
|
198
217
|
/* Inner interactive circle/capsule (equivalent to React Aria "button-base") */
|
|
199
218
|
.range-calendar__cell-button {
|
|
200
|
-
@apply flex aspect-square w-full items-center justify-center
|
|
219
|
+
@apply flex aspect-square w-full items-center justify-center text-sm font-medium text-foreground no-highlight;
|
|
220
|
+
|
|
221
|
+
border-radius: var(--range-calendar-day-radius);
|
|
201
222
|
|
|
202
223
|
will-change: scale;
|
|
203
224
|
transition: scale 200ms var(--ease-out);
|
|
@@ -217,7 +238,8 @@
|
|
|
217
238
|
/* Today indicator */
|
|
218
239
|
&[data-today="true"] {
|
|
219
240
|
.range-calendar__cell-button {
|
|
220
|
-
|
|
241
|
+
background-color: var(--range-calendar-day-bg-today);
|
|
242
|
+
color: var(--range-calendar-day-fg-today);
|
|
221
243
|
|
|
222
244
|
/* An edge rather than a fill, so today still reads as itself once it is also in range */
|
|
223
245
|
@media (forced-colors: active) {
|
|
@@ -230,7 +252,7 @@
|
|
|
230
252
|
&:hover:not([data-selected="true"]),
|
|
231
253
|
&[data-hovered="true"]:not([data-selected="true"]) {
|
|
232
254
|
.range-calendar__cell-button {
|
|
233
|
-
|
|
255
|
+
background-color: var(--range-calendar-day-bg-today-hover);
|
|
234
256
|
}
|
|
235
257
|
}
|
|
236
258
|
}
|
|
@@ -238,7 +260,9 @@
|
|
|
238
260
|
|
|
239
261
|
/* Range selected track (middle segment) */
|
|
240
262
|
&[data-selected="true"]:not([data-outside-month="true"]) {
|
|
241
|
-
@apply rounded-none
|
|
263
|
+
@apply rounded-none;
|
|
264
|
+
|
|
265
|
+
background-color: var(--range-calendar-cell-bg-selected);
|
|
242
266
|
|
|
243
267
|
/* The track is a background and nothing else, so Forced Colors Mode flattens it into the
|
|
244
268
|
* page and the range stops being visible. The day button declares its own `color`, so
|
|
@@ -257,16 +281,22 @@
|
|
|
257
281
|
|
|
258
282
|
/* Round row boundaries so the range track looks continuous across weeks */
|
|
259
283
|
&[data-selected="true"]:is(td:first-child > *, [aria-disabled] + td > *) {
|
|
260
|
-
|
|
284
|
+
border-start-start-radius: var(--range-calendar-wrap-radius);
|
|
285
|
+
border-end-start-radius: var(--range-calendar-wrap-radius);
|
|
286
|
+
|
|
261
287
|
&[data-selection-start="true"] {
|
|
262
|
-
|
|
288
|
+
border-start-start-radius: var(--range-calendar-day-radius);
|
|
289
|
+
border-end-start-radius: var(--range-calendar-day-radius);
|
|
263
290
|
}
|
|
264
291
|
}
|
|
265
292
|
|
|
266
293
|
&[data-selected="true"]:is(td:last-child > *, td:has(+ [aria-disabled]) > *) {
|
|
267
|
-
|
|
294
|
+
border-start-end-radius: var(--range-calendar-wrap-radius);
|
|
295
|
+
border-end-end-radius: var(--range-calendar-wrap-radius);
|
|
296
|
+
|
|
268
297
|
&[data-selection-end="true"] {
|
|
269
|
-
|
|
298
|
+
border-start-end-radius: var(--range-calendar-day-radius);
|
|
299
|
+
border-end-end-radius: var(--range-calendar-day-radius);
|
|
270
300
|
}
|
|
271
301
|
}
|
|
272
302
|
|
|
@@ -276,7 +306,8 @@
|
|
|
276
306
|
@apply z-2;
|
|
277
307
|
|
|
278
308
|
.range-calendar__cell-button {
|
|
279
|
-
|
|
309
|
+
background-color: var(--range-calendar-day-bg-cap);
|
|
310
|
+
color: var(--range-calendar-day-fg-cap);
|
|
280
311
|
|
|
281
312
|
/* Caps read the same as the track here. Forced colors offers one selection colour, and
|
|
282
313
|
* spending it on the shape that matters - the range - beats splitting it. */
|
|
@@ -293,11 +324,13 @@
|
|
|
293
324
|
} */
|
|
294
325
|
|
|
295
326
|
&[data-selection-start="true"]:not([data-outside-month="true"]) {
|
|
296
|
-
|
|
327
|
+
border-start-start-radius: var(--range-calendar-day-radius);
|
|
328
|
+
border-end-start-radius: var(--range-calendar-day-radius);
|
|
297
329
|
}
|
|
298
330
|
|
|
299
331
|
&[data-selection-end="true"]:not([data-outside-month="true"]) {
|
|
300
|
-
|
|
332
|
+
border-start-end-radius: var(--range-calendar-day-radius);
|
|
333
|
+
border-end-end-radius: var(--range-calendar-day-radius);
|
|
301
334
|
}
|
|
302
335
|
|
|
303
336
|
/* Pressed state */
|
|
@@ -310,7 +343,7 @@
|
|
|
310
343
|
&[data-selection-start="true"],
|
|
311
344
|
&[data-selection-end="true"] {
|
|
312
345
|
.range-calendar__cell-button {
|
|
313
|
-
|
|
346
|
+
background-color: var(--range-calendar-day-bg-cap-pressed);
|
|
314
347
|
}
|
|
315
348
|
}
|
|
316
349
|
}
|
|
@@ -320,7 +353,7 @@
|
|
|
320
353
|
&:hover:not([data-selected="true"]),
|
|
321
354
|
&[data-hovered="true"]:not([data-selected="true"]) {
|
|
322
355
|
.range-calendar__cell-button {
|
|
323
|
-
|
|
356
|
+
background-color: var(--range-calendar-day-bg-hover);
|
|
324
357
|
}
|
|
325
358
|
}
|
|
326
359
|
}
|
|
@@ -334,7 +367,7 @@
|
|
|
334
367
|
[data-selection-start="true"],
|
|
335
368
|
[data-selection-end="true"]
|
|
336
369
|
) {
|
|
337
|
-
|
|
370
|
+
background-color: var(--range-calendar-cell-bg-selected-outside-month);
|
|
338
371
|
}
|
|
339
372
|
|
|
340
373
|
/* Unavailable dates */
|
|
@@ -356,11 +389,13 @@
|
|
|
356
389
|
td:has(> .range-calendar__cell[data-outside-month="true"])
|
|
357
390
|
+ td
|
|
358
391
|
> .range-calendar__cell[data-selected="true"] {
|
|
359
|
-
|
|
392
|
+
border-start-start-radius: var(--range-calendar-wrap-radius);
|
|
393
|
+
border-end-start-radius: var(--range-calendar-wrap-radius);
|
|
360
394
|
|
|
361
395
|
&[data-outside-month="true"],
|
|
362
396
|
&[data-selection-start="true"] {
|
|
363
|
-
|
|
397
|
+
border-start-start-radius: var(--range-calendar-day-radius);
|
|
398
|
+
border-end-start-radius: var(--range-calendar-day-radius);
|
|
364
399
|
}
|
|
365
400
|
}
|
|
366
401
|
|
|
@@ -370,20 +405,27 @@
|
|
|
370
405
|
+ td > .range-calendar__cell[data-outside-month="true"]
|
|
371
406
|
)
|
|
372
407
|
> .range-calendar__cell[data-selected="true"] {
|
|
373
|
-
|
|
408
|
+
border-start-end-radius: var(--range-calendar-wrap-radius);
|
|
409
|
+
border-end-end-radius: var(--range-calendar-wrap-radius);
|
|
374
410
|
|
|
375
411
|
&[data-outside-month="true"],
|
|
376
412
|
&[data-selection-end="true"] {
|
|
377
|
-
|
|
413
|
+
border-start-end-radius: var(--range-calendar-day-radius);
|
|
414
|
+
border-end-end-radius: var(--range-calendar-day-radius);
|
|
378
415
|
}
|
|
379
416
|
}
|
|
380
417
|
|
|
381
418
|
/* Cell indicator - small dot at bottom center of cell */
|
|
382
419
|
.range-calendar__cell-indicator {
|
|
383
|
-
@apply absolute bottom-1 left-1/2 size-[3px] -translate-x-1/2 rounded-xs
|
|
420
|
+
@apply absolute bottom-1 left-1/2 size-[3px] -translate-x-1/2 rounded-xs;
|
|
421
|
+
|
|
422
|
+
--range-calendar-cell-indicator-bg: var(--muted);
|
|
423
|
+
--range-calendar-cell-indicator-bg-selected: var(--accent-foreground);
|
|
424
|
+
|
|
425
|
+
background-color: var(--range-calendar-cell-indicator-bg);
|
|
384
426
|
|
|
385
427
|
/* Indicator color changes when cell is selected */
|
|
386
428
|
[data-selected="true"] > & {
|
|
387
|
-
|
|
429
|
+
background-color: var(--range-calendar-cell-indicator-bg-selected);
|
|
388
430
|
}
|
|
389
431
|
}
|
|
@@ -7,6 +7,15 @@ export declare const searchFieldVariants: import("tailwind-variants").TVReturnTy
|
|
|
7
7
|
group: string;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
+
size: {
|
|
11
|
+
lg: {
|
|
12
|
+
base: string;
|
|
13
|
+
};
|
|
14
|
+
md: {};
|
|
15
|
+
sm: {
|
|
16
|
+
base: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
10
19
|
variant: {
|
|
11
20
|
primary: {
|
|
12
21
|
base: string;
|
|
@@ -29,6 +38,15 @@ export declare const searchFieldVariants: import("tailwind-variants").TVReturnTy
|
|
|
29
38
|
group: string;
|
|
30
39
|
};
|
|
31
40
|
};
|
|
41
|
+
size: {
|
|
42
|
+
lg: {
|
|
43
|
+
base: string;
|
|
44
|
+
};
|
|
45
|
+
md: {};
|
|
46
|
+
sm: {
|
|
47
|
+
base: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
32
50
|
variant: {
|
|
33
51
|
primary: {
|
|
34
52
|
base: string;
|
|
@@ -51,6 +69,15 @@ export declare const searchFieldVariants: import("tailwind-variants").TVReturnTy
|
|
|
51
69
|
group: string;
|
|
52
70
|
};
|
|
53
71
|
};
|
|
72
|
+
size: {
|
|
73
|
+
lg: {
|
|
74
|
+
base: string;
|
|
75
|
+
};
|
|
76
|
+
md: {};
|
|
77
|
+
sm: {
|
|
78
|
+
base: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
54
81
|
variant: {
|
|
55
82
|
primary: {
|
|
56
83
|
base: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-field.styles.d.ts","sourceRoot":"","sources":["../../../src/components/search-field/search-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,mBAAmB;;
|
|
1
|
+
{"version":3,"file":"search-field.styles.d.ts","sourceRoot":"","sources":["../../../src/components/search-field/search-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,mBAAmB;;QAe1B,KAAK;QACL,IAAI;YACF,IAAI;YACJ,KAAK;;;;QAIP,EAAE;YACA,IAAI;;QAEN,EAAE;QACF,EAAE;YACA,IAAI;;;;QAIN,OAAO;YACL,IAAI;;QAEN,SAAS;YACP,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIV,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
const searchFieldVariants = tv({
|
|
4
4
|
defaultVariants: {
|
|
5
5
|
fullWidth: false,
|
|
6
|
+
size: "md",
|
|
6
7
|
variant: "primary"
|
|
7
8
|
},
|
|
8
9
|
slots: {
|
|
@@ -20,6 +21,11 @@ const searchFieldVariants = tv({
|
|
|
20
21
|
group: "search-field__group--full-width"
|
|
21
22
|
}
|
|
22
23
|
},
|
|
24
|
+
size: {
|
|
25
|
+
lg: { base: "search-field--lg" },
|
|
26
|
+
md: {},
|
|
27
|
+
sm: { base: "search-field--sm" }
|
|
28
|
+
},
|
|
23
29
|
variant: {
|
|
24
30
|
primary: { base: "search-field--primary" },
|
|
25
31
|
secondary: { base: "search-field--secondary" }
|
|
@@ -21,7 +21,14 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.search-field__group {
|
|
24
|
-
@apply relative inline-flex h-9 items-center overflow-hidden rounded-field border
|
|
24
|
+
@apply relative inline-flex h-9 items-center overflow-hidden rounded-field border text-sm text-field-foreground shadow-field outline-none;
|
|
25
|
+
|
|
26
|
+
/* The fill, per state. The `--secondary` variant re-points these and declares nothing else. */
|
|
27
|
+
--search-field-group-bg: var(--field-background, var(--default));
|
|
28
|
+
--search-field-group-bg-hover: var(--field-hover);
|
|
29
|
+
--search-field-group-bg-focus: var(--field-focus);
|
|
30
|
+
|
|
31
|
+
background-color: var(--search-field-group-bg);
|
|
25
32
|
border-width: var(--border-width-field);
|
|
26
33
|
border-color: var(--field-border);
|
|
27
34
|
|
|
@@ -33,10 +40,6 @@
|
|
|
33
40
|
outline-offset: -1px;
|
|
34
41
|
}
|
|
35
42
|
|
|
36
|
-
/**
|
|
37
|
-
* Transitions
|
|
38
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
39
|
-
*/
|
|
40
43
|
transition:
|
|
41
44
|
background-color 150ms var(--ease-smooth),
|
|
42
45
|
border-color 150ms var(--ease-smooth),
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
@media (hover: hover) {
|
|
48
51
|
&:hover:not(:focus-within),
|
|
49
52
|
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
50
|
-
|
|
53
|
+
background-color: var(--search-field-group-bg-hover);
|
|
51
54
|
border-color: var(--field-border-hover);
|
|
52
55
|
}
|
|
53
56
|
}
|
|
@@ -61,7 +64,7 @@
|
|
|
61
64
|
/* Invalid state */
|
|
62
65
|
&[data-invalid="true"] {
|
|
63
66
|
@apply status-invalid-field;
|
|
64
|
-
background-color: var(--field-focus);
|
|
67
|
+
background-color: var(--search-field-group-bg-focus);
|
|
65
68
|
border-color: var(--color-field-border-invalid);
|
|
66
69
|
}
|
|
67
70
|
|
|
@@ -82,13 +85,13 @@
|
|
|
82
85
|
*/
|
|
83
86
|
&:has([data-slot="search-field-input"]:-webkit-autofill),
|
|
84
87
|
&:has([data-slot="search-field-input"]:autofill) {
|
|
85
|
-
background-color: var(--field-focus);
|
|
88
|
+
background-color: var(--search-field-group-bg-focus);
|
|
86
89
|
border-color: var(--field-border-focus);
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
.search-field__input {
|
|
91
|
-
@apply flex-1 rounded-none border-0 bg-transparent px-3
|
|
94
|
+
@apply flex-1 rounded-none border-0 bg-transparent px-3 field-line-md shadow-none outline-none;
|
|
92
95
|
|
|
93
96
|
/* Hide browser default search clear button */
|
|
94
97
|
&::-webkit-search-cancel-button,
|
|
@@ -154,31 +157,11 @@
|
|
|
154
157
|
|
|
155
158
|
.search-field--secondary .search-field__group {
|
|
156
159
|
@apply shadow-none;
|
|
157
|
-
background-color: var(--search-field-group-bg);
|
|
158
160
|
|
|
159
161
|
--search-field-group-bg: var(--default);
|
|
160
162
|
--search-field-group-bg-hover: var(--default-hover);
|
|
161
163
|
--search-field-group-bg-focus: var(--default);
|
|
162
164
|
|
|
163
|
-
@media (hover: hover) {
|
|
164
|
-
&:hover:not(:focus-within),
|
|
165
|
-
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
166
|
-
background-color: var(--search-field-group-bg-hover);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
&:focus-within,
|
|
171
|
-
&[data-focus-within="true"] {
|
|
172
|
-
background-color: var(--search-field-group-bg-focus);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Invalid state */
|
|
176
|
-
&[data-invalid="true"] {
|
|
177
|
-
@apply status-invalid-field;
|
|
178
|
-
border-color: var(--color-field-border-invalid);
|
|
179
|
-
background-color: var(--search-field-group-bg-focus);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
165
|
[data-slot="search-field-input"] {
|
|
183
166
|
@apply bg-transparent;
|
|
184
167
|
}
|
|
@@ -192,3 +175,27 @@
|
|
|
192
175
|
.search-field__group--full-width {
|
|
193
176
|
@apply w-full;
|
|
194
177
|
}
|
|
178
|
+
|
|
179
|
+
/* ==========================================================================
|
|
180
|
+
Size variants
|
|
181
|
+
========================================================================== */
|
|
182
|
+
|
|
183
|
+
.search-field--sm {
|
|
184
|
+
.search-field__group {
|
|
185
|
+
@apply h-8;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.search-field__input {
|
|
189
|
+
@apply field-line-sm;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.search-field--lg {
|
|
194
|
+
.search-field__group {
|
|
195
|
+
@apply h-10;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.search-field__input {
|
|
199
|
+
@apply field-line-lg;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/segmented-control/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const segmentedControlVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
fullWidth: {
|
|
4
|
+
false: {};
|
|
5
|
+
true: {
|
|
6
|
+
base: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
size: {
|
|
10
|
+
lg: {
|
|
11
|
+
base: string;
|
|
12
|
+
};
|
|
13
|
+
md: {
|
|
14
|
+
base: string;
|
|
15
|
+
};
|
|
16
|
+
sm: {
|
|
17
|
+
base: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
base: string;
|
|
22
|
+
indicator: string;
|
|
23
|
+
item: string;
|
|
24
|
+
separator: string;
|
|
25
|
+
}, undefined, {
|
|
26
|
+
fullWidth: {
|
|
27
|
+
false: {};
|
|
28
|
+
true: {
|
|
29
|
+
base: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
size: {
|
|
33
|
+
lg: {
|
|
34
|
+
base: string;
|
|
35
|
+
};
|
|
36
|
+
md: {
|
|
37
|
+
base: string;
|
|
38
|
+
};
|
|
39
|
+
sm: {
|
|
40
|
+
base: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
base: string;
|
|
45
|
+
indicator: string;
|
|
46
|
+
item: string;
|
|
47
|
+
separator: string;
|
|
48
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
49
|
+
fullWidth: {
|
|
50
|
+
false: {};
|
|
51
|
+
true: {
|
|
52
|
+
base: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
size: {
|
|
56
|
+
lg: {
|
|
57
|
+
base: string;
|
|
58
|
+
};
|
|
59
|
+
md: {
|
|
60
|
+
base: string;
|
|
61
|
+
};
|
|
62
|
+
sm: {
|
|
63
|
+
base: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
base: string;
|
|
68
|
+
indicator: string;
|
|
69
|
+
item: string;
|
|
70
|
+
separator: string;
|
|
71
|
+
}>>;
|
|
72
|
+
export type SegmentedControlVariants = VariantProps<typeof segmentedControlVariants>;
|
|
73
|
+
//# sourceMappingURL=segmented-control.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.styles.d.ts","sourceRoot":"","sources":["../../../src/components/segmented-control/segmented-control.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,wBAAwB;;QAa/B,KAAK;QACL,IAAI;YACF,IAAI;;;;QAIN,EAAE;YACA,IAAI;;QAEN,EAAE;YACA,IAAI;;QAEN,EAAE;YACA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIV,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
//#region src/components/segmented-control/segmented-control.styles.ts
|
|
3
|
+
const segmentedControlVariants = tv({
|
|
4
|
+
defaultVariants: {
|
|
5
|
+
fullWidth: false,
|
|
6
|
+
size: "md"
|
|
7
|
+
},
|
|
8
|
+
slots: {
|
|
9
|
+
base: "segmented-control",
|
|
10
|
+
indicator: "segmented-control__indicator",
|
|
11
|
+
item: "segmented-control__item",
|
|
12
|
+
separator: "segmented-control__separator"
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
fullWidth: {
|
|
16
|
+
false: {},
|
|
17
|
+
true: { base: "segmented-control--full-width" }
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
lg: { base: "segmented-control--lg" },
|
|
21
|
+
md: { base: "segmented-control--md" },
|
|
22
|
+
sm: { base: "segmented-control--sm" }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { segmentedControlVariants };
|