opui-css 5.4.2 → 6.0.0-rc.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 (718) hide show
  1. package/CHANGELOG.md +648 -0
  2. package/MIGRATING-legacy.md +159 -0
  3. package/MIGRATING.md +1293 -69
  4. package/README.md +177 -26
  5. package/astro/index.ts +142 -13
  6. package/bin/opui-css.mjs +68 -0
  7. package/components/Accordion/Accordion.astro +6 -33
  8. package/components/Accordion/Accordion.react.tsx +23 -0
  9. package/components/Accordion/Accordion.svelte +27 -0
  10. package/components/Accordion/Accordion.vue +11 -28
  11. package/components/Accordion/AccordionActions.astro +16 -0
  12. package/components/Accordion/AccordionActions.react.tsx +15 -0
  13. package/components/Accordion/AccordionActions.svelte +23 -0
  14. package/components/Accordion/AccordionActions.vue +18 -0
  15. package/components/Accordion/AccordionContent.astro +9 -0
  16. package/components/Accordion/AccordionContent.react.tsx +6 -0
  17. package/components/Accordion/AccordionContent.svelte +15 -0
  18. package/components/Accordion/AccordionContent.vue +12 -0
  19. package/components/Accordion/AccordionSummary.astro +19 -0
  20. package/components/Accordion/AccordionSummary.react.tsx +30 -0
  21. package/components/Accordion/AccordionSummary.svelte +24 -0
  22. package/components/Accordion/AccordionSummary.vue +27 -0
  23. package/components/Accordion/icons.ts +2 -0
  24. package/components/Accordion/types.astro.ts +9 -0
  25. package/components/Accordion/types.react.ts +14 -0
  26. package/components/Accordion/types.svelte.ts +10 -2
  27. package/components/Accordion/types.ts +11 -5
  28. package/components/Accordion/types.vue-props.ts +22 -0
  29. package/components/Anchor/Anchor.astro +21 -33
  30. package/components/Anchor/Anchor.react.tsx +38 -0
  31. package/components/Anchor/Anchor.svelte +47 -0
  32. package/components/Anchor/Anchor.vue +32 -30
  33. package/components/Anchor/AnchorContent.astro +17 -0
  34. package/components/Anchor/AnchorContent.react.tsx +18 -0
  35. package/components/Anchor/AnchorContent.svelte +23 -0
  36. package/components/Anchor/AnchorContent.vue +20 -0
  37. package/components/Anchor/context.astro.ts +4 -0
  38. package/components/Anchor/context.react.ts +8 -0
  39. package/components/Anchor/context.svelte.ts +7 -0
  40. package/components/Anchor/context.vue.ts +4 -0
  41. package/components/Anchor/root.ts +12 -0
  42. package/components/Anchor/types.astro.ts +3 -0
  43. package/components/Anchor/types.react.ts +7 -0
  44. package/components/Anchor/types.svelte.ts +3 -3
  45. package/components/Anchor/types.ts +15 -6
  46. package/components/Anchor/types.vue-props.ts +15 -0
  47. package/components/Avatar/Avatar.astro +12 -8
  48. package/components/Avatar/Avatar.react.tsx +34 -0
  49. package/components/Avatar/Avatar.svelte +39 -0
  50. package/components/Avatar/Avatar.vue +10 -8
  51. package/components/Avatar/AvatarGroup.astro +9 -0
  52. package/components/Avatar/AvatarGroup.react.tsx +12 -0
  53. package/components/Avatar/AvatarGroup.svelte +15 -0
  54. package/components/Avatar/AvatarGroup.vue +12 -0
  55. package/components/Avatar/types.astro.ts +3 -2
  56. package/components/Avatar/types.react.ts +11 -0
  57. package/components/Avatar/types.svelte.ts +3 -4
  58. package/components/Avatar/types.ts +18 -15
  59. package/components/Avatar/types.vue-props.ts +11 -0
  60. package/components/Badge/Badge.astro +27 -22
  61. package/components/Badge/Badge.react.tsx +50 -0
  62. package/components/Badge/Badge.svelte +48 -0
  63. package/components/Badge/Badge.vue +15 -19
  64. package/components/Badge/types.react.ts +6 -0
  65. package/components/Badge/types.svelte.ts +4 -1
  66. package/components/Badge/types.ts +3 -3
  67. package/components/Badge/types.vue-props.ts +7 -0
  68. package/components/Button/Button.astro +12 -12
  69. package/components/Button/Button.react.tsx +33 -0
  70. package/components/Button/Button.svelte +37 -0
  71. package/components/Button/Button.vue +9 -9
  72. package/components/Button/types.astro.ts +2 -2
  73. package/components/Button/types.react.ts +11 -0
  74. package/components/Button/types.svelte.ts +11 -2
  75. package/components/Button/types.ts +20 -4
  76. package/components/Button/types.vue-props.ts +6 -0
  77. package/components/ButtonGroup/ButtonGroup.astro +7 -3
  78. package/components/ButtonGroup/ButtonGroup.react.tsx +30 -0
  79. package/components/ButtonGroup/ButtonGroup.svelte +34 -0
  80. package/components/ButtonGroup/ButtonGroup.vue +10 -7
  81. package/components/ButtonGroup/types.react.ts +4 -0
  82. package/components/ButtonGroup/types.ts +4 -4
  83. package/components/ButtonGroup/types.vue-props.ts +6 -0
  84. package/components/Callout/Callout.astro +7 -59
  85. package/components/Callout/Callout.react.tsx +26 -0
  86. package/components/Callout/Callout.svelte +32 -0
  87. package/components/Callout/Callout.vue +8 -48
  88. package/components/Callout/CalloutContent.astro +9 -0
  89. package/components/Callout/CalloutContent.react.tsx +6 -0
  90. package/components/Callout/CalloutContent.svelte +15 -0
  91. package/components/Callout/CalloutContent.vue +12 -0
  92. package/components/Callout/CalloutIcon.astro +25 -0
  93. package/components/Callout/CalloutIcon.react.tsx +26 -0
  94. package/components/Callout/CalloutIcon.svelte +24 -0
  95. package/components/Callout/CalloutIcon.vue +25 -0
  96. package/components/Callout/context.astro.ts +4 -0
  97. package/components/Callout/context.react.ts +8 -0
  98. package/components/Callout/context.svelte.ts +7 -0
  99. package/components/Callout/context.vue.ts +4 -0
  100. package/components/Callout/icons.ts +23 -0
  101. package/components/Callout/types.astro.ts +5 -0
  102. package/components/Callout/types.react.ts +9 -0
  103. package/components/Callout/types.svelte.ts +5 -3
  104. package/components/Callout/types.ts +5 -5
  105. package/components/Callout/types.vue-props.ts +14 -0
  106. package/components/Card/Card.astro +9 -25
  107. package/components/Card/Card.react.tsx +15 -0
  108. package/components/Card/Card.svelte +23 -0
  109. package/components/Card/Card.vue +10 -20
  110. package/components/Card/CardActions.astro +16 -0
  111. package/components/Card/CardActions.react.tsx +15 -0
  112. package/components/Card/CardActions.svelte +23 -0
  113. package/components/Card/CardActions.vue +18 -0
  114. package/components/Card/CardContent.astro +9 -0
  115. package/components/Card/CardContent.react.tsx +6 -0
  116. package/components/Card/CardContent.svelte +15 -0
  117. package/components/Card/CardContent.vue +12 -0
  118. package/components/Card/CardHeader.astro +9 -0
  119. package/components/Card/CardHeader.react.tsx +6 -0
  120. package/components/Card/CardHeader.svelte +15 -0
  121. package/components/Card/CardHeader.vue +12 -0
  122. package/components/Card/types.astro.ts +6 -0
  123. package/components/Card/types.react.ts +10 -0
  124. package/components/Card/types.svelte.ts +7 -3
  125. package/components/Card/types.ts +7 -7
  126. package/components/Card/types.vue-props.ts +17 -0
  127. package/components/Carousel/Carousel.astro +44 -0
  128. package/components/Carousel/Carousel.react.tsx +47 -0
  129. package/components/Carousel/Carousel.svelte +45 -0
  130. package/components/Carousel/Carousel.vue +44 -0
  131. package/components/Carousel/types.astro.ts +4 -0
  132. package/components/Carousel/types.react.ts +4 -0
  133. package/components/Carousel/types.svelte.ts +4 -0
  134. package/components/Carousel/types.ts +11 -0
  135. package/components/Carousel/types.vue-props.ts +6 -0
  136. package/components/Checkbox/Checkbox.astro +27 -15
  137. package/components/Checkbox/Checkbox.react.tsx +51 -0
  138. package/components/Checkbox/Checkbox.svelte +61 -0
  139. package/components/Checkbox/Checkbox.vue +39 -18
  140. package/components/Checkbox/CheckboxInput.astro +6 -2
  141. package/components/Checkbox/CheckboxInput.react.tsx +39 -0
  142. package/components/Checkbox/CheckboxInput.svelte +34 -0
  143. package/components/Checkbox/CheckboxInput.vue +29 -11
  144. package/components/Checkbox/types.astro.ts +2 -3
  145. package/components/Checkbox/types.react.ts +11 -0
  146. package/components/Checkbox/types.svelte.ts +8 -4
  147. package/components/Checkbox/types.ts +8 -4
  148. package/components/Checkbox/types.vue-props.ts +15 -0
  149. package/components/Chip/Chip.astro +22 -6
  150. package/components/Chip/Chip.react.tsx +45 -0
  151. package/components/Chip/Chip.svelte +45 -0
  152. package/components/Chip/Chip.vue +16 -9
  153. package/components/Chip/types.astro.ts +1 -1
  154. package/components/Chip/types.react.ts +15 -0
  155. package/components/Chip/types.svelte.ts +6 -4
  156. package/components/Chip/types.ts +22 -5
  157. package/components/Chip/types.vue-props.ts +11 -0
  158. package/components/DescriptionList/DescriptionList.astro +6 -2
  159. package/components/DescriptionList/DescriptionList.react.tsx +25 -0
  160. package/components/DescriptionList/DescriptionList.svelte +29 -0
  161. package/components/DescriptionList/DescriptionList.vue +7 -8
  162. package/components/DescriptionList/DescriptionListDescription.astro +9 -0
  163. package/components/DescriptionList/DescriptionListDescription.react.tsx +9 -0
  164. package/components/DescriptionList/DescriptionListDescription.svelte +15 -0
  165. package/components/DescriptionList/DescriptionListDescription.vue +15 -0
  166. package/components/DescriptionList/DescriptionListItem.astro +9 -0
  167. package/components/DescriptionList/DescriptionListItem.react.tsx +6 -0
  168. package/components/DescriptionList/DescriptionListItem.svelte +15 -0
  169. package/components/DescriptionList/{Item.vue → DescriptionListItem.vue} +5 -2
  170. package/components/DescriptionList/DescriptionListTerm.astro +9 -0
  171. package/components/DescriptionList/DescriptionListTerm.react.tsx +6 -0
  172. package/components/DescriptionList/DescriptionListTerm.svelte +15 -0
  173. package/components/DescriptionList/{Term.vue → DescriptionListTerm.vue} +5 -2
  174. package/components/DescriptionList/types.astro.ts +3 -3
  175. package/components/DescriptionList/types.react.ts +10 -0
  176. package/components/DescriptionList/types.svelte.ts +6 -0
  177. package/components/DescriptionList/types.ts +3 -1
  178. package/components/DescriptionList/types.vue-props.ts +12 -0
  179. package/components/Dialog/Dialog.astro +12 -26
  180. package/components/Dialog/Dialog.react.tsx +23 -0
  181. package/components/Dialog/Dialog.svelte +33 -0
  182. package/components/Dialog/Dialog.vue +13 -23
  183. package/components/Dialog/DialogContent.astro +9 -0
  184. package/components/Dialog/DialogContent.react.tsx +6 -0
  185. package/components/Dialog/DialogContent.svelte +15 -0
  186. package/components/Dialog/DialogContent.vue +12 -0
  187. package/components/Dialog/DialogFooter.astro +16 -0
  188. package/components/Dialog/DialogFooter.react.tsx +15 -0
  189. package/components/Dialog/DialogFooter.svelte +23 -0
  190. package/components/Dialog/DialogFooter.vue +18 -0
  191. package/components/Dialog/DialogHeader.astro +9 -0
  192. package/components/Dialog/DialogHeader.react.tsx +6 -0
  193. package/components/Dialog/DialogHeader.svelte +15 -0
  194. package/components/Dialog/DialogHeader.vue +12 -0
  195. package/components/Dialog/DialogTitle.astro +14 -0
  196. package/components/Dialog/DialogTitle.react.tsx +13 -0
  197. package/components/Dialog/DialogTitle.svelte +23 -0
  198. package/components/Dialog/DialogTitle.vue +18 -0
  199. package/components/Dialog/context.astro.ts +4 -0
  200. package/components/Dialog/context.react.ts +8 -0
  201. package/components/Dialog/context.svelte.ts +7 -0
  202. package/components/Dialog/context.vue.ts +4 -0
  203. package/components/Dialog/types.astro.ts +8 -0
  204. package/components/Dialog/types.react.ts +12 -0
  205. package/components/Dialog/types.svelte.ts +11 -3
  206. package/components/Dialog/types.ts +13 -6
  207. package/components/Dialog/types.vue-props.ts +24 -0
  208. package/components/Divider/Divider.astro +29 -7
  209. package/components/Divider/Divider.react.tsx +36 -0
  210. package/components/Divider/Divider.svelte +40 -0
  211. package/components/Divider/Divider.vue +22 -4
  212. package/components/Divider/types.react.ts +4 -0
  213. package/components/Divider/types.ts +3 -1
  214. package/components/Divider/types.vue-props.ts +6 -0
  215. package/components/Drawer/Drawer.astro +13 -18
  216. package/components/Drawer/Drawer.react.tsx +40 -0
  217. package/components/Drawer/Drawer.svelte +50 -0
  218. package/components/Drawer/Drawer.vue +14 -19
  219. package/components/Drawer/DrawerContent.astro +9 -0
  220. package/components/Drawer/DrawerContent.react.tsx +6 -0
  221. package/components/Drawer/DrawerContent.svelte +15 -0
  222. package/components/Drawer/DrawerContent.vue +12 -0
  223. package/components/Drawer/DrawerFooter.astro +9 -4
  224. package/components/Drawer/DrawerFooter.react.tsx +15 -0
  225. package/components/Drawer/DrawerFooter.svelte +23 -0
  226. package/components/Drawer/DrawerFooter.vue +10 -8
  227. package/components/Drawer/DrawerHeader.astro +18 -10
  228. package/components/Drawer/DrawerHeader.react.tsx +41 -0
  229. package/components/Drawer/DrawerHeader.svelte +42 -0
  230. package/components/Drawer/DrawerHeader.vue +18 -19
  231. package/components/Drawer/DrawerTitle.astro +14 -0
  232. package/components/Drawer/DrawerTitle.react.tsx +13 -0
  233. package/components/Drawer/DrawerTitle.svelte +23 -0
  234. package/components/Drawer/DrawerTitle.vue +18 -0
  235. package/components/Drawer/context.astro.ts +4 -0
  236. package/components/Drawer/context.react.ts +8 -0
  237. package/components/Drawer/context.svelte.ts +7 -0
  238. package/components/Drawer/context.vue.ts +4 -0
  239. package/components/Drawer/icons.ts +2 -0
  240. package/components/Drawer/types.astro.ts +5 -1
  241. package/components/Drawer/types.react.ts +13 -0
  242. package/components/Drawer/types.svelte.ts +6 -5
  243. package/components/Drawer/types.ts +15 -10
  244. package/components/Drawer/types.vue-props.ts +24 -0
  245. package/components/FieldDescription/FieldDescription.astro +1 -1
  246. package/components/FieldDescription/FieldDescription.react.tsx +6 -0
  247. package/components/FieldDescription/FieldDescription.svelte +15 -0
  248. package/components/FieldDescription/FieldDescription.vue +3 -3
  249. package/components/FieldDescription/types.react.ts +4 -0
  250. package/components/FieldDescription/types.vue-props.ts +6 -0
  251. package/components/FieldGroup/FieldGroup.astro +15 -15
  252. package/components/FieldGroup/FieldGroup.react.tsx +27 -0
  253. package/components/FieldGroup/FieldGroup.svelte +32 -0
  254. package/components/FieldGroup/FieldGroup.vue +8 -10
  255. package/components/FieldGroup/context.astro.ts +4 -0
  256. package/components/FieldGroup/context.react.ts +8 -0
  257. package/components/FieldGroup/context.svelte.ts +8 -0
  258. package/components/FieldGroup/context.vue.ts +4 -0
  259. package/components/FieldGroup/types.react.ts +4 -0
  260. package/components/FieldGroup/types.ts +3 -1
  261. package/components/FieldGroup/types.vue-props.ts +6 -0
  262. package/components/FieldLegend/FieldLegend.react.tsx +14 -0
  263. package/components/FieldLegend/FieldLegend.svelte +20 -0
  264. package/components/FieldLegend/FieldLegend.vue +8 -6
  265. package/components/FieldLegend/types.react.ts +6 -0
  266. package/components/FieldLegend/types.svelte.ts +3 -3
  267. package/components/FieldLegend/types.vue-props.ts +9 -0
  268. package/components/{FieldSet/FieldSet.astro → Fieldset/Fieldset.astro} +6 -2
  269. package/components/Fieldset/Fieldset.react.tsx +15 -0
  270. package/components/Fieldset/Fieldset.svelte +21 -0
  271. package/components/Fieldset/Fieldset.vue +21 -0
  272. package/components/Fieldset/types.react.ts +6 -0
  273. package/components/Fieldset/types.svelte.ts +6 -0
  274. package/components/Fieldset/types.ts +1 -0
  275. package/components/Fieldset/types.vue-props.ts +9 -0
  276. package/components/Form/Form.react.tsx +9 -0
  277. package/components/Form/Form.svelte +16 -0
  278. package/components/Form/Form.vue +7 -5
  279. package/components/Form/types.react.ts +6 -0
  280. package/components/Form/types.svelte.ts +3 -4
  281. package/components/Form/types.vue-props.ts +9 -0
  282. package/components/List/List.astro +3 -3
  283. package/components/List/List.react.tsx +27 -0
  284. package/components/List/List.svelte +31 -0
  285. package/components/List/List.vue +4 -9
  286. package/components/List/types.react.ts +4 -0
  287. package/components/List/types.ts +2 -3
  288. package/components/List/types.vue-props.ts +6 -0
  289. package/components/ListItem/ListItem.astro +46 -39
  290. package/components/ListItem/ListItem.react.tsx +65 -0
  291. package/components/ListItem/ListItem.svelte +80 -0
  292. package/components/ListItem/ListItem.vue +41 -46
  293. package/components/ListItem/types.astro.ts +2 -3
  294. package/components/ListItem/types.react.ts +17 -0
  295. package/components/ListItem/types.svelte.ts +7 -4
  296. package/components/ListItem/types.ts +14 -11
  297. package/components/ListItem/types.vue-props.ts +14 -0
  298. package/components/Menu/Menu.astro +86 -0
  299. package/components/Menu/Menu.react.tsx +87 -0
  300. package/components/Menu/Menu.svelte +71 -0
  301. package/components/Menu/Menu.vue +76 -0
  302. package/components/Menu/context.astro.ts +4 -0
  303. package/components/Menu/context.react.ts +8 -0
  304. package/components/Menu/context.svelte.ts +7 -0
  305. package/components/Menu/context.vue.ts +4 -0
  306. package/components/Menu/types.astro.ts +12 -0
  307. package/components/Menu/types.react.ts +12 -0
  308. package/components/Menu/types.svelte.ts +12 -0
  309. package/components/Menu/types.ts +23 -0
  310. package/components/Menu/types.vue-props.ts +16 -0
  311. package/components/Progress/Progress.astro +10 -21
  312. package/components/Progress/Progress.react.tsx +27 -0
  313. package/components/Progress/Progress.svelte +30 -0
  314. package/components/Progress/Progress.vue +17 -21
  315. package/components/Progress/types.astro.ts +2 -1
  316. package/components/Progress/types.react.ts +5 -0
  317. package/components/Progress/types.svelte.ts +2 -1
  318. package/components/Progress/types.ts +1 -6
  319. package/components/Progress/types.vue-props.ts +6 -0
  320. package/components/Radio/Radio.astro +29 -15
  321. package/components/Radio/Radio.react.tsx +51 -0
  322. package/components/Radio/Radio.svelte +59 -0
  323. package/components/Radio/Radio.vue +37 -16
  324. package/components/Radio/RadioInput.astro +5 -2
  325. package/components/Radio/RadioInput.react.tsx +10 -0
  326. package/components/Radio/RadioInput.svelte +27 -0
  327. package/components/Radio/RadioInput.vue +28 -3
  328. package/components/Radio/types.astro.ts +2 -1
  329. package/components/Radio/types.react.ts +11 -0
  330. package/components/Radio/types.svelte.ts +9 -5
  331. package/components/Radio/types.ts +9 -4
  332. package/components/Radio/types.vue-props.ts +15 -0
  333. package/components/Range/Range.astro +49 -38
  334. package/components/Range/Range.react.tsx +157 -0
  335. package/components/Range/Range.svelte +136 -0
  336. package/components/Range/Range.vue +116 -32
  337. package/components/Range/types.astro.ts +1 -3
  338. package/components/Range/types.react.ts +10 -0
  339. package/components/Range/types.svelte.ts +8 -3
  340. package/components/Range/types.ts +13 -14
  341. package/components/Range/types.vue-props.ts +16 -0
  342. package/components/Range/value.ts +27 -0
  343. package/components/Select/Select.astro +70 -31
  344. package/components/Select/Select.react.tsx +124 -0
  345. package/components/Select/Select.svelte +123 -0
  346. package/components/Select/Select.vue +108 -36
  347. package/components/Select/selection.ts +11 -0
  348. package/components/Select/types.react.ts +6 -0
  349. package/components/Select/types.svelte.ts +1 -1
  350. package/components/Select/types.ts +16 -13
  351. package/components/Select/types.vue-props.ts +20 -0
  352. package/components/Switch/Switch.astro +22 -26
  353. package/components/Switch/Switch.react.tsx +63 -0
  354. package/components/Switch/Switch.svelte +73 -0
  355. package/components/Switch/Switch.vue +36 -18
  356. package/components/Switch/SwitchInput.astro +5 -2
  357. package/components/Switch/SwitchInput.react.tsx +12 -0
  358. package/components/Switch/SwitchInput.svelte +30 -0
  359. package/components/Switch/SwitchInput.vue +25 -3
  360. package/components/Switch/types.astro.ts +4 -2
  361. package/components/Switch/types.react.ts +11 -0
  362. package/components/Switch/types.svelte.ts +11 -4
  363. package/components/Switch/types.ts +9 -6
  364. package/components/Switch/types.vue-props.ts +17 -0
  365. package/components/Table/Table.astro +15 -2
  366. package/components/Table/Table.react.tsx +24 -0
  367. package/components/Table/Table.svelte +28 -0
  368. package/components/Table/Table.vue +9 -8
  369. package/components/Table/TableBody.astro +9 -0
  370. package/components/Table/TableBody.react.tsx +5 -0
  371. package/components/Table/TableBody.svelte +9 -0
  372. package/components/Table/TableBody.vue +12 -0
  373. package/components/Table/TableCaption.astro +9 -0
  374. package/components/Table/TableCaption.react.tsx +5 -0
  375. package/components/Table/TableCaption.svelte +9 -0
  376. package/components/Table/TableCaption.vue +12 -0
  377. package/components/Table/TableCell.astro +9 -0
  378. package/components/Table/TableCell.react.tsx +6 -0
  379. package/components/Table/TableCell.svelte +16 -0
  380. package/components/Table/TableCell.vue +12 -0
  381. package/components/Table/TableColumn.astro +8 -0
  382. package/components/Table/TableColumn.react.tsx +7 -0
  383. package/components/Table/TableColumn.svelte +8 -0
  384. package/components/Table/TableColumn.vue +12 -0
  385. package/components/Table/TableColumnGroup.astro +9 -0
  386. package/components/Table/TableColumnGroup.react.tsx +5 -0
  387. package/components/Table/TableColumnGroup.svelte +9 -0
  388. package/components/Table/TableColumnGroup.vue +12 -0
  389. package/components/Table/TableFoot.astro +9 -0
  390. package/components/Table/TableFoot.react.tsx +5 -0
  391. package/components/Table/TableFoot.svelte +9 -0
  392. package/components/Table/TableFoot.vue +12 -0
  393. package/components/Table/TableHead.astro +9 -0
  394. package/components/Table/TableHead.react.tsx +5 -0
  395. package/components/Table/TableHead.svelte +9 -0
  396. package/components/Table/TableHead.vue +12 -0
  397. package/components/Table/TableHeaderCell.astro +9 -0
  398. package/components/Table/TableHeaderCell.react.tsx +10 -0
  399. package/components/Table/TableHeaderCell.svelte +16 -0
  400. package/components/Table/TableHeaderCell.vue +12 -0
  401. package/components/Table/TableRow.astro +9 -0
  402. package/components/Table/TableRow.react.tsx +5 -0
  403. package/components/Table/TableRow.svelte +9 -0
  404. package/components/{DescriptionList/Description.vue → Table/TableRow.vue} +3 -3
  405. package/components/Table/types.astro.ts +17 -11
  406. package/components/Table/types.react.ts +22 -0
  407. package/components/Table/types.svelte.ts +19 -7
  408. package/components/Table/types.ts +8 -3
  409. package/components/Table/types.vue-props.ts +28 -0
  410. package/components/Tabs/Tabs.astro +23 -13
  411. package/components/Tabs/Tabs.react.tsx +43 -0
  412. package/components/Tabs/Tabs.svelte +43 -0
  413. package/components/Tabs/Tabs.vue +19 -9
  414. package/components/Tabs/TabsItem.astro +16 -28
  415. package/components/Tabs/TabsItem.react.tsx +47 -0
  416. package/components/Tabs/TabsItem.svelte +52 -0
  417. package/components/Tabs/TabsItem.vue +23 -21
  418. package/components/Tabs/TabsLabel.astro +16 -0
  419. package/components/Tabs/TabsLabel.react.tsx +17 -0
  420. package/components/Tabs/TabsLabel.svelte +19 -0
  421. package/components/Tabs/TabsLabel.vue +16 -0
  422. package/components/Tabs/TabsPanel.astro +2 -9
  423. package/components/Tabs/TabsPanel.react.tsx +6 -0
  424. package/components/Tabs/TabsPanel.svelte +15 -0
  425. package/components/Tabs/TabsPanel.vue +3 -22
  426. package/components/Tabs/context.astro.ts +4 -0
  427. package/components/Tabs/context.react.ts +8 -0
  428. package/components/Tabs/context.svelte.ts +7 -0
  429. package/components/Tabs/context.vue.ts +4 -0
  430. package/components/Tabs/types.astro.ts +5 -3
  431. package/components/Tabs/types.react.ts +12 -0
  432. package/components/Tabs/types.svelte.ts +6 -6
  433. package/components/Tabs/types.ts +10 -8
  434. package/components/Tabs/types.vue-props.ts +25 -0
  435. package/components/TextField/TextField.astro +36 -52
  436. package/components/TextField/TextField.react.tsx +70 -0
  437. package/components/TextField/TextField.svelte +84 -0
  438. package/components/TextField/TextField.vue +59 -39
  439. package/components/TextField/types.astro.ts +1 -3
  440. package/components/TextField/types.react.ts +12 -0
  441. package/components/TextField/types.svelte.ts +2 -4
  442. package/components/TextField/types.ts +11 -25
  443. package/components/TextField/types.vue-props.ts +21 -0
  444. package/components/Textarea/Textarea.astro +34 -48
  445. package/components/Textarea/Textarea.react.tsx +64 -0
  446. package/components/Textarea/Textarea.svelte +80 -0
  447. package/components/Textarea/Textarea.vue +55 -31
  448. package/components/Textarea/types.astro.ts +1 -3
  449. package/components/Textarea/types.react.ts +8 -0
  450. package/components/Textarea/types.svelte.ts +1 -9
  451. package/components/Textarea/types.ts +10 -22
  452. package/components/Textarea/types.vue-props.ts +20 -0
  453. package/components/ToggleButton/ToggleButton.astro +14 -14
  454. package/components/ToggleButton/ToggleButton.react.tsx +57 -0
  455. package/components/ToggleButton/ToggleButton.svelte +58 -0
  456. package/components/ToggleButton/ToggleButton.vue +41 -17
  457. package/components/ToggleButton/types.react.ts +4 -0
  458. package/components/ToggleButton/types.svelte.ts +0 -2
  459. package/components/ToggleButton/types.ts +2 -6
  460. package/components/ToggleButton/types.vue-props.ts +11 -0
  461. package/components/ToggleGroup/ToggleGroup.astro +16 -18
  462. package/components/ToggleGroup/ToggleGroup.react.tsx +54 -0
  463. package/components/ToggleGroup/ToggleGroup.svelte +54 -0
  464. package/components/ToggleGroup/ToggleGroup.vue +29 -20
  465. package/components/ToggleGroup/context.astro.ts +5 -0
  466. package/components/ToggleGroup/context.react.ts +8 -0
  467. package/components/ToggleGroup/context.svelte.ts +8 -0
  468. package/components/ToggleGroup/context.vue.ts +4 -0
  469. package/components/ToggleGroup/selection.ts +12 -0
  470. package/components/ToggleGroup/types.react.ts +12 -0
  471. package/components/ToggleGroup/types.svelte.ts +1 -4
  472. package/components/ToggleGroup/types.ts +11 -9
  473. package/components/ToggleGroup/types.vue-props.ts +6 -0
  474. package/components/Tooltip/Tooltip.astro +6 -7
  475. package/components/Tooltip/Tooltip.react.tsx +24 -0
  476. package/components/Tooltip/Tooltip.svelte +29 -0
  477. package/components/Tooltip/Tooltip.vue +7 -8
  478. package/components/Tooltip/types.react.ts +4 -0
  479. package/components/Tooltip/types.svelte.ts +1 -4
  480. package/components/Tooltip/types.ts +2 -8
  481. package/components/Tooltip/types.vue-props.ts +6 -0
  482. package/components/content.svelte +9 -0
  483. package/components/context.astro.ts +15 -0
  484. package/components/cx.ts +12 -0
  485. package/components/dev.ts +63 -0
  486. package/components/group.ts +2 -0
  487. package/components/id.ts +9 -0
  488. package/components/style.ts +33 -0
  489. package/components/tag.ts +6 -0
  490. package/components/vue.ts +18 -0
  491. package/core/normalize.css +56 -79
  492. package/core/palette.css +99 -282
  493. package/core/utils.css +31 -44
  494. package/css/compat/avatar.css +7 -0
  495. package/css/compat/menu.css +20 -0
  496. package/css/compat.css +3 -0
  497. package/css/components/accordion.css +123 -59
  498. package/css/components/anchor.css +21 -8
  499. package/css/components/avatar.css +57 -17
  500. package/css/components/badge.css +84 -45
  501. package/css/components/button-group.css +120 -129
  502. package/css/components/button.css +326 -116
  503. package/css/components/callout.css +88 -47
  504. package/css/components/card.css +181 -63
  505. package/css/components/carousel.css +399 -0
  506. package/css/components/checkbox.css +27 -148
  507. package/css/components/chip.css +175 -52
  508. package/css/components/choice.css +291 -0
  509. package/css/components/description-list.css +51 -41
  510. package/css/components/dialog.css +120 -30
  511. package/css/components/divider.css +62 -9
  512. package/css/components/drawer.css +181 -51
  513. package/css/components/form.css +51 -66
  514. package/css/components/layout.css +92 -0
  515. package/css/components/link.css +44 -12
  516. package/css/components/list.css +252 -135
  517. package/css/components/menu.css +174 -0
  518. package/css/components/progress.css +37 -29
  519. package/css/components/radio.css +32 -141
  520. package/css/components/range.css +244 -101
  521. package/css/components/select.css +84 -65
  522. package/css/components/spinner.css +31 -12
  523. package/css/components/switch.css +98 -171
  524. package/css/components/table.css +120 -79
  525. package/css/components/tabs.css +230 -36
  526. package/css/components/text-field.css +296 -186
  527. package/css/components/textarea.css +5 -11
  528. package/css/components/toggle-button.css +84 -44
  529. package/css/components/toggle-group.css +62 -32
  530. package/css/components/tooltip.css +87 -30
  531. package/css/components/typography.css +519 -298
  532. package/css/components.css +25 -18
  533. package/css/imports.css +2 -4
  534. package/css/js/checkbox.d.ts +3 -0
  535. package/css/js/checkbox.js +10 -0
  536. package/css/js/range.d.ts +1 -0
  537. package/css/js/range.js +44 -0
  538. package/css/layers.css +2 -0
  539. package/css/theme.css +729 -103
  540. package/dist/op.css +12 -237
  541. package/dist/op.css.map +1 -1
  542. package/dist/opui.baseline-2023.css +9209 -0
  543. package/dist/opui.baseline-2023.css.map +1 -0
  544. package/dist/opui.baseline-2024.css +9209 -0
  545. package/dist/opui.baseline-2024.css.map +1 -0
  546. package/dist/opui.baseline-2025.css +9209 -0
  547. package/dist/opui.baseline-2025.css.map +1 -0
  548. package/dist/opui.baseline-2026.css +9209 -0
  549. package/dist/opui.baseline-2026.css.map +1 -0
  550. package/dist/opui.components.css +5497 -3291
  551. package/dist/opui.components.css.map +1 -1
  552. package/dist/opui.css +6616 -4255
  553. package/dist/opui.css.map +1 -1
  554. package/dist/opui.no-compat.css +9182 -0
  555. package/dist/opui.no-compat.css.map +1 -0
  556. package/env.d.ts +10 -7
  557. package/open-props.css +10 -1
  558. package/package.json +63 -17
  559. package/react/elements.ts +13 -0
  560. package/react/index.ts +176 -0
  561. package/skills/opui/SKILL.md +75 -0
  562. package/skills/opui/references/accordion.md +253 -0
  563. package/skills/opui/references/anchor.md +213 -0
  564. package/skills/opui/references/avatar.md +202 -0
  565. package/skills/opui/references/badge.md +199 -0
  566. package/skills/opui/references/button-group.md +239 -0
  567. package/skills/opui/references/button.md +242 -0
  568. package/skills/opui/references/callout.md +221 -0
  569. package/skills/opui/references/card.md +222 -0
  570. package/skills/opui/references/carousel.md +269 -0
  571. package/skills/opui/references/checkbox.md +241 -0
  572. package/skills/opui/references/chip.md +135 -0
  573. package/skills/opui/references/customizing.md +85 -0
  574. package/skills/opui/references/description-list.md +191 -0
  575. package/skills/opui/references/dialog.md +301 -0
  576. package/skills/opui/references/divider.md +112 -0
  577. package/skills/opui/references/drawer.md +802 -0
  578. package/skills/opui/references/form.md +260 -0
  579. package/skills/opui/references/getting-started.md +398 -0
  580. package/skills/opui/references/index.md +89 -0
  581. package/skills/opui/references/layout.md +161 -0
  582. package/skills/opui/references/list.md +216 -0
  583. package/skills/opui/references/menu.md +248 -0
  584. package/skills/opui/references/progress.md +114 -0
  585. package/skills/opui/references/radio.md +234 -0
  586. package/skills/opui/references/range.md +150 -0
  587. package/skills/opui/references/select.md +255 -0
  588. package/skills/opui/references/spinner.md +85 -0
  589. package/skills/opui/references/switch.md +223 -0
  590. package/skills/opui/references/table.md +480 -0
  591. package/skills/opui/references/tabs.md +257 -0
  592. package/skills/opui/references/text-field.md +167 -0
  593. package/skills/opui/references/textarea.md +169 -0
  594. package/skills/opui/references/theming.md +278 -0
  595. package/skills/opui/references/toggle.md +222 -0
  596. package/skills/opui/references/tooltip.md +167 -0
  597. package/skills/opui/references/typography.md +159 -0
  598. package/svelte/elements.ts +7 -0
  599. package/svelte/index.ts +177 -0
  600. package/themes/bootstrap.css +223 -0
  601. package/themes/brutalist.css +105 -0
  602. package/themes/m3.css +152 -0
  603. package/themes/shadcn.css +125 -0
  604. package/tokens.json +3729 -0
  605. package/vue/index.ts +136 -15
  606. package/components/AGENTS.md +0 -247
  607. package/components/Accordion/types.d.vue.ts +0 -15
  608. package/components/Accordion/types.solid.ts +0 -6
  609. package/components/Anchor/types.d.vue.ts +0 -10
  610. package/components/Anchor/types.solid.ts +0 -6
  611. package/components/Avatar/types.d.vue.ts +0 -12
  612. package/components/Avatar/types.solid.ts +0 -11
  613. package/components/Badge/types.d.vue.ts +0 -10
  614. package/components/Badge/types.solid.ts +0 -4
  615. package/components/Button/types.d.vue.ts +0 -10
  616. package/components/Button/types.solid.ts +0 -8
  617. package/components/ButtonGroup/types.d.vue.ts +0 -10
  618. package/components/ButtonGroup/types.solid.ts +0 -4
  619. package/components/Callout/types.d.vue.ts +0 -10
  620. package/components/Callout/types.solid.ts +0 -6
  621. package/components/Card/types.d.vue.ts +0 -10
  622. package/components/Card/types.solid.ts +0 -6
  623. package/components/Checkbox/types.d.vue.ts +0 -11
  624. package/components/Checkbox/types.solid.ts +0 -9
  625. package/components/Chip/types.d.vue.ts +0 -10
  626. package/components/Chip/types.solid.ts +0 -10
  627. package/components/ClassicSelect/ClassicSelect.astro +0 -60
  628. package/components/ClassicSelect/ClassicSelect.vue +0 -54
  629. package/components/ClassicSelect/types.astro.ts +0 -8
  630. package/components/ClassicSelect/types.d.vue.ts +0 -10
  631. package/components/ClassicSelect/types.solid.ts +0 -5
  632. package/components/ClassicSelect/types.svelte.ts +0 -5
  633. package/components/ClassicSelect/types.ts +0 -15
  634. package/components/DescriptionList/Description.astro +0 -9
  635. package/components/DescriptionList/Item.astro +0 -9
  636. package/components/DescriptionList/Term.astro +0 -9
  637. package/components/DescriptionList/index.ts +0 -12
  638. package/components/DescriptionList/types.d.vue.ts +0 -10
  639. package/components/DescriptionList/types.solid.ts +0 -4
  640. package/components/Dialog/types.d.vue.ts +0 -10
  641. package/components/Dialog/types.solid.ts +0 -8
  642. package/components/Divider/types.d.vue.ts +0 -6
  643. package/components/Divider/types.solid.ts +0 -4
  644. package/components/Drawer/types.d.vue.ts +0 -31
  645. package/components/Drawer/types.solid.ts +0 -12
  646. package/components/FieldDescription/types.d.vue.ts +0 -10
  647. package/components/FieldDescription/types.solid.ts +0 -5
  648. package/components/FieldGroup/types.d.vue.ts +0 -12
  649. package/components/FieldGroup/types.solid.ts +0 -5
  650. package/components/FieldLegend/types.d.vue.ts +0 -11
  651. package/components/FieldLegend/types.solid.ts +0 -5
  652. package/components/FieldSet/FieldSet.vue +0 -18
  653. package/components/FieldSet/types.d.vue.ts +0 -11
  654. package/components/FieldSet/types.solid.ts +0 -5
  655. package/components/FieldSet/types.svelte.ts +0 -8
  656. package/components/FieldSet/types.ts +0 -5
  657. package/components/Form/types.d.vue.ts +0 -11
  658. package/components/Form/types.solid.ts +0 -5
  659. package/components/IconButton/IconButton.astro +0 -24
  660. package/components/IconButton/IconButton.vue +0 -24
  661. package/components/IconButton/types.astro.ts +0 -6
  662. package/components/IconButton/types.d.vue.ts +0 -10
  663. package/components/IconButton/types.solid.ts +0 -8
  664. package/components/IconButton/types.svelte.ts +0 -6
  665. package/components/IconButton/types.ts +0 -16
  666. package/components/List/types.d.vue.ts +0 -10
  667. package/components/List/types.solid.ts +0 -4
  668. package/components/ListItem/types.d.vue.ts +0 -10
  669. package/components/ListItem/types.solid.ts +0 -12
  670. package/components/Progress/types.d.vue.ts +0 -10
  671. package/components/Progress/types.solid.ts +0 -4
  672. package/components/Radio/types.d.vue.ts +0 -11
  673. package/components/Radio/types.solid.ts +0 -9
  674. package/components/Range/types.d.vue.ts +0 -14
  675. package/components/Range/types.solid.ts +0 -6
  676. package/components/Select/types.d.vue.ts +0 -17
  677. package/components/Select/types.solid.ts +0 -6
  678. package/components/Switch/types.d.vue.ts +0 -13
  679. package/components/Switch/types.solid.ts +0 -9
  680. package/components/Table/Body.astro +0 -11
  681. package/components/Table/Body.vue +0 -5
  682. package/components/Table/Cell.astro +0 -11
  683. package/components/Table/Cell.vue +0 -5
  684. package/components/Table/Column.astro +0 -12
  685. package/components/Table/Column.vue +0 -19
  686. package/components/Table/ColumnGroup.astro +0 -11
  687. package/components/Table/ColumnGroup.vue +0 -5
  688. package/components/Table/Head.astro +0 -11
  689. package/components/Table/Head.vue +0 -5
  690. package/components/Table/HeaderCell.astro +0 -11
  691. package/components/Table/HeaderCell.vue +0 -5
  692. package/components/Table/Row.astro +0 -11
  693. package/components/Table/Row.vue +0 -5
  694. package/components/Table/index.ts +0 -20
  695. package/components/Table/types.d.vue.ts +0 -10
  696. package/components/Table/types.solid.ts +0 -8
  697. package/components/Tabs/TabsTab.astro +0 -15
  698. package/components/Tabs/TabsTab.vue +0 -24
  699. package/components/Tabs/index.ts +0 -14
  700. package/components/Tabs/types.d.vue.ts +0 -31
  701. package/components/Tabs/types.solid.ts +0 -12
  702. package/components/TextField/types.d.vue.ts +0 -20
  703. package/components/TextField/types.solid.ts +0 -22
  704. package/components/Textarea/types.d.vue.ts +0 -19
  705. package/components/Textarea/types.solid.ts +0 -6
  706. package/components/Toast/Toast.astro +0 -42
  707. package/components/Toast/Toast.vue +0 -48
  708. package/components/ToggleButton/types.d.vue.ts +0 -10
  709. package/components/ToggleButton/types.solid.ts +0 -7
  710. package/components/ToggleGroup/types.d.vue.ts +0 -15
  711. package/components/ToggleGroup/types.solid.ts +0 -4
  712. package/components/Tooltip/types.d.vue.ts +0 -10
  713. package/components/Tooltip/types.solid.ts +0 -6
  714. package/css/components/icon-button.css +0 -139
  715. package/css/components/text-input.css +0 -68
  716. package/css/components/toast.css +0 -157
  717. package/css/js/toast.js +0 -94
  718. /package/components/{FieldSet → Fieldset}/types.astro.ts +0 -0
