@funstack/ui 0.1.0-alpha.21 → 0.1.0-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/accordion-context.mjs +1 -2
- package/dist/accordion/accordion-item.d.mts +1 -3
- package/dist/accordion/accordion-item.d.mts.map +1 -1
- package/dist/accordion/accordion-item.mjs +14 -8
- package/dist/accordion/accordion-item.mjs.map +1 -1
- package/dist/accordion/accordion-panel.d.mts +1 -3
- package/dist/accordion/accordion-panel.d.mts.map +1 -1
- package/dist/accordion/accordion-panel.mjs +3 -4
- package/dist/accordion/accordion-root.d.mts +1 -3
- package/dist/accordion/accordion-root.d.mts.map +1 -1
- package/dist/accordion/accordion-root.mjs +12 -15
- package/dist/accordion/accordion-root.mjs.map +1 -1
- package/dist/accordion/accordion-trigger.d.mts +1 -3
- package/dist/accordion/accordion-trigger.d.mts.map +1 -1
- package/dist/accordion/accordion-trigger.mjs +4 -5
- package/dist/accordion/index.d.mts +0 -2
- package/dist/accordion/index.d.mts.map +1 -1
- package/dist/accordion/index.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-action.d.mts +5 -5
- package/dist/alert-dialog/alert-dialog-action.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-action.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-action.mjs.map +1 -1
- package/dist/alert-dialog/alert-dialog-cancel.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-cancel.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-cancel.mjs +4 -5
- package/dist/alert-dialog/alert-dialog-context.mjs +2 -3
- package/dist/alert-dialog/alert-dialog-description.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-description.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-description.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-form.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-form.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-form.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-popup.d.mts +1 -3
- package/dist/alert-dialog/alert-dialog-popup.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-popup.mjs +3 -4
- package/dist/alert-dialog/alert-dialog-root.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-root.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-root.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-title.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-title.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-title.mjs +1 -2
- package/dist/alert-dialog/alert-dialog-trigger.d.mts +0 -2
- package/dist/alert-dialog/alert-dialog-trigger.d.mts.map +1 -1
- package/dist/alert-dialog/alert-dialog-trigger.mjs +1 -2
- package/dist/alert-dialog/index.d.mts +0 -2
- package/dist/alert-dialog/index.d.mts.map +1 -1
- package/dist/alert-dialog/index.mjs +1 -2
- package/dist/avatar/avatar-context.mjs +1 -2
- package/dist/avatar/avatar-fallback.d.mts +1 -3
- package/dist/avatar/avatar-fallback.d.mts.map +1 -1
- package/dist/avatar/avatar-fallback.mjs +1 -2
- package/dist/avatar/avatar-image.d.mts +1 -3
- package/dist/avatar/avatar-image.d.mts.map +1 -1
- package/dist/avatar/avatar-image.mjs +2 -3
- package/dist/avatar/avatar-root.d.mts +1 -3
- package/dist/avatar/avatar-root.d.mts.map +1 -1
- package/dist/avatar/avatar-root.mjs +2 -3
- package/dist/avatar/index.d.mts +1 -3
- package/dist/avatar/index.d.mts.map +1 -1
- package/dist/avatar/index.mjs +1 -2
- package/dist/bin/skill-installer.mjs +1 -2
- package/dist/button/button.d.mts +1 -3
- package/dist/button/button.d.mts.map +1 -1
- package/dist/button/button.mjs +4 -5
- package/dist/checkbox/checkbox.d.mts +1 -3
- package/dist/checkbox/checkbox.d.mts.map +1 -1
- package/dist/checkbox/checkbox.mjs +2 -3
- package/dist/checkbox-group/checkbox-group-context.mjs +1 -2
- package/dist/checkbox-group/checkbox-group-item.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-item.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-item.mjs +5 -6
- package/dist/checkbox-group/checkbox-group-label.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-label.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-label.mjs +1 -2
- package/dist/checkbox-group/checkbox-group-parent.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-parent.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-parent.mjs +7 -8
- package/dist/checkbox-group/checkbox-group-parent.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.d.mts +1 -3
- package/dist/checkbox-group/checkbox-group-root.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.mjs +7 -8
- package/dist/checkbox-group/index.d.mts +1 -3
- package/dist/checkbox-group/index.d.mts.map +1 -1
- package/dist/checkbox-group/index.mjs +1 -2
- package/dist/collapsible/collapsible-context.mjs +1 -2
- package/dist/collapsible/collapsible-panel.d.mts +1 -3
- package/dist/collapsible/collapsible-panel.d.mts.map +1 -1
- package/dist/collapsible/collapsible-panel.mjs +3 -4
- package/dist/collapsible/collapsible-root.d.mts +1 -3
- package/dist/collapsible/collapsible-root.d.mts.map +1 -1
- package/dist/collapsible/collapsible-root.mjs +18 -18
- package/dist/collapsible/collapsible-root.mjs.map +1 -1
- package/dist/collapsible/collapsible-trigger.d.mts +1 -3
- package/dist/collapsible/collapsible-trigger.d.mts.map +1 -1
- package/dist/collapsible/collapsible-trigger.mjs +4 -5
- package/dist/collapsible/index.d.mts +0 -2
- package/dist/collapsible/index.d.mts.map +1 -1
- package/dist/collapsible/index.mjs +1 -2
- package/dist/combobox/chip-text.mjs +1 -2
- package/dist/combobox/combobox-chips.d.mts +1 -3
- package/dist/combobox/combobox-chips.d.mts.map +1 -1
- package/dist/combobox/combobox-chips.mjs +3 -4
- package/dist/combobox/combobox-clear.d.mts +1 -3
- package/dist/combobox/combobox-clear.d.mts.map +1 -1
- package/dist/combobox/combobox-clear.mjs +2 -3
- package/dist/combobox/combobox-context.mjs +1 -2
- package/dist/combobox/combobox-group.d.mts +1 -3
- package/dist/combobox/combobox-group.d.mts.map +1 -1
- package/dist/combobox/combobox-group.mjs +2 -3
- package/dist/combobox/combobox-input.d.mts +1 -3
- package/dist/combobox/combobox-input.d.mts.map +1 -1
- package/dist/combobox/combobox-input.mjs +5 -6
- package/dist/combobox/combobox-keyboard.mjs +2 -3
- package/dist/combobox/combobox-label.d.mts +1 -3
- package/dist/combobox/combobox-label.d.mts.map +1 -1
- package/dist/combobox/combobox-label.mjs +2 -3
- package/dist/combobox/combobox-list.d.mts +1 -3
- package/dist/combobox/combobox-list.d.mts.map +1 -1
- package/dist/combobox/combobox-list.mjs +3 -4
- package/dist/combobox/combobox-option.d.mts +1 -3
- package/dist/combobox/combobox-option.d.mts.map +1 -1
- package/dist/combobox/combobox-option.mjs +2 -3
- package/dist/combobox/combobox-popup.d.mts +1 -3
- package/dist/combobox/combobox-popup.d.mts.map +1 -1
- package/dist/combobox/combobox-popup.mjs +4 -5
- package/dist/combobox/combobox-root.d.mts +1 -3
- package/dist/combobox/combobox-root.d.mts.map +1 -1
- package/dist/combobox/combobox-root.mjs +14 -15
- package/dist/combobox/combobox-trigger.d.mts +1 -3
- package/dist/combobox/combobox-trigger.d.mts.map +1 -1
- package/dist/combobox/combobox-trigger.mjs +5 -6
- package/dist/combobox/index.d.mts +1 -3
- package/dist/combobox/index.d.mts.map +1 -1
- package/dist/combobox/index.mjs +1 -2
- package/dist/combobox/use-combobox-form.mjs +3 -5
- package/dist/combobox/use-combobox-form.mjs.map +1 -1
- package/dist/combobox/use-combobox-text.mjs +3 -4
- package/dist/csp/csp-provider.d.mts +0 -2
- package/dist/csp/csp-provider.d.mts.map +1 -1
- package/dist/csp/csp-provider.mjs +2 -3
- package/dist/csp/style-hashes.d.mts +0 -2
- package/dist/csp/style-hashes.d.mts.map +1 -1
- package/dist/csp/style-hashes.mjs +1 -2
- package/dist/dialog/dialog-close.d.mts +10 -6
- package/dist/dialog/dialog-close.d.mts.map +1 -1
- package/dist/dialog/dialog-close.mjs +5 -5
- package/dist/dialog/dialog-close.mjs.map +1 -1
- package/dist/dialog/dialog-context.mjs +1 -2
- package/dist/dialog/dialog-description.d.mts +1 -3
- package/dist/dialog/dialog-description.d.mts.map +1 -1
- package/dist/dialog/dialog-description.mjs +1 -2
- package/dist/dialog/dialog-dismiss.mjs +51 -21
- package/dist/dialog/dialog-dismiss.mjs.map +1 -1
- package/dist/dialog/dialog-form.d.mts +1 -3
- package/dist/dialog/dialog-form.d.mts.map +1 -1
- package/dist/dialog/dialog-form.mjs +6 -7
- package/dist/dialog/dialog-popup.d.mts +2 -4
- package/dist/dialog/dialog-popup.d.mts.map +1 -1
- package/dist/dialog/dialog-popup.mjs +10 -11
- package/dist/dialog/dialog-root.d.mts +1 -3
- package/dist/dialog/dialog-root.d.mts.map +1 -1
- package/dist/dialog/dialog-root.mjs +3 -4
- package/dist/dialog/dialog-title.d.mts +1 -3
- package/dist/dialog/dialog-title.d.mts.map +1 -1
- package/dist/dialog/dialog-title.mjs +1 -2
- package/dist/dialog/dialog-trigger.d.mts +1 -3
- package/dist/dialog/dialog-trigger.d.mts.map +1 -1
- package/dist/dialog/dialog-trigger.mjs +4 -5
- package/dist/dialog/index.d.mts +1 -3
- package/dist/dialog/index.d.mts.map +1 -1
- package/dist/dialog/index.mjs +1 -2
- package/dist/docs/components/accordion.md +1 -1
- package/dist/docs/components/alert-dialog.md +15 -7
- package/dist/docs/components/collapsible.md +1 -1
- package/dist/docs/components/dialog.md +14 -6
- package/dist/docs/components/drawer.md +3 -3
- package/dist/docs/components/menu.md +4 -4
- package/dist/docs/components/menubar.md +309 -0
- package/dist/docs/components/meter.md +1 -1
- package/dist/docs/components/navigation-menu.md +501 -0
- package/dist/docs/components/number-field.md +2 -2
- package/dist/docs/components/otp-field.md +8 -1
- package/dist/docs/components/popover.md +6 -6
- package/dist/docs/components/progress.md +1 -1
- package/dist/docs/components/radio-group.md +1 -1
- package/dist/docs/components/slider.md +1 -1
- package/dist/docs/concepts/direction-and-locales.md +106 -0
- package/dist/docs/concepts/pending-and-optimistic.md +1 -0
- package/dist/docs/index.md +4 -1
- package/dist/docs/roadmap.md +11 -0
- package/dist/drawer/drawer-close.d.mts +0 -2
- package/dist/drawer/drawer-close.d.mts.map +1 -1
- package/dist/drawer/drawer-close.mjs +1 -2
- package/dist/drawer/drawer-description.d.mts +0 -2
- package/dist/drawer/drawer-description.d.mts.map +1 -1
- package/dist/drawer/drawer-description.mjs +1 -2
- package/dist/drawer/drawer-form.d.mts +0 -2
- package/dist/drawer/drawer-form.d.mts.map +1 -1
- package/dist/drawer/drawer-form.mjs +1 -2
- package/dist/drawer/drawer-popup.d.mts +2 -4
- package/dist/drawer/drawer-popup.d.mts.map +1 -1
- package/dist/drawer/drawer-popup.mjs +3 -4
- package/dist/drawer/drawer-root.d.mts +0 -2
- package/dist/drawer/drawer-root.d.mts.map +1 -1
- package/dist/drawer/drawer-root.mjs +1 -2
- package/dist/drawer/drawer-swipe.d.mts +0 -2
- package/dist/drawer/drawer-swipe.d.mts.map +1 -1
- package/dist/drawer/drawer-swipe.mjs +1 -2
- package/dist/drawer/drawer-swipe.mjs.map +1 -1
- package/dist/drawer/drawer-title.d.mts +0 -2
- package/dist/drawer/drawer-title.d.mts.map +1 -1
- package/dist/drawer/drawer-title.mjs +1 -2
- package/dist/drawer/drawer-trigger.d.mts +0 -2
- package/dist/drawer/drawer-trigger.d.mts.map +1 -1
- package/dist/drawer/drawer-trigger.mjs +1 -2
- package/dist/drawer/index.d.mts +0 -2
- package/dist/drawer/index.d.mts.map +1 -1
- package/dist/drawer/index.mjs +1 -2
- package/dist/field/field-control.d.mts +2 -4
- package/dist/field/field-control.d.mts.map +1 -1
- package/dist/field/field-control.mjs +6 -7
- package/dist/field/field-description.d.mts +2 -4
- package/dist/field/field-description.d.mts.map +1 -1
- package/dist/field/field-description.mjs +2 -3
- package/dist/field/field-error.d.mts +2 -4
- package/dist/field/field-error.d.mts.map +1 -1
- package/dist/field/field-error.mjs +3 -4
- package/dist/field/field-label.d.mts +2 -4
- package/dist/field/field-label.d.mts.map +1 -1
- package/dist/field/field-label.mjs +3 -4
- package/dist/field/field-root.d.mts +2 -4
- package/dist/field/field-root.d.mts.map +1 -1
- package/dist/field/field-root.mjs +11 -16
- package/dist/field/field-root.mjs.map +1 -1
- package/dist/field/index.d.mts +0 -2
- package/dist/field/index.d.mts.map +1 -1
- package/dist/field/index.mjs +1 -2
- package/dist/field/use-server-error-visibility.mjs +1 -2
- package/dist/form/form-root.d.mts +1 -3
- package/dist/form/form-root.d.mts.map +1 -1
- package/dist/form/form-root.mjs +8 -9
- package/dist/form/form-submit.d.mts +1 -3
- package/dist/form/form-submit.d.mts.map +1 -1
- package/dist/form/form-submit.mjs +3 -4
- package/dist/form/index.d.mts +0 -2
- package/dist/form/index.d.mts.map +1 -1
- package/dist/form/index.mjs +1 -2
- package/dist/hover-card/hover-card-context.mjs +1 -2
- package/dist/hover-card/hover-card-popup.d.mts +2 -4
- package/dist/hover-card/hover-card-popup.d.mts.map +1 -1
- package/dist/hover-card/hover-card-popup.mjs +6 -7
- package/dist/hover-card/hover-card-root.d.mts +1 -3
- package/dist/hover-card/hover-card-root.d.mts.map +1 -1
- package/dist/hover-card/hover-card-root.mjs +3 -4
- package/dist/hover-card/hover-card-trigger.d.mts +1 -3
- package/dist/hover-card/hover-card-trigger.d.mts.map +1 -1
- package/dist/hover-card/hover-card-trigger.mjs +5 -6
- package/dist/hover-card/index.d.mts +0 -2
- package/dist/hover-card/index.d.mts.map +1 -1
- package/dist/hover-card/index.mjs +1 -2
- package/dist/hover-card/use-hover-card-interest.mjs +14 -8
- package/dist/hover-card/use-hover-card-interest.mjs.map +1 -1
- package/dist/index.d.mts +50 -35
- package/dist/index.mjs +3 -1
- package/dist/internal/action/action-details.mjs +1 -2
- package/dist/internal/action/call-urgent-handler.mjs +1 -2
- package/dist/internal/action/report-dropped.mjs +1 -2
- package/dist/internal/action/use-action-trigger.mjs +2 -3
- package/dist/internal/action/use-connected.mjs +1 -2
- package/dist/internal/action/use-controllable-action.mjs +4 -5
- package/dist/internal/action/use-multiple-selection.mjs +4 -5
- package/dist/internal/action/use-pure-trigger.mjs +1 -2
- package/dist/internal/action/use-pure-trigger.mjs.map +1 -1
- package/dist/internal/action/use-step-commit.mjs +3 -4
- package/dist/internal/after-dispatch.mjs +23 -0
- package/dist/internal/after-dispatch.mjs.map +1 -0
- package/dist/internal/announce.mjs +1 -2
- package/dist/internal/arrow-keys.mjs +1 -2
- package/dist/internal/csp-context.mjs +1 -2
- package/dist/internal/data-attr.mjs +1 -2
- package/dist/internal/decimal.mjs +1 -2
- package/dist/internal/details-summary.mjs +51 -3
- package/dist/internal/details-summary.mjs.map +1 -1
- package/dist/internal/dev-warn.mjs +1 -2
- package/dist/internal/dom-order.mjs +1 -2
- package/dist/internal/form/field-context.d.mts +0 -2
- package/dist/internal/form/field-context.d.mts.map +1 -1
- package/dist/internal/form/field-context.mjs +2 -3
- package/dist/internal/form/focus-first-invalid.mjs +2 -3
- package/dist/internal/form/form-status-watcher.mjs +1 -2
- package/dist/internal/form/group-member.mjs +1 -2
- package/dist/internal/form/hidden-values.mjs +1 -2
- package/dist/internal/form/sync-presence.mjs +1 -2
- package/dist/internal/form/use-checkable-input.mjs +2 -3
- package/dist/internal/form/use-field-control.mjs +3 -4
- package/dist/internal/form/use-fieldset-group.mjs +3 -4
- package/dist/internal/form/use-form-owner-event.mjs +1 -2
- package/dist/internal/form/use-form-reset.mjs +10 -8
- package/dist/internal/form/use-form-reset.mjs.map +1 -1
- package/dist/internal/form/use-native-checked.mjs +2 -3
- package/dist/internal/form/use-native-group-reconciliation.mjs +3 -4
- package/dist/internal/form/use-native-select-value.mjs +2 -3
- package/dist/internal/form/validity.d.mts +0 -2
- package/dist/internal/form/validity.d.mts.map +1 -1
- package/dist/internal/form/validity.mjs +1 -2
- package/dist/internal/menubar-context.mjs +11 -0
- package/dist/internal/menubar-context.mjs.map +1 -0
- package/dist/internal/merge-props.mjs +1 -2
- package/dist/internal/overlay/anchor-position.d.mts +0 -2
- package/dist/internal/overlay/anchor-position.d.mts.map +1 -1
- package/dist/internal/overlay/anchor-position.mjs +1 -2
- package/dist/internal/overlay/content-focus-probe.mjs +1 -2
- package/dist/internal/overlay/css-transition-cut.mjs +1 -2
- package/dist/internal/overlay/css-transition-cut.mjs.map +1 -1
- package/dist/internal/overlay/focus-visible.mjs +1 -2
- package/dist/internal/overlay/invokers.mjs +1 -2
- package/dist/internal/overlay/modal-registry.mjs +1 -2
- package/dist/internal/overlay/overlay-popup.mjs +2 -3
- package/dist/internal/overlay/overlay-show.mjs +1 -2
- package/dist/internal/overlay/popover-open.mjs +1 -2
- package/dist/internal/overlay/trigger-ref.mjs +2 -3
- package/dist/internal/overlay/trigger-ref.mjs.map +1 -1
- package/dist/internal/overlay/use-apply-open-state.mjs +1 -2
- package/dist/internal/overlay/use-exit-animation.mjs +1 -2
- package/dist/internal/overlay/use-exit-animation.mjs.map +1 -1
- package/dist/internal/overlay/use-interest-dismiss.mjs +3 -4
- package/dist/internal/overlay/use-modal-registration.mjs +2 -3
- package/dist/internal/overlay/use-overlay-close.mjs +11 -9
- package/dist/internal/overlay/use-overlay-close.mjs.map +1 -1
- package/dist/internal/overlay/use-overlay-root.d.mts +2 -2
- package/dist/internal/overlay/use-overlay-root.mjs +9 -9
- package/dist/internal/overlay/use-overlay-root.mjs.map +1 -1
- package/dist/internal/overlay/use-popover-popup.mjs +6 -7
- package/dist/internal/overlay/use-popover-trigger.d.mts +2 -4
- package/dist/internal/overlay/use-popover-trigger.d.mts.map +1 -1
- package/dist/internal/overlay/use-popover-trigger.mjs +6 -7
- package/dist/internal/overlay/use-popover-trigger.mjs.map +1 -1
- package/dist/internal/overlay/use-resolved-placement.mjs +4 -5
- package/dist/internal/platform-attributes.d.mts +0 -2
- package/dist/internal/platform-attributes.d.mts.map +1 -1
- package/dist/internal/pointer-capture.mjs +1 -2
- package/dist/internal/range-value.mjs +6 -5
- package/dist/internal/range-value.mjs.map +1 -1
- package/dist/internal/render-element.d.mts +2 -2
- package/dist/internal/render-element.mjs +2 -3
- package/dist/internal/shipped-styles.mjs +1 -2
- package/dist/internal/swipe-arithmetic.mjs +0 -1
- package/dist/internal/swipe.mjs +2 -3
- package/dist/internal/toolbar-context.mjs +1 -2
- package/dist/internal/transition-boundary.mjs +2 -3
- package/dist/internal/transition-types.mjs +1 -2
- package/dist/internal/typeahead.mjs +0 -1
- package/dist/internal/types.d.mts +0 -2
- package/dist/internal/types.d.mts.map +1 -1
- package/dist/internal/use-active-option.mjs +1 -2
- package/dist/internal/use-deferred-leave.mjs +2 -3
- package/dist/internal/use-delayed-pair.mjs +1 -2
- package/dist/internal/use-dev-warning.mjs +0 -1
- package/dist/internal/use-element-check.mjs +1 -2
- package/dist/internal/use-hydrated-mount.mjs +1 -2
- package/dist/internal/use-item-order.mjs +2 -3
- package/dist/internal/use-latest.mjs +1 -2
- package/dist/internal/use-merged-refs.mjs +2 -3
- package/dist/internal/use-mount-fixed.mjs +2 -3
- package/dist/internal/use-name-warning.mjs +1 -2
- package/dist/internal/use-native-focusgroup.mjs +1 -2
- package/dist/internal/use-option-registry.mjs +3 -4
- package/dist/internal/use-register-count.mjs +1 -2
- package/dist/internal/use-render.d.mts +2 -2
- package/dist/internal/use-render.mjs +2 -3
- package/dist/internal/use-roving-focus.mjs +2 -3
- package/dist/internal/use-value-set.mjs +2 -3
- package/dist/internal/value-set.mjs +1 -2
- package/dist/menu/index.d.mts +2 -4
- package/dist/menu/index.d.mts.map +1 -1
- package/dist/menu/index.mjs +2 -3
- package/dist/menu/menu-checkbox-item.d.mts +1 -3
- package/dist/menu/menu-checkbox-item.d.mts.map +1 -1
- package/dist/menu/menu-checkbox-item.mjs +3 -4
- package/dist/menu/menu-context-trigger.d.mts +1 -3
- package/dist/menu/menu-context-trigger.d.mts.map +1 -1
- package/dist/menu/menu-context-trigger.mjs +4 -5
- package/dist/menu/menu-context.mjs +1 -2
- package/dist/menu/menu-dom.mjs +1 -2
- package/dist/menu/menu-gestures.mjs +1 -2
- package/dist/menu/menu-group.d.mts +1 -3
- package/dist/menu/menu-group.d.mts.map +1 -1
- package/dist/menu/menu-group.mjs +2 -3
- package/dist/menu/menu-hover.mjs +1 -2
- package/dist/menu/menu-item.d.mts +3 -4
- package/dist/menu/menu-item.d.mts.map +1 -1
- package/dist/menu/menu-item.mjs +6 -3
- package/dist/menu/menu-item.mjs.map +1 -1
- package/dist/menu/menu-outside.mjs +1 -2
- package/dist/menu/menu-point.mjs +1 -2
- package/dist/menu/menu-popup.d.mts +2 -4
- package/dist/menu/menu-popup.d.mts.map +1 -1
- package/dist/menu/menu-popup.mjs +45 -19
- package/dist/menu/menu-popup.mjs.map +1 -1
- package/dist/menu/menu-radio-group.d.mts +1 -3
- package/dist/menu/menu-radio-group.d.mts.map +1 -1
- package/dist/menu/menu-radio-group.mjs +3 -4
- package/dist/menu/menu-radio-item.d.mts +1 -3
- package/dist/menu/menu-radio-item.d.mts.map +1 -1
- package/dist/menu/menu-radio-item.mjs +2 -3
- package/dist/menu/menu-root.d.mts +1 -3
- package/dist/menu/menu-root.d.mts.map +1 -1
- package/dist/menu/menu-root.mjs +4 -5
- package/dist/menu/menu-submenu-trigger.d.mts +1 -3
- package/dist/menu/menu-submenu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-submenu-trigger.mjs +5 -6
- package/dist/menu/menu-trigger.d.mts +11 -6
- package/dist/menu/menu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-trigger.mjs +56 -9
- package/dist/menu/menu-trigger.mjs.map +1 -1
- package/dist/menu/use-menu-item.mjs +2 -3
- package/dist/menu/use-menu-keyboard.mjs +2 -3
- package/dist/menubar/index.d.mts +3 -0
- package/dist/menubar/index.mjs +1 -0
- package/dist/menubar/menubar.d.mts +47 -0
- package/dist/menubar/menubar.d.mts.map +1 -0
- package/dist/menubar/menubar.mjs +146 -0
- package/dist/menubar/menubar.mjs.map +1 -0
- package/dist/meter/index.d.mts +1 -3
- package/dist/meter/index.d.mts.map +1 -1
- package/dist/meter/index.mjs +1 -2
- package/dist/meter/meter-context.mjs +1 -2
- package/dist/meter/meter-indicator.d.mts +1 -3
- package/dist/meter/meter-indicator.d.mts.map +1 -1
- package/dist/meter/meter-indicator.mjs +1 -2
- package/dist/meter/meter-label.d.mts +1 -3
- package/dist/meter/meter-label.d.mts.map +1 -1
- package/dist/meter/meter-label.mjs +1 -2
- package/dist/meter/meter-region.d.mts +0 -2
- package/dist/meter/meter-region.d.mts.map +1 -1
- package/dist/meter/meter-region.mjs +1 -2
- package/dist/meter/meter-root.d.mts +4 -5
- package/dist/meter/meter-root.d.mts.map +1 -1
- package/dist/meter/meter-root.mjs +4 -5
- package/dist/meter/meter-root.mjs.map +1 -1
- package/dist/meter/meter-track.d.mts +1 -3
- package/dist/meter/meter-track.d.mts.map +1 -1
- package/dist/meter/meter-track.mjs +1 -2
- package/dist/meter/meter-value.d.mts +1 -3
- package/dist/meter/meter-value.d.mts.map +1 -1
- package/dist/meter/meter-value.mjs +1 -2
- package/dist/multi-select/index.d.mts +1 -3
- package/dist/multi-select/index.d.mts.map +1 -1
- package/dist/multi-select/index.mjs +1 -2
- package/dist/multi-select/multi-select-context.mjs +1 -2
- package/dist/multi-select/multi-select-group.d.mts +1 -3
- package/dist/multi-select/multi-select-group.d.mts.map +1 -1
- package/dist/multi-select/multi-select-group.mjs +2 -3
- package/dist/multi-select/multi-select-keyboard.mjs +1 -2
- package/dist/multi-select/multi-select-label.d.mts +1 -3
- package/dist/multi-select/multi-select-label.d.mts.map +1 -1
- package/dist/multi-select/multi-select-label.mjs +2 -3
- package/dist/multi-select/multi-select-list.d.mts +1 -3
- package/dist/multi-select/multi-select-list.d.mts.map +1 -1
- package/dist/multi-select/multi-select-list.mjs +3 -4
- package/dist/multi-select/multi-select-option.d.mts +1 -3
- package/dist/multi-select/multi-select-option.d.mts.map +1 -1
- package/dist/multi-select/multi-select-option.mjs +3 -4
- package/dist/multi-select/multi-select-popup.d.mts +1 -3
- package/dist/multi-select/multi-select-popup.d.mts.map +1 -1
- package/dist/multi-select/multi-select-popup.mjs +5 -6
- package/dist/multi-select/multi-select-root.d.mts +1 -3
- package/dist/multi-select/multi-select-root.d.mts.map +1 -1
- package/dist/multi-select/multi-select-root.mjs +11 -12
- package/dist/multi-select/multi-select-trigger.d.mts +1 -3
- package/dist/multi-select/multi-select-trigger.d.mts.map +1 -1
- package/dist/multi-select/multi-select-trigger.mjs +7 -8
- package/dist/multi-select/multi-select-value.d.mts +1 -3
- package/dist/multi-select/multi-select-value.d.mts.map +1 -1
- package/dist/multi-select/multi-select-value.mjs +1 -2
- package/dist/navigation-menu/index.d.mts +30 -0
- package/dist/navigation-menu/index.d.mts.map +1 -0
- package/dist/navigation-menu/index.mjs +31 -0
- package/dist/navigation-menu/index.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-context.mjs +18 -0
- package/dist/navigation-menu/navigation-menu-context.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-item.d.mts +77 -0
- package/dist/navigation-menu/navigation-menu-item.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-item.mjs +79 -0
- package/dist/navigation-menu/navigation-menu-item.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-link.d.mts +46 -0
- package/dist/navigation-menu/navigation-menu-link.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-link.mjs +65 -0
- package/dist/navigation-menu/navigation-menu-link.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-list.d.mts +31 -0
- package/dist/navigation-menu/navigation-menu-list.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-list.mjs +29 -0
- package/dist/navigation-menu/navigation-menu-list.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-popup.d.mts +100 -0
- package/dist/navigation-menu/navigation-menu-popup.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-popup.mjs +92 -0
- package/dist/navigation-menu/navigation-menu-popup.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-root.d.mts +31 -0
- package/dist/navigation-menu/navigation-menu-root.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-root.mjs +26 -0
- package/dist/navigation-menu/navigation-menu-root.mjs.map +1 -0
- package/dist/navigation-menu/navigation-menu-trigger.d.mts +30 -0
- package/dist/navigation-menu/navigation-menu-trigger.d.mts.map +1 -0
- package/dist/navigation-menu/navigation-menu-trigger.mjs +41 -0
- package/dist/navigation-menu/navigation-menu-trigger.mjs.map +1 -0
- package/dist/number-field/index.d.mts +2 -4
- package/dist/number-field/index.d.mts.map +1 -1
- package/dist/number-field/index.mjs +1 -2
- package/dist/number-field/number-field-arithmetic.mjs +1 -2
- package/dist/number-field/number-field-context.d.mts +1 -3
- package/dist/number-field/number-field-context.d.mts.map +1 -1
- package/dist/number-field/number-field-context.mjs +1 -2
- package/dist/number-field/number-field-decrement.d.mts +0 -2
- package/dist/number-field/number-field-decrement.d.mts.map +1 -1
- package/dist/number-field/number-field-decrement.mjs +1 -2
- package/dist/number-field/number-field-format.mjs +1 -2
- package/dist/number-field/number-field-increment.d.mts +0 -2
- package/dist/number-field/number-field-increment.d.mts.map +1 -1
- package/dist/number-field/number-field-increment.mjs +1 -2
- package/dist/number-field/number-field-input.d.mts +1 -3
- package/dist/number-field/number-field-input.d.mts.map +1 -1
- package/dist/number-field/number-field-input.mjs +4 -5
- package/dist/number-field/number-field-label.d.mts +1 -3
- package/dist/number-field/number-field-label.d.mts.map +1 -1
- package/dist/number-field/number-field-label.mjs +3 -4
- package/dist/number-field/number-field-root.d.mts +1 -3
- package/dist/number-field/number-field-root.d.mts.map +1 -1
- package/dist/number-field/number-field-root.mjs +7 -8
- package/dist/number-field/number-field-root.mjs.map +1 -1
- package/dist/number-field/use-number-field-dev-warnings.mjs +2 -3
- package/dist/number-field/use-step-button.d.mts +1 -3
- package/dist/number-field/use-step-button.d.mts.map +1 -1
- package/dist/number-field/use-step-button.mjs +2 -3
- package/dist/otp-field/index.d.mts +2 -4
- package/dist/otp-field/index.d.mts.map +1 -1
- package/dist/otp-field/index.mjs +1 -2
- package/dist/otp-field/otp-field-context.mjs +1 -2
- package/dist/otp-field/otp-field-filter.d.mts +0 -2
- package/dist/otp-field/otp-field-filter.d.mts.map +1 -1
- package/dist/otp-field/otp-field-filter.mjs +1 -2
- package/dist/otp-field/otp-field-input.d.mts +1 -3
- package/dist/otp-field/otp-field-input.d.mts.map +1 -1
- package/dist/otp-field/otp-field-input.mjs +6 -7
- package/dist/otp-field/otp-field-root.d.mts +10 -3
- package/dist/otp-field/otp-field-root.d.mts.map +1 -1
- package/dist/otp-field/otp-field-root.mjs +15 -13
- package/dist/otp-field/otp-field-root.mjs.map +1 -1
- package/dist/otp-field/otp-field-slot.d.mts +1 -3
- package/dist/otp-field/otp-field-slot.d.mts.map +1 -1
- package/dist/otp-field/otp-field-slot.mjs +2 -3
- package/dist/popover/index.d.mts +1 -3
- package/dist/popover/index.d.mts.map +1 -1
- package/dist/popover/index.mjs +1 -2
- package/dist/popover/popover-close.d.mts +10 -6
- package/dist/popover/popover-close.d.mts.map +1 -1
- package/dist/popover/popover-close.mjs +3 -3
- package/dist/popover/popover-close.mjs.map +1 -1
- package/dist/popover/popover-context.mjs +1 -2
- package/dist/popover/popover-description.d.mts +1 -3
- package/dist/popover/popover-description.d.mts.map +1 -1
- package/dist/popover/popover-description.mjs +1 -2
- package/dist/popover/popover-popup.d.mts +2 -4
- package/dist/popover/popover-popup.d.mts.map +1 -1
- package/dist/popover/popover-popup.mjs +4 -5
- package/dist/popover/popover-root.d.mts +1 -3
- package/dist/popover/popover-root.d.mts.map +1 -1
- package/dist/popover/popover-root.mjs +2 -3
- package/dist/popover/popover-title.d.mts +1 -3
- package/dist/popover/popover-title.d.mts.map +1 -1
- package/dist/popover/popover-title.mjs +1 -2
- package/dist/popover/popover-trigger.d.mts +1 -3
- package/dist/popover/popover-trigger.d.mts.map +1 -1
- package/dist/popover/popover-trigger.mjs +2 -3
- package/dist/progress/index.d.mts +1 -3
- package/dist/progress/index.d.mts.map +1 -1
- package/dist/progress/index.mjs +1 -2
- package/dist/progress/progress-context.mjs +1 -2
- package/dist/progress/progress-indicator.d.mts +1 -3
- package/dist/progress/progress-indicator.d.mts.map +1 -1
- package/dist/progress/progress-indicator.mjs +1 -2
- package/dist/progress/progress-label.d.mts +1 -3
- package/dist/progress/progress-label.d.mts.map +1 -1
- package/dist/progress/progress-label.mjs +1 -2
- package/dist/progress/progress-root.d.mts +4 -5
- package/dist/progress/progress-root.d.mts.map +1 -1
- package/dist/progress/progress-root.mjs +4 -5
- package/dist/progress/progress-root.mjs.map +1 -1
- package/dist/progress/progress-track.d.mts +1 -3
- package/dist/progress/progress-track.d.mts.map +1 -1
- package/dist/progress/progress-track.mjs +1 -2
- package/dist/progress/progress-value.d.mts +1 -3
- package/dist/progress/progress-value.d.mts.map +1 -1
- package/dist/progress/progress-value.mjs +1 -2
- package/dist/radio-group/index.d.mts +1 -3
- package/dist/radio-group/index.d.mts.map +1 -1
- package/dist/radio-group/index.mjs +1 -2
- package/dist/radio-group/radio-group-context.mjs +1 -2
- package/dist/radio-group/radio-group-item.d.mts +1 -3
- package/dist/radio-group/radio-group-item.d.mts.map +1 -1
- package/dist/radio-group/radio-group-item.mjs +3 -4
- package/dist/radio-group/radio-group-label.d.mts +1 -3
- package/dist/radio-group/radio-group-label.d.mts.map +1 -1
- package/dist/radio-group/radio-group-label.mjs +1 -2
- package/dist/radio-group/radio-group-root.d.mts +1 -3
- package/dist/radio-group/radio-group-root.d.mts.map +1 -1
- package/dist/radio-group/radio-group-root.mjs +4 -5
- package/dist/select/index.d.mts +1 -3
- package/dist/select/index.d.mts.map +1 -1
- package/dist/select/index.mjs +1 -2
- package/dist/select/select-context.mjs +1 -2
- package/dist/select/select-dom.mjs +2 -3
- package/dist/select/select-group-label.d.mts +1 -3
- package/dist/select/select-group-label.d.mts.map +1 -1
- package/dist/select/select-group-label.mjs +1 -2
- package/dist/select/select-group.d.mts +1 -3
- package/dist/select/select-group.d.mts.map +1 -1
- package/dist/select/select-group.mjs +2 -3
- package/dist/select/select-option.d.mts +1 -3
- package/dist/select/select-option.d.mts.map +1 -1
- package/dist/select/select-option.mjs +3 -4
- package/dist/select/select-root.d.mts +1 -3
- package/dist/select/select-root.d.mts.map +1 -1
- package/dist/select/select-root.mjs +6 -7
- package/dist/select/select-separator.d.mts +1 -3
- package/dist/select/select-separator.d.mts.map +1 -1
- package/dist/select/select-separator.mjs +1 -2
- package/dist/select/select-trigger.d.mts +1 -3
- package/dist/select/select-trigger.d.mts.map +1 -1
- package/dist/select/select-trigger.mjs +1 -2
- package/dist/select/select-value.d.mts +1 -3
- package/dist/select/select-value.d.mts.map +1 -1
- package/dist/select/select-value.mjs +3 -4
- package/dist/select/select-value.mjs.map +1 -1
- package/dist/separator/separator.d.mts +1 -3
- package/dist/separator/separator.d.mts.map +1 -1
- package/dist/separator/separator.mjs +1 -2
- package/dist/slider/index.d.mts +2 -4
- package/dist/slider/index.d.mts.map +1 -1
- package/dist/slider/index.mjs +1 -2
- package/dist/slider/slider-arithmetic.mjs +1 -2
- package/dist/slider/slider-context.mjs +1 -2
- package/dist/slider/slider-indicator.d.mts +1 -3
- package/dist/slider/slider-indicator.d.mts.map +1 -1
- package/dist/slider/slider-indicator.mjs +1 -2
- package/dist/slider/slider-label.d.mts +1 -3
- package/dist/slider/slider-label.d.mts.map +1 -1
- package/dist/slider/slider-label.mjs +3 -4
- package/dist/slider/slider-root.d.mts +1 -3
- package/dist/slider/slider-root.d.mts.map +1 -1
- package/dist/slider/slider-root.mjs +8 -9
- package/dist/slider/slider-thumb.d.mts +1 -3
- package/dist/slider/slider-thumb.d.mts.map +1 -1
- package/dist/slider/slider-thumb.mjs +5 -6
- package/dist/slider/slider-track.d.mts +1 -3
- package/dist/slider/slider-track.d.mts.map +1 -1
- package/dist/slider/slider-track.mjs +2 -3
- package/dist/slider/slider-value.d.mts +1 -3
- package/dist/slider/slider-value.d.mts.map +1 -1
- package/dist/slider/slider-value.mjs +1 -2
- package/dist/slider/use-slider-dev-warnings.mjs +2 -3
- package/dist/slider/use-thumb-registry.mjs +1 -2
- package/dist/switch/switch.d.mts +1 -3
- package/dist/switch/switch.d.mts.map +1 -1
- package/dist/switch/switch.mjs +2 -3
- package/dist/tabs/index.d.mts +0 -2
- package/dist/tabs/index.d.mts.map +1 -1
- package/dist/tabs/index.mjs +1 -2
- package/dist/tabs/tabs-context.d.mts +0 -2
- package/dist/tabs/tabs-context.d.mts.map +1 -1
- package/dist/tabs/tabs-context.mjs +1 -2
- package/dist/tabs/tabs-ids.mjs +1 -2
- package/dist/tabs/tabs-indicator.d.mts +1 -3
- package/dist/tabs/tabs-indicator.d.mts.map +1 -1
- package/dist/tabs/tabs-indicator.mjs +1 -2
- package/dist/tabs/tabs-list.d.mts +1 -3
- package/dist/tabs/tabs-list.d.mts.map +1 -1
- package/dist/tabs/tabs-list.mjs +4 -5
- package/dist/tabs/tabs-panel.d.mts +1 -3
- package/dist/tabs/tabs-panel.d.mts.map +1 -1
- package/dist/tabs/tabs-panel.mjs +4 -5
- package/dist/tabs/tabs-root.d.mts +1 -3
- package/dist/tabs/tabs-root.d.mts.map +1 -1
- package/dist/tabs/tabs-root.mjs +5 -6
- package/dist/tabs/tabs-tab.d.mts +1 -3
- package/dist/tabs/tabs-tab.d.mts.map +1 -1
- package/dist/tabs/tabs-tab.mjs +3 -4
- package/dist/tabs/use-until-found.mjs +1 -2
- package/dist/toast/index.d.mts +2 -4
- package/dist/toast/index.d.mts.map +1 -1
- package/dist/toast/index.mjs +2 -3
- package/dist/toast/toast-action.d.mts +1 -3
- package/dist/toast/toast-action.d.mts.map +1 -1
- package/dist/toast/toast-action.mjs +2 -3
- package/dist/toast/toast-close.d.mts +1 -3
- package/dist/toast/toast-close.d.mts.map +1 -1
- package/dist/toast/toast-close.mjs +2 -3
- package/dist/toast/toast-context.mjs +1 -2
- package/dist/toast/toast-description.d.mts +1 -3
- package/dist/toast/toast-description.d.mts.map +1 -1
- package/dist/toast/toast-description.mjs +2 -3
- package/dist/toast/toast-hotkey.mjs +1 -2
- package/dist/toast/toast-queue.mjs +1 -2
- package/dist/toast/toast-root.d.mts +1 -3
- package/dist/toast/toast-root.d.mts.map +1 -1
- package/dist/toast/toast-root.mjs +4 -5
- package/dist/toast/toast-root.mjs.map +1 -1
- package/dist/toast/toast-timers.mjs +1 -2
- package/dist/toast/toast-title.d.mts +1 -3
- package/dist/toast/toast-title.d.mts.map +1 -1
- package/dist/toast/toast-title.mjs +2 -3
- package/dist/toast/toast-viewport.d.mts +1 -3
- package/dist/toast/toast-viewport.d.mts.map +1 -1
- package/dist/toast/toast-viewport.mjs +9 -10
- package/dist/toast/toast.d.mts +1 -3
- package/dist/toast/toast.d.mts.map +1 -1
- package/dist/toast/toast.mjs +1 -2
- package/dist/toast/use-modal-portal-host.mjs +2 -3
- package/dist/toast/use-toast-announcements.mjs +2 -3
- package/dist/toast/use-toast-announcements.mjs.map +1 -1
- package/dist/toast/use-toast-focus.mjs +2 -3
- package/dist/toast/use-toast-pauses.mjs +2 -3
- package/dist/toggle/toggle.d.mts +1 -3
- package/dist/toggle/toggle.d.mts.map +1 -1
- package/dist/toggle/toggle.mjs +3 -4
- package/dist/toggle-group/index.d.mts +0 -2
- package/dist/toggle-group/index.d.mts.map +1 -1
- package/dist/toggle-group/index.mjs +1 -2
- package/dist/toggle-group/toggle-group-context.d.mts +0 -2
- package/dist/toggle-group/toggle-group-context.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-context.mjs +1 -2
- package/dist/toggle-group/toggle-group-item.d.mts +1 -3
- package/dist/toggle-group/toggle-group-item.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-item.mjs +2 -3
- package/dist/toggle-group/toggle-group-root.d.mts +1 -3
- package/dist/toggle-group/toggle-group-root.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-root.mjs +8 -9
- package/dist/toolbar/index.d.mts +0 -2
- package/dist/toolbar/index.d.mts.map +1 -1
- package/dist/toolbar/index.mjs +1 -2
- package/dist/toolbar/toolbar-root.d.mts +1 -3
- package/dist/toolbar/toolbar-root.d.mts.map +1 -1
- package/dist/toolbar/toolbar-root.mjs +3 -4
- package/dist/toolbar/toolbar-separator.d.mts +1 -3
- package/dist/toolbar/toolbar-separator.d.mts.map +1 -1
- package/dist/toolbar/toolbar-separator.mjs +1 -2
- package/dist/tooltip/index.d.mts +0 -2
- package/dist/tooltip/index.d.mts.map +1 -1
- package/dist/tooltip/index.mjs +1 -2
- package/dist/tooltip/tooltip-arrow.d.mts +1 -3
- package/dist/tooltip/tooltip-arrow.d.mts.map +1 -1
- package/dist/tooltip/tooltip-arrow.mjs +2 -3
- package/dist/tooltip/tooltip-context.d.mts +0 -2
- package/dist/tooltip/tooltip-context.d.mts.map +1 -1
- package/dist/tooltip/tooltip-context.mjs +1 -2
- package/dist/tooltip/tooltip-popup.d.mts +1 -3
- package/dist/tooltip/tooltip-popup.d.mts.map +1 -1
- package/dist/tooltip/tooltip-popup.mjs +4 -5
- package/dist/tooltip/tooltip-root.d.mts +1 -3
- package/dist/tooltip/tooltip-root.d.mts.map +1 -1
- package/dist/tooltip/tooltip-root.mjs +2 -3
- package/dist/tooltip/tooltip-trigger.d.mts +1 -3
- package/dist/tooltip/tooltip-trigger.d.mts.map +1 -1
- package/dist/tooltip/tooltip-trigger.mjs +6 -7
- package/dist/tooltip/tooltip-warm.mjs +1 -2
- package/dist/tooltip/use-tooltip-interaction.mjs +2 -3
- package/package.json +11 -8
- package/skills/funstack-ui-knowledge/SKILL.md +5 -2
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { listenInvokerPresses } from "../internal/overlay/invokers.mjs";
|
|
4
|
+
import { resolveStateValue } from "../internal/render-element.mjs";
|
|
5
|
+
import { useJsFreePropWarnings } from "../internal/overlay/overlay-popup.mjs";
|
|
6
|
+
import { usePopoverPopup } from "../internal/overlay/use-popover-popup.mjs";
|
|
7
|
+
import { useAnchoredPlacement } from "../internal/overlay/use-resolved-placement.mjs";
|
|
8
|
+
import { useTransitionBoundary } from "../internal/transition-boundary.mjs";
|
|
9
|
+
import { useElementCheck } from "../internal/use-element-check.mjs";
|
|
10
|
+
import { useMergedRefs } from "../internal/use-merged-refs.mjs";
|
|
11
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
12
|
+
import { NavigationMenuPopupContext, useNavigationMenuItemContext } from "./navigation-menu-context.mjs";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
// src/navigation-menu/navigation-menu-popup.tsx
|
|
15
|
+
const isDev = process.env.NODE_ENV !== "production";
|
|
16
|
+
/** The panel is a `<div>` (design 1). */
|
|
17
|
+
const POPUP_ELEMENTS = ["DIV"];
|
|
18
|
+
/**
|
|
19
|
+
* The panel: a `<div popover="auto">` with no role (the disclosure pattern), placed against the
|
|
20
|
+
* Trigger with CSS Anchor Positioning. Render it **immediately after** the Trigger in the same
|
|
21
|
+
* Item: every engine then puts the panel's links right after the Trigger in the Tab order
|
|
22
|
+
* (development warning otherwise). Sibling `auto` popovers close each other, so one panel is
|
|
23
|
+
* open at a time.
|
|
24
|
+
*
|
|
25
|
+
* JS-free mode: the children are always mounted (in the server HTML). Library mode: they render
|
|
26
|
+
* from committed state, so content that suspends holds the open with `data-pending` on the
|
|
27
|
+
* Trigger; `showPopover({ source: trigger })` runs in the commit that mounted them. Style it with
|
|
28
|
+
* `:popover-open`; it emits `data-side` / `data-align` but no `data-open`.
|
|
29
|
+
*
|
|
30
|
+
* Owned keys (conventions 1.2): `id`, `popover`, and `data-side` / `data-align` unless `side` is
|
|
31
|
+
* `null`.
|
|
32
|
+
*
|
|
33
|
+
* @see https://ui.funstack.work/components/navigation-menu
|
|
34
|
+
*/
|
|
35
|
+
function NavigationMenuPopup({ side: sideProp = "bottom", align: alignProp = "start", keepMounted, transition, className, style, children, render, ...rest }) {
|
|
36
|
+
const ctx = useNavigationMenuItemContext("NavigationMenu.Popup");
|
|
37
|
+
const isLibrary = ctx.mode === "library";
|
|
38
|
+
const { ids, popupRef, triggerRef } = ctx;
|
|
39
|
+
useJsFreePropWarnings("NavigationMenu.Popup", "panel", isLibrary, transition, keepMounted);
|
|
40
|
+
const { setElement, renderContent } = usePopoverPopup(ctx, {
|
|
41
|
+
part: "NavigationMenu.Popup",
|
|
42
|
+
keepMounted,
|
|
43
|
+
transition: isLibrary ? transition : void 0,
|
|
44
|
+
elements: POPUP_ELEMENTS,
|
|
45
|
+
whileShown: listenInvokerPresses
|
|
46
|
+
});
|
|
47
|
+
const checkSecond = useElementCheck(isDev && ((element) => popupRef.current !== null && popupRef.current !== element ? "NavigationMenu.Popup: a second NavigationMenu.Popup mounted in the same Item. An Item has one Trigger and one Popup; give each panel its own NavigationMenu.Item." : null));
|
|
48
|
+
const self = useRef(null);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (!isDev) return;
|
|
51
|
+
const element = self.current;
|
|
52
|
+
const trigger = triggerRef.current;
|
|
53
|
+
if (element === null || trigger === null || element.previousElementSibling === trigger) return;
|
|
54
|
+
console.error("NavigationMenu.Popup: the Popup does not directly follow its NavigationMenu.Trigger. Render the Popup immediately after the Trigger: Safari puts a popover's content after its invoker in the Tab order only when the two are adjacent.");
|
|
55
|
+
}, [triggerRef]);
|
|
56
|
+
const placement = useAnchoredPlacement({
|
|
57
|
+
side: sideProp,
|
|
58
|
+
align: alignProp
|
|
59
|
+
});
|
|
60
|
+
const { side, align } = placement;
|
|
61
|
+
const ref = useMergedRefs(checkSecond, setElement, placement.ref, self);
|
|
62
|
+
const state = {
|
|
63
|
+
open: ctx.committed,
|
|
64
|
+
side,
|
|
65
|
+
align
|
|
66
|
+
};
|
|
67
|
+
const content = (s) => /* @__PURE__ */ jsx(NavigationMenuPopupContext, {
|
|
68
|
+
value: ctx,
|
|
69
|
+
children: renderContent(() => resolveStateValue(children, s))
|
|
70
|
+
});
|
|
71
|
+
const libraryProps = {
|
|
72
|
+
id: ids.popup,
|
|
73
|
+
popover: "auto",
|
|
74
|
+
...placement.dataAttributes
|
|
75
|
+
};
|
|
76
|
+
const element = useRender({
|
|
77
|
+
defaultElement: "div",
|
|
78
|
+
render,
|
|
79
|
+
state,
|
|
80
|
+
className,
|
|
81
|
+
style: placement.style(style),
|
|
82
|
+
children: content,
|
|
83
|
+
props: rest,
|
|
84
|
+
libraryProps,
|
|
85
|
+
ref
|
|
86
|
+
});
|
|
87
|
+
return useTransitionBoundary("NavigationMenu.Popup", isLibrary ? transition : void 0, element);
|
|
88
|
+
}
|
|
89
|
+
NavigationMenuPopup.displayName = "NavigationMenuPopup";
|
|
90
|
+
export { NavigationMenuPopup };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=navigation-menu-popup.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu-popup.mjs","names":[],"sources":["../../src/navigation-menu/navigation-menu-popup.tsx"],"sourcesContent":["\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode, ViewTransitionClass } from \"react\";\nimport type { AnchorAlign, AnchorSide } from \"../internal/overlay/anchor-position.js\";\nimport { listenInvokerPresses } from \"../internal/overlay/invokers.js\";\nimport { useJsFreePropWarnings } from \"../internal/overlay/overlay-popup.js\";\nimport { usePopoverPopup } from \"../internal/overlay/use-popover-popup.js\";\nimport { useAnchoredPlacement } from \"../internal/overlay/use-resolved-placement.js\";\nimport { useTransitionBoundary } from \"../internal/transition-boundary.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useElementCheck } from \"../internal/use-element-check.js\";\nimport { useMergedRefs } from \"../internal/use-merged-refs.js\";\nimport { resolveStateValue, useRender } from \"../internal/use-render.js\";\nimport type { DataAttributes } from \"../internal/use-render.js\";\nimport {\n NavigationMenuPopupContext,\n useNavigationMenuItemContext,\n} from \"./navigation-menu-context.js\";\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\n/** `inline-start` / `inline-end` follow the panel's `direction` (conventions 13.1). */\nexport type NavigationMenuSide = AnchorSide;\n/**\n * Alignment of the panel along its side: inline-relative on a top / bottom side, the top /\n * bottom edges on the others.\n */\nexport type NavigationMenuAlign = AnchorAlign;\n\n/**\n * State of `NavigationMenu.Popup`, passed to the function forms of `className`, `style`,\n * `children` and `render`.\n */\nexport interface NavigationMenuPopupState {\n /**\n * Committed open state (library mode); `false` in JS-free mode. Read `:popover-open` for the\n * DOM truth.\n */\n readonly open: boolean;\n /**\n * While shown: the physical side the browser placed the panel on (after any fallback flip;\n * conventions 13.2). Otherwise the `side` prop. `null` with `side={null}`.\n */\n readonly side: NavigationMenuSide | null;\n /** While shown: the resolved alignment; otherwise the `align` prop. */\n readonly align: NavigationMenuAlign;\n}\n\n/**\n * Props of `NavigationMenu.Popup`.\n *\n * @see https://ui.funstack.work/components/navigation-menu\n */\nexport interface NavigationMenuPopupProps extends Omit<\n ComponentPropsWithRef<\"div\">,\n \"id\" | \"popover\" | \"onToggle\" | \"onBeforeToggle\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * Placement relative to the Trigger through inline `position-area`, with\n * `position-try-fallbacks` flipping it when it does not fit. `null` emits no inline positioning\n * (and no `data-side` / `data-align`), so a stylesheet owns placement (a full-width panel).\n *\n * @defaultValue `\"bottom\"`\n */\n side?: NavigationMenuSide | null;\n /**\n * Alignment along the side. On a top / bottom side `start` / `end` are inline-relative\n * (mirrored under `direction: rtl`). Ignored when `side` is `null`.\n *\n * @defaultValue `\"start\"`\n */\n align?: NavigationMenuAlign;\n /**\n * Library mode: what happens to the children while the panel is closed.\n * - `false` (default): not rendered. Mounting them is part of the opening transition, so\n * content that suspends holds the open (the Trigger is `data-pending`) until it is ready.\n * - `true`: rendered inside `<Activity mode=\"hidden\">`: DOM and state preserved, effects\n * stopped. Not in the server HTML.\n *\n * Ignored in JS-free mode (always mounted, in the server HTML).\n *\n * @defaultValue `false`\n */\n keepMounted?: boolean;\n /**\n * Library mode only. Forwarded to the `<ViewTransition default>` around the popover element.\n * Animates library-driven opens and closes (the Trigger, a followed Link, controlled changes);\n * dismissals animate with CSS only. Ignored (dev warning) in JS-free mode.\n *\n * Static: setting or unsetting it remounts the element.\n */\n transition?: ViewTransitionClass;\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, NavigationMenuPopupState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, NavigationMenuPopupState>;\n /** The panel's links, or a function of the part's state. Library mode: may suspend. */\n children?: StateValue<ReactNode, NavigationMenuPopupState>;\n /** Replace the default `<div>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"div\">, NavigationMenuPopupState>;\n}\n\n/** The panel is a `<div>` (design 1). */\nconst POPUP_ELEMENTS: readonly string[] = [\"DIV\"];\n\n/**\n * The panel: a `<div popover=\"auto\">` with no role (the disclosure pattern), placed against the\n * Trigger with CSS Anchor Positioning. Render it **immediately after** the Trigger in the same\n * Item: every engine then puts the panel's links right after the Trigger in the Tab order\n * (development warning otherwise). Sibling `auto` popovers close each other, so one panel is\n * open at a time.\n *\n * JS-free mode: the children are always mounted (in the server HTML). Library mode: they render\n * from committed state, so content that suspends holds the open with `data-pending` on the\n * Trigger; `showPopover({ source: trigger })` runs in the commit that mounted them. Style it with\n * `:popover-open`; it emits `data-side` / `data-align` but no `data-open`.\n *\n * Owned keys (conventions 1.2): `id`, `popover`, and `data-side` / `data-align` unless `side` is\n * `null`.\n *\n * @see https://ui.funstack.work/components/navigation-menu\n */\nexport function NavigationMenuPopup({\n side: sideProp = \"bottom\",\n align: alignProp = \"start\",\n keepMounted,\n transition,\n className,\n style,\n children,\n render,\n ...rest\n}: NavigationMenuPopupProps) {\n const ctx = useNavigationMenuItemContext(\"NavigationMenu.Popup\");\n const isLibrary = ctx.mode === \"library\";\n const { ids, popupRef, triggerRef } = ctx;\n\n useJsFreePropWarnings(\"NavigationMenu.Popup\", \"panel\", isLibrary, transition, keepMounted);\n\n const { setElement, renderContent } = usePopoverPopup(ctx, {\n part: \"NavigationMenu.Popup\",\n keepMounted,\n transition: isLibrary ? transition : undefined,\n elements: POPUP_ELEMENTS,\n // While shown, a primary press on any `popovertarget` / `commandfor` invoker of the panel\n // moves no focus: a foreign one outside the Item (the focus-leave close would otherwise hide\n // the panel before the invoker's own toggle), and the panel's own Trigger as well. The latter\n // is harmless and intended: focus is already inside the Item, and the hide returns it.\n whileShown: listenInvokerPresses,\n });\n\n // Development checks (design 7): one Popup per Item, directly after its Trigger. Runs before\n // `setElement`, which registers this element.\n const checkSecond = useElementCheck(\n isDev &&\n ((element) =>\n popupRef.current !== null && popupRef.current !== element\n ? \"NavigationMenu.Popup: a second NavigationMenu.Popup mounted in the same Item. An \" +\n \"Item has one Trigger and one Popup; give each panel its own NavigationMenu.Item.\"\n : null),\n );\n const self = useRef<HTMLElement | null>(null);\n useEffect(() => {\n if (!isDev) return;\n const element = self.current;\n const trigger = triggerRef.current;\n if (element === null || trigger === null || element.previousElementSibling === trigger) return;\n console.error(\n \"NavigationMenu.Popup: the Popup does not directly follow its NavigationMenu.Trigger. \" +\n \"Render the Popup immediately after the Trigger: Safari puts a popover's content after \" +\n \"its invoker in the Tab order only when the two are adjacent.\",\n );\n }, [triggerRef]);\n\n const placement = useAnchoredPlacement({ side: sideProp, align: alignProp });\n const { side, align } = placement;\n const ref = useMergedRefs<HTMLElement>(checkSecond, setElement, placement.ref, self);\n\n const state: NavigationMenuPopupState = { open: ctx.committed, side, align };\n\n const content = (s: NavigationMenuPopupState): ReactNode => (\n <NavigationMenuPopupContext value={ctx}>\n {renderContent(() => resolveStateValue(children, s))}\n </NavigationMenuPopupContext>\n );\n\n const libraryProps: ComponentPropsWithRef<\"div\"> & DataAttributes = {\n id: ids.popup,\n popover: \"auto\",\n // Not owned with `side={null}`: the stylesheet (or a render element) may set them.\n ...placement.dataAttributes,\n };\n\n const element = useRender<ComponentPropsWithRef<\"div\">, NavigationMenuPopupState>({\n defaultElement: \"div\",\n render,\n state,\n className,\n // The consumer's style wins over the inline placement.\n style: placement.style(style),\n children: content,\n props: rest,\n libraryProps,\n ref,\n });\n\n return useTransitionBoundary(\"NavigationMenu.Popup\", isLibrary ? transition : undefined, element);\n}\n\nNavigationMenuPopup.displayName = \"NavigationMenuPopup\";\n"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAM,QAAQ,QAAQ,IAAI,aAAa;;AAoFvC,MAAM,iBAAoC,CAAC,KAAK;;;;;;;;;;;;;;;;;;AAmBhD,SAAgB,oBAAoB,EAClC,MAAM,WAAW,UACjB,OAAO,YAAY,SACnB,aACA,YACA,WACA,OACA,UACA,QACA,GAAG,QACwB;CAC3B,MAAM,MAAM,6BAA6B,sBAAsB;CAC/D,MAAM,YAAY,IAAI,SAAS;CAC/B,MAAM,EAAE,KAAK,UAAU,eAAe;CAEtC,sBAAsB,wBAAwB,SAAS,WAAW,YAAY,WAAW;CAEzF,MAAM,EAAE,YAAY,kBAAkB,gBAAgB,KAAK;EACzD,MAAM;EACN;EACA,YAAY,YAAY,aAAa,KAAA;EACrC,UAAU;EAKV,YAAY;CACd,CAAC;CAID,MAAM,cAAc,gBAClB,WACI,YACA,SAAS,YAAY,QAAQ,SAAS,YAAY,UAC9C,sKAEA,KACV;CACA,MAAM,OAAO,OAA2B,IAAI;CAC5C,gBAAgB;EACd,IAAI,CAAC,OAAO;EACZ,MAAM,UAAU,KAAK;EACrB,MAAM,UAAU,WAAW;EAC3B,IAAI,YAAY,QAAQ,YAAY,QAAQ,QAAQ,2BAA2B,SAAS;EACxF,QAAQ,MACN,yOAGF;CACF,GAAG,CAAC,UAAU,CAAC;CAEf,MAAM,YAAY,qBAAqB;EAAE,MAAM;EAAU,OAAO;CAAU,CAAC;CAC3E,MAAM,EAAE,MAAM,UAAU;CACxB,MAAM,MAAM,cAA2B,aAAa,YAAY,UAAU,KAAK,IAAI;CAEnF,MAAM,QAAkC;EAAE,MAAM,IAAI;EAAW;EAAM;CAAM;CAE3E,MAAM,WAAW,MACf,oBAAC,4BAAD;EAA4B,OAAO;EAChC,UAAA,oBAAoB,kBAAkB,UAAU,CAAC,CAAC;CACzB,CAAA;CAG9B,MAAM,eAA8D;EAClE,IAAI,IAAI;EACR,SAAS;EAET,GAAG,UAAU;CACf;CAEA,MAAM,UAAU,UAAkE;EAChF,gBAAgB;EAChB;EACA;EACA;EAEA,OAAO,UAAU,MAAM,KAAK;EAC5B,UAAU;EACV,OAAO;EACP;EACA;CACF,CAAC;CAED,OAAO,sBAAsB,wBAAwB,YAAY,aAAa,KAAA,GAAW,OAAO;AAClG;AAEA,oBAAoB,cAAc"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
3
|
+
/** `NavigationMenu.Root` has no state. */
|
|
4
|
+
export type NavigationMenuRootState = Record<string, never>;
|
|
5
|
+
/**
|
|
6
|
+
* Props of `NavigationMenu.Root`.
|
|
7
|
+
*
|
|
8
|
+
* @see https://ui.funstack.work/components/navigation-menu
|
|
9
|
+
*/
|
|
10
|
+
export interface NavigationMenuRootProps extends Omit<ComponentPropsWithRef<"nav">, "className" | "style" | "children"> {
|
|
11
|
+
/** Class name, or a function of the part's state that returns one. */
|
|
12
|
+
className?: StateValue<string | undefined, NavigationMenuRootState>;
|
|
13
|
+
/** Inline style, or a function of the part's state that returns one. */
|
|
14
|
+
style?: StateValue<CSSProperties | undefined, NavigationMenuRootState>;
|
|
15
|
+
/** Content: a `NavigationMenu.List`. */
|
|
16
|
+
children?: StateValue<ReactNode, NavigationMenuRootState>;
|
|
17
|
+
/** Replace the default `<nav>` (element form) or take over rendering (function form). */
|
|
18
|
+
render?: RenderProp<ComponentPropsWithRef<"nav">, NavigationMenuRootState>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The navigation landmark: a `<nav>`. Structure only, with no state and no owned keys. Name it
|
|
22
|
+
* with `aria-label` (or `aria-labelledby`) when the page has more than one `nav`.
|
|
23
|
+
* Directive-free, so a Server Component may render it.
|
|
24
|
+
*
|
|
25
|
+
* @see https://ui.funstack.work/components/navigation-menu
|
|
26
|
+
*/
|
|
27
|
+
export declare function NavigationMenuRoot({ className, style, children, render, ref, ...rest }: NavigationMenuRootProps): ReactNode;
|
|
28
|
+
export declare namespace NavigationMenuRoot {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=navigation-menu-root.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu-root.d.mts","names":[],"sources":["../../src/navigation-menu/navigation-menu-root.tsx"],"mappings":";;;YAQY,0BAA0B;;;;;;iBASrB,gCAAgC,KAC/C;;EAIA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,8BAA8B;;;;;;;;;wBAUpC,qBACd,WACA,OACA,UACA,QACA,QACG,QACF,0BAAuB;yBAPV"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { mergeRenderRef, renderElement } from "../internal/render-element.mjs";
|
|
2
|
+
// src/navigation-menu/navigation-menu-root.tsx
|
|
3
|
+
const EMPTY = {};
|
|
4
|
+
/**
|
|
5
|
+
* The navigation landmark: a `<nav>`. Structure only, with no state and no owned keys. Name it
|
|
6
|
+
* with `aria-label` (or `aria-labelledby`) when the page has more than one `nav`.
|
|
7
|
+
* Directive-free, so a Server Component may render it.
|
|
8
|
+
*
|
|
9
|
+
* @see https://ui.funstack.work/components/navigation-menu
|
|
10
|
+
*/
|
|
11
|
+
function NavigationMenuRoot({ className, style, children, render, ref, ...rest }) {
|
|
12
|
+
return renderElement({
|
|
13
|
+
defaultElement: "nav",
|
|
14
|
+
render,
|
|
15
|
+
state: EMPTY,
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
props: rest,
|
|
20
|
+
ref: mergeRenderRef(ref, render)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
NavigationMenuRoot.displayName = "NavigationMenuRoot";
|
|
24
|
+
export { NavigationMenuRoot };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=navigation-menu-root.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu-root.mjs","names":[],"sources":["../../src/navigation-menu/navigation-menu-root.tsx"],"sourcesContent":["// No \"use client\": `NavigationMenu.Root` reads no context and calls no hook, so a Server\n// Component may render it and it runs once, on the server (design/components/navigation-menu.md\n// 8). It must not import from any \"use client\" module (checked by src/__tests__/directives.test.ts).\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { mergeRenderRef, renderElement } from \"../internal/render-element.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\n\n/** `NavigationMenu.Root` has no state. */\nexport type NavigationMenuRootState = Record<string, never>;\n\nconst EMPTY: Record<string, never> = {};\n\n/**\n * Props of `NavigationMenu.Root`.\n *\n * @see https://ui.funstack.work/components/navigation-menu\n */\nexport interface NavigationMenuRootProps extends Omit<\n ComponentPropsWithRef<\"nav\">,\n \"className\" | \"style\" | \"children\"\n> {\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, NavigationMenuRootState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, NavigationMenuRootState>;\n /** Content: a `NavigationMenu.List`. */\n children?: StateValue<ReactNode, NavigationMenuRootState>;\n /** Replace the default `<nav>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"nav\">, NavigationMenuRootState>;\n}\n\n/**\n * The navigation landmark: a `<nav>`. Structure only, with no state and no owned keys. Name it\n * with `aria-label` (or `aria-labelledby`) when the page has more than one `nav`.\n * Directive-free, so a Server Component may render it.\n *\n * @see https://ui.funstack.work/components/navigation-menu\n */\nexport function NavigationMenuRoot({\n className,\n style,\n children,\n render,\n ref,\n ...rest\n}: NavigationMenuRootProps) {\n return renderElement<ComponentPropsWithRef<\"nav\">, NavigationMenuRootState>({\n defaultElement: \"nav\",\n render,\n state: EMPTY,\n className,\n style,\n children,\n props: rest,\n // Passed through to the element, never read during render.\n // oxlint-disable-next-line react/refs\n ref: mergeRenderRef(ref, render),\n });\n}\n\nNavigationMenuRoot.displayName = \"NavigationMenuRoot\";\n"],"mappings":";;AAUA,MAAM,QAA+B,CAAC;;;;;;;;AA4BtC,SAAgB,mBAAmB,EACjC,WACA,OACA,UACA,QACA,KACA,GAAG,QACuB;CAC1B,OAAO,cAAqE;EAC1E,gBAAgB;EAChB;EACA,OAAO;EACP;EACA;EACA;EACA,OAAO;EAGP,KAAK,eAAe,KAAK,MAAM;CACjC,CAAC;AACH;AAEA,mBAAmB,cAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PopoverTriggerProps, PopoverTriggerState } from "../popover/popover-trigger.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* State of `NavigationMenu.Trigger`: Popover.Trigger's (design 6), passed to the function forms
|
|
4
|
+
* of `className`, `style`, `children` and `render`.
|
|
5
|
+
*/
|
|
6
|
+
export type NavigationMenuTriggerState = PopoverTriggerState;
|
|
7
|
+
/**
|
|
8
|
+
* Props of `NavigationMenu.Trigger`: Popover.Trigger's, unchanged (design 6).
|
|
9
|
+
*
|
|
10
|
+
* @see https://ui.funstack.work/components/navigation-menu
|
|
11
|
+
*/
|
|
12
|
+
export type NavigationMenuTriggerProps = PopoverTriggerProps;
|
|
13
|
+
/**
|
|
14
|
+
* The toggle of one panel: `<button type="button" popovertarget>` with no `aria-expanded` (the
|
|
15
|
+
* browser exposes the popover's state on its invoker). Opens on a click (Enter, Space); never on
|
|
16
|
+
* hover. In JS-free mode the browser toggles the panel and the Popup keeps `data-open` current;
|
|
17
|
+
* in library mode the click is cancelled and dispatched through the Item's transition, with
|
|
18
|
+
* optimistic `data-open` and `data-pending` until the change has landed.
|
|
19
|
+
*
|
|
20
|
+
* Owned keys (conventions 1.2): Popover.Trigger's: `type`, `disabled`, `popoverTarget`,
|
|
21
|
+
* `aria-expanded`, `onClick` (library mode), `data-open`, `data-pending`, `data-disabled`;
|
|
22
|
+
* `commandfor`, `command` and `popoverTargetAction` reserved.
|
|
23
|
+
*
|
|
24
|
+
* @see https://ui.funstack.work/components/navigation-menu
|
|
25
|
+
*/
|
|
26
|
+
export declare function NavigationMenuTrigger({ disabled, className, style, children, render, ...rest }: NavigationMenuTriggerProps): import("react").ReactNode;
|
|
27
|
+
export declare namespace NavigationMenuTrigger {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=navigation-menu-trigger.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu-trigger.d.mts","names":[],"sources":["../../src/navigation-menu/navigation-menu-trigger.tsx"],"mappings":";;;;;YAWY,6BAA6B;;;;;;YAO7B,6BAA6B;;;;;;;;;;;;;;wBAezB,wBACd,UACA,WACA,OACA,UACA,WACG,QACF,6CAA0B;yBAPb"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { usePopoverTrigger } from "../internal/overlay/use-popover-trigger.mjs";
|
|
3
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
4
|
+
import { useNavigationMenuItemContext } from "./navigation-menu-context.mjs";
|
|
5
|
+
// src/navigation-menu/navigation-menu-trigger.tsx
|
|
6
|
+
/**
|
|
7
|
+
* The toggle of one panel: `<button type="button" popovertarget>` with no `aria-expanded` (the
|
|
8
|
+
* browser exposes the popover's state on its invoker). Opens on a click (Enter, Space); never on
|
|
9
|
+
* hover. In JS-free mode the browser toggles the panel and the Popup keeps `data-open` current;
|
|
10
|
+
* in library mode the click is cancelled and dispatched through the Item's transition, with
|
|
11
|
+
* optimistic `data-open` and `data-pending` until the change has landed.
|
|
12
|
+
*
|
|
13
|
+
* Owned keys (conventions 1.2): Popover.Trigger's: `type`, `disabled`, `popoverTarget`,
|
|
14
|
+
* `aria-expanded`, `onClick` (library mode), `data-open`, `data-pending`, `data-disabled`;
|
|
15
|
+
* `commandfor`, `command` and `popoverTargetAction` reserved.
|
|
16
|
+
*
|
|
17
|
+
* @see https://ui.funstack.work/components/navigation-menu
|
|
18
|
+
*/
|
|
19
|
+
function NavigationMenuTrigger({ disabled = false, className, style, children, render, ...rest }) {
|
|
20
|
+
const ctx = useNavigationMenuItemContext("NavigationMenu.Trigger");
|
|
21
|
+
const { state, libraryProps, ref } = usePopoverTrigger(ctx, {
|
|
22
|
+
part: "NavigationMenu.Trigger",
|
|
23
|
+
disabled,
|
|
24
|
+
render
|
|
25
|
+
});
|
|
26
|
+
return useRender({
|
|
27
|
+
defaultElement: "button",
|
|
28
|
+
render,
|
|
29
|
+
state,
|
|
30
|
+
className,
|
|
31
|
+
style,
|
|
32
|
+
children,
|
|
33
|
+
props: rest,
|
|
34
|
+
libraryProps,
|
|
35
|
+
ref
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
39
|
+
export { NavigationMenuTrigger };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=navigation-menu-trigger.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu-trigger.mjs","names":[],"sources":["../../src/navigation-menu/navigation-menu-trigger.tsx"],"sourcesContent":["\"use client\";\nimport type { ComponentPropsWithRef } from \"react\";\nimport { usePopoverTrigger } from \"../internal/overlay/use-popover-trigger.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport type { PopoverTriggerProps, PopoverTriggerState } from \"../popover/popover-trigger.js\";\nimport { useNavigationMenuItemContext } from \"./navigation-menu-context.js\";\n\n/**\n * State of `NavigationMenu.Trigger`: Popover.Trigger's (design 6), passed to the function forms\n * of `className`, `style`, `children` and `render`.\n */\nexport type NavigationMenuTriggerState = PopoverTriggerState;\n\n/**\n * Props of `NavigationMenu.Trigger`: Popover.Trigger's, unchanged (design 6).\n *\n * @see https://ui.funstack.work/components/navigation-menu\n */\nexport type NavigationMenuTriggerProps = PopoverTriggerProps;\n\n/**\n * The toggle of one panel: `<button type=\"button\" popovertarget>` with no `aria-expanded` (the\n * browser exposes the popover's state on its invoker). Opens on a click (Enter, Space); never on\n * hover. In JS-free mode the browser toggles the panel and the Popup keeps `data-open` current;\n * in library mode the click is cancelled and dispatched through the Item's transition, with\n * optimistic `data-open` and `data-pending` until the change has landed.\n *\n * Owned keys (conventions 1.2): Popover.Trigger's: `type`, `disabled`, `popoverTarget`,\n * `aria-expanded`, `onClick` (library mode), `data-open`, `data-pending`, `data-disabled`;\n * `commandfor`, `command` and `popoverTargetAction` reserved.\n *\n * @see https://ui.funstack.work/components/navigation-menu\n */\nexport function NavigationMenuTrigger({\n disabled = false,\n className,\n style,\n children,\n render,\n ...rest\n}: NavigationMenuTriggerProps) {\n const ctx = useNavigationMenuItemContext(\"NavigationMenu.Trigger\");\n const { state, libraryProps, ref } = usePopoverTrigger(ctx, {\n part: \"NavigationMenu.Trigger\",\n disabled,\n render,\n });\n\n return useRender<ComponentPropsWithRef<\"button\">, NavigationMenuTriggerState>({\n defaultElement: \"button\",\n render,\n state,\n className,\n style,\n children,\n props: rest,\n libraryProps,\n ref,\n });\n}\n\nNavigationMenuTrigger.displayName = \"NavigationMenuTrigger\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiCA,SAAgB,sBAAsB,EACpC,WAAW,OACX,WACA,OACA,UACA,QACA,GAAG,QAC0B;CAC7B,MAAM,MAAM,6BAA6B,wBAAwB;CACjE,MAAM,EAAE,OAAO,cAAc,QAAQ,kBAAkB,KAAK;EAC1D,MAAM;EACN;EACA;CACF,CAAC;CAED,OAAO,UAAuE;EAC5E,gBAAgB;EAChB;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;CACF,CAAC;AACH;AAEA,sBAAsB,cAAc"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import "../internal/platform-attributes.mjs";
|
|
2
|
-
import { NumberFieldRoot, NumberFieldRootProps, NumberFieldState, NumberFieldValueChangeDetails } from "./number-field-root.mjs";
|
|
3
|
-
import { NumberFieldButtonState, NumberFieldDecrementProps, NumberFieldIncrementProps } from "./use-step-button.mjs";
|
|
4
2
|
import { NumberFieldDecrement } from "./number-field-decrement.mjs";
|
|
5
3
|
import { NumberFieldIncrement } from "./number-field-increment.mjs";
|
|
6
4
|
import { NumberFieldInput, NumberFieldInputProps } from "./number-field-input.mjs";
|
|
7
5
|
import { NumberFieldLabel, NumberFieldLabelProps } from "./number-field-label.mjs";
|
|
8
|
-
|
|
6
|
+
import { NumberFieldRoot, NumberFieldRootProps, NumberFieldState, NumberFieldValueChangeDetails } from "./number-field-root.mjs";
|
|
7
|
+
import { NumberFieldButtonState, NumberFieldDecrementProps, NumberFieldIncrementProps } from "./use-step-button.mjs";
|
|
9
8
|
/**
|
|
10
9
|
* NumberField: a text field that holds a number. `Root` (`div[role=group]`, owns the state),
|
|
11
10
|
* `Label`, `Input` (the visible `input[type=text]` plus a visually hidden native
|
|
@@ -24,6 +23,5 @@ export declare const NumberField: {
|
|
|
24
23
|
readonly Increment: typeof NumberFieldIncrement;
|
|
25
24
|
readonly Decrement: typeof NumberFieldDecrement;
|
|
26
25
|
};
|
|
27
|
-
//#endregion
|
|
28
26
|
export type { NumberFieldButtonState, NumberFieldDecrementProps, NumberFieldIncrementProps, NumberFieldInputProps, NumberFieldLabelProps, NumberFieldRootProps, NumberFieldState, NumberFieldValueChangeDetails };
|
|
29
27
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/number-field/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/number-field/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAoBa;WACX,aAAI;WACJ,cAAK;WACL,cAAK;WACL,kBAAS;WACT,kBAAS"}
|
|
@@ -3,7 +3,7 @@ import { NumberFieldIncrement } from "./number-field-increment.mjs";
|
|
|
3
3
|
import { NumberFieldInput } from "./number-field-input.mjs";
|
|
4
4
|
import { NumberFieldLabel } from "./number-field-label.mjs";
|
|
5
5
|
import { NumberFieldRoot } from "./number-field-root.mjs";
|
|
6
|
-
|
|
6
|
+
// src/number-field/index.ts
|
|
7
7
|
/**
|
|
8
8
|
* NumberField: a text field that holds a number. `Root` (`div[role=group]`, owns the state),
|
|
9
9
|
* `Label`, `Input` (the visible `input[type=text]` plus a visually hidden native
|
|
@@ -22,7 +22,6 @@ const NumberField = {
|
|
|
22
22
|
Increment: NumberFieldIncrement,
|
|
23
23
|
Decrement: NumberFieldDecrement
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { NumberField };
|
|
27
26
|
|
|
28
27
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EPSILON, gridDecimals, roundTo } from "../internal/decimal.mjs";
|
|
2
|
-
|
|
2
|
+
// src/number-field/number-field-arithmetic.ts
|
|
3
3
|
function decimalsFor(bounds) {
|
|
4
4
|
return gridDecimals(bounds.step, bounds.min ?? 0);
|
|
5
5
|
}
|
|
@@ -91,7 +91,6 @@ function keyStep(key, shiftKey, bounds, largeStep) {
|
|
|
91
91
|
default: return null;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
//#endregion
|
|
95
94
|
export { boundValue, isAtBound, keyStep, stepBy, stepValue };
|
|
96
95
|
|
|
97
96
|
//# sourceMappingURL=number-field-arithmetic.mjs.map
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
+
import "react";
|
|
1
2
|
import "./number-field-root.mjs";
|
|
2
|
-
import { RefObject } from "react";
|
|
3
|
-
//#region src/number-field/number-field-context.d.ts
|
|
4
3
|
/** What produced a step or a commit (`details.source`). */
|
|
5
4
|
export type NumberFieldSource = "input" | "increment" | "decrement" | "keyboard" | "wheel" | null;
|
|
6
|
-
//#endregion
|
|
7
5
|
//# sourceMappingURL=number-field-context.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-context.d.mts","names":[],"sources":["../../src/number-field/number-field-context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"number-field-context.d.mts","names":[],"sources":["../../src/number-field/number-field-context.ts"],"mappings":";;;YAUY"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext, use } from "react";
|
|
3
|
-
|
|
3
|
+
// src/number-field/number-field-context.ts
|
|
4
4
|
const NumberFieldContext = createContext(null);
|
|
5
5
|
function useNumberFieldContext(part) {
|
|
6
6
|
const context = use(NumberFieldContext);
|
|
7
7
|
if (context === null) throw new Error(`${part} must be rendered inside a NumberField.Root.`);
|
|
8
8
|
return context;
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { NumberFieldContext, useNumberFieldContext };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=number-field-context.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NumberFieldDecrementProps } from "./use-step-button.mjs";
|
|
2
|
-
//#region src/number-field/number-field-decrement.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Steps the value down: `button[type=button][tabindex=-1]` with `aria-controls` → the input and
|
|
5
4
|
* the default `aria-label` `"Decrease"`; one step at the press, then repeated while held, one
|
|
@@ -15,5 +14,4 @@ export declare function NumberFieldDecrement(props: NumberFieldDecrementProps):
|
|
|
15
14
|
export declare namespace NumberFieldDecrement {
|
|
16
15
|
var displayName: string;
|
|
17
16
|
}
|
|
18
|
-
//#endregion
|
|
19
17
|
//# sourceMappingURL=number-field-decrement.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-decrement.d.mts","names":[],"sources":["../../src/number-field/number-field-decrement.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"number-field-decrement.d.mts","names":[],"sources":["../../src/number-field/number-field-decrement.tsx"],"mappings":";;;;;;;;;;;;wBAiBgB,qBAAqB,OAAO,4CAAyB;yBAArD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useStepButtonElement } from "./use-step-button.mjs";
|
|
3
|
-
|
|
3
|
+
// src/number-field/number-field-decrement.tsx
|
|
4
4
|
/**
|
|
5
5
|
* Steps the value down: `button[type=button][tabindex=-1]` with `aria-controls` → the input and
|
|
6
6
|
* the default `aria-label` `"Decrease"`; one step at the press, then repeated while held, one
|
|
@@ -16,7 +16,6 @@ function NumberFieldDecrement(props) {
|
|
|
16
16
|
return useStepButtonElement("decrement", "NumberField.Decrement", props);
|
|
17
17
|
}
|
|
18
18
|
NumberFieldDecrement.displayName = "NumberFieldDecrement";
|
|
19
|
-
//#endregion
|
|
20
19
|
export { NumberFieldDecrement };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=number-field-decrement.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { roundTo } from "../internal/decimal.mjs";
|
|
2
|
-
|
|
2
|
+
// src/number-field/number-field-format.ts
|
|
3
3
|
const BIDI = /[--]/g;
|
|
4
4
|
function normalize(text) {
|
|
5
5
|
return text.normalize("NFKC").replace(BIDI, "").replace(/\s/g, " ").toLowerCase();
|
|
@@ -273,7 +273,6 @@ function createNumberFormatter(locale, format = {}) {
|
|
|
273
273
|
cache.set(key, formatter);
|
|
274
274
|
return formatter;
|
|
275
275
|
}
|
|
276
|
-
//#endregion
|
|
277
276
|
export { createNumberFormatter, formatKey };
|
|
278
277
|
|
|
279
278
|
//# sourceMappingURL=number-field-format.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NumberFieldButtonState, NumberFieldDecrementProps, NumberFieldIncrementProps } from "./use-step-button.mjs";
|
|
2
|
-
//#region src/number-field/number-field-increment.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Steps the value up: `button[type=button][tabindex=-1]` with `aria-controls` → the input and the
|
|
5
4
|
* default `aria-label` `"Increase"`; one step at the press, then repeated while held, one commit
|
|
@@ -15,5 +14,4 @@ export declare function NumberFieldIncrement(props: NumberFieldIncrementProps):
|
|
|
15
14
|
export declare namespace NumberFieldIncrement {
|
|
16
15
|
var displayName: string;
|
|
17
16
|
}
|
|
18
|
-
//#endregion
|
|
19
17
|
//# sourceMappingURL=number-field-increment.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-increment.d.mts","names":[],"sources":["../../src/number-field/number-field-increment.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"number-field-increment.d.mts","names":[],"sources":["../../src/number-field/number-field-increment.tsx"],"mappings":";;;;;;;;;;;;wBAqBgB,qBAAqB,OAAO,4CAAyB;yBAArD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useStepButtonElement } from "./use-step-button.mjs";
|
|
3
|
-
|
|
3
|
+
// src/number-field/number-field-increment.tsx
|
|
4
4
|
/**
|
|
5
5
|
* Steps the value up: `button[type=button][tabindex=-1]` with `aria-controls` → the input and the
|
|
6
6
|
* default `aria-label` `"Increase"`; one step at the press, then repeated while held, one commit
|
|
@@ -16,7 +16,6 @@ function NumberFieldIncrement(props) {
|
|
|
16
16
|
return useStepButtonElement("increment", "NumberField.Increment", props);
|
|
17
17
|
}
|
|
18
18
|
NumberFieldIncrement.displayName = "NumberFieldIncrement";
|
|
19
|
-
//#endregion
|
|
20
19
|
export { NumberFieldIncrement };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=number-field-increment.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, Ref } from "react";
|
|
1
2
|
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
3
|
import { NumberFieldState } from "./number-field-root.mjs";
|
|
3
|
-
import { CSSProperties, ComponentPropsWithRef, Ref } from "react";
|
|
4
|
-
//#region src/number-field/number-field-input.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Props of `NumberField.Input`.
|
|
7
6
|
*
|
|
@@ -34,5 +33,4 @@ export declare function NumberFieldInput({ hiddenInputRef, className, style, ren
|
|
|
34
33
|
export declare namespace NumberFieldInput {
|
|
35
34
|
var displayName: string;
|
|
36
35
|
}
|
|
37
|
-
//#endregion
|
|
38
36
|
//# sourceMappingURL=number-field-input.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-input.d.mts","names":[],"sources":["../../src/number-field/number-field-input.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"number-field-input.d.mts","names":[],"sources":["../../src/number-field/number-field-input.tsx"],"mappings":";;;;;;;;iBA4BiB,8BAA8B,KAC7C;;EAsBA,iBAAiB,IAAI;;EAErB,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,SAAS,WAAW,gCAAgC;;;;;;;;;;;;;;;wBAgCtC,mBACd,gBACA,WACA,OACA,WACG,QACF,wCAAqB,IAAA;yBANR"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { isValidElement, useCallback, useEffectEvent, useLayoutEffect, useRef } from "react";
|
|
2
3
|
import { dataAttr } from "../internal/data-attr.mjs";
|
|
3
4
|
import { useDevWarning } from "../internal/use-dev-warning.mjs";
|
|
4
|
-
import { useRender } from "../internal/use-render.mjs";
|
|
5
5
|
import { useElementCheck } from "../internal/use-element-check.mjs";
|
|
6
|
-
import { useMergedRefs } from "../internal/use-merged-refs.mjs";
|
|
7
6
|
import { useFieldControl } from "../internal/form/use-field-control.mjs";
|
|
7
|
+
import { useMergedRefs } from "../internal/use-merged-refs.mjs";
|
|
8
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
8
9
|
import { useNumberFieldContext } from "./number-field-context.mjs";
|
|
9
|
-
import { isValidElement, useCallback, useEffectEvent, useLayoutEffect, useRef } from "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
|
|
11
|
+
// src/number-field/number-field-input.tsx
|
|
12
12
|
const isDev = process.env.NODE_ENV !== "production";
|
|
13
13
|
/** Visually hidden, unfocusable, out of the accessibility tree: the form's control (6.1). */
|
|
14
14
|
const HIDDEN_STYLE = {
|
|
@@ -155,7 +155,6 @@ function NumberFieldInput({ hiddenInputRef, className, style, render, ...rest })
|
|
|
155
155
|
})] });
|
|
156
156
|
}
|
|
157
157
|
NumberFieldInput.displayName = "NumberFieldInput";
|
|
158
|
-
//#endregion
|
|
159
158
|
export { NumberFieldInput };
|
|
160
159
|
|
|
161
160
|
//# sourceMappingURL=number-field-input.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
1
2
|
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
3
|
import { NumberFieldState } from "./number-field-root.mjs";
|
|
3
|
-
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
-
//#region src/number-field/number-field-label.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Props of `NumberField.Label`.
|
|
7
6
|
*
|
|
@@ -29,5 +28,4 @@ export declare function NumberFieldLabel({ className, style, children, render, .
|
|
|
29
28
|
export declare namespace NumberFieldLabel {
|
|
30
29
|
var displayName: string;
|
|
31
30
|
}
|
|
32
|
-
//#endregion
|
|
33
31
|
//# sourceMappingURL=number-field-label.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-label.d.mts","names":[],"sources":["../../src/number-field/number-field-label.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"number-field-label.d.mts","names":[],"sources":["../../src/number-field/number-field-label.tsx"],"mappings":";;;;;;;;iBAiBiB,8BAA8B,KAC7C;;EAIA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,gCAAgC;;;;;;;;;;wBAWtC,mBACd,WACA,OACA,UACA,WACG,QACF,wBAAqB;yBANR"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useLayoutEffect } from "react";
|
|
2
3
|
import { dataAttr } from "../internal/data-attr.mjs";
|
|
3
|
-
import { useRender } from "../internal/use-render.mjs";
|
|
4
4
|
import { useElementCheck } from "../internal/use-element-check.mjs";
|
|
5
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
5
6
|
import { useNumberFieldContext } from "./number-field-context.mjs";
|
|
6
|
-
|
|
7
|
-
//#region src/number-field/number-field-label.tsx
|
|
7
|
+
// src/number-field/number-field-label.tsx
|
|
8
8
|
const isDev = process.env.NODE_ENV !== "production";
|
|
9
9
|
/**
|
|
10
10
|
* The visible name of the field: `<label for>` naming the visible input; its id also names the
|
|
@@ -37,7 +37,6 @@ function NumberFieldLabel({ className, style, children, render, ...rest }) {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
NumberFieldLabel.displayName = "NumberFieldLabel";
|
|
40
|
-
//#endregion
|
|
41
40
|
export { NumberFieldLabel };
|
|
42
41
|
|
|
43
42
|
//# sourceMappingURL=number-field-label.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
1
2
|
import { ActionDetails, ChangeAction, ChangeReason, RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
3
|
import { NumberFieldSource } from "./number-field-context.mjs";
|
|
3
|
-
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
-
//#region src/number-field/number-field-root.d.ts
|
|
5
4
|
/** Details passed as the second argument of both NumberField actions. */
|
|
6
5
|
export interface NumberFieldValueChangeDetails extends ActionDetails {
|
|
7
6
|
/**
|
|
@@ -153,5 +152,4 @@ export declare function NumberFieldRoot(props: NumberFieldRootProps): import("re
|
|
|
153
152
|
export declare namespace NumberFieldRoot {
|
|
154
153
|
var displayName: string;
|
|
155
154
|
}
|
|
156
|
-
//#endregion
|
|
157
155
|
//# sourceMappingURL=number-field-root.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field-root.d.mts","names":[],"sources":["../../src/number-field/number-field-root.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"number-field-root.d.mts","names":[],"sources":["../../src/number-field/number-field-root.tsx"],"mappings":";;;;iBAqCiB,sCAAsC;;;;;;;;;WAS5C,QAAQ;;WAER,QAAQ;;;iBAIF;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;;;;;iBAQM,6BAA6B,KAC5C;;EAIA;;;;;;EAMA;;;;;;;EAOA,oBAAoB,4BAA4B;;;;;;;EAOhD,oBAAoB,4BAA4B;;EAEhD;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,SAAS,KAAK;;;;;;;EAOd;;;;;;EAMA;;;;;;EAMA;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;;;;;;EAOA,YAAY,sBAAsB,OAAO;;EAEzC,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,8BAA8B;;;;;;;;;;;;;;;wBAoEpC,gBAAgB,OAAO,uCAAoB,IAAA;yBAA3C"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { use, useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { announce } from "../internal/announce.mjs";
|
|
2
4
|
import { dataAttr } from "../internal/data-attr.mjs";
|
|
5
|
+
import { FieldContext } from "../internal/form/field-context.mjs";
|
|
3
6
|
import { mergeTokenLists } from "../internal/merge-props.mjs";
|
|
4
|
-
import { useRender } from "../internal/use-render.mjs";
|
|
5
7
|
import { transitionTypes } from "../internal/transition-types.mjs";
|
|
6
|
-
import { useLatest } from "../internal/use-latest.mjs";
|
|
7
|
-
import { FieldContext } from "../internal/form/field-context.mjs";
|
|
8
8
|
import { resolveFieldDefaults, useFieldValueChange } from "../internal/form/use-field-control.mjs";
|
|
9
|
+
import { useLatest } from "../internal/use-latest.mjs";
|
|
9
10
|
import { useResetTarget } from "../internal/form/use-form-reset.mjs";
|
|
10
|
-
import { useNativeGroupReconciliation } from "../internal/form/use-native-group-reconciliation.mjs";
|
|
11
11
|
import { useRegisterCount } from "../internal/use-register-count.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { useNativeGroupReconciliation } from "../internal/form/use-native-group-reconciliation.mjs";
|
|
13
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
13
14
|
import { useStepCommit } from "../internal/action/use-step-commit.mjs";
|
|
14
15
|
import { keyStep, stepValue } from "./number-field-arithmetic.mjs";
|
|
15
16
|
import { NumberFieldContext } from "./number-field-context.mjs";
|
|
16
17
|
import { createNumberFormatter, formatKey } from "./number-field-format.mjs";
|
|
17
18
|
import { useNumberFieldDevWarnings } from "./use-number-field-dev-warnings.mjs";
|
|
18
|
-
import { use, useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
19
19
|
import { jsx } from "react/jsx-runtime";
|
|
20
|
-
|
|
20
|
+
// src/number-field/number-field-root.tsx
|
|
21
21
|
const STEP_TYPES = transitionTypes("number-field", "change");
|
|
22
22
|
const COMMIT_TYPES = transitionTypes("number-field", "commit");
|
|
23
23
|
/** A finite number, or `null` (`NaN` / `Infinity` are treated as empty). */
|
|
@@ -439,7 +439,6 @@ function NumberFieldRoot(props) {
|
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
441
|
NumberFieldRoot.displayName = "NumberFieldRoot";
|
|
442
|
-
//#endregion
|
|
443
442
|
export { NumberFieldRoot };
|
|
444
443
|
|
|
445
444
|
//# sourceMappingURL=number-field-root.mjs.map
|