@epilot/zenith-react 0.2.0-next.3 → 0.2.0-next.4
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 +25 -0
- package/codemods/README.md +168 -0
- package/codemods/migrate/base-elements/accordion.ts +132 -0
- package/codemods/migrate/base-elements/alert.ts +81 -0
- package/codemods/migrate/base-elements/avatar.ts +116 -0
- package/codemods/migrate/base-elements/button.ts +188 -0
- package/codemods/migrate/base-elements/checkbox.ts +17 -0
- package/codemods/migrate/base-elements/chip.ts +87 -0
- package/codemods/migrate/base-elements/chip360.ts +162 -0
- package/codemods/migrate/base-elements/circular-progress.ts +73 -0
- package/codemods/migrate/base-elements/dialog.ts +323 -0
- package/codemods/migrate/base-elements/divider.ts +61 -0
- package/codemods/migrate/base-elements/feedback-message.ts +95 -0
- package/codemods/migrate/base-elements/icon-button.ts +203 -0
- package/codemods/migrate/base-elements/index.ts +55 -0
- package/codemods/migrate/base-elements/mui-props.ts +29 -0
- package/codemods/migrate/base-elements/notification.ts +98 -0
- package/codemods/migrate/base-elements/paper.ts +78 -0
- package/codemods/migrate/base-elements/select.ts +328 -0
- package/codemods/migrate/base-elements/shared.ts +910 -0
- package/codemods/migrate/base-elements/skeleton.ts +83 -0
- package/codemods/migrate/base-elements/switch.ts +19 -0
- package/codemods/migrate/base-elements/tabs.ts +222 -0
- package/codemods/migrate/base-elements/text-field.ts +425 -0
- package/codemods/migrate/base-elements/toggle-button.ts +185 -0
- package/codemods/migrate/base-elements/tooltip.ts +231 -0
- package/codemods/migrate/base-elements/typography.ts +247 -0
- package/codemods/migrate/base-elements/unsupported.ts +277 -0
- package/codemods/migrate/from-base-elements.ts +20 -0
- package/codemods/migrate/from-volt.ts +20 -0
- package/codemods/migrate/lib/imports.ts +399 -0
- package/codemods/migrate/lib/jsx.ts +313 -0
- package/codemods/migrate/lib/run-migration.ts +528 -0
- package/codemods/migrate/lib/source.ts +6 -0
- package/codemods/migrate/lib/todo.ts +107 -0
- package/codemods/migrate/lib/types.ts +114 -0
- package/codemods/migrate/volt/class-helpers.ts +37 -0
- package/codemods/migrate/volt/index.ts +18 -0
- package/codemods/migrate/volt/pagination.ts +26 -0
- package/codemods/migrate/volt/same-name.ts +293 -0
- package/codemods/migrate/volt/stylesheets.ts +18 -0
- package/codemods/migrate/volt/tanstack-types.ts +20 -0
- package/codemods/radix-to-base-ui.ts +389 -0
- package/dist/_virtual/_zenith-runtime-family_accordion.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_accordion.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_alert-dialog.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_alert-dialog.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_avatar.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_avatar.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_button.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_button.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_checkbox.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_checkbox.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_csp-provider.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_csp-provider.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_dialog.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_dialog.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_direction-provider.js +8 -0
- package/dist/_virtual/_zenith-runtime-family_direction-provider.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_menu.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_menu.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_merge-props.js +11 -0
- package/dist/_virtual/_zenith-runtime-family_merge-props.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_popover.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_popover.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_radio-group.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_radio-group.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_radio.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_radio.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_scroll-area.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_scroll-area.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_select.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_select.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_separator.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_separator.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_switch.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_switch.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_tabs.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_tabs.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_toast.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_toast.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_toggle-group.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_toggle-group.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_toggle.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_toggle.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_tooltip.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_tooltip.js.map +1 -0
- package/dist/_virtual/_zenith-runtime-family_use-render.js +7 -0
- package/dist/_virtual/_zenith-runtime-family_use-render.js.map +1 -0
- package/dist/components/accordion/accordion.js +179 -96
- package/dist/components/accordion/accordion.js.map +1 -1
- package/dist/components/alert-dialog/alert-dialog.js +243 -206
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/avatar/avatar.js +94 -82
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.js +11 -11
- package/dist/components/breadcrumb/breadcrumb.js +69 -70
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/button/button.js +119 -102
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +68 -51
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +100 -90
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-input.js +118 -108
- package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-panel.js +91 -94
- package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
- package/dist/components/dialog/dialog.js +238 -228
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.js +259 -321
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +533 -279
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/field/field-combobox.js +87 -77
- package/dist/components/field/field-combobox.js.map +1 -1
- package/dist/components/list/list-sortable.js +104 -0
- package/dist/components/list/list-sortable.js.map +1 -0
- package/dist/components/list/list.js +246 -324
- package/dist/components/list/list.js.map +1 -1
- package/dist/components/option-card/option-card.js +121 -117
- package/dist/components/option-card/option-card.js.map +1 -1
- package/dist/components/pill/pill.js +7 -7
- package/dist/components/popover/popover.js +223 -127
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/radio/radio-group-base.js +54 -0
- package/dist/components/radio/radio-group-base.js.map +1 -0
- package/dist/components/radio/radio.js +71 -60
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/scroll-area/scroll-area.js +142 -108
- package/dist/components/scroll-area/scroll-area.js.map +1 -1
- package/dist/components/scroll-overflow/scroll-overflow.js +156 -127
- package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +93 -81
- package/dist/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/select/select.js +485 -310
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/separator/separator.js.map +1 -1
- package/dist/components/slot/compose-as-child.js +15 -12
- package/dist/components/slot/compose-as-child.js.map +1 -1
- package/dist/components/switch/switch.js +75 -68
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/table/table-pagination.js +212 -175
- package/dist/components/table/table-pagination.js.map +1 -1
- package/dist/components/tabs/tabs.js +193 -190
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/toast/toast.js +610 -148
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/components/toggle/toggle-group.js +143 -32
- package/dist/components/toggle/toggle-group.js.map +1 -1
- package/dist/components/toggle/toggle.js +83 -53
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +298 -138
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/index.d.ts +2335 -2129
- package/dist/index.js +24 -23
- package/dist/list/sortable/index.d.ts +29 -0
- package/dist/list/sortable/index.js +5 -0
- package/dist/{_virtual → list/sortable}/index.js.map +1 -1
- package/dist/packages/tokens/dist/delivery/index.js +10 -10
- package/dist/packages/tokens/dist/delivery/index.js.map +1 -1
- package/dist/packages/tokens/dist/generated/core.generated.js +6 -15
- package/dist/packages/tokens/dist/generated/core.generated.js.map +1 -1
- package/dist/packages/tokens/dist/generated/palette.generated.js +4 -5
- package/dist/packages/tokens/dist/generated/palette.generated.js.map +1 -1
- package/dist/packages/tokens/dist/generated/palette.meta.generated.js +5 -0
- package/dist/packages/tokens/dist/generated/palette.meta.generated.js.map +1 -0
- package/dist/packages/tokens/dist/install.js +40 -17
- package/dist/packages/tokens/dist/install.js.map +1 -1
- package/dist/renderer/runtime-contract.generated.js +8 -0
- package/dist/renderer/runtime-contract.generated.js.map +1 -0
- package/dist/renderer/served.js +34 -0
- package/dist/renderer/served.js.map +1 -0
- package/dist/tokens/core.meta.generated.js +2 -2
- package/dist/tokens/core.meta.generated.js.map +1 -1
- package/dist/tokens/index.d.ts +1028 -1028
- package/dist/tokens/index.js +863 -863
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/palette.meta.generated.js +5 -0
- package/dist/tokens/palette.meta.generated.js.map +1 -0
- package/dist/tokens.json +1 -1
- package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js +57 -62
- package/dist/vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js.map +1 -1
- package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +32 -38
- package/dist/vendor/.bun/@radix-ui_react-slot@1.2.3_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/package.json +28 -21
- package/scripts/migration-diagnostics-core.mjs +18 -10
- package/scripts/migration-diagnostics.mjs +31 -8
- package/dist/_virtual/index.js +0 -6
- package/dist/_virtual/index2.js +0 -5
- package/dist/_virtual/index2.js.map +0 -1
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -5
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -5
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/tokens/palette.generated.js +0 -5
- package/dist/tokens/palette.generated.js.map +0 -1
- package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js +0 -512
- package/dist/vendor/.bun/@floating-ui_core@1.8.0/vendor/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
- package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js +0 -396
- package/dist/vendor/.bun/@floating-ui_dom@1.8.0/vendor/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
- package/dist/vendor/.bun/@floating-ui_react-dom@2.1.9_6f4b9a1cfb20c0ae/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -233
- package/dist/vendor/.bun/@floating-ui_react-dom@2.1.9_6f4b9a1cfb20c0ae/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +0 -1
- package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -137
- package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
- package/dist/vendor/.bun/@floating-ui_utils@0.2.12/vendor/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js +0 -7
- package/dist/vendor/.bun/@radix-ui_number@1.1.1/vendor/@radix-ui/number/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js +0 -240
- package/dist/vendor/.bun/@radix-ui_react-accordion@1.2.12_2b23df507bdda662/vendor/@radix-ui/react-accordion/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-alert-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-alert-dialog/dist/index.js +0 -128
- package/dist/vendor/.bun/@radix-ui_react-alert-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-alert-dialog/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js +0 -25
- package/dist/vendor/.bun/@radix-ui_react-arrow@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-arrow/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js +0 -76
- package/dist/vendor/.bun/@radix-ui_react-avatar@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-avatar/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js +0 -252
- package/dist/vendor/.bun/@radix-ui_react-checkbox@1.3.3_2b23df507bdda662/vendor/@radix-ui/react-checkbox/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js +0 -121
- package/dist/vendor/.bun/@radix-ui_react-collapsible@1.1.12_2b23df507bdda662/vendor/@radix-ui/react-collapsible/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/vendor/.bun/@radix-ui_react-collection@1.1.7_2b23df507bdda662/vendor/@radix-ui/react-collection/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js +0 -11
- package/dist/vendor/.bun/@radix-ui_react-direction@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-direction/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-dropdown-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-dropdown-menu/dist/index.js +0 -228
- package/dist/vendor/.bun/@radix-ui_react-dropdown-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-dropdown-menu/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js +0 -653
- package/dist/vendor/.bun/@radix-ui_react-menu@2.1.16_2b23df507bdda662/vendor/@radix-ui/react-menu/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js +0 -244
- package/dist/vendor/.bun/@radix-ui_react-popover@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-popover/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js +0 -222
- package/dist/vendor/.bun/@radix-ui_react-popper@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-popper/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-radio-group@1.3.8_2b23df507bdda662/vendor/@radix-ui/react-radio-group/dist/index.js +0 -239
- package/dist/vendor/.bun/@radix-ui_react-radio-group@1.3.8_2b23df507bdda662/vendor/@radix-ui/react-radio-group/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js +0 -184
- package/dist/vendor/.bun/@radix-ui_react-roving-focus@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-roving-focus/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-scroll-area@1.2.10_2b23df507bdda662/vendor/@radix-ui/react-scroll-area/dist/index.js +0 -535
- package/dist/vendor/.bun/@radix-ui_react-scroll-area@1.2.10_2b23df507bdda662/vendor/@radix-ui/react-scroll-area/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js +0 -863
- package/dist/vendor/.bun/@radix-ui_react-select@2.2.6_2b23df507bdda662/vendor/@radix-ui/react-select/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js +0 -63
- package/dist/vendor/.bun/@radix-ui_react-slot@1.2.4_0ac650c021fb1b59/vendor/@radix-ui/react-slot/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js +0 -133
- package/dist/vendor/.bun/@radix-ui_react-switch@1.2.6_2b23df507bdda662/vendor/@radix-ui/react-switch/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js +0 -164
- package/dist/vendor/.bun/@radix-ui_react-tabs@1.1.13_2b23df507bdda662/vendor/@radix-ui/react-tabs/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-toggle-group@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-toggle-group/dist/index.js +0 -138
- package/dist/vendor/.bun/@radix-ui_react-toggle-group@1.1.11_2b23df507bdda662/vendor/@radix-ui/react-toggle-group/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js +0 -34
- package/dist/vendor/.bun/@radix-ui_react-toggle@1.1.10_2b23df507bdda662/vendor/@radix-ui/react-toggle/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js +0 -340
- package/dist/vendor/.bun/@radix-ui_react-tooltip@1.2.8_2b23df507bdda662/vendor/@radix-ui/react-tooltip/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-use-is-hydrated@0.1.0_0ac650c021fb1b59/vendor/@radix-ui/react-use-is-hydrated/dist/index.js +0 -16
- package/dist/vendor/.bun/@radix-ui_react-use-is-hydrated@0.1.0_0ac650c021fb1b59/vendor/@radix-ui/react-use-is-hydrated/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-use-previous@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-previous/dist/index.js +0 -9
- package/dist/vendor/.bun/@radix-ui_react-use-previous@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-previous/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-use-size@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-size/dist/index.js +0 -28
- package/dist/vendor/.bun/@radix-ui_react-use-size@1.1.1_0ac650c021fb1b59/vendor/@radix-ui/react-use-size/dist/index.js.map +0 -1
- package/dist/vendor/.bun/@radix-ui_react-visually-hidden@1.2.3_2b23df507bdda662/vendor/@radix-ui/react-visually-hidden/dist/index.js +0 -33
- package/dist/vendor/.bun/@radix-ui_react-visually-hidden@1.2.3_2b23df507bdda662/vendor/@radix-ui/react-visually-hidden/dist/index.js.map +0 -1
- package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js +0 -747
- package/dist/vendor/.bun/sonner@2.0.7_6f4b9a1cfb20c0ae/vendor/sonner/dist/index.js.map +0 -1
- package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -68
- package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -56
- package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js +0 -11
- package/dist/vendor/.bun/use-sync-external-store@1.7.0_62547eec5a2188e3/vendor/use-sync-external-store/shim/index.js.map +0 -1
|
@@ -1,182 +1,342 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import { SLOT_ATTR as
|
|
5
|
-
import { useAppearanceAttributes as
|
|
6
|
-
import { useDensity as
|
|
7
|
-
import { makeZenithStyles as
|
|
8
|
-
import { boxModel as
|
|
9
|
-
import { OVERLAY_Z_INDEX as
|
|
10
|
-
import { error12 as
|
|
11
|
-
const
|
|
1
|
+
import { jsx as i, jsxs as ct, Fragment as dt } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { Tooltip as c } from "../../_virtual/_zenith-runtime-family_tooltip.js";
|
|
4
|
+
import { SLOT_ATTR as R, mergeClasses as U, shorthands as z } from "@epilot/zenith-runtime/v1";
|
|
5
|
+
import { useAppearanceAttributes as pt } from "../appearance-boundary/appearance-boundary.js";
|
|
6
|
+
import { useDensity as ut } from "../density-provider/density-provider.js";
|
|
7
|
+
import { makeZenithStyles as ft } from "../../styles/make-styles.js";
|
|
8
|
+
import { boxModel as q, nativeControl as gt } from "../../styles/host-reset.js";
|
|
9
|
+
import { OVERLAY_Z_INDEX as J } from "../../styles/overlay-layer.js";
|
|
10
|
+
import { error12 as mt, gray12 as Q, error1 as vt, errorA12 as ht, gray1 as xt, textXs as Pt, spacingElement2 as wt, radiusLg as Tt } from "../../tokens/index.js";
|
|
11
|
+
const B = ft({
|
|
12
12
|
// For the bare native `<button>` a Trigger/Close renders. Not applied under `asChild`, where the
|
|
13
13
|
// child owns its own element and two atom sets would race for the same properties.
|
|
14
14
|
nativeTrigger: {
|
|
15
|
-
...
|
|
15
|
+
...gt
|
|
16
16
|
},
|
|
17
|
+
positioner: {
|
|
18
|
+
zIndex: J
|
|
19
|
+
},
|
|
20
|
+
// Radix's `hideWhenDetached`: hide the content once its trigger is scrolled out of view.
|
|
21
|
+
hideWhenDetached: {
|
|
22
|
+
"&[data-anchor-hidden]": {
|
|
23
|
+
visibility: "hidden",
|
|
24
|
+
pointerEvents: "none"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
// No enter or exit motion: the Radix version keyed its keyframes on `data-state='open'`, a value
|
|
28
|
+
// Radix's tooltip never sets (it sets `delayed-open` or `instant-open`), so it never animated.
|
|
17
29
|
popup: {
|
|
18
|
-
...
|
|
30
|
+
...q,
|
|
19
31
|
width: "fit-content",
|
|
20
|
-
transformOrigin: "var(--
|
|
21
|
-
...
|
|
22
|
-
...
|
|
32
|
+
transformOrigin: "var(--transform-origin)",
|
|
33
|
+
...z.borderRadius(Tt),
|
|
34
|
+
...z.padding(wt),
|
|
23
35
|
// v1 shadow-md; elevation has no token in this package.
|
|
24
36
|
boxShadow: "0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a",
|
|
25
|
-
fontSize:
|
|
37
|
+
fontSize: Pt,
|
|
26
38
|
// v1 leading-none; no line-height token exists.
|
|
27
39
|
lineHeight: "1",
|
|
28
40
|
textWrap: "balance",
|
|
29
|
-
zIndex:
|
|
41
|
+
zIndex: J,
|
|
30
42
|
"&[data-variant='default']": {
|
|
31
|
-
backgroundColor:
|
|
32
|
-
color:
|
|
43
|
+
backgroundColor: Q,
|
|
44
|
+
color: xt
|
|
33
45
|
},
|
|
34
46
|
"&[data-variant='destructive']": {
|
|
35
|
-
backgroundColor:
|
|
36
|
-
color:
|
|
37
|
-
},
|
|
38
|
-
"&[data-state='open']": {
|
|
39
|
-
animationName: {
|
|
40
|
-
from: { opacity: 0, transform: "scale(0.95)" },
|
|
41
|
-
to: { opacity: 1, transform: "scale(1)" }
|
|
42
|
-
},
|
|
43
|
-
animationDuration: "150ms",
|
|
44
|
-
animationTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
45
|
-
},
|
|
46
|
-
"&[data-state='open'][data-side='bottom']": {
|
|
47
|
-
animationName: {
|
|
48
|
-
from: {
|
|
49
|
-
opacity: 0,
|
|
50
|
-
transform: `translateY(-${n}) scale(0.95)`
|
|
51
|
-
},
|
|
52
|
-
to: { opacity: 1, transform: "translateY(0) scale(1)" }
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"&[data-state='open'][data-side='left']": {
|
|
56
|
-
animationName: {
|
|
57
|
-
from: {
|
|
58
|
-
opacity: 0,
|
|
59
|
-
transform: `translateX(${n}) scale(0.95)`
|
|
60
|
-
},
|
|
61
|
-
to: { opacity: 1, transform: "translateX(0) scale(1)" }
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"&[data-state='open'][data-side='right']": {
|
|
65
|
-
animationName: {
|
|
66
|
-
from: {
|
|
67
|
-
opacity: 0,
|
|
68
|
-
transform: `translateX(-${n}) scale(0.95)`
|
|
69
|
-
},
|
|
70
|
-
to: { opacity: 1, transform: "translateX(0) scale(1)" }
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"&[data-state='open'][data-side='top']": {
|
|
74
|
-
animationName: {
|
|
75
|
-
from: {
|
|
76
|
-
opacity: 0,
|
|
77
|
-
transform: `translateY(${n}) scale(0.95)`
|
|
78
|
-
},
|
|
79
|
-
to: { opacity: 1, transform: "translateY(0) scale(1)" }
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"&[data-state='closed']": {
|
|
83
|
-
animationName: {
|
|
84
|
-
from: { opacity: 1, transform: "scale(1)" },
|
|
85
|
-
to: { opacity: 0, transform: "scale(0.95)" }
|
|
86
|
-
},
|
|
87
|
-
animationDuration: "0ms",
|
|
88
|
-
animationTimingFunction: "cubic-bezier(0.4, 0, 1, 1)"
|
|
47
|
+
backgroundColor: ht,
|
|
48
|
+
color: vt
|
|
89
49
|
}
|
|
90
50
|
},
|
|
51
|
+
// Base UI places the arrow on the cross axis only; the anchored edge is set per side here. The
|
|
52
|
+
// diamond's centre sits 2px inside the content's edge, where Radix's arrow wrapper put it.
|
|
91
53
|
arrow: {
|
|
92
|
-
...
|
|
93
|
-
position: "relative",
|
|
54
|
+
...q,
|
|
94
55
|
zIndex: 50,
|
|
95
56
|
width: "0.625rem",
|
|
96
57
|
height: "0.625rem",
|
|
97
|
-
|
|
98
|
-
|
|
58
|
+
...z.borderRadius("2px"),
|
|
59
|
+
"&[data-side='top']": {
|
|
60
|
+
top: "100%",
|
|
61
|
+
transform: "translateY(calc(-50% - 2px)) rotate(45deg)"
|
|
62
|
+
},
|
|
63
|
+
"&[data-side='bottom']": {
|
|
64
|
+
top: 0,
|
|
65
|
+
transform: "translateY(calc(-50% + 2px)) rotate(45deg)"
|
|
66
|
+
},
|
|
67
|
+
"&[data-side='left']": {
|
|
68
|
+
left: "100%",
|
|
69
|
+
transform: "translateX(calc(-50% - 2px)) rotate(45deg)"
|
|
70
|
+
},
|
|
71
|
+
"&[data-side='right']": {
|
|
72
|
+
left: 0,
|
|
73
|
+
transform: "translateX(calc(-50% + 2px)) rotate(45deg)"
|
|
74
|
+
},
|
|
75
|
+
// Radix hid the arrow when it could not point at the trigger's centre.
|
|
76
|
+
"&[data-uncentered]": {
|
|
77
|
+
visibility: "hidden"
|
|
78
|
+
},
|
|
99
79
|
"&[data-variant='default']": {
|
|
100
|
-
backgroundColor:
|
|
101
|
-
fill: m
|
|
80
|
+
backgroundColor: Q
|
|
102
81
|
},
|
|
103
82
|
"&[data-variant='destructive']": {
|
|
104
|
-
backgroundColor:
|
|
105
|
-
fill: u
|
|
83
|
+
backgroundColor: mt
|
|
106
84
|
}
|
|
107
85
|
}
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
|
|
86
|
+
});
|
|
87
|
+
function tt(o) {
|
|
88
|
+
const e = t.Children.toArray(o).filter(t.isValidElement);
|
|
89
|
+
return e.length === 1 ? e[0] : void 0;
|
|
90
|
+
}
|
|
91
|
+
function Ct(o, e) {
|
|
92
|
+
const n = o ? tt(e) : void 0;
|
|
93
|
+
return n ? { render: n } : { children: e };
|
|
94
|
+
}
|
|
95
|
+
function yt(o, e) {
|
|
96
|
+
return t.useCallback(
|
|
97
|
+
(n) => {
|
|
98
|
+
for (const r of [o, e])
|
|
99
|
+
typeof r == "function" ? r(n) : r && (r.current = n);
|
|
100
|
+
},
|
|
101
|
+
[o, e]
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
function It(o, e) {
|
|
105
|
+
return {
|
|
106
|
+
reason: "escape-key",
|
|
107
|
+
event: e,
|
|
108
|
+
cancel: () => o.cancel(),
|
|
109
|
+
allowPropagation: () => o.allowPropagation(),
|
|
110
|
+
get isCanceled() {
|
|
111
|
+
return o.isCanceled;
|
|
112
|
+
},
|
|
113
|
+
get isPropagationAllowed() {
|
|
114
|
+
return o.isPropagationAllowed;
|
|
115
|
+
},
|
|
116
|
+
trigger: o.trigger,
|
|
117
|
+
preventUnmountOnClose: () => o.preventUnmountOnClose()
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
const T = [], et = t.createContext({}), Mt = t.forwardRef(function({
|
|
121
|
+
children: e,
|
|
122
|
+
delayDuration: n = 0,
|
|
123
|
+
skipDelayDuration: r = 300,
|
|
124
|
+
disableHoverableContent: a
|
|
125
|
+
}, d) {
|
|
126
|
+
const u = t.useMemo(
|
|
127
|
+
() => ({ skipDelayDuration: r, disableHoverableContent: a }),
|
|
128
|
+
[r, a]
|
|
129
|
+
);
|
|
130
|
+
return /* @__PURE__ */ i(et.Provider, { value: u, children: /* @__PURE__ */ i(
|
|
131
|
+
c.Provider,
|
|
111
132
|
{
|
|
112
|
-
delayDuration: t,
|
|
113
133
|
"data-slot": "tooltip-provider",
|
|
114
|
-
|
|
134
|
+
delay: n,
|
|
135
|
+
timeout: r,
|
|
136
|
+
children: e
|
|
115
137
|
}
|
|
116
|
-
);
|
|
117
|
-
}),
|
|
118
|
-
function(
|
|
119
|
-
|
|
138
|
+
) });
|
|
139
|
+
}), ot = t.createContext(null), zt = t.forwardRef(
|
|
140
|
+
function({
|
|
141
|
+
children: e,
|
|
142
|
+
open: n,
|
|
143
|
+
defaultOpen: r = !1,
|
|
144
|
+
onOpenChange: a,
|
|
145
|
+
delayDuration: d,
|
|
146
|
+
disableHoverableContent: u
|
|
147
|
+
}, v) {
|
|
148
|
+
const h = t.useContext(et), [E, S] = t.useState(r), x = n ?? E, p = t.useId(), [C, O] = t.useState(), y = t.useRef(null), I = t.useRef(null), b = t.useCallback((g) => {
|
|
149
|
+
var s;
|
|
150
|
+
I.current = g;
|
|
151
|
+
try {
|
|
152
|
+
(s = y.current) == null || s.close();
|
|
153
|
+
} finally {
|
|
154
|
+
I.current = null;
|
|
155
|
+
}
|
|
156
|
+
}, []), k = t.useMemo(
|
|
157
|
+
() => ({
|
|
158
|
+
open: x,
|
|
159
|
+
generatedId: p,
|
|
160
|
+
descriptionId: C ?? p,
|
|
161
|
+
setDescriptionId: O,
|
|
162
|
+
closeOnEscape: b
|
|
163
|
+
}),
|
|
164
|
+
[x, p, C, b]
|
|
165
|
+
), P = /* @__PURE__ */ i(ot.Provider, { value: k, children: /* @__PURE__ */ i(
|
|
166
|
+
c.Root,
|
|
167
|
+
{
|
|
168
|
+
"data-slot": "tooltip",
|
|
169
|
+
open: x,
|
|
170
|
+
actionsRef: y,
|
|
171
|
+
onOpenChange: (g, s) => {
|
|
172
|
+
const f = I.current, w = f ? It(s, f) : s;
|
|
173
|
+
if (!f && w.reason === "escape-key" && w.event.defaultPrevented) {
|
|
174
|
+
s.cancel();
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
a == null || a(g, w), s.isCanceled || S(g);
|
|
178
|
+
},
|
|
179
|
+
disableHoverablePopup: u ?? h.disableHoverableContent,
|
|
180
|
+
children: e
|
|
181
|
+
}
|
|
182
|
+
) });
|
|
183
|
+
return d === void 0 ? P : /* @__PURE__ */ i(
|
|
184
|
+
c.Provider,
|
|
185
|
+
{
|
|
186
|
+
delay: d,
|
|
187
|
+
timeout: h.skipDelayDuration ?? 300,
|
|
188
|
+
children: P
|
|
189
|
+
}
|
|
190
|
+
);
|
|
120
191
|
}
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
192
|
+
);
|
|
193
|
+
function rt(o) {
|
|
194
|
+
const e = t.useContext(ot);
|
|
195
|
+
if (!e) throw new Error(`\`${o}\` must be used within \`Tooltip\``);
|
|
196
|
+
return e;
|
|
197
|
+
}
|
|
198
|
+
const Ut = t.forwardRef(function({ asChild: e = !1, children: n, className: r, ...a }, d) {
|
|
199
|
+
const u = B(), v = rt("TooltipTrigger");
|
|
200
|
+
return /* @__PURE__ */ i(
|
|
201
|
+
c.Trigger,
|
|
125
202
|
{
|
|
126
|
-
ref:
|
|
203
|
+
ref: d,
|
|
127
204
|
"data-slot": "tooltip-trigger",
|
|
128
|
-
[
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
)
|
|
133
|
-
...o
|
|
205
|
+
[R]: "tooltip-trigger",
|
|
206
|
+
"aria-describedby": v.open ? v.descriptionId : void 0,
|
|
207
|
+
className: U(!e && u.nativeTrigger, r),
|
|
208
|
+
...a,
|
|
209
|
+
...Ct(e, n)
|
|
134
210
|
}
|
|
135
211
|
);
|
|
136
|
-
}),
|
|
137
|
-
function(
|
|
138
|
-
return /* @__PURE__ */
|
|
139
|
-
|
|
212
|
+
}), nt = t.createContext(!1), Vt = t.forwardRef(
|
|
213
|
+
function({ container: e, forceMount: n, ...r }, a) {
|
|
214
|
+
return /* @__PURE__ */ i(nt.Provider, { value: !0, children: /* @__PURE__ */ i(
|
|
215
|
+
c.Portal,
|
|
140
216
|
{
|
|
217
|
+
ref: a,
|
|
141
218
|
"data-slot": "tooltip-portal",
|
|
142
|
-
[
|
|
143
|
-
|
|
219
|
+
[R]: "tooltip-portal",
|
|
220
|
+
container: e ?? void 0,
|
|
221
|
+
keepMounted: n,
|
|
222
|
+
...r
|
|
144
223
|
}
|
|
145
|
-
);
|
|
224
|
+
) });
|
|
146
225
|
}
|
|
147
|
-
),
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
226
|
+
), bt = {
|
|
227
|
+
side: "flip",
|
|
228
|
+
align: "flip",
|
|
229
|
+
fallbackAxisSide: "none"
|
|
230
|
+
}, Rt = {
|
|
231
|
+
side: "none",
|
|
232
|
+
align: "none",
|
|
233
|
+
fallbackAxisSide: "none"
|
|
234
|
+
}, Xt = t.forwardRef(function({
|
|
235
|
+
asChild: e = !1,
|
|
236
|
+
className: n,
|
|
237
|
+
children: r,
|
|
238
|
+
hideArrow: a = !1,
|
|
239
|
+
variant: d = "default",
|
|
240
|
+
side: u = "top",
|
|
241
|
+
sideOffset: v = 0,
|
|
242
|
+
align: h = "center",
|
|
243
|
+
alignOffset: E = 0,
|
|
244
|
+
arrowPadding: S = 0,
|
|
245
|
+
avoidCollisions: x = !0,
|
|
246
|
+
collisionBoundary: p = [],
|
|
247
|
+
collisionPadding: C = 0,
|
|
248
|
+
sticky: O = "partial",
|
|
249
|
+
hideWhenDetached: y = !1,
|
|
250
|
+
updatePositionStrategy: I,
|
|
251
|
+
forceMount: b,
|
|
252
|
+
id: k,
|
|
253
|
+
...P
|
|
254
|
+
}, g) {
|
|
255
|
+
const s = B(), f = rt("TooltipContent"), w = t.useContext(nt), V = ut(), it = pt(), X = t.useRef(null), [A, at] = t.useState(null), st = yt(g, at), { open: H, closeOnEscape: W } = f;
|
|
256
|
+
t.useEffect(() => {
|
|
257
|
+
if (!H || !A) return;
|
|
258
|
+
const l = A;
|
|
259
|
+
T.push(l);
|
|
260
|
+
const F = l.ownerDocument.defaultView ?? window;
|
|
261
|
+
function K(m) {
|
|
262
|
+
if (m.key !== "Escape" || m.defaultPrevented || m.isComposing || T[T.length - 1] !== l) return;
|
|
263
|
+
const M = m.target;
|
|
264
|
+
!(M instanceof Node) || l.contains(M) || !(l.compareDocumentPosition(M) & Node.DOCUMENT_POSITION_PRECEDING) || (m.preventDefault(), W(m));
|
|
265
|
+
}
|
|
266
|
+
return F.addEventListener("keydown", K, !0), () => {
|
|
267
|
+
F.removeEventListener("keydown", K, !0), T.splice(T.indexOf(l), 1);
|
|
268
|
+
};
|
|
269
|
+
}, [H, A, W]);
|
|
270
|
+
const N = k ?? f.generatedId, L = P["aria-label"], Y = `${N}-label`, $ = L ? Y : N, { setDescriptionId: _ } = f;
|
|
271
|
+
t.useEffect(() => (_($), () => _(void 0)), [$, _]);
|
|
272
|
+
const j = L && /* @__PURE__ */ i("span", { id: Y, hidden: !0, children: L }), G = !a && /* @__PURE__ */ i(
|
|
273
|
+
c.Arrow,
|
|
151
274
|
{
|
|
152
|
-
ref:
|
|
153
|
-
"data-slot": "tooltip-
|
|
154
|
-
[
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
275
|
+
ref: X,
|
|
276
|
+
"data-slot": "tooltip-arrow",
|
|
277
|
+
[R]: "tooltip-arrow",
|
|
278
|
+
"data-variant": d,
|
|
279
|
+
className: s.arrow
|
|
280
|
+
}
|
|
281
|
+
), D = e ? tt(r) : void 0, lt = D ? {
|
|
282
|
+
render: t.cloneElement(
|
|
283
|
+
D,
|
|
284
|
+
void 0,
|
|
285
|
+
D.props.children,
|
|
286
|
+
j,
|
|
287
|
+
G
|
|
288
|
+
)
|
|
289
|
+
} : {
|
|
290
|
+
children: /* @__PURE__ */ ct(dt, { children: [
|
|
291
|
+
r,
|
|
292
|
+
j,
|
|
293
|
+
G
|
|
294
|
+
] })
|
|
295
|
+
}, Z = /* @__PURE__ */ i(
|
|
296
|
+
c.Positioner,
|
|
297
|
+
{
|
|
298
|
+
className: U(
|
|
299
|
+
s.positioner,
|
|
300
|
+
y && s.hideWhenDetached
|
|
301
|
+
),
|
|
302
|
+
positionMethod: "fixed",
|
|
303
|
+
side: u,
|
|
304
|
+
sideOffset: () => {
|
|
305
|
+
var l;
|
|
306
|
+
return v + (((l = X.current) == null ? void 0 : l.offsetHeight) ?? 0);
|
|
307
|
+
},
|
|
308
|
+
align: h,
|
|
309
|
+
alignOffset: h === "center" ? 0 : E,
|
|
310
|
+
arrowPadding: S,
|
|
311
|
+
collisionBoundary: Array.isArray(p) ? p.filter((l) => l !== null) : p === null ? [] : p,
|
|
312
|
+
collisionPadding: C,
|
|
313
|
+
sticky: O === "always",
|
|
314
|
+
collisionAvoidance: x ? bt : Rt,
|
|
315
|
+
children: /* @__PURE__ */ i(
|
|
316
|
+
c.Popup,
|
|
317
|
+
{
|
|
318
|
+
ref: st,
|
|
319
|
+
id: N,
|
|
320
|
+
role: "tooltip",
|
|
321
|
+
"data-slot": "tooltip-content",
|
|
322
|
+
[R]: "tooltip-content",
|
|
323
|
+
...V !== void 0 ? { "data-density": V } : {},
|
|
324
|
+
...it,
|
|
325
|
+
"data-variant": d,
|
|
326
|
+
className: U(s.popup, n),
|
|
327
|
+
...P,
|
|
328
|
+
...lt
|
|
329
|
+
}
|
|
330
|
+
)
|
|
172
331
|
}
|
|
173
332
|
);
|
|
333
|
+
return w ? Z : /* @__PURE__ */ i(c.Portal, { keepMounted: b, children: Z });
|
|
174
334
|
});
|
|
175
335
|
export {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
336
|
+
zt as Tooltip,
|
|
337
|
+
Xt as TooltipContent,
|
|
338
|
+
Vt as TooltipPortal,
|
|
339
|
+
Mt as TooltipProvider,
|
|
340
|
+
Ut as TooltipTrigger
|
|
181
341
|
};
|
|
182
342
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { useAppearanceAttributes } from \"../appearance-boundary/appearance-boundary\"\nimport { useDensity } from \"../density-provider/density-provider\"\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel, nativeControl } from \"../../styles/host-reset\"\nimport { OVERLAY_Z_INDEX } from \"../../styles/overlay-layer\"\nimport * as tokens from \"../../tokens\"\n\nconst useStyles = makeZenithStyles({\n // For the bare native `<button>` a Trigger/Close renders. Not applied under `asChild`, where the\n // child owns its own element and two atom sets would race for the same properties.\n nativeTrigger: {\n ...nativeControl,\n },\n popup: {\n ...boxModel,\n width: \"fit-content\",\n transformOrigin: \"var(--radix-tooltip-content-transform-origin)\",\n ...shorthands.borderRadius(tokens.radiusLg),\n ...shorthands.padding(tokens.spacingElement2),\n // v1 shadow-md; elevation has no token in this package.\n boxShadow: \"0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a\",\n fontSize: tokens.textXs,\n // v1 leading-none; no line-height token exists.\n lineHeight: \"1\",\n textWrap: \"balance\",\n zIndex: OVERLAY_Z_INDEX,\n \"&[data-variant='default']\": {\n backgroundColor: tokens.gray12,\n color: tokens.gray1,\n },\n \"&[data-variant='destructive']\": {\n backgroundColor: tokens.errorA12,\n color: tokens.error1,\n },\n \"&[data-state='open']\": {\n animationName: {\n from: { opacity: 0, transform: \"scale(0.95)\" },\n to: { opacity: 1, transform: \"scale(1)\" },\n },\n animationDuration: \"150ms\",\n animationTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n },\n \"&[data-state='open'][data-side='bottom']\": {\n animationName: {\n from: {\n opacity: 0,\n transform: `translateY(-${tokens.spacingElement1}) scale(0.95)`,\n },\n to: { opacity: 1, transform: \"translateY(0) scale(1)\" },\n },\n },\n \"&[data-state='open'][data-side='left']\": {\n animationName: {\n from: {\n opacity: 0,\n transform: `translateX(${tokens.spacingElement1}) scale(0.95)`,\n },\n to: { opacity: 1, transform: \"translateX(0) scale(1)\" },\n },\n },\n \"&[data-state='open'][data-side='right']\": {\n animationName: {\n from: {\n opacity: 0,\n transform: `translateX(-${tokens.spacingElement1}) scale(0.95)`,\n },\n to: { opacity: 1, transform: \"translateX(0) scale(1)\" },\n },\n },\n \"&[data-state='open'][data-side='top']\": {\n animationName: {\n from: {\n opacity: 0,\n transform: `translateY(${tokens.spacingElement1}) scale(0.95)`,\n },\n to: { opacity: 1, transform: \"translateY(0) scale(1)\" },\n },\n },\n \"&[data-state='closed']\": {\n animationName: {\n from: { opacity: 1, transform: \"scale(1)\" },\n to: { opacity: 0, transform: \"scale(0.95)\" },\n },\n animationDuration: \"0ms\",\n animationTimingFunction: \"cubic-bezier(0.4, 0, 1, 1)\",\n },\n },\n arrow: {\n ...boxModel,\n position: \"relative\",\n zIndex: 50,\n width: \"0.625rem\",\n height: \"0.625rem\",\n transform: \"translateY(calc(-50% - 2px)) rotate(45deg)\",\n ...shorthands.borderRadius(\"2px\"),\n \"&[data-variant='default']\": {\n backgroundColor: tokens.gray12,\n fill: tokens.gray12,\n },\n \"&[data-variant='destructive']\": {\n backgroundColor: tokens.error12,\n fill: tokens.error12,\n },\n },\n})\n\nexport type TooltipProviderProps = React.ComponentProps<\n typeof TooltipPrimitive.Provider\n>\n\nexport const TooltipProvider = React.forwardRef<\n HTMLElement,\n TooltipProviderProps\n>(function TooltipProvider({ delayDuration = 0, ...props }, _ref) {\n return (\n <TooltipPrimitive.Provider\n delayDuration={delayDuration}\n data-slot=\"tooltip-provider\"\n {...props}\n />\n )\n})\n\nexport type TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>\n\nexport const Tooltip = React.forwardRef<HTMLElement, TooltipProps>(\n function Tooltip(props, _ref) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n }\n)\n\nexport type TooltipTriggerProps = React.ComponentProps<\n typeof TooltipPrimitive.Trigger\n>\n\nexport const TooltipTrigger = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Trigger>,\n TooltipTriggerProps\n>(function TooltipTrigger({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <TooltipPrimitive.Trigger\n ref={ref}\n data-slot=\"tooltip-trigger\"\n {...{ [SLOT_ATTR]: \"tooltip-trigger\" }}\n className={mergeClasses(\n !props.asChild && styles.nativeTrigger,\n className\n )}\n {...props}\n />\n )\n})\n\nexport type TooltipPortalProps = React.ComponentProps<\n typeof TooltipPrimitive.Portal\n>\n\nexport const TooltipPortal = React.forwardRef<HTMLElement, TooltipPortalProps>(\n function TooltipPortal(props, _ref) {\n return (\n <TooltipPrimitive.Portal\n data-slot=\"tooltip-portal\"\n {...{ [SLOT_ATTR]: \"tooltip-portal\" }}\n {...props}\n />\n )\n }\n)\n\nexport type TooltipContentProps = React.ComponentProps<\n typeof TooltipPrimitive.Content\n> & {\n hideArrow?: boolean\n variant?: \"default\" | \"destructive\"\n}\n\nexport const TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n TooltipContentProps\n>(function TooltipContent(\n { className, hideArrow = false, variant = \"default\", children, ...props },\n ref\n) {\n const styles = useStyles()\n // DENSITY-SPEC.md §4.4 — portal content boundary; see dialog.tsx's identical comment. Tooltip\n // content rarely nests density-consuming children, but the mechanism is applied uniformly across\n // every portal-content component rather than special-cased per component.\n const override = useDensity()\n // SPEC.md §2 rule 3 — the same portal asymmetry, for the appearance pair: re-stamp the\n // nearest explicit AppearanceBoundary's mode+surface, or neither attribute when there is\n // none, leaving live shell inheritance in place.\n const appearance = useAppearanceAttributes()\n\n return (\n <TooltipPrimitive.Content\n ref={ref}\n data-slot=\"tooltip-content\"\n {...{ [SLOT_ATTR]: \"tooltip-content\" }}\n {...(override !== undefined ? { \"data-density\": override } : {})}\n {...appearance}\n data-variant={variant}\n className={mergeClasses(styles.popup, className)}\n {...props}\n >\n {children}\n {!hideArrow && (\n <TooltipPrimitive.Arrow\n data-slot=\"tooltip-arrow\"\n {...{ [SLOT_ATTR]: \"tooltip-arrow\" }}\n data-variant={variant}\n className={styles.arrow}\n />\n )}\n </TooltipPrimitive.Content>\n )\n})\n"],"names":["useStyles","makeZenithStyles","nativeControl","boxModel","shorthands","tokens.radiusLg","tokens.spacingElement2","tokens.textXs","OVERLAY_Z_INDEX","tokens.gray12","tokens.gray1","tokens.errorA12","tokens.error1","tokens.spacingElement1","tokens.error12","TooltipProvider","React","delayDuration","props","_ref","jsx","TooltipPrimitive.Provider","Tooltip","TooltipPrimitive.Root","TooltipTrigger","className","ref","styles","TooltipPrimitive.Trigger","SLOT_ATTR","mergeClasses","TooltipPortal","TooltipPrimitive.Portal","TooltipContent","hideArrow","variant","children","override","useDensity","appearance","useAppearanceAttributes","jsxs","TooltipPrimitive.Content","TooltipPrimitive.Arrow"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAYC,EAAiB;AAAA;AAAA;AAAA,EAGjC,eAAe;AAAA,IACb,GAAGC;AAAA,EAAA;AAAA,EAEL,OAAO;AAAA,IACL,GAAGC;AAAA,IACH,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,GAAGC,EAAW,aAAaC,CAAe;AAAA,IAC1C,GAAGD,EAAW,QAAQE,CAAsB;AAAA;AAAA,IAE5C,WAAW;AAAA,IACX,UAAUC;AAAAA;AAAAA,IAEV,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,QAAQC;AAAA,IACR,6BAA6B;AAAA,MAC3B,iBAAiBC;AAAAA,MACjB,OAAOC;AAAAA,IAAO;AAAA,IAEhB,iCAAiC;AAAA,MAC/B,iBAAiBC;AAAAA,MACjB,OAAOC;AAAAA,IAAO;AAAA,IAEhB,wBAAwB;AAAA,MACtB,eAAe;AAAA,QACb,MAAM,EAAE,SAAS,GAAG,WAAW,cAAA;AAAA,QAC/B,IAAI,EAAE,SAAS,GAAG,WAAW,WAAA;AAAA,MAAW;AAAA,MAE1C,mBAAmB;AAAA,MACnB,yBAAyB;AAAA,IAAA;AAAA,IAE3B,4CAA4C;AAAA,MAC1C,eAAe;AAAA,QACb,MAAM;AAAA,UACJ,SAAS;AAAA,UACT,WAAW,eAAeC,CAAsB;AAAA,QAAA;AAAA,QAElD,IAAI,EAAE,SAAS,GAAG,WAAW,yBAAA;AAAA,MAAyB;AAAA,IACxD;AAAA,IAEF,0CAA0C;AAAA,MACxC,eAAe;AAAA,QACb,MAAM;AAAA,UACJ,SAAS;AAAA,UACT,WAAW,cAAcA,CAAsB;AAAA,QAAA;AAAA,QAEjD,IAAI,EAAE,SAAS,GAAG,WAAW,yBAAA;AAAA,MAAyB;AAAA,IACxD;AAAA,IAEF,2CAA2C;AAAA,MACzC,eAAe;AAAA,QACb,MAA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A,UAAA;AAAA,QAAA;AAAA,MACpB;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\"\nimport { mergeClasses, shorthands } from \"@epilot/zenith-runtime/v1\"\n\nimport { useAppearanceAttributes } from \"../appearance-boundary/appearance-boundary\"\nimport { useDensity } from \"../density-provider/density-provider\"\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\nimport { boxModel, nativeControl } from \"../../styles/host-reset\"\nimport { OVERLAY_Z_INDEX } from \"../../styles/overlay-layer\"\nimport * as tokens from \"../../tokens\"\n\nconst useStyles = makeZenithStyles({\n // For the bare native `<button>` a Trigger/Close renders. Not applied under `asChild`, where the\n // child owns its own element and two atom sets would race for the same properties.\n nativeTrigger: {\n ...nativeControl,\n },\n positioner: {\n zIndex: OVERLAY_Z_INDEX,\n },\n // Radix's `hideWhenDetached`: hide the content once its trigger is scrolled out of view.\n hideWhenDetached: {\n \"&[data-anchor-hidden]\": {\n visibility: \"hidden\",\n pointerEvents: \"none\",\n },\n },\n // No enter or exit motion: the Radix version keyed its keyframes on `data-state='open'`, a value\n // Radix's tooltip never sets (it sets `delayed-open` or `instant-open`), so it never animated.\n popup: {\n ...boxModel,\n width: \"fit-content\",\n transformOrigin: \"var(--transform-origin)\",\n ...shorthands.borderRadius(tokens.radiusLg),\n ...shorthands.padding(tokens.spacingElement2),\n // v1 shadow-md; elevation has no token in this package.\n boxShadow: \"0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a\",\n fontSize: tokens.textXs,\n // v1 leading-none; no line-height token exists.\n lineHeight: \"1\",\n textWrap: \"balance\",\n zIndex: OVERLAY_Z_INDEX,\n \"&[data-variant='default']\": {\n backgroundColor: tokens.gray12,\n color: tokens.gray1,\n },\n \"&[data-variant='destructive']\": {\n backgroundColor: tokens.errorA12,\n color: tokens.error1,\n },\n },\n // Base UI places the arrow on the cross axis only; the anchored edge is set per side here. The\n // diamond's centre sits 2px inside the content's edge, where Radix's arrow wrapper put it.\n arrow: {\n ...boxModel,\n zIndex: 50,\n width: \"0.625rem\",\n height: \"0.625rem\",\n ...shorthands.borderRadius(\"2px\"),\n \"&[data-side='top']\": {\n top: \"100%\",\n transform: \"translateY(calc(-50% - 2px)) rotate(45deg)\",\n },\n \"&[data-side='bottom']\": {\n top: 0,\n transform: \"translateY(calc(-50% + 2px)) rotate(45deg)\",\n },\n \"&[data-side='left']\": {\n left: \"100%\",\n transform: \"translateX(calc(-50% - 2px)) rotate(45deg)\",\n },\n \"&[data-side='right']\": {\n left: 0,\n transform: \"translateX(calc(-50% + 2px)) rotate(45deg)\",\n },\n // Radix hid the arrow when it could not point at the trigger's centre.\n \"&[data-uncentered]\": {\n visibility: \"hidden\",\n },\n \"&[data-variant='default']\": {\n backgroundColor: tokens.gray12,\n },\n \"&[data-variant='destructive']\": {\n backgroundColor: tokens.error12,\n },\n },\n})\n\n// A single child can arrive wrapped in a one-element array depending on the JSX runtime (MDX call\n// sites do this). Radix's Slot normalised that, so the `asChild` shim has to as well.\nfunction onlySlotChild(children: React.ReactNode) {\n const elements = React.Children.toArray(children).filter(React.isValidElement)\n return elements.length === 1 ? elements[0] : undefined\n}\n\n/**\n * Radix's `asChild` over Base UI's `render`: the single child element becomes the part and keeps\n * its own children, since Base UI lets the rendered element's props win the merge.\n */\nfunction slotProps(asChild: boolean, children: React.ReactNode) {\n const child = asChild ? onlySlotChild(children) : undefined\n return child ? { render: child } : { children }\n}\n\n/**\n * A part's props as they were under Radix: its native element's own (DOM attributes, React's\n * handler types, a `CSSProperties` style, a string `className`, `ref`) plus `asChild`. Base UI's\n * prop types widen `style` and `className` to functions of the part's state, wrap every handler's\n * event in `BaseUIEvent` and add props of their own; none of that reaches the public surface.\n */\ntype NativePartProps<Tag extends \"button\" | \"div\"> =\n React.ComponentProps<Tag> & {\n /** Renders the single child element as this part, merging its props and behaviour onto it. */\n asChild?: boolean\n }\n\nfunction useMergedRef<T>(a: React.Ref<T> | undefined, b: React.Ref<T>) {\n return React.useCallback(\n (node: T | null) => {\n for (const ref of [a, b]) {\n if (typeof ref === \"function\") ref(node)\n else if (ref) (ref as React.MutableRefObject<T | null>).current = node\n }\n },\n [a, b]\n )\n}\n\n/**\n * What `onOpenChange` receives as its second argument: Base UI's change details, declared in\n * Zenith. Base UI's own type would put its internals in the published declarations, which\n * TypeScript 4 consumers cannot parse. `event` narrows with `reason`, as it does in Base UI.\n */\ntype TooltipOpenChangeDetails = (\n | { reason: \"trigger-hover\"; event: MouseEvent }\n | { reason: \"trigger-focus\"; event: FocusEvent }\n | {\n reason: \"trigger-press\"\n event: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent\n }\n | { reason: \"outside-press\"; event: MouseEvent | PointerEvent | TouchEvent }\n | { reason: \"escape-key\"; event: KeyboardEvent }\n | { reason: \"disabled\"; event: Event }\n | { reason: \"imperative-action\"; event: Event }\n | { reason: \"none\"; event: Event }\n) & {\n /** Keeps the tooltip in its current state. */\n cancel: () => void\n /** Lets the event propagate where the tooltip would otherwise stop it. */\n allowPropagation: () => void\n isCanceled: boolean\n isPropagationAllowed: boolean\n /** The element that caused the change, if any. */\n trigger: Element | undefined\n /** Keeps the tooltip's elements mounted after it closes. */\n preventUnmountOnClose: () => void\n}\n\n/** Base UI's details of the imperative close, reported as the Escape that caused it. */\nfunction escapeDetails(\n details: TooltipOpenChangeDetails,\n event: KeyboardEvent\n): TooltipOpenChangeDetails {\n return {\n reason: \"escape-key\",\n event,\n cancel: () => details.cancel(),\n allowPropagation: () => details.allowPropagation(),\n get isCanceled() {\n return details.isCanceled\n },\n get isPropagationAllowed() {\n return details.isPropagationAllowed\n },\n trigger: details.trigger,\n preventUnmountOnClose: () => details.preventUnmountOnClose(),\n }\n}\n\n// The open tooltips' popups, in the order they opened. Escape goes to the last one, as it went to\n// Radix's topmost layer.\nconst openPopups: HTMLElement[] = []\n\n// Radix's provider-level `disableHoverableContent`, which Base UI only takes per tooltip, and the\n// skip delay a tooltip with its own `delayDuration` carries into its own Base UI provider.\nconst TooltipProviderContext = React.createContext<{\n skipDelayDuration?: number\n disableHoverableContent?: boolean\n}>({})\n\nexport type TooltipProviderProps = {\n children: React.ReactNode\n /** How long the pointer rests on a trigger before its tooltip opens, in ms. Defaults to 0. */\n delayDuration?: number\n /** How soon after one tooltip closes the next one opens without a delay, in ms. Defaults to 300. */\n skipDelayDuration?: number\n /** Closes tooltips as soon as the pointer leaves the trigger, even towards the content. */\n disableHoverableContent?: boolean\n}\n\nexport const TooltipProvider = React.forwardRef<\n HTMLElement,\n TooltipProviderProps\n>(function TooltipProvider(\n {\n children,\n delayDuration = 0,\n skipDelayDuration = 300,\n disableHoverableContent,\n },\n _ref\n) {\n const value = React.useMemo(\n () => ({ skipDelayDuration, disableHoverableContent }),\n [skipDelayDuration, disableHoverableContent]\n )\n\n return (\n <TooltipProviderContext.Provider value={value}>\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delayDuration}\n timeout={skipDelayDuration}\n >\n {children}\n </TooltipPrimitive.Provider>\n </TooltipProviderContext.Provider>\n )\n})\n\n// What the trigger and the content share through the root: the open state, the id of the element\n// that describes the trigger (the content, or its label) for `aria-describedby`, and the close the\n// content's Escape listener calls.\ntype TooltipContextValue = {\n open: boolean\n generatedId: string\n descriptionId: string\n setDescriptionId: (id: string | undefined) => void\n closeOnEscape: (event: KeyboardEvent) => void\n}\n\nconst TooltipContext = React.createContext<TooltipContextValue | null>(null)\n\nexport type TooltipProps = {\n children?: React.ReactNode\n open?: boolean\n defaultOpen?: boolean\n /**\n * Called when the tooltip opens or closes. `eventDetails.reason` says why (`trigger-hover`,\n * `trigger-focus`, `trigger-press`, `escape-key`, `outside-press`) and `eventDetails.cancel()`\n * keeps the tooltip in its current state.\n */\n onOpenChange?: (open: boolean, eventDetails: TooltipOpenChangeDetails) => void\n /** This tooltip's hover delay in ms, overriding the provider's. */\n delayDuration?: number\n /** Closes this tooltip as soon as the pointer leaves the trigger, even towards the content. */\n disableHoverableContent?: boolean\n}\n\nexport const Tooltip = React.forwardRef<HTMLElement, TooltipProps>(\n function Tooltip(\n {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n },\n _ref\n ) {\n const provider = React.useContext(TooltipProviderContext)\n // Base UI is always controlled from here, so the trigger's `aria-describedby` follows the\n // same open state Base UI renders.\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const open = openProp ?? uncontrolledOpen\n const generatedId = React.useId()\n const [descriptionId, setDescriptionId] = React.useState<string>()\n const actionsRef = React.useRef<TooltipPrimitive.Root.Actions>(null)\n // Set while the content's Escape listener closes the tooltip, so `onOpenChange` reports it.\n const escapeRef = React.useRef<KeyboardEvent | null>(null)\n const closeOnEscape = React.useCallback((event: KeyboardEvent) => {\n escapeRef.current = event\n try {\n actionsRef.current?.close()\n } finally {\n escapeRef.current = null\n }\n }, [])\n\n const context = React.useMemo(\n () => ({\n open,\n generatedId,\n descriptionId: descriptionId ?? generatedId,\n setDescriptionId,\n closeOnEscape,\n }),\n [open, generatedId, descriptionId, closeOnEscape]\n )\n\n const root = (\n <TooltipContext.Provider value={context}>\n <TooltipPrimitive.Root\n data-slot=\"tooltip\"\n open={open}\n actionsRef={actionsRef}\n onOpenChange={(nextOpen, baseDetails) => {\n const escape = escapeRef.current\n const eventDetails = escape\n ? escapeDetails(baseDetails, escape)\n : baseDetails\n // An Escape that arrives prevented was taken already: by this tooltip's own listener,\n // or by a layer above it. Base UI dismisses regardless, so one Escape would close two.\n if (\n !escape &&\n eventDetails.reason === \"escape-key\" &&\n eventDetails.event.defaultPrevented\n ) {\n baseDetails.cancel()\n return\n }\n onOpenChange?.(nextOpen, eventDetails)\n if (!baseDetails.isCanceled) setUncontrolledOpen(nextOpen)\n }}\n disableHoverablePopup={\n disableHoverableContent ?? provider.disableHoverableContent\n }\n >\n {children}\n </TooltipPrimitive.Root>\n </TooltipContext.Provider>\n )\n\n // Base UI ignores a trigger's own delay while its provider's is 0, and Zenith's provider\n // defaults to 0, so a tooltip with its own delay gets a provider of its own. It leaves the\n // surrounding provider's skip-delay group, which Radix kept it in.\n return delayDuration === undefined ? (\n root\n ) : (\n <TooltipPrimitive.Provider\n delay={delayDuration}\n timeout={provider.skipDelayDuration ?? 300}\n >\n {root}\n </TooltipPrimitive.Provider>\n )\n }\n)\n\nfunction useTooltipContext(part: string) {\n const context = React.useContext(TooltipContext)\n if (!context) throw new Error(`\\`${part}\\` must be used within \\`Tooltip\\``)\n return context\n}\n\nexport type TooltipTriggerProps = NativePartProps<\"button\">\n\nexport const TooltipTrigger = React.forwardRef<\n HTMLButtonElement,\n TooltipTriggerProps\n>(function TooltipTrigger(\n { asChild = false, children, className, ...props },\n ref\n) {\n const styles = useStyles()\n const tooltip = useTooltipContext(\"TooltipTrigger\")\n\n return (\n <TooltipPrimitive.Trigger\n ref={ref}\n data-slot=\"tooltip-trigger\"\n {...{ [SLOT_ATTR]: \"tooltip-trigger\" }}\n // Base UI links nothing; Radix described the trigger by the content while it was open.\n aria-describedby={tooltip.open ? tooltip.descriptionId : undefined}\n className={mergeClasses(!asChild && styles.nativeTrigger, className)}\n {...props}\n {...slotProps(asChild, children)}\n />\n )\n})\n\n// Lets TooltipContent supply Base UI's required Portal itself when no TooltipPortal wraps it, as\n// Radix rendered content without one.\nconst TooltipPortalPresenceContext = React.createContext(false)\n\nexport type TooltipPortalProps = {\n children?: React.ReactNode\n /** The element the content portals into; `document.body` when omitted or null. */\n container?: Element | DocumentFragment | null\n /** Keeps the content mounted while the tooltip is closed. */\n forceMount?: true\n}\n\nexport const TooltipPortal = React.forwardRef<HTMLElement, TooltipPortalProps>(\n function TooltipPortal({ container, forceMount, ...props }, ref) {\n return (\n <TooltipPortalPresenceContext.Provider value={true}>\n <TooltipPrimitive.Portal\n // Base UI types the ref as its portal div, which any HTMLElement ref can hold.\n ref={ref as React.Ref<HTMLDivElement>}\n data-slot=\"tooltip-portal\"\n {...{ [SLOT_ATTR]: \"tooltip-portal\" }}\n // Radix took any Element or DocumentFragment, null meaning the body. Base UI hands a\n // node straight to createPortal, which takes either, but reads null as \"wait for one\".\n container={(container ?? undefined) as HTMLElement | undefined}\n keepMounted={forceMount}\n {...props}\n />\n </TooltipPortalPresenceContext.Provider>\n )\n }\n)\n\ntype Side = \"top\" | \"right\" | \"bottom\" | \"left\"\n\nexport type TooltipContentProps = NativePartProps<\"div\"> & {\n /** The side of the trigger the content opens on. Flips when it would not fit. Defaults to top. */\n side?: Side\n /** Distance from the trigger in px, on top of the arrow's own height. Defaults to 0. */\n sideOffset?: number\n /** Alignment against the trigger. Defaults to center. */\n align?: \"start\" | \"center\" | \"end\"\n /** Offset from the `start` or `end` alignment in px. Defaults to 0. */\n alignOffset?: number\n /** Distance between the arrow and the content's corners in px. Defaults to 0. */\n arrowPadding?: number\n /** Flips and shifts the content to keep it in view. Defaults to true. */\n avoidCollisions?: boolean\n /** Elements the content must stay inside, besides the viewport. */\n collisionBoundary?: Element | null | Array<Element | null>\n /** Distance in px from the boundary edges before the content avoids them. Defaults to 0. */\n collisionPadding?: number | Partial<Record<Side, number>>\n /** `partial` keeps the content attached to its trigger; `always` keeps it in the boundary. */\n sticky?: \"partial\" | \"always\"\n /** Hides the content once its trigger is scrolled out of view. */\n hideWhenDetached?: boolean\n /** Accepted for compatibility; the position follows layout changes either way. */\n updatePositionStrategy?: \"optimized\" | \"always\"\n /**\n * Keeps the content mounted while the tooltip is closed. Inside TooltipPortal, the portal's\n * `forceMount` decides.\n */\n forceMount?: true\n /** Hides the arrow that points at the trigger. */\n hideArrow?: boolean\n variant?: \"default\" | \"destructive\"\n}\n\n// Radix's collision handling: flip to the opposite side or alignment, never to the other axis.\nconst AVOID_COLLISIONS = {\n side: \"flip\",\n align: \"flip\",\n fallbackAxisSide: \"none\",\n} as const\nconst IGNORE_COLLISIONS = {\n side: \"none\",\n align: \"none\",\n fallbackAxisSide: \"none\",\n} as const\n\nexport const TooltipContent = React.forwardRef<\n HTMLDivElement,\n TooltipContentProps\n>(function TooltipContent(\n {\n asChild = false,\n className,\n children,\n hideArrow = false,\n variant = \"default\",\n side = \"top\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy: _updatePositionStrategy,\n forceMount,\n id: idProp,\n ...props\n },\n ref\n) {\n const styles = useStyles()\n const tooltip = useTooltipContext(\"TooltipContent\")\n const hasPortal = React.useContext(TooltipPortalPresenceContext)\n // DENSITY-SPEC.md §4.4 — portal content boundary; see dialog.tsx's identical comment. Tooltip\n // content rarely nests density-consuming children, but the mechanism is applied uniformly across\n // every portal-content component rather than special-cased per component.\n const override = useDensity()\n // SPEC.md §2 rule 3 — the same portal asymmetry, for the appearance pair: re-stamp the\n // nearest explicit AppearanceBoundary's mode+surface, or neither attribute when there is\n // none, leaving live shell inheritance in place.\n const appearance = useAppearanceAttributes()\n const arrowRef = React.useRef<HTMLDivElement>(null)\n const [popup, setPopup] = React.useState<HTMLDivElement | null>(null)\n const popupRef = useMergedRef(ref, setPopup)\n\n // Radix's tooltip was the topmost layer while open, so Escape closed it before anything under it:\n // a Dialog or a Radix menu it sits in, or a control. Base UI's listens later, after a Dialog has\n // taken the key. Taking it on the window in the capture phase, before Radix's layers and Zenith's\n // Base UI roots see it, and preventing it makes them leave it alone.\n const { open, closeOnEscape } = tooltip\n React.useEffect(() => {\n if (!open || !popup) return\n const element = popup\n openPopups.push(element)\n const view = element.ownerDocument.defaultView ?? window\n function onKeyDown(event: KeyboardEvent) {\n if (event.key !== \"Escape\" || event.defaultPrevented || event.isComposing)\n return\n if (openPopups[openPopups.length - 1] !== element) return\n // Only an Escape from under the tooltip, earlier in the document. From inside it (a layer\n // nested in the content, or the content itself) Base UI's own handler runs first; from later\n // in the document, a layer opened over the tooltip takes its own.\n const target = event.target\n if (\n !(target instanceof Node) ||\n element.contains(target) ||\n !(\n element.compareDocumentPosition(target) &\n Node.DOCUMENT_POSITION_PRECEDING\n )\n )\n return\n event.preventDefault()\n closeOnEscape(event)\n }\n view.addEventListener(\"keydown\", onKeyDown, true)\n return () => {\n view.removeEventListener(\"keydown\", onKeyDown, true)\n openPopups.splice(openPopups.indexOf(element), 1)\n }\n }, [open, popup, closeOnEscape])\n\n // The trigger's `aria-describedby` points here, so a caller's own id has to reach it. Radix\n // described the trigger by `aria-label` when one was given; a hidden node carries it, because\n // not every accessibility engine reads the `aria-label` of a describing element.\n const popupId = idProp ?? tooltip.generatedId\n const ariaLabel = props[\"aria-label\"]\n const labelId = `${popupId}-label`\n const descriptionId = ariaLabel ? labelId : popupId\n const { setDescriptionId } = tooltip\n React.useEffect(() => {\n setDescriptionId(descriptionId)\n return () => setDescriptionId(undefined)\n }, [descriptionId, setDescriptionId])\n\n const label = ariaLabel && (\n <span id={labelId} hidden>\n {ariaLabel}\n </span>\n )\n\n const arrow = !hideArrow && (\n <TooltipPrimitive.Arrow\n ref={arrowRef}\n data-slot=\"tooltip-arrow\"\n {...{ [SLOT_ATTR]: \"tooltip-arrow\" }}\n data-variant={variant}\n className={styles.arrow}\n />\n )\n const child = asChild ? onlySlotChild(children) : undefined\n // The child keeps its own children, so the label and the arrow join them there.\n const content = child\n ? {\n render: React.cloneElement(\n child,\n undefined,\n (child.props as { children?: React.ReactNode }).children,\n label,\n arrow\n ),\n }\n : {\n children: (\n <>\n {children}\n {label}\n {arrow}\n </>\n ),\n }\n\n const positioner = (\n <TooltipPrimitive.Positioner\n className={mergeClasses(\n styles.positioner,\n hideWhenDetached && styles.hideWhenDetached\n )}\n positionMethod=\"fixed\"\n side={side}\n // Radix moved the content away by the arrow's own height on top of `sideOffset`.\n sideOffset={() => sideOffset + (arrowRef.current?.offsetHeight ?? 0)}\n align={align}\n // Radix applied the offset to `start` and `end` only; Base UI also shifts centred content.\n alignOffset={align === \"center\" ? 0 : alignOffset}\n arrowPadding={arrowPadding}\n // Radix's default is the viewport alone, not every clipping ancestor.\n collisionBoundary={\n Array.isArray(collisionBoundary)\n ? collisionBoundary.filter((boundary) => boundary !== null)\n : collisionBoundary === null\n ? []\n : collisionBoundary\n }\n collisionPadding={collisionPadding}\n sticky={sticky === \"always\"}\n collisionAvoidance={\n avoidCollisions ? AVOID_COLLISIONS : IGNORE_COLLISIONS\n }\n >\n <TooltipPrimitive.Popup\n ref={popupRef}\n id={popupId}\n // Base UI renders no role; Radix exposed the content as role=\"tooltip\".\n role=\"tooltip\"\n data-slot=\"tooltip-content\"\n {...{ [SLOT_ATTR]: \"tooltip-content\" }}\n {...(override !== undefined ? { \"data-density\": override } : {})}\n {...appearance}\n data-variant={variant}\n className={mergeClasses(styles.popup, className)}\n {...props}\n {...content}\n />\n </TooltipPrimitive.Positioner>\n )\n\n // Base UI's Positioner requires a Portal ancestor; Radix rendered inline without one.\n return hasPortal ? (\n positioner\n ) : (\n <TooltipPrimitive.Portal keepMounted={forceMount}>\n {positioner}\n </TooltipPrimitive.Portal>\n )\n})\n"],"names":["useStyles","makeZenithStyles","nativeControl","OVERLAY_Z_INDEX","boxModel","shorthands","tokens.radiusLg","tokens.spacingElement2","tokens.textXs","tokens.gray12","tokens.gray1","tokens.errorA12","tokens.error1","tokens.error12","onlySlotChild","children","elements","React","slotProps","asChild","child","useMergedRef","a","b","node","ref","escapeDetails","details","event","openPopups","TooltipProviderContext","TooltipProvider","delayDuration","skipDelayDuration","disableHoverableContent","_ref","value","jsx","TooltipPrimitive","TooltipContext","Tooltip","openProp","defaultOpen","onOpenChange","provider","uncontrolledOpen","setUncontrolledOpen","open","generatedId","descriptionId","setDescriptionId","actionsRef","escapeRef","closeOnEscape","_a","context","root","nextOpen","baseDetails","escape","eventDetails","useTooltipContext","part","TooltipTrigger","className","props","styles","tooltip","SLOT_ATTR","mergeClasses","TooltipPortalPresenceContext","TooltipPortal","container","forceMount","AVOID_COLLISIONS","IGNORE_COLLISIONS","TooltipContent","hideArrow","variant","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","_updatePositionStrategy","idProp","hasPortal","override","useDensity","appearance","useAppearanceAttributes","arrowRef","popup","setPopup","popupRef","element","view","onKeyDown","target","popupId","ariaLabel","labelId","label","arrow","content","jsxs","Fragment","positioner","boundary"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAYC,GAAiB;AAAA;AAAA;AAAA,EAGjC,eAAe;AAAA,IACb,GAAGC;AAAA,EAAA;AAAA,EAEL,YAAY;AAAA,IACV,QAAQC;AAAA,EAAA;AAAA;AAAA,EAGV,kBAAkB;AAAA,IAChB,yBAAyB;AAAA,MACvB,YAAY;AAAA,MACZ,eAAe;AAAA,IAAA;AAAA,EACjB;AAAA;AAAA;AAAA,EAIF,OAAO;AAAA,IACL,GAAGC;AAAA,IACH,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,GAAGC,EAAW,aAAaC,EAAe;AAAA,IAC1C,GAAGD,EAAW,QAAQE,EAAsB;AAAA;AAAA,IAE5C,WAAW;AAAA,IACX,UAAUC;AAAAA;AAAAA,IAEV,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,QAAQL;AAAA,IACR,6BAA6B;AAAA,MAC3B,iBAAiBM;AAAAA,MACjB,OAAOC;AAAAA,IAAO;AAAA,IAEhB,iCAAiC;AAAA,MAC/B,iBAAiBC;AAAAA,MACjB,OAAOC;AAAAA,IAAO;AAAA,EAChB;AAAA;AAAA;AAAA,EAIF,OAAO;AAAA,IACL,GAAGR;AAAA,IACH,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,GAAGC,EAAW,aAAa,KAAK;AAAA,IAChC,sBAAsB;AAAA,MACpB,KAAK;AAAA,MACL,WAAW;AAAA,IAAA;AAAA,IAEb,y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