@ariakit/core 0.4.16 → 0.4.18

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 (85) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/cjs/__chunks/{VZPNI7C2.cjs → 4ITB54IT.cjs} +2 -1
  3. package/cjs/__chunks/{MLCPLY2P.cjs → 6BYUUR4M.cjs} +2 -6
  4. package/cjs/__chunks/AOXAROPF.cjs +59 -0
  5. package/cjs/__chunks/{E5AYFGW2.cjs → HGVIF2R4.cjs} +20 -23
  6. package/cjs/__chunks/JNPL5IHP.cjs +36 -0
  7. package/cjs/__chunks/{6REHCF5T.cjs → JNYCP2QO.cjs} +6 -6
  8. package/cjs/__chunks/{L5GSFUJU.cjs → MJNGPYVQ.cjs} +19 -22
  9. package/cjs/__chunks/{7WVAUIME.cjs → OYTZFOIJ.cjs} +28 -28
  10. package/cjs/__chunks/{VR2FVDSU.cjs → T247D7JS.cjs} +2 -2
  11. package/cjs/__chunks/UROTDZFK.cjs +41 -0
  12. package/cjs/__chunks/{EKSEHA55.cjs → WPBYRKFQ.cjs} +13 -17
  13. package/cjs/checkbox/checkbox-store.cjs +8 -11
  14. package/cjs/collection/collection-store.cjs +5 -6
  15. package/cjs/combobox/combobox-store.cjs +57 -57
  16. package/cjs/composite/composite-overflow-store.cjs +6 -7
  17. package/cjs/composite/composite-store.cjs +6 -7
  18. package/cjs/dialog/dialog-store.cjs +5 -6
  19. package/cjs/disclosure/disclosure-store.cjs +4 -5
  20. package/cjs/form/form-store.cjs +34 -35
  21. package/cjs/hovercard/hovercard-store.cjs +7 -8
  22. package/cjs/index.cjs +1 -3
  23. package/cjs/menu/menu-bar-store.cjs +7 -8
  24. package/cjs/menu/menu-store.cjs +49 -50
  25. package/cjs/menubar/menubar-store.cjs +7 -8
  26. package/cjs/popover/popover-store.cjs +6 -7
  27. package/cjs/radio/radio-store.cjs +23 -23
  28. package/cjs/select/select-store.cjs +49 -49
  29. package/cjs/tab/tab-store.cjs +47 -51
  30. package/cjs/tag/tag-store.cjs +21 -22
  31. package/cjs/toolbar/toolbar-store.cjs +10 -13
  32. package/cjs/tooltip/tooltip-store.cjs +20 -19
  33. package/cjs/utils/array.cjs +0 -1
  34. package/cjs/utils/dom.cjs +2 -3
  35. package/cjs/utils/events.cjs +7 -11
  36. package/cjs/utils/focus.cjs +24 -25
  37. package/cjs/utils/misc.cjs +2 -3
  38. package/cjs/utils/platform.cjs +3 -4
  39. package/cjs/utils/store.cjs +3 -4
  40. package/cjs/utils/undo.cjs +0 -1
  41. package/esm/__chunks/{37JWRFYW.js → 3DNM6L6E.js} +2 -1
  42. package/esm/__chunks/{43IPP2F4.js → 75BJEVSH.js} +5 -8
  43. package/esm/__chunks/{MD3RIO2T.js → BFGNM53A.js} +15 -19
  44. package/esm/__chunks/{RZDDWCDV.js → KMAUV3TY.js} +1 -1
  45. package/esm/__chunks/{K2KIGYQU.js → N5XGANPW.js} +7 -10
  46. package/esm/__chunks/{C34RJTDU.js → RVTIKFRL.js} +13 -13
  47. package/esm/__chunks/{O6E4ZWCP.js → SNHYQNEZ.js} +1 -1
  48. package/esm/__chunks/{EWA2WL6G.js → SXKM4CGU.js} +2 -6
  49. package/esm/__chunks/{X2ASWIQW.js → TIQDSBWP.js} +13 -13
  50. package/esm/__chunks/{76UM5ZLT.js → WSDJ6ZRB.js} +13 -11
  51. package/esm/__chunks/{PBFD2E7P.js → XMCVU3LR.js} +1 -4
  52. package/esm/checkbox/checkbox-store.js +5 -8
  53. package/esm/collection/collection-store.js +4 -5
  54. package/esm/combobox/combobox-store.js +28 -28
  55. package/esm/composite/composite-overflow-store.js +5 -6
  56. package/esm/composite/composite-store.js +5 -6
  57. package/esm/dialog/dialog-store.js +4 -5
  58. package/esm/disclosure/disclosure-store.js +3 -4
  59. package/esm/form/form-store.js +12 -13
  60. package/esm/hovercard/hovercard-store.js +6 -7
  61. package/esm/index.js +0 -1
  62. package/esm/menu/menu-bar-store.js +6 -7
  63. package/esm/menu/menu-store.js +33 -34
  64. package/esm/menubar/menubar-store.js +6 -7
  65. package/esm/popover/popover-store.js +5 -6
  66. package/esm/radio/radio-store.js +20 -20
  67. package/esm/select/select-store.js +27 -27
  68. package/esm/tab/tab-store.js +21 -25
  69. package/esm/tag/tag-store.js +12 -13
  70. package/esm/toolbar/toolbar-store.js +8 -11
  71. package/esm/tooltip/tooltip-store.js +16 -15
  72. package/esm/utils/array.js +0 -1
  73. package/esm/utils/dom.js +1 -2
  74. package/esm/utils/events.js +4 -8
  75. package/esm/utils/focus.js +17 -18
  76. package/esm/utils/misc.js +1 -2
  77. package/esm/utils/platform.js +2 -3
  78. package/esm/utils/store.js +2 -3
  79. package/esm/utils/undo.js +0 -1
  80. package/package.json +1 -1
  81. package/cjs/__chunks/34NK2NPD.cjs +0 -41
  82. package/cjs/__chunks/7EQBAZ46.cjs +0 -37
  83. package/cjs/__chunks/OGYYHXPP.cjs +0 -63
  84. package/cjs/__chunks/XVG7OFIP.cjs +0 -34
  85. package/esm/__chunks/3YLGPPWQ.js +0 -38
