@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
|
@@ -9,7 +9,8 @@ export declare function useFormStoreProps<T extends Omit<FormStore, "useValue" |
|
|
|
9
9
|
useSubmit: (callback: Core.FormStoreCallback<FormStoreState<FormStoreValues>>) => void;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* Creates a form store
|
|
12
|
+
* Creates a form store to control the state of
|
|
13
|
+
* [Form](https://ariakit.org/components/form) components.
|
|
13
14
|
* @example
|
|
14
15
|
* ```jsx
|
|
15
16
|
* const form = useFormStore({
|
|
@@ -17,6 +18,7 @@ export declare function useFormStoreProps<T extends Omit<FormStore, "useValue" |
|
|
|
17
18
|
* email: "",
|
|
18
19
|
* },
|
|
19
20
|
* });
|
|
21
|
+
*
|
|
20
22
|
* <Form store={form}>
|
|
21
23
|
* <FormLabel name={form.names.email}>Email</FormLabel>
|
|
22
24
|
* <FormInput name={form.names.email} />
|
|
@@ -36,18 +38,26 @@ export interface FormStoreState<T extends FormStoreValues = FormStoreValues> ext
|
|
|
36
38
|
export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues> extends Core.FormStoreFunctions<T>, CollectionStoreFunctions<FormStoreItem> {
|
|
37
39
|
/**
|
|
38
40
|
* A custom hook that rerenders the component when the value of the given
|
|
39
|
-
* field changes. It
|
|
40
|
-
*
|
|
41
|
+
* field changes. It accepts a string or a reference to a field name from the
|
|
42
|
+
* [`names`](https://ariakit.org/reference/use-form-store#names) object in the
|
|
43
|
+
* store, for type safety. It returns the value of the field.
|
|
44
|
+
*
|
|
45
|
+
* Live examples:
|
|
46
|
+
* - [Form with Select](https://ariakit.org/examples/form-select)
|
|
41
47
|
* @example
|
|
42
48
|
* const nameValue = store.useValue("name");
|
|
43
|
-
* // Can also use store.names for type
|
|
49
|
+
* // Can also use store.names for type safety.
|
|
44
50
|
* const emailValue = store.useValue(store.names.email);
|
|
45
51
|
*/
|
|
46
52
|
useValue: <T = any>(name: StringLike) => T;
|
|
47
53
|
/**
|
|
48
54
|
* Custom hook that accepts a callback that will be used to validate the form
|
|
49
|
-
* when `form
|
|
50
|
-
*
|
|
55
|
+
* when [`validate`](https://ariakit.org/reference/use-form-store#validate) is
|
|
56
|
+
* called, typically when a form field is touched or when the form is
|
|
57
|
+
* submitted.
|
|
58
|
+
*
|
|
59
|
+
* Live examples:
|
|
60
|
+
* - [FormRadio](https://ariakit.org/examples/form-radio)
|
|
51
61
|
* @example
|
|
52
62
|
* store.useValidate(async (state) => {
|
|
53
63
|
* const errors = await api.validate(state.values);
|
|
@@ -59,8 +69,12 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
|
|
|
59
69
|
useValidate: (callback: Core.FormStoreCallback<FormStoreState<T>>) => void;
|
|
60
70
|
/**
|
|
61
71
|
* Custom hook that accepts a callback that will be used to submit the form
|
|
62
|
-
* when `form
|
|
63
|
-
*
|
|
72
|
+
* when [`submit`](https://ariakit.org/reference/use-form-store#submit) is
|
|
73
|
+
* called.
|
|
74
|
+
*
|
|
75
|
+
* Live examples:
|
|
76
|
+
* - [FormRadio](https://ariakit.org/examples/form-radio)
|
|
77
|
+
* - [Form with Select](https://ariakit.org/examples/form-select)
|
|
64
78
|
* @example
|
|
65
79
|
* store.useSubmit(async (state) => {
|
|
66
80
|
* try {
|
|
@@ -74,8 +88,9 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
|
|
|
74
88
|
}
|
|
75
89
|
export interface FormStoreOptions<T extends FormStoreValues = FormStoreValues> extends Core.FormStoreOptions<T>, CollectionStoreOptions<FormStoreItem> {
|
|
76
90
|
/**
|
|
77
|
-
* Function that will be called when
|
|
78
|
-
*
|
|
91
|
+
* Function that will be called when
|
|
92
|
+
* [`values`](https://ariakit.org/reference/use-form-store#values) state
|
|
93
|
+
* changes.
|
|
79
94
|
* @example
|
|
80
95
|
* function MyForm({ values, onChange }) {
|
|
81
96
|
* const form = useFormStore({ values, setValues: onChange });
|
|
@@ -83,15 +98,17 @@ export interface FormStoreOptions<T extends FormStoreValues = FormStoreValues> e
|
|
|
83
98
|
*/
|
|
84
99
|
setValues?: (values: FormStoreState<T>["values"]) => void;
|
|
85
100
|
/**
|
|
86
|
-
* Function that will be called when the
|
|
87
|
-
*
|
|
101
|
+
* Function that will be called when the
|
|
102
|
+
* [`errors`](https://ariakit.org/reference/use-form-store#errors) state
|
|
103
|
+
* changes.
|
|
88
104
|
* @example
|
|
89
105
|
* useFormStore({ setErrors: (errors) => console.log(errors) });
|
|
90
106
|
*/
|
|
91
107
|
setErrors?: (errors: FormStoreState<T>["errors"]) => void;
|
|
92
108
|
/**
|
|
93
|
-
* Function that will be called when the
|
|
94
|
-
*
|
|
109
|
+
* Function that will be called when the
|
|
110
|
+
* [`touched`](https://ariakit.org/reference/use-form-store#touched) state
|
|
111
|
+
* changes.
|
|
95
112
|
* @example
|
|
96
113
|
* useFormStore({ setTouched: (touched) => console.log(touched) });
|
|
97
114
|
*/
|
package/cjs/form/form-store.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export declare function useFormStoreProps<T extends Omit<FormStore, "useValue" |
|
|
|
9
9
|
useSubmit: (callback: Core.FormStoreCallback<FormStoreState<FormStoreValues>>) => void;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* Creates a form store
|
|
12
|
+
* Creates a form store to control the state of
|
|
13
|
+
* [Form](https://ariakit.org/components/form) components.
|
|
13
14
|
* @example
|
|
14
15
|
* ```jsx
|
|
15
16
|
* const form = useFormStore({
|
|
@@ -17,6 +18,7 @@ export declare function useFormStoreProps<T extends Omit<FormStore, "useValue" |
|
|
|
17
18
|
* email: "",
|
|
18
19
|
* },
|
|
19
20
|
* });
|
|
21
|
+
*
|
|
20
22
|
* <Form store={form}>
|
|
21
23
|
* <FormLabel name={form.names.email}>Email</FormLabel>
|
|
22
24
|
* <FormInput name={form.names.email} />
|
|
@@ -36,18 +38,26 @@ export interface FormStoreState<T extends FormStoreValues = FormStoreValues> ext
|
|
|
36
38
|
export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues> extends Core.FormStoreFunctions<T>, CollectionStoreFunctions<FormStoreItem> {
|
|
37
39
|
/**
|
|
38
40
|
* A custom hook that rerenders the component when the value of the given
|
|
39
|
-
* field changes. It
|
|
40
|
-
*
|
|
41
|
+
* field changes. It accepts a string or a reference to a field name from the
|
|
42
|
+
* [`names`](https://ariakit.org/reference/use-form-store#names) object in the
|
|
43
|
+
* store, for type safety. It returns the value of the field.
|
|
44
|
+
*
|
|
45
|
+
* Live examples:
|
|
46
|
+
* - [Form with Select](https://ariakit.org/examples/form-select)
|
|
41
47
|
* @example
|
|
42
48
|
* const nameValue = store.useValue("name");
|
|
43
|
-
* // Can also use store.names for type
|
|
49
|
+
* // Can also use store.names for type safety.
|
|
44
50
|
* const emailValue = store.useValue(store.names.email);
|
|
45
51
|
*/
|
|
46
52
|
useValue: <T = any>(name: StringLike) => T;
|
|
47
53
|
/**
|
|
48
54
|
* Custom hook that accepts a callback that will be used to validate the form
|
|
49
|
-
* when `form
|
|
50
|
-
*
|
|
55
|
+
* when [`validate`](https://ariakit.org/reference/use-form-store#validate) is
|
|
56
|
+
* called, typically when a form field is touched or when the form is
|
|
57
|
+
* submitted.
|
|
58
|
+
*
|
|
59
|
+
* Live examples:
|
|
60
|
+
* - [FormRadio](https://ariakit.org/examples/form-radio)
|
|
51
61
|
* @example
|
|
52
62
|
* store.useValidate(async (state) => {
|
|
53
63
|
* const errors = await api.validate(state.values);
|
|
@@ -59,8 +69,12 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
|
|
|
59
69
|
useValidate: (callback: Core.FormStoreCallback<FormStoreState<T>>) => void;
|
|
60
70
|
/**
|
|
61
71
|
* Custom hook that accepts a callback that will be used to submit the form
|
|
62
|
-
* when `form
|
|
63
|
-
*
|
|
72
|
+
* when [`submit`](https://ariakit.org/reference/use-form-store#submit) is
|
|
73
|
+
* called.
|
|
74
|
+
*
|
|
75
|
+
* Live examples:
|
|
76
|
+
* - [FormRadio](https://ariakit.org/examples/form-radio)
|
|
77
|
+
* - [Form with Select](https://ariakit.org/examples/form-select)
|
|
64
78
|
* @example
|
|
65
79
|
* store.useSubmit(async (state) => {
|
|
66
80
|
* try {
|
|
@@ -74,8 +88,9 @@ export interface FormStoreFunctions<T extends FormStoreValues = FormStoreValues>
|
|
|
74
88
|
}
|
|
75
89
|
export interface FormStoreOptions<T extends FormStoreValues = FormStoreValues> extends Core.FormStoreOptions<T>, CollectionStoreOptions<FormStoreItem> {
|
|
76
90
|
/**
|
|
77
|
-
* Function that will be called when
|
|
78
|
-
*
|
|
91
|
+
* Function that will be called when
|
|
92
|
+
* [`values`](https://ariakit.org/reference/use-form-store#values) state
|
|
93
|
+
* changes.
|
|
79
94
|
* @example
|
|
80
95
|
* function MyForm({ values, onChange }) {
|
|
81
96
|
* const form = useFormStore({ values, setValues: onChange });
|
|
@@ -83,15 +98,17 @@ export interface FormStoreOptions<T extends FormStoreValues = FormStoreValues> e
|
|
|
83
98
|
*/
|
|
84
99
|
setValues?: (values: FormStoreState<T>["values"]) => void;
|
|
85
100
|
/**
|
|
86
|
-
* Function that will be called when the
|
|
87
|
-
*
|
|
101
|
+
* Function that will be called when the
|
|
102
|
+
* [`errors`](https://ariakit.org/reference/use-form-store#errors) state
|
|
103
|
+
* changes.
|
|
88
104
|
* @example
|
|
89
105
|
* useFormStore({ setErrors: (errors) => console.log(errors) });
|
|
90
106
|
*/
|
|
91
107
|
setErrors?: (errors: FormStoreState<T>["errors"]) => void;
|
|
92
108
|
/**
|
|
93
|
-
* Function that will be called when the
|
|
94
|
-
*
|
|
109
|
+
* Function that will be called when the
|
|
110
|
+
* [`touched`](https://ariakit.org/reference/use-form-store#touched) state
|
|
111
|
+
* changes.
|
|
95
112
|
* @example
|
|
96
113
|
* useFormStore({ setTouched: (touched) => console.log(touched) });
|
|
97
114
|
*/
|
|
@@ -15,11 +15,17 @@ import type { FormStore } from "./form-store.js";
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const useFormSubmit: import("../utils/types.js").Hook<FormSubmitOptions<"button">>;
|
|
17
17
|
/**
|
|
18
|
-
* Renders a submit
|
|
18
|
+
* Renders a native submit button inside a form. The button will be
|
|
19
|
+
* [`disabled`](https://ariakit.org/reference/form-submit#disabled) while the
|
|
20
|
+
* form is submitting, but it will remain accessible to keyboard and screen
|
|
21
|
+
* reader users thanks to the
|
|
22
|
+
* [`accessibleWhenDisabled`](https://ariakit.org/reference/form-submit#accessiblewhendisabled)
|
|
23
|
+
* prop that's enabled by default.
|
|
19
24
|
* @see https://ariakit.org/components/form
|
|
20
25
|
* @example
|
|
21
|
-
* ```jsx
|
|
26
|
+
* ```jsx {4}
|
|
22
27
|
* const form = useFormStore();
|
|
28
|
+
*
|
|
23
29
|
* <Form store={form}>
|
|
24
30
|
* <FormSubmit>Submit</FormSubmit>
|
|
25
31
|
* </Form>
|
|
@@ -15,11 +15,17 @@ import type { FormStore } from "./form-store.js";
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const useFormSubmit: import("../utils/types.js").Hook<FormSubmitOptions<"button">>;
|
|
17
17
|
/**
|
|
18
|
-
* Renders a submit
|
|
18
|
+
* Renders a native submit button inside a form. The button will be
|
|
19
|
+
* [`disabled`](https://ariakit.org/reference/form-submit#disabled) while the
|
|
20
|
+
* form is submitting, but it will remain accessible to keyboard and screen
|
|
21
|
+
* reader users thanks to the
|
|
22
|
+
* [`accessibleWhenDisabled`](https://ariakit.org/reference/form-submit#accessiblewhendisabled)
|
|
23
|
+
* prop that's enabled by default.
|
|
19
24
|
* @see https://ariakit.org/components/form
|
|
20
25
|
* @example
|
|
21
|
-
* ```jsx
|
|
26
|
+
* ```jsx {4}
|
|
22
27
|
* const form = useFormStore();
|
|
28
|
+
*
|
|
23
29
|
* <Form store={form}>
|
|
24
30
|
* <FormSubmit>Submit</FormSubmit>
|
|
25
31
|
* </Form>
|
package/cjs/form/form.d.cts
CHANGED
|
@@ -12,11 +12,29 @@ import type { FormStore } from "./form-store.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const useForm: import("../utils/types.js").Hook<FormOptions<"form">>;
|
|
14
14
|
/**
|
|
15
|
-
* Renders a form element
|
|
15
|
+
* Renders a form element and provides a [form
|
|
16
|
+
* store](https://ariakit.org/reference/use-form-store) to its controls.
|
|
17
|
+
*
|
|
18
|
+
* The form is automatically validated on change and on blur. This behavior can
|
|
19
|
+
* be disabled with the
|
|
20
|
+
* [`validateOnChange`](https://ariakit.org/reference/form#validateonchange) and
|
|
21
|
+
* [`validateOnBlur`](https://ariakit.org/reference/form#validateonblur) props.
|
|
22
|
+
*
|
|
23
|
+
* When the form is submitted with errors, the first invalid field is
|
|
24
|
+
* automatically focused thanks to the
|
|
25
|
+
* [`autoFocusOnSubmit`](https://ariakit.org/reference/form#autofocusonsubmit)
|
|
26
|
+
* prop. If it's successful, the
|
|
27
|
+
* [`resetOnSubmit`](https://ariakit.org/reference/form#resetonsubmit) prop
|
|
28
|
+
* ensures the form is reset to its initial values as defined by the
|
|
29
|
+
* [`defaultValues`](https://ariakit.org/reference/use-form-store#defaultvalues)
|
|
30
|
+
* option on the [store](https://ariakit.org/reference/use-form-store).
|
|
16
31
|
* @see https://ariakit.org/components/form
|
|
17
32
|
* @example
|
|
18
|
-
* ```jsx
|
|
19
|
-
* const form = useFormStore({
|
|
33
|
+
* ```jsx {5-8}
|
|
34
|
+
* const form = useFormStore({
|
|
35
|
+
* defaultValues: { username: "johndoe" },
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
20
38
|
* <Form store={form}>
|
|
21
39
|
* <FormLabel name={form.names.username}>Username</FormLabel>
|
|
22
40
|
* <FormInput name={form.names.username} />
|
|
@@ -34,32 +52,40 @@ export interface FormOptions<T extends As = "form"> extends Options<T> {
|
|
|
34
52
|
*/
|
|
35
53
|
store?: FormStore;
|
|
36
54
|
/**
|
|
37
|
-
*
|
|
55
|
+
* Determines if the form should invoke the validation callbacks registered
|
|
56
|
+
* with
|
|
57
|
+
* [`useValidate`](https://ariakit.org/reference/use-form-store#usevalidate)
|
|
58
|
+
* when the [`values`](https://ariakit.org/reference/use-form-store#values)
|
|
38
59
|
* change.
|
|
39
60
|
* @default true
|
|
40
61
|
*/
|
|
41
62
|
validateOnChange?: boolean;
|
|
42
63
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
64
|
+
* Determines if the form should invoke the validation callbacks registered
|
|
65
|
+
* with
|
|
66
|
+
* [`useValidate`](https://ariakit.org/reference/use-form-store#usevalidate)
|
|
67
|
+
* when a field loses focus.
|
|
45
68
|
* @default true
|
|
46
69
|
*/
|
|
47
70
|
validateOnBlur?: boolean;
|
|
48
71
|
/**
|
|
49
|
-
*
|
|
72
|
+
* Determines if the form state should reset to its
|
|
73
|
+
* [`defaultValues`](https://ariakit.org/reference/use-form-store#defaultvalues)
|
|
74
|
+
* when the [`Form`](https://ariakit.org/reference/form) component is
|
|
50
75
|
* unmounted.
|
|
51
76
|
* @default false
|
|
52
77
|
*/
|
|
53
78
|
resetOnUnmount?: boolean;
|
|
54
79
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
80
|
+
* Determines if the form state should be reset to its
|
|
81
|
+
* [`defaultValues`](https://ariakit.org/reference/use-form-store#defaultvalues)
|
|
82
|
+
* upon successful form submission.
|
|
57
83
|
* @default true
|
|
58
84
|
*/
|
|
59
85
|
resetOnSubmit?: boolean;
|
|
60
86
|
/**
|
|
61
|
-
*
|
|
62
|
-
* the form
|
|
87
|
+
* Determines if the form should automatically focus on the first invalid
|
|
88
|
+
* field when the form is submitted.
|
|
63
89
|
* @default true
|
|
64
90
|
*/
|
|
65
91
|
autoFocusOnSubmit?: boolean;
|
package/cjs/form/form.d.ts
CHANGED
|
@@ -12,11 +12,29 @@ import type { FormStore } from "./form-store.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const useForm: import("../utils/types.js").Hook<FormOptions<"form">>;
|
|
14
14
|
/**
|
|
15
|
-
* Renders a form element
|
|
15
|
+
* Renders a form element and provides a [form
|
|
16
|
+
* store](https://ariakit.org/reference/use-form-store) to its controls.
|
|
17
|
+
*
|
|
18
|
+
* The form is automatically validated on change and on blur. This behavior can
|
|
19
|
+
* be disabled with the
|
|
20
|
+
* [`validateOnChange`](https://ariakit.org/reference/form#validateonchange) and
|
|
21
|
+
* [`validateOnBlur`](https://ariakit.org/reference/form#validateonblur) props.
|
|
22
|
+
*
|
|
23
|
+
* When the form is submitted with errors, the first invalid field is
|
|
24
|
+
* automatically focused thanks to the
|
|
25
|
+
* [`autoFocusOnSubmit`](https://ariakit.org/reference/form#autofocusonsubmit)
|
|
26
|
+
* prop. If it's successful, the
|
|
27
|
+
* [`resetOnSubmit`](https://ariakit.org/reference/form#resetonsubmit) prop
|
|
28
|
+
* ensures the form is reset to its initial values as defined by the
|
|
29
|
+
* [`defaultValues`](https://ariakit.org/reference/use-form-store#defaultvalues)
|
|
30
|
+
* option on the [store](https://ariakit.org/reference/use-form-store).
|
|
16
31
|
* @see https://ariakit.org/components/form
|
|
17
32
|
* @example
|
|
18
|
-
* ```jsx
|
|
19
|
-
* const form = useFormStore({
|
|
33
|
+
* ```jsx {5-8}
|
|
34
|
+
* const form = useFormStore({
|
|
35
|
+
* defaultValues: { username: "johndoe" },
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
20
38
|
* <Form store={form}>
|
|
21
39
|
* <FormLabel name={form.names.username}>Username</FormLabel>
|
|
22
40
|
* <FormInput name={form.names.username} />
|
|
@@ -34,32 +52,40 @@ export interface FormOptions<T extends As = "form"> extends Options<T> {
|
|
|
34
52
|
*/
|
|
35
53
|
store?: FormStore;
|
|
36
54
|
/**
|
|
37
|
-
*
|
|
55
|
+
* Determines if the form should invoke the validation callbacks registered
|
|
56
|
+
* with
|
|
57
|
+
* [`useValidate`](https://ariakit.org/reference/use-form-store#usevalidate)
|
|
58
|
+
* when the [`values`](https://ariakit.org/reference/use-form-store#values)
|
|
38
59
|
* change.
|
|
39
60
|
* @default true
|
|
40
61
|
*/
|
|
41
62
|
validateOnChange?: boolean;
|
|
42
63
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
64
|
+
* Determines if the form should invoke the validation callbacks registered
|
|
65
|
+
* with
|
|
66
|
+
* [`useValidate`](https://ariakit.org/reference/use-form-store#usevalidate)
|
|
67
|
+
* when a field loses focus.
|
|
45
68
|
* @default true
|
|
46
69
|
*/
|
|
47
70
|
validateOnBlur?: boolean;
|
|
48
71
|
/**
|
|
49
|
-
*
|
|
72
|
+
* Determines if the form state should reset to its
|
|
73
|
+
* [`defaultValues`](https://ariakit.org/reference/use-form-store#defaultvalues)
|
|
74
|
+
* when the [`Form`](https://ariakit.org/reference/form) component is
|
|
50
75
|
* unmounted.
|
|
51
76
|
* @default false
|
|
52
77
|
*/
|
|
53
78
|
resetOnUnmount?: boolean;
|
|
54
79
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
80
|
+
* Determines if the form state should be reset to its
|
|
81
|
+
* [`defaultValues`](https://ariakit.org/reference/use-form-store#defaultvalues)
|
|
82
|
+
* upon successful form submission.
|
|
57
83
|
* @default true
|
|
58
84
|
*/
|
|
59
85
|
resetOnSubmit?: boolean;
|
|
60
86
|
/**
|
|
61
|
-
*
|
|
62
|
-
* the form
|
|
87
|
+
* Determines if the form should automatically focus on the first invalid
|
|
88
|
+
* field when the form is submitted.
|
|
63
89
|
* @default true
|
|
64
90
|
*/
|
|
65
91
|
autoFocusOnSubmit?: boolean;
|
|
@@ -13,8 +13,9 @@ import type { As, Options, Props } from "../utils/types.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const useGroupLabel: import("../utils/types.js").Hook<GroupLabelOptions<"div">>;
|
|
15
15
|
/**
|
|
16
|
-
* Renders a label in a group. This component
|
|
17
|
-
* the `aria-labelledby`
|
|
16
|
+
* Renders a label in a group. This component should be wrapped with a
|
|
17
|
+
* [`Group`](https://ariakit.org/reference/group) so the `aria-labelledby`
|
|
18
|
+
* prop is correctly set on the group element.
|
|
18
19
|
* @see https://ariakit.org/components/group
|
|
19
20
|
* @example
|
|
20
21
|
* ```jsx
|
|
@@ -13,8 +13,9 @@ import type { As, Options, Props } from "../utils/types.js";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const useGroupLabel: import("../utils/types.js").Hook<GroupLabelOptions<"div">>;
|
|
15
15
|
/**
|
|
16
|
-
* Renders a label in a group. This component
|
|
17
|
-
* the `aria-labelledby`
|
|
16
|
+
* Renders a label in a group. This component should be wrapped with a
|
|
17
|
+
* [`Group`](https://ariakit.org/reference/group) so the `aria-labelledby`
|
|
18
|
+
* prop is correctly set on the group element.
|
|
18
19
|
* @see https://ariakit.org/components/group
|
|
19
20
|
* @example
|
|
20
21
|
* ```jsx
|
package/cjs/group/group.d.cts
CHANGED
|
@@ -10,7 +10,9 @@ import type { As, Options, Props } from "../utils/types.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const useGroup: import("../utils/types.js").Hook<GroupOptions<"div">>;
|
|
12
12
|
/**
|
|
13
|
-
* Renders a group element.
|
|
13
|
+
* Renders a group element. Optionally, a
|
|
14
|
+
* [`GroupLabel`](https://ariakit.org/reference/group-label) can be rendered as
|
|
15
|
+
* a child to provide a label for the group.
|
|
14
16
|
* @see https://ariakit.org/components/group
|
|
15
17
|
* @example
|
|
16
18
|
* ```jsx
|
package/cjs/group/group.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ import type { As, Options, Props } from "../utils/types.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const useGroup: import("../utils/types.js").Hook<GroupOptions<"div">>;
|
|
12
12
|
/**
|
|
13
|
-
* Renders a group element.
|
|
13
|
+
* Renders a group element. Optionally, a
|
|
14
|
+
* [`GroupLabel`](https://ariakit.org/reference/group-label) can be rendered as
|
|
15
|
+
* a child to provide a label for the group.
|
|
14
16
|
* @see https://ariakit.org/components/group
|
|
15
17
|
* @example
|
|
16
18
|
* ```jsx
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { HeadingLevels } from "./utils.js";
|
|
3
3
|
/**
|
|
4
|
-
* A component that sets the heading level for
|
|
5
|
-
* any HTML element, just sets the
|
|
4
|
+
* A component that sets the heading level for its children. It doesn't render
|
|
5
|
+
* any HTML element, just sets the
|
|
6
|
+
* [`level`](https://ariakit.org/reference/heading-level#level) prop on the
|
|
7
|
+
* context.
|
|
6
8
|
* @see https://ariakit.org/components/heading
|
|
7
9
|
* @example
|
|
8
10
|
* ```jsx
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { HeadingLevels } from "./utils.js";
|
|
3
3
|
/**
|
|
4
|
-
* A component that sets the heading level for
|
|
5
|
-
* any HTML element, just sets the
|
|
4
|
+
* A component that sets the heading level for its children. It doesn't render
|
|
5
|
+
* any HTML element, just sets the
|
|
6
|
+
* [`level`](https://ariakit.org/reference/heading-level#level) prop on the
|
|
7
|
+
* context.
|
|
6
8
|
* @see https://ariakit.org/components/heading
|
|
7
9
|
* @example
|
|
8
10
|
* ```jsx
|
|
@@ -14,9 +14,10 @@ type HeadingElements = `h${HeadingLevels}`;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const useHeading: import("../utils/types.js").Hook<HeadingOptions<"h1" | "h2" | "h3" | "h4" | "h5" | "h6">>;
|
|
16
16
|
/**
|
|
17
|
-
* Renders a heading element. The element type (or the `aria-level`
|
|
18
|
-
* element type is not a native heading) is determined by the context
|
|
19
|
-
* provided by the
|
|
17
|
+
* Renders a heading element. The element type (or the `aria-level` attribute,
|
|
18
|
+
* if the element type is not a native heading) is determined by the context
|
|
19
|
+
* level provided by the closest
|
|
20
|
+
* [`HeadingLevel`](https://ariakit.org/reference/heading-level) ancestor.
|
|
20
21
|
* @see https://ariakit.org/components/heading
|
|
21
22
|
* @example
|
|
22
23
|
* ```jsx
|
package/cjs/heading/heading.d.ts
CHANGED
|
@@ -14,9 +14,10 @@ type HeadingElements = `h${HeadingLevels}`;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const useHeading: import("../utils/types.js").Hook<HeadingOptions<"h1" | "h2" | "h3" | "h4" | "h5" | "h6">>;
|
|
16
16
|
/**
|
|
17
|
-
* Renders a heading element. The element type (or the `aria-level`
|
|
18
|
-
* element type is not a native heading) is determined by the context
|
|
19
|
-
* provided by the
|
|
17
|
+
* Renders a heading element. The element type (or the `aria-level` attribute,
|
|
18
|
+
* if the element type is not a native heading) is determined by the context
|
|
19
|
+
* level provided by the closest
|
|
20
|
+
* [`HeadingLevel`](https://ariakit.org/reference/heading-level) ancestor.
|
|
20
21
|
* @see https://ariakit.org/components/heading
|
|
21
22
|
* @example
|
|
22
23
|
* ```jsx
|
|
@@ -20,7 +20,7 @@ export declare const useHovercardAnchor: import("../utils/types.js").Hook<Hoverc
|
|
|
20
20
|
* [`Hovercard`](https://ariakit.org/reference/hovercard) popup on hover.
|
|
21
21
|
* @see https://ariakit.org/components/hovercard
|
|
22
22
|
* @example
|
|
23
|
-
* ```jsx
|
|
23
|
+
* ```jsx {2}
|
|
24
24
|
* <HovercardProvider>
|
|
25
25
|
* <HovercardAnchor>@username</HovercardAnchor>
|
|
26
26
|
* <Hovercard>Details</Hovercard>
|
|
@@ -38,10 +38,13 @@ export interface HovercardAnchorOptions<T extends As = "a"> extends FocusableOpt
|
|
|
38
38
|
*/
|
|
39
39
|
store?: HovercardStore;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Shows the content element based on the user's _hover intent_ over the
|
|
42
|
+
* anchor element. This behavior purposely ignores mobile touch and
|
|
43
|
+
* unintentional mouse enter events, like those that happen during scrolling.
|
|
42
44
|
*
|
|
43
45
|
* Live examples:
|
|
44
46
|
* - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
|
|
47
|
+
* - [Sliding Menu](https://ariakit.org/examples/menu-slide)
|
|
45
48
|
* @default true
|
|
46
49
|
*/
|
|
47
50
|
showOnHover?: BooleanOrCallback<ReactMouseEvent<HTMLElement>>;
|
|
@@ -20,7 +20,7 @@ export declare const useHovercardAnchor: import("../utils/types.js").Hook<Hoverc
|
|
|
20
20
|
* [`Hovercard`](https://ariakit.org/reference/hovercard) popup on hover.
|
|
21
21
|
* @see https://ariakit.org/components/hovercard
|
|
22
22
|
* @example
|
|
23
|
-
* ```jsx
|
|
23
|
+
* ```jsx {2}
|
|
24
24
|
* <HovercardProvider>
|
|
25
25
|
* <HovercardAnchor>@username</HovercardAnchor>
|
|
26
26
|
* <Hovercard>Details</Hovercard>
|
|
@@ -38,10 +38,13 @@ export interface HovercardAnchorOptions<T extends As = "a"> extends FocusableOpt
|
|
|
38
38
|
*/
|
|
39
39
|
store?: HovercardStore;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Shows the content element based on the user's _hover intent_ over the
|
|
42
|
+
* anchor element. This behavior purposely ignores mobile touch and
|
|
43
|
+
* unintentional mouse enter events, like those that happen during scrolling.
|
|
42
44
|
*
|
|
43
45
|
* Live examples:
|
|
44
46
|
* - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
|
|
47
|
+
* - [Sliding Menu](https://ariakit.org/examples/menu-slide)
|
|
45
48
|
* @default true
|
|
46
49
|
*/
|
|
47
50
|
showOnHover?: BooleanOrCallback<ReactMouseEvent<HTMLElement>>;
|
|
@@ -16,10 +16,12 @@ import type { HovercardStore } from "./hovercard-store.js";
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const useHovercardArrow: import("../utils/types.js").Hook<HovercardArrowOptions<"div">>;
|
|
18
18
|
/**
|
|
19
|
-
* Renders an arrow element
|
|
19
|
+
* Renders an arrow element inside a
|
|
20
|
+
* [`Hovercard`](https://ariakit.org/reference/hovercard) component that points
|
|
21
|
+
* to the anchor element.
|
|
20
22
|
* @see https://ariakit.org/components/hovercard
|
|
21
23
|
* @example
|
|
22
|
-
* ```jsx
|
|
24
|
+
* ```jsx {4}
|
|
23
25
|
* <HovercardProvider>
|
|
24
26
|
* <HovercardAnchor>@username</HovercardAnchor>
|
|
25
27
|
* <Hovercard>
|
|
@@ -16,10 +16,12 @@ import type { HovercardStore } from "./hovercard-store.js";
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const useHovercardArrow: import("../utils/types.js").Hook<HovercardArrowOptions<"div">>;
|
|
18
18
|
/**
|
|
19
|
-
* Renders an arrow element
|
|
19
|
+
* Renders an arrow element inside a
|
|
20
|
+
* [`Hovercard`](https://ariakit.org/reference/hovercard) component that points
|
|
21
|
+
* to the anchor element.
|
|
20
22
|
* @see https://ariakit.org/components/hovercard
|
|
21
23
|
* @example
|
|
22
|
-
* ```jsx
|
|
24
|
+
* ```jsx {4}
|
|
23
25
|
* <HovercardProvider>
|
|
24
26
|
* <HovercardAnchor>@username</HovercardAnchor>
|
|
25
27
|
* <Hovercard>
|
|
@@ -17,10 +17,10 @@ export declare const useHovercardDescription: import("../utils/types.js").Hook<H
|
|
|
17
17
|
/**
|
|
18
18
|
* Renders a description in a hovercard. This component must be wrapped within
|
|
19
19
|
* [`Hovercard`](https://ariakit.org/reference/hovercard) so the
|
|
20
|
-
* `aria-describedby` prop is properly set on the
|
|
20
|
+
* `aria-describedby` prop is properly set on the content element.
|
|
21
21
|
* @see https://ariakit.org/components/hovercard
|
|
22
22
|
* @example
|
|
23
|
-
* ```jsx
|
|
23
|
+
* ```jsx {3}
|
|
24
24
|
* <HovercardProvider>
|
|
25
25
|
* <Hovercard>
|
|
26
26
|
* <HovercardDescription>Description</HovercardDescription>
|
|
@@ -17,10 +17,10 @@ export declare const useHovercardDescription: import("../utils/types.js").Hook<H
|
|
|
17
17
|
/**
|
|
18
18
|
* Renders a description in a hovercard. This component must be wrapped within
|
|
19
19
|
* [`Hovercard`](https://ariakit.org/reference/hovercard) so the
|
|
20
|
-
* `aria-describedby` prop is properly set on the
|
|
20
|
+
* `aria-describedby` prop is properly set on the content element.
|
|
21
21
|
* @see https://ariakit.org/components/hovercard
|
|
22
22
|
* @example
|
|
23
|
-
* ```jsx
|
|
23
|
+
* ```jsx {3}
|
|
24
24
|
* <HovercardProvider>
|
|
25
25
|
* <Hovercard>
|
|
26
26
|
* <HovercardDescription>Description</HovercardDescription>
|
|
@@ -21,7 +21,7 @@ export declare const useHovercardDisclosure: import("../utils/types.js").Hook<Ho
|
|
|
21
21
|
* hovercard when using the keyboard.
|
|
22
22
|
* @see https://ariakit.org/components/hovercard
|
|
23
23
|
* @example
|
|
24
|
-
* ```jsx
|
|
24
|
+
* ```jsx {3}
|
|
25
25
|
* <HovercardProvider>
|
|
26
26
|
* <HovercardAnchor>@username</HovercardAnchor>
|
|
27
27
|
* <HovercardDisclosure />
|
|
@@ -21,7 +21,7 @@ export declare const useHovercardDisclosure: import("../utils/types.js").Hook<Ho
|
|
|
21
21
|
* hovercard when using the keyboard.
|
|
22
22
|
* @see https://ariakit.org/components/hovercard
|
|
23
23
|
* @example
|
|
24
|
-
* ```jsx
|
|
24
|
+
* ```jsx {3}
|
|
25
25
|
* <HovercardProvider>
|
|
26
26
|
* <HovercardAnchor>@username</HovercardAnchor>
|
|
27
27
|
* <HovercardDisclosure />
|