ixia-ui-react 1.7.0 → 2.0.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/README.md +24 -1
- package/dist/accordion/index.d.ts +41 -0
- package/dist/accordion/index.js +142 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/alert/index.d.ts +22 -0
- package/dist/alert/index.js +1 -0
- package/dist/alert-Dcu9R8CY.js +73 -0
- package/dist/alert-Dcu9R8CY.js.map +1 -0
- package/dist/alert-dialog/index.d.ts +39 -0
- package/dist/alert-dialog/index.js +134 -0
- package/dist/alert-dialog/index.js.map +1 -0
- package/dist/autocomplete/index.d.ts +2 -0
- package/dist/autocomplete/index.js +1 -0
- package/dist/autocomplete-BfpWVO1l.js +169 -0
- package/dist/autocomplete-BfpWVO1l.js.map +1 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +1 -0
- package/dist/avatar-Bp4gZh21.js +93 -0
- package/dist/avatar-Bp4gZh21.js.map +1 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/badge/index.js +1 -0
- package/dist/badge-Cl-9WTW-.js +160 -0
- package/dist/badge-Cl-9WTW-.js.map +1 -0
- package/dist/bento-box/index.d.ts +30 -0
- package/dist/bento-box/index.js +103 -0
- package/dist/bento-box/index.js.map +1 -0
- package/dist/breadcrumb/index.d.ts +18 -0
- package/dist/breadcrumb/index.js +58 -0
- package/dist/breadcrumb/index.js.map +1 -0
- package/dist/button/index.d.ts +3 -0
- package/dist/button/index.js +1 -0
- package/dist/button-BpUC-R1J.js +307 -0
- package/dist/button-BpUC-R1J.js.map +1 -0
- package/dist/button-group/index.d.ts +2 -0
- package/dist/button-group/index.js +1 -0
- package/dist/button-group-7azbqlcO.js +269 -0
- package/dist/button-group-7azbqlcO.js.map +1 -0
- package/dist/button.types-BFKrBCGd.d.ts +10 -0
- package/dist/calendar/index.d.ts +63 -0
- package/dist/calendar/index.js +292 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/chart/index.d.ts +87 -0
- package/dist/chart/index.js +262 -0
- package/dist/chart/index.js.map +1 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +1 -0
- package/dist/checkbox-BuUZ1Lly.js +54 -0
- package/dist/checkbox-BuUZ1Lly.js.map +1 -0
- package/dist/checkbox-group/index.d.ts +6 -0
- package/dist/checkbox-group/index.js +17 -0
- package/dist/checkbox-group/index.js.map +1 -0
- package/dist/cn-BDi0DfT5.js +29 -0
- package/dist/cn-BDi0DfT5.js.map +1 -0
- package/dist/code-block/index.d.ts +50 -0
- package/dist/code-block/index.js +208 -0
- package/dist/code-block/index.js.map +1 -0
- package/dist/collapsible/index.d.ts +2 -0
- package/dist/collapsible/index.js +1 -0
- package/dist/collapsible-BVqrh0Q0.js +44 -0
- package/dist/collapsible-BVqrh0Q0.js.map +1 -0
- package/dist/color-channel-slider/index.d.ts +2 -0
- package/dist/color-channel-slider/index.js +1 -0
- package/dist/color-channel-slider-h8mUPJ35.js +70 -0
- package/dist/color-channel-slider-h8mUPJ35.js.map +1 -0
- package/dist/color-picker/index.d.ts +137 -0
- package/dist/color-picker/index.js +621 -0
- package/dist/color-picker/index.js.map +1 -0
- package/dist/combobox/index.d.ts +64 -0
- package/dist/combobox/index.js +289 -0
- package/dist/combobox/index.js.map +1 -0
- package/dist/context-menu/index.d.ts +49 -0
- package/dist/context-menu/index.js +166 -0
- package/dist/context-menu/index.js.map +1 -0
- package/dist/dialog/index.d.ts +36 -0
- package/dist/dialog/index.js +119 -0
- package/dist/dialog/index.js.map +1 -0
- package/dist/drawer/index.d.ts +31 -0
- package/dist/drawer/index.js +95 -0
- package/dist/drawer/index.js.map +1 -0
- package/dist/dropzone/index.d.ts +70 -0
- package/dist/dropzone/index.js +479 -0
- package/dist/dropzone/index.js.map +1 -0
- package/dist/field/index.d.ts +2 -0
- package/dist/field/index.js +1 -0
- package/dist/field-DTL7eA5y.js +254 -0
- package/dist/field-DTL7eA5y.js.map +1 -0
- package/dist/form/index.d.ts +220 -0
- package/dist/form/index.js +3 -0
- package/dist/form-BxMg796f.js +192 -0
- package/dist/form-BxMg796f.js.map +1 -0
- package/dist/has-single-element-child-DLGI0Dh2.js +12 -0
- package/dist/has-single-element-child-DLGI0Dh2.js.map +1 -0
- package/dist/hooks/index.d.ts +26 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks-DUm-q_ig.js +68 -0
- package/dist/hooks-DUm-q_ig.js.map +1 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.js +1 -0
- package/dist/icon-D3JWfCa2.js +85 -0
- package/dist/icon-D3JWfCa2.js.map +1 -0
- package/dist/icon-container/index.d.ts +10 -0
- package/dist/icon-container/index.js +64 -0
- package/dist/icon-container/index.js.map +1 -0
- package/dist/index-0ZQzIKoE.d.ts +11 -0
- package/dist/index-B3MK1QYh.d.ts +11 -0
- package/dist/index-BJVMIPq4.d.ts +54 -0
- package/dist/index-BsV-u_jc.d.ts +4 -0
- package/dist/index-BygR7cUT.d.ts +22 -0
- package/dist/index-BzTOLSgZ.d.ts +9 -0
- package/dist/index-C15xiG9O.d.ts +14 -0
- package/dist/index-C2zco6-C.d.ts +15 -0
- package/dist/index-CIDOd4Z8.d.ts +56 -0
- package/dist/index-CQti9gFb.d.ts +49 -0
- package/dist/index-CiE-Rqit.d.ts +70 -0
- package/dist/index-D1kkOg9k.d.ts +14 -0
- package/dist/index-DLfdAked.d.ts +34 -0
- package/dist/index-DMaW_XF1.d.ts +24 -0
- package/dist/index-Db_QGr6S.d.ts +5 -0
- package/dist/index-DdFxZ3Xr.d.ts +22 -0
- package/dist/index-DfNHJF0t.d.ts +33 -0
- package/dist/index-DyQYoAUf.d.ts +29 -0
- package/dist/index-N2CBSUDu.d.ts +14 -0
- package/dist/index-PuhTRMce.d.ts +11 -0
- package/dist/index-Wb_tILYa.d.ts +24 -0
- package/dist/index-bVyqfhJS.d.ts +4 -0
- package/dist/index-x4f8gnaI.d.ts +15 -0
- package/dist/input/index.d.ts +3 -0
- package/dist/input/index.js +1 -0
- package/dist/input-Laj6dwtK.js +179 -0
- package/dist/input-Laj6dwtK.js.map +1 -0
- package/dist/input-group/index.d.ts +2 -0
- package/dist/input-group/index.js +1 -0
- package/dist/input-group-CgdazGrY.js +111 -0
- package/dist/input-group-CgdazGrY.js.map +1 -0
- package/dist/input-otp/index.d.ts +13 -0
- package/dist/input-otp/index.js +44 -0
- package/dist/input-otp/index.js.map +1 -0
- package/dist/input.types-816rEVWU.d.ts +20 -0
- package/dist/input.types-D0gyoaQv.js +48 -0
- package/dist/input.types-D0gyoaQv.js.map +1 -0
- package/dist/kbd/index.d.ts +9 -0
- package/dist/kbd/index.js +25 -0
- package/dist/kbd/index.js.map +1 -0
- package/dist/label/index.d.ts +8 -0
- package/dist/label/index.js +1 -0
- package/dist/label-BgpayDvN.js +27 -0
- package/dist/label-BgpayDvN.js.map +1 -0
- package/dist/layer-tree/index.d.ts +728 -0
- package/dist/layer-tree/index.js +685 -0
- package/dist/layer-tree/index.js.map +1 -0
- package/dist/map/google/index.d.ts +143 -0
- package/dist/map/google/index.js +445 -0
- package/dist/map/google/index.js.map +1 -0
- package/dist/map/index.d.ts +94 -0
- package/dist/map/index.js +208 -0
- package/dist/map/index.js.map +1 -0
- package/dist/map.context-Dw1D7E8m.js +11 -0
- package/dist/map.context-Dw1D7E8m.js.map +1 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +1 -0
- package/dist/menu-sf13cnGp.js +173 -0
- package/dist/menu-sf13cnGp.js.map +1 -0
- package/dist/menu-tone-DWBEHoX2.js +22 -0
- package/dist/menu-tone-DWBEHoX2.js.map +1 -0
- package/dist/meter/index.d.ts +2 -0
- package/dist/meter/index.js +1 -0
- package/dist/meter-HD5taq57.js +116 -0
- package/dist/meter-HD5taq57.js.map +1 -0
- package/dist/nav-bar/index.d.ts +25 -0
- package/dist/nav-bar/index.js +133 -0
- package/dist/nav-bar/index.js.map +1 -0
- package/dist/navigation-menu/index.d.ts +43 -0
- package/dist/navigation-menu/index.js +176 -0
- package/dist/navigation-menu/index.js.map +1 -0
- package/dist/number-field/index.d.ts +14 -0
- package/dist/number-field/index.js +116 -0
- package/dist/number-field/index.js.map +1 -0
- package/dist/popover/index.d.ts +2 -0
- package/dist/popover/index.js +1 -0
- package/dist/popover-B1s4xXrX.js +114 -0
- package/dist/popover-B1s4xXrX.js.map +1 -0
- package/dist/preview-card/index.d.ts +13 -0
- package/dist/preview-card/index.js +35 -0
- package/dist/preview-card/index.js.map +1 -0
- package/dist/profile/index.d.ts +21 -0
- package/dist/profile/index.js +52 -0
- package/dist/profile/index.js.map +1 -0
- package/dist/progress/index.d.ts +23 -0
- package/dist/progress/index.js +97 -0
- package/dist/progress/index.js.map +1 -0
- package/dist/radar-ping/index.d.ts +11 -0
- package/dist/radar-ping/index.js +49 -0
- package/dist/radar-ping/index.js.map +1 -0
- package/dist/radio-group/index.d.ts +2 -0
- package/dist/radio-group/index.js +1 -0
- package/dist/radio-group-Dj43u35Z.js +47 -0
- package/dist/radio-group-Dj43u35Z.js.map +1 -0
- package/dist/resizeable/index.d.ts +11 -0
- package/dist/resizeable/index.js +31 -0
- package/dist/resizeable/index.js.map +1 -0
- package/dist/scroll-area/index.d.ts +11 -0
- package/dist/scroll-area/index.js +51 -0
- package/dist/scroll-area/index.js.map +1 -0
- package/dist/select/index.d.ts +2 -0
- package/dist/select/index.js +1 -0
- package/dist/select-DncJXYim.js +159 -0
- package/dist/select-DncJXYim.js.map +1 -0
- package/dist/separator/index.d.ts +2 -0
- package/dist/separator/index.js +1 -0
- package/dist/separator-DgIQp1cB.js +97 -0
- package/dist/separator-DgIQp1cB.js.map +1 -0
- package/dist/sidebar/index.d.ts +80 -0
- package/dist/sidebar/index.js +334 -0
- package/dist/sidebar/index.js.map +1 -0
- package/dist/site-header/index.d.ts +22 -0
- package/dist/site-header/index.js +55 -0
- package/dist/site-header/index.js.map +1 -0
- package/dist/skeleton/index.d.ts +4 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton-DSG3FWby.js +13 -0
- package/dist/skeleton-DSG3FWby.js.map +1 -0
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +1 -0
- package/dist/slider-D_XlV4OW.js +114 -0
- package/dist/slider-D_XlV4OW.js.map +1 -0
- package/dist/slider-group/index.d.ts +46 -0
- package/dist/slider-group/index.js +198 -0
- package/dist/slider-group/index.js.map +1 -0
- package/dist/styles.css +6 -17
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch-DXHixGHe.js +23 -0
- package/dist/switch-DXHixGHe.js.map +1 -0
- package/dist/table/index.d.ts +920 -0
- package/dist/table/index.js +1544 -0
- package/dist/table/index.js.map +1 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +1 -0
- package/dist/tabs-DTC7coap.js +270 -0
- package/dist/tabs-DTC7coap.js.map +1 -0
- package/dist/text-area/index.d.ts +2 -0
- package/dist/text-area/index.js +1 -0
- package/dist/text-area-H6HjKnv_.js +50 -0
- package/dist/text-area-H6HjKnv_.js.map +1 -0
- package/dist/themes/hogarth.css +0 -4
- package/dist/themes/mabel.css +0 -4
- package/dist/themes/maculata.css +0 -4
- package/dist/themes/monadelpha.css +0 -4
- package/dist/themes/venus.css +0 -4
- package/dist/themes/viridiflora.css +0 -4
- package/dist/toast/index.d.ts +65 -0
- package/dist/toast/index.js +216 -0
- package/dist/toast/index.js.map +1 -0
- package/dist/toggle/index.d.ts +2 -0
- package/dist/toggle/index.js +1 -0
- package/dist/toggle-ZT9thVmz.js +73 -0
- package/dist/toggle-ZT9thVmz.js.map +1 -0
- package/dist/toggle-group/index.d.ts +10 -0
- package/dist/toggle-group/index.js +63 -0
- package/dist/toggle-group/index.js.map +1 -0
- package/dist/toggle-group-context-CBNZEf1I.js +6 -0
- package/dist/toggle-group-context-CBNZEf1I.js.map +1 -0
- package/dist/tooltip/index.d.ts +18 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip-B6z3tDbW.js +41 -0
- package/dist/tooltip-B6z3tDbW.js.map +1 -0
- package/dist/trim-text-children-CQRFg2fL.js +33 -0
- package/dist/trim-text-children-CQRFg2fL.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils-BI2x7nW5.js +5 -0
- package/dist/utils-BI2x7nW5.js.map +1 -0
- package/package.json +100 -31
- package/dist/index.d.ts +0 -7993
- package/dist/index.js +0 -17219
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { t as cn } from "../cn-BDi0DfT5.js";
|
|
2
|
+
import { n as Icon } from "../icon-D3JWfCa2.js";
|
|
3
|
+
import { n as menuSubmenuToneClasses, t as menuItemToneClasses } from "../menu-tone-DWBEHoX2.js";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
|
|
7
|
+
// src/components/context-menu/context-menu.tsx
|
|
8
|
+
function ContextMenu$2({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Root, { ...props });
|
|
10
|
+
}
|
|
11
|
+
// src/components/context-menu/context-menu-checkbox-item.tsx
|
|
12
|
+
function ContextMenuCheckboxItem({ className, children, ref, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
|
|
14
|
+
className: cn("relative z-0 grid cursor-default grid-cols-[1fr_2rem] items-center px-xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:content-[\"\"] hover:cursor-pointer data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high", className),
|
|
15
|
+
ref,
|
|
16
|
+
...props,
|
|
17
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
18
|
+
className: "col-start-1",
|
|
19
|
+
children
|
|
20
|
+
}), /* @__PURE__ */ jsx(ContextMenu$1.CheckboxItemIndicator, {
|
|
21
|
+
className: "col-start-2 flex items-center justify-center place-self-end self-center",
|
|
22
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
23
|
+
name: "selected",
|
|
24
|
+
className: "size-sm"
|
|
25
|
+
})
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
// src/components/context-menu/context-menu-group.tsx
|
|
30
|
+
function ContextMenuGroup({ className, ref, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Group, {
|
|
32
|
+
className: cn("", className),
|
|
33
|
+
ref,
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
// src/components/context-menu/context-menu-group-label.tsx
|
|
38
|
+
function ContextMenuGroupLabel({ className, ref, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.GroupLabel, {
|
|
40
|
+
className: cn("cursor-default px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none", className),
|
|
41
|
+
ref,
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
// src/components/context-menu/context-menu.types.ts
|
|
46
|
+
const contextMenuItemVariants = cva("relative z-0 flex cursor-default items-center px-xs py-3xs style-text-default-0 transition-colors duration-100 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:duration-100 before:content-[\"\"] hover:cursor-pointer", {
|
|
47
|
+
defaultVariants: { tone: "neutral" },
|
|
48
|
+
variants: { tone: menuItemToneClasses }
|
|
49
|
+
});
|
|
50
|
+
const contextMenuSubmenuTriggerVariants = cva("relative z-0 flex cursor-default items-center px-xs py-3xs style-text-default-0 transition-colors duration-100 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:duration-100 before:content-[\"\"] hover:cursor-pointer", {
|
|
51
|
+
defaultVariants: { tone: "neutral" },
|
|
52
|
+
variants: { tone: menuSubmenuToneClasses }
|
|
53
|
+
});
|
|
54
|
+
// src/components/context-menu/context-menu-item.tsx
|
|
55
|
+
function ContextMenuItem({ className, tone, children, ref, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Item, {
|
|
57
|
+
className: cn(contextMenuItemVariants({ tone }), className),
|
|
58
|
+
nativeButton: true,
|
|
59
|
+
ref,
|
|
60
|
+
render: (renderProps) => /* @__PURE__ */ jsx("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
...renderProps,
|
|
63
|
+
className: cn("w-full gap-2xs [&>svg]:size-sm", renderProps.className),
|
|
64
|
+
children
|
|
65
|
+
}),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// src/components/context-menu/context-menu-popup.tsx
|
|
70
|
+
function ContextMenuPopup({ className, ref, ...props }) {
|
|
71
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Portal, { children: /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
|
|
72
|
+
className: "z-99",
|
|
73
|
+
children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
|
|
74
|
+
className: cn("flex w-[calc(100%+var(--spacing-xl))] origin-(--transform-origin) translate-x-[-calc(var(--spacing-xl)/2)] flex-col gap-3xs rounded-xl bg-surface-2 p-3xs py-2xs shadow-md transition-[transform,scale,opacity] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0", className),
|
|
75
|
+
ref,
|
|
76
|
+
...props
|
|
77
|
+
})
|
|
78
|
+
}) });
|
|
79
|
+
}
|
|
80
|
+
// src/components/context-menu/context-menu-radio-group.tsx
|
|
81
|
+
function ContextMenuRadioGroup({ className, ref, ...props }) {
|
|
82
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.RadioGroup, {
|
|
83
|
+
className: cn("", className),
|
|
84
|
+
ref,
|
|
85
|
+
...props
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
// src/components/context-menu/context-menu-radio-item.tsx
|
|
89
|
+
function ContextMenuRadioItem({ className, children, ref, ...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
|
|
91
|
+
className: cn("relative z-0 grid cursor-default grid-cols-[1fr_2rem] items-center px-xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:content-[\"\"] hover:cursor-pointer data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high", className),
|
|
92
|
+
ref,
|
|
93
|
+
...props,
|
|
94
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
95
|
+
className: "col-start-1 min-w-3xl",
|
|
96
|
+
children
|
|
97
|
+
}), /* @__PURE__ */ jsx(ContextMenu$1.RadioItemIndicator, {
|
|
98
|
+
className: "col-start-2 flex items-center justify-center place-self-end self-center",
|
|
99
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
100
|
+
name: "selected",
|
|
101
|
+
className: "size-sm"
|
|
102
|
+
})
|
|
103
|
+
})]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// src/components/context-menu/context-menu-separator.tsx
|
|
107
|
+
function ContextMenuSeparator({ className, ref, ...props }) {
|
|
108
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Separator, {
|
|
109
|
+
className: cn("mx-2xs my-3xs h-px bg-border-strong", className),
|
|
110
|
+
ref,
|
|
111
|
+
...props
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// src/components/context-menu/context-menu-shortcut.tsx
|
|
115
|
+
function ContextMenuShortcut({ className, ref, ...props }) {
|
|
116
|
+
return /* @__PURE__ */ jsx("div", {
|
|
117
|
+
className: cn("ml-auto inline-flex items-center gap-3xs", className),
|
|
118
|
+
ref,
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
// src/components/context-menu/context-menu-submenu.tsx
|
|
123
|
+
function ContextMenuSubmenu({ ...props }) {
|
|
124
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.SubmenuRoot, { ...props });
|
|
125
|
+
}
|
|
126
|
+
// src/components/context-menu/context-menu-submenu-trigger.tsx
|
|
127
|
+
function ContextMenuSubmenuTrigger({ className, children, ref, tone, ...props }) {
|
|
128
|
+
return /* @__PURE__ */ jsxs(ContextMenu$1.SubmenuTrigger, {
|
|
129
|
+
className: cn(contextMenuSubmenuTriggerVariants({ tone }), className),
|
|
130
|
+
ref,
|
|
131
|
+
...props,
|
|
132
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
133
|
+
className: "flex min-w-3xl items-center gap-2xs pr-2xl",
|
|
134
|
+
children
|
|
135
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
136
|
+
name: "chevronRight",
|
|
137
|
+
className: "ml-auto size-xs shrink-0 self-center"
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// src/components/context-menu/context-menu-trigger.tsx
|
|
142
|
+
function ContextMenuTrigger({ className, ref, ...props }) {
|
|
143
|
+
return /* @__PURE__ */ jsx(ContextMenu$1.Trigger, {
|
|
144
|
+
className: cn("flex min-w-0 flex-1", className),
|
|
145
|
+
ref,
|
|
146
|
+
...props
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
// src/components/context-menu/index.ts
|
|
150
|
+
const ContextMenu = Object.assign(ContextMenu$2, {
|
|
151
|
+
CheckboxItem: ContextMenuCheckboxItem,
|
|
152
|
+
Group: ContextMenuGroup,
|
|
153
|
+
GroupLabel: ContextMenuGroupLabel,
|
|
154
|
+
Item: ContextMenuItem,
|
|
155
|
+
Popup: ContextMenuPopup,
|
|
156
|
+
RadioGroup: ContextMenuRadioGroup,
|
|
157
|
+
RadioItem: ContextMenuRadioItem,
|
|
158
|
+
Separator: ContextMenuSeparator,
|
|
159
|
+
Shortcut: ContextMenuShortcut,
|
|
160
|
+
Submenu: ContextMenuSubmenu,
|
|
161
|
+
SubmenuTrigger: ContextMenuSubmenuTrigger,
|
|
162
|
+
Trigger: ContextMenuTrigger
|
|
163
|
+
});
|
|
164
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuPopup, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSubmenu, ContextMenuSubmenuTrigger, ContextMenuTrigger };
|
|
165
|
+
|
|
166
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","BaseContextMenu","ContextMenuRoot"],"sources":["../../src/components/context-menu/context-menu.tsx","../../src/components/context-menu/context-menu-checkbox-item.tsx","../../src/components/context-menu/context-menu-group.tsx","../../src/components/context-menu/context-menu-group-label.tsx","../../src/components/context-menu/context-menu.types.ts","../../src/components/context-menu/context-menu-item.tsx","../../src/components/context-menu/context-menu-popup.tsx","../../src/components/context-menu/context-menu-radio-group.tsx","../../src/components/context-menu/context-menu-radio-item.tsx","../../src/components/context-menu/context-menu-separator.tsx","../../src/components/context-menu/context-menu-shortcut.tsx","../../src/components/context-menu/context-menu-submenu.tsx","../../src/components/context-menu/context-menu-submenu-trigger.tsx","../../src/components/context-menu/context-menu-trigger.tsx","../../src/components/context-menu/index.ts"],"sourcesContent":["import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport type { ContextMenuProps } from './context-menu.types'\n\nexport function ContextMenu({ ...props }: ContextMenuProps) {\n return <BaseContextMenu.Root {...props} />\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport { Icon } from '../icon'\nimport type { ContextMenuCheckboxItemProps } from './context-menu.types'\n\nexport function ContextMenuCheckboxItem({\n className,\n children,\n ref,\n ...props\n}: ContextMenuCheckboxItemProps) {\n return (\n <BaseContextMenu.CheckboxItem\n className={cn(\n 'relative z-0 grid cursor-default grid-cols-[1fr_2rem] items-center px-xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:content-[\"\"] hover:cursor-pointer data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high',\n className,\n )}\n ref={ref}\n {...props}\n >\n <span className=\"col-start-1\">{children}</span>\n <BaseContextMenu.CheckboxItemIndicator className=\"col-start-2 flex items-center justify-center place-self-end self-center\">\n <Icon name=\"selected\" className=\"size-sm\" />\n </BaseContextMenu.CheckboxItemIndicator>\n </BaseContextMenu.CheckboxItem>\n )\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport type { ContextMenuGroupProps } from './context-menu.types'\n\nexport function ContextMenuGroup({ className, ref, ...props }: ContextMenuGroupProps) {\n return <BaseContextMenu.Group className={cn('', className)} ref={ref} {...props} />\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport type { ContextMenuGroupLabelProps } from './context-menu.types'\n\nexport function ContextMenuGroupLabel({ className, ref, ...props }: ContextMenuGroupLabelProps) {\n return (\n <BaseContextMenu.GroupLabel\n className={cn(\n 'cursor-default px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none',\n className,\n )}\n ref={ref}\n {...props}\n />\n )\n}\n","import type { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\nimport { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { menuItemToneClasses, menuSubmenuToneClasses } from '../menu/menu-tone'\n\ntype ContextMenuProps = React.ComponentProps<typeof BaseContextMenu.Root>\ntype ContextMenuTriggerProps = React.ComponentProps<typeof BaseContextMenu.Trigger>\ntype ContextMenuPopupProps = React.ComponentProps<typeof BaseContextMenu.Popup>\ntype ContextMenuSeparatorProps = React.ComponentProps<typeof BaseContextMenu.Separator>\ntype ContextMenuSubmenuProps = React.ComponentProps<typeof BaseContextMenu.SubmenuRoot>\ntype ContextMenuShortcutProps = React.ComponentProps<'div'>\ntype ContextMenuGroupProps = React.ComponentProps<typeof BaseContextMenu.Group>\ntype ContextMenuGroupLabelProps = React.ComponentProps<typeof BaseContextMenu.GroupLabel>\ntype ContextMenuCheckboxItemProps = React.ComponentProps<typeof BaseContextMenu.CheckboxItem> &\n VariantProps<typeof contextMenuItemVariants>\ntype ContextMenuRadioItemProps = React.ComponentProps<typeof BaseContextMenu.RadioItem> &\n VariantProps<typeof contextMenuItemVariants>\ntype ContextMenuRadioGroupProps = React.ComponentProps<typeof BaseContextMenu.RadioGroup>\n\nconst contextMenuItemVariants = cva(\n 'relative z-0 flex cursor-default items-center px-xs py-3xs style-text-default-0 transition-colors duration-100 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:duration-100 before:content-[\"\"] hover:cursor-pointer',\n {\n defaultVariants: {\n tone: 'neutral',\n },\n variants: {\n tone: menuItemToneClasses,\n },\n },\n ),\n contextMenuSubmenuTriggerVariants = cva(\n 'relative z-0 flex cursor-default items-center px-xs py-3xs style-text-default-0 transition-colors duration-100 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:transition-colors before:duration-100 before:content-[\"\"] hover:cursor-pointer',\n {\n defaultVariants: {\n tone: 'neutral',\n },\n variants: {\n tone: menuSubmenuToneClasses,\n },\n },\n )\n\ntype ContextMenuItemProps = React.ComponentProps<typeof BaseContextMenu.Item> &\n VariantProps<typeof contextMenuItemVariants>\n\ntype ContextMenuSubmenuTriggerProps = React.ComponentProps<typeof BaseContextMenu.SubmenuTrigger> &\n VariantProps<typeof contextMenuSubmenuTriggerVariants>\n\nexport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n ContextMenuPopupProps,\n ContextMenuSeparatorProps,\n ContextMenuSubmenuProps,\n ContextMenuShortcutProps,\n ContextMenuGroupProps,\n ContextMenuGroupLabelProps,\n ContextMenuCheckboxItemProps,\n ContextMenuRadioItemProps,\n ContextMenuRadioGroupProps,\n ContextMenuItemProps,\n ContextMenuSubmenuTriggerProps,\n}\nexport { contextMenuItemVariants, contextMenuSubmenuTriggerVariants }\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport { contextMenuItemVariants } from './context-menu.types'\nimport type { ContextMenuItemProps } from './context-menu.types'\n\nexport function ContextMenuItem({\n className,\n tone,\n children,\n ref,\n ...props\n}: ContextMenuItemProps) {\n return (\n <BaseContextMenu.Item\n className={cn(contextMenuItemVariants({ tone }), className)}\n nativeButton\n ref={ref}\n render={(renderProps) => (\n <button\n type=\"button\"\n {...renderProps}\n className={cn('w-full gap-2xs [&>svg]:size-sm', renderProps.className)}\n >\n {children}\n </button>\n )}\n {...props}\n />\n )\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport type { ContextMenuPopupProps } from './context-menu.types'\n\nexport function ContextMenuPopup({ className, ref, ...props }: ContextMenuPopupProps) {\n return (\n <BaseContextMenu.Portal>\n <BaseContextMenu.Positioner className=\"z-99\">\n <BaseContextMenu.Popup\n className={cn(\n 'flex w-[calc(100%+var(--spacing-xl))] origin-(--transform-origin) translate-x-[-calc(var(--spacing-xl)/2)] flex-col gap-3xs rounded-xl bg-surface-2 p-3xs py-2xs shadow-md transition-[transform,scale,opacity] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0',\n className,\n )}\n ref={ref}\n {...props}\n />\n </BaseContextMenu.Positioner>\n </BaseContextMenu.Portal>\n )\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport type { ContextMenuRadioGroupProps } from './context-menu.types'\n\nexport function ContextMenuRadioGroup({ className, ref, ...props }: ContextMenuRadioGroupProps) {\n return <BaseContextMenu.RadioGroup className={cn('', className)} ref={ref} {...props} />\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport { Icon } from '../icon'\nimport type { ContextMenuRadioItemProps } from './context-menu.types'\n\nexport function ContextMenuRadioItem({\n className,\n children,\n ref,\n ...props\n}: ContextMenuRadioItemProps) {\n return (\n <BaseContextMenu.RadioItem\n className={cn(\n 'relative z-0 grid cursor-default grid-cols-[1fr_2rem] items-center px-xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-x-3xs before:inset-y-[0px] before:z-[-1] before:rounded-md before:bg-transparent before:content-[\"\"] hover:cursor-pointer data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high',\n className,\n )}\n ref={ref}\n {...props}\n >\n <span className=\"col-start-1 min-w-3xl\">{children}</span>\n <BaseContextMenu.RadioItemIndicator className=\"col-start-2 flex items-center justify-center place-self-end self-center\">\n <Icon name=\"selected\" className=\"size-sm\" />\n </BaseContextMenu.RadioItemIndicator>\n </BaseContextMenu.RadioItem>\n )\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport type { ContextMenuSeparatorProps } from './context-menu.types'\n\nexport function ContextMenuSeparator({ className, ref, ...props }: ContextMenuSeparatorProps) {\n return (\n <BaseContextMenu.Separator\n className={cn('mx-2xs my-3xs h-px bg-border-strong', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport type { ContextMenuShortcutProps } from './context-menu.types'\n\nexport function ContextMenuShortcut({ className, ref, ...props }: ContextMenuShortcutProps) {\n return (\n <div\n className={cn('ml-auto inline-flex items-center gap-3xs', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport type { ContextMenuSubmenuProps } from './context-menu.types'\n\nexport function ContextMenuSubmenu({ ...props }: ContextMenuSubmenuProps) {\n return <BaseContextMenu.SubmenuRoot {...props} />\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport { Icon } from '../icon'\nimport { contextMenuSubmenuTriggerVariants } from './context-menu.types'\nimport type { ContextMenuSubmenuTriggerProps } from './context-menu.types'\n\nexport function ContextMenuSubmenuTrigger({\n className,\n children,\n ref,\n tone,\n ...props\n}: ContextMenuSubmenuTriggerProps) {\n return (\n <BaseContextMenu.SubmenuTrigger\n className={cn(contextMenuSubmenuTriggerVariants({ tone }), className)}\n ref={ref}\n {...props}\n >\n <span className=\"flex min-w-3xl items-center gap-2xs pr-2xl\">{children}</span>\n <Icon name=\"chevronRight\" className=\"ml-auto size-xs shrink-0 self-center\" />\n </BaseContextMenu.SubmenuTrigger>\n )\n}\n","import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\n\nimport { cn } from '@/utils/cn'\n\nimport type { ContextMenuTriggerProps } from './context-menu.types'\n\nexport function ContextMenuTrigger({ className, ref, ...props }: ContextMenuTriggerProps) {\n return (\n <BaseContextMenu.Trigger\n className={cn('flex min-w-0 flex-1', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { ContextMenu as ContextMenuRoot } from './context-menu'\nimport { ContextMenuCheckboxItem } from './context-menu-checkbox-item'\nimport { ContextMenuGroup } from './context-menu-group'\nimport { ContextMenuGroupLabel } from './context-menu-group-label'\nimport { ContextMenuItem } from './context-menu-item'\nimport { ContextMenuPopup } from './context-menu-popup'\nimport { ContextMenuRadioGroup } from './context-menu-radio-group'\nimport { ContextMenuRadioItem } from './context-menu-radio-item'\nimport { ContextMenuSeparator } from './context-menu-separator'\nimport { ContextMenuShortcut } from './context-menu-shortcut'\nimport { ContextMenuSubmenu } from './context-menu-submenu'\nimport { ContextMenuSubmenuTrigger } from './context-menu-submenu-trigger'\nimport { ContextMenuTrigger } from './context-menu-trigger'\n\nconst ContextMenu = Object.assign(ContextMenuRoot, {\n CheckboxItem: ContextMenuCheckboxItem,\n Group: ContextMenuGroup,\n GroupLabel: ContextMenuGroupLabel,\n Item: ContextMenuItem,\n Popup: ContextMenuPopup,\n RadioGroup: ContextMenuRadioGroup,\n RadioItem: ContextMenuRadioItem,\n Separator: ContextMenuSeparator,\n Shortcut: ContextMenuShortcut,\n Submenu: ContextMenuSubmenu,\n SubmenuTrigger: ContextMenuSubmenuTrigger,\n Trigger: ContextMenuTrigger,\n})\n\nexport type {\n ContextMenuCheckboxItemProps,\n ContextMenuGroupLabelProps,\n ContextMenuGroupProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuShortcutProps,\n ContextMenuItemProps,\n ContextMenuPopupProps,\n ContextMenuProps,\n ContextMenuSeparatorProps,\n ContextMenuSubmenuProps,\n ContextMenuSubmenuTriggerProps,\n ContextMenuTriggerProps,\n} from './context-menu.types'\nexport { ContextMenuCheckboxItem } from './context-menu-checkbox-item'\nexport { ContextMenuGroup } from './context-menu-group'\nexport { ContextMenuGroupLabel } from './context-menu-group-label'\nexport { ContextMenuRadioGroup } from './context-menu-radio-group'\nexport { ContextMenuRadioItem } from './context-menu-radio-item'\nexport { ContextMenuShortcut } from './context-menu-shortcut'\nexport { ContextMenuItem } from './context-menu-item'\nexport { ContextMenuPopup } from './context-menu-popup'\nexport { ContextMenuSeparator } from './context-menu-separator'\nexport { ContextMenuSubmenu } from './context-menu-submenu'\nexport { ContextMenuSubmenuTrigger } from './context-menu-submenu-trigger'\nexport { ContextMenuTrigger } from './context-menu-trigger'\n\nexport { ContextMenu }\n"],"mappings":";;;;;;;AAIA,SAAgBA,cAAY,EAAE,GAAG,SAA2B;CAC1D,OAAO,oBAACC,cAAgB,MAAjB,EAAsB,GAAI,MAAQ,CAAA;AAC3C;;ACCA,SAAgB,wBAAwB,EACtC,WACA,UACA,KACA,GAAG,SAC4B;CAC/B,OACE,qBAACC,cAAgB,cAAjB;EACE,WAAW,GACT,uXACA,SACF;EACK;EACL,GAAI;EANN,UAAA,CAQE,oBAAC,QAAD;GAAM,WAAU;GAAe;EAAe,CAAA,GAC9C,oBAACA,cAAgB,uBAAjB;GAAuC,WAAU;GAC/C,UAAA,oBAAC,MAAD;IAAM,MAAK;IAAW,WAAU;GAAW,CAAA;EACN,CAAA,CACX;;AAElC;;ACtBA,SAAgB,iBAAiB,EAAE,WAAW,KAAK,GAAG,SAAgC;CACpF,OAAO,oBAACC,cAAgB,OAAjB;EAAuB,WAAW,GAAG,IAAI,SAAS;EAAQ;EAAK,GAAI;CAAQ,CAAA;AACpF;;ACFA,SAAgB,sBAAsB,EAAE,WAAW,KAAK,GAAG,SAAqC;CAC9F,OACE,oBAACC,cAAgB,YAAjB;EACE,WAAW,GACT,0FACA,SACF;EACK;EACL,GAAI;CACL,CAAA;AAEL;;ACGA,MAAM,0BAA0B,IAC5B,iVACA;CACE,iBAAiB,EACf,MAAM,UACR;CACA,UAAU,EACR,MAAM,oBACR;AACF,CACF;AACA,MAAA,oCAAoC,IAClC,iVACA;CACE,iBAAiB,EACf,MAAM,UACR;CACA,UAAU,EACR,MAAM,uBACR;AACF,CACF;;AClCF,SAAgB,gBAAgB,EAC9B,WACA,MACA,UACA,KACA,GAAG,SACoB;CACvB,OACE,oBAACC,cAAgB,MAAjB;EACE,WAAW,GAAG,wBAAwB,EAAE,KAAK,CAAC,GAAG,SAAS;EAC1D,cAAA;EACK;EACL,SAAS,gBACP,oBAAC,UAAD;GACE,MAAK;GACL,GAAI;GACJ,WAAW,GAAG,kCAAkC,YAAY,SAAS;GAEpE;EACK,CAAA;EAEV,GAAI;CACL,CAAA;AAEL;;ACzBA,SAAgB,iBAAiB,EAAE,WAAW,KAAK,GAAG,SAAgC;CACpF,OACE,oBAACC,cAAgB,QAAjB,EAAA,UACE,oBAACA,cAAgB,YAAjB;EAA4B,WAAU;EACpC,UAAA,oBAACA,cAAgB,OAAjB;GACE,WAAW,GACT,kVACA,SACF;GACK;GACL,GAAI;EACL,CAAA;CACyB,CAAA,EACN,CAAA;AAE5B;;ACfA,SAAgB,sBAAsB,EAAE,WAAW,KAAK,GAAG,SAAqC;CAC9F,OAAO,oBAACC,cAAgB,YAAjB;EAA4B,WAAW,GAAG,IAAI,SAAS;EAAQ;EAAK,GAAI;CAAQ,CAAA;AACzF;;ACDA,SAAgB,qBAAqB,EACnC,WACA,UACA,KACA,GAAG,SACyB;CAC5B,OACE,qBAACC,cAAgB,WAAjB;EACE,WAAW,GACT,uXACA,SACF;EACK;EACL,GAAI;EANN,UAAA,CAQE,oBAAC,QAAD;GAAM,WAAU;GAAyB;EAAe,CAAA,GACxD,oBAACA,cAAgB,oBAAjB;GAAoC,WAAU;GAC5C,UAAA,oBAAC,MAAD;IAAM,MAAK;IAAW,WAAU;GAAW,CAAA;EACT,CAAA,CACX;;AAE/B;;ACtBA,SAAgB,qBAAqB,EAAE,WAAW,KAAK,GAAG,SAAoC;CAC5F,OACE,oBAACC,cAAgB,WAAjB;EACE,WAAW,GAAG,uCAAuC,SAAS;EACzD;EACL,GAAI;CACL,CAAA;AAEL;;ACVA,SAAgB,oBAAoB,EAAE,WAAW,KAAK,GAAG,SAAmC;CAC1F,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,4CAA4C,SAAS;EAC9D;EACL,GAAI;CACL,CAAA;AAEL;;ACRA,SAAgB,mBAAmB,EAAE,GAAG,SAAkC;CACxE,OAAO,oBAACC,cAAgB,aAAjB,EAA6B,GAAI,MAAQ,CAAA;AAClD;;ACEA,SAAgB,0BAA0B,EACxC,WACA,UACA,KACA,MACA,GAAG,SAC8B;CACjC,OACE,qBAACC,cAAgB,gBAAjB;EACE,WAAW,GAAG,kCAAkC,EAAE,KAAK,CAAC,GAAG,SAAS;EAC/D;EACL,GAAI;EAHN,UAAA,CAKE,oBAAC,QAAD;GAAM,WAAU;GAA8C;EAAe,CAAA,GAC7E,oBAAC,MAAD;GAAM,MAAK;GAAe,WAAU;EAAwC,CAAA,CAC9C;;AAEpC;;ACnBA,SAAgB,mBAAmB,EAAE,WAAW,KAAK,GAAG,SAAkC;CACxF,OACE,oBAACC,cAAgB,SAAjB;EACE,WAAW,GAAG,uBAAuB,SAAS;EACzC;EACL,GAAI;CACL,CAAA;AAEL;;ACAA,MAAM,cAAc,OAAO,OAAOC,eAAiB;CACjD,cAAc;CACd,OAAO;CACP,YAAY;CACZ,MAAM;CACN,OAAO;CACP,YAAY;CACZ,WAAW;CACX,WAAW;CACX,UAAU;CACV,SAAS;CACT,gBAAgB;CAChB,SAAS;AACX,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
3
|
+
type DialogProps = ComponentProps<typeof Dialog$1.Root>;
|
|
4
|
+
type DialogTriggerProps = ComponentProps<typeof Dialog$1.Trigger>;
|
|
5
|
+
type DialogPopupProps = ComponentProps<typeof Dialog$1.Popup>;
|
|
6
|
+
type DialogTitleProps = ComponentProps<typeof Dialog$1.Title>;
|
|
7
|
+
type DialogDescriptionProps = ComponentProps<typeof Dialog$1.Description>;
|
|
8
|
+
type DialogCloseProps = ComponentProps<typeof Dialog$1.Close>;
|
|
9
|
+
type DialogContentProps = React.ComponentProps<'div'>;
|
|
10
|
+
type DialogHeaderProps = React.ComponentProps<'div'>;
|
|
11
|
+
type DialogFooterProps = React.ComponentProps<'div'>;
|
|
12
|
+
type DialogIconProps = React.ComponentProps<'div'>;
|
|
13
|
+
declare const DialogHelper: typeof Dialog$1;
|
|
14
|
+
declare function Dialog$2({ ...props }: DialogProps): import("react").JSX.Element;
|
|
15
|
+
export declare function DialogClose({ className, children, ref, ...props }: DialogCloseProps): import("react").JSX.Element;
|
|
16
|
+
export declare function DialogContent({ className, ref, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
17
|
+
export declare function DialogDescription({ className, ref, ...props }: DialogDescriptionProps): import("react").JSX.Element;
|
|
18
|
+
export declare function DialogFooter({ className, ref, ...props }: DialogFooterProps): import("react").JSX.Element;
|
|
19
|
+
export declare function DialogHeader({ className, ref, ...props }: DialogHeaderProps): import("react").JSX.Element;
|
|
20
|
+
export declare function DialogIcon({ className, ref, ...props }: DialogIconProps): import("react").JSX.Element;
|
|
21
|
+
export declare function DialogPopup({ className, children, ref, ...props }: DialogPopupProps): import("react").JSX.Element;
|
|
22
|
+
export declare function DialogTitle({ className, ref, ...props }: DialogTitleProps): import("react").JSX.Element;
|
|
23
|
+
export declare function DialogTrigger({ className, children, ref, ...props }: DialogTriggerProps): import("react").JSX.Element;
|
|
24
|
+
declare const Dialog: typeof Dialog$2 & {
|
|
25
|
+
Close: typeof DialogClose;
|
|
26
|
+
Content: typeof DialogContent;
|
|
27
|
+
Description: typeof DialogDescription;
|
|
28
|
+
Footer: typeof DialogFooter;
|
|
29
|
+
Header: typeof DialogHeader;
|
|
30
|
+
Icon: typeof DialogIcon;
|
|
31
|
+
Popup: typeof DialogPopup;
|
|
32
|
+
Title: typeof DialogTitle;
|
|
33
|
+
Trigger: typeof DialogTrigger;
|
|
34
|
+
};
|
|
35
|
+
export { Dialog, type DialogCloseProps, type DialogDescriptionProps, type DialogFooterProps, type DialogHeaderProps, DialogHelper, type DialogIconProps, type DialogPopupProps, type DialogProps, type DialogTitleProps, type DialogTriggerProps };
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { t as cn } from "../cn-BDi0DfT5.js";
|
|
2
|
+
import { n as Icon } from "../icon-D3JWfCa2.js";
|
|
3
|
+
import { t as Button } from "../button-BpUC-R1J.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { isValidElement } from "react";
|
|
6
|
+
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
7
|
+
// src/components/dialog/dialog.tsx
|
|
8
|
+
function Dialog$2({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Dialog$1.Root, { ...props });
|
|
10
|
+
}
|
|
11
|
+
// src/components/dialog/dialog-close.tsx
|
|
12
|
+
function DialogClose({ className, children, ref, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
14
|
+
className: cn("absolute top-xs right-xs", className),
|
|
15
|
+
ref,
|
|
16
|
+
...props,
|
|
17
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
18
|
+
"aria-label": "Close",
|
|
19
|
+
variant: "ghost",
|
|
20
|
+
size: "extraSmall",
|
|
21
|
+
tone: "error",
|
|
22
|
+
children: children ?? /* @__PURE__ */ jsx(Icon, { name: "close" })
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
// src/components/dialog/dialog-content.tsx
|
|
27
|
+
function DialogContent({ className, ref, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
className: cn("flex h-full flex-col gap-sm", className),
|
|
30
|
+
ref,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
// src/components/dialog/dialog-description.tsx
|
|
35
|
+
function DialogDescription({ className, ref, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsx(Dialog$1.Description, {
|
|
37
|
+
"data-slot": "dialog-description",
|
|
38
|
+
className: cn("style-text-prose-0 text-on-surface-variant", className),
|
|
39
|
+
ref,
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// src/components/dialog/dialog-footer.tsx
|
|
44
|
+
function DialogFooter({ className, ref, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: cn("flex w-full items-center justify-end gap-2xs", className),
|
|
47
|
+
ref,
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
// src/components/dialog/dialog-header.tsx
|
|
52
|
+
function DialogHeader({ className, ref, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: cn("grid auto-rows-min items-center gap-x-sm has-data-[slot=dialog-description]:grid-rows-[auto_auto] has-data-[slot=dialog-icon]:grid-cols-[auto_1fr] has-data-[slot=dialog-description]:**:data-[slot=dialog-icon]:row-span-2", className),
|
|
55
|
+
ref,
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// src/components/dialog/dialog-icon.tsx
|
|
60
|
+
function DialogIcon({ className, ref, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx("div", {
|
|
62
|
+
"data-slot": "dialog-icon",
|
|
63
|
+
className: cn("row-span-2 self-start [&>svg]:size-xl [&>svg]:shrink-0", className),
|
|
64
|
+
ref,
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
// src/components/dialog/dialog-popup.tsx
|
|
69
|
+
function DialogPopup({ className, children, ref, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [/* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
71
|
+
className: "fixed inset-[0px] z-998 min-h-dvh transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute",
|
|
72
|
+
style: {
|
|
73
|
+
WebkitBackdropFilter: "blur(16px)",
|
|
74
|
+
backdropFilter: "blur(16px)"
|
|
75
|
+
}
|
|
76
|
+
}), /* @__PURE__ */ jsx(Dialog$1.Popup, {
|
|
77
|
+
className: cn("fixed top-1/2 left-1/2 z-999 flex max-w-[calc(100vw-3rem)] min-w-1/6 -translate-1/2 flex-col gap-sm overflow-hidden rounded-3xl bg-surface-2 px-lg py-md shadow-lg transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0", className),
|
|
78
|
+
ref,
|
|
79
|
+
...props,
|
|
80
|
+
children
|
|
81
|
+
})] });
|
|
82
|
+
}
|
|
83
|
+
// src/components/dialog/dialog-title.tsx
|
|
84
|
+
function DialogTitle({ className, ref, ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
86
|
+
"data-slot": "dialog-title",
|
|
87
|
+
className: cn("style-text-strong-1", className),
|
|
88
|
+
ref,
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
// src/components/dialog/dialog-trigger.tsx
|
|
93
|
+
function DialogTrigger({ className, children, ref, ...props }) {
|
|
94
|
+
let render = void 0;
|
|
95
|
+
if (isValidElement(children)) render = children;
|
|
96
|
+
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
97
|
+
className: cn("", className),
|
|
98
|
+
ref,
|
|
99
|
+
...props,
|
|
100
|
+
render
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
// src/components/dialog/dialog.types.ts
|
|
104
|
+
const DialogHelper = Dialog$1;
|
|
105
|
+
// src/components/dialog/index.ts
|
|
106
|
+
const Dialog = Object.assign(Dialog$2, {
|
|
107
|
+
Close: DialogClose,
|
|
108
|
+
Content: DialogContent,
|
|
109
|
+
Description: DialogDescription,
|
|
110
|
+
Footer: DialogFooter,
|
|
111
|
+
Header: DialogHeader,
|
|
112
|
+
Icon: DialogIcon,
|
|
113
|
+
Popup: DialogPopup,
|
|
114
|
+
Title: DialogTitle,
|
|
115
|
+
Trigger: DialogTrigger
|
|
116
|
+
});
|
|
117
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHelper, DialogIcon, DialogPopup, DialogTitle, DialogTrigger };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Dialog","BaseDialog","BaseDialog","BaseDialog","BaseDialog","BaseDialog","BaseDialog","BaseDialog","DialogRoot"],"sources":["../../src/components/dialog/dialog.tsx","../../src/components/dialog/dialog-close.tsx","../../src/components/dialog/dialog-content.tsx","../../src/components/dialog/dialog-description.tsx","../../src/components/dialog/dialog-footer.tsx","../../src/components/dialog/dialog-header.tsx","../../src/components/dialog/dialog-icon.tsx","../../src/components/dialog/dialog-popup.tsx","../../src/components/dialog/dialog-title.tsx","../../src/components/dialog/dialog-trigger.tsx","../../src/components/dialog/dialog.types.ts","../../src/components/dialog/index.ts"],"sourcesContent":["import { Dialog as BaseDialog } from '@base-ui/react/dialog'\n\nimport type { DialogProps } from './dialog.types'\n\nexport function Dialog({ ...props }: DialogProps) {\n return <BaseDialog.Root {...props} />\n}\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog'\n\nimport { cn } from '@/utils/cn'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport type { DialogCloseProps } from './dialog.types'\n\nexport function DialogClose({ className, children, ref, ...props }: DialogCloseProps) {\n return (\n <BaseDialog.Close\n className={cn('absolute top-xs right-xs', className)}\n ref={ref}\n {...props}\n render={\n <Button aria-label=\"Close\" variant=\"ghost\" size=\"extraSmall\" tone=\"error\">\n {children ?? <Icon name=\"close\" />}\n </Button>\n }\n />\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport type { DialogContentProps } from './dialog.types'\n\nexport function DialogContent({ className, ref, ...props }: DialogContentProps) {\n return <div className={cn('flex h-full flex-col gap-sm', className)} ref={ref} {...props} />\n}\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DialogDescriptionProps } from './dialog.types'\n\nexport function DialogDescription({ className, ref, ...props }: DialogDescriptionProps) {\n return (\n <BaseDialog.Description\n data-slot=\"dialog-description\"\n className={cn('style-text-prose-0 text-on-surface-variant', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport type { DialogFooterProps } from './dialog.types'\n\nexport function DialogFooter({ className, ref, ...props }: DialogFooterProps) {\n return (\n <div\n className={cn('flex w-full items-center justify-end gap-2xs', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport type { DialogHeaderProps } from './dialog.types'\n\nexport function DialogHeader({ className, ref, ...props }: DialogHeaderProps) {\n return (\n <div\n className={cn(\n 'grid auto-rows-min items-center gap-x-sm has-data-[slot=dialog-description]:grid-rows-[auto_auto] has-data-[slot=dialog-icon]:grid-cols-[auto_1fr] has-data-[slot=dialog-description]:**:data-[slot=dialog-icon]:row-span-2',\n className,\n )}\n ref={ref}\n {...props}\n />\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport type { DialogIconProps } from './dialog.types'\n\nexport function DialogIcon({ className, ref, ...props }: DialogIconProps) {\n return (\n <div\n data-slot=\"dialog-icon\"\n className={cn('row-span-2 self-start [&>svg]:size-xl [&>svg]:shrink-0', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DialogPopupProps } from './dialog.types'\n\nexport function DialogPopup({ className, children, ref, ...props }: DialogPopupProps) {\n return (\n <BaseDialog.Portal>\n <BaseDialog.Backdrop\n className=\"fixed inset-[0px] z-998 min-h-dvh transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute\"\n style={{ WebkitBackdropFilter: 'blur(16px)', backdropFilter: 'blur(16px)' }}\n />\n <BaseDialog.Popup\n className={cn(\n 'fixed top-1/2 left-1/2 z-999 flex max-w-[calc(100vw-3rem)] min-w-1/6 -translate-1/2 flex-col gap-sm overflow-hidden rounded-3xl bg-surface-2 px-lg py-md shadow-lg transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0',\n className,\n )}\n ref={ref}\n {...props}\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Portal>\n )\n}\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DialogTitleProps } from './dialog.types'\n\nexport function DialogTitle({ className, ref, ...props }: DialogTitleProps) {\n return (\n <BaseDialog.Title\n data-slot=\"dialog-title\"\n className={cn('style-text-strong-1', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog'\nimport { isValidElement } from 'react'\nimport type { ReactElement } from 'react'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DialogTriggerProps } from './dialog.types'\n\nexport function DialogTrigger({ className, children, ref, ...props }: DialogTriggerProps) {\n let render: ReactElement | undefined = undefined\n if (isValidElement(children)) {\n render = children\n }\n\n return <BaseDialog.Trigger className={cn('', className)} ref={ref} {...props} render={render} />\n}\n","import { Dialog as BaseDialog } from '@base-ui/react/dialog'\nimport type { ComponentProps } from 'react'\n\ntype DialogProps = ComponentProps<typeof BaseDialog.Root>\n\ntype DialogTriggerProps = ComponentProps<typeof BaseDialog.Trigger>\n\ntype DialogPopupProps = ComponentProps<typeof BaseDialog.Popup>\n\ntype DialogTitleProps = ComponentProps<typeof BaseDialog.Title>\n\ntype DialogDescriptionProps = ComponentProps<typeof BaseDialog.Description>\n\ntype DialogCloseProps = ComponentProps<typeof BaseDialog.Close>\ntype DialogContentProps = React.ComponentProps<'div'>\ntype DialogHeaderProps = React.ComponentProps<'div'>\ntype DialogFooterProps = React.ComponentProps<'div'>\ntype DialogIconProps = React.ComponentProps<'div'>\nconst DialogHelper = BaseDialog\n\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPopupProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n DialogContentProps,\n DialogHeaderProps,\n DialogFooterProps,\n DialogIconProps,\n}\nexport { DialogHelper }\n","import { Dialog as DialogRoot } from './dialog'\nimport { DialogClose } from './dialog-close'\nimport { DialogContent } from './dialog-content'\nimport { DialogDescription } from './dialog-description'\nimport { DialogFooter } from './dialog-footer'\nimport { DialogHeader } from './dialog-header'\nimport { DialogIcon } from './dialog-icon'\nimport { DialogPopup } from './dialog-popup'\nimport { DialogTitle } from './dialog-title'\nimport { DialogTrigger } from './dialog-trigger'\n\nconst Dialog = Object.assign(DialogRoot, {\n Close: DialogClose,\n Content: DialogContent,\n Description: DialogDescription,\n Footer: DialogFooter,\n Header: DialogHeader,\n Icon: DialogIcon,\n Popup: DialogPopup,\n Title: DialogTitle,\n Trigger: DialogTrigger,\n})\n\nexport type {\n DialogCloseProps,\n DialogDescriptionProps,\n DialogFooterProps,\n DialogHeaderProps,\n DialogIconProps,\n DialogPopupProps,\n DialogProps,\n DialogTitleProps,\n DialogTriggerProps,\n} from './dialog.types'\nexport { DialogClose } from './dialog-close'\nexport { DialogContent } from './dialog-content'\nexport { DialogDescription } from './dialog-description'\nexport { DialogFooter } from './dialog-footer'\nexport { DialogHeader } from './dialog-header'\nexport { DialogIcon } from './dialog-icon'\nexport { DialogPopup } from './dialog-popup'\nexport { DialogTitle } from './dialog-title'\nexport { DialogTrigger } from './dialog-trigger'\nexport { DialogHelper } from './dialog.types'\n\nexport { Dialog }\n"],"mappings":";;;;;;;AAIA,SAAgBA,SAAO,EAAE,GAAG,SAAsB;CAChD,OAAO,oBAACC,SAAW,MAAZ,EAAiB,GAAI,MAAQ,CAAA;AACtC;;ACEA,SAAgB,YAAY,EAAE,WAAW,UAAU,KAAK,GAAG,SAA2B;CACpF,OACE,oBAACC,SAAW,OAAZ;EACE,WAAW,GAAG,4BAA4B,SAAS;EAC9C;EACL,GAAI;EACJ,QACE,oBAAC,QAAD;GAAQ,cAAW;GAAQ,SAAQ;GAAQ,MAAK;GAAa,MAAK;GAC/D,UAAA,YAAY,oBAAC,MAAD,EAAM,MAAK,QAAS,CAAA;EAC3B,CAAA;CAEX,CAAA;AAEL;;ACjBA,SAAgB,cAAc,EAAE,WAAW,KAAK,GAAG,SAA6B;CAC9E,OAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,+BAA+B,SAAS;EAAQ;EAAK,GAAI;CAAQ,CAAA;AAC7F;;ACAA,SAAgB,kBAAkB,EAAE,WAAW,KAAK,GAAG,SAAiC;CACtF,OACE,oBAACC,SAAW,aAAZ;EACE,aAAU;EACV,WAAW,GAAG,8CAA8C,SAAS;EAChE;EACL,GAAI;CACL,CAAA;AAEL;;ACXA,SAAgB,aAAa,EAAE,WAAW,KAAK,GAAG,SAA4B;CAC5E,OACE,oBAAC,OAAD;EACE,WAAW,GAAG,gDAAgD,SAAS;EAClE;EACL,GAAI;CACL,CAAA;AAEL;;ACRA,SAAgB,aAAa,EAAE,WAAW,KAAK,GAAG,SAA4B;CAC5E,OACE,oBAAC,OAAD;EACE,WAAW,GACT,+NACA,SACF;EACK;EACL,GAAI;CACL,CAAA;AAEL;;ACXA,SAAgB,WAAW,EAAE,WAAW,KAAK,GAAG,SAA0B;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,0DAA0D,SAAS;EAC5E;EACL,GAAI;CACL,CAAA;AAEL;;ACPA,SAAgB,YAAY,EAAE,WAAW,UAAU,KAAK,GAAG,SAA2B;CACpF,OACE,qBAACC,SAAW,QAAZ,EAAA,UAAA,CACE,oBAACA,SAAW,UAAZ;EACE,WAAU;EACV,OAAO;GAAE,sBAAsB;GAAc,gBAAgB;EAAa;CAC3E,CAAA,GACD,oBAACA,SAAW,OAAZ;EACE,WAAW,GACT,oTACA,SACF;EACK;EACL,GAAI;EAEH;CACe,CAAA,CACD,EAAA,CAAA;AAEvB;;ACnBA,SAAgB,YAAY,EAAE,WAAW,KAAK,GAAG,SAA2B;CAC1E,OACE,oBAACC,SAAW,OAAZ;EACE,aAAU;EACV,WAAW,GAAG,uBAAuB,SAAS;EACzC;EACL,GAAI;CACL,CAAA;AAEL;;ACPA,SAAgB,cAAc,EAAE,WAAW,UAAU,KAAK,GAAG,SAA6B;CACxF,IAAI,SAAmC,KAAA;CACvC,IAAI,eAAe,QAAQ,GACzB,SAAS;CAGX,OAAO,oBAACC,SAAW,SAAZ;EAAoB,WAAW,GAAG,IAAI,SAAS;EAAQ;EAAK,GAAI;EAAe;CAAS,CAAA;AACjG;;ACGA,MAAM,eAAeC;;ACPrB,MAAM,SAAS,OAAO,OAAOC,UAAY;CACvC,OAAO;CACP,SAAS;CACT,aAAa;CACb,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,OAAO;CACP,OAAO;CACP,SAAS;AACX,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Drawer as Drawer$1 } from "@base-ui/react";
|
|
2
|
+
type DrawerProps = Drawer$1.Root.Props;
|
|
3
|
+
type DrawerProviderProps = Drawer$1.Provider.Props;
|
|
4
|
+
type DrawerTriggerProps = Drawer$1.Trigger.Props;
|
|
5
|
+
type DrawerPopupProps = Drawer$1.Popup.Props;
|
|
6
|
+
type DrawerContentProps = Drawer$1.Content.Props;
|
|
7
|
+
type DrawerTitleProps = Drawer$1.Title.Props;
|
|
8
|
+
type DrawerDescriptionProps = Drawer$1.Description.Props;
|
|
9
|
+
type DrawerCloseProps = Drawer$1.Close.Props;
|
|
10
|
+
type DrawerHeaderProps = React.ComponentProps<'div'>;
|
|
11
|
+
declare function Drawer$2({ ...props }: DrawerProps): import("react").JSX.Element;
|
|
12
|
+
export declare function DrawerClose({ className, ref, ...props }: DrawerCloseProps): import("react").JSX.Element;
|
|
13
|
+
export declare function DrawerContent({ className, ref, ...props }: DrawerContentProps): import("react").JSX.Element;
|
|
14
|
+
export declare function DrawerDescription({ className, ref, ...props }: DrawerDescriptionProps): import("react").JSX.Element;
|
|
15
|
+
export declare function DrawerHeader({ className, ref, ...props }: DrawerHeaderProps): import("react").JSX.Element;
|
|
16
|
+
export declare function DrawerPopup({ className, children, ref, ...props }: DrawerPopupProps): import("react").JSX.Element;
|
|
17
|
+
export declare function DrawerProvider({ children, ...props }: DrawerProviderProps): import("react").JSX.Element;
|
|
18
|
+
export declare function DrawerTitle({ className, ref, ...props }: DrawerTitleProps): import("react").JSX.Element;
|
|
19
|
+
export declare function DrawerTrigger({ className, children, ref, ...props }: DrawerTriggerProps): import("react").JSX.Element;
|
|
20
|
+
declare const Drawer: typeof Drawer$2 & {
|
|
21
|
+
Close: typeof DrawerClose;
|
|
22
|
+
Content: typeof DrawerContent;
|
|
23
|
+
Description: typeof DrawerDescription;
|
|
24
|
+
Header: typeof DrawerHeader;
|
|
25
|
+
Popup: typeof DrawerPopup;
|
|
26
|
+
Provider: typeof DrawerProvider;
|
|
27
|
+
Title: typeof DrawerTitle;
|
|
28
|
+
Trigger: typeof DrawerTrigger;
|
|
29
|
+
};
|
|
30
|
+
export { Drawer, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerHeaderProps, type DrawerPopupProps, type DrawerProps, type DrawerProviderProps, type DrawerTitleProps, type DrawerTriggerProps };
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { t as cn } from "../cn-BDi0DfT5.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { isValidElement } from "react";
|
|
4
|
+
import { Drawer as Drawer$1 } from "@base-ui/react";
|
|
5
|
+
// src/components/drawer/drawer.tsx
|
|
6
|
+
function Drawer$2({ ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Drawer$1.Root, { ...props });
|
|
8
|
+
}
|
|
9
|
+
// src/components/drawer/drawer-close.tsx
|
|
10
|
+
function DrawerClose({ className, ref, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Drawer$1.Close, {
|
|
12
|
+
className: cn("shrink-0", className),
|
|
13
|
+
ref,
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
// src/components/drawer/drawer-content.tsx
|
|
18
|
+
function DrawerContent({ className, ref, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Drawer$1.Content, {
|
|
20
|
+
className: cn("mx-auto w-full max-w-[32rem] space-y-3xs", className),
|
|
21
|
+
ref,
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// src/components/drawer/drawer-description.tsx
|
|
26
|
+
function DrawerDescription({ className, ref, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Drawer$1.Description, {
|
|
28
|
+
className: cn("style-text-prose-0 text-on-surface-variant", className),
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
// src/components/drawer/drawer-header.tsx
|
|
34
|
+
function DrawerHeader({ className, ref, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: cn("flex items-start justify-between pb-sm", className),
|
|
37
|
+
ref,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// src/components/drawer/drawer-popup.tsx
|
|
42
|
+
const backdropClassName = "fixed inset-0 min-h-dvh bg-scrim opacity-[calc(var(--backdrop-opacity)*(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] [--backdrop-opacity:0.2] [--bleed:3rem] data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute dark:[--backdrop-opacity:0.7]";
|
|
43
|
+
const viewportClassName = cn("fixed inset-0 flex", "items-end justify-center", "has-[[data-swipe-direction=up]]:items-start has-[[data-swipe-direction=up]]:justify-center", "has-[[data-swipe-direction=right]]:items-center has-[[data-swipe-direction=right]]:justify-end", "has-[[data-swipe-direction=left]]:items-center has-[[data-swipe-direction=left]]:justify-start");
|
|
44
|
+
const popupClassName = cn("touch-auto overflow-y-auto overscroll-contain bg-surface-background p-md outline outline-border-strong transition-transform duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-swiping:select-none", "mb-[-3rem] max-h-[calc(80vh+3rem)] w-full transform-[translateY(var(--drawer-swipe-movement-y))] rounded-t-2xl pb-[calc(1.5rem+env(safe-area-inset-bottom,0)+3rem)] shadow-[0_-8px_24px_var(--color-shadow)] data-ending-style:transform-[translateY(calc(100%-3rem+2px))] data-starting-style:transform-[translateY(calc(100%-3rem+2px))]", "data-[swipe-direction=up]:mt-[-3rem] data-[swipe-direction=up]:mb-0 data-[swipe-direction=up]:rounded-t-none data-[swipe-direction=up]:rounded-b-2xl data-[swipe-direction=up]:pt-[calc(1.5rem+env(safe-area-inset-top,0)+3rem)] data-[swipe-direction=up]:pb-md data-[swipe-direction=up]:shadow-[0_8px_24px_var(--color-shadow)] data-[swipe-direction=up]:data-ending-style:transform-[translateY(calc(-100%+3rem-2px))] data-[swipe-direction=up]:data-starting-style:transform-[translateY(calc(-100%+3rem-2px))]", "data-[swipe-direction=right]:mr-[-3rem] data-[swipe-direction=right]:mb-0 data-[swipe-direction=right]:h-full data-[swipe-direction=right]:max-h-dvh data-[swipe-direction=right]:w-[23rem] data-[swipe-direction=right]:max-w-[calc(100vw-3rem)] data-[swipe-direction=right]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:rounded-l-2xl data-[swipe-direction=right]:pr-[4.5rem] data-[swipe-direction=right]:pb-md data-[swipe-direction=right]:shadow-[-8px_0_24px_var(--color-shadow)] data-[swipe-direction=right]:data-ending-style:transform-[translateX(calc(100%-3rem+2px))] data-[swipe-direction=right]:data-starting-style:transform-[translateX(calc(100%-3rem+2px))]", "data-[swipe-direction=left]:mb-0 data-[swipe-direction=left]:ml-[-3rem] data-[swipe-direction=left]:h-full data-[swipe-direction=left]:max-h-dvh data-[swipe-direction=left]:w-[23rem] data-[swipe-direction=left]:max-w-[calc(100vw-3rem)] data-[swipe-direction=left]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:rounded-r-2xl data-[swipe-direction=left]:pb-md data-[swipe-direction=left]:pl-[4.5rem] data-[swipe-direction=left]:shadow-[8px_0_24px_var(--color-shadow)] data-[swipe-direction=left]:data-ending-style:transform-[translateX(calc(-100%+3rem-2px))] data-[swipe-direction=left]:data-starting-style:transform-[translateX(calc(-100%+3rem-2px))]");
|
|
45
|
+
function DrawerPopup({ className, children, ref, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsxs(Drawer$1.Portal, { children: [/* @__PURE__ */ jsx(Drawer$1.Backdrop, { className: backdropClassName }), /* @__PURE__ */ jsx(Drawer$1.Viewport, {
|
|
47
|
+
className: viewportClassName,
|
|
48
|
+
children: /* @__PURE__ */ jsx(Drawer$1.Popup, {
|
|
49
|
+
className: cn(popupClassName, className),
|
|
50
|
+
ref,
|
|
51
|
+
...props,
|
|
52
|
+
children
|
|
53
|
+
})
|
|
54
|
+
})] });
|
|
55
|
+
}
|
|
56
|
+
// src/components/drawer/drawer-provider.tsx
|
|
57
|
+
function DrawerProvider({ children, ...props }) {
|
|
58
|
+
return /* @__PURE__ */ jsxs(Drawer$1.Provider, {
|
|
59
|
+
...props,
|
|
60
|
+
children: [/* @__PURE__ */ jsx(Drawer$1.IndentBackground, {}), /* @__PURE__ */ jsx(Drawer$1.Indent, { children })]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
// src/components/drawer/drawer-title.tsx
|
|
64
|
+
function DrawerTitle({ className, ref, ...props }) {
|
|
65
|
+
return /* @__PURE__ */ jsx(Drawer$1.Title, {
|
|
66
|
+
className: cn("style-text-strong-1", className),
|
|
67
|
+
ref,
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// src/components/drawer/drawer-trigger.tsx
|
|
72
|
+
function DrawerTrigger({ className, children, ref, ...props }) {
|
|
73
|
+
let render = void 0;
|
|
74
|
+
if (isValidElement(children)) render = children;
|
|
75
|
+
return /* @__PURE__ */ jsx(Drawer$1.Trigger, {
|
|
76
|
+
className: cn("", className),
|
|
77
|
+
ref,
|
|
78
|
+
...props,
|
|
79
|
+
render
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
// src/components/drawer/index.ts
|
|
83
|
+
const Drawer = Object.assign(Drawer$2, {
|
|
84
|
+
Close: DrawerClose,
|
|
85
|
+
Content: DrawerContent,
|
|
86
|
+
Description: DrawerDescription,
|
|
87
|
+
Header: DrawerHeader,
|
|
88
|
+
Popup: DrawerPopup,
|
|
89
|
+
Provider: DrawerProvider,
|
|
90
|
+
Title: DrawerTitle,
|
|
91
|
+
Trigger: DrawerTrigger
|
|
92
|
+
});
|
|
93
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerHeader, DrawerPopup, DrawerProvider, DrawerTitle, DrawerTrigger };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Drawer","BaseDrawer","BaseDrawer","BaseDrawer","BaseDrawer","BaseDrawer","BaseDrawer","BaseDrawer","BaseDrawer","DrawerRoot"],"sources":["../../src/components/drawer/drawer.tsx","../../src/components/drawer/drawer-close.tsx","../../src/components/drawer/drawer-content.tsx","../../src/components/drawer/drawer-description.tsx","../../src/components/drawer/drawer-header.tsx","../../src/components/drawer/drawer-popup.tsx","../../src/components/drawer/drawer-provider.tsx","../../src/components/drawer/drawer-title.tsx","../../src/components/drawer/drawer-trigger.tsx","../../src/components/drawer/index.ts"],"sourcesContent":["import { Drawer as BaseDrawer } from '@base-ui/react'\n\nimport type { DrawerProps } from './drawer.types'\n\nexport function Drawer({ ...props }: DrawerProps) {\n return <BaseDrawer.Root {...props} />\n}\n","import { Drawer as BaseDrawer } from '@base-ui/react'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DrawerCloseProps } from './drawer.types'\n\nexport function DrawerClose({ className, ref, ...props }: DrawerCloseProps) {\n return <BaseDrawer.Close className={cn('shrink-0', className)} ref={ref} {...props} />\n}\n","import { Drawer as BaseDrawer } from '@base-ui/react'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DrawerContentProps } from './drawer.types'\n\nexport function DrawerContent({ className, ref, ...props }: DrawerContentProps) {\n return (\n <BaseDrawer.Content\n className={cn('mx-auto w-full max-w-[32rem] space-y-3xs', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { Drawer as BaseDrawer } from '@base-ui/react'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DrawerDescriptionProps } from './drawer.types'\n\nexport function DrawerDescription({ className, ref, ...props }: DrawerDescriptionProps) {\n return (\n <BaseDrawer.Description\n className={cn('style-text-prose-0 text-on-surface-variant', className)}\n ref={ref}\n {...props}\n />\n )\n}\n","import { cn } from '@/utils/cn'\n\nimport type { DrawerHeaderProps } from './drawer.types'\n\nexport function DrawerHeader({ className, ref, ...props }: DrawerHeaderProps) {\n return (\n <div className={cn('flex items-start justify-between pb-sm', className)} ref={ref} {...props} />\n )\n}\n","import { Drawer as BaseDrawer } from '@base-ui/react'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DrawerPopupProps } from './drawer.types'\n\nconst backdropClassName =\n 'fixed inset-0 min-h-dvh bg-scrim opacity-[calc(var(--backdrop-opacity)*(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] [--backdrop-opacity:0.2] [--bleed:3rem] data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute dark:[--backdrop-opacity:0.7]',\n viewportClassName = cn(\n 'fixed inset-0 flex',\n // Down (bottom sheet) - default\n 'items-end justify-center',\n // Up (top sheet)\n 'has-[[data-swipe-direction=up]]:items-start has-[[data-swipe-direction=up]]:justify-center',\n // Right (right drawer)\n 'has-[[data-swipe-direction=right]]:items-center has-[[data-swipe-direction=right]]:justify-end',\n // Left (left drawer)\n 'has-[[data-swipe-direction=left]]:items-center has-[[data-swipe-direction=left]]:justify-start',\n ),\n popupClassName = cn(\n // Base styles (shared by all directions)\n 'touch-auto overflow-y-auto overscroll-contain bg-surface-background p-md outline outline-border-strong transition-transform duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-swiping:select-none',\n\n // Down (bottom sheet) - default, shadow goes up\n 'mb-[-3rem] max-h-[calc(80vh+3rem)] w-full transform-[translateY(var(--drawer-swipe-movement-y))] rounded-t-2xl pb-[calc(1.5rem+env(safe-area-inset-bottom,0)+3rem)] shadow-[0_-8px_24px_var(--color-shadow)] data-ending-style:transform-[translateY(calc(100%-3rem+2px))] data-starting-style:transform-[translateY(calc(100%-3rem+2px))]',\n\n // Up (top sheet) - shadow goes down\n 'data-[swipe-direction=up]:mt-[-3rem] data-[swipe-direction=up]:mb-0 data-[swipe-direction=up]:rounded-t-none data-[swipe-direction=up]:rounded-b-2xl data-[swipe-direction=up]:pt-[calc(1.5rem+env(safe-area-inset-top,0)+3rem)] data-[swipe-direction=up]:pb-md data-[swipe-direction=up]:shadow-[0_8px_24px_var(--color-shadow)] data-[swipe-direction=up]:data-ending-style:transform-[translateY(calc(-100%+3rem-2px))] data-[swipe-direction=up]:data-starting-style:transform-[translateY(calc(-100%+3rem-2px))]',\n\n // Right (right drawer) - shadow goes left\n 'data-[swipe-direction=right]:mr-[-3rem] data-[swipe-direction=right]:mb-0 data-[swipe-direction=right]:h-full data-[swipe-direction=right]:max-h-dvh data-[swipe-direction=right]:w-[23rem] data-[swipe-direction=right]:max-w-[calc(100vw-3rem)] data-[swipe-direction=right]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:rounded-l-2xl data-[swipe-direction=right]:pr-[4.5rem] data-[swipe-direction=right]:pb-md data-[swipe-direction=right]:shadow-[-8px_0_24px_var(--color-shadow)] data-[swipe-direction=right]:data-ending-style:transform-[translateX(calc(100%-3rem+2px))] data-[swipe-direction=right]:data-starting-style:transform-[translateX(calc(100%-3rem+2px))]',\n\n // Left (left drawer) - shadow goes right\n 'data-[swipe-direction=left]:mb-0 data-[swipe-direction=left]:ml-[-3rem] data-[swipe-direction=left]:h-full data-[swipe-direction=left]:max-h-dvh data-[swipe-direction=left]:w-[23rem] data-[swipe-direction=left]:max-w-[calc(100vw-3rem)] data-[swipe-direction=left]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:rounded-r-2xl data-[swipe-direction=left]:pb-md data-[swipe-direction=left]:pl-[4.5rem] data-[swipe-direction=left]:shadow-[8px_0_24px_var(--color-shadow)] data-[swipe-direction=left]:data-ending-style:transform-[translateX(calc(-100%+3rem-2px))] data-[swipe-direction=left]:data-starting-style:transform-[translateX(calc(-100%+3rem-2px))]',\n )\n\nexport function DrawerPopup({ className, children, ref, ...props }: DrawerPopupProps) {\n return (\n <BaseDrawer.Portal>\n <BaseDrawer.Backdrop className={backdropClassName} />\n <BaseDrawer.Viewport className={viewportClassName}>\n <BaseDrawer.Popup className={cn(popupClassName, className)} ref={ref} {...props}>\n {children}\n </BaseDrawer.Popup>\n </BaseDrawer.Viewport>\n </BaseDrawer.Portal>\n )\n}\n","import { Drawer as BaseDrawer } from '@base-ui/react'\n\nimport type { DrawerProviderProps } from './drawer.types'\n\nexport function DrawerProvider({ children, ...props }: DrawerProviderProps) {\n return (\n <BaseDrawer.Provider {...props}>\n <BaseDrawer.IndentBackground />\n <BaseDrawer.Indent>{children}</BaseDrawer.Indent>\n </BaseDrawer.Provider>\n )\n}\n","import { Drawer as BaseDrawer } from '@base-ui/react'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DrawerTitleProps } from './drawer.types'\n\nexport function DrawerTitle({ className, ref, ...props }: DrawerTitleProps) {\n return <BaseDrawer.Title className={cn('style-text-strong-1', className)} ref={ref} {...props} />\n}\n","import { Drawer as BaseDrawer } from '@base-ui/react'\nimport { isValidElement } from 'react'\nimport type { ReactElement } from 'react'\n\nimport { cn } from '@/utils/cn'\n\nimport type { DrawerTriggerProps } from './drawer.types'\n\nexport function DrawerTrigger({ className, children, ref, ...props }: DrawerTriggerProps) {\n let render: ReactElement | undefined = undefined\n if (isValidElement(children)) {\n render = children\n }\n\n return <BaseDrawer.Trigger className={cn('', className)} ref={ref} {...props} render={render} />\n}\n","import { Drawer as DrawerRoot } from './drawer'\nimport { DrawerClose } from './drawer-close'\nimport { DrawerContent } from './drawer-content'\nimport { DrawerDescription } from './drawer-description'\nimport { DrawerHeader } from './drawer-header'\nimport { DrawerPopup } from './drawer-popup'\nimport { DrawerProvider } from './drawer-provider'\nimport { DrawerTitle } from './drawer-title'\nimport { DrawerTrigger } from './drawer-trigger'\n\nconst Drawer = Object.assign(DrawerRoot, {\n Close: DrawerClose,\n Content: DrawerContent,\n Description: DrawerDescription,\n Header: DrawerHeader,\n Popup: DrawerPopup,\n Provider: DrawerProvider,\n Title: DrawerTitle,\n Trigger: DrawerTrigger,\n})\n\nexport type {\n DrawerProps,\n DrawerCloseProps,\n DrawerContentProps,\n DrawerDescriptionProps,\n DrawerProviderProps,\n DrawerTriggerProps,\n DrawerPopupProps,\n DrawerTitleProps,\n DrawerHeaderProps,\n} from './drawer.types'\nexport { DrawerClose } from './drawer-close'\nexport { DrawerContent } from './drawer-content'\nexport { DrawerDescription } from './drawer-description'\nexport { DrawerProvider } from './drawer-provider'\nexport { DrawerTrigger } from './drawer-trigger'\nexport { DrawerPopup } from './drawer-popup'\nexport { DrawerTitle } from './drawer-title'\nexport { DrawerHeader } from './drawer-header'\n\nexport { Drawer }\n"],"mappings":";;;;;AAIA,SAAgBA,SAAO,EAAE,GAAG,SAAsB;CAChD,OAAO,oBAACC,SAAW,MAAZ,EAAiB,GAAI,MAAQ,CAAA;AACtC;;ACAA,SAAgB,YAAY,EAAE,WAAW,KAAK,GAAG,SAA2B;CAC1E,OAAO,oBAACC,SAAW,OAAZ;EAAkB,WAAW,GAAG,YAAY,SAAS;EAAQ;EAAK,GAAI;CAAQ,CAAA;AACvF;;ACFA,SAAgB,cAAc,EAAE,WAAW,KAAK,GAAG,SAA6B;CAC9E,OACE,oBAACC,SAAW,SAAZ;EACE,WAAW,GAAG,4CAA4C,SAAS;EAC9D;EACL,GAAI;CACL,CAAA;AAEL;;ACRA,SAAgB,kBAAkB,EAAE,WAAW,KAAK,GAAG,SAAiC;CACtF,OACE,oBAACC,SAAW,aAAZ;EACE,WAAW,GAAG,8CAA8C,SAAS;EAChE;EACL,GAAI;CACL,CAAA;AAEL;;ACVA,SAAgB,aAAa,EAAE,WAAW,KAAK,GAAG,SAA4B;CAC5E,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,0CAA0C,SAAS;EAAQ;EAAK,GAAI;CAAQ,CAAA;AAEnG;;ACFA,MAAM,oBACF;AACF,MAAA,oBAAoB,GAClB,sBAEA,4BAEA,8FAEA,kGAEA,gGACF;AACA,MAAA,iBAAiB,GAEf,6QAGA,8UAGA,0fAGA,wuBAGA,ytBACF;AAEF,SAAgB,YAAY,EAAE,WAAW,UAAU,KAAK,GAAG,SAA2B;CACpF,OACE,qBAACC,SAAW,QAAZ,EAAA,UAAA,CACE,oBAACA,SAAW,UAAZ,EAAqB,WAAW,kBAAoB,CAAA,GACpD,oBAACA,SAAW,UAAZ;EAAqB,WAAW;EAC9B,UAAA,oBAACA,SAAW,OAAZ;GAAkB,WAAW,GAAG,gBAAgB,SAAS;GAAQ;GAAK,GAAI;GACvE;EACe,CAAA;CACC,CAAA,CACJ,EAAA,CAAA;AAEvB;;AC3CA,SAAgB,eAAe,EAAE,UAAU,GAAG,SAA8B;CAC1E,OACE,qBAACC,SAAW,UAAZ;EAAqB,GAAI;EAAzB,UAAA,CACE,oBAACA,SAAW,kBAAZ,CAA8B,CAAA,GAC9B,oBAACA,SAAW,QAAZ,EAAoB,SAA4B,CAAA,CAC7B;;AAEzB;;ACLA,SAAgB,YAAY,EAAE,WAAW,KAAK,GAAG,SAA2B;CAC1E,OAAO,oBAACC,SAAW,OAAZ;EAAkB,WAAW,GAAG,uBAAuB,SAAS;EAAQ;EAAK,GAAI;CAAQ,CAAA;AAClG;;ACAA,SAAgB,cAAc,EAAE,WAAW,UAAU,KAAK,GAAG,SAA6B;CACxF,IAAI,SAAmC,KAAA;CACvC,IAAI,eAAe,QAAQ,GACzB,SAAS;CAGX,OAAO,oBAACC,SAAW,SAAZ;EAAoB,WAAW,GAAG,IAAI,SAAS;EAAQ;EAAK,GAAI;EAAe;CAAS,CAAA;AACjG;;ACLA,MAAM,SAAS,OAAO,OAAOC,UAAY;CACvC,OAAO;CACP,SAAS;CACT,aAAa;CACb,QAAQ;CACR,OAAO;CACP,UAAU;CACV,OAAO;CACP,SAAS;AACX,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { t as Button } from "../index-bVyqfhJS.js";
|
|
2
|
+
import React$1 from "react";
|
|
3
|
+
type DropzoneContainerProps = React.ComponentProps<'label'> & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
type DropzoneErrorProps = React.ComponentProps<'p'>;
|
|
7
|
+
type DropzoneFilesListProps = React.ComponentProps<'ul'>;
|
|
8
|
+
type DropzoneFileSizeLimitProps = React.ComponentProps<'span'>;
|
|
9
|
+
type DropzoneFormatsProps = React.ComponentProps<'span'>;
|
|
10
|
+
type DropzoneHeadingProps = React.ComponentProps<'span'>;
|
|
11
|
+
type DropzoneIconProps = React.ComponentProps<'div'>;
|
|
12
|
+
type DropzoneInfoProps = React.ComponentProps<'div'>;
|
|
13
|
+
type DropzoneSubtitleProps = React.ComponentProps<'span'>;
|
|
14
|
+
type DropzoneTriggerProps = React.ComponentProps<'button'>;
|
|
15
|
+
type DropzoneProps = React.ComponentProps<'input'> & {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
maxFiles?: number;
|
|
18
|
+
maxFileSize?: number;
|
|
19
|
+
maxFilesErrorLabel?: (maxFiles: number) => string;
|
|
20
|
+
maxFileSizeErrorLabel?: (fileName: string, maxFileSize: string) => string;
|
|
21
|
+
fileTypeErrorLabel?: (fileName: string) => string;
|
|
22
|
+
onConfirm?: (files: File[]) => void;
|
|
23
|
+
onUpload?: (file: File, onProgress: (percent: number) => void) => void | Promise<void>;
|
|
24
|
+
};
|
|
25
|
+
type DropzoneFileLimitProps = React.ComponentProps<'span'>;
|
|
26
|
+
type DropzoneFilesProps = React.ComponentProps<'div'>;
|
|
27
|
+
type DropzoneFilesHeaderProps = React.ComponentProps<'div'>;
|
|
28
|
+
type DropzoneFilesTitleProps = React.ComponentProps<'span'>;
|
|
29
|
+
type DropzoneActionsProps = React.ComponentProps<'div'>;
|
|
30
|
+
type DropzoneConfirmProps = React.ComponentProps<typeof Button>;
|
|
31
|
+
type DropzoneClearProps = React.ComponentProps<typeof Button>;
|
|
32
|
+
declare function Dropzone$1({ maxFiles, maxFileSize, maxFilesErrorLabel, maxFileSizeErrorLabel, fileTypeErrorLabel, onUpload, ref, className, children, onChange, onConfirm, ...props }: DropzoneProps): React$1.JSX.Element;
|
|
33
|
+
export declare function DropzoneActions({ className, ref, ...props }: DropzoneActionsProps): import("react").JSX.Element;
|
|
34
|
+
export declare function DropzoneClear({ className, ref, ...props }: DropzoneClearProps): import("react").JSX.Element;
|
|
35
|
+
export declare function DropzoneConfirm({ className, ref, ...props }: DropzoneConfirmProps): import("react").JSX.Element;
|
|
36
|
+
export declare function DropzoneContainer({ className, children, ...containerProps }: DropzoneContainerProps): import("react").JSX.Element;
|
|
37
|
+
export declare function DropzoneError({ className, children, ref, ...props }: DropzoneErrorProps): import("react").JSX.Element | undefined;
|
|
38
|
+
declare function DropzoneFileLimit({ className, children, ref, ...props }: DropzoneFileLimitProps): import("react").JSX.Element | undefined;
|
|
39
|
+
export declare function DropzoneFileSizeLimit({ className, children, ref, ...props }: DropzoneFileSizeLimitProps): import("react").JSX.Element;
|
|
40
|
+
export declare function DropzoneFiles({ className, ref, ...props }: DropzoneFilesProps): import("react").JSX.Element;
|
|
41
|
+
export declare function DropzoneFilesHeader({ className, ref, ...props }: DropzoneFilesHeaderProps): import("react").JSX.Element;
|
|
42
|
+
declare function DropzoneFilesList({ className, children, ref, ...props }: DropzoneFilesListProps): import("react").JSX.Element;
|
|
43
|
+
export declare function DropzoneFilesTitle({ className, ref, ...props }: DropzoneFilesTitleProps): import("react").JSX.Element;
|
|
44
|
+
export declare function DropzoneFormats({ className, children, ref, ...props }: DropzoneFormatsProps): import("react").JSX.Element;
|
|
45
|
+
export declare function DropzoneHeading({ className, ref, ...props }: DropzoneHeadingProps): import("react").JSX.Element;
|
|
46
|
+
export declare function DropzoneIcon({ className, ref, ...props }: DropzoneIconProps): import("react").JSX.Element;
|
|
47
|
+
export declare function DropzoneInfo({ className, ref, ...props }: DropzoneInfoProps): import("react").JSX.Element;
|
|
48
|
+
export declare function DropzoneSubtitle({ className, ref, ...props }: DropzoneSubtitleProps): import("react").JSX.Element;
|
|
49
|
+
export declare function DropzoneTrigger({ className, ref, ...props }: DropzoneTriggerProps): import("react").JSX.Element;
|
|
50
|
+
declare const Dropzone: typeof Dropzone$1 & {
|
|
51
|
+
Actions: typeof DropzoneActions;
|
|
52
|
+
Clear: typeof DropzoneClear;
|
|
53
|
+
Confirm: typeof DropzoneConfirm;
|
|
54
|
+
Container: typeof DropzoneContainer;
|
|
55
|
+
Error: typeof DropzoneError;
|
|
56
|
+
FileLimit: typeof DropzoneFileLimit;
|
|
57
|
+
FileSizeLimit: typeof DropzoneFileSizeLimit;
|
|
58
|
+
Files: typeof DropzoneFiles;
|
|
59
|
+
FilesHeader: typeof DropzoneFilesHeader;
|
|
60
|
+
FilesList: typeof DropzoneFilesList;
|
|
61
|
+
FilesTitle: typeof DropzoneFilesTitle;
|
|
62
|
+
Formats: typeof DropzoneFormats;
|
|
63
|
+
Heading: typeof DropzoneHeading;
|
|
64
|
+
Icon: typeof DropzoneIcon;
|
|
65
|
+
Info: typeof DropzoneInfo;
|
|
66
|
+
Subtitle: typeof DropzoneSubtitle;
|
|
67
|
+
Trigger: typeof DropzoneTrigger;
|
|
68
|
+
};
|
|
69
|
+
export { Dropzone, type DropzoneActionsProps, type DropzoneClearProps, type DropzoneConfirmProps, type DropzoneContainerProps, type DropzoneErrorProps, type DropzoneFileLimitProps, DropzoneFilesList as DropzoneFileList, type DropzoneFileSizeLimitProps, type DropzoneFilesHeaderProps, type DropzoneFilesListProps, type DropzoneFilesProps, type DropzoneFilesTitleProps, type DropzoneFormatsProps, type DropzoneHeadingProps, type DropzoneIconProps, type DropzoneInfoProps, type DropzoneProps, type DropzoneSubtitleProps, type DropzoneTriggerProps };
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|