@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.
Files changed (181) hide show
  1. package/README.md +89 -5
  2. package/dist/components/accordion.css +6 -14
  3. package/dist/components/alert-dialog.css +1 -13
  4. package/dist/components/alert.css +1 -1
  5. package/dist/components/autocomplete/autocomplete.styles.d.ts +33 -0
  6. package/dist/components/autocomplete/autocomplete.styles.d.ts.map +1 -1
  7. package/dist/components/autocomplete/autocomplete.styles.js +12 -0
  8. package/dist/components/autocomplete.css +54 -36
  9. package/dist/components/breadcrumbs.css +9 -2
  10. package/dist/components/button-group.css +6 -10
  11. package/dist/components/button.css +10 -18
  12. package/dist/components/calendar-year-picker.css +20 -8
  13. package/dist/components/calendar.css +46 -21
  14. package/dist/components/card.css +1 -1
  15. package/dist/components/checkbox.css +54 -56
  16. package/dist/components/chip.css +3 -1
  17. package/dist/components/close-button.css +7 -6
  18. package/dist/components/color-area.css +6 -6
  19. package/dist/components/color-input-group/color-input-group.styles.d.ts +27 -0
  20. package/dist/components/color-input-group/color-input-group.styles.d.ts.map +1 -1
  21. package/dist/components/color-input-group/color-input-group.styles.js +6 -0
  22. package/dist/components/color-input-group.css +31 -28
  23. package/dist/components/color-picker.css +1 -5
  24. package/dist/components/color-slider.css +14 -12
  25. package/dist/components/color-swatch-picker.css +2 -85
  26. package/dist/components/color-swatch.css +1 -1
  27. package/dist/components/combo-box/combo-box.styles.d.ts +27 -0
  28. package/dist/components/combo-box/combo-box.styles.d.ts.map +1 -1
  29. package/dist/components/combo-box/combo-box.styles.js +17 -7
  30. package/dist/components/combo-box.css +34 -4
  31. package/dist/components/date-input-group/date-input-group.styles.d.ts +27 -0
  32. package/dist/components/date-input-group/date-input-group.styles.d.ts.map +1 -1
  33. package/dist/components/date-input-group/date-input-group.styles.js +6 -0
  34. package/dist/components/date-input-group.css +55 -33
  35. package/dist/components/date-picker.css +1 -5
  36. package/dist/components/date-range-picker.css +1 -5
  37. package/dist/components/disclosure.css +0 -4
  38. package/dist/components/drawer.css +4 -8
  39. package/dist/components/drop-zone/drop-zone.styles.d.ts +34 -0
  40. package/dist/components/drop-zone/drop-zone.styles.d.ts.map +1 -0
  41. package/dist/components/drop-zone/drop-zone.styles.js +8 -0
  42. package/dist/components/drop-zone/index.d.ts +2 -0
  43. package/dist/components/drop-zone/index.d.ts.map +1 -0
  44. package/dist/components/drop-zone/index.js +2 -0
  45. package/dist/components/drop-zone.css +78 -0
  46. package/dist/components/dropdown.css +1 -5
  47. package/dist/components/error-message.css +0 -4
  48. package/dist/components/field-error.css +0 -4
  49. package/dist/components/index.css +5 -0
  50. package/dist/components/index.d.ts +5 -0
  51. package/dist/components/index.d.ts.map +1 -1
  52. package/dist/components/input/input.styles.d.ts +15 -0
  53. package/dist/components/input/input.styles.d.ts.map +1 -1
  54. package/dist/components/input/input.styles.js +6 -0
  55. package/dist/components/input-group/input-group.styles.d.ts +27 -0
  56. package/dist/components/input-group/input-group.styles.d.ts.map +1 -1
  57. package/dist/components/input-group/input-group.styles.js +6 -0
  58. package/dist/components/input-group.css +35 -38
  59. package/dist/components/input-otp.css +14 -26
  60. package/dist/components/input.css +23 -32
  61. package/dist/components/kbd.css +3 -1
  62. package/dist/components/label.css +7 -2
  63. package/dist/components/link.css +13 -11
  64. package/dist/components/list-box/list-box.styles.d.ts +15 -0
  65. package/dist/components/list-box/list-box.styles.d.ts.map +1 -1
  66. package/dist/components/list-box/list-box.styles.js +15 -5
  67. package/dist/components/list-box-item.css +8 -12
  68. package/dist/components/list-box.css +19 -0
  69. package/dist/components/menu/menu.styles.d.ts +19 -1
  70. package/dist/components/menu/menu.styles.d.ts.map +1 -1
  71. package/dist/components/menu/menu.styles.js +9 -1
  72. package/dist/components/menu-item.css +4 -10
  73. package/dist/components/menu.css +19 -0
  74. package/dist/components/meter.css +8 -16
  75. package/dist/components/modal.css +1 -13
  76. package/dist/components/number-field/number-field.styles.d.ts +27 -0
  77. package/dist/components/number-field/number-field.styles.d.ts.map +1 -1
  78. package/dist/components/number-field/number-field.styles.js +6 -0
  79. package/dist/components/number-field.css +83 -36
  80. package/dist/components/pagination.css +6 -10
  81. package/dist/components/popover.css +15 -5
  82. package/dist/components/progress-bar/progress-bar.styles.d.ts +36 -0
  83. package/dist/components/progress-bar/progress-bar.styles.d.ts.map +1 -1
  84. package/dist/components/progress-bar/progress-bar.styles.js +10 -0
  85. package/dist/components/progress-bar.css +82 -16
  86. package/dist/components/progress-circle.css +0 -4
  87. package/dist/components/radio.css +7 -9
  88. package/dist/components/range-calendar.css +73 -31
  89. package/dist/components/search-field/search-field.styles.d.ts +27 -0
  90. package/dist/components/search-field/search-field.styles.d.ts.map +1 -1
  91. package/dist/components/search-field/search-field.styles.js +6 -0
  92. package/dist/components/search-field.css +36 -29
  93. package/dist/components/segmented-control/index.d.ts +2 -0
  94. package/dist/components/segmented-control/index.d.ts.map +1 -0
  95. package/dist/components/segmented-control/index.js +2 -0
  96. package/dist/components/segmented-control/segmented-control.styles.d.ts +73 -0
  97. package/dist/components/segmented-control/segmented-control.styles.d.ts.map +1 -0
  98. package/dist/components/segmented-control/segmented-control.styles.js +27 -0
  99. package/dist/components/segmented-control.css +188 -0
  100. package/dist/components/select/select.styles.d.ts +33 -0
  101. package/dist/components/select/select.styles.d.ts.map +1 -1
  102. package/dist/components/select/select.styles.js +12 -0
  103. package/dist/components/select.css +47 -33
  104. package/dist/components/sidebar/index.d.ts +2 -0
  105. package/dist/components/sidebar/index.d.ts.map +1 -0
  106. package/dist/components/sidebar/index.js +2 -0
  107. package/dist/components/sidebar/sidebar.styles.d.ts +226 -0
  108. package/dist/components/sidebar/sidebar.styles.d.ts.map +1 -0
  109. package/dist/components/sidebar/sidebar.styles.js +65 -0
  110. package/dist/components/sidebar.css +604 -0
  111. package/dist/components/slider.css +10 -11
  112. package/dist/components/splitter/index.d.ts +2 -0
  113. package/dist/components/splitter/index.d.ts.map +1 -0
  114. package/dist/components/splitter/index.js +2 -0
  115. package/dist/components/splitter/splitter.styles.d.ts +61 -0
  116. package/dist/components/splitter/splitter.styles.d.ts.map +1 -0
  117. package/dist/components/splitter/splitter.styles.js +26 -0
  118. package/dist/components/splitter.css +249 -0
  119. package/dist/components/switch.css +16 -15
  120. package/dist/components/table.css +72 -30
  121. package/dist/components/tabs.css +9 -20
  122. package/dist/components/tag.css +32 -24
  123. package/dist/components/textarea/textarea.styles.d.ts +15 -0
  124. package/dist/components/textarea/textarea.styles.d.ts.map +1 -1
  125. package/dist/components/textarea/textarea.styles.js +6 -0
  126. package/dist/components/textarea.css +23 -32
  127. package/dist/components/toast.css +4 -2
  128. package/dist/components/toggle-button-group.css +7 -11
  129. package/dist/components/toggle-button.css +9 -17
  130. package/dist/components/toolbar.css +1 -1
  131. package/dist/components/tooltip.css +15 -6
  132. package/dist/components/typography.css +12 -4
  133. package/dist/components/virtualizer/index.d.ts +2 -0
  134. package/dist/components/virtualizer/index.d.ts.map +1 -0
  135. package/dist/components/virtualizer/index.js +2 -0
  136. package/dist/components/virtualizer/virtualizer.styles.d.ts +44 -0
  137. package/dist/components/virtualizer/virtualizer.styles.d.ts.map +1 -0
  138. package/dist/components/virtualizer/virtualizer.styles.js +15 -0
  139. package/dist/components/virtualizer.css +72 -0
  140. package/dist/index.js +6 -1
  141. package/dist/ropav.min.css +2 -2
  142. package/dist/themes/airbnb.css +11 -4
  143. package/dist/themes/all.css +1 -0
  144. package/dist/themes/coinbase.css +11 -4
  145. package/dist/themes/default.css +40 -8
  146. package/dist/themes/discord.css +11 -4
  147. package/dist/themes/hero.css +282 -0
  148. package/dist/themes/lavender.css +11 -4
  149. package/dist/themes/mint.css +11 -4
  150. package/dist/themes/netflix.css +11 -4
  151. package/dist/themes/rabbit.css +11 -4
  152. package/dist/themes/shared/theme.css +20 -2
  153. package/dist/themes/sky.css +11 -4
  154. package/dist/themes/spotify.css +11 -4
  155. package/dist/themes/uber.css +11 -4
  156. package/dist/utilities/index.css +27 -0
  157. package/package.json +1 -1
  158. package/src/components/autocomplete/autocomplete.styles.ts +12 -0
  159. package/src/components/color-input-group/color-input-group.styles.ts +10 -0
  160. package/src/components/combo-box/combo-box.styles.ts +12 -0
  161. package/src/components/date-input-group/date-input-group.styles.ts +10 -0
  162. package/src/components/drop-zone/drop-zone.styles.ts +12 -0
  163. package/src/components/drop-zone/index.ts +1 -0
  164. package/src/components/index.ts +5 -0
  165. package/src/components/input/input.styles.ts +6 -0
  166. package/src/components/input-group/input-group.styles.ts +10 -0
  167. package/src/components/list-box/list-box.styles.ts +6 -0
  168. package/src/components/menu/menu.styles.ts +10 -0
  169. package/src/components/number-field/number-field.styles.ts +10 -0
  170. package/src/components/progress-bar/progress-bar.styles.ts +14 -0
  171. package/src/components/search-field/search-field.styles.ts +10 -0
  172. package/src/components/segmented-control/index.ts +1 -0
  173. package/src/components/segmented-control/segmented-control.styles.ts +37 -0
  174. package/src/components/select/select.styles.ts +12 -0
  175. package/src/components/sidebar/index.ts +1 -0
  176. package/src/components/sidebar/sidebar.styles.ts +117 -0
  177. package/src/components/splitter/index.ts +1 -0
  178. package/src/components/splitter/splitter.styles.ts +44 -0
  179. package/src/components/textarea/textarea.styles.ts +6 -0
  180. package/src/components/virtualizer/index.ts +1 -0
  181. package/src/components/virtualizer/virtualizer.styles.ts +15 -0
