@ariakit/core 0.3.9 → 0.3.11

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 +15 -0
  2. package/cjs/__chunks/{JNFZSNOI.cjs → BFE5R4EZ.cjs} +17 -17
  3. package/cjs/__chunks/{EFIT5L4X.cjs → E53JW5BD.cjs} +12 -12
  4. package/cjs/__chunks/{2UK5WUJX.cjs → F6HPKLO2.cjs} +12 -14
  5. package/cjs/__chunks/{2LS4JJ4S.cjs → I3Y4EXEF.cjs} +2 -2
  6. package/cjs/__chunks/{3UT5FE6K.cjs → KBNYGXWI.cjs} +3 -0
  7. package/cjs/__chunks/{UCLKUBNP.cjs → MI6NUQYQ.cjs} +31 -18
  8. package/cjs/__chunks/{UTICNXST.cjs → NOFH2BLB.cjs} +7 -7
  9. package/cjs/__chunks/{GJFZ5ZPP.cjs → OTVLDMN2.cjs} +16 -16
  10. package/cjs/__chunks/{5SIVMOID.cjs → TQTGWD5K.cjs} +10 -10
  11. package/cjs/checkbox/checkbox-store.cjs +5 -5
  12. package/cjs/checkbox/checkbox-store.d.cts +5 -2
  13. package/cjs/checkbox/checkbox-store.d.ts +5 -2
  14. package/cjs/collection/collection-store.cjs +4 -4
  15. package/cjs/collection/collection-store.d.cts +11 -11
  16. package/cjs/collection/collection-store.d.ts +11 -11
  17. package/cjs/combobox/combobox-store.cjs +32 -32
  18. package/cjs/combobox/combobox-store.d.cts +3 -1
  19. package/cjs/combobox/combobox-store.d.ts +3 -1
  20. package/cjs/composite/composite-overflow-store.cjs +6 -6
  21. package/cjs/composite/composite-store.cjs +5 -5
  22. package/cjs/composite/composite-store.d.cts +128 -54
  23. package/cjs/composite/composite-store.d.ts +128 -54
  24. package/cjs/dialog/dialog-store.cjs +5 -5
  25. package/cjs/disclosure/disclosure-store.cjs +4 -4
  26. package/cjs/disclosure/disclosure-store.d.cts +33 -27
  27. package/cjs/disclosure/disclosure-store.d.ts +33 -27
  28. package/cjs/form/form-store.cjs +23 -23
  29. package/cjs/form/form-store.d.cts +35 -26
  30. package/cjs/form/form-store.d.ts +35 -26
  31. package/cjs/hovercard/hovercard-store.cjs +7 -7
  32. package/cjs/hovercard/hovercard-store.d.cts +14 -7
  33. package/cjs/hovercard/hovercard-store.d.ts +14 -7
  34. package/cjs/menu/menu-bar-store.cjs +6 -6
  35. package/cjs/menu/menu-store.cjs +26 -26
  36. package/cjs/menu/menu-store.d.cts +16 -7
  37. package/cjs/menu/menu-store.d.ts +16 -7
  38. package/cjs/menubar/menubar-store.cjs +6 -6
  39. package/cjs/popover/popover-store.cjs +6 -6
  40. package/cjs/popover/popover-store.d.cts +31 -6
  41. package/cjs/popover/popover-store.d.ts +31 -6
  42. package/cjs/radio/radio-store.cjs +8 -8
  43. package/cjs/radio/radio-store.d.cts +2 -1
  44. package/cjs/radio/radio-store.d.ts +2 -1
  45. package/cjs/select/select-store.cjs +28 -28
  46. package/cjs/select/select-store.d.cts +2 -1
  47. package/cjs/select/select-store.d.ts +2 -1
  48. package/cjs/tab/tab-store.cjs +20 -20
  49. package/cjs/tab/tab-store.d.cts +20 -15
  50. package/cjs/tab/tab-store.d.ts +20 -15
  51. package/cjs/toolbar/toolbar-store.cjs +7 -7
  52. package/cjs/toolbar/toolbar-store.d.cts +2 -6
  53. package/cjs/toolbar/toolbar-store.d.ts +2 -6
  54. package/cjs/tooltip/tooltip-store.cjs +12 -12
  55. package/cjs/tooltip/tooltip-store.d.cts +6 -4
  56. package/cjs/tooltip/tooltip-store.d.ts +6 -4
  57. package/cjs/utils/misc.cjs +2 -2
  58. package/cjs/utils/store.cjs +3 -3
  59. package/esm/__chunks/{TLN4ALYH.js → 22K762VQ.js} +22 -9
  60. package/esm/__chunks/{J6JIOWCS.js → AF6IUUFN.js} +3 -3
  61. package/esm/__chunks/{A2J4XZ5T.js → EAHJFCU4.js} +1 -3
  62. package/esm/__chunks/{DLX2AS6C.js → IERTEJ3A.js} +3 -3
  63. package/esm/__chunks/{T3DVYGXI.js → SOLWE6E5.js} +3 -3
  64. package/esm/__chunks/{LT2OYWRD.js → SX2XFD6A.js} +1 -1
  65. package/esm/__chunks/{EZ2TTBAQ.js → XU3EOSCU.js} +3 -3
  66. package/esm/__chunks/{I2VQ3XGR.js → Y3OOHFCN.js} +3 -0
  67. package/esm/__chunks/{NKLTHWCR.js → Z5IGYIPT.js} +2 -2
  68. package/esm/checkbox/checkbox-store.d.ts +5 -2
  69. package/esm/checkbox/checkbox-store.js +2 -2
  70. package/esm/collection/collection-store.d.ts +11 -11
  71. package/esm/collection/collection-store.js +3 -3
  72. package/esm/combobox/combobox-store.d.ts +3 -1
  73. package/esm/combobox/combobox-store.js +7 -7
  74. package/esm/composite/composite-overflow-store.js +5 -5
  75. package/esm/composite/composite-store.d.ts +128 -54
  76. package/esm/composite/composite-store.js +4 -4
  77. package/esm/dialog/dialog-store.js +4 -4
  78. package/esm/disclosure/disclosure-store.d.ts +33 -27
  79. package/esm/disclosure/disclosure-store.js +3 -3
  80. package/esm/form/form-store.d.ts +35 -26
  81. package/esm/form/form-store.js +3 -3
  82. package/esm/hovercard/hovercard-store.d.ts +14 -7
  83. package/esm/hovercard/hovercard-store.js +6 -6
  84. package/esm/menu/menu-bar-store.js +5 -5
  85. package/esm/menu/menu-store.d.ts +16 -7
  86. package/esm/menu/menu-store.js +8 -8
  87. package/esm/menubar/menubar-store.js +5 -5
  88. package/esm/popover/popover-store.d.ts +31 -6
  89. package/esm/popover/popover-store.js +5 -5
  90. package/esm/radio/radio-store.d.ts +2 -1
  91. package/esm/radio/radio-store.js +4 -4
  92. package/esm/select/select-store.d.ts +2 -1
  93. package/esm/select/select-store.js +7 -7
  94. package/esm/tab/tab-store.d.ts +20 -15
  95. package/esm/tab/tab-store.js +4 -4
  96. package/esm/toolbar/toolbar-store.d.ts +2 -6
  97. package/esm/toolbar/toolbar-store.js +4 -4
  98. package/esm/tooltip/tooltip-store.d.ts +6 -4
  99. package/esm/tooltip/tooltip-store.js +6 -6
  100. package/esm/utils/misc.js +1 -1
  101. package/esm/utils/store.js +2 -2
  102. package/package.json +1 -1
