@aleph-alpha/ui-library 1.12.0 → 1.14.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 (891) hide show
  1. package/README.md +79 -2
  2. package/config.d.ts +185 -1
  3. package/config.js +582 -6
  4. package/dist/system/index.d.ts +2933 -739
  5. package/dist/system/lib.js +29220 -25434
  6. package/package.json +3 -2
  7. package/src/__tests__/test-utils.ts +46 -0
  8. package/src/components/UiAccordion/UiAccordion.stories.ts +500 -0
  9. package/src/components/UiAccordion/UiAccordion.vue +31 -0
  10. package/src/components/UiAccordion/UiAccordionContent.vue +16 -0
  11. package/src/components/UiAccordion/UiAccordionItem.vue +16 -0
  12. package/src/components/UiAccordion/UiAccordionTrigger.vue +23 -0
  13. package/src/components/UiAccordion/types.ts +94 -0
  14. package/src/components/UiAlert/UiAlert.stories.ts +199 -0
  15. package/src/components/UiAlert/UiAlert.vue +27 -0
  16. package/src/components/UiAlert/UiAlertDescription.vue +13 -0
  17. package/src/components/UiAlert/UiAlertTitle.vue +13 -0
  18. package/src/components/UiAlert/types.ts +15 -0
  19. package/src/components/UiAlertDialog/UiAlertDialog.stories.ts +186 -0
  20. package/src/components/UiAlertDialog/UiAlertDialog.vue +18 -0
  21. package/src/components/UiAlertDialog/UiAlertDialogAction.vue +16 -0
  22. package/src/components/UiAlertDialog/UiAlertDialogCancel.vue +16 -0
  23. package/src/components/UiAlertDialog/UiAlertDialogContent.vue +26 -0
  24. package/src/components/UiAlertDialog/UiAlertDialogDescription.vue +16 -0
  25. package/src/components/UiAlertDialog/UiAlertDialogFooter.vue +13 -0
  26. package/src/components/UiAlertDialog/UiAlertDialogHeader.vue +16 -0
  27. package/src/components/UiAlertDialog/UiAlertDialogTitle.vue +16 -0
  28. package/src/components/UiAlertDialog/UiAlertDialogTrigger.vue +17 -0
  29. package/src/components/UiAlertDialog/index.ts +10 -0
  30. package/src/components/UiAlertDialog/types.ts +83 -0
  31. package/src/components/UiAvatar/UiAvatar.stories.ts +194 -0
  32. package/src/components/UiAvatar/UiAvatar.vue +13 -0
  33. package/src/components/UiAvatar/UiAvatarFallback.vue +13 -0
  34. package/src/components/UiAvatar/UiAvatarImage.vue +14 -0
  35. package/src/components/UiAvatar/index.ts +4 -0
  36. package/src/components/UiAvatar/types.ts +20 -0
  37. package/src/components/UiBadge/UiBadge.stories.ts +373 -0
  38. package/src/components/UiBadge/UiBadge.vue +21 -0
  39. package/src/components/UiBadge/__tests__/UiBadge.test.ts +34 -0
  40. package/src/components/UiBadge/types.ts +47 -0
  41. package/src/components/UiButton/UiButton.stories.ts +537 -0
  42. package/src/components/UiButton/UiButton.vue +72 -0
  43. package/src/components/UiButton/__tests__/UiButton.test.ts +124 -0
  44. package/src/components/UiButton/types.ts +86 -0
  45. package/src/components/UiCalendar/UiCalendar.stories.ts +797 -0
  46. package/src/components/UiCalendar/UiCalendar.vue +67 -0
  47. package/src/components/UiCalendar/types.ts +235 -0
  48. package/src/components/UiCard/UiCard.stories.ts +197 -0
  49. package/src/components/UiCard/UiCard.vue +13 -0
  50. package/src/components/UiCard/UiCardAction.vue +13 -0
  51. package/src/components/UiCard/UiCardContent.vue +13 -0
  52. package/src/components/UiCard/UiCardDescription.vue +13 -0
  53. package/src/components/UiCard/UiCardFooter.vue +13 -0
  54. package/src/components/UiCard/UiCardHeader.vue +13 -0
  55. package/src/components/UiCard/UiCardTitle.vue +13 -0
  56. package/src/components/UiCard/index.ts +10 -0
  57. package/src/components/UiCard/types.ts +9 -0
  58. package/src/components/UiCheckbox/UiCheckbox.stories.ts +231 -0
  59. package/src/components/UiCheckbox/UiCheckbox.vue +19 -0
  60. package/src/components/UiCheckbox/types.ts +29 -0
  61. package/src/components/UiDrawer/UiDrawer.stories.ts +602 -0
  62. package/src/components/UiDrawer/UiDrawer.vue +19 -0
  63. package/src/components/UiDrawer/UiDrawerClose.vue +16 -0
  64. package/src/components/UiDrawer/UiDrawerContent.vue +29 -0
  65. package/src/components/UiDrawer/UiDrawerDescription.vue +16 -0
  66. package/src/components/UiDrawer/UiDrawerFooter.vue +16 -0
  67. package/src/components/UiDrawer/UiDrawerHeader.vue +16 -0
  68. package/src/components/UiDrawer/UiDrawerTitle.vue +16 -0
  69. package/src/components/UiDrawer/UiDrawerTrigger.vue +16 -0
  70. package/src/components/UiDrawer/index.ts +9 -0
  71. package/src/components/UiDrawer/types.ts +126 -0
  72. package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +760 -0
  73. package/src/components/UiDropdownMenu/UiDropdownMenu.vue +25 -0
  74. package/src/components/UiDropdownMenu/UiDropdownMenuCheckboxItem.vue +30 -0
  75. package/src/components/UiDropdownMenu/UiDropdownMenuContent.vue +27 -0
  76. package/src/components/UiDropdownMenu/UiDropdownMenuGroup.vue +13 -0
  77. package/src/components/UiDropdownMenu/UiDropdownMenuItem.vue +26 -0
  78. package/src/components/UiDropdownMenu/UiDropdownMenuLabel.vue +18 -0
  79. package/src/components/UiDropdownMenu/UiDropdownMenuRadioGroup.vue +20 -0
  80. package/src/components/UiDropdownMenu/UiDropdownMenuRadioItem.vue +26 -0
  81. package/src/components/UiDropdownMenu/UiDropdownMenuSeparator.vue +11 -0
  82. package/src/components/UiDropdownMenu/UiDropdownMenuShortcut.vue +13 -0
  83. package/src/components/UiDropdownMenu/UiDropdownMenuSub.vue +26 -0
  84. package/src/components/UiDropdownMenu/UiDropdownMenuSubContent.vue +23 -0
  85. package/src/components/UiDropdownMenu/UiDropdownMenuSubTrigger.vue +24 -0
  86. package/src/components/UiDropdownMenu/UiDropdownMenuTrigger.vue +24 -0
  87. package/src/components/UiDropdownMenu/types.ts +279 -0
  88. package/src/components/UiEmpty/UiEmpty.stories.ts +240 -0
  89. package/src/components/UiEmpty/UiEmpty.vue +35 -0
  90. package/src/components/UiEmpty/__tests__/UiEmpty.test.ts +67 -0
  91. package/src/components/UiEmpty/index.ts +2 -0
  92. package/src/components/UiEmpty/types.ts +26 -0
  93. package/src/components/UiField/UiField.stories.ts +1495 -0
  94. package/src/components/UiField/UiField.vue +18 -0
  95. package/src/components/UiField/UiFieldContent.vue +13 -0
  96. package/src/components/UiField/UiFieldDescription.vue +13 -0
  97. package/src/components/UiField/UiFieldError.vue +20 -0
  98. package/src/components/UiField/UiFieldGroup.vue +13 -0
  99. package/src/components/UiField/UiFieldLabel.vue +16 -0
  100. package/src/components/UiField/UiFieldLegend.vue +13 -0
  101. package/src/components/UiField/UiFieldSeparator.vue +13 -0
  102. package/src/components/UiField/UiFieldSet.vue +13 -0
  103. package/src/components/UiField/UiFieldTitle.vue +13 -0
  104. package/src/components/UiField/index.ts +11 -0
  105. package/src/components/UiField/types.ts +52 -0
  106. package/src/components/UiIcon/UiIcon.stories.ts +140 -0
  107. package/src/components/UiIcon/UiIcon.vue +67 -0
  108. package/src/components/UiIcon/types.ts +33 -0
  109. package/src/components/UiIconButton/UiIconButton.stories.ts +446 -0
  110. package/src/components/UiIconButton/UiIconButton.vue +63 -0
  111. package/src/components/UiIconButton/__tests__/UiIconButton.test.ts +95 -0
  112. package/src/components/UiIconButton/types.ts +66 -0
  113. package/src/components/UiInput/UiInput.stories.ts +193 -0
  114. package/src/components/UiInput/UiInput.vue +19 -0
  115. package/src/components/UiInput/types.ts +30 -0
  116. package/src/components/UiItem/UiItem.stories.ts +1029 -0
  117. package/src/components/UiItem/UiItem.vue +20 -0
  118. package/src/components/UiItem/UiItemMedia.vue +18 -0
  119. package/src/components/UiItem/__tests__/UiItem.test.ts +446 -0
  120. package/src/components/UiItem/constants.ts +13 -0
  121. package/src/components/UiItem/index.ts +15 -0
  122. package/src/components/UiItem/types.ts +114 -0
  123. package/src/components/UiKbd/UiKbd.stories.ts +546 -0
  124. package/src/components/UiKbd/UiKbd.vue +57 -0
  125. package/src/components/UiKbd/UiKbdGroup.vue +13 -0
  126. package/src/components/UiKbd/types.ts +25 -0
  127. package/src/components/UiLabel/UiLabel.stories.ts +192 -0
  128. package/src/components/UiLabel/UiLabel.vue +16 -0
  129. package/src/components/UiLabel/types.ts +15 -0
  130. package/src/components/UiListbox/UiListbox.stories.ts +607 -0
  131. package/src/components/UiListbox/UiListbox.vue +33 -0
  132. package/src/components/UiListbox/UiListboxContent.vue +13 -0
  133. package/src/components/UiListbox/UiListboxFilter.vue +16 -0
  134. package/src/components/UiListbox/UiListboxGroup.vue +13 -0
  135. package/src/components/UiListbox/UiListboxGroupLabel.vue +13 -0
  136. package/src/components/UiListbox/UiListboxItem.vue +21 -0
  137. package/src/components/UiListbox/UiListboxItemIndicator.vue +13 -0
  138. package/src/components/UiListbox/types.ts +109 -0
  139. package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +1196 -0
  140. package/src/components/UiNavigationMenu/UiNavigationMenu.vue +39 -0
  141. package/src/components/UiNavigationMenu/UiNavigationMenuContent.vue +25 -0
  142. package/src/components/UiNavigationMenu/UiNavigationMenuIndicator.vue +14 -0
  143. package/src/components/UiNavigationMenu/UiNavigationMenuItem.vue +16 -0
  144. package/src/components/UiNavigationMenu/UiNavigationMenuLink.vue +27 -0
  145. package/src/components/UiNavigationMenu/UiNavigationMenuList.vue +16 -0
  146. package/src/components/UiNavigationMenu/UiNavigationMenuTrigger.vue +16 -0
  147. package/src/components/UiNavigationMenu/__tests__/UiNavigationMenu.test.ts +428 -0
  148. package/src/components/UiNavigationMenu/index.ts +11 -0
  149. package/src/components/UiNavigationMenu/types.ts +185 -0
  150. package/src/components/UiPopover/UiPopover.stories.ts +410 -0
  151. package/src/components/UiPopover/UiPopover.vue +17 -0
  152. package/src/components/UiPopover/UiPopoverContent.vue +27 -0
  153. package/src/components/UiPopover/UiPopoverTrigger.vue +16 -0
  154. package/src/components/UiPopover/types.ts +98 -0
  155. package/src/components/UiProgress/UiProgress.stories.ts +92 -0
  156. package/src/components/UiProgress/UiProgress.vue +25 -0
  157. package/src/components/UiProgress/types.ts +15 -0
  158. package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +291 -0
  159. package/src/components/UiRadioGroup/UiRadioGroup.vue +43 -0
  160. package/src/components/UiRadioGroup/UiRadioGroupItem.vue +18 -0
  161. package/src/components/UiRadioGroup/types.ts +71 -0
  162. package/src/components/UiRangeCalendar/UiRangeCalendar.stories.ts +609 -0
  163. package/src/components/UiRangeCalendar/UiRangeCalendar.vue +50 -0
  164. package/src/components/UiRangeCalendar/types.ts +183 -0
  165. package/src/components/UiSelect/UiSelect.stories.ts +444 -0
  166. package/src/components/UiSelect/UiSelect.vue +47 -0
  167. package/src/components/UiSelect/UiSelectContent.vue +30 -0
  168. package/src/components/UiSelect/UiSelectGroup.vue +13 -0
  169. package/src/components/UiSelect/UiSelectItem.vue +19 -0
  170. package/src/components/UiSelect/UiSelectLabel.vue +13 -0
  171. package/src/components/UiSelect/UiSelectSeparator.vue +11 -0
  172. package/src/components/UiSelect/UiSelectTrigger.vue +30 -0
  173. package/src/components/UiSelect/UiSelectValue.vue +18 -0
  174. package/src/components/UiSelect/types.ts +92 -0
  175. package/src/components/UiSeparator/UiSeparator.stories.ts +177 -0
  176. package/src/components/UiSeparator/UiSeparator.vue +17 -0
  177. package/src/components/UiSeparator/types.ts +22 -0
  178. package/src/components/UiSheet/UiSheet.stories.ts +715 -0
  179. package/src/components/UiSheet/__tests__/UiSheet.test.ts +229 -0
  180. package/src/components/UiSheet/index.ts +12 -0
  181. package/src/components/UiSheet/types.ts +83 -0
  182. package/src/components/UiSidebar/UiSidebar.stories.ts +1010 -0
  183. package/src/components/UiSidebar/UiSidebar.vue +20 -0
  184. package/src/components/UiSidebar/UiSidebarGroupAction.vue +18 -0
  185. package/src/components/UiSidebar/UiSidebarGroupLabel.vue +18 -0
  186. package/src/components/UiSidebar/UiSidebarHeaderTrigger.vue +53 -0
  187. package/src/components/UiSidebar/UiSidebarInput.vue +14 -0
  188. package/src/components/UiSidebar/UiSidebarMenuAction.vue +19 -0
  189. package/src/components/UiSidebar/UiSidebarMenuButton.vue +27 -0
  190. package/src/components/UiSidebar/UiSidebarMenuSkeleton.vue +16 -0
  191. package/src/components/UiSidebar/UiSidebarMenuSubButton.vue +24 -0
  192. package/src/components/UiSidebar/UiSidebarProvider.vue +18 -0
  193. package/src/components/UiSidebar/UiSidebarSeparator.vue +13 -0
  194. package/src/components/UiSidebar/__tests__/UiSidebar.test.ts +221 -0
  195. package/src/components/UiSidebar/index.ts +34 -0
  196. package/src/components/UiSidebar/types.ts +168 -0
  197. package/src/components/UiSkeleton/UiSkeleton.stories.ts +247 -0
  198. package/src/components/UiSkeleton/UiSkeleton.vue +24 -0
  199. package/src/components/UiSkeleton/types.ts +25 -0
  200. package/src/components/UiSlider/UiSlider.stories.ts +226 -0
  201. package/src/components/UiSlider/UiSlider.vue +44 -0
  202. package/src/components/UiSlider/__tests__/UiSlider.test.ts +76 -0
  203. package/src/components/UiSlider/index.ts +2 -0
  204. package/src/components/UiSlider/types.ts +100 -0
  205. package/src/components/UiSpinner/UiSpinner.stories.ts +143 -0
  206. package/src/components/UiSpinner/UiSpinner.vue +16 -0
  207. package/src/components/UiSpinner/types.ts +15 -0
  208. package/src/components/UiStepper/UiStepper.stories.ts +425 -0
  209. package/src/components/UiStepper/UiStepper.vue +27 -0
  210. package/src/components/UiStepper/UiStepperDescription.vue +20 -0
  211. package/src/components/UiStepper/UiStepperIndicator.vue +13 -0
  212. package/src/components/UiStepper/UiStepperItem.vue +25 -0
  213. package/src/components/UiStepper/UiStepperSeparator.vue +17 -0
  214. package/src/components/UiStepper/UiStepperTitle.vue +19 -0
  215. package/src/components/UiStepper/UiStepperTrigger.vue +18 -0
  216. package/src/components/UiStepper/__tests__/UiStepper.test.ts +167 -0
  217. package/src/components/UiStepper/index.ts +9 -0
  218. package/src/components/UiStepper/types.ts +65 -0
  219. package/src/components/UiSwitch/UiSwitch.stories.ts +120 -0
  220. package/src/components/UiSwitch/UiSwitch.vue +21 -0
  221. package/src/components/UiSwitch/types.ts +24 -0
  222. package/src/components/UiTable/UiTable.stories.ts +505 -0
  223. package/src/components/UiTable/UiTable.vue +13 -0
  224. package/src/components/UiTable/UiTableBody.vue +13 -0
  225. package/src/components/UiTable/UiTableCaption.vue +13 -0
  226. package/src/components/UiTable/UiTableCell.vue +16 -0
  227. package/src/components/UiTable/UiTableEmpty.vue +18 -0
  228. package/src/components/UiTable/UiTableFooter.vue +13 -0
  229. package/src/components/UiTable/UiTableHead.vue +18 -0
  230. package/src/components/UiTable/UiTableHeader.vue +13 -0
  231. package/src/components/UiTable/UiTableRow.vue +18 -0
  232. package/src/components/UiTable/types.ts +67 -0
  233. package/src/components/UiTabs/UiTabs.stories.ts +475 -0
  234. package/src/components/UiTabs/UiTabs.vue +31 -0
  235. package/src/components/UiTabs/UiTabsContent.vue +16 -0
  236. package/src/components/UiTabs/UiTabsList.vue +16 -0
  237. package/src/components/UiTabs/UiTabsTrigger.vue +16 -0
  238. package/src/components/UiTabs/types.ts +67 -0
  239. package/src/components/UiTagsInput/UiTagsInput.stories.ts +538 -0
  240. package/src/components/UiTagsInput/UiTagsInput.vue +20 -0
  241. package/src/components/UiTagsInput/UiTagsInputInput.vue +14 -0
  242. package/src/components/UiTagsInput/UiTagsInputItem.vue +16 -0
  243. package/src/components/UiTagsInput/UiTagsInputItemDelete.vue +13 -0
  244. package/src/components/UiTagsInput/UiTagsInputItemText.vue +11 -0
  245. package/src/components/UiTagsInput/types.ts +51 -0
  246. package/src/components/UiTextarea/UiTextarea.stories.ts +107 -0
  247. package/src/components/UiTextarea/UiTextarea.vue +19 -0
  248. package/src/components/UiTextarea/types.ts +29 -0
  249. package/src/components/UiToggle/UiToggle.stories.ts +370 -0
  250. package/src/components/UiToggle/UiToggle.vue +28 -0
  251. package/src/components/UiToggle/types.ts +34 -0
  252. package/src/components/UiToggleGroup/UiToggleGroup.stories.ts +441 -0
  253. package/src/components/UiToggleGroup/UiToggleGroup.vue +52 -0
  254. package/src/components/UiToggleGroup/UiToggleGroupItem.vue +21 -0
  255. package/src/components/UiToggleGroup/__tests__/UiToggleGroup.test.ts +394 -0
  256. package/src/components/UiToggleGroup/index.ts +3 -0
  257. package/src/components/UiToggleGroup/types.ts +132 -0
  258. package/src/components/UiTooltip/UiTooltip.stories.ts +550 -0
  259. package/src/components/UiTooltip/UiTooltip.vue +42 -0
  260. package/src/components/UiTooltip/index.ts +10 -0
  261. package/src/components/UiTooltip/types.ts +52 -0
  262. package/src/components/core/accordion/Accordion.vue +15 -0
  263. package/src/components/core/accordion/AccordionItem.vue +24 -0
  264. package/src/components/core/accordion/AccordionTrigger.vue +36 -0
  265. package/src/components/core/alert/index.ts +24 -0
  266. package/src/components/core/alert-dialog/AlertDialogAction.vue +18 -0
  267. package/src/components/core/alert-dialog/AlertDialogCancel.vue +21 -0
  268. package/src/components/core/alert-dialog/AlertDialogContent.vue +44 -0
  269. package/src/components/core/badge/index.ts +24 -0
  270. package/src/components/core/button/index.ts +36 -0
  271. package/src/components/core/calendar/Calendar.vue +206 -0
  272. package/src/components/core/calendar/CalendarCellTrigger.vue +44 -0
  273. package/src/components/core/calendar/CalendarNextButton.vue +33 -0
  274. package/src/components/core/calendar/CalendarPrevButton.vue +33 -0
  275. package/src/components/core/card/Card.vue +22 -0
  276. package/src/components/core/checkbox/Checkbox.vue +38 -0
  277. package/src/components/core/drawer/DrawerContent.vue +52 -0
  278. package/src/components/core/dropdown-menu/DropdownMenuCheckboxItem.vue +41 -0
  279. package/src/components/core/dropdown-menu/DropdownMenuContent.vue +40 -0
  280. package/src/components/core/dropdown-menu/DropdownMenuItem.vue +41 -0
  281. package/src/components/core/dropdown-menu/DropdownMenuRadioItem.vue +38 -0
  282. package/src/components/core/dropdown-menu/DropdownMenuSubContent.vue +29 -0
  283. package/src/components/core/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
  284. package/src/components/core/field/FieldError.vue +69 -0
  285. package/src/components/core/field/FieldLabel.vue +28 -0
  286. package/src/components/core/field/FieldSeparator.vue +28 -0
  287. package/src/components/core/index.ts +4 -0
  288. package/src/components/core/input/Input.vue +35 -0
  289. package/src/components/core/item/Item.vue +33 -0
  290. package/src/components/core/item/ItemActions.vue +14 -0
  291. package/src/components/core/item/ItemContent.vue +17 -0
  292. package/src/components/core/item/ItemDescription.vue +23 -0
  293. package/src/components/core/item/ItemFooter.vue +17 -0
  294. package/src/components/core/item/ItemGroup.vue +18 -0
  295. package/src/components/core/item/ItemHeader.vue +17 -0
  296. package/src/components/core/item/ItemMedia.vue +21 -0
  297. package/src/components/core/item/ItemSeparator.vue +12 -0
  298. package/src/components/core/item/ItemTitle.vue +17 -0
  299. package/src/components/core/item/index.ts +53 -0
  300. package/src/components/core/listbox/ListboxItem.vue +32 -0
  301. package/src/components/core/native-select/NativeSelect.vue +57 -0
  302. package/src/components/core/native-select/NativeSelectOptGroup.vue +18 -0
  303. package/src/components/core/native-select/NativeSelectOption.vue +18 -0
  304. package/src/components/core/navigation-menu/NavigationMenu.vue +40 -0
  305. package/src/components/core/navigation-menu/NavigationMenuContent.vue +28 -0
  306. package/src/components/core/navigation-menu/NavigationMenuIndicator.vue +26 -0
  307. package/src/components/core/navigation-menu/NavigationMenuItem.vue +19 -0
  308. package/src/components/core/navigation-menu/NavigationMenuLink.vue +27 -0
  309. package/src/components/core/navigation-menu/NavigationMenuList.vue +21 -0
  310. package/src/components/core/navigation-menu/NavigationMenuTrigger.vue +27 -0
  311. package/src/components/core/navigation-menu/NavigationMenuViewport.vue +26 -0
  312. package/src/components/core/navigation-menu/index.ts +14 -0
  313. package/src/components/core/popover/PopoverContent.vue +41 -0
  314. package/src/components/core/radio-group/RadioGroupItem.vue +37 -0
  315. package/src/components/core/range-calendar/RangeCalendar.vue +73 -0
  316. package/src/components/core/range-calendar/RangeCalendarCellTrigger.vue +48 -0
  317. package/src/components/core/range-calendar/RangeCalendarHeading.vue +30 -0
  318. package/src/components/core/range-calendar/RangeCalendarNextButton.vue +34 -0
  319. package/src/components/core/range-calendar/RangeCalendarPrevButton.vue +34 -0
  320. package/src/components/core/select/Select.vue +15 -0
  321. package/src/components/core/select/SelectContent.vue +55 -0
  322. package/src/components/core/select/SelectItem.vue +39 -0
  323. package/src/components/core/select/SelectScrollDownButton.vue +26 -0
  324. package/src/components/core/select/SelectScrollUpButton.vue +26 -0
  325. package/src/components/core/select/SelectTrigger.vue +37 -0
  326. package/src/components/core/sheet/Sheet.vue +15 -0
  327. package/src/components/core/sheet/SheetClose.vue +12 -0
  328. package/src/components/core/sheet/SheetContent.vue +56 -0
  329. package/src/components/core/sheet/SheetDescription.vue +19 -0
  330. package/src/components/core/sheet/SheetFooter.vue +9 -0
  331. package/src/components/core/sheet/SheetHeader.vue +9 -0
  332. package/src/components/core/sheet/SheetOverlay.vue +24 -0
  333. package/src/components/core/sheet/SheetTitle.vue +19 -0
  334. package/src/components/core/sheet/SheetTrigger.vue +12 -0
  335. package/src/components/core/sheet/index.ts +8 -0
  336. package/src/components/core/sidebar/Sidebar.vue +105 -0
  337. package/src/components/core/sidebar/SidebarContent.vue +21 -0
  338. package/src/components/core/sidebar/SidebarFooter.vue +16 -0
  339. package/src/components/core/sidebar/SidebarGroup.vue +16 -0
  340. package/src/components/core/sidebar/SidebarGroupAction.vue +25 -0
  341. package/src/components/core/sidebar/SidebarGroupContent.vue +16 -0
  342. package/src/components/core/sidebar/SidebarGroupLabel.vue +23 -0
  343. package/src/components/core/sidebar/SidebarHeader.vue +16 -0
  344. package/src/components/core/sidebar/SidebarInput.vue +17 -0
  345. package/src/components/core/sidebar/SidebarInset.vue +21 -0
  346. package/src/components/core/sidebar/SidebarMenu.vue +16 -0
  347. package/src/components/core/sidebar/SidebarMenuAction.vue +33 -0
  348. package/src/components/core/sidebar/SidebarMenuBadge.vue +26 -0
  349. package/src/components/core/sidebar/SidebarMenuButton.vue +49 -0
  350. package/src/components/core/sidebar/SidebarMenuButtonChild.vue +36 -0
  351. package/src/components/core/sidebar/SidebarMenuItem.vue +16 -0
  352. package/src/components/core/sidebar/SidebarMenuSkeleton.vue +32 -0
  353. package/src/components/core/sidebar/SidebarMenuSub.vue +22 -0
  354. package/src/components/core/sidebar/SidebarMenuSubButton.vue +38 -0
  355. package/src/components/core/sidebar/SidebarMenuSubItem.vue +16 -0
  356. package/src/components/core/sidebar/SidebarProvider.vue +102 -0
  357. package/src/components/core/sidebar/SidebarRail.vue +33 -0
  358. package/src/components/core/sidebar/SidebarSeparator.vue +17 -0
  359. package/src/components/core/sidebar/SidebarTrigger.vue +25 -0
  360. package/src/components/core/sidebar/index.ts +58 -0
  361. package/src/components/core/sidebar/utils.ts +19 -0
  362. package/src/components/core/spinner/Spinner.vue +19 -0
  363. package/src/components/core/stepper/Stepper.vue +20 -0
  364. package/src/components/core/stepper/StepperDescription.vue +23 -0
  365. package/src/components/core/stepper/StepperIndicator.vue +34 -0
  366. package/src/components/core/stepper/StepperItem.vue +23 -0
  367. package/src/components/core/stepper/StepperSeparator.vue +29 -0
  368. package/src/components/core/stepper/StepperTitle.vue +24 -0
  369. package/src/components/core/stepper/StepperTrigger.vue +22 -0
  370. package/src/components/core/stepper/index.ts +7 -0
  371. package/src/components/core/switch/Switch.vue +40 -0
  372. package/src/components/core/table/TableRow.vue +24 -0
  373. package/src/components/core/tabs/Tabs.vue +24 -0
  374. package/src/components/core/tabs/TabsTrigger.vue +28 -0
  375. package/src/components/core/tags-input/TagsInput.vue +33 -0
  376. package/src/components/core/textarea/Textarea.vue +33 -0
  377. package/src/components/core/toggle/index.ts +26 -0
  378. package/src/components/core/toggle-group/ToggleGroup.vue +38 -0
  379. package/src/components/core/toggle-group/ToggleGroupItem.vue +37 -0
  380. package/src/components/core/toggle-group/context.ts +11 -0
  381. package/src/components/core/toggle-group/index.ts +28 -0
  382. package/src/components/core/tooltip/TooltipContent.vue +40 -0
  383. package/src/components/index.ts +45 -0
  384. package/src/index.ts +6 -10
  385. package/src/patterns/UiDataTable/UiDataTable.stories.ts +1577 -0
  386. package/src/patterns/UiDataTable/UiDataTable.vue +129 -0
  387. package/src/patterns/UiDataTable/UiDataTableColumnHeader.vue +96 -0
  388. package/src/patterns/UiDataTable/UiDataTablePagination.vue +119 -0
  389. package/src/patterns/UiDataTable/UiDataTableToolbar.vue +60 -0
  390. package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +372 -0
  391. package/src/patterns/UiDataTable/types.ts +116 -0
  392. package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +976 -0
  393. package/src/patterns/UiDatePicker/UiDatePicker.vue +193 -0
  394. package/src/patterns/UiDatePicker/types.ts +219 -0
  395. package/src/patterns/UiPlaceholder/types.ts +7 -0
  396. package/src/patterns/index.ts +7 -0
  397. package/src/templates/UiTemplatePlaceholder/types.ts +0 -1
  398. package/src/templates/index.ts +4 -5
  399. package/src/theme/Background.stories.ts +274 -0
  400. package/src/theme/Border.stories.ts +158 -0
  401. package/src/theme/Extended.stories.ts +268 -0
  402. package/src/theme/Flex.stories.ts +313 -0
  403. package/src/theme/Grid.stories.ts +302 -0
  404. package/src/theme/Overlay.stories.ts +124 -0
  405. package/src/theme/Theme.stories.ts +309 -0
  406. package/src/theme/Typography.stories.ts +230 -0
  407. package/tokens.json +11389 -0
  408. package/src/compositions/UiCompositionPlaceholder/UiCompositionPlaceholder.vue +0 -9
  409. package/src/compositions/UiCompositionPlaceholder/index.ts +0 -1
  410. package/src/compositions/UiCompositionPlaceholder/types.ts +0 -8
  411. package/src/compositions/UiDataTable/UiDataTable.stories.ts +0 -1574
  412. package/src/compositions/UiDataTable/UiDataTable.vue +0 -129
  413. package/src/compositions/UiDataTable/UiDataTableColumnHeader.vue +0 -111
  414. package/src/compositions/UiDataTable/UiDataTablePagination.vue +0 -147
  415. package/src/compositions/UiDataTable/UiDataTableToolbar.vue +0 -85
  416. package/src/compositions/UiDataTable/__tests__/UiDataTable.test.ts +0 -372
  417. package/src/compositions/UiDataTable/types.ts +0 -39
  418. package/src/compositions/UiDatePicker/UiDatePicker.stories.ts +0 -976
  419. package/src/compositions/UiDatePicker/UiDatePicker.vue +0 -193
  420. package/src/compositions/UiDatePicker/types.ts +0 -220
  421. package/src/compositions/index.ts +0 -8
  422. package/src/foundations/UiPlaceholder/types.ts +0 -8
  423. package/src/foundations/index.ts +0 -6
  424. package/src/primitives/UiAccordion/UiAccordion.stories.ts +0 -476
  425. package/src/primitives/UiAccordion/UiAccordion.vue +0 -31
  426. package/src/primitives/UiAccordion/UiAccordionContent.vue +0 -16
  427. package/src/primitives/UiAccordion/UiAccordionItem.vue +0 -16
  428. package/src/primitives/UiAccordion/UiAccordionTrigger.vue +0 -23
  429. package/src/primitives/UiAccordion/types.ts +0 -95
  430. package/src/primitives/UiAlert/UiAlert.stories.ts +0 -199
  431. package/src/primitives/UiAlert/UiAlert.vue +0 -27
  432. package/src/primitives/UiAlert/UiAlertDescription.vue +0 -13
  433. package/src/primitives/UiAlert/UiAlertTitle.vue +0 -13
  434. package/src/primitives/UiAlert/types.ts +0 -14
  435. package/src/primitives/UiAlertDialog/UiAlertDialog.stories.ts +0 -186
  436. package/src/primitives/UiAlertDialog/UiAlertDialog.vue +0 -18
  437. package/src/primitives/UiAlertDialog/UiAlertDialogAction.vue +0 -16
  438. package/src/primitives/UiAlertDialog/UiAlertDialogCancel.vue +0 -16
  439. package/src/primitives/UiAlertDialog/UiAlertDialogContent.vue +0 -26
  440. package/src/primitives/UiAlertDialog/UiAlertDialogDescription.vue +0 -16
  441. package/src/primitives/UiAlertDialog/UiAlertDialogFooter.vue +0 -13
  442. package/src/primitives/UiAlertDialog/UiAlertDialogHeader.vue +0 -16
  443. package/src/primitives/UiAlertDialog/UiAlertDialogTitle.vue +0 -16
  444. package/src/primitives/UiAlertDialog/UiAlertDialogTrigger.vue +0 -17
  445. package/src/primitives/UiAlertDialog/index.ts +0 -9
  446. package/src/primitives/UiAlertDialog/types.ts +0 -83
  447. package/src/primitives/UiAvatar/UiAvatar.stories.ts +0 -194
  448. package/src/primitives/UiAvatar/UiAvatar.vue +0 -13
  449. package/src/primitives/UiAvatar/UiAvatarFallback.vue +0 -13
  450. package/src/primitives/UiAvatar/UiAvatarImage.vue +0 -14
  451. package/src/primitives/UiAvatar/index.ts +0 -3
  452. package/src/primitives/UiAvatar/types.ts +0 -17
  453. package/src/primitives/UiBadge/UiBadge.stories.ts +0 -373
  454. package/src/primitives/UiBadge/UiBadge.vue +0 -21
  455. package/src/primitives/UiBadge/__tests__/UiBadge.test.ts +0 -44
  456. package/src/primitives/UiBadge/types.ts +0 -48
  457. package/src/primitives/UiButton/UiButton.stories.ts +0 -537
  458. package/src/primitives/UiButton/UiButton.vue +0 -72
  459. package/src/primitives/UiButton/__tests__/UiButton.test.ts +0 -133
  460. package/src/primitives/UiButton/types.ts +0 -87
  461. package/src/primitives/UiCalendar/UiCalendar.stories.ts +0 -797
  462. package/src/primitives/UiCalendar/UiCalendar.vue +0 -67
  463. package/src/primitives/UiCalendar/types.ts +0 -236
  464. package/src/primitives/UiCard/UiCard.stories.ts +0 -197
  465. package/src/primitives/UiCard/UiCard.vue +0 -13
  466. package/src/primitives/UiCard/UiCardAction.vue +0 -13
  467. package/src/primitives/UiCard/UiCardContent.vue +0 -13
  468. package/src/primitives/UiCard/UiCardDescription.vue +0 -13
  469. package/src/primitives/UiCard/UiCardFooter.vue +0 -13
  470. package/src/primitives/UiCard/UiCardHeader.vue +0 -13
  471. package/src/primitives/UiCard/UiCardTitle.vue +0 -13
  472. package/src/primitives/UiCard/index.ts +0 -7
  473. package/src/primitives/UiCard/types.ts +0 -10
  474. package/src/primitives/UiCheckbox/UiCheckbox.stories.ts +0 -231
  475. package/src/primitives/UiCheckbox/UiCheckbox.vue +0 -19
  476. package/src/primitives/UiCheckbox/types.ts +0 -30
  477. package/src/primitives/UiDrawer/UiDrawer.stories.ts +0 -602
  478. package/src/primitives/UiDrawer/UiDrawer.vue +0 -19
  479. package/src/primitives/UiDrawer/UiDrawerClose.vue +0 -16
  480. package/src/primitives/UiDrawer/UiDrawerContent.vue +0 -29
  481. package/src/primitives/UiDrawer/UiDrawerDescription.vue +0 -16
  482. package/src/primitives/UiDrawer/UiDrawerFooter.vue +0 -16
  483. package/src/primitives/UiDrawer/UiDrawerHeader.vue +0 -16
  484. package/src/primitives/UiDrawer/UiDrawerTitle.vue +0 -16
  485. package/src/primitives/UiDrawer/UiDrawerTrigger.vue +0 -16
  486. package/src/primitives/UiDrawer/index.ts +0 -8
  487. package/src/primitives/UiDrawer/types.ts +0 -96
  488. package/src/primitives/UiDropdownMenu/UiDropdownMenu.stories.ts +0 -760
  489. package/src/primitives/UiDropdownMenu/UiDropdownMenu.vue +0 -25
  490. package/src/primitives/UiDropdownMenu/UiDropdownMenuCheckboxItem.vue +0 -29
  491. package/src/primitives/UiDropdownMenu/UiDropdownMenuContent.vue +0 -27
  492. package/src/primitives/UiDropdownMenu/UiDropdownMenuGroup.vue +0 -13
  493. package/src/primitives/UiDropdownMenu/UiDropdownMenuItem.vue +0 -26
  494. package/src/primitives/UiDropdownMenu/UiDropdownMenuLabel.vue +0 -18
  495. package/src/primitives/UiDropdownMenu/UiDropdownMenuRadioGroup.vue +0 -20
  496. package/src/primitives/UiDropdownMenu/UiDropdownMenuRadioItem.vue +0 -26
  497. package/src/primitives/UiDropdownMenu/UiDropdownMenuSeparator.vue +0 -11
  498. package/src/primitives/UiDropdownMenu/UiDropdownMenuShortcut.vue +0 -13
  499. package/src/primitives/UiDropdownMenu/UiDropdownMenuSub.vue +0 -26
  500. package/src/primitives/UiDropdownMenu/UiDropdownMenuSubContent.vue +0 -23
  501. package/src/primitives/UiDropdownMenu/UiDropdownMenuSubTrigger.vue +0 -24
  502. package/src/primitives/UiDropdownMenu/UiDropdownMenuTrigger.vue +0 -24
  503. package/src/primitives/UiDropdownMenu/types.ts +0 -219
  504. package/src/primitives/UiField/UiField.stories.ts +0 -1496
  505. package/src/primitives/UiField/UiField.vue +0 -18
  506. package/src/primitives/UiField/UiFieldContent.vue +0 -13
  507. package/src/primitives/UiField/UiFieldDescription.vue +0 -13
  508. package/src/primitives/UiField/UiFieldError.vue +0 -20
  509. package/src/primitives/UiField/UiFieldGroup.vue +0 -13
  510. package/src/primitives/UiField/UiFieldLabel.vue +0 -16
  511. package/src/primitives/UiField/UiFieldLegend.vue +0 -13
  512. package/src/primitives/UiField/UiFieldSeparator.vue +0 -13
  513. package/src/primitives/UiField/UiFieldSet.vue +0 -13
  514. package/src/primitives/UiField/UiFieldTitle.vue +0 -13
  515. package/src/primitives/UiField/index.ts +0 -10
  516. package/src/primitives/UiField/types.ts +0 -47
  517. package/src/primitives/UiIcon/UiIcon.stories.ts +0 -141
  518. package/src/primitives/UiIcon/UiIcon.vue +0 -52
  519. package/src/primitives/UiIcon/types.ts +0 -42
  520. package/src/primitives/UiIconButton/UiIconButton.stories.ts +0 -446
  521. package/src/primitives/UiIconButton/UiIconButton.vue +0 -63
  522. package/src/primitives/UiIconButton/__tests__/UiIconButton.test.ts +0 -102
  523. package/src/primitives/UiIconButton/types.ts +0 -67
  524. package/src/primitives/UiInput/UiInput.stories.ts +0 -193
  525. package/src/primitives/UiInput/UiInput.vue +0 -19
  526. package/src/primitives/UiInput/types.ts +0 -31
  527. package/src/primitives/UiKbd/UiKbd.stories.ts +0 -551
  528. package/src/primitives/UiKbd/UiKbd.vue +0 -62
  529. package/src/primitives/UiKbd/UiKbdGroup.vue +0 -16
  530. package/src/primitives/UiKbd/types.ts +0 -32
  531. package/src/primitives/UiLabel/UiLabel.stories.ts +0 -192
  532. package/src/primitives/UiLabel/UiLabel.vue +0 -16
  533. package/src/primitives/UiLabel/types.ts +0 -16
  534. package/src/primitives/UiListbox/UiListbox.stories.ts +0 -607
  535. package/src/primitives/UiListbox/UiListbox.vue +0 -30
  536. package/src/primitives/UiListbox/UiListboxContent.vue +0 -16
  537. package/src/primitives/UiListbox/UiListboxFilter.vue +0 -16
  538. package/src/primitives/UiListbox/UiListboxGroup.vue +0 -16
  539. package/src/primitives/UiListbox/UiListboxGroupLabel.vue +0 -16
  540. package/src/primitives/UiListbox/UiListboxItem.vue +0 -20
  541. package/src/primitives/UiListbox/UiListboxItemIndicator.vue +0 -16
  542. package/src/primitives/UiListbox/types.ts +0 -119
  543. package/src/primitives/UiPopover/UiPopover.stories.ts +0 -394
  544. package/src/primitives/UiPopover/UiPopover.vue +0 -17
  545. package/src/primitives/UiPopover/UiPopoverContent.vue +0 -27
  546. package/src/primitives/UiPopover/UiPopoverTrigger.vue +0 -16
  547. package/src/primitives/UiPopover/types.ts +0 -86
  548. package/src/primitives/UiProgress/UiProgress.stories.ts +0 -92
  549. package/src/primitives/UiProgress/UiProgress.vue +0 -25
  550. package/src/primitives/UiProgress/types.ts +0 -16
  551. package/src/primitives/UiRadioGroup/UiRadioGroup.stories.ts +0 -291
  552. package/src/primitives/UiRadioGroup/UiRadioGroup.vue +0 -43
  553. package/src/primitives/UiRadioGroup/UiRadioGroupItem.vue +0 -18
  554. package/src/primitives/UiRadioGroup/types.ts +0 -66
  555. package/src/primitives/UiRangeCalendar/UiRangeCalendar.stories.ts +0 -609
  556. package/src/primitives/UiRangeCalendar/UiRangeCalendar.vue +0 -50
  557. package/src/primitives/UiRangeCalendar/types.ts +0 -184
  558. package/src/primitives/UiSelect/UiSelect.stories.ts +0 -425
  559. package/src/primitives/UiSelect/UiSelect.vue +0 -47
  560. package/src/primitives/UiSelect/UiSelectContent.vue +0 -30
  561. package/src/primitives/UiSelect/UiSelectGroup.vue +0 -13
  562. package/src/primitives/UiSelect/UiSelectItem.vue +0 -19
  563. package/src/primitives/UiSelect/UiSelectLabel.vue +0 -13
  564. package/src/primitives/UiSelect/UiSelectSeparator.vue +0 -11
  565. package/src/primitives/UiSelect/UiSelectTrigger.vue +0 -30
  566. package/src/primitives/UiSelect/UiSelectValue.vue +0 -18
  567. package/src/primitives/UiSelect/types.ts +0 -93
  568. package/src/primitives/UiSeparator/UiSeparator.stories.ts +0 -177
  569. package/src/primitives/UiSeparator/UiSeparator.vue +0 -17
  570. package/src/primitives/UiSeparator/types.ts +0 -23
  571. package/src/primitives/UiSkeleton/UiSkeleton.stories.ts +0 -247
  572. package/src/primitives/UiSkeleton/UiSkeleton.vue +0 -24
  573. package/src/primitives/UiSkeleton/types.ts +0 -26
  574. package/src/primitives/UiSlider/UiSlider.stories.ts +0 -226
  575. package/src/primitives/UiSlider/UiSlider.vue +0 -44
  576. package/src/primitives/UiSlider/__tests__/UiSlider.test.ts +0 -76
  577. package/src/primitives/UiSlider/index.ts +0 -1
  578. package/src/primitives/UiSlider/types.ts +0 -101
  579. package/src/primitives/UiSpinner/UiSpinner.stories.ts +0 -143
  580. package/src/primitives/UiSpinner/UiSpinner.vue +0 -16
  581. package/src/primitives/UiSpinner/types.ts +0 -16
  582. package/src/primitives/UiSwitch/UiSwitch.stories.ts +0 -120
  583. package/src/primitives/UiSwitch/UiSwitch.vue +0 -21
  584. package/src/primitives/UiSwitch/types.ts +0 -25
  585. package/src/primitives/UiTable/UiTable.stories.ts +0 -505
  586. package/src/primitives/UiTable/UiTable.vue +0 -13
  587. package/src/primitives/UiTable/UiTableBody.vue +0 -13
  588. package/src/primitives/UiTable/UiTableCaption.vue +0 -13
  589. package/src/primitives/UiTable/UiTableCell.vue +0 -16
  590. package/src/primitives/UiTable/UiTableEmpty.vue +0 -18
  591. package/src/primitives/UiTable/UiTableFooter.vue +0 -13
  592. package/src/primitives/UiTable/UiTableHead.vue +0 -18
  593. package/src/primitives/UiTable/UiTableHeader.vue +0 -13
  594. package/src/primitives/UiTable/UiTableRow.vue +0 -18
  595. package/src/primitives/UiTable/types.ts +0 -68
  596. package/src/primitives/UiTabs/UiTabs.stories.ts +0 -456
  597. package/src/primitives/UiTabs/UiTabs.vue +0 -31
  598. package/src/primitives/UiTabs/UiTabsContent.vue +0 -16
  599. package/src/primitives/UiTabs/UiTabsList.vue +0 -16
  600. package/src/primitives/UiTabs/UiTabsTrigger.vue +0 -16
  601. package/src/primitives/UiTabs/types.ts +0 -68
  602. package/src/primitives/UiTagsInput/UiTagsInput.stories.ts +0 -538
  603. package/src/primitives/UiTagsInput/UiTagsInput.vue +0 -27
  604. package/src/primitives/UiTagsInput/UiTagsInputInput.vue +0 -14
  605. package/src/primitives/UiTagsInput/UiTagsInputItem.vue +0 -16
  606. package/src/primitives/UiTagsInput/UiTagsInputItemDelete.vue +0 -16
  607. package/src/primitives/UiTagsInput/UiTagsInputItemText.vue +0 -14
  608. package/src/primitives/UiTagsInput/types.ts +0 -60
  609. package/src/primitives/UiTextarea/UiTextarea.stories.ts +0 -107
  610. package/src/primitives/UiTextarea/UiTextarea.vue +0 -19
  611. package/src/primitives/UiTextarea/types.ts +0 -30
  612. package/src/primitives/UiToggle/UiToggle.stories.ts +0 -370
  613. package/src/primitives/UiToggle/UiToggle.vue +0 -28
  614. package/src/primitives/UiToggle/types.ts +0 -35
  615. package/src/primitives/UiTooltip/UiTooltip.stories.ts +0 -550
  616. package/src/primitives/UiTooltip/UiTooltip.vue +0 -42
  617. package/src/primitives/UiTooltip/index.ts +0 -2
  618. package/src/primitives/UiTooltip/types.ts +0 -53
  619. package/src/primitives/index.ts +0 -40
  620. package/src/primitives/shadcn/accordion/Accordion.vue +0 -15
  621. package/src/primitives/shadcn/accordion/AccordionItem.vue +0 -24
  622. package/src/primitives/shadcn/accordion/AccordionTrigger.vue +0 -36
  623. package/src/primitives/shadcn/alert/index.ts +0 -24
  624. package/src/primitives/shadcn/alert-dialog/AlertDialogAction.vue +0 -18
  625. package/src/primitives/shadcn/alert-dialog/AlertDialogCancel.vue +0 -21
  626. package/src/primitives/shadcn/alert-dialog/AlertDialogContent.vue +0 -44
  627. package/src/primitives/shadcn/badge/index.ts +0 -24
  628. package/src/primitives/shadcn/button/index.ts +0 -36
  629. package/src/primitives/shadcn/calendar/Calendar.vue +0 -206
  630. package/src/primitives/shadcn/calendar/CalendarCellTrigger.vue +0 -44
  631. package/src/primitives/shadcn/calendar/CalendarNextButton.vue +0 -33
  632. package/src/primitives/shadcn/calendar/CalendarPrevButton.vue +0 -33
  633. package/src/primitives/shadcn/card/Card.vue +0 -22
  634. package/src/primitives/shadcn/checkbox/Checkbox.vue +0 -38
  635. package/src/primitives/shadcn/drawer/DrawerContent.vue +0 -52
  636. package/src/primitives/shadcn/dropdown-menu/DropdownMenuCheckboxItem.vue +0 -41
  637. package/src/primitives/shadcn/dropdown-menu/DropdownMenuContent.vue +0 -40
  638. package/src/primitives/shadcn/dropdown-menu/DropdownMenuItem.vue +0 -41
  639. package/src/primitives/shadcn/dropdown-menu/DropdownMenuRadioItem.vue +0 -38
  640. package/src/primitives/shadcn/dropdown-menu/DropdownMenuSubContent.vue +0 -29
  641. package/src/primitives/shadcn/dropdown-menu/DropdownMenuSubTrigger.vue +0 -31
  642. package/src/primitives/shadcn/field/FieldError.vue +0 -69
  643. package/src/primitives/shadcn/field/FieldLabel.vue +0 -28
  644. package/src/primitives/shadcn/field/FieldSeparator.vue +0 -28
  645. package/src/primitives/shadcn/index.ts +0 -3
  646. package/src/primitives/shadcn/input/Input.vue +0 -35
  647. package/src/primitives/shadcn/listbox/ListboxItem.vue +0 -32
  648. package/src/primitives/shadcn/native-select/NativeSelect.vue +0 -57
  649. package/src/primitives/shadcn/native-select/NativeSelectOptGroup.vue +0 -18
  650. package/src/primitives/shadcn/native-select/NativeSelectOption.vue +0 -18
  651. package/src/primitives/shadcn/popover/PopoverContent.vue +0 -41
  652. package/src/primitives/shadcn/radio-group/RadioGroupItem.vue +0 -38
  653. package/src/primitives/shadcn/range-calendar/RangeCalendar.vue +0 -73
  654. package/src/primitives/shadcn/range-calendar/RangeCalendarCellTrigger.vue +0 -46
  655. package/src/primitives/shadcn/range-calendar/RangeCalendarHeading.vue +0 -30
  656. package/src/primitives/shadcn/range-calendar/RangeCalendarNextButton.vue +0 -34
  657. package/src/primitives/shadcn/range-calendar/RangeCalendarPrevButton.vue +0 -34
  658. package/src/primitives/shadcn/select/Select.vue +0 -15
  659. package/src/primitives/shadcn/select/SelectContent.vue +0 -55
  660. package/src/primitives/shadcn/select/SelectItem.vue +0 -39
  661. package/src/primitives/shadcn/select/SelectScrollDownButton.vue +0 -26
  662. package/src/primitives/shadcn/select/SelectScrollUpButton.vue +0 -26
  663. package/src/primitives/shadcn/select/SelectTrigger.vue +0 -37
  664. package/src/primitives/shadcn/spinner/Spinner.vue +0 -19
  665. package/src/primitives/shadcn/switch/Switch.vue +0 -40
  666. package/src/primitives/shadcn/table/TableRow.vue +0 -21
  667. package/src/primitives/shadcn/tabs/Tabs.vue +0 -24
  668. package/src/primitives/shadcn/tabs/TabsTrigger.vue +0 -28
  669. package/src/primitives/shadcn/tags-input/TagsInput.vue +0 -33
  670. package/src/primitives/shadcn/textarea/Textarea.vue +0 -33
  671. package/src/primitives/shadcn/toggle/index.ts +0 -27
  672. package/src/primitives/shadcn/tooltip/TooltipContent.vue +0 -40
  673. /package/src/{primitives → components}/UiAccordion/__tests__/UiAccordion.test.ts +0 -0
  674. /package/src/{primitives → components}/UiAccordion/index.ts +0 -0
  675. /package/src/{primitives → components}/UiAlert/__tests__/UiAlert.test.ts +0 -0
  676. /package/src/{primitives → components}/UiAlert/constants.ts +0 -0
  677. /package/src/{primitives → components}/UiAlert/index.ts +0 -0
  678. /package/src/{primitives → components}/UiAlertDialog/__tests__/UiAlertDialog.test.ts +0 -0
  679. /package/src/{primitives → components}/UiAvatar/__tests__/UiAvatar.test.ts +0 -0
  680. /package/src/{primitives → components}/UiBadge/constants.ts +0 -0
  681. /package/src/{primitives → components}/UiBadge/index.ts +0 -0
  682. /package/src/{primitives → components}/UiButton/index.ts +0 -0
  683. /package/src/{primitives → components}/UiCalendar/__tests__/UiCalendar.test.ts +0 -0
  684. /package/src/{primitives → components}/UiCalendar/index.ts +0 -0
  685. /package/src/{primitives → components}/UiCard/__tests__/UiCard.test.ts +0 -0
  686. /package/src/{primitives → components}/UiCard/__tests__/UiCardAction.test.ts +0 -0
  687. /package/src/{primitives → components}/UiCard/__tests__/UiCardContent.test.ts +0 -0
  688. /package/src/{primitives → components}/UiCard/__tests__/UiCardDescription.test.ts +0 -0
  689. /package/src/{primitives → components}/UiCard/__tests__/UiCardFooter.test.ts +0 -0
  690. /package/src/{primitives → components}/UiCard/__tests__/UiCardHeader.test.ts +0 -0
  691. /package/src/{primitives → components}/UiCard/__tests__/UiCardTitle.test.ts +0 -0
  692. /package/src/{primitives → components}/UiCheckbox/__tests__/UiCheckbox.test.ts +0 -0
  693. /package/src/{primitives → components}/UiCheckbox/index.ts +0 -0
  694. /package/src/{primitives → components}/UiDrawer/__tests__/UiDrawer.test.ts +0 -0
  695. /package/src/{primitives → components}/UiDropdownMenu/__tests__/UiDropdownMenu.test.ts +0 -0
  696. /package/src/{primitives → components}/UiDropdownMenu/index.ts +0 -0
  697. /package/src/{primitives → components}/UiField/__tests__/UiFieldError.test.ts +0 -0
  698. /package/src/{primitives → components}/UiIcon/__tests__/UiIcon.test.ts +0 -0
  699. /package/src/{primitives → components}/UiIcon/index.ts +0 -0
  700. /package/src/{primitives → components}/UiIconButton/index.ts +0 -0
  701. /package/src/{primitives → components}/UiInput/__tests__/UiInput.test.ts +0 -0
  702. /package/src/{primitives → components}/UiInput/index.ts +0 -0
  703. /package/src/{primitives → components}/UiKbd/__tests__/UiKbd.test.ts +0 -0
  704. /package/src/{primitives → components}/UiKbd/index.ts +0 -0
  705. /package/src/{primitives → components}/UiLabel/__tests__/UiLabel.test.ts +0 -0
  706. /package/src/{primitives → components}/UiLabel/index.ts +0 -0
  707. /package/src/{primitives → components}/UiListbox/__tests__/UiListbox.test.ts +0 -0
  708. /package/src/{primitives → components}/UiListbox/index.ts +0 -0
  709. /package/src/{primitives → components}/UiPopover/__tests__/UiPopover.test.ts +0 -0
  710. /package/src/{primitives → components}/UiPopover/index.ts +0 -0
  711. /package/src/{primitives → components}/UiProgress/__tests__/UiProgress.test.ts +0 -0
  712. /package/src/{primitives → components}/UiProgress/index.ts +0 -0
  713. /package/src/{primitives → components}/UiRadioGroup/__tests__/UiRadioGroup.test.ts +0 -0
  714. /package/src/{primitives → components}/UiRadioGroup/index.ts +0 -0
  715. /package/src/{primitives → components}/UiRangeCalendar/__tests__/UiRangeCalendar.test.ts +0 -0
  716. /package/src/{primitives → components}/UiRangeCalendar/index.ts +0 -0
  717. /package/src/{primitives → components}/UiSelect/__tests__/UiSelect.test.ts +0 -0
  718. /package/src/{primitives → components}/UiSelect/__tests__/UiSelectContent.test.ts +0 -0
  719. /package/src/{primitives → components}/UiSelect/__tests__/UiSelectGroup.test.ts +0 -0
  720. /package/src/{primitives → components}/UiSelect/__tests__/UiSelectItem.test.ts +0 -0
  721. /package/src/{primitives → components}/UiSelect/__tests__/UiSelectLabel.test.ts +0 -0
  722. /package/src/{primitives → components}/UiSelect/__tests__/UiSelectSeparator.test.ts +0 -0
  723. /package/src/{primitives → components}/UiSelect/__tests__/UiSelectTrigger.test.ts +0 -0
  724. /package/src/{primitives → components}/UiSelect/__tests__/UiSelectValue.test.ts +0 -0
  725. /package/src/{primitives → components}/UiSelect/index.ts +0 -0
  726. /package/src/{primitives → components}/UiSeparator/__tests__/UiSeparator.test.ts +0 -0
  727. /package/src/{primitives → components}/UiSeparator/index.ts +0 -0
  728. /package/src/{primitives → components}/UiSkeleton/__tests__/UiSkeleton.test.ts +0 -0
  729. /package/src/{primitives → components}/UiSkeleton/index.ts +0 -0
  730. /package/src/{primitives → components}/UiSpinner/__tests__/UiSpinner.test.ts +0 -0
  731. /package/src/{primitives → components}/UiSpinner/index.ts +0 -0
  732. /package/src/{primitives → components}/UiSwitch/__tests__/UiSwitch.test.ts +0 -0
  733. /package/src/{primitives → components}/UiSwitch/index.ts +0 -0
  734. /package/src/{primitives → components}/UiTable/__tests__/UiTable.test.ts +0 -0
  735. /package/src/{primitives → components}/UiTable/__tests__/UiTableBody.test.ts +0 -0
  736. /package/src/{primitives → components}/UiTable/__tests__/UiTableCaption.test.ts +0 -0
  737. /package/src/{primitives → components}/UiTable/__tests__/UiTableCell.test.ts +0 -0
  738. /package/src/{primitives → components}/UiTable/__tests__/UiTableEmpty.test.ts +0 -0
  739. /package/src/{primitives → components}/UiTable/__tests__/UiTableFooter.test.ts +0 -0
  740. /package/src/{primitives → components}/UiTable/__tests__/UiTableHead.test.ts +0 -0
  741. /package/src/{primitives → components}/UiTable/__tests__/UiTableHeader.test.ts +0 -0
  742. /package/src/{primitives → components}/UiTable/__tests__/UiTableRow.test.ts +0 -0
  743. /package/src/{primitives → components}/UiTable/index.ts +0 -0
  744. /package/src/{primitives → components}/UiTabs/__tests__/UiTabs.test.ts +0 -0
  745. /package/src/{primitives → components}/UiTabs/index.ts +0 -0
  746. /package/src/{primitives → components}/UiTagsInput/__tests__/UiTagsInput.test.ts +0 -0
  747. /package/src/{primitives → components}/UiTagsInput/index.ts +0 -0
  748. /package/src/{primitives → components}/UiTextarea/__tests__/UiTextarea.test.ts +0 -0
  749. /package/src/{primitives → components}/UiTextarea/index.ts +0 -0
  750. /package/src/{primitives → components}/UiToggle/__tests__/UiToggle.test.ts +0 -0
  751. /package/src/{primitives → components}/UiToggle/index.ts +0 -0
  752. /package/src/{primitives → components}/UiTooltip/__tests__/UiTooltip.test.ts +0 -0
  753. /package/src/{primitives/shadcn → components/core}/accordion/AccordionContent.vue +0 -0
  754. /package/src/{primitives/shadcn → components/core}/accordion/index.ts +0 -0
  755. /package/src/{primitives/shadcn → components/core}/alert/Alert.vue +0 -0
  756. /package/src/{primitives/shadcn → components/core}/alert/AlertDescription.vue +0 -0
  757. /package/src/{primitives/shadcn → components/core}/alert/AlertTitle.vue +0 -0
  758. /package/src/{primitives/shadcn → components/core}/alert-dialog/AlertDialog.vue +0 -0
  759. /package/src/{primitives/shadcn → components/core}/alert-dialog/AlertDialogDescription.vue +0 -0
  760. /package/src/{primitives/shadcn → components/core}/alert-dialog/AlertDialogFooter.vue +0 -0
  761. /package/src/{primitives/shadcn → components/core}/alert-dialog/AlertDialogHeader.vue +0 -0
  762. /package/src/{primitives/shadcn → components/core}/alert-dialog/AlertDialogTitle.vue +0 -0
  763. /package/src/{primitives/shadcn → components/core}/alert-dialog/AlertDialogTrigger.vue +0 -0
  764. /package/src/{primitives/shadcn → components/core}/alert-dialog/index.ts +0 -0
  765. /package/src/{primitives/shadcn → components/core}/avatar/Avatar.vue +0 -0
  766. /package/src/{primitives/shadcn → components/core}/avatar/AvatarFallback.vue +0 -0
  767. /package/src/{primitives/shadcn → components/core}/avatar/AvatarImage.vue +0 -0
  768. /package/src/{primitives/shadcn → components/core}/avatar/index.ts +0 -0
  769. /package/src/{primitives/shadcn → components/core}/badge/Badge.vue +0 -0
  770. /package/src/{primitives/shadcn → components/core}/button/Button.vue +0 -0
  771. /package/src/{primitives/shadcn → components/core}/calendar/CalendarCell.vue +0 -0
  772. /package/src/{primitives/shadcn → components/core}/calendar/CalendarGrid.vue +0 -0
  773. /package/src/{primitives/shadcn → components/core}/calendar/CalendarGridBody.vue +0 -0
  774. /package/src/{primitives/shadcn → components/core}/calendar/CalendarGridHead.vue +0 -0
  775. /package/src/{primitives/shadcn → components/core}/calendar/CalendarGridRow.vue +0 -0
  776. /package/src/{primitives/shadcn → components/core}/calendar/CalendarHeadCell.vue +0 -0
  777. /package/src/{primitives/shadcn → components/core}/calendar/CalendarHeader.vue +0 -0
  778. /package/src/{primitives/shadcn → components/core}/calendar/CalendarHeading.vue +0 -0
  779. /package/src/{primitives/shadcn → components/core}/calendar/index.ts +0 -0
  780. /package/src/{primitives/shadcn → components/core}/card/CardAction.vue +0 -0
  781. /package/src/{primitives/shadcn → components/core}/card/CardContent.vue +0 -0
  782. /package/src/{primitives/shadcn → components/core}/card/CardDescription.vue +0 -0
  783. /package/src/{primitives/shadcn → components/core}/card/CardFooter.vue +0 -0
  784. /package/src/{primitives/shadcn → components/core}/card/CardHeader.vue +0 -0
  785. /package/src/{primitives/shadcn → components/core}/card/CardTitle.vue +0 -0
  786. /package/src/{primitives/shadcn → components/core}/card/index.ts +0 -0
  787. /package/src/{primitives/shadcn → components/core}/checkbox/index.ts +0 -0
  788. /package/src/{primitives/shadcn → components/core}/drawer/Drawer.vue +0 -0
  789. /package/src/{primitives/shadcn → components/core}/drawer/DrawerClose.vue +0 -0
  790. /package/src/{primitives/shadcn → components/core}/drawer/DrawerDescription.vue +0 -0
  791. /package/src/{primitives/shadcn → components/core}/drawer/DrawerFooter.vue +0 -0
  792. /package/src/{primitives/shadcn → components/core}/drawer/DrawerHeader.vue +0 -0
  793. /package/src/{primitives/shadcn → components/core}/drawer/DrawerTitle.vue +0 -0
  794. /package/src/{primitives/shadcn → components/core}/drawer/DrawerTrigger.vue +0 -0
  795. /package/src/{primitives/shadcn → components/core}/drawer/index.ts +0 -0
  796. /package/src/{primitives/shadcn → components/core}/dropdown-menu/DropdownMenu.vue +0 -0
  797. /package/src/{primitives/shadcn → components/core}/dropdown-menu/DropdownMenuGroup.vue +0 -0
  798. /package/src/{primitives/shadcn → components/core}/dropdown-menu/DropdownMenuLabel.vue +0 -0
  799. /package/src/{primitives/shadcn → components/core}/dropdown-menu/DropdownMenuRadioGroup.vue +0 -0
  800. /package/src/{primitives/shadcn → components/core}/dropdown-menu/DropdownMenuSeparator.vue +0 -0
  801. /package/src/{primitives/shadcn → components/core}/dropdown-menu/DropdownMenuShortcut.vue +0 -0
  802. /package/src/{primitives/shadcn → components/core}/dropdown-menu/DropdownMenuSub.vue +0 -0
  803. /package/src/{primitives/shadcn → components/core}/dropdown-menu/DropdownMenuTrigger.vue +0 -0
  804. /package/src/{primitives/shadcn → components/core}/dropdown-menu/index.ts +0 -0
  805. /package/src/{primitives/shadcn → components/core}/field/Field.vue +0 -0
  806. /package/src/{primitives/shadcn → components/core}/field/FieldContent.vue +0 -0
  807. /package/src/{primitives/shadcn → components/core}/field/FieldDescription.vue +0 -0
  808. /package/src/{primitives/shadcn → components/core}/field/FieldGroup.vue +0 -0
  809. /package/src/{primitives/shadcn → components/core}/field/FieldLegend.vue +0 -0
  810. /package/src/{primitives/shadcn → components/core}/field/FieldSet.vue +0 -0
  811. /package/src/{primitives/shadcn → components/core}/field/FieldTitle.vue +0 -0
  812. /package/src/{primitives/shadcn → components/core}/field/index.ts +0 -0
  813. /package/src/{primitives/shadcn → components/core}/icon/Icon.vue +0 -0
  814. /package/src/{primitives/shadcn → components/core}/icon/index.ts +0 -0
  815. /package/src/{primitives/shadcn → components/core}/input/index.ts +0 -0
  816. /package/src/{primitives/shadcn → components/core}/kbd/Kbd.vue +0 -0
  817. /package/src/{primitives/shadcn → components/core}/kbd/KbdGroup.vue +0 -0
  818. /package/src/{primitives/shadcn → components/core}/kbd/index.ts +0 -0
  819. /package/src/{primitives/shadcn → components/core}/label/Label.vue +0 -0
  820. /package/src/{primitives/shadcn → components/core}/label/index.ts +0 -0
  821. /package/src/{primitives/shadcn → components/core}/listbox/Listbox.vue +0 -0
  822. /package/src/{primitives/shadcn → components/core}/listbox/ListboxContent.vue +0 -0
  823. /package/src/{primitives/shadcn → components/core}/listbox/ListboxFilter.vue +0 -0
  824. /package/src/{primitives/shadcn → components/core}/listbox/ListboxGroup.vue +0 -0
  825. /package/src/{primitives/shadcn → components/core}/listbox/ListboxGroupLabel.vue +0 -0
  826. /package/src/{primitives/shadcn → components/core}/listbox/ListboxItemIndicator.vue +0 -0
  827. /package/src/{primitives/shadcn → components/core}/listbox/index.ts +0 -0
  828. /package/src/{primitives/shadcn → components/core}/native-select/index.ts +0 -0
  829. /package/src/{primitives/shadcn → components/core}/popover/Popover.vue +0 -0
  830. /package/src/{primitives/shadcn → components/core}/popover/PopoverTrigger.vue +0 -0
  831. /package/src/{primitives/shadcn → components/core}/popover/index.ts +0 -0
  832. /package/src/{primitives/shadcn → components/core}/progress/Progress.vue +0 -0
  833. /package/src/{primitives/shadcn → components/core}/progress/index.ts +0 -0
  834. /package/src/{primitives/shadcn → components/core}/radio-group/RadioGroup.vue +0 -0
  835. /package/src/{primitives/shadcn → components/core}/radio-group/index.ts +0 -0
  836. /package/src/{primitives/shadcn → components/core}/range-calendar/RangeCalendarCell.vue +0 -0
  837. /package/src/{primitives/shadcn → components/core}/range-calendar/RangeCalendarGrid.vue +0 -0
  838. /package/src/{primitives/shadcn → components/core}/range-calendar/RangeCalendarGridBody.vue +0 -0
  839. /package/src/{primitives/shadcn → components/core}/range-calendar/RangeCalendarGridHead.vue +0 -0
  840. /package/src/{primitives/shadcn → components/core}/range-calendar/RangeCalendarGridRow.vue +0 -0
  841. /package/src/{primitives/shadcn → components/core}/range-calendar/RangeCalendarHeadCell.vue +0 -0
  842. /package/src/{primitives/shadcn → components/core}/range-calendar/RangeCalendarHeader.vue +0 -0
  843. /package/src/{primitives/shadcn → components/core}/range-calendar/index.ts +0 -0
  844. /package/src/{primitives/shadcn → components/core}/select/SelectGroup.vue +0 -0
  845. /package/src/{primitives/shadcn → components/core}/select/SelectItemText.vue +0 -0
  846. /package/src/{primitives/shadcn → components/core}/select/SelectLabel.vue +0 -0
  847. /package/src/{primitives/shadcn → components/core}/select/SelectSeparator.vue +0 -0
  848. /package/src/{primitives/shadcn → components/core}/select/SelectValue.vue +0 -0
  849. /package/src/{primitives/shadcn → components/core}/select/index.ts +0 -0
  850. /package/src/{primitives/shadcn → components/core}/separator/Separator.vue +0 -0
  851. /package/src/{primitives/shadcn → components/core}/separator/index.ts +0 -0
  852. /package/src/{primitives/shadcn → components/core}/skeleton/Skeleton.vue +0 -0
  853. /package/src/{primitives/shadcn → components/core}/skeleton/index.ts +0 -0
  854. /package/src/{primitives/shadcn → components/core}/slider/Slider.vue +0 -0
  855. /package/src/{primitives/shadcn → components/core}/slider/index.ts +0 -0
  856. /package/src/{primitives/shadcn → components/core}/spinner/index.ts +0 -0
  857. /package/src/{primitives/shadcn → components/core}/switch/index.ts +0 -0
  858. /package/src/{primitives/shadcn → components/core}/table/Table.vue +0 -0
  859. /package/src/{primitives/shadcn → components/core}/table/TableBody.vue +0 -0
  860. /package/src/{primitives/shadcn → components/core}/table/TableCaption.vue +0 -0
  861. /package/src/{primitives/shadcn → components/core}/table/TableCell.vue +0 -0
  862. /package/src/{primitives/shadcn → components/core}/table/TableEmpty.vue +0 -0
  863. /package/src/{primitives/shadcn → components/core}/table/TableFooter.vue +0 -0
  864. /package/src/{primitives/shadcn → components/core}/table/TableHead.vue +0 -0
  865. /package/src/{primitives/shadcn → components/core}/table/TableHeader.vue +0 -0
  866. /package/src/{primitives/shadcn → components/core}/table/index.ts +0 -0
  867. /package/src/{primitives/shadcn → components/core}/table/utils.ts +0 -0
  868. /package/src/{primitives/shadcn → components/core}/tabs/TabsContent.vue +0 -0
  869. /package/src/{primitives/shadcn → components/core}/tabs/TabsList.vue +0 -0
  870. /package/src/{primitives/shadcn → components/core}/tabs/index.ts +0 -0
  871. /package/src/{primitives/shadcn → components/core}/tags-input/TagsInputInput.vue +0 -0
  872. /package/src/{primitives/shadcn → components/core}/tags-input/TagsInputItem.vue +0 -0
  873. /package/src/{primitives/shadcn → components/core}/tags-input/TagsInputItemDelete.vue +0 -0
  874. /package/src/{primitives/shadcn → components/core}/tags-input/TagsInputItemText.vue +0 -0
  875. /package/src/{primitives/shadcn → components/core}/tags-input/index.ts +0 -0
  876. /package/src/{primitives/shadcn → components/core}/textarea/index.ts +0 -0
  877. /package/src/{primitives/shadcn → components/core}/toggle/Toggle.vue +0 -0
  878. /package/src/{primitives/shadcn → components/core}/tooltip/Tooltip.vue +0 -0
  879. /package/src/{primitives/shadcn → components/core}/tooltip/TooltipProvider.vue +0 -0
  880. /package/src/{primitives/shadcn → components/core}/tooltip/TooltipTrigger.vue +0 -0
  881. /package/src/{primitives/shadcn → components/core}/tooltip/index.ts +0 -0
  882. /package/src/{compositions → patterns}/UiDataTable/UiDataTable.mock.ts +0 -0
  883. /package/src/{compositions → patterns}/UiDataTable/__tests__/UiDataTableColumnHeader.test.ts +0 -0
  884. /package/src/{compositions → patterns}/UiDataTable/__tests__/UiDataTablePagination.test.ts +0 -0
  885. /package/src/{compositions → patterns}/UiDataTable/__tests__/UiDataTableToolbar.test.ts +0 -0
  886. /package/src/{compositions → patterns}/UiDataTable/constants.ts +0 -0
  887. /package/src/{compositions → patterns}/UiDataTable/index.ts +0 -0
  888. /package/src/{compositions → patterns}/UiDatePicker/__tests__/UiDatePicker.test.ts +0 -0
  889. /package/src/{compositions → patterns}/UiDatePicker/index.ts +0 -0
  890. /package/src/{foundations → patterns}/UiPlaceholder/UiPlaceholder.vue +0 -0
  891. /package/src/{foundations → patterns}/UiPlaceholder/index.ts +0 -0
