@ariakit/core 0.4.14 → 0.4.16

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 (93) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/cjs/__chunks/{RL7DKHOF.cjs → 34NK2NPD.cjs} +4 -4
  3. package/cjs/__chunks/{WOLZY4WC.cjs → 6REHCF5T.cjs} +6 -6
  4. package/cjs/__chunks/{K7YTZVWC.cjs → 7WVAUIME.cjs} +7 -7
  5. package/cjs/__chunks/{BUEPUCQL.cjs → E5AYFGW2.cjs} +13 -13
  6. package/cjs/__chunks/{ASR6PAFN.cjs → EKSEHA55.cjs} +7 -5
  7. package/cjs/__chunks/{V4YF2QA6.cjs → L5GSFUJU.cjs} +11 -11
  8. package/cjs/__chunks/{BVPEDDW6.cjs → OGYYHXPP.cjs} +7 -7
  9. package/cjs/__chunks/{YMCSKJHR.cjs → VR2FVDSU.cjs} +2 -2
  10. package/cjs/__chunks/{726BNPQZ.cjs → VZPNI7C2.cjs} +1 -1
  11. package/cjs/__chunks/{TFI7KVZO.cjs → XVG7OFIP.cjs} +4 -4
  12. package/cjs/checkbox/checkbox-store.cjs +3 -3
  13. package/cjs/checkbox/checkbox-store.d.cts +1 -1
  14. package/cjs/checkbox/checkbox-store.d.ts +1 -1
  15. package/cjs/collection/collection-store.cjs +4 -4
  16. package/cjs/collection/collection-store.d.cts +4 -0
  17. package/cjs/collection/collection-store.d.ts +4 -0
  18. package/cjs/combobox/combobox-store.cjs +29 -29
  19. package/cjs/combobox/combobox-store.d.cts +5 -2
  20. package/cjs/combobox/combobox-store.d.ts +5 -2
  21. package/cjs/composite/composite-overflow-store.cjs +5 -5
  22. package/cjs/composite/composite-store.cjs +5 -5
  23. package/cjs/composite/composite-store.d.cts +10 -0
  24. package/cjs/composite/composite-store.d.ts +10 -0
  25. package/cjs/dialog/dialog-store.cjs +4 -4
  26. package/cjs/disclosure/disclosure-store.cjs +3 -3
  27. package/cjs/form/form-store.cjs +17 -8
  28. package/cjs/hovercard/hovercard-store.cjs +6 -6
  29. package/cjs/menu/menu-bar-store.cjs +6 -6
  30. package/cjs/menu/menu-store.cjs +19 -19
  31. package/cjs/menu/menu-store.d.cts +1 -1
  32. package/cjs/menu/menu-store.d.ts +1 -1
  33. package/cjs/menubar/menubar-store.cjs +6 -6
  34. package/cjs/popover/popover-store.cjs +5 -5
  35. package/cjs/radio/radio-store.cjs +6 -6
  36. package/cjs/select/select-store.cjs +22 -22
  37. package/cjs/select/select-store.d.cts +1 -1
  38. package/cjs/select/select-store.d.ts +1 -1
  39. package/cjs/tab/tab-store.cjs +25 -25
  40. package/cjs/tab/tab-store.d.cts +4 -0
  41. package/cjs/tab/tab-store.d.ts +4 -0
  42. package/cjs/tag/tag-store.cjs +10 -10
  43. package/cjs/toolbar/toolbar-store.cjs +5 -5
  44. package/cjs/tooltip/tooltip-store.cjs +7 -7
  45. package/cjs/utils/dom.cjs +2 -2
  46. package/cjs/utils/events.cjs +5 -5
  47. package/cjs/utils/focus.cjs +10 -10
  48. package/cjs/utils/platform.cjs +3 -3
  49. package/cjs/utils/store.cjs +2 -2
  50. package/esm/__chunks/{DTR5TSDJ.js → 37JWRFYW.js} +1 -1
  51. package/esm/__chunks/{RCQ5P4YE.js → 43IPP2F4.js} +1 -1
  52. package/esm/__chunks/{7HRRFUKQ.js → 76UM5ZLT.js} +2 -2
  53. package/esm/__chunks/{AJZ4BYF3.js → C34RJTDU.js} +4 -4
  54. package/esm/__chunks/{BCALMBPZ.js → EWA2WL6G.js} +7 -5
  55. package/esm/__chunks/{CYQWQL4J.js → K2KIGYQU.js} +5 -5
  56. package/esm/__chunks/{ME2CUF3F.js → MD3RIO2T.js} +2 -2
  57. package/esm/__chunks/{QAGXQEUG.js → O6E4ZWCP.js} +1 -1
  58. package/esm/__chunks/{FZZ2AVHF.js → RZDDWCDV.js} +1 -1
  59. package/esm/__chunks/{JTLIIJ4U.js → X2ASWIQW.js} +2 -2
  60. package/esm/checkbox/checkbox-store.d.ts +1 -1
  61. package/esm/checkbox/checkbox-store.js +1 -1
  62. package/esm/collection/collection-store.d.ts +4 -0
  63. package/esm/collection/collection-store.js +3 -3
  64. package/esm/combobox/combobox-store.d.ts +5 -2
  65. package/esm/combobox/combobox-store.js +13 -13
  66. package/esm/composite/composite-overflow-store.js +4 -4
  67. package/esm/composite/composite-store.d.ts +10 -0
  68. package/esm/composite/composite-store.js +4 -4
  69. package/esm/dialog/dialog-store.js +3 -3
  70. package/esm/disclosure/disclosure-store.js +2 -2
  71. package/esm/form/form-store.js +12 -3
  72. package/esm/hovercard/hovercard-store.js +5 -5
  73. package/esm/menu/menu-bar-store.js +5 -5
  74. package/esm/menu/menu-store.d.ts +1 -1
  75. package/esm/menu/menu-store.js +8 -8
  76. package/esm/menubar/menubar-store.js +5 -5
  77. package/esm/popover/popover-store.js +4 -4
  78. package/esm/radio/radio-store.js +4 -4
  79. package/esm/select/select-store.d.ts +1 -1
  80. package/esm/select/select-store.js +9 -9
  81. package/esm/tab/tab-store.d.ts +4 -0
  82. package/esm/tab/tab-store.js +5 -5
  83. package/esm/tag/tag-store.js +7 -7
  84. package/esm/toolbar/toolbar-store.js +4 -4
  85. package/esm/tooltip/tooltip-store.js +5 -5
  86. package/esm/utils/dom.js +1 -1
  87. package/esm/utils/events.js +2 -2
  88. package/esm/utils/focus.js +1 -1
  89. package/esm/utils/platform.js +2 -2
  90. package/esm/utils/store.js +1 -1
  91. package/license +1 -1
  92. package/package.json +113 -113
  93. package/readme.md +3 -2