@@ -10,10 +10,18 @@ export declare function createPopoverStore({ popover: otherPopover, ...props }?:
10
10
  export interface PopoverStoreState extends DialogStoreState {
11
11
  /**
12
12
  * The anchor element.
13
+ *
14
+ * Live examples:
15
+ * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
13
16
  */
14
17
  anchorElement: HTMLElement | null;
15
18
  /**
16
19
  * The popover element that will render the placement attributes.
20
+ *
21
+ * Live examples:
22
+ * - [Form with Select](https://ariakit.org/examples/form-select)
23
+ * - [Sliding Menu](https://ariakit.org/examples/menu-slide)
24
+ * - [Responsive Popover](https://ariakit.org/examples/popover-responsive)
17
25
  */
18
26
  popoverElement: HTMLElement | null;
19
27
  /**
@@ -21,30 +29,42 @@ export interface PopoverStoreState extends DialogStoreState {
21
29
  */
22
30
  arrowElement: HTMLElement | null;
23
31
  /**
24
- * The current temporary placement state of the popover. This may be different
25
- * from the the `placement` state if the popover has needed to update its
26
- * position on the fly.
32
+ * The current temporary position of the popover. This might differ from the
33
+ * [`placement`](https://ariakit.org/reference/popover-provider#placement)
34
+ * state if the popover has had to adjust its position dynamically.
35
+ *
36
+ * Live examples:
37
+ * - [Tooltip with Framer
38
+ * Motion](https://ariakit.org/examples/tooltip-framer-motion)
27
39
  */
28
40
  currentPlacement: Placement;
29
41
  /**
30
42
  * The placement of the popover.
31
43
  *
32
44
  * Live examples:
33
- * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
34
45
  * - [Submenu with
35
46
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
47
+ * - [Sliding Menu](https://ariakit.org/examples/menu-slide)
48
+ * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
49
+ * - [Selection Popover](https://ariakit.org/examples/popover-selection)
50
+ * - [Standalone Popover](https://ariakit.org/examples/popover-standalone)
51
+ * - [Select Grid](https://ariakit.org/examples/select-grid)
36
52
  * @default "bottom"
37
53
  */
38
54
  placement: Placement;
39
55
  /**
40
- * A symbol that's used to recompute the popover position when the `render`
41
- * method is called.
56
+ * A symbol that's used to recompute the popover position when the
57
+ * [`render`](https://ariakit.org/reference/use-popover-store#render) method
58
+ * is called.
42
59
  */
43
60
  rendered: symbol;
44
61
  }
45
62
  export interface PopoverStoreFunctions extends DialogStoreFunctions {
46
63
  /**
47
64
  * Sets the anchor element.
65
+ *
66
+ * Live examples:
67
+ * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
48
68
  */
49
69
  setAnchorElement: SetState<PopoverStoreState["anchorElement"]>;
50
70
  /**
@@ -59,6 +79,11 @@ export interface PopoverStoreFunctions extends DialogStoreFunctions {
59
79
  * A function that can be used to recompute the popover position. This is
60
80
  * useful when the popover anchor changes in a way that affects the popover
61
81
  * position.
82
+ *
83
+ * Live examples:
84
+ * - [Textarea with inline
85
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
86
+ * - [Selection Popover](https://ariakit.org/examples/popover-selection)
62
87
  */
63
88
  render: () => void;
64
89
  }
@@ -10,10 +10,18 @@ export declare function createPopoverStore({ popover: otherPopover, ...props }?:
10
10
  export interface PopoverStoreState extends DialogStoreState {
11
11
  /**
12
12
  * The anchor element.
13
+ *
14
+ * Live examples:
15
+ * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
13
16
  */
14
17
  anchorElement: HTMLElement | null;
15
18
  /**
16
19
  * The popover element that will render the placement attributes.
20
+ *
21
+ * Live examples:
22
+ * - [Form with Select](https://ariakit.org/examples/form-select)
23
+ * - [Sliding Menu](https://ariakit.org/examples/menu-slide)
24
+ * - [Responsive Popover](https://ariakit.org/examples/popover-responsive)
17
25
  */
18
26
  popoverElement: HTMLElement | null;
19
27
  /**
@@ -21,30 +29,42 @@ export interface PopoverStoreState extends DialogStoreState {
21
29
  */
22
30
  arrowElement: HTMLElement | null;
23
31
  /**
24
- * The current temporary placement state of the popover. This may be different
25
- * from the the `placement` state if the popover has needed to update its
26
- * position on the fly.
32
+ * The current temporary position of the popover. This might differ from the
33
+ * [`placement`](https://ariakit.org/reference/popover-provider#placement)
34
+ * state if the popover has had to adjust its position dynamically.
35
+ *
36
+ * Live examples:
37
+ * - [Tooltip with Framer
38
+ * Motion](https://ariakit.org/examples/tooltip-framer-motion)
27
39
  */
28
40
  currentPlacement: Placement;
29
41
  /**
30
42
  * The placement of the popover.
31
43
  *
32
44
  * Live examples:
33
- * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
34
45
  * - [Submenu with
35
46
  * Combobox](https://ariakit.org/examples/menu-nested-combobox)
47
+ * - [Sliding Menu](https://ariakit.org/examples/menu-slide)
48
+ * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
49
+ * - [Selection Popover](https://ariakit.org/examples/popover-selection)
50
+ * - [Standalone Popover](https://ariakit.org/examples/popover-standalone)
51
+ * - [Select Grid](https://ariakit.org/examples/select-grid)
36
52
  * @default "bottom"
37
53
  */
38
54
  placement: Placement;
39
55
  /**
40
- * A symbol that's used to recompute the popover position when the `render`
41
- * method is called.
56
+ * A symbol that's used to recompute the popover position when the
57
+ * [`render`](https://ariakit.org/reference/use-popover-store#render) method
58
+ * is called.
42
59
  */
43
60
  rendered: symbol;
44
61
  }
45
62
  export interface PopoverStoreFunctions extends DialogStoreFunctions {
46
63
  /**
47
64
  * Sets the anchor element.
65
+ *
66
+ * Live examples:
67
+ * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
48
68
  */
49
69
  setAnchorElement: SetState<PopoverStoreState["anchorElement"]>;
50
70
  /**
@@ -59,6 +79,11 @@ export interface PopoverStoreFunctions extends DialogStoreFunctions {
59
79
  * A function that can be used to recompute the popover position. This is
60
80
  * useful when the popover anchor changes in a way that affects the popover
61
81
  * position.
82
+ *
83
+ * Live examples:
84
+ * - [Textarea with inline
85
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
86
+ * - [Selection Popover](https://ariakit.org/examples/popover-selection)
62
87
  */
63
88
  render: () => void;
64
89
  }
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _JNFZSNOIcjs = require('../__chunks/JNFZSNOI.cjs');
5
- require('../__chunks/UCLKUBNP.cjs');
4
+ var _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
5
+ require('../__chunks/MI6NUQYQ.cjs');
6
6
 
7
7
 
8
- var _2UK5WUJXcjs = require('../__chunks/2UK5WUJX.cjs');
8
+ var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
9
9
 
10
10
 
11
- var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
11
+ var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
12
12
  require('../__chunks/5F4DVUNS.cjs');
13
13
  require('../__chunks/ULSPM3Y3.cjs');
14
14
 
@@ -22,18 +22,18 @@ function createRadioStore(_a = {}) {
22
22
  var props = _AV6KTKLEcjs.__objRest.call(void 0, _a, []);
23
23
  var _a2;
24
24
  const syncState = (_a2 = props.store) == null ? void 0 : _a2.getState();
25
- const composite = _JNFZSNOIcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
26
- focusLoop: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
25
+ const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
26
+ focusLoop: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
27
27
  }));
