@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
@@ -1,10 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  createDisclosureStore
4
- } from "../__chunks/43IPP2F4.js";
5
- import "../__chunks/EWA2WL6G.js";
6
- import "../__chunks/PBFD2E7P.js";
7
- import "../__chunks/3YLGPPWQ.js";
4
+ } from "../__chunks/75BJEVSH.js";
5
+ import "../__chunks/SXKM4CGU.js";
6
+ import "../__chunks/XMCVU3LR.js";
8
7
  export {
9
8
  createDisclosureStore
10
9
  };
@@ -1,25 +1,21 @@
1
1
  "use client";
2
2
  import {
3
3
  createCollectionStore
4
- } from "../__chunks/K2KIGYQU.js";
5
- import "../__chunks/37JWRFYW.js";
4
+ } from "../__chunks/N5XGANPW.js";
5
+ import "../__chunks/3DNM6L6E.js";
6
6
  import {
7
7
  createStore,
8
8
  init,
9
9
  setup,
10
10
  sync,
11
11
  throwOnConflictingProps
12
- } from "../__chunks/EWA2WL6G.js";
12
+ } from "../__chunks/SXKM4CGU.js";
13
13
  import {
14
14
  applyState,
15
15
  defaultValue,
16
16
  isInteger,
17
17
  isObject
18
- } from "../__chunks/PBFD2E7P.js";
19
- import {
20
- __spreadProps,
21
- __spreadValues
22
- } from "../__chunks/3YLGPPWQ.js";
18
+ } from "../__chunks/XMCVU3LR.js";
23
19
 
24
20
  // src/form/form-store.ts
25
21
  function nextFrame() {
@@ -65,7 +61,7 @@ function set(values, path, value) {
65
61
  nextValues2[index] = result;
66
62
  return nextValues2;
67
63
  }
68
- return __spreadProps(__spreadValues({}, values), { [key]: result });
64
+ return { ...values, [key]: result };
69
65
  }
70
66
  function setAll(values, value) {
71
67
  const result = {};
@@ -135,7 +131,8 @@ function createFormStore(props = {}) {
135
131
  props.defaultTouched,
136
132
  {}
137
133
  );
138
- const initialState = __spreadProps(__spreadValues({}, collection.getState()), {
134
+ const initialState = {
135
+ ...collection.getState(),
139
136
  values,
140
137
  errors,
141
138
  touched,
@@ -144,7 +141,7 @@ function createFormStore(props = {}) {
144
141
  submitSucceed: defaultValue(syncState == null ? void 0 : syncState.submitSucceed, 0),
145
142
  submitFailed: defaultValue(syncState == null ? void 0 : syncState.submitFailed, 0),
146
143
  valid: !hasMessages(errors)
147
- });
144
+ };
148
145
  const form = createStore(initialState, collection, props.store);
149
146
  const syncCallbacks = getStoreCallbacks(props.store);
150
147
  const syncCallbacksState = syncCallbacks == null ? void 0 : syncCallbacks.getState();
@@ -175,7 +172,9 @@ function createFormStore(props = {}) {
175
172
  form.setState("validating", false);
176
173
  }
177
174
  };
178
- return __spreadProps(__spreadValues(__spreadValues({}, collection), form), {
175
+ return {
176
+ ...collection,
177
+ ...form,
179
178
  names: createNames(),
180
179
  setValues: (values2) => form.setState("values", values2),
181
180
  getValue: (name) => get(form.getState().values, name),
@@ -268,7 +267,7 @@ function createFormStore(props = {}) {
268
267
  },
269
268
  // @ts-expect-error Internal
270
269
  __unstableCallbacks: callbacks
271
- });
270
+ };
272
271
  }
