@ariakit/core 0.4.10 → 0.4.12

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 (72) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/cjs/__chunks/{3IVNQNIV.cjs → 7EQBAZ46.cjs} +1 -2
  3. package/cjs/__chunks/{PW36G76L.cjs → A47DWKLR.cjs} +76 -99
  4. package/cjs/__chunks/{3QF3ODTR.cjs → BSLRW6E7.cjs} +15 -16
  5. package/cjs/__chunks/{H6ZQSQQL.cjs → C5P5S22J.cjs} +17 -18
  6. package/cjs/__chunks/FGGZELG7.cjs +34 -0
  7. package/cjs/__chunks/{QLWAGBAQ.cjs → G2MFLTB2.cjs} +19 -20
  8. package/cjs/__chunks/{CCI5VM7E.cjs → G2NIRMCL.cjs} +19 -20
  9. package/cjs/__chunks/{ULSPM3Y3.cjs → GDZQUFNP.cjs} +1 -3
  10. package/cjs/__chunks/{N667HVED.cjs → I2G6EN27.cjs} +3 -4
  11. package/cjs/__chunks/LSC6QXJ7.cjs +41 -0
  12. package/cjs/__chunks/{BTUHABP4.cjs → MLCPLY2P.cjs} +3 -4
  13. package/cjs/__chunks/{7CES7GVE.cjs → SHOLYDNP.cjs} +1 -3
  14. package/cjs/__chunks/{KCEXELK7.cjs → TEPPO3KC.cjs} +7 -8
  15. package/cjs/__chunks/{7WYII4AN.cjs → WCFMOJKV.cjs} +8 -7
  16. package/cjs/checkbox/checkbox-store.cjs +8 -9
  17. package/cjs/collection/collection-store.cjs +7 -8
  18. package/cjs/combobox/combobox-store.cjs +46 -47
  19. package/cjs/composite/composite-overflow-store.cjs +8 -9
  20. package/cjs/composite/composite-store.cjs +9 -10
  21. package/cjs/composite/composite-store.d.cts +30 -12
  22. package/cjs/composite/composite-store.d.ts +30 -12
  23. package/cjs/dialog/dialog-store.cjs +7 -8
  24. package/cjs/disclosure/disclosure-store.cjs +6 -7
  25. package/cjs/form/form-store.cjs +29 -30
  26. package/cjs/form/types.cjs +1 -1
  27. package/cjs/hovercard/hovercard-store.cjs +9 -10
  28. package/cjs/index.cjs +1 -2
  29. package/cjs/menu/menu-bar-store.cjs +10 -11
  30. package/cjs/menu/menu-store.cjs +34 -35
  31. package/cjs/menubar/menubar-store.cjs +10 -11
  32. package/cjs/popover/popover-store.cjs +8 -9
  33. package/cjs/radio/radio-store.cjs +15 -16
  34. package/cjs/select/select-store.cjs +39 -40
  35. package/cjs/tab/tab-store.cjs +39 -40
  36. package/cjs/tag/tag-store.cjs +21 -22
  37. package/cjs/toolbar/toolbar-store.cjs +11 -12
  38. package/cjs/tooltip/tooltip-store.cjs +16 -17
  39. package/cjs/utils/array.cjs +4 -5
  40. package/cjs/utils/dom.cjs +4 -5
  41. package/cjs/utils/events.cjs +9 -10
  42. package/cjs/utils/focus.cjs +13 -14
  43. package/cjs/utils/misc.cjs +4 -5
  44. package/cjs/utils/platform.cjs +5 -6
  45. package/cjs/utils/store.cjs +5 -6
  46. package/cjs/utils/types.cjs +1 -1
  47. package/cjs/utils/undo.cjs +4 -5
  48. package/esm/__chunks/{US4USQPI.js → 3VBK76MS.js} +1 -1
  49. package/esm/__chunks/{6DHTHWXD.js → 7DTP4AQO.js} +1 -1
  50. package/esm/__chunks/{D7EIQZAU.js → IJ6VFLJG.js} +53 -75
  51. package/esm/__chunks/{HWOIWM4O.js → PQP5VPTV.js} +7 -4
  52. package/esm/__chunks/{PIWLWQMB.js → S22RJCNX.js} +1 -1
  53. package/esm/collection/collection-store.js +2 -2
  54. package/esm/combobox/combobox-store.js +4 -4
  55. package/esm/composite/composite-store.d.ts +30 -12
  56. package/esm/composite/composite-store.js +3 -3
  57. package/esm/form/form-store.js +2 -2
  58. package/esm/menu/menu-bar-store.js +4 -4
  59. package/esm/menu/menu-store.js +3 -3
  60. package/esm/menubar/menubar-store.js +4 -4
  61. package/esm/radio/radio-store.js +3 -3
  62. package/esm/select/select-store.js +3 -3
  63. package/esm/tab/tab-store.js +3 -3
  64. package/esm/tag/tag-store.js +3 -3
  65. package/esm/toolbar/toolbar-store.js +3 -3
  66. package/esm/utils/dom.js +1 -1
  67. package/esm/utils/events.js +2 -2
  68. package/esm/utils/focus.js +1 -1
  69. package/esm/utils/platform.js +2 -2
  70. package/package.json +1 -1
  71. package/cjs/__chunks/VJAE2Y4T.cjs +0 -35
  72. package/cjs/__chunks/XIZWLBI2.cjs +0 -42