28
28
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState()), {
29
- value: _3UT5FE6Kcjs.defaultValue.call(void 0,
29
+ value: _KBNYGXWIcjs.defaultValue.call(void 0,
30
30
  props.value,
31
31
  syncState == null ? void 0 : syncState.value,
32
32
  props.defaultValue,
33
33
  null
34
34
  )
35
35
  });
36
- const radio = _2UK5WUJXcjs.createStore.call(void 0, initialState, composite, props.store);
36
+ const radio = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, props.store);
37
37
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite), radio), {
38
38
  setValue: (value) => radio.setState("value", value)
39
39
  });
@@ -18,7 +18,8 @@ export interface RadioStoreState extends CompositeStoreState {
18
18
  }
19
19
  export interface RadioStoreFunctions extends CompositeStoreFunctions {
20
20
  /**
21
- * Sets the `value` state.
21
+ * Sets the [`value`](https://ariakit.org/reference/radio-provider#value)
22
+ * state.
22
23
  * @example
23
24
  * store.setValue("apple");
24
25
  * store.setValue((value) => value === "apple" ? "orange" : "apple");
@@ -18,7 +18,8 @@ export interface RadioStoreState extends CompositeStoreState {
18
18
  }
19
19
  export interface RadioStoreFunctions extends CompositeStoreFunctions {
20
20
  /**
21
- * Sets the `value` state.
21
+ * Sets the [`value`](https://ariakit.org/reference/radio-provider#value)
22
+ * state.
22
23
  * @example
23
24
  * store.setValue("apple");
24
25
  * store.setValue((value) => value === "apple" ? "orange" : "apple");
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _EFIT5L4Xcjs = require('../__chunks/EFIT5L4X.cjs');
5
- require('../__chunks/2LS4JJ4S.cjs');
6
- require('../__chunks/GJFZ5ZPP.cjs');
4
+ var _E53JW5BDcjs = require('../__chunks/E53JW5BD.cjs');
5
+ require('../__chunks/I3Y4EXEF.cjs');
6
+ require('../__chunks/OTVLDMN2.cjs');
7
7
 
8
8
 
9
- var _JNFZSNOIcjs = require('../__chunks/JNFZSNOI.cjs');
10
- require('../__chunks/UCLKUBNP.cjs');
9
+ var _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
10
+ require('../__chunks/MI6NUQYQ.cjs');
11
11
 
12
12
 
13
13
 
@@ -16,10 +16,10 @@ require('../__chunks/UCLKUBNP.cjs');
16
16
 
17
17
 
18
18
 
19
- var _2UK5WUJXcjs = require('../__chunks/2UK5WUJX.cjs');
19
+ var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
20
20
 
21
21
 
22
- var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
22
+ var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
23
23
  require('../__chunks/5F4DVUNS.cjs');
24
24
 
25
25
 
@@ -37,9 +37,9 @@ function createSelectStore(_a = {}) {
37
37
  } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, [
38
38
  "combobox"
39
39
  ]);
40
- const store = _2UK5WUJXcjs.mergeStore.call(void 0,
40
+ const store = _F6HPKLO2cjs.mergeStore.call(void 0,
41
41
  props.store,
42
- _2UK5WUJXcjs.omit.call(void 0, combobox, [
42
+ _F6HPKLO2cjs.omit.call(void 0, combobox, [
43
43
  "value",
44
44
  "items",
45
45
  "renderedItems",
@@ -51,35 +51,35 @@ function createSelectStore(_a = {}) {
51
51
  "disclosureElement"
52
52
  ])
53
53
  );
54
- _2UK5WUJXcjs.throwOnConflictingProps.call(void 0, props, store);
54
+ _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, store);
55
55
  const syncState = store.getState();
56
- const composite = _JNFZSNOIcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
56
+ const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
57
57
  store,
58
- virtualFocus: _3UT5FE6Kcjs.defaultValue.call(void 0,
58
+ virtualFocus: _KBNYGXWIcjs.defaultValue.call(void 0,
59
59
  props.virtualFocus,
60
60
  syncState.virtualFocus,
61
61
  true
62
62
  ),
63
- includesBaseElement: _3UT5FE6Kcjs.defaultValue.call(void 0,
63
+ includesBaseElement: _KBNYGXWIcjs.defaultValue.call(void 0,
64
64
  props.includesBaseElement,
65
65
  syncState.includesBaseElement,
66
66
  false
67
67
  ),
68
- activeId: _3UT5FE6Kcjs.defaultValue.call(void 0,
68
+ activeId: _KBNYGXWIcjs.defaultValue.call(void 0,
69
69
  props.activeId,
70
70
  syncState.activeId,
71
71
  props.defaultActiveId,
72
72
  null
73
73
  ),
74
- orientation: _3UT5FE6Kcjs.defaultValue.call(void 0,
74
+ orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
75
75
  props.orientation,
76
76
  syncState.orientation,
77
77
  "vertical"
78
78
  )
79
79
  }));
80
- const popover = _EFIT5L4Xcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
80
+ const popover = _E53JW5BDcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
81
81
  store,
82
- placement: _3UT5FE6Kcjs.defaultValue.call(void 0,
82
+ placement: _KBNYGXWIcjs.defaultValue.call(void 0,
83
83
  props.placement,
84
84
  syncState.placement,
85
85
  "bottom-start"
@@ -87,24 +87,24 @@ function createSelectStore(_a = {}) {
87
87
  }));
88
88
  const initialValue = new String("");
89
89
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState()), popover.getState()), {
90
- value: _3UT5FE6Kcjs.defaultValue.call(void 0,
90
+ value: _KBNYGXWIcjs.defaultValue.call(void 0,
91
91
  props.value,
92
92
  syncState.value,
93
93
  props.defaultValue,
94
94
  initialValue
95
95
  ),
96
- setValueOnMove: _3UT5FE6Kcjs.defaultValue.call(void 0,
96
+ setValueOnMove: _KBNYGXWIcjs.defaultValue.call(void 0,
97
97
  props.setValueOnMove,
98
98
  syncState.setValueOnMove,
99
99
  false
100
100
  ),
101
- selectElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState.selectElement, null),
102
- labelElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState.labelElement, null)
101
+ selectElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState.selectElement, null),
102
+ labelElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState.labelElement, null)
103
103
  });
104
- const select = _2UK5WUJXcjs.createStore.call(void 0, initialState, composite, popover, store);
105
- _2UK5WUJXcjs.setup.call(void 0,
104
+ const select = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, popover, store);
105
+ _F6HPKLO2cjs.setup.call(void 0,
106
106
  select,
107
- () => _2UK5WUJXcjs.sync.call(void 0, select, ["value", "items"], (state) => {
107
+ () => _F6HPKLO2cjs.sync.call(void 0, select, ["value", "items"], (state) => {
108
108
  if (state.value !== initialValue)
109
109
  return;
110
110
  if (!state.items.length)
@@ -117,9 +117,9 @@ function createSelectStore(_a = {}) {
117
117
  select.setState("value", item.value);
118
118
  })
119
119
  );
120
- _2UK5WUJXcjs.setup.call(void 0,
120
+ _F6HPKLO2cjs.setup.call(void 0,
121
121
  select,
122
- () => _2UK5WUJXcjs.sync.call(void 0, select, ["mounted", "items", "value"], (state) => {
122
+ () => _F6HPKLO2cjs.sync.call(void 0, select, ["mounted", "items", "value"], (state) => {
123
123
  if (combobox)
124
124
  return;
125
125
  if (state.mounted)
@@ -136,9 +136,9 @@ function createSelectStore(_a = {}) {
136
136
  select.setState("activeId", item.id);
137
137
  })
138
138
  );
139
- _2UK5WUJXcjs.setup.call(void 0,
139
+ _F6HPKLO2cjs.setup.call(void 0,
140
140
  select,
141
- () => _2UK5WUJXcjs.batch.call(void 0, select, ["setValueOnMove", "moves"], (state) => {
141
+ () => _F6HPKLO2cjs.batch.call(void 0, select, ["setValueOnMove", "moves"], (state) => {
142
142
  const { mounted, value, activeId } = select.getState();
143
143
  if (!state.setValueOnMove && mounted)
144
144
  return;
@@ -60,7 +60,8 @@ export interface SelectStoreState<T extends SelectStoreValue = SelectStoreValue>
60
60
  }
61
61
  export interface SelectStoreFunctions<T extends SelectStoreValue = SelectStoreValue> extends Pick<SelectStoreOptions<T>, "combobox">, CompositeStoreFunctions<SelectStoreItem>, PopoverStoreFunctions {
62
62
  /**
63
- * Sets the `value` state.
63
+ * Sets the [`value`](https://ariakit.org/reference/select-provider#value)
64
+ * state.
64
65
  * @example
65
66
  * store.setValue("Apple");
66
67
  * store.setValue(["Apple", "Banana"]);
@@ -60,7 +60,8 @@ export interface SelectStoreState<T extends SelectStoreValue = SelectStoreValue>
60
60
  }
61
61
  export interface SelectStoreFunctions<T extends SelectStoreValue = SelectStoreValue> extends Pick<SelectStoreOptions<T>, "combobox">, CompositeStoreFunctions<SelectStoreItem>, PopoverStoreFunctions {
62
62
  /**
63
- * Sets the `value` state.
63
+ * Sets the [`value`](https://ariakit.org/reference/select-provider#value)
64
+ * state.
64
65
  * @example
65
66
  * store.setValue("Apple");
66
67
  * store.setValue(["Apple", "Banana"]);
@@ -1,19 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _JNFZSNOIcjs = require('../__chunks/JNFZSNOI.cjs');
4
+ var _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
5
5
 
6
6
 
7
- var _UCLKUBNPcjs = require('../__chunks/UCLKUBNP.cjs');
7
+ var _MI6NUQYQcjs = require('../__chunks/MI6NUQYQ.cjs');
8
8
 
9
9
 
10
10
 
11
11
 
12
12
 
13
- var _2UK5WUJXcjs = require('../__chunks/2UK5WUJX.cjs');
13
+ var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
14
14
 
15
15
 
16
- var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
16
+ var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
17
17
  require('../__chunks/5F4DVUNS.cjs');
18
18
  require('../__chunks/ULSPM3Y3.cjs');
19
19
 
@@ -25,32 +25,32 @@ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
25
25
  function createTabStore(props = {}) {
26
26
  var _a;
27
27
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
28
- const composite = _JNFZSNOIcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
29
- orientation: _3UT5FE6Kcjs.defaultValue.call(void 0,
28
+ const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
29
+ orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
30
30
  props.orientation,
31
31
  syncState == null ? void 0 : syncState.orientation,
32
32
  "horizontal"
33
33
  ),
34
- focusLoop: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
34
+ focusLoop: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
35
35
  }));
36
- const panels = _UCLKUBNPcjs.createCollectionStore.call(void 0, );
36
+ const panels = _MI6NUQYQcjs.createCollectionStore.call(void 0, );
37
37
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState()), {
38
- selectedId: _3UT5FE6Kcjs.defaultValue.call(void 0,
38
+ selectedId: _KBNYGXWIcjs.defaultValue.call(void 0,
39
39
  props.selectedId,
40
40
  syncState == null ? void 0 : syncState.selectedId,
41
41
  props.defaultSelectedId,
42
42
  void 0
43
43
  ),
44
- selectOnMove: _3UT5FE6Kcjs.defaultValue.call(void 0,
44
+ selectOnMove: _KBNYGXWIcjs.defaultValue.call(void 0,
45
45
  props.selectOnMove,
46
46
  syncState == null ? void 0 : syncState.selectOnMove,
47
47
  true
48
48
  )
49
49
  });
50
- const tab = _2UK5WUJXcjs.createStore.call(void 0, initialState, composite, props.store);
51
- _2UK5WUJXcjs.setup.call(void 0,
50
+ const tab = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, props.store);
51
+ _F6HPKLO2cjs.setup.call(void 0,
52
52
  tab,
53
- () => _2UK5WUJXcjs.sync.call(void 0, tab, ["moves"], () => {
53
+ () => _F6HPKLO2cjs.sync.call(void 0, tab, ["moves"], () => {
54
54
  const { activeId, selectOnMove } = tab.getState();
55
55
  if (!selectOnMove)
56
56
  return;
@@ -66,17 +66,17 @@ function createTabStore(props = {}) {
66
66
  tab.setState("selectedId", tabItem.id);
67
67
  })
68
68
  );
69
- _2UK5WUJXcjs.setup.call(void 0,
69
+ _F6HPKLO2cjs.setup.call(void 0,
70
70
  tab,
71
- () => _2UK5WUJXcjs.batch.call(void 0,
71
+ () => _F6HPKLO2cjs.batch.call(void 0,
72
72
  tab,
73
73
  ["selectedId"],
74
74
  (state) => tab.setState("activeId", state.selectedId)
75
75
  )
76
76
  );
77
- _2UK5WUJXcjs.setup.call(void 0,
77
+ _F6HPKLO2cjs.setup.call(void 0,
78
78
  tab,
79
- () => _2UK5WUJXcjs.sync.call(void 0, tab, ["selectedId", "renderedItems"], (state) => {
79
+ () => _F6HPKLO2cjs.sync.call(void 0, tab, ["selectedId", "renderedItems"], (state) => {
80
80
  if (state.selectedId !== void 0)
81
81
  return;
82
82
  const { activeId, renderedItems } = tab.getState();
@@ -91,13 +91,13 @@ function createTabStore(props = {}) {
91
91
  }
92
92
  })
93
93
  );
94
- _2UK5WUJXcjs.setup.call(void 0,
94
+ _F6HPKLO2cjs.setup.call(void 0,
95
95
  tab,
96
- () => _2UK5WUJXcjs.sync.call(void 0, tab, ["renderedItems"], (state) => {
96
+ () => _F6HPKLO2cjs.sync.call(void 0, tab, ["renderedItems"], (state) => {
97
97
  const tabs = state.renderedItems;
98
98
  if (!tabs.length)
99
99
  return;
100
- return _2UK5WUJXcjs.sync.call(void 0, panels, ["renderedItems"], (state2) => {
100
+ return _F6HPKLO2cjs.sync.call(void 0, panels, ["renderedItems"], (state2) => {
101
101
  const items = state2.renderedItems;
102
102
  const hasOrphanPanels = items.some((panel) => !panel.tabId);
103
103
  if (!hasOrphanPanels)
@@ -10,13 +10,9 @@ export interface TabStorePanel extends CollectionStoreItem {
10
10
  tabId?: string | null;
11
11
  }
12
12
  export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
13
- /**
14
- * @default "horizontal"
15
- */
13
+ /** @default "horizontal" */
16
14
  orientation: CompositeStoreState<TabStoreItem>["orientation"];
17
- /**
18
- * @default true
19
- */
15
+ /** @default true */
20
16
  focusLoop: CompositeStoreState<TabStoreItem>["focusLoop"];
21
17
  /**
22
18
  * The id of the tab whose panel is currently visible. If it's `undefined`, it
@@ -24,11 +20,13 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
24
20
  *
25
21
  * Live examples:
26
22
  * - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
23
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
27
24
  */
28
25
  selectedId: TabStoreState["activeId"];
29
26
  /**
30
- * Whether the tab should be selected when it receives focus. If it's set to
31
- * `false`, the tab will be selected only when it's clicked.
27
+ * Determines if the tab should be selected when it receives focus. If set to
28
+ * `false`, the tab will only be selected upon clicking, not when
29
+ * using arrow keys to shift focus.
32
30
  *
33
31
  * Live examples:
34
32
  * - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
@@ -38,11 +36,11 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
38
36
  }
39
37
  export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem> {
40
38
  /**
41
- * Sets the `selectedId` state without moving focus. If you want to move focus,
42
- * use the `select` function instead.
43
- *
44
- * Live examples:
45
- * - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
39
+ * Sets the
40
+ * [`selectedId`](https://ariakit.org/reference/tab-provider#selectedid) state
41
+ * without moving focus. If you want to move focus, use the
42
+ * [`select`](https://ariakit.org/reference/use-tab-store#select) function
43
+ * instead.
46
44
  * @example
47
45
  * // Selects the tab with id "tab-1"
48
46
  * store.setSelectedId("tab-1");
@@ -60,9 +58,13 @@ export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem>
60
58
  panels: CollectionStore<TabStorePanel>;
61
59
  /**
62
60
  * Selects the tab for the given id and moves focus to it. If you want to set
63
- * the `selectedId` state without moving focus, use the `setSelectedId`
61
+ * the [`selectedId`](https://ariakit.org/reference/tab-provider#selectedid)
62
+ * state without moving focus, use the
63
+ * [`setSelectedId`](https://ariakit.org/reference/use-tab-store#setselectedid-1)
64
64
  * function instead.
65
- * @param id The id of the tab to select.
65
+ *
66
+ * Live examples:
67
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
66
68
  * @example
67
69
  * // Selects the tab with id "tab-1"
68
70
  * store.select("tab-1");
@@ -77,6 +79,9 @@ export interface TabStoreOptions extends StoreOptions<TabStoreState, "orientatio
77
79
  /**
78
80
  * The id of the tab whose panel is currently visible. If it's `undefined`, it
79
81
  * will be automatically set to the first enabled tab.
82
+ *
83
+ * Live examples:
84
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
80
85
  */
81
86
  defaultSelectedId?: TabStoreState["selectedId"];
82
87
  }
