@tower_74/cms-app 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 (189) hide show
  1. package/README.md +102 -0
  2. package/package.json +49 -0
  3. package/src/components/AppContent.vue +21 -0
  4. package/src/components/AppLogoIcon.vue +24 -0
  5. package/src/components/AppShell.vue +37 -0
  6. package/src/components/AppearanceTabs.vue +37 -0
  7. package/src/components/AuthBar.vue +58 -0
  8. package/src/components/BlockEditor.vue +95 -0
  9. package/src/components/DeleteUser.vue +87 -0
  10. package/src/components/FieldBuilder.vue +105 -0
  11. package/src/components/Heading.vue +20 -0
  12. package/src/components/HeadingSmall.vue +17 -0
  13. package/src/components/Icon.vue +30 -0
  14. package/src/components/InputError.vue +13 -0
  15. package/src/components/MenuItemsEditor.vue +59 -0
  16. package/src/components/NavUser.vue +30 -0
  17. package/src/components/Pagination.vue +28 -0
  18. package/src/components/PlaceholderPattern.vue +16 -0
  19. package/src/components/Seo.vue +28 -0
  20. package/src/components/TextLink.vue +24 -0
  21. package/src/components/UserInfo.vue +34 -0
  22. package/src/components/UserMenuContent.vue +37 -0
  23. package/src/components/commerce/OptionsEditor.vue +55 -0
  24. package/src/components/commerce/VariantsEditor.vue +71 -0
  25. package/src/components/ui/avatar/Avatar.vue +24 -0
  26. package/src/components/ui/avatar/AvatarFallback.vue +11 -0
  27. package/src/components/ui/avatar/AvatarImage.vue +9 -0
  28. package/src/components/ui/avatar/index.ts +24 -0
  29. package/src/components/ui/breadcrumb/Breadcrumb.vue +13 -0
  30. package/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +18 -0
  31. package/src/components/ui/breadcrumb/BreadcrumbItem.vue +14 -0
  32. package/src/components/ui/breadcrumb/BreadcrumbLink.vue +15 -0
  33. package/src/components/ui/breadcrumb/BreadcrumbList.vue +14 -0
  34. package/src/components/ui/breadcrumb/BreadcrumbPage.vue +14 -0
  35. package/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +17 -0
  36. package/src/components/ui/breadcrumb/index.ts +7 -0
  37. package/src/components/ui/button/Button.vue +22 -0
  38. package/src/components/ui/button/index.ts +31 -0
  39. package/src/components/ui/card/Card.vue +14 -0
  40. package/src/components/ui/card/CardContent.vue +14 -0
  41. package/src/components/ui/card/CardDescription.vue +14 -0
  42. package/src/components/ui/card/CardFooter.vue +14 -0
  43. package/src/components/ui/card/CardHeader.vue +14 -0
  44. package/src/components/ui/card/CardTitle.vue +14 -0
  45. package/src/components/ui/card/index.ts +6 -0
  46. package/src/components/ui/checkbox/Checkbox.vue +36 -0
  47. package/src/components/ui/checkbox/index.ts +1 -0
  48. package/src/components/ui/collapsible/Collapsible.vue +15 -0
  49. package/src/components/ui/collapsible/CollapsibleContent.vue +14 -0
  50. package/src/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
  51. package/src/components/ui/collapsible/index.ts +3 -0
  52. package/src/components/ui/dialog/Dialog.vue +14 -0
  53. package/src/components/ui/dialog/DialogClose.vue +11 -0
  54. package/src/components/ui/dialog/DialogContent.vue +51 -0
  55. package/src/components/ui/dialog/DialogDescription.vue +21 -0
  56. package/src/components/ui/dialog/DialogFooter.vue +12 -0
  57. package/src/components/ui/dialog/DialogHeader.vue +14 -0
  58. package/src/components/ui/dialog/DialogScrollContent.vue +59 -0
  59. package/src/components/ui/dialog/DialogTitle.vue +21 -0
  60. package/src/components/ui/dialog/DialogTrigger.vue +11 -0
  61. package/src/components/ui/dialog/index.ts +9 -0
  62. package/src/components/ui/dropdown-menu/DropdownMenu.vue +14 -0
  63. package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +42 -0
  64. package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +40 -0
  65. package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +11 -0
  66. package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +30 -0
  67. package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +21 -0
  68. package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +14 -0
  69. package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +43 -0
  70. package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +21 -0
  71. package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
  72. package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +14 -0
  73. package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +30 -0
  74. package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
  75. package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +13 -0
  76. package/src/components/ui/dropdown-menu/index.ts +16 -0
  77. package/src/components/ui/input/Input.vue +32 -0
  78. package/src/components/ui/input/index.ts +1 -0
  79. package/src/components/ui/label/Label.vue +22 -0
  80. package/src/components/ui/label/index.ts +1 -0
  81. package/src/components/ui/navigation-menu/NavigationMenu.vue +25 -0
  82. package/src/components/ui/navigation-menu/NavigationMenuContent.vue +31 -0
  83. package/src/components/ui/navigation-menu/NavigationMenuIndicator.vue +29 -0
  84. package/src/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
  85. package/src/components/ui/navigation-menu/NavigationMenuLink.vue +14 -0
  86. package/src/components/ui/navigation-menu/NavigationMenuList.vue +21 -0
  87. package/src/components/ui/navigation-menu/NavigationMenuTrigger.vue +24 -0
  88. package/src/components/ui/navigation-menu/NavigationMenuViewport.vue +29 -0
  89. package/src/components/ui/navigation-menu/index.ts +14 -0
  90. package/src/components/ui/separator/Separator.vue +31 -0
  91. package/src/components/ui/separator/index.ts +1 -0
  92. package/src/components/ui/sheet/Sheet.vue +14 -0
  93. package/src/components/ui/sheet/SheetClose.vue +11 -0
  94. package/src/components/ui/sheet/SheetContent.vue +53 -0
  95. package/src/components/ui/sheet/SheetDescription.vue +19 -0
  96. package/src/components/ui/sheet/SheetFooter.vue +12 -0
  97. package/src/components/ui/sheet/SheetHeader.vue +12 -0
  98. package/src/components/ui/sheet/SheetTitle.vue +19 -0
  99. package/src/components/ui/sheet/SheetTrigger.vue +11 -0
  100. package/src/components/ui/sheet/index.ts +29 -0
  101. package/src/components/ui/sidebar/Sidebar.vue +99 -0
  102. package/src/components/ui/sidebar/SidebarContent.vue +17 -0
  103. package/src/components/ui/sidebar/SidebarFooter.vue +14 -0
  104. package/src/components/ui/sidebar/SidebarGroup.vue +14 -0
  105. package/src/components/ui/sidebar/SidebarGroupAction.vue +31 -0
  106. package/src/components/ui/sidebar/SidebarGroupContent.vue +14 -0
  107. package/src/components/ui/sidebar/SidebarGroupLabel.vue +29 -0
  108. package/src/components/ui/sidebar/SidebarHeader.vue +14 -0
  109. package/src/components/ui/sidebar/SidebarInput.vue +15 -0
  110. package/src/components/ui/sidebar/SidebarInset.vue +22 -0
  111. package/src/components/ui/sidebar/SidebarMenu.vue +14 -0
  112. package/src/components/ui/sidebar/SidebarMenuAction.vue +41 -0
  113. package/src/components/ui/sidebar/SidebarMenuBadge.vue +27 -0
  114. package/src/components/ui/sidebar/SidebarMenuButton.vue +52 -0
  115. package/src/components/ui/sidebar/SidebarMenuButtonChild.vue +33 -0
  116. package/src/components/ui/sidebar/SidebarMenuItem.vue +14 -0
  117. package/src/components/ui/sidebar/SidebarMenuSkeleton.vue +22 -0
  118. package/src/components/ui/sidebar/SidebarMenuSub.vue +23 -0
  119. package/src/components/ui/sidebar/SidebarMenuSubButton.vue +42 -0
  120. package/src/components/ui/sidebar/SidebarMenuSubItem.vue +7 -0
  121. package/src/components/ui/sidebar/SidebarProvider.vue +89 -0
  122. package/src/components/ui/sidebar/SidebarRail.vue +34 -0
  123. package/src/components/ui/sidebar/SidebarSeparator.vue +15 -0
  124. package/src/components/ui/sidebar/SidebarTrigger.vue +20 -0
  125. package/src/components/ui/sidebar/index.ts +51 -0
  126. package/src/components/ui/sidebar/utils.ts +19 -0
  127. package/src/components/ui/skeleton/Skeleton.vue +14 -0
  128. package/src/components/ui/skeleton/index.ts +1 -0
  129. package/src/components/ui/tooltip/Tooltip.vue +14 -0
  130. package/src/components/ui/tooltip/TooltipContent.vue +39 -0
  131. package/src/components/ui/tooltip/TooltipProvider.vue +11 -0
  132. package/src/components/ui/tooltip/TooltipTrigger.vue +11 -0
  133. package/src/components/ui/tooltip/index.ts +4 -0
  134. package/src/composables/useAppearance.ts +53 -0
  135. package/src/composables/useInitials.ts +14 -0
  136. package/src/index.ts +22 -0
  137. package/src/layouts/AdminLayout.vue +170 -0
  138. package/src/layouts/AuthLayout.vue +14 -0
  139. package/src/layouts/PublicLayout.vue +53 -0
  140. package/src/layouts/auth/AuthCardLayout.vue +36 -0
  141. package/src/layouts/auth/AuthSimpleLayout.vue +31 -0
  142. package/src/layouts/auth/AuthSplitLayout.vue +40 -0
  143. package/src/layouts/settings/Layout.vue +56 -0
  144. package/src/lib/utils.ts +6 -0
  145. package/src/pages/Admin/Appearance/Theme.vue +58 -0
  146. package/src/pages/Admin/Appearance/Widgets.vue +48 -0
  147. package/src/pages/Admin/Commerce/Orders/Index.vue +80 -0
  148. package/src/pages/Admin/Commerce/Orders/Show.vue +200 -0
  149. package/src/pages/Admin/Commerce/Products/Edit.vue +167 -0
  150. package/src/pages/Admin/Commerce/Products/Index.vue +65 -0
  151. package/src/pages/Admin/Content/Edit.vue +170 -0
  152. package/src/pages/Admin/Content/Index.vue +88 -0
  153. package/src/pages/Admin/Content/Preview.vue +25 -0
  154. package/src/pages/Admin/Dashboard.vue +26 -0
  155. package/src/pages/Admin/Forms/Edit.vue +98 -0
  156. package/src/pages/Admin/Forms/Index.vue +68 -0
  157. package/src/pages/Admin/Forms/Submissions/Index.vue +68 -0
  158. package/src/pages/Admin/Forms/Submissions/Show.vue +47 -0
  159. package/src/pages/Admin/Media/Index.vue +75 -0
  160. package/src/pages/Admin/Menus/Create.vue +37 -0
  161. package/src/pages/Admin/Menus/Edit.vue +54 -0
  162. package/src/pages/Admin/Menus/Index.vue +52 -0
  163. package/src/pages/Admin/Settings/Index.vue +184 -0
  164. package/src/pages/Admin/Taxonomy/Edit.vue +83 -0
  165. package/src/pages/Admin/Taxonomy/Index.vue +68 -0
  166. package/src/pages/Admin/Users/Edit.vue +82 -0
  167. package/src/pages/Admin/Users/Index.vue +74 -0
  168. package/src/pages/Public/Cart/Index.vue +108 -0
  169. package/src/pages/Public/Checkout/Confirmation.vue +110 -0
  170. package/src/pages/Public/Checkout/Index.vue +174 -0
  171. package/src/pages/Public/Index.vue +54 -0
  172. package/src/pages/Public/Shop/Index.vue +39 -0
  173. package/src/pages/Public/Shop/Show.vue +46 -0
  174. package/src/pages/Public/Show.vue +41 -0
  175. package/src/pages/Setup/Complete.vue +53 -0
  176. package/src/pages/Setup/Index.vue +85 -0
  177. package/src/pages/Welcome.vue +787 -0
  178. package/src/pages/auth/ConfirmPassword.vue +53 -0
  179. package/src/pages/auth/ForgotPassword.vue +54 -0
  180. package/src/pages/auth/Login.vue +91 -0
  181. package/src/pages/auth/Register.vue +83 -0
  182. package/src/pages/auth/ResetPassword.vue +81 -0
  183. package/src/pages/auth/VerifyEmail.vue +36 -0
  184. package/src/pages/settings/Appearance.vue +23 -0
  185. package/src/pages/settings/Password.vue +120 -0
  186. package/src/pages/settings/Profile.vue +105 -0
  187. package/src/pages.ts +9 -0
  188. package/src/types/index.ts +42 -0
  189. package/src/types/ziggy.ts +12 -0
