@ariakit/core 0.3.4 → 0.3.6

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/cjs/__chunks/{LMT335NJ.cjs → 3UT5FE6K.cjs} +2 -2
  3. package/cjs/__chunks/{OASSVCYR.cjs → 46BH65MC.cjs} +20 -22
  4. package/cjs/__chunks/{FTB5CXVB.cjs → 5F4DVUNS.cjs} +7 -1
  5. package/cjs/__chunks/{M44E4T5A.cjs → 6WBY3ZZM.cjs} +21 -21
  6. package/cjs/__chunks/{ROX3MRGO.cjs → 7ZUFMSXJ.cjs} +16 -16
  7. package/cjs/__chunks/GXIZMD53.cjs +35 -0
  8. package/cjs/__chunks/{MLPOXRDT.cjs → GZDVJEID.cjs} +2 -2
  9. package/cjs/__chunks/{25WWT2VO.cjs → JLC5A6WF.cjs} +15 -15
  10. package/cjs/__chunks/{YXSGST3H.cjs → MEHGRTJ3.cjs} +18 -18
  11. package/cjs/__chunks/PD7XZBXC.cjs +42 -0
  12. package/cjs/__chunks/{G5EW4WED.cjs → YIUPKKEK.cjs} +6 -6
  13. package/cjs/checkbox/checkbox-store.cjs +7 -7
  14. package/cjs/collection/collection-store.cjs +6 -6
  15. package/cjs/combobox/combobox-store.cjs +34 -34
  16. package/cjs/combobox/combobox-store.d.cts +4 -1
  17. package/cjs/combobox/combobox-store.d.ts +4 -1
  18. package/cjs/composite/composite-overflow-store.cjs +7 -7
  19. package/cjs/composite/composite-store.cjs +7 -7
  20. package/cjs/dialog/dialog-store.cjs +6 -6
  21. package/cjs/disclosure/disclosure-store.cjs +5 -5
  22. package/cjs/form/form-store.cjs +28 -28
  23. package/cjs/hovercard/hovercard-store.cjs +8 -8
  24. package/cjs/index.cjs +1 -1
  25. package/cjs/menu/menu-bar-store.cjs +8 -21
  26. package/cjs/menu/menu-bar-store.d.cts +6 -6
  27. package/cjs/menu/menu-bar-store.d.ts +6 -6
  28. package/cjs/menu/menu-store.cjs +32 -32
  29. package/cjs/menubar/menubar-store.cjs +14 -0
  30. package/cjs/menubar/menubar-store.d.cts +16 -0
  31. package/cjs/menubar/menubar-store.d.ts +16 -0
  32. package/cjs/popover/popover-store.cjs +7 -7
  33. package/cjs/radio/radio-store.cjs +13 -13
  34. package/cjs/select/select-store.cjs +33 -33
  35. package/cjs/tab/tab-store.cjs +25 -25
  36. package/cjs/toolbar/toolbar-store.cjs +9 -9
  37. package/cjs/tooltip/tooltip-store.cjs +15 -15
  38. package/cjs/utils/array.cjs +1 -1
  39. package/cjs/utils/dom.cjs +5 -3
  40. package/cjs/utils/dom.d.cts +9 -0
  41. package/cjs/utils/dom.d.ts +9 -0
  42. package/cjs/utils/events.cjs +8 -8
  43. package/cjs/utils/focus.cjs +15 -15
  44. package/cjs/utils/misc.cjs +3 -3
  45. package/cjs/utils/platform.cjs +4 -4
  46. package/cjs/utils/store.cjs +4 -4
  47. package/esm/__chunks/ANO6WJO4.js +35 -0
  48. package/esm/__chunks/{LWQU4J4N.js → BXH3I7ML.js} +4 -4
  49. package/esm/__chunks/{Q332EHXG.js → CCU5UHQ2.js} +4 -4
  50. package/esm/__chunks/{I7YGHQ4Z.js → CL47ZAPY.js} +1 -1
  51. package/esm/__chunks/{NIF7E7VE.js → DLOEKDPY.js} +7 -1
  52. package/esm/__chunks/{TEJLMP2M.js → DYD4YNLE.js} +3 -3
  53. package/esm/__chunks/{GME4NYXR.js → E7OQVGGY.js} +6 -8
  54. package/esm/__chunks/{D23ES3Z4.js → I2VQ3XGR.js} +1 -1
  55. package/esm/__chunks/{5UJPJ37G.js → MHPO2BXA.js} +1 -1
  56. package/esm/__chunks/{FGW7QUD2.js → OGMLJYDV.js} +4 -4
  57. package/esm/__chunks/{VEWADM34.js → WY3EMTH6.js} +4 -4
  58. package/esm/checkbox/checkbox-store.js +3 -3
  59. package/esm/collection/collection-store.js +5 -5
  60. package/esm/combobox/combobox-store.d.ts +4 -1
  61. package/esm/combobox/combobox-store.js +10 -10
  62. package/esm/composite/composite-overflow-store.js +6 -6
  63. package/esm/composite/composite-store.js +6 -6
  64. package/esm/dialog/dialog-store.js +5 -5
  65. package/esm/disclosure/disclosure-store.js +4 -4
  66. package/esm/form/form-store.js +5 -5
  67. package/esm/hovercard/hovercard-store.js +7 -7
  68. package/esm/index.js +1 -1
  69. package/esm/menu/menu-bar-store.d.ts +6 -6
  70. package/esm/menu/menu-bar-store.js +9 -22
  71. package/esm/menu/menu-store.js +10 -10
  72. package/esm/menubar/menubar-store.d.ts +16 -0
  73. package/esm/menubar/menubar-store.js +14 -0
  74. package/esm/popover/popover-store.js +6 -6
  75. package/esm/radio/radio-store.js +6 -6
  76. package/esm/select/select-store.js +9 -9
  77. package/esm/tab/tab-store.js +6 -6
  78. package/esm/toolbar/toolbar-store.js +6 -6
  79. package/esm/tooltip/tooltip-store.js +7 -7
  80. package/esm/utils/array.js +1 -1
  81. package/esm/utils/dom.d.ts +9 -0
  82. package/esm/utils/dom.js +6 -4
  83. package/esm/utils/events.js +3 -3
  84. package/esm/utils/focus.js +2 -2
  85. package/esm/utils/misc.js +2 -2
  86. package/esm/utils/platform.js +3 -3
  87. package/esm/utils/store.js +3 -3
  88. package/menubar/menubar-store/package.json +8 -0
  89. package/package.json +8 -1
  90. package/cjs/__chunks/LUOEAZGU.cjs +0 -42
  91. /package/cjs/__chunks/{WYXAWBLE.cjs → AV6KTKLE.cjs} +0 -0
  92. /package/esm/__chunks/{2SMRF6AD.js → 4R3V3JGP.js} +0 -0
