@ariakit/core 0.3.8 → 0.3.10

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 (86) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/cjs/__chunks/{2UK5WUJX.cjs → 5CBCKBZ2.cjs} +0 -2
  3. package/cjs/__chunks/{3J44Z7YH.cjs → CWDUO5EV.cjs} +4 -4
  4. package/cjs/__chunks/{5SIVMOID.cjs → HMO4CKUP.cjs} +4 -4
  5. package/cjs/__chunks/{2LS4JJ4S.cjs → MFSCSSBJ.cjs} +2 -2
  6. package/cjs/__chunks/{GJFZ5ZPP.cjs → MWNFQD55.cjs} +11 -11
  7. package/cjs/__chunks/{EFIT5L4X.cjs → Y6PHIDP6.cjs} +7 -7
  8. package/cjs/__chunks/{ZQTYFYRS.cjs → YLMJBIQM.cjs} +26 -21
  9. package/cjs/__chunks/{QAZ4PF7S.cjs → ZXCB7MXN.cjs} +6 -6
  10. package/cjs/checkbox/checkbox-store.cjs +3 -3
  11. package/cjs/checkbox/checkbox-store.d.cts +5 -2
  12. package/cjs/checkbox/checkbox-store.d.ts +5 -2
  13. package/cjs/collection/collection-store.cjs +3 -3
  14. package/cjs/collection/collection-store.d.cts +11 -11
  15. package/cjs/collection/collection-store.d.ts +11 -11
  16. package/cjs/combobox/combobox-store.cjs +20 -20
  17. package/cjs/combobox/combobox-store.d.cts +5 -1
  18. package/cjs/combobox/combobox-store.d.ts +5 -1
  19. package/cjs/composite/composite-overflow-store.cjs +5 -5
  20. package/cjs/composite/composite-store.cjs +4 -4
  21. package/cjs/composite/composite-store.d.cts +134 -53
  22. package/cjs/composite/composite-store.d.ts +134 -53
  23. package/cjs/dialog/dialog-store.cjs +4 -4
  24. package/cjs/disclosure/disclosure-store.cjs +3 -3
  25. package/cjs/disclosure/disclosure-store.d.cts +33 -27
  26. package/cjs/disclosure/disclosure-store.d.ts +33 -27
  27. package/cjs/form/form-store.cjs +7 -7
  28. package/cjs/form/form-store.d.cts +34 -25
  29. package/cjs/form/form-store.d.ts +34 -25
  30. package/cjs/hovercard/hovercard-store.cjs +6 -6
  31. package/cjs/hovercard/hovercard-store.d.cts +6 -2
  32. package/cjs/hovercard/hovercard-store.d.ts +6 -2
  33. package/cjs/menu/menu-bar-store.cjs +5 -5
  34. package/cjs/menu/menu-store.cjs +18 -18
  35. package/cjs/menu/menu-store.d.cts +12 -2
  36. package/cjs/menu/menu-store.d.ts +12 -2
  37. package/cjs/menubar/menubar-store.cjs +5 -5
  38. package/cjs/popover/popover-store.cjs +5 -5
  39. package/cjs/popover/popover-store.d.cts +2 -0
  40. package/cjs/popover/popover-store.d.ts +2 -0
  41. package/cjs/radio/radio-store.cjs +5 -5
  42. package/cjs/select/select-store.cjs +18 -18
  43. package/cjs/tab/tab-store.cjs +15 -15
  44. package/cjs/tab/tab-store.d.cts +15 -4
  45. package/cjs/tab/tab-store.d.ts +15 -4
  46. package/cjs/toolbar/toolbar-store.cjs +4 -4
  47. package/cjs/tooltip/tooltip-store.cjs +7 -7
  48. package/cjs/utils/store.cjs +2 -2
  49. package/esm/__chunks/{LT2OYWRD.js → 25MEC56I.js} +1 -1
  50. package/esm/__chunks/{J6JIOWCS.js → AKMSZ36N.js} +2 -2
  51. package/esm/__chunks/{A2J4XZ5T.js → K6ELJFXN.js} +0 -2
  52. package/esm/__chunks/{NKLTHWCR.js → L5RYKTVQ.js} +1 -1
  53. package/esm/__chunks/{HMQYEBKF.js → MYUKSFP5.js} +20 -15
  54. package/esm/__chunks/{T3DVYGXI.js → QJ5CUA32.js} +2 -2
  55. package/esm/__chunks/{A2AGSVJO.js → UUFF4PQ6.js} +2 -2
  56. package/esm/__chunks/{CTZ2GQIZ.js → VEUNYQYR.js} +2 -2
  57. package/esm/checkbox/checkbox-store.d.ts +5 -2
  58. package/esm/checkbox/checkbox-store.js +1 -1
  59. package/esm/collection/collection-store.d.ts +11 -11
  60. package/esm/collection/collection-store.js +2 -2
  61. package/esm/combobox/combobox-store.d.ts +5 -1
  62. package/esm/combobox/combobox-store.js +6 -6
  63. package/esm/composite/composite-overflow-store.js +4 -4
  64. package/esm/composite/composite-store.d.ts +134 -53
  65. package/esm/composite/composite-store.js +3 -3
  66. package/esm/dialog/dialog-store.js +3 -3
  67. package/esm/disclosure/disclosure-store.d.ts +33 -27
  68. package/esm/disclosure/disclosure-store.js +2 -2
  69. package/esm/form/form-store.d.ts +34 -25
  70. package/esm/form/form-store.js +2 -2
  71. package/esm/hovercard/hovercard-store.d.ts +6 -2
  72. package/esm/hovercard/hovercard-store.js +5 -5
  73. package/esm/menu/menu-bar-store.js +4 -4
  74. package/esm/menu/menu-store.d.ts +12 -2
  75. package/esm/menu/menu-store.js +7 -7
  76. package/esm/menubar/menubar-store.js +4 -4
  77. package/esm/popover/popover-store.d.ts +2 -0
  78. package/esm/popover/popover-store.js +4 -4
  79. package/esm/radio/radio-store.js +3 -3
  80. package/esm/select/select-store.js +6 -6
  81. package/esm/tab/tab-store.d.ts +15 -4
  82. package/esm/tab/tab-store.js +3 -3
  83. package/esm/toolbar/toolbar-store.js +3 -3
  84. package/esm/tooltip/tooltip-store.js +5 -5
  85. package/esm/utils/store.js +1 -1
  86. package/package.json +1 -1
