@ariakit/core 0.4.6 → 0.4.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.
Files changed (75) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/cjs/__chunks/{4W3OYRR3.cjs → 3COGJMN3.cjs} +9 -9
  3. package/cjs/__chunks/{B4AKUC4S.cjs → 5BQ2XS3R.cjs} +4 -4
  4. package/cjs/__chunks/{LTLFSC4X.cjs → DIYYVJDK.cjs} +2 -2
  5. package/cjs/__chunks/{AETQC2AR.cjs → LAYUSNGM.cjs} +11 -11
  6. package/cjs/__chunks/{3HYNC3XA.cjs → LBFF2BBK.cjs} +6 -6
  7. package/cjs/__chunks/{B4LYZ4EM.cjs → M2NNCFIJ.cjs} +13 -11
  8. package/cjs/__chunks/{5JEQEZFR.cjs → MB5TLEVH.cjs} +7 -7
  9. package/cjs/__chunks/{UEZLSKZ4.cjs → XVL5HZ27.cjs} +4 -4
  10. package/cjs/checkbox/checkbox-store.cjs +3 -3
  11. package/cjs/collection/collection-store.cjs +3 -3
  12. package/cjs/combobox/combobox-store.cjs +24 -24
  13. package/cjs/combobox/combobox-store.d.cts +2 -0
  14. package/cjs/combobox/combobox-store.d.ts +2 -0
  15. package/cjs/composite/composite-overflow-store.cjs +5 -5
  16. package/cjs/composite/composite-store.cjs +4 -4
  17. package/cjs/composite/composite-store.d.cts +5 -1
  18. package/cjs/composite/composite-store.d.ts +5 -1
  19. package/cjs/dialog/dialog-store.cjs +4 -4
  20. package/cjs/disclosure/disclosure-store.cjs +3 -3
  21. package/cjs/form/form-store.cjs +7 -7
  22. package/cjs/hovercard/hovercard-store.cjs +6 -6
  23. package/cjs/menu/menu-bar-store.cjs +5 -5
  24. package/cjs/menu/menu-store.cjs +18 -18
  25. package/cjs/menubar/menubar-store.cjs +5 -5
  26. package/cjs/popover/popover-store.cjs +5 -5
  27. package/cjs/radio/radio-store.cjs +5 -5
  28. package/cjs/select/select-store.cjs +20 -20
  29. package/cjs/select/select-store.d.cts +2 -0
  30. package/cjs/select/select-store.d.ts +2 -0
  31. package/cjs/tab/tab-store.cjs +23 -23
  32. package/cjs/tab/tab-store.d.cts +10 -4
  33. package/cjs/tab/tab-store.d.ts +10 -4
  34. package/cjs/tag/tag-store.cjs +7 -7
  35. package/cjs/toolbar/toolbar-store.cjs +4 -4
  36. package/cjs/tooltip/tooltip-store.cjs +7 -7
  37. package/cjs/utils/events.cjs +3 -1
  38. package/cjs/utils/focus.cjs +7 -3
  39. package/cjs/utils/store.cjs +2 -2
  40. package/esm/__chunks/{BRS7GKWU.js → E4HA32QI.js} +2 -2
  41. package/esm/__chunks/{EQPTKGFA.js → I2WJ7JBQ.js} +1 -1
  42. package/esm/__chunks/{WCKXDMU7.js → KDSZSVV5.js} +1 -1
  43. package/esm/__chunks/{R676XYVY.js → KLPDXTDE.js} +13 -11
  44. package/esm/__chunks/{5RJNXXU2.js → NWACXGIN.js} +1 -1
  45. package/esm/__chunks/{P3MTNH46.js → RCLYDUHE.js} +2 -2
  46. package/esm/__chunks/{MFZZDIHG.js → SAZZJI72.js} +2 -2
  47. package/esm/__chunks/{PBSSD2DM.js → VH2P7HEP.js} +2 -2
  48. package/esm/checkbox/checkbox-store.js +1 -1
  49. package/esm/collection/collection-store.js +2 -2
  50. package/esm/combobox/combobox-store.d.ts +2 -0
  51. package/esm/combobox/combobox-store.js +6 -6
  52. package/esm/composite/composite-overflow-store.js +4 -4
  53. package/esm/composite/composite-store.d.ts +5 -1
  54. package/esm/composite/composite-store.js +3 -3
  55. package/esm/dialog/dialog-store.js +3 -3
  56. package/esm/disclosure/disclosure-store.js +2 -2
  57. package/esm/form/form-store.js +2 -2
  58. package/esm/hovercard/hovercard-store.js +5 -5
  59. package/esm/menu/menu-bar-store.js +4 -4
  60. package/esm/menu/menu-store.js +7 -7
  61. package/esm/menubar/menubar-store.js +4 -4
  62. package/esm/popover/popover-store.js +4 -4
  63. package/esm/radio/radio-store.js +3 -3
  64. package/esm/select/select-store.d.ts +2 -0
  65. package/esm/select/select-store.js +6 -6
  66. package/esm/tab/tab-store.d.ts +10 -4
  67. package/esm/tab/tab-store.js +3 -3
  68. package/esm/tag/tag-store.js +3 -3
  69. package/esm/toolbar/toolbar-store.js +3 -3
  70. package/esm/tooltip/tooltip-store.js +5 -5
  71. package/esm/utils/events.js +3 -1
  72. package/esm/utils/focus.js +7 -3
  73. package/esm/utils/store.js +1 -1
  74. package/package.json +2 -2
  75. package/.eslintignore +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @ariakit/core
