@polymarbot/nuxt-layer-shadcn-ui 0.1.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 (408) hide show
  1. package/app/assets/styles/animate.css +71 -0
  2. package/app/assets/styles/colors.css +116 -0
  3. package/app/assets/styles/globals.css +43 -0
  4. package/app/assets/styles/index.stories.ts +211 -0
  5. package/app/assets/styles/transition.css +34 -0
  6. package/app/assets/styles/utilities.css +26 -0
  7. package/app/components/shadcn/accordion/Accordion.vue +18 -0
  8. package/app/components/shadcn/accordion/AccordionContent.vue +23 -0
  9. package/app/components/shadcn/accordion/AccordionItem.vue +24 -0
  10. package/app/components/shadcn/accordion/AccordionTrigger.vue +37 -0
  11. package/app/components/shadcn/accordion/index.ts +4 -0
  12. package/app/components/shadcn/alert/Alert.vue +21 -0
  13. package/app/components/shadcn/alert/AlertDescription.vue +17 -0
  14. package/app/components/shadcn/alert/AlertTitle.vue +17 -0
  15. package/app/components/shadcn/alert/index.ts +24 -0
  16. package/app/components/shadcn/avatar/Avatar.vue +18 -0
  17. package/app/components/shadcn/avatar/AvatarFallback.vue +21 -0
  18. package/app/components/shadcn/avatar/AvatarImage.vue +16 -0
  19. package/app/components/shadcn/avatar/index.ts +3 -0
  20. package/app/components/shadcn/badge/Badge.vue +26 -0
  21. package/app/components/shadcn/badge/index.ts +26 -0
  22. package/app/components/shadcn/breadcrumb/Breadcrumb.vue +17 -0
  23. package/app/components/shadcn/breadcrumb/BreadcrumbEllipsis.vue +23 -0
  24. package/app/components/shadcn/breadcrumb/BreadcrumbItem.vue +17 -0
  25. package/app/components/shadcn/breadcrumb/BreadcrumbLink.vue +21 -0
  26. package/app/components/shadcn/breadcrumb/BreadcrumbList.vue +17 -0
  27. package/app/components/shadcn/breadcrumb/BreadcrumbPage.vue +20 -0
  28. package/app/components/shadcn/breadcrumb/BreadcrumbSeparator.vue +22 -0
  29. package/app/components/shadcn/breadcrumb/index.ts +7 -0
  30. package/app/components/shadcn/button/Button.vue +31 -0
  31. package/app/components/shadcn/button/index.ts +38 -0
  32. package/app/components/shadcn/card/Card.vue +22 -0
  33. package/app/components/shadcn/card/CardAction.vue +17 -0
  34. package/app/components/shadcn/card/CardContent.vue +17 -0
  35. package/app/components/shadcn/card/CardDescription.vue +17 -0
  36. package/app/components/shadcn/card/CardFooter.vue +17 -0
  37. package/app/components/shadcn/card/CardHeader.vue +17 -0
  38. package/app/components/shadcn/card/CardTitle.vue +17 -0
  39. package/app/components/shadcn/card/index.ts +7 -0
  40. package/app/components/shadcn/checkbox/Checkbox.vue +35 -0
  41. package/app/components/shadcn/checkbox/index.ts +1 -0
  42. package/app/components/shadcn/collapsible/Collapsible.vue +19 -0
  43. package/app/components/shadcn/collapsible/CollapsibleContent.vue +15 -0
  44. package/app/components/shadcn/collapsible/CollapsibleTrigger.vue +15 -0
  45. package/app/components/shadcn/collapsible/index.ts +3 -0
  46. package/app/components/shadcn/command/Command.vue +87 -0
  47. package/app/components/shadcn/command/CommandDialog.vue +31 -0
  48. package/app/components/shadcn/command/CommandEmpty.vue +27 -0
  49. package/app/components/shadcn/command/CommandGroup.vue +45 -0
  50. package/app/components/shadcn/command/CommandInput.vue +39 -0
  51. package/app/components/shadcn/command/CommandItem.vue +76 -0
  52. package/app/components/shadcn/command/CommandList.vue +25 -0
  53. package/app/components/shadcn/command/CommandSeparator.vue +21 -0
  54. package/app/components/shadcn/command/CommandShortcut.vue +17 -0
  55. package/app/components/shadcn/command/index.ts +25 -0
  56. package/app/components/shadcn/dialog/Dialog.vue +19 -0
  57. package/app/components/shadcn/dialog/DialogClose.vue +15 -0
  58. package/app/components/shadcn/dialog/DialogContent.vue +53 -0
  59. package/app/components/shadcn/dialog/DialogDescription.vue +23 -0
  60. package/app/components/shadcn/dialog/DialogFooter.vue +27 -0
  61. package/app/components/shadcn/dialog/DialogHeader.vue +17 -0
  62. package/app/components/shadcn/dialog/DialogOverlay.vue +21 -0
  63. package/app/components/shadcn/dialog/DialogScrollContent.vue +59 -0
  64. package/app/components/shadcn/dialog/DialogTitle.vue +23 -0
  65. package/app/components/shadcn/dialog/DialogTrigger.vue +15 -0
  66. package/app/components/shadcn/dialog/index.ts +10 -0
  67. package/app/components/shadcn/dropdown-menu/DropdownMenu.vue +19 -0
  68. package/app/components/shadcn/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
  69. package/app/components/shadcn/dropdown-menu/DropdownMenuContent.vue +39 -0
  70. package/app/components/shadcn/dropdown-menu/DropdownMenuGroup.vue +15 -0
  71. package/app/components/shadcn/dropdown-menu/DropdownMenuItem.vue +31 -0
  72. package/app/components/shadcn/dropdown-menu/DropdownMenuLabel.vue +23 -0
  73. package/app/components/shadcn/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
  74. package/app/components/shadcn/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
  75. package/app/components/shadcn/dropdown-menu/DropdownMenuSeparator.vue +23 -0
  76. package/app/components/shadcn/dropdown-menu/DropdownMenuShortcut.vue +17 -0
  77. package/app/components/shadcn/dropdown-menu/DropdownMenuSub.vue +18 -0
  78. package/app/components/shadcn/dropdown-menu/DropdownMenuSubContent.vue +27 -0
  79. package/app/components/shadcn/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
  80. package/app/components/shadcn/dropdown-menu/DropdownMenuTrigger.vue +17 -0
  81. package/app/components/shadcn/dropdown-menu/index.ts +16 -0
  82. package/app/components/shadcn/field/Field.vue +25 -0
  83. package/app/components/shadcn/field/FieldContent.vue +20 -0
  84. package/app/components/shadcn/field/FieldDescription.vue +22 -0
  85. package/app/components/shadcn/field/FieldError.vue +53 -0
  86. package/app/components/shadcn/field/FieldGroup.vue +20 -0
  87. package/app/components/shadcn/field/FieldLabel.vue +23 -0
  88. package/app/components/shadcn/field/FieldLegend.vue +24 -0
  89. package/app/components/shadcn/field/FieldSeparator.vue +29 -0
  90. package/app/components/shadcn/field/FieldSet.vue +21 -0
  91. package/app/components/shadcn/field/FieldTitle.vue +20 -0
  92. package/app/components/shadcn/field/index.ts +39 -0
  93. package/app/components/shadcn/input/Input.vue +33 -0
  94. package/app/components/shadcn/input/index.ts +1 -0
  95. package/app/components/shadcn/input-group/InputGroup.vue +35 -0
  96. package/app/components/shadcn/input-group/InputGroupAddon.vue +36 -0
  97. package/app/components/shadcn/input-group/InputGroupButton.vue +29 -0
  98. package/app/components/shadcn/input-group/InputGroupInput.vue +19 -0
  99. package/app/components/shadcn/input-group/InputGroupText.vue +19 -0
  100. package/app/components/shadcn/input-group/InputGroupTextarea.vue +19 -0
  101. package/app/components/shadcn/input-group/index.ts +51 -0
  102. package/app/components/shadcn/label/Label.vue +26 -0
  103. package/app/components/shadcn/label/index.ts +1 -0
  104. package/app/components/shadcn/number-field/NumberField.vue +20 -0
  105. package/app/components/shadcn/number-field/NumberFieldContent.vue +14 -0
  106. package/app/components/shadcn/number-field/NumberFieldDecrement.vue +22 -0
  107. package/app/components/shadcn/number-field/NumberFieldIncrement.vue +22 -0
  108. package/app/components/shadcn/number-field/NumberFieldInput.vue +16 -0
  109. package/app/components/shadcn/number-field/index.ts +5 -0
  110. package/app/components/shadcn/pagination/Pagination.vue +26 -0
  111. package/app/components/shadcn/pagination/PaginationContent.vue +22 -0
  112. package/app/components/shadcn/pagination/PaginationEllipsis.vue +25 -0
  113. package/app/components/shadcn/pagination/PaginationFirst.vue +33 -0
  114. package/app/components/shadcn/pagination/PaginationItem.vue +34 -0
  115. package/app/components/shadcn/pagination/PaginationLast.vue +33 -0
  116. package/app/components/shadcn/pagination/PaginationNext.vue +33 -0
  117. package/app/components/shadcn/pagination/PaginationPrevious.vue +33 -0
  118. package/app/components/shadcn/pagination/index.ts +8 -0
  119. package/app/components/shadcn/pin-input/PinInput.vue +26 -0
  120. package/app/components/shadcn/pin-input/PinInputGroup.vue +21 -0
  121. package/app/components/shadcn/pin-input/PinInputSeparator.vue +19 -0
  122. package/app/components/shadcn/pin-input/PinInputSlot.vue +21 -0
  123. package/app/components/shadcn/pin-input/index.ts +4 -0
  124. package/app/components/shadcn/popover/Popover.vue +19 -0
  125. package/app/components/shadcn/popover/PopoverAnchor.vue +15 -0
  126. package/app/components/shadcn/popover/PopoverContent.vue +45 -0
  127. package/app/components/shadcn/popover/PopoverTrigger.vue +15 -0
  128. package/app/components/shadcn/popover/index.ts +4 -0
  129. package/app/components/shadcn/progress/Progress.vue +38 -0
  130. package/app/components/shadcn/progress/index.ts +1 -0
  131. package/app/components/shadcn/radio-group/RadioGroup.vue +25 -0
  132. package/app/components/shadcn/radio-group/RadioGroupItem.vue +40 -0
  133. package/app/components/shadcn/radio-group/index.ts +2 -0
  134. package/app/components/shadcn/scroll-area/ScrollArea.vue +33 -0
  135. package/app/components/shadcn/scroll-area/ScrollBar.vue +32 -0
  136. package/app/components/shadcn/scroll-area/index.ts +2 -0
  137. package/app/components/shadcn/select/Select.vue +19 -0
  138. package/app/components/shadcn/select/SelectContent.vue +51 -0
  139. package/app/components/shadcn/select/SelectGroup.vue +15 -0
  140. package/app/components/shadcn/select/SelectItem.vue +44 -0
  141. package/app/components/shadcn/select/SelectItemText.vue +15 -0
  142. package/app/components/shadcn/select/SelectLabel.vue +17 -0
  143. package/app/components/shadcn/select/SelectScrollDownButton.vue +26 -0
  144. package/app/components/shadcn/select/SelectScrollUpButton.vue +26 -0
  145. package/app/components/shadcn/select/SelectSeparator.vue +19 -0
  146. package/app/components/shadcn/select/SelectTrigger.vue +33 -0
  147. package/app/components/shadcn/select/SelectValue.vue +15 -0
  148. package/app/components/shadcn/select/index.ts +11 -0
  149. package/app/components/shadcn/separator/Separator.vue +29 -0
  150. package/app/components/shadcn/separator/index.ts +1 -0
  151. package/app/components/shadcn/sheet/Sheet.vue +19 -0
  152. package/app/components/shadcn/sheet/SheetClose.vue +15 -0
  153. package/app/components/shadcn/sheet/SheetContent.vue +62 -0
  154. package/app/components/shadcn/sheet/SheetDescription.vue +21 -0
  155. package/app/components/shadcn/sheet/SheetFooter.vue +16 -0
  156. package/app/components/shadcn/sheet/SheetHeader.vue +15 -0
  157. package/app/components/shadcn/sheet/SheetOverlay.vue +21 -0
  158. package/app/components/shadcn/sheet/SheetTitle.vue +21 -0
  159. package/app/components/shadcn/sheet/SheetTrigger.vue +15 -0
  160. package/app/components/shadcn/sheet/index.ts +8 -0
  161. package/app/components/shadcn/sidebar/Sidebar.vue +96 -0
  162. package/app/components/shadcn/sidebar/SidebarContent.vue +18 -0
  163. package/app/components/shadcn/sidebar/SidebarFooter.vue +18 -0
  164. package/app/components/shadcn/sidebar/SidebarGroup.vue +18 -0
  165. package/app/components/shadcn/sidebar/SidebarGroupAction.vue +27 -0
  166. package/app/components/shadcn/sidebar/SidebarGroupContent.vue +18 -0
  167. package/app/components/shadcn/sidebar/SidebarGroupLabel.vue +25 -0
  168. package/app/components/shadcn/sidebar/SidebarHeader.vue +18 -0
  169. package/app/components/shadcn/sidebar/SidebarInput.vue +22 -0
  170. package/app/components/shadcn/sidebar/SidebarInset.vue +21 -0
  171. package/app/components/shadcn/sidebar/SidebarMenu.vue +18 -0
  172. package/app/components/shadcn/sidebar/SidebarMenuAction.vue +35 -0
  173. package/app/components/shadcn/sidebar/SidebarMenuBadge.vue +26 -0
  174. package/app/components/shadcn/sidebar/SidebarMenuButton.vue +48 -0
  175. package/app/components/shadcn/sidebar/SidebarMenuButtonChild.vue +36 -0
  176. package/app/components/shadcn/sidebar/SidebarMenuItem.vue +18 -0
  177. package/app/components/shadcn/sidebar/SidebarMenuSkeleton.vue +35 -0
  178. package/app/components/shadcn/sidebar/SidebarMenuSub.vue +22 -0
  179. package/app/components/shadcn/sidebar/SidebarMenuSubButton.vue +36 -0
  180. package/app/components/shadcn/sidebar/SidebarMenuSubItem.vue +18 -0
  181. package/app/components/shadcn/sidebar/SidebarProvider.vue +82 -0
  182. package/app/components/shadcn/sidebar/SidebarRail.vue +33 -0
  183. package/app/components/shadcn/sidebar/SidebarSeparator.vue +19 -0
  184. package/app/components/shadcn/sidebar/SidebarTrigger.vue +27 -0
  185. package/app/components/shadcn/sidebar/index.ts +60 -0
  186. package/app/components/shadcn/sidebar/utils.ts +19 -0
  187. package/app/components/shadcn/skeleton/Skeleton.vue +17 -0
  188. package/app/components/shadcn/skeleton/index.ts +1 -0
  189. package/app/components/shadcn/slider/Slider.vue +43 -0
  190. package/app/components/shadcn/slider/index.ts +1 -0
  191. package/app/components/shadcn/sonner/Sonner.vue +42 -0
  192. package/app/components/shadcn/sonner/index.ts +1 -0
  193. package/app/components/shadcn/switch/Switch.vue +38 -0
  194. package/app/components/shadcn/switch/index.ts +1 -0
  195. package/app/components/shadcn/table/Table.vue +16 -0
  196. package/app/components/shadcn/table/TableBody.vue +17 -0
  197. package/app/components/shadcn/table/TableCaption.vue +17 -0
  198. package/app/components/shadcn/table/TableCell.vue +22 -0
  199. package/app/components/shadcn/table/TableEmpty.vue +34 -0
  200. package/app/components/shadcn/table/TableFooter.vue +17 -0
  201. package/app/components/shadcn/table/TableHead.vue +17 -0
  202. package/app/components/shadcn/table/TableHeader.vue +17 -0
  203. package/app/components/shadcn/table/TableRow.vue +17 -0
  204. package/app/components/shadcn/table/index.ts +9 -0
  205. package/app/components/shadcn/table/utils.ts +10 -0
  206. package/app/components/shadcn/tabs/Tabs.vue +24 -0
  207. package/app/components/shadcn/tabs/TabsContent.vue +21 -0
  208. package/app/components/shadcn/tabs/TabsList.vue +24 -0
  209. package/app/components/shadcn/tabs/TabsTrigger.vue +26 -0
  210. package/app/components/shadcn/tabs/index.ts +4 -0
  211. package/app/components/shadcn/textarea/Textarea.vue +28 -0
  212. package/app/components/shadcn/textarea/index.ts +1 -0
  213. package/app/components/shadcn/toggle/Toggle.vue +35 -0
  214. package/app/components/shadcn/toggle/index.ts +28 -0
  215. package/app/components/shadcn/toggle-group/ToggleGroup.vue +49 -0
  216. package/app/components/shadcn/toggle-group/ToggleGroupItem.vue +46 -0
  217. package/app/components/shadcn/toggle-group/index.ts +2 -0
  218. package/app/components/shadcn/tooltip/Tooltip.vue +19 -0
  219. package/app/components/shadcn/tooltip/TooltipContent.vue +34 -0
  220. package/app/components/shadcn/tooltip/TooltipProvider.vue +14 -0
  221. package/app/components/shadcn/tooltip/TooltipTrigger.vue +15 -0
  222. package/app/components/shadcn/tooltip/index.ts +4 -0
  223. package/app/components/ui/Accordion/index.stories.ts +108 -0
  224. package/app/components/ui/Accordion/index.vue +80 -0
  225. package/app/components/ui/Accordion/types.ts +27 -0
  226. package/app/components/ui/Alert/index.stories.ts +53 -0
  227. package/app/components/ui/Alert/index.vue +61 -0
  228. package/app/components/ui/Alert/types.ts +9 -0
  229. package/app/components/ui/AlertDialog/index.stories.ts +108 -0
  230. package/app/components/ui/AlertDialog/index.vue +25 -0
  231. package/app/components/ui/AsyncDataTable/en.json +3 -0
  232. package/app/components/ui/AsyncDataTable/index.stories.ts +141 -0
  233. package/app/components/ui/AsyncDataTable/index.vue +312 -0
  234. package/app/components/ui/AsyncDataTable/types.ts +53 -0
  235. package/app/components/ui/Avatar/index.stories.ts +84 -0
  236. package/app/components/ui/Avatar/index.vue +52 -0
  237. package/app/components/ui/Avatar/types.ts +8 -0
  238. package/app/components/ui/Badge/index.stories.ts +67 -0
  239. package/app/components/ui/Badge/index.vue +12 -0
  240. package/app/components/ui/Badge/types.ts +3 -0
  241. package/app/components/ui/Breadcrumb/index.stories.ts +52 -0
  242. package/app/components/ui/Breadcrumb/index.vue +61 -0
  243. package/app/components/ui/Breadcrumb/types.ts +11 -0
  244. package/app/components/ui/Button/index.stories.ts +145 -0
  245. package/app/components/ui/Button/index.vue +63 -0
  246. package/app/components/ui/Button/types.ts +14 -0
  247. package/app/components/ui/ButtonGroup/index.stories.ts +75 -0
  248. package/app/components/ui/ButtonGroup/index.vue +22 -0
  249. package/app/components/ui/ButtonGroup/types.ts +3 -0
  250. package/app/components/ui/Card/index.stories.ts +65 -0
  251. package/app/components/ui/Card/index.vue +28 -0
  252. package/app/components/ui/Card/types.ts +3 -0
  253. package/app/components/ui/Checkbox/index.stories.ts +68 -0
  254. package/app/components/ui/Checkbox/index.vue +23 -0
  255. package/app/components/ui/Checkbox/types.ts +3 -0
  256. package/app/components/ui/CopyButton/en.json +4 -0
  257. package/app/components/ui/CopyButton/index.stories.ts +55 -0
  258. package/app/components/ui/CopyButton/index.vue +98 -0
  259. package/app/components/ui/CopyButton/types.ts +10 -0
  260. package/app/components/ui/DataTable/en.json +3 -0
  261. package/app/components/ui/DataTable/index.stories.ts +231 -0
  262. package/app/components/ui/DataTable/index.vue +505 -0
  263. package/app/components/ui/DataTable/types.ts +42 -0
  264. package/app/components/ui/DatePicker/en.json +9 -0
  265. package/app/components/ui/DatePicker/index.stories.ts +70 -0
  266. package/app/components/ui/DatePicker/index.vue +127 -0
  267. package/app/components/ui/DatePicker/style.css +88 -0
  268. package/app/components/ui/DatePicker/types.ts +41 -0
  269. package/app/components/ui/DateRangePicker/en.json +5 -0
  270. package/app/components/ui/DateRangePicker/index.stories.ts +67 -0
  271. package/app/components/ui/DateRangePicker/index.vue +138 -0
  272. package/app/components/ui/DateRangePicker/types.ts +31 -0
  273. package/app/components/ui/Divider/index.stories.ts +42 -0
  274. package/app/components/ui/Divider/index.vue +16 -0
  275. package/app/components/ui/Divider/types.ts +3 -0
  276. package/app/components/ui/Drawer/index.stories.ts +124 -0
  277. package/app/components/ui/Drawer/index.vue +197 -0
  278. package/app/components/ui/Drawer/types.ts +22 -0
  279. package/app/components/ui/Dropdown/index.stories.ts +145 -0
  280. package/app/components/ui/Dropdown/index.vue +258 -0
  281. package/app/components/ui/Dropdown/types.ts +87 -0
  282. package/app/components/ui/FormItem/index.stories.ts +70 -0
  283. package/app/components/ui/FormItem/index.vue +56 -0
  284. package/app/components/ui/FormItem/types.ts +14 -0
  285. package/app/components/ui/Help/index.stories.ts +54 -0
  286. package/app/components/ui/Help/index.vue +35 -0
  287. package/app/components/ui/Help/types.ts +8 -0
  288. package/app/components/ui/Icon/index.stories.ts +68 -0
  289. package/app/components/ui/Icon/index.vue +30 -0
  290. package/app/components/ui/Icon/types.ts +5 -0
  291. package/app/components/ui/Input/index.stories.ts +73 -0
  292. package/app/components/ui/Input/index.vue +92 -0
  293. package/app/components/ui/Input/types.ts +9 -0
  294. package/app/components/ui/InputCurrency/index.stories.ts +75 -0
  295. package/app/components/ui/InputCurrency/index.vue +31 -0
  296. package/app/components/ui/InputCurrency/types.ts +4 -0
  297. package/app/components/ui/InputNumber/index.stories.ts +56 -0
  298. package/app/components/ui/InputNumber/index.vue +76 -0
  299. package/app/components/ui/InputNumber/types.ts +10 -0
  300. package/app/components/ui/InputOtp/index.stories.ts +39 -0
  301. package/app/components/ui/InputOtp/index.vue +45 -0
  302. package/app/components/ui/InputOtp/types.ts +5 -0
  303. package/app/components/ui/InputPercent/index.stories.ts +32 -0
  304. package/app/components/ui/InputPercent/index.vue +8 -0
  305. package/app/components/ui/InputRange/index.stories.ts +37 -0
  306. package/app/components/ui/InputRange/index.vue +49 -0
  307. package/app/components/ui/InputRange/types.ts +8 -0
  308. package/app/components/ui/Loading/index.stories.ts +36 -0
  309. package/app/components/ui/Loading/index.vue +15 -0
  310. package/app/components/ui/Loading/types.ts +3 -0
  311. package/app/components/ui/Markdown/index.stories.ts +52 -0
  312. package/app/components/ui/Markdown/index.vue +22 -0
  313. package/app/components/ui/Markdown/themes/github.css +1248 -0
  314. package/app/components/ui/Markdown/types.ts +3 -0
  315. package/app/components/ui/Modal/index.stories.ts +124 -0
  316. package/app/components/ui/Modal/index.vue +202 -0
  317. package/app/components/ui/Modal/types.ts +23 -0
  318. package/app/components/ui/ModalContent/index.stories.ts +47 -0
  319. package/app/components/ui/ModalContent/index.vue +79 -0
  320. package/app/components/ui/ModalContent/types.ts +9 -0
  321. package/app/components/ui/PageCard/index.stories.ts +106 -0
  322. package/app/components/ui/PageCard/index.vue +135 -0
  323. package/app/components/ui/PageCard/types.ts +16 -0
  324. package/app/components/ui/Pagination/en.json +3 -0
  325. package/app/components/ui/Pagination/index.stories.ts +82 -0
  326. package/app/components/ui/Pagination/index.vue +173 -0
  327. package/app/components/ui/Pagination/types.ts +18 -0
  328. package/app/components/ui/Popover/index.stories.ts +67 -0
  329. package/app/components/ui/Popover/index.vue +21 -0
  330. package/app/components/ui/Popover/types.ts +5 -0
  331. package/app/components/ui/Qrcode/index.stories.ts +57 -0
  332. package/app/components/ui/Qrcode/index.vue +40 -0
  333. package/app/components/ui/Qrcode/types.ts +3 -0
  334. package/app/components/ui/Radio/index.stories.ts +71 -0
  335. package/app/components/ui/Radio/index.vue +10 -0
  336. package/app/components/ui/Radio/types.ts +3 -0
  337. package/app/components/ui/RadioCardGroup/index.stories.ts +90 -0
  338. package/app/components/ui/RadioCardGroup/index.vue +64 -0
  339. package/app/components/ui/RadioCardGroup/types.ts +13 -0
  340. package/app/components/ui/ScrollArea/index.stories.ts +66 -0
  341. package/app/components/ui/ScrollArea/index.vue +64 -0
  342. package/app/components/ui/ScrollArea/types.ts +5 -0
  343. package/app/components/ui/SearchSelect/en.json +5 -0
  344. package/app/components/ui/SearchSelect/index.stories.ts +126 -0
  345. package/app/components/ui/SearchSelect/index.vue +259 -0
  346. package/app/components/ui/SearchSelect/types.ts +39 -0
  347. package/app/components/ui/Select/en.json +6 -0
  348. package/app/components/ui/Select/index.stories.ts +128 -0
  349. package/app/components/ui/Select/index.vue +267 -0
  350. package/app/components/ui/Select/types.ts +34 -0
  351. package/app/components/ui/Skeleton/index.stories.ts +56 -0
  352. package/app/components/ui/Skeleton/index.vue +12 -0
  353. package/app/components/ui/Skeleton/types.ts +4 -0
  354. package/app/components/ui/Slider/index.stories.ts +60 -0
  355. package/app/components/ui/Slider/index.vue +27 -0
  356. package/app/components/ui/Slider/types.ts +5 -0
  357. package/app/components/ui/Surface/index.stories.ts +50 -0
  358. package/app/components/ui/Surface/index.vue +108 -0
  359. package/app/components/ui/Surface/types.ts +8 -0
  360. package/app/components/ui/Switch/index.stories.ts +32 -0
  361. package/app/components/ui/Switch/index.vue +10 -0
  362. package/app/components/ui/Switch/types.ts +3 -0
  363. package/app/components/ui/Tabs/index.stories.ts +116 -0
  364. package/app/components/ui/Tabs/index.vue +94 -0
  365. package/app/components/ui/Tabs/types.ts +19 -0
  366. package/app/components/ui/Tag/index.stories.ts +51 -0
  367. package/app/components/ui/Tag/index.vue +108 -0
  368. package/app/components/ui/Tag/types.ts +8 -0
  369. package/app/components/ui/Textarea/index.stories.ts +35 -0
  370. package/app/components/ui/Textarea/index.vue +50 -0
  371. package/app/components/ui/Textarea/types.ts +8 -0
  372. package/app/components/ui/Toast/index.stories.ts +48 -0
  373. package/app/components/ui/Toast/index.vue +21 -0
  374. package/app/components/ui/Toast/types.ts +5 -0
  375. package/app/components/ui/Tooltip/index.stories.ts +62 -0
  376. package/app/components/ui/Tooltip/index.vue +72 -0
  377. package/app/components/ui/Tooltip/types.ts +7 -0
  378. package/app/components/ui/WebLink/index.stories.ts +59 -0
  379. package/app/components/ui/WebLink/index.vue +61 -0
  380. package/app/components/ui/WebLink/types.ts +11 -0
  381. package/app/composables/index.ts +9 -0
  382. package/app/composables/useDialog.ts +76 -0
  383. package/app/composables/useToast.ts +49 -0
  384. package/app/en.json +23 -0
  385. package/app/types/index.ts +7 -0
  386. package/app/utils/index.ts +6 -0
  387. package/i18n/messages/ar.json +65 -0
  388. package/i18n/messages/de.json +65 -0
  389. package/i18n/messages/en.json +65 -0
  390. package/i18n/messages/es.json +65 -0
  391. package/i18n/messages/fr.json +65 -0
  392. package/i18n/messages/hi.json +65 -0
  393. package/i18n/messages/id.json +65 -0
  394. package/i18n/messages/it.json +65 -0
  395. package/i18n/messages/ja.json +65 -0
  396. package/i18n/messages/ko.json +65 -0
  397. package/i18n/messages/nl.json +65 -0
  398. package/i18n/messages/pl.json +65 -0
  399. package/i18n/messages/pt.json +65 -0
  400. package/i18n/messages/ru.json +65 -0
  401. package/i18n/messages/th.json +65 -0
  402. package/i18n/messages/tr.json +65 -0
  403. package/i18n/messages/vi.json +65 -0
  404. package/i18n/messages/zh-CN.json +65 -0
  405. package/i18n/messages/zh-TW.json +65 -0
  406. package/i18n.config.ts +19 -0
  407. package/nuxt.config.ts +62 -0
  408. package/package.json +46 -0