@@ -0,0 +1,1577 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import type { ColumnDef } from '@tanstack/vue-table';
3
+ import { computed, h, ref } from 'vue';
4
+ import {
5
+ UiDataTable,
6
+ UiDataTableColumnHeader,
7
+ UiDataTablePagination,
8
+ UiDataTableToolbar,
9
+ } from './index';
10
+ import { UiCheckbox } from '@/components/UiCheckbox';
11
+ import { UiButton } from '@/components/UiButton';
12
+ import { UiIcon } from '@/components/UiIcon';
13
+ import {
14
+ UiDropdownMenu,
15
+ UiDropdownMenuContent,
16
+ UiDropdownMenuItem,
17
+ UiDropdownMenuLabel,
18
+ UiDropdownMenuSeparator,
19
+ UiDropdownMenuTrigger,
20
+ } from '@/components/UiDropdownMenu';
21
+ import { payments, paymentsMedium, datasetOptions, type Payment } from './UiDataTable.mock';
22
+
23
+ // Basic columns
24
+ const basicColumns: ColumnDef<Payment>[] = [
25
+ {
26
+ accessorKey: 'status',
27
+ header: 'Status',
28
+ cell: ({ row }) => h('div', { class: 'capitalize' }, row.getValue('status')),
29
+ size: 120,
30
+ },
31
+ {
32
+ accessorKey: 'email',
33
+ header: 'Email',
34
+ cell: ({ row }) => h('div', { class: 'lowercase' }, row.getValue('email')),
35
+ size: 250,
36
+ },
37
+ {
38
+ accessorKey: 'amount',
39
+ header: () => h('div', { class: 'text-right' }, 'Amount'),
40
+ cell: ({ row }) => {
41
+ const amount = Number.parseFloat(row.getValue('amount'));
42
+ const formatted = new Intl.NumberFormat('de-DE', {
43
+ style: 'currency',
44
+ currency: 'EUR',
45
+ }).format(amount);
46
+ return h('div', { class: 'text-right font-medium' }, formatted);
47
+ },
48
+ size: 120,
49
+ },
50
+ ];
51
+
52
+ // Sortable columns using UiDataTableColumnHeader
53
+ const sortableColumns: ColumnDef<Payment>[] = [
54
+ {
55
+ accessorKey: 'status',
56
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
57
+ cell: ({ row }) => h('div', { class: 'capitalize' }, row.getValue('status')),
58
+ size: 120,
59
+ },
60
+ {
61
+ accessorKey: 'email',
62
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
63
+ cell: ({ row }) => h('div', { class: 'lowercase' }, row.getValue('email')),
64
+ size: 250,
65
+ },
66
+ {
67
+ accessorKey: 'amount',
68
+ header: ({ column }) =>
69
+ h(UiDataTableColumnHeader, { column, title: 'Amount', class: 'justify-end' }),
70
+ cell: ({ row }) => {
71
+ const amount = Number.parseFloat(row.getValue('amount'));
72
+ const formatted = new Intl.NumberFormat('de-DE', {
73
+ style: 'currency',
74
+ currency: 'EUR',
75
+ }).format(amount);
76
+ return h('div', { class: 'text-right font-medium' }, formatted);
77
+ },
78
+ size: 120,
79
+ },
80
+ ];
81
+
82
+ // Columns with selection using UiDataTableColumnHeader
83
+ const selectableColumns: ColumnDef<Payment>[] = [
84
+ {
85
+ id: 'select',
86
+ header: ({ table }) =>
87
+ h(UiCheckbox, {
88
+ modelValue:
89
+ table.getIsAllPageRowsSelected() ||
90
+ (table.getIsSomePageRowsSelected() && 'indeterminate'),
91
+ 'onUpdate:modelValue': (value: boolean) => table.toggleAllPageRowsSelected(!!value),
92
+ ariaLabel: 'Select all',
93
+ name: 'select-all',
94
+ }),
95
+ cell: ({ row }) =>
96
+ h(UiCheckbox, {
97
+ modelValue: row.getIsSelected(),
98
+ 'onUpdate:modelValue': (value: boolean) => row.toggleSelected(!!value),
99
+ ariaLabel: 'Select row',
100
+ name: `select-${row.id}`,
101
+ }),
102
+ enableSorting: false,
103
+ enableHiding: false,
104
+ size: 40,
105
+ },
106
+ {
107
+ accessorKey: 'status',
108
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
109
+ cell: ({ row }) => h('div', { class: 'capitalize' }, row.getValue('status')),
110
+ size: 120,
111
+ },
112
+ {
113
+ accessorKey: 'email',
114
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
115
+ cell: ({ row }) => h('div', { class: 'lowercase' }, row.getValue('email')),
116
+ size: 250,
117
+ },
118
+ {
119
+ accessorKey: 'amount',
120
+ header: ({ column }) =>
121
+ h(UiDataTableColumnHeader, { column, title: 'Amount', class: 'justify-end' }),
122
+ cell: ({ row }) => {
123
+ const amount = Number.parseFloat(row.getValue('amount'));
124
+ const formatted = new Intl.NumberFormat('de-DE', {
125
+ style: 'currency',
126
+ currency: 'EUR',
127
+ }).format(amount);
128
+ return h('div', { class: 'text-right font-medium' }, formatted);
129
+ },
130
+ size: 120,
131
+ },
132
+ ];
133
+
134
+ // Column options for controls
135
+ const columnOptions = {
136
+ Basic: basicColumns,
137
+ Sortable: sortableColumns,
138
+ 'With Selection': selectableColumns,
139
+ } as const;
140
+
141
+ const meta = {
142
+ title: 'Patterns/UiDataTable',
143
+ component: UiDataTable,
144
+ tags: ['autodocs'],
145
+ parameters: {
146
+ docs: {
147
+ description: {
148
+ component:
149
+ 'A powerful data table component built with TanStack Table and Vue 3. Supports sorting, pagination, filtering, and row selection. Use `UiDataTable` for the core table, `UiDataTablePagination` for pagination controls, and `UiDataTableToolbar` for search and filters.',
150
+ },
151
+ },
152
+ },
153
+ argTypes: {
154
+ columns: {
155
+ control: 'select',
156
+ options: Object.keys(columnOptions),
157
+ mapping: columnOptions,
158
+ description: 'The column definitions for the table. Select from predefined configurations.',
159
+ },
160
+ data: {
161
+ control: 'select',
162
+ options: Object.keys(datasetOptions),
163
+ mapping: datasetOptions,
164
+ description: 'The data to display in the table. Select from predefined datasets.',
165
+ },
166
+ emptyText: {
167
+ control: 'text',
168
+ description: 'Text to display when there are no results.',
169
+ },
170
+ tableMinHeight: {
171
+ control: 'text',
172
+ description:
173
+ 'Minimum height for the table container. Useful for preventing layout shifts during pagination. The last row will have a visible bottom border even when the container is taller than the content.',
174
+ },
175
+ },
176
+ args: {
177
+ data: 'Large (100 items)',
178
+ columns: 'Sortable',
179
+ },
180
+ } satisfies Meta<typeof UiDataTable>;
181
+
182
+ export default meta;
183
+ type Story = StoryObj<typeof meta>;
184
+
185
+ // Templates for source code display
186
+ const basicTemplateSource = `<script setup lang="ts">
187
+ import { UiDataTable } from '@aleph-alpha/ui-library';
188
+ import type { ColumnDef } from '@tanstack/vue-table';
189
+
190
+ interface Payment {
191
+ id: string;
192
+ amount: number;
193
+ status: string;
194
+ email: string;
195
+ }
196
+
197
+ const data: Payment[] = [
198
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
199
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
200
+ { id: '3', amount: 837, status: 'processing', email: 'monserrat44@gmail.com' },
201
+ ];
202
+
203
+ const columns: ColumnDef<Payment>[] = [
204
+ { accessorKey: 'status', header: 'Status' },
205
+ { accessorKey: 'email', header: 'Email' },
206
+ { accessorKey: 'amount', header: 'Amount' },
207
+ ];
208
+ </script>
209
+
210
+ <template>
211
+ <UiDataTable :data="data" :columns="columns" />
212
+ </template>`;
213
+
214
+ const withSortingTemplateSource = `<script setup lang="ts">
215
+ import { h } from 'vue';
216
+ import { UiDataTable, UiDataTableColumnHeader } from '@aleph-alpha/ui-library';
217
+ import type { ColumnDef } from '@tanstack/vue-table';
218
+
219
+ interface Payment {
220
+ id: string;
221
+ amount: number;
222
+ status: string;
223
+ email: string;
224
+ }
225
+
226
+ const data: Payment[] = [
227
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
228
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
229
+ { id: '3', amount: 837, status: 'processing', email: 'monserrat44@gmail.com' },
230
+ ];
231
+
232
+ // Use UiDataTableColumnHeader for sortable columns with dropdown menu
233
+ const columns: ColumnDef<Payment>[] = [
234
+ {
235
+ accessorKey: 'status',
236
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
237
+ size: 120,
238
+ },
239
+ {
240
+ accessorKey: 'email',
241
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
242
+ size: 250,
243
+ },
244
+ {
245
+ accessorKey: 'amount',
246
+ header: ({ column }) => h(UiDataTableColumnHeader, {
247
+ column,
248
+ title: 'Amount',
249
+ class: 'justify-end'
250
+ }),
251
+ cell: ({ row }) => {
252
+ const amount = Number.parseFloat(row.getValue('amount'));
253
+ return new Intl.NumberFormat('de-DE', {
254
+ style: 'currency',
255
+ currency: 'EUR',
256
+ }).format(amount);
257
+ },
258
+ size: 120,
259
+ },
260
+ ];
261
+ </script>
262
+
263
+ <template>
264
+ <UiDataTable :data="data" :columns="columns" />
265
+ </template>`;
266
+
267
+ const withPaginationTemplateSource = `<script setup lang="ts">
268
+ import { h, ref, computed } from 'vue';
269
+ import { UiDataTable, UiDataTableColumnHeader, UiDataTablePagination } from '@aleph-alpha/ui-library';
270
+ import type { ColumnDef } from '@tanstack/vue-table';
271
+
272
+ interface Payment {
273
+ id: string;
274
+ amount: number;
275
+ status: string;
276
+ email: string;
277
+ }
278
+
279
+ const data: Payment[] = [
280
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
281
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
282
+ // ... more data (pagination works best with 10+ items)
283
+ ];
284
+
285
+ const columns: ColumnDef<Payment>[] = [
286
+ {
287
+ accessorKey: 'status',
288
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
289
+ },
290
+ {
291
+ accessorKey: 'email',
292
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
293
+ },
294
+ {
295
+ accessorKey: 'amount',
296
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Amount' }),
297
+ },
298
+ ];
299
+
300
+ // Access the table instance via ref
301
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
302
+ const table = computed(() => tableRef.value?.table);
303
+ </script>
304
+
305
+ <template>
306
+ <div class="space-y-4">
307
+ <!-- tableMinHeight prevents layout shifts during pagination -->
308
+ <UiDataTable ref="tableRef" :data="data" :columns="columns" table-min-height="500px" />
309
+ <UiDataTablePagination v-if="table" :table="table" />
310
+ </div>
311
+ </template>`;
312
+
313
+ const withToolbarTemplateSource = `<script setup lang="ts">
314
+ import { h, ref, computed } from 'vue';
315
+ import { UiDataTable, UiDataTableColumnHeader, UiDataTableToolbar } from '@aleph-alpha/ui-library';
316
+ import type { ColumnDef } from '@tanstack/vue-table';
317
+
318
+ interface Payment {
319
+ id: string;
320
+ amount: number;
321
+ status: string;
322
+ email: string;
323
+ }
324
+
325
+ const data: Payment[] = [
326
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
327
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
328
+ { id: '3', amount: 837, status: 'processing', email: 'monserrat44@gmail.com' },
329
+ ];
330
+
331
+ const columns: ColumnDef<Payment>[] = [
332
+ {
333
+ accessorKey: 'status',
334
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
335
+ },
336
+ {
337
+ accessorKey: 'email',
338
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
339
+ },
340
+ {
341
+ accessorKey: 'amount',
342
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Amount' }),
343
+ },
344
+ ];
345
+
346
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
347
+ const table = computed(() => tableRef.value?.table);
348
+ </script>
349
+
350
+ <template>
351
+ <div class="space-y-4">
352
+ <!-- filter-column filters a specific column -->
353
+ <UiDataTableToolbar
354
+ v-if="table"
355
+ :table="table"
356
+ filter-column="email"
357
+ filter-placeholder="Filter emails..."
358
+ />
359
+ <UiDataTable ref="tableRef" :data="data" :columns="columns" />
360
+ </div>
361
+ </template>`;
362
+
363
+ const fullExampleTemplateSource = `<script setup lang="ts">
364
+ import { h, ref, computed } from 'vue';
365
+ import {
366
+ UiDataTable,
367
+ UiDataTableColumnHeader,
368
+ UiDataTableToolbar,
369
+ UiDataTablePagination
370
+ } from '@aleph-alpha/ui-library';
371
+ import { UiCheckbox } from '@aleph-alpha/ui-library';
372
+ import type { ColumnDef } from '@tanstack/vue-table';
373
+
374
+ interface Payment {
375
+ id: string;
376
+ amount: number;
377
+ status: string;
378
+ email: string;
379
+ }
380
+
381
+ const data: Payment[] = [
382
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
383
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
384
+ { id: '3', amount: 837, status: 'processing', email: 'monserrat44@gmail.com' },
385
+ // ... more data
386
+ ];
387
+
388
+ // Columns with selection checkbox and sortable headers
389
+ const columns: ColumnDef<Payment>[] = [
390
+ {
391
+ id: 'select',
392
+ header: ({ table }) => h(UiCheckbox, {
393
+ modelValue: table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate'),
394
+ 'onUpdate:modelValue': (value: boolean) => table.toggleAllPageRowsSelected(!!value),
395
+ ariaLabel: 'Select all',
396
+ name: 'select-all',
397
+ }),
398
+ cell: ({ row }) => h(UiCheckbox, {
399
+ modelValue: row.getIsSelected(),
400
+ 'onUpdate:modelValue': (value: boolean) => row.toggleSelected(!!value),
401
+ ariaLabel: 'Select row',
402
+ name: \`select-\${row.id}\`,
403
+ }),
404
+ enableSorting: false,
405
+ enableHiding: false,
406
+ size: 40,
407
+ },
408
+ {
409
+ accessorKey: 'status',
410
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
411
+ size: 120,
412
+ },
413
+ {
414
+ accessorKey: 'email',
415
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
416
+ size: 250,
417
+ },
418
+ {
419
+ accessorKey: 'amount',
420
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Amount' }),
421
+ size: 120,
422
+ },
423
+ ];
424
+
425
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
426
+ const table = computed(() => tableRef.value?.table);
427
+ </script>
428
+
429
+ <template>
430
+ <div class="space-y-4">
431
+ <UiDataTableToolbar
432
+ v-if="table"
433
+ :table="table"
434
+ global-filter
435
+ filter-placeholder="Search..."
436
+ />
437
+ <UiDataTable ref="tableRef" :data="data" :columns="columns" />
438
+ <UiDataTablePagination v-if="table" :table="table" />
439
+ </div>
440
+ </template>`;
441
+
442
+ const withGlobalFilterTemplateSource = `<script setup lang="ts">
443
+ import { h, ref, computed } from 'vue';
444
+ import { UiDataTable, UiDataTableColumnHeader, UiDataTableToolbar } from '@aleph-alpha/ui-library';
445
+ import type { ColumnDef } from '@tanstack/vue-table';
446
+
447
+ interface Payment {
448
+ id: string;
449
+ amount: number;
450
+ status: string;
451
+ email: string;
452
+ }
453
+
454
+ const data: Payment[] = [
455
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
456
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
457
+ { id: '3', amount: 837, status: 'processing', email: 'monserrat44@gmail.com' },
458
+ ];
459
+
460
+ const columns: ColumnDef<Payment>[] = [
461
+ {
462
+ accessorKey: 'status',
463
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
464
+ size: 120,
465
+ },
466
+ {
467
+ accessorKey: 'email',
468
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
469
+ size: 250,
470
+ },
471
+ {
472
+ accessorKey: 'amount',
473
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Amount' }),
474
+ size: 120,
475
+ },
476
+ ];
477
+
478
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
479
+ const table = computed(() => tableRef.value?.table);
480
+ </script>
481
+
482
+ <template>
483
+ <div class="space-y-4">
484
+ <!-- global-filter searches across ALL columns -->
485
+ <UiDataTableToolbar
486
+ v-if="table"
487
+ :table="table"
488
+ global-filter
489
+ filter-placeholder="Search all columns..."
490
+ />
491
+ <UiDataTable ref="tableRef" :data="data" :columns="columns" />
492
+ </div>
493
+ </template>`;
494
+
495
+ const withRowSelectionTemplateSource = `<script setup lang="ts">
496
+ import { h, ref, computed } from 'vue';
497
+ import { UiDataTable, UiDataTableColumnHeader, UiDataTablePagination } from '@aleph-alpha/ui-library';
498
+ import { UiCheckbox } from '@aleph-alpha/ui-library';
499
+ import type { ColumnDef } from '@tanstack/vue-table';
500
+
501
+ interface Payment {
502
+ id: string;
503
+ amount: number;
504
+ status: string;
505
+ email: string;
506
+ }
507
+
508
+ const data: Payment[] = [
509
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
510
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
511
+ { id: '3', amount: 837, status: 'processing', email: 'monserrat44@gmail.com' },
512
+ ];
513
+
514
+ // Add a selection column using UiCheckbox
515
+ const columns: ColumnDef<Payment>[] = [
516
+ {
517
+ id: 'select',
518
+ header: ({ table }) => h(UiCheckbox, {
519
+ modelValue: table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate'),
520
+ 'onUpdate:modelValue': (value: boolean) => table.toggleAllPageRowsSelected(!!value),
521
+ ariaLabel: 'Select all',
522
+ name: 'select-all',
523
+ }),
524
+ cell: ({ row }) => h(UiCheckbox, {
525
+ modelValue: row.getIsSelected(),
526
+ 'onUpdate:modelValue': (value: boolean) => row.toggleSelected(!!value),
527
+ ariaLabel: 'Select row',
528
+ name: \`select-\${row.id}\`,
529
+ }),
530
+ enableSorting: false,
531
+ enableHiding: false,
532
+ size: 40,
533
+ },
534
+ {
535
+ accessorKey: 'status',
536
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
537
+ size: 120,
538
+ },
539
+ {
540
+ accessorKey: 'email',
541
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
542
+ size: 250,
543
+ },
544
+ {
545
+ accessorKey: 'amount',
546
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Amount' }),
547
+ size: 120,
548
+ },
549
+ ];
550
+
551
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
552
+ const table = computed(() => tableRef.value?.table);
553
+ </script>
554
+
555
+ <template>
556
+ <div class="space-y-4">
557
+ <UiDataTable ref="tableRef" :data="data" :columns="columns" />
558
+ <!-- Pagination shows selection count -->
559
+ <UiDataTablePagination v-if="table" :table="table" />
560
+ </div>
561
+ </template>`;
562
+
563
+ const customEmptyStateTemplateSource = `<script setup lang="ts">
564
+ import { UiDataTable } from '@aleph-alpha/ui-library';
565
+ import type { ColumnDef } from '@tanstack/vue-table';
566
+
567
+ interface Payment {
568
+ id: string;
569
+ amount: number;
570
+ status: string;
571
+ email: string;
572
+ }
573
+
574
+ const data: Payment[] = []; // Empty data
575
+
576
+ const columns: ColumnDef<Payment>[] = [
577
+ { accessorKey: 'status', header: 'Status' },
578
+ { accessorKey: 'email', header: 'Email' },
579
+ { accessorKey: 'amount', header: 'Amount' },
580
+ ];
581
+ </script>
582
+
583
+ <template>
584
+ <!-- Use empty-text prop to customize the empty state message -->
585
+ <UiDataTable
586
+ :data="data"
587
+ :columns="columns"
588
+ empty-text="No payments found."
589
+ />
590
+ </template>`;
591
+
592
+ const withPageSizeTemplateSource = `<script setup lang="ts">
593
+ import { h, ref, computed } from 'vue';
594
+ import { UiDataTable, UiDataTableColumnHeader, UiDataTablePagination } from '@aleph-alpha/ui-library';
595
+ import type { ColumnDef } from '@tanstack/vue-table';
596
+
597
+ interface Payment {
598
+ id: string;
599
+ amount: number;
600
+ status: string;
601
+ email: string;
602
+ }
603
+
604
+ const data: Payment[] = [
605
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
606
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
607
+ // ... more data
608
+ ];
609
+
610
+ const columns: ColumnDef<Payment>[] = [
611
+ {
612
+ accessorKey: 'status',
613
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
614
+ size: 120,
615
+ },
616
+ {
617
+ accessorKey: 'email',
618
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
619
+ size: 250,
620
+ },
621
+ {
622
+ accessorKey: 'amount',
623
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Amount' }),
624
+ size: 120,
625
+ },
626
+ ];
627
+
628
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
629
+ const table = computed(() => tableRef.value?.table);
630
+ </script>
631
+
632
+ <template>
633
+ <div class="space-y-4">
634
+ <UiDataTable ref="tableRef" :data="data" :columns="columns" />
635
+ <!-- Customize page sizes and hide selection count -->
636
+ <UiDataTablePagination
637
+ v-if="table"
638
+ :table="table"
639
+ :page-size-options="[5, 10, 20, 50]"
640
+ :show-selection="false"
641
+ />
642
+ </div>
643
+ </template>`;
644
+
645
+ /**
646
+ * Basic table with minimal configuration.
647
+ *
648
+ * The simplest way to use UiDataTable - just pass `data` and `columns`.
649
+ * Column headers are plain text, no sorting or filtering.
650
+ */
651
+ export const Basic: Story = {
652
+ args: {
653
+ data: payments,
654
+ columns: basicColumns,
655
+ },
656
+ parameters: {
657
+ docs: {
658
+ source: {
659
+ code: basicTemplateSource,
660
+ },
661
+ },
662
+ },
663
+ render: (args) => ({
664
+ components: { UiDataTable },
665
+ setup() {
666
+ return { args };
667
+ },
668
+ template: '<UiDataTable v-bind="args" />',
669
+ }),
670
+ };
671
+
672
+ /**
673
+ * Table with sortable columns using UiDataTableColumnHeader.
674
+ *
675
+ * Use `UiDataTableColumnHeader` in your column definitions to enable:
676
+ * - Click to sort (ascending/descending)
677
+ * - Dropdown menu with sort options and hide column
678
+ *
679
+ * This is the recommended approach for sortable headers.
680
+ */
681
+ export const WithSorting: Story = {
682
+ args: {
683
+ data: payments,
684
+ columns: sortableColumns,
685
+ },
686
+ parameters: {
687
+ docs: {
688
+ source: {
689
+ code: withSortingTemplateSource,
690
+ },
691
+ },
692
+ },
693
+ render: (args) => ({
694
+ components: { UiDataTable },
695
+ setup() {
696
+ return { args };
697
+ },
698
+ template: '<UiDataTable v-bind="args" />',
699
+ }),
700
+ };
701
+
702
+ /**
703
+ * Table with pagination controls.
704
+ *
705
+ * Use `UiDataTablePagination` when displaying more than 10 rows.
706
+ * Shows navigation buttons (first, prev, next, last), page info, and rows per page selector.
707
+ *
708
+ * The `tableMinHeight` prop prevents layout shifts during pagination by ensuring
709
+ * the table container maintains a minimum height. The last row has a visible
710
+ * bottom border (Material UI-inspired behavior).
711
+ *
712
+ * Access the table instance via ref to pass to pagination component.
713
+ */
714
+ export const WithPagination: Story = {
715
+ args: {
716
+ data: payments,
717
+ columns: sortableColumns,
718
+ tableMinHeight: '500px',
719
+ },
720
+ parameters: {
721
+ docs: {
722
+ source: {
723
+ code: withPaginationTemplateSource,
724
+ },
725
+ },
726
+ },
727
+ render: (args) => ({
728
+ components: { UiDataTable, UiDataTablePagination },
729
+ setup() {
730
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
731
+ const table = computed(() => tableRef.value?.table);
732
+ return { args, tableRef, table };
733
+ },
734
+ template: `
735
+ <div class="space-y-4">
736
+ <UiDataTable ref="tableRef" v-bind="args" />
737
+ <UiDataTablePagination v-if="table" :table="table" />
738
+ </div>
739
+ `,
740
+ }),
741
+ };
742
+
743
+ /**
744
+ * Table with column-specific filtering.
745
+ *
746
+ * Use `UiDataTableToolbar` with `filter-column` prop to filter a specific column.
747
+ */
748
+ export const WithToolbar: Story = {
749
+ args: {
750
+ data: payments,
751
+ columns: sortableColumns,
752
+ },
753
+ parameters: {
754
+ docs: {
755
+ source: {
756
+ code: withToolbarTemplateSource,
757
+ },
758
+ },
759
+ },
760
+ render: (args) => ({
761
+ components: { UiDataTable, UiDataTableToolbar },
762
+ setup() {
763
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
764
+ const table = computed(() => tableRef.value?.table);
765
+ return { args, tableRef, table };
766
+ },
767
+ template: `
768
+ <div class="space-y-4">
769
+ <UiDataTableToolbar
770
+ v-if="table"
771
+ :table="table"
772
+ filter-column="email"
773
+ filter-placeholder="Filter emails..."
774
+ />
775
+ <UiDataTable ref="tableRef" v-bind="args" />
776
+ </div>
777
+ `,
778
+ }),
779
+ };
780
+
781
+ /**
782
+ * Table with global search across all columns.
783
+ *
784
+ * Use `global-filter` prop instead of `filter-column` to search across ALL columns.
785
+ * Matches any value in status, email, amount, or ID.
786
+ *
787
+ * Try typing "success", "gmail", or "316" to see it match different columns.
788
+ */
789
+ export const WithGlobalFilter: Story = {
790
+ args: {
791
+ data: payments,
792
+ columns: sortableColumns,
793
+ },
794
+ parameters: {
795
+ docs: {
796
+ source: {
797
+ code: withGlobalFilterTemplateSource,
798
+ },
799
+ },
800
+ },
801
+ render: (args) => ({
802
+ components: { UiDataTable, UiDataTableToolbar },
803
+ setup() {
804
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
805
+ const table = computed(() => tableRef.value?.table);
806
+ return { args, tableRef, table };
807
+ },
808
+ template: `
809
+ <div class="space-y-4">
810
+ <UiDataTableToolbar
811
+ v-if="table"
812
+ :table="table"
813
+ global-filter
814
+ filter-placeholder="Search all columns..."
815
+ />
816
+ <UiDataTable ref="tableRef" v-bind="args" />
817
+ </div>
818
+ `,
819
+ }),
820
+ };
821
+
822
+ /**
823
+ * Table with row selection checkboxes.
824
+ *
825
+ * Add a selection column using `UiCheckbox` to enable row selection.
826
+ * Use `table.getIsAllPageRowsSelected()` for the header checkbox and
827
+ * `row.getIsSelected()` for row checkboxes.
828
+ *
829
+ * The pagination component shows the selection count automatically.
830
+ */
831
+ export const WithRowSelection: Story = {
832
+ args: {
833
+ data: payments,
834
+ columns: selectableColumns,
835
+ },
836
+ parameters: {
837
+ docs: {
838
+ source: {
839
+ code: withRowSelectionTemplateSource,
840
+ },
841
+ },
842
+ },
843
+ render: (args) => ({
844
+ components: { UiDataTable, UiDataTablePagination },
845
+ setup() {
846
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
847
+ const table = computed(() => tableRef.value?.table);
848
+ return { args, tableRef, table };
849
+ },
850
+ template: `
851
+ <div class="space-y-4">
852
+ <UiDataTable ref="tableRef" v-bind="args" />
853
+ <UiDataTablePagination v-if="table" :table="table" />
854
+ </div>
855
+ `,
856
+ }),
857
+ };
858
+
859
+ /**
860
+ * Complete example combining all DataTable features.
861
+ *
862
+ * This example demonstrates the full power of UiDataTable with:
863
+ * - **Sortable columns** using `UiDataTableColumnHeader`
864
+ * - **Row selection** with checkboxes (header + row)
865
+ * - **Global search** across all columns
866
+ * - **Pagination** with page size selector
867
+ *
868
+ * Use this as a reference for building feature-rich data tables.
869
+ */
870
+ export const FullExample: Story = {
871
+ args: {
872
+ data: payments,
873
+ columns: selectableColumns,
874
+ },
875
+ parameters: {
876
+ docs: {
877
+ source: {
878
+ code: fullExampleTemplateSource,
879
+ },
880
+ },
881
+ },
882
+ render: (args) => ({
883
+ components: { UiDataTable, UiDataTableToolbar, UiDataTablePagination },
884
+ setup() {
885
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
886
+ const table = computed(() => tableRef.value?.table);
887
+ return { args, tableRef, table };
888
+ },
889
+ template: `
890
+ <div class="space-y-4">
891
+ <UiDataTableToolbar
892
+ v-if="table"
893
+ :table="table"
894
+ global-filter
895
+ filter-placeholder="Search..."
896
+ />
897
+ <UiDataTable ref="tableRef" v-bind="args" />
898
+ <UiDataTablePagination v-if="table" :table="table" />
899
+ </div>
900
+ `,
901
+ }),
902
+ };
903
+
904
+ /**
905
+ * Table with custom empty state message using the `empty-text` prop.
906
+ *
907
+ * Use the `empty-text` prop to customize the message shown when there's no data.
908
+ * Defaults to "No results." if not specified.
909
+ */
910
+ export const WithCustomEmptyText: Story = {
911
+ args: {
912
+ data: [],
913
+ columns: basicColumns,
914
+ emptyText: 'No payments found.',
915
+ },
916
+ parameters: {
917
+ docs: {
918
+ source: {
919
+ code: customEmptyStateTemplateSource,
920
+ },
921
+ },
922
+ },
923
+ render: (args) => ({
924
+ components: { UiDataTable },
925
+ setup() {
926
+ return { args };
927
+ },
928
+ template: '<UiDataTable v-bind="args" />',
929
+ }),
930
+ };
931
+
932
+ const withCustomEmptySlotTemplateSource = `<script setup lang="ts">
933
+ import { UiDataTable, UiIcon } from '@aleph-alpha/ui-library';
934
+ import type { ColumnDef } from '@tanstack/vue-table';
935
+
936
+ interface Payment {
937
+ id: string;
938
+ amount: number;
939
+ status: string;
940
+ email: string;
941
+ }
942
+
943
+ const data: Payment[] = []; // Empty data
944
+
945
+ const columns: ColumnDef<Payment>[] = [
946
+ { accessorKey: 'status', header: 'Status' },
947
+ { accessorKey: 'email', header: 'Email' },
948
+ { accessorKey: 'amount', header: 'Amount' },
949
+ ];
950
+ </script>
951
+
952
+ <template>
953
+ <UiDataTable :data="data" :columns="columns">
954
+ <template #empty>
955
+ <div class="flex flex-col items-center gap-2 text-muted-foreground">
956
+ <UiIcon name="ban" :size="32" />
957
+ <p>No data available for this view.</p>
958
+ </div>
959
+ </template>
960
+ </UiDataTable>
961
+ </template>`;
962
+
963
+ /**
964
+ * Data table with a custom empty state using the `#empty` slot.
965
+ */
966
+ export const WithCustomEmptySlot: Story = {
967
+ args: {
968
+ data: [],
969
+ columns: basicColumns,
970
+ },
971
+ parameters: {
972
+ docs: {
973
+ description: {
974
+ story:
975
+ 'Use the `#empty` slot to provide a fully custom empty state, such as an icon or formatted text.',
976
+ },
977
+ source: {
978
+ code: withCustomEmptySlotTemplateSource,
979
+ },
980
+ },
981
+ },
982
+ render: (args) => ({
983
+ components: { UiDataTable, UiIcon },
984
+ setup() {
985
+ return { args };
986
+ },
987
+ template: `
988
+ <UiDataTable v-bind="args">
989
+ <template #empty>
990
+ <div class="flex flex-col items-center gap-2 text-muted-foreground">
991
+ <UiIcon name="ban" :size="32" />
992
+ <p>No data available for this view.</p>
993
+ </div>
994
+ </template>
995
+ </UiDataTable>
996
+ `,
997
+ }),
998
+ };
999
+
1000
+ // Columns using UiDataTableColumnHeader component
1001
+ const columnHeaderColumns: ColumnDef<Payment>[] = [
1002
+ {
1003
+ accessorKey: 'status',
1004
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
1005
+ cell: ({ row }) => h('div', { class: 'capitalize' }, row.getValue('status')),
1006
+ size: 120,
1007
+ },
1008
+ {
1009
+ accessorKey: 'email',
1010
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
1011
+ cell: ({ row }) => h('div', { class: 'lowercase' }, row.getValue('email')),
1012
+ size: 250,
1013
+ },
1014
+ {
1015
+ accessorKey: 'amount',
1016
+ header: ({ column }) =>
1017
+ h(UiDataTableColumnHeader, { column, title: 'Amount', class: 'justify-end' }),
1018
+ cell: ({ row }) => {
1019
+ const amount = Number.parseFloat(row.getValue('amount'));
1020
+ const formatted = new Intl.NumberFormat('de-DE', {
1021
+ style: 'currency',
1022
+ currency: 'EUR',
1023
+ }).format(amount);
1024
+ return h('div', { class: 'text-right font-medium' }, formatted);
1025
+ },
1026
+ size: 120,
1027
+ },
1028
+ ];
1029
+
1030
+ const withColumnHeaderTemplateSource = `<script setup lang="ts">
1031
+ import { h } from 'vue';
1032
+ import { UiDataTable, UiDataTableColumnHeader } from '@aleph-alpha/ui-library';
1033
+ import type { ColumnDef } from '@tanstack/vue-table';
1034
+
1035
+ interface Payment {
1036
+ id: string;
1037
+ amount: number;
1038
+ status: string;
1039
+ email: string;
1040
+ }
1041
+
1042
+ const data: Payment[] = [
1043
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
1044
+ // ... more data
1045
+ ];
1046
+
1047
+ // Using UiDataTableColumnHeader for sortable headers with hide option
1048
+ const columns: ColumnDef<Payment>[] = [
1049
+ {
1050
+ accessorKey: 'status',
1051
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
1052
+ cell: ({ row }) => h('div', { class: 'capitalize' }, row.getValue('status')),
1053
+ size: 120,
1054
+ },
1055
+ {
1056
+ accessorKey: 'email',
1057
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
1058
+ cell: ({ row }) => h('div', { class: 'lowercase' }, row.getValue('email')),
1059
+ size: 250,
1060
+ },
1061
+ {
1062
+ accessorKey: 'amount',
1063
+ header: ({ column }) => h(UiDataTableColumnHeader, {
1064
+ column,
1065
+ title: 'Amount',
1066
+ class: 'justify-end'
1067
+ }),
1068
+ cell: ({ row }) => {
1069
+ const amount = Number.parseFloat(row.getValue('amount'));
1070
+ const formatted = new Intl.NumberFormat('de-DE', {
1071
+ style: 'currency',
1072
+ currency: 'EUR',
1073
+ }).format(amount);
1074
+ return h('div', { class: 'text-right font-medium' }, formatted);
1075
+ },
1076
+ size: 120,
1077
+ },
1078
+ ];
1079
+ </script>
1080
+
1081
+ <template>
1082
+ <UiDataTable :data="data" :columns="columns" />
1083
+ </template>`;
1084
+
1085
+ /**
1086
+ * Table demonstrating sortable columns with UiDataTableColumnHeader.
1087
+ *
1088
+ * The `UiDataTableColumnHeader` provides a dropdown with sort options.
1089
+ *
1090
+ * For right-aligned headers (like amounts), pass `class="justify-end"`.
1091
+ */
1092
+ export const WithColumnHeader: Story = {
1093
+ args: {
1094
+ data: payments,
1095
+ columns: columnHeaderColumns,
1096
+ },
1097
+ parameters: {
1098
+ docs: {
1099
+ source: {
1100
+ code: withColumnHeaderTemplateSource,
1101
+ },
1102
+ },
1103
+ },
1104
+ render: (args) => ({
1105
+ components: { UiDataTable, UiDataTableToolbar },
1106
+ setup() {
1107
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
1108
+ const table = computed(() => tableRef.value?.table);
1109
+ return { args, tableRef, table };
1110
+ },
1111
+ template: `
1112
+ <div class="space-y-4">
1113
+ <UiDataTableToolbar
1114
+ v-if="table"
1115
+ :table="table"
1116
+ global-filter
1117
+ filter-placeholder="Search..."
1118
+ />
1119
+ <UiDataTable ref="tableRef" v-bind="args" />
1120
+ </div>
1121
+ `,
1122
+ }),
1123
+ };
1124
+
1125
+ /**
1126
+ * Table with customized pagination options.
1127
+ *
1128
+ * Customize `UiDataTablePagination` with:
1129
+ * - `page-size-options`: Array of page size options (default: [10, 20, 30, 50])
1130
+ * - `show-page-size`: Show/hide the rows per page selector (default: true)
1131
+ * - `show-selection`: Show/hide the selection count (default: true)
1132
+ */
1133
+ export const WithPageSizeSelector: Story = {
1134
+ args: {
1135
+ data: payments,
1136
+ columns: sortableColumns,
1137
+ },
1138
+ parameters: {
1139
+ docs: {
1140
+ source: {
1141
+ code: withPageSizeTemplateSource,
1142
+ },
1143
+ },
1144
+ },
1145
+ render: (args) => ({
1146
+ components: { UiDataTable, UiDataTablePagination },
1147
+ setup() {
1148
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
1149
+ const table = computed(() => tableRef.value?.table);
1150
+ return { args, tableRef, table };
1151
+ },
1152
+ template: `
1153
+ <div class="space-y-4">
1154
+ <UiDataTable ref="tableRef" v-bind="args" />
1155
+ <UiDataTablePagination
1156
+ v-if="table"
1157
+ :table="table"
1158
+ :page-size-options="[5, 10, 20, 50]"
1159
+ :show-selection="false"
1160
+ />
1161
+ </div>
1162
+ `,
1163
+ }),
1164
+ };
1165
+
1166
+ /**
1167
+ * Table with 14 items, minimum height, and pagination.
1168
+ *
1169
+ * Demonstrates how `tableMinHeight` keeps stable layout when there's content
1170
+ * below the table (pagination). Page 1 shows 10 rows, page 2 shows 4 rows -
1171
+ * the table maintains consistent height regardless of how many rows are visible.
1172
+ */
1173
+ export const WithMinHeightSmallDataset: Story = {
1174
+ args: {
1175
+ // Use 14 items: page 1 = 10 rows, page 2 = 4 rows
1176
+ data: paymentsMedium.slice(0, 14),
1177
+ columns: sortableColumns,
1178
+ tableMinHeight: '500px',
1179
+ },
1180
+ parameters: {
1181
+ docs: {
1182
+ description: {
1183
+ story:
1184
+ 'Demonstrates `tableMinHeight` with 14 items and pagination. Page 1 shows 10 rows, page 2 shows only 4 rows. The table keeps a consistent height, preventing layout shifts when navigating between pages.',
1185
+ },
1186
+ source: {
1187
+ code: `<script setup lang="ts">
1188
+ import { h, ref, computed } from 'vue';
1189
+ import { UiDataTable, UiDataTableColumnHeader, UiDataTablePagination } from '@aleph-alpha/ui-library';
1190
+ import type { ColumnDef } from '@tanstack/vue-table';
1191
+
1192
+ interface Payment { id: string; amount: number; status: string; email: string; }
1193
+
1194
+ // 14 items: page 1 = 10 rows, page 2 = 4 rows
1195
+ const data: Payment[] = [
1196
+ { id: '1', amount: 316, status: 'success', email: 'user1@example.com' },
1197
+ { id: '2', amount: 242, status: 'pending', email: 'user2@example.com' },
1198
+ { id: '3', amount: 837, status: 'processing', email: 'user3@example.com' },
1199
+ { id: '4', amount: 154, status: 'failed', email: 'user4@example.com' },
1200
+ { id: '5', amount: 429, status: 'success', email: 'user5@example.com' },
1201
+ { id: '6', amount: 512, status: 'pending', email: 'user6@example.com' },
1202
+ { id: '7', amount: 623, status: 'processing', email: 'user7@example.com' },
1203
+ { id: '8', amount: 734, status: 'failed', email: 'user8@example.com' },
1204
+ { id: '9', amount: 845, status: 'success', email: 'user9@example.com' },
1205
+ { id: '10', amount: 956, status: 'pending', email: 'user10@example.com' },
1206
+ { id: '11', amount: 167, status: 'processing', email: 'user11@example.com' },
1207
+ { id: '12', amount: 278, status: 'failed', email: 'user12@example.com' },
1208
+ { id: '13', amount: 389, status: 'success', email: 'user13@example.com' },
1209
+ { id: '14', amount: 490, status: 'pending', email: 'user14@example.com' },
1210
+ ];
1211
+
1212
+ const columns: ColumnDef<Payment>[] = [
1213
+ { accessorKey: 'status', header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }) },
1214
+ { accessorKey: 'email', header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }) },
1215
+ { accessorKey: 'amount', header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Amount', class: 'justify-end' }) },
1216
+ ];
1217
+
1218
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
1219
+ const table = computed(() => tableRef.value?.table);
1220
+ </script>
1221
+
1222
+ <template>
1223
+ <div class="space-y-4">
1224
+ <UiDataTable ref="tableRef" :data="data" :columns="columns" table-min-height="500px" />
1225
+ <UiDataTablePagination v-if="table" :table="table" :show-selection="false" />
1226
+ </div>
1227
+ </template>`,
1228
+ },
1229
+ },
1230
+ },
1231
+ render: (args) => ({
1232
+ components: { UiDataTable, UiDataTablePagination },
1233
+ setup() {
1234
+ const tableRef = ref<InstanceType<typeof UiDataTable>>();
1235
+ const table = computed(() => tableRef.value?.table);
1236
+ return { args, tableRef, table };
1237
+ },
1238
+ template: `
1239
+ <div class="space-y-4">
1240
+ <UiDataTable ref="tableRef" v-bind="args" />
1241
+ <UiDataTablePagination v-if="table" :table="table" :show-selection="false" />
1242
+ </div>
1243
+ `,
1244
+ }),
1245
+ };
1246
+
1247
+ // Row Actions columns with dropdown menu
1248
+ const rowActionsColumns: ColumnDef<Payment>[] = [
1249
+ {
1250
+ accessorKey: 'status',
1251
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
1252
+ cell: ({ row }) => h('div', { class: 'capitalize' }, row.getValue('status')),
1253
+ size: 120,
1254
+ },
1255
+ {
1256
+ accessorKey: 'email',
1257
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
1258
+ cell: ({ row }) => h('div', { class: 'lowercase' }, row.getValue('email')),
1259
+ size: 250,
1260
+ },
1261
+ {
1262
+ accessorKey: 'amount',
1263
+ header: ({ column }) =>
1264
+ h(UiDataTableColumnHeader, { column, title: 'Amount', class: 'justify-end' }),
1265
+ cell: ({ row }) => {
1266
+ const amount = Number.parseFloat(row.getValue('amount'));
1267
+ const formatted = new Intl.NumberFormat('de-DE', {
1268
+ style: 'currency',
1269
+ currency: 'EUR',
1270
+ }).format(amount);
1271
+ return h('div', { class: 'text-right font-medium' }, formatted);
1272
+ },
1273
+ size: 120,
1274
+ },
1275
+ {
1276
+ id: 'actions',
1277
+ enableHiding: false,
1278
+ enableSorting: false,
1279
+ header: () => h('span', { class: 'sr-only' }, 'Actions'),
1280
+ cell: ({ row }) => {
1281
+ const payment = row.original;
1282
+ return h(
1283
+ UiDropdownMenu,
1284
+ {},
1285
+ {
1286
+ default: () => [
1287
+ h(UiDropdownMenuTrigger, { asChild: true }, () =>
1288
+ h(UiButton, { variant: 'ghost', size: 'icon', class: 'h-8 w-8' }, () => [
1289
+ h('span', { class: 'sr-only' }, 'Open menu'),
1290
+ h(UiIcon, { name: 'more-horizontal', size: 16 }),
1291
+ ]),
1292
+ ),
1293
+ h(UiDropdownMenuContent, { align: 'end' }, () => [
1294
+ h(UiDropdownMenuLabel, {}, () => 'Actions'),
1295
+ h(
1296
+ UiDropdownMenuItem,
1297
+ { onClick: () => navigator.clipboard.writeText(payment.id) },
1298
+ () => 'Copy payment ID',
1299
+ ),
1300
+ h(UiDropdownMenuSeparator),
1301
+ h(UiDropdownMenuItem, {}, () => 'View details'),
1302
+ h(UiDropdownMenuItem, {}, () => 'View customer'),
1303
+ ]),
1304
+ ],
1305
+ },
1306
+ );
1307
+ },
1308
+ size: 50,
1309
+ },
1310
+ ];
1311
+
1312
+ const withRowActionsTemplateSource = `<script setup lang="ts">
1313
+ import { h } from 'vue';
1314
+ import { UiDataTable, UiDataTableColumnHeader } from '@aleph-alpha/ui-library';
1315
+ import {
1316
+ UiDropdownMenu,
1317
+ UiDropdownMenuContent,
1318
+ UiDropdownMenuItem,
1319
+ UiDropdownMenuLabel,
1320
+ UiDropdownMenuSeparator,
1321
+ UiDropdownMenuTrigger,
1322
+ } from '@aleph-alpha/ui-library';
1323
+ import { UiButton } from '@aleph-alpha/ui-library';
1324
+ import type { ColumnDef } from '@tanstack/vue-table';
1325
+
1326
+ interface Payment {
1327
+ id: string;
1328
+ amount: number;
1329
+ status: string;
1330
+ email: string;
1331
+ }
1332
+
1333
+ const data: Payment[] = [
1334
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
1335
+ { id: '2', amount: 242, status: 'success', email: 'abe45@gmail.com' },
1336
+ { id: '3', amount: 837, status: 'processing', email: 'monserrat44@gmail.com' },
1337
+ ];
1338
+
1339
+ // Define a component for row actions (or use inline h() calls)
1340
+ const columns: ColumnDef<Payment>[] = [
1341
+ {
1342
+ accessorKey: 'status',
1343
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Status' }),
1344
+ cell: ({ row }) => h('div', { class: 'capitalize' }, row.getValue('status')),
1345
+ },
1346
+ {
1347
+ accessorKey: 'email',
1348
+ header: ({ column }) => h(UiDataTableColumnHeader, { column, title: 'Email' }),
1349
+ cell: ({ row }) => h('div', { class: 'lowercase' }, row.getValue('email')),
1350
+ },
1351
+ {
1352
+ accessorKey: 'amount',
1353
+ header: ({ column }) => h(UiDataTableColumnHeader, {
1354
+ column,
1355
+ title: 'Amount',
1356
+ class: 'justify-end'
1357
+ }),
1358
+ cell: ({ row }) => {
1359
+ const amount = Number.parseFloat(row.getValue('amount'));
1360
+ const formatted = new Intl.NumberFormat('de-DE', {
1361
+ style: 'currency',
1362
+ currency: 'EUR',
1363
+ }).format(amount);
1364
+ return h('div', { class: 'text-right font-medium' }, formatted);
1365
+ },
1366
+ },
1367
+ {
1368
+ id: 'actions',
1369
+ enableHiding: false,
1370
+ cell: ({ row }) => {
1371
+ const payment = row.original;
1372
+
1373
+ // You can return a Vue component or use h() to render dropdown
1374
+ // For complex actions, create a separate component like DataTableRowActions.vue
1375
+ return h(UiDropdownMenu, {}, {
1376
+ default: () => [
1377
+ h(UiDropdownMenuTrigger, { asChild: true }, () =>
1378
+ h(UiButton, { variant: 'ghost', size: 'sm' }, () => '⋮')
1379
+ ),
1380
+ h(UiDropdownMenuContent, { align: 'end' }, () => [
1381
+ h(UiDropdownMenuLabel, {}, () => 'Actions'),
1382
+ h(UiDropdownMenuItem, {
1383
+ onClick: () => navigator.clipboard.writeText(payment.id)
1384
+ }, () => 'Copy payment ID'),
1385
+ h(UiDropdownMenuSeparator),
1386
+ h(UiDropdownMenuItem, {}, () => 'View details'),
1387
+ h(UiDropdownMenuItem, {}, () => 'View customer'),
1388
+ ]),
1389
+ ],
1390
+ });
1391
+ },
1392
+ },
1393
+ ];
1394
+ </script>
1395
+
1396
+ <template>
1397
+ <UiDataTable :data="data" :columns="columns" />
1398
+ </template>`;
1399
+
1400
+ /**
1401
+ * Table with row actions dropdown menu.
1402
+ *
1403
+ * Add an actions column with a dropdown menu for each row.
1404
+ * Use `row.original` to access the full row data for actions.
1405
+ *
1406
+ * For complex actions, create a separate component (e.g., `DataTableRowActions.vue`)
1407
+ * and import it in your column definition.
1408
+ */
1409
+ export const WithRowActions: Story = {
1410
+ args: {
1411
+ data: payments,
1412
+ columns: rowActionsColumns,
1413
+ },
1414
+ parameters: {
1415
+ docs: {
1416
+ source: {
1417
+ code: withRowActionsTemplateSource,
1418
+ },
1419
+ },
1420
+ },
1421
+ render: (args) => ({
1422
+ components: { UiDataTable },
1423
+ setup() {
1424
+ return { args };
1425
+ },
1426
+ template: '<UiDataTable v-bind="args" />',
1427
+ }),
1428
+ };
1429
+
1430
+ // Cell formatting columns
1431
+ const cellFormattingColumns: ColumnDef<Payment>[] = [
1432
+ {
1433
+ accessorKey: 'status',
1434
+ header: 'Status',
1435
+ cell: ({ row }) => {
1436
+ const status = row.getValue('status') as string;
1437
+ const statusStyles: Record<string, string> = {
1438
+ success: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300',
1439
+ processing: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300',
1440
+ pending: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300',
1441
+ failed: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300',
1442
+ };
1443
+ return h(
1444
+ 'span',
1445
+ {
1446
+ class: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize ${statusStyles[status] || ''}`,
1447
+ },
1448
+ status,
1449
+ );
1450
+ },
1451
+ size: 120,
1452
+ },
1453
+ {
1454
+ accessorKey: 'email',
1455
+ header: 'Email',
1456
+ cell: ({ row }) => h('div', { class: 'lowercase font-mono text-sm' }, row.getValue('email')),
1457
+ size: 250,
1458
+ },
1459
+ {
1460
+ accessorKey: 'amount',
1461
+ header: () => h('div', { class: 'text-right' }, 'Amount'),
1462
+ cell: ({ row }) => {
1463
+ const amount = Number.parseFloat(row.getValue('amount'));
1464
+ const formatted = new Intl.NumberFormat('de-DE', {
1465
+ style: 'currency',
1466
+ currency: 'EUR',
1467
+ }).format(amount);
1468
+ return h(
1469
+ 'div',
1470
+ {
1471
+ class: `text-right font-medium ${amount > 500 ? 'text-green-600' : 'text-muted-foreground'}`,
1472
+ },
1473
+ formatted,
1474
+ );
1475
+ },
1476
+ size: 120,
1477
+ },
1478
+ ];
1479
+
1480
+ const withCellFormattingTemplateSource = `<script setup lang="ts">
1481
+ import { h } from 'vue';
1482
+ import { UiDataTable } from '@aleph-alpha/ui-library';
1483
+ import type { ColumnDef } from '@tanstack/vue-table';
1484
+
1485
+ interface Payment {
1486
+ id: string;
1487
+ amount: number;
1488
+ status: 'pending' | 'processing' | 'success' | 'failed';
1489
+ email: string;
1490
+ }
1491
+
1492
+ const data: Payment[] = [
1493
+ { id: '1', amount: 316, status: 'success', email: 'ken99@yahoo.com' },
1494
+ { id: '2', amount: 242, status: 'pending', email: 'abe45@gmail.com' },
1495
+ { id: '3', amount: 837, status: 'processing', email: 'monserrat44@gmail.com' },
1496
+ { id: '4', amount: 721, status: 'failed', email: 'carmella@hotmail.com' },
1497
+ ];
1498
+
1499
+ const columns: ColumnDef<Payment>[] = [
1500
+ {
1501
+ accessorKey: 'status',
1502
+ header: 'Status',
1503
+ // Custom status badge with semantic colors
1504
+ cell: ({ row }) => {
1505
+ const status = row.getValue('status') as string;
1506
+ const statusStyles: Record<string, string> = {
1507
+ success: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300',
1508
+ processing: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300',
1509
+ pending: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300',
1510
+ failed: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300',
1511
+ };
1512
+ return h('span', {
1513
+ class: \`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize \${statusStyles[status] || ''}\`,
1514
+ }, status);
1515
+ },
1516
+ },
1517
+ {
1518
+ accessorKey: 'email',
1519
+ header: 'Email',
1520
+ // Monospace font for emails
1521
+ cell: ({ row }) => h('div', {
1522
+ class: 'lowercase font-mono text-sm'
1523
+ }, row.getValue('email')),
1524
+ },
1525
+ {
1526
+ accessorKey: 'amount',
1527
+ // Right-aligned header
1528
+ header: () => h('div', { class: 'text-right' }, 'Amount'),
1529
+ // Conditional formatting: green for high amounts
1530
+ cell: ({ row }) => {
1531
+ const amount = Number.parseFloat(row.getValue('amount'));
1532
+ const formatted = new Intl.NumberFormat('de-DE', {
1533
+ style: 'currency',
1534
+ currency: 'EUR',
1535
+ }).format(amount);
1536
+ return h('div', {
1537
+ class: \`text-right font-medium \${amount > 500 ? 'text-green-600' : 'text-muted-foreground'}\`,
1538
+ }, formatted);
1539
+ },
1540
+ },
1541
+ ];
1542
+ </script>
1543
+
1544
+ <template>
1545
+ <UiDataTable :data="data" :columns="columns" />
1546
+ </template>`;
1547
+
1548
+ /**
1549
+ * Table with custom cell formatting.
1550
+ *
1551
+ * Use the `cell` property in column definitions to customize how data is displayed:
1552
+ * - **Status badges** with semantic colors (green=success, yellow=processing, etc.)
1553
+ * - **Monospace font** for emails
1554
+ * - **Currency formatting** with conditional colors based on value
1555
+ *
1556
+ * Access cell value with `row.getValue('columnKey')` and return a VNode using `h()`.
1557
+ */
1558
+ export const WithCellFormatting: Story = {
1559
+ args: {
1560
+ data: payments,
1561
+ columns: cellFormattingColumns,
1562
+ },
1563
+ parameters: {
1564
+ docs: {
1565
+ source: {
1566
+ code: withCellFormattingTemplateSource,
1567
+ },
1568
+ },
1569
+ },
1570
+ render: (args) => ({
1571
+ components: { UiDataTable },
1572
+ setup() {
1573
+ return { args };
1574
+ },
1575
+ template: '<UiDataTable v-bind="args" />',
1576
+ }),
1577
+ };