@codefast/ui 0.0.27 → 0.0.29
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/dist/accordion.js +1 -49
- package/dist/accordion.js.map +1 -1
- package/dist/accordion.mjs +1 -49
- package/dist/accordion.mjs.map +1 -1
- package/dist/alert-dialog.js +1 -65
- package/dist/alert-dialog.js.map +1 -1
- package/dist/alert-dialog.mjs +1 -65
- package/dist/alert-dialog.mjs.map +1 -1
- package/dist/alert.js +1 -33
- package/dist/alert.js.map +1 -1
- package/dist/alert.mjs +1 -33
- package/dist/alert.mjs.map +1 -1
- package/dist/animate.plugin.js +2 -0
- package/dist/animate.plugin.js.map +1 -0
- package/dist/animate.plugin.mjs +2 -0
- package/dist/animate.plugin.mjs.map +1 -0
- package/dist/aspect-ratio.js +1 -8
- package/dist/aspect-ratio.js.map +1 -1
- package/dist/aspect-ratio.mjs +1 -8
- package/dist/aspect-ratio.mjs.map +1 -1
- package/dist/avatar.js +1 -34
- package/dist/avatar.js.map +1 -1
- package/dist/avatar.mjs +1 -34
- package/dist/avatar.mjs.map +1 -1
- package/dist/badge.js +1 -26
- package/dist/badge.js.map +1 -1
- package/dist/badge.mjs +1 -26
- package/dist/badge.mjs.map +1 -1
- package/dist/blockquote.js +1 -12
- package/dist/blockquote.js.map +1 -1
- package/dist/blockquote.mjs +1 -12
- package/dist/blockquote.mjs.map +1 -1
- package/dist/box.js +1 -12
- package/dist/box.js.map +1 -1
- package/dist/box.mjs +1 -12
- package/dist/box.mjs.map +1 -1
- package/dist/breadcrumb.js +1 -71
- package/dist/breadcrumb.js.map +1 -1
- package/dist/breadcrumb.mjs +1 -71
- package/dist/breadcrumb.mjs.map +1 -1
- package/dist/button.d.mts +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.js +1 -10
- package/dist/button.mjs +1 -10
- package/dist/calendar.js +1 -70
- package/dist/calendar.js.map +1 -1
- package/dist/calendar.mjs +1 -70
- package/dist/calendar.mjs.map +1 -1
- package/dist/card.js +1 -29
- package/dist/card.js.map +1 -1
- package/dist/card.mjs +1 -29
- package/dist/card.mjs.map +1 -1
- package/dist/carousel.js +1 -193
- package/dist/carousel.js.map +1 -1
- package/dist/carousel.mjs +1 -193
- package/dist/carousel.mjs.map +1 -1
- package/dist/checkbox-cards.js +1 -51
- package/dist/checkbox-cards.js.map +1 -1
- package/dist/checkbox-cards.mjs +1 -51
- package/dist/checkbox-cards.mjs.map +1 -1
- package/dist/checkbox-group.js +1 -39
- package/dist/checkbox-group.js.map +1 -1
- package/dist/checkbox-group.mjs +1 -39
- package/dist/checkbox-group.mjs.map +1 -1
- package/dist/checkbox-group.primitive.js +1 -18
- package/dist/checkbox-group.primitive.mjs +1 -18
- package/dist/checkbox.js +1 -26
- package/dist/checkbox.js.map +1 -1
- package/dist/checkbox.mjs +1 -26
- package/dist/checkbox.mjs.map +1 -1
- package/dist/chunk-2RQCRE7N.js +2 -0
- package/dist/chunk-2RQCRE7N.js.map +1 -0
- package/dist/chunk-ATQPXKGH.mjs +2 -0
- package/dist/{chunk-JULVZPCS.mjs.map → chunk-ATQPXKGH.mjs.map} +1 -1
- package/dist/chunk-CF2GOAXC.mjs +2 -0
- package/dist/{chunk-AUQEMOIM.mjs.map → chunk-CF2GOAXC.mjs.map} +1 -1
- package/dist/chunk-CHJJRHD2.mjs +2 -0
- package/dist/{chunk-TXRIFICH.mjs.map → chunk-CHJJRHD2.mjs.map} +1 -1
- package/dist/chunk-CNPQJV2G.js +2 -0
- package/dist/chunk-CNPQJV2G.js.map +1 -0
- package/dist/chunk-DCN2KICL.js +2 -0
- package/dist/chunk-DCN2KICL.js.map +1 -0
- package/dist/chunk-HJ4U5JJA.mjs +2 -0
- package/dist/chunk-HJ4U5JJA.mjs.map +1 -0
- package/dist/chunk-IBJ5USOR.js +2 -0
- package/dist/chunk-IBJ5USOR.js.map +1 -0
- package/dist/chunk-J5EXNAHZ.js +2 -0
- package/dist/chunk-J5EXNAHZ.js.map +1 -0
- package/dist/chunk-JTI7KCLO.mjs +2 -0
- package/dist/chunk-JTI7KCLO.mjs.map +1 -0
- package/dist/chunk-JVGHOCS7.js +2 -0
- package/dist/chunk-JVGHOCS7.js.map +1 -0
- package/dist/chunk-KICZFOKE.js +2 -0
- package/dist/chunk-KICZFOKE.js.map +1 -0
- package/dist/chunk-MXVHKLFU.mjs +2 -0
- package/dist/{chunk-FGI3JA75.mjs.map → chunk-MXVHKLFU.mjs.map} +1 -1
- package/dist/chunk-O7LLHO4I.js +2 -0
- package/dist/chunk-O7LLHO4I.js.map +1 -0
- package/dist/chunk-QZCQ42BP.js +2 -0
- package/dist/chunk-QZCQ42BP.js.map +1 -0
- package/dist/chunk-S23IT4G2.js +2 -0
- package/dist/chunk-S23IT4G2.js.map +1 -0
- package/dist/chunk-TMXZMQRK.mjs +2 -0
- package/dist/{chunk-73S45XV3.mjs.map → chunk-TMXZMQRK.mjs.map} +1 -1
- package/dist/chunk-VDYNVLXR.mjs +2 -0
- package/dist/{chunk-U6VR5RJ5.mjs.map → chunk-VDYNVLXR.mjs.map} +1 -1
- package/dist/chunk-XPJZ6WQM.js +2 -0
- package/dist/chunk-XPJZ6WQM.js.map +1 -0
- package/dist/chunk-YV4UJQ5X.mjs +2 -0
- package/dist/{chunk-EWS3N4OZ.mjs.map → chunk-YV4UJQ5X.mjs.map} +1 -1
- package/dist/chunk-ZLAYTLRK.mjs +2 -0
- package/dist/chunk-ZLAYTLRK.mjs.map +1 -0
- package/dist/chunk-ZMVKHU4U.mjs +2 -0
- package/dist/{chunk-Q24YJU6W.mjs.map → chunk-ZMVKHU4U.mjs.map} +1 -1
- package/dist/code.js +1 -12
- package/dist/code.js.map +1 -1
- package/dist/code.mjs +1 -12
- package/dist/code.mjs.map +1 -1
- package/dist/collapsible.js +1 -12
- package/dist/collapsible.js.map +1 -1
- package/dist/collapsible.mjs +1 -12
- package/dist/collapsible.mjs.map +1 -1
- package/dist/command.d.mts +15 -15
- package/dist/command.d.ts +15 -15
- package/dist/command.js +1 -93
- package/dist/command.js.map +1 -1
- package/dist/command.mjs +1 -93
- package/dist/command.mjs.map +1 -1
- package/dist/container.js +1 -16
- package/dist/container.js.map +1 -1
- package/dist/container.mjs +1 -16
- package/dist/container.mjs.map +1 -1
- package/dist/context-menu.js +1 -153
- package/dist/context-menu.js.map +1 -1
- package/dist/context-menu.mjs +1 -153
- package/dist/context-menu.mjs.map +1 -1
- package/dist/data-table.js +1 -235
- package/dist/data-table.js.map +1 -1
- package/dist/data-table.mjs +1 -235
- package/dist/data-table.mjs.map +1 -1
- package/dist/dialog.js +1 -22
- package/dist/dialog.mjs +1 -22
- package/dist/drawer.js +1 -64
- package/dist/drawer.js.map +1 -1
- package/dist/drawer.mjs +1 -64
- package/dist/drawer.mjs.map +1 -1
- package/dist/dropdown-menu.js +1 -34
- package/dist/dropdown-menu.mjs +1 -34
- package/dist/em.js +1 -12
- package/dist/em.js.map +1 -1
- package/dist/em.mjs +1 -12
- package/dist/em.mjs.map +1 -1
- package/dist/form.js +1 -91
- package/dist/form.js.map +1 -1
- package/dist/form.mjs +1 -91
- package/dist/form.mjs.map +1 -1
- package/dist/heading.js +1 -12
- package/dist/heading.js.map +1 -1
- package/dist/heading.mjs +1 -12
- package/dist/heading.mjs.map +1 -1
- package/dist/hover-card.js +1 -35
- package/dist/hover-card.js.map +1 -1
- package/dist/hover-card.mjs +1 -35
- package/dist/hover-card.mjs.map +1 -1
- package/dist/input-otp.js +1 -62
- package/dist/input-otp.js.map +1 -1
- package/dist/input-otp.mjs +1 -62
- package/dist/input-otp.mjs.map +1 -1
- package/dist/input.js +1 -28
- package/dist/input.js.map +1 -1
- package/dist/input.mjs +1 -28
- package/dist/input.mjs.map +1 -1
- package/dist/kbd.js +1 -26
- package/dist/kbd.js.map +1 -1
- package/dist/kbd.mjs +1 -26
- package/dist/kbd.mjs.map +1 -1
- package/dist/label.js +1 -8
- package/dist/label.mjs +1 -8
- package/dist/menubar.js +1 -168
- package/dist/menubar.js.map +1 -1
- package/dist/menubar.mjs +1 -168
- package/dist/menubar.mjs.map +1 -1
- package/dist/navigation-menu.js +1 -119
- package/dist/navigation-menu.js.map +1 -1
- package/dist/navigation-menu.mjs +1 -119
- package/dist/navigation-menu.mjs.map +1 -1
- package/dist/pagination.js +1 -86
- package/dist/pagination.js.map +1 -1
- package/dist/pagination.mjs +1 -86
- package/dist/pagination.mjs.map +1 -1
- package/dist/perspective.plugin.js +2 -0
- package/dist/perspective.plugin.js.map +1 -0
- package/dist/perspective.plugin.mjs +2 -0
- package/dist/perspective.plugin.mjs.map +1 -0
- package/dist/popover.js +1 -37
- package/dist/popover.js.map +1 -1
- package/dist/popover.mjs +1 -37
- package/dist/popover.mjs.map +1 -1
- package/dist/pre.js +1 -12
- package/dist/pre.js.map +1 -1
- package/dist/pre.mjs +1 -12
- package/dist/pre.mjs.map +1 -1
- package/dist/progress.js +1 -30
- package/dist/progress.js.map +1 -1
- package/dist/progress.mjs +1 -30
- package/dist/progress.mjs.map +1 -1
- package/dist/quote.js +1 -12
- package/dist/quote.js.map +1 -1
- package/dist/quote.mjs +1 -12
- package/dist/quote.mjs.map +1 -1
- package/dist/radio-cards.js +1 -31
- package/dist/radio-cards.js.map +1 -1
- package/dist/radio-cards.mjs +1 -31
- package/dist/radio-cards.mjs.map +1 -1
- package/dist/radio-group.js +1 -32
- package/dist/radio-group.js.map +1 -1
- package/dist/radio-group.mjs +1 -32
- package/dist/radio-group.mjs.map +1 -1
- package/dist/radio.js +1 -28
- package/dist/radio.js.map +1 -1
- package/dist/radio.mjs +1 -28
- package/dist/radio.mjs.map +1 -1
- package/dist/resizable.js +1 -44
- package/dist/resizable.js.map +1 -1
- package/dist/resizable.mjs +1 -44
- package/dist/resizable.mjs.map +1 -1
- package/dist/scroll-area.js +1 -38
- package/dist/scroll-area.js.map +1 -1
- package/dist/scroll-area.mjs +1 -38
- package/dist/scroll-area.mjs.map +1 -1
- package/dist/section.js +1 -12
- package/dist/section.js.map +1 -1
- package/dist/section.mjs +1 -12
- package/dist/section.mjs.map +1 -1
- package/dist/select.js +1 -26
- package/dist/select.mjs +1 -26
- package/dist/separator.js +1 -25
- package/dist/separator.js.map +1 -1
- package/dist/separator.mjs +1 -25
- package/dist/separator.mjs.map +1 -1
- package/dist/sheet.js +1 -64
- package/dist/sheet.js.map +1 -1
- package/dist/sheet.mjs +1 -64
- package/dist/sheet.mjs.map +1 -1
- package/dist/skeleton.js +1 -12
- package/dist/skeleton.js.map +1 -1
- package/dist/skeleton.mjs +1 -12
- package/dist/skeleton.mjs.map +1 -1
- package/dist/slider.js +1 -32
- package/dist/slider.js.map +1 -1
- package/dist/slider.mjs +1 -32
- package/dist/slider.mjs.map +1 -1
- package/dist/sonner.js +1 -29
- package/dist/sonner.js.map +1 -1
- package/dist/sonner.mjs +1 -29
- package/dist/sonner.mjs.map +1 -1
- package/dist/spinner.js +1 -7
- package/dist/spinner.mjs +1 -7
- package/dist/strong.js +1 -12
- package/dist/strong.js.map +1 -1
- package/dist/strong.mjs +1 -12
- package/dist/strong.mjs.map +1 -1
- package/dist/switch.js +1 -25
- package/dist/switch.js.map +1 -1
- package/dist/switch.mjs +1 -25
- package/dist/switch.mjs.map +1 -1
- package/dist/table.js +1 -50
- package/dist/table.js.map +1 -1
- package/dist/table.mjs +1 -50
- package/dist/table.mjs.map +1 -1
- package/dist/tabs.js +1 -52
- package/dist/tabs.js.map +1 -1
- package/dist/tabs.mjs +1 -52
- package/dist/tabs.mjs.map +1 -1
- package/dist/tailwind.config.js +1 -383
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.mjs +1 -383
- package/dist/tailwind.config.mjs.map +1 -1
- package/dist/text.js +1 -12
- package/dist/text.js.map +1 -1
- package/dist/text.mjs +1 -12
- package/dist/text.mjs.map +1 -1
- package/dist/textarea.js +1 -24
- package/dist/textarea.js.map +1 -1
- package/dist/textarea.mjs +1 -24
- package/dist/textarea.mjs.map +1 -1
- package/dist/toggle-group.js +1 -56
- package/dist/toggle-group.js.map +1 -1
- package/dist/toggle-group.mjs +1 -56
- package/dist/toggle-group.mjs.map +1 -1
- package/dist/toggle.js +1 -10
- package/dist/toggle.mjs +1 -10
- package/dist/tooltip.js +1 -36
- package/dist/tooltip.js.map +1 -1
- package/dist/tooltip.mjs +1 -36
- package/dist/tooltip.mjs.map +1 -1
- package/dist/utils.js +1 -10
- package/dist/utils.mjs +1 -10
- package/package.json +3 -3
- package/dist/chunk-3ZZ3SRTJ.js +0 -148
- package/dist/chunk-3ZZ3SRTJ.js.map +0 -1
- package/dist/chunk-73S45XV3.mjs +0 -51
- package/dist/chunk-AOIW2XNK.js +0 -34
- package/dist/chunk-AOIW2XNK.js.map +0 -1
- package/dist/chunk-AUQEMOIM.mjs +0 -34
- package/dist/chunk-BA3XYBWR.js +0 -120
- package/dist/chunk-BA3XYBWR.js.map +0 -1
- package/dist/chunk-EWS3N4OZ.mjs +0 -148
- package/dist/chunk-FGI3JA75.mjs +0 -25
- package/dist/chunk-G3NP7M2N.js +0 -19
- package/dist/chunk-G3NP7M2N.js.map +0 -1
- package/dist/chunk-IVYGBU4G.js +0 -25
- package/dist/chunk-IVYGBU4G.js.map +0 -1
- package/dist/chunk-JULVZPCS.mjs +0 -120
- package/dist/chunk-MOJNV3XZ.js +0 -120
- package/dist/chunk-MOJNV3XZ.js.map +0 -1
- package/dist/chunk-Q24YJU6W.mjs +0 -120
- package/dist/chunk-TFYKPLNV.js +0 -73
- package/dist/chunk-TFYKPLNV.js.map +0 -1
- package/dist/chunk-TH24V27M.js +0 -67
- package/dist/chunk-TH24V27M.js.map +0 -1
- package/dist/chunk-TXRIFICH.mjs +0 -67
- package/dist/chunk-U6VR5RJ5.mjs +0 -73
- package/dist/chunk-UG3URV2Z.mjs +0 -19
- package/dist/chunk-UG3URV2Z.mjs.map +0 -1
- package/dist/chunk-Y3DZHPJ5.js +0 -51
- package/dist/chunk-Y3DZHPJ5.js.map +0 -1
package/dist/dialog.mjs
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
Dialog,
|
|
4
|
-
DialogClose,
|
|
5
|
-
DialogContent,
|
|
6
|
-
DialogDescription,
|
|
7
|
-
DialogFooter,
|
|
8
|
-
DialogHeader,
|
|
9
|
-
DialogTitle,
|
|
10
|
-
DialogTrigger
|
|
11
|
-
} from "./chunk-TXRIFICH.mjs";
|
|
12
|
-
import "./chunk-UG3URV2Z.mjs";
|
|
13
|
-
export {
|
|
14
|
-
Dialog,
|
|
15
|
-
DialogClose,
|
|
16
|
-
DialogContent,
|
|
17
|
-
DialogDescription,
|
|
18
|
-
DialogFooter,
|
|
19
|
-
DialogHeader,
|
|
20
|
-
DialogTitle,
|
|
21
|
-
DialogTrigger
|
|
22
|
-
};
|
|
1
|
+
"use client";import{a,b,c,d,e,f,g,h}from"./chunk-CHJJRHD2.mjs";import"./chunk-JTI7KCLO.mjs";export{a as Dialog,c as DialogClose,d as DialogContent,h as DialogDescription,f as DialogFooter,e as DialogHeader,g as DialogTitle,b as DialogTrigger};
|
|
23
2
|
//# sourceMappingURL=dialog.mjs.map
|
package/dist/drawer.js
CHANGED
|
@@ -1,65 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkG3NP7M2Njs = require('./chunk-G3NP7M2N.js');
|
|
5
|
-
|
|
6
|
-
// src/drawer.tsx
|
|
7
|
-
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
8
|
-
var _vaul = require('vaul');
|
|
9
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
10
|
-
function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
11
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _vaul.Drawer.Root, { shouldScaleBackground, ...props });
|
|
12
|
-
}
|
|
13
|
-
var DrawerTrigger = _vaul.Drawer.Trigger;
|
|
14
|
-
var DrawerClose = _vaul.Drawer.Close;
|
|
15
|
-
var DrawerContent = React.forwardRef(
|
|
16
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal, { children: [
|
|
17
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
18
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
19
|
-
_vaul.Drawer.Content,
|
|
20
|
-
{
|
|
21
|
-
ref,
|
|
22
|
-
className: _chunkG3NP7M2Njs.cn.call(void 0,
|
|
23
|
-
"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",
|
|
24
|
-
className
|
|
25
|
-
),
|
|
26
|
-
...props,
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-muted mx-auto mt-4 h-2 w-24 rounded-full" }),
|
|
29
|
-
children
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
] })
|
|
34
|
-
);
|
|
35
|
-
DrawerContent.displayName = "DrawerContent";
|
|
36
|
-
function DrawerHeader({ className, ...props }) {
|
|
37
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkG3NP7M2Njs.cn.call(void 0, "grid gap-1.5 p-4 text-center sm:text-left", className), ...props });
|
|
38
|
-
}
|
|
39
|
-
function DrawerFooter({ className, ...props }) {
|
|
40
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkG3NP7M2Njs.cn.call(void 0, "mt-auto flex flex-col gap-2 p-4", className), ...props });
|
|
41
|
-
}
|
|
42
|
-
var DrawerTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
43
|
-
_vaul.Drawer.Title,
|
|
44
|
-
{
|
|
45
|
-
ref,
|
|
46
|
-
className: _chunkG3NP7M2Njs.cn.call(void 0, "text-lg font-semibold leading-none tracking-tight", className),
|
|
47
|
-
...props
|
|
48
|
-
}
|
|
49
|
-
));
|
|
50
|
-
DrawerTitle.displayName = _vaul.Drawer.Title.displayName;
|
|
51
|
-
var DrawerDescription = React.forwardRef(
|
|
52
|
-
({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _vaul.Drawer.Description, { ref, className: _chunkG3NP7M2Njs.cn.call(void 0, "text-muted-foreground text-sm", className), ...props })
|
|
53
|
-
);
|
|
54
|
-
DrawerDescription.displayName = _vaul.Drawer.Description.displayName;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
exports.Drawer = Drawer; exports.DrawerClose = DrawerClose; exports.DrawerContent = DrawerContent; exports.DrawerDescription = DrawerDescription; exports.DrawerFooter = DrawerFooter; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerTrigger = DrawerTrigger;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkQZCQ42BPjs = require('./chunk-QZCQ42BP.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');function f({shouldScaleBackground:e=!0,...r}){return _jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{shouldScaleBackground:e,...r})}var P=_vaul.Drawer.Trigger,y= exports.DrawerClose =_vaul.Drawer.Close,D= exports.DrawerContent =n.forwardRef(({className:e,children:r,...i},s)=>_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:s,className:_chunkQZCQ42BPjs.b.call(void 0, "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",e),...i,children:[_jsxruntime.jsx.call(void 0, "div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),r]})]}));D.displayName="DrawerContent";function d({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkQZCQ42BPjs.b.call(void 0, "grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function R({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkQZCQ42BPjs.b.call(void 0, "mt-auto flex flex-col gap-2 p-4",e),...r})}var l=n.forwardRef(({className:e,...r},i)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{ref:i,className:_chunkQZCQ42BPjs.b.call(void 0, "text-lg font-semibold leading-none tracking-tight",e),...r}));l.displayName=_vaul.Drawer.Title.displayName;var m=n.forwardRef(({className:e,...r},i)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Description,{ref:i,className:_chunkQZCQ42BPjs.b.call(void 0, "text-muted-foreground text-sm",e),...r}));m.displayName=_vaul.Drawer.Description.displayName;exports.Drawer = f; exports.DrawerClose = y; exports.DrawerContent = D; exports.DrawerDescription = m; exports.DrawerFooter = R; exports.DrawerHeader = d; exports.DrawerTitle = l; exports.DrawerTrigger = P;
|
|
65
2
|
//# sourceMappingURL=drawer.js.map
|
package/dist/drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/drawer.tsx"],"names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerTrigger","DrawerClose","DrawerContent","className","children","ref","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"qDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAUjC,cAAAC,EA4BH,QAAAC,MA5BG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACD,EAAgB,KAAhB,CAAqB,sBAAuBI,EAAwB,GAAGC,EAAO,CACxF,CAOA,IAAMC,EAAgBN,EAAgB,QAOhCO,EAAcP,EAAgB,MAS9BQ,EAAsB,aAC1B,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGL,CAAM,EAAGM,IAClCT,EAACF,EAAgB,OAAhB,CACC,UAAAC,EAACD,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEE,EAACF,EAAgB,QAAhB,CACC,IAAKW,EACL,UAAWC,EACT,6FACAH,CACF,EACC,GAAGJ,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DS,GACH,GACF,CAEJ,EAEAF,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CAAE,UAAAJ,EAAW,GAAGJ,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWW,EAAG,4CAA6CH,CAAS,EAAI,GAAGJ,EAAO,CAChG,CAQA,SAASS,EAAa,CAAE,UAAAL,EAAW,GAAGJ,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWW,EAAG,kCAAmCH,CAAS,EAAI,GAAGJ,EAAO,CACtF,CASA,IAAMU,EAAoB,aAAiD,CAAC,CAAE,UAAAN,EAAW,GAAGJ,CAAM,EAAGM,IACnGV,EAACD,EAAgB,MAAhB,CACC,IAAKW,EACL,UAAWC,EAAG,oDAAqDH,CAAS,EAC3E,GAAGJ,EACN,CACD,EAEDU,EAAY,YAAcf,EAAgB,MAAM,YAShD,IAAMgB,EAA0B,aAC9B,CAAC,CAAE,UAAAP,EAAW,GAAGJ,CAAM,EAAGM,IACxBV,EAACD,EAAgB,YAAhB,CAA4B,IAAKW,EAAK,UAAWC,EAAG,gCAAiCH,CAAS,EAAI,GAAGJ,EAAO,CAEjH,EAEAW,EAAkB,YAAchB,EAAgB,YAAY","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"]}
|
package/dist/drawer.mjs
CHANGED
|
@@ -1,65 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-UG3URV2Z.mjs";
|
|
5
|
-
|
|
6
|
-
// src/drawer.tsx
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
import { Drawer as DrawerPrimitive } from "vaul";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
11
|
-
return /* @__PURE__ */ jsx(DrawerPrimitive.Root, { shouldScaleBackground, ...props });
|
|
12
|
-
}
|
|
13
|
-
var DrawerTrigger = DrawerPrimitive.Trigger;
|
|
14
|
-
var DrawerClose = DrawerPrimitive.Close;
|
|
15
|
-
var DrawerContent = React.forwardRef(
|
|
16
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPrimitive.Portal, { children: [
|
|
17
|
-
/* @__PURE__ */ jsx(DrawerPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
|
|
18
|
-
/* @__PURE__ */ jsxs(
|
|
19
|
-
DrawerPrimitive.Content,
|
|
20
|
-
{
|
|
21
|
-
ref,
|
|
22
|
-
className: cn(
|
|
23
|
-
"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",
|
|
24
|
-
className
|
|
25
|
-
),
|
|
26
|
-
...props,
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 h-2 w-24 rounded-full" }),
|
|
29
|
-
children
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
] })
|
|
34
|
-
);
|
|
35
|
-
DrawerContent.displayName = "DrawerContent";
|
|
36
|
-
function DrawerHeader({ className, ...props }) {
|
|
37
|
-
return /* @__PURE__ */ jsx("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props });
|
|
38
|
-
}
|
|
39
|
-
function DrawerFooter({ className, ...props }) {
|
|
40
|
-
return /* @__PURE__ */ jsx("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props });
|
|
41
|
-
}
|
|
42
|
-
var DrawerTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
43
|
-
DrawerPrimitive.Title,
|
|
44
|
-
{
|
|
45
|
-
ref,
|
|
46
|
-
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
47
|
-
...props
|
|
48
|
-
}
|
|
49
|
-
));
|
|
50
|
-
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
51
|
-
var DrawerDescription = React.forwardRef(
|
|
52
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(DrawerPrimitive.Description, { ref, className: cn("text-muted-foreground text-sm", className), ...props })
|
|
53
|
-
);
|
|
54
|
-
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
55
|
-
export {
|
|
56
|
-
Drawer,
|
|
57
|
-
DrawerClose,
|
|
58
|
-
DrawerContent,
|
|
59
|
-
DrawerDescription,
|
|
60
|
-
DrawerFooter,
|
|
61
|
-
DrawerHeader,
|
|
62
|
-
DrawerTitle,
|
|
63
|
-
DrawerTrigger
|
|
64
|
-
};
|
|
1
|
+
"use client";import{b as a}from"./chunk-JTI7KCLO.mjs";import*as n from"react";import{Drawer as t}from"vaul";import{jsx as o,jsxs as p}from"react/jsx-runtime";function f({shouldScaleBackground:e=!0,...r}){return o(t.Root,{shouldScaleBackground:e,...r})}var P=t.Trigger,y=t.Close,D=n.forwardRef(({className:e,children:r,...i},s)=>p(t.Portal,{children:[o(t.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),p(t.Content,{ref:s,className:a("bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",e),...i,children:[o("div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),r]})]}));D.displayName="DrawerContent";function d({className:e,...r}){return o("div",{className:a("grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function R({className:e,...r}){return o("div",{className:a("mt-auto flex flex-col gap-2 p-4",e),...r})}var l=n.forwardRef(({className:e,...r},i)=>o(t.Title,{ref:i,className:a("text-lg font-semibold leading-none tracking-tight",e),...r}));l.displayName=t.Title.displayName;var m=n.forwardRef(({className:e,...r},i)=>o(t.Description,{ref:i,className:a("text-muted-foreground text-sm",e),...r}));m.displayName=t.Description.displayName;export{f as Drawer,y as DrawerClose,D as DrawerContent,m as DrawerDescription,R as DrawerFooter,d as DrawerHeader,l as DrawerTitle,P as DrawerTrigger};
|
|
65
2
|
//# sourceMappingURL=drawer.mjs.map
|
package/dist/drawer.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAUjC,cAAAC,EA4BH,QAAAC,MA5BG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACK,EAAgB,KAAhB,CAAqB,sBAAuBF,EAAwB,GAAGC,EAAO,CACxF,CAOA,IAAME,EAAgBD,EAAgB,QAOhCE,EAAcF,EAAgB,MAS9BG,EAAsB,aAC1B,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGN,CAAM,EAAGO,IAClCV,EAACI,EAAgB,OAAhB,CACC,UAAAL,EAACK,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEJ,EAACI,EAAgB,QAAhB,CACC,IAAKM,EACL,UAAWC,EACT,6FACAH,CACF,EACC,GAAGL,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DU,GACH,GACF,CAEJ,EAEAF,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CAAE,UAAAJ,EAAW,GAAGL,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWY,EAAG,4CAA6CH,CAAS,EAAI,GAAGL,EAAO,CAChG,CAQA,SAASU,EAAa,CAAE,UAAAL,EAAW,GAAGL,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWY,EAAG,kCAAmCH,CAAS,EAAI,GAAGL,EAAO,CACtF,CASA,IAAMW,EAAoB,aAAiD,CAAC,CAAE,UAAAN,EAAW,GAAGL,CAAM,EAAGO,IACnGX,EAACK,EAAgB,MAAhB,CACC,IAAKM,EACL,UAAWC,EAAG,oDAAqDH,CAAS,EAC3E,GAAGL,EACN,CACD,EAEDW,EAAY,YAAcV,EAAgB,MAAM,YAShD,IAAMW,EAA0B,aAC9B,CAAC,CAAE,UAAAP,EAAW,GAAGL,CAAM,EAAGO,IACxBX,EAACK,EAAgB,YAAhB,CAA4B,IAAKM,EAAK,UAAWC,EAAG,gCAAiCH,CAAS,EAAI,GAAGL,EAAO,CAEjH,EAEAY,EAAkB,YAAcX,EAAgB,YAAY","names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerClose","DrawerContent","className","children","ref","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"]}
|
package/dist/dropdown-menu.js
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _chunk3ZZ3SRTJjs = require('./chunk-3ZZ3SRTJ.js');
|
|
18
|
-
require('./chunk-G3NP7M2N.js');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
exports.DropdownMenu = _chunk3ZZ3SRTJjs.DropdownMenu; exports.DropdownMenuCheckboxItem = _chunk3ZZ3SRTJjs.DropdownMenuCheckboxItem; exports.DropdownMenuContent = _chunk3ZZ3SRTJjs.DropdownMenuContent; exports.DropdownMenuGroup = _chunk3ZZ3SRTJjs.DropdownMenuGroup; exports.DropdownMenuItem = _chunk3ZZ3SRTJjs.DropdownMenuItem; exports.DropdownMenuLabel = _chunk3ZZ3SRTJjs.DropdownMenuLabel; exports.DropdownMenuRadioGroup = _chunk3ZZ3SRTJjs.DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = _chunk3ZZ3SRTJjs.DropdownMenuRadioItem; exports.DropdownMenuSeparator = _chunk3ZZ3SRTJjs.DropdownMenuSeparator; exports.DropdownMenuShortcut = _chunk3ZZ3SRTJjs.DropdownMenuShortcut; exports.DropdownMenuSub = _chunk3ZZ3SRTJjs.DropdownMenuSub; exports.DropdownMenuSubContent = _chunk3ZZ3SRTJjs.DropdownMenuSubContent; exports.DropdownMenuSubTrigger = _chunk3ZZ3SRTJjs.DropdownMenuSubTrigger; exports.DropdownMenuTrigger = _chunk3ZZ3SRTJjs.DropdownMenuTrigger;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkKICZFOKEjs = require('./chunk-KICZFOKE.js');require('./chunk-QZCQ42BP.js');exports.DropdownMenu = _chunkKICZFOKEjs.a; exports.DropdownMenuCheckboxItem = _chunkKICZFOKEjs.j; exports.DropdownMenuContent = _chunkKICZFOKEjs.h; exports.DropdownMenuGroup = _chunkKICZFOKEjs.c; exports.DropdownMenuItem = _chunkKICZFOKEjs.i; exports.DropdownMenuLabel = _chunkKICZFOKEjs.l; exports.DropdownMenuRadioGroup = _chunkKICZFOKEjs.e; exports.DropdownMenuRadioItem = _chunkKICZFOKEjs.k; exports.DropdownMenuSeparator = _chunkKICZFOKEjs.m; exports.DropdownMenuShortcut = _chunkKICZFOKEjs.n; exports.DropdownMenuSub = _chunkKICZFOKEjs.d; exports.DropdownMenuSubContent = _chunkKICZFOKEjs.g; exports.DropdownMenuSubTrigger = _chunkKICZFOKEjs.f; exports.DropdownMenuTrigger = _chunkKICZFOKEjs.b;
|
|
35
2
|
//# sourceMappingURL=dropdown-menu.js.map
|
package/dist/dropdown-menu.mjs
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
DropdownMenu,
|
|
4
|
-
DropdownMenuCheckboxItem,
|
|
5
|
-
DropdownMenuContent,
|
|
6
|
-
DropdownMenuGroup,
|
|
7
|
-
DropdownMenuItem,
|
|
8
|
-
DropdownMenuLabel,
|
|
9
|
-
DropdownMenuRadioGroup,
|
|
10
|
-
DropdownMenuRadioItem,
|
|
11
|
-
DropdownMenuSeparator,
|
|
12
|
-
DropdownMenuShortcut,
|
|
13
|
-
DropdownMenuSub,
|
|
14
|
-
DropdownMenuSubContent,
|
|
15
|
-
DropdownMenuSubTrigger,
|
|
16
|
-
DropdownMenuTrigger
|
|
17
|
-
} from "./chunk-EWS3N4OZ.mjs";
|
|
18
|
-
import "./chunk-UG3URV2Z.mjs";
|
|
19
|
-
export {
|
|
20
|
-
DropdownMenu,
|
|
21
|
-
DropdownMenuCheckboxItem,
|
|
22
|
-
DropdownMenuContent,
|
|
23
|
-
DropdownMenuGroup,
|
|
24
|
-
DropdownMenuItem,
|
|
25
|
-
DropdownMenuLabel,
|
|
26
|
-
DropdownMenuRadioGroup,
|
|
27
|
-
DropdownMenuRadioItem,
|
|
28
|
-
DropdownMenuSeparator,
|
|
29
|
-
DropdownMenuShortcut,
|
|
30
|
-
DropdownMenuSub,
|
|
31
|
-
DropdownMenuSubContent,
|
|
32
|
-
DropdownMenuSubTrigger,
|
|
33
|
-
DropdownMenuTrigger
|
|
34
|
-
};
|
|
1
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-YV4UJQ5X.mjs";import"./chunk-JTI7KCLO.mjs";export{a as DropdownMenu,j as DropdownMenuCheckboxItem,h as DropdownMenuContent,c as DropdownMenuGroup,i as DropdownMenuItem,l as DropdownMenuLabel,e as DropdownMenuRadioGroup,k as DropdownMenuRadioItem,m as DropdownMenuSeparator,n as DropdownMenuShortcut,d as DropdownMenuSub,g as DropdownMenuSubContent,f as DropdownMenuSubTrigger,b as DropdownMenuTrigger};
|
|
35
2
|
//# sourceMappingURL=dropdown-menu.mjs.map
|
package/dist/em.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
|
|
2
|
-
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
3
|
-
var _reactslot = require('@radix-ui/react-slot');
|
|
4
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
5
|
-
var Em = React.forwardRef(({ asChild, ...props }, ref) => {
|
|
6
|
-
const Component = asChild ? _reactslot.Slot : "em";
|
|
7
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component, { ref, ...props });
|
|
8
|
-
});
|
|
9
|
-
Em.displayName = "Em";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.Em = Em;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _react = require('react'); var e = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _jsxruntime = require('react/jsx-runtime');var r=e.forwardRef(({asChild:t,...m},o)=>_jsxruntime.jsx.call(void 0, t?_reactslot.Slot:"em",{ref:o,...m}));r.displayName="Em";exports.Em = r;
|
|
13
2
|
//# sourceMappingURL=em.js.map
|
package/dist/em.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/em.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/em.tsx"],"names":["React","Slot","jsx","Em","asChild","props","ref"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAeZ,cAAAC,MAAA,oBAHT,IAAMC,EAAW,aAA+B,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/DJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAM,GAAGD,EAAO,CACxC,EAEDF,EAAG,YAAc","sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : \"em\";\n\n return <Component ref={ref} {...props} />;\n});\n\nEm.displayName = \"Em\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"]}
|
package/dist/em.mjs
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
var Em = React.forwardRef(({ asChild, ...props }, ref) => {
|
|
6
|
-
const Component = asChild ? Slot : "em";
|
|
7
|
-
return /* @__PURE__ */ jsx(Component, { ref, ...props });
|
|
8
|
-
});
|
|
9
|
-
Em.displayName = "Em";
|
|
10
|
-
export {
|
|
11
|
-
Em
|
|
12
|
-
};
|
|
1
|
+
import*as e from"react";import{Slot as n}from"@radix-ui/react-slot";import{jsx as p}from"react/jsx-runtime";var r=e.forwardRef(({asChild:t,...m},o)=>p(t?n:"em",{ref:o,...m}));r.displayName="Em";export{r as Em};
|
|
13
2
|
//# sourceMappingURL=em.mjs.map
|
package/dist/em.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/em.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : \"em\";\n\n return <Component ref={ref} {...props} />;\n});\n\nEm.displayName = \"Em\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/em.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : \"em\";\n\n return <Component ref={ref} {...props} />;\n});\n\nEm.displayName = \"Em\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAeZ,cAAAC,MAAA,oBAHT,IAAMC,EAAW,aAA+B,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/DJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAM,GAAGD,EAAO,CACxC,EAEDF,EAAG,YAAc","names":["React","Slot","jsx","Em","asChild","props","ref"]}
|
package/dist/form.js
CHANGED
|
@@ -1,92 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkIVYGBU4Gjs = require('./chunk-IVYGBU4G.js');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunkG3NP7M2Njs = require('./chunk-G3NP7M2N.js');
|
|
8
|
-
|
|
9
|
-
// src/form.tsx
|
|
10
|
-
var _react = require('react'); var React = _interopRequireWildcard(_react);
|
|
11
|
-
var _reactslot = require('@radix-ui/react-slot');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _reacthookform = require('react-hook-form');
|
|
17
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
18
|
-
var FormFieldContext = React.createContext(null);
|
|
19
|
-
var FormItemContext = React.createContext(null);
|
|
20
|
-
var useFormField = () => {
|
|
21
|
-
const fieldContext = React.useContext(FormFieldContext);
|
|
22
|
-
const itemContext = React.useContext(FormItemContext);
|
|
23
|
-
const { getFieldState, formState } = _reacthookform.useFormContext.call(void 0, );
|
|
24
|
-
if (!fieldContext || !itemContext) {
|
|
25
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
26
|
-
}
|
|
27
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
28
|
-
const { id } = itemContext;
|
|
29
|
-
return {
|
|
30
|
-
id,
|
|
31
|
-
name: fieldContext.name,
|
|
32
|
-
formItemId: `form-item-${id}`,
|
|
33
|
-
formDescriptionId: `form-item-description-${id}`,
|
|
34
|
-
formMessageId: `form-item-message-${id}`,
|
|
35
|
-
...fieldState
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
var Form = _reacthookform.FormProvider;
|
|
39
|
-
function FormField({ ...props }) {
|
|
40
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacthookform.Controller, { ...props }) });
|
|
41
|
-
}
|
|
42
|
-
var FormItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
43
|
-
const id = React.useId();
|
|
44
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, className: _chunkG3NP7M2Njs.cn.call(void 0, "space-y-2", className), ...props }) });
|
|
45
|
-
});
|
|
46
|
-
FormItem.displayName = "FormItem";
|
|
47
|
-
var FormLabel = React.forwardRef(({ className, ...props }, ref) => {
|
|
48
|
-
const { error, formItemId } = useFormField();
|
|
49
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIVYGBU4Gjs.Label, { ref, className: _chunkG3NP7M2Njs.cn.call(void 0, error && "text-destructive", className), htmlFor: formItemId, ...props });
|
|
50
|
-
});
|
|
51
|
-
FormLabel.displayName = "FormLabel";
|
|
52
|
-
var FormControl = React.forwardRef(({ ...props }, ref) => {
|
|
53
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
54
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
55
|
-
_reactslot.Slot,
|
|
56
|
-
{
|
|
57
|
-
ref,
|
|
58
|
-
id: formItemId,
|
|
59
|
-
"aria-describedby": !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`,
|
|
60
|
-
"aria-invalid": Boolean(error),
|
|
61
|
-
...props
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
});
|
|
65
|
-
FormControl.displayName = "FormControl";
|
|
66
|
-
var FormDescription = React.forwardRef(
|
|
67
|
-
({ className, ...props }, ref) => {
|
|
68
|
-
const { formDescriptionId } = useFormField();
|
|
69
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ref, id: formDescriptionId, className: _chunkG3NP7M2Njs.cn.call(void 0, "text-muted-foreground text-[0.8rem]", className), ...props });
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
FormDescription.displayName = "FormDescription";
|
|
73
|
-
var FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
74
|
-
const { error, formMessageId } = useFormField();
|
|
75
|
-
const body = error ? String(error.message) : children;
|
|
76
|
-
if (!body) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { ref, id: formMessageId, className: _chunkG3NP7M2Njs.cn.call(void 0, "text-destructive text-[0.8rem] font-medium", className), ...props, children: body });
|
|
80
|
-
});
|
|
81
|
-
FormMessage.displayName = "FormMessage";
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
exports.Form = Form; exports.FormControl = FormControl; exports.FormDescription = FormDescription; exports.FormField = FormField; exports.FormItem = FormItem; exports.FormLabel = FormLabel; exports.FormMessage = FormMessage; exports.useFormField = useFormField;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkO7LLHO4Ijs = require('./chunk-O7LLHO4I.js');var _chunkQZCQ42BPjs = require('./chunk-QZCQ42BP.js');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reacthookform = require('react-hook-form');var _jsxruntime = require('react/jsx-runtime');var p=t.createContext(null),c=t.createContext(null),n= exports.useFormField =()=>{let e=t.useContext(p),r=t.useContext(c),{getFieldState:o,formState:m}=_reacthookform.useFormContext.call(void 0, );if(!e||!r)throw new Error("useFormField should be used within <FormField>");let a=o(e.name,m),{id:i}=r;return{id:i,name:e.name,formItemId:`form-item-${i}`,formDescriptionId:`form-item-description-${i}`,formMessageId:`form-item-message-${i}`,...a}},M= exports.Form =_reacthookform.FormProvider;function h({...e}){return _jsxruntime.jsx.call(void 0, p.Provider,{value:{name:e.name},children:_jsxruntime.jsx.call(void 0, _reacthookform.Controller,{...e})})}var R=t.forwardRef(({className:e,...r},o)=>{let m=t.useId();return _jsxruntime.jsx.call(void 0, c.Provider,{value:{id:m},children:_jsxruntime.jsx.call(void 0, "div",{ref:o,className:_chunkQZCQ42BPjs.b.call(void 0, "space-y-2",e),...r})})});R.displayName="FormItem";var C=t.forwardRef(({className:e,...r},o)=>{let{error:m,formItemId:a}=n();return _jsxruntime.jsx.call(void 0, _chunkO7LLHO4Ijs.a,{ref:o,className:_chunkQZCQ42BPjs.b.call(void 0, m&&"text-destructive",e),htmlFor:a,...r})});C.displayName="FormLabel";var I=t.forwardRef(({...e},r)=>{let{error:o,formItemId:m,formDescriptionId:a,formMessageId:i}=n();return _jsxruntime.jsx.call(void 0, _reactslot.Slot,{ref:r,id:m,"aria-describedby":o?`${a} ${i}`:a,"aria-invalid":!!o,...e})});I.displayName="FormControl";var g=t.forwardRef(({className:e,...r},o)=>{let{formDescriptionId:m}=n();return _jsxruntime.jsx.call(void 0, "p",{ref:o,id:m,className:_chunkQZCQ42BPjs.b.call(void 0, "text-muted-foreground text-[0.8rem]",e),...r})});g.displayName="FormDescription";var x=t.forwardRef(({className:e,children:r,...o},m)=>{let{error:a,formMessageId:i}=n(),d=a?String(a.message):r;return d?_jsxruntime.jsx.call(void 0, "p",{ref:m,id:i,className:_chunkQZCQ42BPjs.b.call(void 0, "text-destructive text-[0.8rem] font-medium",e),...o,children:d}):null});x.displayName="FormMessage";exports.Form = M; exports.FormControl = I; exports.FormDescription = g; exports.FormField = h; exports.FormItem = R; exports.FormLabel = C; exports.FormMessage = x; exports.useFormField = n;
|
|
92
2
|
//# sourceMappingURL=form.js.map
|
package/dist/form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"6FAEA,UAAYA,MAAW,QAEvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAKA,gBAAAC,EACA,kBAAAC,MACK,kBA+ED,cAAAC,MAAA,oBA5DN,IAAMC,EAAyB,gBAA4C,IAAI,EAEzEC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIR,EAAe,EAEpD,GAAI,CAACK,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMG,EAAaF,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAE,CAAG,EAAIJ,EAEf,MAAO,CACL,GAAAI,EACA,KAAML,EAAa,KACnB,WAAY,aAAaK,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOZ,EAWb,SAASa,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEZ,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMW,EAAM,IAAK,EACnD,SAAAZ,EAACH,EAAA,CAAY,GAAGe,EAAO,EACzB,CAEJ,CASA,IAAMC,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAClG,IAAMN,EAAW,QAAM,EAEvB,OACET,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAO,CAAG,EACpC,SAAAT,EAAC,OAAI,IAAKe,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGF,EAAO,EACnE,CAEJ,CAAC,EAEDC,EAAS,YAAc,WASvB,IAAMI,EAAkB,aAA6C,CAAC,CAAE,UAAAH,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CACrG,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAIhB,EAAa,EAE3C,OAAOH,EAACoB,EAAA,CAAM,IAAKL,EAAK,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EAAG,QAASK,EAAa,GAAGP,EAAO,CACjH,CAAC,EAEDK,EAAU,YAAc,YASxB,IAAMI,EAAoB,aAAiD,CAAC,CAAE,GAAGT,CAAM,EAAGG,IAAQ,CAChG,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAAIpB,EAAa,EAE7E,OACEH,EAACJ,EAAA,CACC,IAAKmB,EACL,GAAII,EACJ,mBAAmBD,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAC3B,eAAc,EAAQJ,EACrB,GAAGN,EACN,CAEJ,CAAC,EAEDS,EAAY,YAAc,cAS1B,IAAMG,EAAwB,aAC5B,CAAC,CAAE,UAAAV,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,GAAM,CAAE,kBAAAO,CAAkB,EAAInB,EAAa,EAE3C,OACEH,EAAC,KAAE,IAAKe,EAAK,GAAIO,EAAmB,UAAWN,EAAG,sCAAuCF,CAAS,EAAI,GAAGF,EAAO,CAEpH,CACF,EAEAY,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aAAiD,CAAC,CAAE,UAAAX,EAAW,SAAAY,EAAU,GAAGd,CAAM,EAAGG,IAAQ,CACrH,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIpB,EAAa,EACxCwB,EAAOT,EAAQ,OAAOA,EAAM,OAAO,EAAIQ,EAE7C,OAAKC,EAKH3B,EAAC,KAAE,IAAKe,EAAK,GAAIQ,EAAe,UAAWP,EAAG,6CAA8CF,CAAS,EAAI,GAAGF,EACzG,SAAAe,EACH,EANO,IAQX,CAAC,EAEDF,EAAY,YAAc","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport type * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n} from \"react-hook-form\";\nimport { cn } from \"./utils\";\nimport { Label } from \"./label\";\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n error?: FieldError | undefined;\n id: string;\n name: string;\n formItemId: string;\n formDescriptionId: string;\n formMessageId: string;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error(\"useFormField should be used within <FormField>\");\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = \"FormItem\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && \"text-destructive\", className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = \"FormLabel\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n {...props}\n />\n );\n});\n\nFormControl.displayName = \"FormControl\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p ref={ref} id={formDescriptionId} className={cn(\"text-muted-foreground text-[0.8rem]\", className)} {...props} />\n );\n },\n);\n\nFormDescription.displayName = \"FormDescription\";\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn(\"text-destructive text-[0.8rem] font-medium\", className)} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = \"FormMessage\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
|