@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
@@ -22,21 +22,26 @@ export declare const useComboboxSeparator: import("../utils/types.js").Hook<Comb
22
22
  * @see https://ariakit.org/components/combobox
23
23
  * @example
24
24
  * ```jsx
25
- * const combobox = useComboboxStore();
26
- * <Combobox store={combobox} />
27
- * <ComboboxPopover store={combobox}>
28
- * <ComboboxItem value="Item 1" />
29
- * <ComboboxSeparator />
30
- * <ComboboxItem value="Item 2" />
31
- * <ComboboxItem value="Item 3" />
32
- * </ComboboxPopover>
25
+ * <ComboboxProvider>
26
+ * <Combobox />
27
+ * <ComboboxPopover>
28
+ * <ComboboxItem value="Item 1" />
29
+ * <ComboboxSeparator />
30
+ * <ComboboxItem value="Item 2" />
31
+ * <ComboboxItem value="Item 3" />
32
+ * </ComboboxPopover>
33
+ * </ComboboxProvider>
33
34
  * ```
34
35
  */
35
36
  export declare const ComboboxSeparator: import("../utils/types.js").Component<ComboboxSeparatorOptions<"hr">>;
36
37
  export interface ComboboxSeparatorOptions<T extends As = "hr"> extends CompositeSeparatorOptions<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
  }
@@ -26,11 +26,16 @@ export interface ComboboxStoreFunctions extends Core.ComboboxStoreFunctions, Com
26
26
  export interface ComboboxStoreOptions extends Core.ComboboxStoreOptions, CompositeStoreOptions<ComboboxStoreItem>, PopoverStoreOptions {
27
27
  /**
28
28
  * A callback that gets called when the `value` state changes.
29
+ *
30
+ * Live examples:
31
+ * - [Combobox filtering](https://ariakit.org/examples/combobox-filtering)
32
+ * - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
33
+ * - [Combobox with links](https://ariakit.org/examples/combobox-links)
34
+ * - [Multi-selectable
35
+ * Combobox](https://ariakit.org/examples/combobox-multiple)
36
+ * - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
37
+ * - [Select with Combobox](https://ariakit.org/examples/select-combobox)
29
38
  * @param value The new value.
30
- * @example
31
- * function MyCombobox({ value, onChange }) {
32
- * const combobox = useComboboxStore({ value, setValue: onChange });
33
- * }
34
39
  */
35
40
  setValue?: (value: ComboboxStoreState["value"]) => void;
36
41
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useComboboxStore,
3
3
  useComboboxStoreProps
4
- } from "../__chunks/R3N4R7UZ.js";
4
+ } from "../__chunks/V5EW3YHP.js";
5
5
  import "../__chunks/WGAKICTY.js";
6
6
  import "../__chunks/NWDF5QDV.js";
7
- import "../__chunks/XEZV3AK4.js";
8
- import "../__chunks/HCTAKPNS.js";
9
- import "../__chunks/E6GADH6Y.js";
7
+ import "../__chunks/H2BG4QDT.js";
8
+ import "../__chunks/UY3UQ4QI.js";
9
+ import "../__chunks/A2ONBKVT.js";
10
10
  import "../__chunks/XXO3VVQU.js";
11
11
  import "../__chunks/J7Q2EO23.js";
12
12
  import "../__chunks/CP3U4HPL.js";
@@ -25,31 +25,38 @@ export declare const useCombobox: import("../utils/types.js").Hook<ComboboxOptio
25
25
  * @see https://ariakit.org/components/combobox
26
26
  * @example
27
27
  * ```jsx
28
- * const combobox = useComboboxStore();
29
- * <Combobox store={combobox} />
30
- * <ComboboxPopover store={combobox}>
31
- * <ComboboxItem value="Apple" />
32
- * <ComboboxItem value="Banana" />
33
- * <ComboboxItem value="Orange" />
34
- * </ComboboxPopover>
28
+ * <ComboboxProvider>
29
+ * <Combobox />
30
+ * <ComboboxPopover>
31
+ * <ComboboxItem value="Apple" />
32
+ * <ComboboxItem value="Banana" />
33
+ * <ComboboxItem value="Orange" />
34
+ * </ComboboxPopover>
35
+ * </ComboboxProvider>
35
36
  * ```