2
2
 
3
+ ## 0.4.7
4
+
5
+ - Improved JSDocs.
6
+
3
7
  ## 0.4.6
4
8
 
5
9
  - Ensured [Combobox](https://ariakit.org/components/combobox) uses roving tabindex to manage focus on mobile Safari.
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
 
8
- var _B4LYZ4EMcjs = require('./B4LYZ4EM.cjs');
8
+ var _M2NNCFIJcjs = require('./M2NNCFIJ.cjs');
9
9
 
10
10
 
11
11
 
@@ -69,7 +69,7 @@ function getPrivateStore(store) {
69
69
  }
70
70
  function createCollectionStore(props = {}) {
71
71
  var _a;
72
- _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, props.store);
72
+ _M2NNCFIJcjs.throwOnConflictingProps.call(void 0, props, props.store);
73
73
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
74
74
  const items = _EEDWPDM2cjs.defaultValue.call(void 0,
75
75
  props.items,
@@ -83,24 +83,24 @@ function createCollectionStore(props = {}) {
83
83
  renderedItems: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.renderedItems, [])
84
84
  };
85
85
  const syncPrivateStore = getPrivateStore(props.store);
86
- const privateStore = _B4LYZ4EMcjs.createStore.call(void 0,
86
+ const privateStore = _M2NNCFIJcjs.createStore.call(void 0,
87
87
  { items, renderedItems: initialState.renderedItems },
88
88
  syncPrivateStore
89
89
  );
90
- const collection = _B4LYZ4EMcjs.createStore.call(void 0, initialState, props.store);
90
+ const collection = _M2NNCFIJcjs.createStore.call(void 0, initialState, props.store);
91
91
  const sortItems = (renderedItems) => {
92
92
  const sortedItems = sortBasedOnDOMPosition(renderedItems);
93
93
  privateStore.setState("renderedItems", sortedItems);
94
94
  collection.setState("renderedItems", sortedItems);
95
95
  };
96
- _B4LYZ4EMcjs.setup.call(void 0, collection, () => _B4LYZ4EMcjs.init.call(void 0, privateStore));
97
- _B4LYZ4EMcjs.setup.call(void 0, privateStore, () => {
98
- return _B4LYZ4EMcjs.batch.call(void 0, privateStore, ["items"], (state) => {
96
+ _M2NNCFIJcjs.setup.call(void 0, collection, () => _M2NNCFIJcjs.init.call(void 0, privateStore));
97
+ _M2NNCFIJcjs.setup.call(void 0, privateStore, () => {
98
+ return _M2NNCFIJcjs.batch.call(void 0, privateStore, ["items"], (state) => {
99
99
  collection.setState("items", state.items);
100
100
  });
101
101
  });
102
- _B4LYZ4EMcjs.setup.call(void 0, privateStore, () => {
103
- return _B4LYZ4EMcjs.batch.call(void 0, privateStore, ["renderedItems"], (state) => {
102
+ _M2NNCFIJcjs.setup.call(void 0, privateStore, () => {
103
+ return _M2NNCFIJcjs.batch.call(void 0, privateStore, ["renderedItems"], (state) => {
104
104
  let firstRun = true;
105
105
  let raf = requestAnimationFrame(() => {
106
106
  const { renderedItems } = collection.getState();
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _3HYNC3XAcjs = require('./3HYNC3XA.cjs');
4
+ var _LBFF2BBKcjs = require('./LBFF2BBK.cjs');
5
5
 
6
6
 
7
- var _B4LYZ4EMcjs = require('./B4LYZ4EM.cjs');
7
+ var _M2NNCFIJcjs = require('./M2NNCFIJ.cjs');
8
8
 
9
9
 
10
10
  var _EEDWPDM2cjs = require('./EEDWPDM2.cjs');
@@ -17,7 +17,7 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
17
17
  function createMenubarStore(props = {}) {
18
18
  var _a;
19
19
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
20
- const composite = _3HYNC3XAcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
20
+ const composite = _LBFF2BBKcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
21
21
  orientation: _EEDWPDM2cjs.defaultValue.call(void 0,
22
22
  props.orientation,
23
23
  syncState == null ? void 0 : syncState.orientation,
@@ -26,7 +26,7 @@ function createMenubarStore(props = {}) {
26
26
  focusLoop: _EEDWPDM2cjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
27
27
  }));
28
28
  const initialState = _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState());
29
- const menubar = _B4LYZ4EMcjs.createStore.call(void 0, initialState, composite, props.store);
29
+ const menubar = _M2NNCFIJcjs.createStore.call(void 0, initialState, composite, props.store);
30
30
  return _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite), menubar);
31
31
  }
32
32
 
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _AETQC2ARcjs = require('./AETQC2AR.cjs');
4
+ var _LAYUSNGMcjs = require('./LAYUSNGM.cjs');
5
5
 
6
6
  // src/dialog/dialog-store.ts
7
7
  function createDialogStore(props = {}) {
8
- return _AETQC2ARcjs.createDisclosureStore.call(void 0, props);
8
+ return _LAYUSNGMcjs.createDisclosureStore.call(void 0, props);
9
9
  }
10
10
 
11
11
 
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _B4LYZ4EMcjs = require('./B4LYZ4EM.cjs');
10
+ var _M2NNCFIJcjs = require('./M2NNCFIJ.cjs');
11
11
 
12
12
 
13
13
  var _EEDWPDM2cjs = require('./EEDWPDM2.cjs');
@@ -18,11 +18,11 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
18
18
 
19
19
  // src/disclosure/disclosure-store.ts
20
20
  function createDisclosureStore(props = {}) {
21
- const store = _B4LYZ4EMcjs.mergeStore.call(void 0,
21
+ const store = _M2NNCFIJcjs.mergeStore.call(void 0,
22
22
  props.store,
23
- _B4LYZ4EMcjs.omit.call(void 0, props.disclosure, ["contentElement", "disclosureElement"])
23
+ _M2NNCFIJcjs.omit.call(void 0, props.disclosure, ["contentElement", "disclosureElement"])
24
24
  );
25
- _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, store);
25
+ _M2NNCFIJcjs.throwOnConflictingProps.call(void 0, props, store);
26
26
  const syncState = store == null ? void 0 : store.getState();
27
27
  const open = _EEDWPDM2cjs.defaultValue.call(void 0,
28
28
  props.open,
@@ -39,26 +39,26 @@ function createDisclosureStore(props = {}) {
39
39
  contentElement: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.contentElement, null),
40
40
  disclosureElement: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.disclosureElement, null)
41
41
  };
42
- const disclosure = _B4LYZ4EMcjs.createStore.call(void 0, initialState, store);
43
- _B4LYZ4EMcjs.setup.call(void 0,
42
+ const disclosure = _M2NNCFIJcjs.createStore.call(void 0, initialState, store);
43
+ _M2NNCFIJcjs.setup.call(void 0,
44
44
  disclosure,
45
- () => _B4LYZ4EMcjs.sync.call(void 0, disclosure, ["animated", "animating"], (state) => {
45
+ () => _M2NNCFIJcjs.sync.call(void 0, disclosure, ["animated", "animating"], (state) => {
46
46
  if (state.animated)
47
47
  return;
48
48
  disclosure.setState("animating", false);
49
49
  })
50
50
  );
51
- _B4LYZ4EMcjs.setup.call(void 0,
51
+ _M2NNCFIJcjs.setup.call(void 0,
52
52
  disclosure,
53
- () => _B4LYZ4EMcjs.subscribe.call(void 0, disclosure, ["open"], () => {
53
+ () => _M2NNCFIJcjs.subscribe.call(void 0, disclosure, ["open"], () => {
54
54
  if (!disclosure.getState().animated)
55
55
  return;
56
56
  disclosure.setState("animating", true);
57
57
  })
58
58
  );
59
- _B4LYZ4EMcjs.setup.call(void 0,
59
+ _M2NNCFIJcjs.setup.call(void 0,
60
60
  disclosure,
61
- () => _B4LYZ4EMcjs.sync.call(void 0, disclosure, ["open", "animating"], (state) => {
61
+ () => _M2NNCFIJcjs.sync.call(void 0, disclosure, ["open", "animating"], (state) => {
62
62
  disclosure.setState("mounted", state.open || state.animating);
63
63
  })
64
64
  );
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _4W3OYRR3cjs = require('./4W3OYRR3.cjs');
4
+ var _3COGJMN3cjs = require('./3COGJMN3.cjs');
5
5
 
6
6
 
7
7
 
@@ -10,7 +10,7 @@ var _ULSPM3Y3cjs = require('./ULSPM3Y3.cjs');
10
10
 
11
11
 
12
12
 
13
- var _B4LYZ4EMcjs = require('./B4LYZ4EM.cjs');
13
+ var _M2NNCFIJcjs = require('./M2NNCFIJ.cjs');
14
14
 
15
15
 
16
16
  var _EEDWPDM2cjs = require('./EEDWPDM2.cjs');
@@ -124,7 +124,7 @@ function verticalizeItems(items) {
124
124
  function createCompositeStore(props = {}) {
125
125
  var _a;
126
126
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
127
- const collection = _4W3OYRR3cjs.createCollectionStore.call(void 0, props);
127
+ const collection = _3COGJMN3cjs.createCollectionStore.call(void 0, props);
128
128
  const activeId = _EEDWPDM2cjs.defaultValue.call(void 0,
129
129
  props.activeId,
130
130
  syncState == null ? void 0 : syncState.activeId,
@@ -154,10 +154,10 @@ function createCompositeStore(props = {}) {
154
154
  focusWrap: _EEDWPDM2cjs.defaultValue.call(void 0, props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
155
155
  focusShift: _EEDWPDM2cjs.defaultValue.call(void 0, props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
156
156
  });
157
- const composite = _B4LYZ4EMcjs.createStore.call(void 0, initialState, collection, props.store);
158
- _B4LYZ4EMcjs.setup.call(void 0,
157
+ const composite = _M2NNCFIJcjs.createStore.call(void 0, initialState, collection, props.store);
158
+ _M2NNCFIJcjs.setup.call(void 0,
159
159
  composite,
160
- () => _B4LYZ4EMcjs.sync.call(void 0, composite, ["renderedItems", "activeId"], (state) => {
160
+ () => _M2NNCFIJcjs.sync.call(void 0, composite, ["renderedItems", "activeId"], (state) => {
161
161
  composite.setState("activeId", (activeId2) => {
162
162
  var _a2;
163
163
  if (activeId2 !== void 0)
@@ -70,7 +70,9 @@ function createStore(initialState, ...stores) {
70
70
  )
71
71
  );
72
72
  const teardowns = [];
73
- setups.forEach((setup2) => teardowns.push(setup2()));
73
+ for (const setup2 of setups) {
74
+ teardowns.push(setup2());
75
+ }
74
76
  const cleanups = stores.map(init);
75
77
  destroy = _EEDWPDM2cjs.chain.call(void 0, ...desyncs, ...teardowns, ...cleanups);
76
78
  return maybeDestroy;
@@ -99,16 +101,16 @@ function createStore(initialState, ...stores) {
99
101
  const storeOmit = (keys) => createStore(_EEDWPDM2cjs.omit.call(void 0, state, keys), finalStore);
100
102
  const getState = () => state;
101
103
  const setState = (key, value, fromStores = false) => {
104
+ var _a;
102
105
  if (!_EEDWPDM2cjs.hasOwnProperty.call(void 0, state, key))
103
106
  return;
104
107
  const nextValue = _EEDWPDM2cjs.applyState.call(void 0, value, state[key]);
105
108
  if (nextValue === state[key])
106
109
  return;
107
110
  if (!fromStores) {
108
- stores.forEach((store) => {
109
- var _a;
111
+ for (const store of stores) {
110
112
  (_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue);
111
- });
113
+ }
112
114
  }
113
115
  const prevState = state;
114
116
  state = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, state), { [key]: nextValue });
@@ -116,24 +118,24 @@ function createStore(initialState, ...stores) {
116
118
  lastUpdate = thisUpdate;
117
119
  updatedKeys.add(key);
118
120
  const run = (listener, prev, uKeys) => {
119
- var _a;
121
+ var _a2;
120
122
  const keys = listenerKeys.get(listener);
121
123
  const updated = (k) => uKeys ? uKeys.has(k) : k === key;
122
124
  if (!keys || keys.some(updated)) {
123
- (_a = disposables.get(listener)) == null ? void 0 : _a();
125
+ (_a2 = disposables.get(listener)) == null ? void 0 : _a2();
124
126
  disposables.set(listener, listener(state, prev));
125
127
  }
126
128
  };
127
- listeners.forEach((listener) => {
129
+ for (const listener of listeners) {
128
130
  run(listener, prevState);
129
- });
131
+ }
130
132
  queueMicrotask(() => {
131
133
  if (lastUpdate !== thisUpdate)
132
134
  return;
133
135
  const snapshot = state;
134
- batchListeners.forEach((listener) => {
136
+ for (const listener of batchListeners) {
135
137
  run(listener, prevStateBatch, updatedKeys);
136
- });
138
+ }
137
139
  prevStateBatch = snapshot;
138
140
  updatedKeys.clear();
139
141
  });
@@ -194,7 +196,7 @@ function mergeStore(...stores) {
194
196
  const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2);
195
197
  if (!nextState)
196
198
  return state;
197
- return _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, state), nextState);
199
+ return Object.assign(state, nextState);
198
200
  }, {});
199
201
  const store = createStore(initialState, ...stores);
200
202
  return store;
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _LTLFSC4Xcjs = require('./LTLFSC4X.cjs');
4
+ var _DIYYVJDKcjs = require('./DIYYVJDK.cjs');
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _B4LYZ4EMcjs = require('./B4LYZ4EM.cjs');
10
+ var _M2NNCFIJcjs = require('./M2NNCFIJ.cjs');
11
11
 
12
12
 
13
13
  var _EEDWPDM2cjs = require('./EEDWPDM2.cjs');
@@ -24,9 +24,9 @@ function createPopoverStore(_a = {}) {
24
24
  } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, [
25
25
  "popover"
26
26
  ]);
27
- const store = _B4LYZ4EMcjs.mergeStore.call(void 0,
27
+ const store = _M2NNCFIJcjs.mergeStore.call(void 0,
28
28
  props.store,
29
- _B4LYZ4EMcjs.omit.call(void 0, otherPopover, [
29
+ _M2NNCFIJcjs.omit.call(void 0, otherPopover, [
30
30
  "arrowElement",
31
31
  "anchorElement",
32
32
  "contentElement",
@@ -34,9 +34,9 @@ function createPopoverStore(_a = {}) {
34
34
  "disclosureElement"
35
35
  ])
36
36
  );
37
- _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, store);
37
+ _M2NNCFIJcjs.throwOnConflictingProps.call(void 0, props, store);
38
38
  const syncState = store == null ? void 0 : store.getState();
39
- const dialog = _LTLFSC4Xcjs.createDialogStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), { store }));
39
+ const dialog = _DIYYVJDKcjs.createDialogStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), { store }));
40
40
  const placement = _EEDWPDM2cjs.defaultValue.call(void 0,
41
41
  props.placement,
42
42
  syncState == null ? void 0 : syncState.placement,
@@ -50,7 +50,7 @@ function createPopoverStore(_a = {}) {
50
50
  arrowElement: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.arrowElement, null),
51
51
  rendered: Symbol("rendered")
52
52
  });
53
- const popover = _B4LYZ4EMcjs.createStore.call(void 0, initialState, dialog, store);
53
+ const popover = _M2NNCFIJcjs.createStore.call(void 0, initialState, dialog, store);
54
54
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, dialog), popover), {
55
55
  setAnchorElement: (element) => popover.setState("anchorElement", element),
56
56
  setPopoverElement: (element) => popover.setState("popoverElement", element),
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _5JEQEZFRcjs = require('./5JEQEZFR.cjs');
4
+ var _MB5TLEVHcjs = require('./MB5TLEVH.cjs');
5
5
 
6
6
 
7
- var _B4LYZ4EMcjs = require('./B4LYZ4EM.cjs');
7
+ var _M2NNCFIJcjs = require('./M2NNCFIJ.cjs');
8
8
 
9
9
 
10
10
  var _EEDWPDM2cjs = require('./EEDWPDM2.cjs');
@@ -17,7 +17,7 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
17
17
  function createHovercardStore(props = {}) {
18
18
  var _a;
19
19
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
20
- const popover = _5JEQEZFRcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
20
+ const popover = _MB5TLEVHcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
21
21
  placement: _EEDWPDM2cjs.defaultValue.call(void 0,
22
22
  props.placement,
23
23
  syncState == null ? void 0 : syncState.placement,
@@ -31,7 +31,7 @@ function createHovercardStore(props = {}) {
31
31
  hideTimeout: _EEDWPDM2cjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),
32
32
  autoFocusOnShow: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.autoFocusOnShow, false)
33
33
  });
34
- const hovercard = _B4LYZ4EMcjs.createStore.call(void 0, initialState, popover, props.store);
34
+ const hovercard = _M2NNCFIJcjs.createStore.call(void 0, initialState, popover, props.store);
35
35
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, popover), hovercard), {
36
36
  setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value)
37
37
  });
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
5
+ var _M2NNCFIJcjs = require('../__chunks/M2NNCFIJ.cjs');
6
6
 
7
7
 
8
8
  var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
@@ -14,7 +14,7 @@ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
14
14
  // src/checkbox/checkbox-store.ts
15
15
  function createCheckboxStore(props = {}) {
16
16
  var _a;
17
- _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, props.store);
17
+ _M2NNCFIJcjs.throwOnConflictingProps.call(void 0, props, props.store);
18
18
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
19
19
  const initialState = {
20
20
  value: _EEDWPDM2cjs.defaultValue.call(void 0,
@@ -24,7 +24,7 @@ function createCheckboxStore(props = {}) {
24
24
  false
25
25
  )
26
26
  };
27
- const checkbox = _B4LYZ4EMcjs.createStore.call(void 0, initialState, props.store);
27
+ const checkbox = _M2NNCFIJcjs.createStore.call(void 0, initialState, props.store);
28
28
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, checkbox), {
29
29
  setValue: (value) => checkbox.setState("value", value)
30
30
  });
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _4W3OYRR3cjs = require('../__chunks/4W3OYRR3.cjs');
5
- require('../__chunks/B4LYZ4EM.cjs');
4
+ var _3COGJMN3cjs = require('../__chunks/3COGJMN3.cjs');
5
+ require('../__chunks/M2NNCFIJ.cjs');
6
6
  require('../__chunks/EEDWPDM2.cjs');
7
7
  require('../__chunks/Q2WCPTYS.cjs');
8
8
  require('../__chunks/AV6KTKLE.cjs');
9
9
 
10
10
 
11
- exports.createCollectionStore = _4W3OYRR3cjs.createCollectionStore;
11
+ exports.createCollectionStore = _3COGJMN3cjs.createCollectionStore;
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _3HYNC3XAcjs = require('../__chunks/3HYNC3XA.cjs');
5
- require('../__chunks/4W3OYRR3.cjs');
4
+ var _LBFF2BBKcjs = require('../__chunks/LBFF2BBK.cjs');
5
+ require('../__chunks/3COGJMN3.cjs');
6
6
  require('../__chunks/ULSPM3Y3.cjs');
7
7
 
8
8
 
9
- var _5JEQEZFRcjs = require('../__chunks/5JEQEZFR.cjs');
10
- require('../__chunks/LTLFSC4X.cjs');
11
- require('../__chunks/AETQC2AR.cjs');
9
+ var _MB5TLEVHcjs = require('../__chunks/MB5TLEVH.cjs');
10
+ require('../__chunks/DIYYVJDK.cjs');
11
+ require('../__chunks/LAYUSNGM.cjs');
12
12
 
13
13
 
14
14
 
@@ -17,7 +17,7 @@ require('../__chunks/AETQC2AR.cjs');
17
17
 
18
18
 
19
19
 
20
- var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
20
+ var _M2NNCFIJcjs = require('../__chunks/M2NNCFIJ.cjs');
21
21
 
22
22
 
23
23
 
@@ -41,8 +41,8 @@ function createComboboxStore(_a = {}) {
41
41
  } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, [
42
42
  "tag"
43
43
  ]);
44
- const store = _B4LYZ4EMcjs.mergeStore.call(void 0, props.store, _B4LYZ4EMcjs.pick.call(void 0, tag, ["value", "rtl"]));
45
- _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, store);
44
+ const store = _M2NNCFIJcjs.mergeStore.call(void 0, props.store, _M2NNCFIJcjs.pick.call(void 0, tag, ["value", "rtl"]));
45
+ _M2NNCFIJcjs.throwOnConflictingProps.call(void 0, props, store);
46
46
  const tagState = tag == null ? void 0 : tag.getState();
47
47
  const syncState = store == null ? void 0 : store.getState();
48
48
  const activeId = _EEDWPDM2cjs.defaultValue.call(void 0,
@@ -51,7 +51,7 @@ function createComboboxStore(_a = {}) {
51
51
  props.defaultActiveId,
52
52
  null
53
53
  );
54
- const composite = _3HYNC3XAcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
54
+ const composite = _LBFF2BBKcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
55
55
  activeId,
56
56
  includesBaseElement: _EEDWPDM2cjs.defaultValue.call(void 0,
57
57
  props.includesBaseElement,
@@ -71,7 +71,7 @@ function createComboboxStore(_a = {}) {
71
71
  true
72
72
  )
73
73
  }));
74
- const popover = _5JEQEZFRcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
74
+ const popover = _MB5TLEVHcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
75
75
  placement: _EEDWPDM2cjs.defaultValue.call(void 0,
76
76
  props.placement,
77
77
  syncState == null ? void 0 : syncState.placement,
@@ -107,32 +107,32 @@ function createComboboxStore(_a = {}) {
107
107
  ),
108
108
  activeValue: syncState == null ? void 0 : syncState.activeValue
109
109
  });
110
- const combobox = _B4LYZ4EMcjs.createStore.call(void 0, initialState, composite, popover, store);
110
+ const combobox = _M2NNCFIJcjs.createStore.call(void 0, initialState, composite, popover, store);
111
111
  if (isTouchSafari) {
112
- _B4LYZ4EMcjs.setup.call(void 0,
112
+ _M2NNCFIJcjs.setup.call(void 0,
113
113
  combobox,
114
- () => _B4LYZ4EMcjs.sync.call(void 0, combobox, ["virtualFocus"], () => {
114
+ () => _M2NNCFIJcjs.sync.call(void 0, combobox, ["virtualFocus"], () => {
115
115
  combobox.setState("virtualFocus", false);
116
116
  })
117
117
  );
118
118
  }
119
- _B4LYZ4EMcjs.setup.call(void 0, combobox, () => {
119
+ _M2NNCFIJcjs.setup.call(void 0, combobox, () => {
120
120
  if (!tag)
121
121
  return;
122
122
  return _EEDWPDM2cjs.chain.call(void 0,
123
- _B4LYZ4EMcjs.sync.call(void 0, combobox, ["selectedValue"], (state) => {
123
+ _M2NNCFIJcjs.sync.call(void 0, combobox, ["selectedValue"], (state) => {
124
124
  if (!Array.isArray(state.selectedValue))
125
125
  return;
126
126
  tag.setValues(state.selectedValue);
127
127
  }),
128
- _B4LYZ4EMcjs.sync.call(void 0, tag, ["values"], (state) => {
128
+ _M2NNCFIJcjs.sync.call(void 0, tag, ["values"], (state) => {
129
129
  combobox.setState("selectedValue", state.values);
130
130
  })
131
131
  );
132
132
  });
133
- _B4LYZ4EMcjs.setup.call(void 0,
133
+ _M2NNCFIJcjs.setup.call(void 0,
134
134
  combobox,
135
- () => _B4LYZ4EMcjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
135
+ () => _M2NNCFIJcjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
136
136
  if (!state.resetValueOnHide)
137
137
  return;
138
138
  if (state.mounted)
@@ -140,26 +140,26 @@ function createComboboxStore(_a = {}) {
140
140
  combobox.setState("value", value);
141
141
  })
142
142
  );
143
- _B4LYZ4EMcjs.setup.call(void 0,
143
+ _M2NNCFIJcjs.setup.call(void 0,
144
144
  combobox,
145
- () => _B4LYZ4EMcjs.batch.call(void 0, combobox, ["mounted"], (state) => {
145
+ () => _M2NNCFIJcjs.batch.call(void 0, combobox, ["mounted"], (state) => {
146
146
  if (state.mounted)
147
147
  return;
148
148
  combobox.setState("activeId", activeId);
149
149
  combobox.setState("moves", 0);
150
150
  })
151
151
  );
152
- _B4LYZ4EMcjs.setup.call(void 0,
152
+ _M2NNCFIJcjs.setup.call(void 0,
153
153
  combobox,
154
- () => _B4LYZ4EMcjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
154
+ () => _M2NNCFIJcjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
155
155
  if (state.moves === prevState.moves) {
156
156
  combobox.setState("activeValue", void 0);
157
157
  }
158
158
  })
159
159
  );
160
- _B4LYZ4EMcjs.setup.call(void 0,
160
+ _M2NNCFIJcjs.setup.call(void 0,
161
161
  combobox,
162
- () => _B4LYZ4EMcjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
162
+ () => _M2NNCFIJcjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
163
163
  if (state.moves === prev.moves)
164
164
  return;
165
165
  const { activeId: activeId2 } = combobox.getState();
@@ -71,6 +71,8 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
71
71
  * - [Submenu with
72
72
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
73
73
  * - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
74
+ * - [Select with Combobox and
75
+ * Tabs](https://ariakit.org/examples/select-combobox-tab)
74
76
  */
75
77
  resetValueOnHide: boolean;
76
78
  /**
@@ -71,6 +71,8 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
71
71
  * - [Submenu with
72
72
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
73
73
  * - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
74
+ * - [Select with Combobox and
75
+ * Tabs](https://ariakit.org/examples/select-combobox-tab)
74
76
  */
75
77
  resetValueOnHide: boolean;
76
78
  /**
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _5JEQEZFRcjs = require('../__chunks/5JEQEZFR.cjs');
5
- require('../__chunks/LTLFSC4X.cjs');
6
- require('../__chunks/AETQC2AR.cjs');
7
- require('../__chunks/B4LYZ4EM.cjs');
4
+ var _MB5TLEVHcjs = require('../__chunks/MB5TLEVH.cjs');
5
+ require('../__chunks/DIYYVJDK.cjs');
6
+ require('../__chunks/LAYUSNGM.cjs');
7
+ require('../__chunks/M2NNCFIJ.cjs');
8
8
  require('../__chunks/EEDWPDM2.cjs');
9
9
  require('../__chunks/AV6KTKLE.cjs');
10
10
 
11
11
  // src/composite/composite-overflow-store.ts
12
12
  function createCompositeOverflowStore(props = {}) {
13
- return _5JEQEZFRcjs.createPopoverStore.call(void 0, props);
13
+ return _MB5TLEVHcjs.createPopoverStore.call(void 0, props);
14
14
  }
15
15
 
16
16
 
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _3HYNC3XAcjs = require('../__chunks/3HYNC3XA.cjs');
5
- require('../__chunks/4W3OYRR3.cjs');
4
+ var _LBFF2BBKcjs = require('../__chunks/LBFF2BBK.cjs');
5
+ require('../__chunks/3COGJMN3.cjs');
6
6
  require('../__chunks/ULSPM3Y3.cjs');
7
- require('../__chunks/B4LYZ4EM.cjs');
7
+ require('../__chunks/M2NNCFIJ.cjs');
8
8
  require('../__chunks/EEDWPDM2.cjs');
9
9
  require('../__chunks/Q2WCPTYS.cjs');
10
10
  require('../__chunks/AV6KTKLE.cjs');
11
11
 
12
12
 
13
- exports.createCompositeStore = _3HYNC3XAcjs.createCompositeStore;
13
+ exports.createCompositeStore = _LBFF2BBKcjs.createCompositeStore;
@@ -44,6 +44,10 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
44
44
  * In both scenarios, the item in focus will carry the
45
45
  * [`data-active-item`](https://ariakit.org/guide/styling#data-active-item)
46
46
  * attribute.
47
+ *
48
+ * Live examples:
49
+ * - [Select with Combobox and
50
+ * Tabs](https://ariakit.org/examples/select-combobox-tab)
47
51
  * @default false
48
52
  */
49
53
  virtualFocus: boolean;
@@ -178,7 +182,7 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
178
182
  * arrow keys.
179
183
  *
180
184
  * Live examples:
181
- * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
185
+ * - [Combobox with Tabs](https://ariakit.org/examples/combobox-tabs)
182
186
  */
183
187
  activeId: string | null | undefined;
184
188
  }
@@ -44,6 +44,10 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
44
44
  * In both scenarios, the item in focus will carry the
45
45
  * [`data-active-item`](https://ariakit.org/guide/styling#data-active-item)
46
46
  * attribute.
47
+ *
48
+ * Live examples:
49
+ * - [Select with Combobox and
50
+ * Tabs](https://ariakit.org/examples/select-combobox-tab)
47
51
  * @default false
48
52
  */
49
53
  virtualFocus: boolean;
@@ -178,7 +182,7 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
178
182
  * arrow keys.
179
183
  *
180
184
  * Live examples:
181
- * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
185
+ * - [Combobox with Tabs](https://ariakit.org/examples/combobox-tabs)
182
186
  */
183
187
  activeId: string | null | undefined;
184
188
  }
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _LTLFSC4Xcjs = require('../__chunks/LTLFSC4X.cjs');
5
- require('../__chunks/AETQC2AR.cjs');
6
- require('../__chunks/B4LYZ4EM.cjs');
4
+ var _DIYYVJDKcjs = require('../__chunks/DIYYVJDK.cjs');
5
+ require('../__chunks/LAYUSNGM.cjs');
6
+ require('../__chunks/M2NNCFIJ.cjs');
7
7
  require('../__chunks/EEDWPDM2.cjs');
8
8
  require('../__chunks/AV6KTKLE.cjs');
9
9
 
10
10
 
11
- exports.createDialogStore = _LTLFSC4Xcjs.createDialogStore;
11
+ exports.createDialogStore = _DIYYVJDKcjs.createDialogStore;