@ariakit/react-core 0.3.1 → 0.3.2

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 (170) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/cjs/__chunks/{6MLKTO2T.cjs → 3ULNMLN7.cjs} +2 -2
  3. package/cjs/__chunks/{SL7OXEFQ.cjs → 4ULJINEP.cjs} +2 -2
  4. package/cjs/__chunks/{C47ZNHA6.cjs → 6UXB6PRK.cjs} +2 -2
  5. package/cjs/__chunks/{OAQQQ7LS.cjs → DMTOMUIM.cjs} +2 -2
  6. package/cjs/__chunks/{P2EILHN6.cjs → E4C2KZA5.cjs} +2 -2
  7. package/cjs/__chunks/{J63NAJOO.cjs → HCQYEOCO.cjs} +2 -2
  8. package/cjs/__chunks/{WRVKUV4V.cjs → HFISYIKE.cjs} +2 -2
  9. package/cjs/__chunks/{U33H4JTD.cjs → LJBXMHCD.cjs} +2 -2
  10. package/cjs/__chunks/{BPMML63M.cjs → NATUYKIW.cjs} +2 -2
  11. package/cjs/__chunks/{ZEASCR4B.cjs → QEG5AJH6.cjs} +2 -2
  12. package/cjs/__chunks/{B4KDFSF3.cjs → WBPFHFAX.cjs} +2 -2
  13. package/cjs/__chunks/{PHDU6PLM.cjs → XOHN6PER.cjs} +2 -2
  14. package/cjs/checkbox/checkbox.d.ts +12 -9
  15. package/cjs/collection/collection.d.ts +5 -1
  16. package/cjs/combobox/combobox-cancel.d.ts +14 -9
  17. package/cjs/combobox/combobox-disclosure.d.ts +14 -9
  18. package/cjs/combobox/combobox-group-label.d.ts +16 -11
  19. package/cjs/combobox/combobox-group.d.ts +16 -11
  20. package/cjs/combobox/combobox-item-value.d.ts +14 -10
  21. package/cjs/combobox/combobox-item.d.ts +45 -20
  22. package/cjs/combobox/combobox-list.d.ts +17 -10
  23. package/cjs/combobox/combobox-popover.cjs +5 -5
  24. package/cjs/combobox/combobox-popover.d.ts +8 -7
  25. package/cjs/combobox/combobox-provider.cjs +5 -5
  26. package/cjs/combobox/combobox-row.d.ts +21 -16
  27. package/cjs/combobox/combobox-separator.d.ts +15 -10
  28. package/cjs/combobox/combobox-store.cjs +5 -5
  29. package/cjs/combobox/combobox-store.d.ts +9 -4
  30. package/cjs/combobox/combobox.d.ts +55 -36
  31. package/cjs/composite/composite-overflow-store.cjs +4 -4
  32. package/cjs/composite/composite-overflow.cjs +5 -5
  33. package/cjs/dialog/dialog-backdrop.cjs +3 -3
  34. package/cjs/dialog/dialog-provider.cjs +3 -3
  35. package/cjs/dialog/dialog-store.cjs +3 -3
  36. package/cjs/dialog/dialog.cjs +4 -4
  37. package/cjs/disclosure/disclosure-content.d.ts +9 -4
  38. package/cjs/disclosure/disclosure-provider.cjs +2 -2
  39. package/cjs/disclosure/disclosure-store.cjs +2 -2
  40. package/cjs/disclosure/disclosure-store.d.ts +1 -2
  41. package/cjs/disclosure/disclosure.d.ts +13 -6
  42. package/cjs/form/form-checkbox.d.ts +5 -1
  43. package/cjs/form/form-description.d.ts +10 -3
  44. package/cjs/form/form-error.d.ts +10 -3
  45. package/cjs/form/form-field.d.ts +17 -9
  46. package/cjs/form/form-group-label.d.ts +7 -4
  47. package/cjs/form/form-group.d.ts +5 -2
  48. package/cjs/form/form-input.d.ts +9 -4
  49. package/cjs/form/form-label.d.ts +10 -3
  50. package/cjs/form/form-push.d.ts +5 -2
  51. package/cjs/form/form-radio-group.d.ts +5 -1
  52. package/cjs/form/form-radio.d.ts +5 -1
  53. package/cjs/form/form-remove.d.ts +5 -2
  54. package/cjs/form/form-reset.d.ts +6 -2
  55. package/cjs/form/form-store.d.ts +5 -1
  56. package/cjs/form/form-submit.d.ts +5 -2
  57. package/cjs/form/form.d.ts +5 -1
  58. package/cjs/hovercard/hovercard-anchor.d.ts +11 -5
  59. package/cjs/hovercard/hovercard-arrow.d.ts +13 -8
  60. package/cjs/hovercard/hovercard-description.d.ts +14 -9
  61. package/cjs/hovercard/hovercard-disclosure.d.ts +14 -8
  62. package/cjs/hovercard/hovercard-dismiss.d.ts +11 -6
  63. package/cjs/hovercard/hovercard-heading.d.ts +14 -9
  64. package/cjs/hovercard/hovercard-provider.cjs +5 -5
  65. package/cjs/hovercard/hovercard-store.cjs +5 -5
  66. package/cjs/hovercard/hovercard-store.d.ts +1 -0
  67. package/cjs/hovercard/hovercard.cjs +6 -6
  68. package/cjs/hovercard/hovercard.d.ts +11 -5
  69. package/cjs/menu/menu-button.cjs +3 -1
  70. package/cjs/menu/menu-provider.cjs +6 -6
  71. package/cjs/menu/menu-store.cjs +6 -6
  72. package/cjs/menu/menu-store.d.ts +6 -6
  73. package/cjs/menu/menu.cjs +6 -6
  74. package/cjs/popover/popover-provider.cjs +4 -4
  75. package/cjs/popover/popover-store.cjs +4 -4
  76. package/cjs/popover/popover.cjs +5 -5
  77. package/cjs/select/select-popover.cjs +5 -5
  78. package/cjs/select/select-provider.cjs +5 -5
  79. package/cjs/select/select-store.cjs +5 -5
  80. package/cjs/select/select-store.d.ts +2 -2
  81. package/cjs/tab/tab-panel.cjs +2 -2
  82. package/cjs/tooltip/tooltip-provider.cjs +6 -6
  83. package/cjs/tooltip/tooltip-store.cjs +6 -6
  84. package/cjs/tooltip/tooltip.cjs +6 -6
  85. package/cjs/tsconfig.build.tsbuildinfo +1 -1
  86. package/esm/__chunks/{YJPXO6F5.js → 34JEM52B.js} +1 -1
  87. package/esm/__chunks/{CJPLAYFB.js → 4RP654JS.js} +1 -1
  88. package/esm/__chunks/{RA2AAYOC.js → 4SB2BYFE.js} +1 -1
  89. package/esm/__chunks/{E6GADH6Y.js → A2ONBKVT.js} +2 -2
  90. package/esm/__chunks/{RVGVDX6B.js → GP4UGJIZ.js} +1 -1
  91. package/esm/__chunks/{XEZV3AK4.js → H2BG4QDT.js} +1 -1
  92. package/esm/__chunks/{HJHTMRDC.js → HZPJPDJY.js} +1 -1
  93. package/esm/__chunks/{6LKB3PXM.js → IFNQMENS.js} +1 -1
  94. package/esm/__chunks/{MA5WD4CD.js → UQFOL5I6.js} +1 -1
  95. package/esm/__chunks/{HCTAKPNS.js → UY3UQ4QI.js} +1 -1
  96. package/esm/__chunks/{R3N4R7UZ.js → V5EW3YHP.js} +1 -1
  97. package/esm/__chunks/{NRLOAE2I.js → W575AF63.js} +1 -1
  98. package/esm/checkbox/checkbox.d.ts +12 -9
  99. package/esm/collection/collection.d.ts +5 -1
  100. package/esm/combobox/combobox-cancel.d.ts +14 -9
  101. package/esm/combobox/combobox-disclosure.d.ts +14 -9
  102. package/esm/combobox/combobox-group-label.d.ts +16 -11
  103. package/esm/combobox/combobox-group.d.ts +16 -11
  104. package/esm/combobox/combobox-item-value.d.ts +14 -10
  105. package/esm/combobox/combobox-item.d.ts +45 -20
  106. package/esm/combobox/combobox-list.d.ts +17 -10
  107. package/esm/combobox/combobox-popover.d.ts +8 -7
  108. package/esm/combobox/combobox-popover.js +4 -4
  109. package/esm/combobox/combobox-provider.js +4 -4
  110. package/esm/combobox/combobox-row.d.ts +21 -16
  111. package/esm/combobox/combobox-separator.d.ts +15 -10
  112. package/esm/combobox/combobox-store.d.ts +9 -4
  113. package/esm/combobox/combobox-store.js +4 -4
  114. package/esm/combobox/combobox.d.ts +55 -36
  115. package/esm/composite/composite-overflow-store.js +3 -3
  116. package/esm/composite/composite-overflow.js +4 -4
  117. package/esm/dialog/dialog-backdrop.js +2 -2
  118. package/esm/dialog/dialog-provider.js +2 -2
  119. package/esm/dialog/dialog-store.js +2 -2
  120. package/esm/dialog/dialog.js +3 -3
  121. package/esm/disclosure/disclosure-content.d.ts +9 -4
  122. package/esm/disclosure/disclosure-provider.js +1 -1
  123. package/esm/disclosure/disclosure-store.d.ts +1 -2
  124. package/esm/disclosure/disclosure-store.js +1 -1
  125. package/esm/disclosure/disclosure.d.ts +13 -6
  126. package/esm/form/form-checkbox.d.ts +5 -1
  127. package/esm/form/form-description.d.ts +10 -3
  128. package/esm/form/form-error.d.ts +10 -3
  129. package/esm/form/form-field.d.ts +17 -9
  130. package/esm/form/form-group-label.d.ts +7 -4
  131. package/esm/form/form-group.d.ts +5 -2
  132. package/esm/form/form-input.d.ts +9 -4
  133. package/esm/form/form-label.d.ts +10 -3
  134. package/esm/form/form-push.d.ts +5 -2
  135. package/esm/form/form-radio-group.d.ts +5 -1
  136. package/esm/form/form-radio.d.ts +5 -1
  137. package/esm/form/form-remove.d.ts +5 -2
  138. package/esm/form/form-reset.d.ts +6 -2
  139. package/esm/form/form-store.d.ts +5 -1
  140. package/esm/form/form-submit.d.ts +5 -2
  141. package/esm/form/form.d.ts +5 -1
  142. package/esm/hovercard/hovercard-anchor.d.ts +11 -5
  143. package/esm/hovercard/hovercard-arrow.d.ts +13 -8
  144. package/esm/hovercard/hovercard-description.d.ts +14 -9
  145. package/esm/hovercard/hovercard-disclosure.d.ts +14 -8
  146. package/esm/hovercard/hovercard-dismiss.d.ts +11 -6
  147. package/esm/hovercard/hovercard-heading.d.ts +14 -9
  148. package/esm/hovercard/hovercard-provider.js +4 -4
  149. package/esm/hovercard/hovercard-store.d.ts +1 -0
  150. package/esm/hovercard/hovercard-store.js +4 -4
  151. package/esm/hovercard/hovercard.d.ts +11 -5
  152. package/esm/hovercard/hovercard.js +5 -5
  153. package/esm/menu/menu-button.js +3 -1
  154. package/esm/menu/menu-provider.js +5 -5
  155. package/esm/menu/menu-store.d.ts +6 -6
  156. package/esm/menu/menu-store.js +5 -5
  157. package/esm/menu/menu.js +5 -5
  158. package/esm/popover/popover-provider.js +3 -3
  159. package/esm/popover/popover-store.js +3 -3
  160. package/esm/popover/popover.js +4 -4
  161. package/esm/select/select-popover.js +4 -4
  162. package/esm/select/select-provider.js +4 -4
  163. package/esm/select/select-store.d.ts +2 -2
  164. package/esm/select/select-store.js +4 -4
  165. package/esm/tab/tab-panel.js +1 -1
  166. package/esm/tooltip/tooltip-provider.js +5 -5
  167. package/esm/tooltip/tooltip-store.js +5 -5
  168. package/esm/tooltip/tooltip.js +5 -5
  169. package/esm/tsconfig.build.tsbuildinfo +1 -1
  170. package/package.json +2 -2
