@ariakit/core 0.1.3 → 0.1.5

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 (90) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cjs/__chunks/{QYB6XH64.cjs → 27ZAGOYG.cjs} +17 -13
  3. package/cjs/__chunks/6455U47T.cjs +37 -0
  4. package/cjs/__chunks/{ZPOXPO2L.cjs → 6SPJEESB.cjs} +33 -21
  5. package/cjs/__chunks/{2YFRPUZP.cjs → DBHIHK7C.cjs} +6 -6
  6. package/cjs/__chunks/{W5IHD6VG.cjs → EUJ6NNA6.cjs} +56 -43
  7. package/cjs/__chunks/{4DQ3OTE7.cjs → FXEBKN6G.cjs} +22 -17
  8. package/cjs/__chunks/{ZJEEK57E.cjs → HEFJPUYD.cjs} +2 -2
  9. package/cjs/__chunks/LBTLD2RB.cjs +58 -0
  10. package/cjs/__chunks/{QNEPGQLL.cjs → M6ZA7XUP.cjs} +6 -2
  11. package/cjs/__chunks/{HLVPXX7H.cjs → SDBF6KIY.cjs} +107 -107
  12. package/cjs/__chunks/{OFNGELMA.cjs → ZNW4LSWU.cjs} +8 -6
  13. package/cjs/checkbox/checkbox-store.cjs +14 -10
  14. package/cjs/checkbox/checkbox-store.d.ts +7 -0
  15. package/cjs/collection/collection-store.cjs +6 -5
  16. package/cjs/combobox/combobox-store.cjs +49 -48
  17. package/cjs/combobox/combobox-store.d.ts +24 -0
  18. package/cjs/composite/composite-overflow-store.cjs +7 -6
  19. package/cjs/composite/composite-store.cjs +7 -6
  20. package/cjs/composite/composite-store.d.ts +38 -34
  21. package/cjs/dialog/dialog-store.cjs +6 -5
  22. package/cjs/disclosure/disclosure-store.cjs +5 -4
  23. package/cjs/disclosure/disclosure-store.d.ts +36 -6
  24. package/cjs/form/form-store.cjs +38 -35
  25. package/cjs/hovercard/hovercard-store.cjs +8 -7
  26. package/cjs/index.cjs +3 -1
  27. package/cjs/menu/menu-bar-store.cjs +17 -13
  28. package/cjs/menu/menu-store.cjs +41 -43
  29. package/cjs/popover/popover-store.cjs +7 -6
  30. package/cjs/radio/radio-store.cjs +25 -24
  31. package/cjs/select/select-store.cjs +42 -42
  32. package/cjs/select/select-store.d.ts +16 -0
  33. package/cjs/tab/tab-store.cjs +29 -28
  34. package/cjs/tab/tab-store.d.ts +9 -0
  35. package/cjs/toolbar/toolbar-store.cjs +17 -13
  36. package/cjs/tooltip/tooltip-store.cjs +24 -25
  37. package/cjs/tsconfig.build.tsbuildinfo +1 -1
  38. package/cjs/utils/array.cjs +1 -0
  39. package/cjs/utils/dom.cjs +3 -2
  40. package/cjs/utils/events.cjs +14 -9
  41. package/cjs/utils/focus.cjs +24 -14
  42. package/cjs/utils/misc.cjs +3 -2
  43. package/cjs/utils/platform.cjs +4 -3
  44. package/cjs/utils/store.cjs +4 -3
  45. package/esm/__chunks/4BKCJXBM.js +37 -0
  46. package/esm/__chunks/AHZW5LR4.js +58 -0
  47. package/esm/__chunks/{NA5BK7DD.js → BOKMNDR7.js} +22 -10
  48. package/esm/__chunks/{6PEWNRTN.js → CUW3E24J.js} +100 -100
  49. package/esm/__chunks/{WFGVC6LE.js → EWHSN7GO.js} +17 -12
  50. package/esm/__chunks/{4T5RHRE5.js → MNNKHNLW.js} +1 -1
  51. package/esm/__chunks/{UVCATTRC.js → N6JW4ITM.js} +7 -5
  52. package/esm/__chunks/{RMD7SNCC.js → NWU4GBZ6.js} +5 -1
  53. package/esm/__chunks/{X7MJ3FB5.js → R6VHFWTV.js} +49 -36
  54. package/esm/__chunks/{DXA3K2FY.js → TFBCK4JB.js} +1 -1
  55. package/esm/__chunks/{IOAGNCXX.js → ZV2GEGPL.js} +14 -10
  56. package/esm/checkbox/checkbox-store.d.ts +7 -0
  57. package/esm/checkbox/checkbox-store.js +11 -7
  58. package/esm/collection/collection-store.js +5 -4
  59. package/esm/combobox/combobox-store.d.ts +24 -0
  60. package/esm/combobox/combobox-store.js +34 -33
  61. package/esm/composite/composite-overflow-store.js +6 -5
  62. package/esm/composite/composite-store.d.ts +38 -34
  63. package/esm/composite/composite-store.js +6 -5
  64. package/esm/dialog/dialog-store.js +5 -4
  65. package/esm/disclosure/disclosure-store.d.ts +36 -6
  66. package/esm/disclosure/disclosure-store.js +4 -3
  67. package/esm/form/form-store.js +24 -21
  68. package/esm/hovercard/hovercard-store.js +7 -6
  69. package/esm/index.js +2 -0
  70. package/esm/menu/menu-bar-store.js +15 -11
  71. package/esm/menu/menu-store.js +31 -33
  72. package/esm/popover/popover-store.js +6 -5
  73. package/esm/radio/radio-store.js +22 -21
  74. package/esm/select/select-store.d.ts +16 -0
  75. package/esm/select/select-store.js +29 -29
  76. package/esm/tab/tab-store.d.ts +9 -0
  77. package/esm/tab/tab-store.js +23 -22
  78. package/esm/toolbar/toolbar-store.js +15 -11
  79. package/esm/tooltip/tooltip-store.js +20 -21
  80. package/esm/tsconfig.build.tsbuildinfo +1 -1
  81. package/esm/utils/array.js +1 -0
  82. package/esm/utils/dom.js +2 -1
  83. package/esm/utils/events.js +10 -5
  84. package/esm/utils/focus.js +14 -4
  85. package/esm/utils/misc.js +2 -1
  86. package/esm/utils/platform.js +3 -2
  87. package/esm/utils/store.js +3 -2
  88. package/package.json +1 -1
  89. package/cjs/__chunks/DQHU5K4Q.cjs +0 -57
  90. package/esm/__chunks/6HMPWUDT.js +0 -57
