@funstack/ui 0.1.0-alpha.21 → 0.1.0-alpha.23
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/dist/accordion/accordion-context.mjs +1 -2
- package/dist/accordion/accordion-item.d.mts +1 -3
- package/dist/accordion/accordion-item.d.mts.map +1 -1
- package/dist/accordion/accordion-item.mjs +14 -8
- package/dist/accordion/accordion-item.mjs.map +1 -1
- package/dist/accordion/accordion-panel.d.mts +1 -3
- package/dist/accordion/accordion-panel.d.mts.map +1 -1
- package/dist/accordion/accordion-panel.mjs +3 -4
- package/dist/accordion/accordion-root.d.mts +1 -3
- package/dist/accordion/accordion-root.d.mts.map +1 -1
- package/dist/accordion/accordion-root.mjs +12 -15
- package/dist/accordion/accordion-root.mjs.map +1 -1
- package/dist/accordion/accordion-trigger.d.mts +1 -3
- package/dist/accordion/accordion-trigger.d.mts.map +1 -1
- package/dist/accordion/accordion-trigger.mjs +4 -5
- package/dist/accordion/index.d.mts +0 -2
- package/dist/accordion/index.d.mts.map +1 -1
- package/dist/accordion/index.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-action.d.mts +5 -5
- package/dist/alert-dialog/alert-dialog-action.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-action.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-action.mjs.map +1 -1
- package/dist/alert-dialog/alert-dialog-cancel.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-cancel.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-cancel.mjs +4 -5
- package/dist/alert-dialog/alert-dialog-context.mjs +2 -3
- package/dist/alert-dialog/alert-dialog-description.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-description.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-description.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-form.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-form.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-form.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-popup.d.mts +1 -3
- package/dist/alert-dialog/alert-dialog-popup.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-popup.mjs +3 -4
- package/dist/alert-dialog/alert-dialog-root.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-root.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-root.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-title.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-title.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-title.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-trigger.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-trigger.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-trigger.mjs +1 -2
- package/dist/alert-dialog/index.d.mts +0 -2
- package/dist/alert-dialog/index.d.mts.map +1 -1
- package/dist/alert-dialog/index.mjs +1 -2
- package/dist/avatar/avatar-context.mjs +1 -2
- package/dist/avatar/avatar-fallback.d.mts +1 -3
- package/dist/avatar/avatar-fallback.d.mts.map +1 -1
- package/dist/avatar/avatar-fallback.mjs +1 -2
- package/dist/avatar/avatar-image.d.mts +1 -3
- package/dist/avatar/avatar-image.d.mts.map +1 -1
- package/dist/avatar/avatar-image.mjs +2 -3
- package/dist/avatar/avatar-root.d.mts +1 -3
- package/dist/avatar/avatar-root.d.mts.map +1 -1
- package/dist/avatar/avatar-root.mjs +2 -3
- package/dist/avatar/index.d.mts +1 -3
- package/dist/avatar/index.d.mts.map +1 -1
- package/dist/avatar/index.mjs +1 -2
- package/dist/bin/skill-installer.mjs +1 -2
- package/dist/button/button.d.mts +1 -3
- package/dist/button/button.d.mts.map +1 -1
- package/dist/button/button.mjs +4 -5
- package/dist/checkbox/checkbox.d.mts +1 -3
- package/dist/checkbox/checkbox.d.mts.map +1 -1
- package/dist/checkbox/checkbox.mjs +2 -3
- package/dist/checkbox-group/checkbox-group-context.mjs +1 -2
- package/dist/checkbox-group/checkbox-group-item.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-item.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-item.mjs +5 -6
- package/dist/checkbox-group/checkbox-group-label.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-label.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-label.mjs +1 -2
- package/dist/checkbox-group/checkbox-group-parent.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-parent.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-parent.mjs +7 -8
- package/dist/checkbox-group/checkbox-group-parent.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-root.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.mjs +7 -8
- package/dist/checkbox-group/index.d.mts +1 -3
- package/dist/checkbox-group/index.d.mts.map +1 -1
- package/dist/checkbox-group/index.mjs +1 -2
- package/dist/collapsible/collapsible-context.mjs +1 -2
- package/dist/collapsible/collapsible-panel.d.mts +1 -3
- package/dist/collapsible/collapsible-panel.d.mts.map +1 -1
- package/dist/collapsible/collapsible-panel.mjs +3 -4
- package/dist/collapsible/collapsible-root.d.mts +1 -3
- package/dist/collapsible/collapsible-root.d.mts.map +1 -1
- package/dist/collapsible/collapsible-root.mjs +18 -18
- package/dist/collapsible/collapsible-root.mjs.map +1 -1
- package/dist/collapsible/collapsible-trigger.d.mts +1 -3
- package/dist/collapsible/collapsible-trigger.d.mts.map +1 -1
- package/dist/collapsible/collapsible-trigger.mjs +4 -5
- package/dist/collapsible/index.d.mts +0 -2
- package/dist/collapsible/index.d.mts.map +1 -1
- package/dist/collapsible/index.mjs +1 -2
- package/dist/combobox/chip-text.mjs +1 -2
- package/dist/combobox/combobox-chips.d.mts +1 -3
- package/dist/combobox/combobox-chips.d.mts.map +1 -1
- package/dist/combobox/combobox-chips.mjs +3 -4
- package/dist/combobox/combobox-clear.d.mts +1 -3
- package/dist/combobox/combobox-clear.d.mts.map +1 -1
- package/dist/combobox/combobox-clear.mjs +2 -3
- package/dist/combobox/combobox-context.mjs +1 -2
- package/dist/combobox/combobox-group.d.mts +1 -3
- package/dist/combobox/combobox-group.d.mts.map +1 -1
- package/dist/combobox/combobox-group.mjs +2 -3
- package/dist/combobox/combobox-input.d.mts +1 -3
- package/dist/combobox/combobox-input.d.mts.map +1 -1
- package/dist/combobox/combobox-input.mjs +5 -6
- package/dist/combobox/combobox-keyboard.mjs +2 -3
- package/dist/combobox/combobox-label.d.mts +1 -3
- package/dist/combobox/combobox-label.d.mts.map +1 -1
- package/dist/combobox/combobox-label.mjs +2 -3
- package/dist/combobox/combobox-list.d.mts +1 -3
- package/dist/combobox/combobox-list.d.mts.map +1 -1
- package/dist/combobox/combobox-list.mjs +3 -4
- package/dist/combobox/combobox-option.d.mts +1 -3
- package/dist/combobox/combobox-option.d.mts.map +1 -1
- package/dist/combobox/combobox-option.mjs +2 -3
- package/dist/combobox/combobox-popup.d.mts +1 -3
- package/dist/combobox/combobox-popup.d.mts.map +1 -1
- package/dist/combobox/combobox-popup.mjs +4 -5
- package/dist/combobox/combobox-root.d.mts +1 -3
- package/dist/combobox/combobox-root.d.mts.map +1 -1
- package/dist/combobox/combobox-root.mjs +14 -15
- package/dist/combobox/combobox-trigger.d.mts +1 -3
- package/dist/combobox/combobox-trigger.d.mts.map +1 -1
- package/dist/combobox/combobox-trigger.mjs +5 -6
- package/dist/combobox/index.d.mts +1 -3
- package/dist/combobox/index.d.mts.map +1 -1
- package/dist/combobox/index.mjs +1 -2
- package/dist/combobox/use-combobox-form.mjs +3 -5
- package/dist/combobox/use-combobox-form.mjs.map +1 -1
- package/dist/combobox/use-combobox-text.mjs +3 -4
- package/dist/csp/csp-provider.d.mts +0 -2
- package/dist/csp/csp-provider.d.mts.map +1 -1
- package/dist/csp/csp-provider.mjs +2 -3
- package/dist/csp/style-hashes.d.mts +0 -2
- package/dist/csp/style-hashes.d.mts.map +1 -1
- package/dist/csp/style-hashes.mjs +1 -2
- package/dist/dialog/dialog-close.d.mts +10 -6
- package/dist/dialog/dialog-close.d.mts.map +1 -1
- package/dist/dialog/dialog-close.mjs +5 -5
- package/dist/dialog/dialog-close.mjs.map +1 -1
- package/dist/dialog/dialog-context.mjs +1 -2
- package/dist/dialog/dialog-description.d.mts +1 -3
- package/dist/dialog/dialog-description.d.mts.map +1 -1
- package/dist/dialog/dialog-description.mjs +1 -2
- package/dist/dialog/dialog-dismiss.mjs +51 -21
- package/dist/dialog/dialog-dismiss.mjs.map +1 -1
- package/dist/dialog/dialog-form.d.mts +1 -3
- package/dist/dialog/dialog-form.d.mts.map +1 -1
- package/dist/dialog/dialog-form.mjs +6 -7
- package/dist/dialog/dialog-popup.d.mts +2 -4
- package/dist/dialog/dialog-popup.d.mts.map +1 -1
- package/dist/dialog/dialog-popup.mjs +10 -11
- package/dist/dialog/dialog-root.d.mts +1 -3
- package/dist/dialog/dialog-root.d.mts.map +1 -1
- package/dist/dialog/dialog-root.mjs +3 -4
- package/dist/dialog/dialog-title.d.mts +1 -3
- package/dist/dialog/dialog-title.d.mts.map +1 -1
- package/dist/dialog/dialog-title.mjs +1 -2
- package/dist/dialog/dialog-trigger.d.mts +1 -3
- package/dist/dialog/dialog-trigger.d.mts.map +1 -1
- package/dist/dialog/dialog-trigger.mjs +4 -5
- package/dist/dialog/index.d.mts +1 -3
- package/dist/dialog/index.d.mts.map +1 -1
- package/dist/dialog/index.mjs +1 -2
- package/dist/docs/components/accordion.md +1 -1
- package/dist/docs/components/alert-dialog.md +15 -7
- package/dist/docs/components/collapsible.md +1 -1
- package/dist/docs/components/dialog.md +14 -6
- package/dist/docs/components/drawer.md +3 -3
- package/dist/docs/components/menu.md +4 -4
- package/dist/docs/components/menubar.md +309 -0
- package/dist/docs/components/meter.md +1 -1
- package/dist/docs/components/navigation-menu.md +501 -0
- package/dist/docs/components/number-field.md +2 -2
- package/dist/docs/components/otp-field.md +8 -1
- package/dist/docs/components/popover.md +6 -6
- package/dist/docs/components/progress.md +1 -1
- package/dist/docs/components/radio-group.md +1 -1
- package/dist/docs/components/slider.md +1 -1
- package/dist/docs/concepts/direction-and-locales.md +106 -0
- package/dist/docs/concepts/pending-and-optimistic.md +1 -0
- package/dist/docs/index.md +4 -1
- package/dist/docs/roadmap.md +11 -0
- package/dist/drawer/drawer-close.d.mts +0 -2
- package/dist/drawer/drawer-close.d.mts.map +1 -1
- package/dist/drawer/drawer-close.mjs +1 -2
- package/dist/drawer/drawer-description.d.mts +0 -2
- package/dist/drawer/drawer-description.d.mts.map +1 -1
- package/dist/drawer/drawer-description.mjs +1 -2
- package/dist/drawer/drawer-form.d.mts +0 -2
- package/dist/drawer/drawer-form.d.mts.map +1 -1
- package/dist/drawer/drawer-form.mjs +1 -2
- package/dist/drawer/drawer-popup.d.mts +2 -4
- package/dist/drawer/drawer-popup.d.mts.map +1 -1
- package/dist/drawer/drawer-popup.mjs +3 -4
- package/dist/drawer/drawer-root.d.mts +0 -2
- package/dist/drawer/drawer-root.d.mts.map +1 -1
- package/dist/drawer/drawer-root.mjs +1 -2
- package/dist/drawer/drawer-swipe.d.mts +0 -2
- package/dist/drawer/drawer-swipe.d.mts.map +1 -1
- package/dist/drawer/drawer-swipe.mjs +1 -2
- package/dist/drawer/drawer-swipe.mjs.map +1 -1
- package/dist/drawer/drawer-title.d.mts +0 -2
- package/dist/drawer/drawer-title.d.mts.map +1 -1
- package/dist/drawer/drawer-title.mjs +1 -2
- package/dist/drawer/drawer-trigger.d.mts +0 -2
- package/dist/drawer/drawer-trigger.d.mts.map +1 -1
- package/dist/drawer/drawer-trigger.mjs +1 -2
- package/dist/drawer/index.d.mts +0 -2
- package/dist/drawer/index.d.mts.map +1 -1
- package/dist/drawer/index.mjs +1 -2
- package/dist/field/field-control.d.mts +2 -4
- package/dist/field/field-control.d.mts.map +1 -1
- package/dist/field/field-control.mjs +6 -7
- package/dist/field/field-description.d.mts +2 -4
- package/dist/field/field-description.d.mts.map +1 -1
- package/dist/field/field-description.mjs +2 -3
- package/dist/field/field-error.d.mts +2 -4
- package/dist/field/field-error.d.mts.map +1 -1
- package/dist/field/field-error.mjs +3 -4
- package/dist/field/field-label.d.mts +2 -4
- package/dist/field/field-label.d.mts.map +1 -1
- package/dist/field/field-label.mjs +3 -4
- package/dist/field/field-root.d.mts +2 -4
- package/dist/field/field-root.d.mts.map +1 -1
- package/dist/field/field-root.mjs +11 -16
- package/dist/field/field-root.mjs.map +1 -1
- package/dist/field/index.d.mts +0 -2
- package/dist/field/index.d.mts.map +1 -1
- package/dist/field/index.mjs +1 -2
- package/dist/field/use-server-error-visibility.mjs +1 -2
- package/dist/form/form-root.d.mts +1 -3
- package/dist/form/form-root.d.mts.map +1 -1
- package/dist/form/form-root.mjs +8 -9
- package/dist/form/form-submit.d.mts +1 -3
- package/dist/form/form-submit.d.mts.map +1 -1
- package/dist/form/form-submit.mjs +3 -4
- package/dist/form/index.d.mts +0 -2
- package/dist/form/index.d.mts.map +1 -1
- package/dist/form/index.mjs +1 -2
- package/dist/hover-card/hover-card-context.mjs +1 -2
- package/dist/hover-card/hover-card-popup.d.mts +2 -4
- package/dist/hover-card/hover-card-popup.d.mts.map +1 -1
- package/dist/hover-card/hover-card-popup.mjs +6 -7
- package/dist/hover-card/hover-card-root.d.mts +1 -3
- package/dist/hover-card/hover-card-root.d.mts.map +1 -1
- package/dist/hover-card/hover-card-root.mjs +3 -4
- package/dist/hover-card/hover-card-trigger.d.mts +1 -3
- package/dist/hover-card/hover-card-trigger.d.mts.map +1 -1
- package/dist/hover-card/hover-card-trigger.mjs +5 -6
- package/dist/hover-card/index.d.mts +0 -2
- package/dist/hover-card/index.d.mts.map +1 -1
- package/dist/hover-card/index.mjs +1 -2
- package/dist/hover-card/use-hover-card-interest.mjs +14 -8
- package/dist/hover-card/use-hover-card-interest.mjs.map +1 -1
- package/dist/index.d.mts +50 -35
- package/dist/index.mjs +3 -1
- package/dist/internal/action/action-details.mjs +1 -2
- package/dist/internal/action/call-urgent-handler.mjs +1 -2
- package/dist/internal/action/report-dropped.mjs +1 -2
- package/dist/internal/action/use-action-trigger.mjs +2 -3
- package/dist/internal/action/use-connected.mjs +1 -2
- package/dist/internal/action/use-controllable-action.mjs +4 -5
- package/dist/internal/action/use-multiple-selection.mjs +4 -5
- package/dist/internal/action/use-pure-trigger.mjs +1 -2
- package/dist/internal/action/use-pure-trigger.mjs.map +1 -1
- package/dist/internal/action/use-step-commit.mjs +3 -4
- package/dist/internal/after-dispatch.mjs +23 -0
- package/dist/internal/after-dispatch.mjs.map +1 -0
- package/dist/internal/announce.mjs +1 -2
- package/dist/internal/arrow-keys.mjs +1 -2
- package/dist/internal/csp-context.mjs +1 -2
- package/dist/internal/data-attr.mjs +1 -2
- package/dist/internal/decimal.mjs +1 -2
- package/dist/internal/details-summary.mjs +51 -3
- package/dist/internal/details-summary.mjs.map +1 -1
- package/dist/internal/dev-warn.mjs +1 -2
- package/dist/internal/dom-order.mjs +1 -2
- package/dist/internal/form/field-context.d.mts +0 -2
- package/dist/internal/form/field-context.d.mts.map +1 -1
- package/dist/internal/form/field-context.mjs +2 -3
- package/dist/internal/form/focus-first-invalid.mjs +2 -3
- package/dist/internal/form/form-status-watcher.mjs +1 -2
- package/dist/internal/form/group-member.mjs +1 -2
- package/dist/internal/form/hidden-values.mjs +1 -2
- package/dist/internal/form/sync-presence.mjs +1 -2
- package/dist/internal/form/use-checkable-input.mjs +2 -3
- package/dist/internal/form/use-field-control.mjs +3 -4
- package/dist/internal/form/use-fieldset-group.mjs +3 -4
- package/dist/internal/form/use-form-owner-event.mjs +1 -2
- package/dist/internal/form/use-form-reset.mjs +10 -8
- package/dist/internal/form/use-form-reset.mjs.map +1 -1
- package/dist/internal/form/use-native-checked.mjs +2 -3
- package/dist/internal/form/use-native-group-reconciliation.mjs +3 -4
- package/dist/internal/form/use-native-select-value.mjs +2 -3
- package/dist/internal/form/validity.d.mts +0 -2
- package/dist/internal/form/validity.d.mts.map +1 -1
- package/dist/internal/form/validity.mjs +1 -2
- package/dist/internal/menubar-context.mjs +11 -0
- package/dist/internal/menubar-context.mjs.map +1 -0
- package/dist/internal/merge-props.mjs +1 -2
- package/dist/internal/overlay/anchor-position.d.mts +0 -2
- package/dist/internal/overlay/anchor-position.d.mts.map +1 -1
- package/dist/internal/overlay/anchor-position.mjs +1 -2
- package/dist/internal/overlay/content-focus-probe.mjs +1 -2
- package/dist/internal/overlay/css-transition-cut.mjs +1 -2
- package/dist/internal/overlay/css-transition-cut.mjs.map +1 -1
- package/dist/internal/overlay/focus-visible.mjs +1 -2
- package/dist/internal/overlay/invokers.mjs +1 -2
- package/dist/internal/overlay/modal-registry.mjs +1 -2
- package/dist/internal/overlay/overlay-popup.mjs +2 -3
- package/dist/internal/overlay/overlay-show.mjs +1 -2
- package/dist/internal/overlay/popover-open.mjs +1 -2
- package/dist/internal/overlay/trigger-ref.mjs +2 -3
- package/dist/internal/overlay/trigger-ref.mjs.map +1 -1
- package/dist/internal/overlay/use-apply-open-state.mjs +1 -2
- package/dist/internal/overlay/use-exit-animation.mjs +1 -2
- package/dist/internal/overlay/use-exit-animation.mjs.map +1 -1
- package/dist/internal/overlay/use-interest-dismiss.mjs +3 -4
- package/dist/internal/overlay/use-modal-registration.mjs +2 -3
- package/dist/internal/overlay/use-overlay-close.mjs +11 -9
- package/dist/internal/overlay/use-overlay-close.mjs.map +1 -1
- package/dist/internal/overlay/use-overlay-root.d.mts +2 -2
- package/dist/internal/overlay/use-overlay-root.mjs +9 -9
- package/dist/internal/overlay/use-overlay-root.mjs.map +1 -1
- package/dist/internal/overlay/use-popover-popup.mjs +6 -7
- package/dist/internal/overlay/use-popover-trigger.d.mts +2 -4
- package/dist/internal/overlay/use-popover-trigger.d.mts.map +1 -1
- package/dist/internal/overlay/use-popover-trigger.mjs +6 -7
- package/dist/internal/overlay/use-popover-trigger.mjs.map +1 -1
- package/dist/internal/overlay/use-resolved-placement.mjs +4 -5
- package/dist/internal/platform-attributes.d.mts +0 -2
- package/dist/internal/platform-attributes.d.mts.map +1 -1
- package/dist/internal/pointer-capture.mjs +1 -2
- package/dist/internal/range-value.mjs +6 -5
- package/dist/internal/range-value.mjs.map +1 -1
- package/dist/internal/render-element.d.mts +2 -2
- package/dist/internal/render-element.mjs +2 -3
- package/dist/internal/shipped-styles.mjs +1 -2
- package/dist/internal/swipe-arithmetic.mjs +0 -1
- package/dist/internal/swipe.mjs +2 -3
- package/dist/internal/toolbar-context.mjs +1 -2
- package/dist/internal/transition-boundary.mjs +2 -3
- package/dist/internal/transition-types.mjs +1 -2
- package/dist/internal/typeahead.mjs +0 -1
- package/dist/internal/types.d.mts +0 -2
- package/dist/internal/types.d.mts.map +1 -1
- package/dist/internal/use-active-option.mjs +1 -2
- package/dist/internal/use-deferred-leave.mjs +2 -3
- package/dist/internal/use-delayed-pair.mjs +1 -2
- package/dist/internal/use-dev-warning.mjs +0 -1
- package/dist/internal/use-element-check.mjs +1 -2
- package/dist/internal/use-hydrated-mount.mjs +1 -2
- package/dist/internal/use-item-order.mjs +2 -3
- package/dist/internal/use-latest.mjs +1 -2
- package/dist/internal/use-merged-refs.mjs +2 -3
- package/dist/internal/use-mount-fixed.mjs +2 -3
- package/dist/internal/use-name-warning.mjs +1 -2
- package/dist/internal/use-native-focusgroup.mjs +1 -2
- package/dist/internal/use-option-registry.mjs +3 -4
- package/dist/internal/use-register-count.mjs +1 -2
- package/dist/internal/use-render.d.mts +2 -2
- package/dist/internal/use-render.mjs +2 -3
- package/dist/internal/use-roving-focus.mjs +2 -3
- package/dist/internal/use-value-set.mjs +2 -3
- package/dist/internal/value-set.mjs +1 -2
- package/dist/menu/index.d.mts +2 -4
- package/dist/menu/index.d.mts.map +1 -1
- package/dist/menu/index.mjs +2 -3
- package/dist/menu/menu-checkbox-item.d.mts +1 -3
- package/dist/menu/menu-checkbox-item.d.mts.map +1 -1
- package/dist/menu/menu-checkbox-item.mjs +3 -4
- package/dist/menu/menu-context-trigger.d.mts +1 -3
- package/dist/menu/menu-context-trigger.d.mts.map +1 -1
- package/dist/menu/menu-context-trigger.mjs +4 -5
- package/dist/menu/menu-context.mjs +1 -2
- package/dist/menu/menu-dom.mjs +1 -2
- package/dist/menu/menu-gestures.mjs +1 -2
- package/dist/menu/menu-group.d.mts +1 -3
- package/dist/menu/menu-group.d.mts.map +1 -1
- package/dist/menu/menu-group.mjs +2 -3
- package/dist/menu/menu-hover.mjs +1 -2
- package/dist/menu/menu-item.d.mts +3 -4
- package/dist/menu/menu-item.d.mts.map +1 -1
- package/dist/menu/menu-item.mjs +6 -3
- package/dist/menu/menu-item.mjs.map +1 -1
- package/dist/menu/menu-outside.mjs +1 -2
- package/dist/menu/menu-point.mjs +1 -2
- package/dist/menu/menu-popup.d.mts +2 -4
- package/dist/menu/menu-popup.d.mts.map +1 -1
- package/dist/menu/menu-popup.mjs +45 -19
- package/dist/menu/menu-popup.mjs.map +1 -1
- package/dist/menu/menu-radio-group.d.mts +1 -3
- package/dist/menu/menu-radio-group.d.mts.map +1 -1
- package/dist/menu/menu-radio-group.mjs +3 -4
- package/dist/menu/menu-radio-item.d.mts +1 -3
- package/dist/menu/menu-radio-item.d.mts.map +1 -1
- package/dist/menu/menu-radio-item.mjs +2 -3
- package/dist/menu/menu-root.d.mts +1 -3
- package/dist/menu/menu-root.d.mts.map +1 -1
- package/dist/menu/menu-root.mjs +4 -5
- package/dist/menu/menu-submenu-trigger.d.mts +1 -3
- package/dist/menu/menu-submenu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-submenu-trigger.mjs +5 -6
- package/dist/menu/menu-trigger.d.mts +11 -6
- package/dist/menu/menu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-trigger.mjs +56 -9
- package/dist/menu/menu-trigger.mjs.map +1 -1
- package/dist/menu/use-menu-item.mjs +2 -3
- package/dist/menu/use-menu-keyboard.mjs +2 -3
- package/dist/menubar/index.d.mts +3 -0
- package/dist/menubar/index.mjs +1 -0
- package/dist/menubar/menubar.d.mts +47 -0
- package/dist/menubar/menubar.d.mts.map +1 -0
- package/dist/menubar/menubar.mjs +146 -0
- package/dist/menubar/menubar.mjs.map +1 -0
- package/dist/meter/index.d.mts +1 -3
- package/dist/meter/index.d.mts.map +1 -1
- package/dist/meter/index.mjs +1 -2
- package/dist/meter/meter-context.mjs +1 -2
- package/dist/meter/meter-indicator.d.mts +1 -3
- package/dist/meter/meter-indicator.d.mts.map +1 -1
- package/dist/meter/meter-indicator.mjs +1 -2
- package/dist/meter/meter-label.d.mts +1 -3
- package/dist/meter/meter-label.d.mts.map +1 -1
- package/dist/meter/meter-label.mjs +1 -2
- package/dist/meter/meter-region.d.mts +0 -2
- package/dist/meter/meter-region.d.mts.map +1 -1
- package/dist/meter/meter-region.mjs +1 -2
- package/dist/meter/meter-root.d.mts +4 -5
- package/dist/meter/meter-root.d.mts.map +1 -1
- package/dist/meter/meter-root.mjs +4 -5
- package/dist/meter/meter-root.mjs.map +1 -1
- package/dist/meter/meter-track.d.mts +1 -3
- package/dist/meter/meter-track.d.mts.map +1 -1
- package/dist/meter/meter-track.mjs +1 -2
- package/dist/meter/meter-value.d.mts +1 -3
- package/dist/meter/meter-value.d.mts.map +1 -1
- package/dist/meter/meter-value.mjs +1 -2
- package/dist/multi-select/index.d.mts +1 -3
- package/dist/multi-select/index.d.mts.map +1 -1
- package/dist/multi-select/index.mjs +1 -2
- package/dist/multi-select/multi-select-context.mjs +1 -2
- package/dist/multi-select/multi-select-group.d.mts +1 -3
- package/dist/multi-select/multi-select-group.d.mts.map +1 -1
- package/dist/multi-select/multi-select-group.mjs +2 -3
- package/dist/multi-select/multi-select-keyboard.mjs +1 -2
- package/dist/multi-select/multi-select-label.d.mts +1 -3
- package/dist/multi-select/multi-select-label.d.mts.map +1 -1
- package/dist/multi-select/multi-select-label.mjs +2 -3
- package/dist/multi-select/multi-select-list.d.mts +1 -3
- package/dist/multi-select/multi-select-list.d.mts.map +1 -1
- package/dist/multi-select/multi-select-list.mjs +3 -4
- package/dist/multi-select/multi-select-option.d.mts +1 -3
- package/dist/multi-select/multi-select-option.d.mts.map +1 -1
- package/dist/multi-select/multi-select-option.mjs +3 -4
- package/dist/multi-select/multi-select-popup.d.mts +1 -3
- package/dist/multi-select/multi-select-popup.d.mts.map +1 -1
- package/dist/multi-select/multi-select-popup.mjs +5 -6
- package/dist/multi-select/multi-select-root.d.mts +1 -3
- package/dist/multi-select/multi-select-root.d.mts.map +1 -1
- package/dist/multi-select/multi-select-root.mjs +11 -12
- package/dist/multi-select/multi-select-trigger.d.mts +1 -3
- package/dist/multi-select/multi-select-trigger.d.mts.map +1 -1
- package/dist/multi-select/multi-select-trigger.mjs +7 -8
- package/dist/multi-select/multi-select-value.d.mts +1 -3
- package/dist/multi-select/multi-select-value.d.mts.map +1 -1
- package/dist/multi-select/multi-select-value.mjs +1 -2
- package/dist/navigation-menu/index.d.mts +30 -0
- package/dist/navigation-menu/index.d.mts.map +1 -0
- package/dist/navigation-menu/index.mjs +31 -0
- package/dist/navigation-menu/index.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-context.mjs +18 -0
- package/dist/navigation-menu/navigation-menu-context.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-item.d.mts +77 -0
- package/dist/navigation-menu/navigation-menu-item.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-item.mjs +79 -0
- package/dist/navigation-menu/navigation-menu-item.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-link.d.mts +46 -0
- package/dist/navigation-menu/navigation-menu-link.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-link.mjs +65 -0
- package/dist/navigation-menu/navigation-menu-link.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-list.d.mts +31 -0
- package/dist/navigation-menu/navigation-menu-list.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-list.mjs +29 -0
- package/dist/navigation-menu/navigation-menu-list.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-popup.d.mts +100 -0
- package/dist/navigation-menu/navigation-menu-popup.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-popup.mjs +92 -0
- package/dist/navigation-menu/navigation-menu-popup.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-root.d.mts +31 -0
- package/dist/navigation-menu/navigation-menu-root.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-root.mjs +26 -0
- package/dist/navigation-menu/navigation-menu-root.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-trigger.d.mts +30 -0
- package/dist/navigation-menu/navigation-menu-trigger.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-trigger.mjs +41 -0
- package/dist/navigation-menu/navigation-menu-trigger.mjs.map +1 -0
- package/dist/number-field/index.d.mts +2 -4
- package/dist/number-field/index.d.mts.map +1 -1
- package/dist/number-field/index.mjs +1 -2
- package/dist/number-field/number-field-arithmetic.mjs +1 -2
- package/dist/number-field/number-field-context.d.mts +1 -3
- package/dist/number-field/number-field-context.d.mts.map +1 -1
- package/dist/number-field/number-field-context.mjs +1 -2
- package/dist/number-field/number-field-decrement.d.mts +0 -2
- package/dist/number-field/number-field-decrement.d.mts.map +1 -1
- package/dist/number-field/number-field-decrement.mjs +1 -2
- package/dist/number-field/number-field-format.mjs +1 -2
- package/dist/number-field/number-field-increment.d.mts +0 -2
- package/dist/number-field/number-field-increment.d.mts.map +1 -1
- package/dist/number-field/number-field-increment.mjs +1 -2
- package/dist/number-field/number-field-input.d.mts +1 -3
- package/dist/number-field/number-field-input.d.mts.map +1 -1
- package/dist/number-field/number-field-input.mjs +4 -5
- package/dist/number-field/number-field-label.d.mts +1 -3
- package/dist/number-field/number-field-label.d.mts.map +1 -1
- package/dist/number-field/number-field-label.mjs +3 -4
- package/dist/number-field/number-field-root.d.mts +1 -3
- package/dist/number-field/number-field-root.d.mts.map +1 -1
- package/dist/number-field/number-field-root.mjs +7 -8
- package/dist/number-field/number-field-root.mjs.map +1 -1
- package/dist/number-field/use-number-field-dev-warnings.mjs +2 -3
- package/dist/number-field/use-step-button.d.mts +1 -3
- package/dist/number-field/use-step-button.d.mts.map +1 -1
- package/dist/number-field/use-step-button.mjs +2 -3
- package/dist/otp-field/index.d.mts +2 -4
- package/dist/otp-field/index.d.mts.map +1 -1
- package/dist/otp-field/index.mjs +1 -2
- package/dist/otp-field/otp-field-context.mjs +1 -2
- package/dist/otp-field/otp-field-filter.d.mts +0 -2
- package/dist/otp-field/otp-field-filter.d.mts.map +1 -1
- package/dist/otp-field/otp-field-filter.mjs +1 -2
- package/dist/otp-field/otp-field-input.d.mts +1 -3
- package/dist/otp-field/otp-field-input.d.mts.map +1 -1
- package/dist/otp-field/otp-field-input.mjs +6 -7
- package/dist/otp-field/otp-field-root.d.mts +10 -3
- package/dist/otp-field/otp-field-root.d.mts.map +1 -1
- package/dist/otp-field/otp-field-root.mjs +15 -13
- package/dist/otp-field/otp-field-root.mjs.map +1 -1
- package/dist/otp-field/otp-field-slot.d.mts +1 -3
- package/dist/otp-field/otp-field-slot.d.mts.map +1 -1
- package/dist/otp-field/otp-field-slot.mjs +2 -3
- package/dist/popover/index.d.mts +1 -3
- package/dist/popover/index.d.mts.map +1 -1
- package/dist/popover/index.mjs +1 -2
- package/dist/popover/popover-close.d.mts +10 -6
- package/dist/popover/popover-close.d.mts.map +1 -1
- package/dist/popover/popover-close.mjs +3 -3
- package/dist/popover/popover-close.mjs.map +1 -1
- package/dist/popover/popover-context.mjs +1 -2
- package/dist/popover/popover-description.d.mts +1 -3
- package/dist/popover/popover-description.d.mts.map +1 -1
- package/dist/popover/popover-description.mjs +1 -2
- package/dist/popover/popover-popup.d.mts +2 -4
- package/dist/popover/popover-popup.d.mts.map +1 -1
- package/dist/popover/popover-popup.mjs +4 -5
- package/dist/popover/popover-root.d.mts +1 -3
- package/dist/popover/popover-root.d.mts.map +1 -1
- package/dist/popover/popover-root.mjs +2 -3
- package/dist/popover/popover-title.d.mts +1 -3
- package/dist/popover/popover-title.d.mts.map +1 -1
- package/dist/popover/popover-title.mjs +1 -2
- package/dist/popover/popover-trigger.d.mts +1 -3
- package/dist/popover/popover-trigger.d.mts.map +1 -1
- package/dist/popover/popover-trigger.mjs +2 -3
- package/dist/progress/index.d.mts +1 -3
- package/dist/progress/index.d.mts.map +1 -1
- package/dist/progress/index.mjs +1 -2
- package/dist/progress/progress-context.mjs +1 -2
- package/dist/progress/progress-indicator.d.mts +1 -3
- package/dist/progress/progress-indicator.d.mts.map +1 -1
- package/dist/progress/progress-indicator.mjs +1 -2
- package/dist/progress/progress-label.d.mts +1 -3
- package/dist/progress/progress-label.d.mts.map +1 -1
- package/dist/progress/progress-label.mjs +1 -2
- package/dist/progress/progress-root.d.mts +4 -5
- package/dist/progress/progress-root.d.mts.map +1 -1
- package/dist/progress/progress-root.mjs +4 -5
- package/dist/progress/progress-root.mjs.map +1 -1
- package/dist/progress/progress-track.d.mts +1 -3
- package/dist/progress/progress-track.d.mts.map +1 -1
- package/dist/progress/progress-track.mjs +1 -2
- package/dist/progress/progress-value.d.mts +1 -3
- package/dist/progress/progress-value.d.mts.map +1 -1
- package/dist/progress/progress-value.mjs +1 -2
- package/dist/radio-group/index.d.mts +1 -3
- package/dist/radio-group/index.d.mts.map +1 -1
- package/dist/radio-group/index.mjs +1 -2
- package/dist/radio-group/radio-group-context.mjs +1 -2
- package/dist/radio-group/radio-group-item.d.mts +1 -3
- package/dist/radio-group/radio-group-item.d.mts.map +1 -1
- package/dist/radio-group/radio-group-item.mjs +3 -4
- package/dist/radio-group/radio-group-label.d.mts +1 -3
- package/dist/radio-group/radio-group-label.d.mts.map +1 -1
- package/dist/radio-group/radio-group-label.mjs +1 -2
- package/dist/radio-group/radio-group-root.d.mts +1 -3
- package/dist/radio-group/radio-group-root.d.mts.map +1 -1
- package/dist/radio-group/radio-group-root.mjs +4 -5
- package/dist/select/index.d.mts +1 -3
- package/dist/select/index.d.mts.map +1 -1
- package/dist/select/index.mjs +1 -2
- package/dist/select/select-context.mjs +1 -2
- package/dist/select/select-dom.mjs +2 -3
- package/dist/select/select-group-label.d.mts +1 -3
- package/dist/select/select-group-label.d.mts.map +1 -1
- package/dist/select/select-group-label.mjs +1 -2
- package/dist/select/select-group.d.mts +1 -3
- package/dist/select/select-group.d.mts.map +1 -1
- package/dist/select/select-group.mjs +2 -3
- package/dist/select/select-option.d.mts +1 -3
- package/dist/select/select-option.d.mts.map +1 -1
- package/dist/select/select-option.mjs +3 -4
- package/dist/select/select-root.d.mts +1 -3
- package/dist/select/select-root.d.mts.map +1 -1
- package/dist/select/select-root.mjs +6 -7
- package/dist/select/select-separator.d.mts +1 -3
- package/dist/select/select-separator.d.mts.map +1 -1
- package/dist/select/select-separator.mjs +1 -2
- package/dist/select/select-trigger.d.mts +1 -3
- package/dist/select/select-trigger.d.mts.map +1 -1
- package/dist/select/select-trigger.mjs +1 -2
- package/dist/select/select-value.d.mts +1 -3
- package/dist/select/select-value.d.mts.map +1 -1
- package/dist/select/select-value.mjs +3 -4
- package/dist/select/select-value.mjs.map +1 -1
- package/dist/separator/separator.d.mts +1 -3
- package/dist/separator/separator.d.mts.map +1 -1
- package/dist/separator/separator.mjs +1 -2
- package/dist/slider/index.d.mts +2 -4
- package/dist/slider/index.d.mts.map +1 -1
- package/dist/slider/index.mjs +1 -2
- package/dist/slider/slider-arithmetic.mjs +1 -2
- package/dist/slider/slider-context.mjs +1 -2
- package/dist/slider/slider-indicator.d.mts +1 -3
- package/dist/slider/slider-indicator.d.mts.map +1 -1
- package/dist/slider/slider-indicator.mjs +1 -2
- package/dist/slider/slider-label.d.mts +1 -3
- package/dist/slider/slider-label.d.mts.map +1 -1
- package/dist/slider/slider-label.mjs +3 -4
- package/dist/slider/slider-root.d.mts +1 -3
- package/dist/slider/slider-root.d.mts.map +1 -1
- package/dist/slider/slider-root.mjs +8 -9
- package/dist/slider/slider-thumb.d.mts +1 -3
- package/dist/slider/slider-thumb.d.mts.map +1 -1
- package/dist/slider/slider-thumb.mjs +5 -6
- package/dist/slider/slider-track.d.mts +1 -3
- package/dist/slider/slider-track.d.mts.map +1 -1
- package/dist/slider/slider-track.mjs +2 -3
- package/dist/slider/slider-value.d.mts +1 -3
- package/dist/slider/slider-value.d.mts.map +1 -1
- package/dist/slider/slider-value.mjs +1 -2
- package/dist/slider/use-slider-dev-warnings.mjs +2 -3
- package/dist/slider/use-thumb-registry.mjs +1 -2
- package/dist/switch/switch.d.mts +1 -3
- package/dist/switch/switch.d.mts.map +1 -1
- package/dist/switch/switch.mjs +2 -3
- package/dist/tabs/index.d.mts +0 -2
- package/dist/tabs/index.d.mts.map +1 -1
- package/dist/tabs/index.mjs +1 -2
- package/dist/tabs/tabs-context.d.mts +0 -2
- package/dist/tabs/tabs-context.d.mts.map +1 -1
- package/dist/tabs/tabs-context.mjs +1 -2
- package/dist/tabs/tabs-ids.mjs +1 -2
- package/dist/tabs/tabs-indicator.d.mts +1 -3
- package/dist/tabs/tabs-indicator.d.mts.map +1 -1
- package/dist/tabs/tabs-indicator.mjs +1 -2
- package/dist/tabs/tabs-list.d.mts +1 -3
- package/dist/tabs/tabs-list.d.mts.map +1 -1
- package/dist/tabs/tabs-list.mjs +4 -5
- package/dist/tabs/tabs-panel.d.mts +1 -3
- package/dist/tabs/tabs-panel.d.mts.map +1 -1
- package/dist/tabs/tabs-panel.mjs +4 -5
- package/dist/tabs/tabs-root.d.mts +1 -3
- package/dist/tabs/tabs-root.d.mts.map +1 -1
- package/dist/tabs/tabs-root.mjs +5 -6
- package/dist/tabs/tabs-tab.d.mts +1 -3
- package/dist/tabs/tabs-tab.d.mts.map +1 -1
- package/dist/tabs/tabs-tab.mjs +3 -4
- package/dist/tabs/use-until-found.mjs +1 -2
- package/dist/toast/index.d.mts +2 -4
- package/dist/toast/index.d.mts.map +1 -1
- package/dist/toast/index.mjs +2 -3
- package/dist/toast/toast-action.d.mts +1 -3
- package/dist/toast/toast-action.d.mts.map +1 -1
- package/dist/toast/toast-action.mjs +2 -3
- package/dist/toast/toast-close.d.mts +1 -3
- package/dist/toast/toast-close.d.mts.map +1 -1
- package/dist/toast/toast-close.mjs +2 -3
- package/dist/toast/toast-context.mjs +1 -2
- package/dist/toast/toast-description.d.mts +1 -3
- package/dist/toast/toast-description.d.mts.map +1 -1
- package/dist/toast/toast-description.mjs +2 -3
- package/dist/toast/toast-hotkey.mjs +1 -2
- package/dist/toast/toast-queue.mjs +1 -2
- package/dist/toast/toast-root.d.mts +1 -3
- package/dist/toast/toast-root.d.mts.map +1 -1
- package/dist/toast/toast-root.mjs +4 -5
- package/dist/toast/toast-root.mjs.map +1 -1
- package/dist/toast/toast-timers.mjs +1 -2
- package/dist/toast/toast-title.d.mts +1 -3
- package/dist/toast/toast-title.d.mts.map +1 -1
- package/dist/toast/toast-title.mjs +2 -3
- package/dist/toast/toast-viewport.d.mts +1 -3
- package/dist/toast/toast-viewport.d.mts.map +1 -1
- package/dist/toast/toast-viewport.mjs +9 -10
- package/dist/toast/toast.d.mts +1 -3
- package/dist/toast/toast.d.mts.map +1 -1
- package/dist/toast/toast.mjs +1 -2
- package/dist/toast/use-modal-portal-host.mjs +2 -3
- package/dist/toast/use-toast-announcements.mjs +2 -3
- package/dist/toast/use-toast-announcements.mjs.map +1 -1
- package/dist/toast/use-toast-focus.mjs +2 -3
- package/dist/toast/use-toast-pauses.mjs +2 -3
- package/dist/toggle/toggle.d.mts +1 -3
- package/dist/toggle/toggle.d.mts.map +1 -1
- package/dist/toggle/toggle.mjs +3 -4
- package/dist/toggle-group/index.d.mts +0 -2
- package/dist/toggle-group/index.d.mts.map +1 -1
- package/dist/toggle-group/index.mjs +1 -2
- package/dist/toggle-group/toggle-group-context.d.mts +0 -2
- package/dist/toggle-group/toggle-group-context.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-context.mjs +1 -2
- package/dist/toggle-group/toggle-group-item.d.mts +1 -3
- package/dist/toggle-group/toggle-group-item.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-item.mjs +2 -3
- package/dist/toggle-group/toggle-group-root.d.mts +1 -3
- package/dist/toggle-group/toggle-group-root.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-root.mjs +8 -9
- package/dist/toolbar/index.d.mts +0 -2
- package/dist/toolbar/index.d.mts.map +1 -1
- package/dist/toolbar/index.mjs +1 -2
- package/dist/toolbar/toolbar-root.d.mts +1 -3
- package/dist/toolbar/toolbar-root.d.mts.map +1 -1
- package/dist/toolbar/toolbar-root.mjs +3 -4
- package/dist/toolbar/toolbar-separator.d.mts +1 -3
- package/dist/toolbar/toolbar-separator.d.mts.map +1 -1
- package/dist/toolbar/toolbar-separator.mjs +1 -2
- package/dist/tooltip/index.d.mts +0 -2
- package/dist/tooltip/index.d.mts.map +1 -1
- package/dist/tooltip/index.mjs +1 -2
- package/dist/tooltip/tooltip-arrow.d.mts +1 -3
- package/dist/tooltip/tooltip-arrow.d.mts.map +1 -1
- package/dist/tooltip/tooltip-arrow.mjs +2 -3
- package/dist/tooltip/tooltip-context.d.mts +0 -2
- package/dist/tooltip/tooltip-context.d.mts.map +1 -1
- package/dist/tooltip/tooltip-context.mjs +1 -2
- package/dist/tooltip/tooltip-popup.d.mts +1 -3
- package/dist/tooltip/tooltip-popup.d.mts.map +1 -1
- package/dist/tooltip/tooltip-popup.mjs +4 -5
- package/dist/tooltip/tooltip-root.d.mts +1 -3
- package/dist/tooltip/tooltip-root.d.mts.map +1 -1
- package/dist/tooltip/tooltip-root.mjs +2 -3
- package/dist/tooltip/tooltip-trigger.d.mts +1 -3
- package/dist/tooltip/tooltip-trigger.d.mts.map +1 -1
- package/dist/tooltip/tooltip-trigger.mjs +6 -7
- package/dist/tooltip/tooltip-warm.mjs +1 -2
- package/dist/tooltip/use-tooltip-interaction.mjs +2 -3
- package/package.json +11 -8
- package/skills/funstack-ui-knowledge/SKILL.md +5 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useCallback, useInsertionEffect, useMemo, useRef } from "react";
|
|
2
3
|
import { createActionDetails } from "../internal/action/action-details.mjs";
|
|
3
|
-
import { resolveStateValue } from "../internal/render-element.mjs";
|
|
4
4
|
import { intendedValue } from "../internal/action/use-controllable-action.mjs";
|
|
5
5
|
import { useOverlayRoot } from "../internal/overlay/use-overlay-root.mjs";
|
|
6
|
+
import { resolveStateValue } from "../internal/render-element.mjs";
|
|
6
7
|
import { DialogContext } from "./dialog-context.mjs";
|
|
7
|
-
import { useCallback, useInsertionEffect, useMemo, useRef } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
|
|
9
|
+
// src/dialog/dialog-root.tsx
|
|
10
10
|
const dialogDetails = (event, reason, returnValue) => createActionDetails(event, {
|
|
11
11
|
reason,
|
|
12
12
|
returnValue
|
|
@@ -91,7 +91,6 @@ function useDialogRoot({ open, defaultOpen, openChangeAction, onOpenChange, chil
|
|
|
91
91
|
children: resolveStateValue(children, state)
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
//#endregion
|
|
95
94
|
export { DialogRoot, useDialogRoot };
|
|
96
95
|
|
|
97
96
|
//# sourceMappingURL=dialog-root.mjs.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
1
2
|
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
3
|
import "./dialog-context.mjs";
|
|
3
4
|
import { DialogPopupState } from "./dialog-popup.mjs";
|
|
4
|
-
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
5
|
-
//#region src/dialog/dialog-title.d.ts
|
|
6
5
|
/** State of `Dialog.Title`: the Popup's state. */
|
|
7
6
|
export type DialogTitleState = DialogPopupState;
|
|
8
7
|
/**
|
|
@@ -31,5 +30,4 @@ export declare function DialogTitle(props: DialogTitleProps): ReactNode;
|
|
|
31
30
|
export declare namespace DialogTitle {
|
|
32
31
|
var displayName: string;
|
|
33
32
|
}
|
|
34
|
-
//#endregion
|
|
35
33
|
//# sourceMappingURL=dialog-title.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-title.d.mts","names":[],"sources":["../../src/dialog/dialog-title.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog-title.d.mts","names":[],"sources":["../../src/dialog/dialog-title.tsx"],"mappings":";;;;;YASY,mBAAmB;;;;;;iBAOd,yBAAyB,KACxC;;EAIA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,6BAA6B;;;;;;;;;wBAUnC,YAAY,OAAO,mBAAgB;yBAAnC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useRender } from "../internal/use-render.mjs";
|
|
3
3
|
import { useDialogContext } from "./dialog-context.mjs";
|
|
4
|
-
|
|
4
|
+
// src/dialog/dialog-title.tsx
|
|
5
5
|
/**
|
|
6
6
|
* The dialog's name: an `<h2>` whose id the Popup references with `aria-labelledby`.
|
|
7
7
|
*
|
|
@@ -31,7 +31,6 @@ function useDialogTitle({ className, style, children, render, ...rest }, namespa
|
|
|
31
31
|
libraryProps: { id: ctx.ids.title }
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { DialogTitle, useDialogTitle };
|
|
36
35
|
|
|
37
36
|
//# sourceMappingURL=dialog-title.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
1
2
|
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
3
|
import "./dialog-context.mjs";
|
|
3
|
-
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
-
//#region src/dialog/dialog-trigger.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* State of `Dialog.Trigger`, passed to the function forms of `className`, `style`, `children` and
|
|
7
6
|
* `render`.
|
|
@@ -59,5 +58,4 @@ export declare function DialogTrigger(props: DialogTriggerProps): ReactNode;
|
|
|
59
58
|
export declare namespace DialogTrigger {
|
|
60
59
|
var displayName: string;
|
|
61
60
|
}
|
|
62
|
-
//#endregion
|
|
63
61
|
//# sourceMappingURL=dialog-trigger.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-trigger.d.mts","names":[],"sources":["../../src/dialog/dialog-trigger.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog-trigger.d.mts","names":[],"sources":["../../src/dialog/dialog-trigger.tsx"],"mappings":";;;;;;;iBAgBiB;;WAEN;;;;;;WAMA;;WAEA;;;;;;;iBAQM,2BAA2B,KAC1C;;;;;;;;EAUA;;EAEA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;wBAmBvC,cAAc,OAAO,qBAAkB;yBAAvC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useCallback, useRef } from "react";
|
|
2
3
|
import { dataAttr } from "../internal/data-attr.mjs";
|
|
3
4
|
import { cancelClick, disabledButton, rendersButton } from "../internal/render-element.mjs";
|
|
4
|
-
import { useRender } from "../internal/use-render.mjs";
|
|
5
|
-
import { useElementCheck } from "../internal/use-element-check.mjs";
|
|
6
5
|
import { registerTrigger } from "../internal/overlay/trigger-ref.mjs";
|
|
6
|
+
import { useElementCheck } from "../internal/use-element-check.mjs";
|
|
7
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
7
8
|
import { useDialogContext } from "./dialog-context.mjs";
|
|
8
|
-
|
|
9
|
-
//#region src/dialog/dialog-trigger.tsx
|
|
9
|
+
// src/dialog/dialog-trigger.tsx
|
|
10
10
|
const isDev = process.env.NODE_ENV !== "production";
|
|
11
11
|
/**
|
|
12
12
|
* The opener: `<button type="button" commandfor command="show-modal">`. In JS-free mode the
|
|
@@ -96,7 +96,6 @@ function useDialogTrigger({ disabled = false, className, style, children, render
|
|
|
96
96
|
ref: libraryRef
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
//#endregion
|
|
100
99
|
export { DialogTrigger, useDialogTrigger };
|
|
101
100
|
|
|
102
101
|
//# sourceMappingURL=dialog-trigger.mjs.map
|
package/dist/dialog/index.d.mts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import "../internal/platform-attributes.mjs";
|
|
2
2
|
import { DialogClose, DialogCloseDetails, DialogCloseProps, DialogCloseState } from "./dialog-close.mjs";
|
|
3
|
-
import { DialogPopup, DialogPopupProps, DialogPopupState } from "./dialog-popup.mjs";
|
|
4
3
|
import { DialogDescription, DialogDescriptionProps, DialogDescriptionState } from "./dialog-description.mjs";
|
|
5
4
|
import { DialogForm, DialogFormProps, DialogFormState } from "./dialog-form.mjs";
|
|
5
|
+
import { DialogPopup, DialogPopupProps, DialogPopupState } from "./dialog-popup.mjs";
|
|
6
6
|
import { DialogOpenChangeDetails, DialogRoot, DialogRootProps, DialogRootState } from "./dialog-root.mjs";
|
|
7
7
|
import { DialogTitle, DialogTitleProps, DialogTitleState } from "./dialog-title.mjs";
|
|
8
8
|
import { DialogTrigger, DialogTriggerProps, DialogTriggerState } from "./dialog-trigger.mjs";
|
|
9
|
-
//#region src/dialog/index.d.ts
|
|
10
9
|
/**
|
|
11
10
|
* Dialog built on `<dialog>` and Invoker Commands: `Root` (no DOM) > `Trigger`
|
|
12
11
|
* (`button[command=show-modal]`) + `Popup` (`dialog`) > `Title`, `Description`, `Form`, `Close`.
|
|
@@ -27,6 +26,5 @@ export declare const Dialog: {
|
|
|
27
26
|
readonly Title: typeof DialogTitle;
|
|
28
27
|
readonly Description: typeof DialogDescription;
|
|
29
28
|
};
|
|
30
|
-
//#endregion
|
|
31
29
|
export type { DialogCloseDetails, DialogCloseProps, DialogCloseState, DialogDescriptionProps, DialogDescriptionState, DialogFormProps, DialogFormState, DialogOpenChangeDetails, DialogPopupProps, DialogPopupState, DialogRootProps, DialogRootState, DialogTitleProps, DialogTitleState, DialogTriggerProps, DialogTriggerState };
|
|
32
30
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/dialog/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/dialog/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;qBAsBa;WACX,aAAI;WACJ,gBAAO;WACP,cAAK;WACL,cAAK;WACL,aAAI;WACJ,cAAK;WACL,oBAAW"}
|
package/dist/dialog/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { DialogPopup } from "./dialog-popup.mjs";
|
|
|
5
5
|
import { DialogRoot } from "./dialog-root.mjs";
|
|
6
6
|
import { DialogTitle } from "./dialog-title.mjs";
|
|
7
7
|
import { DialogTrigger } from "./dialog-trigger.mjs";
|
|
8
|
-
|
|
8
|
+
// src/dialog/index.ts
|
|
9
9
|
/**
|
|
10
10
|
* Dialog built on `<dialog>` and Invoker Commands: `Root` (no DOM) > `Trigger`
|
|
11
11
|
* (`button[command=show-modal]`) + `Popup` (`dialog`) > `Title`, `Description`, `Form`, `Close`.
|
|
@@ -26,7 +26,6 @@ const Dialog = {
|
|
|
26
26
|
Title: DialogTitle,
|
|
27
27
|
Description: DialogDescription
|
|
28
28
|
};
|
|
29
|
-
//#endregion
|
|
30
29
|
export { Dialog };
|
|
31
30
|
|
|
32
31
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -386,7 +386,7 @@ export function AccordionThreads() {
|
|
|
386
386
|
|
|
387
387
|
> **Find-in-page in library mode**
|
|
388
388
|
>
|
|
389
|
-
> The browser opens a closed item when find-in-page or a text fragment matches its content. The Accordion dispatches that as `reason: "platform"` with the `toggle` event. If a controlled parent does not adopt the change, the item is closed again when the action settles. Disabled items are re-closed without dispatching.
|
|
389
|
+
> The browser opens a closed item when find-in-page or a text fragment matches its content. The Accordion dispatches that as `reason: "platform"` with the `toggle` event. If a controlled parent does not adopt the change, the item is closed again when the action settles. Disabled items are re-closed without dispatching. A reveal while the item's close is pending is dispatched too; a match in content that is still open while its close is pending changes nothing the browser reports, so the close commits and hides it.
|
|
390
390
|
|
|
391
391
|
## Suspense
|
|
392
392
|
|
|
@@ -43,7 +43,8 @@ export function AlertDialogDeleteProject() {
|
|
|
43
43
|
</AlertDialog.Description>
|
|
44
44
|
<DemoErrorBoundary>
|
|
45
45
|
<div className="demo-dialog-actions">
|
|
46
|
-
|
|
46
|
+
{/* Clicked while Delete runs, it shows data-pending until the dialog closes. */}
|
|
47
|
+
<AlertDialog.Cancel className="demo-button demo-cancel">Cancel</AlertDialog.Cancel>
|
|
47
48
|
<AlertDialog.Action
|
|
48
49
|
className="demo-button demo-danger"
|
|
49
50
|
action={async () => {
|
|
@@ -221,6 +222,13 @@ html:has(.demo-dialog:modal) {
|
|
|
221
222
|
cursor: progress;
|
|
222
223
|
}
|
|
223
224
|
|
|
225
|
+
/* A Cancel clicked while the confirm runs: pending until its close commits (the close waits for
|
|
226
|
+
the confirm). The delay keeps a close that commits at once from flashing. */
|
|
227
|
+
.demo-cancel[data-pending] {
|
|
228
|
+
opacity: 0.6;
|
|
229
|
+
transition: opacity 0s 150ms;
|
|
230
|
+
}
|
|
231
|
+
|
|
224
232
|
ul.demo-list {
|
|
225
233
|
margin: 0 0 12px;
|
|
226
234
|
padding: 0;
|
|
@@ -278,7 +286,7 @@ Put it in the Action's `action`, not in `openChangeAction`. The action is where
|
|
|
278
286
|
|
|
279
287
|
> **A pending confirmation can be dismissed**
|
|
280
288
|
>
|
|
281
|
-
> Dismissing a pending confirmation hides it; it does not abort it. Escape closes the dialog while the action runs, and the action finishes in the background. In library mode a Cancel click meanwhile is a close request that React entangles with the running action: it is held until the action settles, and
|
|
289
|
+
> Dismissing a pending confirmation hides it; it does not abort it. Escape closes the dialog while the action runs, and the action finishes in the background. In library mode a Cancel click meanwhile is a close request that React entangles with the running action: it is held until the action settles, and the Cancel has `data-pending` until then (without `aria-disabled`), so style it to show the click was taken: `.cancel[data-pending] { opacity: 0.6; transition: opacity 0s 150ms; }`, or dim the whole dialog with `.alert:has([data-pending])`. When the work can take more than a moment, disable Cancel while it runs with your own optimistic state: see [Cancel unavailable while the confirm runs](#cancel-while-pending).
|
|
282
290
|
|
|
283
291
|
## Props
|
|
284
292
|
|
|
@@ -325,13 +333,13 @@ There is no `modal` prop: an alert dialog is always modal.
|
|
|
325
333
|
| `value` | `string` | `""` | Becomes `dialog.returnValue` and `details.returnValue` of `openChangeAction(false)`. The default is what Escape leaves, so both read as "nothing was confirmed". |
|
|
326
334
|
| `disabled` | `boolean` | `false` | Native `disabled`; owned. A disabled Cancel is not the focus target: the next enabled one is. |
|
|
327
335
|
| `action` | `Action<[details: AlertDialogCancelDetails]>` | – | Rarely needed. As on `Dialog.Close`: runs in this button's own transition, then closes the dialog; a rejection leaves it open. |
|
|
328
|
-
| `whilePending` | `"run" \| "ignore"` | `"ignore"` | As on `Dialog.Close`. No effect without `action`. |
|
|
336
|
+
| `whilePending` | `"run" \| "ignore"` | `"ignore"` | As on `Dialog.Close`. No effect without `action`: the Cancel then shows `data-pending` while its close waits, never `aria-disabled`. |
|
|
329
337
|
| `className` | `string \| ((state: AlertDialogCancelState) => string \| undefined)` | – | A class name, or a function of the part's state. |
|
|
330
338
|
| `style` | `CSSProperties \| ((state: AlertDialogCancelState) => CSSProperties \| undefined)` | – | Inline style, or a function of the part's state. |
|
|
331
339
|
| `children` | `ReactNode \| ((state: AlertDialogCancelState) => ReactNode)` | – | Content, or a function of the part's state. |
|
|
332
340
|
| `render` | `ReactElement \| ((props, state: AlertDialogCancelState) => ReactNode)` | – | Replace the default \<button> (element form) or take over rendering (function form). |
|
|
333
341
|
|
|
334
|
-
- **State**: `AlertDialogCancelState` is `{ pending, disabled }
|
|
342
|
+
- **State**: `AlertDialogCancelState` is `{ pending, disabled }`; `pending` runs from the click until the close it asked for has committed (library mode), for example while the close waits for a confirm that is still running.
|
|
335
343
|
- **Owned**: `Dialog.Close`'s (`type`, `disabled`, `aria-disabled`, `commandfor`, `command`, `value`, `onClick` in library mode or with `action`, `data-pending`, `data-disabled`), and `autoFocus` in the server and hydration render while it is the focus target in JS-free mode (a Cancel mounted on the client into an open dialog carries the attribute but takes no focus).
|
|
336
344
|
|
|
337
345
|
JS-free mode: `<button command="request-close" autofocus>`, in the server HTML too, so the focus is right before hydration. Library mode: no attribute; the Popup writes `autofocus` on the first enabled Cancel right before `showModal()` and removes it after.
|
|
@@ -366,8 +374,8 @@ JS-free mode: `<button command="request-close" autofocus>`, in the server HTML t
|
|
|
366
374
|
| `[role="alertdialog"]` | Popup | Always. |
|
|
367
375
|
| `data-modal` | Popup | Always present. |
|
|
368
376
|
| `data-open`, `data-pending` | Trigger | Library mode, as on a Dialog. |
|
|
369
|
-
| `data-pending` | Cancel, Action |
|
|
370
|
-
| `aria-disabled` | Cancel, Action | `"true"` while `data-pending` with `whilePending="ignore"` (the default). |
|
|
377
|
+
| `data-pending` | Cancel, Action | From the click until the close it asked for has committed: its `action`, then the Root's close (library mode, also without `action`; a Cancel clicked while the confirm runs). |
|
|
378
|
+
| `aria-disabled` | Cancel, Action | `"true"` with `action`, while `data-pending` with `whilePending="ignore"` (the default). |
|
|
371
379
|
| `data-disabled` | Trigger, Cancel, Action | The `disabled` prop. |
|
|
372
380
|
|
|
373
381
|
One stylesheet styles a Dialog and an AlertDialog: the hooks and the transition types are the same. To tell them apart in CSS, select `[role="alertdialog"]`.
|
|
@@ -395,7 +403,7 @@ Dialog's, not an AlertDialog set: library mode tags an open with `fsui-dialog` p
|
|
|
395
403
|
|
|
396
404
|
Concept: [Pending & optimistic state](../concepts/pending-and-optimistic.md)
|
|
397
405
|
|
|
398
|
-
The Action is a [pure trigger](../concepts/pending-and-optimistic.md#pure-trigger): `data-pending` and `state.pending` from the click until the close commits, `aria-disabled` while it ignores a second click (the default). From the moment its action resolves the close is the Root's: the Trigger shows `data-pending` too. The Cancel stays active while the Action is pending.
|
|
406
|
+
The Action is a [pure trigger](../concepts/pending-and-optimistic.md#pure-trigger): `data-pending` and `state.pending` from the click until the close commits, `aria-disabled` while it ignores a second click (the default). From the moment its action resolves the close is the Root's: the Trigger shows `data-pending` too. The Cancel stays active while the Action is pending; clicked meanwhile, it shows `data-pending` (no `aria-disabled`) until its close commits, when the action settles.
|
|
399
407
|
|
|
400
408
|
### Walkthrough (library mode)
|
|
401
409
|
|
|
@@ -300,7 +300,7 @@ export function CollapsibleFilters() {
|
|
|
300
300
|
|
|
301
301
|
> **Find-in-page in library mode**
|
|
302
302
|
>
|
|
303
|
-
> The browser opens a closed Collapsible when find-in-page or a text fragment matches its content. That is dispatched as `reason: "platform"` with the `toggle` event; the content stays visible while the action runs. If a controlled parent does not adopt the change, it is closed again when the action settles; a rejection goes to the nearest Error Boundary. A disabled Collapsible is re-closed without dispatching.
|
|
303
|
+
> The browser opens a closed Collapsible when find-in-page or a text fragment matches its content. That is dispatched as `reason: "platform"` with the `toggle` event; the content stays visible while the action runs. If a controlled parent does not adopt the change, it is closed again when the action settles; a rejection goes to the nearest Error Boundary. A disabled Collapsible is re-closed without dispatching. A reveal while a close is pending is dispatched too; a match in content that is still open while its close is pending changes nothing the browser reports, so the close commits and hides it.
|
|
304
304
|
|
|
305
305
|
## Suspense
|
|
306
306
|
|
|
@@ -180,6 +180,13 @@ html:has(.demo-dialog:modal) {
|
|
|
180
180
|
cursor: progress;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
/* A Cancel clicked while the confirm runs: pending until its close commits (the close waits for
|
|
184
|
+
the confirm). The delay keeps a close that commits at once from flashing. */
|
|
185
|
+
.demo-cancel[data-pending] {
|
|
186
|
+
opacity: 0.6;
|
|
187
|
+
transition: opacity 0s 150ms;
|
|
188
|
+
}
|
|
189
|
+
|
|
183
190
|
ul.demo-list {
|
|
184
191
|
margin: 0 0 12px;
|
|
185
192
|
padding: 0;
|
|
@@ -291,8 +298,8 @@ Other props, such as `role` or `onCancel`, pass through. For a confirmation, use
|
|
|
291
298
|
|
|
292
299
|
| Prop | Type | Default | Description |
|
|
293
300
|
| - | - | - | - |
|
|
294
|
-
| `action` | `Action<[details: DialogCloseDetails]>` | – | Runs in this button's own transition (`data-pending` on it), then closes the dialog with `value` as `returnValue`: in library mode through the Root (`openChangeAction(false)` awaited, view transition if set; the button stays pending until the dialog closes), in JS-free mode with `close(value)`. A rejection reaches the nearest Error Boundary above the button and leaves the dialog open. If the dialog was closed and opened again while the action ran, the close is dropped: it belonged to the previous opening. A second click while it is pending is ignored, and the button is `aria-disabled="true"` meanwhile, unless `whilePending` is `"run"`. With `action` the button renders no `commandfor` / `command`, so a click before hydration does nothing (rather than closing the dialog without running the action). Without `action` the button is a native `command="request-close"` invoker in JS-free mode and goes straight through the Root in library mode. `details.returnValue` is the `value`. |
|
|
295
|
-
| `whilePending` | `"run" \| "ignore"` | `"ignore"` | What a click, Enter or Space does while this part's `action` is pending. `"ignore"`: nothing (the click is cancelled, `aria-disabled="true"` meanwhile). `"run"`: the action runs again (`data-pending` until every run has settled, no `aria-disabled`); the dialog closes once the last run has settled, and only if the latest run resolved: a rejection leaves it open in both modes. No effect without `action`. See [A second click while pending](../concepts/pending-and-optimistic.md#second-click). |
|
|
301
|
+
| `action` | `Action<[details: DialogCloseDetails]>` | – | Runs in this button's own transition (`data-pending` on it), then closes the dialog with `value` as `returnValue`: in library mode through the Root (`openChangeAction(false)` awaited, view transition if set; the button stays pending until the dialog closes), in JS-free mode with `close(value)`. A rejection reaches the nearest Error Boundary above the button and leaves the dialog open. If the dialog was closed and opened again while the action ran, the close is dropped: it belonged to the previous opening. A second click while it is pending is ignored, and the button is `aria-disabled="true"` meanwhile, unless `whilePending` is `"run"`. With `action` the button renders no `commandfor` / `command`, so a click before hydration does nothing (rather than closing the dialog without running the action). Without `action` the button is a native `command="request-close"` invoker in JS-free mode and goes straight through the Root in library mode, pending until that close has committed. `details.returnValue` is the `value`. |
|
|
302
|
+
| `whilePending` | `"run" \| "ignore"` | `"ignore"` | What a click, Enter or Space does while this part's `action` is pending. `"ignore"`: nothing (the click is cancelled, `aria-disabled="true"` meanwhile). `"run"`: the action runs again (`data-pending` until every run has settled, no `aria-disabled`); the dialog closes once the last run has settled, and only if the latest run resolved: a rejection leaves it open in both modes. No effect without `action`: the part then shows `data-pending` while the Root's close waits, never `aria-disabled`. See [A second click while pending](../concepts/pending-and-optimistic.md#second-click). |
|
|
296
303
|
| `value` | `string` | – | Becomes `dialog.returnValue`, and `details.returnValue` of `openChangeAction(false)`. |
|
|
297
304
|
| `disabled` | `boolean` | `false` | Native `disabled`; owned, so a `render` element cannot re-enable it. With a link or component `render` where the Close handles the click (library mode, or with `action`), `aria-disabled="true"` instead (the element stays focusable). A host link is `aria-disabled` in every mode (it cannot be natively disabled), and its click is cancelled. |
|
|
298
305
|
| `className` | `string \| ((state: DialogCloseState) => string \| undefined)` | – | A class name, or a function of the part's state. |
|
|
@@ -300,7 +307,7 @@ Other props, such as `role` or `onCancel`, pass through. For a confirmation, use
|
|
|
300
307
|
| `children` | `ReactNode \| ((state: DialogCloseState) => ReactNode)` | – | Content, or a function of the part's state. |
|
|
301
308
|
| `render` | `ReactElement \| ((props, state: DialogCloseState) => ReactNode)` | – | Replace the default \<button> (element form) or take over rendering (function form). |
|
|
302
309
|
|
|
303
|
-
- **State**: `DialogCloseState` is `{ pending, disabled }
|
|
310
|
+
- **State**: `DialogCloseState` is `{ pending, disabled }`; `pending` runs from the click until the close this part asked for has committed, with or without `action` (library mode).
|
|
304
311
|
- **Owned**: `type` (on a `<button>` only), `disabled`, `aria-disabled`, `commandfor`, `command` (not with `action`, and not on a link or other non-button host element), `value`, `onClick` (library mode, or with `action`), `data-pending`, `data-disabled`; a `render` element cannot re-enable a disabled Close.
|
|
305
312
|
|
|
306
313
|
By default (`whilePending="ignore"`) a second click, Enter or Space while the action is pending is ignored (and cancelled), and the button is `aria-disabled="true"` for as long as it shows `data-pending`, which spans the action and the close; it is never natively disabled, so it keeps focus. To close at once and finish the work in the background, do not return the promise: `action={() => { void save(); }}`.
|
|
@@ -344,8 +351,8 @@ With field errors from `useActionState`, render it as a `Form.Root`: `<Dialog.Fo
|
|
|
344
351
|
| `data-modal` | Popup | The `modal` prop (also before the dialog opens). |
|
|
345
352
|
| `data-open` | Trigger | Optimistic open state (library mode only). |
|
|
346
353
|
| `data-pending` | Trigger | An open or a part's close is in flight (library mode only). A dismissal never pends, but a request still running when a dismissal superseded it keeps it until that request settles. |
|
|
347
|
-
| `data-pending` | Close |
|
|
348
|
-
| `aria-disabled` | Close | `"true"` while `data-pending` with `whilePending="ignore"` (the default): a second click is ignored meanwhile. |
|
|
354
|
+
| `data-pending` | Close | From the click until the close it asked for has committed: its `action`, then the Root's close (library mode, also without `action`). |
|
|
355
|
+
| `aria-disabled` | Close | `"true"` with `action`, while `data-pending` with `whilePending="ignore"` (the default): a second click is ignored meanwhile. |
|
|
349
356
|
| `data-disabled` | Trigger, Close | The `disabled` prop (both modes). |
|
|
350
357
|
|
|
351
358
|
The `<dialog>` emits no `data-open`: `:open` and `:modal` are exact. Enter and exit animate in CSS, in both modes:
|
|
@@ -374,6 +381,7 @@ The CSS exit animates in Chromium and Safari; Firefox closes a dialog instantly.
|
|
|
374
381
|
| Escape (modal) | Closes and returns focus; `onOpenChange(false, { reason: "dismiss" })` | the browser |
|
|
375
382
|
| Escape (non-modal) | Closes with `requestClose()` | the Popup (or `closedby` with the flag) |
|
|
376
383
|
| Escape in a nested dialog | Closes the innermost one only | the browser |
|
|
384
|
+
| Escape with a Popover, Menu, HoverCard or Tooltip open inside | Closes that layer only; the next Escape closes the dialog (modal and non-modal). A handler that calls `preventDefault()` on the Escape keeps the dialog open; `stopPropagation()` does not, as for the browser's own Escape | the browser, the inner component, or the Popup (non-modal) |
|
|
377
385
|
| Enter in a form field | Submits the Form: closes (through the Root in library mode), or runs the action and then closes | the browser / Form |
|
|
378
386
|
|
|
379
387
|
- The Popup's role is the native `dialog`; `aria-modal` is exposed by the browser after `showModal()`, never set by hand. `role="alertdialog"` passes through; for a confirmation that needs an answer, [AlertDialog](alert-dialog.md) renders it for you, with no light dismiss and focus on Cancel. `aria-labelledby` and `aria-describedby` point at Title and Description. A Popup with neither a Title nor an `aria-label` is a development warning.
|
|
@@ -416,7 +424,7 @@ With `transition`, the Popup renders `<ViewTransition>` around the `<dialog>`. A
|
|
|
416
424
|
|
|
417
425
|
Concept: [Pending & optimistic state](../concepts/pending-and-optimistic.md)
|
|
418
426
|
|
|
419
|
-
Library mode: the Trigger shows the optimistic open state (`data-open`) and `data-pending` while an open or a part's close is in flight; a dismissal is a fact and pends nothing. The Popup's content renders from the committed `open`. A Close with an `action` is a [pure trigger](../concepts/pending-and-optimistic.md#pure-trigger) (`data-pending`; `aria-disabled` while it ignores a second click, the default).
|
|
427
|
+
Library mode: the Trigger shows the optimistic open state (`data-open`) and `data-pending` while an open or a part's close is in flight; a dismissal is a fact and pends nothing. The Popup's content renders from the committed `open`. A Close with an `action` is a [pure trigger](../concepts/pending-and-optimistic.md#pure-trigger) (`data-pending`; `aria-disabled` while it ignores a second click, the default). Every Close shows `data-pending` from the click until the close it asked for has committed, so a close that waits for `openChangeAction(false)` shows on the button the user pressed; without `action` it is never `aria-disabled`.
|
|
420
428
|
|
|
421
429
|
### Walkthrough (library mode)
|
|
422
430
|
|
|
@@ -383,7 +383,7 @@ A press inside a scroll container along the drawer's axis is that container's, f
|
|
|
383
383
|
|
|
384
384
|
### `Drawer.Close`
|
|
385
385
|
|
|
386
|
-
`Dialog.Close`, unchanged: `<button command="request-close">` in JS-free mode, a close request through the Root in library mode; with an `action`, the action runs first in the button's own transition (`data-pending`) and a rejection leaves the drawer open. Props: `action`, `whilePending`, `value`, `disabled`, `className`, `style`, `children` (functions of `DrawerCloseState`, `{ pending, disabled }`), `render`. See [Dialog.Close](dialog.md#props).
|
|
386
|
+
`Dialog.Close`, unchanged: `<button command="request-close">` in JS-free mode, a close request through the Root in library mode; with an `action`, the action runs first in the button's own transition (`data-pending`) and a rejection leaves the drawer open. With or without `action`, the button has `data-pending` until the close it asked for has committed. Props: `action`, `whilePending`, `value`, `disabled`, `className`, `style`, `children` (functions of `DrawerCloseState`, `{ pending, disabled }`), `render`. See [Dialog.Close](dialog.md#props).
|
|
387
387
|
|
|
388
388
|
### `Drawer.Form`, `Drawer.Title`, `Drawer.Description`
|
|
389
389
|
|
|
@@ -400,7 +400,7 @@ A press inside a scroll container along the drawer's axis is that container's, f
|
|
|
400
400
|
| `--drawer-swipe-x`, `--drawer-swipe-y` | Popup (inline) | The offset as a physical vector in px: `0px 120px` for a bottom drawer pulled down 120 px, `-80px 0px` for a left one. Absent when nothing has moved the drawer; set to the full extent during a release's slide; removed by the close or the return. |
|
|
401
401
|
| `--drawer-swipe-progress` | Popup (inline) | Offset / extent, from 0 to 1. `::backdrop` inherits it. |
|
|
402
402
|
| `data-open`, `data-pending` | Trigger | Library mode, as on a Dialog. |
|
|
403
|
-
| `data-pending` | Close |
|
|
403
|
+
| `data-pending` | Close | From the click until the close it asked for has committed: its `action`, then the Root's close (library mode, also without `action`). |
|
|
404
404
|
| `data-disabled` | Trigger, Close | The `disabled` prop. |
|
|
405
405
|
|
|
406
406
|
## Keyboard and ARIA
|
|
@@ -417,7 +417,7 @@ Library mode tags an open with `fsui-drawer` plus `fsui-drawer-open`, a Close or
|
|
|
417
417
|
|
|
418
418
|
Concept: [Pending & optimistic state](../concepts/pending-and-optimistic.md)
|
|
419
419
|
|
|
420
|
-
As a Dialog's: the Trigger is pending while an open is in flight, a Close
|
|
420
|
+
As a Dialog's: the Trigger is pending while an open is in flight, a Close is pending from the click until the close it asked for has committed (its `action`, then the Root's close; also without `action`). A swipe is never pending: it is a fact, reported the moment the browser closes the dialog, and it supersedes a close a part asked for. A Close action that is still running keeps running; its close is then a no-op.
|
|
421
421
|
|
|
422
422
|
### Walkthrough: a swipe
|
|
423
423
|
|
|
@@ -401,7 +401,7 @@ A menu shown on the physical side you asked for costs no render for the placemen
|
|
|
401
401
|
| `style` | `CSSProperties \| ((state: MenuItemState) => CSSProperties \| undefined)` | – | Inline style, or a function of the part's state. |
|
|
402
402
|
| `children` | `ReactNode \| ((state: MenuItemState) => ReactNode)` | – | Content, or a function of the part's state. |
|
|
403
403
|
| `render` | `ReactElement \| ((props, state: MenuItemState) => ReactNode)` | – | Replace the default \<button> (element form) or take over rendering (function form). |
|
|
404
|
-
| `whilePending` | `"run" \| "ignore"` | `"ignore", or "run" with closeOnActivate={false}` | What a click, Enter or Space does while this item's `action` is pending. `"ignore"`: nothing (the event is cancelled, `aria-disabled="true"` meanwhile). `"run"`: the action runs again (`data-pending` until every run has settled, no `aria-disabled`); a closing item closes the menu once the last run has settled, and only if the latest run resolved: a rejection keeps the menu open in both modes. No effect without `action`. See [A second click while pending](../concepts/pending-and-optimistic.md#second-click). |
|
|
404
|
+
| `whilePending` | `"run" \| "ignore"` | `"ignore", or "run" with closeOnActivate={false}` | What a click, Enter or Space does while this item's `action` is pending. `"ignore"`: nothing (the event is cancelled, `aria-disabled="true"` meanwhile). `"run"`: the action runs again (`data-pending` until every run has settled, no `aria-disabled`); a closing item closes the menu once the last run has settled, and only if the latest run resolved: a rejection keeps the menu open in both modes. No effect without `action`: the item then shows `data-pending` while the menu's close waits, never `aria-disabled`. See [A second click while pending](../concepts/pending-and-optimistic.md#second-click). |
|
|
405
405
|
|
|
406
406
|
- **State**: `MenuItemState` is `{ pending, disabled }`.
|
|
407
407
|
- **Owned**: `type` (on a `<button>`), `role`, `tabIndex`, `disabled` (always absent), `aria-disabled` (the `disabled` prop, or while pending with `whilePending="ignore"`), `onClick`, `onKeyDown`, `onPointerMove`, `data-pending`, `data-disabled`, `data-typeahead`.
|
|
@@ -489,7 +489,7 @@ Both an item of the parent menu (roving `tabindex`, typeahead) and the trigger o
|
|
|
489
489
|
| `aria-expanded` | Trigger, SubmenuTrigger, only when it is no [invoker](../concepts/browser-owned-state.md#popup-triggers): a link or other non-button element, a disabled component `render`, or a disabled SubmenuTrigger | Whether the menu is shown (mirrored from its `toggle` event, not optimistic). A `<button>` has none: the browser exposes the state. |
|
|
490
490
|
| `data-open` | ContextTrigger | Optimistic open state of the Root (no `aria-expanded`: the region has no role). |
|
|
491
491
|
| `data-pending` | Trigger, SubmenuTrigger, ContextTrigger | An open or close of the Root is in flight (items that suspend hold the open). |
|
|
492
|
-
| `data-pending` | Item, CheckboxItem, RadioItem, RadioGroup | The item's `action` or change action is in flight; on the RadioGroup while a selection is. |
|
|
492
|
+
| `data-pending` | Item, CheckboxItem, RadioItem, RadioGroup | The item's `action` or change action is in flight, then (a closing Item, with or without `action`) until the menu's close has committed; on the RadioGroup while a selection is. |
|
|
493
493
|
| `aria-disabled` | Item, CheckboxItem, RadioItem, SubmenuTrigger | `"true"` for the `disabled` prop (items are never natively disabled), and on an Item while its `action` is pending and it ignores a second activation (`whilePending="ignore"`, the default unless `closeOnActivate={false}`). |
|
|
494
494
|
| `data-disabled` | Trigger, items, ContextTrigger | The `disabled` prop. |
|
|
495
495
|
| `aria-checked`, `data-checked` | CheckboxItem, RadioItem | Optimistic checked state. |
|
|
@@ -539,7 +539,7 @@ Opens and closes: `fsui-menu` plus `fsui-menu-open` or `fsui-menu-close`. A Chec
|
|
|
539
539
|
|
|
540
540
|
Concept: [Pending & optimistic state](../concepts/pending-and-optimistic.md)
|
|
541
541
|
|
|
542
|
-
The Trigger's `data-open` and CheckboxItem and RadioItem `data-checked` are optimistic; the state the browser exposes on the Trigger follows the shown menu. Items render from the committed open state. An Item is a [pure trigger](../concepts/pending-and-optimistic.md#pure-trigger): `data-pending` while its action runs; a second activation is ignored, or with `closeOnActivate={false}` runs again (`whilePending`).
|
|
542
|
+
The Trigger's `data-open` and CheckboxItem and RadioItem `data-checked` are optimistic; the state the browser exposes on the Trigger follows the shown menu. Items render from the committed open state. An Item is a [pure trigger](../concepts/pending-and-optimistic.md#pure-trigger): `data-pending` while its action runs and until the menu's close it asked for has committed (also without `action`, then never `aria-disabled`); a second activation is ignored, or with `closeOnActivate={false}` runs again (`whilePending`).
|
|
543
543
|
|
|
544
544
|
### A slow `openChangeAction`
|
|
545
545
|
|
|
@@ -667,4 +667,4 @@ Keep the CSS exit next to `transition`: it animates the dismissals. The library
|
|
|
667
667
|
|
|
668
668
|
- `experimental_focusgroup` takes the native path in Chromium only; other engines keep the JS arrow keys (identical behaviour).
|
|
669
669
|
- Safari: a nested popover with `position-try-fallbacks` can hang (WebKit bug 302008). If a submenu hits it, give its Popup `side={null}` and place it in CSS.
|
|
670
|
-
-
|
|
670
|
+
- A row of menus with arrow keys between them is a [Menubar](menubar.md), around ordinary `Menu.Root`s.
|