@@ -5,7 +5,7 @@ import {
5
5
  } from "./X7FKJQME.js";
6
6
  import {
7
7
  usePopover
8
- } from "./RVGVDX6B.js";
8
+ } from "./GP4UGJIZ.js";
9
9
  import {
10
10
  HovercardScopedContextProvider,
11
11
  useHovercardProviderContext
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DialogBackdrop
3
- } from "./NRLOAE2I.js";
3
+ } from "./W575AF63.js";
4
4
  import {
5
5
  useNestedDialogs
6
6
  } from "./PLOINBVB.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./WGAKICTY.js";
7
7
  import {
8
8
  usePopoverStoreProps
9
- } from "./XEZV3AK4.js";
9
+ } from "./H2BG4QDT.js";
10
10
  import {
11
11
  useStore,
12
12
  useStoreProps
@@ -8,8 +8,8 @@ import {
8
8
 
9
9
  // src/disclosure/disclosure-store.ts
10
10
  import * as Core from "@ariakit/core/disclosure/disclosure-store";
11
- function useDisclosureStoreProps(store, update, props, deps = []) {
12
- useUpdateEffect(update, [props.store, props.disclosure, ...deps]);
11
+ function useDisclosureStoreProps(store, update, props) {
12
+ useUpdateEffect(update, [props.store, props.disclosure]);
13
13
  useStoreProps(store, props, "open", "setOpen");
14
14
  useStoreProps(store, props, "mounted", "setMounted");
15
15
  useStoreProps(store, props, "animated");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useDialog
3
- } from "./CJPLAYFB.js";
3
+ } from "./4RP654JS.js";
4
4
  import {
5
5
  PopoverScopedContextProvider,
6
6
  usePopoverProviderContext
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useDialogStoreProps
3
- } from "./HCTAKPNS.js";
3
+ } from "./UY3UQ4QI.js";
4
4
  import {
5
5
  useStore,
6
6
  useStoreProps
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useHovercardStoreProps
3
- } from "./MA5WD4CD.js";
3
+ } from "./UQFOL5I6.js";
4
4
  import {
5
5
  useStore,
6
6
  useStoreProps
@@ -10,7 +10,7 @@ import {
10
10
  } from "./WGAKICTY.js";
11
11
  import {
12
12
  useHovercardStoreProps
13
- } from "./MA5WD4CD.js";
13
+ } from "./UQFOL5I6.js";
14
14
  import {
15
15
  useStore,
16
16
  useStoreProps
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  usePopoverStoreProps
3
- } from "./XEZV3AK4.js";
3
+ } from "./H2BG4QDT.js";
4
4
  import {
5
5
  useStore,
6
6
  useStoreProps
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useDisclosureStoreProps
3
- } from "./E6GADH6Y.js";
3
+ } from "./A2ONBKVT.js";
4
4
  import {
5
5
  useStore
6
6
  } from "./XXO3VVQU.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./WGAKICTY.js";
