@vizejs/ui 0.387.0 → 0.389.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-BX93FNvj.d.mts +92 -0
- package/dist/alert-DvhiFK_R.mjs +92 -0
- package/dist/alert-dialog-D9tqXQ_Q.mjs +176 -0
- package/dist/alert-dialog.d.mts +2 -0
- package/dist/alert-dialog.mjs +3 -0
- package/dist/alert.d.mts +2 -0
- package/dist/alert.mjs +2 -0
- package/dist/announcer-CW079p2E.mjs +258 -0
- package/dist/announcer-CuBryPW9.d.mts +6829 -0
- package/dist/announcer.d.mts +2 -0
- package/dist/announcer.mjs +2 -0
- package/dist/aspect-ratio-DDqVT6Hg.d.mts +62 -0
- package/dist/aspect-ratio-_HLW6_5i.mjs +63 -0
- package/dist/aspect-ratio.d.mts +2 -0
- package/dist/aspect-ratio.mjs +2 -0
- package/dist/avatar-6fQfQ-1x.mjs +195 -0
- package/dist/avatar.d.mts +2 -0
- package/dist/avatar.mjs +2 -0
- package/dist/badge-BTOyu4i6.mjs +53 -0
- package/dist/badge.d.mts +2 -0
- package/dist/badge.mjs +2 -0
- package/dist/banner-CYiSiZJW.mjs +288 -0
- package/dist/banner.d.mts +2 -0
- package/dist/banner.mjs +2 -0
- package/dist/block-ui-Bd2m1m3K.mjs +111 -0
- package/dist/block-ui.d.mts +2 -0
- package/dist/block-ui.mjs +2 -0
- package/dist/blockquote-eTqp3b_r.mjs +65 -0
- package/dist/blockquote.d.mts +2 -0
- package/dist/blockquote.mjs +2 -0
- package/dist/breadcrumb-BvuPBfkj.mjs +212 -0
- package/dist/breadcrumb-Cdyh20z-.d.mts +202 -0
- package/dist/breadcrumb.d.mts +2 -0
- package/dist/breadcrumb.mjs +2 -0
- package/dist/{button-DYg1mIIq.d.mts → button-Dye0M41O.d.mts} +3 -3
- package/dist/{button-DT8AKlds.mjs → button-VVxUavbS.mjs} +6 -6
- package/dist/button-group-C_mR0Jfw.d.mts +137 -0
- package/dist/button-group-DyQbTCnY.mjs +418 -0
- package/dist/button-group.d.mts +2 -0
- package/dist/button-group.mjs +2 -0
- package/dist/button.d.mts +1 -1
- package/dist/button.mjs +2 -2
- package/dist/callout-DAu-98Ti.mjs +277 -0
- package/dist/callout.d.mts +2 -0
- package/dist/callout.mjs +2 -0
- package/dist/card-D94n04s5.mjs +66 -0
- package/dist/card.d.mts +2 -0
- package/dist/card.mjs +2 -0
- package/dist/catalog.d.mts +2112 -302
- package/dist/catalog.mjs +3831 -433
- package/dist/{checkbox-BgIvwjyC.mjs → checkbox-bM5y7vH8.mjs} +8 -8
- package/dist/checkbox.d.mts +1 -1
- package/dist/checkbox.mjs +2 -2
- package/dist/cluster-BWF028Xt.d.mts +133 -0
- package/dist/cluster-BydJTp9X.mjs +149 -0
- package/dist/cluster.d.mts +2 -0
- package/dist/cluster.mjs +2 -0
- package/dist/code-D93YXaeJ.mjs +66 -0
- package/dist/code.d.mts +2 -0
- package/dist/code.mjs +2 -0
- package/dist/collapsible-Cra5y_if.mjs +269 -0
- package/dist/collapsible.d.mts +2 -0
- package/dist/collapsible.mjs +2 -0
- package/dist/{collection-B_dFZOHO.d.mts → collection-BaPf8lgw.d.mts} +3 -3
- package/dist/{collection-eHN150dT.mjs → collection-Cncgrq4U.mjs} +5 -5
- package/dist/collection.d.mts +1 -1
- package/dist/collection.mjs +1 -1
- package/dist/command-CAH0yrMT.d.mts +105 -0
- package/dist/command.d.mts +2 -0
- package/dist/command.mjs +123 -0
- package/dist/{composite-navigation-Skx3LZsv.mjs → composite-navigation-D6WKS_BY.mjs} +4 -4
- package/dist/{composite-navigation-QINW9GLy.d.mts → composite-navigation-i7ocwmio.d.mts} +4 -4
- package/dist/composite-navigation.d.mts +1 -1
- package/dist/composite-navigation.mjs +1 -1
- package/dist/container-5lSCSbeX.mjs +113 -0
- package/dist/container-CYSiwCA-.d.mts +99 -0
- package/dist/container.d.mts +2 -0
- package/dist/container.mjs +2 -0
- package/dist/context-7SpwFHtK.d.mts +25 -0
- package/dist/context.d.mts +1 -24
- package/dist/context.mjs +1 -1
- package/dist/{controllable-state-BtoxKahh.d.mts → controllable-state-CZZF9Pw5.d.mts} +1 -1
- package/dist/controllable-state.d.mts +1 -1
- package/dist/controllable-state.mjs +1 -1
- package/dist/copy-button-BH2em7nG.mjs +212 -0
- package/dist/copy-button.d.mts +2 -0
- package/dist/copy-button.mjs +2 -0
- package/dist/{id-BV9AJ3cm.d.mts → deterministic-id-DYQJ7KzM.d.mts} +2 -35
- package/dist/{id-mziSyAse.mjs → deterministic-id-yMq4HfmS.mjs} +3 -46
- package/dist/dialog-trigger-ppGKikEP.mjs +717 -0
- package/dist/dialog.d.mts +2 -0
- package/dist/dialog.mjs +2 -0
- package/dist/{dismissable-layer-4icKahVs.d.mts → dismissable-layer-CTWSFZwj.d.mts} +2 -2
- package/dist/{dismissable-layer-CwG1gtdz.mjs → dismissable-layer-CpS07KUV.mjs} +3 -3
- package/dist/dismissable-layer.d.mts +1 -1
- package/dist/dismissable-layer.mjs +1 -1
- package/dist/drag-and-drop-BjYgWGcG.mjs +918 -0
- package/dist/drag-and-drop-CagE25Kt.d.mts +47 -0
- package/dist/drag-and-drop-controller-types-DoTSR_aM.d.mts +304 -0
- package/dist/drag-and-drop.d.mts +3 -0
- package/dist/drag-and-drop.mjs +2 -0
- package/dist/empty-state-DtyOxCA4.mjs +73 -0
- package/dist/empty-state.d.mts +2 -0
- package/dist/empty-state.mjs +2 -0
- package/dist/error-summary-6Xis_769.d.mts +65 -0
- package/dist/error-summary-DMe4IlM9.mjs +209 -0
- package/dist/error-summary-types-5ePaC9O3.d.mts +74 -0
- package/dist/error-summary.d.mts +3 -0
- package/dist/error-summary.mjs +2 -0
- package/dist/field-CBs2-Z9B.mjs +254 -0
- package/dist/field-WWPaJT1x.d.mts +235 -0
- package/dist/field-wiring-9Fy-G1rf.d.mts +14 -0
- package/dist/field-wiring-runtime-fQ3GoLuG.mjs +64 -0
- package/dist/field-wiring-types-Bfyis5hO.d.mts +73 -0
- package/dist/field-wiring.d.mts +3 -0
- package/dist/field-wiring.mjs +2 -0
- package/dist/field.d.mts +2 -0
- package/dist/field.mjs +2 -0
- package/dist/{focus-CAWi_I-0.mjs → focus-XxVWOwbs.mjs} +3 -3
- package/dist/{focus-K6dOifoZ.d.mts → focus-eObxGOtP.d.mts} +2 -2
- package/dist/{focus-guards-Bt0C-0qS.d.mts → focus-guards-BZa7vm6O.d.mts} +2 -2
- package/dist/{focus-guards-DhMPQAT8.mjs → focus-guards-DSxiemx7.mjs} +4 -4
- package/dist/focus-guards.d.mts +1 -1
- package/dist/focus-guards.mjs +1 -1
- package/dist/{focus-scope-CavhKWx0.d.mts → focus-scope-CsnioDR4.d.mts} +3 -3
- package/dist/{focus-scope-dom-DBwNEWxG.mjs → focus-scope-dom-L_EC5GsX.mjs} +2 -2
- package/dist/{focus-scope-D9U1aj67.mjs → focus-scope-mEg8UoeE.mjs} +5 -5
- package/dist/focus-scope.d.mts +1 -1
- package/dist/focus-scope.mjs +1 -1
- package/dist/focus.d.mts +1 -1
- package/dist/focus.mjs +1 -1
- package/dist/form-1V2V30Sv.d.mts +20 -0
- package/dist/form-runtime-CcMDY0Iq.mjs +166 -0
- package/dist/form-types-DXwZRLcs.d.mts +183 -0
- package/dist/form.d.mts +3 -0
- package/dist/form.mjs +2 -0
- package/dist/fullscreen-button-NTbC4R0W.mjs +276 -0
- package/dist/fullscreen-button.d.mts +2 -0
- package/dist/fullscreen-button.mjs +2 -0
- package/dist/grid-BSM9h2dL.d.mts +154 -0
- package/dist/grid-DeC4Wn7Y.mjs +157 -0
- package/dist/grid.d.mts +2 -0
- package/dist/grid.mjs +2 -0
- package/dist/heading-DToVOKV3.mjs +86 -0
- package/dist/heading.d.mts +2 -0
- package/dist/heading.mjs +2 -0
- package/dist/history-BDgNOjcV.mjs +304 -0
- package/dist/history-BkcOSOWb.d.mts +157 -0
- package/dist/history.d.mts +2 -0
- package/dist/history.mjs +2 -0
- package/dist/{hover-BXwwbSaO.d.mts → hover-ZiPRiZkb.d.mts} +2 -2
- package/dist/hover.d.mts +1 -1
- package/dist/hover.mjs +1 -1
- package/dist/icon-DhTTndMu.mjs +233 -0
- package/dist/icon-button-BuXquME1.mjs +188 -0
- package/dist/icon-button.d.mts +2 -0
- package/dist/icon-button.mjs +2 -0
- package/dist/icon.d.mts +2 -0
- package/dist/icon.mjs +2 -0
- package/dist/id-BYG8aXPF.mjs +47 -0
- package/dist/id-Ba8FHjAo.d.mts +34 -0
- package/dist/id.d.mts +2 -1
- package/dist/id.mjs +3 -2
- package/dist/index.d.mts +74 -24
- package/dist/index.mjs +113 -21
- package/dist/{inert-outside-tuHRmaqJ.d.mts → inert-outside-B6KdwAHY.d.mts} +2 -2
- package/dist/{inert-outside-CyqtoKQ4.mjs → inert-outside-DOufBTyy.mjs} +4 -4
- package/dist/inert-outside.d.mts +1 -1
- package/dist/inert-outside.mjs +1 -1
- package/dist/input-Blyx59CR.mjs +256 -0
- package/dist/input-C0fgeRnS.d.mts +159 -0
- package/dist/input.d.mts +2 -0
- package/dist/input.mjs +2 -0
- package/dist/{interaction-modality-DOZK0BpZ.mjs → interaction-modality-BHnjtU4S.mjs} +3 -3
- package/dist/{interaction-modality-jgHKjPFB.d.mts → interaction-modality-BTiZ7j98.d.mts} +2 -2
- package/dist/interaction-modality.d.mts +1 -1
- package/dist/interaction-modality.mjs +1 -1
- package/dist/kbd-sJdXIdIm.mjs +66 -0
- package/dist/kbd.d.mts +2 -0
- package/dist/kbd.mjs +2 -0
- package/dist/link-DDaCjrI5.mjs +154 -0
- package/dist/link-MbRDN6wJ.d.mts +94 -0
- package/dist/link.d.mts +2 -0
- package/dist/link.mjs +2 -0
- package/dist/list-DjyCLVfG.mjs +66 -0
- package/dist/list.d.mts +2 -0
- package/dist/list.mjs +2 -0
- package/dist/listbox-IaqaoiRn.mjs +549 -0
- package/dist/listbox.d.mts +2 -0
- package/dist/listbox.mjs +2 -0
- package/dist/live-region-DYSpwCTk.mjs +48 -0
- package/dist/live-region-G1iobPK5.d.mts +67 -0
- package/dist/live-region-runtime-DVUch8Lu.mjs +62 -0
- package/dist/live-region.d.mts +2 -0
- package/dist/live-region.mjs +3 -0
- package/dist/locale-DzWqhJZs.mjs +206 -0
- package/dist/locale.d.mts +2 -0
- package/dist/locale.mjs +2 -0
- package/dist/{long-press-cll6z2K9.d.mts → long-press-DyYxp191.d.mts} +3 -3
- package/dist/{long-press-Dsul69gk.mjs → long-press-yJk5zK0j.mjs} +4 -4
- package/dist/long-press.d.mts +1 -1
- package/dist/long-press.mjs +1 -1
- package/dist/measure-4I0YOAXD.d.mts +97 -0
- package/dist/measure-runtime-C4qYJp3_.mjs +170 -0
- package/dist/measure.d.mts +2 -0
- package/dist/measure.mjs +2 -0
- package/dist/media-pdf.d.mts +1 -1
- package/dist/media-pdf.mjs +1 -1
- package/dist/media-source.d.mts +1 -1
- package/dist/media-source.mjs +1 -1
- package/dist/media.d.mts +1 -1
- package/dist/media.mjs +1 -1
- package/dist/meter-B3m17_8g.d.mts +174 -0
- package/dist/meter-BwOXVWH8.mjs +243 -0
- package/dist/meter.d.mts +2 -0
- package/dist/meter.mjs +2 -0
- package/dist/motion-OdERKfZR.mjs +174 -0
- package/dist/motion-iUSBdWaI.d.mts +98 -0
- package/dist/motion.d.mts +2 -0
- package/dist/motion.mjs +2 -0
- package/dist/{move-BOmXDYbh.d.mts → move-BJGaV7Y9.d.mts} +2 -2
- package/dist/move-internal-BM_7g70h.mjs +172 -0
- package/dist/move.d.mts +1 -1
- package/dist/move.mjs +216 -1
- package/dist/native-select-H9qvaqQH.mjs +309 -0
- package/dist/native-select.d.mts +2 -0
- package/dist/native-select.mjs +2 -0
- package/dist/pagination-Bs4SBSE4.mjs +791 -0
- package/dist/pagination.d.mts +2 -0
- package/dist/pagination.mjs +2 -0
- package/dist/{pdf-source-zu1LkCeE.mjs → pdf-source-B5JSDKkQ.mjs} +1 -1
- package/dist/{pdf-source-BYFK2Pks.d.mts → pdf-source-adS6ZSmR.d.mts} +1 -1
- package/dist/pointer-grace-CAFcO4om.d.mts +57 -0
- package/dist/pointer-grace-DI0G3oRJ.mjs +162 -0
- package/dist/pointer-grace.d.mts +2 -0
- package/dist/pointer-grace.mjs +2 -0
- package/dist/popover-DeENBKXE.mjs +714 -0
- package/dist/popover.d.mts +2 -0
- package/dist/popover.mjs +2 -0
- package/dist/portal-DeHaLxGL.mjs +114 -0
- package/dist/portal-DhWXejr1.d.mts +71 -0
- package/dist/portal.d.mts +2 -0
- package/dist/portal.mjs +2 -0
- package/dist/positioner-BYJVA3Uy.d.mts +477 -0
- package/dist/positioner-BYmQk86M.mjs +38 -0
- package/dist/positioner-DaPo2YxM.mjs +708 -0
- package/dist/positioner.d.mts +2 -0
- package/dist/positioner.mjs +3 -0
- package/dist/presence-Bhv1qtvn.d.mts +57 -0
- package/dist/presence-CTG1EV3w.mjs +62 -0
- package/dist/presence-runtime-CYwCafSh.mjs +105 -0
- package/dist/presence-types-CRB4HbML.d.mts +45 -0
- package/dist/presence.d.mts +3 -0
- package/dist/presence.mjs +3 -0
- package/dist/{press-N_mE3Mgx.mjs → press-BjLm6bKg.mjs} +6 -6
- package/dist/press-R0_juZq2.d.mts +14 -0
- package/dist/{press-event-Cd2OPpmw.mjs → press-event-xlWYF9py.mjs} +1 -1
- package/dist/{press-types-CNqStzJf.d.mts → press-types-DfTNpqby.d.mts} +1 -1
- package/dist/press.d.mts +2 -13
- package/dist/press.mjs +1 -1
- package/dist/{primitive-C8jW7DLd.d.mts → primitive-BE2mdUcw.d.mts} +2 -2
- package/dist/{primitive-BX31dogp.mjs → primitive-beb2EEOc.mjs} +5 -5
- package/dist/primitive.d.mts +1 -1
- package/dist/primitive.mjs +2 -2
- package/dist/print-button-FqD5HqTV.mjs +206 -0
- package/dist/print-button.d.mts +2 -0
- package/dist/print-button.mjs +2 -0
- package/dist/progress--vbV2wTx.mjs +145 -0
- package/dist/progress-C4PlKwWq.d.mts +128 -0
- package/dist/progress-bar-BqS94auR.mjs +301 -0
- package/dist/progress-bar.d.mts +2 -0
- package/dist/progress-bar.mjs +2 -0
- package/dist/progress.d.mts +2 -0
- package/dist/progress.mjs +2 -0
- package/dist/radio-group-DbTmWcxl.mjs +317 -0
- package/dist/radio-group.d.mts +2 -0
- package/dist/radio-group.mjs +2 -0
- package/dist/rating-BjKLGPP6.mjs +569 -0
- package/dist/rating-souDdL9t.d.mts +273 -0
- package/dist/rating.d.mts +2 -0
- package/dist/rating.mjs +2 -0
- package/dist/scroll-area-BRSwoi9w.mjs +338 -0
- package/dist/scroll-area.d.mts +2 -0
- package/dist/scroll-area.mjs +2 -0
- package/dist/{scroll-lock-Ckbmm0-J.mjs → scroll-lock-BcmK0baN.mjs} +4 -4
- package/dist/{scroll-lock-BgVtX4wT.d.mts → scroll-lock-OfSQnfi0.d.mts} +2 -2
- package/dist/scroll-lock.d.mts +1 -1
- package/dist/scroll-lock.mjs +1 -1
- package/dist/search-field-70Kr2616.mjs +319 -0
- package/dist/search-field-Biw9vApG.d.mts +158 -0
- package/dist/search-field.d.mts +2 -0
- package/dist/search-field.mjs +2 -0
- package/dist/separator-CnNDqbdR.d.mts +59 -0
- package/dist/separator-DDj3tEAz.mjs +66 -0
- package/dist/separator.d.mts +2 -0
- package/dist/separator.mjs +2 -0
- package/dist/share-button-DfvUDFC-.mjs +243 -0
- package/dist/share-button.d.mts +2 -0
- package/dist/share-button.mjs +2 -0
- package/dist/shortcut-CvA_o0_F.mjs +631 -0
- package/dist/shortcut-DAZJ9LEd.d.mts +231 -0
- package/dist/shortcut.d.mts +2 -0
- package/dist/shortcut.mjs +2 -0
- package/dist/skeleton-BYXXcwTH.mjs +101 -0
- package/dist/skeleton-CQW-Tsnt.d.mts +99 -0
- package/dist/skeleton.d.mts +2 -0
- package/dist/skeleton.mjs +2 -0
- package/dist/skip-link-BUp9HXXt.mjs +164 -0
- package/dist/skip-link-DHDrtnP2.d.mts +98 -0
- package/dist/skip-link.d.mts +2 -0
- package/dist/skip-link.mjs +2 -0
- package/dist/slider-BiZSZLDp.mjs +475 -0
- package/dist/slider-CYBbxeNy.d.mts +246 -0
- package/dist/slider.d.mts +2 -0
- package/dist/slider.mjs +2 -0
- package/dist/sortable-BntjgYra.mjs +499 -0
- package/dist/sortable-DQl92bwo.d.mts +206 -0
- package/dist/sortable.d.mts +2 -0
- package/dist/sortable.mjs +2 -0
- package/dist/spacer-Bc0dInvi.mjs +117 -0
- package/dist/spacer-DFstG4G-.d.mts +105 -0
- package/dist/spacer.d.mts +2 -0
- package/dist/spacer.mjs +2 -0
- package/dist/{spatial-navigation-CHj9mDZH.d.mts → spatial-navigation-BPVJGSiJ.d.mts} +3 -3
- package/dist/{spatial-navigation-D6-UDavU.mjs → spatial-navigation-DwcUYMyc.mjs} +2 -2
- package/dist/spatial-navigation.d.mts +1 -1
- package/dist/spatial-navigation.mjs +1 -1
- package/dist/spinner-JnRs8fp-.d.mts +155 -0
- package/dist/spinner-bizL-oOg.mjs +200 -0
- package/dist/spinner.d.mts +2 -0
- package/dist/spinner.mjs +2 -0
- package/dist/stack-C7DOIxo-.mjs +137 -0
- package/dist/stack-CPtBckZB.d.mts +127 -0
- package/dist/stack.d.mts +2 -0
- package/dist/stack.mjs +2 -0
- package/dist/status-light-BGWgQRRf.mjs +125 -0
- package/dist/status-light.d.mts +2 -0
- package/dist/status-light.mjs +2 -0
- package/dist/stepper-CwX6BZaN.mjs +912 -0
- package/dist/stepper.d.mts +2 -0
- package/dist/stepper.mjs +2 -0
- package/dist/style.css +1 -1
- package/dist/surface-C2fnxL3g.mjs +102 -0
- package/dist/surface.d.mts +2 -0
- package/dist/surface.mjs +2 -0
- package/dist/switch-Ck5YmfXb.mjs +197 -0
- package/dist/switch.d.mts +2 -0
- package/dist/switch.mjs +2 -0
- package/dist/table-BxU7htxc.mjs +349 -0
- package/dist/table-Ce3yWwlH.d.mts +415 -0
- package/dist/table.d.mts +2 -0
- package/dist/table.mjs +2 -0
- package/dist/tabs-DSXIomI_.mjs +595 -0
- package/dist/tabs.d.mts +2 -0
- package/dist/tabs.mjs +2 -0
- package/dist/text-BVeNKPiv.mjs +76 -0
- package/dist/text.d.mts +2 -0
- package/dist/text.mjs +2 -0
- package/dist/textarea-4eIDNcvv.d.mts +175 -0
- package/dist/textarea-BZimEPBR.mjs +279 -0
- package/dist/textarea.d.mts +2 -0
- package/dist/textarea.mjs +2 -0
- package/dist/theme-C8Crmb8V.mjs +139 -0
- package/dist/theme-CNK06Pja.d.mts +38 -0
- package/dist/theme-constants-DAwnxG-P.mjs +29 -0
- package/dist/theme-preset-atelier.css +1 -0
- package/dist/theme-preset-headless.css +1 -0
- package/dist/theme-preset-high-contrast.css +1 -0
- package/dist/theme-preset-midnight.css +1 -0
- package/dist/theme-preset-paper.css +1 -0
- package/dist/theme-preset-play.css +1 -0
- package/dist/theme-preset-signal.css +1 -0
- package/dist/theme-scope.d.mts +25 -0
- package/dist/theme-scope.mjs +89 -0
- package/dist/theme-types-CkIa4Sa3.d.mts +71 -0
- package/dist/theme.css +1 -0
- package/dist/theme.d.mts +3 -0
- package/dist/theme.mjs +3 -0
- package/dist/toggle-CBTXzwze.mjs +141 -0
- package/dist/toggle-group-DO7eGEs3.d.mts +147 -0
- package/dist/toggle-group-DybU9N7k.mjs +523 -0
- package/dist/toggle-group.d.mts +2 -0
- package/dist/toggle-group.mjs +2 -0
- package/dist/toggle.d.mts +2 -0
- package/dist/toggle.mjs +2 -0
- package/dist/toolbar-CIU1bor0.d.mts +259 -0
- package/dist/toolbar-CXE8YCX-.mjs +425 -0
- package/dist/toolbar.d.mts +2 -0
- package/dist/toolbar.mjs +2 -0
- package/dist/tooltip-Cgii5xMx.mjs +485 -0
- package/dist/tooltip.d.mts +2 -0
- package/dist/tooltip.mjs +2 -0
- package/dist/transition-BmgFyzA6.mjs +168 -0
- package/dist/transition-BtIWNEFU.d.mts +82 -0
- package/dist/transition.d.mts +2 -0
- package/dist/transition.mjs +2 -0
- package/dist/{typeahead-B7KDxE_u.mjs → typeahead-DZSBI5m5.mjs} +2 -2
- package/dist/{typeahead-BbgUB2Bj.d.mts → typeahead-Dl6w5PAN.d.mts} +3 -3
- package/dist/typeahead.d.mts +1 -1
- package/dist/typeahead.mjs +1 -1
- package/dist/virtualizer-BlxKjT3W.mjs +793 -0
- package/dist/virtualizer-D9qfT4wS.d.mts +349 -0
- package/dist/virtualizer.d.mts +2 -0
- package/dist/virtualizer.mjs +2 -0
- package/dist/{visually-hidden-BOqfqBFt.d.mts → visually-hidden-CUr9BX0K.d.mts} +1 -1
- package/dist/{visually-hidden-BwDOx5yf.mjs → visually-hidden-SDjRJYRK.mjs} +5 -5
- package/dist/visually-hidden.d.mts +1 -1
- package/dist/visually-hidden.mjs +2 -2
- package/package.json +426 -7
- package/dist/checkbox-DP3_ko7D.d.mts +0 -61
- package/dist/move-BVvMHzxr.mjs +0 -386
|
@@ -0,0 +1,708 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
|
|
2
|
+
import { createContext } from "./context.mjs";
|
|
3
|
+
import { createElementBlock, defineComponent, getCurrentScope, onMounted, onScopeDispose, onUpdated, openBlock, renderSlot, shallowReadonly, shallowRef, toRef, toValue, unref, useTemplateRef, watch, watchEffect } from "vue";
|
|
4
|
+
//#region src/families/overlays/positioner/positioner-context.ts
|
|
5
|
+
/** Compound-component context shared by Positioner and PositionerArrow. */
|
|
6
|
+
const positionerContext = createContext("Positioner");
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/families/overlays/positioner/positioner-geometry.ts
|
|
9
|
+
const sides = new Set([
|
|
10
|
+
"bottom",
|
|
11
|
+
"left",
|
|
12
|
+
"right",
|
|
13
|
+
"top"
|
|
14
|
+
]);
|
|
15
|
+
const aligns = new Set([
|
|
16
|
+
"center",
|
|
17
|
+
"end",
|
|
18
|
+
"start"
|
|
19
|
+
]);
|
|
20
|
+
const oppositeSide = {
|
|
21
|
+
bottom: "top",
|
|
22
|
+
left: "right",
|
|
23
|
+
right: "left",
|
|
24
|
+
top: "bottom"
|
|
25
|
+
};
|
|
26
|
+
function isFiniteNumber(value) {
|
|
27
|
+
return Number.isFinite(value);
|
|
28
|
+
}
|
|
29
|
+
function asNumber(value, fallback) {
|
|
30
|
+
return value === void 0 || !isFiniteNumber(value) ? fallback : value;
|
|
31
|
+
}
|
|
32
|
+
/** Parse a placement token into side and alignment. */
|
|
33
|
+
function parsePlacement(placement) {
|
|
34
|
+
const [sideToken = "bottom", alignToken] = placement.split("-");
|
|
35
|
+
const side = sides.has(sideToken) ? sideToken : "bottom";
|
|
36
|
+
return {
|
|
37
|
+
align: aligns.has(alignToken) ? alignToken : "center",
|
|
38
|
+
side
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function formatPlacement(side, align) {
|
|
42
|
+
return align === "center" ? side : `${side}-${align}`;
|
|
43
|
+
}
|
|
44
|
+
function overflowOf(box, viewport, padding) {
|
|
45
|
+
return {
|
|
46
|
+
bottom: box.y + box.height - (viewport.y + viewport.height - padding),
|
|
47
|
+
left: viewport.x + padding - box.x,
|
|
48
|
+
right: box.x + box.width - (viewport.x + viewport.width - padding),
|
|
49
|
+
top: viewport.y + padding - box.y
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function intersects(left, right, padding) {
|
|
53
|
+
return left.x < right.x + right.width - padding && left.x + left.width > right.x + padding && left.y < right.y + right.height - padding && left.y + left.height > right.y + padding;
|
|
54
|
+
}
|
|
55
|
+
function clamp(value, min, max) {
|
|
56
|
+
if (max < min) return min;
|
|
57
|
+
return Math.min(max, Math.max(min, value));
|
|
58
|
+
}
|
|
59
|
+
function resolveAlign(align, rtl, side) {
|
|
60
|
+
if (align === "center" || !rtl || side === "left" || side === "right") return align;
|
|
61
|
+
return align === "start" ? "end" : "start";
|
|
62
|
+
}
|
|
63
|
+
function place(input) {
|
|
64
|
+
const align = resolveAlign(input.align, input.rtl, input.side);
|
|
65
|
+
const { floating, offset, reference, side } = input;
|
|
66
|
+
let x = reference.x;
|
|
67
|
+
let y = reference.y;
|
|
68
|
+
if (side === "top" || side === "bottom") {
|
|
69
|
+
if (align === "start") x = reference.x;
|
|
70
|
+
else if (align === "end") x = reference.x + reference.width - floating.width;
|
|
71
|
+
else x = reference.x + (reference.width - floating.width) / 2;
|
|
72
|
+
y = side === "top" ? reference.y - floating.height - offset : reference.y + reference.height + offset;
|
|
73
|
+
} else {
|
|
74
|
+
if (align === "start") y = reference.y;
|
|
75
|
+
else if (align === "end") y = reference.y + reference.height - floating.height;
|
|
76
|
+
else y = reference.y + (reference.height - floating.height) / 2;
|
|
77
|
+
x = side === "left" ? reference.x - floating.width - offset : reference.x + reference.width + offset;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
height: floating.height,
|
|
81
|
+
width: floating.width,
|
|
82
|
+
x,
|
|
83
|
+
y
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function mainOverflow(side, overflow) {
|
|
87
|
+
return overflow[side];
|
|
88
|
+
}
|
|
89
|
+
function arrowCoords(box, reference, side, arrow, arrowPadding) {
|
|
90
|
+
const maxX = box.width - arrow.width - arrowPadding;
|
|
91
|
+
const maxY = box.height - arrow.height - arrowPadding;
|
|
92
|
+
if (side === "top" || side === "bottom") return {
|
|
93
|
+
arrowX: clamp(reference.x + reference.width / 2 - box.x - arrow.width / 2, arrowPadding, maxX),
|
|
94
|
+
arrowY: side === "top" ? box.height : -arrow.height
|
|
95
|
+
};
|
|
96
|
+
const center = reference.y + reference.height / 2 - box.y - arrow.height / 2;
|
|
97
|
+
return {
|
|
98
|
+
arrowX: side === "left" ? box.width : -arrow.width,
|
|
99
|
+
arrowY: clamp(center, arrowPadding, maxY)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Place a floating box next to a reference, flipping and shifting to stay in view.
|
|
104
|
+
*/
|
|
105
|
+
function computePosition(input) {
|
|
106
|
+
const parsed = parsePlacement(input.placement ?? "bottom");
|
|
107
|
+
const offset = asNumber(input.offset, 0);
|
|
108
|
+
const padding = asNumber(input.collisionPadding, 0);
|
|
109
|
+
const arrowPadding = asNumber(input.arrowPadding, 0);
|
|
110
|
+
const rtl = input.rtl === true;
|
|
111
|
+
const shouldFlip = input.flip !== false;
|
|
112
|
+
const shouldShift = input.shift !== false;
|
|
113
|
+
const shouldHide = input.hide !== false;
|
|
114
|
+
const preferred = place({
|
|
115
|
+
align: parsed.align,
|
|
116
|
+
floating: input.floating,
|
|
117
|
+
offset,
|
|
118
|
+
reference: input.reference,
|
|
119
|
+
rtl,
|
|
120
|
+
side: parsed.side
|
|
121
|
+
});
|
|
122
|
+
const preferredOverflow = overflowOf(preferred, input.viewport, padding);
|
|
123
|
+
let side = parsed.side;
|
|
124
|
+
let box = preferred;
|
|
125
|
+
if (shouldFlip) {
|
|
126
|
+
const flippedSide = oppositeSide[parsed.side];
|
|
127
|
+
const flipped = place({
|
|
128
|
+
align: parsed.align,
|
|
129
|
+
floating: input.floating,
|
|
130
|
+
offset,
|
|
131
|
+
reference: input.reference,
|
|
132
|
+
rtl,
|
|
133
|
+
side: flippedSide
|
|
134
|
+
});
|
|
135
|
+
const flippedOverflow = overflowOf(flipped, input.viewport, padding);
|
|
136
|
+
if (mainOverflow(parsed.side, preferredOverflow) > 0 && mainOverflow(flippedSide, flippedOverflow) < mainOverflow(parsed.side, preferredOverflow)) {
|
|
137
|
+
side = flippedSide;
|
|
138
|
+
box = flipped;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (shouldShift) box = {
|
|
142
|
+
...box,
|
|
143
|
+
x: clamp(box.x, input.viewport.x + padding, input.viewport.x + input.viewport.width - padding - box.width),
|
|
144
|
+
y: clamp(box.y, input.viewport.y + padding, input.viewport.y + input.viewport.height - padding - box.height)
|
|
145
|
+
};
|
|
146
|
+
const overflow = overflowOf(box, input.viewport, padding);
|
|
147
|
+
const arrow = input.arrow ?? null;
|
|
148
|
+
return {
|
|
149
|
+
...arrow === null ? {
|
|
150
|
+
arrowX: null,
|
|
151
|
+
arrowY: null
|
|
152
|
+
} : arrowCoords(box, input.reference, side, arrow, arrowPadding),
|
|
153
|
+
hidden: shouldHide && !intersects(input.reference, input.viewport, padding),
|
|
154
|
+
overflow,
|
|
155
|
+
placement: formatPlacement(side, parsed.align),
|
|
156
|
+
x: box.x,
|
|
157
|
+
y: box.y
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/** Normalize DOMRect-like measurements into a plain {@link Rect}. */
|
|
161
|
+
function readRect(value) {
|
|
162
|
+
const record = value;
|
|
163
|
+
return {
|
|
164
|
+
height: value.height,
|
|
165
|
+
width: value.width,
|
|
166
|
+
x: typeof record.x === "number" ? record.x : record.left ?? 0,
|
|
167
|
+
y: typeof record.y === "number" ? record.y : record.top ?? 0
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/families/overlays/positioner/positioner-size.ts
|
|
172
|
+
/** Inline style for the floating host at a translated position. */
|
|
173
|
+
function hostStyle(strategy, x, y) {
|
|
174
|
+
return `position:${strategy};left:0px;top:0px;transform:translate(${String(x)}px, ${String(y)}px)`;
|
|
175
|
+
}
|
|
176
|
+
/** Inline style for the arrow along the facing edge. */
|
|
177
|
+
function arrowStyle(arrowX, arrowY) {
|
|
178
|
+
return `position:absolute;left:${String(arrowX ?? 0)}px;top:${String(arrowY ?? 0)}px`;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Measure the space a floating element may occupy at a resolved placement.
|
|
182
|
+
*
|
|
183
|
+
* The main axis stops at the reference edge (minus the configured offset);
|
|
184
|
+
* the cross axis spans the viewport. Both respect the collision padding and
|
|
185
|
+
* never go negative, mirroring how flip and shift read the same viewport.
|
|
186
|
+
*/
|
|
187
|
+
function computeAvailableSize(input) {
|
|
188
|
+
const padding = input.collisionPadding ?? 0;
|
|
189
|
+
const offset = input.offset ?? 0;
|
|
190
|
+
const { reference, viewport } = input;
|
|
191
|
+
const { side } = parsePlacement(input.placement);
|
|
192
|
+
let width = viewport.width - padding * 2;
|
|
193
|
+
let height = viewport.height - padding * 2;
|
|
194
|
+
if (side === "top") height = reference.y - offset - (viewport.y + padding);
|
|
195
|
+
else if (side === "bottom") height = viewport.y + viewport.height - padding - (reference.y + reference.height + offset);
|
|
196
|
+
else if (side === "left") width = reference.x - offset - (viewport.x + padding);
|
|
197
|
+
else width = viewport.x + viewport.width - padding - (reference.x + reference.width + offset);
|
|
198
|
+
return {
|
|
199
|
+
height: Math.max(0, height),
|
|
200
|
+
width: Math.max(0, width)
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Publish available space as host constraints and CSS custom properties.
|
|
205
|
+
*
|
|
206
|
+
* The returned fragment is appended to the floating host style when the
|
|
207
|
+
* `size` strategy is enabled: `max-width`/`max-height` clamp the box while
|
|
208
|
+
* `--vize-ui-positioner-available-width` and
|
|
209
|
+
* `--vize-ui-positioner-available-height` stay consumable from consumer CSS.
|
|
210
|
+
*/
|
|
211
|
+
function sizeStyle(size) {
|
|
212
|
+
const width = String(size.width);
|
|
213
|
+
const height = String(size.height);
|
|
214
|
+
return `;max-width:${width}px;max-height:${height}px;--vize-ui-positioner-available-width:${width}px;--vize-ui-positioner-available-height:${height}px`;
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/families/overlays/positioner/positioner-viewport.ts
|
|
218
|
+
/** Insets that leave the viewport untouched. */
|
|
219
|
+
const zeroSafeAreaInsets = Object.freeze({
|
|
220
|
+
bottom: 0,
|
|
221
|
+
left: 0,
|
|
222
|
+
right: 0,
|
|
223
|
+
top: 0
|
|
224
|
+
});
|
|
225
|
+
/**
|
|
226
|
+
* The visible viewport in page coordinates.
|
|
227
|
+
*
|
|
228
|
+
* `visualViewport` already excludes on-screen keyboards and follows
|
|
229
|
+
* pinch-zoom, so collision handling tracks what the user actually sees.
|
|
230
|
+
* Server rendering (no `document`) reports an empty box.
|
|
231
|
+
*/
|
|
232
|
+
function visualViewportRect() {
|
|
233
|
+
const visual = globalThis.visualViewport;
|
|
234
|
+
if (visual) return {
|
|
235
|
+
height: visual.height,
|
|
236
|
+
width: visual.width,
|
|
237
|
+
x: visual.offsetLeft,
|
|
238
|
+
y: visual.offsetTop
|
|
239
|
+
};
|
|
240
|
+
const doc = globalThis.document?.documentElement;
|
|
241
|
+
if (doc) return {
|
|
242
|
+
height: doc.clientHeight,
|
|
243
|
+
width: doc.clientWidth,
|
|
244
|
+
x: 0,
|
|
245
|
+
y: 0
|
|
246
|
+
};
|
|
247
|
+
return {
|
|
248
|
+
height: 0,
|
|
249
|
+
width: 0,
|
|
250
|
+
x: 0,
|
|
251
|
+
y: 0
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
/** The document that owns a measured element, if any. */
|
|
255
|
+
function ownerDocumentOf(element) {
|
|
256
|
+
return element?.ownerDocument ?? globalThis.document ?? null;
|
|
257
|
+
}
|
|
258
|
+
/** Shrink a viewport box by per-edge insets, never below an empty box. */
|
|
259
|
+
function insetViewport(viewport, insets) {
|
|
260
|
+
return {
|
|
261
|
+
height: Math.max(0, viewport.height - insets.top - insets.bottom),
|
|
262
|
+
width: Math.max(0, viewport.width - insets.left - insets.right),
|
|
263
|
+
x: viewport.x + Math.min(Math.max(0, insets.left), viewport.width),
|
|
264
|
+
y: viewport.y + Math.min(Math.max(0, insets.top), viewport.height)
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
function readPixels(value) {
|
|
268
|
+
return Math.max(0, Number.parseFloat(value) || 0);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Read `env(safe-area-inset-*)` through a computed-style probe.
|
|
272
|
+
*
|
|
273
|
+
* CSS environment variables are not scriptable, so a hidden fixed probe is
|
|
274
|
+
* measured and removed synchronously. Environments without a document or
|
|
275
|
+
* without `env()` support report zero insets, keeping the read SSR-safe.
|
|
276
|
+
*/
|
|
277
|
+
function readSafeAreaInsets(targetDocument) {
|
|
278
|
+
const doc = targetDocument ?? globalThis.document;
|
|
279
|
+
const view = doc?.defaultView;
|
|
280
|
+
if (!doc?.body || typeof view?.getComputedStyle !== "function") return zeroSafeAreaInsets;
|
|
281
|
+
const probe = doc.createElement("div");
|
|
282
|
+
probe.setAttribute("data-vize-ui", "safe-area");
|
|
283
|
+
probe.setAttribute("aria-hidden", "true");
|
|
284
|
+
probe.style.cssText = "position:fixed;top:0;left:0;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top, 0px);padding-right:env(safe-area-inset-right, 0px);padding-bottom:env(safe-area-inset-bottom, 0px);padding-left:env(safe-area-inset-left, 0px)";
|
|
285
|
+
doc.body.append(probe);
|
|
286
|
+
try {
|
|
287
|
+
const style = view.getComputedStyle(probe);
|
|
288
|
+
return {
|
|
289
|
+
bottom: readPixels(style.paddingBottom),
|
|
290
|
+
left: readPixels(style.paddingLeft),
|
|
291
|
+
right: readPixels(style.paddingRight),
|
|
292
|
+
top: readPixels(style.paddingTop)
|
|
293
|
+
};
|
|
294
|
+
} finally {
|
|
295
|
+
probe.remove();
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/families/overlays/positioner/positioner-runtime.ts
|
|
300
|
+
const invalidOptionDiagnostic = "VIZE_UI_POSITIONER_OPTION";
|
|
301
|
+
const disposedDiagnostic = "VIZE_UI_POSITIONER_DISPOSED";
|
|
302
|
+
const setupDiagnostic = "VIZE_UI_POSITIONER_SETUP";
|
|
303
|
+
const placements = new Set([
|
|
304
|
+
"bottom",
|
|
305
|
+
"bottom-end",
|
|
306
|
+
"bottom-start",
|
|
307
|
+
"left",
|
|
308
|
+
"left-end",
|
|
309
|
+
"left-start",
|
|
310
|
+
"right",
|
|
311
|
+
"right-end",
|
|
312
|
+
"right-start",
|
|
313
|
+
"top",
|
|
314
|
+
"top-end",
|
|
315
|
+
"top-start"
|
|
316
|
+
]);
|
|
317
|
+
const strategies = new Set(["absolute", "fixed"]);
|
|
318
|
+
function readBoolean(value, fallback) {
|
|
319
|
+
const resolved = toValue(value);
|
|
320
|
+
if (resolved === void 0) return fallback;
|
|
321
|
+
if (typeof resolved !== "boolean") throw new TypeError(`${invalidOptionDiagnostic}: expected a boolean`);
|
|
322
|
+
return resolved;
|
|
323
|
+
}
|
|
324
|
+
function readNumber(value, fallback) {
|
|
325
|
+
const resolved = toValue(value);
|
|
326
|
+
if (resolved === void 0) return fallback;
|
|
327
|
+
if (typeof resolved !== "number" || !Number.isFinite(resolved)) throw new TypeError(`${invalidOptionDiagnostic}: expected a finite number`);
|
|
328
|
+
return resolved;
|
|
329
|
+
}
|
|
330
|
+
function readPlacement(value) {
|
|
331
|
+
const resolved = toValue(value);
|
|
332
|
+
if (resolved === void 0) return "bottom";
|
|
333
|
+
if (!placements.has(resolved)) throw new TypeError(`${invalidOptionDiagnostic}: placement must be a named side or alignment`);
|
|
334
|
+
return resolved;
|
|
335
|
+
}
|
|
336
|
+
function readStrategy(value) {
|
|
337
|
+
const resolved = toValue(value);
|
|
338
|
+
if (resolved === void 0) return "fixed";
|
|
339
|
+
if (!strategies.has(resolved)) throw new TypeError(`${invalidOptionDiagnostic}: strategy must resolve to absolute or fixed`);
|
|
340
|
+
return resolved;
|
|
341
|
+
}
|
|
342
|
+
function readDirection(value) {
|
|
343
|
+
const resolved = toValue(value);
|
|
344
|
+
if (resolved === void 0) return "ltr";
|
|
345
|
+
if (resolved !== "ltr" && resolved !== "rtl") throw new TypeError(`${invalidOptionDiagnostic}: direction must resolve to ltr or rtl`);
|
|
346
|
+
return resolved;
|
|
347
|
+
}
|
|
348
|
+
function readViewport(value) {
|
|
349
|
+
const resolved = toValue(value);
|
|
350
|
+
if (resolved === void 0) return null;
|
|
351
|
+
if (typeof resolved !== "object" || resolved === null || typeof resolved.x !== "number" || typeof resolved.y !== "number" || typeof resolved.width !== "number" || typeof resolved.height !== "number") throw new TypeError(`${invalidOptionDiagnostic}: viewport must resolve to a box`);
|
|
352
|
+
return resolved;
|
|
353
|
+
}
|
|
354
|
+
function validateOptions(options) {
|
|
355
|
+
if (typeof options.placement !== "function") readPlacement(options.placement);
|
|
356
|
+
if (typeof options.strategy !== "function") readStrategy(options.strategy);
|
|
357
|
+
if (typeof options.direction !== "function") readDirection(options.direction);
|
|
358
|
+
if (typeof options.offset !== "function") readNumber(options.offset, 0);
|
|
359
|
+
if (typeof options.collisionPadding !== "function") readNumber(options.collisionPadding, 0);
|
|
360
|
+
if (typeof options.arrowPadding !== "function") readNumber(options.arrowPadding, 0);
|
|
361
|
+
if (typeof options.flip !== "function") readBoolean(options.flip, true);
|
|
362
|
+
if (typeof options.shift !== "function") readBoolean(options.shift, true);
|
|
363
|
+
if (typeof options.size !== "function") readBoolean(options.size, false);
|
|
364
|
+
if (typeof options.safeArea !== "function") readBoolean(options.safeArea, false);
|
|
365
|
+
if (typeof options.hide !== "function") readBoolean(options.hide, true);
|
|
366
|
+
if (typeof options.updateOnScroll !== "function") readBoolean(options.updateOnScroll, true);
|
|
367
|
+
if (typeof options.updateOnResize !== "function") readBoolean(options.updateOnResize, true);
|
|
368
|
+
if (typeof options.viewport !== "function") readViewport(options.viewport);
|
|
369
|
+
}
|
|
370
|
+
function measure(element) {
|
|
371
|
+
if (element === null) return null;
|
|
372
|
+
return readRect(element.getBoundingClientRect());
|
|
373
|
+
}
|
|
374
|
+
function floatingOffsetParent(element) {
|
|
375
|
+
if (element === null || !("offsetParent" in element)) return null;
|
|
376
|
+
const parent = element.offsetParent;
|
|
377
|
+
return parent instanceof Element ? parent : null;
|
|
378
|
+
}
|
|
379
|
+
/** Create an SSR-safe floating placement controller. */
|
|
380
|
+
function createPositioner(options = {}) {
|
|
381
|
+
validateOptions(options);
|
|
382
|
+
const x = shallowRef(0);
|
|
383
|
+
const y = shallowRef(0);
|
|
384
|
+
const arrowX = shallowRef(null);
|
|
385
|
+
const arrowY = shallowRef(null);
|
|
386
|
+
const availableWidth = shallowRef(null);
|
|
387
|
+
const availableHeight = shallowRef(null);
|
|
388
|
+
const hidden = shallowRef(false);
|
|
389
|
+
const ready = shallowRef(false);
|
|
390
|
+
const resolvedPlacement = shallowRef(readPlacement(options.placement));
|
|
391
|
+
const strategy = shallowRef(readStrategy(options.strategy));
|
|
392
|
+
const style = shallowRef(hostStyle(strategy.value, 0, 0));
|
|
393
|
+
const arrowStyles = shallowRef(arrowStyle(null, null));
|
|
394
|
+
let disposed = false;
|
|
395
|
+
let reference = null;
|
|
396
|
+
let floating = null;
|
|
397
|
+
let arrow = null;
|
|
398
|
+
let safeAreaInsets = zeroSafeAreaInsets;
|
|
399
|
+
const listeners = [];
|
|
400
|
+
const assertAlive = () => {
|
|
401
|
+
if (disposed) throw new Error(`${disposedDiagnostic}: the controller has been disposed`);
|
|
402
|
+
};
|
|
403
|
+
const refreshSafeArea = () => {
|
|
404
|
+
safeAreaInsets = readBoolean(options.safeArea, false) ? readSafeAreaInsets(ownerDocumentOf(floating)) : zeroSafeAreaInsets;
|
|
405
|
+
};
|
|
406
|
+
const detach = () => {
|
|
407
|
+
while (listeners.length > 0) listeners.pop()?.();
|
|
408
|
+
};
|
|
409
|
+
const attach = () => {
|
|
410
|
+
detach();
|
|
411
|
+
refreshSafeArea();
|
|
412
|
+
if (typeof globalThis.addEventListener !== "function") return;
|
|
413
|
+
const onScroll = () => {
|
|
414
|
+
if (readBoolean(options.updateOnScroll, true)) update();
|
|
415
|
+
};
|
|
416
|
+
const onResize = () => {
|
|
417
|
+
refreshSafeArea();
|
|
418
|
+
if (readBoolean(options.updateOnResize, true)) update();
|
|
419
|
+
};
|
|
420
|
+
globalThis.addEventListener("scroll", onScroll, true);
|
|
421
|
+
listeners.push(() => globalThis.removeEventListener("scroll", onScroll, true));
|
|
422
|
+
globalThis.addEventListener("resize", onResize);
|
|
423
|
+
listeners.push(() => globalThis.removeEventListener("resize", onResize));
|
|
424
|
+
const visual = globalThis.visualViewport;
|
|
425
|
+
if (visual) {
|
|
426
|
+
visual.addEventListener("resize", onResize);
|
|
427
|
+
visual.addEventListener("scroll", onScroll);
|
|
428
|
+
listeners.push(() => {
|
|
429
|
+
visual.removeEventListener("resize", onResize);
|
|
430
|
+
visual.removeEventListener("scroll", onScroll);
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
if (typeof ResizeObserver === "function") {
|
|
434
|
+
const observer = new ResizeObserver(onResize);
|
|
435
|
+
if (reference instanceof Element) observer.observe(reference);
|
|
436
|
+
if (floating instanceof Element) observer.observe(floating);
|
|
437
|
+
listeners.push(() => observer.disconnect());
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
const update = () => {
|
|
441
|
+
assertAlive();
|
|
442
|
+
const referenceRect = measure(reference);
|
|
443
|
+
const floatingRect = measure(floating);
|
|
444
|
+
if (referenceRect === null || floatingRect === null) return;
|
|
445
|
+
const nextStrategy = readStrategy(options.strategy);
|
|
446
|
+
const collisionPadding = readNumber(options.collisionPadding, 0);
|
|
447
|
+
const offset = readNumber(options.offset, 0);
|
|
448
|
+
const viewport = insetViewport(readViewport(options.viewport) ?? visualViewportRect(), safeAreaInsets);
|
|
449
|
+
const result = computePosition({
|
|
450
|
+
arrow: measure(arrow),
|
|
451
|
+
arrowPadding: readNumber(options.arrowPadding, 0),
|
|
452
|
+
collisionPadding,
|
|
453
|
+
flip: readBoolean(options.flip, true),
|
|
454
|
+
floating: floatingRect,
|
|
455
|
+
hide: readBoolean(options.hide, true),
|
|
456
|
+
offset,
|
|
457
|
+
placement: readPlacement(options.placement),
|
|
458
|
+
reference: referenceRect,
|
|
459
|
+
rtl: readDirection(options.direction) === "rtl",
|
|
460
|
+
shift: readBoolean(options.shift, true),
|
|
461
|
+
viewport
|
|
462
|
+
});
|
|
463
|
+
const available = computeAvailableSize({
|
|
464
|
+
collisionPadding,
|
|
465
|
+
offset,
|
|
466
|
+
placement: result.placement,
|
|
467
|
+
reference: referenceRect,
|
|
468
|
+
viewport
|
|
469
|
+
});
|
|
470
|
+
let nextX = result.x;
|
|
471
|
+
let nextY = result.y;
|
|
472
|
+
if (nextStrategy === "absolute") {
|
|
473
|
+
const parent = measure(floatingOffsetParent(floating));
|
|
474
|
+
if (parent !== null) {
|
|
475
|
+
nextX -= parent.x;
|
|
476
|
+
nextY -= parent.y;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
x.value = nextX;
|
|
480
|
+
y.value = nextY;
|
|
481
|
+
arrowX.value = result.arrowX;
|
|
482
|
+
arrowY.value = result.arrowY;
|
|
483
|
+
availableWidth.value = available.width;
|
|
484
|
+
availableHeight.value = available.height;
|
|
485
|
+
hidden.value = result.hidden;
|
|
486
|
+
resolvedPlacement.value = result.placement;
|
|
487
|
+
strategy.value = nextStrategy;
|
|
488
|
+
style.value = hostStyle(nextStrategy, nextX, nextY) + (readBoolean(options.size, false) ? sizeStyle(available) : "");
|
|
489
|
+
arrowStyles.value = arrowStyle(result.arrowX, result.arrowY);
|
|
490
|
+
ready.value = true;
|
|
491
|
+
};
|
|
492
|
+
const stopWatch = watch(() => [
|
|
493
|
+
toValue(options.placement),
|
|
494
|
+
toValue(options.strategy),
|
|
495
|
+
toValue(options.direction),
|
|
496
|
+
toValue(options.offset),
|
|
497
|
+
toValue(options.collisionPadding),
|
|
498
|
+
toValue(options.arrowPadding),
|
|
499
|
+
toValue(options.flip),
|
|
500
|
+
toValue(options.shift),
|
|
501
|
+
toValue(options.size),
|
|
502
|
+
toValue(options.safeArea),
|
|
503
|
+
toValue(options.hide),
|
|
504
|
+
toValue(options.viewport)
|
|
505
|
+
], () => {
|
|
506
|
+
if (disposed) return;
|
|
507
|
+
refreshSafeArea();
|
|
508
|
+
if (ready.value) update();
|
|
509
|
+
}, { flush: "sync" });
|
|
510
|
+
return Object.freeze({
|
|
511
|
+
arrowX: shallowReadonly(arrowX),
|
|
512
|
+
arrowY: shallowReadonly(arrowY),
|
|
513
|
+
arrowStyle: shallowReadonly(arrowStyles),
|
|
514
|
+
availableHeight: shallowReadonly(availableHeight),
|
|
515
|
+
availableWidth: shallowReadonly(availableWidth),
|
|
516
|
+
dispose: () => {
|
|
517
|
+
if (disposed) return;
|
|
518
|
+
disposed = true;
|
|
519
|
+
detach();
|
|
520
|
+
stopWatch();
|
|
521
|
+
},
|
|
522
|
+
hidden: shallowReadonly(hidden),
|
|
523
|
+
ready: shallowReadonly(ready),
|
|
524
|
+
resolvedPlacement: shallowReadonly(resolvedPlacement),
|
|
525
|
+
setArrow: (element) => {
|
|
526
|
+
assertAlive();
|
|
527
|
+
if (arrow === element) return;
|
|
528
|
+
arrow = element;
|
|
529
|
+
if (ready.value) update();
|
|
530
|
+
},
|
|
531
|
+
setFloating: (element) => {
|
|
532
|
+
assertAlive();
|
|
533
|
+
if (floating === element) return;
|
|
534
|
+
floating = element;
|
|
535
|
+
attach();
|
|
536
|
+
update();
|
|
537
|
+
},
|
|
538
|
+
setReference: (element) => {
|
|
539
|
+
assertAlive();
|
|
540
|
+
if (reference === element) return;
|
|
541
|
+
reference = element;
|
|
542
|
+
attach();
|
|
543
|
+
update();
|
|
544
|
+
},
|
|
545
|
+
strategy: shallowReadonly(strategy),
|
|
546
|
+
style: shallowReadonly(style),
|
|
547
|
+
update,
|
|
548
|
+
x: shallowReadonly(x),
|
|
549
|
+
y: shallowReadonly(y)
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
/** Create a positioner disposed with the current Vue effect scope. */
|
|
553
|
+
function usePositioner(options = {}) {
|
|
554
|
+
if (!getCurrentScope()) throw new Error(`${setupDiagnostic}: use inside component setup or an active effect scope`);
|
|
555
|
+
const controller = createPositioner(options);
|
|
556
|
+
onScopeDispose(controller.dispose);
|
|
557
|
+
return controller;
|
|
558
|
+
}
|
|
559
|
+
//#endregion
|
|
560
|
+
//#region src/families/overlays/positioner/positioner.vue?vue&type=script&setup=true&lang.ts
|
|
561
|
+
const _hoisted_1 = [
|
|
562
|
+
"data-vize-placement",
|
|
563
|
+
"data-vize-positioner-ready",
|
|
564
|
+
"data-vize-hidden"
|
|
565
|
+
];
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/families/overlays/positioner/positioner.vue
|
|
568
|
+
var positioner_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
569
|
+
__name: "positioner",
|
|
570
|
+
props: {
|
|
571
|
+
reference: {
|
|
572
|
+
type: null,
|
|
573
|
+
required: false,
|
|
574
|
+
default: null
|
|
575
|
+
},
|
|
576
|
+
placement: {
|
|
577
|
+
type: String,
|
|
578
|
+
required: false,
|
|
579
|
+
default: "bottom"
|
|
580
|
+
},
|
|
581
|
+
strategy: {
|
|
582
|
+
type: String,
|
|
583
|
+
required: false,
|
|
584
|
+
default: "fixed"
|
|
585
|
+
},
|
|
586
|
+
offset: {
|
|
587
|
+
type: Number,
|
|
588
|
+
required: false,
|
|
589
|
+
default: 0
|
|
590
|
+
},
|
|
591
|
+
collisionPadding: {
|
|
592
|
+
type: Number,
|
|
593
|
+
required: false,
|
|
594
|
+
default: 0
|
|
595
|
+
},
|
|
596
|
+
arrowPadding: {
|
|
597
|
+
type: Number,
|
|
598
|
+
required: false,
|
|
599
|
+
default: 0
|
|
600
|
+
},
|
|
601
|
+
direction: {
|
|
602
|
+
type: String,
|
|
603
|
+
required: false,
|
|
604
|
+
default: "ltr"
|
|
605
|
+
},
|
|
606
|
+
flip: {
|
|
607
|
+
type: Boolean,
|
|
608
|
+
required: false,
|
|
609
|
+
default: true
|
|
610
|
+
},
|
|
611
|
+
shift: {
|
|
612
|
+
type: Boolean,
|
|
613
|
+
required: false,
|
|
614
|
+
default: true
|
|
615
|
+
},
|
|
616
|
+
size: {
|
|
617
|
+
type: Boolean,
|
|
618
|
+
required: false,
|
|
619
|
+
default: false
|
|
620
|
+
},
|
|
621
|
+
safeArea: {
|
|
622
|
+
type: Boolean,
|
|
623
|
+
required: false,
|
|
624
|
+
default: false
|
|
625
|
+
},
|
|
626
|
+
hide: {
|
|
627
|
+
type: Boolean,
|
|
628
|
+
required: false,
|
|
629
|
+
default: true
|
|
630
|
+
},
|
|
631
|
+
updateOnScroll: {
|
|
632
|
+
type: Boolean,
|
|
633
|
+
required: false,
|
|
634
|
+
default: true
|
|
635
|
+
},
|
|
636
|
+
updateOnResize: {
|
|
637
|
+
type: Boolean,
|
|
638
|
+
required: false,
|
|
639
|
+
default: true
|
|
640
|
+
},
|
|
641
|
+
viewport: {
|
|
642
|
+
type: Object,
|
|
643
|
+
required: false,
|
|
644
|
+
default: () => void 0
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
setup(__props, { expose: __expose }) {
|
|
648
|
+
const positioner = usePositioner({
|
|
649
|
+
arrowPadding: toRef(() => __props.arrowPadding),
|
|
650
|
+
collisionPadding: toRef(() => __props.collisionPadding),
|
|
651
|
+
direction: toRef(() => __props.direction),
|
|
652
|
+
flip: toRef(() => __props.flip),
|
|
653
|
+
hide: toRef(() => __props.hide),
|
|
654
|
+
offset: toRef(() => __props.offset),
|
|
655
|
+
placement: toRef(() => __props.placement),
|
|
656
|
+
safeArea: toRef(() => __props.safeArea),
|
|
657
|
+
shift: toRef(() => __props.shift),
|
|
658
|
+
size: toRef(() => __props.size),
|
|
659
|
+
strategy: toRef(() => __props.strategy),
|
|
660
|
+
updateOnResize: toRef(() => __props.updateOnResize),
|
|
661
|
+
updateOnScroll: toRef(() => __props.updateOnScroll),
|
|
662
|
+
viewport: toRef(() => __props.viewport)
|
|
663
|
+
});
|
|
664
|
+
const element = useTemplateRef("element");
|
|
665
|
+
positionerContext.provide(positioner);
|
|
666
|
+
onMounted(() => {
|
|
667
|
+
positioner.setFloating(element.value);
|
|
668
|
+
positioner.setReference(__props.reference);
|
|
669
|
+
});
|
|
670
|
+
watch(() => __props.reference, (value) => {
|
|
671
|
+
positioner.setReference(value);
|
|
672
|
+
});
|
|
673
|
+
onUpdated(() => {
|
|
674
|
+
positioner.setFloating(element.value);
|
|
675
|
+
});
|
|
676
|
+
watchEffect(() => {
|
|
677
|
+
if (element.value) element.value.style.cssText = positioner.style.value;
|
|
678
|
+
}, { flush: "sync" });
|
|
679
|
+
__expose({
|
|
680
|
+
arrowStyle: positioner.arrowStyle,
|
|
681
|
+
availableHeight: positioner.availableHeight,
|
|
682
|
+
availableWidth: positioner.availableWidth,
|
|
683
|
+
element,
|
|
684
|
+
hidden: positioner.hidden,
|
|
685
|
+
ready: positioner.ready,
|
|
686
|
+
resolvedPlacement: positioner.resolvedPlacement,
|
|
687
|
+
style: positioner.style,
|
|
688
|
+
update: positioner.update,
|
|
689
|
+
x: positioner.x,
|
|
690
|
+
y: positioner.y
|
|
691
|
+
});
|
|
692
|
+
return (_ctx, _cache) => {
|
|
693
|
+
return openBlock(), createElementBlock("div", {
|
|
694
|
+
ref_key: "element",
|
|
695
|
+
ref: element,
|
|
696
|
+
"data-vize-ui": "positioner",
|
|
697
|
+
"data-vize-placement": unref(positioner).resolvedPlacement.value,
|
|
698
|
+
"data-vize-positioner-ready": unref(positioner).ready.value ? "true" : "false",
|
|
699
|
+
"data-vize-hidden": unref(positioner).hidden.value ? "true" : void 0
|
|
700
|
+
}, [renderSlot(_ctx.$slots, "default", {
|
|
701
|
+
placement: unref(positioner).resolvedPlacement.value,
|
|
702
|
+
ready: unref(positioner).ready.value
|
|
703
|
+
}, void 0, true)], 8, _hoisted_1);
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
}), [["__scopeId", "data-v-332605ff"]]);
|
|
707
|
+
//#endregion
|
|
708
|
+
export { readSafeAreaInsets as a, computeAvailableSize as c, parsePlacement as d, readRect as f, insetViewport as i, sizeStyle as l, createPositioner as n, visualViewportRect as o, positionerContext as p, usePositioner as r, zeroSafeAreaInsets as s, positioner_default as t, computePosition as u };
|