@ropav/styles 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +79 -0
  2. package/dist/components/accordion.css +1 -9
  3. package/dist/components/alert-dialog.css +0 -12
  4. package/dist/components/autocomplete.css +25 -35
  5. package/dist/components/breadcrumbs.css +9 -2
  6. package/dist/components/button-group.css +0 -4
  7. package/dist/components/button.css +3 -7
  8. package/dist/components/calendar-year-picker.css +19 -7
  9. package/dist/components/calendar.css +46 -21
  10. package/dist/components/checkbox.css +54 -56
  11. package/dist/components/chip.css +3 -1
  12. package/dist/components/close-button.css +7 -6
  13. package/dist/components/color-area.css +6 -6
  14. package/dist/components/color-input-group.css +10 -27
  15. package/dist/components/color-picker.css +1 -5
  16. package/dist/components/color-slider.css +14 -12
  17. package/dist/components/color-swatch-picker.css +2 -85
  18. package/dist/components/color-swatch.css +1 -1
  19. package/dist/components/combo-box.css +13 -3
  20. package/dist/components/date-input-group.css +34 -32
  21. package/dist/components/date-picker.css +1 -5
  22. package/dist/components/date-range-picker.css +1 -5
  23. package/dist/components/disclosure.css +0 -4
  24. package/dist/components/drawer.css +4 -8
  25. package/dist/components/drop-zone/drop-zone.styles.d.ts +34 -0
  26. package/dist/components/drop-zone/drop-zone.styles.d.ts.map +1 -0
  27. package/dist/components/drop-zone/drop-zone.styles.js +8 -0
  28. package/dist/components/drop-zone/index.d.ts +2 -0
  29. package/dist/components/drop-zone/index.d.ts.map +1 -0
  30. package/dist/components/drop-zone/index.js +2 -0
  31. package/dist/components/drop-zone.css +78 -0
  32. package/dist/components/dropdown.css +0 -4
  33. package/dist/components/error-message.css +0 -4
  34. package/dist/components/field-error.css +0 -4
  35. package/dist/components/index.css +1 -0
  36. package/dist/components/index.d.ts +1 -0
  37. package/dist/components/index.d.ts.map +1 -1
  38. package/dist/components/input-group.css +12 -37
  39. package/dist/components/input-otp.css +14 -26
  40. package/dist/components/input.css +11 -32
  41. package/dist/components/kbd.css +3 -1
  42. package/dist/components/label.css +7 -2
  43. package/dist/components/link.css +13 -11
  44. package/dist/components/list-box-item.css +4 -10
  45. package/dist/components/menu-item.css +4 -10
  46. package/dist/components/meter.css +8 -16
  47. package/dist/components/modal.css +0 -12
  48. package/dist/components/number-field.css +23 -35
  49. package/dist/components/pagination.css +0 -4
  50. package/dist/components/popover.css +0 -4
  51. package/dist/components/progress-bar/progress-bar.styles.d.ts +36 -0
  52. package/dist/components/progress-bar/progress-bar.styles.d.ts.map +1 -1
  53. package/dist/components/progress-bar/progress-bar.styles.js +10 -0
  54. package/dist/components/progress-bar.css +82 -16
  55. package/dist/components/progress-circle.css +0 -4
  56. package/dist/components/radio.css +7 -9
  57. package/dist/components/range-calendar.css +73 -31
  58. package/dist/components/search-field.css +11 -28
  59. package/dist/components/segmented-control.css +9 -14
  60. package/dist/components/select.css +18 -32
  61. package/dist/components/sidebar/sidebar.styles.d.ts +36 -0
  62. package/dist/components/sidebar/sidebar.styles.d.ts.map +1 -1
  63. package/dist/components/sidebar/sidebar.styles.js +14 -1
  64. package/dist/components/sidebar.css +132 -38
  65. package/dist/components/slider.css +10 -11
  66. package/dist/components/splitter.css +44 -36
  67. package/dist/components/switch.css +16 -15
  68. package/dist/components/table.css +69 -27
  69. package/dist/components/tabs.css +8 -19
  70. package/dist/components/tag.css +32 -24
  71. package/dist/components/textarea.css +11 -32
  72. package/dist/components/toast.css +3 -1
  73. package/dist/components/toggle-button-group.css +0 -4
  74. package/dist/components/toggle-button.css +2 -6
  75. package/dist/components/tooltip.css +0 -4
  76. package/dist/components/typography.css +12 -4
  77. package/dist/components/virtualizer.css +11 -3
  78. package/dist/index.js +2 -1
  79. package/dist/ropav.min.css +1 -1
  80. package/dist/themes/airbnb.css +6 -4
  81. package/dist/themes/coinbase.css +6 -4
  82. package/dist/themes/default.css +24 -4
  83. package/dist/themes/discord.css +6 -4
  84. package/dist/themes/hero.css +24 -4
  85. package/dist/themes/lavender.css +6 -4
  86. package/dist/themes/mint.css +6 -4
  87. package/dist/themes/netflix.css +6 -4
  88. package/dist/themes/rabbit.css +6 -4
  89. package/dist/themes/shared/theme.css +1 -0
  90. package/dist/themes/sky.css +6 -4
  91. package/dist/themes/spotify.css +6 -4
  92. package/dist/themes/uber.css +6 -4
  93. package/package.json +1 -1
  94. package/src/components/drop-zone/drop-zone.styles.ts +12 -0
  95. package/src/components/drop-zone/index.ts +1 -0
  96. package/src/components/index.ts +1 -0
  97. package/src/components/progress-bar/progress-bar.styles.ts +14 -0
  98. package/src/components/sidebar/sidebar.styles.ts +23 -0
