@ariakit/core 0.3.11 → 0.4.1

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 (102) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/cjs/__chunks/{E53JW5BD.cjs → 5JEQEZFR.cjs} +12 -12
  3. package/cjs/__chunks/{YIUPKKEK.cjs → 7DU6YMLQ.cjs} +6 -6
  4. package/cjs/__chunks/{OTVLDMN2.cjs → AETQC2AR.cjs} +17 -16
  5. package/cjs/__chunks/{F6HPKLO2.cjs → B4LYZ4EM.cjs} +12 -12
  6. package/cjs/__chunks/{KBNYGXWI.cjs → EEDWPDM2.cjs} +11 -1
  7. package/cjs/__chunks/{MI6NUQYQ.cjs → FFZYCAXA.cjs} +15 -15
  8. package/cjs/__chunks/{I3Y4EXEF.cjs → LTLFSC4X.cjs} +2 -2
  9. package/cjs/__chunks/{NOFH2BLB.cjs → SU2BSHGB.cjs} +7 -7
  10. package/cjs/__chunks/{TQTGWD5K.cjs → UEZLSKZ4.cjs} +10 -10
  11. package/cjs/__chunks/{5F4DVUNS.cjs → UKR6TQI3.cjs} +1 -2
  12. package/cjs/__chunks/{BFE5R4EZ.cjs → Y7KNI5NS.cjs} +17 -17
  13. package/cjs/checkbox/checkbox-store.cjs +5 -5
  14. package/cjs/collection/collection-store.cjs +5 -5
  15. package/cjs/combobox/combobox-store.cjs +35 -35
  16. package/cjs/combobox/combobox-store.d.cts +13 -8
  17. package/cjs/combobox/combobox-store.d.ts +13 -8
  18. package/cjs/composite/composite-overflow-store.cjs +6 -6
  19. package/cjs/composite/composite-store.cjs +6 -6
  20. package/cjs/composite/composite-store.d.cts +4 -0
  21. package/cjs/composite/composite-store.d.ts +4 -0
  22. package/cjs/dialog/dialog-store.cjs +5 -5
  23. package/cjs/disclosure/disclosure-store.cjs +4 -4
  24. package/cjs/disclosure/disclosure-store.d.cts +6 -2
  25. package/cjs/disclosure/disclosure-store.d.ts +6 -2
  26. package/cjs/form/form-store.cjs +24 -24
  27. package/cjs/hovercard/hovercard-store.cjs +7 -7
  28. package/cjs/hovercard/hovercard-store.d.cts +2 -4
  29. package/cjs/hovercard/hovercard-store.d.ts +2 -4
  30. package/cjs/menu/menu-bar-store.cjs +7 -7
  31. package/cjs/menu/menu-store.cjs +27 -27
  32. package/cjs/menu/menu-store.d.cts +7 -7
  33. package/cjs/menu/menu-store.d.ts +7 -7
  34. package/cjs/menubar/menubar-store.cjs +7 -7
  35. package/cjs/popover/popover-store.cjs +6 -6
  36. package/cjs/radio/radio-store.cjs +9 -9
  37. package/cjs/radio/radio-store.d.cts +2 -4
  38. package/cjs/radio/radio-store.d.ts +2 -4
  39. package/cjs/select/select-store.cjs +29 -29
  40. package/cjs/select/select-store.d.cts +1 -3
  41. package/cjs/select/select-store.d.ts +1 -3
  42. package/cjs/tab/tab-store.cjs +21 -21
  43. package/cjs/toolbar/toolbar-store.cjs +8 -8
  44. package/cjs/toolbar/toolbar-store.d.cts +1 -1
  45. package/cjs/toolbar/toolbar-store.d.ts +1 -1
  46. package/cjs/tooltip/tooltip-store.cjs +21 -12
  47. package/cjs/tooltip/tooltip-store.d.cts +1 -1
  48. package/cjs/tooltip/tooltip-store.d.ts +1 -1
  49. package/cjs/utils/dom.cjs +2 -2
  50. package/cjs/utils/events.cjs +5 -5
  51. package/cjs/utils/focus.cjs +13 -13
  52. package/cjs/utils/misc.cjs +4 -2
  53. package/cjs/utils/misc.d.cts +4 -0
  54. package/cjs/utils/misc.d.ts +4 -0
  55. package/cjs/utils/platform.cjs +3 -3
  56. package/cjs/utils/store.cjs +3 -3
  57. package/esm/__chunks/{Y3OOHFCN.js → 22HHDS5F.js} +10 -0
  58. package/esm/__chunks/{IERTEJ3A.js → 2H5K47H4.js} +3 -3
  59. package/esm/__chunks/{SX2XFD6A.js → 5RJNXXU2.js} +1 -1
  60. package/esm/__chunks/{SOLWE6E5.js → BRS7GKWU.js} +3 -3
  61. package/esm/__chunks/{AF6IUUFN.js → MFZZDIHG.js} +3 -3
  62. package/esm/__chunks/{XU3EOSCU.js → PXYVPXSS.js} +3 -3
  63. package/esm/__chunks/{EAHJFCU4.js → R676XYVY.js} +1 -1
  64. package/esm/__chunks/{DLOEKDPY.js → RRSZHCH6.js} +1 -2
  65. package/esm/__chunks/{22K762VQ.js → URUD7X4C.js} +3 -3
  66. package/esm/__chunks/{MHPO2BXA.js → VDNATJW2.js} +1 -1
  67. package/esm/__chunks/{Z5IGYIPT.js → WCKXDMU7.js} +3 -2
  68. package/esm/checkbox/checkbox-store.js +2 -2
  69. package/esm/collection/collection-store.js +4 -4
  70. package/esm/combobox/combobox-store.d.ts +13 -8
  71. package/esm/combobox/combobox-store.js +9 -9
  72. package/esm/composite/composite-overflow-store.js +5 -5
  73. package/esm/composite/composite-store.d.ts +4 -0
  74. package/esm/composite/composite-store.js +5 -5
  75. package/esm/dialog/dialog-store.js +4 -4
  76. package/esm/disclosure/disclosure-store.d.ts +6 -2
  77. package/esm/disclosure/disclosure-store.js +3 -3
  78. package/esm/form/form-store.js +4 -4
  79. package/esm/hovercard/hovercard-store.d.ts +2 -4
  80. package/esm/hovercard/hovercard-store.js +6 -6
  81. package/esm/menu/menu-bar-store.js +6 -6
  82. package/esm/menu/menu-store.d.ts +7 -7
  83. package/esm/menu/menu-store.js +9 -9
  84. package/esm/menubar/menubar-store.js +6 -6
  85. package/esm/popover/popover-store.js +5 -5
  86. package/esm/radio/radio-store.d.ts +2 -4
  87. package/esm/radio/radio-store.js +5 -5
  88. package/esm/select/select-store.d.ts +1 -3
  89. package/esm/select/select-store.js +8 -8
  90. package/esm/tab/tab-store.js +5 -5
  91. package/esm/toolbar/toolbar-store.d.ts +1 -1
  92. package/esm/toolbar/toolbar-store.js +5 -5
  93. package/esm/tooltip/tooltip-store.d.ts +1 -1
  94. package/esm/tooltip/tooltip-store.js +15 -6
  95. package/esm/utils/dom.js +1 -1
  96. package/esm/utils/events.js +2 -2
  97. package/esm/utils/focus.js +1 -1
  98. package/esm/utils/misc.d.ts +4 -0
  99. package/esm/utils/misc.js +3 -1
  100. package/esm/utils/platform.js +2 -2
  101. package/esm/utils/store.js +2 -2
  102. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _MI6NUQYQcjs = require('../__chunks/MI6NUQYQ.cjs');