@@ -19,6 +19,7 @@
19
19
  [data-theme="mint"] {
20
20
  color-scheme: light;
21
21
 
22
+ --component-radius: calc(var(--radius) * 3);
22
23
  --field-radius: 0.75rem;
23
24
  --radius: 0.5rem;
24
25
 
@@ -81,6 +82,9 @@
81
82
  var(--field-foreground, var(--foreground)) 2%
82
83
  );
83
84
  --field-placeholder: oklch(51.6% 0.003 155);
85
+ --field-shadow:
86
+ 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06),
87
+ 0 0 1px 0 rgba(0, 0, 0, 0.06);
84
88
 
85
89
  /* Status Colors */
86
90
  --danger: oklch(65.32% 0.2335 13.88);
@@ -108,10 +112,10 @@
108
112
  --segment-foreground: oklch(21.03% 0.0015 155);
109
113
 
110
114
  /* Borders and separators */
111
- --border: oklch(90% 0.0015 155);
115
+ --border: color-mix(in oklab, var(--surface-foreground) 14%, transparent);
112
116
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
113
117
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
114
- --separator: oklch(92% 0.0015 155);
118
+ --separator: color-mix(in oklab, var(--surface-foreground) 12%, transparent);
115
119
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
116
120
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
117
121
 
@@ -119,6 +123,7 @@
119
123
  --background-inverse: var(--foreground);
