@sewadah/selaras 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/README.md +31 -13
  2. package/dist/module.d.mts +10 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +120 -36
  5. package/dist/runtime/components/Accordion.d.vue.ts +3 -0
  6. package/dist/runtime/components/Accordion.vue +5 -1
  7. package/dist/runtime/components/Accordion.vue.d.ts +3 -0
  8. package/dist/runtime/components/Alert.d.vue.ts +2 -1
  9. package/dist/runtime/components/Alert.vue +6 -3
  10. package/dist/runtime/components/Alert.vue.d.ts +2 -1
  11. package/dist/runtime/components/AlertDialog.d.vue.ts +2 -0
  12. package/dist/runtime/components/AlertDialog.vue +21 -8
  13. package/dist/runtime/components/AlertDialog.vue.d.ts +2 -0
  14. package/dist/runtime/components/App.vue +9 -2
  15. package/dist/runtime/components/Autocomplete.d.vue.ts +22 -58
  16. package/dist/runtime/components/Autocomplete.vue +50 -11
  17. package/dist/runtime/components/Autocomplete.vue.d.ts +22 -58
  18. package/dist/runtime/components/Avatar.d.vue.ts +2 -1
  19. package/dist/runtime/components/Avatar.vue +4 -2
  20. package/dist/runtime/components/Avatar.vue.d.ts +2 -1
  21. package/dist/runtime/components/Badge.d.vue.ts +3 -2
  22. package/dist/runtime/components/Badge.vue +8 -5
  23. package/dist/runtime/components/Badge.vue.d.ts +3 -2
  24. package/dist/runtime/components/Breadcrumb.d.vue.ts +3 -0
  25. package/dist/runtime/components/Breadcrumb.vue +5 -2
  26. package/dist/runtime/components/Breadcrumb.vue.d.ts +3 -0
  27. package/dist/runtime/components/Button.d.vue.ts +5 -2
  28. package/dist/runtime/components/Button.vue +5 -2
  29. package/dist/runtime/components/Button.vue.d.ts +5 -2
  30. package/dist/runtime/components/Checkbox.d.vue.ts +2 -1
  31. package/dist/runtime/components/Checkbox.vue +4 -2
  32. package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
  33. package/dist/runtime/components/Chip.d.vue.ts +2 -1
  34. package/dist/runtime/components/Chip.vue +4 -2
  35. package/dist/runtime/components/Chip.vue.d.ts +2 -1
  36. package/dist/runtime/components/Collapsible.d.vue.ts +3 -0
  37. package/dist/runtime/components/Collapsible.vue +11 -6
  38. package/dist/runtime/components/Collapsible.vue.d.ts +3 -0
  39. package/dist/runtime/components/ColorPicker.d.vue.ts +13 -3
  40. package/dist/runtime/components/ColorPicker.vue +60 -14
  41. package/dist/runtime/components/ColorPicker.vue.d.ts +13 -3
  42. package/dist/runtime/components/Column.d.ts +1 -1
  43. package/dist/runtime/components/CommandPalette.vue +18 -16
  44. package/dist/runtime/components/ContentNavigation.d.vue.ts +3 -0
  45. package/dist/runtime/components/ContentNavigation.vue +6 -3
  46. package/dist/runtime/components/ContentNavigation.vue.d.ts +3 -0
  47. package/dist/runtime/components/ContentSurround.d.vue.ts +3 -0
  48. package/dist/runtime/components/ContentSurround.vue +7 -4
  49. package/dist/runtime/components/ContentSurround.vue.d.ts +3 -0
  50. package/dist/runtime/components/ContentToc.d.vue.ts +3 -0
  51. package/dist/runtime/components/ContentToc.vue +8 -5
  52. package/dist/runtime/components/ContentToc.vue.d.ts +3 -0
  53. package/dist/runtime/components/ContextMenu.vue +3 -2
  54. package/dist/runtime/components/DashboardSidebar.vue +1 -1
  55. package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +1 -0
  56. package/dist/runtime/components/DashboardSidebarToggle.vue +3 -1
  57. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -0
  58. package/dist/runtime/components/DatePicker.d.vue.ts +32 -23
  59. package/dist/runtime/components/DatePicker.vue +130 -60
  60. package/dist/runtime/components/DatePicker.vue.d.ts +32 -23
  61. package/dist/runtime/components/Drawer.d.vue.ts +2 -0
  62. package/dist/runtime/components/Drawer.vue +21 -8
  63. package/dist/runtime/components/Drawer.vue.d.ts +2 -0
  64. package/dist/runtime/components/DrawerRenderer.vue +28 -21
  65. package/dist/runtime/components/Dropdown.d.vue.ts +14 -4
  66. package/dist/runtime/components/Dropdown.vue +19 -4
  67. package/dist/runtime/components/Dropdown.vue.d.ts +14 -4
  68. package/dist/runtime/components/FileTree.d.vue.ts +3 -0
  69. package/dist/runtime/components/FileTree.vue +7 -3
  70. package/dist/runtime/components/FileTree.vue.d.ts +3 -0
  71. package/dist/runtime/components/FileUpload.d.vue.ts +2 -1
  72. package/dist/runtime/components/FileUpload.vue +75 -32
  73. package/dist/runtime/components/FileUpload.vue.d.ts +2 -1
  74. package/dist/runtime/components/FormField.d.vue.ts +2 -0
  75. package/dist/runtime/components/FormField.vue +12 -9
  76. package/dist/runtime/components/FormField.vue.d.ts +2 -0
  77. package/dist/runtime/components/Icon.d.vue.ts +2 -4
  78. package/dist/runtime/components/Icon.vue +7 -2
  79. package/dist/runtime/components/Icon.vue.d.ts +2 -4
  80. package/dist/runtime/components/Input.d.vue.ts +2 -1
  81. package/dist/runtime/components/Input.vue +12 -6
  82. package/dist/runtime/components/Input.vue.d.ts +2 -1
  83. package/dist/runtime/components/InputNumber.d.vue.ts +4 -1
  84. package/dist/runtime/components/InputNumber.vue +21 -8
  85. package/dist/runtime/components/InputNumber.vue.d.ts +4 -1
  86. package/dist/runtime/components/Modal.d.vue.ts +2 -0
  87. package/dist/runtime/components/Modal.vue +21 -8
  88. package/dist/runtime/components/Modal.vue.d.ts +2 -0
  89. package/dist/runtime/components/ModalRenderer.vue +23 -16
  90. package/dist/runtime/components/NavigationMenu.d.vue.ts +2 -4
  91. package/dist/runtime/components/NavigationMenu.vue +6 -4
  92. package/dist/runtime/components/NavigationMenu.vue.d.ts +2 -4
  93. package/dist/runtime/components/NavigationMenuAccordionItem.d.vue.ts +2 -4
  94. package/dist/runtime/components/NavigationMenuAccordionItem.vue +5 -3
  95. package/dist/runtime/components/NavigationMenuAccordionItem.vue.d.ts +2 -4
  96. package/dist/runtime/components/NavigationMenuFlyoutList.d.vue.ts +2 -4
  97. package/dist/runtime/components/NavigationMenuFlyoutList.vue +7 -4
  98. package/dist/runtime/components/NavigationMenuFlyoutList.vue.d.ts +2 -4
  99. package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +2 -4
  100. package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +9 -2
  101. package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +2 -4
  102. package/dist/runtime/components/Pagination.d.vue.ts +3 -2
  103. package/dist/runtime/components/Pagination.vue.d.ts +3 -2
  104. package/dist/runtime/components/PinInput.d.vue.ts +2 -1
  105. package/dist/runtime/components/PinInput.vue +17 -6
  106. package/dist/runtime/components/PinInput.vue.d.ts +2 -1
  107. package/dist/runtime/components/Popover.d.vue.ts +2 -0
  108. package/dist/runtime/components/Popover.vue +14 -7
  109. package/dist/runtime/components/Popover.vue.d.ts +2 -0
  110. package/dist/runtime/components/Progress.d.vue.ts +2 -1
  111. package/dist/runtime/components/Progress.vue +6 -4
  112. package/dist/runtime/components/Progress.vue.d.ts +2 -1
  113. package/dist/runtime/components/ProseH1.d.vue.ts +2 -0
  114. package/dist/runtime/components/ProseH1.vue +7 -4
  115. package/dist/runtime/components/ProseH1.vue.d.ts +2 -0
  116. package/dist/runtime/components/ProseH2.d.vue.ts +2 -0
  117. package/dist/runtime/components/ProseH2.vue +7 -4
  118. package/dist/runtime/components/ProseH2.vue.d.ts +2 -0
  119. package/dist/runtime/components/ProseH3.d.vue.ts +2 -0
  120. package/dist/runtime/components/ProseH3.vue +7 -4
  121. package/dist/runtime/components/ProseH3.vue.d.ts +2 -0
  122. package/dist/runtime/components/ProseH4.d.vue.ts +2 -0
  123. package/dist/runtime/components/ProseH4.vue +7 -4
  124. package/dist/runtime/components/ProseH4.vue.d.ts +2 -0
  125. package/dist/runtime/components/ProseH5.d.vue.ts +2 -0
  126. package/dist/runtime/components/ProseH5.vue +7 -4
  127. package/dist/runtime/components/ProseH5.vue.d.ts +2 -0
  128. package/dist/runtime/components/ProseH6.d.vue.ts +2 -0
  129. package/dist/runtime/components/ProseH6.vue +7 -4
  130. package/dist/runtime/components/ProseH6.vue.d.ts +2 -0
  131. package/dist/runtime/components/RadioGroup.d.vue.ts +2 -1
  132. package/dist/runtime/components/RadioGroup.vue +9 -5
  133. package/dist/runtime/components/RadioGroup.vue.d.ts +2 -1
  134. package/dist/runtime/components/Rating.d.vue.ts +2 -1
  135. package/dist/runtime/components/Rating.vue +4 -1
  136. package/dist/runtime/components/Rating.vue.d.ts +2 -1
  137. package/dist/runtime/components/ReadMore.d.vue.ts +3 -0
  138. package/dist/runtime/components/ReadMore.vue +24 -6
  139. package/dist/runtime/components/ReadMore.vue.d.ts +3 -0
  140. package/dist/runtime/components/Select.d.vue.ts +21 -57
  141. package/dist/runtime/components/Select.vue +58 -9
  142. package/dist/runtime/components/Select.vue.d.ts +21 -57
  143. package/dist/runtime/components/Separator.d.vue.ts +2 -1
  144. package/dist/runtime/components/Separator.vue +4 -2
  145. package/dist/runtime/components/Separator.vue.d.ts +2 -1
  146. package/dist/runtime/components/Slideover.d.vue.ts +2 -0
  147. package/dist/runtime/components/Slideover.vue +21 -8
  148. package/dist/runtime/components/Slideover.vue.d.ts +2 -0
  149. package/dist/runtime/components/SlideoverRenderer.vue +25 -18
  150. package/dist/runtime/components/Slider.d.vue.ts +2 -1
  151. package/dist/runtime/components/Slider.vue +4 -1
  152. package/dist/runtime/components/Slider.vue.d.ts +2 -1
  153. package/dist/runtime/components/SplitterResizeHandle.d.vue.ts +3 -0
  154. package/dist/runtime/components/SplitterResizeHandle.vue +5 -2
  155. package/dist/runtime/components/SplitterResizeHandle.vue.d.ts +3 -0
  156. package/dist/runtime/components/Stepper.d.vue.ts +2 -1
  157. package/dist/runtime/components/Stepper.vue +4 -1
  158. package/dist/runtime/components/Stepper.vue.d.ts +2 -1
  159. package/dist/runtime/components/Switch.d.vue.ts +2 -1
  160. package/dist/runtime/components/Switch.vue +4 -2
  161. package/dist/runtime/components/Switch.vue.d.ts +2 -1
  162. package/dist/runtime/components/Table.d.vue.ts +28 -80
  163. package/dist/runtime/components/Table.vue +25 -13
  164. package/dist/runtime/components/Table.vue.d.ts +28 -80
  165. package/dist/runtime/components/Tabs.d.vue.ts +3 -0
  166. package/dist/runtime/components/Tabs.vue +5 -1
  167. package/dist/runtime/components/Tabs.vue.d.ts +3 -0
  168. package/dist/runtime/components/Textarea.d.vue.ts +2 -1
  169. package/dist/runtime/components/Textarea.vue +11 -6
  170. package/dist/runtime/components/Textarea.vue.d.ts +2 -1
  171. package/dist/runtime/components/Theme.d.vue.ts +16 -5
  172. package/dist/runtime/components/Theme.vue +30 -5
  173. package/dist/runtime/components/Theme.vue.d.ts +16 -5
  174. package/dist/runtime/components/Toast.vue +11 -39
  175. package/dist/runtime/components/Toggle.d.vue.ts +2 -1
  176. package/dist/runtime/components/Toggle.vue +4 -1
  177. package/dist/runtime/components/Toggle.vue.d.ts +2 -1
  178. package/dist/runtime/components/ToggleGroup.d.vue.ts +2 -1
  179. package/dist/runtime/components/ToggleGroup.vue +4 -1
  180. package/dist/runtime/components/ToggleGroup.vue.d.ts +2 -1
  181. package/dist/runtime/components/Tooltip.vue +3 -2
  182. package/dist/runtime/components/Tree.d.vue.ts +5 -2
  183. package/dist/runtime/components/Tree.vue +5 -1
  184. package/dist/runtime/components/Tree.vue.d.ts +5 -2
  185. package/dist/runtime/composables/use-drawer.d.ts +1 -22
  186. package/dist/runtime/composables/use-drawer.js +12 -18
  187. package/dist/runtime/composables/use-form-field.d.ts +1 -0
  188. package/dist/runtime/composables/use-icons.d.ts +2 -2
  189. package/dist/runtime/composables/use-icons.js +1 -1
  190. package/dist/runtime/composables/use-locale.d.ts +2 -2
  191. package/dist/runtime/composables/use-locale.js +1 -1
  192. package/dist/runtime/composables/use-media-query.d.ts +6 -8
  193. package/dist/runtime/composables/use-media-query.js +7 -2
  194. package/dist/runtime/composables/use-messages.d.ts +2 -2
  195. package/dist/runtime/composables/use-messages.js +1 -1
  196. package/dist/runtime/composables/use-modal.d.ts +1 -17
  197. package/dist/runtime/composables/use-modal.js +12 -18
  198. package/dist/runtime/composables/use-ripple.d.ts +2 -2
  199. package/dist/runtime/composables/use-ripple.js +1 -1
  200. package/dist/runtime/composables/use-slideover.d.ts +1 -19
  201. package/dist/runtime/composables/use-slideover.js +12 -18
  202. package/dist/runtime/composables/use-table.d.ts +74 -17
  203. package/dist/runtime/composables/use-table.js +4 -1
  204. package/dist/runtime/composables/use-toast.d.ts +8 -8
  205. package/dist/runtime/composables/use-toast.js +9 -11
  206. package/dist/runtime/default-color-metadata.d.ts +4 -0
  207. package/dist/runtime/default-color-metadata.js +4 -0
  208. package/dist/runtime/default-colors.css +1 -0
  209. package/dist/runtime/internal/ColorPickerBody.d.vue.ts +1 -0
  210. package/dist/runtime/internal/ColorPickerBody.vue +24 -1
  211. package/dist/runtime/internal/ColorPickerBody.vue.d.ts +1 -0
  212. package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +50 -46
  213. package/dist/runtime/internal/ComboboxSelectBase.vue +340 -93
  214. package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +50 -46
  215. package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +29 -23
  216. package/dist/runtime/internal/ComboboxSelectBody.vue +74 -40
  217. package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +29 -23
  218. package/dist/runtime/internal/DatePickerCalendarBody.d.vue.ts +3 -5
  219. package/dist/runtime/internal/DatePickerCalendarBody.vue +2 -2
  220. package/dist/runtime/internal/DatePickerCalendarBody.vue.d.ts +3 -5
  221. package/dist/runtime/internal/DatePickerRangeCalendarBody.d.vue.ts +3 -5
  222. package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +1 -1
  223. package/dist/runtime/internal/DatePickerRangeCalendarBody.vue.d.ts +3 -5
  224. package/dist/runtime/internal/DatePickerTimeBody.d.vue.ts +2 -4
  225. package/dist/runtime/internal/DatePickerTimeBody.vue.d.ts +2 -4
  226. package/dist/runtime/internal/ProgrammaticTheme.d.vue.ts +17 -0
  227. package/dist/runtime/internal/ProgrammaticTheme.vue +41 -0
  228. package/dist/runtime/internal/ProgrammaticTheme.vue.d.ts +17 -0
  229. package/dist/runtime/internal/TimeStepper.vue +1 -1
  230. package/dist/runtime/internal/ToastItemRenderer.d.vue.ts +14 -0
  231. package/dist/runtime/internal/ToastItemRenderer.vue +54 -0
  232. package/dist/runtime/internal/ToastItemRenderer.vue.d.ts +14 -0
  233. package/dist/runtime/internal/combobox-select.d.ts +52 -0
  234. package/dist/runtime/{composables/use-combobox-select.js → internal/combobox-select.js} +26 -11
  235. package/dist/runtime/internal/programmatic-services.d.ts +71 -0
  236. package/dist/runtime/internal/programmatic-services.js +61 -0
  237. package/dist/runtime/prose.css +1 -1
  238. package/dist/runtime/structural.css +1 -0
  239. package/dist/runtime/table.d.ts +3 -0
  240. package/dist/runtime/table.js +1 -0
  241. package/dist/runtime/theme/accordion.d.ts +27 -0
  242. package/dist/runtime/theme/accordion.js +15 -6
  243. package/dist/runtime/theme/alert-dialog.js +5 -5
  244. package/dist/runtime/theme/alert.js +6 -15
  245. package/dist/runtime/theme/avatar-group.js +2 -2
  246. package/dist/runtime/theme/avatar.js +12 -18
  247. package/dist/runtime/theme/badge.d.ts +39 -9
  248. package/dist/runtime/theme/badge.js +11 -40
  249. package/dist/runtime/theme/breadcrumb.d.ts +29 -47
  250. package/dist/runtime/theme/breadcrumb.js +16 -5
  251. package/dist/runtime/theme/button.d.ts +45 -15
  252. package/dist/runtime/theme/button.js +10 -57
  253. package/dist/runtime/theme/callout.js +7 -7
  254. package/dist/runtime/theme/card.js +7 -7
  255. package/dist/runtime/theme/checkbox.d.ts +21 -84
  256. package/dist/runtime/theme/checkbox.js +15 -36
  257. package/dist/runtime/theme/chip.js +4 -22
  258. package/dist/runtime/theme/code-button.js +2 -2
  259. package/dist/runtime/theme/code-tree.d.ts +3 -3
  260. package/dist/runtime/theme/code-tree.js +4 -4
  261. package/dist/runtime/theme/collapsible.d.ts +27 -0
  262. package/dist/runtime/theme/collapsible.js +12 -3
  263. package/dist/runtime/theme/color-picker.d.ts +18 -54
  264. package/dist/runtime/theme/color-picker.js +19 -18
  265. package/dist/runtime/theme/command-palette.d.ts +6 -6
  266. package/dist/runtime/theme/command-palette.js +12 -10
  267. package/dist/runtime/theme/content-navigation.d.ts +27 -0
  268. package/dist/runtime/theme/content-navigation.js +14 -5
  269. package/dist/runtime/theme/content-surround.d.ts +27 -0
  270. package/dist/runtime/theme/content-surround.js +13 -4
  271. package/dist/runtime/theme/content-toc.d.ts +27 -0
  272. package/dist/runtime/theme/content-toc.js +14 -5
  273. package/dist/runtime/theme/context-menu.js +7 -7
  274. package/dist/runtime/theme/dashboard-navbar.d.ts +6 -6
  275. package/dist/runtime/theme/dashboard-navbar.js +2 -2
  276. package/dist/runtime/theme/dashboard-resize-handle.js +3 -3
  277. package/dist/runtime/theme/dashboard-sidebar.js +3 -3
  278. package/dist/runtime/theme/date-picker.js +10 -10
  279. package/dist/runtime/theme/drawer.js +9 -9
  280. package/dist/runtime/theme/dropdown.js +7 -7
  281. package/dist/runtime/theme/file-tree.d.ts +27 -0
  282. package/dist/runtime/theme/file-tree.js +12 -3
  283. package/dist/runtime/theme/file-upload.d.ts +18 -72
  284. package/dist/runtime/theme/file-upload.js +20 -19
  285. package/dist/runtime/theme/form-field.js +5 -5
  286. package/dist/runtime/theme/header.d.ts +3 -3
  287. package/dist/runtime/theme/header.js +1 -1
  288. package/dist/runtime/theme/icon.d.ts +30 -57
  289. package/dist/runtime/theme/icon.js +19 -9
  290. package/dist/runtime/theme/input-number.d.ts +21 -63
  291. package/dist/runtime/theme/input-number.js +12 -12
  292. package/dist/runtime/theme/input.d.ts +21 -63
  293. package/dist/runtime/theme/input.js +12 -12
  294. package/dist/runtime/theme/kbd.js +1 -1
  295. package/dist/runtime/theme/modal.js +4 -4
  296. package/dist/runtime/theme/navigation-menu.d.ts +2 -0
  297. package/dist/runtime/theme/navigation-menu.js +17 -28
  298. package/dist/runtime/theme/page-header.js +3 -3
  299. package/dist/runtime/theme/pagination.js +1 -1
  300. package/dist/runtime/theme/pin-input.d.ts +21 -63
  301. package/dist/runtime/theme/pin-input.js +13 -11
  302. package/dist/runtime/theme/popover.js +2 -2
  303. package/dist/runtime/theme/progress.d.ts +21 -84
  304. package/dist/runtime/theme/progress.js +12 -12
  305. package/dist/runtime/theme/prose.d.ts +29 -50
  306. package/dist/runtime/theme/prose.js +22 -11
  307. package/dist/runtime/theme/radio-group.d.ts +21 -84
  308. package/dist/runtime/theme/radio-group.js +16 -22
  309. package/dist/runtime/theme/rating.d.ts +21 -63
  310. package/dist/runtime/theme/rating.js +10 -10
  311. package/dist/runtime/theme/read-more.d.ts +27 -0
  312. package/dist/runtime/theme/read-more.js +13 -4
  313. package/dist/runtime/theme/scroll-area.d.ts +3 -3
  314. package/dist/runtime/theme/scroll-area.js +2 -2
  315. package/dist/runtime/theme/select.d.ts +21 -54
  316. package/dist/runtime/theme/select.js +32 -24
  317. package/dist/runtime/theme/separator.d.ts +18 -54
  318. package/dist/runtime/theme/separator.js +16 -12
  319. package/dist/runtime/theme/skeleton.js +4 -4
  320. package/dist/runtime/theme/slideover.js +5 -5
  321. package/dist/runtime/theme/slider.d.ts +21 -84
  322. package/dist/runtime/theme/slider.js +14 -14
  323. package/dist/runtime/theme/splitter-resize-handle.d.ts +27 -0
  324. package/dist/runtime/theme/splitter-resize-handle.js +11 -1
  325. package/dist/runtime/theme/stepper.d.ts +21 -84
  326. package/dist/runtime/theme/stepper.js +12 -33
  327. package/dist/runtime/theme/switch.d.ts +21 -84
  328. package/dist/runtime/theme/switch.js +13 -13
  329. package/dist/runtime/theme/table.d.ts +27 -0
  330. package/dist/runtime/theme/table.js +31 -21
  331. package/dist/runtime/theme/tabs.d.ts +27 -0
  332. package/dist/runtime/theme/tabs.js +17 -7
  333. package/dist/runtime/theme/textarea.d.ts +21 -63
  334. package/dist/runtime/theme/textarea.js +12 -12
  335. package/dist/runtime/theme/toast.d.ts +12 -48
  336. package/dist/runtime/theme/toast.js +9 -9
  337. package/dist/runtime/theme/toggle-group.js +5 -11
  338. package/dist/runtime/theme/toggle.js +2 -12
  339. package/dist/runtime/theme/tooltip.d.ts +3 -3
  340. package/dist/runtime/theme/tooltip.js +3 -3
  341. package/dist/runtime/theme/tree.d.ts +27 -0
  342. package/dist/runtime/theme/tree.js +13 -3
  343. package/dist/runtime/theme-api.d.ts +15 -0
  344. package/dist/runtime/theme-api.js +12 -0
  345. package/dist/runtime/theme-config.d.ts +470 -0
  346. package/dist/runtime/theme-config.js +0 -0
  347. package/dist/runtime/theme.css +1 -1
  348. package/dist/runtime/types/app-config.d.ts +11 -8
  349. package/dist/runtime/types/index.d.ts +19 -1
  350. package/dist/runtime/utils/app-scoped-state.d.ts +2 -0
  351. package/dist/runtime/utils/app-scoped-state.js +13 -0
  352. package/dist/runtime/utils/autocomplete-contracts.d.ts +24 -0
  353. package/dist/runtime/utils/autocomplete-contracts.js +0 -0
  354. package/dist/runtime/utils/color-registry.d.ts +60 -0
  355. package/dist/runtime/utils/color-registry.js +187 -0
  356. package/dist/runtime/utils/dtcg-colors.d.ts +25 -0
  357. package/dist/runtime/utils/dtcg-colors.js +40 -0
  358. package/dist/runtime/utils/functional-tokens.d.ts +26 -0
  359. package/dist/runtime/utils/functional-tokens.js +54 -0
  360. package/dist/runtime/utils/icons.d.ts +3 -0
  361. package/dist/runtime/utils/icons.js +4 -0
  362. package/dist/runtime/utils/injection-keys.d.ts +12 -3
  363. package/dist/runtime/utils/native-input.d.ts +5 -0
  364. package/dist/runtime/utils/native-input.js +32 -0
  365. package/dist/runtime/utils/programmatic-theme.d.ts +17 -0
  366. package/dist/runtime/utils/programmatic-theme.js +59 -0
  367. package/dist/runtime/utils/registered-colors.d.ts +3 -0
  368. package/dist/runtime/utils/registered-colors.js +14 -0
  369. package/dist/runtime/utils/seed-colors.d.ts +18 -0
  370. package/dist/runtime/utils/seed-colors.js +199 -0
  371. package/dist/runtime/utils/select-contracts.d.ts +101 -0
  372. package/dist/runtime/utils/select-contracts.js +0 -0
  373. package/dist/runtime/utils/table-contracts.d.ts +60 -0
  374. package/dist/runtime/utils/table-contracts.js +0 -0
  375. package/dist/runtime/utils/ui.d.ts +26 -4
  376. package/dist/runtime/utils/ui.js +38 -5
  377. package/dist/tokens/default-colors.tokens.json +879 -0
  378. package/package.json +66 -10
  379. package/dist/runtime/composables/use-combobox-select.d.ts +0 -45
