@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.
- package/CHANGELOG.md +12 -0
- package/cjs/__chunks/{6MLKTO2T.cjs → 3ULNMLN7.cjs} +2 -2
- package/cjs/__chunks/{SL7OXEFQ.cjs → 4ULJINEP.cjs} +2 -2
- package/cjs/__chunks/{C47ZNHA6.cjs → 6UXB6PRK.cjs} +2 -2
- package/cjs/__chunks/{OAQQQ7LS.cjs → DMTOMUIM.cjs} +2 -2
- package/cjs/__chunks/{P2EILHN6.cjs → E4C2KZA5.cjs} +2 -2
- package/cjs/__chunks/{J63NAJOO.cjs → HCQYEOCO.cjs} +2 -2
- package/cjs/__chunks/{WRVKUV4V.cjs → HFISYIKE.cjs} +2 -2
- package/cjs/__chunks/{U33H4JTD.cjs → LJBXMHCD.cjs} +2 -2
- package/cjs/__chunks/{BPMML63M.cjs → NATUYKIW.cjs} +2 -2
- package/cjs/__chunks/{ZEASCR4B.cjs → QEG5AJH6.cjs} +2 -2
- package/cjs/__chunks/{B4KDFSF3.cjs → WBPFHFAX.cjs} +2 -2
- package/cjs/__chunks/{PHDU6PLM.cjs → XOHN6PER.cjs} +2 -2
- package/cjs/checkbox/checkbox.d.ts +12 -9
- package/cjs/collection/collection.d.ts +5 -1
- package/cjs/combobox/combobox-cancel.d.ts +14 -9
- package/cjs/combobox/combobox-disclosure.d.ts +14 -9
- package/cjs/combobox/combobox-group-label.d.ts +16 -11
- package/cjs/combobox/combobox-group.d.ts +16 -11
- package/cjs/combobox/combobox-item-value.d.ts +14 -10
- package/cjs/combobox/combobox-item.d.ts +45 -20
- package/cjs/combobox/combobox-list.d.ts +17 -10
- package/cjs/combobox/combobox-popover.cjs +5 -5
- package/cjs/combobox/combobox-popover.d.ts +8 -7
- package/cjs/combobox/combobox-provider.cjs +5 -5
- package/cjs/combobox/combobox-row.d.ts +21 -16
- package/cjs/combobox/combobox-separator.d.ts +15 -10
- package/cjs/combobox/combobox-store.cjs +5 -5
- package/cjs/combobox/combobox-store.d.ts +9 -4
- package/cjs/combobox/combobox.d.ts +55 -36
- package/cjs/composite/composite-overflow-store.cjs +4 -4
- package/cjs/composite/composite-overflow.cjs +5 -5
- package/cjs/dialog/dialog-backdrop.cjs +3 -3
- package/cjs/dialog/dialog-provider.cjs +3 -3
- package/cjs/dialog/dialog-store.cjs +3 -3
- package/cjs/dialog/dialog.cjs +4 -4
- package/cjs/disclosure/disclosure-content.d.ts +9 -4
- package/cjs/disclosure/disclosure-provider.cjs +2 -2
- package/cjs/disclosure/disclosure-store.cjs +2 -2
- package/cjs/disclosure/disclosure-store.d.ts +1 -2
- package/cjs/disclosure/disclosure.d.ts +13 -6
- package/cjs/form/form-checkbox.d.ts +5 -1
- package/cjs/form/form-description.d.ts +10 -3
- package/cjs/form/form-error.d.ts +10 -3
- package/cjs/form/form-field.d.ts +17 -9
- package/cjs/form/form-group-label.d.ts +7 -4
- package/cjs/form/form-group.d.ts +5 -2
- package/cjs/form/form-input.d.ts +9 -4
- package/cjs/form/form-label.d.ts +10 -3
- package/cjs/form/form-push.d.ts +5 -2
- package/cjs/form/form-radio-group.d.ts +5 -1
- package/cjs/form/form-radio.d.ts +5 -1
- package/cjs/form/form-remove.d.ts +5 -2
- package/cjs/form/form-reset.d.ts +6 -2
- package/cjs/form/form-store.d.ts +5 -1
- package/cjs/form/form-submit.d.ts +5 -2
- package/cjs/form/form.d.ts +5 -1
- package/cjs/hovercard/hovercard-anchor.d.ts +11 -5
- package/cjs/hovercard/hovercard-arrow.d.ts +13 -8
- package/cjs/hovercard/hovercard-description.d.ts +14 -9
- package/cjs/hovercard/hovercard-disclosure.d.ts +14 -8
- package/cjs/hovercard/hovercard-dismiss.d.ts +11 -6
- package/cjs/hovercard/hovercard-heading.d.ts +14 -9
- package/cjs/hovercard/hovercard-provider.cjs +5 -5
- package/cjs/hovercard/hovercard-store.cjs +5 -5
- package/cjs/hovercard/hovercard-store.d.ts +1 -0
- package/cjs/hovercard/hovercard.cjs +6 -6
- package/cjs/hovercard/hovercard.d.ts +11 -5
- package/cjs/menu/menu-button.cjs +3 -1
- package/cjs/menu/menu-provider.cjs +6 -6
- package/cjs/menu/menu-store.cjs +6 -6
- package/cjs/menu/menu-store.d.ts +6 -6
- package/cjs/menu/menu.cjs +6 -6
- package/cjs/popover/popover-provider.cjs +4 -4
- package/cjs/popover/popover-store.cjs +4 -4
- package/cjs/popover/popover.cjs +5 -5
- package/cjs/select/select-popover.cjs +5 -5
- package/cjs/select/select-provider.cjs +5 -5
- package/cjs/select/select-store.cjs +5 -5
- package/cjs/select/select-store.d.ts +2 -2
- package/cjs/tab/tab-panel.cjs +2 -2
- package/cjs/tooltip/tooltip-provider.cjs +6 -6
- package/cjs/tooltip/tooltip-store.cjs +6 -6
- package/cjs/tooltip/tooltip.cjs +6 -6
- package/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/esm/__chunks/{YJPXO6F5.js → 34JEM52B.js} +1 -1
- package/esm/__chunks/{CJPLAYFB.js → 4RP654JS.js} +1 -1
- package/esm/__chunks/{RA2AAYOC.js → 4SB2BYFE.js} +1 -1
- package/esm/__chunks/{E6GADH6Y.js → A2ONBKVT.js} +2 -2
- package/esm/__chunks/{RVGVDX6B.js → GP4UGJIZ.js} +1 -1
- package/esm/__chunks/{XEZV3AK4.js → H2BG4QDT.js} +1 -1
- package/esm/__chunks/{HJHTMRDC.js → HZPJPDJY.js} +1 -1
- package/esm/__chunks/{6LKB3PXM.js → IFNQMENS.js} +1 -1
- package/esm/__chunks/{MA5WD4CD.js → UQFOL5I6.js} +1 -1
- package/esm/__chunks/{HCTAKPNS.js → UY3UQ4QI.js} +1 -1
- package/esm/__chunks/{R3N4R7UZ.js → V5EW3YHP.js} +1 -1
- package/esm/__chunks/{NRLOAE2I.js → W575AF63.js} +1 -1
- package/esm/checkbox/checkbox.d.ts +12 -9
- package/esm/collection/collection.d.ts +5 -1
- package/esm/combobox/combobox-cancel.d.ts +14 -9
- package/esm/combobox/combobox-disclosure.d.ts +14 -9
- package/esm/combobox/combobox-group-label.d.ts +16 -11
- package/esm/combobox/combobox-group.d.ts +16 -11
- package/esm/combobox/combobox-item-value.d.ts +14 -10
- package/esm/combobox/combobox-item.d.ts +45 -20
- package/esm/combobox/combobox-list.d.ts +17 -10
- package/esm/combobox/combobox-popover.d.ts +8 -7
- package/esm/combobox/combobox-popover.js +4 -4
- package/esm/combobox/combobox-provider.js +4 -4
- package/esm/combobox/combobox-row.d.ts +21 -16
- package/esm/combobox/combobox-separator.d.ts +15 -10
- package/esm/combobox/combobox-store.d.ts +9 -4
- package/esm/combobox/combobox-store.js +4 -4
- package/esm/combobox/combobox.d.ts +55 -36
- package/esm/composite/composite-overflow-store.js +3 -3
- package/esm/composite/composite-overflow.js +4 -4
- package/esm/dialog/dialog-backdrop.js +2 -2
- package/esm/dialog/dialog-provider.js +2 -2
- package/esm/dialog/dialog-store.js +2 -2
- package/esm/dialog/dialog.js +3 -3
- package/esm/disclosure/disclosure-content.d.ts +9 -4
- package/esm/disclosure/disclosure-provider.js +1 -1
- package/esm/disclosure/disclosure-store.d.ts +1 -2
- package/esm/disclosure/disclosure-store.js +1 -1
- package/esm/disclosure/disclosure.d.ts +13 -6
- package/esm/form/form-checkbox.d.ts +5 -1
- package/esm/form/form-description.d.ts +10 -3
- package/esm/form/form-error.d.ts +10 -3
- package/esm/form/form-field.d.ts +17 -9
- package/esm/form/form-group-label.d.ts +7 -4
- package/esm/form/form-group.d.ts +5 -2
- package/esm/form/form-input.d.ts +9 -4
- package/esm/form/form-label.d.ts +10 -3
- package/esm/form/form-push.d.ts +5 -2
- package/esm/form/form-radio-group.d.ts +5 -1
- package/esm/form/form-radio.d.ts +5 -1
- package/esm/form/form-remove.d.ts +5 -2
- package/esm/form/form-reset.d.ts +6 -2
- package/esm/form/form-store.d.ts +5 -1
- package/esm/form/form-submit.d.ts +5 -2
- package/esm/form/form.d.ts +5 -1
- package/esm/hovercard/hovercard-anchor.d.ts +11 -5
- package/esm/hovercard/hovercard-arrow.d.ts +13 -8
- package/esm/hovercard/hovercard-description.d.ts +14 -9
- package/esm/hovercard/hovercard-disclosure.d.ts +14 -8
- package/esm/hovercard/hovercard-dismiss.d.ts +11 -6
- package/esm/hovercard/hovercard-heading.d.ts +14 -9
- package/esm/hovercard/hovercard-provider.js +4 -4
- package/esm/hovercard/hovercard-store.d.ts +1 -0
- package/esm/hovercard/hovercard-store.js +4 -4
- package/esm/hovercard/hovercard.d.ts +11 -5
- package/esm/hovercard/hovercard.js +5 -5
- package/esm/menu/menu-button.js +3 -1
- package/esm/menu/menu-provider.js +5 -5
- package/esm/menu/menu-store.d.ts +6 -6
- package/esm/menu/menu-store.js +5 -5
- package/esm/menu/menu.js +5 -5
- package/esm/popover/popover-provider.js +3 -3
- package/esm/popover/popover-store.js +3 -3
- package/esm/popover/popover.js +4 -4
- package/esm/select/select-popover.js +4 -4
- package/esm/select/select-provider.js +4 -4
- package/esm/select/select-store.d.ts +2 -2
- package/esm/select/select-store.js +4 -4
- package/esm/tab/tab-panel.js +1 -1
- package/esm/tooltip/tooltip-provider.js +5 -5
- package/esm/tooltip/tooltip-store.js +5 -5
- package/esm/tooltip/tooltip.js +5 -5
- package/esm/tsconfig.build.tsbuildinfo +1 -1
- 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
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
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
|
|
39
|
-
* `
|
|
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/
|
|
4
|
+
} from "../__chunks/V5EW3YHP.js";
|
|
5
5
|
import "../__chunks/WGAKICTY.js";
|
|
6
6
|
import "../__chunks/NWDF5QDV.js";
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
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
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
|
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
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
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
|
|
65
|
-
* value
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
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
|
|
109
|
-
*
|
|
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
|
-
*
|
|
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
|
|
125
|
-
*
|
|
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
|
-
*
|
|
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/
|
|
4
|
-
import "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
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/
|
|
4
|
-
import "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
9
|
-
import "../__chunks/
|
|
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/
|
|
5
|
-
import "../__chunks/
|
|
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";
|
package/esm/dialog/dialog.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Dialog,
|
|
3
3
|
useDialog
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
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/
|
|
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
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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
|
|
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
|
/**
|
|
@@ -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
|
|
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
|
|
@@ -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
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
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
|
|
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
|
|
37
|
-
*
|
|
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({
|
|
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({
|
|
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
|
|
39
|
-
* `
|
|
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
|
/**
|
package/esm/form/form-error.d.ts
CHANGED
|
@@ -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({
|
|
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
|
|
52
|
-
* `
|
|
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
|
/**
|
package/esm/form/form-field.d.ts
CHANGED
|
@@ -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
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
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({
|
|
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
|
|
59
|
-
* `
|
|
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
|
|
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
|
|
45
|
-
* `
|
|
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
|
}
|
package/esm/form/form-group.d.ts
CHANGED
|
@@ -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
|
|
45
|
-
* `
|
|
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
|
}
|
package/esm/form/form-input.d.ts
CHANGED
|
@@ -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
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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({
|
|
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} />
|
package/esm/form/form-label.d.ts
CHANGED
|
@@ -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({
|
|
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
|
|
43
|
-
* `
|
|
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
|
/**
|