@@ -1,44 +1,52 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _HLVPXX7Hcjs = require('../__chunks/HLVPXX7H.cjs');
4
- require('../__chunks/ZJEEK57E.cjs');
5
- require('../__chunks/QYB6XH64.cjs');
3
+ var _SDBF6KIYcjs = require('../__chunks/SDBF6KIY.cjs');
4
+ require('../__chunks/HEFJPUYD.cjs');
5
+ require('../__chunks/27ZAGOYG.cjs');
6
6
 
7
7
 
8
- var _W5IHD6VGcjs = require('../__chunks/W5IHD6VG.cjs');
9
- require('../__chunks/4DQ3OTE7.cjs');
8
+ var _EUJ6NNA6cjs = require('../__chunks/EUJ6NNA6.cjs');
9
+ require('../__chunks/FXEBKN6G.cjs');
10
10
 
11
11
 
12
12
 
13
- var _ZPOXPO2Lcjs = require('../__chunks/ZPOXPO2L.cjs');
13
+ var _6SPJEESBcjs = require('../__chunks/6SPJEESB.cjs');
14
14
 
15
15
 
16
- var _QNEPGQLLcjs = require('../__chunks/QNEPGQLL.cjs');
16
+ var _M6ZA7XUPcjs = require('../__chunks/M6ZA7XUP.cjs');
17
17
 
18
18
 
19
19
 
20
- var _2YFRPUZPcjs = require('../__chunks/2YFRPUZP.cjs');
21
- require('../__chunks/OFNGELMA.cjs');
20
+ var _DBHIHK7Ccjs = require('../__chunks/DBHIHK7C.cjs');
21
+ require('../__chunks/ZNW4LSWU.cjs');
22
22
  require('../__chunks/GDZQUFNP.cjs');
23
23
 
24
+
25
+
26
+
27
+ var _6455U47Tcjs = require('../__chunks/6455U47T.cjs');
28
+
24
29
  // src/combobox/combobox-store.ts