@@ -1,41 +1,80 @@
1
1
  <script setup>
2
- import { useForwardPropsEmits } from "reka-ui";
2
+ import { useForwardProps } from "reka-ui";
3
+ import { getCurrentInstance } from "vue";
3
4
  import ComboboxSelectBase from "../internal/ComboboxSelectBase.vue";
4
5
  const props = defineProps({
6
+ modelValue: { type: null, required: false },
7
+ defaultValue: { type: null, required: false },
8
+ dropdown: { type: Boolean, required: false },
9
+ forceSelection: { type: null, required: false },
5
10
  id: { type: String, required: false },
6
11
  name: { type: String, required: false },
12
+ form: { type: String, required: false },
7
13
  items: { type: Array, required: true },
8
14
  valueKey: { type: String, required: false },
9
15
  labelKey: { type: String, required: false },
10
- modelValue: { type: [String, Array], required: false },
11
- multiple: { type: Boolean, required: false },
16
+ open: { type: Boolean, required: false },
17
+ defaultOpen: { type: Boolean, required: false },
18
+ multiple: { type: null, required: false },
12
19
  virtualize: { type: [Boolean, Object], required: false },
13
20
  displayMode: { type: String, required: false },
14
21
  maxChips: { type: Number, required: false },
15
22
  loading: { type: Boolean, required: false },
16
23
  placeholder: { type: String, required: false },
17
24
  disabled: { type: Boolean, required: false },
25
+ required: { type: Boolean, required: false },
18
26
  size: { type: null, required: false },
19
27
  invalid: { type: Boolean, required: false },
20
28
  color: { type: null, required: false },
21
29
  clearable: { type: Boolean, required: false },
22
- dropdown: { type: Boolean, required: false },
23
- forceSelection: { type: Boolean, required: false },
24
30
  searchTerm: { type: String, required: false },
25
31
  resetSearchTermOnBlur: { type: Boolean, required: false },
26
32
  resetSearchTermOnSelect: { type: Boolean, required: false },
27
33
  arrow: { type: Boolean, required: false },
28
- mobileModal: { type: Boolean, required: false },
34
+ adaptive: { type: Boolean, required: false },
29
35
  ui: { type: Object, required: false }
30
36
  });
