@dpa-id-components/dpa-shared-components 18.0.3 → 18.1.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.
Files changed (242) hide show
  1. package/README.md +19 -1
  2. package/dist/{activities-D8-N1-9U.js → activities-BhRhDOlb.js} +1 -1
  3. package/dist/{ai-RQ8kp8x-.js → ai-C7dKOX-f.js} +1 -1
  4. package/dist/{alert-vNfEACwx.js → alert-D2rNwxow.js} +1 -1
  5. package/dist/{alert-fill-rnf1WDZZ.js → alert-fill-BXmkV8eq.js} +1 -1
  6. package/dist/{alert-octagon-Bf9rhJ-t.js → alert-octagon-BPFgjTgR.js} +1 -1
  7. package/dist/{apps-BF11JWhM.js → apps-Cm2_R-aL.js} +1 -1
  8. package/dist/{archive-MqHKfmIJ.js → archive-D5JUYYJU.js} +1 -1
  9. package/dist/{arrow-down-DPT8wNZ7.js → arrow-down-D4LfUvya.js} +1 -1
  10. package/dist/{arrow-left-CVXdU5MB.js → arrow-left-Dp04ad2H.js} +1 -1
  11. package/dist/{arrow-nav-left-CPfHZMpd.js → arrow-nav-left-NF0lMqOL.js} +1 -1
  12. package/dist/{arrow-nav-right-D35fcvsI.js → arrow-nav-right-nCu8i5He.js} +1 -1
  13. package/dist/{arrow-right-DJBY3wj4.js → arrow-right-D66X1i1j.js} +1 -1
  14. package/dist/{arrow-up-BLSkG6x9.js → arrow-up-DYYm-SpK.js} +1 -1
  15. package/dist/{arrowhead-left-euGMBv4F.js → arrowhead-left-C_in-SkM.js} +1 -1
  16. package/dist/{arrowhead-right-lwOYqbB4.js → arrowhead-right-BVW4OzlW.js} +1 -1
  17. package/dist/{arrowhead-top-6FTexgFT.js → arrowhead-top-D4JznBoD.js} +1 -1
  18. package/dist/assets/icons/picture-gallery.vue.d.ts +2 -0
  19. package/dist/{atmo-DAU2uzDv.js → atmo-CoaQJ5Z1.js} +1 -1
  20. package/dist/{audio-DwP94SEK.js → audio-DHDsZE00.js} +1 -1
  21. package/dist/{audio-circled-7R-7sncX.js → audio-circled-BYW-lYJU.js} +1 -1
  22. package/dist/{audio-filled-D3dWp_uy.js → audio-filled-oiehd7FS.js} +1 -1
  23. package/dist/{bag-CMw3XdoZ.js → bag-CKRBwfSw.js} +1 -1
  24. package/dist/{bell-Cdp869n7.js → bell-XMnYjRes.js} +1 -1
  25. package/dist/{bell-fill-B4DML6Tk.js → bell-fill-Bla_Yjt0.js} +1 -1
  26. package/dist/{book-CveJMqSf.js → book-MyDStgWT.js} +1 -1
  27. package/dist/{bookmark-DWT0y5zx.js → bookmark-9hEvl45K.js} +1 -1
  28. package/dist/{bookmark-fill-zzz6mr5W.js → bookmark-fill-DjVGdf8c.js} +1 -1
  29. package/dist/{bookmark-outlined-DnublF2q.js → bookmark-outlined-xu1B0AKI.js} +1 -1
  30. package/dist/{box-Cz_MWCS1.js → box-ydpm1tk4.js} +1 -1
  31. package/dist/{bulb-DFGsawSw.js → bulb-BSo_piVr.js} +1 -1
  32. package/dist/{call-DUqC_rJG.js → call-D9OC-7W4.js} +1 -1
  33. package/dist/{camera-DdNTYE0h.js → camera-kXOWvOoC.js} +1 -1
  34. package/dist/{check-vXGHmcIW.js → check-NSQ5iBNs.js} +1 -1
  35. package/dist/{checklist-FZAjX_BR.js → checklist-CvvFBmGK.js} +1 -1
  36. package/dist/{checkmark-DK1r_ANi.js → checkmark-DbiyQ8XG.js} +1 -1
  37. package/dist/{checkmark-double-CsLZ6qUd.js → checkmark-double-DseEPieP.js} +1 -1
  38. package/dist/{chevron-down-DZ3hWDQE.js → chevron-down-DZNvyf86.js} +1 -1
  39. package/dist/{chevron-left-Bc3_cUip.js → chevron-left-BSPiU-Q-.js} +1 -1
  40. package/dist/{chevron-right-CKqYcLz9.js → chevron-right-CoFDL1Jp.js} +1 -1
  41. package/dist/{chevron-up-LxMAdsrI.js → chevron-up-BzjT5MVb.js} +1 -1
  42. package/dist/{clipboard-BHiq4tWW.js → clipboard-_RKV4XvZ.js} +1 -1
  43. package/dist/{clock-B9JO34oX.js → clock-D7pC-Az0.js} +1 -1
  44. package/dist/{close-CXEY4oGs.js → close-DcD1_swZ.js} +1 -1
  45. package/dist/{cloud-save-wTW8REhy.js → cloud-save-B4XnLwo5.js} +1 -1
  46. package/dist/{code-BFxwrUFX.js → code-DyeAnvJL.js} +1 -1
  47. package/dist/{collapse-C-EUuoRP.js → collapse-Ev8ER1sf.js} +1 -1
  48. package/dist/{color-palette-CDLnyqhg.js → color-palette-B8j83wVH.js} +1 -1
  49. package/dist/{comment-D1zaXBXs.js → comment-BU2TeSc5.js} +1 -1
  50. package/dist/{comment-fill-Skg3w0oH.js → comment-fill-DCwGsRk9.js} +1 -1
  51. package/dist/components/UiAutocomplete/UiAutocomplete.vue.d.ts +2 -0
  52. package/dist/components/UiCheckbox/UiCheckbox.vue.d.ts +12 -0
  53. package/dist/components/UiIcon/icons.d.ts +1 -0
  54. package/dist/components/UiInput/UiInput.vue.d.ts +14 -0
  55. package/dist/components/UiLabel/UiLabel.vue.d.ts +25 -0
  56. package/dist/components/UiMenu/UiMenu.vue.d.ts +1 -1
  57. package/dist/components/UiSearchInput/UiSearchInput.vue.d.ts +20 -2
  58. package/dist/components/UiSelect/UiSelect.vue.d.ts +54 -0
  59. package/dist/components/UiToggleButton/UiToggleButton.vue.d.ts +12 -2
  60. package/dist/components/index.d.ts +3 -1
  61. package/dist/{copy-CiiEgzyv.js → copy-ZmoChZPa.js} +1 -1
  62. package/dist/{copy-link-8AvIH4Kv.js → copy-link-B17EtN22.js} +1 -1
  63. package/dist/{delete-DK2Xv6_w.js → delete-kp4jY4VC.js} +1 -1
  64. package/dist/{download-CTcsTYDH.js → download-Cg3Mfd1F.js} +1 -1
  65. package/dist/{dpa-id-DR3Lsgsb.js → dpa-id-ClTNNulu.js} +1 -1
  66. package/dist/dpa-shared-components.js +32 -30
  67. package/dist/{edit-Cz6AgY_t.js → edit-Bki_XTEC.js} +1 -1
  68. package/dist/{edit-add-GKxsClJo.js → edit-add-B0coqr__.js} +1 -1
  69. package/dist/{eil-CDG5Jr-7.js → eil-DRG6fPII.js} +1 -1
  70. package/dist/{emoji-DvBX_j4t.js → emoji-Cf1T-KUQ.js} +1 -1
  71. package/dist/{emoji-add-BOTrfthG.js → emoji-add-DqGIC6hb.js} +1 -1
  72. package/dist/{envelope-CtqN8tx5.js → envelope-CSTV28Yv.js} +1 -1
  73. package/dist/{event-DMWWJwsx.js → event-BwEYFOuJ.js} +1 -1
  74. package/dist/{expand-CoW3UgwX.js → expand-DNHPrmK0.js} +1 -1
  75. package/dist/{external-link-COjgJXTi.js → external-link-BuR-VGNU.js} +1 -1
  76. package/dist/{file-D-LSRIUo.js → file-BjhFi2IL.js} +1 -1
  77. package/dist/{file-pdf-DCCQ_a9C.js → file-pdf-BHf-2EMk.js} +1 -1
  78. package/dist/{filter-D5OcBw41.js → filter-BT19RdxK.js} +1 -1
  79. package/dist/{filter-outline-3LfSX6Lo.js → filter-outline-F6nz5Bpv.js} +1 -1
  80. package/dist/{flag-BtpRIItL.js → flag-CgG9oBN_.js} +1 -1
  81. package/dist/{flag-fill-DdVhHzvR.js → flag-fill-BaJ2y1KO.js} +1 -1
  82. package/dist/{flag-filled-B8Z6O36x.js → flag-filled-VB61P7io.js} +1 -1
  83. package/dist/{flag-outline-BIaFD8MB.js → flag-outline-DxA60mar.js} +1 -1
  84. package/dist/{flags-CNOJmS43.js → flags-BoKaz6G3.js} +1 -1
  85. package/dist/{flash-BAdWmU_R.js → flash-Y4tcmzfR.js} +1 -1
  86. package/dist/{folder-By4NLjbd.js → folder-XvaWfgWv.js} +1 -1
  87. package/dist/{folder-add-CcQldCUB.js → folder-add-6CZrU-DR.js} +1 -1
  88. package/dist/{folder-fill-FJgJQHVG.js → folder-fill-KIXzynSA.js} +1 -1
  89. package/dist/{folder-filled-CTK9bk-B.js → folder-filled-B1KH5ftl.js} +1 -1
  90. package/dist/{gallery-iX0eBg-7.js → gallery-BkItUHtv.js} +1 -1
  91. package/dist/{graphic-b8tfGL-U.js → graphic-CtmVrWFt.js} +1 -1
  92. package/dist/{graphic-circled-CkNVp9_g.js → graphic-circled-g4_avs-O.js} +1 -1
  93. package/dist/{graphic-filled-CgNQ3iBp.js → graphic-filled-D7puYjZ3.js} +1 -1
  94. package/dist/{graphics-BLa_Nfuv.js → graphics-CFpLrSml.js} +1 -1
  95. package/dist/{grid-1-4n8PoHrT.js → grid-1-Cx0q8kBw.js} +1 -1
  96. package/dist/{grid-2-BYh4OW3v.js → grid-2-De-14OuV.js} +1 -1
  97. package/dist/{grid-3-ZSytMQOF.js → grid-3-D4xY7BZ0.js} +1 -1
  98. package/dist/{grid-4-DAFZj1xY.js → grid-4-DWZ7WVG_.js} +1 -1
  99. package/dist/{grid-6-BAbM1ng2.js → grid-6-Dy1Qqd9J.js} +1 -1
  100. package/dist/{grid-9-BF2ZxrJH.js → grid-9-C0JG04wt.js} +1 -1
  101. package/dist/{grid-masonry-9-DBJUSTYS.js → grid-masonry-9-ShvPSsDK.js} +1 -1
  102. package/dist/{grid-masonry-xBk_-mNZ.js → grid-masonry-BNXF8_7C.js} +1 -1
  103. package/dist/{help-Cv0GeVz6.js → help-yy-azDe4.js} +1 -1
  104. package/dist/{home-CIhA7CAP.js → home-CbjD3lFF.js} +1 -1
  105. package/dist/{image focus point-BT71lPQX.js → image focus point-Cv3Q7T8w.js } +1 -1
  106. package/dist/{image-DgVQtH95.js → image-D7edNk-C.js} +1 -1
  107. package/dist/{impact-high-C-3099r5.js → impact-high-Bnsk5YsA.js} +1 -1
  108. package/dist/{impact-low-B3suyIqr.js → impact-low-CK-fLvjS.js} +1 -1
  109. package/dist/{impact-medium-CKzJm3-k.js → impact-medium-CmGfiR0q.js} +1 -1
  110. package/dist/{impact-very-high-KGQvMGb4.js → impact-very-high-CUsJ_26t.js} +1 -1
  111. package/dist/{impact-very-low-DUPeyNgf.js → impact-very-low-rHoskEmi.js} +1 -1
  112. package/dist/{index-C1RfWXaF.js → index-DPTr_CW4.js} +3913 -3807
  113. package/dist/{info-CGpjEUvT.js → info-DyGrTLDs.js} +1 -1
  114. package/dist/{info-fill-0IVmY3H1.js → info-fill-DpBY1kXH.js} +1 -1
  115. package/dist/{info-filled-BFuUOGvZ.js → info-filled-CTwiqqLB.js} +1 -1
  116. package/dist/{label-Bg-gQjZM.js → label-DibCUknb.js} +1 -1
  117. package/dist/{label-filled-C94sEKcA.js → label-filled-RM4axxFO.js} +1 -1
  118. package/dist/{language-DcN0I_fl.js → language-C3oWb3pn.js} +1 -1
  119. package/dist/{latest-CyvY0aJh.js → latest-BI0ob85J.js} +1 -1
  120. package/dist/{lightbulb-CuP4wTmB.js → lightbulb-CnWbpapX.js} +1 -1
  121. package/dist/{list-BX38cM-1.js → list-1fajhqjy.js} +1 -1
  122. package/dist/{list-search-C3JqEuzT.js → list-search--F238TI5.js} +1 -1
  123. package/dist/{lock-filled-G56jgqlc.js → lock-filled-BLm0tRpx.js} +1 -1
  124. package/dist/{lock-Kj-VxTKJ.js → lock-qHiUVvb6.js} +1 -1
  125. package/dist/{mail-gKADNLru.js → mail-BwVLL_CQ.js} +1 -1
  126. package/dist/{map-CZu2knGx.js → map-SD_wDBoB.js} +1 -1
  127. package/dist/{map-outline-wfiFWF-W.js → map-outline-Blwf07ko.js} +1 -1
  128. package/dist/{menu-CrN_vLpX.js → menu-CJMzUGhg.js} +1 -1
  129. package/dist/{minus-i_VNaesL.js → minus-NMYYPN4G.js} +1 -1
  130. package/dist/{more-horizontal-C7u-NuOt.js → more-horizontal-CR7H4XJf.js} +1 -1
  131. package/dist/{more-vertical-B6ZXU_oV.js → more-vertical-DRi2KUBF.js} +1 -1
  132. package/dist/{move-CgyXIsuM.js → move-CnXcnaI-.js} +1 -1
  133. package/dist/{move-up-down-_RoFws_y.js → move-up-down-B-MGteUJ.js} +1 -1
  134. package/dist/{navigation-DBW-JMVr.js → navigation-C6_-fobC.js} +1 -1
  135. package/dist/{note-C5ghT6df.js → note-D_l95t3P.js} +1 -1
  136. package/dist/{offline-JCt_xV2i.js → offline-B-KVP0PH.js} +1 -1
  137. package/dist/{package-DlrWo255.js → package-CKKAsIyR.js} +1 -1
  138. package/dist/{paper-plane-lDiFdS9l.js → paper-plane-CXv4S955.js} +1 -1
  139. package/dist/{paperplane-Dh_HsMFm.js → paperplane-Dd72tRkT.js} +1 -1
  140. package/dist/{pause-hshL7m0v.js → pause-B-_Xr0gu.js} +1 -1
  141. package/dist/{pause-circle-CWJ7wvV-.js → pause-circle-qdguAsne.js} +1 -1
  142. package/dist/{pdf-ByMAr_pf.js → pdf-kF-z2ep4.js} +1 -1
  143. package/dist/{pen-DkpP8zBz.js → pen-D8Uh2zQl.js} +1 -1
  144. package/dist/{pen-check-CTtwOx0W.js → pen-check-Bps1eJIa.js} +1 -1
  145. package/dist/{people-DcHG120j.js → people-D0i7Dff8.js} +1 -1
  146. package/dist/{phone-DKntGYS-.js → phone-DfT09W5t.js} +1 -1
  147. package/dist/{picture-B24FpQ_g.js → picture-CGMbzcYY.js} +1 -1
  148. package/dist/{picture-circled-BdXYsf-z.js → picture-circled-C5xr6a5V.js} +1 -1
  149. package/dist/{picture-filled-Cqisawxc.js → picture-filled-bCFwoxTK.js} +1 -1
  150. package/dist/picture-gallery-Ny7XwbWp.js +18 -0
  151. package/dist/{pin-C9pHZbCB.js → pin-BRQSAE3B.js} +1 -1
  152. package/dist/{planning-DZyCVtNT.js → planning-muG3T-6d.js} +1 -1
  153. package/dist/{play-C5163t9v.js → play-BcFxtF5b.js} +1 -1
  154. package/dist/{play-circle-CJepR09X.js → play-circle-B2ahlsZk.js} +1 -1
  155. package/dist/{play-fill-Dg5agGC8.js → play-fill-D53-aAwU.js} +1 -1
  156. package/dist/{plus-o1LHvkzd.js → plus-B86SmZGh.js} +1 -1
  157. package/dist/{plus-circle-ptT6oAUL.js → plus-circle-CnUjJsnF.js} +1 -1
  158. package/dist/{print-CvXl_szh.js → print-qLntWNd7.js} +1 -1
  159. package/dist/{refresh-BJ4s37HF.js → refresh-B_CT3vb1.js} +1 -1
  160. package/dist/{reset-DXL5hBzR.js → reset-BID4RkcV.js} +1 -1
  161. package/dist/{responsive-BtCOsZ9L.js → responsive-ZL1NzTfX.js} +1 -1
  162. package/dist/{rubix-thema-CtCYpVHK.js → rubix-thema-BvZYzAwX.js} +1 -1
  163. package/dist/{save-Bsq9gKQd.js → save-BybCvQGY.js} +1 -1
  164. package/dist/{saved-search-C5QBII9Y.js → saved-search-DBVj7gkd.js} +1 -1
  165. package/dist/{saved-search-fill-BMEpQDa5.js → saved-search-fill-C8grEFO7.js} +1 -1
  166. package/dist/{search-FjEsPR8U.js → search-BBvIb5gY.js} +1 -1
  167. package/dist/{settings-Dew4TRkl.js → settings-C3pzFKav.js} +1 -1
  168. package/dist/{share-Cgr5Ae27.js → share-B9NEdX5h.js} +1 -1
  169. package/dist/{share-alternative-C1WPUOQS.js → share-alternative-D-owBQIX.js} +1 -1
  170. package/dist/{sidebar-DJfR5se4.js → sidebar-BceztyGh.js} +1 -1
  171. package/dist/{sidebar-fill-CmTx5oE3.js → sidebar-fill-meae4nW0.js} +1 -1
  172. package/dist/{slack-C6N9e9ts.js → slack-qT8c0TWt.js} +1 -1
  173. package/dist/{slider-config-D5ryC-9e.js → slider-config-DqpWW1vb.js} +1 -1
  174. package/dist/{spellcheck-CgPkv24l.js → spellcheck-s_Xcuq7Y.js} +1 -1
  175. package/dist/{spinner-CUmDNwOP.js → spinner-DJwVbRES.js} +1 -1
  176. package/dist/src/assets/icons/picture-gallery.vue +13 -0
  177. package/dist/src/components/UiCheckbox/UiCheckbox.stories.ts +34 -1
  178. package/dist/src/components/UiCheckbox/UiCheckbox.vue +22 -13
  179. package/dist/src/components/UiColorPicker/README.md +5 -5
  180. package/dist/src/components/UiColorPicker/UiColorPicker.stories.ts +3 -2
  181. package/dist/src/components/UiIcon/icons.ts +1 -0
  182. package/dist/src/components/UiInput/README.md +1 -0
  183. package/dist/src/components/UiInput/UiInput.spec.ts +1 -1
  184. package/dist/src/components/UiInput/UiInput.vue +28 -20
  185. package/dist/src/components/UiLabel/README.md +33 -0
  186. package/dist/src/components/UiLabel/UiLabel.vue +16 -0
  187. package/dist/src/components/UiMenu/UiMenu.stories.ts +108 -83
  188. package/dist/src/components/UiMenu/UiMenu.vue +33 -25
  189. package/dist/src/components/UiRadioInputGroup/UiRadioInputGroup.vue +4 -3
  190. package/dist/src/components/UiSearchInput/README.md +28 -22
  191. package/dist/src/components/UiSearchInput/UiSearchInput.vue +31 -3
  192. package/dist/src/components/UiSelect/README.md +54 -0
  193. package/dist/src/components/UiSelect/UIiSelect.spec.ts +102 -0
  194. package/dist/src/components/UiSelect/UiSelect.stories.ts +94 -0
  195. package/dist/src/components/UiSelect/UiSelect.vue +76 -0
  196. package/dist/src/components/UiToggleButton/README.md +3 -3
  197. package/dist/src/components/UiToggleButton/UiToggleButton.vue +14 -3
  198. package/dist/src/components/index.ts +4 -0
  199. package/dist/{standard-view-CUMldHu5.js → standard-view-Dh6JMdWs.js} +1 -1
  200. package/dist/{star-B9W3Ky04.js → star-BSFTyui3.js} +1 -1
  201. package/dist/{star-fill-DhAaaqmP.js → star-fill-CVhN8bqR.js} +1 -1
  202. package/dist/{star-filled-quxk8B-9.js → star-filled-DacJoaAu.js} +1 -1
  203. package/dist/{stop-D3zmCHsm.js → stop-BwWBCobo.js} +1 -1
  204. package/dist/{story-YPCKA_qC.js → story-CBNTp-lp.js} +1 -1
  205. package/dist/style.css +1 -1
  206. package/dist/{sync-C1z4VZJT.js → sync-BaZtL0xx.js} +1 -1
  207. package/dist/{tasks-BB_9ezkW.js → tasks-DL9yIRdK.js} +1 -1
  208. package/dist/{text-nSm37hQd.js → text-R4vHS9Pd.js} +1 -1
  209. package/dist/{text-circled-Dc9Onu99.js → text-circled-CnnnL1id.js} +1 -1
  210. package/dist/{text-filled-B0ZOW6JM.js → text-filled-DthiiE_T.js} +1 -1
  211. package/dist/{thumbs-down-Cb2Y7NTu.js → thumbs-down-CSyRwO6Y.js} +1 -1
  212. package/dist/{thumbs-up-Cd6iU3NA.js → thumbs-up-8f-7gcq6.js} +1 -1
  213. package/dist/{thumbs-up-double-D3lhVUS_.js → thumbs-up-double-Dhf_0k-o.js} +1 -1
  214. package/dist/{topic-C_VTDMR7.js → topic-LED8OQq_.js} +1 -1
  215. package/dist/{union-CRw4YV1f.js → union-C3GueVUs.js} +1 -1
  216. package/dist/{upload-BCQ7aJwX.js → upload-A6JuSLcS.js} +1 -1
  217. package/dist/{video overlay-DjCh1eBe.js → video overlay-DIDpPww1.js } +1 -1
  218. package/dist/{video-circled-jkN2EnvK.js → video-circled-BVu5I_wj.js} +1 -1
  219. package/dist/{video-DnXRYTdX.js → video-eeoO9KOd.js} +1 -1
  220. package/dist/{video-filled-CSybA72O.js → video-filled-_eOJ2sb3.js} +1 -1
  221. package/dist/{video-rounded-63Bs_nLq.js → video-rounded-AiQniTjB.js} +1 -1
  222. package/dist/{view-DHm4Xfd8.js → view-CuvlyhMJ.js} +1 -1
  223. package/dist/{view-off-D4GKV9n1.js → view-off-Ccn9Z_zK.js} +1 -1
  224. package/dist/{volume-up-Bjizso9F.js → volume-up-3FMnPLw6.js} +1 -1
  225. package/package.json +28 -19
  226. package/src/assets/icons/picture-gallery.vue +13 -0
  227. package/src/components/UiCheckbox/UiCheckbox.vue +22 -13
  228. package/src/components/UiColorPicker/README.md +5 -5
  229. package/src/components/UiIcon/icons.ts +1 -0
  230. package/src/components/UiInput/README.md +1 -0
  231. package/src/components/UiInput/UiInput.vue +28 -20
  232. package/src/components/UiLabel/README.md +33 -0
  233. package/src/components/UiLabel/UiLabel.vue +16 -0
  234. package/src/components/UiMenu/UiMenu.vue +33 -25
  235. package/src/components/UiRadioInputGroup/UiRadioInputGroup.vue +4 -3
  236. package/src/components/UiSearchInput/README.md +28 -22
  237. package/src/components/UiSearchInput/UiSearchInput.vue +31 -3
  238. package/src/components/UiSelect/README.md +54 -0
  239. package/src/components/UiSelect/UiSelect.vue +76 -0
  240. package/src/components/UiToggleButton/README.md +3 -3
  241. package/src/components/UiToggleButton/UiToggleButton.vue +14 -3
  242. package/src/components/index.ts +4 -0
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <svg
3
+ width="12"
4
+ height="12"
5
+ viewBox="0 0 12 12"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ d="M9.8114 0.424316C9.86295 0.429564 9.91371 0.437831 9.96375 0.447754L9.97351 0.449707C9.98863 0.4528 10.0035 0.456943 10.0184 0.460449C10.0526 0.468471 10.0866 0.476685 10.12 0.486816C10.1391 0.492631 10.1578 0.499857 10.1766 0.506348C10.2089 0.517458 10.241 0.52847 10.2723 0.541504C10.2839 0.546321 10.2951 0.552055 10.3065 0.557129C10.3423 0.573006 10.3776 0.589598 10.412 0.60791C10.4293 0.617106 10.4459 0.627417 10.4628 0.637207C10.4874 0.651511 10.5122 0.665619 10.536 0.681152C10.556 0.694178 10.5752 0.708304 10.5946 0.722168C10.6194 0.739922 10.6441 0.757777 10.6678 0.776855C10.6823 0.788424 10.6958 0.800948 10.7098 0.812988C10.7338 0.833601 10.7574 0.854519 10.7802 0.876465C10.7937 0.889581 10.8071 0.902929 10.8202 0.916504C10.8431 0.940209 10.8651 0.964695 10.8866 0.989746C10.9006 1.00608 10.9142 1.02267 10.9276 1.03955C10.9428 1.0587 10.9572 1.07831 10.9716 1.09814C10.9871 1.11975 11.0029 1.1412 11.0175 1.16357C11.0336 1.18842 11.0485 1.21399 11.0634 1.23975C11.0728 1.25616 11.0818 1.27278 11.0907 1.28955C11.1078 1.32181 11.1236 1.35469 11.1385 1.38818C11.1445 1.40149 11.1505 1.41473 11.1561 1.42822C11.1687 1.45862 11.1795 1.48971 11.1903 1.521C11.1971 1.54083 11.2047 1.5604 11.2108 1.58057C11.236 1.66392 11.2538 1.75 11.2655 1.83838C11.2677 1.85531 11.2716 1.87207 11.2733 1.88916C11.2788 1.94344 11.2821 1.99849 11.2821 2.0542V7.66943L11.2733 7.8374C11.2719 7.85121 11.2682 7.86471 11.2665 7.87842C11.2548 7.97057 11.2362 8.06027 11.2098 8.14697C11.2031 8.16911 11.195 8.19067 11.1874 8.2124C11.1777 8.24 11.1682 8.26753 11.1571 8.29443C11.1485 8.31536 11.1383 8.33548 11.1288 8.35596C11.1176 8.38021 11.107 8.40463 11.0946 8.42822C11.0783 8.45933 11.0601 8.48915 11.0419 8.51904C11.035 8.53041 11.0285 8.54204 11.0214 8.55322C11.0038 8.58064 10.9849 8.60703 10.9657 8.6333C10.9525 8.65137 10.9396 8.66951 10.9257 8.68701C10.911 8.70549 10.8952 8.72291 10.8798 8.74072C10.8612 8.76219 10.8428 8.78373 10.8231 8.8042C10.8067 8.82131 10.7895 8.83762 10.7723 8.854C10.7536 8.87185 10.7343 8.88881 10.7147 8.90576C10.6948 8.92305 10.6749 8.94022 10.6542 8.95654C10.6359 8.97093 10.6174 8.98493 10.5985 8.99854C10.5769 9.01411 10.5555 9.02991 10.5331 9.04443C10.5108 9.05889 10.4877 9.07206 10.4647 9.08545C10.4426 9.09834 10.4201 9.11069 10.3973 9.12256C10.374 9.13472 10.3501 9.14569 10.326 9.15674C10.3062 9.16586 10.2867 9.17574 10.2665 9.18408C10.2367 9.19634 10.2063 9.20676 10.1757 9.21729C10.1558 9.22411 10.1363 9.23172 10.1161 9.23779C10.0843 9.24735 10.0519 9.25456 10.0194 9.26221C10.0012 9.2665 9.98321 9.2722 9.96472 9.27588C9.92715 9.28335 9.88892 9.28762 9.85046 9.29248C9.83547 9.29437 9.82066 9.29783 9.80554 9.29932C9.8039 9.29948 9.8023 9.30014 9.80066 9.30029L9.64343 9.30811H9.05847V9.89307C9.05847 9.96698 9.05135 10.0395 9.04187 10.1108C9.03728 10.1453 9.03294 10.1796 9.02625 10.2134C9.01093 10.2906 8.98852 10.3651 8.96277 10.438C8.95341 10.4645 8.94512 10.4912 8.93445 10.5171C8.92682 10.5356 8.91832 10.5536 8.91003 10.5718C8.89925 10.5954 8.88869 10.6191 8.87683 10.6421C8.86196 10.671 8.84451 10.6982 8.828 10.7261C8.81673 10.7451 8.80584 10.7642 8.79382 10.7827C8.78244 10.8002 8.77069 10.8174 8.75867 10.8345C8.73972 10.8613 8.72056 10.8879 8.70007 10.9136C8.6901 10.9261 8.68013 10.9385 8.6698 10.9507C8.64891 10.9753 8.62665 10.9986 8.60437 11.022C8.58798 11.0392 8.57168 11.0563 8.55457 11.0728C8.5341 11.0924 8.51255 11.1108 8.49109 11.1294C8.47397 11.1442 8.45706 11.1592 8.43933 11.1733C8.41584 11.1921 8.39158 11.2096 8.36707 11.2271C8.35145 11.2382 8.33621 11.2497 8.32019 11.2603C8.29251 11.2785 8.26405 11.2954 8.23523 11.312C8.21805 11.3219 8.20104 11.332 8.18347 11.3413C8.16018 11.3536 8.13613 11.3643 8.11218 11.3755C8.08791 11.3868 8.06384 11.3985 8.03894 11.4087C8.01389 11.4189 7.98842 11.428 7.96277 11.437C7.94172 11.4444 7.92073 11.4519 7.89929 11.4585C7.86721 11.4683 7.83452 11.476 7.80164 11.4839C7.78209 11.4886 7.76285 11.4946 7.74304 11.4985C7.73078 11.501 7.71829 11.5022 7.70593 11.5044C7.66688 11.5113 7.62772 11.5189 7.58777 11.5229L7.4198 11.5317H1.80457L1.63757 11.5229C1.60954 11.5201 1.58216 11.5135 1.55457 11.5093C1.53134 11.5057 1.50812 11.5031 1.48523 11.4985C1.46946 11.4954 1.45396 11.4914 1.43835 11.4878C1.40245 11.4796 1.36688 11.471 1.33191 11.4604C1.31174 11.4544 1.29218 11.4468 1.27234 11.4399C1.24909 11.4319 1.22576 11.4245 1.203 11.4155C1.17865 11.4059 1.1545 11.396 1.13074 11.3853C1.10453 11.3734 1.07904 11.3603 1.05359 11.3472C1.03648 11.3383 1.01956 11.3293 1.00281 11.3198C0.972806 11.3029 0.943711 11.2848 0.914917 11.2661C0.90324 11.2585 0.89123 11.2515 0.879761 11.2437C0.75435 11.1576 0.64078 11.0556 0.543823 10.939C0.538044 10.932 0.532887 10.9245 0.527222 10.9175C0.468092 10.8439 0.414889 10.7654 0.369019 10.6821C0.36551 10.6758 0.362679 10.669 0.359253 10.6626C0.339681 10.6259 0.321362 10.5886 0.304565 10.5503C0.298596 10.5367 0.292595 10.5231 0.286987 10.5093C0.274603 10.4788 0.263379 10.4478 0.252808 10.4165C0.247129 10.3997 0.241347 10.3828 0.236206 10.3657C0.224918 10.3282 0.215527 10.2901 0.206909 10.2515C0.204214 10.2394 0.200547 10.2275 0.19812 10.2153C0.188021 10.1647 0.179994 10.1132 0.174683 10.061C0.169069 10.0059 0.16687 9.94973 0.16687 9.89307V4.27686C0.166903 4.16756 0.17768 4.0608 0.19812 3.95752C0.213026 3.8822 0.23382 3.809 0.258667 3.73779C0.268638 3.70922 0.278432 3.68066 0.289917 3.65283C0.296875 3.63597 0.304879 3.6196 0.312378 3.60303C0.326162 3.57257 0.340765 3.54261 0.356323 3.51318C0.364715 3.49731 0.373798 3.48187 0.38269 3.46631C0.399904 3.43619 0.41737 3.40632 0.436401 3.37744C0.445302 3.36394 0.454459 3.35063 0.463745 3.3374C0.475018 3.32135 0.486098 3.30517 0.497925 3.28955L0.540894 3.23486C0.551913 3.22152 0.563645 3.20878 0.575073 3.1958C0.586191 3.18317 0.597757 3.17097 0.609253 3.15869C0.631131 3.13532 0.653436 3.11239 0.676636 3.09033C0.693176 3.07461 0.710232 3.05946 0.727417 3.04443C0.747094 3.02723 0.767474 3.01089 0.787964 2.99463C0.809997 2.97714 0.832414 2.9602 0.855347 2.94385C0.866745 2.93572 0.877913 2.92728 0.889526 2.91943L0.930542 2.89209L1.02429 2.8374C1.02979 2.83441 1.03535 2.83154 1.04089 2.82861C1.06956 2.81347 1.09914 2.80008 1.12878 2.78662C1.14481 2.77934 1.16034 2.77093 1.17664 2.76416C1.21333 2.74891 1.25096 2.73574 1.28894 2.72314C1.30065 2.71926 1.31227 2.71505 1.3241 2.71143C1.35428 2.70217 1.385 2.69454 1.41589 2.68701C1.43768 2.6817 1.4592 2.67484 1.48132 2.67041C1.48257 2.67016 1.48398 2.67066 1.48523 2.67041L1.63757 2.64795L1.80457 2.63916H2.38953V2.0542C2.38963 1.37548 2.80274 0.793917 3.3905 0.54541C3.58626 0.462598 3.80137 0.416572 4.02722 0.416504H9.64343C9.70009 0.416504 9.75622 0.418699 9.8114 0.424316ZM1.75769 4.04834C1.73249 4.0535 1.70894 4.06316 1.68738 4.07568C1.61787 4.11627 1.57117 4.19159 1.57117 4.27783V9.7749L5.01257 6.9165C5.29097 6.68495 5.67314 6.63828 5.995 6.78369C6.04098 6.80446 6.08574 6.82927 6.12878 6.85791L7.65417 7.87451V4.27783C7.65417 4.19127 7.60693 4.11616 7.53699 4.07568C7.51562 4.06338 7.49257 4.05344 7.46765 4.04834L7.4198 4.04346H1.80457L1.75769 4.04834ZM4.0282 1.8208C3.89912 1.8208 3.79396 1.92515 3.79382 2.0542V2.63916H7.42078C8.15549 2.63924 8.77791 3.12344 8.98523 3.79053C9.0011 3.84156 9.0144 3.89373 9.02527 3.94678C9.03622 4.00021 9.04408 4.05466 9.04968 4.10986C9.05526 4.16478 9.05845 4.22046 9.05847 4.27686V7.90576H9.59851C9.62571 7.90576 9.65098 7.90017 9.67468 7.89307C9.68889 7.88885 9.70283 7.8849 9.7157 7.87842C9.7497 7.86118 9.77876 7.8365 9.80261 7.80615C9.85066 7.74531 9.87683 7.66177 9.87683 7.57178V2.0542C9.8767 1.92515 9.77251 1.8208 9.64343 1.8208H4.0282ZM3.20886 4.74463C3.66096 4.74468 4.03862 5.06578 4.12585 5.49268C4.13828 5.55349 4.14439 5.61664 4.14441 5.68115L4.13953 5.77686C4.13025 5.86832 4.10774 5.95587 4.0741 6.0376C4.0462 6.10533 4.00988 6.16842 3.96765 6.22705C3.95785 6.24066 3.94787 6.25404 3.93738 6.26709C3.92984 6.27646 3.92183 6.28537 3.91394 6.29443C3.9053 6.30437 3.89662 6.31417 3.88757 6.32373C3.87584 6.33612 3.86383 6.34813 3.85144 6.35986C3.83971 6.37099 3.8276 6.38158 3.81531 6.39209C3.80791 6.39841 3.80044 6.40456 3.79285 6.41064C3.77815 6.42244 3.76332 6.43392 3.74792 6.44482C3.73855 6.45145 3.72922 6.45807 3.7196 6.46436C3.70371 6.47475 3.68732 6.48422 3.67078 6.49365C3.66291 6.49813 3.65534 6.50307 3.64734 6.50732C3.60219 6.53137 3.55491 6.55139 3.50574 6.56787C3.49657 6.57094 3.48768 6.57485 3.47839 6.57764C3.39298 6.60331 3.30261 6.61767 3.20886 6.61768L3.11316 6.61279C3.05311 6.60669 2.99451 6.59457 2.93835 6.57764C2.92471 6.57353 2.91169 6.5677 2.89832 6.56299C2.88125 6.55697 2.86413 6.5514 2.84753 6.54443C2.84161 6.54195 2.83582 6.53922 2.82996 6.53662C2.81005 6.52778 2.7905 6.51846 2.77136 6.5083C2.76117 6.5029 2.75105 6.49746 2.74109 6.4917C2.73035 6.48548 2.71933 6.47977 2.70886 6.47314L2.68542 6.45752C2.68176 6.45504 2.67831 6.45224 2.67468 6.44971C2.65634 6.43691 2.63833 6.42371 2.62097 6.40967C2.61325 6.40343 2.60603 6.39661 2.59851 6.39014C2.58541 6.37883 2.57288 6.36698 2.56042 6.35498C2.54947 6.34443 2.53863 6.33382 2.5282 6.32275C2.52061 6.3147 2.51304 6.30666 2.50574 6.29834C2.49416 6.28516 2.48239 6.27213 2.47156 6.2583C2.46265 6.24692 2.45455 6.23494 2.44617 6.22314C2.43884 6.21285 2.4316 6.2025 2.42468 6.19189C2.416 6.17857 2.40828 6.16466 2.40027 6.15088C2.37873 6.11386 2.35903 6.07567 2.34265 6.03564C2.33573 6.01871 2.33004 6.0013 2.3241 5.98389C2.32011 5.97221 2.31591 5.96061 2.31238 5.94873C2.3095 5.93905 2.30714 5.92924 2.30457 5.91943C2.2846 5.84333 2.27234 5.76358 2.27234 5.68115C2.27241 5.22826 2.59395 4.85123 3.02039 4.76416C3.08128 4.75171 3.1443 4.74463 3.20886 4.74463Z"
11
+ />
12
+ </svg>
13
+ </template>
@@ -1,31 +1,32 @@
1
1
  <template>
