@voidable/theme 0.7.0 → 0.8.1

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 (323) hide show
  1. package/README.md +133 -8
  2. package/dist/base.css +20 -0
  3. package/dist/base.min.css +1 -0
  4. package/dist/component-tokens.json +1015 -0
  5. package/dist/components/accordion.css +149 -0
  6. package/dist/components/accordion.min.css +1 -0
  7. package/dist/components/action-input.css +416 -0
  8. package/dist/components/action-input.min.css +1 -0
  9. package/dist/components/alert.css +151 -0
  10. package/dist/components/alert.min.css +1 -0
  11. package/dist/components/avatar.css +73 -0
  12. package/dist/components/avatar.min.css +1 -0
  13. package/dist/components/badge.css +108 -0
  14. package/dist/components/badge.min.css +1 -0
  15. package/dist/components/banner.css +149 -0
  16. package/dist/components/banner.min.css +1 -0
  17. package/dist/components/bar-chart.css +101 -0
  18. package/dist/components/bar-chart.min.css +1 -0
  19. package/dist/components/breadcrumbs.css +82 -0
  20. package/dist/components/breadcrumbs.min.css +1 -0
  21. package/dist/components/button.css +237 -0
  22. package/dist/components/button.min.css +1 -0
  23. package/dist/components/calendar.css +669 -0
  24. package/dist/components/calendar.min.css +1 -0
  25. package/dist/components/card.css +161 -0
  26. package/dist/components/card.min.css +1 -0
  27. package/dist/components/carousel.css +223 -0
  28. package/dist/components/carousel.min.css +1 -0
  29. package/dist/components/checkbox-group.css +68 -0
  30. package/dist/components/checkbox-group.min.css +1 -0
  31. package/dist/components/checkbox.css +169 -0
  32. package/dist/components/checkbox.min.css +1 -0
  33. package/dist/components/collapsible.css +152 -0
  34. package/dist/components/collapsible.min.css +1 -0
  35. package/dist/components/color-picker.css +364 -0
  36. package/dist/components/color-picker.min.css +1 -0
  37. package/dist/components/combobox.css +548 -0
  38. package/dist/components/combobox.min.css +1 -0
  39. package/dist/components/compose-input.css +117 -0
  40. package/dist/components/compose-input.min.css +1 -0
  41. package/dist/components/dialog.css +175 -0
  42. package/dist/components/dialog.min.css +1 -0
  43. package/dist/components/divider.css +84 -0
  44. package/dist/components/divider.min.css +1 -0
  45. package/dist/components/donut-chart.css +122 -0
  46. package/dist/components/donut-chart.min.css +1 -0
  47. package/dist/components/drawer.css +230 -0
  48. package/dist/components/drawer.min.css +1 -0
  49. package/dist/components/dropdown-menu.css +274 -0
  50. package/dist/components/dropdown-menu.min.css +1 -0
  51. package/dist/components/editable.css +141 -0
  52. package/dist/components/editable.min.css +1 -0
  53. package/dist/components/error-fallback.css +129 -0
  54. package/dist/components/error-fallback.min.css +1 -0
  55. package/dist/components/field.css +103 -0
  56. package/dist/components/field.min.css +1 -0
  57. package/dist/components/file-upload.css +156 -0
  58. package/dist/components/file-upload.min.css +1 -0
  59. package/dist/components/gauge.css +186 -0
  60. package/dist/components/gauge.min.css +1 -0
  61. package/dist/components/hamburger.css +114 -0
  62. package/dist/components/hamburger.min.css +1 -0
  63. package/dist/components/hover-card.css +220 -0
  64. package/dist/components/hover-card.min.css +1 -0
  65. package/dist/components/indicator.css +159 -0
  66. package/dist/components/indicator.min.css +1 -0
  67. package/dist/components/input.css +134 -0
  68. package/dist/components/input.min.css +1 -0
  69. package/dist/components/line-chart.css +157 -0
  70. package/dist/components/line-chart.min.css +1 -0
  71. package/dist/components/list.css +90 -0
  72. package/dist/components/list.min.css +1 -0
  73. package/dist/components/menu.css +208 -0
  74. package/dist/components/menu.min.css +1 -0
  75. package/dist/components/multiselect.css +397 -0
  76. package/dist/components/multiselect.min.css +1 -0
  77. package/dist/components/nav-bar.css +75 -0
  78. package/dist/components/nav-bar.min.css +1 -0
  79. package/dist/components/nav-menu.css +173 -0
  80. package/dist/components/nav-menu.min.css +1 -0
  81. package/dist/components/number-input.css +272 -0
  82. package/dist/components/number-input.min.css +1 -0
  83. package/dist/components/pagination.css +128 -0
  84. package/dist/components/pagination.min.css +1 -0
  85. package/dist/components/panel.css +96 -0
  86. package/dist/components/panel.min.css +1 -0
  87. package/dist/components/pin-input.css +185 -0
  88. package/dist/components/pin-input.min.css +1 -0
  89. package/dist/components/popover.css +227 -0
  90. package/dist/components/popover.min.css +1 -0
  91. package/dist/components/progress.css +148 -0
  92. package/dist/components/progress.min.css +1 -0
  93. package/dist/components/radio-group.css +64 -0
  94. package/dist/components/radio-group.min.css +1 -0
  95. package/dist/components/radio.css +174 -0
  96. package/dist/components/radio.min.css +1 -0
  97. package/dist/components/scroll-area.css +83 -0
  98. package/dist/components/scroll-area.min.css +1 -0
  99. package/dist/components/segmented-control.css +158 -0
  100. package/dist/components/segmented-control.min.css +1 -0
  101. package/dist/components/select.css +207 -0
  102. package/dist/components/select.min.css +1 -0
  103. package/dist/components/sidebar.css +62 -0
  104. package/dist/components/sidebar.min.css +1 -0
  105. package/dist/components/skeleton.css +85 -0
  106. package/dist/components/skeleton.min.css +1 -0
  107. package/dist/components/slider.css +193 -0
  108. package/dist/components/slider.min.css +1 -0
  109. package/dist/components/spinner.css +100 -0
  110. package/dist/components/spinner.min.css +1 -0
  111. package/dist/components/stat.css +177 -0
  112. package/dist/components/stat.min.css +1 -0
  113. package/dist/components/status-dot.css +60 -0
  114. package/dist/components/status-dot.min.css +1 -0
  115. package/dist/components/stepper.css +114 -0
  116. package/dist/components/stepper.min.css +1 -0
  117. package/dist/components/switch.css +175 -0
  118. package/dist/components/switch.min.css +1 -0
  119. package/dist/components/table.css +416 -0
  120. package/dist/components/table.min.css +1 -0
  121. package/dist/components/tabs.css +185 -0
  122. package/dist/components/tabs.min.css +1 -0
  123. package/dist/components/tag.css +134 -0
  124. package/dist/components/tag.min.css +1 -0
  125. package/dist/components/tags-input.css +267 -0
  126. package/dist/components/tags-input.min.css +1 -0
  127. package/dist/components/textarea.css +127 -0
  128. package/dist/components/textarea.min.css +1 -0
  129. package/dist/components/toast.css +200 -0
  130. package/dist/components/toast.min.css +1 -0
  131. package/dist/components/toggle-group.css +59 -0
  132. package/dist/components/toggle-group.min.css +1 -0
  133. package/dist/components/toggle.css +139 -0
  134. package/dist/components/toggle.min.css +1 -0
  135. package/dist/components/tooltip.css +221 -0
  136. package/dist/components/tooltip.min.css +1 -0
  137. package/dist/core.css +9657 -0
  138. package/dist/core.min.css +1 -0
  139. package/dist/dtcg/aurora.dark.tokens.json +4723 -0
  140. package/dist/dtcg/aurora.light.tokens.json +4723 -0
  141. package/dist/dtcg/capsule.dark.tokens.json +4723 -0
  142. package/dist/dtcg/capsule.light.tokens.json +4723 -0
  143. package/dist/dtcg/console.dark.tokens.json +4723 -0
  144. package/dist/dtcg/console.light.tokens.json +4723 -0
  145. package/dist/dtcg/dune.dark.tokens.json +4723 -0
  146. package/dist/dtcg/dune.light.tokens.json +4723 -0
  147. package/dist/dtcg/iris.dark.tokens.json +4723 -0
  148. package/dist/dtcg/iris.light.tokens.json +4723 -0
  149. package/dist/dtcg/loft.dark.tokens.json +5203 -0
  150. package/dist/dtcg/loft.light.tokens.json +5203 -0
  151. package/dist/dtcg/orbit.dark.tokens.json +4723 -0
  152. package/dist/dtcg/orbit.light.tokens.json +4723 -0
  153. package/dist/dtcg/paper.dark.tokens.json +4723 -0
  154. package/dist/dtcg/paper.light.tokens.json +4723 -0
  155. package/dist/dtcg/slab.dark.tokens.json +4969 -0
  156. package/dist/dtcg/slab.light.tokens.json +4969 -0
  157. package/dist/dtcg/void.dark.tokens.json +4723 -0
  158. package/dist/dtcg/void.light.tokens.json +4723 -0
  159. package/dist/dtcg/voidable.resolver.json +117 -0
  160. package/dist/exports.json +708 -0
  161. package/dist/json/aurora.dark.json +394 -0
  162. package/dist/json/aurora.light.json +394 -0
  163. package/dist/json/capsule.dark.json +394 -0
  164. package/dist/json/capsule.light.json +394 -0
  165. package/dist/json/console.dark.json +394 -0
  166. package/dist/json/console.light.json +394 -0
  167. package/dist/json/dune.dark.json +394 -0
  168. package/dist/json/dune.light.json +394 -0
  169. package/dist/json/iris.dark.json +394 -0
  170. package/dist/json/iris.light.json +394 -0
  171. package/dist/json/loft.dark.json +423 -0
  172. package/dist/json/loft.light.json +423 -0
  173. package/dist/json/orbit.dark.json +394 -0
  174. package/dist/json/orbit.light.json +394 -0
  175. package/dist/json/paper.dark.json +394 -0
  176. package/dist/json/paper.light.json +394 -0
  177. package/dist/json/slab.dark.json +412 -0
  178. package/dist/json/slab.light.json +412 -0
  179. package/dist/json/void.dark.json +394 -0
  180. package/dist/json/void.light.json +394 -0
  181. package/dist/knobs.css +21 -0
  182. package/dist/knobs.json +362 -0
  183. package/dist/knobs.min.css +1 -0
  184. package/dist/layers.css +2 -0
  185. package/dist/layers.min.css +1 -0
  186. package/dist/names.d.ts +519 -0
  187. package/dist/names.js +719 -0
  188. package/dist/patterns/app-shell.css +136 -0
  189. package/dist/patterns/app-shell.min.css +1 -0
  190. package/dist/patterns/data.css +430 -0
  191. package/dist/patterns/data.min.css +1 -0
  192. package/dist/patterns/media.css +288 -0
  193. package/dist/patterns/media.min.css +1 -0
  194. package/dist/patterns/page.css +323 -0
  195. package/dist/patterns/page.min.css +1 -0
  196. package/dist/patterns/shell.css +328 -0
  197. package/dist/patterns/shell.min.css +1 -0
  198. package/dist/primitives.css +175 -0
  199. package/dist/primitives.min.css +1 -0
  200. package/dist/reset.css +44 -0
  201. package/dist/reset.min.css +1 -0
  202. package/dist/skin.d.ts +14 -0
  203. package/dist/skin.js +158 -0
  204. package/dist/skins/loft.css +94 -0
  205. package/dist/skins/loft.min.css +1 -0
  206. package/dist/skins/slab.css +99 -0
  207. package/dist/skins/slab.min.css +1 -0
  208. package/dist/themes/aurora.css +18 -0
  209. package/dist/themes/aurora.min.css +1 -0
  210. package/dist/themes/capsule.css +18 -0
  211. package/dist/themes/capsule.min.css +1 -0
  212. package/dist/themes/console.css +18 -0
  213. package/dist/themes/console.min.css +1 -0
  214. package/dist/themes/dune.css +18 -0
  215. package/dist/themes/dune.min.css +1 -0
  216. package/dist/themes/iris.css +18 -0
  217. package/dist/themes/iris.min.css +1 -0
  218. package/dist/themes/orbit.css +18 -0
  219. package/dist/themes/orbit.min.css +1 -0
  220. package/dist/themes/paper.css +19 -0
  221. package/dist/themes/paper.min.css +1 -0
  222. package/dist/themes/void.css +18 -0
  223. package/dist/themes/void.min.css +1 -0
  224. package/dist/tokens.css +695 -0
  225. package/dist/tokens.min.css +1 -0
  226. package/dist/type.css +99 -0
  227. package/dist/type.min.css +1 -0
  228. package/dist/void.css +9673 -0
  229. package/dist/void.min.css +1 -0
  230. package/package.json +66 -8
  231. package/src/app-shell/detail.css +7 -5
  232. package/src/app-shell/subtable.css +7 -6
  233. package/src/base.css +28 -0
  234. package/src/components/accordion.css +96 -19
  235. package/src/components/action-input.css +51 -61
  236. package/src/components/alert.css +63 -23
  237. package/src/components/avatar.css +0 -2
  238. package/src/components/badge.css +35 -25
  239. package/src/components/banner.css +60 -19
  240. package/src/components/bar-chart.css +10 -3
  241. package/src/components/breadcrumbs.css +20 -16
  242. package/src/components/button.css +130 -55
  243. package/src/components/calendar.css +40 -17
  244. package/src/components/card.css +122 -23
  245. package/src/components/carousel.css +85 -118
  246. package/src/components/checkbox-group.css +3 -1
  247. package/src/components/checkbox.css +18 -23
  248. package/src/components/collapsible.css +95 -29
  249. package/src/components/color-picker.css +10 -10
  250. package/src/components/combobox.css +47 -29
  251. package/src/components/compose-input.css +3 -3
  252. package/src/components/dialog.css +115 -41
  253. package/src/components/divider.css +7 -4
  254. package/src/components/donut-chart.css +25 -15
  255. package/src/components/drawer.css +135 -68
  256. package/src/components/dropdown-menu.css +21 -43
  257. package/src/components/editable.css +7 -7
  258. package/src/components/error-fallback.css +48 -27
  259. package/src/components/field.css +12 -5
  260. package/src/components/file-upload.css +2 -1
  261. package/src/components/gauge.css +35 -23
  262. package/src/components/hamburger.css +10 -10
  263. package/src/components/hover-card.css +13 -113
  264. package/src/components/indicator.css +22 -18
  265. package/src/components/input.css +15 -12
  266. package/src/components/line-chart.css +10 -10
  267. package/src/components/list.css +28 -7
  268. package/src/components/menu.css +48 -33
  269. package/src/components/multiselect.css +57 -40
  270. package/src/components/nav-bar.css +23 -14
  271. package/src/components/nav-menu.css +31 -22
  272. package/src/components/number-input.css +56 -79
  273. package/src/components/overlay.css +215 -0
  274. package/src/components/pagination.css +42 -31
  275. package/src/components/panel.css +37 -11
  276. package/src/components/pin-input.css +23 -22
  277. package/src/components/popover.css +19 -35
  278. package/src/components/progress.css +19 -10
  279. package/src/components/radio-group.css +2 -1
  280. package/src/components/radio.css +15 -20
  281. package/src/components/scroll-area.css +3 -3
  282. package/src/components/segmented-control.css +46 -29
  283. package/src/components/select.css +99 -31
  284. package/src/components/sidebar.css +8 -4
  285. package/src/components/skeleton.css +8 -3
  286. package/src/components/slider.css +4 -2
  287. package/src/components/spinner.css +5 -4
  288. package/src/components/stat.css +59 -52
  289. package/src/components/status-dot.css +0 -1
  290. package/src/components/switch.css +18 -26
  291. package/src/components/table.css +443 -16
  292. package/src/components/tabs.css +92 -29
  293. package/src/components/tag.css +44 -20
  294. package/src/components/tags-input.css +43 -55
  295. package/src/components/textarea.css +15 -12
  296. package/src/components/toast.css +84 -22
  297. package/src/components/toggle.css +35 -42
  298. package/src/components/tooltip.css +19 -38
  299. package/src/core.css +98 -0
  300. package/src/forced-colors.css +134 -0
  301. package/src/index.css +4 -77
  302. package/src/knobs.css +101 -0
  303. package/src/layers.css +38 -0
  304. package/src/media/media.css +258 -0
  305. package/src/media/surface.css +143 -0
  306. package/src/patterns/data.css +461 -0
  307. package/src/patterns/page.css +348 -0
  308. package/src/patterns/shell.css +371 -0
  309. package/src/pre-upgrade.css +202 -0
  310. package/src/primitives.css +19 -97
  311. package/src/reset.css +45 -21
  312. package/src/skins/loft.css +114 -0
  313. package/src/skins/slab.css +107 -0
  314. package/src/themes/aurora.css +16 -0
  315. package/src/themes/capsule.css +16 -0
  316. package/src/themes/console.css +16 -0
  317. package/src/themes/dune.css +16 -0
  318. package/src/themes/iris.css +16 -0
  319. package/src/themes/orbit.css +16 -0
  320. package/src/themes/paper.css +18 -0
  321. package/src/themes/void.css +16 -0
  322. package/src/tokens.css +552 -98
  323. package/src/type.css +103 -0