31
- const emit = defineEmits(["update:modelValue", "update:searchTerm"]);
32
- const forwarded = useForwardPropsEmits(props, emit);
37
+ const emit = defineEmits(["update:open", "update:modelValue", "update:searchTerm"]);
38
+ const slots = defineSlots();
39
+ const forwarded = useForwardProps(props);
40
+ const instance = getCurrentInstance();
41
+ function baseProps() {
42
+ const controlled = Object.hasOwn(instance.vnode.props ?? {}, "modelValue") || Object.hasOwn(instance.vnode.props ?? {}, "model-value");
43
+ return {
44
+ ...forwarded.value,
45
+ items: props.items,
46
+ ...controlled ? { modelValue: props.modelValue } : {}
47
+ };
48
+ }
49
+ function updateValue(value) {
50
+ emit("update:modelValue", value);
51
+ }
52
+ function itemData(item) {
53
+ return item;
54
+ }
55
+ function groupData(group) {
56
+ return group;
57
+ }
58
+ const unscopedSlots = ["header", "footer", "empty", "empty-filter", "clear-icon", "loading-icon", "dropdown-icon"];
33
59
  </script>
34
60
 
35
61
  <template>
36
- <ComboboxSelectBase v-bind="forwarded" :creatable="true" :searchable="true">
37
- <template v-for="(_, slotName) in $slots" #[slotName]="slotProps">
38
- <slot :name="slotName" v-bind="slotProps ?? {}" />
62
+ <ComboboxSelectBase
63
+ v-bind="baseProps()"
64
+ :creatable="true"
65
+ :searchable="true"
66
+ @update:open="emit('update:open', $event)"
67
+ @update:model-value="updateValue"
68
+ @update:search-term="emit('update:searchTerm', $event)"
69
+ >
70
+ <template v-if="slots.item" #item="{ item }">
71
+ <slot name="item" :item="itemData(item)" />
72
+ </template>
73
+ <template v-if="slots.group" #group="{ group }">
74
+ <slot name="group" :group="groupData(group)" />
75
+ </template>
76
+ <template v-for="slotName in unscopedSlots.filter((name) => slots[name])" :key="slotName" #[slotName]>
77
+ <slot :name="slotName" />
39
78
  </template>