2
- <label
3
- class="flex flex-col"
2
+ <UiLabel
4
3
  :class="
5
4
  cn(
6
- disabled ? 'text-gray-400' : 'cursor-pointer text-gray-900',
5
+ disabled ? 'text-gray-400' : undefined,
6
+ 'flex cursor-pointer flex-col items-start',
7
7
  $attrs.class as string,
8
8
  )
9
9
  "
10
+ :for="id"
10
11
  :data-testid="$attrs['data-testid']"
11
12
  >
12
13
  <input
13
14
  :id="id"
14
- class="peer relative size-0 appearance-none self-center focus:outline-hidden"
15
+ class="peer relative size-0 appearance-none focus:outline-hidden"
15
16
  :class="size"
16
17
  type="checkbox"
17
18
  :checked="checked"
18
19
  :aria-checked="checked"
19
20
  :disabled="disabled"
20
- :aria-invalid="'errors' in $slots || showError"
21
+ :aria-invalid="Boolean($slots.errors || showError)"
21
22
  :aria-errormessage="
22
- 'errors' in $slots || showError ? `${id}-errors` : undefined
23
+ $slots.errors || showError ? `${id}-errors` : undefined
23
24
  "
24
25
  v-bind="{ ...$attrs, class: null, 'data-testid': null }"