120
124
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
121
125
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
126
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 9%, transparent);
122
127
  }
123
128
 
124
129
  [data-theme="mint"].dark,
@@ -184,6 +189,7 @@
184
189
  var(--field-foreground, var(--foreground)) 2%
185
190
  );
186
191
  --field-placeholder: oklch(70.5% 0.003 155);
192
+ --field-shadow: 0 0 0 0 transparent inset;
187
193
 
188
194
  /* Status Colors */
189
195
  --danger: oklch(59.4% 0.1973 12.77);
@@ -211,10 +217,10 @@
211
217
  --segment-foreground: oklch(99.11% 0.0015 155);
212
218
 
213
219
  /* Borders and separators */
214
- --border: oklch(28% 0.0015 155);
220
+ --border: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
215
221
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
216
222
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
217
- --separator: oklch(25% 0.0015 155);
223
+ --separator: color-mix(in oklab, var(--surface-foreground) 4%, transparent);
218
224
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
219
225
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
220
226
 
@@ -222,5 +228,6 @@
222
228
  --background-inverse: var(--foreground);
223
229
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
224
230
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
231
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
225
232
  }
226
233
  }
@@ -19,6 +19,7 @@
19
19
  [data-theme="netflix"] {
20
20
  color-scheme: light;
21
21
 
22
+ --component-radius: calc(var(--radius) * 3);
22
23
  --field-radius: 0.125rem;
23
24
  --radius: 0.125rem;
24
25
 
@@ -81,6 +82,9 @@
81
82
  var(--field-foreground, var(--foreground)) 2%
82
83
  );