273
272
  export {
274
273
  createFormStore,
@@ -1,13 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  createHovercardStore
4
- } from "../__chunks/X2ASWIQW.js";
5
- import "../__chunks/MD3RIO2T.js";
6
- import "../__chunks/RZDDWCDV.js";
7
- import "../__chunks/43IPP2F4.js";
8
- import "../__chunks/EWA2WL6G.js";
9
- import "../__chunks/PBFD2E7P.js";
10
- import "../__chunks/3YLGPPWQ.js";
4
+ } from "../__chunks/TIQDSBWP.js";
5
+ import "../__chunks/BFGNM53A.js";
6
+ import "../__chunks/KMAUV3TY.js";
7
+ import "../__chunks/75BJEVSH.js";
8
+ import "../__chunks/SXKM4CGU.js";
9
+ import "../__chunks/XMCVU3LR.js";
11
10
  export {
12
11
  createHovercardStore
13
12
  };
package/esm/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import "./__chunks/3YLGPPWQ.js";
3
2
 
4
3
  // src/index.ts
5
4
  var src_default = {};
@@ -1,14 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createMenubarStore
4
- } from "../__chunks/76UM5ZLT.js";
5
- import "../__chunks/C34RJTDU.js";
4
+ } from "../__chunks/WSDJ6ZRB.js";
5
+ import "../__chunks/RVTIKFRL.js";
6
6
  import "../__chunks/7PRQYBBV.js";
7
- import "../__chunks/K2KIGYQU.js";
8
- import "../__chunks/37JWRFYW.js";
9
- import "../__chunks/EWA2WL6G.js";
10
- import "../__chunks/PBFD2E7P.js";
11
- import "../__chunks/3YLGPPWQ.js";
7
+ import "../__chunks/N5XGANPW.js";
8
+ import "../__chunks/3DNM6L6E.js";
9
+ import "../__chunks/SXKM4CGU.js";
10
+ import "../__chunks/XMCVU3LR.js";
12
11
 
13
12
  // src/menu/menu-bar-store.ts
14
13
  function createMenuBarStore(props = {}) {
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  createHovercardStore
4
- } from "../__chunks/X2ASWIQW.js";
5
- import "../__chunks/MD3RIO2T.js";
4
+ } from "../__chunks/TIQDSBWP.js";
5
+ import "../__chunks/BFGNM53A.js";
6
6
  import {
7
7
  createCompositeStore
8
- } from "../__chunks/C34RJTDU.js";
8
+ } from "../__chunks/RVTIKFRL.js";
9
9
  import "../__chunks/7PRQYBBV.js";
10
- import "../__chunks/RZDDWCDV.js";
11
- import "../__chunks/43IPP2F4.js";
12
- import "../__chunks/K2KIGYQU.js";
13
- import "../__chunks/37JWRFYW.js";
10
+ import "../__chunks/KMAUV3TY.js";
11
+ import "../__chunks/75BJEVSH.js";
12
+ import "../__chunks/N5XGANPW.js";
13
+ import "../__chunks/3DNM6L6E.js";
14
14
  import {
15
15
  createStore,
16
16
  mergeStore,
@@ -19,28 +19,19 @@ import {
19
19
  setup,
20
20
  sync,
21
21
  throwOnConflictingProps
22
- } from "../__chunks/EWA2WL6G.js";
22
+ } from "../__chunks/SXKM4CGU.js";
23
23
  import {
24
24
  applyState,
25
25
  defaultValue
26
- } from "../__chunks/PBFD2E7P.js";
27
- import {
28
- __objRest,
29
- __spreadProps,
30
- __spreadValues
31
- } from "../__chunks/3YLGPPWQ.js";
26
+ } from "../__chunks/XMCVU3LR.js";
32
27
 
33
28
  // src/menu/menu-store.ts