@@ -1,39 +1,39 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _LUOEAZGUcjs = require('../__chunks/LUOEAZGU.cjs');
5
- require('../__chunks/ROX3MRGO.cjs');
6
- require('../__chunks/MLPOXRDT.cjs');
7
- require('../__chunks/YXSGST3H.cjs');
4
+ var _PD7XZBXCcjs = require('../__chunks/PD7XZBXC.cjs');
5
+ require('../__chunks/7ZUFMSXJ.cjs');
6
+ require('../__chunks/GZDVJEID.cjs');
7
+ require('../__chunks/MEHGRTJ3.cjs');
8
8
 
9
9
 
10
- var _OASSVCYRcjs = require('../__chunks/OASSVCYR.cjs');
10
+ var _46BH65MCcjs = require('../__chunks/46BH65MC.cjs');
11
11
 
12
12
 
13
- var _LMT335NJcjs = require('../__chunks/LMT335NJ.cjs');
13
+ var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
14
14
 
15
15
 
16
16
 
17
- var _WYXAWBLEcjs = require('../__chunks/WYXAWBLE.cjs');
17
+ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
18
18
 
19
19
  // src/tooltip/tooltip-store.ts
20
20
  function createTooltipStore(props = {}) {
21
21
  var _a;
22
22
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
23
- const hovercard = _LUOEAZGUcjs.createHovercardStore.call(void 0, _WYXAWBLEcjs.__spreadProps.call(void 0, _WYXAWBLEcjs.__spreadValues.call(void 0, {}, props), {
24
- placement: _LMT335NJcjs.defaultValue.call(void 0,
23
+ const hovercard = _PD7XZBXCcjs.createHovercardStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
24
+ placement: _3UT5FE6Kcjs.defaultValue.call(void 0,
25
25
  props.placement,
26
26
  syncState == null ? void 0 : syncState.placement,
27
27
  "top"
28
28
  ),
29
- hideTimeout: _LMT335NJcjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout, 0)
29
+ hideTimeout: _3UT5FE6Kcjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout, 0)
30
30
  }));
31
- const initialState = _WYXAWBLEcjs.__spreadProps.call(void 0, _WYXAWBLEcjs.__spreadValues.call(void 0, {}, hovercard.getState()), {
32
- type: _LMT335NJcjs.defaultValue.call(void 0, props.type, syncState == null ? void 0 : syncState.type, "description"),
33
- skipTimeout: _LMT335NJcjs.defaultValue.call(void 0, props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300)
31
+ const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, hovercard.getState()), {
32
+ type: _3UT5FE6Kcjs.defaultValue.call(void 0, props.type, syncState == null ? void 0 : syncState.type, "description"),
33
+ skipTimeout: _3UT5FE6Kcjs.defaultValue.call(void 0, props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300)
34
34
  });
35
- const tooltip = _OASSVCYRcjs.createStore.call(void 0, initialState, hovercard, props.store);
36
- return _WYXAWBLEcjs.__spreadValues.call(void 0, _WYXAWBLEcjs.__spreadValues.call(void 0, {}, hovercard), tooltip);
35
+ const tooltip = _46BH65MCcjs.createStore.call(void 0, initialState, hovercard, props.store);
36
+ return _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, hovercard), tooltip);
37
37
  }
38
38
 
39
39
 
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
  var _ULSPM3Y3cjs = require('../__chunks/ULSPM3Y3.cjs');