83
84
  --field-placeholder: oklch(51.6% 0 27.99);
85
+ --field-shadow:
86
+ 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06),
87
+ 0 0 1px 0 rgba(0, 0, 0, 0.06);
84
88
 
85
89
  /* Status Colors */
86
90
  --danger: oklch(0.4823 0.1938 27.64);
@@ -108,10 +112,10 @@
108
112
  --segment-foreground: oklch(21.03% 0 27.99);
109
113
 
110
114
  /* Borders and separators */
111
- --border: oklch(90% 0 27.99);
115
+ --border: color-mix(in oklab, var(--surface-foreground) 14%, transparent);
112
116
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
113
117
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
114
- --separator: oklch(92% 0 27.99);
118
+ --separator: color-mix(in oklab, var(--surface-foreground) 12%, transparent);
115
119
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
116
120
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
117
121
 
@@ -119,6 +123,7 @@
119
123
  --background-inverse: var(--foreground);
120
124
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
121
125
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
126
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 9%, transparent);
122
127
  }
123
128
 
124
129
  [data-theme="netflix"].dark,
@@ -184,6 +189,7 @@
184
189
  var(--field-foreground, var(--foreground)) 2%
185
190
  );
186
191
  --field-placeholder: oklch(70.5% 0 27.99);
192
+ --field-shadow: 0 0 0 0 transparent inset;
187
193
 
188
194
  /* Status Colors */
189
195
  --danger: oklch(0.4964 0.1994 28.56);
@@ -211,10 +217,10 @@
211
217
  --segment-foreground: oklch(99.11% 0 27.99);
212
218
 
213
219
  /* Borders and separators */
214
- --border: oklch(28% 0 27.99);
220
+ --border: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
215
221
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
216
222
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
217
- --separator: oklch(25% 0 27.99);
223
+ --separator: color-mix(in oklab, var(--surface-foreground) 4%, transparent);
218
224
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
219
225
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
220
226
 
@@ -222,5 +228,6 @@
222
228
  --background-inverse: var(--foreground);
223
229
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
224
230
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
231
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
225
232
  }
226
233
  }
@@ -19,6 +19,7 @@
19
19
  [data-theme="rabbit"] {
20
20
  color-scheme: light;
21
21
 
22
+ --component-radius: calc(var(--radius) * 3);
22
23
  --field-radius: 1rem;
23
24
  --radius: 0.5rem;
24
25
 
@@ -81,6 +82,9 @@
81
82
  var(--field-foreground, var(--foreground)) 2%
82
83
  );
83
84
  --field-placeholder: oklch(51.6% 0.02 36.66);
85
+ --field-shadow:
86
+ 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06),
87
+ 0 0 1px 0 rgba(0, 0, 0, 0.06);
84
88
 
85
89
  /* Status Colors */
86
90
  --danger: oklch(0.6291 0.2565 29.09);
@@ -108,10 +112,10 @@
108
112
  --segment-foreground: oklch(21.03% 0.01 36.66);
109
113
 
110
114
  /* Borders and separators */
111
- --border: oklch(90% 0.01 36.66);
115
+ --border: color-mix(in oklab, var(--surface-foreground) 14%, transparent);
112
116
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
113
117
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
114
- --separator: oklch(92% 0.01 36.66);
118
+ --separator: color-mix(in oklab, var(--surface-foreground) 12%, transparent);
115
119
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
116
120
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
117
121
 
@@ -119,6 +123,7 @@
119
123
  --background-inverse: var(--foreground);
120
124
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
121
125
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
126
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 9%, transparent);
122
127
  }
123
128
 
124
129
  [data-theme="rabbit"].dark,
@@ -184,6 +189,7 @@
184
189
  var(--field-foreground, var(--foreground)) 2%
185
190
  );
186
191
  --field-placeholder: oklch(70.5% 0.02 36.66);
192
+ --field-shadow: 0 0 0 0 transparent inset;
187
193
 
188
194
  /* Status Colors */
189
195
  --danger: oklch(0.6291 0.2565 29.09);
@@ -211,10 +217,10 @@
211
217
  --segment-foreground: oklch(99.11% 0.01 36.66);