@@ -1,10 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _K7YTZVWCcjs = require('../__chunks/K7YTZVWC.cjs');
3
+ var _7WVAUIMEcjs = require('../__chunks/7WVAUIME.cjs');
4
+ require('../__chunks/GDZQUFNP.cjs');
4
5
 
5
6
 
6
- var _BUEPUCQLcjs = require('../__chunks/BUEPUCQL.cjs');
7
- require('../__chunks/GDZQUFNP.cjs');
7
+ var _E5AYFGW2cjs = require('../__chunks/E5AYFGW2.cjs');
8
+ require('../__chunks/VZPNI7C2.cjs');
8
9
 
9
10
 
10
11
 
@@ -12,12 +13,11 @@ require('../__chunks/GDZQUFNP.cjs');
12
13
 
13
14
 
14
15
 
15
- var _ASR6PAFNcjs = require('../__chunks/ASR6PAFN.cjs');
16
+ var _EKSEHA55cjs = require('../__chunks/EKSEHA55.cjs');
16
17
 
17
18
 
18
19
 
19
20
  var _MLCPLY2Pcjs = require('../__chunks/MLCPLY2P.cjs');
20
- require('../__chunks/726BNPQZ.cjs');
21
21
 
22
22
 
23
23
 
@@ -45,13 +45,13 @@ function createTabStore(_a = {}) {
45
45
  "focusShift",
46
46
  "focusWrap"
47
47
  ];
48
- const store = _ASR6PAFNcjs.mergeStore.call(void 0,
48
+ const store = _EKSEHA55cjs.mergeStore.call(void 0,
49
49
  props.store,
50
- _ASR6PAFNcjs.omit.call(void 0, parentComposite, independentKeys),
51
- _ASR6PAFNcjs.omit.call(void 0, combobox, independentKeys)
50
+ _EKSEHA55cjs.omit.call(void 0, parentComposite, independentKeys),
51
+ _EKSEHA55cjs.omit.call(void 0, combobox, independentKeys)
52
52
  );
53
53
  const syncState = store == null ? void 0 : store.getState();
54
- const composite = _K7YTZVWCcjs.createCompositeStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
54
+ const composite = _7WVAUIMEcjs.createCompositeStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
55
55
  store,
56
56
  // We need to explicitly set the default value of `includesBaseElement` to
57
57
  // `false` since we don't want the composite store to default it to `true`
@@ -69,7 +69,7 @@ function createTabStore(_a = {}) {
69
69
  ),
70
70
  focusLoop: _MLCPLY2Pcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
71
71
  }));
72
- const panels = _BUEPUCQLcjs.createCollectionStore.call(void 0, );
72
+ const panels = _E5AYFGW2cjs.createCollectionStore.call(void 0, );
73
73
  const initialState = _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, composite.getState()), {
74
74
  selectedId: _MLCPLY2Pcjs.defaultValue.call(void 0,
75
75
  props.selectedId,
@@ -82,10 +82,10 @@ function createTabStore(_a = {}) {
82
82
  true
83
83
  )
84
84
  });
