@dpa-id-components/dpa-shared-components 22.0.0-next.3 → 22.0.0-next.5
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/{activities-BxyZQp7R.js → activities-Bvo5Tcpi.js} +1 -1
- package/dist/{ai-CvQQ6hUw.js → ai-CAbOdJZ8.js} +1 -1
- package/dist/{alert-CFNc2ENq.js → alert-DBH5Lw4Q.js} +1 -1
- package/dist/{alert-BeP6nqRf.js → alert-WA0pKI_x.js} +1 -1
- package/dist/{alert-filled-COSmQYAa.js → alert-filled-FaMUUR6G.js} +1 -1
- package/dist/{alert-octagon-Cd-_T4ON.js → alert-octagon-BThdHdMx.js} +1 -1
- package/dist/{apps-CtY6nO4d.js → apps-BrHprahs.js} +1 -1
- package/dist/{archive-DmV6cQ50.js → archive-DBPHhVqZ.js} +1 -1
- package/dist/{arrow-down-Cfib5c-0.js → arrow-down-9mspAtJH.js} +1 -1
- package/dist/{arrow-left-CFSY8V--.js → arrow-left-hTN1YNGs.js} +1 -1
- package/dist/{arrow-nav-left-BRYPr4oj.js → arrow-nav-left-NM47R1BA.js} +1 -1
- package/dist/{arrow-nav-right-PqR7W08e.js → arrow-nav-right-DBI84Ukd.js} +1 -1
- package/dist/{arrow-right-ByFSLzJb.js → arrow-right-Dc7c9oto.js} +1 -1
- package/dist/{arrow-up-DfhQKYKi.js → arrow-up-CiiVaA-K.js} +1 -1
- package/dist/{arrowhead-left-BxBCmhZy.js → arrowhead-left-DAvzD9VP.js} +1 -1
- package/dist/{arrowhead-right-D6Hk6b6x.js → arrowhead-right-iQjcoNZb.js} +1 -1
- package/dist/{arrowhead-top-wkcSxZmc.js → arrowhead-top-DTp7fzfU.js} +1 -1
- package/dist/{atmo-CqanVC-e.js → atmo-BrG9pffw.js} +1 -1
- package/dist/{audio-BHaZEzct.js → audio-BnHB5z0H.js} +1 -1
- package/dist/{audio-DS8plcCU.js → audio-BqoT7-od.js} +1 -1
- package/dist/{bag-B28jMR7E.js → bag-eXRYZJ5d.js} +1 -1
- package/dist/{bell-k_sZgnpL.js → bell-BcqwMFZV.js} +1 -1
- package/dist/{bell-filled-7gfK8601.js → bell-filled-CCmYyi8Z.js} +1 -1
- package/dist/{book-CqUJ_JRz.js → book-DiER4Xal.js} +1 -1
- package/dist/{bookmark-D65iW--h.js → bookmark-CwFo741C.js} +1 -1
- package/dist/{bookmark-filled-5lCW1BfF.js → bookmark-filled-AlwB_za3.js} +1 -1
- package/dist/{box-BCDNtaq7.js → box-P6SzKKRE.js} +1 -1
- package/dist/{bulb-12wSYpgA.js → bulb-BZmG8P4A.js} +1 -1
- package/dist/{call-CW04DyHi.js → call-C4ZdCz85.js} +1 -1
- package/dist/{camera-CbeyxVU5.js → camera-DW62puKy.js} +1 -1
- package/dist/{check-BpPjjXqx.js → check-9wo51ATk.js} +1 -1
- package/dist/{checklist-CFCfO7IN.js → checklist-B9luxORW.js} +1 -1
- package/dist/{checkmark-DhUksPvT.js → checkmark-BP702pIx.js} +1 -1
- package/dist/{checkmark-double-BNGXAUiT.js → checkmark-double-C059sbOk.js} +1 -1
- package/dist/{chevron-down-BjZ6BFFp.js → chevron-down-BPdRPnuP.js} +1 -1
- package/dist/{chevron-left-Z-D_OY2t.js → chevron-left-DA6BCeyF.js} +1 -1
- package/dist/{chevron-right-D1GfZQB6.js → chevron-right-C1GSdP4O.js} +1 -1
- package/dist/{chevron-up-DWZ1F8w0.js → chevron-up-CQEWqhSb.js} +1 -1
- package/dist/{clipboard-CNCIToKK.js → clipboard-C_NHlsUb.js} +1 -1
- package/dist/{clock-CqWSNhFX.js → clock-neZro3_P.js} +1 -1
- package/dist/{close-oHIGT_JQ.js → close-C9n_rCkw.js} +1 -1
- package/dist/{cloud-save-CWTQ5IHS.js → cloud-save-JY1j-mAo.js} +1 -1
- package/dist/{code-BD5nOHqK.js → code-Zpa3O6Dn.js} +1 -1
- package/dist/{collapse-D6QeCZC7.js → collapse-DJWRlvmL.js} +1 -1
- package/dist/{color-palette-BpONORjj.js → color-palette-Cp5noKDc.js} +1 -1
- package/dist/{comment-D5RZxZWG.js → comment-C2qDfTCg.js} +1 -1
- package/dist/{comment-filled-Cl_qZ6Fz.js → comment-filled-BTJgoypE.js} +1 -1
- package/dist/components/UiCheckbox/UiCheckbox.vue.d.ts +35 -32
- package/dist/components/UiDialog/UiDialog.vue.d.ts +1 -0
- package/dist/components/UiListItem/UiListItem.vue.d.ts +2 -2
- package/dist/components/UiPopover/UiPopover.vue.d.ts +5 -1
- package/dist/{copy-BDnlScSS.js → copy-UeWQjnZS.js} +1 -1
- package/dist/{copy-link-BSfa58Tb.js → copy-link-DGyyBykG.js} +1 -1
- package/dist/{delete-dDyi0gau.js → delete-B4tAjAEP.js} +1 -1
- package/dist/{download-B-ZTsIBv.js → download-Cbbey3Xt.js} +1 -1
- package/dist/{dpa-id-DRnjTcHI.js → dpa-id-WofmYqQY.js} +1 -1
- package/dist/dpa-shared-components.js +2100 -2053
- package/dist/{edit-BbFkVyRd.js → edit-DjkrcJP-.js} +1 -1
- package/dist/{edit-add-CAPOsjts.js → edit-add-B_lAB6lo.js} +1 -1
- package/dist/{eil-CzEP-9Lo.js → eil-DkVC34Lp.js} +1 -1
- package/dist/{emoji-add-BB4fB4th.js → emoji-add-D_YEHkA_.js} +1 -1
- package/dist/{emoji-BjLqvypC.js → emoji-zfiF2uko.js} +1 -1
- package/dist/{envelope-DftzB5Ol.js → envelope-9IVXijl6.js} +1 -1
- package/dist/{event-FR1JMgj6.js → event-Cfxumw-I.js} +1 -1
- package/dist/{expand-DaVQ0gpz.js → expand-Br6A7VrH.js} +1 -1
- package/dist/{external-link-2Es0qWwd.js → external-link-Bp0c-YfO.js} +1 -1
- package/dist/{file-AHJ00f5M.js → file-ClbE8n4I.js} +1 -1
- package/dist/{file-pdf-CJDdjKS0.js → file-pdf-caXv18xm.js} +1 -1
- package/dist/{filter-CXjBFUUg.js → filter-Cq2XEw3l.js} +1 -1
- package/dist/{flag-CbX4PUMS.js → flag-T1AIv4IV.js} +1 -1
- package/dist/{flag-filled-VmJW-U0p.js → flag-filled-BZBPstZi.js} +1 -1
- package/dist/{flags-Buo1j-9g.js → flags-cjNp5ctY.js} +1 -1
- package/dist/{flash-Dlr5gL01.js → flash-MJdJ-tB9.js} +1 -1
- package/dist/{folder-DQwCjGZC.js → folder-L-kYlWI-.js} +1 -1
- package/dist/{folder-add-zPr2Gmtj.js → folder-add-BcUtPV2p.js} +1 -1
- package/dist/{folder-filled-D6pmcH0e.js → folder-filled-CL3WiS7M.js} +1 -1
- package/dist/{gallery-DwPWc5L2.js → gallery-01MqVCbs.js} +1 -1
- package/dist/{gallery-CfUbckcB.js → gallery-D63957fL.js} +1 -1
- package/dist/{graphic-DMZdoJT7.js → graphic-BET4N-Ym.js} +1 -1
- package/dist/{graphic-nXH5ifxc.js → graphic-BpeZpley.js} +1 -1
- package/dist/{graphics-Dp8pQzs-.js → graphics-CYTosMI0.js} +1 -1
- package/dist/{grid-1-DZUEMbtb.js → grid-1-Dd_GXV5I.js} +1 -1
- package/dist/{grid-2-BQ-9yylY.js → grid-2-O6hEMs7P.js} +1 -1
- package/dist/{grid-3-BGhZrrCJ.js → grid-3-Kk6KNP_U.js} +1 -1
- package/dist/{grid-4-DY9N435A.js → grid-4-DSJwHWUS.js} +1 -1
- package/dist/{grid-6-B0BR3wbB.js → grid-6-BE49yqiV.js} +1 -1
- package/dist/{grid-9-BWhM7qat.js → grid-9-CLSHbY93.js} +1 -1
- package/dist/{grid-masonry-9-DiiX1pQo.js → grid-masonry-9-KXh2ZVtt.js} +1 -1
- package/dist/{grid-masonry-1e9tYkSK.js → grid-masonry-jDkWqFPf.js} +1 -1
- package/dist/{help-CLfj4LQM.js → help-DOkv1RLw.js} +1 -1
- package/dist/{home-D6htLjOF.js → home-D0uqbu-I.js} +1 -1
- package/dist/{image-DnYnaoeu.js → image-DELKJAje.js} +1 -1
- package/dist/{image-focus-point-BJ7HhehR.js → image-focus-point-DBCuBJ6a.js} +1 -1
- package/dist/{impact-high-DuECIU0d.js → impact-high-C3BKUG7I.js} +1 -1
- package/dist/{impact-low-DMtzvmWi.js → impact-low-BgYzB929.js} +1 -1
- package/dist/{impact-medium-B5-WfnV2.js → impact-medium-IB_zZvAq.js} +1 -1
- package/dist/{impact-very-high-C1K1nCE9.js → impact-very-high-CSVkx_Lk.js} +1 -1
- package/dist/{impact-very-low-CXbiBK6E.js → impact-very-low-DVh9ZGv0.js} +1 -1
- package/dist/{info-Ca-64c_9.js → info-DY1LCTZM.js} +1 -1
- package/dist/{info-filled-PYbvwGmZ.js → info-filled-wA8TNuIY.js} +1 -1
- package/dist/{label-D8X5FrVe.js → label-CUYcUBlF.js} +1 -1
- package/dist/{label-filled-DjSc-Fk4.js → label-filled-CBEnYqwR.js} +1 -1
- package/dist/{language-OE6ZfER_.js → language-CWzbNjpP.js} +1 -1
- package/dist/{latest-D0dlub5f.js → latest-DVsUYHxS.js} +1 -1
- package/dist/{lightbulb-DKJrsADi.js → lightbulb-XwSQilIh.js} +1 -1
- package/dist/{list-BviTrZEl.js → list-DbykwfRA.js} +1 -1
- package/dist/{list-search-Ck6anukf.js → list-search-Dj4jZY3K.js} +1 -1
- package/dist/{lock-Dv7XHTQp.js → lock-DnV05zah.js} +1 -1
- package/dist/{lock-filled-Bi_mH2A-.js → lock-filled-cW6OXXef.js} +1 -1
- package/dist/{mail-BBU73oBg.js → mail-BcneuuIl.js} +1 -1
- package/dist/{map-ChyXZkb4.js → map-1yvffq9F.js} +1 -1
- package/dist/{map-filled-DG4BwVQo.js → map-filled-CQkoxsrX.js} +1 -1
- package/dist/{menu-Dx9cgqxe.js → menu-FljcRCEK.js} +1 -1
- package/dist/{minus-DkCYxSkQ.js → minus-BJWsuEud.js} +1 -1
- package/dist/{more-horizontal-c6TlnC21.js → more-horizontal-lC-445EF.js} +1 -1
- package/dist/{more-vertical-BUz_UWPT.js → more-vertical-DR-MEHQd.js} +1 -1
- package/dist/{move-C3IOZIl7.js → move-Bw6x5pez.js} +1 -1
- package/dist/{move-up-down-DMvukk4h.js → move-up-down-B9uIynkw.js} +1 -1
- package/dist/{navigation-BiEFOSmS.js → navigation-B2HbKa58.js} +1 -1
- package/dist/{note-SrqI5m8n.js → note-BOjEWWmP.js} +1 -1
- package/dist/{offline-UyYgVOeH.js → offline-CRUg9Kez.js} +1 -1
- package/dist/{package-CT6Qsufx.js → package-BpXfEOmv.js} +1 -1
- package/dist/{package-DlxyzZ6H.js → package-DhpGK_pI.js} +1 -1
- package/dist/{paper-plane-rpVAty7i.js → paper-plane-aEepIh1I.js} +1 -1
- package/dist/{pause-C6E6QfcV.js → pause-Ml9ITr8H.js} +1 -1
- package/dist/{pdf-B4gHF03O.js → pdf-Da1tJ5Hc.js} +1 -1
- package/dist/{pen-im8XsK0s.js → pen-BCtaAdok.js} +1 -1
- package/dist/{pen-check-CNrvx2ns.js → pen-check-ZZuT1W9y.js} +1 -1
- package/dist/{people-DzOP6pil.js → people-7gHfC0ry.js} +1 -1
- package/dist/{phone-B0pmRKLI.js → phone-BMPeOmqG.js} +1 -1
- package/dist/{picture-1NpQXh5F.js → picture-6XSKueje.js} +1 -1
- package/dist/{picture-CKfJP6Jt.js → picture-IdhoGdAy.js} +1 -1
- package/dist/{pin-BOW6sde5.js → pin-B3mHPTM4.js} +1 -1
- package/dist/{planning-DdILTFP4.js → planning-s97U_n6Z.js} +1 -1
- package/dist/{play-X3Ob-qza.js → play-Bk3fFmpa.js} +1 -1
- package/dist/{play-filled-DYyCOR9Y.js → play-filled-BR-RJd_N.js} +1 -1
- package/dist/{plus-Bh6PRV0l.js → plus-Dw3nTb_J.js} +1 -1
- package/dist/{print-BLPvvCA8.js → print-DPDfMQTz.js} +1 -1
- package/dist/{refresh-CU1dwwoY.js → refresh-1gzhEzRl.js} +1 -1
- package/dist/{reset-Dgbd_O_e.js → reset-Cqepci78.js} +1 -1
- package/dist/{responsive-BQ5xjhN4.js → responsive-HisoeUq7.js} +1 -1
- package/dist/{rubix-thema-OSZXu-Md.js → rubix-thema-D5jmA6bw.js} +1 -1
- package/dist/{save-CIg7q65b.js → save-DoP23FsL.js} +1 -1
- package/dist/{saved-search-CeLi3iw6.js → saved-search-BY5aeZXd.js} +1 -1
- package/dist/{saved-search-filled-BTrN8F4r.js → saved-search-filled-D6t8P4EP.js} +1 -1
- package/dist/{search-CQIKBYqi.js → search-Bb5cl_0r.js} +1 -1
- package/dist/{settings-BMFNH3LB.js → settings-CCxd6N9K.js} +1 -1
- package/dist/{share-DMoEV0Gq.js → share-Cpx2YjXm.js} +1 -1
- package/dist/{share-alternative-P6c3Vi7L.js → share-alternative-ZW-jTsIU.js} +1 -1
- package/dist/{sidebar-D2uDpQM0.js → sidebar-DY7SHRNO.js} +1 -1
- package/dist/{sidebar-filled-LiiR992T.js → sidebar-filled-gmJ2_ZY2.js} +1 -1
- package/dist/{slack-CP6YIaQf.js → slack-OnnXQ7Rc.js} +1 -1
- package/dist/{slider-config-B_eNooTe.js → slider-config-CPC1To1k.js} +1 -1
- package/dist/{spellcheck-B0Il_eZe.js → spellcheck-D3iOEOk5.js} +1 -1
- package/dist/{spinner-CRHdpyRR.js → spinner-DghFg6Uk.js} +1 -1
- package/dist/src/components/DpaMediaItem/DpaMediaItem.spec.ts +12 -12
- package/dist/src/components/UiBadge/UiBadge.spec.ts +3 -3
- package/dist/src/components/UiButton/UiButton.spec.ts +3 -1
- package/dist/src/components/UiButtonGroup/UiButtonGroup.spec.ts +2 -2
- package/dist/src/components/UiCard/UiCard.spec.ts +2 -2
- package/dist/src/components/UiCheckBoxGroup/UiCheckBoxGroup.spec.ts +4 -4
- package/dist/src/components/UiCheckbox/UiCheckbox.stories.ts +7 -3
- package/dist/src/components/UiCheckbox/UiCheckbox.vue +6 -2
- package/dist/src/components/UiChip/UiChip.spec.ts +3 -3
- package/dist/src/components/UiCollapseNavigation/UiCollapseNavigation.spec.ts +2 -2
- package/dist/src/components/UiColorPicker/UiColorPicker.spec.ts +5 -5
- package/dist/src/components/UiDatePicker/UiDatePicker.spec.ts +10 -10
- package/dist/src/components/UiDatePicker/UiDatePicker.stories.ts +48 -28
- package/dist/src/components/UiDialog/UiDialog.spec.ts +5 -5
- package/dist/src/components/UiDialog/UiDialog.stories.ts +1 -0
- package/dist/src/components/UiDialog/UiDialog.vue +49 -1
- package/dist/src/components/UiFilterBadge/UiFilterBadge.spec.ts +6 -6
- package/dist/src/components/UiFilterButton/UiFilterButton.spec.ts +6 -6
- package/dist/src/components/UiIcon/UiIcon.spec.ts +4 -4
- package/dist/src/components/UiIconButton/UiIconButton.spec.ts +6 -6
- package/dist/src/components/UiInfoContent/UiInfoContent.spec.ts +6 -6
- package/dist/src/components/UiInput/UiInput.stories.ts +4 -0
- package/dist/src/components/UiList/UiList.spec.ts +2 -2
- package/dist/src/components/UiListItem/UiListItem.spec.ts +8 -8
- package/dist/src/components/UiListItem/UiListItem.vue +3 -3
- package/dist/src/components/UiMenu/UiMenu.spec.ts +1 -1
- package/dist/src/components/UiMenu/UiMenu.stories.ts +81 -141
- package/dist/src/components/UiMenu/UiMenu.vue +92 -96
- package/dist/src/components/UiOverlay/UiOverlay.spec.ts +2 -2
- package/dist/src/components/UiOverlayMenu/UiOverlayMenu.spec.ts +2 -2
- package/dist/src/components/UiPopover/UiPopover.vue +23 -3
- package/dist/src/components/UiRadioButton/UiRadioButton.stories.ts +3 -3
- package/dist/src/components/UiRadioInputGroup/UiRadioInputGroup.spec.ts +4 -4
- package/dist/src/components/UiSearchBar/UiSearchBar.spec.ts +6 -6
- package/dist/src/components/UiSearchInput/UiSearchInput.spec.ts +4 -4
- package/dist/src/components/UiSection/UiSection.spec.ts +5 -5
- package/dist/src/components/UiSectionDivider/UiSectionDivider.spec.ts +3 -3
- package/dist/src/components/UiSelect/{UIiSelect.spec.ts → UiSelect.spec.ts} +16 -8
- package/dist/src/components/UiSelect/UiSelect.stories.ts +1 -1
- package/dist/src/components/UiSkeletonBox/UiSkeletonBox.spec.ts +2 -2
- package/dist/src/components/UiSnackbar/UiSnackbar.spec.ts +8 -8
- package/dist/src/components/UiSpinner/UiSpinner.spec.ts +3 -3
- package/dist/src/components/UiTextButton/UiTextButton.spec.ts +11 -11
- package/dist/src/components/UiToggleButton/UiToggleButton.spec.ts +8 -8
- package/dist/src/components/UiTooltip/UiTooltip.spec.ts +9 -9
- package/dist/{standard-view-CmlAxXrM.js → standard-view-DfvAb3iJ.js} +1 -1
- package/dist/{star-x38wQI5a.js → star-BdzEpiC-.js} +1 -1
- package/dist/{star-filled-V0iRfD5M.js → star-filled-ZgHiwVZ0.js} +1 -1
- package/dist/{stop-BKrExcb1.js → stop-ugLlg2YL.js} +1 -1
- package/dist/{story-B2rvDIJr.js → story-D7qk5t65.js} +1 -1
- package/dist/{story-6skLDsue.js → story-k_tWc66v.js} +1 -1
- package/dist/style.css +2 -2
- package/dist/{sync-DXiTJomf.js → sync-BEDhyvOB.js} +1 -1
- package/dist/{tasks-bFDeHCo2.js → tasks-CBoErOsR.js} +1 -1
- package/dist/{text-bDVoEwpJ.js → text-BGlrNBVf.js} +1 -1
- package/dist/{text-ClHl0Uhs.js → text-CK3z1Tdh.js} +1 -1
- package/dist/{thumbs-down-BAjh-Ctz.js → thumbs-down-C41UiCJp.js} +1 -1
- package/dist/{thumbs-up-double-CIPSNbd7.js → thumbs-up-double-Ciw7ATVE.js} +1 -1
- package/dist/{thumbs-up-DCwzHniR.js → thumbs-up-k3-ZlCZB.js} +1 -1
- package/dist/{topic-Cv-whi27.js → topic-CRJfSH7S.js} +1 -1
- package/dist/{union-BYS3V2vp.js → union-hTKJU_qy.js} +1 -1
- package/dist/{upload-Dvuj2qmk.js → upload-BBn5ur6w.js} +1 -1
- package/dist/{user-need-divert-me-D33Y5bma.js → user-need-divert-me-ChmAj7y-.js} +1 -1
- package/dist/{user-need-educate-me-BC53AIXw.js → user-need-educate-me-DE4GpKkh.js} +1 -1
- package/dist/{user-need-give-me-perspective-D17ApF3n.js → user-need-give-me-perspective-cgRfVC26.js} +1 -1
- package/dist/{user-need-help-me-BWdR9Tv7.js → user-need-help-me-CeEG1a-I.js} +1 -1
- package/dist/{user-need-touch-me-q1HCbpQ7.js → user-need-touch-me-DiUacvEH.js} +1 -1
- package/dist/{user-need-update-me-BItjScS5.js → user-need-update-me-Tv7ZqZG9.js} +1 -1
- package/dist/{video-BFPO-328.js → video-BV3VKnO_.js} +1 -1
- package/dist/{video-BRSUY0SQ.js → video-C1tVlag5.js} +1 -1
- package/dist/{video-overlay-DnN10S5T.js → video-overlay-D2YqsNV3.js} +1 -1
- package/dist/{view-C4Sx7i27.js → view-5sSg9uRD.js} +1 -1
- package/dist/{view-off-BtkqBEfJ.js → view-off-CxEDQRkG.js} +1 -1
- package/dist/{volume-up-_3rO2YWj.js → volume-up-DmBpcesR.js} +1 -1
- package/package.json +22 -24
- package/src/components/UiCheckbox/UiCheckbox.vue +6 -2
- package/src/components/UiDialog/UiDialog.vue +49 -1
- package/src/components/UiListItem/UiListItem.vue +3 -3
- package/src/components/UiMenu/UiMenu.vue +92 -96
- package/src/components/UiPopover/UiPopover.vue +23 -3
- /package/dist/{_plugin-vue_export-helper-BTgDAbhb.js → _plugin-vue_export-helper-B3ysoDQm.js} +0 -0
|
@@ -34,7 +34,7 @@ const meta = {
|
|
|
34
34
|
buttonAppearance: "secondary-alt",
|
|
35
35
|
filterButtonSize: undefined,
|
|
36
36
|
defaultTitle: "Default Title",
|
|
37
|
-
multiLabel: "selected
|
|
37
|
+
multiLabel: "selected options",
|
|
38
38
|
noTitle: false,
|
|
39
39
|
|
|
40
40
|
// Search
|
|
@@ -57,52 +57,61 @@ const meta = {
|
|
|
57
57
|
export default meta;
|
|
58
58
|
type Story = StoryObj<typeof meta>;
|
|
59
59
|
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
filteredOptions.value = options.value.filter((option) =>
|
|
92
|
-
option.label.toLowerCase().includes(value.toLowerCase()),
|
|
93
|
-
);
|
|
94
|
-
};
|
|
60
|
+
export const Default: Story = {
|
|
61
|
+
render: (args) => ({
|
|
62
|
+
setup() {
|
|
63
|
+
const options = ref<UiMenuOptionType<string>[]>([
|
|
64
|
+
{
|
|
65
|
+
label: "Option 1",
|
|
66
|
+
value: "value 1",
|
|
67
|
+
selected: true,
|
|
68
|
+
iconName: "info",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: "Option 2 is really long, much longer than the rest",
|
|
72
|
+
value: "value 2",
|
|
73
|
+
selected: false,
|
|
74
|
+
iconName: "alert",
|
|
75
|
+
hasDividerAbove: true,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: "Option 3",
|
|
79
|
+
value: "value 3",
|
|
80
|
+
selected: false,
|
|
81
|
+
iconName: "bulb",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: "Option 4",
|
|
85
|
+
value: "value 4",
|
|
86
|
+
selected: false,
|
|
87
|
+
iconName: "language",
|
|
88
|
+
},
|
|
89
|
+
]);
|
|
90
|
+
const filteredOptions = ref(Array.from(options.value));
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
92
|
+
const onSelect = (selectedOption: UiMenuSelectedOption<string>) => {
|
|
93
|
+
for (const option of filteredOptions.value) {
|
|
94
|
+
option.selected =
|
|
95
|
+
option.value === selectedOption.value ? true : false;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const onUpdateQuery = (value: string) => {
|
|
100
|
+
filteredOptions.value = options.value.filter((option) =>
|
|
101
|
+
option.label.toLowerCase().includes(value.toLowerCase()),
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
args,
|
|
107
|
+
onSelect,
|
|
108
|
+
onUpdateQuery,
|
|
109
|
+
filteredOptions,
|
|
110
|
+
options,
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
components: { UiMenu },
|
|
114
|
+
template: /*html*/ `
|
|
106
115
|
<aside class="w-50 h-200 p-4 bg-accent-green">
|
|
107
116
|
<UiMenu
|
|
108
117
|
v-bind="args"
|
|
@@ -113,32 +122,14 @@ const renderDefault: Story["render"] = (args) => ({
|
|
|
113
122
|
/>
|
|
114
123
|
</aside>
|
|
115
124
|
`,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
export const Default: Story = {
|
|
123
|
-
render: renderDefault,
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export const WithResetAndSearch: Story = {
|
|
127
|
-
render: renderDefault,
|
|
128
|
-
args: {
|
|
129
|
-
hasResetOption: true,
|
|
130
|
-
hasSearch: true,
|
|
131
|
-
resetLabel: "Zurücksetzen",
|
|
132
|
-
searchPlaceholder: "Suchen",
|
|
133
|
-
buttonAppearance: "secondary-alt",
|
|
134
|
-
listVariant: "checkbox",
|
|
135
|
-
checkboxSize: "sm",
|
|
136
|
-
defaultTitle: "Optionen",
|
|
137
|
-
hasAutoFocus: true,
|
|
138
|
-
},
|
|
125
|
+
methods: {
|
|
126
|
+
optionSelected: action("option-selected"),
|
|
127
|
+
updateQuery: action("update:query"),
|
|
128
|
+
},
|
|
129
|
+
}),
|
|
139
130
|
};
|
|
140
131
|
|
|
141
|
-
export const
|
|
132
|
+
export const GroupedOptions: Story = {
|
|
142
133
|
args: {
|
|
143
134
|
hasResetOption: true,
|
|
144
135
|
hasSearch: true,
|
|
@@ -224,17 +215,19 @@ export const WithGroupedOptions: Story = {
|
|
|
224
215
|
},
|
|
225
216
|
]);
|
|
226
217
|
const filteredOptions = ref(Array.from(groupedOptions.value));
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
218
|
+
|
|
219
|
+
const onSelect = (selectedOption: UiMenuSelectedOption<string>) => {
|
|
220
|
+
for (const { options } of filteredOptions.value) {
|
|
221
|
+
const option = options.find(
|
|
222
|
+
({ value }) => value === selectedOption.value,
|
|
223
|
+
);
|
|
224
|
+
if (option) {
|
|
225
|
+
option.selected = !option.selected;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
237
229
|
};
|
|
230
|
+
|
|
238
231
|
const onUpdateQuery = (value: string) => {
|
|
239
232
|
filteredOptions.value = groupedOptions.value.map(
|
|
240
233
|
({ groupLabel, options }) => ({
|
|
@@ -255,7 +248,7 @@ export const WithGroupedOptions: Story = {
|
|
|
255
248
|
};
|
|
256
249
|
},
|
|
257
250
|
components: { UiMenu },
|
|
258
|
-
template: `
|
|
251
|
+
template: /*html*/ `
|
|
259
252
|
<UiMenu
|
|
260
253
|
v-bind="args"
|
|
261
254
|
v-model:query="args.query"
|
|
@@ -292,67 +285,15 @@ export const WithImages: Story = {
|
|
|
292
285
|
},
|
|
293
286
|
]);
|
|
294
287
|
const filteredOptions = ref(Array.from(options.value));
|
|
295
|
-
const onSelect = (option: UiMenuSelectedOption<string>) => {
|
|
296
|
-
filteredOptions.value[option.index].selected =
|
|
297
|
-
!filteredOptions.value[option.index].selected;
|
|
298
|
-
};
|
|
299
|
-
const onUpdateQuery = (value: string) => {
|
|
300
|
-
filteredOptions.value = options.value.filter((option) =>
|
|
301
|
-
option.label.toLowerCase().includes(value.toLowerCase()),
|
|
302
|
-
);
|
|
303
|
-
};
|
|
304
288
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
289
|
+
const onSelect = (selectedOption: UiMenuSelectedOption<string>) => {
|
|
290
|
+
for (const option of filteredOptions.value) {
|
|
291
|
+
if (option.value === selectedOption.value) {
|
|
292
|
+
option.selected = !option.selected;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
311
295
|
};
|
|
312
|
-
},
|
|
313
|
-
components: { UiMenu },
|
|
314
|
-
template: `
|
|
315
|
-
<UiMenu
|
|
316
|
-
v-bind="args"
|
|
317
|
-
v-model:query="args.query"
|
|
318
|
-
:options="filteredOptions"
|
|
319
|
-
@option-selected="(option)=> { onSelect(option); optionSelected(option); }"
|
|
320
|
-
@update:query="(value) => { onUpdateQuery(value); updateQuery(value); }"
|
|
321
|
-
/>
|
|
322
|
-
`,
|
|
323
|
-
methods: {
|
|
324
|
-
optionSelected: action("option-selected"),
|
|
325
|
-
updateQuery: action("update:query"),
|
|
326
|
-
},
|
|
327
|
-
}),
|
|
328
|
-
args: {
|
|
329
|
-
listVariant: "checkbox",
|
|
330
|
-
checkboxSize: "sm",
|
|
331
|
-
},
|
|
332
|
-
};
|
|
333
296
|
|
|
334
|
-
export const WithIcons: Story = {
|
|
335
|
-
render: (args) => ({
|
|
336
|
-
setup() {
|
|
337
|
-
const options = ref<UiMenuOptionType<string>[]>([
|
|
338
|
-
{
|
|
339
|
-
label: "Update me",
|
|
340
|
-
value: "updateme",
|
|
341
|
-
selected: true,
|
|
342
|
-
iconName: "user-need-update-me",
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
label: "Help me",
|
|
346
|
-
value: "helpme",
|
|
347
|
-
selected: true,
|
|
348
|
-
iconName: "user-need-help-me",
|
|
349
|
-
},
|
|
350
|
-
]);
|
|
351
|
-
const filteredOptions = ref(Array.from(options.value));
|
|
352
|
-
const onSelect = (option: UiMenuSelectedOption<string>) => {
|
|
353
|
-
filteredOptions.value[option.index].selected =
|
|
354
|
-
!filteredOptions.value[option.index].selected;
|
|
355
|
-
};
|
|
356
297
|
const onUpdateQuery = (value: string) => {
|
|
357
298
|
filteredOptions.value = options.value.filter((option) =>
|
|
358
299
|
option.label.toLowerCase().includes(value.toLowerCase()),
|
|
@@ -368,12 +309,11 @@ export const WithIcons: Story = {
|
|
|
368
309
|
};
|
|
369
310
|
},
|
|
370
311
|
components: { UiMenu },
|
|
371
|
-
template: `
|
|
312
|
+
template: /*html*/ `
|
|
372
313
|
<UiMenu
|
|
373
314
|
v-bind="args"
|
|
374
315
|
v-model:query="args.query"
|
|
375
316
|
:options="filteredOptions"
|
|
376
|
-
:button-variant="filteredOptions.some((option) => option.selected) ? 'primary' : 'secondary-alt'"
|
|
377
317
|
@option-selected="(option)=> { onSelect(option); optionSelected(option); }"
|
|
378
318
|
@update:query="(value) => { onUpdateQuery(value); updateQuery(value); }"
|
|
379
319
|
/>
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<UiPopover
|
|
2
|
+
<UiPopover
|
|
3
|
+
:initially-open="isOpen"
|
|
4
|
+
:animate
|
|
5
|
+
:placement="floatingUiPlacement"
|
|
6
|
+
@toggle="$event ? $emit('open') : $emit('close')"
|
|
7
|
+
>
|
|
3
8
|
<template #button="{ toggle, isOpen: isPopoverOpen }">
|
|
4
9
|
<UiButton
|
|
5
10
|
class="w-full justify-between"
|
|
@@ -10,10 +15,7 @@
|
|
|
10
15
|
:disabled
|
|
11
16
|
:size="filterButtonSize"
|
|
12
17
|
data-testid="menu-button"
|
|
13
|
-
@click="
|
|
14
|
-
toggle();
|
|
15
|
-
isPopoverOpen ? $emit('close') : $emit('open');
|
|
16
|
-
"
|
|
18
|
+
@click="toggle"
|
|
17
19
|
>
|
|
18
20
|
<div class="flex items-center gap-2">
|
|
19
21
|
<UiIcon v-if="iconLeft" :name="iconLeft" size="sm" />
|
|
@@ -23,106 +25,100 @@
|
|
|
23
25
|
</UiButton>
|
|
24
26
|
</template>
|
|
25
27
|
|
|
26
|
-
<
|
|
28
|
+
<div
|
|
29
|
+
class="block w-max max-w-full divide-y overflow-hidden rounded-sm text-base/6 shadow-lg focus:outline-hidden sm:text-sm/5"
|
|
30
|
+
>
|
|
27
31
|
<div
|
|
28
|
-
|
|
32
|
+
v-if="hasSearch"
|
|
33
|
+
class="flex items-center gap-2 rounded-t-sm px-4 py-2 text-neutral-primary [&:has(>input:focus-visible)]:focus-outline [&:has(>input:focus-visible)]:-outline-offset-2"
|
|
29
34
|
>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
:placeholder="searchPlaceholder"
|
|
46
|
-
data-testid="menu-search-input"
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
35
|
+
<UiIcon
|
|
36
|
+
class="shrink-0 text-neutral-emphasis"
|
|
37
|
+
name="search"
|
|
38
|
+
size="sm"
|
|
39
|
+
/>
|
|
40
|
+
<input
|
|
41
|
+
ref="search-input"
|
|
42
|
+
v-model="queryModel"
|
|
43
|
+
type="text"
|
|
44
|
+
spellcheck="false"
|
|
45
|
+
class="w-full text-sm focus:outline-hidden"
|
|
46
|
+
:placeholder="searchPlaceholder"
|
|
47
|
+
data-testid="menu-search-input"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
<slot
|
|
52
|
+
v-bind="{
|
|
53
|
+
checkboxAppearance,
|
|
54
|
+
checkboxSize,
|
|
55
|
+
iconSize,
|
|
56
|
+
imageShape,
|
|
57
|
+
listVariant,
|
|
58
|
+
options,
|
|
59
|
+
groupedOptions,
|
|
60
|
+
}"
|
|
61
|
+
>
|
|
62
|
+
<ul
|
|
63
|
+
v-if="processedOptions.some(({ options }) => options.length > 0)"
|
|
64
|
+
class="max-h-80 overflow-y-auto"
|
|
65
|
+
data-testid="menu-option-list"
|
|
60
66
|
>
|
|
61
|
-
<
|
|
62
|
-
v-
|
|
63
|
-
|
|
64
|
-
data-testid="menu-option-list"
|
|
67
|
+
<template
|
|
68
|
+
v-for="group in processedOptions"
|
|
69
|
+
:key="`group-${group.groupLabel ?? 'default'}`"
|
|
65
70
|
>
|
|
66
|
-
<template
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class="flex h-6 items-center bg-neutral-whisper px-4 text-xs font-semibold tracking-wider text-neutral-subtle uppercase"
|
|
74
|
-
>
|
|
75
|
-
{{ group.groupLabel }}
|
|
76
|
-
</li>
|
|
71
|
+
<template v-if="group.options.length > 0">
|
|
72
|
+
<li
|
|
73
|
+
v-if="group.groupLabel"
|
|
74
|
+
class="flex h-6 items-center bg-neutral-whisper px-4 text-xs font-semibold tracking-wider text-neutral-subtle uppercase"
|
|
75
|
+
>
|
|
76
|
+
{{ group.groupLabel }}
|
|
77
|
+
</li>
|
|
77
78
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (shouldCloseMenu) {
|
|
100
|
-
close();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
"
|
|
104
|
-
>{{ option.label }}</UiListItem
|
|
105
|
-
>
|
|
106
|
-
</template>
|
|
79
|
+
<UiListItem
|
|
80
|
+
v-for="(option, index) in group.options"
|
|
81
|
+
:key="`option-${option.value}`"
|
|
82
|
+
:selected="option.selected"
|
|
83
|
+
:selectable="listVariant === 'selectable'"
|
|
84
|
+
:is-checked="option.selected"
|
|
85
|
+
:check-box-menu="listVariant === 'checkbox'"
|
|
86
|
+
:icon-size="iconSize"
|
|
87
|
+
:image-shape="imageShape"
|
|
88
|
+
:image-src="option.imageSrc"
|
|
89
|
+
:icon-name="option.iconName"
|
|
90
|
+
:checkbox-size="checkboxSize"
|
|
91
|
+
:checkbox-appearance="checkboxAppearance"
|
|
92
|
+
class="hover:bg-neutral-whisper focus:bg-neutral-faint"
|
|
93
|
+
:class="{
|
|
94
|
+
'border-t': option.hasDividerAbove,
|
|
95
|
+
}"
|
|
96
|
+
:data-testid="`menu-option-button-${index}`"
|
|
97
|
+
@list-item-click="selectOption(option)"
|
|
98
|
+
>{{ option.label }}</UiListItem
|
|
99
|
+
>
|
|
107
100
|
</template>
|
|
108
|
-
</
|
|
109
|
-
</
|
|
101
|
+
</template>
|
|
102
|
+
</ul>
|
|
103
|
+
</slot>
|
|
110
104
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
105
|
+
<div v-if="hasResetOption" class="px-4 py-2 text-neutral-primary">
|
|
106
|
+
<UiButton
|
|
107
|
+
appearance="secondary"
|
|
108
|
+
:disabled="disabledReset"
|
|
109
|
+
icon-name="reset"
|
|
110
|
+
size="xs"
|
|
111
|
+
data-testid="menu-search-reset-button"
|
|
112
|
+
@click="
|
|
113
|
+
queryModel = '';
|
|
114
|
+
$emit('reset');
|
|
115
|
+
"
|
|
116
|
+
>
|
|
117
|
+
<UiIcon name="reset" />
|
|
118
|
+
{{ resetLabel }}
|
|
119
|
+
</UiButton>
|
|
124
120
|
</div>
|
|
125
|
-
</
|
|
121
|
+
</div>
|
|
126
122
|
</UiPopover>
|
|
127
123
|
</template>
|
|
128
124
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { mount } from "@vue/test-utils";
|
|
2
|
-
import { describe, expect,
|
|
2
|
+
import { describe, expect, test } from "vitest";
|
|
3
3
|
|
|
4
4
|
import UiOverlay from "./UiOverlay.vue";
|
|
5
5
|
|
|
6
6
|
describe("UiOverlay", () => {
|
|
7
7
|
const wrapper = mount(UiOverlay, {});
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
test("emits correct event when clicked", async () => {
|
|
10
10
|
const bg = wrapper.find('[data-testid="background"]');
|
|
11
11
|
|
|
12
12
|
await bg.trigger("click");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mount } from "@vue/test-utils";
|
|
2
|
-
import { describe, expect,
|
|
2
|
+
import { describe, expect, test } from "vitest";
|
|
3
3
|
|
|
4
4
|
import { vClickAway } from "../../directives/vClickAway.ts";
|
|
5
5
|
import UiButton from "../UiButton/UiButton.vue";
|
|
@@ -26,7 +26,7 @@ describe("UiOverlayMenu", () => {
|
|
|
26
26
|
attachTo: document.getElementById("app") || "#app",
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
test("emits correct event when clicked outside of slot content", async () => {
|
|
30
30
|
await buttonWrapper.trigger("mousedown");
|
|
31
31
|
expect(overlayWrapper.emitted().close).toBeTruthy();
|
|
32
32
|
});
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
ref="reference"
|
|
4
|
+
v-click-away="
|
|
5
|
+
() => {
|
|
6
|
+
if (isOpen) {
|
|
7
|
+
close();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
"
|
|
11
|
+
class="w-fit"
|
|
12
|
+
@click="update"
|
|
13
|
+
>
|
|
3
14
|
<slot name="button" v-bind="{ open, close, toggle, isOpen }" />
|
|
4
15
|
|
|
5
16
|
<Transition :name="animate ? 'fade-up' : 'none'">
|
|
@@ -25,7 +36,7 @@ import {
|
|
|
25
36
|
shift,
|
|
26
37
|
useFloating,
|
|
27
38
|
} from "@floating-ui/vue";
|
|
28
|
-
import { ref, useTemplateRef } from "vue";
|
|
39
|
+
import { ref, useTemplateRef, watch } from "vue";
|
|
29
40
|
|
|
30
41
|
import { vClickAway } from "../../directives/vClickAway.ts";
|
|
31
42
|
|
|
@@ -61,9 +72,12 @@ const {
|
|
|
61
72
|
placement?: Placement;
|
|
62
73
|
}>();
|
|
63
74
|
|
|
75
|
+
const emit = defineEmits<{
|
|
76
|
+
toggle: [isOpen: boolean];
|
|
77
|
+
}>();
|
|
78
|
+
|
|
64
79
|
const reference = useTemplateRef("reference");
|
|
65
80
|
const floating = useTemplateRef("floating");
|
|
66
|
-
const isOpen = ref(initiallyOpen);
|
|
67
81
|
|
|
68
82
|
const { floatingStyles, update } = useFloating(reference, floating, {
|
|
69
83
|
placement,
|
|
@@ -71,6 +85,12 @@ const { floatingStyles, update } = useFloating(reference, floating, {
|
|
|
71
85
|
whileElementsMounted: autoUpdate,
|
|
72
86
|
});
|
|
73
87
|
|
|
88
|
+
const isOpen = ref(initiallyOpen);
|
|
89
|
+
|
|
90
|
+
watch(isOpen, (isOpen) => {
|
|
91
|
+
emit("toggle", isOpen);
|
|
92
|
+
});
|
|
93
|
+
|
|
74
94
|
function open() {
|
|
75
95
|
isOpen.value = true;
|
|
76
96
|
}
|
|
@@ -44,7 +44,7 @@ export const Default: Story = {
|
|
|
44
44
|
setup() {
|
|
45
45
|
return { args };
|
|
46
46
|
},
|
|
47
|
-
template: `
|
|
47
|
+
template: /*html*/ `
|
|
48
48
|
<UiRadioButton v-bind="args">
|
|
49
49
|
{{ args.default }}
|
|
50
50
|
<template v-if="args.errors" #errors>
|
|
@@ -64,7 +64,7 @@ export const Errors: Story = {
|
|
|
64
64
|
setup() {
|
|
65
65
|
return { args };
|
|
66
66
|
},
|
|
67
|
-
template: `
|
|
67
|
+
template: /*html*/ `
|
|
68
68
|
<UiRadioButton v-bind="args">
|
|
69
69
|
{{ args.default }}
|
|
70
70
|
<template #errors>
|
|
@@ -83,7 +83,7 @@ export const Group: Story = {
|
|
|
83
83
|
|
|
84
84
|
return { args, language };
|
|
85
85
|
},
|
|
86
|
-
template: `
|
|
86
|
+
template: /*html*/ `
|
|
87
87
|
<div class="space-y-2">
|
|
88
88
|
<UiRadioButton v-model="language" name="language" v-bind="args" value="en">English</UiRadioButton>
|
|
89
89
|
<UiRadioButton v-model="language" name="language" v-bind="args" value="de">German</UiRadioButton>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { mount } from "@vue/test-utils";
|
|
2
|
-
import { describe, expect,
|
|
2
|
+
import { describe, expect, test } from "vitest";
|
|
3
3
|
|
|
4
4
|
import UiRadioInputGroup from "./UiRadioInputGroup.vue";
|
|
5
5
|
|
|
6
6
|
describe("UiRadioInputGroup", () => {
|
|
7
|
-
|
|
7
|
+
test("renders UiRadioInputGroup with props content", () => {
|
|
8
8
|
const wrapper = mount(UiRadioInputGroup, {
|
|
9
9
|
props: {
|
|
10
10
|
options: [
|
|
@@ -20,7 +20,7 @@ describe("UiRadioInputGroup", () => {
|
|
|
20
20
|
expect(wrapper.text()).toBe("default name");
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
test("should click change value", async () => {
|
|
24
24
|
const wrapper = mount(UiRadioInputGroup, {
|
|
25
25
|
props: {
|
|
26
26
|
modelValue: "default value",
|
|
@@ -45,7 +45,7 @@ describe("UiRadioInputGroup", () => {
|
|
|
45
45
|
expect(wrapper.props("modelValue")).toBe("second option");
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
test("renders attributes on correct element", () => {
|
|
49
49
|
const wrapper = mount(UiRadioInputGroup, {
|
|
50
50
|
props: {
|
|
51
51
|
options: [],
|