5
- require('../__chunks/F6HPKLO2.cjs');
6
- require('../__chunks/KBNYGXWI.cjs');
7
- require('../__chunks/5F4DVUNS.cjs');
4
+ var _FFZYCAXAcjs = require('../__chunks/FFZYCAXA.cjs');
5
+ require('../__chunks/B4LYZ4EM.cjs');
6
+ require('../__chunks/EEDWPDM2.cjs');
7
+ require('../__chunks/UKR6TQI3.cjs');
8
8
  require('../__chunks/AV6KTKLE.cjs');
9
9
 
10
10
 
11
- exports.createCollectionStore = _MI6NUQYQcjs.createCollectionStore;
11
+ exports.createCollectionStore = _FFZYCAXAcjs.createCollectionStore;
@@ -1,28 +1,28 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _E53JW5BDcjs = require('../__chunks/E53JW5BD.cjs');
5
- require('../__chunks/I3Y4EXEF.cjs');
6
- require('../__chunks/OTVLDMN2.cjs');
4
+ var _5JEQEZFRcjs = require('../__chunks/5JEQEZFR.cjs');
5
+ require('../__chunks/LTLFSC4X.cjs');
6
+ require('../__chunks/AETQC2AR.cjs');
7
7
 
8
8
 
9
- var _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
10
- require('../__chunks/MI6NUQYQ.cjs');
9
+ var _Y7KNI5NScjs = require('../__chunks/Y7KNI5NS.cjs');
10
+ require('../__chunks/FFZYCAXA.cjs');
11
11
 
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
- var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
17
+ var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
18
18
 
19
19
 
20
- var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
20
+ var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
21
21
 
22
22
 
23
23
 
24
- var _YIUPKKEKcjs = require('../__chunks/YIUPKKEK.cjs');
25
- require('../__chunks/5F4DVUNS.cjs');
24
+ var _7DU6YMLQcjs = require('../__chunks/7DU6YMLQ.cjs');
25
+ require('../__chunks/UKR6TQI3.cjs');
26
26
  require('../__chunks/ULSPM3Y3.cjs');
27
27
 
28
28
 