@@ -9,9 +9,8 @@
9
9
 
10
10
 
11
11
 
12
- var _EKSEHA55cjs = require('../__chunks/EKSEHA55.cjs');
13
- require('../__chunks/MLCPLY2P.cjs');
14
- require('../__chunks/7EQBAZ46.cjs');
12
+ var _WPBYRKFQcjs = require('../__chunks/WPBYRKFQ.cjs');
13
+ require('../__chunks/6BYUUR4M.cjs');
15
14
 
16
15
 
17
16
 
@@ -23,4 +22,4 @@ require('../__chunks/7EQBAZ46.cjs');
23
22
 
24
23
 
25
24
 
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;
25
+ exports.batch = _WPBYRKFQcjs.batch; exports.createStore = _WPBYRKFQcjs.createStore; exports.init = _WPBYRKFQcjs.init; exports.mergeStore = _WPBYRKFQcjs.mergeStore; exports.omit = _WPBYRKFQcjs.omit; exports.pick = _WPBYRKFQcjs.pick; exports.setup = _WPBYRKFQcjs.setup; exports.subscribe = _WPBYRKFQcjs.subscribe; exports.sync = _WPBYRKFQcjs.sync; exports.throwOnConflictingProps = _WPBYRKFQcjs.throwOnConflictingProps;
@@ -2,7 +2,6 @@
2
2
 
3
3
 
4
4
  var _SHOLYDNPcjs = require('../__chunks/SHOLYDNP.cjs');
5
- require('../__chunks/7EQBAZ46.cjs');
6
5
 
7
6
 
8
7
 
@@ -17,11 +17,12 @@ function getWindow(node) {
17
17
  return getDocument(node).defaultView || window;
18
18
  }