34
- function createMenuStore(_a = {}) {
35
- var _b = _a, {
36
- combobox,
37
- parent,
38
- menubar
39
- } = _b, props = __objRest(_b, [
40
- "combobox",
41
- "parent",
42
- "menubar"
43
- ]);
29
+ function createMenuStore({
30
+ combobox,
31
+ parent,
32
+ menubar,
33
+ ...props
34
+ } = {}) {
44
35
  const parentIsMenubar = !!menubar && !parent;
45
36
  const store = mergeStore(
46
37
  props.store,
@@ -55,15 +46,17 @@ function createMenuStore(_a = {}) {
55
46
  );
56
47
  throwOnConflictingProps(props, store);
57
48
  const syncState = store.getState();
58
- const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {
49
+ const composite = createCompositeStore({
50
+ ...props,
59
51
  store,
60
52
  orientation: defaultValue(
61
53
  props.orientation,
62
54
  syncState.orientation,
63
55
  "vertical"
64
56
  )
65
- }));
66
- const hovercard = createHovercardStore(__spreadProps(__spreadValues({}, props), {
57
+ });
58
+ const hovercard = createHovercardStore({
59
+ ...props,
67
60
  store,
68
61
  placement: defaultValue(
69
62
  props.placement,
@@ -76,8 +69,10 @@ function createMenuStore(_a = {}) {
76
69
  parentIsMenubar ? 0 : 150
77
70
  ),
78
71
  hideTimeout: defaultValue(props.hideTimeout, syncState.hideTimeout, 0)
79
- }));
80
- const initialState = __spreadProps(__spreadValues(__spreadValues({}, composite.getState()), hovercard.getState()), {
72
+ });
73
+ const initialState = {
74
+ ...composite.getState(),
75
+ ...hovercard.getState(),
81
76
  initialFocus: defaultValue(syncState.initialFocus, "container"),
82
77
  values: defaultValue(
83
78
  props.values,
@@ -85,7 +80,7 @@ function createMenuStore(_a = {}) {
85
80
  props.defaultValues,
86
81
  {}
87
82
  )
88
- });
83
+ };
89
84
  const menu = createStore(initialState, composite, hovercard, store);
90
85
  setup(
91
86
  menu,
@@ -103,7 +98,10 @@ function createMenuStore(_a = {}) {
103
98
  );
104
99
  })
105
100
  );
106
- return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, composite), hovercard), menu), {
101
+ return {
102
+ ...composite,
103
+ ...hovercard,
104
+ ...menu,
107
105
  combobox,
108
106
  parent,
109
107
  menubar,
@@ -121,12 +119,13 @@ function createMenuStore(_a = {}) {
121
119
  const prevValue = values[name];
122
120
  const nextValue = applyState(value, prevValue);
123
121
  if (nextValue === prevValue) return values;
124
- return __spreadProps(__spreadValues({}, values), {
122
+ return {
123
+ ...values,
125
124
  [name]: nextValue !== void 0 && nextValue
126
- });
125
+ };
127
126
  });
128
127
  }
129
- });
128
+ };
130
129
  }
131
130
  export {
132
131
  createMenuStore
@@ -1,14 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createMenubarStore
4
- } from "../__chunks/76UM5ZLT.js";
5
- import "../__chunks/C34RJTDU.js";
4
+ } from "../__chunks/WSDJ6ZRB.js";
5
+ import "../__chunks/RVTIKFRL.js";
6
6
  import "../__chunks/7PRQYBBV.js";
7
- import "../__chunks/K2KIGYQU.js";
8
- import "../__chunks/37JWRFYW.js";
9
- import "../__chunks/EWA2WL6G.js";
10
- import "../__chunks/PBFD2E7P.js";
11
- import "../__chunks/3YLGPPWQ.js";
7
+ import "../__chunks/N5XGANPW.js";
8
+ import "../__chunks/3DNM6L6E.js";
9
+ import "../__chunks/SXKM4CGU.js";
10
+ import "../__chunks/XMCVU3LR.js";
12
11
  export {
13
12
  createMenubarStore
14
13
  };
@@ -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
  export {
11
10
  createPopoverStore
12
11
  };
@@ -1,42 +1,42 @@
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";
6
+ import "../__chunks/N5XGANPW.js";
7
+ import "../__chunks/3DNM6L6E.js";
8
8
  import {
9
9
  createStore
10
- } from "../__chunks/EWA2WL6G.js";
10
+ } from "../__chunks/SXKM4CGU.js";
11
11
  import {
12
12
  defaultValue
13
- } from "../__chunks/PBFD2E7P.js";
14
- import {
15
- __objRest,
16
- __spreadProps,
17
- __spreadValues
18
- } from "../__chunks/3YLGPPWQ.js";
13
+ } from "../__chunks/XMCVU3LR.js";
19
14
 
20
15
  // src/radio/radio-store.ts
