@nextcloud/vue 8.18.0 → 8.20.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 (654) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/Components/NcActionButton.cjs +4 -4
  3. package/dist/Components/NcActionButton.mjs +4 -4
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionCaption.cjs +1 -1
  7. package/dist/Components/NcActionCaption.mjs +1 -1
  8. package/dist/Components/NcActionCheckbox.cjs +2 -106
  9. package/dist/Components/NcActionCheckbox.cjs.map +1 -1
  10. package/dist/Components/NcActionCheckbox.mjs +2 -106
  11. package/dist/Components/NcActionCheckbox.mjs.map +1 -1
  12. package/dist/Components/NcActionInput.cjs +1 -1
  13. package/dist/Components/NcActionInput.mjs +1 -1
  14. package/dist/Components/NcActionLink.cjs +2 -2
  15. package/dist/Components/NcActionLink.mjs +2 -2
  16. package/dist/Components/NcActionRadio.cjs +2 -108
  17. package/dist/Components/NcActionRadio.cjs.map +1 -1
  18. package/dist/Components/NcActionRadio.mjs +2 -108
  19. package/dist/Components/NcActionRadio.mjs.map +1 -1
  20. package/dist/Components/NcActionRouter.cjs +2 -2
  21. package/dist/Components/NcActionRouter.mjs +2 -2
  22. package/dist/Components/NcActionSeparator.cjs +1 -1
  23. package/dist/Components/NcActionSeparator.mjs +1 -1
  24. package/dist/Components/NcActionText.cjs +2 -2
  25. package/dist/Components/NcActionText.mjs +2 -2
  26. package/dist/Components/NcActionTextEditable.cjs +2 -89
  27. package/dist/Components/NcActionTextEditable.cjs.map +1 -1
  28. package/dist/Components/NcActionTextEditable.mjs +2 -89
  29. package/dist/Components/NcActionTextEditable.mjs.map +1 -1
  30. package/dist/Components/NcActions.cjs +1 -1
  31. package/dist/Components/NcActions.mjs +1 -1
  32. package/dist/Components/NcAppContent.cjs +1 -1
  33. package/dist/Components/NcAppContent.mjs +1 -1
  34. package/dist/Components/NcAppNavigation.cjs +1 -1
  35. package/dist/Components/NcAppNavigation.mjs +1 -1
  36. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  37. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  38. package/dist/Components/NcAppNavigationIconBullet.cjs +1 -1
  39. package/dist/Components/NcAppNavigationIconBullet.mjs +1 -1
  40. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  41. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  42. package/dist/Components/NcAppNavigationList.cjs +1 -1
  43. package/dist/Components/NcAppNavigationList.mjs +1 -1
  44. package/dist/Components/NcAppNavigationNew.cjs +1 -1
  45. package/dist/Components/NcAppNavigationNew.mjs +1 -1
  46. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  47. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  48. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  49. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  50. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  51. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  52. package/dist/Components/NcAppNavigationSpacer.cjs +1 -1
  53. package/dist/Components/NcAppNavigationSpacer.mjs +1 -1
  54. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  55. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  56. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  57. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  58. package/dist/Components/NcAppSettingsSection.cjs +5 -8
  59. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  60. package/dist/Components/NcAppSettingsSection.mjs +5 -8
  61. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  62. package/dist/Components/NcAppSidebar.cjs +1 -1
  63. package/dist/Components/NcAppSidebar.mjs +1 -1
  64. package/dist/Components/NcAppSidebarTab.cjs +3 -4
  65. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  66. package/dist/Components/NcAppSidebarTab.mjs +3 -4
  67. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  68. package/dist/Components/NcAvatar.cjs +1 -1
  69. package/dist/Components/NcAvatar.mjs +1 -1
  70. package/dist/Components/NcBreadcrumb.cjs +1 -1
  71. package/dist/Components/NcBreadcrumb.mjs +1 -1
  72. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  73. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  74. package/dist/Components/NcButton.cjs +7 -8
  75. package/dist/Components/NcButton.cjs.map +1 -1
  76. package/dist/Components/NcButton.mjs +7 -8
  77. package/dist/Components/NcButton.mjs.map +1 -1
  78. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  79. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  80. package/dist/Components/NcChip.cjs +7 -13
  81. package/dist/Components/NcChip.cjs.map +1 -1
  82. package/dist/Components/NcChip.mjs +7 -13
  83. package/dist/Components/NcChip.mjs.map +1 -1
  84. package/dist/Components/NcCollectionList.cjs +1 -1
  85. package/dist/Components/NcCollectionList.mjs +1 -1
  86. package/dist/Components/NcColorPicker.cjs +1 -1
  87. package/dist/Components/NcColorPicker.mjs +1 -1
  88. package/dist/Components/NcContent.cjs +1 -1
  89. package/dist/Components/NcContent.mjs +1 -1
  90. package/dist/Components/NcCounterBubble.cjs +1 -1
  91. package/dist/Components/NcCounterBubble.mjs +1 -1
  92. package/dist/Components/NcDashboardWidget.cjs +1 -1
  93. package/dist/Components/NcDashboardWidget.mjs +1 -1
  94. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  95. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  96. package/dist/Components/NcDateTime.cjs +1 -1
  97. package/dist/Components/NcDateTime.mjs +1 -1
  98. package/dist/Components/NcDateTimePicker.cjs +37 -17
  99. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  100. package/dist/Components/NcDateTimePicker.mjs +37 -17
  101. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  102. package/dist/Components/NcDateTimePickerNative.cjs +52 -21
  103. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  104. package/dist/Components/NcDateTimePickerNative.mjs +52 -21
  105. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  106. package/dist/Components/NcDialog.cjs +1 -1
  107. package/dist/Components/NcDialog.mjs +1 -1
  108. package/dist/Components/NcDialogButton.cjs +1 -1
  109. package/dist/Components/NcDialogButton.mjs +1 -1
  110. package/dist/Components/NcEllipsisedOption.cjs +3 -3
  111. package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
  112. package/dist/Components/NcEllipsisedOption.mjs +3 -3
  113. package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
  114. package/dist/Components/NcEmojiPicker.cjs +1 -1
  115. package/dist/Components/NcEmojiPicker.mjs +1 -1
  116. package/dist/Components/NcEmptyContent.cjs +2 -3
  117. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  118. package/dist/Components/NcEmptyContent.mjs +2 -3
  119. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  120. package/dist/Components/NcGuestContent.cjs +1 -1
  121. package/dist/Components/NcGuestContent.mjs +1 -1
  122. package/dist/Components/NcHeaderButton.cjs +1 -1
  123. package/dist/Components/NcHeaderButton.mjs +1 -1
  124. package/dist/Components/NcHeaderMenu.cjs +1 -1
  125. package/dist/Components/NcHeaderMenu.mjs +1 -1
  126. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  127. package/dist/Components/NcIconSvgWrapper.mjs +1 -1
  128. package/dist/Components/NcInputField.cjs +2 -232
  129. package/dist/Components/NcInputField.cjs.map +1 -1
  130. package/dist/Components/NcInputField.mjs +2 -232
  131. package/dist/Components/NcInputField.mjs.map +1 -1
  132. package/dist/Components/NcListItem.cjs +1 -1
  133. package/dist/Components/NcListItem.mjs +1 -1
  134. package/dist/Components/NcListItemIcon.cjs +1 -1
  135. package/dist/Components/NcListItemIcon.mjs +1 -1
  136. package/dist/Components/NcLoadingIcon.cjs +1 -1
  137. package/dist/Components/NcLoadingIcon.mjs +1 -1
  138. package/dist/Components/NcModal.cjs +26 -17
  139. package/dist/Components/NcModal.cjs.map +1 -1
  140. package/dist/Components/NcModal.mjs +26 -17
  141. package/dist/Components/NcModal.mjs.map +1 -1
  142. package/dist/Components/NcNoteCard.cjs +6 -6
  143. package/dist/Components/NcNoteCard.cjs.map +1 -1
  144. package/dist/Components/NcNoteCard.mjs +6 -6
  145. package/dist/Components/NcNoteCard.mjs.map +1 -1
  146. package/dist/Components/NcPasswordField.cjs +1 -1
  147. package/dist/Components/NcPasswordField.mjs +1 -1
  148. package/dist/Components/NcPopover.cjs +1 -1
  149. package/dist/Components/NcPopover.mjs +1 -1
  150. package/dist/Components/NcProgressBar.cjs +1 -1
  151. package/dist/Components/NcProgressBar.mjs +1 -1
  152. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  153. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  154. package/dist/Components/NcRichContenteditable.cjs +2 -2
  155. package/dist/Components/NcRichContenteditable.mjs +2 -2
  156. package/dist/Components/NcRichText.cjs +3 -3
  157. package/dist/Components/NcRichText.mjs +4 -4
  158. package/dist/Components/NcSelect.cjs +1 -1
  159. package/dist/Components/NcSelect.mjs +1 -1
  160. package/dist/Components/NcSelectTags.cjs +1 -1
  161. package/dist/Components/NcSelectTags.mjs +1 -1
  162. package/dist/Components/NcSettingsInputText.cjs +1 -1
  163. package/dist/Components/NcSettingsInputText.mjs +1 -1
  164. package/dist/Components/NcSettingsSection.cjs +1 -1
  165. package/dist/Components/NcSettingsSection.mjs +1 -1
  166. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  167. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  168. package/dist/Components/NcTextArea.cjs +2 -179
  169. package/dist/Components/NcTextArea.cjs.map +1 -1
  170. package/dist/Components/NcTextArea.mjs +2 -179
  171. package/dist/Components/NcTextArea.mjs.map +1 -1
  172. package/dist/Components/NcTextField.cjs +1 -1
  173. package/dist/Components/NcTextField.mjs +1 -1
  174. package/dist/Components/NcTimezonePicker.cjs +1 -1
  175. package/dist/Components/NcTimezonePicker.mjs +1 -1
  176. package/dist/Components/NcUserBubble.cjs +1 -1
  177. package/dist/Components/NcUserBubble.mjs +1 -1
  178. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  179. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  180. package/dist/Components/NcVNodes.cjs +1 -2
  181. package/dist/Components/NcVNodes.cjs.map +1 -1
  182. package/dist/Components/NcVNodes.mjs +1 -2
  183. package/dist/Components/NcVNodes.mjs.map +1 -1
  184. package/dist/Composables/useHotKey.cjs +2 -4
  185. package/dist/Composables/useHotKey.cjs.map +1 -1
  186. package/dist/Composables/useHotKey.mjs +2 -4
  187. package/dist/Composables/useHotKey.mjs.map +1 -1
  188. package/dist/Composables/useIsDarkTheme.cjs +18 -0
  189. package/dist/Composables/useIsDarkTheme.cjs.map +1 -0
  190. package/dist/Composables/useIsDarkTheme.mjs +18 -0
  191. package/dist/Composables/useIsDarkTheme.mjs.map +1 -0
  192. package/dist/Directives/Linkify.cjs +1 -2
  193. package/dist/Directives/Linkify.cjs.map +1 -1
  194. package/dist/Directives/Linkify.mjs +1 -2
  195. package/dist/Directives/Linkify.mjs.map +1 -1
  196. package/dist/Directives/Tooltip.cjs +1 -1
  197. package/dist/Directives/Tooltip.mjs +1 -1
  198. package/dist/Functions/dialog.cjs +27 -0
  199. package/dist/Functions/dialog.cjs.map +1 -0
  200. package/dist/Functions/dialog.mjs +25 -0
  201. package/dist/Functions/dialog.mjs.map +1 -0
  202. package/dist/Functions/emoji.cjs +1 -1
  203. package/dist/Functions/emoji.mjs +1 -1
  204. package/dist/Functions/isDarkTheme.cjs +12 -0
  205. package/dist/Functions/isDarkTheme.cjs.map +1 -0
  206. package/dist/Functions/isDarkTheme.mjs +12 -0
  207. package/dist/Functions/isDarkTheme.mjs.map +1 -0
  208. package/dist/Functions/reference.cjs +2 -2
  209. package/dist/Functions/reference.mjs +2 -2
  210. package/dist/Functions/registerReference.cjs +1 -1
  211. package/dist/Functions/registerReference.mjs +1 -1
  212. package/dist/Functions/usernameToColor.cjs +1 -1
  213. package/dist/Functions/usernameToColor.mjs +1 -1
  214. package/dist/Mixins/richEditor.cjs +1 -1
  215. package/dist/Mixins/richEditor.mjs +1 -1
  216. package/dist/assets/{NcActionButton-D90PTEA5.css → NcActionButton-CNq6xIdS.css} +1 -1
  217. package/dist/assets/{NcActionCheckbox-sIGqnckr.css → NcActionCheckbox-DeW2CCVc.css} +11 -11
  218. package/dist/assets/{NcActionInput-C_3Csa6A.css → NcActionInput-CNRERfyh.css} +61 -61
  219. package/dist/assets/{NcActionLink-Db_ZlqWs.css → NcActionLink-CC6a7Hsf.css} +1 -1
  220. package/dist/assets/{NcActionRadio-DFcWmvae.css → NcActionRadio-DC7Wp9rR.css} +11 -11
  221. package/dist/assets/{NcActionRouter-DidTlbov.css → NcActionRouter-CsIBHw6E.css} +1 -1
  222. package/dist/assets/{NcActionText-DCx1DWXe.css → NcActionText-BSD_HYx4.css} +1 -1
  223. package/dist/assets/{NcActionTextEditable-Dud9NOdm.css → NcActionTextEditable-Cg16Q4zr.css} +59 -59
  224. package/dist/assets/{NcActions-fmLIlJ2i.css → NcActions-DM_LoRlx.css} +12 -12
  225. package/dist/assets/{NcAppContent-DVBVZyuW.css → NcAppContent-CpXVlHUj.css} +6 -6
  226. package/dist/assets/{NcAppNavigation-fhylfTxx.css → NcAppNavigation-CBN6X2dT.css} +13 -13
  227. package/dist/assets/{NcAppNavigationItem-BfJ84ZO0.css → NcAppNavigationItem-CNZsPcla.css} +31 -31
  228. package/dist/assets/{NcAppNavigationNewItem-s6Dd9PrB.css → NcAppNavigationNewItem-CQ1f40wK.css} +1 -1
  229. package/dist/assets/{NcAppNavigationToggle-DvYpNzHv.css → NcAppNavigationToggle-Chtb7sE7.css} +5 -5
  230. package/dist/assets/{NcAppSidebar-CpV7czJx.css → NcAppSidebar-BntAj6H-.css} +73 -73
  231. package/dist/assets/{NcAvatar-CfUWTmJW.css → NcAvatar-xe4gdFKk.css} +25 -25
  232. package/dist/assets/{NcCheckboxRadioSwitch-BzAGGne9.css → NcCheckboxRadioSwitch-D0kAZROF.css} +31 -31
  233. package/dist/assets/NcColorPicker-Dw2wy2tU.css +174 -0
  234. package/dist/assets/{NcDateTimePicker-DAy7A4EI.css → NcDateTimePicker-D264hKgE.css} +48 -33
  235. package/dist/assets/NcDateTimePickerNative-BfZfqRvD.css +47 -0
  236. package/dist/assets/{NcEllipsisedOption-DZK2vWD1.css → NcEllipsisedOption-DGr9_bIL.css} +5 -5
  237. package/dist/assets/{NcInputField-CQc5dRbY.css → NcInputField-C0PHosfg.css} +32 -32
  238. package/dist/assets/{NcModal-Djc2K_kW.css → NcModal-BBKX-T6V.css} +66 -62
  239. package/dist/assets/{NcPasswordField-DWd5gg73.css → NcPasswordField-DZ6dcMzH.css} +2 -2
  240. package/dist/assets/{NcRichContenteditable-BYEZK1DT.css → NcRichContenteditable-R-32wbyl.css} +10 -10
  241. package/dist/assets/{NcRichText-DqDAPQPD.css → NcRichText-Ds8WxUk1.css} +56 -58
  242. package/dist/assets/{NcSettingsInputText-DbTNj9E6.css → NcSettingsInputText-Bsp_6DjJ.css} +5 -5
  243. package/dist/assets/{NcSettingsSelectGroup-CzD7YrGm.css → NcSettingsSelectGroup-BEjOwCJQ.css} +2 -2
  244. package/dist/assets/{NcTextArea-D8bZi2fT.css → NcTextArea-fzbciv3V.css} +20 -20
  245. package/dist/assets/{referencePickerModal-9BcmmfUy.css → referencePickerModal-BhhuyO3J.css} +38 -38
  246. package/dist/chunks/{AlertCircleOutline-DLtiWgZd.cjs → AlertCircleOutline-BrsasUsU.cjs} +1 -1
  247. package/dist/chunks/AlertCircleOutline-BrsasUsU.cjs.map +1 -0
  248. package/dist/chunks/{AlertCircleOutline-DU3QwU5Y.mjs → AlertCircleOutline-DBxbepLy.mjs} +1 -1
  249. package/dist/chunks/AlertCircleOutline-DBxbepLy.mjs.map +1 -0
  250. package/dist/chunks/{ArrowLeft-CONurT5C.cjs → ArrowLeft-BP7yfzCQ.cjs} +1 -1
  251. package/dist/chunks/ArrowLeft-BP7yfzCQ.cjs.map +1 -0
  252. package/dist/chunks/{ArrowLeft-BhAxJBYx.mjs → ArrowLeft-DuT2LZOm.mjs} +1 -1
  253. package/dist/chunks/ArrowLeft-DuT2LZOm.mjs.map +1 -0
  254. package/dist/chunks/{ArrowRight-KsL2PC-o.mjs → ArrowRight-CY2b9hgN.mjs} +1 -1
  255. package/dist/chunks/ArrowRight-CY2b9hgN.mjs.map +1 -0
  256. package/dist/chunks/{ArrowRight-Bj5G_mG0.cjs → ArrowRight-DPARnmu3.cjs} +1 -1
  257. package/dist/chunks/ArrowRight-DPARnmu3.cjs.map +1 -0
  258. package/dist/chunks/{Check-XHAzUBkX.mjs → Check-BkThHPH7.mjs} +1 -1
  259. package/dist/chunks/Check-BkThHPH7.mjs.map +1 -0
  260. package/dist/chunks/{Check-fCbe4vqy.cjs → Check-Du8mPz_B.cjs} +1 -1
  261. package/dist/chunks/Check-Du8mPz_B.cjs.map +1 -0
  262. package/dist/chunks/{ChevronDown-CiFbcDUC.cjs → ChevronDown-BlfyuflD.cjs} +1 -1
  263. package/dist/chunks/ChevronDown-BlfyuflD.cjs.map +1 -0
  264. package/dist/chunks/{ChevronDown-D3Tfshug.mjs → ChevronDown-DFQfzh63.mjs} +1 -1
  265. package/dist/chunks/ChevronDown-DFQfzh63.mjs.map +1 -0
  266. package/dist/chunks/{ChevronRight-C3eVhc5a.mjs → ChevronRight-BUv-PtHh.mjs} +1 -1
  267. package/dist/chunks/ChevronRight-BUv-PtHh.mjs.map +1 -0
  268. package/dist/chunks/{ChevronRight-CWbdN5_r.cjs → ChevronRight-ZCKVg9OI.cjs} +1 -1
  269. package/dist/chunks/ChevronRight-ZCKVg9OI.cjs.map +1 -0
  270. package/dist/chunks/{ChevronUp-A2riTBrv.cjs → ChevronUp-Bpd__OBZ.cjs} +1 -1
  271. package/dist/chunks/ChevronUp-Bpd__OBZ.cjs.map +1 -0
  272. package/dist/chunks/{ChevronUp-ljACquzS.mjs → ChevronUp-C7Dy9Bph.mjs} +1 -1
  273. package/dist/chunks/ChevronUp-C7Dy9Bph.mjs.map +1 -0
  274. package/dist/chunks/{Close-B6ccm1RP.mjs → Close-BtLPUSdO.mjs} +1 -1
  275. package/dist/chunks/Close-BtLPUSdO.mjs.map +1 -0
  276. package/dist/chunks/{Close-B7lGu0cG.cjs → Close-CqmXxEKi.cjs} +1 -1
  277. package/dist/chunks/Close-CqmXxEKi.cjs.map +1 -0
  278. package/dist/chunks/{DotsHorizontal-DQfnwpao.cjs → DotsHorizontal-BoI3vnhk.cjs} +1 -1
  279. package/dist/chunks/DotsHorizontal-BoI3vnhk.cjs.map +1 -0
  280. package/dist/chunks/{DotsHorizontal-Cd2x8oz2.mjs → DotsHorizontal-C6LNsw4N.mjs} +1 -1
  281. package/dist/chunks/DotsHorizontal-C6LNsw4N.mjs.map +1 -0
  282. package/dist/chunks/{GenColors-BWE946ht.mjs → GenColors-BAOuMMLW.mjs} +3 -3
  283. package/dist/chunks/{GenColors-BWE946ht.mjs.map → GenColors-BAOuMMLW.mjs.map} +1 -1
  284. package/dist/chunks/{GenColors-Cay7TLwO.cjs → GenColors-iV_vrBr4.cjs} +3 -3
  285. package/dist/chunks/{GenColors-Cay7TLwO.cjs.map → GenColors-iV_vrBr4.cjs.map} +1 -1
  286. package/dist/chunks/{NcActionButtonGroup-BrN2mWdo.cjs → NcActionButtonGroup-C0nQ7J_W.cjs} +3 -3
  287. package/dist/chunks/{NcActionButtonGroup-BrN2mWdo.cjs.map → NcActionButtonGroup-C0nQ7J_W.cjs.map} +1 -1
  288. package/dist/chunks/{NcActionButtonGroup-B5RmRcow.mjs → NcActionButtonGroup-D1B23tmS.mjs} +3 -3
  289. package/dist/chunks/{NcActionButtonGroup-B5RmRcow.mjs.map → NcActionButtonGroup-D1B23tmS.mjs.map} +1 -1
  290. package/dist/chunks/NcActionCheckbox-DiDhwRJA.cjs +137 -0
  291. package/dist/chunks/NcActionCheckbox-DiDhwRJA.cjs.map +1 -0
  292. package/dist/chunks/NcActionCheckbox-DiTExF3O.mjs +138 -0
  293. package/dist/chunks/NcActionCheckbox-DiTExF3O.mjs.map +1 -0
  294. package/dist/chunks/{NcActionInput-DY2qdzdN.mjs → NcActionInput-BcNial11.mjs} +46 -14
  295. package/dist/chunks/NcActionInput-BcNial11.mjs.map +1 -0
  296. package/dist/chunks/{NcActionInput-CUAQEdIX.cjs → NcActionInput-zCzwKL6H.cjs} +46 -14
  297. package/dist/chunks/NcActionInput-zCzwKL6H.cjs.map +1 -0
  298. package/dist/chunks/NcActionRadio-DSIJMuFP.cjs +139 -0
  299. package/dist/chunks/NcActionRadio-DSIJMuFP.cjs.map +1 -0
  300. package/dist/chunks/NcActionRadio-kbPC8ri8.mjs +140 -0
  301. package/dist/chunks/NcActionRadio-kbPC8ri8.mjs.map +1 -0
  302. package/dist/chunks/NcActionTextEditable-CA3Eoscz.mjs +122 -0
  303. package/dist/chunks/NcActionTextEditable-CA3Eoscz.mjs.map +1 -0
  304. package/dist/chunks/NcActionTextEditable-DgdiBv6b.cjs +121 -0
  305. package/dist/chunks/NcActionTextEditable-DgdiBv6b.cjs.map +1 -0
  306. package/dist/chunks/{NcActions-BeDyeq8X.mjs → NcActions-BUZ5Oprh.mjs} +36 -39
  307. package/dist/chunks/{NcActions-BAP2SRwO.cjs.map → NcActions-BUZ5Oprh.mjs.map} +1 -1
  308. package/dist/chunks/{NcActions-BAP2SRwO.cjs → NcActions-CCYNSnCn.cjs} +36 -39
  309. package/dist/chunks/{NcActions-BeDyeq8X.mjs.map → NcActions-CCYNSnCn.cjs.map} +1 -1
  310. package/dist/chunks/{NcAppContent-fXpgsMfG.cjs → NcAppContent-BnoVcMYZ.cjs} +12 -8
  311. package/dist/chunks/NcAppContent-BnoVcMYZ.cjs.map +1 -0
  312. package/dist/chunks/{NcAppContent-lEyly7Jk.mjs → NcAppContent-C-WAXtGI.mjs} +12 -8
  313. package/dist/chunks/NcAppContent-C-WAXtGI.mjs.map +1 -0
  314. package/dist/chunks/{NcAppNavigation-BleAA1U_.cjs → NcAppNavigation-BuKJwvwT.cjs} +3 -3
  315. package/dist/chunks/{NcAppNavigation-BleAA1U_.cjs.map → NcAppNavigation-BuKJwvwT.cjs.map} +1 -1
  316. package/dist/chunks/{NcAppNavigation-CxsxPI9x.mjs → NcAppNavigation-CHWYmJnQ.mjs} +3 -3
  317. package/dist/chunks/{NcAppNavigation-CxsxPI9x.mjs.map → NcAppNavigation-CHWYmJnQ.mjs.map} +1 -1
  318. package/dist/chunks/{NcAppNavigationCaption-B-KUvV8u.mjs → NcAppNavigationCaption-AGVUaCQj.mjs} +3 -3
  319. package/dist/chunks/{NcAppNavigationCaption-B-KUvV8u.mjs.map → NcAppNavigationCaption-AGVUaCQj.mjs.map} +1 -1
  320. package/dist/chunks/{NcAppNavigationCaption-DdxbI-rX.cjs → NcAppNavigationCaption-DUPonEWi.cjs} +3 -3
  321. package/dist/chunks/{NcAppNavigationCaption-DdxbI-rX.cjs.map → NcAppNavigationCaption-DUPonEWi.cjs.map} +1 -1
  322. package/dist/chunks/{NcAppNavigationItem-CybYrL2f.mjs → NcAppNavigationItem-DmJnEXTV.mjs} +23 -27
  323. package/dist/chunks/NcAppNavigationItem-DmJnEXTV.mjs.map +1 -0
  324. package/dist/chunks/{NcAppNavigationItem-Chm1R863.cjs → NcAppNavigationItem-Y_CVXzId.cjs} +23 -27
  325. package/dist/chunks/NcAppNavigationItem-Y_CVXzId.cjs.map +1 -0
  326. package/dist/chunks/{NcAppNavigationNewItem-CdKBA1wN.cjs → NcAppNavigationNewItem-B76-cCDH.cjs} +2 -2
  327. package/dist/chunks/{NcAppNavigationNewItem-CdKBA1wN.cjs.map → NcAppNavigationNewItem-B76-cCDH.cjs.map} +1 -1
  328. package/dist/chunks/{NcAppNavigationNewItem-Cqc-RpSB.mjs → NcAppNavigationNewItem-DmObx9Od.mjs} +2 -2
  329. package/dist/chunks/{NcAppNavigationNewItem-Cqc-RpSB.mjs.map → NcAppNavigationNewItem-DmObx9Od.mjs.map} +1 -1
  330. package/dist/chunks/{NcAppNavigationSearch-8jcfsc-r.mjs → NcAppNavigationSearch-Br5pMcP9.mjs} +6 -10
  331. package/dist/chunks/{NcAppNavigationSearch-8jcfsc-r.mjs.map → NcAppNavigationSearch-Br5pMcP9.mjs.map} +1 -1
  332. package/dist/chunks/{NcAppNavigationSearch-CZRhuV6d.cjs → NcAppNavigationSearch-CNwLOHdO.cjs} +7 -11
  333. package/dist/chunks/{NcAppNavigationSearch-CZRhuV6d.cjs.map → NcAppNavigationSearch-CNwLOHdO.cjs.map} +1 -1
  334. package/dist/chunks/{NcAppNavigationSettings-C-_G8yUn.cjs → NcAppNavigationSettings-BH5t68oV.cjs} +4 -4
  335. package/dist/chunks/NcAppNavigationSettings-BH5t68oV.cjs.map +1 -0
  336. package/dist/chunks/{NcAppNavigationSettings-DScz0UWm.mjs → NcAppNavigationSettings-L0Jfd8At.mjs} +4 -4
  337. package/dist/chunks/NcAppNavigationSettings-L0Jfd8At.mjs.map +1 -0
  338. package/dist/chunks/{NcAppNavigationToggle-DAhbqsn_.cjs → NcAppNavigationToggle-Dwg-dMWx.cjs} +5 -5
  339. package/dist/chunks/NcAppNavigationToggle-Dwg-dMWx.cjs.map +1 -0
  340. package/dist/chunks/{NcAppNavigationToggle-BXainLDc.mjs → NcAppNavigationToggle-hXwP6wJk.mjs} +5 -5
  341. package/dist/chunks/NcAppNavigationToggle-hXwP6wJk.mjs.map +1 -0
  342. package/dist/chunks/{NcAppSettingsDialog-BxDO8Ivr.mjs → NcAppSettingsDialog-Bo_xk7JT.mjs} +8 -15
  343. package/dist/chunks/{NcAppSettingsDialog-BxDO8Ivr.mjs.map → NcAppSettingsDialog-Bo_xk7JT.mjs.map} +1 -1
  344. package/dist/chunks/{NcAppSettingsDialog-niXwDCmG.cjs → NcAppSettingsDialog-Dkl3cqU-.cjs} +8 -15
  345. package/dist/chunks/{NcAppSettingsDialog-niXwDCmG.cjs.map → NcAppSettingsDialog-Dkl3cqU-.cjs.map} +1 -1
  346. package/dist/chunks/{NcAppSidebar-BMXNel-9.mjs → NcAppSidebar-BHUsuOkb.mjs} +20 -23
  347. package/dist/chunks/NcAppSidebar-BHUsuOkb.mjs.map +1 -0
  348. package/dist/chunks/{NcAppSidebar-pD7Kd1Ld.cjs → NcAppSidebar-D0XGsAFm.cjs} +20 -23
  349. package/dist/chunks/NcAppSidebar-D0XGsAFm.cjs.map +1 -0
  350. package/dist/chunks/{NcAvatar-DlrXmAED.mjs → NcAvatar-Bv7NGIzM.mjs} +21 -23
  351. package/dist/chunks/{NcAvatar-DlrXmAED.mjs.map → NcAvatar-Bv7NGIzM.mjs.map} +1 -1
  352. package/dist/chunks/{NcAvatar-U5nqf05n.cjs → NcAvatar-DypzACJs.cjs} +21 -23
  353. package/dist/chunks/{NcAvatar-U5nqf05n.cjs.map → NcAvatar-DypzACJs.cjs.map} +1 -1
  354. package/dist/chunks/{NcBreadcrumb-C46_szbr.cjs → NcBreadcrumb-DVn5-KGF.cjs} +5 -5
  355. package/dist/chunks/{NcBreadcrumb-C46_szbr.cjs.map → NcBreadcrumb-DVn5-KGF.cjs.map} +1 -1
  356. package/dist/chunks/{NcBreadcrumb-BXZ4F07O.mjs → NcBreadcrumb-Da_uoAcB.mjs} +5 -5
  357. package/dist/chunks/{NcBreadcrumb-BXZ4F07O.mjs.map → NcBreadcrumb-Da_uoAcB.mjs.map} +1 -1
  358. package/dist/chunks/{NcBreadcrumbs-D8nGOAl3.cjs → NcBreadcrumbs-JqPHfTRj.cjs} +26 -30
  359. package/dist/chunks/NcBreadcrumbs-JqPHfTRj.cjs.map +1 -0
  360. package/dist/chunks/{NcBreadcrumbs-DIONM2xF.mjs → NcBreadcrumbs-qEKUdf4H.mjs} +26 -30
  361. package/dist/chunks/NcBreadcrumbs-qEKUdf4H.mjs.map +1 -0
  362. package/dist/chunks/{NcCheckboxRadioSwitch-COeeT-7G.cjs → NcCheckboxRadioSwitch-KmTVoK0G.cjs} +56 -28
  363. package/dist/chunks/NcCheckboxRadioSwitch-KmTVoK0G.cjs.map +1 -0
  364. package/dist/chunks/{NcCheckboxRadioSwitch-CvMEEI9x.mjs → NcCheckboxRadioSwitch-l-6YVD9V.mjs} +56 -28
  365. package/dist/chunks/NcCheckboxRadioSwitch-l-6YVD9V.mjs.map +1 -0
  366. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_ff5243c5_lang-CwPH3K13.mjs +3 -0
  367. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_ff5243c5_lang-CwPH3K13.mjs.map +1 -0
  368. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_ff5243c5_lang-Zy8SpLXY.cjs +4 -0
  369. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_ff5243c5_lang-Zy8SpLXY.cjs.map +1 -0
  370. package/dist/chunks/{NcCollectionList-YCc2830t.mjs → NcCollectionList-76i9dHm0.mjs} +6 -7
  371. package/dist/chunks/{NcCollectionList-YCc2830t.mjs.map → NcCollectionList-76i9dHm0.mjs.map} +1 -1
  372. package/dist/chunks/{NcCollectionList-DeTZuXSB.cjs → NcCollectionList-UhLoC1sN.cjs} +6 -7
  373. package/dist/chunks/{NcCollectionList-DeTZuXSB.cjs.map → NcCollectionList-UhLoC1sN.cjs.map} +1 -1
  374. package/dist/chunks/{NcColorPicker-D3b9pIOc.mjs → NcColorPicker-CKWvpkRM.mjs} +43 -14
  375. package/dist/chunks/NcColorPicker-CKWvpkRM.mjs.map +1 -0
  376. package/dist/chunks/{NcColorPicker-CmHTPv60.cjs → NcColorPicker-CVeLov2Q.cjs} +43 -14
  377. package/dist/chunks/NcColorPicker-CVeLov2Q.cjs.map +1 -0
  378. package/dist/chunks/{NcContent-DKpTIl9F.mjs → NcContent-BTuJtsQM.mjs} +4 -4
  379. package/dist/chunks/{NcContent-DKpTIl9F.mjs.map → NcContent-BTuJtsQM.mjs.map} +1 -1
  380. package/dist/chunks/{NcContent-BTyHf5mF.cjs → NcContent-BXi18ILU.cjs} +4 -4
  381. package/dist/chunks/{NcContent-BTyHf5mF.cjs.map → NcContent-BXi18ILU.cjs.map} +1 -1
  382. package/dist/chunks/{NcCounterBubble-R8Tmi05i.cjs → NcCounterBubble-DF2rwIo4.cjs} +4 -6
  383. package/dist/chunks/{NcCounterBubble-R8Tmi05i.cjs.map → NcCounterBubble-DF2rwIo4.cjs.map} +1 -1
  384. package/dist/chunks/{NcCounterBubble-D1QC3eP1.mjs → NcCounterBubble-M1q9GRkH.mjs} +4 -6
  385. package/dist/chunks/{NcCounterBubble-D1QC3eP1.mjs.map → NcCounterBubble-M1q9GRkH.mjs.map} +1 -1
  386. package/dist/chunks/{NcDashboardWidget-DLcO9TSj.cjs → NcDashboardWidget-Bu-WC7kg.cjs} +5 -5
  387. package/dist/chunks/{NcDashboardWidget-DLcO9TSj.cjs.map → NcDashboardWidget-Bu-WC7kg.cjs.map} +1 -1
  388. package/dist/chunks/{NcDashboardWidget-CANAYcCa.mjs → NcDashboardWidget-Xit6eLCu.mjs} +5 -5
  389. package/dist/chunks/{NcDashboardWidget-CANAYcCa.mjs.map → NcDashboardWidget-Xit6eLCu.mjs.map} +1 -1
  390. package/dist/chunks/{NcDashboardWidgetItem-vNvbUHBP.cjs → NcDashboardWidgetItem-CI59K-wE.cjs} +3 -3
  391. package/dist/chunks/{NcDashboardWidgetItem-vNvbUHBP.cjs.map → NcDashboardWidgetItem-CI59K-wE.cjs.map} +1 -1
  392. package/dist/chunks/{NcDashboardWidgetItem-BwJAiaT0.mjs → NcDashboardWidgetItem-CcCRU45T.mjs} +3 -3
  393. package/dist/chunks/{NcDashboardWidgetItem-BwJAiaT0.mjs.map → NcDashboardWidgetItem-CcCRU45T.mjs.map} +1 -1
  394. package/dist/chunks/{NcDateTime-ciAHA2YL.mjs → NcDateTime-B5H_8fXN.mjs} +1 -1
  395. package/dist/chunks/{NcDateTime-ciAHA2YL.mjs.map → NcDateTime-B5H_8fXN.mjs.map} +1 -1
  396. package/dist/chunks/{NcDateTime-BfOmGrzK.cjs → NcDateTime-CaJHhgab.cjs} +1 -1
  397. package/dist/chunks/{NcDateTime-BfOmGrzK.cjs.map → NcDateTime-CaJHhgab.cjs.map} +1 -1
  398. package/dist/chunks/{NcDialog-D9l7GQQJ.cjs → NcDialog-CWGgSCpv.cjs} +3 -3
  399. package/dist/chunks/{NcDialog-D9l7GQQJ.cjs.map → NcDialog-CWGgSCpv.cjs.map} +1 -1
  400. package/dist/chunks/{NcDialog-DmcKxy4v.mjs → NcDialog-LPfqWPKk.mjs} +3 -3
  401. package/dist/chunks/{NcDialog-DmcKxy4v.mjs.map → NcDialog-LPfqWPKk.mjs.map} +1 -1
  402. package/dist/chunks/{NcDialogButton-CubYnLkp.mjs → NcDialogButton-7UqknfnA.mjs} +3 -4
  403. package/dist/chunks/{NcDialogButton-CubYnLkp.mjs.map → NcDialogButton-7UqknfnA.mjs.map} +1 -1
  404. package/dist/chunks/{NcDialogButton-C4-agMb3.cjs → NcDialogButton-B7d1LWFN.cjs} +3 -4
  405. package/dist/chunks/{NcDialogButton-C4-agMb3.cjs.map → NcDialogButton-B7d1LWFN.cjs.map} +1 -1
  406. package/dist/chunks/{NcEmojiPicker-DqaJO21R.mjs → NcEmojiPicker-B36zeXTi.mjs} +10 -12
  407. package/dist/chunks/NcEmojiPicker-B36zeXTi.mjs.map +1 -0
  408. package/dist/chunks/{NcEmojiPicker-DV7HDeqU.cjs → NcEmojiPicker-Dm6SEjiB.cjs} +10 -12
  409. package/dist/chunks/NcEmojiPicker-Dm6SEjiB.cjs.map +1 -0
  410. package/dist/chunks/{NcHeaderMenu-Bis33gPF.cjs → NcHeaderMenu-CzS2doDR.cjs} +6 -8
  411. package/dist/chunks/{NcHeaderMenu-Bis33gPF.cjs.map → NcHeaderMenu-CzS2doDR.cjs.map} +1 -1
  412. package/dist/chunks/{NcHeaderMenu-DYGKi6bj.mjs → NcHeaderMenu-vLqcJ-_w.mjs} +6 -8
  413. package/dist/chunks/{NcHeaderMenu-DYGKi6bj.mjs.map → NcHeaderMenu-vLqcJ-_w.mjs.map} +1 -1
  414. package/dist/chunks/{NcIconSvgWrapper-Cb4bAwV6.cjs → NcIconSvgWrapper-B_eOG2sZ.cjs} +2 -2
  415. package/dist/chunks/{NcIconSvgWrapper-Cb4bAwV6.cjs.map → NcIconSvgWrapper-B_eOG2sZ.cjs.map} +1 -1
  416. package/dist/chunks/{NcIconSvgWrapper-DjrkBUkC.mjs → NcIconSvgWrapper-CHmdAuhg.mjs} +2 -2
  417. package/dist/chunks/{NcIconSvgWrapper-DjrkBUkC.mjs.map → NcIconSvgWrapper-CHmdAuhg.mjs.map} +1 -1
  418. package/dist/chunks/{NcInputConfirmCancel-bHJNQ1vm.cjs → NcInputConfirmCancel-CYQsG_3t.cjs} +4 -4
  419. package/dist/chunks/{NcInputConfirmCancel-bHJNQ1vm.cjs.map → NcInputConfirmCancel-CYQsG_3t.cjs.map} +1 -1
  420. package/dist/chunks/{NcInputConfirmCancel-PXVZ7mLT.mjs → NcInputConfirmCancel-YuMDoRCi.mjs} +4 -4
  421. package/dist/chunks/{NcInputConfirmCancel-PXVZ7mLT.mjs.map → NcInputConfirmCancel-YuMDoRCi.mjs.map} +1 -1
  422. package/dist/chunks/NcInputField-CKq4udSu.cjs +260 -0
  423. package/dist/chunks/NcInputField-CKq4udSu.cjs.map +1 -0
  424. package/dist/chunks/NcInputField-DNQOfrn0.mjs +261 -0
  425. package/dist/chunks/NcInputField-DNQOfrn0.mjs.map +1 -0
  426. package/dist/chunks/{NcListItem-sECq4ExO.mjs → NcListItem-BS9Vcxph.mjs} +6 -7
  427. package/dist/chunks/{NcListItem-sECq4ExO.mjs.map → NcListItem-BS9Vcxph.mjs.map} +1 -1
  428. package/dist/chunks/{NcListItem-Bet_T8Y0.cjs → NcListItem-DMaVvwXJ.cjs} +6 -7
  429. package/dist/chunks/{NcListItem-Bet_T8Y0.cjs.map → NcListItem-DMaVvwXJ.cjs.map} +1 -1
  430. package/dist/chunks/{NcListItemIcon-Chq4Sr3z.cjs → NcListItemIcon-BLvWsnbD.cjs} +5 -6
  431. package/dist/chunks/{NcListItemIcon-Chq4Sr3z.cjs.map → NcListItemIcon-BLvWsnbD.cjs.map} +1 -1
  432. package/dist/chunks/{NcListItemIcon-CoTZl0mj.mjs → NcListItemIcon-BdoUa2si.mjs} +5 -6
  433. package/dist/chunks/{NcListItemIcon-CoTZl0mj.mjs.map → NcListItemIcon-BdoUa2si.mjs.map} +1 -1
  434. package/dist/chunks/{NcPasswordField-BQCunRtm.cjs → NcPasswordField-CV_FuOEL.cjs} +37 -13
  435. package/dist/chunks/NcPasswordField-CV_FuOEL.cjs.map +1 -0
  436. package/dist/chunks/{NcPasswordField-DLXPfvQB.mjs → NcPasswordField-oIhYntQw.mjs} +34 -10
  437. package/dist/chunks/NcPasswordField-oIhYntQw.mjs.map +1 -0
  438. package/dist/chunks/{NcPopover-DbeCmze0.mjs → NcPopover-DzYbNu-I.mjs} +7 -11
  439. package/dist/chunks/{NcPopover-DbeCmze0.mjs.map → NcPopover-DzYbNu-I.mjs.map} +1 -1
  440. package/dist/chunks/{NcPopover-C0G7sLVP.cjs → NcPopover-MxwUgZu1.cjs} +7 -11
  441. package/dist/chunks/{NcPopover-C0G7sLVP.cjs.map → NcPopover-MxwUgZu1.cjs.map} +1 -1
  442. package/dist/chunks/{NcProgressBar-D_6Z7U5w.mjs → NcProgressBar-DegJ2JjE.mjs} +2 -2
  443. package/dist/chunks/{NcProgressBar-D_6Z7U5w.mjs.map → NcProgressBar-DegJ2JjE.mjs.map} +1 -1
  444. package/dist/chunks/{NcProgressBar-BrDAF_Zr.cjs → NcProgressBar-Do5Y3u8S.cjs} +2 -2
  445. package/dist/chunks/{NcProgressBar-BrDAF_Zr.cjs.map → NcProgressBar-Do5Y3u8S.cjs.map} +1 -1
  446. package/dist/chunks/{NcRelatedResourcesPanel-CsOAnfA1.cjs → NcRelatedResourcesPanel-BRoP-NiB.cjs} +16 -24
  447. package/dist/chunks/NcRelatedResourcesPanel-BRoP-NiB.cjs.map +1 -0
  448. package/dist/chunks/{NcRelatedResourcesPanel-DZICfdzQ.mjs → NcRelatedResourcesPanel-Czuc8tf5.mjs} +16 -24
  449. package/dist/chunks/NcRelatedResourcesPanel-Czuc8tf5.mjs.map +1 -0
  450. package/dist/chunks/{NcRichContenteditable-C0hSvLHR.mjs → NcRichContenteditable-Cv9rZiqh.mjs} +55 -41
  451. package/dist/chunks/NcRichContenteditable-Cv9rZiqh.mjs.map +1 -0
  452. package/dist/chunks/{NcRichContenteditable-Dj9rufAV.cjs → NcRichContenteditable-nVuOP1__.cjs} +55 -41
  453. package/dist/chunks/NcRichContenteditable-nVuOP1__.cjs.map +1 -0
  454. package/dist/chunks/{NcRichText-DSnF0Fow.cjs → NcRichText-D7syaTEJ.cjs} +20 -16
  455. package/dist/chunks/NcRichText-D7syaTEJ.cjs.map +1 -0
  456. package/dist/chunks/{NcRichText-CgD7wGDe.mjs → NcRichText-ohrXAz36.mjs} +20 -16
  457. package/dist/chunks/NcRichText-ohrXAz36.mjs.map +1 -0
  458. package/dist/chunks/{NcSelect-D4om25m8.mjs → NcSelect-DJQ1nwEX.mjs} +49 -21
  459. package/dist/chunks/NcSelect-DJQ1nwEX.mjs.map +1 -0
  460. package/dist/chunks/{NcSelect-BoIXJjPW.cjs → NcSelect-VZJ_gUib.cjs} +49 -21
  461. package/dist/chunks/NcSelect-VZJ_gUib.cjs.map +1 -0
  462. package/dist/chunks/{NcSelectTags-CMUDUx29.cjs → NcSelectTags-CfiOYB0i.cjs} +55 -11
  463. package/dist/chunks/NcSelectTags-CfiOYB0i.cjs.map +1 -0
  464. package/dist/chunks/{NcSelectTags-hclAoBW3.mjs → NcSelectTags-DOOq_cD0.mjs} +55 -11
  465. package/dist/chunks/NcSelectTags-DOOq_cD0.mjs.map +1 -0
  466. package/dist/chunks/{NcSettingsInputText-Cv_JwbFO.cjs → NcSettingsInputText-CECqEZO0.cjs} +37 -6
  467. package/dist/chunks/NcSettingsInputText-CECqEZO0.cjs.map +1 -0
  468. package/dist/chunks/{NcSettingsInputText-BF_v4yDP.mjs → NcSettingsInputText-DTAI3bS2.mjs} +37 -6
  469. package/dist/chunks/NcSettingsInputText-DTAI3bS2.mjs.map +1 -0
  470. package/dist/chunks/{NcSettingsSection-V9DkkSuI.mjs → NcSettingsSection-CEWt4eXE.mjs} +4 -5
  471. package/dist/chunks/NcSettingsSection-CEWt4eXE.mjs.map +1 -0
  472. package/dist/chunks/{NcSettingsSection-CA2JahBC.cjs → NcSettingsSection-Dn7Qmknm.cjs} +4 -5
  473. package/dist/chunks/NcSettingsSection-Dn7Qmknm.cjs.map +1 -0
  474. package/dist/chunks/{NcSettingsSelectGroup-DDwAZI5O.cjs → NcSettingsSelectGroup-C6JgQUes.cjs} +39 -12
  475. package/dist/chunks/NcSettingsSelectGroup-C6JgQUes.cjs.map +1 -0
  476. package/dist/chunks/{NcSettingsSelectGroup-BTPrOKXu.mjs → NcSettingsSelectGroup-haZmDz--.mjs} +39 -12
  477. package/dist/chunks/NcSettingsSelectGroup-haZmDz--.mjs.map +1 -0
  478. package/dist/chunks/NcTextArea-CXWHO22r.cjs +206 -0
  479. package/dist/chunks/NcTextArea-CXWHO22r.cjs.map +1 -0
  480. package/dist/chunks/NcTextArea-Cegw6i17.mjs +207 -0
  481. package/dist/chunks/NcTextArea-Cegw6i17.mjs.map +1 -0
  482. package/dist/chunks/{NcTextField-CmXmPZ4h.mjs → NcTextField-DaGO9lFz.mjs} +25 -7
  483. package/dist/chunks/NcTextField-DaGO9lFz.mjs.map +1 -0
  484. package/dist/chunks/{NcTextField-BnZnDMjV.cjs → NcTextField-DwWIlisf.cjs} +28 -10
  485. package/dist/chunks/NcTextField-DwWIlisf.cjs.map +1 -0
  486. package/dist/chunks/{NcTimezonePicker-DxA5d2ur.cjs → NcTimezonePicker-Dh3nLcb5.cjs} +40 -9
  487. package/dist/chunks/NcTimezonePicker-Dh3nLcb5.cjs.map +1 -0
  488. package/dist/chunks/{NcTimezonePicker-C0YKWg81.mjs → NcTimezonePicker-Nn0FbzGI.mjs} +40 -9
  489. package/dist/chunks/NcTimezonePicker-Nn0FbzGI.mjs.map +1 -0
  490. package/dist/chunks/{NcUserBubble-2Lglkz2P.mjs → NcUserBubble-CSUTL5fC.mjs} +4 -5
  491. package/dist/chunks/{NcUserBubble-BEI3NwEc.cjs.map → NcUserBubble-CSUTL5fC.mjs.map} +1 -1
  492. package/dist/chunks/{NcUserBubble-BEI3NwEc.cjs → NcUserBubble-Cg86HaKF.cjs} +4 -5
  493. package/dist/chunks/{NcUserBubble-2Lglkz2P.mjs.map → NcUserBubble-Cg86HaKF.cjs.map} +1 -1
  494. package/dist/chunks/{NcUserStatusIcon-CPZOWw3t.mjs → NcUserStatusIcon-C4oNCbQv.mjs} +6 -9
  495. package/dist/chunks/{NcUserStatusIcon-CPZOWw3t.mjs.map → NcUserStatusIcon-C4oNCbQv.mjs.map} +1 -1
  496. package/dist/chunks/{NcUserStatusIcon-FtKzp5sl.cjs → NcUserStatusIcon-CP1EGHie.cjs} +6 -9
  497. package/dist/chunks/{NcUserStatusIcon-FtKzp5sl.cjs.map → NcUserStatusIcon-CP1EGHie.cjs.map} +1 -1
  498. package/dist/chunks/{ScopeComponent-DFJUaQtj.mjs → ScopeComponent-7geL5q_S.mjs} +1 -1
  499. package/dist/chunks/{ScopeComponent-DFJUaQtj.mjs.map → ScopeComponent-7geL5q_S.mjs.map} +1 -1
  500. package/dist/chunks/{ScopeComponent-Dj1ARFka.cjs → ScopeComponent-CABGdfsV.cjs} +1 -1
  501. package/dist/chunks/{ScopeComponent-Dj1ARFka.cjs.map → ScopeComponent-CABGdfsV.cjs.map} +1 -1
  502. package/dist/chunks/_l10n-Ch5mEdUH.cjs +131 -0
  503. package/dist/chunks/{_l10n-Ci9_UR5q.cjs.map → _l10n-Ch5mEdUH.cjs.map} +1 -1
  504. package/dist/chunks/_l10n-DXr-EzLn.mjs +132 -0
  505. package/dist/chunks/_l10n-DXr-EzLn.mjs.map +1 -0
  506. package/dist/chunks/{emoji-V6ytyzoR.mjs → emoji-BY_D0V5K.mjs} +2 -3
  507. package/dist/chunks/{emoji-V6ytyzoR.mjs.map → emoji-BY_D0V5K.mjs.map} +1 -1
  508. package/dist/chunks/{emoji-BCCCB3t3.cjs → emoji-VgSjNTd5.cjs} +2 -3
  509. package/dist/chunks/{emoji-BCCCB3t3.cjs.map → emoji-VgSjNTd5.cjs.map} +1 -1
  510. package/dist/chunks/{index-Dsgv-f-l.cjs → index-BV85rPB7.cjs} +3 -6
  511. package/dist/chunks/{index-Dsgv-f-l.cjs.map → index-BV85rPB7.cjs.map} +1 -1
  512. package/dist/chunks/{index-CMZdBcqP.mjs → index-CKNLRG-q.mjs} +8 -8
  513. package/dist/chunks/{index-CMZdBcqP.mjs.map → index-CKNLRG-q.mjs.map} +1 -1
  514. package/dist/chunks/{index-BwyQ2N-M.mjs → index-CtoB4eIp.mjs} +3 -6
  515. package/dist/chunks/{index-BwyQ2N-M.mjs.map → index-CtoB4eIp.mjs.map} +1 -1
  516. package/dist/chunks/{index-CC4ahXvG.cjs → index-DLGLmjm4.cjs} +8 -8
  517. package/dist/chunks/{index-CC4ahXvG.cjs.map → index-DLGLmjm4.cjs.map} +1 -1
  518. package/dist/chunks/{referencePickerModal-DQM56QYC.mjs → referencePickerModal-B4rYwkv3.mjs} +29 -42
  519. package/dist/chunks/referencePickerModal-B4rYwkv3.mjs.map +1 -0
  520. package/dist/chunks/{referencePickerModal-CQKEiYX4.cjs → referencePickerModal-DlPz1XJQ.cjs} +29 -42
  521. package/dist/chunks/referencePickerModal-DlPz1XJQ.cjs.map +1 -0
  522. package/dist/chunks/useModelMigration-BvlORW73.mjs +24 -0
  523. package/dist/chunks/useModelMigration-BvlORW73.mjs.map +1 -0
  524. package/dist/chunks/useModelMigration-CVxLzfS5.cjs +25 -0
  525. package/dist/chunks/useModelMigration-CVxLzfS5.cjs.map +1 -0
  526. package/dist/chunks/{usernameToColor-D6FJP4ni.mjs → usernameToColor-B9AB7E7x.mjs} +1 -1
  527. package/dist/chunks/{usernameToColor-D6FJP4ni.mjs.map → usernameToColor-B9AB7E7x.mjs.map} +1 -1
  528. package/dist/chunks/{usernameToColor-u2MH9nY7.cjs → usernameToColor-CWxjw-Pq.cjs} +1 -1
  529. package/dist/chunks/{usernameToColor-u2MH9nY7.cjs.map → usernameToColor-CWxjw-Pq.cjs.map} +1 -1
  530. package/dist/composables/useIsDarkTheme/index.d.ts +16 -0
  531. package/dist/composables/useModelMigration.d.ts +12 -0
  532. package/dist/functions/dialog/index.d.ts +16 -0
  533. package/dist/functions/index.d.ts +10 -0
  534. package/dist/functions/isDarkTheme/index.d.ts +17 -0
  535. package/dist/index.cjs +74 -66
  536. package/dist/index.cjs.map +1 -1
  537. package/dist/index.mjs +67 -59
  538. package/dist/index.mjs.map +1 -1
  539. package/dist/vendor.LICENSE.txt +1 -1
  540. package/package.json +17 -17
  541. package/dist/assets/NcColorPicker-CpkfRGO1.css +0 -122
  542. package/dist/assets/NcDateTimePickerNative-BAcKr0B3.css +0 -47
  543. package/dist/chunks/AlertCircleOutline-DLtiWgZd.cjs.map +0 -1
  544. package/dist/chunks/AlertCircleOutline-DU3QwU5Y.mjs.map +0 -1
  545. package/dist/chunks/ArrowLeft-BhAxJBYx.mjs.map +0 -1
  546. package/dist/chunks/ArrowLeft-CONurT5C.cjs.map +0 -1
  547. package/dist/chunks/ArrowRight-Bj5G_mG0.cjs.map +0 -1
  548. package/dist/chunks/ArrowRight-KsL2PC-o.mjs.map +0 -1
  549. package/dist/chunks/Check-XHAzUBkX.mjs.map +0 -1
  550. package/dist/chunks/Check-fCbe4vqy.cjs.map +0 -1
  551. package/dist/chunks/ChevronDown-CiFbcDUC.cjs.map +0 -1
  552. package/dist/chunks/ChevronDown-D3Tfshug.mjs.map +0 -1
  553. package/dist/chunks/ChevronRight-C3eVhc5a.mjs.map +0 -1
  554. package/dist/chunks/ChevronRight-CWbdN5_r.cjs.map +0 -1
  555. package/dist/chunks/ChevronUp-A2riTBrv.cjs.map +0 -1
  556. package/dist/chunks/ChevronUp-ljACquzS.mjs.map +0 -1
  557. package/dist/chunks/Close-B6ccm1RP.mjs.map +0 -1
  558. package/dist/chunks/Close-B7lGu0cG.cjs.map +0 -1
  559. package/dist/chunks/DotsHorizontal-Cd2x8oz2.mjs.map +0 -1
  560. package/dist/chunks/DotsHorizontal-DQfnwpao.cjs.map +0 -1
  561. package/dist/chunks/NcActionInput-CUAQEdIX.cjs.map +0 -1
  562. package/dist/chunks/NcActionInput-DY2qdzdN.mjs.map +0 -1
  563. package/dist/chunks/NcAppContent-fXpgsMfG.cjs.map +0 -1
  564. package/dist/chunks/NcAppContent-lEyly7Jk.mjs.map +0 -1
  565. package/dist/chunks/NcAppNavigationItem-Chm1R863.cjs.map +0 -1
  566. package/dist/chunks/NcAppNavigationItem-CybYrL2f.mjs.map +0 -1
  567. package/dist/chunks/NcAppNavigationSettings-C-_G8yUn.cjs.map +0 -1
  568. package/dist/chunks/NcAppNavigationSettings-DScz0UWm.mjs.map +0 -1
  569. package/dist/chunks/NcAppNavigationToggle-BXainLDc.mjs.map +0 -1
  570. package/dist/chunks/NcAppNavigationToggle-DAhbqsn_.cjs.map +0 -1
  571. package/dist/chunks/NcAppSidebar-BMXNel-9.mjs.map +0 -1
  572. package/dist/chunks/NcAppSidebar-pD7Kd1Ld.cjs.map +0 -1
  573. package/dist/chunks/NcBreadcrumbs-D8nGOAl3.cjs.map +0 -1
  574. package/dist/chunks/NcBreadcrumbs-DIONM2xF.mjs.map +0 -1
  575. package/dist/chunks/NcCheckboxRadioSwitch-COeeT-7G.cjs.map +0 -1
  576. package/dist/chunks/NcCheckboxRadioSwitch-CvMEEI9x.mjs.map +0 -1
  577. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_00597cce_lang-CbxHILUm.cjs +0 -4
  578. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_00597cce_lang-CbxHILUm.cjs.map +0 -1
  579. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_00597cce_lang-pIxtu28F.mjs +0 -3
  580. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_00597cce_lang-pIxtu28F.mjs.map +0 -1
  581. package/dist/chunks/NcColorPicker-CmHTPv60.cjs.map +0 -1
  582. package/dist/chunks/NcColorPicker-D3b9pIOc.mjs.map +0 -1
  583. package/dist/chunks/NcEmojiPicker-DV7HDeqU.cjs.map +0 -1
  584. package/dist/chunks/NcEmojiPicker-DqaJO21R.mjs.map +0 -1
  585. package/dist/chunks/NcPasswordField-BQCunRtm.cjs.map +0 -1
  586. package/dist/chunks/NcPasswordField-DLXPfvQB.mjs.map +0 -1
  587. package/dist/chunks/NcRelatedResourcesPanel-CsOAnfA1.cjs.map +0 -1
  588. package/dist/chunks/NcRelatedResourcesPanel-DZICfdzQ.mjs.map +0 -1
  589. package/dist/chunks/NcRichContenteditable-C0hSvLHR.mjs.map +0 -1
  590. package/dist/chunks/NcRichContenteditable-Dj9rufAV.cjs.map +0 -1
  591. package/dist/chunks/NcRichText-CgD7wGDe.mjs.map +0 -1
  592. package/dist/chunks/NcRichText-DSnF0Fow.cjs.map +0 -1
  593. package/dist/chunks/NcSelect-BoIXJjPW.cjs.map +0 -1
  594. package/dist/chunks/NcSelect-D4om25m8.mjs.map +0 -1
  595. package/dist/chunks/NcSelectTags-CMUDUx29.cjs.map +0 -1
  596. package/dist/chunks/NcSelectTags-hclAoBW3.mjs.map +0 -1
  597. package/dist/chunks/NcSettingsInputText-BF_v4yDP.mjs.map +0 -1
  598. package/dist/chunks/NcSettingsInputText-Cv_JwbFO.cjs.map +0 -1
  599. package/dist/chunks/NcSettingsSection-CA2JahBC.cjs.map +0 -1
  600. package/dist/chunks/NcSettingsSection-V9DkkSuI.mjs.map +0 -1
  601. package/dist/chunks/NcSettingsSelectGroup-BTPrOKXu.mjs.map +0 -1
  602. package/dist/chunks/NcSettingsSelectGroup-DDwAZI5O.cjs.map +0 -1
  603. package/dist/chunks/NcTextField-BnZnDMjV.cjs.map +0 -1
  604. package/dist/chunks/NcTextField-CmXmPZ4h.mjs.map +0 -1
  605. package/dist/chunks/NcTimezonePicker-C0YKWg81.mjs.map +0 -1
  606. package/dist/chunks/NcTimezonePicker-DxA5d2ur.cjs.map +0 -1
  607. package/dist/chunks/_l10n-Ci9_UR5q.cjs +0 -131
  608. package/dist/chunks/_l10n-JYjUKekn.mjs +0 -132
  609. package/dist/chunks/_l10n-JYjUKekn.mjs.map +0 -1
  610. package/dist/chunks/referencePickerModal-CQKEiYX4.cjs.map +0 -1
  611. package/dist/chunks/referencePickerModal-DQM56QYC.mjs.map +0 -1
  612. /package/dist/assets/{NcActionButtonGroup-CQxLn2fv.css → NcActionButtonGroup-BND4GQdv.css} +0 -0
  613. /package/dist/assets/{NcActionCaption-B7FZTc3Y.css → NcActionCaption-JVhz4Wp7.css} +0 -0
  614. /package/dist/assets/{NcActionSeparator-CEbb5P6P.css → NcActionSeparator-Ct2RnclR.css} +0 -0
  615. /package/dist/assets/{NcAppNavigationCaption-zgtPq3Od.css → NcAppNavigationCaption-Dt5K_hKD.css} +0 -0
  616. /package/dist/assets/{NcAppNavigationIconBullet-By_0o2dG.css → NcAppNavigationIconBullet-CeBYVy6t.css} +0 -0
  617. /package/dist/assets/{NcAppNavigationList-BIbyyT7b.css → NcAppNavigationList-DnKj0-Zq.css} +0 -0
  618. /package/dist/assets/{NcAppNavigationNew-BKfawNII.css → NcAppNavigationNew-BcDuupzO.css} +0 -0
  619. /package/dist/assets/{NcAppNavigationSearch-BLGG_WBn.css → NcAppNavigationSearch-Df50ss_2.css} +0 -0
  620. /package/dist/assets/{NcAppNavigationSettings-AzpTlUym.css → NcAppNavigationSettings-BV_QS8jh.css} +0 -0
  621. /package/dist/assets/{NcAppNavigationSpacer-CfNqmQeR.css → NcAppNavigationSpacer-Fkr_mEI1.css} +0 -0
  622. /package/dist/assets/{NcAppSettingsDialog-QF6aTZ3s.css → NcAppSettingsDialog-kKMMsdb3.css} +0 -0
  623. /package/dist/assets/{NcAppSettingsSection-qU4SUZvh.css → NcAppSettingsSection-Bl2-D3_g.css} +0 -0
  624. /package/dist/assets/{NcAppSidebarTab-BieYhqvk.css → NcAppSidebarTab-Blv6UfuA.css} +0 -0
  625. /package/dist/assets/{NcBreadcrumb-DOvK-XG1.css → NcBreadcrumb-Cjcyeimd.css} +0 -0
  626. /package/dist/assets/{NcBreadcrumbs-CPUAM38l.css → NcBreadcrumbs-CFRjXqRg.css} +0 -0
  627. /package/dist/assets/{NcButton-DYJAoXeG.css → NcButton-BHDLon1_.css} +0 -0
  628. /package/dist/assets/{NcChip-CEKw1zaK.css → NcChip-CHVJ7LYT.css} +0 -0
  629. /package/dist/assets/{NcCollectionList-ETQTqkqt.css → NcCollectionList-yjTCAR46.css} +0 -0
  630. /package/dist/assets/{NcContent-ZFNIjylG.css → NcContent-CZamE_IP.css} +0 -0
  631. /package/dist/assets/{NcCounterBubble-Dizdz4Hk.css → NcCounterBubble-DdYmHnng.css} +0 -0
  632. /package/dist/assets/{NcDashboardWidget-CpstyXok.css → NcDashboardWidget-BSTvIgiJ.css} +0 -0
  633. /package/dist/assets/{NcDashboardWidgetItem-BBZT17WU.css → NcDashboardWidgetItem-BtOuK4mf.css} +0 -0
  634. /package/dist/assets/{NcDialog-ByAK1rQ0.css → NcDialog-Bzs9oxyt.css} +0 -0
  635. /package/dist/assets/{NcEmojiPicker-B5dclDLD.css → NcEmojiPicker-BNCW1Q94.css} +0 -0
  636. /package/dist/assets/{NcEmptyContent-BU0QVo3d.css → NcEmptyContent-BlXL6nnq.css} +0 -0
  637. /package/dist/assets/{NcGuestContent-BLJ37yLM.css → NcGuestContent-B0ivUQHg.css} +0 -0
  638. /package/dist/assets/{NcHeaderButton-BybvB5sC.css → NcHeaderButton-DH4Qtw3P.css} +0 -0
  639. /package/dist/assets/{NcHeaderMenu-BCtvpsZj.css → NcHeaderMenu-C2XbJMYL.css} +0 -0
  640. /package/dist/assets/{NcIconSvgWrapper-BwsJ8wBM.css → NcIconSvgWrapper-BxyhLaB5.css} +0 -0
  641. /package/dist/assets/{NcInputConfirmCancel-SGr0-6w8.css → NcInputConfirmCancel-EYtW7MxF.css} +0 -0
  642. /package/dist/assets/{NcListItem-D-8LyMsI.css → NcListItem-BBu5UTTe.css} +0 -0
  643. /package/dist/assets/{NcListItemIcon--7OhLYWA.css → NcListItemIcon-UmX9YoH3.css} +0 -0
  644. /package/dist/assets/{NcLoadingIcon-BSONDy7x.css → NcLoadingIcon-x1d284UU.css} +0 -0
  645. /package/dist/assets/{NcMentionBubble-C6t8od-_.css → NcMentionBubble-Bt71nB8X.css} +0 -0
  646. /package/dist/assets/{NcNoteCard-CImn6F9p.css → NcNoteCard-C6xb7vi0.css} +0 -0
  647. /package/dist/assets/{NcPopover-BDlL00qZ.css → NcPopover-TS4CW9MJ.css} +0 -0
  648. /package/dist/assets/{NcProgressBar-BsqdCn-x.css → NcProgressBar--z-WqmX4.css} +0 -0
  649. /package/dist/assets/{NcRelatedResourcesPanel-BE9CQ8s8.css → NcRelatedResourcesPanel-DIhZx6lY.css} +0 -0
  650. /package/dist/assets/{NcSelect-EIXtZSVn.css → NcSelect-GdIw6cIy.css} +0 -0
  651. /package/dist/assets/{NcSettingsSection-CGaCS1X0.css → NcSettingsSection-Dlaob2ni.css} +0 -0
  652. /package/dist/assets/{NcUserBubble-Cv-q-rH5.css → NcUserBubble-CNid1YOT.css} +0 -0
  653. /package/dist/assets/{NcUserStatusIcon-DMxcdM51.css → NcUserStatusIcon-DAVSJFhS.css} +0 -0
  654. /package/dist/assets/{Tooltip-4CSl8xev.css → Tooltip-DQ4Plm4r.css} +0 -0
