lizaui 12.0.21 → 12.0.22
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/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/lizaui.css +5 -5
- package/dist/ui/index.cjs.js +90 -416
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +91 -417
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
package/dist/ui/index.cjs.js
CHANGED
|
@@ -35,10 +35,10 @@ function _interopNamespaceDefault(e) {
|
|
|
35
35
|
}
|
|
36
36
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
37
37
|
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
|
|
38
|
-
var __defProp$
|
|
39
|
-
var __name$
|
|
38
|
+
var __defProp$e = Object.defineProperty;
|
|
39
|
+
var __name$e = (target, value) => __defProp$e(target, "name", { value, configurable: true });
|
|
40
40
|
var Label$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
41
|
-
/* @__PURE__ */ __name$
|
|
41
|
+
/* @__PURE__ */ __name$e(function Label2(props, forwardedRef) {
|
|
42
42
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43
43
|
index.Primitive.label,
|
|
44
44
|
{
|
|
@@ -89,8 +89,8 @@ function Label(t0) {
|
|
|
89
89
|
}
|
|
90
90
|
return t2;
|
|
91
91
|
}
|
|
92
|
-
var __defProp$
|
|
93
|
-
var __name$
|
|
92
|
+
var __defProp$d = Object.defineProperty;
|
|
93
|
+
var __name$d = (target, value) => __defProp$d(target, "name", { value, configurable: true });
|
|
94
94
|
var _isHydrated = false;
|
|
95
95
|
function useIsHydrated() {
|
|
96
96
|
const [isHydrated, setIsHydrated] = React__namespace.useState(_isHydrated);
|
|
@@ -102,13 +102,13 @@ function useIsHydrated() {
|
|
|
102
102
|
}, []);
|
|
103
103
|
return isHydrated;
|
|
104
104
|
}
|
|
105
|
-
__name$
|
|
105
|
+
__name$d(useIsHydrated, "useIsHydrated");
|
|
106
106
|
var useReactSyncExternalStore = React__namespace[" useSyncExternalStore ".trim().toString()];
|
|
107
107
|
function subscribe() {
|
|
108
108
|
return () => {
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
__name$
|
|
111
|
+
__name$d(subscribe, "subscribe");
|
|
112
112
|
function useIsHydratedModern() {
|
|
113
113
|
return useReactSyncExternalStore(
|
|
114
114
|
subscribe,
|
|
@@ -116,10 +116,10 @@ function useIsHydratedModern() {
|
|
|
116
116
|
() => false
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
|
-
__name$
|
|
119
|
+
__name$d(useIsHydratedModern, "useIsHydratedModern");
|
|
120
120
|
var useIsHydrated2 = typeof useReactSyncExternalStore === "function" ? useIsHydratedModern : useIsHydrated;
|
|
121
|
-
var __defProp$
|
|
122
|
-
var __name$
|
|
121
|
+
var __defProp$c = Object.defineProperty;
|
|
122
|
+
var __name$c = (target, value) => __defProp$c(target, "name", { value, configurable: true });
|
|
123
123
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
124
124
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
125
125
|
var GROUP_NAME = "RovingFocusGroup";
|
|
@@ -138,11 +138,11 @@ var Direction$4 = {
|
|
|
138
138
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
139
139
|
var RovingFocusGroup = /* @__PURE__ */ React__namespace.forwardRef(
|
|
140
140
|
// blank line to reduce diff noise
|
|
141
|
-
/* @__PURE__ */ __name$
|
|
141
|
+
/* @__PURE__ */ __name$c(function RovingFocusGroup2(props, forwardedRef) {
|
|
142
142
|
return /* @__PURE__ */ jsxRuntime.jsx(Collection$4.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntime.jsx(Collection$4.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntime.jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
143
143
|
}, "RovingFocusGroup")
|
|
144
144
|
);
|
|
145
|
-
var RovingFocusGroupImpl = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
145
|
+
var RovingFocusGroupImpl = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$c(function RovingFocusGroupImpl2(props, forwardedRef) {
|
|
146
146
|
const {
|
|
147
147
|
__scopeRovingFocusGroup,
|
|
148
148
|
orientation,
|
|
@@ -235,7 +235,7 @@ var RovingFocusGroupImpl = /* @__PURE__ */ React__namespace.forwardRef(/* @__PUR
|
|
|
235
235
|
var ITEM_NAME$3 = "RovingFocusGroupItem";
|
|
236
236
|
var RovingFocusGroupItem = /* @__PURE__ */ React__namespace.forwardRef(
|
|
237
237
|
// blank line to reduce diff noise
|
|
238
|
-
/* @__PURE__ */ __name$
|
|
238
|
+
/* @__PURE__ */ __name$c(function RovingFocusGroupItem2(props, forwardedRef) {
|
|
239
239
|
const {
|
|
240
240
|
__scopeRovingFocusGroup,
|
|
241
241
|
focusable = true,
|
|
@@ -326,7 +326,7 @@ function getDirectionAwareKey(key, dir) {
|
|
|
326
326
|
if (dir !== Direction$4.RTL) return key;
|
|
327
327
|
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
328
328
|
}
|
|
329
|
-
__name$
|
|
329
|
+
__name$c(getDirectionAwareKey, "getDirectionAwareKey");
|
|
330
330
|
function getFocusIntent(event, orientation, dir) {
|
|
331
331
|
const key = getDirectionAwareKey(event.key, dir);
|
|
332
332
|
if (orientation === Orientation$2.Vertical && ["ArrowLeft", "ArrowRight"].includes(key)) {
|
|
@@ -337,7 +337,7 @@ function getFocusIntent(event, orientation, dir) {
|
|
|
337
337
|
}
|
|
338
338
|
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
339
339
|
}
|
|
340
|
-
__name$
|
|
340
|
+
__name$c(getFocusIntent, "getFocusIntent");
|
|
341
341
|
function focusFirst$2(candidates, preventScroll = false) {
|
|
342
342
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
343
343
|
for (const candidate of candidates) {
|
|
@@ -346,13 +346,13 @@ function focusFirst$2(candidates, preventScroll = false) {
|
|
|
346
346
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
__name$
|
|
349
|
+
__name$c(focusFirst$2, "focusFirst");
|
|
350
350
|
function wrapArray$2(array, startIndex) {
|
|
351
351
|
return array.map((_, index2) => array[(startIndex + index2) % array.length]);
|
|
352
352
|
}
|
|
353
|
-
__name$
|
|
354
|
-
var __defProp$
|
|
355
|
-
var __name$
|
|
353
|
+
__name$c(wrapArray$2, "wrapArray");
|
|
354
|
+
var __defProp$b = Object.defineProperty;
|
|
355
|
+
var __name$b = (target, value) => __defProp$b(target, "name", { value, configurable: true });
|
|
356
356
|
var Direction$3 = {
|
|
357
357
|
RTL: "rtl"
|
|
358
358
|
};
|
|
@@ -376,10 +376,10 @@ var [createMenuContext, createMenuScope] = index.createContextScope(MENU_NAME$1,
|
|
|
376
376
|
createRovingFocusGroupScope
|
|
377
377
|
]);
|
|
378
378
|
var usePopperScope$1 = index.createPopperScope();
|
|
379
|
-
var useRovingFocusGroupScope$
|
|
379
|
+
var useRovingFocusGroupScope$2 = createRovingFocusGroupScope();
|
|
380
380
|
var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME$1);
|
|
381
381
|
var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME$1);
|
|
382
|
-
var Menu = /* @__PURE__ */ __name$
|
|
382
|
+
var Menu = /* @__PURE__ */ __name$b((props) => {
|
|
383
383
|
const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;
|
|
384
384
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
385
385
|
const [content, setContent] = React__namespace.useState(null);
|
|
@@ -387,12 +387,12 @@ var Menu = /* @__PURE__ */ __name$c((props) => {
|
|
|
387
387
|
const handleOpenChange = index.useCallbackRef(onOpenChange);
|
|
388
388
|
const direction = index.useDirection(dir);
|
|
389
389
|
React__namespace.useEffect(() => {
|
|
390
|
-
const handleKeyDown = /* @__PURE__ */ __name$
|
|
390
|
+
const handleKeyDown = /* @__PURE__ */ __name$b(() => {
|
|
391
391
|
isUsingKeyboardRef.current = true;
|
|
392
392
|
document.addEventListener("pointerdown", handlePointer, { capture: true, once: true });
|
|
393
393
|
document.addEventListener("pointermove", handlePointer, { capture: true, once: true });
|
|
394
394
|
}, "handleKeyDown");
|
|
395
|
-
const handlePointer = /* @__PURE__ */ __name$
|
|
395
|
+
const handlePointer = /* @__PURE__ */ __name$b(() => isUsingKeyboardRef.current = false, "handlePointer");
|
|
396
396
|
document.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
397
397
|
return () => {
|
|
398
398
|
document.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
@@ -404,7 +404,7 @@ var Menu = /* @__PURE__ */ __name$c((props) => {
|
|
|
404
404
|
if (!open) {
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
|
-
const handleBlur = /* @__PURE__ */ __name$
|
|
407
|
+
const handleBlur = /* @__PURE__ */ __name$b(() => handleOpenChange(false), "handleBlur");
|
|
408
408
|
window.addEventListener("blur", handleBlur);
|
|
409
409
|
return () => window.removeEventListener("blur", handleBlur);
|
|
410
410
|
}, [open, handleOpenChange]);
|
|
@@ -431,7 +431,7 @@ var Menu = /* @__PURE__ */ __name$c((props) => {
|
|
|
431
431
|
) });
|
|
432
432
|
}, "Menu");
|
|
433
433
|
var MenuAnchor = /* @__PURE__ */ React__namespace.forwardRef(
|
|
434
|
-
/* @__PURE__ */ __name$
|
|
434
|
+
/* @__PURE__ */ __name$b(function MenuAnchor2(props, forwardedRef) {
|
|
435
435
|
const { __scopeMenu, ...anchorProps } = props;
|
|
436
436
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
437
437
|
return /* @__PURE__ */ jsxRuntime.jsx(index.PopperAnchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
@@ -441,26 +441,26 @@ var PORTAL_NAME$1 = "MenuPortal";
|
|
|
441
441
|
var [PortalProvider$1, usePortalContext$1] = createMenuContext(PORTAL_NAME$1, {
|
|
442
442
|
forceMount: void 0
|
|
443
443
|
});
|
|
444
|
-
var MenuPortal = /* @__PURE__ */ __name$
|
|
444
|
+
var MenuPortal = /* @__PURE__ */ __name$b((props) => {
|
|
445
445
|
const { __scopeMenu, forceMount, children, container } = props;
|
|
446
446
|
const context = useMenuContext(PORTAL_NAME$1, __scopeMenu);
|
|
447
447
|
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider$1, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(index.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(index.Portal, { asChild: true, container, children }) }) });
|
|
448
448
|
}, "MenuPortal");
|
|
449
|
-
var CONTENT_NAME$
|
|
450
|
-
var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME$
|
|
449
|
+
var CONTENT_NAME$8 = "MenuContent";
|
|
450
|
+
var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME$8);
|
|
451
451
|
var MenuContent = /* @__PURE__ */ React__namespace.forwardRef(
|
|
452
|
-
/* @__PURE__ */ __name$
|
|
453
|
-
const portalContext = usePortalContext$1(CONTENT_NAME$
|
|
452
|
+
/* @__PURE__ */ __name$b(function MenuContent2(props, forwardedRef) {
|
|
453
|
+
const portalContext = usePortalContext$1(CONTENT_NAME$8, props.__scopeMenu);
|
|
454
454
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
455
|
-
const context = useMenuContext(CONTENT_NAME$
|
|
456
|
-
const rootContext = useMenuRootContext(CONTENT_NAME$
|
|
455
|
+
const context = useMenuContext(CONTENT_NAME$8, props.__scopeMenu);
|
|
456
|
+
const rootContext = useMenuRootContext(CONTENT_NAME$8, props.__scopeMenu);
|
|
457
457
|
return /* @__PURE__ */ jsxRuntime.jsx(Collection$3.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(index.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Collection$3.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsxRuntime.jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntime.jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
|
|
458
458
|
}, "MenuContent")
|
|
459
459
|
);
|
|
460
460
|
var MenuRootContentModal = /* @__PURE__ */ React__namespace.forwardRef(
|
|
461
461
|
// blank line to reduce diff noise
|
|
462
|
-
/* @__PURE__ */ __name$
|
|
463
|
-
const context = useMenuContext(CONTENT_NAME$
|
|
462
|
+
/* @__PURE__ */ __name$b(function MenuRootContentModal2(props, forwardedRef) {
|
|
463
|
+
const context = useMenuContext(CONTENT_NAME$8, props.__scopeMenu);
|
|
464
464
|
const ref = React__namespace.useRef(null);
|
|
465
465
|
const composedRefs = index$1.useComposedRefs(forwardedRef, ref);
|
|
466
466
|
React__namespace.useEffect(() => {
|
|
@@ -485,8 +485,8 @@ var MenuRootContentModal = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
485
485
|
);
|
|
486
486
|
}, "MenuRootContentModal")
|
|
487
487
|
);
|
|
488
|
-
var MenuRootContentNonModal = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
489
|
-
const context = useMenuContext(CONTENT_NAME$
|
|
488
|
+
var MenuRootContentNonModal = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$b(function MenuRootContentNonModal2(props, forwardedRef) {
|
|
489
|
+
const context = useMenuContext(CONTENT_NAME$8, props.__scopeMenu);
|
|
490
490
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
491
491
|
MenuContentImpl,
|
|
492
492
|
{
|
|
@@ -502,7 +502,7 @@ var MenuRootContentNonModal = /* @__PURE__ */ React__namespace.forwardRef(/* @__
|
|
|
502
502
|
var Slot = index$1.createSlot("MenuContent.ScrollLock");
|
|
503
503
|
var MenuContentImpl = /* @__PURE__ */ React__namespace.forwardRef(
|
|
504
504
|
// blank line to reduce diff noise
|
|
505
|
-
/* @__PURE__ */ __name$
|
|
505
|
+
/* @__PURE__ */ __name$b(function MenuContentImpl2(props, forwardedRef) {
|
|
506
506
|
const {
|
|
507
507
|
__scopeMenu,
|
|
508
508
|
loop = false,
|
|
@@ -519,10 +519,10 @@ var MenuContentImpl = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
519
519
|
disableOutsideScroll,
|
|
520
520
|
...contentProps
|
|
521
521
|
} = props;
|
|
522
|
-
const context = useMenuContext(CONTENT_NAME$
|
|
523
|
-
const rootContext = useMenuRootContext(CONTENT_NAME$
|
|
522
|
+
const context = useMenuContext(CONTENT_NAME$8, __scopeMenu);
|
|
523
|
+
const rootContext = useMenuRootContext(CONTENT_NAME$8, __scopeMenu);
|
|
524
524
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
525
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope$
|
|
525
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope$2(__scopeMenu);
|
|
526
526
|
const getItems = useCollection$3(__scopeMenu);
|
|
527
527
|
const [currentItemId, setCurrentItemId] = React__namespace.useState(null);
|
|
528
528
|
const contentRef = React__namespace.useRef(null);
|
|
@@ -552,7 +552,7 @@ var MenuContentImpl = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
552
552
|
allowPinchZoom: true,
|
|
553
553
|
shards
|
|
554
554
|
} : void 0;
|
|
555
|
-
const handleTypeaheadSearch = /* @__PURE__ */ __name$
|
|
555
|
+
const handleTypeaheadSearch = /* @__PURE__ */ __name$b((key) => {
|
|
556
556
|
const search = searchRef.current + key;
|
|
557
557
|
const items = getItems().filter((item) => !item.disabled);
|
|
558
558
|
const currentItem = document.activeElement;
|
|
@@ -560,7 +560,7 @@ var MenuContentImpl = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
560
560
|
const values = items.map((item) => item.textValue);
|
|
561
561
|
const nextMatch = getNextMatch(values, search, currentMatch);
|
|
562
562
|
const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;
|
|
563
|
-
(/* @__PURE__ */ __name$
|
|
563
|
+
(/* @__PURE__ */ __name$b((function updateSearch(value) {
|
|
564
564
|
searchRef.current = value;
|
|
565
565
|
window.clearTimeout(timerRef.current);
|
|
566
566
|
if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
|
|
@@ -702,13 +702,13 @@ var MenuContentImpl = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
702
702
|
}, "MenuContentImpl")
|
|
703
703
|
);
|
|
704
704
|
var MenuGroup = /* @__PURE__ */ React__namespace.forwardRef(
|
|
705
|
-
/* @__PURE__ */ __name$
|
|
705
|
+
/* @__PURE__ */ __name$b(function MenuGroup2(props, forwardedRef) {
|
|
706
706
|
const { __scopeMenu, ...groupProps } = props;
|
|
707
707
|
return /* @__PURE__ */ jsxRuntime.jsx(index.Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
708
708
|
}, "MenuGroup")
|
|
709
709
|
);
|
|
710
710
|
var MenuLabel = /* @__PURE__ */ React__namespace.forwardRef(
|
|
711
|
-
/* @__PURE__ */ __name$
|
|
711
|
+
/* @__PURE__ */ __name$b(function MenuLabel2(props, forwardedRef) {
|
|
712
712
|
const { __scopeMenu, ...labelProps } = props;
|
|
713
713
|
return /* @__PURE__ */ jsxRuntime.jsx(index.Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
714
714
|
}, "MenuLabel")
|
|
@@ -717,14 +717,14 @@ var ITEM_NAME$2 = "MenuItem";
|
|
|
717
717
|
var ITEM_SELECT = "menu.itemSelect";
|
|
718
718
|
var MenuItem = /* @__PURE__ */ React__namespace.forwardRef(
|
|
719
719
|
// blank line to reduce diff noise
|
|
720
|
-
/* @__PURE__ */ __name$
|
|
720
|
+
/* @__PURE__ */ __name$b(function MenuItem2(props, forwardedRef) {
|
|
721
721
|
const { disabled = false, onSelect, ...itemProps } = props;
|
|
722
722
|
const ref = React__namespace.useRef(null);
|
|
723
723
|
const rootContext = useMenuRootContext(ITEM_NAME$2, props.__scopeMenu);
|
|
724
724
|
const contentContext = useMenuContentContext(ITEM_NAME$2, props.__scopeMenu);
|
|
725
725
|
const composedRefs = index$1.useComposedRefs(forwardedRef, ref);
|
|
726
726
|
const isPointerDownRef = React__namespace.useRef(false);
|
|
727
|
-
const handleSelect = /* @__PURE__ */ __name$
|
|
727
|
+
const handleSelect = /* @__PURE__ */ __name$b(() => {
|
|
728
728
|
const menuItem = ref.current;
|
|
729
729
|
if (!disabled && menuItem) {
|
|
730
730
|
const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });
|
|
@@ -769,10 +769,10 @@ var MenuItem = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
769
769
|
}, "MenuItem")
|
|
770
770
|
);
|
|
771
771
|
var MenuItemImpl = /* @__PURE__ */ React__namespace.forwardRef(
|
|
772
|
-
/* @__PURE__ */ __name$
|
|
772
|
+
/* @__PURE__ */ __name$b(function MenuItemImpl2(props, forwardedRef) {
|
|
773
773
|
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
|
|
774
774
|
const contentContext = useMenuContentContext(ITEM_NAME$2, __scopeMenu);
|
|
775
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope$
|
|
775
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope$2(__scopeMenu);
|
|
776
776
|
const ref = React__namespace.useRef(null);
|
|
777
777
|
const composedRefs = index$1.useComposedRefs(forwardedRef, ref);
|
|
778
778
|
const [isFocused, setIsFocused] = React__namespace.useState(false);
|
|
@@ -826,7 +826,7 @@ var MenuItemImpl = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
826
826
|
);
|
|
827
827
|
var MenuCheckboxItem = /* @__PURE__ */ React__namespace.forwardRef(
|
|
828
828
|
// blank line to reduce diff noise
|
|
829
|
-
/* @__PURE__ */ __name$
|
|
829
|
+
/* @__PURE__ */ __name$b(function MenuCheckboxItem2(props, forwardedRef) {
|
|
830
830
|
const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
|
|
831
831
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
832
832
|
MenuItem,
|
|
@@ -848,11 +848,11 @@ var MenuCheckboxItem = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
848
848
|
var RADIO_GROUP_NAME$1 = "MenuRadioGroup";
|
|
849
849
|
var [RadioGroupProvider$1, useRadioGroupContext$1] = createMenuContext(
|
|
850
850
|
RADIO_GROUP_NAME$1,
|
|
851
|
-
{ value: void 0, onValueChange: /* @__PURE__ */ __name$
|
|
851
|
+
{ value: void 0, onValueChange: /* @__PURE__ */ __name$b(() => {
|
|
852
852
|
}, "onValueChange") }
|
|
853
853
|
);
|
|
854
854
|
var MenuRadioGroup = /* @__PURE__ */ React__namespace.forwardRef(
|
|
855
|
-
/* @__PURE__ */ __name$
|
|
855
|
+
/* @__PURE__ */ __name$b(function MenuRadioGroup2(props, forwardedRef) {
|
|
856
856
|
const { value, onValueChange, ...groupProps } = props;
|
|
857
857
|
const handleValueChange = index.useCallbackRef(onValueChange);
|
|
858
858
|
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupProvider$1, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsxRuntime.jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
@@ -860,7 +860,7 @@ var MenuRadioGroup = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
860
860
|
);
|
|
861
861
|
var RADIO_ITEM_NAME = "MenuRadioItem";
|
|
862
862
|
var MenuRadioItem = /* @__PURE__ */ React__namespace.forwardRef(
|
|
863
|
-
/* @__PURE__ */ __name$
|
|
863
|
+
/* @__PURE__ */ __name$b(function MenuRadioItem2(props, forwardedRef) {
|
|
864
864
|
const { value, ...radioItemProps } = props;
|
|
865
865
|
const context = useRadioGroupContext$1(RADIO_ITEM_NAME, props.__scopeMenu);
|
|
866
866
|
const checked = value === context.value;
|
|
@@ -888,7 +888,7 @@ var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(
|
|
|
888
888
|
);
|
|
889
889
|
var MenuItemIndicator = /* @__PURE__ */ React__namespace.forwardRef(
|
|
890
890
|
// blank line to reduce diff noise
|
|
891
|
-
/* @__PURE__ */ __name$
|
|
891
|
+
/* @__PURE__ */ __name$b(function MenuItemIndicator2(props, forwardedRef) {
|
|
892
892
|
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
|
|
893
893
|
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
|
|
894
894
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -908,7 +908,7 @@ var MenuItemIndicator = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
908
908
|
}, "MenuItemIndicator")
|
|
909
909
|
);
|
|
910
910
|
var MenuSeparator = /* @__PURE__ */ React__namespace.forwardRef(
|
|
911
|
-
/* @__PURE__ */ __name$
|
|
911
|
+
/* @__PURE__ */ __name$b(function MenuSeparator2(props, forwardedRef) {
|
|
912
912
|
const { __scopeMenu, ...separatorProps } = props;
|
|
913
913
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
914
914
|
index.Primitive.div,
|
|
@@ -923,7 +923,7 @@ var MenuSeparator = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
923
923
|
);
|
|
924
924
|
var SUB_NAME$2 = "MenuSub";
|
|
925
925
|
var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME$2);
|
|
926
|
-
var MenuSub = /* @__PURE__ */ __name$
|
|
926
|
+
var MenuSub = /* @__PURE__ */ __name$b((props) => {
|
|
927
927
|
const { __scopeMenu, children, open = false, onOpenChange } = props;
|
|
928
928
|
const parentMenuContext = useMenuContext(SUB_NAME$2, __scopeMenu);
|
|
929
929
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
@@ -958,7 +958,7 @@ var MenuSub = /* @__PURE__ */ __name$c((props) => {
|
|
|
958
958
|
}, "MenuSub");
|
|
959
959
|
var SUB_TRIGGER_NAME = "MenuSubTrigger";
|
|
960
960
|
var MenuSubTrigger = /* @__PURE__ */ React__namespace.forwardRef(
|
|
961
|
-
/* @__PURE__ */ __name$
|
|
961
|
+
/* @__PURE__ */ __name$b(function MenuSubTrigger2(props, forwardedRef) {
|
|
962
962
|
const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
963
963
|
const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
964
964
|
const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
@@ -1064,11 +1064,11 @@ var MenuSubTrigger = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
1064
1064
|
);
|
|
1065
1065
|
var SUB_CONTENT_NAME = "MenuSubContent";
|
|
1066
1066
|
var MenuSubContent = /* @__PURE__ */ React__namespace.forwardRef(
|
|
1067
|
-
/* @__PURE__ */ __name$
|
|
1068
|
-
const portalContext = usePortalContext$1(CONTENT_NAME$
|
|
1067
|
+
/* @__PURE__ */ __name$b(function MenuSubContent2(props, forwardedRef) {
|
|
1068
|
+
const portalContext = usePortalContext$1(CONTENT_NAME$8, props.__scopeMenu);
|
|
1069
1069
|
const { forceMount = portalContext.forceMount, align = "start", ...subContentProps } = props;
|
|
1070
|
-
const context = useMenuContext(CONTENT_NAME$
|
|
1071
|
-
const rootContext = useMenuRootContext(CONTENT_NAME$
|
|
1070
|
+
const context = useMenuContext(CONTENT_NAME$8, props.__scopeMenu);
|
|
1071
|
+
const rootContext = useMenuRootContext(CONTENT_NAME$8, props.__scopeMenu);
|
|
1072
1072
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);
|
|
1073
1073
|
const ref = React__namespace.useRef(null);
|
|
1074
1074
|
const composedRefs = index$1.useComposedRefs(forwardedRef, ref);
|
|
@@ -1112,15 +1112,15 @@ var MenuSubContent = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
1112
1112
|
function getOpenState$1(open) {
|
|
1113
1113
|
return open ? "open" : "closed";
|
|
1114
1114
|
}
|
|
1115
|
-
__name$
|
|
1115
|
+
__name$b(getOpenState$1, "getOpenState");
|
|
1116
1116
|
function isIndeterminate(checked) {
|
|
1117
1117
|
return checked === "indeterminate";
|
|
1118
1118
|
}
|
|
1119
|
-
__name$
|
|
1119
|
+
__name$b(isIndeterminate, "isIndeterminate");
|
|
1120
1120
|
function getCheckedState(checked) {
|
|
1121
1121
|
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
1122
1122
|
}
|
|
1123
|
-
__name$
|
|
1123
|
+
__name$b(getCheckedState, "getCheckedState");
|
|
1124
1124
|
function focusFirst$1(candidates) {
|
|
1125
1125
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
1126
1126
|
for (const candidate of candidates) {
|
|
@@ -1129,11 +1129,11 @@ function focusFirst$1(candidates) {
|
|
|
1129
1129
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
__name$
|
|
1132
|
+
__name$b(focusFirst$1, "focusFirst");
|
|
1133
1133
|
function wrapArray$1(array, startIndex) {
|
|
1134
1134
|
return array.map((_, index2) => array[(startIndex + index2) % array.length]);
|
|
1135
1135
|
}
|
|
1136
|
-
__name$
|
|
1136
|
+
__name$b(wrapArray$1, "wrapArray");
|
|
1137
1137
|
function getNextMatch(values, search, currentMatch) {
|
|
1138
1138
|
const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
|
|
1139
1139
|
const normalizedSearch = isRepeated ? search[0] : search;
|
|
@@ -1146,7 +1146,7 @@ function getNextMatch(values, search, currentMatch) {
|
|
|
1146
1146
|
);
|
|
1147
1147
|
return nextMatch !== currentMatch ? nextMatch : void 0;
|
|
1148
1148
|
}
|
|
1149
|
-
__name$
|
|
1149
|
+
__name$b(getNextMatch, "getNextMatch");
|
|
1150
1150
|
function isPointInPolygon(point, polygon) {
|
|
1151
1151
|
const { x, y } = point;
|
|
1152
1152
|
let inside = false;
|
|
@@ -1162,19 +1162,19 @@ function isPointInPolygon(point, polygon) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
return inside;
|
|
1164
1164
|
}
|
|
1165
|
-
__name$
|
|
1165
|
+
__name$b(isPointInPolygon, "isPointInPolygon");
|
|
1166
1166
|
function isPointerInGraceArea(event, area) {
|
|
1167
1167
|
if (!area) return false;
|
|
1168
1168
|
const cursorPos = { x: event.clientX, y: event.clientY };
|
|
1169
1169
|
return isPointInPolygon(cursorPos, area);
|
|
1170
1170
|
}
|
|
1171
|
-
__name$
|
|
1171
|
+
__name$b(isPointerInGraceArea, "isPointerInGraceArea");
|
|
1172
1172
|
function whenMouse$1(handler) {
|
|
1173
1173
|
return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
|
|
1174
1174
|
}
|
|
1175
|
-
__name$
|
|
1176
|
-
var __defProp$
|
|
1177
|
-
var __name$
|
|
1175
|
+
__name$b(whenMouse$1, "whenMouse");
|
|
1176
|
+
var __defProp$a = Object.defineProperty;
|
|
1177
|
+
var __name$a = (target, value) => __defProp$a(target, "name", { value, configurable: true });
|
|
1178
1178
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
1179
1179
|
var [createDropdownMenuContext, createDropdownMenuScope] = index.createContextScope(
|
|
1180
1180
|
DROPDOWN_MENU_NAME,
|
|
@@ -1182,7 +1182,7 @@ var [createDropdownMenuContext, createDropdownMenuScope] = index.createContextSc
|
|
|
1182
1182
|
);
|
|
1183
1183
|
var useMenuScope$2 = createMenuScope();
|
|
1184
1184
|
var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
|
|
1185
|
-
var DropdownMenu$1 = /* @__PURE__ */ __name$
|
|
1185
|
+
var DropdownMenu$1 = /* @__PURE__ */ __name$a((props) => {
|
|
1186
1186
|
const {
|
|
1187
1187
|
__scopeDropdownMenu,
|
|
1188
1188
|
children,
|
|
@@ -1215,12 +1215,12 @@ var DropdownMenu$1 = /* @__PURE__ */ __name$b((props) => {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
);
|
|
1217
1217
|
}, "DropdownMenu");
|
|
1218
|
-
var TRIGGER_NAME$
|
|
1218
|
+
var TRIGGER_NAME$7 = "DropdownMenuTrigger";
|
|
1219
1219
|
var DropdownMenuTrigger$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
1220
1220
|
// blank line to reduce diff noise
|
|
1221
|
-
/* @__PURE__ */ __name$
|
|
1221
|
+
/* @__PURE__ */ __name$a(function DropdownMenuTrigger2(props, forwardedRef) {
|
|
1222
1222
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
1223
|
-
const context = useDropdownMenuContext(TRIGGER_NAME$
|
|
1223
|
+
const context = useDropdownMenuContext(TRIGGER_NAME$7, __scopeDropdownMenu);
|
|
1224
1224
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1225
1225
|
const composedRefs = index$1.useComposedRefs(forwardedRef, context.triggerRef);
|
|
1226
1226
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuAnchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1252,17 +1252,17 @@ var DropdownMenuTrigger$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
1252
1252
|
) });
|
|
1253
1253
|
}, "DropdownMenuTrigger")
|
|
1254
1254
|
);
|
|
1255
|
-
var DropdownMenuPortal$1 = /* @__PURE__ */ __name$
|
|
1255
|
+
var DropdownMenuPortal$1 = /* @__PURE__ */ __name$a((props) => {
|
|
1256
1256
|
const { __scopeDropdownMenu, ...portalProps } = props;
|
|
1257
1257
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1258
1258
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuPortal, { ...menuScope, ...portalProps });
|
|
1259
1259
|
}, "DropdownMenuPortal");
|
|
1260
|
-
var CONTENT_NAME$
|
|
1260
|
+
var CONTENT_NAME$7 = "DropdownMenuContent";
|
|
1261
1261
|
var DropdownMenuContent$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
1262
1262
|
// blank line to reduce diff noise
|
|
1263
|
-
/* @__PURE__ */ __name$
|
|
1263
|
+
/* @__PURE__ */ __name$a(function DropdownMenuContent2(props, forwardedRef) {
|
|
1264
1264
|
const { __scopeDropdownMenu, ...contentProps } = props;
|
|
1265
|
-
const context = useDropdownMenuContext(CONTENT_NAME$
|
|
1265
|
+
const context = useDropdownMenuContext(CONTENT_NAME$7, __scopeDropdownMenu);
|
|
1266
1266
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1267
1267
|
const hasInteractedOutsideRef = React__namespace.useRef(false);
|
|
1268
1268
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1301,7 +1301,7 @@ var DropdownMenuContent$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
1301
1301
|
);
|
|
1302
1302
|
var DropdownMenuGroup$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
1303
1303
|
// blank line to reduce diff noise
|
|
1304
|
-
/* @__PURE__ */ __name$
|
|
1304
|
+
/* @__PURE__ */ __name$a(function DropdownMenuGroup2(props, forwardedRef) {
|
|
1305
1305
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
1306
1306
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1307
1307
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuGroup, { ...menuScope, ...groupProps, ref: forwardedRef });
|
|
@@ -1309,7 +1309,7 @@ var DropdownMenuGroup$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
1309
1309
|
);
|
|
1310
1310
|
var DropdownMenuLabel$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
1311
1311
|
// blank line to reduce diff noise
|
|
1312
|
-
/* @__PURE__ */ __name$
|
|
1312
|
+
/* @__PURE__ */ __name$a(function DropdownMenuLabel2(props, forwardedRef) {
|
|
1313
1313
|
const { __scopeDropdownMenu, ...labelProps } = props;
|
|
1314
1314
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1315
1315
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuLabel, { ...menuScope, ...labelProps, ref: forwardedRef });
|
|
@@ -1317,38 +1317,38 @@ var DropdownMenuLabel$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
|
1317
1317
|
);
|
|
1318
1318
|
var DropdownMenuItem$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
1319
1319
|
// blank line to reduce diff noise
|
|
1320
|
-
/* @__PURE__ */ __name$
|
|
1320
|
+
/* @__PURE__ */ __name$a(function DropdownMenuItem2(props, forwardedRef) {
|
|
1321
1321
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
1322
1322
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1323
1323
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { ...menuScope, ...itemProps, ref: forwardedRef });
|
|
1324
1324
|
}, "DropdownMenuItem")
|
|
1325
1325
|
);
|
|
1326
|
-
var DropdownMenuCheckboxItem$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
1326
|
+
var DropdownMenuCheckboxItem$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$a(function DropdownMenuCheckboxItem2(props, forwardedRef) {
|
|
1327
1327
|
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
1328
1328
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1329
1329
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuCheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
1330
1330
|
}, "DropdownMenuCheckboxItem"));
|
|
1331
|
-
var DropdownMenuRadioGroup$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
1331
|
+
var DropdownMenuRadioGroup$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$a(function DropdownMenuRadioGroup2(props, forwardedRef) {
|
|
1332
1332
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
1333
1333
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1334
1334
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuRadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
1335
1335
|
}, "DropdownMenuRadioGroup"));
|
|
1336
|
-
var DropdownMenuRadioItem$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
1336
|
+
var DropdownMenuRadioItem$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$a(function DropdownMenuRadioItem2(props, forwardedRef) {
|
|
1337
1337
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
1338
1338
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1339
1339
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuRadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
1340
1340
|
}, "DropdownMenuRadioItem"));
|
|
1341
|
-
var DropdownMenuItemIndicator = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
1341
|
+
var DropdownMenuItemIndicator = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$a(function DropdownMenuItemIndicator2(props, forwardedRef) {
|
|
1342
1342
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
1343
1343
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1344
1344
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
1345
1345
|
}, "DropdownMenuItemIndicator"));
|
|
1346
|
-
var DropdownMenuSeparator$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
1346
|
+
var DropdownMenuSeparator$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$a(function DropdownMenuSeparator2(props, forwardedRef) {
|
|
1347
1347
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
1348
1348
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1349
1349
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuSeparator, { ...menuScope, ...separatorProps, ref: forwardedRef });
|
|
1350
1350
|
}, "DropdownMenuSeparator"));
|
|
1351
|
-
var DropdownMenuSub$1 = /* @__PURE__ */ __name$
|
|
1351
|
+
var DropdownMenuSub$1 = /* @__PURE__ */ __name$a((props) => {
|
|
1352
1352
|
const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
|
|
1353
1353
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1354
1354
|
const [open, setOpen] = index.useControllableState({
|
|
@@ -1359,12 +1359,12 @@ var DropdownMenuSub$1 = /* @__PURE__ */ __name$b((props) => {
|
|
|
1359
1359
|
});
|
|
1360
1360
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuSub, { ...menuScope, open, onOpenChange: setOpen, children });
|
|
1361
1361
|
}, "DropdownMenuSub");
|
|
1362
|
-
var DropdownMenuSubTrigger$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
1362
|
+
var DropdownMenuSubTrigger$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$a(function DropdownMenuSubTrigger2(props, forwardedRef) {
|
|
1363
1363
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
1364
1364
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1365
1365
|
return /* @__PURE__ */ jsxRuntime.jsx(MenuSubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
|
|
1366
1366
|
}, "DropdownMenuSubTrigger"));
|
|
1367
|
-
var DropdownMenuSubContent$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$
|
|
1367
|
+
var DropdownMenuSubContent$1 = /* @__PURE__ */ React__namespace.forwardRef(/* @__PURE__ */ __name$a(function DropdownMenuSubContent2(props, forwardedRef) {
|
|
1368
1368
|
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
1369
1369
|
const menuScope = useMenuScope$2(__scopeDropdownMenu);
|
|
1370
1370
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1939,328 +1939,6 @@ function DropdownMenuSubContent(t0) {
|
|
|
1939
1939
|
}
|
|
1940
1940
|
return t2;
|
|
1941
1941
|
}
|
|
1942
|
-
var __defProp$a = Object.defineProperty;
|
|
1943
|
-
var __name$a = (target, value) => __defProp$a(target, "name", { value, configurable: true });
|
|
1944
|
-
var ActivationMode$1 = {
|
|
1945
|
-
Automatic: "automatic",
|
|
1946
|
-
Manual: "manual"
|
|
1947
|
-
};
|
|
1948
|
-
var TABS_NAME = "Tabs";
|
|
1949
|
-
var [createTabsContext, createTabsScope] = index.createContextScope(TABS_NAME, [
|
|
1950
|
-
createRovingFocusGroupScope
|
|
1951
|
-
]);
|
|
1952
|
-
var useRovingFocusGroupScope$2 = createRovingFocusGroupScope();
|
|
1953
|
-
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
1954
|
-
var Tabs$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
1955
|
-
// blank line to reduce diff noise
|
|
1956
|
-
/* @__PURE__ */ __name$a(function Tabs2(props, forwardedRef) {
|
|
1957
|
-
const {
|
|
1958
|
-
__scopeTabs,
|
|
1959
|
-
value: valueProp,
|
|
1960
|
-
onValueChange,
|
|
1961
|
-
defaultValue,
|
|
1962
|
-
orientation = "horizontal",
|
|
1963
|
-
dir,
|
|
1964
|
-
activationMode = ActivationMode$1.Automatic,
|
|
1965
|
-
...tabsProps
|
|
1966
|
-
} = props;
|
|
1967
|
-
const direction = index.useDirection(dir);
|
|
1968
|
-
const [value, setValue] = index.useControllableState({
|
|
1969
|
-
prop: valueProp,
|
|
1970
|
-
onChange: onValueChange,
|
|
1971
|
-
defaultProp: defaultValue ?? "",
|
|
1972
|
-
caller: TABS_NAME
|
|
1973
|
-
});
|
|
1974
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1975
|
-
TabsProvider,
|
|
1976
|
-
{
|
|
1977
|
-
scope: __scopeTabs,
|
|
1978
|
-
baseId: index.useId(),
|
|
1979
|
-
value,
|
|
1980
|
-
onValueChange: setValue,
|
|
1981
|
-
orientation,
|
|
1982
|
-
dir: direction,
|
|
1983
|
-
activationMode,
|
|
1984
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1985
|
-
index.Primitive.div,
|
|
1986
|
-
{
|
|
1987
|
-
dir: direction,
|
|
1988
|
-
"data-orientation": orientation,
|
|
1989
|
-
...tabsProps,
|
|
1990
|
-
ref: forwardedRef
|
|
1991
|
-
}
|
|
1992
|
-
)
|
|
1993
|
-
}
|
|
1994
|
-
);
|
|
1995
|
-
}, "Tabs")
|
|
1996
|
-
);
|
|
1997
|
-
var TAB_LIST_NAME = "TabsList";
|
|
1998
|
-
var TabsList$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
1999
|
-
// blank line to reduce diff noise
|
|
2000
|
-
/* @__PURE__ */ __name$a(function TabsList2(props, forwardedRef) {
|
|
2001
|
-
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
2002
|
-
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
2003
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope$2(__scopeTabs);
|
|
2004
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2005
|
-
RovingFocusGroup,
|
|
2006
|
-
{
|
|
2007
|
-
asChild: true,
|
|
2008
|
-
...rovingFocusGroupScope,
|
|
2009
|
-
orientation: context.orientation,
|
|
2010
|
-
dir: context.dir,
|
|
2011
|
-
loop,
|
|
2012
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2013
|
-
index.Primitive.div,
|
|
2014
|
-
{
|
|
2015
|
-
role: "tablist",
|
|
2016
|
-
"aria-orientation": context.orientation,
|
|
2017
|
-
...listProps,
|
|
2018
|
-
ref: forwardedRef
|
|
2019
|
-
}
|
|
2020
|
-
)
|
|
2021
|
-
}
|
|
2022
|
-
);
|
|
2023
|
-
}, "TabsList")
|
|
2024
|
-
);
|
|
2025
|
-
var TRIGGER_NAME$7 = "TabsTrigger";
|
|
2026
|
-
var TabsTrigger$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
2027
|
-
/* @__PURE__ */ __name$a(function TabsTrigger2(props, forwardedRef) {
|
|
2028
|
-
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
2029
|
-
const context = useTabsContext(TRIGGER_NAME$7, __scopeTabs);
|
|
2030
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope$2(__scopeTabs);
|
|
2031
|
-
const triggerId = makeTriggerId$1(context.baseId, value);
|
|
2032
|
-
const contentId = makeContentId$1(context.baseId, value);
|
|
2033
|
-
const isSelected = value === context.value;
|
|
2034
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2035
|
-
RovingFocusGroupItem,
|
|
2036
|
-
{
|
|
2037
|
-
asChild: true,
|
|
2038
|
-
...rovingFocusGroupScope,
|
|
2039
|
-
focusable: !disabled,
|
|
2040
|
-
active: isSelected,
|
|
2041
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2042
|
-
index.Primitive.button,
|
|
2043
|
-
{
|
|
2044
|
-
type: "button",
|
|
2045
|
-
role: "tab",
|
|
2046
|
-
"aria-selected": isSelected,
|
|
2047
|
-
"aria-controls": contentId,
|
|
2048
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
2049
|
-
"data-disabled": disabled ? "" : void 0,
|
|
2050
|
-
disabled,
|
|
2051
|
-
id: triggerId,
|
|
2052
|
-
...triggerProps,
|
|
2053
|
-
ref: forwardedRef,
|
|
2054
|
-
onMouseDown: index.composeEventHandlers(props.onMouseDown, (event) => {
|
|
2055
|
-
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
2056
|
-
event.currentTarget.focus();
|
|
2057
|
-
context.onValueChange(value);
|
|
2058
|
-
} else {
|
|
2059
|
-
event.preventDefault();
|
|
2060
|
-
}
|
|
2061
|
-
}),
|
|
2062
|
-
onKeyDown: index.composeEventHandlers(props.onKeyDown, (event) => {
|
|
2063
|
-
if (disabled || event.target !== event.currentTarget) {
|
|
2064
|
-
return;
|
|
2065
|
-
}
|
|
2066
|
-
if ([" ", "Enter"].includes(event.key)) {
|
|
2067
|
-
context.onValueChange(value);
|
|
2068
|
-
}
|
|
2069
|
-
}),
|
|
2070
|
-
onFocus: index.composeEventHandlers(props.onFocus, () => {
|
|
2071
|
-
const isAutomaticActivation = context.activationMode !== ActivationMode$1.Manual;
|
|
2072
|
-
if (!isSelected && !disabled && isAutomaticActivation) {
|
|
2073
|
-
context.onValueChange(value);
|
|
2074
|
-
}
|
|
2075
|
-
})
|
|
2076
|
-
}
|
|
2077
|
-
)
|
|
2078
|
-
}
|
|
2079
|
-
);
|
|
2080
|
-
}, "TabsTrigger")
|
|
2081
|
-
);
|
|
2082
|
-
var CONTENT_NAME$7 = "TabsContent";
|
|
2083
|
-
var TabsContent$1 = /* @__PURE__ */ React__namespace.forwardRef(
|
|
2084
|
-
/* @__PURE__ */ __name$a(function TabsContent2(props, forwardedRef) {
|
|
2085
|
-
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
2086
|
-
const context = useTabsContext(CONTENT_NAME$7, __scopeTabs);
|
|
2087
|
-
const triggerId = makeTriggerId$1(context.baseId, value);
|
|
2088
|
-
const contentId = makeContentId$1(context.baseId, value);
|
|
2089
|
-
const isSelected = value === context.value;
|
|
2090
|
-
const isMountAnimationPreventedRef = React__namespace.useRef(isSelected);
|
|
2091
|
-
React__namespace.useEffect(() => {
|
|
2092
|
-
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
2093
|
-
return () => cancelAnimationFrame(rAF);
|
|
2094
|
-
}, []);
|
|
2095
|
-
return /* @__PURE__ */ jsxRuntime.jsx(index.Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2096
|
-
index.Primitive.div,
|
|
2097
|
-
{
|
|
2098
|
-
"data-state": isSelected ? "active" : "inactive",
|
|
2099
|
-
"data-orientation": context.orientation,
|
|
2100
|
-
role: "tabpanel",
|
|
2101
|
-
"aria-labelledby": triggerId,
|
|
2102
|
-
hidden: !present,
|
|
2103
|
-
id: contentId,
|
|
2104
|
-
tabIndex: 0,
|
|
2105
|
-
...contentProps,
|
|
2106
|
-
ref: forwardedRef,
|
|
2107
|
-
style: {
|
|
2108
|
-
...props.style,
|
|
2109
|
-
animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0
|
|
2110
|
-
},
|
|
2111
|
-
children: present && children
|
|
2112
|
-
}
|
|
2113
|
-
) });
|
|
2114
|
-
}, "TabsContent")
|
|
2115
|
-
);
|
|
2116
|
-
function makeTriggerId$1(baseId, value) {
|
|
2117
|
-
return `${baseId}-trigger-${value}`;
|
|
2118
|
-
}
|
|
2119
|
-
__name$a(makeTriggerId$1, "makeTriggerId");
|
|
2120
|
-
function makeContentId$1(baseId, value) {
|
|
2121
|
-
return `${baseId}-content-${value}`;
|
|
2122
|
-
}
|
|
2123
|
-
__name$a(makeContentId$1, "makeContentId");
|
|
2124
|
-
function Tabs(t0) {
|
|
2125
|
-
const $ = compilerRuntime.c(8);
|
|
2126
|
-
let className;
|
|
2127
|
-
let props;
|
|
2128
|
-
if ($[0] !== t0) {
|
|
2129
|
-
({
|
|
2130
|
-
className,
|
|
2131
|
-
...props
|
|
2132
|
-
} = t0);
|
|
2133
|
-
$[0] = t0;
|
|
2134
|
-
$[1] = className;
|
|
2135
|
-
$[2] = props;
|
|
2136
|
-
} else {
|
|
2137
|
-
className = $[1];
|
|
2138
|
-
props = $[2];
|
|
2139
|
-
}
|
|
2140
|
-
let t1;
|
|
2141
|
-
if ($[3] !== className) {
|
|
2142
|
-
t1 = utils.cn("flex flex-col gap-2", className);
|
|
2143
|
-
$[3] = className;
|
|
2144
|
-
$[4] = t1;
|
|
2145
|
-
} else {
|
|
2146
|
-
t1 = $[4];
|
|
2147
|
-
}
|
|
2148
|
-
let t2;
|
|
2149
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
2150
|
-
t2 = /* @__PURE__ */ jsxRuntime.jsx(Tabs$1, { "data-slot": "tabs", className: t1, ...props });
|
|
2151
|
-
$[5] = props;
|
|
2152
|
-
$[6] = t1;
|
|
2153
|
-
$[7] = t2;
|
|
2154
|
-
} else {
|
|
2155
|
-
t2 = $[7];
|
|
2156
|
-
}
|
|
2157
|
-
return t2;
|
|
2158
|
-
}
|
|
2159
|
-
function TabsList(t0) {
|
|
2160
|
-
const $ = compilerRuntime.c(8);
|
|
2161
|
-
let className;
|
|
2162
|
-
let props;
|
|
2163
|
-
if ($[0] !== t0) {
|
|
2164
|
-
({
|
|
2165
|
-
className,
|
|
2166
|
-
...props
|
|
2167
|
-
} = t0);
|
|
2168
|
-
$[0] = t0;
|
|
2169
|
-
$[1] = className;
|
|
2170
|
-
$[2] = props;
|
|
2171
|
-
} else {
|
|
2172
|
-
className = $[1];
|
|
2173
|
-
props = $[2];
|
|
2174
|
-
}
|
|
2175
|
-
let t1;
|
|
2176
|
-
if ($[3] !== className) {
|
|
2177
|
-
t1 = utils.cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className);
|
|
2178
|
-
$[3] = className;
|
|
2179
|
-
$[4] = t1;
|
|
2180
|
-
} else {
|
|
2181
|
-
t1 = $[4];
|
|
2182
|
-
}
|
|
2183
|
-
let t2;
|
|
2184
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
2185
|
-
t2 = /* @__PURE__ */ jsxRuntime.jsx(TabsList$1, { "data-slot": "tabs-list", className: t1, ...props });
|
|
2186
|
-
$[5] = props;
|
|
2187
|
-
$[6] = t1;
|
|
2188
|
-
$[7] = t2;
|
|
2189
|
-
} else {
|
|
2190
|
-
t2 = $[7];
|
|
2191
|
-
}
|
|
2192
|
-
return t2;
|
|
2193
|
-
}
|
|
2194
|
-
function TabsTrigger(t0) {
|
|
2195
|
-
const $ = compilerRuntime.c(8);
|
|
2196
|
-
let className;
|
|
2197
|
-
let props;
|
|
2198
|
-
if ($[0] !== t0) {
|
|
2199
|
-
({
|
|
2200
|
-
className,
|
|
2201
|
-
...props
|
|
2202
|
-
} = t0);
|
|
2203
|
-
$[0] = t0;
|
|
2204
|
-
$[1] = className;
|
|
2205
|
-
$[2] = props;
|
|
2206
|
-
} else {
|
|
2207
|
-
className = $[1];
|
|
2208
|
-
props = $[2];
|
|
2209
|
-
}
|
|
2210
|
-
let t1;
|
|
2211
|
-
if ($[3] !== className) {
|
|
2212
|
-
t1 = utils.cn("data-[state=active]:bg-content1 dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
|
|
2213
|
-
$[3] = className;
|
|
2214
|
-
$[4] = t1;
|
|
2215
|
-
} else {
|
|
2216
|
-
t1 = $[4];
|
|
2217
|
-
}
|
|
2218
|
-
let t2;
|
|
2219
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
2220
|
-
t2 = /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger$1, { "data-slot": "tabs-trigger", className: t1, ...props });
|
|
2221
|
-
$[5] = props;
|
|
2222
|
-
$[6] = t1;
|
|
2223
|
-
$[7] = t2;
|
|
2224
|
-
} else {
|
|
2225
|
-
t2 = $[7];
|
|
2226
|
-
}
|
|
2227
|
-
return t2;
|
|
2228
|
-
}
|
|
2229
|
-
function TabsContent(t0) {
|
|
2230
|
-
const $ = compilerRuntime.c(8);
|
|
2231
|
-
let className;
|
|
2232
|
-
let props;
|
|
2233
|
-
if ($[0] !== t0) {
|
|
2234
|
-
({
|
|
2235
|
-
className,
|
|
2236
|
-
...props
|
|
2237
|
-
} = t0);
|
|
2238
|
-
$[0] = t0;
|
|
2239
|
-
$[1] = className;
|
|
2240
|
-
$[2] = props;
|
|
2241
|
-
} else {
|
|
2242
|
-
className = $[1];
|
|
2243
|
-
props = $[2];
|
|
2244
|
-
}
|
|
2245
|
-
let t1;
|
|
2246
|
-
if ($[3] !== className) {
|
|
2247
|
-
t1 = utils.cn("flex-1 outline-none", className);
|
|
2248
|
-
$[3] = className;
|
|
2249
|
-
$[4] = t1;
|
|
2250
|
-
} else {
|
|
2251
|
-
t1 = $[4];
|
|
2252
|
-
}
|
|
2253
|
-
let t2;
|
|
2254
|
-
if ($[5] !== props || $[6] !== t1) {
|
|
2255
|
-
t2 = /* @__PURE__ */ jsxRuntime.jsx(TabsContent$1, { "data-slot": "tabs-content", className: t1, ...props });
|
|
2256
|
-
$[5] = props;
|
|
2257
|
-
$[6] = t1;
|
|
2258
|
-
$[7] = t2;
|
|
2259
|
-
} else {
|
|
2260
|
-
t2 = $[7];
|
|
2261
|
-
}
|
|
2262
|
-
return t2;
|
|
2263
|
-
}
|
|
2264
1942
|
function Skeleton(t0) {
|
|
2265
1943
|
const $ = compilerRuntime.c(8);
|
|
2266
1944
|
let className;
|
|
@@ -8338,9 +8016,5 @@ exports.ResizableHandle = ResizableHandle;
|
|
|
8338
8016
|
exports.ResizablePanel = ResizablePanel;
|
|
8339
8017
|
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
8340
8018
|
exports.Skeleton = Skeleton;
|
|
8341
|
-
exports.Tabs = Tabs;
|
|
8342
|
-
exports.TabsContent = TabsContent;
|
|
8343
|
-
exports.TabsList = TabsList;
|
|
8344
|
-
exports.TabsTrigger = TabsTrigger;
|
|
8345
8019
|
exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
8346
8020
|
//# sourceMappingURL=index.cjs.js.map
|