212
218
 
213
219
  /* Borders and separators */
214
- --border: oklch(28% 0.01 36.66);
220
+ --border: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
215
221
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
216
222
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
217
- --separator: oklch(25% 0.01 36.66);
223
+ --separator: color-mix(in oklab, var(--surface-foreground) 4%, transparent);
218
224
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
219
225
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
220
226
 
@@ -222,5 +228,6 @@
222
228
  --background-inverse: var(--foreground);
223
229
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
224
230
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
231
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
225
232
  }
226
233
  }
@@ -5,6 +5,7 @@
5
5
  --color-surface: var(--surface);
6
6
  --color-surface-foreground: var(--surface-foreground);
7
7
  --color-surface-hover: var(--surface-hover);
8
+ --color-state-layer: var(--state-layer);
8
9
 
9
10
  --color-surface-secondary: var(--surface-secondary);
10
11
  --color-surface-secondary-foreground: var(--surface-secondary-foreground);
@@ -52,7 +53,7 @@
52
53
  --color-field-foreground: var(--field-foreground, var(--foreground));
53
54
  --color-field-placeholder: var(--field-placeholder, var(--muted));
54
55
  --color-field-border: var(--field-border, var(--border));
55
- --radius-field: var(--field-radius, calc(var(--radius) * 1.5));
56
+ --radius-field: var(--field-radius, calc(var(--radius) * 0.75));
56
57
  --border-width-field: var(--field-border-width, var(--border-width));
57
58
 
58
59
  /* Color Tokens */
@@ -100,7 +101,13 @@
100
101
  --color-border-secondary: var(--border-secondary);
101
102
  --color-border-tertiary: var(--border-tertiary);
102
103
 
103
- /* Radius and default sizes - defaults can change by just changing the --radius */
104
+ /* Radius and default sizes - defaults can change by just changing the --radius.
105
+ *
106
+ * `inline` is what makes that work in a subtree: the value is substituted into the utility, so
107
+ * `rounded-3xl` compiles to `calc(var(--radius) * 3)` and resolves against the element wearing
108
+ * the class. A `data-theme` that sets its own `--radius` gets the whole scale for free, with
109
+ * nothing to re-declare - unlike the colour tokens, which are real properties on `:root` and do
110
+ * have to be re-emitted per theme. */
104
111
  --radius-xs: calc(var(--radius) * 0.25); /* 0.125rem (2px) */
105
112
  --radius-sm: calc(var(--radius) * 0.5); /* 0.25rem (4px) */
106
113
  --radius-md: calc(var(--radius) * 0.75); /* 0.375rem (6px) */
@@ -110,6 +117,17 @@
110
117
  --radius-3xl: calc(var(--radius) * 3); /* 1.5rem (24px) */
111
118
  --radius-4xl: calc(var(--radius) * 4); /* 2rem (32px) */
112
119
 
120
+ /* The one radius every control and surface reads, so a theme can pair them with its fields
121
+ * instead. Unset falls through to the pill-ish 3x that every theme but `default` still wants.
122
+ * Kept off the `--radius-*` scale on purpose: overriding a scale step would leave `2xl`
123
+ * larger than `3xl`.
124
+ *
125
+ * This alias is for the utilities only - `inline` substitutes it into `rounded-component`, so
126
+ * the var() resolves at the element wearing the class. Raw CSS must say
127
+ * `var(--component-radius)` instead: read through this alias, the var() resolves here on
128
+ * `:root` and then inherits the root theme's value into every `data-theme` subtree. */
129
+ --radius-component: var(--component-radius, calc(var(--radius) * 3));
130
+
113
131
  /* Transition Timing Functions */
114
132
  --ease-smooth: ease; /* same as transition: ease; */
115
133
  /* These custom curves are made by https://twitter.com/bdc */
@@ -19,6 +19,7 @@
19
19
  [data-theme="sky"] {
20
20
  color-scheme: light;
21
21
 
22
+ --component-radius: calc(var(--radius) * 3);
22
23
  --field-radius: 0.75rem;
23
24
  --radius: 0.5rem;
24
25
 
@@ -81,6 +82,9 @@
81
82
  var(--field-foreground, var(--foreground)) 2%
82
83
  );
83
84
  --field-placeholder: oklch(51.6% 0.003 225);
85
+ --field-shadow:
86
+ 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06),
87
+ 0 0 1px 0 rgba(0, 0, 0, 0.06);
84
88
 
85
89
  /* Status Colors */
86
90
  --danger: oklch(65.32% 0.2335 22.28);
@@ -108,10 +112,10 @@
108
112
  --segment-foreground: oklch(21.03% 0.0015 225);
109
113
 
110
114
  /* Borders and separators */
