@arch-cadre/ui 0.0.10 → 0.0.15
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/build.config.ts +23 -0
- package/dist/components/.gitkeep +0 -0
- package/dist/components/accordion.cjs +62 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.mjs +58 -0
- package/dist/components/alert-dialog.cjs +127 -0
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.mjs +144 -0
- package/dist/components/alert.cjs +58 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.mjs +62 -0
- package/dist/components/aspect-ratio.cjs +19 -0
- package/dist/components/aspect-ratio.d.ts +4 -0
- package/dist/components/aspect-ratio.mjs +9 -0
- package/dist/components/avatar.cjs +44 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/avatar.mjs +50 -0
- package/dist/components/badge.cjs +41 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/badge.mjs +37 -0
- package/dist/components/breadcrumb.cjs +106 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.mjs +105 -0
- package/dist/components/button-group.cjs +65 -0
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.mjs +76 -0
- package/dist/components/button.cjs +57 -0
- package/dist/components/button.d.ts +10 -0
- package/dist/components/button.mjs +51 -0
- package/dist/components/calendar.cjs +143 -0
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/calendar.mjs +191 -0
- package/dist/components/card.cjs +86 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.mjs +90 -0
- package/dist/components/checkbox.cjs +28 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.mjs +30 -0
- package/dist/components/collapsible.cjs +37 -0
- package/dist/components/collapsible.d.ts +6 -0
- package/dist/components/collapsible.mjs +31 -0
- package/dist/components/command.cjs +125 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/command.mjs +169 -0
- package/dist/components/context-menu.cjs +188 -0
- package/dist/components/context-menu.d.ts +25 -0
- package/dist/components/context-menu.mjs +218 -0
- package/dist/components/dialog.cjs +123 -0
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.mjs +130 -0
- package/dist/components/drawer.cjs +118 -0
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.mjs +124 -0
- package/dist/components/dropdown-menu.cjs +190 -0
- package/dist/components/dropdown-menu.d.ts +25 -0
- package/dist/components/dropdown-menu.mjs +226 -0
- package/dist/components/empty.cjs +92 -0
- package/dist/components/empty.d.ts +12 -0
- package/dist/components/empty.mjs +102 -0
- package/dist/components/field.cjs +173 -0
- package/dist/components/field.d.ts +25 -0
- package/dist/components/field.mjs +228 -0
- package/dist/components/form.cjs +143 -0
- package/dist/components/form.d.ts +23 -0
- package/dist/components/form.mjs +123 -0
- package/dist/components/hover-card.cjs +46 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.mjs +35 -0
- package/dist/components/input-group.cjs +130 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/input-group.mjs +155 -0
- package/dist/components/input-otp.cjs +69 -0
- package/dist/components/input-otp.d.ts +11 -0
- package/dist/components/input-otp.mjs +59 -0
- package/dist/components/input.cjs +22 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.mjs +19 -0
- package/dist/components/item.cjs +168 -0
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.mjs +187 -0
- package/dist/components/kbd.cjs +31 -0
- package/dist/components/kbd.d.ts +4 -0
- package/dist/components/kbd.mjs +28 -0
- package/dist/components/label.cjs +22 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.mjs +21 -0
- package/dist/components/language-switcher.cjs +43 -0
- package/dist/components/language-switcher.d.ts +2 -0
- package/dist/components/language-switcher.mjs +30 -0
- package/dist/components/menubar.cjs +207 -0
- package/dist/components/menubar.d.ts +26 -0
- package/dist/components/menubar.mjs +246 -0
- package/dist/components/navigation-menu.cjs +113 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.mjs +166 -0
- package/dist/components/pagination.cjs +106 -0
- package/dist/components/pagination.d.ts +15 -0
- package/dist/components/pagination.mjs +116 -0
- package/dist/components/popover.cjs +53 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.mjs +40 -0
- package/dist/components/progress.cjs +29 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/progress.mjs +30 -0
- package/dist/components/radio-group.cjs +39 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.mjs +43 -0
- package/dist/components/scroll-area.cjs +45 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.mjs +59 -0
- package/dist/components/select.cjs +140 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.mjs +173 -0
- package/dist/components/separator.cjs +26 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/separator.mjs +25 -0
- package/dist/components/sheet.cjs +120 -0
- package/dist/components/sheet.d.ts +13 -0
- package/dist/components/sheet.mjs +119 -0
- package/dist/components/sidebar.cjs +508 -0
- package/dist/components/sidebar.d.ts +69 -0
- package/dist/components/sidebar.mjs +635 -0
- package/dist/components/skeleton.cjs +20 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.mjs +13 -0
- package/dist/components/slider.cjs +43 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/slider.mjs +59 -0
- package/dist/components/sonner.cjs +49 -0
- package/dist/components/sonner.d.ts +4 -0
- package/dist/components/sonner.mjs +36 -0
- package/dist/components/spinner.cjs +22 -0
- package/dist/components/spinner.d.ts +3 -0
- package/dist/components/spinner.mjs +15 -0
- package/dist/components/switch.cjs +25 -0
- package/dist/components/switch.d.ts +4 -0
- package/dist/components/switch.mjs +30 -0
- package/dist/components/table.cjs +101 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.mjs +115 -0
- package/dist/components/tabs.cjs +55 -0
- package/dist/components/tabs.d.ts +7 -0
- package/dist/components/tabs.mjs +63 -0
- package/dist/components/textarea.cjs +20 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.mjs +16 -0
- package/dist/components/toggle-group.cjs +65 -0
- package/dist/components/toggle-group.d.ts +9 -0
- package/dist/components/toggle-group.mjs +65 -0
- package/dist/components/toggle.cjs +47 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/toggle.mjs +41 -0
- package/dist/components/tooltip.cjs +56 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.mjs +49 -0
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.cjs +23 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.mjs +17 -0
- package/dist/hooks/use-user.cjs +21 -0
- package/dist/hooks/use-user.d.ts +12 -0
- package/dist/hooks/use-user.mjs +12 -0
- package/dist/index.cjs +155 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.mjs +13 -0
- package/dist/lib/utils.cjs +11 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.mjs +5 -0
- package/dist/logo.cjs +49 -0
- package/dist/logo.d.ts +15 -0
- package/dist/logo.mjs +32 -0
- package/dist/postcss.config.cjs +13 -0
- package/dist/postcss.config.d.mts +3 -0
- package/dist/postcss.config.mjs +6 -0
- package/dist/providers/auth-provider.cjs +44 -0
- package/dist/providers/auth-provider.d.ts +15 -0
- package/dist/providers/auth-provider.mjs +37 -0
- package/dist/providers/index.cjs +47 -0
- package/dist/providers/index.d.ts +7 -0
- package/dist/providers/index.mjs +33 -0
- package/dist/shared/access-denied.cjs +38 -0
- package/dist/shared/access-denied.d.ts +2 -0
- package/dist/shared/access-denied.mjs +12 -0
- package/dist/shared/loader.cjs +95 -0
- package/dist/shared/loader.d.ts +11 -0
- package/dist/shared/loader.mjs +98 -0
- package/dist/shared/page-loader.cjs +23 -0
- package/dist/shared/page-loader.d.ts +7 -0
- package/dist/shared/page-loader.mjs +6 -0
- package/dist/shared/scroll-fade-effect.cjs +21 -0
- package/dist/shared/scroll-fade-effect.d.ts +4 -0
- package/dist/shared/scroll-fade-effect.mjs +20 -0
- package/dist/styles/globals.css +1 -0
- package/package.json +58 -49
- package/scripts/switchToDist.js +55 -0
- package/scripts/switchToSrc.js +52 -0
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +1 -1
- package/src/components/alert.tsx +1 -1
- package/src/components/aspect-ratio.tsx +2 -1
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +3 -3
- package/src/components/breadcrumb.tsx +5 -3
- package/src/components/button-group.tsx +4 -2
- package/src/components/button.tsx +3 -3
- package/src/components/calendar.tsx +2 -2
- package/src/components/checkbox.tsx +2 -2
- package/src/components/collapsible.tsx +2 -1
- package/src/components/command.tsx +1 -1
- package/src/components/context-menu.tsx +2 -2
- package/src/components/dialog.tsx +2 -2
- package/src/components/dropdown-menu.tsx +2 -2
- package/src/components/empty.tsx +1 -0
- package/src/components/field.tsx +5 -2
- package/src/components/form.tsx +9 -7
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/item.tsx +3 -3
- package/src/components/kbd.tsx +1 -0
- package/src/components/label.tsx +1 -1
- package/src/components/language-switcher.tsx +16 -17
- package/src/components/menubar.tsx +2 -2
- package/src/components/navigation-menu.tsx +2 -2
- package/src/components/pagination.tsx +5 -2
- package/src/components/popover.tsx +1 -1
- package/src/components/progress.tsx +1 -1
- package/src/components/radio-group.tsx +2 -2
- package/src/components/scroll-area.tsx +1 -1
- package/src/components/select.tsx +2 -2
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/sidebar.tsx +6 -6
- package/src/components/skeleton.tsx +1 -0
- package/src/components/slider.tsx +1 -1
- package/src/components/sonner.tsx +1 -0
- package/src/components/spinner.tsx +1 -0
- package/src/components/switch.tsx +1 -1
- package/src/components/tabs.tsx +1 -1
- package/src/components/toggle-group.tsx +2 -2
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +1 -1
- package/src/hooks/use-user.ts +2 -2
- package/src/index.ts +8 -5
- package/src/logo.tsx +1 -0
- package/src/providers/auth-provider.tsx +7 -6
- package/src/providers/index.tsx +1 -0
- package/src/shared/access-denied.tsx +1 -0
- package/src/shared/loader.tsx +2 -1
- package/src/shared/page-loader.tsx +1 -0
- package/src/shared/scroll-fade-effect.tsx +1 -1
- package/src/styles/globals.css +258 -244
- package/biome.json +0 -38
- package/src/components/carousel.tsx +0 -241
- package/src/components/chart.tsx +0 -357
- package/tsconfig.build.json +0 -16
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ScrollArea = ScrollArea;
|
|
8
|
+
exports.ScrollBar = ScrollBar;
|
|
9
|
+
var _radixUi = require("radix-ui");
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _utils = require("../lib/utils.cjs");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function ScrollArea({
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
orientation = "vertical",
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */React.createElement(_radixUi.ScrollArea.Root, {
|
|
21
|
+
"data-slot": "scroll-area",
|
|
22
|
+
className: (0, _utils.cn)("relative", className),
|
|
23
|
+
...props
|
|
24
|
+
}, /* @__PURE__ */React.createElement(_radixUi.ScrollArea.Viewport, {
|
|
25
|
+
"data-slot": "scroll-area-viewport",
|
|
26
|
+
"data-orientation": orientation,
|
|
27
|
+
onScroll: props.onScroll,
|
|
28
|
+
className: "\n focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1\n data-[orientation=horizontal]:overflow-x-auto data-[orientation=vertical]:overflow-y-auto\n data-[orientation=horizontal]:scroll-fade-effect-x data-[orientation=vertical]:scroll-fade-effect-y\n "
|
|
29
|
+
}, children), /* @__PURE__ */React.createElement(ScrollBar, null), /* @__PURE__ */React.createElement(_radixUi.ScrollArea.Corner, null));
|
|
30
|
+
}
|
|
31
|
+
function ScrollBar({
|
|
32
|
+
className,
|
|
33
|
+
orientation = "vertical",
|
|
34
|
+
...props
|
|
35
|
+
}) {
|
|
36
|
+
return /* @__PURE__ */React.createElement(_radixUi.ScrollArea.ScrollAreaScrollbar, {
|
|
37
|
+
"data-slot": "scroll-area-scrollbar",
|
|
38
|
+
orientation,
|
|
39
|
+
className: (0, _utils.cn)("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className),
|
|
40
|
+
...props
|
|
41
|
+
}, /* @__PURE__ */React.createElement(_radixUi.ScrollArea.ScrollAreaThumb, {
|
|
42
|
+
"data-slot": "scroll-area-thumb",
|
|
43
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function ScrollArea({ className, children, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root> & {
|
|
4
|
+
orientation: "vertical" | "horizontal";
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): React.JSX.Element;
|
|
7
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils.mjs";
|
|
5
|
+
function ScrollArea({
|
|
6
|
+
className,
|
|
7
|
+
children,
|
|
8
|
+
orientation = "vertical",
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ React.createElement(
|
|
12
|
+
ScrollAreaPrimitive.Root,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "scroll-area",
|
|
15
|
+
className: cn("relative", className),
|
|
16
|
+
...props
|
|
17
|
+
},
|
|
18
|
+
/* @__PURE__ */ React.createElement(
|
|
19
|
+
ScrollAreaPrimitive.Viewport,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "scroll-area-viewport",
|
|
22
|
+
"data-orientation": orientation,
|
|
23
|
+
onScroll: props.onScroll,
|
|
24
|
+
className: "\n focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1\n data-[orientation=horizontal]:overflow-x-auto data-[orientation=vertical]:overflow-y-auto\n data-[orientation=horizontal]:scroll-fade-effect-x data-[orientation=vertical]:scroll-fade-effect-y\n "
|
|
25
|
+
},
|
|
26
|
+
children
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ React.createElement(ScrollBar, null),
|
|
29
|
+
/* @__PURE__ */ React.createElement(ScrollAreaPrimitive.Corner, null)
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function ScrollBar({
|
|
33
|
+
className,
|
|
34
|
+
orientation = "vertical",
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ React.createElement(
|
|
38
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "scroll-area-scrollbar",
|
|
41
|
+
orientation,
|
|
42
|
+
className: cn(
|
|
43
|
+
"flex touch-none p-px transition-colors select-none",
|
|
44
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
45
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...props
|
|
49
|
+
},
|
|
50
|
+
/* @__PURE__ */ React.createElement(
|
|
51
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "scroll-area-thumb",
|
|
54
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Select = Select;
|
|
8
|
+
exports.SelectContent = SelectContent;
|
|
9
|
+
exports.SelectGroup = SelectGroup;
|
|
10
|
+
exports.SelectItem = SelectItem;
|
|
11
|
+
exports.SelectLabel = SelectLabel;
|
|
12
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
13
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
14
|
+
exports.SelectSeparator = SelectSeparator;
|
|
15
|
+
exports.SelectTrigger = SelectTrigger;
|
|
16
|
+
exports.SelectValue = SelectValue;
|
|
17
|
+
var _radixUi = require("radix-ui");
|
|
18
|
+
var _lucideReact = require("lucide-react");
|
|
19
|
+
var React = _interopRequireWildcard(require("react"));
|
|
20
|
+
var _utils = require("../lib/utils.cjs");
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
|
+
function Select({
|
|
24
|
+
...props
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.Root, {
|
|
27
|
+
"data-slot": "select",
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function SelectGroup({
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.Group, {
|
|
35
|
+
"data-slot": "select-group",
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function SelectValue({
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.Value, {
|
|
43
|
+
"data-slot": "select-value",
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function SelectTrigger({
|
|
48
|
+
className,
|
|
49
|
+
size = "default",
|
|
50
|
+
children,
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.Trigger, {
|
|
54
|
+
"data-slot": "select-trigger",
|
|
55
|
+
"data-size": size,
|
|
56
|
+
className: (0, _utils.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
57
|
+
...props
|
|
58
|
+
}, children, /* @__PURE__ */React.createElement(_radixUi.Select.Icon, {
|
|
59
|
+
asChild: true
|
|
60
|
+
}, /* @__PURE__ */React.createElement(_lucideReact.ChevronDownIcon, {
|
|
61
|
+
className: "size-4 opacity-50"
|
|
62
|
+
})));
|
|
63
|
+
}
|
|
64
|
+
function SelectContent({
|
|
65
|
+
className,
|
|
66
|
+
children,
|
|
67
|
+
position = "item-aligned",
|
|
68
|
+
align = "center",
|
|
69
|
+
...props
|
|
70
|
+
}) {
|
|
71
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.Portal, null, /* @__PURE__ */React.createElement(_radixUi.Select.Content, {
|
|
72
|
+
"data-slot": "select-content",
|
|
73
|
+
className: (0, _utils.cn)("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", position === "popper" && "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),
|
|
74
|
+
position,
|
|
75
|
+
align,
|
|
76
|
+
...props
|
|
77
|
+
}, /* @__PURE__ */React.createElement(SelectScrollUpButton, null), /* @__PURE__ */React.createElement(_radixUi.Select.Viewport, {
|
|
78
|
+
className: (0, _utils.cn)("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")
|
|
79
|
+
}, children), /* @__PURE__ */React.createElement(SelectScrollDownButton, null)));
|
|
80
|
+
}
|
|
81
|
+
function SelectLabel({
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.Label, {
|
|
86
|
+
"data-slot": "select-label",
|
|
87
|
+
className: (0, _utils.cn)("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function SelectItem({
|
|
92
|
+
className,
|
|
93
|
+
children,
|
|
94
|
+
...props
|
|
95
|
+
}) {
|
|
96
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.Item, {
|
|
97
|
+
"data-slot": "select-item",
|
|
98
|
+
className: (0, _utils.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
99
|
+
...props
|
|
100
|
+
}, /* @__PURE__ */React.createElement("span", {
|
|
101
|
+
"data-slot": "select-item-indicator",
|
|
102
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center"
|
|
103
|
+
}, /* @__PURE__ */React.createElement(_radixUi.Select.ItemIndicator, null, /* @__PURE__ */React.createElement(_lucideReact.CheckIcon, {
|
|
104
|
+
className: "size-4"
|
|
105
|
+
}))), /* @__PURE__ */React.createElement(_radixUi.Select.ItemText, null, children));
|
|
106
|
+
}
|
|
107
|
+
function SelectSeparator({
|
|
108
|
+
className,
|
|
109
|
+
...props
|
|
110
|
+
}) {
|
|
111
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.Separator, {
|
|
112
|
+
"data-slot": "select-separator",
|
|
113
|
+
className: (0, _utils.cn)("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
114
|
+
...props
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function SelectScrollUpButton({
|
|
118
|
+
className,
|
|
119
|
+
...props
|
|
120
|
+
}) {
|
|
121
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.ScrollUpButton, {
|
|
122
|
+
"data-slot": "select-scroll-up-button",
|
|
123
|
+
className: (0, _utils.cn)("flex cursor-default items-center justify-center py-1", className),
|
|
124
|
+
...props
|
|
125
|
+
}, /* @__PURE__ */React.createElement(_lucideReact.ChevronUpIcon, {
|
|
126
|
+
className: "size-4"
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
function SelectScrollDownButton({
|
|
130
|
+
className,
|
|
131
|
+
...props
|
|
132
|
+
}) {
|
|
133
|
+
return /* @__PURE__ */React.createElement(_radixUi.Select.ScrollDownButton, {
|
|
134
|
+
"data-slot": "select-scroll-down-button",
|
|
135
|
+
className: (0, _utils.cn)("flex cursor-default items-center justify-center py-1", className),
|
|
136
|
+
...props
|
|
137
|
+
}, /* @__PURE__ */React.createElement(_lucideReact.ChevronDownIcon, {
|
|
138
|
+
className: "size-4"
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
|
|
5
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
|
6
|
+
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
7
|
+
size?: "sm" | "default";
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
|
|
10
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
|
|
11
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
|
|
12
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
|
|
13
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
|
|
14
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
|
|
15
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
3
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "../lib/utils.mjs";
|
|
6
|
+
function Select({
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ React.createElement(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
10
|
+
}
|
|
11
|
+
function SelectGroup({
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ React.createElement(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
15
|
+
}
|
|
16
|
+
function SelectValue({
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */ React.createElement(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
20
|
+
}
|
|
21
|
+
function SelectTrigger({
|
|
22
|
+
className,
|
|
23
|
+
size = "default",
|
|
24
|
+
children,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ React.createElement(
|
|
28
|
+
SelectPrimitive.Trigger,
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "select-trigger",
|
|
31
|
+
"data-size": size,
|
|
32
|
+
className: cn(
|
|
33
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props
|
|
37
|
+
},
|
|
38
|
+
children,
|
|
39
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.Icon, { asChild: true }, /* @__PURE__ */ React.createElement(ChevronDownIcon, { className: "size-4 opacity-50" }))
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
function SelectContent({
|
|
43
|
+
className,
|
|
44
|
+
children,
|
|
45
|
+
position = "item-aligned",
|
|
46
|
+
align = "center",
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ React.createElement(SelectPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
|
|
50
|
+
SelectPrimitive.Content,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "select-content",
|
|
53
|
+
className: cn(
|
|
54
|
+
"bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
55
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
56
|
+
className
|
|
57
|
+
),
|
|
58
|
+
position,
|
|
59
|
+
align,
|
|
60
|
+
...props
|
|
61
|
+
},
|
|
62
|
+
/* @__PURE__ */ React.createElement(SelectScrollUpButton, null),
|
|
63
|
+
/* @__PURE__ */ React.createElement(
|
|
64
|
+
SelectPrimitive.Viewport,
|
|
65
|
+
{
|
|
66
|
+
className: cn(
|
|
67
|
+
"p-1",
|
|
68
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
69
|
+
)
|
|
70
|
+
},
|
|
71
|
+
children
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ React.createElement(SelectScrollDownButton, null)
|
|
74
|
+
));
|
|
75
|
+
}
|
|
76
|
+
function SelectLabel({
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ React.createElement(
|
|
81
|
+
SelectPrimitive.Label,
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "select-label",
|
|
84
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
85
|
+
...props
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function SelectItem({
|
|
90
|
+
className,
|
|
91
|
+
children,
|
|
92
|
+
...props
|
|
93
|
+
}) {
|
|
94
|
+
return /* @__PURE__ */ React.createElement(
|
|
95
|
+
SelectPrimitive.Item,
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "select-item",
|
|
98
|
+
className: cn(
|
|
99
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
...props
|
|
103
|
+
},
|
|
104
|
+
/* @__PURE__ */ React.createElement(
|
|
105
|
+
"span",
|
|
106
|
+
{
|
|
107
|
+
"data-slot": "select-item-indicator",
|
|
108
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center"
|
|
109
|
+
},
|
|
110
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement(CheckIcon, { className: "size-4" }))
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ React.createElement(SelectPrimitive.ItemText, null, children)
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
function SelectSeparator({
|
|
116
|
+
className,
|
|
117
|
+
...props
|
|
118
|
+
}) {
|
|
119
|
+
return /* @__PURE__ */ React.createElement(
|
|
120
|
+
SelectPrimitive.Separator,
|
|
121
|
+
{
|
|
122
|
+
"data-slot": "select-separator",
|
|
123
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
124
|
+
...props
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
function SelectScrollUpButton({
|
|
129
|
+
className,
|
|
130
|
+
...props
|
|
131
|
+
}) {
|
|
132
|
+
return /* @__PURE__ */ React.createElement(
|
|
133
|
+
SelectPrimitive.ScrollUpButton,
|
|
134
|
+
{
|
|
135
|
+
"data-slot": "select-scroll-up-button",
|
|
136
|
+
className: cn(
|
|
137
|
+
"flex cursor-default items-center justify-center py-1",
|
|
138
|
+
className
|
|
139
|
+
),
|
|
140
|
+
...props
|
|
141
|
+
},
|
|
142
|
+
/* @__PURE__ */ React.createElement(ChevronUpIcon, { className: "size-4" })
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function SelectScrollDownButton({
|
|
146
|
+
className,
|
|
147
|
+
...props
|
|
148
|
+
}) {
|
|
149
|
+
return /* @__PURE__ */ React.createElement(
|
|
150
|
+
SelectPrimitive.ScrollDownButton,
|
|
151
|
+
{
|
|
152
|
+
"data-slot": "select-scroll-down-button",
|
|
153
|
+
className: cn(
|
|
154
|
+
"flex cursor-default items-center justify-center py-1",
|
|
155
|
+
className
|
|
156
|
+
),
|
|
157
|
+
...props
|
|
158
|
+
},
|
|
159
|
+
/* @__PURE__ */ React.createElement(ChevronDownIcon, { className: "size-4" })
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
export {
|
|
163
|
+
Select,
|
|
164
|
+
SelectContent,
|
|
165
|
+
SelectGroup,
|
|
166
|
+
SelectItem,
|
|
167
|
+
SelectLabel,
|
|
168
|
+
SelectScrollDownButton,
|
|
169
|
+
SelectScrollUpButton,
|
|
170
|
+
SelectSeparator,
|
|
171
|
+
SelectTrigger,
|
|
172
|
+
SelectValue
|
|
173
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Separator = Separator;
|
|
8
|
+
var _radixUi = require("radix-ui");
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _utils = require("../lib/utils.cjs");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
function Separator({
|
|
14
|
+
className,
|
|
15
|
+
orientation = "horizontal",
|
|
16
|
+
decorative = true,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */React.createElement(_radixUi.Separator.Root, {
|
|
20
|
+
"data-slot": "separator",
|
|
21
|
+
decorative,
|
|
22
|
+
orientation,
|
|
23
|
+
className: (0, _utils.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils.mjs";
|
|
5
|
+
function Separator({
|
|
6
|
+
className,
|
|
7
|
+
orientation = "horizontal",
|
|
8
|
+
decorative = true,
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ React.createElement(
|
|
12
|
+
SeparatorPrimitive.Root,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "separator",
|
|
15
|
+
decorative,
|
|
16
|
+
orientation,
|
|
17
|
+
className: cn(
|
|
18
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
export { Separator };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Sheet = Sheet;
|
|
8
|
+
exports.SheetClose = SheetClose;
|
|
9
|
+
exports.SheetContent = SheetContent;
|
|
10
|
+
exports.SheetDescription = SheetDescription;
|
|
11
|
+
exports.SheetFooter = SheetFooter;
|
|
12
|
+
exports.SheetHeader = SheetHeader;
|
|
13
|
+
exports.SheetTitle = SheetTitle;
|
|
14
|
+
exports.SheetTrigger = SheetTrigger;
|
|
15
|
+
var _radixUi = require("radix-ui");
|
|
16
|
+
var _lucideReact = require("lucide-react");
|
|
17
|
+
var React = _interopRequireWildcard(require("react"));
|
|
18
|
+
var _utils = require("../lib/utils.cjs");
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
+
function Sheet({
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */React.createElement(_radixUi.Dialog.Root, {
|
|
25
|
+
"data-slot": "sheet",
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function SheetTrigger({
|
|
30
|
+
...props
|
|
31
|
+
}) {
|
|
32
|
+
return /* @__PURE__ */React.createElement(_radixUi.Dialog.Trigger, {
|
|
33
|
+
"data-slot": "sheet-trigger",
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function SheetClose({
|
|
38
|
+
...props
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */React.createElement(_radixUi.Dialog.Close, {
|
|
41
|
+
"data-slot": "sheet-close",
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function SheetPortal({
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
return /* @__PURE__ */React.createElement(_radixUi.Dialog.Portal, {
|
|
49
|
+
"data-slot": "sheet-portal",
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function SheetOverlay({
|
|
54
|
+
className,
|
|
55
|
+
...props
|
|
56
|
+
}) {
|
|
57
|
+
return /* @__PURE__ */React.createElement(_radixUi.Dialog.Overlay, {
|
|
58
|
+
"data-slot": "sheet-overlay",
|
|
59
|
+
className: (0, _utils.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function SheetContent({
|
|
64
|
+
className,
|
|
65
|
+
children,
|
|
66
|
+
side = "right",
|
|
67
|
+
...props
|
|
68
|
+
}) {
|
|
69
|
+
return /* @__PURE__ */React.createElement(SheetPortal, null, /* @__PURE__ */React.createElement(SheetOverlay, null), /* @__PURE__ */React.createElement(_radixUi.Dialog.Content, {
|
|
70
|
+
"data-slot": "sheet-content",
|
|
71
|
+
className: (0, _utils.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
|
|
72
|
+
...props
|
|
73
|
+
}, children, /* @__PURE__ */React.createElement(_radixUi.Dialog.Close, {
|
|
74
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"
|
|
75
|
+
}, /* @__PURE__ */React.createElement(_lucideReact.XIcon, {
|
|
76
|
+
className: "size-4"
|
|
77
|
+
}), /* @__PURE__ */React.createElement("span", {
|
|
78
|
+
className: "sr-only"
|
|
79
|
+
}, "Close"))));
|
|
80
|
+
}
|
|
81
|
+
function SheetHeader({
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
86
|
+
"data-slot": "sheet-header",
|
|
87
|
+
className: (0, _utils.cn)("flex flex-col gap-1.5 p-4", className),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function SheetFooter({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
}) {
|
|
95
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
96
|
+
"data-slot": "sheet-footer",
|
|
97
|
+
className: (0, _utils.cn)("mt-auto flex flex-col gap-2 p-4", className),
|
|
98
|
+
...props
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function SheetTitle({
|
|
102
|
+
className,
|
|
103
|
+
...props
|
|
104
|
+
}) {
|
|
105
|
+
return /* @__PURE__ */React.createElement(_radixUi.Dialog.Title, {
|
|
106
|
+
"data-slot": "sheet-title",
|
|
107
|
+
className: (0, _utils.cn)("text-foreground font-semibold", className),
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function SheetDescription({
|
|
112
|
+
className,
|
|
113
|
+
...props
|
|
114
|
+
}) {
|
|
115
|
+
return /* @__PURE__ */React.createElement(_radixUi.Dialog.Description, {
|
|
116
|
+
"data-slot": "sheet-description",
|
|
117
|
+
className: (0, _utils.cn)("text-muted-foreground text-sm", className),
|
|
118
|
+
...props
|
|
119
|
+
});
|
|
120
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
|
|
6
|
+
declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
7
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
|
|
12
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
|
|
13
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|