@sewadah/selaras 0.1.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 (500) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +131 -0
  3. package/dist/module.d.mts +22 -0
  4. package/dist/module.json +9 -0
  5. package/dist/module.mjs +127 -0
  6. package/dist/runtime/components/Accordion.d.vue.ts +59 -0
  7. package/dist/runtime/components/Accordion.vue +65 -0
  8. package/dist/runtime/components/Accordion.vue.d.ts +59 -0
  9. package/dist/runtime/components/Alert.d.vue.ts +39 -0
  10. package/dist/runtime/components/Alert.vue +64 -0
  11. package/dist/runtime/components/Alert.vue.d.ts +39 -0
  12. package/dist/runtime/components/AlertDialog.d.vue.ts +66 -0
  13. package/dist/runtime/components/AlertDialog.vue +116 -0
  14. package/dist/runtime/components/AlertDialog.vue.d.ts +66 -0
  15. package/dist/runtime/components/App.d.vue.ts +32 -0
  16. package/dist/runtime/components/App.vue +26 -0
  17. package/dist/runtime/components/App.vue.d.ts +32 -0
  18. package/dist/runtime/components/Autocomplete.d.vue.ts +61 -0
  19. package/dist/runtime/components/Autocomplete.vue +41 -0
  20. package/dist/runtime/components/Autocomplete.vue.d.ts +61 -0
  21. package/dist/runtime/components/Avatar.d.vue.ts +46 -0
  22. package/dist/runtime/components/Avatar.vue +64 -0
  23. package/dist/runtime/components/Avatar.vue.d.ts +46 -0
  24. package/dist/runtime/components/AvatarGroup.d.vue.ts +14 -0
  25. package/dist/runtime/components/AvatarGroup.vue +41 -0
  26. package/dist/runtime/components/AvatarGroup.vue.d.ts +14 -0
  27. package/dist/runtime/components/Badge.d.vue.ts +37 -0
  28. package/dist/runtime/components/Badge.vue +47 -0
  29. package/dist/runtime/components/Badge.vue.d.ts +37 -0
  30. package/dist/runtime/components/Breadcrumb.d.vue.ts +37 -0
  31. package/dist/runtime/components/Breadcrumb.vue +109 -0
  32. package/dist/runtime/components/Breadcrumb.vue.d.ts +37 -0
  33. package/dist/runtime/components/Button.d.vue.ts +45 -0
  34. package/dist/runtime/components/Button.vue +67 -0
  35. package/dist/runtime/components/Button.vue.d.ts +45 -0
  36. package/dist/runtime/components/ButtonGroup.d.vue.ts +22 -0
  37. package/dist/runtime/components/ButtonGroup.vue +21 -0
  38. package/dist/runtime/components/ButtonGroup.vue.d.ts +22 -0
  39. package/dist/runtime/components/Callout.d.vue.ts +27 -0
  40. package/dist/runtime/components/Callout.vue +47 -0
  41. package/dist/runtime/components/Callout.vue.d.ts +27 -0
  42. package/dist/runtime/components/Card.d.vue.ts +25 -0
  43. package/dist/runtime/components/Card.vue +30 -0
  44. package/dist/runtime/components/Card.vue.d.ts +25 -0
  45. package/dist/runtime/components/CardGroup.d.vue.ts +23 -0
  46. package/dist/runtime/components/CardGroup.vue +19 -0
  47. package/dist/runtime/components/CardGroup.vue.d.ts +23 -0
  48. package/dist/runtime/components/Checkbox.d.vue.ts +45 -0
  49. package/dist/runtime/components/Checkbox.vue +76 -0
  50. package/dist/runtime/components/Checkbox.vue.d.ts +45 -0
  51. package/dist/runtime/components/Chip.d.vue.ts +50 -0
  52. package/dist/runtime/components/Chip.vue +75 -0
  53. package/dist/runtime/components/Chip.vue.d.ts +50 -0
  54. package/dist/runtime/components/CodeButton.d.vue.ts +21 -0
  55. package/dist/runtime/components/CodeButton.vue +33 -0
  56. package/dist/runtime/components/CodeButton.vue.d.ts +21 -0
  57. package/dist/runtime/components/CodeGroup.d.vue.ts +3 -0
  58. package/dist/runtime/components/CodeGroup.vue +46 -0
  59. package/dist/runtime/components/CodeGroup.vue.d.ts +3 -0
  60. package/dist/runtime/components/CodeTree.d.vue.ts +17 -0
  61. package/dist/runtime/components/CodeTree.vue +56 -0
  62. package/dist/runtime/components/CodeTree.vue.d.ts +17 -0
  63. package/dist/runtime/components/Collapsible.d.vue.ts +44 -0
  64. package/dist/runtime/components/Collapsible.vue +52 -0
  65. package/dist/runtime/components/Collapsible.vue.d.ts +44 -0
  66. package/dist/runtime/components/ColorModeToggle.d.vue.ts +3 -0
  67. package/dist/runtime/components/ColorModeToggle.vue +24 -0
  68. package/dist/runtime/components/ColorModeToggle.vue.d.ts +3 -0
  69. package/dist/runtime/components/ColorPicker.d.vue.ts +30 -0
  70. package/dist/runtime/components/ColorPicker.vue +112 -0
  71. package/dist/runtime/components/ColorPicker.vue.d.ts +30 -0
  72. package/dist/runtime/components/Column.d.ts +72 -0
  73. package/dist/runtime/components/Column.js +34 -0
  74. package/dist/runtime/components/ColumnGroup.d.ts +33 -0
  75. package/dist/runtime/components/ColumnGroup.js +17 -0
  76. package/dist/runtime/components/CommandPalette.d.vue.ts +41 -0
  77. package/dist/runtime/components/CommandPalette.vue +208 -0
  78. package/dist/runtime/components/CommandPalette.vue.d.ts +41 -0
  79. package/dist/runtime/components/Container.d.vue.ts +22 -0
  80. package/dist/runtime/components/Container.vue +21 -0
  81. package/dist/runtime/components/Container.vue.d.ts +22 -0
  82. package/dist/runtime/components/ContentNavigation.d.vue.ts +31 -0
  83. package/dist/runtime/components/ContentNavigation.vue +64 -0
  84. package/dist/runtime/components/ContentNavigation.vue.d.ts +31 -0
  85. package/dist/runtime/components/ContentSurround.d.vue.ts +16 -0
  86. package/dist/runtime/components/ContentSurround.vue +46 -0
  87. package/dist/runtime/components/ContentSurround.vue.d.ts +16 -0
  88. package/dist/runtime/components/ContentToc.d.vue.ts +35 -0
  89. package/dist/runtime/components/ContentToc.vue +265 -0
  90. package/dist/runtime/components/ContentToc.vue.d.ts +35 -0
  91. package/dist/runtime/components/ContextMenu.d.vue.ts +33 -0
  92. package/dist/runtime/components/ContextMenu.vue +49 -0
  93. package/dist/runtime/components/ContextMenu.vue.d.ts +33 -0
  94. package/dist/runtime/components/DashboardGroup.d.vue.ts +24 -0
  95. package/dist/runtime/components/DashboardGroup.vue +52 -0
  96. package/dist/runtime/components/DashboardGroup.vue.d.ts +24 -0
  97. package/dist/runtime/components/DashboardNavbar.d.vue.ts +23 -0
  98. package/dist/runtime/components/DashboardNavbar.vue +33 -0
  99. package/dist/runtime/components/DashboardNavbar.vue.d.ts +23 -0
  100. package/dist/runtime/components/DashboardPanel.d.vue.ts +22 -0
  101. package/dist/runtime/components/DashboardPanel.vue +26 -0
  102. package/dist/runtime/components/DashboardPanel.vue.d.ts +22 -0
  103. package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +8 -0
  104. package/dist/runtime/components/DashboardResizeHandle.vue +19 -0
  105. package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +8 -0
  106. package/dist/runtime/components/DashboardSidebar.d.vue.ts +40 -0
  107. package/dist/runtime/components/DashboardSidebar.vue +117 -0
  108. package/dist/runtime/components/DashboardSidebar.vue.d.ts +40 -0
  109. package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +21 -0
  110. package/dist/runtime/components/DashboardSidebarToggle.vue +42 -0
  111. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +21 -0
  112. package/dist/runtime/components/DatePicker.d.vue.ts +165 -0
  113. package/dist/runtime/components/DatePicker.vue +796 -0
  114. package/dist/runtime/components/DatePicker.vue.d.ts +165 -0
  115. package/dist/runtime/components/Drawer.d.vue.ts +74 -0
  116. package/dist/runtime/components/Drawer.vue +157 -0
  117. package/dist/runtime/components/Drawer.vue.d.ts +74 -0
  118. package/dist/runtime/components/DrawerRenderer.d.vue.ts +3 -0
  119. package/dist/runtime/components/DrawerRenderer.vue +30 -0
  120. package/dist/runtime/components/DrawerRenderer.vue.d.ts +3 -0
  121. package/dist/runtime/components/Dropdown.d.vue.ts +35 -0
  122. package/dist/runtime/components/Dropdown.vue +51 -0
  123. package/dist/runtime/components/Dropdown.vue.d.ts +35 -0
  124. package/dist/runtime/components/FileTree.d.vue.ts +28 -0
  125. package/dist/runtime/components/FileTree.vue +68 -0
  126. package/dist/runtime/components/FileTree.vue.d.ts +28 -0
  127. package/dist/runtime/components/FileUpload.d.vue.ts +68 -0
  128. package/dist/runtime/components/FileUpload.vue +226 -0
  129. package/dist/runtime/components/FileUpload.vue.d.ts +68 -0
  130. package/dist/runtime/components/FormField.d.vue.ts +37 -0
  131. package/dist/runtime/components/FormField.vue +72 -0
  132. package/dist/runtime/components/FormField.vue.d.ts +37 -0
  133. package/dist/runtime/components/Header.d.vue.ts +20 -0
  134. package/dist/runtime/components/Header.vue +23 -0
  135. package/dist/runtime/components/Header.vue.d.ts +20 -0
  136. package/dist/runtime/components/Icon.d.vue.ts +14 -0
  137. package/dist/runtime/components/Icon.vue +18 -0
  138. package/dist/runtime/components/Icon.vue.d.ts +14 -0
  139. package/dist/runtime/components/Input.d.vue.ts +41 -0
  140. package/dist/runtime/components/Input.vue +86 -0
  141. package/dist/runtime/components/Input.vue.d.ts +41 -0
  142. package/dist/runtime/components/InputGroup.d.vue.ts +22 -0
  143. package/dist/runtime/components/InputGroup.vue +21 -0
  144. package/dist/runtime/components/InputGroup.vue.d.ts +22 -0
  145. package/dist/runtime/components/InputNumber.d.vue.ts +37 -0
  146. package/dist/runtime/components/InputNumber.vue +173 -0
  147. package/dist/runtime/components/InputNumber.vue.d.ts +37 -0
  148. package/dist/runtime/components/Kbd.d.vue.ts +24 -0
  149. package/dist/runtime/components/Kbd.vue +42 -0
  150. package/dist/runtime/components/Kbd.vue.d.ts +24 -0
  151. package/dist/runtime/components/Modal.d.vue.ts +72 -0
  152. package/dist/runtime/components/Modal.vue +178 -0
  153. package/dist/runtime/components/Modal.vue.d.ts +72 -0
  154. package/dist/runtime/components/ModalRenderer.d.vue.ts +3 -0
  155. package/dist/runtime/components/ModalRenderer.vue +25 -0
  156. package/dist/runtime/components/ModalRenderer.vue.d.ts +3 -0
  157. package/dist/runtime/components/NavigationMenu.d.vue.ts +108 -0
  158. package/dist/runtime/components/NavigationMenu.vue +166 -0
  159. package/dist/runtime/components/NavigationMenu.vue.d.ts +108 -0
  160. package/dist/runtime/components/NavigationMenuAccordionItem.d.vue.ts +23 -0
  161. package/dist/runtime/components/NavigationMenuAccordionItem.vue +106 -0
  162. package/dist/runtime/components/NavigationMenuAccordionItem.vue.d.ts +23 -0
  163. package/dist/runtime/components/NavigationMenuFlyoutList.d.vue.ts +19 -0
  164. package/dist/runtime/components/NavigationMenuFlyoutList.vue +44 -0
  165. package/dist/runtime/components/NavigationMenuFlyoutList.vue.d.ts +19 -0
  166. package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +49 -0
  167. package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +116 -0
  168. package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +49 -0
  169. package/dist/runtime/components/PageAside.d.vue.ts +20 -0
  170. package/dist/runtime/components/PageAside.vue +26 -0
  171. package/dist/runtime/components/PageAside.vue.d.ts +20 -0
  172. package/dist/runtime/components/PageHeader.d.vue.ts +24 -0
  173. package/dist/runtime/components/PageHeader.vue +30 -0
  174. package/dist/runtime/components/PageHeader.vue.d.ts +24 -0
  175. package/dist/runtime/components/Pagination.d.vue.ts +42 -0
  176. package/dist/runtime/components/Pagination.vue +113 -0
  177. package/dist/runtime/components/Pagination.vue.d.ts +42 -0
  178. package/dist/runtime/components/PinInput.d.vue.ts +40 -0
  179. package/dist/runtime/components/PinInput.vue +66 -0
  180. package/dist/runtime/components/PinInput.vue.d.ts +40 -0
  181. package/dist/runtime/components/Popover.d.vue.ts +52 -0
  182. package/dist/runtime/components/Popover.vue +77 -0
  183. package/dist/runtime/components/Popover.vue.d.ts +52 -0
  184. package/dist/runtime/components/Progress.d.vue.ts +32 -0
  185. package/dist/runtime/components/Progress.vue +76 -0
  186. package/dist/runtime/components/Progress.vue.d.ts +32 -0
  187. package/dist/runtime/components/ProseH1.d.vue.ts +18 -0
  188. package/dist/runtime/components/ProseH1.vue +21 -0
  189. package/dist/runtime/components/ProseH1.vue.d.ts +18 -0
  190. package/dist/runtime/components/ProseH2.d.vue.ts +18 -0
  191. package/dist/runtime/components/ProseH2.vue +21 -0
  192. package/dist/runtime/components/ProseH2.vue.d.ts +18 -0
  193. package/dist/runtime/components/ProseH3.d.vue.ts +18 -0
  194. package/dist/runtime/components/ProseH3.vue +21 -0
  195. package/dist/runtime/components/ProseH3.vue.d.ts +18 -0
  196. package/dist/runtime/components/ProseH4.d.vue.ts +18 -0
  197. package/dist/runtime/components/ProseH4.vue +21 -0
  198. package/dist/runtime/components/ProseH4.vue.d.ts +18 -0
  199. package/dist/runtime/components/ProseH5.d.vue.ts +18 -0
  200. package/dist/runtime/components/ProseH5.vue +21 -0
  201. package/dist/runtime/components/ProseH5.vue.d.ts +18 -0
  202. package/dist/runtime/components/ProseH6.d.vue.ts +18 -0
  203. package/dist/runtime/components/ProseH6.vue +21 -0
  204. package/dist/runtime/components/ProseH6.vue.d.ts +18 -0
  205. package/dist/runtime/components/ProsePre.d.vue.ts +20 -0
  206. package/dist/runtime/components/ProsePre.vue +50 -0
  207. package/dist/runtime/components/ProsePre.vue.d.ts +20 -0
  208. package/dist/runtime/components/RadioGroup.d.vue.ts +50 -0
  209. package/dist/runtime/components/RadioGroup.vue +82 -0
  210. package/dist/runtime/components/RadioGroup.vue.d.ts +50 -0
  211. package/dist/runtime/components/Rating.d.vue.ts +36 -0
  212. package/dist/runtime/components/Rating.vue +83 -0
  213. package/dist/runtime/components/Rating.vue.d.ts +36 -0
  214. package/dist/runtime/components/ReadMore.d.vue.ts +20 -0
  215. package/dist/runtime/components/ReadMore.vue +59 -0
  216. package/dist/runtime/components/ReadMore.vue.d.ts +20 -0
  217. package/dist/runtime/components/ScrollArea.d.vue.ts +19 -0
  218. package/dist/runtime/components/ScrollArea.vue +37 -0
  219. package/dist/runtime/components/ScrollArea.vue.d.ts +19 -0
  220. package/dist/runtime/components/Select.d.vue.ts +60 -0
  221. package/dist/runtime/components/Select.vue +40 -0
  222. package/dist/runtime/components/Select.vue.d.ts +60 -0
  223. package/dist/runtime/components/Separator.d.vue.ts +27 -0
  224. package/dist/runtime/components/Separator.vue +36 -0
  225. package/dist/runtime/components/Separator.vue.d.ts +27 -0
  226. package/dist/runtime/components/Skeleton.d.vue.ts +13 -0
  227. package/dist/runtime/components/Skeleton.vue +17 -0
  228. package/dist/runtime/components/Skeleton.vue.d.ts +13 -0
  229. package/dist/runtime/components/Slideover.d.vue.ts +65 -0
  230. package/dist/runtime/components/Slideover.vue +140 -0
  231. package/dist/runtime/components/Slideover.vue.d.ts +65 -0
  232. package/dist/runtime/components/SlideoverRenderer.d.vue.ts +3 -0
  233. package/dist/runtime/components/SlideoverRenderer.vue +27 -0
  234. package/dist/runtime/components/SlideoverRenderer.vue.d.ts +3 -0
  235. package/dist/runtime/components/Slider.d.vue.ts +60 -0
  236. package/dist/runtime/components/Slider.vue +186 -0
  237. package/dist/runtime/components/Slider.vue.d.ts +60 -0
  238. package/dist/runtime/components/Splitter.d.vue.ts +41 -0
  239. package/dist/runtime/components/Splitter.vue +31 -0
  240. package/dist/runtime/components/Splitter.vue.d.ts +41 -0
  241. package/dist/runtime/components/SplitterPanel.d.vue.ts +55 -0
  242. package/dist/runtime/components/SplitterPanel.vue +52 -0
  243. package/dist/runtime/components/SplitterPanel.vue.d.ts +55 -0
  244. package/dist/runtime/components/SplitterResizeHandle.d.vue.ts +14 -0
  245. package/dist/runtime/components/SplitterResizeHandle.vue +22 -0
  246. package/dist/runtime/components/SplitterResizeHandle.vue.d.ts +14 -0
  247. package/dist/runtime/components/Stepper.d.vue.ts +57 -0
  248. package/dist/runtime/components/Stepper.vue +101 -0
  249. package/dist/runtime/components/Stepper.vue.d.ts +57 -0
  250. package/dist/runtime/components/Switch.d.vue.ts +49 -0
  251. package/dist/runtime/components/Switch.vue +73 -0
  252. package/dist/runtime/components/Switch.vue.d.ts +49 -0
  253. package/dist/runtime/components/Table.d.vue.ts +83 -0
  254. package/dist/runtime/components/Table.vue +339 -0
  255. package/dist/runtime/components/Table.vue.d.ts +83 -0
  256. package/dist/runtime/components/Tabs.d.vue.ts +43 -0
  257. package/dist/runtime/components/Tabs.vue +60 -0
  258. package/dist/runtime/components/Tabs.vue.d.ts +43 -0
  259. package/dist/runtime/components/Textarea.d.vue.ts +45 -0
  260. package/dist/runtime/components/Textarea.vue +110 -0
  261. package/dist/runtime/components/Textarea.vue.d.ts +45 -0
  262. package/dist/runtime/components/Theme.d.vue.ts +19 -0
  263. package/dist/runtime/components/Theme.vue +18 -0
  264. package/dist/runtime/components/Theme.vue.d.ts +19 -0
  265. package/dist/runtime/components/Toast.d.vue.ts +8 -0
  266. package/dist/runtime/components/Toast.vue +58 -0
  267. package/dist/runtime/components/Toast.vue.d.ts +8 -0
  268. package/dist/runtime/components/Toggle.d.vue.ts +38 -0
  269. package/dist/runtime/components/Toggle.vue +44 -0
  270. package/dist/runtime/components/Toggle.vue.d.ts +38 -0
  271. package/dist/runtime/components/ToggleGroup.d.vue.ts +48 -0
  272. package/dist/runtime/components/ToggleGroup.vue +61 -0
  273. package/dist/runtime/components/ToggleGroup.vue.d.ts +48 -0
  274. package/dist/runtime/components/Tooltip.d.vue.ts +28 -0
  275. package/dist/runtime/components/Tooltip.vue +40 -0
  276. package/dist/runtime/components/Tooltip.vue.d.ts +28 -0
  277. package/dist/runtime/components/Tree.d.vue.ts +64 -0
  278. package/dist/runtime/components/Tree.vue +139 -0
  279. package/dist/runtime/components/Tree.vue.d.ts +64 -0
  280. package/dist/runtime/composables/use-combobox-select.d.ts +45 -0
  281. package/dist/runtime/composables/use-combobox-select.js +80 -0
  282. package/dist/runtime/composables/use-command-palette.d.ts +8 -0
  283. package/dist/runtime/composables/use-command-palette.js +14 -0
  284. package/dist/runtime/composables/use-drawer.d.ts +42 -0
  285. package/dist/runtime/composables/use-drawer.js +44 -0
  286. package/dist/runtime/composables/use-form-field.d.ts +10 -0
  287. package/dist/runtime/composables/use-form-field.js +8 -0
  288. package/dist/runtime/composables/use-icons.d.ts +10 -0
  289. package/dist/runtime/composables/use-icons.js +7 -0
  290. package/dist/runtime/composables/use-locale.d.ts +12 -0
  291. package/dist/runtime/composables/use-locale.js +6 -0
  292. package/dist/runtime/composables/use-media-query.d.ts +11 -0
  293. package/dist/runtime/composables/use-media-query.js +15 -0
  294. package/dist/runtime/composables/use-messages.d.ts +12 -0
  295. package/dist/runtime/composables/use-messages.js +7 -0
  296. package/dist/runtime/composables/use-modal.d.ts +32 -0
  297. package/dist/runtime/composables/use-modal.js +39 -0
  298. package/dist/runtime/composables/use-ripple.d.ts +15 -0
  299. package/dist/runtime/composables/use-ripple.js +6 -0
  300. package/dist/runtime/composables/use-slideover.d.ts +36 -0
  301. package/dist/runtime/composables/use-slideover.js +41 -0
  302. package/dist/runtime/composables/use-table.d.ts +63 -0
  303. package/dist/runtime/composables/use-table.js +142 -0
  304. package/dist/runtime/composables/use-toast.d.ts +15 -0
  305. package/dist/runtime/composables/use-toast.js +16 -0
  306. package/dist/runtime/directives/index.d.ts +1 -0
  307. package/dist/runtime/directives/index.js +1 -0
  308. package/dist/runtime/directives/ripple.d.ts +16 -0
  309. package/dist/runtime/directives/ripple.js +80 -0
  310. package/dist/runtime/internal/ColorPickerBody.d.vue.ts +26 -0
  311. package/dist/runtime/internal/ColorPickerBody.vue +111 -0
  312. package/dist/runtime/internal/ColorPickerBody.vue.d.ts +26 -0
  313. package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +122 -0
  314. package/dist/runtime/internal/ComboboxSelectBase.vue +590 -0
  315. package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +122 -0
  316. package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +71 -0
  317. package/dist/runtime/internal/ComboboxSelectBody.vue +146 -0
  318. package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +71 -0
  319. package/dist/runtime/internal/DatePickerCalendarBody.d.vue.ts +71 -0
  320. package/dist/runtime/internal/DatePickerCalendarBody.vue +215 -0
  321. package/dist/runtime/internal/DatePickerCalendarBody.vue.d.ts +71 -0
  322. package/dist/runtime/internal/DatePickerRangeCalendarBody.d.vue.ts +37 -0
  323. package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +96 -0
  324. package/dist/runtime/internal/DatePickerRangeCalendarBody.vue.d.ts +37 -0
  325. package/dist/runtime/internal/DatePickerTimeBody.d.vue.ts +33 -0
  326. package/dist/runtime/internal/DatePickerTimeBody.vue +53 -0
  327. package/dist/runtime/internal/DatePickerTimeBody.vue.d.ts +33 -0
  328. package/dist/runtime/internal/TimeStepper.d.vue.ts +28 -0
  329. package/dist/runtime/internal/TimeStepper.vue +99 -0
  330. package/dist/runtime/internal/TimeStepper.vue.d.ts +28 -0
  331. package/dist/runtime/prose.css +1 -0
  332. package/dist/runtime/server/tsconfig.json +3 -0
  333. package/dist/runtime/theme/accordion.d.ts +131 -0
  334. package/dist/runtime/theme/accordion.js +60 -0
  335. package/dist/runtime/theme/alert-dialog.d.ts +50 -0
  336. package/dist/runtime/theme/alert-dialog.js +30 -0
  337. package/dist/runtime/theme/alert.d.ts +62 -0
  338. package/dist/runtime/theme/alert.js +52 -0
  339. package/dist/runtime/theme/avatar-group.d.ts +59 -0
  340. package/dist/runtime/theme/avatar-group.js +18 -0
  341. package/dist/runtime/theme/avatar.d.ts +206 -0
  342. package/dist/runtime/theme/avatar.js +67 -0
  343. package/dist/runtime/theme/badge.d.ts +140 -0
  344. package/dist/runtime/theme/badge.js +90 -0
  345. package/dist/runtime/theme/breadcrumb.d.ts +86 -0
  346. package/dist/runtime/theme/breadcrumb.js +22 -0
  347. package/dist/runtime/theme/button-group.d.ts +53 -0
  348. package/dist/runtime/theme/button-group.js +21 -0
  349. package/dist/runtime/theme/button.d.ts +155 -0
  350. package/dist/runtime/theme/button.js +99 -0
  351. package/dist/runtime/theme/callout.d.ts +74 -0
  352. package/dist/runtime/theme/callout.js +23 -0
  353. package/dist/runtime/theme/card-group.d.ts +44 -0
  354. package/dist/runtime/theme/card-group.js +19 -0
  355. package/dist/runtime/theme/card.d.ts +62 -0
  356. package/dist/runtime/theme/card.js +23 -0
  357. package/dist/runtime/theme/checkbox.d.ts +218 -0
  358. package/dist/runtime/theme/checkbox.js +113 -0
  359. package/dist/runtime/theme/chip.d.ts +155 -0
  360. package/dist/runtime/theme/chip.js +86 -0
  361. package/dist/runtime/theme/code-button.d.ts +32 -0
  362. package/dist/runtime/theme/code-button.js +7 -0
  363. package/dist/runtime/theme/code-tree.d.ts +50 -0
  364. package/dist/runtime/theme/code-tree.js +13 -0
  365. package/dist/runtime/theme/collapsible.d.ts +95 -0
  366. package/dist/runtime/theme/collapsible.js +46 -0
  367. package/dist/runtime/theme/color-picker.d.ts +152 -0
  368. package/dist/runtime/theme/color-picker.js +83 -0
  369. package/dist/runtime/theme/command-palette.d.ts +110 -0
  370. package/dist/runtime/theme/command-palette.js +23 -0
  371. package/dist/runtime/theme/container.d.ts +62 -0
  372. package/dist/runtime/theme/container.js +18 -0
  373. package/dist/runtime/theme/content-navigation.d.ts +47 -0
  374. package/dist/runtime/theme/content-navigation.js +38 -0
  375. package/dist/runtime/theme/content-surround.d.ts +53 -0
  376. package/dist/runtime/theme/content-surround.js +22 -0
  377. package/dist/runtime/theme/content-toc.d.ts +56 -0
  378. package/dist/runtime/theme/content-toc.js +41 -0
  379. package/dist/runtime/theme/context-menu.d.ts +38 -0
  380. package/dist/runtime/theme/context-menu.js +21 -0
  381. package/dist/runtime/theme/dashboard-group.d.ts +26 -0
  382. package/dist/runtime/theme/dashboard-group.js +9 -0
  383. package/dist/runtime/theme/dashboard-navbar.d.ts +44 -0
  384. package/dist/runtime/theme/dashboard-navbar.js +9 -0
  385. package/dist/runtime/theme/dashboard-panel.d.ts +26 -0
  386. package/dist/runtime/theme/dashboard-panel.js +6 -0
  387. package/dist/runtime/theme/dashboard-resize-handle.d.ts +26 -0
  388. package/dist/runtime/theme/dashboard-resize-handle.js +17 -0
  389. package/dist/runtime/theme/dashboard-sidebar.d.ts +50 -0
  390. package/dist/runtime/theme/dashboard-sidebar.js +40 -0
  391. package/dist/runtime/theme/date-picker.d.ts +119 -0
  392. package/dist/runtime/theme/date-picker.js +75 -0
  393. package/dist/runtime/theme/drawer.d.ts +95 -0
  394. package/dist/runtime/theme/drawer.js +57 -0
  395. package/dist/runtime/theme/dropdown.d.ts +41 -0
  396. package/dist/runtime/theme/dropdown.js +21 -0
  397. package/dist/runtime/theme/file-tree.d.ts +56 -0
  398. package/dist/runtime/theme/file-tree.js +33 -0
  399. package/dist/runtime/theme/file-upload.d.ts +233 -0
  400. package/dist/runtime/theme/file-upload.js +63 -0
  401. package/dist/runtime/theme/form-field.d.ts +95 -0
  402. package/dist/runtime/theme/form-field.js +37 -0
  403. package/dist/runtime/theme/header.d.ts +38 -0
  404. package/dist/runtime/theme/header.js +8 -0
  405. package/dist/runtime/theme/icon.d.ts +80 -0
  406. package/dist/runtime/theme/icon.js +26 -0
  407. package/dist/runtime/theme/input-group.d.ts +95 -0
  408. package/dist/runtime/theme/input-group.js +39 -0
  409. package/dist/runtime/theme/input-number.d.ts +164 -0
  410. package/dist/runtime/theme/input-number.js +76 -0
  411. package/dist/runtime/theme/input.d.ts +185 -0
  412. package/dist/runtime/theme/input.js +72 -0
  413. package/dist/runtime/theme/kbd.d.ts +44 -0
  414. package/dist/runtime/theme/kbd.js +16 -0
  415. package/dist/runtime/theme/modal.d.ts +74 -0
  416. package/dist/runtime/theme/modal.js +58 -0
  417. package/dist/runtime/theme/navigation-menu.d.ts +224 -0
  418. package/dist/runtime/theme/navigation-menu.js +232 -0
  419. package/dist/runtime/theme/page-aside.d.ts +44 -0
  420. package/dist/runtime/theme/page-aside.js +17 -0
  421. package/dist/runtime/theme/page-header.d.ts +38 -0
  422. package/dist/runtime/theme/page-header.js +8 -0
  423. package/dist/runtime/theme/pagination.d.ts +68 -0
  424. package/dist/runtime/theme/pagination.js +21 -0
  425. package/dist/runtime/theme/pin-input.d.ts +131 -0
  426. package/dist/runtime/theme/pin-input.js +40 -0
  427. package/dist/runtime/theme/popover.d.ts +32 -0
  428. package/dist/runtime/theme/popover.js +7 -0
  429. package/dist/runtime/theme/progress.d.ts +185 -0
  430. package/dist/runtime/theme/progress.js +54 -0
  431. package/dist/runtime/theme/prose.d.ts +92 -0
  432. package/dist/runtime/theme/prose.js +17 -0
  433. package/dist/runtime/theme/radio-group.d.ts +239 -0
  434. package/dist/runtime/theme/radio-group.js +134 -0
  435. package/dist/runtime/theme/rating.d.ts +167 -0
  436. package/dist/runtime/theme/rating.js +77 -0
  437. package/dist/runtime/theme/read-more.d.ts +38 -0
  438. package/dist/runtime/theme/read-more.js +21 -0
  439. package/dist/runtime/theme/scroll-area.d.ts +50 -0
  440. package/dist/runtime/theme/scroll-area.js +10 -0
  441. package/dist/runtime/theme/select.d.ts +176 -0
  442. package/dist/runtime/theme/select.js +74 -0
  443. package/dist/runtime/theme/separator.d.ts +158 -0
  444. package/dist/runtime/theme/separator.js +63 -0
  445. package/dist/runtime/theme/skeleton.d.ts +35 -0
  446. package/dist/runtime/theme/skeleton.js +27 -0
  447. package/dist/runtime/theme/slideover.d.ts +107 -0
  448. package/dist/runtime/theme/slideover.js +62 -0
  449. package/dist/runtime/theme/slider.d.ts +227 -0
  450. package/dist/runtime/theme/slider.js +73 -0
  451. package/dist/runtime/theme/splitter-panel.d.ts +26 -0
  452. package/dist/runtime/theme/splitter-panel.js +9 -0
  453. package/dist/runtime/theme/splitter-resize-handle.d.ts +44 -0
  454. package/dist/runtime/theme/splitter-resize-handle.js +18 -0
  455. package/dist/runtime/theme/splitter.d.ts +35 -0
  456. package/dist/runtime/theme/splitter.js +15 -0
  457. package/dist/runtime/theme/stepper.d.ts +221 -0
  458. package/dist/runtime/theme/stepper.js +106 -0
  459. package/dist/runtime/theme/switch.d.ts +206 -0
  460. package/dist/runtime/theme/switch.js +84 -0
  461. package/dist/runtime/theme/table.d.ts +176 -0
  462. package/dist/runtime/theme/table.js +59 -0
  463. package/dist/runtime/theme/tabs.d.ts +59 -0
  464. package/dist/runtime/theme/tabs.js +44 -0
  465. package/dist/runtime/theme/textarea.d.ts +212 -0
  466. package/dist/runtime/theme/textarea.js +56 -0
  467. package/dist/runtime/theme/toast.d.ts +80 -0
  468. package/dist/runtime/theme/toast.js +31 -0
  469. package/dist/runtime/theme/toggle-group.d.ts +110 -0
  470. package/dist/runtime/theme/toggle-group.js +48 -0
  471. package/dist/runtime/theme/toggle.d.ts +92 -0
  472. package/dist/runtime/theme/toggle.js +48 -0
  473. package/dist/runtime/theme/tooltip.d.ts +44 -0
  474. package/dist/runtime/theme/tooltip.js +14 -0
  475. package/dist/runtime/theme/tree.d.ts +80 -0
  476. package/dist/runtime/theme/tree.js +32 -0
  477. package/dist/runtime/theme.css +1 -0
  478. package/dist/runtime/types/app-config.d.ts +15 -0
  479. package/dist/runtime/types/index.d.ts +82 -0
  480. package/dist/runtime/types/index.js +2 -0
  481. package/dist/runtime/utils/format-bytes.d.ts +2 -0
  482. package/dist/runtime/utils/format-bytes.js +9 -0
  483. package/dist/runtime/utils/fuzzy-match.d.ts +12 -0
  484. package/dist/runtime/utils/fuzzy-match.js +21 -0
  485. package/dist/runtime/utils/icons.d.ts +38 -0
  486. package/dist/runtime/utils/icons.js +51 -0
  487. package/dist/runtime/utils/injection-keys.d.ts +69 -0
  488. package/dist/runtime/utils/injection-keys.js +3 -0
  489. package/dist/runtime/utils/messages.d.ts +70 -0
  490. package/dist/runtime/utils/messages.js +68 -0
  491. package/dist/runtime/utils/navigation-menu.d.ts +32 -0
  492. package/dist/runtime/utils/navigation-menu.js +5 -0
  493. package/dist/runtime/utils/table-columns.d.ts +30 -0
  494. package/dist/runtime/utils/table-columns.js +89 -0
  495. package/dist/runtime/utils/table-export.d.ts +12 -0
  496. package/dist/runtime/utils/table-export.js +29 -0
  497. package/dist/runtime/utils/ui.d.ts +124 -0
  498. package/dist/runtime/utils/ui.js +74 -0
  499. package/dist/types.d.mts +3 -0
  500. package/package.json +99 -0