19
19
  function getActiveElement(node, activeDescendant = false) {
20
+ var _a;
20
21
  const { activeElement } = getDocument(node);
21
22
  if (!(activeElement == null ? void 0 : activeElement.nodeName)) {
22
23
  return null;
23
24
  }
24
- if (isFrame(activeElement) && activeElement.contentDocument) {
25
+ if (isFrame(activeElement) && ((_a = activeElement.contentDocument) == null ? void 0 : _a.body)) {
25
26
  return getActiveElement(
26
27
  activeElement.contentDocument.body,
27
28
  activeDescendant
@@ -7,14 +7,10 @@ import {
7
7
  subscribe,
8
8
  sync,
9
9
  throwOnConflictingProps
10
- } from "./EWA2WL6G.js";
10
+ } from "./SXKM4CGU.js";
11
11
  import {
12
12
  defaultValue
13
- } from "./PBFD2E7P.js";
14
- import {
15
- __spreadProps,
16
- __spreadValues
17
- } from "./3YLGPPWQ.js";
13
+ } from "./XMCVU3LR.js";
18
14
 
19
15
  // src/disclosure/disclosure-store.ts
20
16
  function createDisclosureStore(props = {}) {
@@ -60,7 +56,8 @@ function createDisclosureStore(props = {}) {
60
56
  disclosure.setState("mounted", state.open || state.animating);
61
57
  })
62
58
  );
63
- return __spreadProps(__spreadValues({}, disclosure), {
59
+ return {
60
+ ...disclosure,
64
61
  disclosure: props.disclosure,
65
62
  setOpen: (value) => disclosure.setState("open", value),
66
63
  show: () => disclosure.setState("open", true),
@@ -69,7 +66,7 @@ function createDisclosureStore(props = {}) {
69
66
  stopAnimation: () => disclosure.setState("animating", false),
70
67
  setContentElement: (value) => disclosure.setState("contentElement", value),
71
68
  setDisclosureElement: (value) => disclosure.setState("disclosureElement", value)
72
- });
69
+ };
73
70
  }
74
71
 
75
72
  export {
@@ -1,29 +1,22 @@
1
1
  "use client";
2
2
  import {
3
3
  createDialogStore
4
- } from "./RZDDWCDV.js";
4
+ } from "./KMAUV3TY.js";
5
5
  import {
6
6
  createStore,
7
7
  mergeStore,
8
8
  omit,
9
9
  throwOnConflictingProps
10
- } from "./EWA2WL6G.js";
10
+ } from "./SXKM4CGU.js";
11
11
  import {
12
12
  defaultValue
13
- } from "./PBFD2E7P.js";
14
- import {
15
- __objRest,
16
- __spreadProps,
17
- __spreadValues
18
- } from "./3YLGPPWQ.js";
13
+ } from "./XMCVU3LR.js";
19
14
 
20
15
  // src/popover/popover-store.ts
21
- function createPopoverStore(_a = {}) {
22
- var _b = _a, {
23
- popover: otherPopover
24
- } = _b, props = __objRest(_b, [
25
- "popover"
26
- ]);
16
+ function createPopoverStore({
17
+ popover: otherPopover,
18
+ ...props
19
+ } = {}) {
27
20
  const store = mergeStore(
28
21
  props.store,
29
22
  omit(otherPopover, [
@@ -36,27 +29,30 @@ function createPopoverStore(_a = {}) {
36
29
  );
37
30
  throwOnConflictingProps(props, store);
38
31
  const syncState = store == null ? void 0 : store.getState();
39
- const dialog = createDialogStore(__spreadProps(__spreadValues({}, props), { store }));
32
+ const dialog = createDialogStore({ ...props, store });
40
33
  const placement = defaultValue(
41
34
  props.placement,
42
35
  syncState == null ? void 0 : syncState.placement,
43
36
  "bottom"
44
37
  );
45
- const initialState = __spreadProps(__spreadValues({}, dialog.getState()), {
38
+ const initialState = {
39
+ ...dialog.getState(),
46
40
  placement,
47
41
  currentPlacement: placement,
48
42
  anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null),
49
43
  popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null),
50
44
  arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null),
51
45
  rendered: Symbol("rendered")
52
- });
46
+ };
53
47
  const popover = createStore(initialState, dialog, store);
54
- return __spreadProps(__spreadValues(__spreadValues({}, dialog), popover), {
48
+ return {
49
+ ...dialog,
50
+ ...popover,
55
51
  setAnchorElement: (element) => popover.setState("anchorElement", element),
56
52
  setPopoverElement: (element) => popover.setState("popoverElement", element),
57
53
  setArrowElement: (element) => popover.setState("arrowElement", element),
58
54
  render: () => popover.setState("rendered", Symbol("rendered"))
59
- });
55
+ };
60
56
  }
61
57
 
62
58
  export {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  createDisclosureStore
4
- } from "./43IPP2F4.js";
4
+ } from "./75BJEVSH.js";
5
5
 