25
26
  @change="handleChange"
26
27
  />
27
28
  <span
28
- class="flex items-center peer-checked:opacity-100 before:box-border before:inline-block before:shrink-0 before:border-2 before:transition-colors before:content-[''] after:absolute after:block peer-checked:after:content-[url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyMCAyMCcgZmlsbD0nbm9uZSc+PHJlY3QgLz48cGF0aCBmaWxsLXJ1bGU9J2V2ZW5vZGQnIGNsaXAtcnVsZT0nZXZlbm9kZCcgZD0nTTguMjE5NjUgMTVDNy45ODk2NSAxNSA3Ljc2OTY1IDE0LjkwNSA3LjYxMjE1IDE0LjczNzVMMy41NTk2NSAxMC40MjE3QzMuMjQzODEgMTAuMDg2NyAzLjI2MTMxIDkuNTU5MTggMy41OTYzMSA5LjI0NDE4QzMuOTMyMTUgOC45MjkxOCA0LjQ1OTY1IDguOTQ1ODUgNC43NzM4MSA5LjI4MDg1TDguMjExMzEgMTIuOTRMMTUuMjE4IDUuMjcxNjhDMTUuNTI5NiA0LjkzMDg1IDE2LjA1NjMgNC45MDgzNSAxNi4zOTYzIDUuMjE4MzVDMTYuNzM1NSA1LjUyODM1IDE2Ljc1ODggNi4wNTU4NSAxNi40NDg4IDYuMzk1MDFMOC44MzQ2NSAxNC43MjgzQzguNjc4ODEgMTQuOSA4LjQ1NzE1IDE0Ljk5ODMgOC4yMjU0OCAxNUg4LjIxOTY1WicgZmlsbD0nd2hpdGUnLz48L3N2Zz4=)]"
29
+ class="flex items-center text-base peer-checked:opacity-100 before:box-border before:inline-block before:shrink-0 before:border-2 before:transition-colors before:content-[''] after:absolute after:block peer-checked:after:content-[url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyMCAyMCcgZmlsbD0nbm9uZSc+PHJlY3QgLz48cGF0aCBmaWxsLXJ1bGU9J2V2ZW5vZGQnIGNsaXAtcnVsZT0nZXZlbm9kZCcgZD0nTTguMjE5NjUgMTVDNy45ODk2NSAxNSA3Ljc2OTY1IDE0LjkwNSA3LjYxMjE1IDE0LjczNzVMMy41NTk2NSAxMC40MjE3QzMuMjQzODEgMTAuMDg2NyAzLjI2MTMxIDkuNTU5MTggMy41OTYzMSA5LjI0NDE4QzMuOTMyMTUgOC45MjkxOCA0LjQ1OTY1IDguOTQ1ODUgNC43NzM4MSA5LjI4MDg1TDguMjExMzEgMTIuOTRMMTUuMjE4IDUuMjcxNjhDMTUuNTI5NiA0LjkzMDg1IDE2LjA1NjMgNC45MDgzNSAxNi4zOTYzIDUuMjE4MzVDMTYuNzM1NSA1LjUyODM1IDE2Ljc1ODggNi4wNTU4NSAxNi40NDg4IDYuMzk1MDFMOC44MzQ2NSAxNC43MjgzQzguNjc4ODEgMTQuOSA4LjQ1NzE1IDE0Ljk5ODMgOC4yMjU0OCAxNUg4LjIxOTY1WicgZmlsbD0nd2hpdGUnLz48L3N2Zz4=)]"
29
30
  :class="{