@@ -19,6 +19,10 @@ export interface FormStoreItem extends CollectionStoreItem {
19
19
  export interface FormStoreState<T extends FormStoreValues = FormStoreValues> extends CollectionStoreState<FormStoreItem> {
20
20
  /**
21
21
  * Form values.
22
+ *
23
+ * Live examples:
24
+ * - [FormRadio](https://ariakit.org/examples/form-radio)
25
+ * - [FormSelect](https://ariakit.org/examples/form-select)
22
26
  * @default {}
23
27
  */
24
28
  values: T;
@@ -43,18 +47,25 @@ export interface FormStoreState<T extends FormStoreValues = FormStoreValues> ext
43
47
  */
44
48
  submitting: boolean;
45
49
  /**
46
- * The number of times `form.submit` has been called with a successful
47
- * response.
50
+ * The number of times
51
+ * [`submit`](https://ariakit.org/reference/use-form-store#submit) has been
52
+ * called with a successful response.
48
53
  */
49
54
  submitSucceed: number;
50
55
  /**
51
- * The number of times `form.submit` has been called with an error response.
56
+ * The number of times
57
+ * [`submit`](https://ariakit.org/reference/use-form-store#submit) has been
58
+ * called with an error response.
52
59
  */
53
60
  submitFailed: number;
54
61
  }
55
62
  export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues> extends CollectionStoreFunctions<FormStoreItem> {
56
63
  /**
57
64
  * An object containing the names of the form fields for type-safety.
65
+ *
66
+ * Live examples:
67
+ * - [FormRadio](https://ariakit.org/examples/form-radio)
68
+ * - [FormSelect](https://ariakit.org/examples/form-select)
58
69
  * @example
59
70
  * store.names.name; // "name"
60
71
  * store.names.name.first; // "name.first"
@@ -62,7 +73,8 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
62
73
  */
63
74
  names: Names<T>;
64
75
  /**
65
- * Sets the `values` state.
76
+ * Sets the [`values`](https://ariakit.org/reference/form-provider#values)
77
+ * state.
66
78
  * @example
67
79
  * store.setValues({ name: "John" });
68
80
  * store.setValues((values) => ({ ...values, name: "John" }));
@@ -70,7 +82,9 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
70
82
  setValues: SetState<FormStoreState<T>["values"]>;
71
83
  /**
72
84
  * Retrieves a field value.
73
- * @param name The field name.
85
+ *
86
+ * Live examples:
87
+ * - [FormRadio](https://ariakit.org/examples/form-radio)
74
88
  * @example
75
89
  * const nameValue = store.getValue("name");
76
90
  * // Can also use store.names for type-safety.
@@ -79,8 +93,9 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
79
93
  getValue: <T = any>(name: StringLike) => T;
80
94
  /**
81
95
  * Sets a field value.
82
- * @param name The field name.
83
- * @param value The field value.
96
+ *
97
+ * Live examples:
98
+ * - [FormSelect](https://ariakit.org/examples/form-select)
84
99
  * @example
85
100
  * store.setValue("name", "John");
86
101
  * store.setValue("name", (value) => value + " Doe");
@@ -90,8 +105,6 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
90
105
  setValue: <T>(name: StringLike, value: SetStateAction<T>) => void;
91
106
  /**
92
107
  * Pushes a value to an array field.
93
- * @param name The array field name.
94
- * @param value The value to push.
95
108
  * @example
96
109
  * store.pushValue("tags", "new tag");
97
110
  * store.pushValue("tags", { id: 1, name: "new tag" });
@@ -101,8 +114,6 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
101
114
  pushValue: <T>(name: StringLike, value: T) => void;
102
115
  /**
103
116
  * Removes a value from an array field.
104
- * @param name The array field name.
105
- * @param index The index of the value to remove.
106
117
  * @example
107
118
  * store.removeValue("tags", 0);
108
119
  * store.removeValue("tags", 1);
@@ -111,7 +122,8 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
111
122
  */
112
123
  removeValue: (name: StringLike, index: number) => void;
113
124
  /**
114
- * Sets the `errors` state.
125
+ * Sets the [`errors`](https://ariakit.org/reference/form-provider#errors)
126
+ * state.
115
127
  * @example
116
128
  * store.setErrors({ name: "Name is required" });
117
129
  * store.setErrors((errors) => ({ ...errors, name: "Name is required" }));
@@ -119,7 +131,6 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
119
131
  setErrors: SetState<FormStoreState<T>["errors"]>;
120
132
  /**
121
133
  * Retrieves a field error.
122
- * @param name The field name.
123
134
  * @example
124
135
  * const nameError = store.getError("name");
125
136
  * // Can also use store.names for type-safety.
@@ -128,8 +139,9 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
128
139
  getError: (name: StringLike) => ErrorMessage;
129
140
  /**
130
141
  * Sets a field error.
131
- * @param name The field name.
132
- * @param error The field error.
142
+ *
143
+ * Live examples:
144
+ * - [FormRadio](https://ariakit.org/examples/form-radio)
133
145
  * @example
134
146
  * store.setError("name", "Name is required");
135
147
  * store.setError("name", (error) => error + "!");
@@ -138,7 +150,8 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
138
150
  */
139
151
  setError: (name: StringLike, error: SetStateAction<ErrorMessage>) => void;
140
152
  /**
141
- * Sets the `touched` state.
153
+ * Sets the [`touched`](https://ariakit.org/reference/form-provider#touched)
154
+ * state.
142
155
  * @example
143
156
  * store.setTouched({ name: true });
144
157
  * store.setTouched((touched) => ({ ...touched, name: true }));
@@ -146,7 +159,6 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
146
159
  setTouched: SetState<FormStoreState<T>["touched"]>;
147
160
  /**
148
161
  * Retrieves a field touched state.
149
- * @param name The field name.
150
162
  * @example
151
163
  * const nameTouched = store.getFieldTouched("name");
152
164
  * // Can also use store.names for type-safety.
@@ -155,8 +167,6 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
155
167
  getFieldTouched: (name: StringLike) => boolean;
156
168
  /**
157
169
  * Sets a field touched state.
158
- * @param name The field name.
159
- * @param value The field touched state.
160
170
  * @example
161
171
  * store.setFieldTouched("name", true);
162
172
  * store.setFieldTouched("name", (value) => !value);
@@ -166,9 +176,8 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
166
176
  setFieldTouched: (name: StringLike, value: SetStateAction<boolean>) => void;
167
177
  /**
168
178
  * Function that accepts a callback that will be used to validate the form
169
- * when `validate` is called. It returns a cleanup function that will remove
170
- * the callback.
171
- * @param callback The callback function.
179
+ * when [`validate`](https://ariakit.org/reference/use-form-store#validate) is
180
+ * called. It returns a cleanup function that will remove the callback.
172
181
  * @example
173
182
  * const cleanup = store.onValidate(async (state) => {
174
183
  * const errors = await api.validate(state.values);
@@ -179,9 +188,9 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
179
188
  */
180
189
  onValidate: (callback: FormStoreCallback<FormStoreState<T>>) => void;
181
190
  /**
182
- * Function that accepts a callback that will be used to submit the form
183
- * when `submit` is called. It returns a cleanup function that will remove
184
- * the callback.
191
+ * Function that accepts a callback that will be used to submit the form when
192
+ * [`submit`](https://ariakit.org/reference/use-form-store#submit) is called.
193
+ * It returns a cleanup function that will remove the callback.
185
194
  * @param callback The callback function.
186
195
  * @example
187
196
  * const cleanup = store.onSubmit(async (state) => {
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createCollectionStore
4
- } from "../__chunks/HMQYEBKF.js";
4
+ } from "../__chunks/MYUKSFP5.js";
5
5
  import {
6
6
  createStore,
7
7
  init,
8
8
  setup,
9
9
  throwOnConflictingProps
10
- } from "../__chunks/A2J4XZ5T.js";
10
+ } from "../__chunks/K6ELJFXN.js";
11
11
  import {
12
12
  applyState,
13
13
  defaultValue,
@@ -19,15 +19,19 @@ export interface HovercardStoreState extends PopoverStoreState {
19
19
  timeout: number;
20
20
  /**
21
21
  * The amount of time in milliseconds to wait before **showing** the popover.
22
- * It defaults to the value passed to `timeout`.
22
+ * It defaults to the value passed to
23
+ * [`timeout`](https://ariakit.org/reference/hovercard-provider#timeout).
23
24
  *
24
25
  * Live examples:
25
26
  * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
27
+ * - [Submenu with
28
+ * Combobox](https://ariakit.org/examples/menu-nested-combobox)
26
29
  */
27
30
  showTimeout?: number;
28
31
  /**
29
32
  * The amount of time in milliseconds to wait before **hiding** the popover.
30
- * It defaults to the value passed to `timeout`.
33
+ * It defaults to the value passed to
34
+ * [`timeout`](https://ariakit.org/reference/hovercard-provider#timeout).
31
35
  *
32
36
  * Live examples:
33
37
  * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  createHovercardStore
4
- } from "../__chunks/T3DVYGXI.js";
5
- import "../__chunks/J6JIOWCS.js";
6
- import "../__chunks/LT2OYWRD.js";
7
- import "../__chunks/NKLTHWCR.js";
8
- import "../__chunks/A2J4XZ5T.js";
4
+ } from "../__chunks/QJ5CUA32.js";
5
+ import "../__chunks/AKMSZ36N.js";
6
+ import "../__chunks/25MEC56I.js";
7
+ import "../__chunks/L5RYKTVQ.js";
8
+ import "../__chunks/K6ELJFXN.js";
9
9
  import "../__chunks/I2VQ3XGR.js";
10
10
  import "../__chunks/4R3V3JGP.js";
11
11
  export {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createMenubarStore
4
- } from "../__chunks/A2AGSVJO.js";
5
- import "../__chunks/CTZ2GQIZ.js";
6
- import "../__chunks/HMQYEBKF.js";
7
- import "../__chunks/A2J4XZ5T.js";
4
+ } from "../__chunks/UUFF4PQ6.js";
5
+ import "../__chunks/VEUNYQYR.js";
6
+ import "../__chunks/MYUKSFP5.js";
7
+ import "../__chunks/K6ELJFXN.js";
8
8
  import "../__chunks/I2VQ3XGR.js";
9
9
  import "../__chunks/DLOEKDPY.js";
10
10
  import "../__chunks/7PRQYBBV.js";
@@ -15,6 +15,10 @@ export interface MenuStoreState<T extends MenuStoreValues = MenuStoreValues> ext
15
15
  /**
16
16
  * A map of names and values that will be used by the `MenuItemCheckbox` and
17
17
  * `MenuItemRadio` components.
18
+ *
19
+ * Live examples:
20
+ * - [Submenu with
21
+ * Combobox](https://ariakit.org/examples/menu-nested-combobox)
18
22
  */
19
23
  values: T;
20
24
  /** @default "vertical" */
@@ -27,6 +31,10 @@ export interface MenuStoreState<T extends MenuStoreValues = MenuStoreValues> ext
27
31
  export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues> extends CompositeStoreFunctions, HovercardStoreFunctions, Pick<MenuStoreOptions, "combobox" | "parent" | "menubar"> {
28
32
  /**
29
33
  * Hides the menu and all its parent menus.
34
+ *
35
+ * Live examples:
36
+ * - [Submenu with
37
+ * Combobox](https://ariakit.org/examples/menu-nested-combobox)
30
38
  */
31
39
  hideAll: () => void;
32
40
  /**
@@ -42,8 +50,10 @@ export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues>
42
50
  setValues: SetState<MenuStoreState<T>["values"]>;
43
51
  /**
44
52
  * Sets a specific menu value.
45
- * @param name The name.
46
- * @param value The value.
53
+ *
54
+ * Live examples:
55
+ * - [Submenu with
56
+ * Combobox](https://ariakit.org/examples/menu-nested-combobox)
47
57
  * @example
48
58
  * store.setValue("watching", ["issues"]);
49
59
  * store.setValue("watching", (value) => [...value, "issues"]);
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  createHovercardStore
4
- } from "../__chunks/T3DVYGXI.js";
5
- import "../__chunks/J6JIOWCS.js";
6
- import "../__chunks/LT2OYWRD.js";
7
- import "../__chunks/NKLTHWCR.js";
4
+ } from "../__chunks/QJ5CUA32.js";
5
+ import "../__chunks/AKMSZ36N.js";
6
+ import "../__chunks/25MEC56I.js";
7
+ import "../__chunks/L5RYKTVQ.js";
8
8
  import {
9
9
  createCompositeStore
10
- } from "../__chunks/CTZ2GQIZ.js";
11
- import "../__chunks/HMQYEBKF.js";
10
+ } from "../__chunks/VEUNYQYR.js";
11
+ import "../__chunks/MYUKSFP5.js";
12
12
  import {
13
13
  createStore,
14
14
  mergeStore,
@@ -17,7 +17,7 @@ import {
17
17
  setup,
18
18
  sync,
19
19
  throwOnConflictingProps
20
- } from "../__chunks/A2J4XZ5T.js";
20
+ } from "../__chunks/K6ELJFXN.js";
21
21
  import {
22
22
  applyState,
23
23
  defaultValue
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createMenubarStore
4
- } from "../__chunks/A2AGSVJO.js";
5
- import "../__chunks/CTZ2GQIZ.js";
6
- import "../__chunks/HMQYEBKF.js";
7
- import "../__chunks/A2J4XZ5T.js";
4
+ } from "../__chunks/UUFF4PQ6.js";
5
+ import "../__chunks/VEUNYQYR.js";
6
+ import "../__chunks/MYUKSFP5.js";
7
+ import "../__chunks/K6ELJFXN.js";
8
8
  import "../__chunks/I2VQ3XGR.js";
9
9
  import "../__chunks/DLOEKDPY.js";
10
10
  import "../__chunks/7PRQYBBV.js";
@@ -31,6 +31,8 @@ export interface PopoverStoreState extends DialogStoreState {
31
31
  *
32
32
  * Live examples:
33
33
  * - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
34
+ * - [Submenu with
35
+ * Combobox](https://ariakit.org/examples/menu-nested-combobox)
34
36
  * @default "bottom"
35
37
  */
36
38
  placement: Placement;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "../__chunks/J6JIOWCS.js";
5
- import "../__chunks/LT2OYWRD.js";
6
- import "../__chunks/NKLTHWCR.js";
7
- import "../__chunks/A2J4XZ5T.js";
4
+ } from "../__chunks/AKMSZ36N.js";
5
+ import "../__chunks/25MEC56I.js";
6
+ import "../__chunks/L5RYKTVQ.js";
7
+ import "../__chunks/K6ELJFXN.js";
8
8
  import "../__chunks/I2VQ3XGR.js";
9
9
  import "../__chunks/4R3V3JGP.js";
10
10
  export {
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/CTZ2GQIZ.js";
5
- import "../__chunks/HMQYEBKF.js";
4
+ } from "../__chunks/VEUNYQYR.js";
5
+ import "../__chunks/MYUKSFP5.js";
6
6
  import {
7
7
  createStore
8
- } from "../__chunks/A2J4XZ5T.js";
8
+ } from "../__chunks/K6ELJFXN.js";
9
9
  import {
10
10
  defaultValue
11
11
  } from "../__chunks/I2VQ3XGR.js";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "../__chunks/J6JIOWCS.js";
5
- import "../__chunks/LT2OYWRD.js";
6
- import "../__chunks/NKLTHWCR.js";
4
+ } from "../__chunks/AKMSZ36N.js";
5
+ import "../__chunks/25MEC56I.js";
6
+ import "../__chunks/L5RYKTVQ.js";
7
7
  import {
8
8
  createCompositeStore
9
- } from "../__chunks/CTZ2GQIZ.js";
10
- import "../__chunks/HMQYEBKF.js";
9
+ } from "../__chunks/VEUNYQYR.js";
10
+ import "../__chunks/MYUKSFP5.js";
11
11
  import {
12
12
  batch,
13
13
  createStore,
@@ -16,7 +16,7 @@ import {
16
16
  setup,
17
17
  sync,
18
18
  throwOnConflictingProps
19
- } from "../__chunks/A2J4XZ5T.js";
19
+ } from "../__chunks/K6ELJFXN.js";
20
20
  import {
21
21
  defaultValue
22
22
  } from "../__chunks/I2VQ3XGR.js";