8
- require('../__chunks/WYXAWBLE.cjs');
8
+ require('../__chunks/AV6KTKLE.cjs');
9
9
 
10
10
 
11
11
 
package/cjs/utils/dom.cjs CHANGED
@@ -17,9 +17,9 @@
17
17
 
18
18
 
19
19
 
20
- var _FTB5CXVBcjs = require('../__chunks/FTB5CXVB.cjs');
21
- require('../__chunks/WYXAWBLE.cjs');
22
20
 
21
+ var _5F4DVUNScjs = require('../__chunks/5F4DVUNS.cjs');
22
+ require('../__chunks/AV6KTKLE.cjs');
23
23
 
24
24
 
25
25
 
@@ -37,4 +37,6 @@ require('../__chunks/WYXAWBLE.cjs');
37
37
 
38
38
 
39
39
 
40
- exports.canUseDOM = _FTB5CXVBcjs.canUseDOM; exports.closest = _FTB5CXVBcjs.closest; exports.contains = _FTB5CXVBcjs.contains; exports.getActiveElement = _FTB5CXVBcjs.getActiveElement; exports.getDocument = _FTB5CXVBcjs.getDocument; exports.getPopupItemRole = _FTB5CXVBcjs.getPopupItemRole; exports.getPopupRole = _FTB5CXVBcjs.getPopupRole; exports.getScrollingElement = _FTB5CXVBcjs.getScrollingElement; exports.getTextboxSelection = _FTB5CXVBcjs.getTextboxSelection; exports.getWindow = _FTB5CXVBcjs.getWindow; exports.isButton = _FTB5CXVBcjs.isButton; exports.isFrame = _FTB5CXVBcjs.isFrame; exports.isPartiallyHidden = _FTB5CXVBcjs.isPartiallyHidden; exports.isTextField = _FTB5CXVBcjs.isTextField; exports.isVisible = _FTB5CXVBcjs.isVisible; exports.matches = _FTB5CXVBcjs.matches; exports.scrollIntoViewIfNeeded = _FTB5CXVBcjs.scrollIntoViewIfNeeded;
40
+
41
+
42
+ exports.canUseDOM = _5F4DVUNScjs.canUseDOM; exports.closest = _5F4DVUNScjs.closest; exports.contains = _5F4DVUNScjs.contains; exports.getActiveElement = _5F4DVUNScjs.getActiveElement; exports.getDocument = _5F4DVUNScjs.getDocument; exports.getPopupItemRole = _5F4DVUNScjs.getPopupItemRole; exports.getPopupRole = _5F4DVUNScjs.getPopupRole; exports.getScrollingElement = _5F4DVUNScjs.getScrollingElement; exports.getTextboxSelection = _5F4DVUNScjs.getTextboxSelection; exports.getWindow = _5F4DVUNScjs.getWindow; exports.isButton = _5F4DVUNScjs.isButton; exports.isFrame = _5F4DVUNScjs.isFrame; exports.isPartiallyHidden = _5F4DVUNScjs.isPartiallyHidden; exports.isTextField = _5F4DVUNScjs.isTextField; exports.isVisible = _5F4DVUNScjs.isVisible; exports.matches = _5F4DVUNScjs.matches; exports.scrollIntoViewIfNeeded = _5F4DVUNScjs.scrollIntoViewIfNeeded; exports.setSelectionRange = _5F4DVUNScjs.setSelectionRange;
@@ -103,3 +103,12 @@ export declare function getScrollingElement(element?: Element | null): HTMLEleme
103
103
  * Determines whether an element is hidden or partially hidden in the viewport.
104
104
  */
105
105
  export declare function isPartiallyHidden(element: Element): boolean;
106
+ /**
107
+ * SelectionRange only works on a few types of input.
108
+ * Calling `setSelectionRange` on a unsupported input type may throw an error on certain browsers.
109
+ * To avoid it, we check if its type supports SelectionRange first.
110
+ * It will be a noop to non-supported types until we find a workaround.
111
+ *
112
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
113
+ */
114
+ export declare function setSelectionRange(element: HTMLInputElement, ...args: Parameters<typeof HTMLInputElement.prototype.setSelectionRange>): void;
@@ -103,3 +103,12 @@ export declare function getScrollingElement(element?: Element | null): HTMLEleme
103
103
  * Determines whether an element is hidden or partially hidden in the viewport.
104
104
  */
105
105
  export declare function isPartiallyHidden(element: Element): boolean;
106
+ /**
107
+ * SelectionRange only works on a few types of input.
108
+ * Calling `setSelectionRange` on a unsupported input type may throw an error on certain browsers.
109
+ * To avoid it, we check if its type supports SelectionRange first.
110
+ * It will be a noop to non-supported types until we find a workaround.
111
+ *
112
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
113
+ */
114
+ export declare function setSelectionRange(element: HTMLInputElement, ...args: Parameters<typeof HTMLInputElement.prototype.setSelectionRange>): void;
@@ -1,19 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _G5EW4WEDcjs = require('../__chunks/G5EW4WED.cjs');
4
+ var _YIUPKKEKcjs = require('../__chunks/YIUPKKEK.cjs');
5
5
 
