@reinvented/design 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/docs/components/alert-dialog.md +32 -0
  2. package/docs/components/avatar.md +14 -0
  3. package/docs/components/badge.md +24 -0
  4. package/docs/components/button.md +69 -0
  5. package/docs/components/card.md +49 -0
  6. package/docs/components/dialog.md +46 -0
  7. package/docs/components/dropdown-menu.md +32 -0
  8. package/docs/components/index.md +69 -50
  9. package/docs/components/input.md +34 -0
  10. package/docs/components/remaining-components.md +253 -0
  11. package/docs/components/scroll-area.md +17 -0
  12. package/docs/components/select.md +31 -0
  13. package/docs/components/separator.md +14 -0
  14. package/docs/components/sheet.md +32 -0
  15. package/docs/components/skeleton.md +20 -0
  16. package/docs/components/table.md +33 -0
  17. package/docs/components/tabs.md +23 -0
  18. package/docs/layouts/dashboard.md +70 -0
  19. package/docs/layouts/detail-page.md +83 -0
  20. package/docs/layouts/index.md +37 -24
  21. package/docs/layouts/list-page.md +107 -0
  22. package/docs/layouts/settings-page.md +79 -0
  23. package/docs/layouts/step-wizard.md +73 -0
  24. package/package.json +1 -1
  25. package/src/components/ui/accordion/Accordion.vue +13 -0
  26. package/src/components/ui/accordion/AccordionContent.vue +20 -0
  27. package/src/components/ui/accordion/AccordionItem.vue +15 -0
  28. package/src/components/ui/accordion/AccordionTrigger.vue +25 -0
  29. package/src/components/ui/accordion/index.ts +4 -0
  30. package/src/components/ui/alert/Alert.vue +38 -0
  31. package/src/components/ui/alert/AlertDescription.vue +12 -0
  32. package/src/components/ui/alert/AlertTitle.vue +12 -0
  33. package/src/components/ui/alert/index.ts +3 -0
  34. package/src/components/ui/alert-dialog/AlertDialog.vue +13 -0
  35. package/src/components/ui/alert-dialog/AlertDialogAction.vue +21 -0
  36. package/src/components/ui/alert-dialog/AlertDialogCancel.vue +21 -0
  37. package/src/components/ui/alert-dialog/AlertDialogContent.vue +39 -0
  38. package/src/components/ui/alert-dialog/AlertDialogDescription.vue +15 -0
  39. package/src/components/ui/alert-dialog/AlertDialogFooter.vue +12 -0
  40. package/src/components/ui/alert-dialog/AlertDialogHeader.vue +12 -0
  41. package/src/components/ui/alert-dialog/AlertDialogTitle.vue +15 -0
  42. package/src/components/ui/alert-dialog/AlertDialogTrigger.vue +11 -0
  43. package/src/components/ui/alert-dialog/index.ts +9 -0
  44. package/src/components/ui/breadcrumb/Breadcrumb.vue +6 -0
  45. package/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +12 -0
  46. package/src/components/ui/breadcrumb/BreadcrumbItem.vue +6 -0
  47. package/src/components/ui/breadcrumb/BreadcrumbLink.vue +20 -0
  48. package/src/components/ui/breadcrumb/BreadcrumbList.vue +6 -0
  49. package/src/components/ui/breadcrumb/BreadcrumbPage.vue +6 -0
  50. package/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +11 -0
  51. package/src/components/ui/breadcrumb/index.ts +7 -0
  52. package/src/components/ui/button/Button.vue +0 -1
  53. package/src/components/ui/checkbox/Checkbox.vue +25 -0
  54. package/src/components/ui/checkbox/index.ts +1 -0
  55. package/src/components/ui/collapsible/Collapsible.vue +13 -0
  56. package/src/components/ui/collapsible/index.ts +2 -0
  57. package/src/components/ui/command/Command.vue +16 -0
  58. package/src/components/ui/command/CommandEmpty.vue +5 -0
  59. package/src/components/ui/command/CommandGroup.vue +22 -0
  60. package/src/components/ui/command/CommandInput.vue +21 -0
  61. package/src/components/ui/command/CommandItem.vue +22 -0
  62. package/src/components/ui/command/CommandList.vue +17 -0
  63. package/src/components/ui/command/CommandSeparator.vue +5 -0
  64. package/src/components/ui/command/index.ts +7 -0
  65. package/src/components/ui/context-menu/ContextMenuContent.vue +24 -0
  66. package/src/components/ui/context-menu/ContextMenuItem.vue +16 -0
  67. package/src/components/ui/context-menu/ContextMenuLabel.vue +9 -0
  68. package/src/components/ui/context-menu/ContextMenuSeparator.vue +9 -0
  69. package/src/components/ui/context-menu/ContextMenuSubContent.vue +14 -0
  70. package/src/components/ui/context-menu/index.ts +9 -0
  71. package/src/components/ui/dialog/Dialog.vue +14 -0
  72. package/src/components/ui/dialog/DialogClose.vue +12 -0
  73. package/src/components/ui/dialog/DialogContent.vue +48 -0
  74. package/src/components/ui/dialog/DialogDescription.vue +23 -0
  75. package/src/components/ui/dialog/DialogFooter.vue +12 -0
  76. package/src/components/ui/dialog/DialogHeader.vue +12 -0
  77. package/src/components/ui/dialog/DialogScrollContent.vue +47 -0
  78. package/src/components/ui/dialog/DialogTitle.vue +23 -0
  79. package/src/components/ui/dialog/DialogTrigger.vue +12 -0
  80. package/src/components/ui/dialog/index.ts +9 -0
  81. package/src/components/ui/dropdown-menu/DropdownMenu.vue +13 -0
  82. package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +28 -0
  83. package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +33 -0
  84. package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +11 -0
  85. package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +27 -0
  86. package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
  87. package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +13 -0
  88. package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +27 -0
  89. package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +13 -0
  90. package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +12 -0
  91. package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +13 -0
  92. package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
  93. package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +23 -0
  94. package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +11 -0
  95. package/src/components/ui/dropdown-menu/index.ts +14 -0
  96. package/src/components/ui/form/FormControl.vue +3 -0
  97. package/src/components/ui/form/FormDescription.vue +6 -0
  98. package/src/components/ui/form/FormItem.vue +6 -0
  99. package/src/components/ui/form/FormLabel.vue +10 -0
  100. package/src/components/ui/form/FormMessage.vue +10 -0
  101. package/src/components/ui/form/index.ts +9 -0
  102. package/src/components/ui/hover-card/HoverCard.vue +13 -0
  103. package/src/components/ui/hover-card/HoverCardContent.vue +26 -0
  104. package/src/components/ui/hover-card/HoverCardTrigger.vue +11 -0
  105. package/src/components/ui/hover-card/index.ts +3 -0
  106. package/src/components/ui/label/Label.vue +18 -0
  107. package/src/components/ui/label/index.ts +1 -0
  108. package/src/components/ui/menubar/MenubarContent.vue +15 -0
  109. package/src/components/ui/menubar/MenubarItem.vue +13 -0
  110. package/src/components/ui/menubar/MenubarTrigger.vue +13 -0
  111. package/src/components/ui/menubar/index.ts +5 -0
  112. package/src/components/ui/navigation-menu/NavigationMenuContent.vue +14 -0
  113. package/src/components/ui/navigation-menu/NavigationMenuTrigger.vue +15 -0
  114. package/src/components/ui/navigation-menu/index.ts +4 -0
  115. package/src/components/ui/pagination/PaginationContent.vue +13 -0
  116. package/src/components/ui/pagination/PaginationEllipsis.vue +12 -0
  117. package/src/components/ui/pagination/PaginationNext.vue +14 -0
  118. package/src/components/ui/pagination/PaginationPrev.vue +14 -0
  119. package/src/components/ui/pagination/index.ts +6 -0
  120. package/src/components/ui/popover/Popover.vue +13 -0
  121. package/src/components/ui/popover/PopoverContent.vue +27 -0
  122. package/src/components/ui/popover/PopoverTrigger.vue +11 -0
  123. package/src/components/ui/popover/index.ts +3 -0
  124. package/src/components/ui/progress/Progress.vue +21 -0
  125. package/src/components/ui/progress/index.ts +1 -0
  126. package/src/components/ui/radio-group/RadioGroup.vue +16 -0
  127. package/src/components/ui/radio-group/RadioGroupItem.vue +24 -0
  128. package/src/components/ui/radio-group/index.ts +2 -0
  129. package/src/components/ui/select/Select.vue +13 -0
  130. package/src/components/ui/select/SelectContent.vue +40 -0
  131. package/src/components/ui/select/SelectGroup.vue +15 -0
  132. package/src/components/ui/select/SelectItem.vue +30 -0
  133. package/src/components/ui/select/SelectLabel.vue +15 -0
  134. package/src/components/ui/select/SelectSeparator.vue +13 -0
  135. package/src/components/ui/select/SelectTrigger.vue +23 -0
  136. package/src/components/ui/select/SelectValue.vue +11 -0
  137. package/src/components/ui/select/index.ts +8 -0
  138. package/src/components/ui/sheet/Sheet.vue +13 -0
  139. package/src/components/ui/sheet/SheetClose.vue +11 -0
  140. package/src/components/ui/sheet/SheetContent.vue +65 -0
  141. package/src/components/ui/sheet/SheetDescription.vue +15 -0
  142. package/src/components/ui/sheet/SheetFooter.vue +12 -0
  143. package/src/components/ui/sheet/SheetHeader.vue +12 -0
  144. package/src/components/ui/sheet/SheetTitle.vue +15 -0
  145. package/src/components/ui/sheet/SheetTrigger.vue +11 -0
  146. package/src/components/ui/sheet/index.ts +8 -0
  147. package/src/components/ui/slider/Slider.vue +26 -0
  148. package/src/components/ui/slider/index.ts +1 -0
  149. package/src/components/ui/switch/Switch.vue +24 -0
  150. package/src/components/ui/switch/index.ts +1 -0
  151. package/src/components/ui/table/Table.vue +13 -0
  152. package/src/components/ui/table/TableBody.vue +6 -0
  153. package/src/components/ui/table/TableCaption.vue +6 -0
  154. package/src/components/ui/table/TableCell.vue +6 -0
  155. package/src/components/ui/table/TableFooter.vue +6 -0
  156. package/src/components/ui/table/TableHead.vue +6 -0
  157. package/src/components/ui/table/TableHeader.vue +6 -0
  158. package/src/components/ui/table/TableRow.vue +6 -0
  159. package/src/components/ui/table/index.ts +8 -0
  160. package/src/components/ui/tabs/Tabs.vue +13 -0
  161. package/src/components/ui/tabs/TabsContent.vue +21 -0
  162. package/src/components/ui/tabs/TabsList.vue +21 -0
  163. package/src/components/ui/tabs/TabsTrigger.vue +21 -0
  164. package/src/components/ui/tabs/index.ts +4 -0
  165. package/src/components/ui/textarea/Textarea.vue +29 -0
  166. package/src/components/ui/textarea/index.ts +1 -0
  167. package/src/components/ui/toggle/Toggle.vue +40 -0
  168. package/src/components/ui/toggle/index.ts +1 -0
  169. package/src/components/ui/toggle-group/ToggleGroup.vue +16 -0
  170. package/src/components/ui/toggle-group/ToggleGroupItem.vue +21 -0
  171. package/src/components/ui/toggle-group/index.ts +2 -0
  172. package/src/components/ui/tooltip/Tooltip.vue +13 -0
  173. package/src/components/ui/tooltip/TooltipContent.vue +27 -0
  174. package/src/components/ui/tooltip/TooltipProvider.vue +12 -0
  175. package/src/components/ui/tooltip/TooltipTrigger.vue +11 -0
  176. package/src/components/ui/tooltip/index.ts +4 -0
  177. package/src/index.ts +46 -192
  178. package/src/patterns/DetailView.vue +2 -2
  179. package/src/patterns/EmptyState.vue +2 -2
  180. package/src/patterns/FormView.vue +2 -2
  181. package/src/patterns/ListView.vue +2 -2
  182. package/tsconfig.json +17 -3
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { ContextMenuContent, type ContextMenuContentEmits, type ContextMenuContentProps, ContextMenuPortal, useForwardPropsEmits } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+
6
+ const props = defineProps<ContextMenuContentProps & { class?: HTMLAttributes['class'] }>()
7
+ const emits = defineEmits<ContextMenuContentEmits>()
8
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
9
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
10
+ </script>
11
+
12
+ <template>
13
+ <ContextMenuPortal>
14
+ <ContextMenuContent
15
+ v-bind="forwarded"
16
+ :class="cn(
17
+ 'z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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',
18
+ props.class,
19
+ )"
20
+ >
21
+ <slot />
22
+ </ContextMenuContent>
23
+ </ContextMenuPortal>
24
+ </template>
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { ContextMenuItem, type ContextMenuItemProps, useForwardProps } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+
6
+ interface Props extends ContextMenuItemProps { class?: HTMLAttributes['class']; inset?: boolean }
7
+ const props = defineProps<Props>()
8
+ const delegatedProps = computed(() => { const { class: _, inset: _i, ...d } = props; return d })
9
+ const forwardedProps = useForwardProps(delegatedProps)
10
+ </script>
11
+
12
+ <template>
13
+ <ContextMenuItem v-bind="forwardedProps" :class="cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', props.class)">
14
+ <slot />
15
+ </ContextMenuItem>
16
+ </template>
@@ -0,0 +1,9 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { ContextMenuLabel, type ContextMenuLabelProps, useForwardProps } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+ const props = defineProps<ContextMenuLabelProps & { class?: HTMLAttributes['class']; inset?: boolean }>()
6
+ const delegatedProps = computed(() => { const { class: _, inset: _i, ...d } = props; return d })
7
+ const forwardedProps = useForwardProps(delegatedProps)
8
+ </script>
9
+ <template><ContextMenuLabel v-bind="forwardedProps" :class="cn('px-2 py-1.5 text-sm font-semibold text-foreground', inset && 'pl-8', props.class)"><slot /></ContextMenuLabel></template>
@@ -0,0 +1,9 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { ContextMenuSeparator, type ContextMenuSeparatorProps, useForwardProps } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+ const props = defineProps<ContextMenuSeparatorProps & { class?: HTMLAttributes['class'] }>()
6
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
7
+ const forwardedProps = useForwardProps(delegatedProps)
8
+ </script>
9
+ <template><ContextMenuSeparator v-bind="forwardedProps" :class="cn('-mx-1 my-1 h-px bg-border', props.class)" /></template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { ContextMenuSubContent, type ContextMenuSubContentEmits, type ContextMenuSubContentProps, useForwardPropsEmits } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+ const props = defineProps<ContextMenuSubContentProps & { class?: HTMLAttributes['class'] }>()
6
+ const emits = defineEmits<ContextMenuSubContentEmits>()
7
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
8
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
9
+ </script>
10
+ <template>
11
+ <ContextMenuSubContent v-bind="forwarded" :class="cn('z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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', props.class)">
12
+ <slot />
13
+ </ContextMenuSubContent>
14
+ </template>
@@ -0,0 +1,9 @@
1
+ // ContextMenu — styled wrappers around radix-vue ContextMenu primitives
2
+ // Follows same pattern as DropdownMenu
3
+ export { ContextMenuRoot as ContextMenu } from 'radix-vue'
4
+ export { default as ContextMenuContent } from './ContextMenuContent.vue'
5
+ export { default as ContextMenuItem } from './ContextMenuItem.vue'
6
+ export { default as ContextMenuLabel } from './ContextMenuLabel.vue'
7
+ export { default as ContextMenuSeparator } from './ContextMenuSeparator.vue'
8
+ export { ContextMenuTrigger, ContextMenuGroup, ContextMenuSub, ContextMenuCheckboxItem, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSubTrigger } from 'radix-vue'
9
+ export { default as ContextMenuSubContent } from './ContextMenuSubContent.vue'
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { DialogRoot, type DialogRootEmits, type DialogRootProps, useForwardPropsEmits } from 'radix-vue'
3
+
4
+ const props = defineProps<DialogRootProps>()
5
+ const emits = defineEmits<DialogRootEmits>()
6
+
7
+ const forwarded = useForwardPropsEmits(props, emits)
8
+ </script>
9
+
10
+ <template>
11
+ <DialogRoot v-bind="forwarded">
12
+ <slot />
13
+ </DialogRoot>
14
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import { DialogClose, type DialogCloseProps, useForwardProps } from 'radix-vue'
3
+
4
+ const props = defineProps<DialogCloseProps>()
5
+ const forwardedProps = useForwardProps(props)
6
+ </script>
7
+
8
+ <template>
9
+ <DialogClose v-bind="forwardedProps">
10
+ <slot />
11
+ </DialogClose>
12
+ </template>
@@ -0,0 +1,48 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import {
4
+ DialogClose,
5
+ DialogContent,
6
+ type DialogContentEmits,
7
+ type DialogContentProps,
8
+ DialogOverlay,
9
+ DialogPortal,
10
+ useForwardPropsEmits,
11
+ } from 'radix-vue'
12
+ import { X } from 'lucide-vue-next'
13
+ import { cn } from '../lib/utils'
14
+
15
+ const props = defineProps<DialogContentProps & { class?: HTMLAttributes['class'] }>()
16
+ const emits = defineEmits<DialogContentEmits>()
17
+
18
+ const delegatedProps = computed(() => {
19
+ const { class: _, ...delegated } = props
20
+ return delegated
21
+ })
22
+
23
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
24
+ </script>
25
+
26
+ <template>
27
+ <DialogPortal>
28
+ <DialogOverlay
29
+ class="fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
30
+ />
31
+ <DialogContent
32
+ v-bind="forwarded"
33
+ :class="cn(
34
+ 'fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
35
+ props.class,
36
+ )"
37
+ >
38
+ <slot />
39
+
40
+ <DialogClose
41
+ class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
42
+ >
43
+ <X class="w-4 h-4" />
44
+ <span class="sr-only">Close</span>
45
+ </DialogClose>
46
+ </DialogContent>
47
+ </DialogPortal>
48
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { DialogDescription, type DialogDescriptionProps, useForwardProps } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+
6
+ const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes['class'] }>()
7
+
8
+ const delegatedProps = computed(() => {
9
+ const { class: _, ...delegated } = props
10
+ return delegated
11
+ })
12
+
13
+ const forwardedProps = useForwardProps(delegatedProps)
14
+ </script>
15
+
16
+ <template>
17
+ <DialogDescription
18
+ v-bind="forwardedProps"
19
+ :class="cn('text-sm text-muted-foreground', props.class)"
20
+ >
21
+ <slot />
22
+ </DialogDescription>
23
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '../lib/utils'
4
+
5
+ const props = defineProps<{ class?: HTMLAttributes['class'] }>()
6
+ </script>
7
+
8
+ <template>
9
+ <div :class="cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2', props.class)">
10
+ <slot />
11
+ </div>
12
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '../lib/utils'
4
+
5
+ const props = defineProps<{ class?: HTMLAttributes['class'] }>()
6
+ </script>
7
+
8
+ <template>
9
+ <div :class="cn('flex flex-col gap-y-1.5 text-center sm:text-left', props.class)">
10
+ <slot />
11
+ </div>
12
+ </template>
@@ -0,0 +1,47 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import {
4
+ DialogContent,
5
+ type DialogContentEmits,
6
+ type DialogContentProps,
7
+ DialogOverlay,
8
+ DialogPortal,
9
+ useForwardPropsEmits,
10
+ } from 'radix-vue'
11
+ import { X } from 'lucide-vue-next'
12
+ import { cn } from '../lib/utils'
13
+
14
+ const props = defineProps<DialogContentProps & { class?: HTMLAttributes['class'] }>()
15
+ const emits = defineEmits<DialogContentEmits>()
16
+
17
+ const delegatedProps = computed(() => {
18
+ const { class: _, ...delegated } = props
19
+ return delegated
20
+ })
21
+
22
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
23
+ </script>
24
+
25
+ <template>
26
+ <DialogPortal>
27
+ <DialogOverlay
28
+ class="fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
29
+ />
30
+ <DialogContent
31
+ v-bind="forwarded"
32
+ :class="cn(
33
+ 'fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 max-h-[90vh] overflow-y-auto data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
34
+ props.class,
35
+ )"
36
+ >
37
+ <slot />
38
+
39
+ <button
40
+ class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
41
+ >
42
+ <X class="w-4 h-4" />
43
+ <span class="sr-only">Close</span>
44
+ </button>
45
+ </DialogContent>
46
+ </DialogPortal>
47
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { DialogTitle, type DialogTitleProps, useForwardProps } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+
6
+ const props = defineProps<DialogTitleProps & { class?: HTMLAttributes['class'] }>()
7
+
8
+ const delegatedProps = computed(() => {
9
+ const { class: _, ...delegated } = props
10
+ return delegated
11
+ })
12
+
13
+ const forwardedProps = useForwardProps(delegatedProps)
14
+ </script>
15
+
16
+ <template>
17
+ <DialogTitle
18
+ v-bind="forwardedProps"
19
+ :class="cn('text-lg font-semibold leading-none tracking-tight', props.class)"
20
+ >
21
+ <slot />
22
+ </DialogTitle>
23
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import { DialogTrigger, type DialogTriggerProps, useForwardProps } from 'radix-vue'
3
+
4
+ const props = defineProps<DialogTriggerProps>()
5
+ const forwardedProps = useForwardProps(props)
6
+ </script>
7
+
8
+ <template>
9
+ <DialogTrigger v-bind="forwardedProps">
10
+ <slot />
11
+ </DialogTrigger>
12
+ </template>
@@ -0,0 +1,9 @@
1
+ export { default as Dialog } from './Dialog.vue'
2
+ export { default as DialogClose } from './DialogClose.vue'
3
+ export { default as DialogContent } from './DialogContent.vue'
4
+ export { default as DialogDescription } from './DialogDescription.vue'
5
+ export { default as DialogFooter } from './DialogFooter.vue'
6
+ export { default as DialogHeader } from './DialogHeader.vue'
7
+ export { default as DialogScrollContent } from './DialogScrollContent.vue'
8
+ export { default as DialogTitle } from './DialogTitle.vue'
9
+ export { default as DialogTrigger } from './DialogTrigger.vue'
@@ -0,0 +1,13 @@
1
+ <script setup lang="ts">
2
+ import { DropdownMenuRoot, type DropdownMenuRootEmits, type DropdownMenuRootProps, useForwardPropsEmits } from 'radix-vue'
3
+
4
+ const props = defineProps<DropdownMenuRootProps>()
5
+ const emits = defineEmits<DropdownMenuRootEmits>()
6
+ const forwarded = useForwardPropsEmits(props, emits)
7
+ </script>
8
+
9
+ <template>
10
+ <DropdownMenuRoot v-bind="forwarded">
11
+ <slot />
12
+ </DropdownMenuRoot>
13
+ </template>
@@ -0,0 +1,28 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemEmits, type DropdownMenuCheckboxItemProps, DropdownMenuItemIndicator, useForwardPropsEmits } from 'radix-vue'
4
+ import { Check } from 'lucide-vue-next'
5
+ import { cn } from '../lib/utils'
6
+
7
+ const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
8
+ const emits = defineEmits<DropdownMenuCheckboxItemEmits>()
9
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
10
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
11
+ </script>
12
+
13
+ <template>
14
+ <DropdownMenuCheckboxItem
15
+ v-bind="forwarded"
16
+ :class="cn(
17
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
18
+ props.class,
19
+ )"
20
+ >
21
+ <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
22
+ <DropdownMenuItemIndicator>
23
+ <Check class="w-4 h-4" />
24
+ </DropdownMenuItemIndicator>
25
+ </span>
26
+ <slot />
27
+ </DropdownMenuCheckboxItem>
28
+ </template>
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import {
4
+ DropdownMenuContent,
5
+ type DropdownMenuContentEmits,
6
+ type DropdownMenuContentProps,
7
+ DropdownMenuPortal,
8
+ useForwardPropsEmits,
9
+ } from 'radix-vue'
10
+ import { cn } from '../lib/utils'
11
+
12
+ const props = withDefaults(
13
+ defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(),
14
+ { sideOffset: 4 },
15
+ )
16
+ const emits = defineEmits<DropdownMenuContentEmits>()
17
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
18
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
19
+ </script>
20
+
21
+ <template>
22
+ <DropdownMenuPortal>
23
+ <DropdownMenuContent
24
+ v-bind="forwarded"
25
+ :class="cn(
26
+ 'z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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',
27
+ props.class,
28
+ )"
29
+ >
30
+ <slot />
31
+ </DropdownMenuContent>
32
+ </DropdownMenuPortal>
33
+ </template>
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ import { DropdownMenuGroup, type DropdownMenuGroupProps } from 'radix-vue'
3
+
4
+ const props = defineProps<DropdownMenuGroupProps>()
5
+ </script>
6
+
7
+ <template>
8
+ <DropdownMenuGroup v-bind="props">
9
+ <slot />
10
+ </DropdownMenuGroup>
11
+ </template>
@@ -0,0 +1,27 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { DropdownMenuItem, type DropdownMenuItemProps, useForwardProps } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+
6
+ interface Props extends DropdownMenuItemProps {
7
+ class?: HTMLAttributes['class']
8
+ inset?: boolean
9
+ }
10
+
11
+ const props = defineProps<Props>()
12
+ const delegatedProps = computed(() => { const { class: _, inset: _i, ...d } = props; return d })
13
+ const forwardedProps = useForwardProps(delegatedProps)
14
+ </script>
15
+
16
+ <template>
17
+ <DropdownMenuItem
18
+ v-bind="forwardedProps"
19
+ :class="cn(
20
+ 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
21
+ inset && 'pl-8',
22
+ props.class,
23
+ )"
24
+ >
25
+ <slot />
26
+ </DropdownMenuItem>
27
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { DropdownMenuLabel, type DropdownMenuLabelProps, useForwardProps } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+
6
+ interface Props extends DropdownMenuLabelProps {
7
+ class?: HTMLAttributes['class']
8
+ inset?: boolean
9
+ }
10
+
11
+ const props = defineProps<Props>()
12
+ const delegatedProps = computed(() => { const { class: _, inset: _i, ...d } = props; return d })
13
+ const forwardedProps = useForwardProps(delegatedProps)
14
+ </script>
15
+
16
+ <template>
17
+ <DropdownMenuLabel
18
+ v-bind="forwardedProps"
19
+ :class="cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', props.class)"
20
+ >
21
+ <slot />
22
+ </DropdownMenuLabel>
23
+ </template>
@@ -0,0 +1,13 @@
1
+ <script setup lang="ts">
2
+ import { DropdownMenuRadioGroup, type DropdownMenuRadioGroupEmits, type DropdownMenuRadioGroupProps, useForwardPropsEmits } from 'radix-vue'
3
+
4
+ const props = defineProps<DropdownMenuRadioGroupProps>()
5
+ const emits = defineEmits<DropdownMenuRadioGroupEmits>()
6
+ const forwarded = useForwardPropsEmits(props, emits)
7
+ </script>
8
+
9
+ <template>
10
+ <DropdownMenuRadioGroup v-bind="forwarded">
11
+ <slot />
12
+ </DropdownMenuRadioGroup>
13
+ </template>
@@ -0,0 +1,27 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { DropdownMenuItemIndicator, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, useForwardProps } from 'radix-vue'
4
+ import { Circle } from 'lucide-vue-next'
5
+ import { cn } from '../lib/utils'
6
+
7
+ const props = defineProps<DropdownMenuRadioItemProps & { class?: HTMLAttributes['class'] }>()
8
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
9
+ const forwardedProps = useForwardProps(delegatedProps)
10
+ </script>
11
+
12
+ <template>
13
+ <DropdownMenuRadioItem
14
+ v-bind="forwardedProps"
15
+ :class="cn(
16
+ 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
17
+ props.class,
18
+ )"
19
+ >
20
+ <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
21
+ <DropdownMenuItemIndicator>
22
+ <Circle class="h-2 w-2 fill-current" />
23
+ </DropdownMenuItemIndicator>
24
+ </span>
25
+ <slot />
26
+ </DropdownMenuRadioItem>
27
+ </template>
@@ -0,0 +1,13 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { DropdownMenuSeparator, type DropdownMenuSeparatorProps, useForwardProps } from 'radix-vue'
4
+ import { cn } from '../lib/utils'
5
+
6
+ const props = defineProps<DropdownMenuSeparatorProps & { class?: HTMLAttributes['class'] }>()
7
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
8
+ const forwardedProps = useForwardProps(delegatedProps)
9
+ </script>
10
+
11
+ <template>
12
+ <DropdownMenuSeparator v-bind="forwardedProps" :class="cn('-mx-1 my-1 h-px bg-muted', props.class)" />
13
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '../lib/utils'
4
+
5
+ const props = defineProps<{ class?: HTMLAttributes['class'] }>()
6
+ </script>
7
+
8
+ <template>
9
+ <kbd :class="cn('ml-auto text-xs tracking-widest opacity-60', props.class)">
10
+ <slot />
11
+ </kbd>
12
+ </template>
@@ -0,0 +1,13 @@
1
+ <script setup lang="ts">
2
+ import { DropdownMenuSub, type DropdownMenuSubEmits, type DropdownMenuSubProps, useForwardPropsEmits } from 'radix-vue'
3
+
4
+ const props = defineProps<DropdownMenuSubProps>()
5
+ const emits = defineEmits<DropdownMenuSubEmits>()
6
+ const forwarded = useForwardPropsEmits(props, emits)
7
+ </script>
8
+
9
+ <template>
10
+ <DropdownMenuSub v-bind="forwarded">
11
+ <slot />
12
+ </DropdownMenuSub>
13
+ </template>
@@ -0,0 +1,27 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import {
4
+ DropdownMenuSubContent,
5
+ type DropdownMenuSubContentEmits,
6
+ type DropdownMenuSubContentProps,
7
+ useForwardPropsEmits,
8
+ } from 'radix-vue'
9
+ import { cn } from '../lib/utils'
10
+
11
+ const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] }>()
12
+ const emits = defineEmits<DropdownMenuSubContentEmits>()
13
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
14
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
15
+ </script>
16
+
17
+ <template>
18
+ <DropdownMenuSubContent
19
+ v-bind="forwarded"
20
+ :class="cn(
21
+ 'z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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',
22
+ props.class,
23
+ )"
24
+ >
25
+ <slot />
26
+ </DropdownMenuSubContent>
27
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import { type HTMLAttributes, computed } from 'vue'
3
+ import { DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, useForwardProps } from 'radix-vue'
4
+ import { ChevronRight } from 'lucide-vue-next'
5
+ import { cn } from '../lib/utils'
6
+
7
+ const props = defineProps<DropdownMenuSubTriggerProps & { class?: HTMLAttributes['class'] }>()
8
+ const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
9
+ const forwardedProps = useForwardProps(delegatedProps)
10
+ </script>
11
+
12
+ <template>
13
+ <DropdownMenuSubTrigger
14
+ v-bind="forwardedProps"
15
+ :class="cn(
16
+ 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',
17
+ props.class,
18
+ )"
19
+ >
20
+ <slot />
21
+ <ChevronRight class="ml-auto h-4 w-4" />
22
+ </DropdownMenuSubTrigger>
23
+ </template>
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ import { DropdownMenuTrigger, type DropdownMenuTriggerProps } from 'radix-vue'
3
+
4
+ const props = defineProps<DropdownMenuTriggerProps>()
5
+ </script>
6
+
7
+ <template>
8
+ <DropdownMenuTrigger v-bind="props">
9
+ <slot />
10
+ </DropdownMenuTrigger>
11
+ </template>
@@ -0,0 +1,14 @@
1
+ export { default as DropdownMenu } from './DropdownMenu.vue'
2
+ export { default as DropdownMenuCheckboxItem } from './DropdownMenuCheckboxItem.vue'
3
+ export { default as DropdownMenuContent } from './DropdownMenuContent.vue'
4
+ export { default as DropdownMenuGroup } from './DropdownMenuGroup.vue'
5
+ export { default as DropdownMenuItem } from './DropdownMenuItem.vue'
6
+ export { default as DropdownMenuLabel } from './DropdownMenuLabel.vue'
7
+ export { default as DropdownMenuRadioGroup } from './DropdownMenuRadioGroup.vue'
8
+ export { default as DropdownMenuRadioItem } from './DropdownMenuRadioItem.vue'
9
+ export { default as DropdownMenuSeparator } from './DropdownMenuSeparator.vue'
10
+ export { default as DropdownMenuShortcut } from './DropdownMenuShortcut.vue'
11
+ export { default as DropdownMenuSub } from './DropdownMenuSub.vue'
12
+ export { default as DropdownMenuSubContent } from './DropdownMenuSubContent.vue'
13
+ export { default as DropdownMenuSubTrigger } from './DropdownMenuSubTrigger.vue'
14
+ export { default as DropdownMenuTrigger } from './DropdownMenuTrigger.vue'
@@ -0,0 +1,3 @@
1
+ <script setup lang="ts">
2
+ </script>
3
+ <template><slot /></template>
@@ -0,0 +1,6 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '../lib/utils'
4
+ const props = defineProps<{ class?: HTMLAttributes['class'] }>()
5
+ </script>
6
+ <template><p :class="cn('text-[0.8rem] text-muted-foreground', props.class)"><slot /></p></template>