@@ -30,51 +30,51 @@ require('../__chunks/ULSPM3Y3.cjs');
30
30
  var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
31
31
 
32
32
  // src/combobox/combobox-store.ts
33
- var isSafariOnMobile = _YIUPKKEKcjs.isSafari.call(void 0, ) && _YIUPKKEKcjs.isTouchDevice.call(void 0, );
33
+ var isSafariOnMobile = _7DU6YMLQcjs.isSafari.call(void 0, ) && _7DU6YMLQcjs.isTouchDevice.call(void 0, );
34
34
  function createComboboxStore(props = {}) {
35
35
  var _a;
36
- _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, props.store);
36
+ _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, props.store);
37
37
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
38
- const activeId = _KBNYGXWIcjs.defaultValue.call(void 0,
38
+ const activeId = _EEDWPDM2cjs.defaultValue.call(void 0,
39
39
  props.activeId,
40
40
  syncState == null ? void 0 : syncState.activeId,
41
41
  props.defaultActiveId,
42
42
  null
43
43
  );
44
- const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
44
+ const composite = _Y7KNI5NScjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
45
45
  activeId,
46
- includesBaseElement: _KBNYGXWIcjs.defaultValue.call(void 0,
46
+ includesBaseElement: _EEDWPDM2cjs.defaultValue.call(void 0,
47
47
  props.includesBaseElement,
48
48
  syncState == null ? void 0 : syncState.includesBaseElement,
49
49
  true
50
50
  ),
51
- orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
51
+ orientation: _EEDWPDM2cjs.defaultValue.call(void 0,
52
52
  props.orientation,
53
53
  syncState == null ? void 0 : syncState.orientation,
54
54
  "vertical"
55
55
  ),
56
- focusLoop: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true),
57
- focusWrap: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, true),
58
- virtualFocus: _KBNYGXWIcjs.defaultValue.call(void 0,
56
+ focusLoop: _EEDWPDM2cjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true),
57
+ focusWrap: _EEDWPDM2cjs.defaultValue.call(void 0, props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, true),
58
+ virtualFocus: _EEDWPDM2cjs.defaultValue.call(void 0,
59
59
  props.virtualFocus,
60
60
  syncState == null ? void 0 : syncState.virtualFocus,
61
61
  !isSafariOnMobile
62
62
  )
63
63
  }));
64
- const popover = _E53JW5BDcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
65
- placement: _KBNYGXWIcjs.defaultValue.call(void 0,
64
+ const popover = _5JEQEZFRcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
65
+ placement: _EEDWPDM2cjs.defaultValue.call(void 0,
66
66
  props.placement,
67
67
  syncState == null ? void 0 : syncState.placement,
68
68
  "bottom-start"
69
69
  )
70
70
  }));