6
6
 
7
- var _FTB5CXVBcjs = require('../__chunks/FTB5CXVB.cjs');
7
+ var _5F4DVUNScjs = require('../__chunks/5F4DVUNS.cjs');
8
8
 
9
9
 
10
10
 
11
- var _WYXAWBLEcjs = require('../__chunks/WYXAWBLE.cjs');
11
+ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
12
12
 
13
13
  // src/utils/events.ts
14
14
  function isPortalEvent(event) {
15
15
  return Boolean(
16
- event.currentTarget && !_FTB5CXVBcjs.contains.call(void 0, event.currentTarget, event.target)
16
+ event.currentTarget && !_5F4DVUNScjs.contains.call(void 0, event.currentTarget, event.target)
17
17
  );
18
18
  }
19
19
  function isSelfTarget(event) {
@@ -23,7 +23,7 @@ function isOpeningInNewTab(event) {
23
23
  const element = event.currentTarget;
24
24
  if (!element)
25
25
  return false;
26
- const isAppleDevice = _G5EW4WEDcjs.isApple.call(void 0, );
26
+ const isAppleDevice = _YIUPKKEKcjs.isApple.call(void 0, );
27
27
  if (isAppleDevice && !event.metaKey)
28
28
  return false;
29
29
  if (!isAppleDevice && !event.ctrlKey)
@@ -59,14 +59,14 @@ function fireEvent(element, type, eventInit) {
59
59
  function fireBlurEvent(element, eventInit) {
60
60
  const event = new FocusEvent("blur", eventInit);
61
61
  const defaultAllowed = element.dispatchEvent(event);
62
- const bubbleInit = _WYXAWBLEcjs.__spreadProps.call(void 0, _WYXAWBLEcjs.__spreadValues.call(void 0, {}, eventInit), { bubbles: true });
62
+ const bubbleInit = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, eventInit), { bubbles: true });
63
63
  element.dispatchEvent(new FocusEvent("focusout", bubbleInit));
64
64
  return defaultAllowed;
65
65
  }
66
66
  function fireFocusEvent(element, eventInit) {
67
67
  const event = new FocusEvent("focus", eventInit);
68
68
  const defaultAllowed = element.dispatchEvent(event);
69
- const bubbleInit = _WYXAWBLEcjs.__spreadProps.call(void 0, _WYXAWBLEcjs.__spreadValues.call(void 0, {}, eventInit), { bubbles: true });
69
+ const bubbleInit = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, eventInit), { bubbles: true });
70
70
  element.dispatchEvent(new FocusEvent("focusin", bubbleInit));
71
71
  return defaultAllowed;
72
72
  }
