@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
usePopover
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/IRX7SFUJ.js";
|
|
5
|
+
import "../__chunks/NERBASET.js";
|
|
6
6
|
import "../__chunks/LWHPHW7Q.js";
|
|
7
|
-
import "../__chunks/
|
|
7
|
+
import "../__chunks/TQYOGOE2.js";
|
|
8
8
|
import "../__chunks/BULCTPRV.js";
|
|
9
9
|
import "../__chunks/6BJGLK2C.js";
|
|
10
10
|
import "../__chunks/CS347UVZ.js";
|
|
@@ -12,11 +12,11 @@ import "../__chunks/IUB2BTEK.js";
|
|
|
12
12
|
import "../__chunks/XHJGS6Z5.js";
|
|
13
13
|
import "../__chunks/TL67WVI6.js";
|
|
14
14
|
import "../__chunks/MKDDWKFK.js";
|
|
15
|
+
import "../__chunks/72E5EPFF.js";
|
|
15
16
|
import "../__chunks/OOBDFMJL.js";
|
|
17
|
+
import "../__chunks/X6WIMZJE.js";
|
|
16
18
|
import "../__chunks/677M2CI3.js";
|
|
17
19
|
import "../__chunks/6GXEOXGT.js";
|
|
18
|
-
import "../__chunks/72E5EPFF.js";
|
|
19
|
-
import "../__chunks/X6WIMZJE.js";
|
|
20
20
|
import "../__chunks/HPP6CWMY.js";
|
|
21
21
|
import "../__chunks/UYRJLDVS.js";
|
|
22
22
|
import "../__chunks/JPXNJYSO.js";
|
|
@@ -2,7 +2,8 @@ import type { ReactElement, ReactNode } from "react";
|
|
|
2
2
|
import type { PickRequired } from "@ariakit/core/utils/types";
|
|
3
3
|
import type { CompositeStoreItem, CompositeStoreProps } from "./composite-store.js";
|
|
4
4
|
/**
|
|
5
|
-
* Provides a composite store to
|
|
5
|
+
* Provides a composite store to
|
|
6
|
+
* [`CompositeItem`](https://ariakit.org/reference/composite-item) components.
|
|
6
7
|
* @see https://ariakit.org/components/composite
|
|
7
8
|
* @example
|
|
8
9
|
* ```jsx
|
|
@@ -294,7 +294,7 @@ export interface CompositeRendererOptions<T extends Item = any> extends Omit<Col
|
|
|
294
294
|
/**
|
|
295
295
|
* Object returned by the
|
|
296
296
|
* [`useCompositeStore`](https://ariakit.org/reference/use-composite-store)
|
|
297
|
-
* hook. If not provided, the
|
|
297
|
+
* hook. If not provided, the closest
|
|
298
298
|
* [Composite](https://ariakit.org/components/composite) component's context
|
|
299
299
|
* will be used.
|
|
300
300
|
*
|
|
@@ -20,32 +20,39 @@ import type { CompositeStore } from "./composite-store.js";
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const useCompositeRow: import("../utils/types.js").Hook<CompositeRowOptions<"div">>;
|
|
22
22
|
/**
|
|
23
|
-
* Renders a composite
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Renders a row element for composite items that allows two-dimensional arrow
|
|
24
|
+
* key navigation.
|
|
25
|
+
* [`CompositeItem`](https://ariakit.org/reference/composite-item) elements
|
|
26
|
+
* wrapped within this component will automatically receive a
|
|
27
|
+
* [`rowId`](https://ariakit.org/reference/composite-item#rowid) prop.
|
|
26
28
|
* @see https://ariakit.org/components/composite
|
|
27
29
|
* @example
|
|
28
|
-
* ```jsx
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
30
|
+
* ```jsx {3-12}
|
|
31
|
+
* <CompositeProvider>
|
|
32
|
+
* <Composite>
|
|
33
|
+
* <CompositeRow>
|
|
34
|
+
* <CompositeItem>Item 1.1</CompositeItem>
|
|
35
|
+
* <CompositeItem>Item 1.2</CompositeItem>
|
|
36
|
+
* <CompositeItem>Item 1.3</CompositeItem>
|
|
37
|
+
* </CompositeRow>
|
|
38
|
+
* <CompositeRow>
|
|
39
|
+
* <CompositeItem>Item 2.1</CompositeItem>
|
|
40
|
+
* <CompositeItem>Item 2.2</CompositeItem>
|
|
41
|
+
* <CompositeItem>Item 2.3</CompositeItem>
|
|
42
|
+
* </CompositeRow>
|
|
43
|
+
* </Composite>
|
|
44
|
+
* </CompositeProvider>
|
|
42
45
|
* ```
|
|
43
46
|
*/
|
|
44
47
|
export declare const CompositeRow: import("../utils/types.js").Component<CompositeRowOptions<"div">>;
|
|
45
48
|
export interface CompositeRowOptions<T extends As = "div"> extends Options<T> {
|
|
46
49
|
/**
|
|
47
|
-
* Object returned by the
|
|
48
|
-
*
|
|
50
|
+
* Object returned by the
|
|
51
|
+
* [`useCompositeStore`](https://ariakit.org/reference/use-composite-store)
|
|
52
|
+
* hook. If not provided, the closest
|
|
53
|
+
* [`Composite`](https://ariakit.org/reference/composite) or
|
|
54
|
+
* [`CompositeProvider`](https://ariakit.org/reference/composite-provider)
|
|
55
|
+
* components' context will be used.
|
|
49
56
|
*/
|
|
50
57
|
store?: CompositeStore;
|
|
51
58
|
}
|
|
@@ -17,24 +17,37 @@ import type { CompositeStore } from "./composite-store.js";
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const useCompositeSeparator: import("../utils/types.js").Hook<CompositeSeparatorOptions<"hr">>;
|
|
19
19
|
/**
|
|
20
|
-
* Renders a
|
|
20
|
+
* Renders a divider between
|
|
21
|
+
* [`CompositeItem`](https://ariakit.org/reference/composite-item) elements.
|
|
21
22
|
* @see https://ariakit.org/components/composite
|
|
22
23
|
* @example
|
|
23
|
-
* ```jsx
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
24
|
+
* ```jsx {4}
|
|
25
|
+
* <CompositeProvider>
|
|
26
|
+
* <Composite>
|
|
27
|
+
* <CompositeItem>Item 1</CompositeItem>
|
|
28
|
+
* <CompositeSeparator />
|
|
29
|
+
* <CompositeItem>Item 2</CompositeItem>
|
|
30
|
+
* </Composite>
|
|
31
|
+
* </CompositeProvider>
|
|
30
32
|
* ```
|
|
31
33
|
*/
|
|
32
34
|
export declare const CompositeSeparator: import("../utils/types.js").Component<CompositeSeparatorOptions<"hr">>;
|
|
33
35
|
export interface CompositeSeparatorOptions<T extends As = "hr"> extends SeparatorOptions<T> {
|
|
34
36
|
/**
|
|
35
|
-
* Object returned by the
|
|
36
|
-
*
|
|
37
|
+
* Object returned by the
|
|
38
|
+
* [`useCompositeStore`](https://ariakit.org/reference/use-composite-store)
|
|
39
|
+
* hook. If not provided, the closest
|
|
40
|
+
* [`Composite`](https://ariakit.org/reference/composite) or
|
|
41
|
+
* [`CompositeProvider`](https://ariakit.org/reference/composite-provider)
|
|
42
|
+
* components' context will be used.
|
|
37
43
|
*/
|
|
38
44
|
store?: CompositeStore;
|
|
45
|
+
/**
|
|
46
|
+
* The orientation of the separator. By default, this is the opposite of the
|
|
47
|
+
* [`orientation`](https://ariakit.org/reference/composite-provider#orientation)
|
|
48
|
+
* state of the composite widget. Which means it doesn't need to be explicitly
|
|
49
|
+
* set in most cases.
|
|
50
|
+
*/
|
|
51
|
+
orientation?: SeparatorOptions<T>["orientation"];
|
|
39
52
|
}
|
|
40
53
|
export type CompositeSeparatorProps<T extends As = "hr"> = Props<CompositeSeparatorOptions<T>>;
|
|
@@ -4,11 +4,13 @@ import type { CollectionStoreFunctions, CollectionStoreOptions, CollectionStoreS
|
|
|
4
4
|
import type { Store } from "../utils/store.js";
|
|
5
5
|
export declare function useCompositeStoreProps<T extends Core.CompositeStore>(store: T, update: () => void, props: CompositeStoreProps): T;
|
|
6
6
|
/**
|
|
7
|
-
* Creates a composite store
|
|
7
|
+
* Creates a composite store to control the state of
|
|
8
|
+
* [Composite](https://ariakit.org/components/composite) components.
|
|
8
9
|
* @see https://ariakit.org/components/composite
|
|
9
10
|
* @example
|
|
10
11
|
* ```jsx
|
|
11
12
|
* const composite = useCompositeStore();
|
|
13
|
+
*
|
|
12
14
|
* <Composite store={composite}>
|
|
13
15
|
* <CompositeItem>Item</CompositeItem>
|
|
14
16
|
* <CompositeItem>Item</CompositeItem>
|
|
@@ -17,25 +17,37 @@ export declare const useCompositeTypeahead: import("../utils/types.js").Hook<Com
|
|
|
17
17
|
/**
|
|
18
18
|
* Renders a component that adds typeahead functionality to composite
|
|
19
19
|
* components.
|
|
20
|
+
*
|
|
21
|
+
* When the
|
|
22
|
+
* [`typeahead`](https://ariakit.org/reference/composite-typeahead#typeahead)
|
|
23
|
+
* prop is enabled, which it is by default, hitting printable character keys
|
|
24
|
+
* will move focus to the next composite item that begins with the input
|
|
25
|
+
* characters.
|
|
20
26
|
* @see https://ariakit.org/components/composite
|
|
21
27
|
* @example
|
|
22
28
|
* ```jsx
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
29
|
+
* <CompositeProvider>
|
|
30
|
+
* <Composite render={<CompositeTypeahead />}>
|
|
31
|
+
* <CompositeItem>Item 1</CompositeItem>
|
|
32
|
+
* <CompositeItem>Item 2</CompositeItem>
|
|
33
|
+
* </Composite>
|
|
34
|
+
* </CompositeProvider>
|
|
28
35
|
* ```
|
|
29
36
|
*/
|
|
30
37
|
export declare const CompositeTypeahead: import("../utils/types.js").Component<CompositeTypeaheadOptions<"div">>;
|
|
31
38
|
export interface CompositeTypeaheadOptions<T extends As = "div"> extends Options<T> {
|
|
32
39
|
/**
|
|
33
|
-
* Object returned by the
|
|
34
|
-
*
|
|
40
|
+
* Object returned by the
|
|
41
|
+
* [`useCompositeStore`](https://ariakit.org/reference/use-composite-store)
|
|
42
|
+
* hook. If not provided, the closest
|
|
43
|
+
* [`Composite`](https://ariakit.org/reference/composite) or
|
|
44
|
+
* [`CompositeProvider`](https://ariakit.org/reference/composite-provider)
|
|
45
|
+
* components' context will be used.
|
|
35
46
|
*/
|
|
36
47
|
store?: CompositeStore;
|
|
37
48
|
/**
|
|
38
|
-
*
|
|
49
|
+
* When enabled, pressing printable character keys will move focus to the next
|
|
50
|
+
* composite item that starts with the entered characters.
|
|
39
51
|
* @default true
|
|
40
52
|
*/
|
|
41
53
|
typeahead?: boolean;
|
|
@@ -32,27 +32,82 @@ export declare const useComposite: import("../utils/types.js").Hook<CompositeOpt
|
|
|
32
32
|
export declare const Composite: import("../utils/types.js").Component<CompositeOptions<"div">>;
|
|
33
33
|
export interface CompositeOptions<T extends As = "div"> extends FocusableOptions<T> {
|
|
34
34
|
/**
|
|
35
|
-
* Object returned by the
|
|
35
|
+
* Object returned by the
|
|
36
|
+
* [`useCompositeStore`](https://ariakit.org/reference/use-composite-store)
|
|
37
|
+
* hook. If not provided, the closest
|
|
38
|
+
* [`CompositeProvider`](https://ariakit.org/reference/composite-provider)
|
|
39
|
+
* component's context will be used.
|
|
36
40
|
*/
|
|
37
41
|
store?: CompositeStore;
|
|
38
42
|
/**
|
|
39
|
-
*
|
|
40
|
-
* be set to `false` when
|
|
41
|
-
* should
|
|
43
|
+
* Determines if the component should act as a composite widget. This prop
|
|
44
|
+
* needs to be set to `false` when merging various composite widgets where
|
|
45
|
+
* only one should function in that manner.
|
|
46
|
+
*
|
|
47
|
+
* If disabled, this component will stop managing focus and keyboard
|
|
48
|
+
* navigation for its items and itself. Additionally, composite ARIA
|
|
49
|
+
* attributes won't be applied. These responsibilities should be taken over by
|
|
50
|
+
* another composite component.
|
|
51
|
+
*
|
|
52
|
+
* **Note**: In most cases, this prop doesn't need to be set manually. For
|
|
53
|
+
* example, when composing [Menu with
|
|
54
|
+
* Combobox](https://ariakit.org/examples/menu-combobox) or [Select with
|
|
55
|
+
* Combobox](https://ariakit.org/examples/select-combobox), this prop will be
|
|
56
|
+
* set to `false` automatically on the
|
|
57
|
+
* [`Menu`](https://ariakit.org/reference/menu) and
|
|
58
|
+
* [`SelectPopover`](https://ariakit.org/reference/select-popover) components
|
|
59
|
+
* so the [`Combobox`](https://ariakit.org/reference/combobox) component can
|
|
60
|
+
* take over the composite widget responsibilities.
|
|
61
|
+
*
|
|
62
|
+
* Live examples:
|
|
63
|
+
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
64
|
+
* - [Select with Combobox](https://ariakit.org/examples/select-combobox)
|
|
42
65
|
* @default true
|
|
43
66
|
*/
|
|
44
67
|
composite?: boolean;
|
|
45
68
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
69
|
+
* Determines whether the composite widget should move focus to an item when
|
|
70
|
+
* arrow keys are pressed, given that the composite element is focused and
|
|
71
|
+
* there's no active item.
|
|
72
|
+
*
|
|
73
|
+
* **Note**: To entirely disable focus moving within a composite widget, you
|
|
74
|
+
* can use the
|
|
75
|
+
* [`focusOnMove`](https://ariakit.org/reference/composite#focusonmove) prop
|
|
76
|
+
* instead. If you want to control the behavior _only when arrow keys are
|
|
77
|
+
* pressed_, where
|
|
78
|
+
* [`focusOnMove`](https://ariakit.org/reference/composite#focusonmove) may
|
|
79
|
+
* not be applicable, this prop must be set on composite items as well.
|
|
48
80
|
* @default true
|
|
81
|
+
* @example
|
|
82
|
+
* ```jsx
|
|
83
|
+
* <Composite moveOnKeyPress={false}>
|
|
84
|
+
* <CompositeItem moveOnKeyPress={false} />
|
|
85
|
+
* <CompositeItem moveOnKeyPress={false} />
|
|
86
|
+
* </Composite>
|
|
87
|
+
* ```
|
|
49
88
|
*/
|
|
50
|
-
|
|
89
|
+
moveOnKeyPress?: BooleanOrCallback<ReactKeyboardEvent<HTMLElement>>;
|
|
51
90
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
91
|
+
* Determines if the active composite item should receive focus (or virtual
|
|
92
|
+
* focus if the
|
|
93
|
+
* [`virtualFocus`](https://ariakit.org/reference/composite-provider#virtualfocus)
|
|
94
|
+
* option is enabled) when moving through items. This typically happens when
|
|
95
|
+
* navigating through items with arrow keys, but it can also happen when
|
|
96
|
+
* calling the
|
|
97
|
+
* [`move`](https://ariakit.org/reference/use-composite-store#move) method
|
|
98
|
+
* directly.
|
|
99
|
+
*
|
|
100
|
+
* Unlike the
|
|
101
|
+
* [`composite`](https://ariakit.org/reference/composite#composite-1) prop,
|
|
102
|
+
* this option doesn't disable the entire composite widget behavior. It only
|
|
103
|
+
* stops this component from managing focus when navigating through items.
|
|
104
|
+
*
|
|
105
|
+
* **Note**: If you want to control the behavior only _when arrow keys are
|
|
106
|
+
* pressed_, use the
|
|
107
|
+
* [`moveOnKeyPress`](https://ariakit.org/reference/composite#moveonkeypress)
|
|
108
|
+
* prop instead.
|
|
54
109
|
* @default true
|
|
55
110
|
*/
|
|
56
|
-
|
|
111
|
+
focusOnMove?: boolean;
|
|
57
112
|
}
|
|
58
113
|
export type CompositeProps<T extends As = "div"> = Props<CompositeOptions<T>>;
|
|
@@ -14,7 +14,8 @@ import type { DialogStore } from "./dialog-store.js";
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const useDialogDisclosure: import("../utils/types.js").Hook<DialogDisclosureOptions<"button">>;
|
|
16
16
|
/**
|
|
17
|
-
* Renders a button that
|
|
17
|
+
* Renders a button that toggles the visibility of a
|
|
18
|
+
* [`Dialog`](https://ariakit.org/reference/dialog) component when clicked.
|
|
18
19
|
* @see https://ariakit.org/components/dialog
|
|
19
20
|
* @example
|
|
20
21
|
* ```jsx {2}
|
|
@@ -15,7 +15,8 @@ import type { DialogStore } from "./dialog-store.js";
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const useDialogDismiss: import("../utils/types.js").Hook<DialogDismissOptions<"button">>;
|
|
17
17
|
/**
|
|
18
|
-
* Renders a button that hides a
|
|
18
|
+
* Renders a button that hides a
|
|
19
|
+
* [`Dialog`](https://ariakit.org/reference/dialog) when clicked.
|
|
19
20
|
* @see https://ariakit.org/components/dialog
|
|
20
21
|
* @example
|
|
21
22
|
* ```jsx {4}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { DialogStoreProps } from "./dialog-store.js";
|
|
3
3
|
/**
|
|
4
|
-
* Provides a dialog store to Dialog
|
|
4
|
+
* Provides a dialog store to [Dialog](https://ariakit.org/components/dialog)
|
|
5
|
+
* components.
|
|
5
6
|
* @see https://ariakit.org/components/dialog
|
|
6
7
|
* @example
|
|
7
8
|
* ```jsx
|
|
@@ -3,11 +3,13 @@ import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreS
|
|
|
3
3
|
import type { Store } from "../utils/store.js";
|
|
4
4
|
export declare function useDialogStoreProps<T extends Core.DialogStore>(store: T, update: () => void, props: DialogStoreProps): T;
|
|
5
5
|
/**
|
|
6
|
-
* Creates a dialog store
|
|
6
|
+
* Creates a dialog store to control the state of
|
|
7
|
+
* [Dialog](https://ariakit.org/components/dialog) components.
|
|
7
8
|
* @see https://ariakit.org/components/dialog
|
|
8
9
|
* @example
|
|
9
10
|
* ```jsx
|
|
10
11
|
* const dialog = useDialogStore();
|
|
12
|
+
*
|
|
11
13
|
* <button onClick={dialog.toggle}>Open dialog</button>
|
|
12
14
|
* <Dialog store={dialog}>Content</Dialog>
|
|
13
15
|
* ```
|
package/esm/dialog/dialog.d.ts
CHANGED
|
@@ -18,7 +18,14 @@ import type { DialogStore } from "./dialog-store.js";
|
|
|
18
18
|
export declare const useDialog: import("../utils/types.js").Hook<DialogOptions<"div">>;
|
|
19
19
|
export declare function createDialogComponent<T extends DialogOptions>(Component: Component<T>, useProviderContext?: () => DialogStore | undefined): Component<T>;
|
|
20
20
|
/**
|
|
21
|
-
* Renders a dialog element
|
|
21
|
+
* Renders a dialog similar to the native `dialog` element that's rendered in a
|
|
22
|
+
* [`portal`](https://ariakit.org/reference/dialog#portal) by default.
|
|
23
|
+
*
|
|
24
|
+
* The dialog can be either
|
|
25
|
+
* [`modal`](https://ariakit.org/reference/dialog#modal) or non-modal. The
|
|
26
|
+
* visibility state can be controlled with the
|
|
27
|
+
* [`open`](https://ariakit.org/reference/dialog#open) and
|
|
28
|
+
* [`onClose`](https://ariakit.org/reference/dialog#onclose) props.
|
|
22
29
|
* @see https://ariakit.org/components/dialog
|
|
23
30
|
* @example
|
|
24
31
|
* ```jsx {4-6}
|
|
@@ -60,7 +67,7 @@ export interface DialogOptions<T extends As = "div"> extends FocusableOptions<T>
|
|
|
60
67
|
* This is an event handler prop triggered when the dialog's `close` event is
|
|
61
68
|
* dispatched. The `close` event is similar to the native dialog
|
|
62
69
|
* [`close`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/close_event)
|
|
63
|
-
* event. The only difference is that this event can be
|
|
70
|
+
* event. The only difference is that this event can be canceled with
|
|
64
71
|
* `event.preventDefault()`, which will prevent the dialog from hiding.
|
|
65
72
|
*
|
|
66
73
|
* It's important to note that this event only fires when the dialog store's
|
|
@@ -87,14 +94,14 @@ export interface DialogOptions<T extends As = "div"> extends FocusableOptions<T>
|
|
|
87
94
|
* - The [`portal`](https://ariakit.org/reference/dialog#portal) and
|
|
88
95
|
* [`preventBodyScroll`](https://ariakit.org/reference/dialog#preventbodyscroll)
|
|
89
96
|
* props are set to `true`. They can still be manually set to `false`.
|
|
90
|
-
* - A visually hidden dismiss button will be rendered if the
|
|
91
|
-
* [`DialogDismiss`](https://ariakit.org/reference/dialog-dismiss) component
|
|
92
|
-
* hasn't been used. This allows screen reader users to close the dialog.
|
|
93
|
-
* - When the dialog is open, element tree outside it will be disabled.
|
|
94
97
|
* - When using the [`Heading`](https://ariakit.org/reference/heading) or
|
|
95
98
|
* [`DialogHeading`](https://ariakit.org/reference/dialog-heading)
|
|
96
99
|
* components within the dialog, their level will be reset so they start
|
|
97
100
|
* with `h1`.
|
|
101
|
+
* - A visually hidden dismiss button will be rendered if the
|
|
102
|
+
* [`DialogDismiss`](https://ariakit.org/reference/dialog-dismiss) component
|
|
103
|
+
* hasn't been used. This allows screen reader users to close the dialog.
|
|
104
|
+
* - When the dialog is open, element tree outside it will be inert.
|
|
98
105
|
*
|
|
99
106
|
* Live examples:
|
|
100
107
|
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
@@ -111,8 +118,10 @@ export interface DialogOptions<T extends As = "div"> extends FocusableOptions<T>
|
|
|
111
118
|
* dialogs, this is `true` by default. Besides a `boolean`, this prop can also
|
|
112
119
|
* be a React component or JSX element that will be rendered as the backdrop.
|
|
113
120
|
*
|
|
114
|
-
* **If a custom component is used, it must accept ref and spread all
|
|
115
|
-
* its underlying DOM
|
|
121
|
+
* **Note**: If a custom component is used, it must [accept ref and spread all
|
|
122
|
+
* props to its underlying DOM
|
|
123
|
+
* element](https://ariakit.org/guide/composition#custom-components-must-be-open-for-extension),
|
|
124
|
+
* the same way a native element would.
|
|
116
125
|
*
|
|
117
126
|
* Live examples:
|
|
118
127
|
* - [Animated Dialog](https://ariakit.org/examples/dialog-animated)
|
|
@@ -139,14 +148,27 @@ export interface DialogOptions<T extends As = "div"> extends FocusableOptions<T>
|
|
|
139
148
|
*/
|
|
140
149
|
backdropProps?: ComponentPropsWithRef<"div">;
|
|
141
150
|
/**
|
|
142
|
-
* Determines
|
|
143
|
-
*
|
|
151
|
+
* Determines if the dialog will hide when the user presses the Escape key.
|
|
152
|
+
*
|
|
153
|
+
* This prop can be either a boolean or a function that accepts an event as an
|
|
154
|
+
* argument and returns a boolean. The event object represents the keydown
|
|
155
|
+
* event that initiated the hide action, which could be either a native
|
|
156
|
+
* keyboard event or a React synthetic event.
|
|
157
|
+
*
|
|
158
|
+
* **Note**: When placing Ariakit dialogs inside third-party dialogs, using
|
|
159
|
+
* `event.stopPropagation()` within this function will stop the event from
|
|
160
|
+
* reaching the third-party dialog, closing only the Ariakit dialog.
|
|
144
161
|
* @default true
|
|
145
162
|
*/
|
|
146
163
|
hideOnEscape?: BooleanOrCallback<KeyboardEvent | ReactKeyboardEvent>;
|
|
147
164
|
/**
|
|
148
|
-
* Determines
|
|
149
|
-
*
|
|
165
|
+
* Determines if the dialog should hide when the user clicks or focuses on an
|
|
166
|
+
* element outside the dialog.
|
|
167
|
+
*
|
|
168
|
+
* This prop can be either a boolean or a function that takes an event as an
|
|
169
|
+
* argument and returns a boolean. The event object represents the event that
|
|
170
|
+
* triggered the action, which could be a native event or a React synthetic
|
|
171
|
+
* event of various types.
|
|
150
172
|
*
|
|
151
173
|
* Live examples:
|
|
152
174
|
* - [Selection Popover](https://ariakit.org/examples/popover-selection)
|
|
@@ -154,11 +176,17 @@ export interface DialogOptions<T extends As = "div"> extends FocusableOptions<T>
|
|
|
154
176
|
*/
|
|
155
177
|
hideOnInteractOutside?: BooleanOrCallback<Event | SyntheticEvent>;
|
|
156
178
|
/**
|
|
157
|
-
* When a dialog is open, the elements outside of it
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
179
|
+
* When a dialog is open, the elements outside of it are disabled to prevent
|
|
180
|
+
* interaction if the dialog is
|
|
181
|
+
* [`modal`](https://ariakit.org/reference/dialog#modal). For non-modal
|
|
182
|
+
* dialogs, interacting with elements outside the dialog prompts it to close.
|
|
183
|
+
*
|
|
184
|
+
* This function allows you to return an iterable collection of elements that
|
|
185
|
+
* will be considered as part of the dialog, thus excluding them from this
|
|
186
|
+
* behavior.
|
|
187
|
+
*
|
|
188
|
+
* **Note**: The elements returned by this function must exist in the DOM when
|
|
189
|
+
* the dialog opens.
|
|
162
190
|
*
|
|
163
191
|
* Live examples:
|
|
164
192
|
* - [Dialog with
|
|
@@ -167,14 +195,17 @@ export interface DialogOptions<T extends As = "div"> extends FocusableOptions<T>
|
|
|
167
195
|
getPersistentElements?: () => Iterable<Element>;
|
|
168
196
|
/**
|
|
169
197
|
* Determines whether the body scrolling will be prevented when the dialog is
|
|
170
|
-
* shown.
|
|
198
|
+
* shown. This is automatically set to `true` when the dialog is
|
|
199
|
+
* [`modal`](https://ariakit.org/reference/dialog#modal). You can disable this
|
|
200
|
+
* prop if you want to implement your own logic.
|
|
171
201
|
*/
|
|
172
202
|
preventBodyScroll?: boolean;
|
|
173
203
|
/**
|
|
174
204
|
* Determines whether an element inside the dialog will receive focus when the
|
|
175
205
|
* dialog is shown. By default, this is usually the first tabbable element in
|
|
176
|
-
* the dialog or the dialog itself. The
|
|
177
|
-
*
|
|
206
|
+
* the dialog or the dialog itself. The
|
|
207
|
+
* [`initialFocus`](https://ariakit.org/reference/dialog#initialfocus) prop
|
|
208
|
+
* can be used to set a different element to receive focus.
|
|
178
209
|
*
|
|
179
210
|
* Live examples:
|
|
180
211
|
* - [Warning on Dialog
|
package/esm/dialog/dialog.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
Dialog,
|
|
4
4
|
createDialogComponent,
|
|
5
5
|
useDialog
|
|
6
|
-
} from "../__chunks/
|
|
6
|
+
} from "../__chunks/NERBASET.js";
|
|
7
7
|
import "../__chunks/LWHPHW7Q.js";
|
|
8
|
-
import "../__chunks/
|
|
8
|
+
import "../__chunks/TQYOGOE2.js";
|
|
9
9
|
import "../__chunks/BULCTPRV.js";
|
|
10
10
|
import "../__chunks/6BJGLK2C.js";
|
|
11
11
|
import "../__chunks/CS347UVZ.js";
|
|
@@ -13,11 +13,11 @@ import "../__chunks/IUB2BTEK.js";
|
|
|
13
13
|
import "../__chunks/XHJGS6Z5.js";
|
|
14
14
|
import "../__chunks/TL67WVI6.js";
|
|
15
15
|
import "../__chunks/MKDDWKFK.js";
|
|
16
|
+
import "../__chunks/72E5EPFF.js";
|
|
16
17
|
import "../__chunks/OOBDFMJL.js";
|
|
18
|
+
import "../__chunks/X6WIMZJE.js";
|
|
17
19
|
import "../__chunks/677M2CI3.js";
|
|
18
20
|
import "../__chunks/6GXEOXGT.js";
|
|
19
|
-
import "../__chunks/72E5EPFF.js";
|
|
20
|
-
import "../__chunks/X6WIMZJE.js";
|
|
21
21
|
import "../__chunks/HPP6CWMY.js";
|
|
22
22
|
import "../__chunks/UYRJLDVS.js";
|
|
23
23
|
import "../__chunks/JPXNJYSO.js";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
disableTree,
|
|
4
4
|
disableTreeOutside
|
|
5
|
-
} from "../../__chunks/
|
|
5
|
+
} from "../../__chunks/TQYOGOE2.js";
|
|
6
6
|
import "../../__chunks/BULCTPRV.js";
|
|
7
7
|
import "../../__chunks/MKDDWKFK.js";
|
|
8
|
-
import "../../__chunks/677M2CI3.js";
|
|
9
8
|
import "../../__chunks/72E5EPFF.js";
|
|
10
9
|
import "../../__chunks/X6WIMZJE.js";
|
|
10
|
+
import "../../__chunks/677M2CI3.js";
|
|
11
11
|
import "../../__chunks/4R3V3JGP.js";
|
|
12
12
|
export {
|
|
13
13
|
disableTree,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "../../__chunks/XHJGS6Z5.js";
|
|
5
5
|
import "../../__chunks/TL67WVI6.js";
|
|
6
6
|
import "../../__chunks/MKDDWKFK.js";
|
|
7
|
-
import "../../__chunks/OOBDFMJL.js";
|
|
8
7
|
import "../../__chunks/72E5EPFF.js";
|
|
8
|
+
import "../../__chunks/OOBDFMJL.js";
|
|
9
9
|
import "../../__chunks/X6WIMZJE.js";
|
|
10
10
|
import "../../__chunks/6O5OEQGF.js";
|
|
11
11
|
import "../../__chunks/XM66DUTO.js";
|
|
@@ -14,10 +14,11 @@ export declare function isHidden(mounted: boolean, hidden?: boolean | null, alwa
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const useDisclosureContent: import("../utils/types.js").Hook<DisclosureContentOptions<"div">>;
|
|
16
16
|
/**
|
|
17
|
-
* Renders an element that can be shown or hidden
|
|
17
|
+
* Renders an element that can be shown or hidden by a
|
|
18
|
+
* [`Disclosure`](https://ariakit.org/components/disclosure) component.
|
|
18
19
|
* @see https://ariakit.org/components/disclosure
|
|
19
20
|
* @example
|
|
20
|
-
* ```jsx
|
|
21
|
+
* ```jsx {3}
|
|
21
22
|
* <DisclosureProvider>
|
|
22
23
|
* <Disclosure>Disclosure</Disclosure>
|
|
23
24
|
* <DisclosureContent>Content</DisclosureContent>
|
|
@@ -36,9 +37,9 @@ export interface DisclosureContentOptions<T extends As = "div"> extends Options<
|
|
|
36
37
|
store?: DisclosureStore;
|
|
37
38
|
/**
|
|
38
39
|
* Determines whether the content element should remain visible even when the
|
|
39
|
-
* `open` state is
|
|
40
|
-
*
|
|
41
|
-
* otherwise.
|
|
40
|
+
* [`open`](https://ariakit.org/reference/disclosure-provider#open) state is
|
|
41
|
+
* `false`. If this prop is set to `true`, the `hidden` prop and the `display:
|
|
42
|
+
* none` style will not be applied, unless explicitly set otherwise.
|
|
42
43
|
*
|
|
43
44
|
* This prop is particularly useful when using third-party animation libraries
|
|
44
45
|
* such as Framer Motion or React Spring, where the element needs to be
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { DisclosureStoreProps } from "./disclosure-store.js";
|
|
3
3
|
/**
|
|
4
|
-
* Provides a disclosure store to
|
|
4
|
+
* Provides a disclosure store to
|
|
5
|
+
* [Disclosure](https://ariakit.org/components/disclosure) components.
|
|
5
6
|
* @see https://ariakit.org/components/disclosure
|
|
6
7
|
* @example
|
|
7
8
|
* ```jsx
|
|
@@ -2,11 +2,13 @@ import * as Core from "@ariakit/core/disclosure/disclosure-store";
|
|
|
2
2
|
import type { Store } from "../utils/store.js";
|
|
3
3
|
export declare function useDisclosureStoreProps<T extends Core.DisclosureStore>(store: T, update: () => void, props: DisclosureStoreProps): T;
|
|
4
4
|
/**
|
|
5
|
-
* Creates a disclosure store
|
|
5
|
+
* Creates a disclosure store to control the state of
|
|
6
|
+
* [Disclosure](https://ariakit.org/components/disclosure) components.
|
|
6
7
|
* @see https://ariakit.org/components/disclosure
|
|
7
8
|
* @example
|
|
8
9
|
* ```jsx
|
|
9
10
|
* const disclosure = useDisclosureStore();
|
|
11
|
+
*
|
|
10
12
|
* <Disclosure store={disclosure}>Disclosure</Disclosure>
|
|
11
13
|
* <DisclosureContent store={disclosure}>Content</DisclosureContent>
|
|
12
14
|
* ```
|
|
@@ -18,8 +20,9 @@ export interface DisclosureStoreFunctions extends Core.DisclosureStoreFunctions
|
|
|
18
20
|
}
|
|
19
21
|
export interface DisclosureStoreOptions extends Core.DisclosureStoreOptions {
|
|
20
22
|
/**
|
|
21
|
-
* A callback that gets called when the
|
|
22
|
-
*
|
|
23
|
+
* A callback that gets called when the
|
|
24
|
+
* [`open`](https://ariakit.org/reference/disclosure-provider#open) state
|
|
25
|
+
* changes.
|
|
23
26
|
* @example
|
|
24
27
|
* const [open, setOpen] = useState(false);
|
|
25
28
|
* const disclosure = useDisclosureStore({ open, setOpen });
|
|
@@ -27,7 +30,6 @@ export interface DisclosureStoreOptions extends Core.DisclosureStoreOptions {
|
|
|
27
30
|
setOpen?: (open: DisclosureStoreState["open"]) => void;
|
|
28
31
|
/**
|
|
29
32
|
* A callback that gets called when the `mounted` state changes.
|
|
30
|
-
* @param mounted The new mounted value.
|
|
31
33
|
* @example
|
|
32
34
|
* const [mounted, setMounted] = useState(false);
|
|
33
35
|
* const disclosure = useDisclosureStore({ setMounted });
|
|
@@ -16,11 +16,12 @@ import type { DisclosureStore } from "./disclosure-store.js";
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const useDisclosure: import("../utils/types.js").Hook<DisclosureOptions<"button">>;
|
|
18
18
|
/**
|
|
19
|
-
* Renders an element that controls the visibility of a
|
|
19
|
+
* Renders an element that controls the visibility of a
|
|
20
|
+
* [`DisclosureContent`](https://ariakit.org/reference/disclosure-content)
|
|
20
21
|
* element.
|
|
21
22
|
* @see https://ariakit.org/components/disclosure
|
|
22
23
|
* @example
|
|
23
|
-
* ```jsx
|
|
24
|
+
* ```jsx {2}
|
|
24
25
|
* <DisclosureProvider>
|
|
25
26
|
* <Disclosure>Disclosure</Disclosure>
|
|
26
27
|
* <DisclosureContent>Content</DisclosureContent>
|