@@ -1,22 +1,21 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
4
 
5
5
 
6
6
 
7
+ var _BSLRW6E7cjs = require('./BSLRW6E7.cjs');
7
8
 
8
- var _3QF3ODTRcjs = require('./3QF3ODTR.cjs');
9
9
 
10
10
 
11
+ var _MLCPLY2Pcjs = require('./MLCPLY2P.cjs');
11
12
 
12
- var _BTUHABP4cjs = require('./BTUHABP4.cjs');
13
13
 
14
+ var _WCFMOJKVcjs = require('./WCFMOJKV.cjs');
14
15
 
15
- var _7WYII4ANcjs = require('./7WYII4AN.cjs');
16
16
 
17
17
 
18
-
19
- var _3IVNQNIVcjs = require('./3IVNQNIV.cjs');
18
+ var _7EQBAZ46cjs = require('./7EQBAZ46.cjs');
20
19
 
21
20
  // src/collection/collection-store.ts
22
21
  function isElementPreceding(a, b) {
@@ -60,16 +59,16 @@ function getCommonParent(items) {
60
59
  }
61
60
  parentElement = parentElement.parentElement;
62
61
  }
63
- return _7WYII4ANcjs.getDocument.call(void 0, parentElement).body;
62
+ return _WCFMOJKVcjs.getDocument.call(void 0, parentElement).body;
64
63
  }
65
64
  function getPrivateStore(store) {
66
65
  return store == null ? void 0 : store.__unstablePrivateStore;
67
66
  }