@@ -1,47 +1,146 @@
1
+ /* A card is a hairline and, by default, a fill you can barely see
2
+ (the chrome knob sets both). It is not a shadow: only the elevated
3
+ variant, for things that overlap the page, casts one. */
4
+ /* @tokens void-card
5
+ --void-card-surface Fill of the default card. The elevated variant takes the float role, the bordered variant has none.
6
+ --void-card-border Edge colour of the default card.
7
+ --void-card-border-width Edge thickness, every variant.
8
+ --void-card-radius Corner radius; the header, body and footer follow it.
9
+ --void-card-shadow Shadow of the default card.
10
+ --void-card-padding Padding of the header (inline), the body and the footer (inline). Applies whatever the padding attribute says, except padding="none". */
11
+
1
12
  void-card {
13
+ --_void-card-padding: var(--void-card-padding, var(--void-container-padding));
14
+
2
15
  display: flex;
3
16
  flex-direction: column;
4
- border: 1px solid var(--void-color-border);
5
- border-radius: var(--void-radius-lg);
6
- overflow: auto;
7
- background: var(--void-color-bg-secondary);
17
+ --_void-card-radius: var(--void-card-radius, var(--void-container-radius));
18
+ --_void-card-border-width: var(--void-card-border-width, var(--void-container-border-width));
19
+ border: var(--_void-card-border-width) solid var(--void-card-border, var(--void-container-border));
20
+ border-radius: var(--_void-card-radius);
21
+ /* visible: the card is neither a scroll container (its automatic minimum
22
+ size stays content-based, so flex parents cannot shrink it) nor a clip
23
+ (dropdowns, popovers, tooltips and calendars may extend past its edge).
24
+ The header and body carry the corner radii instead. Opt in to scrolling
25
+ with [scrollable]. */
26
+ overflow: visible;
27
+ --_void-card-inner-radius: max(0px, calc(var(--_void-card-radius) - var(--_void-card-border-width)));
28
+ background: var(--void-card-surface, var(--void-container-surface));
29
+ box-shadow: var(--void-card-shadow, var(--void-container-shadow));
8
30
  font-family: var(--void-font-sans);
9
31
  }
