@usememos/ui 26.10.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 +117 -0
- package/dist/button.cjs +74 -0
- package/dist/button.d.cts +15 -0
- package/dist/button.d.ts +15 -0
- package/dist/button.js +7 -0
- package/dist/checkbox.cjs +98 -0
- package/dist/checkbox.d.cts +16 -0
- package/dist/checkbox.d.ts +16 -0
- package/dist/checkbox.js +7 -0
- package/dist/chunk-3DNMGJFC.js +216 -0
- package/dist/chunk-3VYNJ6UM.js +27 -0
- package/dist/chunk-3YY2G3JK.js +125 -0
- package/dist/chunk-5GQEJQKE.js +60 -0
- package/dist/chunk-6TNEFWVX.js +9 -0
- package/dist/chunk-BH4MPO4N.js +25 -0
- package/dist/chunk-F6GH4X7N.js +34 -0
- package/dist/chunk-HYN2P4OY.js +84 -0
- package/dist/chunk-OIUVLPTE.js +54 -0
- package/dist/chunk-S6LVYCE6.js +157 -0
- package/dist/chunk-SNSDJKJP.js +44 -0
- package/dist/chunk-WPO54YPG.js +328 -0
- package/dist/chunk-Z3ME5VRQ.js +98 -0
- package/dist/control-size-Bz2gyuyO.d.cts +3 -0
- package/dist/control-size-Bz2gyuyO.d.ts +3 -0
- package/dist/dialog.cjs +203 -0
- package/dist/dialog.d.cts +34 -0
- package/dist/dialog.d.ts +34 -0
- package/dist/dialog.js +8 -0
- package/dist/dropdown-menu.cjs +378 -0
- package/dist/dropdown-menu.d.cts +60 -0
- package/dist/dropdown-menu.d.ts +60 -0
- package/dist/dropdown-menu.js +8 -0
- package/dist/index.cjs +1223 -0
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +48 -0
- package/dist/input.cjs +67 -0
- package/dist/input.d.cts +11 -0
- package/dist/input.d.ts +11 -0
- package/dist/input.js +7 -0
- package/dist/popover.cjs +175 -0
- package/dist/popover.d.cts +53 -0
- package/dist/popover.d.ts +53 -0
- package/dist/popover.js +8 -0
- package/dist/radio-group.cjs +122 -0
- package/dist/radio-group.d.cts +25 -0
- package/dist/radio-group.d.ts +25 -0
- package/dist/radio-group.js +7 -0
- package/dist/select.cjs +266 -0
- package/dist/select.d.cts +45 -0
- package/dist/select.d.ts +45 -0
- package/dist/select.js +8 -0
- package/dist/separator.cjs +82 -0
- package/dist/separator.d.cts +12 -0
- package/dist/separator.d.ts +12 -0
- package/dist/separator.js +7 -0
- package/dist/switch.cjs +92 -0
- package/dist/switch.d.cts +16 -0
- package/dist/switch.d.ts +16 -0
- package/dist/switch.js +7 -0
- package/dist/theme.css +1097 -0
- package/dist/tooltip.cjs +148 -0
- package/dist/tooltip.d.cts +24 -0
- package/dist/tooltip.d.ts +24 -0
- package/dist/tooltip.js +8 -0
- package/package.json +172 -0
package/dist/dialog.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as _base_ui_react from '@base-ui/react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Dialog as Dialog$2 } from '@base-ui/react/dialog';
|
|
4
|
+
|
|
5
|
+
declare const Dialog$1: {
|
|
6
|
+
Root: React.FC<Dialog$2.Root.Props<unknown>>;
|
|
7
|
+
Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
Portal: React.FC<Omit<Omit<_base_ui_react.DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
9
|
+
Overlay: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Content: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Close: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
Title: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
13
|
+
Description: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare const Dialog: {
|
|
17
|
+
Root: React.FC<_base_ui_react.DialogRoot.Props<unknown>>;
|
|
18
|
+
Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
Portal: React.FC<Omit<Omit<_base_ui_react.DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
20
|
+
Overlay: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
Content: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
22
|
+
showCloseButton?: boolean;
|
|
23
|
+
slotProps?: {
|
|
24
|
+
close?: React.ComponentPropsWithoutRef<typeof Dialog$1.Close>;
|
|
25
|
+
};
|
|
26
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
Close: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
Header: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
Footer: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
Title: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
31
|
+
Description: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { Dialog };
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/dropdown-menu.ts
|
|
31
|
+
var dropdown_menu_exports = {};
|
|
32
|
+
__export(dropdown_menu_exports, {
|
|
33
|
+
DropdownMenu: () => DropdownMenu2
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(dropdown_menu_exports);
|
|
36
|
+
|
|
37
|
+
// src/overlay/dropdown-menu.tsx
|
|
38
|
+
var import_lucide_react = require("lucide-react");
|
|
39
|
+
|
|
40
|
+
// ../primitives/src/overlay/dropdown-menu.tsx
|
|
41
|
+
var import_menu = require("@base-ui/react/menu");
|
|
42
|
+
var React = __toESM(require("react"), 1);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
var Root = (props) => {
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Root, { "data-scope": "dropdown-menu", "data-part": "root", ...props });
|
|
46
|
+
};
|
|
47
|
+
var Trigger = React.forwardRef((props, ref) => {
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Trigger, { ref, "data-scope": "dropdown-menu", "data-part": "trigger", ...props });
|
|
49
|
+
});
|
|
50
|
+
var Portal = (props) => {
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Portal, { "data-scope": "dropdown-menu", "data-part": "portal", ...props });
|
|
52
|
+
};
|
|
53
|
+
var Content = React.forwardRef(
|
|
54
|
+
({
|
|
55
|
+
className,
|
|
56
|
+
children,
|
|
57
|
+
align = "start",
|
|
58
|
+
collisionPadding = 8,
|
|
59
|
+
sideOffset = 4,
|
|
60
|
+
...props
|
|
61
|
+
}, ref) => {
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
import_menu.Menu.Positioner,
|
|
64
|
+
{
|
|
65
|
+
"data-scope": "dropdown-menu",
|
|
66
|
+
"data-part": "positioner",
|
|
67
|
+
align,
|
|
68
|
+
collisionPadding,
|
|
69
|
+
sideOffset,
|
|
70
|
+
...props,
|
|
71
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
+
import_menu.Menu.Popup,
|
|
73
|
+
{
|
|
74
|
+
ref,
|
|
75
|
+
"data-scope": "dropdown-menu",
|
|
76
|
+
"data-part": "content",
|
|
77
|
+
className,
|
|
78
|
+
children
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
var Item = React.forwardRef((props, ref) => {
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Item, { ref, "data-scope": "dropdown-menu", "data-part": "item", ...props });
|
|
87
|
+
});
|
|
88
|
+
var CheckboxItem = React.forwardRef((props, ref) => {
|
|
89
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.CheckboxItem, { ref, "data-scope": "dropdown-menu", "data-part": "checkbox-item", ...props });
|
|
90
|
+
});
|
|
91
|
+
var CheckboxItemIndicator = React.forwardRef((props, ref) => {
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
import_menu.Menu.CheckboxItemIndicator,
|
|
94
|
+
{
|
|
95
|
+
ref,
|
|
96
|
+
"data-scope": "dropdown-menu",
|
|
97
|
+
"data-part": "checkbox-item-indicator",
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
var RadioItem = React.forwardRef((props, ref) => {
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.RadioItem, { ref, "data-scope": "dropdown-menu", "data-part": "radio-item", ...props });
|
|
104
|
+
});
|
|
105
|
+
var RadioItemIndicator = React.forwardRef((props, ref) => {
|
|
106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
import_menu.Menu.RadioItemIndicator,
|
|
108
|
+
{
|
|
109
|
+
ref,
|
|
110
|
+
"data-scope": "dropdown-menu",
|
|
111
|
+
"data-part": "radio-item-indicator",
|
|
112
|
+
...props
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
var Label = React.forwardRef((props, ref) => {
|
|
117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.GroupLabel, { ref, "data-scope": "dropdown-menu", "data-part": "label", ...props });
|
|
118
|
+
});
|
|
119
|
+
var Separator = React.forwardRef((props, ref) => {
|
|
120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Separator, { ref, "data-scope": "dropdown-menu", "data-part": "separator", ...props });
|
|
121
|
+
});
|
|
122
|
+
var Group = (props) => {
|
|
123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Group, { "data-scope": "dropdown-menu", "data-part": "group", ...props });
|
|
124
|
+
};
|
|
125
|
+
var Sub = (props) => {
|
|
126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.SubmenuRoot, { "data-scope": "dropdown-menu", "data-part": "sub", ...props });
|
|
127
|
+
};
|
|
128
|
+
var SubTrigger = React.forwardRef((props, ref) => {
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.SubmenuTrigger, { ref, "data-scope": "dropdown-menu", "data-part": "sub-trigger", ...props });
|
|
130
|
+
});
|
|
131
|
+
var SubContent = React.forwardRef(
|
|
132
|
+
({
|
|
133
|
+
className,
|
|
134
|
+
children,
|
|
135
|
+
align = "start",
|
|
136
|
+
collisionPadding = 8,
|
|
137
|
+
sideOffset = 4,
|
|
138
|
+
...props
|
|
139
|
+
}, ref) => {
|
|
140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
|
+
import_menu.Menu.Positioner,
|
|
142
|
+
{
|
|
143
|
+
"data-scope": "dropdown-menu",
|
|
144
|
+
"data-part": "sub-positioner",
|
|
145
|
+
align,
|
|
146
|
+
collisionPadding,
|
|
147
|
+
sideOffset,
|
|
148
|
+
...props,
|
|
149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
150
|
+
import_menu.Menu.Popup,
|
|
151
|
+
{
|
|
152
|
+
ref,
|
|
153
|
+
"data-scope": "dropdown-menu",
|
|
154
|
+
"data-part": "sub-content",
|
|
155
|
+
className,
|
|
156
|
+
children
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
var RadioGroup = (props) => {
|
|
164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.RadioGroup, { "data-scope": "dropdown-menu", "data-part": "radio-group", ...props });
|
|
165
|
+
};
|
|
166
|
+
Root.displayName = "DropdownMenu.Root";
|
|
167
|
+
Trigger.displayName = "DropdownMenu.Trigger";
|
|
168
|
+
Portal.displayName = "DropdownMenu.Portal";
|
|
169
|
+
Content.displayName = "DropdownMenu.Content";
|
|
170
|
+
Item.displayName = "DropdownMenu.Item";
|
|
171
|
+
CheckboxItem.displayName = "DropdownMenu.CheckboxItem";
|
|
172
|
+
CheckboxItemIndicator.displayName = "DropdownMenu.CheckboxItemIndicator";
|
|
173
|
+
RadioItem.displayName = "DropdownMenu.RadioItem";
|
|
174
|
+
RadioItemIndicator.displayName = "DropdownMenu.RadioItemIndicator";
|
|
175
|
+
Label.displayName = "DropdownMenu.Label";
|
|
176
|
+
Separator.displayName = "DropdownMenu.Separator";
|
|
177
|
+
Group.displayName = "DropdownMenu.Group";
|
|
178
|
+
Sub.displayName = "DropdownMenu.Sub";
|
|
179
|
+
SubTrigger.displayName = "DropdownMenu.SubTrigger";
|
|
180
|
+
SubContent.displayName = "DropdownMenu.SubContent";
|
|
181
|
+
RadioGroup.displayName = "DropdownMenu.RadioGroup";
|
|
182
|
+
var DropdownMenu = {
|
|
183
|
+
Root,
|
|
184
|
+
Trigger,
|
|
185
|
+
Portal,
|
|
186
|
+
Content,
|
|
187
|
+
Item,
|
|
188
|
+
CheckboxItem,
|
|
189
|
+
CheckboxItemIndicator,
|
|
190
|
+
RadioItem,
|
|
191
|
+
RadioItemIndicator,
|
|
192
|
+
Label,
|
|
193
|
+
Separator,
|
|
194
|
+
Group,
|
|
195
|
+
Sub,
|
|
196
|
+
SubTrigger,
|
|
197
|
+
SubContent,
|
|
198
|
+
RadioGroup
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// src/overlay/layer-context.tsx
|
|
202
|
+
var React2 = __toESM(require("react"), 1);
|
|
203
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
204
|
+
var OverlayLayerContext = React2.createContext("root");
|
|
205
|
+
function useOverlayLayerProps(props) {
|
|
206
|
+
const layer = React2.useContext(OverlayLayerContext);
|
|
207
|
+
if (layer === "root") {
|
|
208
|
+
return props;
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
...props,
|
|
212
|
+
"data-mui-layer": layer
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// src/shared/cx.ts
|
|
217
|
+
var import_clsx = require("clsx");
|
|
218
|
+
function cx(...values) {
|
|
219
|
+
return (0, import_clsx.clsx)(values);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// src/overlay/dropdown-menu.tsx
|
|
223
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
224
|
+
var Root2 = DropdownMenu.Root;
|
|
225
|
+
var Trigger2 = DropdownMenu.Trigger;
|
|
226
|
+
var Portal2 = DropdownMenu.Portal;
|
|
227
|
+
var Group2 = DropdownMenu.Group;
|
|
228
|
+
var Sub2 = DropdownMenu.Sub;
|
|
229
|
+
var RadioGroup2 = DropdownMenu.RadioGroup;
|
|
230
|
+
function ItemText({ className, ...props }) {
|
|
231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cx("mui-dropdown-menu__item-text", className), ...props });
|
|
232
|
+
}
|
|
233
|
+
function Shortcut({ className, ...props }) {
|
|
234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cx("mui-dropdown-menu__shortcut", className), ...props });
|
|
235
|
+
}
|
|
236
|
+
function Content2({
|
|
237
|
+
className,
|
|
238
|
+
sideOffset = 4,
|
|
239
|
+
...props
|
|
240
|
+
}) {
|
|
241
|
+
const layerProps = useOverlayLayerProps(props);
|
|
242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
243
|
+
DropdownMenu.Content,
|
|
244
|
+
{
|
|
245
|
+
className: cx("mui-dropdown-menu__content", className),
|
|
246
|
+
sideOffset,
|
|
247
|
+
...layerProps
|
|
248
|
+
}
|
|
249
|
+
) });
|
|
250
|
+
}
|
|
251
|
+
function Item2({
|
|
252
|
+
className,
|
|
253
|
+
children,
|
|
254
|
+
...props
|
|
255
|
+
}) {
|
|
256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
257
|
+
DropdownMenu.Item,
|
|
258
|
+
{
|
|
259
|
+
className: cx("mui-dropdown-menu__item", className),
|
|
260
|
+
...props,
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-leading", "aria-hidden": "true" }),
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ItemText, { children })
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
function CheckboxItem2({
|
|
269
|
+
className,
|
|
270
|
+
children,
|
|
271
|
+
...props
|
|
272
|
+
}) {
|
|
273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
274
|
+
DropdownMenu.CheckboxItem,
|
|
275
|
+
{
|
|
276
|
+
className: cx("mui-dropdown-menu__item", className),
|
|
277
|
+
...props,
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-leading", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenu.CheckboxItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.CheckIcon, { className: "mui-dropdown-menu__item-indicator", size: 10 }) }) }),
|
|
280
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ItemText, { children })
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
function RadioItem2({
|
|
286
|
+
className,
|
|
287
|
+
children,
|
|
288
|
+
...props
|
|
289
|
+
}) {
|
|
290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
291
|
+
DropdownMenu.RadioItem,
|
|
292
|
+
{
|
|
293
|
+
className: cx("mui-dropdown-menu__item", className),
|
|
294
|
+
...props,
|
|
295
|
+
children: [
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-leading", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenu.RadioItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.CircleIcon, { className: "mui-dropdown-menu__item-indicator", size: 6, fill: "currentColor" }) }) }),
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ItemText, { children })
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
function Label2({
|
|
303
|
+
className,
|
|
304
|
+
...props
|
|
305
|
+
}) {
|
|
306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
307
|
+
DropdownMenu.Label,
|
|
308
|
+
{
|
|
309
|
+
className: cx("mui-dropdown-menu__label", className),
|
|
310
|
+
...props
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
function Separator2({
|
|
315
|
+
className,
|
|
316
|
+
...props
|
|
317
|
+
}) {
|
|
318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
319
|
+
DropdownMenu.Separator,
|
|
320
|
+
{
|
|
321
|
+
className: cx("mui-dropdown-menu__separator", className),
|
|
322
|
+
...props
|
|
323
|
+
}
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
function SubTrigger2({
|
|
327
|
+
className,
|
|
328
|
+
children,
|
|
329
|
+
...props
|
|
330
|
+
}) {
|
|
331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
332
|
+
DropdownMenu.SubTrigger,
|
|
333
|
+
{
|
|
334
|
+
className: cx("mui-dropdown-menu__sub-trigger", className),
|
|
335
|
+
...props,
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-leading", "aria-hidden": "true" }),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ItemText, { children }),
|
|
339
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-trailing", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.ChevronRightIcon, { size: 12 }) })
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
function SubContent2({
|
|
345
|
+
className,
|
|
346
|
+
...props
|
|
347
|
+
}) {
|
|
348
|
+
const layerProps = useOverlayLayerProps(props);
|
|
349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
350
|
+
DropdownMenu.SubContent,
|
|
351
|
+
{
|
|
352
|
+
className: cx("mui-dropdown-menu__content", className),
|
|
353
|
+
...layerProps
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
var DropdownMenu2 = {
|
|
358
|
+
Root: Root2,
|
|
359
|
+
Trigger: Trigger2,
|
|
360
|
+
Portal: Portal2,
|
|
361
|
+
Group: Group2,
|
|
362
|
+
Sub: Sub2,
|
|
363
|
+
RadioGroup: RadioGroup2,
|
|
364
|
+
Content: Content2,
|
|
365
|
+
Item: Item2,
|
|
366
|
+
CheckboxItem: CheckboxItem2,
|
|
367
|
+
RadioItem: RadioItem2,
|
|
368
|
+
Label: Label2,
|
|
369
|
+
Separator: Separator2,
|
|
370
|
+
ItemText,
|
|
371
|
+
Shortcut,
|
|
372
|
+
SubTrigger: SubTrigger2,
|
|
373
|
+
SubContent: SubContent2
|
|
374
|
+
};
|
|
375
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
376
|
+
0 && (module.exports = {
|
|
377
|
+
DropdownMenu
|
|
378
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as _base_ui_react from '@base-ui/react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Menu } from '@base-ui/react/menu';
|
|
5
|
+
|
|
6
|
+
declare const DropdownMenu$1: {
|
|
7
|
+
Root: React.FC<Menu.Root.Props<unknown>>;
|
|
8
|
+
Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.MenuTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
Portal: React.FC<Omit<Omit<_base_ui_react.ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
10
|
+
Content: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.ContextMenuPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "className" | "children"> & {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Item: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
CheckboxItem: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuCheckboxItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
16
|
+
CheckboxItemIndicator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuCheckboxItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
17
|
+
RadioItem: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuRadioItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
18
|
+
RadioItemIndicator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuRadioItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
19
|
+
Label: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Separator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
Group: React.FC<Omit<Omit<_base_ui_react.ContextMenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
22
|
+
Sub: React.FC<_base_ui_react.ContextMenuSubmenuRootProps>;
|
|
23
|
+
SubTrigger: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuSubmenuTriggerProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
24
|
+
SubContent: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.ContextMenuPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "className" | "children"> & {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
RadioGroup: React.FC<Omit<Omit<_base_ui_react.ContextMenuRadioGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare function ItemText({ className, ...props }: React.ComponentPropsWithoutRef<"span">): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare function Shortcut({ className, ...props }: React.ComponentPropsWithoutRef<"span">): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function Content({ className, sideOffset, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Content>): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function Item({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Item>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare function CheckboxItem({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare function RadioItem({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
37
|
+
declare function Label({ className, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Label>): react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare function Separator({ className, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare function SubTrigger({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.SubTrigger>): react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare function SubContent({ className, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.SubContent>): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare const DropdownMenu: {
|
|
42
|
+
Root: React.FC<_base_ui_react.MenuRoot.Props<unknown>>;
|
|
43
|
+
Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.MenuTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
Portal: React.FC<Omit<Omit<_base_ui_react.ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
45
|
+
Group: React.FC<Omit<Omit<_base_ui_react.ContextMenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
46
|
+
Sub: React.FC<_base_ui_react.ContextMenuSubmenuRootProps>;
|
|
47
|
+
RadioGroup: React.FC<Omit<Omit<_base_ui_react.ContextMenuRadioGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
48
|
+
Content: typeof Content;
|
|
49
|
+
Item: typeof Item;
|
|
50
|
+
CheckboxItem: typeof CheckboxItem;
|
|
51
|
+
RadioItem: typeof RadioItem;
|
|
52
|
+
Label: typeof Label;
|
|
53
|
+
Separator: typeof Separator;
|
|
54
|
+
ItemText: typeof ItemText;
|
|
55
|
+
Shortcut: typeof Shortcut;
|
|
56
|
+
SubTrigger: typeof SubTrigger;
|
|
57
|
+
SubContent: typeof SubContent;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as _base_ui_react from '@base-ui/react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Menu } from '@base-ui/react/menu';
|
|
5
|
+
|
|
6
|
+
declare const DropdownMenu$1: {
|
|
7
|
+
Root: React.FC<Menu.Root.Props<unknown>>;
|
|
8
|
+
Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.MenuTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
Portal: React.FC<Omit<Omit<_base_ui_react.ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
10
|
+
Content: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.ContextMenuPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "className" | "children"> & {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Item: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
15
|
+
CheckboxItem: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuCheckboxItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
16
|
+
CheckboxItemIndicator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuCheckboxItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
17
|
+
RadioItem: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuRadioItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
18
|
+
RadioItemIndicator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuRadioItemIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
19
|
+
Label: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Separator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
Group: React.FC<Omit<Omit<_base_ui_react.ContextMenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
22
|
+
Sub: React.FC<_base_ui_react.ContextMenuSubmenuRootProps>;
|
|
23
|
+
SubTrigger: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.ContextMenuSubmenuTriggerProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
24
|
+
SubContent: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.ContextMenuPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">, "className" | "children"> & {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
RadioGroup: React.FC<Omit<Omit<_base_ui_react.ContextMenuRadioGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare function ItemText({ className, ...props }: React.ComponentPropsWithoutRef<"span">): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare function Shortcut({ className, ...props }: React.ComponentPropsWithoutRef<"span">): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function Content({ className, sideOffset, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Content>): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function Item({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Item>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare function CheckboxItem({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare function RadioItem({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
37
|
+
declare function Label({ className, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Label>): react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare function Separator({ className, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare function SubTrigger({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.SubTrigger>): react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare function SubContent({ className, ...props }: React.ComponentPropsWithoutRef<typeof DropdownMenu$1.SubContent>): react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare const DropdownMenu: {
|
|
42
|
+
Root: React.FC<_base_ui_react.MenuRoot.Props<unknown>>;
|
|
43
|
+
Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.MenuTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
44
|
+
Portal: React.FC<Omit<Omit<_base_ui_react.ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
45
|
+
Group: React.FC<Omit<Omit<_base_ui_react.ContextMenuGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
46
|
+
Sub: React.FC<_base_ui_react.ContextMenuSubmenuRootProps>;
|
|
47
|
+
RadioGroup: React.FC<Omit<Omit<_base_ui_react.ContextMenuRadioGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
|
|
48
|
+
Content: typeof Content;
|
|
49
|
+
Item: typeof Item;
|
|
50
|
+
CheckboxItem: typeof CheckboxItem;
|
|
51
|
+
RadioItem: typeof RadioItem;
|
|
52
|
+
Label: typeof Label;
|
|
53
|
+
Separator: typeof Separator;
|
|
54
|
+
ItemText: typeof ItemText;
|
|
55
|
+
Shortcut: typeof Shortcut;
|
|
56
|
+
SubTrigger: typeof SubTrigger;
|
|
57
|
+
SubContent: typeof SubContent;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { DropdownMenu };
|