@nextcloud/vue 9.0.0-rc.2 → 9.0.0-rc.3

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 (318) hide show
  1. package/CHANGELOG.md +84 -3
  2. package/dist/assets/{NcActionButton-B2G7zsju.css → NcActionButton-Dz2EBAuD.css} +20 -17
  3. package/dist/assets/{NcActionInput-SoC93uat.css → NcActionInput-BA67jS1l.css} +62 -62
  4. package/dist/assets/{NcAppContent-Di-SbMxO.css → NcAppContent-Zgn8-wsd.css} +19 -19
  5. package/dist/assets/{NcAppNavigation-BXItV5BV.css → NcAppNavigation-C6-8ErA_.css} +12 -12
  6. package/dist/assets/{NcAppNavigationItem-Cq6ZYdmT.css → NcAppNavigationItem-B27WFnUV.css} +35 -31
  7. package/dist/assets/{NcAppNavigationNewItem-CsqJ6c8v.css → NcAppNavigationNewItem-BrLekTMb.css} +37 -33
  8. package/dist/assets/{NcAppNavigationSettings-BDc6Mtek.css → NcAppNavigationSettings-B0I7HR1V.css} +14 -5
  9. package/dist/assets/NcAppNavigationSpacer-LST5uYYS.css +6 -0
  10. package/dist/assets/{NcAppNavigationToggle-DnTKNSH7.css → NcAppNavigationToggle-M0oDbwAS.css} +3 -3
  11. package/dist/assets/{NcAppSettingsDialog-DMWosHw9.css → NcAppSettingsDialog-DfBJYMdm.css} +10 -10
  12. package/dist/assets/{NcAppSidebar-exl90fRm.css → NcAppSidebar-PG3qIdkG.css} +44 -44
  13. package/dist/assets/{NcAvatar-B3wk2Xxl.css → NcAvatar-C01qP9VA.css} +24 -24
  14. package/dist/assets/{NcButton-DbE0wInI.css → NcButton-Cpw_vPKw.css} +49 -49
  15. package/dist/assets/{NcCheckboxRadioSwitch-sqQXUuVB.css → NcCheckboxRadioSwitch-DKVMIvxJ.css} +47 -44
  16. package/dist/assets/{NcChip-VsVAGaG6.css → NcChip-rGBYOr-Q.css} +9 -9
  17. package/dist/assets/{NcColorPicker-Clz7MjCA.css → NcColorPicker-DgByWqzp.css} +28 -28
  18. package/dist/assets/{NcContent-cRwic6r5.css → NcContent-C12jLe34.css} +9 -9
  19. package/dist/assets/{NcDashboardWidgetItem-B8_6-_k8.css → NcDashboardWidgetItem-V_jSEH-7.css} +12 -12
  20. package/dist/assets/{NcDateTimePickerNative-CeuS8Oeg.css → NcDateTimePickerNative-BizATZfE.css} +13 -13
  21. package/dist/assets/{NcDialog-bP7Jt0ZE.css → NcDialog-Ch6FuMQo.css} +15 -15
  22. package/dist/assets/{NcEllipsisedOption-D-IsjXWc.css → NcEllipsisedOption-BNLv_eyF.css} +5 -5
  23. package/dist/assets/{NcEmojiPicker-DnMU8iEd.css → NcEmojiPicker-kxoeGEM5.css} +4 -4
  24. package/dist/assets/{NcHeaderMenu-zo6kw_jn.css → NcHeaderMenu-BAKwNTFx.css} +11 -11
  25. package/dist/assets/{NcInputField-B8J2uFD4.css → NcInputField-CvP4PFAO.css} +44 -42
  26. package/dist/assets/{NcListItem-9eCenovm.css → NcListItem-ff6bfJFE.css} +44 -44
  27. package/dist/assets/{NcListItemIcon-DjEDwxRp.css → NcListItemIcon-BVhiRo5R.css} +13 -13
  28. package/dist/assets/{NcLoadingIcon-x1d284UU.css → NcLoadingIcon-DlDKflKI.css} +2 -2
  29. package/dist/assets/{NcModal-DaHROv08.css → NcModal-BMVfhs7c.css} +61 -61
  30. package/dist/assets/{NcNoteCard-C6xb7vi0.css → NcNoteCard-C387qsQO.css} +11 -8
  31. package/dist/assets/{NcPasswordField-z9gbKnov.css → NcPasswordField-DVV6Eiwf.css} +2 -2
  32. package/dist/assets/{NcRichText-GnQKcHYO.css → NcRichText-Fi_WAwSP.css} +86 -83
  33. package/dist/assets/{NcTextArea-DHr9DPOJ.css → NcTextArea-DoBYU3IE.css} +20 -20
  34. package/dist/assets/{NcUserBubble-tSs2XTDQ.css → NcUserBubble-CqaL0Oxv.css} +8 -8
  35. package/dist/assets/{referencePickerModal-DAD-jv3F.css → referencePickerModal-CUVCkTmZ.css} +19 -19
  36. package/dist/chunks/{ArrowLeft-CanHG70H.mjs → ArrowLeft-BiZLJltw.mjs} +3 -3
  37. package/dist/chunks/{ArrowLeft-CanHG70H.mjs.map → ArrowLeft-BiZLJltw.mjs.map} +1 -1
  38. package/dist/chunks/{DotsHorizontal-AMVAlTNH.mjs → DotsHorizontal-BJ_GCGpi.mjs} +3 -3
  39. package/dist/chunks/{DotsHorizontal-AMVAlTNH.mjs.map → DotsHorizontal-BJ_GCGpi.mjs.map} +1 -1
  40. package/dist/chunks/{NcActionButton-CnX0dQzz.mjs → NcActionButton-BECWgEPr.mjs} +4 -4
  41. package/dist/chunks/{NcActionButton-CnX0dQzz.mjs.map → NcActionButton-BECWgEPr.mjs.map} +1 -1
  42. package/dist/chunks/{NcActionButtonGroup-3Da8b3EI.mjs → NcActionButtonGroup-e4F30E5Z.mjs} +2 -2
  43. package/dist/chunks/{NcActionButtonGroup-3Da8b3EI.mjs.map → NcActionButtonGroup-e4F30E5Z.mjs.map} +1 -1
  44. package/dist/chunks/{NcActionInput-DeFy255L.mjs → NcActionInput-DYLqm7AP.mjs} +12 -12
  45. package/dist/chunks/{NcActionInput-DeFy255L.mjs.map → NcActionInput-DYLqm7AP.mjs.map} +1 -1
  46. package/dist/chunks/{NcActionTextEditable-B7nemAOJ.mjs → NcActionTextEditable-ByA0z9nO.mjs} +2 -2
  47. package/dist/chunks/{NcActionTextEditable-B7nemAOJ.mjs.map → NcActionTextEditable-ByA0z9nO.mjs.map} +1 -1
  48. package/dist/chunks/{NcActions-DS88I6qk.mjs → NcActions-iwG1Tj-I.mjs} +6 -6
  49. package/dist/chunks/{NcActions-DS88I6qk.mjs.map → NcActions-iwG1Tj-I.mjs.map} +1 -1
  50. package/dist/chunks/{NcAppContent-DRhM7Gyz.mjs → NcAppContent-B2qF2-YG.mjs} +9 -7
  51. package/dist/chunks/NcAppContent-B2qF2-YG.mjs.map +1 -0
  52. package/dist/chunks/{NcAppNavigation-BVXVi9JQ.mjs → NcAppNavigation-JoRJnwqf.mjs} +4 -4
  53. package/dist/chunks/{NcAppNavigation-BVXVi9JQ.mjs.map → NcAppNavigation-JoRJnwqf.mjs.map} +1 -1
  54. package/dist/chunks/{NcAppNavigationCaption-DkiIEk6r.mjs → NcAppNavigationCaption-DhwvNbx1.mjs} +2 -2
  55. package/dist/chunks/{NcAppNavigationCaption-DkiIEk6r.mjs.map → NcAppNavigationCaption-DhwvNbx1.mjs.map} +1 -1
  56. package/dist/chunks/{NcAppNavigationItem-s3GC1n4o.mjs → NcAppNavigationItem-B51Guztu.mjs} +10 -10
  57. package/dist/chunks/{NcAppNavigationItem-s3GC1n4o.mjs.map → NcAppNavigationItem-B51Guztu.mjs.map} +1 -1
  58. package/dist/chunks/{NcAppNavigationNew-BUQgcKdv.mjs → NcAppNavigationNew-CMjaAY5A.mjs} +2 -2
  59. package/dist/chunks/{NcAppNavigationNew-BUQgcKdv.mjs.map → NcAppNavigationNew-CMjaAY5A.mjs.map} +1 -1
  60. package/dist/chunks/{NcAppNavigationNewItem-D1GWsi8R.mjs → NcAppNavigationNewItem-DyzpvBOb.mjs} +5 -5
  61. package/dist/chunks/{NcAppNavigationNewItem-D1GWsi8R.mjs.map → NcAppNavigationNewItem-DyzpvBOb.mjs.map} +1 -1
  62. package/dist/chunks/{NcAppNavigationSearch-Cy0s4XWp.mjs → NcAppNavigationSearch-CvHp92E-.mjs} +3 -3
  63. package/dist/chunks/{NcAppNavigationSearch-Cy0s4XWp.mjs.map → NcAppNavigationSearch-CvHp92E-.mjs.map} +1 -1
  64. package/dist/chunks/{NcAppNavigationSettings-GeCb9tlR.mjs → NcAppNavigationSettings-iJ84_lwr.mjs} +16 -10
  65. package/dist/chunks/{NcAppNavigationSettings-GeCb9tlR.mjs.map → NcAppNavigationSettings-iJ84_lwr.mjs.map} +1 -1
  66. package/dist/chunks/NcAppNavigationSpacer-BvkBfuVw.mjs +17 -0
  67. package/dist/chunks/NcAppNavigationSpacer-BvkBfuVw.mjs.map +1 -0
  68. package/dist/chunks/{NcAppNavigationToggle-CFw3W3_o.mjs → NcAppNavigationToggle-D3UGt5TV.mjs} +46 -68
  69. package/dist/chunks/NcAppNavigationToggle-D3UGt5TV.mjs.map +1 -0
  70. package/dist/chunks/{NcAppSettingsDialog-CBLZvdnK.mjs → NcAppSettingsDialog-CQnZ29WZ.mjs} +6 -6
  71. package/dist/chunks/{NcAppSettingsDialog-CBLZvdnK.mjs.map → NcAppSettingsDialog-CQnZ29WZ.mjs.map} +1 -1
  72. package/dist/chunks/{NcAppSidebar-BomlW59S.mjs → NcAppSidebar-QEkYs8pt.mjs} +8 -8
  73. package/dist/chunks/{NcAppSidebar-BomlW59S.mjs.map → NcAppSidebar-QEkYs8pt.mjs.map} +1 -1
  74. package/dist/chunks/{NcAvatar-CSk-1oFe.mjs → NcAvatar-BadoF6cb.mjs} +13 -12
  75. package/dist/chunks/{NcAvatar-CSk-1oFe.mjs.map → NcAvatar-BadoF6cb.mjs.map} +1 -1
  76. package/dist/chunks/{NcBreadcrumb-Bvsnecwa.mjs → NcBreadcrumb-BH4XQJ8K.mjs} +3 -3
  77. package/dist/chunks/{NcBreadcrumb-Bvsnecwa.mjs.map → NcBreadcrumb-BH4XQJ8K.mjs.map} +1 -1
  78. package/dist/chunks/{NcBreadcrumbs-DWU2ZRkM.mjs → NcBreadcrumbs-DyWyrhrJ.mjs} +4 -4
  79. package/dist/chunks/{NcBreadcrumbs-DWU2ZRkM.mjs.map → NcBreadcrumbs-DyWyrhrJ.mjs.map} +1 -1
  80. package/dist/chunks/{NcButton-Byg8-ta1.mjs → NcButton-yN4vYgXb.mjs} +3 -3
  81. package/dist/chunks/{NcButton-Byg8-ta1.mjs.map → NcButton-yN4vYgXb.mjs.map} +1 -1
  82. package/dist/chunks/{NcCheckboxRadioSwitch-Ca1ouh22.mjs → NcCheckboxRadioSwitch-Di0xbf6d.mjs} +8 -8
  83. package/dist/chunks/NcCheckboxRadioSwitch-Di0xbf6d.mjs.map +1 -0
  84. package/dist/chunks/{NcChip-Cl6RfDoK.mjs → NcChip-DfDlpsAh.mjs} +7 -7
  85. package/dist/chunks/{NcChip-Cl6RfDoK.mjs.map → NcChip-DfDlpsAh.mjs.map} +1 -1
  86. package/dist/chunks/{NcCollectionList-CxzQkCFq.mjs → NcCollectionList-B2PzNHzw.mjs} +6 -6
  87. package/dist/chunks/{NcCollectionList-CxzQkCFq.mjs.map → NcCollectionList-B2PzNHzw.mjs.map} +1 -1
  88. package/dist/chunks/NcColorPicker-CoteX_0P.mjs +182 -0
  89. package/dist/chunks/NcColorPicker-CoteX_0P.mjs.map +1 -0
  90. package/dist/chunks/{NcContent-DtM8j8ub.mjs → NcContent-BImnEnMI.mjs} +81 -112
  91. package/dist/chunks/{NcContent-DtM8j8ub.mjs.map → NcContent-BImnEnMI.mjs.map} +1 -1
  92. package/dist/chunks/{NcDashboardWidget-uBobynyZ.mjs → NcDashboardWidget-DJtdcW-W.mjs} +4 -4
  93. package/dist/chunks/{NcDashboardWidget-uBobynyZ.mjs.map → NcDashboardWidget-DJtdcW-W.mjs.map} +1 -1
  94. package/dist/chunks/{NcDashboardWidgetItem-DnI9uLf1.mjs → NcDashboardWidgetItem-CZaWF40u.mjs} +8 -8
  95. package/dist/chunks/NcDashboardWidgetItem-CZaWF40u.mjs.map +1 -0
  96. package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-BD-rj6Dr.mjs → NcDateTime.vue_vue_type_script_setup_true_lang-C2VbacBQ.mjs} +2 -2
  97. package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-BD-rj6Dr.mjs.map → NcDateTime.vue_vue_type_script_setup_true_lang-C2VbacBQ.mjs.map} +1 -1
  98. package/dist/chunks/{NcDateTimePicker-DYNOGc6A.mjs → NcDateTimePicker-BB--HQog.mjs} +4 -4
  99. package/dist/chunks/{NcDateTimePicker-DYNOGc6A.mjs.map → NcDateTimePicker-BB--HQog.mjs.map} +1 -1
  100. package/dist/chunks/NcDateTimePickerNative-DaPzFiYH.mjs +100 -0
  101. package/dist/chunks/NcDateTimePickerNative-DaPzFiYH.mjs.map +1 -0
  102. package/dist/chunks/NcDialog-CXVaeWJf.mjs +169 -0
  103. package/dist/chunks/NcDialog-CXVaeWJf.mjs.map +1 -0
  104. package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DAZ2Budh.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-DSKWXzqG.mjs} +4 -4
  105. package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DAZ2Budh.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-DSKWXzqG.mjs.map} +1 -1
  106. package/dist/chunks/{NcEllipsisedOption-4k07kvEr.mjs → NcEllipsisedOption-C8uNDC-j.mjs} +4 -4
  107. package/dist/chunks/{NcEllipsisedOption-4k07kvEr.mjs.map → NcEllipsisedOption-C8uNDC-j.mjs.map} +1 -1
  108. package/dist/chunks/{NcEmojiPicker-lhuMMbDy.mjs → NcEmojiPicker-BGO0v-D5.mjs} +11 -11
  109. package/dist/chunks/{NcEmojiPicker-lhuMMbDy.mjs.map → NcEmojiPicker-BGO0v-D5.mjs.map} +1 -1
  110. package/dist/chunks/{NcHeaderButton-BXfTpkIm.mjs → NcHeaderButton-BTZ1WNux.mjs} +2 -2
  111. package/dist/chunks/{NcHeaderButton-BXfTpkIm.mjs.map → NcHeaderButton-BTZ1WNux.mjs.map} +1 -1
  112. package/dist/chunks/{NcHeaderMenu-o9FmNBI5.mjs → NcHeaderMenu-DmpJfS86.mjs} +5 -5
  113. package/dist/chunks/NcHeaderMenu-DmpJfS86.mjs.map +1 -0
  114. package/dist/chunks/{NcHighlight-Cu4UfEEO.mjs → NcHighlight.vue_vue_type_script_lang-DnWQDM_2.mjs} +5 -9
  115. package/dist/chunks/NcHighlight.vue_vue_type_script_lang-DnWQDM_2.mjs.map +1 -0
  116. package/dist/chunks/{NcInputConfirmCancel-C1K1gyQA.mjs → NcInputConfirmCancel-B7gAZ7U1.mjs} +3 -3
  117. package/dist/chunks/{NcInputConfirmCancel-C1K1gyQA.mjs.map → NcInputConfirmCancel-B7gAZ7U1.mjs.map} +1 -1
  118. package/dist/chunks/NcInputField-DH5ybroK.mjs +162 -0
  119. package/dist/chunks/NcInputField-DH5ybroK.mjs.map +1 -0
  120. package/dist/chunks/{NcListItem-C2LlJgjL.mjs → NcListItem-50hUlVlb.mjs} +8 -8
  121. package/dist/chunks/{NcListItem-C2LlJgjL.mjs.map → NcListItem-50hUlVlb.mjs.map} +1 -1
  122. package/dist/chunks/{NcListItemIcon-5ms0eK3w.mjs → NcListItemIcon-BGEA45de.mjs} +5 -5
  123. package/dist/chunks/{NcListItemIcon-5ms0eK3w.mjs.map → NcListItemIcon-BGEA45de.mjs.map} +1 -1
  124. package/dist/chunks/NcLoadingIcon-Dm3kRPrf.mjs +57 -0
  125. package/dist/chunks/NcLoadingIcon-Dm3kRPrf.mjs.map +1 -0
  126. package/dist/chunks/{NcModal-BisVxXe_.mjs → NcModal-CWRw1hyF.mjs} +12 -17
  127. package/dist/chunks/NcModal-CWRw1hyF.mjs.map +1 -0
  128. package/dist/chunks/NcNoteCard-DmhVICGO.mjs +61 -0
  129. package/dist/chunks/NcNoteCard-DmhVICGO.mjs.map +1 -0
  130. package/dist/chunks/NcPasswordField-DY-wDP9m.mjs +211 -0
  131. package/dist/chunks/NcPasswordField-DY-wDP9m.mjs.map +1 -0
  132. package/dist/chunks/{NcPopover-MsWUAvsI.mjs → NcPopover-BUlWWIxc.mjs} +3 -3
  133. package/dist/chunks/{NcPopover-MsWUAvsI.mjs.map → NcPopover-BUlWWIxc.mjs.map} +1 -1
  134. package/dist/chunks/{NcRelatedResourcesPanel-CShyi9lg.mjs → NcRelatedResourcesPanel-BUasditW.mjs} +4 -4
  135. package/dist/chunks/{NcRelatedResourcesPanel-CShyi9lg.mjs.map → NcRelatedResourcesPanel-BUasditW.mjs.map} +1 -1
  136. package/dist/chunks/{NcRichContenteditable-DgH9H1qf.mjs → NcRichContenteditable-CGP8KN41.mjs} +15 -13
  137. package/dist/chunks/{NcRichContenteditable-DgH9H1qf.mjs.map → NcRichContenteditable-CGP8KN41.mjs.map} +1 -1
  138. package/dist/chunks/{NcRichText-BkKK1moX.mjs → NcRichText-DDllQirJ.mjs} +10 -6
  139. package/dist/chunks/{NcRichText-BkKK1moX.mjs.map → NcRichText-DDllQirJ.mjs.map} +1 -1
  140. package/dist/chunks/{NcSelect-BSa2kSPW.mjs → NcSelect-Bkg2rrDQ.mjs} +4 -4
  141. package/dist/chunks/{NcSelect-BSa2kSPW.mjs.map → NcSelect-Bkg2rrDQ.mjs.map} +1 -1
  142. package/dist/chunks/{NcSelectTags-BW0QroJV.mjs → NcSelectTags-gJMICSS2.mjs} +4 -4
  143. package/dist/chunks/{NcSelectTags-BW0QroJV.mjs.map → NcSelectTags-gJMICSS2.mjs.map} +1 -1
  144. package/dist/chunks/{NcSelectUsers-Bhx9k-0v.mjs → NcSelectUsers-mRdIiG7L.mjs} +3 -3
  145. package/dist/chunks/{NcSelectUsers-Bhx9k-0v.mjs.map → NcSelectUsers-mRdIiG7L.mjs.map} +1 -1
  146. package/dist/chunks/{NcSettingsInputText-CrOqaL-x.mjs → NcSettingsInputText-P8cEi0aP.mjs} +3 -3
  147. package/dist/chunks/{NcSettingsInputText-CrOqaL-x.mjs.map → NcSettingsInputText-P8cEi0aP.mjs.map} +1 -1
  148. package/dist/chunks/{NcSettingsSection-D6ShpfeY.mjs → NcSettingsSection-DkDLjL_G.mjs} +2 -2
  149. package/dist/chunks/{NcSettingsSection-D6ShpfeY.mjs.map → NcSettingsSection-DkDLjL_G.mjs.map} +1 -1
  150. package/dist/chunks/{NcSettingsSelectGroup-DpNxkoZ2.mjs → NcSettingsSelectGroup-BvYxv8aw.mjs} +4 -4
  151. package/dist/chunks/{NcSettingsSelectGroup-DpNxkoZ2.mjs.map → NcSettingsSelectGroup-BvYxv8aw.mjs.map} +1 -1
  152. package/dist/chunks/NcTextArea-D4hJqp6W.mjs +122 -0
  153. package/dist/chunks/NcTextArea-D4hJqp6W.mjs.map +1 -0
  154. package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-BggEO9Jn.mjs +92 -0
  155. package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-BggEO9Jn.mjs.map +1 -0
  156. package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-T3gPr-FV.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-C7loAI0C.mjs} +3 -3
  157. package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-T3gPr-FV.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-C7loAI0C.mjs.map} +1 -1
  158. package/dist/chunks/NcUserBubble-CKN4C4kP.mjs +136 -0
  159. package/dist/chunks/NcUserBubble-CKN4C4kP.mjs.map +1 -0
  160. package/dist/chunks/{NcUserStatusIcon-CtOZd90o.mjs → NcUserStatusIcon-BX9ILG2r.mjs} +2 -2
  161. package/dist/chunks/{NcUserStatusIcon-CtOZd90o.mjs.map → NcUserStatusIcon-BX9ILG2r.mjs.map} +1 -1
  162. package/dist/chunks/{_l10n-Bg-fZ9R0.mjs → _l10n-B4AgnzNC.mjs} +59 -69
  163. package/dist/chunks/_l10n-B4AgnzNC.mjs.map +1 -0
  164. package/dist/chunks/{colors-BPGhD2C5.mjs → colors-fFK6HkHZ.mjs} +2 -2
  165. package/dist/chunks/{colors-BPGhD2C5.mjs.map → colors-fFK6HkHZ.mjs.map} +1 -1
  166. package/dist/chunks/mdi-CWpCzTmH.mjs +33 -0
  167. package/dist/chunks/{mdi-CR-3gwdl.mjs.map → mdi-CWpCzTmH.mjs.map} +1 -1
  168. package/dist/chunks/{referencePickerModal-Dw1szWUR.mjs → referencePickerModal-uLIBRHIc.mjs} +19 -19
  169. package/dist/chunks/{referencePickerModal-Dw1szWUR.mjs.map → referencePickerModal-uLIBRHIc.mjs.map} +1 -1
  170. package/dist/chunks/{useFormatDateTime-L411ysPm.mjs → useFormatDateTime-DmnI1ENQ.mjs} +2 -2
  171. package/dist/chunks/{useFormatDateTime-L411ysPm.mjs.map → useFormatDateTime-DmnI1ENQ.mjs.map} +1 -1
  172. package/dist/chunks/{usernameToColor-CuTR6O_B.mjs → usernameToColor-Bik5PNni.mjs} +2 -2
  173. package/dist/chunks/{usernameToColor-CuTR6O_B.mjs.map → usernameToColor-Bik5PNni.mjs.map} +1 -1
  174. package/dist/components/NcActionButton/index.mjs +1 -1
  175. package/dist/components/NcActionButtonGroup/index.mjs +1 -1
  176. package/dist/components/NcActionCheckbox/NcActionCheckbox.vue.d.ts +1 -1
  177. package/dist/components/NcActionInput/index.mjs +1 -1
  178. package/dist/components/NcActionRadio/NcActionRadio.vue.d.ts +1 -1
  179. package/dist/components/NcActionTextEditable/index.mjs +1 -1
  180. package/dist/components/NcActions/index.mjs +1 -1
  181. package/dist/components/NcAppContent/NcAppContent.vue.d.ts +2 -1
  182. package/dist/components/NcAppContent/index.mjs +1 -1
  183. package/dist/components/NcAppNavigation/NcAppNavigation.vue.d.ts +66 -0
  184. package/dist/components/NcAppNavigation/index.mjs +1 -1
  185. package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
  186. package/dist/components/NcAppNavigationItem/index.mjs +1 -1
  187. package/dist/components/NcAppNavigationNew/index.mjs +1 -1
  188. package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
  189. package/dist/components/NcAppNavigationSearch/NcAppNavigationSearch.vue.d.ts +275 -0
  190. package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
  191. package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
  192. package/dist/components/NcAppNavigationSpacer/NcAppNavigationSpacer.vue.d.ts +1 -1
  193. package/dist/components/NcAppNavigationSpacer/index.d.ts +4 -0
  194. package/dist/components/NcAppNavigationSpacer/index.mjs +1 -1
  195. package/dist/components/NcAppNavigationToggle/NcAppNavigationToggle.vue.d.ts +9 -0
  196. package/dist/components/NcAppNavigationToggle/index.d.ts +5 -3
  197. package/dist/components/NcAppNavigationToggle/index.mjs +2 -3
  198. package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
  199. package/dist/components/NcAppSidebar/index.mjs +1 -1
  200. package/dist/components/NcAvatar/index.mjs +1 -1
  201. package/dist/components/NcBreadcrumb/index.mjs +1 -1
  202. package/dist/components/NcBreadcrumbs/index.mjs +1 -1
  203. package/dist/components/NcButton/index.mjs +1 -1
  204. package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
  205. package/dist/components/NcChip/NcChip.vue.d.ts +2 -2
  206. package/dist/components/NcChip/index.mjs +1 -1
  207. package/dist/components/NcCollectionList/index.mjs +1 -1
  208. package/dist/components/NcColorPicker/NcColorPicker.vue.d.ts +54 -1
  209. package/dist/components/NcColorPicker/index.d.ts +4 -0
  210. package/dist/components/NcColorPicker/index.mjs +1 -1
  211. package/dist/components/NcContent/NcContent.vue.d.ts +33 -0
  212. package/dist/components/NcContent/index.d.ts +4 -0
  213. package/dist/components/NcContent/index.mjs +1 -1
  214. package/dist/components/NcDashboardWidget/index.mjs +1 -1
  215. package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
  216. package/dist/components/NcDateTime/index.mjs +1 -1
  217. package/dist/components/NcDateTimePicker/index.mjs +1 -1
  218. package/dist/components/NcDateTimePickerNative/NcDateTimePickerNative.vue.d.ts +29 -151
  219. package/dist/components/NcDateTimePickerNative/index.d.ts +4 -0
  220. package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
  221. package/dist/components/NcDialog/NcDialog.vue.d.ts +73 -380
  222. package/dist/components/NcDialog/index.d.ts +4 -0
  223. package/dist/components/NcDialog/index.mjs +1 -1
  224. package/dist/components/NcDialogButton/index.mjs +1 -1
  225. package/dist/components/NcEllipsisedOption/index.mjs +1 -1
  226. package/dist/components/NcEmojiPicker/index.mjs +1 -1
  227. package/dist/components/NcHeaderButton/index.mjs +1 -1
  228. package/dist/components/NcHeaderMenu/index.d.ts +4 -0
  229. package/dist/components/NcHeaderMenu/index.mjs +1 -1
  230. package/dist/components/NcHighlight/NcHighlight.vue.d.ts +15 -8
  231. package/dist/components/NcHighlight/index.d.ts +4 -0
  232. package/dist/components/NcHighlight/index.mjs +1 -1
  233. package/dist/components/NcInputField/NcInputField.vue.d.ts +147 -0
  234. package/dist/components/NcInputField/index.d.ts +5 -0
  235. package/dist/components/NcInputField/index.mjs +1 -1
  236. package/dist/components/NcListItem/index.mjs +1 -1
  237. package/dist/components/NcListItemIcon/index.mjs +1 -1
  238. package/dist/components/NcLoadingIcon/NcLoadingIcon.vue.d.ts +9 -45
  239. package/dist/components/NcLoadingIcon/index.d.ts +4 -0
  240. package/dist/components/NcLoadingIcon/index.mjs +1 -1
  241. package/dist/components/NcModal/index.mjs +1 -1
  242. package/dist/components/NcNoteCard/NcNoteCard.vue.d.ts +37 -62
  243. package/dist/components/NcNoteCard/index.d.ts +4 -0
  244. package/dist/components/NcNoteCard/index.mjs +1 -1
  245. package/dist/components/NcPasswordField/NcPasswordField.vue.d.ts +282 -0
  246. package/dist/components/NcPasswordField/index.d.ts +4 -0
  247. package/dist/components/NcPasswordField/index.mjs +1 -1
  248. package/dist/components/NcPopover/index.mjs +1 -1
  249. package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
  250. package/dist/components/NcRichContenteditable/NcRichContenteditable.vue.d.ts +1 -1
  251. package/dist/components/NcRichContenteditable/index.mjs +1 -1
  252. package/dist/components/NcRichText/index.mjs +3 -3
  253. package/dist/components/NcSelect/index.mjs +1 -1
  254. package/dist/components/NcSelectTags/index.mjs +1 -1
  255. package/dist/components/NcSelectUsers/index.mjs +1 -1
  256. package/dist/components/NcSettingsInputText/NcSettingsInputText.vue.d.ts +1 -1
  257. package/dist/components/NcSettingsInputText/index.mjs +1 -1
  258. package/dist/components/NcSettingsSection/index.mjs +1 -1
  259. package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
  260. package/dist/components/NcTextArea/NcTextArea.vue.d.ts +51 -170
  261. package/dist/components/NcTextArea/index.d.ts +4 -0
  262. package/dist/components/NcTextArea/index.mjs +1 -1
  263. package/dist/components/NcTextField/NcTextField.vue.d.ts +277 -0
  264. package/dist/components/NcTextField/index.d.ts +4 -0
  265. package/dist/components/NcTextField/index.mjs +2 -2
  266. package/dist/components/NcTimezonePicker/index.mjs +1 -1
  267. package/dist/components/NcUserBubble/NcUserBubble.vue.d.ts +90 -0
  268. package/dist/components/NcUserBubble/NcUserBubbleDiv.vue.d.ts +16 -1
  269. package/dist/components/NcUserBubble/index.d.ts +4 -0
  270. package/dist/components/NcUserBubble/index.mjs +1 -1
  271. package/dist/components/NcUserStatusIcon/index.mjs +1 -1
  272. package/dist/components/index.d.ts +15 -15
  273. package/dist/functions/reference/index.mjs +1 -1
  274. package/dist/functions/usernameToColor/index.mjs +1 -1
  275. package/dist/index.mjs +76 -76
  276. package/dist/utils/VueTypes.d.ts +6 -0
  277. package/package.json +2 -2
  278. package/dist/assets/NcAppNavigationSpacer-BJj8CIpA.css +0 -6
  279. package/dist/chunks/AlertCircleOutline-DVzpKQVu.mjs +0 -49
  280. package/dist/chunks/AlertCircleOutline-DVzpKQVu.mjs.map +0 -1
  281. package/dist/chunks/NcAppContent-DRhM7Gyz.mjs.map +0 -1
  282. package/dist/chunks/NcAppNavigationSpacer-CzBLuQL8.mjs +0 -15
  283. package/dist/chunks/NcAppNavigationSpacer-CzBLuQL8.mjs.map +0 -1
  284. package/dist/chunks/NcAppNavigationToggle-CFw3W3_o.mjs.map +0 -1
  285. package/dist/chunks/NcCheckboxRadioSwitch-Ca1ouh22.mjs.map +0 -1
  286. package/dist/chunks/NcColorPicker-BjsBCkEt.mjs +0 -275
  287. package/dist/chunks/NcColorPicker-BjsBCkEt.mjs.map +0 -1
  288. package/dist/chunks/NcDashboardWidgetItem-DnI9uLf1.mjs.map +0 -1
  289. package/dist/chunks/NcDateTimePickerNative-D0pjWawX.mjs +0 -202
  290. package/dist/chunks/NcDateTimePickerNative-D0pjWawX.mjs.map +0 -1
  291. package/dist/chunks/NcDialog-BQNR_-Ju.mjs +0 -319
  292. package/dist/chunks/NcDialog-BQNR_-Ju.mjs.map +0 -1
  293. package/dist/chunks/NcHeaderMenu-o9FmNBI5.mjs.map +0 -1
  294. package/dist/chunks/NcHighlight-Cu4UfEEO.mjs.map +0 -1
  295. package/dist/chunks/NcInputField-BBS1E7r-.mjs +0 -306
  296. package/dist/chunks/NcInputField-BBS1E7r-.mjs.map +0 -1
  297. package/dist/chunks/NcLoadingIcon-CsMn1bFR.mjs +0 -79
  298. package/dist/chunks/NcLoadingIcon-CsMn1bFR.mjs.map +0 -1
  299. package/dist/chunks/NcModal-BisVxXe_.mjs.map +0 -1
  300. package/dist/chunks/NcNoteCard-XoSOund1.mjs +0 -276
  301. package/dist/chunks/NcNoteCard-XoSOund1.mjs.map +0 -1
  302. package/dist/chunks/NcPasswordField-hZiEd3tC.mjs +0 -298
  303. package/dist/chunks/NcPasswordField-hZiEd3tC.mjs.map +0 -1
  304. package/dist/chunks/NcTextArea-DKHjCur8.mjs +0 -217
  305. package/dist/chunks/NcTextArea-DKHjCur8.mjs.map +0 -1
  306. package/dist/chunks/NcTextField-DJ1KtSKd.mjs +0 -174
  307. package/dist/chunks/NcTextField-DJ1KtSKd.mjs.map +0 -1
  308. package/dist/chunks/NcUserBubble-Csot0WLv.mjs +0 -228
  309. package/dist/chunks/NcUserBubble-Csot0WLv.mjs.map +0 -1
  310. package/dist/chunks/_l10n-Bg-fZ9R0.mjs.map +0 -1
  311. package/dist/chunks/mdi-CR-3gwdl.mjs +0 -21
  312. package/dist/components/NcEllipsisedOption/NcEllipsisedOption.vue.d.ts +0 -95
  313. package/dist/components/NcRichText/NcReferencePicker/NcProviderList.vue.d.ts +0 -215
  314. package/dist/components/NcRichText/NcReferencePicker/NcSearch.vue.d.ts +0 -289
  315. package/dist/components/NcRichText/NcReferencePicker/NcSearchResult.vue.d.ts +0 -69
  316. package/dist/components/NcSelect/NcSelect.vue.d.ts +0 -121
  317. package/dist/components/NcSelectTags/NcSelectTags.vue.d.ts +0 -205
  318. package/dist/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue.d.ts +0 -265