@@ -10,13 +10,9 @@ export interface TabStorePanel extends CollectionStoreItem {
10
10
  tabId?: string | null;
11
11
  }
12
12
  export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
13
- /**
14
- * @default "horizontal"
15
- */
13
+ /** @default "horizontal" */
16
14
  orientation: CompositeStoreState<TabStoreItem>["orientation"];
17
- /**
18
- * @default true
19
- */
15
+ /** @default true */
20
16
  focusLoop: CompositeStoreState<TabStoreItem>["focusLoop"];
21
17
  /**
22
18
  * The id of the tab whose panel is currently visible. If it's `undefined`, it
@@ -24,11 +20,13 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
24
20
  *
25
21
  * Live examples:
26
22
  * - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
23
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
27
24
  */
28
25
  selectedId: TabStoreState["activeId"];
29
26
  /**
30
- * Whether the tab should be selected when it receives focus. If it's set to
31
- * `false`, the tab will be selected only when it's clicked.
27
+ * Determines if the tab should be selected when it receives focus. If set to
28
+ * `false`, the tab will only be selected upon clicking, not when
29
+ * using arrow keys to shift focus.
32
30
  *
33
31
  * Live examples:
34
32
  * - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
@@ -38,11 +36,11 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
38
36
  }
39
37
  export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem> {
40
38
  /**
41
- * Sets the `selectedId` state without moving focus. If you want to move focus,
42
- * use the `select` function instead.
43
- *
44
- * Live examples:
45
- * - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
39
+ * Sets the
40
+ * [`selectedId`](https://ariakit.org/reference/tab-provider#selectedid) state
41
+ * without moving focus. If you want to move focus, use the
42
+ * [`select`](https://ariakit.org/reference/use-tab-store#select) function
43
+ * instead.
46
44
  * @example
47
45
  * // Selects the tab with id "tab-1"
48
46
  * store.setSelectedId("tab-1");
@@ -60,9 +58,13 @@ export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem>
60
58
  panels: CollectionStore<TabStorePanel>;
61
59
  /**
62
60
  * Selects the tab for the given id and moves focus to it. If you want to set
63
- * the `selectedId` state without moving focus, use the `setSelectedId`
61
+ * the [`selectedId`](https://ariakit.org/reference/tab-provider#selectedid)
62
+ * state without moving focus, use the
63
+ * [`setSelectedId`](https://ariakit.org/reference/use-tab-store#setselectedid-1)
64
64
  * function instead.
65
- * @param id The id of the tab to select.
65
+ *
66
+ * Live examples:
67
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
66
68
  * @example
67
69
  * // Selects the tab with id "tab-1"
68
70
  * store.select("tab-1");
@@ -77,6 +79,9 @@ export interface TabStoreOptions extends StoreOptions<TabStoreState, "orientatio
77
79
  /**
78
80
  * The id of the tab whose panel is currently visible. If it's `undefined`, it
79
81
  * will be automatically set to the first enabled tab.
82
+ *
83
+ * Live examples:
84
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
80
85
  */
81
86
  defaultSelectedId?: TabStoreState["selectedId"];
82
87
  }