@lglab/compose-ui 0.28.0 → 0.29.0
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.d.ts +49 -40
- package/dist/accordion.d.ts.map +1 -0
- package/dist/accordion.js +47 -45
- package/dist/accordion.js.map +1 -0
- package/dist/alert-dialog.d.ts +93 -87
- package/dist/alert-dialog.d.ts.map +1 -0
- package/dist/alert-dialog.js +94 -111
- package/dist/alert-dialog.js.map +1 -0
- package/dist/autocomplete.d.ts +99 -96
- package/dist/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete.js +92 -116
- package/dist/autocomplete.js.map +1 -0
- package/dist/avatar.d.ts +56 -47
- package/dist/avatar.d.ts.map +1 -0
- package/dist/avatar.js +66 -79
- package/dist/avatar.js.map +1 -0
- package/dist/badge.d.ts +48 -42
- package/dist/badge.d.ts.map +1 -0
- package/dist/badge.js +195 -202
- package/dist/badge.js.map +1 -0
- package/dist/button.d.ts +26 -21
- package/dist/button.d.ts.map +1 -0
- package/dist/button.js +24 -24
- package/dist/button.js.map +1 -0
- package/dist/card.d.ts +105 -99
- package/dist/card.d.ts.map +1 -0
- package/dist/card.js +105 -66
- package/dist/card.js.map +1 -0
- package/dist/checkbox-group.d.ts +16 -12
- package/dist/checkbox-group.d.ts.map +1 -0
- package/dist/checkbox-group.js +18 -14
- package/dist/checkbox-group.js.map +1 -0
- package/dist/checkbox.d.ts +25 -19
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/checkbox.js +26 -32
- package/dist/checkbox.js.map +1 -0
- package/dist/collapsible.d.ts +32 -26
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +32 -32
- package/dist/collapsible.js.map +1 -0
- package/dist/combobox.d.ts +191 -182
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.js +176 -250
- package/dist/combobox.js.map +1 -0
- package/dist/context-menu.d.ts +151 -138
- package/dist/context-menu.d.ts.map +1 -0
- package/dist/context-menu.js +151 -173
- package/dist/context-menu.js.map +1 -0
- package/dist/dialog.d.ts +101 -92
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dialog.js +101 -105
- package/dist/dialog.js.map +1 -0
- package/dist/drawer.d.ts +109 -99
- package/dist/drawer.d.ts.map +1 -0
- package/dist/drawer.js +120 -111
- package/dist/drawer.js.map +1 -0
- package/dist/field.d.ts +61 -54
- package/dist/field.d.ts.map +1 -0
- package/dist/field.js +58 -27
- package/dist/field.js.map +1 -0
- package/dist/fieldset.d.ts +24 -19
- package/dist/fieldset.d.ts.map +1 -0
- package/dist/fieldset.js +26 -18
- package/dist/fieldset.js.map +1 -0
- package/dist/form.d.ts +16 -12
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +18 -8
- package/dist/form.js.map +1 -0
- package/dist/index.d.ts +44 -2115
- package/dist/index.js +44 -318
- package/dist/input.d.ts +16 -12
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +19 -9
- package/dist/input.js.map +1 -0
- package/dist/lib/arrow-svg.js +28 -0
- package/dist/lib/arrow-svg.js.map +1 -0
- package/dist/lib/button-variants.d.ts +6 -0
- package/dist/lib/button-variants.d.ts.map +1 -0
- package/dist/lib/button-variants.js +31 -0
- package/dist/lib/button-variants.js.map +1 -0
- package/dist/lib/control-variants.d.ts +6 -0
- package/dist/lib/control-variants.d.ts.map +1 -0
- package/dist/lib/control-variants.js +37 -0
- package/dist/lib/control-variants.js.map +1 -0
- package/dist/lib/form-variants.js +11 -0
- package/dist/lib/form-variants.js.map +1 -0
- package/dist/lib/tooltip-variants.d.ts +5 -0
- package/dist/lib/tooltip-variants.d.ts.map +1 -0
- package/dist/lib/tooltip-variants.js +36 -0
- package/dist/lib/tooltip-variants.js.map +1 -0
- package/dist/lib/utils.js +11 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/menu.d.ts +151 -138
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +151 -146
- package/dist/menu.js.map +1 -0
- package/dist/menubar.d.ts +168 -155
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +163 -169
- package/dist/menubar.js.map +1 -0
- package/dist/meter.d.ts +53 -43
- package/dist/meter.d.ts.map +1 -0
- package/dist/meter.js +59 -64
- package/dist/meter.js.map +1 -0
- package/dist/navigation-menu.d.ts +111 -96
- package/dist/navigation-menu.d.ts.map +1 -0
- package/dist/navigation-menu.js +117 -175
- package/dist/navigation-menu.js.map +1 -0
- package/dist/number-field.d.ts +64 -54
- package/dist/number-field.d.ts.map +1 -0
- package/dist/number-field.js +61 -69
- package/dist/number-field.js.map +1 -0
- package/dist/popover.d.ts +90 -82
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +85 -94
- package/dist/popover.js.map +1 -0
- package/dist/preview-card.d.ts +58 -54
- package/dist/preview-card.d.ts.map +1 -0
- package/dist/preview-card.js +57 -81
- package/dist/preview-card.js.map +1 -0
- package/dist/progress.d.ts +48 -40
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +46 -50
- package/dist/progress.js.map +1 -0
- package/dist/radio-group.d.ts +16 -12
- package/dist/radio-group.d.ts.map +1 -0
- package/dist/radio-group.js +18 -14
- package/dist/radio-group.js.map +1 -0
- package/dist/radio.d.ts +24 -19
- package/dist/radio.d.ts.map +1 -0
- package/dist/radio.js +25 -34
- package/dist/radio.js.map +1 -0
- package/dist/scroll-area.d.ts +57 -47
- package/dist/scroll-area.d.ts.map +1 -0
- package/dist/scroll-area.js +54 -56
- package/dist/scroll-area.js.map +1 -0
- package/dist/select.d.ts +146 -133
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +133 -167
- package/dist/select.js.map +1 -0
- package/dist/separator.d.ts +17 -12
- package/dist/separator.d.ts.map +1 -0
- package/dist/separator.js +19 -23
- package/dist/separator.js.map +1 -0
- package/dist/skeleton.d.ts +20 -0
- package/dist/skeleton.d.ts.map +1 -0
- package/dist/skeleton.js +27 -0
- package/dist/skeleton.js.map +1 -0
- package/dist/slider.d.ts +56 -47
- package/dist/slider.d.ts.map +1 -0
- package/dist/slider.js +53 -62
- package/dist/slider.js.map +1 -0
- package/dist/styles/default.css +14 -0
- package/dist/switch.d.ts +24 -19
- package/dist/switch.d.ts.map +1 -0
- package/dist/switch.js +23 -39
- package/dist/switch.js.map +1 -0
- package/dist/tabs.d.ts +60 -49
- package/dist/tabs.d.ts.map +1 -0
- package/dist/tabs.js +76 -84
- package/dist/tabs.js.map +1 -0
- package/dist/textarea.d.ts +15 -11
- package/dist/textarea.d.ts.map +1 -0
- package/dist/textarea.js +18 -14
- package/dist/textarea.js.map +1 -0
- package/dist/toast.d.ts +87 -81
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +79 -150
- package/dist/toast.js.map +1 -0
- package/dist/toggle-group.d.ts +34 -29
- package/dist/toggle-group.d.ts.map +1 -0
- package/dist/toggle-group.js +31 -34
- package/dist/toggle-group.js.map +1 -0
- package/dist/toggle.d.ts +24 -21
- package/dist/toggle.d.ts.map +1 -0
- package/dist/toggle.js +22 -15
- package/dist/toggle.js.map +1 -0
- package/dist/toolbar.d.ts +64 -56
- package/dist/toolbar.d.ts.map +1 -0
- package/dist/toolbar.js +57 -68
- package/dist/toolbar.js.map +1 -0
- package/dist/tooltip.d.ts +67 -62
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/tooltip.js +65 -90
- package/dist/tooltip.js.map +1 -0
- package/package.json +8 -8
- package/dist/arrow-svg-C6zQTvgS.js +0 -40
- package/dist/button-variants-CbFMPwc8.js +0 -33
- package/dist/control-variants-Bwep4n0y.js +0 -37
- package/dist/form-variants-LJ8gIbk0.js +0 -9
- package/dist/utils-B6yFEsav.js +0 -8
package/dist/drawer.js
CHANGED
|
@@ -1,112 +1,121 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
...l
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
c.displayName = "DrawerTrigger";
|
|
17
|
-
const p = (a) => /* @__PURE__ */ e(s.Portal, { ...a });
|
|
18
|
-
p.displayName = "DrawerPortal";
|
|
19
|
-
const m = ({ className: a, ...r }) => /* @__PURE__ */ e(
|
|
20
|
-
s.Backdrop,
|
|
21
|
-
{
|
|
22
|
-
className: t(
|
|
23
|
-
"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
|
|
24
|
-
"transition-opacity duration-300",
|
|
25
|
-
"data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
26
|
-
a
|
|
27
|
-
),
|
|
28
|
-
...r
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
m.displayName = "DrawerBackdrop";
|
|
32
|
-
const u = i(
|
|
33
|
-
[
|
|
34
|
-
"fixed z-50 flex flex-col bg-background p-6 shadow-lg",
|
|
35
|
-
"transition-transform duration-300 ease-out",
|
|
36
|
-
"scale-[calc(1-0.1*var(--nested-dialogs))]",
|
|
37
|
-
"data-[nested-dialog-open]:after:absolute data-[nested-dialog-open]:after:inset-0 data-[nested-dialog-open]:after:rounded-[inherit] data-[nested-dialog-open]:after:bg-black/5"
|
|
38
|
-
],
|
|
39
|
-
{
|
|
40
|
-
variants: {
|
|
41
|
-
side: {
|
|
42
|
-
top: [
|
|
43
|
-
"inset-x-0 top-0 border-b border-border",
|
|
44
|
-
"data-starting-style:-translate-y-full",
|
|
45
|
-
"data-ending-style:-translate-y-full"
|
|
46
|
-
],
|
|
47
|
-
right: [
|
|
48
|
-
"inset-y-0 right-0 h-full w-sm max-w-full border-l border-border",
|
|
49
|
-
"data-starting-style:translate-x-full",
|
|
50
|
-
"data-ending-style:translate-x-full"
|
|
51
|
-
],
|
|
52
|
-
bottom: [
|
|
53
|
-
"inset-x-0 bottom-0 border-t border-border",
|
|
54
|
-
"data-starting-style:translate-y-full",
|
|
55
|
-
"data-ending-style:translate-y-full"
|
|
56
|
-
],
|
|
57
|
-
left: [
|
|
58
|
-
"inset-y-0 left-0 h-full w-sm max-w-full border-r border-border",
|
|
59
|
-
"data-starting-style:-translate-x-full",
|
|
60
|
-
"data-ending-style:-translate-x-full"
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
defaultVariants: {
|
|
65
|
-
side: "right"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
), g = ({ className: a, side: r, ...o }) => /* @__PURE__ */ e(
|
|
69
|
-
s.Popup,
|
|
70
|
-
{
|
|
71
|
-
className: t(u({ side: r }), a),
|
|
72
|
-
...o
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
g.displayName = "DrawerPopup";
|
|
76
|
-
const f = ({ className: a, ...r }) => /* @__PURE__ */ e(
|
|
77
|
-
s.Title,
|
|
78
|
-
{
|
|
79
|
-
className: t("text-lg font-semibold leading-none tracking-tight", a),
|
|
80
|
-
...r
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
f.displayName = "DrawerTitle";
|
|
84
|
-
const y = ({ className: a, ...r }) => /* @__PURE__ */ e(s.Description, { className: t("", a), ...r });
|
|
85
|
-
y.displayName = "DrawerDescription";
|
|
86
|
-
const w = ({ className: a, variant: r, size: o, ...l }) => /* @__PURE__ */ e(
|
|
87
|
-
s.Close,
|
|
88
|
-
{
|
|
89
|
-
className: t(n({ variant: r ?? "outline", size: o }), a),
|
|
90
|
-
...l
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
w.displayName = "DrawerClose";
|
|
94
|
-
const b = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("flex flex-col space-y-1.5", a), ...r });
|
|
95
|
-
b.displayName = "DrawerHeader";
|
|
96
|
-
const D = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("py-5", a), ...r });
|
|
97
|
-
D.displayName = "DrawerContent";
|
|
98
|
-
const N = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("", a), ...r });
|
|
99
|
-
N.displayName = "DrawerFooter";
|
|
100
|
-
export {
|
|
101
|
-
m as DrawerBackdrop,
|
|
102
|
-
w as DrawerClose,
|
|
103
|
-
D as DrawerContent,
|
|
104
|
-
y as DrawerDescription,
|
|
105
|
-
N as DrawerFooter,
|
|
106
|
-
b as DrawerHeader,
|
|
107
|
-
g as DrawerPopup,
|
|
108
|
-
p as DrawerPortal,
|
|
109
|
-
d as DrawerRoot,
|
|
110
|
-
f as DrawerTitle,
|
|
111
|
-
c as DrawerTrigger
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { buttonVariants } from "./lib/button-variants.js";
|
|
4
|
+
import { cn } from "./lib/utils.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
9
|
+
|
|
10
|
+
//#region src/components/drawer.tsx
|
|
11
|
+
const DrawerRoot = (props) => {
|
|
12
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
|
|
112
13
|
};
|
|
14
|
+
DrawerRoot.displayName = "DrawerRoot";
|
|
15
|
+
const DrawerTrigger = ({ className, variant, size, ...props }) => {
|
|
16
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
17
|
+
className: cn(buttonVariants({
|
|
18
|
+
variant,
|
|
19
|
+
size
|
|
20
|
+
}), className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
DrawerTrigger.displayName = "DrawerTrigger";
|
|
25
|
+
const DrawerPortal = (props) => {
|
|
26
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, { ...props });
|
|
27
|
+
};
|
|
28
|
+
DrawerPortal.displayName = "DrawerPortal";
|
|
29
|
+
const DrawerBackdrop = ({ className, ...props }) => {
|
|
30
|
+
return /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
31
|
+
className: cn("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm", "transition-opacity duration-300", "data-starting-style:opacity-0 data-ending-style:opacity-0", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
DrawerBackdrop.displayName = "DrawerBackdrop";
|
|
36
|
+
const drawerPopupVariants = cva([
|
|
37
|
+
"fixed z-50 flex flex-col bg-background p-6 shadow-lg",
|
|
38
|
+
"transition-transform duration-300 ease-out",
|
|
39
|
+
"scale-[calc(1-0.1*var(--nested-dialogs))]",
|
|
40
|
+
"data-[nested-dialog-open]:after:absolute data-[nested-dialog-open]:after:inset-0 data-[nested-dialog-open]:after:rounded-[inherit] data-[nested-dialog-open]:after:bg-black/5"
|
|
41
|
+
], {
|
|
42
|
+
variants: { side: {
|
|
43
|
+
top: [
|
|
44
|
+
"inset-x-0 top-0 border-b border-border",
|
|
45
|
+
"data-starting-style:-translate-y-full",
|
|
46
|
+
"data-ending-style:-translate-y-full"
|
|
47
|
+
],
|
|
48
|
+
right: [
|
|
49
|
+
"inset-y-0 right-0 h-full w-sm max-w-full border-l border-border",
|
|
50
|
+
"data-starting-style:translate-x-full",
|
|
51
|
+
"data-ending-style:translate-x-full"
|
|
52
|
+
],
|
|
53
|
+
bottom: [
|
|
54
|
+
"inset-x-0 bottom-0 border-t border-border",
|
|
55
|
+
"data-starting-style:translate-y-full",
|
|
56
|
+
"data-ending-style:translate-y-full"
|
|
57
|
+
],
|
|
58
|
+
left: [
|
|
59
|
+
"inset-y-0 left-0 h-full w-sm max-w-full border-r border-border",
|
|
60
|
+
"data-starting-style:-translate-x-full",
|
|
61
|
+
"data-ending-style:-translate-x-full"
|
|
62
|
+
]
|
|
63
|
+
} },
|
|
64
|
+
defaultVariants: { side: "right" }
|
|
65
|
+
});
|
|
66
|
+
const DrawerPopup = ({ className, side, ...props }) => {
|
|
67
|
+
return /* @__PURE__ */ jsx(Dialog.Popup, {
|
|
68
|
+
className: cn(drawerPopupVariants({ side }), className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
DrawerPopup.displayName = "DrawerPopup";
|
|
73
|
+
const DrawerTitle = ({ className, ...props }) => {
|
|
74
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
75
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
DrawerTitle.displayName = "DrawerTitle";
|
|
80
|
+
const DrawerDescription = ({ className, ...props }) => {
|
|
81
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
82
|
+
className: cn("", className),
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
DrawerDescription.displayName = "DrawerDescription";
|
|
87
|
+
const DrawerClose = ({ className, variant, size, ...props }) => {
|
|
88
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
89
|
+
className: cn(buttonVariants({
|
|
90
|
+
variant: variant ?? "outline",
|
|
91
|
+
size
|
|
92
|
+
}), className),
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
DrawerClose.displayName = "DrawerClose";
|
|
97
|
+
const DrawerHeader = ({ className, ...props }) => {
|
|
98
|
+
return /* @__PURE__ */ jsx("div", {
|
|
99
|
+
className: cn("flex flex-col space-y-1.5", className),
|
|
100
|
+
...props
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
104
|
+
const DrawerContent = ({ className, ...props }) => {
|
|
105
|
+
return /* @__PURE__ */ jsx("div", {
|
|
106
|
+
className: cn("py-5", className),
|
|
107
|
+
...props
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
DrawerContent.displayName = "DrawerContent";
|
|
111
|
+
const DrawerFooter = ({ className, ...props }) => {
|
|
112
|
+
return /* @__PURE__ */ jsx("div", {
|
|
113
|
+
className: cn("", className),
|
|
114
|
+
...props
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
118
|
+
|
|
119
|
+
//#endregion
|
|
120
|
+
export { DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger };
|
|
121
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.js","names":["BaseDialog"],"sources":["../src/components/drawer.tsx"],"sourcesContent":["'use client'\n\nimport { Dialog as BaseDialog } from '@base-ui/react/dialog'\nimport { cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport {\n type ButtonSize,\n type ButtonVariant,\n buttonVariants,\n} from '../lib/button-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// DrawerRoot\n// ============================================================================\n\ntype DrawerRootProps = React.ComponentProps<typeof BaseDialog.Root>\n\nconst DrawerRoot = (props: DrawerRootProps) => {\n return <BaseDialog.Root {...props} />\n}\n\nDrawerRoot.displayName = 'DrawerRoot'\n\n// ============================================================================\n// DrawerTrigger\n// ============================================================================\n\ntype DrawerTriggerProps = React.ComponentProps<typeof BaseDialog.Trigger> & {\n /** Visual style variant */\n variant?: ButtonVariant\n /** Size of the trigger button */\n size?: ButtonSize\n}\n\nconst DrawerTrigger = ({ className, variant, size, ...props }: DrawerTriggerProps) => {\n return (\n <BaseDialog.Trigger\n className={cn(buttonVariants({ variant, size }), className)}\n {...props}\n />\n )\n}\n\nDrawerTrigger.displayName = 'DrawerTrigger'\n\n// ============================================================================\n// DrawerPortal\n// ============================================================================\n\ntype DrawerPortalProps = React.ComponentProps<typeof BaseDialog.Portal>\n\nconst DrawerPortal = (props: DrawerPortalProps) => {\n return <BaseDialog.Portal {...props} />\n}\n\nDrawerPortal.displayName = 'DrawerPortal'\n\n// ============================================================================\n// DrawerBackdrop\n// ============================================================================\n\ntype DrawerBackdropProps = React.ComponentProps<typeof BaseDialog.Backdrop>\n\nconst DrawerBackdrop = ({ className, ...props }: DrawerBackdropProps) => {\n return (\n <BaseDialog.Backdrop\n className={cn(\n 'fixed inset-0 z-50 bg-black/50 backdrop-blur-sm',\n 'transition-opacity duration-300',\n 'data-starting-style:opacity-0 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nDrawerBackdrop.displayName = 'DrawerBackdrop'\n\n// ============================================================================\n// DrawerPopup\n// ============================================================================\n\nconst drawerPopupVariants = cva(\n [\n 'fixed z-50 flex flex-col bg-background p-6 shadow-lg',\n 'transition-transform duration-300 ease-out',\n 'scale-[calc(1-0.1*var(--nested-dialogs))]',\n 'data-[nested-dialog-open]:after:absolute data-[nested-dialog-open]:after:inset-0 data-[nested-dialog-open]:after:rounded-[inherit] data-[nested-dialog-open]:after:bg-black/5',\n ],\n {\n variants: {\n side: {\n top: [\n 'inset-x-0 top-0 border-b border-border',\n 'data-starting-style:-translate-y-full',\n 'data-ending-style:-translate-y-full',\n ],\n right: [\n 'inset-y-0 right-0 h-full w-sm max-w-full border-l border-border',\n 'data-starting-style:translate-x-full',\n 'data-ending-style:translate-x-full',\n ],\n bottom: [\n 'inset-x-0 bottom-0 border-t border-border',\n 'data-starting-style:translate-y-full',\n 'data-ending-style:translate-y-full',\n ],\n left: [\n 'inset-y-0 left-0 h-full w-sm max-w-full border-r border-border',\n 'data-starting-style:-translate-x-full',\n 'data-ending-style:-translate-x-full',\n ],\n },\n },\n defaultVariants: {\n side: 'right',\n },\n },\n)\n\ntype DrawerPopupProps = React.ComponentProps<typeof BaseDialog.Popup> & {\n /** Side from which the drawer slides in */\n side?: 'top' | 'right' | 'bottom' | 'left'\n}\n\nconst DrawerPopup = ({ className, side, ...props }: DrawerPopupProps) => {\n return (\n <BaseDialog.Popup\n className={cn(drawerPopupVariants({ side }), className)}\n {...props}\n />\n )\n}\n\nDrawerPopup.displayName = 'DrawerPopup'\n\n// ============================================================================\n// DrawerTitle\n// ============================================================================\n\ntype DrawerTitleProps = React.ComponentProps<typeof BaseDialog.Title>\n\nconst DrawerTitle = ({ className, ...props }: DrawerTitleProps) => {\n return (\n <BaseDialog.Title\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n )\n}\n\nDrawerTitle.displayName = 'DrawerTitle'\n\n// ============================================================================\n// DrawerDescription\n// ============================================================================\n\ntype DrawerDescriptionProps = React.ComponentProps<typeof BaseDialog.Description>\n\nconst DrawerDescription = ({ className, ...props }: DrawerDescriptionProps) => {\n return <BaseDialog.Description className={cn('', className)} {...props} />\n}\n\nDrawerDescription.displayName = 'DrawerDescription'\n\n// ============================================================================\n// DrawerClose\n// ============================================================================\n\ntype DrawerCloseProps = React.ComponentProps<typeof BaseDialog.Close> & {\n /** Visual style variant */\n variant?: ButtonVariant\n /** Size of the close button */\n size?: ButtonSize\n}\n\nconst DrawerClose = ({ className, variant, size, ...props }: DrawerCloseProps) => {\n return (\n <BaseDialog.Close\n className={cn(buttonVariants({ variant: variant ?? 'outline', size }), className)}\n {...props}\n />\n )\n}\n\nDrawerClose.displayName = 'DrawerClose'\n\n// ============================================================================\n// DrawerHeader (Utility Component)\n// ============================================================================\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>\n\nconst DrawerHeader = ({ className, ...props }: DrawerHeaderProps) => {\n return <div className={cn('flex flex-col space-y-1.5', className)} {...props} />\n}\n\nDrawerHeader.displayName = 'DrawerHeader'\n\n// ============================================================================\n// DrawerContent (Utility Component)\n// ============================================================================\n\ntype DrawerContentProps = React.HTMLAttributes<HTMLDivElement>\n\nconst DrawerContent = ({ className, ...props }: DrawerContentProps) => {\n return <div className={cn('py-5', className)} {...props} />\n}\n\nDrawerContent.displayName = 'DrawerContent'\n\n// ============================================================================\n// DrawerFooter (Utility Component)\n// ============================================================================\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>\n\nconst DrawerFooter = ({ className, ...props }: DrawerFooterProps) => {\n return <div className={cn('', className)} {...props} />\n}\n\nDrawerFooter.displayName = 'DrawerFooter'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n DrawerRoot,\n DrawerTrigger,\n DrawerPortal,\n DrawerBackdrop,\n DrawerPopup,\n DrawerTitle,\n DrawerDescription,\n DrawerClose,\n DrawerHeader,\n DrawerContent,\n DrawerFooter,\n}\n\nexport type {\n DrawerRootProps,\n DrawerTriggerProps,\n DrawerPortalProps,\n DrawerBackdropProps,\n DrawerPopupProps,\n DrawerTitleProps,\n DrawerDescriptionProps,\n DrawerCloseProps,\n DrawerHeaderProps,\n DrawerContentProps,\n DrawerFooterProps,\n}\n"],"mappings":";;;;;;;;;;AAmBA,MAAM,cAAc,UAA2B;AAC7C,QAAO,oBAACA,OAAW,QAAK,GAAI,QAAS;;AAGvC,WAAW,cAAc;AAazB,MAAM,iBAAiB,EAAE,WAAW,SAAS,MAAM,GAAG,YAAgC;AACpF,QACE,oBAACA,OAAW;EACV,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM,CAAC,EAAE,UAAU;EAC3D,GAAI;GACJ;;AAIN,cAAc,cAAc;AAQ5B,MAAM,gBAAgB,UAA6B;AACjD,QAAO,oBAACA,OAAW,UAAO,GAAI,QAAS;;AAGzC,aAAa,cAAc;AAQ3B,MAAM,kBAAkB,EAAE,WAAW,GAAG,YAAiC;AACvE,QACE,oBAACA,OAAW;EACV,WAAW,GACT,mDACA,mCACA,6DACA,UACD;EACD,GAAI;GACJ;;AAIN,eAAe,cAAc;AAM7B,MAAM,sBAAsB,IAC1B;CACE;CACA;CACA;CACA;CACD,EACD;CACE,UAAU,EACR,MAAM;EACJ,KAAK;GACH;GACA;GACA;GACD;EACD,OAAO;GACL;GACA;GACA;GACD;EACD,QAAQ;GACN;GACA;GACA;GACD;EACD,MAAM;GACJ;GACA;GACA;GACD;EACF,EACF;CACD,iBAAiB,EACf,MAAM,SACP;CACF,CACF;AAOD,MAAM,eAAe,EAAE,WAAW,MAAM,GAAG,YAA8B;AACvE,QACE,oBAACA,OAAW;EACV,WAAW,GAAG,oBAAoB,EAAE,MAAM,CAAC,EAAE,UAAU;EACvD,GAAI;GACJ;;AAIN,YAAY,cAAc;AAQ1B,MAAM,eAAe,EAAE,WAAW,GAAG,YAA8B;AACjE,QACE,oBAACA,OAAW;EACV,WAAW,GAAG,qDAAqD,UAAU;EAC7E,GAAI;GACJ;;AAIN,YAAY,cAAc;AAQ1B,MAAM,qBAAqB,EAAE,WAAW,GAAG,YAAoC;AAC7E,QAAO,oBAACA,OAAW;EAAY,WAAW,GAAG,IAAI,UAAU;EAAE,GAAI;GAAS;;AAG5E,kBAAkB,cAAc;AAahC,MAAM,eAAe,EAAE,WAAW,SAAS,MAAM,GAAG,YAA8B;AAChF,QACE,oBAACA,OAAW;EACV,WAAW,GAAG,eAAe;GAAE,SAAS,WAAW;GAAW;GAAM,CAAC,EAAE,UAAU;EACjF,GAAI;GACJ;;AAIN,YAAY,cAAc;AAQ1B,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QAAO,oBAAC;EAAI,WAAW,GAAG,6BAA6B,UAAU;EAAE,GAAI;GAAS;;AAGlF,aAAa,cAAc;AAQ3B,MAAM,iBAAiB,EAAE,WAAW,GAAG,YAAgC;AACrE,QAAO,oBAAC;EAAI,WAAW,GAAG,QAAQ,UAAU;EAAE,GAAI;GAAS;;AAG7D,cAAc,cAAc;AAQ5B,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QAAO,oBAAC;EAAI,WAAW,GAAG,IAAI,UAAU;EAAE,GAAI;GAAS;;AAGzD,aAAa,cAAc"}
|
package/dist/field.d.ts
CHANGED
|
@@ -1,54 +1,61 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime253 from "react/jsx-runtime";
|
|
3
|
+
import { Field } from "@base-ui/react/field";
|
|
4
|
+
|
|
5
|
+
//#region src/components/field.d.ts
|
|
6
|
+
type FieldRootProps = React.ComponentProps<typeof Field.Root>;
|
|
7
|
+
declare const FieldRoot: {
|
|
8
|
+
({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: FieldRootProps): react_jsx_runtime253.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
type FieldLabelProps = React.ComponentProps<typeof Field.Label>;
|
|
15
|
+
declare const FieldLabel: {
|
|
16
|
+
({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: FieldLabelProps): react_jsx_runtime253.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
type FieldControlProps = React.ComponentProps<typeof Field.Control>;
|
|
23
|
+
declare const FieldControl: {
|
|
24
|
+
({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: FieldControlProps): react_jsx_runtime253.JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
type FieldDescriptionProps = React.ComponentProps<typeof Field.Description>;
|
|
31
|
+
declare const FieldDescription: {
|
|
32
|
+
({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: FieldDescriptionProps): react_jsx_runtime253.JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
type FieldErrorProps = React.ComponentProps<typeof Field.Error>;
|
|
39
|
+
declare const FieldError: {
|
|
40
|
+
({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: FieldErrorProps): react_jsx_runtime253.JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
46
|
+
type FieldItemProps = React.ComponentProps<typeof Field.Item>;
|
|
47
|
+
declare const FieldItem: {
|
|
48
|
+
({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}: FieldItemProps): react_jsx_runtime253.JSX.Element;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
type FieldValidityProps = React.ComponentProps<typeof Field.Validity>;
|
|
55
|
+
declare const FieldValidity: {
|
|
56
|
+
(props: FieldValidityProps): react_jsx_runtime253.JSX.Element;
|
|
57
|
+
displayName: string;
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { FieldControl, type FieldControlProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, FieldItem, type FieldItemProps, FieldLabel, type FieldLabelProps, FieldRoot, type FieldRootProps, FieldValidity, type FieldValidityProps };
|
|
61
|
+
//# sourceMappingURL=field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.ts","names":[],"sources":["../src/components/field.tsx"],"sourcesContent":[],"mappings":";;;;;KAmBK,cAAA,GAAiB,KAAA,CAAM,sBAAsB,KAAA,CAAU;cAEtD;;;;KAAsC,iBAAc,oBAAA,CAAA,GAAA,CAAA;EAFrD,WAAA,EAAA,MAAc;CAAA;KAYd,eAAA,GAAkB,KAAA,CAAM,cAZ+B,CAAA,OAYT,KAAA,CAAU,KAZD,CAAA;cActD,UAdsB,EAAA;EAAc,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAcG,eAdH,CAAA,EAckB,oBAAA,CAAA,GAAA,CAAA,OAdlB;EAEpC,WAAA,EAEL,MAAA;CAAA;KAoBI,iBAAA,GAAoB,KAAA,CAAM,sBAAsB,KAAA,CAAU;cAEzD,YAxBsC,EAAA;;IAAc,SAAA;IAAA,GAAA;EAAA,CAAA,EAwBX,iBAxBW,CAAA,EAwBM,oBAAA,CAAA,GAAA,CAAA,OAxBN;EAAA,WAAA,EAAA,MAAA;AAAA,CAAA;KAkCrD,qBAAA,GAAwB,KAAA,CAAM,cAxBf,CAAA,OAwBqC,KAAA,CAAU,WAxB/C,CAAA;cA0Bd,gBA1BuD,EAAA;;IAAtC,SAAM;IAAA,GAAA;EAAA,CAAA,EA0BsB,qBA1BtB,CAAA,EA0B2C,oBAAA,CAAA,GAAA,CAAA,OA1B3C;EAAc,WAAA,EAAA,MAAA;AAAA,CAAA;KAoCtC,eAAA,GAAkB,KAAA,CAAM,cAhC5B,CAAA,OAgCkD,KAAA,CAAU,KAhC5D,CAAA;cAkCK;;IApCuC,SAAA;IAAA,GAAA;EAAA,CAAA,EAoCA,eApCA,CAAA,EAoCe,oBAAA,CAAA,GAAA,CAAA,OApCf;aAAe,EAAA,MAAA;CAAA;AAAA,KA8CvD,cAAA,GAAiB,KAAA,CAAM,cApCN,CAAA,OAoC4B,KAAA,CAAU,IApCtC,CAAA;cAsChB,SAtCgB,EAAA;;IAA+B,SAAU;IAAA,GAAA;EAAA,CAAA,EAsCnB,cAtCmB,CAAA,EAsCL,oBAAA,CAAA,GAAA,CAAA,OAtCK;aAAhC,EAAA,MAAA;CAAc;AAAA,KAgDxC,kBAAA,GAAqB,KAAA,CAAM,cA5C/B,CAAA,OA4CqD,KAAA,CAAU,QA5C/D,CAAA;cA8CK,aA9CL,EAAA;UA8C6B,qBAAkB,oBAAA,CAAA,GAAA,CAAA;aAhDD,EAAA,MAAA"}
|
package/dist/field.js
CHANGED
|
@@ -1,28 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
N.displayName = "FieldError";
|
|
16
|
-
const u = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Item, { className: t(d, e), ...l });
|
|
17
|
-
u.displayName = "FieldItem";
|
|
18
|
-
const f = (e) => /* @__PURE__ */ s(i.Validity, { ...e });
|
|
19
|
-
f.displayName = "FieldValidity";
|
|
20
|
-
export {
|
|
21
|
-
y as FieldControl,
|
|
22
|
-
F as FieldDescription,
|
|
23
|
-
N as FieldError,
|
|
24
|
-
u as FieldItem,
|
|
25
|
-
p as FieldLabel,
|
|
26
|
-
c as FieldRoot,
|
|
27
|
-
f as FieldValidity
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import { descriptionStyles, errorStyles, fieldItemStyles, fieldRootStyles, inputBaseStyles, labelStyles } from "./lib/form-variants.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Field } from "@base-ui/react/field";
|
|
8
|
+
|
|
9
|
+
//#region src/components/field.tsx
|
|
10
|
+
const FieldRoot = ({ className, ...props }) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(Field.Root, {
|
|
12
|
+
className: cn(fieldRootStyles, className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
28
15
|
};
|
|
16
|
+
FieldRoot.displayName = "FieldRoot";
|
|
17
|
+
const FieldLabel = ({ className, ...props }) => {
|
|
18
|
+
return /* @__PURE__ */ jsx(Field.Label, {
|
|
19
|
+
className: cn(labelStyles, className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
FieldLabel.displayName = "FieldLabel";
|
|
24
|
+
const FieldControl = ({ className, ...props }) => {
|
|
25
|
+
return /* @__PURE__ */ jsx(Field.Control, {
|
|
26
|
+
className: cn(inputBaseStyles, className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
FieldControl.displayName = "FieldControl";
|
|
31
|
+
const FieldDescription = ({ className, ...props }) => {
|
|
32
|
+
return /* @__PURE__ */ jsx(Field.Description, {
|
|
33
|
+
className: cn(descriptionStyles, className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
FieldDescription.displayName = "FieldDescription";
|
|
38
|
+
const FieldError = ({ className, ...props }) => {
|
|
39
|
+
return /* @__PURE__ */ jsx(Field.Error, {
|
|
40
|
+
className: cn(errorStyles, className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
FieldError.displayName = "FieldError";
|
|
45
|
+
const FieldItem = ({ className, ...props }) => {
|
|
46
|
+
return /* @__PURE__ */ jsx(Field.Item, {
|
|
47
|
+
className: cn(fieldItemStyles, className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
FieldItem.displayName = "FieldItem";
|
|
52
|
+
const FieldValidity = (props) => {
|
|
53
|
+
return /* @__PURE__ */ jsx(Field.Validity, { ...props });
|
|
54
|
+
};
|
|
55
|
+
FieldValidity.displayName = "FieldValidity";
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
export { FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldRoot, FieldValidity };
|
|
59
|
+
//# sourceMappingURL=field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.js","names":["BaseField"],"sources":["../src/components/field.tsx"],"sourcesContent":["'use client'\n\nimport { Field as BaseField } from '@base-ui/react/field'\nimport * as React from 'react'\n\nimport {\n descriptionStyles,\n errorStyles,\n fieldItemStyles,\n fieldRootStyles,\n inputBaseStyles,\n labelStyles,\n} from '../lib/form-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// FieldRoot\n// ============================================================================\n\ntype FieldRootProps = React.ComponentProps<typeof BaseField.Root>\n\nconst FieldRoot = ({ className, ...props }: FieldRootProps) => {\n return <BaseField.Root className={cn(fieldRootStyles, className)} {...props} />\n}\n\nFieldRoot.displayName = 'FieldRoot'\n\n// ============================================================================\n// FieldLabel\n// ============================================================================\n\ntype FieldLabelProps = React.ComponentProps<typeof BaseField.Label>\n\nconst FieldLabel = ({ className, ...props }: FieldLabelProps) => {\n return <BaseField.Label className={cn(labelStyles, className)} {...props} />\n}\n\nFieldLabel.displayName = 'FieldLabel'\n\n// ============================================================================\n// FieldControl\n// ============================================================================\n\ntype FieldControlProps = React.ComponentProps<typeof BaseField.Control>\n\nconst FieldControl = ({ className, ...props }: FieldControlProps) => {\n return <BaseField.Control className={cn(inputBaseStyles, className)} {...props} />\n}\n\nFieldControl.displayName = 'FieldControl'\n\n// ============================================================================\n// FieldDescription\n// ============================================================================\n\ntype FieldDescriptionProps = React.ComponentProps<typeof BaseField.Description>\n\nconst FieldDescription = ({ className, ...props }: FieldDescriptionProps) => {\n return <BaseField.Description className={cn(descriptionStyles, className)} {...props} />\n}\n\nFieldDescription.displayName = 'FieldDescription'\n\n// ============================================================================\n// FieldError\n// ============================================================================\n\ntype FieldErrorProps = React.ComponentProps<typeof BaseField.Error>\n\nconst FieldError = ({ className, ...props }: FieldErrorProps) => {\n return <BaseField.Error className={cn(errorStyles, className)} {...props} />\n}\n\nFieldError.displayName = 'FieldError'\n\n// ============================================================================\n// FieldItem\n// ============================================================================\n\ntype FieldItemProps = React.ComponentProps<typeof BaseField.Item>\n\nconst FieldItem = ({ className, ...props }: FieldItemProps) => {\n return <BaseField.Item className={cn(fieldItemStyles, className)} {...props} />\n}\n\nFieldItem.displayName = 'FieldItem'\n\n// ============================================================================\n// FieldValidity\n// ============================================================================\n\ntype FieldValidityProps = React.ComponentProps<typeof BaseField.Validity>\n\nconst FieldValidity = (props: FieldValidityProps) => {\n return <BaseField.Validity {...props} />\n}\n\nFieldValidity.displayName = 'FieldValidity'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n FieldRoot,\n FieldLabel,\n FieldControl,\n FieldDescription,\n FieldError,\n FieldItem,\n FieldValidity,\n}\n\nexport type {\n FieldRootProps,\n FieldLabelProps,\n FieldControlProps,\n FieldDescriptionProps,\n FieldErrorProps,\n FieldItemProps,\n FieldValidityProps,\n}\n"],"mappings":";;;;;;;;;AAqBA,MAAM,aAAa,EAAE,WAAW,GAAG,YAA4B;AAC7D,QAAO,oBAACA,MAAU;EAAK,WAAW,GAAG,iBAAiB,UAAU;EAAE,GAAI;GAAS;;AAGjF,UAAU,cAAc;AAQxB,MAAM,cAAc,EAAE,WAAW,GAAG,YAA6B;AAC/D,QAAO,oBAACA,MAAU;EAAM,WAAW,GAAG,aAAa,UAAU;EAAE,GAAI;GAAS;;AAG9E,WAAW,cAAc;AAQzB,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QAAO,oBAACA,MAAU;EAAQ,WAAW,GAAG,iBAAiB,UAAU;EAAE,GAAI;GAAS;;AAGpF,aAAa,cAAc;AAQ3B,MAAM,oBAAoB,EAAE,WAAW,GAAG,YAAmC;AAC3E,QAAO,oBAACA,MAAU;EAAY,WAAW,GAAG,mBAAmB,UAAU;EAAE,GAAI;GAAS;;AAG1F,iBAAiB,cAAc;AAQ/B,MAAM,cAAc,EAAE,WAAW,GAAG,YAA6B;AAC/D,QAAO,oBAACA,MAAU;EAAM,WAAW,GAAG,aAAa,UAAU;EAAE,GAAI;GAAS;;AAG9E,WAAW,cAAc;AAQzB,MAAM,aAAa,EAAE,WAAW,GAAG,YAA4B;AAC7D,QAAO,oBAACA,MAAU;EAAK,WAAW,GAAG,iBAAiB,UAAU;EAAE,GAAI;GAAS;;AAGjF,UAAU,cAAc;AAQxB,MAAM,iBAAiB,UAA8B;AACnD,QAAO,oBAACA,MAAU,YAAS,GAAI,QAAS;;AAG1C,cAAc,cAAc"}
|
package/dist/fieldset.d.ts
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
3
|
+
import { Fieldset } from "@base-ui/react/fieldset";
|
|
4
|
+
|
|
5
|
+
//#region src/components/fieldset.d.ts
|
|
6
|
+
type FieldsetRootProps = React.ComponentProps<typeof Fieldset.Root>;
|
|
7
|
+
declare const FieldsetRoot: {
|
|
8
|
+
({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: FieldsetRootProps): react_jsx_runtime19.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
type FieldsetLegendProps = React.ComponentProps<typeof Fieldset.Legend>;
|
|
15
|
+
declare const FieldsetLegend: {
|
|
16
|
+
({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: FieldsetLegendProps): react_jsx_runtime19.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { FieldsetLegend, type FieldsetLegendProps, FieldsetRoot, type FieldsetRootProps };
|
|
24
|
+
//# sourceMappingURL=fieldset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldset.d.ts","names":[],"sources":["../src/components/fieldset.tsx"],"sourcesContent":[],"mappings":";;;;;KAYK,iBAAA,GAAoB,KAAA,CAAM,sBAAsB,QAAA,CAAa;cAE5D;;;;KAAyC,oBAAiB,mBAAA,CAAA,GAAA,CAAA;EAF3D,WAAA,EAAA,MAAA;CAAiB;KAiBjB,mBAAA,GAAsB,KAAA,CAAM,cAjBiC,CAAA,OAiBX,QAAA,CAAa,MAjBF,CAAA;cAmB5D,cAnByB,EAAA;EAAc,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAmBI,mBAnBJ,CAAA,EAmBuB,mBAAA,CAAA,GAAA,CAAA,OAnBvB;EAEvC,WAAA,EAAA,MAOL;CAAA"}
|
package/dist/fieldset.js
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
i.displayName = "FieldsetLegend";
|
|
16
|
-
export {
|
|
17
|
-
i as FieldsetLegend,
|
|
18
|
-
a as FieldsetRoot
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import { labelStyles } from "./lib/form-variants.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Fieldset } from "@base-ui/react/fieldset";
|
|
8
|
+
|
|
9
|
+
//#region src/components/fieldset.tsx
|
|
10
|
+
const FieldsetRoot = ({ className, ...props }) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(Fieldset.Root, {
|
|
12
|
+
className: cn("flex flex-col items-start gap-2", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
19
15
|
};
|
|
16
|
+
FieldsetRoot.displayName = "FieldsetRoot";
|
|
17
|
+
const FieldsetLegend = ({ className, ...props }) => {
|
|
18
|
+
return /* @__PURE__ */ jsx(Fieldset.Legend, {
|
|
19
|
+
className: cn(labelStyles, className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
FieldsetLegend.displayName = "FieldsetLegend";
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { FieldsetLegend, FieldsetRoot };
|
|
27
|
+
//# sourceMappingURL=fieldset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldset.js","names":["BaseFieldset"],"sources":["../src/components/fieldset.tsx"],"sourcesContent":["'use client'\n\nimport { Fieldset as BaseFieldset } from '@base-ui/react/fieldset'\nimport * as React from 'react'\n\nimport { labelStyles } from '../lib/form-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// FieldsetRoot\n// ============================================================================\n\ntype FieldsetRootProps = React.ComponentProps<typeof BaseFieldset.Root>\n\nconst FieldsetRoot = ({ className, ...props }: FieldsetRootProps) => {\n return (\n <BaseFieldset.Root\n className={cn('flex flex-col items-start gap-2', className)}\n {...props}\n />\n )\n}\n\nFieldsetRoot.displayName = 'FieldsetRoot'\n\n// ============================================================================\n// FieldsetLegend\n// ============================================================================\n\ntype FieldsetLegendProps = React.ComponentProps<typeof BaseFieldset.Legend>\n\nconst FieldsetLegend = ({ className, ...props }: FieldsetLegendProps) => {\n return <BaseFieldset.Legend className={cn(labelStyles, className)} {...props} />\n}\n\nFieldsetLegend.displayName = 'FieldsetLegend'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport { FieldsetRoot, FieldsetLegend }\n\nexport type { FieldsetRootProps, FieldsetLegendProps }\n"],"mappings":";;;;;;;;;AAcA,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QACE,oBAACA,SAAa;EACZ,WAAW,GAAG,mCAAmC,UAAU;EAC3D,GAAI;GACJ;;AAIN,aAAa,cAAc;AAQ3B,MAAM,kBAAkB,EAAE,WAAW,GAAG,YAAiC;AACvE,QAAO,oBAACA,SAAa;EAAO,WAAW,GAAG,aAAa,UAAU;EAAE,GAAI;GAAS;;AAGlF,eAAe,cAAc"}
|
package/dist/form.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
3
|
+
import { Form } from "@base-ui/react/form";
|
|
4
|
+
|
|
5
|
+
//#region src/components/form.d.ts
|
|
6
|
+
type FormRootProps = React.ComponentProps<typeof Form>;
|
|
7
|
+
declare const FormRoot: {
|
|
8
|
+
({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: FormRootProps): react_jsx_runtime21.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { FormRoot, type FormRootProps };
|
|
16
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","names":[],"sources":["../src/components/form.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,aAAA,GAAgB,KAAA,CAAM,sBAAsB;cAE3C;;;;KAAqC,gBAAa,mBAAA,CAAA,GAAA,CAAA;EAFnD,WAAA,EAAA,MAAa;CAAA"}
|
package/dist/form.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Form } from "@base-ui/react/form";
|
|
7
|
+
|
|
8
|
+
//#region src/components/form.tsx
|
|
9
|
+
const FormRoot = ({ className, ...props }) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(Form, {
|
|
11
|
+
className: cn("flex flex-col gap-4", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
9
14
|
};
|
|
15
|
+
FormRoot.displayName = "FormRoot";
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { FormRoot };
|
|
19
|
+
//# sourceMappingURL=form.js.map
|
package/dist/form.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","names":["BaseForm"],"sources":["../src/components/form.tsx"],"sourcesContent":["'use client'\n\nimport { Form as BaseForm } from '@base-ui/react/form'\nimport * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// FormRoot\n// ============================================================================\n\ntype FormRootProps = React.ComponentProps<typeof BaseForm>\n\nconst FormRoot = ({ className, ...props }: FormRootProps) => {\n return <BaseForm className={cn('flex flex-col gap-4', className)} {...props} />\n}\n\nFormRoot.displayName = 'FormRoot'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport { FormRoot }\n\nexport type { FormRootProps }\n"],"mappings":";;;;;;;;AAaA,MAAM,YAAY,EAAE,WAAW,GAAG,YAA2B;AAC3D,QAAO,oBAACA;EAAS,WAAW,GAAG,uBAAuB,UAAU;EAAE,GAAI;GAAS;;AAGjF,SAAS,cAAc"}
|