6
6
  // src/dialog/dialog-store.ts
7
7
  function createDialogStore(props = {}) {
@@ -2,22 +2,18 @@
2
2
  import {
3
3
  getDocument,
4
4
  sortBasedOnDOMPosition
5
- } from "./37JWRFYW.js";
5
+ } from "./3DNM6L6E.js";
6
6
  import {
7
7
  batch,
8
8
  createStore,
9
9
  init,
10
10
  setup,
11
11
  throwOnConflictingProps
12
- } from "./EWA2WL6G.js";
12
+ } from "./SXKM4CGU.js";
13
13
  import {
14
14
  chain,
15
15
  defaultValue
16
- } from "./PBFD2E7P.js";
17
- import {
18
- __spreadProps,
19
- __spreadValues
20
- } from "./3YLGPPWQ.js";
16
+ } from "./XMCVU3LR.js";
21
17
 
22
18
  // src/collection/collection-store.ts
23
19
  function getCommonParent(items) {
@@ -107,7 +103,7 @@ function createCollectionStore(props = {}) {
107
103
  const nextItems = items2.slice();
108
104
  if (index !== -1) {
109
105
  prevItem = items2[index];
110
- const nextItem = __spreadValues(__spreadValues({}, prevItem), item);
106
+ const nextItem = { ...prevItem, ...item };
111
107
  nextItems[index] = nextItem;
112
108
  itemsMap.set(item.id, nextItem);
113
109
  } else {
@@ -139,7 +135,8 @@ function createCollectionStore(props = {}) {
139
135
  (getItems) => privateStore.setState("items", getItems),
140
136
  true
141
137
  );
142
- return __spreadProps(__spreadValues({}, collection), {
138
+ return {
139
+ ...collection,
143
140
  registerItem,
144
141
  renderItem: (item) => chain(
145
142
  registerItem(item),
@@ -162,7 +159,7 @@ function createCollectionStore(props = {}) {
162
159
  },
163
160
  // @ts-expect-error Internal
164
161
  __unstablePrivateStore: privateStore
165
- });
162
+ };
166
163
  }
167
164
 
168
165
  export {
@@ -5,19 +5,15 @@ import {
5
5
  } from "./7PRQYBBV.js";
6
6
  import {
7
7
  createCollectionStore
8
- } from "./K2KIGYQU.js";
8
+ } from "./N5XGANPW.js";
9
9
  import {
10
10
  createStore,
11
11
  setup,
12
12
  sync
13
- } from "./EWA2WL6G.js";
13
+ } from "./SXKM4CGU.js";
14
14
  import {
15
15
  defaultValue
16
- } from "./PBFD2E7P.js";
17
- import {
18
- __spreadProps,
19
- __spreadValues
20
- } from "./3YLGPPWQ.js";
16
+ } from "./XMCVU3LR.js";
21
17
 
22
18
  // src/composite/composite-store.ts
23
19
  var NULL_ITEM = { id: null };
@@ -101,14 +97,15 @@ function verticalizeItems(items) {
101
97
  for (const row of rows) {
102
98
  const item = row[i];
103
99
  if (item) {
104
- verticalized.push(__spreadProps(__spreadValues({}, item), {
100
+ verticalized.push({
101
+ ...item,
105
102
  // If there's no rowId, it means that it's not a grid composite, but
106
103
  // a single row instead. So, instead of verticalizing it, that is,
107
104
  // assigning a different rowId based on the column index, we keep it
108
105
  // undefined so they will be part of the same row. This is useful
109
106
  // when using up/down on one-dimensional composites.
110
107
  rowId: item.rowId ? `${i}` : void 0
111
- }));
108
+ });
112
109
  }
113
110
  }
114
111
  }
@@ -123,7 +120,8 @@ function createCompositeStore(props = {}) {
123
120
  syncState == null ? void 0 : syncState.activeId,
124
121
  props.defaultActiveId
125
122
  );
126
- const initialState = __spreadProps(__spreadValues({}, collection.getState()), {
123
+ const initialState = {
124
+ ...collection.getState(),
127
125
  id: defaultValue(
128
126
  props.id,
129
127
  syncState == null ? void 0 : syncState.id,
@@ -151,7 +149,7 @@ function createCompositeStore(props = {}) {
151
149
  focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),
152
150
  focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
153
151
  focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
154
- });
152
+ };
155
153
  const composite = createStore(initialState, collection, props.store);
156
154
  setup(
157
155
  composite,
@@ -231,7 +229,9 @@ function createCompositeStore(props = {}) {
231
229
  }
232
230
  return nextItem == null ? void 0 : nextItem.id;
233
231
  };
234
- return __spreadProps(__spreadValues(__spreadValues({}, collection), composite), {
232
+ return {
233
+ ...collection,
234
+ ...composite,
235
235
  setBaseElement: (element) => composite.setState("baseElement", element),
236
236
  setActiveId: (id) => composite.setState("activeId", id),
237
237
  move: (id) => {
@@ -271,7 +271,7 @@ function createCompositeStore(props = {}) {
271
271
  }
272
272
  return getNextId("up", options);
273
273
  }
274
- });
274
+ };
275
275
  }
276
276
 
277
277
  export {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  canUseDOM
4
- } from "./37JWRFYW.js";
4
+ } from "./3DNM6L6E.js";
5
5
 