@@ -0,0 +1,31 @@
1
+ import { cva, type VariantProps } from 'class-variance-authority';
2
+
3
+ export { default as Button } from './Button.vue';
4
+
5
+ export const buttonVariants = cva(
6
+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
11
+ destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
12
+ outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
13
+ secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
14
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
15
+ link: 'text-primary underline-offset-4 hover:underline',
16
+ },
17
+ size: {
18
+ default: 'h-9 px-4 py-2',
19
+ sm: 'h-8 rounded-md px-3 text-xs',
20
+ lg: 'h-10 rounded-md px-8',
21
+ icon: 'h-9 w-9',
22
+ },
23
+ },
24
+ defaultVariants: {
25
+ variant: 'default',
26
+ size: 'default',
27
+ },
28
+ },
29
+ );
30
+
31
+ export type ButtonVariants = VariantProps<typeof buttonVariants>;
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import type { HTMLAttributes } from 'vue';
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class'];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <div :class="cn('rounded-lg border bg-card text-card-foreground shadow-sm', props.class)">
12
+ <slot />
13
+ </div>
14
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import type { HTMLAttributes } from 'vue';
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class'];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <div :class="cn('p-6 pt-0', props.class)">
12
+ <slot />
13
+ </div>
14
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import type { HTMLAttributes } from 'vue';
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class'];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <p :class="cn('text-sm text-muted-foreground', props.class)">
12
+ <slot />
13
+ </p>
14
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import type { HTMLAttributes } from 'vue';
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class'];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <div :class="cn('flex items-center p-6 pt-0', props.class)">
12
+ <slot />
13
+ </div>
14
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import type { HTMLAttributes } from 'vue';
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class'];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <div :class="cn('flex flex-col gap-y-1.5 p-6', props.class)">
12
+ <slot />
13
+ </div>
14
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import type { HTMLAttributes } from 'vue';
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class'];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <h3 :class="cn('text-2xl font-semibold leading-none tracking-tight', props.class)">
12
+ <slot />
13
+ </h3>
14
+ </template>
@@ -0,0 +1,6 @@
1
+ export { default as Card } from './Card.vue';
2
+ export { default as CardContent } from './CardContent.vue';
3
+ export { default as CardDescription } from './CardDescription.vue';
4
+ export { default as CardFooter } from './CardFooter.vue';
5
+ export { default as CardHeader } from './CardHeader.vue';
6
+ export { default as CardTitle } from './CardTitle.vue';
@@ -0,0 +1,36 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import { Check } from 'lucide-vue-next';
4
+ import type { CheckboxRootEmits, CheckboxRootProps } from 'radix-vue';
5
+ import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'radix-vue';
6
+ import { computed, type HTMLAttributes } from 'vue';
7
+
8
+ const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes['class'] }>();
9
+ const emits = defineEmits<CheckboxRootEmits>();
10
+
11
+ const delegatedProps = computed(() => {
12
+ const { class: _, ...delegated } = props;
13
+
14
+ return delegated;
15
+ });
16
+
17
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
18
+ </script>
19
+
20
+ <template>
21
+ <CheckboxRoot
22
+ v-bind="forwarded"
23
+ :class="
24
+ cn(
25
+ 'focus-visible:outline-hidden peer size-5 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent-foreground data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
26
+ props.class,
27
+ )
28
+ "
29
+ >
30
+ <CheckboxIndicator class="flex h-full w-full items-center justify-center text-current">
31
+ <slot>
32
+ <Check class="size-3.5 stroke-[3]" />
33
+ </slot>
34
+ </CheckboxIndicator>
35
+ </CheckboxRoot>
36
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from './Checkbox.vue';
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import type { CollapsibleRootEmits, CollapsibleRootProps } from 'radix-vue';
3
+ import { CollapsibleRoot, useForwardPropsEmits } from 'radix-vue';
4
+
5
+ const props = defineProps<CollapsibleRootProps>();
6
+ const emits = defineEmits<CollapsibleRootEmits>();
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits);
9
+ </script>
10
+
11
+ <template>
12
+ <CollapsibleRoot v-slot="{ open }" v-bind="forwarded">
13
+ <slot :open="open" />
14
+ </CollapsibleRoot>
15
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { CollapsibleContent, type CollapsibleContentProps } from 'radix-vue';
3
+
4
+ const props = defineProps<CollapsibleContentProps>();
5
+ </script>
6
+
7
+ <template>
8
+ <CollapsibleContent
9
+ v-bind="props"
10
+ class="data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden transition-all"
11
+ >
12
+ <slot />
13
+ </CollapsibleContent>
14
+ </template>
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ import { CollapsibleTrigger, type CollapsibleTriggerProps } from 'radix-vue';
3
+
4
+ const props = defineProps<CollapsibleTriggerProps>();
5
+ </script>
6
+
7
+ <template>
8
+ <CollapsibleTrigger v-bind="props">
9
+ <slot />
10
+ </CollapsibleTrigger>
11
+ </template>
@@ -0,0 +1,3 @@
1
+ export { default as Collapsible } from './Collapsible.vue';
2
+ export { default as CollapsibleContent } from './CollapsibleContent.vue';
3
+ export { default as CollapsibleTrigger } from './CollapsibleTrigger.vue';
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { DialogRoot, useForwardPropsEmits, type DialogRootEmits, type DialogRootProps } 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,11 @@
1
+ <script setup lang="ts">
2
+ import { DialogClose, type DialogCloseProps } from 'radix-vue';
3
+
4
+ const props = defineProps<DialogCloseProps>();
5
+ </script>
6
+
7
+ <template>
8
+ <DialogClose v-bind="props">
9
+ <slot />
10
+ </DialogClose>
11
+ </template>
@@ -0,0 +1,51 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import { X } from 'lucide-vue-next';
4
+ import {
5
+ DialogClose,
6
+ DialogContent,
7
+ DialogOverlay,
8
+ DialogPortal,
9
+ useForwardPropsEmits,
10
+ type DialogContentEmits,
11
+ type DialogContentProps,
12
+ } from 'radix-vue';
13
+ import { computed, type HTMLAttributes } from 'vue';
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
+
21
+ return delegated;
22
+ });
23
+
24
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
25
+ </script>
26
+
27
+ <template>
28
+ <DialogPortal>
29
+ <DialogOverlay
30
+ 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"
31
+ />
32
+ <DialogContent
33
+ v-bind="forwarded"
34
+ :class="
35
+ cn(
36
+ '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',
37
+ props.class,
38
+ )
39
+ "
40
+ >
41
+ <slot />
42
+
43
+ <DialogClose
44
+ 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"
45
+ >
46
+ <X class="h-4 w-4" />
47
+ <span class="sr-only">Close</span>
48
+ </DialogClose>
49
+ </DialogContent>
50
+ </DialogPortal>
51
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import { DialogDescription, useForwardProps, type DialogDescriptionProps } from 'radix-vue';
4
+ import { computed, type HTMLAttributes } from 'vue';
5
+
6
+ const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes['class'] }>();
7
+
8
+ const delegatedProps = computed(() => {
9
+ const { class: _, ...delegated } = props;
10
+
11
+ return delegated;
12
+ });
13
+
14
+ const forwardedProps = useForwardProps(delegatedProps);
15
+ </script>
16
+
17
+ <template>
18
+ <DialogDescription v-bind="forwardedProps" :class="cn('text-sm text-muted-foreground', props.class)">
19
+ <slot />
20
+ </DialogDescription>
21
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import type { HTMLAttributes } from 'vue';
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,14 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import type { HTMLAttributes } from 'vue';
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes['class'];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <div :class="cn('flex flex-col gap-y-1.5 text-center sm:text-left', props.class)">
12
+ <slot />
13
+ </div>
14
+ </template>
@@ -0,0 +1,59 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import { X } from 'lucide-vue-next';
4
+ import {
5
+ DialogClose,
6
+ DialogContent,
7
+ DialogOverlay,
8
+ DialogPortal,
9
+ useForwardPropsEmits,
10
+ type DialogContentEmits,
11
+ type DialogContentProps,
12
+ } from 'radix-vue';
13
+ import { computed, type HTMLAttributes } from 'vue';
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
+
21
+ return delegated;
22
+ });
23
+
24
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
25
+ </script>
26
+
27
+ <template>
28
+ <DialogPortal>
29
+ <DialogOverlay
30
+ class="fixed inset-0 z-50 grid place-items-center overflow-y-auto 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"
31
+ >
32
+ <DialogContent
33
+ :class="
34
+ cn(
35
+ 'relative z-50 my-8 grid w-full max-w-lg gap-4 border border-border bg-background p-6 shadow-lg duration-200 sm:rounded-lg md:w-full',
36
+ props.class,
37
+ )
38
+ "
39
+ v-bind="forwarded"
40
+ @pointer-down-outside="
41
+ (event) => {
42
+ const originalEvent = event.detail.originalEvent;
43
+ const target = originalEvent.target as HTMLElement;
44
+ if (originalEvent.offsetX > target.clientWidth || originalEvent.offsetY > target.clientHeight) {
45
+ event.preventDefault();
46
+ }
47
+ }
48
+ "
49
+ >
50
+ <slot />
51
+
52
+ <DialogClose class="absolute right-3 top-3 rounded-md p-0.5 transition-colors hover:bg-secondary">
53
+ <X class="h-4 w-4" />
54
+ <span class="sr-only">Close</span>
55
+ </DialogClose>
56
+ </DialogContent>
57
+ </DialogOverlay>
58
+ </DialogPortal>
59
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import { DialogTitle, useForwardProps, type DialogTitleProps } from 'radix-vue';
4
+ import { computed, type HTMLAttributes } from 'vue';
5
+
6
+ const props = defineProps<DialogTitleProps & { class?: HTMLAttributes['class'] }>();
7
+
8
+ const delegatedProps = computed(() => {
9
+ const { class: _, ...delegated } = props;
10
+
11
+ return delegated;
12
+ });
13
+
14
+ const forwardedProps = useForwardProps(delegatedProps);
15
+ </script>
16
+
17
+ <template>
18
+ <DialogTitle v-bind="forwardedProps" :class="cn('text-lg font-semibold leading-none tracking-tight', props.class)">
19
+ <slot />
20
+ </DialogTitle>
21
+ </template>
@@ -0,0 +1,11 @@
1
+ <script setup lang="ts">
2
+ import { DialogTrigger, type DialogTriggerProps } from 'radix-vue';
3
+
4
+ const props = defineProps<DialogTriggerProps>();
5
+ </script>
6
+
7
+ <template>
8
+ <DialogTrigger v-bind="props">
9
+ <slot />
10
+ </DialogTrigger>
11
+ </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,14 @@
1
+ <script setup lang="ts">
2
+ import { DropdownMenuRoot, useForwardPropsEmits, type DropdownMenuRootEmits, type DropdownMenuRootProps } from 'radix-vue';
3
+
4
+ const props = defineProps<DropdownMenuRootProps>();
5
+ const emits = defineEmits<DropdownMenuRootEmits>();
6
+
7
+ const forwarded = useForwardPropsEmits(props, emits);
8
+ </script>
9
+
10
+ <template>
11
+ <DropdownMenuRoot v-bind="forwarded">
12
+ <slot />
13
+ </DropdownMenuRoot>
14
+ </template>
@@ -0,0 +1,42 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import { Check } from 'lucide-vue-next';
4
+ import {
5
+ DropdownMenuCheckboxItem,
6
+ DropdownMenuItemIndicator,
7
+ useForwardPropsEmits,
8
+ type DropdownMenuCheckboxItemEmits,
9
+ type DropdownMenuCheckboxItemProps,
10
+ } from 'radix-vue';
11
+ import { computed, type HTMLAttributes } from 'vue';
12
+
13
+ const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>();
14
+ const emits = defineEmits<DropdownMenuCheckboxItemEmits>();
15
+
16
+ const delegatedProps = computed(() => {
17
+ const { class: _, ...delegated } = props;
18
+
19
+ return delegated;
20
+ });
21
+
22
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
23
+ </script>
24
+
25
+ <template>
26
+ <DropdownMenuCheckboxItem
27
+ v-bind="forwarded"
28
+ :class="
29
+ cn(
30
+ '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',
31
+ props.class,
32
+ )
33
+ "
34
+ >
35
+ <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
36
+ <DropdownMenuItemIndicator>
37
+ <Check class="h-4 w-4" />
38
+ </DropdownMenuItemIndicator>
39
+ </span>
40
+ <slot />
41
+ </DropdownMenuCheckboxItem>
42
+ </template>
@@ -0,0 +1,40 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import {
4
+ DropdownMenuContent,
5
+ DropdownMenuPortal,
6
+ useForwardPropsEmits,
7
+ type DropdownMenuContentEmits,
8
+ type DropdownMenuContentProps,
9
+ } from 'radix-vue';
10
+ import { computed, type HTMLAttributes } from 'vue';
11
+
12
+ const props = withDefaults(defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(), {
13
+ sideOffset: 4,
14
+ });
15
+ const emits = defineEmits<DropdownMenuContentEmits>();
16
+
17
+ const delegatedProps = computed(() => {
18
+ const { class: _, ...delegated } = props;
19
+
20
+ return delegated;
21
+ });
22
+
23
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
24
+ </script>
25
+
26
+ <template>
27
+ <DropdownMenuPortal>
28
+ <DropdownMenuContent
29
+ v-bind="forwarded"
30
+ :class="
31
+ cn(
32
+ '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',
33
+ props.class,
34
+ )
35
+ "
36
+ >
37
+ <slot />
38
+ </DropdownMenuContent>
39
+ </DropdownMenuPortal>
40
+ </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,30 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import { DropdownMenuItem, useForwardProps, type DropdownMenuItemProps } from 'radix-vue';
4
+ import { computed, type HTMLAttributes } from 'vue';
5
+
6
+ const props = defineProps<DropdownMenuItemProps & { class?: HTMLAttributes['class']; inset?: boolean }>();
7
+
8
+ const delegatedProps = computed(() => {
9
+ const { class: _, ...delegated } = props;
10
+
11
+ return delegated;
12
+ });
13
+
14
+ const forwardedProps = useForwardProps(delegatedProps);
15
+ </script>
16
+
17
+ <template>
18
+ <DropdownMenuItem
19
+ v-bind="forwardedProps"
20
+ :class="
21
+ cn(
22
+ 'relative flex cursor-default select-none items-center gap-2 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 [&>svg]:size-4 [&>svg]:shrink-0',
23
+ inset && 'pl-8',
24
+ props.class,
25
+ )
26
+ "
27
+ >
28
+ <slot />
29
+ </DropdownMenuItem>
30
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils';
3
+ import { DropdownMenuLabel, useForwardProps, type DropdownMenuLabelProps } from 'radix-vue';
4
+ import { computed, type HTMLAttributes } from 'vue';
5
+
6
+ const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes['class']; inset?: boolean }>();
7
+
8
+ const delegatedProps = computed(() => {
9
+ const { class: _, ...delegated } = props;
10
+
11
+ return delegated;
12
+ });
13
+
14
+ const forwardedProps = useForwardProps(delegatedProps);
15
+ </script>
16
+
17
+ <template>
18
+ <DropdownMenuLabel v-bind="forwardedProps" :class="cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', props.class)">
19
+ <slot />
20
+ </DropdownMenuLabel>
21
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { DropdownMenuRadioGroup, useForwardPropsEmits, type DropdownMenuRadioGroupEmits, type DropdownMenuRadioGroupProps } from 'radix-vue';
3
+
4
+ const props = defineProps<DropdownMenuRadioGroupProps>();
5
+ const emits = defineEmits<DropdownMenuRadioGroupEmits>();
6
+
7
+ const forwarded = useForwardPropsEmits(props, emits);
8
+ </script>
9
+
10
+ <template>
11
+ <DropdownMenuRadioGroup v-bind="forwarded">
12
+ <slot />
13
+ </DropdownMenuRadioGroup>
14
+ </template>