@lglab/compose-ui 0.28.0 → 0.30.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/components/table/filters.d.ts +29 -0
- package/dist/components/table/filters.d.ts.map +1 -0
- package/dist/components/table/filters.js +47 -0
- package/dist/components/table/filters.js.map +1 -0
- package/dist/components/table/primitives.d.ts +93 -0
- package/dist/components/table/primitives.d.ts.map +1 -0
- package/dist/components/table/primitives.js +129 -0
- package/dist/components/table/primitives.js.map +1 -0
- package/dist/components/table/sort.js +17 -0
- package/dist/components/table/sort.js.map +1 -0
- package/dist/components/table/types.d.ts +101 -0
- package/dist/components/table/types.d.ts.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 +48 -2115
- package/dist/index.js +47 -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 +38 -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/pagination.d.ts +184 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +164 -0
- package/dist/pagination.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 +15 -1
- 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/table/index.d.ts +5 -0
- package/dist/table/index.js +5 -0
- package/dist/table/use-table.d.ts +9 -0
- package/dist/table/use-table.d.ts.map +1 -0
- package/dist/table/use-table.js +256 -0
- package/dist/table/use-table.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 +25 -13
- 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/context-menu.js
CHANGED
|
@@ -1,174 +1,152 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const d = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
14
|
-
a.Positioner,
|
|
15
|
-
{
|
|
16
|
-
className: n("z-50 outline-none", t),
|
|
17
|
-
sideOffset: 3,
|
|
18
|
-
...e
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
d.displayName = "ContextMenuPositioner";
|
|
22
|
-
const l = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
23
|
-
a.Popup,
|
|
24
|
-
{
|
|
25
|
-
className: n(
|
|
26
|
-
"rounded-md bg-background p-1 text-foreground shadow-sm border border-border transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-0 data-starting-style:opacity-0 dark:shadow-none",
|
|
27
|
-
"min-w-[8rem]",
|
|
28
|
-
t
|
|
29
|
-
),
|
|
30
|
-
...e
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
l.displayName = "ContextMenuPopup";
|
|
34
|
-
const c = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
35
|
-
a.Arrow,
|
|
36
|
-
{
|
|
37
|
-
className: n(
|
|
38
|
-
"flex data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",
|
|
39
|
-
t
|
|
40
|
-
),
|
|
41
|
-
...e,
|
|
42
|
-
children: /* @__PURE__ */ o(s, {})
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
c.displayName = "ContextMenuArrow";
|
|
46
|
-
const p = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
47
|
-
a.Item,
|
|
48
|
-
{
|
|
49
|
-
className: n(
|
|
50
|
-
r({ variant: "ghost", size: "sm" }),
|
|
51
|
-
"flex justify-start",
|
|
52
|
-
t
|
|
53
|
-
),
|
|
54
|
-
...e
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
p.displayName = "ContextMenuItem";
|
|
58
|
-
const x = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
59
|
-
a.Separator,
|
|
60
|
-
{
|
|
61
|
-
className: n("-mx-1 my-1 h-px bg-border", t),
|
|
62
|
-
...e
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
x.displayName = "ContextMenuSeparator";
|
|
66
|
-
const C = ({ className: t, ...e }) => /* @__PURE__ */ o(a.Group, { className: n(t), ...e });
|
|
67
|
-
C.displayName = "ContextMenuGroup";
|
|
68
|
-
const M = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
69
|
-
a.GroupLabel,
|
|
70
|
-
{
|
|
71
|
-
className: n("px-3 py-1.5 text-sm font-semibold", t),
|
|
72
|
-
...e
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
M.displayName = "ContextMenuGroupLabel";
|
|
76
|
-
const N = ({ className: t, ...e }) => /* @__PURE__ */ o(a.RadioGroup, { className: n(t), ...e });
|
|
77
|
-
N.displayName = "ContextMenuRadioGroup";
|
|
78
|
-
const b = ({ className: t, ...e }) => /* @__PURE__ */ o(
|
|
79
|
-
a.RadioItem,
|
|
80
|
-
{
|
|
81
|
-
className: n(
|
|
82
|
-
r({ variant: "ghost", size: "sm" }),
|
|
83
|
-
"grid grid-cols-[0.75rem_1fr] gap-2",
|
|
84
|
-
t
|
|
85
|
-
),
|
|
86
|
-
...e
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
b.displayName = "ContextMenuRadioItem";
|
|
90
|
-
const g = ({
|
|
91
|
-
className: t,
|
|
92
|
-
...e
|
|
93
|
-
}) => /* @__PURE__ */ o(
|
|
94
|
-
a.CheckboxItem,
|
|
95
|
-
{
|
|
96
|
-
className: n(
|
|
97
|
-
r({ variant: "ghost", size: "sm" }),
|
|
98
|
-
"grid grid-cols-[0.75rem_1fr] gap-2",
|
|
99
|
-
t
|
|
100
|
-
),
|
|
101
|
-
...e
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
g.displayName = "ContextMenuCheckboxItem";
|
|
105
|
-
const y = ({
|
|
106
|
-
className: t,
|
|
107
|
-
...e
|
|
108
|
-
}) => /* @__PURE__ */ o(
|
|
109
|
-
a.RadioItemIndicator,
|
|
110
|
-
{
|
|
111
|
-
className: n("col-start-1", t),
|
|
112
|
-
...e
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
y.displayName = "ContextMenuRadioItemIndicator";
|
|
116
|
-
const I = ({
|
|
117
|
-
className: t,
|
|
118
|
-
...e
|
|
119
|
-
}) => /* @__PURE__ */ o(
|
|
120
|
-
a.CheckboxItemIndicator,
|
|
121
|
-
{
|
|
122
|
-
className: n("col-start-1", t),
|
|
123
|
-
...e
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
I.displayName = "ContextMenuCheckboxItemIndicator";
|
|
127
|
-
const f = ({
|
|
128
|
-
className: t,
|
|
129
|
-
...e
|
|
130
|
-
}) => /* @__PURE__ */ o("span", { className: n("col-start-2", t), ...e });
|
|
131
|
-
f.displayName = "ContextMenuCheckboxItemLabel";
|
|
132
|
-
const h = ({
|
|
133
|
-
className: t,
|
|
134
|
-
...e
|
|
135
|
-
}) => /* @__PURE__ */ o("span", { className: n("col-start-2", t), ...e });
|
|
136
|
-
h.displayName = "ContextMenuRadioItemLabel";
|
|
137
|
-
const R = ({
|
|
138
|
-
className: t,
|
|
139
|
-
...e
|
|
140
|
-
}) => /* @__PURE__ */ o(
|
|
141
|
-
a.SubmenuTrigger,
|
|
142
|
-
{
|
|
143
|
-
className: n(
|
|
144
|
-
r({ variant: "ghost", size: "sm" }),
|
|
145
|
-
"flex justify-between",
|
|
146
|
-
t
|
|
147
|
-
),
|
|
148
|
-
...e
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
R.displayName = "ContextMenuSubmenuTrigger";
|
|
152
|
-
const k = (t) => /* @__PURE__ */ o(a.SubmenuRoot, { ...t });
|
|
153
|
-
k.displayName = "ContextMenuSubmenuRoot";
|
|
154
|
-
export {
|
|
155
|
-
c as ContextMenuArrow,
|
|
156
|
-
g as ContextMenuCheckboxItem,
|
|
157
|
-
I as ContextMenuCheckboxItemIndicator,
|
|
158
|
-
f as ContextMenuCheckboxItemLabel,
|
|
159
|
-
C as ContextMenuGroup,
|
|
160
|
-
M as ContextMenuGroupLabel,
|
|
161
|
-
p as ContextMenuItem,
|
|
162
|
-
l as ContextMenuPopup,
|
|
163
|
-
m as ContextMenuPortal,
|
|
164
|
-
d as ContextMenuPositioner,
|
|
165
|
-
N as ContextMenuRadioGroup,
|
|
166
|
-
b as ContextMenuRadioItem,
|
|
167
|
-
y as ContextMenuRadioItemIndicator,
|
|
168
|
-
h as ContextMenuRadioItemLabel,
|
|
169
|
-
i as ContextMenuRoot,
|
|
170
|
-
x as ContextMenuSeparator,
|
|
171
|
-
k as ContextMenuSubmenuRoot,
|
|
172
|
-
R as ContextMenuSubmenuTrigger,
|
|
173
|
-
u as ContextMenuTrigger
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { buttonVariants } from "./lib/button-variants.js";
|
|
4
|
+
import { cn } from "./lib/utils.js";
|
|
5
|
+
import { ArrowSvg } from "./lib/arrow-svg.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { ContextMenu } from "@base-ui/react/context-menu";
|
|
9
|
+
|
|
10
|
+
//#region src/components/context-menu.tsx
|
|
11
|
+
const ContextMenuRoot = (props) => {
|
|
12
|
+
return /* @__PURE__ */ jsx(ContextMenu.Root, { ...props });
|
|
174
13
|
};
|
|
14
|
+
ContextMenuRoot.displayName = "ContextMenuRoot";
|
|
15
|
+
const ContextMenuTrigger = ({ className, ...props }) => {
|
|
16
|
+
return /* @__PURE__ */ jsx(ContextMenu.Trigger, {
|
|
17
|
+
className: cn(className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
ContextMenuTrigger.displayName = "ContextMenuTrigger";
|
|
22
|
+
const ContextMenuPortal = (props) => {
|
|
23
|
+
return /* @__PURE__ */ jsx(ContextMenu.Portal, { ...props });
|
|
24
|
+
};
|
|
25
|
+
ContextMenuPortal.displayName = "ContextMenuPortal";
|
|
26
|
+
const ContextMenuPositioner = ({ className, ...props }) => {
|
|
27
|
+
return /* @__PURE__ */ jsx(ContextMenu.Positioner, {
|
|
28
|
+
className: cn("z-50 outline-none", className),
|
|
29
|
+
sideOffset: 3,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
ContextMenuPositioner.displayName = "ContextMenuPositioner";
|
|
34
|
+
const ContextMenuPopup = ({ className, ...props }) => {
|
|
35
|
+
return /* @__PURE__ */ jsx(ContextMenu.Popup, {
|
|
36
|
+
className: cn("rounded-md bg-background p-1 text-foreground shadow-sm border border-border transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-0 data-starting-style:opacity-0 dark:shadow-none", "min-w-[8rem]", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
ContextMenuPopup.displayName = "ContextMenuPopup";
|
|
41
|
+
const ContextMenuArrow = ({ className, ...props }) => {
|
|
42
|
+
return /* @__PURE__ */ jsx(ContextMenu.Arrow, {
|
|
43
|
+
className: cn("flex data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180", className),
|
|
44
|
+
...props,
|
|
45
|
+
children: /* @__PURE__ */ jsx(ArrowSvg, {})
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
ContextMenuArrow.displayName = "ContextMenuArrow";
|
|
49
|
+
const ContextMenuItem = ({ className, ...props }) => {
|
|
50
|
+
return /* @__PURE__ */ jsx(ContextMenu.Item, {
|
|
51
|
+
className: cn(buttonVariants({
|
|
52
|
+
variant: "ghost",
|
|
53
|
+
size: "sm"
|
|
54
|
+
}), "flex justify-start", className),
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
ContextMenuItem.displayName = "ContextMenuItem";
|
|
59
|
+
const ContextMenuSeparator = ({ className, ...props }) => {
|
|
60
|
+
return /* @__PURE__ */ jsx(ContextMenu.Separator, {
|
|
61
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
ContextMenuSeparator.displayName = "ContextMenuSeparator";
|
|
66
|
+
const ContextMenuGroup = ({ className, ...props }) => {
|
|
67
|
+
return /* @__PURE__ */ jsx(ContextMenu.Group, {
|
|
68
|
+
className: cn(className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
ContextMenuGroup.displayName = "ContextMenuGroup";
|
|
73
|
+
const ContextMenuGroupLabel = ({ className, ...props }) => {
|
|
74
|
+
return /* @__PURE__ */ jsx(ContextMenu.GroupLabel, {
|
|
75
|
+
className: cn("px-3 py-1.5 text-sm font-semibold", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
ContextMenuGroupLabel.displayName = "ContextMenuGroupLabel";
|
|
80
|
+
const ContextMenuRadioGroup = ({ className, ...props }) => {
|
|
81
|
+
return /* @__PURE__ */ jsx(ContextMenu.RadioGroup, {
|
|
82
|
+
className: cn(className),
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
ContextMenuRadioGroup.displayName = "ContextMenuRadioGroup";
|
|
87
|
+
const ContextMenuRadioItem = ({ className, ...props }) => {
|
|
88
|
+
return /* @__PURE__ */ jsx(ContextMenu.RadioItem, {
|
|
89
|
+
className: cn(buttonVariants({
|
|
90
|
+
variant: "ghost",
|
|
91
|
+
size: "sm"
|
|
92
|
+
}), "grid grid-cols-[0.75rem_1fr] gap-2", className),
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
ContextMenuRadioItem.displayName = "ContextMenuRadioItem";
|
|
97
|
+
const ContextMenuCheckboxItem = ({ className, ...props }) => {
|
|
98
|
+
return /* @__PURE__ */ jsx(ContextMenu.CheckboxItem, {
|
|
99
|
+
className: cn(buttonVariants({
|
|
100
|
+
variant: "ghost",
|
|
101
|
+
size: "sm"
|
|
102
|
+
}), "grid grid-cols-[0.75rem_1fr] gap-2", className),
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
ContextMenuCheckboxItem.displayName = "ContextMenuCheckboxItem";
|
|
107
|
+
const ContextMenuRadioItemIndicator = ({ className, ...props }) => {
|
|
108
|
+
return /* @__PURE__ */ jsx(ContextMenu.RadioItemIndicator, {
|
|
109
|
+
className: cn("col-start-1", className),
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
ContextMenuRadioItemIndicator.displayName = "ContextMenuRadioItemIndicator";
|
|
114
|
+
const ContextMenuCheckboxItemIndicator = ({ className, ...props }) => {
|
|
115
|
+
return /* @__PURE__ */ jsx(ContextMenu.CheckboxItemIndicator, {
|
|
116
|
+
className: cn("col-start-1", className),
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
ContextMenuCheckboxItemIndicator.displayName = "ContextMenuCheckboxItemIndicator";
|
|
121
|
+
const ContextMenuCheckboxItemLabel = ({ className, ...props }) => {
|
|
122
|
+
return /* @__PURE__ */ jsx("span", {
|
|
123
|
+
className: cn("col-start-2", className),
|
|
124
|
+
...props
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
ContextMenuCheckboxItemLabel.displayName = "ContextMenuCheckboxItemLabel";
|
|
128
|
+
const ContextMenuRadioItemLabel = ({ className, ...props }) => {
|
|
129
|
+
return /* @__PURE__ */ jsx("span", {
|
|
130
|
+
className: cn("col-start-2", className),
|
|
131
|
+
...props
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
ContextMenuRadioItemLabel.displayName = "ContextMenuRadioItemLabel";
|
|
135
|
+
const ContextMenuSubmenuTrigger = ({ className, ...props }) => {
|
|
136
|
+
return /* @__PURE__ */ jsx(ContextMenu.SubmenuTrigger, {
|
|
137
|
+
className: cn(buttonVariants({
|
|
138
|
+
variant: "ghost",
|
|
139
|
+
size: "sm"
|
|
140
|
+
}), "flex justify-between", className),
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
ContextMenuSubmenuTrigger.displayName = "ContextMenuSubmenuTrigger";
|
|
145
|
+
const ContextMenuSubmenuRoot = (props) => {
|
|
146
|
+
return /* @__PURE__ */ jsx(ContextMenu.SubmenuRoot, { ...props });
|
|
147
|
+
};
|
|
148
|
+
ContextMenuSubmenuRoot.displayName = "ContextMenuSubmenuRoot";
|
|
149
|
+
|
|
150
|
+
//#endregion
|
|
151
|
+
export { ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuCheckboxItemIndicator, ContextMenuCheckboxItemLabel, ContextMenuGroup, ContextMenuGroupLabel, ContextMenuItem, ContextMenuPopup, ContextMenuPortal, ContextMenuPositioner, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRadioItemIndicator, ContextMenuRadioItemLabel, ContextMenuRoot, ContextMenuSeparator, ContextMenuSubmenuRoot, ContextMenuSubmenuTrigger, ContextMenuTrigger };
|
|
152
|
+
//# sourceMappingURL=context-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.js","names":["BaseContextMenu"],"sources":["../src/components/context-menu.tsx"],"sourcesContent":["'use client'\n\nimport { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu'\nimport * as React from 'react'\n\nimport { ArrowSvg } from '../lib/arrow-svg'\nimport { buttonVariants } from '../lib/button-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// ContextMenuRoot\n// ============================================================================\n\ntype ContextMenuRootProps = React.ComponentProps<typeof BaseContextMenu.Root>\n\nconst ContextMenuRoot = (props: ContextMenuRootProps) => {\n return <BaseContextMenu.Root {...props} />\n}\n\nContextMenuRoot.displayName = 'ContextMenuRoot'\n\n// ============================================================================\n// ContextMenuTrigger\n// ============================================================================\n\ntype ContextMenuTriggerProps = React.ComponentProps<typeof BaseContextMenu.Trigger>\n\nconst ContextMenuTrigger = ({ className, ...props }: ContextMenuTriggerProps) => {\n return <BaseContextMenu.Trigger className={cn(className)} {...props} />\n}\n\nContextMenuTrigger.displayName = 'ContextMenuTrigger'\n\n// ============================================================================\n// ContextMenuPortal\n// ============================================================================\n\ntype ContextMenuPortalProps = React.ComponentProps<typeof BaseContextMenu.Portal>\n\nconst ContextMenuPortal = (props: ContextMenuPortalProps) => {\n return <BaseContextMenu.Portal {...props} />\n}\n\nContextMenuPortal.displayName = 'ContextMenuPortal'\n\n// ============================================================================\n// ContextMenuPositioner\n// ============================================================================\n\ntype ContextMenuPositionerProps = React.ComponentProps<typeof BaseContextMenu.Positioner>\n\nconst ContextMenuPositioner = ({ className, ...props }: ContextMenuPositionerProps) => {\n return (\n <BaseContextMenu.Positioner\n className={cn('z-50 outline-none', className)}\n sideOffset={3}\n {...props}\n />\n )\n}\n\nContextMenuPositioner.displayName = 'ContextMenuPositioner'\n\n// ============================================================================\n// ContextMenuPopup\n// ============================================================================\n\ntype ContextMenuPopupProps = React.ComponentProps<typeof BaseContextMenu.Popup>\n\nconst ContextMenuPopup = ({ className, ...props }: ContextMenuPopupProps) => {\n return (\n <BaseContextMenu.Popup\n className={cn(\n 'rounded-md bg-background p-1 text-foreground shadow-sm border border-border transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-0 data-starting-style:opacity-0 dark:shadow-none',\n 'min-w-[8rem]',\n className,\n )}\n {...props}\n />\n )\n}\n\nContextMenuPopup.displayName = 'ContextMenuPopup'\n\n// ============================================================================\n// ContextMenuArrow\n// ============================================================================\n\ntype ContextMenuArrowProps = React.ComponentProps<typeof BaseContextMenu.Arrow>\n\nconst ContextMenuArrow = ({ className, ...props }: ContextMenuArrowProps) => {\n return (\n <BaseContextMenu.Arrow\n className={cn(\n 'flex data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180',\n className,\n )}\n {...props}\n >\n <ArrowSvg />\n </BaseContextMenu.Arrow>\n )\n}\n\nContextMenuArrow.displayName = 'ContextMenuArrow'\n\n// ============================================================================\n// ContextMenuItem\n// ============================================================================\n\ntype ContextMenuItemProps = React.ComponentProps<typeof BaseContextMenu.Item>\n\nconst ContextMenuItem = ({ className, ...props }: ContextMenuItemProps) => {\n return (\n <BaseContextMenu.Item\n className={cn(\n buttonVariants({ variant: 'ghost', size: 'sm' }),\n 'flex justify-start',\n className,\n )}\n {...props}\n />\n )\n}\n\nContextMenuItem.displayName = 'ContextMenuItem'\n\n// ============================================================================\n// ContextMenuSeparator\n// ============================================================================\n\ntype ContextMenuSeparatorProps = React.ComponentProps<typeof BaseContextMenu.Separator>\n\nconst ContextMenuSeparator = ({ className, ...props }: ContextMenuSeparatorProps) => {\n return (\n <BaseContextMenu.Separator\n className={cn('-mx-1 my-1 h-px bg-border', className)}\n {...props}\n />\n )\n}\n\nContextMenuSeparator.displayName = 'ContextMenuSeparator'\n\n// ============================================================================\n// ContextMenuGroup\n// ============================================================================\n\ntype ContextMenuGroupProps = React.ComponentProps<typeof BaseContextMenu.Group>\n\nconst ContextMenuGroup = ({ className, ...props }: ContextMenuGroupProps) => {\n return <BaseContextMenu.Group className={cn(className)} {...props} />\n}\n\nContextMenuGroup.displayName = 'ContextMenuGroup'\n\n// ============================================================================\n// ContextMenuGroupLabel\n// ============================================================================\n\ntype ContextMenuGroupLabelProps = React.ComponentProps<typeof BaseContextMenu.GroupLabel>\n\nconst ContextMenuGroupLabel = ({ className, ...props }: ContextMenuGroupLabelProps) => {\n return (\n <BaseContextMenu.GroupLabel\n className={cn('px-3 py-1.5 text-sm font-semibold', className)}\n {...props}\n />\n )\n}\n\nContextMenuGroupLabel.displayName = 'ContextMenuGroupLabel'\n\n// ============================================================================\n// ContextMenuRadioGroup\n// ============================================================================\n\ntype ContextMenuRadioGroupProps = React.ComponentProps<typeof BaseContextMenu.RadioGroup>\n\nconst ContextMenuRadioGroup = ({ className, ...props }: ContextMenuRadioGroupProps) => {\n return <BaseContextMenu.RadioGroup className={cn(className)} {...props} />\n}\n\nContextMenuRadioGroup.displayName = 'ContextMenuRadioGroup'\n\n// ============================================================================\n// ContextMenuRadioItem\n// ============================================================================\n\ntype ContextMenuRadioItemProps = React.ComponentProps<typeof BaseContextMenu.RadioItem>\n\nconst ContextMenuRadioItem = ({ className, ...props }: ContextMenuRadioItemProps) => {\n return (\n <BaseContextMenu.RadioItem\n className={cn(\n buttonVariants({ variant: 'ghost', size: 'sm' }),\n 'grid grid-cols-[0.75rem_1fr] gap-2',\n className,\n )}\n {...props}\n />\n )\n}\n\nContextMenuRadioItem.displayName = 'ContextMenuRadioItem'\n\n// ============================================================================\n// ContextMenuCheckboxItem\n// ============================================================================\n\ntype ContextMenuCheckboxItemProps = React.ComponentProps<\n typeof BaseContextMenu.CheckboxItem\n>\n\nconst ContextMenuCheckboxItem = ({\n className,\n ...props\n}: ContextMenuCheckboxItemProps) => {\n return (\n <BaseContextMenu.CheckboxItem\n className={cn(\n buttonVariants({ variant: 'ghost', size: 'sm' }),\n 'grid grid-cols-[0.75rem_1fr] gap-2',\n className,\n )}\n {...props}\n />\n )\n}\n\nContextMenuCheckboxItem.displayName = 'ContextMenuCheckboxItem'\n\n// ============================================================================\n// ContextMenuRadioItemIndicator\n// ============================================================================\n\ntype ContextMenuRadioItemIndicatorProps = React.ComponentProps<\n typeof BaseContextMenu.RadioItemIndicator\n>\n\nconst ContextMenuRadioItemIndicator = ({\n className,\n ...props\n}: ContextMenuRadioItemIndicatorProps) => {\n return (\n <BaseContextMenu.RadioItemIndicator\n className={cn('col-start-1', className)}\n {...props}\n />\n )\n}\n\nContextMenuRadioItemIndicator.displayName = 'ContextMenuRadioItemIndicator'\n\n// ============================================================================\n// ContextMenuCheckboxItemIndicator\n// ============================================================================\n\ntype ContextMenuCheckboxItemIndicatorProps = React.ComponentProps<\n typeof BaseContextMenu.CheckboxItemIndicator\n>\n\nconst ContextMenuCheckboxItemIndicator = ({\n className,\n ...props\n}: ContextMenuCheckboxItemIndicatorProps) => {\n return (\n <BaseContextMenu.CheckboxItemIndicator\n className={cn('col-start-1', className)}\n {...props}\n />\n )\n}\n\nContextMenuCheckboxItemIndicator.displayName = 'ContextMenuCheckboxItemIndicator'\n\n// ============================================================================\n// ContextMenuCheckboxItemLabel\n// ============================================================================\n\ntype ContextMenuCheckboxItemLabelProps = React.ComponentProps<'span'>\n\nconst ContextMenuCheckboxItemLabel = ({\n className,\n ...props\n}: ContextMenuCheckboxItemLabelProps) => {\n return <span className={cn('col-start-2', className)} {...props} />\n}\n\nContextMenuCheckboxItemLabel.displayName = 'ContextMenuCheckboxItemLabel'\n\n// ============================================================================\n// ContextMenuRadioItemLabel\n// ============================================================================\n\ntype ContextMenuRadioItemLabelProps = React.ComponentProps<'span'>\n\nconst ContextMenuRadioItemLabel = ({\n className,\n ...props\n}: ContextMenuRadioItemLabelProps) => {\n return <span className={cn('col-start-2', className)} {...props} />\n}\n\nContextMenuRadioItemLabel.displayName = 'ContextMenuRadioItemLabel'\n\n// ============================================================================\n// ContextMenuSubmenuTrigger\n// ============================================================================\n\ntype ContextMenuSubmenuTriggerProps = React.ComponentProps<\n typeof BaseContextMenu.SubmenuTrigger\n>\n\nconst ContextMenuSubmenuTrigger = ({\n className,\n ...props\n}: ContextMenuSubmenuTriggerProps) => {\n return (\n <BaseContextMenu.SubmenuTrigger\n className={cn(\n buttonVariants({ variant: 'ghost', size: 'sm' }),\n 'flex justify-between',\n className,\n )}\n {...props}\n />\n )\n}\n\nContextMenuSubmenuTrigger.displayName = 'ContextMenuSubmenuTrigger'\n\n// ============================================================================\n// ContextMenuSubmenuRoot\n// ============================================================================\n\ntype ContextMenuSubmenuRootProps = React.ComponentProps<\n typeof BaseContextMenu.SubmenuRoot\n>\n\nconst ContextMenuSubmenuRoot = (props: ContextMenuSubmenuRootProps) => {\n return <BaseContextMenu.SubmenuRoot {...props} />\n}\n\nContextMenuSubmenuRoot.displayName = 'ContextMenuSubmenuRoot'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n ContextMenuRoot,\n ContextMenuTrigger,\n ContextMenuPortal,\n ContextMenuPositioner,\n ContextMenuPopup,\n ContextMenuArrow,\n ContextMenuItem,\n ContextMenuSeparator,\n ContextMenuGroup,\n ContextMenuGroupLabel,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuRadioItemIndicator,\n ContextMenuRadioItemLabel,\n ContextMenuCheckboxItem,\n ContextMenuCheckboxItemIndicator,\n ContextMenuCheckboxItemLabel,\n ContextMenuSubmenuTrigger,\n ContextMenuSubmenuRoot,\n}\n\nexport type {\n ContextMenuRootProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuPositionerProps,\n ContextMenuPopupProps,\n ContextMenuArrowProps,\n ContextMenuItemProps,\n ContextMenuSeparatorProps,\n ContextMenuGroupProps,\n ContextMenuGroupLabelProps,\n ContextMenuRadioGroupProps,\n ContextMenuRadioItemProps,\n ContextMenuRadioItemIndicatorProps,\n ContextMenuRadioItemLabelProps,\n ContextMenuCheckboxItemProps,\n ContextMenuCheckboxItemIndicatorProps,\n ContextMenuCheckboxItemLabelProps,\n ContextMenuSubmenuTriggerProps,\n ContextMenuSubmenuRootProps,\n}\n"],"mappings":";;;;;;;;;;AAeA,MAAM,mBAAmB,UAAgC;AACvD,QAAO,oBAACA,YAAgB,QAAK,GAAI,QAAS;;AAG5C,gBAAgB,cAAc;AAQ9B,MAAM,sBAAsB,EAAE,WAAW,GAAG,YAAqC;AAC/E,QAAO,oBAACA,YAAgB;EAAQ,WAAW,GAAG,UAAU;EAAE,GAAI;GAAS;;AAGzE,mBAAmB,cAAc;AAQjC,MAAM,qBAAqB,UAAkC;AAC3D,QAAO,oBAACA,YAAgB,UAAO,GAAI,QAAS;;AAG9C,kBAAkB,cAAc;AAQhC,MAAM,yBAAyB,EAAE,WAAW,GAAG,YAAwC;AACrF,QACE,oBAACA,YAAgB;EACf,WAAW,GAAG,qBAAqB,UAAU;EAC7C,YAAY;EACZ,GAAI;GACJ;;AAIN,sBAAsB,cAAc;AAQpC,MAAM,oBAAoB,EAAE,WAAW,GAAG,YAAmC;AAC3E,QACE,oBAACA,YAAgB;EACf,WAAW,GACT,sPACA,gBACA,UACD;EACD,GAAI;GACJ;;AAIN,iBAAiB,cAAc;AAQ/B,MAAM,oBAAoB,EAAE,WAAW,GAAG,YAAmC;AAC3E,QACE,oBAACA,YAAgB;EACf,WAAW,GACT,qNACA,UACD;EACD,GAAI;YAEJ,oBAAC,aAAW;GACU;;AAI5B,iBAAiB,cAAc;AAQ/B,MAAM,mBAAmB,EAAE,WAAW,GAAG,YAA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41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
|
|
1
|
+
import { ButtonSize, ButtonVariant } from "./lib/button-variants.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as react_jsx_runtime211 from "react/jsx-runtime";
|
|
4
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
5
|
+
|
|
6
|
+
//#region src/components/dialog.d.ts
|
|
7
|
+
type DialogRootProps = React.ComponentProps<typeof Dialog.Root>;
|
|
8
|
+
declare const DialogRoot: {
|
|
9
|
+
(props: DialogRootProps): react_jsx_runtime211.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
type DialogTriggerProps = React.ComponentProps<typeof Dialog.Trigger> & {
|
|
13
|
+
/** Visual style variant */
|
|
14
|
+
variant?: ButtonVariant;
|
|
15
|
+
/** Size of the trigger button */
|
|
16
|
+
size?: ButtonSize;
|
|
17
|
+
};
|
|
18
|
+
declare const DialogTrigger: {
|
|
19
|
+
({
|
|
20
|
+
className,
|
|
21
|
+
variant,
|
|
22
|
+
size,
|
|
23
|
+
...props
|
|
24
|
+
}: DialogTriggerProps): react_jsx_runtime211.JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
type DialogPortalProps = React.ComponentProps<typeof Dialog.Portal>;
|
|
28
|
+
declare const DialogPortal: {
|
|
29
|
+
(props: DialogPortalProps): react_jsx_runtime211.JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
type DialogBackdropProps = React.ComponentProps<typeof Dialog.Backdrop>;
|
|
33
|
+
declare const DialogBackdrop: {
|
|
34
|
+
({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: DialogBackdropProps): react_jsx_runtime211.JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
type DialogPopupProps = React.ComponentProps<typeof Dialog.Popup> & {
|
|
41
|
+
/** Size of the dialog popup */
|
|
42
|
+
size?: 'sm' | 'default' | 'lg' | 'xl' | 'full';
|
|
43
|
+
};
|
|
44
|
+
declare const DialogPopup: {
|
|
45
|
+
({
|
|
46
|
+
className,
|
|
47
|
+
size,
|
|
48
|
+
...props
|
|
49
|
+
}: DialogPopupProps): react_jsx_runtime211.JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
|
52
|
+
type DialogTitleProps = React.ComponentProps<typeof Dialog.Title>;
|
|
53
|
+
declare const DialogTitle: {
|
|
54
|
+
({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: DialogTitleProps): react_jsx_runtime211.JSX.Element;
|
|
58
|
+
displayName: string;
|
|
59
|
+
};
|
|
60
|
+
type DialogDescriptionProps = React.ComponentProps<typeof Dialog.Description>;
|
|
61
|
+
declare const DialogDescription: {
|
|
62
|
+
({
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}: DialogDescriptionProps): react_jsx_runtime211.JSX.Element;
|
|
66
|
+
displayName: string;
|
|
67
|
+
};
|
|
68
|
+
type DialogCloseProps = React.ComponentProps<typeof Dialog.Close> & {
|
|
69
|
+
/** Visual style variant */
|
|
70
|
+
variant?: ButtonVariant;
|
|
71
|
+
/** Size of the close button */
|
|
72
|
+
size?: ButtonSize;
|
|
73
|
+
};
|
|
74
|
+
declare const DialogClose: {
|
|
75
|
+
({
|
|
76
|
+
className,
|
|
77
|
+
variant,
|
|
78
|
+
size,
|
|
79
|
+
...props
|
|
80
|
+
}: DialogCloseProps): react_jsx_runtime211.JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
type DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
84
|
+
declare const DialogHeader: {
|
|
85
|
+
({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: DialogHeaderProps): react_jsx_runtime211.JSX.Element;
|
|
89
|
+
displayName: string;
|
|
90
|
+
};
|
|
91
|
+
type DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
92
|
+
declare const DialogFooter: {
|
|
93
|
+
({
|
|
94
|
+
className,
|
|
95
|
+
...props
|
|
96
|
+
}: DialogFooterProps): react_jsx_runtime211.JSX.Element;
|
|
97
|
+
displayName: string;
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { DialogBackdrop, type DialogBackdropProps, DialogClose, type DialogCloseProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogPopup, type DialogPopupProps, DialogPortal, type DialogPortalProps, DialogRoot, type DialogRootProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps };
|
|
101
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","names":[],"sources":["../src/components/dialog.tsx"],"sourcesContent":[],"mappings":";;;;;;KAiBK,eAAA,GAAkB,KAAA,CAAM,sBAAsB,MAAA,CAAW;cAExD;UAAqB,kBAAe,oBA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