package/MIGRATING.md CHANGED
@@ -1,138 +1,1362 @@
1
- # Migrating from v5.0 to v5.1
1
+ # Migrating from v5 to v6
2
2
 
3
- In v5.1.0, the `critical` prop has been renamed to `error` on all form components (`TextField`, `Checkbox`, `Radio`, `Switch`, `Select`, `ClassicSelect`, `Textarea`).
3
+ v6 has breaking changes for most components. If you only use the Astro or Vue components, most of them are prop renames. If you write the HTML yourself or override component styles, check the class and custom property changes too. The notes are sorted by component, followed by the theme, typography and package changes. Every change is listed in the [changelog](https://github.com/felix-bohlin/ui/blob/main/packages/opui/CHANGELOG.md).
4
+
5
+ ## Accordion
6
+
7
+ `.ui-card` is no longer needed on `.ui-accordion`, and Astro and Vue no longer render it. `card.css` styles the accordion itself. Style accordions with `.ui-accordion`.
8
+
9
+ ```diff
10
+ - <details class="ui-accordion ui-card">
11
+ + <details class="ui-accordion">
12
+ ```
13
+
14
+ Only the `svg` with `.ui-marker` is the marker. Add `.ui-marker` to the chevron to keep it rotating, or add `.ui-marker-animation-flip` or `.ui-marker-animation-turn` to `details` for another animation (`markerAnimation` in Astro and Vue). Other icons in the `summary` no longer rotate.
15
+
16
+ ```diff
17
+ <details class="ui-accordion">
18
+ <summary>
19
+ - Title <svg>…</svg>
20
+ + Title <svg class="ui-marker">…</svg>
21
+ </summary>
22
+ ```
23
+
24
+ In Astro and Vue the regions are parts instead of slots. The root no longer wraps its children in `.ui-content`, so put them in `AccordionContent`.
25
+
26
+ ```diff
27
+ <Accordion>
28
+ - <Fragment slot="summary">Title</Fragment>
29
+ - <p>Text</p>
30
+ - <Button slot="actions">Agree</Button>
31
+ + <AccordionSummary>Title</AccordionSummary>
32
+ + <AccordionContent><p>Text</p></AccordionContent>
33
+ + <AccordionActions><Button>Agree</Button></AccordionActions>
34
+ </Accordion>
35
+ ```
36
+
37
+ `types.ts` no longer exports a `Slots` type.
38
+
39
+ `AccordionSummary` renders a chevron marker by default. If you put your own chevron in the summary, you get two: move it to the `marker` slot on `AccordionSummary` and give it `.ui-marker`.
40
+
41
+ ```diff
42
+ - <AccordionSummary>Title <svg>…</svg></AccordionSummary>
43
+ + <AccordionSummary>
44
+ + Title
45
+ + <svg slot="marker" class="ui-marker">…</svg>
46
+ + </AccordionSummary>
47
+ ```
48
+
49
+ An accordion without a variant has the page surface with padding and no border, like a `Card` (`plain`, the new default), and a group card without a variant pads its accordions too. `variant` no longer accepts `"default"`. For the previous look, with no surface or padding, use `variant="transparent"` (`.ui-transparent`).
50
+
51
+ ```diff
52
+ - <Accordion>
53
+ + <Accordion variant="transparent">
54
+ ```
55
+
56
+ ```diff
57
+ - <details class="ui-accordion ui-card">
58
+ + <details class="ui-accordion ui-transparent">
59
+ ```
60
+
61
+ ## Anchor
62
+
63
+ `Anchor` with `trigger="hover"` no longer wraps the trigger in a `<span interestfor>`. Give the anchor an `id` and add `interestfor` with that id to the trigger, like `Tooltip`.
64
+
65
+ In Astro and Vue the floating content goes in `AnchorContent` instead of the `anchored` slot.
66
+
67
+ ```diff
68
+ <Anchor>
69
+ <Button>Profile</Button>
70
+ - <Card slot="anchored">…</Card>
71
+ + <AnchorContent><Card>…</Card></AnchorContent>
72
+ </Anchor>
73
+ ```
74
+
75
+ `types.ts` no longer exports a `Slots` type.
76
+
77
+ With `trigger="hover"`, `id` is required and no longer generated. Pass the same `id` to `interestfor` on the trigger.
78
+
79
+ ```diff
80
+ - <Anchor trigger="hover">
81
+ + <Anchor id="repo-card" trigger="hover">
82
+ ```
83
+
84
+ `alignment` is `positionArea`, named after the CSS `position-area` value it takes.
85
+
86
+ ```diff
87
+ - <Anchor alignment="inline-end">
88
+ + <Anchor positionArea="inline-end">
89
+ ```
90
+
91
+ The floating content is `.ui-floating` instead of `.ui-anchor-floating`, also inside `Badge` and `Tooltip`. `trigger` only takes `"hover"`, so leave it out instead of `trigger="always"`.
92
+
93
+ ```diff
94
+ - <Anchor trigger="always">
95
+ + <Anchor>
96
+ ```
97
+
98
+ ```diff
99
+ - <span class="ui-anchor-floating">
100
+ + <span class="ui-floating">
101
+ ```
102
+
103
+ ## Avatar
104
+
105
+ `alt` is required when `src` is set (types). Use `alt=""` for decorative images.
106
+
107
+ `Avatar` with `as="button"` renders `type="button"` by default in Astro and Vue, so it no longer submits a form. Pass `type="submit"` if it should.
108
+
109
+ Text uses `--ui-on-primary`, and sizes follow `--ui-control-size` and `--ui-button-size-*`.
110
+
111
+ `isGroup` is removed. Wrap the avatars in `AvatarGroup`, which renders `.ui-avatar-group` with `role="group"`. It doesn't take `src`, `size` or `variant`.
112
+
113
+ ```diff
114
+ - <Avatar aria-label="Team" isGroup>
115
+ + <AvatarGroup aria-label="Team">
116
+ <Avatar alt="Jane Doe" src="/jane.jpg" />
117
+ - </Avatar>
118
+ + </AvatarGroup>
119
+ ```
120
+
121
+ `variant` is `shape`, since it picks the shape. The classes are unchanged.
122
+
123
+ ```diff
124
+ - <Avatar variant="rounded">
125
+ + <Avatar shape="rounded">
126
+ ```
127
+
128
+ ## Badge
129
+
130
+ `.ui-anchor` is no longer needed on `.ui-badge`, and the components no longer render it. `anchor.css` positions the badge itself.
131
+
132
+ ```diff
133
+ - <span class="ui-anchor ui-badge">
134
+ + <span class="ui-badge">
135
+ ```
136
+
137
+ Text uses `--ui-on-primary`.
138
+
139
+ `alignment` is `corner`. The classes are unchanged.
140
+
141
+ ```diff
142
+ - <Badge alignment="end-end">
143
+ + <Badge corner="end-end">
144
+ ```
145
+
146
+ The indicator is `.ui-indicator` instead of `.ui-badge-indicator`. For a count with words for screen readers, put the whole sentence in a `.ui-sr-only` element and hide the short visible text, so a translation can put the number wherever its language needs it:
147
+
148
+ ```diff
149
+ - <span class="ui-anchor-floating">
150
+ - <span class="ui-badge-indicator">5</span>
151
+ + <span class="ui-floating">
152
+ + <span class="ui-indicator">
153
+ + <span aria-hidden="true">5</span>
154
+ + <span class="ui-sr-only">5 unread messages</span>
155
+ + </span>
156
+ </span>
157
+ ```
158
+
159
+ `label` is a `string`. Pass a number as a string (`label="5"`).
160
+
161
+ ## Button
162
+
163
+ `.ui-icon-only` is removed. A `Button` whose only child is an `svg` is square, so drop the class.
164
+
165
+ ```diff
166
+ - <button class="ui-button ui-icon-only" aria-label="Edit">
167
+ + <button class="ui-button" aria-label="Edit">
168
+ ```
169
+
170
+ Icon styles only apply to a direct child `svg`. An icon nested in another element is no longer sized, so move it out. Button padding changed too: `x-small` is `1ex`, `small` `1.25ex` and `large` `2.5ex` (was `0.5ex`, `0.75ex` and `4ex`). Override `--_padding-inline` to restore the old values.
171
+
172
+ ```diff
173
+ - <button class="ui-button"><span><svg>…</svg></span> Save</button>
174
+ + <button class="ui-button"><svg>…</svg><span class="ui-text">Save</span></button>
175
+ ```
176
+
177
+ Wrap the label in `<span class="ui-text">` when a `Button` has an icon. CSS can't see text nodes, so `<button class="ui-button"><svg>…</svg>Save</button>` has an `svg` as its only element and is styled as icon-only (square, no inline padding).
178
+
179
+ ```diff
180
+ - <button class="ui-button"><svg>…</svg>Save</button>
181
+ + <button class="ui-button"><svg>…</svg><span class="ui-text">Save</span></button>
182
+ ```
183
+
184
+ In Astro and Vue, `Button` no longer adds `.ui-disabled` to a disabled `<button>`. It sets `disabled`, and `aria-disabled="true"` on links. Target `:disabled` (or `[aria-disabled="true"]` for links) in your own styles.
185
+
186
+ ```diff
187
+ - .ui-button.ui-disabled { /* override */ }
188
+ + .ui-button:disabled { /* override */ }
189
+ ```
190
+
191
+ In Astro and Vue, `Button` renders `type="button"` by default, so it no longer submits a form. Pass `type="submit"` for submit buttons.
192
+
193
+ ```diff
194
+ - <Button>Save</Button>
195
+ + <Button type="submit">Save</Button>
196
+ ```
197
+
198
+ Colors changed: critical buttons keep light text on their fill, tonal primary and critical buttons use dark text on a light container in light mode and light text on a dark container in dark mode, and text and outlined buttons use a lighter accent for text in dark mode.
199
+
200
+ A disabled link has no `href`. The components drop it for you. In HTML, remove `href` from links with `aria-disabled="true"`, because the CSS no longer blocks clicks on them. The same goes for `Chip` links.
201
+
202
+ ```diff
203
+ - <a href="/x" class="ui-button" aria-disabled="true">…</a>
204
+ + <a class="ui-button" aria-disabled="true">…</a>
205
+ ```
206
+
207
+ ## Button group
208
+
209
+ Variants apply to the whole group. Move a variant from a button inside a group to the group.
210
+
211
+ ```diff
212
+ - <div role="group" class="ui-button-group">
213
+ - <button class="ui-button ui-outlined">One</button>
214
+ + <div role="group" class="ui-button-group ui-outlined">
215
+ + <button class="ui-button">One</button>
216
+ ```
217
+
218
+ Groups wrap onto more rows when they don't fit, instead of overflowing. Use `overflow="scroll"` (`.ui-overflow-scroll`) or `overflow="shrink"` (`.ui-overflow-shrink`) to keep them on one row. Small buttons are `--ui-button-size-small` (32px) instead of 30px.
219
+
220
+ ## Callout
221
+
222
+ In Astro and Vue the regions are parts instead of slots. The root no longer renders the severity icon or wraps its children in `.ui-content`: add `CalloutIcon` and `CalloutContent`. The `title` slot and `headingLevel` are gone: write the title as a plain heading first in `CalloutContent`. A custom icon is an `svg` placed first in `Callout` instead of the `icon` slot.
223
+
224
+ ```diff
225
+ - <Callout severity="info" headingLevel={4}>
226
+ - <Fragment slot="title">Heads up</Fragment>
227
+ - Text
228
+ - </Callout>
229
+ + <Callout severity="info">
230
+ + <CalloutIcon />
231
+ + <CalloutContent>
232
+ + <h4>Heads up</h4>
233
+ + Text
234
+ + </CalloutContent>
235
+ + </Callout>
236
+ ```
237
+
238
+ `types.ts` no longer exports a `Slots` type.
239
+
240
+ ## Card
241
+
242
+ Tonal and elevated cards have a border in the page background color, so they stay visible on tonal surfaces. In dark mode, borders and field borders inside them use the page background too. Actions stick to the bottom of stretched cards and wrap.
243
+
244
+ In Astro and Vue the regions are parts instead of slots. `actionsAlign` is `align` on `CardActions`.
245
+
246
+ ```diff
247
+ - <Card actionsAlign="end">
248
+ - <h3 slot="header">Title</h3>
249
+ - <p slot="content">Text</p>
250
+ - <Button slot="actions">Open</Button>
251
+ - </Card>
252
+ + <Card>
253
+ + <CardHeader><h3>Title</h3></CardHeader>
254
+ + <CardContent><p>Text</p></CardContent>
255
+ + <CardActions><Button>Open</Button></CardActions>
256
+ + </Card>
257
+ ```
258
+
259
+ Actions sit at the end, like in `Dialog`, `Accordion` and `Drawer`. Drop `.ui-align-end` from `.ui-actions` in a card, and add `.ui-align-start` (`align="start"` on `CardActions`) to keep actions lined up with the content.
260
+
261
+ ```diff
262
+ - <div class="ui-actions">
263
+ + <div class="ui-actions ui-align-start">
264
+ ```
265
+
266
+ `types.ts` no longer exports a `Slots` type.
267
+
268
+ The text card is the transparent card, so `.ui-text` only names a text part.
269
+
270
+ ```diff
271
+ - <Card variant="text">
272
+ + <Card variant="transparent">
273
+ ```
274
+
275
+ ```diff
276
+ - <div class="ui-card ui-text">
277
+ + <div class="ui-card ui-transparent">
278
+ ```
279
+
280
+ ## Checkbox
281
+
282
+ Internal variables are private. `--_ripple-size` and `--_size` are the inputs to override:
283
+
284
+ | v5 | v6 |
285
+ | -------------------- | ------------------------------------------------------------------------------ |
286
+ | `--isLTR`, `--isRTL` | removed, the halo centers itself |
287
+ | `--highlight-size` | `--_ripple-size` |
288
+ | `--thumb-scale` | removed as an override, `--_thumb-scale` is set by the hover and active states |
289
+ | `--_input-size` | `--_size` |
290
+
291
+ The root selector is wrapped in `:where()`, like other components, so your own selectors win more easily. The input lines up with the first line of the label. In dark mode the marker stays light on a darkened fill.
292
+
293
+ Without a visible label the checkbox aligns to the middle, so it centers in table cells. Give it a hidden label (`hideLabel`, or `.ui-sr-only` in HTML). Astro and Vue no longer render an empty `.ui-label` without a default slot, and warn in dev when there's no accessible name.
294
+
295
+ `aria-invalid="true"` on the `<input>` replaces `data-invalid` on `.ui-checkbox`.
296
+
297
+ In Astro, `type` is no longer a typed prop. Remove it, the component sets it.
298
+
299
+ In Astro and Vue, `style` goes to the root `<label>` instead of the `<input>`, like `class`. Set `--_` properties through `style`, and style the input itself with a class or CSS.
300
+
301
+ Deep type imports from `opui-css/components/*` are renamed, see [Package and imports](#package-and-imports).
302
+
303
+ `stack` (`.ui-stack`) is `orientation="vertical"` (`.ui-vertical`).
304
+
305
+ ```diff
306
+ - <Checkbox stack>Label</Checkbox>
307
+ + <Checkbox orientation="vertical">Label</Checkbox>
308
+ ```
309
+
310
+ ## Chip
311
+
312
+ The hover and press ripple is removed. Delete any `--ripple` overrides.
313
+
314
+ `Chip` with `as="button"` renders `type="button"` by default in Astro and Vue. Pass `type="submit"` if it should submit a form.
315
+
316
+ Chips use `--ui-radius` (8px) instead of Open Props `--radius-2` (5px), small chips are `--ui-chip-size-small` (28px) instead of 24px, and labels truncate with an ellipsis unless the chip is `multiline`.
317
+
318
+ A button chip needs `as="button"` and a link chip needs `href` (types). `disabled` works on both: a link chip renders `aria-disabled="true"`. The same applies to `Avatar`, and `Button` takes link attributes only with `href`.
319
+
320
+ ```diff
321
+ - <Chip disabled label="Archived" />
322
+ + <Chip as="button" disabled label="Archived" />
323
+ ```
324
+
325
+ In Astro and Vue, a tonal `Chip` no longer renders `.ui-tonal`. Target `.ui-chip:not(.ui-outlined)` in your CSS instead. In HTML the class adds nothing and can go.
326
+
327
+ ```diff
328
+ - .ui-chip.ui-tonal { --_bg-color: var(--ui-primary-tonal); }
329
+ + .ui-chip:not(.ui-outlined) { --_bg-color: var(--ui-primary-tonal); }
330
+ ```
331
+
332
+ The default slot is gone. Pass the text as `label`, or rich content in the `label` slot.
333
+
334
+ ```diff
335
+ - <Chip><span class="ui-text">Open now</span></Chip>
336
+ + <Chip label="Open now" />
337
+ ```
338
+
339
+ ## Classic select
340
+
341
+ `ClassicSelect` is removed. Use `Select` with the same `label`, `items` (now `SelectItem[]`), `endText`, `size`, `variant` and `error`. Options passed as children go in Select's default slot. Browsers without customizable select show the native picker.
342
+
343
+ ```diff
344
+ - <ClassicSelect label="Fruit" items={items} />
345
+ + <Select label="Fruit" items={items} />
346
+ ```
347
+
348
+ In HTML, add `<button><selectedcontent></selectedcontent></button>` and wrap the options in `<div class="ui-list">` inside the `<select>`.
349
+
350
+ ## Description list
351
+
352
+ In Vue, the description part is exported as `DescriptionListDescription` instead of `Description`, like Astro.
353
+
354
+ ```diff
355
+ - import { Description } from "opui-css/vue"
356
+ + import { DescriptionListDescription } from "opui-css/vue"
357
+ ```
358
+
359
+ In Astro, import the parts by their flat names. The `DescriptionList.Item`, `DescriptionList.Term` and `DescriptionList.Description` aliases are gone.
360
+
361
+ ```diff
362
+ - <DescriptionList.Item>
363
+ + <DescriptionListItem>
364
+ ```
365
+
366
+ The part files are renamed to `DescriptionListDescription.*`, `DescriptionListItem.*` and `DescriptionListTerm.*`. The `opui-css/<framework>` exports are unchanged; update deep `opui-css/components/*` imports.
367
+
368
+ ```diff
369
+ - import Item from "opui-css/components/DescriptionList/Item.astro"
370
+ + import DescriptionListItem from "opui-css/components/DescriptionList/DescriptionListItem.astro"
371
+ ```
372
+
373
+ `.ui-term` is gone, and the parts no longer render `.ui-term` or `.ui-description`. Drop the classes from `dt` and `dd`, and select `dt` and `dd` in your own CSS.
374
+
375
+ ```diff
376
+ - <dt class="ui-term">Name</dt>
377
+ - <dd class="ui-description">Ada</dd>
378
+ + <dt>Name</dt>
379
+ + <dd>Ada</dd>
380
+ ```
381
+
382
+ In Astro and Vue, `bordered` is a boolean, and `dotted` makes its line dotted. The classes are unchanged.
383
+
384
+ ```diff
385
+ - <DescriptionList bordered="dotted">
386
+ + <DescriptionList bordered dotted>
387
+ ```
388
+
389
+ The items are plain `div`s without `.ui-item`.
390
+
391
+ ```diff
392
+ <dl class="ui-description-list ui-bordered ui-dotted">
393
+ - <div class="ui-item">
394
+ + <div>
395
+ ```
396
+
397
+ Deep type imports from `opui-css/components/*` are renamed, see [Package and imports](#package-and-imports).
398
+
399
+ ## Dialog
400
+
401
+ `.ui-card` is no longer needed on `.ui-dialog`, and the components no longer render it. `card.css` styles the dialog itself. Style dialogs with `.ui-dialog`.
402
+
403
+ ```diff
404
+ - <dialog class="ui-dialog ui-card ui-elevated">
405
+ + <dialog class="ui-dialog ui-elevated">
406
+ ```
407
+
408
+ Dialogs have a maximum height. The header and footer stay in place and the content scrolls. Dialogs also get a border in the page background color.
409
+
410
+ In Astro and Vue the regions are parts instead of slots, like `Drawer`: `DialogHeader`, `DialogTitle`, `DialogContent` and `DialogFooter` (`align` on `DialogFooter` replaces `actionsAlign`). `aria-labelledby` points at the `DialogTitle` unless you pass `aria-label` or `aria-labelledby`, so a dialog without a `DialogTitle` needs `aria-label`.
411
+
412
+ ```diff
413
+ - <Dialog actionsAlign="end">
414
+ - <h2 slot="header">Title</h2>
415
+ - <p slot="content">Text</p>
416
+ - <Button slot="actions">Close</Button>
417
+ - </Dialog>
418
+ + <Dialog>
419
+ + <DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader>
420
+ + <DialogContent><p>Text</p></DialogContent>
421
+ + <DialogFooter><Button>Close</Button></DialogFooter>
422
+ + </Dialog>
423
+ ```
424
+
425
+ In HTML the header is a `div.ui-header` row instead of an `hgroup`, and `.ui-footer` replaces `.ui-actions` at the end. Point `aria-labelledby` at the title heading. It needs no `.ui-h4`, since the dialog sizes it with `--_title-font-size` (`--ui-font-size-h4`). End alignment is the default, so `.ui-align-end` can go.
426
+
427
+ ```diff
428
+ - <hgroup>
429
+ - <h2 class="ui-h4" id="dialog-title">Title</h2>
430
+ - </hgroup>
431
+ + <div class="ui-header">
432
+ + <h2 id="dialog-title">Title</h2>
433
+ + </div>
434
+ <div class="ui-content">…</div>
435
+ - <div class="ui-actions ui-align-end">…</div>
436
+ + <div class="ui-footer">…</div>
437
+ ```
438
+
439
+ The footer holds buttons, text or anything else. Wrap the buttons in `.ui-actions` to keep them together at the end when other content comes first.
440
+
441
+ `types.ts` no longer exports a `Slots` type.
442
+
443
+ The page scroll lock behind a modal dialog moved to `core/utils.css`. If you import single files, import `utils.css` too.
444
+
445
+ ## Divider
446
+
447
+ A divider that is a direct child of a card has no margin, since the card's gap spaces it.
448
+
449
+ The variant classes drop the `border-` prefix.
450
+
451
+ ```diff
452
+ - <hr class="ui-divider ui-border-tonal" />
453
+ + <hr class="ui-divider ui-tonal" />
454
+ ```
455
+
456
+ `.ui-border-filled` and `.ui-border-primary` are `.ui-filled` and `.ui-primary`.
457
+
458
+ The primary line is a color, not a variant.
459
+
460
+ ```diff
461
+ - <Divider variant="primary" />
462
+ + <Divider color="primary" />
463
+ ```
464
+
465
+ ## Drawer
466
+
467
+ The backdrop dims and blurs like `Dialog`, through `--ui-backdrop-bg-color` and `--ui-backdrop-blur`. `.ui-backdrop-transparent` still removes it. Header headings take the free space, so several header actions line up at the end.
468
+
469
+ In Astro and Vue the regions are parts instead of slots. `DrawerTitle` replaces the `DrawerHeader` `heading` prop, and `aria-labelledby` points at it. The drawer no longer looks for your own heading, so a drawer without a `DrawerTitle` needs `aria-label`. `DrawerHeader` closes its drawer with `command="close"` (Invoker Commands) instead of a click handler, so older browsers need a polyfill.
470
+
471
+ ```diff
472
+ <Drawer id="filters">
473
+ - <DrawerHeader slot="header" heading="Filters" />
474
+ - <Fragment slot="content">…</Fragment>
475
+ - <DrawerFooter slot="footer">…</DrawerFooter>
476
+ + <DrawerHeader>
477
+ + <DrawerTitle>Filters</DrawerTitle>
478
+ + </DrawerHeader>
479
+ + <DrawerContent>…</DrawerContent>
480
+ + <DrawerFooter>…</DrawerFooter>
481
+ </Drawer>
482
+ ```
483
+
484
+ The footer content sits at the end on every side, also in an `inline-end` drawer, and `align="start"` on `DrawerFooter` (`.ui-align-start`) moves it to the start. Wrap the buttons in `.ui-actions` to keep them together at the end when other content comes first.
485
+
486
+ The title is `--ui-font-size-h4`, like the `Dialog` title, instead of `--ui-font-size-large`. `--_header-font-size` is `--_title-font-size`.
487
+
488
+ ```diff
489
+ - .ui-drawer { --_header-font-size: 1.25rem; }
490
+ + .ui-drawer { --_title-font-size: 1.25rem; }
491
+ ```
492
+
493
+ The page no longer locks scrolling by default in Astro and Vue. Set `scrollLock` on drawers that should lock it. `id` is required, since the trigger's `commandfor` points at it.
494
+
495
+ ```diff
496
+ - <Drawer>
497
+ + <Drawer id="filters" scrollLock>
498
+ ```
499
+
500
+ `types.ts` no longer exports a `Slots` type, and the Vue types no longer export `DrawerHeadingIdKey`, `DrawerSlots`, `DrawerHeaderSlots` or `DrawerFooterSlots`.
501
+
502
+ In Astro and Vue, a drawer that opens from the inline start no longer renders `.ui-inline-start`. Target `.ui-drawer:not(.ui-block-end, .ui-block-start, .ui-inline-end)` in your CSS instead. In HTML the class adds nothing and can go.
503
+
504
+ ```diff
505
+ - .ui-drawer.ui-inline-start { --_inline-size: 20rem; }
506
+ + .ui-drawer:not(.ui-block-end, .ui-block-start, .ui-inline-end) { --_inline-size: 20rem; }
507
+ ```
508
+
509
+ ## Field group and fieldset
510
+
511
+ `FieldGroup` no longer sets `role="group"`. Inside a fieldset nothing changes. A `FieldGroup` without a fieldset can take `role` and `aria-label` itself. In HTML, drop `role="group"` from `.ui-field-group`.
512
+
513
+ ```diff
514
+ <fieldset class="ui-fieldset">
515
+ <legend>Notifications</legend>
516
+ - <div class="ui-field-group" role="group">…</div>
517
+ + <div class="ui-field-group">…</div>
518
+ </fieldset>
519
+ ```
520
+
521
+ `Fieldset` with another element in `as` gets `role="group"`.
522
+
523
+ `FieldSet` is `Fieldset`, and `FieldDescription` renders `.ui-description` instead of `.ui-field-description`.
524
+
525
+ ```diff
526
+ - <FieldSet>
527
+ + <Fieldset>
528
+ ```
529
+
530
+ ```diff
531
+ - <p class="ui-field-description">There are no wrong answers.</p>
532
+ + <p class="ui-description">There are no wrong answers.</p>
533
+ ```
534
+
535
+ `data-invalid` on `.ui-fieldset` no longer colors the fields inside. Put `aria-invalid="true"` on each control (Astro and Vue: `error` on each `Checkbox`, `Radio` or `Switch`). The fieldset's own `.ui-end-text` (a direct child) turns red when a control inside has `aria-invalid="true"` or is `:user-invalid`. A checked invalid switch turns its track red, like Checkbox and Radio.
536
+
537
+ `FieldGroup` `direction` is `orientation`, like `ButtonGroup`, `ToggleGroup` and `Carousel`. `.ui-row` and `.ui-column` are `.ui-horizontal` and `.ui-vertical`.
538
+
539
+ ```diff
540
+ - <FieldGroup direction="row">
541
+ + <FieldGroup orientation="horizontal">
542
+ ```
543
+
544
+ ```diff
545
+ - <div class="ui-field-group ui-row">
546
+ + <div class="ui-field-group ui-horizontal">
547
+ ```
548
+
549
+ ## Icon button
550
+
551
+ `IconButton` is removed. `Button` covers it: a button whose only child is an `svg` is square, `round` makes it a circle. The hover halo is gone: icon-only buttons get the button's hover background. The old default size (28px) is `size="x-small"`. The old `small` (20px) has no preset: use `x-small` with `--_size: 1.25rem`.
552
+
553
+ ```diff
554
+ - <IconButton aria-label="Edit">
555
+ + <Button round size="x-small" aria-label="Edit">
556
+ ```
557
+
558
+ ```diff
559
+ - <button class="ui-icon-button">
560
+ + <button class="ui-button ui-round ui-x-small">
561
+ ```
562
+
563
+ Icons are smaller than before. Set `--_icon-size: 1.5rem` to get the old 24px back. The icon color is the button's accent instead of the inherited text color.
564
+
565
+ `icon-button.css` is gone, so drop its import if you import single component files.
566
+
567
+ ## List
568
+
569
+ `List` no longer takes `divided`. Use `bordered` (`.ui-bordered`).
570
+
571
+ ```diff
572
+ - <List divided>
573
+ + <List bordered>
574
+ ```
575
+
576
+ Only direct `li`/`option` children (and options in a `[role="group"]`) are styled as rows, so nested lists inside a row stay normal lists. Headings and paragraphs in `.ui-text` have no margin. Dense rows keep the default inline padding, sizes follow `--ui-control-size`, and rich text links in a list read `--ui-primary-text`.
577
+
578
+ `variant="default"` (`.ui-default`, the page surface) is gone. On the page, `transparent` looks the same. The default look is named `filled`.
579
+
580
+ ```diff
581
+ - <List variant="default" />
582
+ + <List variant="transparent" />
583
+ ```
584
+
585
+ ```diff
586
+ - <ul class="ui-list ui-default">
587
+ + <ul class="ui-list ui-transparent">
588
+ ```
589
+
590
+ `.ui-end` only sizes an `svg` that is its direct child. An icon wrapped in another element inside `.ui-end` keeps its own size.
591
+
592
+ `.ui-start` and `.ui-end` are only styled as direct children of a row, or of the `a`, `button` or `label` directly in it. Move one that sits deeper, such as inside your own wrapper, up to that level.
593
+
594
+ ```diff
595
+ <li>
596
+ - <div class="row-content"><span class="ui-start">…</span><span class="ui-text">Inbox</span></div>
597
+ + <span class="ui-start">…</span><span class="ui-text">Inbox</span>
598
+ </li>
599
+ ```
600
+
601
+ Rows are no longer styled by `aria-selected="true"` on a `li`, `a`, `button` or `label`, where ARIA doesn't allow it. Mark the current row with `aria-current="page"`. Options (`option` and `[role="option"]`) keep the selected style.
602
+
603
+ ```diff
604
+ - <a aria-selected="true" href="/inbox">
605
+ + <a aria-current="page" href="/inbox">
606
+ ```
607
+
608
+ `gutterless` (`.ui-gutterless`) is `flush` (`.ui-flush`).
609
+
610
+ ```diff
611
+ - <List gutterless>
612
+ + <List flush>
613
+ ```
614
+
615
+ ## List item
616
+
617
+ `as` only accepts `"a"` or `"button"` (types). A static item leaves `as` out and renders its content straight in the `<li>`.
618
+
619
+ `type` can't be combined with `as` or `href` (types).
620
+
621
+ `headline` is `label`, and the `text` slot is gone. Use the `label` and `description` props, or the slots of the same name for rich content.
622
+
623
+ ```diff
624
+ - <ListItem headline="Inbox" description="3 new" />
625
+ + <ListItem label="Inbox" description="3 new" />
626
+ ```
627
+
628
+ ```diff
629
+ - <Fragment slot="text">Checkbox 1</Fragment>
630
+ + <Fragment slot="label">Checkbox 1</Fragment>
631
+ ```
632
+
633
+ ## Progress
634
+
635
+ Without a visible label the progress bar aligns to the middle. Give it a hidden label (`.ui-sr-only` in HTML).
636
+
637
+ In Astro and Vue, `style` goes to the root `<div>` instead of the `<progress>`, like `class`. Set `--_` properties through `style`, and style the `<progress>` itself with a class or CSS.
638
+
639
+ `variant="default"` (`.ui-default`, the page surface) is gone. Use `tonal` (the default) or `filled`.
640
+
641
+ ```diff
642
+ - <Progress variant="default" />
643
+ + <Progress variant="tonal" />
644
+ ```
645
+
646
+ ```diff
647
+ - <div class="ui-progress ui-default">
648
+ + <div class="ui-progress">
649
+ ```
650
+
651
+ No variant matches the page-surface track. `tonal` is the closest; set `--_bg-color: var(--ui-surface)` on the progress for the old look.
652
+
653
+ In Astro and Vue, a tonal `Progress` no longer renders `.ui-tonal`. Target `.ui-progress:not(.ui-filled)` in your CSS instead. In HTML the class adds nothing and can go.
654
+
655
+ ```diff
656
+ - .ui-progress.ui-tonal { --_bg-color: var(--ui-primary-tonal); }
657
+ + .ui-progress:not(.ui-filled) { --_bg-color: var(--ui-primary-tonal); }
658
+ ```
659
+
660
+ ## Radio
661
+
662
+ Internal variables are private. `--_ripple-size` and `--_size` are the inputs to override:
663
+
664
+ | v5 | v6 |
665
+ | -------------------- | ------------------------------------------------------------------------------ |
666
+ | `--isLTR`, `--isRTL` | removed, the halo centers itself |
667
+ | `--highlight-size` | `--_ripple-size` |
668
+ | `--thumb-scale` | removed as an override, `--_thumb-scale` is set by the hover and active states |
669
+ | `--_input-size` | `--_size` |
670
+
671
+ Radios are `--ui-choice-size` (20px) like `Checkbox`, instead of 18px. The root selector is wrapped in `:where()`, the input lines up with the first line of the label, and the marker stays light on a darkened fill in dark mode.
672
+
673
+ Without a visible label the radio aligns to the middle. Give it a hidden label (`hideLabel`, or `.ui-sr-only` in HTML). Astro and Vue no longer render an empty `.ui-label` without a default slot.
674
+
675
+ `aria-invalid="true"` on the `<input>` replaces `data-invalid` on `.ui-radio`. For an invalid group, put it on every radio in the group.
676
+
677
+ In Astro, `type` and the native `size` are no longer typed props. Remove `type`, the component sets it.
678
+
679
+ In Astro and Vue, `style` goes to the root `<label>` instead of the `<input>`, like `class`. Set `--_` properties through `style`, and style the input itself with a class or CSS.
680
+
681
+ Deep type imports from `opui-css/components/*` are renamed, see [Package and imports](#package-and-imports).
682
+
683
+ `stack` (`.ui-stack`) is `orientation="vertical"` (`.ui-vertical`).
684
+
685
+ ```diff
686
+ - <Radio stack>Label</Radio>
687
+ + <Radio orientation="vertical">Label</Radio>
688
+ ```
689
+
690
+ ## Range
691
+
692
+ Astro and Vue no longer set `--_track-fill` from script. The track fill is a scroll-driven animation in CSS, so remove any script that sets it.
693
+
694
+ With `spread`, the label and the range split the container into equal columns, and the fixed `25ch` minimum is gone. The invalid state uses `--ui-invalid`.
695
+
696
+ `variant="default"` (`.ui-default`, the page surface) is gone. Use `outlined` (the default), `filled` or `tonal`.
697
+
698
+ ```diff
699
+ - <Range variant="default" />
700
+ + <Range variant="tonal" />
701
+ ```
702
+
703
+ ```diff
704
+ - <label class="ui-range ui-default">
705
+ + <label class="ui-range ui-tonal">
706
+ ```
707
+
708
+ No variant matches the page-surface track. `tonal` is the closest; set `--_track-bg-color: var(--ui-surface)` on the range for the old look.
709
+
710
+ `aria-invalid="true"` on the `<input type="range">` replaces `data-invalid` on `.ui-range`.
711
+
712
+ In Astro and Vue, `style` goes to the root `<label>` instead of the `<input>`, like `class`. Set `--_` properties through `style`, and style the input itself with a class or CSS.
713
+
714
+ In Astro, extra attributes are typed as `<input>` attributes only, since they go to the input.
715
+
716
+ `options` is `items`, typed as `RangeItem[]`. In Astro and Vue, the label goes in the `label` prop or slot instead of the default slot, and the readout slot is `value-text` instead of `value`.
717
+
718
+ ```diff
719
+ - <Range options={ticks} valueSuffix="%">Volume</Range>
720
+ + <Range items={ticks} label="Volume" valueSuffix="%" />
721
+ ```
722
+
723
+ ```diff
724
+ - <b slot="value">21°</b>
725
+ + <b slot="value-text">21°</b>
726
+ ```
727
+
728
+ Deep type imports from `opui-css/components/*` are renamed, see [Package and imports](#package-and-imports).
729
+
730
+ ## Select
731
+
732
+ The picker is `--ui-surface-elevated` with a `--ui-border-color-on-raised` edge, like `Menu`, instead of `--ui-surface-filled` with the field border. Set `--_bg-color` on the picker's `.ui-list` to keep the old fill, or `--ui-border-color-raised` in your theme to outline every raised surface at once.
733
+
734
+ Astro and Vue no longer generate an `id` for the select. Pass `id` when something outside the component references it.
735
+
736
+ In Astro and Vue, `style` goes to the root `<label>` instead of the `<select>`, like `class`. Set `--_` properties through `style`, and style the select itself with a class or CSS.
737
+
738
+ With `spread`, label and field split the container into equal columns. Selects keep a `12ch` minimum width in table cells, and the arrow is a chevron instead of a triangle.
739
+
740
+ Same as Text field: `aria-invalid="true"` on the `<select>` replaces `data-invalid` on `.ui-select`.
741
+
742
+ The `items` type is `SelectItem`, exported from every framework barrel, and its `value` is `number | string` instead of `any`.
743
+
744
+ ```diff
745
+ - import type { Item } from "opui-css/components/Select/types"
746
+ + import type { SelectItem } from "opui-css/react"
747
+ ```
748
+
749
+ Items take `label` instead of `text`, like `Menu` and `Range` items.
750
+
751
+ ```diff
752
+ - items={[{ text: "Sweden", value: "se" }]}
753
+ + items={[{ label: "Sweden", value: "se" }]}
754
+ ```
755
+
756
+ `description` is `startText` (the `start-text` slot in Astro and Vue), like Text field.
757
+
758
+ ```diff
759
+ - <Select label="Country" description="Where you live" items={items} />
760
+ + <Select label="Country" startText="Where you live" items={items} />
761
+ ```
762
+
763
+ The slots inside the field's border are `start` and `end` instead of `prefix` and `suffix`, and `top` and `bottom` instead of `header` and `footer`. In HTML, the classes are `.ui-start`, `.ui-end`, `.ui-top` and `.ui-bottom`.
764
+
765
+ ```diff
766
+ - <span class="ui-prefix">€</span>
767
+ + <span class="ui-start">€</span>
768
+ ```
769
+
770
+ ```diff
771
+ - <Select label="Price" prefix="€" items={items} />
772
+ + <Select label="Price" start="€" items={items} />
773
+ ```
774
+
775
+ In Astro and Vue these are slots, such as `<span slot="start">€</span>`. The prop form is React and Svelte.
776
+
777
+ ## Switch
778
+
779
+ `Switch` takes `size="small"` instead of `small`.
780
+
781
+ ```diff
782
+ - <Switch small>Notifications</Switch>
783
+ + <Switch size="small">Notifications</Switch>
784
+ ```
785
+
786
+ The switch lines up with the first line of its label, keeps a light marker in dark mode and uses `--ui-invalid` for the invalid state. Without a visible label it aligns to the middle, so give it a hidden label (`hideLabel`, or `.ui-sr-only` in HTML).
787
+
788
+ `aria-invalid="true"` on the `<input role="switch">` replaces `data-invalid` on `.ui-switch`.
789
+
790
+ In Astro, `type` is no longer a typed prop. Remove it, the component sets it.
791
+
792
+ In Astro and Vue, `style` goes to the root `<label>` instead of the `<input>`, like `class`. Set `--_` properties through `style`, and style the input itself with a class or CSS.
793
+
794
+ Deep type imports from `opui-css/components/*` are renamed, see [Package and imports](#package-and-imports).
795
+
796
+ `stack` (`.ui-stack`) is `orientation="vertical"` (`.ui-vertical`).
797
+
798
+ ```diff
799
+ - <Switch stack>Label</Switch>
800
+ + <Switch orientation="vertical">Label</Switch>
801
+ ```
802
+
803
+ ## Table
804
+
805
+ Dense cells have less block padding.
806
+
807
+ `variant` is `density`, since it sets the cell padding. The classes are unchanged.
808
+
809
+ ```diff
810
+ - <Table variant="dense">
811
+ + <Table density="dense">
812
+ ```
813
+
814
+ In Astro, import the parts by their flat names, such as `TableHead`, `TableRow` and `TableCell`. The `Table.Head`-style aliases are gone.
815
+
816
+ ```diff
817
+ - import { Table } from "opui-css/astro"
818
+ - <Table.Head>
819
+ + import { Table, TableHead } from "opui-css/astro"
820
+ + <TableHead>
821
+ ```
822
+
823
+ The part files are renamed to `TableBody.*`, `TableCell.*`, `TableColumn.*`, `TableColumnGroup.*`, `TableHead.*`, `TableHeaderCell.*` and `TableRow.*`. The `opui-css/<framework>` exports are unchanged; update deep `opui-css/components/*` imports.
824
+
825
+ ```diff
826
+ - import Head from "opui-css/components/Table/Head.astro"
827
+ + import TableHead from "opui-css/components/Table/TableHead.astro"
828
+ ```
829
+
830
+ `TableColumn` `width` takes a CSS length. A declaration string is no longer parsed and renders invalid CSS without a warning, so pass it as `style`.
831
+
832
+ ```diff
833
+ - <TableColumn width="min-width: 10rem" />
834
+ + <TableColumn style="min-width: 10rem" />
835
+ ```
836
+
837
+ Deep type imports from `opui-css/components/*` are renamed, see [Package and imports](#package-and-imports).
838
+
839
+ ## Tabs
840
+
841
+ In Astro, import the parts by their flat names: `TabsItem`, `TabsLabel` and `TabsPanel` replace `Tabs.Item`, `Tabs.Tab` and `Tabs.Panel`.
842
+
843
+ ```diff
844
+ - <Tabs.Item>
845
+ + <TabsItem>
846
+ ```
847
+
848
+ Tabs look like segmented controls: the tabs sit on a rounded track and the selected tab is a raised pill. `--_accent-color` and `--_bg-color` are gone: use `--_selected-bg-color`, `--_selected-text-color`, `--_indicator-bg-color` and `--_track-bg-color`, or a `variant` (`filled`, `line`, `outlined`). The open panel has a `--ui-space-2` top margin, so remove any spacing you added above it.
849
+
850
+ ```diff
851
+ - .ui-tabs { --_accent-color: var(--ui-critical); }
852
+ + .ui-tabs { --_selected-text-color: var(--ui-critical); }
853
+ ```
854
+
855
+ `TabsItem` takes `id` and `TabsLabel` takes `for` (`htmlFor` in React) instead of `tabId`; when both are omitted the item still generates the id and hands it to its label.
856
+
857
+ Tabs are a radio group without tab roles. Remove `role="tablist"`, `role="tab"`, `role="tabpanel"`, `aria-controls` and `aria-labelledby` from HTML tabs, and `panelId` (and `tabId` on the panel) from Astro and Vue. Styles that target `[role="tab"]` or `[role="tabpanel"]` need `.ui-label` and `.ui-panel`.
858
+
859
+ ```diff
860
+ - <div class="ui-tabs" role="tablist">
861
+ - <input type="radio" name="tabs" id="tab-1" class="ui-tab-input" aria-controls="panel-1" checked />
862
+ - <label for="tab-1" class="ui-tab-label" role="tab">Profile</label>
863
+ - <div id="panel-1" class="ui-tab-panel" role="tabpanel" aria-labelledby="tab-1">…</div>
864
+ + <div class="ui-tabs">
865
+ + <input type="radio" name="tabs" id="tab-1" class="ui-input" checked />
866
+ + <label for="tab-1" class="ui-label">Profile</label>
867
+ + <div class="ui-panel">…</div>
868
+ ```
869
+
870
+ The parts are `.ui-input`, `.ui-label` and `.ui-panel` instead of `.ui-tab-input`, `.ui-tab-label` and `.ui-tab-panel`, and `TabsTab` is `TabsLabel`.
871
+
872
+ ```diff
873
+ - <input type="radio" name="tabs" id="tab-1" class="ui-tab-input" />
874
+ - <label for="tab-1" class="ui-tab-label">Profile</label>
875
+ - <div class="ui-tab-panel">…</div>
876
+ + <input type="radio" name="tabs" id="tab-1" class="ui-input" />
877
+ + <label for="tab-1" class="ui-label">Profile</label>
878
+ + <div class="ui-panel">…</div>
879
+ ```
880
+
881
+ ```diff
882
+ - <TabsTab>Profile</TabsTab>
883
+ + <TabsLabel>Profile</TabsLabel>
884
+ ```
885
+
886
+ Tabs that don't fit can stay on one row and scroll sideways with `overflow="scroll"` (`.ui-overflow-scroll`).
887
+
888
+ `TabsItem` `open` is `checked`, the attribute it sets on the radio.
889
+
890
+ ```diff
891
+ - <TabsItem open>
892
+ + <TabsItem checked>
893
+ ```
894
+
895
+ ## Text field
896
+
897
+ `TextField` takes a `size` prop like `Select`, with `x-small`, `small` and `large`.
898
+
899
+ ```diff
900
+ - <TextField small label="Name" />
901
+ + <TextField size="small" label="Name" />
902
+ ```
903
+
904
+ Astro and Vue no longer generate an input `id`. Pass `id` when something outside the component references the input.
905
+
906
+ In Astro, extra attributes go to the `<input>` instead of the `<label>`. `class` and `style` stay on the label. In Vue, `style` now goes to the label instead of the input. Check selectors and tests that look for attributes on the label.
907
+
908
+ `description` is `startText` (the `start-text` slot in Astro and Vue), matching `endText`. `supportingText` (the `supporting-text` slot) is gone. Use `endText`.
909
+
910
+ ```diff
911
+ - <TextField label="Name" startText="Full name" supportingText="Required" />
912
+ + <TextField label="Name" startText="Full name" endText="Required" />
913
+ ```
914
+
915
+ With `spread`, label and field split the container into equal columns. Fields keep a `12ch` minimum width in table cells, the invalid state uses `--ui-invalid`, and the auto-suggest arrow is a chevron with the `Select` arrow size.
916
+
917
+ The boolean `filled` is gone. Use `variant="filled"` like `Select`. The class is still `.ui-filled`.
4
918
 
5
919
  ```diff
6
- - <TextField critical label="Name" />
7
- + <TextField error label="Name" />
920
+ - <TextField filled label="Name" />
921
+ + <TextField variant="filled" label="Name" />
8
922
  ```
9
923
 
10
- Note: Components that use `critical` for severity styling (such as `Button`, `Callout`, `Badge`) still use the `critical` prop.
924
+ `data-invalid` on `.ui-text-field` no longer does anything. Put `aria-invalid="true"` on the `<input>` (Astro and Vue: `error`, unchanged). Styles that targeted `[data-invalid]` should target `:has([aria-invalid="true"])`.
11
925
 
12
- # Migrating from v4 to v5
926
+ ```diff
927
+ - <label class="ui-text-field" data-invalid> … <input aria-invalid="true">
928
+ + <label class="ui-text-field"> … <input aria-invalid="true">
929
+ ```
930
+
931
+ `text-input.css` is gone, its styles are in `text-field.css`. Remove the import:
932
+
933
+ ```diff
934
+ @import "opui-css/css/components/text-field.css";
935
+ - @import "opui-css/css/components/text-input.css";
936
+ ```
937
+
938
+ The slots inside the field's border are `start` and `end` instead of `prefix` and `suffix`, and `top` and `bottom` instead of `header` and `footer`. In HTML, the classes are `.ui-start`, `.ui-end`, `.ui-top` and `.ui-bottom`.
939
+
940
+ ```diff
941
+ - <span class="ui-prefix">€</span>
942
+ + <span class="ui-start">€</span>
943
+ ```
944
+
945
+ ```diff
946
+ - <TextField label="Amount" prefix="€" suffix="EUR" />
947
+ + <TextField label="Amount" start="€" end="EUR" />
948
+ ```
949
+
950
+ In Astro and Vue these are slots, such as `<span slot="start">€</span>`. The prop form is React and Svelte.
951
+
952
+ ## Textarea
953
+
954
+ `Textarea` takes a `size` prop instead of `small`, like `TextField`.
955
+
956
+ ```diff
957
+ - <Textarea small label="Message" />
958
+ + <Textarea size="small" label="Message" />
959
+ ```
960
+
961
+ Astro and Vue no longer generate an `id`, extra attributes go to the `<textarea>` in Astro (`class` and `style` stay on the label), and in Vue `style` goes to the label. `description` is `startText` (the `start-text` slot), like Text field. `supportingText` (the `supporting-text` slot) is gone. Use `endText`.
962
+
963
+ The minimum height is three lines plus padding at every size (small was a fixed 64px). With `spread`, the fixed `30ch` minimum is gone and label and field split the container into equal columns. Textareas keep a `12ch` minimum width in table cells.
964
+
965
+ The boolean `filled` is gone. Use `variant="filled"` like `Select`. The class is still `.ui-filled`.
966
+
967
+ ```diff
968
+ - <Textarea filled label="Name" />
969
+ + <Textarea variant="filled" label="Name" />
970
+ ```
971
+
972
+ Same as Text field: `aria-invalid="true"` on the `<textarea>` replaces `data-invalid` on `.ui-textarea`.
973
+
974
+ The slots inside the field's border are `start` and `end` instead of `prefix` and `suffix`, and `top` and `bottom` instead of `header` and `footer`. In HTML, the classes are `.ui-start`, `.ui-end`, `.ui-top` and `.ui-bottom`.
975
+
976
+ ```diff
977
+ - <span class="ui-prefix">€</span>
978
+ + <span class="ui-start">€</span>
979
+ ```
980
+
981
+ ```diff
982
+ - <Textarea label="Bio" footer="0 / 160" />
983
+ + <Textarea label="Bio" bottom="0 / 160" />
984
+ ```
985
+
986
+ In Astro and Vue these are slots, such as `<span slot="start">€</span>`. The prop form is React and Svelte.
987
+
988
+ ## Toast
989
+
990
+ `Toast` is removed. `toast.css`, `css/js/toast.js` and its types are gone, so drop their imports and the `initToastManager()` and `showToast()` calls.
991
+
992
+ ## Toggle button and toggle group
993
+
994
+ Text shrinks with the size like `Button`: `--ui-font-size-small` when small and `--ui-font-size-caption` when x-small. Groups wrap onto more rows when they don't fit; use `overflow="scroll"` or `overflow="shrink"` to keep them on one row.
995
+
996
+ `ToggleButton` in Astro and Vue no longer generates an input `id`. Pass `id` when something outside the component references the input.
997
+
998
+ In Astro and Vue, `style` on a `ToggleButton` goes to the root `<label>` instead of the `<input>`, like `class`. Set `--_` properties through `style`, and style the input itself with a class or CSS.
999
+
1000
+ `ToggleGroup` no longer exports the unused `ToggleContext` type.
1001
+
1002
+ `ToggleButton` no longer supports `.ui-disabled`, and Astro and Vue no longer add it. Set `disabled` on the input, the toggle is styled through `:has(input:disabled)`.
1003
+
1004
+ ```diff
1005
+ - <label class="ui-toggle-button ui-disabled"><input type="checkbox" />Bold</label>
1006
+ + <label class="ui-toggle-button"><input type="checkbox" disabled />Bold</label>
1007
+ ```
1008
+
1009
+ `ToggleGroup` `size="default"` is now `size="medium"`, like every sized component.
1010
+
1011
+ ```diff
1012
+ - <ToggleGroup size="default">
1013
+ + <ToggleGroup size="medium">
1014
+ ```
13
1015
 
14
- v5 prefixes every OPUI-owned class with `ui-`. The component prop API is unchanged; only the rendered class names change.
1016
+ `ToggleGroup` `selection` is `multiple`, and a group is single-select by default. Add `multiple` where the group was multi-select, which was the default, and drop `selection="single"`.
15
1017
 
16
- If you use the framework component (e.g. `<Button size="small" variant="outlined">`), you don't need to do anything - the component emits the prefixed classes for you.
1018
+ ```diff
1019
+ - <ToggleGroup>
1020
+ + <ToggleGroup multiple>
1021
+ - <ToggleGroup selection="single">
1022
+ + <ToggleGroup>
1023
+ ```
17
1024
 
18
- If you use raw HTML or write CSS that targets library classes, you must rename every reference:
1025
+ `ToggleButton` `value` no longer falls back to `label`. Pass `value` when the input needs one.
19
1026
 
20
1027
  ```diff
21
- - <button class="button outlined small">Save</button>
22
- + <button class="ui-button ui-outlined ui-small">Save</button>
1028
+ - <ToggleButton label="Bold" />
1029
+ + <ToggleButton label="Bold" value="bold" />
23
1030
  ```
24
1031
 
1032
+ `ToggleButton` icon styles only apply to a direct child `svg`, sized with `--_icon-size`. An `svg` nested in another element is no longer sized, so move it out of its wrapper:
1033
+
25
1034
  ```diff
26
- - .button.filled { /* override */ }
27
- + .ui-button.ui-filled { /* override */ }
1035
+ - <label class="ui-toggle-button"><input type="checkbox" /><span><svg>…</svg></span></label>
1036
+ + <label class="ui-toggle-button"><input type="checkbox" /><svg>…</svg></label>
28
1037
  ```
29
1038
 
30
- The full list of renamed tokens is in [CHANGELOG.md](./CHANGELOG.md#500). Run a project-wide find/replace per token, then visually smoke test.
1039
+ `ToggleButton` `pressed` is `checked`, the attribute it sets on the input.
31
1040
 
32
- CSS custom properties (`--primary`, `--surface-default`, `--size-3`, …) are unchanged.
1041
+ ```diff
1042
+ - <ToggleButton pressed value="bold">
1043
+ + <ToggleButton checked value="bold">
1044
+ ```
33
1045
 
34
- # Migrating from v3 to v4
1046
+ ## Tooltip
35
1047
 
36
- v4 is a full re-platform.
1048
+ `.ui-anchor` is no longer needed on `.ui-tooltip`, and the components no longer render it. `anchor.css` positions the tooltip itself.
1049
+
1050
+ ```diff
1051
+ - <span class="ui-anchor ui-tooltip">
1052
+ + <span class="ui-tooltip">
1053
+ ```
37
1054
 
38
- ## 1. `import "opui-css"` still works
1055
+ `Tooltip` no longer wraps the trigger in a `<span interestfor>`. Give the tooltip an `id` (now required in the types) and add `interestfor` with that id to the trigger.
39
1056
 
40
- The default export still resolves to a complete, ready-to-use stylesheet - just under a different filename. No code change needed unless you want one.
1057
+ In Astro and Vue the text goes in `TooltipContent` instead of `label` or the `content` slot.
41
1058
 
42
1059
  ```diff
43
- - import "opui-css" // resolved to dist/theme-two/theme-two.css
44
- + import "opui-css" // now resolves to dist/opui.css (single theme)
1060
+ - <Tooltip label="Save your changes">
1061
+ - <Button>Save</Button>
1062
+ + <Tooltip id="save-tooltip">
1063
+ + <Button interestfor="save-tooltip">Save</Button>
1064
+ + <TooltipContent>Save your changes</TooltipContent>
1065
+ </Tooltip>
45
1066
  ```
46
1067
 
47
- If you imported `theme-one` specifically, you need to either accept the new theme or vendor the v3 stylesheet into your repo:
1068
+ `types.ts` no longer exports a `Slots` type.
1069
+
1070
+ Tooltips use `--ui-surface-inverse` and `--ui-on-inverse`, and shift along the viewport edge instead of squeezing, with or without an arrow.
1071
+
1072
+ `alignment` is `positionArea`, and `.ui-with-arrow` is `.ui-arrow`, like the `arrow` prop.
1073
+
1074
+ ```diff
1075
+ - <Tooltip alignment="block-end" id="hint">
1076
+ + <Tooltip id="hint" positionArea="block-end">
1077
+ ```
48
1078
 
49
1079
  ```diff
50
- - import "opui-css/theme-one"
51
- - import "opui-css/theme-one/components"
52
- + import "opui-css" // or your own override layer
1080
+ - <span class="ui-anchor ui-tooltip ui-with-arrow">
1081
+ + <span class="ui-tooltip ui-arrow">
53
1082
  ```
54
1083
 
55
- ## 2. `opui-css/open-props` is unchanged
1084
+ ## Theme and tokens
56
1085
 
57
- ```js
58
- import "opui-css/open-props" // still points at compiled Open Props tokens
1086
+ Every theme token has a `--ui-` prefix, like the classes: `--primary` is `--ui-primary`, `--border-color` is `--ui-border-color`, `--color-1` is `--ui-color-1` and `--gray-1` is `--ui-gray-1`. Open Props tokens keep their names: `--size-*`, `--font-size-0` to `--font-size-8`, `--shadow-1` to `--shadow-6`, `--hue-*`, `--shadow-color` and `--shadow-strength`, but no theme token reads them any more (see [Package and imports](#package-and-imports)). Add `ui-` to every token you set or read. `tokens.json` lists them all with their new names.
1087
+
1088
+ ```diff
1089
+ - .sidebar { --primary: var(--green); }
1090
+ + .sidebar { --ui-primary: var(--ui-green); }
59
1091
  ```
60
1092
 
61
- ## 3. The other `dist/` subpaths
1093
+ These tokens also have a new name, so adding the prefix isn't enough:
62
1094
 
63
- | v3 | v4 |
64
- | ---------------------------------------- | ----------------------------------- |
65
- | `opui-css/dist/theme-two/theme-two.css` | `opui-css/dist/opui.css` |
66
- | `opui-css/dist/theme-two/components.css` | `opui-css/dist/opui.components.css` |
67
- | `opui-css/dist/theme-one/theme-one.css` | removed |
68
- | `opui-css/dist/theme-one/components.css` | removed |
69
- | `opui-css/dist/op.css` | `opui-css/dist/op.css` (unchanged) |
1095
+ | v5 | v6 |
1096
+ | ------------------------- | --------------------------------------------------------- |
1097
+ | `--border-radius` | `--ui-radius` |
1098
+ | `--button-border-radius` | `--ui-button-radius` (unset, falls back to `--ui-radius`) |
1099
+ | `--field-border-radius` | `--ui-field-radius` (unset, falls back to `--ui-radius`) |
1100
+ | `--primary-contrast` | `--ui-on-primary` |
1101
+ | `--surface-default` | `--ui-surface` |
1102
+ | `--text-muted` | `--ui-text` |
1103
+ | `--text-muted-contrast` | removed, use `--ui-on-inverse` on `--ui-surface-inverse` |
1104
+ | `--text-primary` | `--ui-text-strong` |
1105
+ | `--text-primary-contrast` | `--ui-on-inverse` |
70
1106
 
71
- ## 4. Source layout moved
1107
+ `--ui-on-*` is the text and icon color on a fill, so `--ui-on-primary` goes on `--ui-primary` and `--ui-on-inverse` on `--ui-surface-inverse`. `--primary-dark` and `--primary-light` are gone. Derive a shade from the primary instead, such as `oklch(from var(--ui-primary) calc(l * 0.75) c h)`.
72
1108
 
73
- If you were importing from `src/`:
1109
+ ```diff
1110
+ - .note { color: var(--text-primary); border-radius: var(--border-radius); }
1111
+ + .note { color: var(--ui-text-strong); border-radius: var(--ui-radius); }
1112
+ ```
1113
+
1114
+ `--font-size-05` is `--ui-font-size-small`, one of the type roles that replace the Open Props steps in the components: `--ui-font-size-caption`, `--ui-font-size-small`, `--ui-font-size-body`, `--ui-font-size-control` and `--ui-font-size-large`, which default to steps of the new `--ui-font-size-100` to `--ui-font-size-900` scale.
74
1115
 
75
1116
  ```diff
76
- - @import "opui-css/src/components/button.css";
77
- + @import "opui-css/css/components/button.css";
1117
+ - .note { font-size: var(--font-size-05); }
1118
+ + .note { font-size: var(--ui-font-size-small); }
1119
+ ```
1120
+
1121
+ `theme.css` sets `--ui-focus-ring-color` to black on light surfaces and white on dark ones instead of `var(--ui-primary)`, and the global focus ring and the component rings read it. To keep the old value, set it in your theme:
1122
+
1123
+ ```css
1124
+ @layer theme.custom {
1125
+ :where(html) {
1126
+ --ui-focus-ring-color: var(--ui-primary);
1127
+ }
1128
+ }
1129
+ ```
1130
+
1131
+ A theme pins a role by setting it, and the scope classes `.ui-palette` and `.ui-contrast-more` derive every role again from the knobs. Set pinned roles on `:where(html, .ui-palette, .ui-contrast-more)` so the scopes keep them; knobs such as `--ui-radius` or `--ui-palette-hue` can stay on `html`. More contrast tightens knobs and no longer replaces a pinned role, so a theme that wants its primary darkened under `prefers-contrast: more` sets `--ui-primary-source` instead of `--ui-primary`, and a theme that wants another pinned role back under more contrast sets it to `revert-layer` there (see Contrast in the theming guide). The example themes do that and leave `--ui-on-primary` and `--ui-primary-text` to derive from it:
1132
+
1133
+ ```css
1134
+ @layer theme.custom {
1135
+ :where(html, .ui-palette, .ui-contrast-more) {
1136
+ --ui-primary-source: oklch(0.578 0.228 260);
1137
+ }
1138
+ }
1139
+ ```
1140
+
1141
+ The default palette is green in both color schemes. v5 switched it to blue in dark mode; to keep that, set the hue for dark mode yourself:
1142
+
1143
+ ```css
1144
+ @layer theme.custom {
1145
+ :where(html.ui-dark) {
1146
+ --ui-palette-hue: 240;
1147
+ }
1148
+
1149
+ @media (prefers-color-scheme: dark) {
1150
+ :where(html:not(.ui-light)) {
1151
+ --ui-palette-hue: 240;
1152
+ }
1153
+ }
1154
+ }
1155
+ ```
1156
+
1157
+ `theme.css` is in the `theme.base` layer, and `layers.css` adds an empty `theme.custom` layer after it for your own tokens, then `theme.severity`, where `theme.css` puts the palette source of the severity classes so a theme can't override it on the same element. Overrides in `@layer theme` keep working and now beat the defaults wherever they load. If you copied a complete `theme.css` from the v5 Theme generator, build a new one in the [Theme builder](https://open-props-ui.netlify.app/theme-builder/): it only lists the example theme you start from and the tokens you change, so it won't miss tokens added in later releases.
1158
+
1159
+ `theme.css` no longer sets `--ui-button-radius` and `--ui-field-radius`, and buttons and fields follow `--ui-radius` while they're unset, also where you set it on a part of the page. If your own styles read them, add the fallback: `var(--ui-button-radius, var(--ui-radius))`. If you set `--ui-radius` and want buttons and fields to keep their corners, set them back:
1160
+
1161
+ ```css
1162
+ @layer theme.custom {
1163
+ :where(html) {
1164
+ --ui-button-radius: 0.5rem;
1165
+ --ui-field-radius: 0.5rem;
1166
+ }
1167
+ }
78
1168
  ```
79
1169
 
80
- The component CSS now lives under `css/`. The pre-bundled output stays in `dist/`.
1170
+ `kbd`, `mark`, `var`, `Tooltip`, `Checkbox`, file inputs and rounded `Avatar` never get rounder than `--ui-radius`.
1171
+
1172
+ Component padding, gaps and margins read `--ui-space-1` to `--ui-space-8` instead of the Open Props `--size-*` steps. The steps resolve on `html`, so overriding `--size-*` on a part of the page no longer changes the components in it. Set `--ui-space-scale` on `html` to change the spacing everywhere, or a component's `--_` property to change one.
1173
+
1174
+ The `Select` picker and `Drawer` use `--ui-shadow-overlay` (`--shadow-3`, was `--shadow-2`), and elevated `Accordion` uses `--ui-shadow-elevated`, the elevated `Card` shadow.
81
1175
 
82
- ## 5. Pick a theme - there's only one
1176
+ `--ui-primary` is `--ui-color-9` in light mode and `--ui-color-6` in dark mode, and `--ui-on-primary` is derived from `--ui-primary` with relative color. If you set your own `--ui-primary`, its text color now follows it.
83
1177
 
84
- `theme-one` and `theme-two` are removed. The shipped theme lives in `css/theme.css`. To customise, override variables in a layer:
1178
+ `palette.css` no longer registers `--color-*`, `--gray-*`, `--palette-source` and `--palette-hue` with `@property`, so they can't be animated as colors anymore.
1179
+
1180
+ `--ui-motion` and its `prefers-reduced-motion` default moved from `core/normalize.css` to `theme.css`, and the `.ui-motion-*` classes moved to `core/utils.css`. `theme.css` also declares `--ui-palette-hue-rotate-by`, `--ui-gray-hue` and `--ui-gray-chroma`. If you import single files, import `theme.css` and `utils.css` too.
1181
+
1182
+ Component borders read `--ui-border-width` (`Accordion`, `ButtonGroup`, `Callout`, `Card`, `Chip`, `DescriptionList`, `List`, `Table`, `ToggleButton`, `ToggleGroup`) and `--ui-field-border-width` (`Checkbox`, `Radio`, `Switch`, `TextField`) instead of a hardcoded `1px`. If you set either token, check those components too.
1183
+
1184
+ Links (`.ui-link` and rich text links) darken in light mode and lighten in dark mode on hover and focus, and their underline gets `3px` thick.
1185
+
1186
+ Private custom properties (`--_*`) follow one scheme: `--_accent` for the accent color, `--_text-color` for text, `--_bg-color` for the component's own background (a sub-part keeps a prefix, like `--_thumb-bg-color`), `--_duration` and `--_ease` for motion, `--_size` for a control's size (the height, and the width of a square control), `--_radius` for corners, and `--_block-size` and `--_inline-size` for one axis of a box that isn't a control. A color says what it paints (`-bg-color`, `-text-color`, `-border-color`), sizes are logical (`-block-size`, `-inline-size`) and names aren't abbreviated. Rename them where you set them. A property the component sets (an output in the Component properties table) isn't an override: the rows below name the input to set instead:
1187
+
1188
+ | Component | Old | New |
1189
+ | --------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
1190
+ | Accordion | `--_transition` | `--_duration` |
1191
+ | Accordion | `--_svg-transition` | removed, the chevron uses `--_duration` and `--_ease` |
1192
+ | Accordion | `--_gutter-color` (group) | `--_divider-border-color` |
1193
+ | Accordion | `--_border-radius` | `--_radius` |
1194
+ | Anchor | `--_anchor-tx`, `--_anchor-ty` | `--_shift-x`, `--_shift-y` |
1195
+ | Avatar | `--_color` | `--_text-color` |
1196
+ | Avatar | `--_width` | `--_size` |
1197
+ | Badge | `--_badge-inset` | `--_inset`, which the component turns into `--_inset-block` and `--_inset-inline` |
1198
+ | Badge | `--_anchor-tx`, `--_anchor-ty` | removed as overrides, the corner classes set `--_shift-x` and `--_shift-y` |
1199
+ | Button | `--_color`, `--_color-contrast`, `--_color-tonal` | `--_accent`, `--_on-accent`, `--_accent-tonal` |
1200
+ | Button | `--_border-radius` | `--_radius` |
1201
+ | Button | `--_min-height` | `--_size` |
1202
+ | Button | `--_accent-contrast`, `--_accent-tonal-contrast` | `--_on-accent`, `--_on-accent-tonal` |
1203
+ | ButtonGroup | `--_border-radius` | `--_radius` |
1204
+ | ButtonGroup | `--_min-height` | removed, set `--_size` on the buttons |
1205
+ | ButtonGroup | `--_divider-color` | `--_divider-border-color` |
1206
+ | Callout | `--_color` | `--_text-color` |
1207
+ | Callout | `--_outlined-color` | `--_outlined-text-color` |
1208
+ | Callout | `--_surface-bg` | `--_surface-bg-color` |
1209
+ | Callout | `--_border-radius` | `--_radius` |
1210
+ | Callout | `--_icon-color`, `--_outlined-icon-color` | `--_outlined-icon-text-color` in `.ui-outlined`; without it the icon follows the text, and the severity classes set `--_icon-text-color` |
1211
+ | Callout | `--_link-hover-color` | `--_link-hover-text-color` |
1212
+ | Card | `--_card-bg-color` | `--_bg-color` |
1213
+ | Card | `--_card-border-color` | `--_border-color` |
1214
+ | Card | `--_card-border-width` | `--_border-width` |
1215
+ | Card | `--_card-shadow` | `--_shadow` |
1216
+ | Card | `--_border-color` (outlined border) | `--_outlined-border-color` |
1217
+ | Card | `--_bg-surface`, `--_bg-tonal`, `--_bg-elevated` | `--_surface-bg-color`, `--_tonal-bg-color`, `--_elevated-bg-color` |
1218
+ | Card | `--_shadow-elevated` | `--_elevated-shadow` |
1219
+ | Card | `--_shadow-light`, `--_shadow-dark` | removed, set `--ui-shadow-elevated`, or `--_elevated-shadow` on the card |
1220
+ | Checkbox | `--_input-size` | `--_size` |
1221
+ | Chip | `--_color` | `--_text-color` |
1222
+ | Drawer | `--_color` | `--_text-color` |
1223
+ | Drawer | `--_transition-duration`, `--_transition-timing` | `--_duration`, `--_ease` |
1224
+ | List | `--_bg-color-hover` | `--_hover-bg-color` |
1225
+ | normalize.css | `--_page-bg-color` | removed, `html` reads `--ui-surface` |
1226
+ | Progress | `--_accent-color` | `--_accent` |
1227
+ | Radio | `--_input-size` | `--_size` |
1228
+ | Range | `--_thumb-bg` | `--_thumb-bg-color` |
1229
+ | Range | `--_thumb-highlight-color` | `--_accent`, which `--_thumb-highlight-bg-color` is derived from |
1230
+ | Range | `--_track-color`, `--_track-fill-color` | `--_track-base-bg-color` and `--_accent`, which `--_track-bg-color` and `--_track-fill-bg-color` are derived from |
1231
+ | Range | `--_track-fill` | removed as an override, `--_track-fill-fraction` is animated from the thumb position |
1232
+ | Range | `--_track-height` | `--_track-block-size` |
1233
+ | Switch | `--_accent-color` | `--_accent` |
1234
+ | Switch | `--_transition-time`, `--_transition-tf` | `--_duration`, `--_ease` |
1235
+ | Switch | `--_track-height`, `--_track-width` | `--_track-block-size`, `--_track-inline-size` |
1236
+ | Switch | `--_accent-contrast` | `--_on-accent` |
1237
+ | Switch | `--_dot-bg-color`, `--_dot-inset`, `--_dot-outline-size`, `--_dot-size` | `--_thumb-bg-color`, `--_thumb-inset`, `--_thumb-outline-size`, `--_thumb-size` |
1238
+ | Table | `--_table-border-radius` | `--_radius` |
1239
+ | TextField, Textarea, Select | `--_accent-color` | `--_accent` |
1240
+ | TextField, Textarea, Select | `--_height` | `--_size` |
1241
+ | TextField, Textarea, Select | `--_label-color` | removed as an override, `--_affix-text-color` reads `--ui-text` and the invalid state sets it |
1242
+ | TextField, Textarea, Select | `--_end-text-color` | `--ui-field-helper-text-color`, which `--_helper-text-color` is derived from |
1243
+ | ToggleButton | `--_button-bg-color` | `--_bg-color` |
1244
+ | ToggleButton | `--_svg-size` | `--_icon-size` (direct child `svg`s only) |
1245
+ | ToggleGroup | `--_border-radius` | `--_radius` |
1246
+ | Tooltip | `--_tooltip-bg`, `--_tooltip-color` | `--_bg-color`, `--_text-color` |
1247
+ | Tooltip | `--_tooltip-offset` | `--_offset` |
1248
+
1249
+ `--ui-info` and `--ui-blue` use hue 240, the same blue as the `.ui-info` palette, so info badges and callouts match. If you relied on the old cyan-ish blue (hue 210), set `--ui-blue` in your theme.
1250
+
1251
+ Dark mode shadows are darker: every shadow role (`--ui-shadow-elevated`, `--ui-shadow-overlay`, `--ui-shadow-scroll`, `--ui-shadow-selected`) builds its layers from `--ui-shadow-color`, `light-dark(oklch(0.268 0.003 265 / 1%), oklch(0.11 0.01 259 / 20%))`, so it darkens under `.ui-dark`, also on a part of the page, and the OS dark preference. There is one `--ui-shadow-elevated` for both schemes and no `--ui-shadow-elevated-light`, `--ui-shadow-elevated-dark` or `--ui-shadow-strength`; set `--ui-shadow-color` to change the color in each scheme, or `--ui-shadow-elevated` to replace the shadow:
85
1252
 
86
1253
  ```css
87
- @layer theme {
88
- :root {
89
- --primary: oklch(60% 0.2 250);
1254
+ @layer theme.custom {
1255
+ :where(html, .ui-palette, .ui-contrast-more) {
1256
+ --ui-shadow-color: light-dark(
1257
+ oklch(0.28 0.055 290 / 2%),
1258
+ oklch(0 0 0 / 30%)
1259
+ );
1260
+ --ui-shadow-elevated: 0 0.125rem 0.25rem oklch(0 0 0 / 0.075);
90
1261
  }
91
1262
  }
92
1263
  ```
93
1264
 
94
- ## 6. `open-props` is now a peer dependency
1265
+ `theme.css` no longer sets the Open Props `--shadow-color` and `--shadow-strength`. If your own CSS reads `--shadow-1` to `--shadow-6` and should darken in dark mode, set those two yourself under `.ui-dark` and the OS dark preference. The bundle no longer contains Open Props' `@custom-media` definitions (`--OSdark`, `--md-n-above` and so on); import `open-props/media` if your PostCSS setup used them.
1266
+
1267
+ Components read roles, not palette steps or Open Props values, and the roles are computed on `html`. Overriding a step such as `--ui-gray-4` or an Open Props value such as `--size-3` on a part of the page no longer changes the components there. Override the role, or add `.ui-palette` so the part derives its roles again from its own palette:
1268
+
1269
+ ```diff
1270
+ - .sidebar { --gray-4: oklch(0.928 0.006 265); }
1271
+ + .sidebar { --ui-surface-filled: oklch(0.928 0.006 265); }
1272
+ ```
1273
+
1274
+ `--ui-control-size-large` is `3rem` (48px) instead of 46px, so large buttons, fields, toggles and selects grow by 2px. Set `--ui-control-size-large: calc(2.875rem * var(--ui-density))` to keep the old height.
95
1275
 
96
- v3 had `open-props` as a regular dependency. v4 makes it a peer so you control the version:
1276
+ ## Typography and rich text
97
1277
 
98
- ```bash
99
- pnpm add open-props
1278
+ `del`, `ins`, `abbr`, `dfn` and the `.ui-del`, `.ui-ins`, `.ui-abbr` and `.ui-dfn` classes are no longer severity scopes. `del` text reads `--ui-critical-text`, `ins` text `--ui-success-text` and the `abbr` and `dfn` underline `--ui-info`, and content inside them keeps the page palette. Wrap content that read a `--ui-palette-*` role inside them in `.ui-critical`, `.ui-success` or `.ui-info`.
1279
+
1280
+ Rich text (`.ui-rich-text`) only styles headings without a class, like lists. Add a `.ui-h1`–`.ui-h6` class to a heading that has another class. Component parts such as the `Callout` title keep their own styles.
1281
+
1282
+ ```diff
1283
+ - <h2 class="intro">Title</h2>
1284
+ + <h2 class="intro ui-h2">Title</h2>
100
1285
  ```
101
1286
 
102
- ## 7. New: Astro components
1287
+ `--ui-font-size-h1` to `--ui-font-size-h4` grow over one shared viewport window, `--ui-fluid-min-inline-size` (20rem) to `--ui-fluid-max-inline-size` (48rem), with `progress()`. `--ui-font-size-h3` has a higher minimum (`--ui-font-size-500`), `--ui-font-size-h4` scales between `--ui-font-size-400` and `--ui-font-size-500` instead of a fixed size, and `--ui-font-size-h6` is `--ui-font-size-300`, so check pages that rely on the old heading sizes. Set the two window tokens to move the breakpoints, or pin a heading to a step.
103
1288
 
104
- ```astro
105
- ---
106
- import { Button, Dialog, Tabs } from "opui-css/astro"
107
- ---
1289
+ Rich text styles live in a new `components.prose` layer, below `components.root`, so component styles inside rich text win over prose styles. If you declare the layer order yourself, add it:
108
1290
 
109
- <Button variant="primary">Save</Button>
1291
+ ```diff
1292
+ - @layer openprops, theme, normalize, components.root, components.extended, utils;
1293
+ + @layer openprops, theme, normalize, components.prose, components.root, components.extended, components.compat, utils;
110
1294
  ```
111
1295
 
112
- `astro` is an _optional_ peer - only required if you actually import from `opui-css/astro`. Pure-CSS consumers won't see a peer warning.
1296
+ Spacing changed, so rich text pages look a bit different:
113
1297
 
114
- Astro components emit prefixed `ui-` classes (see the v4 → v5 section at the top of this file). Raw HTML and CSS overrides must use those prefixed names.
1298
+ - Spacing derives from one flow space (`1.25em` of the body text) and snaps to `--ui-rhythm-step`. Headings get more space above than below.
1299
+ - Headings share one line height, `1em + 0.5rem` rounded to `--ui-rhythm-step`, in rich text and in the `.ui-h1`–`.ui-h6` classes. Heading group subtitles snap to `--ui-rhythm-step` too.
1300
+ - Headings, `pre` and `small` scale with the inherited font size.
1301
+ - List gutters are measured in `ch`, and bulleted and numbered list text starts at the same position.
1302
+ - `sup` and `sub` are `0.75em` and no longer change the line height.
1303
+ - Figure captions are muted and start-aligned under quotes, code blocks and tables.
115
1304
 
116
- ## 8. Cascade layers
1305
+ ## Package and imports
117
1306
 
118
- v4 declares the layer order in `css/imports.css` / `dist/opui.css`:
1307
+ Import `opui-css/css/layers.css` first when you import single component files, so the layers keep their order:
119
1308
 
120
1309
  ```css
121
- @layer openprops, normalize, theme, components.root, components.extended, utils;
1310
+ @import "opui-css/css/layers.css";
1311
+ @import "opui-css/css/components/button.css";
122
1312
  ```
123
1313
 
124
- Put your overrides in a later layer or unlayered. If your app already declared `@layer` with a different order, reconcile or import `dist/opui.components.css` and own the layer order yourself.
1314
+ `checkbox.css`, `radio.css` and `switch.css` moved their layout, label, end text, sizes and disabled styles into `choice.css`. Import it with them, in any order, or the labels lose their layout:
125
1315
 
126
- ## 9. Copy/paste is still supported
1316
+ ```diff
1317
+ @import "opui-css/css/layers.css";
1318
+ + @import "opui-css/css/components/choice.css";
1319
+ @import "opui-css/css/components/checkbox.css";
1320
+ ```
1321
+
1322
+ Browser fallbacks that take more than the browser default moved out of the component files into the `components.compat` layer. Import `compat.css` after the components, or one component's file from `css/compat/`, or a squircle `Avatar` is a circle in browsers without `corner-shape`:
1323
+
1324
+ ```diff
1325
+ @import "opui-css/css/layers.css";
1326
+ @import "opui-css/css/components/avatar.css";
1327
+ + @import "opui-css/css/compat.css";
1328
+ ```
1329
+
1330
+ Deep type imports from `opui-css/components/*` follow one naming scheme: the root is `Props`, its slots `Slots`, and each part is named after the part. `CheckboxProps` and `CheckboxSlots` in `components/Checkbox/types*` are `Props` and `Slots` (likewise `Radio`, `Switch` and `Range`), `TermProps`, `DescriptionProps` and `ItemProps` are `DescriptionListTermProps`, `DescriptionListDescriptionProps` and `DescriptionListItemProps`, and Table's `SectionProps` and `ColumnProps` are one type per part, such as `TableCellProps`, and `TableColumnProps`. Import the names from the framework entry instead:
1331
+
1332
+ ```diff
1333
+ - import type { CheckboxProps } from "opui-css/components/Checkbox/types.astro"
1334
+ - import type { SectionProps } from "opui-css/components/Table/types.astro"
1335
+ + import type { CheckboxProps, TableCellProps } from "opui-css/astro"
1336
+ ```
127
1337
 
128
- The source files under `components/` and `css/components/` are unminified and free to vendor in - the license is unchanged (MIT).
1338
+ The Vue type files are `types.vue-props.ts` instead of `types.d.vue.ts`, since TypeScript reads a `*.d.vue.ts` file as a declaration file and `skipLibCheck` skipped it:
129
1339
 
130
- ## 10. Pinning v3
1340
+ ```diff
1341
+ - import type { Props } from "opui-css/components/Button/types.d.vue"
1342
+ + import type { ButtonProps } from "opui-css/vue"
1343
+ ```
131
1344
 
132
- If you're not ready to migrate, pin the last v3 release:
1345
+ `open-props` is an optional peer dependency. `theme.css` and the example themes no longer read Open Props: the values they took from it (`--size-*`, `--radius-*`, `--border-size-2`, `--ease-in-3`, `--ease-out-3`, `--font-sans`, `--font-mono`, `--font-weight-*`, `--hue-*` and the shadows) are written into `theme.css`, with the same results. `dist/opui.css` still bundles Open Props, so nothing changes if you load it. `css/imports.css` no longer imports `open-props.css`: if your own CSS reads Open Props, import `opui-css/open-props.css` after it and install `open-props`. Otherwise drop the `open-props` package, and replace Open Props values in your theme with plain values or roles:
133
1346
 
134
- ```json
135
- { "dependencies": { "opui-css": "3.3.5" } }
1347
+ ```diff
1348
+ @layer theme.custom {
1349
+ :where(html) {
1350
+ - --ui-radius: var(--size-2);
1351
+ - --ui-palette-hue: var(--hue-blue);
1352
+ + --ui-radius: 0.5rem;
1353
+ + --ui-palette-hue: 240;
1354
+ }
1355
+ }
136
1356
  ```
137
1357
 
138
- v3 will not receive further updates.
1358
+ `opui-css/open-props` (`dist/op.css`) no longer includes Open Props' palette (`--palette-*` and `--color-1` to `--color-16`). If you load `op.css` on its own and read those properties, import `opui-css/core/palette.css` with `opui-css/css/theme.css`, which sets the palette knobs, and read the `--ui-` names (`--ui-palette-*` and `--ui-color-1` to `--ui-color-16`).
1359
+
1360
+ The `types.solid.ts` files are gone. There are no Solid components; write your own prop types if you used them.
1361
+
1362
+ Coming from v3, v4 or an earlier v5? The older guides are in [MIGRATING-legacy.md](./MIGRATING-legacy.md). They use the names of the versions they were written for, and the renames above apply on top of them.