@@ -81,7 +81,7 @@ function fireClickEvent(element, eventInit) {
81
81
  function isFocusEventOutside(event, container) {
82
82
  const containerElement = container || event.currentTarget;
83
83
  const relatedTarget = event.relatedTarget;
84
- return !relatedTarget || !_FTB5CXVBcjs.contains.call(void 0, containerElement, relatedTarget);
84
+ return !relatedTarget || !_5F4DVUNScjs.contains.call(void 0, containerElement, relatedTarget);
85
85
  }
86
86
  function queueBeforeEvent(element, type, callback) {
87
87
  const raf = requestAnimationFrame(() => {
@@ -6,10 +6,10 @@
6
6
 
7
7
 
8
8
 
9
- var _FTB5CXVBcjs = require('../__chunks/FTB5CXVB.cjs');
9
+ var _5F4DVUNScjs = require('../__chunks/5F4DVUNS.cjs');
10
10
 
11
11
 
12
- var _WYXAWBLEcjs = require('../__chunks/WYXAWBLE.cjs');
12
+ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
13
13
 
14
14
  // src/utils/focus.ts
15
15
  var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
@@ -18,11 +18,11 @@ function hasNegativeTabIndex(element) {
18
18
  return tabIndex < 0;
19
19
  }
20
20
  function isFocusable(element) {
21
- if (!_FTB5CXVBcjs.matches.call(void 0, element, selector))
21
+ if (!_5F4DVUNScjs.matches.call(void 0, element, selector))
22
22
  return false;
23
- if (!_FTB5CXVBcjs.isVisible.call(void 0, element))
23
+ if (!_5F4DVUNScjs.isVisible.call(void 0, element))
24
24
  return false;
25
- if (_FTB5CXVBcjs.closest.call(void 0, element, "[inert]"))
25
+ if (_5F4DVUNScjs.closest.call(void 0, element, "[inert]"))
26
26
  return false;
27
27
  return true;
28
28
  }
@@ -44,7 +44,7 @@ function isTabbable(element) {
44
44
  return true;
45
45
  if (!("length" in radioGroup))
46
46
  return true;
47
- const activeElement = _FTB5CXVBcjs.getActiveElement.call(void 0, element);
47
+ const activeElement = _5F4DVUNScjs.getActiveElement.call(void 0, element);
48
48
  if (!activeElement)
49
49
  return true;
50
50
  if (activeElement === element)
@@ -66,7 +66,7 @@ function getAllFocusableIn(container, includeContainer) {
66
66
  }
67
67
  const focusableElements = elements.filter(isFocusable);
68
68
  focusableElements.forEach((element, i) => {
69
- if (_FTB5CXVBcjs.isFrame.call(void 0, element) && element.contentDocument) {
69
+ if (_5F4DVUNScjs.isFrame.call(void 0, element) && element.contentDocument) {
70
70
  const frameBody = element.contentDocument.body;
71
71
  focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody));
72
72
  }
@@ -92,7 +92,7 @@ function getAllTabbableIn(container, includeContainer, fallbackToFocusable) {
92
92
  tabbableElements.unshift(container);
93
93
  }
94
94
  tabbableElements.forEach((element, i) => {
95
- if (_FTB5CXVBcjs.isFrame.call(void 0, element) && element.contentDocument) {
95
+ if (_5F4DVUNScjs.isFrame.call(void 0, element) && element.contentDocument) {
96
96
  const frameBody = element.contentDocument.body;
97
97
  const allFrameTabbable = getAllTabbableIn(
98
98
  frameBody,
@@ -133,7 +133,7 @@ function getLastTabbable(fallbackToFocusable) {
133
133
  return getLastTabbableIn(document.body, false, fallbackToFocusable);
134
134
  }
135
135
  function getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) {
136
- const activeElement = _FTB5CXVBcjs.getActiveElement.call(void 0, container);
136
+ const activeElement = _5F4DVUNScjs.getActiveElement.call(void 0, container);
137
137
  const allFocusable = getAllFocusableIn(container, includeContainer);
138
138
  const activeIndex = allFocusable.indexOf(activeElement);
139
139
  const nextFocusableElements = allFocusable.slice(activeIndex + 1);
@@ -148,7 +148,7 @@ function getNextTabbable(fallbackToFirst, fallbackToFocusable) {
148
148
  );
149
149
  }
150
150
  function getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) {
151
- const activeElement = _FTB5CXVBcjs.getActiveElement.call(void 0, container);
151
+ const activeElement = _5F4DVUNScjs.getActiveElement.call(void 0, container);
152
152
  const allFocusable = getAllFocusableIn(container, includeContainer).reverse();
153
153
  const activeIndex = allFocusable.indexOf(activeElement);
154
154
  const previousFocusableElements = allFocusable.slice(activeIndex + 1);
@@ -164,12 +164,12 @@ function getPreviousTabbable(fallbackToFirst, fallbackToFocusable) {
164
164
  }
165
165
  function getClosestFocusable(element) {
166
166
  while (element && !isFocusable(element)) {
167
- element = _FTB5CXVBcjs.closest.call(void 0, element, selector);
167
+ element = _5F4DVUNScjs.closest.call(void 0, element, selector);
168
168
  }
169
169
  return element || null;
170
170
  }
171
171
  function hasFocus(element) {
172
- const activeElement = _FTB5CXVBcjs.getActiveElement.call(void 0, element);
172
+ const activeElement = _5F4DVUNScjs.getActiveElement.call(void 0, element);
173
173
  if (!activeElement)
174
174
  return false;
175
175
  if (activeElement === element)
@@ -180,10 +180,10 @@ function hasFocus(element) {
180
180
  return activeDescendant === element.id;
181
181
  }
182
182
  function hasFocusWithin(element) {
183
- const activeElement = _FTB5CXVBcjs.getActiveElement.call(void 0, element);
183
+ const activeElement = _5F4DVUNScjs.getActiveElement.call(void 0, element);
184
184
  if (!activeElement)
185
185
  return false;
186
- if (_FTB5CXVBcjs.contains.call(void 0, element, activeElement))
186
+ if (_5F4DVUNScjs.contains.call(void 0, element, activeElement))
187
187
  return true;
188
188
  const activeDescendant = activeElement.getAttribute("aria-activedescendant");
189
189
  if (!activeDescendant)
@@ -230,7 +230,7 @@ function focusIntoView(element, options) {
230
230
  element.focus();
231
231
  } else {
232
232
  element.focus({ preventScroll: true });
233
- element.scrollIntoView(_WYXAWBLEcjs.__spreadValues.call(void 0, { block: "nearest", inline: "nearest" }, options));
233
+ element.scrollIntoView(_AV6KTKLEcjs.__spreadValues.call(void 0, { block: "nearest", inline: "nearest" }, options));
234
234
  }
235
235
  }
236
236
 
@@ -20,8 +20,8 @@
20
20
 
21
21
 
22
22
 
23
- var _LMT335NJcjs = require('../__chunks/LMT335NJ.cjs');
24
- require('../__chunks/WYXAWBLE.cjs');
23
+ var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
24
+ require('../__chunks/AV6KTKLE.cjs');
25
25
 
26
26
 
27
27
 
@@ -43,4 +43,4 @@ require('../__chunks/WYXAWBLE.cjs');
43
43
 
44
44
 
45
45
 
46
- exports.afterPaint = _LMT335NJcjs.afterPaint; exports.applyState = _LMT335NJcjs.applyState; exports.beforePaint = _LMT335NJcjs.beforePaint; exports.chain = _LMT335NJcjs.chain; exports.cx = _LMT335NJcjs.cx; exports.defaultValue = _LMT335NJcjs.defaultValue; exports.disabledFromProps = _LMT335NJcjs.disabledFromProps; exports.getKeys = _LMT335NJcjs.getKeys; exports.hasOwnProperty = _LMT335NJcjs.hasOwnProperty; exports.identity = _LMT335NJcjs.identity; exports.invariant = _LMT335NJcjs.invariant; exports.isEmpty = _LMT335NJcjs.isEmpty; exports.isFalsyBooleanCallback = _LMT335NJcjs.isFalsyBooleanCallback; exports.isInteger = _LMT335NJcjs.isInteger; exports.isObject = _LMT335NJcjs.isObject; exports.noop = _LMT335NJcjs.noop; exports.normalizeString = _LMT335NJcjs.normalizeString; exports.omit = _LMT335NJcjs.omit; exports.pick = _LMT335NJcjs.pick; exports.shallowEqual = _LMT335NJcjs.shallowEqual;
46
+ exports.afterPaint = _3UT5FE6Kcjs.afterPaint; exports.applyState = _3UT5FE6Kcjs.applyState; exports.beforePaint = _3UT5FE6Kcjs.beforePaint; exports.chain = _3UT5FE6Kcjs.chain; exports.cx = _3UT5FE6Kcjs.cx; exports.defaultValue = _3UT5FE6Kcjs.defaultValue; exports.disabledFromProps = _3UT5FE6Kcjs.disabledFromProps; exports.getKeys = _3UT5FE6Kcjs.getKeys; exports.hasOwnProperty = _3UT5FE6Kcjs.hasOwnProperty; exports.identity = _3UT5FE6Kcjs.identity; exports.invariant = _3UT5FE6Kcjs.invariant; exports.isEmpty = _3UT5FE6Kcjs.isEmpty; exports.isFalsyBooleanCallback = _3UT5FE6Kcjs.isFalsyBooleanCallback; exports.isInteger = _3UT5FE6Kcjs.isInteger; exports.isObject = _3UT5FE6Kcjs.isObject; exports.noop = _3UT5FE6Kcjs.noop; exports.normalizeString = _3UT5FE6Kcjs.normalizeString; exports.omit = _3UT5FE6Kcjs.omit; exports.pick = _3UT5FE6Kcjs.pick; exports.shallowEqual = _3UT5FE6Kcjs.shallowEqual;
@@ -5,13 +5,13 @@
5
5
 
6
6
 
7
7
 
8
- var _G5EW4WEDcjs = require('../__chunks/G5EW4WED.cjs');
9
- require('../__chunks/FTB5CXVB.cjs');
10
- require('../__chunks/WYXAWBLE.cjs');
8
+ var _YIUPKKEKcjs = require('../__chunks/YIUPKKEK.cjs');
9
+ require('../__chunks/5F4DVUNS.cjs');
10
+ require('../__chunks/AV6KTKLE.cjs');
11
11
 
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
- exports.isApple = _G5EW4WEDcjs.isApple; exports.isFirefox = _G5EW4WEDcjs.isFirefox; exports.isMac = _G5EW4WEDcjs.isMac; exports.isSafari = _G5EW4WEDcjs.isSafari; exports.isTouchDevice = _G5EW4WEDcjs.isTouchDevice;
17
+ exports.isApple = _YIUPKKEKcjs.isApple; exports.isFirefox = _YIUPKKEKcjs.isFirefox; exports.isMac = _YIUPKKEKcjs.isMac; exports.isSafari = _YIUPKKEKcjs.isSafari; exports.isTouchDevice = _YIUPKKEKcjs.isTouchDevice;
@@ -10,9 +10,9 @@
10
10
 
11
11
 
12
12
 
13
- var _OASSVCYRcjs = require('../__chunks/OASSVCYR.cjs');
14
- require('../__chunks/LMT335NJ.cjs');
15
- require('../__chunks/WYXAWBLE.cjs');
13
+ var _46BH65MCcjs = require('../__chunks/46BH65MC.cjs');
14
+ require('../__chunks/3UT5FE6K.cjs');
15
+ require('../__chunks/AV6KTKLE.cjs');
16
16
 
17
17
 
18
18
 
@@ -24,4 +24,4 @@ require('../__chunks/WYXAWBLE.cjs');
24
24
 
25
25
 
26
26
 
27
- exports.batch = _OASSVCYRcjs.batch; exports.createStore = _OASSVCYRcjs.createStore; exports.init = _OASSVCYRcjs.init; exports.mergeStore = _OASSVCYRcjs.mergeStore; exports.omit = _OASSVCYRcjs.omit; exports.pick = _OASSVCYRcjs.pick; exports.setup = _OASSVCYRcjs.setup; exports.subscribe = _OASSVCYRcjs.subscribe; exports.sync = _OASSVCYRcjs.sync; exports.throwOnConflictingProps = _OASSVCYRcjs.throwOnConflictingProps;
27
+ exports.batch = _46BH65MCcjs.batch; exports.createStore = _46BH65MCcjs.createStore; exports.init = _46BH65MCcjs.init; exports.mergeStore = _46BH65MCcjs.mergeStore; exports.omit = _46BH65MCcjs.omit; exports.pick = _46BH65MCcjs.pick; exports.setup = _46BH65MCcjs.setup; exports.subscribe = _46BH65MCcjs.subscribe; exports.sync = _46BH65MCcjs.sync; exports.throwOnConflictingProps = _46BH65MCcjs.throwOnConflictingProps;
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import {
3
+ createCompositeStore
4
+ } from "./OGMLJYDV.js";
5
+ import {
6
+ createStore
7
+ } from "./E7OQVGGY.js";
8
+ import {
9
+ defaultValue
10
+ } from "./I2VQ3XGR.js";
11
+ import {
12
+ __spreadProps,
13
+ __spreadValues
14
+ } from "./4R3V3JGP.js";
15
+
16
+ // src/menubar/menubar-store.ts
17
+ function createMenubarStore(props = {}) {
18
+ var _a;
19
+ const syncState = (_a = props.store) == null ? void 0 : _a.getState();
20
+ const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {
21
+ orientation: defaultValue(
22
+ props.orientation,
23
+ syncState == null ? void 0 : syncState.orientation,
24
+ "horizontal"
25
+ ),
26
+ focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
27
+ }));
28
+ const initialState = __spreadValues({}, composite.getState());
29
+ const menubar = createStore(initialState, composite, props.store);
30
+ return __spreadValues(__spreadValues({}, composite), menubar);
31
+ }
32
+
33
+ export {
34
+ createMenubarStore
35
+ };
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "./VEWADM34.js";
4
+ } from "./WY3EMTH6.js";
5
5
  import {
6
6
  createStore
7
- } from "./GME4NYXR.js";
7
+ } from "./E7OQVGGY.js";
8
8
  import {
9
9
  defaultValue
10
- } from "./D23ES3Z4.js";
10
+ } from "./I2VQ3XGR.js";
11
11
  import {
12
12
  __spreadProps,
13
13
  __spreadValues
14
- } from "./2SMRF6AD.js";
14
+ } from "./4R3V3JGP.js";
15
15
 
16
16
  // src/hovercard/hovercard-store.ts
17
17
  function createHovercardStore(props = {}) {
@@ -4,18 +4,18 @@ import {
4
4
  createStore,
5
5
  setup,
6
6
  throwOnConflictingProps
7
- } from "./GME4NYXR.js";
7
+ } from "./E7OQVGGY.js";
8
8
  import {
9
9
  chain,
10
10
  defaultValue
11
- } from "./D23ES3Z4.js";
11
+ } from "./I2VQ3XGR.js";
12
12
  import {
13
13
  getDocument
14
- } from "./NIF7E7VE.js";
14
+ } from "./DLOEKDPY.js";
15
15
  import {
16
16
  __spreadProps,
17
17
  __spreadValues
18
- } from "./2SMRF6AD.js";
18
+ } from "./4R3V3JGP.js";
19
19
 
20
20
  // src/collection/collection-store.ts
21
21
  function isElementPreceding(a, b) {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  createDisclosureStore
4
- } from "./TEJLMP2M.js";
4
+ } from "./DYD4YNLE.js";
5
5
 
6
6
  // src/dialog/dialog-store.ts
7
7
  function createDialogStore(props = {}) {
@@ -169,6 +169,11 @@ function isPartiallyHidden(element) {
169
169
  const right = elementRect.right > scrollerRight;
170
170
  return top || left || bottom || right;
171
171
  }
172
+ function setSelectionRange(element, ...args) {
173
+ if (/text|search|password|tel|url/i.test(element.type)) {
174
+ element.setSelectionRange(...args);
175
+ }
176
+ }
172
177
 
173
178
  export {
174
179
  canUseDOM,
@@ -187,5 +192,6 @@ export {
187
192
  getTextboxSelection,
188
193
  scrollIntoViewIfNeeded,
189
194
  getScrollingElement,
190
- isPartiallyHidden
195
+ isPartiallyHidden,
196
+ setSelectionRange
191
197
  };
@@ -7,14 +7,14 @@ import {
7
7
  subscribe,
8
8
  sync,
9
9
  throwOnConflictingProps
10
- } from "./GME4NYXR.js";
10
+ } from "./E7OQVGGY.js";
11
11
  import {
12
12
  defaultValue
13
- } from "./D23ES3Z4.js";
13
+ } from "./I2VQ3XGR.js";
14
14
  import {
15
15
  __spreadProps,
16
16
  __spreadValues
17
- } from "./2SMRF6AD.js";
17
+ } from "./4R3V3JGP.js";
18
18
 
