@codefast/ui 0.3.9 → 0.3.10
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.
- package/CHANGELOG.md +11 -0
- package/dist/components/accordion.cjs +97 -1
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +51 -1
- package/dist/components/alert-dialog.cjs +155 -1
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +94 -1
- package/dist/components/alert.cjs +84 -1
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +41 -1
- package/dist/components/aspect-ratio.cjs +43 -1
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/aspect-ratio.js +9 -1
- package/dist/components/avatar.cjs +65 -1
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +25 -1
- package/dist/components/badge.cjs +66 -1
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +29 -1
- package/dist/components/breadcrumb.cjs +126 -1
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +74 -1
- package/dist/components/button-group.cjs +86 -1
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +43 -1
- package/dist/components/button.cjs +92 -1
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +55 -1
- package/dist/components/calendar.cjs +150 -1
- package/dist/components/calendar.d.ts +12 -19
- package/dist/components/calendar.js +113 -1
- package/dist/components/card.cjs +105 -1
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +53 -1
- package/dist/components/carousel.cjs +210 -1
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +151 -1
- package/dist/components/chart.cjs +250 -3
- package/dist/components/chart.d.ts +9 -9
- package/dist/components/chart.js +198 -3
- package/dist/components/checkbox-cards.cjs +69 -1
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +32 -1
- package/dist/components/checkbox-group.cjs +63 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +26 -1
- package/dist/components/checkbox.cjs +53 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +19 -1
- package/dist/components/collapsible.cjs +61 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/collapsible.js +21 -1
- package/dist/components/command.cjs +167 -1
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +106 -1
- package/dist/components/context-menu.cjs +218 -1
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +142 -1
- package/dist/components/dialog.cjs +164 -1
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +106 -1
- package/dist/components/drawer.cjs +143 -1
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +85 -1
- package/dist/components/dropdown-menu.cjs +221 -1
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +145 -1
- package/dist/components/empty.cjs +113 -1
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +61 -1
- package/dist/components/field.cjs +193 -1
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +129 -1
- package/dist/components/form.cjs +151 -1
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +96 -1
- package/dist/components/hover-card.cjs +77 -1
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +34 -1
- package/dist/components/input-group.cjs +155 -1
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +97 -1
- package/dist/components/input-number.cjs +98 -1
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +64 -1
- package/dist/components/input-otp.cjs +101 -1
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +49 -1
- package/dist/components/input-password.cjs +71 -1
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +37 -1
- package/dist/components/input-search.cjs +80 -1
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +46 -1
- package/dist/components/input.cjs +45 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +11 -1
- package/dist/components/item.cjs +186 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +119 -1
- package/dist/components/kbd.cjs +54 -1
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +17 -1
- package/dist/components/label.cjs +45 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +11 -1
- package/dist/components/menubar.cjs +232 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +153 -1
- package/dist/components/native-select.cjs +75 -1
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +35 -1
- package/dist/components/navigation-menu.cjs +146 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +94 -2
- package/dist/components/pagination.cjs +138 -1
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +86 -1
- package/dist/components/popover.cjs +86 -1
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +40 -1
- package/dist/components/progress-circle.cjs +184 -1
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +147 -1
- package/dist/components/progress.cjs +52 -1
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +18 -1
- package/dist/components/radio-cards.cjs +66 -1
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +29 -1
- package/dist/components/radio-group.cjs +59 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +22 -1
- package/dist/components/radio.cjs +47 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +13 -1
- package/dist/components/resizable.cjs +71 -1
- package/dist/components/resizable.d.ts +8 -8
- package/dist/components/resizable.js +31 -1
- package/dist/components/scroll-area.cjs +140 -1
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +100 -1
- package/dist/components/select.cjs +180 -1
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +119 -1
- package/dist/components/separator.cjs +82 -1
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +42 -1
- package/dist/components/sheet.cjs +184 -1
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +123 -1
- package/dist/components/sidebar.cjs +506 -1
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +400 -1
- package/dist/components/skeleton.cjs +44 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +10 -1
- package/dist/components/slider.cjs +79 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +45 -1
- package/dist/components/sonner.cjs +57 -1
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +17 -1
- package/dist/components/spinner.cjs +75 -1
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +41 -1
- package/dist/components/switch.cjs +49 -1
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +15 -1
- package/dist/components/table.cjs +118 -1
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +63 -1
- package/dist/components/tabs.cjs +75 -1
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +32 -1
- package/dist/components/textarea.cjs +44 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +10 -1
- package/dist/components/toggle-group.cjs +90 -1
- package/dist/components/toggle-group.d.ts +10 -12
- package/dist/components/toggle-group.js +53 -1
- package/dist/components/toggle.cjs +71 -1
- package/dist/components/toggle.d.ts +10 -12
- package/dist/components/toggle.js +34 -1
- package/dist/components/tooltip.cjs +90 -1
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +44 -1
- package/dist/css/amber.css +95 -1
- package/dist/css/blue.css +95 -1
- package/dist/css/cyan.css +95 -1
- package/dist/css/emerald.css +95 -1
- package/dist/css/fuchsia.css +95 -1
- package/dist/css/gray.css +95 -1
- package/dist/css/green.css +95 -1
- package/dist/css/indigo.css +95 -1
- package/dist/css/lime.css +95 -1
- package/dist/css/neutral.css +95 -1
- package/dist/css/orange.css +95 -1
- package/dist/css/pink.css +95 -1
- package/dist/css/preset.css +118 -1
- package/dist/css/purple.css +95 -1
- package/dist/css/red.css +95 -1
- package/dist/css/rose.css +95 -1
- package/dist/css/sky.css +95 -1
- package/dist/css/slate.css +95 -1
- package/dist/css/stone.css +95 -1
- package/dist/css/style.css +3 -1
- package/dist/css/teal.css +95 -1
- package/dist/css/violet.css +95 -1
- package/dist/css/yellow.css +95 -1
- package/dist/css/zinc.css +95 -1
- package/dist/hooks/use-animated-value.cjs +74 -1
- package/dist/hooks/use-animated-value.d.ts +9 -10
- package/dist/hooks/use-animated-value.js +40 -1
- package/dist/hooks/use-copy-to-clipboard.cjs +57 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +18 -1
- package/dist/hooks/use-copy-to-clipboard.js +23 -1
- package/dist/hooks/use-is-mobile.cjs +39 -1
- package/dist/hooks/use-is-mobile.d.ts +15 -6
- package/dist/hooks/use-is-mobile.js +5 -1
- package/dist/hooks/use-media-query.cjs +56 -1
- package/dist/hooks/use-media-query.d.ts +11 -3
- package/dist/hooks/use-media-query.js +22 -1
- package/dist/hooks/use-mutation-observer.cjs +56 -1
- package/dist/hooks/use-mutation-observer.d.ts +8 -12
- package/dist/hooks/use-mutation-observer.js +22 -1
- package/dist/hooks/use-pagination.cjs +92 -1
- package/dist/hooks/use-pagination.d.ts +12 -10
- package/dist/hooks/use-pagination.js +55 -1
- package/dist/index.cjs +1081 -1
- package/dist/index.d.ts +130 -131
- package/dist/index.js +69 -1
- package/dist/primitives/checkbox-group.cjs +151 -1
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +99 -1
- package/dist/primitives/input-number.cjs +439 -1
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +381 -1
- package/dist/primitives/input.cjs +99 -1
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +53 -1
- package/dist/primitives/progress-circle.cjs +198 -1
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +128 -1
- package/package.json +385 -38
|
@@ -1,2 +1,120 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
+
import { Content, Group, Icon, Item, ItemIndicator, ItemText, Label, Portal, Root, ScrollDownButton, ScrollUpButton, Separator, Trigger, Value, Viewport } from "@radix-ui/react-select";
|
|
5
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
|
+
import { buttonVariants } from "./button.js";
|
|
7
|
+
function Select({ ...props }) {
|
|
8
|
+
return /*#__PURE__*/ jsx(Root, {
|
|
9
|
+
"data-slot": "select",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function SelectGroup({ ...props }) {
|
|
14
|
+
return /*#__PURE__*/ jsx(Group, {
|
|
15
|
+
"data-slot": "select-group",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function SelectValue({ ...props }) {
|
|
20
|
+
return /*#__PURE__*/ jsx(Value, {
|
|
21
|
+
"data-slot": "select-value",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function SelectTrigger({ children, className, size, ...props }) {
|
|
26
|
+
return /*#__PURE__*/ jsxs(Trigger, {
|
|
27
|
+
className: buttonVariants({
|
|
28
|
+
className: [
|
|
29
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground focus:ring-ring/50 focus:border-ring w-fit justify-between px-3 font-normal focus:ring-3 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate",
|
|
30
|
+
className
|
|
31
|
+
],
|
|
32
|
+
size,
|
|
33
|
+
variant: 'outline'
|
|
34
|
+
}),
|
|
35
|
+
"data-size": size,
|
|
36
|
+
"data-slot": "select-trigger",
|
|
37
|
+
...props,
|
|
38
|
+
children: [
|
|
39
|
+
children,
|
|
40
|
+
/*#__PURE__*/ jsx(Icon, {
|
|
41
|
+
asChild: true,
|
|
42
|
+
className: "size-4 shrink-0 opacity-50",
|
|
43
|
+
children: /*#__PURE__*/ jsx(ChevronDownIcon, {})
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
49
|
+
return /*#__PURE__*/ jsx(ScrollUpButton, {
|
|
50
|
+
className: cn('text-muted-foreground flex items-center justify-center py-1', className),
|
|
51
|
+
"data-slot": "select-scroll-up-button",
|
|
52
|
+
...props,
|
|
53
|
+
children: /*#__PURE__*/ jsx(ChevronUpIcon, {
|
|
54
|
+
size: 16
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
59
|
+
return /*#__PURE__*/ jsx(ScrollDownButton, {
|
|
60
|
+
className: cn('text-muted-foreground flex items-center justify-center py-1', className),
|
|
61
|
+
"data-slot": "select-scroll-down-button",
|
|
62
|
+
...props,
|
|
63
|
+
children: /*#__PURE__*/ jsx(ChevronDownIcon, {
|
|
64
|
+
size: 16
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function SelectContent({ children, className, position = 'popper', ...props }) {
|
|
69
|
+
return /*#__PURE__*/ jsx(Portal, {
|
|
70
|
+
children: /*#__PURE__*/ jsxs(Content, {
|
|
71
|
+
className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden rounded-lg border shadow-lg', 'popper' === position && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className),
|
|
72
|
+
"data-slot": "select-content",
|
|
73
|
+
position: position,
|
|
74
|
+
...props,
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ jsx(SelectScrollUpButton, {}),
|
|
77
|
+
/*#__PURE__*/ jsx(Viewport, {
|
|
78
|
+
className: cn('p-1', 'popper' === position && 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'),
|
|
79
|
+
children: children
|
|
80
|
+
}),
|
|
81
|
+
/*#__PURE__*/ jsx(SelectScrollDownButton, {})
|
|
82
|
+
]
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function SelectLabel({ className, ...props }) {
|
|
87
|
+
return /*#__PURE__*/ jsx(Label, {
|
|
88
|
+
className: cn('flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold', className),
|
|
89
|
+
"data-slot": "select-label",
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function SelectItem({ children, className, ...props }) {
|
|
94
|
+
return /*#__PURE__*/ jsxs(Item, {
|
|
95
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
96
|
+
"data-slot": "select-item",
|
|
97
|
+
...props,
|
|
98
|
+
children: [
|
|
99
|
+
/*#__PURE__*/ jsx("span", {
|
|
100
|
+
className: "absolute right-2 flex items-center justify-center",
|
|
101
|
+
children: /*#__PURE__*/ jsx(ItemIndicator, {
|
|
102
|
+
children: /*#__PURE__*/ jsx(CheckIcon, {
|
|
103
|
+
className: "size-4"
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
}),
|
|
107
|
+
/*#__PURE__*/ jsx(ItemText, {
|
|
108
|
+
children: children
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function SelectSeparator({ className, ...props }) {
|
|
114
|
+
return /*#__PURE__*/ jsx(Separator, {
|
|
115
|
+
className: cn('bg-border mx-2 my-1 h-px', className),
|
|
116
|
+
"data-slot": "select-separator",
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -1,2 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
Separator: ()=>Separator,
|
|
29
|
+
SeparatorItem: ()=>SeparatorItem,
|
|
30
|
+
separatorVariants: ()=>separatorVariants
|
|
31
|
+
});
|
|
32
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
34
|
+
const react_separator_namespaceObject = require("@radix-ui/react-separator");
|
|
35
|
+
const separatorVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
36
|
+
base: 'bg-border relative flex shrink-0 items-center',
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
align: 'center',
|
|
39
|
+
orientation: 'horizontal'
|
|
40
|
+
},
|
|
41
|
+
variants: {
|
|
42
|
+
align: {
|
|
43
|
+
center: 'justify-center',
|
|
44
|
+
end: 'justify-end',
|
|
45
|
+
start: 'justify-start'
|
|
46
|
+
},
|
|
47
|
+
orientation: {
|
|
48
|
+
horizontal: 'h-px w-full',
|
|
49
|
+
vertical: 'h-full w-px flex-col'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
function Separator({ align, className, decorative = true, orientation, ...props }) {
|
|
54
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_separator_namespaceObject.Root, {
|
|
55
|
+
className: separatorVariants({
|
|
56
|
+
align,
|
|
57
|
+
className,
|
|
58
|
+
orientation
|
|
59
|
+
}),
|
|
60
|
+
"data-slot": "separator",
|
|
61
|
+
decorative: decorative,
|
|
62
|
+
orientation: orientation,
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function SeparatorItem({ className, ...props }) {
|
|
67
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
68
|
+
className: (0, tailwind_variants_namespaceObject.cn)('bg-background text-muted-foreground absolute mx-2 px-2 text-sm', className),
|
|
69
|
+
"data-slot": "separator-item",
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
exports.Separator = __webpack_exports__.Separator;
|
|
74
|
+
exports.SeparatorItem = __webpack_exports__.SeparatorItem;
|
|
75
|
+
exports.separatorVariants = __webpack_exports__.separatorVariants;
|
|
76
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
77
|
+
"Separator",
|
|
78
|
+
"SeparatorItem",
|
|
79
|
+
"separatorVariants"
|
|
80
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
81
|
+
Object.defineProperty(exports, '__esModule', {
|
|
82
|
+
value: true
|
|
83
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import * as SeparatorPrimitive from
|
|
1
|
+
import type { VariantProps } from '@codefast/tailwind-variants';
|
|
2
|
+
import type { ComponentProps, JSX } from 'react';
|
|
3
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
4
4
|
declare const separatorVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
5
|
align: {
|
|
6
6
|
center: string;
|
|
@@ -12,10 +12,10 @@ declare const separatorVariants: import("@codefast/tailwind-variants").VariantFu
|
|
|
12
12
|
vertical: string;
|
|
13
13
|
};
|
|
14
14
|
}, Record<string, never>>;
|
|
15
|
-
interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root>, Omit<VariantProps<typeof separatorVariants>,
|
|
15
|
+
interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root>, Omit<VariantProps<typeof separatorVariants>, 'orientation'> {
|
|
16
16
|
}
|
|
17
17
|
declare function Separator({ align, className, decorative, orientation, ...props }: SeparatorProps): JSX.Element;
|
|
18
|
-
type SeparatorItemProps = ComponentProps<
|
|
18
|
+
type SeparatorItemProps = ComponentProps<'div'>;
|
|
19
19
|
declare function SeparatorItem({ className, ...props }: SeparatorItemProps): JSX.Element;
|
|
20
20
|
export { separatorVariants };
|
|
21
21
|
export { Separator, SeparatorItem };
|
|
@@ -1,2 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn, tv } from "@codefast/tailwind-variants";
|
|
4
|
+
import { Root } from "@radix-ui/react-separator";
|
|
5
|
+
const separatorVariants = tv({
|
|
6
|
+
base: 'bg-border relative flex shrink-0 items-center',
|
|
7
|
+
defaultVariants: {
|
|
8
|
+
align: 'center',
|
|
9
|
+
orientation: 'horizontal'
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
align: {
|
|
13
|
+
center: 'justify-center',
|
|
14
|
+
end: 'justify-end',
|
|
15
|
+
start: 'justify-start'
|
|
16
|
+
},
|
|
17
|
+
orientation: {
|
|
18
|
+
horizontal: 'h-px w-full',
|
|
19
|
+
vertical: 'h-full w-px flex-col'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
function Separator({ align, className, decorative = true, orientation, ...props }) {
|
|
24
|
+
return /*#__PURE__*/ jsx(Root, {
|
|
25
|
+
className: separatorVariants({
|
|
26
|
+
align,
|
|
27
|
+
className,
|
|
28
|
+
orientation
|
|
29
|
+
}),
|
|
30
|
+
"data-slot": "separator",
|
|
31
|
+
decorative: decorative,
|
|
32
|
+
orientation: orientation,
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function SeparatorItem({ className, ...props }) {
|
|
37
|
+
return /*#__PURE__*/ jsx("div", {
|
|
38
|
+
className: cn('bg-background text-muted-foreground absolute mx-2 px-2 text-sm', className),
|
|
39
|
+
"data-slot": "separator-item",
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export { Separator, SeparatorItem, separatorVariants };
|
|
@@ -1,2 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
SheetClose: ()=>SheetClose,
|
|
29
|
+
SheetContent: ()=>SheetContent,
|
|
30
|
+
Sheet: ()=>Sheet,
|
|
31
|
+
SheetFooter: ()=>SheetFooter,
|
|
32
|
+
SheetDescription: ()=>SheetDescription,
|
|
33
|
+
SheetHeader: ()=>SheetHeader,
|
|
34
|
+
SheetTitle: ()=>SheetTitle,
|
|
35
|
+
sheetContentVariants: ()=>sheetContentVariants,
|
|
36
|
+
SheetBody: ()=>SheetBody,
|
|
37
|
+
SheetTrigger: ()=>SheetTrigger
|
|
38
|
+
});
|
|
39
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
41
|
+
const react_dialog_namespaceObject = require("@radix-ui/react-dialog");
|
|
42
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
43
|
+
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
44
|
+
const sheetContentVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
45
|
+
base: 'bg-background ease-ui data-[state=open]:animate-in data-[state=open]:animation-duration-500 data-[state=closed]:animate-out data-[state=closed]:animation-duration-500 fixed z-50 flex flex-col overflow-auto shadow-lg',
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
side: 'right'
|
|
48
|
+
},
|
|
49
|
+
variants: {
|
|
50
|
+
side: {
|
|
51
|
+
bottom: 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-[80vh] border-t',
|
|
52
|
+
left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
53
|
+
right: 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
54
|
+
top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-[80vh] border-b'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
function Sheet({ children, ...props }) {
|
|
59
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Root, {
|
|
60
|
+
"data-slot": "sheet",
|
|
61
|
+
...props,
|
|
62
|
+
children: children
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function SheetTrigger({ ...props }) {
|
|
66
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Trigger, {
|
|
67
|
+
"data-slot": "sheet-trigger",
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function SheetContent({ children, className, classNames, side = 'right', ...props }) {
|
|
72
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_dialog_namespaceObject.Portal, {
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Overlay, {
|
|
75
|
+
className: (0, tailwind_variants_namespaceObject.cn)('data-[state=open]:fade-in-0 ease-ui data-[state=open]:animate-in data-[state=open]:animation-duration-500 data-[state=closed]:fade-out-0 data-[state=closed]:animate-out data-[state=closed]:animation-duration-500 fixed inset-0 z-50 bg-black/50', classNames?.overlay),
|
|
76
|
+
"data-slot": "sheet-overlay"
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_dialog_namespaceObject.Content, {
|
|
79
|
+
className: sheetContentVariants({
|
|
80
|
+
className: [
|
|
81
|
+
classNames?.content,
|
|
82
|
+
className
|
|
83
|
+
],
|
|
84
|
+
side
|
|
85
|
+
}),
|
|
86
|
+
"data-slot": "sheet-content",
|
|
87
|
+
...props,
|
|
88
|
+
children: [
|
|
89
|
+
children,
|
|
90
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_dialog_namespaceObject.Close, {
|
|
91
|
+
className: (0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
92
|
+
className: [
|
|
93
|
+
'absolute top-4 right-4 size-7',
|
|
94
|
+
classNames?.close
|
|
95
|
+
],
|
|
96
|
+
size: 'icon',
|
|
97
|
+
variant: 'ghost'
|
|
98
|
+
}),
|
|
99
|
+
"data-slot": "sheet-close",
|
|
100
|
+
children: [
|
|
101
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.XIcon, {
|
|
102
|
+
className: "size-4"
|
|
103
|
+
}),
|
|
104
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
105
|
+
className: "sr-only",
|
|
106
|
+
children: "Close"
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function SheetHeader({ className, ...props }) {
|
|
116
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("header", {
|
|
117
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-4 text-center sm:text-left', className),
|
|
118
|
+
"data-slot": "sheet-header",
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function SheetBody({ className, ...props }) {
|
|
123
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("main", {
|
|
124
|
+
className: (0, tailwind_variants_namespaceObject.cn)('px-6 py-2', className),
|
|
125
|
+
"data-slot": "sheet-body",
|
|
126
|
+
...props
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function SheetFooter({ className, ...props }) {
|
|
130
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("footer", {
|
|
131
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex shrink-0 flex-col-reverse gap-2 px-6 pt-4 pb-6 sm:flex-row sm:justify-end', className),
|
|
132
|
+
"data-slot": "sheet-footer",
|
|
133
|
+
...props
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function SheetTitle({ className, ...props }) {
|
|
137
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Title, {
|
|
138
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-foreground text-lg font-semibold', className),
|
|
139
|
+
"data-slot": "sheet-title",
|
|
140
|
+
...props
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function SheetDescription({ className, ...props }) {
|
|
144
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Description, {
|
|
145
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground text-sm', className),
|
|
146
|
+
"data-slot": "sheet-description",
|
|
147
|
+
...props
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function SheetClose({ className, size, variant = 'outline', ...props }) {
|
|
151
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Close, {
|
|
152
|
+
className: (0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
153
|
+
className,
|
|
154
|
+
size,
|
|
155
|
+
variant
|
|
156
|
+
}),
|
|
157
|
+
"data-slot": "sheet-close",
|
|
158
|
+
...props
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
exports.Sheet = __webpack_exports__.Sheet;
|
|
162
|
+
exports.SheetBody = __webpack_exports__.SheetBody;
|
|
163
|
+
exports.SheetClose = __webpack_exports__.SheetClose;
|
|
164
|
+
exports.SheetContent = __webpack_exports__.SheetContent;
|
|
165
|
+
exports.SheetDescription = __webpack_exports__.SheetDescription;
|
|
166
|
+
exports.SheetFooter = __webpack_exports__.SheetFooter;
|
|
167
|
+
exports.SheetHeader = __webpack_exports__.SheetHeader;
|
|
168
|
+
exports.SheetTitle = __webpack_exports__.SheetTitle;
|
|
169
|
+
exports.SheetTrigger = __webpack_exports__.SheetTrigger;
|
|
170
|
+
exports.sheetContentVariants = __webpack_exports__.sheetContentVariants;
|
|
171
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
172
|
+
"Sheet",
|
|
173
|
+
"SheetBody",
|
|
174
|
+
"SheetClose",
|
|
175
|
+
"SheetContent",
|
|
176
|
+
"SheetDescription",
|
|
177
|
+
"SheetFooter",
|
|
178
|
+
"SheetHeader",
|
|
179
|
+
"SheetTitle",
|
|
180
|
+
"SheetTrigger",
|
|
181
|
+
"sheetContentVariants"
|
|
182
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
183
|
+
Object.defineProperty(exports, '__esModule', {
|
|
184
|
+
value: true
|
|
185
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import type { VariantProps } from '@codefast/tailwind-variants';
|
|
2
|
+
import type { ComponentProps, JSX } from 'react';
|
|
3
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
|
+
import { buttonVariants } from './button';
|
|
5
5
|
declare const sheetContentVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
6
6
|
side: {
|
|
7
7
|
bottom: string;
|
|
@@ -22,19 +22,19 @@ interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
declare function SheetContent({ children, className, classNames, side, ...props }: SheetContentProps): JSX.Element;
|
|
25
|
-
type SheetHeaderProps = ComponentProps<
|
|
25
|
+
type SheetHeaderProps = ComponentProps<'div'>;
|
|
26
26
|
declare function SheetHeader({ className, ...props }: SheetHeaderProps): JSX.Element;
|
|
27
|
-
type SheetBodyProps = ComponentProps<
|
|
27
|
+
type SheetBodyProps = ComponentProps<'div'>;
|
|
28
28
|
declare function SheetBody({ className, ...props }: SheetBodyProps): JSX.Element;
|
|
29
|
-
type SheetFooterProps = ComponentProps<
|
|
29
|
+
type SheetFooterProps = ComponentProps<'div'>;
|
|
30
30
|
declare function SheetFooter({ className, ...props }: SheetFooterProps): JSX.Element;
|
|
31
31
|
type SheetTitleProps = ComponentProps<typeof SheetPrimitive.Title>;
|
|
32
32
|
declare function SheetTitle({ className, ...props }: SheetTitleProps): JSX.Element;
|
|
33
33
|
type SheetDescriptionProps = ComponentProps<typeof SheetPrimitive.Description>;
|
|
34
34
|
declare function SheetDescription({ className, ...props }: SheetDescriptionProps): JSX.Element;
|
|
35
35
|
interface SheetCloseProps extends ComponentProps<typeof SheetPrimitive.Close> {
|
|
36
|
-
size?: VariantProps<typeof buttonVariants>[
|
|
37
|
-
variant?: VariantProps<typeof buttonVariants>[
|
|
36
|
+
size?: VariantProps<typeof buttonVariants>['size'];
|
|
37
|
+
variant?: VariantProps<typeof buttonVariants>['variant'];
|
|
38
38
|
}
|
|
39
39
|
declare function SheetClose({ className, size, variant, ...props }: SheetCloseProps): JSX.Element;
|
|
40
40
|
export { sheetContentVariants };
|
package/dist/components/sheet.js
CHANGED
|
@@ -1,2 +1,124 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn, tv } from "@codefast/tailwind-variants";
|
|
4
|
+
import { Close, Content, Description, Overlay, Portal, Root, Title, Trigger } from "@radix-ui/react-dialog";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
import { buttonVariants } from "./button.js";
|
|
7
|
+
const sheetContentVariants = tv({
|
|
8
|
+
base: 'bg-background ease-ui data-[state=open]:animate-in data-[state=open]:animation-duration-500 data-[state=closed]:animate-out data-[state=closed]:animation-duration-500 fixed z-50 flex flex-col overflow-auto shadow-lg',
|
|
9
|
+
defaultVariants: {
|
|
10
|
+
side: 'right'
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
side: {
|
|
14
|
+
bottom: 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-[80vh] border-t',
|
|
15
|
+
left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
16
|
+
right: 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
17
|
+
top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-[80vh] border-b'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
function Sheet({ children, ...props }) {
|
|
22
|
+
return /*#__PURE__*/ jsx(Root, {
|
|
23
|
+
"data-slot": "sheet",
|
|
24
|
+
...props,
|
|
25
|
+
children: children
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function SheetTrigger({ ...props }) {
|
|
29
|
+
return /*#__PURE__*/ jsx(Trigger, {
|
|
30
|
+
"data-slot": "sheet-trigger",
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function SheetContent({ children, className, classNames, side = 'right', ...props }) {
|
|
35
|
+
return /*#__PURE__*/ jsxs(Portal, {
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ jsx(Overlay, {
|
|
38
|
+
className: cn('data-[state=open]:fade-in-0 ease-ui data-[state=open]:animate-in data-[state=open]:animation-duration-500 data-[state=closed]:fade-out-0 data-[state=closed]:animate-out data-[state=closed]:animation-duration-500 fixed inset-0 z-50 bg-black/50', classNames?.overlay),
|
|
39
|
+
"data-slot": "sheet-overlay"
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ jsxs(Content, {
|
|
42
|
+
className: sheetContentVariants({
|
|
43
|
+
className: [
|
|
44
|
+
classNames?.content,
|
|
45
|
+
className
|
|
46
|
+
],
|
|
47
|
+
side
|
|
48
|
+
}),
|
|
49
|
+
"data-slot": "sheet-content",
|
|
50
|
+
...props,
|
|
51
|
+
children: [
|
|
52
|
+
children,
|
|
53
|
+
/*#__PURE__*/ jsxs(Close, {
|
|
54
|
+
className: buttonVariants({
|
|
55
|
+
className: [
|
|
56
|
+
'absolute top-4 right-4 size-7',
|
|
57
|
+
classNames?.close
|
|
58
|
+
],
|
|
59
|
+
size: 'icon',
|
|
60
|
+
variant: 'ghost'
|
|
61
|
+
}),
|
|
62
|
+
"data-slot": "sheet-close",
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ jsx(XIcon, {
|
|
65
|
+
className: "size-4"
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ jsx("span", {
|
|
68
|
+
className: "sr-only",
|
|
69
|
+
children: "Close"
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function SheetHeader({ className, ...props }) {
|
|
79
|
+
return /*#__PURE__*/ jsx("header", {
|
|
80
|
+
className: cn('flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-4 text-center sm:text-left', className),
|
|
81
|
+
"data-slot": "sheet-header",
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function SheetBody({ className, ...props }) {
|
|
86
|
+
return /*#__PURE__*/ jsx("main", {
|
|
87
|
+
className: cn('px-6 py-2', className),
|
|
88
|
+
"data-slot": "sheet-body",
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function SheetFooter({ className, ...props }) {
|
|
93
|
+
return /*#__PURE__*/ jsx("footer", {
|
|
94
|
+
className: cn('flex shrink-0 flex-col-reverse gap-2 px-6 pt-4 pb-6 sm:flex-row sm:justify-end', className),
|
|
95
|
+
"data-slot": "sheet-footer",
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function SheetTitle({ className, ...props }) {
|
|
100
|
+
return /*#__PURE__*/ jsx(Title, {
|
|
101
|
+
className: cn('text-foreground text-lg font-semibold', className),
|
|
102
|
+
"data-slot": "sheet-title",
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function SheetDescription({ className, ...props }) {
|
|
107
|
+
return /*#__PURE__*/ jsx(Description, {
|
|
108
|
+
className: cn('text-muted-foreground text-sm', className),
|
|
109
|
+
"data-slot": "sheet-description",
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function SheetClose({ className, size, variant = 'outline', ...props }) {
|
|
114
|
+
return /*#__PURE__*/ jsx(Close, {
|
|
115
|
+
className: buttonVariants({
|
|
116
|
+
className,
|
|
117
|
+
size,
|
|
118
|
+
variant
|
|
119
|
+
}),
|
|
120
|
+
"data-slot": "sheet-close",
|
|
121
|
+
...props
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, sheetContentVariants };
|