@funstack/ui 0.1.0-alpha.22 → 0.1.0-alpha.24
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 +4 -4
- package/dist/combobox/combobox-keyboard.mjs.map +1 -1
- 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 +52 -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/field.md +2 -2
- package/dist/docs/components/menu.md +3 -3
- package/dist/docs/components/popover.md +6 -6
- package/dist/docs/concepts/pending-and-optimistic.md +1 -0
- package/dist/docs/roadmap.md +4 -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 +81 -31
- 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 +22 -8
- package/dist/field/use-server-error-visibility.mjs.map +1 -1
- 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 +7 -22
- package/dist/hover-card/use-hover-card-interest.mjs.map +1 -1
- package/dist/index.d.mts +41 -35
- 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/escape-key.mjs +20 -0
- package/dist/internal/escape-key.mjs.map +1 -0
- 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 +1 -2
- 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/open-layer.mjs +31 -0
- package/dist/internal/overlay/open-layer.mjs.map +1 -0
- 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 +1 -2
- 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 +6 -7
- 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 +4 -5
- 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 +1 -2
- 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 +13 -14
- 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 +1 -3
- package/dist/menu/menu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-trigger.mjs +5 -6
- package/dist/menu/use-menu-item.mjs +2 -3
- package/dist/menu/use-menu-keyboard.mjs +2 -3
- package/dist/menubar/menubar.d.mts +1 -3
- package/dist/menubar/menubar.d.mts.map +1 -1
- package/dist/menubar/menubar.mjs +9 -9
- package/dist/menubar/menubar.mjs.map +1 -1
- 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 +1 -3
- package/dist/meter/meter-root.d.mts.map +1 -1
- package/dist/meter/meter-root.mjs +4 -5
- 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 +3 -3
- package/dist/multi-select/multi-select-keyboard.mjs.map +1 -1
- 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 +12 -13
- 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 +8 -9
- 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 +0 -2
- package/dist/navigation-menu/index.d.mts.map +1 -1
- package/dist/navigation-menu/index.mjs +1 -2
- package/dist/navigation-menu/navigation-menu-context.mjs +1 -2
- package/dist/navigation-menu/navigation-menu-item.d.mts +1 -3
- package/dist/navigation-menu/navigation-menu-item.d.mts.map +1 -1
- package/dist/navigation-menu/navigation-menu-item.mjs +3 -4
- package/dist/navigation-menu/navigation-menu-link.d.mts +1 -3
- package/dist/navigation-menu/navigation-menu-link.d.mts.map +1 -1
- package/dist/navigation-menu/navigation-menu-link.mjs +4 -5
- package/dist/navigation-menu/navigation-menu-list.d.mts +1 -3
- package/dist/navigation-menu/navigation-menu-list.d.mts.map +1 -1
- package/dist/navigation-menu/navigation-menu-list.mjs +1 -2
- package/dist/navigation-menu/navigation-menu-popup.d.mts +2 -4
- package/dist/navigation-menu/navigation-menu-popup.d.mts.map +1 -1
- package/dist/navigation-menu/navigation-menu-popup.mjs +8 -9
- package/dist/navigation-menu/navigation-menu-root.d.mts +1 -3
- package/dist/navigation-menu/navigation-menu-root.d.mts.map +1 -1
- package/dist/navigation-menu/navigation-menu-root.mjs +1 -2
- package/dist/navigation-menu/navigation-menu-trigger.d.mts +0 -2
- package/dist/navigation-menu/navigation-menu-trigger.d.mts.map +1 -1
- package/dist/navigation-menu/navigation-menu-trigger.mjs +2 -3
- 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 +9 -9
- 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 +1 -3
- package/dist/otp-field/otp-field-root.d.mts.map +1 -1
- package/dist/otp-field/otp-field-root.mjs +10 -11
- 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 +2 -4
- 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 +1 -3
- package/dist/progress/progress-root.d.mts.map +1 -1
- package/dist/progress/progress-root.mjs +4 -5
- 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 +8 -6
- 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 +5 -5
- package/dist/tooltip/use-tooltip-interaction.mjs.map +1 -1
- package/package.json +8 -8
- package/skills/funstack-ui-knowledge/SKILL.md +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-popup.d.mts","names":[],"sources":["../../src/dialog/dialog-popup.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog-popup.d.mts","names":[],"sources":["../../src/dialog/dialog-popup.tsx"],"mappings":";;;;;;;;iBAwCiB;;WAEN;;WAEA;;;;;;;iBAQM,yBAAyB,KACxC;;;;;;;;;;;;;EAeA;;;;;;;;;;;EAWA,eAAe,UAAU;;;;;;;;;;EAUzB;;;;;;;;EAQA;;;;;;;;;;;;;;;;EAgBA,aAAa;;EAEb,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;wBAkCvC,YAAY,OAAO,mBAAgB;yBAAnC"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useTransitionBoundary } from "../internal/transition-boundary.mjs";
|
|
4
|
-
import { resolveStateValue } from "../internal/render-element.mjs";
|
|
5
|
-
import { useRender } from "../internal/use-render.mjs";
|
|
6
|
-
import { useLatest } from "../internal/use-latest.mjs";
|
|
7
|
-
import { useElementCheck } from "../internal/use-element-check.mjs";
|
|
8
|
-
import { eventSource } from "../internal/overlay/invokers.mjs";
|
|
2
|
+
import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
|
|
9
3
|
import { useContentFocusProbe } from "../internal/overlay/content-focus-probe.mjs";
|
|
10
4
|
import { withCssTransitionCut } from "../internal/overlay/css-transition-cut.mjs";
|
|
5
|
+
import { resolveStateValue } from "../internal/render-element.mjs";
|
|
11
6
|
import { commandOf, renderOverlayContent, resolveInitialFocus, returnFocusToTrigger, useCloseHold, useInitialFocusTarget, useJsFreePropWarnings } from "../internal/overlay/overlay-popup.mjs";
|
|
12
7
|
import { createPopupFlags, showWithFocus } from "../internal/overlay/overlay-show.mjs";
|
|
13
8
|
import { useApplyOpenState } from "../internal/overlay/use-apply-open-state.mjs";
|
|
9
|
+
import { eventSource } from "../internal/overlay/invokers.mjs";
|
|
10
|
+
import { useTransitionBoundary } from "../internal/transition-boundary.mjs";
|
|
11
|
+
import { dataAttr } from "../internal/data-attr.mjs";
|
|
12
|
+
import { useElementCheck } from "../internal/use-element-check.mjs";
|
|
13
|
+
import { useLatest } from "../internal/use-latest.mjs";
|
|
14
|
+
import { useModalRegistration } from "../internal/overlay/use-modal-registration.mjs";
|
|
14
15
|
import { useShownNameWarning } from "../internal/use-name-warning.mjs";
|
|
16
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
15
17
|
import { useDialogContext } from "./dialog-context.mjs";
|
|
16
|
-
import { useModalRegistration } from "../internal/overlay/use-modal-registration.mjs";
|
|
17
18
|
import { listenDialogDismiss } from "./dialog-dismiss.mjs";
|
|
18
|
-
|
|
19
|
-
//#region src/dialog/dialog-popup.tsx
|
|
19
|
+
// src/dialog/dialog-popup.tsx
|
|
20
20
|
const isDev = process.env.NODE_ENV !== "production";
|
|
21
21
|
/** The submitter's or invoker's `value` (`""` without one, or where the engine gives no source). */
|
|
22
22
|
function valueOf(element) {
|
|
@@ -304,7 +304,6 @@ function useDialogPopup({ keepMounted, initialFocus, lightDismiss = false, exper
|
|
|
304
304
|
});
|
|
305
305
|
return useTransitionBoundary(part, isLibrary ? transition : void 0, element);
|
|
306
306
|
}
|
|
307
|
-
//#endregion
|
|
308
307
|
export { DialogPopup, useDialogPopup };
|
|
309
308
|
|
|
310
309
|
//# sourceMappingURL=dialog-popup.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { ActionDetails, ChangeAction, ChangeReason, StateValue, UrgentChangeHandler } from "../internal/types.mjs";
|
|
2
3
|
import "./dialog-context.mjs";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
//#region src/dialog/dialog-root.d.ts
|
|
5
4
|
/** Details passed as the second argument of `openChangeAction` and `onOpenChange`. */
|
|
6
5
|
export interface DialogOpenChangeDetails extends ActionDetails {
|
|
7
6
|
/**
|
|
@@ -101,5 +100,4 @@ export declare function DialogRoot({ modal, ...props }: DialogRootProps): ReactN
|
|
|
101
100
|
export declare namespace DialogRoot {
|
|
102
101
|
var displayName: string;
|
|
103
102
|
}
|
|
104
|
-
//#endregion
|
|
105
103
|
//# sourceMappingURL=dialog-root.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-root.d.mts","names":[],"sources":["../../src/dialog/dialog-root.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog-root.d.mts","names":[],"sources":["../../src/dialog/dialog-root.tsx"],"mappings":";;;;iBAkBiB,gCAAgC;;;;;;;;WAQtC,QAAQ;;;;;;WAMR;;;iBAIM;;WAEN;;WAEA;;WAEA;;;;;;;iBAQM;;;;;;EAMf;;;;;EAKA;;;;;;;;;;;;;EAaA,mBAAmB,sBAAsB;;;;;;;;;;;;;;;EAezC,eAAe,6BAA6B;;;;;;EAM5C;;EAEA,WAAW,WAAW,WAAW;;;;;;;;;;;;;;;;;wBA0BnB,aAAa,UAAiB,SAAS,kBAAe;yBAAtD"}
|
|
@@ -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
|
|
|
@@ -263,7 +263,7 @@ A field shows an error when its control matches `:user-invalid` or the Form has
|
|
|
263
263
|
- **Not while the user is still typing for the first time.** `:user-invalid` starts matching after the user changed the value and left the field, or after a submission attempt; it then updates live on every keystroke and stops after a form reset. There is no `validationMode`: this is the heuristic every native form already uses.
|
|
264
264
|
- **A submission attempt** with an invalid field: the Field cancels the browser's validation bubble (only when a `Field.Error` is mounted), renders the message, and the first invalid control in document order is focused. Its description, error included, is read at focus. When focus is already there (Enter pressed in that field), the message is announced with `ariaNotify()` instead, where the browser has it. A field without `Field.Error` keeps the browser's bubble; so does every field before hydration.
|
|
265
265
|
- `form.checkValidity()` shows nothing and `reportValidity()` shows the browser's bubble, as without the library.
|
|
266
|
-
- The display state is updated
|
|
266
|
+
- The display state is updated urgently from the DOM event, not in a transition: the error must be in the DOM when focus reaches the field. After an edit it is updated once the event has been dispatched, so your own `onChange` on a controlled control runs first; the browser's validity follows the new value at once. So no Field part takes a `transition` prop, `Field.Error` animates its entry with CSS `@starting-style`, and content rendered inside it must not suspend.
|
|
267
267
|
|
|
268
268
|
### Custom rules: validate
|
|
269
269
|
|
|
@@ -436,7 +436,7 @@ None: no part adds transition types or takes a `transition` prop.
|
|
|
436
436
|
|
|
437
437
|
Concept: [Pending & optimistic state](../concepts/pending-and-optimistic.md)
|
|
438
438
|
|
|
439
|
-
A Form with a function `action` runs it in its own transition: `data-pending` is on the form, on `Form.Submit` and on every Field part while the submission is in flight. A Field's display state (whether its error shows) is updated
|
|
439
|
+
A Form with a function `action` runs it in its own transition: `data-pending` is on the form, on `Form.Submit` and on every Field part while the submission is in flight. A Field's display state (whether its error shows) is updated urgently from the DOM event (after an edit, once the event has been dispatched), not in a transition.
|
|
440
440
|
|
|
441
441
|
## Suspense
|
|
442
442
|
|
|
@@ -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
|
|
|
@@ -279,15 +279,15 @@ A click on a `<button>` Trigger while open is a part's close; a second click dur
|
|
|
279
279
|
|
|
280
280
|
| Prop | Type | Default | Description |
|
|
281
281
|
| - | - | - | - |
|
|
282
|
-
| `action` | `Action<[details: ActionDetails]>` | – | Runs in this button's own transition (`data-pending` on it), then closes the popover: in library mode through the Root (`openChangeAction(false)` awaited, view transition if set), in JS-free mode with `hidePopover()`. A rejection reaches the nearest Error Boundary above the button and leaves the popover open. 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 hiding the popover without running the action). Without `action` in JS-free mode the button is a native `command="hide-popover"` invoker. |
|
|
283
|
-
| `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 popover 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). |
|
|
282
|
+
| `action` | `Action<[details: ActionDetails]>` | – | Runs in this button's own transition (`data-pending` on it), then closes the popover: in library mode through the Root (`openChangeAction(false)` awaited, view transition if set), in JS-free mode with `hidePopover()`. A rejection reaches the nearest Error Boundary above the button and leaves the popover open. 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 hiding the popover without running the action). Without `action` in JS-free mode the button is a native `command="hide-popover"` invoker; in library mode it asks the Root and is pending until that close has committed. |
|
|
283
|
+
| `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 popover 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). |
|
|
284
284
|
| `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. |
|
|
285
285
|
| `className` | `string \| ((state: PopoverCloseState) => string \| undefined)` | – | A class name, or a function of the part's state. |
|
|
286
286
|
| `style` | `CSSProperties \| ((state: PopoverCloseState) => CSSProperties \| undefined)` | – | Inline style, or a function of the part's state. |
|
|
287
287
|
| `children` | `ReactNode \| ((state: PopoverCloseState) => ReactNode)` | – | Content, or a function of the part's state. |
|
|
288
288
|
| `render` | `ReactElement \| ((props, state: PopoverCloseState) => ReactNode)` | – | Replace the default \<button> (element form) or take over rendering (function form). |
|
|
289
289
|
|
|
290
|
-
- **State**: `PopoverCloseState` is `{ pending, disabled }
|
|
290
|
+
- **State**: `PopoverCloseState` is `{ pending, disabled }`; `pending` runs from the click until the close this part asked for has committed, with or without `action` (library mode).
|
|
291
291
|
- **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), `onClick` (library mode, or with `action`), `data-pending`, `data-disabled`; a `render` element cannot re-enable a disabled Close.
|
|
292
292
|
|
|
293
293
|
In library mode the click is always intercepted, so every Close goes through the Root. By default (`whilePending="ignore"`) a second click while the action is pending is ignored (and cancelled), and the button is `aria-disabled="true"` for as long as it shows `data-pending` (the action and the hide); never natively disabled, so it keeps focus. To hide at once and finish the work in the background, do not return the promise: `action={() => { void apply(); }}`. If the user dismisses the popover and opens it again while the action runs, the action's close is dropped: it belonged to the earlier open. Popovers have no return value.
|
|
@@ -315,8 +315,8 @@ A dialog-role Popup with neither a Title nor an `aria-label` is a development wa
|
|
|
315
315
|
| `aria-expanded` | Trigger, only when it is no [invoker](../concepts/browser-owned-state.md#popup-triggers): a link or other non-button element, or a disabled component `render` | Whether the popup is shown (library mode). A `<button>` Trigger has none: the browser exposes the state. |
|
|
316
316
|
| `data-open` | Trigger | Library mode: optimistic open state. JS-free mode: whether the popup is shown, written from its `toggle` event. |
|
|
317
317
|
| `data-pending` | Trigger | An open or a part-initiated 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. |
|
|
318
|
-
| `data-pending` | Close |
|
|
319
|
-
| `aria-disabled` | Close | `"true"` while `data-pending` with `whilePending="ignore"` (the default): a second click is ignored meanwhile. |
|
|
318
|
+
| `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`). |
|
|
319
|
+
| `aria-disabled` | Close | `"true"` with `action`, while `data-pending` with `whilePending="ignore"` (the default): a second click is ignored meanwhile. |
|
|
320
320
|
| `data-disabled` | Trigger, Close | The `disabled` prop (both modes). |
|
|
321
321
|
|
|
322
322
|
## Keyboard and ARIA
|
|
@@ -363,7 +363,7 @@ With `transition`, the Popup renders `<ViewTransition>` around the popover eleme
|
|
|
363
363
|
|
|
364
364
|
Concept: [Pending & optimistic state](../concepts/pending-and-optimistic.md)
|
|
365
365
|
|
|
366
|
-
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: the popup, `data-open`, the committed `open` and the expanded state assistive technology hears all change at once, and nothing is pending. 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).
|
|
366
|
+
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: the popup, `data-open`, the committed `open` and the expanded state assistive technology hears all change at once, and nothing is pending. 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). Every Close shows `data-pending` from the click until the close it asked for has committed; without `action` it is never `aria-disabled`.
|
|
367
367
|
|
|
368
368
|
### Walkthrough (library mode)
|
|
369
369
|
|
|
@@ -214,6 +214,7 @@ Each component page lists which of its parts show which value in its **Optimisti
|
|
|
214
214
|
|
|
215
215
|
- **On the state owner** while its transition is pending.
|
|
216
216
|
- **On the trigger the user is waiting on**: the one whose optimistic value differs from the committed one, or that started the action. Decorative parts that follow the trigger (an indicator) may mirror it.
|
|
217
|
+
- **On a part that asked its owner to close** (a `Dialog.Close`, `Popover.Close`, `Drawer.Close`, an AlertDialog Cancel or Action, a closing `Menu.Item`): from the click until that close has committed, with or without an `action` of its own. The Trigger may be out of sight under a modal backdrop. Without an `action` the part is never `aria-disabled`: nothing of its own is ignored.
|
|
217
218
|
- **Never on content regions.** A content region shows the committed value or nothing; it is never "in between". To dim the old content while the next one loads, select through the state owner.
|
|
218
219
|
- **Never for a fact.** A [fact](action-props.md#fact), a change that had already happened when the library heard of it (a popup dismissed with Escape or a click outside), is reported to an `on*` handler and is not awaited, so nothing is pending for it: the popup, `data-open` and the committed state all change at once ([Requests and facts](browser-owned-state.md#requests-and-facts)).
|
|
219
220
|
|
package/dist/docs/roadmap.md
CHANGED
|
@@ -10,6 +10,10 @@ Alpha releases (`0.1.0-alpha.N`) are published on npm under the `alpha` dist-tag
|
|
|
10
10
|
|
|
11
11
|
Changes an upgrade may notice, newest first. Each component page documents the current behaviour.
|
|
12
12
|
|
|
13
|
+
- A Close part (`Dialog.Close`, `Popover.Close`, `Drawer.Close`, `AlertDialog.Cancel`, `AlertDialog.Action`) without `action` now has `data-pending` and `state.pending` from the click until the close it asked for has committed, as one with `action` and a `Menu.Item` already did ([#183](https://github.com/uhyo/funstack-ui/issues/183)): a Cancel clicked while the confirm runs shows the wait. A synchronous close shows it for one commit; delay a spinner in CSS. A `Menu.Item` without `action` no longer renders `aria-disabled="true"` while the menu's close waits.
|
|
14
|
+
|
|
15
|
+
- Accordion and Collapsible tell their own `open` writes from the browser's by the value they last wrote or read ([#175](https://github.com/uhyo/funstack-ui/issues/175)): a `<details>` re-opened by the browser while its close is pending is now dispatched with `reason: "platform"` instead of being taken for an echo.
|
|
16
|
+
|
|
13
17
|
- New component [Menubar](components/menubar.md) ([#170](https://github.com/uhyo/funstack-ui/issues/170)): a `<div role="menubar">` around ordinary `Menu.Root`s. A `Menu.Trigger` inside it renders `role="menuitem"`, and its `disabled` renders `aria-disabled` (it stays focusable); outside a bar nothing changes.
|
|
14
18
|
|
|
15
19
|
- New component [NavigationMenu](components/navigation-menu.md) ([#170](https://github.com/uhyo/funstack-ui/issues/170)): a site's main navigation as the disclosure pattern, each panel a `popover="auto"` next to its `popovertarget` button. It needs no JavaScript by default; after hydration focus leaving a panel and a followed `NavigationMenu.Link` close it. A panel whose content loads on open opts into library mode (`openChangeAction`, transition types `fsui-navigation-menu*`). Hover opening and arrow keys are not in this version.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogCloseDetails, DialogCloseProps, DialogCloseState } from "../dialog/dialog-close.mjs";
|
|
2
|
-
//#region src/drawer/drawer-close.d.ts
|
|
3
2
|
/** State of `Drawer.Close`: Dialog's. */
|
|
4
3
|
export type DrawerCloseState = DialogCloseState;
|
|
5
4
|
/** Details passed to `Drawer.Close`'s `action`: Dialog's. */
|
|
@@ -22,5 +21,4 @@ export declare function DrawerClose(props: DrawerCloseProps): import("react").Re
|
|
|
22
21
|
export declare namespace DrawerClose {
|
|
23
22
|
var displayName: string;
|
|
24
23
|
}
|
|
25
|
-
//#endregion
|
|
26
24
|
//# sourceMappingURL=drawer-close.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-close.d.mts","names":[],"sources":["../../src/drawer/drawer-close.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-close.d.mts","names":[],"sources":["../../src/drawer/drawer-close.tsx"],"mappings":";;YASY,mBAAmB;;YAGnB,qBAAqB;;;;;;YAOrB,mBAAmB;;;;;;;;;wBAUf,YAAY,OAAO,mCAAgB;yBAAnC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useDialogClose } from "../dialog/dialog-close.mjs";
|
|
3
|
-
|
|
3
|
+
// src/drawer/drawer-close.tsx
|
|
4
4
|
/**
|
|
5
5
|
* A close button: exactly `Dialog.Close` (`<button type="button" commandfor
|
|
6
6
|
* command="request-close">` in JS-free mode, a close through the Root in library mode; with
|
|
@@ -13,7 +13,6 @@ function DrawerClose(props) {
|
|
|
13
13
|
return useDialogClose(props, { part: "Drawer.Close" });
|
|
14
14
|
}
|
|
15
15
|
DrawerClose.displayName = "DrawerClose";
|
|
16
|
-
//#endregion
|
|
17
16
|
export { DrawerClose };
|
|
18
17
|
|
|
19
18
|
//# sourceMappingURL=drawer-close.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogDescriptionProps, DialogDescriptionState } from "../dialog/dialog-description.mjs";
|
|
2
|
-
//#region src/drawer/drawer-description.d.ts
|
|
3
2
|
/** State of `Drawer.Description`: Dialog's (the Popup's `open` and `modal`). */
|
|
4
3
|
export type DrawerDescriptionState = DialogDescriptionState;
|
|
5
4
|
/**
|
|
@@ -19,5 +18,4 @@ export declare function DrawerDescription(props: DrawerDescriptionProps): import
|
|
|
19
18
|
export declare namespace DrawerDescription {
|
|
20
19
|
var displayName: string;
|
|
21
20
|
}
|
|
22
|
-
//#endregion
|
|
23
21
|
//# sourceMappingURL=drawer-description.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-description.d.mts","names":[],"sources":["../../src/drawer/drawer-description.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-description.d.mts","names":[],"sources":["../../src/drawer/drawer-description.tsx"],"mappings":";;YAQY,yBAAyB;;;;;;YAOzB,yBAAyB;;;;;;;;wBASrB,kBAAkB,OAAO,yCAAsB;yBAA/C"}
|