@@ -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] text-accent-foreground;
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
- @apply text-danger-foreground;
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
- @apply text-danger-foreground;
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 rounded-md border [border-width:var(--border-width-field)] border-field-border bg-field shadow-field outline-none no-highlight;
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 rounded-md bg-accent opacity-0 content-[''];
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
- @apply border-field-border-hover;
147
+ border-color: var(--checkbox-control-border-hover);
127
148
 
128
149
  &::before {
129
- @apply bg-accent-hover;
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
- @apply border-transparent text-accent-foreground;
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
- @apply bg-accent text-accent-foreground;
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
- @apply bg-accent-hover;
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
- @apply border-transparent bg-danger text-danger-foreground;
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 bg-danger opacity-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
- @apply bg-danger text-danger-foreground;
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
- --checkbox-control-bg: var(--default);
227
-
228
- /* Hover state */
229
- .checkbox:hover &,
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
- }
@@ -1,6 +1,8 @@
1
1
  /* Base styles */
2
2
  .chip {
3
- @apply inline-flex w-fit shrink-0 items-center gap-0.5 rounded-2xl px-2 py-0.5 text-xs leading-5 font-medium;
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 bg-default text-muted;
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
- @apply bg-default-hover;
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 rounded-2xl no-highlight;
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 rounded-xl will-change-[width,height];
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);
@@ -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 bg-field text-sm text-field-foreground shadow-field outline-none;
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
- @apply bg-field-hover;
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(--field-focus);
51
+ background-color: var(--color-input-group-bg-focus);
49
52
  border-color: var(--color-field-border-invalid);
50
53
  }
51
54
 
@@ -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
  }
@@ -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, calc(var(--radius) * 2.5));
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 rounded-2xl;
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 rounded-2xl no-highlight;
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
- @apply rounded-ss-2xl rounded-es-2xl;
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
- @apply rounded-se-2xl rounded-ee-2xl;
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: 999px;
227
- border-end-end-radius: 999px;
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: 999px;
241
- border-start-end-radius: 999px;
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
- .color-swatch-picker__item {
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
  }
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  .color-swatch--square {
20
- @apply rounded-md;
20
+ border-radius: min(32px, var(--component-radius));
21
21
  }
22
22
 
23
23
  /* Size variants */
@@ -43,10 +43,15 @@
43
43
  }
44
44
 
45
45
  .combo-box__value {
46
- @apply text-sm wrap-break-word text-field-foreground empty:hidden;
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
- @apply text-field-placeholder;
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
- @apply text-field-foreground;
78
+ color: var(--combo-box-trigger-fg-hover);
69
79
  }
70
80
  }
71
81