@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
|
@@ -17,10 +17,6 @@
|
|
|
17
17
|
/* Cursor */
|
|
18
18
|
cursor: var(--cursor-interactive);
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* Transitions
|
|
22
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
23
|
-
*/
|
|
24
20
|
transition:
|
|
25
21
|
background-color 150ms var(--ease-smooth),
|
|
26
22
|
box-shadow 150ms var(--ease-out);
|
|
@@ -51,7 +47,7 @@
|
|
|
51
47
|
.color-picker__popover {
|
|
52
48
|
@apply min-w-62 origin-(--trigger-anchor-point) scrollbar-none overflow-x-hidden overflow-y-auto overscroll-contain bg-overlay px-2 pt-2 pb-3;
|
|
53
49
|
box-shadow: var(--shadow-overlay);
|
|
54
|
-
border-radius: min(32px,
|
|
50
|
+
border-radius: min(32px, var(--component-radius));
|
|
55
51
|
/* Content layout */
|
|
56
52
|
@apply flex flex-col gap-3;
|
|
57
53
|
|
|
@@ -53,7 +53,9 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.color-slider__track {
|
|
56
|
-
@apply relative
|
|
56
|
+
@apply relative;
|
|
57
|
+
|
|
58
|
+
border-radius: min(32px, var(--component-radius));
|
|
57
59
|
|
|
58
60
|
grid-area: track;
|
|
59
61
|
/* Edge cap pseudo-elements */
|
|
@@ -68,7 +70,9 @@
|
|
|
68
70
|
|
|
69
71
|
.color-slider__thumb {
|
|
70
72
|
/* Flex container for centering */
|
|
71
|
-
@apply absolute flex cursor-grab items-center justify-center
|
|
73
|
+
@apply absolute flex cursor-grab items-center justify-center no-highlight;
|
|
74
|
+
|
|
75
|
+
border-radius: min(32px, var(--component-radius));
|
|
72
76
|
|
|
73
77
|
/* Border to create white ring around the thumb */
|
|
74
78
|
@apply border-3 border-white shadow-overlay;
|
|
@@ -76,10 +80,6 @@
|
|
|
76
80
|
/* Ensure thumb is above edge caps */
|
|
77
81
|
z-index: 1;
|
|
78
82
|
|
|
79
|
-
/**
|
|
80
|
-
* Transitions
|
|
81
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
82
|
-
*/
|
|
83
83
|
transition:
|
|
84
84
|
transform 250ms var(--ease-out),
|
|
85
85
|
box-shadow 150ms var(--ease-out);
|
|
@@ -133,7 +133,8 @@
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
&::before {
|
|
136
|
-
|
|
136
|
+
border-start-start-radius: min(32px, var(--component-radius));
|
|
137
|
+
border-end-start-radius: min(32px, var(--component-radius));
|
|
137
138
|
inset-inline-start: -0.625rem;
|
|
138
139
|
box-shadow:
|
|
139
140
|
inset 1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
@@ -145,7 +146,8 @@
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
&::after {
|
|
148
|
-
|
|
149
|
+
border-start-end-radius: min(32px, var(--component-radius));
|
|
150
|
+
border-end-end-radius: min(32px, var(--component-radius));
|
|
149
151
|
inset-inline-end: -0.625rem;
|
|
150
152
|
box-shadow:
|
|
151
153
|
inset -1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
@@ -223,8 +225,8 @@
|
|
|
223
225
|
|
|
224
226
|
&::before {
|
|
225
227
|
bottom: -0.625rem;
|
|
226
|
-
border-end-start-radius:
|
|
227
|
-
border-end-end-radius:
|
|
228
|
+
border-end-start-radius: min(32px, var(--component-radius));
|
|
229
|
+
border-end-end-radius: min(32px, var(--component-radius));
|
|
228
230
|
/* Left, right, and bottom borders for bottom cap */
|
|
229
231
|
box-shadow:
|
|
230
232
|
inset 1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
@@ -237,8 +239,8 @@
|
|
|
237
239
|
|
|
238
240
|
&::after {
|
|
239
241
|
top: -0.625rem;
|
|
240
|
-
border-start-start-radius:
|
|
241
|
-
border-start-end-radius:
|
|
242
|
+
border-start-start-radius: min(32px, var(--component-radius));
|
|
243
|
+
border-start-end-radius: min(32px, var(--component-radius));
|
|
242
244
|
/* Left, right, and top borders for top cap */
|
|
243
245
|
box-shadow:
|
|
244
246
|
inset 1px 0 0 0 rgba(0, 0, 0, 0.1),
|
|
@@ -24,10 +24,6 @@
|
|
|
24
24
|
/* Cursor */
|
|
25
25
|
cursor: var(--cursor-interactive);
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* Transitions
|
|
29
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
30
|
-
*/
|
|
31
27
|
transition:
|
|
32
28
|
border-color 100ms var(--ease-out),
|
|
33
29
|
box-shadow 100ms var(--ease-out);
|
|
@@ -68,10 +64,6 @@
|
|
|
68
64
|
|
|
69
65
|
/* Inherit border-radius from item */
|
|
70
66
|
border-radius: inherit;
|
|
71
|
-
/**
|
|
72
|
-
* Transitions
|
|
73
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
74
|
-
*/
|
|
75
67
|
transition: transform 100ms var(--ease-out);
|
|
76
68
|
@apply transform-gpu motion-reduce:transition-none;
|
|
77
69
|
|
|
@@ -170,81 +162,6 @@
|
|
|
170
162
|
}
|
|
171
163
|
|
|
172
164
|
/* Square variant */
|
|
173
|
-
.color-swatch-picker--square {
|
|
174
|
-
|
|
175
|
-
@apply rounded-xl;
|
|
176
|
-
.color-swatch-picker__swatch {
|
|
177
|
-
@apply rounded-lg;
|
|
178
|
-
}
|
|
179
|
-
&[data-selected="true"] {
|
|
180
|
-
.color-swatch-picker__swatch {
|
|
181
|
-
@apply rounded-lg;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/* Square variant - item radius for xs */
|
|
188
|
-
.color-swatch-picker--square.color-swatch-picker--xs {
|
|
189
|
-
.color-swatch-picker__item {
|
|
190
|
-
@apply rounded-md;
|
|
191
|
-
.color-swatch-picker__swatch {
|
|
192
|
-
@apply rounded-md;
|
|
193
|
-
}
|
|
194
|
-
&[data-selected="true"] {
|
|
195
|
-
.color-swatch-picker__swatch {
|
|
196
|
-
@apply rounded-md;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/* Square variant - item radius for sm */
|
|
203
|
-
.color-swatch-picker--square.color-swatch-picker--sm {
|
|
204
|
-
.color-swatch-picker__item {
|
|
205
|
-
@apply rounded-lg;
|
|
206
|
-
.color-swatch-picker__swatch {
|
|
207
|
-
@apply rounded-lg;
|
|
208
|
-
}
|
|
209
|
-
&[data-selected="true"] {
|
|
210
|
-
.color-swatch-picker__swatch {
|
|
211
|
-
@apply rounded-md;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/* Square variant - item radius for md (default) */
|
|
218
|
-
.color-swatch-picker--square.color-swatch-picker--md {
|
|
219
|
-
/* No styles as this is the default size */
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/* Square variant - item radius for lg */
|
|
223
|
-
.color-swatch-picker--square.color-swatch-picker--lg {
|
|
224
|
-
.color-swatch-picker__item {
|
|
225
|
-
@apply rounded-xl;
|
|
226
|
-
.color-swatch-picker__swatch {
|
|
227
|
-
@apply rounded-lg;
|
|
228
|
-
}
|
|
229
|
-
&[data-selected="true"] {
|
|
230
|
-
.color-swatch-picker__swatch {
|
|
231
|
-
@apply rounded-lg;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/* Square variant - item radius for xl */
|
|
238
|
-
.color-swatch-picker--square.color-swatch-picker--xl {
|
|
239
|
-
.color-swatch-picker__item {
|
|
240
|
-
@apply rounded-xl;
|
|
241
|
-
.color-swatch-picker__swatch {
|
|
242
|
-
@apply rounded-lg;
|
|
243
|
-
}
|
|
244
|
-
&[data-selected="true"] {
|
|
245
|
-
.color-swatch-picker__swatch {
|
|
246
|
-
@apply rounded-lg;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
165
|
+
.color-swatch-picker--square .color-swatch-picker__item {
|
|
166
|
+
border-radius: min(32px, var(--component-radius));
|
|
250
167
|
}
|
|
@@ -7,6 +7,15 @@ export declare const comboBoxVariants: import("tailwind-variants").TVReturnType<
|
|
|
7
7
|
inputGroup: string;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
+
size: {
|
|
11
|
+
lg: {
|
|
12
|
+
popover: string;
|
|
13
|
+
};
|
|
14
|
+
md: {};
|
|
15
|
+
sm: {
|
|
16
|
+
popover: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
10
19
|
}, {
|
|
11
20
|
base: string;
|
|
12
21
|
inputGroup: string;
|
|
@@ -21,6 +30,15 @@ export declare const comboBoxVariants: import("tailwind-variants").TVReturnType<
|
|
|
21
30
|
inputGroup: string;
|
|
22
31
|
};
|
|
23
32
|
};
|
|
33
|
+
size: {
|
|
34
|
+
lg: {
|
|
35
|
+
popover: string;
|
|
36
|
+
};
|
|
37
|
+
md: {};
|
|
38
|
+
sm: {
|
|
39
|
+
popover: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
24
42
|
}, {
|
|
25
43
|
base: string;
|
|
26
44
|
inputGroup: string;
|
|
@@ -35,6 +53,15 @@ export declare const comboBoxVariants: import("tailwind-variants").TVReturnType<
|
|
|
35
53
|
inputGroup: string;
|
|
36
54
|
};
|
|
37
55
|
};
|
|
56
|
+
size: {
|
|
57
|
+
lg: {
|
|
58
|
+
popover: string;
|
|
59
|
+
};
|
|
60
|
+
md: {};
|
|
61
|
+
sm: {
|
|
62
|
+
popover: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
38
65
|
}, {
|
|
39
66
|
base: string;
|
|
40
67
|
inputGroup: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combo-box.styles.d.ts","sourceRoot":"","sources":["../../../src/components/combo-box/combo-box.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"combo-box.styles.d.ts","sourceRoot":"","sources":["../../../src/components/combo-box/combo-box.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,gBAAgB;;QAcvB,KAAK;QACL,IAAI;YACF,IAAI;YACJ,UAAU;;;;QAMZ,EAAE;YACA,OAAO;;QAET,EAAE;QACF,EAAE;YACA,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIb,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { tv } from "tailwind-variants";
|
|
2
2
|
//#region src/components/combo-box/combo-box.styles.ts
|
|
3
3
|
const comboBoxVariants = tv({
|
|
4
|
-
defaultVariants: {
|
|
4
|
+
defaultVariants: {
|
|
5
|
+
fullWidth: false,
|
|
6
|
+
size: "md"
|
|
7
|
+
},
|
|
5
8
|
slots: {
|
|
6
9
|
base: "combo-box",
|
|
7
10
|
inputGroup: "combo-box__input-group",
|
|
@@ -9,13 +12,20 @@ const comboBoxVariants = tv({
|
|
|
9
12
|
trigger: "combo-box__trigger",
|
|
10
13
|
value: "combo-box__value"
|
|
11
14
|
},
|
|
12
|
-
variants: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
variants: {
|
|
16
|
+
fullWidth: {
|
|
17
|
+
false: {},
|
|
18
|
+
true: {
|
|
19
|
+
base: "combo-box--full-width",
|
|
20
|
+
inputGroup: "combo-box__input-group--full-width"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
lg: { popover: "combo-box__popover--lg" },
|
|
25
|
+
md: {},
|
|
26
|
+
sm: { popover: "combo-box__popover--sm" }
|
|
17
27
|
}
|
|
18
|
-
}
|
|
28
|
+
}
|
|
19
29
|
});
|
|
20
30
|
//#endregion
|
|
21
31
|
export { comboBoxVariants };
|
|
@@ -43,10 +43,15 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.combo-box__value {
|
|
46
|
-
@apply text-sm wrap-break-word
|
|
46
|
+
@apply text-sm wrap-break-word empty:hidden;
|
|
47
|
+
|
|
48
|
+
--combo-box-value-fg: var(--field-foreground, var(--foreground));
|
|
49
|
+
--combo-box-value-fg-placeholder: var(--field-placeholder, var(--muted));
|
|
50
|
+
|
|
51
|
+
color: var(--combo-box-value-fg);
|
|
47
52
|
|
|
48
53
|
&[data-placeholder="true"] {
|
|
49
|
-
|
|
54
|
+
color: var(--combo-box-value-fg-placeholder);
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
/* Removes the list-box-item indicator element from the combo-box value */
|
|
@@ -61,11 +66,16 @@
|
|
|
61
66
|
/* Remove default button styles */
|
|
62
67
|
@apply border-none bg-transparent outline-none;
|
|
63
68
|
|
|
69
|
+
--combo-box-trigger-fg: var(--field-placeholder, var(--muted));
|
|
70
|
+
--combo-box-trigger-fg-hover: var(--field-foreground, var(--foreground));
|
|
71
|
+
|
|
72
|
+
color: var(--combo-box-trigger-fg);
|
|
73
|
+
|
|
64
74
|
/* Hover state */
|
|
65
75
|
@media (hover: hover) {
|
|
66
76
|
&:hover,
|
|
67
77
|
&[data-hovered="true"] {
|
|
68
|
-
|
|
78
|
+
color: var(--combo-box-trigger-fg-hover);
|
|
69
79
|
}
|
|
70
80
|
}
|
|
71
81
|
|
|
@@ -100,7 +110,7 @@
|
|
|
100
110
|
/* Similar to popover content styles */
|
|
101
111
|
.combo-box__popover {
|
|
102
112
|
@apply min-w-(--trigger-width) origin-(--trigger-anchor-point) scroll-py-1 scrollbar overflow-y-auto overscroll-contain bg-overlay p-0 text-sm;
|
|
103
|
-
border-radius: min(32px, var(--radius
|
|
113
|
+
border-radius: min(32px, var(--component-radius));
|
|
104
114
|
box-shadow: var(--shadow-overlay);
|
|
105
115
|
|
|
106
116
|
/* Focus state */
|
|
@@ -174,6 +184,26 @@
|
|
|
174
184
|
}
|
|
175
185
|
}
|
|
176
186
|
|
|
187
|
+
/* ==========================================================================
|
|
188
|
+
Size variants
|
|
189
|
+
========================================================================== */
|
|
190
|
+
|
|
191
|
+
/* The input inside sizes itself from the context the root provides, so only the option rows are
|
|
192
|
+
* left - reached from the popover's own class, since it is teleported out of this tree. */
|
|
193
|
+
.combo-box__popover--sm {
|
|
194
|
+
[data-slot="list-box-item"] {
|
|
195
|
+
@apply min-h-8 py-1;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.combo-box__popover--lg {
|
|
200
|
+
@apply text-base;
|
|
201
|
+
|
|
202
|
+
[data-slot="list-box-item"] {
|
|
203
|
+
@apply min-h-10 py-2;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
177
207
|
/* Full width modifier */
|
|
178
208
|
.combo-box--full-width {
|
|
179
209
|
@apply w-full;
|
|
@@ -6,6 +6,15 @@ export declare const dateInputGroupVariants: import("tailwind-variants").TVRetur
|
|
|
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;
|
|
@@ -28,6 +37,15 @@ export declare const dateInputGroupVariants: import("tailwind-variants").TVRetur
|
|
|
28
37
|
base: string;
|
|
29
38
|
};
|
|
30
39
|
};
|
|
40
|
+
size: {
|
|
41
|
+
lg: {
|
|
42
|
+
base: string;
|
|
43
|
+
};
|
|
44
|
+
md: {};
|
|
45
|
+
sm: {
|
|
46
|
+
base: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
31
49
|
variant: {
|
|
32
50
|
primary: {
|
|
33
51
|
base: string;
|
|
@@ -50,6 +68,15 @@ export declare const dateInputGroupVariants: import("tailwind-variants").TVRetur
|
|
|
50
68
|
base: string;
|
|
51
69
|
};
|
|
52
70
|
};
|
|
71
|
+
size: {
|
|
72
|
+
lg: {
|
|
73
|
+
base: string;
|
|
74
|
+
};
|
|
75
|
+
md: {};
|
|
76
|
+
sm: {
|
|
77
|
+
base: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
53
80
|
variant: {
|
|
54
81
|
primary: {
|
|
55
82
|
base: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input-group.styles.d.ts","sourceRoot":"","sources":["../../../src/components/date-input-group/date-input-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,sBAAsB;;
|
|
1
|
+
{"version":3,"file":"date-input-group.styles.d.ts","sourceRoot":"","sources":["../../../src/components/date-input-group/date-input-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,sBAAsB;;QAgB7B,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,sBAAsB,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
const dateInputGroupVariants = tv({
|
|
4
4
|
defaultVariants: {
|
|
5
5
|
fullWidth: false,
|
|
6
|
+
size: "md",
|
|
6
7
|
variant: "primary"
|
|
7
8
|
},
|
|
8
9
|
slots: {
|
|
@@ -18,6 +19,11 @@ const dateInputGroupVariants = tv({
|
|
|
18
19
|
false: {},
|
|
19
20
|
true: { base: "date-input-group--full-width" }
|
|
20
21
|
},
|
|
22
|
+
size: {
|
|
23
|
+
lg: { base: "date-input-group--lg" },
|
|
24
|
+
md: {},
|
|
25
|
+
sm: { base: "date-input-group--sm" }
|
|
26
|
+
},
|
|
21
27
|
variant: {
|
|
22
28
|
primary: { base: "date-input-group--primary" },
|
|
23
29
|
secondary: { base: "date-input-group--secondary" }
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* Date input group styles */
|
|
2
2
|
.date-input-group {
|
|
3
|
-
@apply inline-flex h-9 items-center overflow-hidden rounded-field border
|
|
3
|
+
@apply inline-flex h-9 items-center overflow-hidden rounded-field border text-sm text-field-foreground shadow-field outline-none;
|
|
4
|
+
|
|
5
|
+
/* The fill, per state. The `--secondary` variant re-points these and declares nothing else. */
|
|
6
|
+
--date-input-group-bg: var(--field-background, var(--default));
|
|
7
|
+
--date-input-group-bg-hover: var(--field-hover);
|
|
8
|
+
--date-input-group-bg-focus: var(--field-focus);
|
|
9
|
+
|
|
10
|
+
background-color: var(--date-input-group-bg);
|
|
4
11
|
border-width: var(--border-width-field);
|
|
5
12
|
border-color: var(--field-border);
|
|
6
13
|
|
|
@@ -13,10 +20,6 @@
|
|
|
13
20
|
outline-offset: -1px;
|
|
14
21
|
}
|
|
15
22
|
|
|
16
|
-
/**
|
|
17
|
-
* Transitions
|
|
18
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
19
|
-
*/
|
|
20
23
|
transition:
|
|
21
24
|
background-color 150ms var(--ease-smooth),
|
|
22
25
|
border-color 150ms var(--ease-smooth),
|
|
@@ -27,7 +30,7 @@
|
|
|
27
30
|
@media (hover: hover) {
|
|
28
31
|
&:hover:not(:focus-within),
|
|
29
32
|
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
30
|
-
|
|
33
|
+
background-color: var(--date-input-group-bg-hover);
|
|
31
34
|
border-color: var(--field-border-hover);
|
|
32
35
|
}
|
|
33
36
|
}
|
|
@@ -55,7 +58,7 @@
|
|
|
55
58
|
/* Invalid state */
|
|
56
59
|
&[data-invalid="true"] {
|
|
57
60
|
@apply status-invalid-field;
|
|
58
|
-
background-color: var(--
|
|
61
|
+
background-color: var(--date-input-group-bg-focus);
|
|
59
62
|
border-color: var(--color-field-border-invalid);
|
|
60
63
|
}
|
|
61
64
|
|
|
@@ -67,7 +70,7 @@
|
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
.date-input-group__input {
|
|
70
|
-
@apply flex flex-1 cursor-text items-center gap-px rounded-none border-0 bg-transparent px-3
|
|
73
|
+
@apply flex flex-1 cursor-text items-center gap-px rounded-none border-0 bg-transparent px-3 field-line-md shadow-none outline-none;
|
|
71
74
|
|
|
72
75
|
/* Remove border radius on left side when prefix is present */
|
|
73
76
|
.date-input-group:has([data-slot="date-input-group-prefix"]) & {
|
|
@@ -105,20 +108,38 @@
|
|
|
105
108
|
.date-input-group__segment {
|
|
106
109
|
@apply inline-block rounded-md px-0.5 text-end text-nowrap outline-none;
|
|
107
110
|
|
|
111
|
+
/* The fill and the digits, per state. Five states repaint the text here, so a caller retuning
|
|
112
|
+
* any one of them from a single declaration would take the other four with it. */
|
|
113
|
+
--date-input-group-segment-bg: transparent;
|
|
114
|
+
--date-input-group-segment-bg-focused: var(--accent-soft);
|
|
115
|
+
--date-input-group-segment-bg-invalid-focused: var(--danger-soft);
|
|
116
|
+
--date-input-group-segment-fg: currentcolor;
|
|
117
|
+
--date-input-group-segment-fg-literal: var(--muted);
|
|
118
|
+
--date-input-group-segment-fg-placeholder: var(--field-placeholder, var(--muted));
|
|
119
|
+
--date-input-group-segment-fg-focused: var(--accent-soft-foreground);
|
|
120
|
+
--date-input-group-segment-fg-invalid: var(--danger);
|
|
121
|
+
--date-input-group-segment-fg-invalid-focused: var(--danger-soft-foreground);
|
|
122
|
+
|
|
123
|
+
background-color: var(--date-input-group-segment-bg);
|
|
124
|
+
color: var(--date-input-group-segment-fg);
|
|
125
|
+
|
|
108
126
|
/* Segment separators styling "/" */
|
|
109
127
|
&[data-type="literal"] {
|
|
110
|
-
@apply p-0
|
|
128
|
+
@apply p-0;
|
|
129
|
+
|
|
130
|
+
color: var(--date-input-group-segment-fg-literal);
|
|
111
131
|
}
|
|
112
132
|
|
|
113
133
|
/* Placeholder styling */
|
|
114
134
|
&[data-placeholder="true"] {
|
|
115
|
-
|
|
135
|
+
color: var(--date-input-group-segment-fg-placeholder);
|
|
116
136
|
}
|
|
117
137
|
|
|
118
138
|
/* Focused segment */
|
|
119
139
|
&:focus,
|
|
120
140
|
&[data-focused="true"] {
|
|
121
|
-
|
|
141
|
+
background-color: var(--date-input-group-segment-bg-focused);
|
|
142
|
+
color: var(--date-input-group-segment-fg-focused);
|
|
122
143
|
}
|
|
123
144
|
|
|
124
145
|
/* Disabled segment */
|
|
@@ -128,12 +149,13 @@
|
|
|
128
149
|
|
|
129
150
|
/* Invalid segment */
|
|
130
151
|
&[data-invalid="true"] {
|
|
131
|
-
|
|
152
|
+
color: var(--date-input-group-segment-fg-invalid);
|
|
132
153
|
|
|
133
154
|
/* Focused segment */
|
|
134
155
|
&:focus,
|
|
135
156
|
&[data-focused="true"] {
|
|
136
|
-
|
|
157
|
+
background-color: var(--date-input-group-segment-bg-invalid-focused);
|
|
158
|
+
color: var(--date-input-group-segment-fg-invalid-focused);
|
|
137
159
|
}
|
|
138
160
|
}
|
|
139
161
|
}
|
|
@@ -155,31 +177,11 @@
|
|
|
155
177
|
|
|
156
178
|
.date-input-group--secondary {
|
|
157
179
|
@apply shadow-none;
|
|
158
|
-
background-color: var(--date-input-group-bg);
|
|
159
180
|
|
|
160
181
|
--date-input-group-bg: var(--default);
|
|
161
182
|
--date-input-group-bg-hover: var(--default-hover);
|
|
162
183
|
--date-input-group-bg-focus: var(--default);
|
|
163
184
|
|
|
164
|
-
@media (hover: hover) {
|
|
165
|
-
&:hover:not(:focus-within),
|
|
166
|
-
&[data-hovered="true"]:not([data-focus-within="true"]) {
|
|
167
|
-
background-color: var(--date-input-group-bg-hover);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&:focus-within,
|
|
172
|
-
&[data-focus-within="true"] {
|
|
173
|
-
background-color: var(--date-input-group-bg-focus);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/* Invalid state */
|
|
177
|
-
&[data-invalid="true"] {
|
|
178
|
-
@apply status-invalid-field;
|
|
179
|
-
border-color: var(--color-field-border-invalid);
|
|
180
|
-
background-color: var(--date-input-group-bg-focus);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
185
|
[data-slot="date-input-group-input"] {
|
|
184
186
|
@apply bg-transparent;
|
|
185
187
|
}
|
|
@@ -189,3 +191,23 @@
|
|
|
189
191
|
.date-input-group--full-width {
|
|
190
192
|
@apply w-full;
|
|
191
193
|
}
|
|
194
|
+
|
|
195
|
+
/* ==========================================================================
|
|
196
|
+
Size variants
|
|
197
|
+
========================================================================== */
|
|
198
|
+
|
|
199
|
+
.date-input-group--sm {
|
|
200
|
+
@apply h-8;
|
|
201
|
+
|
|
202
|
+
.date-input-group__input {
|
|
203
|
+
@apply field-line-sm;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.date-input-group--lg {
|
|
208
|
+
@apply h-10;
|
|
209
|
+
|
|
210
|
+
.date-input-group__input {
|
|
211
|
+
@apply field-line-lg;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
@@ -16,10 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
cursor: var(--cursor-interactive);
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Transitions
|
|
21
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
22
|
-
*/
|
|
23
19
|
transition: box-shadow 150ms var(--ease-out);
|
|
24
20
|
@apply motion-reduce:transition-none;
|
|
25
21
|
|
|
@@ -44,7 +40,7 @@
|
|
|
44
40
|
@apply motion-reduce:transition-none;
|
|
45
41
|
|
|
46
42
|
box-shadow: var(--shadow-overlay);
|
|
47
|
-
border-radius: min(32px,
|
|
43
|
+
border-radius: min(32px, var(--component-radius));
|
|
48
44
|
|
|
49
45
|
&:focus-visible:not(:focus),
|
|
50
46
|
&[data-focus-visible="true"] {
|
|
@@ -16,10 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
cursor: var(--cursor-interactive);
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Transitions
|
|
21
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
22
|
-
*/
|
|
23
19
|
transition: box-shadow 150ms var(--ease-out);
|
|
24
20
|
@apply motion-reduce:transition-none;
|
|
25
21
|
|
|
@@ -48,7 +44,7 @@
|
|
|
48
44
|
@apply motion-reduce:transition-none;
|
|
49
45
|
|
|
50
46
|
box-shadow: var(--shadow-overlay);
|
|
51
|
-
border-radius: min(32px,
|
|
47
|
+
border-radius: min(32px, var(--component-radius));
|
|
52
48
|
|
|
53
49
|
&:focus-visible:not(:focus),
|
|
54
50
|
&[data-focus-visible="true"] {
|
|
@@ -43,10 +43,6 @@
|
|
|
43
43
|
height: var(--disclosure-panel-height);
|
|
44
44
|
overflow: clip;
|
|
45
45
|
|
|
46
|
-
/**
|
|
47
|
-
* Transitions
|
|
48
|
-
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
|
49
|
-
*/
|
|
50
46
|
transition:
|
|
51
47
|
height 200ms var(--ease-out-quad),
|
|
52
48
|
opacity 200ms var(--ease-out);
|