6
6
  // src/utils/platform.ts
7
7
  function isTouchDevice() {
@@ -8,11 +8,7 @@ import {
8
8
  noop,
9
9
  omit,
10
10
  pick
11
- } from "./PBFD2E7P.js";
12
- import {
13
- __spreadProps,
14
- __spreadValues
15
- } from "./3YLGPPWQ.js";
11
+ } from "./XMCVU3LR.js";
16
12
 
17
13
  // src/utils/store.ts
18
14
  function getInternal(store, key) {
@@ -107,7 +103,7 @@ function createStore(initialState, ...stores) {
107
103
  }
108
104
  }
109
105
  const prevState = state;
110
- state = __spreadProps(__spreadValues({}, state), { [key]: nextValue });
106
+ state = { ...state, [key]: nextValue };
111
107
  const thisUpdate = Symbol();
112
108
  lastUpdate = thisUpdate;
113
109
  updatedKeys.add(key);
@@ -1,40 +1,40 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "./MD3RIO2T.js";
4
+ } from "./BFGNM53A.js";
5
5
  import {
6
6
  createStore
7
- } from "./EWA2WL6G.js";
7
+ } from "./SXKM4CGU.js";
8
8
  import {
9
9
  defaultValue
10
- } from "./PBFD2E7P.js";
11
- import {
12
- __spreadProps,
13
- __spreadValues
14
- } from "./3YLGPPWQ.js";
10
+ } from "./XMCVU3LR.js";
15
11
 
16
12
  // src/hovercard/hovercard-store.ts
