@funstack/ui 0.1.0-alpha.14 → 0.1.0-alpha.16
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/README.md +22 -1
- package/dist/accordion/accordion-item.d.mts +19 -0
- package/dist/accordion/accordion-item.d.mts.map +1 -1
- package/dist/accordion/accordion-item.mjs +2 -0
- package/dist/accordion/accordion-item.mjs.map +1 -1
- package/dist/accordion/accordion-panel.d.mts +16 -0
- package/dist/accordion/accordion-panel.d.mts.map +1 -1
- package/dist/accordion/accordion-panel.mjs +2 -0
- package/dist/accordion/accordion-panel.mjs.map +1 -1
- package/dist/accordion/accordion-root.d.mts +36 -2
- package/dist/accordion/accordion-root.d.mts.map +1 -1
- package/dist/accordion/accordion-root.mjs +7 -4
- package/dist/accordion/accordion-root.mjs.map +1 -1
- package/dist/accordion/accordion-trigger.d.mts +9 -0
- package/dist/accordion/accordion-trigger.d.mts.map +1 -1
- package/dist/accordion/accordion-trigger.mjs +2 -0
- package/dist/accordion/accordion-trigger.mjs.map +1 -1
- package/dist/accordion/index.d.mts +2 -0
- package/dist/accordion/index.d.mts.map +1 -1
- package/dist/accordion/index.mjs +2 -0
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/bin/skill-installer.d.mts +1 -0
- package/dist/bin/skill-installer.mjs +12 -0
- package/dist/bin/skill-installer.mjs.map +1 -0
- package/dist/button/button.d.mts +25 -7
- package/dist/button/button.d.mts.map +1 -1
- package/dist/button/button.mjs +2 -0
- package/dist/button/button.mjs.map +1 -1
- package/dist/checkbox/checkbox.d.mts +25 -3
- package/dist/checkbox/checkbox.d.mts.map +1 -1
- package/dist/checkbox/checkbox.mjs +2 -0
- package/dist/checkbox/checkbox.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-item.d.mts +15 -0
- package/dist/checkbox-group/checkbox-group-item.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-item.mjs +2 -0
- package/dist/checkbox-group/checkbox-group-item.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-label.d.mts +10 -0
- package/dist/checkbox-group/checkbox-group-label.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-label.mjs +2 -0
- package/dist/checkbox-group/checkbox-group-label.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-parent.d.mts +19 -1
- package/dist/checkbox-group/checkbox-group-parent.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-parent.mjs +2 -0
- package/dist/checkbox-group/checkbox-group-parent.mjs.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.d.mts +31 -4
- package/dist/checkbox-group/checkbox-group-root.d.mts.map +1 -1
- package/dist/checkbox-group/checkbox-group-root.mjs +6 -5
- package/dist/checkbox-group/checkbox-group-root.mjs.map +1 -1
- package/dist/checkbox-group/index.d.mts +2 -0
- package/dist/checkbox-group/index.d.mts.map +1 -1
- package/dist/checkbox-group/index.mjs +2 -0
- package/dist/checkbox-group/index.mjs.map +1 -1
- package/dist/combobox/combobox-clear.d.mts +18 -0
- package/dist/combobox/combobox-clear.d.mts.map +1 -1
- package/dist/combobox/combobox-clear.mjs +2 -0
- 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 +49 -1
- package/dist/combobox/combobox-group.d.mts.map +1 -1
- package/dist/combobox/combobox-group.mjs +11 -1
- package/dist/combobox/combobox-group.mjs.map +1 -1
- package/dist/combobox/combobox-input.d.mts +18 -6
- package/dist/combobox/combobox-input.d.mts.map +1 -1
- package/dist/combobox/combobox-input.mjs +8 -5
- package/dist/combobox/combobox-input.mjs.map +1 -1
- package/dist/combobox/combobox-label.d.mts +18 -1
- package/dist/combobox/combobox-label.d.mts.map +1 -1
- package/dist/combobox/combobox-label.mjs +4 -1
- package/dist/combobox/combobox-label.mjs.map +1 -1
- package/dist/combobox/combobox-list.d.mts +14 -0
- package/dist/combobox/combobox-list.d.mts.map +1 -1
- package/dist/combobox/combobox-list.mjs +2 -0
- package/dist/combobox/combobox-list.mjs.map +1 -1
- package/dist/combobox/combobox-option.d.mts +25 -3
- package/dist/combobox/combobox-option.d.mts.map +1 -1
- package/dist/combobox/combobox-option.mjs +2 -0
- package/dist/combobox/combobox-option.mjs.map +1 -1
- package/dist/combobox/combobox-popup.d.mts +17 -1
- package/dist/combobox/combobox-popup.d.mts.map +1 -1
- package/dist/combobox/combobox-popup.mjs +5 -15
- package/dist/combobox/combobox-popup.mjs.map +1 -1
- package/dist/combobox/combobox-root.d.mts +49 -12
- package/dist/combobox/combobox-root.d.mts.map +1 -1
- package/dist/combobox/combobox-root.mjs +11 -80
- package/dist/combobox/combobox-root.mjs.map +1 -1
- package/dist/combobox/combobox-trigger.d.mts +26 -8
- package/dist/combobox/combobox-trigger.d.mts.map +1 -1
- package/dist/combobox/combobox-trigger.mjs +23 -17
- package/dist/combobox/combobox-trigger.mjs.map +1 -1
- package/dist/combobox/index.d.mts +4 -2
- package/dist/combobox/index.d.mts.map +1 -1
- package/dist/combobox/index.mjs +4 -2
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/combobox/use-deferred-leave.mjs +105 -0
- package/dist/combobox/use-deferred-leave.mjs.map +1 -0
- package/dist/csp/csp-provider.d.mts +8 -0
- package/dist/csp/csp-provider.d.mts.map +1 -1
- package/dist/csp/csp-provider.mjs +2 -0
- package/dist/csp/csp-provider.mjs.map +1 -1
- package/dist/csp/style-hashes.d.mts +2 -0
- package/dist/csp/style-hashes.d.mts.map +1 -1
- package/dist/csp/style-hashes.mjs +2 -0
- package/dist/csp/style-hashes.mjs.map +1 -1
- package/dist/dialog/dialog-close.d.mts +18 -0
- package/dist/dialog/dialog-close.d.mts.map +1 -1
- package/dist/dialog/dialog-close.mjs +2 -0
- package/dist/dialog/dialog-close.mjs.map +1 -1
- package/dist/dialog/dialog-context.mjs.map +1 -1
- package/dist/dialog/dialog-description.d.mts +12 -0
- package/dist/dialog/dialog-description.d.mts.map +1 -1
- package/dist/dialog/dialog-description.mjs +2 -0
- package/dist/dialog/dialog-description.mjs.map +1 -1
- package/dist/dialog/dialog-form.d.mts +18 -1
- package/dist/dialog/dialog-form.d.mts.map +1 -1
- package/dist/dialog/dialog-form.mjs +2 -0
- package/dist/dialog/dialog-form.mjs.map +1 -1
- package/dist/dialog/dialog-popup.d.mts +25 -4
- package/dist/dialog/dialog-popup.d.mts.map +1 -1
- package/dist/dialog/dialog-popup.mjs +4 -2
- package/dist/dialog/dialog-popup.mjs.map +1 -1
- package/dist/dialog/dialog-root.d.mts +15 -1
- package/dist/dialog/dialog-root.d.mts.map +1 -1
- package/dist/dialog/dialog-root.mjs +2 -0
- package/dist/dialog/dialog-root.mjs.map +1 -1
- package/dist/dialog/dialog-title.d.mts +11 -0
- package/dist/dialog/dialog-title.d.mts.map +1 -1
- package/dist/dialog/dialog-title.mjs +2 -0
- package/dist/dialog/dialog-title.mjs.map +1 -1
- package/dist/dialog/dialog-trigger.d.mts +16 -0
- package/dist/dialog/dialog-trigger.d.mts.map +1 -1
- package/dist/dialog/dialog-trigger.mjs +2 -0
- package/dist/dialog/dialog-trigger.mjs.map +1 -1
- package/dist/dialog/index.d.mts +2 -0
- package/dist/dialog/index.d.mts.map +1 -1
- package/dist/dialog/index.mjs +2 -0
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/docs/components/accordion.md +426 -0
- package/dist/docs/components/button.md +464 -0
- package/dist/docs/components/checkbox-group.md +474 -0
- package/dist/docs/components/checkbox.md +373 -0
- package/dist/docs/components/combobox.md +635 -0
- package/dist/docs/components/context-menu.md +524 -0
- package/dist/docs/components/dialog.md +686 -0
- package/dist/docs/components/field.md +587 -0
- package/dist/docs/components/menu.md +589 -0
- package/dist/docs/components/meter.md +313 -0
- package/dist/docs/components/number-field.md +528 -0
- package/dist/docs/components/popover.md +591 -0
- package/dist/docs/components/progress.md +450 -0
- package/dist/docs/components/radio-group.md +457 -0
- package/dist/docs/components/select.md +662 -0
- package/dist/docs/components/slider.md +558 -0
- package/dist/docs/components/switch.md +311 -0
- package/dist/docs/components/tabs.md +473 -0
- package/dist/docs/components/toast.md +576 -0
- package/dist/docs/components/toggle-group.md +341 -0
- package/dist/docs/components/toggle.md +245 -0
- package/dist/docs/components/toolbar.md +389 -0
- package/dist/docs/components/tooltip.md +494 -0
- package/dist/docs/concepts/action-props.md +251 -0
- package/dist/docs/concepts/ai-agents.md +56 -0
- package/dist/docs/concepts/browser-owned-state.md +118 -0
- package/dist/docs/concepts/content-security-policy.md +69 -0
- package/dist/docs/concepts/experimental.md +36 -0
- package/dist/docs/concepts/pending-and-optimistic.md +250 -0
- package/dist/docs/concepts/server-components.md +118 -0
- package/dist/docs/concepts/suspense.md +124 -0
- package/dist/docs/concepts/transitions.md +118 -0
- package/dist/docs/getting-started.md +115 -0
- package/dist/docs/index.md +181 -0
- package/dist/docs/roadmap.md +74 -0
- package/dist/docs/why.md +100 -0
- package/dist/field/field-control.d.mts +26 -3
- package/dist/field/field-control.d.mts.map +1 -1
- package/dist/field/field-control.mjs +2 -0
- package/dist/field/field-control.mjs.map +1 -1
- package/dist/field/field-description.d.mts +11 -0
- package/dist/field/field-description.d.mts.map +1 -1
- package/dist/field/field-description.mjs +2 -0
- package/dist/field/field-description.mjs.map +1 -1
- package/dist/field/field-error.d.mts +14 -2
- package/dist/field/field-error.d.mts.map +1 -1
- package/dist/field/field-error.mjs +2 -0
- package/dist/field/field-error.mjs.map +1 -1
- package/dist/field/field-label.d.mts +10 -0
- package/dist/field/field-label.d.mts.map +1 -1
- package/dist/field/field-label.mjs +2 -0
- package/dist/field/field-label.mjs.map +1 -1
- package/dist/field/field-root.d.mts +21 -2
- package/dist/field/field-root.d.mts.map +1 -1
- package/dist/field/field-root.mjs +2 -0
- package/dist/field/field-root.mjs.map +1 -1
- package/dist/field/index.d.mts +9 -0
- package/dist/field/index.d.mts.map +1 -1
- package/dist/field/index.mjs +9 -0
- package/dist/field/index.mjs.map +1 -1
- package/dist/form/form-root.d.mts +17 -1
- package/dist/form/form-root.d.mts.map +1 -1
- package/dist/form/form-root.mjs +3 -1
- package/dist/form/form-root.mjs.map +1 -1
- package/dist/form/form-submit.d.mts +18 -0
- package/dist/form/form-submit.d.mts.map +1 -1
- package/dist/form/form-submit.mjs +2 -0
- package/dist/form/form-submit.mjs.map +1 -1
- package/dist/form/index.d.mts +7 -0
- package/dist/form/index.d.mts.map +1 -1
- package/dist/form/index.mjs +7 -0
- package/dist/form/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/internal/announce.mjs +12 -7
- package/dist/internal/announce.mjs.map +1 -1
- package/dist/internal/focus-first-invalid.mjs +2 -11
- package/dist/internal/focus-first-invalid.mjs.map +1 -1
- package/dist/internal/focus-visible.mjs +26 -0
- package/dist/internal/focus-visible.mjs.map +1 -0
- package/dist/internal/{invoker-press.mjs → invokers.mjs} +22 -5
- package/dist/internal/invokers.mjs.map +1 -0
- package/dist/internal/platform-attributes.d.mts +1 -1
- package/dist/internal/pointer-capture.mjs +1 -1
- package/dist/internal/pointer-capture.mjs.map +1 -1
- package/dist/internal/trigger-ref.mjs +1 -1
- package/dist/internal/trigger-ref.mjs.map +1 -1
- package/dist/internal/types.d.mts +3 -0
- package/dist/internal/types.d.mts.map +1 -1
- package/dist/internal/use-interest-dismiss.mjs +84 -0
- package/dist/internal/use-interest-dismiss.mjs.map +1 -0
- package/dist/internal/use-overlay-root.mjs.map +1 -1
- package/dist/internal/use-popover-popup.mjs +43 -108
- package/dist/internal/use-popover-popup.mjs.map +1 -1
- package/dist/internal/use-popover-trigger.d.mts +1 -0
- package/dist/internal/use-popover-trigger.d.mts.map +1 -1
- package/dist/internal/use-popover-trigger.mjs +29 -10
- package/dist/internal/use-popover-trigger.mjs.map +1 -1
- package/dist/internal/use-value-set.mjs +20 -0
- package/dist/internal/use-value-set.mjs.map +1 -0
- package/dist/internal/validity.d.mts +11 -0
- package/dist/internal/validity.d.mts.map +1 -1
- package/dist/internal/validity.mjs.map +1 -1
- package/dist/menu/index.d.mts +2 -0
- package/dist/menu/index.d.mts.map +1 -1
- package/dist/menu/index.mjs +2 -0
- package/dist/menu/index.mjs.map +1 -1
- package/dist/menu/menu-checkbox-item.d.mts +26 -2
- package/dist/menu/menu-checkbox-item.d.mts.map +1 -1
- package/dist/menu/menu-checkbox-item.mjs +2 -0
- package/dist/menu/menu-checkbox-item.mjs.map +1 -1
- package/dist/menu/menu-context-trigger.d.mts +24 -2
- package/dist/menu/menu-context-trigger.d.mts.map +1 -1
- package/dist/menu/menu-context-trigger.mjs +2 -0
- package/dist/menu/menu-context-trigger.mjs.map +1 -1
- package/dist/menu/menu-group.d.mts +36 -1
- package/dist/menu/menu-group.d.mts.map +1 -1
- package/dist/menu/menu-group.mjs +9 -1
- package/dist/menu/menu-group.mjs.map +1 -1
- package/dist/menu/menu-item.d.mts +23 -1
- package/dist/menu/menu-item.d.mts.map +1 -1
- package/dist/menu/menu-item.mjs +2 -0
- package/dist/menu/menu-item.mjs.map +1 -1
- package/dist/menu/menu-popup.d.mts +34 -9
- package/dist/menu/menu-popup.d.mts.map +1 -1
- package/dist/menu/menu-popup.mjs +15 -27
- package/dist/menu/menu-popup.mjs.map +1 -1
- package/dist/menu/menu-radio-group.d.mts +20 -1
- package/dist/menu/menu-radio-group.d.mts.map +1 -1
- package/dist/menu/menu-radio-group.mjs +2 -0
- package/dist/menu/menu-radio-group.mjs.map +1 -1
- package/dist/menu/menu-radio-item.d.mts +16 -0
- package/dist/menu/menu-radio-item.d.mts.map +1 -1
- package/dist/menu/menu-radio-item.mjs +2 -0
- package/dist/menu/menu-radio-item.mjs.map +1 -1
- package/dist/menu/menu-root.d.mts +22 -3
- package/dist/menu/menu-root.d.mts.map +1 -1
- package/dist/menu/menu-root.mjs +2 -0
- package/dist/menu/menu-root.mjs.map +1 -1
- package/dist/menu/menu-submenu-trigger.d.mts +21 -8
- package/dist/menu/menu-submenu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-submenu-trigger.mjs +11 -10
- package/dist/menu/menu-submenu-trigger.mjs.map +1 -1
- package/dist/menu/menu-trigger.d.mts +23 -7
- package/dist/menu/menu-trigger.d.mts.map +1 -1
- package/dist/menu/menu-trigger.mjs +8 -12
- package/dist/menu/menu-trigger.mjs.map +1 -1
- package/dist/meter/index.d.mts +2 -0
- package/dist/meter/index.d.mts.map +1 -1
- package/dist/meter/index.mjs +2 -0
- package/dist/meter/index.mjs.map +1 -1
- package/dist/meter/meter-indicator.d.mts +11 -0
- package/dist/meter/meter-indicator.d.mts.map +1 -1
- package/dist/meter/meter-indicator.mjs +2 -0
- package/dist/meter/meter-indicator.mjs.map +1 -1
- package/dist/meter/meter-label.d.mts +11 -0
- package/dist/meter/meter-label.d.mts.map +1 -1
- package/dist/meter/meter-label.mjs +2 -0
- package/dist/meter/meter-label.mjs.map +1 -1
- package/dist/meter/meter-region.d.mts +5 -0
- package/dist/meter/meter-region.d.mts.map +1 -1
- package/dist/meter/meter-region.mjs.map +1 -1
- package/dist/meter/meter-root.d.mts +52 -10
- package/dist/meter/meter-root.d.mts.map +1 -1
- package/dist/meter/meter-root.mjs +2 -0
- package/dist/meter/meter-root.mjs.map +1 -1
- package/dist/meter/meter-track.d.mts +11 -0
- package/dist/meter/meter-track.d.mts.map +1 -1
- package/dist/meter/meter-track.mjs +2 -0
- package/dist/meter/meter-track.mjs.map +1 -1
- package/dist/meter/meter-value.d.mts +15 -1
- package/dist/meter/meter-value.d.mts.map +1 -1
- package/dist/meter/meter-value.mjs +2 -0
- package/dist/meter/meter-value.mjs.map +1 -1
- package/dist/number-field/index.d.mts +2 -0
- package/dist/number-field/index.d.mts.map +1 -1
- package/dist/number-field/index.mjs +2 -0
- package/dist/number-field/index.mjs.map +1 -1
- package/dist/number-field/number-field-decrement.d.mts +2 -0
- package/dist/number-field/number-field-decrement.d.mts.map +1 -1
- package/dist/number-field/number-field-decrement.mjs +2 -0
- package/dist/number-field/number-field-decrement.mjs.map +1 -1
- package/dist/number-field/number-field-increment.d.mts +2 -0
- package/dist/number-field/number-field-increment.d.mts.map +1 -1
- package/dist/number-field/number-field-increment.mjs +2 -0
- package/dist/number-field/number-field-increment.mjs.map +1 -1
- package/dist/number-field/number-field-input.d.mts +9 -0
- package/dist/number-field/number-field-input.d.mts.map +1 -1
- package/dist/number-field/number-field-input.mjs +2 -0
- package/dist/number-field/number-field-input.mjs.map +1 -1
- package/dist/number-field/number-field-label.d.mts +10 -0
- package/dist/number-field/number-field-label.d.mts.map +1 -1
- package/dist/number-field/number-field-label.mjs +2 -0
- package/dist/number-field/number-field-label.mjs.map +1 -1
- package/dist/number-field/number-field-root.d.mts +62 -14
- package/dist/number-field/number-field-root.d.mts.map +1 -1
- package/dist/number-field/number-field-root.mjs +3 -1
- package/dist/number-field/number-field-root.mjs.map +1 -1
- package/dist/number-field/use-step-button.d.mts +20 -0
- package/dist/number-field/use-step-button.d.mts.map +1 -1
- package/dist/number-field/use-step-button.mjs.map +1 -1
- package/dist/popover/index.d.mts +2 -0
- package/dist/popover/index.d.mts.map +1 -1
- package/dist/popover/index.mjs +2 -0
- package/dist/popover/index.mjs.map +1 -1
- package/dist/popover/popover-close.d.mts +21 -3
- package/dist/popover/popover-close.d.mts.map +1 -1
- package/dist/popover/popover-close.mjs +3 -1
- package/dist/popover/popover-close.mjs.map +1 -1
- package/dist/popover/popover-description.d.mts +12 -0
- package/dist/popover/popover-description.d.mts.map +1 -1
- package/dist/popover/popover-description.mjs +2 -0
- package/dist/popover/popover-description.mjs.map +1 -1
- package/dist/popover/popover-popup.d.mts +30 -4
- package/dist/popover/popover-popup.d.mts.map +1 -1
- package/dist/popover/popover-popup.mjs +2 -0
- package/dist/popover/popover-popup.mjs.map +1 -1
- package/dist/popover/popover-root.d.mts +9 -0
- package/dist/popover/popover-root.d.mts.map +1 -1
- package/dist/popover/popover-root.mjs +2 -0
- package/dist/popover/popover-root.mjs.map +1 -1
- package/dist/popover/popover-title.d.mts +11 -0
- package/dist/popover/popover-title.d.mts.map +1 -1
- package/dist/popover/popover-title.mjs +2 -0
- package/dist/popover/popover-title.mjs.map +1 -1
- package/dist/popover/popover-trigger.d.mts +24 -9
- package/dist/popover/popover-trigger.d.mts.map +1 -1
- package/dist/popover/popover-trigger.mjs +11 -9
- package/dist/popover/popover-trigger.mjs.map +1 -1
- package/dist/progress/index.d.mts +2 -0
- package/dist/progress/index.d.mts.map +1 -1
- package/dist/progress/index.mjs +2 -0
- package/dist/progress/index.mjs.map +1 -1
- package/dist/progress/progress-indicator.d.mts +11 -0
- package/dist/progress/progress-indicator.d.mts.map +1 -1
- package/dist/progress/progress-indicator.mjs +2 -0
- package/dist/progress/progress-indicator.mjs.map +1 -1
- package/dist/progress/progress-label.d.mts +11 -0
- package/dist/progress/progress-label.d.mts.map +1 -1
- package/dist/progress/progress-label.mjs +2 -0
- package/dist/progress/progress-label.mjs.map +1 -1
- package/dist/progress/progress-root.d.mts +36 -8
- package/dist/progress/progress-root.d.mts.map +1 -1
- package/dist/progress/progress-root.mjs +2 -0
- package/dist/progress/progress-root.mjs.map +1 -1
- package/dist/progress/progress-track.d.mts +11 -0
- package/dist/progress/progress-track.d.mts.map +1 -1
- package/dist/progress/progress-track.mjs +2 -0
- package/dist/progress/progress-track.mjs.map +1 -1
- package/dist/progress/progress-value.d.mts +15 -1
- package/dist/progress/progress-value.d.mts.map +1 -1
- package/dist/progress/progress-value.mjs +2 -0
- package/dist/progress/progress-value.mjs.map +1 -1
- package/dist/radio-group/index.d.mts +2 -0
- package/dist/radio-group/index.d.mts.map +1 -1
- package/dist/radio-group/index.mjs +2 -0
- package/dist/radio-group/index.mjs.map +1 -1
- package/dist/radio-group/radio-group-item.d.mts +18 -1
- package/dist/radio-group/radio-group-item.d.mts.map +1 -1
- package/dist/radio-group/radio-group-item.mjs +2 -0
- package/dist/radio-group/radio-group-item.mjs.map +1 -1
- package/dist/radio-group/radio-group-label.d.mts +10 -0
- package/dist/radio-group/radio-group-label.d.mts.map +1 -1
- package/dist/radio-group/radio-group-label.mjs +2 -0
- package/dist/radio-group/radio-group-label.mjs.map +1 -1
- package/dist/radio-group/radio-group-root.d.mts +29 -5
- package/dist/radio-group/radio-group-root.d.mts.map +1 -1
- package/dist/radio-group/radio-group-root.mjs +2 -0
- package/dist/radio-group/radio-group-root.mjs.map +1 -1
- package/dist/select/index.d.mts +2 -0
- package/dist/select/index.d.mts.map +1 -1
- package/dist/select/index.mjs +2 -0
- package/dist/select/index.mjs.map +1 -1
- package/dist/select/select-group-label.d.mts +10 -0
- package/dist/select/select-group-label.d.mts.map +1 -1
- package/dist/select/select-group-label.mjs +2 -0
- package/dist/select/select-group-label.mjs.map +1 -1
- package/dist/select/select-group.d.mts +15 -1
- package/dist/select/select-group.d.mts.map +1 -1
- package/dist/select/select-group.mjs +2 -0
- package/dist/select/select-group.mjs.map +1 -1
- package/dist/select/select-option.d.mts +19 -1
- package/dist/select/select-option.d.mts.map +1 -1
- package/dist/select/select-option.mjs +2 -0
- package/dist/select/select-option.mjs.map +1 -1
- package/dist/select/select-root.d.mts +24 -1
- package/dist/select/select-root.d.mts.map +1 -1
- package/dist/select/select-root.mjs +2 -0
- package/dist/select/select-root.mjs.map +1 -1
- package/dist/select/select-separator.d.mts +9 -0
- package/dist/select/select-separator.d.mts.map +1 -1
- package/dist/select/select-separator.mjs +2 -0
- package/dist/select/select-separator.mjs.map +1 -1
- package/dist/select/select-trigger.d.mts +9 -0
- package/dist/select/select-trigger.d.mts.map +1 -1
- package/dist/select/select-trigger.mjs +2 -0
- package/dist/select/select-trigger.mjs.map +1 -1
- package/dist/select/select-value.d.mts +9 -0
- package/dist/select/select-value.d.mts.map +1 -1
- package/dist/select/select-value.mjs +2 -0
- package/dist/select/select-value.mjs.map +1 -1
- package/dist/slider/index.d.mts +2 -0
- package/dist/slider/index.d.mts.map +1 -1
- package/dist/slider/index.mjs +2 -0
- package/dist/slider/index.mjs.map +1 -1
- package/dist/slider/slider-indicator.d.mts +12 -0
- package/dist/slider/slider-indicator.d.mts.map +1 -1
- package/dist/slider/slider-indicator.mjs +2 -0
- package/dist/slider/slider-indicator.mjs.map +1 -1
- package/dist/slider/slider-label.d.mts +11 -1
- package/dist/slider/slider-label.d.mts.map +1 -1
- package/dist/slider/slider-label.mjs +2 -0
- package/dist/slider/slider-label.mjs.map +1 -1
- package/dist/slider/slider-root.d.mts +53 -9
- package/dist/slider/slider-root.d.mts.map +1 -1
- package/dist/slider/slider-root.mjs +2 -0
- package/dist/slider/slider-root.mjs.map +1 -1
- package/dist/slider/slider-thumb.d.mts +32 -3
- package/dist/slider/slider-thumb.d.mts.map +1 -1
- package/dist/slider/slider-thumb.mjs +2 -0
- package/dist/slider/slider-thumb.mjs.map +1 -1
- package/dist/slider/slider-track.d.mts +17 -0
- package/dist/slider/slider-track.d.mts.map +1 -1
- package/dist/slider/slider-track.mjs +2 -0
- package/dist/slider/slider-track.mjs.map +1 -1
- package/dist/slider/slider-value.d.mts +11 -0
- package/dist/slider/slider-value.d.mts.map +1 -1
- package/dist/slider/slider-value.mjs +2 -0
- package/dist/slider/slider-value.mjs.map +1 -1
- package/dist/switch/switch.d.mts +23 -3
- package/dist/switch/switch.d.mts.map +1 -1
- package/dist/switch/switch.mjs +2 -0
- package/dist/switch/switch.mjs.map +1 -1
- package/dist/tabs/index.d.mts +2 -0
- package/dist/tabs/index.d.mts.map +1 -1
- package/dist/tabs/index.mjs +2 -0
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/tabs/tabs-context.d.mts +5 -0
- package/dist/tabs/tabs-context.d.mts.map +1 -1
- package/dist/tabs/tabs-context.mjs.map +1 -1
- package/dist/tabs/tabs-indicator.d.mts +17 -0
- package/dist/tabs/tabs-indicator.d.mts.map +1 -1
- package/dist/tabs/tabs-indicator.mjs +2 -0
- package/dist/tabs/tabs-indicator.mjs.map +1 -1
- package/dist/tabs/tabs-list.d.mts +19 -1
- package/dist/tabs/tabs-list.d.mts.map +1 -1
- package/dist/tabs/tabs-list.mjs +2 -0
- package/dist/tabs/tabs-list.mjs.map +1 -1
- package/dist/tabs/tabs-panel.d.mts +19 -0
- package/dist/tabs/tabs-panel.d.mts.map +1 -1
- package/dist/tabs/tabs-panel.mjs +2 -0
- package/dist/tabs/tabs-panel.mjs.map +1 -1
- package/dist/tabs/tabs-root.d.mts +39 -5
- package/dist/tabs/tabs-root.d.mts.map +1 -1
- package/dist/tabs/tabs-root.mjs +2 -0
- package/dist/tabs/tabs-root.mjs.map +1 -1
- package/dist/tabs/tabs-tab.d.mts +22 -1
- package/dist/tabs/tabs-tab.d.mts.map +1 -1
- package/dist/tabs/tabs-tab.mjs +2 -0
- package/dist/tabs/tabs-tab.mjs.map +1 -1
- package/dist/toast/index.d.mts +2 -0
- package/dist/toast/index.d.mts.map +1 -1
- package/dist/toast/index.mjs +2 -0
- package/dist/toast/index.mjs.map +1 -1
- package/dist/toast/toast-action.d.mts +28 -3
- package/dist/toast/toast-action.d.mts.map +1 -1
- package/dist/toast/toast-action.mjs +2 -0
- package/dist/toast/toast-action.mjs.map +1 -1
- package/dist/toast/toast-close.d.mts +16 -0
- package/dist/toast/toast-close.d.mts.map +1 -1
- package/dist/toast/toast-close.mjs +2 -0
- package/dist/toast/toast-close.mjs.map +1 -1
- package/dist/toast/toast-description.d.mts +16 -1
- package/dist/toast/toast-description.d.mts.map +1 -1
- package/dist/toast/toast-description.mjs +2 -0
- package/dist/toast/toast-description.mjs.map +1 -1
- package/dist/toast/toast-root.d.mts +20 -0
- package/dist/toast/toast-root.d.mts.map +1 -1
- package/dist/toast/toast-root.mjs +2 -0
- package/dist/toast/toast-root.mjs.map +1 -1
- package/dist/toast/toast-title.d.mts +15 -1
- package/dist/toast/toast-title.d.mts.map +1 -1
- package/dist/toast/toast-title.mjs +2 -0
- package/dist/toast/toast-title.mjs.map +1 -1
- package/dist/toast/toast-viewport.d.mts +34 -5
- package/dist/toast/toast-viewport.d.mts.map +1 -1
- package/dist/toast/toast-viewport.mjs +6 -5
- package/dist/toast/toast-viewport.mjs.map +1 -1
- package/dist/toast/toast.d.mts +46 -6
- package/dist/toast/toast.d.mts.map +1 -1
- package/dist/toast/toast.mjs +4 -0
- package/dist/toast/toast.mjs.map +1 -1
- package/dist/toggle/toggle.d.mts +20 -2
- package/dist/toggle/toggle.d.mts.map +1 -1
- package/dist/toggle/toggle.mjs +2 -0
- package/dist/toggle/toggle.mjs.map +1 -1
- package/dist/toggle-group/index.d.mts +2 -0
- package/dist/toggle-group/index.d.mts.map +1 -1
- package/dist/toggle-group/index.mjs +2 -0
- package/dist/toggle-group/index.mjs.map +1 -1
- package/dist/toggle-group/toggle-group-context.d.mts +1 -0
- 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 +16 -0
- package/dist/toggle-group/toggle-group-item.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-item.mjs +2 -0
- package/dist/toggle-group/toggle-group-item.mjs.map +1 -1
- package/dist/toggle-group/toggle-group-root.d.mts +73 -12
- package/dist/toggle-group/toggle-group-root.d.mts.map +1 -1
- package/dist/toggle-group/toggle-group-root.mjs +6 -5
- package/dist/toggle-group/toggle-group-root.mjs.map +1 -1
- package/dist/toolbar/index.d.mts +2 -0
- package/dist/toolbar/index.d.mts.map +1 -1
- package/dist/toolbar/index.mjs +2 -0
- package/dist/toolbar/index.mjs.map +1 -1
- package/dist/toolbar/toolbar-root.d.mts +30 -3
- package/dist/toolbar/toolbar-root.d.mts.map +1 -1
- package/dist/toolbar/toolbar-root.mjs +2 -0
- package/dist/toolbar/toolbar-root.mjs.map +1 -1
- package/dist/toolbar/toolbar-separator.d.mts +13 -0
- package/dist/toolbar/toolbar-separator.d.mts.map +1 -1
- package/dist/toolbar/toolbar-separator.mjs +2 -0
- package/dist/toolbar/toolbar-separator.mjs.map +1 -1
- package/dist/tooltip/index.d.mts +2 -0
- package/dist/tooltip/index.d.mts.map +1 -1
- package/dist/tooltip/index.mjs +2 -0
- package/dist/tooltip/index.mjs.map +1 -1
- package/dist/tooltip/tooltip-arrow.d.mts +16 -0
- package/dist/tooltip/tooltip-arrow.d.mts.map +1 -1
- package/dist/tooltip/tooltip-arrow.mjs +2 -0
- package/dist/tooltip/tooltip-arrow.mjs.map +1 -1
- package/dist/tooltip/tooltip-context.d.mts +4 -0
- package/dist/tooltip/tooltip-context.d.mts.map +1 -1
- package/dist/tooltip/tooltip-context.mjs.map +1 -1
- package/dist/tooltip/tooltip-popup.d.mts +24 -3
- package/dist/tooltip/tooltip-popup.d.mts.map +1 -1
- package/dist/tooltip/tooltip-popup.mjs +2 -0
- package/dist/tooltip/tooltip-popup.mjs.map +1 -1
- package/dist/tooltip/tooltip-root.d.mts +24 -2
- package/dist/tooltip/tooltip-root.d.mts.map +1 -1
- package/dist/tooltip/tooltip-root.mjs +2 -0
- package/dist/tooltip/tooltip-root.mjs.map +1 -1
- package/dist/tooltip/tooltip-trigger.d.mts +18 -1
- package/dist/tooltip/tooltip-trigger.d.mts.map +1 -1
- package/dist/tooltip/tooltip-trigger.mjs +2 -0
- package/dist/tooltip/tooltip-trigger.mjs.map +1 -1
- package/package.json +9 -1
- package/skills/funstack-ui-knowledge/SKILL.md +75 -0
- package/dist/internal/invoker-press.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar-root.mjs","names":[],"sources":["../../src/toolbar/toolbar-root.tsx"],"sourcesContent":["\"use client\";\nimport { useMemo, useRef } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { ToolbarContext } from \"../internal/toolbar-context.js\";\nimport type { ToolbarContextValue } from \"../internal/toolbar-context.js\";\nimport type { Orientation, RenderProp, StateValue } from \"../internal/types.js\";\nimport { useNativeFocusgroup } from \"../internal/use-native-focusgroup.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport { useRovingFocus } from \"../internal/use-roving-focus.js\";\n\nexport type ToolbarOrientation = Orientation;\n\nexport interface ToolbarRootState {\n readonly orientation: ToolbarOrientation;\n}\n\nexport interface ToolbarRootProps extends Omit<\n ComponentPropsWithRef<\"div\">,\n | \"role\"\n | \"aria-orientation\"\n | \"onKeyDown\"\n | \"onFocus\"\n | \"onBlur\"\n | \"onPointerDown\"\n | \"className\"\n | \"style\"\n | \"children\"\n> {\n
|
|
1
|
+
{"version":3,"file":"toolbar-root.mjs","names":[],"sources":["../../src/toolbar/toolbar-root.tsx"],"sourcesContent":["\"use client\";\nimport { useMemo, useRef } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { ToolbarContext } from \"../internal/toolbar-context.js\";\nimport type { ToolbarContextValue } from \"../internal/toolbar-context.js\";\nimport type { Orientation, RenderProp, StateValue } from \"../internal/types.js\";\nimport { useNativeFocusgroup } from \"../internal/use-native-focusgroup.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport { useRovingFocus } from \"../internal/use-roving-focus.js\";\n\n/** The arrow-key axis of a Toolbar. */\nexport type ToolbarOrientation = Orientation;\n\n/**\n * State of `Toolbar.Root`, passed to the function forms of `className`, `style`, `children` and\n * `render`.\n */\nexport interface ToolbarRootState {\n /** The `orientation` prop. */\n readonly orientation: ToolbarOrientation;\n}\n\n/**\n * Props of `Toolbar.Root`.\n *\n * @see https://ui.funstack.work/components/toolbar\n */\nexport interface ToolbarRootProps extends Omit<\n ComponentPropsWithRef<\"div\">,\n | \"role\"\n | \"aria-orientation\"\n | \"onKeyDown\"\n | \"onFocus\"\n | \"onBlur\"\n | \"onPointerDown\"\n | \"className\"\n | \"style\"\n | \"children\"\n> {\n /**\n * Axis of the arrow keys; also `aria-orientation`.\n *\n * @defaultValue `\"horizontal\"`\n */\n orientation?: ToolbarOrientation;\n /**\n * Whether arrows wrap from the last item to the first.\n *\n * @defaultValue `true`\n */\n loop?: boolean;\n /**\n * Render `focusgroup=\"toolbar …\"` and, where the browser implements it, let the browser handle\n * arrow keys, Home and End and the single Tab stop. Chromium 150+ only; elsewhere the JS path\n * stays active.\n *\n * @defaultValue `false`\n */\n experimental_focusgroup?: boolean;\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, ToolbarRootState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, ToolbarRootState>;\n /** Content, or a function of the part's state. */\n children?: StateValue<ReactNode, ToolbarRootState>;\n /** Replace the default `<div>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"div\">, ToolbarRootState>;\n}\n\n/**\n * First entry: the first item. Natively `disabled` controls are not items; `aria-disabled` ones\n * are, and are entered like any other, as Chromium's native `focusgroup` does (the APG allows\n * focusable disabled items in a toolbar).\n */\nfunction firstItem(items: readonly HTMLElement[]): HTMLElement | undefined {\n return items[0];\n}\n\n/**\n * `<div role=\"toolbar\" aria-orientation>` (WAI-ARIA APG Toolbar). Its items are its focusable\n * descendants, found in the DOM: one Tab stop (the last focused item), arrow keys, Home and End\n * between them (design/components/toggle-group.md section 6). Name it with `aria-label` or\n * `aria-labelledby`.\n *\n * Owned keys (conventions 1.2): `role`, `aria-orientation`, `data-orientation`, `onKeyDown`,\n * `onFocus`, `onBlur`, `onPointerDown`, and `focusgroup` while the flag is on.\n *\n * @see https://ui.funstack.work/components/toolbar\n */\nexport function ToolbarRoot({\n orientation = \"horizontal\",\n loop = true,\n experimental_focusgroup = false,\n className,\n style,\n children,\n render,\n ...rest\n}: ToolbarRootProps) {\n const native = useNativeFocusgroup(experimental_focusgroup);\n const rootRef = useRef<HTMLElement | null>(null);\n const roving = useRovingFocus(rootRef, {\n orientation,\n loop,\n native,\n entry: firstItem,\n memory: true,\n });\n\n const context = useMemo<ToolbarContextValue>(() => ({ orientation }), [orientation]);\n const state: ToolbarRootState = { orientation };\n\n const focusgroup = experimental_focusgroup\n ? `toolbar ${orientation === \"vertical\" ? \"block\" : \"inline\"} ${loop ? \"wrap\" : \"nowrap\"}`\n : undefined;\n\n const element = useRender<ComponentPropsWithRef<\"div\">, ToolbarRootState>({\n defaultElement: \"div\",\n render,\n state,\n className,\n style,\n children,\n props: rest,\n libraryProps: {\n role: \"toolbar\",\n \"aria-orientation\": orientation,\n \"data-orientation\": orientation,\n ...roving,\n ...(focusgroup !== undefined && { focusgroup }),\n },\n ref: rootRef,\n });\n\n return <ToolbarContext value={context}>{element}</ToolbarContext>;\n}\n\nToolbarRoot.displayName = \"ToolbarRoot\";\n"],"mappings":";;;;;;;;;;;;;AA0EA,SAAS,UAAU,OAAwD;CACzE,OAAO,MAAM;AACf;;;;;;;;;;;;AAaA,SAAgB,YAAY,EAC1B,cAAc,cACd,OAAO,MACP,0BAA0B,OAC1B,WACA,OACA,UACA,QACA,GAAG,QACgB;CACnB,MAAM,SAAS,oBAAoB,uBAAuB;CAC1D,MAAM,UAAU,OAA2B,IAAI;CAC/C,MAAM,SAAS,eAAe,SAAS;EACrC;EACA;EACA;EACA,OAAO;EACP,QAAQ;CACV,CAAC;CAED,MAAM,UAAU,eAAoC,EAAE,YAAY,IAAI,CAAC,WAAW,CAAC;CACnF,MAAM,QAA0B,EAAE,YAAY;CAE9C,MAAM,aAAa,0BACf,WAAW,gBAAgB,aAAa,UAAU,SAAS,GAAG,OAAO,SAAS,aAC9E,KAAA;CAEJ,MAAM,UAAU,UAA0D;EACxE,gBAAgB;EAChB;EACA;EACA;EACA;EACA;EACA,OAAO;EACP,cAAc;GACZ,MAAM;GACN,oBAAoB;GACpB,oBAAoB;GACpB,GAAG;GACH,GAAI,eAAe,KAAA,KAAa,EAAE,WAAW;EAC/C;EACA,KAAK;CACP,CAAC;CAED,OAAO,oBAAC,gBAAD;EAAgB,OAAO;EAAU,UAAA;CAAwB,CAAA;AAClE;AAEA,YAAY,cAAc"}
|
|
@@ -2,13 +2,24 @@ import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
|
2
2
|
import { ToolbarOrientation } from "./toolbar-root.mjs";
|
|
3
3
|
import { CSSProperties, ComponentPropsWithRef } from "react";
|
|
4
4
|
//#region src/toolbar/toolbar-separator.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* State of `Toolbar.Separator`, passed to the function forms of `className`, `style` and `render`.
|
|
7
|
+
*/
|
|
5
8
|
export interface ToolbarSeparatorState {
|
|
6
9
|
/** The separator's own orientation: perpendicular to the Toolbar's. */
|
|
7
10
|
readonly orientation: ToolbarOrientation;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Props of `Toolbar.Separator`.
|
|
14
|
+
*
|
|
15
|
+
* @see https://ui.funstack.work/components/toolbar
|
|
16
|
+
*/
|
|
9
17
|
export interface ToolbarSeparatorProps extends Omit<ComponentPropsWithRef<"hr">, "aria-orientation" | "className" | "style" | "children"> {
|
|
18
|
+
/** Class name, or a function of the part's state that returns one. */
|
|
10
19
|
className?: StateValue<string | undefined, ToolbarSeparatorState>;
|
|
20
|
+
/** Inline style, or a function of the part's state that returns one. */
|
|
11
21
|
style?: StateValue<CSSProperties | undefined, ToolbarSeparatorState>;
|
|
22
|
+
/** Replace the default `<hr>` (element form) or take over rendering (function form). */
|
|
12
23
|
render?: RenderProp<ComponentPropsWithRef<"hr">, ToolbarSeparatorState>;
|
|
13
24
|
}
|
|
14
25
|
/**
|
|
@@ -16,6 +27,8 @@ export interface ToolbarSeparatorProps extends Omit<ComponentPropsWithRef<"hr">,
|
|
|
16
27
|
* a vertical one. Not focusable, not an item.
|
|
17
28
|
*
|
|
18
29
|
* Owned keys (conventions 1.2): `aria-orientation`, `data-orientation`.
|
|
30
|
+
*
|
|
31
|
+
* @see https://ui.funstack.work/components/toolbar
|
|
19
32
|
*/
|
|
20
33
|
export declare function ToolbarSeparator({ className, style, render, ...rest }: ToolbarSeparatorProps): import("react").ReactNode;
|
|
21
34
|
export declare namespace ToolbarSeparator {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar-separator.d.mts","names":[],"sources":["../../src/toolbar/toolbar-separator.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"toolbar-separator.d.mts","names":[],"sources":["../../src/toolbar/toolbar-separator.tsx"],"mappings":";;;;;;;iBAUiB;;WAEN,aAAa;;;;;;;iBAQP,8BAA8B,KAC7C;;EAIA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,SAAS,WAAW,6BAA6B;;;;;;;;;;wBAWnC,mBAAmB,WAAW,OAAO,WAAW,QAAQ,wCAAqB;yBAA7E"}
|
|
@@ -7,6 +7,8 @@ import { useRender } from "../internal/use-render.mjs";
|
|
|
7
7
|
* a vertical one. Not focusable, not an item.
|
|
8
8
|
*
|
|
9
9
|
* Owned keys (conventions 1.2): `aria-orientation`, `data-orientation`.
|
|
10
|
+
*
|
|
11
|
+
* @see https://ui.funstack.work/components/toolbar
|
|
10
12
|
*/
|
|
11
13
|
function ToolbarSeparator({ className, style, render, ...rest }) {
|
|
12
14
|
const orientation = useToolbarContext()?.orientation === "vertical" ? "horizontal" : "vertical";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar-separator.mjs","names":[],"sources":["../../src/toolbar/toolbar-separator.tsx"],"sourcesContent":["\"use client\";\nimport type { ComponentPropsWithRef, CSSProperties } from \"react\";\nimport { useToolbarContext } from \"../internal/toolbar-context.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport type { ToolbarOrientation } from \"./toolbar-root.js\";\n\nexport interface ToolbarSeparatorState {\n /** The separator's own orientation: perpendicular to the Toolbar's. */\n readonly orientation: ToolbarOrientation;\n}\n\nexport interface ToolbarSeparatorProps extends Omit<\n ComponentPropsWithRef<\"hr\">,\n \"aria-orientation\" | \"className\" | \"style\" | \"children\"\n> {\n className?: StateValue<string | undefined, ToolbarSeparatorState>;\n style?: StateValue<CSSProperties | undefined, ToolbarSeparatorState>;\n render?: RenderProp<ComponentPropsWithRef<\"hr\">, ToolbarSeparatorState>;\n}\n\n/**\n * `<hr aria-orientation>` between toolbar items: vertical in a horizontal Toolbar, horizontal in\n * a vertical one. Not focusable, not an item.\n *\n * Owned keys (conventions 1.2): `aria-orientation`, `data-orientation`.\n */\nexport function ToolbarSeparator({ className, style, render, ...rest }: ToolbarSeparatorProps) {\n const toolbar = useToolbarContext();\n const orientation: ToolbarOrientation =\n toolbar?.orientation === \"vertical\" ? \"horizontal\" : \"vertical\";\n const state: ToolbarSeparatorState = { orientation };\n\n return useRender<ComponentPropsWithRef<\"hr\">, ToolbarSeparatorState>({\n defaultElement: \"hr\",\n render,\n state,\n className,\n style,\n children: undefined,\n props: rest,\n libraryProps: {\n \"aria-orientation\": orientation,\n \"data-orientation\": orientation,\n },\n });\n}\n\nToolbarSeparator.displayName = \"ToolbarSeparator\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"toolbar-separator.mjs","names":[],"sources":["../../src/toolbar/toolbar-separator.tsx"],"sourcesContent":["\"use client\";\nimport type { ComponentPropsWithRef, CSSProperties } from \"react\";\nimport { useToolbarContext } from \"../internal/toolbar-context.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport type { ToolbarOrientation } from \"./toolbar-root.js\";\n\n/**\n * State of `Toolbar.Separator`, passed to the function forms of `className`, `style` and `render`.\n */\nexport interface ToolbarSeparatorState {\n /** The separator's own orientation: perpendicular to the Toolbar's. */\n readonly orientation: ToolbarOrientation;\n}\n\n/**\n * Props of `Toolbar.Separator`.\n *\n * @see https://ui.funstack.work/components/toolbar\n */\nexport interface ToolbarSeparatorProps extends Omit<\n ComponentPropsWithRef<\"hr\">,\n \"aria-orientation\" | \"className\" | \"style\" | \"children\"\n> {\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, ToolbarSeparatorState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, ToolbarSeparatorState>;\n /** Replace the default `<hr>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"hr\">, ToolbarSeparatorState>;\n}\n\n/**\n * `<hr aria-orientation>` between toolbar items: vertical in a horizontal Toolbar, horizontal in\n * a vertical one. Not focusable, not an item.\n *\n * Owned keys (conventions 1.2): `aria-orientation`, `data-orientation`.\n *\n * @see https://ui.funstack.work/components/toolbar\n */\nexport function ToolbarSeparator({ className, style, render, ...rest }: ToolbarSeparatorProps) {\n const toolbar = useToolbarContext();\n const orientation: ToolbarOrientation =\n toolbar?.orientation === \"vertical\" ? \"horizontal\" : \"vertical\";\n const state: ToolbarSeparatorState = { orientation };\n\n return useRender<ComponentPropsWithRef<\"hr\">, ToolbarSeparatorState>({\n defaultElement: \"hr\",\n render,\n state,\n className,\n style,\n children: undefined,\n props: rest,\n libraryProps: {\n \"aria-orientation\": orientation,\n \"data-orientation\": orientation,\n },\n });\n}\n\nToolbarSeparator.displayName = \"ToolbarSeparator\";\n"],"mappings":";;;;;;;;;;;;AAwCA,SAAgB,iBAAiB,EAAE,WAAW,OAAO,QAAQ,GAAG,QAA+B;CAE7F,MAAM,cADU,kBAER,CAAC,EAAE,gBAAgB,aAAa,eAAe;CAGvD,OAAO,UAA8D;EACnE,gBAAgB;EAChB;EACA,OAAA,EALqC,YAKjC;EACJ;EACA;EACA,UAAU,KAAA;EACV,OAAO;EACP,cAAc;GACZ,oBAAoB;GACpB,oBAAoB;EACtB;CACF,CAAC;AACH;AAEA,iBAAiB,cAAc"}
|
package/dist/tooltip/index.d.mts
CHANGED
|
@@ -11,6 +11,8 @@ import { TooltipTrigger, TooltipTriggerProps, TooltipTriggerState } from "./tool
|
|
|
11
11
|
* top layer and is placed with CSS Anchor Positioning, `Arrow` (decorative `span`) echoes the
|
|
12
12
|
* Popup's resolved side. Open state is browser-owned: no `open` prop, no action, style with
|
|
13
13
|
* `:popover-open`. Render the Popup immediately after the Trigger.
|
|
14
|
+
*
|
|
15
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
14
16
|
*/
|
|
15
17
|
export declare const Tooltip: {
|
|
16
18
|
readonly Root: typeof TooltipRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/tooltip/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/tooltip/index.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa;WACX,aAAI;WACJ,gBAAO;WACP,cAAK;WACL,cAAK"}
|
package/dist/tooltip/index.mjs
CHANGED
|
@@ -9,6 +9,8 @@ import { TooltipTrigger } from "./tooltip-trigger.mjs";
|
|
|
9
9
|
* top layer and is placed with CSS Anchor Positioning, `Arrow` (decorative `span`) echoes the
|
|
10
10
|
* Popup's resolved side. Open state is browser-owned: no `open` prop, no action, style with
|
|
11
11
|
* `:popover-open`. Render the Popup immediately after the Trigger.
|
|
12
|
+
*
|
|
13
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
12
14
|
*/
|
|
13
15
|
const Tooltip = {
|
|
14
16
|
Root: TooltipRoot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/tooltip/index.ts"],"sourcesContent":["// Ships the platform attribute typings with this subpath (conventions 7.4). Type-only: the\n// built JS has no import of it.\nimport \"../internal/platform-attributes.js\";\nimport { TooltipArrow } from \"./tooltip-arrow.js\";\nimport { TooltipPopup } from \"./tooltip-popup.js\";\nimport { TooltipRoot } from \"./tooltip-root.js\";\nimport { TooltipTrigger } from \"./tooltip-trigger.js\";\n\n/**\n * Tooltip (WAI-ARIA APG Tooltip pattern): `Root` (no DOM) owns the id and the interaction,\n * `Trigger` (button) is hovered or focused, `Popup` (`div[popover] role=\"tooltip\"`) lives in the\n * top layer and is placed with CSS Anchor Positioning, `Arrow` (decorative `span`) echoes the\n * Popup's resolved side. Open state is browser-owned: no `open` prop, no action, style with\n * `:popover-open`. Render the Popup immediately after the Trigger.\n */\nexport const Tooltip = {\n Root: TooltipRoot,\n Trigger: TooltipTrigger,\n Popup: TooltipPopup,\n Arrow: TooltipArrow,\n} as const;\n\nexport type { TooltipRootProps, TooltipRootState, TooltipProvides } from \"./tooltip-root.js\";\nexport type { TooltipTriggerProps, TooltipTriggerState } from \"./tooltip-trigger.js\";\nexport type {\n TooltipPopupProps,\n TooltipPopupState,\n TooltipSide,\n TooltipAlign,\n} from \"./tooltip-popup.js\";\nexport type { TooltipArrowProps, TooltipArrowState } from \"./tooltip-arrow.js\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/tooltip/index.ts"],"sourcesContent":["// Ships the platform attribute typings with this subpath (conventions 7.4). Type-only: the\n// built JS has no import of it.\nimport \"../internal/platform-attributes.js\";\nimport { TooltipArrow } from \"./tooltip-arrow.js\";\nimport { TooltipPopup } from \"./tooltip-popup.js\";\nimport { TooltipRoot } from \"./tooltip-root.js\";\nimport { TooltipTrigger } from \"./tooltip-trigger.js\";\n\n/**\n * Tooltip (WAI-ARIA APG Tooltip pattern): `Root` (no DOM) owns the id and the interaction,\n * `Trigger` (button) is hovered or focused, `Popup` (`div[popover] role=\"tooltip\"`) lives in the\n * top layer and is placed with CSS Anchor Positioning, `Arrow` (decorative `span`) echoes the\n * Popup's resolved side. Open state is browser-owned: no `open` prop, no action, style with\n * `:popover-open`. Render the Popup immediately after the Trigger.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport const Tooltip = {\n Root: TooltipRoot,\n Trigger: TooltipTrigger,\n Popup: TooltipPopup,\n Arrow: TooltipArrow,\n} as const;\n\nexport type { TooltipRootProps, TooltipRootState, TooltipProvides } from \"./tooltip-root.js\";\nexport type { TooltipTriggerProps, TooltipTriggerState } from \"./tooltip-trigger.js\";\nexport type {\n TooltipPopupProps,\n TooltipPopupState,\n TooltipSide,\n TooltipAlign,\n} from \"./tooltip-popup.js\";\nexport type { TooltipArrowProps, TooltipArrowState } from \"./tooltip-arrow.js\";\n"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAa,UAAU;CACrB,MAAM;CACN,SAAS;CACT,OAAO;CACP,OAAO;AACT"}
|
|
@@ -2,15 +2,29 @@ import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
|
2
2
|
import { TooltipAlign, TooltipSide } from "./tooltip-context.mjs";
|
|
3
3
|
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
4
4
|
//#region src/tooltip/tooltip-arrow.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* State of `Tooltip.Arrow`, passed to the function forms of `className`, `style`, `children` and
|
|
7
|
+
* `render`.
|
|
8
|
+
*/
|
|
5
9
|
export interface TooltipArrowState {
|
|
6
10
|
/** The Popup's side: resolved while shown (after any flip), requested otherwise. */
|
|
7
11
|
readonly side: TooltipSide | null;
|
|
12
|
+
/** The Popup's alignment: resolved while shown, requested otherwise. */
|
|
8
13
|
readonly align: TooltipAlign;
|
|
9
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Props of `Tooltip.Arrow`.
|
|
17
|
+
*
|
|
18
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
19
|
+
*/
|
|
10
20
|
export interface TooltipArrowProps extends Omit<ComponentPropsWithRef<"span">, "aria-hidden" | "className" | "style" | "children"> {
|
|
21
|
+
/** Class name, or a function of the part's state that returns one. */
|
|
11
22
|
className?: StateValue<string | undefined, TooltipArrowState>;
|
|
23
|
+
/** Inline style, or a function of the part's state that returns one. */
|
|
12
24
|
style?: StateValue<CSSProperties | undefined, TooltipArrowState>;
|
|
25
|
+
/** Content, or a function of the part's state. */
|
|
13
26
|
children?: StateValue<ReactNode, TooltipArrowState>;
|
|
27
|
+
/** Replace the default `<span>` (element form) or take over rendering (function form). */
|
|
14
28
|
render?: RenderProp<ComponentPropsWithRef<"span">, TooltipArrowState>;
|
|
15
29
|
}
|
|
16
30
|
/**
|
|
@@ -21,6 +35,8 @@ export interface TooltipArrowProps extends Omit<ComponentPropsWithRef<"span">, "
|
|
|
21
35
|
*
|
|
22
36
|
* Owned keys (conventions 1.2): `aria-hidden`, and `data-side` / `data-align` unless the Popup's
|
|
23
37
|
* `side` is `null`.
|
|
38
|
+
*
|
|
39
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
24
40
|
*/
|
|
25
41
|
export declare function TooltipArrow({ className, style, children, render, ...rest }: TooltipArrowProps): ReactNode;
|
|
26
42
|
export declare namespace TooltipArrow {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-arrow.d.mts","names":[],"sources":["../../src/tooltip/tooltip-arrow.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip-arrow.d.mts","names":[],"sources":["../../src/tooltip/tooltip-arrow.tsx"],"mappings":";;;;;;;;iBAaiB;;WAEN,MAAM;;WAEN,OAAO;;;;;;;iBAQD,0BAA0B,KACzC;;EAIA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,+BAA+B;;;;;;;;;;;;;wBAcrC,eAAe,WAAW,OAAO,UAAU,WAAW,QAAQ,oBAAiB;yBAA/E"}
|
|
@@ -11,6 +11,8 @@ import { use } from "react";
|
|
|
11
11
|
*
|
|
12
12
|
* Owned keys (conventions 1.2): `aria-hidden`, and `data-side` / `data-align` unless the Popup's
|
|
13
13
|
* `side` is `null`.
|
|
14
|
+
*
|
|
15
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
14
16
|
*/
|
|
15
17
|
function TooltipArrow({ className, style, children, render, ...rest }) {
|
|
16
18
|
const placement = use(TooltipPopupContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-arrow.mjs","names":[],"sources":["../../src/tooltip/tooltip-arrow.tsx"],"sourcesContent":["\"use client\";\nimport { use } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport type { DataAttributes } from \"../internal/use-render.js\";\nimport { TooltipPopupContext } from \"./tooltip-context.js\";\nimport type { TooltipAlign, TooltipSide } from \"./tooltip-context.js\";\n\nexport interface TooltipArrowState {\n /** The Popup's side: resolved while shown (after any flip), requested otherwise. */\n readonly side: TooltipSide | null;\n readonly align: TooltipAlign;\n}\n\nexport interface TooltipArrowProps extends Omit<\n ComponentPropsWithRef<\"span\">,\n \"aria-hidden\" | \"className\" | \"style\" | \"children\"\n> {\n className?: StateValue<string | undefined, TooltipArrowState>;\n style?: StateValue<CSSProperties | undefined, TooltipArrowState>;\n children?: StateValue<ReactNode, TooltipArrowState>;\n render?: RenderProp<ComponentPropsWithRef<\"span\">, TooltipArrowState>;\n}\n\n/**\n * A decorative `<span aria-hidden=\"true\">` inside `Tooltip.Popup` that draws nothing itself: it\n * echoes the Popup's `data-side` / `data-align`, which are the **resolved** placement while the\n * tooltip is shown (design 7.4), so CSS keyed on `[data-side]` puts it on the edge that faces the\n * trigger, after a `position-try-fallbacks` flip as well.\n *\n * Owned keys (conventions 1.2): `aria-hidden`, and `data-side` / `data-align` unless the Popup's\n * `side` is `null`.\n */\nexport function TooltipArrow({ className, style, children, render, ...rest }: TooltipArrowProps) {\n const placement = use(TooltipPopupContext);\n if (placement === null) {\n throw new Error(\"Tooltip.Arrow must be rendered inside a Tooltip.Popup.\");\n }\n const { side, align } = placement;\n const state: TooltipArrowState = { side, align };\n\n const libraryProps: ComponentPropsWithRef<\"span\"> & DataAttributes = {\n \"aria-hidden\": true,\n ...(side !== null && { \"data-side\": side, \"data-align\": align }),\n };\n\n return useRender<ComponentPropsWithRef<\"span\">, TooltipArrowState>({\n defaultElement: \"span\",\n render,\n state,\n className,\n style,\n children,\n props: rest,\n libraryProps,\n });\n}\n\nTooltipArrow.displayName = \"TooltipArrow\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip-arrow.mjs","names":[],"sources":["../../src/tooltip/tooltip-arrow.tsx"],"sourcesContent":["\"use client\";\nimport { use } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport type { DataAttributes } from \"../internal/use-render.js\";\nimport { TooltipPopupContext } from \"./tooltip-context.js\";\nimport type { TooltipAlign, TooltipSide } from \"./tooltip-context.js\";\n\n/**\n * State of `Tooltip.Arrow`, passed to the function forms of `className`, `style`, `children` and\n * `render`.\n */\nexport interface TooltipArrowState {\n /** The Popup's side: resolved while shown (after any flip), requested otherwise. */\n readonly side: TooltipSide | null;\n /** The Popup's alignment: resolved while shown, requested otherwise. */\n readonly align: TooltipAlign;\n}\n\n/**\n * Props of `Tooltip.Arrow`.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport interface TooltipArrowProps extends Omit<\n ComponentPropsWithRef<\"span\">,\n \"aria-hidden\" | \"className\" | \"style\" | \"children\"\n> {\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, TooltipArrowState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, TooltipArrowState>;\n /** Content, or a function of the part's state. */\n children?: StateValue<ReactNode, TooltipArrowState>;\n /** Replace the default `<span>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"span\">, TooltipArrowState>;\n}\n\n/**\n * A decorative `<span aria-hidden=\"true\">` inside `Tooltip.Popup` that draws nothing itself: it\n * echoes the Popup's `data-side` / `data-align`, which are the **resolved** placement while the\n * tooltip is shown (design 7.4), so CSS keyed on `[data-side]` puts it on the edge that faces the\n * trigger, after a `position-try-fallbacks` flip as well.\n *\n * Owned keys (conventions 1.2): `aria-hidden`, and `data-side` / `data-align` unless the Popup's\n * `side` is `null`.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport function TooltipArrow({ className, style, children, render, ...rest }: TooltipArrowProps) {\n const placement = use(TooltipPopupContext);\n if (placement === null) {\n throw new Error(\"Tooltip.Arrow must be rendered inside a Tooltip.Popup.\");\n }\n const { side, align } = placement;\n const state: TooltipArrowState = { side, align };\n\n const libraryProps: ComponentPropsWithRef<\"span\"> & DataAttributes = {\n \"aria-hidden\": true,\n ...(side !== null && { \"data-side\": side, \"data-align\": align }),\n };\n\n return useRender<ComponentPropsWithRef<\"span\">, TooltipArrowState>({\n defaultElement: \"span\",\n render,\n state,\n className,\n style,\n children,\n props: rest,\n libraryProps,\n });\n}\n\nTooltipArrow.displayName = \"TooltipArrow\";\n"],"mappings":";;;;;;;;;;;;;;;;AAkDA,SAAgB,aAAa,EAAE,WAAW,OAAO,UAAU,QAAQ,GAAG,QAA2B;CAC/F,MAAM,YAAY,IAAI,mBAAmB;CACzC,IAAI,cAAc,MAChB,MAAM,IAAI,MAAM,wDAAwD;CAE1E,MAAM,EAAE,MAAM,UAAU;CACxB,MAAM,QAA2B;EAAE;EAAM;CAAM;CAE/C,MAAM,eAA+D;EACnE,eAAe;EACf,GAAI,SAAS,QAAQ;GAAE,aAAa;GAAM,cAAc;EAAM;CAChE;CAEA,OAAO,UAA4D;EACjE,gBAAgB;EAChB;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;CACF,CAAC;AACH;AAEA,aAAa,cAAc"}
|
|
@@ -5,6 +5,10 @@ import { AnchorAlign, AnchorSide } from "../internal/anchor-position.mjs";
|
|
|
5
5
|
* shown, the state carries the resolved physical side.
|
|
6
6
|
*/
|
|
7
7
|
export type TooltipSide = AnchorSide;
|
|
8
|
+
/**
|
|
9
|
+
* Alignment of the Popup along its side: inline-relative on a top / bottom side, the top / bottom
|
|
10
|
+
* edges on the others.
|
|
11
|
+
*/
|
|
8
12
|
export type TooltipAlign = AnchorAlign;
|
|
9
13
|
/** Which accessibility relation the tooltip provides for its trigger (design section 5.1). */
|
|
10
14
|
export type TooltipProvides = "description" | "name";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-context.d.mts","names":[],"sources":["../../src/tooltip/tooltip-context.ts"],"mappings":";;;;;;YAQY,cAAc
|
|
1
|
+
{"version":3,"file":"tooltip-context.d.mts","names":[],"sources":["../../src/tooltip/tooltip-context.ts"],"mappings":";;;;;;YAQY,cAAc;;;;;YAKd,eAAe;;YAGf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-context.mjs","names":[],"sources":["../../src/tooltip/tooltip-context.ts"],"sourcesContent":["\"use client\";\nimport { createContext, use } from \"react\";\nimport type { AnchorAlign, AnchorSide } from \"../internal/anchor-position.js\";\n\n/**\n * `inline-start` / `inline-end` follow the popup's `direction` (conventions 13.1). While\n * shown, the state carries the resolved physical side.\n */\nexport type TooltipSide = AnchorSide;\nexport type TooltipAlign = AnchorAlign;\n\n/** Which accessibility relation the tooltip provides for its trigger (design section 5.1). */\nexport type TooltipProvides = \"description\" | \"name\";\n\nexport interface TooltipContextValue {\n /** Id of the Popup; the Trigger references it through `aria-describedby` / `aria-labelledby`. */\n readonly popupId: string;\n readonly disabled: boolean;\n /** Written onto the Trigger as `interest-delay-start` / `-end` on the native path. */\n readonly delay: number;\n readonly closeDelay: number;\n readonly provides: TooltipProvides;\n /** Trigger and Popup register their elements through callback refs (design 12.2). */\n readonly setTriggerElement: (element: HTMLElement | null) => void;\n readonly setPopupElement: (element: HTMLElement | null) => void;\n /**\n * The Trigger reports whether it renders `interestfor`, so the Root's interaction effect re-runs\n * (and re-detects the native path) when `experimental_interestFor` changes after mount.\n */\n readonly setInterestForRequested: (requested: boolean) => void;\n}\n\nexport const TooltipContext = createContext<TooltipContextValue | null>(null);\n\n/** What `Tooltip.Popup` tells its `Tooltip.Arrow`: the placement it renders (design 12.2). */\nexport interface TooltipPopupContextValue {\n /** The resolved side while shown, else the requested one; `null` with `side={null}`. */\n readonly side: TooltipSide | null;\n readonly align: TooltipAlign;\n}\n\nexport const TooltipPopupContext = createContext<TooltipPopupContextValue | null>(null);\n\nexport function useTooltipContext(part: string): TooltipContextValue {\n const context = use(TooltipContext);\n if (context === null) {\n throw new Error(`${part} must be rendered inside a Tooltip.Root.`);\n }\n return context;\n}\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tooltip-context.mjs","names":[],"sources":["../../src/tooltip/tooltip-context.ts"],"sourcesContent":["\"use client\";\nimport { createContext, use } from \"react\";\nimport type { AnchorAlign, AnchorSide } from \"../internal/anchor-position.js\";\n\n/**\n * `inline-start` / `inline-end` follow the popup's `direction` (conventions 13.1). While\n * shown, the state carries the resolved physical side.\n */\nexport type TooltipSide = AnchorSide;\n/**\n * Alignment of the Popup along its side: inline-relative on a top / bottom side, the top / bottom\n * edges on the others.\n */\nexport type TooltipAlign = AnchorAlign;\n\n/** Which accessibility relation the tooltip provides for its trigger (design section 5.1). */\nexport type TooltipProvides = \"description\" | \"name\";\n\nexport interface TooltipContextValue {\n /** Id of the Popup; the Trigger references it through `aria-describedby` / `aria-labelledby`. */\n readonly popupId: string;\n readonly disabled: boolean;\n /** Written onto the Trigger as `interest-delay-start` / `-end` on the native path. */\n readonly delay: number;\n readonly closeDelay: number;\n readonly provides: TooltipProvides;\n /** Trigger and Popup register their elements through callback refs (design 12.2). */\n readonly setTriggerElement: (element: HTMLElement | null) => void;\n readonly setPopupElement: (element: HTMLElement | null) => void;\n /**\n * The Trigger reports whether it renders `interestfor`, so the Root's interaction effect re-runs\n * (and re-detects the native path) when `experimental_interestFor` changes after mount.\n */\n readonly setInterestForRequested: (requested: boolean) => void;\n}\n\nexport const TooltipContext = createContext<TooltipContextValue | null>(null);\n\n/** What `Tooltip.Popup` tells its `Tooltip.Arrow`: the placement it renders (design 12.2). */\nexport interface TooltipPopupContextValue {\n /** The resolved side while shown, else the requested one; `null` with `side={null}`. */\n readonly side: TooltipSide | null;\n readonly align: TooltipAlign;\n}\n\nexport const TooltipPopupContext = createContext<TooltipPopupContextValue | null>(null);\n\nexport function useTooltipContext(part: string): TooltipContextValue {\n const context = use(TooltipContext);\n if (context === null) {\n throw new Error(`${part} must be rendered inside a Tooltip.Root.`);\n }\n return context;\n}\n"],"mappings":";;;AAoCA,MAAa,iBAAiB,cAA0C,IAAI;AAS5E,MAAa,sBAAsB,cAA+C,IAAI;AAEtF,SAAgB,kBAAkB,MAAmC;CACnE,MAAM,UAAU,IAAI,cAAc;CAClC,IAAI,YAAY,MACd,MAAM,IAAI,MAAM,GAAG,KAAK,yCAAyC;CAEnE,OAAO;AACT"}
|
|
@@ -2,7 +2,12 @@ import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
|
2
2
|
import { TooltipAlign, TooltipSide } from "./tooltip-context.mjs";
|
|
3
3
|
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
4
4
|
//#region src/tooltip/tooltip-popup.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* State of `Tooltip.Popup`, passed to the function forms of `className`, `style`, `children` and
|
|
7
|
+
* `render`.
|
|
8
|
+
*/
|
|
5
9
|
export interface TooltipPopupState {
|
|
10
|
+
/** The Root's `disabled`. */
|
|
6
11
|
readonly disabled: boolean;
|
|
7
12
|
/**
|
|
8
13
|
* While shown: the physical side the browser placed the popup on (`"top"` / `"bottom"` /
|
|
@@ -13,34 +18,48 @@ export interface TooltipPopupState {
|
|
|
13
18
|
/** While shown: the resolved alignment; otherwise the `align` prop. */
|
|
14
19
|
readonly align: TooltipAlign;
|
|
15
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Props of `Tooltip.Popup`.
|
|
23
|
+
*
|
|
24
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
25
|
+
*/
|
|
16
26
|
export interface TooltipPopupProps extends Omit<ComponentPropsWithRef<"div">, "id" | "popover" | "role" | "className" | "style" | "children"> {
|
|
17
27
|
/**
|
|
18
28
|
* Placement relative to the trigger through inline `position-area`, with
|
|
19
|
-
* `position-try-fallbacks` flipping it when it does not fit.
|
|
29
|
+
* `position-try-fallbacks` flipping it when it does not fit. `"inline-start"` /
|
|
20
30
|
* `"inline-end"` follow the popup's direction. `null` emits no inline positioning (and no
|
|
21
31
|
* `data-side` / `data-align`), so a stylesheet owns placement.
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue `"top"`
|
|
22
34
|
*/
|
|
23
35
|
side?: TooltipSide | null;
|
|
24
36
|
/**
|
|
25
|
-
* Alignment along the side.
|
|
37
|
+
* Alignment along the side. On a top / bottom side `start` / `end` are
|
|
26
38
|
* inline-relative (mirrored under `direction: rtl`); on the other sides they are the top /
|
|
27
39
|
* bottom edges. Ignored when `side` is `null`.
|
|
40
|
+
*
|
|
41
|
+
* @defaultValue `"center"`
|
|
28
42
|
*/
|
|
29
43
|
align?: TooltipAlign;
|
|
30
44
|
/**
|
|
31
45
|
* Experimental (Chrome 151+, Firefox 153+; Safari 27.0 treats it as `"manual"`). Renders
|
|
32
46
|
* `popover="hint"` instead of `popover="manual"`: native light dismiss, and the tooltip can
|
|
33
47
|
* open over an `auto` popover (a menu) without closing it. The JS Escape / pointerdown handling
|
|
34
|
-
* stays in place for engines that do not know `hint`.
|
|
48
|
+
* stays in place for engines that do not know `hint`.
|
|
49
|
+
*
|
|
50
|
+
* @defaultValue `false`
|
|
35
51
|
*/
|
|
36
52
|
experimental_hint?: boolean;
|
|
53
|
+
/** Class name, or a function of the part's state that returns one. */
|
|
37
54
|
className?: StateValue<string | undefined, TooltipPopupState>;
|
|
55
|
+
/** Inline style, or a function of the part's state that returns one. */
|
|
38
56
|
style?: StateValue<CSSProperties | undefined, TooltipPopupState>;
|
|
39
57
|
/**
|
|
40
58
|
* Rendered at mount (hidden by the popover's `display: none`), not at open time. Tooltip
|
|
41
59
|
* content should be static; if it must suspend, put the `<Suspense>` boundary inside the Popup.
|
|
42
60
|
*/
|
|
43
61
|
children?: StateValue<ReactNode, TooltipPopupState>;
|
|
62
|
+
/** Replace the default `<div>` (element form) or take over rendering (function form). */
|
|
44
63
|
render?: RenderProp<ComponentPropsWithRef<"div">, TooltipPopupState>;
|
|
45
64
|
}
|
|
46
65
|
/**
|
|
@@ -60,6 +79,8 @@ export interface TooltipPopupProps extends Omit<ComponentPropsWithRef<"div">, "i
|
|
|
60
79
|
*
|
|
61
80
|
* Owned keys (conventions 1.2): `id`, `popover`, `role`, `data-disabled`, and `data-side` /
|
|
62
81
|
* `data-align` unless `side` is `null`.
|
|
82
|
+
*
|
|
83
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
63
84
|
*/
|
|
64
85
|
export declare function TooltipPopup({ side: sideProp, align: alignProp, experimental_hint, className, style, children, render, ...rest }: TooltipPopupProps): import("react").JSX.Element;
|
|
65
86
|
export declare namespace TooltipPopup {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-popup.d.mts","names":[],"sources":["../../src/tooltip/tooltip-popup.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip-popup.d.mts","names":[],"sources":["../../src/tooltip/tooltip-popup.tsx"],"mappings":";;;;;;;;iBAkBiB;;WAEN;;;;;;WAMA,MAAM;;WAEN,OAAO;;;;;;;iBAQD,0BAA0B,KACzC;;;;;;;;;EAWA,OAAO;;;;;;;;EAQP,QAAQ;;;;;;;;;EASR;;EAEA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;;;;EAK9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,8BAA8B;;;;;;;;;;;;;;;;;;;;;;wBAuBpC,eACd,MAAM,UACN,OAAO,WACP,mBACA,WACA,OACA,UACA,WACG,QACF,oCAAiB,IAAA;yBATJ"}
|
|
@@ -24,6 +24,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
24
24
|
*
|
|
25
25
|
* Owned keys (conventions 1.2): `id`, `popover`, `role`, `data-disabled`, and `data-side` /
|
|
26
26
|
* `data-align` unless `side` is `null`.
|
|
27
|
+
*
|
|
28
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
27
29
|
*/
|
|
28
30
|
function TooltipPopup({ side: sideProp = "top", align: alignProp = "center", experimental_hint = false, className, style, children, render, ...rest }) {
|
|
29
31
|
const ctx = useTooltipContext("Tooltip.Popup");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-popup.mjs","names":[],"sources":["../../src/tooltip/tooltip-popup.tsx"],"sourcesContent":["\"use client\";\nimport { useMemo } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { dataAttr } from \"../internal/data-attr.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useMergedRefs } from \"../internal/use-merged-refs.js\";\nimport { useAnchoredPlacement } from \"../internal/use-resolved-placement.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport type { DataAttributes } from \"../internal/use-render.js\";\nimport { TooltipPopupContext, useTooltipContext } from \"./tooltip-context.js\";\nimport type { TooltipAlign, TooltipPopupContextValue, TooltipSide } from \"./tooltip-context.js\";\n\nexport type { TooltipAlign, TooltipSide } from \"./tooltip-context.js\";\n\nexport interface TooltipPopupState {\n readonly disabled: boolean;\n /**\n * While shown: the physical side the browser placed the popup on (`\"top\"` / `\"bottom\"` /\n * `\"left\"` / `\"right\"`, after any fallback flip). Otherwise the `side` prop. `null` with\n * `side={null}`.\n */\n readonly side: TooltipSide | null;\n /** While shown: the resolved alignment; otherwise the `align` prop. */\n readonly align: TooltipAlign;\n}\n\nexport interface TooltipPopupProps extends Omit<\n ComponentPropsWithRef<\"div\">,\n \"id\" | \"popover\" | \"role\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * Placement relative to the trigger through inline `position-area`, with\n * `position-try-fallbacks` flipping it when it does not fit.
|
|
1
|
+
{"version":3,"file":"tooltip-popup.mjs","names":[],"sources":["../../src/tooltip/tooltip-popup.tsx"],"sourcesContent":["\"use client\";\nimport { useMemo } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { dataAttr } from \"../internal/data-attr.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useMergedRefs } from \"../internal/use-merged-refs.js\";\nimport { useAnchoredPlacement } from \"../internal/use-resolved-placement.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport type { DataAttributes } from \"../internal/use-render.js\";\nimport { TooltipPopupContext, useTooltipContext } from \"./tooltip-context.js\";\nimport type { TooltipAlign, TooltipPopupContextValue, TooltipSide } from \"./tooltip-context.js\";\n\nexport type { TooltipAlign, TooltipSide } from \"./tooltip-context.js\";\n\n/**\n * State of `Tooltip.Popup`, passed to the function forms of `className`, `style`, `children` and\n * `render`.\n */\nexport interface TooltipPopupState {\n /** The Root's `disabled`. */\n readonly disabled: boolean;\n /**\n * While shown: the physical side the browser placed the popup on (`\"top\"` / `\"bottom\"` /\n * `\"left\"` / `\"right\"`, after any fallback flip). Otherwise the `side` prop. `null` with\n * `side={null}`.\n */\n readonly side: TooltipSide | null;\n /** While shown: the resolved alignment; otherwise the `align` prop. */\n readonly align: TooltipAlign;\n}\n\n/**\n * Props of `Tooltip.Popup`.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport interface TooltipPopupProps extends Omit<\n ComponentPropsWithRef<\"div\">,\n \"id\" | \"popover\" | \"role\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * Placement relative to the trigger through inline `position-area`, with\n * `position-try-fallbacks` flipping it when it does not fit. `\"inline-start\"` /\n * `\"inline-end\"` follow the popup's direction. `null` emits no inline positioning (and no\n * `data-side` / `data-align`), so a stylesheet owns placement.\n *\n * @defaultValue `\"top\"`\n */\n side?: TooltipSide | null;\n /**\n * Alignment along the side. On a top / bottom side `start` / `end` are\n * inline-relative (mirrored under `direction: rtl`); on the other sides they are the top /\n * bottom edges. Ignored when `side` is `null`.\n *\n * @defaultValue `\"center\"`\n */\n align?: TooltipAlign;\n /**\n * Experimental (Chrome 151+, Firefox 153+; Safari 27.0 treats it as `\"manual\"`). Renders\n * `popover=\"hint\"` instead of `popover=\"manual\"`: native light dismiss, and the tooltip can\n * open over an `auto` popover (a menu) without closing it. The JS Escape / pointerdown handling\n * stays in place for engines that do not know `hint`.\n *\n * @defaultValue `false`\n */\n experimental_hint?: boolean;\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, TooltipPopupState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, TooltipPopupState>;\n /**\n * Rendered at mount (hidden by the popover's `display: none`), not at open time. Tooltip\n * content should be static; if it must suspend, put the `<Suspense>` boundary inside the Popup.\n */\n children?: StateValue<ReactNode, TooltipPopupState>;\n /** Replace the default `<div>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"div\">, TooltipPopupState>;\n}\n\n/**\n * The tooltip content: a `div` with `popover` and `role=\"tooltip\"`, shown in the top layer and\n * anchored to the trigger implicitly (`interestfor` or `showPopover({ source })`). Open state is\n * browser-owned: style it with `:popover-open` and animate it with `@starting-style` in CSS.\n *\n * `data-side` / `data-align` are where the browser placed the popup while it is shown (the\n * `position-try-fallbacks` option it applied, read from the computed `position-area`;\n * conventions 13.2) and the requested values otherwise; `Tooltip.Arrow` echoes them.\n *\n * `data-instant` is present while the tooltip is shown by an open that began while another\n * `[role=\"tooltip\"]:popover-open` existed (a warm open, skip-delay), so\n * `[data-instant] { transition: none }` skips its entry animation. Not rendered by this part: the\n * Root's effect writes it on the element from the popup's `beforetoggle` (on both paths), before\n * the open's first style recalc, and removes it at the close's. No `state` counterpart.\n *\n * Owned keys (conventions 1.2): `id`, `popover`, `role`, `data-disabled`, and `data-side` /\n * `data-align` unless `side` is `null`.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport function TooltipPopup({\n side: sideProp = \"top\",\n align: alignProp = \"center\",\n experimental_hint = false,\n className,\n style,\n children,\n render,\n ...rest\n}: TooltipPopupProps) {\n const ctx = useTooltipContext(\"Tooltip.Popup\");\n const placement = useAnchoredPlacement({ side: sideProp, align: alignProp });\n const { side, align } = placement;\n const state: TooltipPopupState = { disabled: ctx.disabled, side, align };\n const arrow = useMemo<TooltipPopupContextValue>(() => ({ side, align }), [side, align]);\n const ref = useMergedRefs(ctx.setPopupElement, placement.ref);\n\n const libraryProps: ComponentPropsWithRef<\"div\"> & DataAttributes = {\n id: ctx.popupId,\n popover: experimental_hint ? \"hint\" : \"manual\",\n role: \"tooltip\",\n \"data-disabled\": dataAttr(ctx.disabled),\n // Not owned with `side={null}`: the stylesheet (or a render element) may set them.\n ...placement.dataAttributes,\n };\n\n const element = useRender<ComponentPropsWithRef<\"div\">, TooltipPopupState>({\n defaultElement: \"div\",\n render,\n state,\n className,\n // The consumer's style wins over the inline placement (design 3).\n style: placement.style(style),\n children,\n props: rest,\n libraryProps,\n ref,\n });\n\n return <TooltipPopupContext value={arrow}>{element}</TooltipPopupContext>;\n}\n\nTooltipPopup.displayName = \"TooltipPopup\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,SAAgB,aAAa,EAC3B,MAAM,WAAW,OACjB,OAAO,YAAY,UACnB,oBAAoB,OACpB,WACA,OACA,UACA,QACA,GAAG,QACiB;CACpB,MAAM,MAAM,kBAAkB,eAAe;CAC7C,MAAM,YAAY,qBAAqB;EAAE,MAAM;EAAU,OAAO;CAAU,CAAC;CAC3E,MAAM,EAAE,MAAM,UAAU;CACxB,MAAM,QAA2B;EAAE,UAAU,IAAI;EAAU;EAAM;CAAM;CACvE,MAAM,QAAQ,eAAyC;EAAE;EAAM;CAAM,IAAI,CAAC,MAAM,KAAK,CAAC;CACtF,MAAM,MAAM,cAAc,IAAI,iBAAiB,UAAU,GAAG;CAE5D,MAAM,eAA8D;EAClE,IAAI,IAAI;EACR,SAAS,oBAAoB,SAAS;EACtC,MAAM;EACN,iBAAiB,SAAS,IAAI,QAAQ;EAEtC,GAAG,UAAU;CACf;CAEA,MAAM,UAAU,UAA2D;EACzE,gBAAgB;EAChB;EACA;EACA;EAEA,OAAO,UAAU,MAAM,KAAK;EAC5B;EACA,OAAO;EACP;EACA;CACF,CAAC;CAED,OAAO,oBAAC,qBAAD;EAAqB,OAAO;EAAQ,UAAA;CAA6B,CAAA;AAC1E;AAEA,aAAa,cAAc"}
|
|
@@ -2,25 +2,45 @@ import { StateValue } from "../internal/types.mjs";
|
|
|
2
2
|
import { TooltipProvides } from "./tooltip-context.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
//#region src/tooltip/tooltip-root.d.ts
|
|
5
|
+
/** State of `Tooltip.Root`, passed to the function forms of `children`. */
|
|
5
6
|
export interface TooltipRootState {
|
|
7
|
+
/** The `disabled` prop. */
|
|
6
8
|
readonly disabled: boolean;
|
|
7
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Props of `Tooltip.Root`.
|
|
12
|
+
*
|
|
13
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
14
|
+
*/
|
|
8
15
|
export interface TooltipRootProps {
|
|
9
16
|
/**
|
|
10
17
|
* Milliseconds from hover or keyboard focus to open. Default 250 (Chromium's
|
|
11
18
|
* `interest-delay-start`). The same delay applies to hover and focus.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue `250`
|
|
12
21
|
*/
|
|
13
22
|
delay?: number;
|
|
14
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Milliseconds from de-hover or blur to close.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue `150` (Chromium's `interest-delay-end`)
|
|
27
|
+
*/
|
|
15
28
|
closeDelay?: number;
|
|
16
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* When true the tooltip never opens. The ARIA relation stays in place.
|
|
31
|
+
*
|
|
32
|
+
* @defaultValue `false`
|
|
33
|
+
*/
|
|
17
34
|
disabled?: boolean;
|
|
18
35
|
/**
|
|
19
36
|
* Which accessibility relation the tooltip provides for the trigger.
|
|
20
37
|
* `"description"` (default): `aria-describedby`, for triggers that have their own name.
|
|
21
38
|
* `"name"`: `aria-labelledby`, for icon-only triggers; do not also set `aria-label`.
|
|
39
|
+
*
|
|
40
|
+
* @defaultValue `"description"`
|
|
22
41
|
*/
|
|
23
42
|
provides?: TooltipProvides;
|
|
43
|
+
/** The Trigger and the Popup. May be a function of the part's state. */
|
|
24
44
|
children?: StateValue<ReactNode, TooltipRootState>;
|
|
25
45
|
}
|
|
26
46
|
/**
|
|
@@ -31,6 +51,8 @@ export interface TooltipRootProps {
|
|
|
31
51
|
* Render `Tooltip.Popup` immediately after `Tooltip.Trigger` in DOM order: the HTML spec
|
|
32
52
|
* recommends that reading order for popovers, and some screen readers attach an adjacent tooltip
|
|
33
53
|
* to the wrong control otherwise. This is documented, not enforced.
|
|
54
|
+
*
|
|
55
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
34
56
|
*/
|
|
35
57
|
export declare function TooltipRoot({ delay, closeDelay, disabled, provides, children }: TooltipRootProps): import("react").JSX.Element;
|
|
36
58
|
export declare namespace TooltipRoot {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-root.d.mts","names":[],"sources":["../../src/tooltip/tooltip-root.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip-root.d.mts","names":[],"sources":["../../src/tooltip/tooltip-root.tsx"],"mappings":";;;;;iBAYiB;;WAEN;;;;;;;iBAQM;;;;;;;EAOf;;;;;;EAMA;;;;;;EAMA;;;;;;;;EAQA,WAAW;;EAEX,WAAW,WAAW,WAAW;;;;;;;;;;;;;wBAmBnB,cACd,OACA,YACA,UACA,UACA,YACC,mCAAgB,IAAA;yBANH"}
|
|
@@ -15,6 +15,8 @@ const FOCUSABLE = "a[href],area[href],button,input,select,textarea,iframe,[tabin
|
|
|
15
15
|
* Render `Tooltip.Popup` immediately after `Tooltip.Trigger` in DOM order: the HTML spec
|
|
16
16
|
* recommends that reading order for popovers, and some screen readers attach an adjacent tooltip
|
|
17
17
|
* to the wrong control otherwise. This is documented, not enforced.
|
|
18
|
+
*
|
|
19
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
18
20
|
*/
|
|
19
21
|
function TooltipRoot({ delay = 250, closeDelay = 150, disabled = false, provides = "description", children }) {
|
|
20
22
|
const popupId = useId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-root.mjs","names":[],"sources":["../../src/tooltip/tooltip-root.tsx"],"sourcesContent":["\"use client\";\nimport { useEffect, useId, useMemo, useRef, useState } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { StateValue } from \"../internal/types.js\";\nimport { resolveStateValue } from \"../internal/use-render.js\";\nimport { TooltipContext } from \"./tooltip-context.js\";\nimport type { TooltipContextValue, TooltipProvides } from \"./tooltip-context.js\";\nimport { useTooltipInteraction } from \"./use-tooltip-interaction.js\";\n\nexport type { TooltipProvides } from \"./tooltip-context.js\";\n\nexport interface TooltipRootState {\n readonly disabled: boolean;\n}\n\nexport interface TooltipRootProps {\n /**\n * Milliseconds from hover or keyboard focus to open. Default 250 (Chromium's\n * `interest-delay-start`). The same delay applies to hover and focus.\n */\n delay?: number;\n
|
|
1
|
+
{"version":3,"file":"tooltip-root.mjs","names":[],"sources":["../../src/tooltip/tooltip-root.tsx"],"sourcesContent":["\"use client\";\nimport { useEffect, useId, useMemo, useRef, useState } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { StateValue } from \"../internal/types.js\";\nimport { resolveStateValue } from \"../internal/use-render.js\";\nimport { TooltipContext } from \"./tooltip-context.js\";\nimport type { TooltipContextValue, TooltipProvides } from \"./tooltip-context.js\";\nimport { useTooltipInteraction } from \"./use-tooltip-interaction.js\";\n\nexport type { TooltipProvides } from \"./tooltip-context.js\";\n\n/** State of `Tooltip.Root`, passed to the function forms of `children`. */\nexport interface TooltipRootState {\n /** The `disabled` prop. */\n readonly disabled: boolean;\n}\n\n/**\n * Props of `Tooltip.Root`.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport interface TooltipRootProps {\n /**\n * Milliseconds from hover or keyboard focus to open. Default 250 (Chromium's\n * `interest-delay-start`). The same delay applies to hover and focus.\n *\n * @defaultValue `250`\n */\n delay?: number;\n /**\n * Milliseconds from de-hover or blur to close.\n *\n * @defaultValue `150` (Chromium's `interest-delay-end`)\n */\n closeDelay?: number;\n /**\n * When true the tooltip never opens. The ARIA relation stays in place.\n *\n * @defaultValue `false`\n */\n disabled?: boolean;\n /**\n * Which accessibility relation the tooltip provides for the trigger.\n * `\"description\"` (default): `aria-describedby`, for triggers that have their own name.\n * `\"name\"`: `aria-labelledby`, for icon-only triggers; do not also set `aria-label`.\n *\n * @defaultValue `\"description\"`\n */\n provides?: TooltipProvides;\n /** The Trigger and the Popup. May be a function of the part's state. */\n children?: StateValue<ReactNode, TooltipRootState>;\n}\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\nconst FOCUSABLE =\n \"a[href],area[href],button,input,select,textarea,iframe,[tabindex],[contenteditable]\";\n\n/**\n * Owns the popup id, the options and the one interaction effect. Renders no DOM, so it has no\n * `ref`, `className` or `style`. The open state is browser-owned (the popover's top-layer state):\n * there is no `open` prop, no action, and no `data-open`; style with `:popover-open`.\n *\n * Render `Tooltip.Popup` immediately after `Tooltip.Trigger` in DOM order: the HTML spec\n * recommends that reading order for popovers, and some screen readers attach an adjacent tooltip\n * to the wrong control otherwise. This is documented, not enforced.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport function TooltipRoot({\n delay = 250,\n closeDelay = 150,\n disabled = false,\n provides = \"description\",\n children,\n}: TooltipRootProps) {\n const popupId = useId();\n const [trigger, setTriggerElement] = useState<HTMLElement | null>(null);\n const [popup, setPopupElement] = useState<HTMLElement | null>(null);\n const [interestForRequested, setInterestForRequested] = useState(false);\n\n useTooltipInteraction(trigger, popup, { delay, closeDelay, disabled, interestForRequested });\n useTooltipDevWarnings(trigger, popup, provides);\n\n const context = useMemo<TooltipContextValue>(\n () => ({\n popupId,\n disabled,\n delay,\n closeDelay,\n provides,\n setTriggerElement,\n setPopupElement,\n setInterestForRequested,\n }),\n [popupId, disabled, delay, closeDelay, provides],\n );\n\n const state: TooltipRootState = { disabled };\n return <TooltipContext value={context}>{resolveStateValue(children, state)}</TooltipContext>;\n}\n\nTooltipRoot.displayName = \"TooltipRoot\";\n\n/**\n * The containers that move focus among their items with the arrow keys (roving tabindex, or a\n * native `focusgroup`): Menu, Tabs, Toolbar, a radio group, and the other APG composites, plus\n * `role=\"group\"`, which a standalone `ToggleGroup.Root` renders while its roving engine writes\n * the Items' `tabindex` (design/components/toggle-group.md 18).\n */\nconst COMPOSITE =\n '[role=\"menu\"],[role=\"menubar\"],[role=\"tablist\"],[role=\"toolbar\"],[role=\"group\"],[role=\"radiogroup\"],[role=\"listbox\"],[role=\"grid\"],[role=\"treegrid\"],[role=\"tree\"],[focusgroup]';\n\n/**\n * Whether keyboard users can focus the trigger: it is in the tab order, or it is a\n * roving-tabindex item (`tabindex=\"-1\"` set explicitly, so script can focus it) inside a\n * composite widget that moves focus to it.\n */\nfunction isKeyboardReachable(trigger: HTMLElement): boolean {\n if (trigger.tabIndex >= 0) return true;\n return trigger.hasAttribute(\"tabindex\") && trigger.parentElement?.closest(COMPOSITE) != null;\n}\n\n/** Development-only checks that need the mounted elements (design 12.5). Each fires once. */\nfunction useTooltipDevWarnings(\n trigger: HTMLElement | null,\n popup: HTMLElement | null,\n provides: TooltipProvides,\n): void {\n const warned = useRef({ label: false, focusable: false, interactive: false });\n useEffect(() => {\n if (!isDev) return;\n const w = warned.current;\n if (trigger !== null) {\n if (provides === \"name\" && trigger.hasAttribute(\"aria-label\") && !w.label) {\n w.label = true;\n console.error(\n '[Tooltip] provides=\"name\" together with aria-label on the trigger announces the name twice. Remove aria-label.',\n );\n }\n if (!isKeyboardReachable(trigger) && !w.focusable) {\n w.focusable = true;\n console.error(\n \"[Tooltip] The trigger is not focusable; keyboard users cannot open the tooltip. Render a <button> or a link, or set tabIndex={0}.\",\n );\n }\n }\n if (popup !== null && popup.querySelector(FOCUSABLE) !== null && !w.interactive) {\n w.interactive = true;\n console.error(\n \"[Tooltip] Tooltips must not contain interactive content. Use a non-modal dialog or a popover instead.\",\n );\n }\n }, [trigger, popup, provides]);\n}\n"],"mappings":";;;;;;;AAsDA,MAAM,QAAQ,QAAQ,IAAI,aAAa;AAEvC,MAAM,YACJ;;;;;;;;;;;;AAaF,SAAgB,YAAY,EAC1B,QAAQ,KACR,aAAa,KACb,WAAW,OACX,WAAW,eACX,YACmB;CACnB,MAAM,UAAU,MAAM;CACtB,MAAM,CAAC,SAAS,qBAAqB,SAA6B,IAAI;CACtE,MAAM,CAAC,OAAO,mBAAmB,SAA6B,IAAI;CAClE,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,KAAK;CAEtE,sBAAsB,SAAS,OAAO;EAAE;EAAO;EAAY;EAAU;CAAqB,CAAC;CAC3F,sBAAsB,SAAS,OAAO,QAAQ;CAE9C,MAAM,UAAU,eACP;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,IACA;EAAC;EAAS;EAAU;EAAO;EAAY;CAAQ,CACjD;CAGA,OAAO,oBAAC,gBAAD;EAAgB,OAAO;EAAU,UAAA,kBAAkB,UAAU,EADlC,SACsC,CAAC;CAAkB,CAAA;AAC7F;AAEA,YAAY,cAAc;;;;;;;AAQ1B,MAAM,YACJ;;;;;;AAOF,SAAS,oBAAoB,SAA+B;CAC1D,IAAI,QAAQ,YAAY,GAAG,OAAO;CAClC,OAAO,QAAQ,aAAa,UAAU,KAAK,QAAQ,eAAe,QAAQ,SAAS,KAAK;AAC1F;;AAGA,SAAS,sBACP,SACA,OACA,UACM;CACN,MAAM,SAAS,OAAO;EAAE,OAAO;EAAO,WAAW;EAAO,aAAa;CAAM,CAAC;CAC5E,gBAAgB;EACd,IAAI,CAAC,OAAO;EACZ,MAAM,IAAI,OAAO;EACjB,IAAI,YAAY,MAAM;GACpB,IAAI,aAAa,UAAU,QAAQ,aAAa,YAAY,KAAK,CAAC,EAAE,OAAO;IACzE,EAAE,QAAQ;IACV,QAAQ,MACN,kHACF;GACF;GACA,IAAI,CAAC,oBAAoB,OAAO,KAAK,CAAC,EAAE,WAAW;IACjD,EAAE,YAAY;IACd,QAAQ,MACN,mIACF;GACF;EACF;EACA,IAAI,UAAU,QAAQ,MAAM,cAAc,SAAS,MAAM,QAAQ,CAAC,EAAE,aAAa;GAC/E,EAAE,cAAc;GAChB,QAAQ,MACN,uGACF;EACF;CACF,GAAG;EAAC;EAAS;EAAO;CAAQ,CAAC;AAC/B"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
2
|
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
3
3
|
//#region src/tooltip/tooltip-trigger.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* State of `Tooltip.Trigger`, passed to the function forms of `className`, `style`, `children` and
|
|
6
|
+
* `render`.
|
|
7
|
+
*/
|
|
4
8
|
export interface TooltipTriggerState {
|
|
9
|
+
/** The Root's `disabled`. */
|
|
5
10
|
readonly disabled: boolean;
|
|
6
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Props of `Tooltip.Trigger`.
|
|
14
|
+
*
|
|
15
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
16
|
+
*/
|
|
7
17
|
export interface TooltipTriggerProps extends Omit<ComponentPropsWithRef<"button">, "className" | "style" | "children"> {
|
|
8
18
|
/**
|
|
9
19
|
* Experimental (Chromium 142+). Renders `interestfor` and `interest-delay-start/end` so the
|
|
@@ -16,12 +26,17 @@ export interface TooltipTriggerProps extends Omit<ComponentPropsWithRef<"button"
|
|
|
16
26
|
* `<style href="@funstack/ui/tooltip-warm">` (nonce from `<CSPProvider>`), rendered beside the
|
|
17
27
|
* element so a `render` element with its own children keeps it. When that stylesheet is
|
|
18
28
|
* missing (a CSP blocks it), the tooltip opens after its `delay` and only skip-delay is lost.
|
|
19
|
-
*
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue `false`
|
|
20
31
|
*/
|
|
21
32
|
experimental_interestFor?: boolean;
|
|
33
|
+
/** Class name, or a function of the part's state that returns one. */
|
|
22
34
|
className?: StateValue<string | undefined, TooltipTriggerState>;
|
|
35
|
+
/** Inline style, or a function of the part's state that returns one. */
|
|
23
36
|
style?: StateValue<CSSProperties | undefined, TooltipTriggerState>;
|
|
37
|
+
/** Content, or a function of the part's state. */
|
|
24
38
|
children?: StateValue<ReactNode, TooltipTriggerState>;
|
|
39
|
+
/** Replace the default `<button>` (element form) or take over rendering (function form). */
|
|
25
40
|
render?: RenderProp<ComponentPropsWithRef<"button">, TooltipTriggerState>;
|
|
26
41
|
}
|
|
27
42
|
/**
|
|
@@ -37,6 +52,8 @@ export interface TooltipTriggerProps extends Omit<ComponentPropsWithRef<"button"
|
|
|
37
52
|
* `data-disabled`; and `interestfor` and `data-fsui-tooltip-trigger` when
|
|
38
53
|
* `experimental_interestFor` is on. `type="button"` is a default the consumer may override (the
|
|
39
54
|
* part installs no click handler), unlike the overlay Triggers, which own it.
|
|
55
|
+
*
|
|
56
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
40
57
|
*/
|
|
41
58
|
export declare function TooltipTrigger({ experimental_interestFor, className, style, children, render, ...rest }: TooltipTriggerProps): import("react").JSX.Element;
|
|
42
59
|
export declare namespace TooltipTrigger {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-trigger.d.mts","names":[],"sources":["../../src/tooltip/tooltip-trigger.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip-trigger.d.mts","names":[],"sources":["../../src/tooltip/tooltip-trigger.tsx"],"mappings":";;;;;;;iBAqBiB;;WAEN;;;;;;;iBAQM,4BAA4B,KAC3C;;;;;;;;;;;;;;;EAiBA;;EAEA,YAAY,+BAA+B;;EAE3C,QAAQ,WAAW,2BAA2B;;EAE9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;;;;;;;;;wBAmBvC,iBACd,0BACA,WACA,OACA,UACA,WACG,QACF,sCAAmB,IAAA;yBAPN"}
|
|
@@ -22,6 +22,8 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
22
22
|
* `data-disabled`; and `interestfor` and `data-fsui-tooltip-trigger` when
|
|
23
23
|
* `experimental_interestFor` is on. `type="button"` is a default the consumer may override (the
|
|
24
24
|
* part installs no click handler), unlike the overlay Triggers, which own it.
|
|
25
|
+
*
|
|
26
|
+
* @see https://ui.funstack.work/components/tooltip
|
|
25
27
|
*/
|
|
26
28
|
function TooltipTrigger({ experimental_interestFor = false, className, style, children, render, ...rest }) {
|
|
27
29
|
const ctx = useTooltipContext("Tooltip.Trigger");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-trigger.mjs","names":[],"sources":["../../src/tooltip/tooltip-trigger.tsx"],"sourcesContent":["\"use client\";\nimport { use, useLayoutEffect } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { CSPContext } from \"../internal/csp-context.js\";\nimport { dataAttr } from \"../internal/data-attr.js\";\nimport { FSUI_PRECEDENCE } from \"../internal/shipped-styles.js\";\nimport {\n TOOLTIP_TRIGGER_MARKER,\n TOOLTIP_WARM_HREF,\n TOOLTIP_WARM_RULES,\n warmDelay,\n} from \"../internal/tooltip-warm.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { rendersButton, resolveStateValue, useRender } from \"../internal/use-render.js\";\nimport type { DataAttributes } from \"../internal/use-render.js\";\nimport { useTooltipContext } from \"./tooltip-context.js\";\n\nexport interface TooltipTriggerState {\n readonly disabled: boolean;\n}\n\nexport interface TooltipTriggerProps extends Omit<\n ComponentPropsWithRef<\"button\">,\n \"className\" | \"style\" | \"children\"\n> {\n /**\n * Experimental (Chromium 142+). Renders `interestfor` and `interest-delay-start/end` so the\n * browser owns hover, focus, Escape and long-press; the library's JS trigger path is skipped\n * where the rendered element implements `interestForElement`. No effect in other engines (the\n * attribute is ignored and the JS path runs). Pair with `Tooltip.Popup experimental_hint`.\n * Skip-delay on this path comes from a shipped rule: the Trigger renders the\n * `data-fsui-tooltip-trigger` marker, an `interest-delay-start` of\n * `calc(<delay>ms * (1 - var(--fsui-tooltip-warm, 0)))` and a hoisted\n * `<style href=\"@funstack/ui/tooltip-warm\">` (nonce from `<CSPProvider>`), rendered beside the\n * element so a `render` element with its own children keeps it. When that stylesheet is\n * missing (a CSP blocks it), the tooltip opens after its `delay` and only skip-delay is lost.\n *
|
|
1
|
+
{"version":3,"file":"tooltip-trigger.mjs","names":[],"sources":["../../src/tooltip/tooltip-trigger.tsx"],"sourcesContent":["\"use client\";\nimport { use, useLayoutEffect } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { CSPContext } from \"../internal/csp-context.js\";\nimport { dataAttr } from \"../internal/data-attr.js\";\nimport { FSUI_PRECEDENCE } from \"../internal/shipped-styles.js\";\nimport {\n TOOLTIP_TRIGGER_MARKER,\n TOOLTIP_WARM_HREF,\n TOOLTIP_WARM_RULES,\n warmDelay,\n} from \"../internal/tooltip-warm.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { rendersButton, resolveStateValue, useRender } from \"../internal/use-render.js\";\nimport type { DataAttributes } from \"../internal/use-render.js\";\nimport { useTooltipContext } from \"./tooltip-context.js\";\n\n/**\n * State of `Tooltip.Trigger`, passed to the function forms of `className`, `style`, `children` and\n * `render`.\n */\nexport interface TooltipTriggerState {\n /** The Root's `disabled`. */\n readonly disabled: boolean;\n}\n\n/**\n * Props of `Tooltip.Trigger`.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport interface TooltipTriggerProps extends Omit<\n ComponentPropsWithRef<\"button\">,\n \"className\" | \"style\" | \"children\"\n> {\n /**\n * Experimental (Chromium 142+). Renders `interestfor` and `interest-delay-start/end` so the\n * browser owns hover, focus, Escape and long-press; the library's JS trigger path is skipped\n * where the rendered element implements `interestForElement`. No effect in other engines (the\n * attribute is ignored and the JS path runs). Pair with `Tooltip.Popup experimental_hint`.\n * Skip-delay on this path comes from a shipped rule: the Trigger renders the\n * `data-fsui-tooltip-trigger` marker, an `interest-delay-start` of\n * `calc(<delay>ms * (1 - var(--fsui-tooltip-warm, 0)))` and a hoisted\n * `<style href=\"@funstack/ui/tooltip-warm\">` (nonce from `<CSPProvider>`), rendered beside the\n * element so a `render` element with its own children keeps it. When that stylesheet is\n * missing (a CSP blocks it), the tooltip opens after its `delay` and only skip-delay is lost.\n *\n * @defaultValue `false`\n */\n experimental_interestFor?: boolean;\n /** Class name, or a function of the part's state that returns one. */\n className?: StateValue<string | undefined, TooltipTriggerState>;\n /** Inline style, or a function of the part's state that returns one. */\n style?: StateValue<CSSProperties | undefined, TooltipTriggerState>;\n /** Content, or a function of the part's state. */\n children?: StateValue<ReactNode, TooltipTriggerState>;\n /** Replace the default `<button>` (element form) or take over rendering (function form). */\n render?: RenderProp<ComponentPropsWithRef<\"button\">, TooltipTriggerState>;\n}\n\n/**\n * The element the user hovers or focuses: a `<button type=\"button\">` by default. `render` may\n * substitute a link or a custom button; the element must be focusable (a dev warning fires when\n * it is not). A natively `disabled` button never opens a tooltip; use `aria-disabled` instead.\n *\n * The library attaches its hover / focus listeners with `addEventListener` from `Tooltip.Root`,\n * so every `on*` prop passes through untouched.\n *\n * Owned keys (conventions 1.2): `aria-describedby` (with `provides=\"description\"`) or\n * `aria-labelledby` (with `provides=\"name\"`), both token-merged with the consumer's ids;\n * `data-disabled`; and `interestfor` and `data-fsui-tooltip-trigger` when\n * `experimental_interestFor` is on. `type=\"button\"` is a default the consumer may override (the\n * part installs no click handler), unlike the overlay Triggers, which own it.\n *\n * @see https://ui.funstack.work/components/tooltip\n */\nexport function TooltipTrigger({\n experimental_interestFor = false,\n className,\n style,\n children,\n render,\n ...rest\n}: TooltipTriggerProps) {\n const ctx = useTooltipContext(\"Tooltip.Trigger\");\n const { disabled, popupId, provides, setInterestForRequested } = ctx;\n const native = experimental_interestFor && !disabled;\n const csp = use(CSPContext);\n\n useLayoutEffect(() => {\n setInterestForRequested(native);\n }, [native, setInterestForRequested]);\n\n const state: TooltipTriggerState = { disabled };\n\n const libraryProps: ComponentPropsWithRef<\"button\"> & DataAttributes = {\n // Only the relation in use is owned; the other one passes through untouched.\n ...(provides === \"name\" ? { \"aria-labelledby\": popupId } : { \"aria-describedby\": popupId }),\n \"data-disabled\": dataAttr(disabled),\n // Owned while the flag is on: a disabled tooltip removes the attribute, so the browser\n // cannot open it either. Unflagged, the key is omitted (conventions 1.2).\n ...(experimental_interestFor && {\n interestfor: native ? popupId : undefined,\n // What the shipped skip-delay rule matches (design 6); nothing else carries it.\n [TOOLTIP_TRIGGER_MARKER]: native ? \"\" : undefined,\n }),\n };\n\n // Skip-delay on the native path (design 6, conventions 12): the browser reads the delay from\n // the computed style when the hover starts, and only a rule can see that another tooltip is\n // showing. Hoisted into <head> by React (during SSR too) and deduplicated; nothing lands in\n // place. Rendered beside the element, not in its children: a `render` element with its own\n // children (`render={<a href>Text</a>}`) wins over `children` and would drop it.\n const warmRules = native ? (\n <style href={TOOLTIP_WARM_HREF} precedence={FSUI_PRECEDENCE} nonce={csp?.nonce}>\n {TOOLTIP_WARM_RULES}\n </style>\n ) : null;\n\n const element = useRender<ComponentPropsWithRef<\"button\">, TooltipTriggerState>({\n defaultElement: \"button\",\n render,\n state,\n className,\n // The native delays sit under the consumer's style: the consumer wins. The open delay is 0\n // while another tooltip is showing (`--fsui-tooltip-warm`, design 6).\n style: native\n ? (s) => ({\n interestDelayStart: warmDelay(ctx.delay),\n interestDelayEnd: `${ctx.closeDelay}ms`,\n ...resolveStateValue(style, s),\n })\n : style,\n children,\n // `type=\"button\"` only on a real button (the consumer may override it); a link or a\n // component element does not get it.\n props: rendersButton(render) ? { type: \"button\", ...rest } : rest,\n libraryProps,\n ref: ctx.setTriggerElement,\n });\n return (\n <>\n {warmRules}\n {element}\n </>\n );\n}\n\nTooltipTrigger.displayName = \"TooltipTrigger\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,SAAgB,eAAe,EAC7B,2BAA2B,OAC3B,WACA,OACA,UACA,QACA,GAAG,QACmB;CACtB,MAAM,MAAM,kBAAkB,iBAAiB;CAC/C,MAAM,EAAE,UAAU,SAAS,UAAU,4BAA4B;CACjE,MAAM,SAAS,4BAA4B,CAAC;CAC5C,MAAM,MAAM,IAAI,UAAU;CAE1B,sBAAsB;EACpB,wBAAwB,MAAM;CAChC,GAAG,CAAC,QAAQ,uBAAuB,CAAC;CAEpC,MAAM,QAA6B,EAAE,SAAS;CAE9C,MAAM,eAAiE;EAErE,GAAI,aAAa,SAAS,EAAE,mBAAmB,QAAQ,IAAI,EAAE,oBAAoB,QAAQ;EACzF,iBAAiB,SAAS,QAAQ;EAGlC,GAAI,4BAA4B;GAC9B,aAAa,SAAS,UAAU,KAAA;IAEN,8BAAA,SAAS,KAAK,KAAA;EAC1C;CACF;CAOA,MAAM,YAAY,SAChB,oBAAC,SAAD;EAAO,MAAM;EAAmB,YAAY;EAAiB,OAAO,KAAK;EACtE,UAAA;CACI,CAAA,IACL;CAEJ,MAAM,UAAU,UAAgE;EAC9E,gBAAgB;EAChB;EACA;EACA;EAGA,OAAO,UACF,OAAO;GACN,oBAAoB,UAAU,IAAI,KAAK;GACvC,kBAAkB,GAAG,IAAI,WAAW;GACpC,GAAG,kBAAkB,OAAO,CAAC;EAC/B,KACA;EACJ;EAGA,OAAO,cAAc,MAAM,IAAI;GAAE,MAAM;GAAU,GAAG;EAAK,IAAI;EAC7D;EACA,KAAK,IAAI;CACX,CAAC;CACD,OACE,qBAAA,UAAA,EAAA,UAAA,CACG,WACA,OACD,EAAA,CAAA;AAEN;AAEA,eAAe,cAAc"}
|