40
79
  </ComboboxSelectBase>
41
80
  </template>
@@ -1,61 +1,25 @@
1
- import type { VariantProps } from 'tailwind-variants';
2
- import type { SelectItems } from '../composables/use-combobox-select.js';
3
- import type { selectTheme, SelectThemeSlots } from '../theme/select.js';
4
- import type { UiProp } from '../utils/ui.js';
5
- type SelectVariants = VariantProps<typeof selectTheme>;
6
- export interface AutocompleteProps {
7
- id?: string;
8
- name?: string;
9
- items: SelectItems;
10
- valueKey?: string;
11
- labelKey?: string;
12
- modelValue?: string | string[];
13
- multiple?: boolean;
14
- virtualize?: boolean | {
15
- estimateSize?: number;
16
- overscan?: number;
17
- };
18
- displayMode?: 'comma' | 'chip';
19
- maxChips?: number;
20
- loading?: boolean;
21
- placeholder?: string;
22
- disabled?: boolean;
23
- size?: SelectVariants['size'];
24
- invalid?: boolean;
25
- /** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
26
- color?: SelectVariants['color'];
27
- clearable?: boolean;
28
- dropdown?: boolean;
29
- forceSelection?: boolean;
30
- searchTerm?: string;
31
- resetSearchTermOnBlur?: boolean;
32
- resetSearchTermOnSelect?: boolean;
33
- /** Shows a small pointer triangle connecting the panel to its trigger. */
34
- arrow?: boolean;
35
- /** Below 768px viewport width, presents the dropdown as a centered Modal instead of a small anchored panel - easier to tap with a finger. Opt-in (defaults `false`) rather than automatic, so an existing usage's look never changes without asking for it. */
36
- mobileModal?: boolean;
37
- ui?: UiProp<SelectThemeSlots>;
38
- }
39
- export interface AutocompleteEmits {
40
- 'update:modelValue': [value: string | string[] | undefined];
41
- 'update:searchTerm': [value: string];
42
- }
43
- declare var __VLS_10: string, __VLS_11: any;
44
- type __VLS_Slots = {} & {
45
- [K in NonNullable<typeof __VLS_10>]?: (props: typeof __VLS_11) => any;
1
+ import type { AutocompleteProps, AutocompleteSlots, AutocompleteValue } from '../utils/autocomplete-contracts.js';
2
+ import type { SelectModel } from '../utils/select-contracts.js';
3
+ export type { AutocompleteEmits, AutocompleteProps, AutocompleteSlots } from '../utils/autocomplete-contracts.js';
4
+ declare const __VLS_export: <Entry extends object, Key extends string = "value", Multiple extends boolean = false, Forced extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<AutocompleteProps<Entry, Key, Multiple, Forced> & {
6
+ "onUpdate:modelValue"?: ((value: SelectModel<AutocompleteValue<Entry, Key, Forced>, Multiple>) => any) | undefined;
7
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
8
+ "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
9
+ }> & (typeof globalThis extends {
10
+ __VLS_PROPS_FALLBACK: infer P;
11
+ } ? P : {});
12
+ expose: (exposed: {}) => void;
13
+ attrs: any;
14
+ slots: AutocompleteSlots<Entry>;
15
+ emit: ((evt: "update:modelValue", value: SelectModel<AutocompleteValue<Entry, Key, Forced>, Multiple>) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:searchTerm", value: string) => void);
16
+ }>) => import("vue").VNode & {
17
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
46
18
  };