@@ -24,6 +24,7 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
24
24
  *
25
25
  * Live examples:
26
26
  * - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
27
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
27
28
  */
28
29
  selectedId: TabStoreState["activeId"];
29
30
  /**
@@ -38,8 +39,11 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
38
39
  }
39
40
  export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem> {
40
41
  /**
41
- * Sets the `selectedId` state without moving focus. If you want to move focus,
42
- * use the `select` function instead.
42
+ * Sets the
43
+ * [`selectedId`](https://ariakit.org/reference/tab-provider#selectedid) state
44
+ * without moving focus. If you want to move focus, use the
45
+ * [`select`](https://ariakit.org/reference/use-tab-store#select) function
46
+ * instead.
43
47
  *
44
48
  * Live examples:
45
49
  * - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
@@ -60,9 +64,13 @@ export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem>
60
64
  panels: CollectionStore<TabStorePanel>;
61
65
  /**
62
66
  * 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`
67
+ * the [`selectedId`](https://ariakit.org/reference/tab-provider#selectedid)
68
+ * state without moving focus, use the
69
+ * [`setSelectedId`](https://ariakit.org/reference/use-tab-store#setselectedid-1)
64
70
  * function instead.
65
- * @param id The id of the tab to select.
71
+ *
72
+ * Live examples:
73
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
66
74
  * @example
67
75
  * // Selects the tab with id "tab-1"
68
76
  * store.select("tab-1");
@@ -77,6 +85,9 @@ export interface TabStoreOptions extends StoreOptions<TabStoreState, "orientatio
77
85
  /**
78
86
  * The id of the tab whose panel is currently visible. If it's `undefined`, it
79
87
  * will be automatically set to the first enabled tab.
88
+ *
89
+ * Live examples:
90
+ * - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
80
91
  */