36
37
  */
37
38
  export declare const Combobox: import("../utils/types.js").Component<ComboboxOptions<"input">>;
38
39
  export interface ComboboxOptions<T extends As = "input"> extends CompositeOptions<T>, PopoverAnchorOptions<T> {
39
40
  /**
40
- * Object returned by the `useComboboxStore` hook.
41
+ * Object returned by the
42
+ * [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
43
+ * hook. If not provided, the closest
44
+ * [`ComboboxProvider`](https://ariakit.org/reference/combobox-provider)
45
+ * component's context will be used.
41
46
  */
42
47
  store?: ComboboxStore;
43
48
  /**
44
49
  * Whether the first item will be automatically selected when the combobox
45
50
  * input value changes. When it's set to `true`, the exact behavior will
46
- * depend on the value of `autoComplete` prop:
47
- * - If `autoComplete` is `both` or `inline`, the first item is automatically
48
- * focused when the popup opens, and the input value changes to reflect
49
- * this. The inline completion string will be highlighted and will have a
50
- * selected state.
51
- * - If `autoComplete` is `list` or `none`, the first item is automatically
52
- * focused when the popup opens, but the input value doesn't change.
51
+ * depend on the value of
52
+ * [`autoComplete`](https://ariakit.org/reference/combobox#autocomplete) prop:
53
+ * - If [`autoComplete`](https://ariakit.org/reference/combobox#autocomplete)
54
+ * is `both` or `inline`, the first item is automatically focused when the
55
+ * popup opens, and the input value changes to reflect this. The inline
56
+ * completion string will be highlighted and will have a selected state.
57
+ * - If [`autoComplete`](https://ariakit.org/reference/combobox#autocomplete)
58
+ * is `list` or `none`, the first item is automatically focused when the
59
+ * popup opens, but the input value doesn't change.
53
60
  *
54
61
  * Live examples:
55
62
  * - [ComboboxCancel](https://ariakit.org/examples/combobox-cancel)
@@ -57,26 +64,39 @@ export interface ComboboxOptions<T extends As = "input"> extends CompositeOption
57
64
  * - [Combobox with links](https://ariakit.org/examples/combobox-links)
58
65
  * - [Textarea with inline
59
66
  * Combobox](https://ariakit.org/examples/combobox-textarea)
67
+ * - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
68
+ * - [Select with Combobox](https://ariakit.org/examples/select-combobox)
60
69
  * @default false
61
70
  */
62
71
  autoSelect?: boolean;
63
72
  /**
64
- * Whether the items will be filtered based on `value` and whether the input
65
- * value will temporarily change based on the active item. If `defaultList` or
66
- * `list` are provided, this will be set to `list` by default, otherwise it'll
67
- * default to `none`.
68
- * - `both`: the items will be filtered based on `value` and the input value
69
- * will temporarily change based on the active item.
70
- * - `list`: the items will be filtered based on `value` and the input value
71
- * will NOT change based on the active item.
72
- * - `inline`: the items are static, that is, they won't be filtered based on
73
- * `value`, but the input value will temporarily change based on the active
74
- * item.
73
+ * Whether the items will be filtered based on
74
+ * [`value`](https://ariakit.org/reference/combobox-provider#value) and
75
+ * whether the input value will temporarily change based on the active item.
76
+ *
77
+ * This prop is based on the standard
78
+ * [`aria-autocomplete`](https://w3c.github.io/aria/#aria-autocomplete)
79
+ * attribute, accepting the same values:
80
+ * - `both`: indicates that the items will be filtered based on
81
+ * [`value`](https://ariakit.org/reference/combobox-provider#value) and the
82
+ * input value will temporarily change based on the active item. The
83
+ * filtering logic must be implemented by the consumer of this component,
84
+ * whereas Ariakit will automatically provide the inline autocompletion
85
+ * behavior.
86
+ * - `list` (default): indicates that the items will be filtered based on
87
+ * [`value`](https://ariakit.org/reference/combobox-provider#value) and the
88
+ * input value will NOT change based on the active item. The filtering logic
89
+ * must be implemented by the consumer of this component.
90
+ * - `inline`: indicates that the items are static, that is, they won't be
91
+ * filtered, but the input value will temporarily change based on the active
92
+ * item. Ariakit will automatically provide the inline autocompletion
93
+ * behavior
75
94
  * - `none`: the items are static and the input value will NOT change based on
76
95
  * the active item.
77
96
  *
78
97
  * Live examples:
79
98
  * - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
99
+ * @default "list"
80
100
  */
81
101
  autoComplete?: StringWithValue<Required<AriaAttributes>["aria-autocomplete"]>;
82
102
  /**
@@ -105,8 +125,9 @@ export interface ComboboxOptions<T extends As = "input"> extends CompositeOption
105
125
  */
106
126
  setValueOnChange?: BooleanOrCallback<ChangeEvent<HTMLElement>>;
107
127
  /**
108
- * Whether the combobox list/popover should be shown when the input is
109
- * clicked.
128
+ * Whether the [`ComboboxList`](https://ariakit.org/reference/combobox-list)
129
+ * or [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
130
+ * components should be shown when the input is clicked.
110
131
  *
111
132
  * Live examples:
112
133
  * - [Textarea with inline
@@ -114,15 +135,15 @@ export interface ComboboxOptions<T extends As = "input"> extends CompositeOption
114
135
  * @default true
115
136
  * @example
116
137
  * ```jsx
117
- * const combobox = useComboboxStore();
118
- * const canShow = combobox.useState((state) => state.value.length > 1);
119
- * <Combobox store={combobox} showOnMouseDown={canShow} />
138
+ * <Combobox showOnMouseDown={value.length > 1} />
120
139
  * ```
121
140
  */
122
141
  showOnMouseDown?: BooleanOrCallback<MouseEvent<HTMLElement>>;
123
142
  /**
124
- * Whether the combobox list/popover should be shown when the user presses
125
- * the arrow up or down keys while focusing on the combobox input element.
143
+ * Whether the [`ComboboxList`](https://ariakit.org/reference/combobox-list)
144
+ * or [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
145
+ * components should be shown when the user presses the arrow up or down keys
146
+ * while focusing on the combobox input element.
126
147
  *
127
148
  * Live examples:
128
149
  * - [Textarea with inline
@@ -130,9 +151,7 @@ export interface ComboboxOptions<T extends As = "input"> extends CompositeOption
130
151
  * @default true
131
152
  * @example
132
153
  * ```jsx
133
- * const combobox = useComboboxStore();
134
- * const canShow = combobox.useState((state) => state.value.length > 1);
135
- * <Combobox store={combobox} showOnKeyDown={canShow} />
154
+ * <Combobox showOnKeyDown={value.length > 1} />
136
155
  * ```
137
156
  */
138
157
  showOnKeyDown?: BooleanOrCallback<ReactKeyboardEvent<HTMLElement>>;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  usePopoverStoreProps
3
- } from "../__chunks/XEZV3AK4.js";
4
- import "../__chunks/HCTAKPNS.js";
5
- import "../__chunks/E6GADH6Y.js";
3
+ } from "../__chunks/H2BG4QDT.js";
4
+ import "../__chunks/UY3UQ4QI.js";
5
+ import "../__chunks/A2ONBKVT.js";
6
6
  import {
7
7
  useStore
8
8
  } from "../__chunks/XXO3VVQU.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  usePopover