10
32
 
33
+ void-card[scrollable] {
34
+ overflow: auto;
35
+ min-height: 0;
36
+ }
37
+
11
38
  void-card[variant="elevated"] {
12
- background: var(--void-color-bg-elevated);
13
- border: none;
14
- box-shadow: var(--void-shadow-md);
39
+ background: var(--void-float-surface);
40
+ border-color: var(--void-float-border);
41
+ box-shadow: var(--void-float-shadow);
15
42
  }
16
43
 
17
- void-card[variant="outlined"] {
44
+ /* No fill and no shadow: only a line, the frame rule (a skin's container
45
+ edge may be invisible, and a bordered card is nothing but its edge). */
46
+ void-card[variant="bordered"] {
18
47
  background: transparent;
19
- border: 1px solid var(--void-color-border);
48
+ border: var(--void-rule-frame);
49
+ box-shadow: none;
50
+ }
51
+
52
+ /* Parts (CSS-only): header (title, description, anything at its far end),
53
+ body, footer. The card renders nothing itself. */
54
+ void-card-header {
55
+ display: flex;
56
+ flex-wrap: wrap;
57
+ align-items: baseline;
58
+ /* The header is as tall as a large control (44px by default), rule
59
+ included, and its lines sit in the middle of it. A header with only a
60
+ title, one with a badge and one with a small button are then the same
61
+ height, where each used to be as tall as its tallest child plus padding. */
62
+ align-content: center;
63
+ min-height: var(--void-control-height-lg);
64
+ column-gap: var(--void-space-3);
65
+ row-gap: var(--void-space-1);
66
+ border-radius: var(--_void-card-inner-radius) var(--_void-card-inner-radius) 0 0;
67
+ padding: var(--void-space-2) var(--_void-card-padding);
68
+ border-bottom: var(--void-rule-head);
69
+ }
70
+
71
+ void-card-title {
72
+ font-family: var(--void-type-heading-family);
73
+ font-size: var(--void-type-body-size);
74
+ line-height: var(--void-type-heading-leading);
75
+ font-weight: var(--void-type-heading-weight);
76
+ letter-spacing: var(--void-type-heading-tracking);
77
+ color: var(--void-type-heading-color);
78
+ }
79
+
80
+ /* Whatever follows the title and description (a badge, void-actions) sits at the far end. */
81
+ void-card-header > :not(void-card-title, void-card-description):first-of-type {
82
+ margin-inline-start: auto;
83
+ }
84
+
85
+ void-card-description {
86
+ flex-basis: 100%;
87
+ font-size: var(--void-type-caption-size);
88
+ color: var(--void-color-text-secondary);
89
+ }
90
+
91
+ void-card-body {
92
+ display: block;
93
+ padding: var(--_void-card-padding);
94
+ }
95
+
96
+ /* Blocks written straight into the body (a paragraph, then a field) sit a
97
+ step apart. The scoped reset removes every margin, so without this a label
98
+ sat directly under the sentence above it. Only block-level content is
99
+ named: text with inline markup, and a row of buttons, are left alone. For
100
+ another rhythm, wrap the content in void-stack. */
101
+ void-card-body > :where(p, ul, ol, dl, pre, blockquote, form, fieldset, table, figure, div, section, h2, h3, h4, h5, h6, void-field, void-stack, void-alert, void-banner, void-rows, void-description-list, void-checkbox-group, void-radio-group, void-table, void-card, void-panel, void-list, void-divider, void-figures, void-split, void-input, void-textarea, void-select, void-combobox, void-progress) + :where(p, ul, ol, dl, pre, blockquote, form, fieldset, table, figure, div, section, h2, h3, h4, h5, h6, void-field, void-stack, void-alert, void-banner, void-rows, void-description-list, void-checkbox-group, void-radio-group, void-table, void-card, void-panel, void-list, void-divider, void-figures, void-split, void-input, void-textarea, void-select, void-combobox, void-progress) {
102
+ margin-block-start: var(--void-gap-inside);
103
+ }
104
+
105
+ void-card-footer {
106
+ display: flex;
107
+ flex-wrap: wrap;
108
+ align-items: center;
109
+ gap: var(--void-space-2);
110
+ padding: var(--void-space-3) var(--_void-card-padding);
111
+ border-top: var(--void-rule-between);
112
+ }
113
+
114
+ /* The first part takes the top corners, the last the bottom ones. */
115
+ void-card > :first-child {
116
+ border-top-left-radius: var(--_void-card-inner-radius);
117
+ border-top-right-radius: var(--_void-card-inner-radius);
20
118
  }
21
119
 
22
- .void-card-header {
23
- padding: var(--void-space-4) var(--void-space-4) var(--void-space-3);
24
- border-bottom: 1px solid var(--void-color-border);
120
+ void-card > :last-child {
121
+ border-bottom-left-radius: var(--_void-card-inner-radius);
122
+ border-bottom-right-radius: var(--_void-card-inner-radius);
25
123
  }
26
124
 
27
- .void-card-heading {
28
- font-size: var(--void-text-base);
29
- font-weight: var(--void-weight-semibold);
30
- color: var(--void-color-text);
125
+ /* Edge-to-edge media: the first and last child follow the body's corners. */
126
+ void-card[padding="none"] > void-card-body > :first-child {
127
+ border-top-left-radius: inherit;
128
+ border-top-right-radius: inherit;
31
129
  }
32
130
 
33
- .void-card-body {
34
- padding: var(--void-space-4);
131
+ void-card[padding="none"] > void-card-body > :last-child {
132
+ border-bottom-left-radius: inherit;
133
+ border-bottom-right-radius: inherit;
35
134
  }
36
135
 
37
- void-card[padding="none"] .void-card-body {
136
+ void-card[padding="none"] > void-card-body {
38
137
  padding: 0;
39
138
  }
40
139
 
41
- void-card[padding="sm"] .void-card-body {
42
- padding: var(--void-space-2);
140
+ void-card[padding="sm"] {
141
+ --_void-card-padding: var(--void-card-padding, var(--void-space-3));
43
142
  }
44
143
 
45
- void-card[padding="lg"] .void-card-body {
46
- padding: var(--void-space-6);
144
+ void-card[padding="lg"] {
145
+ --_void-card-padding: var(--void-card-padding, var(--void-space-8));
47
146
  }
@@ -2,20 +2,27 @@ void-carousel {
2
2
  display: block;
3
3
  position: relative;
4
4
  font-family: var(--void-font-sans);
5
+ --_void-carousel-control: 2rem;
6
+ --_void-carousel-glyph: 0.4rem;
7
+ --_void-carousel-dot: 0.5rem;
5
8
  }
6
9
 
7
- .void-carousel-viewport {
10
+ /* ── Slides: the content part is the window, the items slide inside it ── */
11
+
12
+ void-carousel-content {
13
+ display: flex;
8
14
  overflow: hidden;
9
15
  order: -1;
10
16
  }
11
17
 
12
- .void-carousel-track {
13
- display: flex;
18
+ void-carousel-item {
19
+ flex: 0 0 100%;
20
+ min-width: 0;
21
+ overflow: hidden;
14
22
  transition: transform var(--void-duration-slow) var(--void-ease-in-out);
15
23
  }
16
24
 
17
- void-carousel[orientation="horizontal"] .void-carousel-track {
18
- flex-direction: row;
25
+ void-carousel[orientation="horizontal"] void-carousel-item {
19
26
  transform: translateX(calc(var(--void-carousel-offset, 0) * -100%));
20
27
  }
21
28
 
@@ -24,39 +31,31 @@ void-carousel[orientation="vertical"] {
24
31
  flex-direction: column;
25
32
  }
26
33
 
27
- void-carousel[orientation="vertical"] .void-carousel-viewport {
34
+ void-carousel[orientation="vertical"] void-carousel-content {
28
35
  flex: 1;
29
36
  min-height: 0;
30
- }
31
-
32
- void-carousel[orientation="vertical"] .void-carousel-track {
33
37
  flex-direction: column;
34
- height: 100%;
35
- transform: translateY(calc(var(--void-carousel-offset, 0) * -100%));
36
38
  }
37
39
 
38
- void-carousel[orientation="vertical"] void-carousel-slide {
40
+ void-carousel[orientation="vertical"] void-carousel-item {
39
41
  min-height: 0;
40
42
  height: 100%;
43
+ transform: translateY(calc(var(--void-carousel-offset, 0) * -100%));
41
44
  }
42
45
 
43
- void-carousel-slide {
44
- flex: 0 0 100%;
45
- min-width: 0;
46
- overflow: hidden;
47
- }
48
-
49
- /* ── Prev / Next controls ── */
46
+ /* ── Previous / next: the parts are the buttons; the arrow is drawn when they are empty ── */
50
47
 
51
- .void-carousel-prev,
52
- .void-carousel-next {
53
- appearance: none;
48
+ void-carousel-previous,
49
+ void-carousel-next {
54
50
  position: absolute;
55
- top: 50%;
51
+ inset-block-start: 50%;
56
52
  transform: translateY(-50%);
57
53
  display: inline-flex;
58
54
  align-items: center;
59
55
  justify-content: center;
56
+ width: var(--_void-carousel-control);
57
+ height: var(--_void-carousel-control);
58
+ box-sizing: border-box;
60
59
  border: 1px solid var(--void-color-border);
61
60
  border-radius: var(--void-radius-full);
62
61
  background: var(--void-color-bg);
@@ -68,85 +67,104 @@ void-carousel-slide {
68
67
  z-index: 1;
69
68
  }
70
69
 
71
- .void-carousel-prev {
72
- left: var(--void-space-2);
70
+ void-carousel-previous {
71
+ inset-inline-start: var(--void-space-2);
73
72
  }
74
73
 
75
- .void-carousel-next {
76
- right: var(--void-space-2);
74
+ void-carousel-next {
75
+ inset-inline-end: var(--void-space-2);
77
76
  }
78
77
 
79
- .void-carousel-prev svg,
80
- .void-carousel-next svg {
81
- width: 1rem;
82
- height: 1rem;
78
+ /* The default arrow: a chevron of two borders, as thick as the icon stroke. */
79
+ void-carousel-previous:empty::before,
80
+ void-carousel-next:empty::before {
81
+ content: "";
82
+ width: var(--_void-carousel-glyph);
83
+ height: var(--_void-carousel-glyph);
84
+ border-style: solid;
85
+ border-color: currentColor;
86
+ border-width: 0;
87
+ border-inline-start-width: calc(var(--void-icon-stroke-width) * 1px);
88
+ border-block-end-width: calc(var(--void-icon-stroke-width) * 1px);
83
89
  }
84
90
 
85
- .void-carousel-prev:hover:not(:disabled),
86
- .void-carousel-next:hover:not(:disabled) {
91
+ void-carousel-previous:empty::before {
92
+ transform: translateX(25%) rotate(45deg);
93
+ }
94
+
95
+ void-carousel-next:empty::before {
96
+ transform: translateX(-25%) rotate(225deg);
97
+ }
98
+
99
+ void-carousel-previous:hover:not([aria-disabled="true"]),
100
+ void-carousel-next:hover:not([aria-disabled="true"]) {
87
101
  background: var(--void-color-bg-hover);
88
102
  border-color: var(--void-color-border-strong);
89
103
  }
90
104
 
91
- .void-carousel-prev:focus-visible,
92
- .void-carousel-next:focus-visible {
93
- outline: 2px solid var(--void-color-accent);
94
- outline-offset: 2px;
105
+ void-carousel-previous:focus-visible,
106
+ void-carousel-next:focus-visible {
107
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
108
+ outline-offset: var(--void-focus-ring-offset);
95
109
  }
96
110
 
97
- .void-carousel-prev:disabled,
98
- .void-carousel-next:disabled {
111
+ void-carousel-previous[aria-disabled="true"],
112
+ void-carousel-next[aria-disabled="true"] {
99
113
  opacity: 0.4;
100
114
  cursor: not-allowed;
101
115
  }
102
116
 
103
117
  /* ── Vertical orientation controls ── */
104
118
 
105
- void-carousel[orientation="vertical"] .void-carousel-prev,
106
- void-carousel[orientation="vertical"] .void-carousel-next {
119
+ void-carousel[orientation="vertical"] void-carousel-previous,
120
+ void-carousel[orientation="vertical"] void-carousel-next {
107
121
  position: static;
108
122
  transform: none;
109
123
  align-self: center;
110
124
  }
111
125
 
112
- void-carousel[orientation="vertical"] .void-carousel-prev {
126
+ void-carousel[orientation="vertical"] void-carousel-previous {
113
127
  order: -2;
114
128
  }
115
129
 
116
- void-carousel[orientation="vertical"] .void-carousel-next {
130
+ void-carousel[orientation="vertical"] void-carousel-next {
117
131
  order: 1;
118
132
  }
119
133
 
120
- void-carousel[orientation="vertical"] .void-carousel-prev svg {
121
- transform: rotate(90deg);
134
+ void-carousel[orientation="vertical"] void-carousel-previous:empty::before {
135
+ transform: translateY(25%) rotate(135deg);
122
136
  }
123
137
 
124
- void-carousel[orientation="vertical"] .void-carousel-next svg {
125
- transform: rotate(90deg);
138
+ void-carousel[orientation="vertical"] void-carousel-next:empty::before {
139
+ transform: translateY(-25%) rotate(315deg);
126
140
  }
127
141
 
128
- void-carousel[orientation="vertical"] .void-carousel-indicators {
142
+ void-carousel[orientation="vertical"] void-carousel-indicators {
129
143
  position: absolute;
130
- right: var(--void-space-2);
131
- top: 50%;
144
+ inset-inline-end: var(--void-space-2);
145
+ inset-block-start: 50%;
132
146
  transform: translateY(-50%);
133
147
  flex-direction: column;
134
148
  padding: var(--void-space-3);
135
149
  z-index: 1;
136
150
  }
137
151
 
138
- /* ── Dot indicators ── */
152
+ /* ── Dot indicators: the part holds one generated button per slide ── */
139
153
 
140
- .void-carousel-indicators {
154
+ void-carousel-indicators {
141
155
  display: flex;
142
156
  align-items: center;
143
157
  justify-content: center;
144
158
  gap: var(--void-space-2);
145
159
  padding: var(--void-space-3) 0;
160
+ /* The dots are made after upgrade; the empty part already holds their height. */
161
+ min-height: var(--_void-carousel-dot);
146
162
  }
147
163
 
148
- .void-carousel-dot {
164
+ void-carousel-indicators > button {
149
165
  appearance: none;
166
+ width: var(--_void-carousel-dot);
167
+ height: var(--_void-carousel-dot);
150
168
  border: none;
151
169
  background: var(--void-color-border);
152
170
  border-radius: var(--void-radius-full);
@@ -156,81 +174,30 @@ void-carousel[orientation="vertical"] .void-carousel-indicators {
156
174
  transform var(--void-duration-fast) var(--void-ease-in-out);
157
175
  }
158
176
 
159
- .void-carousel-dot:hover {
177
+ void-carousel-indicators > button:hover {
160
178
  background: var(--void-color-text-secondary);
161
179
  }
162
180
 
163
- .void-carousel-dot:focus-visible {
164
- outline: 2px solid var(--void-color-accent);
165
- outline-offset: 2px;
181
+ void-carousel-indicators > button:focus-visible {
182
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
183
+ outline-offset: var(--void-focus-ring-offset);
166
184
  }
167
185
 
168
- .void-carousel-dot[aria-selected="true"] {
186
+ void-carousel-indicators > button[aria-selected="true"] {
169
187
  background: var(--void-color-accent);
170
- }
171
-
172
- /* ── Sizes ── */
173
-
174
- /* sm */
175
- void-carousel[size="sm"] .void-carousel-prev,
176
- void-carousel[size="sm"] .void-carousel-next {
177
- width: 1.5rem;
178
- height: 1.5rem;
179
- }
180
-
181
- void-carousel[size="sm"] .void-carousel-prev svg,
182
- void-carousel[size="sm"] .void-carousel-next svg {
183
- width: 0.75rem;
184
- height: 0.75rem;
185
- }
186
-
187
- void-carousel[size="sm"] .void-carousel-dot {
188
- width: 0.375rem;
189
- height: 0.375rem;
190
- }
191
-
192
- void-carousel[size="sm"] .void-carousel-dot[aria-selected="true"] {
193
188
  transform: scale(1.25);
194
189
  }
195
190
 
196
- /* md (default) */
197
- void-carousel[size="md"] .void-carousel-prev,
198
- void-carousel[size="md"] .void-carousel-next,
199
- void-carousel:not([size]) .void-carousel-prev,
200
- void-carousel:not([size]) .void-carousel-next {
201
- width: 2rem;
202
- height: 2rem;
203
- }
204
-
205
- void-carousel[size="md"] .void-carousel-dot,
206
- void-carousel:not([size]) .void-carousel-dot {
207
- width: 0.5rem;
208
- height: 0.5rem;
209
- }
210
-
211
- void-carousel[size="md"] .void-carousel-dot[aria-selected="true"],
212
- void-carousel:not([size]) .void-carousel-dot[aria-selected="true"] {
213
- transform: scale(1.25);
214
- }
215
-
216
- /* lg */
217
- void-carousel[size="lg"] .void-carousel-prev,
218
- void-carousel[size="lg"] .void-carousel-next {
219
- width: 2.5rem;
220
- height: 2.5rem;
221
- }
222
-
223
- void-carousel[size="lg"] .void-carousel-prev svg,
224
- void-carousel[size="lg"] .void-carousel-next svg {
225
- width: 1.25rem;
226
- height: 1.25rem;
227
- }
191
+ /* ── Sizes ── */
228
192
 
229
- void-carousel[size="lg"] .void-carousel-dot {
230
- width: 0.625rem;
231
- height: 0.625rem;
193
+ void-carousel[size="sm"] {
194
+ --_void-carousel-control: 1.5rem;
195
+ --_void-carousel-glyph: 0.3rem;
196
+ --_void-carousel-dot: 0.375rem;
232
197
  }
233
198
 
234
- void-carousel[size="lg"] .void-carousel-dot[aria-selected="true"] {
235
- transform: scale(1.25);
199
+ void-carousel[size="lg"] {
200
+ --_void-carousel-control: 2.5rem;
201
+ --_void-carousel-glyph: 0.5rem;
202
+ --_void-carousel-dot: 0.625rem;
236
203
  }
@@ -6,7 +6,8 @@ void-checkbox-group {
6
6
  }
7
7
 
8
8
  .void-checkbox-group-label {
9
- font-size: var(--void-text-sm);
9
+ font-size: var(--void-control-text-sm);
10
+ line-height: var(--void-leading-normal);
10
11
  font-weight: var(--void-weight-medium);
11
12
  color: var(--void-color-text);
12
13
  margin-bottom: var(--void-space-1);
@@ -24,4 +25,5 @@ void-checkbox-group[orientation="vertical"] .void-checkbox-group-items {
24
25
  void-checkbox-group[orientation="horizontal"] .void-checkbox-group-items {
25
26
  flex-direction: row;
26
27
  flex-wrap: wrap;
28
+ gap: var(--void-space-2) var(--void-space-5);
27
29
  }
@@ -1,12 +1,12 @@
1
1
  void-checkbox {
2
- --tone: var(--void-color-accent);
2
+ --_void-tone: var(--void-color-accent);
3
3
 
4
4
  display: inline-flex;
5
5
  align-items: center;
6
6
  gap: var(--void-space-2);
7
7
  cursor: pointer;
8
8
  font-family: var(--void-font-sans);
9
- font-size: var(--void-text-sm);
9
+ font-size: var(--void-control-text);
10
10
  color: var(--void-color-text);
11
11
  user-select: none;
12
12
  }
@@ -26,8 +26,8 @@ void-checkbox input[type="checkbox"] {
26
26
  flex-shrink: 0;
27
27
  width: 1.125rem;
28
28
  height: 1.125rem;
29
- border: 1.5px solid var(--void-color-border-strong);
30
- border-radius: var(--void-radius-sm);
29
+ border: 1.5px solid var(--void-control-border);
30
+ border-radius: var(--void-radius-xs);
31
31
  background: transparent;
32
32
  color: var(--void-color-text-on-accent);
33
33
  transition: background var(--void-duration-fast) var(--void-ease-in-out),
@@ -40,30 +40,31 @@ void-checkbox input[type="checkbox"] {
40
40
  }
41
41
 
42
42
  void-checkbox:hover .void-checkbox-box {
43
- border-color: var(--tone);
43
+ border-color: var(--_void-tone);
44
44
  }
45
45
 
46
46
  void-checkbox:focus-visible .void-checkbox-box {
47
- outline: 2px solid var(--void-color-border-focus);
48
- outline-offset: 2px;
47
+ outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
48
+ outline-offset: var(--void-focus-ring-offset);
49
49
  }
50
50
 
51
51
  void-checkbox[checked] .void-checkbox-box {
52
- background: var(--tone);
53
- border-color: var(--tone);
52
+ background: var(--_void-tone);
53
+ border-color: var(--_void-tone);
54
54
  }
55
55
 
56
56
  void-checkbox[indeterminate] .void-checkbox-box {
57
- background: var(--tone);
58
- border-color: var(--tone);
57
+ background: var(--_void-tone);
58
+ border-color: var(--_void-tone);
59
59
  }
60
60
 
61
- void-checkbox[color="error"] { --tone: var(--void-color-error); }
62
- void-checkbox[color="warning"] { --tone: var(--void-color-warning); }
63
- void-checkbox[color="caution"] { --tone: var(--void-color-caution); }
64
- void-checkbox[color="success"] { --tone: var(--void-color-success); }
65
- void-checkbox[color="info"] { --tone: var(--void-color-info); }
66
- void-checkbox[color="notice"] { --tone: var(--void-color-notice); }
61
+ void-checkbox[color="error"] { --_void-tone: var(--void-color-error); }
62
+ void-checkbox[color="warning"] { --_void-tone: var(--void-color-warning); }
63
+ void-checkbox[color="caution"] { --_void-tone: var(--void-color-caution); }
64
+ void-checkbox[color="highlight"] { --_void-tone: var(--void-color-highlight); }
65
+ void-checkbox[color="success"] { --_void-tone: var(--void-color-success); }
66
+ void-checkbox[color="info"] { --_void-tone: var(--void-color-info); }
67
+ void-checkbox[color="notice"] { --_void-tone: var(--void-color-notice); }
67
68
 
68
69
  void-checkbox[size="sm"] { font-size: var(--void-text-xs); }
69
70
  void-checkbox[size="sm"] .void-checkbox-box { width: 0.875rem; height: 0.875rem; }
@@ -71,12 +72,6 @@ void-checkbox[size="sm"] .void-checkbox-box svg { width: 0.625rem; height: 0.625
71
72
  void-checkbox[size="lg"] { font-size: var(--void-text-base); }
72
73
  void-checkbox[size="lg"] .void-checkbox-box { width: 1.375rem; height: 1.375rem; }
73
74
  void-checkbox[size="lg"] .void-checkbox-box svg { width: 1rem; height: 1rem; }
74
- void-checkbox[size="xl"] { font-size: var(--void-text-lg); }
75
- void-checkbox[size="xl"] .void-checkbox-box { width: 1.625rem; height: 1.625rem; }
76
- void-checkbox[size="xl"] .void-checkbox-box svg { width: 1.125rem; height: 1.125rem; }
77
- void-checkbox[size="xxl"] { font-size: var(--void-text-xl); }
78
- void-checkbox[size="xxl"] .void-checkbox-box { width: 1.875rem; height: 1.875rem; }
79
- void-checkbox[size="xxl"] .void-checkbox-box svg { width: 1.25rem; height: 1.25rem; }
80
75
 
81
76
  void-checkbox[disabled] {
82
77
  opacity: 0.5;