@@ -0,0 +1,42 @@
1
+ <script lang="ts" setup>
2
+ import type { ToasterProps } from "vue-sonner"
3
+ import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-vue-next"
4
+ import { Toaster as Sonner } from "vue-sonner"
5
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
6
+
7
+ const props = defineProps<ToasterProps>()
8
+ </script>
9
+
10
+ <template>
11
+ <Sonner
12
+ :class="cn('toaster group', props.class)"
13
+ :style="{
14
+ '--normal-bg': 'var(--popover)',
15
+ '--normal-text': 'var(--popover-foreground)',
16
+ '--normal-border': 'var(--border)',
17
+ '--border-radius': 'var(--radius)',
18
+ }"
19
+ v-bind="props"
20
+ >
21
+ <template #success-icon>
22
+ <CircleCheckIcon class="size-4" />
23
+ </template>
24
+ <template #info-icon>
25
+ <InfoIcon class="size-4" />
26
+ </template>
27
+ <template #warning-icon>
28
+ <TriangleAlertIcon class="size-4" />
29
+ </template>
30
+ <template #error-icon>
31
+ <OctagonXIcon class="size-4" />
32
+ </template>
33
+ <template #loading-icon>
34
+ <div>
35
+ <Loader2Icon class="size-4 animate-spin" />
36
+ </div>
37
+ </template>
38
+ <template #close-icon>
39
+ <XIcon class="size-4" />
40
+ </template>
41
+ </Sonner>
42
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Toaster } from "./Sonner.vue"
@@ -0,0 +1,38 @@
1
+ <script setup lang="ts">
2
+ import type { SwitchRootEmits, SwitchRootProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import { reactiveOmit } from "@vueuse/core"
5
+ import {
6
+ SwitchRoot,
7
+ SwitchThumb,
8
+ useForwardPropsEmits,
9
+ } from "reka-ui"
10
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
11
+
12
+ const props = defineProps<SwitchRootProps & { class?: HTMLAttributes["class"] }>()
13
+
14
+ const emits = defineEmits<SwitchRootEmits>()
15
+
16
+ const delegatedProps = reactiveOmit(props, "class")
17
+
18
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
19
+ </script>
20
+
21
+ <template>
22
+ <SwitchRoot
23
+ v-slot="slotProps"
24
+ data-slot="switch"
25
+ v-bind="forwarded"
26
+ :class="cn(
27
+ 'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
28
+ props.class,
29
+ )"
30
+ >
31
+ <SwitchThumb
32
+ data-slot="switch-thumb"
33
+ :class="cn('bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0')"
34
+ >
35
+ <slot name="thumb" v-bind="slotProps" />
36
+ </SwitchThumb>
37
+ </SwitchRoot>
38
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Switch } from "./Switch.vue"
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <div data-slot="table-container" class="relative w-full overflow-auto">
12
+ <table data-slot="table" :class="cn('w-full caption-bottom text-sm', props.class)">
13
+ <slot />
14
+ </table>
15
+ </div>
16
+ </template>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <tbody
12
+ data-slot="table-body"
13
+ :class="cn('[&_tr:last-child]:border-0', props.class)"
14
+ >
15
+ <slot />
16
+ </tbody>
17
+ </template>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <caption
12
+ data-slot="table-caption"
13
+ :class="cn('text-muted-foreground mt-4 text-sm', props.class)"
14
+ >
15
+ <slot />
16
+ </caption>
17
+ </template>
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <td
12
+ data-slot="table-cell"
13
+ :class="
14
+ cn(
15
+ 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
16
+ props.class,
17
+ )
18
+ "
19
+ >
20
+ <slot />
21
+ </td>
22
+ </template>
@@ -0,0 +1,34 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { reactiveOmit } from "@vueuse/core"
4
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
5
+ import TableCell from "./TableCell.vue"
6
+ import TableRow from "./TableRow.vue"
7
+
8
+ const props = withDefaults(defineProps<{
9
+ class?: HTMLAttributes["class"]
10
+ colspan?: number
11
+ }>(), {
12
+ colspan: 1,
13
+ })
14
+
15
+ const delegatedProps = reactiveOmit(props, "class")
16
+ </script>
17
+
18
+ <template>
19
+ <TableRow>
20
+ <TableCell
21
+ :class="
22
+ cn(
23
+ 'p-4 whitespace-nowrap align-middle text-sm text-foreground',
24
+ props.class,
25
+ )
26
+ "
27
+ v-bind="delegatedProps"
28
+ >
29
+ <div class="flex items-center justify-center py-10">
30
+ <slot />
31
+ </div>
32
+ </TableCell>
33
+ </TableRow>
34
+ </template>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <tfoot
12
+ data-slot="table-footer"
13
+ :class="cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', props.class)"
14
+ >
15
+ <slot />
16
+ </tfoot>
17
+ </template>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <th
12
+ data-slot="table-head"
13
+ :class="cn('text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]', props.class)"
14
+ >
15
+ <slot />
16
+ </th>
17
+ </template>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <thead
12
+ data-slot="table-header"
13
+ :class="cn('[&_tr]:border-b', props.class)"
14
+ >
15
+ <slot />
16
+ </thead>
17
+ </template>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"]
7
+ }>()
8
+ </script>
9
+
10
+ <template>
11
+ <tr
12
+ data-slot="table-row"
13
+ :class="cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', props.class)"
14
+ >
15
+ <slot />
16
+ </tr>
17
+ </template>
@@ -0,0 +1,9 @@
1
+ export { default as Table } from "./Table.vue"
2
+ export { default as TableBody } from "./TableBody.vue"
3
+ export { default as TableCaption } from "./TableCaption.vue"
4
+ export { default as TableCell } from "./TableCell.vue"
5
+ export { default as TableEmpty } from "./TableEmpty.vue"
6
+ export { default as TableFooter } from "./TableFooter.vue"
7
+ export { default as TableHead } from "./TableHead.vue"
8
+ export { default as TableHeader } from "./TableHeader.vue"
9
+ export { default as TableRow } from "./TableRow.vue"
@@ -0,0 +1,10 @@
1
+ import type { Updater } from "@tanstack/vue-table"
2
+
3
+ import type { Ref } from "vue"
4
+ import { isFunction } from "@tanstack/vue-table"
5
+
6
+ export function valueUpdater<T>(updaterOrValue: Updater<T>, ref: Ref<T>) {
7
+ ref.value = isFunction(updaterOrValue)
8
+ ? updaterOrValue(ref.value)
9
+ : updaterOrValue
10
+ }
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import type { TabsRootEmits, TabsRootProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import { reactiveOmit } from "@vueuse/core"
5
+ import { TabsRoot, useForwardPropsEmits } from "reka-ui"
6
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
7
+
8
+ const props = defineProps<TabsRootProps & { class?: HTMLAttributes["class"] }>()
9
+ const emits = defineEmits<TabsRootEmits>()
10
+
11
+ const delegatedProps = reactiveOmit(props, "class")
12
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
13
+ </script>
14
+
15
+ <template>
16
+ <TabsRoot
17
+ v-slot="slotProps"
18
+ data-slot="tabs"
19
+ v-bind="forwarded"
20
+ :class="cn('flex flex-col gap-2', props.class)"
21
+ >
22
+ <slot v-bind="slotProps" />
23
+ </TabsRoot>
24
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import type { TabsContentProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import { reactiveOmit } from "@vueuse/core"
5
+ import { TabsContent } from "reka-ui"
6
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
7
+
8
+ const props = defineProps<TabsContentProps & { class?: HTMLAttributes["class"] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, "class")
11
+ </script>
12
+
13
+ <template>
14
+ <TabsContent
15
+ data-slot="tabs-content"
16
+ :class="cn('flex-1 outline-none', props.class)"
17
+ v-bind="delegatedProps"
18
+ >
19
+ <slot />
20
+ </TabsContent>
21
+ </template>
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import type { TabsListProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import { reactiveOmit } from "@vueuse/core"
5
+ import { TabsList } from "reka-ui"
6
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
7
+
8
+ const props = defineProps<TabsListProps & { class?: HTMLAttributes["class"] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, "class")
11
+ </script>
12
+
13
+ <template>
14
+ <TabsList
15
+ data-slot="tabs-list"
16
+ v-bind="delegatedProps"
17
+ :class="cn(
18
+ 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',
19
+ props.class,
20
+ )"
21
+ >
22
+ <slot />
23
+ </TabsList>
24
+ </template>
@@ -0,0 +1,26 @@
1
+ <script setup lang="ts">
2
+ import type { TabsTriggerProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import { reactiveOmit } from "@vueuse/core"
5
+ import { TabsTrigger, useForwardProps } from "reka-ui"
6
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
7
+
8
+ const props = defineProps<TabsTriggerProps & { class?: HTMLAttributes["class"] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, "class")
11
+
12
+ const forwardedProps = useForwardProps(delegatedProps)
13
+ </script>
14
+
15
+ <template>
16
+ <TabsTrigger
17
+ data-slot="tabs-trigger"
18
+ :class="cn(
19
+ 'data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
20
+ props.class,
21
+ )"
22
+ v-bind="forwardedProps"
23
+ >
24
+ <slot />
25
+ </TabsTrigger>
26
+ </template>
@@ -0,0 +1,4 @@
1
+ export { default as Tabs } from "./Tabs.vue"
2
+ export { default as TabsContent } from "./TabsContent.vue"
3
+ export { default as TabsList } from "./TabsList.vue"
4
+ export { default as TabsTrigger } from "./TabsTrigger.vue"
@@ -0,0 +1,28 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue"
3
+ import { useVModel } from "@vueuse/core"
4
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
5
+
6
+ const props = defineProps<{
7
+ class?: HTMLAttributes["class"]
8
+ defaultValue?: string | number
9
+ modelValue?: string | number
10
+ }>()
11
+
12
+ const emits = defineEmits<{
13
+ (e: "update:modelValue", payload: string | number): void
14
+ }>()
15
+
16
+ const modelValue = useVModel(props, "modelValue", emits, {
17
+ passive: true,
18
+ defaultValue: props.defaultValue,
19
+ })
20
+ </script>
21
+
22
+ <template>
23
+ <textarea
24
+ v-model="modelValue"
25
+ data-slot="textarea"
26
+ :class="cn('border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', props.class)"
27
+ />
28
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Textarea } from "./Textarea.vue"
@@ -0,0 +1,35 @@
1
+ <script setup lang="ts">
2
+ import type { ToggleEmits, ToggleProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import type { ToggleVariants } from "."
5
+ import { reactiveOmit } from "@vueuse/core"
6
+ import { Toggle, useForwardPropsEmits } from "reka-ui"
7
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
8
+ import { toggleVariants } from "."
9
+
10
+ const props = withDefaults(defineProps<ToggleProps & {
11
+ class?: HTMLAttributes["class"]
12
+ variant?: ToggleVariants["variant"]
13
+ size?: ToggleVariants["size"]
14
+ }>(), {
15
+ variant: "default",
16
+ size: "default",
17
+ disabled: false,
18
+ })
19
+
20
+ const emits = defineEmits<ToggleEmits>()
21
+
22
+ const delegatedProps = reactiveOmit(props, "class", "size", "variant")
23
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
24
+ </script>
25
+
26
+ <template>
27
+ <Toggle
28
+ v-slot="slotProps"
29
+ data-slot="toggle"
30
+ v-bind="forwarded"
31
+ :class="cn(toggleVariants({ variant, size }), props.class)"
32
+ >
33
+ <slot v-bind="slotProps" />
34
+ </Toggle>
35
+ </template>
@@ -0,0 +1,28 @@
1
+ import type { VariantProps } from "class-variance-authority"
2
+ import { cva } from "class-variance-authority"
3
+
4
+ export { default as Toggle } from "./Toggle.vue"
5
+
6
+ export const toggleVariants = cva(
7
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-transparent",
12
+ outline:
13
+ "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
14
+ },
15
+ size: {
16
+ default: "h-9 px-2 min-w-9",
17
+ sm: "h-8 px-1.5 min-w-8",
18
+ lg: "h-10 px-2.5 min-w-10",
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ variant: "default",
23
+ size: "default",
24
+ },
25
+ },
26
+ )
27
+
28
+ export type ToggleVariants = VariantProps<typeof toggleVariants>
@@ -0,0 +1,49 @@
1
+ <script setup lang="ts">
2
+ import type { VariantProps } from "class-variance-authority"
3
+ import type { ToggleGroupRootEmits, ToggleGroupRootProps } from "reka-ui"
4
+ import type { HTMLAttributes } from "vue"
5
+ import type { toggleVariants } from '@polymarbot/nuxt-layer-shadcn-ui/app/components/shadcn/toggle'
6
+ import { reactiveOmit } from "@vueuse/core"
7
+ import { ToggleGroupRoot, useForwardPropsEmits } from "reka-ui"
8
+ import { provide } from "vue"
9
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
10
+
11
+ type ToggleGroupVariants = VariantProps<typeof toggleVariants>
12
+
13
+ const props = withDefaults(defineProps<ToggleGroupRootProps & {
14
+ class?: HTMLAttributes["class"]
15
+ variant?: ToggleGroupVariants["variant"]
16
+ size?: ToggleGroupVariants["size"]
17
+ spacing?: number
18
+ }>(), {
19
+ spacing: 0,
20
+ })
21
+
22
+ const emits = defineEmits<ToggleGroupRootEmits>()
23
+
24
+ provide("toggleGroup", {
25
+ variant: props.variant,
26
+ size: props.size,
27
+ spacing: props.spacing,
28
+ })
29
+
30
+ const delegatedProps = reactiveOmit(props, "class", "size", "variant")
31
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
32
+ </script>
33
+
34
+ <template>
35
+ <ToggleGroupRoot
36
+ v-slot="slotProps"
37
+ data-slot="toggle-group"
38
+ :data-size="size"
39
+ :data-variant="variant"
40
+ :data-spacing="spacing"
41
+ :style="{
42
+ '--gap': spacing,
43
+ }"
44
+ v-bind="forwarded"
45
+ :class="cn('group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs', props.class)"
46
+ >
47
+ <slot v-bind="slotProps" />
48
+ </ToggleGroupRoot>
49
+ </template>
@@ -0,0 +1,46 @@
1
+ <script setup lang="ts">
2
+ import type { VariantProps } from "class-variance-authority"
3
+ import type { ToggleGroupItemProps } from "reka-ui"
4
+ import type { HTMLAttributes } from "vue"
5
+ import { reactiveOmit } from "@vueuse/core"
6
+ import { ToggleGroupItem, useForwardProps } from "reka-ui"
7
+ import { inject } from "vue"
8
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
9
+ import { toggleVariants } from '@polymarbot/nuxt-layer-shadcn-ui/app/components/shadcn/toggle'
10
+
11
+ type ToggleGroupVariants = VariantProps<typeof toggleVariants> & {
12
+ spacing?: number
13
+ }
14
+
15
+ const props = defineProps<ToggleGroupItemProps & {
16
+ class?: HTMLAttributes["class"]
17
+ variant?: ToggleGroupVariants["variant"]
18
+ size?: ToggleGroupVariants["size"]
19
+ }>()
20
+
21
+ const context = inject<ToggleGroupVariants>("toggleGroup")
22
+
23
+ const delegatedProps = reactiveOmit(props, "class", "size", "variant")
24
+ const forwardedProps = useForwardProps(delegatedProps)
25
+ </script>
26
+
27
+ <template>
28
+ <ToggleGroupItem
29
+ v-slot="slotProps"
30
+ data-slot="toggle-group-item"
31
+ :data-variant="context?.variant || variant"
32
+ :data-size="context?.size || size"
33
+ :data-spacing="context?.spacing"
34
+ v-bind="forwardedProps"
35
+ :class="cn(
36
+ toggleVariants({
37
+ variant: context?.variant || variant,
38
+ size: context?.size || size,
39
+ }),
40
+ 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10',
41
+ 'data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l',
42
+ props.class)"
43
+ >
44
+ <slot v-bind="slotProps" />
45
+ </ToggleGroupItem>
46
+ </template>
@@ -0,0 +1,2 @@
1
+ export { default as ToggleGroup } from "./ToggleGroup.vue"
2
+ export { default as ToggleGroupItem } from "./ToggleGroupItem.vue"
@@ -0,0 +1,19 @@
1
+ <script setup lang="ts">
2
+ import type { TooltipRootEmits, TooltipRootProps } from "reka-ui"
3
+ import { TooltipRoot, useForwardPropsEmits } from "reka-ui"
4
+
5
+ const props = defineProps<TooltipRootProps>()
6
+ const emits = defineEmits<TooltipRootEmits>()
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits)
9
+ </script>
10
+
11
+ <template>
12
+ <TooltipRoot
13
+ v-slot="slotProps"
14
+ data-slot="tooltip"
15
+ v-bind="forwarded"
16
+ >
17
+ <slot v-bind="slotProps" />
18
+ </TooltipRoot>
19
+ </template>
@@ -0,0 +1,34 @@
1
+ <script setup lang="ts">
2
+ import type { TooltipContentEmits, TooltipContentProps } from "reka-ui"
3
+ import type { HTMLAttributes } from "vue"
4
+ import { reactiveOmit } from "@vueuse/core"
5
+ import { TooltipArrow, TooltipContent, TooltipPortal, useForwardPropsEmits } from "reka-ui"
6
+ import { cn } from '@polymarbot/nuxt-layer-shadcn-ui/app/utils'
7
+
8
+ defineOptions({
9
+ inheritAttrs: false,
10
+ })
11
+
12
+ const props = withDefaults(defineProps<TooltipContentProps & { class?: HTMLAttributes["class"] }>(), {
13
+ sideOffset: 4,
14
+ })
15
+
16
+ const emits = defineEmits<TooltipContentEmits>()
17
+
18
+ const delegatedProps = reactiveOmit(props, "class")
19
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
20
+ </script>
21
+
22
+ <template>
23
+ <TooltipPortal>
24
+ <TooltipContent
25
+ data-slot="tooltip-content"
26
+ v-bind="{ ...forwarded, ...$attrs }"
27
+ :class="cn('bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance', props.class)"
28
+ >
29
+ <slot />
30
+
31
+ <TooltipArrow class="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
32
+ </TooltipContent>
33
+ </TooltipPortal>
34
+ </template>