@@ -1,9 +1,9 @@
1
- require('../assets/NcDialog-ByAK1rQ0.css');
1
+ require('../assets/NcDialog-Bzs9oxyt.css');
2
2
  "use strict";
3
3
  const core = require("@vueuse/core");
4
4
  const Vue = require("vue");
5
5
  const Components_NcModal = require("../Components/NcModal.cjs");
6
- const NcDialogButton = require("./NcDialogButton-C4-agMb3.cjs");
6
+ const NcDialogButton = require("./NcDialogButton-B7d1LWFN.cjs");
7
7
  const GenRandomId = require("./GenRandomId-BQDud3d4.cjs");
8
8
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
9
9
  const _sfc_main = Vue.defineComponent({
@@ -170,7 +170,7 @@ const _sfc_main = Vue.defineComponent({
170
170
  const wrapper = Vue.ref();
171
171
  const { width: dialogWidth } = core.useElementSize(wrapper, { width: 900 });
172
172
  const isNavigationCollapsed = Vue.computed(() => dialogWidth.value < 876);
173
- const hasNavigation = Vue.computed(() => (slots == null ? void 0 : slots.navigation) !== void 0);
173
+ const hasNavigation = Vue.computed(() => slots?.navigation !== void 0);
174
174
  const navigationId = GenRandomId.GenRandomId();
175
175
  const navigationAriaLabelAttr = Vue.computed(() => props.navigationAriaLabel || void 0);
176
176
  const navigationAriaLabelledbyAttr = Vue.computed(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialog-D9l7GQQJ.cjs","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 :open.sync=\"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\" :can-close=\"false\">\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 :open.sync=\"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\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\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: '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\t:enable-swipe=\"false\"\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=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\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 GenRandomId from '../../utils/GenRandomId.js'\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,\n\t\t\tvalidator: (arr) => {\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,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof 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,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\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 `canClose` is set to true.\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 additionaly 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 additionaly 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 additionaly 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', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\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 })\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 = GenRandomId()\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}\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} event The click event\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tconst handleButtonClose = (event, result) => {\n\t\t\t// Skip close if invalid dialog\n\t\t\tif (dialogTagName.value === 'form' && !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 {unknown} result the result of the callback\n\t\t */\n\t\tconst handleClosing = (result) => {\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 * @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\tcanClose: props.canClose,\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\tbox-sizing: border-box;\n\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":["defineComponent","NcDialogButton","NcModal","ref","useElementSize","computed","GenRandomId"],"mappings":";;;;;;;AAsQA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC,eAAA;AAAA,IACA,SAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAGA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA,IAGA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,CAAA,QAAA;AACA,eACA,MAAA,QAAA,GAAA,KAAA,IAAA;AAAA,UACA,CAAA,YACA,OAAA,YAAA,YAAA,mBAAA;AAAA,QACA;AAAA,MAEA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,UAAA,OAAA,UAAA,YAAA,CAAA,SAAA,UAAA,SAAA,MAAA,EAAA,S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A,KAAA;AAAA,IACA;AAKA,UAAA,aAAAE,IAAAA,SAAA,OAAA;AAAA,MACA,UAAA,MAAA;AAAA,MACA,WAAA,MAAA,cAAA,SAAA,SAAA,MAAA;AAAA;AAAA;AAAA;AAAA,MAIA,SAAA;AAAA,MACA,MAAA,MAAA;AAAA,MACA,MAAA,MAAA,QAAA,UAAA;AAAA,MACA,eAAA,MAAA;AAAA,MACA,qBAAA,MAAA;AAAA,MACA,wBAAA,MAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialog-CWGgSCpv.cjs","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 :open.sync=\"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\" :can-close=\"false\">\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 :open.sync=\"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\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\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: '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\t:enable-swipe=\"false\"\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=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\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 GenRandomId from '../../utils/GenRandomId.js'\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,\n\t\t\tvalidator: (arr) => {\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,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof 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,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\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 `canClose` is set to true.\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 additionaly 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 additionaly 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 additionaly 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', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\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 })\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 = GenRandomId()\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}\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} event The click event\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tconst handleButtonClose = (event, result) => {\n\t\t\t// Skip close if invalid dialog\n\t\t\tif (dialogTagName.value === 'form' && !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 {unknown} result the result of the callback\n\t\t */\n\t\tconst handleClosing = (result) => {\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 * @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\tcanClose: props.canClose,\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\tbox-sizing: border-box;\n\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":["define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,EAAA;AAEA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
- import '../assets/NcDialog-ByAK1rQ0.css';
1
+ import '../assets/NcDialog-Bzs9oxyt.css';
2
2
  import { useElementSize } from "@vueuse/core";
3
3
  import { defineComponent, ref, computed } from "vue";
4
4
  import NcModal from "../Components/NcModal.mjs";
5
- import { N as NcDialogButton } from "./NcDialogButton-CubYnLkp.mjs";
5
+ import { N as NcDialogButton } from "./NcDialogButton-7UqknfnA.mjs";
6
6
  import { G as GenRandomId } from "./GenRandomId-CMooMQt0.mjs";
7
7
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
8
8
  const _sfc_main = defineComponent({
@@ -169,7 +169,7 @@ const _sfc_main = defineComponent({
169
169
  const wrapper = ref();
170
170
  const { width: dialogWidth } = useElementSize(wrapper, { width: 900 });
171
171
  const isNavigationCollapsed = computed(() => dialogWidth.value < 876);
172
- const hasNavigation = computed(() => (slots == null ? void 0 : slots.navigation) !== void 0);
172
+ const hasNavigation = computed(() => slots?.navigation !== void 0);
173
173
  const navigationId = GenRandomId();
174
174
  const navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || void 0);
175
175
  const navigationAriaLabelledbyAttr = computed(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialog-DmcKxy4v.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 :open.sync=\"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\" :can-close=\"false\">\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 :open.sync=\"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\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\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: '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\t:enable-swipe=\"false\"\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=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\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 GenRandomId from '../../utils/GenRandomId.js'\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,\n\t\t\tvalidator: (arr) => {\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,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof 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,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\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 `canClose` is set to true.\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 additionaly 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 additionaly 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 additionaly 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', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\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 })\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 = GenRandomId()\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}\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} event The click event\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tconst handleButtonClose = (event, result) => {\n\t\t\t// Skip close if invalid dialog\n\t\t\tif (dialogTagName.value === 'form' && !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 {unknown} result the result of the callback\n\t\t */\n\t\tconst handleClosing = (result) => {\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 * @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\tcanClose: props.canClose,\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\tbox-sizing: border-box;\n\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":[],"mappings":";;;;;;AAsQA,MAAA,YAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAGA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA,IAGA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,CAAA,QAAA;AACA,eACA,MAAA,QAAA,GAAA,KAAA,IAAA;AAAA,UACA,CAAA,YACA,OAAA,YAAA,YAAA,mBAAA;AAAA,QACA;AAAA,MAEA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,W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;AAAA,IACA;AAKA,UAAA,aAAA,SAAA,OAAA;AAAA,MACA,UAAA,MAAA;AAAA,MACA,WAAA,MAAA,cAAA,SAAA,SAAA,MAAA;AAAA;AAAA;AAAA;AAAA,MAIA,SAAA;AAAA,MACA,MAAA,MAAA;AAAA,MACA,MAAA,MAAA,QAAA,UAAA;AAAA,MACA,eAAA,MAAA;AAAA,MACA,qBAAA,MAAA;AAAA,MACA,wBAAA,MAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialog-LPfqWPKk.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 :open.sync=\"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\" :can-close=\"false\">\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 :open.sync=\"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\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\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: '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\t:enable-swipe=\"false\"\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=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\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 GenRandomId from '../../utils/GenRandomId.js'\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,\n\t\t\tvalidator: (arr) => {\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,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof 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,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\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 `canClose` is set to true.\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 additionaly 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 additionaly 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 additionaly 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', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\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 })\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 = GenRandomId()\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}\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} event The click event\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tconst handleButtonClose = (event, result) => {\n\t\t\t// Skip close if invalid dialog\n\t\t\tif (dialogTagName.value === 'form' && !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 {unknown} result the result of the callback\n\t\t */\n\t\tconst handleClosing = (result) => {\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 * @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\tcanClose: props.canClose,\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\tbox-sizing: border-box;\n\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":[],"mappings":";;;;;;AAsQ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ACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { ref } from "vue";
2
2
  import NcButton from "../Components/NcButton.mjs";
3
- import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-DjrkBUkC.mjs";
3
+ import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-CHmdAuhg.mjs";
4
4
  import NcLoadingIcon from "../Components/NcLoadingIcon.mjs";
5
- import { r as register, b as t31, a as t } from "./_l10n-JYjUKekn.mjs";
5
+ import { r as register, b as t31, a as t } from "./_l10n-DXr-EzLn.mjs";
6
6
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
7
7
  register(t31);
8
8
  const _sfc_main = {
@@ -68,13 +68,12 @@ const _sfc_main = {
68
68
  const props = __props;
69
69
  const isLoading = ref(false);
70
70
  const handleClick = async (e) => {
71
- var _a;
72
71
  if (isLoading.value) {
73
72
  return;
74
73
  }
75
74
  isLoading.value = true;
76
75
  try {
77
- const result = await ((_a = props.callback) == null ? void 0 : _a.call(props));
76
+ const result = await props.callback?.();
78
77
  if (result !== false) {
79
78
  emit("click", e, result);
80
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialogButton-CubYnLkp.mjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:native-type=\"nativeType\"\n\t\t:type=\"type\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\nimport { t } from '../../l10n.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed.\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton\n\t * @type {'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n * @param {MouseEvent} e The click event\n */\nconst handleClick = async (e) => {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\tconst result = await props.callback?.()\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,UAAM,YAAY,IAAI,KAAK;AAM3B,UAAM,cAAc,OAAO,MAAM;;AAEhC,UAAI,UAAU,OAAO;AACpB;AAAA,MACA;AAED,gBAAU,QAAQ;AAClB,UAAI;AACH,cAAM,SAAS,QAAM,WAAM,aAAN;AACrB,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QACvB;AAAA,MACH,UAAW;AACT,kBAAU,QAAQ;AAAA,MAClB;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialogButton-7UqknfnA.mjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:native-type=\"nativeType\"\n\t\t:type=\"type\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\nimport { t } from '../../l10n.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed.\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton\n\t * @type {'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n * @param {MouseEvent} e The click event\n */\nconst handleClick = async (e) => {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\tconst result = await props.callback?.()\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,UAAM,YAAY,IAAI,KAAK;AAM3B,UAAM,cAAc,OAAO,MAAM;AAEhC,UAAI,UAAU,OAAO;AACpB;AAAA,MACA;AAED,gBAAU,QAAQ;AAClB,UAAI;AACH,cAAM,SAAS,MAAM,MAAM,WAAY;AACvC,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QACvB;AAAA,MACH,UAAW;AACT,kBAAU,QAAQ;AAAA,MAClB;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  const Vue = require("vue");
3
3
  const Components_NcButton = require("../Components/NcButton.cjs");
4
- const NcIconSvgWrapper = require("./NcIconSvgWrapper-Cb4bAwV6.cjs");
4
+ const NcIconSvgWrapper = require("./NcIconSvgWrapper-B_eOG2sZ.cjs");
5
5
  const Components_NcLoadingIcon = require("../Components/NcLoadingIcon.cjs");
6
- const _l10n = require("./_l10n-Ci9_UR5q.cjs");
6
+ const _l10n = require("./_l10n-Ch5mEdUH.cjs");
7
7
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
8
8
  _l10n.register(_l10n.t31);
9
9
  const _sfc_main = {
@@ -69,13 +69,12 @@ const _sfc_main = {
69
69
  const props = __props;
70
70
  const isLoading = Vue.ref(false);
71
71
  const handleClick = async (e) => {
72
- var _a;
73
72
  if (isLoading.value) {
74
73
  return;
75
74
  }
76
75
  isLoading.value = true;
77
76
  try {
78
- const result = await ((_a = props.callback) == null ? void 0 : _a.call(props));
77
+ const result = await props.callback?.();
79
78
  if (result !== false) {
80
79
  emit("click", e, result);
81
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialogButton-C4-agMb3.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:native-type=\"nativeType\"\n\t\t:type=\"type\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\nimport { t } from '../../l10n.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed.\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton\n\t * @type {'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n * @param {MouseEvent} e The click event\n */\nconst handleClick = async (e) => {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\tconst result = await props.callback?.()\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,UAAM,YAAYA,IAAG,IAAC,KAAK;AAM3B,UAAM,cAAc,OAAO,MAAM;;AAEhC,UAAI,UAAU,OAAO;AACpB;AAAA,MACA;AAED,gBAAU,QAAQ;AAClB,UAAI;AACH,cAAM,SAAS,QAAM,WAAM,aAAN;AACrB,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QACvB;AAAA,MACH,UAAW;AACT,kBAAU,QAAQ;AAAA,MAClB;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialogButton-B7d1LWFN.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:native-type=\"nativeType\"\n\t\t:type=\"type\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\nimport { t } from '../../l10n.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed.\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton\n\t * @type {'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n * @param {MouseEvent} e The click event\n */\nconst handleClick = async (e) => {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\tconst result = await props.callback?.()\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,UAAM,YAAYA,IAAG,IAAC,KAAK;AAM3B,UAAM,cAAc,OAAO,MAAM;AAEhC,UAAI,UAAU,OAAO;AACpB;AAAA,MACA;AAED,gBAAU,QAAQ;AAClB,UAAI;AACH,cAAM,SAAS,MAAM,MAAM,WAAY;AACvC,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QACvB;AAAA,MACH,UAAW;AACT,kBAAU,QAAQ;AAAA,MAClB;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,14 +1,14 @@
1
- import '../assets/NcEmojiPicker-B5dclDLD.css';
1
+ import '../assets/NcEmojiPicker-BNCW1Q94.css';
2
2
  import { Emoji, Picker, EmojiIndex } from "emoji-mart-vue-fast";
3
- import { r as register, z as t40, A as t35, o as t15, B as t6, a as t } from "./_l10n-JYjUKekn.mjs";
4
- import { g as getCurrentSkinTone, s as setCurrentSkinTone } from "./emoji-V6ytyzoR.mjs";
5
- import { C as Color } from "./GenColors-BWE946ht.mjs";
3
+ import { r as register, z as t40, A as t35, o as t15, B as t6, a as t } from "./_l10n-DXr-EzLn.mjs";
4
+ import { g as getCurrentSkinTone, s as setCurrentSkinTone } from "./emoji-BY_D0V5K.mjs";
5
+ import { C as Color } from "./GenColors-BAOuMMLW.mjs";
6
6
  import data from "emoji-mart-vue-fast/data/all.json";
7
7
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
8
8
  import NcButton from "../Components/NcButton.mjs";
9
- import { N as NcColorPicker } from "./NcColorPicker-D3b9pIOc.mjs";
10
- import { N as NcPopover } from "./NcPopover-DbeCmze0.mjs";
11
- import { N as NcTextField } from "./NcTextField-CmXmPZ4h.mjs";
9
+ import { N as NcColorPicker } from "./NcColorPicker-CKWvpkRM.mjs";
10
+ import { N as NcPopover } from "./NcPopover-DzYbNu-I.mjs";
11
+ import { N as NcTextField } from "./NcTextField-DaGO9lFz.mjs";
12
12
  register(t6, t15, t35, t40);
13
13
  const _sfc_main$1 = {
14
14
  name: "CircleIcon",
@@ -29,7 +29,7 @@ const _sfc_main$1 = {
29
29
  };
30
30
  var _sfc_render$1 = function render() {
31
31
  var _vm = this, _c = _vm._self._c;
32
- return _c("span", _vm._b({ staticClass: "material-design-icon circle-icon", attrs: { "aria-hidden": _vm.title ? null : true, "aria-label": _vm.title, "role": "img" }, on: { "click": function($event) {
32
+ return _c("span", _vm._b({ staticClass: "material-design-icon circle-icon", attrs: { "aria-hidden": _vm.title ? null : "true", "aria-label": _vm.title, "role": "img" }, on: { "click": function($event) {
33
33
  return _vm.$emit("click", $event);
34
34
  } } }, "span", _vm.$attrs, false), [_c("svg", { staticClass: "material-design-icon__svg", attrs: { "fill": _vm.fillColor, "width": _vm.size, "height": _vm.size, "viewBox": "0 0 24 24" } }, [_c("path", { attrs: { "d": "M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" } }, [_vm.title ? _c("title", [_vm._v(_vm._s(_vm.title))]) : _vm._e()])])]);
35
35
  };
@@ -179,9 +179,8 @@ const _sfc_main = {
179
179
  methods: {
180
180
  t,
181
181
  clearSearch() {
182
- var _a, _b;
183
182
  this.search = "";
184
- const input = (_b = (_a = this.$refs.search) == null ? void 0 : _a.$refs.inputField) == null ? void 0 : _b.$refs.input;
183
+ const input = this.$refs.search?.$refs.inputField?.$refs.input;
185
184
  if (input) {
186
185
  input.focus();
187
186
  }
@@ -209,10 +208,9 @@ const _sfc_main = {
209
208
  this.$emit("unselect");
210
209
  },
211
210
  afterShow() {
212
- var _a, _b;
213
211
  const picker = this.$refs.picker;
214
212
  picker.$el.addEventListener("keydown", this.checkKeyEvent);
215
- const input = (_b = (_a = this.$refs.search) == null ? void 0 : _a.$refs.inputField) == null ? void 0 : _b.$refs.input;
213
+ const input = this.$refs.search?.$refs.inputField?.$refs.input;
216
214
  if (input) {
217
215
  input.focus();
218
216
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcEmojiPicker-B36zeXTi.mjs","sources":["../../node_modules/vue-material-design-icons/Circle.vue","../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover :shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\t:auto-focus=\"false /* We manage the input focus ourselves */\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:skin=\"currentSkinTone\"\n\t\t\t:show-skin-tones=\"false\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\trole=\"dialog\"\n\t\t\taria-modal=\"true\"\n\t\t\t:aria-label=\"t('Emoji picker')\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"slotProps\">\n\t\t\t\t<div class=\"search__wrapper\">\n\t\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t\t@trailing-button-click=\"clearSearch(); slotProps.onSearch(search);\"\n\t\t\t\t\t\t@update:value=\"slotProps.onSearch(search)\" />\n\t\t\t\t\t<NcColorPicker palette-only\n\t\t\t\t\t\t:container=\"container\"\n\t\t\t\t\t\t:palette=\"skinTonePalette\"\n\t\t\t\t\t\t:value=\"currentColor.color\"\n\t\t\t\t\t\t@update:value=\"onChangeSkinTone\">\n\t\t\t\t\t\t<NcButton :aria-label=\"t('Skin tone')\" type=\"tertiary-no-background\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCircle :style=\"{ color: currentColor.color }\" :title=\"currentColor.name\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</NcColorPicker>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport { t } from '../../l10n.js'\nimport { getCurrentSkinTone, setCurrentSkinTone } from '../../functions/emoji/emoji.ts'\nimport { Color } from '../../utils/GenColors.js'\n\nimport data from 'emoji-mart-vue-fast/data/all.json'\nimport IconCircle from 'vue-material-design-icons/Circle.vue'\nimport NcButton from '../NcButton/index.js'\nimport NcColorPicker from '../NcColorPicker/NcColorPicker.vue'\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\n\n// Shared emoji index and skinTone for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nconst skinTonePalette = [\n\tnew Color(255, 222, 52, t('Neutral skin color')),\n\tnew Color(228, 205, 166, t('Light skin tone')),\n\tnew Color(250, 221, 192, t('Medium light skin tone')),\n\tnew Color(174, 129, 87, t('Medium skin tone')),\n\tnew Color(158, 113, 88, t('Medium dark skin tone')),\n\tnew Color(96, 79, 69, t('Dark skin tone')),\n]\n\nexport default {\n\tname: 'NcEmojiPicker',\n\n\tcomponents: {\n\t\tEmoji,\n\t\tIconCircle,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\tskinTonePalette,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\tconst currentSkinTone = getCurrentSkinTone()\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * The current active color from the skin tone palette\n\t\t\t */\n\t\t\tcurrentColor: skinTonePalette[currentSkinTone - 1],\n\t\t\t/**\n\t\t\t * The current active skin tone\n\t\t\t * @type {1|2|3|4|5|6}\n\t\t\t */\n\t\t\tcurrentSkinTone,\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update the current skin tone by the result of the color picker\n\t\t * @param {string} color Color set\n\t\t */\n\t\tonChangeSkinTone(color) {\n\t\t\tconst index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase())\n\t\t\tif (index > -1) {\n\t\t\t\tthis.currentSkinTone = index + 1\n\t\t\t\tthis.currentColor = this.skinTonePalette[index]\n\t\t\t\tsetCurrentSkinTone(this.currentSkinTone)\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿‍💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\t// add focus trap in modal\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.addEventListener('keydown', this.checkKeyEvent)\n\n\t\t\t// set focus on input search field\n\t\t\tconst input = this.$refs.search?.$refs.inputField?.$refs.input\n\t\t\tif (input) {\n\t\t\t\tinput.focus()\n\t\t\t}\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// remove keydown listner if popover is hidden\n\t\t\tconst picker = this.$refs.picker\n\t\t\tpicker.$el.removeEventListener('keydown', this.checkKeyEvent)\n\t\t},\n\n\t\tcheckKeyEvent(event) {\n\t\t\tif (event.key !== 'Tab') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst picker = this.$refs.picker\n\t\t\tconst focusableList = picker.$el.querySelectorAll(\n\t\t\t\t'button, input',\n\t\t\t)\n\t\t\tconst last = focusableList.length - 1\n\t\t\t// escape early if only 1 or no elements to focus\n\t\t\tif (focusableList.length <= 1) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.shiftKey === false && event.target === focusableList[last]) {\n\t\t\t\t// Jump to first item when pressing tab on the latest item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[0].focus()\n\t\t\t} else if (event.shiftKey === true && event.target === focusableList[0]) {\n\t\t\t\t// Jump to the last item if pressing shift+tab on the first item\n\t\t\t\tevent.preventDefault()\n\t\t\t\tfocusableList[last].focus()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// default style reset\n\tbutton {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t\theight: 36px;\n\t\twidth: auto;\n\n\t\t* {\n\t\t\tcursor: pointer !important;\n\t\t}\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-search input:focus-visible {\n\t\tbox-shadow: inset 0 0 0 2px var(--color-primary-element);\n\t\toutline: none;\n\t}\n\n\t.emoji-mart-bar {\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: var(--border-radius) !important;\n\t\t\tborder-top-right-radius: var(--border-radius) !important;\n\t\t}\n\t}\n\n\t.emoji-mart-anchors {\n\t\tbutton {\n\t\t\tborder-radius: 0;\n\t\t\tpadding: 12px 4px;\n\t\t\theight: auto;\n\t\t\t&:focus-visible {\n\t\t\t\t/* box-shadow: inset 0 0 0 2px var(--color-primary-element); */\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t}\n\t\t}\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tjustify-content: start;\n\n\t\t.emoji-mart-category-label,\n\t\t.emoji-mart-emoji {\n\t\t\tuser-select: none;\n\t\t\tflex-grow: 0;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.emoji-mart-category-label {\n\t\t\tflex-basis: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t.emoji-mart-emoji {\n\t\t\t// 8 emoji per row\n\t\t\tflex-basis: calc(100% / 8);\n\t\t\ttext-align: center;\n\n\t\t\t&:hover::before,\n\t\t\t&.emoji-mart-emoji-selected::before{\n\t\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\t\toutline: 2px solid var(--color-primary-element);\n\t\t\t\tborder-radius: var(--border-radius-element, var(--border-radius-pill));\n\t\t\t}\n\t\t}\n\t\tbutton {\n\t\t\t&:focus-visible {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 2px solid var(--color-primary-element) !important;\n\t\t\t\tborder-radius: var(--border-radius-element, var(--border-radius-pill));\n\t\t\t}\n\t\t}\n\t}\n\n}\n</style>\n\n<style scoped lang=\"scss\">\n.search {\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: 4px; // for focus-visible outlines\n\t\talign-items: end;\n\t\tpadding: 4px 8px;\n\t}\n}\n\n.row-selected {\n\tbutton, span {\n\t\tvertical-align: middle;\n\t}\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACsKA,IAAA;AAEA,MAAA,OAAA;AAAA,EACA,QAAA,EAAA,cAAA;AAAA,EACA,UAAA,EAAA,gBAAA;AAAA,EACA,YAAA;AAAA,IACA,QAAA,EAAA,gBAAA;AAAA,IACA,QAAA,EAAA,iBAAA;AAAA,IACA,SAAA,EAAA,mBAAA;AAAA,IACA,QAAA,EAAA,eAAA;AAAA,IACA,QAAA,EAAA,kBAAA;AAAA,IACA,OAAA,EAAA,cAAA;AAAA,IACA,UAAA,EAAA,YAAA;AAAA,IACA,QAAA,EAAA,iBAAA;AAAA,IACA,SAAA,EAAA,SAAA;AAAA,IACA,SAAA,EAAA,SAAA;AAAA,IACA,OAAA,EAAA,OAAA;AAAA,IACA,QAAA,EAAA,QAAA;AAAA,EACA;AACA;AAEA,MAAA,kBAAA;AAAA,EACA,IAAA,MAAA,KAAA,KAAA,IAAA,EAAA,oBAAA,CAAA;AAAA,EACA,IAAA,MAAA,KAAA,KAAA,KAAA,EAAA,iBA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AEA,YAAA;AAEA,YAAA,SAAA,KAAA,MAAA;AACA,aAAA,IAAA,oBAAA,WAAA,KAAA,aAAA;AAAA,IACA;AAAA,IAEA,cAAA,OAAA;AACA,UAAA,MAAA,QAAA,OAAA;AACA;AAAA,MACA;AACA,YAAA,SAAA,KAAA,MAAA;AACA,YAAA,gBAAA,OAAA,IAAA;AAAA,QACA;AAAA,MACA;AACA,YAAA,OAAA,cAAA,SAAA;AAEA,UAAA,cAAA,UAAA,GAAA;AACA,cAAA,eAAA;AACA;AAAA,MACA;AACA,UAAA,MAAA,aAAA,SAAA,MAAA,WAAA,cAAA,IAAA,GAAA;AAEA,cAAA,eAAA;AACA,sBAAA,CAAA,EAAA,MAAA;AAAA,MACA,WAAA,MAAA,aAAA,QAAA,MAAA,WAAA,cAAA,CAAA,GAAA;AAEA,cAAA,eAAA;AACA,sBAAA,IAAA,EAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1,15 +1,15 @@
1
- require('../assets/NcEmojiPicker-B5dclDLD.css');
1
+ require('../assets/NcEmojiPicker-BNCW1Q94.css');
2
2
  "use strict";
3
3
  const emojiMartVueFast = require("emoji-mart-vue-fast");
4
- const _l10n = require("./_l10n-Ci9_UR5q.cjs");
5
- const emoji = require("./emoji-BCCCB3t3.cjs");
6
- const GenColors = require("./GenColors-Cay7TLwO.cjs");
4
+ const _l10n = require("./_l10n-Ch5mEdUH.cjs");
5
+ const emoji = require("./emoji-VgSjNTd5.cjs");
6
+ const GenColors = require("./GenColors-iV_vrBr4.cjs");
7
7
  const data = require("emoji-mart-vue-fast/data/all.json");
8
8
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
9
9
  const Components_NcButton = require("../Components/NcButton.cjs");
10
- const NcColorPicker = require("./NcColorPicker-CmHTPv60.cjs");
11
- const NcPopover = require("./NcPopover-C0G7sLVP.cjs");
12
- const NcTextField = require("./NcTextField-BnZnDMjV.cjs");
10
+ const NcColorPicker = require("./NcColorPicker-CVeLov2Q.cjs");
11
+ const NcPopover = require("./NcPopover-MxwUgZu1.cjs");
12
+ const NcTextField = require("./NcTextField-DwWIlisf.cjs");
13
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
14
14
  const data__default = /* @__PURE__ */ _interopDefault(data);
15
15
  _l10n.register(_l10n.t6, _l10n.t15, _l10n.t35, _l10n.t40);
@@ -32,7 +32,7 @@ const _sfc_main$1 = {
32
32
  };
33
33
  var _sfc_render$1 = function render() {
34
34
  var _vm = this, _c = _vm._self._c;
35
- return _c("span", _vm._b({ staticClass: "material-design-icon circle-icon", attrs: { "aria-hidden": _vm.title ? null : true, "aria-label": _vm.title, "role": "img" }, on: { "click": function($event) {
35
+ return _c("span", _vm._b({ staticClass: "material-design-icon circle-icon", attrs: { "aria-hidden": _vm.title ? null : "true", "aria-label": _vm.title, "role": "img" }, on: { "click": function($event) {
36
36
  return _vm.$emit("click", $event);
37
37
  } } }, "span", _vm.$attrs, false), [_c("svg", { staticClass: "material-design-icon__svg", attrs: { "fill": _vm.fillColor, "width": _vm.size, "height": _vm.size, "viewBox": "0 0 24 24" } }, [_c("path", { attrs: { "d": "M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" } }, [_vm.title ? _c("title", [_vm._v(_vm._s(_vm.title))]) : _vm._e()])])]);
38
38
  };
@@ -182,9 +182,8 @@ const _sfc_main = {
182
182
  methods: {
183
183
  t: _l10n.t,
184
184
  clearSearch() {
185
- var _a, _b;
186
185
  this.search = "";
187
- const input = (_b = (_a = this.$refs.search) == null ? void 0 : _a.$refs.inputField) == null ? void 0 : _b.$refs.input;
186
+ const input = this.$refs.search?.$refs.inputField?.$refs.input;
188
187
  if (input) {
189
188
  input.focus();
190
189
  }
@@ -212,10 +211,9 @@ const _sfc_main = {
212
211
  this.$emit("unselect");
213
212
  },
214
213
  afterShow() {
215
- var _a, _b;
216
214
  const picker = this.$refs.picker;
217
215
  picker.$el.addEventListener("keydown", this.checkKeyEvent);
218
- const input = (_b = (_a = this.$refs.search) == null ? void 0 : _a.$refs.inputField) == null ? void 0 : _b.$refs.input;
216
+ const input = this.$refs.search?.$refs.inputField?.$refs.input;
219
217
  if (input) {
220
218
  input.focus();
221
219
  }