21
- function createRadioStore(_a = {}) {
22
- var props = __objRest(_a, []);
23
- var _a2;
24
- const syncState = (_a2 = props.store) == null ? void 0 : _a2.getState();
25
- const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {
16
+ function createRadioStore({
17
+ ...props
18
+ } = {}) {
19
+ var _a;
20
+ const syncState = (_a = props.store) == null ? void 0 : _a.getState();
21
+ const composite = createCompositeStore({
22
+ ...props,
26
23
  focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
27
- }));
28
- const initialState = __spreadProps(__spreadValues({}, composite.getState()), {
24
+ });
25
+ const initialState = {
26
+ ...composite.getState(),
29
27
  value: defaultValue(
30
28
  props.value,
31
29
  syncState == null ? void 0 : syncState.value,
32
30
  props.defaultValue,
33
31
  null
34
32
  )
35
- });
33
+ };
36
34
  const radio = createStore(initialState, composite, props.store);
37
- return __spreadProps(__spreadValues(__spreadValues({}, composite), radio), {
35
+ return {
36
+ ...composite,
37
+ ...radio,
38
38
  setValue: (value) => radio.setState("value", value)
39
- });
39
+ };
40
40
  }
41
41
  export {
42
42
  createRadioStore
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "../__chunks/MD3RIO2T.js";
4
+ } from "../__chunks/BFGNM53A.js";
5
5
  import {
6
6
  createCompositeStore
7
- } from "../__chunks/C34RJTDU.js";
7
+ } from "../__chunks/RVTIKFRL.js";
8
8
  import {
9
9
  toArray
10
10
  } from "../__chunks/7PRQYBBV.js";
11
- import "../__chunks/RZDDWCDV.js";
12
- import "../__chunks/43IPP2F4.js";
13
- import "../__chunks/K2KIGYQU.js";
14
- import "../__chunks/37JWRFYW.js";
11
+ import "../__chunks/KMAUV3TY.js";
12
+ import "../__chunks/75BJEVSH.js";
13
+ import "../__chunks/N5XGANPW.js";
14
+ import "../__chunks/3DNM6L6E.js";
15
15
  import {
16
16
  batch,
17
17
  createStore,
@@ -20,23 +20,16 @@ import {
20
20
  setup,
21
21
  sync,
22
22
  throwOnConflictingProps
23
- } from "../__chunks/EWA2WL6G.js";
23
+ } from "../__chunks/SXKM4CGU.js";
24
24
  import {
25
25
  defaultValue
26
- } from "../__chunks/PBFD2E7P.js";
27
- import {
28
- __objRest,
29
- __spreadProps,
30
- __spreadValues
31
- } from "../__chunks/3YLGPPWQ.js";
26
+ } from "../__chunks/XMCVU3LR.js";
32
27
 
33
28
  // src/select/select-store.ts
