72 lines
7.9 KiB
JSON
72 lines
7.9 KiB
JSON
{
|
|
"name": "alert-dialog",
|
|
"type": "registry:ui",
|
|
"dependencies": [],
|
|
"registryDependencies": [
|
|
"button",
|
|
"utils"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialog.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport { type AlertDialogEmits, type AlertDialogProps, AlertDialogRoot, useForwardPropsEmits } from 'reka-ui'\n\nconst props = defineProps<AlertDialogProps>()\nconst emits = defineEmits<AlertDialogEmits>()\n\nconst forwarded = useForwardPropsEmits(props, emits)\n</script>\n\n<template>\n <AlertDialogRoot v-bind=\"forwarded\">\n <slot />\n </AlertDialogRoot>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialog.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialogAction.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport { buttonVariants } from '@/registry/default/ui/button'\nimport { cn } from '@/lib/utils'\nimport { AlertDialogAction, type AlertDialogActionProps } from 'reka-ui'\nimport { computed, type HTMLAttributes } from 'vue'\n\nconst props = defineProps<AlertDialogActionProps & { class?: HTMLAttributes['class'] }>()\n\nconst delegatedProps = computed(() => {\n const { class: _, ...delegated } = props\n\n return delegated\n})\n</script>\n\n<template>\n <AlertDialogAction v-bind=\"delegatedProps\" :class=\"cn(buttonVariants(), props.class)\">\n <slot />\n </AlertDialogAction>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialogAction.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialogCancel.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport { buttonVariants } from '@/registry/default/ui/button'\nimport { cn } from '@/lib/utils'\nimport { AlertDialogCancel, type AlertDialogCancelProps } from 'reka-ui'\nimport { computed, type HTMLAttributes } from 'vue'\n\nconst props = defineProps<AlertDialogCancelProps & { class?: HTMLAttributes['class'] }>()\n\nconst delegatedProps = computed(() => {\n const { class: _, ...delegated } = props\n\n return delegated\n})\n</script>\n\n<template>\n <AlertDialogCancel\n v-bind=\"delegatedProps\"\n :class=\"cn(\n buttonVariants({ variant: 'outline' }),\n 'mt-2 sm:mt-0',\n props.class,\n )\"\n >\n <slot />\n </AlertDialogCancel>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialogCancel.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialogContent.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport { cn } from '@/lib/utils'\nimport {\n AlertDialogContent,\n type AlertDialogContentEmits,\n type AlertDialogContentProps,\n AlertDialogOverlay,\n AlertDialogPortal,\n useForwardPropsEmits,\n} from 'reka-ui'\nimport { computed, type HTMLAttributes } from 'vue'\n\nconst props = defineProps<AlertDialogContentProps & { class?: HTMLAttributes['class'] }>()\nconst emits = defineEmits<AlertDialogContentEmits>()\n\nconst delegatedProps = computed(() => {\n const { class: _, ...delegated } = props\n\n return delegated\n})\n\nconst forwarded = useForwardPropsEmits(delegatedProps, emits)\n</script>\n\n<template>\n <AlertDialogPortal>\n <AlertDialogOverlay\n 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\"\n />\n <AlertDialogContent\n v-bind=\"forwarded\"\n :class=\"\n cn(\n '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',\n props.class,\n )\n \"\n >\n <slot />\n </AlertDialogContent>\n </AlertDialogPortal>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialogContent.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialogDescription.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport { cn } from '@/lib/utils'\nimport {\n AlertDialogDescription,\n type AlertDialogDescriptionProps,\n} from 'reka-ui'\nimport { computed, type HTMLAttributes } from 'vue'\n\nconst props = defineProps<AlertDialogDescriptionProps & { class?: HTMLAttributes['class'] }>()\n\nconst delegatedProps = computed(() => {\n const { class: _, ...delegated } = props\n\n return delegated\n})\n</script>\n\n<template>\n <AlertDialogDescription\n v-bind=\"delegatedProps\"\n :class=\"cn('text-sm text-muted-foreground', props.class)\"\n >\n <slot />\n </AlertDialogDescription>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialogDescription.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialogFooter.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\nconst props = defineProps<{\n class?: HTMLAttributes['class']\n}>()\n</script>\n\n<template>\n <div\n :class=\"\n cn(\n 'flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2',\n props.class,\n )\n \"\n >\n <slot />\n </div>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialogFooter.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialogHeader.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport type { HTMLAttributes } from 'vue'\nimport { cn } from '@/lib/utils'\n\nconst props = defineProps<{\n class?: HTMLAttributes['class']\n}>()\n</script>\n\n<template>\n <div\n :class=\"cn('flex flex-col gap-y-2 text-center sm:text-left', props.class)\"\n >\n <slot />\n </div>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialogHeader.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialogTitle.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport { cn } from '@/lib/utils'\nimport { AlertDialogTitle, type AlertDialogTitleProps } from 'reka-ui'\nimport { computed, type HTMLAttributes } from 'vue'\n\nconst props = defineProps<AlertDialogTitleProps & { class?: HTMLAttributes['class'] }>()\n\nconst delegatedProps = computed(() => {\n const { class: _, ...delegated } = props\n\n return delegated\n})\n</script>\n\n<template>\n <AlertDialogTitle\n v-bind=\"delegatedProps\"\n :class=\"cn('text-lg font-semibold', props.class)\"\n >\n <slot />\n </AlertDialogTitle>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialogTitle.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/AlertDialogTrigger.vue",
|
|
"content": "<script setup lang=\"ts\">\nimport { AlertDialogTrigger, type AlertDialogTriggerProps } from 'reka-ui'\n\nconst props = defineProps<AlertDialogTriggerProps>()\n</script>\n\n<template>\n <AlertDialogTrigger v-bind=\"props\">\n <slot />\n </AlertDialogTrigger>\n</template>\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/AlertDialogTrigger.vue"
|
|
},
|
|
{
|
|
"path": "ui/alert-dialog/index.ts",
|
|
"content": "export { default as AlertDialog } from './AlertDialog.vue'\nexport { default as AlertDialogAction } from './AlertDialogAction.vue'\nexport { default as AlertDialogCancel } from './AlertDialogCancel.vue'\nexport { default as AlertDialogContent } from './AlertDialogContent.vue'\nexport { default as AlertDialogDescription } from './AlertDialogDescription.vue'\nexport { default as AlertDialogFooter } from './AlertDialogFooter.vue'\nexport { default as AlertDialogHeader } from './AlertDialogHeader.vue'\nexport { default as AlertDialogTitle } from './AlertDialogTitle.vue'\nexport { default as AlertDialogTrigger } from './AlertDialogTrigger.vue'\n",
|
|
"type": "registry:ui",
|
|
"target": "alert-dialog/index.ts"
|
|
}
|
|
]
|
|
}
|