30
31
  'before:size-5 after:size-5': size === 'medium',
31
32
  'before:size-4 after:size-4': size === 'small',
@@ -33,26 +34,27 @@
33
34
  color === 'blue',
34
35
  'before:border-gray-800 peer-checked:before:bg-gray-800 peer-hover:before:border-gray-900 peer-checked:peer-hover:before:bg-gray-900':
35
36
  color === 'gray',
36
- 'before:border-gray-500 peer-checked:before:bg-gray-500': disabled,
37
- 'before:mr-2': !!$slots.default,
37
+ 'text-gray-400 before:border-gray-500 peer-checked:before:bg-gray-500':
38
+ disabled,
39
+ 'before:mr-2': $slots.default,
38
40
  }"
39
41
  >
40
42
  <slot />
41
43
  </span>
42
44
 
43
45
  <div
44
- v-if="'errors' in $slots || showError"
46
+ v-if="$slots.errors || showError"
45
47
  :id="`${id}-errors`"
46
48
  data-testid="errorMessage"
47
- class="relative order-last mt-2 bg-alert-red-default px-4 py-1 text-xs leading-normal font-medium text-white transition-all duration-300 ease-in-out"
49
+ class="mt-2 bg-alert-red-default px-4 py-1 text-xs leading-normal font-medium text-white transition-all duration-150 ease-in-out peer-aria-invalid:peer-hover:bg-alert-red-dark peer-aria-invalid:peer-focus:bg-alert-red-dark"
48
50
  >
