@soft-stech/bootsman-ui-shadcn 1.4.5 → 1.4.6

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 (40) hide show
  1. package/dist/BuiSheet.vue_vue_type_script_setup_true_lang-BskbnSm5.js +23 -0
  2. package/dist/BuiSheetClose.vue_vue_type_script_setup_true_lang-BYXhp7zs.js +21 -0
  3. package/dist/BuiSheetDescription.vue_vue_type_script_setup_true_lang-B52ZY6l4.js +28 -0
  4. package/dist/BuiSheetFooter.vue_vue_type_script_setup_true_lang-DT3Cdj-l.js +19 -0
  5. package/dist/BuiSheetHeader.vue_vue_type_script_setup_true_lang-Hmi-f0up.js +19 -0
  6. package/dist/BuiSheetTitle.vue_vue_type_script_setup_true_lang-DafOh-no.js +28 -0
  7. package/dist/BuiSheetTrigger.vue_vue_type_script_setup_true_lang-Bo3F1V-i.js +21 -0
  8. package/dist/assets/main.css +1 -1
  9. package/dist/components/ui/sheet/BuiSheet.js +4 -0
  10. package/dist/components/ui/sheet/BuiSheet.vue.d.ts +21 -0
  11. package/dist/components/ui/sheet/BuiSheetClose.js +4 -0
  12. package/dist/components/ui/sheet/BuiSheetClose.vue.d.ts +17 -0
  13. package/dist/components/ui/sheet/BuiSheetContent.js +4 -0
  14. package/dist/components/ui/sheet/BuiSheetContent.vue.d.ts +37 -0
  15. package/dist/components/ui/sheet/BuiSheetDescription.js +4 -0
  16. package/dist/components/ui/sheet/BuiSheetDescription.vue.d.ts +22 -0
  17. package/dist/components/ui/sheet/BuiSheetFooter.js +4 -0
  18. package/dist/components/ui/sheet/BuiSheetFooter.vue.d.ts +21 -0
  19. package/dist/components/ui/sheet/BuiSheetHeader.js +4 -0
  20. package/dist/components/ui/sheet/BuiSheetHeader.vue.d.ts +21 -0
  21. package/dist/components/ui/sheet/BuiSheetTitle.js +4 -0
  22. package/dist/components/ui/sheet/BuiSheetTitle.vue.d.ts +22 -0
  23. package/dist/components/ui/sheet/BuiSheetTrigger.js +4 -0
  24. package/dist/components/ui/sheet/BuiSheetTrigger.vue.d.ts +17 -0
  25. package/dist/components/ui/sheet/index.d.ts +13 -0
  26. package/dist/components/ui/sheet/index.js +77 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.js +167 -150
  29. package/package.json +1 -1
  30. package/src/components/stories/BuiSheet.story.vue +41 -0
  31. package/src/components/ui/sheet/BuiSheet.vue +19 -0
  32. package/src/components/ui/sheet/BuiSheetClose.vue +11 -0
  33. package/src/components/ui/sheet/BuiSheetContent.vue +56 -0
  34. package/src/components/ui/sheet/BuiSheetDescription.vue +22 -0
  35. package/src/components/ui/sheet/BuiSheetFooter.vue +12 -0
  36. package/src/components/ui/sheet/BuiSheetHeader.vue +12 -0
  37. package/src/components/ui/sheet/BuiSheetTitle.vue +22 -0
  38. package/src/components/ui/sheet/BuiSheetTrigger.vue +11 -0
  39. package/src/components/ui/sheet/index.ts +31 -0
  40. package/src/index.ts +1 -0
@@ -0,0 +1,56 @@
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
+ type DialogContentEmits,
8
+ type DialogContentProps,
9
+ DialogOverlay,
10
+ DialogPortal,
11
+ useForwardPropsEmits
12
+ } from 'radix-vue'
13
+ import { computed, type HTMLAttributes } from 'vue'
14
+ import { type SheetVariants, sheetVariants } from '.'
15
+
16
+ interface SheetContentProps extends DialogContentProps {
17
+ class?: HTMLAttributes['class']
18
+ side?: SheetVariants['side']
19
+ }
20
+
21
+ defineOptions({
22
+ inheritAttrs: false
23
+ })
24
+
25
+ const props = defineProps<SheetContentProps>()
26
+
27
+ const emits = defineEmits<DialogContentEmits>()
28
+
29
+ const delegatedProps = computed(() => {
30
+ const { class: _, side, ...delegated } = props
31
+
32
+ return delegated
33
+ })
34
+
35
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
36
+ </script>
37
+
38
+ <template>
39
+ <DialogPortal>
40
+ <DialogOverlay
41
+ 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"
42
+ />
43
+ <DialogContent
44
+ :class="cn(sheetVariants({ side }), props.class)"
45
+ v-bind="{ ...forwarded, ...$attrs }"
46
+ >
47
+ <slot />
48
+
49
+ <DialogClose
50
+ 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-secondary"
51
+ >
52
+ <X class="h-4 w-4 text-muted-foreground" />
53
+ </DialogClose>
54
+ </DialogContent>
55
+ </DialogPortal>
56
+ </template>
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils'
3
+ import { DialogDescription, 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
+ </script>
14
+
15
+ <template>
16
+ <DialogDescription
17
+ :class="cn('text-sm text-muted-foreground', props.class)"
18
+ v-bind="delegatedProps"
19
+ >
20
+ <slot />
21
+ </DialogDescription>
22
+ </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-2 text-center sm:text-left', props.class)">
10
+ <slot />
11
+ </div>
12
+ </template>
@@ -0,0 +1,22 @@
1
+ <script setup lang="ts">
2
+ import { cn } from '@/lib/utils'
3
+ import { DialogTitle, 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
+ </script>
14
+
15
+ <template>
16
+ <DialogTitle
17
+ :class="cn('text-lg font-semibold text-foreground', props.class)"
18
+ v-bind="delegatedProps"
19
+ >
20
+ <slot />
21
+ </DialogTitle>
22
+ </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,31 @@
1
+ import { cva, type VariantProps } from 'class-variance-authority'
2
+
3
+ export { default as Sheet } from './BuiSheet.vue'
4
+ export { default as SheetClose } from './BuiSheetClose.vue'
5
+ export { default as SheetContent } from './BuiSheetContent.vue'
6
+ export { default as SheetDescription } from './BuiSheetDescription.vue'
7
+ export { default as SheetFooter } from './BuiSheetFooter.vue'
8
+ export { default as SheetHeader } from './BuiSheetHeader.vue'
9
+ export { default as SheetTitle } from './BuiSheetTitle.vue'
10
+ export { default as SheetTrigger } from './BuiSheetTrigger.vue'
11
+
12
+ export const sheetVariants = cva(
13
+ 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
14
+ {
15
+ variants: {
16
+ side: {
17
+ top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
18
+ bottom:
19
+ 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
20
+ left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
21
+ right:
22
+ 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm'
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ side: 'right'
27
+ }
28
+ }
29
+ )
30
+
31
+ export type SheetVariants = VariantProps<typeof sheetVariants>
package/src/index.ts CHANGED
@@ -39,6 +39,7 @@ export * from './components/ui/skeleton/index'
39
39
  export * from './components/ui/scroll-area/index'
40
40
  export * from './components/ui/collapsible/index'
41
41
  export * from './components/ui/auto-form/index'
42
+ export * from './components/ui/sheet/index'
42
43
 
43
44
  export * from './lib/utils'
44
45
  export { default as tailwind } from './tailwind-preset'