@ariakit/react-core 0.3.12 → 0.3.14
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 +20 -0
- package/cjs/__chunks/{7HJPL3H2.cjs → I2KHXDVL.cjs} +4 -4
- package/cjs/__chunks/{VCDQISP7.cjs → N3XK7EAH.cjs} +7 -7
- package/cjs/__chunks/{KDG57VZV.cjs → OUEE5HOS.cjs} +3 -3
- package/cjs/__chunks/{EKB76T2U.cjs → ZL5DC555.cjs} +5 -5
- package/cjs/button/button.d.cts +1 -1
- package/cjs/button/button.d.ts +1 -1
- package/cjs/checkbox/checkbox-check.d.cts +17 -9
- package/cjs/checkbox/checkbox-check.d.ts +17 -9
- package/cjs/checkbox/checkbox-provider.cjs +2 -2
- package/cjs/checkbox/checkbox-provider.d.cts +4 -2
- package/cjs/checkbox/checkbox-provider.d.ts +4 -2
- package/cjs/checkbox/checkbox-store.d.cts +5 -3
- package/cjs/checkbox/checkbox-store.d.ts +5 -3
- package/cjs/checkbox/checkbox.d.cts +14 -9
- package/cjs/checkbox/checkbox.d.ts +14 -9
- package/cjs/collection/collection-item.d.cts +23 -9
- package/cjs/collection/collection-item.d.ts +23 -9
- package/cjs/collection/collection-provider.d.cts +2 -1
- package/cjs/collection/collection-provider.d.ts +2 -1
- package/cjs/collection/collection-renderer.d.cts +1 -1
- package/cjs/collection/collection-renderer.d.ts +1 -1
- package/cjs/collection/collection-store.d.cts +6 -3
- package/cjs/collection/collection-store.d.ts +6 -3
- package/cjs/collection/collection.d.cts +4 -3
- package/cjs/collection/collection.d.ts +4 -3
- package/cjs/combobox/combobox-cancel.d.cts +3 -2
- package/cjs/combobox/combobox-cancel.d.ts +3 -2
- package/cjs/combobox/combobox-disclosure.d.cts +7 -2
- package/cjs/combobox/combobox-disclosure.d.ts +7 -2
- package/cjs/combobox/combobox-group-label.d.cts +4 -4
- package/cjs/combobox/combobox-group-label.d.ts +4 -4
- package/cjs/combobox/combobox-group.d.cts +7 -3
- package/cjs/combobox/combobox-group.d.ts +7 -3
- package/cjs/combobox/combobox-item-check.d.cts +9 -16
- package/cjs/combobox/combobox-item-check.d.ts +9 -16
- package/cjs/combobox/combobox-item-value.d.cts +13 -8
- package/cjs/combobox/combobox-item-value.d.ts +13 -8
- package/cjs/combobox/combobox-item.d.cts +11 -9
- package/cjs/combobox/combobox-item.d.ts +11 -9
- package/cjs/combobox/combobox-list.d.cts +1 -4
- package/cjs/combobox/combobox-list.d.ts +1 -4
- package/cjs/combobox/combobox-popover.cjs +7 -7
- package/cjs/combobox/combobox-popover.d.cts +2 -3
- package/cjs/combobox/combobox-popover.d.ts +2 -3
- package/cjs/combobox/combobox-provider.d.cts +2 -1
- package/cjs/combobox/combobox-provider.d.ts +2 -1
- package/cjs/combobox/combobox-row.d.cts +6 -3
- package/cjs/combobox/combobox-row.d.ts +6 -3
- package/cjs/combobox/combobox-separator.d.cts +4 -3
- package/cjs/combobox/combobox-separator.d.ts +4 -3
- package/cjs/combobox/combobox-store.d.cts +11 -7
- package/cjs/combobox/combobox-store.d.ts +11 -7
- package/cjs/combobox/combobox.d.cts +45 -33
- package/cjs/combobox/combobox.d.ts +45 -33
- package/cjs/command/command.d.cts +1 -1
- package/cjs/command/command.d.ts +1 -1
- package/cjs/composite/composite-container.d.cts +18 -11
- package/cjs/composite/composite-container.d.ts +18 -11
- package/cjs/composite/composite-group-label.d.cts +18 -13
- package/cjs/composite/composite-group-label.d.ts +18 -13
- package/cjs/composite/composite-group.d.cts +20 -12
- package/cjs/composite/composite-group.d.ts +20 -12
- package/cjs/composite/composite-hover.d.cts +17 -8
- package/cjs/composite/composite-hover.d.ts +17 -8
- package/cjs/composite/composite-input.d.cts +15 -9
- package/cjs/composite/composite-input.d.ts +15 -9
- package/cjs/composite/composite-item.d.cts +49 -9
- package/cjs/composite/composite-item.d.ts +49 -9
- package/cjs/composite/composite-overflow.cjs +6 -6
- package/cjs/composite/composite-provider.d.cts +2 -1
- package/cjs/composite/composite-provider.d.ts +2 -1
- package/cjs/composite/composite-renderer.d.cts +1 -1
- package/cjs/composite/composite-renderer.d.ts +1 -1
- package/cjs/composite/composite-row.d.cts +26 -19
- package/cjs/composite/composite-row.d.ts +26 -19
- package/cjs/composite/composite-separator.d.cts +23 -10
- package/cjs/composite/composite-separator.d.ts +23 -10
- package/cjs/composite/composite-store.d.cts +3 -1
- package/cjs/composite/composite-store.d.ts +3 -1
- package/cjs/composite/composite-typeahead.d.cts +20 -8
- package/cjs/composite/composite-typeahead.d.ts +20 -8
- package/cjs/composite/composite.d.cts +65 -10
- package/cjs/composite/composite.d.ts +65 -10
- package/cjs/dialog/dialog-disclosure.d.cts +2 -1
- package/cjs/dialog/dialog-disclosure.d.ts +2 -1
- package/cjs/dialog/dialog-dismiss.d.cts +2 -1
- package/cjs/dialog/dialog-dismiss.d.ts +2 -1
- package/cjs/dialog/dialog-provider.d.cts +2 -1
- package/cjs/dialog/dialog-provider.d.ts +2 -1
- package/cjs/dialog/dialog-store.d.cts +3 -1
- package/cjs/dialog/dialog-store.d.ts +3 -1
- package/cjs/dialog/dialog.cjs +5 -5
- package/cjs/dialog/dialog.d.cts +51 -20
- package/cjs/dialog/dialog.d.ts +51 -20
- package/cjs/dialog/utils/disable-tree.cjs +3 -3
- package/cjs/dialog/utils/use-hide-on-interact-outside.cjs +1 -1
- package/cjs/disclosure/disclosure-content.d.cts +6 -5
- package/cjs/disclosure/disclosure-content.d.ts +6 -5
- package/cjs/disclosure/disclosure-provider.d.cts +2 -1
- package/cjs/disclosure/disclosure-provider.d.ts +2 -1
- package/cjs/disclosure/disclosure-store.d.cts +6 -4
- package/cjs/disclosure/disclosure-store.d.ts +6 -4
- package/cjs/disclosure/disclosure.d.cts +3 -2
- package/cjs/disclosure/disclosure.d.ts +3 -2
- package/cjs/focus-trap/focus-trap-region.d.cts +4 -2
- package/cjs/focus-trap/focus-trap-region.d.ts +4 -2
- package/cjs/focusable/focusable-container.d.cts +7 -5
- package/cjs/focusable/focusable-container.d.ts +7 -5
- package/cjs/focusable/focusable.d.cts +5 -2
- package/cjs/focusable/focusable.d.ts +5 -2
- package/cjs/form/form-checkbox.cjs +5 -5
- package/cjs/form/form-checkbox.d.cts +6 -4
- package/cjs/form/form-checkbox.d.ts +6 -4
- package/cjs/form/form-control.cjs +16 -0
- package/cjs/form/form-control.d.cts +93 -0
- package/cjs/form/form-control.d.ts +93 -0
- package/cjs/form/form-description.d.cts +14 -3
- package/cjs/form/form-description.d.ts +14 -3
- package/cjs/form/form-error.d.cts +11 -4
- package/cjs/form/form-error.d.ts +11 -4
- package/cjs/form/form-field.cjs +19 -4
- package/cjs/form/form-field.d.cts +16 -30
- package/cjs/form/form-field.d.ts +16 -30
- package/cjs/form/form-group-label.d.cts +6 -4
- package/cjs/form/form-group-label.d.ts +6 -4
- package/cjs/form/form-group.d.cts +6 -2
- package/cjs/form/form-group.d.ts +6 -2
- package/cjs/form/form-input.cjs +2 -2
- package/cjs/form/form-input.d.cts +7 -6
- package/cjs/form/form-input.d.ts +7 -6
- package/cjs/form/form-label.d.cts +18 -7
- package/cjs/form/form-label.d.ts +18 -7
- package/cjs/form/form-provider.d.cts +2 -1
- package/cjs/form/form-provider.d.ts +2 -1
- package/cjs/form/form-push.d.cts +17 -3
- package/cjs/form/form-push.d.ts +17 -3
- package/cjs/form/form-radio-group.d.cts +7 -2
- package/cjs/form/form-radio-group.d.ts +7 -2
- package/cjs/form/form-radio.cjs +2 -2
- package/cjs/form/form-radio.d.cts +8 -4
- package/cjs/form/form-radio.d.ts +8 -4
- package/cjs/form/form-remove.d.cts +17 -2
- package/cjs/form/form-remove.d.ts +17 -2
- package/cjs/form/form-reset.d.cts +5 -2
- package/cjs/form/form-reset.d.ts +5 -2
- package/cjs/form/form-store.d.cts +31 -14
- package/cjs/form/form-store.d.ts +31 -14
- package/cjs/form/form-submit.d.cts +8 -2
- package/cjs/form/form-submit.d.ts +8 -2
- package/cjs/form/form.d.cts +37 -11
- package/cjs/form/form.d.ts +37 -11
- package/cjs/group/group-label.d.cts +3 -2
- package/cjs/group/group-label.d.ts +3 -2
- package/cjs/group/group.d.cts +3 -1
- package/cjs/group/group.d.ts +3 -1
- package/cjs/heading/heading-level.d.cts +4 -2
- package/cjs/heading/heading-level.d.ts +4 -2
- package/cjs/heading/heading.d.cts +4 -3
- package/cjs/heading/heading.d.ts +4 -3
- package/cjs/hovercard/hovercard-anchor.d.cts +5 -2
- package/cjs/hovercard/hovercard-anchor.d.ts +5 -2
- package/cjs/hovercard/hovercard-arrow.d.cts +4 -2
- package/cjs/hovercard/hovercard-arrow.d.ts +4 -2
- package/cjs/hovercard/hovercard-description.d.cts +2 -2
- package/cjs/hovercard/hovercard-description.d.ts +2 -2
- package/cjs/hovercard/hovercard-disclosure.d.cts +1 -1
- package/cjs/hovercard/hovercard-disclosure.d.ts +1 -1
- package/cjs/hovercard/hovercard-dismiss.d.cts +3 -2
- package/cjs/hovercard/hovercard-dismiss.d.ts +3 -2
- package/cjs/hovercard/hovercard-heading.d.cts +2 -2
- package/cjs/hovercard/hovercard-heading.d.ts +2 -2
- package/cjs/hovercard/hovercard-provider.d.cts +2 -1
- package/cjs/hovercard/hovercard-provider.d.ts +2 -1
- package/cjs/hovercard/hovercard-store.d.cts +2 -1
- package/cjs/hovercard/hovercard-store.d.ts +2 -1
- package/cjs/hovercard/hovercard.cjs +7 -7
- package/cjs/hovercard/hovercard.d.cts +20 -8
- package/cjs/hovercard/hovercard.d.ts +20 -8
- package/cjs/menu/menu-arrow.d.cts +4 -2
- package/cjs/menu/menu-arrow.d.ts +4 -2
- package/cjs/menu/menu-bar.d.cts +1 -2
- package/cjs/menu/menu-bar.d.ts +1 -2
- package/cjs/menu/menu-button-arrow.d.cts +9 -4
- package/cjs/menu/menu-button-arrow.d.ts +9 -4
- package/cjs/menu/menu-button.d.cts +8 -7
- package/cjs/menu/menu-button.d.ts +8 -7
- package/cjs/menu/menu-description.d.cts +2 -2
- package/cjs/menu/menu-description.d.ts +2 -2
- package/cjs/menu/menu-dismiss.d.cts +3 -2
- package/cjs/menu/menu-dismiss.d.ts +3 -2
- package/cjs/menu/menu-group-label.d.cts +4 -4
- package/cjs/menu/menu-group-label.d.ts +4 -4
- package/cjs/menu/menu-group.d.cts +5 -2
- package/cjs/menu/menu-group.d.ts +5 -2
- package/cjs/menu/menu-heading.d.cts +3 -2
- package/cjs/menu/menu-heading.d.ts +3 -2
- package/cjs/menu/menu-item-check.d.cts +10 -18
- package/cjs/menu/menu-item-check.d.ts +10 -18
- package/cjs/menu/menu-item-checkbox.cjs +3 -3
- package/cjs/menu/menu-item-checkbox.d.cts +38 -6
- package/cjs/menu/menu-item-checkbox.d.ts +38 -6
- package/cjs/menu/menu-item-radio.d.cts +21 -9
- package/cjs/menu/menu-item-radio.d.ts +21 -9
- package/cjs/menu/menu-item.d.cts +10 -11
- package/cjs/menu/menu-item.d.ts +10 -11
- package/cjs/menu/menu-list.d.cts +7 -2
- package/cjs/menu/menu-list.d.ts +7 -2
- package/cjs/menu/menu-provider.d.cts +2 -1
- package/cjs/menu/menu-provider.d.ts +2 -1
- package/cjs/menu/menu-separator.d.cts +5 -2
- package/cjs/menu/menu-separator.d.ts +5 -2
- package/cjs/menu/menu-store.d.cts +18 -7
- package/cjs/menu/menu-store.d.ts +18 -7
- package/cjs/menu/menu.cjs +8 -8
- package/cjs/menu/menu.d.cts +8 -2
- package/cjs/menu/menu.d.ts +8 -2
- package/cjs/menubar/menubar-provider.d.cts +2 -1
- package/cjs/menubar/menubar-provider.d.ts +2 -1
- package/cjs/menubar/menubar-store.d.cts +3 -1
- package/cjs/menubar/menubar-store.d.ts +3 -1
- package/cjs/menubar/menubar.d.cts +3 -2
- package/cjs/menubar/menubar.d.ts +3 -2
- package/cjs/popover/popover-anchor.d.cts +4 -3
- package/cjs/popover/popover-anchor.d.ts +4 -3
- package/cjs/popover/popover-arrow.d.cts +6 -2
- package/cjs/popover/popover-arrow.d.ts +6 -2
- package/cjs/popover/popover-description.d.cts +1 -1
- package/cjs/popover/popover-description.d.ts +1 -1
- package/cjs/popover/popover-disclosure-arrow.d.cts +6 -4
- package/cjs/popover/popover-disclosure-arrow.d.ts +6 -4
- package/cjs/popover/popover-disclosure.d.cts +3 -2
- package/cjs/popover/popover-disclosure.d.ts +3 -2
- package/cjs/popover/popover-dismiss.d.cts +1 -1
- package/cjs/popover/popover-dismiss.d.ts +1 -1
- package/cjs/popover/popover-heading.d.cts +1 -1
- package/cjs/popover/popover-heading.d.ts +1 -1
- package/cjs/popover/popover-provider.d.cts +2 -1
- package/cjs/popover/popover-provider.d.ts +2 -1
- package/cjs/popover/popover-store.d.cts +2 -1
- package/cjs/popover/popover-store.d.ts +2 -1
- package/cjs/popover/popover.cjs +6 -6
- package/cjs/popover/popover.d.cts +8 -3
- package/cjs/popover/popover.d.ts +8 -3
- package/cjs/portal/portal.d.cts +18 -1
- package/cjs/portal/portal.d.ts +18 -1
- package/cjs/radio/radio-group.d.cts +8 -6
- package/cjs/radio/radio-group.d.ts +8 -6
- package/cjs/radio/radio-provider.d.cts +2 -1
- package/cjs/radio/radio-provider.d.ts +2 -1
- package/cjs/radio/radio-store.d.cts +6 -2
- package/cjs/radio/radio-store.d.ts +6 -2
- package/cjs/radio/radio.d.cts +21 -13
- package/cjs/radio/radio.d.ts +21 -13
- package/cjs/role/role.d.cts +3 -3
- package/cjs/role/role.d.ts +3 -3
- package/cjs/select/select-group-label.d.cts +2 -2
- package/cjs/select/select-group-label.d.ts +2 -2
- package/cjs/select/select-group.d.cts +4 -1
- package/cjs/select/select-group.d.ts +4 -1
- package/cjs/select/select-item-check.d.cts +9 -15
- package/cjs/select/select-item-check.d.ts +9 -15
- package/cjs/select/select-item.d.cts +1 -5
- package/cjs/select/select-item.d.ts +1 -5
- package/cjs/select/select-list.d.cts +7 -4
- package/cjs/select/select-list.d.ts +7 -4
- package/cjs/select/select-popover.cjs +7 -7
- package/cjs/select/select-provider.d.cts +2 -1
- package/cjs/select/select-provider.d.ts +2 -1
- package/cjs/select/select-renderer.d.cts +1 -1
- package/cjs/select/select-renderer.d.ts +1 -1
- package/cjs/select/select-row.d.cts +4 -1
- package/cjs/select/select-row.d.ts +4 -1
- package/cjs/select/select-separator.d.cts +2 -1
- package/cjs/select/select-separator.d.ts +2 -1
- package/cjs/select/select-store.d.cts +17 -10
- package/cjs/select/select-store.d.ts +17 -10
- package/cjs/select/select.cjs +8 -6
- package/cjs/select/select.d.cts +25 -15
- package/cjs/select/select.d.ts +25 -15
- package/cjs/tab/tab-list.d.cts +2 -1
- package/cjs/tab/tab-list.d.ts +2 -1
- package/cjs/tab/tab-panel.d.cts +19 -3
- package/cjs/tab/tab-panel.d.ts +19 -3
- package/cjs/tab/tab-provider.d.cts +1 -1
- package/cjs/tab/tab-provider.d.ts +1 -1
- package/cjs/tab/tab-store.d.cts +3 -1
- package/cjs/tab/tab-store.d.ts +3 -1
- package/cjs/tab/tab.d.cts +2 -2
- package/cjs/tab/tab.d.ts +2 -2
- package/cjs/toolbar/toolbar-container.d.cts +1 -1
- package/cjs/toolbar/toolbar-container.d.ts +1 -1
- package/cjs/toolbar/toolbar-input.d.cts +2 -1
- package/cjs/toolbar/toolbar-input.d.ts +2 -1
- package/cjs/toolbar/toolbar-item.d.cts +2 -1
- package/cjs/toolbar/toolbar-item.d.ts +2 -1
- package/cjs/toolbar/toolbar-provider.d.cts +2 -1
- package/cjs/toolbar/toolbar-provider.d.ts +2 -1
- package/cjs/toolbar/toolbar-separator.d.cts +2 -1
- package/cjs/toolbar/toolbar-separator.d.ts +2 -1
- package/cjs/toolbar/toolbar-store.d.cts +3 -1
- package/cjs/toolbar/toolbar-store.d.ts +3 -1
- package/cjs/tooltip/tooltip-anchor.d.cts +3 -3
- package/cjs/tooltip/tooltip-anchor.d.ts +3 -3
- package/cjs/tooltip/tooltip-arrow.d.cts +1 -1
- package/cjs/tooltip/tooltip-arrow.d.ts +1 -1
- package/cjs/tooltip/tooltip-provider.d.cts +2 -1
- package/cjs/tooltip/tooltip-provider.d.ts +2 -1
- package/cjs/tooltip/tooltip-store.d.cts +3 -1
- package/cjs/tooltip/tooltip-store.d.ts +3 -1
- package/cjs/tooltip/tooltip.cjs +8 -8
- package/cjs/tooltip/tooltip.d.cts +3 -1
- package/cjs/tooltip/tooltip.d.ts +3 -1
- package/esm/__chunks/{FS2EVEJO.js → 4GO43MST.js} +8 -8
- package/esm/__chunks/{A6XC27R5.js → IRX7SFUJ.js} +1 -1
- package/esm/__chunks/{PGAEII2Q.js → NERBASET.js} +4 -4
- package/esm/__chunks/{EPBRINPG.js → QWSZGSIG.js} +2 -2
- package/esm/button/button.d.ts +1 -1
- package/esm/checkbox/checkbox-check.d.ts +17 -9
- package/esm/checkbox/checkbox-provider.d.ts +4 -2
- package/esm/checkbox/checkbox-provider.js +3 -3
- package/esm/checkbox/checkbox-store.d.ts +5 -3
- package/esm/checkbox/checkbox.d.ts +14 -9
- package/esm/collection/collection-item.d.ts +23 -9
- package/esm/collection/collection-provider.d.ts +2 -1
- package/esm/collection/collection-renderer.d.ts +1 -1
- package/esm/collection/collection-store.d.ts +6 -3
- package/esm/collection/collection.d.ts +4 -3
- package/esm/combobox/combobox-cancel.d.ts +3 -2
- package/esm/combobox/combobox-disclosure.d.ts +7 -2
- package/esm/combobox/combobox-group-label.d.ts +4 -4
- package/esm/combobox/combobox-group.d.ts +7 -3
- package/esm/combobox/combobox-item-check.d.ts +9 -16
- package/esm/combobox/combobox-item-value.d.ts +13 -8
- package/esm/combobox/combobox-item.d.ts +11 -9
- package/esm/combobox/combobox-list.d.ts +1 -4
- package/esm/combobox/combobox-popover.d.ts +2 -3
- package/esm/combobox/combobox-popover.js +5 -5
- package/esm/combobox/combobox-provider.d.ts +2 -1
- package/esm/combobox/combobox-row.d.ts +6 -3
- package/esm/combobox/combobox-separator.d.ts +4 -3
- package/esm/combobox/combobox-store.d.ts +11 -7
- package/esm/combobox/combobox.d.ts +45 -33
- package/esm/command/command.d.ts +1 -1
- package/esm/composite/composite-container.d.ts +18 -11
- package/esm/composite/composite-group-label.d.ts +18 -13
- package/esm/composite/composite-group.d.ts +20 -12
- package/esm/composite/composite-hover.d.ts +17 -8
- package/esm/composite/composite-input.d.ts +15 -9
- package/esm/composite/composite-item.d.ts +49 -9
- package/esm/composite/composite-overflow.js +5 -5
- package/esm/composite/composite-provider.d.ts +2 -1
- package/esm/composite/composite-renderer.d.ts +1 -1
- package/esm/composite/composite-row.d.ts +26 -19
- package/esm/composite/composite-separator.d.ts +23 -10
- package/esm/composite/composite-store.d.ts +3 -1
- package/esm/composite/composite-typeahead.d.ts +20 -8
- package/esm/composite/composite.d.ts +65 -10
- package/esm/dialog/dialog-disclosure.d.ts +2 -1
- package/esm/dialog/dialog-dismiss.d.ts +2 -1
- package/esm/dialog/dialog-provider.d.ts +2 -1
- package/esm/dialog/dialog-store.d.ts +3 -1
- package/esm/dialog/dialog.d.ts +51 -20
- package/esm/dialog/dialog.js +4 -4
- package/esm/dialog/utils/disable-tree.js +2 -2
- package/esm/dialog/utils/use-hide-on-interact-outside.js +1 -1
- package/esm/disclosure/disclosure-content.d.ts +6 -5
- package/esm/disclosure/disclosure-provider.d.ts +2 -1
- package/esm/disclosure/disclosure-store.d.ts +6 -4
- package/esm/disclosure/disclosure.d.ts +3 -2
- package/esm/focus-trap/focus-trap-region.d.ts +4 -2
- package/esm/focusable/focusable-container.d.ts +7 -5
- package/esm/focusable/focusable.d.ts +5 -2
- package/esm/form/form-checkbox.d.ts +6 -4
- package/esm/form/form-checkbox.js +6 -6
- package/esm/form/form-control.d.ts +93 -0
- package/esm/form/form-control.js +16 -0
- package/esm/form/form-description.d.ts +14 -3
- package/esm/form/form-error.d.ts +11 -4
- package/esm/form/form-field.d.ts +16 -30
- package/esm/form/form-field.js +19 -4
- package/esm/form/form-group-label.d.ts +6 -4
- package/esm/form/form-group.d.ts +6 -2
- package/esm/form/form-input.d.ts +7 -6
- package/esm/form/form-input.js +3 -3
- package/esm/form/form-label.d.ts +18 -7
- package/esm/form/form-provider.d.ts +2 -1
- package/esm/form/form-push.d.ts +17 -3
- package/esm/form/form-radio-group.d.ts +7 -2
- package/esm/form/form-radio.d.ts +8 -4
- package/esm/form/form-radio.js +3 -3
- package/esm/form/form-remove.d.ts +17 -2
- package/esm/form/form-reset.d.ts +5 -2
- package/esm/form/form-store.d.ts +31 -14
- package/esm/form/form-submit.d.ts +8 -2
- package/esm/form/form.d.ts +37 -11
- package/esm/group/group-label.d.ts +3 -2
- package/esm/group/group.d.ts +3 -1
- package/esm/heading/heading-level.d.ts +4 -2
- package/esm/heading/heading.d.ts +4 -3
- package/esm/hovercard/hovercard-anchor.d.ts +5 -2
- package/esm/hovercard/hovercard-arrow.d.ts +4 -2
- package/esm/hovercard/hovercard-description.d.ts +2 -2
- package/esm/hovercard/hovercard-disclosure.d.ts +1 -1
- package/esm/hovercard/hovercard-dismiss.d.ts +3 -2
- package/esm/hovercard/hovercard-heading.d.ts +2 -2
- package/esm/hovercard/hovercard-provider.d.ts +2 -1
- package/esm/hovercard/hovercard-store.d.ts +2 -1
- package/esm/hovercard/hovercard.d.ts +20 -8
- package/esm/hovercard/hovercard.js +6 -6
- package/esm/menu/menu-arrow.d.ts +4 -2
- package/esm/menu/menu-bar.d.ts +1 -2
- package/esm/menu/menu-button-arrow.d.ts +9 -4
- package/esm/menu/menu-button.d.ts +8 -7
- package/esm/menu/menu-description.d.ts +2 -2
- package/esm/menu/menu-dismiss.d.ts +3 -2
- package/esm/menu/menu-group-label.d.ts +4 -4
- package/esm/menu/menu-group.d.ts +5 -2
- package/esm/menu/menu-heading.d.ts +3 -2
- package/esm/menu/menu-item-check.d.ts +10 -18
- package/esm/menu/menu-item-checkbox.d.ts +38 -6
- package/esm/menu/menu-item-checkbox.js +3 -3
- package/esm/menu/menu-item-radio.d.ts +21 -9
- package/esm/menu/menu-item.d.ts +10 -11
- package/esm/menu/menu-list.d.ts +7 -2
- package/esm/menu/menu-provider.d.ts +2 -1
- package/esm/menu/menu-separator.d.ts +5 -2
- package/esm/menu/menu-store.d.ts +18 -7
- package/esm/menu/menu.d.ts +8 -2
- package/esm/menu/menu.js +6 -6
- package/esm/menubar/menubar-provider.d.ts +2 -1
- package/esm/menubar/menubar-store.d.ts +3 -1
- package/esm/menubar/menubar.d.ts +3 -2
- package/esm/popover/popover-anchor.d.ts +4 -3
- package/esm/popover/popover-arrow.d.ts +6 -2
- package/esm/popover/popover-description.d.ts +1 -1
- package/esm/popover/popover-disclosure-arrow.d.ts +6 -4
- package/esm/popover/popover-disclosure.d.ts +3 -2
- package/esm/popover/popover-dismiss.d.ts +1 -1
- package/esm/popover/popover-heading.d.ts +1 -1
- package/esm/popover/popover-provider.d.ts +2 -1
- package/esm/popover/popover-store.d.ts +2 -1
- package/esm/popover/popover.d.ts +8 -3
- package/esm/popover/popover.js +5 -5
- package/esm/portal/portal.d.ts +18 -1
- package/esm/radio/radio-group.d.ts +8 -6
- package/esm/radio/radio-provider.d.ts +2 -1
- package/esm/radio/radio-store.d.ts +6 -2
- package/esm/radio/radio.d.ts +21 -13
- package/esm/role/role.d.ts +3 -3
- package/esm/select/select-group-label.d.ts +2 -2
- package/esm/select/select-group.d.ts +4 -1
- package/esm/select/select-item-check.d.ts +9 -15
- package/esm/select/select-item.d.ts +1 -5
- package/esm/select/select-list.d.ts +7 -4
- package/esm/select/select-popover.js +5 -5
- package/esm/select/select-provider.d.ts +2 -1
- package/esm/select/select-renderer.d.ts +1 -1
- package/esm/select/select-row.d.ts +4 -1
- package/esm/select/select-separator.d.ts +2 -1
- package/esm/select/select-store.d.ts +17 -10
- package/esm/select/select.d.ts +25 -15
- package/esm/select/select.js +8 -6
- package/esm/tab/tab-list.d.ts +2 -1
- package/esm/tab/tab-panel.d.ts +19 -3
- package/esm/tab/tab-provider.d.ts +1 -1
- package/esm/tab/tab-store.d.ts +3 -1
- package/esm/tab/tab.d.ts +2 -2
- package/esm/toolbar/toolbar-container.d.ts +1 -1
- package/esm/toolbar/toolbar-input.d.ts +2 -1
- package/esm/toolbar/toolbar-item.d.ts +2 -1
- package/esm/toolbar/toolbar-provider.d.ts +2 -1
- package/esm/toolbar/toolbar-separator.d.ts +2 -1
- package/esm/toolbar/toolbar-store.d.ts +3 -1
- package/esm/tooltip/tooltip-anchor.d.ts +3 -3
- package/esm/tooltip/tooltip-arrow.d.ts +1 -1
- package/esm/tooltip/tooltip-provider.d.ts +2 -1
- package/esm/tooltip/tooltip-store.d.ts +3 -1
- package/esm/tooltip/tooltip.d.ts +3 -1
- package/esm/tooltip/tooltip.js +6 -6
- package/form/form-control/package.json +8 -0
- package/package.json +9 -2
- package/cjs/__chunks/{NKR65BKC.cjs → KSPMHEYZ.cjs} +3 -3
- package/esm/__chunks/{CLF4PQ7T.js → TQYOGOE2.js} +3 -3
package/cjs/tooltip/tooltip.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _I2KHXDVLcjs = require('../__chunks/I2KHXDVL.cjs');
|
|
5
5
|
require('../__chunks/KXQOQQ5B.cjs');
|
|
6
|
-
require('../__chunks/
|
|
6
|
+
require('../__chunks/OUEE5HOS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _ZL5DC555cjs = require('../__chunks/ZL5DC555.cjs');
|
|
10
10
|
require('../__chunks/WZ3DRKGP.cjs');
|
|
11
|
-
require('../__chunks/
|
|
11
|
+
require('../__chunks/KSPMHEYZ.cjs');
|
|
12
12
|
require('../__chunks/PZL34OVO.cjs');
|
|
13
13
|
require('../__chunks/344F3DYO.cjs');
|
|
14
14
|
require('../__chunks/KREY6HXD.cjs');
|
|
@@ -16,11 +16,11 @@ require('../__chunks/5ZOCN23X.cjs');
|
|
|
16
16
|
require('../__chunks/JVDUGICD.cjs');
|
|
17
17
|
require('../__chunks/VV6WA3I6.cjs');
|
|
18
18
|
require('../__chunks/7YLCVXZ7.cjs');
|
|
19
|
+
require('../__chunks/5GTNIPQ6.cjs');
|
|
19
20
|
require('../__chunks/7TN63K2T.cjs');
|
|
21
|
+
require('../__chunks/V24PR4PW.cjs');
|
|
20
22
|
require('../__chunks/6IUEXB4L.cjs');
|
|
21
23
|
require('../__chunks/JF225FQ5.cjs');
|
|
22
|
-
require('../__chunks/5GTNIPQ6.cjs');
|
|
23
|
-
require('../__chunks/V24PR4PW.cjs');
|
|
24
24
|
require('../__chunks/7566TIRW.cjs');
|
|
25
25
|
require('../__chunks/J3OG6T3B.cjs');
|
|
26
26
|
require('../__chunks/65LGW5LY.cjs');
|
|
@@ -94,7 +94,7 @@ var useTooltip = _RNZNGEL4cjs.createHook.call(void 0,
|
|
|
94
94
|
(state) => state.type === "description" ? "tooltip" : "none"
|
|
95
95
|
);
|
|
96
96
|
props = _AV6KTKLEcjs.__spreadValues.call(void 0, { role }, props);
|
|
97
|
-
props =
|
|
97
|
+
props = _I2KHXDVLcjs.useHovercard.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
98
98
|
store,
|
|
99
99
|
portal,
|
|
100
100
|
gutter,
|
|
@@ -123,7 +123,7 @@ var useTooltip = _RNZNGEL4cjs.createHook.call(void 0,
|
|
|
123
123
|
return props;
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
|
-
var Tooltip =
|
|
126
|
+
var Tooltip = _ZL5DC555cjs.createDialogComponent.call(void 0,
|
|
127
127
|
_RNZNGEL4cjs.createComponent.call(void 0, (props) => {
|
|
128
128
|
const htmlProps = useTooltip(props);
|
|
129
129
|
return _RNZNGEL4cjs.createElement.call(void 0, "div", htmlProps);
|
|
@@ -14,7 +14,9 @@ import type { TooltipStore } from "./tooltip-store.js";
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const useTooltip: import("../utils/types.js").Hook<TooltipOptions<"div">>;
|
|
16
16
|
/**
|
|
17
|
-
* Renders a tooltip element
|
|
17
|
+
* Renders a tooltip element that visually describes a
|
|
18
|
+
* [`TooltipAnchor`](https://ariakit.org/reference/tooltip-anchor) when it
|
|
19
|
+
* receives focus or is hovered.
|
|
18
20
|
* @see https://ariakit.org/components/tooltip
|
|
19
21
|
* @example
|
|
20
22
|
* ```jsx {3}
|
package/cjs/tooltip/tooltip.d.ts
CHANGED
|
@@ -14,7 +14,9 @@ import type { TooltipStore } from "./tooltip-store.js";
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const useTooltip: import("../utils/types.js").Hook<TooltipOptions<"div">>;
|
|
16
16
|
/**
|
|
17
|
-
* Renders a tooltip element
|
|
17
|
+
* Renders a tooltip element that visually describes a
|
|
18
|
+
* [`TooltipAnchor`](https://ariakit.org/reference/tooltip-anchor) when it
|
|
19
|
+
* receives focus or is hovered.
|
|
18
20
|
* @see https://ariakit.org/components/tooltip
|
|
19
21
|
* @example
|
|
20
22
|
* ```jsx {3}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
__spreadValues
|
|
23
23
|
} from "./4R3V3JGP.js";
|
|
24
24
|
|
|
25
|
-
// src/form/form-
|
|
25
|
+
// src/form/form-control.ts
|
|
26
26
|
import { useCallback, useRef } from "react";
|
|
27
27
|
import { getDocument } from "@ariakit/core/utils/dom";
|
|
28
28
|
import { cx, invariant } from "@ariakit/core/utils/misc";
|
|
@@ -43,7 +43,7 @@ function useItem(store, name, type) {
|
|
|
43
43
|
(state) => state.items.find((item) => item.type === type && item.name === name)
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var useFormControl = createHook(
|
|
47
47
|
(_a) => {
|
|
48
48
|
var _b = _a, {
|
|
49
49
|
store,
|
|
@@ -60,7 +60,7 @@ var useFormField = createHook(
|
|
|
60
60
|
store = store || context;
|
|
61
61
|
invariant(
|
|
62
62
|
store,
|
|
63
|
-
process.env.NODE_ENV !== "production" && "
|
|
63
|
+
process.env.NODE_ENV !== "production" && "FormControl must be wrapped in a Form component."
|
|
64
64
|
);
|
|
65
65
|
const name = `${nameProp}`;
|
|
66
66
|
const id = useId(props.id);
|
|
@@ -118,15 +118,15 @@ var useFormField = createHook(
|
|
|
118
118
|
return props;
|
|
119
119
|
}
|
|
120
120
|
);
|
|
121
|
-
var
|
|
122
|
-
const htmlProps =
|
|
121
|
+
var FormControl = createMemoComponent((props) => {
|
|
122
|
+
const htmlProps = useFormControl(props);
|
|
123
123
|
return createElement("input", htmlProps);
|
|
124
124
|
});
|
|
125
125
|
if (process.env.NODE_ENV !== "production") {
|
|
126
|
-
|
|
126
|
+
FormControl.displayName = "FormControl";
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
useFormControl,
|
|
131
|
+
FormControl
|
|
132
132
|
};
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
disableTree,
|
|
7
7
|
disableTreeOutside
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./TQYOGOE2.js";
|
|
9
9
|
import {
|
|
10
10
|
usePreventBodyScroll
|
|
11
11
|
} from "./6BJGLK2C.js";
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
isElementMarked,
|
|
20
20
|
markTreeOutside
|
|
21
21
|
} from "./TL67WVI6.js";
|
|
22
|
-
import {
|
|
23
|
-
prependHiddenDismiss
|
|
24
|
-
} from "./6GXEOXGT.js";
|
|
25
22
|
import {
|
|
26
23
|
createWalkTreeSnapshot
|
|
27
24
|
} from "./72E5EPFF.js";
|
|
25
|
+
import {
|
|
26
|
+
prependHiddenDismiss
|
|
27
|
+
} from "./6GXEOXGT.js";
|
|
28
28
|
import {
|
|
29
29
|
useFocusableContainer
|
|
30
30
|
} from "./HPP6CWMY.js";
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./YMV43K4F.js";
|
|
7
7
|
import {
|
|
8
8
|
usePopover
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./IRX7SFUJ.js";
|
|
10
10
|
import {
|
|
11
11
|
createDialogComponent
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./NERBASET.js";
|
|
13
13
|
import {
|
|
14
14
|
HovercardScopedContextProvider,
|
|
15
15
|
useHovercardProviderContext
|
package/esm/button/button.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const useButton: import("../utils/types.js").Hook<ButtonOptions<"
|
|
|
18
18
|
* @see https://ariakit.org/components/button
|
|
19
19
|
* @example
|
|
20
20
|
* ```jsx
|
|
21
|
-
* <Button
|
|
21
|
+
* <Button>Button</Button>
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
export declare const Button: import("../utils/types.js").Component<ButtonOptions<"button">>;
|
|
@@ -12,7 +12,14 @@ import type { CheckboxStore } from "./checkbox-store.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const useCheckboxCheck: import("../utils/types.js").Hook<CheckboxCheckOptions<"span">>;
|
|
14
14
|
/**
|
|
15
|
-
* Renders a
|
|
15
|
+
* Renders a checkmark icon when the
|
|
16
|
+
* [`checked`](https://ariakit.org/reference/checkbox-check#checked) prop is
|
|
17
|
+
* `true`. The icon can be overridden by providing a different one as children.
|
|
18
|
+
*
|
|
19
|
+
* When rendered inside a [`Checkbox`](https://ariakit.org/reference/checkbox)
|
|
20
|
+
* component, the
|
|
21
|
+
* [`checked`](https://ariakit.org/reference/checkbox-check#checked) prop is
|
|
22
|
+
* automatically derived from the context.
|
|
16
23
|
* @see https://ariakit.org/components/checkbox
|
|
17
24
|
* @example
|
|
18
25
|
* ```jsx
|
|
@@ -22,18 +29,19 @@ export declare const useCheckboxCheck: import("../utils/types.js").Hook<Checkbox
|
|
|
22
29
|
export declare const CheckboxCheck: import("../utils/types.js").Component<CheckboxCheckOptions<"span">>;
|
|
23
30
|
export interface CheckboxCheckOptions<T extends As = "span"> extends Options<T> {
|
|
24
31
|
/**
|
|
25
|
-
* Object returned by the
|
|
26
|
-
* `
|
|
27
|
-
*
|
|
32
|
+
* Object returned by the
|
|
33
|
+
* [`useCheckboxStore`](https://ariakit.org/reference/use-checkbox-store)
|
|
34
|
+
* hook.
|
|
28
35
|
*/
|
|
29
36
|
store?: CheckboxStore;
|
|
30
37
|
/**
|
|
31
|
-
* Determines if the
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* parent [`Checkbox`](https://ariakit.org/reference/checkbox) component.
|
|
38
|
+
* Determines if the checkmark should be rendered. This value is automatically
|
|
39
|
+
* derived from the context when it exists. Manually setting this prop will
|
|
40
|
+
* supersede the derived value.
|
|
35
41
|
*
|
|
36
|
-
*
|
|
42
|
+
* Live examples:
|
|
43
|
+
* - [Submenu with
|
|
44
|
+
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
37
45
|
*/
|
|
38
46
|
checked?: boolean;
|
|
39
47
|
}
|
|
@@ -3,8 +3,10 @@ import type { PickRequired } from "@ariakit/core/utils/types";
|
|
|
3
3
|
import type { CheckboxStoreProps, CheckboxStoreValue } from "./checkbox-store.js";
|
|
4
4
|
type Value = CheckboxStoreValue;
|
|
5
5
|
/**
|
|
6
|
-
* Provides a checkbox store
|
|
7
|
-
* group of checkboxes that share the same
|
|
6
|
+
* Provides a checkbox store for its descendants. This comes in handy when
|
|
7
|
+
* creating a group of checkboxes that share the same state. `CheckboxProvider`
|
|
8
|
+
* can efficiently manage the value of a checkbox, whether it's a single string,
|
|
9
|
+
* number, or boolean value, or an array of such values.
|
|
8
10
|
* @see https://ariakit.org/components/checkbox
|
|
9
11
|
* @example
|
|
10
12
|
* ```jsx
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
CheckboxContextProvider
|
|
4
|
-
} from "../__chunks/VPR2WHQV.js";
|
|
5
2
|
import {
|
|
6
3
|
useCheckboxStore
|
|
7
4
|
} from "../__chunks/JIZ5C2JK.js";
|
|
5
|
+
import {
|
|
6
|
+
CheckboxContextProvider
|
|
7
|
+
} from "../__chunks/VPR2WHQV.js";
|
|
8
8
|
import "../__chunks/3ORBWXWF.js";
|
|
9
9
|
import "../__chunks/EKQEJRUF.js";
|
|
10
10
|
import "../__chunks/6O5OEQGF.js";
|
|
@@ -3,7 +3,8 @@ import type { PickRequired } from "@ariakit/core/utils/types";
|
|
|
3
3
|
import type { Store } from "../utils/store.js";
|
|
4
4
|
export declare function useCheckboxStoreProps<T extends Core.CheckboxStore>(store: T, update: () => void, props: CheckboxStoreProps): T;
|
|
5
5
|
/**
|
|
6
|
-
* Creates a checkbox store
|
|
6
|
+
* Creates a checkbox store to conveniently manage a checkbox value,
|
|
7
|
+
* whether it's a string, number, boolean, or an array of strings or numbers.
|
|
7
8
|
* @see https://ariakit.org/components/checkbox
|
|
8
9
|
* @example
|
|
9
10
|
* ```jsx
|
|
@@ -18,8 +19,9 @@ export type CheckboxStoreState<T extends CheckboxStoreValue = CheckboxStoreValue
|
|
|
18
19
|
export type CheckboxStoreFunctions<T extends CheckboxStoreValue = CheckboxStoreValue> = Core.CheckboxStoreFunctions<T>;
|
|
19
20
|
export interface CheckboxStoreOptions<T extends CheckboxStoreValue = CheckboxStoreValue> extends Core.CheckboxStoreOptions<T> {
|
|
20
21
|
/**
|
|
21
|
-
* A callback that gets called when the
|
|
22
|
-
*
|
|
22
|
+
* A callback that gets called when the
|
|
23
|
+
* [`value`](https://ariakit.org/reference/checkbox-provider#value) state
|
|
24
|
+
* changes.
|
|
23
25
|
* @example
|
|
24
26
|
* function MyCheckbox({ value, onChange }) {
|
|
25
27
|
* const checkbox = useCheckboxStore({ value, setValue: onChange });
|
|
@@ -40,18 +40,21 @@ export interface CheckboxOptions<T extends As = "input"> extends CommandOptions<
|
|
|
40
40
|
store?: CheckboxStore;
|
|
41
41
|
/**
|
|
42
42
|
* The native `name` attribute.
|
|
43
|
+
*
|
|
44
|
+
* Live examples:
|
|
45
|
+
* - [MenuItemCheckbox](https://ariakit.org/examples/menu-item-checkbox)
|
|
43
46
|
*/
|
|
44
47
|
name?: string;
|
|
45
48
|
/**
|
|
46
49
|
* The value of the checkbox. This is useful when the same checkbox store is
|
|
47
|
-
* used for multiple `Checkbox`
|
|
48
|
-
* array of checked values.
|
|
50
|
+
* used for multiple [`Checkbox`](https://ariakit.org/reference/checkbox)
|
|
51
|
+
* elements, in which case the value will be an array of checked values.
|
|
49
52
|
*
|
|
50
53
|
* Live examples:
|
|
51
54
|
* - [Checkbox group](https://ariakit.org/examples/checkbox-group)
|
|
52
55
|
* - [MenuItemCheckbox](https://ariakit.org/examples/menu-item-checkbox)
|
|
53
56
|
* @example
|
|
54
|
-
* ```jsx
|
|
57
|
+
* ```jsx "value"
|
|
55
58
|
* <CheckboxProvider defaultValue={["Apple", "Orange"]}>
|
|
56
59
|
* <Checkbox value="Apple" />
|
|
57
60
|
* <Checkbox value="Orange" />
|
|
@@ -61,18 +64,20 @@ export interface CheckboxOptions<T extends As = "input"> extends CommandOptions<
|
|
|
61
64
|
*/
|
|
62
65
|
value?: InputHTMLAttributes<HTMLInputElement>["value"];
|
|
63
66
|
/**
|
|
64
|
-
* The default
|
|
65
|
-
* `checked` or the
|
|
67
|
+
* The default checked state of the checkbox. This prop is ignored if the
|
|
68
|
+
* [`checked`](https://ariakit.org/reference/checkbox#checked) or the
|
|
69
|
+
* [`store`](https://ariakit.org/reference/checkbox#store) props are provided.
|
|
66
70
|
*/
|
|
67
71
|
defaultChecked?: "mixed" | boolean;
|
|
68
72
|
/**
|
|
69
|
-
* The
|
|
70
|
-
* from `store` prop, if
|
|
71
|
-
* checkbox is partially
|
|
73
|
+
* The checked state of the checkbox. This will override the value inferred
|
|
74
|
+
* from [`store`](https://ariakit.org/reference/checkbox#store) prop, if
|
|
75
|
+
* provided. This can be `"mixed"` to indicate that the checkbox is partially
|
|
76
|
+
* checked.
|
|
72
77
|
*/
|
|
73
78
|
checked?: "mixed" | boolean;
|
|
74
79
|
/**
|
|
75
|
-
* A function that is called when the checkbox's
|
|
80
|
+
* A function that is called when the checkbox's checked state changes.
|
|
76
81
|
*/
|
|
77
82
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
78
83
|
}
|
|
@@ -17,8 +17,10 @@ import type { CollectionStore } from "./collection-store.js";
|
|
|
17
17
|
export declare const useCollectionItem: import("../utils/types.js").Hook<CollectionItemOptions<"div">>;
|
|
18
18
|
/**
|
|
19
19
|
* Renders an item in a collection. The collection store can be passed
|
|
20
|
-
* explicitly through the
|
|
21
|
-
* `
|
|
20
|
+
* explicitly through the
|
|
21
|
+
* [`store`](https://ariakit.org/reference/collection-item#store) prop or
|
|
22
|
+
* implicitly through the parent
|
|
23
|
+
* [`Collection`](https://ariakit.org/reference/collection) component.
|
|
22
24
|
* @see https://ariakit.org/components/collection
|
|
23
25
|
* @example
|
|
24
26
|
* ```jsx
|
|
@@ -33,14 +35,27 @@ export interface CollectionItemOptions<T extends As = "div"> extends Options<T>
|
|
|
33
35
|
/**
|
|
34
36
|
* Object returned by the
|
|
35
37
|
* [`useCollectionStore`](https://ariakit.org/reference/use-collection-store)
|
|
36
|
-
* hook. If not provided, the
|
|
38
|
+
* hook. If not provided, the closest
|
|
37
39
|
* [`Collection`](https://ariakit.org/reference/collection) or
|
|
38
40
|
* [`CollectionProvider`](https://ariakit.org/reference/collection-provider)
|
|
39
41
|
* components' context will be used.
|
|
42
|
+
*
|
|
43
|
+
* Live examples:
|
|
44
|
+
* - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
|
|
40
45
|
*/
|
|
41
46
|
store?: CollectionStore;
|
|
42
47
|
/**
|
|
43
|
-
*
|
|
48
|
+
* The unique ID of the item. This will be used to register the item in the
|
|
49
|
+
* store and for the element's `id` attribute. If not provided, a unique ID
|
|
50
|
+
* will be automatically generated.
|
|
51
|
+
*
|
|
52
|
+
* Live examples:
|
|
53
|
+
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
54
|
+
* - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
|
|
55
|
+
*/
|
|
56
|
+
id?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the item should be registered as part of the collection.
|
|
44
59
|
*
|
|
45
60
|
* Live examples:
|
|
46
61
|
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
@@ -48,13 +63,12 @@ export interface CollectionItemOptions<T extends As = "div"> extends Options<T>
|
|
|
48
63
|
*/
|
|
49
64
|
shouldRegisterItem?: boolean;
|
|
50
65
|
/**
|
|
51
|
-
* A memoized function that returns props
|
|
52
|
-
*
|
|
66
|
+
* A memoized function that returns props to be passed with the item during
|
|
67
|
+
* its registration in the store.
|
|
53
68
|
* @example
|
|
54
69
|
* ```jsx
|
|
55
|
-
* const
|
|
56
|
-
*
|
|
57
|
-
* <CollectionItem store={store} getItem={getItem} />
|
|
70
|
+
* const getItem = useCallback((data) => ({ ...data, custom: true }), []);
|
|
71
|
+
* <CollectionItem getItem={getItem} />
|
|
58
72
|
* ```
|
|
59
73
|
*/
|
|
60
74
|
getItem?: (props: CollectionStoreItem) => CollectionStoreItem;
|
|
@@ -2,7 +2,8 @@ import type { ReactElement, ReactNode } from "react";
|
|
|
2
2
|
import type { PickRequired } from "@ariakit/core/utils/types";
|
|
3
3
|
import type { CollectionStoreItem, CollectionStoreProps } from "./collection-store.js";
|
|
4
4
|
/**
|
|
5
|
-
* Provides a collection store to
|
|
5
|
+
* Provides a collection store to
|
|
6
|
+
* [`CollectionItem`](https://ariakit.org/reference/collection-item) components.
|
|
6
7
|
* @see https://ariakit.org/components/collection
|
|
7
8
|
* @example
|
|
8
9
|
* ```jsx
|
|
@@ -327,7 +327,7 @@ export interface CollectionRendererOptions<T extends Item = any> {
|
|
|
327
327
|
/**
|
|
328
328
|
* Object returned by the
|
|
329
329
|
* [`useCollectionStore`](https://ariakit.org/reference/use-collection-store)
|
|
330
|
-
* hook. If not provided, the
|
|
330
|
+
* hook. If not provided, the closest
|
|
331
331
|
* [Collection](https://ariakit.org/components/collection) component's
|
|
332
332
|
* context will be used.
|
|
333
333
|
*
|
|
@@ -3,11 +3,13 @@ import type { BivariantCallback, PickRequired } from "@ariakit/core/utils/types"
|
|
|
3
3
|
import type { Store } from "../utils/store.js";
|
|
4
4
|
export declare function useCollectionStoreProps<T extends Core.CollectionStore>(store: T, update: () => void, props: CollectionStoreProps): T;
|
|
5
5
|
/**
|
|
6
|
-
* Creates a collection store
|
|
6
|
+
* Creates a collection store to control
|
|
7
|
+
* [Collection](https://ariakit.org/components/collection) components.
|
|
7
8
|
* @see https://ariakit.org/components/collection
|
|
8
9
|
* @example
|
|
9
10
|
* ```jsx
|
|
10
11
|
* const collection = useCollectionStore();
|
|
12
|
+
*
|
|
11
13
|
* <Collection store={collection}>
|
|
12
14
|
* <CollectionItem>Item</CollectionItem>
|
|
13
15
|
* <CollectionItem>Item</CollectionItem>
|
|
@@ -25,8 +27,9 @@ export interface CollectionStoreFunctions<T extends CollectionStoreItem = Collec
|
|
|
25
27
|
}
|
|
26
28
|
export interface CollectionStoreOptions<T extends CollectionStoreItem = CollectionStoreItem> extends Core.CollectionStoreOptions<T> {
|
|
27
29
|
/**
|
|
28
|
-
* A callback that gets called when the
|
|
29
|
-
*
|
|
30
|
+
* A callback that gets called when the
|
|
31
|
+
* [`items`](https://ariakit.org/reference/collection-provider#items) state
|
|
32
|
+
* changes.
|
|
30
33
|
* @example
|
|
31
34
|
* const [items, setItems] = useState([]);
|
|
32
35
|
* const collection = useCollectionStore({ items, setItems });
|
|
@@ -18,9 +18,10 @@ import type { CollectionStore } from "./collection-store.js";
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const useCollection: import("../utils/types.js").Hook<CollectionOptions<"div">>;
|
|
20
20
|
/**
|
|
21
|
-
* Renders a simple wrapper for collection items. It
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* Renders a simple wrapper for collection items. It accepts a collection store
|
|
22
|
+
* through the [`store`](https://ariakit.org/reference/collection#store) prop
|
|
23
|
+
* and provides context for
|
|
24
|
+
* [`CollectionItem`](https://ariakit.org/reference/collection-item) components.
|
|
24
25
|
* @see https://ariakit.org/components/collection
|
|
25
26
|
* @example
|
|
26
27
|
* ```jsx
|
|
@@ -15,10 +15,11 @@ import type { ComboboxStore } from "./combobox-store.js";
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const useComboboxCancel: import("../utils/types.js").Hook<ComboboxCancelOptions<"button">>;
|
|
17
17
|
/**
|
|
18
|
-
* Renders a combobox cancel button that clears the combobox input when
|
|
18
|
+
* Renders a combobox cancel button that clears the combobox input value when
|
|
19
|
+
* clicked.
|
|
19
20
|
* @see https://ariakit.org/components/combobox
|
|
20
21
|
* @example
|
|
21
|
-
* ```jsx
|
|
22
|
+
* ```jsx {3}
|
|
22
23
|
* <ComboboxProvider>
|
|
23
24
|
* <Combobox />
|
|
24
25
|
* <ComboboxCancel />
|
|
@@ -20,11 +20,16 @@ import type { ComboboxStore } from "./combobox-store.js";
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const useComboboxDisclosure: import("../utils/types.js").Hook<ComboboxDisclosureOptions<"button">>;
|
|
22
22
|
/**
|
|
23
|
-
* Renders a combobox disclosure button that toggles the
|
|
23
|
+
* Renders a combobox disclosure button that toggles the
|
|
24
|
+
* [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover) element's
|
|
24
25
|
* visibility when clicked.
|
|
26
|
+
*
|
|
27
|
+
* Although this button is not tabbable, it remains accessible to screen reader
|
|
28
|
+
* users. On clicking, it automatically shifts focus to the
|
|
29
|
+
* [`Combobox`](https://ariakit.org/reference/combobox) element.
|
|
25
30
|
* @see https://ariakit.org/components/combobox
|
|
26
31
|
* @example
|
|
27
|
-
* ```jsx
|
|
32
|
+
* ```jsx {3}
|
|
28
33
|
* <ComboboxProvider>
|
|
29
34
|
* <Combobox />
|
|
30
35
|
* <ComboboxDisclosure />
|
|
@@ -16,11 +16,11 @@ import type { ComboboxStore } from "./combobox-store.js";
|
|
|
16
16
|
export declare const useComboboxGroupLabel: import("../utils/types.js").Hook<ComboboxGroupLabelOptions<"div">>;
|
|
17
17
|
/**
|
|
18
18
|
* Renders a label in a combobox group. This component should be wrapped with
|
|
19
|
-
* `ComboboxGroup` so the
|
|
20
|
-
* group element.
|
|
19
|
+
* [`ComboboxGroup`](https://ariakit.org/reference/combobox-group) so the
|
|
20
|
+
* `aria-labelledby` is correctly set on the group element.
|
|
21
21
|
* @see https://ariakit.org/components/combobox
|
|
22
22
|
* @example
|
|
23
|
-
* ```jsx
|
|
23
|
+
* ```jsx {5}
|
|
24
24
|
* <ComboboxProvider>
|
|
25
25
|
* <Combobox />
|
|
26
26
|
* <ComboboxPopover>
|
|
@@ -38,7 +38,7 @@ export interface ComboboxGroupLabelOptions<T extends As = "div"> extends Composi
|
|
|
38
38
|
/**
|
|
39
39
|
* Object returned by the
|
|
40
40
|
* [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
|
|
41
|
-
* hook. If not provided, the
|
|
41
|
+
* hook. If not provided, the closest
|
|
42
42
|
* [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
|
|
43
43
|
* [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
|
|
44
44
|
* components' context will be used.
|
|
@@ -20,10 +20,14 @@ import type { ComboboxStore } from "./combobox-store.js";
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const useComboboxGroup: import("../utils/types.js").Hook<ComboboxGroupOptions<"div">>;
|
|
22
22
|
/**
|
|
23
|
-
* Renders a
|
|
23
|
+
* Renders a group for
|
|
24
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) elements.
|
|
25
|
+
* Optionally, a
|
|
26
|
+
* [`ComboboxGroupLabel`](https://ariakit.org/reference/combobox-group-label)
|
|
27
|
+
* can be rendered as a child to provide a label for the group.
|
|
24
28
|
* @see https://ariakit.org/components/combobox
|
|
25
29
|
* @example
|
|
26
|
-
* ```jsx
|
|
30
|
+
* ```jsx {4-8}
|
|
27
31
|
* <ComboboxProvider>
|
|
28
32
|
* <Combobox />
|
|
29
33
|
* <ComboboxPopover>
|
|
@@ -41,7 +45,7 @@ export interface ComboboxGroupOptions<T extends As = "div"> extends CompositeGro
|
|
|
41
45
|
/**
|
|
42
46
|
* Object returned by the
|
|
43
47
|
* [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
|
|
44
|
-
* hook. If not provided, the
|
|
48
|
+
* hook. If not provided, the closest
|
|
45
49
|
* [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
|
|
46
50
|
* [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
|
|
47
51
|
* components' context will be used.
|
|
@@ -14,12 +14,15 @@ import type { ComboboxStore } from "./combobox-store.js";
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const useComboboxItemCheck: import("../utils/types.js").Hook<ComboboxItemCheckOptions<"span">>;
|
|
16
16
|
/**
|
|
17
|
-
* Renders a checkmark
|
|
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
|
|
17
|
+
* Renders a checkmark icon when the
|
|
21
18
|
* [`checked`](https://ariakit.org/reference/combobox-item-check#checked) prop
|
|
22
|
-
*
|
|
19
|
+
* is `true`. The icon can be overridden by providing a different one as
|
|
20
|
+
* children.
|
|
21
|
+
*
|
|
22
|
+
* When rendered inside a
|
|
23
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) component, the
|
|
24
|
+
* [`checked`](https://ariakit.org/reference/combobox-item-check#checked) prop
|
|
25
|
+
* is automatically derived from the context.
|
|
23
26
|
* @see https://ariakit.org/components/combobox
|
|
24
27
|
* @example
|
|
25
28
|
* ```jsx {5,9}
|
|
@@ -43,18 +46,8 @@ export interface ComboboxItemCheckOptions<T extends As = "span"> extends Checkbo
|
|
|
43
46
|
/**
|
|
44
47
|
* Object returned by the
|
|
45
48
|
* [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
|
|
46
|
-
* hook.
|
|
47
|
-
* [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
|
|
48
|
-
* [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
|
|
49
|
-
* components' context will be used.
|
|
49
|
+
* hook.
|
|
50
50
|
*/
|
|
51
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
52
|
}
|
|
60
53
|
export type ComboboxItemCheckProps<T extends As = "span"> = Props<ComboboxItemCheckOptions<T>>;
|
|
@@ -23,13 +23,16 @@ import type { ComboboxStore } from "./combobox-store.js";
|
|
|
23
23
|
*/
|
|
24
24
|
export declare const useComboboxItemValue: import("../utils/types.js").Hook<ComboboxItemValueOptions<"span">>;
|
|
25
25
|
/**
|
|
26
|
-
* Renders a value element inside a
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* Renders a value element inside a
|
|
27
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item). The value will
|
|
28
|
+
* be split into span elements. The portions of the value that correspond to the
|
|
29
|
+
* combobox value will have a
|
|
30
|
+
* [`data-user-value`](https://ariakit.org/guide/styling#data-user-value)
|
|
31
|
+
* attribute. The other portions will have a [`data-autocomplete-value`](https://ariakit.org/guide/styling#data-autocomplete-value)
|
|
32
|
+
* attribute.
|
|
30
33
|
* @see https://ariakit.org/components/combobox
|
|
31
34
|
* @example
|
|
32
|
-
* ```jsx
|
|
35
|
+
* ```jsx {5} "value"
|
|
33
36
|
* <ComboboxProvider value="p">
|
|
34
37
|
* <Combobox />
|
|
35
38
|
* <ComboboxPopover>
|
|
@@ -53,15 +56,17 @@ export interface ComboboxItemValueOptions<T extends As = "span"> extends Options
|
|
|
53
56
|
/**
|
|
54
57
|
* Object returned by the
|
|
55
58
|
* [`useComboboxStore`](https://ariakit.org/reference/use-combobox-store)
|
|
56
|
-
* hook. If not provided, the
|
|
59
|
+
* hook. If not provided, the closest
|
|
57
60
|
* [`ComboboxList`](https://ariakit.org/reference/combobox-list) or
|
|
58
61
|
* [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover)
|
|
59
62
|
* components' context will be used.
|
|
60
63
|
*/
|
|
61
64
|
store?: ComboboxStore;
|
|
62
65
|
/**
|
|
63
|
-
* The current combobox item value. If not provided, the parent
|
|
64
|
-
* component's
|
|
66
|
+
* The current combobox item value. If not provided, the parent
|
|
67
|
+
* [`ComboboxItem`](https://ariakit.org/reference/combobox-item) component's
|
|
68
|
+
* [`value`](https://ariakit.org/reference/combobox-item#value) prop will be
|
|
69
|
+
* used.
|
|
65
70
|
*/
|
|
66
71
|
value?: string;
|
|
67
72
|
}
|