@acusti/dropdown 1.0.0-alpha.2 → 1.0.0-alpha.3

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/Dropdown.js CHANGED
@@ -371,6 +371,7 @@ var FOCUSABLE_SELECTOR = "a[href], button, input, select, textarea, [tabindex]";
371
371
  var TEXT_INPUT_SELECTOR = "input:not([type=radio]):not([type=checkbox]):not([type=range]),textarea";
372
372
  var SUBMENU_DISCLOSURE_DELAY = 200;
373
373
  var SAFE_AREA_TIMEOUT = 300;
374
+ var HOVER_CLOSE_DELAY = 150;
374
375
  function Dropdown(props) {
375
376
  const $ = c(5);
376
377
  const parentDropdown = useContext(DropdownContext);
@@ -396,8 +397,8 @@ function Dropdown(props) {
396
397
  return t0;
397
398
  }
398
399
  function RootDropdown(t0) {
399
- const $ = c(137);
400
- const { allowCreate, allowEmpty: t1, children, className, disabled, hasItems: t2, isOpenOnMount, isSearchable, keepOpenOnSubmit: t3, label, name, onActiveItem, onClick, onClose, onMouseDown, onMouseUp, onOpen, onSubmitItem, placeholder, style: styleFromProps, tabIndex, value } = t0;
400
+ const $ = c(147);
401
+ 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;
401
402
  const allowEmpty = t1 === void 0 ? true : t1;
402
403
  const hasItems = t2 === void 0 ? true : t2;
403
404
  const keepOpenOnSubmit = t3 === void 0 ? !hasItems : t3;
@@ -434,6 +435,7 @@ function RootDropdown(t0) {
434
435
  const safeAreaRef = useRef(null);
435
436
  const safeAreaTimerRef = useRef(null);
436
437
  const wasInSafeAreaRef = useRef(false);
438
+ const hoverCloseTimerRef = useRef(null);
437
439
  const allowCreateRef = useRef(allowCreate);
438
440
  const allowEmptyRef = useRef(allowEmpty);
439
441
  const hasItemsRef = useRef(hasItems);
@@ -710,13 +712,37 @@ function RootDropdown(t0) {
710
712
  } else t22 = $[36];
711
713
  const trackSafeArea = t22;
712
714
  let t23;
713
- if ($[37] !== dropdownElement || $[38] !== menubar) {
714
- t23 = (options) => {
715
+ if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
716
+ t23 = () => {
717
+ if (hoverCloseTimerRef.current != null) {
718
+ clearTimeout(hoverCloseTimerRef.current);
719
+ hoverCloseTimerRef.current = null;
720
+ }
721
+ };
722
+ $[37] = t23;
723
+ } else t23 = $[37];
724
+ const clearHoverCloseTimer = t23;
725
+ let t24;
726
+ let t25;
727
+ if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
728
+ t24 = () => clearHoverCloseTimer;
729
+ t25 = [];
730
+ $[38] = t24;
731
+ $[39] = t25;
732
+ } else {
733
+ t24 = $[38];
734
+ t25 = $[39];
735
+ }
736
+ useEffect(t24, t25);
737
+ let t26;
738
+ if ($[40] !== dropdownElement || $[41] !== menubar) {
739
+ t26 = (options) => {
715
740
  setIsOpen(false);
716
741
  setIsOpening(false);
717
742
  mouseDownPositionRef.current = null;
718
743
  clearDisclosureTimer();
719
744
  clearSafeAreaTimer();
745
+ clearHoverCloseTimer();
720
746
  safeAreaRef.current = null;
721
747
  wasInSafeAreaRef.current = false;
722
748
  if (closingTimerRef.current != null) {
@@ -725,25 +751,51 @@ function RootDropdown(t0) {
725
751
  }
726
752
  if (menubar && dropdownElement && !options?.keepMenubarEngaged) menubar.notifyClosed(dropdownElement);
727
753
  };
728
- $[37] = dropdownElement;
729
- $[38] = menubar;
730
- $[39] = t23;
731
- } else t23 = $[39];
732
- const closeDropdown = t23;
733
- let t24;
734
- if ($[40] !== dropdownElement?.firstElementChild) {
735
- t24 = () => {
754
+ $[40] = dropdownElement;
755
+ $[41] = menubar;
756
+ $[42] = t26;
757
+ } else t26 = $[42];
758
+ const closeDropdown = t26;
759
+ let t27;
760
+ if ($[43] !== openOnHover) {
761
+ t27 = () => {
762
+ clearHoverCloseTimer();
763
+ if (!openOnHover || isOpenRef.current) return;
764
+ setIsOpen(true);
765
+ setIsOpening(false);
766
+ };
767
+ $[43] = openOnHover;
768
+ $[44] = t27;
769
+ } else t27 = $[44];
770
+ const handleDropdownMouseEnter = t27;
771
+ let t28;
772
+ if ($[45] !== closeDropdown || $[46] !== openOnHover) {
773
+ t28 = () => {
774
+ if (!openOnHover || !isOpenRef.current || hoverCloseTimerRef.current != null) return;
775
+ hoverCloseTimerRef.current = setTimeout(() => {
776
+ hoverCloseTimerRef.current = null;
777
+ closeDropdown();
778
+ }, HOVER_CLOSE_DELAY);
779
+ };
780
+ $[45] = closeDropdown;
781
+ $[46] = openOnHover;
782
+ $[47] = t28;
783
+ } else t28 = $[47];
784
+ const handleDropdownMouseLeave = t28;
785
+ let t29;
786
+ if ($[48] !== dropdownElement?.firstElementChild) {
787
+ t29 = () => {
736
788
  const firstChild = dropdownElement?.firstElementChild;
737
789
  if (!firstChild) return;
738
790
  (firstChild.matches(FOCUSABLE_SELECTOR) ? firstChild : firstChild.querySelector(FOCUSABLE_SELECTOR))?.focus();
739
791
  };
740
- $[40] = dropdownElement?.firstElementChild;
741
- $[41] = t24;
742
- } else t24 = $[41];
743
- const focusTrigger = t24;
744
- let t25;
745
- if ($[42] !== closeDropdown || $[43] !== dropdownElement || $[44] !== focusTrigger || $[45] !== menubar) {
746
- t25 = () => {
792
+ $[48] = dropdownElement?.firstElementChild;
793
+ $[49] = t29;
794
+ } else t29 = $[49];
795
+ const focusTrigger = t29;
796
+ let t30;
797
+ if ($[50] !== closeDropdown || $[51] !== dropdownElement || $[52] !== focusTrigger || $[53] !== menubar) {
798
+ t30 = () => {
747
799
  if (!menubar || !dropdownElement) return;
748
800
  return menubar.registerMember({
749
801
  close: () => closeDropdown({ keepMenubarEngaged: true }),
@@ -753,37 +805,37 @@ function RootDropdown(t0) {
753
805
  open: () => setIsOpen(true)
754
806
  });
755
807
  };
756
- $[42] = closeDropdown;
757
- $[43] = dropdownElement;
758
- $[44] = focusTrigger;
759
- $[45] = menubar;
760
- $[46] = t25;
761
- } else t25 = $[46];
762
- useEffect(t25);
763
- let t26;
764
- let t27;
765
- if ($[47] !== dropdownElement || $[48] !== isOpen || $[49] !== menubar) {
766
- t26 = () => {
808
+ $[50] = closeDropdown;
809
+ $[51] = dropdownElement;
810
+ $[52] = focusTrigger;
811
+ $[53] = menubar;
812
+ $[54] = t30;
813
+ } else t30 = $[54];
814
+ useEffect(t30);
815
+ let t31;
816
+ let t32;
817
+ if ($[55] !== dropdownElement || $[56] !== isOpen || $[57] !== menubar) {
818
+ t31 = () => {
767
819
  if (isOpen && menubar && dropdownElement) menubar.notifyOpened(dropdownElement);
768
820
  };
769
- t27 = [
821
+ t32 = [
770
822
  dropdownElement,
771
823
  isOpen,
772
824
  menubar
773
825
  ];
774
- $[47] = dropdownElement;
775
- $[48] = isOpen;
776
- $[49] = menubar;
777
- $[50] = t26;
778
- $[51] = t27;
826
+ $[55] = dropdownElement;
827
+ $[56] = isOpen;
828
+ $[57] = menubar;
829
+ $[58] = t31;
830
+ $[59] = t32;
779
831
  } else {
780
- t26 = $[50];
781
- t27 = $[51];
832
+ t31 = $[58];
833
+ t32 = $[59];
782
834
  }
783
- useEffect(t26, t27);
784
- let t28;
785
- if ($[52] !== closeDropdown || $[53] !== dropdownElement || $[54] !== handleActiveItem) {
786
- t28 = (event_1) => {
835
+ useEffect(t31, t32);
836
+ let t33;
837
+ if ($[60] !== closeDropdown || $[61] !== dropdownElement || $[62] !== handleActiveItem) {
838
+ t33 = (event_1) => {
787
839
  const element = hasItemsRef.current ? getActiveItemElement(dropdownElement) : null;
788
840
  const submenuOfActive = element ? getSubmenuOfItem(element) : null;
789
841
  if (element && submenuOfActive) {
@@ -838,15 +890,15 @@ function RootDropdown(t0) {
838
890
  onSubmitItemRef.current?.(payload_1);
839
891
  dispatchToSubmenus("onSubmitItem", payload_1);
840
892
  };
841
- $[52] = closeDropdown;
842
- $[53] = dropdownElement;
843
- $[54] = handleActiveItem;
844
- $[55] = t28;
845
- } else t28 = $[55];
846
- const handleSubmitItem = t28;
847
- let t29;
848
- if ($[56] !== trackSafeArea) {
849
- t29 = (event_2) => {
893
+ $[60] = closeDropdown;
894
+ $[61] = dropdownElement;
895
+ $[62] = handleActiveItem;
896
+ $[63] = t33;
897
+ } else t33 = $[63];
898
+ const handleSubmitItem = t33;
899
+ let t34;
900
+ if ($[64] !== trackSafeArea) {
901
+ t34 = (event_2) => {
850
902
  const { clientX, clientY } = event_2;
851
903
  currentInputMethodRef.current = "mouse";
852
904
  trackSafeArea(event_2);
@@ -855,13 +907,13 @@ function RootDropdown(t0) {
855
907
  if (Math.abs(initialPosition.clientX - clientX) < 12 && Math.abs(initialPosition.clientY - clientY) < 12) return;
856
908
  setIsOpening(false);
857
909
  };
858
- $[56] = trackSafeArea;
859
- $[57] = t29;
860
- } else t29 = $[57];
861
- const handleMouseMove = t29;
862
- let t30;
863
- if ($[58] !== dropdownElement || $[59] !== handleActiveItem || $[60] !== syncSubmenuDisclosure) {
864
- t30 = (event_3) => {
910
+ $[64] = trackSafeArea;
911
+ $[65] = t34;
912
+ } else t34 = $[65];
913
+ const handleMouseMove = t34;
914
+ let t35;
915
+ if ($[66] !== dropdownElement || $[67] !== handleActiveItem || $[68] !== syncSubmenuDisclosure) {
916
+ t35 = (event_3) => {
865
917
  if (!hasItemsRef.current) return;
866
918
  if (currentInputMethodRef.current !== "mouse") return;
867
919
  if (!dropdownElement) return;
@@ -880,15 +932,15 @@ function RootDropdown(t0) {
880
932
  });
881
933
  syncSubmenuDisclosure();
882
934
  };
883
- $[58] = dropdownElement;
884
- $[59] = handleActiveItem;
885
- $[60] = syncSubmenuDisclosure;
886
- $[61] = t30;
887
- } else t30 = $[61];
888
- const handleMouseOver = t30;
889
- let t31;
890
- if ($[62] !== dropdownElement || $[63] !== syncSubmenuDisclosure) {
891
- t31 = (event_4) => {
935
+ $[66] = dropdownElement;
936
+ $[67] = handleActiveItem;
937
+ $[68] = syncSubmenuDisclosure;
938
+ $[69] = t35;
939
+ } else t35 = $[69];
940
+ const handleMouseOver = t35;
941
+ let t36;
942
+ if ($[70] !== dropdownElement || $[71] !== syncSubmenuDisclosure) {
943
+ t36 = (event_4) => {
892
944
  if (!hasItemsRef.current) return;
893
945
  const relatedTarget = event_4.relatedTarget;
894
946
  if (!dropdownElement?.contains(relatedTarget)) {
@@ -904,14 +956,14 @@ function RootDropdown(t0) {
904
956
  delete activeItem.dataset.uktActive;
905
957
  syncSubmenuDisclosure();
906
958
  };
907
- $[62] = dropdownElement;
908
- $[63] = syncSubmenuDisclosure;
909
- $[64] = t31;
910
- } else t31 = $[64];
911
- const handleMouseOut = t31;
912
- let t32;
913
- if ($[65] !== onMouseDown) {
914
- t32 = (event_5) => {
959
+ $[70] = dropdownElement;
960
+ $[71] = syncSubmenuDisclosure;
961
+ $[72] = t36;
962
+ } else t36 = $[72];
963
+ const handleMouseOut = t36;
964
+ let t37;
965
+ if ($[73] !== onMouseDown) {
966
+ t37 = (event_5) => {
915
967
  if (onMouseDown) onMouseDown(event_5);
916
968
  if (isOpenRef.current) return;
917
969
  setIsOpen(true);
@@ -925,13 +977,13 @@ function RootDropdown(t0) {
925
977
  isOpeningTimerRef.current = null;
926
978
  }, 1e3);
927
979
  };
928
- $[65] = onMouseDown;
929
- $[66] = t32;
930
- } else t32 = $[66];
931
- const handleMouseDown = t32;
932
- let t33;
933
- if ($[67] !== closeDropdown || $[68] !== dropdownElement || $[69] !== handleActiveItem || $[70] !== handleSubmitItem || $[71] !== onMouseUp) {
934
- t33 = (event_6) => {
980
+ $[73] = onMouseDown;
981
+ $[74] = t37;
982
+ } else t37 = $[74];
983
+ const handleMouseDown = t37;
984
+ let t38;
985
+ if ($[75] !== closeDropdown || $[76] !== dropdownElement || $[77] !== handleActiveItem || $[78] !== handleSubmitItem || $[79] !== onMouseUp) {
986
+ t38 = (event_6) => {
935
987
  if (onMouseUp) onMouseUp(event_6);
936
988
  if (isOpeningRef.current || !isOpenRef.current || closingTimerRef.current != null) return;
937
989
  const eventTarget_1 = event_6.target;
@@ -955,17 +1007,17 @@ function RootDropdown(t0) {
955
1007
  }
956
1008
  handleSubmitItem(event_6);
957
1009
  };
958
- $[67] = closeDropdown;
959
- $[68] = dropdownElement;
960
- $[69] = handleActiveItem;
961
- $[70] = handleSubmitItem;
962
- $[71] = onMouseUp;
963
- $[72] = t33;
964
- } else t33 = $[72];
965
- const handleMouseUp = t33;
966
- let t34;
967
- if ($[73] !== closeDropdown || $[74] !== dropdownElement || $[75] !== focusTrigger || $[76] !== handleActiveItem || $[77] !== handleSubmitItem || $[78] !== menubar || $[79] !== syncSubmenuDisclosure) {
968
- t34 = (event_7) => {
1010
+ $[75] = closeDropdown;
1011
+ $[76] = dropdownElement;
1012
+ $[77] = handleActiveItem;
1013
+ $[78] = handleSubmitItem;
1014
+ $[79] = onMouseUp;
1015
+ $[80] = t38;
1016
+ } else t38 = $[80];
1017
+ const handleMouseUp = t38;
1018
+ let t39;
1019
+ if ($[81] !== closeDropdown || $[82] !== dropdownElement || $[83] !== focusTrigger || $[84] !== handleActiveItem || $[85] !== handleSubmitItem || $[86] !== menubar || $[87] !== syncSubmenuDisclosure) {
1020
+ t39 = (event_7) => {
969
1021
  const { altKey, ctrlKey, key: key_0, metaKey } = event_7;
970
1022
  const eventTarget_2 = event_7.target;
971
1023
  if (!dropdownElement) return;
@@ -1098,29 +1150,29 @@ function RootDropdown(t0) {
1098
1150
  }
1099
1151
  }
1100
1152
  };
1101
- $[73] = closeDropdown;
1102
- $[74] = dropdownElement;
1103
- $[75] = focusTrigger;
1104
- $[76] = handleActiveItem;
1105
- $[77] = handleSubmitItem;
1106
- $[78] = menubar;
1107
- $[79] = syncSubmenuDisclosure;
1108
- $[80] = t34;
1109
- } else t34 = $[80];
1110
- const handleKeyDown = t34;
1111
- let t35;
1112
- if ($[81] !== handleKeyDown) {
1113
- t35 = {
1153
+ $[81] = closeDropdown;
1154
+ $[82] = dropdownElement;
1155
+ $[83] = focusTrigger;
1156
+ $[84] = handleActiveItem;
1157
+ $[85] = handleSubmitItem;
1158
+ $[86] = menubar;
1159
+ $[87] = syncSubmenuDisclosure;
1160
+ $[88] = t39;
1161
+ } else t39 = $[88];
1162
+ const handleKeyDown = t39;
1163
+ let t40;
1164
+ if ($[89] !== handleKeyDown) {
1165
+ t40 = {
1114
1166
  ignoreUsedKeyboardEvents: false,
1115
1167
  onKeyDown: handleKeyDown
1116
1168
  };
1117
- $[81] = handleKeyDown;
1118
- $[82] = t35;
1119
- } else t35 = $[82];
1120
- useKeyboardEvents(t35);
1121
- let t36;
1122
- if ($[83] !== closeDropdown || $[84] !== handleActiveItem || $[85] !== isOpenOnMount) {
1123
- t36 = (ref) => {
1169
+ $[89] = handleKeyDown;
1170
+ $[90] = t40;
1171
+ } else t40 = $[90];
1172
+ useKeyboardEvents(t40);
1173
+ let t41;
1174
+ if ($[91] !== closeDropdown || $[92] !== handleActiveItem || $[93] !== isOpenOnMount) {
1175
+ t41 = (ref) => {
1124
1176
  setDropdownElement(ref);
1125
1177
  if (!ref) return;
1126
1178
  const { ownerDocument } = ref;
@@ -1130,13 +1182,13 @@ function RootDropdown(t0) {
1130
1182
  else inputElement = ref.firstElementChild.querySelector(TEXT_INPUT_SELECTOR);
1131
1183
  inputElementRef.current = inputElement;
1132
1184
  }
1133
- const handleGlobalMouseDown = (t37) => {
1134
- const { target: target_1 } = t37;
1185
+ const handleGlobalMouseDown = (t42) => {
1186
+ const { target: target_1 } = t42;
1135
1187
  const eventTarget_3 = target_1;
1136
1188
  if (!ref.contains(eventTarget_3)) closeDropdown();
1137
1189
  };
1138
- const handleGlobalMouseUp = (t38) => {
1139
- const { target: target_2 } = t38;
1190
+ const handleGlobalMouseUp = (t43) => {
1191
+ const { target: target_2 } = t43;
1140
1192
  if (!isOpenRef.current || closingTimerRef.current != null) return;
1141
1193
  if (isOpeningRef.current) {
1142
1194
  setIsOpening(false);
@@ -1149,8 +1201,8 @@ function RootDropdown(t0) {
1149
1201
  const eventTarget_4 = target_2;
1150
1202
  if (!ref.contains(eventTarget_4)) closeDropdown();
1151
1203
  };
1152
- const handleGlobalFocusIn = (t39) => {
1153
- const { target: target_3 } = t39;
1204
+ const handleGlobalFocusIn = (t44) => {
1205
+ const { target: target_3 } = t44;
1154
1206
  if (!isOpenRef.current) return;
1155
1207
  const eventTarget_5 = target_3;
1156
1208
  if (ref.contains(eventTarget_5) || eventTarget_5.contains(ref)) return;
@@ -1192,52 +1244,52 @@ function RootDropdown(t0) {
1192
1244
  if (inputElement) inputElement.removeEventListener("input", handleInput);
1193
1245
  };
1194
1246
  };
1195
- $[83] = closeDropdown;
1196
- $[84] = handleActiveItem;
1197
- $[85] = isOpenOnMount;
1198
- $[86] = t36;
1199
- } else t36 = $[86];
1200
- const handleRef = t36;
1247
+ $[91] = closeDropdown;
1248
+ $[92] = handleActiveItem;
1249
+ $[93] = isOpenOnMount;
1250
+ $[94] = t41;
1251
+ } else t41 = $[94];
1252
+ const handleRef = t41;
1201
1253
  const handleBodyRef = _temp;
1202
1254
  if (!isValidElement(trigger)) if (isSearchable) {
1203
- const t37 = value ?? "";
1204
- let t38;
1205
- if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
1206
- t38 = () => setIsOpen(true);
1207
- $[87] = t38;
1208
- } else t38 = $[87];
1209
- let t39;
1210
- if ($[88] !== bodyId || $[89] !== disabled || $[90] !== isOpen || $[91] !== name || $[92] !== placeholder || $[93] !== popupRole || $[94] !== t37 || $[95] !== tabIndex) {
1211
- t39 = /* @__PURE__ */ jsx("input", {
1255
+ const t42 = value ?? "";
1256
+ let t43;
1257
+ if ($[95] === Symbol.for("react.memo_cache_sentinel")) {
1258
+ t43 = () => setIsOpen(true);
1259
+ $[95] = t43;
1260
+ } else t43 = $[95];
1261
+ let t44;
1262
+ if ($[96] !== bodyId || $[97] !== disabled || $[98] !== isOpen || $[99] !== name || $[100] !== placeholder || $[101] !== popupRole || $[102] !== t42 || $[103] !== tabIndex) {
1263
+ t44 = /* @__PURE__ */ jsx("input", {
1212
1264
  "aria-controls": bodyId,
1213
1265
  "aria-expanded": isOpen,
1214
1266
  "aria-haspopup": popupRole,
1215
1267
  autoComplete: "off",
1216
1268
  className: "uktdropdown-trigger",
1217
- defaultValue: t37,
1269
+ defaultValue: t42,
1218
1270
  disabled,
1219
1271
  name,
1220
- onFocus: t38,
1272
+ onFocus: t43,
1221
1273
  placeholder,
1222
1274
  ref: inputElementRef,
1223
1275
  tabIndex,
1224
1276
  type: "text"
1225
1277
  });
1226
- $[88] = bodyId;
1227
- $[89] = disabled;
1228
- $[90] = isOpen;
1229
- $[91] = name;
1230
- $[92] = placeholder;
1231
- $[93] = popupRole;
1232
- $[94] = t37;
1233
- $[95] = tabIndex;
1234
- $[96] = t39;
1235
- } else t39 = $[96];
1236
- trigger = t39;
1278
+ $[96] = bodyId;
1279
+ $[97] = disabled;
1280
+ $[98] = isOpen;
1281
+ $[99] = name;
1282
+ $[100] = placeholder;
1283
+ $[101] = popupRole;
1284
+ $[102] = t42;
1285
+ $[103] = tabIndex;
1286
+ $[104] = t44;
1287
+ } else t44 = $[104];
1288
+ trigger = t44;
1237
1289
  } else {
1238
- let t37;
1239
- if ($[97] !== bodyId || $[98] !== isOpen || $[99] !== popupRole || $[100] !== trigger) {
1240
- t37 = /* @__PURE__ */ jsx("button", {
1290
+ let t42;
1291
+ if ($[105] !== bodyId || $[106] !== isOpen || $[107] !== popupRole || $[108] !== trigger) {
1292
+ t42 = /* @__PURE__ */ jsx("button", {
1241
1293
  "aria-controls": bodyId,
1242
1294
  "aria-expanded": isOpen,
1243
1295
  "aria-haspopup": popupRole,
@@ -1246,82 +1298,82 @@ function RootDropdown(t0) {
1246
1298
  type: "button",
1247
1299
  children: trigger
1248
1300
  });
1249
- $[97] = bodyId;
1250
- $[98] = isOpen;
1251
- $[99] = popupRole;
1252
- $[100] = trigger;
1253
- $[101] = t37;
1254
- } else t37 = $[101];
1255
- trigger = t37;
1301
+ $[105] = bodyId;
1302
+ $[106] = isOpen;
1303
+ $[107] = popupRole;
1304
+ $[108] = trigger;
1305
+ $[109] = t42;
1306
+ } else t42 = $[109];
1307
+ trigger = t42;
1256
1308
  }
1257
1309
  else {
1258
1310
  const triggerProps = trigger.props;
1259
- const t37 = trigger;
1260
- const t38 = triggerProps["aria-controls"] ?? bodyId;
1261
- const t39 = triggerProps["aria-expanded"] ?? isOpen;
1262
- const t40 = triggerProps["aria-haspopup"] ?? popupRole;
1263
- let t41;
1264
- if ($[102] !== t37 || $[103] !== t38 || $[104] !== t39 || $[105] !== t40) {
1265
- t41 = cloneElement(t37, {
1266
- "aria-controls": t38,
1267
- "aria-expanded": t39,
1268
- "aria-haspopup": t40
1311
+ const t42 = trigger;
1312
+ const t43 = triggerProps["aria-controls"] ?? bodyId;
1313
+ const t44 = triggerProps["aria-expanded"] ?? isOpen;
1314
+ const t45 = triggerProps["aria-haspopup"] ?? popupRole;
1315
+ let t46;
1316
+ if ($[110] !== t42 || $[111] !== t43 || $[112] !== t44 || $[113] !== t45) {
1317
+ t46 = cloneElement(t42, {
1318
+ "aria-controls": t43,
1319
+ "aria-expanded": t44,
1320
+ "aria-haspopup": t45
1269
1321
  });
1270
- $[102] = t37;
1271
- $[103] = t38;
1272
- $[104] = t39;
1273
- $[105] = t40;
1274
- $[106] = t41;
1275
- } else t41 = $[106];
1276
- trigger = t41;
1322
+ $[110] = t42;
1323
+ $[111] = t43;
1324
+ $[112] = t44;
1325
+ $[113] = t45;
1326
+ $[114] = t46;
1327
+ } else t46 = $[114];
1328
+ trigger = t46;
1277
1329
  }
1278
1330
  if (label != null) {
1279
- let t37;
1280
- if ($[107] !== label) {
1281
- t37 = /* @__PURE__ */ jsx("div", {
1331
+ let t42;
1332
+ if ($[115] !== label) {
1333
+ t42 = /* @__PURE__ */ jsx("div", {
1282
1334
  className: "uktdropdown-label-text",
1283
1335
  children: label
1284
1336
  });
1285
- $[107] = label;
1286
- $[108] = t37;
1287
- } else t37 = $[108];
1288
- let t38;
1289
- if ($[109] !== t37 || $[110] !== trigger) {
1290
- t38 = /* @__PURE__ */ jsxs("label", {
1337
+ $[115] = label;
1338
+ $[116] = t42;
1339
+ } else t42 = $[116];
1340
+ let t43;
1341
+ if ($[117] !== t42 || $[118] !== trigger) {
1342
+ t43 = /* @__PURE__ */ jsxs("label", {
1291
1343
  className: "uktdropdown-label",
1292
- children: [t37, trigger]
1344
+ children: [t42, trigger]
1293
1345
  });
1294
- $[109] = t37;
1295
- $[110] = trigger;
1296
- $[111] = t38;
1297
- } else t38 = $[111];
1298
- trigger = t38;
1346
+ $[117] = t42;
1347
+ $[118] = trigger;
1348
+ $[119] = t43;
1349
+ } else t43 = $[119];
1350
+ trigger = t43;
1299
1351
  }
1300
- let t37;
1301
- if ($[112] === Symbol.for("react.memo_cache_sentinel")) {
1302
- t37 = /* @__PURE__ */ jsx("style", {
1352
+ let t42;
1353
+ if ($[120] === Symbol.for("react.memo_cache_sentinel")) {
1354
+ t42 = /* @__PURE__ */ jsx("style", {
1303
1355
  href: "@acusti/dropdown/Dropdown",
1304
1356
  precedence: "medium",
1305
1357
  children: Dropdown_default
1306
1358
  });
1307
- $[112] = t37;
1308
- } else t37 = $[112];
1309
- let t38;
1310
- if ($[113] !== className || $[114] !== disabled || $[115] !== isOpen || $[116] !== isSearchable) {
1311
- t38 = clsx("uktdropdown", className, {
1359
+ $[120] = t42;
1360
+ } else t42 = $[120];
1361
+ let t43;
1362
+ if ($[121] !== className || $[122] !== disabled || $[123] !== isOpen || $[124] !== isSearchable) {
1363
+ t43 = clsx("uktdropdown", className, {
1312
1364
  disabled,
1313
1365
  "is-open": isOpen,
1314
1366
  "is-searchable": isSearchable
1315
1367
  });
1316
- $[113] = className;
1317
- $[114] = disabled;
1318
- $[115] = isOpen;
1319
- $[116] = isSearchable;
1320
- $[117] = t38;
1321
- } else t38 = $[117];
1322
- let t39;
1323
- if ($[118] !== bodyId || $[119] !== children || $[120] !== childrenCount || $[121] !== hasItems || $[122] !== isOpen || $[123] !== popupRole) {
1324
- t39 = isOpen ? /* @__PURE__ */ jsx("div", {
1368
+ $[121] = className;
1369
+ $[122] = disabled;
1370
+ $[123] = isOpen;
1371
+ $[124] = isSearchable;
1372
+ $[125] = t43;
1373
+ } else t43 = $[125];
1374
+ let t44;
1375
+ if ($[126] !== bodyId || $[127] !== children || $[128] !== childrenCount || $[129] !== hasItems || $[130] !== isOpen || $[131] !== popupRole) {
1376
+ t44 = isOpen ? /* @__PURE__ */ jsx("div", {
1325
1377
  className: clsx("uktdropdown-body", { "has-items": hasItems }),
1326
1378
  id: bodyId,
1327
1379
  popover: "manual",
@@ -1335,42 +1387,46 @@ function RootDropdown(t0) {
1335
1387
  })
1336
1388
  })
1337
1389
  }) : null;
1338
- $[118] = bodyId;
1339
- $[119] = children;
1340
- $[120] = childrenCount;
1341
- $[121] = hasItems;
1342
- $[122] = isOpen;
1343
- $[123] = popupRole;
1344
- $[124] = t39;
1345
- } else t39 = $[124];
1346
- let t40;
1347
- if ($[125] !== handleMouseDown || $[126] !== handleMouseMove || $[127] !== handleMouseOut || $[128] !== handleMouseOver || $[129] !== handleMouseUp || $[130] !== handleRef || $[131] !== onClick || $[132] !== styleFromProps || $[133] !== t38 || $[134] !== t39 || $[135] !== trigger) {
1348
- t40 = /* @__PURE__ */ jsxs(Fragment, { children: [t37, /* @__PURE__ */ jsxs("div", {
1349
- className: t38,
1390
+ $[126] = bodyId;
1391
+ $[127] = children;
1392
+ $[128] = childrenCount;
1393
+ $[129] = hasItems;
1394
+ $[130] = isOpen;
1395
+ $[131] = popupRole;
1396
+ $[132] = t44;
1397
+ } else t44 = $[132];
1398
+ let t45;
1399
+ if ($[133] !== handleDropdownMouseEnter || $[134] !== handleDropdownMouseLeave || $[135] !== handleMouseDown || $[136] !== handleMouseMove || $[137] !== handleMouseOut || $[138] !== handleMouseOver || $[139] !== handleMouseUp || $[140] !== handleRef || $[141] !== onClick || $[142] !== styleFromProps || $[143] !== t43 || $[144] !== t44 || $[145] !== trigger) {
1400
+ t45 = /* @__PURE__ */ jsxs(Fragment, { children: [t42, /* @__PURE__ */ jsxs("div", {
1401
+ className: t43,
1350
1402
  onClick,
1351
1403
  onMouseDown: handleMouseDown,
1404
+ onMouseEnter: handleDropdownMouseEnter,
1405
+ onMouseLeave: handleDropdownMouseLeave,
1352
1406
  onMouseMove: handleMouseMove,
1353
1407
  onMouseOut: handleMouseOut,
1354
1408
  onMouseOver: handleMouseOver,
1355
1409
  onMouseUp: handleMouseUp,
1356
1410
  ref: handleRef,
1357
1411
  style: styleFromProps,
1358
- children: [trigger, t39]
1412
+ children: [trigger, t44]
1359
1413
  })] });
1360
- $[125] = handleMouseDown;
1361
- $[126] = handleMouseMove;
1362
- $[127] = handleMouseOut;
1363
- $[128] = handleMouseOver;
1364
- $[129] = handleMouseUp;
1365
- $[130] = handleRef;
1366
- $[131] = onClick;
1367
- $[132] = styleFromProps;
1368
- $[133] = t38;
1369
- $[134] = t39;
1370
- $[135] = trigger;
1371
- $[136] = t40;
1372
- } else t40 = $[136];
1373
- return t40;
1414
+ $[133] = handleDropdownMouseEnter;
1415
+ $[134] = handleDropdownMouseLeave;
1416
+ $[135] = handleMouseDown;
1417
+ $[136] = handleMouseMove;
1418
+ $[137] = handleMouseOut;
1419
+ $[138] = handleMouseOver;
1420
+ $[139] = handleMouseUp;
1421
+ $[140] = handleRef;
1422
+ $[141] = onClick;
1423
+ $[142] = styleFromProps;
1424
+ $[143] = t43;
1425
+ $[144] = t44;
1426
+ $[145] = trigger;
1427
+ $[146] = t45;
1428
+ } else t45 = $[146];
1429
+ return t45;
1374
1430
  }
1375
1431
  function _temp(ref_0) {
1376
1432
  if (!ref_0) return;
@@ -1384,6 +1440,7 @@ var INERT_SUBMENU_PROPS = [
1384
1440
  "isSearchable",
1385
1441
  "keepOpenOnSubmit",
1386
1442
  "name",
1443
+ "openOnHover",
1387
1444
  "placeholder",
1388
1445
  "tabIndex",
1389
1446
  "value"