17
13
  function createHovercardStore(props = {}) {
18
14
  var _a;
19
15
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
20
- const popover = createPopoverStore(__spreadProps(__spreadValues({}, props), {
16
+ const popover = createPopoverStore({
17
+ ...props,
21
18
  placement: defaultValue(
22
19
  props.placement,
23
20
  syncState == null ? void 0 : syncState.placement,
24
21
  "bottom"
25
22
  )
26
- }));
23
+ });
27
24
  const timeout = defaultValue(props.timeout, syncState == null ? void 0 : syncState.timeout, 500);
28
- const initialState = __spreadProps(__spreadValues({}, popover.getState()), {
25
+ const initialState = {
26
+ ...popover.getState(),
29
27
  timeout,
30
28
  showTimeout: defaultValue(props.showTimeout, syncState == null ? void 0 : syncState.showTimeout),
31
29
  hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),
32
30
  autoFocusOnShow: defaultValue(syncState == null ? void 0 : syncState.autoFocusOnShow, false)
33
- });
31
+ };
34
32
  const hovercard = createStore(initialState, popover, props.store);
35
- return __spreadProps(__spreadValues(__spreadValues({}, popover), hovercard), {
33
+ return {
34
+ ...popover,
35
+ ...hovercard,
36
36
  setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value)
37
- });
37
+ };
38
38
  }
39
39
 
40
40
  export {
@@ -1,33 +1,35 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "./C34RJTDU.js";
4
+ } from "./RVTIKFRL.js";
5
5
  import {
6
6
  createStore
7
- } from "./EWA2WL6G.js";
7
+ } from "./SXKM4CGU.js";
8
8
  import {
9
9
  defaultValue
10
- } from "./PBFD2E7P.js";
11
- import {
12
- __spreadProps,
13
- __spreadValues
14
- } from "./3YLGPPWQ.js";
10
+ } from "./XMCVU3LR.js";
15
11
 
16
12
  // src/menubar/menubar-store.ts
17
13
  function createMenubarStore(props = {}) {
18
14
  var _a;
19
15
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
20
- const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {
16
+ const composite = createCompositeStore({
17
+ ...props,
21
18
  orientation: defaultValue(
22
19
  props.orientation,
23
20
  syncState == null ? void 0 : syncState.orientation,
24
21
  "horizontal"
25
22
  ),
26
23
  focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
27
- }));
28
- const initialState = __spreadValues({}, composite.getState());
24
+ });
25
+ const initialState = {
26
+ ...composite.getState()
27
+ };
29
28
  const menubar = createStore(initialState, composite, props.store);
30
- return __spreadValues(__spreadValues({}, composite), menubar);
29
+ return {
30
+ ...composite,
31
+ ...menubar
32
+ };
31
33
  }
32
34
 
33
35
  export {
@@ -1,7 +1,4 @@
1
1
  "use client";
2
- import {
3
- __spreadValues
4
- } from "./3YLGPPWQ.js";
5
2
 
6
3
  // src/utils/misc.ts
7
4
  function noop(..._) {
@@ -74,7 +71,7 @@ function normalizeString(str) {
74
71
  return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
75
72
  }
76
73
  function omit(object, keys) {
77
- const result = __spreadValues({}, object);
74
+ const result = { ...object };
78
75
  for (const key of keys) {
79
76
  if (hasOwnProperty(result, key)) {
80
77
  delete result[key];
@@ -2,14 +2,10 @@
2
2
  import {
3
3
  createStore,
4
4
  throwOnConflictingProps
5
- } from "../__chunks/EWA2WL6G.js";
5
+ } from "../__chunks/SXKM4CGU.js";
6
6
  import {
7
7
  defaultValue
8
- } from "../__chunks/PBFD2E7P.js";
9
- import {
10
- __spreadProps,
11
- __spreadValues
12
- } from "../__chunks/3YLGPPWQ.js";
8
+ } from "../__chunks/XMCVU3LR.js";
13
9
 
14
10
  // src/checkbox/checkbox-store.ts
15
11
  function createCheckboxStore(props = {}) {
@@ -25,9 +21,10 @@ function createCheckboxStore(props = {}) {
25
21
  )
26
22
  };
27
23
  const checkbox = createStore(initialState, props.store);
28
- return __spreadProps(__spreadValues({}, checkbox), {
24
+ return {
25
+ ...checkbox,
29
26
  setValue: (value) => checkbox.setState("value", value)
30
- });
27
+ };
31
28
  }
32
29
  export {
33
30
  createCheckboxStore
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createCollectionStore
4
- } from "../__chunks/K2KIGYQU.js";
5
- import "../__chunks/37JWRFYW.js";
6
- import "../__chunks/EWA2WL6G.js";
7
- import "../__chunks/PBFD2E7P.js";
8
- import "../__chunks/3YLGPPWQ.js";
4
+ } from "../__chunks/N5XGANPW.js";
5
+ import "../__chunks/3DNM6L6E.js";
6
+ import "../__chunks/SXKM4CGU.js";
7
+ import "../__chunks/XMCVU3LR.js";
9
8
  export {
10
9
  createCollectionStore
11
10
  };
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  isSafari,
4
4
  isTouchDevice
5
- } from "../__chunks/O6E4ZWCP.js";
5
+ } from "../__chunks/SNHYQNEZ.js";
6
6
  import {
7
7
  createPopoverStore
8
- } from "../__chunks/MD3RIO2T.js";
8
+ } from "../__chunks/BFGNM53A.js";
9
9
  import {
10
10
  createCompositeStore
11
- } from "../__chunks/C34RJTDU.js";
11
+ } from "../__chunks/RVTIKFRL.js";
12
12
  import "../__chunks/7PRQYBBV.js";
