@auronui/styles 1.0.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 (268) hide show
  1. package/DATA_ATTRIBUTES.md +163 -0
  2. package/LICENSE +21 -0
  3. package/README.md +54 -0
  4. package/base/base.css +40 -0
  5. package/components/accordion.css +201 -0
  6. package/components/alert-dialog.css +307 -0
  7. package/components/alert.css +143 -0
  8. package/components/aspect-ratio.css +8 -0
  9. package/components/autocomplete.css +685 -0
  10. package/components/avatar.css +78 -0
  11. package/components/badge.css +186 -0
  12. package/components/breadcrumbs.css +76 -0
  13. package/components/button-group.css +126 -0
  14. package/components/button.css +282 -0
  15. package/components/calendar-year-picker.css +193 -0
  16. package/components/calendar.css +332 -0
  17. package/components/card.css +225 -0
  18. package/components/checkbox-group.css +7 -0
  19. package/components/checkbox.css +268 -0
  20. package/components/chip.css +227 -0
  21. package/components/close-button.css +65 -0
  22. package/components/collapsible-group.css +7 -0
  23. package/components/collapsible.css +74 -0
  24. package/components/color-area.css +81 -0
  25. package/components/color-field.css +99 -0
  26. package/components/color-input-group.css +153 -0
  27. package/components/color-picker.css +121 -0
  28. package/components/color-slider.css +266 -0
  29. package/components/color-swatch-picker.css +247 -0
  30. package/components/color-swatch.css +42 -0
  31. package/components/combo-box.css +203 -0
  32. package/components/date-input-group.css +125 -0
  33. package/components/date-input.css +529 -0
  34. package/components/date-picker.css +86 -0
  35. package/components/date-range-field.css +538 -0
  36. package/components/date-range-picker.css +93 -0
  37. package/components/description.css +4 -0
  38. package/components/drawer.css +222 -0
  39. package/components/dropdown.css +67 -0
  40. package/components/empty-state.css +4 -0
  41. package/components/error-message.css +13 -0
  42. package/components/field-error.css +19 -0
  43. package/components/fieldset.css +39 -0
  44. package/components/header.css +7 -0
  45. package/components/index.css +164 -0
  46. package/components/input-otp.css +124 -0
  47. package/components/input.css +603 -0
  48. package/components/kbd.css +27 -0
  49. package/components/label.css +28 -0
  50. package/components/link.css +144 -0
  51. package/components/list-box-item.css +29 -0
  52. package/components/list-box-section.css +13 -0
  53. package/components/list-box.css +11 -0
  54. package/components/menu-item.css +68 -0
  55. package/components/menu-section.css +18 -0
  56. package/components/menu.css +7 -0
  57. package/components/meter.css +104 -0
  58. package/components/modal.css +335 -0
  59. package/components/number-field.css +395 -0
  60. package/components/pagination.css +157 -0
  61. package/components/popover.css +96 -0
  62. package/components/progress-bar.css +126 -0
  63. package/components/progress-circle.css +82 -0
  64. package/components/radio-group.css +47 -0
  65. package/components/radio.css +157 -0
  66. package/components/range-calendar.css +402 -0
  67. package/components/scroll-area.css +70 -0
  68. package/components/scroll-shadow.css +77 -0
  69. package/components/select.css +649 -0
  70. package/components/separator.css +59 -0
  71. package/components/skeleton.css +48 -0
  72. package/components/slider.css +155 -0
  73. package/components/spinner.css +42 -0
  74. package/components/splitter.css +74 -0
  75. package/components/stepper.css +160 -0
  76. package/components/surface.css +23 -0
  77. package/components/switch-group.css +17 -0
  78. package/components/switch.css +194 -0
  79. package/components/table.css +341 -0
  80. package/components/tabs.css +262 -0
  81. package/components/tag-group.css +66 -0
  82. package/components/tag.css +99 -0
  83. package/components/textarea.css +536 -0
  84. package/components/time-field.css +530 -0
  85. package/components/toast.css +267 -0
  86. package/components/toggle-button-group.css +174 -0
  87. package/components/toggle-button.css +149 -0
  88. package/components/toolbar.css +32 -0
  89. package/components/tooltip.css +47 -0
  90. package/components/tree.css +81 -0
  91. package/index.css +29 -0
  92. package/package.json +415 -0
  93. package/src/components/accordion/accordion.styles.ts +46 -0
  94. package/src/components/accordion/index.ts +1 -0
  95. package/src/components/alert/alert.styles.ts +37 -0
  96. package/src/components/alert/index.ts +1 -0
  97. package/src/components/alert-dialog/alert-dialog.styles.ts +72 -0
  98. package/src/components/alert-dialog/index.ts +1 -0
  99. package/src/components/aspect-ratio/aspect-ratio.styles.ts +10 -0
  100. package/src/components/aspect-ratio/index.ts +1 -0
  101. package/src/components/autocomplete/autocomplete.styles.ts +86 -0
  102. package/src/components/autocomplete/index.ts +1 -0
  103. package/src/components/avatar/avatar.styles.ts +53 -0
  104. package/src/components/avatar/index.ts +1 -0
  105. package/src/components/badge/badge.styles.ts +77 -0
  106. package/src/components/badge/index.ts +1 -0
  107. package/src/components/breadcrumbs/breadcrumbs.styles.ts +14 -0
  108. package/src/components/breadcrumbs/index.ts +1 -0
  109. package/src/components/button/__tests__/button.styles.test.ts +79 -0
  110. package/src/components/button/button.styles.ts +65 -0
  111. package/src/components/button/index.ts +1 -0
  112. package/src/components/button-group/button-group.styles.ts +32 -0
  113. package/src/components/button-group/index.ts +1 -0
  114. package/src/components/calendar/calendar.styles.ts +60 -0
  115. package/src/components/calendar/index.ts +1 -0
  116. package/src/components/calendar-year-picker/calendar-year-picker.styles.ts +15 -0
  117. package/src/components/calendar-year-picker/index.ts +1 -0
  118. package/src/components/card/card.styles.ts +65 -0
  119. package/src/components/card/index.ts +1 -0
  120. package/src/components/checkbox/checkbox.styles.ts +27 -0
  121. package/src/components/checkbox/index.ts +1 -0
  122. package/src/components/checkbox-group/checkbox-group.styles.ts +18 -0
  123. package/src/components/checkbox-group/index.ts +1 -0
  124. package/src/components/chip/chip.styles.ts +65 -0
  125. package/src/components/chip/index.ts +1 -0
  126. package/src/components/close-button/close-button.styles.ts +17 -0
  127. package/src/components/close-button/index.ts +1 -0
  128. package/src/components/collapsible/collapsible.styles.ts +25 -0
  129. package/src/components/collapsible/index.ts +1 -0
  130. package/src/components/collapsible-group/collapsible-group.styles.ts +13 -0
  131. package/src/components/collapsible-group/index.ts +1 -0
  132. package/src/components/color-area/color-area.styles.ts +23 -0
  133. package/src/components/color-area/index.ts +1 -0
  134. package/src/components/color-field/color-field.styles.ts +18 -0
  135. package/src/components/color-field/index.ts +1 -0
  136. package/src/components/color-input-group/color-input-group.styles.ts +34 -0
  137. package/src/components/color-input-group/index.ts +1 -0
  138. package/src/components/color-picker/color-picker.styles.ts +13 -0
  139. package/src/components/color-picker/index.ts +1 -0
  140. package/src/components/color-slider/color-slider.styles.ts +14 -0
  141. package/src/components/color-slider/index.ts +1 -0
  142. package/src/components/color-swatch/color-swatch.styles.ts +26 -0
  143. package/src/components/color-swatch/index.ts +1 -0
  144. package/src/components/color-swatch-picker/color-swatch-picker.styles.ts +54 -0
  145. package/src/components/color-swatch-picker/index.ts +1 -0
  146. package/src/components/combo-box/combo-box.styles.ts +26 -0
  147. package/src/components/combo-box/index.ts +1 -0
  148. package/src/components/date-input/date-input.styles.ts +86 -0
  149. package/src/components/date-input/index.ts +1 -0
  150. package/src/components/date-picker/date-picker.styles.ts +14 -0
  151. package/src/components/date-picker/index.ts +1 -0
  152. package/src/components/date-range-field/date-range-field.styles.ts +87 -0
  153. package/src/components/date-range-field/index.ts +1 -0
  154. package/src/components/date-range-picker/date-range-picker.styles.ts +14 -0
  155. package/src/components/date-range-picker/index.ts +1 -0
  156. package/src/components/description/description.styles.ts +9 -0
  157. package/src/components/description/index.ts +1 -0
  158. package/src/components/drawer/drawer.styles.ts +55 -0
  159. package/src/components/drawer/index.ts +1 -0
  160. package/src/components/dropdown/dropdown.styles.ts +14 -0
  161. package/src/components/dropdown/index.ts +1 -0
  162. package/src/components/empty-state/empty-state.styles.ts +9 -0
  163. package/src/components/empty-state/index.ts +1 -0
  164. package/src/components/error-message/error-message.styles.ts +9 -0
  165. package/src/components/error-message/index.ts +1 -0
  166. package/src/components/fieldset/fieldset.styles.ts +29 -0
  167. package/src/components/fieldset/index.ts +1 -0
  168. package/src/components/header/header.styles.ts +5 -0
  169. package/src/components/header/index.ts +1 -0
  170. package/src/components/index.ts +84 -0
  171. package/src/components/input/index.ts +1 -0
  172. package/src/components/input/input.styles.ts +87 -0
  173. package/src/components/input-otp/index.ts +1 -0
  174. package/src/components/input-otp/input-otp.styles.ts +30 -0
  175. package/src/components/kbd/index.ts +1 -0
  176. package/src/components/kbd/kbd.styles.ts +20 -0
  177. package/src/components/label/index.ts +1 -0
  178. package/src/components/label/label.styles.ts +25 -0
  179. package/src/components/link/index.ts +1 -0
  180. package/src/components/link/link.styles.ts +38 -0
  181. package/src/components/list-box/index.ts +1 -0
  182. package/src/components/list-box/list-box.styles.ts +18 -0
  183. package/src/components/list-box-item/index.ts +1 -0
  184. package/src/components/list-box-item/list-box-item.styles.ts +25 -0
  185. package/src/components/list-box-section/index.ts +1 -0
  186. package/src/components/list-box-section/list-box-section.styles.ts +13 -0
  187. package/src/components/menu/index.ts +1 -0
  188. package/src/components/menu/menu.styles.ts +9 -0
  189. package/src/components/menu-item/index.ts +1 -0
  190. package/src/components/menu-item/menu-item.styles.ts +26 -0
  191. package/src/components/menu-section/index.ts +1 -0
  192. package/src/components/menu-section/menu-section.styles.ts +14 -0
  193. package/src/components/meter/index.ts +1 -0
  194. package/src/components/meter/meter.styles.ts +48 -0
  195. package/src/components/modal/index.ts +1 -0
  196. package/src/components/modal/modal.styles.ts +70 -0
  197. package/src/components/number-field/index.ts +1 -0
  198. package/src/components/number-field/number-field.styles.ts +80 -0
  199. package/src/components/pagination/index.ts +1 -0
  200. package/src/components/pagination/pagination.styles.ts +32 -0
  201. package/src/components/popover/index.ts +1 -0
  202. package/src/components/popover/popover.styles.ts +14 -0
  203. package/src/components/progress-bar/index.ts +1 -0
  204. package/src/components/progress-bar/progress-bar.styles.ts +97 -0
  205. package/src/components/progress-circle/index.ts +1 -0
  206. package/src/components/progress-circle/progress-circle.styles.ts +74 -0
  207. package/src/components/radio/index.ts +1 -0
  208. package/src/components/radio/radio.styles.ts +14 -0
  209. package/src/components/radio-group/index.ts +1 -0
  210. package/src/components/radio-group/radio-group.styles.ts +18 -0
  211. package/src/components/range-calendar/index.ts +1 -0
  212. package/src/components/range-calendar/range-calendar.styles.ts +60 -0
  213. package/src/components/scroll-shadow/index.ts +1 -0
  214. package/src/components/scroll-shadow/scroll-shadow.styles.ts +37 -0
  215. package/src/components/select/index.ts +1 -0
  216. package/src/components/select/select.styles.ts +86 -0
  217. package/src/components/separator/index.ts +1 -0
  218. package/src/components/separator/separator.styles.ts +25 -0
  219. package/src/components/skeleton/index.ts +1 -0
  220. package/src/components/skeleton/skeleton.styles.ts +21 -0
  221. package/src/components/slider/index.ts +1 -0
  222. package/src/components/slider/slider.styles.ts +40 -0
  223. package/src/components/spinner/index.ts +1 -0
  224. package/src/components/spinner/spinner.styles.ts +28 -0
  225. package/src/components/splitter/index.ts +1 -0
  226. package/src/components/splitter/splitter.styles.ts +28 -0
  227. package/src/components/stepper/index.ts +1 -0
  228. package/src/components/stepper/stepper.styles.ts +57 -0
  229. package/src/components/surface/index.ts +1 -0
  230. package/src/components/surface/surface.styles.ts +20 -0
  231. package/src/components/switch/index.ts +1 -0
  232. package/src/components/switch/switch.styles.ts +31 -0
  233. package/src/components/switch-group/index.ts +1 -0
  234. package/src/components/switch-group/switch-group.styles.ts +25 -0
  235. package/src/components/table/index.ts +1 -0
  236. package/src/components/table/table.styles.ts +47 -0
  237. package/src/components/tabs/index.ts +1 -0
  238. package/src/components/tabs/tabs.styles.ts +31 -0
  239. package/src/components/tag/index.ts +1 -0
  240. package/src/components/tag/tag.styles.ts +37 -0
  241. package/src/components/tag-group/index.ts +1 -0
  242. package/src/components/tag-group/tag-group.styles.ts +12 -0
  243. package/src/components/text/index.ts +1 -0
  244. package/src/components/text/text.styles.ts +29 -0
  245. package/src/components/textarea/index.ts +1 -0
  246. package/src/components/textarea/textarea.styles.ts +86 -0
  247. package/src/components/time-field/index.ts +1 -0
  248. package/src/components/time-field/time-field.styles.ts +86 -0
  249. package/src/components/toast/index.ts +1 -0
  250. package/src/components/toast/toast.styles.ts +67 -0
  251. package/src/components/toggle-button/index.ts +1 -0
  252. package/src/components/toggle-button/toggle-button.styles.ts +28 -0
  253. package/src/components/toggle-button-group/index.ts +1 -0
  254. package/src/components/toggle-button-group/toggle-button-group.styles.ts +39 -0
  255. package/src/components/toolbar/index.ts +1 -0
  256. package/src/components/toolbar/toolbar.styles.ts +23 -0
  257. package/src/components/tooltip/index.ts +1 -0
  258. package/src/components/tooltip/tooltip.styles.ts +12 -0
  259. package/src/components/tree/index.ts +1 -0
  260. package/src/components/tree/tree.styles.ts +33 -0
  261. package/src/index.ts +5 -0
  262. package/src/utils/index.ts +15 -0
  263. package/themes/default/components/index.css +6 -0
  264. package/themes/default/index.css +8 -0
  265. package/themes/default/variables.css +168 -0
  266. package/themes/shared/theme.css +196 -0
  267. package/utilities/index.css +244 -0
  268. package/variants/index.css +106 -0
