@funstack/ui 0.1.0-alpha.22 → 0.1.0-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/accordion-context.mjs +1 -2
- package/dist/accordion/accordion-item.d.mts +1 -3
- package/dist/accordion/accordion-item.d.mts.map +1 -1
- package/dist/accordion/accordion-item.mjs +14 -8
- package/dist/accordion/accordion-item.mjs.map +1 -1
- package/dist/accordion/accordion-panel.d.mts +1 -3
- package/dist/accordion/accordion-panel.d.mts.map +1 -1
- package/dist/accordion/accordion-panel.mjs +3 -4
- package/dist/accordion/accordion-root.d.mts +1 -3
- package/dist/accordion/accordion-root.d.mts.map +1 -1
- package/dist/accordion/accordion-root.mjs +12 -15
- package/dist/accordion/accordion-root.mjs.map +1 -1
- package/dist/accordion/accordion-trigger.d.mts +1 -3
- package/dist/accordion/accordion-trigger.d.mts.map +1 -1
- package/dist/accordion/accordion-trigger.mjs +4 -5
- package/dist/accordion/index.d.mts +0 -2
- package/dist/accordion/index.d.mts.map +1 -1
- package/dist/accordion/index.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-action.d.mts +5 -5
- package/dist/alert-dialog/alert-dialog-action.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-action.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-action.mjs.map +1 -1
- package/dist/alert-dialog/alert-dialog-cancel.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-cancel.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-cancel.mjs +4 -5
- package/dist/alert-dialog/alert-dialog-context.mjs +2 -3
- package/dist/alert-dialog/alert-dialog-description.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-description.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-description.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-form.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-form.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-form.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-popup.d.mts +1 -3
- package/dist/alert-dialog/alert-dialog-popup.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-popup.mjs +3 -4
- package/dist/alert-dialog/alert-dialog-root.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-root.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-root.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-title.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-title.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-title.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-trigger.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-trigger.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-trigger.mjs +1 -2
- package/dist/alert-dialog/index.d.mts +0 -2
- package/dist/alert-dialog/index.d.mts.map +1 -1
- package/dist/alert-dialog/index.mjs +1 -2
- package/dist/avatar/avatar-context.mjs +1 -2
- package/dist/avatar/avatar-fallback.d.mts +1 -3
- package/dist/avatar/avatar-fallback.d.mts.map +1 -1
- package/dist/avatar/avatar-fallback.mjs +1 -2
- package/dist/avatar/avatar-image.d.mts +1 -3
- package/dist/avatar/avatar-image.d.mts.map +1 -1
- package/dist/avatar/avatar-image.mjs +2 -3
- package/dist/avatar/avatar-root.d.mts +1 -3
- package/dist/avatar/avatar-root.d.mts.map +1 -1
- package/dist/avatar/avatar-root.mjs +2 -3
- package/dist/avatar/index.d.mts +1 -3
- package/dist/avatar/index.d.mts.map +1 -1
- package/dist/avatar/index.mjs +1 -2
- package/dist/bin/skill-installer.mjs +1 -2
- package/dist/button/button.d.mts +1 -3
- package/dist/button/button.d.mts.map +1 -1
- package/dist/button/button.mjs +4 -5
- package/dist/checkbox/checkbox.d.mts +1 -3
- package/dist/checkbox/checkbox.d.mts.map +1 -1
- package/dist/checkbox/checkbox.mjs +2 -3
- package/dist/checkbox-group/checkbox-group-context.mjs +1 -2
- package/dist/checkbox-group/checkbox-group-item.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-item.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-item.mjs +5 -6
- package/dist/checkbox-group/checkbox-group-label.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-label.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-label.mjs +1 -2
- package/dist/checkbox-group/checkbox-group-parent.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-parent.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-parent.mjs +7 -8
- package/dist/checkbox-group/checkbox-group-parent.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-root.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.mjs +7 -8
- package/dist/checkbox-group/index.d.mts +1 -3
- package/dist/checkbox-group/index.d.mts.map +1 -1
- package/dist/checkbox-group/index.mjs +1 -2
- package/dist/collapsible/collapsible-context.mjs +1 -2
- package/dist/collapsible/collapsible-panel.d.mts +1 -3
- package/dist/collapsible/collapsible-panel.d.mts.map +1 -1
- package/dist/collapsible/collapsible-panel.mjs +3 -4
- package/dist/collapsible/collapsible-root.d.mts +1 -3
- package/dist/collapsible/collapsible-root.d.mts.map +1 -1
- package/dist/collapsible/collapsible-root.mjs +18 -18
- package/dist/collapsible/collapsible-root.mjs.map +1 -1
- package/dist/collapsible/collapsible-trigger.d.mts +1 -3
- package/dist/collapsible/collapsible-trigger.d.mts.map +1 -1
- package/dist/collapsible/collapsible-trigger.mjs +4 -5
- package/dist/collapsible/index.d.mts +0 -2
- package/dist/collapsible/index.d.mts.map +1 -1
- package/dist/collapsible/index.mjs +1 -2
- package/dist/combobox/chip-text.mjs +1 -2
- package/dist/combobox/combobox-chips.d.mts +1 -3
- package/dist/combobox/combobox-chips.d.mts.map +1 -1
- package/dist/combobox/combobox-chips.mjs +3 -4
- package/dist/combobox/combobox-clear.d.mts +1 -3
- package/dist/combobox/combobox-clear.d.mts.map +1 -1
- package/dist/combobox/combobox-clear.mjs +2 -3
- package/dist/combobox/combobox-context.mjs +1 -2
- package/dist/combobox/combobox-group.d.mts +1 -3
- package/dist/combobox/combobox-group.d.mts.map +1 -1
- package/dist/combobox/combobox-group.mjs +2 -3
- package/dist/combobox/combobox-input.d.mts +1 -3
- package/dist/combobox/combobox-input.d.mts.map +1 -1
- package/dist/combobox/combobox-input.mjs +5 -6
- package/dist/combobox/combobox-keyboard.mjs +2 -3
- package/dist/combobox/combobox-label.d.mts +1 -3
- package/dist/combobox/combobox-label.d.mts.map +1 -1
- package/dist/combobox/combobox-label.mjs +2 -3
- package/dist/combobox/combobox-list.d.mts +1 -3
- package/dist/combobox/combobox-list.d.mts.map +1 -1
- package/dist/combobox/combobox-list.mjs +3 -4
- package/dist/combobox/combobox-option.d.mts +1 -3
- package/dist/combobox/combobox-option.d.mts.map +1 -1
- package/dist/combobox/combobox-option.mjs +2 -3
- package/dist/combobox/combobox-popup.d.mts +1 -3
- package/dist/combobox/combobox-popup.d.mts.map +1 -1
- package/dist/combobox/combobox-popup.mjs +4 -5
- package/dist/combobox/combobox-root.d.mts +1 -3
- package/dist/combobox/combobox-root.d.mts.map +1 -1
- package/dist/combobox/combobox-root.mjs +14 -15
- package/dist/combobox/combobox-trigger.d.mts +1 -3
- package/dist/combobox/combobox-trigger.d.mts.map +1 -1
- package/dist/combobox/combobox-trigger.mjs +5 -6
- package/dist/combobox/index.d.mts +1 -3
- package/dist/combobox/index.d.mts.map +1 -1
- package/dist/combobox/index.mjs +1 -2
- package/dist/combobox/use-combobox-form.mjs +3 -5
- package/dist/combobox/use-combobox-form.mjs.map +1 -1
- package/dist/combobox/use-combobox-text.mjs +3 -4
- package/dist/csp/csp-provider.d.mts +0 -2
- package/dist/csp/csp-provider.d.mts.map +1 -1
- package/dist/csp/csp-provider.mjs +2 -3
- package/dist/csp/style-hashes.d.mts +0 -2
- package/dist/csp/style-hashes.d.mts.map +1 -1
- package/dist/csp/style-hashes.mjs +1 -2
- package/dist/dialog/dialog-close.d.mts +10 -6
- package/dist/dialog/dialog-close.d.mts.map +1 -1
- package/dist/dialog/dialog-close.mjs +5 -5
- package/dist/dialog/dialog-close.mjs.map +1 -1
- package/dist/dialog/dialog-context.mjs +1 -2
- package/dist/dialog/dialog-description.d.mts +1 -3
- package/dist/dialog/dialog-description.d.mts.map +1 -1
- package/dist/dialog/dialog-description.mjs +1 -2
- package/dist/dialog/dialog-dismiss.mjs +51 -21
- package/dist/dialog/dialog-dismiss.mjs.map +1 -1
- package/dist/dialog/dialog-form.d.mts +1 -3
- package/dist/dialog/dialog-form.d.mts.map +1 -1
- package/dist/dialog/dialog-form.mjs +6 -7
- package/dist/dialog/dialog-popup.d.mts +2 -4
- package/dist/dialog/dialog-popup.d.mts.map +1 -1
- package/dist/dialog/dialog-popup.mjs +10 -11
- package/dist/dialog/dialog-root.d.mts +1 -3
- package/dist/dialog/dialog-root.d.mts.map +1 -1
- package/dist/dialog/dialog-root.mjs +3 -4
- package/dist/dialog/dialog-title.d.mts +1 -3
- package/dist/dialog/dialog-title.d.mts.map +1 -1
- package/dist/dialog/dialog-title.mjs +1 -2
- package/dist/dialog/dialog-trigger.d.mts +1 -3
- package/dist/dialog/dialog-trigger.d.mts.map +1 -1
- package/dist/dialog/dialog-trigger.mjs +4 -5
- package/dist/dialog/index.d.mts +1 -3
- package/dist/dialog/index.d.mts.map +1 -1
- package/dist/dialog/index.mjs +1 -2
- package/dist/docs/components/accordion.md +1 -1
- package/dist/docs/components/alert-dialog.md +15 -7
- package/dist/docs/components/collapsible.md +1 -1
- package/dist/docs/components/dialog.md +14 -6
- package/dist/docs/components/drawer.md +3 -3
- package/dist/docs/components/menu.md +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 +11 -16
- package/dist/field/field-root.mjs.map +1 -1
- package/dist/field/index.d.mts +0 -2
- package/dist/field/index.d.mts.map +1 -1
- package/dist/field/index.mjs +1 -2
- package/dist/field/use-server-error-visibility.mjs +1 -2
- package/dist/form/form-root.d.mts +1 -3
- package/dist/form/form-root.d.mts.map +1 -1
- package/dist/form/form-root.mjs +8 -9
- package/dist/form/form-submit.d.mts +1 -3
- package/dist/form/form-submit.d.mts.map +1 -1
- package/dist/form/form-submit.mjs +3 -4
- package/dist/form/index.d.mts +0 -2
- package/dist/form/index.d.mts.map +1 -1
- package/dist/form/index.mjs +1 -2
- package/dist/hover-card/hover-card-context.mjs +1 -2
- package/dist/hover-card/hover-card-popup.d.mts +2 -4
- package/dist/hover-card/hover-card-popup.d.mts.map +1 -1
- package/dist/hover-card/hover-card-popup.mjs +6 -7
- package/dist/hover-card/hover-card-root.d.mts +1 -3
- package/dist/hover-card/hover-card-root.d.mts.map +1 -1
- package/dist/hover-card/hover-card-root.mjs +3 -4
- package/dist/hover-card/hover-card-trigger.d.mts +1 -3
- package/dist/hover-card/hover-card-trigger.d.mts.map +1 -1
- package/dist/hover-card/hover-card-trigger.mjs +5 -6
- package/dist/hover-card/index.d.mts +0 -2
- package/dist/hover-card/index.d.mts.map +1 -1
- package/dist/hover-card/index.mjs +1 -2
- package/dist/hover-card/use-hover-card-interest.mjs +14 -8
- package/dist/hover-card/use-hover-card-interest.mjs.map +1 -1
- package/dist/index.d.mts +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/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/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 +7 -8
- 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 +1 -2
- package/dist/multi-select/multi-select-label.d.mts +1 -3
- package/dist/multi-select/multi-select-label.d.mts.map +1 -1
- package/dist/multi-select/multi-select-label.mjs +2 -3
- package/dist/multi-select/multi-select-list.d.mts +1 -3
- package/dist/multi-select/multi-select-list.d.mts.map +1 -1
- package/dist/multi-select/multi-select-list.mjs +3 -4
- package/dist/multi-select/multi-select-option.d.mts +1 -3
- package/dist/multi-select/multi-select-option.d.mts.map +1 -1
- package/dist/multi-select/multi-select-option.mjs +3 -4
- package/dist/multi-select/multi-select-popup.d.mts +1 -3
- package/dist/multi-select/multi-select-popup.d.mts.map +1 -1
- package/dist/multi-select/multi-select-popup.mjs +5 -6
- package/dist/multi-select/multi-select-root.d.mts +1 -3
- package/dist/multi-select/multi-select-root.d.mts.map +1 -1
- package/dist/multi-select/multi-select-root.mjs +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 +7 -8
- package/dist/number-field/number-field-root.mjs.map +1 -1
- package/dist/number-field/use-number-field-dev-warnings.mjs +2 -3
- package/dist/number-field/use-step-button.d.mts +1 -3
- package/dist/number-field/use-step-button.d.mts.map +1 -1
- package/dist/number-field/use-step-button.mjs +2 -3
- package/dist/otp-field/index.d.mts +2 -4
- package/dist/otp-field/index.d.mts.map +1 -1
- package/dist/otp-field/index.mjs +1 -2
- package/dist/otp-field/otp-field-context.mjs +1 -2
- package/dist/otp-field/otp-field-filter.d.mts +0 -2
- package/dist/otp-field/otp-field-filter.d.mts.map +1 -1
- package/dist/otp-field/otp-field-filter.mjs +1 -2
- package/dist/otp-field/otp-field-input.d.mts +1 -3
- package/dist/otp-field/otp-field-input.d.mts.map +1 -1
- package/dist/otp-field/otp-field-input.mjs +6 -7
- package/dist/otp-field/otp-field-root.d.mts +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 +4 -5
- package/dist/toast/toast-root.mjs.map +1 -1
- package/dist/toast/toast-timers.mjs +1 -2
- package/dist/toast/toast-title.d.mts +1 -3
- package/dist/toast/toast-title.d.mts.map +1 -1
- package/dist/toast/toast-title.mjs +2 -3
- package/dist/toast/toast-viewport.d.mts +1 -3
- package/dist/toast/toast-viewport.d.mts.map +1 -1
- package/dist/toast/toast-viewport.mjs +9 -10
- package/dist/toast/toast.d.mts +1 -3
- package/dist/toast/toast.d.mts.map +1 -1
- package/dist/toast/toast.mjs +1 -2
- package/dist/toast/use-modal-portal-host.mjs +2 -3
- package/dist/toast/use-toast-announcements.mjs +2 -3
- package/dist/toast/use-toast-announcements.mjs.map +1 -1
- package/dist/toast/use-toast-focus.mjs +2 -3
- package/dist/toast/use-toast-pauses.mjs +2 -3
- package/dist/toggle/toggle.d.mts +1 -3
- package/dist/toggle/toggle.d.mts.map +1 -1
- package/dist/toggle/toggle.mjs +3 -4
- package/dist/toggle-group/index.d.mts +0 -2
- package/dist/toggle-group/index.d.mts.map +1 -1
- package/dist/toggle-group/index.mjs +1 -2
- package/dist/toggle-group/toggle-group-context.d.mts +0 -2
- package/dist/toggle-group/toggle-group-context.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-context.mjs +1 -2
- package/dist/toggle-group/toggle-group-item.d.mts +1 -3
- package/dist/toggle-group/toggle-group-item.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-item.mjs +2 -3
- package/dist/toggle-group/toggle-group-root.d.mts +1 -3
- package/dist/toggle-group/toggle-group-root.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-root.mjs +8 -9
- package/dist/toolbar/index.d.mts +0 -2
- package/dist/toolbar/index.d.mts.map +1 -1
- package/dist/toolbar/index.mjs +1 -2
- package/dist/toolbar/toolbar-root.d.mts +1 -3
- package/dist/toolbar/toolbar-root.d.mts.map +1 -1
- package/dist/toolbar/toolbar-root.mjs +3 -4
- package/dist/toolbar/toolbar-separator.d.mts +1 -3
- package/dist/toolbar/toolbar-separator.d.mts.map +1 -1
- package/dist/toolbar/toolbar-separator.mjs +1 -2
- package/dist/tooltip/index.d.mts +0 -2
- package/dist/tooltip/index.d.mts.map +1 -1
- package/dist/tooltip/index.mjs +1 -2
- package/dist/tooltip/tooltip-arrow.d.mts +1 -3
- package/dist/tooltip/tooltip-arrow.d.mts.map +1 -1
- package/dist/tooltip/tooltip-arrow.mjs +2 -3
- package/dist/tooltip/tooltip-context.d.mts +0 -2
- package/dist/tooltip/tooltip-context.d.mts.map +1 -1
- package/dist/tooltip/tooltip-context.mjs +1 -2
- package/dist/tooltip/tooltip-popup.d.mts +1 -3
- package/dist/tooltip/tooltip-popup.d.mts.map +1 -1
- package/dist/tooltip/tooltip-popup.mjs +4 -5
- package/dist/tooltip/tooltip-root.d.mts +1 -3
- package/dist/tooltip/tooltip-root.d.mts.map +1 -1
- package/dist/tooltip/tooltip-root.mjs +2 -3
- package/dist/tooltip/tooltip-trigger.d.mts +1 -3
- package/dist/tooltip/tooltip-trigger.d.mts.map +1 -1
- package/dist/tooltip/tooltip-trigger.mjs +6 -7
- package/dist/tooltip/tooltip-warm.mjs +1 -2
- package/dist/tooltip/use-tooltip-interaction.mjs +2 -3
- package/package.json +8 -8
- package/skills/funstack-ui-knowledge/SKILL.md +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/data-attr.ts
|
|
2
2
|
/**
|
|
3
3
|
* Boolean data attributes are emitted by presence: `data-x=""` when true, absent when false.
|
|
4
4
|
* react-dom would stringify `true` as `"true"`, so this helper is the only place the presence
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
function dataAttr(flag) {
|
|
8
8
|
return flag ? "" : void 0;
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { dataAttr };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=data-attr.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/decimal.ts
|
|
2
2
|
/** Number of decimal places of `n` as written (`0.1` → 1, `1e-7` → 7, `5` → 0). */
|
|
3
3
|
function decimalsOf(n) {
|
|
4
4
|
if (!Number.isFinite(n)) return 0;
|
|
@@ -27,7 +27,6 @@ function roundTo(value, decimals) {
|
|
|
27
27
|
const result = decimals <= 0 ? Math.round(value) : Number(value.toFixed(Math.min(decimals, 100)));
|
|
28
28
|
return result === 0 ? 0 : result;
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { EPSILON, decimalsOf, gridDecimals, roundTo };
|
|
32
31
|
|
|
33
32
|
//# sourceMappingURL=decimal.mjs.map
|
|
@@ -1,7 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useLayoutEffect, useRef } from "react";
|
|
2
3
|
import { useElementCheck } from "./use-element-check.mjs";
|
|
3
|
-
|
|
4
|
+
// src/internal/details-summary.ts
|
|
4
5
|
const isDev = process.env.NODE_ENV !== "production";
|
|
6
|
+
/**
|
|
7
|
+
* The known value of each library-mode `<details>` (accordion.md 2.3, conventions 3.5): the last
|
|
8
|
+
* `open` the library wrote to the element or read from it. A `toggle` whose `details.open` equals
|
|
9
|
+
* it is the library's own write echoing back; any other is a platform change. Neither committed
|
|
10
|
+
* nor intended state is the test: the browser can bring the DOM back to either by itself while
|
|
11
|
+
* a request is in flight.
|
|
12
|
+
*/
|
|
13
|
+
const knownOpen = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
/** Records the element's current `open` as known (attach, mount reconciliation, a platform change). */
|
|
15
|
+
function noteOpen(element) {
|
|
16
|
+
knownOpen.set(element, element.open);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The library's own write of `open`: records `open` as known, then writes it if the DOM differs.
|
|
20
|
+
* The `toggle` that write fires is an echo. Also called right after React committed the `open`
|
|
21
|
+
* attribute, where it only records.
|
|
22
|
+
*/
|
|
23
|
+
function writeOpen(element, open) {
|
|
24
|
+
knownOpen.set(element, open);
|
|
25
|
+
if (element.open !== open) element.open = open;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Whether a `toggle` on `element` is the library's own write: `details.open` equals the known
|
|
29
|
+
* value. An element never noted is noted now and treated as an echo.
|
|
30
|
+
*/
|
|
31
|
+
function isEcho(element) {
|
|
32
|
+
const known = knownOpen.get(element);
|
|
33
|
+
if (known === void 0) {
|
|
34
|
+
noteOpen(element);
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
return element.open === known;
|
|
38
|
+
}
|
|
5
39
|
const NESTED_INTERACTIVE = "a[href], button, label, input, select, textarea, [contenteditable]:not([contenteditable='false'])";
|
|
6
40
|
/**
|
|
7
41
|
* Nested controls with an activation behaviour of their own. The browser runs theirs instead of
|
|
@@ -50,7 +84,21 @@ function useDetailsCheck(part, semantics) {
|
|
|
50
84
|
function useSummaryCheck(part) {
|
|
51
85
|
return useElementCheck(isDev && ((element) => element.tagName !== "SUMMARY" ? `${part}: expected to render a <summary> element but got <${element.tagName.toLowerCase()}>. Only a <summary> toggles its parent <details>.` : null));
|
|
52
86
|
}
|
|
53
|
-
|
|
54
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Records the committed `open` as known in the commit that changes it (React wrote the
|
|
89
|
+
* attribute; accordion.md 2.3). The mount run is skipped: there the element's attach (and the
|
|
90
|
+
* mount reconciliation) recorded the DOM value, which a click before hydration may have changed.
|
|
91
|
+
* `open` is `undefined` in JS-free mode, where nothing is recorded.
|
|
92
|
+
*/
|
|
93
|
+
function useCommittedOpenRecord(elementRef, open) {
|
|
94
|
+
const recorded = useRef(open);
|
|
95
|
+
useLayoutEffect(() => {
|
|
96
|
+
if (recorded.current === open) return;
|
|
97
|
+
recorded.current = open;
|
|
98
|
+
const element = elementRef.current;
|
|
99
|
+
if (element !== null && open !== void 0) writeOpen(element, open);
|
|
100
|
+
}, [elementRef, open]);
|
|
101
|
+
}
|
|
102
|
+
export { interceptSummaryClick, isEcho, noteOpen, useCommittedOpenRecord, useDetailsCheck, useSummaryCheck, writeOpen };
|
|
55
103
|
|
|
56
104
|
//# sourceMappingURL=details-summary.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details-summary.mjs","names":[],"sources":["../../src/internal/details-summary.ts"],"sourcesContent":["\"use client\";\nimport type { MouseEvent } from \"react\";\nimport { useElementCheck } from \"./use-element-check.js\";\nimport type { ElementCheck } from \"./use-element-check.js\";\n\n// The `<details>` / `<summary>` pair shared by Accordion (Item and Trigger) and Collapsible (Root\n// and Trigger): the Trigger's click rule (accordion.md 2.2, collapsible.md 2.2) and the\n// development checks of the rendered elements. The state side is not shared: an Accordion owns a
|
|
1
|
+
{"version":3,"file":"details-summary.mjs","names":[],"sources":["../../src/internal/details-summary.ts"],"sourcesContent":["\"use client\";\nimport { useLayoutEffect, useRef } from \"react\";\nimport type { MouseEvent, RefObject } from \"react\";\nimport { useElementCheck } from \"./use-element-check.js\";\nimport type { ElementCheck } from \"./use-element-check.js\";\n\n// The `<details>` / `<summary>` pair shared by Accordion (Item and Trigger) and Collapsible (Root\n// and Trigger): the Trigger's click rule (accordion.md 2.2, collapsible.md 2.2) and the\n// development checks of the rendered elements, and the record of the library's own `open` writes\n// (the known value). The state side is not shared: an Accordion owns a set, a Collapsible one\n// boolean.\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\n/**\n * The known value of each library-mode `<details>` (accordion.md 2.3, conventions 3.5): the last\n * `open` the library wrote to the element or read from it. A `toggle` whose `details.open` equals\n * it is the library's own write echoing back; any other is a platform change. Neither committed\n * nor intended state is the test: the browser can bring the DOM back to either by itself while\n * a request is in flight.\n */\nconst knownOpen = new WeakMap<HTMLDetailsElement, boolean>();\n\n/** Records the element's current `open` as known (attach, mount reconciliation, a platform change). */\nexport function noteOpen(element: HTMLDetailsElement): void {\n knownOpen.set(element, element.open);\n}\n\n/**\n * The library's own write of `open`: records `open` as known, then writes it if the DOM differs.\n * The `toggle` that write fires is an echo. Also called right after React committed the `open`\n * attribute, where it only records.\n */\nexport function writeOpen(element: HTMLDetailsElement, open: boolean): void {\n knownOpen.set(element, open);\n if (element.open !== open) element.open = open;\n}\n\n/**\n * Whether a `toggle` on `element` is the library's own write: `details.open` equals the known\n * value. An element never noted is noted now and treated as an echo.\n */\nexport function isEcho(element: HTMLDetailsElement): boolean {\n const known = knownOpen.get(element);\n if (known === undefined) {\n noteOpen(element);\n return true;\n }\n return element.open === known;\n}\n\nconst NESTED_INTERACTIVE =\n \"a[href], button, label, input, select, textarea, [contenteditable]:not([contenteditable='false'])\";\n\n/**\n * Nested controls with an activation behaviour of their own. The browser runs theirs instead of\n * the summary's (no toggle), so their click must keep its default: navigation, check, submit.\n */\nconst SELF_ACTIVATING =\n \"a[href], button, label, input:is([type='button'], [type='submit'], [type='reset'], \" +\n \"[type='image'], [type='checkbox'], [type='radio'], [type='file'], [type='color'])\";\n\n/** The interactive descendant of the summary that was clicked (a link in the heading), if any. */\nfunction nestedInteractive(target: EventTarget | null, summary: HTMLElement): Element | null {\n if (!(target instanceof Element) || target === summary) return null;\n const interactive = target.closest(NESTED_INTERACTIVE);\n return interactive !== null && interactive !== summary && summary.contains(interactive)\n ? interactive\n : null;\n}\n\n/**\n * The click rule of a `<summary>` Trigger whose click the library handles (library mode, or a\n * disabled Trigger in JS-free mode). Returns `true` when the click is a toggle request: it has\n * been cancelled, so the browser does not touch `open`, and the caller dispatches unless\n * disabled. Returns `false` for a click on interactive content nested in the summary, which never\n * toggles: a control without an activation behaviour of its own (text input, select, textarea,\n * contenteditable) would let the click fall through to the summary's toggle, so that click is\n * cancelled; focus and pickers happen on mousedown and are unaffected. Self-activating controls\n * (links, buttons, checkboxes) already pre-empt the summary's behaviour and keep their default.\n */\nexport function interceptSummaryClick(event: MouseEvent<HTMLElement>): boolean {\n const nested = nestedInteractive(event.target, event.currentTarget);\n if (nested !== null) {\n if (!nested.matches(SELF_ACTIVATING)) event.preventDefault();\n return false;\n }\n event.preventDefault();\n return true;\n}\n\n/**\n * The development check of a part that must render a `<details>` (`Accordion.Item`,\n * `Collapsible.Root`); `part` is its public name and `semantics` the platform behaviours the\n * part relies on, named in the message. Pass `semantics` as `isDev && \"...\"` so the text folds\n * away in production, where the hook is a no-op returning `undefined` (`useElementCheck`). Call\n * the result from the part's own ref.\n */\nexport function useDetailsCheck(\n part: string,\n semantics: string | false,\n): ElementCheck<HTMLDetailsElement> | undefined {\n return useElementCheck<HTMLDetailsElement>(\n isDev &&\n ((element) =>\n element.tagName !== \"DETAILS\"\n ? `${part}: expected to render a <details> element but got <${element.tagName.toLowerCase()}>. ` +\n `The platform semantics (${String(semantics)}) need a real <details>.`\n : null),\n );\n}\n\n/**\n * The development check of a part that must render a `<summary>` (`Accordion.Trigger`,\n * `Collapsible.Trigger`); see {@link useDetailsCheck}.\n */\nexport function useSummaryCheck(part: string): ElementCheck<HTMLElement> | undefined {\n return useElementCheck(\n isDev &&\n ((element) =>\n element.tagName !== \"SUMMARY\"\n ? `${part}: expected to render a <summary> element but got <${element.tagName.toLowerCase()}>. ` +\n \"Only a <summary> toggles its parent <details>.\"\n : null),\n );\n}\n\n/**\n * Records the committed `open` as known in the commit that changes it (React wrote the\n * attribute; accordion.md 2.3). The mount run is skipped: there the element's attach (and the\n * mount reconciliation) recorded the DOM value, which a click before hydration may have changed.\n * `open` is `undefined` in JS-free mode, where nothing is recorded.\n */\nexport function useCommittedOpenRecord(\n elementRef: RefObject<HTMLDetailsElement | null>,\n open: boolean | undefined,\n): void {\n const recorded = useRef(open);\n useLayoutEffect(() => {\n if (recorded.current === open) return;\n recorded.current = open;\n const element = elementRef.current;\n if (element !== null && open !== undefined) writeOpen(element, open);\n }, [elementRef, open]);\n}\n"],"mappings":";;;;AAYA,MAAM,QAAQ,QAAQ,IAAI,aAAa;;;;;;;;AASvC,MAAM,4BAAY,IAAI,QAAqC;;AAG3D,SAAgB,SAAS,SAAmC;CAC1D,UAAU,IAAI,SAAS,QAAQ,IAAI;AACrC;;;;;;AAOA,SAAgB,UAAU,SAA6B,MAAqB;CAC1E,UAAU,IAAI,SAAS,IAAI;CAC3B,IAAI,QAAQ,SAAS,MAAM,QAAQ,OAAO;AAC5C;;;;;AAMA,SAAgB,OAAO,SAAsC;CAC3D,MAAM,QAAQ,UAAU,IAAI,OAAO;CACnC,IAAI,UAAU,KAAA,GAAW;EACvB,SAAS,OAAO;EAChB,OAAO;CACT;CACA,OAAO,QAAQ,SAAS;AAC1B;AAEA,MAAM,qBACJ;;;;;AAMF,MAAM,kBACJ;;AAIF,SAAS,kBAAkB,QAA4B,SAAsC;CAC3F,IAAI,EAAE,kBAAkB,YAAY,WAAW,SAAS,OAAO;CAC/D,MAAM,cAAc,OAAO,QAAQ,kBAAkB;CACrD,OAAO,gBAAgB,QAAQ,gBAAgB,WAAW,QAAQ,SAAS,WAAW,IAClF,cACA;AACN;;;;;;;;;;;AAYA,SAAgB,sBAAsB,OAAyC;CAC7E,MAAM,SAAS,kBAAkB,MAAM,QAAQ,MAAM,aAAa;CAClE,IAAI,WAAW,MAAM;EACnB,IAAI,CAAC,OAAO,QAAQ,eAAe,GAAG,MAAM,eAAe;EAC3D,OAAO;CACT;CACA,MAAM,eAAe;CACrB,OAAO;AACT;;;;;;;;AASA,SAAgB,gBACd,MACA,WAC8C;CAC9C,OAAO,gBACL,WACI,YACA,QAAQ,YAAY,YAChB,GAAG,KAAK,oDAAoD,QAAQ,QAAQ,YAAY,EAAE,6BAC/D,OAAO,SAAS,EAAE,4BAC7C,KACV;AACF;;;;;AAMA,SAAgB,gBAAgB,MAAqD;CACnF,OAAO,gBACL,WACI,YACA,QAAQ,YAAY,YAChB,GAAG,KAAK,oDAAoD,QAAQ,QAAQ,YAAY,EAAE,qDAE1F,KACV;AACF;;;;;;;AAQA,SAAgB,uBACd,YACA,MACM;CACN,MAAM,WAAW,OAAO,IAAI;CAC5B,sBAAsB;EACpB,IAAI,SAAS,YAAY,MAAM;EAC/B,SAAS,UAAU;EACnB,MAAM,UAAU,WAAW;EAC3B,IAAI,YAAY,QAAQ,SAAS,KAAA,GAAW,UAAU,SAAS,IAAI;CACrE,GAAG,CAAC,YAAY,IAAI,CAAC;AACvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/dev-warn.ts
|
|
2
2
|
const isDev = process.env.NODE_ENV !== "production";
|
|
3
3
|
const seen = /* @__PURE__ */ new Set();
|
|
4
4
|
/**
|
|
@@ -11,7 +11,6 @@ function warnOnce(key, message) {
|
|
|
11
11
|
seen.add(key);
|
|
12
12
|
console.error(message);
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { warnOnce };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=dev-warn.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/dom-order.ts
|
|
2
2
|
/** A `sort` comparator putting nodes in document order. */
|
|
3
3
|
function compareDocumentOrder(a, b) {
|
|
4
4
|
if (a === b) return 0;
|
|
@@ -11,7 +11,6 @@ function compareDocumentOrder(a, b) {
|
|
|
11
11
|
function sortByDocumentOrder(items, elementOf) {
|
|
12
12
|
return [...items].sort((a, b) => compareDocumentOrder(elementOf(a), elementOf(b)));
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { compareDocumentOrder, sortByDocumentOrder };
|
|
16
15
|
|
|
17
16
|
//# sourceMappingURL=dom-order.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FieldValidity } from "./validity.mjs";
|
|
2
|
-
//#region src/internal/form/field-context.d.ts
|
|
3
2
|
/** The state every Field part receives (design/components/field-form.md 4.1). */
|
|
4
3
|
export interface FieldState {
|
|
5
4
|
/** An error is shown: the control matches `:user-invalid`, or a server error for this field is shown. */
|
|
@@ -15,5 +14,4 @@ export interface FieldState {
|
|
|
15
14
|
/** The enclosing form's submission is in flight (`useFormStatus().pending`); `false` outside a form. */
|
|
16
15
|
readonly pending: boolean;
|
|
17
16
|
}
|
|
18
|
-
//#endregion
|
|
19
17
|
//# sourceMappingURL=field-context.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-context.d.mts","names":[],"sources":["../../../src/internal/form/field-context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-context.d.mts","names":[],"sources":["../../../src/internal/form/field-context.ts"],"mappings":";;iBAMiB;;WAEN;;WAEA;;WAEA,UAAU;;WAEV;;WAEA;;WAEA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { dataAttr } from "../data-attr.mjs";
|
|
3
2
|
import { createContext, use } from "react";
|
|
4
|
-
|
|
3
|
+
import { dataAttr } from "../data-attr.mjs";
|
|
4
|
+
// src/internal/form/field-context.ts
|
|
5
5
|
const FieldContext = createContext(null);
|
|
6
6
|
function useFieldContext(part) {
|
|
7
7
|
const ctx = use(FieldContext);
|
|
@@ -18,7 +18,6 @@ function fieldDataAttributes(state) {
|
|
|
18
18
|
"data-pending": dataAttr(state.pending)
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { FieldContext, FormContext, fieldDataAttributes, useFieldContext };
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=field-context.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { sortByDocumentOrder } from "../dom-order.mjs";
|
|
2
1
|
import { announce } from "../announce.mjs";
|
|
3
|
-
|
|
2
|
+
import { sortByDocumentOrder } from "../dom-order.mjs";
|
|
3
|
+
// src/internal/form/focus-first-invalid.ts
|
|
4
4
|
/** The submission attempt in progress: every target added during the current task. */
|
|
5
5
|
let batch = null;
|
|
6
6
|
/**
|
|
@@ -61,7 +61,6 @@ function focusFirst(current) {
|
|
|
61
61
|
announce(first, current.messages.get(first) ?? "");
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
//#endregion
|
|
65
64
|
export { collectInvalid };
|
|
66
65
|
|
|
67
66
|
//# sourceMappingURL=focus-first-invalid.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect, useRef } from "react";
|
|
3
3
|
import { useFormStatus } from "react-dom";
|
|
4
|
-
|
|
4
|
+
// src/internal/form/form-status-watcher.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Observes React's form channel (Dialog design 8.1, Field/Form design 3.2): rendered inside a
|
|
7
7
|
* `<form>`, `useFormStatus().pending` covers the action's whole transition, including the
|
|
@@ -25,7 +25,6 @@ function FormStatusWatcher({ onPendingChange, onSettled }) {
|
|
|
25
25
|
]);
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { FormStatusWatcher };
|
|
30
29
|
|
|
31
30
|
//# sourceMappingURL=form-status-watcher.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { dataAttr } from "../data-attr.mjs";
|
|
3
3
|
import { guardCheckableChange } from "./use-native-checked.mjs";
|
|
4
|
-
|
|
4
|
+
// src/internal/form/group-member.ts
|
|
5
5
|
/**
|
|
6
6
|
* The owned layer (conventions 1.2) of a group Item's `<input>`: `type`, the group's `name` /
|
|
7
7
|
* `form`, `value`, `checked` (the optimistic state), `defaultChecked` (never rendered), a
|
|
@@ -31,7 +31,6 @@ function groupMemberProps(options) {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { groupMemberProps };
|
|
36
35
|
|
|
37
36
|
//# sourceMappingURL=group-member.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
// src/internal/form/hidden-values.tsx
|
|
3
3
|
/**
|
|
4
4
|
* The form value of a set-valued Root that has no form element of its own, Combobox `multiple`
|
|
5
5
|
* and MultiSelect (design/components/combobox.md 15.8, multi-select.md B.10; conventions 1.1):
|
|
@@ -23,7 +23,6 @@ function HiddenValues({ name, form, values, inputRef }) {
|
|
|
23
23
|
value: v
|
|
24
24
|
}, `v:${v}`));
|
|
25
25
|
}
|
|
26
|
-
//#endregion
|
|
27
26
|
export { HiddenValues };
|
|
28
27
|
|
|
29
28
|
//# sourceMappingURL=hidden-values.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/form/sync-presence.ts
|
|
2
2
|
/**
|
|
3
3
|
* Makes a boolean attribute's presence match `present`. For group members that may hydrate after
|
|
4
4
|
* their Root (`RadioGroup.Item`, `CheckboxGroup.Item` / `Parent`): hydration keeps server
|
|
@@ -17,7 +17,6 @@ function syncPresence(el, name, present) {
|
|
|
17
17
|
function syncPresences(el, attributes) {
|
|
18
18
|
for (const [name, present] of Object.entries(attributes)) syncPresence(el, name, present);
|
|
19
19
|
}
|
|
20
|
-
//#endregion
|
|
21
20
|
export { syncPresence, syncPresences };
|
|
22
21
|
|
|
23
22
|
//# sourceMappingURL=sync-presence.mjs.map
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { createActionDetails } from "../action/action-details.mjs";
|
|
3
3
|
import { dataAttr } from "../data-attr.mjs";
|
|
4
4
|
import { useControllableAction } from "../action/use-controllable-action.mjs";
|
|
5
|
-
import { useMergedRefs } from "../use-merged-refs.mjs";
|
|
6
5
|
import { fieldInputProps, useFieldControl, useFieldValueChange } from "./use-field-control.mjs";
|
|
6
|
+
import { useMergedRefs } from "../use-merged-refs.mjs";
|
|
7
7
|
import { guardCheckableChange, useNativeChecked } from "./use-native-checked.mjs";
|
|
8
|
-
|
|
8
|
+
// src/internal/form/use-checkable-input.ts
|
|
9
9
|
/**
|
|
10
10
|
* The single-checkbox machinery `Checkbox` and `Switch` share: the Field wiring, the
|
|
11
11
|
* controllable action, the native `checked` re-apply and reconciliation (`useNativeChecked`),
|
|
@@ -73,7 +73,6 @@ function useCheckableInput(options) {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { useCheckableInput };
|
|
78
77
|
|
|
79
78
|
//# sourceMappingURL=use-checkable-input.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { use, useCallback, useLayoutEffect, useRef } from "react";
|
|
2
3
|
import { dataAttr } from "../data-attr.mjs";
|
|
3
|
-
import { useDevWarning } from "../use-dev-warning.mjs";
|
|
4
4
|
import { FieldContext } from "./field-context.mjs";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { useDevWarning } from "../use-dev-warning.mjs";
|
|
6
|
+
// src/internal/form/use-field-control.ts
|
|
7
7
|
const isDev = process.env.NODE_ENV !== "production";
|
|
8
8
|
/**
|
|
9
9
|
* "Own or the Field's" (design/components/field-form.md 7.1): `name` falls back to the Field's,
|
|
@@ -119,7 +119,6 @@ function useFieldValueChange(value, takeEdit) {
|
|
|
119
119
|
notifyChange?.(edit);
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
//#endregion
|
|
123
122
|
export { fieldInputProps, resolveFieldDefaults, useFieldControl, useFieldValueChange };
|
|
124
123
|
|
|
125
124
|
//# sourceMappingURL=use-field-control.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useCallback, useId, useRef } from "react";
|
|
3
|
+
import { useFieldControl } from "./use-field-control.mjs";
|
|
2
4
|
import { useElementCheck } from "../use-element-check.mjs";
|
|
3
5
|
import { useMergedRefs } from "../use-merged-refs.mjs";
|
|
4
|
-
|
|
5
|
-
import { useCallback, useId, useRef } from "react";
|
|
6
|
-
//#region src/internal/form/use-fieldset-group.ts
|
|
6
|
+
// src/internal/form/use-fieldset-group.ts
|
|
7
7
|
const isDev = process.env.NODE_ENV !== "production";
|
|
8
8
|
/**
|
|
9
9
|
* The `<fieldset>` wiring of a native-input group Root (`RadioGroup.Root`,
|
|
@@ -40,7 +40,6 @@ function useFieldsetGroup(options) {
|
|
|
40
40
|
rootRef
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
//#endregion
|
|
44
43
|
export { useFieldsetGroup };
|
|
45
44
|
|
|
46
45
|
//# sourceMappingURL=use-fieldset-group.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffectEvent, useLayoutEffect, useRef } from "react";
|
|
3
|
-
|
|
3
|
+
// src/internal/form/use-form-owner-event.ts
|
|
4
4
|
/**
|
|
5
5
|
* Stable subscription to `type` on the form owner of `ref.current` (conventions 3.8 rule 4,
|
|
6
6
|
* generalised for Field, design/components/field-form.md 14).
|
|
@@ -38,7 +38,6 @@ function useFormOwnerEvent(ref, type, handler) {
|
|
|
38
38
|
subscription.current = null;
|
|
39
39
|
}, [type]);
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { useFormOwnerEvent };
|
|
43
42
|
|
|
44
43
|
//# sourceMappingURL=use-form-owner-event.mjs.map
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useLatest } from "../use-latest.mjs";
|
|
3
|
-
import { useFormOwnerEvent } from "./use-form-owner-event.mjs";
|
|
4
2
|
import { useState } from "react";
|
|
5
|
-
|
|
3
|
+
import { useFormOwnerEvent } from "./use-form-owner-event.mjs";
|
|
4
|
+
import { afterDispatch } from "../after-dispatch.mjs";
|
|
5
|
+
import { useLatest } from "../use-latest.mjs";
|
|
6
|
+
// src/internal/form/use-form-reset.ts
|
|
6
7
|
/**
|
|
7
8
|
* Stable `reset` subscription on the form owner of `ref.current` (conventions 3.8).
|
|
8
9
|
*
|
|
9
10
|
* - Built on `useFormOwnerEvent`, with its owner-following rules (rule 4).
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* - `onReset` runs after every `reset` listener and after the reset algorithm, in both orders
|
|
12
|
+
* (rule 5): through `afterDispatch`, a microtask after a script `form.reset()` (React's own
|
|
13
|
+
* reset included), a task after a click on a `<button type="reset">`, whose microtask
|
|
14
|
+
* checkpoints run mid-dispatch. So it may read the DOM's reset state (validity, `FormData`,
|
|
15
|
+
* the selected option), and it is skipped when any listener cancelled the reset (rule 7).
|
|
13
16
|
* - `onReset` always sees the latest committed render's values.
|
|
14
17
|
*/
|
|
15
18
|
function useFormReset(ref, onReset, onResetEvent) {
|
|
16
19
|
const latestOnReset = useLatest(onReset);
|
|
17
20
|
useFormOwnerEvent(ref, "reset", (event) => {
|
|
18
21
|
onResetEvent?.(event);
|
|
19
|
-
|
|
22
|
+
afterDispatch(event, () => {
|
|
20
23
|
if (event.defaultPrevented) return;
|
|
21
24
|
latestOnReset.current(event);
|
|
22
25
|
});
|
|
@@ -33,7 +36,6 @@ function useResetTarget(value, defaultValue) {
|
|
|
33
36
|
const [mountValue] = useState(value);
|
|
34
37
|
return value !== void 0 ? mountValue : defaultValue;
|
|
35
38
|
}
|
|
36
|
-
//#endregion
|
|
37
39
|
export { useFormReset, useResetTarget };
|
|
38
40
|
|
|
39
41
|
//# sourceMappingURL=use-form-reset.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form-reset.mjs","names":[],"sources":["../../../src/internal/form/use-form-reset.ts"],"sourcesContent":["\"use client\";\nimport { useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport { useFormOwnerEvent } from \"./use-form-owner-event.js\";\nimport
|
|
1
|
+
{"version":3,"file":"use-form-reset.mjs","names":[],"sources":["../../../src/internal/form/use-form-reset.ts"],"sourcesContent":["\"use client\";\nimport { useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport { useFormOwnerEvent } from \"./use-form-owner-event.js\";\nimport { afterDispatch } from \"../after-dispatch.js\";\nimport { useLatest } from \"../use-latest.js\";\n\n/**\n * Stable `reset` subscription on the form owner of `ref.current` (conventions 3.8).\n *\n * - Built on `useFormOwnerEvent`, with its owner-following rules (rule 4).\n * - `onReset` runs after every `reset` listener and after the reset algorithm, in both orders\n * (rule 5): through `afterDispatch`, a microtask after a script `form.reset()` (React's own\n * reset included), a task after a click on a `<button type=\"reset\">`, whose microtask\n * checkpoints run mid-dispatch. So it may read the DOM's reset state (validity, `FormData`,\n * the selected option), and it is skipped when any listener cancelled the reset (rule 7).\n * - `onReset` always sees the latest committed render's values.\n */\nexport function useFormReset(\n /** A form-associated element (or one whose `form` the owner hook reads, as Field's control). */\n ref: RefObject<Element | null>,\n onReset: (event: Event) => void,\n /**\n * Called synchronously from the `reset` event, before the reset algorithm runs: the last\n * moment to write a reset target the browser will restore (Combobox re-applies its mirrored\n * `defaultValue`, which react-dom's attribute syncing overwrites after every keystroke).\n */\n onResetEvent?: (event: Event) => void,\n): void {\n // Read when the callback is due, after the commit that may have run the reset (React's own\n // reset runs in a commit's mutation phase): the latest committed `onReset`.\n const latestOnReset = useLatest(onReset);\n useFormOwnerEvent(ref, \"reset\", (event) => {\n onResetEvent?.(event);\n afterDispatch(event, () => {\n if (event.defaultPrevented) return;\n latestOnReset.current(event);\n });\n });\n}\n\n/**\n * The form-reset target of a value prop by mode (conventions 3.8 rule 6): controlled\n * (`value !== undefined`), the value it had at mount; uncontrolled, the latest `defaultValue`.\n * `undefined` when that is absent: an uncontrolled Root with no `defaultValue`, or a Root that\n * became controlled after it mounted uncontrolled. The caller supplies its own fallback\n * (`?? null`, `?? value`, a platform default).\n */\nexport function useResetTarget<T>(\n value: T | undefined,\n defaultValue: T | undefined,\n): T | undefined {\n const [mountValue] = useState(value);\n return value !== undefined ? mountValue : defaultValue;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,SAAgB,aAEd,KACA,SAMA,cACM;CAGN,MAAM,gBAAgB,UAAU,OAAO;CACvC,kBAAkB,KAAK,UAAU,UAAU;EACzC,eAAe,KAAK;EACpB,cAAc,aAAa;GACzB,IAAI,MAAM,kBAAkB;GAC5B,cAAc,QAAQ,KAAK;EAC7B,CAAC;CACH,CAAC;AACH;;;;;;;;AASA,SAAgB,eACd,OACA,cACe;CACf,MAAM,CAAC,cAAc,SAAS,KAAK;CACnC,OAAO,UAAU,KAAA,IAAY,aAAa;AAC5C"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useCallback, useEffectEvent, useLayoutEffect, useRef } from "react";
|
|
2
3
|
import { intendedValue } from "../action/use-controllable-action.mjs";
|
|
3
4
|
import { useElementCheck } from "../use-element-check.mjs";
|
|
4
5
|
import { useFormReset } from "./use-form-reset.mjs";
|
|
5
|
-
|
|
6
|
-
//#region src/internal/form/use-native-checked.ts
|
|
6
|
+
// src/internal/form/use-native-checked.ts
|
|
7
7
|
const isDev = process.env.NODE_ENV !== "production";
|
|
8
8
|
/**
|
|
9
9
|
* Per-element machinery for a controlled native `<input type="checkbox" | "radio">`
|
|
@@ -106,7 +106,6 @@ function guardCheckableChange(event, dispatch, component = "A checkable input")
|
|
|
106
106
|
}
|
|
107
107
|
console.error(`${component}: \`preventDefault()\` on the change event is not supported; it desyncs the input while the action is pending. Use controlled mode to veto a change.`);
|
|
108
108
|
}
|
|
109
|
-
//#endregion
|
|
110
109
|
export { guardCheckableChange, useNativeChecked };
|
|
111
110
|
|
|
112
111
|
//# sourceMappingURL=use-native-checked.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useLatest } from "../use-latest.mjs";
|
|
3
|
-
import { useFormReset } from "./use-form-reset.mjs";
|
|
4
2
|
import { useCallback, useEffectEvent, useLayoutEffect, useRef } from "react";
|
|
5
|
-
|
|
3
|
+
import { useFormReset } from "./use-form-reset.mjs";
|
|
4
|
+
import { useLatest } from "../use-latest.mjs";
|
|
5
|
+
// src/internal/form/use-native-group-reconciliation.ts
|
|
6
6
|
/**
|
|
7
7
|
* Group adapter of the native-input machinery (conventions 3.8): one dispatch per group for the
|
|
8
8
|
* residual browser paths, from the Root rather than once per member.
|
|
@@ -61,7 +61,6 @@ function useNativeGroupReconciliation(options) {
|
|
|
61
61
|
function reconcile(options, next, path, event) {
|
|
62
62
|
if (!(options.equals ?? Object.is)(next, options.base())) options.onPlatformChange(next, event, path);
|
|
63
63
|
}
|
|
64
|
-
//#endregion
|
|
65
64
|
export { useNativeGroupReconciliation };
|
|
66
65
|
|
|
67
66
|
//# sourceMappingURL=use-native-group-reconciliation.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useCallback, useEffectEvent, useLayoutEffect, useMemo, useRef } from "react";
|
|
2
3
|
import { useLatest } from "../use-latest.mjs";
|
|
3
4
|
import { useNativeGroupReconciliation } from "./use-native-group-reconciliation.mjs";
|
|
4
|
-
|
|
5
|
-
//#region src/internal/form/use-native-select-value.ts
|
|
5
|
+
// src/internal/form/use-native-select-value.ts
|
|
6
6
|
/** The first option whose value is `value` (react-dom's `updateOptions` selects the first). */
|
|
7
7
|
function findOption(select, value) {
|
|
8
8
|
for (const option of select.options) if (option.value === value) return option;
|
|
@@ -178,7 +178,6 @@ function useNativeSelectValue(options) {
|
|
|
178
178
|
onItemMounted
|
|
179
179
|
]) };
|
|
180
180
|
}
|
|
181
|
-
//#endregion
|
|
182
181
|
export { applySelection, findOption, implicitDefault, readResetValue, useNativeSelectValue };
|
|
183
182
|
|
|
184
183
|
//# sourceMappingURL=use-native-select-value.mjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/internal/form/validity.d.ts
|
|
2
1
|
/** A field error: a message, several messages, or nothing (`""`, `[]`, `null`, `undefined`). */
|
|
3
2
|
export type FieldErrorValue = string | readonly string[] | null | undefined;
|
|
4
3
|
/** Field errors keyed by field `name` (usually `state.errors` from `useActionState`). */
|
|
@@ -31,5 +30,4 @@ export interface FieldValidity {
|
|
|
31
30
|
/** No constraint is violated. */
|
|
32
31
|
readonly valid: boolean;
|
|
33
32
|
}
|
|
34
|
-
//#endregion
|
|
35
33
|
//# sourceMappingURL=validity.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validity.d.mts","names":[],"sources":["../../../src/internal/form/validity.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"validity.d.mts","names":[],"sources":["../../../src/internal/form/validity.ts"],"mappings":";YAIY;;YAGA,aAAa,SAAS,eAAe;;;;;iBAMhC;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/form/validity.ts
|
|
2
2
|
const VALIDITY_KEYS = [
|
|
3
3
|
"valueMissing",
|
|
4
4
|
"typeMismatch",
|
|
@@ -92,7 +92,6 @@ function focusTargetOf(el) {
|
|
|
92
92
|
const members = (el instanceof HTMLFieldSetElement ? [...el.elements] : [...el.querySelectorAll("input, select, textarea, button")]).filter((m) => m instanceof HTMLElement && !m.disabled && m.type !== "hidden");
|
|
93
93
|
return members.find((m) => m instanceof HTMLInputElement && m.type === "radio" && m.checked) ?? members.find((m) => isValidatable(m) && m.name !== "") ?? members.find(isValidatable) ?? members[0] ?? null;
|
|
94
94
|
}
|
|
95
|
-
//#endregion
|
|
96
95
|
export { VALID, focusTargetOf, hasAnyError, normaliseErrorValue, snapshotValidity, supportsUserInvalid, validityElementOf, validityEquals };
|
|
97
96
|
|
|
98
97
|
//# sourceMappingURL=validity.mjs.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext, use } from "react";
|
|
3
|
-
|
|
3
|
+
// src/internal/menubar-context.ts
|
|
4
4
|
const MenubarContext = createContext(null);
|
|
5
5
|
/** The enclosing Menubar, or `null` outside one (and inside a `Menu.Popup`). */
|
|
6
6
|
function useMenubarContext() {
|
|
7
7
|
return use(MenubarContext);
|
|
8
8
|
}
|
|
9
|
-
//#endregion
|
|
10
9
|
export { MenubarContext, useMenubarContext };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=menubar-context.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/merge-props.ts
|
|
2
2
|
/**
|
|
3
3
|
* ARIA id-reference lists are merged as token lists rather than overridden (conventions 1.2), so
|
|
4
4
|
* a trigger can be described by more than the element the library wires it to.
|
|
@@ -113,7 +113,6 @@ function layer(under, over, overFirst, owned) {
|
|
|
113
113
|
function mergeProps(partProps, elementProps, libraryProps = {}) {
|
|
114
114
|
return layer(layer(partProps, elementProps, true, false), libraryProps, false, true);
|
|
115
115
|
}
|
|
116
|
-
//#endregion
|
|
117
116
|
export { mergeProps, mergeRefs, mergeTokenLists };
|
|
118
117
|
|
|
119
118
|
//# sourceMappingURL=merge-props.mjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/internal/overlay/anchor-position.d.ts
|
|
2
1
|
/** A physical side of the anchor. */
|
|
3
2
|
export type PhysicalSide = "top" | "bottom" | "left" | "right";
|
|
4
3
|
/**
|
|
@@ -11,5 +10,4 @@ export type AnchorSide = PhysicalSide | "inline-start" | "inline-end";
|
|
|
11
10
|
* inline-start edge meets the anchor's), the top / bottom edges on the others.
|
|
12
11
|
*/
|
|
13
12
|
export type AnchorAlign = "start" | "center" | "end";
|
|
14
|
-
//#endregion
|
|
15
13
|
//# sourceMappingURL=anchor-position.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor-position.d.mts","names":[],"sources":["../../../src/internal/overlay/anchor-position.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"anchor-position.d.mts","names":[],"sources":["../../../src/internal/overlay/anchor-position.ts"],"mappings":";YAcY;;;;;YAKA,aAAa;;;;;YAKb"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/overlay/anchor-position.ts
|
|
2
2
|
/** Flip to the opposite side, then the other axis, then both, when the popup does not fit. */
|
|
3
3
|
const POSITION_TRY_FALLBACKS = "flip-block, flip-inline, flip-block flip-inline";
|
|
4
4
|
const SIDE_KEYWORD = {
|
|
@@ -126,7 +126,6 @@ function physicalOf(name, index, count, selfDirection, rootDirection) {
|
|
|
126
126
|
function inlineEdge(edge, direction) {
|
|
127
127
|
return edge === "start" === (direction === "ltr") ? "left" : "right";
|
|
128
128
|
}
|
|
129
|
-
//#endregion
|
|
130
129
|
export { POSITION_TRY_FALLBACKS, parsePositionArea, positionArea };
|
|
131
130
|
|
|
132
131
|
//# sourceMappingURL=anchor-position.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useLayoutEffect, useRef } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/internal/overlay/content-focus-probe.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Records, from its layout-effect cleanup, whether focus is inside the popup when the content
|
|
7
7
|
* goes away: React runs a deleted component's layout cleanups before it detaches the host nodes,
|
|
@@ -36,7 +36,6 @@ function useContentFocusProbe(popupRef) {
|
|
|
36
36
|
}, [])
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
export { useContentFocusProbe };
|
|
41
40
|
|
|
42
41
|
//# sourceMappingURL=content-focus-probe.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/internal/overlay/css-transition-cut.ts
|
|
2
2
|
/** What `transition: none` sets, each restored on its own. */
|
|
3
3
|
const LONGHANDS = [
|
|
4
4
|
"transition-property",
|
|
@@ -60,7 +60,6 @@ function withCssTransitionCut(element, hasTransition, run) {
|
|
|
60
60
|
cutting.delete(element);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
//#endregion
|
|
64
63
|
export { withCssTransitionCut };
|
|
65
64
|
|
|
66
65
|
//# sourceMappingURL=css-transition-cut.mjs.map
|