34
- function createSelectStore(_a = {}) {
35
- var _b = _a, {
36
- combobox
37
- } = _b, props = __objRest(_b, [
38
- "combobox"
39
- ]);
29
+ function createSelectStore({
30
+ combobox,
31
+ ...props
32
+ } = {}) {
40
33
  const store = mergeStore(
41
34
  props.store,
42
35
  omit(combobox, [
@@ -53,7 +46,8 @@ function createSelectStore(_a = {}) {
53
46
  );
54
47
  throwOnConflictingProps(props, store);
55
48
  const syncState = store.getState();
56
- const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {
49
+ const composite = createCompositeStore({
50
+ ...props,
57
51
  store,
58
52
  virtualFocus: defaultValue(
59
53
  props.virtualFocus,
@@ -76,17 +70,20 @@ function createSelectStore(_a = {}) {
76
70
  syncState.orientation,
77
71
  "vertical"
78
72
  )
79
- }));
80
- const popover = createPopoverStore(__spreadProps(__spreadValues({}, props), {
73
+ });
74
+ const popover = createPopoverStore({
75
+ ...props,
81
76
  store,
82
77
  placement: defaultValue(
83
78
  props.placement,
84
79
  syncState.placement,
85
80
  "bottom-start"
86
81
  )
87
- }));
82
+ });
88
83
  const initialValue = new String("");
89
- const initialState = __spreadProps(__spreadValues(__spreadValues({}, composite.getState()), popover.getState()), {
84
+ const initialState = {
85
+ ...composite.getState(),
86
+ ...popover.getState(),
90
87
  value: defaultValue(
91
88
  props.value,
92
89
  syncState.value,
@@ -101,7 +98,7 @@ function createSelectStore(_a = {}) {
101
98
  labelElement: defaultValue(syncState.labelElement, null),
102
99
  selectElement: defaultValue(syncState.selectElement, null),
103
100
  listElement: defaultValue(syncState.listElement, null)
104
- });
101
+ };
105
102
  const select = createStore(initialState, composite, popover, store);
106
103
  setup(
107
104
  select,
@@ -150,13 +147,16 @@ function createSelectStore(_a = {}) {
150
147
  select.setState("value", item.value);
151
148
  })
152
149
  );
153
- return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, composite), popover), select), {
150
+ return {
151
+ ...composite,
152
+ ...popover,
153
+ ...select,
154
154
  combobox,
155
155
  setValue: (value) => select.setState("value", value),
156
156
  setLabelElement: (element) => select.setState("labelElement", element),
157
157
  setSelectElement: (element) => select.setState("selectElement", element),
158
158
  setListElement: (element) => select.setState("listElement", element)
159
- });
159
+ };
160
160
  }
161
161
  export {
162
162
  createSelectStore
@@ -1,12 +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
6
  import {
7
7
  createCollectionStore
8
- } from "../__chunks/K2KIGYQU.js";
9
- import "../__chunks/37JWRFYW.js";
8
+ } from "../__chunks/N5XGANPW.js";
9
+ import "../__chunks/3DNM6L6E.js";
10
10
  import {
11
11
  batch,
12
12
  createStore,
@@ -14,26 +14,18 @@ import {
14
14
  omit,
15
15
  setup,
16
16
  sync
17
- } from "../__chunks/EWA2WL6G.js";
17
+ } from "../__chunks/SXKM4CGU.js";
18
18
  import {
19
19
  chain,
20
20
  defaultValue
21
- } from "../__chunks/PBFD2E7P.js";
22
- import {
23
- __objRest,
24
- __spreadProps,
25
- __spreadValues
26
- } from "../__chunks/3YLGPPWQ.js";
21
+ } from "../__chunks/XMCVU3LR.js";
27
22
 
28
23
  // src/tab/tab-store.ts
29
- function createTabStore(_a = {}) {
30
- var _b = _a, {
31
- composite: parentComposite,
32
- combobox
33
- } = _b, props = __objRest(_b, [
34
- "composite",
35
- "combobox"
36
- ]);
24
+ function createTabStore({
25
+ composite: parentComposite,
26
+ combobox,
27
+ ...props
28
+ } = {}) {
37
29
  const independentKeys = [
38
30
  "items",
39
31
  "renderedItems",
@@ -52,7 +44,8 @@ function createTabStore(_a = {}) {
52
44
  omit(combobox, independentKeys)
53
45
  );
54
46
  const syncState = store == null ? void 0 : store.getState();
55
- const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {
47
+ const composite = createCompositeStore({
48
+ ...props,
56
49
  store,
57
50
  // We need to explicitly set the default value of `includesBaseElement` to
58
51
  // `false` since we don't want the composite store to default it to `true`
@@ -69,9 +62,10 @@ function createTabStore(_a = {}) {
69
62
  "horizontal"
70
63
  ),
71
64
  focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
72
- }));
65
+ });
73
66
  const panels = createCollectionStore();
74
- const initialState = __spreadProps(__spreadValues({}, composite.getState()), {
67
+ const initialState = {
68
+ ...composite.getState(),
75
69
  selectedId: defaultValue(
76
70
  props.selectedId,
77
71
  syncState == null ? void 0 : syncState.selectedId,
@@ -82,7 +76,7 @@ function createTabStore(_a = {}) {
82
76
  syncState == null ? void 0 : syncState.selectOnMove,
83
77
  true
84
78
  )
85
- });
79
+ };
86
80
  const tab = createStore(initialState, composite, store);
87
81
  setup(
88
82
  tab,
@@ -138,7 +132,7 @@ function createTabStore(_a = {}) {
138
132
  if (panel.tabId) return;
139
133
  const tabItem = tabs[i];
140
134
  if (!tabItem) return;
141
- panels.renderItem(__spreadProps(__spreadValues({}, panel), { tabId: tabItem.id }));
135
+ panels.renderItem({ ...panel, tabId: tabItem.id });
142
136
  });
143
137
  });