3
- } from "../__chunks/RVGVDX6B.js";
4
- import "../__chunks/CJPLAYFB.js";
5
- import "../__chunks/NRLOAE2I.js";
3
+ } from "../__chunks/GP4UGJIZ.js";
4
+ import "../__chunks/4RP654JS.js";
5
+ import "../__chunks/W575AF63.js";
6
6
  import "../__chunks/PLOINBVB.js";
7
7
  import "../__chunks/HAVCR65N.js";
8
8
  import "../__chunks/62DFK33R.js";
@@ -35,7 +35,7 @@ import {
35
35
  createElement,
36
36
  createHook
37
37
  } from "../__chunks/CFEUKV6C.js";
38
- import "../__chunks/E6GADH6Y.js";
38
+ import "../__chunks/A2ONBKVT.js";
39
39
  import "../__chunks/XXO3VVQU.js";
40
40
  import {
41
41
  useEvent
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DialogBackdrop
3
- } from "../__chunks/NRLOAE2I.js";
3
+ } from "../__chunks/W575AF63.js";
4
4
  import "../__chunks/KGDYSCOM.js";
5
5
  import "../__chunks/IXXFVVA2.js";
6
6
  import "../__chunks/5M4ITSXL.js";
@@ -10,7 +10,7 @@ import "../__chunks/3D7ZB3CS.js";
10
10
  import "../__chunks/5YYGDU4E.js";
