@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,106 @@
|
|
|
1
|
+
# Direction and locales
|
|
2
|
+
|
|
3
|
+
FUNSTACK UI has no `DirectionProvider` and no `LocaleProvider`. Direction comes from the page, the way the browser reads it; a locale is a plain prop on the Root of each component that formats numbers.
|
|
4
|
+
|
|
5
|
+
## Direction
|
|
6
|
+
|
|
7
|
+
**`dir` is the only switch.** Set it where the platform expects it: `<html dir="rtl">`, a container, or a part itself (every part passes native attributes through, so `<Tabs.List dir="rtl">` works). Each component reads the computed CSS `direction` of the relevant element (the table below) when a key is pressed or a gesture starts, so nothing is needed at render and Server Components and the server HTML are unaffected.
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
// <html lang="ar" dir="rtl"> in your document, then no setup:
|
|
11
|
+
<Tabs.Root defaultValue="a">
|
|
12
|
+
<Tabs.List>…</Tabs.List> {/* ArrowLeft moves to the next tab */}
|
|
13
|
+
</Tabs.Root>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
- **Why no provider.** A provider would be a second source of truth next to `dir`, the attribute the browser already uses for layout, logical properties, `:dir()` and anchor positioning. Libraries that have one ask you to set both, and when the two disagree the arrow keys and the layout point different ways. Reading the CSS cannot disagree with the layout, and a page with `<html dir="rtl">` needs no setup at all.
|
|
17
|
+
- **Direction islands work.** An RTL block inside an LTR page (a quoted Arabic form, a Hebrew sidebar), or the reverse, is handled per component, because each reads its own element. Nothing has to be nested to match the markup.
|
|
18
|
+
- Placement of popups follows direction in CSS: `side="inline-start"` / `"inline-end"` and `align="start"` / `"end"` use anchor-positioning keywords that resolve against the popup's direction. Drawer's `side` takes `"inline-start"` / `"inline-end"` too.
|
|
19
|
+
- A locale never sets the direction: `locale="ar"` on a NumberField changes its digits and separators, not its layout.
|
|
20
|
+
|
|
21
|
+
### What mirrors
|
|
22
|
+
|
|
23
|
+
**Only ArrowLeft and ArrowRight in a horizontal orientation swap.** ArrowUp / ArrowDown, Home / End, PageUp / PageDown and every vertical orientation do the same under RTL as under LTR. `writing-mode` is not read.
|
|
24
|
+
|
|
25
|
+
| Component | What follows direction | Read from |
|
|
26
|
+
| - | - | - |
|
|
27
|
+
| [Tabs](../components/tabs.md) | ArrowLeft / ArrowRight between tabs (horizontal list) | the List |
|
|
28
|
+
| [ToggleGroup](../components/toggle-group.md), [Toolbar](../components/toolbar.md) | ArrowLeft / ArrowRight between items (horizontal) | the Root |
|
|
29
|
+
| [Slider](../components/slider.md) | ArrowLeft / ArrowRight follow the mirrored track (Right decreases); the value under the pointer | the thumb's input; the Track |
|
|
30
|
+
| [Menu](../components/menu.md) | the arrow that opens and closes a submenu (the inline-end one); the open key of a Trigger in a vertical Toolbar; which edge of a menu opened at a point sits at the pointer; the wheel hand-off of a horizontal scroller | the popup or its parent popup; the Trigger; the scroller |
|
|
31
|
+
| [Combobox](../components/combobox.md) `multiple` | the inline-start arrow from the input to the chips, and arrows between chips | the input; the chip |
|
|
32
|
+
| [Drawer](../components/drawer.md) | which way an `inline-start` / `inline-end` drawer swipes closed | the dialog |
|
|
33
|
+
| Tooltip, Popover, HoverCard, Menu, Select, Combobox, MultiSelect | logical sides and alignment; `data-side` / `data-align` report where the popup is | CSS anchor positioning |
|
|
34
|
+
| [RadioGroup](../components/radio-group.md) | arrows between radios (native; not in Safari, below) | the browser |
|
|
35
|
+
| [OTPField](../components/otp-field.md) | nothing: the Root is `ltr` by default (below) | – |
|
|
36
|
+
| Accordion, NumberField | nothing: vertical keys only | – |
|
|
37
|
+
|
|
38
|
+
### Engine differences
|
|
39
|
+
|
|
40
|
+
- **RadioGroup in Safari, by design.** Radio arrows are the browser's own, and WebKit neither mirrors ArrowLeft / ArrowRight under RTL nor wraps at the ends: Right and Down always go to the next radio in document order. A FUNSTACK radio group behaves like every native radio group in Safari; the library adds no key handler ([RadioGroup](../components/radio-group.md#keyboard-and-aria)). Slider is the exception, because there the value moved against the drawn track.
|
|
41
|
+
- **Firefox misplaces popups in a direction island.** When a popup's parent box has another direction than the root element (an RTL block in an LTR page, or the reverse), Firefox mirrors the inline offset of its anchored position, physical sides included, so the popup lands away from its trigger ([#89](https://github.com/uhyo/funstack-ui/issues/89), Mozilla bug 2019601). Chromium and Safari place it correctly, a page whose `<html dir>` matches is unaffected, and the library ships no workaround.
|
|
42
|
+
|
|
43
|
+
### OTPField is left to right
|
|
44
|
+
|
|
45
|
+
A one-time code is read left to right in every locale, so `OTPField.Root` renders `dir="ltr"` unless you pass `dir`: inside an RTL page Slot 0 stays the leftmost box and ArrowLeft moves to the previous character. The label and the messages outside the Root follow the page. Without the attribute the boxes would mirror while the input's text would not, and the engines disagree on the arrow keys there. See [OTPField](../components/otp-field.md#right-to-left-pages).
|
|
46
|
+
|
|
47
|
+
## <a id="locale"></a>Locales
|
|
48
|
+
|
|
49
|
+
Components that format or parse numbers take a `locale` prop on their Root: [NumberField](../components/number-field.md), [Progress](../components/progress.md) and [Meter](../components/meter.md). The type is `string | readonly string[]`, what the `Intl` constructors take (a list is a preference order). The parts get the formatter from the Root.
|
|
50
|
+
|
|
51
|
+
- **The default is the runtime's locale**, on the server and in the browser. That suits a client-only app.
|
|
52
|
+
- **Pass it when the page is server-rendered.** The server's locale and the browser's can differ, and the formatted text would then not match at hydration. NumberField warns in development when `<html lang>` names another language and no `locale` was given.
|
|
53
|
+
- The library never reads `navigator.language` and never derives the locale from `lang`.
|
|
54
|
+
|
|
55
|
+
### Why there is no LocaleProvider
|
|
56
|
+
|
|
57
|
+
`Progress.Root` and `Meter.Root` have no `"use client"` directive, so a Server Component renders them once, on the server. A context cannot reach them there, so a provider would silently not apply to them. And an app that localises already has a locale source, its i18n library; a second provider would have to be kept in step with it. The question is reopened by the first date or time component.
|
|
58
|
+
|
|
59
|
+
### Recipe: the locale from your i18n library
|
|
60
|
+
|
|
61
|
+
Wrap the Root once in a client component that reads the locale from your i18n library, and use the wrapper everywhere:
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
"use client";
|
|
65
|
+
import { NumberField } from "@funstack/ui/number-field";
|
|
66
|
+
import type { ComponentProps } from "react";
|
|
67
|
+
import { useLocale } from "./i18n"; // your i18n library's hook
|
|
68
|
+
|
|
69
|
+
export function NumberFieldRoot(props: ComponentProps<typeof NumberField.Root>) {
|
|
70
|
+
const locale = useLocale();
|
|
71
|
+
return <NumberField.Root locale={locale} {...props} />;
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Recipe: from a Server Component
|
|
76
|
+
|
|
77
|
+
`locale` is plain data, so a Server Component passes it directly. Progress and Meter then format on the server, with nothing to mismatch:
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
import { Progress } from "@funstack/ui/progress";
|
|
81
|
+
import { getLocale } from "./i18n/server"; // however your server knows the request's locale
|
|
82
|
+
|
|
83
|
+
export async function UploadStatus({ done }: { done: number }) {
|
|
84
|
+
const locale = await getLocale(); // for example "ar-EG" or ["de-CH", "de"]
|
|
85
|
+
return (
|
|
86
|
+
<Progress.Root value={done} locale={locale} aria-label="Upload">
|
|
87
|
+
<Progress.Value />
|
|
88
|
+
<Progress.Track><Progress.Indicator /></Progress.Track>
|
|
89
|
+
</Progress.Root>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Built-in strings
|
|
95
|
+
|
|
96
|
+
A few parts have an English default text, each with its own override; there is no strings provider either.
|
|
97
|
+
|
|
98
|
+
| Component | Default | Override |
|
|
99
|
+
| - | - | - |
|
|
100
|
+
| [Combobox](../components/combobox.md#props) | `"No results"`, `"1 result"`, `"N results"`; `"Japan removed"` with `multiple` | `announce`, `announceRemoved` on the Root |
|
|
101
|
+
| [Toast](../components/toast.md#props) | `"Notifications (F8)"`, the Viewport's name | `aria-label` on `Toast.Viewport` |
|
|
102
|
+
| [NumberField](../components/number-field.md#props) | `"Increase"` / `"Decrease"`, the buttons' names | `aria-label` on `Increment` / `Decrement` |
|
|
103
|
+
|
|
104
|
+
> **Not formatted by the library**
|
|
105
|
+
>
|
|
106
|
+
> Slider's `aria-valuetext` and Combobox filtering are yours: format and compare with `Intl` in your own function.
|
|
@@ -214,6 +214,7 @@ Each component page lists which of its parts show which value in its **Optimisti
|
|
|
214
214
|
|
|
215
215
|
- **On the state owner** while its transition is pending.
|
|
216
216
|
- **On the trigger the user is waiting on**: the one whose optimistic value differs from the committed one, or that started the action. Decorative parts that follow the trigger (an indicator) may mirror it.
|
|
217
|
+
- **On a part that asked its owner to close** (a `Dialog.Close`, `Popover.Close`, `Drawer.Close`, an AlertDialog Cancel or Action, a closing `Menu.Item`): from the click until that close has committed, with or without an `action` of its own. The Trigger may be out of sight under a modal backdrop. Without an `action` the part is never `aria-disabled`: nothing of its own is ignored.
|
|
217
218
|
- **Never on content regions.** A content region shows the committed value or nothing; it is never "in between". To dim the old content while the next one loads, select through the state owner.
|
|
218
219
|
- **Never for a fact.** A [fact](action-props.md#fact), a change that had already happened when the library heard of it (a popup dismissed with Escape or a click outside), is reported to an `on*` handler and is not awaited, so nothing is pending for it: the popup, `data-open` and the committed state all change at once ([Requests and facts](browser-owned-state.md#requests-and-facts)).
|
|
219
220
|
|
package/dist/docs/index.md
CHANGED
|
@@ -118,7 +118,7 @@ npm install @funstack/ui@alpha
|
|
|
118
118
|
|
|
119
119
|
React 19.3 or later. Supported browsers: **the latest stable Blink, WebKit and Gecko. No fallbacks.** Platform features not yet in all three are opt-in [experimental props](concepts/experimental.md).
|
|
120
120
|
|
|
121
|
-
Components: [Button](components/button.md), [Toggle](components/toggle.md), [ToggleGroup](components/toggle-group.md), [Toolbar](components/toolbar.md), [Tabs](components/tabs.md), [Accordion](components/accordion.md), [Collapsible](components/collapsible.md), [Tooltip](components/tooltip.md), [HoverCard](components/hover-card.md), [Popover](components/popover.md), [Dialog](components/dialog.md), [AlertDialog](components/alert-dialog.md), [Drawer](components/drawer.md), [Menu](components/menu.md), [Context menu (Menu)](components/context-menu.md), [Toast](components/toast.md), [Field and Form](components/field.md), [Checkbox](components/checkbox.md), [CheckboxGroup](components/checkbox-group.md), [RadioGroup](components/radio-group.md), [Switch](components/switch.md), [Select](components/select.md), [Combobox](components/combobox.md), [MultiSelect](components/multi-select.md), [Slider](components/slider.md), [NumberField](components/number-field.md), [OTPField](components/otp-field.md), [Progress](components/progress.md), [Meter](components/meter.md), [Avatar](components/avatar.md), [Separator](components/separator.md) and [Scroll areas (recipe)](components/scroll-area.md). More are coming; see the [roadmap](roadmap.md).
|
|
121
|
+
Components: [Button](components/button.md), [Toggle](components/toggle.md), [ToggleGroup](components/toggle-group.md), [Toolbar](components/toolbar.md), [Tabs](components/tabs.md), [Accordion](components/accordion.md), [Collapsible](components/collapsible.md), [NavigationMenu](components/navigation-menu.md), [Tooltip](components/tooltip.md), [HoverCard](components/hover-card.md), [Popover](components/popover.md), [Dialog](components/dialog.md), [AlertDialog](components/alert-dialog.md), [Drawer](components/drawer.md), [Menu](components/menu.md), [Context menu (Menu)](components/context-menu.md), [Menubar (Menu)](components/menubar.md), [Toast](components/toast.md), [Field and Form](components/field.md), [Checkbox](components/checkbox.md), [CheckboxGroup](components/checkbox-group.md), [RadioGroup](components/radio-group.md), [Switch](components/switch.md), [Select](components/select.md), [Combobox](components/combobox.md), [MultiSelect](components/multi-select.md), [Slider](components/slider.md), [NumberField](components/number-field.md), [OTPField](components/otp-field.md), [Progress](components/progress.md), [Meter](components/meter.md), [Avatar](components/avatar.md), [Separator](components/separator.md) and [Scroll areas (recipe)](components/scroll-area.md). More are coming; see the [roadmap](roadmap.md).
|
|
122
122
|
|
|
123
123
|
## The FUNSTACK family
|
|
124
124
|
|
|
@@ -147,6 +147,7 @@ FUNSTACK UI is part of the FUNSTACK family, which aims to be the most modern Rea
|
|
|
147
147
|
### Guides
|
|
148
148
|
|
|
149
149
|
- [Replacing the element (render)](concepts/render.md): How the render prop replaces the element a FUNSTACK UI part renders: the element form, the function form, and how the part's props are merged into yours.
|
|
150
|
+
- [Direction and locales](concepts/direction-and-locales.md): Right-to-left pages and number formatting in FUNSTACK UI: dir is the only direction switch (no DirectionProvider), which keys mirror, the engine differences, OTPField's ltr default, and the locale prop per Root (no LocaleProvider) with SSR recipes.
|
|
150
151
|
- [Experimental features](concepts/experimental.md): Platform features that are not in every engine yet are opt-in through experimental\_\* props on the part that uses them.
|
|
151
152
|
- [Content Security Policy](concepts/content-security-policy.md): What a strict style-src needs for FUNSTACK UI: the SHA-256 of the two shipped stylesheets (STYLE_SHA256) or a nonce through CSPProvider, and style-src-attr for server-rendered inline styles.
|
|
152
153
|
- [Using with AI agents](concepts/ai-agents.md): Give a coding agent FUNSTACK UI knowledge: install the funstack-ui-knowledge skill from the npm package, or point the agent at the Markdown docs bundled in the package and published as llms.txt.
|
|
@@ -160,6 +161,7 @@ FUNSTACK UI is part of the FUNSTACK family, which aims to be the most modern Rea
|
|
|
160
161
|
- [Tabs](components/tabs.md): Tabs with optimistic selection, committed panels that may suspend, automatic or manual activation, an anchor-positioned indicator, and find-in-page support.
|
|
161
162
|
- [Accordion](components/accordion.md): An accordion built on \<details>/\<summary>: no JavaScript when you need no state; actions, optimistic data-open and Suspense-friendly panels when you do.
|
|
162
163
|
- [Collapsible](components/collapsible.md): One disclosure built on \<details>/\<summary>: no JavaScript when you need no state; actions, optimistic data-open and Suspense-friendly content when you do.
|
|
164
|
+
- [NavigationMenu](components/navigation-menu.md): A site's main navigation: a row of links and buttons that open panels of more links, built on the Popover API. It needs no JavaScript; a panel whose content loads on open is a transition.
|
|
163
165
|
- [Tooltip](components/tooltip.md): A tooltip built on the Popover API and CSS Anchor Positioning, with a native interestfor path in Chromium. Open state belongs to the browser.
|
|
164
166
|
- [HoverCard](components/hover-card.md): A rich preview that appears when the user rests the pointer on a link or focuses it: the open is a transition, so the content loads on interest and the card appears when it is ready; every close is a fact.
|
|
165
167
|
- [Popover](components/popover.md): A non-modal popover on the Popover API: JS-free when you need no state; a transition-driven open, library-owned closes with a ViewTransition exit in every engine, and Suspense-ready content when you do.
|
|
@@ -168,6 +170,7 @@ FUNSTACK UI is part of the FUNSTACK family, which aims to be the most modern Rea
|
|
|
168
170
|
- [Drawer](components/drawer.md): A dialog attached to an edge of the viewport that the user can swipe back to it, with mouse, pen or touch. A Dialog underneath: top layer, focus, Escape, the JS-free mode; the swipe is a dismissal reported to onOpenChange, and your CSS moves the drawer through three custom properties.
|
|
169
171
|
- [Menu](components/menu.md): A menu button on the Popover API: items whose actions run in their own transition with pending state, optimistic checkbox and radio items, the APG keyboard model with typeahead, and submenus with hover intent.
|
|
170
172
|
- [Context menu (Menu)](components/context-menu.md): Menu.ContextTrigger: a region whose right-click, Shift+F10 or touch long-press opens a Menu at the pointer, with the menu's pending items, optimistic checkbox and radio items and submenus unchanged.
|
|
173
|
+
- [Menubar (Menu)](components/menubar.md): The application menu of a desktop-style app: a row of ordinary Menu.Roots with one Tab stop, arrow keys between the menus and hover switching while a menu is open.
|
|
171
174
|
- [Toast](components/toast.md): Notifications fed by a toast() function and rendered by your own Viewport: an urgent queue that shows while the action it reports on is still pending, promise toasts, an Undo action prop, an onClose handler for the Undo window, ariaNotify announcements, and a region that stays interactive above modal dialogs.
|
|
172
175
|
- [Field and Form](components/field.md): Labelled, described, validated form fields on top of native constraint validation and :user-invalid, and a Form that runs its action in a transition, routes server errors to fields and resets only on success.
|
|
173
176
|
- [Checkbox](components/checkbox.md): A native \<input type=checkbox> with an async checkedChangeAction, optimistic checked state, a controlled indeterminate state and native form participation.
|
package/dist/docs/roadmap.md
CHANGED
|
@@ -10,6 +10,16 @@ Alpha releases (`0.1.0-alpha.N`) are published on npm under the `alpha` dist-tag
|
|
|
10
10
|
|
|
11
11
|
Changes an upgrade may notice, newest first. Each component page documents the current behaviour.
|
|
12
12
|
|
|
13
|
+
- A Close part (`Dialog.Close`, `Popover.Close`, `Drawer.Close`, `AlertDialog.Cancel`, `AlertDialog.Action`) without `action` now has `data-pending` and `state.pending` from the click until the close it asked for has committed, as one with `action` and a `Menu.Item` already did ([#183](https://github.com/uhyo/funstack-ui/issues/183)): a Cancel clicked while the confirm runs shows the wait. A synchronous close shows it for one commit; delay a spinner in CSS. A `Menu.Item` without `action` no longer renders `aria-disabled="true"` while the menu's close waits.
|
|
14
|
+
|
|
15
|
+
- Accordion and Collapsible tell their own `open` writes from the browser's by the value they last wrote or read ([#175](https://github.com/uhyo/funstack-ui/issues/175)): a `<details>` re-opened by the browser while its close is pending is now dispatched with `reason: "platform"` instead of being taken for an echo.
|
|
16
|
+
|
|
17
|
+
- New component [Menubar](components/menubar.md) ([#170](https://github.com/uhyo/funstack-ui/issues/170)): a `<div role="menubar">` around ordinary `Menu.Root`s. A `Menu.Trigger` inside it renders `role="menuitem"`, and its `disabled` renders `aria-disabled` (it stays focusable); outside a bar nothing changes.
|
|
18
|
+
|
|
19
|
+
- New component [NavigationMenu](components/navigation-menu.md) ([#170](https://github.com/uhyo/funstack-ui/issues/170)): a site's main navigation as the disclosure pattern, each panel a `popover="auto"` next to its `popovertarget` button. It needs no JavaScript by default; after hydration focus leaving a panel and a followed `NavigationMenu.Link` close it. A panel whose content loads on open opts into library mode (`openChangeAction`, transition types `fsui-navigation-menu*`). Hover opening and arrow keys are not in this version.
|
|
20
|
+
|
|
21
|
+
- Direction and locale are decided ([#172](https://github.com/uhyo/funstack-ui/issues/172), [#188](https://github.com/uhyo/funstack-ui/issues/188)): `dir` is the only direction switch and there is no provider; `locale` is a prop of each Root that formats. See [Direction and locales](concepts/direction-and-locales.md). `OTPField.Root` now renders `dir="ltr"` unless you pass `dir`, so inside an RTL page its boxes no longer mirror. `locale` on `Progress.Root` and `Meter.Root` also takes a list of tags (`string | readonly string[]`), as on NumberField.
|
|
22
|
+
|
|
13
23
|
- New component [Drawer](components/drawer.md) ([#168](https://github.com/uhyo/funstack-ui/issues/168)): a Dialog attached to an edge (`side`, rendered as `data-side`) that the user can swipe back to it with mouse, pen or touch. The swipe writes `data-swiping` and `--drawer-swipe-x` / `-y` / `-progress` for your CSS, finishes the slide, and closes the drawer as a dismissal reported to `onOpenChange`. Its transition types are `fsui-drawer*`. Snap points and the pull from a scrolled-to-top list are not in this version.
|
|
14
24
|
|
|
15
25
|
- New component [OTPField](components/otp-field.md) ([#171](https://github.com/uhyo/funstack-ui/issues/171)): a one-time-code field that is one `autocomplete="one-time-code"` input drawn as a row of boxes, with `completeAction` for the complete code, `submitOnComplete` and `experimental_webOTP`.
|
|
@@ -133,6 +143,7 @@ Changes an upgrade may notice, newest first. Each component page documents the c
|
|
|
133
143
|
- [Tooltip skip-delay](components/tooltip.md#skip-delay) ([#21](https://github.com/uhyo/funstack-ui/issues/21)).
|
|
134
144
|
- [Content Security Policy](concepts/content-security-policy.md): `STYLE_SHA256` and `<CSPProvider nonce>` ([#88](https://github.com/uhyo/funstack-ui/issues/88)).
|
|
135
145
|
- Directive-free variants of platform-native parts: considered and not built ([#19](https://github.com/uhyo/funstack-ui/issues/19)); [Server Components](concepts/server-components.md#js-free) defines "JS-free" and the form-control pages show the plain HTML alternative.
|
|
146
|
+
- Direction and locales: CSS `direction` is the one source, read per component at the event; a `locale` prop per Root, no provider ([#172](https://github.com/uhyo/funstack-ui/issues/172)). Guide: [Direction and locales](concepts/direction-and-locales.md).
|
|
136
147
|
|
|
137
148
|
## Next
|
|
138
149
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogCloseDetails, DialogCloseProps, DialogCloseState } from "../dialog/dialog-close.mjs";
|
|
2
|
-
//#region src/drawer/drawer-close.d.ts
|
|
3
2
|
/** State of `Drawer.Close`: Dialog's. */
|
|
4
3
|
export type DrawerCloseState = DialogCloseState;
|
|
5
4
|
/** Details passed to `Drawer.Close`'s `action`: Dialog's. */
|
|
@@ -22,5 +21,4 @@ export declare function DrawerClose(props: DrawerCloseProps): import("react").Re
|
|
|
22
21
|
export declare namespace DrawerClose {
|
|
23
22
|
var displayName: string;
|
|
24
23
|
}
|
|
25
|
-
//#endregion
|
|
26
24
|
//# sourceMappingURL=drawer-close.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-close.d.mts","names":[],"sources":["../../src/drawer/drawer-close.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-close.d.mts","names":[],"sources":["../../src/drawer/drawer-close.tsx"],"mappings":";;YASY,mBAAmB;;YAGnB,qBAAqB;;;;;;YAOrB,mBAAmB;;;;;;;;;wBAUf,YAAY,OAAO,mCAAgB;yBAAnC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useDialogClose } from "../dialog/dialog-close.mjs";
|
|
3
|
-
|
|
3
|
+
// src/drawer/drawer-close.tsx
|
|
4
4
|
/**
|
|
5
5
|
* A close button: exactly `Dialog.Close` (`<button type="button" commandfor
|
|
6
6
|
* command="request-close">` in JS-free mode, a close through the Root in library mode; with
|
|
@@ -13,7 +13,6 @@ function DrawerClose(props) {
|
|
|
13
13
|
return useDialogClose(props, { part: "Drawer.Close" });
|
|
14
14
|
}
|
|
15
15
|
DrawerClose.displayName = "DrawerClose";
|
|
16
|
-
//#endregion
|
|
17
16
|
export { DrawerClose };
|
|
18
17
|
|
|
19
18
|
//# sourceMappingURL=drawer-close.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogDescriptionProps, DialogDescriptionState } from "../dialog/dialog-description.mjs";
|
|
2
|
-
//#region src/drawer/drawer-description.d.ts
|
|
3
2
|
/** State of `Drawer.Description`: Dialog's (the Popup's `open` and `modal`). */
|
|
4
3
|
export type DrawerDescriptionState = DialogDescriptionState;
|
|
5
4
|
/**
|
|
@@ -19,5 +18,4 @@ export declare function DrawerDescription(props: DrawerDescriptionProps): import
|
|
|
19
18
|
export declare namespace DrawerDescription {
|
|
20
19
|
var displayName: string;
|
|
21
20
|
}
|
|
22
|
-
//#endregion
|
|
23
21
|
//# sourceMappingURL=drawer-description.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-description.d.mts","names":[],"sources":["../../src/drawer/drawer-description.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-description.d.mts","names":[],"sources":["../../src/drawer/drawer-description.tsx"],"mappings":";;YAQY,yBAAyB;;;;;;YAOzB,yBAAyB;;;;;;;;wBASrB,kBAAkB,OAAO,yCAAsB;yBAA/C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useDialogDescription } from "../dialog/dialog-description.mjs";
|
|
3
|
-
|
|
3
|
+
// src/drawer/drawer-description.tsx
|
|
4
4
|
/**
|
|
5
5
|
* Describes the drawer: a `<p>` whose id the Popup references with `aria-describedby`.
|
|
6
6
|
*
|
|
@@ -12,7 +12,6 @@ function DrawerDescription(props) {
|
|
|
12
12
|
return useDialogDescription(props, "Drawer");
|
|
13
13
|
}
|
|
14
14
|
DrawerDescription.displayName = "DrawerDescription";
|
|
15
|
-
//#endregion
|
|
16
15
|
export { DrawerDescription };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=drawer-description.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogFormProps, DialogFormState } from "../dialog/dialog-form.mjs";
|
|
2
|
-
//#region src/drawer/drawer-form.d.ts
|
|
3
2
|
/** State of `Drawer.Form`: Dialog's (`useFormStatus().pending` of this form). */
|
|
4
3
|
export type DrawerFormState = DialogFormState;
|
|
5
4
|
/**
|
|
@@ -20,5 +19,4 @@ export declare function DrawerForm(props: DrawerFormProps): import("react").Reac
|
|
|
20
19
|
export declare namespace DrawerForm {
|
|
21
20
|
var displayName: string;
|
|
22
21
|
}
|
|
23
|
-
//#endregion
|
|
24
22
|
//# sourceMappingURL=drawer-form.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-form.d.mts","names":[],"sources":["../../src/drawer/drawer-form.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-form.d.mts","names":[],"sources":["../../src/drawer/drawer-form.tsx"],"mappings":";;YAKY,kBAAkB;;;;;;YAOlB,kBAAkB;;;;;;;;;wBAUd,WAAW,OAAO,kCAAe;yBAAjC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useDialogForm } from "../dialog/dialog-form.mjs";
|
|
3
|
-
|
|
3
|
+
// src/drawer/drawer-form.tsx
|
|
4
4
|
/**
|
|
5
5
|
* A form whose submission closes the drawer: exactly `Dialog.Form` (`method="dialog"` without
|
|
6
6
|
* `action`; with a function `action`, the drawer closes when its transition settles).
|
|
@@ -13,7 +13,6 @@ function DrawerForm(props) {
|
|
|
13
13
|
return useDialogForm(props, "Drawer");
|
|
14
14
|
}
|
|
15
15
|
DrawerForm.displayName = "DrawerForm";
|
|
16
|
-
//#endregion
|
|
17
16
|
export { DrawerForm };
|
|
18
17
|
|
|
19
18
|
//# sourceMappingURL=drawer-form.mjs.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
2
2
|
import { DialogPopupProps, DialogPopupState } from "../dialog/dialog-popup.mjs";
|
|
3
|
+
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
3
4
|
import { DrawerSide } from "./drawer-swipe.mjs";
|
|
4
|
-
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
5
|
-
//#region src/drawer/drawer-popup.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* State of `Drawer.Popup`, passed to the function forms of `className`, `style`, `children` and
|
|
8
7
|
* `render`: Dialog's, with the `side`. A drag is not in the state: it is `data-swiping` and the
|
|
@@ -72,6 +71,5 @@ export declare function DrawerPopup({ side, swipeDismiss, lightDismiss, classNam
|
|
|
72
71
|
export declare namespace DrawerPopup {
|
|
73
72
|
var displayName: string;
|
|
74
73
|
}
|
|
75
|
-
//#endregion
|
|
76
74
|
export type { DrawerSide };
|
|
77
75
|
//# sourceMappingURL=drawer-popup.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-popup.d.mts","names":[],"sources":["../../src/drawer/drawer-popup.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-popup.d.mts","names":[],"sources":["../../src/drawer/drawer-popup.tsx"],"mappings":";;;;;;;;;iBAqBiB,yBAAyB;;WAE/B,MAAM;;;;;;;;iBASA,yBAAyB,KACxC;;;;;;;;EAUA,OAAO;;;;;;;;;;EAUP;;;;;;EAMA;;EAEA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;wBAmBvC,cACd,MACA,cACA,cACA,WACA,OACA,UACA,WACG,QACF,mBAAgB;yBATH"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useRef } from "react";
|
|
3
3
|
import { DialogCloseRegistry, useDialogContext } from "../dialog/dialog-context.mjs";
|
|
4
4
|
import { useDialogPopup } from "../dialog/dialog-popup.mjs";
|
|
5
|
+
import { resolveStateValue } from "../internal/render-element.mjs";
|
|
5
6
|
import { isVerticalSide, listenDrawerSwipe, swipeTouchAction } from "./drawer-swipe.mjs";
|
|
6
|
-
import { useCallback, useRef } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/drawer/drawer-popup.tsx
|
|
9
9
|
const isDev = process.env.NODE_ENV !== "production";
|
|
10
10
|
/**
|
|
11
11
|
* The drawer: `Dialog.Popup` (a `<dialog>`, with everything a dialog does) attached to an edge.
|
|
@@ -118,7 +118,6 @@ function watchDevChecks(dialog, side, checks) {
|
|
|
118
118
|
dialog.removeEventListener("close", onClose);
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
//#endregion
|
|
122
121
|
export { DrawerPopup };
|
|
123
122
|
|
|
124
123
|
//# sourceMappingURL=drawer-popup.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogOpenChangeDetails, DialogRootProps, DialogRootState } from "../dialog/dialog-root.mjs";
|
|
2
|
-
//#region src/drawer/drawer-root.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Details passed as the second argument of `openChangeAction` and `onOpenChange`: Dialog's.
|
|
5
4
|
* `reason` is `"activate"` for the Trigger, a Close or a Form; `"dismiss"` for Escape, a press
|
|
@@ -27,5 +26,4 @@ export declare function DrawerRoot({ modal, ...props }: DrawerRootProps): import
|
|
|
27
26
|
export declare namespace DrawerRoot {
|
|
28
27
|
var displayName: string;
|
|
29
28
|
}
|
|
30
|
-
//#endregion
|
|
31
29
|
//# sourceMappingURL=drawer-root.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-root.d.mts","names":[],"sources":["../../src/drawer/drawer-root.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-root.d.mts","names":[],"sources":["../../src/drawer/drawer-root.tsx"],"mappings":";;;;;;YAaY,0BAA0B;;YAG1B,kBAAkB;;;;;;;YAQlB,kBAAkB;;;;;;;;;wBAUd,aAAa,UAAiB,SAAS,kCAAe;yBAAtD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useDialogRoot } from "../dialog/dialog-root.mjs";
|
|
3
|
-
|
|
3
|
+
// src/drawer/drawer-root.tsx
|
|
4
4
|
/**
|
|
5
5
|
* `Dialog.Root` with the Drawer's transition types (`fsui-drawer`, `fsui-drawer-open`,
|
|
6
6
|
* `fsui-drawer-close`). Owns the ids, the mode and the open state; renders no DOM. Opening and
|
|
@@ -17,7 +17,6 @@ function DrawerRoot({ modal = true, ...props }) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
DrawerRoot.displayName = "DrawerRoot";
|
|
20
|
-
//#endregion
|
|
21
20
|
export { DrawerRoot };
|
|
22
21
|
|
|
23
22
|
//# sourceMappingURL=drawer-root.mjs.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
//#region src/drawer/drawer-swipe.d.ts
|
|
2
1
|
/** The edge a drawer is attached to (conventions 13.1's `AnchorSide` vocabulary). */
|
|
3
2
|
export type DrawerSide = "top" | "bottom" | "left" | "right" | "inline-start" | "inline-end";
|
|
4
|
-
//#endregion
|
|
5
3
|
//# sourceMappingURL=drawer-swipe.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-swipe.d.mts","names":[],"sources":["../../src/drawer/drawer-swipe.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-swipe.d.mts","names":[],"sources":["../../src/drawer/drawer-swipe.ts"],"mappings":";YAYY"}
|
|
@@ -2,7 +2,7 @@ import { isPopoverOpen } from "../internal/overlay/popover-open.mjs";
|
|
|
2
2
|
import { animationBaseline, exitAnimations } from "../internal/overlay/use-exit-animation.mjs";
|
|
3
3
|
import { swipeTranslation } from "../internal/swipe-arithmetic.mjs";
|
|
4
4
|
import { trackSwipe } from "../internal/swipe.mjs";
|
|
5
|
-
|
|
5
|
+
// src/drawer/drawer-swipe.ts
|
|
6
6
|
/** The custom properties the drag writes (design 4.3). */
|
|
7
7
|
const SWIPE_X = "--drawer-swipe-x";
|
|
8
8
|
const SWIPE_Y = "--drawer-swipe-y";
|
|
@@ -187,7 +187,6 @@ function listenDrawerSwipe(dialog, side, dismiss, onScrollerRefusal) {
|
|
|
187
187
|
clearOffset(dialog);
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
//#endregion
|
|
191
190
|
export { SWIPE_PROGRESS, SWIPE_X, SWIPE_Y, SWIPING, isSwipeCandidate, isVerticalSide, listenDrawerSwipe, swipeDirectionOf, swipeExtent, swipeTouchAction };
|
|
192
191
|
|
|
193
192
|
//# sourceMappingURL=drawer-swipe.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-swipe.mjs","names":[],"sources":["../../src/drawer/drawer-swipe.ts"],"sourcesContent":["// The Drawer's swipe to dismiss (design/components/drawer.md 4, 5): the glue between the\n// dialog-agnostic tracker (`internal/swipe.ts`) and a `<dialog>`: which presses are candidates,\n// which way the edge is, how far it is, the custom properties, and the release that finishes\n// the slide before the browser closes the dialog. No directive: DOM listeners only\n// (conventions 7.1); only `drawer-popup.tsx` imports it.\nimport { isPopoverOpen } from \"../internal/overlay/popover-open.js\";\nimport { animationBaseline, exitAnimations } from \"../internal/overlay/use-exit-animation.js\";\nimport { swipeTranslation } from \"../internal/swipe-arithmetic.js\";\nimport type { SwipeDirection } from \"../internal/swipe-arithmetic.js\";\nimport { trackSwipe } from \"../internal/swipe.js\";\n\n/** The edge a drawer is attached to (conventions 13.1's `AnchorSide` vocabulary). */\nexport type DrawerSide = \"top\" | \"bottom\" | \"left\" | \"right\" | \"inline-start\" | \"inline-end\";\n\n/** The custom properties the drag writes (design 4.3). */\nexport const SWIPE_X = \"--drawer-swipe-x\";\nexport const SWIPE_Y = \"--drawer-swipe-y\";\nexport const SWIPE_PROGRESS = \"--drawer-swipe-progress\";\n/** Present on the Popup while a pointer drags it (design 4.3). */\nexport const SWIPING = \"data-swiping\";\n\n/** Whether the drawer's axis is vertical (`top` / `bottom`). */\nexport function isVerticalSide(side: DrawerSide): boolean {\n return side === \"top\" || side === \"bottom\";\n}\n\n/**\n * The inline `touch-action` of a drawer with the swipe on (design 5.1): the browser keeps the\n * cross axis and pinch zoom, the drawer's axis is the page's.\n */\nexport function swipeTouchAction(side: DrawerSide): string {\n return isVerticalSide(side) ? \"pan-x pinch-zoom\" : \"pan-y pinch-zoom\";\n}\n\n/**\n * The direction a swipe dismisses toward: toward the side. An inline side reads the dialog's\n * computed `direction`, at the press (design 2): a gesture-time read, not placement.\n */\nexport function swipeDirectionOf(side: DrawerSide, dialog: Element): SwipeDirection {\n switch (side) {\n case \"top\":\n return \"up\";\n case \"bottom\":\n return \"down\";\n case \"left\":\n return \"left\";\n case \"right\":\n return \"right\";\n case \"inline-start\":\n case \"inline-end\": {\n const rtl = getComputedStyle(dialog).direction === \"rtl\";\n return (side === \"inline-end\") !== rtl ? \"right\" : \"left\";\n }\n }\n}\n\n/**\n * The distance that takes the dialog fully off its edge (design 4.1), from its box now (the\n * offset is still 0 when the drag starts): for `down`, the viewport's height minus its top.\n */\nexport function swipeExtent(dialog: Element, direction: SwipeDirection): number {\n const rect = dialog.getBoundingClientRect();\n const view = dialog.ownerDocument.defaultView;\n const width = view?.innerWidth ?? 0;\n const height = view?.innerHeight ?? 0;\n switch (direction) {\n case \"down\":\n return Math.max(0, height - rect.top);\n case \"up\":\n return Math.max(0, rect.bottom);\n case \"right\":\n return Math.max(0, width - rect.left);\n case \"left\":\n return Math.max(0, rect.right);\n }\n}\n\n/** Whether a pointer event on the dialog itself lies outside its border box (the `::backdrop`). */\nfunction onBackdrop(dialog: Element, event: PointerEvent): boolean {\n const rect = dialog.getBoundingClientRect();\n const { clientX: x, clientY: y } = event;\n return !(rect.left <= x && x <= rect.right && rect.top <= y && y <= rect.bottom);\n}\n\nfunction isTextEntry(element: Element): boolean {\n if (element.matches(\"input, textarea, select\")) return true;\n if ((element as HTMLElement).isContentEditable === true) return true;\n // jsdom has no `isContentEditable`.\n const editable = element.getAttribute(\"contenteditable\");\n return editable !== null && editable.toLowerCase() !== \"false\";\n}\n\n/** Computed `overflow` on the axis makes a scroll container there (design 5.1). */\nfunction scrollsOn(element: Element, vertical: boolean): boolean {\n const style = getComputedStyle(element);\n const overflow = vertical ? style.overflowY : style.overflowX;\n return overflow === \"auto\" || overflow === \"scroll\";\n}\n\n/**\n * Whether a press can become a swipe of `dialog` (design 4.1 \"Not a candidate\", 5.1, 8.1): not\n * on the `::backdrop`; its nearest `<dialog>` is this one (not a nested one); not inside an open\n * popover, a text-entry or range control, or a scroll container along the drawer's axis between\n * the target and the dialog (by computed `overflow`, whatever the overflow amount).\n * `onScrollerRefusal` hears the scroll container that refused a press (a development check).\n */\nexport function isSwipeCandidate(\n dialog: HTMLDialogElement,\n event: PointerEvent,\n vertical: boolean,\n onScrollerRefusal?: (scroller: Element) => void,\n): boolean {\n const target = event.target;\n if (!(target instanceof Element)) return false;\n if (target === dialog) return !onBackdrop(dialog, event);\n if (target.closest(\"dialog\") !== dialog) return false;\n for (let node: Element | null = target; node !== null && node !== dialog;) {\n if (isTextEntry(node)) return false;\n if (node.hasAttribute(\"popover\") && isPopoverOpen(node)) return false;\n if (scrollsOn(node, vertical)) {\n onScrollerRefusal?.(node);\n return false;\n }\n node = node.parentElement;\n }\n return true;\n}\n\nfunction clearOffset(dialog: HTMLElement): void {\n dialog.style.removeProperty(SWIPE_X);\n dialog.style.removeProperty(SWIPE_Y);\n dialog.style.removeProperty(SWIPE_PROGRESS);\n}\n\nfunction writeOffset(\n dialog: HTMLElement,\n offset: number,\n progress: number,\n direction: SwipeDirection,\n): void {\n const [x, y] = swipeTranslation(offset, direction);\n dialog.style.setProperty(SWIPE_X, `${x}px`);\n dialog.style.setProperty(SWIPE_Y, `${y}px`);\n dialog.style.setProperty(SWIPE_PROGRESS, String(progress));\n}\n\n/**\n * Installs the swipe on a drawer's `<dialog>` and returns its cleanup (design 4.1, 4.2).\n * `dismiss(event)` records the close intent and calls `requestClose()`. `onScrollerRefusal`\n * hears a scroll container that refused a press (the development check of design 5.1).\n */\nexport function listenDrawerSwipe(\n dialog: HTMLDialogElement,\n side: DrawerSide,\n dismiss: (event: Event) => void,\n onScrollerRefusal?: (scroller: Element) => void,\n): () => void {\n const vertical = isVerticalSide(side);\n let direction: SwipeDirection = \"down\";\n /** A dismissal waits for its slide: presses start nothing meanwhile. */\n let closing = false;\n let disposed = false;\n /**\n * The showing a release belongs to: bumped by every open, so a slide that outlives its\n * showing (closed by Escape and opened again before the slide settled) closes nothing.\n */\n let generation = 0;\n\n const tracker = trackSwipe(dialog, {\n press: (event) => {\n if (closing || !dialog.open) return null;\n if (!isSwipeCandidate(dialog, event, vertical, onScrollerRefusal)) return null;\n direction = swipeDirectionOf(side, dialog);\n return direction;\n },\n extent: () => swipeExtent(dialog, direction),\n start: () => {\n dialog.setAttribute(SWIPING, \"\");\n },\n move: (offset, progress) => {\n writeOffset(dialog, offset, progress, direction);\n },\n end: ({ outcome, event, extent }) => {\n // What already runs (an entry still sliding in, a spinner inside) is not the release.\n const baseline = animationBaseline(dialog);\n dialog.removeAttribute(SWIPING);\n if (outcome !== \"dismiss\") {\n // The consumer's transition on `translate` brings the drawer back.\n clearOffset(dialog);\n return;\n }\n // Finish the motion first (design 4.2): the same transition carries the drawer off its\n // edge while the dialog is still open, which every engine animates.\n writeOffset(dialog, extent, 1, direction);\n closing = true;\n const showing = generation;\n const close = (): void => {\n if (disposed || showing !== generation) return;\n closing = false;\n if (!dialog.open) return;\n dismiss(event);\n // A consumer's `cancel` listener kept it open: slide back.\n if (dialog.open) clearOffset(dialog);\n };\n const animations = exitAnimations(dialog, baseline);\n if (animations.length === 0) close();\n else void Promise.allSettled(animations.map((animation) => animation.finished)).then(close);\n },\n });\n\n // The dialog closing for any other reason (Escape, a Close, a Form settling) aborts a drag;\n // the custom properties go with the `close` event, not before (the closing frame keeps them).\n const onBeforeToggle = (event: Event): void => {\n if (event.target !== dialog) return;\n if ((event as ToggleEvent).newState === \"open\") {\n // A new showing: a release still waiting for its slide belongs to the previous one.\n generation++;\n closing = false;\n clearOffset(dialog);\n return;\n }\n if (tracker.dragging()) {\n tracker.cancel();\n dialog.removeAttribute(SWIPING);\n }\n };\n const onClose = (event: Event): void => {\n if (event.target !== dialog) return;\n tracker.cancel();\n dialog.removeAttribute(SWIPING);\n clearOffset(dialog);\n };\n dialog.addEventListener(\"beforetoggle\", onBeforeToggle);\n dialog.addEventListener(\"close\", onClose);\n\n return () => {\n disposed = true;\n tracker.dispose();\n dialog.removeEventListener(\"beforetoggle\", onBeforeToggle);\n dialog.removeEventListener(\"close\", onClose);\n dialog.removeAttribute(SWIPING);\n clearOffset(dialog);\n };\n}\n"],"mappings":";;;;;;AAeA,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,iBAAiB;;AAE9B,MAAa,UAAU;;AAGvB,SAAgB,eAAe,MAA2B;CACxD,OAAO,SAAS,SAAS,SAAS;AACpC;;;;;AAMA,SAAgB,iBAAiB,MAA0B;CACzD,OAAO,eAAe,IAAI,IAAI,qBAAqB;AACrD;;;;;AAMA,SAAgB,iBAAiB,MAAkB,Q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M;CACpB;AACF"}
|
|
1
|
+
{"version":3,"file":"drawer-swipe.mjs","names":[],"sources":["../../src/drawer/drawer-swipe.ts"],"sourcesContent":["// The Drawer's swipe to dismiss (design/components/drawer.md 4, 5): the glue between the\n// dialog-agnostic tracker (`internal/swipe.ts`) and a `<dialog>`: which presses are candidates,\n// which way the edge is, how far it is, the custom properties, and the release that finishes\n// the slide before the browser closes the dialog. No directive: DOM listeners only\n// (conventions 7.1); only `drawer-popup.tsx` imports it.\nimport { isPopoverOpen } from \"../internal/overlay/popover-open.js\";\nimport { animationBaseline, exitAnimations } from \"../internal/overlay/use-exit-animation.js\";\nimport { swipeTranslation } from \"../internal/swipe-arithmetic.js\";\nimport type { SwipeDirection } from \"../internal/swipe-arithmetic.js\";\nimport { trackSwipe } from \"../internal/swipe.js\";\n\n/** The edge a drawer is attached to (conventions 13.1's `AnchorSide` vocabulary). */\nexport type DrawerSide = \"top\" | \"bottom\" | \"left\" | \"right\" | \"inline-start\" | \"inline-end\";\n\n/** The custom properties the drag writes (design 4.3). */\nexport const SWIPE_X = \"--drawer-swipe-x\";\nexport const SWIPE_Y = \"--drawer-swipe-y\";\nexport const SWIPE_PROGRESS = \"--drawer-swipe-progress\";\n/** Present on the Popup while a pointer drags it (design 4.3). */\nexport const SWIPING = \"data-swiping\";\n\n/** Whether the drawer's axis is vertical (`top` / `bottom`). */\nexport function isVerticalSide(side: DrawerSide): boolean {\n return side === \"top\" || side === \"bottom\";\n}\n\n/**\n * The inline `touch-action` of a drawer with the swipe on (design 5.1): the browser keeps the\n * cross axis and pinch zoom, the drawer's axis is the page's.\n */\nexport function swipeTouchAction(side: DrawerSide): string {\n return isVerticalSide(side) ? \"pan-x pinch-zoom\" : \"pan-y pinch-zoom\";\n}\n\n/**\n * The direction a swipe dismisses toward: toward the side. An inline side reads the dialog's\n * computed `direction`, at the press (design 2): a gesture-time read, not placement.\n */\nexport function swipeDirectionOf(side: DrawerSide, dialog: Element): SwipeDirection {\n switch (side) {\n case \"top\":\n return \"up\";\n case \"bottom\":\n return \"down\";\n case \"left\":\n return \"left\";\n case \"right\":\n return \"right\";\n case \"inline-start\":\n case \"inline-end\": {\n const rtl = getComputedStyle(dialog).direction === \"rtl\";\n return (side === \"inline-end\") !== rtl ? \"right\" : \"left\";\n }\n }\n}\n\n/**\n * The distance that takes the dialog fully off its edge (design 4.1), from its box now (the\n * offset is still 0 when the drag starts): for `down`, the viewport's height minus its top.\n */\nexport function swipeExtent(dialog: Element, direction: SwipeDirection): number {\n const rect = dialog.getBoundingClientRect();\n const view = dialog.ownerDocument.defaultView;\n const width = view?.innerWidth ?? 0;\n const height = view?.innerHeight ?? 0;\n switch (direction) {\n case \"down\":\n return Math.max(0, height - rect.top);\n case \"up\":\n return Math.max(0, rect.bottom);\n case \"right\":\n return Math.max(0, width - rect.left);\n case \"left\":\n return Math.max(0, rect.right);\n }\n}\n\n/** Whether a pointer event on the dialog itself lies outside its border box (the `::backdrop`). */\nfunction onBackdrop(dialog: Element, event: PointerEvent): boolean {\n const rect = dialog.getBoundingClientRect();\n const { clientX: x, clientY: y } = event;\n return !(rect.left <= x && x <= rect.right && rect.top <= y && y <= rect.bottom);\n}\n\nfunction isTextEntry(element: Element): boolean {\n if (element.matches(\"input, textarea, select\")) return true;\n if ((element as HTMLElement).isContentEditable === true) return true;\n // jsdom has no `isContentEditable`.\n const editable = element.getAttribute(\"contenteditable\");\n return editable !== null && editable.toLowerCase() !== \"false\";\n}\n\n/** Computed `overflow` on the axis makes a scroll container there (design 5.1). */\nfunction scrollsOn(element: Element, vertical: boolean): boolean {\n const style = getComputedStyle(element);\n const overflow = vertical ? style.overflowY : style.overflowX;\n return overflow === \"auto\" || overflow === \"scroll\";\n}\n\n/**\n * Whether a press can become a swipe of `dialog` (design 4.1 \"Not a candidate\", 5.1, 8.1): not\n * on the `::backdrop`; its nearest `<dialog>` is this one (not a nested one); not inside an open\n * popover, a text-entry or range control, or a scroll container along the drawer's axis between\n * the target and the dialog (by computed `overflow`, whatever the overflow amount).\n * `onScrollerRefusal` hears the scroll container that refused a press (a development check).\n */\nexport function isSwipeCandidate(\n dialog: HTMLDialogElement,\n event: PointerEvent,\n vertical: boolean,\n onScrollerRefusal?: (scroller: Element) => void,\n): boolean {\n const target = event.target;\n if (!(target instanceof Element)) return false;\n if (target === dialog) return !onBackdrop(dialog, event);\n if (target.closest(\"dialog\") !== dialog) return false;\n for (let node: Element | null = target; node !== null && node !== dialog;) {\n if (isTextEntry(node)) return false;\n if (node.hasAttribute(\"popover\") && isPopoverOpen(node)) return false;\n if (scrollsOn(node, vertical)) {\n onScrollerRefusal?.(node);\n return false;\n }\n node = node.parentElement;\n }\n return true;\n}\n\nfunction clearOffset(dialog: HTMLElement): void {\n dialog.style.removeProperty(SWIPE_X);\n dialog.style.removeProperty(SWIPE_Y);\n dialog.style.removeProperty(SWIPE_PROGRESS);\n}\n\nfunction writeOffset(\n dialog: HTMLElement,\n offset: number,\n progress: number,\n direction: SwipeDirection,\n): void {\n const [x, y] = swipeTranslation(offset, direction);\n dialog.style.setProperty(SWIPE_X, `${x}px`);\n dialog.style.setProperty(SWIPE_Y, `${y}px`);\n dialog.style.setProperty(SWIPE_PROGRESS, String(progress));\n}\n\n/**\n * Installs the swipe on a drawer's `<dialog>` and returns its cleanup (design 4.1, 4.2).\n * `dismiss(event)` records the close intent and calls `requestClose()`. `onScrollerRefusal`\n * hears a scroll container that refused a press (the development check of design 5.1).\n */\nexport function listenDrawerSwipe(\n dialog: HTMLDialogElement,\n side: DrawerSide,\n dismiss: (event: Event) => void,\n onScrollerRefusal?: (scroller: Element) => void,\n): () => void {\n const vertical = isVerticalSide(side);\n let direction: SwipeDirection = \"down\";\n /** A dismissal waits for its slide: presses start nothing meanwhile. */\n let closing = false;\n let disposed = false;\n /**\n * The showing a release belongs to: bumped by every open, so a slide that outlives its\n * showing (closed by Escape and opened again before the slide settled) closes nothing.\n */\n let generation = 0;\n\n const tracker = trackSwipe(dialog, {\n press: (event) => {\n if (closing || !dialog.open) return null;\n if (!isSwipeCandidate(dialog, event, vertical, onScrollerRefusal)) return null;\n direction = swipeDirectionOf(side, dialog);\n return direction;\n },\n extent: () => swipeExtent(dialog, direction),\n start: () => {\n dialog.setAttribute(SWIPING, \"\");\n },\n move: (offset, progress) => {\n writeOffset(dialog, offset, progress, direction);\n },\n end: ({ outcome, event, extent }) => {\n // What already runs (an entry still sliding in, a spinner inside) is not the release.\n const baseline = animationBaseline(dialog);\n dialog.removeAttribute(SWIPING);\n if (outcome !== \"dismiss\") {\n // The consumer's transition on `translate` brings the drawer back.\n clearOffset(dialog);\n return;\n }\n // Finish the motion first (design 4.2): the same transition carries the drawer off its\n // edge while the dialog is still open, which every engine animates.\n writeOffset(dialog, extent, 1, direction);\n closing = true;\n const showing = generation;\n const close = (): void => {\n if (disposed || showing !== generation) return;\n closing = false;\n if (!dialog.open) return;\n dismiss(event);\n // A consumer's `cancel` listener kept it open: slide back.\n if (dialog.open) clearOffset(dialog);\n };\n const animations = exitAnimations(dialog, baseline);\n if (animations.length === 0) close();\n else void Promise.allSettled(animations.map((animation) => animation.finished)).then(close);\n },\n });\n\n // The dialog closing for any other reason (Escape, a Close, a Form settling) aborts a drag;\n // the custom properties go with the `close` event, not before (the closing frame keeps them).\n const onBeforeToggle = (event: Event): void => {\n if (event.target !== dialog) return;\n if ((event as ToggleEvent).newState === \"open\") {\n // A new showing: a release still waiting for its slide belongs to the previous one.\n generation++;\n closing = false;\n clearOffset(dialog);\n return;\n }\n if (tracker.dragging()) {\n tracker.cancel();\n dialog.removeAttribute(SWIPING);\n }\n };\n const onClose = (event: Event): void => {\n if (event.target !== dialog) return;\n tracker.cancel();\n dialog.removeAttribute(SWIPING);\n clearOffset(dialog);\n };\n dialog.addEventListener(\"beforetoggle\", onBeforeToggle);\n dialog.addEventListener(\"close\", onClose);\n\n return () => {\n disposed = true;\n tracker.dispose();\n dialog.removeEventListener(\"beforetoggle\", onBeforeToggle);\n dialog.removeEventListener(\"close\", onClose);\n dialog.removeA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M,WAAW,QAAQ;EAC7B,QAAQ,OAAO;EACf,OAAO,gBAAgB,OAAO;EAC9B,YAAY,MAAM;CACpB;CACA,OAAO,iBAAiB,gBAAgB,cAAc;CACtD,OAAO,iBAAiB,SAAS,OAAO;CAExC,aAAa;EACX,WAAW;EACX,QAAQ,QAAQ;EAChB,OAAO,oBAAoB,gBAAgB,cAAc;EACzD,OAAO,oBAAoB,SAAS,OAAO;EAC3C,OAAO,gBAAgB,OAAO;EAC9B,YAAY,MAAM;CACpB;AACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogTitleProps, DialogTitleState } from "../dialog/dialog-title.mjs";
|
|
2
|
-
//#region src/drawer/drawer-title.d.ts
|
|
3
2
|
/** State of `Drawer.Title`: Dialog's (the Popup's `open` and `modal`). */
|
|
4
3
|
export type DrawerTitleState = DialogTitleState;
|
|
5
4
|
/**
|
|
@@ -19,5 +18,4 @@ export declare function DrawerTitle(props: DrawerTitleProps): import("react").Re
|
|
|
19
18
|
export declare namespace DrawerTitle {
|
|
20
19
|
var displayName: string;
|
|
21
20
|
}
|
|
22
|
-
//#endregion
|
|
23
21
|
//# sourceMappingURL=drawer-title.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-title.d.mts","names":[],"sources":["../../src/drawer/drawer-title.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-title.d.mts","names":[],"sources":["../../src/drawer/drawer-title.tsx"],"mappings":";;YAKY,mBAAmB;;;;;;YAOnB,mBAAmB;;;;;;;;wBASf,YAAY,OAAO,mCAAgB;yBAAnC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useDialogTitle } from "../dialog/dialog-title.mjs";
|
|
3
|
-
|
|
3
|
+
// src/drawer/drawer-title.tsx
|
|
4
4
|
/**
|
|
5
5
|
* The drawer's name: an `<h2>` whose id the Popup references with `aria-labelledby`.
|
|
6
6
|
*
|
|
@@ -12,7 +12,6 @@ function DrawerTitle(props) {
|
|
|
12
12
|
return useDialogTitle(props, "Drawer");
|
|
13
13
|
}
|
|
14
14
|
DrawerTitle.displayName = "DrawerTitle";
|
|
15
|
-
//#endregion
|
|
16
15
|
export { DrawerTitle };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=drawer-title.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DialogTriggerProps, DialogTriggerState } from "../dialog/dialog-trigger.mjs";
|
|
2
|
-
//#region src/drawer/drawer-trigger.d.ts
|
|
3
2
|
/** State of `Drawer.Trigger`: Dialog's. */
|
|
4
3
|
export type DrawerTriggerState = DialogTriggerState;
|
|
5
4
|
/**
|
|
@@ -19,5 +18,4 @@ export declare function DrawerTrigger(props: DrawerTriggerProps): import("react"
|
|
|
19
18
|
export declare namespace DrawerTrigger {
|
|
20
19
|
var displayName: string;
|
|
21
20
|
}
|
|
22
|
-
//#endregion
|
|
23
21
|
//# sourceMappingURL=drawer-trigger.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-trigger.d.mts","names":[],"sources":["../../src/drawer/drawer-trigger.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"drawer-trigger.d.mts","names":[],"sources":["../../src/drawer/drawer-trigger.tsx"],"mappings":";;YAKY,qBAAqB;;;;;;YAOrB,qBAAqB;;;;;;;;wBASjB,cAAc,OAAO,qCAAkB;yBAAvC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useDialogTrigger } from "../dialog/dialog-trigger.mjs";
|
|
3
|
-
|
|
3
|
+
// src/drawer/drawer-trigger.tsx
|
|
4
4
|
/**
|
|
5
5
|
* The opener: exactly `Dialog.Trigger` (`<button type="button" commandfor command="show-modal">`
|
|
6
6
|
* for a modal drawer). JS-free mode: the browser runs the command. Library mode: the click is a
|
|
@@ -12,7 +12,6 @@ function DrawerTrigger(props) {
|
|
|
12
12
|
return useDialogTrigger(props, "Drawer");
|
|
13
13
|
}
|
|
14
14
|
DrawerTrigger.displayName = "DrawerTrigger";
|
|
15
|
-
//#endregion
|
|
16
15
|
export { DrawerTrigger };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=drawer-trigger.mjs.map
|
package/dist/drawer/index.d.mts
CHANGED
|
@@ -7,7 +7,6 @@ import { DrawerPopup, DrawerPopupProps, DrawerPopupState } from "./drawer-popup.
|
|
|
7
7
|
import { DrawerOpenChangeDetails, DrawerRoot, DrawerRootProps, DrawerRootState } from "./drawer-root.mjs";
|
|
8
8
|
import { DrawerTitle, DrawerTitleProps, DrawerTitleState } from "./drawer-title.mjs";
|
|
9
9
|
import { DrawerTrigger, DrawerTriggerProps, DrawerTriggerState } from "./drawer-trigger.mjs";
|
|
10
|
-
//#region src/drawer/index.d.ts
|
|
11
10
|
/**
|
|
12
11
|
* A Dialog attached to an edge of the viewport that the user can swipe back to it: `Root` (no
|
|
13
12
|
* DOM) > `Trigger` + `Popup` (`dialog[data-side]`) > `Title`, `Description`, `Close`, `Form`.
|
|
@@ -29,6 +28,5 @@ export declare const Drawer: {
|
|
|
29
28
|
readonly Close: typeof DrawerClose;
|
|
30
29
|
readonly Form: typeof DrawerForm;
|
|
31
30
|
};
|
|
32
|
-
//#endregion
|
|
33
31
|
export type { DrawerCloseDetails, DrawerCloseProps, DrawerCloseState, DrawerDescriptionProps, DrawerDescriptionState, DrawerFormProps, DrawerFormState, DrawerOpenChangeDetails, DrawerPopupProps, DrawerPopupState, DrawerRootProps, DrawerRootState, DrawerSide, DrawerTitleProps, DrawerTitleState, DrawerTriggerProps, DrawerTriggerState };
|
|
34
32
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/drawer/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/drawer/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;qBAuBa;WACX,aAAI;WACJ,gBAAO;WACP,cAAK;WACL,cAAK;WACL,oBAAW;WACX,cAAK;WACL,aAAI"}
|
package/dist/drawer/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { DrawerPopup } from "./drawer-popup.mjs";
|
|
|
5
5
|
import { DrawerRoot } from "./drawer-root.mjs";
|
|
6
6
|
import { DrawerTitle } from "./drawer-title.mjs";
|
|
7
7
|
import { DrawerTrigger } from "./drawer-trigger.mjs";
|
|
8
|
-
|
|
8
|
+
// src/drawer/index.ts
|
|
9
9
|
/**
|
|
10
10
|
* A Dialog attached to an edge of the viewport that the user can swipe back to it: `Root` (no
|
|
11
11
|
* DOM) > `Trigger` + `Popup` (`dialog[data-side]`) > `Title`, `Description`, `Close`, `Form`.
|
|
@@ -27,7 +27,6 @@ const Drawer = {
|
|
|
27
27
|
Close: DrawerClose,
|
|
28
28
|
Form: DrawerForm
|
|
29
29
|
};
|
|
30
|
-
//#endregion
|
|
31
30
|
export { Drawer };
|
|
32
31
|
|
|
33
32
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
|
-
import { FieldState } from "../internal/form/field-context.mjs";
|
|
3
1
|
import { CSSProperties, ComponentPropsWithRef } from "react";
|
|
4
|
-
|
|
2
|
+
import { FieldState } from "../internal/form/field-context.mjs";
|
|
3
|
+
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
5
4
|
/**
|
|
6
5
|
* Props of `Field.Control`.
|
|
7
6
|
*
|
|
@@ -61,5 +60,4 @@ export declare function FieldControl({ id: consumerId, name, disabled, required,
|
|
|
61
60
|
export declare namespace FieldControl {
|
|
62
61
|
var displayName: string;
|
|
63
62
|
}
|
|
64
|
-
//#endregion
|
|
65
63
|
//# sourceMappingURL=field-control.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-control.d.mts","names":[],"sources":["../../src/field/field-control.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"field-control.d.mts","names":[],"sources":["../../src/field/field-control.tsx"],"mappings":";;;;;;;;iBAmBiB,0BAA0B,KACzC;;;;;EAOA;;;;;;EAMA;;;;;;;EAOA;;;;;;;EAOA;;EAEA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,SAAS,WAAW,gCAAgC;;;;;;;;;;;;;;;;;;;wBA8CtC,eACd,IAAI,YACJ,MACA,UACA,UACA,WACA,OACA,WACG,SACF,oCAAiB;yBATJ"}
|