19
19
  // src/disclosure/disclosure-store.ts
20
20
  function createDisclosureStore(props = {}) {
@@ -8,11 +8,11 @@ import {
8
8
  noop,
9
9
  omit,
10
10
  pick
11
- } from "./D23ES3Z4.js";
11
+ } from "./I2VQ3XGR.js";
12
12
  import {
13
13
  __spreadProps,
14
14
  __spreadValues
15
- } from "./2SMRF6AD.js";
15
+ } from "./4R3V3JGP.js";
16
16
 
17
17
  // src/utils/store.ts
18
18
  function getInternal(store, key) {
@@ -50,17 +50,15 @@ function createStore(initialState, ...stores) {
50
50
  return;
51
51
  if (!hasOwnProperty(storeState, key))
52
52
  return;
53
- return sync(
54
- store,
55
- [key],
56
- (state2) => setState(
53
+ return sync(store, [key], (state2) => {
54
+ setState(
57
55
  key,
58
56
  state2[key],
59
57
  // @ts-expect-error - Not public API. This is just to prevent
60
58
  // infinite loops.
61
59
  true
62
- )
63
- );
60
+ );
61
+ });
64
62
  })
65
63
  )
66
64
  );
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  __spreadValues
4
- } from "./2SMRF6AD.js";
4
+ } from "./4R3V3JGP.js";
5
5
 