85
- const tab = _ASR6PAFNcjs.createStore.call(void 0, initialState, composite, store);
86
- _ASR6PAFNcjs.setup.call(void 0,
85
+ const tab = _EKSEHA55cjs.createStore.call(void 0, initialState, composite, store);
86
+ _EKSEHA55cjs.setup.call(void 0,
87
87
  tab,
88
- () => _ASR6PAFNcjs.sync.call(void 0, tab, ["moves"], () => {
88
+ () => _EKSEHA55cjs.sync.call(void 0, tab, ["moves"], () => {
89
89
  const { activeId, selectOnMove } = tab.getState();
90
90
  if (!selectOnMove) return;
91
91
  if (!activeId) return;
@@ -97,9 +97,9 @@ function createTabStore(_a = {}) {
97
97
  })
98
98
  );
99
99
  let syncActiveId = true;
100
- _ASR6PAFNcjs.setup.call(void 0,
100
+ _EKSEHA55cjs.setup.call(void 0,
101
101
  tab,
102
- () => _ASR6PAFNcjs.batch.call(void 0, tab, ["selectedId"], (state, prev) => {
102
+ () => _EKSEHA55cjs.batch.call(void 0, tab, ["selectedId"], (state, prev) => {
103
103
  if (!syncActiveId) {
104
104
  syncActiveId = true;
105
105
  return;
@@ -108,9 +108,9 @@ function createTabStore(_a = {}) {
108
108
  tab.setState("activeId", state.selectedId);
109
109
  })
110
110
  );
111
- _ASR6PAFNcjs.setup.call(void 0,
111
+ _EKSEHA55cjs.setup.call(void 0,
112
112
  tab,
113
- () => _ASR6PAFNcjs.sync.call(void 0, tab, ["selectedId", "renderedItems"], (state) => {
113
+ () => _EKSEHA55cjs.sync.call(void 0, tab, ["selectedId", "renderedItems"], (state) => {
114
114
  if (state.selectedId !== void 0) return;
115
115
  const { activeId, renderedItems } = tab.getState();
116
116
  const tabItem = composite.item(activeId);
@@ -124,12 +124,12 @@ function createTabStore(_a = {}) {
124
124
  }
125
125
  })
126
126
  );
127
- _ASR6PAFNcjs.setup.call(void 0,
127
+ _EKSEHA55cjs.setup.call(void 0,
128
128
  tab,
129
- () => _ASR6PAFNcjs.sync.call(void 0, tab, ["renderedItems"], (state) => {
129
+ () => _EKSEHA55cjs.sync.call(void 0, tab, ["renderedItems"], (state) => {
130
130
  const tabs = state.renderedItems;
131
131
  if (!tabs.length) return;
132
- return _ASR6PAFNcjs.sync.call(void 0, panels, ["renderedItems"], (state2) => {
132
+ return _EKSEHA55cjs.sync.call(void 0, panels, ["renderedItems"], (state2) => {
133
133
  const items = state2.renderedItems;
134
134
  const hasOrphanPanels = items.some((panel) => !panel.tabId);
135
135
  if (!hasOrphanPanels) return;
@@ -143,7 +143,7 @@ function createTabStore(_a = {}) {
143
143
  })
144
144
  );
145
145
  let selectedIdFromSelectedValue = null;
146
- _ASR6PAFNcjs.setup.call(void 0, tab, () => {
146
+ _EKSEHA55cjs.setup.call(void 0, tab, () => {
147
147
  const backupSelectedId = () => {
148
148
  selectedIdFromSelectedValue = tab.getState().selectedId;
149
149
  };
@@ -153,14 +153,14 @@ function createTabStore(_a = {}) {
153
153
  };
154
154
  if (parentComposite && "setSelectElement" in parentComposite) {
155
155
  return _MLCPLY2Pcjs.chain.call(void 0,
156
- _ASR6PAFNcjs.sync.call(void 0, parentComposite, ["value"], backupSelectedId),
157
- _ASR6PAFNcjs.sync.call(void 0, parentComposite, ["mounted"], restoreSelectedId)
156
+ _EKSEHA55cjs.sync.call(void 0, parentComposite, ["value"], backupSelectedId),
157
+ _EKSEHA55cjs.sync.call(void 0, parentComposite, ["mounted"], restoreSelectedId)
158
158
  );
159
159
  }
160
160
  if (!combobox) return;
161
161
  return _MLCPLY2Pcjs.chain.call(void 0,
162
- _ASR6PAFNcjs.sync.call(void 0, combobox, ["selectedValue"], backupSelectedId),
163
- _ASR6PAFNcjs.sync.call(void 0, combobox, ["mounted"], restoreSelectedId)
162
+ _EKSEHA55cjs.sync.call(void 0, combobox, ["selectedValue"], backupSelectedId),
163
+ _EKSEHA55cjs.sync.call(void 0, combobox, ["mounted"], restoreSelectedId)
164
164
  );
165
165
  });
166
166
  return _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, composite), tab), {
@@ -25,6 +25,8 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
25
25
  * - [Combobox with Tabs](https://ariakit.org/examples/combobox-tabs)
26
26
  * - [Select with Combobox and
27
27
  * Tabs](https://ariakit.org/examples/select-combobox-tab)
28
+ * - [Command Menu with
29
+ * Tabs](https://ariakit.org/examples/dialog-combobox-tab-command-menu)
28
30
  */
29
31
  selectedId: TabStoreState["activeId"];
30
32
  /**
@@ -107,6 +109,8 @@ export interface TabStoreOptions extends StoreOptions<TabStoreState, "orientatio
107
109
  * - [Animated TabPanel](https://ariakit.org/examples/tab-panel-animated)
108
110
  * - [Select with Combobox and
109
111
  * Tabs](https://ariakit.org/examples/select-combobox-tab)
112
+ * - [Command Menu with
113
+ * Tabs](https://ariakit.org/examples/dialog-combobox-tab-command-menu)
110
114
  */
111
115
  defaultSelectedId?: TabStoreState["selectedId"];
112
116
  }
@@ -25,6 +25,8 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
25
25
  * - [Combobox with Tabs](https://ariakit.org/examples/combobox-tabs)
26
26
  * - [Select with Combobox and
27
27
  * Tabs](https://ariakit.org/examples/select-combobox-tab)
28
+ * - [Command Menu with
29
+ * Tabs](https://ariakit.org/examples/dialog-combobox-tab-command-menu)
28
30
  */
29
31
  selectedId: TabStoreState["activeId"];
30
32
  /**
@@ -107,6 +109,8 @@ export interface TabStoreOptions extends StoreOptions<TabStoreState, "orientatio
107
109
  * - [Animated TabPanel](https://ariakit.org/examples/tab-panel-animated)
108
110
  * - [Select with Combobox and
109
111
  * Tabs](https://ariakit.org/examples/select-combobox-tab)
112
+ * - [Command Menu with
113
+ * Tabs](https://ariakit.org/examples/dialog-combobox-tab-command-menu)
110
114
  */
111
115
  defaultSelectedId?: TabStoreState["selectedId"];
112
116
  }
@@ -1,21 +1,21 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _K7YTZVWCcjs = require('../__chunks/K7YTZVWC.cjs');
4
- require('../__chunks/BUEPUCQL.cjs');
5
- require('../__chunks/GDZQUFNP.cjs');
3
+ var _SHOLYDNPcjs = require('../__chunks/SHOLYDNP.cjs');
6
4
 
7
5
 
8
- var _SHOLYDNPcjs = require('../__chunks/SHOLYDNP.cjs');
6
+ var _7WVAUIMEcjs = require('../__chunks/7WVAUIME.cjs');
7
+ require('../__chunks/GDZQUFNP.cjs');
8
+ require('../__chunks/E5AYFGW2.cjs');
9
+ require('../__chunks/VZPNI7C2.cjs');
9
10
 
10
11
 
11
12
 
12
13
 
13
- var _ASR6PAFNcjs = require('../__chunks/ASR6PAFN.cjs');
14
+ var _EKSEHA55cjs = require('../__chunks/EKSEHA55.cjs');
14
15
 
15
16
 
16
17
 
17
18
  var _MLCPLY2Pcjs = require('../__chunks/MLCPLY2P.cjs');
18
- require('../__chunks/726BNPQZ.cjs');
19
19
 
20
20
 
21
21
 
@@ -25,7 +25,7 @@ var _7EQBAZ46cjs = require('../__chunks/7EQBAZ46.cjs');
25
25
  function createTagStore(props = {}) {
26
26
  var _a;
27
27
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
28
- const composite = _K7YTZVWCcjs.createCompositeStore.call(void 0, props);
28
+ const composite = _7WVAUIMEcjs.createCompositeStore.call(void 0, props);
29
29
  const initialState = _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, composite.getState()), {
30
30
  inputElement: _MLCPLY2Pcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.inputElement, null),
31
31
  labelElement: _MLCPLY2Pcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.labelElement, null),
@@ -37,10 +37,10 @@ function createTagStore(props = {}) {
37
37
  []
38
38
  )
39
39
  });
40
- const tag = _ASR6PAFNcjs.createStore.call(void 0, initialState, composite, props.store);
41
- _ASR6PAFNcjs.setup.call(void 0,
40
+ const tag = _EKSEHA55cjs.createStore.call(void 0, initialState, composite, props.store);
41
+ _EKSEHA55cjs.setup.call(void 0,
42
42
  tag,
43
- () => _ASR6PAFNcjs.sync.call(void 0, tag, ["inputElement", "activeId"], (state) => {
43
+ () => _EKSEHA55cjs.sync.call(void 0, tag, ["inputElement", "activeId"], (state) => {
44
44
  if (!state.inputElement) return;
45
45
  if (state.activeId !== void 0) return;
46
46
  tag.setState("activeId", state.inputElement.id);
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _K7YTZVWCcjs = require('../__chunks/K7YTZVWC.cjs');
4
- require('../__chunks/BUEPUCQL.cjs');
3
+ var _7WVAUIMEcjs = require('../__chunks/7WVAUIME.cjs');
5
4
  require('../__chunks/GDZQUFNP.cjs');
6
- require('../__chunks/ASR6PAFN.cjs');
5
+ require('../__chunks/E5AYFGW2.cjs');
6
+ require('../__chunks/VZPNI7C2.cjs');
7
+ require('../__chunks/EKSEHA55.cjs');
7
8
 
8
9
 
9
10
  var _MLCPLY2Pcjs = require('../__chunks/MLCPLY2P.cjs');
10
- require('../__chunks/726BNPQZ.cjs');
11
11
 
12
12
 
13
13
 
@@ -17,7 +17,7 @@ var _7EQBAZ46cjs = require('../__chunks/7EQBAZ46.cjs');
17
17
  function createToolbarStore(props = {}) {
18
18
  var _a;
19
19
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
20
- return _K7YTZVWCcjs.createCompositeStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
20
+ return _7WVAUIMEcjs.createCompositeStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
21
21
  orientation: _MLCPLY2Pcjs.defaultValue.call(void 0,
22
22
  props.orientation,
23
23
  syncState == null ? void 0 : syncState.orientation,
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _RL7DKHOFcjs = require('../__chunks/RL7DKHOF.cjs');
4
- require('../__chunks/BVPEDDW6.cjs');
5
- require('../__chunks/YMCSKJHR.cjs');
6
- require('../__chunks/V4YF2QA6.cjs');
3
+ var _34NK2NPDcjs = require('../__chunks/34NK2NPD.cjs');
4
+ require('../__chunks/OGYYHXPP.cjs');
5
+ require('../__chunks/VR2FVDSU.cjs');
6
+ require('../__chunks/L5GSFUJU.cjs');
7
7
 
8
8
 
9
- var _ASR6PAFNcjs = require('../__chunks/ASR6PAFN.cjs');
9
+ var _EKSEHA55cjs = require('../__chunks/EKSEHA55.cjs');
10
10
 
11
11
 
12
12
  var _MLCPLY2Pcjs = require('../__chunks/MLCPLY2P.cjs');
@@ -28,7 +28,7 @@ function createTooltipStore(props = {}) {
28
28
  }
29
29
  }
30
30
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
31
- const hovercard = _RL7DKHOFcjs.createHovercardStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
31
+ const hovercard = _34NK2NPDcjs.createHovercardStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
32
32
  placement: _MLCPLY2Pcjs.defaultValue.call(void 0,
33
33
  props.placement,
34
34
  syncState == null ? void 0 : syncState.placement,
@@ -40,7 +40,7 @@ function createTooltipStore(props = {}) {
40
40
  type: _MLCPLY2Pcjs.defaultValue.call(void 0, props.type, syncState == null ? void 0 : syncState.type, "description"),
41
41
  skipTimeout: _MLCPLY2Pcjs.defaultValue.call(void 0, props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300)
42
42
  });
43
- const tooltip = _ASR6PAFNcjs.createStore.call(void 0, initialState, hovercard, props.store);
43
+ const tooltip = _EKSEHA55cjs.createStore.call(void 0, initialState, hovercard, props.store);
44
44
  return _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, hovercard), tooltip);
45
45
  }
46
46
 
package/cjs/utils/dom.cjs CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _726BNPQZcjs = require('../__chunks/726BNPQZ.cjs');
21
+ var _VZPNI7C2cjs = require('../__chunks/VZPNI7C2.cjs');
22
22
  require('../__chunks/7EQBAZ46.cjs');
23
23
 
24
24
 
@@ -40,4 +40,4 @@ require('../__chunks/7EQBAZ46.cjs');
40
40
 
41
41
 
42
42
 
43
- exports.canUseDOM = _726BNPQZcjs.canUseDOM; exports.contains = _726BNPQZcjs.contains; exports.getActiveElement = _726BNPQZcjs.getActiveElement; exports.getDocument = _726BNPQZcjs.getDocument; exports.getPopupItemRole = _726BNPQZcjs.getPopupItemRole; exports.getPopupRole = _726BNPQZcjs.getPopupRole; exports.getScrollingElement = _726BNPQZcjs.getScrollingElement; exports.getTextboxSelection = _726BNPQZcjs.getTextboxSelection; exports.getTextboxValue = _726BNPQZcjs.getTextboxValue; exports.getWindow = _726BNPQZcjs.getWindow; exports.isButton = _726BNPQZcjs.isButton; exports.isFrame = _726BNPQZcjs.isFrame; exports.isPartiallyHidden = _726BNPQZcjs.isPartiallyHidden; exports.isTextField = _726BNPQZcjs.isTextField; exports.isTextbox = _726BNPQZcjs.isTextbox; exports.isVisible = _726BNPQZcjs.isVisible; exports.scrollIntoViewIfNeeded = _726BNPQZcjs.scrollIntoViewIfNeeded; exports.setSelectionRange = _726BNPQZcjs.setSelectionRange; exports.sortBasedOnDOMPosition = _726BNPQZcjs.sortBasedOnDOMPosition;
43
+ exports.canUseDOM = _VZPNI7C2cjs.canUseDOM; exports.contains = _VZPNI7C2cjs.contains; exports.getActiveElement = _VZPNI7C2cjs.getActiveElement; exports.getDocument = _VZPNI7C2cjs.getDocument; exports.getPopupItemRole = _VZPNI7C2cjs.getPopupItemRole; exports.getPopupRole = _VZPNI7C2cjs.getPopupRole; exports.getScrollingElement = _VZPNI7C2cjs.getScrollingElement; exports.getTextboxSelection = _VZPNI7C2cjs.getTextboxSelection; exports.getTextboxValue = _VZPNI7C2cjs.getTextboxValue; exports.getWindow = _VZPNI7C2cjs.getWindow; exports.isButton = _VZPNI7C2cjs.isButton; exports.isFrame = _VZPNI7C2cjs.isFrame; exports.isPartiallyHidden = _VZPNI7C2cjs.isPartiallyHidden; exports.isTextField = _VZPNI7C2cjs.isTextField; exports.isTextbox = _VZPNI7C2cjs.isTextbox; exports.isVisible = _VZPNI7C2cjs.isVisible; exports.scrollIntoViewIfNeeded = _VZPNI7C2cjs.scrollIntoViewIfNeeded; exports.setSelectionRange = _VZPNI7C2cjs.setSelectionRange; exports.sortBasedOnDOMPosition = _VZPNI7C2cjs.sortBasedOnDOMPosition;
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _WOLZY4WCcjs = require('../__chunks/WOLZY4WC.cjs');
3
+ var _6REHCF5Tcjs = require('../__chunks/6REHCF5T.cjs');
4
4
 
5
5
 
6
- var _726BNPQZcjs = require('../__chunks/726BNPQZ.cjs');
6
+ var _VZPNI7C2cjs = require('../__chunks/VZPNI7C2.cjs');
7
7
 
8
8
 
9
9
 
@@ -12,7 +12,7 @@ var _7EQBAZ46cjs = require('../__chunks/7EQBAZ46.cjs');
12
12
  // src/utils/events.ts
13
13
  function isPortalEvent(event) {
14
14
  return Boolean(
15
- event.currentTarget && !_726BNPQZcjs.contains.call(void 0, event.currentTarget, event.target)
15
+ event.currentTarget && !_VZPNI7C2cjs.contains.call(void 0, event.currentTarget, event.target)
16
16
  );
17
17
  }
18
18
  function isSelfTarget(event) {
@@ -21,7 +21,7 @@ function isSelfTarget(event) {
21
21
  function isOpeningInNewTab(event) {
22
22
  const element = event.currentTarget;
23
23
  if (!element) return false;
24
- const isAppleDevice = _WOLZY4WCcjs.isApple.call(void 0, );
24
+ const isAppleDevice = _6REHCF5Tcjs.isApple.call(void 0, );
25
25
  if (isAppleDevice && !event.metaKey) return false;
26
26
  if (!isAppleDevice && !event.ctrlKey) return false;
27
27
  const tagName = element.tagName.toLowerCase();
@@ -69,7 +69,7 @@ function fireClickEvent(element, eventInit) {
69
69
  function isFocusEventOutside(event, container) {
70
70
  const containerElement = container || event.currentTarget;
71
71
  const relatedTarget = event.relatedTarget;
72
- return !relatedTarget || !_726BNPQZcjs.contains.call(void 0, containerElement, relatedTarget);
72
+ return !relatedTarget || !_VZPNI7C2cjs.contains.call(void 0, containerElement, relatedTarget);
73
73
  }
74
74
  function getInputType(event) {
75
75
  const nativeEvent = "nativeEvent" in event ? event.nativeEvent : event;
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _726BNPQZcjs = require('../__chunks/726BNPQZ.cjs');
6
+ var _VZPNI7C2cjs = require('../__chunks/VZPNI7C2.cjs');
7
7
 
8
8
 
9
9
  var _7EQBAZ46cjs = require('../__chunks/7EQBAZ46.cjs');
@@ -16,7 +16,7 @@ function hasNegativeTabIndex(element) {
16
16
  }
17
17
  function isFocusable(element) {
18
18
  if (!element.matches(selector)) return false;
19
- if (!_726BNPQZcjs.isVisible.call(void 0, element)) return false;
19
+ if (!_VZPNI7C2cjs.isVisible.call(void 0, element)) return false;
20
20
  if (element.closest("[inert]")) return false;
21
21
  return true;
22
22
  }
@@ -30,7 +30,7 @@ function isTabbable(element) {
30
30
  const radioGroup = element.form.elements.namedItem(element.name);
31
31
  if (!radioGroup) return true;
32
32
  if (!("length" in radioGroup)) return true;
33
- const activeElement = _726BNPQZcjs.getActiveElement.call(void 0, element);
33
+ const activeElement = _VZPNI7C2cjs.getActiveElement.call(void 0, element);
34
34
  if (!activeElement) return true;
35
35
  if (activeElement === element) return true;
36
36
  if (!("form" in activeElement)) return true;
@@ -47,7 +47,7 @@ function getAllFocusableIn(container, includeContainer) {
47
47
  }
48
48
  const focusableElements = elements.filter(isFocusable);
49
49
  focusableElements.forEach((element, i) => {
50
- if (_726BNPQZcjs.isFrame.call(void 0, element) && element.contentDocument) {
50
+ if (_VZPNI7C2cjs.isFrame.call(void 0, element) && element.contentDocument) {
51
51
  const frameBody = element.contentDocument.body;
52
52
  focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody));
53
53
  }
@@ -73,7 +73,7 @@ function getAllTabbableIn(container, includeContainer, fallbackToFocusable) {
73
73
  tabbableElements.unshift(container);
74
74
  }
75
75
  tabbableElements.forEach((element, i) => {
76
- if (_726BNPQZcjs.isFrame.call(void 0, element) && element.contentDocument) {
76
+ if (_VZPNI7C2cjs.isFrame.call(void 0, element) && element.contentDocument) {
77
77
  const frameBody = element.contentDocument.body;
78
78
  const allFrameTabbable = getAllTabbableIn(
79
79
  frameBody,
@@ -114,7 +114,7 @@ function getLastTabbable(fallbackToFocusable) {
114
114
  return getLastTabbableIn(document.body, false, fallbackToFocusable);
115
115
  }
116
116
  function getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) {
117
- const activeElement = _726BNPQZcjs.getActiveElement.call(void 0, container);
117
+ const activeElement = _VZPNI7C2cjs.getActiveElement.call(void 0, container);
118
118
  const allFocusable = getAllFocusableIn(container, includeContainer);
119
119
  const activeIndex = allFocusable.indexOf(activeElement);
120
120
  const nextFocusableElements = allFocusable.slice(activeIndex + 1);
@@ -129,7 +129,7 @@ function getNextTabbable(fallbackToFirst, fallbackToFocusable) {
129
129
  );
130
130
  }
131
131
  function getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) {
132
- const activeElement = _726BNPQZcjs.getActiveElement.call(void 0, container);
132
+ const activeElement = _VZPNI7C2cjs.getActiveElement.call(void 0, container);
133
133
  const allFocusable = getAllFocusableIn(container, includeContainer).reverse();
134
134
  const activeIndex = allFocusable.indexOf(activeElement);
135
135
  const previousFocusableElements = allFocusable.slice(activeIndex + 1);
@@ -150,7 +150,7 @@ function getClosestFocusable(element) {
150
150
  return element || null;
151
151
  }
152
152
  function hasFocus(element) {
153
- const activeElement = _726BNPQZcjs.getActiveElement.call(void 0, element);
153
+ const activeElement = _VZPNI7C2cjs.getActiveElement.call(void 0, element);
154
154
  if (!activeElement) return false;
155
155
  if (activeElement === element) return true;
156
156
  const activeDescendant = activeElement.getAttribute("aria-activedescendant");
@@ -158,9 +158,9 @@ function hasFocus(element) {
158
158
  return activeDescendant === element.id;
159
159
  }
160
160
  function hasFocusWithin(element) {
161
- const activeElement = _726BNPQZcjs.getActiveElement.call(void 0, element);
161
+ const activeElement = _VZPNI7C2cjs.getActiveElement.call(void 0, element);
162
162
  if (!activeElement) return false;
163
- if (_726BNPQZcjs.contains.call(void 0, element, activeElement)) return true;
163
+ if (_VZPNI7C2cjs.contains.call(void 0, element, activeElement)) return true;
164
164
  const activeDescendant = activeElement.getAttribute("aria-activedescendant");
165
165
  if (!activeDescendant) return false;
166
166
  if (!("id" in element)) return false;
@@ -4,8 +4,8 @@
4
4
 
5
5
 
6
6
 
7
- var _WOLZY4WCcjs = require('../__chunks/WOLZY4WC.cjs');
8
- require('../__chunks/726BNPQZ.cjs');
7
+ var _6REHCF5Tcjs = require('../__chunks/6REHCF5T.cjs');
8
+ require('../__chunks/VZPNI7C2.cjs');
9
9
  require('../__chunks/7EQBAZ46.cjs');
10
10
 
11
11
 
@@ -13,4 +13,4 @@ require('../__chunks/7EQBAZ46.cjs');
13
13
 
14
14
 
15
15
 
16
- exports.isApple = _WOLZY4WCcjs.isApple; exports.isFirefox = _WOLZY4WCcjs.isFirefox; exports.isMac = _WOLZY4WCcjs.isMac; exports.isSafari = _WOLZY4WCcjs.isSafari; exports.isTouchDevice = _WOLZY4WCcjs.isTouchDevice;
16
+ exports.isApple = _6REHCF5Tcjs.isApple; exports.isFirefox = _6REHCF5Tcjs.isFirefox; exports.isMac = _6REHCF5Tcjs.isMac; exports.isSafari = _6REHCF5Tcjs.isSafari; exports.isTouchDevice = _6REHCF5Tcjs.isTouchDevice;
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _ASR6PAFNcjs = require('../__chunks/ASR6PAFN.cjs');
12
+ var _EKSEHA55cjs = require('../__chunks/EKSEHA55.cjs');
13
13
  require('../__chunks/MLCPLY2P.cjs');
14
14
  require('../__chunks/7EQBAZ46.cjs');
15
15
 
@@ -23,4 +23,4 @@ require('../__chunks/7EQBAZ46.cjs');
23
23
 
24
24
 
25
25
 
26
- exports.batch = _ASR6PAFNcjs.batch; exports.createStore = _ASR6PAFNcjs.createStore; exports.init = _ASR6PAFNcjs.init; exports.mergeStore = _ASR6PAFNcjs.mergeStore; exports.omit = _ASR6PAFNcjs.omit; exports.pick = _ASR6PAFNcjs.pick; exports.setup = _ASR6PAFNcjs.setup; exports.subscribe = _ASR6PAFNcjs.subscribe; exports.sync = _ASR6PAFNcjs.sync; exports.throwOnConflictingProps = _ASR6PAFNcjs.throwOnConflictingProps;
26
+ exports.batch = _EKSEHA55cjs.batch; exports.createStore = _EKSEHA55cjs.createStore; exports.init = _EKSEHA55cjs.init; exports.mergeStore = _EKSEHA55cjs.mergeStore; exports.omit = _EKSEHA55cjs.omit; exports.pick = _EKSEHA55cjs.pick; exports.setup = _EKSEHA55cjs.setup; exports.subscribe = _EKSEHA55cjs.subscribe; exports.sync = _EKSEHA55cjs.sync; exports.throwOnConflictingProps = _EKSEHA55cjs.throwOnConflictingProps;
@@ -72,7 +72,7 @@ function isTextField(element) {
72
72
  const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
73
73
  const isTextArea = element.tagName === "TEXTAREA";
74
74
  return isTextInput || isTextArea || false;
75
- } catch (error) {
75
+ } catch (_error) {
76
76
  return false;
77
77
  }
78
78
  }
@@ -7,7 +7,7 @@ import {
7
7
  subscribe,
8
8
  sync,
9
9
  throwOnConflictingProps
10
- } from "./BCALMBPZ.js";
10
+ } from "./EWA2WL6G.js";
11
11
  import {
12
12
  defaultValue
13
13
  } from "./PBFD2E7P.js";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "./AJZ4BYF3.js";
4
+ } from "./C34RJTDU.js";
5
5
  import {
6
6
  createStore
7
- } from "./BCALMBPZ.js";
7
+ } from "./EWA2WL6G.js";
8
8
  import {
9
9
  defaultValue
10
10
  } from "./PBFD2E7P.js";
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import {
3
- createCollectionStore
4
- } from "./CYQWQL4J.js";
5
2
  import {
6
3
  flatten2DArray,
7
4
  reverseArray
8
5
  } from "./7PRQYBBV.js";
6
+ import {
7
+ createCollectionStore
8
+ } from "./K2KIGYQU.js";
9
9
  import {
10
10
  createStore,
11
11
  setup,
12
12
  sync
13
- } from "./BCALMBPZ.js";
13
+ } from "./EWA2WL6G.js";
14
14
  import {
15
15
  defaultValue
16
16
  } from "./PBFD2E7P.js";
@@ -177,12 +177,14 @@ function pick2(store, ...args) {
177
177
  return getInternal(store, "pick")(...args);
178
178
  }
179
179
  function mergeStore(...stores) {
180
- const initialState = stores.reduce((state, store2) => {
181
- var _a;
180
+ var _a;
181
+ const initialState = {};
182
+ for (const store2 of stores) {
182
183
  const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2);
183
- if (!nextState) return state;
184
- return Object.assign(state, nextState);
185
- }, {});
184
+ if (nextState) {
185
+ Object.assign(initialState, nextState);
186
+ }
187
+ }
186
188
  const store = createStore(initialState, ...stores);
187
189
  return Object.assign({}, ...stores, store);
188
190
  }
@@ -1,19 +1,19 @@
1
1
  "use client";
2
+ import {
3
+ getDocument,
4
+ sortBasedOnDOMPosition
5
+ } from "./37JWRFYW.js";
2
6
  import {
3
7
  batch,
4
8
  createStore,
5
9
  init,
6
10
  setup,
7
11
  throwOnConflictingProps
8
- } from "./BCALMBPZ.js";
12
+ } from "./EWA2WL6G.js";
9
13
  import {
10
14
  chain,
11
15
  defaultValue
12
16
  } from "./PBFD2E7P.js";
13
- import {
14
- getDocument,
15
- sortBasedOnDOMPosition
16
- } from "./DTR5TSDJ.js";
17
17
  import {
18
18
  __spreadProps,
19
19
  __spreadValues
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createDialogStore
4
- } from "./FZZ2AVHF.js";
4
+ } from "./RZDDWCDV.js";
5
5
  import {
6
6
  createStore,
7
7
  mergeStore,
8
8
  omit,
9
9
  throwOnConflictingProps
10
- } from "./BCALMBPZ.js";
10
+ } from "./EWA2WL6G.js";
11
11
  import {
12
12
  defaultValue
13
13
  } from "./PBFD2E7P.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  canUseDOM
4
- } from "./DTR5TSDJ.js";
4
+ } from "./37JWRFYW.js";
5
5
 
6
6
  // src/utils/platform.ts
7
7
  function isTouchDevice() {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  createDisclosureStore
4
- } from "./RCQ5P4YE.js";
4
+ } from "./43IPP2F4.js";
5
5
 
6
6
  // src/dialog/dialog-store.ts
7
7
  function createDialogStore(props = {}) {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "./ME2CUF3F.js";
4
+ } from "./MD3RIO2T.js";
5
5
  import {
6
6
  createStore
7
- } from "./BCALMBPZ.js";
7
+ } from "./EWA2WL6G.js";
8
8
  import {
9
9
  defaultValue
10
10
  } from "./PBFD2E7P.js";
@@ -5,7 +5,7 @@ import type { PickRequired, SetState, ToPrimitive } from "../utils/types.ts";
5
5
  */
6
6
  export declare function createCheckboxStore<T extends CheckboxStoreValue = CheckboxStoreValue>(props: PickRequired<CheckboxStoreProps<T>, "value" | "defaultValue">): CheckboxStore<T>;
7
7
  export declare function createCheckboxStore(props?: CheckboxStoreProps): CheckboxStore;
8
- export type CheckboxStoreValue = boolean | string | number | Array<string | number>;
8
+ export type CheckboxStoreValue = boolean | string | number | ReadonlyArray<string | number>;
9
9
  export interface CheckboxStoreState<T extends CheckboxStoreValue = CheckboxStoreValue> {
10
10
  /**
11
11
  * The checked state of the checkbox.
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createStore,
4
4
  throwOnConflictingProps
5
- } from "../__chunks/BCALMBPZ.js";
5
+ } from "../__chunks/EWA2WL6G.js";
6
6
  import {
7
7
  defaultValue
8
8
  } from "../__chunks/PBFD2E7P.js";
@@ -20,6 +20,10 @@ export interface CollectionStoreState<T extends CollectionStoreItem = Collection
20
20
  * updated when an item is registered or unregistered using the
21
21
  * [`registerItem`](https://ariakit.org/reference/use-collection-store#registeritem)
22
22
  * function.
23
+ *
24
+ * Live examples:
25
+ * - [Command Menu with
26
+ * Tabs](https://ariakit.org/examples/dialog-combobox-tab-command-menu)
23
27
  */
24
28
  items: T[];
25
29
  /**