@@ -1,319 +0,0 @@
1
- import '../assets/NcDialog-bP7Jt0ZE.css';
2
- import { useElementSize } from "@vueuse/core";
3
- import { defineComponent, ref, computed, resolveComponent, createBlock, createCommentVNode, openBlock, mergeProps, withCtx, createElementVNode, toDisplayString, resolveDynamicComponent, toHandlers, normalizeClass, createElementBlock, renderSlot, Fragment, renderList } from "vue";
4
- import { N as NcModal } from "./NcModal-BisVxXe_.mjs";
5
- import { _ as _sfc_main$1 } from "./NcDialogButton.vue_vue_type_script_setup_true_lang-DAZ2Budh.mjs";
6
- import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
7
- import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
8
- const _sfc_main = defineComponent({
9
- name: "NcDialog",
10
- components: {
11
- NcDialogButton: _sfc_main$1,
12
- NcModal
13
- },
14
- props: {
15
- /** Name of the dialog (the heading) */
16
- name: {
17
- type: String,
18
- required: true
19
- },
20
- /** Text of the dialog */
21
- message: {
22
- type: String,
23
- default: ""
24
- },
25
- /** Additional elements to add to the focus trap */
26
- additionalTrapElements: {
27
- type: Array,
28
- validator: (arr) => {
29
- return Array.isArray(arr) && arr.every(
30
- (element) => typeof element === "string" || element instanceof HTMLElement
31
- );
32
- },
33
- default: () => []
34
- },
35
- /**
36
- * The element where to mount the dialog, if `null` is passed the dialog is mounted in place
37
- * @default 'body'
38
- */
39
- container: {
40
- type: String,
41
- required: false,
42
- default: "body"
43
- },
44
- /**
45
- * Whether the dialog should be shown
46
- * @default true
47
- */
48
- open: {
49
- type: Boolean,
50
- default: true
51
- },
52
- /**
53
- * Size of the underlying NcModal
54
- * @default 'small'
55
- * @type {'small'|'normal'|'large'|'full'}
56
- */
57
- size: {
58
- type: String,
59
- required: false,
60
- default: "small",
61
- validator: (value) => ["small", "normal", "large", "full"].includes(value)
62
- },
63
- /**
64
- * Buttons to display
65
- * @default []
66
- */
67
- buttons: {
68
- type: Array,
69
- required: false,
70
- default: () => [],
71
- validator(value) {
72
- return Array.isArray(value) && value.every((element) => typeof element === "object");
73
- }
74
- },
75
- /**
76
- * Do not show the close button for the dialog.
77
- * @default false
78
- */
79
- noClose: {
80
- type: Boolean,
81
- default: false
82
- },
83
- /**
84
- * Close the dialog if the user clicked outside of the dialog
85
- * Only relevant if `noClose` is not set.
86
- */
87
- closeOnClickOutside: {
88
- type: Boolean,
89
- default: false
90
- },
91
- /**
92
- * Make the dialog wrapper a HTML form element.
93
- * The buttons will be wrapped within the form so they can be used as submit / reset buttons.
94
- * Please note that when using the property the `navigation` should not be used.
95
- */
96
- isForm: {
97
- type: Boolean,
98
- default: false
99
- },
100
- /**
101
- * Declare if hiding the modal should be animated
102
- * @default false
103
- */
104
- outTransition: {
105
- type: Boolean,
106
- default: false
107
- },
108
- /**
109
- * Optionally pass additional classes which will be set on the navigation for custom styling
110
- * @default ''
111
- * @example
112
- * ```html
113
- * <DialogBase :navigation-classes="['mydialog-navigation']"><!-- --></DialogBase>
114
- * <!-- ... -->
115
- * <style lang="scss">
116
- * :deep(.mydialog-navigation) {
117
- * flex-direction: row-reverse;
118
- * }
119
- * </style>
120
- * ```
121
- */
122
- navigationClasses: {
123
- type: [String, Array, Object],
124
- required: false,
125
- default: ""
126
- },
127
- /**
128
- * aria-label for the dialog navigation.
129
- * Use it when you want to provide a more meaningful label than the dialog name.
130
- *
131
- * By default, navigation is labeled by the dialog name.
132
- */
133
- navigationAriaLabel: {
134
- type: String,
135
- required: false,
136
- default: ""
137
- },
138
- /**
139
- * aria-labelledby for the dialog navigation.
140
- * Use it when you have an implicit navigation label (e.g. a heading).
141
- *
142
- * By default, navigation is labeled by the dialog name.
143
- */
144
- navigationAriaLabelledby: {
145
- type: String,
146
- required: false,
147
- default: ""
148
- },
149
- /**
150
- * Optionally pass additional classes which will be set on the content wrapper for custom styling
151
- * @default ''
152
- */
153
- contentClasses: {
154
- type: [String, Array, Object],
155
- required: false,
156
- default: ""
157
- },
158
- /**
159
- * Optionally pass additional classes which will be set on the dialog itself
160
- * (the default `class` attribute will be set on the modal wrapper)
161
- * @default ''
162
- */
163
- dialogClasses: {
164
- type: [String, Array, Object],
165
- required: false,
166
- default: ""
167
- }
168
- },
169
- emits: ["closing", "update:open", "reset", "submit"],
170
- setup(props, { emit, slots }) {
171
- const wrapper = ref();
172
- const { width: dialogWidth } = useElementSize(wrapper, { width: 900, height: 0 });
173
- const isNavigationCollapsed = computed(() => dialogWidth.value < 876);
174
- const hasNavigation = computed(() => slots?.navigation !== void 0);
175
- const navigationId = createElementId();
176
- const navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || void 0);
177
- const navigationAriaLabelledbyAttr = computed(() => {
178
- if (props.navigationAriaLabel) {
179
- return void 0;
180
- }
181
- return props.navigationAriaLabelledby || navigationId;
182
- });
183
- const dialogElement = ref();
184
- const dialogTagName = computed(() => props.isForm && !hasNavigation.value ? "form" : "div");
185
- const dialogListeners = computed(
186
- () => dialogTagName.value === "form" ? {
187
- /**
188
- * @param {SubmitEvent} event Form submit event
189
- */
190
- submit(event) {
191
- event.preventDefault();
192
- emit("submit", event);
193
- },
194
- /**
195
- * @param {Event} event Form submit event
196
- */
197
- reset(event) {
198
- event.preventDefault();
199
- emit("reset", event);
200
- }
201
- } : {}
202
- );
203
- const showModal = ref(true);
204
- function handleButtonClose(button, result) {
205
- if (button.nativeType === "submit" && dialogTagName.value === "form" && !dialogElement.value.reportValidity()) {
206
- return;
207
- }
208
- handleClosing(result);
209
- window.setTimeout(() => handleClosed(), 300);
210
- }
211
- function handleClosing(result) {
212
- showModal.value = false;
213
- emit("closing", result);
214
- }
215
- const handleClosed = () => {
216
- showModal.value = true;
217
- emit("update:open", false);
218
- };
219
- const modalProps = computed(() => ({
220
- noClose: props.noClose,
221
- container: props.container === void 0 ? "body" : props.container,
222
- // we do not pass the name as we already have the name as the headline
223
- // name: props.name,
224
- // But we need to set the correct label id so the dialog is labelled
225
- labelId: navigationId,
226
- size: props.size,
227
- show: props.open && showModal.value,
228
- outTransition: props.outTransition,
229
- closeOnClickOutside: props.closeOnClickOutside,
230
- additionalTrapElements: props.additionalTrapElements
231
- }));
232
- return {
233
- dialogElement,
234
- dialogListeners,
235
- dialogTagName,
236
- handleButtonClose,
237
- handleClosing,
238
- handleClosed,
239
- hasNavigation,
240
- navigationId,
241
- navigationAriaLabelAttr,
242
- navigationAriaLabelledbyAttr,
243
- isNavigationCollapsed,
244
- modalProps,
245
- wrapper
246
- };
247
- }
248
- });
249
- const _hoisted_1 = ["id", "textContent"];
250
- const _hoisted_2 = ["aria-label", "aria-labelledby"];
251
- const _hoisted_3 = { class: "dialog__text" };
252
- const _hoisted_4 = { class: "dialog__actions" };
253
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
254
- const _component_NcDialogButton = resolveComponent("NcDialogButton");
255
- const _component_NcModal = resolveComponent("NcModal");
256
- return _ctx.open ? (openBlock(), createBlock(_component_NcModal, mergeProps({
257
- key: 0,
258
- class: "dialog__modal",
259
- "enable-slideshow": false,
260
- "disable-swipe": ""
261
- }, _ctx.modalProps, {
262
- onClose: _ctx.handleClosed,
263
- "onUpdate:show": _cache[0] || (_cache[0] = ($event) => _ctx.handleClosing())
264
- }), {
265
- default: withCtx(() => [
266
- createElementVNode("h2", {
267
- id: _ctx.navigationId,
268
- class: "dialog__name",
269
- textContent: toDisplayString(_ctx.name)
270
- }, null, 8, _hoisted_1),
271
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.dialogTagName), mergeProps({
272
- ref: "dialogElement",
273
- class: ["dialog", _ctx.dialogClasses]
274
- }, toHandlers(_ctx.dialogListeners)), {
275
- default: withCtx(() => [
276
- createElementVNode("div", {
277
- ref: "wrapper",
278
- class: normalizeClass(["dialog__wrapper", { "dialog__wrapper--collapsed": _ctx.isNavigationCollapsed }])
279
- }, [
280
- _ctx.hasNavigation ? (openBlock(), createElementBlock("nav", {
281
- key: 0,
282
- class: normalizeClass(["dialog__navigation", _ctx.navigationClasses]),
283
- "aria-label": _ctx.navigationAriaLabelAttr,
284
- "aria-labelledby": _ctx.navigationAriaLabelledbyAttr
285
- }, [
286
- renderSlot(_ctx.$slots, "navigation", { isCollapsed: _ctx.isNavigationCollapsed }, void 0, true)
287
- ], 10, _hoisted_2)) : createCommentVNode("", true),
288
- createElementVNode("div", {
289
- class: normalizeClass(["dialog__content", _ctx.contentClasses])
290
- }, [
291
- renderSlot(_ctx.$slots, "default", {}, () => [
292
- createElementVNode("p", _hoisted_3, toDisplayString(_ctx.message), 1)
293
- ], true)
294
- ], 2)
295
- ], 2),
296
- createElementVNode("div", _hoisted_4, [
297
- renderSlot(_ctx.$slots, "actions", {}, () => [
298
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.buttons, (button, idx) => {
299
- return openBlock(), createBlock(_component_NcDialogButton, mergeProps({
300
- key: idx,
301
- ref_for: true
302
- }, button, {
303
- onClick: (_, result) => _ctx.handleButtonClose(button, result)
304
- }), null, 16, ["onClick"]);
305
- }), 128))
306
- ], true)
307
- ])
308
- ]),
309
- _: 3
310
- }, 16, ["class"]))
311
- ]),
312
- _: 3
313
- }, 16, ["onClose"])) : createCommentVNode("", true);
314
- }
315
- const NcDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3709d2d3"]]);
316
- export {
317
- NcDialog as N
318
- };
319
- //# sourceMappingURL=NcDialog-BQNR_-Ju.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcDialog-BQNR_-Ju.mjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog v-model:open=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" no-close>\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog v-model:open=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\tv-model:open=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@reset=\"newName = ''\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField v-model=\"newName\"\n\t\t\t\tlabel=\"New name\"\n\t\t\t\tminlength=\"6\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Reset',\n\t\t\t\t\tnativeType: 'reset',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Loading buttons\nSometimes a dialog ends with a request and this request might fail due to server-side-validation.\nIn this case it is often desired to keep the dialog open, this can be done by returning `false` from the button callback,\nto not block this callback should return a `Promise<false>`.\n\nIt is also possible to get the result of the callback from the dialog, as the result is passed as the payload of the `closing` event.\n\nWhile the promise is awaited the button will have a loading state,\nthis means, as long as no custom `icon`-slot is used, a loading icon will be shown.\nPlease note that the **button will not be disabled or accessibility reasons**,\nbecause disabled elements cannot be focused and so the loading state could not be communicated e.g. via screen readers.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"openDialog\">Show dialog</NcButton>\n\t\t<NcDialog :buttons=\"buttons\"\n\t\t\tname=\"Create user\"\n\t\t\t:message=\"message\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@closing=\"response = $event\"\n\t\t\t@update:open=\"clickClosesDialog = false\" />\n\t\t<div style=\"margin-top: 8px;\">Dialog response: {{ response }}</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tclickClosesDialog: false,\n\t\t\tresponse: 'none',\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync callback() {\n\t\t\t// wait 3 seconds\n\t\t\tawait new Promise((resolve) => window.setTimeout(resolve, 3000))\n\t\t\tthis.clickClosesDialog = !this.clickClosesDialog\n\t\t\t// Do not close the dialog on first and then every second button click\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\t// return false means the dialog stays open\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn '✅'\n\t\t},\n\n\t\topenDialog() {\n\t\t\tthis.response = 'none'\n\t\t\tthis.showDialog = true\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tbuttons() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Create user',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tcallback: this.callback,\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tmessage() {\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\treturn 'Next button click will work and close the dialog.'\n\t\t\t} else {\n\t\t\t\treturn 'Clicking the button will load but not close the dialog.'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\tdisable-swipe\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing()\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<component :is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"(_, result) => handleButtonClose(button, result)\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue'\nimport type { ComponentProps } from '../../utils/VueTypes.ts'\n\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport { createElementId } from '../../utils/createElementId.ts'\n\ntype NcDialogButtonProps = ComponentProps<typeof NcDialogButton>\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array as PropType<(string|HTMLElement)[]>,\n\t\t\tvalidator: (arr: unknown) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String as PropType<'small'|'normal'|'large'|'full'>,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value: string) => ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array as PropType<NcDialogButtonProps[]>,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator(value: unknown[]) {\n\t\t\t\treturn Array.isArray(value)\n\t\t\t\t\t&& value.every((element) => typeof element === 'object')\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Do not show the close button for the dialog.\n\t\t * @default false\n\t\t */\n\t\tnoClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `noClose` is not set.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open', 'reset', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t */\n\t\tconst wrapper = ref<HTMLDivElement>()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900, height: 0 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = createElementId()\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\tsubmit(event) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\temit('submit', event)\n\t\t\t\t},\n\t\t\t\t/**\n\t\t\t\t * @param {Event} event Form submit event\n\t\t\t\t */\n\t\t\t\treset(event) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t/**\n\t\t\t\t\t * Forwarded HTMLFormElement reset event (only if `is-form` is set).\n\t\t\t\t\t */\n\t\t\t\t\temit('reset', event)\n\t\t\t\t},\n\t\t\t}\n\t\t\t: {},\n\t\t)\n\n\t\t/**\n\t\t * If the underlying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t * @param {MouseEvent} button The button that was clicked\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tfunction handleButtonClose(button, result) {\n\t\t\t// Skip close on submit if invalid dialog\n\t\t\tif (button.nativeType === 'submit'\n\t\t\t\t&& dialogTagName.value === 'form'\n\t\t\t\t&& !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing(result)\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t * @param result - The result of the callback\n\t\t */\n\t\tfunction handleClosing(result?: unknown): void {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet.\n\t\t\t *\n\t\t\t * @param result - The result of the button callback (`undefined` if closing because of clicking the 'close'-button)\n\t\t\t */\n\t\t\temit('closing', result)\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tnoClose: props.noClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\tfont-size: 21px;\n\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block: 0 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":["NcDialogButton","_resolveComponent","_openBlock","_createBlock","_mergeProps","handleClosed","navigationId","_toDisplayString","dialogClasses","_toHandlers","_withCtx","_createElementVNode","hasNavigation","_createElementBlock","navigationAriaLabelledbyAttr","_renderSlot","_createCommentVNode","_normalizeClass","_Fragment","_renderList"],"mappings":";;;;;;AAgRA,MAAA,YAAe,gBAAgB;AAAA,EAC9B,MAAM;AAAA,EAEN,YAAY;AAAA,IA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AAA;AAAA,cAC9C,mBAAgE,KAAA;AAAA,YAAA,GAAA;AAAA,cA1OrEC,WAAA,KAAA,QAAA,cAAA,EAAA,aAAA,KAAA,yBAAA,QAAA,IAAA;AAAA,YA6OI,GAAA,IAAA,UAMM,KANDC,mBA7OT,IA6Oe,IAAA;AAAA,YAAAL,mBAAA,OAAA;AAAA,cACV,OAIOM,eAAA,CAAA,mBAAA,KAAA,cAAA,CAAA;AAAA,YAAA,GAAA;AAAA;;;YAIT,GAAA,CAAA;AAAA,UACC,GAAA,CAAA;AAAA,UACCN,mBAAA,OAAA,YAAA;AAAA,YAG6DI,WAAA,KAAA,QAAA,WAAA,CAAA,GAAA,MAAA;AAAA,eAFnDb,UAAA,IAAA,GAAAW,mBAAAK,UAAA,MAAAC,WAAA,KAAA,SAAA,CAAA,QAAA,QAAA;AAzPf,uBAAAjB,UAAA,GAAAC,YAAA,2BAAAC,WAAA;AAAA,kBA0Pc,KAAA;AAAA,kBACP,SAAK;AAAA,gBAAA,GAAA,QAAA;AAAA;;;;UA3PZ,CAAA;AAAA,QAAA,CAAA;AAAA;MAAA,GAAA,IAAA,CAAA,OAAA,CAAA;AAAA,IAAA,CAAA;AAAA,IAAA,GAAA;AAAA,EAAA,GAAA,IAAA,CAAA,SAAA,CAAA,KAAAY,mBAAA,IAAA,IAAA;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcHeaderMenu-o9FmNBI5.mjs","sources":["../../src/components/NcHeaderMenu/NcHeaderMenu.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used in the Nextcloud top header.\n\n```\n<template>\n\t<div id=\"nextcloud-header\">\n\t\t<NcHeaderMenu id=\"search\"\n\t\t\taria-label=\"Search\">\n\t\t\t<template #trigger>\n\t\t\t\t<Magnify />\n\t\t\t</template>\n\t\t\t<div>\n\t\t\t\t<NcTextField label=\"Search for files, comments, contacts…\"\n\t\t\t\t\tstyle=\"padding-inline: 8px;\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\tv-model=\"query\" />\n\t\t\t\t<NcEmptyContent\n\t\t\t\t\tname=\"Search\"\n\t\t\t\t\t:description=\"query ? `No results for '${query}'` : 'Start typing to search'\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Magnify />\n\t\t\t\t\t</template>\n\t\t\t\t</NcEmptyContent>\n\t\t\t</div>\n\t\t</NcHeaderMenu>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tMagnify,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tquery: '',\n\t\t}\n\t},\n}\n</script>\n<style>\n#nextcloud-header {\n\tdisplay: flex;\n\tjustify-content: right;\n\tbackground-color: var(--color-primary);\n\theight: var(--header-height, 50px);\n\tpadding-inline-end: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<component :is=\"wrapperTag\"\n\t\t:id=\"id\"\n\t\tref=\"headerMenu\"\n\t\t:aria-labelledby=\"isNav ? triggerId : null\"\n\t\t:class=\"{ 'header-menu--opened': isOpened }\"\n\t\tclass=\"header-menu\"\n\t\t@focusout=\"onFocusOut\">\n\t\t<!-- Trigger -->\n\t\t<NcButton :id=\"isNav ? triggerId : null\"\n\t\t\tref=\"triggerButton\"\n\t\t\tclass=\"header-menu__trigger\"\n\t\t\t:aria-controls=\"`header-menu-${id}`\"\n\t\t\t:aria-expanded=\"isOpened.toString()\"\n\t\t\tsize=\"large\"\n\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t@click.prevent=\"toggleMenu\">\n\t\t\t<template #icon>\n\t\t\t\t<slot name=\"trigger\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<span v-if=\"description\"\n\t\t\t:id=\"descriptionId\"\n\t\t\tclass=\"header-menu__description hidden-visually\">\n\t\t\t{{ description }}\n\t\t</span>\n\n\t\t<!-- Visual triangle -->\n\t\t<div v-show=\"isOpened\" class=\"header-menu__caret\" />\n\n\t\t<!-- Menu opened content -->\n\t\t<div v-show=\"isOpened\"\n\t\t\t:id=\"`header-menu-${id}`\"\n\t\t\tclass=\"header-menu__wrapper\">\n\t\t\t<div ref=\"contentContainer\" class=\"header-menu__content\">\n\t\t\t\t<slot />\n\t\t\t</div>\n\t\t</div>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport type { FocusTrap } from 'focus-trap'\n\nimport { onClickOutside } from '@vueuse/core'\nimport { createFocusTrap } from 'focus-trap'\nimport { computed, nextTick, ref, useTemplateRef, watch, type Slot } from 'vue'\nimport { useHotKey } from '../../composables/index.js'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport { createElementId } from '../../utils/createElementId.ts'\n\nimport NcButton from '../NcButton/index.ts'\n\nconst {\n\texcludeClickOutsideSelectors = [],\n\topen = false,\n\tisNav = false,\n} = defineProps<{\n\t/**\n\t * Unique id for this menu\n\t */\n\tid: string\n\n\t/**\n\t * aria-label attribute of the menu open button\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * Current menu open state\n\t */\n\topen?: boolean\n\n\t/**\n\t * Pass `true` if the header menu is used for website navigation\n\t *\n\t * The wrapper tag will be set to `nav` and its `aria-labelledby`\n\t * will be associated with the menu open button\n\t */\n\tisNav?: boolean\n\n\t/**\n\t * Additional visually hidden description text for the menu\n\t * open button\n\t */\n\tdescription?: string\n\n\t/**\n\t * A query-selector or an array of query-selectors\n\t * to be ignored when clicking outside an element\n\t */\n\texcludeClickOutsideSelectors?: string | string[]\n}>()\n\nconst emit = defineEmits<{\n\t/** Emitted when the menu is fully closed (animation done) */\n\tclosed: []\n\n\t/** Emitted when the menu is fully opened (animation done) */\n\topened: []\n\n\t/** Updated open state */\n\t'update:open': [v: boolean]\n}>()\n\ndefineSlots<{\n\t/** The menu content */\n\tdefault: Slot\n\t/** Icon trigger slot. Make sure the svg path is at least 16px. Usually mdi icon works at 20px */\n\ttrigger: Slot\n}>()\n\n/** Id of the menu description */\nconst descriptionId = createElementId()\n/** Id of the trigger button */\nconst triggerId = createElementId()\n/** The active focus trap (if any) */\nconst focusTrap = ref<FocusTrap>()\n/** Is the menu currently opened */\nconst isOpened = ref(open)\n/** HTML tag to use for the header menu */\nconst wrapperTag = computed(() => isNav ? 'nav' : 'div')\n\n/** The menu content container element */\nconst contentContainer = useTemplateRef('contentContainer')\n/** The overall header menu wrapping element (<nav> or <div>) */\nconst headerMenu = useTemplateRef<HTMLElement>('headerMenu')\n/** The menu trigger button */\nconst triggerButton = useTemplateRef('triggerButton')\n\n// Handle click outside of the menu -> should close the menu\nconst ignore = computed(() => Array.isArray(excludeClickOutsideSelectors)\n\t? excludeClickOutsideSelectors\n\t: excludeClickOutsideSelectors.split(' '),\n)\nonClickOutside(headerMenu, () => setMenuState(false), { ignore })\n\n// Pressing escape should close the menu\nuseHotKey('Escape', () => setMenuState(false), { prevent: true })\n\n// Watch the open prop to adjust the internal opened state\nwatch(() => open, (state: boolean) => setMenuState(state))\n\n/**\n * Toggle the current menu open state\n */\nfunction toggleMenu() {\n\tsetMenuState(!isOpened.value)\n}\n\n/**\n * Set the menu opened state\n * @param state The opened state to set\n */\nasync function setMenuState(state: boolean) {\n\tif (state === isOpened.value) {\n\t\treturn\n\t}\n\n\tisOpened.value = state\n\temit('update:open', state)\n\n\t// wait one tick to make sure the rendering finished\n\tawait nextTick()\n\t// either add or clear the focus trap\n\tawait (state ? addFocusTrap() : clearFocusTrap())\n\n\t// Emit signal to mark finished toggling\n\t// @ts-expect-error This seems to be broken in Vue's typescript macro compiler...\n\temit(state ? 'opened' : 'closed')\n}\n\n/**\n * When this is role navigation, then we cannot apply a focus trap.\n * In this case we close the menu on focus-out.\n *\n * @param event the focus event\n */\nfunction onFocusOut(event: FocusEvent) {\n\t// Is not a navigation\n\tif (!isNav) {\n\t\treturn\n\t}\n\n\t// Event target is not a node\n\tif (!(event.relatedTarget instanceof Node)) {\n\t\treturn\n\t}\n\n\tif (headerMenu.value?.contains(event.relatedTarget)) {\n\t\tsetMenuState(false)\n\t}\n}\n\n/**\n * Add focus trap for accessibility.\n * Shall only be used when all children are mounted\n * and available in the DOM. We use $nextTick for that.\n */\nasync function addFocusTrap() {\n\t// We cannot add the focus trap on navigation roles\n\t// also skip if already set\n\tif (isNav || focusTrap.value) {\n\t\treturn\n\t}\n\n\t// Init focus trap\n\tfocusTrap.value = createFocusTrap(contentContainer.value!, {\n\t\tallowOutsideClick: true,\n\t\ttrapStack: getTrapStack(),\n\t\tfallbackFocus: triggerButton.value?.$el,\n\t})\n\tfocusTrap.value.activate()\n}\n\n/**\n * Deactivate and clear the focus trap\n */\nfunction clearFocusTrap() {\n\tfocusTrap.value?.deactivate()\n\tfocusTrap.value = undefined\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use './header-menu__trigger.scss';\n\n// content inner and outer margin\n// Also used for menu top-right positioning\n$externalMargin: 8px;\n\n.header-menu {\n\t&__wrapper {\n\t\tposition: fixed;\n\t\tz-index: 2000;\n\t\ttop: var(--header-height);\n\t\tinset-inline-end: 0;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0 $externalMargin;\n\t\tborder-radius: 0 0 var(--border-radius) var(--border-radius);\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-color: var(--color-main-background);\n\n\t\tfilter: drop-shadow(0 1px 5px var(--color-box-shadow));\n\t}\n\n\t&__carret {\n\t\tposition: absolute;\n\t\tz-index: 2001; // Because __wrapper is 2000.\n\t\tbottom: 0;\n\t\tinset-inline-start: calc(50% - 10px);\n\t\twidth: 0;\n\t\theight: 0;\n\t\tcontent: ' ';\n\t\tpointer-events: none;\n\t\tborder: 10px solid transparent;\n\t\tborder-bottom-color: var(--color-main-background);\n\t}\n\n\t&__content {\n\t\toverflow: auto;\n\t\twidth: 350px;\n\t\tmax-width: calc(100vw - 2 * $externalMargin);\n\t\tmin-height: calc(var(--default-clickable-area) * 1.5);\n\t\tmax-height: calc(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,mBAAe,eAAe;AAGzB,UAAA,QAAA,SAAS,UAAU,OAAO;AAC7B;AAAA,MAAA;AAIS,gBAAA,QAAQ,gBAAgB,iBAAiB,OAAQ;AAAA,QAC1D,mBAAmB;AAAA,QACnB,WAAW,aAAa;AAAA,QACxB,eAAe,cAAc,OAAO;AAAA,MAAA,CACpC;AACD,gBAAU,MAAM,SAAS;AAAA,IAAA;AAM1B,aAAS,iBAAiB;AACzB,gBAAU,OAAO,WAAW;AAC5B,gBAAU,QAAQ;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NcHighlight-Cu4UfEEO.mjs","sources":["../../src/utils/findRanges.ts","../../src/components/NcHighlight/NcHighlight.vue"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nexport interface StringRange {\n\tstart: number\n\tend: number\n}\n\n/**\n * Find the ranges of a substr in a given string\n *\n * @param text - The text to search in\n * @param search - The text to search for\n * @return The array of ranges to highlight\n */\nexport function findRanges(text: string, search: string): StringRange[] {\n\tconst ranges: StringRange[] = []\n\n\tlet currentIndex = 0\n\tlet index = text.toLowerCase().indexOf(search.toLowerCase(), currentIndex)\n\t// Variable to track that we don't iterate more often than the length of the text.\n\t// Shouldn't happen anyway, but just to be sure to not hang the browser for some reason.\n\tlet i = 0\n\twhile (index > -1 && i++ < text.length) {\n\t\tcurrentIndex = index + search.length\n\t\tranges.push({ start: index, end: currentIndex })\n\n\t\tindex = text.toLowerCase().indexOf(search.toLowerCase(), currentIndex)\n\t}\n\treturn ranges\n}\n","<!--\n - SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nHighlight a string with html &lt;strong&gt;. Accepts a substring to highlight or an array with ranges.\n\n### Usage\n\n```vue\n<template>\n\t<div>\n\t\t<NcHighlight text=\"Highlight me please!\" search=\"me\" />\n\t\t<br />\n\t\t<NcHighlight text=\"Highlight me please!\" :highlight=\"[{ start: 4, end: 12 }]\" />\n\t</div>\n</template>\n```\n</docs>\n\n<script>\nimport { h } from 'vue'\nimport { findRanges } from '../../utils/findRanges.ts'\n\nexport default {\n\tname: 'NcHighlight',\n\tprops: {\n\t\t/**\n\t\t * The string to display\n\t\t */\n\t\ttext: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The string to match and highlight\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The ranges to highlight, takes precedence over the search prop.\n\t\t */\n\t\thighlight: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * The indice ranges which should be highlighted.\n\t\t * If an array with ranges is provided, we use it. Otherwise\n\t\t * we calculate it based on the provided substring to highlight.\n\t\t *\n\t\t * @return {Array} The array of ranges to highlight\n\t\t */\n\t\tranges() {\n\t\t\tlet ranges = []\n\t\t\t// If the search term and the highlight array is empty, return early with empty array\n\t\t\tif (!this.search && this.highlight.length === 0) {\n\t\t\t\treturn ranges\n\t\t\t}\n\n\t\t\t// If there are ranges to highlight provided, we use this array.\n\t\t\tif (this.highlight.length > 0) {\n\t\t\t\tranges = this.highlight\n\t\t\t// Otherwise we check the text to highlight for matches of the search term.\n\t\t\t} else {\n\t\t\t\tranges = findRanges(this.text, this.search)\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Ensure that the start of each range is equal to or smaller than the end\n\t\t\t */\n\t\t\tranges.forEach((range, i) => {\n\t\t\t\tif (range.end < range.start) {\n\t\t\t\t\tranges[i] = {\n\t\t\t\t\t\tstart: range.end,\n\t\t\t\t\t\tend: range.start,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t/**\n\t\t\t * Validate the ranges array to be within the string length\n\t\t\t * and discard ranges which are completely out of bonds.\n\t\t\t */\n\t\t\tranges = ranges.reduce((validRanges, range) => {\n\t\t\t\tif (range.start < this.text.length && range.end > 0) {\n\t\t\t\t\tvalidRanges.push({\n\t\t\t\t\t\tstart: (range.start < 0) ? 0 : range.start,\n\t\t\t\t\t\tend: (range.end > this.text.length) ? this.text.length : range.end,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\treturn validRanges\n\t\t\t}, [])\n\n\t\t\t/**\n\t\t\t * Sort ranges ascendingly (necessary for next step)\n\t\t\t */\n\t\t\tranges.sort((a, b) => {\n\t\t\t\treturn a.start - b.start\n\t\t\t})\n\n\t\t\t/**\n\t\t\t * Merge overlapping or adjacent ranges\n\t\t\t */\n\t\t\tranges = ranges.reduce((mergedRanges, range) => {\n\t\t\t\t// If there are no ranges, just add the range\n\t\t\t\tif (!mergedRanges.length) {\n\t\t\t\t\tmergedRanges.push(range)\n\t\t\t\t} else {\n\t\t\t\t\t// If the range overlaps the last range, merge them\n\t\t\t\t\tconst idx = mergedRanges.length - 1\n\t\t\t\t\tif (mergedRanges[idx].end >= range.start) {\n\t\t\t\t\t\tmergedRanges[idx] = {\n\t\t\t\t\t\t\tstart: mergedRanges[idx].start,\n\t\t\t\t\t\t\tend: Math.max(mergedRanges[idx].end, range.end),\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmergedRanges.push(range)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn mergedRanges\n\t\t\t}, [])\n\n\t\t\treturn ranges\n\t\t},\n\t\t/**\n\t\t * Calculate the different chunks to show based on the ranges to highlight.\n\t\t *\n\t\t * @return {Array} The chunks\n\t\t */\n\t\tchunks() {\n\t\t\t// If the ranges array is empty, show only one chunk with all text\n\t\t\tif (this.ranges.length === 0) {\n\t\t\t\treturn [{\n\t\t\t\t\tstart: 0,\n\t\t\t\t\tend: this.text.length,\n\t\t\t\t\thighlight: false,\n\t\t\t\t\ttext: this.text,\n\t\t\t\t}]\n\t\t\t}\n\t\t\t// Calculate the chunks\n\t\t\tconst chunks = []\n\t\t\tlet currentIndex = 0\n\t\t\tlet currentRange = 0\n\t\t\t// Iterate over all characters in the text\n\t\t\twhile (currentIndex < this.text.length) {\n\t\t\t\t// Get the first range to highlight\n\t\t\t\tconst range = this.ranges[currentRange]\n\t\t\t\t// If the range starts at the current index, construct a chunk to highlight,\n\t\t\t\t// set the next range and continue with the next iteration.\n\t\t\t\tif (range.start === currentIndex) {\n\t\t\t\t\tchunks.push({\n\t\t\t\t\t\t...range,\n\t\t\t\t\t\thighlight: true,\n\t\t\t\t\t\ttext: this.text.slice(range.start, range.end),\n\t\t\t\t\t})\n\t\t\t\t\tcurrentRange++\n\t\t\t\t\tcurrentIndex = range.end\n\t\t\t\t\t// If this was the last range to highlight and we haven't reached the end of the text,\n\t\t\t\t\t// add the rest of the text without highlighting.\n\t\t\t\t\tif (currentRange >= this.ranges.length && currentIndex < this.text.length) {\n\t\t\t\t\t\tchunks.push({\n\t\t\t\t\t\t\tstart: currentIndex,\n\t\t\t\t\t\t\tend: this.text.length,\n\t\t\t\t\t\t\thighlight: false,\n\t\t\t\t\t\t\ttext: this.text.slice(currentIndex),\n\t\t\t\t\t\t})\n\t\t\t\t\t\t// Set the current index so the while loop ends.\n\t\t\t\t\t\tcurrentIndex = this.text.length\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// If the current range does start after the current index, construct a chunk without\n\t\t\t\t// highlighting and set the current index to the start of the current range.\n\t\t\t\tchunks.push({\n\t\t\t\t\tstart: currentIndex,\n\t\t\t\t\tend: range.start,\n\t\t\t\t\thighlight: false,\n\t\t\t\t\ttext: this.text.slice(currentIndex, range.start),\n\t\t\t\t})\n\t\t\t\tcurrentIndex = range.start\n\t\t\t}\n\t\t\treturn chunks\n\t\t},\n\t},\n\t/**\n\t * The render function to display the component\n\t *\n\t * @return {object} The created VNode\n\t */\n\trender() {\n\t\tif (!this.ranges.length) {\n\t\t\treturn h('span', {}, this.text)\n\t\t}\n\n\t\treturn h('span', {}, this.chunks.map(chunk => {\n\t\t\treturn chunk.highlight ? h('strong', {}, chunk.text) : chunk.text\n\t\t}))\n\t},\n}\n</script>\n"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;AAiBgB,SAAA,WAAW,MAAc,QAA+B;AACvE,QAAM,SAAwB,CAAC;AAE/B,MAAI,eAAe;AACf,MAAA,QAAQ,KAAK,YAAY,EAAE,QAAQ,OAAO,eAAe,YAAY;AAGzE,MAAI,IAAI;AACR,SAAO,QAAQ,MAAM,MAAM,KAAK,QAAQ;AACvC,mBAAe,QAAQ,OAAO;AAC9B,WAAO,KAAK,EAAE,OAAO,OAAO,KAAK,cAAc;AAE/C,YAAQ,KAAK,YAAY,EAAE,QAAQ,OAAO,eAAe,YAAY;AAAA,EAAA;AAE/D,SAAA;AACR;ACJK,MAAA,YAAU;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,MAAM;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAID,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,IACjB;AAAA,EACD;AAAA,EACD,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQT,SAAS;AACR,UAAI,SAAS,CAAA;AAEb,UAAI,CAAC,KAAK,UAAU,KAAK,UAAU,WAAW,GAAG;AAChD,eAAO;AAAA,MACR;AAGA,UAAI,KAAK,UAAU,SAAS,GAAG;AAC9B,iBAAS,KAAK;AAAA,aAER;AACN,iBAAS,WAAW,KAAK,MAAM,KAAK,MAAM;AAAA,MAC3C;AAKA,aAAO,Q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