6
6
  // src/utils/misc.ts
7
7
  function noop(..._) {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  canUseDOM
4
- } from "./NIF7E7VE.js";
4
+ } from "./DLOEKDPY.js";
5
5
 
6
6
  // src/utils/platform.ts
7
7
  function isTouchDevice() {
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import {
3
3
  createCollectionStore
4
- } from "./Q332EHXG.js";
4
+ } from "./CCU5UHQ2.js";
5
5
  import {
6
6
  createStore,
7
7
  setup,
8
8
  sync
9
- } from "./GME4NYXR.js";
9
+ } from "./E7OQVGGY.js";
10
10
  import {
11
11
  defaultValue
12
- } from "./D23ES3Z4.js";
12
+ } from "./I2VQ3XGR.js";
13
13
  import {
14
14
  flatten2DArray,
15
15
  reverseArray
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  __spreadProps,
19
19
  __spreadValues
20
- } from "./2SMRF6AD.js";
20
+ } from "./4R3V3JGP.js";
21
21
 
22
22
  // src/composite/composite-store.ts
23
23
  var NULL_ITEM = { id: null };
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import {
3
3
  createDialogStore
4
- } from "./I7YGHQ4Z.js";
4
+ } from "./CL47ZAPY.js";
5
5
  import {
6
6
  createStore,
7
7
  mergeStore,
8
8
  omit,
9
9
  throwOnConflictingProps
10
- } from "./GME4NYXR.js";
10
+ } from "./E7OQVGGY.js";
11
11
  import {
12
12
  defaultValue
13
- } from "./D23ES3Z4.js";
13
+ } from "./I2VQ3XGR.js";
14
14
  import {
15
15
  __objRest,
16
16
  __spreadProps,
17
17
  __spreadValues
18
- } from "./2SMRF6AD.js";
18
+ } from "./4R3V3JGP.js";
19
19
 
