@ariakit/react-core 0.3.7 → 0.3.9
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 +50 -0
- package/cjs/__chunks/{KAQBQZEG.cjs → 3KZQJDTV.cjs} +2 -2
- package/cjs/__chunks/{VEG6PRAG.cjs → 3WCBE6SU.cjs} +3 -1
- package/cjs/__chunks/{AYDXWQBF.cjs → 47RLIVET.cjs} +10 -8
- package/cjs/__chunks/{65GJIQK5.cjs → 7BPAESN3.cjs} +5 -5
- package/cjs/__chunks/{SSJIHRU6.cjs → 7KFYPSJO.cjs} +4 -4
- package/cjs/__chunks/{OALXXRFM.cjs → B233QVZE.cjs} +2 -1
- package/cjs/__chunks/{TUVU5ERH.cjs → DKOWT2IJ.cjs} +3 -3
- package/cjs/__chunks/{FQNGCFYY.cjs → EGAIDKB5.cjs} +5 -5
- package/cjs/__chunks/{5T425W4R.cjs → EWKBICMP.cjs} +5 -5
- package/cjs/__chunks/{YZ7J6ELT.cjs → GF6NWLKX.cjs} +7 -7
- package/cjs/__chunks/{HGT5CLDM.cjs → HHZJ6KYW.cjs} +4 -4
- package/cjs/__chunks/{X3I2WFGC.cjs → HRKRTCJC.cjs} +4 -4
- package/cjs/__chunks/{YEV7NEBU.cjs → IGTX5NFA.cjs} +4 -4
- package/cjs/__chunks/{MMLLSE2M.cjs → KIGOGBFU.cjs} +2 -2
- package/cjs/__chunks/{BY6ER73U.cjs → KQUC6RXT.cjs} +2 -2
- package/cjs/__chunks/{QU2266CJ.cjs → LO3RECOD.cjs} +14 -6
- package/cjs/__chunks/{A5RWZSX7.cjs → N6CR2VNN.cjs} +12 -12
- package/cjs/__chunks/{MYMQ45UI.cjs → NVRUQ5V7.cjs} +7 -7
- package/cjs/__chunks/{XFPRAS3J.cjs → OT6DC3ML.cjs} +13 -29
- package/cjs/__chunks/{P43G7USH.cjs → PFQ3IPWT.cjs} +8 -8
- package/cjs/__chunks/{CILQPSH2.cjs → PSR537T6.cjs} +10 -10
- package/cjs/__chunks/{XMGFHUXO.cjs → QLRXXIBY.cjs} +7 -7
- package/cjs/__chunks/{SHOS7XOU.cjs → RTT4XR27.cjs} +4 -4
- package/cjs/__chunks/{UL7JVGEU.cjs → T5G6DLC6.cjs} +2 -2
- package/cjs/__chunks/{7BSMGTGR.cjs → TD5MOASJ.cjs} +2 -2
- package/cjs/__chunks/{35LC5W3M.cjs → TGTVGYEZ.cjs} +8 -2
- package/cjs/__chunks/{OH2VU3VU.cjs → UBME4GBY.cjs} +6 -6
- package/cjs/__chunks/{F24A3PBW.cjs → UUTXBBHD.cjs} +2 -2
- package/cjs/__chunks/{LVOI2KVN.cjs → V6LYK7WK.cjs} +9 -9
- package/cjs/__chunks/{YAPOM5RT.cjs → VIETWH5C.cjs} +28 -16
- package/cjs/__chunks/{UQ7KT5UO.cjs → VQHA56HB.cjs} +2 -2
- package/cjs/__chunks/{N6Q3QJ4G.cjs → VQJ44BSY.cjs} +2 -2
- package/cjs/__chunks/{5GQV7KPQ.cjs → VSDH37LI.cjs} +3 -3
- package/cjs/__chunks/{RIZYIKBE.cjs → WABPFCL3.cjs} +3 -3
- package/cjs/__chunks/{EQ4A5RPW.cjs → WK7AZPHS.cjs} +4 -4
- package/cjs/__chunks/{23LJEFHI.cjs → XDTEICF5.cjs} +7 -7
- package/cjs/__chunks/{NLH3Z3GA.cjs → Y22E2GCT.cjs} +6 -6
- package/cjs/checkbox/checkbox-context.d.cts +5 -5
- package/cjs/checkbox/checkbox-context.d.ts +5 -5
- package/cjs/checkbox/checkbox-provider.cjs +4 -4
- package/cjs/checkbox/checkbox-store.cjs +3 -3
- package/cjs/checkbox/checkbox-store.d.cts +6 -8
- package/cjs/checkbox/checkbox-store.d.ts +6 -8
- package/cjs/checkbox/checkbox.cjs +3 -3
- package/cjs/collection/collection-context.d.cts +5 -20
- package/cjs/collection/collection-context.d.ts +5 -20
- package/cjs/collection/collection-provider.cjs +3 -3
- package/cjs/collection/collection-provider.d.cts +2 -4
- package/cjs/collection/collection-provider.d.ts +2 -4
- package/cjs/collection/collection-renderer.cjs +3 -3
- package/cjs/collection/collection-store.cjs +3 -3
- package/cjs/collection/collection-store.d.cts +10 -9
- package/cjs/collection/collection-store.d.ts +10 -9
- package/cjs/combobox/combobox-cancel.cjs +2 -2
- package/cjs/combobox/combobox-context.cjs +4 -2
- package/cjs/combobox/combobox-context.d.cts +6 -5
- package/cjs/combobox/combobox-context.d.ts +6 -5
- package/cjs/combobox/combobox-disclosure.cjs +2 -2
- package/cjs/combobox/combobox-group.cjs +32 -5
- package/cjs/combobox/combobox-item-check.cjs +50 -0
- package/cjs/combobox/combobox-item-check.d.cts +60 -0
- package/cjs/combobox/combobox-item-check.d.ts +60 -0
- package/cjs/combobox/combobox-item-value.cjs +3 -3
- package/cjs/combobox/combobox-item.cjs +48 -11
- package/cjs/combobox/combobox-item.d.cts +31 -13
- package/cjs/combobox/combobox-item.d.ts +31 -13
- package/cjs/combobox/combobox-label.cjs +55 -0
- package/cjs/combobox/combobox-label.d.cts +42 -0
- package/cjs/combobox/combobox-label.d.ts +42 -0
- package/cjs/combobox/combobox-list.cjs +5 -5
- package/cjs/combobox/combobox-popover.cjs +14 -14
- package/cjs/combobox/combobox-provider.cjs +10 -10
- package/cjs/combobox/combobox-provider.d.cts +8 -4
- package/cjs/combobox/combobox-provider.d.ts +8 -4
- package/cjs/combobox/combobox-row.cjs +2 -2
- package/cjs/combobox/combobox-separator.cjs +2 -2
- package/cjs/combobox/combobox-store.cjs +8 -8
- package/cjs/combobox/combobox-store.d.cts +26 -9
- package/cjs/combobox/combobox-store.d.ts +26 -9
- package/cjs/combobox/combobox.cjs +22 -12
- package/cjs/composite/composite-container.cjs +3 -3
- package/cjs/composite/composite-context.d.cts +5 -5
- package/cjs/composite/composite-context.d.ts +5 -5
- package/cjs/composite/composite-hover.d.cts +4 -0
- package/cjs/composite/composite-hover.d.ts +4 -0
- package/cjs/composite/composite-item.cjs +3 -3
- package/cjs/composite/composite-item.d.cts +3 -0
- package/cjs/composite/composite-item.d.ts +3 -0
- package/cjs/composite/composite-overflow-disclosure.cjs +3 -3
- package/cjs/composite/composite-overflow-store.cjs +6 -6
- package/cjs/composite/composite-overflow.cjs +8 -8
- package/cjs/composite/composite-provider.cjs +4 -4
- package/cjs/composite/composite-provider.d.cts +2 -4
- package/cjs/composite/composite-provider.d.ts +2 -4
- package/cjs/composite/composite-renderer.cjs +4 -4
- package/cjs/composite/composite-store.cjs +4 -4
- package/cjs/composite/composite-store.d.cts +10 -9
- package/cjs/composite/composite-store.d.ts +10 -9
- package/cjs/composite/utils.d.cts +3 -24
- package/cjs/composite/utils.d.ts +3 -24
- package/cjs/dialog/dialog-backdrop.cjs +5 -5
- package/cjs/dialog/dialog-provider.cjs +4 -4
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/dialog/dialog-store.d.cts +4 -2
- package/cjs/dialog/dialog-store.d.ts +4 -2
- package/cjs/dialog/dialog.cjs +7 -7
- package/cjs/disclosure/disclosure-content.cjs +3 -3
- package/cjs/disclosure/disclosure-content.d.cts +1 -0
- package/cjs/disclosure/disclosure-content.d.ts +1 -0
- package/cjs/disclosure/disclosure-provider.cjs +3 -3
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/disclosure/disclosure-store.d.cts +8 -4
- package/cjs/disclosure/disclosure-store.d.ts +8 -4
- package/cjs/disclosure/disclosure.d.cts +3 -0
- package/cjs/disclosure/disclosure.d.ts +3 -0
- package/cjs/focusable/focusable.d.cts +1 -0
- package/cjs/focusable/focusable.d.ts +1 -0
- package/cjs/form/form-checkbox.cjs +6 -6
- package/cjs/form/form-context.d.cts +5 -5
- package/cjs/form/form-context.d.ts +5 -5
- package/cjs/form/form-provider.cjs +4 -4
- package/cjs/form/form-radio.cjs +4 -4
- package/cjs/form/form-store.cjs +4 -4
- package/cjs/form/form-store.d.cts +14 -12
- package/cjs/form/form-store.d.ts +14 -12
- package/cjs/hovercard/hovercard-anchor.cjs +2 -2
- package/cjs/hovercard/hovercard-anchor.d.cts +3 -0
- package/cjs/hovercard/hovercard-anchor.d.ts +3 -0
- package/cjs/hovercard/hovercard-provider.cjs +6 -6
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/hovercard/hovercard-store.d.cts +4 -2
- package/cjs/hovercard/hovercard-store.d.ts +4 -2
- package/cjs/hovercard/hovercard.cjs +9 -9
- package/cjs/menu/menu-bar-provider.cjs +6 -6
- package/cjs/menu/menu-bar-store.cjs +6 -6
- package/cjs/menu/menu-bar.cjs +6 -6
- package/cjs/menu/menu-button.cjs +7 -4
- package/cjs/menu/menu-context.d.cts +5 -5
- package/cjs/menu/menu-context.d.ts +5 -5
- package/cjs/menu/menu-item-checkbox.cjs +9 -9
- package/cjs/menu/menu-item-radio.cjs +6 -6
- package/cjs/menu/menu-item.cjs +4 -4
- package/cjs/menu/menu-list.cjs +4 -4
- package/cjs/menu/menu-provider.cjs +10 -10
- package/cjs/menu/menu-store.cjs +10 -10
- package/cjs/menu/menu-store.d.cts +11 -33
- package/cjs/menu/menu-store.d.ts +11 -33
- package/cjs/menu/menu.cjs +43 -28
- package/cjs/menubar/menubar-provider.cjs +6 -6
- package/cjs/menubar/menubar-store.cjs +5 -5
- package/cjs/menubar/menubar-store.d.cts +4 -2
- package/cjs/menubar/menubar-store.d.ts +4 -2
- package/cjs/menubar/menubar.cjs +6 -6
- package/cjs/popover/popover-provider.cjs +5 -5
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/popover/popover-store.d.cts +4 -2
- package/cjs/popover/popover-store.d.ts +4 -2
- package/cjs/popover/popover.cjs +8 -8
- package/cjs/popover/popover.d.cts +4 -0
- package/cjs/popover/popover.d.ts +4 -0
- package/cjs/portal/portal.d.cts +3 -0
- package/cjs/portal/portal.d.ts +3 -0
- package/cjs/radio/radio-provider.cjs +5 -5
- package/cjs/radio/radio-store.cjs +5 -5
- package/cjs/radio/radio-store.d.cts +4 -2
- package/cjs/radio/radio-store.d.ts +4 -2
- package/cjs/radio/radio.cjs +4 -4
- package/cjs/select/select-context.d.cts +5 -5
- package/cjs/select/select-context.d.ts +5 -5
- package/cjs/select/select-item.cjs +6 -6
- package/cjs/select/select-label.cjs +1 -1
- package/cjs/select/select-list.cjs +4 -4
- package/cjs/select/select-popover.cjs +11 -11
- package/cjs/select/select-provider.cjs +9 -9
- package/cjs/select/select-renderer.cjs +7 -7
- package/cjs/select/select-store.cjs +9 -9
- package/cjs/select/select-store.d.cts +12 -18
- package/cjs/select/select-store.d.ts +12 -18
- package/cjs/tab/tab-panel.cjs +5 -5
- package/cjs/tab/tab-provider.cjs +5 -5
- package/cjs/tab/tab-store.cjs +5 -5
- package/cjs/tab/tab-store.d.cts +13 -42
- package/cjs/tab/tab-store.d.ts +13 -42
- 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-store.d.cts +4 -2
- package/cjs/toolbar/toolbar-store.d.ts +4 -2
- package/cjs/toolbar/toolbar.cjs +5 -5
- package/cjs/tooltip/tooltip-anchor.cjs +2 -2
- package/cjs/tooltip/tooltip-provider.cjs +7 -7
- package/cjs/tooltip/tooltip-store.cjs +7 -7
- package/cjs/tooltip/tooltip-store.d.cts +4 -2
- package/cjs/tooltip/tooltip-store.d.ts +4 -2
- package/cjs/tooltip/tooltip.cjs +10 -10
- package/cjs/utils/store.cjs +2 -2
- package/combobox/combobox-item-check/package.json +8 -0
- package/combobox/combobox-label/package.json +8 -0
- package/esm/__chunks/{NR6NHF6H.js → 2ECHI3ER.js} +1 -1
- package/esm/__chunks/{WBQC3LL4.js → 2WETNHXU.js} +1 -1
- package/esm/__chunks/{XF5ITC6P.js → 4OZYHFMH.js} +3 -2
- package/esm/__chunks/{JSLLR7RC.js → 57VLL43X.js} +2 -2
- package/esm/__chunks/{2CW6UMKT.js → 5L7XBKAC.js} +2 -2
- package/esm/__chunks/{D42GAV4S.js → 6H3EJNCE.js} +1 -1
- package/esm/__chunks/{SZD4L3WR.js → 6HKEBMMA.js} +2 -2
- package/esm/__chunks/{CRADASSQ.js → 6L5IUFNE.js} +2 -2
- package/esm/__chunks/{2N7L2ZZE.js → 6SB7F42L.js} +2 -2
- package/esm/__chunks/{QKWOT47C.js → 7X4DYKYU.js} +8 -2
- package/esm/__chunks/{HXL5CHAC.js → A3PM2ZVJ.js} +2 -2
- package/esm/__chunks/{ELWRSPQ7.js → A6ER4BO6.js} +2 -2
- package/esm/__chunks/{JRUYDVPB.js → BJR5BFSV.js} +26 -14
- package/esm/__chunks/{4KTUOVEM.js → DHHIMTTV.js} +2 -2
- package/esm/__chunks/{KFUKDUTY.js → DKALGMO6.js} +11 -3
- package/esm/__chunks/{NE6JAKK6.js → DYLO4TTE.js} +4 -4
- package/esm/__chunks/{UNZQE6T7.js → EENTNM7A.js} +2 -2
- package/esm/__chunks/{24AKC2LC.js → EZTAZGGV.js} +5 -3
- package/esm/__chunks/{LNLZDJD4.js → FWQLUQ4T.js} +2 -2
- package/esm/__chunks/{CDFXNOHN.js → GD2VG2KJ.js} +1 -1
- package/esm/__chunks/{5A2VZUUV.js → HDMIVTNE.js} +1 -1
- package/esm/__chunks/{BONLQCKO.js → HQ7YVNMA.js} +2 -2
- package/esm/__chunks/{BI7ZXWGY.js → IIVLUKKG.js} +1 -1
- package/esm/__chunks/{P2V6GHKM.js → IXZMWLUE.js} +2 -2
- package/esm/__chunks/{AY3L6CB6.js → K5VQ2XTM.js} +2 -2
- package/esm/__chunks/{A7CE3X6M.js → KOKHD3Z3.js} +1 -1
- package/esm/__chunks/{PHTJ3BCW.js → NYD53BDE.js} +4 -4
- package/esm/__chunks/{U7WGY7YX.js → PFM7J2TR.js} +8 -24
- package/esm/__chunks/{2TCVF54Q.js → QCIQ4F64.js} +2 -2
- package/esm/__chunks/{IVPCRN7Q.js → QUPVK46L.js} +2 -2
- package/esm/__chunks/{CVWFS4PP.js → SMM5JVLC.js} +1 -1
- package/esm/__chunks/{BTTOLUHC.js → TZJDOU75.js} +1 -1
- package/esm/__chunks/{T2EXCD3L.js → UV2O3GRQ.js} +1 -1
- package/esm/__chunks/{2QSQGCHB.js → VZOR43YE.js} +1 -1
- package/esm/__chunks/{MTC2KUZZ.js → W76OTZCC.js} +3 -1
- package/esm/__chunks/{VVBJIO3T.js → XCRWZKAW.js} +1 -1
- package/esm/__chunks/{5PEPOQU7.js → YGCD7HIZ.js} +1 -1
- package/esm/checkbox/checkbox-context.d.ts +5 -5
- package/esm/checkbox/checkbox-provider.js +4 -4
- package/esm/checkbox/checkbox-store.d.ts +6 -8
- package/esm/checkbox/checkbox-store.js +2 -2
- package/esm/checkbox/checkbox.js +2 -2
- package/esm/collection/collection-context.d.ts +5 -20
- package/esm/collection/collection-provider.d.ts +2 -4
- package/esm/collection/collection-provider.js +2 -2
- package/esm/collection/collection-renderer.js +2 -2
- package/esm/collection/collection-store.d.ts +10 -9
- package/esm/collection/collection-store.js +2 -2
- package/esm/combobox/combobox-cancel.js +1 -1
- package/esm/combobox/combobox-context.d.ts +6 -5
- package/esm/combobox/combobox-context.js +3 -1
- package/esm/combobox/combobox-disclosure.js +1 -1
- package/esm/combobox/combobox-group.js +32 -5
- package/esm/combobox/combobox-item-check.d.ts +60 -0
- package/esm/combobox/combobox-item-check.js +50 -0
- package/esm/combobox/combobox-item-value.js +1 -1
- package/esm/combobox/combobox-item.d.ts +31 -13
- package/esm/combobox/combobox-item.js +46 -9
- package/esm/combobox/combobox-label.d.ts +42 -0
- package/esm/combobox/combobox-label.js +55 -0
- package/esm/combobox/combobox-list.js +4 -4
- package/esm/combobox/combobox-popover.js +9 -9
- package/esm/combobox/combobox-provider.d.ts +8 -4
- package/esm/combobox/combobox-provider.js +8 -8
- package/esm/combobox/combobox-row.js +1 -1
- package/esm/combobox/combobox-separator.js +1 -1
- package/esm/combobox/combobox-store.d.ts +26 -9
- package/esm/combobox/combobox-store.js +7 -7
- package/esm/combobox/combobox.js +21 -11
- package/esm/composite/composite-container.js +2 -2
- package/esm/composite/composite-context.d.ts +5 -5
- package/esm/composite/composite-hover.d.ts +4 -0
- package/esm/composite/composite-item.d.ts +3 -0
- 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 +7 -7
- package/esm/composite/composite-provider.d.ts +2 -4
- package/esm/composite/composite-provider.js +3 -3
- package/esm/composite/composite-renderer.js +3 -3
- package/esm/composite/composite-store.d.ts +10 -9
- package/esm/composite/composite-store.js +3 -3
- package/esm/composite/utils.d.ts +3 -24
- package/esm/dialog/dialog-backdrop.js +4 -4
- package/esm/dialog/dialog-provider.js +3 -3
- package/esm/dialog/dialog-store.d.ts +4 -2
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/dialog/dialog.js +6 -6
- package/esm/disclosure/disclosure-content.d.ts +1 -0
- package/esm/disclosure/disclosure-content.js +2 -2
- package/esm/disclosure/disclosure-provider.js +2 -2
- package/esm/disclosure/disclosure-store.d.ts +8 -4
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/disclosure/disclosure.d.ts +3 -0
- package/esm/focusable/focusable.d.ts +1 -0
- package/esm/form/form-checkbox.js +4 -4
- package/esm/form/form-context.d.ts +5 -5
- package/esm/form/form-provider.js +3 -3
- package/esm/form/form-radio.js +3 -3
- package/esm/form/form-store.d.ts +14 -12
- package/esm/form/form-store.js +3 -3
- package/esm/hovercard/hovercard-anchor.d.ts +3 -0
- package/esm/hovercard/hovercard-anchor.js +1 -1
- package/esm/hovercard/hovercard-provider.js +5 -5
- package/esm/hovercard/hovercard-store.d.ts +4 -2
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/hovercard/hovercard.js +8 -8
- package/esm/menu/menu-bar-provider.js +5 -5
- package/esm/menu/menu-bar-store.js +4 -4
- package/esm/menu/menu-bar.js +5 -5
- package/esm/menu/menu-button.js +6 -3
- package/esm/menu/menu-context.d.ts +5 -5
- package/esm/menu/menu-item-checkbox.js +6 -6
- package/esm/menu/menu-item-radio.js +4 -4
- package/esm/menu/menu-item.js +3 -3
- package/esm/menu/menu-list.js +3 -3
- package/esm/menu/menu-provider.js +9 -9
- package/esm/menu/menu-store.d.ts +11 -33
- package/esm/menu/menu-store.js +9 -9
- package/esm/menu/menu.js +40 -25
- package/esm/menubar/menubar-provider.js +5 -5
- package/esm/menubar/menubar-store.d.ts +4 -2
- package/esm/menubar/menubar-store.js +4 -4
- package/esm/menubar/menubar.js +5 -5
- package/esm/popover/popover-provider.js +4 -4
- package/esm/popover/popover-store.d.ts +4 -2
- package/esm/popover/popover-store.js +4 -4
- package/esm/popover/popover.d.ts +4 -0
- package/esm/popover/popover.js +7 -7
- package/esm/portal/portal.d.ts +3 -0
- package/esm/radio/radio-provider.js +4 -4
- package/esm/radio/radio-store.d.ts +4 -2
- package/esm/radio/radio-store.js +4 -4
- package/esm/radio/radio.js +3 -3
- package/esm/select/select-context.d.ts +5 -5
- package/esm/select/select-item.js +5 -5
- package/esm/select/select-label.js +2 -2
- package/esm/select/select-list.js +3 -3
- package/esm/select/select-popover.js +8 -8
- package/esm/select/select-provider.js +8 -8
- package/esm/select/select-renderer.js +3 -3
- package/esm/select/select-store.d.ts +12 -18
- package/esm/select/select-store.js +8 -8
- package/esm/tab/tab-panel.js +3 -3
- package/esm/tab/tab-provider.js +4 -4
- package/esm/tab/tab-store.d.ts +13 -42
- 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.d.ts +4 -2
- package/esm/toolbar/toolbar-store.js +4 -4
- package/esm/toolbar/toolbar.js +4 -4
- package/esm/tooltip/tooltip-anchor.js +1 -1
- package/esm/tooltip/tooltip-provider.js +6 -6
- package/esm/tooltip/tooltip-store.d.ts +4 -2
- package/esm/tooltip/tooltip-store.js +6 -6
- package/esm/tooltip/tooltip.js +8 -8
- package/esm/utils/store.js +1 -1
- package/package.json +16 -2
|
@@ -6,7 +6,7 @@ require('../__chunks/LFHNPG2L.cjs');
|
|
|
6
6
|
require('../__chunks/5UTRYT6E.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _3WCBE6SUcjs = require('../__chunks/3WCBE6SU.cjs');
|
|
10
10
|
require('../__chunks/DAJUUBUI.cjs');
|
|
11
11
|
require('../__chunks/UZNYSPKP.cjs');
|
|
12
12
|
require('../__chunks/BZTDJIVT.cjs');
|
|
@@ -53,7 +53,7 @@ var children = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
|
53
53
|
var useComboboxDisclosure = _RNZNGEL4cjs.createHook.call(void 0,
|
|
54
54
|
(_a) => {
|
|
55
55
|
var _b = _a, { store } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, ["store"]);
|
|
56
|
-
const context =
|
|
56
|
+
const context = _3WCBE6SUcjs.useComboboxProviderContext.call(void 0, );
|
|
57
57
|
store = store || context;
|
|
58
58
|
_misc.invariant.call(void 0,
|
|
59
59
|
store,
|
|
@@ -6,18 +6,45 @@ require('../__chunks/KSAZE5E2.cjs');
|
|
|
6
6
|
require('../__chunks/FE3YCURH.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
var _3WCBE6SUcjs = require('../__chunks/3WCBE6SU.cjs');
|
|
10
|
+
require('../__chunks/UZNYSPKP.cjs');
|
|
11
|
+
require('../__chunks/BZTDJIVT.cjs');
|
|
12
|
+
require('../__chunks/UVBBMANL.cjs');
|
|
13
|
+
require('../__chunks/F2A2ZQDB.cjs');
|
|
14
|
+
require('../__chunks/S6UU7NA4.cjs');
|
|
15
|
+
|
|
16
|
+
|
|
9
17
|
|
|
10
18
|
|
|
11
19
|
var _RNZNGEL4cjs = require('../__chunks/RNZNGEL4.cjs');
|
|
12
20
|
require('../__chunks/EO6LS72H.cjs');
|
|
13
21
|
require('../__chunks/CJDHQUBR.cjs');
|
|
14
|
-
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
15
26
|
|
|
16
27
|
// src/combobox/combobox-group.ts
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
var _dom = require('@ariakit/core/utils/dom');
|
|
29
|
+
var _misc = require('@ariakit/core/utils/misc');
|
|
30
|
+
var useComboboxGroup = _RNZNGEL4cjs.createHook.call(void 0,
|
|
31
|
+
(_a) => {
|
|
32
|
+
var _b = _a, { store } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, ["store"]);
|
|
33
|
+
const context = _3WCBE6SUcjs.useComboboxScopedContext.call(void 0, );
|
|
34
|
+
store = store || context;
|
|
35
|
+
_misc.invariant.call(void 0,
|
|
36
|
+
store,
|
|
37
|
+
process.env.NODE_ENV !== "production" && "ComboboxRow must be wrapped in a ComboboxList or ComboboxPopover component"
|
|
38
|
+
);
|
|
39
|
+
const contentElement = store.useState("contentElement");
|
|
40
|
+
const popupRole = _dom.getPopupRole.call(void 0, contentElement);
|
|
41
|
+
if (popupRole === "grid") {
|
|
42
|
+
props = _AV6KTKLEcjs.__spreadValues.call(void 0, { role: "rowgroup" }, props);
|
|
43
|
+
}
|
|
44
|
+
props = _2KDFQUU7cjs.useCompositeGroup.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, { store }, props));
|
|
45
|
+
return props;
|
|
46
|
+
}
|
|
47
|
+
);
|
|
21
48
|
var ComboboxGroup = _RNZNGEL4cjs.createComponent.call(void 0, (props) => {
|
|
22
49
|
const htmlProps = useComboboxGroup(props);
|
|
23
50
|
return _RNZNGEL4cjs.createElement.call(void 0, "div", htmlProps);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _T4KYZJUYcjs = require('../__chunks/T4KYZJUY.cjs');
|
|
5
|
+
require('../__chunks/ERFHNHON.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _3WCBE6SUcjs = require('../__chunks/3WCBE6SU.cjs');
|
|
9
|
+
require('../__chunks/UZNYSPKP.cjs');
|
|
10
|
+
require('../__chunks/BZTDJIVT.cjs');
|
|
11
|
+
require('../__chunks/UVBBMANL.cjs');
|
|
12
|
+
require('../__chunks/F2A2ZQDB.cjs');
|
|
13
|
+
require('../__chunks/S6UU7NA4.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _RNZNGEL4cjs = require('../__chunks/RNZNGEL4.cjs');
|
|
19
|
+
require('../__chunks/EO6LS72H.cjs');
|
|
20
|
+
require('../__chunks/CJDHQUBR.cjs');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
26
|
+
|
|
27
|
+
// src/combobox/combobox-item-check.ts
|
|
28
|
+
var _react = require('react');
|
|
29
|
+
var useComboboxItemCheck = _RNZNGEL4cjs.createHook.call(void 0,
|
|
30
|
+
(_a) => {
|
|
31
|
+
var _b = _a, { store, checked } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, ["store", "checked"]);
|
|
32
|
+
const context = _react.useContext.call(void 0, _3WCBE6SUcjs.ComboboxItemCheckedContext);
|
|
33
|
+
checked = checked != null ? checked : context;
|
|
34
|
+
props = _T4KYZJUYcjs.useCheckboxCheck.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), { checked }));
|
|
35
|
+
return props;
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
var ComboboxItemCheck = _RNZNGEL4cjs.createComponent.call(void 0,
|
|
39
|
+
(props) => {
|
|
40
|
+
const htmlProps = useComboboxItemCheck(props);
|
|
41
|
+
return _RNZNGEL4cjs.createElement.call(void 0, "span", htmlProps);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
if (process.env.NODE_ENV !== "production") {
|
|
45
|
+
ComboboxItemCheck.displayName = "ComboboxItemCheck";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
exports.ComboboxItemCheck = ComboboxItemCheck; exports.useComboboxItemCheck = useComboboxItemCheck;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { CheckboxCheckOptions } from "../checkbox/checkbox-check.jsx";
|
|
2
|
+
import type { As, Props } from "../utils/types.js";
|
|
3
|
+
import type { ComboboxStore } from "./combobox-store.js";
|
|
4
|
+
/**
|
|
5
|
+
* Returns props to create a `ComboboxItemCheck` component. This hook must be
|
|
6
|
+
* used in a component that's wrapped with `ComboboxItem` or the `checked` prop
|
|
7
|
+
* must be explicitly passed to the component.
|
|
8
|
+
* @see https://ariakit.org/components/combobox
|
|
9
|
+
* @example
|
|
10
|
+
* ```jsx
|
|
11
|
+
* const props = useComboboxItemCheck({ checked: true });
|
|
12
|
+
* <Role {...props} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const useComboboxItemCheck: import("../utils/types.js").Hook<ComboboxItemCheckOptions<"span">>;
|
|
16
|
+
/**
|
|
17
|
+
* Renders a checkmark inside a
|
|
18
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) component. This
|
|
19
|
+
* component must be wrapped with
|
|
20
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) or the
|
|
21
|
+
* [`checked`](https://ariakit.org/reference/combobox-item-check#checked) prop
|
|
22
|
+
* must be explicitly passed to the component.
|
|
23
|
+
* @see https://ariakit.org/components/combobox
|
|
24
|
+
* @example
|
|
25
|
+
* ```jsx {5,9}
|
|
26
|
+
* <ComboboxProvider>
|
|
27
|
+
* <Combobox />
|
|
28
|
+
* <ComboboxPopover>
|
|
29
|
+
* <ComboboxItem value="Apple">
|
|
30
|
+
* <ComboboxItemCheck />
|
|
31
|
+
* Apple
|
|
32
|
+
* </ComboboxItem>
|
|
33
|
+
* <ComboboxItem value="Orange">
|
|
34
|
+
* <ComboboxItemCheck />
|
|
35
|
+
* Orange
|
|
36
|
+
* </ComboboxItem>
|
|
37
|
+
* </ComboboxPopover>
|
|
38
|
+
* </ComboboxProvider>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const ComboboxItemCheck: import("../utils/types.js").Component<ComboboxItemCheckOptions<"span">>;
|
|
42
|
+
export interface ComboboxItemCheckOptions<T extends As = "span"> extends CheckboxCheckOptions<T> {
|
|
43
|
+
/**
|
|
44
|
+
* Object returned by the
|
|
45
|
+
* [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
|
|
46
|
+
* hook. If not provided, the parent
|
|
47
|
+
* [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
|
|
48
|
+
* [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
|
|
49
|
+
* components' context will be used.
|
|
50
|
+
*/
|
|
51
|
+
store?: ComboboxStore;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the check mark should be shown. This value is automatically
|
|
54
|
+
* inferred from the parent
|
|
55
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) component.
|
|
56
|
+
* Manually setting this prop will override the inferred value.
|
|
57
|
+
*/
|
|
58
|
+
checked?: boolean;
|
|
59
|
+
}
|
|
60
|
+
export type ComboboxItemCheckProps<T extends As = "span"> = Props<ComboboxItemCheckOptions<T>>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { CheckboxCheckOptions } from "../checkbox/checkbox-check.jsx";
|
|
2
|
+
import type { As, Props } from "../utils/types.js";
|
|
3
|
+
import type { ComboboxStore } from "./combobox-store.js";
|
|
4
|
+
/**
|
|
5
|
+
* Returns props to create a `ComboboxItemCheck` component. This hook must be
|
|
6
|
+
* used in a component that's wrapped with `ComboboxItem` or the `checked` prop
|
|
7
|
+
* must be explicitly passed to the component.
|
|
8
|
+
* @see https://ariakit.org/components/combobox
|
|
9
|
+
* @example
|
|
10
|
+
* ```jsx
|
|
11
|
+
* const props = useComboboxItemCheck({ checked: true });
|
|
12
|
+
* <Role {...props} />
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const useComboboxItemCheck: import("../utils/types.js").Hook<ComboboxItemCheckOptions<"span">>;
|
|
16
|
+
/**
|
|
17
|
+
* Renders a checkmark inside a
|
|
18
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) component. This
|
|
19
|
+
* component must be wrapped with
|
|
20
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) or the
|
|
21
|
+
* [`checked`](https://ariakit.org/reference/combobox-item-check#checked) prop
|
|
22
|
+
* must be explicitly passed to the component.
|
|
23
|
+
* @see https://ariakit.org/components/combobox
|
|
24
|
+
* @example
|
|
25
|
+
* ```jsx {5,9}
|
|
26
|
+
* <ComboboxProvider>
|
|
27
|
+
* <Combobox />
|
|
28
|
+
* <ComboboxPopover>
|
|
29
|
+
* <ComboboxItem value="Apple">
|
|
30
|
+
* <ComboboxItemCheck />
|
|
31
|
+
* Apple
|
|
32
|
+
* </ComboboxItem>
|
|
33
|
+
* <ComboboxItem value="Orange">
|
|
34
|
+
* <ComboboxItemCheck />
|
|
35
|
+
* Orange
|
|
36
|
+
* </ComboboxItem>
|
|
37
|
+
* </ComboboxPopover>
|
|
38
|
+
* </ComboboxProvider>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare const ComboboxItemCheck: import("../utils/types.js").Component<ComboboxItemCheckOptions<"span">>;
|
|
42
|
+
export interface ComboboxItemCheckOptions<T extends As = "span"> extends CheckboxCheckOptions<T> {
|
|
43
|
+
/**
|
|
44
|
+
* Object returned by the
|
|
45
|
+
* [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
|
|
46
|
+
* hook. If not provided, the parent
|
|
47
|
+
* [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
|
|
48
|
+
* [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
|
|
49
|
+
* components' context will be used.
|
|
50
|
+
*/
|
|
51
|
+
store?: ComboboxStore;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the check mark should be shown. This value is automatically
|
|
54
|
+
* inferred from the parent
|
|
55
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) component.
|
|
56
|
+
* Manually setting this prop will override the inferred value.
|
|
57
|
+
*/
|
|
58
|
+
checked?: boolean;
|
|
59
|
+
}
|
|
60
|
+
export type ComboboxItemCheckProps<T extends As = "span"> = Props<ComboboxItemCheckOptions<T>>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _3WCBE6SUcjs = require('../__chunks/3WCBE6SU.cjs');
|
|
6
6
|
require('../__chunks/UZNYSPKP.cjs');
|
|
7
7
|
require('../__chunks/BZTDJIVT.cjs');
|
|
8
8
|
require('../__chunks/UVBBMANL.cjs');
|
|
@@ -53,9 +53,9 @@ function splitValue(itemValue, userValue) {
|
|
|
53
53
|
var useComboboxItemValue = _RNZNGEL4cjs.createHook.call(void 0,
|
|
54
54
|
(_a) => {
|
|
55
55
|
var _b = _a, { store, value } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, ["store", "value"]);
|
|
56
|
-
const context =
|
|
56
|
+
const context = _3WCBE6SUcjs.useComboboxScopedContext.call(void 0, );
|
|
57
57
|
store = store || context;
|
|
58
|
-
const itemContext = _react.useContext.call(void 0,
|
|
58
|
+
const itemContext = _react.useContext.call(void 0, _3WCBE6SUcjs.ComboboxItemValueContext);
|
|
59
59
|
const itemValue = value != null ? value : itemContext;
|
|
60
60
|
_misc.invariant.call(void 0,
|
|
61
61
|
store,
|
|
@@ -5,10 +5,11 @@ var _IPYAEPOTcjs = require('../__chunks/IPYAEPOT.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _VEG6PRAGcjs = require('../__chunks/VEG6PRAG.cjs');
|
|
9
8
|
|
|
9
|
+
var _3WCBE6SUcjs = require('../__chunks/3WCBE6SU.cjs');
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
var _PFQ3IPWTcjs = require('../__chunks/PFQ3IPWT.cjs');
|
|
12
13
|
require('../__chunks/DAJUUBUI.cjs');
|
|
13
14
|
require('../__chunks/R5A2WTWB.cjs');
|
|
14
15
|
require('../__chunks/RV3PHHWM.cjs');
|
|
@@ -24,7 +25,7 @@ require('../__chunks/75KXQZJX.cjs');
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
var _RNZNGEL4cjs = require('../__chunks/RNZNGEL4.cjs');
|
|
27
|
-
require('../__chunks/
|
|
28
|
+
require('../__chunks/B233QVZE.cjs');
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
|
|
@@ -44,13 +45,24 @@ var _events = require('@ariakit/core/utils/events');
|
|
|
44
45
|
var _focus = require('@ariakit/core/utils/focus');
|
|
45
46
|
var _misc = require('@ariakit/core/utils/misc');
|
|
46
47
|
var _jsxruntime = require('react/jsx-runtime');
|
|
48
|
+
function isSelected(storeValue, itemValue) {
|
|
49
|
+
if (itemValue == null)
|
|
50
|
+
return;
|
|
51
|
+
if (storeValue == null)
|
|
52
|
+
return false;
|
|
53
|
+
if (Array.isArray(storeValue)) {
|
|
54
|
+
return storeValue.includes(itemValue);
|
|
55
|
+
}
|
|
56
|
+
return storeValue === itemValue;
|
|
57
|
+
}
|
|
47
58
|
var useComboboxItem = _RNZNGEL4cjs.createHook.call(void 0,
|
|
48
59
|
(_a) => {
|
|
49
60
|
var _b = _a, {
|
|
50
61
|
store,
|
|
51
62
|
value,
|
|
52
|
-
hideOnClick
|
|
53
|
-
|
|
63
|
+
hideOnClick,
|
|
64
|
+
selectValueOnClick = true,
|
|
65
|
+
setValueOnClick,
|
|
54
66
|
focusOnHover = false,
|
|
55
67
|
moveOnKeyPress = true,
|
|
56
68
|
getItem: getItemProp
|
|
@@ -58,12 +70,13 @@ var useComboboxItem = _RNZNGEL4cjs.createHook.call(void 0,
|
|
|
58
70
|
"store",
|
|
59
71
|
"value",
|
|
60
72
|
"hideOnClick",
|
|
73
|
+
"selectValueOnClick",
|
|
61
74
|
"setValueOnClick",
|
|
62
75
|
"focusOnHover",
|
|
63
76
|
"moveOnKeyPress",
|
|
64
77
|
"getItem"
|
|
65
78
|
]);
|
|
66
|
-
const context =
|
|
79
|
+
const context = _3WCBE6SUcjs.useComboboxScopedContext.call(void 0, );
|
|
67
80
|
store = store || context;
|
|
68
81
|
_misc.invariant.call(void 0,
|
|
69
82
|
store,
|
|
@@ -79,8 +92,14 @@ var useComboboxItem = _RNZNGEL4cjs.createHook.call(void 0,
|
|
|
79
92
|
},
|
|
80
93
|
[value, getItemProp]
|
|
81
94
|
);
|
|
95
|
+
const multiSelectable = store.useState(
|
|
96
|
+
(state) => Array.isArray(state.selectedValue)
|
|
97
|
+
);
|
|
98
|
+
setValueOnClick = setValueOnClick != null ? setValueOnClick : !multiSelectable;
|
|
99
|
+
hideOnClick = hideOnClick != null ? hideOnClick : value != null && !multiSelectable;
|
|
82
100
|
const onClickProp = props.onClick;
|
|
83
101
|
const setValueOnClickProp = _EO6LS72Hcjs.useBooleanEvent.call(void 0, setValueOnClick);
|
|
102
|
+
const selectValueOnClickProp = _EO6LS72Hcjs.useBooleanEvent.call(void 0, selectValueOnClick);
|
|
84
103
|
const hideOnClickProp = _EO6LS72Hcjs.useBooleanEvent.call(void 0, hideOnClick);
|
|
85
104
|
const onClick = _EO6LS72Hcjs.useEvent.call(void 0, (event) => {
|
|
86
105
|
onClickProp == null ? void 0 : onClickProp(event);
|
|
@@ -90,8 +109,20 @@ var useComboboxItem = _RNZNGEL4cjs.createHook.call(void 0,
|
|
|
90
109
|
return;
|
|
91
110
|
if (_events.isOpeningInNewTab.call(void 0, event))
|
|
92
111
|
return;
|
|
93
|
-
if (value != null
|
|
94
|
-
|
|
112
|
+
if (value != null) {
|
|
113
|
+
if (selectValueOnClickProp(event)) {
|
|
114
|
+
store == null ? void 0 : store.setSelectedValue((prevValue) => {
|
|
115
|
+
if (!Array.isArray(prevValue))
|
|
116
|
+
return value;
|
|
117
|
+
if (prevValue.includes(value)) {
|
|
118
|
+
return prevValue.filter((v) => v !== value);
|
|
119
|
+
}
|
|
120
|
+
return [...prevValue, value];
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if (setValueOnClickProp(event)) {
|
|
124
|
+
store == null ? void 0 : store.setValue(value);
|
|
125
|
+
}
|
|
95
126
|
}
|
|
96
127
|
if (hideOnClickProp(event)) {
|
|
97
128
|
store == null ? void 0 : store.move(null);
|
|
@@ -116,10 +147,16 @@ var useComboboxItem = _RNZNGEL4cjs.createHook.call(void 0,
|
|
|
116
147
|
}
|
|
117
148
|
}
|
|
118
149
|
});
|
|
150
|
+
const selected = store.useState(
|
|
151
|
+
(state) => isSelected(state.selectedValue, value)
|
|
152
|
+
);
|
|
153
|
+
if (multiSelectable && selected != null) {
|
|
154
|
+
props["aria-selected"] = selected;
|
|
155
|
+
}
|
|
119
156
|
props = _EO6LS72Hcjs.useWrapElement.call(void 0,
|
|
120
157
|
props,
|
|
121
|
-
(element) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
122
|
-
[value]
|
|
158
|
+
(element) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _3WCBE6SUcjs.ComboboxItemValueContext.Provider, { value, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _3WCBE6SUcjs.ComboboxItemCheckedContext.Provider, { value: selected != null ? selected : false, children: element }) }),
|
|
159
|
+
[value, selected]
|
|
123
160
|
);
|
|
124
161
|
const contentElement = store.useState("contentElement");
|
|
125
162
|
props = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {
|
|
@@ -130,7 +167,7 @@ var useComboboxItem = _RNZNGEL4cjs.createHook.call(void 0,
|
|
|
130
167
|
onKeyDown
|
|
131
168
|
});
|
|
132
169
|
const moveOnKeyPressProp = _EO6LS72Hcjs.useBooleanEvent.call(void 0, moveOnKeyPress);
|
|
133
|
-
props =
|
|
170
|
+
props = _PFQ3IPWTcjs.useCompositeItem.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {
|
|
134
171
|
store
|
|
135
172
|
}, props), {
|
|
136
173
|
getItem,
|
|
@@ -52,15 +52,15 @@ export interface ComboboxItemOptions<T extends As = "div"> extends CompositeItem
|
|
|
52
52
|
store?: ComboboxStore;
|
|
53
53
|
/**
|
|
54
54
|
* The value of the item. This will be rendered as the children by default.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
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
64
|
*
|
|
65
65
|
* Live examples:
|
|
66
66
|
* - [Animated Combobox](https://ariakit.org/examples/combobox-animated)
|
|
@@ -73,18 +73,36 @@ export interface ComboboxItemOptions<T extends As = "div"> extends CompositeItem
|
|
|
73
73
|
*/
|
|
74
74
|
value?: string;
|
|
75
75
|
/**
|
|
76
|
-
* Whether to hide the combobox when this item is clicked.
|
|
76
|
+
* Whether to hide the combobox when this item is clicked. By default, the
|
|
77
|
+
* combobox will be hidden when the user clicks on an item with a
|
|
78
|
+
* [`value`](https://ariakit.org/reference/combobox-item#value) prop, unless
|
|
79
|
+
* the combobox is
|
|
80
|
+
* [multi-selectable](https://ariakit.org/examples/combobox-multiple).
|
|
77
81
|
*
|
|
78
82
|
* Live examples:
|
|
79
83
|
* - [Combobox with links](https://ariakit.org/examples/combobox-links)
|
|
80
|
-
* @default true
|
|
81
84
|
*/
|
|
82
85
|
hideOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
|
|
83
86
|
/**
|
|
84
|
-
* Whether to set the
|
|
85
|
-
*
|
|
87
|
+
* Whether to set the
|
|
88
|
+
* [`selectedValue`](https://ariakit.org/reference/combobox-provider#selectedvalue)
|
|
89
|
+
* state using this item's
|
|
90
|
+
* [`value`](https://ariakit.org/reference/combobox-item#value) when the item
|
|
91
|
+
* is clicked.
|
|
86
92
|
* @default true
|
|
87
93
|
*/
|
|
94
|
+
selectValueOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
|
|
95
|
+
/**
|
|
96
|
+
* Whether to set the combobox
|
|
97
|
+
* [`value`](https://ariakit.org/reference/combobox-provider#value) state
|
|
98
|
+
* using this item's
|
|
99
|
+
* [`value`](https://ariakit.org/reference/combobox-item#value) when the item
|
|
100
|
+
* is clicked. The default is `true`, unless the combobox is
|
|
101
|
+
* [multi-selectable](https://ariakit.org/examples/combobox-multiple).
|
|
102
|
+
*
|
|
103
|
+
* Live examples:
|
|
104
|
+
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
105
|
+
*/
|
|
88
106
|
setValueOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
|
|
89
107
|
/**
|
|
90
108
|
* @default false
|
|
@@ -52,15 +52,15 @@ export interface ComboboxItemOptions<T extends As = "div"> extends CompositeItem
|
|
|
52
52
|
store?: ComboboxStore;
|
|
53
53
|
/**
|
|
54
54
|
* The value of the item. This will be rendered as the children by default.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
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
64
|
*
|
|
65
65
|
* Live examples:
|
|
66
66
|
* - [Animated Combobox](https://ariakit.org/examples/combobox-animated)
|
|
@@ -73,18 +73,36 @@ export interface ComboboxItemOptions<T extends As = "div"> extends CompositeItem
|
|
|
73
73
|
*/
|
|
74
74
|
value?: string;
|
|
75
75
|
/**
|
|
76
|
-
* Whether to hide the combobox when this item is clicked.
|
|
76
|
+
* Whether to hide the combobox when this item is clicked. By default, the
|
|
77
|
+
* combobox will be hidden when the user clicks on an item with a
|
|
78
|
+
* [`value`](https://ariakit.org/reference/combobox-item#value) prop, unless
|
|
79
|
+
* the combobox is
|
|
80
|
+
* [multi-selectable](https://ariakit.org/examples/combobox-multiple).
|
|
77
81
|
*
|
|
78
82
|
* Live examples:
|
|
79
83
|
* - [Combobox with links](https://ariakit.org/examples/combobox-links)
|
|
80
|
-
* @default true
|
|
81
84
|
*/
|
|
82
85
|
hideOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
|
|
83
86
|
/**
|
|
84
|
-
* Whether to set the
|
|
85
|
-
*
|
|
87
|
+
* Whether to set the
|
|
88
|
+
* [`selectedValue`](https://ariakit.org/reference/combobox-provider#selectedvalue)
|
|
89
|
+
* state using this item's
|
|
90
|
+
* [`value`](https://ariakit.org/reference/combobox-item#value) when the item
|
|
91
|
+
* is clicked.
|
|
86
92
|
* @default true
|
|
87
93
|
*/
|
|
94
|
+
selectValueOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
|
|
95
|
+
/**
|
|
96
|
+
* Whether to set the combobox
|
|
97
|
+
* [`value`](https://ariakit.org/reference/combobox-provider#value) state
|
|
98
|
+
* using this item's
|
|
99
|
+
* [`value`](https://ariakit.org/reference/combobox-item#value) when the item
|
|
100
|
+
* is clicked. The default is `true`, unless the combobox is
|
|
101
|
+
* [multi-selectable](https://ariakit.org/examples/combobox-multiple).
|
|
102
|
+
*
|
|
103
|
+
* Live examples:
|
|
104
|
+
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
105
|
+
*/
|
|
88
106
|
setValueOnClick?: BooleanOrCallback<MouseEvent<HTMLElement>>;
|
|
89
107
|
/**
|
|
90
108
|
* @default false
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _3WCBE6SUcjs = require('../__chunks/3WCBE6SU.cjs');
|
|
5
|
+
require('../__chunks/UZNYSPKP.cjs');
|
|
6
|
+
require('../__chunks/BZTDJIVT.cjs');
|
|
7
|
+
require('../__chunks/UVBBMANL.cjs');
|
|
8
|
+
require('../__chunks/F2A2ZQDB.cjs');
|
|
9
|
+
require('../__chunks/S6UU7NA4.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _RNZNGEL4cjs = require('../__chunks/RNZNGEL4.cjs');
|
|
15
|
+
require('../__chunks/EO6LS72H.cjs');
|
|
16
|
+
require('../__chunks/CJDHQUBR.cjs');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
21
|
+
|
|
22
|
+
// src/combobox/combobox-label.ts
|
|
23
|
+
var _misc = require('@ariakit/core/utils/misc');
|
|
24
|
+
var useComboboxLabel = _RNZNGEL4cjs.createHook.call(void 0,
|
|
25
|
+
(_a) => {
|
|
26
|
+
var _b = _a, { store } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, ["store"]);
|
|
27
|
+
const context = _3WCBE6SUcjs.useComboboxProviderContext.call(void 0, );
|
|
28
|
+
store = store || context;
|
|
29
|
+
_misc.invariant.call(void 0,
|
|
30
|
+
store,
|
|
31
|
+
process.env.NODE_ENV !== "production" && "ComboboxLabel must receive a `store` prop or be wrapped in a ComboboxProvider component."
|
|
32
|
+
);
|
|
33
|
+
const comboboxId = store.useState((state) => {
|
|
34
|
+
var _a2;
|
|
35
|
+
return (_a2 = state.baseElement) == null ? void 0 : _a2.id;
|
|
36
|
+
});
|
|
37
|
+
props = _AV6KTKLEcjs.__spreadValues.call(void 0, {
|
|
38
|
+
htmlFor: comboboxId
|
|
39
|
+
}, props);
|
|
40
|
+
return props;
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
var ComboboxLabel = _RNZNGEL4cjs.createMemoComponent.call(void 0,
|
|
44
|
+
(props) => {
|
|
45
|
+
const htmlProps = useComboboxLabel(props);
|
|
46
|
+
return _RNZNGEL4cjs.createElement.call(void 0, "label", htmlProps);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
if (process.env.NODE_ENV !== "production") {
|
|
50
|
+
ComboboxLabel.displayName = "ComboboxLabel";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
exports.ComboboxLabel = ComboboxLabel; exports.useComboboxLabel = useComboboxLabel;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { As, Options, Props } from "../utils/types.js";
|
|
2
|
+
import type { ComboboxStore } from "./combobox-store.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns props to create a `ComboboxLabel` component.
|
|
5
|
+
* @see https://ariakit.org/components/combobox
|
|
6
|
+
* @example
|
|
7
|
+
* ```jsx
|
|
8
|
+
* const store = useComboboxStore();
|
|
9
|
+
* const props = useComboboxLabel({ store });
|
|
10
|
+
* <Role {...props}>Favorite fruit</Role>
|
|
11
|
+
* <Combobox store={store} />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const useComboboxLabel: import("../utils/types.js").Hook<ComboboxLabelOptions<"label">>;
|
|
15
|
+
/**
|
|
16
|
+
* Renders a label for the [`Combobox`](https://ariakit.org/reference/combobox)
|
|
17
|
+
* component.
|
|
18
|
+
* @see https://ariakit.org/components/combobox
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx {2}
|
|
21
|
+
* <ComboboxProvider>
|
|
22
|
+
* <ComboboxLabel>Favorite fruit</ComboboxLabel>
|
|
23
|
+
* <Combobox />
|
|
24
|
+
* <ComboboxPopover>
|
|
25
|
+
* <ComboboxItem value="Apple" />
|
|
26
|
+
* <ComboboxItem value="Orange" />
|
|
27
|
+
* </ComboboxPopover>
|
|
28
|
+
* </ComboboxProvider>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const ComboboxLabel: import("../utils/types.js").Component<ComboboxLabelOptions<"label">>;
|
|
32
|
+
export interface ComboboxLabelOptions<T extends As = "label"> extends Options<T> {
|
|
33
|
+
/**
|
|
34
|
+
* Object returned by the
|
|
35
|
+
* [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
|
|
36
|
+
* hook. If not provided, the closest
|
|
37
|
+
* [`ComboboxProvider`](https://ariakit.org/reference/combobox-provider)
|
|
38
|
+
* component's context will be used.
|
|
39
|
+
*/
|
|
40
|
+
store?: ComboboxStore;
|
|
41
|
+
}
|
|
42
|
+
export type ComboboxLabelProps<T extends As = "label"> = Props<ComboboxLabelOptions<T>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { As, Options, Props } from "../utils/types.js";
|
|
2
|
+
import type { ComboboxStore } from "./combobox-store.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns props to create a `ComboboxLabel` component.
|
|
5
|
+
* @see https://ariakit.org/components/combobox
|
|
6
|
+
* @example
|
|
7
|
+
* ```jsx
|
|
8
|
+
* const store = useComboboxStore();
|
|
9
|
+
* const props = useComboboxLabel({ store });
|
|
10
|
+
* <Role {...props}>Favorite fruit</Role>
|
|
11
|
+
* <Combobox store={store} />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const useComboboxLabel: import("../utils/types.js").Hook<ComboboxLabelOptions<"label">>;
|
|
15
|
+
/**
|
|
16
|
+
* Renders a label for the [`Combobox`](https://ariakit.org/reference/combobox)
|
|
17
|
+
* component.
|
|
18
|
+
* @see https://ariakit.org/components/combobox
|
|
19
|
+
* @example
|
|
20
|
+
* ```jsx {2}
|
|
21
|
+
* <ComboboxProvider>
|
|
22
|
+
* <ComboboxLabel>Favorite fruit</ComboboxLabel>
|
|
23
|
+
* <Combobox />
|
|
24
|
+
* <ComboboxPopover>
|
|
25
|
+
* <ComboboxItem value="Apple" />
|
|
26
|
+
* <ComboboxItem value="Orange" />
|
|
27
|
+
* </ComboboxPopover>
|
|
28
|
+
* </ComboboxProvider>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const ComboboxLabel: import("../utils/types.js").Component<ComboboxLabelOptions<"label">>;
|
|
32
|
+
export interface ComboboxLabelOptions<T extends As = "label"> extends Options<T> {
|
|
33
|
+
/**
|
|
34
|
+
* Object returned by the
|
|
35
|
+
* [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
|
|
36
|
+
* hook. If not provided, the closest
|
|
37
|
+
* [`ComboboxProvider`](https://ariakit.org/reference/combobox-provider)
|
|
38
|
+
* component's context will be used.
|
|
39
|
+
*/
|
|
40
|
+
store?: ComboboxStore;
|
|
41
|
+
}
|
|
42
|
+
export type ComboboxLabelProps<T extends As = "label"> = Props<ComboboxLabelOptions<T>>;
|