111
- --border: oklch(90% 0.0015 225);
115
+ --border: color-mix(in oklab, var(--surface-foreground) 14%, transparent);
112
116
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
113
117
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
114
- --separator: oklch(92% 0.0015 225);
118
+ --separator: color-mix(in oklab, var(--surface-foreground) 12%, transparent);
115
119
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
116
120
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
117
121
 
@@ -119,6 +123,7 @@
119
123
  --background-inverse: var(--foreground);
120
124
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
121
125
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
126
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 9%, transparent);
122
127
  }
123
128
 
124
129
  [data-theme="sky"].dark,
@@ -184,6 +189,7 @@
184
189
  var(--field-foreground, var(--foreground)) 2%
185
190
  );
186
191
  --field-placeholder: oklch(70.5% 0.003 225);
192
+ --field-shadow: 0 0 0 0 transparent inset;
187
193
 
188
194
  /* Status Colors */
189
195
  --danger: oklch(59.4% 0.1973 21.17);
@@ -211,10 +217,10 @@
211
217
  --segment-foreground: oklch(99.11% 0.0015 225);
212
218
 
213
219
  /* Borders and separators */
214
- --border: oklch(28% 0.0015 225);
220
+ --border: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
215
221
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
216
222
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
217
- --separator: oklch(25% 0.0015 225);
223
+ --separator: color-mix(in oklab, var(--surface-foreground) 4%, transparent);
218
224
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
219
225
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
220
226
 
@@ -222,5 +228,6 @@
222
228
  --background-inverse: var(--foreground);
223
229
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
224
230
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
231
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
225
232
  }
226
233
  }
@@ -19,6 +19,7 @@
19
19
  [data-theme="spotify"] {
20
20
  color-scheme: light;
21
21
 
22
+ --component-radius: calc(var(--radius) * 3);
22
23
  --field-radius: 0.125rem;
23
24
  --radius: 0.5rem;
24
25
 
@@ -81,6 +82,9 @@
81
82
  var(--field-foreground, var(--foreground)) 2%
82
83
  );
83
84
  --field-placeholder: oklch(51.6% 0.004 148.67);
85
+ --field-shadow:
86
+ 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06),
87
+ 0 0 1px 0 rgba(0, 0, 0, 0.06);
84
88
 
85
89
  /* Status Colors */
86
90
  --danger: oklch(0.5509 0.2166 25.29);
@@ -108,10 +112,10 @@
108
112
  --segment-foreground: oklch(21.03% 0.002 148.67);
109
113
 
110
114
  /* Borders and separators */
111
- --border: oklch(90% 0.002 148.67);
115
+ --border: color-mix(in oklab, var(--surface-foreground) 14%, transparent);
112
116
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
113
117
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
114
- --separator: oklch(92% 0.002 148.67);
118
+ --separator: color-mix(in oklab, var(--surface-foreground) 12%, transparent);
115
119
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
116
120
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
117
121
 
@@ -119,6 +123,7 @@
119
123
  --background-inverse: var(--foreground);
120
124
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
121
125
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
126
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 9%, transparent);
122
127
  }
123
128
 
124
129
  [data-theme="spotify"].dark,
@@ -184,6 +189,7 @@
184
189
  var(--field-foreground, var(--foreground)) 2%
185
190
  );
186
191
  --field-placeholder: oklch(70.5% 0.004 148.67);
192
+ --field-shadow: 0 0 0 0 transparent inset;
187
193
 
188
194
  /* Status Colors */
189
195
  --danger: oklch(0.5931 0.2338 25.42);
@@ -211,10 +217,10 @@
211
217
  --segment-foreground: oklch(99.11% 0.002 148.67);
212
218
 
213
219
  /* Borders and separators */
214
- --border: oklch(28% 0.002 148.67);
220
+ --border: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
215
221
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
216
222
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
217
- --separator: oklch(25% 0.002 148.67);
223
+ --separator: color-mix(in oklab, var(--surface-foreground) 4%, transparent);
218
224
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
219
225
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
220
226
 
@@ -222,5 +228,6 @@
222
228
  --background-inverse: var(--foreground);
223
229
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
224
230
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
231
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
225
232
  }
226
233
  }
@@ -19,6 +19,7 @@
19
19
  [data-theme="uber"] {
20
20
  color-scheme: light;
21
21
 
22
+ --component-radius: calc(var(--radius) * 3);
22
23
  --field-radius: 0.25rem;
23
24
  --radius: 0.25rem;
24
25
 
@@ -81,6 +82,9 @@
81
82
  var(--field-foreground, var(--foreground)) 2%
82
83
  );
83
84
  --field-placeholder: oklch(51.6% 0 0);
