@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,15 +1,14 @@
|
|
|
1
1
|
import "../internal/platform-attributes.mjs";
|
|
2
2
|
import { ComboboxChip, ComboboxChipProps, ComboboxChipRemove, ComboboxChipRemoveProps, ComboboxChipRemoveState, ComboboxChipState, ComboboxChips, ComboboxChipsProps, ComboboxChipsState } from "./combobox-chips.mjs";
|
|
3
3
|
import { ComboboxClear, ComboboxClearProps, ComboboxClearState } from "./combobox-clear.mjs";
|
|
4
|
-
import { ComboboxList, ComboboxListProps, ComboboxListState } from "./combobox-list.mjs";
|
|
5
4
|
import { ComboboxEmpty, ComboboxEmptyProps, ComboboxEmptyState, ComboboxGroup, ComboboxGroupLabel, ComboboxGroupLabelProps, ComboboxGroupLabelState, ComboboxGroupProps, ComboboxGroupState, ComboboxStatus, ComboboxStatusProps, ComboboxStatusState } from "./combobox-group.mjs";
|
|
6
5
|
import { ComboboxInput, ComboboxInputProps, ComboboxInputState } from "./combobox-input.mjs";
|
|
7
6
|
import { ComboboxLabel, ComboboxLabelProps, ComboboxLabelState } from "./combobox-label.mjs";
|
|
7
|
+
import { ComboboxList, ComboboxListProps, ComboboxListState } from "./combobox-list.mjs";
|
|
8
8
|
import { ComboboxOption, ComboboxOptionProps, ComboboxOptionState } from "./combobox-option.mjs";
|
|
9
9
|
import { ComboboxPopup, ComboboxPopupProps, ComboboxPopupState } from "./combobox-popup.mjs";
|
|
10
10
|
import { ComboboxInputValueChangeDetails, ComboboxMultipleProps, ComboboxMultipleRootState, ComboboxMultipleValueChangeDetails, ComboboxOpenChangeDetails, ComboboxRoot, ComboboxRootProps, ComboboxRootState, ComboboxSingleProps, ComboboxValueChangeDetails } from "./combobox-root.mjs";
|
|
11
11
|
import { ComboboxTrigger, ComboboxTriggerProps, ComboboxTriggerState } from "./combobox-trigger.mjs";
|
|
12
|
-
//#region src/combobox/index.d.ts
|
|
13
12
|
/**
|
|
14
13
|
* Editable combobox with list autocomplete (WAI-ARIA APG) on `popover="auto"`: `Root` (no DOM,
|
|
15
14
|
* or one hidden input with `name`) > `Label`, `Input` (`input[role=combobox]`), `Trigger`,
|
|
@@ -39,6 +38,5 @@ export declare const Combobox: {
|
|
|
39
38
|
readonly Chip: typeof ComboboxChip;
|
|
40
39
|
readonly ChipRemove: typeof ComboboxChipRemove;
|
|
41
40
|
};
|
|
42
|
-
//#endregion
|
|
43
41
|
export type { ComboboxChipProps, ComboboxChipRemoveProps, ComboboxChipRemoveState, ComboboxChipState, ComboboxChipsProps, ComboboxChipsState, ComboboxClearProps, ComboboxClearState, ComboboxEmptyProps, ComboboxEmptyState, ComboboxGroupLabelProps, ComboboxGroupLabelState, ComboboxGroupProps, ComboboxGroupState, ComboboxInputProps, ComboboxInputState, ComboboxInputValueChangeDetails, ComboboxLabelProps, ComboboxLabelState, ComboboxListProps, ComboboxListState, ComboboxMultipleProps, ComboboxMultipleRootState, ComboboxMultipleValueChangeDetails, ComboboxOpenChangeDetails, ComboboxOptionProps, ComboboxOptionState, ComboboxPopupProps, ComboboxPopupState, ComboboxRootProps, ComboboxRootState, ComboboxSingleProps, ComboboxStatusProps, ComboboxStatusState, ComboboxTriggerProps, ComboboxTriggerState, ComboboxValueChangeDetails };
|
|
44
42
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/combobox/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/combobox/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;qBA+Ba;WACX,aAAI;WACJ,cAAK;WACL,cAAK;WACL,gBAAO;WACP,cAAK;WACL,cAAK;WACL,aAAI;WACJ,eAAM;WACN,cAAK;WACL,mBAAU;WACV,cAAK;WACL,eAAM;WACN,cAAK;WACL,aAAI;WACJ,mBAAU"}
|
package/dist/combobox/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { ComboboxOption } from "./combobox-option.mjs";
|
|
|
8
8
|
import { ComboboxPopup } from "./combobox-popup.mjs";
|
|
9
9
|
import { ComboboxRoot } from "./combobox-root.mjs";
|
|
10
10
|
import { ComboboxTrigger } from "./combobox-trigger.mjs";
|
|
11
|
-
|
|
11
|
+
// src/combobox/index.ts
|
|
12
12
|
/**
|
|
13
13
|
* Editable combobox with list autocomplete (WAI-ARIA APG) on `popover="auto"`: `Root` (no DOM,
|
|
14
14
|
* or one hidden input with `name`) > `Label`, `Input` (`input[role=combobox]`), `Trigger`,
|
|
@@ -38,7 +38,6 @@ const Combobox = {
|
|
|
38
38
|
Chip: ComboboxChip,
|
|
39
39
|
ChipRemove: ComboboxChipRemove
|
|
40
40
|
};
|
|
41
|
-
//#endregion
|
|
42
41
|
export { Combobox };
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useFormReset, useResetTarget } from "../internal/form/use-form-reset.mjs";
|
|
3
2
|
import { useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
|
-
|
|
3
|
+
import { useFormReset, useResetTarget } from "../internal/form/use-form-reset.mjs";
|
|
4
|
+
// src/combobox/use-combobox-form.ts
|
|
5
5
|
/**
|
|
6
6
|
* The Combobox's form behaviour (design/components/combobox.md 11.1, walkthroughs 10 and 11):
|
|
7
7
|
* form reset of the text and the value, the DOM re-sync for a controlled parent that keeps its
|
|
@@ -27,8 +27,7 @@ function useComboboxForm(options) {
|
|
|
27
27
|
set current(_ignored) {}
|
|
28
28
|
}), [hiddenRef, inputRef]);
|
|
29
29
|
useFormReset(formElement, (event) => {
|
|
30
|
-
|
|
31
|
-
if (domText !== textRef.current) writeText(domText, "platform", event);
|
|
30
|
+
if (inputDefaultValue !== textRef.current) writeText(inputDefaultValue, "platform", event);
|
|
32
31
|
setResync((n) => n + 1);
|
|
33
32
|
options.resetValue(event);
|
|
34
33
|
}, () => {
|
|
@@ -47,7 +46,6 @@ function useComboboxForm(options) {
|
|
|
47
46
|
textRef
|
|
48
47
|
]);
|
|
49
48
|
}
|
|
50
|
-
//#endregion
|
|
51
49
|
export { useComboboxForm };
|
|
52
50
|
|
|
53
51
|
//# sourceMappingURL=use-combobox-form.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-combobox-form.mjs","names":[],"sources":["../../src/combobox/use-combobox-form.ts"],"sourcesContent":["\"use client\";\nimport { useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport type { ChangeReason } from \"../internal/types.js\";\nimport type { FormAssociatedElement } from \"../internal/form/use-form-owner-event.js\";\nimport { useFormReset, useResetTarget } from \"../internal/form/use-form-reset.js\";\n\nexport interface ComboboxFormOptions {\n /** The Root's text props, for the text's reset target. */\n readonly inputValue: string | undefined;\n readonly defaultInputValue: string | undefined;\n readonly inputRef: RefObject<HTMLInputElement | null>;\n readonly hiddenRef: RefObject<HTMLInputElement | null>;\n /** The latest text (the urgent lane). */\n readonly textRef: RefObject<string>;\n readonly writeText: (next: string, reason: ChangeReason, event: Event | undefined) => void;\n /**\n * Dispatches the value's reset target (`\"platform\"`) unless there is nothing to change. The\n * Root computes the target per mode (design 11.1, 15.8).\n */\n readonly resetValue: (event: Event) => void;\n}\n\n/**\n * The Combobox's form behaviour (design/components/combobox.md 11.1, walkthroughs 10 and 11):\n * form reset of the text and the value, the DOM re-sync for a controlled parent that keeps its\n * text, and the mount reconciliation of a text typed before hydration.\n */\nexport function useComboboxForm(options: ComboboxFormOptions): void {\n const { inputValue, defaultInputValue, inputRef, hiddenRef, textRef } = options;\n const { writeText } = options;\n\n // The text's reset target (conventions 3.8 rule 6): uncontrolled, the latest default prop;\n // controlled, the mount-time value.\n const inputDefaultValue = useResetTarget(inputValue, defaultInputValue) ?? \"\";\n // After a form reset a controlled parent may not adopt the text: put React's value back into\n // the DOM (react-dom only does that after its own input events).\n const [resync, setResync] = useState(0);\n useLayoutEffect(() => {\n const input = inputRef.current;\n if (resync > 0 && input !== null && input.value !== textRef.current) {\n input.value = textRef.current;\n }\n }, [resync, inputRef, textRef]);\n\n const formElement = useMemo<RefObject<FormAssociatedElement | null>>(\n () => ({\n get current() {\n return hiddenRef.current ?? inputRef.current;\n },\n set current(_ignored) {},\n }),\n [hiddenRef, inputRef],\n );\n useFormReset(\n formElement,\n (event) => {\n
|
|
1
|
+
{"version":3,"file":"use-combobox-form.mjs","names":[],"sources":["../../src/combobox/use-combobox-form.ts"],"sourcesContent":["\"use client\";\nimport { useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport type { ChangeReason } from \"../internal/types.js\";\nimport type { FormAssociatedElement } from \"../internal/form/use-form-owner-event.js\";\nimport { useFormReset, useResetTarget } from \"../internal/form/use-form-reset.js\";\n\nexport interface ComboboxFormOptions {\n /** The Root's text props, for the text's reset target. */\n readonly inputValue: string | undefined;\n readonly defaultInputValue: string | undefined;\n readonly inputRef: RefObject<HTMLInputElement | null>;\n readonly hiddenRef: RefObject<HTMLInputElement | null>;\n /** The latest text (the urgent lane). */\n readonly textRef: RefObject<string>;\n readonly writeText: (next: string, reason: ChangeReason, event: Event | undefined) => void;\n /**\n * Dispatches the value's reset target (`\"platform\"`) unless there is nothing to change. The\n * Root computes the target per mode (design 11.1, 15.8).\n */\n readonly resetValue: (event: Event) => void;\n}\n\n/**\n * The Combobox's form behaviour (design/components/combobox.md 11.1, walkthroughs 10 and 11):\n * form reset of the text and the value, the DOM re-sync for a controlled parent that keeps its\n * text, and the mount reconciliation of a text typed before hydration.\n */\nexport function useComboboxForm(options: ComboboxFormOptions): void {\n const { inputValue, defaultInputValue, inputRef, hiddenRef, textRef } = options;\n const { writeText } = options;\n\n // The text's reset target (conventions 3.8 rule 6): uncontrolled, the latest default prop;\n // controlled, the mount-time value.\n const inputDefaultValue = useResetTarget(inputValue, defaultInputValue) ?? \"\";\n // After a form reset a controlled parent may not adopt the text: put React's value back into\n // the DOM (react-dom only does that after its own input events).\n const [resync, setResync] = useState(0);\n useLayoutEffect(() => {\n const input = inputRef.current;\n if (resync > 0 && input !== null && input.value !== textRef.current) {\n input.value = textRef.current;\n }\n }, [resync, inputRef, textRef]);\n\n const formElement = useMemo<RefObject<FormAssociatedElement | null>>(\n () => ({\n get current() {\n return hiddenRef.current ?? inputRef.current;\n },\n set current(_ignored) {},\n }),\n [hiddenRef, inputRef],\n );\n useFormReset(\n formElement,\n (event) => {\n // The target is computed, not read from the input (conventions 3.8 rule 6): after a click\n // on a reset button this microtask runs before the browser's reset algorithm, so the input\n // still holds the typed text here (#185).\n if (inputDefaultValue !== textRef.current) {\n writeText(inputDefaultValue, \"platform\", event);\n }\n // A controlled parent that does not adopt the text gets the DOM re-synced.\n setResync((n) => n + 1);\n options.resetValue(event);\n },\n () => {\n // react-dom writes `defaultValue = value` after every update of a controlled input, so the\n // reset target is written here, right before the browser's reset algorithm reads it.\n const input = inputRef.current;\n if (input !== null && input.defaultValue !== inputDefaultValue) {\n input.defaultValue = inputDefaultValue;\n }\n },\n );\n\n // Walkthrough 11: react-dom keeps a hydrated text input's DOM value and fires no `onChange`.\n const reconciled = useRef(false);\n useLayoutEffect(() => {\n if (reconciled.current) return;\n reconciled.current = true;\n const input = inputRef.current;\n if (input !== null && input.value !== textRef.current) {\n writeText(input.value, \"platform\", undefined);\n }\n }, [writeText, inputRef, textRef]);\n}\n"],"mappings":";;;;;;;;;AA4BA,SAAgB,gBAAgB,SAAoC;CAClE,MAAM,EAAE,YAAY,mBAAmB,UAAU,WAAW,YAAY;CACxE,MAAM,EAAE,cAAc;CAItB,MAAM,oBAAoB,eAAe,YAAY,iBAAiB,KAAK;CAG3E,MAAM,CAAC,QAAQ,aAAa,SAAS,CAAC;CACtC,sBAAsB;EACpB,MAAM,QAAQ,SAAS;EACvB,IAAI,SAAS,KAAK,UAAU,QAAQ,MAAM,UAAU,QAAQ,SAC1D,MAAM,QAAQ,QAAQ;CAE1B,GAAG;EAAC;EAAQ;EAAU;CAAO,CAAC;CAE9B,MAAM,cAAc,eACX;EACL,IAAI,UAAU;GACZ,OAAO,UAAU,WAAW,SAAS;EACvC;EACA,IAAI,QAAQ,UAAU,CAAC;CACzB,IACA,CAAC,WAAW,QAAQ,CACtB;CACA,aACE,cACC,UAAU;EAIT,IAAI,sBAAsB,QAAQ,SAChC,UAAU,mBAAmB,YAAY,KAAK;EAGhD,WAAW,MAAM,IAAI,CAAC;EACtB,QAAQ,WAAW,KAAK;CAC1B,SACM;EAGJ,MAAM,QAAQ,SAAS;EACvB,IAAI,UAAU,QAAQ,MAAM,iBAAiB,mBAC3C,MAAM,eAAe;CAEzB,CACF;CAGA,MAAM,aAAa,OAAO,KAAK;CAC/B,sBAAsB;EACpB,IAAI,WAAW,SAAS;EACxB,WAAW,UAAU;EACrB,MAAM,QAAQ,SAAS;EACvB,IAAI,UAAU,QAAQ,MAAM,UAAU,QAAQ,SAC5C,UAAU,MAAM,OAAO,YAAY,KAAA,CAAS;CAEhD,GAAG;EAAC;EAAW;EAAU;CAAO,CAAC;AACnC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useCallback, useDeferredValue, useInsertionEffect, useRef, useState } from "react";
|
|
2
3
|
import { createActionDetails } from "../internal/action/action-details.mjs";
|
|
3
|
-
import { useLatest } from "../internal/use-latest.mjs";
|
|
4
4
|
import { callUrgentHandler } from "../internal/action/call-urgent-handler.mjs";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { useLatest } from "../internal/use-latest.mjs";
|
|
6
|
+
// src/combobox/use-combobox-text.ts
|
|
7
7
|
/**
|
|
8
8
|
* The text of a combobox, the library's urgent lane (design/components/combobox.md 2.2 and 4):
|
|
9
9
|
* the controlled or internal `inputValue`, its deferred `query`, and the write that calls
|
|
@@ -37,7 +37,6 @@ function useComboboxText({ inputValue, defaultInputValue, onInputValueChange })
|
|
|
37
37
|
}, [latest])
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { useComboboxText };
|
|
42
41
|
|
|
43
42
|
//# sourceMappingURL=use-combobox-text.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/csp/csp-provider.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Props of `CSPProvider`.
|
|
5
4
|
*
|
|
@@ -29,5 +28,4 @@ export declare function CSPProvider({ nonce, children }: CSPProviderProps): impo
|
|
|
29
28
|
export declare namespace CSPProvider {
|
|
30
29
|
var displayName: string;
|
|
31
30
|
}
|
|
32
|
-
//#endregion
|
|
33
31
|
//# sourceMappingURL=csp-provider.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csp-provider.d.mts","names":[],"sources":["../../src/csp/csp-provider.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"csp-provider.d.mts","names":[],"sources":["../../src/csp/csp-provider.tsx"],"mappings":";;;;;;iBAWiB;;;;;;;EAOf;;EAEA,WAAW;;;;;;;;;;;wBAYG,cAAc,OAAO,YAAY,mCAAgB,IAAA;yBAAjD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { CSPContext } from "../internal/csp-context.mjs";
|
|
3
2
|
import { useMemo } from "react";
|
|
3
|
+
import { CSPContext } from "../internal/csp-context.mjs";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/csp/csp-provider.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Hands a Content Security Policy nonce to every library part that renders a hoisted `<style>`
|
|
8
8
|
* (`Menu.Popup`'s point placement rules, `Tooltip.Trigger`'s skip-delay rule with
|
|
@@ -20,7 +20,6 @@ function CSPProvider({ nonce, children }) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
CSPProvider.displayName = "CSPProvider";
|
|
23
|
-
//#endregion
|
|
24
23
|
export { CSPProvider };
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=csp-provider.mjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/csp/style-hashes.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The base64 SHA-256 of each shipped stylesheet, keyed by its `<style href>`. Allow them with
|
|
4
3
|
* `style-src 'sha256-<value>'`:
|
|
@@ -17,5 +16,4 @@ export declare const STYLE_SHA256: {
|
|
|
17
16
|
readonly "@funstack/ui/menu-point": "Wm5aBRstuZ3S9kDs0IbldhidU/prqpIW69jEAS0N9mc=";
|
|
18
17
|
readonly "@funstack/ui/tooltip-warm": "nFBZGhNvo46ITrlBb48hELUAyWzpeIdJCziCectFQa4=";
|
|
19
18
|
};
|
|
20
|
-
//#endregion
|
|
21
19
|
//# sourceMappingURL=style-hashes.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-hashes.d.mts","names":[],"sources":["../../src/csp/style-hashes.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"style-hashes.d.mts","names":[],"sources":["../../src/csp/style-hashes.ts"],"mappings":";;;;;;;;;;;;;;qBAkBa;WACX;WACA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/csp/style-hashes.ts
|
|
2
2
|
/**
|
|
3
3
|
* The base64 SHA-256 of each shipped stylesheet, keyed by its `<style href>`. Allow them with
|
|
4
4
|
* `style-src 'sha256-<value>'`:
|
|
@@ -17,7 +17,6 @@ const STYLE_SHA256 = {
|
|
|
17
17
|
"@funstack/ui/menu-point": "Wm5aBRstuZ3S9kDs0IbldhidU/prqpIW69jEAS0N9mc=",
|
|
18
18
|
"@funstack/ui/tooltip-warm": "nFBZGhNvo46ITrlBb48hELUAyWzpeIdJCziCectFQa4="
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { STYLE_SHA256 };
|
|
22
21
|
|
|
23
22
|
//# sourceMappingURL=style-hashes.mjs.map
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
1
2
|
import { Action, ActionDetails, RenderProp, StateValue, WhilePending } from "../internal/types.mjs";
|
|
2
3
|
import "./dialog-context.mjs";
|
|
3
|
-
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
-
//#region src/dialog/dialog-close.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* State of `Dialog.Close`, passed to the function forms of `className`, `style`, `children` and
|
|
7
6
|
* `render`.
|
|
8
7
|
*/
|
|
9
8
|
export interface DialogCloseState {
|
|
10
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* From the click until the close this part asked for has committed: the `action` in flight,
|
|
11
|
+
* then the Root's close (an awaited `openChangeAction(false)`, or another pending action the
|
|
12
|
+
* close is entangled with). Also without `action`, in library mode.
|
|
13
|
+
*/
|
|
11
14
|
readonly pending: boolean;
|
|
12
15
|
/** The `disabled` prop. */
|
|
13
16
|
readonly disabled: boolean;
|
|
@@ -40,7 +43,8 @@ export interface DialogCloseProps extends Omit<ComponentPropsWithRef<"button">,
|
|
|
40
43
|
* cancelled, `aria-disabled="true"` meanwhile). `"run"`: the action runs again (`data-pending`
|
|
41
44
|
* until every run has settled); the dialog closes once, when the last run settles and only if
|
|
42
45
|
* the latest run resolved (a rejection leaves it open, as in `"ignore"` mode). No effect
|
|
43
|
-
* without `action
|
|
46
|
+
* without `action`: the part then shows `data-pending` while the Root's close waits, without
|
|
47
|
+
* `aria-disabled`.
|
|
44
48
|
*
|
|
45
49
|
* @defaultValue `"ignore"`
|
|
46
50
|
*/
|
|
@@ -72,7 +76,8 @@ export interface DialogCloseProps extends Omit<ComponentPropsWithRef<"button">,
|
|
|
72
76
|
* through the Root (`openChangeAction(false)` awaited, then `close(value)` in the commit, inside
|
|
73
77
|
* the view transition if the Popup's `transition` is set). With `action` the action runs first in
|
|
74
78
|
* this part's own transition (`data-pending` and `aria-disabled` on the button; a second click
|
|
75
|
-
* meanwhile is ignored unless `whilePending="run"`); a rejection leaves the dialog open.
|
|
79
|
+
* meanwhile is ignored unless `whilePending="run"`); a rejection leaves the dialog open. With or
|
|
80
|
+
* without `action`, the button has `data-pending` until the close it asked for has committed.
|
|
76
81
|
*
|
|
77
82
|
* Owned keys (conventions 1.2): `type` (on a `<button>` only), `disabled`, `commandfor`,
|
|
78
83
|
* `command` (neither rendered with `action`), `value`, `onClick` (library mode, or with `action`), `aria-disabled`, `data-pending`,
|
|
@@ -84,5 +89,4 @@ export declare function DialogClose(props: DialogCloseProps): ReactNode;
|
|
|
84
89
|
export declare namespace DialogClose {
|
|
85
90
|
var displayName: string;
|
|
86
91
|
}
|
|
87
|
-
//#endregion
|
|
88
92
|
//# sourceMappingURL=dialog-close.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close.d.mts","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog-close.d.mts","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"mappings":";;;;;;;iBAsBiB;;;;;;WAMN;;WAEA;;;iBAIM,2BAA2B;;WAEjC;;;;;;;iBAQM,yBAAyB,KACxC;;;;;;;;;;;;EAcA,SAAS,QAAQ,SAAS;;;;;;;;;;;EAW1B,eAAe;;EAEf;;;;;;;;EAQA;;EAEA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;;wBAoBvC,YAAY,OAAO,mBAAgB;yBAAnC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { use, useCallback } from "react";
|
|
2
3
|
import { createActionDetails } from "../internal/action/action-details.mjs";
|
|
3
|
-
import { useMergedRefs } from "../internal/use-merged-refs.mjs";
|
|
4
4
|
import { useOverlayClose } from "../internal/overlay/use-overlay-close.mjs";
|
|
5
|
+
import { useMergedRefs } from "../internal/use-merged-refs.mjs";
|
|
5
6
|
import { DialogCloseRegistry, useDialogContext } from "./dialog-context.mjs";
|
|
6
|
-
|
|
7
|
-
//#region src/dialog/dialog-close.tsx
|
|
7
|
+
// src/dialog/dialog-close.tsx
|
|
8
8
|
const isDev = process.env.NODE_ENV !== "production";
|
|
9
9
|
/**
|
|
10
10
|
* A close button: `<button type="button" commandfor command="request-close">`, or a plain
|
|
@@ -14,7 +14,8 @@ const isDev = process.env.NODE_ENV !== "production";
|
|
|
14
14
|
* through the Root (`openChangeAction(false)` awaited, then `close(value)` in the commit, inside
|
|
15
15
|
* the view transition if the Popup's `transition` is set). With `action` the action runs first in
|
|
16
16
|
* this part's own transition (`data-pending` and `aria-disabled` on the button; a second click
|
|
17
|
-
* meanwhile is ignored unless `whilePending="run"`); a rejection leaves the dialog open.
|
|
17
|
+
* meanwhile is ignored unless `whilePending="run"`); a rejection leaves the dialog open. With or
|
|
18
|
+
* without `action`, the button has `data-pending` until the close it asked for has committed.
|
|
18
19
|
*
|
|
19
20
|
* Owned keys (conventions 1.2): `type` (on a `<button>` only), `disabled`, `commandfor`,
|
|
20
21
|
* `command` (neither rendered with `action`), `value`, `onClick` (library mode, or with `action`), `aria-disabled`, `data-pending`,
|
|
@@ -78,7 +79,6 @@ function useDialogClose({ action, whilePending, value, disabled = false, classNa
|
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
//#endregion
|
|
82
82
|
export { DialogClose, useDialogClose };
|
|
83
83
|
|
|
84
84
|
//# sourceMappingURL=dialog-close.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close.mjs","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"sourcesContent":["\"use client\";\nimport { use, useCallback } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { createActionDetails } from \"../internal/action/action-details.js\";\nimport type {\n Action,\n ActionDetails,\n RenderProp,\n StateValue,\n WhilePending,\n} from \"../internal/types.js\";\nimport { useOverlayClose } from \"../internal/overlay/use-overlay-close.js\";\nimport { useMergedRefs } from \"../internal/use-merged-refs.js\";\nimport { DialogCloseRegistry, useDialogContext } from \"./dialog-context.js\";\nimport type { DialogNamespace } from \"./dialog-context.js\";\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\n/**\n * State of `Dialog.Close`, passed to the function forms of `className`, `style`, `children` and\n * `render`.\n */\nexport interface DialogCloseState {\n
|
|
1
|
+
{"version":3,"file":"dialog-close.mjs","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"sourcesContent":["\"use client\";\nimport { use, useCallback } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { createActionDetails } from \"../internal/action/action-details.js\";\nimport type {\n Action,\n ActionDetails,\n RenderProp,\n StateValue,\n WhilePending,\n} from \"../internal/types.js\";\nimport { useOverlayClose } from \"../internal/overlay/use-overlay-close.js\";\nimport { useMergedRefs } from \"../internal/use-merged-refs.js\";\nimport { DialogCloseRegistry, useDialogContext } from \"./dialog-context.js\";\nimport type { DialogNamespace } from \"./dialog-context.js\";\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\n/**\n * State of `Dialog.Close`, passed to the function forms of `className`, `style`, `children` and\n * `render`.\n */\nexport interface DialogCloseState {\n /**\n * From the click until the close this part asked for has committed: the `action` in flight,\n * then the Root's close (an awaited `openChangeAction(false)`, or another pending action the\n * close is entangled with). Also without `action`, in library mode.\n */\n readonly pending: boolean;\n /** The `disabled` prop. */\n readonly disabled: boolean;\n}\n\n/** Details passed to `Dialog.Close`'s `action`. */\nexport interface DialogCloseDetails extends ActionDetails {\n /** The `value` the dialog closes with (`dialog.returnValue`); `\"\"` without `value`. */\n readonly returnValue: string;\n}\n\n/**\n * Props of `Dialog.Close`.\n *\n * @see https://ui.funstack.work/components/dialog\n */\nexport interface DialogCloseProps extends Omit<\n ComponentPropsWithRef<\"button\">,\n \"onClick\" | \"value\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * Runs inside this part's own transition (`data-pending` on the button), then closes the\n * dialog with `value` as `returnValue`: in library mode through the Root\n * (`openChangeAction(false)` awaited, view transition if set), in JS-free mode with\n * `close(value)`. A rejection reaches the nearest Error Boundary above the Close part and\n * leaves the dialog open. If the dialog was dismissed and opened again while the action ran,\n * the close is dropped: it belonged to the earlier open. With `action` the button is no native\n * close invoker (no `commandfor` / `command`), so a click before hydration does nothing\n * instead of closing the dialog without running the action. Without `action` in JS-free mode\n * the button is a native `command=\"request-close\"` invoker.\n */\n action?: Action<[details: DialogCloseDetails]>;\n /**\n * What a click does while this part's `action` is pending. `\"ignore\"`: nothing (the click is\n * cancelled, `aria-disabled=\"true\"` meanwhile). `\"run\"`: the action runs again (`data-pending`\n * until every run has settled); the dialog closes once, when the last run settles and only if\n * the latest run resolved (a rejection leaves it open, as in `\"ignore\"` mode). No effect\n * without `action`: the part then shows `data-pending` while the Root's close waits, without\n * `aria-disabled`.\n *\n * @defaultValue `\"ignore\"`\n */\n whilePending?: WhilePending;\n /** Becomes `dialog.returnValue` (and `details.returnValue` of `openChangeAction(false)`). */\n value?: string;\n /**\n * Never closes. Native `disabled` on a `<button>`; owned, so a `render` element cannot\n * re-enable it. With a link or component `render` whose click this part handles (library mode,\n * or with `action`), `aria-disabled=\"true\"` instead: the element stays focusable.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, DialogCloseState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, DialogCloseState>;\n /** Content, or a function of the part's state. */\n children?: StateValue<ReactNode, DialogCloseState>;\n /** Replace the default `<button>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"button\">, DialogCloseState>;\n}\n\n/**\n * A close button: `<button type=\"button\" commandfor command=\"request-close\">`, or a plain\n * `<button type=\"button\">` with `action` (it does nothing before hydration). In JS-free mode\n * without `action` the browser closes the dialog (a close request: `cancel`, then `close`), with\n * `value` as the `returnValue`. In library mode the click is always cancelled and the close goes\n * through the Root (`openChangeAction(false)` awaited, then `close(value)` in the commit, inside\n * the view transition if the Popup's `transition` is set). With `action` the action runs first in\n * this part's own transition (`data-pending` and `aria-disabled` on the button; a second click\n * meanwhile is ignored unless `whilePending=\"run\"`); a rejection leaves the dialog open. With or\n * without `action`, the button has `data-pending` until the close it asked for has committed.\n *\n * Owned keys (conventions 1.2): `type` (on a `<button>` only), `disabled`, `commandfor`,\n * `command` (neither rendered with `action`), `value`, `onClick` (library mode, or with `action`), `aria-disabled`, `data-pending`,\n * `data-disabled`.\n *\n * @see https://ui.funstack.work/components/dialog\n */\nexport function DialogClose(props: DialogCloseProps) {\n return useDialogClose(props, { part: \"Dialog.Close\" });\n}\n\nDialogClose.displayName = \"DialogClose\";\n\n/** What a caller of `useDialogClose` sets (design/components/alert-dialog.md 8). */\nexport interface DialogCloseOptions {\n /** Public name of the part (`\"AlertDialog.Cancel\"`). */\n readonly part: `${DialogNamespace}.${string}`;\n /** Extra owned keys (AlertDialog.Cancel's `autoFocus`). */\n readonly ownProps?: ComponentPropsWithRef<\"button\">;\n}\n\n/**\n * The body of `Dialog.Close`, also run by `AlertDialog.Cancel` and `AlertDialog.Action`\n * (alert-dialog.md 8).\n */\nexport function useDialogClose(\n {\n action,\n whilePending,\n value,\n disabled = false,\n className,\n style,\n children,\n render,\n ref,\n ...rest\n }: DialogCloseProps,\n { part, ownProps }: DialogCloseOptions,\n): ReactNode {\n const ctx = useDialogContext(part);\n // A Drawer.Popup's development check that the drawer has a Close (drawer.md 7).\n const registerClose = use(DialogCloseRegistry);\n const reportClose = useCallback(\n (element: HTMLElement | null) => {\n if (element !== null) registerClose?.(element);\n },\n [registerClose],\n );\n // Production passes the consumer's ref through untouched.\n const mergedRef = useMergedRefs<HTMLButtonElement | null>(ref, isDev ? reportClose : undefined);\n const { popupRef, recordCloseIntent } = ctx;\n const isLibrary = ctx.mode === \"library\";\n return useOverlayClose({\n part,\n noun: \"dialog\",\n isLibrary,\n popupId: ctx.ids.popup,\n command: \"request-close\",\n openGeneration: ctx.openGeneration,\n action,\n whilePending,\n details: (event) => createActionDetails(event, { returnValue: value ?? \"\" }),\n close: (event) => {\n const returnValue = value ?? \"\";\n if (isLibrary) {\n // A library-owned close (design 2.3): awaited, then `close(returnValue)` in the commit. A\n // no-op when `false` is already intended (a repeated click, or a dismissal meanwhile).\n ctx.requestClose(event, \"activate\", returnValue);\n return;\n }\n // JS-free mode with `action`: a browser-owned close; there is no Root state to go through.\n const dialog = popupRef.current;\n if (dialog === null || !dialog.open) return;\n recordCloseIntent({ reason: \"activate\", event });\n dialog.close(returnValue);\n },\n ownProps: { value, ...ownProps },\n disabled,\n className,\n style,\n children,\n render,\n rest: { ...rest, ref: mergedRef },\n });\n}\n"],"mappings":";;;;;;;AAgBA,MAAM,QAAQ,QAAQ,IAAI,aAAa;;;;;;;;;;;;;;;;;;AA4FvC,SAAgB,YAAY,OAAyB;CACnD,OAAO,eAAe,OAAO,EAAE,MAAM,eAAe,CAAC;AACvD;AAEA,YAAY,cAAc;;;;;AAc1B,SAAgB,eACd,EACE,QACA,cACA,OACA,WAAW,OACX,WACA,OACA,UACA,QACA,KACA,GAAG,QAEL,EAAE,MAAM,YACG;CACX,MAAM,MAAM,iBAAiB,IAAI;CAEjC,MAAM,gBAAgB,IAAI,mBAAmB;CAC7C,MAAM,cAAc,aACjB,YAAgC;EAC/B,IAAI,YAAY,MAAM,gBAAgB,OAAO;CAC/C,GACA,CAAC,aAAa,CAChB;CAEA,MAAM,YAAY,cAAwC,KAAK,QAAQ,cAAc,KAAA,CAAS;CAC9F,MAAM,EAAE,UAAU,sBAAsB;CACxC,MAAM,YAAY,IAAI,SAAS;CAC/B,OAAO,gBAAgB;EACrB;EACA,MAAM;EACN;EACA,SAAS,IAAI,IAAI;EACjB,SAAS;EACT,gBAAgB,IAAI;EACpB;EACA;EACA,UAAU,UAAU,oBAAoB,OAAO,EAAE,aAAa,SAAS,GAAG,CAAC;EAC3E,QAAQ,UAAU;GAChB,MAAM,cAAc,SAAS;GAC7B,IAAI,WAAW;IAGb,IAAI,aAAa,OAAO,YAAY,WAAW;IAC/C;GACF;GAEA,MAAM,SAAS,SAAS;GACxB,IAAI,WAAW,QAAQ,CAAC,OAAO,MAAM;GACrC,kBAAkB;IAAE,QAAQ;IAAY;GAAM,CAAC;GAC/C,OAAO,MAAM,WAAW;EAC1B;EACA,UAAU;GAAE;GAAO,GAAG;EAAS;EAC/B;EACA;EACA;EACA;EACA;EACA,MAAM;GAAE,GAAG;GAAM,KAAK;EAAU;CAClC,CAAC;AACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext, use } from "react";
|
|
3
|
-
|
|
3
|
+
// src/dialog/dialog-context.ts
|
|
4
4
|
const DialogContext = createContext(null);
|
|
5
5
|
/**
|
|
6
6
|
* Development only: where a Close part inside a `Drawer.Popup` reports its element, for the
|
|
@@ -25,7 +25,6 @@ function useDialogContext(part) {
|
|
|
25
25
|
function rootPartOf(part) {
|
|
26
26
|
return `${part.slice(0, part.indexOf("."))}.Root`;
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { DialogCloseRegistry, DialogContext, rootPartOf, useDialogContext };
|
|
30
29
|
|
|
31
30
|
//# sourceMappingURL=dialog-context.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-description.d.ts
|
|
6
5
|
/** State of `Dialog.Description`: the Popup's state. */
|
|
7
6
|
export type DialogDescriptionState = DialogPopupState;
|
|
8
7
|
/**
|
|
@@ -31,5 +30,4 @@ export declare function DialogDescription(props: DialogDescriptionProps): ReactN
|
|
|
31
30
|
export declare namespace DialogDescription {
|
|
32
31
|
var displayName: string;
|
|
33
32
|
}
|
|
34
|
-
//#endregion
|
|
35
33
|
//# sourceMappingURL=dialog-description.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-description.d.mts","names":[],"sources":["../../src/dialog/dialog-description.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog-description.d.mts","names":[],"sources":["../../src/dialog/dialog-description.tsx"],"mappings":";;;;;YASY,yBAAyB;;;;;;iBAOpB,+BAA+B,KAC9C;;EAIA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,4BAA4B;;;;;;;;;wBAUlC,kBAAkB,OAAO,yBAAsB;yBAA/C"}
|
|
@@ -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-description.tsx
|
|
5
5
|
/**
|
|
6
6
|
* The dialog's description: a `<p>` whose id the Popup references with `aria-describedby`.
|
|
7
7
|
*
|
|
@@ -31,7 +31,6 @@ function useDialogDescription({ className, style, children, render, ...rest }, n
|
|
|
31
31
|
libraryProps: { id: ctx.ids.description }
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { DialogDescription, useDialogDescription };
|
|
36
35
|
|
|
37
36
|
//# sourceMappingURL=dialog-description.mjs.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { afterDispatch } from "../internal/after-dispatch.mjs";
|
|
2
|
+
import { isEscapeRequest } from "../internal/escape-key.mjs";
|
|
1
3
|
import { isPopoverOpen } from "../internal/overlay/popover-open.mjs";
|
|
2
|
-
|
|
3
|
-
/** The nearest `<dialog>` around a node (the dialog itself counts). */
|
|
4
|
-
function closestDialog(target) {
|
|
5
|
-
return target instanceof Element ? target.closest("dialog") : null;
|
|
6
|
-
}
|
|
4
|
+
// src/dialog/dialog-dismiss.ts
|
|
7
5
|
/**
|
|
8
6
|
* An open popover that takes Escape before the dialog: `auto` or `hint` (they have a close
|
|
9
|
-
* watcher). A `manual` popover, or `hint` where the engine maps it to `manual`, does not
|
|
7
|
+
* watcher). A `manual` popover, or `hint` where the engine maps it to `manual`, does not; one
|
|
8
|
+
* that closes on Escape from JS (HoverCard, Tooltip) prevents the `keydown` instead.
|
|
10
9
|
*/
|
|
11
10
|
function isOpenLightPopover(element) {
|
|
12
11
|
if (!element.hasAttribute("popover")) return false;
|
|
@@ -15,15 +14,19 @@ function isOpenLightPopover(element) {
|
|
|
15
14
|
return isPopoverOpen(element);
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
|
-
* Whether Escape belongs to a layer inside
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* Whether an Escape `keydown` at `dialog` belongs to a layer inside it that sits above it
|
|
18
|
+
* (design 2.6 and 9: "closes the innermost one only"), read from the event path **at the
|
|
19
|
+
* dialog**, where it is complete in any shadow mode: the target is inside an open nested
|
|
20
|
+
* `<dialog>` (that dialog's Escape) or an open `auto` / `hint` popover, or an open `auto` /
|
|
21
|
+
* `hint` popover inside the dialog would take the close request (close watchers are per
|
|
22
|
+
* document, not per focus).
|
|
22
23
|
*/
|
|
23
|
-
function escapeBelongsToInnerLayer(dialog,
|
|
24
|
-
|
|
24
|
+
function escapeBelongsToInnerLayer(dialog, event) {
|
|
25
|
+
const path = event.composedPath();
|
|
26
|
+
const index = path.indexOf(dialog);
|
|
27
|
+
for (const node of path.slice(0, Math.max(index, 0))) {
|
|
25
28
|
if (node instanceof HTMLDialogElement && node.open) return true;
|
|
26
|
-
if (isOpenLightPopover(node)) return true;
|
|
29
|
+
if (node instanceof Element && isOpenLightPopover(node)) return true;
|
|
27
30
|
}
|
|
28
31
|
for (const element of dialog.querySelectorAll("[popover]")) if (isOpenLightPopover(element)) return true;
|
|
29
32
|
return false;
|
|
@@ -44,14 +47,41 @@ function onBackdrop(dialog, event) {
|
|
|
44
47
|
function listenDialogDismiss(dialog, { modal, lightDismiss }) {
|
|
45
48
|
const doc = dialog.ownerDocument;
|
|
46
49
|
const listeners = [];
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
const win = doc.defaultView;
|
|
51
|
+
let pending = null;
|
|
52
|
+
let cancelLate = null;
|
|
53
|
+
const clearPending = () => {
|
|
54
|
+
pending = null;
|
|
55
|
+
win?.removeEventListener("keydown", onWindow);
|
|
56
|
+
cancelLate?.();
|
|
57
|
+
cancelLate = null;
|
|
58
|
+
};
|
|
59
|
+
const settle = (canPrevent) => {
|
|
60
|
+
const record = pending;
|
|
61
|
+
clearPending();
|
|
62
|
+
if (record === null) return;
|
|
63
|
+
const { event, inner } = record;
|
|
64
|
+
if (event.defaultPrevented || inner || !dialog.open || !dialog.isConnected) return;
|
|
65
|
+
if (canPrevent) event.preventDefault();
|
|
53
66
|
dialog.requestClose();
|
|
54
|
-
}
|
|
67
|
+
};
|
|
68
|
+
function onWindow(event) {
|
|
69
|
+
if (pending === null || event !== pending.event) return;
|
|
70
|
+
settle(true);
|
|
71
|
+
}
|
|
72
|
+
const record = (event) => {
|
|
73
|
+
const keyboardEvent = event;
|
|
74
|
+
if (!isEscapeRequest(keyboardEvent) || !dialog.open) return;
|
|
75
|
+
if (pending?.event === keyboardEvent) return;
|
|
76
|
+
clearPending();
|
|
77
|
+
pending = {
|
|
78
|
+
event: keyboardEvent,
|
|
79
|
+
inner: escapeBelongsToInnerLayer(dialog, keyboardEvent)
|
|
80
|
+
};
|
|
81
|
+
win?.addEventListener("keydown", onWindow);
|
|
82
|
+
cancelLate = afterDispatch(keyboardEvent, () => settle(false));
|
|
83
|
+
};
|
|
84
|
+
if (!modal) dialog.addEventListener("keydown", record, true);
|
|
55
85
|
let pressedOutside = false;
|
|
56
86
|
const isOutside = (target) => {
|
|
57
87
|
return !(target instanceof Node) || !dialog.contains(target);
|
|
@@ -96,13 +126,14 @@ function listenDialogDismiss(dialog, { modal, lightDismiss }) {
|
|
|
96
126
|
for (const [type, listener] of listeners) dialog.addEventListener(type, listener);
|
|
97
127
|
return () => {
|
|
98
128
|
for (const [type, listener] of listeners) dialog.removeEventListener(type, listener);
|
|
129
|
+
if (!modal) dialog.removeEventListener("keydown", record, true);
|
|
130
|
+
clearPending();
|
|
99
131
|
if (outsideAttached) {
|
|
100
132
|
doc.removeEventListener("pointerdown", onOutsidePointerDown, true);
|
|
101
133
|
doc.removeEventListener("click", onOutsideClick, true);
|
|
102
134
|
}
|
|
103
135
|
};
|
|
104
136
|
}
|
|
105
|
-
//#endregion
|
|
106
137
|
export { listenDialogDismiss };
|
|
107
138
|
|
|
108
139
|
//# sourceMappingURL=dialog-dismiss.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-dismiss.mjs","names":[],"sources":["../../src/dialog/dialog-dismiss.ts"],"sourcesContent":["// Dialog's JS baseline for what the platform gives only behind `closedby`: Escape on a\n// non-modal dialog and light dismiss (design/components/dialog.md 2.6). No \"use client\"\n// directive: DOM listeners only (conventions 7.1).\nimport { isPopoverOpen } from \"../internal/overlay/popover-open.js\";\n\n/** The nearest `<dialog>` around a node (the dialog itself counts). */\nfunction closestDialog(target: EventTarget | null): Element | null {\n return target instanceof Element ? target.closest(\"dialog\") : null;\n}\n\n/**\n * An open popover that takes Escape before the dialog: `auto` or `hint` (they have a close\n * watcher). A `manual` popover, or `hint` where the engine maps it to `manual`, does not.\n */\nfunction isOpenLightPopover(element: Element): boolean {\n if (!element.hasAttribute(\"popover\")) return false;\n // The IDL attribute reflects the state the engine applies; jsdom has none.\n const reflected: unknown = (element as HTMLElement).popover;\n const state =\n typeof reflected === \"string\" ? reflected : element.getAttribute(\"popover\")!.toLowerCase();\n if (state === \"manual\") return false;\n return isPopoverOpen(element);\n}\n\n/**\n * Whether Escape belongs to a layer inside `dialog` that sits above it (design 9: \"closes the\n * innermost one only\"): the target is inside an open nested `<dialog>` or popover, or an open\n * `auto` / `hint` popover inside the dialog would take the close request (close watchers are\n * per document, not per focus).\n */\nfunction escapeBelongsToInnerLayer(dialog: HTMLDialogElement, target: EventTarget | null): boolean {\n for (\n let node = target instanceof Element ? target : null;\n node !== null && node !== dialog;\n node = node.parentElement\n ) {\n if (node instanceof HTMLDialogElement && node.open) return true;\n if (isOpenLightPopover(node)) return true;\n }\n for (const element of dialog.querySelectorAll(\"[popover]\")) {\n if (isOpenLightPopover(element)) return true;\n }\n return false;\n}\n\n/** Whether a pointer event on the dialog itself lies outside its border box (the `::backdrop`). */\nfunction onBackdrop(dialog: HTMLDialogElement, event: Event): boolean {\n if (event.target !== dialog) return false;\n const { clientX, clientY } = event as MouseEvent;\n const rect = dialog.getBoundingClientRect();\n return !(\n rect.top <= clientY &&\n clientY <= rect.bottom &&\n rect.left <= clientX &&\n clientX <= rect.right\n );\n}\n\nexport interface DialogDismissOptions {\n /** The Root's `modal`. A modal dialog has the platform's close watcher Escape. */\n readonly modal: boolean;\n /** The Popup's `lightDismiss`. */\n readonly lightDismiss: boolean;\n}\n\n/**\n * Installs the JS dismissals of `dialog` and returns their cleanup: Escape for a non-modal\n * dialog, and with `lightDismiss` a click outside (on the backdrop for a modal dialog). Each\n * calls `dialog.requestClose()`, so the close is the browser's, a fact (conventions 3.9.2).\n * Not for a dialog where native `closedby` is in use.\n */\nexport function listenDialogDismiss(\n dialog: HTMLDialogElement,\n { modal, lightDismiss }: DialogDismissOptions,\n): () => void {\n const doc = dialog.ownerDocument;\n const listeners: [string, EventListener][] = [];\n\n if (!modal) {\n // Non-modal dialogs get no close watcher Escape from the platform (design 2.6).\n listeners.push([\n \"keydown\",\n (event) => {\n const keyboardEvent = event as KeyboardEvent;\n if (keyboardEvent.key !== \"Escape\" || keyboardEvent.defaultPrevented) return;\n if (!dialog.open || closestDialog(keyboardEvent.target) !== dialog) return;\n // A popover or nested dialog inside takes this Escape (its close watcher); leave the\n // event alone so that it can.\n if (escapeBelongsToInnerLayer(dialog, keyboardEvent.target)) return;\n keyboardEvent.preventDefault();\n dialog.requestClose();\n },\n ]);\n }\n\n // Light dismiss needs both the press and the click outside, like native `closedby=\"any\"`: a\n // drag that starts inside (selecting text in an input) and ends on the backdrop or outside\n // fires `click` on the common ancestor and must not close (it would lose a half-filled form).\n let pressedOutside = false;\n\n const isOutside = (target: EventTarget | null): boolean => {\n // The Trigger counts as outside, as native `closedby=\"any\"` treats it.\n return !(target instanceof Node) || !dialog.contains(target);\n };\n let outsideAttached = false;\n const onOutsidePointerDown = (event: Event) => {\n pressedOutside = dialog.open && isOutside(event.target);\n };\n const onOutsideClick = (event: Event) => {\n const pressed = pressedOutside;\n pressedOutside = false;\n if (!dialog.open || !pressed || !isOutside(event.target)) return;\n dialog.requestClose();\n };\n const syncOutside = () => {\n const want = dialog.open;\n if (want === outsideAttached) return;\n outsideAttached = want;\n pressedOutside = false;\n if (want) {\n doc.addEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.addEventListener(\"click\", onOutsideClick, true);\n } else {\n doc.removeEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.removeEventListener(\"click\", onOutsideClick, true);\n }\n };\n\n if (lightDismiss) {\n if (modal) {\n // A press or click on the ::backdrop targets the dialog itself, outside its border box.\n listeners.push(\n [\n \"pointerdown\",\n (event) => {\n pressedOutside = dialog.open && onBackdrop(dialog, event);\n },\n ],\n [\n \"click\",\n (event) => {\n const pressed = pressedOutside;\n pressedOutside = false;\n if (!dialog.open || !pressed || !onBackdrop(dialog, event)) return;\n dialog.requestClose();\n },\n ],\n );\n } else {\n // A document listener only while open, following the native `toggle` (the React\n // `onToggle` prop never fires on a hydrated <dialog>); reads `dialog.open`, not\n // `newState` (coalescing).\n listeners.push([\"toggle\", syncOutside]);\n syncOutside();\n }\n }\n\n for (const [type, listener] of listeners) dialog.addEventListener(type, listener);\n return () => {\n for (const [type, listener] of listeners) dialog.removeEventListener(type, listener);\n if (outsideAttached) {\n doc.removeEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.removeEventListener(\"click\", onOutsideClick, true);\n }\n };\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"dialog-dismiss.mjs","names":[],"sources":["../../src/dialog/dialog-dismiss.ts"],"sourcesContent":["// Dialog's JS baseline for what the platform gives only behind `closedby`: Escape on a\n// non-modal dialog and light dismiss (design/components/dialog.md 2.6). No \"use client\"\n// directive: DOM listeners only (conventions 7.1).\nimport { afterDispatch } from \"../internal/after-dispatch.js\";\nimport { isEscapeRequest } from \"../internal/escape-key.js\";\nimport { isPopoverOpen } from \"../internal/overlay/popover-open.js\";\n\n/**\n * An open popover that takes Escape before the dialog: `auto` or `hint` (they have a close\n * watcher). A `manual` popover, or `hint` where the engine maps it to `manual`, does not; one\n * that closes on Escape from JS (HoverCard, Tooltip) prevents the `keydown` instead.\n */\nfunction isOpenLightPopover(element: Element): boolean {\n if (!element.hasAttribute(\"popover\")) return false;\n // The IDL attribute reflects the state the engine applies; jsdom has none.\n const reflected: unknown = (element as HTMLElement).popover;\n const state =\n typeof reflected === \"string\" ? reflected : element.getAttribute(\"popover\")!.toLowerCase();\n if (state === \"manual\") return false;\n return isPopoverOpen(element);\n}\n\n/**\n * Whether an Escape `keydown` at `dialog` belongs to a layer inside it that sits above it\n * (design 2.6 and 9: \"closes the innermost one only\"), read from the event path **at the\n * dialog**, where it is complete in any shadow mode: the target is inside an open nested\n * `<dialog>` (that dialog's Escape) or an open `auto` / `hint` popover, or an open `auto` /\n * `hint` popover inside the dialog would take the close request (close watchers are per\n * document, not per focus).\n */\nfunction escapeBelongsToInnerLayer(dialog: HTMLDialogElement, event: Event): boolean {\n const path = event.composedPath();\n const index = path.indexOf(dialog);\n for (const node of path.slice(0, Math.max(index, 0))) {\n if (node instanceof HTMLDialogElement && node.open) return true;\n if (node instanceof Element && isOpenLightPopover(node)) return true;\n }\n for (const element of dialog.querySelectorAll(\"[popover]\")) {\n if (isOpenLightPopover(element)) return true;\n }\n return false;\n}\n\n/** Whether a pointer event on the dialog itself lies outside its border box (the `::backdrop`). */\nfunction onBackdrop(dialog: HTMLDialogElement, event: Event): boolean {\n if (event.target !== dialog) return false;\n const { clientX, clientY } = event as MouseEvent;\n const rect = dialog.getBoundingClientRect();\n return !(\n rect.top <= clientY &&\n clientY <= rect.bottom &&\n rect.left <= clientX &&\n clientX <= rect.right\n );\n}\n\nexport interface DialogDismissOptions {\n /** The Root's `modal`. A modal dialog has the platform's close watcher Escape. */\n readonly modal: boolean;\n /** The Popup's `lightDismiss`. */\n readonly lightDismiss: boolean;\n}\n\n/**\n * Installs the JS dismissals of `dialog` and returns their cleanup: Escape for a non-modal\n * dialog, and with `lightDismiss` a click outside (on the backdrop for a modal dialog). Each\n * calls `dialog.requestClose()`, so the close is the browser's, a fact (conventions 3.9.2).\n * Not for a dialog where native `closedby` is in use.\n */\nexport function listenDialogDismiss(\n dialog: HTMLDialogElement,\n { modal, lightDismiss }: DialogDismissOptions,\n): () => void {\n const doc = dialog.ownerDocument;\n const listeners: [string, EventListener][] = [];\n\n // Non-modal dialogs get no close watcher Escape from the platform (design 2.6). Record at the\n // dialog, decide last (#177): a capture listener on the dialog records the Escape and the\n // inner-layer snapshot (the path is complete there in any shadow mode, and no close watcher\n // has closed a layer yet). The decision runs in a window bubble listener added for that event\n // only, after every element and document listener, so an inner layer that closed on Escape\n // from JS (a `manual` HoverCard or Tooltip) has prevented it by then: a prevented `keydown` is\n // no close request, as for a modal dialog's close watcher. `stopPropagation()` does not keep\n // the dialog open: when the event never reaches the window, the late path (`afterDispatch`)\n // decides instead, without preventing (the dispatch is over). The first of the two wins.\n const win = doc.defaultView;\n let pending: { readonly event: KeyboardEvent; readonly inner: boolean } | null = null;\n let cancelLate: (() => void) | null = null;\n const clearPending = () => {\n pending = null;\n win?.removeEventListener(\"keydown\", onWindow);\n cancelLate?.();\n cancelLate = null;\n };\n const settle = (canPrevent: boolean) => {\n const record = pending;\n clearPending();\n if (record === null) return;\n const { event, inner } = record;\n if (event.defaultPrevented || inner || !dialog.open || !dialog.isConnected) return;\n if (canPrevent) event.preventDefault();\n dialog.requestClose();\n };\n function onWindow(event: Event): void {\n if (pending === null || event !== pending.event) return;\n settle(true);\n }\n const record = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Not an Escape of an IME composition, nor one already consumed (conventions 15).\n if (!isEscapeRequest(keyboardEvent) || !dialog.open) return;\n if (pending?.event === keyboardEvent) return;\n // A new Escape while one is pending: the old event's dispatch is over; replace it.\n clearPending();\n pending = { event: keyboardEvent, inner: escapeBelongsToInnerLayer(dialog, keyboardEvent) };\n win?.addEventListener(\"keydown\", onWindow);\n cancelLate = afterDispatch(keyboardEvent, () => settle(false));\n };\n if (!modal) dialog.addEventListener(\"keydown\", record, true);\n\n // Light dismiss needs both the press and the click outside, like native `closedby=\"any\"`: a\n // drag that starts inside (selecting text in an input) and ends on the backdrop or outside\n // fires `click` on the common ancestor and must not close (it would lose a half-filled form).\n let pressedOutside = false;\n\n const isOutside = (target: EventTarget | null): boolean => {\n // The Trigger counts as outside, as native `closedby=\"any\"` treats it.\n return !(target instanceof Node) || !dialog.contains(target);\n };\n let outsideAttached = false;\n const onOutsidePointerDown = (event: Event) => {\n pressedOutside = dialog.open && isOutside(event.target);\n };\n const onOutsideClick = (event: Event) => {\n const pressed = pressedOutside;\n pressedOutside = false;\n if (!dialog.open || !pressed || !isOutside(event.target)) return;\n dialog.requestClose();\n };\n const syncOutside = () => {\n const want = dialog.open;\n if (want === outsideAttached) return;\n outsideAttached = want;\n pressedOutside = false;\n if (want) {\n doc.addEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.addEventListener(\"click\", onOutsideClick, true);\n } else {\n doc.removeEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.removeEventListener(\"click\", onOutsideClick, true);\n }\n };\n\n if (lightDismiss) {\n if (modal) {\n // A press or click on the ::backdrop targets the dialog itself, outside its border box.\n listeners.push(\n [\n \"pointerdown\",\n (event) => {\n pressedOutside = dialog.open && onBackdrop(dialog, event);\n },\n ],\n [\n \"click\",\n (event) => {\n const pressed = pressedOutside;\n pressedOutside = false;\n if (!dialog.open || !pressed || !onBackdrop(dialog, event)) return;\n dialog.requestClose();\n },\n ],\n );\n } else {\n // A document listener only while open, following the native `toggle` (the React\n // `onToggle` prop never fires on a hydrated <dialog>); reads `dialog.open`, not\n // `newState` (coalescing).\n listeners.push([\"toggle\", syncOutside]);\n syncOutside();\n }\n }\n\n for (const [type, listener] of listeners) dialog.addEventListener(type, listener);\n return () => {\n for (const [type, listener] of listeners) dialog.removeEventListener(type, listener);\n if (!modal) dialog.removeEventListener(\"keydown\", record, true);\n clearPending();\n if (outsideAttached) {\n doc.removeEventListener(\"pointerdown\", onOutsidePointerDown, true);\n doc.removeEventListener(\"click\", onOutsideClick, true);\n }\n };\n}\n"],"mappings":";;;;;;;;;AAYA,SAAS,mBAAmB,SAA2B;CACrD,IAAI,CAAC,QAAQ,aAAa,SAAS,GAAG,OAAO;CAE7C,MAAM,YAAsB,QAAwB;CAGpD,KADE,OAAO,cAAc,WAAW,YAAY,QAAQ,aAAa,SAAS,CAAC,CAAE,YAAY,OAC7E,UAAU,OAAO;CAC/B,OAAO,cAAc,OAAO;AAC9B;;;;;;;;;AAUA,SAAS,0BAA0B,QAA2B,OAAuB;CACnF,MAAM,OAAO,MAAM,aAAa;CAChC,MAAM,QAAQ,KAAK,QAAQ,MAAM;CACjC,KAAK,MAAM,QAAQ,KAAK,MAAM,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,GAAG;EACpD,IAAI,gBAAgB,qBAAqB,KAAK,MAAM,OAAO;EAC3D,IAAI,gBAAgB,WAAW,mBAAmB,IAAI,GAAG,OAAO;CAClE;CACA,KAAK,MAAM,WAAW,OAAO,iBAAiB,WAAW,GACvD,IAAI,mBAAmB,OAAO,GAAG,OAAO;CAE1C,OAAO;AACT;;AAGA,SAAS,WAAW,QAA2B,OAAuB;CACpE,IAAI,MAAM,WAAW,QAAQ,OAAO;CACpC,MAAM,EAAE,SAAS,YAAY;CAC7B,MAAM,OAAO,OAAO,sBAAsB;CAC1C,OAAO,EACL,KAAK,OAAO,WACZ,WAAW,KAAK,UAChB,KAAK,QAAQ,WACb,WAAW,KAAK;AAEpB;;;;;;;AAeA,SAAgB,oBACd,QACA,EAAE,OAAO,gBACG;CACZ,MAAM,MAAM,OAAO;CACnB,MAAM,YAAuC,CAAC;CAW9C,MAAM,MAAM,IAAI;CAChB,IAAI,UAA6E;CACjF,IAAI,aAAkC;CACtC,MAAM,qBAAqB;EACzB,UAAU;EACV,KAAK,oBAAoB,WAAW,QAAQ;EAC5C,aAAa;EACb,aAAa;CACf;CACA,MAAM,UAAU,eAAwB;EACtC,MAAM,SAAS;EACf,aAAa;EACb,IAAI,WAAW,MAAM;EACrB,MAAM,EAAE,OAAO,UAAU;EACzB,IAAI,MAAM,oBAAoB,SAAS,CAAC,OAAO,QAAQ,CAAC,OAAO,aAAa;EAC5E,IAAI,YAAY,MAAM,eAAe;EACrC,OAAO,aAAa;CACtB;CACA,SAAS,SAAS,OAAoB;EACpC,IAAI,YAAY,QAAQ,UAAU,QAAQ,OAAO;EACjD,OAAO,IAAI;CACb;CACA,MAAM,UAAU,UAAiB;EAC/B,MAAM,gBAAgB;EAEtB,IAAI,CAAC,gBAAgB,aAAa,KAAK,CAAC,OAAO,MAAM;EACrD,IAAI,SAAS,UAAU,eAAe;EAEtC,aAAa;EACb,UAAU;GAAE,OAAO;GAAe,OAAO,0BAA0B,QAAQ,aAAa;EAAE;EAC1F,KAAK,iBAAiB,WAAW,QAAQ;EACzC,aAAa,cAAc,qBAAqB,OAAO,KAAK,CAAC;CAC/D;CACA,IAAI,CAAC,OAAO,OAAO,iBAAiB,WAAW,QAAQ,IAAI;CAK3D,IAAI,iBAAiB;CAErB,MAAM,aAAa,WAAwC;EAEzD,OAAO,EAAE,kBAAkB,SAAS,CAAC,OAAO,SAAS,MAAM;CAC7D;CACA,IAAI,kBAAkB;CACtB,MAAM,wBAAwB,UAAiB;EAC7C,iBAAiB,OAAO,QAAQ,UAAU,MAAM,MAAM;CACxD;CACA,MAAM,kBAAkB,UAAiB;EACvC,MAAM,UAAU;EAChB,iBAAiB;EACjB,IAAI,CAAC,OAAO,QAAQ,CAAC,WAAW,CAAC,UAAU,MAAM,MAAM,GAAG;EAC1D,OAAO,aAAa;CACtB;CACA,MAAM,oBAAoB;EACxB,MAAM,OAAO,OAAO;EACpB,IAAI,SAAS,iBAAiB;EAC9B,kBAAkB;EAClB,iBAAiB;EACjB,IAAI,MAAM;GACR,IAAI,iBAAiB,eAAe,sBAAsB,IAAI;GAC9D,IAAI,iBAAiB,SAAS,gBAAgB,IAAI;EACpD,OAAO;GACL,IAAI,oBAAoB,eAAe,sBAAsB,IAAI;GACjE,IAAI,oBAAoB,SAAS,gBAAgB,IAAI;EACvD;CACF;CAEA,IAAI,cAAc;EAChB,IAAI,OAEF,UAAU,KACR,CACE,gBACC,UAAU;GACT,iBAAiB,OAAO,QAAQ,WAAW,QAAQ,KAAK;EAC1D,CACF,GACA,CACE,UACC,UAAU;GACT,MAAM,UAAU;GAChB,iBAAiB;GACjB,IAAI,CAAC,OAAO,QAAQ,CAAC,WAAW,CAAC,WAAW,QAAQ,KAAK,GAAG;GAC5D,OAAO,aAAa;EACtB,CACF,CACF;OACK;GAIL,UAAU,KAAK,CAAC,UAAU,WAAW,CAAC;GACtC,YAAY;EACd;CACF;CAEA,KAAK,MAAM,CAAC,MAAM,aAAa,WAAW,OAAO,iBAAiB,MAAM,QAAQ;CAChF,aAAa;EACX,KAAK,MAAM,CAAC,MAAM,aAAa,WAAW,OAAO,oBAAoB,MAAM,QAAQ;EACnF,IAAI,CAAC,OAAO,OAAO,oBAAoB,WAAW,QAAQ,IAAI;EAC9D,aAAa;EACb,IAAI,iBAAiB;GACnB,IAAI,oBAAoB,eAAe,sBAAsB,IAAI;GACjE,IAAI,oBAAoB,SAAS,gBAAgB,IAAI;EACvD;CACF;AACF"}
|
|
@@ -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-form.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* State of `Dialog.Form`, passed to the function forms of `className`, `style`, `children` and
|
|
7
6
|
* `render`.
|
|
@@ -86,5 +85,4 @@ export declare function DialogForm(props: DialogFormProps): ReactNode;
|
|
|
86
85
|
export declare namespace DialogForm {
|
|
87
86
|
var displayName: string;
|
|
88
87
|
}
|
|
89
|
-
//#endregion
|
|
90
88
|
//# sourceMappingURL=dialog-form.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-form.d.mts","names":[],"sources":["../../src/dialog/dialog-form.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog-form.d.mts","names":[],"sources":["../../src/dialog/dialog-form.tsx"],"mappings":";;;;;;;iBAkBiB;;WAEN;;;;;;;iBAQM,wBAAwB,KACvC;;;;;;;;;;;;;EAeA,oBAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;EAqB9B;;;;;EAKA,SAAS;;EAET,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,+BAA+B;;;;;;;;;;;;;;;;;;;;wBAqBrC,WAAW,OAAO,kBAAe;yBAAjC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { resolveStateValue } from "../internal/render-element.mjs";
|
|
4
|
-
import { useRender } from "../internal/use-render.mjs";
|
|
2
|
+
import { use, useCallback, useRef, useState } from "react";
|
|
5
3
|
import { FormContext } from "../internal/form/field-context.mjs";
|
|
6
|
-
import {
|
|
4
|
+
import { resolveStateValue } from "../internal/render-element.mjs";
|
|
7
5
|
import { FormStatusWatcher } from "../internal/form/form-status-watcher.mjs";
|
|
6
|
+
import { useDevWarning } from "../internal/use-dev-warning.mjs";
|
|
7
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
8
8
|
import { hasAnyError } from "../internal/form/validity.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { useDialogContext } from "./dialog-context.mjs";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
|
|
11
|
+
// src/dialog/dialog-form.tsx
|
|
12
12
|
const isDev = process.env.NODE_ENV !== "production";
|
|
13
13
|
/**
|
|
14
14
|
* A form that completes the dialog. Without `action`: `<form method="dialog">`, so a submit
|
|
@@ -129,7 +129,6 @@ function DialogFormSettle({ namespace, watches, missingAction, onPendingChange,
|
|
|
129
129
|
onSettled: settled
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
//#endregion
|
|
133
132
|
export { DialogForm, useDialogForm };
|
|
134
133
|
|
|
135
134
|
//# sourceMappingURL=dialog-form.mjs.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode, RefObject, ViewTransitionClass } from "react";
|
|
1
2
|
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
|
-
import "./dialog-context.mjs";
|
|
3
3
|
import "../internal/use-render.mjs";
|
|
4
|
-
import
|
|
5
|
-
//#region src/dialog/dialog-popup.d.ts
|
|
4
|
+
import "./dialog-context.mjs";
|
|
6
5
|
/**
|
|
7
6
|
* State of `Dialog.Popup`, passed to the function forms of `className`, `style`, `children` and
|
|
8
7
|
* `render`.
|
|
@@ -111,5 +110,4 @@ export declare function DialogPopup(props: DialogPopupProps): ReactNode;
|
|
|
111
110
|
export declare namespace DialogPopup {
|
|
112
111
|
var displayName: string;
|
|
113
112
|
}
|
|
114
|
-
//#endregion
|
|
115
113
|
//# sourceMappingURL=dialog-popup.d.mts.map
|