11
11
  import "../__chunks/56KWVYDN.js";
12
12
  import "../__chunks/CFEUKV6C.js";
13
- import "../__chunks/E6GADH6Y.js";
13
+ import "../__chunks/A2ONBKVT.js";
14
14
  import "../__chunks/XXO3VVQU.js";
15
15
  import "../__chunks/J7Q2EO23.js";
16
16
  import "../__chunks/CP3U4HPL.js";
@@ -5,8 +5,8 @@ import "../__chunks/56KWVYDN.js";
5
5
  import "../__chunks/CFEUKV6C.js";
6
6
  import {
7
7
  useDialogStore
8
- } from "../__chunks/HCTAKPNS.js";
9
- import "../__chunks/E6GADH6Y.js";
8
+ } from "../__chunks/UY3UQ4QI.js";
9
+ import "../__chunks/A2ONBKVT.js";
10
10
  import "../__chunks/XXO3VVQU.js";
11
11
  import "../__chunks/J7Q2EO23.js";
12
12
  import "../__chunks/CP3U4HPL.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  useDialogStore,
3
3
  useDialogStoreProps
4
- } from "../__chunks/HCTAKPNS.js";
5
- import "../__chunks/E6GADH6Y.js";
4
+ } from "../__chunks/UY3UQ4QI.js";
5
+ import "../__chunks/A2ONBKVT.js";
6
6
  import "../__chunks/XXO3VVQU.js";
7
7
  import "../__chunks/J7Q2EO23.js";
8
8
  import "../__chunks/CP3U4HPL.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Dialog,
3
3
  useDialog
4
- } from "../__chunks/CJPLAYFB.js";
5
- import "../__chunks/NRLOAE2I.js";
4
+ } from "../__chunks/4RP654JS.js";
5
+ import "../__chunks/W575AF63.js";
6
6
  import "../__chunks/PLOINBVB.js";
7
7
  import "../__chunks/HAVCR65N.js";
8
8
  import "../__chunks/62DFK33R.js";
@@ -30,7 +30,7 @@ import "../__chunks/M4OAD5XF.js";
30
30
  import "../__chunks/BMLNRUFQ.js";
31
31
  import "../__chunks/6XXSNRNX.js";
32
32
  import "../__chunks/CFEUKV6C.js";
33
- import "../__chunks/E6GADH6Y.js";
33
+ import "../__chunks/A2ONBKVT.js";
34
34
  import "../__chunks/XXO3VVQU.js";
35
35
  import "../__chunks/J7Q2EO23.js";