49
- <slot v-if="'errors' in $slots" name="errors" />
51
+ <slot v-if="$slots.errors" name="errors" />
50
52
 
51
53
  <template v-else>
52
54
  {{ errorMessage }}
53
55
  </template>
54
56
  </div>
55
- </label>
57
+ </UiLabel>
56
58
  </template>
57
59
 
58
60
  <script setup lang="ts">
@@ -60,6 +62,7 @@ import { v4 as uuidv4 } from "uuid";
60
62
  import { computed } from "vue";
61
63
 
62
64
  import { cn } from "../../utils/cn.js";
65
+ import UiLabel from "../UiLabel/UiLabel.vue";
63
66
 
64
67
  const emit = defineEmits<{
65
68
  change: [boolean];
@@ -70,7 +73,13 @@ defineOptions({
70
73
  });
71
74
 
72
75
  defineSlots<{
76
+ /**
77
+ * Label content.
78
+ */
73
79
  default: () => any;
80
+ /**
81
+ * Error content.
82
+ */
74
83
  errors?: () => any;
75
84
  }>();
76
85
 
@@ -2,15 +2,15 @@
2
2
 
3
3
  ## Usage
4
4
 
5
- ```html
6
- <!-- SomeComponent.vue using UiColorPicker -->
5
+ ```vue
7
6
  <template>
8
- <label for="colorPicker">Farbe wählen</label>
9
- <UiColorPicker id="colorPicker" v-model="colorValue" />
7
+ <UiLabel for="colorPicker">Farbe wählen</UiLabel>
8
+ <UiColorPicker id="colorPicker" v-model="colorValue" />
10
9
  </template>
11
10
 
12
11
  <script setup>
13
- import { UiColorPicker } from "@dpa-id-components/dpa-shared-components";
12
+ import { ref } from "vue";
13
+ import { UiColorPicker, UiLabel } from "@dpa-id-components/dpa-shared-components";
14
14
 
15
15
  const colorValue = ref("");
16
16
  </script>
@@ -132,6 +132,7 @@ export const icons = {
132
132
  people: () => import("../../assets/icons/people.vue"),
133
133
  phone: () => import("../../assets/icons/phone.vue"),
134
134
  picture: () => import("../../assets/icons/picture.vue"),
135
+ "picture-gallery": () => import("../../assets/icons/picture-gallery.vue"),
135
136
  "picture-circled": () => import("../../assets/icons/picture-circled.vue"),
136
137
  "picture-filled": () => import("../../assets/icons/picture-filled.vue"),
137
138
  pin: () => import("../../assets/icons/pin.vue"),
@@ -63,4 +63,5 @@ import { UiInput } from "@dpa-id-components/dpa-shared-components";
63
63
  | Name | Description |
64
64
  |-----------|----------------------------------------------------|
65
65
  | `buttons` | slot for rendering a button inside the input field |
66
+ | `default` | Label content |
66
67
  | `errors` | For validation error content that's associated with the form control via `aria-errormessage` |
@@ -1,24 +1,24 @@
1
1
  <template>
2
- <!-- ui-input -->
3
2
  <div
4
- class="group relative"
5
- :class="$attrs.class"
3
+ :class="cn('group relative', $attrs.class as string)"
6
4
  :data-testid="$attrs['data-testid']"
7
5
  >
8
- <label
6
+ <UiLabel
7
+ v-if="$slots.default || label"
8
+ :for="id"
9
9
  :class="
10
10
  cn(
11
+ 'pointer-events-none absolute left-3 origin-left px-1 transition-all duration-150 select-none',
11
12
  labelColorClass,
12
- isLabelRaised
13
- ? '-translate-y-1/2 bg-white text-xs'
14
- : 'translate-y-4 text-sm',
13
+ isLabelRaised ? '-translate-y-1/2 bg-white text-xs' : 'translate-y-4',
15
14
  )
16
15
  "
17
- :for="id"
18
- class="pointer-events-none absolute left-3 origin-left px-1 transition-all duration-150 select-none"
19
16
  >
20
- {{ label }}
21
- </label>
17
+ <slot>
18
+ {{ label }}
19
+ </slot>
20
+ </UiLabel>
21
+
22
22
  <textarea
23
23
  v-if="isTextarea"
24
24
  :id="id"
@@ -78,7 +78,7 @@
78
78
 
79
79
  <div
80
80
  v-if="
81
- 'errors' in $slots ||
81
+ $slots.errors ||
82
82
  status === 'error' ||
83
83
  status === 'warning' ||
84
84
  status === 'info'
@@ -86,19 +86,19 @@
86
86
  :id="addonTextId"
87
87
  :class="
88
88
  cn(
89
- 'px-4 py-1 text-xs leading-normal font-medium transition-all duration-150 ease-in-out peer-aria-invalid:bg-alert-red-default peer-aria-invalid:text-white peer-hover:peer-aria-invalid:bg-alert-red-dark peer-focus:peer-aria-invalid:bg-alert-red-dark',
89
+ 'px-4 py-1 text-xs leading-normal font-medium transition-all duration-150 ease-in-out peer-aria-invalid:bg-alert-red-default peer-aria-invalid:text-white peer-enabled:peer-aria-invalid:peer-hover:bg-alert-red-dark peer-enabled:peer-aria-invalid:peer-focus:bg-alert-red-dark',
90
90
  addonClass,
91
91
  )
92
92
  "
93
93
  >
94
- <slot v-if="'errors' in $slots" name="errors" />
94
+ <slot v-if="$slots.errors" name="errors" />
95
95
 
96
96
  <template v-else>
97
97
  {{ addonText }}
98
98
  </template>
99
99
  </div>
100
100
 
101
- <slot name="buttons"></slot>
101
+ <slot name="buttons" />
102
102
  <svg
103
103
  v-if="chevron"
104
104
  class="pointer-events-none absolute top-4 right-4 size-6 fill-current text-gray-900"
@@ -118,6 +118,7 @@ import { v4 as uuidv4 } from "uuid";
118
118
  import { computed, onBeforeUpdate, onMounted, ref } from "vue";
119
119
 
120
120
  import { cn } from "../../utils/cn.js";
121
+ import UiLabel from "../UiLabel/UiLabel.vue";
121
122
 
122
123
  type UiInputStatus = "default" | "info" | "readonly" | "warning" | "error";
123
124
 
@@ -127,6 +128,13 @@ defineOptions({
127
128
 
128
129
  const slots = defineSlots<{
129
130
  buttons?: () => any;
131
+ /**
132
+ * Label content.
133
+ */
134
+ default?: () => any;
135
+ /**
136
+ * Error content.
137
+ */
130
138
  errors?: () => any;
131
139
  }>();
132
140
 
@@ -236,7 +244,7 @@ const addonClass = computed(() => {
236
244
  readonly: "",
237
245
  error: "",
238
246
  warning:
239
- "bg-orange-default text-gray-900 peer-hover:bg-orange-dark peer-focus:bg-orange-dark",
247
+ "bg-orange-default text-gray-900 peer-enabled:peer-hover:bg-orange-dark peer-focus:bg-orange-dark",
240
248
  info: "bg-gray-300 text-gray-900",
241
249
  }[status.value];
242
250
  });
@@ -244,13 +252,13 @@ const addonClass = computed(() => {
244
252
  const componentClass = computed(() => {
245
253
  return {
246
254
  default:
247
- "border border-gray-300 p-4 text-gray-900 hover:border-gray-700 focus:border-2 focus:border-blue-default focus:p-inputFocused",
255
+ "border border-gray-300 p-4 text-gray-900 enabled:hover:border-gray-700 focus:border-2 focus:border-blue-default focus:p-inputFocused",
248
256
  readonly: "p-4 text-gray-900 border border-gray-300 text-gray-800",
249
257
  error:
250
- "border-2 border-alert-red-default p-4 text-gray-900 hover:border-alert-red-dark focus:border-alert-red-dark",
258
+ "border-2 border-alert-red-default p-4 text-gray-900 enabled:hover:border-alert-red-dark focus:border-alert-red-dark",
251
259
  warning:
252
- "border-2 border-orange-default p-4 text-gray-900 hover:border-orange-dark focus:border-orange-dark",
253
- info: "border border-gray-300 p-4 text-gray-900 hover:border-gray-700 focus:border-gray-700",
260
+ "border-2 border-orange-default p-4 text-gray-900 enabled:hover:border-orange-dark focus:border-orange-dark",
261
+ info: "border border-gray-300 p-4 text-gray-900 enabled:hover:border-gray-700 focus:border-gray-700",
254
262
  }[status.value];
255
263
  });
256
264
 
@@ -0,0 +1,33 @@
1
+ # UiLabel
2
+
3
+ Wraps the native `label` element. Currently only used to provide some default styles for labels.
4
+
5
+ ## Usage
6
+
7
+ **Associate with input via `id` attribute**:
8
+
9
+ ```vue
10
+ <UiLabel for="name-input">
11
+ Name
12
+ </UiLabel>
13
+
14
+ <UiInput id="name-input" name="name" required />
15
+ ```
16
+
17
+ **Associate with input by wrapping**:
18
+
19
+ ```vue
20
+ <UiLabel>
21
+ Name
22
+ <UiInput name="name" required />
23
+ </UiLabel>
24
+ ```
25
+
26
+ **Associate with checkbox**:
27
+
28
+ ```vue
29
+ <UiLabel class="flex">
30
+ <UiCheckbox name="terms" required />
31
+ I have read and accept the terms and conditions
32
+ </UiLabel>
33
+ ```
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <label :class="cn('max-w-max items-center text-sm', $attrs.class as string)">
3
+ <slot />
4
+ </label>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { cn } from "../../utils/cn.js";
9
+
10
+ defineSlots<{
11
+ /**
12
+ * Label content.
13
+ */
14
+ default: () => any;
15
+ }>();
16
+ </script>
@@ -74,7 +74,12 @@
74
74
  :grouped-options="groupedOptions"
75
75
  >
76
76
  <ul
77
- v-if="!!groupedOptions"
77
+ v-if="
78
+ Array.isArray(groupedOptions) &&
79
+ groupedOptions.some(
80
+ (groupedOption) => groupedOption.options.length > 0,
81
+ )
82
+ "
78
83
  class="max-h-80 overflow-y-auto"
79
84
  tabindex="0"
80
85
  >
@@ -82,29 +87,32 @@
82
87
  v-for="groupedOption in groupedOptions"
83
88
  :key="groupedOption.groupLabel"
84
89
  >
85
- <li
86
- v-if="!!groupedOption.groupLabel"
87
- class="flex h-6 items-center border-t bg-gray-100 px-4 text-xs font-semibold tracking-wider text-gray-700 uppercase first:border-t-0"
88
- >
89
- {{ groupedOption.groupLabel }}
90
- </li>
91
- <UiListItem
92
- v-for="(option, index) in groupedOption.options"
93
- :key="`${groupedOption.groupLabel}-menuOptions-${index}`"
94
- :selected="option.selected"
95
- :selectable="listVariant === 'selectable'"
96
- :is-checked="option.selected"
97
- :check-box-menu="listVariant === 'checkbox'"
98
- :icon-size="iconSize"
99
- :image-shape="imageShape"
100
- :image-src="option.imageSrc"
101
- :checkbox-size="checkboxSize"
102
- :check-box-color="checkboxColor"
103
- class="hover:bg-gray-100 focus:bg-gray-300"
104
- :data-testid="`menu-option-button-${index}`"
105
- @list-item-click="selectOption(option)"
106
- >{{ option.label }}
107
- </UiListItem>
90
+ <template v-if="groupedOption.options.length > 0">
91
+ <li
92
+ v-if="groupedOption.groupLabel"
93
+ class="flex h-6 items-center border-t bg-gray-100 px-4 text-xs font-semibold tracking-wider text-gray-700 uppercase first:border-t-0"
94
+ >
95
+ {{ groupedOption.groupLabel }}
96
+ </li>
97
+
98
+ <UiListItem
99
+ v-for="(option, index) in groupedOption.options"
100
+ :key="`${groupedOption.groupLabel}-menuOptions-${index}`"
101
+ :selected="option.selected"
102
+ :selectable="listVariant === 'selectable'"
103
+ :is-checked="option.selected"
104
+ :check-box-menu="listVariant === 'checkbox'"
105
+ :icon-size="iconSize"
106
+ :image-shape="imageShape"
107
+ :image-src="option.imageSrc"
108
+ :checkbox-size="checkboxSize"
109
+ :check-box-color="checkboxColor"
110
+ class="hover:bg-gray-100 focus:bg-gray-300"
111
+ :data-testid="`menu-option-button-${index}`"
112
+ @list-item-click="selectOption(option)"
113
+ >{{ option.label }}
114
+ </UiListItem>
115
+ </template>
108
116
  </template>
109
117
  </ul>
110
118
  <ul v-else class="max-h-60 overflow-y-auto" tabindex="0">
@@ -184,7 +192,7 @@ export type UiMenuSelectedOption<Value = unknown> = UiMenuOptionType<Value> & {
184
192
  };
185
193
 
186
194
  export type UiMenuGroupedOption<Value = unknown> = {
187
- groupLabel: string;
195
+ groupLabel?: string;
188
196
  options: UiMenuOptionType<Value>[];
189
197
  };
190
198
 
@@ -9,7 +9,7 @@
9
9
  ]"
10
10
  >
11
11
  <li v-for="option in internalOptions" :key="option.value">
12
- <label class="flex items-center text-sm">
12
+ <UiLabel class="flex">
13
13
  <input
14
14
  v-model="pickedOption"
15
15
  :name="groupName"
@@ -22,11 +22,11 @@
22
22
  />
23
23
  <span
24
24
  class="ml-1 cursor-pointer"
25
- :class="[labelClass, disabled ? 'text-gray-500' : 'text-inherit']"
25
+ :class="[labelClass, disabled ? 'text-gray-500' : '']"
26
26
  >
27
27
  {{ option.label }}
28
28
  </span>
29
- </label>
29
+ </UiLabel>
30
30
  </li>
31
31
  </ul>
32
32
  </template>
@@ -35,6 +35,7 @@
35
35
  import { computed } from "vue";
36
36
 
37
37
  import { cn } from "../../utils/cn.js";
38
+ import UiLabel from "../UiLabel/UiLabel.vue";
38
39
 
39
40
  export interface UiRadioInputGroupOption<T> {
40
41
  value: T;
@@ -2,36 +2,36 @@
2
2
 
3
3
  ## Usage
4
4
 
5
- ```html
5
+ ```vue
6
6
  <template>
7
- <UiSearchInput
8
- :has-add-entry-option="true"
9
- :model-value="internalValue"
10
- label="This is a Label"
11
- placeholder="This is a placeholder"
12
- @update:model-value="handleInput"
13
- @handle-keypress="handleKeypress"
14
- @blur="handleBlur"
15
- />
7
+ <UiSearchInput
8
+ :has-add-entry-option="true"
9
+ :model-value="internalValue"
10
+ label="This is a Label"
11
+ placeholder="This is a placeholder"
12
+ @update:model-value="handleInput"
13
+ @handle-keypress="handleKeypress"
14
+ @blur="handleBlur"
15
+ />
16
16
  </template>
17
17
 
18
18
  <script setup lang="ts">
19
- import { UiSearchInput } from "./UiSearchInput.vue";
19
+ import { UiSearchInput } from "./UiSearchInput.vue";
20
20
 
21
- const internalValue = ref([""]);
22
- function handleInput(newValue) {
23
- internalValue.value = newValue;
24
- }
21
+ const internalValue = ref([""]);
22
+ function handleInput(newValue) {
23
+ internalValue.value = newValue;
24
+ }
25
25
 
26
- function handleKeypress({ event, value }) {
27
- if (event.key === 'Enter') {
28
- // do something when enter key is pressed
29
- }
26
+ function handleKeypress({ event, value }) {
27
+ if (event.key === 'Enter') {
28
+ // do something when enter key is pressed
30
29
  }
30
+ }
31
31
 
32
- function handleBlur(value) {
33
- // value is the same as from handleInput
34
- }
32
+ function handleBlur(value) {
33
+ // value is the same as from handleInput
34
+ }
35
35
  </script>
36
36
  ```
37
37
 
@@ -43,6 +43,12 @@
43
43
  | `label` | `string` | `""` | Sets Label for the input field |
44
44
  | `placeholder` | `string` | `Default placeholder` | Sets Placeholder attribute for the input |
45
45
 
46
+ ### Slots
47
+
48
+ | Name | Description |
49
+ |-----------|---------------|
50
+ | `default` | Label content |
51
+
46
52
  ### Events
47
53
 
48
54
  | Name | Type | Description |
@@ -10,7 +10,11 @@
10
10
  v-if="hasLabel"
11
11
  class="col-span-1 flex items-center pr-5 text-sm lg:py-2"
12
12
  >
13
- <label class="font-medium">{{ label }}</label>
13
+ <UiLabel :for="id" class="font-medium">
14
+ <slot>
15
+ {{ label }}
16
+ </slot>
17
+ </UiLabel>
14
18
  <slot name="tooltip"></slot>
15
19
  </div>
16
20
 
@@ -21,6 +25,7 @@
21
25
  >
22
26
  <div class="flex items-center">
23
27
  <input
28
+ :id="id"
24
29
  ref="inputs"
25
30
  :value="internalValue[index]"
26
31
  type="text"
@@ -56,18 +61,33 @@
56
61
  </template>
57
62
 
58
63
  <script setup lang="ts">
59
- import { computed, nextTick, ref, watchEffect } from "vue";
64
+ import { v4 as uuidv4 } from "uuid";
65
+ import { computed, nextTick, onBeforeUpdate, ref, watchEffect } from "vue";
60
66
 
61
67
  import UiIconButton from "../UiIconButton/UiIconButton.vue";
68
+ import UiLabel from "../UiLabel/UiLabel.vue";
69
+
70
+ const slots = defineSlots<{
71
+ /**
72
+ * Label content.
73
+ */
74
+ default?: () => any;
75
+ /**
76
+ * Tooltip content.
77
+ */
78
+ tooltip?: () => any;
79
+ }>();
62
80
 
63
81
  const props = withDefaults(
64
82
  defineProps<{
83
+ id?: string;
65
84
  hasAddEntryOption?: boolean;
66
85
  label?: string;
67
86
  modelValue: string[];
68
87
  placeholder?: string;
69
88
  }>(),
70
89
  {
90
+ id: undefined,
71
91
  hasAddEntryOption: false,
72
92
  placeholder: "Default placeholder",
73
93
  label: "",
@@ -89,6 +109,8 @@ const addRow = async () => {
89
109
  }
90
110
  };
91
111
 
112
+ const id = ref(props.id ?? `id-${uuidv4()}`);
113
+
92
114
  const canAddRow = computed(() => {
93
115
  return (
94
116
  internalValue.value[internalValue.value.length - 1].length > 0 &&
@@ -131,9 +153,15 @@ function handleBlur() {
131
153
  const isLastIndex = (index: number) => {
132
154
  return index === internalValue.value.length - 1;
133
155
  };
156
+ const hasDefaultSlot = ref(false);
157
+
158
+ // Manually tracks whether the “errors” slot is in use since `useSlots()` isn't reactive and so can't be correctly used inside computed reactive state.
159
+ onBeforeUpdate(() => {
160
+ hasDefaultSlot.value = "default" in slots;
161
+ });
134
162
 
135
163
  const hasLabel = computed(() => {
136
- return props.label.length > 0;
164
+ return hasDefaultSlot.value || props.label.length > 0;
137
165
  });
138
166
 
139
167
  const inputWrapperClass = computed(() => {
@@ -0,0 +1,54 @@
1
+ # UiSelect
2
+
3
+ Wraps the native `select` element.
4
+
5
+ ## Usage
6
+
7
+ ```vue
8
+
9
+ <UiSelect
10
+ v-model="appearance"
11
+ name="appearance"
12
+ required
13
+ >
14
+ Appearance
15
+
16
+ <template #options>
17
+ <option
18
+ v-for="appearance in appearances"
19
+ :key="appearance.id"
20
+ :value="appearance.id"
21
+ >
22
+ {{ appearance.name }}
23
+ </option>
24
+ </template>
25
+ </UiSelect>
26
+ ```
27
+
28
+ ## Props
29
+
30
+ **Note**: This component binds all non-prop attributes (apart from `class`) on its principal element (the `select` element) instead of the root element. This allows you to add arbitrary HTML attributes (and event listeners) on the principal element without them being explicitly supported by the component.
31
+
32
+ ### modelValue
33
+
34
+ - **Description**: Sets the `value` IDL attribute of the underlying `select` element. Allows using `v-model` on `UiSelect`.
35
+ - **Type**: `string`
36
+ - **Required**: No
37
+ - **Default**: `undefined`
38
+
39
+ ## Slots
40
+
41
+ ### default
42
+
43
+ The label content.
44
+
45
+ ### options
46
+
47
+ Receives arbitrarily many `option` elements (or anything that is allowed in a native `select` element, see [select: Technical summary](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select#technical_summary)).
48
+
49
+ ## Events
50
+
51
+ ### update:modelValue
52
+
53
+ - **Description**: Fired when `select` fires `input`. Allows using `v-model` on `UiSelect`.
54
+ - **Type**: `string`