@octanejs/radix 0.1.31 → 0.1.33
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/cjs/AccessibleIcon.cjs +56 -0
- package/dist/cjs/Accordion.cjs +272 -0
- package/dist/cjs/AlertDialog.cjs +144 -0
- package/dist/cjs/Arrow.cjs +43 -0
- package/dist/cjs/AspectRatio.cjs +56 -0
- package/dist/cjs/Avatar.cjs +150 -0
- package/dist/cjs/Checkbox.cjs +281 -0
- package/dist/cjs/Collapsible.cjs +176 -0
- package/dist/cjs/ContextMenu.cjs +315 -0
- package/dist/cjs/Dialog.cjs +291 -0
- package/dist/cjs/DismissableLayer.cjs +382 -0
- package/dist/cjs/DropdownMenu.cjs +296 -0
- package/dist/cjs/FocusScope.cjs +257 -0
- package/dist/cjs/Form.cjs +537 -0
- package/dist/cjs/HoverCard.cjs +309 -0
- package/dist/cjs/Label.cjs +42 -0
- package/dist/cjs/Menu.cjs +925 -0
- package/dist/cjs/Menubar.cjs +475 -0
- package/dist/cjs/NavigationMenu.cjs +942 -0
- package/dist/cjs/OneTimePasswordField.cjs +729 -0
- package/dist/cjs/PasswordToggleField.cjs +377 -0
- package/dist/cjs/Popover.cjs +340 -0
- package/dist/cjs/Popper.cjs +368 -0
- package/dist/cjs/Portal.cjs +40 -0
- package/dist/cjs/Presence.cjs +183 -0
- package/dist/cjs/Primitive.cjs +63 -0
- package/dist/cjs/Progress.cjs +111 -0
- package/dist/cjs/Radio.cjs +240 -0
- package/dist/cjs/RadioGroup.cjs +216 -0
- package/dist/cjs/RovingFocusGroup.cjs +253 -0
- package/dist/cjs/ScrollArea.cjs +828 -0
- package/dist/cjs/Select.cjs +1429 -0
- package/dist/cjs/Separator.cjs +51 -0
- package/dist/cjs/Slider.cjs +634 -0
- package/dist/cjs/Slot.cjs +97 -0
- package/dist/cjs/Switch.cjs +253 -0
- package/dist/cjs/Tabs.cjs +195 -0
- package/dist/cjs/Toast.cjs +733 -0
- package/dist/cjs/Toggle.cjs +54 -0
- package/dist/cjs/ToggleGroup.cjs +174 -0
- package/dist/cjs/Toolbar.cjs +165 -0
- package/dist/cjs/Tooltip.cjs +628 -0
- package/dist/cjs/VisuallyHidden.cjs +52 -0
- package/dist/cjs/collection.cjs +95 -0
- package/dist/cjs/compose-event-handlers.cjs +35 -0
- package/dist/cjs/compose-refs.cjs +68 -0
- package/dist/cjs/context.cjs +96 -0
- package/dist/cjs/direction.cjs +41 -0
- package/dist/cjs/focus-guards.cjs +76 -0
- package/dist/cjs/index.cjs +174 -0
- package/dist/cjs/internal.cjs +51 -0
- package/dist/cjs/scroll-lock.cjs +67 -0
- package/dist/cjs/use-callback-ref.cjs +47 -0
- package/dist/cjs/use-effect-event.cjs +52 -0
- package/dist/cjs/use-is-hydrated.cjs +43 -0
- package/dist/cjs/use-previous.cjs +47 -0
- package/dist/cjs/use-size.cjs +69 -0
- package/dist/cjs/useControllableState.cjs +80 -0
- package/dist/cjs/useId.cjs +36 -0
- package/package.json +14 -7
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var DismissableLayer_exports = {};
|
|
20
|
+
__export(DismissableLayer_exports, {
|
|
21
|
+
Branch: () => DismissableLayerBranch,
|
|
22
|
+
DismissableLayer: () => DismissableLayer,
|
|
23
|
+
DismissableLayerBranch: () => DismissableLayerBranch,
|
|
24
|
+
Root: () => DismissableLayer,
|
|
25
|
+
useDismissableLayerSurface: () => useDismissableLayerSurface
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(DismissableLayer_exports);
|
|
28
|
+
var import_octane = require("octane");
|
|
29
|
+
var import_compose_event_handlers = require("./compose-event-handlers.cjs");
|
|
30
|
+
var import_compose_refs = require("./compose-refs.cjs");
|
|
31
|
+
var import_internal = require("./internal.cjs");
|
|
32
|
+
var import_Primitive = require("./Primitive.cjs");
|
|
33
|
+
const CONTEXT_UPDATE = "dismissableLayer.update";
|
|
34
|
+
const POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
35
|
+
const FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
36
|
+
let originalBodyPointerEvents;
|
|
37
|
+
const layerContext = {
|
|
38
|
+
layers: /* @__PURE__ */ new Set(),
|
|
39
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
40
|
+
branches: /* @__PURE__ */ new Set(),
|
|
41
|
+
// Outside elements that belong to a layer's own dismiss affordance (eg, a dialog
|
|
42
|
+
// overlay). Pressing them should dismiss the layer regardless of whether or not they
|
|
43
|
+
// stop propagation.
|
|
44
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
45
|
+
};
|
|
46
|
+
function DismissableLayer(props) {
|
|
47
|
+
const slot = (0, import_internal.S)("DismissableLayer");
|
|
48
|
+
const {
|
|
49
|
+
disableOutsidePointerEvents = false,
|
|
50
|
+
deferPointerDownOutside = false,
|
|
51
|
+
onEscapeKeyDown,
|
|
52
|
+
onPointerDownOutside,
|
|
53
|
+
onFocusOutside,
|
|
54
|
+
onInteractOutside,
|
|
55
|
+
onDismiss,
|
|
56
|
+
ref: forwardedRef,
|
|
57
|
+
...layerProps
|
|
58
|
+
} = props ?? {};
|
|
59
|
+
const context = layerContext;
|
|
60
|
+
const [node, setNode] = (0, import_octane.useState)(null, (0, import_internal.subSlot)(slot, "node"));
|
|
61
|
+
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
62
|
+
const [, force] = (0, import_octane.useState)({}, (0, import_internal.subSlot)(slot, "force"));
|
|
63
|
+
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, setNode, (0, import_internal.subSlot)(slot, "refs"));
|
|
64
|
+
const layers = Array.from(context.layers);
|
|
65
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
66
|
+
...context.layersWithOutsidePointerEventsDisabled
|
|
67
|
+
].slice(-1);
|
|
68
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(
|
|
69
|
+
highestLayerWithOutsidePointerEventsDisabled
|
|
70
|
+
);
|
|
71
|
+
const index = node ? layers.indexOf(node) : -1;
|
|
72
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
73
|
+
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
74
|
+
const isDeferredPointerDownOutsideRef = (0, import_octane.useRef)(false, (0, import_internal.subSlot)(slot, "deferred"));
|
|
75
|
+
const pointerDownOutside = usePointerDownOutside(
|
|
76
|
+
(event) => {
|
|
77
|
+
const target = event.target;
|
|
78
|
+
if (!(target instanceof Node)) return;
|
|
79
|
+
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
80
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
81
|
+
onPointerDownOutside?.(event);
|
|
82
|
+
onInteractOutside?.(event);
|
|
83
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
ownerDocument,
|
|
87
|
+
deferPointerDownOutside,
|
|
88
|
+
isDeferredPointerDownOutsideRef,
|
|
89
|
+
dismissableSurfaces: context.dismissableSurfaces
|
|
90
|
+
},
|
|
91
|
+
(0, import_internal.subSlot)(slot, "pdo")
|
|
92
|
+
);
|
|
93
|
+
const focusOutside = useFocusOutside(
|
|
94
|
+
(event) => {
|
|
95
|
+
if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) return;
|
|
96
|
+
const target = event.target;
|
|
97
|
+
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
98
|
+
if (isFocusInBranch) return;
|
|
99
|
+
onFocusOutside?.(event);
|
|
100
|
+
onInteractOutside?.(event);
|
|
101
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
102
|
+
},
|
|
103
|
+
ownerDocument,
|
|
104
|
+
(0, import_internal.subSlot)(slot, "fo")
|
|
105
|
+
);
|
|
106
|
+
const isHighestLayer = node ? index === layers.length - 1 : false;
|
|
107
|
+
const handleKeyDown = (0, import_octane.useEffectEvent)(
|
|
108
|
+
(event) => {
|
|
109
|
+
if (event.key !== "Escape") return;
|
|
110
|
+
onEscapeKeyDown?.(event);
|
|
111
|
+
if (!event.defaultPrevented && onDismiss) {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
onDismiss();
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
(0, import_internal.subSlot)(slot, "esc")
|
|
117
|
+
);
|
|
118
|
+
(0, import_octane.useEffect)(
|
|
119
|
+
() => {
|
|
120
|
+
if (!isHighestLayer) return;
|
|
121
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
122
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
123
|
+
},
|
|
124
|
+
[ownerDocument, isHighestLayer],
|
|
125
|
+
(0, import_internal.subSlot)(slot, "e:esc")
|
|
126
|
+
);
|
|
127
|
+
(0, import_octane.useEffect)(
|
|
128
|
+
() => {
|
|
129
|
+
if (!node) return;
|
|
130
|
+
if (disableOutsidePointerEvents) {
|
|
131
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
132
|
+
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
133
|
+
ownerDocument.body.style.pointerEvents = "none";
|
|
134
|
+
}
|
|
135
|
+
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
136
|
+
}
|
|
137
|
+
context.layers.add(node);
|
|
138
|
+
dispatchUpdate();
|
|
139
|
+
return () => {
|
|
140
|
+
if (disableOutsidePointerEvents) {
|
|
141
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
142
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
143
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
[node, ownerDocument, disableOutsidePointerEvents],
|
|
149
|
+
(0, import_internal.subSlot)(slot, "e:layer")
|
|
150
|
+
);
|
|
151
|
+
(0, import_octane.useEffect)(
|
|
152
|
+
() => {
|
|
153
|
+
return () => {
|
|
154
|
+
if (!node) return;
|
|
155
|
+
context.layers.delete(node);
|
|
156
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
157
|
+
dispatchUpdate();
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
[node],
|
|
161
|
+
(0, import_internal.subSlot)(slot, "e:cleanup")
|
|
162
|
+
);
|
|
163
|
+
(0, import_octane.useEffect)(
|
|
164
|
+
() => {
|
|
165
|
+
const handleUpdate = () => force({});
|
|
166
|
+
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
167
|
+
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
168
|
+
},
|
|
169
|
+
[],
|
|
170
|
+
(0, import_internal.subSlot)(slot, "e:update")
|
|
171
|
+
);
|
|
172
|
+
return (0, import_octane.createElement)(import_Primitive.Primitive.div, {
|
|
173
|
+
...layerProps,
|
|
174
|
+
ref: composedRefs,
|
|
175
|
+
style: {
|
|
176
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
177
|
+
...props.style
|
|
178
|
+
},
|
|
179
|
+
onFocusCapture: (0, import_compose_event_handlers.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
180
|
+
onBlurCapture: (0, import_compose_event_handlers.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
181
|
+
onPointerDownCapture: (0, import_compose_event_handlers.composeEventHandlers)(
|
|
182
|
+
props.onPointerDownCapture,
|
|
183
|
+
pointerDownOutside.onPointerDownCapture
|
|
184
|
+
)
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function DismissableLayerBranch(props) {
|
|
188
|
+
const slot = (0, import_internal.S)("DismissableLayerBranch");
|
|
189
|
+
const { ref: forwardedRef, ...branchProps } = props ?? {};
|
|
190
|
+
const ref = (0, import_octane.useRef)(null, (0, import_internal.subSlot)(slot, "ref"));
|
|
191
|
+
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref, (0, import_internal.subSlot)(slot, "refs"));
|
|
192
|
+
(0, import_octane.useEffect)(
|
|
193
|
+
() => {
|
|
194
|
+
const node = ref.current;
|
|
195
|
+
if (node) {
|
|
196
|
+
layerContext.branches.add(node);
|
|
197
|
+
return () => {
|
|
198
|
+
layerContext.branches.delete(node);
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
[],
|
|
203
|
+
(0, import_internal.subSlot)(slot, "e:branch")
|
|
204
|
+
);
|
|
205
|
+
return (0, import_octane.createElement)(import_Primitive.Primitive.div, { ...branchProps, ref: composedRefs });
|
|
206
|
+
}
|
|
207
|
+
function useDismissableLayerSurface(...args) {
|
|
208
|
+
const slotArg = args[args.length - 1];
|
|
209
|
+
const slot = typeof slotArg === "symbol" ? slotArg : (0, import_internal.S)("useDismissableLayerSurface");
|
|
210
|
+
const [node, setNode] = (0, import_octane.useState)(null, (0, import_internal.subSlot)(slot, "node"));
|
|
211
|
+
(0, import_octane.useEffect)(
|
|
212
|
+
() => {
|
|
213
|
+
if (!node) return;
|
|
214
|
+
layerContext.dismissableSurfaces.add(node);
|
|
215
|
+
return () => {
|
|
216
|
+
layerContext.dismissableSurfaces.delete(node);
|
|
217
|
+
};
|
|
218
|
+
},
|
|
219
|
+
[node],
|
|
220
|
+
(0, import_internal.subSlot)(slot, "e:surface")
|
|
221
|
+
);
|
|
222
|
+
return setNode;
|
|
223
|
+
}
|
|
224
|
+
function usePointerDownOutside(onPointerDownOutside, args, slot) {
|
|
225
|
+
const {
|
|
226
|
+
ownerDocument,
|
|
227
|
+
deferPointerDownOutside,
|
|
228
|
+
isDeferredPointerDownOutsideRef,
|
|
229
|
+
dismissableSurfaces
|
|
230
|
+
} = args;
|
|
231
|
+
const handlePointerDownOutside = (0, import_octane.useEffectEvent)(onPointerDownOutside, (0, import_internal.subSlot)(slot, "cb"));
|
|
232
|
+
const isPointerInsideReactTreeRef = (0, import_octane.useRef)(false, (0, import_internal.subSlot)(slot, "inside"));
|
|
233
|
+
const isPointerDownOutsideRef = (0, import_octane.useRef)(false, (0, import_internal.subSlot)(slot, "outside"));
|
|
234
|
+
const interceptedRef = (0, import_octane.useRef)(/* @__PURE__ */ new Map(), (0, import_internal.subSlot)(slot, "intercepted"));
|
|
235
|
+
const handleClickRef = (0, import_octane.useRef)(() => {
|
|
236
|
+
}, (0, import_internal.subSlot)(slot, "click"));
|
|
237
|
+
(0, import_octane.useEffect)(
|
|
238
|
+
() => {
|
|
239
|
+
function resetOutsideInteraction() {
|
|
240
|
+
isPointerDownOutsideRef.current = false;
|
|
241
|
+
isDeferredPointerDownOutsideRef.current = false;
|
|
242
|
+
interceptedRef.current.clear();
|
|
243
|
+
}
|
|
244
|
+
function isOutsideInteractionIntercepted() {
|
|
245
|
+
return Array.from(interceptedRef.current.values()).some(Boolean);
|
|
246
|
+
}
|
|
247
|
+
function handleInteractionCapture(event) {
|
|
248
|
+
if (!isPointerDownOutsideRef.current) return;
|
|
249
|
+
const target = event.target;
|
|
250
|
+
const isDismissableSurface = target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target));
|
|
251
|
+
if (!isDismissableSurface) {
|
|
252
|
+
interceptedRef.current.set(event.type, true);
|
|
253
|
+
}
|
|
254
|
+
if (event.type === "click") {
|
|
255
|
+
window.setTimeout(() => {
|
|
256
|
+
if (isPointerDownOutsideRef.current) {
|
|
257
|
+
handleClickRef.current();
|
|
258
|
+
}
|
|
259
|
+
}, 0);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
function handleInteractionBubble(event) {
|
|
263
|
+
if (isPointerDownOutsideRef.current) {
|
|
264
|
+
interceptedRef.current.set(event.type, false);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const handlePointerDown = (event) => {
|
|
268
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
269
|
+
const eventDetail = { originalEvent: event };
|
|
270
|
+
const handleAndDispatchPointerDownOutsideEvent = () => {
|
|
271
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
272
|
+
const wasIntercepted = isOutsideInteractionIntercepted();
|
|
273
|
+
resetOutsideInteraction();
|
|
274
|
+
if (!wasIntercepted) {
|
|
275
|
+
handleAndDispatchCustomEvent(
|
|
276
|
+
POINTER_DOWN_OUTSIDE,
|
|
277
|
+
handlePointerDownOutside,
|
|
278
|
+
eventDetail,
|
|
279
|
+
{ discrete: true }
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
isPointerDownOutsideRef.current = true;
|
|
284
|
+
isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && event.button === 0;
|
|
285
|
+
interceptedRef.current.clear();
|
|
286
|
+
if (!deferPointerDownOutside || event.button !== 0) {
|
|
287
|
+
handleAndDispatchPointerDownOutsideEvent();
|
|
288
|
+
} else {
|
|
289
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
290
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
|
|
291
|
+
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
292
|
+
}
|
|
293
|
+
} else {
|
|
294
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
295
|
+
resetOutsideInteraction();
|
|
296
|
+
}
|
|
297
|
+
isPointerInsideReactTreeRef.current = false;
|
|
298
|
+
};
|
|
299
|
+
const outsideInteractionEvents = [
|
|
300
|
+
"pointerup",
|
|
301
|
+
"mousedown",
|
|
302
|
+
"mouseup",
|
|
303
|
+
"touchstart",
|
|
304
|
+
"touchend",
|
|
305
|
+
"click"
|
|
306
|
+
];
|
|
307
|
+
for (const eventName of outsideInteractionEvents) {
|
|
308
|
+
ownerDocument.addEventListener(eventName, handleInteractionCapture, true);
|
|
309
|
+
ownerDocument.addEventListener(eventName, handleInteractionBubble);
|
|
310
|
+
}
|
|
311
|
+
const timerId = window.setTimeout(() => {
|
|
312
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
313
|
+
}, 0);
|
|
314
|
+
return () => {
|
|
315
|
+
window.clearTimeout(timerId);
|
|
316
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
317
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
318
|
+
for (const eventName of outsideInteractionEvents) {
|
|
319
|
+
ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);
|
|
320
|
+
ownerDocument.removeEventListener(eventName, handleInteractionBubble);
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
},
|
|
324
|
+
[ownerDocument, deferPointerDownOutside],
|
|
325
|
+
(0, import_internal.subSlot)(slot, "e:pdo")
|
|
326
|
+
);
|
|
327
|
+
return {
|
|
328
|
+
// ensures we check the COMPONENT tree (not just DOM tree) — capture on the layer.
|
|
329
|
+
onPointerDownCapture: () => {
|
|
330
|
+
isPointerInsideReactTreeRef.current = true;
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
function useFocusOutside(onFocusOutside, ownerDocument, slot) {
|
|
335
|
+
const handleFocusOutside = (0, import_octane.useEffectEvent)(onFocusOutside, (0, import_internal.subSlot)(slot, "cb"));
|
|
336
|
+
const isFocusInsideReactTreeRef = (0, import_octane.useRef)(false, (0, import_internal.subSlot)(slot, "inside"));
|
|
337
|
+
(0, import_octane.useEffect)(
|
|
338
|
+
() => {
|
|
339
|
+
const handleFocus = (event) => {
|
|
340
|
+
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
341
|
+
const eventDetail = { originalEvent: event };
|
|
342
|
+
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
343
|
+
discrete: false
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
|
348
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
349
|
+
},
|
|
350
|
+
[ownerDocument],
|
|
351
|
+
(0, import_internal.subSlot)(slot, "e:fo")
|
|
352
|
+
);
|
|
353
|
+
return {
|
|
354
|
+
onFocusCapture: () => {
|
|
355
|
+
isFocusInsideReactTreeRef.current = true;
|
|
356
|
+
},
|
|
357
|
+
onBlurCapture: () => {
|
|
358
|
+
isFocusInsideReactTreeRef.current = false;
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
function dispatchUpdate() {
|
|
363
|
+
document.dispatchEvent(new CustomEvent(CONTEXT_UPDATE));
|
|
364
|
+
}
|
|
365
|
+
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
366
|
+
const target = detail.originalEvent.target;
|
|
367
|
+
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
368
|
+
if (handler) target.addEventListener(name, handler, { once: true });
|
|
369
|
+
if (discrete) {
|
|
370
|
+
(0, import_Primitive.dispatchDiscreteCustomEvent)(target, event);
|
|
371
|
+
} else {
|
|
372
|
+
target.dispatchEvent(event);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
376
|
+
0 && (module.exports = {
|
|
377
|
+
Branch,
|
|
378
|
+
DismissableLayer,
|
|
379
|
+
DismissableLayerBranch,
|
|
380
|
+
Root,
|
|
381
|
+
useDismissableLayerSurface
|
|
382
|
+
});
|
|
@@ -0,0 +1,296 @@
|
|
|
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
|
+
var DropdownMenu_exports = {};
|
|
30
|
+
__export(DropdownMenu_exports, {
|
|
31
|
+
Arrow: () => Arrow,
|
|
32
|
+
CheckboxItem: () => CheckboxItem,
|
|
33
|
+
Content: () => Content,
|
|
34
|
+
DropdownMenu: () => Root,
|
|
35
|
+
DropdownMenuContent: () => Content,
|
|
36
|
+
DropdownMenuItem: () => Item,
|
|
37
|
+
DropdownMenuTrigger: () => Trigger,
|
|
38
|
+
Group: () => Group,
|
|
39
|
+
Item: () => Item,
|
|
40
|
+
ItemIndicator: () => ItemIndicator,
|
|
41
|
+
Label: () => Label,
|
|
42
|
+
Portal: () => Portal,
|
|
43
|
+
RadioGroup: () => RadioGroup,
|
|
44
|
+
RadioItem: () => RadioItem,
|
|
45
|
+
Root: () => Root,
|
|
46
|
+
Separator: () => Separator,
|
|
47
|
+
Sub: () => Sub,
|
|
48
|
+
SubContent: () => SubContent,
|
|
49
|
+
SubTrigger: () => SubTrigger,
|
|
50
|
+
Trigger: () => Trigger,
|
|
51
|
+
createDropdownMenuScope: () => createDropdownMenuScope
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(DropdownMenu_exports);
|
|
54
|
+
var import_octane = require("octane");
|
|
55
|
+
var import_compose_event_handlers = require("./compose-event-handlers.cjs");
|
|
56
|
+
var import_compose_refs = require("./compose-refs.cjs");
|
|
57
|
+
var import_context = require("./context.cjs");
|
|
58
|
+
var import_internal = require("./internal.cjs");
|
|
59
|
+
var MenuPrimitive = __toESM(require("./Menu.cjs"), 1);
|
|
60
|
+
var import_Menu = require("./Menu.cjs");
|
|
61
|
+
var import_Primitive = require("./Primitive.cjs");
|
|
62
|
+
var import_useControllableState = require("./useControllableState.cjs");
|
|
63
|
+
var import_useId = require("./useId.cjs");
|
|
64
|
+
const DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
65
|
+
const [createDropdownMenuContext, createDropdownMenuScope] = (0, import_context.createContextScope)(
|
|
66
|
+
DROPDOWN_MENU_NAME,
|
|
67
|
+
[import_Menu.createMenuScope]
|
|
68
|
+
);
|
|
69
|
+
const useMenuScope = (0, import_Menu.createMenuScope)();
|
|
70
|
+
const [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
|
|
71
|
+
function Root(props) {
|
|
72
|
+
const slot = (0, import_internal.S)("DropdownMenu.Root");
|
|
73
|
+
const {
|
|
74
|
+
__scopeDropdownMenu,
|
|
75
|
+
children,
|
|
76
|
+
dir,
|
|
77
|
+
open: openProp,
|
|
78
|
+
defaultOpen,
|
|
79
|
+
onOpenChange,
|
|
80
|
+
modal = true
|
|
81
|
+
} = props ?? {};
|
|
82
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
83
|
+
const triggerRef = (0, import_octane.useRef)(null, (0, import_internal.subSlot)(slot, "trigger"));
|
|
84
|
+
const [open, setOpen] = (0, import_useControllableState.useControllableState)(
|
|
85
|
+
{ prop: openProp, defaultProp: defaultOpen ?? false, onChange: onOpenChange },
|
|
86
|
+
(0, import_internal.subSlot)(slot, "open")
|
|
87
|
+
);
|
|
88
|
+
return (0, import_octane.createElement)(DropdownMenuProvider, {
|
|
89
|
+
scope: __scopeDropdownMenu,
|
|
90
|
+
triggerId: (0, import_useId.useId)((0, import_internal.subSlot)(slot, "triggerId")),
|
|
91
|
+
triggerRef,
|
|
92
|
+
contentId: (0, import_useId.useId)((0, import_internal.subSlot)(slot, "contentId")),
|
|
93
|
+
open,
|
|
94
|
+
onOpenChange: setOpen,
|
|
95
|
+
onOpenToggle: (0, import_octane.useCallback)(
|
|
96
|
+
() => setOpen((prevOpen) => !prevOpen),
|
|
97
|
+
[setOpen],
|
|
98
|
+
(0, import_internal.subSlot)(slot, "toggle")
|
|
99
|
+
),
|
|
100
|
+
modal,
|
|
101
|
+
children: (0, import_octane.createElement)(MenuPrimitive.Root, {
|
|
102
|
+
...menuScope,
|
|
103
|
+
open,
|
|
104
|
+
onOpenChange: setOpen,
|
|
105
|
+
dir,
|
|
106
|
+
modal,
|
|
107
|
+
children
|
|
108
|
+
})
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function Trigger(props) {
|
|
112
|
+
const slot = (0, import_internal.S)("DropdownMenu.Trigger");
|
|
113
|
+
const { __scopeDropdownMenu, disabled = false, ref: forwardedRef, ...triggerProps } = props ?? {};
|
|
114
|
+
const context = useDropdownMenuContext("DropdownMenuTrigger", __scopeDropdownMenu);
|
|
115
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
116
|
+
const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef, (0, import_internal.subSlot)(slot, "refs"));
|
|
117
|
+
return (0, import_octane.createElement)(MenuPrimitive.Anchor, {
|
|
118
|
+
asChild: true,
|
|
119
|
+
...menuScope,
|
|
120
|
+
children: (0, import_octane.createElement)(import_Primitive.Primitive.button, {
|
|
121
|
+
type: "button",
|
|
122
|
+
id: context.triggerId,
|
|
123
|
+
"aria-haspopup": "menu",
|
|
124
|
+
"aria-expanded": context.open,
|
|
125
|
+
"aria-controls": context.open ? context.contentId : void 0,
|
|
126
|
+
"data-state": context.open ? "open" : "closed",
|
|
127
|
+
"data-disabled": disabled ? "" : void 0,
|
|
128
|
+
disabled,
|
|
129
|
+
...triggerProps,
|
|
130
|
+
ref: composedRefs,
|
|
131
|
+
onPointerDown: (0, import_compose_event_handlers.composeEventHandlers)(props?.onPointerDown, (event) => {
|
|
132
|
+
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
133
|
+
context.onOpenToggle();
|
|
134
|
+
if (!context.open) event.preventDefault();
|
|
135
|
+
}
|
|
136
|
+
}),
|
|
137
|
+
onKeyDown: (0, import_compose_event_handlers.composeEventHandlers)(props?.onKeyDown, (event) => {
|
|
138
|
+
if (disabled) return;
|
|
139
|
+
if (["Enter", " "].includes(event.key)) context.onOpenToggle();
|
|
140
|
+
if (event.key === "ArrowDown") context.onOpenChange(true);
|
|
141
|
+
if (["Enter", " ", "ArrowDown"].includes(event.key)) event.preventDefault();
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function Portal(props) {
|
|
147
|
+
const slot = (0, import_internal.S)("DropdownMenu.Portal");
|
|
148
|
+
const { __scopeDropdownMenu, ...portalProps } = props ?? {};
|
|
149
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
150
|
+
return (0, import_octane.createElement)(MenuPrimitive.Portal, { ...menuScope, ...portalProps });
|
|
151
|
+
}
|
|
152
|
+
function Content(props) {
|
|
153
|
+
const slot = (0, import_internal.S)("DropdownMenu.Content");
|
|
154
|
+
const { __scopeDropdownMenu, ...contentProps } = props ?? {};
|
|
155
|
+
const context = useDropdownMenuContext("DropdownMenuContent", __scopeDropdownMenu);
|
|
156
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
157
|
+
const hasInteractedOutsideRef = (0, import_octane.useRef)(false, (0, import_internal.subSlot)(slot, "interacted"));
|
|
158
|
+
return (0, import_octane.createElement)(MenuPrimitive.Content, {
|
|
159
|
+
id: context.contentId,
|
|
160
|
+
"aria-labelledby": context.triggerId,
|
|
161
|
+
...menuScope,
|
|
162
|
+
...contentProps,
|
|
163
|
+
onCloseAutoFocus: (0, import_compose_event_handlers.composeEventHandlers)(props?.onCloseAutoFocus, (event) => {
|
|
164
|
+
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
165
|
+
hasInteractedOutsideRef.current = false;
|
|
166
|
+
event.preventDefault();
|
|
167
|
+
}),
|
|
168
|
+
onInteractOutside: (0, import_compose_event_handlers.composeEventHandlers)(props?.onInteractOutside, (event) => {
|
|
169
|
+
const originalEvent = event.detail.originalEvent;
|
|
170
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
171
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
172
|
+
if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
|
|
173
|
+
}),
|
|
174
|
+
style: {
|
|
175
|
+
...props?.style,
|
|
176
|
+
// re-namespace exposed content custom properties
|
|
177
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
178
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
179
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
180
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
181
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function Group(props) {
|
|
186
|
+
const slot = (0, import_internal.S)("DropdownMenu.Group");
|
|
187
|
+
const { __scopeDropdownMenu, ...groupProps } = props ?? {};
|
|
188
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
189
|
+
return (0, import_octane.createElement)(MenuPrimitive.Group, { ...menuScope, ...groupProps });
|
|
190
|
+
}
|
|
191
|
+
function Label(props) {
|
|
192
|
+
const slot = (0, import_internal.S)("DropdownMenu.Label");
|
|
193
|
+
const { __scopeDropdownMenu, ...labelProps } = props ?? {};
|
|
194
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
195
|
+
return (0, import_octane.createElement)(MenuPrimitive.Label, { ...menuScope, ...labelProps });
|
|
196
|
+
}
|
|
197
|
+
function Item(props) {
|
|
198
|
+
const slot = (0, import_internal.S)("DropdownMenu.Item");
|
|
199
|
+
const { __scopeDropdownMenu, ...itemProps } = props ?? {};
|
|
200
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
201
|
+
return (0, import_octane.createElement)(MenuPrimitive.Item, { ...menuScope, ...itemProps });
|
|
202
|
+
}
|
|
203
|
+
function CheckboxItem(props) {
|
|
204
|
+
const slot = (0, import_internal.S)("DropdownMenu.CheckboxItem");
|
|
205
|
+
const { __scopeDropdownMenu, ...checkboxItemProps } = props ?? {};
|
|
206
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
207
|
+
return (0, import_octane.createElement)(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps });
|
|
208
|
+
}
|
|
209
|
+
function RadioGroup(props) {
|
|
210
|
+
const slot = (0, import_internal.S)("DropdownMenu.RadioGroup");
|
|
211
|
+
const { __scopeDropdownMenu, ...radioGroupProps } = props ?? {};
|
|
212
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
213
|
+
return (0, import_octane.createElement)(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps });
|
|
214
|
+
}
|
|
215
|
+
function RadioItem(props) {
|
|
216
|
+
const slot = (0, import_internal.S)("DropdownMenu.RadioItem");
|
|
217
|
+
const { __scopeDropdownMenu, ...radioItemProps } = props ?? {};
|
|
218
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
219
|
+
return (0, import_octane.createElement)(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps });
|
|
220
|
+
}
|
|
221
|
+
function ItemIndicator(props) {
|
|
222
|
+
const slot = (0, import_internal.S)("DropdownMenu.ItemIndicator");
|
|
223
|
+
const { __scopeDropdownMenu, ...itemIndicatorProps } = props ?? {};
|
|
224
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
225
|
+
return (0, import_octane.createElement)(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps });
|
|
226
|
+
}
|
|
227
|
+
function Separator(props) {
|
|
228
|
+
const slot = (0, import_internal.S)("DropdownMenu.Separator");
|
|
229
|
+
const { __scopeDropdownMenu, ...separatorProps } = props ?? {};
|
|
230
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
231
|
+
return (0, import_octane.createElement)(MenuPrimitive.Separator, { ...menuScope, ...separatorProps });
|
|
232
|
+
}
|
|
233
|
+
function Arrow(props) {
|
|
234
|
+
const slot = (0, import_internal.S)("DropdownMenu.Arrow");
|
|
235
|
+
const { __scopeDropdownMenu, ...arrowProps } = props ?? {};
|
|
236
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
237
|
+
return (0, import_octane.createElement)(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps });
|
|
238
|
+
}
|
|
239
|
+
function Sub(props) {
|
|
240
|
+
const slot = (0, import_internal.S)("DropdownMenu.Sub");
|
|
241
|
+
const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props ?? {};
|
|
242
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
243
|
+
const [open, setOpen] = (0, import_useControllableState.useControllableState)(
|
|
244
|
+
{ prop: openProp, defaultProp: defaultOpen ?? false, onChange: onOpenChange },
|
|
245
|
+
(0, import_internal.subSlot)(slot, "open")
|
|
246
|
+
);
|
|
247
|
+
return (0, import_octane.createElement)(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });
|
|
248
|
+
}
|
|
249
|
+
function SubTrigger(props) {
|
|
250
|
+
const slot = (0, import_internal.S)("DropdownMenu.SubTrigger");
|
|
251
|
+
const { __scopeDropdownMenu, ...subTriggerProps } = props ?? {};
|
|
252
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
253
|
+
return (0, import_octane.createElement)(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps });
|
|
254
|
+
}
|
|
255
|
+
function SubContent(props) {
|
|
256
|
+
const slot = (0, import_internal.S)("DropdownMenu.SubContent");
|
|
257
|
+
const { __scopeDropdownMenu, ...subContentProps } = props ?? {};
|
|
258
|
+
const menuScope = useMenuScope(__scopeDropdownMenu, (0, import_internal.subSlot)(slot, "menu"));
|
|
259
|
+
return (0, import_octane.createElement)(MenuPrimitive.SubContent, {
|
|
260
|
+
...menuScope,
|
|
261
|
+
...subContentProps,
|
|
262
|
+
style: {
|
|
263
|
+
...props?.style,
|
|
264
|
+
// re-namespace exposed content custom properties
|
|
265
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
266
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
267
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
268
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
269
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
274
|
+
0 && (module.exports = {
|
|
275
|
+
Arrow,
|
|
276
|
+
CheckboxItem,
|
|
277
|
+
Content,
|
|
278
|
+
DropdownMenu,
|
|
279
|
+
DropdownMenuContent,
|
|
280
|
+
DropdownMenuItem,
|
|
281
|
+
DropdownMenuTrigger,
|
|
282
|
+
Group,
|
|
283
|
+
Item,
|
|
284
|
+
ItemIndicator,
|
|
285
|
+
Label,
|
|
286
|
+
Portal,
|
|
287
|
+
RadioGroup,
|
|
288
|
+
RadioItem,
|
|
289
|
+
Root,
|
|
290
|
+
Separator,
|
|
291
|
+
Sub,
|
|
292
|
+
SubContent,
|
|
293
|
+
SubTrigger,
|
|
294
|
+
Trigger,
|
|
295
|
+
createDropdownMenuScope
|
|
296
|
+
});
|