13
- import "../__chunks/RZDDWCDV.js";
14
- import "../__chunks/43IPP2F4.js";
15
- import "../__chunks/K2KIGYQU.js";
16
- import "../__chunks/37JWRFYW.js";
13
+ import "../__chunks/KMAUV3TY.js";
14
+ import "../__chunks/75BJEVSH.js";
15
+ import "../__chunks/N5XGANPW.js";
16
+ import "../__chunks/3DNM6L6E.js";
17
17
  import {
18
18
  batch,
19
19
  createStore,
@@ -22,25 +22,18 @@ import {
22
22
  setup,
23
23
  sync,
24
24
  throwOnConflictingProps
25
- } from "../__chunks/EWA2WL6G.js";
25
+ } from "../__chunks/SXKM4CGU.js";
26
26
  import {
27
27
  chain,
28
28
  defaultValue
29
- } from "../__chunks/PBFD2E7P.js";
30
- import {
31
- __objRest,
32
- __spreadProps,
33
- __spreadValues
34
- } from "../__chunks/3YLGPPWQ.js";
29
+ } from "../__chunks/XMCVU3LR.js";
35
30
 
36
31
  // src/combobox/combobox-store.ts
37
32
  var isTouchSafari = isSafari() && isTouchDevice();
38
- function createComboboxStore(_a = {}) {
39
- var _b = _a, {
40
- tag
41
- } = _b, props = __objRest(_b, [
42
- "tag"
43
- ]);
33
+ function createComboboxStore({
34
+ tag,
35
+ ...props
36
+ } = {}) {
44
37
  const store = mergeStore(props.store, pick(tag, ["value", "rtl"]));
45
38
  throwOnConflictingProps(props, store);
46
39
  const tagState = tag == null ? void 0 : tag.getState();
@@ -51,7 +44,8 @@ function createComboboxStore(_a = {}) {
51
44
  props.defaultActiveId,
52
45
  null
53
46
  );
54
- const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {
47
+ const composite = createCompositeStore({
48
+ ...props,
55
49
  activeId,
56
50
  includesBaseElement: defaultValue(
57
51
  props.includesBaseElement,
@@ -70,14 +64,15 @@ function createComboboxStore(_a = {}) {
70
64
  syncState == null ? void 0 : syncState.virtualFocus,
71
65
  true
72
66
  )
73
- }));
74
- const popover = createPopoverStore(__spreadProps(__spreadValues({}, props), {
67
+ });
68
+ const popover = createPopoverStore({
69
+ ...props,
75
70
  placement: defaultValue(
76
71
  props.placement,
77
72
  syncState == null ? void 0 : syncState.placement,
78
73
  "bottom-start"
79
74
  )
80
- }));
75
+ });
81
76
  const value = defaultValue(
82
77
  props.value,
83
78
  syncState == null ? void 0 : syncState.value,
@@ -92,7 +87,9 @@ function createComboboxStore(_a = {}) {
92
87
  ""
93
88
  );
94
89
  const multiSelectable = Array.isArray(selectedValue);
95
- const initialState = __spreadProps(__spreadValues(__spreadValues({}, composite.getState()), popover.getState()), {
90
+ const initialState = {
91
+ ...composite.getState(),
92
+ ...popover.getState(),
96
93
  value,
97
94
  selectedValue,
98
95
  resetValueOnSelect: defaultValue(
@@ -106,7 +103,7 @@ function createComboboxStore(_a = {}) {
106
103
  multiSelectable && !tag
107
104
  ),
108
105
  activeValue: syncState == null ? void 0 : syncState.activeValue
109
- });
106
+ };
110
107
  const combobox = createStore(initialState, composite, popover, store);
111
108
  if (isTouchSafari) {
112
109
  setup(
@@ -161,12 +158,15 @@ function createComboboxStore(_a = {}) {
161
158
  combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
162
159
  })
163
160
  );
164
- return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, popover), composite), combobox), {
161
+ return {
162
+ ...popover,
163
+ ...composite,
164
+ ...combobox,
165
165
  tag,
166
166
  setValue: (value2) => combobox.setState("value", value2),
167
167
  resetValue: () => combobox.setState("value", initialState.value),
168
168
  setSelectedValue: (selectedValue2) => combobox.setState("selectedValue", selectedValue2)
169
- });
169
+ };
170
170
  }