81
92
  defaultSelectedId?: TabStoreState["selectedId"];
82
93
  }
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/CTZ2GQIZ.js";
4
+ } from "../__chunks/VEUNYQYR.js";
5
5
  import {
6
6
  createCollectionStore
7
- } from "../__chunks/HMQYEBKF.js";
7
+ } from "../__chunks/MYUKSFP5.js";
8
8
  import {
9
9
  batch,
10
10
  createStore,
11
11
  setup,
12
12
  sync
13
- } from "../__chunks/A2J4XZ5T.js";
13
+ } from "../__chunks/K6ELJFXN.js";
14
14
  import {
15
15
  defaultValue
16
16
  } from "../__chunks/I2VQ3XGR.js";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/CTZ2GQIZ.js";
5
- import "../__chunks/HMQYEBKF.js";
6
- import "../__chunks/A2J4XZ5T.js";
4
+ } from "../__chunks/VEUNYQYR.js";
5
+ import "../__chunks/MYUKSFP5.js";
6
+ import "../__chunks/K6ELJFXN.js";
7
7
  import {
8
8
  defaultValue
9
9
  } from "../__chunks/I2VQ3XGR.js";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createHovercardStore
4
- } from "../__chunks/T3DVYGXI.js";
5
- import "../__chunks/J6JIOWCS.js";
6
- import "../__chunks/LT2OYWRD.js";
7
- import "../__chunks/NKLTHWCR.js";
4
+ } from "../__chunks/QJ5CUA32.js";
5
+ import "../__chunks/AKMSZ36N.js";
6
+ import "../__chunks/25MEC56I.js";
7
+ import "../__chunks/L5RYKTVQ.js";
8
8
  import {
9
9
  createStore
10
- } from "../__chunks/A2J4XZ5T.js";
10
+ } from "../__chunks/K6ELJFXN.js";
11
11
  import {
12
12
  defaultValue
13
13
  } from "../__chunks/I2VQ3XGR.js";
@@ -10,7 +10,7 @@ import {
10
10
  subscribe,
11
11
  sync,
12
12
  throwOnConflictingProps
13
- } from "../__chunks/A2J4XZ5T.js";
13
+ } from "../__chunks/K6ELJFXN.js";
14
14
  import "../__chunks/I2VQ3XGR.js";
15
15
  import "../__chunks/4R3V3JGP.js";
16
16
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariakit/core",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "description": "Ariakit core",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",