47
- declare const __VLS_base: import("vue").DefineComponent<AutocompleteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
48
- "update:modelValue": (value: string | string[] | undefined) => any;
49
- "update:searchTerm": (value: string) => any;
50
- }, string, import("vue").PublicProps, Readonly<AutocompleteProps> & Readonly<{
51
- "onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
52
- "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
53
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
54
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
55
19
  declare const _default: typeof __VLS_export;
56
20
  export default _default;
57
- type __VLS_WithSlots<T, S> = T & {
58
- new (): {
59
- $slots: S;
60
- };
61
- };
21
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
22
+ [K in keyof T]: T[K];
23
+ } : {
24
+ [K in keyof T as K]: T[K];
25
+ }) & {};
@@ -2,6 +2,7 @@ import type { AvatarImageProps } from 'reka-ui';
2
2
  import type { VariantProps } from 'tailwind-variants';
3
3
  import type { Component } from 'vue';
4
4
  import type { AvatarThemeSlots } from '../theme/avatar.js';
5
+ import type { ColorRole } from '../utils/color-registry.js';
5
6
  import type { UiProp } from '../utils/ui.js';
6
7
  import { avatarTheme } from '../theme/avatar.js';
7
8
  type AvatarVariants = VariantProps<typeof avatarTheme>;
