@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,166 @@
|
|
|
1
|
+
import { computed, toValue } from "vue";
|
|
2
|
+
//#region src/families/form/form/form-runtime.ts
|
|
3
|
+
const formOptionDiagnostic = "VIZE_UI_FORM_OPTION";
|
|
4
|
+
const formResultDiagnostic = "VIZE_UI_FORM_SCHEMA_RESULT";
|
|
5
|
+
const formSchemaDiagnostic = "VIZE_UI_FORM_SCHEMA";
|
|
6
|
+
const identifierSegmentPattern = /^[A-Za-z_$][\w$]*$/;
|
|
7
|
+
function isRecord(value) {
|
|
8
|
+
return typeof value === "object" && value !== null;
|
|
9
|
+
}
|
|
10
|
+
function isPropertyKey(value) {
|
|
11
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "symbol";
|
|
12
|
+
}
|
|
13
|
+
function assertCallback(value, name) {
|
|
14
|
+
if (value !== void 0 && typeof value !== "function") throw new TypeError(`${formOptionDiagnostic}: ${name} must be a function`);
|
|
15
|
+
}
|
|
16
|
+
function assertOptions(value, name) {
|
|
17
|
+
if (!isRecord(value)) throw new TypeError(`${formOptionDiagnostic}: ${name} must be an object`);
|
|
18
|
+
}
|
|
19
|
+
function readName(value) {
|
|
20
|
+
if (typeof value !== "string" || value.length === 0) throw new TypeError(`${formOptionDiagnostic}: name must resolve to a non-empty string`);
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
function readRootId(value) {
|
|
24
|
+
if (value === void 0) return "form";
|
|
25
|
+
if (typeof value !== "string" || value.length === 0) throw new TypeError(`${formOptionDiagnostic}: rootId must resolve to a non-empty string`);
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
function readFieldErrors(value) {
|
|
29
|
+
const resolved = toValue(value);
|
|
30
|
+
if (resolved === void 0) return [];
|
|
31
|
+
if (!Array.isArray(resolved)) throw new TypeError(`${formOptionDiagnostic}: errors must resolve to an array`);
|
|
32
|
+
for (const error of resolved) {
|
|
33
|
+
if (!isRecord(error)) throw new TypeError(`${formOptionDiagnostic}: every error must be an object`);
|
|
34
|
+
if (typeof error.name !== "string") throw new TypeError(`${formOptionDiagnostic}: every error needs a name string`);
|
|
35
|
+
if (typeof error.message !== "string") throw new TypeError(`${formOptionDiagnostic}: every error needs a message string`);
|
|
36
|
+
if (!Array.isArray(error.path)) throw new TypeError(`${formOptionDiagnostic}: every error needs a path array`);
|
|
37
|
+
}
|
|
38
|
+
return resolved;
|
|
39
|
+
}
|
|
40
|
+
function readIssuePath(issue) {
|
|
41
|
+
const path = issue.path;
|
|
42
|
+
if (path === void 0) return Object.freeze([]);
|
|
43
|
+
if (!Array.isArray(path)) throw new TypeError(`${formResultDiagnostic}: issue path must be an array`);
|
|
44
|
+
return Object.freeze(path.map((segment) => {
|
|
45
|
+
if (isPropertyKey(segment)) return segment;
|
|
46
|
+
if (isRecord(segment) && isPropertyKey(segment.key)) return segment.key;
|
|
47
|
+
throw new TypeError(`${formResultDiagnostic}: issue path segments must contain property keys`);
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
function formatSegment(key, index) {
|
|
51
|
+
const segment = String(key);
|
|
52
|
+
if (typeof key === "number") return `[${segment}]`;
|
|
53
|
+
if (identifierSegmentPattern.test(segment)) return index === 0 ? segment : `.${segment}`;
|
|
54
|
+
return `[${JSON.stringify(segment)}]`;
|
|
55
|
+
}
|
|
56
|
+
/** Convert a Standard Schema issue path into a conventional HTML field name. */
|
|
57
|
+
function formatFormFieldName(path) {
|
|
58
|
+
if (!Array.isArray(path)) throw new TypeError(`${formOptionDiagnostic}: path must be an array`);
|
|
59
|
+
return path.map(formatSegment).join("");
|
|
60
|
+
}
|
|
61
|
+
/** Convert Standard Schema issues into normalized field errors. */
|
|
62
|
+
function normalizeStandardSchemaIssues(issues, options = {}) {
|
|
63
|
+
assertOptions(options, "options");
|
|
64
|
+
assertCallback(options.nameForPath, "nameForPath");
|
|
65
|
+
return Object.freeze(issues.map((issue) => {
|
|
66
|
+
if (!isRecord(issue)) throw new TypeError(`${formResultDiagnostic}: every issue must be an object`);
|
|
67
|
+
if (typeof issue.message !== "string") throw new TypeError(`${formResultDiagnostic}: every issue needs a message string`);
|
|
68
|
+
const path = readIssuePath(issue);
|
|
69
|
+
const name = options.nameForPath?.(path, issue) ?? formatFormFieldName(path);
|
|
70
|
+
if (typeof name !== "string") throw new TypeError(`${formOptionDiagnostic}: nameForPath must return a string`);
|
|
71
|
+
return Object.freeze({
|
|
72
|
+
message: issue.message,
|
|
73
|
+
name,
|
|
74
|
+
path
|
|
75
|
+
});
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
/** Convert normalized field errors into unique fields for the error summary. */
|
|
79
|
+
function createFormErrorSummaryFields(errors, options = {}) {
|
|
80
|
+
assertOptions(options, "options");
|
|
81
|
+
assertCallback(options.idForName, "idForName");
|
|
82
|
+
assertCallback(options.labelForName, "labelForName");
|
|
83
|
+
const rootId = readRootId(options.rootId);
|
|
84
|
+
const fields = [];
|
|
85
|
+
const seen = /* @__PURE__ */ new Set();
|
|
86
|
+
for (const error of readFieldErrors(errors)) {
|
|
87
|
+
const fallbackId = error.name.length === 0 ? rootId : error.name;
|
|
88
|
+
const id = options.idForName?.(error.name, error) ?? fallbackId;
|
|
89
|
+
if (id === null) continue;
|
|
90
|
+
if (id === void 0) continue;
|
|
91
|
+
if (typeof id !== "string" || id.length === 0) throw new TypeError(`${formOptionDiagnostic}: idForName must return a non-empty string`);
|
|
92
|
+
if (seen.has(id)) continue;
|
|
93
|
+
seen.add(id);
|
|
94
|
+
const label = error.name.length === 0 ? options.rootLabel : options.labelForName?.(error.name, error);
|
|
95
|
+
fields.push(Object.freeze(label === void 0 ? {
|
|
96
|
+
id,
|
|
97
|
+
message: error.message
|
|
98
|
+
} : {
|
|
99
|
+
id,
|
|
100
|
+
label,
|
|
101
|
+
message: error.message
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
return Object.freeze(fields);
|
|
105
|
+
}
|
|
106
|
+
/** Normalize a Standard Schema validation result for form fields and summaries. */
|
|
107
|
+
function normalizeStandardSchemaResult(result, options = {}) {
|
|
108
|
+
assertOptions(options, "options");
|
|
109
|
+
if (!isRecord(result)) throw new TypeError(`${formResultDiagnostic}: result must be an object`);
|
|
110
|
+
if (Array.isArray(result.issues)) {
|
|
111
|
+
const errors = normalizeStandardSchemaIssues(result.issues, options);
|
|
112
|
+
return Object.freeze({
|
|
113
|
+
errors,
|
|
114
|
+
summaryFields: createFormErrorSummaryFields(errors, options),
|
|
115
|
+
valid: false
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (result.issues === void 0 && "value" in result) return Object.freeze({
|
|
119
|
+
errors: Object.freeze([]),
|
|
120
|
+
summaryFields: Object.freeze([]),
|
|
121
|
+
valid: true,
|
|
122
|
+
value: result.value
|
|
123
|
+
});
|
|
124
|
+
throw new TypeError(`${formResultDiagnostic}: result must contain value or issues`);
|
|
125
|
+
}
|
|
126
|
+
/** Validate a Standard Schema and normalize the result for form consumers. */
|
|
127
|
+
async function validateStandardSchema(schema, value, options = {}) {
|
|
128
|
+
assertOptions(options, "options");
|
|
129
|
+
const standard = schema?.["~standard"];
|
|
130
|
+
if (!isRecord(standard) || standard.version !== 1 || typeof standard.validate !== "function") throw new TypeError(`${formSchemaDiagnostic}: schema must implement Standard Schema V1`);
|
|
131
|
+
const validationOptions = options.libraryOptions === void 0 ? void 0 : { libraryOptions: options.libraryOptions };
|
|
132
|
+
return normalizeStandardSchemaResult(await standard.validate(value, validationOptions), options);
|
|
133
|
+
}
|
|
134
|
+
/** Create normalized field state whose invalid flag can feed existing field wiring. */
|
|
135
|
+
function useFormField(options) {
|
|
136
|
+
assertOptions(options, "options");
|
|
137
|
+
const name = computed(() => readName(toValue(options.name)));
|
|
138
|
+
const errors = computed(() => readFieldErrors(options.errors).filter((error) => error.name === name.value));
|
|
139
|
+
const firstError = computed(() => errors.value[0]);
|
|
140
|
+
const errorMessage = computed(() => firstError.value?.message);
|
|
141
|
+
const isInvalid = computed(() => errors.value.length > 0);
|
|
142
|
+
return Object.freeze({
|
|
143
|
+
errorMessage,
|
|
144
|
+
errors,
|
|
145
|
+
firstError,
|
|
146
|
+
isInvalid,
|
|
147
|
+
name
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/** Create error-summary fields from normalized form errors. */
|
|
151
|
+
function useFormErrorSummary(options = {}) {
|
|
152
|
+
assertOptions(options, "options");
|
|
153
|
+
const fields = computed(() => createFormErrorSummaryFields(readFieldErrors(options.errors), {
|
|
154
|
+
...options.idForName === void 0 ? {} : { idForName: options.idForName },
|
|
155
|
+
...options.labelForName === void 0 ? {} : { labelForName: options.labelForName },
|
|
156
|
+
rootId: readRootId(toValue(options.rootId)),
|
|
157
|
+
...options.rootLabel === void 0 ? {} : { rootLabel: options.rootLabel }
|
|
158
|
+
}));
|
|
159
|
+
const hasErrors = computed(() => fields.value.length > 0);
|
|
160
|
+
return Object.freeze({
|
|
161
|
+
fields,
|
|
162
|
+
hasErrors
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
export { useFormErrorSummary as a, normalizeStandardSchemaResult as i, formatFormFieldName as n, useFormField as o, normalizeStandardSchemaIssues as r, validateStandardSchema as s, createFormErrorSummaryFields as t };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { n as ErrorSummaryField } from "./error-summary-types-5ePaC9O3.mjs";
|
|
2
|
+
import { ComputedRef, MaybeRefOrGetter } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/families/form/form/form-types.d.ts
|
|
5
|
+
/** Structural Standard Schema V1 contract accepted by the form utilities. */
|
|
6
|
+
interface StandardSchemaV1<Input = unknown, Output = Input> {
|
|
7
|
+
/** Standard Schema metadata and validation entry point. */
|
|
8
|
+
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
|
|
9
|
+
}
|
|
10
|
+
declare namespace StandardSchemaV1 {
|
|
11
|
+
/** Standard Schema metadata and validation entry point. */
|
|
12
|
+
interface Props<Input = unknown, Output = Input> {
|
|
13
|
+
/** Version number of the Standard Schema contract. */
|
|
14
|
+
readonly version: 1;
|
|
15
|
+
/** Schema-library vendor name. */
|
|
16
|
+
readonly vendor: string;
|
|
17
|
+
/** Validate unknown input and return either a value or issues. */
|
|
18
|
+
readonly validate: (value: unknown, options?: StandardSchemaV1.Options) => Result<Output> | Promise<Result<Output>>;
|
|
19
|
+
/** Optional phantom input and output types advertised by the schema. */
|
|
20
|
+
readonly types?: Types<Input, Output> | undefined;
|
|
21
|
+
}
|
|
22
|
+
/** Standard Schema validation result. */
|
|
23
|
+
type Result<Output> = SuccessResult<Output> | FailureResult;
|
|
24
|
+
/** Successful Standard Schema validation result. */
|
|
25
|
+
interface SuccessResult<Output> {
|
|
26
|
+
/** Typed output value. */
|
|
27
|
+
readonly value: Output;
|
|
28
|
+
/** Success is represented by no issues. */
|
|
29
|
+
readonly issues?: undefined;
|
|
30
|
+
}
|
|
31
|
+
/** Standard Schema validation options. */
|
|
32
|
+
interface Options {
|
|
33
|
+
/** Vendor-specific options passed through to the schema library. */
|
|
34
|
+
readonly libraryOptions?: Record<string, unknown> | undefined;
|
|
35
|
+
}
|
|
36
|
+
/** Failed Standard Schema validation result. */
|
|
37
|
+
interface FailureResult {
|
|
38
|
+
/** Failed-validation issues. */
|
|
39
|
+
readonly issues: ReadonlyArray<Issue>;
|
|
40
|
+
}
|
|
41
|
+
/** One Standard Schema validation issue. */
|
|
42
|
+
interface Issue {
|
|
43
|
+
/** Human-readable validation message. */
|
|
44
|
+
readonly message: string;
|
|
45
|
+
/** Path of the invalid value, if known. */
|
|
46
|
+
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
|
|
47
|
+
}
|
|
48
|
+
/** Object path segment used by some schema libraries. */
|
|
49
|
+
interface PathSegment {
|
|
50
|
+
/** Key represented by this segment. */
|
|
51
|
+
readonly key: PropertyKey;
|
|
52
|
+
}
|
|
53
|
+
/** Phantom input and output types advertised by the schema. */
|
|
54
|
+
interface Types<Input = unknown, Output = Input> {
|
|
55
|
+
/** Input type accepted by the schema. */
|
|
56
|
+
readonly input: Input;
|
|
57
|
+
/** Output type returned by the schema. */
|
|
58
|
+
readonly output: Output;
|
|
59
|
+
}
|
|
60
|
+
/** Infer the input type advertised by a Standard Schema. */
|
|
61
|
+
type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
|
|
62
|
+
/** Infer the output type advertised by a Standard Schema. */
|
|
63
|
+
type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
|
|
64
|
+
}
|
|
65
|
+
/** Property key after a Standard Schema path segment has been unwrapped. */
|
|
66
|
+
type FormPathKey = PropertyKey;
|
|
67
|
+
/** One normalized field validation error. */
|
|
68
|
+
interface FormFieldError {
|
|
69
|
+
/** HTML form field name derived from the issue path. */
|
|
70
|
+
readonly name: string;
|
|
71
|
+
/** Human-readable validation message. */
|
|
72
|
+
readonly message: string;
|
|
73
|
+
/** Unwrapped Standard Schema path keys. */
|
|
74
|
+
readonly path: readonly FormPathKey[];
|
|
75
|
+
}
|
|
76
|
+
/** Options for converting Standard Schema issues into field errors. */
|
|
77
|
+
interface FormFieldErrorOptions {
|
|
78
|
+
/**
|
|
79
|
+
* Convert an unwrapped Standard Schema issue path into a form field name.
|
|
80
|
+
*
|
|
81
|
+
* @default dot/bracket path formatting
|
|
82
|
+
*/
|
|
83
|
+
readonly nameForPath?: (path: readonly FormPathKey[], issue: StandardSchemaV1.Issue) => string;
|
|
84
|
+
}
|
|
85
|
+
/** Options for converting normalized field errors into error-summary fields. */
|
|
86
|
+
interface FormErrorSummaryFieldOptions {
|
|
87
|
+
/**
|
|
88
|
+
* Resolve the document id for a field error.
|
|
89
|
+
*
|
|
90
|
+
* @default the normalized field name, or `rootId` for form-level errors
|
|
91
|
+
*/
|
|
92
|
+
readonly idForName?: (name: string, error: FormFieldError) => string | null | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Resolve the accessible field label displayed before the summary message.
|
|
95
|
+
*
|
|
96
|
+
* @default undefined
|
|
97
|
+
*/
|
|
98
|
+
readonly labelForName?: (name: string, error: FormFieldError) => string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Document id used for form-level errors with no field path.
|
|
101
|
+
*
|
|
102
|
+
* @default "form"
|
|
103
|
+
*/
|
|
104
|
+
readonly rootId?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Label used for form-level errors with no field path.
|
|
107
|
+
*
|
|
108
|
+
* @default undefined
|
|
109
|
+
*/
|
|
110
|
+
readonly rootLabel?: string;
|
|
111
|
+
}
|
|
112
|
+
/** Normalized successful form validation state. */
|
|
113
|
+
interface FormValidationSuccess<Output> {
|
|
114
|
+
/** Whether validation succeeded. */
|
|
115
|
+
readonly valid: true;
|
|
116
|
+
/** Typed output value from the schema. */
|
|
117
|
+
readonly value: Output;
|
|
118
|
+
/** Normalized field errors. Empty on success. */
|
|
119
|
+
readonly errors: readonly FormFieldError[];
|
|
120
|
+
/** Error-summary fields. Empty on success. */
|
|
121
|
+
readonly summaryFields: readonly [];
|
|
122
|
+
}
|
|
123
|
+
/** Normalized failed form validation state. */
|
|
124
|
+
interface FormValidationFailure {
|
|
125
|
+
/** Whether validation succeeded. */
|
|
126
|
+
readonly valid: false;
|
|
127
|
+
/** Normalized field errors. */
|
|
128
|
+
readonly errors: readonly FormFieldError[];
|
|
129
|
+
/** Error-summary fields, one per document id. */
|
|
130
|
+
readonly summaryFields: readonly ErrorSummaryField[];
|
|
131
|
+
}
|
|
132
|
+
/** Normalized form validation state. */
|
|
133
|
+
type FormValidationResult<Output> = FormValidationSuccess<Output> | FormValidationFailure;
|
|
134
|
+
/** Options for validating and normalizing a Standard Schema form result. */
|
|
135
|
+
interface StandardSchemaValidationOptions extends FormFieldErrorOptions, FormErrorSummaryFieldOptions, StandardSchemaV1.Options {}
|
|
136
|
+
/** Options accepted by {@link useFormField}. */
|
|
137
|
+
interface FormFieldOptions {
|
|
138
|
+
/** Normalized HTML form field name. */
|
|
139
|
+
readonly name: MaybeRefOrGetter<string>;
|
|
140
|
+
/**
|
|
141
|
+
* Full normalized form error list.
|
|
142
|
+
*
|
|
143
|
+
* @default []
|
|
144
|
+
*/
|
|
145
|
+
readonly errors?: MaybeRefOrGetter<readonly FormFieldError[] | undefined>;
|
|
146
|
+
}
|
|
147
|
+
/** Reactive normalized errors and invalid state for one form field. */
|
|
148
|
+
interface FormFieldController {
|
|
149
|
+
/** Normalized HTML form field name. */
|
|
150
|
+
readonly name: ComputedRef<string>;
|
|
151
|
+
/** Whether this field currently has at least one normalized error. */
|
|
152
|
+
readonly isInvalid: ComputedRef<boolean>;
|
|
153
|
+
/** Current errors for this field only. */
|
|
154
|
+
readonly errors: ComputedRef<readonly FormFieldError[]>;
|
|
155
|
+
/** First current error for this field. */
|
|
156
|
+
readonly firstError: ComputedRef<FormFieldError | undefined>;
|
|
157
|
+
/** First current error message for this field. */
|
|
158
|
+
readonly errorMessage: ComputedRef<string | undefined>;
|
|
159
|
+
}
|
|
160
|
+
/** Options accepted by {@link useFormErrorSummary}. */
|
|
161
|
+
interface FormErrorSummaryOptions extends Omit<FormErrorSummaryFieldOptions, "rootId"> {
|
|
162
|
+
/**
|
|
163
|
+
* Full normalized form error list.
|
|
164
|
+
*
|
|
165
|
+
* @default []
|
|
166
|
+
*/
|
|
167
|
+
readonly errors?: MaybeRefOrGetter<readonly FormFieldError[] | undefined>;
|
|
168
|
+
/**
|
|
169
|
+
* Document id used for form-level errors with no field path.
|
|
170
|
+
*
|
|
171
|
+
* @default "form"
|
|
172
|
+
*/
|
|
173
|
+
readonly rootId?: MaybeRefOrGetter<string | undefined>;
|
|
174
|
+
}
|
|
175
|
+
/** Reactive error-summary fields derived from normalized form errors. */
|
|
176
|
+
interface FormErrorSummaryController {
|
|
177
|
+
/** Fields ready to pass into the error-summary component or controller. */
|
|
178
|
+
readonly fields: ComputedRef<readonly ErrorSummaryField[]>;
|
|
179
|
+
/** Whether at least one summary field is currently available. */
|
|
180
|
+
readonly hasErrors: ComputedRef<boolean>;
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
export { FormFieldError as a, FormPathKey as c, FormValidationSuccess as d, StandardSchemaV1 as f, FormFieldController as i, FormValidationFailure as l, FormErrorSummaryFieldOptions as n, FormFieldErrorOptions as o, StandardSchemaValidationOptions as p, FormErrorSummaryOptions as r, FormFieldOptions as s, FormErrorSummaryController as t, FormValidationResult as u };
|
package/dist/form.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as FormFieldError, c as FormPathKey, d as FormValidationSuccess, f as StandardSchemaV1, i as FormFieldController, l as FormValidationFailure, n as FormErrorSummaryFieldOptions, o as FormFieldErrorOptions, p as StandardSchemaValidationOptions, r as FormErrorSummaryOptions, s as FormFieldOptions, t as FormErrorSummaryController, u as FormValidationResult } from "./form-types-DXwZRLcs.mjs";
|
|
2
|
+
import { a as useFormErrorSummary, i as normalizeStandardSchemaResult, n as formatFormFieldName, o as useFormField, r as normalizeStandardSchemaIssues, s as validateStandardSchema, t as createFormErrorSummaryFields } from "./form-1V2V30Sv.mjs";
|
|
3
|
+
export { type FormErrorSummaryController, type FormErrorSummaryFieldOptions, type FormErrorSummaryOptions, type FormFieldController, type FormFieldError, type FormFieldErrorOptions, type FormFieldOptions, type FormPathKey, type FormValidationFailure, type FormValidationResult, type FormValidationSuccess, type StandardSchemaV1, type StandardSchemaValidationOptions, createFormErrorSummaryFields, formatFormFieldName, normalizeStandardSchemaIssues, normalizeStandardSchemaResult, useFormErrorSummary, useFormField, validateStandardSchema };
|
package/dist/form.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as useFormErrorSummary, i as normalizeStandardSchemaResult, n as formatFormFieldName, o as useFormField, r as normalizeStandardSchemaIssues, s as validateStandardSchema, t as createFormErrorSummaryFields } from "./form-runtime-CcMDY0Iq.mjs";
|
|
2
|
+
export { createFormErrorSummaryFields, formatFormFieldName, normalizeStandardSchemaIssues, normalizeStandardSchemaResult, useFormErrorSummary, useFormField, validateStandardSchema };
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.mjs";
|
|
2
|
+
import { computed, createBlock, createElementVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, useTemplateRef, withCtx } from "vue";
|
|
3
|
+
//#region src/families/actions/fullscreen-button/fullscreen-button.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
"data-vize-ui": "fullscreen-button-label",
|
|
6
|
+
part: "label"
|
|
7
|
+
};
|
|
8
|
+
const FULLSCREEN_BUTTON_ACTION_UNAVAILABLE = "VIZE_UI_FULLSCREEN_BUTTON_ACTION_UNAVAILABLE";
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/families/actions/fullscreen-button/fullscreen-button.vue
|
|
11
|
+
var fullscreen_button_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "fullscreen-button",
|
|
13
|
+
props: {
|
|
14
|
+
as: {
|
|
15
|
+
type: null,
|
|
16
|
+
required: false,
|
|
17
|
+
default: "button"
|
|
18
|
+
},
|
|
19
|
+
native: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
required: false,
|
|
22
|
+
default: () => void 0
|
|
23
|
+
},
|
|
24
|
+
type: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: false,
|
|
27
|
+
default: "button"
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
required: false,
|
|
32
|
+
default: false
|
|
33
|
+
},
|
|
34
|
+
enterLabel: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false,
|
|
37
|
+
default: "Enter fullscreen"
|
|
38
|
+
},
|
|
39
|
+
exitLabel: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: false,
|
|
42
|
+
default: "Exit fullscreen"
|
|
43
|
+
},
|
|
44
|
+
busyLabel: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: false,
|
|
47
|
+
default: "Changing fullscreen"
|
|
48
|
+
},
|
|
49
|
+
errorLabel: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: false,
|
|
52
|
+
default: "Fullscreen failed"
|
|
53
|
+
},
|
|
54
|
+
ariaLabel: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: false,
|
|
57
|
+
default: () => void 0
|
|
58
|
+
},
|
|
59
|
+
ariaLabelledby: {
|
|
60
|
+
type: String,
|
|
61
|
+
required: false,
|
|
62
|
+
default: () => void 0
|
|
63
|
+
},
|
|
64
|
+
ariaDescribedby: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false,
|
|
67
|
+
default: () => void 0
|
|
68
|
+
},
|
|
69
|
+
target: {
|
|
70
|
+
type: [null, Function],
|
|
71
|
+
required: false,
|
|
72
|
+
skipCheck: true,
|
|
73
|
+
default: void 0
|
|
74
|
+
},
|
|
75
|
+
controller: {
|
|
76
|
+
type: Object,
|
|
77
|
+
required: false,
|
|
78
|
+
default: () => void 0
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
emits: ["fullscreen", "error"],
|
|
82
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
83
|
+
const emit = __emit;
|
|
84
|
+
const element = useTemplateRef("element");
|
|
85
|
+
const stateValue = shallowRef("idle");
|
|
86
|
+
const activeValue = shallowRef(false);
|
|
87
|
+
const operationValue = shallowRef(null);
|
|
88
|
+
const isNativeButton = computed(() => __props.native ?? __props.as === "button");
|
|
89
|
+
const buttonType = computed(() => __props.type);
|
|
90
|
+
const disabledValue = computed(() => __props.disabled);
|
|
91
|
+
const pendingValue = computed(() => stateValue.value === "entering" || stateValue.value === "exiting");
|
|
92
|
+
const pendingOperation = computed(() => operationValue.value?.type ?? null);
|
|
93
|
+
const unavailable = computed(() => disabledValue.value || pendingValue.value);
|
|
94
|
+
const controllerValue = computed(() => toRaw(__props.controller ?? platformFullscreenController));
|
|
95
|
+
const label = computed(() => pendingValue.value ? __props.busyLabel : stateValue.value === "error" ? __props.errorLabel : activeValue.value ? __props.exitLabel : __props.enterLabel);
|
|
96
|
+
const tabIndex = computed(() => {
|
|
97
|
+
if (isNativeButton.value) return void 0;
|
|
98
|
+
return disabledValue.value ? -1 : 0;
|
|
99
|
+
});
|
|
100
|
+
const ariaLabelValue = computed(() => hasText(__props.ariaLabel) ? __props.ariaLabel : void 0);
|
|
101
|
+
const ariaLabelledbyValue = computed(() => hasText(__props.ariaLabelledby) ? __props.ariaLabelledby : void 0);
|
|
102
|
+
const slotState = computed(() => ({
|
|
103
|
+
active: activeValue.value,
|
|
104
|
+
disabled: disabledValue.value,
|
|
105
|
+
label: label.value,
|
|
106
|
+
operation: pendingOperation.value,
|
|
107
|
+
pending: pendingValue.value,
|
|
108
|
+
state: stateValue.value,
|
|
109
|
+
unavailable: unavailable.value
|
|
110
|
+
}));
|
|
111
|
+
function onClick(event) {
|
|
112
|
+
if (unavailable.value) {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
event.stopImmediatePropagation();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
runFullscreenOperation(createFullscreenOperation(controllerValue.value, __props.target, event), event);
|
|
118
|
+
}
|
|
119
|
+
async function runFullscreenOperation(submittedOperation, event) {
|
|
120
|
+
operationValue.value = submittedOperation;
|
|
121
|
+
stateValue.value = submittedOperation.type === "enter" ? "entering" : "exiting";
|
|
122
|
+
if (submittedOperation.type === "exit") activeValue.value = true;
|
|
123
|
+
try {
|
|
124
|
+
if (submittedOperation.type === "enter") {
|
|
125
|
+
if (submittedOperation.target === null) throw new Error(FULLSCREEN_BUTTON_ACTION_UNAVAILABLE);
|
|
126
|
+
await submittedOperation.controller.requestFullscreen(submittedOperation.target, event);
|
|
127
|
+
activeValue.value = true;
|
|
128
|
+
stateValue.value = "active";
|
|
129
|
+
} else {
|
|
130
|
+
await submittedOperation.controller.exitFullscreen(event);
|
|
131
|
+
activeValue.value = false;
|
|
132
|
+
stateValue.value = "idle";
|
|
133
|
+
}
|
|
134
|
+
emit("fullscreen", submittedOperation, event);
|
|
135
|
+
} catch (error) {
|
|
136
|
+
activeValue.value = submittedOperation.type === "exit";
|
|
137
|
+
stateValue.value = "error";
|
|
138
|
+
emit("error", error, submittedOperation, event);
|
|
139
|
+
} finally {
|
|
140
|
+
if (operationValue.value === submittedOperation) operationValue.value = null;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function createFullscreenOperation(submittedController, submittedTarget, event) {
|
|
144
|
+
const activeTarget = getFullscreenElement(submittedController);
|
|
145
|
+
if (activeTarget !== null || activeValue.value) return {
|
|
146
|
+
controller: submittedController,
|
|
147
|
+
target: activeTarget,
|
|
148
|
+
type: "exit"
|
|
149
|
+
};
|
|
150
|
+
return {
|
|
151
|
+
controller: submittedController,
|
|
152
|
+
target: resolveFullscreenTarget(submittedTarget, event),
|
|
153
|
+
type: "enter"
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function resolveFullscreenTarget(submittedTarget, event) {
|
|
157
|
+
if (typeof submittedTarget === "function") return normalizeElement(submittedTarget(event));
|
|
158
|
+
if (submittedTarget !== void 0) return normalizeElement(submittedTarget);
|
|
159
|
+
return getPlatformDocument()?.documentElement ?? null;
|
|
160
|
+
}
|
|
161
|
+
function getFullscreenElement(submittedController) {
|
|
162
|
+
return normalizeElement(submittedController.getFullscreenElement?.());
|
|
163
|
+
}
|
|
164
|
+
function normalizeElement(value) {
|
|
165
|
+
if (value == null) return null;
|
|
166
|
+
if (typeof Element === "undefined") return null;
|
|
167
|
+
return value instanceof Element ? value : null;
|
|
168
|
+
}
|
|
169
|
+
function onKeyboard(event, phase) {
|
|
170
|
+
if (isNativeButton.value) return;
|
|
171
|
+
const keyboardAction = getFullscreenButtonKeyboardAction(event.key, phase);
|
|
172
|
+
if (keyboardAction === "ignore") return;
|
|
173
|
+
event.preventDefault();
|
|
174
|
+
if (unavailable.value) {
|
|
175
|
+
event.stopImmediatePropagation();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (keyboardAction === "activate" && event.currentTarget instanceof HTMLElement) event.currentTarget.click();
|
|
179
|
+
}
|
|
180
|
+
function onKeydown(event) {
|
|
181
|
+
onKeyboard(event, "keydown");
|
|
182
|
+
}
|
|
183
|
+
function onKeyup(event) {
|
|
184
|
+
onKeyboard(event, "keyup");
|
|
185
|
+
}
|
|
186
|
+
function getFullscreenButtonKeyboardAction(key, phase) {
|
|
187
|
+
if (key === "Enter") return phase === "keydown" ? "activate" : "ignore";
|
|
188
|
+
if (key === " ") return phase === "keydown" ? "prevent" : "activate";
|
|
189
|
+
return "ignore";
|
|
190
|
+
}
|
|
191
|
+
function focus(options) {
|
|
192
|
+
focusTarget(element.value, options);
|
|
193
|
+
}
|
|
194
|
+
function focusTarget(targetElement, options) {
|
|
195
|
+
if (typeof targetElement === "object" && targetElement !== null && "focus" in targetElement && typeof targetElement.focus === "function") targetElement.focus(options);
|
|
196
|
+
}
|
|
197
|
+
function getPlatformDocument() {
|
|
198
|
+
return typeof globalThis.document === "undefined" ? null : globalThis.document;
|
|
199
|
+
}
|
|
200
|
+
const platformFullscreenController = {
|
|
201
|
+
getFullscreenElement() {
|
|
202
|
+
return getPlatformDocument()?.fullscreenElement ?? null;
|
|
203
|
+
},
|
|
204
|
+
requestFullscreen(targetElement) {
|
|
205
|
+
const requestFullscreen = targetElement.requestFullscreen;
|
|
206
|
+
if (typeof requestFullscreen !== "function") throw new Error(FULLSCREEN_BUTTON_ACTION_UNAVAILABLE);
|
|
207
|
+
return requestFullscreen.call(targetElement);
|
|
208
|
+
},
|
|
209
|
+
exitFullscreen() {
|
|
210
|
+
const platformDocument = getPlatformDocument();
|
|
211
|
+
const exitFullscreen = platformDocument?.exitFullscreen;
|
|
212
|
+
if (typeof exitFullscreen !== "function") throw new Error(FULLSCREEN_BUTTON_ACTION_UNAVAILABLE);
|
|
213
|
+
return exitFullscreen.call(platformDocument);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
function hasText(nextValue) {
|
|
217
|
+
return nextValue != null && nextValue.trim().length > 0;
|
|
218
|
+
}
|
|
219
|
+
__expose({
|
|
220
|
+
active: activeValue,
|
|
221
|
+
disabled: disabledValue,
|
|
222
|
+
element,
|
|
223
|
+
focus,
|
|
224
|
+
label,
|
|
225
|
+
operation: pendingOperation,
|
|
226
|
+
pending: pendingValue,
|
|
227
|
+
state: stateValue,
|
|
228
|
+
unavailable
|
|
229
|
+
});
|
|
230
|
+
return (_ctx, _cache) => {
|
|
231
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
232
|
+
ref_key: "element",
|
|
233
|
+
ref: element,
|
|
234
|
+
type: isNativeButton.value ? buttonType.value : void 0,
|
|
235
|
+
disabled: isNativeButton.value ? disabledValue.value : void 0,
|
|
236
|
+
role: isNativeButton.value ? void 0 : "button",
|
|
237
|
+
tabindex: tabIndex.value,
|
|
238
|
+
"aria-label": ariaLabelledbyValue.value === void 0 ? ariaLabelValue.value : void 0,
|
|
239
|
+
"aria-labelledby": ariaLabelledbyValue.value,
|
|
240
|
+
"aria-describedby": __props.ariaDescribedby,
|
|
241
|
+
"aria-pressed": activeValue.value ? "true" : "false",
|
|
242
|
+
"aria-disabled": unavailable.value && (!isNativeButton.value || pendingValue.value) ? "true" : void 0,
|
|
243
|
+
"aria-busy": pendingValue.value ? "true" : void 0,
|
|
244
|
+
"data-vize-ui": "fullscreen-button",
|
|
245
|
+
part: "root",
|
|
246
|
+
"data-state": stateValue.value,
|
|
247
|
+
"data-disabled": disabledValue.value ? "true" : void 0,
|
|
248
|
+
"data-active": activeValue.value ? "true" : void 0,
|
|
249
|
+
"data-pending": pendingValue.value ? "true" : void 0,
|
|
250
|
+
onClick,
|
|
251
|
+
onKeydown,
|
|
252
|
+
onKeyup
|
|
253
|
+
}, {
|
|
254
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotState.value)), () => [createElementVNode("span", _hoisted_1, toDisplayString(label.value), 1)], true)]),
|
|
255
|
+
_: 3
|
|
256
|
+
}, 40, [
|
|
257
|
+
"type",
|
|
258
|
+
"disabled",
|
|
259
|
+
"role",
|
|
260
|
+
"tabindex",
|
|
261
|
+
"aria-label",
|
|
262
|
+
"aria-labelledby",
|
|
263
|
+
"aria-describedby",
|
|
264
|
+
"aria-pressed",
|
|
265
|
+
"aria-disabled",
|
|
266
|
+
"aria-busy",
|
|
267
|
+
"data-state",
|
|
268
|
+
"data-disabled",
|
|
269
|
+
"data-active",
|
|
270
|
+
"data-pending"
|
|
271
|
+
]);
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}), [["__scopeId", "data-v-b9f58744"]]);
|
|
275
|
+
//#endregion
|
|
276
|
+
export { fullscreen_button_default as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $a as FullscreenButtonElement, Ja as _default, Qa as FullscreenButtonDataName, Xa as FullscreenButtonCssCustomProperty, Ya as FullscreenButtonController, Za as FullscreenButtonDataAttribute, ao as FullscreenButtonProps, co as FullscreenButtonState, eo as FullscreenButtonEmits, io as FullscreenButtonPart, lo as FullscreenButtonTarget, no as FullscreenButtonOperation, oo as FullscreenButtonSlotState, ro as FullscreenButtonOperationType, so as FullscreenButtonSlots, to as FullscreenButtonExpose, uo as FullscreenButtonType } from "./announcer-DGr2Iz0i.mjs";
|
|
2
|
+
export { _default as FullscreenButton, type FullscreenButtonController, type FullscreenButtonCssCustomProperty, type FullscreenButtonDataAttribute, type FullscreenButtonDataName, type FullscreenButtonElement, type FullscreenButtonEmits, type FullscreenButtonExpose, type FullscreenButtonOperation, type FullscreenButtonOperationType, type FullscreenButtonPart, type FullscreenButtonProps, type FullscreenButtonSlotState, type FullscreenButtonSlots, type FullscreenButtonState, type FullscreenButtonTarget, type FullscreenButtonType };
|