36
36
  import "../__chunks/CP3U4HPL.js";
@@ -18,15 +18,20 @@ export declare const useDisclosureContent: import("../utils/types.js").Hook<Disc
18
18
  * @see https://ariakit.org/components/disclosure
19
19
  * @example
20
20
  * ```jsx
21
- * const disclosure = useDisclosureStore();
22
- * <Disclosure store={disclosure}>Disclosure</Disclosure>
23
- * <DisclosureContent store={disclosure}>Content</DisclosureContent>
21
+ * <DisclosureProvider>
22
+ * <Disclosure>Disclosure</Disclosure>
23
+ * <DisclosureContent>Content</DisclosureContent>
24
+ * </DisclosureProvider>
24
25
  * ```
25
26
  */
26
27
  export declare const DisclosureContent: import("../utils/types.js").Component<DisclosureContentOptions<"div">>;
27
28
  export interface DisclosureContentOptions<T extends As = "div"> extends Options<T> {
28
29
  /**
29
- * Object returned by the `useDisclosureStore` hook.
30
+ * Object returned by the
31
+ * [`useDisclosureStore`](https://ariakit.org/reference/use-disclosure-store)
32
+ * hook. If not provided, the closest
33
+ * [`DisclosureProvider`](https://ariakit.org/reference/disclosure-provider)
34
+ * component's context will be used.
30
35
  */
31
36
  store?: DisclosureStore;
32
37
  /**
@@ -4,7 +4,7 @@ import {
4
4
  import "../__chunks/CFEUKV6C.js";
5
5
  import {
6
6
  useDisclosureStore
7
- } from "../__chunks/E6GADH6Y.js";
7
+ } from "../__chunks/A2ONBKVT.js";
8
8
  import "../__chunks/XXO3VVQU.js";
9
9
  import "../__chunks/J7Q2EO23.js";
10
10
  import "../__chunks/CP3U4HPL.js";
@@ -1,7 +1,6 @@
1
- import type { DependencyList } from "react";
2
1
  import * as Core from "@ariakit/core/disclosure/disclosure-store";
3
2
  import type { Store } from "../utils/store.js";
4
- export declare function useDisclosureStoreProps<T extends Core.DisclosureStore>(store: T, update: () => void, props: DisclosureStoreProps, deps?: DependencyList): T;
3
+ export declare function useDisclosureStoreProps<T extends Core.DisclosureStore>(store: T, update: () => void, props: DisclosureStoreProps): T;
5
4
  /**
6
5
  * Creates a disclosure store.
7
6
  * @see https://ariakit.org/components/disclosure
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useDisclosureStore,
3
3
  useDisclosureStoreProps
4
- } from "../__chunks/E6GADH6Y.js";
4
+ } from "../__chunks/A2ONBKVT.js";
5
5
  import "../__chunks/XXO3VVQU.js";
6
6
  import "../__chunks/J7Q2EO23.js";
7
7
  import "../__chunks/CP3U4HPL.js";
@@ -21,20 +21,27 @@ export declare const useDisclosure: import("../utils/types.js").Hook<DisclosureO
21
21
  * @see https://ariakit.org/components/disclosure
22
22
  * @example
23
23
  * ```jsx
24
- * const disclosure = useDisclosureStore();
25
- * <Disclosure store={disclosure}>Disclosure</Disclosure>
26
- * <DisclosureContent store={disclosure}>Content</DisclosureContent>
24
+ * <DisclosureProvider>
25
+ * <Disclosure>Disclosure</Disclosure>
26
+ * <DisclosureContent>Content</DisclosureContent>
27
+ * </DisclosureProvider>
27
28
  * ```
28
29
  */
29
30
  export declare const Disclosure: import("../utils/types.js").Component<DisclosureOptions<"button">>;
30
31
  export interface DisclosureOptions<T extends As = "button"> extends ButtonOptions<T> {
31
32
  /**
32
- * Object returned by the `useDisclosureStore` hook.
33
+ * Object returned by the
34
+ * [`useDisclosureStore`](https://ariakit.org/reference/use-disclosure-store)
35
+ * hook. If not provided, the closest
36
+ * [`DisclosureProvider`](https://ariakit.org/reference/disclosure-provider)
37
+ * component's context will be used.
33
38
  */
34
39
  store?: DisclosureStore;
35
40
  /**
36
- * Determines whether `store.toggle()` will be called on click. This is useful
37
- * if you want to handle the toggle logic yourself.
41
+ * Determines whether
42
+ * [`toggle`](https://ariakit.org/reference/use-disclosure-store#toggle) will
43
+ * be called on click. This is useful if you want to handle the toggle logic
44
+ * yourself.
38
45
  * @default true
39
46
  */
40
47
  toggleOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
@@ -22,7 +22,11 @@ export declare const useFormCheckbox: import("../utils/types.js").Hook<FormCheck
22
22
  * @see https://ariakit.org/components/form
23
23
  * @example
24
24
  * ```jsx
25
- * const form = useFormStore({ defaultValues: { acceptTerms: false } });
25
+ * const form = useFormStore({
26
+ * defaultValues: {
27
+ * acceptTerms: false,
28
+ * },
29
+ * });
26
30
  * <Form store={form}>
27
31
  * <label>
28
32
  * <FormCheckbox name={form.names.acceptTerms} />
@@ -22,7 +22,11 @@ export declare const useFormDescription: import("../utils/types.js").Hook<FormDe
22
22
  * @see https://ariakit.org/components/form
23
23
  * @example
24
24
  * ```jsx
25
- * const form = useFormStore({ defaultValues: { password: "" } });
25
+ * const form = useFormStore({
26
+ * defaultValues: {
27
+ * password: "",
28
+ * },
29
+ * });
26
30
  * <Form store={form}>
27
31
  * <FormLabel name={form.names.password}>Password</FormLabel>
28
32
  * <FormInput name={form.names.password} type="password" />
@@ -35,8 +39,11 @@ export declare const useFormDescription: import("../utils/types.js").Hook<FormDe
35
39
  export declare const FormDescription: import("../utils/types.js").Component<FormDescriptionOptions<"div">>;
36
40
  export interface FormDescriptionOptions<T extends As = "div"> extends CollectionItemOptions<T> {
37
41
  /**
38
- * Object returned by the `useFormStore` hook. If not provided, the parent
39
- * `Form` component's context will be used.
42
+ * Object returned by the
43
+ * [`useFormStore`](https://ariakit.org/reference/use-form-store) hook. If not
44
+ * provided, the closest [`Form`](https://ariakit.org/reference/form) or
45
+ * [`FormProvider`](https://ariakit.org/reference/form-provider) components'
46
+ * context will be used.
40
47
  */
41
48
  store?: FormStore;
42
49
  /**
@@ -30,7 +30,11 @@ export declare const useFormError: import("../utils/types.js").Hook<FormErrorOpt
30
30
  * @see https://ariakit.org/components/form
31
31
  * @example
32
32
  * ```jsx
33
- * const form = useFormStore({ defaultValues: { email: "" } });
33
+ * const form = useFormStore({
34
+ * defaultValues: {
35
+ * email: "",
36
+ * },
37
+ * });
34
38
  *
35
39
  * form.useValidate(() => {
36
40
  * if (!form.values.email) {
@@ -48,8 +52,11 @@ export declare const useFormError: import("../utils/types.js").Hook<FormErrorOpt
48
52
  export declare const FormError: import("../utils/types.js").Component<FormErrorOptions<"div">>;
49
53
  export interface FormErrorOptions<T extends As = "div"> extends CollectionItemOptions<T> {
50
54
  /**
51
- * Object returned by the `useFormStore` hook. If not provided, the parent
52
- * `Form` component's context will be used.
55
+ * Object returned by the
56
+ * [`useFormStore`](https://ariakit.org/reference/use-form-store) hook. If not
57
+ * provided, the closest [`Form`](https://ariakit.org/reference/form) or
58
+ * [`FormProvider`](https://ariakit.org/reference/form-provider) components'
59
+ * context will be used.
53
60
  */
54
61
  store?: FormStore;
55
62
  /**
@@ -30,21 +30,26 @@ import type { FormStore } from "./form-store.js";
30
30
  */
31
31
  export declare const useFormField: import("../utils/types.js").Hook<FormFieldOptions<"input">>;
32
32
  /**
33
- * Renders a form field. Unlike `FormInput`, this component doesn't
34
- * automatically pass the `value` and `onChange` props down to the underlying
35
- * element. This is so we can use it not only for native form elements but also
36
- * for custom components whose value is not controlled by the native `value` and
37
- * `onChange` props.
33
+ * Renders a form field. Unlike
34
+ * [`FormInput`](https://ariakit.org/reference/form-input), this component
35
+ * doesn't automatically pass the `value` and `onChange` props down to the
36
+ * underlying element. This is so we can use it not only for native form
37
+ * elements but also for custom components whose value is not controlled by the
38
+ * native `value` and `onChange` props.
38
39
  * @see https://ariakit.org/components/form
39
40
  * @example
40
41
  * ```jsx
41
- * const form = useFormStore({ defaultValues: { content: "" } });
42
+ * const form = useFormStore({
43
+ * defaultValues: {
44
+ * content: "",
45
+ * },
46
+ * });
47
+ *
42
48
  * const value = form.useValue(form.names.content);
43
49
  *
44
50
  * <Form store={form}>
45
51
  * <FormLabel name={form.names.content}>Content</FormLabel>
46
52
  * <FormField
47
- * {...props}
48
53
  * value={value}
49
54
  * onChange={(value) => form.setValue(form.names.content, value)}
50
55
  * render={<Editor />}
@@ -55,8 +60,11 @@ export declare const useFormField: import("../utils/types.js").Hook<FormFieldOpt
55
60
  export declare const FormField: import("../utils/types.js").Component<FormFieldOptions<"input">>;
56
61
  export interface FormFieldOptions<T extends As = "input"> extends CollectionItemOptions<T> {
57
62
  /**
58
- * Object returned by the `useFormStore` hook. If not provided, the parent
59
- * `Form` component's context will be used.
63
+ * Object returned by the
64
+ * [`useFormStore`](https://ariakit.org/reference/use-form-store) hook. If not
65
+ * provided, the closest [`Form`](https://ariakit.org/reference/form) or
66
+ * [`FormProvider`](https://ariakit.org/reference/form-provider) components'
67
+ * context will be used.
60
68
  */
61
69
  store?: FormStore;
62
70
  /**
@@ -16,8 +16,8 @@ import type { FormStore } from "./form-store.js";
16
16
  export declare const useFormGroupLabel: import("../utils/types.js").Hook<FormGroupLabelOptions<"div">>;
17
17
  /**
18
18
  * Renders a label in a form group. This component must be wrapped with
19
- * `FormGroup` so the `aria-labelledby` prop is properly set on the form group
20
- * element.
19
+ * [`FormGroup`](https://ariakit.org/reference/form-group) so the
20
+ * `aria-labelledby` prop is properly set on the form group element.
21
21
  * @see https://ariakit.org/components/form
22
22
  * @example
23
23
  * ```jsx
@@ -41,8 +41,11 @@ export declare const useFormGroupLabel: import("../utils/types.js").Hook<FormGro
41
41
  export declare const FormGroupLabel: import("../utils/types.js").Component<FormGroupLabelOptions<"div">>;
42
42
  export interface FormGroupLabelOptions<T extends As = "div"> extends GroupLabelOptions<T> {
43
43
  /**
44
- * Object returned by the `useFormStore` hook. If not provided, the parent
45
- * `Form` component's context will be used.
44
+ * Object returned by the
45
+ * [`useFormStore`](https://ariakit.org/reference/use-form-store) hook. If not
46
+ * provided, the closest [`Form`](https://ariakit.org/reference/form) or
47
+ * [`FormProvider`](https://ariakit.org/reference/form-provider) components'
48
+ * context will be used.
46
49
  */
47
50
  store?: FormStore;
48
51
  }
@@ -41,8 +41,11 @@ export declare const useFormGroup: import("../utils/types.js").Hook<FormGroupOpt
41
41
  export declare const FormGroup: import("../utils/types.js").Component<FormGroupOptions<"div">>;
42
42
  export interface FormGroupOptions<T extends As = "div"> extends GroupOptions<T> {
43
43
  /**
44
- * Object returned by the `useFormStore` hook. If not provided, the parent
45
- * `Form` component's context will be used.
44
+ * Object returned by the
45
+ * [`useFormStore`](https://ariakit.org/reference/use-form-store) hook. If not
46
+ * provided, the closest [`Form`](https://ariakit.org/reference/form) or
47
+ * [`FormProvider`](https://ariakit.org/reference/form-provider) components'
48
+ * context will be used.
46
49
  */
47
50
  store?: FormStore;
48
51
  }
@@ -18,13 +18,18 @@ import type { FormFieldOptions } from "./form-field.js";
18
18
  */
19
19
  export declare const useFormInput: import("../utils/types.js").Hook<FormInputOptions<"input">>;
20
20
  /**
21
- * Renders a form input. Unlike `FormField`, this component passes the `value`
22
- * and `onChange` props down to the underlying element that can be a native
23
- * input, select or textarea elements.
21
+ * Renders a form input. Unlike
22
+ * [`FormField`](https://ariakit.org/reference/form-field), this component
23
+ * passes the `value` and `onChange` props down to the underlying element that
24
+ * can be a native input, select or textarea elements.
24
25
  * @see https://ariakit.org/components/form
25
26
  * @example
26
27
  * ```jsx
27
- * const form = useFormStore({ defaultValues: { email: "" } });
28
+ * const form = useFormStore({
29
+ * defaultValues: {
30
+ * email: "",
31
+ * },
32
+ * });
28
33
  * <Form store={form}>
29
34
  * <FormLabel name={form.names.email}>Email</FormLabel>
30
35
  * <FormInput name={form.names.email} />
@@ -29,7 +29,11 @@ export declare const useFormLabel: import("../utils/types.js").Hook<FormLabelOpt
29
29
  * @see https://ariakit.org/components/form
30
30
  * @example
31
31
  * ```jsx
32
- * const form = useFormStore({ defaultValues: { email: "" } });
32
+ * const form = useFormStore({
33
+ * defaultValues: {
34
+ * email: "",
35
+ * },
36
+ * });
33
37
  * <Form store={form}>
34
38
  * <FormLabel name={form.names.email}>Email</Role>
35
39
  * <FormInput name={form.names.email} />
@@ -39,8 +43,11 @@ export declare const useFormLabel: import("../utils/types.js").Hook<FormLabelOpt
39
43
  export declare const FormLabel: import("../utils/types.js").Component<FormLabelOptions<"label">>;
40
44
  export interface FormLabelOptions<T extends As = "label"> extends CollectionItemOptions<T> {
41
45
  /**
42
- * Object returned by the `useFormStore` hook. If not provided, the parent
43
- * `Form` component's context will be used.
46
+ * Object returned by the
47
+ * [`useFormStore`](https://ariakit.org/reference/use-form-store) hook. If not
48
+ * provided, the closest [`Form`](https://ariakit.org/reference/form) or
49
+ * [`FormProvider`](https://ariakit.org/reference/form-provider) components'
50
+ * context will be used.
44
51
  */
45
52
  store?: FormStore;
46
53
  /**