@@ -16,7 +17,7 @@ export interface AvatarProps {
16
17
  text?: string;
17
18
  /** An icon shown in the fallback, in place of `text`. If neither is given, the default semantic `user` icon shows. */
18
19
  icon?: string;
19
- color?: AvatarVariants['color'];
20
+ color?: ColorRole;
20
21
  /** The presence/status dot's own color - independent of `color`, since presence semantics rarely match the avatar's identity color. */
21
22
  statusColor?: AvatarVariants['statusColor'];
22
23
  size?: AvatarVariants['size'];
@@ -4,6 +4,7 @@ import { computed, inject } from "vue";
4
4
  import { useIcons } from "../composables/use-icons";
5
5
  import { avatarTheme } from "../theme/avatar";
6
6
  import { AVATAR_SIZE_INJECTION_KEY } from "../utils/injection-keys";
7
+ import { resolveRegisteredColorRole } from "../utils/registered-colors";
7
8
  import { resolveSlot, useComponentTheme, useRootProps, useThemeProps } from "../utils/ui";
8
9
  import Icon from "./Icon.vue";
9
10
  defineOptions({ inheritAttrs: false });
@@ -26,8 +27,9 @@ const icons = useIcons();
26
27
  const theme = useComponentTheme("avatar", avatarTheme);
27
28
  const themeProps = useThemeProps("avatar");
28
29
  const groupSize = inject(AVATAR_SIZE_INJECTION_KEY, void 0);
30
+ const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? themeProps.value.color ?? "neutral", "neutral"));
29
31
  const ui = computed(() => theme.value({
30
- color: props.color ?? themeProps.value.color,
32
+ color: effectiveColor.value,
31
33
  statusColor: props.statusColor,
32
34
  // AvatarGroup's own size (the more locally-specific ancestor) wins over
33
35
  // an STheme prop default before falling all the way back to tv()'s own
@@ -40,7 +42,7 @@ const rootAriaLabel = computed(() => props.src ? void 0 : (props.alt ?? props.te
40
42
  </script>
41
43
 
42
44
  <template>
43
- <AvatarRoot :as="as" :aria-label="rootAriaLabel" v-bind="rootProps">
45
+ <AvatarRoot :as="as" :aria-label="rootAriaLabel" :data-selaras-color="effectiveColor" v-bind="rootProps">
44
46
  <span v-bind="resolveSlot(ui.content, props.ui?.content)">
45
47
  <AvatarImage
46
48
  v-if="src"
@@ -2,6 +2,7 @@ import type { AvatarImageProps } from 'reka-ui';
2
2
  import type { VariantProps } from 'tailwind-variants';
3
3
  import type { Component } from 'vue';
4
4
  import type { AvatarThemeSlots } from '../theme/avatar.js';
5
+ import type { ColorRole } from '../utils/color-registry.js';
5
6
  import type { UiProp } from '../utils/ui.js';
6
7
  import { avatarTheme } from '../theme/avatar.js';
7
8
  type AvatarVariants = VariantProps<typeof avatarTheme>;
@@ -16,7 +17,7 @@ export interface AvatarProps {
16
17
  text?: string;
17
18
  /** An icon shown in the fallback, in place of `text`. If neither is given, the default semantic `user` icon shows. */
18
19
  icon?: string;
19
- color?: AvatarVariants['color'];
20
+ color?: ColorRole;
20
21
  /** The presence/status dot's own color - independent of `color`, since presence semantics rarely match the avatar's identity color. */
21
22
  statusColor?: AvatarVariants['statusColor'];
22
23
  size?: AvatarVariants['size'];
@@ -1,5 +1,6 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { BadgeThemeSlots } from '../theme/badge.js';
3
+ import type { ColorRole } from '../utils/color-registry.js';
3
4
  import type { UiProp } from '../utils/ui.js';
4
5
  import { badgeTheme } from '../theme/badge.js';
5
6
  type BadgeVariants = VariantProps<typeof badgeTheme>;
@@ -7,9 +8,9 @@ export interface BadgeProps {
7
8
  label?: string;
8
9
  icon?: string;
9
10
  trailingIcon?: string;
10
- /** A small solid-colored circle - a status indicator (online/offline, etc), shown alongside the label or alone without one. Always uses the color's solid shade, regardless of `variant`. */
11
+ /** A status circle. Inline dots use the badge foreground; standalone dots use the role text color. Supply an accessible name when no label is visible. */
11
12
  dot?: boolean;
12
- color?: BadgeVariants['color'];
13
+ color?: ColorRole;
13
14
  variant?: BadgeVariants['variant'];
14
15
  size?: BadgeVariants['size'];
15
16
  ui?: UiProp<BadgeThemeSlots>;
@@ -1,6 +1,7 @@
1
1
  <script setup>
2
2
  import { computed, useSlots } from "vue";
3
3
  import { badgeTheme } from "../theme/badge";
4
+ import { resolveRegisteredColorRole } from "../utils/registered-colors";
4
5
  import { resolveSlot, useComponentTheme, useRootProps, useThemeProps } from "../utils/ui";
5
6
  import Icon from "./Icon.vue";
6
7
  defineOptions({ inheritAttrs: false });
@@ -20,20 +21,22 @@ const dotOnly = computed(() => !!props.dot && !hasLabel.value);
20
21
  const iconOnly = computed(() => !hasLabel.value && !!props.icon && !props.dot);
21
22
  const theme = useComponentTheme("badge", badgeTheme);
22
23
  const themeProps = useThemeProps("badge");
24
+ const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? themeProps.value.color ?? "neutral", "neutral"));
23
25
  const ui = computed(() => theme.value({
24
- color: props.color ?? themeProps.value.color,
26
+ color: effectiveColor.value,
25
27
  variant: props.variant,
26
28
  size: props.size ?? themeProps.value.size,
27
- iconOnly: iconOnly.value
29
+ iconOnly: iconOnly.value,
30
+ dotOnly: dotOnly.value
28
31
  }));
29
32
  const rootProps = useRootProps(() => ui.value.base, () => props.ui?.base);
30
33
  const dotOnlyProps = useRootProps(() => ui.value.dot, () => props.ui?.dot);
31
34
  </script>
32
35
 
33
36
  <template>
34
- <span v-if="dotOnly" v-bind="dotOnlyProps" />
35
- <span v-else v-bind="rootProps">
36
- <span v-if="dot" v-bind="resolveSlot(ui.dot, props.ui?.dot)" />
37
+ <span v-if="dotOnly" role="img" :data-selaras-color="effectiveColor" v-bind="dotOnlyProps" />
38
+ <span v-else :data-selaras-color="effectiveColor" v-bind="rootProps">
39
+ <span v-if="dot" aria-hidden="true" v-bind="resolveSlot(ui.dot, props.ui?.dot)" />
37
40
  <slot name="icon" :class="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon).class">
38
41
  <Icon v-if="icon" :name="icon" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
39
42
  </slot>
@@ -1,5 +1,6 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { BadgeThemeSlots } from '../theme/badge.js';
3
+ import type { ColorRole } from '../utils/color-registry.js';
3
4
  import type { UiProp } from '../utils/ui.js';
4
5
  import { badgeTheme } from '../theme/badge.js';
5
6
  type BadgeVariants = VariantProps<typeof badgeTheme>;
@@ -7,9 +8,9 @@ export interface BadgeProps {
7
8
  label?: string;
8
9
  icon?: string;
9
10
  trailingIcon?: string;
10
- /** A small solid-colored circle - a status indicator (online/offline, etc), shown alongside the label or alone without one. Always uses the color's solid shade, regardless of `variant`. */
11
+ /** A status circle. Inline dots use the badge foreground; standalone dots use the role text color. Supply an accessible name when no label is visible. */
11
12
  dot?: boolean;
12
- color?: BadgeVariants['color'];
13
+ color?: ColorRole;
13
14
  variant?: BadgeVariants['variant'];
14
15
  size?: BadgeVariants['size'];
15
16
  ui?: UiProp<BadgeThemeSlots>;
@@ -1,4 +1,5 @@
1
1
  import type { BreadcrumbThemeSlots } from '../theme/breadcrumb.js';
2
+ import type { ColorRole } from '../utils/color-registry.js';
2
3
  import type { UiProp } from '../utils/ui.js';
3
4
  type __VLS_Slots = BreadcrumbSlots;
4
5
  export interface BreadcrumbItem {
@@ -9,6 +10,8 @@ export interface BreadcrumbItem {
9
10
  }
10
11
  export interface BreadcrumbProps {
11
12
  items: BreadcrumbItem[];
13
+ /** The keyboard-focus accent for breadcrumb links. @default 'primary' */
14
+ color?: ColorRole;
12
15
  /** Collapses the middle items behind an overflow menu once items.length exceeds this - the first item plus the last (maxItems - 1) stay visible. */
13
16
  maxItems?: number;
14
17
  /** Truncates each item's label with an ellipsis. `true` caps at 12rem; a string sets a custom CSS max-width (e.g. '20rem', '300px'). @default false */
@@ -4,12 +4,14 @@ import { navigateTo } from "#imports";
4
4
  import { useIcons } from "../composables/use-icons";
5
5
  import { useMessages } from "../composables/use-messages";
6
6
  import { breadcrumbTheme } from "../theme/breadcrumb";
7
+ import { resolveRegisteredColorRole } from "../utils/registered-colors";
7
8
  import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
8
9
  import Dropdown from "./Dropdown.vue";
9
10
  import Icon from "./Icon.vue";
10
11
  defineOptions({ inheritAttrs: false });
11
12
  const props = defineProps({
12
13
  items: { type: Array, required: true },
14
+ color: { type: null, required: false },
13
15
  maxItems: { type: Number, required: false },
14
16
  truncate: { type: [Boolean, String], required: false },
15
17
  separatorIcon: { type: String, required: false },
@@ -19,7 +21,8 @@ defineSlots();
19
21
  const icons = useIcons();
20
22
  const messages = useMessages();
21
23
  const theme = useComponentTheme("breadcrumb", breadcrumbTheme);
22
- const ui = computed(() => theme.value());
24
+ const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
25
+ const ui = computed(() => theme.value({ color: effectiveColor.value }));
23
26
  const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
24
27
  const listProps = computed(() => resolveSlot(ui.value.list, props.ui?.list));
25
28
  const itemProps = computed(() => resolveSlot(ui.value.item, props.ui?.item));
@@ -65,7 +68,7 @@ function realIndex(item) {
65
68
  </script>
66
69
 
67
70
  <template>
68
- <nav :aria-label="messages.breadcrumb" v-bind="rootProps">
71
+ <nav :aria-label="messages.breadcrumb" :data-selaras-color="effectiveColor" v-bind="rootProps">
69
72
  <ol v-bind="listProps">
70
73
  <template v-for="(item, index) in visibleItems" :key="realIndex(item)">
71
74
  <li v-bind="itemProps">
@@ -1,4 +1,5 @@
1
1
  import type { BreadcrumbThemeSlots } from '../theme/breadcrumb.js';
2
+ import type { ColorRole } from '../utils/color-registry.js';
2
3
  import type { UiProp } from '../utils/ui.js';
3
4
  type __VLS_Slots = BreadcrumbSlots;
4
5
  export interface BreadcrumbItem {
@@ -9,6 +10,8 @@ export interface BreadcrumbItem {
9
10
  }
10
11
  export interface BreadcrumbProps {
11
12
  items: BreadcrumbItem[];
13
+ /** The keyboard-focus accent for breadcrumb links. @default 'primary' */
14
+ color?: ColorRole;
12
15
  /** Collapses the middle items behind an overflow menu once items.length exceeds this - the first item plus the last (maxItems - 1) stay visible. */
13
16
  maxItems?: number;
14
17
  /** Truncates each item's label with an ellipsis. `true` caps at 12rem; a string sets a custom CSS max-width (e.g. '20rem', '300px'). @default false */
@@ -1,20 +1,23 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { Component } from 'vue';
3
3
  import type { ButtonThemeSlots } from '../theme/button.js';
4
+ import type { ColorRole } from '../utils/color-registry.js';
4
5
  import type { UiProp } from '../utils/ui.js';
5
6
  import { buttonTheme } from '../theme/button.js';
6
7
  type ButtonVariants = VariantProps<typeof buttonTheme>;
7
8
  export interface ButtonProps {
8
9
  /** A tag name ('a', 'span', ...) or a component reference (e.g. NuxtLink, via resolveComponent) - Primitive renders whichever is given. */
9
10
  as?: string | Component;
10
- color?: ButtonVariants['color'];
11
+ /** Native button type when `as="button"`. Defaults to `button` so actions inside forms do not submit accidentally. */
12
+ type?: 'button' | 'submit' | 'reset';
13
+ color?: ColorRole;
11
14
  variant?: ButtonVariants['variant'];
12
15
  size?: ButtonVariants['size'];
13
16
  block?: boolean;
14
17
  disabled?: boolean;
15
18
  /** Shows a spinner in the leading icon's place. Doesn't imply `disabled` - combine `:loading="x" :disabled="x"` if a busy button shouldn't be clickable. */
16
19
  loading?: boolean;
17
- /** Adds `--ui-shadow-md` - independent of `variant`, so it composes with any of them. */
20
+ /** Adds `--selaras-resolved-shadow-md` - independent of `variant`, so it composes with any of them. */
18
21
  raised?: boolean;
19
22
  icon?: string;
20
23
  trailingIcon?: string;
@@ -6,11 +6,13 @@ import { useMessages } from "../composables/use-messages";
6
6
  import { useRippleEnabled } from "../composables/use-ripple";
7
7
  import { vRipple } from "../directives/ripple";
8
8
  import { buttonTheme } from "../theme/button";
9
+ import { resolveRegisteredColorRole } from "../utils/registered-colors";
9
10
  import { applyClassPrefix, resolveSlot, useComponentTheme, useRootProps, useThemeProps } from "../utils/ui";
10
11
  import Icon from "./Icon.vue";
11
12
  defineOptions({ inheritAttrs: false });
12
13
  const props = defineProps({
13
14
  as: { type: null, required: false, default: "button" },
15
+ type: { type: String, required: false, default: "button" },
14
16
  color: { type: null, required: false },
15
17
  variant: { type: null, required: false },
16
18
  size: { type: null, required: false },
@@ -31,8 +33,9 @@ const rippleEnabledSetting = useRippleEnabled();
31
33
  const rippleEnabled = computed(() => rippleEnabledSetting.value && props.variant !== "text");
32
34
  const theme = useComponentTheme("button", buttonTheme);
33
35
  const themeProps = useThemeProps("button");
36
+ const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? themeProps.value.color ?? "primary", "primary"));
34
37
  const ui = computed(() => theme.value({
35
- color: props.color ?? themeProps.value.color,
38
+ color: effectiveColor.value,
36
39
  variant: props.variant,
37
40
  size: props.size ?? themeProps.value.size,
38
41
  block: props.block,
@@ -43,7 +46,7 @@ const rootProps = useRootProps(() => ui.value.base, () => props.ui?.base);
43
46
  </script>
44
47
 
45
48
  <template>
46
- <Primitive v-ripple="rippleEnabled" :as="as" :disabled="disabled" :aria-busy="loading || void 0" v-bind="rootProps">
49
+ <Primitive v-ripple="rippleEnabled" :as="as" :type="as === 'button' ? type : void 0" :disabled="disabled" :aria-busy="loading || void 0" :data-selaras-color="effectiveColor" v-bind="rootProps">
47
50
  <Icon v-if="loading" :name="icons.loading" :class="applyClassPrefix('animate-spin')" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
48
51
  <!--
49
52
  A named slot (not just the `icon` prop) so a consumer building a
@@ -1,20 +1,23 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { Component } from 'vue';
3
3
  import type { ButtonThemeSlots } from '../theme/button.js';
4
+ import type { ColorRole } from '../utils/color-registry.js';
4
5
  import type { UiProp } from '../utils/ui.js';
5
6
  import { buttonTheme } from '../theme/button.js';
6
7
  type ButtonVariants = VariantProps<typeof buttonTheme>;
7
8
  export interface ButtonProps {
8
9
  /** A tag name ('a', 'span', ...) or a component reference (e.g. NuxtLink, via resolveComponent) - Primitive renders whichever is given. */
9
10
  as?: string | Component;
10
- color?: ButtonVariants['color'];
11
+ /** Native button type when `as="button"`. Defaults to `button` so actions inside forms do not submit accidentally. */
12
+ type?: 'button' | 'submit' | 'reset';
13
+ color?: ColorRole;
11
14
  variant?: ButtonVariants['variant'];
12
15
  size?: ButtonVariants['size'];
13
16
  block?: boolean;
14
17
  disabled?: boolean;
15
18
  /** Shows a spinner in the leading icon's place. Doesn't imply `disabled` - combine `:loading="x" :disabled="x"` if a busy button shouldn't be clickable. */
16
19
  loading?: boolean;
17
- /** Adds `--ui-shadow-md` - independent of `variant`, so it composes with any of them. */
20
+ /** Adds `--selaras-resolved-shadow-md` - independent of `variant`, so it composes with any of them. */
18
21
  raised?: boolean;
19
22
  icon?: string;
20
23
  trailingIcon?: string;
@@ -1,5 +1,6 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { CheckboxThemeSlots } from '../theme/checkbox.js';
3
+ import type { ColorRole } from '../utils/color-registry.js';
3
4
  import type { UiProp } from '../utils/ui.js';
4
5
  import { checkboxTheme } from '../theme/checkbox.js';
5
6
  type CheckboxVariants = VariantProps<typeof checkboxTheme>;
@@ -14,7 +15,7 @@ export interface CheckboxProps {
14
15
  invalid?: boolean;
15
16
  required?: boolean;
16
17
  size?: CheckboxVariants['size'];
17
- color?: CheckboxVariants['color'];
18
+ color?: ColorRole;
18
19
  /** `card` wraps the checkbox and label in a bordered box, highlighted when checked - the same treatment RadioGroup's own `card` variant already applies per item. */
19
20
  variant?: CheckboxVariants['variant'];
20
21
  ui?: UiProp<CheckboxThemeSlots>;
@@ -3,6 +3,7 @@ import { CheckboxIndicator, CheckboxRoot } from "reka-ui";
3
3
  import { computed } from "vue";
4
4
  import { useFormField } from "../composables/use-form-field";
5
5
  import { checkboxTheme } from "../theme/checkbox";
6
+ import { resolveRegisteredColorRole } from "../utils/registered-colors";
6
7
  import { applyClassPrefix, resolveSlot, useComponentTheme, useRootProps, withFallthroughClass } from "../utils/ui";
7
8
  defineOptions({ inheritAttrs: false });
8
9
  const props = defineProps({
@@ -26,10 +27,11 @@ const checkboxInvalid = computed(() => props.invalid || (field?.invalid.value ??
26
27
  const effectiveSize = computed(() => props.size ?? field?.size ?? "md");
27
28
  const describedBy = computed(() => field?.describedBy.value);
28
29
  const theme = useComponentTheme("checkbox", checkboxTheme);
30
+ const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? "primary", "primary"));
29
31
  const ui = computed(() => theme.value({
30
32
  invalid: checkboxInvalid.value,
31
33
  size: effectiveSize.value,
32
- color: props.color,
34
+ color: effectiveColor.value,
33
35
  variant: props.variant
34
36
  }));
35
37
  const rootProps = useRootProps(() => ui.value.root, () => withFallthroughClass(props.description ? "items-start" : void 0, props.ui?.root));
@@ -44,7 +46,7 @@ const glyphState = computed(() => props.modelValue === "indeterminate" ? "indete
44
46
  </script>
45
47
 
46
48
  <template>
47
- <label v-bind="rootProps">
49
+ <label :data-selaras-color="checkboxInvalid ? 'danger' : effectiveColor" v-bind="rootProps">
48
50
  <CheckboxRoot
49
51
  :id="checkboxId"
50
52
  :model-value="modelValue"
@@ -1,5 +1,6 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { CheckboxThemeSlots } from '../theme/checkbox.js';
3
+ import type { ColorRole } from '../utils/color-registry.js';
3
4
  import type { UiProp } from '../utils/ui.js';
4
5
  import { checkboxTheme } from '../theme/checkbox.js';
5
6
  type CheckboxVariants = VariantProps<typeof checkboxTheme>;
@@ -14,7 +15,7 @@ export interface CheckboxProps {
14
15
  invalid?: boolean;
15
16
  required?: boolean;
16
17
  size?: CheckboxVariants['size'];
17
- color?: CheckboxVariants['color'];
18
+ color?: ColorRole;
18
19
  /** `card` wraps the checkbox and label in a bordered box, highlighted when checked - the same treatment RadioGroup's own `card` variant already applies per item. */
19
20
  variant?: CheckboxVariants['variant'];
20
21
  ui?: UiProp<CheckboxThemeSlots>;
@@ -1,5 +1,6 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { ChipThemeSlots } from '../theme/chip.js';
3
+ import type { ColorRole } from '../utils/color-registry.js';
3
4
  import type { UiProp } from '../utils/ui.js';
4
5
  import { chipTheme } from '../theme/chip.js';
5
6
  type ChipVariants = VariantProps<typeof chipTheme>;
@@ -12,7 +13,7 @@ export interface ChipProps {
12
13
  disabled?: boolean;
13
14
  /** Fully-rounded pill shape instead of the default (Badge's own) small radius. */
14
15
  rounded?: boolean;
15
- color?: ChipVariants['color'];
16
+ color?: ColorRole;
16
17
  variant?: ChipVariants['variant'];
17
18
  size?: ChipVariants['size'];
18
19
  ui?: UiProp<ChipThemeSlots>;
@@ -3,6 +3,7 @@ import { computed } from "vue";
3
3
  import { useIcons } from "../composables/use-icons";
4
4
  import { useMessages } from "../composables/use-messages";
5
5
  import { chipTheme } from "../theme/chip";
6
+ import { resolveRegisteredColorRole } from "../utils/registered-colors";
6
7
  import { resolveSlot, useComponentTheme, useRootProps, useThemeProps } from "../utils/ui";
7
8
  import Icon from "./Icon.vue";
8
9
  defineOptions({ inheritAttrs: false });
@@ -23,8 +24,9 @@ const icons = useIcons();
23
24
  const messages = useMessages();
24
25
  const theme = useComponentTheme("chip", chipTheme);
25
26
  const themeProps = useThemeProps("chip");
27
+ const effectiveColor = computed(() => resolveRegisteredColorRole(props.color ?? themeProps.value.color ?? "neutral", "neutral"));
26
28
  const ui = computed(() => theme.value({
27
- color: props.color ?? themeProps.value.color,
29
+ color: effectiveColor.value,
28
30
  variant: props.variant,
29
31
  size: props.size ?? themeProps.value.size,
30
32
  disabled: props.disabled,
@@ -36,7 +38,7 @@ const effectiveRemoveLabel = computed(() => props.removeLabel ?? messages.value.
36
38
  </script>
37
39
 
38
40
  <template>
39
- <span v-bind="rootProps">
41
+ <span :data-selaras-color="effectiveColor" v-bind="rootProps">
40
42
  <slot name="icon" :class="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon).class">
41
43
  <Icon v-if="icon" :name="icon" v-bind="resolveSlot(ui.leadingIcon, props.ui?.leadingIcon)" />
42
44
  </slot>
@@ -1,5 +1,6 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { ChipThemeSlots } from '../theme/chip.js';
3
+ import type { ColorRole } from '../utils/color-registry.js';
3
4
  import type { UiProp } from '../utils/ui.js';
4
5
  import { chipTheme } from '../theme/chip.js';
5
6
  type ChipVariants = VariantProps<typeof chipTheme>;
@@ -12,7 +13,7 @@ export interface ChipProps {
12
13
  disabled?: boolean;
13
14
  /** Fully-rounded pill shape instead of the default (Badge's own) small radius. */
14
15
  rounded?: boolean;
15
- color?: ChipVariants['color'];
16
+ color?: ColorRole;
16
17
  variant?: ChipVariants['variant'];
17
18
  size?: ChipVariants['size'];
18
19
  ui?: UiProp<ChipThemeSlots>;
@@ -1,5 +1,6 @@
1
1
  import type { VariantProps } from 'tailwind-variants';
2
2
  import type { CollapsibleThemeSlots } from '../theme/collapsible.js';
3
+ import type { ColorRole } from '../utils/color-registry.js';
3
4
  import type { UiProp } from '../utils/ui.js';
4
5
  import { collapsibleTheme } from '../theme/collapsible.js';
5
6
  type CollapsibleVariants = VariantProps<typeof collapsibleTheme>;
@@ -11,6 +12,8 @@ export interface CollapsibleProps {
11
12
  size?: CollapsibleVariants['size'];
12
13
  /** Which way the content reveals - `down` expands below the trigger, `up` above it. Flips the chevron's rest/open rotation to match. @default 'down' */
13
14
  direction?: CollapsibleVariants['direction'];
15
+ /** The trigger hover accent. @default 'primary' */
16
+ color?: ColorRole;
14
17
  ui?: UiProp<CollapsibleThemeSlots>;
15
18
  }
16
19
  export interface CollapsibleEmits {