@@ -0,0 +1,339 @@
1
+ <script setup>
2
+ import { FlexRender } from "@tanstack/vue-table";
3
+ import { useVirtualizer } from "@tanstack/vue-virtual";
4
+ import { computed, getCurrentInstance, h, nextTick, onMounted, onUnmounted, ref, useSlots, watch, watchEffect } from "vue";
5
+ import { useIcons } from "../composables/use-icons";
6
+ import { useMessages } from "../composables/use-messages";
7
+ import { useTable } from "../composables/use-table";
8
+ import { tableTheme } from "../theme/table";
9
+ import { collectColumnPinning, convertChildrenToColumns } from "../utils/table-columns";
10
+ import { exportTableToCsv } from "../utils/table-export";
11
+ import { applyClassPrefix, resolveSlot, useComponentTheme, useRootProps, withFallthroughClass } from "../utils/ui";
12
+ import Button from "./Button.vue";
13
+ import Checkbox from "./Checkbox.vue";
14
+ import Icon from "./Icon.vue";
15
+ import Input from "./Input.vue";
16
+ import Pagination from "./Pagination.vue";
17
+ defineOptions({ inheritAttrs: false });
18
+ const props = defineProps({
19
+ data: { type: Array, required: true },
20
+ columns: { type: Array, required: false },
21
+ selectable: { type: Boolean, required: false },
22
+ pageSize: { type: Number, required: false },
23
+ loading: { type: Boolean, required: false },
24
+ sorting: { type: Array, required: false },
25
+ defaultSorting: { type: Array, required: false },
26
+ rowSelection: { type: Object, required: false },
27
+ globalFilter: { type: String, required: false },
28
+ pageIndex: { type: Number, required: false },
29
+ size: { type: String, required: false, default: "md" },
30
+ gridlines: { type: Boolean, required: false },
31
+ striped: { type: Boolean, required: false },
32
+ expandable: { type: Boolean, required: false },
33
+ expanded: { type: null, required: false },
34
+ columnVisibility: { type: Object, required: false },
35
+ columnToggle: { type: Boolean, required: false },
36
+ scrollHeight: { type: String, required: false },
37
+ virtualize: { type: [Boolean, Object], required: false },
38
+ manualSorting: { type: Boolean, required: false },
39
+ manualFiltering: { type: Boolean, required: false },
40
+ manualPagination: { type: Boolean, required: false },
41
+ rowClass: { type: Function, required: false },
42
+ rowStyle: { type: Function, required: false },
43
+ ui: { type: Object, required: false }
44
+ });
45
+ const emit = defineEmits(["update:sorting", "update:rowSelection", "update:globalFilter", "update:pageIndex", "update:expanded", "update:columnVisibility", "rowClick", "rowContextmenu"]);
46
+ const slots = useSlots();
47
+ const icons = useIcons();
48
+ const messages = useMessages();
49
+ const theme = useComponentTheme("table", tableTheme);
50
+ const ui = computed(() => theme.value({ size: props.size, gridlines: props.gridlines, striped: props.striped, scrollable: !!props.scrollHeight }));
51
+ const selectColumn = {
52
+ id: "__select__",
53
+ header: ({ table: table2 }) => h(Checkbox, {
54
+ "modelValue": table2.getIsAllRowsSelected() ? true : table2.getIsSomeRowsSelected() ? "indeterminate" : false,
55
+ "onUpdate:modelValue": () => table2.toggleAllRowsSelected()
56
+ }),
57
+ cell: ({ row }) => h(Checkbox, {
58
+ "modelValue": row.getIsSelected(),
59
+ "disabled": !row.getCanSelect(),
60
+ "onUpdate:modelValue": () => row.toggleSelected()
61
+ }),
62
+ enableSorting: false,
63
+ enableColumnFilter: false
64
+ };
65
+ const expandColumn = {
66
+ id: "__expand__",
67
+ header: "",
68
+ cell: ({ row }) => h("button", {
69
+ "type": "button",
70
+ "class": ui.value.expandButton(),
71
+ "aria-label": row.getIsExpanded() ? messages.value.collapseRow : messages.value.expandRow,
72
+ "onClick": () => row.toggleExpanded()
73
+ }, [h(Icon, { "name": icons.value.chevronRight, "class": ui.value.expandChevron(), "data-expanded": row.getIsExpanded() || void 0 })]),
74
+ enableSorting: false,
75
+ enableColumnFilter: false
76
+ };
77
+ const columns = computed(() => {
78
+ const base = props.columns ?? convertChildrenToColumns(slots.default?.());
79
+ const withExpand = props.expandable ? [expandColumn, ...base] : base;
80
+ return props.selectable ? [selectColumn, ...withExpand] : withExpand;
81
+ });
82
+ const columnPinning = computed(() => collectColumnPinning(columns.value));
83
+ const { table, pageIndex, columnVisibility, effectivePageSize } = useTable(props, emit, columns, columnPinning);
84
+ if (import.meta.dev) {
85
+ watchEffect(() => {
86
+ const firstRow = props.data[0];
87
+ if (!firstRow)
88
+ return;
89
+ for (const column of columns.value) {
90
+ if (column.accessorKey && !(column.accessorKey in firstRow))
91
+ console.warn(`[SColumn] field "${column.accessorKey}" was not found on the first row of data.`);
92
+ }
93
+ });
94
+ }
95
+ const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
96
+ const wrapperProps = computed(() => resolveSlot(ui.value.wrapper, props.ui?.wrapper));
97
+ const tableProps = computed(() => resolveSlot(ui.value.table, props.ui?.table));
98
+ const theadProps = computed(() => resolveSlot(ui.value.thead, props.ui?.thead));
99
+ const trProps = computed(() => resolveSlot(ui.value.tr, props.ui?.tr));
100
+ const instance = getCurrentInstance();
101
+ function isRowClickable() {
102
+ return !!instance?.vnode.props?.onRowClick;
103
+ }
104
+ function bodyRowProps(rowOriginal) {
105
+ const extraClass = [
106
+ isRowClickable() ? "cursor-pointer" : void 0,
107
+ props.rowClass?.(rowOriginal)
108
+ ].filter(Boolean).join(" ") || void 0;
109
+ const base = resolveSlot(ui.value.tr, withFallthroughClass(extraClass, props.ui?.tr));
110
+ const rowStyle = props.rowStyle?.(rowOriginal);
111
+ return rowStyle ? { ...base, style: { ...base.style, ...rowStyle } } : base;
112
+ }
113
+ function onRowClick(rowOriginal, event) {
114
+ emit("rowClick", rowOriginal, event);
115
+ }
116
+ function onRowContextmenu(rowOriginal, event) {
117
+ emit("rowContextmenu", rowOriginal, event);
118
+ }
119
+ const thProps = computed(() => resolveSlot(ui.value.th, props.ui?.th));
120
+ const thSortableClass = computed(() => ui.value.thSortable());
121
+ const sortIconProps = computed(() => resolveSlot(ui.value.sortIcon, props.ui?.sortIcon));
122
+ const tdProps = computed(() => resolveSlot(ui.value.td, props.ui?.td));
123
+ const tfootProps = computed(() => resolveSlot(ui.value.tfoot, props.ui?.tfoot));
124
+ const emptyStateProps = computed(() => resolveSlot(ui.value.emptyState, props.ui?.emptyState));
125
+ const filterInputProps = computed(() => resolveSlot(ui.value.filterInput, props.ui?.filterInput));
126
+ const paginationWrapperProps = computed(() => resolveSlot(ui.value.paginationWrapper, props.ui?.paginationWrapper));
127
+ const paginationInfoProps = computed(() => resolveSlot(ui.value.paginationInfo, props.ui?.paginationInfo));
128
+ const paginationButtonsProps = computed(() => resolveSlot(ui.value.paginationButtons, props.ui?.paginationButtons));
129
+ const loadingOverlayProps = computed(() => resolveSlot(ui.value.loadingOverlay, props.ui?.loadingOverlay));
130
+ const loadingIconProps = computed(() => resolveSlot(ui.value.loadingIcon, props.ui?.loadingIcon));
131
+ const expandedRowProps = computed(() => resolveSlot(ui.value.expandedRow, props.ui?.expandedRow));
132
+ const expandedCellProps = computed(() => resolveSlot(ui.value.expandedCell, props.ui?.expandedCell));
133
+ const columnToggleProps = computed(() => resolveSlot(ui.value.columnToggle, props.ui?.columnToggle));
134
+ const columnTogglePanelProps = computed(() => resolveSlot(ui.value.columnTogglePanel, props.ui?.columnTogglePanel));
135
+ const columnToggleItemProps = computed(() => resolveSlot(ui.value.columnToggleItem, props.ui?.columnToggleItem));
136
+ const hasFooter = computed(
137
+ () => table.getFooterGroups().some((group) => group.headers.some((header) => header.column.columnDef.footer))
138
+ );
139
+ const headerRefs = /* @__PURE__ */ new Map();
140
+ function setHeaderRef(id, el) {
141
+ if (el)
142
+ headerRefs.set(id, el);
143
+ else
144
+ headerRefs.delete(id);
145
+ }
146
+ const pinnedOffsets = ref({});
147
+ async function recomputePinnedOffsets() {
148
+ await nextTick();
149
+ const offsets = {};
150
+ let left = 0;
151
+ for (const column of table.getStartVisibleLeafColumns()) {
152
+ offsets[column.id] = left;
153
+ left += headerRefs.get(column.id)?.getBoundingClientRect().width ?? 0;
154
+ }
155
+ let right = 0;
156
+ for (const column of [...table.getEndVisibleLeafColumns()].reverse()) {
157
+ offsets[column.id] = right;
158
+ right += headerRefs.get(column.id)?.getBoundingClientRect().width ?? 0;
159
+ }
160
+ pinnedOffsets.value = offsets;
161
+ }
162
+ onMounted(recomputePinnedOffsets);
163
+ watch([columns, columnVisibility], recomputePinnedOffsets);
164
+ function pinnedStyle(cell) {
165
+ const side = cell.column.getIsPinned();
166
+ if (!side)
167
+ return void 0;
168
+ const offset = pinnedOffsets.value[cell.column.id] ?? 0;
169
+ return side === "start" ? { insetInlineStart: `${offset}px` } : { insetInlineEnd: `${offset}px` };
170
+ }
171
+ const wrapperEl = ref();
172
+ const virtualizeConfig = computed(() => {
173
+ if (!props.virtualize)
174
+ return null;
175
+ const opts = props.virtualize === true ? {} : props.virtualize;
176
+ return { estimateSize: opts.estimateSize ?? 40, overscan: opts.overscan ?? 8 };
177
+ });
178
+ const rowVirtualizer = useVirtualizer(computed(() => ({
179
+ count: table.getRowModel().rows.length,
180
+ getScrollElement: () => wrapperEl.value ?? null,
181
+ estimateSize: () => virtualizeConfig.value?.estimateSize ?? 40,
182
+ overscan: virtualizeConfig.value?.overscan ?? 8
183
+ })));
184
+ const virtualRows = computed(() => rowVirtualizer.value.getVirtualItems());
185
+ const virtualPaddingTop = computed(() => virtualRows.value[0]?.start ?? 0);
186
+ const virtualPaddingBottom = computed(() => {
187
+ if (!virtualRows.value.length)
188
+ return 0;
189
+ const last = virtualRows.value[virtualRows.value.length - 1];
190
+ return rowVirtualizer.value.getTotalSize() - (last.start + last.size);
191
+ });
192
+ const visibleRows = computed(() => {
193
+ const rows = table.getRowModel().rows;
194
+ return virtualizeConfig.value ? virtualRows.value.map((v) => rows[v.index]) : rows;
195
+ });
196
+ const showColumnTogglePanel = ref(false);
197
+ const toggleableColumns = computed(() => table.getAllLeafColumns().filter((c) => !c.id.startsWith("__")));
198
+ function onDocumentClick(event) {
199
+ if (!event.target.closest("[data-column-toggle]"))
200
+ showColumnTogglePanel.value = false;
201
+ }
202
+ onMounted(() => document.addEventListener("click", onDocumentClick));
203
+ onUnmounted(() => document.removeEventListener("click", onDocumentClick));
204
+ defineExpose({
205
+ exportCsv: (filename) => exportTableToCsv(table, filename)
206
+ });
207
+ </script>
208
+
209
+ <template>
210
+ <div v-bind="rootProps">
211
+ <div v-if="columnToggle" :class="applyClassPrefix('mb-2 flex justify-end')">
212
+ <div data-column-toggle v-bind="columnToggleProps">
213
+ <Button variant="outline" size="sm" :icon="icons.columns" @click="showColumnTogglePanel = !showColumnTogglePanel">
214
+ {{ messages.columns }}
215
+ </Button>
216
+ <div v-if="showColumnTogglePanel" v-bind="columnTogglePanelProps">
217
+ <label v-for="column in toggleableColumns" :key="column.id" v-bind="columnToggleItemProps">
218
+ <Checkbox :model-value="column.getIsVisible()" @update:model-value="column.toggleVisibility()" />
219
+ {{ typeof column.columnDef.header === "string" ? column.columnDef.header : column.id }}
220
+ </label>
221
+ </div>
222
+ </div>
223
+ </div>
224
+
225
+ <div ref="wrapperEl" v-bind="wrapperProps" :style="scrollHeight ? { maxHeight: scrollHeight } : void 0">
226
+ <table v-bind="tableProps">
227
+ <thead v-bind="theadProps">
228
+ <tr v-for="headerGroup in table.getHeaderGroups()" :key="headerGroup.id" v-bind="trProps">
229
+ <template v-for="header in headerGroup.headers" :key="header.id">
230
+ <th
231
+ v-if="header.rowSpan !== 0"
232
+ :ref="(el) => setHeaderRef(header.column.id, el)"
233
+ :colspan="header.colSpan"
234
+ :rowspan="header.rowSpan"
235
+ v-bind="thProps"
236
+ :class="header.column.getCanSort() ? thSortableClass : void 0"
237
+ :data-pinned="header.column.getIsPinned() || void 0"
238
+ :style="pinnedStyle(header)"
239
+ :tabindex="header.column.getCanSort() ? 0 : void 0"
240
+ :aria-sort="header.column.getIsSorted() === 'asc' ? 'ascending' : header.column.getIsSorted() === 'desc' ? 'descending' : header.column.getCanSort() ? 'none' : void 0"
241
+ @click="header.column.getToggleSortingHandler()?.($event)"
242
+ @keydown.enter="header.column.getToggleSortingHandler()?.($event)"
243
+ @keydown.space.prevent="header.column.getToggleSortingHandler()?.($event)"
244
+ >
245
+ <template v-if="!header.isPlaceholder || header.rowSpan > 1">
246
+ <FlexRender :header="header" />
247
+ <Icon
248
+ v-if="header.column.getIsSorted() === 'asc'"
249
+ :name="icons.sortAscending"
250
+ v-bind="sortIconProps"
251
+ />
252
+ <Icon
253
+ v-else-if="header.column.getIsSorted() === 'desc'"
254
+ :name="icons.sortDescending"
255
+ v-bind="sortIconProps"
256
+ />
257
+ <div v-if="header.column.getCanFilter()">
258
+ <Input
259
+ size="sm"
260
+ :model-value="header.column.getFilterValue() ?? ''"
261
+ :placeholder="messages.filterPlaceholder"
262
+ v-bind="filterInputProps"
263
+ @click.stop
264
+ @update:model-value="(value) => header.column.setFilterValue(value)"
265
+ />
266
+ </div>
267
+ </template>
268
+ </th>
269
+ </template>
270
+ </tr>
271
+ </thead>
272
+
273
+ <tbody v-if="table.getRowModel().rows.length">
274
+ <tr v-if="virtualizeConfig && virtualPaddingTop > 0">
275
+ <td :colspan="table.getVisibleLeafColumns().length" :style="{ height: `${virtualPaddingTop}px`, padding: 0, border: 0 }" />
276
+ </tr>
277
+ <template v-for="row in visibleRows" :key="row.id">
278
+ <tr
279
+ v-bind="bodyRowProps(row.original)"
280
+ @click="onRowClick(row.original, $event)"
281
+ @contextmenu="onRowContextmenu(row.original, $event)"
282
+ >
283
+ <td
284
+ v-for="cell in row.getVisibleCells()"
285
+ :key="cell.id"
286
+ v-bind="tdProps"
287
+ :data-pinned="cell.column.getIsPinned() || void 0"
288
+ :style="pinnedStyle(cell)"
289
+ >
290
+ <FlexRender :cell="cell" />
291
+ </td>
292
+ </tr>
293
+ <tr v-if="row.getIsExpanded()" v-bind="expandedRowProps">
294
+ <td :colspan="row.getVisibleCells().length" v-bind="expandedCellProps">
295
+ <slot name="expanded" :row="row.original" />
296
+ </td>
297
+ </tr>
298
+ </template>
299
+ <tr v-if="virtualizeConfig && virtualPaddingBottom > 0">
300
+ <td :colspan="table.getVisibleLeafColumns().length" :style="{ height: `${virtualPaddingBottom}px`, padding: 0, border: 0 }" />
301
+ </tr>
302
+ </tbody>
303
+
304
+ <tfoot v-if="hasFooter" v-bind="tfootProps">
305
+ <tr v-for="footerGroup in table.getFooterGroups()" :key="footerGroup.id" v-bind="trProps">
306
+ <th v-for="header in footerGroup.headers" :key="header.id" :colspan="header.colSpan" v-bind="thProps">
307
+ <FlexRender v-if="!header.isPlaceholder" :footer="header" />
308
+ </th>
309
+ </tr>
310
+ </tfoot>
311
+ </table>
312
+
313
+ <div v-if="!table.getRowModel().rows.length" v-bind="emptyStateProps">
314
+ <slot name="empty">
315
+ {{ messages.noData }}
316
+ </slot>
317
+ </div>
318
+ </div>
319
+
320
+ <div v-if="loading" v-bind="loadingOverlayProps">
321
+ <Icon :name="icons.loading" v-bind="loadingIconProps" />
322
+ </div>
323
+
324
+ <div v-if="!manualPagination && table.getPageCount() > 1" v-bind="paginationWrapperProps">
325
+ <span v-bind="paginationInfoProps">
326
+ {{ messages.paginationInfo(pageIndex + 1, table.getPageCount()) }}
327
+ </span>
328
+ <div v-bind="paginationButtonsProps">
329
+ <Pagination
330
+ :page="pageIndex + 1"
331
+ :total="table.getFilteredRowModel().rows.length"
332
+ :items-per-page="effectivePageSize"
333
+ :size="size"
334
+ @update:page="(value) => table.setPageIndex(value - 1)"
335
+ />
336
+ </div>
337
+ </div>
338
+ </div>
339
+ </template>
@@ -0,0 +1,83 @@
1
+ import type { TableThemeSlots } from '../theme/table.js';
2
+ import type { UiProp } from '../utils/ui.js';
3
+ export interface TableProps {
4
+ data: unknown[];
5
+ columns?: any[];
6
+ selectable?: boolean;
7
+ pageSize?: number;
8
+ loading?: boolean;
9
+ sorting?: any[];
10
+ defaultSorting?: any[];
11
+ rowSelection?: Record<string, boolean>;
12
+ globalFilter?: string;
13
+ pageIndex?: number;
14
+ size?: 'sm' | 'md' | 'lg';
15
+ gridlines?: boolean;
16
+ striped?: boolean;
17
+ expandable?: boolean;
18
+ expanded?: any;
19
+ columnVisibility?: Record<string, boolean>;
20
+ columnToggle?: boolean;
21
+ /** Enables vertical scroll with a sticky header, capped at this CSS height (e.g. '24rem'). */
22
+ scrollHeight?: string;
23
+ virtualize?: boolean | {
24
+ estimateSize?: number;
25
+ overscan?: number;
26
+ };
27
+ /** Opts out of the local sorted/filtered/paginated row models - set when `data` is already sorted/filtered/paginated server-side, so this table doesn't redundantly (and incorrectly) reprocess an already-server-processed slice. `sorting`/`globalFilter`/`pageIndex` still drive the UI and still emit their `update:*` events the same way - only the *local row model* is skipped, not the state itself. `manualPagination` also suppresses the built-in Pagination UI entirely (there's no way to know the real page count from a server-paginated slice) - bring your own `SPagination`, bound to your own server metadata, the same way this table already expects you to bring your own search input for `globalFilter`. */
28
+ manualSorting?: boolean;
29
+ manualFiltering?: boolean;
30
+ manualPagination?: boolean;
31
+ /** Adds a class to a body row based on its own data - e.g. highlighting a flagged row. Called per row, not per render, so keep it cheap. */
32
+ rowClass?: (row: unknown) => string | undefined;
33
+ /** Same as `rowClass`, for inline styles. */
34
+ rowStyle?: (row: unknown) => Record<string, string> | undefined;
35
+ ui?: UiProp<TableThemeSlots>;
36
+ }
37
+ export interface TableEmits {
38
+ 'update:sorting': [value: any[]];
39
+ 'update:rowSelection': [value: Record<string, boolean>];
40
+ 'update:globalFilter': [value: string];
41
+ 'update:pageIndex': [value: number];
42
+ 'update:expanded': [value: any];
43
+ 'update:columnVisibility': [value: Record<string, boolean>];
44
+ 'rowClick': [row: unknown, event: MouseEvent];
45
+ 'rowContextmenu': [row: unknown, event: MouseEvent];
46
+ }
47
+ declare var __VLS_44: {
48
+ row: import("@tanstack/vue-table").RowData;
49
+ }, __VLS_51: {};
50
+ type __VLS_Slots = {} & {
51
+ expanded?: (props: typeof __VLS_44) => any;
52
+ } & {
53
+ empty?: (props: typeof __VLS_51) => any;
54
+ };
55
+ declare const __VLS_base: import("vue").DefineComponent<TableProps, {
56
+ exportCsv: (filename?: string) => void;
57
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
58
+ "update:sorting": (value: any[]) => any;
59
+ "update:rowSelection": (value: Record<string, boolean>) => any;
60
+ "update:globalFilter": (value: string) => any;
61
+ "update:pageIndex": (value: number) => any;
62
+ "update:expanded": (value: any) => any;
63
+ "update:columnVisibility": (value: Record<string, boolean>) => any;
64
+ rowClick: (row: unknown, event: MouseEvent) => any;
65
+ rowContextmenu: (row: unknown, event: MouseEvent) => any;
66
+ }, string, import("vue").PublicProps, Readonly<TableProps> & Readonly<{
67
+ "onUpdate:sorting"?: ((value: any[]) => any) | undefined;
68
+ "onUpdate:rowSelection"?: ((value: Record<string, boolean>) => any) | undefined;
69
+ "onUpdate:globalFilter"?: ((value: string) => any) | undefined;
70
+ "onUpdate:pageIndex"?: ((value: number) => any) | undefined;
71
+ "onUpdate:expanded"?: ((value: any) => any) | undefined;
72
+ "onUpdate:columnVisibility"?: ((value: Record<string, boolean>) => any) | undefined;
73
+ onRowClick?: ((row: unknown, event: MouseEvent) => any) | undefined;
74
+ onRowContextmenu?: ((row: unknown, event: MouseEvent) => any) | undefined;
75
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
76
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
77
+ declare const _default: typeof __VLS_export;
78
+ export default _default;
79
+ type __VLS_WithSlots<T, S> = T & {
80
+ new (): {
81
+ $slots: S;
82
+ };
83
+ };
@@ -0,0 +1,43 @@
1
+ import type { VariantProps } from 'tailwind-variants';
2
+ import type { TabsThemeSlots } from '../theme/tabs.js';
3
+ import type { UiProp } from '../utils/ui.js';
4
+ import { tabsTheme } from '../theme/tabs.js';
5
+ type TabsVariants = VariantProps<typeof tabsTheme>;
6
+ export interface TabItem {
7
+ label: string;
8
+ value?: string;
9
+ disabled?: boolean;
10
+ icon?: string;
11
+ }
12
+ export interface TabsProps {
13
+ items: TabItem[];
14
+ variant?: TabsVariants['variant'];
15
+ defaultValue?: string;
16
+ modelValue?: string;
17
+ ui?: UiProp<TabsThemeSlots>;
18
+ }
19
+ export interface TabsEmits {
20
+ 'update:modelValue': [value: string];
21
+ }
22
+ declare var __VLS_27: {
23
+ item: TabItem;
24
+ index: number;
25
+ }, __VLS_41: string, __VLS_42: {};
26
+ type __VLS_Slots = {} & {
27
+ [K in NonNullable<typeof __VLS_41>]?: (props: typeof __VLS_42) => any;
28
+ } & {
29
+ label?: (props: typeof __VLS_27) => any;
30
+ };
31
+ declare const __VLS_base: import("vue").DefineComponent<TabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ "update:modelValue": (value: string) => any;
33
+ }, string, import("vue").PublicProps, Readonly<TabsProps> & Readonly<{
34
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
35
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,60 @@
1
+ <script setup>
2
+ import { TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from "reka-ui";
3
+ import { computed } from "vue";
4
+ import { tabsTheme } from "../theme/tabs";
5
+ import { resolveSlot, useComponentTheme, useRootProps } from "../utils/ui";
6
+ import Icon from "./Icon.vue";
7
+ defineOptions({ inheritAttrs: false });
8
+ const props = defineProps({
9
+ items: { type: Array, required: true },
10
+ variant: { type: null, required: false },
11
+ defaultValue: { type: String, required: false },
12
+ modelValue: { type: String, required: false },
13
+ ui: { type: Object, required: false }
14
+ });
15
+ defineEmits(["update:modelValue"]);
16
+ const theme = useComponentTheme("tabs", tabsTheme);
17
+ const ui = computed(() => theme.value({ variant: props.variant }));
18
+ const rootProps = useRootProps(() => ui.value.root, () => props.ui?.root);
19
+ const listProps = computed(() => resolveSlot(ui.value.list, props.ui?.list));
20
+ const triggerProps = computed(() => resolveSlot(ui.value.trigger, props.ui?.trigger));
21
+ const iconProps = computed(() => resolveSlot(ui.value.icon, props.ui?.icon));
22
+ const indicatorProps = computed(() => resolveSlot(ui.value.indicator, props.ui?.indicator));
23
+ const contentProps = computed(() => resolveSlot(ui.value.content, props.ui?.content));
24
+ function itemValue(item, index) {
25
+ return item.value ?? String(index);
26
+ }
27
+ </script>
28
+
29
+ <template>
30
+ <TabsRoot
31
+ :default-value="defaultValue"
32
+ :model-value="modelValue"
33
+ v-bind="rootProps"
34
+ @update:model-value="(value) => $emit('update:modelValue', value)"
35
+ >
36
+ <TabsList v-bind="listProps">
37
+ <TabsTrigger
38
+ v-for="(item, index) in items"
39
+ :key="itemValue(item, index)"
40
+ :value="itemValue(item, index)"
41
+ :disabled="item.disabled"
42
+ v-bind="triggerProps"
43
+ >
44
+ <Icon v-if="item.icon" :name="item.icon" v-bind="iconProps" />
45
+ <slot name="label" :item="item" :index="index">
46
+ {{ item.label }}
47
+ </slot>
48
+ </TabsTrigger>
49
+ <TabsIndicator aria-hidden="true" v-bind="indicatorProps" />
50
+ </TabsList>
51
+ <TabsContent
52
+ v-for="(item, index) in items"
53
+ :key="itemValue(item, index)"
54
+ :value="itemValue(item, index)"
55
+ v-bind="contentProps"
56
+ >
57
+ <slot :name="itemValue(item, index)" />
58
+ </TabsContent>
59
+ </TabsRoot>
60
+ </template>
@@ -0,0 +1,43 @@
1
+ import type { VariantProps } from 'tailwind-variants';
2
+ import type { TabsThemeSlots } from '../theme/tabs.js';
3
+ import type { UiProp } from '../utils/ui.js';
4
+ import { tabsTheme } from '../theme/tabs.js';
5
+ type TabsVariants = VariantProps<typeof tabsTheme>;
6
+ export interface TabItem {
7
+ label: string;
8
+ value?: string;
9
+ disabled?: boolean;
10
+ icon?: string;
11
+ }
12
+ export interface TabsProps {
13
+ items: TabItem[];
14
+ variant?: TabsVariants['variant'];
15
+ defaultValue?: string;
16
+ modelValue?: string;
17
+ ui?: UiProp<TabsThemeSlots>;
18
+ }
19
+ export interface TabsEmits {
20
+ 'update:modelValue': [value: string];
21
+ }
22
+ declare var __VLS_27: {
23
+ item: TabItem;
24
+ index: number;
25
+ }, __VLS_41: string, __VLS_42: {};
26
+ type __VLS_Slots = {} & {
27
+ [K in NonNullable<typeof __VLS_41>]?: (props: typeof __VLS_42) => any;
28
+ } & {
29
+ label?: (props: typeof __VLS_27) => any;
30
+ };
31
+ declare const __VLS_base: import("vue").DefineComponent<TabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ "update:modelValue": (value: string) => any;
33
+ }, string, import("vue").PublicProps, Readonly<TabsProps> & Readonly<{
34
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
35
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,45 @@
1
+ import type { VariantProps } from 'tailwind-variants';
2
+ import type { TextareaThemeSlots } from '../theme/textarea.js';
3
+ import type { UiProp } from '../utils/ui.js';
4
+ import { textareaTheme } from '../theme/textarea.js';
5
+ type TextareaVariants = VariantProps<typeof textareaTheme>;
6
+ export interface TextareaProps {
7
+ id?: string;
8
+ name?: string;
9
+ modelValue?: string;
10
+ placeholder?: string;
11
+ rows?: number;
12
+ size?: TextareaVariants['size'];
13
+ disabled?: boolean;
14
+ invalid?: boolean;
15
+ /** The focus-ring color - the resting (unfocused) ring stays neutral regardless. */
16
+ color?: TextareaVariants['color'];
17
+ clearable?: boolean;
18
+ icon?: string;
19
+ trailingIcon?: string;
20
+ /** Grows the box to fit its content instead of a fixed height + scrollbar/drag-handle. */
21
+ autoresize?: boolean;
22
+ /** autoresize only - caps how many rows it can grow to before switching to a scrollbar (0/unset grows indefinitely). */
23
+ maxrows?: number;
24
+ ui?: UiProp<TextareaThemeSlots>;
25
+ }
26
+ export interface TextareaEmits {
27
+ 'update:modelValue': [value: string];
28
+ }
29
+ declare var __VLS_15: {};
30
+ type __VLS_Slots = {} & {
31
+ 'clear-icon'?: (props: typeof __VLS_15) => any;
32
+ };
33
+ declare const __VLS_base: import("vue").DefineComponent<TextareaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
+ "update:modelValue": (value: string) => any;
35
+ }, string, import("vue").PublicProps, Readonly<TextareaProps> & Readonly<{
36
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
37
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
39
+ declare const _default: typeof __VLS_export;
40
+ export default _default;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };