@ariakit/react-core 0.3.0 → 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 +36 -0
- package/cjs/__chunks/{E36HQN5U.cjs → 27A4YAUB.cjs} +4 -4
- package/cjs/__chunks/{DEXAWU62.cjs → 3ULNMLN7.cjs} +7 -6
- package/cjs/__chunks/{E4NNK5Z5.cjs → 4HKELPDA.cjs} +4 -4
- package/cjs/__chunks/{HRC6DHTD.cjs → 4ULJINEP.cjs} +8 -8
- package/cjs/__chunks/{UTBZV2K2.cjs → 6UXB6PRK.cjs} +7 -7
- package/cjs/__chunks/{4BQNJE73.cjs → B3TGB2C3.cjs} +7 -7
- package/cjs/__chunks/{UIP5UBUP.cjs → BPPAZUXP.cjs} +2 -2
- package/cjs/__chunks/{CTVZBMX2.cjs → DMTOMUIM.cjs} +7 -7
- package/cjs/__chunks/{PKAT32ES.cjs → DNFCOHE4.cjs} +2 -2
- package/cjs/__chunks/{MMJ2ISJ4.cjs → E4C2KZA5.cjs} +5 -5
- package/cjs/__chunks/{IULFNS7Y.cjs → EQEXTQQ6.cjs} +5 -5
- package/cjs/__chunks/{RE3KB52D.cjs → FWCQCCG3.cjs} +12 -12
- package/cjs/__chunks/{EGFAX26U.cjs → G33PRHOG.cjs} +8 -8
- package/cjs/__chunks/{MYVMDX23.cjs → GBOZYA5C.cjs} +2 -2
- package/cjs/__chunks/{KAZTJBAF.cjs → GCTYF2Y6.cjs} +3 -3
- package/cjs/__chunks/{O5YI3KG3.cjs → HCQYEOCO.cjs} +2 -2
- package/cjs/__chunks/{CFO65DTJ.cjs → HDYD5S2P.cjs} +3 -3
- package/cjs/__chunks/{KHZEFVUV.cjs → HFISYIKE.cjs} +7 -7
- package/cjs/__chunks/{42FA4OOB.cjs → I63PYP2U.cjs} +12 -9
- package/cjs/__chunks/{F36WTYFH.cjs → J77SNKFZ.cjs} +4 -4
- package/cjs/__chunks/{TZRDNPSE.cjs → LJBXMHCD.cjs} +6 -6
- package/cjs/__chunks/{VRJL6LRK.cjs → NATUYKIW.cjs} +4 -4
- package/cjs/__chunks/{OPL3VHF2.cjs → QEG5AJH6.cjs} +3 -3
- package/cjs/__chunks/{5PKWXKV7.cjs → SKVJLFWS.cjs} +7 -7
- package/cjs/__chunks/{73FY4ZGD.cjs → V37GXOUJ.cjs} +4 -4
- package/cjs/__chunks/{W2C6EME3.cjs → WBPFHFAX.cjs} +2 -2
- package/cjs/__chunks/{E5YTMXPM.cjs → X3UARAKT.cjs} +2 -2
- package/cjs/__chunks/{3XB4P6CY.cjs → XOHN6PER.cjs} +2 -2
- package/cjs/__chunks/{7J4QLCVO.cjs → ZJ4ICN62.cjs} +4 -4
- package/cjs/__chunks/{BCUHPRBR.cjs → ZPTFLDSU.cjs} +7 -7
- package/cjs/checkbox/checkbox-provider.cjs +3 -3
- package/cjs/checkbox/checkbox-store.cjs +3 -3
- package/cjs/checkbox/checkbox.cjs +3 -3
- package/cjs/checkbox/checkbox.d.ts +12 -9
- package/cjs/collection/collection-provider.cjs +3 -3
- package/cjs/collection/collection-renderer.cjs +3 -3
- package/cjs/collection/collection-store.cjs +3 -3
- 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.cjs +3 -3
- package/cjs/combobox/combobox-item.d.ts +45 -20
- package/cjs/combobox/combobox-list.d.ts +17 -10
- package/cjs/combobox/combobox-popover.cjs +6 -6
- package/cjs/combobox/combobox-popover.d.ts +8 -7
- package/cjs/combobox/combobox-provider.cjs +8 -8
- package/cjs/combobox/combobox-row.d.ts +21 -16
- package/cjs/combobox/combobox-separator.d.ts +15 -10
- package/cjs/combobox/combobox-store.cjs +8 -8
- package/cjs/combobox/combobox-store.d.ts +9 -4
- package/cjs/combobox/combobox.d.ts +55 -36
- package/cjs/composite/composite-container.cjs +3 -3
- package/cjs/composite/composite-item.cjs +3 -3
- package/cjs/composite/composite-overflow-disclosure.cjs +3 -3
- package/cjs/composite/composite-overflow-store.cjs +6 -6
- package/cjs/composite/composite-overflow.cjs +6 -6
- package/cjs/composite/composite-provider.cjs +4 -4
- package/cjs/composite/composite-renderer.cjs +4 -4
- package/cjs/composite/composite-store.cjs +4 -4
- package/cjs/dialog/dialog-backdrop.cjs +4 -4
- package/cjs/dialog/dialog-provider.cjs +4 -4
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/dialog/dialog.cjs +5 -5
- package/cjs/disclosure/disclosure-content.d.ts +9 -4
- package/cjs/disclosure/disclosure-provider.cjs +3 -3
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/disclosure/disclosure-store.d.ts +9 -2
- package/cjs/disclosure/disclosure.d.ts +13 -6
- package/cjs/form/form-checkbox.cjs +5 -5
- 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-provider.cjs +4 -4
- package/cjs/form/form-push.d.ts +5 -2
- package/cjs/form/form-radio-group.d.ts +5 -1
- package/cjs/form/form-radio.cjs +4 -4
- 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.cjs +4 -4
- 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 +6 -6
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/hovercard/hovercard-store.d.ts +1 -0
- package/cjs/hovercard/hovercard.cjs +7 -7
- package/cjs/hovercard/hovercard.d.ts +11 -5
- package/cjs/menu/menu-bar-provider.cjs +5 -5
- package/cjs/menu/menu-bar-store.cjs +5 -5
- package/cjs/menu/menu-button.cjs +5 -3
- package/cjs/menu/menu-item-checkbox.cjs +8 -8
- package/cjs/menu/menu-item-radio.cjs +6 -6
- package/cjs/menu/menu-item.cjs +4 -4
- package/cjs/menu/menu-list.cjs +3 -3
- package/cjs/menu/menu-provider.cjs +9 -9
- package/cjs/menu/menu-store.cjs +9 -9
- package/cjs/menu/menu-store.d.ts +6 -6
- package/cjs/menu/menu.cjs +9 -9
- package/cjs/popover/popover-provider.cjs +5 -5
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/popover/popover.cjs +6 -6
- package/cjs/radio/radio-provider.cjs +5 -5
- package/cjs/radio/radio-store.cjs +5 -5
- package/cjs/radio/radio.cjs +4 -4
- package/cjs/select/select-item.cjs +3 -3
- package/cjs/select/select-popover.cjs +6 -6
- package/cjs/select/select-provider.cjs +8 -8
- package/cjs/select/select-renderer.cjs +7 -7
- package/cjs/select/select-store.cjs +8 -8
- package/cjs/select/select-store.d.ts +2 -2
- package/cjs/tab/tab-panel.cjs +3 -3
- package/cjs/tab/tab-provider.cjs +5 -5
- package/cjs/tab/tab-store.cjs +5 -5
- package/cjs/tab/tab.cjs +3 -3
- package/cjs/toolbar/toolbar-container.cjs +6 -6
- package/cjs/toolbar/toolbar-input.cjs +4 -4
- package/cjs/toolbar/toolbar-item.cjs +4 -4
- package/cjs/toolbar/toolbar-provider.cjs +5 -5
- package/cjs/toolbar/toolbar-store.cjs +5 -5
- package/cjs/toolbar/toolbar.cjs +46 -24
- package/cjs/toolbar/toolbar.d.ts +2 -2
- package/cjs/tooltip/tooltip-provider.cjs +7 -7
- package/cjs/tooltip/tooltip-store.cjs +7 -7
- package/cjs/tooltip/tooltip.cjs +7 -7
- package/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/cjs/utils/store.cjs +2 -2
- package/cjs/utils/store.d.ts +1 -1
- package/esm/__chunks/{VJZYCNOA.js → 34JEM52B.js} +1 -1
- package/esm/__chunks/{B7CSN7VQ.js → 35WVCYXU.js} +2 -2
- package/esm/__chunks/{XIRNSMZD.js → 3HFOFZP4.js} +1 -1
- package/esm/__chunks/{D4PXCBCI.js → 4RP654JS.js} +2 -2
- package/esm/__chunks/{42I26D5Z.js → 4SB2BYFE.js} +3 -3
- package/esm/__chunks/{XXOVOOT3.js → 4WK6LN27.js} +2 -2
- package/esm/__chunks/{6TWF32ML.js → 72OJKUSZ.js} +1 -1
- package/esm/__chunks/{UHPQRTV4.js → A2ONBKVT.js} +4 -3
- package/esm/__chunks/{43SODXOT.js → C5JX5C3O.js} +2 -2
- package/esm/__chunks/{QOBIUWMN.js → EKIHOHWR.js} +2 -2
- package/esm/__chunks/{HVG5WXKX.js → FBTQUSIH.js} +2 -2
- package/esm/__chunks/{XWFU333Y.js → GP4UGJIZ.js} +1 -1
- package/esm/__chunks/{DORFNB2S.js → H2BG4QDT.js} +2 -2
- package/esm/__chunks/{665VBEVH.js → HGW6FZYU.js} +1 -1
- package/esm/__chunks/{KFYG52K5.js → HZPJPDJY.js} +2 -2
- package/esm/__chunks/{JJMBJNG5.js → IFNQMENS.js} +3 -3
- package/esm/__chunks/{U47NFJA3.js → IZ6ZARCP.js} +1 -1
- package/esm/__chunks/{3CKB7HAW.js → K6BB6DTS.js} +2 -2
- package/esm/__chunks/{TUPK6PWU.js → KZMKUBQH.js} +1 -1
- package/esm/__chunks/{JEQRR7AL.js → NWDF5QDV.js} +1 -1
- package/esm/__chunks/{NVEAMD2G.js → R4FKKQYI.js} +2 -2
- package/esm/__chunks/{552DU7SQ.js → RJEKIG5Y.js} +1 -1
- package/esm/__chunks/{SNU4EYPS.js → UQFOL5I6.js} +2 -2
- package/esm/__chunks/{6X2TPJLY.js → UY3UQ4QI.js} +2 -2
- package/esm/__chunks/{2JWPGQQP.js → V5EW3YHP.js} +3 -3
- package/esm/__chunks/{O5UELQLV.js → VDTDCNMP.js} +1 -1
- package/esm/__chunks/{AAS6MDEM.js → VPTWELSR.js} +2 -2
- package/esm/__chunks/{HJPDTCDL.js → W575AF63.js} +1 -1
- package/esm/__chunks/{FGP6QO3O.js → WGAKICTY.js} +2 -2
- package/esm/__chunks/{L3AX6U5E.js → XXO3VVQU.js} +12 -9
- package/esm/checkbox/checkbox-provider.js +2 -2
- package/esm/checkbox/checkbox-store.js +2 -2
- package/esm/checkbox/checkbox.d.ts +12 -9
- package/esm/checkbox/checkbox.js +2 -2
- package/esm/collection/collection-provider.js +2 -2
- package/esm/collection/collection-renderer.js +2 -2
- package/esm/collection/collection-store.js +2 -2
- 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-item.js +2 -2
- package/esm/combobox/combobox-list.d.ts +17 -10
- package/esm/combobox/combobox-popover.d.ts +8 -7
- package/esm/combobox/combobox-popover.js +5 -5
- package/esm/combobox/combobox-provider.js +7 -7
- 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 +7 -7
- package/esm/combobox/combobox.d.ts +55 -36
- package/esm/composite/composite-container.js +2 -2
- package/esm/composite/composite-item.js +2 -2
- package/esm/composite/composite-overflow-disclosure.js +2 -2
- package/esm/composite/composite-overflow-store.js +4 -4
- package/esm/composite/composite-overflow.js +5 -5
- package/esm/composite/composite-provider.js +3 -3
- package/esm/composite/composite-renderer.js +3 -3
- package/esm/composite/composite-store.js +3 -3
- package/esm/dialog/dialog-backdrop.js +3 -3
- package/esm/dialog/dialog-provider.js +3 -3
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/dialog/dialog.js +4 -4
- package/esm/disclosure/disclosure-content.d.ts +9 -4
- package/esm/disclosure/disclosure-provider.js +2 -2
- package/esm/disclosure/disclosure-store.d.ts +9 -2
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/disclosure/disclosure.d.ts +13 -6
- package/esm/form/form-checkbox.d.ts +5 -1
- package/esm/form/form-checkbox.js +3 -3
- 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-provider.js +3 -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-radio.js +3 -3
- 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-store.js +3 -3
- 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 +5 -5
- package/esm/hovercard/hovercard-store.d.ts +1 -0
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/hovercard/hovercard.d.ts +11 -5
- package/esm/hovercard/hovercard.js +6 -6
- package/esm/menu/menu-bar-provider.js +4 -4
- package/esm/menu/menu-bar-store.js +4 -4
- package/esm/menu/menu-button.js +4 -2
- package/esm/menu/menu-item-checkbox.js +5 -5
- package/esm/menu/menu-item-radio.js +4 -4
- package/esm/menu/menu-item.js +3 -3
- package/esm/menu/menu-list.js +2 -2
- package/esm/menu/menu-provider.js +8 -8
- package/esm/menu/menu-store.d.ts +6 -6
- package/esm/menu/menu-store.js +8 -8
- package/esm/menu/menu.js +7 -7
- package/esm/popover/popover-provider.js +4 -4
- package/esm/popover/popover-store.js +4 -4
- package/esm/popover/popover.js +5 -5
- package/esm/radio/radio-provider.js +4 -4
- package/esm/radio/radio-store.js +4 -4
- package/esm/radio/radio.js +3 -3
- package/esm/select/select-item.js +2 -2
- package/esm/select/select-popover.js +5 -5
- package/esm/select/select-provider.js +7 -7
- package/esm/select/select-renderer.js +3 -3
- package/esm/select/select-store.d.ts +2 -2
- package/esm/select/select-store.js +7 -7
- package/esm/tab/tab-panel.js +2 -2
- package/esm/tab/tab-provider.js +4 -4
- package/esm/tab/tab-store.js +4 -4
- package/esm/tab/tab.js +2 -2
- package/esm/toolbar/toolbar-container.js +4 -4
- package/esm/toolbar/toolbar-input.js +3 -3
- package/esm/toolbar/toolbar-item.js +3 -3
- package/esm/toolbar/toolbar-provider.js +4 -4
- package/esm/toolbar/toolbar-store.js +4 -4
- package/esm/toolbar/toolbar.d.ts +2 -2
- package/esm/toolbar/toolbar.js +47 -25
- package/esm/tooltip/tooltip-provider.js +6 -6
- package/esm/tooltip/tooltip-store.js +6 -6
- package/esm/tooltip/tooltip.js +6 -6
- package/esm/tsconfig.build.tsbuildinfo +1 -1
- package/esm/utils/store.d.ts +1 -1
- package/esm/utils/store.js +1 -1
- package/package.json +2 -2
|
@@ -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
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
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
|
|
42
|
-
* `
|
|
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
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* </
|
|
40
|
-
* </
|
|
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
|
|
55
|
-
* `
|
|
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
|
/**
|
|
@@ -7,7 +7,7 @@ var _LPFT4ZFHcjs = require('../__chunks/LPFT4ZFH.cjs');
|
|
|
7
7
|
var _ZBG4TGVLcjs = require('../__chunks/ZBG4TGVL.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _G33PRHOGcjs = require('../__chunks/G33PRHOG.cjs');
|
|
11
11
|
require('../__chunks/NPDPNCSD.cjs');
|
|
12
12
|
require('../__chunks/FMI5QF7N.cjs');
|
|
13
13
|
require('../__chunks/KLZID3QO.cjs');
|
|
@@ -23,7 +23,7 @@ require('../__chunks/LHHW5ZQP.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _Z5PUIG6Acjs = require('../__chunks/Z5PUIG6A.cjs');
|
|
26
|
-
require('../__chunks/
|
|
26
|
+
require('../__chunks/I63PYP2U.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -129,7 +129,7 @@ var useComboboxItem = _Z5PUIG6Acjs.createHook.call(void 0,
|
|
|
129
129
|
onKeyDown
|
|
130
130
|
});
|
|
131
131
|
const moveOnKeyPressProp = _5WLTMVVQcjs.useBooleanEvent.call(void 0, moveOnKeyPress);
|
|
132
|
-
props =
|
|
132
|
+
props = _G33PRHOGcjs.useCompositeItem.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {
|
|
133
133
|
store
|
|
134
134
|
}, props), {
|
|
135
135
|
getItem,
|
|
@@ -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
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* `
|
|
24
|
-
*
|
|
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
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
|
41
|
-
* `
|
|
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
|
|
47
|
-
* combobox
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
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`).
|
|
24
|
-
*
|
|
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
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
|
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
|
}
|
|
@@ -8,9 +8,9 @@ require('../__chunks/H7R5D2FR.cjs');
|
|
|
8
8
|
require('../__chunks/NHZBX2RS.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('../__chunks/
|
|
13
|
-
require('../__chunks/
|
|
11
|
+
var _XOHN6PERcjs = require('../__chunks/XOHN6PER.cjs');
|
|
12
|
+
require('../__chunks/QEG5AJH6.cjs');
|
|
13
|
+
require('../__chunks/HCQYEOCO.cjs');
|
|
14
14
|
require('../__chunks/6BAHKJ5K.cjs');
|
|
15
15
|
require('../__chunks/DPLHWKRP.cjs');
|
|
16
16
|
require('../__chunks/W32FX7DM.cjs');
|
|
@@ -43,8 +43,8 @@ require('../__chunks/KSFAO77E.cjs');
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
var _Z5PUIG6Acjs = require('../__chunks/Z5PUIG6A.cjs');
|
|
46
|
-
require('../__chunks/
|
|
47
|
-
require('../__chunks/
|
|
46
|
+
require('../__chunks/3ULNMLN7.cjs');
|
|
47
|
+
require('../__chunks/I63PYP2U.cjs');
|
|
48
48
|
require('../__chunks/5WLTMVVQ.cjs');
|
|
49
49
|
require('../__chunks/7WUTS26Y.cjs');
|
|
50
50
|
|
|
@@ -88,7 +88,7 @@ var useComboboxPopover = _Z5PUIG6Acjs.createHook.call(void 0,
|
|
|
88
88
|
);
|
|
89
89
|
const baseElement = store.useState("baseElement");
|
|
90
90
|
props = _7F6H5HXCcjs.useComboboxList.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, { store, alwaysVisible }, props));
|
|
91
|
-
props =
|
|
91
|
+
props = _XOHN6PERcjs.usePopover.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {
|
|
92
92
|
store,
|
|
93
93
|
alwaysVisible,
|
|
94
94
|
autoFocusOnShow: false,
|
|
@@ -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
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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">>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _4ULJINEPcjs = require('../__chunks/4ULJINEP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _ZBG4TGVLcjs = require('../__chunks/ZBG4TGVL.cjs');
|
|
7
|
-
require('../__chunks/
|
|
8
|
-
require('../__chunks/
|
|
7
|
+
require('../__chunks/FWCQCCG3.cjs');
|
|
8
|
+
require('../__chunks/GCTYF2Y6.cjs');
|
|
9
9
|
require('../__chunks/H7R5D2FR.cjs');
|
|
10
10
|
require('../__chunks/NHZBX2RS.cjs');
|
|
11
11
|
require('../__chunks/AKOG5S2T.cjs');
|
|
12
12
|
require('../__chunks/W6ZRSMO5.cjs');
|
|
13
13
|
require('../__chunks/A2NMYLCG.cjs');
|
|
14
14
|
require('../__chunks/Z5PUIG6A.cjs');
|
|
15
|
-
require('../__chunks/
|
|
16
|
-
require('../__chunks/
|
|
17
|
-
require('../__chunks/
|
|
18
|
-
require('../__chunks/
|
|
15
|
+
require('../__chunks/E4C2KZA5.cjs');
|
|
16
|
+
require('../__chunks/NATUYKIW.cjs');
|
|
17
|
+
require('../__chunks/3ULNMLN7.cjs');
|
|
18
|
+
require('../__chunks/I63PYP2U.cjs');
|
|
19
19
|
require('../__chunks/5WLTMVVQ.cjs');
|
|
20
20
|
require('../__chunks/7WUTS26Y.cjs');
|
|
21
21
|
require('../__chunks/72I2GWXF.cjs');
|
|
@@ -23,7 +23,7 @@ require('../__chunks/72I2GWXF.cjs');
|
|
|
23
23
|
// src/combobox/combobox-provider.tsx
|
|
24
24
|
var _jsxruntime = require('react/jsx-runtime');
|
|
25
25
|
function ComboboxProvider(props = {}) {
|
|
26
|
-
const store =
|
|
26
|
+
const store = _4ULJINEPcjs.useComboboxStore.call(void 0, props);
|
|
27
27
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ZBG4TGVLcjs.ComboboxContextProvider, { value: store, children: props.children });
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -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
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
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
|
|
46
|
-
* `
|
|
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
|
}
|
|
@@ -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
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
7
|
-
require('../__chunks/
|
|
8
|
-
require('../__chunks/
|
|
9
|
-
require('../__chunks/
|
|
10
|
-
require('../__chunks/
|
|
4
|
+
var _4ULJINEPcjs = require('../__chunks/4ULJINEP.cjs');
|
|
5
|
+
require('../__chunks/FWCQCCG3.cjs');
|
|
6
|
+
require('../__chunks/GCTYF2Y6.cjs');
|
|
7
|
+
require('../__chunks/E4C2KZA5.cjs');
|
|
8
|
+
require('../__chunks/NATUYKIW.cjs');
|
|
9
|
+
require('../__chunks/3ULNMLN7.cjs');
|
|
10
|
+
require('../__chunks/I63PYP2U.cjs');
|
|
11
11
|
require('../__chunks/5WLTMVVQ.cjs');
|
|
12
12
|
require('../__chunks/7WUTS26Y.cjs');
|
|
13
13
|
require('../__chunks/72I2GWXF.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.useComboboxStore =
|
|
17
|
+
exports.useComboboxStore = _4ULJINEPcjs.useComboboxStore; exports.useComboboxStoreProps = _4ULJINEPcjs.useComboboxStoreProps;
|
|
@@ -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
|
}
|
|
@@ -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>>;
|