@vizejs/ui 0.386.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,549 @@
|
|
|
1
|
+
import { a as useDeterministicId } from "./deterministic-id-yMq4HfmS.mjs";
|
|
2
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
|
|
3
|
+
import { createContext } from "./context.mjs";
|
|
4
|
+
import { t as createCollectionRegistry } from "./collection-Cncgrq4U.mjs";
|
|
5
|
+
import { t as createCompositeNavigation } from "./composite-navigation-D6WKS_BY.mjs";
|
|
6
|
+
import { useControllableState } from "./controllable-state.mjs";
|
|
7
|
+
import { computed, createCommentVNode, createElementBlock, defineComponent, guardReactiveProps, mergeProps, normalizeProps, onUnmounted, openBlock, renderSlot, unref, useTemplateRef, watch } from "vue";
|
|
8
|
+
//#region src/families/selection/listbox/listbox-context.ts
|
|
9
|
+
const listboxContext = createContext("Listbox");
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/families/selection/listbox/listbox-value.ts
|
|
12
|
+
const valueDiagnostic = "VIZE_UI_LISTBOX_VALUE";
|
|
13
|
+
/** Normalize consumer-owned values to the active Listbox selection model. */
|
|
14
|
+
function normalizeListboxValue(value, selectionMode) {
|
|
15
|
+
if (selectionMode === "multiple") return uniqueValues(value);
|
|
16
|
+
if (isListboxMultipleValue(value)) return value[0] ?? null;
|
|
17
|
+
if (value === void 0) return null;
|
|
18
|
+
if (value === null || typeof value === "string") return value;
|
|
19
|
+
throw new TypeError(`${valueDiagnostic}: single selection values must be strings or null`);
|
|
20
|
+
}
|
|
21
|
+
/** Return selected values as a stable readonly array. */
|
|
22
|
+
function listboxSelectedValues(value) {
|
|
23
|
+
if (isListboxMultipleValue(value)) return Object.freeze([...value]);
|
|
24
|
+
return value === null ? Object.freeze([]) : Object.freeze([value]);
|
|
25
|
+
}
|
|
26
|
+
/** Return whether two normalized Listbox values represent the same selection. */
|
|
27
|
+
function areListboxValuesEqual(left, right) {
|
|
28
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
29
|
+
const leftValues = listboxSelectedValues(left);
|
|
30
|
+
const rightValues = listboxSelectedValues(right);
|
|
31
|
+
return leftValues.length === rightValues.length && leftValues.every((value, index) => value === rightValues[index]);
|
|
32
|
+
}
|
|
33
|
+
return Object.is(left, right);
|
|
34
|
+
}
|
|
35
|
+
/** Return a value with the option selected under the current model. */
|
|
36
|
+
function selectListboxValue(current, value, selectionMode) {
|
|
37
|
+
if (selectionMode === "single") return value;
|
|
38
|
+
const values = listboxSelectedValues(current);
|
|
39
|
+
return values.includes(value) ? values : Object.freeze([...values, value]);
|
|
40
|
+
}
|
|
41
|
+
/** Return a value with the option toggled under the current model. */
|
|
42
|
+
function toggleListboxValue(current, value, selectionMode) {
|
|
43
|
+
if (selectionMode === "single") return value;
|
|
44
|
+
const values = listboxSelectedValues(current);
|
|
45
|
+
return values.includes(value) ? Object.freeze(values.filter((candidate) => candidate !== value)) : Object.freeze([...values, value]);
|
|
46
|
+
}
|
|
47
|
+
/** Empty value for the current Listbox selection model. */
|
|
48
|
+
function emptyListboxValue(selectionMode) {
|
|
49
|
+
return selectionMode === "multiple" ? Object.freeze([]) : null;
|
|
50
|
+
}
|
|
51
|
+
function uniqueValues(value) {
|
|
52
|
+
const values = isListboxMultipleValue(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
53
|
+
const unique = [];
|
|
54
|
+
for (const item of values) {
|
|
55
|
+
if (typeof item !== "string") throw new TypeError(`${valueDiagnostic}: multiple selection values must be strings`);
|
|
56
|
+
if (!unique.includes(item)) unique.push(item);
|
|
57
|
+
}
|
|
58
|
+
return Object.freeze(unique);
|
|
59
|
+
}
|
|
60
|
+
function isListboxMultipleValue(value) {
|
|
61
|
+
return Array.isArray(value);
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/families/selection/listbox/listbox.vue?vue&type=script&setup=true&lang.ts
|
|
65
|
+
const _hoisted_1$1 = [
|
|
66
|
+
"id",
|
|
67
|
+
"aria-activedescendant",
|
|
68
|
+
"aria-label",
|
|
69
|
+
"aria-labelledby",
|
|
70
|
+
"aria-describedby",
|
|
71
|
+
"aria-orientation",
|
|
72
|
+
"aria-multiselectable",
|
|
73
|
+
"aria-errormessage",
|
|
74
|
+
"aria-invalid",
|
|
75
|
+
"aria-disabled",
|
|
76
|
+
"aria-required",
|
|
77
|
+
"data-state",
|
|
78
|
+
"data-disabled",
|
|
79
|
+
"data-required",
|
|
80
|
+
"data-invalid",
|
|
81
|
+
"data-orientation",
|
|
82
|
+
"data-selection-mode",
|
|
83
|
+
"data-selection-count",
|
|
84
|
+
"data-value"
|
|
85
|
+
];
|
|
86
|
+
const listboxRole = "listbox";
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/families/selection/listbox/listbox.vue
|
|
89
|
+
var listbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
90
|
+
__name: "listbox",
|
|
91
|
+
props: {
|
|
92
|
+
id: {
|
|
93
|
+
type: [String, null],
|
|
94
|
+
required: false,
|
|
95
|
+
default: () => void 0
|
|
96
|
+
},
|
|
97
|
+
modelValue: {
|
|
98
|
+
type: [
|
|
99
|
+
String,
|
|
100
|
+
null,
|
|
101
|
+
Array
|
|
102
|
+
],
|
|
103
|
+
required: false,
|
|
104
|
+
default: () => void 0
|
|
105
|
+
},
|
|
106
|
+
defaultValue: {
|
|
107
|
+
type: [
|
|
108
|
+
String,
|
|
109
|
+
null,
|
|
110
|
+
Array
|
|
111
|
+
],
|
|
112
|
+
required: false,
|
|
113
|
+
default: () => void 0
|
|
114
|
+
},
|
|
115
|
+
disabled: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
required: false,
|
|
118
|
+
default: false
|
|
119
|
+
},
|
|
120
|
+
required: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
required: false,
|
|
123
|
+
default: false
|
|
124
|
+
},
|
|
125
|
+
selectionMode: {
|
|
126
|
+
type: String,
|
|
127
|
+
required: false,
|
|
128
|
+
default: "single"
|
|
129
|
+
},
|
|
130
|
+
orientation: {
|
|
131
|
+
type: String,
|
|
132
|
+
required: false,
|
|
133
|
+
default: "vertical"
|
|
134
|
+
},
|
|
135
|
+
direction: {
|
|
136
|
+
type: String,
|
|
137
|
+
required: false,
|
|
138
|
+
default: "ltr"
|
|
139
|
+
},
|
|
140
|
+
loop: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
required: false,
|
|
143
|
+
default: false
|
|
144
|
+
},
|
|
145
|
+
typeahead: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
required: false,
|
|
148
|
+
default: true
|
|
149
|
+
},
|
|
150
|
+
typeaheadTimeout: {
|
|
151
|
+
type: Number,
|
|
152
|
+
required: false,
|
|
153
|
+
default: 500
|
|
154
|
+
},
|
|
155
|
+
ariaLabel: {
|
|
156
|
+
type: String,
|
|
157
|
+
required: false,
|
|
158
|
+
default: () => void 0
|
|
159
|
+
},
|
|
160
|
+
ariaLabelledby: {
|
|
161
|
+
type: String,
|
|
162
|
+
required: false,
|
|
163
|
+
default: () => void 0
|
|
164
|
+
},
|
|
165
|
+
ariaDescribedby: {
|
|
166
|
+
type: String,
|
|
167
|
+
required: false,
|
|
168
|
+
default: () => void 0
|
|
169
|
+
},
|
|
170
|
+
ariaErrormessage: {
|
|
171
|
+
type: String,
|
|
172
|
+
required: false,
|
|
173
|
+
default: () => void 0
|
|
174
|
+
},
|
|
175
|
+
ariaInvalid: {
|
|
176
|
+
type: [Boolean, String],
|
|
177
|
+
required: false,
|
|
178
|
+
default: false
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
emits: ["update:modelValue", "change"],
|
|
182
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
183
|
+
const emit = __emit;
|
|
184
|
+
const element = useTemplateRef("element");
|
|
185
|
+
const listboxId = useDeterministicId({
|
|
186
|
+
id: () => __props.id,
|
|
187
|
+
hint: "listbox"
|
|
188
|
+
});
|
|
189
|
+
const disabledState = computed(() => __props.disabled);
|
|
190
|
+
const requiredState = computed(() => __props.required);
|
|
191
|
+
const selectionModeState = computed(() => __props.selectionMode);
|
|
192
|
+
const orientationState = computed(() => __props.orientation);
|
|
193
|
+
const directionState = computed(() => __props.direction);
|
|
194
|
+
const valueState = useControllableState({
|
|
195
|
+
value: () => __props.modelValue === void 0 ? void 0 : normalizeListboxValue(__props.modelValue, selectionModeState.value),
|
|
196
|
+
defaultValue: () => normalizeListboxValue(__props.defaultValue, selectionModeState.value),
|
|
197
|
+
equals: areListboxValuesEqual,
|
|
198
|
+
onChange: (value) => emit("update:modelValue", value)
|
|
199
|
+
});
|
|
200
|
+
const selectedValue = computed(() => normalizeListboxValue(valueState.value.value, selectionModeState.value));
|
|
201
|
+
const selectedValues = computed(() => listboxSelectedValues(selectedValue.value));
|
|
202
|
+
const selectedSet = computed(() => new Set(selectedValues.value));
|
|
203
|
+
const ariaInvalidValue = computed(() => {
|
|
204
|
+
if (__props.ariaInvalid === false) return void 0;
|
|
205
|
+
return __props.ariaInvalid === true ? "true" : __props.ariaInvalid;
|
|
206
|
+
});
|
|
207
|
+
const invalid = computed(() => ariaInvalidValue.value !== void 0);
|
|
208
|
+
const registry = createCollectionRegistry();
|
|
209
|
+
const navigation = createCompositeNavigation({
|
|
210
|
+
registry,
|
|
211
|
+
focusStrategy: "active-descendant",
|
|
212
|
+
getItemId: ({ value }) => value.id.value,
|
|
213
|
+
isDisabled: disabledState,
|
|
214
|
+
orientation: orientationState,
|
|
215
|
+
direction: directionState,
|
|
216
|
+
loop: () => __props.loop,
|
|
217
|
+
typeahead: {
|
|
218
|
+
isDisabled: () => !__props.typeahead,
|
|
219
|
+
timeout: () => __props.typeaheadTimeout
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
const activeValue = computed(() => registry.activeKey.value ?? registry.navigableItems.value[0]?.key ?? null);
|
|
223
|
+
const state = computed(() => {
|
|
224
|
+
if (disabledState.value) return "disabled";
|
|
225
|
+
return selectedValues.value.length === 0 ? "empty" : "selected";
|
|
226
|
+
});
|
|
227
|
+
const slotState = computed(() => ({
|
|
228
|
+
activeValue: activeValue.value,
|
|
229
|
+
direction: directionState.value,
|
|
230
|
+
disabled: disabledState.value,
|
|
231
|
+
invalid: invalid.value,
|
|
232
|
+
orientation: orientationState.value,
|
|
233
|
+
required: requiredState.value,
|
|
234
|
+
selectedValues: selectedValues.value,
|
|
235
|
+
selectionMode: selectionModeState.value,
|
|
236
|
+
state: state.value,
|
|
237
|
+
value: selectedValue.value
|
|
238
|
+
}));
|
|
239
|
+
const containerProps = computed(() => navigation.getContainerProps());
|
|
240
|
+
const listboxActiveDescendant = computed(() => disabledState.value ? void 0 : containerProps.value["aria-activedescendant"]);
|
|
241
|
+
const listboxTabindex = computed(() => disabledState.value ? void 0 : containerProps.value.tabindex);
|
|
242
|
+
const listboxInteractiveProps = computed(() => ({
|
|
243
|
+
role: listboxRole,
|
|
244
|
+
...listboxTabindex.value === void 0 ? {} : { tabindex: listboxTabindex.value },
|
|
245
|
+
onFocus,
|
|
246
|
+
onKeydown
|
|
247
|
+
}));
|
|
248
|
+
const selectionCount = computed(() => selectedValues.value.length);
|
|
249
|
+
const dataValue = computed(() => selectedValues.value.length === 1 ? selectedValues.value[0] : void 0);
|
|
250
|
+
watch([selectedSet, registry.navigableItems], () => {
|
|
251
|
+
if (disabledState.value || registry.activeKey.value !== null) return;
|
|
252
|
+
const selected = registry.navigableItems.value.find((item) => selectedSet.value.has(item.key));
|
|
253
|
+
if (selected !== void 0) registry.setActiveKey(selected.key);
|
|
254
|
+
}, {
|
|
255
|
+
flush: "sync",
|
|
256
|
+
immediate: true
|
|
257
|
+
});
|
|
258
|
+
function commitSelection(next, nativeEvent) {
|
|
259
|
+
const normalized = normalizeListboxValue(next, selectionModeState.value);
|
|
260
|
+
let previous = emptyListboxValue(selectionModeState.value);
|
|
261
|
+
const changed = valueState.set((current) => {
|
|
262
|
+
previous = current;
|
|
263
|
+
return normalized;
|
|
264
|
+
});
|
|
265
|
+
if (changed && nativeEvent !== null) emit("change", normalized, previous, nativeEvent);
|
|
266
|
+
return changed;
|
|
267
|
+
}
|
|
268
|
+
function setValue(next) {
|
|
269
|
+
return commitSelection(next, null);
|
|
270
|
+
}
|
|
271
|
+
function selectValue(next, nativeEvent = null) {
|
|
272
|
+
return commitSelection(selectListboxValue(selectedValue.value, next, selectionModeState.value), nativeEvent);
|
|
273
|
+
}
|
|
274
|
+
function toggleValue(next, nativeEvent = null) {
|
|
275
|
+
return commitSelection(toggleListboxValue(selectedValue.value, next, selectionModeState.value), nativeEvent);
|
|
276
|
+
}
|
|
277
|
+
function clear() {
|
|
278
|
+
return commitSelection(emptyListboxValue(selectionModeState.value), null);
|
|
279
|
+
}
|
|
280
|
+
function setActiveValue(next) {
|
|
281
|
+
if (disabledState.value) return false;
|
|
282
|
+
if (next !== null && !registry.navigableItems.value.some((item) => item.key === next)) return false;
|
|
283
|
+
return registry.setActiveKey(next);
|
|
284
|
+
}
|
|
285
|
+
function focus(options) {
|
|
286
|
+
element.value?.focus(options);
|
|
287
|
+
}
|
|
288
|
+
function navigate(command, nativeEvent = null) {
|
|
289
|
+
return navigation.navigate(command, nativeEvent);
|
|
290
|
+
}
|
|
291
|
+
function commitActiveSelection(next, nativeEvent) {
|
|
292
|
+
if (next === null) return false;
|
|
293
|
+
if (selectionModeState.value === "multiple") toggleValue(next, nativeEvent);
|
|
294
|
+
else selectValue(next, nativeEvent);
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
function onFocus(event) {
|
|
298
|
+
containerProps.value.onFocus(event);
|
|
299
|
+
}
|
|
300
|
+
function onKeydown(event) {
|
|
301
|
+
if (!event.defaultPrevented && !disabledState.value && event.target === event.currentTarget && (event.key === "Enter" || event.key === " ")) {
|
|
302
|
+
if (commitActiveSelection(activeValue.value, event)) event.preventDefault();
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
containerProps.value.onKeydown(event);
|
|
306
|
+
}
|
|
307
|
+
const context = listboxContext.provide({
|
|
308
|
+
activeValue,
|
|
309
|
+
direction: directionState,
|
|
310
|
+
disabled: disabledState,
|
|
311
|
+
focus,
|
|
312
|
+
getItemProps: (value) => navigation.getItemProps(value),
|
|
313
|
+
id: listboxId,
|
|
314
|
+
invalid,
|
|
315
|
+
orientation: orientationState,
|
|
316
|
+
registerItem: ({ value, id, element, textValue, disabled, order }) => registry.register({
|
|
317
|
+
key: value,
|
|
318
|
+
value: {
|
|
319
|
+
id,
|
|
320
|
+
value
|
|
321
|
+
},
|
|
322
|
+
element,
|
|
323
|
+
textValue,
|
|
324
|
+
disabled,
|
|
325
|
+
order
|
|
326
|
+
}),
|
|
327
|
+
required: requiredState,
|
|
328
|
+
selectedValues: selectedSet,
|
|
329
|
+
selectionMode: selectionModeState,
|
|
330
|
+
selectValue,
|
|
331
|
+
setActiveValue,
|
|
332
|
+
state,
|
|
333
|
+
toggleValue,
|
|
334
|
+
value: selectedValue
|
|
335
|
+
});
|
|
336
|
+
__expose({
|
|
337
|
+
activeValue,
|
|
338
|
+
clear,
|
|
339
|
+
direction: directionState,
|
|
340
|
+
disabled: disabledState,
|
|
341
|
+
element,
|
|
342
|
+
focus,
|
|
343
|
+
id: listboxId,
|
|
344
|
+
invalid,
|
|
345
|
+
navigate,
|
|
346
|
+
orientation: orientationState,
|
|
347
|
+
required: requiredState,
|
|
348
|
+
reset: valueState.reset,
|
|
349
|
+
selectValue,
|
|
350
|
+
selectedValues,
|
|
351
|
+
selectionMode: selectionModeState,
|
|
352
|
+
setActiveValue,
|
|
353
|
+
setValue,
|
|
354
|
+
state,
|
|
355
|
+
toggleValue,
|
|
356
|
+
value: selectedValue
|
|
357
|
+
});
|
|
358
|
+
return (_ctx, _cache) => {
|
|
359
|
+
return openBlock(), createElementBlock("div", mergeProps(listboxInteractiveProps.value, {
|
|
360
|
+
id: unref(context).id.value,
|
|
361
|
+
ref_key: "element",
|
|
362
|
+
ref: element,
|
|
363
|
+
"aria-activedescendant": listboxActiveDescendant.value,
|
|
364
|
+
"aria-label": __props.ariaLabel,
|
|
365
|
+
"aria-labelledby": __props.ariaLabelledby,
|
|
366
|
+
"aria-describedby": __props.ariaDescribedby,
|
|
367
|
+
"aria-orientation": orientationState.value,
|
|
368
|
+
"aria-multiselectable": selectionModeState.value === "multiple" ? "true" : void 0,
|
|
369
|
+
"aria-errormessage": ariaInvalidValue.value === void 0 ? void 0 : __props.ariaErrormessage,
|
|
370
|
+
"aria-invalid": ariaInvalidValue.value,
|
|
371
|
+
"aria-disabled": disabledState.value ? "true" : void 0,
|
|
372
|
+
"aria-required": requiredState.value ? "true" : void 0,
|
|
373
|
+
"data-vize-ui": "listbox",
|
|
374
|
+
part: "root",
|
|
375
|
+
"data-state": state.value,
|
|
376
|
+
"data-disabled": disabledState.value ? "true" : void 0,
|
|
377
|
+
"data-required": requiredState.value ? "true" : void 0,
|
|
378
|
+
"data-invalid": invalid.value ? "true" : void 0,
|
|
379
|
+
"data-orientation": orientationState.value,
|
|
380
|
+
"data-selection-mode": selectionModeState.value,
|
|
381
|
+
"data-selection-count": selectionCount.value,
|
|
382
|
+
"data-value": dataValue.value
|
|
383
|
+
}), [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotState.value)), void 0, true), unref(registry).items.value.length === 0 ? renderSlot(_ctx.$slots, "empty", normalizeProps(mergeProps({ key: 0 }, slotState.value)), void 0, true) : createCommentVNode("v-if", true)], 16, _hoisted_1$1);
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
}), [["__scopeId", "data-v-6e020058"]]);
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/families/selection/listbox/listbox-item.vue?vue&type=script&setup=true&lang.ts
|
|
389
|
+
const _hoisted_1 = [
|
|
390
|
+
"id",
|
|
391
|
+
"aria-selected",
|
|
392
|
+
"aria-disabled",
|
|
393
|
+
"aria-label",
|
|
394
|
+
"aria-labelledby",
|
|
395
|
+
"aria-describedby",
|
|
396
|
+
"data-state",
|
|
397
|
+
"data-value",
|
|
398
|
+
"data-selected",
|
|
399
|
+
"data-active",
|
|
400
|
+
"data-disabled",
|
|
401
|
+
"data-selection-mode"
|
|
402
|
+
];
|
|
403
|
+
const optionRole = "option";
|
|
404
|
+
//#endregion
|
|
405
|
+
//#region src/families/selection/listbox/listbox-item.vue
|
|
406
|
+
var listbox_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
407
|
+
__name: "listbox-item",
|
|
408
|
+
props: {
|
|
409
|
+
id: {
|
|
410
|
+
type: [String, null],
|
|
411
|
+
required: false,
|
|
412
|
+
default: () => void 0
|
|
413
|
+
},
|
|
414
|
+
value: {
|
|
415
|
+
type: String,
|
|
416
|
+
required: true
|
|
417
|
+
},
|
|
418
|
+
disabled: {
|
|
419
|
+
type: Boolean,
|
|
420
|
+
required: false,
|
|
421
|
+
default: false
|
|
422
|
+
},
|
|
423
|
+
textValue: {
|
|
424
|
+
type: [String, null],
|
|
425
|
+
required: false,
|
|
426
|
+
default: () => void 0
|
|
427
|
+
},
|
|
428
|
+
order: {
|
|
429
|
+
type: Number,
|
|
430
|
+
required: false,
|
|
431
|
+
default: () => void 0
|
|
432
|
+
},
|
|
433
|
+
ariaLabel: {
|
|
434
|
+
type: String,
|
|
435
|
+
required: false,
|
|
436
|
+
default: () => void 0
|
|
437
|
+
},
|
|
438
|
+
ariaLabelledby: {
|
|
439
|
+
type: String,
|
|
440
|
+
required: false,
|
|
441
|
+
default: () => void 0
|
|
442
|
+
},
|
|
443
|
+
ariaDescribedby: {
|
|
444
|
+
type: String,
|
|
445
|
+
required: false,
|
|
446
|
+
default: () => void 0
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
setup(__props, { expose: __expose }) {
|
|
450
|
+
const context = listboxContext.use();
|
|
451
|
+
const element = useTemplateRef("element");
|
|
452
|
+
const optionId = useDeterministicId({
|
|
453
|
+
id: () => __props.id,
|
|
454
|
+
hint: "listbox-option"
|
|
455
|
+
});
|
|
456
|
+
const itemDisabled = computed(() => context.disabled.value || __props.disabled);
|
|
457
|
+
const selected = computed(() => context.selectedValues.value.has(__props.value));
|
|
458
|
+
const active = computed(() => context.activeValue.value === __props.value && !itemDisabled.value);
|
|
459
|
+
const itemState = computed(() => {
|
|
460
|
+
if (itemDisabled.value) return "disabled";
|
|
461
|
+
return selected.value ? "selected" : "unselected";
|
|
462
|
+
});
|
|
463
|
+
const itemSelectionMode = computed(() => context.selectionMode.value);
|
|
464
|
+
const slotState = computed(() => ({
|
|
465
|
+
active: active.value,
|
|
466
|
+
disabled: itemDisabled.value,
|
|
467
|
+
selected: selected.value,
|
|
468
|
+
selectionMode: itemSelectionMode.value,
|
|
469
|
+
state: itemState.value,
|
|
470
|
+
value: __props.value
|
|
471
|
+
}));
|
|
472
|
+
const optionDomId = computed(() => itemProps.value.id ?? optionId.value);
|
|
473
|
+
const itemInteractiveProps = computed(() => ({
|
|
474
|
+
role: optionRole,
|
|
475
|
+
onPointerdown,
|
|
476
|
+
onClick
|
|
477
|
+
}));
|
|
478
|
+
let registration = null;
|
|
479
|
+
function register() {
|
|
480
|
+
registration?.unregister();
|
|
481
|
+
registration = context.registerItem({
|
|
482
|
+
disabled: itemDisabled,
|
|
483
|
+
element,
|
|
484
|
+
id: optionId,
|
|
485
|
+
order: () => __props.order,
|
|
486
|
+
textValue: () => __props.textValue,
|
|
487
|
+
value: __props.value
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
watch(() => __props.value, register, {
|
|
491
|
+
flush: "sync",
|
|
492
|
+
immediate: true
|
|
493
|
+
});
|
|
494
|
+
onUnmounted(() => {
|
|
495
|
+
registration?.unregister();
|
|
496
|
+
registration = null;
|
|
497
|
+
});
|
|
498
|
+
const itemProps = computed(() => context.getItemProps(__props.value));
|
|
499
|
+
function onPointerdown(event) {
|
|
500
|
+
if (itemDisabled.value) return;
|
|
501
|
+
itemProps.value.onPointerdown(event);
|
|
502
|
+
context.focus({ preventScroll: true });
|
|
503
|
+
}
|
|
504
|
+
function onClick(event) {
|
|
505
|
+
if (itemDisabled.value) return;
|
|
506
|
+
if (context.selectionMode.value === "multiple") context.toggleValue(__props.value, event);
|
|
507
|
+
else context.selectValue(__props.value, event);
|
|
508
|
+
}
|
|
509
|
+
function focus(options) {
|
|
510
|
+
if (context.setActiveValue(__props.value)) context.focus(options);
|
|
511
|
+
}
|
|
512
|
+
function select() {
|
|
513
|
+
return context.selectValue(__props.value, null);
|
|
514
|
+
}
|
|
515
|
+
__expose({
|
|
516
|
+
active,
|
|
517
|
+
disabled: itemDisabled,
|
|
518
|
+
element,
|
|
519
|
+
focus,
|
|
520
|
+
select,
|
|
521
|
+
selected,
|
|
522
|
+
selectionMode: context.selectionMode,
|
|
523
|
+
state: itemState,
|
|
524
|
+
value: __props.value
|
|
525
|
+
});
|
|
526
|
+
return (_ctx, _cache) => {
|
|
527
|
+
return openBlock(), createElementBlock("div", mergeProps(itemInteractiveProps.value, {
|
|
528
|
+
id: optionDomId.value,
|
|
529
|
+
ref_key: "element",
|
|
530
|
+
ref: element,
|
|
531
|
+
"aria-selected": selected.value ? "true" : "false",
|
|
532
|
+
"aria-disabled": itemDisabled.value ? "true" : void 0,
|
|
533
|
+
"aria-label": __props.ariaLabel,
|
|
534
|
+
"aria-labelledby": __props.ariaLabelledby,
|
|
535
|
+
"aria-describedby": __props.ariaDescribedby,
|
|
536
|
+
"data-vize-ui": "listbox-item",
|
|
537
|
+
part: "item",
|
|
538
|
+
"data-state": itemState.value,
|
|
539
|
+
"data-value": __props.value,
|
|
540
|
+
"data-selected": selected.value ? "true" : "false",
|
|
541
|
+
"data-active": active.value ? "true" : void 0,
|
|
542
|
+
"data-disabled": itemDisabled.value ? "true" : void 0,
|
|
543
|
+
"data-selection-mode": itemSelectionMode.value
|
|
544
|
+
}), [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotState.value)), void 0, true), renderSlot(_ctx.$slots, "indicator", normalizeProps(guardReactiveProps(slotState.value)), void 0, true)], 16, _hoisted_1);
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
}), [["__scopeId", "data-v-de6eb1a2"]]);
|
|
548
|
+
//#endregion
|
|
549
|
+
export { listboxSelectedValues as a, toggleListboxValue as c, emptyListboxValue as i, listbox_default as n, normalizeListboxValue as o, areListboxValuesEqual as r, selectListboxValue as s, listbox_item_default as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { An as ListboxSelectionMode, Cn as ListboxExpose, Dn as ListboxMultipleValue, En as ListboxItemState, Mn as ListboxSlotState, Nn as ListboxState, On as ListboxOrientation, Pn as ListboxValue, Sn as ListboxDirection, Tn as ListboxItemSlotState, _n as selectListboxValue, bn as _default, gn as normalizeListboxValue, hn as listboxSelectedValues, jn as ListboxSingleValue, kn as ListboxProps, mn as emptyListboxValue, pn as areListboxValuesEqual, vn as toggleListboxValue, wn as ListboxItemExpose, xn as ListboxAriaInvalid, yn as _default$1 } from "./announcer-DGr2Iz0i.mjs";
|
|
2
|
+
export { _default as Listbox, type ListboxAriaInvalid, type ListboxDirection, type ListboxExpose, _default$1 as ListboxItem, type ListboxItemExpose, type ListboxItemSlotState, type ListboxItemState, type ListboxMultipleValue, type ListboxOrientation, type ListboxProps, type ListboxSelectionMode, type ListboxSingleValue, type ListboxSlotState, type ListboxState, type ListboxValue, areListboxValuesEqual, emptyListboxValue, listboxSelectedValues, normalizeListboxValue, selectListboxValue, toggleListboxValue };
|
package/dist/listbox.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as listboxSelectedValues, c as toggleListboxValue, i as emptyListboxValue, n as listbox_default, o as normalizeListboxValue, r as areListboxValuesEqual, s as selectListboxValue, t as listbox_item_default } from "./listbox-IaqaoiRn.mjs";
|
|
2
|
+
export { listbox_default as Listbox, listbox_item_default as ListboxItem, areListboxValuesEqual, emptyListboxValue, listboxSelectedValues, normalizeListboxValue, selectListboxValue, toggleListboxValue };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
|
|
2
|
+
import { n as useLiveRegion } from "./live-region-runtime-DVUch8Lu.mjs";
|
|
3
|
+
import { createElementBlock, createTextVNode, defineComponent, openBlock, renderSlot, toDisplayString, toRef, unref, useTemplateRef } from "vue";
|
|
4
|
+
//#region src/families/accessibility/live-region/live-region.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
const _hoisted_1 = [
|
|
6
|
+
"aria-live",
|
|
7
|
+
"aria-atomic",
|
|
8
|
+
"role"
|
|
9
|
+
];
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/families/accessibility/live-region/live-region.vue
|
|
12
|
+
var live_region_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
13
|
+
__name: "live-region",
|
|
14
|
+
props: {
|
|
15
|
+
politeness: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false,
|
|
18
|
+
default: "polite"
|
|
19
|
+
},
|
|
20
|
+
atomic: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
required: false,
|
|
23
|
+
default: true
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(__props, { expose: __expose }) {
|
|
27
|
+
const region = useLiveRegion({ politeness: toRef(() => __props.politeness) });
|
|
28
|
+
const element = useTemplateRef("element");
|
|
29
|
+
__expose({
|
|
30
|
+
element,
|
|
31
|
+
announce: region.announce,
|
|
32
|
+
clear: region.clear,
|
|
33
|
+
message: region.message
|
|
34
|
+
});
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return openBlock(), createElementBlock("div", {
|
|
37
|
+
ref_key: "element",
|
|
38
|
+
ref: element,
|
|
39
|
+
"data-vize-ui": "live-region",
|
|
40
|
+
"aria-live": unref(region).politeness.value,
|
|
41
|
+
"aria-atomic": __props.atomic ? "true" : "false",
|
|
42
|
+
role: unref(region).politeness.value === "assertive" ? "alert" : "status"
|
|
43
|
+
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true), createTextVNode(" " + toDisplayString(unref(region).message.value), 1)], 8, _hoisted_1);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}), [["__scopeId", "data-v-6a51a8e0"]]);
|
|
47
|
+
//#endregion
|
|
48
|
+
export { live_region_default as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { MaybeRefOrGetter, ShallowRef } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/families/accessibility/live-region/live-region-types.d.ts
|
|
4
|
+
/** ARIA live politeness used by the announcer. */
|
|
5
|
+
type LiveRegionPoliteness = "assertive" | "polite";
|
|
6
|
+
/** Options shared by {@link createLiveRegion} and {@link useLiveRegion}. */
|
|
7
|
+
interface LiveRegionOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Default announcement urgency.
|
|
10
|
+
*
|
|
11
|
+
* @default "polite"
|
|
12
|
+
*/
|
|
13
|
+
readonly politeness?: MaybeRefOrGetter<LiveRegionPoliteness | undefined>;
|
|
14
|
+
}
|
|
15
|
+
/** Stateful live-region announcer with an explicit queue. */
|
|
16
|
+
interface LiveRegionController {
|
|
17
|
+
/** Text currently exposed to assistive technology. */
|
|
18
|
+
readonly message: Readonly<ShallowRef<string>>;
|
|
19
|
+
/** Active politeness for the rendered live region. */
|
|
20
|
+
readonly politeness: Readonly<ShallowRef<LiveRegionPoliteness>>;
|
|
21
|
+
/** Queue an announcement. Identical text is re-announced by clearing first. */
|
|
22
|
+
readonly announce: (text: string, politeness?: LiveRegionPoliteness) => void;
|
|
23
|
+
/** Clear the current announcement. */
|
|
24
|
+
readonly clear: () => void;
|
|
25
|
+
/** Release pending announcements. */
|
|
26
|
+
readonly dispose: () => void;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/families/accessibility/live-region/live-region-runtime.d.ts
|
|
30
|
+
/** Create an SSR-safe announcement queue for one live region. */
|
|
31
|
+
declare function createLiveRegion(options?: LiveRegionOptions): LiveRegionController;
|
|
32
|
+
/** Create a live-region announcer disposed with the current Vue effect scope. */
|
|
33
|
+
declare function useLiveRegion(options?: LiveRegionOptions): LiveRegionController;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/families/accessibility/live-region/live-region.vue.d.ts
|
|
36
|
+
type __VLS_Props = {
|
|
37
|
+
/**
|
|
38
|
+
* Default announcement urgency.
|
|
39
|
+
*
|
|
40
|
+
* @default "polite"
|
|
41
|
+
*/
|
|
42
|
+
readonly politeness?: LiveRegionPoliteness;
|
|
43
|
+
/**
|
|
44
|
+
* Whether assistive technology should present the whole region on each update.
|
|
45
|
+
*
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
readonly atomic?: boolean;
|
|
49
|
+
};
|
|
50
|
+
type __VLS_Slots = {
|
|
51
|
+
/** Optional visible contents rendered alongside the announcer text. */default(): unknown;
|
|
52
|
+
};
|
|
53
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
54
|
+
element: Readonly<import("vue").ShallowRef<HTMLDivElement | null>>;
|
|
55
|
+
announce: (text: string, politeness?: LiveRegionPoliteness) => void;
|
|
56
|
+
clear: () => void;
|
|
57
|
+
message: Readonly<import("vue").ShallowRef<string>>;
|
|
58
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
60
|
+
declare const _default: typeof __VLS_export;
|
|
61
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
62
|
+
new (): {
|
|
63
|
+
$slots: S;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
export { LiveRegionOptions as a, LiveRegionController as i, createLiveRegion as n, LiveRegionPoliteness as o, useLiveRegion as r, _default as t };
|