@@ -0,0 +1,247 @@
1
+ /* ==========================================================================
2
+ ColorSwatchPicker - A list of color swatches for selection
3
+ ========================================================================== */
4
+
5
+ /* Base styles */
6
+ .color-swatch-picker {
7
+ @apply flex flex-wrap items-center gap-2;
8
+ }
9
+
10
+ /* ==========================================================================
11
+ Item - Individual swatch picker item
12
+ ========================================================================== */
13
+
14
+ .color-swatch-picker__item {
15
+ @apply relative flex size-8 items-center justify-center rounded-full border-2 border-transparent outline-none no-highlight;
16
+
17
+ /* Cursor */
18
+ cursor: var(--cursor-interactive);
19
+
20
+ /**
21
+ * Transitions
22
+ * CRITICAL: motion-reduce must be AFTER transition for correct override specificity
23
+ */
24
+ transition:
25
+ border-color 300ms var(--ease-out),
26
+ box-shadow 300ms var(--ease-out);
27
+ @apply transform-gpu motion-reduce:transition-none;
28
+
29
+ /* Focus state */
30
+ &:focus-visible,
31
+ &[data-focus-visible="true"] {
32
+ @apply status-focused;
33
+ }
34
+
35
+ /* Disabled state */
36
+ &[data-disabled] {
37
+ @apply status-disabled;
38
+ }
39
+
40
+ /* Selected state */
41
+ &[data-state="checked"] {
42
+ border-color: var(--reka-color-swatch-picker-item-color);
43
+ box-shadow: var(--field-shadow);
44
+ /* Shrink the swatch to reveal the white gap */
45
+ .color-swatch-picker__swatch {
46
+ transform: scale(0.77);
47
+ }
48
+ }
49
+ }
50
+
51
+ /* ==========================================================================
52
+ Swatch - The color swatch visual
53
+ ========================================================================== */
54
+
55
+ .color-swatch-picker__swatch {
56
+ @apply block size-full;
57
+
58
+ /* Inherit border-radius from item */
59
+ border-radius: inherit;
60
+
61
+ /* Paint the swatch color on top of a checker pattern so transparent colors
62
+ show the underlying grid. Reka's inner ColorSwatch sets
63
+ --reka-color-swatch-color on this element. */
64
+ background:
65
+ linear-gradient(var(--reka-color-swatch-color), var(--reka-color-swatch-color)),
66
+ repeating-conic-gradient(#efefef 0% 25%, #f7f7f7 0% 50%) 50% / 16px 16px;
67
+
68
+ /**
69
+ * Transitions
70
+ * CRITICAL: motion-reduce must be AFTER transition for correct override specificity
71
+ */
72
+ transition: transform 300ms var(--ease-out);
73
+ @apply transform-gpu motion-reduce:transition-none;
74
+
75
+ @media (hover: hover) {
76
+ &:hover {
77
+ transform: scale(1.1);
78
+ }
79
+ }
80
+ }
81
+
82
+ /* ==========================================================================
83
+ Indicator - Checkmark indicator for selected state
84
+ ========================================================================== */
85
+
86
+ .color-swatch-picker__indicator {
87
+ @apply pointer-events-none absolute inset-0 z-10 flex items-center justify-center;
88
+
89
+ /* Checkmark SVG styles - default to white for dark backgrounds */
90
+ & > * {
91
+ @apply size-1/3 text-white;
92
+
93
+ /* Start scaled down - use translateZ(0) for GPU acceleration */
94
+ transform: scale(0) translateZ(0);
95
+
96
+ /**
97
+ * Transitions
98
+ */
99
+ transition: transform 300ms var(--ease-out);
100
+ @apply motion-reduce:transition-none;
101
+ }
102
+
103
+ /* Use black checkmark on light backgrounds */
104
+ &[data-light-color="true"] & > * {
105
+ @apply text-black;
106
+ }
107
+
108
+ /* Scale up when parent item is selected */
109
+ .color-swatch-picker__item[data-state="checked"] & > * {
110
+ transform: scale(1) translateZ(0);
111
+ }
112
+ }
113
+
114
+ /* ==========================================================================
115
+ Layout variants
116
+ ========================================================================== */
117
+
118
+ .color-swatch-picker--grid {
119
+ /* Default is already grid (flex-wrap) - no additional styles needed */
120
+ }
121
+
122
+ .color-swatch-picker--stack {
123
+ @apply flex-col;
124
+ }
125
+
126
+ /* ==========================================================================
127
+ Size variants
128
+ ========================================================================== */
129
+
130
+ .color-swatch-picker--xs {
131
+ .color-swatch-picker__item {
132
+ @apply size-4 border;
133
+ }
134
+ }
135
+
136
+ .color-swatch-picker--sm {
137
+ .color-swatch-picker__item {
138
+ @apply size-6 border-2;
139
+ }
140
+ }
141
+
142
+ .color-swatch-picker--md {
143
+ .color-swatch-picker__item {
144
+ /* No styles as this is the default size */
145
+ }
146
+ }
147
+
148
+ .color-swatch-picker--lg {
149
+ .color-swatch-picker__item {
150
+ @apply size-9 border-3;
151
+ }
152
+ }
153
+
154
+ .color-swatch-picker--xl {
155
+ .color-swatch-picker__item {
156
+ @apply size-10 border-3;
157
+ }
158
+ }
159
+
160
+ /* ==========================================================================
161
+ Shape variants
162
+ ========================================================================== */
163
+
164
+ /* Circle variant (default) - no additional styles needed */
165
+ .color-swatch-picker--circle .color-swatch-picker__item {
166
+ /* Default is already circle (border-radius: 9999px) */
167
+ }
168
+
169
+ /* Square variant */
170
+ .color-swatch-picker--square {
171
+ .color-swatch-picker__item {
172
+ @apply rounded-xl;
173
+ .color-swatch-picker__swatch {
174
+ @apply rounded-lg;
175
+ }
176
+ &[data-state="checked"] {
177
+ .color-swatch-picker__swatch {
178
+ @apply rounded-lg;
179
+ }
180
+ }
181
+ }
182
+ }
183
+
184
+ /* Square variant - item radius for xs */
185
+ .color-swatch-picker--square.color-swatch-picker--xs {
186
+ .color-swatch-picker__item {
187
+ @apply rounded-md;
188
+ .color-swatch-picker__swatch {
189
+ @apply rounded-md;
190
+ }
191
+ &[data-state="checked"] {
192
+ .color-swatch-picker__swatch {
193
+ @apply rounded-md;
194
+ }
195
+ }
196
+ }
197
+ }
198
+
199
+ /* Square variant - item radius for sm */
200
+ .color-swatch-picker--square.color-swatch-picker--sm {
201
+ .color-swatch-picker__item {
202
+ @apply rounded-lg;
203
+ .color-swatch-picker__swatch {
204
+ @apply rounded-lg;
205
+ }
206
+ &[data-state="checked"] {
207
+ .color-swatch-picker__swatch {
208
+ @apply rounded-md;
209
+ }
210
+ }
211
+ }
212
+ }
213
+
214
+ /* Square variant - item radius for md (default) */
215
+ .color-swatch-picker--square.color-swatch-picker--md {
216
+ /* No styles as this is the default size */
217
+ }
218
+
219
+ /* Square variant - item radius for lg */
220
+ .color-swatch-picker--square.color-swatch-picker--lg {
221
+ .color-swatch-picker__item {
222
+ @apply rounded-xl;
223
+ .color-swatch-picker__swatch {
224
+ @apply rounded-lg;
225
+ }
226
+ &[data-state="checked"] {
227
+ .color-swatch-picker__swatch {
228
+ @apply rounded-lg;
229
+ }
230
+ }
231
+ }
232
+ }
233
+
234
+ /* Square variant - item radius for xl */
235
+ .color-swatch-picker--square.color-swatch-picker--xl {
236
+ .color-swatch-picker__item {
237
+ @apply rounded-xl;
238
+ .color-swatch-picker__swatch {
239
+ @apply rounded-lg;
240
+ }
241
+ &[data-state="checked"] {
242
+ .color-swatch-picker__swatch {
243
+ @apply rounded-lg;
244
+ }
245
+ }
246
+ }
247
+ }
@@ -0,0 +1,42 @@
1
+ /* Base color-swatch styles */
2
+ .color-swatch {
3
+ @apply relative box-border size-8 shrink-0;
4
+
5
+ /* Checkered background pattern for transparency */
6
+ background:
7
+ linear-gradient(var(--reka-color-swatch-color), var(--reka-color-swatch-color)),
8
+ repeating-conic-gradient(#efefef 0% 25%, #f7f7f7 0% 50%) 50% / 16px 16px;
9
+
10
+ /* Default border for visibility against similar backgrounds */
11
+ box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
12
+ }
13
+
14
+ /* Shape variants */
15
+ .color-swatch--circle {
16
+ @apply rounded-full;
17
+ }
18
+
19
+ .color-swatch--square {
20
+ @apply rounded-md;
21
+ }
22
+
23
+ /* Size variants */
24
+ .color-swatch--xs {
25
+ @apply size-4;
26
+ }
27
+
28
+ .color-swatch--sm {
29
+ @apply size-6;
30
+ }
31
+
32
+ .color-swatch--md {
33
+ /* No styles as this is the default size */
34
+ }
35
+
36
+ .color-swatch--lg {
37
+ @apply size-9;
38
+ }
39
+
40
+ .color-swatch--xl {
41
+ @apply size-10;
42
+ }
@@ -0,0 +1,203 @@
1
+ /* ─── ComboBox ─────────────────────────────────────────────────────────────── */
2
+
3
+ .combo-box {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 0.375rem;
7
+ }
8
+
9
+ /* ─── Field container (the visible bordered box) ───────────────────────────── */
10
+
11
+ .combo-box__input-group {
12
+ @apply relative inline-flex items-center gap-2 rounded-field border bg-field text-sm text-field-foreground shadow-field outline-none;
13
+ height: 2.25rem;
14
+ padding-left: 0.75rem;
15
+ /* Right padding reserves room for the absolute-positioned trigger button */
16
+ padding-right: 2rem;
17
+
18
+ border-width: var(--border-width-field);
19
+ border-color: var(--color-field-border);
20
+
21
+ transition:
22
+ background-color 300ms var(--ease-smooth),
23
+ border-color 300ms var(--ease-smooth),
24
+ box-shadow 300ms var(--ease-out);
25
+ @apply motion-reduce:transition-none;
26
+
27
+ @media (hover: hover) {
28
+ &:has(> input:hover):not(:focus-within),
29
+ &[data-hovered="true"]:not([data-focused="true"]) {
30
+ @apply bg-field-hover;
31
+ border-color: var(--color-field-border-hover);
32
+ }
33
+ }
34
+
35
+ &:focus-within,
36
+ &[data-focused="true"] {
37
+ @apply status-focused-field;
38
+ border-color: var(--color-field-border-focus);
39
+ background-color: var(--color-field-focus);
40
+ }
41
+
42
+ &:has(> input:disabled),
43
+ &[data-disabled="true"] {
44
+ @apply status-disabled;
45
+ }
46
+ }
47
+
48
+ /* Invalid state — propagated from the root aria-invalid attribute */
49
+ .combo-box[aria-invalid="true"] .combo-box__input-group {
50
+ @apply status-invalid-field;
51
+ border-color: var(--color-field-border-invalid);
52
+ }
53
+
54
+ /* ─── Full width ────────────────────────────────────────────────────────────── */
55
+
56
+ .combo-box--full-width {
57
+ @apply w-full;
58
+ }
59
+
60
+ .combo-box__input-group--full-width {
61
+ @apply w-full;
62
+ }
63
+
64
+ /* ─── Input element (transparent, borderless inside the container) ─────────── */
65
+
66
+ .combo-box__input {
67
+ @apply flex-1 min-w-0 bg-transparent border-0 outline-none p-0 h-auto text-inherit;
68
+ @apply placeholder:text-field-placeholder;
69
+
70
+ &:focus,
71
+ &:focus-visible {
72
+ outline: none;
73
+ box-shadow: none;
74
+ }
75
+ }
76
+
77
+ /* ─── Clear button ──────────────────────────────────────────────────────────── */
78
+
79
+ .combo-box__clear-button {
80
+ @apply relative isolate inline-flex h-5 w-5 shrink-0 origin-center items-center justify-center rounded-full text-muted select-none no-highlight bg-transparent;
81
+ cursor: var(--cursor-interactive);
82
+ @apply transform-gpu;
83
+
84
+ transition: opacity 300ms var(--ease-smooth);
85
+ @apply motion-reduce:transition-none;
86
+
87
+ &[data-empty="true"] {
88
+ @apply pointer-events-none opacity-0;
89
+ }
90
+
91
+ @media (hover: hover) {
92
+ &:hover,
93
+ &[data-hovered="true"] {
94
+ @apply bg-default-hover text-default-foreground;
95
+ }
96
+ }
97
+
98
+ &:active,
99
+ &[data-pressed="true"] {
100
+ transform: scale(0.93);
101
+ }
102
+
103
+ svg {
104
+ @apply size-2.5;
105
+ }
106
+ }
107
+
108
+ /* ─── Trigger (chevron dropdown button) ─────────────────────────────────────── */
109
+
110
+ .combo-box__trigger {
111
+ @apply absolute top-1/2 right-0 flex h-full shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center pr-2 text-field-placeholder transition duration-300 no-highlight;
112
+ @apply border-none bg-transparent outline-none;
113
+
114
+ @media (hover: hover) {
115
+ &:hover,
116
+ &[data-hovered="true"] {
117
+ @apply text-field-foreground;
118
+ }
119
+ }
120
+
121
+ &:focus-visible,
122
+ &[data-focus-visible="true"] {
123
+ @apply rounded ring-2 ring-focus ring-offset-2 ring-offset-background outline-none;
124
+ }
125
+
126
+ &:disabled,
127
+ &[data-disabled],
128
+ &[aria-disabled="true"] {
129
+ @apply cursor-not-allowed opacity-50;
130
+ }
131
+
132
+ [data-slot="combo-box-trigger-default-icon"] {
133
+ @apply size-4 transition-transform duration-300 motion-reduce:transition-none;
134
+ }
135
+
136
+ &[data-state="open"] [data-slot="combo-box-trigger-default-icon"] {
137
+ @apply rotate-180;
138
+ }
139
+ }
140
+
141
+ /* ─── Label ─────────────────────────────────────────────────────────────────── */
142
+
143
+ .combo-box [data-slot="label"] {
144
+ @apply text-sm font-medium w-fit select-none;
145
+ color: var(--color-foreground);
146
+ }
147
+
148
+ .combo-box[aria-invalid="true"] [data-slot="label"] {
149
+ color: var(--color-danger);
150
+ }
151
+
152
+ /* ─── Helper wrapper + text ─────────────────────────────────────────────────── */
153
+
154
+ .combo-box [data-slot="helper-wrapper"] { @apply picker-helper-wrapper; }
155
+ .combo-box [data-slot="description"] { @apply picker-description; }
156
+ .combo-box[aria-invalid="true"] [data-slot="description"] { @apply hidden; }
157
+ .combo-box [data-slot="error-message"] { @apply picker-error-message; }
158
+
159
+ /* ─── Popover (dropdown listbox content) ───────────────────────────────────── */
160
+
161
+ .combo-box__popover {
162
+ /* Alias Reka UI CSS variables to design-system names used by the layout below */
163
+ --trigger-width: var(--reka-combobox-trigger-width);
164
+ --trigger-anchor-point: var(--reka-combobox-content-transform-origin);
165
+
166
+ @apply scroll-py-1 overflow-y-auto overscroll-contain rounded-3xl bg-overlay p-0 text-sm;
167
+ width: var(--trigger-width);
168
+ transform-origin: var(--trigger-anchor-point);
169
+ box-shadow: var(--shadow-overlay);
170
+
171
+ max-height: min(var(--reka-combobox-content-available-height, 20rem), 20rem);
172
+ scroll-behavior: smooth;
173
+
174
+ @apply overlay-popover-scrollbar;
175
+
176
+ &:focus-visible,
177
+ &[data-focus-visible="true"] {
178
+ @apply outline-none;
179
+ }
180
+
181
+ [data-slot="list-box"] {
182
+ @apply p-1.5 outline-none;
183
+ }
184
+
185
+ [data-slot="list-box-item"] {
186
+ @apply px-2.5;
187
+ scroll-margin-block: 0.25rem;
188
+
189
+ &[data-highlighted],
190
+ &[data-highlighted="true"] {
191
+ @apply bg-default;
192
+ }
193
+ }
194
+
195
+ [data-slot="list-box-item-indicator"],
196
+ [data-slot="list-box-item-indicator"] [data-slot="list-box-item-indicator--checkmark"] {
197
+ @apply transition-none;
198
+ }
199
+
200
+ [data-slot="empty-content"] {
201
+ @apply text-center text-sm text-overlay-foreground/60;
202
+ }
203
+ }
@@ -0,0 +1,125 @@
1
+ /* Date input group styles — mirror .input so DateInput visually matches Input */
2
+ .date-input-group {
3
+ @apply inline-flex h-9 items-center overflow-hidden rounded-field border bg-field px-3 py-2 text-sm text-field-foreground shadow-field outline-none placeholder:text-field-placeholder sm:text-sm;
4
+ border-width: var(--border-width-field);
5
+ border-color: var(--color-field-border);
6
+
7
+ /**
8
+ * Transitions
9
+ * CRITICAL: motion-reduce must be AFTER transition for correct override specificity
10
+ */
11
+ transition:
12
+ background-color 300ms var(--ease-smooth),
13
+ border-color 300ms var(--ease-smooth),
14
+ box-shadow 300ms var(--ease-out);
15
+ @apply motion-reduce:transition-none;
16
+
17
+ /* Hover state */
18
+ @media (hover: hover) {
19
+ &:hover:not(:focus-within):not([data-focus-within="true"]),
20
+ &[data-hovered="true"]:not(:focus-within):not([data-focus-within="true"]) {
21
+ @apply bg-field-hover;
22
+ border-color: var(--color-field-border-hover);
23
+ }
24
+ }
25
+
26
+ /* Focus within state */
27
+ &[data-focus-within="true"]:not(
28
+ :has(
29
+ [data-slot="date-picker-trigger"]:focus,
30
+ [data-slot="date-picker-trigger"]:focus,
31
+ [data-slot="date-range-picker-trigger"]:focus,
32
+ [data-slot="date-range-picker-trigger"]:focus
33
+ )
34
+ ),
35
+ &:focus-within:not(
36
+ :has(
37
+ [data-slot="date-picker-trigger"]:focus,
38
+ [data-slot="date-picker-trigger"]:focus,
39
+ [data-slot="date-range-picker-trigger"]:focus,
40
+ [data-slot="date-range-picker-trigger"]:focus
41
+ )
42
+ ) {
43
+ @apply status-focused-field;
44
+ }
45
+
46
+ /* Invalid state */
47
+ &[aria-invalid="true"] {
48
+ @apply status-invalid-field;
49
+ background-color: var(--color-field-focus);
50
+ border-color: var(--color-field-border-invalid);
51
+ }
52
+
53
+ /* Disabled state */
54
+ &[data-disabled],
55
+ &[aria-disabled="true"] {
56
+ @apply status-disabled;
57
+ }
58
+ }
59
+
60
+ .date-input-group__input {
61
+ @apply flex flex-1 cursor-text items-center gap-px rounded-none border-0 bg-transparent text-sm shadow-none outline-none sm:text-sm;
62
+
63
+ .date-input-group:has(.date-range-picker__range-separator) & {
64
+ &[slot="start"] {
65
+ @apply flex-none pr-0;
66
+ }
67
+ &[slot="end"] {
68
+ @apply pl-0;
69
+ }
70
+ }
71
+
72
+ /* Focus state - handled by group */
73
+ &:focus,
74
+ &:focus-visible {
75
+ @apply outline-none;
76
+ }
77
+ }
78
+
79
+ .date-input-group__input-container {
80
+ @apply flex flex-1 items-center;
81
+ width: fit-content;
82
+ overflow-x: auto;
83
+ overflow-y: clip;
84
+ scrollbar-width: none;
85
+
86
+ &::-webkit-scrollbar {
87
+ display: none;
88
+ }
89
+ }
90
+
91
+ .date-input-group__segment {
92
+ @apply inline-block rounded-md px-0.5 text-end text-nowrap outline-none;
93
+
94
+ /* Segment separators styling "/" */
95
+ &[data-type="literal"] {
96
+ @apply p-0 text-muted;
97
+ }
98
+
99
+ /* Placeholder styling */
100
+ &[data-placeholder="true"] {
101
+ @apply text-field-placeholder;
102
+ }
103
+
104
+ /* Focused segment */
105
+ &:focus,
106
+ &[data-focused="true"] {
107
+ @apply bg-accent-soft text-accent-soft-foreground;
108
+ }
109
+
110
+ /* Disabled segment */
111
+ &[data-disabled] {
112
+ @apply opacity-50;
113
+ }
114
+
115
+ /* Invalid segment */
116
+ &[aria-invalid="true"] {
117
+ @apply text-danger;
118
+
119
+ /* Focused segment */
120
+ &:focus,
121
+ &[data-focused="true"] {
122
+ @apply bg-danger-soft text-danger-soft-foreground;
123
+ }
124
+ }
125
+ }