20
20
  // src/popover/popover-store.ts
21
21
  function createPopoverStore(_a = {}) {
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  createStore,
4
4
  throwOnConflictingProps
5
- } from "../__chunks/GME4NYXR.js";
5
+ } from "../__chunks/E7OQVGGY.js";
6
6
  import {
7
7
  defaultValue
8
- } from "../__chunks/D23ES3Z4.js";
8
+ } from "../__chunks/I2VQ3XGR.js";
9
9
  import {
10
10
  __spreadProps,
11
11
  __spreadValues
12
- } from "../__chunks/2SMRF6AD.js";
12
+ } from "../__chunks/4R3V3JGP.js";
13
13
 
14
14
  // src/checkbox/checkbox-store.ts
15
15
  function createCheckboxStore(props = {}) {
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  createCollectionStore
4
- } from "../__chunks/Q332EHXG.js";
5
- import "../__chunks/GME4NYXR.js";
6
- import "../__chunks/D23ES3Z4.js";
7
- import "../__chunks/NIF7E7VE.js";
8
- import "../__chunks/2SMRF6AD.js";
4
+ } from "../__chunks/CCU5UHQ2.js";
5
+ import "../__chunks/E7OQVGGY.js";
6
+ import "../__chunks/I2VQ3XGR.js";
7
+ import "../__chunks/DLOEKDPY.js";
8
+ import "../__chunks/4R3V3JGP.js";
9
9
  export {
10
10
  createCollectionStore
11
11
  };
@@ -19,7 +19,8 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
19
19
  * The input value.
20
20
  *
21
21
  * Live examples:
22
- * - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
22
+ * - [Combobox with integrated
23
+ * filter](https://ariakit.org/examples/combobox-filtering-integrated)
23
24
  * - [Combobox with links](https://ariakit.org/examples/combobox-links)
24
25
  * - [Combobox filtering](https://ariakit.org/examples/combobox-filtering)
25
26
  * - [Multi-selectable
@@ -38,6 +39,8 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
38
39
  * Live examples:
39
40
  * - [Multi-selectable
40
41
  * Combobox](https://ariakit.org/examples/combobox-multiple)
42
+ * - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
43
+ * - [Select with Combobox](https://ariakit.org/examples/select-combobox)
41
44
  * @default false
42
45
  */
43
46
  resetValueOnHide: boolean;