25
- var isSafariOnMobile = _2YFRPUZPcjs.isSafari.call(void 0, ) && _2YFRPUZPcjs.isTouchDevice.call(void 0, );
26
- function createComboboxStore({
27
- menu,
28
- select,
29
- ...props
30
- } = {}) {
31
- const store = _ZPOXPO2Lcjs.mergeStore.call(void 0,
30
+ var isSafariOnMobile = _DBHIHK7Ccjs.isSafari.call(void 0, ) && _DBHIHK7Ccjs.isTouchDevice.call(void 0, );
31
+ function createComboboxStore(_a = {}) {
32
+ var _b = _a, {
33
+ menu,
34
+ select
35
+ } = _b, props = _6455U47Tcjs.__objRest.call(void 0, _b, [
36
+ "menu",
37
+ "select"
38
+ ]);
39
+ const store = _6SPJEESBcjs.mergeStore.call(void 0,
32
40
  props.store,
33
- _optionalChain([menu, 'optionalAccess', _ => _.omit, 'call', _2 => _2(
41
+ menu == null ? void 0 : menu.omit(
34
42
  "baseElement",
35
43
  "arrowElement",
36
44
  "anchorElement",
37
45
  "contentElement",
38
46
  "popoverElement",
39
47
  "disclosureElement"
40
- )]),
41
- _optionalChain([select, 'optionalAccess', _3 => _3.omit, 'call', _4 => _4(
48
+ ),
49
+ select == null ? void 0 : select.omit(
42
50
  "value",
43
51
  "items",
44
52
  "renderedItems",
@@ -48,64 +56,60 @@ function createComboboxStore({
48
56
  "contentElement",
49
57
  "popoverElement",
50
58
  "disclosureElement"
51
- )])
59
+ )
52
60
  );
53
61
  const syncState = store.getState();
54
- const activeId = _QNEPGQLLcjs.defaultValue.call(void 0,
62
+ const activeId = _M6ZA7XUPcjs.defaultValue.call(void 0,
55
63
  props.activeId,
56
64
  syncState.activeId,
57
65
  props.defaultActiveId,
58
66
  null
59
67
  );
60
- const composite = _W5IHD6VGcjs.createCompositeStore.call(void 0, {
61
- ...props,
68
+ const composite = _EUJ6NNA6cjs.createCompositeStore.call(void 0, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {}, props), {
62
69
  store,
63
70
  activeId,
64
- includesBaseElement: _QNEPGQLLcjs.defaultValue.call(void 0,
71
+ includesBaseElement: _M6ZA7XUPcjs.defaultValue.call(void 0,
65
72
  props.includesBaseElement,
66
73
  syncState.includesBaseElement,
67
74
  true
68
75
  ),
69
- orientation: _QNEPGQLLcjs.defaultValue.call(void 0,
76
+ orientation: _M6ZA7XUPcjs.defaultValue.call(void 0,
70
77
  props.orientation,
71
78
  syncState.orientation,
72
79
  "vertical"
73
80
  ),
74
- focusLoop: _QNEPGQLLcjs.defaultValue.call(void 0, props.focusLoop, syncState.focusLoop, true),
75
- focusWrap: _QNEPGQLLcjs.defaultValue.call(void 0, props.focusWrap, syncState.focusWrap, true),
76
- virtualFocus: _QNEPGQLLcjs.defaultValue.call(void 0,
81
+ focusLoop: _M6ZA7XUPcjs.defaultValue.call(void 0, props.focusLoop, syncState.focusLoop, true),
82
+ focusWrap: _M6ZA7XUPcjs.defaultValue.call(void 0, props.focusWrap, syncState.focusWrap, true),
83
+ virtualFocus: _M6ZA7XUPcjs.defaultValue.call(void 0,
77
84
  props.virtualFocus,
78
- _optionalChain([syncState, 'optionalAccess', _5 => _5.virtualFocus]),
85
+ syncState == null ? void 0 : syncState.virtualFocus,
79
86
  !isSafariOnMobile
80
87
  )
81
- });
82
- const popover = _HLVPXX7Hcjs.createPopoverStore.call(void 0, {
83
- ...props,
88
+ }));
89
+ const popover = _SDBF6KIYcjs.createPopoverStore.call(void 0, _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {}, props), {
84
90
  store,
85
- placement: _QNEPGQLLcjs.defaultValue.call(void 0,
91
+ placement: _M6ZA7XUPcjs.defaultValue.call(void 0,
86
92
  props.placement,
87
93
  syncState.placement,
88
94
  "bottom-start"
89
95
  )
90
- });
91
- const initialValue = _QNEPGQLLcjs.defaultValue.call(void 0,
96
+ }));
97
+ const initialValue = _M6ZA7XUPcjs.defaultValue.call(void 0,
92
98
  props.value,
93
99
  syncState.value,
94
100
  props.defaultValue,
95
101
  ""
96
102
  );
97
- const initialState = {
98
- ...composite.getState(),
99
- ...popover.getState(),
103
+ const initialState = _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {}, composite.getState()), popover.getState()), {
100
104
  value: initialValue,
101
- resetValueOnHide: _QNEPGQLLcjs.defaultValue.call(void 0,
105
+ resetValueOnHide: _M6ZA7XUPcjs.defaultValue.call(void 0,
102
106
  props.resetValueOnHide,
103
107
  syncState.resetValueOnHide,
104
108
  false
105
109
  ),
106
110
  activeValue: syncState.activeValue
107
- };
108
- const combobox = _ZPOXPO2Lcjs.createStore.call(void 0, initialState, composite, popover, store);
111
+ });
112
+ const combobox = _6SPJEESBcjs.createStore.call(void 0, initialState, composite, popover, store);
109
113
  combobox.setup(
110
114
  () => combobox.sync(
111
115
  (state) => {
@@ -146,17 +150,14 @@ function createComboboxStore({
146
150
  return;
147
151
  const { activeId: activeId2 } = combobox.getState();
148
152
  const activeItem = composite.item(activeId2);
149
- combobox.setState("activeValue", _optionalChain([activeItem, 'optionalAccess', _6 => _6.value]));
153
+ combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
150
154
  },
151
155
  ["moves", "renderedItems"]
152
156
  )
153
157
  );
154
- return {
155
- ...popover,
156
- ...composite,
157
- ...combobox,
158
+ return _6455U47Tcjs.__spreadProps.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, _6455U47Tcjs.__spreadValues.call(void 0, {}, popover), composite), combobox), {
158
159
  setValue: (value) => combobox.setState("value", value)
159
- };
160
+ });
160
161
  }
161
162
 
162
163
 
@@ -19,6 +19,15 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
19
19
  includesBaseElement: boolean;
20
20
  /**
21
21
  * The input value.
22
+ *
23
+ * Live examples:
24
+ * - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
25
+ * - [Combobox with links](https://ariakit.org/examples/combobox-links)
26
+ * - [Filterable Combobox](https://ariakit.org/examples/combobox-matches)
27
+ * - [Multi-selectable
28
+ * Combobox](https://ariakit.org/examples/combobox-multiple)
29
+ * - [Textarea with inline
30
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
22
31
  */
23
32
  value: string;
24
33
  /**
@@ -27,12 +36,23 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
27
36
  activeValue: string | undefined;
28
37
  /**
29
38
  * Whether to reset the value when the combobox popover is hidden.
39
+ *
40
+ * Live examples:
41
+ * - [Multi-selectable
42
+ * Combobox](https://ariakit.org/examples/combobox-multiple)
43
+ * @default false
30
44
  */
31
45
  resetValueOnHide: boolean;
32
46
  }
33
47
  export interface ComboboxStoreFunctions extends CompositeStoreFunctions<Item>, PopoverStoreFunctions {
34
48
  /**
35
49
  * Sets the `value` state.
50
+ *
51
+ * Live examples:
52
+ * - [Multi-selectable
53
+ * Combobox](https://ariakit.org/examples/combobox-multiple)
54
+ * - [Textarea with inline
55
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
36
56
  * @example
37
57
  * store.setValue("Hello world");
38
58
  * store.setValue((value) => value + "!");
@@ -58,6 +78,10 @@ export interface ComboboxStoreOptions extends StoreOptions<ComboboxStoreState, "
58
78
  select?: SelectStore;
59
79
  /**
60
80
  * The combobox initial value.
81
+ *
82
+ * Live examples:
83
+ * - [Multi-selectable
84
+ * Combobox](https://ariakit.org/examples/combobox-multiple)
61
85
  * @default ""
62
86
  */
63
87
  defaultValue?: ComboboxStoreState["value"];
@@ -1,14 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _HLVPXX7Hcjs = require('../__chunks/HLVPXX7H.cjs');
4
- require('../__chunks/ZJEEK57E.cjs');
5
- require('../__chunks/QYB6XH64.cjs');
6
- require('../__chunks/ZPOXPO2L.cjs');
7
- require('../__chunks/QNEPGQLL.cjs');
3
+ var _SDBF6KIYcjs = require('../__chunks/SDBF6KIY.cjs');
4
+ require('../__chunks/HEFJPUYD.cjs');
5
+ require('../__chunks/27ZAGOYG.cjs');
6
+ require('../__chunks/6SPJEESB.cjs');
7
+ require('../__chunks/M6ZA7XUP.cjs');
8
+ require('../__chunks/6455U47T.cjs');
8
9
 
9
10
  // src/composite/composite-overflow-store.ts
10
11
  function createCompositeOverflowStore(props = {}) {
11
- return _HLVPXX7Hcjs.createPopoverStore.call(void 0, props);
12
+ return _SDBF6KIYcjs.createPopoverStore.call(void 0, props);
12
13
  }
13
14
 
14
15
 
@@ -1,11 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _W5IHD6VGcjs = require('../__chunks/W5IHD6VG.cjs');
4
- require('../__chunks/4DQ3OTE7.cjs');
5
- require('../__chunks/ZPOXPO2L.cjs');
6
- require('../__chunks/QNEPGQLL.cjs');
7
- require('../__chunks/OFNGELMA.cjs');
3
+ var _EUJ6NNA6cjs = require('../__chunks/EUJ6NNA6.cjs');
4
+ require('../__chunks/FXEBKN6G.cjs');
5
+ require('../__chunks/6SPJEESB.cjs');
6
+ require('../__chunks/M6ZA7XUP.cjs');
7
+ require('../__chunks/ZNW4LSWU.cjs');
8
8
  require('../__chunks/GDZQUFNP.cjs');
9
+ require('../__chunks/6455U47T.cjs');
9
10
 
10
11
 
11
- exports.createCompositeStore = _W5IHD6VGcjs.createCompositeStore;
12
+ exports.createCompositeStore = _EUJ6NNA6cjs.createCompositeStore;
@@ -25,6 +25,10 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
25
25
  * tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex).
26
26
  * DOM focus will remain on the composite element while its items receive
27
27
  * virtual focus.
28
+ *
29
+ * Live examples:
30
+ * - [Multi-selectable
31
+ * Combobox](https://ariakit.org/examples/combobox-multiple)
28
32
  * @default false
29
33
  */
30
34
  virtualFocus: boolean;
@@ -32,9 +36,9 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
32
36
  * Defines the orientation of the composite widget. If the composite has a
33
37
  * single row or column (one-dimensional), the `orientation` value determines
34
38
  * which arrow keys can be used to move focus:
35
- * - `both`: all arrow keys work.
36
- * - `horizontal`: only left and right arrow keys work.
37
- * - `vertical`: only up and down arrow keys work.
39
+ * - `both`: all arrow keys work.
40
+ * - `horizontal`: only left and right arrow keys work.
41
+ * - `vertical`: only up and down arrow keys work.
38
42
  *
39
43
  * It doesn't have any effect on two-dimensional composites.
40
44
  * @default "both"
@@ -52,27 +56,27 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
52
56
  * composite widget.
53
57
  *
54
58
  * On one-dimensional composites:
55
- * - `true` loops from the last item to the first item and vice-versa.
56
- * - `horizontal` loops only if `orientation` is `horizontal` or not set.
57
- * - `vertical` loops only if `orientation` is `vertical` or not set.
58
- * - If `includesBaseElement` is set to `true` (or `activeId` is initially
59
- * set to `null`), the composite element will be focused in between the
60
- * last and first items.
59
+ * - `true` loops from the last item to the first item and vice-versa.
60
+ * - `horizontal` loops only if `orientation` is `horizontal` or not set.
61
+ * - `vertical` loops only if `orientation` is `vertical` or not set.
62
+ * - If `includesBaseElement` is set to `true` (or `activeId` is initially set
63
+ * to `null`), the composite element will be focused in between the last and
64
+ * first items.
61
65
  *
62
66
  * On two-dimensional composites (when using `CompositeRow`):
63
- * - `true` loops from the last row/column item to the first item in the
64
- * same row/column and vice-versa. If it's the last item in the last row,
65
- * it moves to the first item in the first row and vice-versa.
66
- * - `horizontal` loops only from the last row item to the first item in the
67
- * same row.
68
- * - `vertical` loops only from the last column item to the first item in
69
- * the column row.
70
- * - If `includesBaseElement` is set to `true` (or `activeId` is initially
71
- * set to `null`), vertical loop will have no effect as moving down from
72
- * the last row or up from the first row will focus the composite element.
73
- * - If `focusWrap` matches the value of `focusLoop`, it'll wrap between the
74
- * last item in the last row or column and the first item in the first row
75
- * or column and vice-versa.
67
+ * - `true` loops from the last row/column item to the first item in the same
68
+ * row/column and vice-versa. If it's the last item in the last row, it
69
+ * moves to the first item in the first row and vice-versa.
70
+ * - `horizontal` loops only from the last row item to the first item in the
71
+ * same row.
72
+ * - `vertical` loops only from the last column item to the first item in the
73
+ * column row.
74
+ * - If `includesBaseElement` is set to `true` (or `activeId` is initially set
75
+ * to `null`), vertical loop will have no effect as moving down from the
76
+ * last row or up from the first row will focus the composite element.
77
+ * - If `focusWrap` matches the value of `focusLoop`, it'll wrap between the
78
+ * last item in the last row or column and the first item in the first row
79
+ * or column and vice-versa.
76
80
  * @default false
77
81
  */
78
82
  focusLoop: boolean | Orientation;
@@ -80,12 +84,12 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
80
84
  * **Works only on two-dimensional composites**. If enabled, moving to the
81
85
  * next item from the last one in a row or column will focus the first item in
82
86
  * the next row or column and vice-versa.
83
- * - `true` wraps between rows and columns.
84
- * - `horizontal` wraps only between rows.
85
- * - `vertical` wraps only between columns.
86
- * - If `focusLoop` matches the value of `focusWrap`, it'll wrap between the
87
- * last item in the last row or column and the first item in the first row
88
- * or column and vice-versa.
87
+ * - `true` wraps between rows and columns.
88
+ * - `horizontal` wraps only between rows.
89
+ * - `vertical` wraps only between columns.
90
+ * - If `focusLoop` matches the value of `focusWrap`, it'll wrap between the
91
+ * last item in the last row or column and the first item in the first row
92
+ * or column and vice-versa.
89
93
  * @default false
90
94
  */
91
95
  focusWrap: boolean | Orientation;
@@ -108,12 +112,12 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
108
112
  includesBaseElement: boolean;
109
113
  /**
110
114
  * The current focused item `id`.
111
- * - `null` focuses the base composite element and users will be able to
112
- * navigate out of it using arrow keys.
113
- * - If `activeId` is initially set to `null`, the `includesBaseElement`
114
- * prop will also default to `true`, which means the base composite
115
- * element itself will have focus and users will be able to navigate to it
116
- * using arrow keys.
115
+ * - `null` focuses the base composite element and users will be able to
116
+ * navigate out of it using arrow keys.
117
+ * - If `activeId` is initially set to `null`, the `includesBaseElement` prop
118
+ * will also default to `true`, which means the base composite element
119
+ * itself will have focus and users will be able to navigate to it using
120
+ * arrow keys.
117
121
  */
118
122
  activeId: string | null | undefined;
119
123
  }
@@ -1,9 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _ZJEEK57Ecjs = require('../__chunks/ZJEEK57E.cjs');
4
- require('../__chunks/QYB6XH64.cjs');
5
- require('../__chunks/ZPOXPO2L.cjs');
6
- require('../__chunks/QNEPGQLL.cjs');
3
+ var _HEFJPUYDcjs = require('../__chunks/HEFJPUYD.cjs');
4
+ require('../__chunks/27ZAGOYG.cjs');
5
+ require('../__chunks/6SPJEESB.cjs');
6
+ require('../__chunks/M6ZA7XUP.cjs');
7
+ require('../__chunks/6455U47T.cjs');
7
8
 
8
9
 
9
- exports.createDialogStore = _ZJEEK57Ecjs.createDialogStore;
10
+ exports.createDialogStore = _HEFJPUYDcjs.createDialogStore;
@@ -1,8 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _QYB6XH64cjs = require('../__chunks/QYB6XH64.cjs');
4
- require('../__chunks/ZPOXPO2L.cjs');
5
- require('../__chunks/QNEPGQLL.cjs');
3
+ var _27ZAGOYGcjs = require('../__chunks/27ZAGOYG.cjs');
4
+ require('../__chunks/6SPJEESB.cjs');
5
+ require('../__chunks/M6ZA7XUP.cjs');
6
+ require('../__chunks/6455U47T.cjs');
6
7
 
7
8
 
8
- exports.createDisclosureStore = _QYB6XH64cjs.createDisclosureStore;
9
+ exports.createDisclosureStore = _27ZAGOYGcjs.createDisclosureStore;
@@ -7,6 +7,10 @@ export declare function createDisclosureStore(props?: DisclosureStoreProps): Dis
7
7
  export interface DisclosureStoreState {
8
8
  /**
9
9
  * The visibility state of the content.
10
+ *
11
+ * Live examples:
12
+ * - [Dialog with React
13
+ * Router](https://ariakit.org/examples/dialog-react-router)
10
14
  * @default false
11
15
  */
12
16
  open: boolean;
@@ -15,16 +19,26 @@ export interface DisclosureStoreState {
15
19
  * this will be the same as `open`. Otherwise, it will wait for the animation
16
20
  * to complete before becoming `false` so the content is not unmounted while
17
21
  * animating.
22
+ *
23
+ * Live examples:
24
+ * - [Combobox with links](https://ariakit.org/examples/combobox-links)
25
+ * - [Textarea with inline
26
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
18
27
  */
19
28
  mounted: boolean;
20
29
  /**
21
30
  * Determines whether the content should animate when it is shown or hidden.
22
- * - If `true`, the `animating` state will be `true` when the content is
23
- * shown or hidden and it will wait for `stopAnimation` to be called or a
24
- * CSS animation/transition to end before becoming `false`.
25
- * - If it's set to a number, the `animating` state will be `true` when the
26
- * content is shown or hidden and it will wait for the number of
27
- * milliseconds to pass before becoming `false`.
31
+ * - If `true`, the `animating` state will be `true` when the content is shown
32
+ * or hidden and it will wait for `stopAnimation` to be called or a CSS
33
+ * animation/transition to end before becoming `false`.
34
+ * - If it's set to a number, the `animating` state will be `true` when the
35
+ * content is shown or hidden and it will wait for the number of
36
+ * milliseconds to pass before becoming `false`.
37
+ *
38
+ * Live examples:
39
+ * - [Animated Combobox](https://ariakit.org/examples/combobox-animated)
40
+ * - [Animated Dialog](https://ariakit.org/examples/dialog-animated)
41
+ * - [Animated Select](https://ariakit.org/examples/select-animated)
28
42
  * @default false
29
43
  */
30
44
  animated: boolean | number;
@@ -44,6 +58,12 @@ export interface DisclosureStoreState {
44
58
  export interface DisclosureStoreFunctions {
45
59
  /**
46
60
  * Sets the `open` state.
61
+ *
62
+ * Live examples:
63
+ * - [Textarea with inline
64
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
65
+ * - [Dialog with React
66
+ * Router](https://ariakit.org/examples/dialog-react-router)
47
67
  * @example
48
68
  * store.setOpen(true);
49
69
  * store.setOpen((open) => !open);
@@ -51,10 +71,20 @@ export interface DisclosureStoreFunctions {
51
71
  setOpen: SetState<DisclosureStoreState["open"]>;
52
72
  /**
53
73
  * Sets the `open` state to `true`.
74
+ *
75
+ * Live examples:
76
+ * - [Textarea with inline
77
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
54
78
  */
55
79
  show: () => void;
56
80
  /**
57
81
  * Sets the `open` state to `false`.
82
+ *
83
+ * Live examples:
84
+ * - [Textarea with inline
85
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
86
+ * - [Dialog with React
87
+ * Router](https://ariakit.org/examples/dialog-react-router)
58
88
  */
59
89
  hide: () => void;
60
90
  /**