@funstack/ui 0.1.0-alpha.10 → 0.1.0-alpha.12
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.map +1 -1
- package/dist/accordion/accordion-item.d.mts +3 -4
- package/dist/accordion/accordion-item.d.mts.map +1 -1
- package/dist/accordion/accordion-item.mjs +10 -4
- package/dist/accordion/accordion-item.mjs.map +1 -1
- package/dist/accordion/accordion-panel.d.mts +3 -4
- package/dist/accordion/accordion-panel.d.mts.map +1 -1
- package/dist/accordion/accordion-panel.mjs +2 -1
- package/dist/accordion/accordion-panel.mjs.map +1 -1
- package/dist/accordion/accordion-root.d.mts +3 -3
- package/dist/accordion/accordion-root.d.mts.map +1 -1
- package/dist/accordion/accordion-root.mjs +8 -19
- package/dist/accordion/accordion-root.mjs.map +1 -1
- package/dist/accordion/accordion-trigger.d.mts +3 -4
- package/dist/accordion/accordion-trigger.d.mts.map +1 -1
- package/dist/accordion/accordion-trigger.mjs +5 -3
- package/dist/accordion/accordion-trigger.mjs.map +1 -1
- package/dist/button/button.d.mts +4 -2
- package/dist/button/button.d.mts.map +1 -1
- package/dist/button/button.mjs +3 -2
- package/dist/button/button.mjs.map +1 -1
- package/dist/checkbox/checkbox.d.mts +4 -5
- package/dist/checkbox/checkbox.d.mts.map +1 -1
- package/dist/checkbox/checkbox.mjs +16 -59
- package/dist/checkbox/checkbox.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-context.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-item.d.mts +3 -4
- package/dist/checkbox-group/checkbox-group-item.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-item.mjs +21 -27
- package/dist/checkbox-group/checkbox-group-item.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-label.mjs +1 -6
- package/dist/checkbox-group/checkbox-group-label.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-parent.d.mts +3 -4
- package/dist/checkbox-group/checkbox-group-parent.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-parent.mjs +12 -10
- package/dist/checkbox-group/checkbox-group-parent.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.d.mts +1 -1
- package/dist/checkbox-group/checkbox-group-root.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.mjs +74 -101
- package/dist/checkbox-group/checkbox-group-root.mjs.map +1 -1
- package/dist/combobox/combobox-clear.d.mts.map +1 -1
- package/dist/combobox/combobox-clear.mjs +5 -6
- package/dist/combobox/combobox-clear.mjs.map +1 -1
- package/dist/combobox/combobox-context.mjs.map +1 -1
- package/dist/combobox/combobox-group.d.mts.map +1 -1
- package/dist/combobox/combobox-group.mjs +2 -1
- package/dist/combobox/combobox-group.mjs.map +1 -1
- package/dist/combobox/combobox-input.d.mts.map +1 -1
- package/dist/combobox/combobox-input.mjs +14 -7
- package/dist/combobox/combobox-input.mjs.map +1 -1
- package/dist/combobox/combobox-list.d.mts.map +1 -1
- package/dist/combobox/combobox-list.mjs +6 -10
- package/dist/combobox/combobox-list.mjs.map +1 -1
- package/dist/combobox/combobox-option.d.mts.map +1 -1
- package/dist/combobox/combobox-option.mjs +2 -1
- package/dist/combobox/combobox-option.mjs.map +1 -1
- package/dist/combobox/combobox-popup.d.mts.map +1 -1
- package/dist/combobox/combobox-popup.mjs +9 -25
- package/dist/combobox/combobox-popup.mjs.map +1 -1
- package/dist/combobox/combobox-root.d.mts +11 -10
- package/dist/combobox/combobox-root.d.mts.map +1 -1
- package/dist/combobox/combobox-root.mjs +37 -109
- package/dist/combobox/combobox-root.mjs.map +1 -1
- package/dist/combobox/combobox-trigger.d.mts.map +1 -1
- package/dist/combobox/combobox-trigger.mjs +6 -25
- package/dist/combobox/combobox-trigger.mjs.map +1 -1
- package/dist/combobox/index.d.mts +2 -2
- package/dist/combobox/index.mjs +3 -3
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/combobox/use-combobox-form.mjs +56 -0
- package/dist/combobox/use-combobox-form.mjs.map +1 -0
- package/dist/combobox/use-option-registry.mjs +62 -0
- package/dist/combobox/use-option-registry.mjs.map +1 -0
- package/dist/dialog/dialog-close.d.mts.map +1 -1
- package/dist/dialog/dialog-close.mjs +29 -62
- package/dist/dialog/dialog-close.mjs.map +1 -1
- package/dist/dialog/dialog-context.mjs.map +1 -1
- package/dist/dialog/dialog-form.d.mts.map +1 -1
- package/dist/dialog/dialog-form.mjs +5 -4
- package/dist/dialog/dialog-form.mjs.map +1 -1
- package/dist/dialog/dialog-popup.d.mts +3 -4
- package/dist/dialog/dialog-popup.d.mts.map +1 -1
- package/dist/dialog/dialog-popup.mjs +37 -98
- package/dist/dialog/dialog-popup.mjs.map +1 -1
- package/dist/dialog/dialog-root.d.mts.map +1 -1
- package/dist/dialog/dialog-root.mjs +30 -118
- package/dist/dialog/dialog-root.mjs.map +1 -1
- package/dist/dialog/dialog-trigger.d.mts.map +1 -1
- package/dist/dialog/dialog-trigger.mjs +13 -16
- package/dist/dialog/dialog-trigger.mjs.map +1 -1
- package/dist/field/field-control.mjs +6 -13
- package/dist/field/field-control.mjs.map +1 -1
- package/dist/field/field-description.d.mts.map +1 -1
- package/dist/field/field-description.mjs +1 -2
- package/dist/field/field-description.mjs.map +1 -1
- package/dist/field/field-error.d.mts.map +1 -1
- package/dist/field/field-error.mjs +1 -2
- package/dist/field/field-error.mjs.map +1 -1
- package/dist/field/field-label.d.mts.map +1 -1
- package/dist/field/field-label.mjs +3 -11
- package/dist/field/field-label.mjs.map +1 -1
- package/dist/field/field-root.mjs +21 -41
- package/dist/field/field-root.mjs.map +1 -1
- package/dist/field/index.mjs +1 -1
- package/dist/field/use-server-error-visibility.mjs +44 -0
- package/dist/field/use-server-error-visibility.mjs.map +1 -0
- package/dist/form/form-root.d.mts.map +1 -1
- package/dist/form/form-root.mjs +6 -7
- package/dist/form/form-root.mjs.map +1 -1
- package/dist/form/form-submit.d.mts +1 -1
- package/dist/form/form-submit.mjs +4 -10
- package/dist/form/form-submit.mjs.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/internal/anchor-position.mjs +1 -59
- package/dist/internal/anchor-position.mjs.map +1 -1
- package/dist/internal/announce.mjs.map +1 -1
- package/dist/internal/arrow-keys.mjs +21 -0
- package/dist/internal/arrow-keys.mjs.map +1 -0
- package/dist/internal/decimal.mjs +7 -1
- package/dist/internal/decimal.mjs.map +1 -1
- package/dist/internal/dom-order.mjs +17 -0
- package/dist/internal/dom-order.mjs.map +1 -0
- package/dist/internal/field-context.d.mts.map +1 -1
- package/dist/internal/field-context.mjs +11 -1
- package/dist/internal/field-context.mjs.map +1 -1
- package/dist/internal/focus-first-invalid.mjs +1 -1
- package/dist/internal/focus-first-invalid.mjs.map +1 -1
- package/dist/internal/group-member.mjs +37 -0
- package/dist/internal/group-member.mjs.map +1 -0
- package/dist/internal/overlay-popup.mjs +103 -0
- package/dist/internal/overlay-popup.mjs.map +1 -0
- package/dist/internal/popover-open.mjs +18 -0
- package/dist/internal/popover-open.mjs.map +1 -0
- package/dist/internal/render-element.d.mts +2 -0
- package/dist/internal/render-element.mjs +20 -2
- package/dist/internal/render-element.mjs.map +1 -1
- package/dist/internal/shipped-styles.mjs +14 -0
- package/dist/internal/shipped-styles.mjs.map +1 -0
- package/dist/internal/sync-presence.mjs +5 -1
- package/dist/internal/sync-presence.mjs.map +1 -1
- package/dist/internal/toolbar-context.mjs.map +1 -1
- package/dist/internal/tooltip-warm.mjs +1 -1
- package/dist/internal/tooltip-warm.mjs.map +1 -1
- package/dist/internal/transition-boundary.mjs +1 -1
- package/dist/internal/transition-boundary.mjs.map +1 -1
- package/dist/internal/types.d.mts +8 -6
- package/dist/internal/types.d.mts.map +1 -1
- package/dist/internal/use-action-trigger.mjs +5 -23
- package/dist/internal/use-action-trigger.mjs.map +1 -1
- package/dist/internal/use-checkable-input.mjs +79 -0
- package/dist/internal/use-checkable-input.mjs.map +1 -0
- package/dist/internal/use-controllable-action.mjs +16 -24
- package/dist/internal/use-controllable-action.mjs.map +1 -1
- package/dist/internal/use-dev-warning.mjs +8 -4
- package/dist/internal/use-dev-warning.mjs.map +1 -1
- package/dist/internal/use-element-check.mjs +39 -0
- package/dist/internal/use-element-check.mjs.map +1 -0
- package/dist/internal/use-exit-animation.mjs +1 -1
- package/dist/internal/use-exit-animation.mjs.map +1 -1
- package/dist/internal/use-field-control.mjs +28 -12
- package/dist/internal/use-field-control.mjs.map +1 -1
- package/dist/internal/use-fieldset-group.mjs +46 -0
- package/dist/internal/use-fieldset-group.mjs.map +1 -0
- package/dist/internal/use-form-reset.mjs +1 -5
- package/dist/internal/use-form-reset.mjs.map +1 -1
- package/dist/internal/use-item-order.mjs +42 -0
- package/dist/internal/use-item-order.mjs.map +1 -0
- package/dist/internal/use-latest.mjs +4 -8
- package/dist/internal/use-latest.mjs.map +1 -1
- package/dist/internal/use-merged-refs.mjs +19 -0
- package/dist/internal/use-merged-refs.mjs.map +1 -0
- package/dist/internal/use-name-warning.mjs +84 -0
- package/dist/internal/use-name-warning.mjs.map +1 -0
- package/dist/internal/use-native-checked.mjs +4 -6
- package/dist/internal/use-native-checked.mjs.map +1 -1
- package/dist/internal/use-native-focusgroup.mjs +19 -0
- package/dist/internal/use-native-focusgroup.mjs.map +1 -0
- package/dist/internal/use-native-group-reconciliation.mjs.map +1 -1
- package/dist/internal/use-overlay-close.mjs +63 -0
- package/dist/internal/use-overlay-close.mjs.map +1 -0
- package/dist/internal/{use-popover-root.mjs → use-overlay-root.mjs} +28 -39
- package/dist/internal/use-overlay-root.mjs.map +1 -0
- package/dist/internal/use-popover-popup.mjs +32 -78
- package/dist/internal/use-popover-popup.mjs.map +1 -1
- package/dist/internal/use-popover-trigger.d.mts +15 -0
- package/dist/internal/use-popover-trigger.d.mts.map +1 -0
- package/dist/internal/use-popover-trigger.mjs +13 -17
- package/dist/internal/use-popover-trigger.mjs.map +1 -1
- package/dist/internal/use-register-count.mjs +24 -0
- package/dist/internal/use-register-count.mjs.map +1 -0
- package/dist/internal/use-render.d.mts +2 -0
- package/dist/internal/use-render.mjs +2 -2
- package/dist/internal/use-render.mjs.map +1 -1
- package/dist/internal/use-resolved-placement.mjs +38 -22
- package/dist/internal/use-resolved-placement.mjs.map +1 -1
- package/dist/internal/use-roving-focus.mjs +5 -18
- package/dist/internal/use-roving-focus.mjs.map +1 -1
- package/dist/internal/use-superseded-rejection.mjs +47 -0
- package/dist/internal/use-superseded-rejection.mjs.map +1 -0
- package/dist/internal/validity.mjs +1 -13
- package/dist/internal/validity.mjs.map +1 -1
- package/dist/internal/value-set.mjs +41 -0
- package/dist/internal/value-set.mjs.map +1 -0
- package/dist/menu/index.d.mts +1 -1
- package/dist/menu/menu-checkbox-item.mjs.map +1 -1
- package/dist/menu/menu-context-trigger.d.mts +2 -7
- package/dist/menu/menu-context-trigger.d.mts.map +1 -1
- package/dist/menu/menu-context-trigger.mjs +10 -187
- package/dist/menu/menu-context-trigger.mjs.map +1 -1
- package/dist/menu/menu-context.d.mts +1 -1
- package/dist/menu/menu-context.mjs +1 -1
- package/dist/menu/menu-context.mjs.map +1 -1
- package/dist/menu/menu-dom.mjs +1 -2
- package/dist/menu/menu-dom.mjs.map +1 -1
- package/dist/menu/menu-gestures.mjs +167 -0
- package/dist/menu/menu-gestures.mjs.map +1 -0
- package/dist/menu/menu-group.d.mts.map +1 -1
- package/dist/menu/menu-group.mjs +2 -1
- package/dist/menu/menu-group.mjs.map +1 -1
- package/dist/menu/menu-hover.mjs +0 -1
- package/dist/menu/menu-hover.mjs.map +1 -1
- package/dist/menu/menu-item.mjs.map +1 -1
- package/dist/menu/menu-outside.mjs +101 -0
- package/dist/menu/menu-outside.mjs.map +1 -0
- package/dist/menu/menu-point.mjs +85 -0
- package/dist/menu/menu-point.mjs.map +1 -0
- package/dist/menu/menu-popup.d.mts +6 -7
- package/dist/menu/menu-popup.d.mts.map +1 -1
- package/dist/menu/menu-popup.mjs +37 -248
- package/dist/menu/menu-popup.mjs.map +1 -1
- package/dist/menu/menu-radio-group.mjs.map +1 -1
- package/dist/menu/menu-root.d.mts +10 -0
- package/dist/menu/menu-root.d.mts.map +1 -1
- package/dist/menu/menu-root.mjs +10 -8
- package/dist/menu/menu-root.mjs.map +1 -1
- package/dist/menu/menu-submenu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-submenu-trigger.mjs +6 -6
- package/dist/menu/menu-submenu-trigger.mjs.map +1 -1
- package/dist/menu/menu-trigger.d.mts +4 -9
- package/dist/menu/menu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-trigger.mjs +8 -6
- package/dist/menu/menu-trigger.mjs.map +1 -1
- package/dist/menu/use-menu-item.mjs +14 -16
- package/dist/menu/use-menu-item.mjs.map +1 -1
- package/dist/menu/use-menu-keyboard.mjs +88 -0
- package/dist/menu/use-menu-keyboard.mjs.map +1 -0
- package/dist/meter/meter-root.mjs +1 -1
- package/dist/number-field/index.d.mts +2 -1
- package/dist/number-field/index.d.mts.map +1 -1
- package/dist/number-field/index.mjs +2 -2
- package/dist/number-field/index.mjs.map +1 -1
- package/dist/number-field/number-field-arithmetic.mjs +30 -11
- package/dist/number-field/number-field-arithmetic.mjs.map +1 -1
- package/dist/number-field/number-field-context.d.mts +6 -1
- package/dist/number-field/number-field-context.d.mts.map +1 -0
- package/dist/number-field/number-field-context.mjs.map +1 -1
- package/dist/number-field/number-field-decrement.d.mts +1 -1
- package/dist/number-field/number-field-decrement.mjs +1 -1
- package/dist/number-field/number-field-decrement.mjs.map +1 -1
- package/dist/number-field/number-field-increment.d.mts +2 -22
- package/dist/number-field/number-field-increment.d.mts.map +1 -1
- package/dist/number-field/number-field-increment.mjs +2 -53
- package/dist/number-field/number-field-increment.mjs.map +1 -1
- package/dist/number-field/number-field-input.d.mts.map +1 -1
- package/dist/number-field/number-field-input.mjs +18 -22
- package/dist/number-field/number-field-input.mjs.map +1 -1
- package/dist/number-field/number-field-label.d.mts.map +1 -1
- package/dist/number-field/number-field-label.mjs +3 -9
- package/dist/number-field/number-field-label.mjs.map +1 -1
- package/dist/number-field/number-field-root.d.mts +2 -1
- package/dist/number-field/number-field-root.d.mts.map +1 -1
- package/dist/number-field/number-field-root.mjs +81 -91
- package/dist/number-field/number-field-root.mjs.map +1 -1
- package/dist/number-field/use-number-field-dev-warnings.mjs +28 -0
- package/dist/number-field/use-number-field-dev-warnings.mjs.map +1 -0
- package/dist/number-field/use-step-button.d.mts +24 -0
- package/dist/number-field/use-step-button.d.mts.map +1 -0
- package/dist/number-field/use-step-button.mjs +57 -3
- package/dist/number-field/use-step-button.mjs.map +1 -1
- package/dist/popover/popover-close.d.mts.map +1 -1
- package/dist/popover/popover-close.mjs +28 -67
- package/dist/popover/popover-close.mjs.map +1 -1
- package/dist/popover/popover-context.mjs.map +1 -1
- package/dist/popover/popover-popup.d.mts +9 -6
- package/dist/popover/popover-popup.d.mts.map +1 -1
- package/dist/popover/popover-popup.mjs +13 -36
- package/dist/popover/popover-popup.mjs.map +1 -1
- package/dist/popover/popover-root.mjs +4 -3
- package/dist/popover/popover-root.mjs.map +1 -1
- package/dist/popover/popover-trigger.d.mts +4 -8
- package/dist/popover/popover-trigger.d.mts.map +1 -1
- package/dist/popover/popover-trigger.mjs +2 -1
- package/dist/popover/popover-trigger.mjs.map +1 -1
- package/dist/progress/progress-root.mjs +1 -1
- package/dist/radio-group/radio-group-context.mjs.map +1 -1
- package/dist/radio-group/radio-group-item.d.mts +3 -4
- package/dist/radio-group/radio-group-item.d.mts.map +1 -1
- package/dist/radio-group/radio-group-item.mjs +20 -25
- package/dist/radio-group/radio-group-item.mjs.map +1 -1
- package/dist/radio-group/radio-group-label.mjs +1 -6
- package/dist/radio-group/radio-group-label.mjs.map +1 -1
- package/dist/radio-group/radio-group-root.d.mts +1 -1
- package/dist/radio-group/radio-group-root.d.mts.map +1 -1
- package/dist/radio-group/radio-group-root.mjs +21 -40
- package/dist/radio-group/radio-group-root.mjs.map +1 -1
- package/dist/select/select-dom.mjs +9 -18
- package/dist/select/select-dom.mjs.map +1 -1
- package/dist/select/select-option.mjs +1 -1
- package/dist/select/select-root.mjs +3 -2
- package/dist/select/select-root.mjs.map +1 -1
- package/dist/slider/slider-arithmetic.mjs +74 -13
- package/dist/slider/slider-arithmetic.mjs.map +1 -1
- package/dist/slider/slider-context.mjs.map +1 -1
- package/dist/slider/slider-label.d.mts.map +1 -1
- package/dist/slider/slider-label.mjs +3 -9
- package/dist/slider/slider-label.mjs.map +1 -1
- package/dist/slider/slider-root.d.mts +2 -2
- package/dist/slider/slider-root.d.mts.map +1 -1
- package/dist/slider/slider-root.mjs +36 -116
- package/dist/slider/slider-root.mjs.map +1 -1
- package/dist/slider/slider-thumb.d.mts.map +1 -1
- package/dist/slider/slider-thumb.mjs +8 -6
- package/dist/slider/slider-thumb.mjs.map +1 -1
- package/dist/slider/slider-value.d.mts.map +1 -1
- package/dist/slider/slider-value.mjs +2 -1
- package/dist/slider/slider-value.mjs.map +1 -1
- package/dist/slider/use-slider-dev-warnings.mjs +29 -0
- package/dist/slider/use-slider-dev-warnings.mjs.map +1 -0
- package/dist/slider/use-thumb-registry.mjs +51 -0
- package/dist/slider/use-thumb-registry.mjs.map +1 -0
- package/dist/switch/switch.d.mts +4 -5
- package/dist/switch/switch.d.mts.map +1 -1
- package/dist/switch/switch.mjs +15 -55
- package/dist/switch/switch.mjs.map +1 -1
- package/dist/tabs/tabs-context.d.mts +2 -3
- package/dist/tabs/tabs-context.d.mts.map +1 -1
- package/dist/tabs/tabs-context.mjs.map +1 -1
- package/dist/tabs/tabs-list.d.mts.map +1 -1
- package/dist/tabs/tabs-list.mjs +9 -22
- package/dist/tabs/tabs-list.mjs.map +1 -1
- package/dist/tabs/tabs-panel.d.mts +3 -4
- package/dist/tabs/tabs-panel.d.mts.map +1 -1
- package/dist/tabs/tabs-panel.mjs.map +1 -1
- package/dist/tabs/tabs-root.d.mts +4 -3
- package/dist/tabs/tabs-root.d.mts.map +1 -1
- package/dist/tabs/tabs-root.mjs +2 -1
- package/dist/tabs/tabs-root.mjs.map +1 -1
- package/dist/tabs/tabs-tab.d.mts +3 -4
- package/dist/tabs/tabs-tab.d.mts.map +1 -1
- package/dist/tabs/tabs-tab.mjs.map +1 -1
- package/dist/toast/toast-action.mjs.map +1 -1
- package/dist/toast/toast-close.d.mts.map +1 -1
- package/dist/toast/toast-close.mjs +2 -8
- package/dist/toast/toast-close.mjs.map +1 -1
- package/dist/toast/toast-context.mjs.map +1 -1
- package/dist/toast/toast-hotkey.mjs +27 -0
- package/dist/toast/toast-hotkey.mjs.map +1 -0
- package/dist/toast/toast-queue.mjs +137 -0
- package/dist/toast/toast-queue.mjs.map +1 -0
- package/dist/toast/toast-timers.mjs +65 -0
- package/dist/toast/toast-timers.mjs.map +1 -0
- package/dist/toast/toast-viewport.d.mts.map +1 -1
- package/dist/toast/toast-viewport.mjs +30 -235
- package/dist/toast/toast-viewport.mjs.map +1 -1
- package/dist/toast/toast.mjs +1 -1
- package/dist/toast/toast.mjs.map +1 -1
- package/dist/toast/use-modal-portal-host.mjs +52 -0
- package/dist/toast/use-modal-portal-host.mjs.map +1 -0
- package/dist/toggle/toggle.d.mts +3 -4
- package/dist/toggle/toggle.d.mts.map +1 -1
- package/dist/toggle/toggle.mjs +7 -10
- package/dist/toggle/toggle.mjs.map +1 -1
- package/dist/toggle-group/toggle-group-context.d.mts +2 -1
- package/dist/toggle-group/toggle-group-context.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-context.mjs.map +1 -1
- package/dist/toggle-group/toggle-group-item.d.mts +5 -3
- package/dist/toggle-group/toggle-group-item.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-item.mjs +5 -7
- package/dist/toggle-group/toggle-group-item.mjs.map +1 -1
- package/dist/toggle-group/toggle-group-root.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-root.mjs +29 -64
- package/dist/toggle-group/toggle-group-root.mjs.map +1 -1
- package/dist/toolbar/toolbar-root.d.mts +2 -2
- package/dist/toolbar/toolbar-root.d.mts.map +1 -1
- package/dist/toolbar/toolbar-root.mjs +3 -4
- package/dist/toolbar/toolbar-root.mjs.map +1 -1
- package/dist/tooltip/tooltip-context.d.mts +1 -1
- package/dist/tooltip/tooltip-context.mjs.map +1 -1
- package/dist/tooltip/tooltip-popup.d.mts.map +1 -1
- package/dist/tooltip/tooltip-popup.mjs +6 -15
- package/dist/tooltip/tooltip-popup.mjs.map +1 -1
- package/dist/tooltip/tooltip-root.mjs +2 -2
- package/dist/tooltip/tooltip-root.mjs.map +1 -1
- package/dist/tooltip/tooltip-trigger.d.mts +2 -1
- package/dist/tooltip/tooltip-trigger.d.mts.map +1 -1
- package/dist/tooltip/tooltip-trigger.mjs +3 -2
- package/dist/tooltip/tooltip-trigger.mjs.map +1 -1
- package/dist/tooltip/use-tooltip-interaction.mjs +4 -3
- package/dist/tooltip/use-tooltip-interaction.mjs.map +1 -1
- package/package.json +3 -2
- package/dist/accordion/accordion-context.d.mts +0 -5
- package/dist/accordion/accordion-context.d.mts.map +0 -1
- package/dist/internal/use-popover-root.mjs.map +0 -1
- /package/dist/internal/{use-popover-root.d.mts → use-overlay-root.d.mts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/combobox/index.ts"],"sourcesContent":["// Ships the platform attribute typings with this subpath (conventions 7.4). Type-only: the built\n// JS has no import of it.\nimport \"../internal/platform-attributes.js\";\nimport { ComboboxClear } from \"./combobox-clear.js\";\nimport {\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxGroupLabel,\n ComboboxStatus,\n} from \"./combobox-group.js\";\nimport { ComboboxInput } from \"./combobox-input.js\";\nimport { ComboboxLabel } from \"./combobox-label.js\";\nimport { ComboboxList } from \"./combobox-list.js\";\nimport { ComboboxOption } from \"./combobox-option.js\";\nimport { ComboboxPopup } from \"./combobox-popup.js\";\nimport { ComboboxRoot } from \"./combobox-root.js\";\nimport { ComboboxTrigger } from \"./combobox-trigger.js\";\n\n/**\n * Editable combobox with list autocomplete (WAI-ARIA APG) on `popover=\"auto\"`: `Root` (no DOM,\n * or one hidden input with `name`) > `Label`, `Input` (`input[role=combobox]`), `Trigger`,\n * `Clear`, `Popup` (`div[popover=auto]`) > `List` (`div[role=listbox]`) > `Option`, `Group` >\n * `GroupLabel`; `Empty` and `Status` in the Popup. Typing is urgent (`
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/combobox/index.ts"],"sourcesContent":["// Ships the platform attribute typings with this subpath (conventions 7.4). Type-only: the built\n// JS has no import of it.\nimport \"../internal/platform-attributes.js\";\nimport { ComboboxClear } from \"./combobox-clear.js\";\nimport {\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxGroupLabel,\n ComboboxStatus,\n} from \"./combobox-group.js\";\nimport { ComboboxInput } from \"./combobox-input.js\";\nimport { ComboboxLabel } from \"./combobox-label.js\";\nimport { ComboboxList } from \"./combobox-list.js\";\nimport { ComboboxOption } from \"./combobox-option.js\";\nimport { ComboboxPopup } from \"./combobox-popup.js\";\nimport { ComboboxRoot } from \"./combobox-root.js\";\nimport { ComboboxTrigger } from \"./combobox-trigger.js\";\n\n/**\n * Editable combobox with list autocomplete (WAI-ARIA APG) on `popover=\"auto\"`: `Root` (no DOM,\n * or one hidden input with `name`) > `Label`, `Input` (`input[role=combobox]`), `Trigger`,\n * `Clear`, `Popup` (`div[popover=auto]`) > `List` (`div[role=listbox]`) > `Option`, `Group` >\n * `GroupLabel`; `Empty` and `Status` in the Popup. Typing is urgent (the `onInputValueChange`\n * handler, the library's urgent lane); the results render from the deferred `query`; accepting an option\n * is a transition with `data-pending` on it, and the listbox closes when it settles.\n */\nexport const Combobox = {\n Root: ComboboxRoot,\n Label: ComboboxLabel,\n Input: ComboboxInput,\n Trigger: ComboboxTrigger,\n Clear: ComboboxClear,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Option: ComboboxOption,\n Group: ComboboxGroup,\n GroupLabel: ComboboxGroupLabel,\n Empty: ComboboxEmpty,\n Status: ComboboxStatus,\n} as const;\n\nexport type {\n ComboboxRootProps,\n ComboboxRootState,\n ComboboxValueChangeDetails,\n ComboboxInputValueChangeDetails,\n ComboboxOpenChangeDetails,\n} from \"./combobox-root.js\";\nexport type { ComboboxLabelProps, ComboboxLabelState } from \"./combobox-label.js\";\nexport type { ComboboxInputProps, ComboboxInputState } from \"./combobox-input.js\";\nexport type { ComboboxTriggerProps, ComboboxTriggerState } from \"./combobox-trigger.js\";\nexport type { ComboboxClearProps, ComboboxClearState } from \"./combobox-clear.js\";\nexport type { ComboboxPopupProps, ComboboxPopupState } from \"./combobox-popup.js\";\nexport type { ComboboxListProps, ComboboxListState } from \"./combobox-list.js\";\nexport type { ComboboxOptionProps, ComboboxOptionState } from \"./combobox-option.js\";\nexport type {\n ComboboxGroupProps,\n ComboboxGroupState,\n ComboboxGroupLabelProps,\n ComboboxGroupLabelState,\n ComboboxEmptyProps,\n ComboboxEmptyState,\n ComboboxStatusProps,\n ComboboxStatusState,\n} from \"./combobox-group.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0BA,MAAa,WAAW;CACtB,MAAM;CACN,OAAO;CACP,OAAO;CACP,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;CACN,QAAQ;CACR,OAAO;CACP,YAAY;CACZ,OAAO;CACP,QAAQ;AACV"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useFormReset } from "../internal/use-form-reset.mjs";
|
|
3
|
+
import { useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
//#region src/combobox/use-combobox-form.ts
|
|
5
|
+
/**
|
|
6
|
+
* The Combobox's form behaviour (design/components/combobox.md 11.1, walkthroughs 10 and 11):
|
|
7
|
+
* form reset of the text and the value, the DOM re-sync for a controlled parent that keeps its
|
|
8
|
+
* text, and the mount reconciliation of a text typed before hydration.
|
|
9
|
+
*/
|
|
10
|
+
function useComboboxForm(options) {
|
|
11
|
+
const { value, defaultValue, inputValue, defaultInputValue, inputRef, hiddenRef, textRef } = options;
|
|
12
|
+
const { writeText } = options;
|
|
13
|
+
const [mountValue] = useState(value);
|
|
14
|
+
const [mountText] = useState(inputValue);
|
|
15
|
+
const valueResetTarget = value !== void 0 ? mountValue ?? null : defaultValue ?? null;
|
|
16
|
+
const inputDefaultValue = inputValue !== void 0 ? mountText ?? "" : defaultInputValue ?? "";
|
|
17
|
+
const [resync, setResync] = useState(0);
|
|
18
|
+
useLayoutEffect(() => {
|
|
19
|
+
const input = inputRef.current;
|
|
20
|
+
if (resync > 0 && input !== null && input.value !== textRef.current) input.value = textRef.current;
|
|
21
|
+
}, [
|
|
22
|
+
resync,
|
|
23
|
+
inputRef,
|
|
24
|
+
textRef
|
|
25
|
+
]);
|
|
26
|
+
const formElement = useMemo(() => ({
|
|
27
|
+
get current() {
|
|
28
|
+
return hiddenRef.current ?? inputRef.current;
|
|
29
|
+
},
|
|
30
|
+
set current(_ignored) {}
|
|
31
|
+
}), [hiddenRef, inputRef]);
|
|
32
|
+
useFormReset(formElement, (event) => {
|
|
33
|
+
const domText = inputRef.current?.value ?? inputDefaultValue;
|
|
34
|
+
if (domText !== textRef.current) writeText(domText, "platform", event);
|
|
35
|
+
setResync((n) => n + 1);
|
|
36
|
+
if (valueResetTarget !== options.optimistic) options.resetValue(valueResetTarget, event);
|
|
37
|
+
}, () => {
|
|
38
|
+
const input = inputRef.current;
|
|
39
|
+
if (input !== null && input.defaultValue !== inputDefaultValue) input.defaultValue = inputDefaultValue;
|
|
40
|
+
});
|
|
41
|
+
const reconciled = useRef(false);
|
|
42
|
+
useLayoutEffect(() => {
|
|
43
|
+
if (reconciled.current) return;
|
|
44
|
+
reconciled.current = true;
|
|
45
|
+
const input = inputRef.current;
|
|
46
|
+
if (input !== null && input.value !== textRef.current) writeText(input.value, "platform", void 0);
|
|
47
|
+
}, [
|
|
48
|
+
writeText,
|
|
49
|
+
inputRef,
|
|
50
|
+
textRef
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { useComboboxForm };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=use-combobox-form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-combobox-form.mjs","names":[],"sources":["../../src/combobox/use-combobox-form.ts"],"sourcesContent":["\"use client\";\nimport { useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport type { ChangeReason } from \"../internal/types.js\";\nimport type { FormAssociatedElement } from \"../internal/use-form-owner-event.js\";\nimport { useFormReset } from \"../internal/use-form-reset.js\";\n\nexport interface ComboboxFormOptions {\n /** The Root's props, for the reset targets. */\n readonly value: string | null | undefined;\n readonly defaultValue: string | null | undefined;\n readonly inputValue: string | undefined;\n readonly defaultInputValue: string | undefined;\n readonly inputRef: RefObject<HTMLInputElement | null>;\n readonly hiddenRef: RefObject<HTMLInputElement | null>;\n /** The latest text (the urgent lane). */\n readonly textRef: RefObject<string>;\n readonly writeText: (next: string, reason: ChangeReason, event: Event | undefined) => void;\n /** The optimistic selection. */\n readonly optimistic: string | null;\n /** Dispatches the reset target as the value (`\"platform\"`). */\n readonly resetValue: (next: string | null, event: Event) => void;\n}\n\n/**\n * The Combobox's form behaviour (design/components/combobox.md 11.1, walkthroughs 10 and 11):\n * form reset of the text and the value, the DOM re-sync for a controlled parent that keeps its\n * text, and the mount reconciliation of a text typed before hydration.\n */\nexport function useComboboxForm(options: ComboboxFormOptions): void {\n const { value, defaultValue, inputValue, defaultInputValue, inputRef, hiddenRef, textRef } =\n options;\n const { writeText } = options;\n\n const [mountValue] = useState(value);\n const [mountText] = useState(inputValue);\n // Reset targets (conventions 3.8 rule 6): uncontrolled, the latest default props; controlled,\n // the mount-time values.\n const valueResetTarget = value !== undefined ? (mountValue ?? null) : (defaultValue ?? null);\n const inputDefaultValue =\n inputValue !== undefined ? (mountText ?? \"\") : (defaultInputValue ?? \"\");\n // After a form reset a controlled parent may not adopt the text: put React's value back into\n // the DOM (react-dom only does that after its own input events).\n const [resync, setResync] = useState(0);\n useLayoutEffect(() => {\n const input = inputRef.current;\n if (resync > 0 && input !== null && input.value !== textRef.current) {\n input.value = textRef.current;\n }\n }, [resync, inputRef, textRef]);\n\n const formElement = useMemo<RefObject<FormAssociatedElement | null>>(\n () => ({\n get current() {\n return hiddenRef.current ?? inputRef.current;\n },\n set current(_ignored) {},\n }),\n [hiddenRef, inputRef],\n );\n useFormReset(\n formElement,\n (event) => {\n const input = inputRef.current;\n const domText = input?.value ?? inputDefaultValue;\n if (domText !== textRef.current) writeText(domText, \"platform\", event);\n // A controlled parent that does not adopt the text gets the DOM re-synced.\n setResync((n) => n + 1);\n if (valueResetTarget !== options.optimistic) options.resetValue(valueResetTarget, event);\n },\n () => {\n // react-dom writes `defaultValue = value` after every update of a controlled input, so the\n // reset target is written here, right before the browser's reset algorithm reads it.\n const input = inputRef.current;\n if (input !== null && input.defaultValue !== inputDefaultValue) {\n input.defaultValue = inputDefaultValue;\n }\n },\n );\n\n // Walkthrough 11: react-dom keeps a hydrated text input's DOM value and fires no `onChange`.\n const reconciled = useRef(false);\n useLayoutEffect(() => {\n if (reconciled.current) return;\n reconciled.current = true;\n const input = inputRef.current;\n if (input !== null && input.value !== textRef.current) {\n writeText(input.value, \"platform\", undefined);\n }\n }, [writeText, inputRef, textRef]);\n}\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,gBAAgB,SAAoC;CAClE,MAAM,EAAE,OAAO,cAAc,YAAY,mBAAmB,UAAU,WAAW,YAC/E;CACF,MAAM,EAAE,cAAc;CAEtB,MAAM,CAAC,cAAc,SAAS,KAAK;CACnC,MAAM,CAAC,aAAa,SAAS,UAAU;CAGvC,MAAM,mBAAmB,UAAU,KAAA,IAAa,cAAc,OAAS,gBAAgB;CACvF,MAAM,oBACJ,eAAe,KAAA,IAAa,aAAa,KAAO,qBAAqB;CAGvE,MAAM,CAAC,QAAQ,aAAa,SAAS,CAAC;CACtC,sBAAsB;EACpB,MAAM,QAAQ,SAAS;EACvB,IAAI,SAAS,KAAK,UAAU,QAAQ,MAAM,UAAU,QAAQ,SAC1D,MAAM,QAAQ,QAAQ;CAE1B,GAAG;EAAC;EAAQ;EAAU;CAAO,CAAC;CAE9B,MAAM,cAAc,eACX;EACL,IAAI,UAAU;GACZ,OAAO,UAAU,WAAW,SAAS;EACvC;EACA,IAAI,QAAQ,UAAU,CAAC;CACzB,IACA,CAAC,WAAW,QAAQ,CACtB;CACA,aACE,cACC,UAAU;EAET,MAAM,UADQ,SAAS,SACA,SAAS;EAChC,IAAI,YAAY,QAAQ,SAAS,UAAU,SAAS,YAAY,KAAK;EAErE,WAAW,MAAM,IAAI,CAAC;EACtB,IAAI,qBAAqB,QAAQ,YAAY,QAAQ,WAAW,kBAAkB,KAAK;CACzF,SACM;EAGJ,MAAM,QAAQ,SAAS;EACvB,IAAI,UAAU,QAAQ,MAAM,iBAAiB,mBAC3C,MAAM,eAAe;CAEzB,CACF;CAGA,MAAM,aAAa,OAAO,KAAK;CAC/B,sBAAsB;EACpB,IAAI,WAAW,SAAS;EACxB,WAAW,UAAU;EACrB,MAAM,QAAQ,SAAS;EACvB,IAAI,UAAU,QAAQ,MAAM,UAAU,QAAQ,SAC5C,UAAU,MAAM,OAAO,YAAY,KAAA,CAAS;CAEhD,GAAG;EAAC;EAAW;EAAU;CAAO,CAAC;AACnC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useRef, useState } from "react";
|
|
3
|
+
//#region src/combobox/use-option-registry.ts
|
|
4
|
+
const isDev = process.env.NODE_ENV !== "production";
|
|
5
|
+
/**
|
|
6
|
+
* The Options, Statuses and Labels mounted in a Combobox (design/components/combobox.md 2, 6.5).
|
|
7
|
+
* An Option's label is learnt into `labels` (design 2.3) as it registers.
|
|
8
|
+
*/
|
|
9
|
+
function useOptionRegistry(labels) {
|
|
10
|
+
const [registry] = useState(() => /* @__PURE__ */ new Map());
|
|
11
|
+
const [optionCount, setOptionCount] = useState(0);
|
|
12
|
+
const [statusCount, setStatusCount] = useState(0);
|
|
13
|
+
const statusCountRef = useRef(0);
|
|
14
|
+
const [labelCount, setLabelCount] = useState(0);
|
|
15
|
+
const warnedDuplicate = useRef(false);
|
|
16
|
+
return {
|
|
17
|
+
registry,
|
|
18
|
+
optionCount,
|
|
19
|
+
statusCount,
|
|
20
|
+
statusCountRef,
|
|
21
|
+
labelCount,
|
|
22
|
+
registerOption: useCallback((optionValue, entry) => {
|
|
23
|
+
const existing = registry.get(optionValue);
|
|
24
|
+
if (isDev && !warnedDuplicate.current && existing !== void 0 && existing.element !== entry.element && existing.element.isConnected) {
|
|
25
|
+
warnedDuplicate.current = true;
|
|
26
|
+
console.error(`Combobox.Option: two options have the value ${JSON.stringify(optionValue)}. Option ids are derived from the value, so they must be unique within one Combobox.`);
|
|
27
|
+
}
|
|
28
|
+
registry.set(optionValue, entry);
|
|
29
|
+
labels.set(optionValue, entry.label ?? (entry.element.textContent ?? "").trim());
|
|
30
|
+
setOptionCount(registry.size);
|
|
31
|
+
return () => {
|
|
32
|
+
if (registry.get(optionValue) === entry) registry.delete(optionValue);
|
|
33
|
+
setOptionCount(registry.size);
|
|
34
|
+
};
|
|
35
|
+
}, [registry, labels]),
|
|
36
|
+
registerStatus: useCallback(() => {
|
|
37
|
+
statusCountRef.current += 1;
|
|
38
|
+
setStatusCount((count) => count + 1);
|
|
39
|
+
return () => {
|
|
40
|
+
statusCountRef.current -= 1;
|
|
41
|
+
setStatusCount((count) => count - 1);
|
|
42
|
+
};
|
|
43
|
+
}, []),
|
|
44
|
+
registerLabel: useCallback(() => {
|
|
45
|
+
setLabelCount((count) => count + 1);
|
|
46
|
+
return () => setLabelCount((count) => count - 1);
|
|
47
|
+
}, []),
|
|
48
|
+
orderedOptions: useCallback(() => {
|
|
49
|
+
const options = [];
|
|
50
|
+
for (const [optionValue, entry] of registry) options.push({
|
|
51
|
+
value: optionValue,
|
|
52
|
+
...entry
|
|
53
|
+
});
|
|
54
|
+
options.sort((a, b) => a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1);
|
|
55
|
+
return options;
|
|
56
|
+
}, [registry])
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { useOptionRegistry };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=use-option-registry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-option-registry.mjs","names":[],"sources":["../../src/combobox/use-option-registry.ts"],"sourcesContent":["\"use client\";\nimport { useCallback, useRef, useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport type { ComboboxOptionEntry } from \"./combobox-context.js\";\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\nexport interface OrderedOption extends ComboboxOptionEntry {\n readonly value: string;\n}\n\nexport interface OptionRegistry {\n /** The mounted Options by value. */\n readonly registry: ReadonlyMap<string, ComboboxOptionEntry>;\n readonly optionCount: number;\n readonly statusCount: number;\n /**\n * The same count for the announcement effect: the open commit's passive effects can run before\n * the re-render the Status's registration scheduled (the race `registry` avoids for options).\n */\n readonly statusCountRef: RefObject<number>;\n readonly labelCount: number;\n readonly registerOption: (value: string, entry: ComboboxOptionEntry) => () => void;\n readonly registerStatus: () => () => void;\n readonly registerLabel: () => () => void;\n /** The registered Options in document order. */\n readonly orderedOptions: () => OrderedOption[];\n}\n\n/**\n * The Options, Statuses and Labels mounted in a Combobox (design/components/combobox.md 2, 6.5).\n * An Option's label is learnt into `labels` (design 2.3) as it registers.\n */\nexport function useOptionRegistry(labels: Map<string, string>): OptionRegistry {\n const [registry] = useState(() => new Map<string, ComboboxOptionEntry>());\n const [optionCount, setOptionCount] = useState(0);\n const [statusCount, setStatusCount] = useState(0);\n const statusCountRef = useRef(0);\n const [labelCount, setLabelCount] = useState(0);\n const warnedDuplicate = useRef(false);\n\n const registerOption = useCallback(\n (optionValue: string, entry: ComboboxOptionEntry) => {\n const existing = registry.get(optionValue);\n if (\n isDev &&\n !warnedDuplicate.current &&\n existing !== undefined &&\n existing.element !== entry.element &&\n existing.element.isConnected\n ) {\n warnedDuplicate.current = true;\n console.error(\n `Combobox.Option: two options have the value ${JSON.stringify(optionValue)}. ` +\n \"Option ids are derived from the value, so they must be unique within one Combobox.\",\n );\n }\n registry.set(optionValue, entry);\n labels.set(optionValue, entry.label ?? (entry.element.textContent ?? \"\").trim());\n setOptionCount(registry.size);\n return () => {\n if (registry.get(optionValue) === entry) registry.delete(optionValue);\n setOptionCount(registry.size);\n };\n },\n [registry, labels],\n );\n\n const registerStatus = useCallback(() => {\n statusCountRef.current += 1;\n setStatusCount((count) => count + 1);\n return () => {\n statusCountRef.current -= 1;\n setStatusCount((count) => count - 1);\n };\n }, []);\n\n const registerLabel = useCallback(() => {\n setLabelCount((count) => count + 1);\n return () => setLabelCount((count) => count - 1);\n }, []);\n\n const orderedOptions = useCallback((): OrderedOption[] => {\n const options: OrderedOption[] = [];\n for (const [optionValue, entry] of registry) options.push({ value: optionValue, ...entry });\n options.sort((a, b) =>\n a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1,\n );\n return options;\n }, [registry]);\n\n return {\n registry,\n optionCount,\n statusCount,\n statusCountRef,\n labelCount,\n registerOption,\n registerStatus,\n registerLabel,\n orderedOptions,\n };\n}\n"],"mappings":";;;AAKA,MAAM,QAAQ,QAAQ,IAAI,aAAa;;;;;AA4BvC,SAAgB,kBAAkB,QAA6C;CAC7E,MAAM,CAAC,YAAY,+BAAe,IAAI,IAAiC,CAAC;CACxE,MAAM,CAAC,aAAa,kBAAkB,SAAS,CAAC;CAChD,MAAM,CAAC,aAAa,kBAAkB,SAAS,CAAC;CAChD,MAAM,iBAAiB,OAAO,CAAC;CAC/B,MAAM,CAAC,YAAY,iBAAiB,SAAS,CAAC;CAC9C,MAAM,kBAAkB,OAAO,KAAK;CAoDpC,OAAO;EACL;EACA;EACA;EACA;EACA;EACA,gBAxDqB,aACpB,aAAqB,UAA+B;GACnD,MAAM,WAAW,SAAS,IAAI,WAAW;GACzC,IACE,SACA,CAAC,gBAAgB,WACjB,aAAa,KAAA,KACb,SAAS,YAAY,MAAM,WAC3B,SAAS,QAAQ,aACjB;IACA,gBAAgB,UAAU;IAC1B,QAAQ,MACN,+CAA+C,KAAK,UAAU,WAAW,EAAE,qFAE7E;GACF;GACA,SAAS,IAAI,aAAa,KAAK;GAC/B,OAAO,IAAI,aAAa,MAAM,UAAU,MAAM,QAAQ,eAAe,GAAA,CAAI,KAAK,CAAC;GAC/E,eAAe,SAAS,IAAI;GAC5B,aAAa;IACX,IAAI,SAAS,IAAI,WAAW,MAAM,OAAO,SAAS,OAAO,WAAW;IACpE,eAAe,SAAS,IAAI;GAC9B;EACF,GACA,CAAC,UAAU,MAAM,CAgCJ;EACb,gBA9BqB,kBAAkB;GACvC,eAAe,WAAW;GAC1B,gBAAgB,UAAU,QAAQ,CAAC;GACnC,aAAa;IACX,eAAe,WAAW;IAC1B,gBAAgB,UAAU,QAAQ,CAAC;GACrC;EACF,GAAG,CAAC,CAuBW;EACb,eAtBoB,kBAAkB;GACtC,eAAe,UAAU,QAAQ,CAAC;GAClC,aAAa,eAAe,UAAU,QAAQ,CAAC;EACjD,GAAG,CAAC,CAmBU;EACZ,gBAlBqB,kBAAmC;GACxD,MAAM,UAA2B,CAAC;GAClC,KAAK,MAAM,CAAC,aAAa,UAAU,UAAU,QAAQ,KAAK;IAAE,OAAO;IAAa,GAAG;GAAM,CAAC;GAC1F,QAAQ,MAAM,GAAG,MACf,EAAE,QAAQ,wBAAwB,EAAE,OAAO,IAAI,KAAK,8BAA8B,KAAK,CACzF;GACA,OAAO;EACT,GAAG,CAAC,QAAQ,CAWG;CACf;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close.d.mts","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"dialog-close.d.mts","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"mappings":";;;iBAOiB;;WAEN;WACA;;;iBAIM,2BAA2B;;WAEjC;;iBAGM,yBAAyB,KACxC;;;;;;;;;;EAYA,SAAS,QAAQ,SAAS;;EAE1B;;;;;;EAMA;EACA,YAAY,+BAA+B;EAC3C,QAAQ,WAAW,2BAA2B;EAC9C,WAAW,WAAW,WAAW;EACjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;wBAgBvC,cACd,QACA,OACA,UACA,WACA,OACA,UACA,WACG,QACF,mBAAgB;yBATH"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createActionDetails } from "../internal/action-details.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { useActionTrigger } from "../internal/use-action-trigger.mjs";
|
|
5
|
-
import { isHostButton, rendersButton } from "../internal/render-element.mjs";
|
|
6
|
-
import { useRender } from "../internal/use-render.mjs";
|
|
3
|
+
import { useOverlayClose } from "../internal/use-overlay-close.mjs";
|
|
7
4
|
import { useDialogContext } from "./dialog-context.mjs";
|
|
8
|
-
import { useCallback } from "react";
|
|
9
5
|
//#region src/dialog/dialog-close.tsx
|
|
10
|
-
const isDev = process.env.NODE_ENV !== "production";
|
|
11
6
|
/**
|
|
12
7
|
* A close button: `<button type="button" commandfor command="request-close">`. In JS-free mode
|
|
13
8
|
* without `action` the browser closes the dialog (a close request: `cancel`, then `close`), with
|
|
@@ -23,66 +18,38 @@ const isDev = process.env.NODE_ENV !== "production";
|
|
|
23
18
|
*/
|
|
24
19
|
function DialogClose({ action, value, disabled = false, className, style, children, render, ...rest }) {
|
|
25
20
|
const ctx = useDialogContext("Dialog.Close");
|
|
26
|
-
const {
|
|
27
|
-
const { ids, dialogRef, recordCloseIntent } = ctx;
|
|
21
|
+
const { popupRef, recordCloseIntent } = ctx;
|
|
28
22
|
const isLibrary = ctx.mode === "library";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
event.preventDefault();
|
|
55
|
-
if (disabled) return;
|
|
56
|
-
const native = event.nativeEvent;
|
|
57
|
-
const returnValue = value ?? "";
|
|
58
|
-
if (action === void 0) {
|
|
59
|
-
close(native, returnValue);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const details = createActionDetails(native, { returnValue });
|
|
63
|
-
run(() => action(details), () => close(native, returnValue));
|
|
64
|
-
};
|
|
65
|
-
const libraryProps = {
|
|
66
|
-
...rendersButton(render) && { type: "button" },
|
|
67
|
-
disabled: focusable ? void 0 : disabled,
|
|
68
|
-
commandfor: noInvoker ? void 0 : ids.dialog,
|
|
69
|
-
command: noInvoker ? void 0 : "request-close",
|
|
70
|
-
value,
|
|
71
|
-
...installClick && { onClick },
|
|
72
|
-
"aria-disabled": pending || focusable && disabled ? true : void 0,
|
|
73
|
-
"data-pending": dataAttr(pending),
|
|
74
|
-
"data-disabled": dataAttr(disabled)
|
|
75
|
-
};
|
|
76
|
-
return useRender({
|
|
77
|
-
defaultElement: "button",
|
|
78
|
-
render,
|
|
79
|
-
state,
|
|
23
|
+
return useOverlayClose({
|
|
24
|
+
part: "Dialog.Close",
|
|
25
|
+
noun: "dialog",
|
|
26
|
+
isLibrary,
|
|
27
|
+
popupId: ctx.ids.popup,
|
|
28
|
+
command: "request-close",
|
|
29
|
+
openGeneration: ctx.openGeneration,
|
|
30
|
+
action,
|
|
31
|
+
details: (event) => createActionDetails(event, { returnValue: value ?? "" }),
|
|
32
|
+
close: (event) => {
|
|
33
|
+
const returnValue = value ?? "";
|
|
34
|
+
if (isLibrary) {
|
|
35
|
+
ctx.requestClose(event, "activate", returnValue);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const dialog = popupRef.current;
|
|
39
|
+
if (dialog === null || !dialog.open) return;
|
|
40
|
+
recordCloseIntent({
|
|
41
|
+
reason: "activate",
|
|
42
|
+
event
|
|
43
|
+
});
|
|
44
|
+
dialog.close(returnValue);
|
|
45
|
+
},
|
|
46
|
+
ownProps: { value },
|
|
47
|
+
disabled,
|
|
80
48
|
className,
|
|
81
49
|
style,
|
|
82
50
|
children,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
ref: devRef
|
|
51
|
+
render,
|
|
52
|
+
rest
|
|
86
53
|
});
|
|
87
54
|
}
|
|
88
55
|
DialogClose.displayName = "DialogClose";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close.mjs","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"sourcesContent":["\"use client\";\nimport
|
|
1
|
+
{"version":3,"file":"dialog-close.mjs","names":[],"sources":["../../src/dialog/dialog-close.tsx"],"sourcesContent":["\"use client\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { createActionDetails } from \"../internal/action-details.js\";\nimport type { Action, ActionDetails, RenderProp, StateValue } from \"../internal/types.js\";\nimport { useOverlayClose } from \"../internal/use-overlay-close.js\";\nimport { useDialogContext } from \"./dialog-context.js\";\n\nexport interface DialogCloseState {\n /** The `action` is in flight. */\n readonly pending: boolean;\n readonly disabled: boolean;\n}\n\n/** Details passed to `Dialog.Close`'s `action`. */\nexport interface DialogCloseDetails extends ActionDetails {\n /** The `value` the dialog closes with (`dialog.returnValue`); `\"\"` without `value`. */\n readonly returnValue: string;\n}\n\nexport interface DialogCloseProps extends Omit<\n ComponentPropsWithRef<\"button\">,\n \"onClick\" | \"value\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * Runs inside this part's own transition (`data-pending` on the button), then closes the\n * dialog with `value` as `returnValue`: in library mode through the Root\n * (`openChangeAction(false)` awaited, view transition if set), in JS-free mode with\n * `close(value)`. A rejection reaches the nearest Error Boundary above the Close part and\n * leaves the dialog open. If the dialog was dismissed and opened again while the action ran,\n * the close is dropped: it belonged to the earlier open. Without `action` in JS-free mode the\n * button is a native `command=\"request-close\"` invoker.\n */\n action?: Action<[details: DialogCloseDetails]>;\n /** Becomes `dialog.returnValue` (and `details.returnValue` of `openChangeAction(false)`). */\n value?: string;\n /**\n * Never closes. Native `disabled` on a `<button>`; owned, so a `render` element cannot\n * re-enable it. With a link or component `render` whose click this part handles (library mode,\n * or with `action`), `aria-disabled=\"true\"` instead: the element stays focusable.\n */\n disabled?: boolean;\n className?: StateValue<string | undefined, DialogCloseState>;\n style?: StateValue<CSSProperties | undefined, DialogCloseState>;\n children?: StateValue<ReactNode, DialogCloseState>;\n render?: RenderProp<ComponentPropsWithRef<\"button\">, DialogCloseState>;\n}\n\n/**\n * A close button: `<button type=\"button\" commandfor command=\"request-close\">`. In JS-free mode\n * without `action` the browser closes the dialog (a close request: `cancel`, then `close`), with\n * `value` as the `returnValue`. In library mode the click is always cancelled and the close goes\n * through the Root (`openChangeAction(false)` awaited, then `close(value)` in the commit, inside\n * the view transition if the Popup's `transition` is set). With `action` the action runs first in\n * this part's own transition (`data-pending` and `aria-disabled` on the button; a second click\n * meanwhile is ignored); a rejection leaves the dialog open.\n *\n * Owned keys (conventions 1.2): `type` (on a `<button>` only), `disabled`, `commandfor`,\n * `command`, `value`, `onClick` (library mode, or with `action`), `aria-disabled`, `data-pending`,\n * `data-disabled`.\n */\nexport function DialogClose({\n action,\n value,\n disabled = false,\n className,\n style,\n children,\n render,\n ...rest\n}: DialogCloseProps) {\n const ctx = useDialogContext(\"Dialog.Close\");\n const { popupRef, recordCloseIntent } = ctx;\n const isLibrary = ctx.mode === \"library\";\n return useOverlayClose({\n part: \"Dialog.Close\",\n noun: \"dialog\",\n isLibrary,\n popupId: ctx.ids.popup,\n command: \"request-close\",\n openGeneration: ctx.openGeneration,\n action,\n details: (event) => createActionDetails(event, { returnValue: value ?? \"\" }),\n close: (event) => {\n const returnValue = value ?? \"\";\n if (isLibrary) {\n // A library-owned close (design 2.3): awaited, then `close(returnValue)` in the commit. A\n // no-op when `false` is already intended (a repeated click, or a dismissal meanwhile).\n ctx.requestClose(event, \"activate\", returnValue);\n return;\n }\n // JS-free mode with `action`: a browser-owned close; there is no Root state to go through.\n const dialog = popupRef.current;\n if (dialog === null || !dialog.open) return;\n recordCloseIntent({ reason: \"activate\", event });\n dialog.close(returnValue);\n },\n ownProps: { value },\n disabled,\n className,\n style,\n children,\n render,\n rest,\n });\n}\n\nDialogClose.displayName = \"DialogClose\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4DA,SAAgB,YAAY,EAC1B,QACA,OACA,WAAW,OACX,WACA,OACA,UACA,QACA,GAAG,QACgB;CACnB,MAAM,MAAM,iBAAiB,cAAc;CAC3C,MAAM,EAAE,UAAU,sBAAsB;CACxC,MAAM,YAAY,IAAI,SAAS;CAC/B,OAAO,gBAAgB;EACrB,MAAM;EACN,MAAM;EACN;EACA,SAAS,IAAI,IAAI;EACjB,SAAS;EACT,gBAAgB,IAAI;EACpB;EACA,UAAU,UAAU,oBAAoB,OAAO,EAAE,aAAa,SAAS,GAAG,CAAC;EAC3E,QAAQ,UAAU;GAChB,MAAM,cAAc,SAAS;GAC7B,IAAI,WAAW;IAGb,IAAI,aAAa,OAAO,YAAY,WAAW;IAC/C;GACF;GAEA,MAAM,SAAS,SAAS;GACxB,IAAI,WAAW,QAAQ,CAAC,OAAO,MAAM;GACrC,kBAAkB;IAAE,QAAQ;IAAY;GAAM,CAAC;GAC/C,OAAO,MAAM,WAAW;EAC1B;EACA,UAAU,EAAE,MAAM;EAClB;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;AACH;AAEA,YAAY,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-context.mjs","names":[],"sources":["../../src/dialog/dialog-context.ts"],"sourcesContent":["\"use client\";\nimport { createContext, use } from \"react\";\nimport type {
|
|
1
|
+
{"version":3,"file":"dialog-context.mjs","names":[],"sources":["../../src/dialog/dialog-context.ts"],"sourcesContent":["\"use client\";\nimport { createContext, use } from \"react\";\nimport type { ChangeReason } from \"../internal/types.js\";\nimport type { OverlayRootValue } from \"../internal/use-overlay-root.js\";\n\n/**\n * The Root's machinery (`useOverlayRoot`, as Popover's) with the `<dialog>` as the popup element\n * and a close's `returnValue`. `mode` \"static\" is JS-free mode, where the browser owns open and\n * close through Invoker Commands; in \"library\" mode opening and the closes a part asks for are\n * library-owned, dismissals browser-owned and notified (design section 2).\n */\nexport interface DialogContextValue extends OverlayRootValue<\n HTMLDialogElement,\n [returnValue: string]\n> {\n readonly modal: boolean;\n /**\n * A library-owned close (library mode, design 2.3): a Close part, a `method=\"dialog\"` submit,\n * a Form's settle close, a foreign close command. Records `returnValue` for the apply effect's\n * `close()` and dispatches `false` (`openChangeAction(false)` awaited). A no-op when `false` is\n * already intended. `notifyClosed` (a native close) records nothing.\n */\n readonly requestClose: (\n event: Event | undefined,\n reason: ChangeReason,\n returnValue: string,\n ) => void;\n /**\n * Read and clear the `returnValue` of the pending part-initiated close, for the apply effect's\n * `close()`; `\"\"` when there is none (a controlled close).\n */\n readonly takeCloseReturnValue: () => string;\n}\n\nexport const DialogContext = createContext<DialogContextValue | null>(null);\n\nexport function useDialogContext(part: string): DialogContextValue {\n const context = use(DialogContext);\n if (context === null) {\n throw new Error(`${part} must be rendered inside a Dialog.Root.`);\n }\n return context;\n}\n"],"mappings":";;;AAkCA,MAAa,gBAAgB,cAAyC,IAAI;AAE1E,SAAgB,iBAAiB,MAAkC;CACjE,MAAM,UAAU,IAAI,aAAa;CACjC,IAAI,YAAY,MACd,MAAM,IAAI,MAAM,GAAG,KAAK,wCAAwC;CAElE,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-form.d.mts","names":[],"sources":["../../src/dialog/dialog-form.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"dialog-form.d.mts","names":[],"sources":["../../src/dialog/dialog-form.tsx"],"mappings":";;;iBAaiB;;WAEN;;iBAGM,wBAAwB,KACvC;;;;;;;;;;;;EAcA,oBAAoB,UAAU;;;;;;;;;;;;;;;;;;;EAmB9B;;;;;EAKA,SAAS;EACT,YAAY,+BAA+B;EAC3C,QAAQ,WAAW,2BAA2B;EAC9C,WAAW,WAAW,WAAW;EACjC,SAAS,WAAW,+BAA+B;;;;;;;;;;;;;;;;;;wBAmBrC,aACd,QACA,eACA,QACA,WACA,OACA,UACA,WACG,QACF,kBAAe;yBATF"}
|
|
@@ -9,6 +9,7 @@ import { hasAnyError } from "../internal/validity.mjs";
|
|
|
9
9
|
import { use, useCallback, useRef, useState } from "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/dialog/dialog-form.tsx
|
|
12
|
+
const isDev = process.env.NODE_ENV !== "production";
|
|
12
13
|
/**
|
|
13
14
|
* A form that completes the dialog. Without `action`: `<form method="dialog">`, so a submit
|
|
14
15
|
* closes the dialog with the submitter's `value` as `returnValue` (natively in JS-free mode;
|
|
@@ -27,7 +28,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
27
28
|
*/
|
|
28
29
|
function DialogForm({ action, closeOnSettle = true, method, className, style, children, render, ...rest }) {
|
|
29
30
|
const ctx = useDialogContext("Dialog.Form");
|
|
30
|
-
const {
|
|
31
|
+
const { popupRef, recordCloseIntent, requestClose } = ctx;
|
|
31
32
|
const isLibrary = ctx.mode === "library";
|
|
32
33
|
const [pending, setPending] = useState(false);
|
|
33
34
|
const submission = useRef(null);
|
|
@@ -55,7 +56,7 @@ function DialogForm({ action, closeOnSettle = true, method, className, style, ch
|
|
|
55
56
|
};
|
|
56
57
|
}, []);
|
|
57
58
|
const onSettled = useCallback((clean) => {
|
|
58
|
-
const dialog =
|
|
59
|
+
const dialog = popupRef.current;
|
|
59
60
|
const submitted = submission.current;
|
|
60
61
|
submission.current = null;
|
|
61
62
|
if (!closeOnSettle || closedSinceSubmit.current) return;
|
|
@@ -73,7 +74,7 @@ function DialogForm({ action, closeOnSettle = true, method, className, style, ch
|
|
|
73
74
|
dialog.close(returnValue);
|
|
74
75
|
}, [
|
|
75
76
|
closeOnSettle,
|
|
76
|
-
|
|
77
|
+
popupRef,
|
|
77
78
|
isLibrary,
|
|
78
79
|
recordCloseIntent,
|
|
79
80
|
requestClose
|
|
@@ -107,7 +108,7 @@ DialogForm.displayName = "DialogForm";
|
|
|
107
108
|
*/
|
|
108
109
|
function DialogFormSettle({ watches, missingAction, onPendingChange, onSettled }) {
|
|
109
110
|
const form = use(FormContext);
|
|
110
|
-
useDevWarning(form !== null && missingAction, "`Dialog.Form` rendered as a `Form.Root` needs a function `action`; without one the form navigates instead of closing the dialog. Render a plain `<Dialog.Form>` for a `method=\"dialog\"` form.");
|
|
111
|
+
useDevWarning(form !== null && missingAction, isDev && "`Dialog.Form` rendered as a `Form.Root` needs a function `action`; without one the form navigates instead of closing the dialog. Render a plain `<Dialog.Form>` for a `method=\"dialog\"` form.");
|
|
111
112
|
const isForm = form !== null;
|
|
112
113
|
const errors = form?.errors;
|
|
113
114
|
const settled = useCallback(() => onSettled(!isForm || !hasAnyError(errors)), [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-form.mjs","names":[],"sources":["../../src/dialog/dialog-form.tsx"],"sourcesContent":["\"use client\";\nimport { use, useCallback, useRef, useState } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { FormContext } from \"../internal/field-context.js\";\nimport { FormStatusWatcher } from \"../internal/form-status-watcher.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useDevWarning } from \"../internal/use-dev-warning.js\";\nimport { resolveStateValue, useRender } from \"../internal/use-render.js\";\nimport { hasAnyError } from \"../internal/validity.js\";\nimport { useDialogContext } from \"./dialog-context.js\";\n\nexport interface DialogFormState {\n /** `useFormStatus().pending` of this form, exposed for `className` / `children` functions. */\n readonly pending: boolean;\n}\n\nexport interface DialogFormProps extends Omit<\n ComponentPropsWithRef<\"form\">,\n \"method\" | \"action\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * React form action (`(formData) => unknown`, may be a Server Function). Passed to the form\n * unwrapped so React's progressive enhancement is kept; the dialog closes with the submitter's\n * `value` as `returnValue` once the action's transition settles (see `closeOnSettle`): in\n * library mode through the Root (`openChangeAction(false)` awaited, view transition if set),\n * in JS-free mode with `close(value)`. A rejection leaves the dialog open. Without `action`\n * the form renders `method=\"dialog\"`: submitting closes the dialog, natively in JS-free mode\n * and through the Root in library mode (a `preventDefault()` in your own `onSubmit` blocks\n * both; `stopPropagation()` there leaves the close to the browser, notified as a dismissal).\n * A string `action` (a URL) is a plain navigating form.\n */\n action?: string | ((formData: FormData) => unknown);\n /**\n * With a function `action`: close the dialog once the action's transition settles without\n * throwing and, when this form is rendered as a `Form.Root`\n * (`render={<Form.Root errors={state.errors} />}`), with no field error: a settle whose\n * `errors` has a non-empty entry (hidden stale ones included, the `autoReset` rule) keeps\n * the dialog open and the Form focuses the first errored field. Default `true`.\n *\n * Without a `Form.Root` the library never sees a result, so any settle that does not throw\n * counts, including a `useActionState` result that reports errors: render the form as a\n * `Form.Root` to route them, throw to keep the dialog open, or set `closeOnSettle={false}`\n * and close it yourself (a `Dialog.Close`, a submit button in a separate `method=\"dialog\"`\n * form, or a controlled `open`). A `formMethod=\"dialog\"` submitter inside this form cannot\n * close it: React prevents every submit of a form with a function `action` and runs the\n * action again.\n *\n * The dialog is not closed either when it was closed (Escape, a Close part) while the action\n * ran, also if the user re-opened it meanwhile.\n */\n closeOnSettle?: boolean;\n /**\n * Only with a string `action` (a navigating form, for example `\"post\"`). Owned otherwise:\n * `\"dialog\"` without `action`, React's own with a function `action`.\n */\n method?: ComponentPropsWithRef<\"form\">[\"method\"];\n className?: StateValue<string | undefined, DialogFormState>;\n style?: StateValue<CSSProperties | undefined, DialogFormState>;\n children?: StateValue<ReactNode, DialogFormState>;\n render?: RenderProp<ComponentPropsWithRef<\"form\">, DialogFormState>;\n}\n\n/**\n * A form that completes the dialog. Without `action`: `<form method=\"dialog\">`, so a submit\n * closes the dialog with the submitter's `value` as `returnValue` (natively in JS-free mode;\n * in library mode the Popup cancels the submission and closes through the Root). With a\n * function `action`: `<form action={action}>` (React overrides the method) and a status watcher\n * that closes the dialog once the action has settled, with the submitter's `value`, unless\n * `closeOnSettle` is `false`, the dialog was closed while the action ran, or the form is rendered\n * as a `Form.Root` and the result has a field error (`render={<Form.Root errors={...} />}`, the\n * recommended composition for validation).\n *\n * `DialogFormState.pending` is this form's own status; it is not emitted as `data-pending` and\n * is not folded into any control's `pending` (conventions 2.7). Submit buttons read\n * `useFormStatus()` themselves.\n *\n * Owned keys (conventions 1.2): `method` (except with a string `action`), `action`.\n */\nexport function DialogForm({\n action,\n closeOnSettle = true,\n method,\n className,\n style,\n children,\n render,\n ...rest\n}: DialogFormProps) {\n const ctx = useDialogContext(\"Dialog.Form\");\n const { dialogRef, recordCloseIntent, requestClose } = ctx;\n const isLibrary = ctx.mode === \"library\";\n const [pending, setPending] = useState(false);\n const submission = useRef<{ event: Event; returnValue: string } | null>(null);\n // The dialog closed after the last submit (Escape, a Close part): the settle must not close it\n // again, also when the user re-opened it meanwhile (the review's walkthrough 11.8 variant).\n const closedSinceSubmit = useRef(false);\n const watches = typeof action === \"function\";\n\n // The submitter's `value` comes from the native `submit` event (capture, before React's\n // handler runs the action).\n const libraryRef = useCallback((form: HTMLFormElement) => {\n const onSubmit = (event: Event) => {\n if (event.target !== form) return;\n const submitter = (event as SubmitEvent).submitter as\n | HTMLButtonElement\n | HTMLInputElement\n | null;\n submission.current = { event, returnValue: submitter?.value ?? \"\" };\n closedSinceSubmit.current = false;\n };\n const dialog = form.closest(\"dialog\");\n const onClose = (event: Event) => {\n if (event.target === dialog) closedSinceSubmit.current = true;\n };\n form.addEventListener(\"submit\", onSubmit, true);\n dialog?.addEventListener(\"close\", onClose);\n return () => {\n form.removeEventListener(\"submit\", onSubmit, true);\n dialog?.removeEventListener(\"close\", onClose);\n };\n }, []);\n\n // `clean`: no field error in the settle's result (always `true` without a `Form.Root`).\n const onSettled = useCallback(\n (clean: boolean) => {\n const dialog = dialogRef.current;\n const submitted = submission.current;\n submission.current = null;\n if (!closeOnSettle || closedSinceSubmit.current) return;\n // A result with field errors keeps the dialog open; the Form.Root focuses the first errored\n // field (design/components/dialog.md, \"Dialog.Form and Form.Root\").\n if (!clean) return;\n if (dialog === null || !dialog.open) return;\n const returnValue = submitted?.returnValue ?? \"\";\n if (isLibrary) {\n // A library-owned close (design 2.3): `openChangeAction(false)` awaited, then\n // `close(returnValue)` in the commit, inside the view transition if set.\n requestClose(submitted?.event, \"activate\", returnValue);\n return;\n }\n recordCloseIntent({ reason: \"activate\", event: submitted?.event });\n dialog.close(returnValue);\n },\n [closeOnSettle, dialogRef, isLibrary, recordCloseIntent, requestClose],\n );\n\n const state: DialogFormState = { pending };\n\n return useRender<ComponentPropsWithRef<\"form\">, DialogFormState>({\n defaultElement: \"form\",\n render,\n state,\n className,\n style,\n children: (s) => (\n <>\n {resolveStateValue(children, s)}\n <DialogFormSettle\n watches={watches}\n missingAction={action === undefined}\n onPendingChange={setPending}\n onSettled={onSettled}\n />\n </>\n ),\n props: rest,\n libraryProps: {\n method: action === undefined ? \"dialog\" : typeof action === \"string\" ? method : undefined,\n // React's own type wants `void | Promise<void>`; the library's actions return `unknown`\n // (conventions 2.2) and React ignores the result.\n action: action as ComponentPropsWithRef<\"form\">[\"action\"],\n },\n ref: libraryRef,\n });\n}\n\nDialogForm.displayName = \"DialogForm\";\n\n/**\n * Rendered among the form's children, so it reads the `FormContext` exactly when the form is a\n * `Form.Root` (either orientation of the `render` composition): the settle close then waits for\n * a result with no field error (`hasAnyError`, the `autoReset` predicate, hidden stale entries\n * included).\n */\nfunction DialogFormSettle({\n watches,\n missingAction,\n onPendingChange,\n onSettled,\n}: {\n readonly watches: boolean;\n readonly missingAction: boolean;\n readonly onPendingChange: (pending: boolean) => void;\n readonly onSettled: (clean: boolean) => void;\n}) {\n const form = use(FormContext);\n useDevWarning(\n form !== null && missingAction,\n \"`Dialog.Form` rendered as a `Form.Root` needs a function `action`; without one the form \" +\n \"navigates instead of closing the dialog. Render a plain `<Dialog.Form>` for a \" +\n '`method=\"dialog\"` form.',\n );\n const isForm = form !== null;\n const errors = form?.errors;\n const settled = useCallback(\n () => onSettled(!isForm || !hasAnyError(errors)),\n [isForm, errors, onSettled],\n );\n if (!watches) return null;\n return <FormStatusWatcher onPendingChange={onPendingChange} onSettled={settled} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,SAAgB,WAAW,EACzB,QACA,gBAAgB,MAChB,QACA,WACA,OACA,UACA,QACA,GAAG,QACe;CAClB,MAAM,MAAM,iBAAiB,aAAa;CAC1C,MAAM,EAAE,WAAW,mBAAmB,iBAAiB;CACvD,MAAM,YAAY,IAAI,SAAS;CAC/B,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,aAAa,OAAqD,IAAI;CAG5E,MAAM,oBAAoB,OAAO,KAAK;CACtC,MAAM,UAAU,OAAO,WAAW;CAIlC,MAAM,aAAa,aAAa,SAA0B;EACxD,MAAM,YAAY,UAAiB;GACjC,IAAI,MAAM,WAAW,MAAM;GAC3B,MAAM,YAAa,MAAsB;GAIzC,WAAW,UAAU;IAAE;IAAO,aAAa,WAAW,SAAS;GAAG;GAClE,kBAAkB,UAAU;EAC9B;EACA,MAAM,SAAS,KAAK,QAAQ,QAAQ;EACpC,MAAM,WAAW,UAAiB;GAChC,IAAI,MAAM,WAAW,QAAQ,kBAAkB,UAAU;EAC3D;EACA,KAAK,iBAAiB,UAAU,UAAU,IAAI;EAC9C,QAAQ,iBAAiB,SAAS,OAAO;EACzC,aAAa;GACX,KAAK,oBAAoB,UAAU,UAAU,IAAI;GACjD,QAAQ,oBAAoB,SAAS,OAAO;EAC9C;CACF,GAAG,CAAC,CAAC;CAGL,MAAM,YAAY,aACf,UAAmB;EAClB,MAAM,SAAS,UAAU;EACzB,MAAM,YAAY,WAAW;EAC7B,WAAW,UAAU;EACrB,IAAI,CAAC,iBAAiB,kBAAkB,SAAS;EAGjD,IAAI,CAAC,OAAO;EACZ,IAAI,WAAW,QAAQ,CAAC,OAAO,MAAM;EACrC,MAAM,cAAc,WAAW,eAAe;EAC9C,IAAI,WAAW;GAGb,aAAa,WAAW,OAAO,YAAY,WAAW;GACtD;EACF;EACA,kBAAkB;GAAE,QAAQ;GAAY,OAAO,WAAW;EAAM,CAAC;EACjE,OAAO,MAAM,WAAW;CAC1B,GACA;EAAC;EAAe;EAAW;EAAW;EAAmB;CAAY,CACvE;CAIA,OAAO,UAA0D;EAC/D,gBAAgB;EAChB;EACA,OAAA,EAL+B,QAK3B;EACJ;EACA;EACA,WAAW,MACT,qBAAA,UAAA,EAAA,UAAA,CACG,kBAAkB,UAAU,CAAC,GAC9B,oBAAC,kBAAD;GACW;GACT,eAAe,WAAW,KAAA;GAC1B,iBAAiB;GACN;EACZ,CAAA,CACD,EAAA,CAAA;EAEJ,OAAO;EACP,cAAc;GACZ,QAAQ,WAAW,KAAA,IAAY,WAAW,OAAO,WAAW,WAAW,SAAS,KAAA;GAGxE;EACV;EACA,KAAK;CACP,CAAC;AACH;AAEA,WAAW,cAAc;;;;;;;AAQzB,SAAS,iBAAiB,EACxB,SACA,eACA,iBACA,aAMC;CACD,MAAM,OAAO,IAAI,WAAW;CAC5B,cACE,SAAS,QAAQ,eACjB,iMAGF;CACA,MAAM,SAAS,SAAS;CACxB,MAAM,SAAS,MAAM;CACrB,MAAM,UAAU,kBACR,UAAU,CAAC,UAAU,CAAC,YAAY,MAAM,CAAC,GAC/C;EAAC;EAAQ;EAAQ;CAAS,CAC5B;CACA,IAAI,CAAC,SAAS,OAAO;CACrB,OAAO,oBAAC,mBAAD;EAAoC;EAAiB,WAAW;CAAU,CAAA;AACnF"}
|
|
1
|
+
{"version":3,"file":"dialog-form.mjs","names":[],"sources":["../../src/dialog/dialog-form.tsx"],"sourcesContent":["\"use client\";\nimport { use, useCallback, useRef, useState } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { FormContext } from \"../internal/field-context.js\";\nimport { FormStatusWatcher } from \"../internal/form-status-watcher.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useDevWarning } from \"../internal/use-dev-warning.js\";\nimport { resolveStateValue, useRender } from \"../internal/use-render.js\";\nimport { hasAnyError } from \"../internal/validity.js\";\nimport { useDialogContext } from \"./dialog-context.js\";\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\nexport interface DialogFormState {\n /** `useFormStatus().pending` of this form, exposed for `className` / `children` functions. */\n readonly pending: boolean;\n}\n\nexport interface DialogFormProps extends Omit<\n ComponentPropsWithRef<\"form\">,\n \"method\" | \"action\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * React form action (`(formData) => unknown`, may be a Server Function). Passed to the form\n * unwrapped so React's progressive enhancement is kept; the dialog closes with the submitter's\n * `value` as `returnValue` once the action's transition settles (see `closeOnSettle`): in\n * library mode through the Root (`openChangeAction(false)` awaited, view transition if set),\n * in JS-free mode with `close(value)`. A rejection leaves the dialog open. Without `action`\n * the form renders `method=\"dialog\"`: submitting closes the dialog, natively in JS-free mode\n * and through the Root in library mode (a `preventDefault()` in your own `onSubmit` blocks\n * both; `stopPropagation()` there leaves the close to the browser, notified as a dismissal).\n * A string `action` (a URL) is a plain navigating form.\n */\n action?: string | ((formData: FormData) => unknown);\n /**\n * With a function `action`: close the dialog once the action's transition settles without\n * throwing and, when this form is rendered as a `Form.Root`\n * (`render={<Form.Root errors={state.errors} />}`), with no field error: a settle whose\n * `errors` has a non-empty entry (hidden stale ones included, the `autoReset` rule) keeps\n * the dialog open and the Form focuses the first errored field. Default `true`.\n *\n * Without a `Form.Root` the library never sees a result, so any settle that does not throw\n * counts, including a `useActionState` result that reports errors: render the form as a\n * `Form.Root` to route them, throw to keep the dialog open, or set `closeOnSettle={false}`\n * and close it yourself (a `Dialog.Close`, a submit button in a separate `method=\"dialog\"`\n * form, or a controlled `open`). A `formMethod=\"dialog\"` submitter inside this form cannot\n * close it: React prevents every submit of a form with a function `action` and runs the\n * action again.\n *\n * The dialog is not closed either when it was closed (Escape, a Close part) while the action\n * ran, also if the user re-opened it meanwhile.\n */\n closeOnSettle?: boolean;\n /**\n * Only with a string `action` (a navigating form, for example `\"post\"`). Owned otherwise:\n * `\"dialog\"` without `action`, React's own with a function `action`.\n */\n method?: ComponentPropsWithRef<\"form\">[\"method\"];\n className?: StateValue<string | undefined, DialogFormState>;\n style?: StateValue<CSSProperties | undefined, DialogFormState>;\n children?: StateValue<ReactNode, DialogFormState>;\n render?: RenderProp<ComponentPropsWithRef<\"form\">, DialogFormState>;\n}\n\n/**\n * A form that completes the dialog. Without `action`: `<form method=\"dialog\">`, so a submit\n * closes the dialog with the submitter's `value` as `returnValue` (natively in JS-free mode;\n * in library mode the Popup cancels the submission and closes through the Root). With a\n * function `action`: `<form action={action}>` (React overrides the method) and a status watcher\n * that closes the dialog once the action has settled, with the submitter's `value`, unless\n * `closeOnSettle` is `false`, the dialog was closed while the action ran, or the form is rendered\n * as a `Form.Root` and the result has a field error (`render={<Form.Root errors={...} />}`, the\n * recommended composition for validation).\n *\n * `DialogFormState.pending` is this form's own status; it is not emitted as `data-pending` and\n * is not folded into any control's `pending` (conventions 2.7). Submit buttons read\n * `useFormStatus()` themselves.\n *\n * Owned keys (conventions 1.2): `method` (except with a string `action`), `action`.\n */\nexport function DialogForm({\n action,\n closeOnSettle = true,\n method,\n className,\n style,\n children,\n render,\n ...rest\n}: DialogFormProps) {\n const ctx = useDialogContext(\"Dialog.Form\");\n const { popupRef, recordCloseIntent, requestClose } = ctx;\n const isLibrary = ctx.mode === \"library\";\n const [pending, setPending] = useState(false);\n const submission = useRef<{ event: Event; returnValue: string } | null>(null);\n // The dialog closed after the last submit (Escape, a Close part): the settle must not close it\n // again, also when the user re-opened it meanwhile.\n const closedSinceSubmit = useRef(false);\n const watches = typeof action === \"function\";\n\n // The submitter's `value` comes from the native `submit` event (capture, before React's\n // handler runs the action).\n const libraryRef = useCallback((form: HTMLFormElement) => {\n const onSubmit = (event: Event) => {\n if (event.target !== form) return;\n const submitter = (event as SubmitEvent).submitter as\n | HTMLButtonElement\n | HTMLInputElement\n | null;\n submission.current = { event, returnValue: submitter?.value ?? \"\" };\n closedSinceSubmit.current = false;\n };\n const dialog = form.closest(\"dialog\");\n const onClose = (event: Event) => {\n if (event.target === dialog) closedSinceSubmit.current = true;\n };\n form.addEventListener(\"submit\", onSubmit, true);\n dialog?.addEventListener(\"close\", onClose);\n return () => {\n form.removeEventListener(\"submit\", onSubmit, true);\n dialog?.removeEventListener(\"close\", onClose);\n };\n }, []);\n\n // `clean`: no field error in the settle's result (always `true` without a `Form.Root`).\n const onSettled = useCallback(\n (clean: boolean) => {\n const dialog = popupRef.current;\n const submitted = submission.current;\n submission.current = null;\n if (!closeOnSettle || closedSinceSubmit.current) return;\n // A result with field errors keeps the dialog open; the Form.Root focuses the first errored\n // field (design/components/dialog.md, \"Dialog.Form and Form.Root\").\n if (!clean) return;\n if (dialog === null || !dialog.open) return;\n const returnValue = submitted?.returnValue ?? \"\";\n if (isLibrary) {\n // A library-owned close (design 2.3): `openChangeAction(false)` awaited, then\n // `close(returnValue)` in the commit, inside the view transition if set.\n requestClose(submitted?.event, \"activate\", returnValue);\n return;\n }\n recordCloseIntent({ reason: \"activate\", event: submitted?.event });\n dialog.close(returnValue);\n },\n [closeOnSettle, popupRef, isLibrary, recordCloseIntent, requestClose],\n );\n\n const state: DialogFormState = { pending };\n\n return useRender<ComponentPropsWithRef<\"form\">, DialogFormState>({\n defaultElement: \"form\",\n render,\n state,\n className,\n style,\n children: (s) => (\n <>\n {resolveStateValue(children, s)}\n <DialogFormSettle\n watches={watches}\n missingAction={action === undefined}\n onPendingChange={setPending}\n onSettled={onSettled}\n />\n </>\n ),\n props: rest,\n libraryProps: {\n method: action === undefined ? \"dialog\" : typeof action === \"string\" ? method : undefined,\n // React's own type wants `void | Promise<void>`; the library's actions return `unknown`\n // (conventions 2.2) and React ignores the result.\n action: action as ComponentPropsWithRef<\"form\">[\"action\"],\n },\n ref: libraryRef,\n });\n}\n\nDialogForm.displayName = \"DialogForm\";\n\n/**\n * Rendered among the form's children, so it reads the `FormContext` exactly when the form is a\n * `Form.Root` (either orientation of the `render` composition): the settle close then waits for\n * a result with no field error (`hasAnyError`, the `autoReset` predicate, hidden stale entries\n * included).\n */\nfunction DialogFormSettle({\n watches,\n missingAction,\n onPendingChange,\n onSettled,\n}: {\n readonly watches: boolean;\n readonly missingAction: boolean;\n readonly onPendingChange: (pending: boolean) => void;\n readonly onSettled: (clean: boolean) => void;\n}) {\n const form = use(FormContext);\n useDevWarning(\n form !== null && missingAction,\n isDev &&\n \"`Dialog.Form` rendered as a `Form.Root` needs a function `action`; without one the form \" +\n \"navigates instead of closing the dialog. Render a plain `<Dialog.Form>` for a \" +\n '`method=\"dialog\"` form.',\n );\n const isForm = form !== null;\n const errors = form?.errors;\n const settled = useCallback(\n () => onSettled(!isForm || !hasAnyError(errors)),\n [isForm, errors, onSettled],\n );\n if (!watches) return null;\n return <FormStatusWatcher onPendingChange={onPendingChange} onSettled={settled} />;\n}\n"],"mappings":";;;;;;;;;;;AAWA,MAAM,QAAQ,QAAQ,IAAI,aAAa;;;;;;;;;;;;;;;;;AAqEvC,SAAgB,WAAW,EACzB,QACA,gBAAgB,MAChB,QACA,WACA,OACA,UACA,QACA,GAAG,QACe;CAClB,MAAM,MAAM,iBAAiB,aAAa;CAC1C,MAAM,EAAE,UAAU,mBAAmB,iBAAiB;CACtD,MAAM,YAAY,IAAI,SAAS;CAC/B,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,aAAa,OAAqD,IAAI;CAG5E,MAAM,oBAAoB,OAAO,KAAK;CACtC,MAAM,UAAU,OAAO,WAAW;CAIlC,MAAM,aAAa,aAAa,SAA0B;EACxD,MAAM,YAAY,UAAiB;GACjC,IAAI,MAAM,WAAW,MAAM;GAC3B,MAAM,YAAa,MAAsB;GAIzC,WAAW,UAAU;IAAE;IAAO,aAAa,WAAW,SAAS;GAAG;GAClE,kBAAkB,UAAU;EAC9B;EACA,MAAM,SAAS,KAAK,QAAQ,QAAQ;EACpC,MAAM,WAAW,UAAiB;GAChC,IAAI,MAAM,WAAW,QAAQ,kBAAkB,UAAU;EAC3D;EACA,KAAK,iBAAiB,UAAU,UAAU,IAAI;EAC9C,QAAQ,iBAAiB,SAAS,OAAO;EACzC,aAAa;GACX,KAAK,oBAAoB,UAAU,UAAU,IAAI;GACjD,QAAQ,oBAAoB,SAAS,OAAO;EAC9C;CACF,GAAG,CAAC,CAAC;CAGL,MAAM,YAAY,aACf,UAAmB;EAClB,MAAM,SAAS,SAAS;EACxB,MAAM,YAAY,WAAW;EAC7B,WAAW,UAAU;EACrB,IAAI,CAAC,iBAAiB,kBAAkB,SAAS;EAGjD,IAAI,CAAC,OAAO;EACZ,IAAI,WAAW,QAAQ,CAAC,OAAO,MAAM;EACrC,MAAM,cAAc,WAAW,eAAe;EAC9C,IAAI,WAAW;GAGb,aAAa,WAAW,OAAO,YAAY,WAAW;GACtD;EACF;EACA,kBAAkB;GAAE,QAAQ;GAAY,OAAO,WAAW;EAAM,CAAC;EACjE,OAAO,MAAM,WAAW;CAC1B,GACA;EAAC;EAAe;EAAU;EAAW;EAAmB;CAAY,CACtE;CAIA,OAAO,UAA0D;EAC/D,gBAAgB;EAChB;EACA,OAAA,EAL+B,QAK3B;EACJ;EACA;EACA,WAAW,MACT,qBAAA,UAAA,EAAA,UAAA,CACG,kBAAkB,UAAU,CAAC,GAC9B,oBAAC,kBAAD;GACW;GACT,eAAe,WAAW,KAAA;GAC1B,iBAAiB;GACN;EACZ,CAAA,CACD,EAAA,CAAA;EAEJ,OAAO;EACP,cAAc;GACZ,QAAQ,WAAW,KAAA,IAAY,WAAW,OAAO,WAAW,WAAW,SAAS,KAAA;GAGxE;EACV;EACA,KAAK;CACP,CAAC;AACH;AAEA,WAAW,cAAc;;;;;;;AAQzB,SAAS,iBAAiB,EACxB,SACA,eACA,iBACA,aAMC;CACD,MAAM,OAAO,IAAI,WAAW;CAC5B,cACE,SAAS,QAAQ,eACjB,SACE,iMAGJ;CACA,MAAM,SAAS,SAAS;CACxB,MAAM,SAAS,MAAM;CACrB,MAAM,UAAU,kBACR,UAAU,CAAC,UAAU,CAAC,YAAY,MAAM,CAAC,GAC/C;EAAC;EAAQ;EAAQ;CAAS,CAC5B;CACA,IAAI,CAAC,SAAS,OAAO;CACrB,OAAO,oBAAC,mBAAD;EAAoC;EAAiB,WAAW;CAAU,CAAA;AACnF"}
|
|
@@ -49,10 +49,9 @@ export interface DialogPopupProps extends Omit<ComponentPropsWithRef<"dialog">,
|
|
|
49
49
|
* `open={false}`), in all engines; dismissals (Escape, a click outside) are the browser's and
|
|
50
50
|
* animate with CSS only. Ignored (dev warning) in JS-free mode.
|
|
51
51
|
*
|
|
52
|
-
* Static:
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* page cross-fades for about 250 ms and the next transition commit waits for it (issue #35).
|
|
52
|
+
* Static: setting or unsetting it remounts the element. Any value, `"none"` included, makes a
|
|
53
|
+
* mount or `<Activity>` reveal inside a transition start a document view transition (a ~250 ms
|
|
54
|
+
* page cross-fade that the next transition waits for).
|
|
56
55
|
*/
|
|
57
56
|
transition?: ViewTransitionClass;
|
|
58
57
|
className?: StateValue<string | undefined, DialogPopupState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-popup.d.mts","names":[],"sources":["../../src/dialog/dialog-popup.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"dialog-popup.d.mts","names":[],"sources":["../../src/dialog/dialog-popup.tsx"],"mappings":";;;iBA8BiB;;WAEN;WACA;;iBAGM,yBAAyB,KACxC;;;;;;;;;;;EAaA;;;;;;;;;;EAUA,eAAe,UAAU;;;;;;;EAOzB;;;;;;;EAOA;;;;;;;;;;;;EAYA,aAAa;EACb,YAAY,+BAA+B;EAC3C,QAAQ,WAAW,2BAA2B;EAC9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;;;wBAoFvC,cACd,aACA,cACA,cACA,uBACA,YACA,WACA,OACA,UACA,WACG,QACF,mBAAgB;yBAXH"}
|