68
67
  function createCollectionStore(props = {}) {
69
68
  var _a;
70
- _3QF3ODTRcjs.throwOnConflictingProps.call(void 0, props, props.store);
69
+ _BSLRW6E7cjs.throwOnConflictingProps.call(void 0, props, props.store);
71
70
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
72
- const items = _BTUHABP4cjs.defaultValue.call(void 0,
71
+ const items = _MLCPLY2Pcjs.defaultValue.call(void 0,
73
72
  props.items,
74
73
  syncState == null ? void 0 : syncState.items,
75
74
  props.defaultItems,
@@ -78,27 +77,27 @@ function createCollectionStore(props = {}) {
78
77
  const itemsMap = new Map(items.map((item) => [item.id, item]));
79
78
  const initialState = {
80
79
  items,
81
- renderedItems: _BTUHABP4cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.renderedItems, [])
80
+ renderedItems: _MLCPLY2Pcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.renderedItems, [])
82
81
  };
83
82
  const syncPrivateStore = getPrivateStore(props.store);
84
- const privateStore = _3QF3ODTRcjs.createStore.call(void 0,
83
+ const privateStore = _BSLRW6E7cjs.createStore.call(void 0,
85
84
  { items, renderedItems: initialState.renderedItems },
86
85
  syncPrivateStore
87
86
  );
88
- const collection = _3QF3ODTRcjs.createStore.call(void 0, initialState, props.store);
87
+ const collection = _BSLRW6E7cjs.createStore.call(void 0, initialState, props.store);
89
88
  const sortItems = (renderedItems) => {
90
89
  const sortedItems = sortBasedOnDOMPosition(renderedItems);
91
90
  privateStore.setState("renderedItems", sortedItems);
92
91
  collection.setState("renderedItems", sortedItems);
93
92
  };
94
- _3QF3ODTRcjs.setup.call(void 0, collection, () => _3QF3ODTRcjs.init.call(void 0, privateStore));
95
- _3QF3ODTRcjs.setup.call(void 0, privateStore, () => {
96
- return _3QF3ODTRcjs.batch.call(void 0, privateStore, ["items"], (state) => {
93
+ _BSLRW6E7cjs.setup.call(void 0, collection, () => _BSLRW6E7cjs.init.call(void 0, privateStore));
94
+ _BSLRW6E7cjs.setup.call(void 0, privateStore, () => {
95
+ return _BSLRW6E7cjs.batch.call(void 0, privateStore, ["items"], (state) => {
97
96
  collection.setState("items", state.items);
98
97
  });
99
98
  });
100
- _3QF3ODTRcjs.setup.call(void 0, privateStore, () => {
101
- return _3QF3ODTRcjs.batch.call(void 0, privateStore, ["renderedItems"], (state) => {
99
+ _BSLRW6E7cjs.setup.call(void 0, privateStore, () => {
100
+ return _BSLRW6E7cjs.batch.call(void 0, privateStore, ["renderedItems"], (state) => {
102
101
  let firstRun = true;
103
102
  let raf = requestAnimationFrame(() => {
104
103
  const { renderedItems } = collection.getState();
@@ -135,7 +134,7 @@ function createCollectionStore(props = {}) {
135
134
  const nextItems = items2.slice();
136
135
  if (index !== -1) {
137
136
  prevItem = items2[index];
138
- const nextItem = _3IVNQNIVcjs.__spreadValues.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, prevItem), item);
137
+ const nextItem = _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, prevItem), item);
139
138
  nextItems[index] = nextItem;
140
139
  itemsMap.set(item.id, nextItem);
141
140
  } else {
@@ -167,9 +166,9 @@ function createCollectionStore(props = {}) {
167
166
  (getItems) => privateStore.setState("items", getItems),
168
167
  true
169
168
  );
170
- return _3IVNQNIVcjs.__spreadProps.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, collection), {
169
+ return _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, collection), {
171
170
  registerItem,
172
- renderItem: (item) => _BTUHABP4cjs.chain.call(void 0,
171
+ renderItem: (item) => _MLCPLY2Pcjs.chain.call(void 0,
173
172
  registerItem(item),
174
173
  mergeItem(
175
174
  item,
@@ -1,6 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
-
3
- // src/utils/array.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/utils/array.ts
4
2
  function toArray(arg) {
5
3
  if (Array.isArray(arg)) {
6
4
  return arg;
@@ -1,11 +1,10 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _QLWAGBAQcjs = require('./QLWAGBAQ.cjs');
3
+ var _G2MFLTB2cjs = require('./G2MFLTB2.cjs');
5
4
 
6
5
  // src/dialog/dialog-store.ts
7
6
  function createDialogStore(props = {}) {
8
- return _QLWAGBAQcjs.createDisclosureStore.call(void 0, props);
7
+ return _G2MFLTB2cjs.createDisclosureStore.call(void 0, props);
9
8
  }
10
9
 
11
10
 
@@ -0,0 +1,41 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _C5P5S22Jcjs = require('./C5P5S22J.cjs');
4
+
5
+
6
+ var _BSLRW6E7cjs = require('./BSLRW6E7.cjs');
7
+
8
+
9
+ var _MLCPLY2Pcjs = require('./MLCPLY2P.cjs');
10
+
11
+
12
+
13
+ var _7EQBAZ46cjs = require('./7EQBAZ46.cjs');
14
+
15
+ // src/hovercard/hovercard-store.ts
16
+ function createHovercardStore(props = {}) {
17
+ var _a;
18
+ const syncState = (_a = props.store) == null ? void 0 : _a.getState();
19
+ const popover = _C5P5S22Jcjs.createPopoverStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
20
+ placement: _MLCPLY2Pcjs.defaultValue.call(void 0,
21
+ props.placement,
22
+ syncState == null ? void 0 : syncState.placement,
23
+ "bottom"
24
+ )
25
+ }));
26
+ const timeout = _MLCPLY2Pcjs.defaultValue.call(void 0, props.timeout, syncState == null ? void 0 : syncState.timeout, 500);
27
+ const initialState = _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, popover.getState()), {
28
+ timeout,
29
+ showTimeout: _MLCPLY2Pcjs.defaultValue.call(void 0, props.showTimeout, syncState == null ? void 0 : syncState.showTimeout),
30
+ hideTimeout: _MLCPLY2Pcjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),
31
+ autoFocusOnShow: _MLCPLY2Pcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.autoFocusOnShow, false)
32
+ });
33
+ const hovercard = _BSLRW6E7cjs.createStore.call(void 0, initialState, popover, props.store);
34
+ return _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, popover), hovercard), {
35
+ setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value)
36
+ });
37
+ }
38
+
39
+
40
+
41
+ exports.createHovercardStore = createHovercardStore;
@@ -1,7 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _3IVNQNIVcjs = require('./3IVNQNIV.cjs');
3
+ var _7EQBAZ46cjs = require('./7EQBAZ46.cjs');
5
4
 
6
5
  // src/utils/misc.ts
7
6
  function noop(..._) {
@@ -74,7 +73,7 @@ function normalizeString(str) {
74
73
  return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
75
74
  }
76
75
  function omit(object, keys) {
77
- const result = _3IVNQNIVcjs.__spreadValues.call(void 0, {}, object);
76
+ const result = _7EQBAZ46cjs.__spreadValues.call(void 0, {}, object);
78
77
  for (const key of keys) {
79
78
  if (hasOwnProperty(result, key)) {
80
79
  delete result[key];
@@ -1,6 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
-
3
- // src/utils/undo.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/utils/undo.ts
4
2
  function createUndoCallback(callback) {
5
3
  return async () => {
6
4
  const redo = await (callback == null ? void 0 : callback());
@@ -1,24 +1,23 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _7WYII4ANcjs = require('./7WYII4AN.cjs');
3
+ var _WCFMOJKVcjs = require('./WCFMOJKV.cjs');
5
4
 
6
5
  // src/utils/platform.ts
7
6
  function isTouchDevice() {
8
- return _7WYII4ANcjs.canUseDOM && !!navigator.maxTouchPoints;
7
+ return _WCFMOJKVcjs.canUseDOM && !!navigator.maxTouchPoints;
9
8
  }
10
9
  function isApple() {
11
- if (!_7WYII4ANcjs.canUseDOM) return false;
10
+ if (!_WCFMOJKVcjs.canUseDOM) return false;
12
11
  return /mac|iphone|ipad|ipod/i.test(navigator.platform);
13
12
  }
14
13
  function isSafari() {
15
- return _7WYII4ANcjs.canUseDOM && isApple() && /apple/i.test(navigator.vendor);
14
+ return _WCFMOJKVcjs.canUseDOM && isApple() && /apple/i.test(navigator.vendor);
16
15
  }
17
16
  function isFirefox() {
18
- return _7WYII4ANcjs.canUseDOM && /firefox\//i.test(navigator.userAgent);
17
+ return _WCFMOJKVcjs.canUseDOM && /firefox\//i.test(navigator.userAgent);
19
18
  }
20
19
  function isMac() {
21
- return _7WYII4ANcjs.canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice();
20
+ return _WCFMOJKVcjs.canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice();
22
21
  }
23
22
 
24
23
 
@@ -1,6 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
-
3
- // src/utils/dom.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/utils/dom.ts
4
2
  var canUseDOM = checkIsBrowser();
5
3
  function checkIsBrowser() {
6
4
  var _a;
@@ -133,14 +131,17 @@ function scrollIntoViewIfNeeded(element, arg) {
133
131
  }
134
132
  function getScrollingElement(element) {
135
133
  if (!element) return null;
134
+ const isScrollableOverflow = (overflow) => {
135
+ if (overflow === "auto") return true;
136
+ if (overflow === "scroll") return true;
137
+ return false;
138
+ };
136
139
  if (element.clientHeight && element.scrollHeight > element.clientHeight) {
137
140
  const { overflowY } = getComputedStyle(element);
138
- const isScrollable = overflowY !== "visible" && overflowY !== "hidden";
139
- if (isScrollable) return element;
141
+ if (isScrollableOverflow(overflowY)) return element;
140
142
  } else if (element.clientWidth && element.scrollWidth > element.clientWidth) {
141
143
  const { overflowX } = getComputedStyle(element);
142
- const isScrollable = overflowX !== "visible" && overflowX !== "hidden";
143
- if (isScrollable) return element;
144
+ if (isScrollableOverflow(overflowX)) return element;
144
145
  }
145
146
  return getScrollingElement(element.parentElement) || document.scrollingElement || document.body;
146
147
  }
@@ -1,31 +1,30 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
+ var _BSLRW6E7cjs = require('../__chunks/BSLRW6E7.cjs');
4
5
 
5
- var _3QF3ODTRcjs = require('../__chunks/3QF3ODTR.cjs');
6
6
 
7
+ var _MLCPLY2Pcjs = require('../__chunks/MLCPLY2P.cjs');
7
8
 
8
- var _BTUHABP4cjs = require('../__chunks/BTUHABP4.cjs');
9
9
 
10
10
 
11
-
12
- var _3IVNQNIVcjs = require('../__chunks/3IVNQNIV.cjs');
11
+ var _7EQBAZ46cjs = require('../__chunks/7EQBAZ46.cjs');
13
12
 
14
13
  // src/checkbox/checkbox-store.ts
15
14
  function createCheckboxStore(props = {}) {
16
15
  var _a;
17
- _3QF3ODTRcjs.throwOnConflictingProps.call(void 0, props, props.store);
16
+ _BSLRW6E7cjs.throwOnConflictingProps.call(void 0, props, props.store);
18
17
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
19
18
  const initialState = {
20
- value: _BTUHABP4cjs.defaultValue.call(void 0,
19
+ value: _MLCPLY2Pcjs.defaultValue.call(void 0,
21
20
  props.value,
22
21
  syncState == null ? void 0 : syncState.value,
23
22
  props.defaultValue,
24
23
  false
25
24
  )
26
25
  };
27
- const checkbox = _3QF3ODTRcjs.createStore.call(void 0, initialState, props.store);
28
- return _3IVNQNIVcjs.__spreadProps.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, checkbox), {
26
+ const checkbox = _BSLRW6E7cjs.createStore.call(void 0, initialState, props.store);
27
+ return _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, checkbox), {
29
28
  setValue: (value) => checkbox.setState("value", value)
30
29
  });
31
30
  }
@@ -1,11 +1,10 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
+ var _G2NIRMCLcjs = require('../__chunks/G2NIRMCL.cjs');
4
+ require('../__chunks/BSLRW6E7.cjs');
5
+ require('../__chunks/MLCPLY2P.cjs');
6
+ require('../__chunks/WCFMOJKV.cjs');
7
+ require('../__chunks/7EQBAZ46.cjs');
3
8
 
4
- var _CCI5VM7Ecjs = require('../__chunks/CCI5VM7E.cjs');
5
- require('../__chunks/3QF3ODTR.cjs');
6
- require('../__chunks/BTUHABP4.cjs');
7
- require('../__chunks/7WYII4AN.cjs');
8
- require('../__chunks/3IVNQNIV.cjs');
9
9
 
10
-
11
- exports.createCollectionStore = _CCI5VM7Ecjs.createCollectionStore;
10
+ exports.createCollectionStore = _G2NIRMCLcjs.createCollectionStore;
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
+ var _A47DWKLRcjs = require('../__chunks/A47DWKLR.cjs');
4
+ require('../__chunks/G2NIRMCL.cjs');
5
+ require('../__chunks/GDZQUFNP.cjs');
3
6
 
4
- var _PW36G76Lcjs = require('../__chunks/PW36G76L.cjs');
5
- require('../__chunks/CCI5VM7E.cjs');
6
- require('../__chunks/ULSPM3Y3.cjs');
7
7
 
8
+ var _C5P5S22Jcjs = require('../__chunks/C5P5S22J.cjs');
9
+ require('../__chunks/I2G6EN27.cjs');
10
+ require('../__chunks/G2MFLTB2.cjs');
8
11
 
9
- var _H6ZQSQQLcjs = require('../__chunks/H6ZQSQQL.cjs');
10
- require('../__chunks/N667HVED.cjs');
11
- require('../__chunks/QLWAGBAQ.cjs');
12
12
 
13
13
 
14
14
 
@@ -16,75 +16,74 @@ require('../__chunks/QLWAGBAQ.cjs');
16
16
 
17
17
 
18
18
 
19
+ var _BSLRW6E7cjs = require('../__chunks/BSLRW6E7.cjs');
19
20
 
20
- var _3QF3ODTRcjs = require('../__chunks/3QF3ODTR.cjs');
21
21
 
22
22
 
23
+ var _MLCPLY2Pcjs = require('../__chunks/MLCPLY2P.cjs');
23
24
 
24
- var _BTUHABP4cjs = require('../__chunks/BTUHABP4.cjs');
25
25
 
26
26
 
27
+ var _TEPPO3KCcjs = require('../__chunks/TEPPO3KC.cjs');
28
+ require('../__chunks/WCFMOJKV.cjs');
27
29
 
28
- var _KCEXELK7cjs = require('../__chunks/KCEXELK7.cjs');
29
- require('../__chunks/7WYII4AN.cjs');
30
30
 
31
31
 
32
32
 
33
-
34
- var _3IVNQNIVcjs = require('../__chunks/3IVNQNIV.cjs');
33
+ var _7EQBAZ46cjs = require('../__chunks/7EQBAZ46.cjs');
35
34
 
36
35
  // src/combobox/combobox-store.ts
37
- var isTouchSafari = _KCEXELK7cjs.isSafari.call(void 0, ) && _KCEXELK7cjs.isTouchDevice.call(void 0, );
36
+ var isTouchSafari = _TEPPO3KCcjs.isSafari.call(void 0, ) && _TEPPO3KCcjs.isTouchDevice.call(void 0, );
38
37
  function createComboboxStore(_a = {}) {
39
38
  var _b = _a, {
40
39
  tag
41
- } = _b, props = _3IVNQNIVcjs.__objRest.call(void 0, _b, [
40
+ } = _b, props = _7EQBAZ46cjs.__objRest.call(void 0, _b, [
42
41
  "tag"
43
42
  ]);
44
- const store = _3QF3ODTRcjs.mergeStore.call(void 0, props.store, _3QF3ODTRcjs.pick.call(void 0, tag, ["value", "rtl"]));
45
- _3QF3ODTRcjs.throwOnConflictingProps.call(void 0, props, store);
43
+ const store = _BSLRW6E7cjs.mergeStore.call(void 0, props.store, _BSLRW6E7cjs.pick.call(void 0, tag, ["value", "rtl"]));
44
+ _BSLRW6E7cjs.throwOnConflictingProps.call(void 0, props, store);
46
45
  const tagState = tag == null ? void 0 : tag.getState();
47
46
  const syncState = store == null ? void 0 : store.getState();
48
- const activeId = _BTUHABP4cjs.defaultValue.call(void 0,
47
+ const activeId = _MLCPLY2Pcjs.defaultValue.call(void 0,
49
48
  props.activeId,
50
49
  syncState == null ? void 0 : syncState.activeId,
51
50
  props.defaultActiveId,
52
51
  null
53
52
  );
54
- const composite = _PW36G76Lcjs.createCompositeStore.call(void 0, _3IVNQNIVcjs.__spreadProps.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, props), {
53
+ const composite = _A47DWKLRcjs.createCompositeStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
55
54
  activeId,
56
- includesBaseElement: _BTUHABP4cjs.defaultValue.call(void 0,
55
+ includesBaseElement: _MLCPLY2Pcjs.defaultValue.call(void 0,
57
56
  props.includesBaseElement,
58
57
  syncState == null ? void 0 : syncState.includesBaseElement,
59
58
  true
60
59
  ),
61
- orientation: _BTUHABP4cjs.defaultValue.call(void 0,
60
+ orientation: _MLCPLY2Pcjs.defaultValue.call(void 0,
62
61
  props.orientation,
63
62
  syncState == null ? void 0 : syncState.orientation,
64
63
  "vertical"
65
64
  ),
66
- focusLoop: _BTUHABP4cjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true),
67
- focusWrap: _BTUHABP4cjs.defaultValue.call(void 0, props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, true),
68
- virtualFocus: _BTUHABP4cjs.defaultValue.call(void 0,
65
+ focusLoop: _MLCPLY2Pcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true),
66
+ focusWrap: _MLCPLY2Pcjs.defaultValue.call(void 0, props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, true),
67
+ virtualFocus: _MLCPLY2Pcjs.defaultValue.call(void 0,
69
68
  props.virtualFocus,
70
69
  syncState == null ? void 0 : syncState.virtualFocus,
71
70
  true
72
71
  )
73
72
  }));
74
- const popover = _H6ZQSQQLcjs.createPopoverStore.call(void 0, _3IVNQNIVcjs.__spreadProps.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, props), {
75
- placement: _BTUHABP4cjs.defaultValue.call(void 0,
73
+ const popover = _C5P5S22Jcjs.createPopoverStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
74
+ placement: _MLCPLY2Pcjs.defaultValue.call(void 0,
76
75
  props.placement,
77
76
  syncState == null ? void 0 : syncState.placement,
78
77
  "bottom-start"
79
78
  )
80
79
  }));
81
- const value = _BTUHABP4cjs.defaultValue.call(void 0,
80
+ const value = _MLCPLY2Pcjs.defaultValue.call(void 0,
82
81
  props.value,
83
82
  syncState == null ? void 0 : syncState.value,
84
83
  props.defaultValue,
85
84
  ""
86
85
  );
87
- const selectedValue = _BTUHABP4cjs.defaultValue.call(void 0,
86
+ const selectedValue = _MLCPLY2Pcjs.defaultValue.call(void 0,
88
87
  props.selectedValue,
89
88
  syncState == null ? void 0 : syncState.selectedValue,
90
89
  tagState == null ? void 0 : tagState.values,
@@ -92,76 +91,76 @@ function createComboboxStore(_a = {}) {
92
91
  ""
93
92
  );
94
93
  const multiSelectable = Array.isArray(selectedValue);
95
- const initialState = _3IVNQNIVcjs.__spreadProps.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, composite.getState()), popover.getState()), {
94
+ const initialState = _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, composite.getState()), popover.getState()), {
96
95
  value,
97
96
  selectedValue,
98
- resetValueOnSelect: _BTUHABP4cjs.defaultValue.call(void 0,
97
+ resetValueOnSelect: _MLCPLY2Pcjs.defaultValue.call(void 0,
99
98
  props.resetValueOnSelect,
100
99
  syncState == null ? void 0 : syncState.resetValueOnSelect,
101
100
  multiSelectable
102
101
  ),
103
- resetValueOnHide: _BTUHABP4cjs.defaultValue.call(void 0,
102
+ resetValueOnHide: _MLCPLY2Pcjs.defaultValue.call(void 0,
104
103
  props.resetValueOnHide,
105
104
  syncState == null ? void 0 : syncState.resetValueOnHide,
106
105
  multiSelectable && !tag
107
106
  ),
108
107
  activeValue: syncState == null ? void 0 : syncState.activeValue
109
108
  });
110
- const combobox = _3QF3ODTRcjs.createStore.call(void 0, initialState, composite, popover, store);
109
+ const combobox = _BSLRW6E7cjs.createStore.call(void 0, initialState, composite, popover, store);
111
110
  if (isTouchSafari) {
112
- _3QF3ODTRcjs.setup.call(void 0,
111
+ _BSLRW6E7cjs.setup.call(void 0,
113
112
  combobox,
114
- () => _3QF3ODTRcjs.sync.call(void 0, combobox, ["virtualFocus"], () => {
113
+ () => _BSLRW6E7cjs.sync.call(void 0, combobox, ["virtualFocus"], () => {
115
114
  combobox.setState("virtualFocus", false);
116
115
  })
117
116
  );
118
117
  }
119
- _3QF3ODTRcjs.setup.call(void 0, combobox, () => {
118
+ _BSLRW6E7cjs.setup.call(void 0, combobox, () => {
120
119
  if (!tag) return;
121
- return _BTUHABP4cjs.chain.call(void 0,
122
- _3QF3ODTRcjs.sync.call(void 0, combobox, ["selectedValue"], (state) => {
120
+ return _MLCPLY2Pcjs.chain.call(void 0,
121
+ _BSLRW6E7cjs.sync.call(void 0, combobox, ["selectedValue"], (state) => {
123
122
  if (!Array.isArray(state.selectedValue)) return;
124
123
  tag.setValues(state.selectedValue);
125
124
  }),
126
- _3QF3ODTRcjs.sync.call(void 0, tag, ["values"], (state) => {
125
+ _BSLRW6E7cjs.sync.call(void 0, tag, ["values"], (state) => {
127
126
  combobox.setState("selectedValue", state.values);
128
127
  })
129
128
  );
130
129
  });
131
- _3QF3ODTRcjs.setup.call(void 0,
130
+ _BSLRW6E7cjs.setup.call(void 0,
132
131
  combobox,
133
- () => _3QF3ODTRcjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
132
+ () => _BSLRW6E7cjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
134
133
  if (!state.resetValueOnHide) return;
135
134
  if (state.mounted) return;
136
135
  combobox.setState("value", value);
137
136
  })
138
137
  );
139
- _3QF3ODTRcjs.setup.call(void 0,
138
+ _BSLRW6E7cjs.setup.call(void 0,
140
139
  combobox,
141
- () => _3QF3ODTRcjs.sync.call(void 0, combobox, ["open"], (state) => {
140
+ () => _BSLRW6E7cjs.sync.call(void 0, combobox, ["open"], (state) => {
142
141
  if (state.open) return;
143
142
  combobox.setState("activeId", activeId);
144
143
  combobox.setState("moves", 0);
145
144
  })
146
145
  );
147
- _3QF3ODTRcjs.setup.call(void 0,
146
+ _BSLRW6E7cjs.setup.call(void 0,
148
147
  combobox,
149
- () => _3QF3ODTRcjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
148
+ () => _BSLRW6E7cjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
150
149
  if (state.moves === prevState.moves) {
151
150
  combobox.setState("activeValue", void 0);
152
151
  }
153
152
  })
154
153
  );
155
- _3QF3ODTRcjs.setup.call(void 0,
154
+ _BSLRW6E7cjs.setup.call(void 0,
156
155
  combobox,
157
- () => _3QF3ODTRcjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
156
+ () => _BSLRW6E7cjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
158
157
  if (state.moves === prev.moves) return;
159
158
  const { activeId: activeId2 } = combobox.getState();
160
159
  const activeItem = composite.item(activeId2);
161
160
  combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
162
161
  })
163
162
  );
164
- return _3IVNQNIVcjs.__spreadProps.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, popover), composite), combobox), {
163
+ return _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, popover), composite), combobox), {
165
164
  tag,
166
165
  setValue: (value2) => combobox.setState("value", value2),
167
166
  resetValue: () => combobox.setState("value", initialState.value),
@@ -1,16 +1,15 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _H6ZQSQQLcjs = require('../__chunks/H6ZQSQQL.cjs');
5
- require('../__chunks/N667HVED.cjs');
6
- require('../__chunks/QLWAGBAQ.cjs');
7
- require('../__chunks/3QF3ODTR.cjs');
8
- require('../__chunks/BTUHABP4.cjs');
9
- require('../__chunks/3IVNQNIV.cjs');
3
+ var _C5P5S22Jcjs = require('../__chunks/C5P5S22J.cjs');
4
+ require('../__chunks/I2G6EN27.cjs');
5
+ require('../__chunks/G2MFLTB2.cjs');
6
+ require('../__chunks/BSLRW6E7.cjs');
7
+ require('../__chunks/MLCPLY2P.cjs');
8
+ require('../__chunks/7EQBAZ46.cjs');
10
9
 
11
10
  // src/composite/composite-overflow-store.ts
12
11
  function createCompositeOverflowStore(props = {}) {
13
- return _H6ZQSQQLcjs.createPopoverStore.call(void 0, props);
12
+ return _C5P5S22Jcjs.createPopoverStore.call(void 0, props);
14
13
  }
15
14
 
16
15
 
@@ -1,13 +1,12 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
+ var _A47DWKLRcjs = require('../__chunks/A47DWKLR.cjs');
4
+ require('../__chunks/G2NIRMCL.cjs');
5
+ require('../__chunks/GDZQUFNP.cjs');
6
+ require('../__chunks/BSLRW6E7.cjs');
7
+ require('../__chunks/MLCPLY2P.cjs');
8
+ require('../__chunks/WCFMOJKV.cjs');
9
+ require('../__chunks/7EQBAZ46.cjs');
3
10
 
4
- var _PW36G76Lcjs = require('../__chunks/PW36G76L.cjs');
5
- require('../__chunks/CCI5VM7E.cjs');
6
- require('../__chunks/ULSPM3Y3.cjs');
7
- require('../__chunks/3QF3ODTR.cjs');
8
- require('../__chunks/BTUHABP4.cjs');
9
- require('../__chunks/7WYII4AN.cjs');
10
- require('../__chunks/3IVNQNIV.cjs');
11
11
 
12
-
13
- exports.createCompositeStore = _PW36G76Lcjs.createCompositeStore;
12
+ exports.createCompositeStore = _A47DWKLRcjs.createCompositeStore;