@vizejs/ui 0.387.0 → 0.388.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-DGr2Iz0i.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,259 @@
|
|
|
1
|
+
import { n as PrimitiveElement, t as PrimitiveAs } from "./primitive-BE2mdUcw.mjs";
|
|
2
|
+
import { CSSProperties, ComputedRef, ShallowRef } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/families/actions/toolbar/toolbar-types.d.ts
|
|
5
|
+
/** Directional layout hint used by Toolbar arrow-key roving focus. */
|
|
6
|
+
type ToolbarOrientation = "horizontal" | "vertical";
|
|
7
|
+
/** Reading direction used to map horizontal Toolbar arrow keys. */
|
|
8
|
+
type ToolbarDirection = "ltr" | "rtl";
|
|
9
|
+
/** Stable root state exposed for consumer-owned styling and tests. */
|
|
10
|
+
type ToolbarState = "disabled" | "idle";
|
|
11
|
+
/** Stable item state exposed for consumer-owned styling and tests. */
|
|
12
|
+
type ToolbarItemState = "disabled" | "idle";
|
|
13
|
+
/** Stable part names emitted by the Toolbar family. */
|
|
14
|
+
type ToolbarPart = "item" | "root";
|
|
15
|
+
/** Stable `data-vize-ui` values emitted by the Toolbar family. */
|
|
16
|
+
type ToolbarDataName = "toolbar" | "toolbar-item";
|
|
17
|
+
/** Stable data attributes emitted by one or more Toolbar components. */
|
|
18
|
+
type ToolbarDataAttribute = "data-disabled" | "data-orientation" | "data-roving-focus" | "data-state" | "data-value" | "data-vize-ui";
|
|
19
|
+
/** CSS custom properties authored inline by the Toolbar root. */
|
|
20
|
+
type ToolbarCssCustomProperty = "--vize-ui-toolbar-orientation";
|
|
21
|
+
/** Inline style contract applied to the Toolbar root. */
|
|
22
|
+
interface ToolbarStyle extends Readonly<CSSProperties> {
|
|
23
|
+
/** Consumer-overridable orientation token for layout recipes. */
|
|
24
|
+
readonly "--vize-ui-toolbar-orientation": ToolbarOrientation;
|
|
25
|
+
}
|
|
26
|
+
/** Public props accepted by the root Toolbar component. */
|
|
27
|
+
interface ToolbarProps {
|
|
28
|
+
/**
|
|
29
|
+
* Native element, custom element, or component to render.
|
|
30
|
+
*
|
|
31
|
+
* @default "div"
|
|
32
|
+
*/
|
|
33
|
+
readonly as?: PrimitiveAs;
|
|
34
|
+
/**
|
|
35
|
+
* Disable every item and remove the toolbar from roving focus.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
readonly disabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Directional layout hint used by arrow-key roving focus.
|
|
42
|
+
*
|
|
43
|
+
* @default "horizontal"
|
|
44
|
+
*/
|
|
45
|
+
readonly orientation?: ToolbarOrientation;
|
|
46
|
+
/**
|
|
47
|
+
* Reading direction used to map horizontal arrow-key navigation.
|
|
48
|
+
*
|
|
49
|
+
* @default "ltr"
|
|
50
|
+
*/
|
|
51
|
+
readonly dir?: ToolbarDirection;
|
|
52
|
+
/**
|
|
53
|
+
* Whether arrow-key navigation wraps at the first and last enabled item.
|
|
54
|
+
*
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
readonly loop?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether items participate in a single-tabstop roving focus model.
|
|
60
|
+
*
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
63
|
+
readonly rovingFocus?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Accessible name when no visible label or `aria-labelledby` supplies one.
|
|
66
|
+
*
|
|
67
|
+
* @default undefined
|
|
68
|
+
*/
|
|
69
|
+
readonly ariaLabel?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Space-separated ids that label the toolbar.
|
|
72
|
+
*
|
|
73
|
+
* @default undefined
|
|
74
|
+
*/
|
|
75
|
+
readonly ariaLabelledby?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Space-separated ids that describe the toolbar.
|
|
78
|
+
*
|
|
79
|
+
* @default undefined
|
|
80
|
+
*/
|
|
81
|
+
readonly ariaDescribedby?: string;
|
|
82
|
+
}
|
|
83
|
+
/** Props accepted by ToolbarItem. */
|
|
84
|
+
interface ToolbarItemProps {
|
|
85
|
+
/**
|
|
86
|
+
* Native element, custom element, or component to render.
|
|
87
|
+
*
|
|
88
|
+
* @default "button"
|
|
89
|
+
*/
|
|
90
|
+
readonly as?: PrimitiveAs;
|
|
91
|
+
/**
|
|
92
|
+
* Whether the rendered target already implements native button semantics.
|
|
93
|
+
*
|
|
94
|
+
* @default auto
|
|
95
|
+
*/
|
|
96
|
+
readonly native?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Native button submission behavior.
|
|
99
|
+
*
|
|
100
|
+
* @default "button"
|
|
101
|
+
*/
|
|
102
|
+
readonly type?: "button" | "reset" | "submit";
|
|
103
|
+
/**
|
|
104
|
+
* Stable item value emitted by item and toolbar press events.
|
|
105
|
+
*
|
|
106
|
+
* @default required
|
|
107
|
+
*/
|
|
108
|
+
readonly value: string;
|
|
109
|
+
/**
|
|
110
|
+
* Disable this item while preserving the rest of the toolbar.
|
|
111
|
+
*
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
readonly disabled?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Accessible name when no visible label or `aria-labelledby` supplies one.
|
|
117
|
+
*
|
|
118
|
+
* @default undefined
|
|
119
|
+
*/
|
|
120
|
+
readonly ariaLabel?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Space-separated ids that label this item.
|
|
123
|
+
*
|
|
124
|
+
* @default undefined
|
|
125
|
+
*/
|
|
126
|
+
readonly ariaLabelledby?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Space-separated ids that describe this item.
|
|
129
|
+
*
|
|
130
|
+
* @default undefined
|
|
131
|
+
*/
|
|
132
|
+
readonly ariaDescribedby?: string;
|
|
133
|
+
}
|
|
134
|
+
/** Events emitted by the root Toolbar component. */
|
|
135
|
+
interface ToolbarEmits {
|
|
136
|
+
/** Fired after an enabled item is activated by pointer or keyboard. */
|
|
137
|
+
press: [value: string, nativeEvent: MouseEvent];
|
|
138
|
+
}
|
|
139
|
+
/** Events emitted by ToolbarItem. */
|
|
140
|
+
interface ToolbarItemEmits {
|
|
141
|
+
/** Fired after user activation reaches this enabled item. */
|
|
142
|
+
press: [value: string, nativeEvent: MouseEvent];
|
|
143
|
+
}
|
|
144
|
+
/** State exposed to the Toolbar default slot. */
|
|
145
|
+
interface ToolbarSlotState {
|
|
146
|
+
/** Whether the toolbar suppresses every item activation. */
|
|
147
|
+
readonly disabled: boolean;
|
|
148
|
+
/** Directional layout hint used by arrow-key roving focus. */
|
|
149
|
+
readonly orientation: ToolbarOrientation;
|
|
150
|
+
/** Reading direction used by horizontal arrow-key roving focus. */
|
|
151
|
+
readonly dir: ToolbarDirection;
|
|
152
|
+
/** Whether items participate in a single-tabstop roving focus model. */
|
|
153
|
+
readonly rovingFocus: boolean;
|
|
154
|
+
/** Stable state token for styling and tests. */
|
|
155
|
+
readonly state: ToolbarState;
|
|
156
|
+
/** Inline native style object applied to the host. */
|
|
157
|
+
readonly style: ToolbarStyle;
|
|
158
|
+
}
|
|
159
|
+
/** State exposed to a ToolbarItem slot. */
|
|
160
|
+
interface ToolbarItemSlotState {
|
|
161
|
+
/** Item value used by the toolbar navigation and press contract. */
|
|
162
|
+
readonly value: string;
|
|
163
|
+
/** Whether this item or its toolbar suppresses activation. */
|
|
164
|
+
readonly disabled: boolean;
|
|
165
|
+
/** Directional layout hint inherited from the toolbar. */
|
|
166
|
+
readonly orientation: ToolbarOrientation;
|
|
167
|
+
/** Reading direction inherited from the toolbar. */
|
|
168
|
+
readonly dir: ToolbarDirection;
|
|
169
|
+
/** Stable state token for styling and tests. */
|
|
170
|
+
readonly state: ToolbarItemState;
|
|
171
|
+
}
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/families/actions/toolbar/toolbar.vue.d.ts
|
|
174
|
+
type __VLS_Slots$1 = {
|
|
175
|
+
/** Renders grouped action controls with toolbar navigation state. */default(props: ToolbarSlotState): unknown;
|
|
176
|
+
};
|
|
177
|
+
declare function focus$1(options?: FocusOptions): void;
|
|
178
|
+
declare function focusValue(value: string, options?: FocusOptions): boolean;
|
|
179
|
+
declare const __VLS_base$1: import("vue").DefineComponent<ToolbarProps, {
|
|
180
|
+
activeValue: ShallowRef<string | null, string | null>;
|
|
181
|
+
dir: ComputedRef<ToolbarDirection>;
|
|
182
|
+
disabled: ComputedRef<boolean>;
|
|
183
|
+
element: Readonly<ShallowRef<PrimitiveElement | null>>;
|
|
184
|
+
focus: typeof focus$1;
|
|
185
|
+
focusValue: typeof focusValue;
|
|
186
|
+
orientation: ComputedRef<ToolbarOrientation>;
|
|
187
|
+
rovingFocus: ComputedRef<boolean>;
|
|
188
|
+
state: ComputedRef<ToolbarState>;
|
|
189
|
+
style: ComputedRef<ToolbarStyle>;
|
|
190
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
191
|
+
press: (value: string, nativeEvent: MouseEvent) => any;
|
|
192
|
+
}, string, import("vue").PublicProps, Readonly<ToolbarProps> & Readonly<{
|
|
193
|
+
onPress?: (value: string, nativeEvent: MouseEvent) => any;
|
|
194
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
195
|
+
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
196
|
+
declare const _default$1: typeof __VLS_export$1;
|
|
197
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
198
|
+
new (): {
|
|
199
|
+
$slots: S;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/families/actions/toolbar/toolbar-item.vue.d.ts
|
|
204
|
+
type __VLS_Slots = {
|
|
205
|
+
/** Renders item contents with current availability and navigation state. */default(props: ToolbarItemSlotState): unknown;
|
|
206
|
+
};
|
|
207
|
+
declare function focus(options?: FocusOptions): void;
|
|
208
|
+
declare const __VLS_base: import("vue").DefineComponent<ToolbarItemProps, {
|
|
209
|
+
dir: ComputedRef<ToolbarDirection>;
|
|
210
|
+
disabled: ComputedRef<boolean>;
|
|
211
|
+
element: Readonly<import("vue").ShallowRef<PrimitiveElement | null>>;
|
|
212
|
+
focus: typeof focus;
|
|
213
|
+
orientation: ComputedRef<ToolbarOrientation>;
|
|
214
|
+
state: ComputedRef<ToolbarItemState>;
|
|
215
|
+
value: string;
|
|
216
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
217
|
+
press: (value: string, nativeEvent: MouseEvent) => any;
|
|
218
|
+
}, string, import("vue").PublicProps, Readonly<ToolbarItemProps> & Readonly<{
|
|
219
|
+
onPress?: (value: string, nativeEvent: MouseEvent) => any;
|
|
220
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
221
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
222
|
+
declare const _default: typeof __VLS_export;
|
|
223
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
224
|
+
new (): {
|
|
225
|
+
$slots: S;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/families/actions/toolbar/toolbar-contracts.d.ts
|
|
230
|
+
/** Slots exposed by the root Toolbar component. */
|
|
231
|
+
interface ToolbarSlots {
|
|
232
|
+
/** Renders grouped action controls with toolbar navigation state. */
|
|
233
|
+
default(props: ToolbarSlotState): unknown;
|
|
234
|
+
}
|
|
235
|
+
/** Slots exposed by ToolbarItem. */
|
|
236
|
+
interface ToolbarItemSlots {
|
|
237
|
+
/** Renders item contents with current availability and navigation state. */
|
|
238
|
+
default(props: ToolbarItemSlotState): unknown;
|
|
239
|
+
}
|
|
240
|
+
/** Public component instance state exposed by the root Toolbar component. */
|
|
241
|
+
interface ToolbarExpose extends ToolbarSlotState {
|
|
242
|
+
/** Currently active item value, or `null` before an item is focusable. */
|
|
243
|
+
readonly activeValue: string | null;
|
|
244
|
+
/** Rendered root element or component instance. */
|
|
245
|
+
readonly element: PrimitiveElement | null;
|
|
246
|
+
/** Move focus to the active or first enabled item. */
|
|
247
|
+
readonly focus: (options?: FocusOptions) => void;
|
|
248
|
+
/** Move focus to an enabled item by value and report whether it was found. */
|
|
249
|
+
readonly focusValue: (value: string, options?: FocusOptions) => boolean;
|
|
250
|
+
}
|
|
251
|
+
/** Public component instance state exposed by ToolbarItem. */
|
|
252
|
+
interface ToolbarItemExpose extends ToolbarItemSlotState {
|
|
253
|
+
/** Rendered item element or component instance. */
|
|
254
|
+
readonly element: PrimitiveElement | null;
|
|
255
|
+
/** Move focus to the rendered item. */
|
|
256
|
+
readonly focus: (options?: FocusOptions) => void;
|
|
257
|
+
}
|
|
258
|
+
//#endregion
|
|
259
|
+
export { ToolbarPart as _, _default as a, ToolbarState as b, ToolbarDataAttribute as c, ToolbarEmits as d, ToolbarItemEmits as f, ToolbarOrientation as g, ToolbarItemState as h, ToolbarSlots as i, ToolbarDataName as l, ToolbarItemSlotState as m, ToolbarItemExpose as n, _default$1 as o, ToolbarItemProps as p, ToolbarItemSlots as r, ToolbarCssCustomProperty as s, ToolbarExpose as t, ToolbarDirection as u, ToolbarProps as v, ToolbarStyle as x, ToolbarSlotState as y };
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
|
|
2
|
+
import { createContext } from "./context.mjs";
|
|
3
|
+
import { computed, createBlock, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeProps, onUnmounted, openBlock, renderSlot, resolveDynamicComponent, shallowRef, unref, useTemplateRef, watch, withCtx } from "vue";
|
|
4
|
+
//#region src/families/actions/toolbar/toolbar-context.ts
|
|
5
|
+
const toolbarContext = createContext("Toolbar");
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/families/actions/toolbar/toolbar.vue
|
|
8
|
+
var toolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "toolbar",
|
|
10
|
+
props: {
|
|
11
|
+
as: {
|
|
12
|
+
type: null,
|
|
13
|
+
required: false,
|
|
14
|
+
default: "div"
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
required: false,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
orientation: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: false,
|
|
24
|
+
default: "horizontal"
|
|
25
|
+
},
|
|
26
|
+
dir: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: false,
|
|
29
|
+
default: "ltr"
|
|
30
|
+
},
|
|
31
|
+
loop: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
required: false,
|
|
34
|
+
default: true
|
|
35
|
+
},
|
|
36
|
+
rovingFocus: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
required: false,
|
|
39
|
+
default: true
|
|
40
|
+
},
|
|
41
|
+
ariaLabel: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false,
|
|
44
|
+
default: () => void 0
|
|
45
|
+
},
|
|
46
|
+
ariaLabelledby: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: false,
|
|
49
|
+
default: () => void 0
|
|
50
|
+
},
|
|
51
|
+
ariaDescribedby: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: false,
|
|
54
|
+
default: () => void 0
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
emits: ["press"],
|
|
58
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
59
|
+
const emit = __emit;
|
|
60
|
+
const element = useTemplateRef("element");
|
|
61
|
+
const items = /* @__PURE__ */ new Set();
|
|
62
|
+
const activeValue = shallowRef(null);
|
|
63
|
+
const disabledState = computed(() => __props.disabled);
|
|
64
|
+
const orientationState = computed(() => __props.orientation);
|
|
65
|
+
const dirState = computed(() => __props.dir);
|
|
66
|
+
const rovingFocusState = computed(() => __props.rovingFocus);
|
|
67
|
+
const state = computed(() => disabledState.value ? "disabled" : "idle");
|
|
68
|
+
const toolbarStyle = computed(() => ({ "--vize-ui-toolbar-orientation": orientationState.value }));
|
|
69
|
+
const intrinsicProps = computed(() => ({ style: toolbarStyle.value }));
|
|
70
|
+
const slotState = computed(() => ({
|
|
71
|
+
dir: dirState.value,
|
|
72
|
+
disabled: disabledState.value,
|
|
73
|
+
orientation: orientationState.value,
|
|
74
|
+
rovingFocus: rovingFocusState.value,
|
|
75
|
+
state: state.value,
|
|
76
|
+
style: toolbarStyle.value
|
|
77
|
+
}));
|
|
78
|
+
watch([
|
|
79
|
+
disabledState,
|
|
80
|
+
orientationState,
|
|
81
|
+
dirState,
|
|
82
|
+
rovingFocusState
|
|
83
|
+
], () => syncActiveValue(), {
|
|
84
|
+
flush: "post",
|
|
85
|
+
immediate: true
|
|
86
|
+
});
|
|
87
|
+
function getElementNode(target) {
|
|
88
|
+
if (typeof Element !== "undefined" && target instanceof Element) return target;
|
|
89
|
+
if (typeof Element !== "undefined" && target != null && "$el" in target && target.$el instanceof Element) return target.$el;
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
function focusTarget(target, options) {
|
|
93
|
+
const node = getElementNode(target);
|
|
94
|
+
if (typeof HTMLElement !== "undefined" && node instanceof HTMLElement) {
|
|
95
|
+
node.focus(options);
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
if (target != null && "focus" in target && typeof target.focus === "function") {
|
|
99
|
+
target.focus(options);
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
function getOrderedItems() {
|
|
105
|
+
const enabled = [...items].filter((item) => !item.disabled.value);
|
|
106
|
+
const root = getElementNode(element.value);
|
|
107
|
+
if (root === null) return enabled;
|
|
108
|
+
const positions = /* @__PURE__ */ new Map();
|
|
109
|
+
root.querySelectorAll("[data-vize-ui=\"toolbar-item\"]").forEach((node, index) => positions.set(node, index));
|
|
110
|
+
return enabled.sort((left, right) => {
|
|
111
|
+
return (positions.get(getElementNode(left.element.value) ?? root) ?? enabled.length) - (positions.get(getElementNode(right.element.value) ?? root) ?? enabled.length);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function validateItemValue(item) {
|
|
115
|
+
const itemValue = item.value();
|
|
116
|
+
for (const registered of items) if (registered !== item && registered.value() === itemValue) throw new Error("VIZE_UI_TOOLBAR_VALUE_DUPLICATE");
|
|
117
|
+
}
|
|
118
|
+
function syncActiveValue(item) {
|
|
119
|
+
if (item !== void 0) validateItemValue(item);
|
|
120
|
+
if (disabledState.value || !rovingFocusState.value) {
|
|
121
|
+
activeValue.value = null;
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const enabled = getOrderedItems();
|
|
125
|
+
if (enabled.some((candidate) => candidate.value() === activeValue.value)) return;
|
|
126
|
+
activeValue.value = enabled[0]?.value() ?? null;
|
|
127
|
+
}
|
|
128
|
+
function focusItem(item, options) {
|
|
129
|
+
activeValue.value = item.value();
|
|
130
|
+
focusTarget(item.element.value, options);
|
|
131
|
+
}
|
|
132
|
+
function focus(options) {
|
|
133
|
+
syncActiveValue();
|
|
134
|
+
const enabled = getOrderedItems();
|
|
135
|
+
const target = enabled.find((item) => item.value() === activeValue.value) ?? enabled[0];
|
|
136
|
+
if (target !== void 0) focusItem(target, options);
|
|
137
|
+
}
|
|
138
|
+
function focusValue(value, options) {
|
|
139
|
+
const target = getOrderedItems().find((item) => item.value() === value);
|
|
140
|
+
if (target === void 0) return false;
|
|
141
|
+
focusItem(target, options);
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
function moveFocus(fromValue, intent, options) {
|
|
145
|
+
if (disabledState.value || !rovingFocusState.value) return false;
|
|
146
|
+
const enabled = getOrderedItems();
|
|
147
|
+
if (enabled.length === 0) return false;
|
|
148
|
+
const fromIndex = enabled.findIndex((item) => item.value() === fromValue);
|
|
149
|
+
const activeIndex = enabled.findIndex((item) => item.value() === activeValue.value);
|
|
150
|
+
const currentIndex = fromIndex >= 0 ? fromIndex : activeIndex;
|
|
151
|
+
const rawIndex = intent === "first" ? 0 : intent === "last" ? enabled.length - 1 : currentIndex < 0 ? intent === "next" ? 0 : enabled.length - 1 : currentIndex + (intent === "next" ? 1 : -1);
|
|
152
|
+
const target = enabled[__props.loop ? (rawIndex + enabled.length) % enabled.length : rawIndex];
|
|
153
|
+
if (target === void 0) return false;
|
|
154
|
+
focusItem(target, options);
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
function getItemState(itemDisabled) {
|
|
158
|
+
return itemDisabled ? "disabled" : "idle";
|
|
159
|
+
}
|
|
160
|
+
function registerItem(item) {
|
|
161
|
+
validateItemValue(item);
|
|
162
|
+
items.add(item);
|
|
163
|
+
syncActiveValue();
|
|
164
|
+
nextTick(syncActiveValue);
|
|
165
|
+
return () => {
|
|
166
|
+
const removedValue = item.value();
|
|
167
|
+
items.delete(item);
|
|
168
|
+
if (activeValue.value === removedValue) activeValue.value = null;
|
|
169
|
+
syncActiveValue();
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function requestItemPress(value, nativeEvent) {
|
|
173
|
+
if (!disabledState.value) emit("press", value, nativeEvent);
|
|
174
|
+
}
|
|
175
|
+
function setActiveValue(value) {
|
|
176
|
+
if (!disabledState.value) activeValue.value = value;
|
|
177
|
+
}
|
|
178
|
+
toolbarContext.provide({
|
|
179
|
+
activeValue,
|
|
180
|
+
dir: dirState,
|
|
181
|
+
disabled: disabledState,
|
|
182
|
+
getItemState,
|
|
183
|
+
moveFocus,
|
|
184
|
+
orientation: orientationState,
|
|
185
|
+
registerItem,
|
|
186
|
+
requestItemPress,
|
|
187
|
+
rovingFocus: rovingFocusState,
|
|
188
|
+
setActiveValue,
|
|
189
|
+
state,
|
|
190
|
+
syncActiveValue
|
|
191
|
+
});
|
|
192
|
+
__expose({
|
|
193
|
+
activeValue,
|
|
194
|
+
dir: dirState,
|
|
195
|
+
disabled: disabledState,
|
|
196
|
+
element,
|
|
197
|
+
focus,
|
|
198
|
+
focusValue,
|
|
199
|
+
orientation: orientationState,
|
|
200
|
+
rovingFocus: rovingFocusState,
|
|
201
|
+
state,
|
|
202
|
+
style: toolbarStyle
|
|
203
|
+
});
|
|
204
|
+
return (_ctx, _cache) => {
|
|
205
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps({
|
|
206
|
+
ref_key: "element",
|
|
207
|
+
ref: element,
|
|
208
|
+
role: "toolbar",
|
|
209
|
+
"aria-label": __props.ariaLabel,
|
|
210
|
+
"aria-labelledby": __props.ariaLabelledby,
|
|
211
|
+
"aria-describedby": __props.ariaDescribedby,
|
|
212
|
+
"aria-orientation": orientationState.value,
|
|
213
|
+
"aria-disabled": disabledState.value ? "true" : void 0,
|
|
214
|
+
dir: dirState.value,
|
|
215
|
+
"data-vize-ui": "toolbar",
|
|
216
|
+
part: "root",
|
|
217
|
+
"data-state": state.value,
|
|
218
|
+
"data-disabled": disabledState.value ? "true" : void 0,
|
|
219
|
+
"data-orientation": orientationState.value,
|
|
220
|
+
"data-roving-focus": rovingFocusState.value ? "true" : void 0
|
|
221
|
+
}, intrinsicProps.value), {
|
|
222
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotState.value)), void 0, true)]),
|
|
223
|
+
_: 3
|
|
224
|
+
}, 16, [
|
|
225
|
+
"aria-label",
|
|
226
|
+
"aria-labelledby",
|
|
227
|
+
"aria-describedby",
|
|
228
|
+
"aria-orientation",
|
|
229
|
+
"aria-disabled",
|
|
230
|
+
"dir",
|
|
231
|
+
"data-state",
|
|
232
|
+
"data-disabled",
|
|
233
|
+
"data-orientation",
|
|
234
|
+
"data-roving-focus"
|
|
235
|
+
]);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}), [["__scopeId", "data-v-4789b6ea"]]);
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/families/actions/toolbar/toolbar-item.vue
|
|
241
|
+
var toolbar_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
242
|
+
__name: "toolbar-item",
|
|
243
|
+
props: {
|
|
244
|
+
as: {
|
|
245
|
+
type: null,
|
|
246
|
+
required: false,
|
|
247
|
+
default: "button"
|
|
248
|
+
},
|
|
249
|
+
native: {
|
|
250
|
+
type: Boolean,
|
|
251
|
+
required: false,
|
|
252
|
+
default: () => void 0
|
|
253
|
+
},
|
|
254
|
+
type: {
|
|
255
|
+
type: String,
|
|
256
|
+
required: false,
|
|
257
|
+
default: "button"
|
|
258
|
+
},
|
|
259
|
+
value: {
|
|
260
|
+
type: String,
|
|
261
|
+
required: true
|
|
262
|
+
},
|
|
263
|
+
disabled: {
|
|
264
|
+
type: Boolean,
|
|
265
|
+
required: false,
|
|
266
|
+
default: false
|
|
267
|
+
},
|
|
268
|
+
ariaLabel: {
|
|
269
|
+
type: String,
|
|
270
|
+
required: false,
|
|
271
|
+
default: () => void 0
|
|
272
|
+
},
|
|
273
|
+
ariaLabelledby: {
|
|
274
|
+
type: String,
|
|
275
|
+
required: false,
|
|
276
|
+
default: () => void 0
|
|
277
|
+
},
|
|
278
|
+
ariaDescribedby: {
|
|
279
|
+
type: String,
|
|
280
|
+
required: false,
|
|
281
|
+
default: () => void 0
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
emits: ["press"],
|
|
285
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
286
|
+
function getToolbarKeyboardAction(key, phase) {
|
|
287
|
+
if (key === "Enter") return phase === "keydown" ? "activate" : "ignore";
|
|
288
|
+
if (key === " ") return phase === "keydown" ? "prevent" : "activate";
|
|
289
|
+
return "ignore";
|
|
290
|
+
}
|
|
291
|
+
const emit = __emit;
|
|
292
|
+
const context = toolbarContext.use();
|
|
293
|
+
const element = useTemplateRef("element");
|
|
294
|
+
const isNativeButton = computed(() => __props.native ?? __props.as === "button");
|
|
295
|
+
const itemDisabled = computed(() => context.disabled.value || __props.disabled);
|
|
296
|
+
const itemState = computed(() => context.getItemState(itemDisabled.value));
|
|
297
|
+
const tabIndex = computed(() => {
|
|
298
|
+
if (itemDisabled.value) return isNativeButton.value ? void 0 : -1;
|
|
299
|
+
if (!context.rovingFocus.value) return isNativeButton.value ? void 0 : 0;
|
|
300
|
+
return context.activeValue.value === __props.value ? 0 : -1;
|
|
301
|
+
});
|
|
302
|
+
const slotState = computed(() => ({
|
|
303
|
+
dir: context.dir.value,
|
|
304
|
+
disabled: itemDisabled.value,
|
|
305
|
+
orientation: context.orientation.value,
|
|
306
|
+
state: itemState.value,
|
|
307
|
+
value: __props.value
|
|
308
|
+
}));
|
|
309
|
+
const registration = {
|
|
310
|
+
disabled: itemDisabled,
|
|
311
|
+
element,
|
|
312
|
+
value: () => __props.value
|
|
313
|
+
};
|
|
314
|
+
const unregister = context.registerItem(registration);
|
|
315
|
+
watch([itemDisabled, () => __props.value], () => context.syncActiveValue(registration), { flush: "sync" });
|
|
316
|
+
onUnmounted(unregister);
|
|
317
|
+
function onClick(event) {
|
|
318
|
+
if (itemDisabled.value) {
|
|
319
|
+
event.preventDefault();
|
|
320
|
+
event.stopImmediatePropagation();
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
context.requestItemPress(__props.value, event);
|
|
324
|
+
emit("press", __props.value, event);
|
|
325
|
+
}
|
|
326
|
+
function onFocus() {
|
|
327
|
+
if (!itemDisabled.value) context.setActiveValue(__props.value);
|
|
328
|
+
}
|
|
329
|
+
function getNavigationIntent(key) {
|
|
330
|
+
if (key === "Home") return "first";
|
|
331
|
+
if (key === "End") return "last";
|
|
332
|
+
if (context.orientation.value === "horizontal") {
|
|
333
|
+
const nextKey = context.dir.value === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
334
|
+
const previousKey = context.dir.value === "rtl" ? "ArrowRight" : "ArrowLeft";
|
|
335
|
+
if (key === nextKey) return "next";
|
|
336
|
+
if (key === previousKey) return "previous";
|
|
337
|
+
} else {
|
|
338
|
+
if (key === "ArrowDown") return "next";
|
|
339
|
+
if (key === "ArrowUp") return "previous";
|
|
340
|
+
}
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
343
|
+
function onKeyboard(event, phase) {
|
|
344
|
+
if (phase === "keydown") {
|
|
345
|
+
const intent = getNavigationIntent(event.key);
|
|
346
|
+
if (intent !== null && context.moveFocus(__props.value, intent)) {
|
|
347
|
+
event.preventDefault();
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (isNativeButton.value) return;
|
|
352
|
+
const action = getToolbarKeyboardAction(event.key, phase);
|
|
353
|
+
if (action === "ignore") return;
|
|
354
|
+
event.preventDefault();
|
|
355
|
+
if (itemDisabled.value) {
|
|
356
|
+
event.stopImmediatePropagation();
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
if (action === "activate" && event.currentTarget instanceof HTMLElement) event.currentTarget.click();
|
|
360
|
+
}
|
|
361
|
+
function onKeydown(event) {
|
|
362
|
+
onKeyboard(event, "keydown");
|
|
363
|
+
}
|
|
364
|
+
function onKeyup(event) {
|
|
365
|
+
onKeyboard(event, "keyup");
|
|
366
|
+
}
|
|
367
|
+
function focusTarget(target, options) {
|
|
368
|
+
if (typeof target === "object" && target !== null && "focus" in target && typeof target.focus === "function") target.focus(options);
|
|
369
|
+
}
|
|
370
|
+
function focus(options) {
|
|
371
|
+
focusTarget(element.value, options);
|
|
372
|
+
}
|
|
373
|
+
__expose({
|
|
374
|
+
dir: computed(() => context.dir.value),
|
|
375
|
+
disabled: itemDisabled,
|
|
376
|
+
element,
|
|
377
|
+
focus,
|
|
378
|
+
orientation: computed(() => context.orientation.value),
|
|
379
|
+
state: itemState,
|
|
380
|
+
value: __props.value
|
|
381
|
+
});
|
|
382
|
+
return (_ctx, _cache) => {
|
|
383
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
384
|
+
ref_key: "element",
|
|
385
|
+
ref: element,
|
|
386
|
+
type: isNativeButton.value ? __props.type : void 0,
|
|
387
|
+
disabled: isNativeButton.value ? itemDisabled.value : void 0,
|
|
388
|
+
role: isNativeButton.value ? void 0 : "button",
|
|
389
|
+
tabindex: tabIndex.value,
|
|
390
|
+
"aria-label": __props.ariaLabel,
|
|
391
|
+
"aria-labelledby": __props.ariaLabelledby,
|
|
392
|
+
"aria-describedby": __props.ariaDescribedby,
|
|
393
|
+
"aria-disabled": itemDisabled.value && !isNativeButton.value ? "true" : void 0,
|
|
394
|
+
"data-vize-ui": "toolbar-item",
|
|
395
|
+
part: "item",
|
|
396
|
+
"data-state": itemState.value,
|
|
397
|
+
"data-disabled": itemDisabled.value ? "true" : void 0,
|
|
398
|
+
"data-orientation": unref(context).orientation.value,
|
|
399
|
+
"data-value": __props.value,
|
|
400
|
+
onClick,
|
|
401
|
+
onFocus,
|
|
402
|
+
onKeydown,
|
|
403
|
+
onKeyup
|
|
404
|
+
}, {
|
|
405
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotState.value)), void 0, true)]),
|
|
406
|
+
_: 3
|
|
407
|
+
}, 40, [
|
|
408
|
+
"type",
|
|
409
|
+
"disabled",
|
|
410
|
+
"role",
|
|
411
|
+
"tabindex",
|
|
412
|
+
"aria-label",
|
|
413
|
+
"aria-labelledby",
|
|
414
|
+
"aria-describedby",
|
|
415
|
+
"aria-disabled",
|
|
416
|
+
"data-state",
|
|
417
|
+
"data-disabled",
|
|
418
|
+
"data-orientation",
|
|
419
|
+
"data-value"
|
|
420
|
+
]);
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
}), [["__scopeId", "data-v-cf547e8d"]]);
|
|
424
|
+
//#endregion
|
|
425
|
+
export { toolbar_default as n, toolbar_item_default as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { _ as ToolbarPart, a as _default$1, b as ToolbarState, c as ToolbarDataAttribute, d as ToolbarEmits, f as ToolbarItemEmits, g as ToolbarOrientation, h as ToolbarItemState, i as ToolbarSlots, l as ToolbarDataName, m as ToolbarItemSlotState, n as ToolbarItemExpose, o as _default, p as ToolbarItemProps, r as ToolbarItemSlots, s as ToolbarCssCustomProperty, t as ToolbarExpose, u as ToolbarDirection, v as ToolbarProps, x as ToolbarStyle, y as ToolbarSlotState } from "./toolbar-CIU1bor0.mjs";
|
|
2
|
+
export { _default as Toolbar, type ToolbarCssCustomProperty, type ToolbarDataAttribute, type ToolbarDataName, type ToolbarDirection, type ToolbarEmits, type ToolbarExpose, _default$1 as ToolbarItem, type ToolbarItemEmits, type ToolbarItemExpose, type ToolbarItemProps, type ToolbarItemSlotState, type ToolbarItemSlots, type ToolbarItemState, type ToolbarOrientation, type ToolbarPart, type ToolbarProps, type ToolbarSlotState, type ToolbarSlots, type ToolbarState, type ToolbarStyle };
|
package/dist/toolbar.mjs
ADDED