144
138
  })
@@ -164,14 +158,16 @@ function createTabStore(_a = {}) {
164
158
  sync(combobox, ["mounted"], restoreSelectedId)
165
159
  );
166
160
  });
167
- return __spreadProps(__spreadValues(__spreadValues({}, composite), tab), {
161
+ return {
162
+ ...composite,
163
+ ...tab,
168
164
  panels,
169
165
  setSelectedId: (id) => tab.setState("selectedId", id),
170
166
  select: (id) => {
171
167
  tab.setState("selectedId", id);
172
168
  composite.move(id);
173
169
  }
174
- });
170
+ };
175
171
  }
176
172
  export {
177
173
  createTabStore
@@ -4,30 +4,27 @@ import {
4
4
  } from "../__chunks/7LM4Q2XB.js";
5
5
  import {
6
6
  createCompositeStore
7
- } from "../__chunks/C34RJTDU.js";
7
+ } from "../__chunks/RVTIKFRL.js";
8
8
  import "../__chunks/7PRQYBBV.js";
9
- import "../__chunks/K2KIGYQU.js";
10
- import "../__chunks/37JWRFYW.js";
9
+ import "../__chunks/N5XGANPW.js";
10
+ import "../__chunks/3DNM6L6E.js";
11
11
  import {
12
12
  createStore,
13
13
  setup,
14
14
  sync
15
- } from "../__chunks/EWA2WL6G.js";
15
+ } from "../__chunks/SXKM4CGU.js";
16
16
  import {
17
17
  applyState,
18
18
  defaultValue
19
- } from "../__chunks/PBFD2E7P.js";
20
- import {
21
- __spreadProps,
22
- __spreadValues
23
- } from "../__chunks/3YLGPPWQ.js";
19
+ } from "../__chunks/XMCVU3LR.js";
24
20
 
25
21
  // src/tag/tag-store.ts
26
22
  function createTagStore(props = {}) {
27
23
  var _a;
28
24
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
29
25
  const composite = createCompositeStore(props);
30
- const initialState = __spreadProps(__spreadValues({}, composite.getState()), {
26
+ const initialState = {
27
+ ...composite.getState(),
31
28
  inputElement: defaultValue(syncState == null ? void 0 : syncState.inputElement, null),
32
29
  labelElement: defaultValue(syncState == null ? void 0 : syncState.labelElement, null),
33
30
  value: defaultValue(props.value, syncState == null ? void 0 : syncState.value, props.defaultValue, ""),
@@ -37,7 +34,7 @@ function createTagStore(props = {}) {
37
34
  props.defaultValues,
38
35
  []
39
36
  )
40
- });
37
+ };
41
38
  const tag = createStore(initialState, composite, props.store);
42
39
  setup(
43
40
  tag,
@@ -66,7 +63,9 @@ function createTagStore(props = {}) {
66
63
  };
67
64
  });
68
65
  };
69
- return __spreadProps(__spreadValues(__spreadValues({}, composite), tag), {
66
+ return {
67
+ ...composite,
68
+ ...tag,
70
69
  setInputElement: (inputElement) => tag.setState("inputElement", inputElement),
71
70
  setLabelElement: (labelElement) => tag.setState("labelElement", labelElement),
72
71
  setValue: (value) => tag.setState("value", value),
@@ -79,7 +78,7 @@ function createTagStore(props = {}) {
79
78
  });
80
79
  },
81
80
  removeValue: (value) => setValues((values) => values.filter((v) => v !== value))
82
- });
81
+ };
83
82
  }
84
83
  export {
85
84
  createTagStore