71
- const value = _KBNYGXWIcjs.defaultValue.call(void 0,
71
+ const value = _EEDWPDM2cjs.defaultValue.call(void 0,
72
72
  props.value,
73
73
  syncState == null ? void 0 : syncState.value,
74
74
  props.defaultValue,
75
75
  ""
76
76
  );
77
- const selectedValue = _KBNYGXWIcjs.defaultValue.call(void 0,
77
+ const selectedValue = _EEDWPDM2cjs.defaultValue.call(void 0,
78
78
  props.selectedValue,
79
79
  syncState == null ? void 0 : syncState.selectedValue,
80
80
  props.defaultSelectedValue,
@@ -84,22 +84,22 @@ function createComboboxStore(props = {}) {
84
84
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState()), popover.getState()), {
85
85
  value,
86
86
  selectedValue,
87
- resetValueOnSelect: _KBNYGXWIcjs.defaultValue.call(void 0,
87
+ resetValueOnSelect: _EEDWPDM2cjs.defaultValue.call(void 0,
88
88
  props.resetValueOnSelect,
89
89
  syncState == null ? void 0 : syncState.resetValueOnSelect,
90
90
  multiSelectable
91
91
  ),
92
- resetValueOnHide: _KBNYGXWIcjs.defaultValue.call(void 0,
92
+ resetValueOnHide: _EEDWPDM2cjs.defaultValue.call(void 0,
93
93
  props.resetValueOnHide,
94
94
  syncState == null ? void 0 : syncState.resetValueOnHide,
95
95
  multiSelectable
96
96
  ),
97
97
  activeValue: syncState == null ? void 0 : syncState.activeValue
98
98
  });
99
- const combobox = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, popover, props.store);
100
- _F6HPKLO2cjs.setup.call(void 0,
99
+ const combobox = _B4LYZ4EMcjs.createStore.call(void 0, initialState, composite, popover, props.store);
100
+ _B4LYZ4EMcjs.setup.call(void 0,
101
101
  combobox,
102
- () => _F6HPKLO2cjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
102
+ () => _B4LYZ4EMcjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
103
103
  if (!state.resetValueOnHide)
104
104
  return;
105
105
  if (state.mounted)
@@ -107,34 +107,34 @@ function createComboboxStore(props = {}) {
107
107
  combobox.setState("value", value);
108
108
  })
109
109
  );
110
- _F6HPKLO2cjs.setup.call(void 0,
110
+ _B4LYZ4EMcjs.setup.call(void 0,
111
111
  combobox,
112
- () => _F6HPKLO2cjs.sync.call(void 0, combobox, ["resetValueOnSelect", "selectedValue"], (state) => {
112
+ () => _B4LYZ4EMcjs.sync.call(void 0, combobox, ["resetValueOnSelect", "selectedValue"], (state) => {
113
113
  if (!state.resetValueOnSelect)
114
114
  return;
115
115
  combobox.setState("value", value);
116
116
  })
117
117
  );
118
- _F6HPKLO2cjs.setup.call(void 0,
118
+ _B4LYZ4EMcjs.setup.call(void 0,
119
119
  combobox,
120
- () => _F6HPKLO2cjs.batch.call(void 0, combobox, ["mounted"], (state) => {
120
+ () => _B4LYZ4EMcjs.batch.call(void 0, combobox, ["mounted"], (state) => {
121
121
  if (state.mounted)
122
122
  return;
123
123
  combobox.setState("activeId", activeId);
124
124
  combobox.setState("moves", 0);
125
125
  })
126
126
  );
127
- _F6HPKLO2cjs.setup.call(void 0,
127
+ _B4LYZ4EMcjs.setup.call(void 0,
128
128
  combobox,
129
- () => _F6HPKLO2cjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
129
+ () => _B4LYZ4EMcjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
130
130
  if (state.moves === prevState.moves) {
131
131
  combobox.setState("activeValue", void 0);
132
132
  }
133
133
  })
134
134
  );
135
- _F6HPKLO2cjs.setup.call(void 0,
135
+ _B4LYZ4EMcjs.setup.call(void 0,
136
136
  combobox,
137
- () => _F6HPKLO2cjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
137
+ () => _B4LYZ4EMcjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
138
138
  if (state.moves === prev.moves)
139
139
  return;
140
140
  const { activeId: activeId2 } = combobox.getState();
@@ -13,10 +13,16 @@ export interface ComboboxStoreItem extends CompositeStoreItem {
13
13
  value?: string;
14
14
  }
15
15
  export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreState<ComboboxStoreItem>, PopoverStoreState {
16
- /**
17
- * @default true
18
- */
19
- includesBaseElement: boolean;
16
+ /** @default true */
17
+ includesBaseElement: CompositeStoreState<ComboboxStoreItem>["includesBaseElement"];
18
+ /** @default true */
19
+ focusLoop: CompositeStoreState<ComboboxStoreItem>["focusLoop"];
20
+ /** @default true */
21
+ focusWrap: CompositeStoreState<ComboboxStoreItem>["focusWrap"];
22
+ /** @default "vertical" */
23
+ orientation: CompositeStoreState<ComboboxStoreItem>["orientation"];
24
+ /** @default true */
25
+ virtualFocus: CompositeStoreState<ComboboxStoreItem>["virtualFocus"];
20
26
  /**
21
27
  * The combobox input value.
22
28
  *
@@ -63,6 +69,7 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
63
69
  * - [Select with Combobox](https://ariakit.org/examples/select-combobox)
64
70
  * - [Submenu with
65
71
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
72
+ * - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
66
73
  */
67
74
  resetValueOnHide: boolean;
68
75
  /**
@@ -100,10 +107,8 @@ export interface ComboboxStoreFunctions<T extends ComboboxStoreSelectedValue = C
100
107
  */
101
108
  setSelectedValue: SetState<ComboboxStoreState<T>["selectedValue"]>;
102
109
  }
103
- export interface ComboboxStoreOptions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreOptions<ComboboxStoreItem>, PopoverStoreOptions, StoreOptions<ComboboxStoreState<T>, "includesBaseElement" | "value" | "selectedValue" | "resetValueOnHide" | "resetValueOnSelect"> {
104
- /**
105
- * @default null
106
- */
110
+ export interface ComboboxStoreOptions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends StoreOptions<ComboboxStoreState<T>, "includesBaseElement" | "focusLoop" | "focusWrap" | "orientation" | "virtualFocus" | "value" | "selectedValue" | "resetValueOnHide" | "resetValueOnSelect">, CompositeStoreOptions<ComboboxStoreItem>, PopoverStoreOptions {
111
+ /** @default null */
107
112
  defaultActiveId?: CompositeStoreOptions<ComboboxStoreItem>["activeId"];
108
113
  /**
109
114
  * The initial value of the combobox input.
@@ -13,10 +13,16 @@ export interface ComboboxStoreItem extends CompositeStoreItem {
13
13
  value?: string;
14
14
  }
15
15
  export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreState<ComboboxStoreItem>, PopoverStoreState {
16
- /**
17
- * @default true
18
- */
19
- includesBaseElement: boolean;
16
+ /** @default true */
17
+ includesBaseElement: CompositeStoreState<ComboboxStoreItem>["includesBaseElement"];
18
+ /** @default true */
19
+ focusLoop: CompositeStoreState<ComboboxStoreItem>["focusLoop"];
20
+ /** @default true */
21
+ focusWrap: CompositeStoreState<ComboboxStoreItem>["focusWrap"];
22
+ /** @default "vertical" */
23
+ orientation: CompositeStoreState<ComboboxStoreItem>["orientation"];
24
+ /** @default true */
25
+ virtualFocus: CompositeStoreState<ComboboxStoreItem>["virtualFocus"];
20
26
  /**
21
27
  * The combobox input value.
22
28
  *
@@ -63,6 +69,7 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
63
69
  * - [Select with Combobox](https://ariakit.org/examples/select-combobox)
64
70
  * - [Submenu with
65
71
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
72
+ * - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
66
73
  */
67
74
  resetValueOnHide: boolean;
68
75
  /**
@@ -100,10 +107,8 @@ export interface ComboboxStoreFunctions<T extends ComboboxStoreSelectedValue = C
100
107
  */
101
108
  setSelectedValue: SetState<ComboboxStoreState<T>["selectedValue"]>;
102
109
  }
103
- export interface ComboboxStoreOptions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreOptions<ComboboxStoreItem>, PopoverStoreOptions, StoreOptions<ComboboxStoreState<T>, "includesBaseElement" | "value" | "selectedValue" | "resetValueOnHide" | "resetValueOnSelect"> {
104
- /**
105
- * @default null
106
- */
110
+ export interface ComboboxStoreOptions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends StoreOptions<ComboboxStoreState<T>, "includesBaseElement" | "focusLoop" | "focusWrap" | "orientation" | "virtualFocus" | "value" | "selectedValue" | "resetValueOnHide" | "resetValueOnSelect">, CompositeStoreOptions<ComboboxStoreItem>, PopoverStoreOptions {
111
+ /** @default null */
107
112
  defaultActiveId?: CompositeStoreOptions<ComboboxStoreItem>["activeId"];
108
113
  /**
109
114
  * The initial value of the combobox input.
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _E53JW5BDcjs = require('../__chunks/E53JW5BD.cjs');
5
- require('../__chunks/I3Y4EXEF.cjs');
6
- require('../__chunks/OTVLDMN2.cjs');
7
- require('../__chunks/F6HPKLO2.cjs');
8
- require('../__chunks/KBNYGXWI.cjs');
4
+ var _5JEQEZFRcjs = require('../__chunks/5JEQEZFR.cjs');
5
+ require('../__chunks/LTLFSC4X.cjs');
6
+ require('../__chunks/AETQC2AR.cjs');
7
+ require('../__chunks/B4LYZ4EM.cjs');
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 _E53JW5BDcjs.createPopoverStore.call(void 0, props);
13
+ return _5JEQEZFRcjs.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 _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
5
- require('../__chunks/MI6NUQYQ.cjs');
6
- require('../__chunks/F6HPKLO2.cjs');
7
- require('../__chunks/KBNYGXWI.cjs');
8
- require('../__chunks/5F4DVUNS.cjs');
4
+ var _Y7KNI5NScjs = require('../__chunks/Y7KNI5NS.cjs');
5
+ require('../__chunks/FFZYCAXA.cjs');
6
+ require('../__chunks/B4LYZ4EM.cjs');
7
+ require('../__chunks/EEDWPDM2.cjs');
8
+ require('../__chunks/UKR6TQI3.cjs');
9
9
  require('../__chunks/ULSPM3Y3.cjs');
10
10
  require('../__chunks/AV6KTKLE.cjs');
11
11
 
12
12
 
13
- exports.createCompositeStore = _BFE5R4EZcjs.createCompositeStore;
13
+ exports.createCompositeStore = _Y7KNI5NScjs.createCompositeStore;
@@ -112,6 +112,9 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
112
112
  * matches the value of `focusLoop`, it'll wrap between the last item in the
113
113
  * last row or column and the first item in the first row or column and
114
114
  * vice-versa.
115
+ *
116
+ * Live examples:
117
+ * - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
115
118
  * @default false
116
119
  */
117
120
  focusLoop: boolean | Orientation;
@@ -157,6 +160,7 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
157
160
  * - [Submenu with
158
161
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
159
162
  * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
163
+ * - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
160
164
  * @default false
161
165
  */
162
166
  includesBaseElement: boolean;
@@ -112,6 +112,9 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
112
112
  * matches the value of `focusLoop`, it'll wrap between the last item in the
113
113
  * last row or column and the first item in the first row or column and
114
114
  * vice-versa.
115
+ *
116
+ * Live examples:
117
+ * - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
115
118
  * @default false
116
119
  */
117
120
  focusLoop: boolean | Orientation;
@@ -157,6 +160,7 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
157
160
  * - [Submenu with
158
161
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
159
162
  * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
163
+ * - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
160
164
  * @default false
161
165
  */
162
166
  includesBaseElement: boolean;
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _I3Y4EXEFcjs = require('../__chunks/I3Y4EXEF.cjs');
5
- require('../__chunks/OTVLDMN2.cjs');
6
- require('../__chunks/F6HPKLO2.cjs');
7
- require('../__chunks/KBNYGXWI.cjs');
4
+ var _LTLFSC4Xcjs = require('../__chunks/LTLFSC4X.cjs');
5
+ require('../__chunks/AETQC2AR.cjs');
6
+ require('../__chunks/B4LYZ4EM.cjs');
7
+ require('../__chunks/EEDWPDM2.cjs');
8
8
  require('../__chunks/AV6KTKLE.cjs');
9
9
 
10
10
 
11
- exports.createDialogStore = _I3Y4EXEFcjs.createDialogStore;
11
+ exports.createDialogStore = _LTLFSC4Xcjs.createDialogStore;
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _OTVLDMN2cjs = require('../__chunks/OTVLDMN2.cjs');
5
- require('../__chunks/F6HPKLO2.cjs');
6
- require('../__chunks/KBNYGXWI.cjs');
4
+ var _AETQC2ARcjs = require('../__chunks/AETQC2AR.cjs');
5
+ require('../__chunks/B4LYZ4EM.cjs');
6
+ require('../__chunks/EEDWPDM2.cjs');
7
7
  require('../__chunks/AV6KTKLE.cjs');
8
8
 
9
9
 
10
- exports.createDisclosureStore = _OTVLDMN2cjs.createDisclosureStore;
10
+ exports.createDisclosureStore = _AETQC2ARcjs.createDisclosureStore;
@@ -38,7 +38,6 @@ export interface DisclosureStoreState {
38
38
  * - If it's set to a number, the `animating` state will be `true` when the
39
39
  * content is shown or hidden and it will wait for the number of
40
40
  * milliseconds to pass before becoming `false`.
41
- * @default false
42
41
  */
43
42
  animated: boolean | number;
44
43
  /**
@@ -54,7 +53,7 @@ export interface DisclosureStoreState {
54
53
  */
55
54
  disclosureElement: HTMLElement | null;
56
55
  }
57
- export interface DisclosureStoreFunctions {
56
+ export interface DisclosureStoreFunctions extends Pick<DisclosureStoreOptions, "disclosure"> {
58
57
  /**
59
58
  * Sets the [`open`](https://ariakit.org/reference/disclosure-provider#open)
60
59
  * state.
@@ -115,6 +114,11 @@ export interface DisclosureStoreFunctions {
115
114
  setDisclosureElement: SetState<DisclosureStoreState["disclosureElement"]>;
116
115
  }
117
116
  export interface DisclosureStoreOptions extends StoreOptions<DisclosureStoreState, "open" | "animated"> {
117
+ /**
118
+ * @deprecated Manually setting the `animated` prop is no longer necessary.
119
+ * This will be removed in a future release.
120
+ */
121
+ animated?: DisclosureStoreState["animated"];
118
122
  /**
119
123
  * Whether the content should be visible by default.
120
124
  * @default false
@@ -38,7 +38,6 @@ export interface DisclosureStoreState {
38
38
  * - If it's set to a number, the `animating` state will be `true` when the
39
39
  * content is shown or hidden and it will wait for the number of
40
40
  * milliseconds to pass before becoming `false`.
41
- * @default false
42
41
  */
43
42
  animated: boolean | number;
44
43
  /**
@@ -54,7 +53,7 @@ export interface DisclosureStoreState {
54
53
  */
55
54
  disclosureElement: HTMLElement | null;
56
55
  }
57
- export interface DisclosureStoreFunctions {
56
+ export interface DisclosureStoreFunctions extends Pick<DisclosureStoreOptions, "disclosure"> {
58
57
  /**
59
58
  * Sets the [`open`](https://ariakit.org/reference/disclosure-provider#open)
60
59
  * state.
@@ -115,6 +114,11 @@ export interface DisclosureStoreFunctions {
115
114
  setDisclosureElement: SetState<DisclosureStoreState["disclosureElement"]>;
116
115
  }
117
116
  export interface DisclosureStoreOptions extends StoreOptions<DisclosureStoreState, "open" | "animated"> {
117
+ /**
118
+ * @deprecated Manually setting the `animated` prop is no longer necessary.
119
+ * This will be removed in a future release.
120
+ */
121
+ animated?: DisclosureStoreState["animated"];
118
122
  /**
119
123
  * Whether the content should be visible by default.
120
124
  * @default false
@@ -1,20 +1,20 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _MI6NUQYQcjs = require('../__chunks/MI6NUQYQ.cjs');
4
+ var _FFZYCAXAcjs = require('../__chunks/FFZYCAXA.cjs');
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
10
+ var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
11
11
 
12
12
 
13
13
 
14
14
 
15
15
 
16
- var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
17
- require('../__chunks/5F4DVUNS.cjs');
16
+ var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
17
+ require('../__chunks/UKR6TQI3.cjs');
18
18
 
19
19
 
20
20
 
@@ -26,7 +26,7 @@ function nextFrame() {
26
26
  }
27
27
  function hasMessages(object) {
28
28
  return Object.keys(object).some((key) => {
29
- if (_KBNYGXWIcjs.isObject.call(void 0, object[key])) {
29
+ if (_EEDWPDM2cjs.isObject.call(void 0, object[key])) {
30
30
  return hasMessages(object[key]);
31
31
  }
32
32
  return !!object[key];
@@ -48,10 +48,10 @@ function set(values, path, value) {
48
48
  if (k == null)
49
49
  return values;
50
50
  const key = k;
51
- const isIntegerKey = _KBNYGXWIcjs.isInteger.call(void 0, key);
51
+ const isIntegerKey = _EEDWPDM2cjs.isInteger.call(void 0, key);
52
52
  const nextValues = isIntegerKey ? values || [] : values || {};
53
53
  const nestedValues = nextValues[key];
54
- const result = rest.length && (Array.isArray(nestedValues) || _KBNYGXWIcjs.isObject.call(void 0, nestedValues)) ? set(nestedValues, rest, value) : value;
54
+ const result = rest.length && (Array.isArray(nestedValues) || _EEDWPDM2cjs.isObject.call(void 0, nestedValues)) ? set(nestedValues, rest, value) : value;
55
55
  if (isIntegerKey) {
56
56
  const index = Number(key);
57
57
  if (values && Array.isArray(values)) {
@@ -74,12 +74,12 @@ function setAll(values, value) {
74
74
  const currentValue = values[key];
75
75
  if (Array.isArray(currentValue)) {
76
76
  result[key] = currentValue.map((v) => {
77
- if (_KBNYGXWIcjs.isObject.call(void 0, v)) {
77
+ if (_EEDWPDM2cjs.isObject.call(void 0, v)) {
78
78
  return setAll(v, value);
79
79
  }
80
80
  return value;
81
81
  });
82
- } else if (_KBNYGXWIcjs.isObject.call(void 0, currentValue)) {
82
+ } else if (_EEDWPDM2cjs.isObject.call(void 0, currentValue)) {
83
83
  result[key] = setAll(currentValue, value);
84
84
  } else {
85
85
  result[key] = value;
@@ -114,22 +114,22 @@ function createNames() {
114
114
  }
115
115
  function createFormStore(props = {}) {
116
116
  var _a;
117
- _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, props.store);
117
+ _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, props.store);
118
118
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
119
- const collection = _MI6NUQYQcjs.createCollectionStore.call(void 0, props);
120
- const values = _KBNYGXWIcjs.defaultValue.call(void 0,
119
+ const collection = _FFZYCAXAcjs.createCollectionStore.call(void 0, props);
120
+ const values = _EEDWPDM2cjs.defaultValue.call(void 0,
121
121
  props.values,
122
122
  syncState == null ? void 0 : syncState.values,
123
123
  props.defaultValues,
124
124
  {}
125
125
  );
126
- const errors = _KBNYGXWIcjs.defaultValue.call(void 0,
126
+ const errors = _EEDWPDM2cjs.defaultValue.call(void 0,
127
127
  props.errors,
128
128
  syncState == null ? void 0 : syncState.errors,
129
129
  props.defaultErrors,
130
130
  {}
131
131
  );
132
- const touched = _KBNYGXWIcjs.defaultValue.call(void 0,
132
+ const touched = _EEDWPDM2cjs.defaultValue.call(void 0,
133
133
  props.touched,
134
134
  syncState == null ? void 0 : syncState.touched,
135
135
  props.defaultTouched,
@@ -139,21 +139,21 @@ function createFormStore(props = {}) {
139
139
  values,
140
140
  errors,
141
141
  touched,
142
- validating: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.validating, false),
143
- submitting: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.submitting, false),
144
- submitSucceed: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.submitSucceed, 0),
145
- submitFailed: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.submitFailed, 0),
142
+ validating: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.validating, false),
143
+ submitting: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.submitting, false),
144
+ submitSucceed: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.submitSucceed, 0),
145
+ submitFailed: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.submitFailed, 0),
146
146
  valid: !hasMessages(errors)
147
147
  });
148
- const form = _F6HPKLO2cjs.createStore.call(void 0, initialState, collection, props.store);
148
+ const form = _B4LYZ4EMcjs.createStore.call(void 0, initialState, collection, props.store);
149
149
  const syncCallbacks = getStoreCallbacks(props.store);
150
150
  const syncCallbacksState = syncCallbacks == null ? void 0 : syncCallbacks.getState();
151
151
  const callbacksInitialState = {
152
152
  validate: (syncCallbacksState == null ? void 0 : syncCallbacksState.validate) || [],
153
153
  submit: (syncCallbacksState == null ? void 0 : syncCallbacksState.submit) || []
154
154
  };
155
- const callbacks = _F6HPKLO2cjs.createStore.call(void 0, callbacksInitialState, syncCallbacks);
156
- _F6HPKLO2cjs.setup.call(void 0, form, () => _F6HPKLO2cjs.init.call(void 0, callbacks));
155
+ const callbacks = _B4LYZ4EMcjs.createStore.call(void 0, callbacksInitialState, syncCallbacks);
156
+ _B4LYZ4EMcjs.setup.call(void 0, form, () => _B4LYZ4EMcjs.init.call(void 0, callbacks));
157
157
  const validate = async () => {
158
158
  form.setState("validating", true);
159
159
  form.setState("errors", {});
@@ -174,7 +174,7 @@ function createFormStore(props = {}) {
174
174
  getValue: (name) => get(form.getState().values, name),
175
175
  setValue: (name, value) => form.setState("values", (values2) => {
176
176
  const prevValue = get(values2, name);
177
- const nextValue = _KBNYGXWIcjs.applyState.call(void 0, value, prevValue);
177
+ const nextValue = _EEDWPDM2cjs.applyState.call(void 0, value, prevValue);
178
178
  if (nextValue === prevValue)
179
179
  return values2;
180
180
  return set(values2, name, nextValue);
@@ -195,7 +195,7 @@ function createFormStore(props = {}) {
195
195
  getError: (name) => get(form.getState().errors, name),
196
196
  setError: (name, error) => form.setState("errors", (errors2) => {
197
197
  const prevError = get(errors2, name);
198
- const nextError = _KBNYGXWIcjs.applyState.call(void 0, error, prevError);
198
+ const nextError = _EEDWPDM2cjs.applyState.call(void 0, error, prevError);
199
199
  if (nextError === prevError)
200
200
  return errors2;
201
201
  return set(errors2, name, nextError);
@@ -204,7 +204,7 @@ function createFormStore(props = {}) {
204
204
  getFieldTouched: (name) => !!get(form.getState().touched, name),
205
205
  setFieldTouched: (name, value) => form.setState("touched", (touched2) => {
206
206
  const prevValue = get(touched2, name);
207
- const nextValue = _KBNYGXWIcjs.applyState.call(void 0, value, prevValue);
207
+ const nextValue = _EEDWPDM2cjs.applyState.call(void 0, value, prevValue);
208
208
  if (nextValue === prevValue)
209
209
  return touched2;
210
210
  return set(touched2, name, nextValue);
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _TQTGWD5Kcjs = require('../__chunks/TQTGWD5K.cjs');
5
- require('../__chunks/E53JW5BD.cjs');
6
- require('../__chunks/I3Y4EXEF.cjs');
7
- require('../__chunks/OTVLDMN2.cjs');
8
- require('../__chunks/F6HPKLO2.cjs');
9
- require('../__chunks/KBNYGXWI.cjs');
4
+ var _UEZLSKZ4cjs = require('../__chunks/UEZLSKZ4.cjs');
5
+ require('../__chunks/5JEQEZFR.cjs');
6
+ require('../__chunks/LTLFSC4X.cjs');
7
+ require('../__chunks/AETQC2AR.cjs');
8
+ require('../__chunks/B4LYZ4EM.cjs');
9
+ require('../__chunks/EEDWPDM2.cjs');
10
10
  require('../__chunks/AV6KTKLE.cjs');
11
11
 
12
12
 
13
- exports.createHovercardStore = _TQTGWD5Kcjs.createHovercardStore;
13
+ exports.createHovercardStore = _UEZLSKZ4cjs.createHovercardStore;
@@ -6,9 +6,7 @@ import type { SetState } from "../utils/types.js";
6
6
  */
7
7
  export declare function createHovercardStore(props?: HovercardStoreProps): HovercardStore;
8
8
  export interface HovercardStoreState extends PopoverStoreState {
9
- /**
10
- * @default "bottom"
11
- */
9
+ /** @default "bottom" */
12
10
  placement: PopoverStoreState["placement"];
13
11
  /**
14
12
  * The amount of time in milliseconds to wait before showing and hiding the
@@ -57,7 +55,7 @@ export interface HovercardStoreFunctions extends PopoverStoreFunctions {
57
55
  */
58
56
  setAutoFocusOnShow: SetState<HovercardStoreState["autoFocusOnShow"]>;
59
57
  }
60
- export interface HovercardStoreOptions extends PopoverStoreOptions, StoreOptions<HovercardStoreState, "placement" | "timeout" | "showTimeout" | "hideTimeout"> {
58
+ export interface HovercardStoreOptions extends StoreOptions<HovercardStoreState, "placement" | "timeout" | "showTimeout" | "hideTimeout">, PopoverStoreOptions {
61
59
  }
62
60
  export interface HovercardStoreProps extends HovercardStoreOptions, StoreProps<HovercardStoreState> {
63
61
  }