171
171
  export {
172
172
  createComboboxStore
@@ -1,12 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "../__chunks/MD3RIO2T.js";
5
- import "../__chunks/RZDDWCDV.js";
6
- import "../__chunks/43IPP2F4.js";
7
- import "../__chunks/EWA2WL6G.js";
8
- import "../__chunks/PBFD2E7P.js";
9
- import "../__chunks/3YLGPPWQ.js";
4
+ } from "../__chunks/BFGNM53A.js";
5
+ import "../__chunks/KMAUV3TY.js";
6
+ import "../__chunks/75BJEVSH.js";
7
+ import "../__chunks/SXKM4CGU.js";
8
+ import "../__chunks/XMCVU3LR.js";
10
9
 
11
10
  // src/composite/composite-overflow-store.ts
12
11
  function createCompositeOverflowStore(props = {}) {
@@ -1,13 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/C34RJTDU.js";
4
+ } from "../__chunks/RVTIKFRL.js";
5
5
  import "../__chunks/7PRQYBBV.js";
6
- import "../__chunks/K2KIGYQU.js";
7
- import "../__chunks/37JWRFYW.js";
8
- import "../__chunks/EWA2WL6G.js";
9
- import "../__chunks/PBFD2E7P.js";
10
- import "../__chunks/3YLGPPWQ.js";
6
+ import "../__chunks/N5XGANPW.js";
7
+ import "../__chunks/3DNM6L6E.js";
8
+ import "../__chunks/SXKM4CGU.js";
9
+ import "../__chunks/XMCVU3LR.js";
11
10
  export {
12
11
  createCompositeStore
13
12
  };
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createDialogStore
4
- } from "../__chunks/RZDDWCDV.js";
5
- import "../__chunks/43IPP2F4.js";
6
- import "../__chunks/EWA2WL6G.js";
7
- import "../__chunks/PBFD2E7P.js";
8
- import "../__chunks/3YLGPPWQ.js";
4
+ } from "../__chunks/KMAUV3TY.js";
5
+ import "../__chunks/75BJEVSH.js";
6
+ import "../__chunks/SXKM4CGU.js";
7
+ import "../__chunks/XMCVU3LR.js";
9
8
  export {
10
9
  createDialogStore
11
10
  };