@acusti/dropdown 1.0.0-alpha.5 → 1.0.0-alpha.7
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 +133 -31
- package/dist/Dropdown.js +257 -256
- package/dist/Dropdown.js.map +1 -1
- package/package.json +2 -2
package/dist/Dropdown.js
CHANGED
|
@@ -9,7 +9,7 @@ var DropdownContext = createContext(null);
|
|
|
9
9
|
var MenubarContext = createContext(null);
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/Dropdown.css?inline
|
|
12
|
-
var Dropdown_default = ":root{--uktdd-font-family:system-ui, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, Helvetica, Arial, sans-serif;--uktdd-body-bg-color:#fff;--uktdd-body-bg-color-hover:#69a2f9;--uktdd-body-color-hover:#fff;--uktdd-body-bg-color-selected:#0000000f;--uktdd-body-buffer:10px;--uktdd-body-max-height:calc(100dvh - var(--uktdd-body-buffer));--uktdd-body-max-width:calc(100dvw - var(--uktdd-body-buffer));--uktdd-body-min-height:30px;--uktdd-body-pad-bottom:.5em;--uktdd-body-pad-left:.6875em;--uktdd-body-pad-right:.6875em;--uktdd-body-pad-top:.5em;--uktdd-body-min-width:min(50px, 100%);--uktdd-body-position-area:block-end span-inline-end;--uktdd-body-position-try-
|
|
12
|
+
var Dropdown_default = ":root{--uktdd-font-family:system-ui, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, Helvetica, Arial, sans-serif;--uktdd-body-bg-color:#fff;--uktdd-body-bg-color-hover:#69a2f9;--uktdd-body-color-hover:#fff;--uktdd-body-bg-color-selected:#0000000f;--uktdd-body-buffer:10px;--uktdd-body-max-height:calc(100dvh - var(--uktdd-body-buffer));--uktdd-body-max-width:calc(100dvw - var(--uktdd-body-buffer));--uktdd-body-min-height:30px;--uktdd-body-pad-bottom:.5em;--uktdd-body-pad-left:.6875em;--uktdd-body-pad-right:.6875em;--uktdd-body-pad-top:.5em;--uktdd-body-min-width:min(50px, 100%);--uktdd-body-position-area:block-end span-inline-end;--uktdd-body-position-try-fallback-1:--uktdd-top-start;--uktdd-body-position-try-fallback-2:--uktdd-bottom-end;--uktdd-body-fill-fallbacks:--uktdd-fill-bottom, --uktdd-fill-top;--uktdd-body-gap:0px;--uktdd-body-color:canvastext;--uktdd-body-bg-color-path:#dcdcdc;--uktdd-body-color-path:currentColor;--uktdd-label-pad-right:.625em;--uktdd-submenu-position-area:inline-end span-block-end;--uktdd-submenu-position-try-fallback:--uktdd-submenu-inline-start;--uktdd-submenu-fill-fallbacks:--uktdd-submenu-fill, --uktdd-submenu-fill flip-inline;--uktdd-submenu-gap:0px;--uktdd-menubar-trigger-bg-color-active:#0000001f}.uktdropdown,.uktdropdown-trigger{font-family:var(--uktdd-font-family)}.uktdropdown{anchor-scope:--uktdd-anchor;width:max-content}.uktdropdown.disabled{pointer-events:none}.uktdropdown>*{cursor:default}.uktdropdown>:first-child{anchor-name:--uktdd-anchor}.uktdropdown-label{align-items:center;display:flex}.uktdropdown-label-text{padding-right:var(--uktdd-label-pad-right)}.uktdropdown-body{box-sizing:border-box;position-anchor:--uktdd-anchor;position-area:var(--uktdd-body-position-area);position-try-fallbacks:var(--uktdd-body-position-try-fallback-1), var(--uktdd-body-position-try-fallback-2), var(--uktdd-body-fill-fallbacks);min-block-size:min(var(--uktdd-body-min-height), var(--uktdd-body-max-height));max-block-size:var(--uktdd-body-max-height);min-inline-size:min(var(--uktdd-body-min-width), var(--uktdd-body-max-width));max-inline-size:var(--uktdd-body-max-width);inline-size:max-content;color:inherit;background-color:var(--uktdd-body-bg-color);flex-direction:column;display:flex;position:fixed;overflow:hidden;box-shadow:0 8px 18px #00000040}.uktdropdown-body.has-items{-webkit-user-select:none;user-select:none}.uktdropdown-body [aria-selected=true]{background-color:var(--uktdd-body-bg-color-selected)}.uktdropdown-body [data-ukt-active]{background-color:var(--uktdd-body-bg-color-hover);color:var(--uktdd-body-color-hover)}:is(.uktdropdown-body [data-ukt-active]:has([data-ukt-submenu] [data-ukt-active]),.uktdropdown-body [data-ukt-active]:has([data-ukt-submenu]:hover)){background-color:var(--uktdd-body-bg-color-path);color:var(--uktdd-body-color-path)}.uktdropdown-body [data-ukt-item][aria-disabled=true]{opacity:.5;pointer-events:none}.uktdropdown-body [data-ukt-item]{anchor-scope:--uktdd-submenu-anchor}.uktdropdown-body :is([data-ukt-item],[data-ukt-value])[aria-haspopup=menu]{padding-inline-end:2em;position:relative}.uktdropdown-body :is([data-ukt-item],[data-ukt-value])[aria-haspopup=menu]:after{content:\"\";border-block-start:.14em solid;border-inline-end:.14em solid;block-size:.3em;inline-size:.3em;position:absolute;inset-block-start:50%;inset-inline-end:.9em;translate:0 -50%;rotate:45deg}.uktdropdown-body :is([data-ukt-item],[data-ukt-value])[aria-haspopup=menu]:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{rotate:-45deg}.uktdropdown-body [data-ukt-item][aria-expanded=true]{anchor-name:--uktdd-submenu-anchor}.uktdropdown-body [data-ukt-submenu]:not([popover]){display:none}.uktdropdown-body [data-ukt-submenu]{box-sizing:border-box;block-size:auto;color:var(--uktdd-body-color);position-anchor:--uktdd-submenu-anchor;position-area:var(--uktdd-submenu-position-area);position-try-fallbacks:var(--uktdd-submenu-position-try-fallback), var(--uktdd-submenu-fill-fallbacks);z-index:2;margin-block:0;margin-inline:var(--uktdd-submenu-gap);--uktdd-body-gap:0px;padding:var(--uktdd-body-pad-top) var(--uktdd-body-pad-right) var(--uktdd-body-pad-bottom) var(--uktdd-body-pad-left);inline-size:max-content;max-inline-size:var(--uktdd-body-max-width);min-block-size:min(var(--uktdd-body-min-height), var(--uktdd-body-max-height));max-block-size:var(--uktdd-body-max-height);overscroll-behavior:contain;background-color:var(--uktdd-body-bg-color);border:0;list-style:none;position:fixed;inset:auto;overflow:auto;box-shadow:0 8px 18px #00000040}div.uktdropdown-body{block-size:auto;margin-block:var(--uktdd-body-gap);border:0;margin-inline:0;padding:0;inset:auto}.uktmenubar{width:max-content;font-family:var(--uktdd-font-family);align-items:stretch;display:flex}.uktmenubar .uktdropdown.is-open .uktdropdown-trigger{box-shadow:inset 0 0 0 100vmax var(--uktdd-menubar-trigger-bg-color-active)}.uktdropdown-content{box-sizing:border-box;overscroll-behavior:contain;min-block-size:0;padding:var(--uktdd-body-pad-top) var(--uktdd-body-pad-right) var(--uktdd-body-pad-bottom) var(--uktdd-body-pad-left);overflow:auto}@position-try --uktdd-noop{ }@position-try --uktdd-top-start{position-area: block-start span-inline-end;}@position-try --uktdd-bottom-start{position-area: block-end span-inline-end;}@position-try --uktdd-bottom-end{position-area: block-end span-inline-start;}@position-try --uktdd-top-end{position-area: block-start span-inline-start;}@position-try --uktdd-submenu-inline-start{position-area: inline-start span-block-end;}@position-try --uktdd-fill-bottom{position-area: block-end; block-size: calc(100% - var(--uktdd-body-gap) * 2); min-block-size: min(var(--uktdd-body-min-height), var(--uktdd-body-max-height), calc((100dvb - anchor-size(block)) / 2 - var(--uktdd-body-gap) * 2)); justify-self: anchor-center;}@position-try --uktdd-fill-top{position-area: block-start; block-size: calc(100% - var(--uktdd-body-gap) * 2); min-block-size: min(var(--uktdd-body-min-height), var(--uktdd-body-max-height), calc((100dvb - anchor-size(block)) / 2 - var(--uktdd-body-gap) * 2)); justify-self: anchor-center;}@position-try --uktdd-fill{block-size: calc(100% - var(--uktdd-body-gap) * 2);}@position-try --uktdd-submenu-fill{position-area: inline-end; block-size: calc(100% - var(--uktdd-body-gap) * 2); align-self: anchor-center;}@position-try --uktdd-fill-cover{position-area: span-all span-inline-end; block-size: calc(100% - var(--uktdd-body-gap) * 2); align-self: anchor-center;}";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/helpers.ts
|
|
15
15
|
var ITEM_SELECTOR = "[data-ukt-item], [data-ukt-value]";
|
|
@@ -439,7 +439,7 @@ function Dropdown(props) {
|
|
|
439
439
|
return t0;
|
|
440
440
|
}
|
|
441
441
|
function RootDropdown(t0) {
|
|
442
|
-
const $ = c(
|
|
442
|
+
const $ = c(158);
|
|
443
443
|
const { allowCreate, allowEmpty: t1, children, className, disabled, hasItems: t2, isOpenOnMount, isSearchable, keepOpenOnSubmit: t3, label, name, onActiveItem, onClick, onClose, onMouseDown, onMouseUp, onOpen, onSubmitItem, openOnHover, placeholder, style: styleFromProps, tabIndex, value } = t0;
|
|
444
444
|
const allowEmpty = t1 === void 0 ? true : t1;
|
|
445
445
|
const hasItems = t2 === void 0 ? true : t2;
|
|
@@ -454,13 +454,14 @@ function RootDropdown(t0) {
|
|
|
454
454
|
const body = childrenCount > 1 ? children[1] : children;
|
|
455
455
|
const valueIdentity = typeof value === "string" ? value : value?.value;
|
|
456
456
|
let t4;
|
|
457
|
-
if ($[0] !==
|
|
458
|
-
t4 = !isSearchable ? void 0 : typeof value !== "string" ? value?.label : getLabelFromChildren(body, value) ?? value;
|
|
459
|
-
$[0] =
|
|
460
|
-
$[1] =
|
|
461
|
-
$[2] =
|
|
462
|
-
$[3] =
|
|
463
|
-
|
|
457
|
+
if ($[0] !== allowCreate || $[1] !== body || $[2] !== isSearchable || $[3] !== value) {
|
|
458
|
+
t4 = !isSearchable ? void 0 : typeof value !== "string" ? value?.label : getLabelFromChildren(body, value) ?? (allowCreate ? value : void 0);
|
|
459
|
+
$[0] = allowCreate;
|
|
460
|
+
$[1] = body;
|
|
461
|
+
$[2] = isSearchable;
|
|
462
|
+
$[3] = value;
|
|
463
|
+
$[4] = t4;
|
|
464
|
+
} else t4 = $[4];
|
|
464
465
|
const valueLabel = t4;
|
|
465
466
|
const [isOpen, setIsOpen] = useState(isOpenOnMount ?? false);
|
|
466
467
|
const [isOpening, setIsOpening] = useState(!isOpenOnMount);
|
|
@@ -471,10 +472,10 @@ function RootDropdown(t0) {
|
|
|
471
472
|
const inputElementRef = useRef(null);
|
|
472
473
|
const consumerOwnsARIASelectedRef = useRef(false);
|
|
473
474
|
let t5;
|
|
474
|
-
if ($[
|
|
475
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
475
476
|
t5 = /* @__PURE__ */ new WeakSet();
|
|
476
|
-
$[
|
|
477
|
-
} else t5 = $[
|
|
477
|
+
$[5] = t5;
|
|
478
|
+
} else t5 = $[5];
|
|
478
479
|
const annotatedBodiesRef = useRef(t5);
|
|
479
480
|
const closingTimerRef = useRef(null);
|
|
480
481
|
const isOpeningTimerRef = useRef(null);
|
|
@@ -485,10 +486,10 @@ function RootDropdown(t0) {
|
|
|
485
486
|
const disclosureTimerRef = useRef(null);
|
|
486
487
|
const pendingDisclosureItemRef = useRef(null);
|
|
487
488
|
let t6;
|
|
488
|
-
if ($[
|
|
489
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
489
490
|
t6 = /* @__PURE__ */ new Set();
|
|
490
|
-
$[
|
|
491
|
-
} else t6 = $[
|
|
491
|
+
$[6] = t6;
|
|
492
|
+
} else t6 = $[6];
|
|
492
493
|
const submenuRegistrationsRef = useRef(t6);
|
|
493
494
|
const pointerRef = useRef(null);
|
|
494
495
|
const lastMouseEventRef = useRef(null);
|
|
@@ -508,7 +509,7 @@ function RootDropdown(t0) {
|
|
|
508
509
|
const valueRef = useRef(valueIdentity);
|
|
509
510
|
let t7;
|
|
510
511
|
let t8;
|
|
511
|
-
if ($[
|
|
512
|
+
if ($[7] !== allowCreate || $[8] !== allowEmpty || $[9] !== hasItems || $[10] !== isOpen || $[11] !== isOpening || $[12] !== keepOpenOnSubmit || $[13] !== onClose || $[14] !== onOpen || $[15] !== onSubmitItem || $[16] !== valueIdentity) {
|
|
512
513
|
t7 = () => {
|
|
513
514
|
allowCreateRef.current = allowCreate;
|
|
514
515
|
allowEmptyRef.current = allowEmpty;
|
|
@@ -533,27 +534,27 @@ function RootDropdown(t0) {
|
|
|
533
534
|
onSubmitItem,
|
|
534
535
|
valueIdentity
|
|
535
536
|
];
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
$[
|
|
544
|
-
$[
|
|
545
|
-
$[
|
|
546
|
-
$[
|
|
547
|
-
$[
|
|
537
|
+
$[7] = allowCreate;
|
|
538
|
+
$[8] = allowEmpty;
|
|
539
|
+
$[9] = hasItems;
|
|
540
|
+
$[10] = isOpen;
|
|
541
|
+
$[11] = isOpening;
|
|
542
|
+
$[12] = keepOpenOnSubmit;
|
|
543
|
+
$[13] = onClose;
|
|
544
|
+
$[14] = onOpen;
|
|
545
|
+
$[15] = onSubmitItem;
|
|
546
|
+
$[16] = valueIdentity;
|
|
547
|
+
$[17] = t7;
|
|
548
|
+
$[18] = t8;
|
|
548
549
|
} else {
|
|
549
|
-
t7 = $[
|
|
550
|
-
t8 = $[
|
|
550
|
+
t7 = $[17];
|
|
551
|
+
t8 = $[18];
|
|
551
552
|
}
|
|
552
553
|
useEffect(t7, t8);
|
|
553
554
|
const isMountedRef = useRef(false);
|
|
554
555
|
let t10;
|
|
555
556
|
let t9;
|
|
556
|
-
if ($[
|
|
557
|
+
if ($[19] !== isOpen) {
|
|
557
558
|
t9 = () => {
|
|
558
559
|
if (!isMountedRef.current) {
|
|
559
560
|
isMountedRef.current = true;
|
|
@@ -564,46 +565,46 @@ function RootDropdown(t0) {
|
|
|
564
565
|
else if (!isOpen && onCloseRef.current) onCloseRef.current();
|
|
565
566
|
};
|
|
566
567
|
t10 = [isOpen];
|
|
567
|
-
$[
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
568
|
+
$[19] = isOpen;
|
|
569
|
+
$[20] = t10;
|
|
570
|
+
$[21] = t9;
|
|
570
571
|
} else {
|
|
571
|
-
t10 = $[
|
|
572
|
-
t9 = $[
|
|
572
|
+
t10 = $[20];
|
|
573
|
+
t9 = $[21];
|
|
573
574
|
}
|
|
574
575
|
useEffect(t9, t10);
|
|
575
576
|
let t11;
|
|
576
|
-
if ($[
|
|
577
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
577
578
|
t11 = { registerSubmenu(registration) {
|
|
578
579
|
submenuRegistrationsRef.current.add(registration);
|
|
579
580
|
return () => {
|
|
580
581
|
submenuRegistrationsRef.current.delete(registration);
|
|
581
582
|
};
|
|
582
583
|
} };
|
|
583
|
-
$[
|
|
584
|
-
} else t11 = $[
|
|
584
|
+
$[22] = t11;
|
|
585
|
+
} else t11 = $[22];
|
|
585
586
|
const dropdownContextValue = t11;
|
|
586
587
|
let t12;
|
|
587
|
-
if ($[
|
|
588
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
588
589
|
t12 = (key, payload) => {
|
|
589
590
|
if (!payload.element) return;
|
|
590
591
|
for (const registration_0 of submenuRegistrationsRef.current) if (registration_0.element.contains(payload.element)) registration_0[key]?.(payload);
|
|
591
592
|
};
|
|
592
|
-
$[
|
|
593
|
-
} else t12 = $[
|
|
593
|
+
$[23] = t12;
|
|
594
|
+
} else t12 = $[23];
|
|
594
595
|
const dispatchToSubmenus = t12;
|
|
595
596
|
let t13;
|
|
596
|
-
if ($[
|
|
597
|
+
if ($[24] !== onActiveItem) {
|
|
597
598
|
t13 = (payload_0) => {
|
|
598
599
|
onActiveItem?.(payload_0);
|
|
599
600
|
dispatchToSubmenus("onActiveItem", payload_0);
|
|
600
601
|
};
|
|
601
|
-
$[
|
|
602
|
-
$[
|
|
603
|
-
} else t13 = $[
|
|
602
|
+
$[24] = onActiveItem;
|
|
603
|
+
$[25] = t13;
|
|
604
|
+
} else t13 = $[25];
|
|
604
605
|
const handleActiveItem = t13;
|
|
605
606
|
let t14;
|
|
606
|
-
if ($[
|
|
607
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
607
608
|
t14 = (item, isExpanded) => {
|
|
608
609
|
const submenu = getSubmenuOfItem(item);
|
|
609
610
|
if (submenu) {
|
|
@@ -613,11 +614,11 @@ function RootDropdown(t0) {
|
|
|
613
614
|
}
|
|
614
615
|
for (const registration_1 of submenuRegistrationsRef.current) if (registration_1.element === item) (isExpanded ? registration_1.onOpen : registration_1.onClose)?.();
|
|
615
616
|
};
|
|
616
|
-
$[
|
|
617
|
-
} else t14 = $[
|
|
617
|
+
$[26] = t14;
|
|
618
|
+
} else t14 = $[26];
|
|
618
619
|
const handleToggleSubmenu = t14;
|
|
619
620
|
let t15;
|
|
620
|
-
if ($[
|
|
621
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
621
622
|
t15 = () => {
|
|
622
623
|
if (disclosureTimerRef.current != null) {
|
|
623
624
|
clearTimeout(disclosureTimerRef.current);
|
|
@@ -625,23 +626,23 @@ function RootDropdown(t0) {
|
|
|
625
626
|
}
|
|
626
627
|
pendingDisclosureItemRef.current = null;
|
|
627
628
|
};
|
|
628
|
-
$[
|
|
629
|
-
} else t15 = $[
|
|
629
|
+
$[27] = t15;
|
|
630
|
+
} else t15 = $[27];
|
|
630
631
|
const clearDisclosureTimer = t15;
|
|
631
632
|
let t16;
|
|
632
633
|
let t17;
|
|
633
|
-
if ($[
|
|
634
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
634
635
|
t16 = () => clearDisclosureTimer;
|
|
635
636
|
t17 = [];
|
|
636
|
-
$[
|
|
637
|
-
$[
|
|
637
|
+
$[28] = t16;
|
|
638
|
+
$[29] = t17;
|
|
638
639
|
} else {
|
|
639
|
-
t16 = $[
|
|
640
|
-
t17 = $[
|
|
640
|
+
t16 = $[28];
|
|
641
|
+
t17 = $[29];
|
|
641
642
|
}
|
|
642
643
|
useEffect(t16, t17);
|
|
643
644
|
let t18;
|
|
644
|
-
if ($[
|
|
645
|
+
if ($[30] !== dropdownElement) {
|
|
645
646
|
t18 = () => {
|
|
646
647
|
if (!dropdownElement) return;
|
|
647
648
|
const activeElement = getActiveItemElement(dropdownElement);
|
|
@@ -661,35 +662,35 @@ function RootDropdown(t0) {
|
|
|
661
662
|
}
|
|
662
663
|
clearDisclosureTimer();
|
|
663
664
|
};
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
} else t18 = $[
|
|
665
|
+
$[30] = dropdownElement;
|
|
666
|
+
$[31] = t18;
|
|
667
|
+
} else t18 = $[31];
|
|
667
668
|
const syncSubmenuDisclosure = t18;
|
|
668
669
|
let t19;
|
|
669
|
-
if ($[
|
|
670
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
670
671
|
t19 = () => {
|
|
671
672
|
if (safeAreaTimerRef.current != null) {
|
|
672
673
|
clearTimeout(safeAreaTimerRef.current);
|
|
673
674
|
safeAreaTimerRef.current = null;
|
|
674
675
|
}
|
|
675
676
|
};
|
|
676
|
-
$[
|
|
677
|
-
} else t19 = $[
|
|
677
|
+
$[32] = t19;
|
|
678
|
+
} else t19 = $[32];
|
|
678
679
|
const clearSafeAreaTimer = t19;
|
|
679
680
|
let t20;
|
|
680
681
|
let t21;
|
|
681
|
-
if ($[
|
|
682
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
682
683
|
t20 = () => clearSafeAreaTimer;
|
|
683
684
|
t21 = [];
|
|
684
|
-
$[
|
|
685
|
-
$[
|
|
685
|
+
$[33] = t20;
|
|
686
|
+
$[34] = t21;
|
|
686
687
|
} else {
|
|
687
|
-
t20 = $[
|
|
688
|
-
t21 = $[
|
|
688
|
+
t20 = $[33];
|
|
689
|
+
t21 = $[34];
|
|
689
690
|
}
|
|
690
691
|
useEffect(t20, t21);
|
|
691
692
|
let t22;
|
|
692
|
-
if ($[
|
|
693
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
693
694
|
t22 = (x, y) => {
|
|
694
695
|
const safeArea = safeAreaRef.current;
|
|
695
696
|
if (!safeArea || !isItemExpanded(safeArea.parent)) return false;
|
|
@@ -709,11 +710,11 @@ function RootDropdown(t0) {
|
|
|
709
710
|
y: submenuRect.bottom
|
|
710
711
|
});
|
|
711
712
|
};
|
|
712
|
-
$[
|
|
713
|
-
} else t22 = $[
|
|
713
|
+
$[35] = t22;
|
|
714
|
+
} else t22 = $[35];
|
|
714
715
|
const isPointerInSafeArea = t22;
|
|
715
716
|
let t23;
|
|
716
|
-
if ($[
|
|
717
|
+
if ($[36] !== dropdownElement || $[37] !== handleActiveItem || $[38] !== syncSubmenuDisclosure) {
|
|
717
718
|
t23 = (targetElement) => {
|
|
718
719
|
clearSafeAreaTimer();
|
|
719
720
|
safeAreaRef.current = null;
|
|
@@ -731,14 +732,14 @@ function RootDropdown(t0) {
|
|
|
731
732
|
});
|
|
732
733
|
syncSubmenuDisclosure();
|
|
733
734
|
};
|
|
734
|
-
$[
|
|
735
|
-
$[
|
|
736
|
-
$[
|
|
737
|
-
$[
|
|
738
|
-
} else t23 = $[
|
|
735
|
+
$[36] = dropdownElement;
|
|
736
|
+
$[37] = handleActiveItem;
|
|
737
|
+
$[38] = syncSubmenuDisclosure;
|
|
738
|
+
$[39] = t23;
|
|
739
|
+
} else t23 = $[39];
|
|
739
740
|
const commitPointerTarget = t23;
|
|
740
741
|
let t24;
|
|
741
|
-
if ($[
|
|
742
|
+
if ($[40] !== commitPointerTarget || $[41] !== dropdownElement) {
|
|
742
743
|
t24 = (event_0) => {
|
|
743
744
|
if (!dropdownElement || !isOpenRef.current || !hasItemsRef.current) return;
|
|
744
745
|
const pointer_0 = {
|
|
@@ -772,36 +773,36 @@ function RootDropdown(t0) {
|
|
|
772
773
|
safeAreaTimerRef.current = setTimeout(commitPointerTarget, SAFE_AREA_TIMEOUT);
|
|
773
774
|
} else if (wasInSafeAreaRef.current) commitPointerTarget(target_0);
|
|
774
775
|
};
|
|
775
|
-
$[
|
|
776
|
-
$[
|
|
777
|
-
$[
|
|
778
|
-
} else t24 = $[
|
|
776
|
+
$[40] = commitPointerTarget;
|
|
777
|
+
$[41] = dropdownElement;
|
|
778
|
+
$[42] = t24;
|
|
779
|
+
} else t24 = $[42];
|
|
779
780
|
const trackSafeArea = t24;
|
|
780
781
|
let t25;
|
|
781
|
-
if ($[
|
|
782
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
782
783
|
t25 = () => {
|
|
783
784
|
if (hoverCloseTimerRef.current != null) {
|
|
784
785
|
clearTimeout(hoverCloseTimerRef.current);
|
|
785
786
|
hoverCloseTimerRef.current = null;
|
|
786
787
|
}
|
|
787
788
|
};
|
|
788
|
-
$[
|
|
789
|
-
} else t25 = $[
|
|
789
|
+
$[43] = t25;
|
|
790
|
+
} else t25 = $[43];
|
|
790
791
|
const clearHoverCloseTimer = t25;
|
|
791
792
|
let t26;
|
|
792
793
|
let t27;
|
|
793
|
-
if ($[
|
|
794
|
+
if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
|
|
794
795
|
t26 = () => clearHoverCloseTimer;
|
|
795
796
|
t27 = [];
|
|
796
|
-
$[
|
|
797
|
-
$[
|
|
797
|
+
$[44] = t26;
|
|
798
|
+
$[45] = t27;
|
|
798
799
|
} else {
|
|
799
|
-
t26 = $[
|
|
800
|
-
t27 = $[
|
|
800
|
+
t26 = $[44];
|
|
801
|
+
t27 = $[45];
|
|
801
802
|
}
|
|
802
803
|
useEffect(t26, t27);
|
|
803
804
|
let t28;
|
|
804
|
-
if ($[
|
|
805
|
+
if ($[46] !== dropdownElement || $[47] !== menubar) {
|
|
805
806
|
t28 = (options) => {
|
|
806
807
|
setIsOpen(false);
|
|
807
808
|
setIsOpening(false);
|
|
@@ -817,25 +818,25 @@ function RootDropdown(t0) {
|
|
|
817
818
|
}
|
|
818
819
|
if (menubar && dropdownElement && !options?.keepMenubarEngaged) menubar.notifyClosed(dropdownElement);
|
|
819
820
|
};
|
|
820
|
-
$[
|
|
821
|
-
$[
|
|
822
|
-
$[
|
|
823
|
-
} else t28 = $[
|
|
821
|
+
$[46] = dropdownElement;
|
|
822
|
+
$[47] = menubar;
|
|
823
|
+
$[48] = t28;
|
|
824
|
+
} else t28 = $[48];
|
|
824
825
|
const closeDropdown = t28;
|
|
825
826
|
let t29;
|
|
826
|
-
if ($[
|
|
827
|
+
if ($[49] !== openOnHover) {
|
|
827
828
|
t29 = () => {
|
|
828
829
|
clearHoverCloseTimer();
|
|
829
830
|
if (!openOnHover || isOpenRef.current) return;
|
|
830
831
|
setIsOpen(true);
|
|
831
832
|
setIsOpening(false);
|
|
832
833
|
};
|
|
833
|
-
$[
|
|
834
|
-
$[
|
|
835
|
-
} else t29 = $[
|
|
834
|
+
$[49] = openOnHover;
|
|
835
|
+
$[50] = t29;
|
|
836
|
+
} else t29 = $[50];
|
|
836
837
|
const handleDropdownMouseEnter = t29;
|
|
837
838
|
let t30;
|
|
838
|
-
if ($[
|
|
839
|
+
if ($[51] !== closeDropdown || $[52] !== openOnHover) {
|
|
839
840
|
t30 = () => {
|
|
840
841
|
if (!openOnHover || !isOpenRef.current || hoverCloseTimerRef.current != null) return;
|
|
841
842
|
hoverCloseTimerRef.current = setTimeout(() => {
|
|
@@ -843,24 +844,24 @@ function RootDropdown(t0) {
|
|
|
843
844
|
closeDropdown();
|
|
844
845
|
}, HOVER_CLOSE_DELAY);
|
|
845
846
|
};
|
|
846
|
-
$[
|
|
847
|
-
$[
|
|
848
|
-
$[
|
|
849
|
-
} else t30 = $[
|
|
847
|
+
$[51] = closeDropdown;
|
|
848
|
+
$[52] = openOnHover;
|
|
849
|
+
$[53] = t30;
|
|
850
|
+
} else t30 = $[53];
|
|
850
851
|
const handleDropdownMouseLeave = t30;
|
|
851
852
|
let t31;
|
|
852
|
-
if ($[
|
|
853
|
+
if ($[54] !== dropdownElement?.firstElementChild) {
|
|
853
854
|
t31 = () => {
|
|
854
855
|
const firstChild = dropdownElement?.firstElementChild;
|
|
855
856
|
if (!firstChild) return;
|
|
856
857
|
(firstChild.matches(FOCUSABLE_SELECTOR) ? firstChild : firstChild.querySelector(FOCUSABLE_SELECTOR))?.focus();
|
|
857
858
|
};
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
860
|
-
} else t31 = $[
|
|
859
|
+
$[54] = dropdownElement?.firstElementChild;
|
|
860
|
+
$[55] = t31;
|
|
861
|
+
} else t31 = $[55];
|
|
861
862
|
const focusTrigger = t31;
|
|
862
863
|
let t32;
|
|
863
|
-
if ($[
|
|
864
|
+
if ($[56] !== closeDropdown || $[57] !== dropdownElement || $[58] !== focusTrigger || $[59] !== menubar) {
|
|
864
865
|
t32 = () => {
|
|
865
866
|
if (!menubar || !dropdownElement) return;
|
|
866
867
|
return menubar.registerMember({
|
|
@@ -871,16 +872,16 @@ function RootDropdown(t0) {
|
|
|
871
872
|
open: () => setIsOpen(true)
|
|
872
873
|
});
|
|
873
874
|
};
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
$[
|
|
877
|
-
$[
|
|
878
|
-
$[
|
|
879
|
-
} else t32 = $[
|
|
875
|
+
$[56] = closeDropdown;
|
|
876
|
+
$[57] = dropdownElement;
|
|
877
|
+
$[58] = focusTrigger;
|
|
878
|
+
$[59] = menubar;
|
|
879
|
+
$[60] = t32;
|
|
880
|
+
} else t32 = $[60];
|
|
880
881
|
useEffect(t32);
|
|
881
882
|
let t33;
|
|
882
883
|
let t34;
|
|
883
|
-
if ($[
|
|
884
|
+
if ($[61] !== dropdownElement || $[62] !== isOpen || $[63] !== menubar) {
|
|
884
885
|
t33 = () => {
|
|
885
886
|
if (isOpen && menubar && dropdownElement) menubar.notifyOpened(dropdownElement);
|
|
886
887
|
};
|
|
@@ -889,18 +890,18 @@ function RootDropdown(t0) {
|
|
|
889
890
|
isOpen,
|
|
890
891
|
menubar
|
|
891
892
|
];
|
|
892
|
-
$[
|
|
893
|
-
$[
|
|
894
|
-
$[
|
|
895
|
-
$[
|
|
896
|
-
$[
|
|
893
|
+
$[61] = dropdownElement;
|
|
894
|
+
$[62] = isOpen;
|
|
895
|
+
$[63] = menubar;
|
|
896
|
+
$[64] = t33;
|
|
897
|
+
$[65] = t34;
|
|
897
898
|
} else {
|
|
898
|
-
t33 = $[
|
|
899
|
-
t34 = $[
|
|
899
|
+
t33 = $[64];
|
|
900
|
+
t34 = $[65];
|
|
900
901
|
}
|
|
901
902
|
useEffect(t33, t34);
|
|
902
903
|
let t35;
|
|
903
|
-
if ($[
|
|
904
|
+
if ($[66] !== closeDropdown || $[67] !== dropdownElement || $[68] !== handleActiveItem || $[69] !== popupRole) {
|
|
904
905
|
t35 = (event_1) => {
|
|
905
906
|
const element = hasItemsRef.current ? getActiveItemElement(dropdownElement) : null;
|
|
906
907
|
const submenuOfActive = element ? getSubmenuOfItem(element) : null;
|
|
@@ -961,15 +962,15 @@ function RootDropdown(t0) {
|
|
|
961
962
|
onSubmitItemRef.current?.(payload_1);
|
|
962
963
|
dispatchToSubmenus("onSubmitItem", payload_1);
|
|
963
964
|
};
|
|
964
|
-
$[
|
|
965
|
-
$[
|
|
966
|
-
$[
|
|
967
|
-
$[
|
|
968
|
-
$[
|
|
969
|
-
} else t35 = $[
|
|
965
|
+
$[66] = closeDropdown;
|
|
966
|
+
$[67] = dropdownElement;
|
|
967
|
+
$[68] = handleActiveItem;
|
|
968
|
+
$[69] = popupRole;
|
|
969
|
+
$[70] = t35;
|
|
970
|
+
} else t35 = $[70];
|
|
970
971
|
const handleSubmitItem = t35;
|
|
971
972
|
let t36;
|
|
972
|
-
if ($[
|
|
973
|
+
if ($[71] !== trackSafeArea) {
|
|
973
974
|
t36 = (event_2) => {
|
|
974
975
|
const { clientX, clientY } = event_2;
|
|
975
976
|
currentInputMethodRef.current = "mouse";
|
|
@@ -979,12 +980,12 @@ function RootDropdown(t0) {
|
|
|
979
980
|
if (Math.abs(initialPosition.clientX - clientX) < 12 && Math.abs(initialPosition.clientY - clientY) < 12) return;
|
|
980
981
|
setIsOpening(false);
|
|
981
982
|
};
|
|
982
|
-
$[
|
|
983
|
-
$[
|
|
984
|
-
} else t36 = $[
|
|
983
|
+
$[71] = trackSafeArea;
|
|
984
|
+
$[72] = t36;
|
|
985
|
+
} else t36 = $[72];
|
|
985
986
|
const handleMouseMove = t36;
|
|
986
987
|
let t37;
|
|
987
|
-
if ($[
|
|
988
|
+
if ($[73] !== dropdownElement || $[74] !== handleActiveItem || $[75] !== syncSubmenuDisclosure) {
|
|
988
989
|
t37 = (event_3) => {
|
|
989
990
|
if (!hasItemsRef.current) return;
|
|
990
991
|
if (currentInputMethodRef.current !== "mouse") return;
|
|
@@ -1004,14 +1005,14 @@ function RootDropdown(t0) {
|
|
|
1004
1005
|
});
|
|
1005
1006
|
syncSubmenuDisclosure();
|
|
1006
1007
|
};
|
|
1007
|
-
$[
|
|
1008
|
-
$[
|
|
1009
|
-
$[
|
|
1010
|
-
$[
|
|
1011
|
-
} else t37 = $[
|
|
1008
|
+
$[73] = dropdownElement;
|
|
1009
|
+
$[74] = handleActiveItem;
|
|
1010
|
+
$[75] = syncSubmenuDisclosure;
|
|
1011
|
+
$[76] = t37;
|
|
1012
|
+
} else t37 = $[76];
|
|
1012
1013
|
const handleMouseOver = t37;
|
|
1013
1014
|
let t38;
|
|
1014
|
-
if ($[
|
|
1015
|
+
if ($[77] !== dropdownElement || $[78] !== syncSubmenuDisclosure) {
|
|
1015
1016
|
t38 = (event_4) => {
|
|
1016
1017
|
if (!hasItemsRef.current) return;
|
|
1017
1018
|
const relatedTarget = event_4.relatedTarget;
|
|
@@ -1028,13 +1029,13 @@ function RootDropdown(t0) {
|
|
|
1028
1029
|
delete activeItem.dataset.uktActive;
|
|
1029
1030
|
syncSubmenuDisclosure();
|
|
1030
1031
|
};
|
|
1031
|
-
$[
|
|
1032
|
-
$[
|
|
1033
|
-
$[
|
|
1034
|
-
} else t38 = $[
|
|
1032
|
+
$[77] = dropdownElement;
|
|
1033
|
+
$[78] = syncSubmenuDisclosure;
|
|
1034
|
+
$[79] = t38;
|
|
1035
|
+
} else t38 = $[79];
|
|
1035
1036
|
const handleMouseOut = t38;
|
|
1036
1037
|
let t39;
|
|
1037
|
-
if ($[
|
|
1038
|
+
if ($[80] !== onMouseDown) {
|
|
1038
1039
|
t39 = (event_5) => {
|
|
1039
1040
|
if (onMouseDown) onMouseDown(event_5);
|
|
1040
1041
|
if (isOpenRef.current) return;
|
|
@@ -1049,12 +1050,12 @@ function RootDropdown(t0) {
|
|
|
1049
1050
|
isOpeningTimerRef.current = null;
|
|
1050
1051
|
}, 1e3);
|
|
1051
1052
|
};
|
|
1052
|
-
$[
|
|
1053
|
-
$[
|
|
1054
|
-
} else t39 = $[
|
|
1053
|
+
$[80] = onMouseDown;
|
|
1054
|
+
$[81] = t39;
|
|
1055
|
+
} else t39 = $[81];
|
|
1055
1056
|
const handleMouseDown = t39;
|
|
1056
1057
|
let t40;
|
|
1057
|
-
if ($[
|
|
1058
|
+
if ($[82] !== closeDropdown || $[83] !== dropdownElement || $[84] !== handleActiveItem || $[85] !== handleSubmitItem || $[86] !== onMouseUp) {
|
|
1058
1059
|
t40 = (event_6) => {
|
|
1059
1060
|
if (onMouseUp) onMouseUp(event_6);
|
|
1060
1061
|
if (isOpeningRef.current || !isOpenRef.current || closingTimerRef.current != null) return;
|
|
@@ -1079,16 +1080,16 @@ function RootDropdown(t0) {
|
|
|
1079
1080
|
}
|
|
1080
1081
|
handleSubmitItem(event_6);
|
|
1081
1082
|
};
|
|
1082
|
-
$[
|
|
1083
|
-
$[
|
|
1084
|
-
$[
|
|
1085
|
-
$[
|
|
1086
|
-
$[
|
|
1087
|
-
$[
|
|
1088
|
-
} else t40 = $[
|
|
1083
|
+
$[82] = closeDropdown;
|
|
1084
|
+
$[83] = dropdownElement;
|
|
1085
|
+
$[84] = handleActiveItem;
|
|
1086
|
+
$[85] = handleSubmitItem;
|
|
1087
|
+
$[86] = onMouseUp;
|
|
1088
|
+
$[87] = t40;
|
|
1089
|
+
} else t40 = $[87];
|
|
1089
1090
|
const handleMouseUp = t40;
|
|
1090
1091
|
let t41;
|
|
1091
|
-
if ($[
|
|
1092
|
+
if ($[88] !== closeDropdown || $[89] !== dropdownElement || $[90] !== focusTrigger || $[91] !== handleActiveItem || $[92] !== handleSubmitItem || $[93] !== menubar || $[94] !== syncSubmenuDisclosure) {
|
|
1092
1093
|
t41 = (event_7) => {
|
|
1093
1094
|
const { altKey, ctrlKey, key: key_0, metaKey } = event_7;
|
|
1094
1095
|
const eventTarget_2 = event_7.target;
|
|
@@ -1222,28 +1223,28 @@ function RootDropdown(t0) {
|
|
|
1222
1223
|
}
|
|
1223
1224
|
}
|
|
1224
1225
|
};
|
|
1225
|
-
$[
|
|
1226
|
-
$[
|
|
1227
|
-
$[
|
|
1228
|
-
$[
|
|
1229
|
-
$[
|
|
1230
|
-
$[
|
|
1231
|
-
$[
|
|
1232
|
-
$[
|
|
1233
|
-
} else t41 = $[
|
|
1226
|
+
$[88] = closeDropdown;
|
|
1227
|
+
$[89] = dropdownElement;
|
|
1228
|
+
$[90] = focusTrigger;
|
|
1229
|
+
$[91] = handleActiveItem;
|
|
1230
|
+
$[92] = handleSubmitItem;
|
|
1231
|
+
$[93] = menubar;
|
|
1232
|
+
$[94] = syncSubmenuDisclosure;
|
|
1233
|
+
$[95] = t41;
|
|
1234
|
+
} else t41 = $[95];
|
|
1234
1235
|
const handleKeyDown = t41;
|
|
1235
1236
|
let t42;
|
|
1236
|
-
if ($[
|
|
1237
|
+
if ($[96] !== handleKeyDown) {
|
|
1237
1238
|
t42 = {
|
|
1238
1239
|
ignoreUsedKeyboardEvents: false,
|
|
1239
1240
|
onKeyDown: handleKeyDown
|
|
1240
1241
|
};
|
|
1241
|
-
$[
|
|
1242
|
-
$[
|
|
1243
|
-
} else t42 = $[
|
|
1242
|
+
$[96] = handleKeyDown;
|
|
1243
|
+
$[97] = t42;
|
|
1244
|
+
} else t42 = $[97];
|
|
1244
1245
|
useKeyboardEvents(t42);
|
|
1245
1246
|
let t43;
|
|
1246
|
-
if ($[
|
|
1247
|
+
if ($[98] !== closeDropdown || $[99] !== handleActiveItem || $[100] !== isOpenOnMount) {
|
|
1247
1248
|
t43 = (ref) => {
|
|
1248
1249
|
setDropdownElement(ref);
|
|
1249
1250
|
if (!ref) return;
|
|
@@ -1316,14 +1317,14 @@ function RootDropdown(t0) {
|
|
|
1316
1317
|
if (inputElement) inputElement.removeEventListener("input", handleInput);
|
|
1317
1318
|
};
|
|
1318
1319
|
};
|
|
1319
|
-
$[
|
|
1320
|
-
$[
|
|
1321
|
-
$[
|
|
1322
|
-
$[
|
|
1323
|
-
} else t43 = $[
|
|
1320
|
+
$[98] = closeDropdown;
|
|
1321
|
+
$[99] = handleActiveItem;
|
|
1322
|
+
$[100] = isOpenOnMount;
|
|
1323
|
+
$[101] = t43;
|
|
1324
|
+
} else t43 = $[101];
|
|
1324
1325
|
const handleRef = t43;
|
|
1325
1326
|
let t44;
|
|
1326
|
-
if ($[
|
|
1327
|
+
if ($[102] !== dropdownElement || $[103] !== popupRole || $[104] !== valueIdentity) {
|
|
1327
1328
|
t44 = (ref_0) => {
|
|
1328
1329
|
if (!ref_0) return;
|
|
1329
1330
|
if (annotatedBodiesRef.current.has(ref_0)) return;
|
|
@@ -1343,21 +1344,21 @@ function RootDropdown(t0) {
|
|
|
1343
1344
|
}
|
|
1344
1345
|
}
|
|
1345
1346
|
};
|
|
1346
|
-
$[
|
|
1347
|
-
$[
|
|
1348
|
-
$[
|
|
1349
|
-
$[
|
|
1350
|
-
} else t44 = $[
|
|
1347
|
+
$[102] = dropdownElement;
|
|
1348
|
+
$[103] = popupRole;
|
|
1349
|
+
$[104] = valueIdentity;
|
|
1350
|
+
$[105] = t44;
|
|
1351
|
+
} else t44 = $[105];
|
|
1351
1352
|
const handleBodyRef = t44;
|
|
1352
1353
|
if (!isValidElement(trigger)) if (isSearchable) {
|
|
1353
1354
|
const t45 = valueLabel ?? "";
|
|
1354
1355
|
let t46;
|
|
1355
|
-
if ($[
|
|
1356
|
+
if ($[106] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1356
1357
|
t46 = () => setIsOpen(true);
|
|
1357
|
-
$[
|
|
1358
|
-
} else t46 = $[
|
|
1358
|
+
$[106] = t46;
|
|
1359
|
+
} else t46 = $[106];
|
|
1359
1360
|
let t47;
|
|
1360
|
-
if ($[
|
|
1361
|
+
if ($[107] !== bodyId || $[108] !== disabled || $[109] !== isOpen || $[110] !== name || $[111] !== placeholder || $[112] !== popupRole || $[113] !== t45 || $[114] !== tabIndex) {
|
|
1361
1362
|
t47 = /* @__PURE__ */ jsx("input", {
|
|
1362
1363
|
"aria-controls": bodyId,
|
|
1363
1364
|
"aria-expanded": isOpen,
|
|
@@ -1373,20 +1374,20 @@ function RootDropdown(t0) {
|
|
|
1373
1374
|
tabIndex,
|
|
1374
1375
|
type: "text"
|
|
1375
1376
|
});
|
|
1376
|
-
$[
|
|
1377
|
-
$[
|
|
1378
|
-
$[
|
|
1379
|
-
$[
|
|
1380
|
-
$[
|
|
1381
|
-
$[
|
|
1382
|
-
$[
|
|
1383
|
-
$[
|
|
1384
|
-
$[
|
|
1385
|
-
} else t47 = $[
|
|
1377
|
+
$[107] = bodyId;
|
|
1378
|
+
$[108] = disabled;
|
|
1379
|
+
$[109] = isOpen;
|
|
1380
|
+
$[110] = name;
|
|
1381
|
+
$[111] = placeholder;
|
|
1382
|
+
$[112] = popupRole;
|
|
1383
|
+
$[113] = t45;
|
|
1384
|
+
$[114] = tabIndex;
|
|
1385
|
+
$[115] = t47;
|
|
1386
|
+
} else t47 = $[115];
|
|
1386
1387
|
trigger = t47;
|
|
1387
1388
|
} else {
|
|
1388
1389
|
let t45;
|
|
1389
|
-
if ($[
|
|
1390
|
+
if ($[116] !== bodyId || $[117] !== isOpen || $[118] !== popupRole || $[119] !== trigger) {
|
|
1390
1391
|
t45 = /* @__PURE__ */ jsx("button", {
|
|
1391
1392
|
"aria-controls": bodyId,
|
|
1392
1393
|
"aria-expanded": isOpen,
|
|
@@ -1396,12 +1397,12 @@ function RootDropdown(t0) {
|
|
|
1396
1397
|
type: "button",
|
|
1397
1398
|
children: trigger
|
|
1398
1399
|
});
|
|
1399
|
-
$[
|
|
1400
|
-
$[
|
|
1401
|
-
$[
|
|
1402
|
-
$[
|
|
1403
|
-
$[
|
|
1404
|
-
} else t45 = $[
|
|
1400
|
+
$[116] = bodyId;
|
|
1401
|
+
$[117] = isOpen;
|
|
1402
|
+
$[118] = popupRole;
|
|
1403
|
+
$[119] = trigger;
|
|
1404
|
+
$[120] = t45;
|
|
1405
|
+
} else t45 = $[120];
|
|
1405
1406
|
trigger = t45;
|
|
1406
1407
|
}
|
|
1407
1408
|
else {
|
|
@@ -1411,66 +1412,66 @@ function RootDropdown(t0) {
|
|
|
1411
1412
|
const t47 = triggerProps["aria-expanded"] ?? isOpen;
|
|
1412
1413
|
const t48 = triggerProps["aria-haspopup"] ?? popupRole;
|
|
1413
1414
|
let t49;
|
|
1414
|
-
if ($[
|
|
1415
|
+
if ($[121] !== t45 || $[122] !== t46 || $[123] !== t47 || $[124] !== t48) {
|
|
1415
1416
|
t49 = cloneElement(t45, {
|
|
1416
1417
|
"aria-controls": t46,
|
|
1417
1418
|
"aria-expanded": t47,
|
|
1418
1419
|
"aria-haspopup": t48
|
|
1419
1420
|
});
|
|
1420
|
-
$[
|
|
1421
|
-
$[
|
|
1422
|
-
$[
|
|
1423
|
-
$[
|
|
1424
|
-
$[
|
|
1425
|
-
} else t49 = $[
|
|
1421
|
+
$[121] = t45;
|
|
1422
|
+
$[122] = t46;
|
|
1423
|
+
$[123] = t47;
|
|
1424
|
+
$[124] = t48;
|
|
1425
|
+
$[125] = t49;
|
|
1426
|
+
} else t49 = $[125];
|
|
1426
1427
|
trigger = t49;
|
|
1427
1428
|
}
|
|
1428
1429
|
if (label != null) {
|
|
1429
1430
|
let t45;
|
|
1430
|
-
if ($[
|
|
1431
|
+
if ($[126] !== label) {
|
|
1431
1432
|
t45 = /* @__PURE__ */ jsx("div", {
|
|
1432
1433
|
className: "uktdropdown-label-text",
|
|
1433
1434
|
children: label
|
|
1434
1435
|
});
|
|
1435
|
-
$[
|
|
1436
|
-
$[
|
|
1437
|
-
} else t45 = $[
|
|
1436
|
+
$[126] = label;
|
|
1437
|
+
$[127] = t45;
|
|
1438
|
+
} else t45 = $[127];
|
|
1438
1439
|
let t46;
|
|
1439
|
-
if ($[
|
|
1440
|
+
if ($[128] !== t45 || $[129] !== trigger) {
|
|
1440
1441
|
t46 = /* @__PURE__ */ jsxs("label", {
|
|
1441
1442
|
className: "uktdropdown-label",
|
|
1442
1443
|
children: [t45, trigger]
|
|
1443
1444
|
});
|
|
1444
|
-
$[
|
|
1445
|
-
$[
|
|
1446
|
-
$[
|
|
1447
|
-
} else t46 = $[
|
|
1445
|
+
$[128] = t45;
|
|
1446
|
+
$[129] = trigger;
|
|
1447
|
+
$[130] = t46;
|
|
1448
|
+
} else t46 = $[130];
|
|
1448
1449
|
trigger = t46;
|
|
1449
1450
|
}
|
|
1450
1451
|
let t45;
|
|
1451
|
-
if ($[
|
|
1452
|
+
if ($[131] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1452
1453
|
t45 = /* @__PURE__ */ jsx("style", {
|
|
1453
1454
|
href: "@acusti/dropdown/Dropdown",
|
|
1454
1455
|
precedence: "medium",
|
|
1455
1456
|
children: Dropdown_default
|
|
1456
1457
|
});
|
|
1457
|
-
$[
|
|
1458
|
-
} else t45 = $[
|
|
1458
|
+
$[131] = t45;
|
|
1459
|
+
} else t45 = $[131];
|
|
1459
1460
|
let t46;
|
|
1460
|
-
if ($[
|
|
1461
|
+
if ($[132] !== className || $[133] !== disabled || $[134] !== isOpen || $[135] !== isSearchable) {
|
|
1461
1462
|
t46 = clsx("uktdropdown", className, {
|
|
1462
1463
|
disabled,
|
|
1463
1464
|
"is-open": isOpen,
|
|
1464
1465
|
"is-searchable": isSearchable
|
|
1465
1466
|
});
|
|
1466
|
-
$[
|
|
1467
|
-
$[
|
|
1468
|
-
$[
|
|
1469
|
-
$[
|
|
1470
|
-
$[
|
|
1471
|
-
} else t46 = $[
|
|
1467
|
+
$[132] = className;
|
|
1468
|
+
$[133] = disabled;
|
|
1469
|
+
$[134] = isOpen;
|
|
1470
|
+
$[135] = isSearchable;
|
|
1471
|
+
$[136] = t46;
|
|
1472
|
+
} else t46 = $[136];
|
|
1472
1473
|
let t47;
|
|
1473
|
-
if ($[
|
|
1474
|
+
if ($[137] !== body || $[138] !== bodyId || $[139] !== handleBodyRef || $[140] !== hasItems || $[141] !== isOpen || $[142] !== popupRole) {
|
|
1474
1475
|
t47 = isOpen ? /* @__PURE__ */ jsx("div", {
|
|
1475
1476
|
className: clsx("uktdropdown-body", { "has-items": hasItems }),
|
|
1476
1477
|
id: bodyId,
|
|
@@ -1485,16 +1486,16 @@ function RootDropdown(t0) {
|
|
|
1485
1486
|
})
|
|
1486
1487
|
})
|
|
1487
1488
|
}) : null;
|
|
1488
|
-
$[
|
|
1489
|
-
$[
|
|
1490
|
-
$[
|
|
1491
|
-
$[
|
|
1492
|
-
$[
|
|
1493
|
-
$[
|
|
1494
|
-
$[
|
|
1495
|
-
} else t47 = $[
|
|
1489
|
+
$[137] = body;
|
|
1490
|
+
$[138] = bodyId;
|
|
1491
|
+
$[139] = handleBodyRef;
|
|
1492
|
+
$[140] = hasItems;
|
|
1493
|
+
$[141] = isOpen;
|
|
1494
|
+
$[142] = popupRole;
|
|
1495
|
+
$[143] = t47;
|
|
1496
|
+
} else t47 = $[143];
|
|
1496
1497
|
let t48;
|
|
1497
|
-
if ($[
|
|
1498
|
+
if ($[144] !== handleDropdownMouseEnter || $[145] !== handleDropdownMouseLeave || $[146] !== handleMouseDown || $[147] !== handleMouseMove || $[148] !== handleMouseOut || $[149] !== handleMouseOver || $[150] !== handleMouseUp || $[151] !== handleRef || $[152] !== onClick || $[153] !== styleFromProps || $[154] !== t46 || $[155] !== t47 || $[156] !== trigger) {
|
|
1498
1499
|
t48 = /* @__PURE__ */ jsxs(Fragment, { children: [t45, /* @__PURE__ */ jsxs("div", {
|
|
1499
1500
|
className: t46,
|
|
1500
1501
|
onClick,
|
|
@@ -1509,21 +1510,21 @@ function RootDropdown(t0) {
|
|
|
1509
1510
|
style: styleFromProps,
|
|
1510
1511
|
children: [trigger, t47]
|
|
1511
1512
|
})] });
|
|
1512
|
-
$[
|
|
1513
|
-
$[
|
|
1514
|
-
$[
|
|
1515
|
-
$[
|
|
1516
|
-
$[
|
|
1517
|
-
$[
|
|
1518
|
-
$[
|
|
1519
|
-
$[
|
|
1520
|
-
$[
|
|
1521
|
-
$[
|
|
1522
|
-
$[
|
|
1523
|
-
$[
|
|
1524
|
-
$[
|
|
1525
|
-
$[
|
|
1526
|
-
} else t48 = $[
|
|
1513
|
+
$[144] = handleDropdownMouseEnter;
|
|
1514
|
+
$[145] = handleDropdownMouseLeave;
|
|
1515
|
+
$[146] = handleMouseDown;
|
|
1516
|
+
$[147] = handleMouseMove;
|
|
1517
|
+
$[148] = handleMouseOut;
|
|
1518
|
+
$[149] = handleMouseOver;
|
|
1519
|
+
$[150] = handleMouseUp;
|
|
1520
|
+
$[151] = handleRef;
|
|
1521
|
+
$[152] = onClick;
|
|
1522
|
+
$[153] = styleFromProps;
|
|
1523
|
+
$[154] = t46;
|
|
1524
|
+
$[155] = t47;
|
|
1525
|
+
$[156] = trigger;
|
|
1526
|
+
$[157] = t48;
|
|
1527
|
+
} else t48 = $[157];
|
|
1527
1528
|
return t48;
|
|
1528
1529
|
}
|
|
1529
1530
|
var INERT_SUBMENU_PROPS = [
|