4
4
  import {
5
5
  usePopoverStoreProps
6
- } from "./XEZV3AK4.js";
6
+ } from "./H2BG4QDT.js";
7
7
  import {
8
8
  useStore,
9
9
  useStoreProps
@@ -9,7 +9,7 @@ import {
9
9
  } from "./3D7ZB3CS.js";
10
10
  import {
11
11
  useDisclosureStore
12
- } from "./E6GADH6Y.js";
12
+ } from "./A2ONBKVT.js";
13
13
  import {
14
14
  useMergeRefs,
15
15
  useSafeLayoutEffect
@@ -27,12 +27,15 @@ export declare const useCheckbox: import("../utils/types.js").Hook<CheckboxOptio
27
27
  export declare const Checkbox: import("../utils/types.js").Component<CheckboxOptions<"input">>;
28
28
  export interface CheckboxOptions<T extends As = "input"> extends CommandOptions<T> {
29
29
  /**
30
- * Object returned by the `useCheckboxStore` hook. If not provided, the
31
- * internal store will be used.
30
+ * Object returned by the
31
+ * [`useCheckboxStore`](https://ariakit.org/reference/use-checkbox-store)
32
+ * hook. If not provided, the closest
33
+ * [`CheckboxProvider`](https://ariakit.org/reference/checkbox-provider)
34
+ * component's context will be used. Otherwise, the component will fall back
35
+ * to an internal store.
32
36
  *
33
37
  * Live examples:
34
38
  * - [Checkbox as button](https://ariakit.org/examples/checkbox-as-button)
35
- * - [Custom Checkbox](https://ariakit.org/examples/checkbox-custom)
36
39
  */
37
40
  store?: CheckboxStore;
38
41
  /**
@@ -42,14 +45,14 @@ export interface CheckboxOptions<T extends As = "input"> extends CommandOptions<
42
45
  *
43
46
  * Live examples:
44
47
  * - [Checkbox group](https://ariakit.org/examples/checkbox-group)
48
+ * - [MenuItemCheckbox](https://ariakit.org/examples/menu-item-checkbox)
45
49
  * @example
46
50
  * ```jsx
47
- * const checkbox = useCheckboxStore({
48
- * defaultValue: ["Apple", "Orange"],
49
- * });
50
- * <Checkbox store={checkbox} value="Apple" />
51
- * <Checkbox store={checkbox} value="Orange" />
52
- * <Checkbox store={checkbox} value="Watermelon" />
51
+ * <CheckboxProvider defaultValue={["Apple", "Orange"]}>
52
+ * <Checkbox value="Apple" />
53
+ * <Checkbox value="Orange" />
54
+ * <Checkbox value="Watermelon" />
55
+ * </CheckboxProvider>
53
56
  * ```
54
57
  */
55
58
  value?: InputHTMLAttributes<HTMLInputElement>["value"];
@@ -35,7 +35,11 @@ export declare const useCollection: import("../utils/types.js").Hook<CollectionO
35
35
  export declare const Collection: import("../utils/types.js").Component<CollectionOptions<"div">>;
36
36
  export interface CollectionOptions<T extends As = "div"> extends Options<T> {
37
37
  /**
38
- * Object returned by the `useCollectionStore` hook.
38
+ * Object returned by the
39
+ * [`useCollectionStore`](https://ariakit.org/reference/use-collection-store)
40
+ * hook. If not provided, the closest
41
+ * [`CollectionProvider`](https://ariakit.org/reference/collection-provider)
42
+ * component's context will be used.
39
43
  */
40
44
  store?: CollectionStore;
41
45
  }
@@ -19,20 +19,25 @@ export declare const useComboboxCancel: import("../utils/types.js").Hook<Combobo
19
19
  * @see https://ariakit.org/components/combobox
20
20
  * @example
21
21
  * ```jsx
22
- * const combobox = useComboboxStore();
23
- * <Combobox store={combobox} />
24
- * <ComboboxCancel store={combobox} />
25
- * <ComboboxPopover store={combobox}>
26
- * <ComboboxItem value="Item 1" />
27
- * <ComboboxItem value="Item 2" />
28
- * <ComboboxItem value="Item 3" />
29
- * </ComboboxPopover>
22
+ * <ComboboxProvider>
23
+ * <Combobox />
24
+ * <ComboboxCancel />
25
+ * <ComboboxPopover>
26
+ * <ComboboxItem value="Apple" />
27
+ * <ComboboxItem value="Banana" />
28
+ * <ComboboxItem value="Orange" />
29
+ * </ComboboxPopover>
30
+ * </ComboboxProvider>
30
31
  * ```
31
32
  */
32
33
  export declare const ComboboxCancel: import("../utils/types.js").Component<ComboboxCancelOptions<"button">>;
33
34
  export interface ComboboxCancelOptions<T extends As = "button"> extends ButtonOptions<T> {
34
35
  /**
35
- * Object returned by the `useComboboxStore` hook.
36
+ * Object returned by the
37
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
38
+ * hook. If not provided, the closest
39
+ * [`ComboboxProvider`](https://ariakit.org/reference/combobox-provider)
40
+ * component's context will be used.
36
41
  */
37
42
  store?: ComboboxStore;
38
43
  }
@@ -25,20 +25,25 @@ export declare const useComboboxDisclosure: import("../utils/types.js").Hook<Com
25
25
  * @see https://ariakit.org/components/combobox
26
26
  * @example
27
27
  * ```jsx
28
- * const combobox = useComboboxStore();
29
- * <Combobox store={combobox} />
30
- * <ComboboxDisclosure store={combobox} />
31
- * <ComboboxPopover store={combobox}>
32
- * <ComboboxItem value="Item 1" />
33
- * <ComboboxItem value="Item 2" />
34
- * <ComboboxItem value="Item 3" />
35
- * </ComboboxPopover>
28
+ * <ComboboxProvider>
29
+ * <Combobox />
30
+ * <ComboboxDisclosure />
31
+ * <ComboboxPopover>
32
+ * <ComboboxItem value="Apple" />
33
+ * <ComboboxItem value="Banana" />
34
+ * <ComboboxItem value="Orange" />
35
+ * </ComboboxPopover>
36
+ * </ComboboxProvider>
36
37
  * ```
37
38
  */
38
39
  export declare const ComboboxDisclosure: import("../utils/types.js").Component<ComboboxDisclosureOptions<"button">>;
39
40
  export interface ComboboxDisclosureOptions<T extends As = "button"> extends DialogDisclosureOptions<T> {
40
41
  /**
41
- * Object returned by the `useComboboxStore` hook.
42
+ * Object returned by the
43
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
44
+ * hook. If not provided, the closest
45
+ * [`ComboboxProvider`](https://ariakit.org/reference/combobox-provider)
46
+ * component's context will be used.
42
47
  */
43
48
  store?: ComboboxStore;
44
49
  }
@@ -21,22 +21,27 @@ export declare const useComboboxGroupLabel: import("../utils/types.js").Hook<Com
21
21
  * @see https://ariakit.org/components/combobox
22
22
  * @example
23
23
  * ```jsx
24
- * const combobox = useComboboxStore();
25
- * <Combobox store={combobox} />
26
- * <ComboboxPopover store={combobox}>
27
- * <ComboboxGroup>
28
- * <ComboboxGroupLabel>Label</ComboboxGroupLabel>
29
- * <ComboboxItem value="Item 1" />
30
- * <ComboboxItem value="Item 2" />
31
- * </ComboboxGroup>
32
- * </ComboboxPopover>
24
+ * <ComboboxProvider>
25
+ * <Combobox />
26
+ * <ComboboxPopover>
27
+ * <ComboboxGroup>
28
+ * <ComboboxGroupLabel>Fruits</ComboboxGroupLabel>
29
+ * <ComboboxItem value="Apple" />
30
+ * <ComboboxItem value="Banana" />
31
+ * </ComboboxGroup>
32
+ * </ComboboxPopover>
33
+ * </ComboboxProvider>
33
34
  * ```
34
35
  */
35
36
  export declare const ComboboxGroupLabel: import("../utils/types.js").Component<ComboboxGroupLabelOptions<"div">>;
36
37
  export interface ComboboxGroupLabelOptions<T extends As = "div"> extends CompositeGroupLabelOptions<T> {
37
38
  /**
38
- * Object returned by the `useComboboxStore` hook. If not provided, the parent
39
- * `ComboboxList` or `ComboboxPopover` components' context will be used.
39
+ * Object returned by the
40
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
41
+ * hook. If not provided, the parent
42
+ * [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
43
+ * [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
44
+ * components' context will be used.
40
45
  */
41
46
  store?: ComboboxStore;
42
47
  }
@@ -24,22 +24,27 @@ export declare const useComboboxGroup: import("../utils/types.js").Hook<Combobox
24
24
  * @see https://ariakit.org/components/combobox
25
25
  * @example
26
26
  * ```jsx
27
- * const combobox = useComboboxStore();
28
- * <Combobox store={store} />
29
- * <ComboboxPopover store={store}>
30
- * <ComboboxGroup>
31
- * <ComboboxGroupLabel>Label</ComboboxGroupLabel>
32
- * <ComboboxItem value="Item 1" />
33
- * <ComboboxItem value="Item 2" />
34
- * </ComboboxGroup>
35
- * </ComboboxPopover>
27
+ * <ComboboxProvider>
28
+ * <Combobox />
29
+ * <ComboboxPopover>
30
+ * <ComboboxGroup>
31
+ * <ComboboxGroupLabel>Fruits</ComboboxGroupLabel>
32
+ * <ComboboxItem value="Apple" />
33
+ * <ComboboxItem value="Banana" />
34
+ * </ComboboxGroup>
35
+ * </ComboboxPopover>
36
+ * </ComboboxProvider>
36
37
  * ```
37
38
  */
38
39
  export declare const ComboboxGroup: import("../utils/types.js").Component<ComboboxGroupOptions<"div">>;
39
40
  export interface ComboboxGroupOptions<T extends As = "div"> extends CompositeGroupOptions<T> {
40
41
  /**
41
- * Object returned by the `useComboboxStore` hook. If not provided, the parent
42
- * `ComboboxList` or `ComboboxPopover` components' context will be used.
42
+ * Object returned by the
43
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
44
+ * hook. If not provided, the parent
45
+ * [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
46
+ * [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
47
+ * components' context will be used.
43
48
  */
44
49
  store?: ComboboxStore;
45
50
  }
@@ -30,14 +30,14 @@ export declare const useComboboxItemValue: import("../utils/types.js").Hook<Comb
30
30
  * @see https://ariakit.org/components/combobox
31
31
  * @example
32
32
  * ```jsx
33
- * const combobox = useComboboxStore({ value: "p" });
34
- *
35
- * <Combobox store={combobox} />
36
- * <ComboboxPopover store={combobox}>
37
- * <ComboboxItem value="Apple">
38
- * <ComboboxItemValue />
39
- * </ComboboxItem>
40
- * </ComboboxPopover>
33
+ * <ComboboxProvider value="p">
34
+ * <Combobox />
35
+ * <ComboboxPopover>
36
+ * <ComboboxItem value="Apple">
37
+ * <ComboboxItemValue />
38
+ * </ComboboxItem>
39
+ * </ComboboxPopover>
40
+ * </ComboboxProvider>
41
41
  *
42
42
  * // The Apple item will have a value element that looks like this:
43
43
  * <span>
@@ -51,8 +51,12 @@ export declare const useComboboxItemValue: import("../utils/types.js").Hook<Comb
51
51
  export declare const ComboboxItemValue: import("../utils/types.js").Component<ComboboxItemValueOptions<"span">>;
52
52
  export interface ComboboxItemValueOptions<T extends As = "span"> extends Options<T> {
53
53
  /**
54
- * Object returned by the `useComboboxStore` hook. If not provided, the parent
55
- * `ComboboxList` or `ComboboxPopover` components' context will be used.
54
+ * Object returned by the
55
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
56
+ * hook. If not provided, the parent
57
+ * [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
58
+ * [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
59
+ * components' context will be used.
56
60
  */
57
61
  store?: ComboboxStore;
58
62
  /**
@@ -16,42 +16,67 @@ import type { ComboboxStore } from "./combobox-store.js";
16
16
  */
17
17
  export declare const useComboboxItem: import("../utils/types.js").Hook<ComboboxItemOptions<"div">>;
18
18
  /**
19
- * Renders a combobox item inside a combobox list or popover. The `role` prop
20
- * will be automatically set based on the `ComboboxList` or `ComboboxPopover`
21
- * own `role` prop. For example, if the `ComboboxPopover` component's `role`
22
- * prop is set to `listbox` (default), the `ComboboxItem` `role` will be set to
23
- * `option`. By default, the `value` prop will be rendered as the children, but
24
- * this can be overriden.
19
+ * Renders a combobox item inside a
20
+ * [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
21
+ * [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
22
+ * components. The `role` prop will be automatically set based on the list's own
23
+ * `role` prop. For example, if the list `role` is set to `listbox` (default),
24
+ * the `ComboboxItem` `role` will be set to `option`.
25
+ *
26
+ * By default, the
27
+ * [`value`](https://ariakit.org/reference/combobox-item#value) prop will be
28
+ * rendered as the children, but this can be overriden.
25
29
  * @see https://ariakit.org/components/combobox
26
30
  * @example
27
31
  * ```jsx
28
- * const combobox = useComboboxStore();
29
- * <Combobox store={combobox} />
30
- * <ComboboxPopover store={combobox}>
31
- * <ComboboxItem value="Item 1" />
32
- * <ComboboxItem value="Item 2" />
33
- * <ComboboxItem value="Item 3" />
34
- * </ComboboxPopover>
32
+ * <ComboboxProvider>
33
+ * <Combobox />
34
+ * <ComboboxPopover>
35
+ * <ComboboxItem value="Apple" />
36
+ * <ComboboxItem value="Banana" />
37
+ * <ComboboxItem value="Orange" />
38
+ * </ComboboxPopover>
39
+ * </ComboboxProvider>
35
40
  * ```
36
41
  */
37
42
  export declare const ComboboxItem: import("../utils/types.js").Component<ComboboxItemOptions<"div">>;
38
43
  export interface ComboboxItemOptions<T extends As = "div"> extends CompositeItemOptions<T>, CompositeHoverOptions<T> {
39
44
  /**
40
- * Object returned by the `useComboboxStore` hook. If not provided, the parent
41
- * `ComboboxList` or `ComboboxPopover` components' context will be used.
45
+ * Object returned by the
46
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
47
+ * hook. If not provided, the parent
48
+ * [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
49
+ * [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
50
+ * components' context will be used.
42
51
  */
43
52
  store?: ComboboxStore;
44
53
  /**
45
54
  * The value of the item. This will be rendered as the children by default.
46
- * - If `setValueOnClick` is set to `true`, this will be the value of the
47
- * combobox input when the user clicks on this item.
48
- * - If the `autoComplete` prop on the `Combobox` component is set to `both`
49
- * or `inline`, this will be the value of the combobox input when the
50
- * combobox loses focus.
55
+ * - If
56
+ * [`setValueOnClick`](https://ariakit.org/reference/combobox-item#setvalueonclick)
57
+ * is set to `true`, this will be the value of the combobox input when the
58
+ * user clicks on this item.
59
+ * - If the
60
+ * [`autoComplete`](https://ariakit.org/reference/combobox#autocomplete)
61
+ * prop on the [`Combobox`](https://ariakit.org/reference/combobox)
62
+ * component is set to `both` or `inline`, this will be the value of the
63
+ * combobox input when the combobox loses focus.
64
+ *
65
+ * Live examples:
66
+ * - [Animated Combobox](https://ariakit.org/examples/combobox-animated)
67
+ * - [ComboboxCancel](https://ariakit.org/examples/combobox-cancel)
68
+ * - [ComboboxDisclosure](https://ariakit.org/examples/combobox-disclosure)
69
+ * - [Combobox filtering](https://ariakit.org/examples/combobox-filtering)
70
+ * - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
71
+ * - [Textarea with inline
72
+ * Combobox](https://ariakit.org/examples/combobox-textarea)
51
73
  */
52
74
  value?: string;
53
75
  /**
54
76
  * Whether to hide the combobox when this item is clicked.
77
+ *
78
+ * Live examples:
79
+ * - [Combobox with links](https://ariakit.org/examples/combobox-links)
55
80
  * @default true
56
81
  */
57
82
  hideOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
@@ -20,24 +20,31 @@ export declare const useComboboxList: import("../utils/types.js").Hook<ComboboxL
20
20
  /**
21
21
  * Renders a combobox list. The `role` prop is set to `listbox` by default, but
22
22
  * can be overriden by any other valid combobox popup role (`listbox`, `menu`,
23
- * `tree`, `grid` or `dialog`). The `aria-labelledby` prop is set to the
24
- * combobox input element's `id` by default.
23
+ * `tree`, `grid` or `dialog`).
24
+ *
25
+ * The `aria-labelledby` prop is set to the combobox input element's `id` by
26
+ * default.
25
27
  * @see https://ariakit.org/components/combobox
26
28
  * @example
27
29
  * ```jsx
28
- * const combobox = useComboboxStore();
29
- * <Combobox store={combobox} />
30
- * <ComboboxList store={combobox}>
31
- * <ComboboxItem value="Item 1" />
32
- * <ComboboxItem value="Item 2" />
33
- * <ComboboxItem value="Item 3" />
34
- * </ComboboxList>
30
+ * <ComboboxProvider>
31
+ * <Combobox />
32
+ * <ComboboxList>
33
+ * <ComboboxItem value="Apple" />
34
+ * <ComboboxItem value="Banana" />
35
+ * <ComboboxItem value="Orange" />
36
+ * </ComboboxList>
37
+ * </ComboboxProvider>
35
38
  * ```
36
39
  */
37
40
  export declare const ComboboxList: import("../utils/types.js").Component<ComboboxListOptions<"div">>;
38
41
  export interface ComboboxListOptions<T extends As = "div"> extends FocusableOptions<T>, Pick<DisclosureContentOptions, "alwaysVisible"> {
39
42
  /**
40
- * Object returned by the `useComboboxStore` hook.
43
+ * Object returned by the
44
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
45
+ * hook. If not provided, the closest
46
+ * [`ComboboxProvider`](https://ariakit.org/reference/combobox-provider)
47
+ * component's context will be used.
41
48
  */
42
49
  store?: ComboboxStore;
43
50
  }
@@ -24,13 +24,14 @@ export declare const useComboboxPopover: import("../utils/types.js").Hook<Combob
24
24
  * @see https://ariakit.org/components/combobox
25
25
  * @example
26
26
  * ```jsx
27
- * const combobox = useComboboxStore();
28
- * <Combobox store={combobox} />
29
- * <ComboboxPopover store={combobox}>
30
- * <ComboboxItem value="Item 1" />
31
- * <ComboboxItem value="Item 2" />
32
- * <ComboboxItem value="Item 3" />
33
- * </ComboboxPopover>
27
+ * <ComboboxProvider>
28
+ * <Combobox />
29
+ * <ComboboxPopover>
30
+ * <ComboboxItem value="Apple" />
31
+ * <ComboboxItem value="Banana" />
32
+ * <ComboboxItem value="Orange" />
33
+ * </ComboboxPopover>
34
+ * </ComboboxProvider>
34
35
  * ```
35
36
  */
36
37
  export declare const ComboboxPopover: import("../utils/types.js").Component<ComboboxPopoverOptions<"div">>;
@@ -8,9 +8,9 @@ import "../__chunks/5C7J4IAS.js";
8
8
  import "../__chunks/74KKBFVP.js";
9
9
  import {
10
10
  usePopover
11
- } from "../__chunks/RVGVDX6B.js";
12
- import "../__chunks/CJPLAYFB.js";
13
- import "../__chunks/NRLOAE2I.js";
11
+ } from "../__chunks/GP4UGJIZ.js";
12
+ import "../__chunks/4RP654JS.js";
13
+ import "../__chunks/W575AF63.js";
14
14
  import "../__chunks/PLOINBVB.js";
15
15
  import "../__chunks/HAVCR65N.js";
16
16
  import "../__chunks/62DFK33R.js";
@@ -43,7 +43,7 @@ import {
43
43
  createElement,
44
44
  createHook
45
45
  } from "../__chunks/CFEUKV6C.js";
46
- import "../__chunks/E6GADH6Y.js";
46
+ import "../__chunks/A2ONBKVT.js";
47
47
  import "../__chunks/XXO3VVQU.js";
48
48
  import "../__chunks/J7Q2EO23.js";
49
49
  import "../__chunks/CP3U4HPL.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useComboboxStore
3
- } from "../__chunks/R3N4R7UZ.js";
3
+ } from "../__chunks/V5EW3YHP.js";
4
4
  import {
5
5
  ComboboxContextProvider
6
6
  } from "../__chunks/QP4RN5UY.js";
@@ -12,9 +12,9 @@ import "../__chunks/547DFODS.js";
12
12
  import "../__chunks/5YYGDU4E.js";
13
13
  import "../__chunks/56KWVYDN.js";
14
14
  import "../__chunks/CFEUKV6C.js";
15
- import "../__chunks/XEZV3AK4.js";
16
- import "../__chunks/HCTAKPNS.js";
17
- import "../__chunks/E6GADH6Y.js";
15
+ import "../__chunks/H2BG4QDT.js";
16
+ import "../__chunks/UY3UQ4QI.js";
17
+ import "../__chunks/A2ONBKVT.js";
18
18
  import "../__chunks/XXO3VVQU.js";
19
19
  import "../__chunks/J7Q2EO23.js";
20
20
  import "../__chunks/CP3U4HPL.js";
@@ -23,27 +23,32 @@ export declare const useComboboxRow: import("../utils/types.js").Hook<ComboboxRo
23
23
  * @see https://ariakit.org/components/combobox
24
24
  * @example
25
25
  * ```jsx
26
- * const combobox = useComboboxStore();
27
- * <Combobox store={combobox} />
28
- * <ComboboxPopover store={combobox}>
29
- * <ComboboxRow>
30
- * <ComboboxItem value="Item 1.1" />
31
- * <ComboboxItem value="Item 1.2" />
32
- * <ComboboxItem value="Item 1.3" />
33
- * </ComboboxRow>
34
- * <ComboboxRow>
35
- * <ComboboxItem value="Item 2.1" />
36
- * <ComboboxItem value="Item 2.2" />
37
- * <ComboboxItem value="Item 2.3" />
38
- * </ComboboxRow>
39
- * </ComboboxPopover>
26
+ * <ComboboxProvider>
27
+ * <Combobox />
28
+ * <ComboboxPopover>
29
+ * <ComboboxRow>
30
+ * <ComboboxItem value="Item 1.1" />
31
+ * <ComboboxItem value="Item 1.2" />
32
+ * <ComboboxItem value="Item 1.3" />
33
+ * </ComboboxRow>
34
+ * <ComboboxRow>
35
+ * <ComboboxItem value="Item 2.1" />
36
+ * <ComboboxItem value="Item 2.2" />
37
+ * <ComboboxItem value="Item 2.3" />
38
+ * </ComboboxRow>
39
+ * </ComboboxPopover>
40
+ * </ComboboxProvider>
40
41
  * ```
41
42
  */
42
43
  export declare const ComboboxRow: import("../utils/types.js").Component<ComboboxRowOptions<"div">>;
43
44
  export interface ComboboxRowOptions<T extends As = "div"> extends CompositeRowOptions<T> {
44
45
  /**
45
- * Object returned by the `useComboboxStore` hook. If not provided, the parent
46
- * `ComboboxList` or `ComboboxPopover` components' context will be used.
46
+ * Object returned by the
47
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
48
+ * hook. If not provided, the parent
49
+ * [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
50
+ * [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
51
+ * components' context will be used.
47
52
  */
48
53
  store?: ComboboxStore;
49
54
  }