85
+ --field-shadow:
86
+ 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06),
87
+ 0 0 1px 0 rgba(0, 0, 0, 0.06);
84
88
 
85
89
  /* Status Colors */
86
90
  --danger: oklch(0.573 0.2249 21.97);
@@ -108,10 +112,10 @@
108
112
  --segment-foreground: oklch(21.03% 0 0);
109
113
 
110
114
  /* Borders and separators */
111
- --border: oklch(90% 0 0);
115
+ --border: color-mix(in oklab, var(--surface-foreground) 14%, transparent);
112
116
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
113
117
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
114
- --separator: oklch(92% 0 0);
118
+ --separator: color-mix(in oklab, var(--surface-foreground) 12%, transparent);
115
119
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
116
120
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
117
121
 
@@ -119,6 +123,7 @@
119
123
  --background-inverse: var(--foreground);
120
124
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
121
125
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
126
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 9%, transparent);
122
127
  }
123
128
 
124
129
  [data-theme="uber"].dark,
@@ -184,6 +189,7 @@
184
189
  var(--field-foreground, var(--foreground)) 2%
185
190
  );
186
191
  --field-placeholder: oklch(70.5% 0 0);
192
+ --field-shadow: 0 0 0 0 transparent inset;
187
193
 
188
194
  /* Status Colors */
189
195
  --danger: oklch(0.7044 0.1872 23.19);
@@ -211,10 +217,10 @@
211
217
  --segment-foreground: oklch(99.11% 0 0);
212
218
 
213
219
  /* Borders and separators */
214
- --border: oklch(28% 0 0);
220
+ --border: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
215
221
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
216
222
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
217
- --separator: oklch(25% 0 0);
223
+ --separator: color-mix(in oklab, var(--surface-foreground) 4%, transparent);
218
224
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
219
225
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
220
226
 
@@ -222,5 +228,6 @@
222
228
  --background-inverse: var(--foreground);
223
229
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
224
230
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
231
+ --state-layer: color-mix(in oklab, var(--surface-foreground) 7%, transparent);
225
232
  }
226
233
  }
@@ -151,3 +151,30 @@
151
151
  scrollbar-gutter: auto;
152
152
  -ms-overflow-style: none;
153
153
  }
154
+
155
+ /* === Field metrics === */
156
+ /*
157
+ * One line of a field, at each size. The size scale is the control scale: 32px, 36px, 40px, the
158
+ * same three heights a button stands at, so a field and a button of the same size line up.
159
+ *
160
+ * The padding is what carries it rather than a height, because a field is content-driven - some
161
+ * shells grow (a group around a textarea, a multi-select trigger wrapping its chips) and a height
162
+ * would fight them. The shell states its own floor: `min-h-8` / `min-h-9` / `min-h-10` where it may
163
+ * grow, `h-8` / `h-9` / `h-10` where it may not.
164
+ *
165
+ * The padding also changes at `sm` where the type does. 16px type below that breakpoint is what
166
+ * stops mobile Safari zooming the page on focus, and 16px sets a 24px line where 14px sets a 20px
167
+ * one - so the padding gives back the 4px difference and the height comes out the same either way.
168
+ * `lg` keeps 16px throughout, as the large button does.
169
+ */
170
+ @utility field-line-sm {
171
+ @apply py-1 text-base sm:py-1.5 sm:text-sm;
172
+ }
173
+
174
+ @utility field-line-md {
175
+ @apply py-1.5 text-base sm:py-2 sm:text-sm;
176
+ }
177
+
178
+ @utility field-line-lg {
179
+ @apply py-2 text-base;
180
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ropav/styles",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Ropav core styles - framework-agnostic CSS and Tailwind variants",
5
5
  "keywords": [
6
6
  "css",
@@ -5,6 +5,7 @@ import { tv } from "tailwind-variants";
5
5
  export const autocompleteVariants = tv({
6
6
  defaultVariants: {
7
7
  fullWidth: false,
8
+ size: "md",
8
9
  variant: "primary",
9
10
  },
10
11
  slots: {
@@ -24,6 +25,17 @@ export const autocompleteVariants = tv({
24
25
  trigger: "autocomplete__trigger--full-width",
25
26
  },
26
27
  },
28
+ size: {
29
+ lg: {
30
+ base: "autocomplete--lg",
31
+ popover: "autocomplete__popover--lg",
32
+ },
33
+ md: {},
34
+ sm: {
35
+ base: "autocomplete--sm",
36
+ popover: "autocomplete__popover--sm",
37
+ },
38
+ },
27
39
  variant: {
28
40
  primary: {
29
41
  base: "autocomplete--primary",
@@ -5,6 +5,7 @@ import { tv } from "tailwind-variants";
5
5
  export const colorInputGroupVariants = tv({
6
6
  defaultVariants: {
7
7
  fullWidth: false,
8
+ size: "md",
8
9
  variant: "primary",
9
10
  },
10
11
  slots: {
@@ -20,6 +21,15 @@ export const colorInputGroupVariants = tv({
20
21
  base: "color-input-group--full-width",
21
22
  },
22
23
  },
24
+ size: {
25
+ lg: {
26
+ base: "color-input-group--lg",
27
+ },
28
+ md: {},
29
+ sm: {
30
+ base: "color-input-group--sm",
31
+ },
32
+ },
23
33
  variant: {
24
34
  primary: {
25
35
  base: "color-input-group--primary",
@@ -5,6 +5,7 @@ import { tv } from "tailwind-variants";
5
5
  export const comboBoxVariants = tv({
6
6
  defaultVariants: {
7
7
  fullWidth: false,
8
+ size: "md",
8
9
  },
9
10
  slots: {
10
11
  base: "combo-box",
@@ -21,6 +22,17 @@ export const comboBoxVariants = tv({
21
22
  inputGroup: "combo-box__input-group--full-width",
22
23
  },
23
24
  },
25
+ /* The field itself is the `Input` inside, which takes its own size class from the context the
26
+ * root provides. Only the popover is left, and it is teleported out of this tree. */
27
+ size: {
28
+ lg: {
29
+ popover: "combo-box__popover--lg",
30
+ },
31
+ md: {},
32
+ sm: {
33
+ popover: "combo-box__popover--sm",
34
+ },
35
+ },
24
36
  },
25
37
  });
26
38
 
@@ -5,6 +5,7 @@ import { tv } from "tailwind-variants";
5
5
  export const dateInputGroupVariants = tv({
6
6
  defaultVariants: {
7
7
  fullWidth: false,
8
+ size: "md",
8
9
  variant: "primary",
9
10
  },
10
11
  slots: {
@@ -22,6 +23,15 @@ export const dateInputGroupVariants = tv({
22
23
  base: "date-input-group--full-width",
23
24
  },
24
25
  },
26
+ size: {
27
+ lg: {
28
+ base: "date-input-group--lg",
29
+ },
30
+ md: {},
31
+ sm: {
32
+ base: "date-input-group--sm",
33
+ },
34
+ },
25
35
  variant: {
26
36
  primary: {
27
37
  base: "date-input-group--primary",
@@ -0,0 +1,12 @@
1
+ import type { VariantProps } from "tailwind-variants";
2
+
3
+ import { tv } from "tailwind-variants";
4
+
5
+ export const dropZoneVariants = tv({
6
+ slots: {
7
+ base: "drop-zone",
8
+ trigger: "drop-zone__trigger",
9
+ },
10
+ });
11
+
12
+ export type DropZoneVariants = VariantProps<typeof dropZoneVariants>;
@@ -0,0 +1 @@
1
+ export * from "./drop-zone.styles";
@@ -32,6 +32,7 @@ export * from "./description";
32
32
  export * from "./drawer";
33
33
  export * from "./disclosure";
34
34
  export * from "./disclosure-group";
35
+ export * from "./drop-zone";
35
36
  export * from "./dropdown";
36
37
  export * from "./empty-state";
37
38
  export * from "./error-message";
@@ -61,11 +62,14 @@ export * from "./radio";
61
62
  export * from "./radio-group";
62
63
  export * from "./scroll-shadow";
63
64
  export * from "./search-field";
65
+ export * from "./segmented-control";
64
66
  export * from "./select";
65
67
  export * from "./separator";
68
+ export * from "./sidebar";
66
69
  export * from "./skeleton";
67
70
  export * from "./slider";
68
71
  export * from "./spinner";
72
+ export * from "./splitter";
69
73
  export * from "./surface";
70
74
  export * from "./switch";
71
75
  export * from "./switch-group";
@@ -82,3 +86,4 @@ export * from "./toggle-button";
82
86
  export * from "./toggle-button-group";
83
87
  export * from "./toolbar";
84
88
  export * from "./tooltip";
89
+ export * from "./virtualizer";
@@ -6,6 +6,7 @@ export const inputVariants = tv({
6
6
  base: "input",
7
7
  defaultVariants: {
8
8
  fullWidth: false,
9
+ size: "md",
9
10
  variant: "primary",
10
11
  },
11
12
  variants: {
@@ -13,6 +14,11 @@ export const inputVariants = tv({
13
14
  false: "",
14
15
  true: "input--full-width",
15
16
  },
17
+ size: {
18
+ lg: "input--lg",
19
+ md: "",
20
+ sm: "input--sm",
21
+ },
16
22
  variant: {
17
23
  primary: "input--primary",
18
24
  secondary: "input--secondary",