@nextcloud/vue 8.32.0 → 8.33.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 (602) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionCheckbox.cjs +1 -1
  7. package/dist/Components/NcActionCheckbox.mjs +1 -1
  8. package/dist/Components/NcActionInput.cjs +1 -1
  9. package/dist/Components/NcActionInput.mjs +1 -1
  10. package/dist/Components/NcActionLink.cjs +5 -5
  11. package/dist/Components/NcActionLink.cjs.map +1 -1
  12. package/dist/Components/NcActionLink.mjs +5 -5
  13. package/dist/Components/NcActionLink.mjs.map +1 -1
  14. package/dist/Components/NcActionRadio.cjs +1 -1
  15. package/dist/Components/NcActionRadio.mjs +1 -1
  16. package/dist/Components/NcActionRouter.cjs +4 -4
  17. package/dist/Components/NcActionRouter.cjs.map +1 -1
  18. package/dist/Components/NcActionRouter.mjs +4 -4
  19. package/dist/Components/NcActionRouter.mjs.map +1 -1
  20. package/dist/Components/NcActionText.cjs +4 -4
  21. package/dist/Components/NcActionText.cjs.map +1 -1
  22. package/dist/Components/NcActionText.mjs +4 -4
  23. package/dist/Components/NcActionText.mjs.map +1 -1
  24. package/dist/Components/NcActionTextEditable.cjs +1 -1
  25. package/dist/Components/NcActionTextEditable.mjs +1 -1
  26. package/dist/Components/NcActions.cjs +1 -1
  27. package/dist/Components/NcActions.mjs +1 -1
  28. package/dist/Components/NcAppContent.cjs +1 -1
  29. package/dist/Components/NcAppContent.mjs +1 -1
  30. package/dist/Components/NcAppNavigation.cjs +1 -1
  31. package/dist/Components/NcAppNavigation.mjs +1 -1
  32. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  33. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  34. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  35. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  36. package/dist/Components/NcAppNavigationNew.cjs +1 -1
  37. package/dist/Components/NcAppNavigationNew.mjs +1 -1
  38. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  39. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  40. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  41. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  42. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  43. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  44. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  45. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  46. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  47. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  48. package/dist/Components/NcAppSettingsSection.cjs +1 -1
  49. package/dist/Components/NcAppSettingsSection.mjs +1 -1
  50. package/dist/Components/NcAppSettingsSectionShortcuts.cjs +4 -0
  51. package/dist/Components/NcAppSettingsSectionShortcuts.cjs.map +1 -0
  52. package/dist/Components/NcAppSettingsSectionShortcuts.mjs +5 -0
  53. package/dist/Components/NcAppSettingsSectionShortcuts.mjs.map +1 -0
  54. package/dist/Components/NcAppSidebar.cjs +1 -1
  55. package/dist/Components/NcAppSidebar.mjs +1 -1
  56. package/dist/Components/NcAppSidebarTab.cjs +2 -3
  57. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  58. package/dist/Components/NcAppSidebarTab.mjs +2 -3
  59. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  60. package/dist/Components/NcAssistantButton.cjs +1 -1
  61. package/dist/Components/NcAssistantButton.mjs +1 -1
  62. package/dist/Components/NcAssistantIcon.cjs +1 -1
  63. package/dist/Components/NcAssistantIcon.mjs +1 -1
  64. package/dist/Components/NcAvatar.cjs +1 -1
  65. package/dist/Components/NcAvatar.mjs +1 -1
  66. package/dist/Components/NcBreadcrumb.cjs +1 -1
  67. package/dist/Components/NcBreadcrumb.mjs +1 -1
  68. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  69. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  70. package/dist/Components/NcButton.cjs +1 -1
  71. package/dist/Components/NcButton.mjs +1 -1
  72. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  73. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  74. package/dist/Components/NcChip.cjs +11 -17
  75. package/dist/Components/NcChip.cjs.map +1 -1
  76. package/dist/Components/NcChip.mjs +11 -17
  77. package/dist/Components/NcChip.mjs.map +1 -1
  78. package/dist/Components/NcCollectionList.cjs +1 -1
  79. package/dist/Components/NcCollectionList.mjs +1 -1
  80. package/dist/Components/NcColorPicker.cjs +1 -1
  81. package/dist/Components/NcColorPicker.mjs +1 -1
  82. package/dist/Components/NcContent.cjs +1 -1
  83. package/dist/Components/NcContent.mjs +1 -1
  84. package/dist/Components/NcCounterBubble.cjs +1 -1
  85. package/dist/Components/NcCounterBubble.mjs +1 -1
  86. package/dist/Components/NcDashboardWidget.cjs +1 -1
  87. package/dist/Components/NcDashboardWidget.mjs +1 -1
  88. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  89. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  90. package/dist/Components/NcDateTimePicker.cjs +17 -30
  91. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  92. package/dist/Components/NcDateTimePicker.mjs +17 -30
  93. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  94. package/dist/Components/NcDateTimePickerNative.cjs +14 -32
  95. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  96. package/dist/Components/NcDateTimePickerNative.mjs +14 -32
  97. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  98. package/dist/Components/NcDialog.cjs +1 -1
  99. package/dist/Components/NcDialog.mjs +1 -1
  100. package/dist/Components/NcDialogButton.cjs +1 -1
  101. package/dist/Components/NcDialogButton.mjs +1 -1
  102. package/dist/Components/NcEllipsisedOption.cjs +1 -1
  103. package/dist/Components/NcEllipsisedOption.mjs +1 -1
  104. package/dist/Components/NcEmojiPicker.cjs +1 -1
  105. package/dist/Components/NcEmojiPicker.mjs +1 -1
  106. package/dist/Components/NcEmptyContent.cjs +14 -9
  107. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  108. package/dist/Components/NcEmptyContent.mjs +14 -9
  109. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  110. package/dist/Components/NcHeaderButton.cjs +1 -1
  111. package/dist/Components/NcHeaderButton.mjs +1 -1
  112. package/dist/Components/NcHeaderMenu.cjs +1 -1
  113. package/dist/Components/NcHeaderMenu.mjs +1 -1
  114. package/dist/Components/NcHighlight.cjs +1 -1
  115. package/dist/Components/NcHighlight.mjs +1 -1
  116. package/dist/Components/NcHotkey.cjs +4 -0
  117. package/dist/Components/NcHotkey.cjs.map +1 -0
  118. package/dist/Components/NcHotkey.mjs +5 -0
  119. package/dist/Components/NcHotkey.mjs.map +1 -0
  120. package/dist/Components/NcHotkeyList.cjs +4 -0
  121. package/dist/Components/NcHotkeyList.cjs.map +1 -0
  122. package/dist/Components/NcHotkeyList.mjs +5 -0
  123. package/dist/Components/NcHotkeyList.mjs.map +1 -0
  124. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  125. package/dist/Components/NcIconSvgWrapper.mjs +1 -1
  126. package/dist/Components/NcInputField.cjs +1 -1
  127. package/dist/Components/NcInputField.mjs +1 -1
  128. package/dist/Components/NcKbd.cjs +2 -63
  129. package/dist/Components/NcKbd.cjs.map +1 -1
  130. package/dist/Components/NcKbd.mjs +2 -63
  131. package/dist/Components/NcKbd.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/NcModal.cjs +12 -13
  137. package/dist/Components/NcModal.cjs.map +1 -1
  138. package/dist/Components/NcModal.mjs +12 -13
  139. package/dist/Components/NcModal.mjs.map +1 -1
  140. package/dist/Components/NcNoteCard.cjs +2 -2
  141. package/dist/Components/NcNoteCard.mjs +2 -2
  142. package/dist/Components/NcPasswordField.cjs +1 -1
  143. package/dist/Components/NcPasswordField.mjs +1 -1
  144. package/dist/Components/NcPopover.cjs +1 -1
  145. package/dist/Components/NcPopover.mjs +1 -1
  146. package/dist/Components/NcProgressBar.cjs +1 -1
  147. package/dist/Components/NcProgressBar.mjs +1 -1
  148. package/dist/Components/NcRadioGroup.cjs +1 -1
  149. package/dist/Components/NcRadioGroup.mjs +1 -1
  150. package/dist/Components/NcRadioGroupButton.cjs +1 -1
  151. package/dist/Components/NcRadioGroupButton.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/NcSelectUsers.cjs +1 -1
  163. package/dist/Components/NcSelectUsers.mjs +1 -1
  164. package/dist/Components/NcSettingsInputText.cjs +1 -1
  165. package/dist/Components/NcSettingsInputText.mjs +1 -1
  166. package/dist/Components/NcSettingsSection.cjs +1 -1
  167. package/dist/Components/NcSettingsSection.mjs +1 -1
  168. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  169. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  170. package/dist/Components/NcTextArea.cjs +1 -1
  171. package/dist/Components/NcTextArea.mjs +1 -1
  172. package/dist/Components/NcTextField.cjs +1 -1
  173. package/dist/Components/NcTextField.mjs +1 -1
  174. package/dist/Components/NcThemeProvider.cjs +1 -1
  175. package/dist/Components/NcThemeProvider.mjs +1 -1
  176. package/dist/Components/NcTimezonePicker.cjs +1 -1
  177. package/dist/Components/NcTimezonePicker.mjs +1 -1
  178. package/dist/Components/NcUserBubble.cjs +1 -1
  179. package/dist/Components/NcUserBubble.mjs +1 -1
  180. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  181. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  182. package/dist/Components/NcVNodes.cjs +1 -2
  183. package/dist/Components/NcVNodes.cjs.map +1 -1
  184. package/dist/Components/NcVNodes.mjs +1 -2
  185. package/dist/Components/NcVNodes.mjs.map +1 -1
  186. package/dist/Composables/useFormatDateTime.cjs +12 -27
  187. package/dist/Composables/useFormatDateTime.cjs.map +1 -1
  188. package/dist/Composables/useFormatDateTime.mjs +12 -27
  189. package/dist/Composables/useFormatDateTime.mjs.map +1 -1
  190. package/dist/Composables/useHotKey.cjs +1 -2
  191. package/dist/Composables/useHotKey.cjs.map +1 -1
  192. package/dist/Composables/useHotKey.mjs +1 -2
  193. package/dist/Composables/useHotKey.mjs.map +1 -1
  194. package/dist/Composables/useIsDarkTheme.cjs +2 -5
  195. package/dist/Composables/useIsDarkTheme.cjs.map +1 -1
  196. package/dist/Composables/useIsDarkTheme.mjs +2 -5
  197. package/dist/Composables/useIsDarkTheme.mjs.map +1 -1
  198. package/dist/Directives/Linkify.cjs +1 -2
  199. package/dist/Directives/Linkify.cjs.map +1 -1
  200. package/dist/Directives/Linkify.mjs +1 -2
  201. package/dist/Directives/Linkify.mjs.map +1 -1
  202. package/dist/Functions/contactsMenu.cjs +2 -3
  203. package/dist/Functions/contactsMenu.cjs.map +1 -1
  204. package/dist/Functions/contactsMenu.mjs +2 -3
  205. package/dist/Functions/contactsMenu.mjs.map +1 -1
  206. package/dist/Functions/dialog.cjs +5 -20
  207. package/dist/Functions/dialog.cjs.map +1 -1
  208. package/dist/Functions/dialog.mjs +5 -20
  209. package/dist/Functions/dialog.mjs.map +1 -1
  210. package/dist/Functions/emoji.cjs +1 -1
  211. package/dist/Functions/emoji.mjs +1 -1
  212. package/dist/Functions/reference.cjs +2 -2
  213. package/dist/Functions/reference.mjs +2 -2
  214. package/dist/Functions/registerReference.cjs +1 -1
  215. package/dist/Functions/registerReference.mjs +1 -1
  216. package/dist/Functions/usernameToColor.cjs +1 -1
  217. package/dist/Functions/usernameToColor.mjs +1 -1
  218. package/dist/Mixins/richEditor.cjs +1 -1
  219. package/dist/Mixins/richEditor.mjs +1 -1
  220. package/dist/assets/{NcActionButton-DwJihiLc.css → NcActionButton-CG4V9b5b.css} +18 -18
  221. package/dist/assets/{NcActionCheckbox-DvdNISIs.css → NcActionCheckbox-C8I_k6NA.css} +12 -12
  222. package/dist/assets/{NcActionInput-DsGwr3wt.css → NcActionInput-BvPYSqDP.css} +65 -65
  223. package/dist/assets/{NcActionLink-7Wp6P-Nk.css → NcActionLink-BtpJIbvI.css} +13 -13
  224. package/dist/assets/{NcActionRadio-CLsR2Ore.css → NcActionRadio-CLIRNp3t.css} +12 -12
  225. package/dist/assets/{NcActionRouter-ByijfQtF.css → NcActionRouter-Bpv5Ywxq.css} +16 -16
  226. package/dist/assets/{NcActionText-CR_yvwWo.css → NcActionText-IMOkntPi.css} +18 -18
  227. package/dist/assets/{NcActionTextEditable-CCWTiT5c.css → NcActionTextEditable-BCmDMuUg.css} +65 -65
  228. package/dist/assets/{NcAppContent-BpjG38I8.css → NcAppContent-Ri_iNfn5.css} +4 -4
  229. package/dist/assets/{NcAppNavigationItem-UaB3qdsS.css → NcAppNavigationItem-DSL2nLRf.css} +36 -36
  230. package/dist/assets/{NcAppNavigationNewItem-Cjbn5XkO.css → NcAppNavigationNewItem-CYSjj3pD.css} +38 -38
  231. package/dist/assets/NcAppNavigationSettings-2Wh1E3Hq.css +53 -0
  232. package/dist/assets/{NcAppSettingsDialog-DH3DIIwL.css → NcAppSettingsDialog-2axspyf-.css} +10 -10
  233. package/dist/assets/{NcAppSettingsSection-Dq0eTGEp.css → NcAppSettingsSection-CLSVNQzv.css} +3 -3
  234. package/dist/assets/NcAppSettingsSectionShortcuts-BuI-s4kd.css +27 -0
  235. package/dist/assets/{NcChip-Cc17FJEC.css → NcChip-ByvuZS2-.css} +23 -11
  236. package/dist/assets/{NcDateTimePicker-C6sMtYzL.css → NcDateTimePicker-BmMuUpwr.css} +22 -22
  237. package/dist/assets/{NcEmptyContent-xdTcF0yQ.css → NcEmptyContent-CUFc_Dds.css} +9 -9
  238. package/dist/assets/{NcHeaderButton-CeT-dsLr.css → NcHeaderButton-DI-1Gsph.css} +9 -9
  239. package/dist/assets/{NcHeaderMenu-BXb9npZp.css → NcHeaderMenu-BkpmEa3M.css} +13 -13
  240. package/dist/assets/NcHotkey-QklVKSyr.css +44 -0
  241. package/dist/assets/NcHotkeyList-B42a0d8Z.css +9 -0
  242. package/dist/assets/{NcInputField-BI3vWgSo.css → NcInputField-CtUAgq1i.css} +42 -42
  243. package/dist/assets/{NcRadioGroupButton-6mf16D0h.css → NcRadioGroupButton-qxDfssOp.css} +13 -13
  244. package/dist/assets/{NcRichContenteditable-Ds_cptgr.css → NcRichContenteditable-CO5ziuZO.css} +12 -12
  245. package/dist/assets/{NcRichText-CVy4zTPr.css → NcRichText-BpXupu1n.css} +86 -87
  246. package/dist/chunks/{NcActionButton-CZsSFAT4.mjs → NcActionButton-CD1Z-o2Y.mjs} +6 -6
  247. package/dist/chunks/{NcActionButton-CZsSFAT4.mjs.map → NcActionButton-CD1Z-o2Y.mjs.map} +1 -1
  248. package/dist/chunks/{NcActionButton-lJ0IA3IS.cjs → NcActionButton-DSq_luox.cjs} +6 -6
  249. package/dist/chunks/{NcActionButton-lJ0IA3IS.cjs.map → NcActionButton-DSq_luox.cjs.map} +1 -1
  250. package/dist/chunks/{NcActionButtonGroup-CIvAeDpU.mjs → NcActionButtonGroup-Bd-SOAHU.mjs} +3 -3
  251. package/dist/chunks/{NcActionButtonGroup-CIvAeDpU.mjs.map → NcActionButtonGroup-Bd-SOAHU.mjs.map} +1 -1
  252. package/dist/chunks/{NcActionButtonGroup-CQZL14Nz.cjs → NcActionButtonGroup-DKVCsZhH.cjs} +3 -3
  253. package/dist/chunks/{NcActionButtonGroup-CQZL14Nz.cjs.map → NcActionButtonGroup-DKVCsZhH.cjs.map} +1 -1
  254. package/dist/chunks/{NcActionCheckbox-BAuN4ZMC.mjs → NcActionCheckbox-D9aQuEYw.mjs} +4 -4
  255. package/dist/chunks/{NcActionCheckbox-BAuN4ZMC.mjs.map → NcActionCheckbox-D9aQuEYw.mjs.map} +1 -1
  256. package/dist/chunks/{NcActionCheckbox-BvMmq0jL.cjs → NcActionCheckbox-ixZtnZR4.cjs} +4 -4
  257. package/dist/chunks/{NcActionCheckbox-BvMmq0jL.cjs.map → NcActionCheckbox-ixZtnZR4.cjs.map} +1 -1
  258. package/dist/chunks/{NcActionInput-DfjLV0Gg.cjs → NcActionInput-BMUreHhp.cjs} +10 -10
  259. package/dist/chunks/{NcActionInput-DfjLV0Gg.cjs.map → NcActionInput-BMUreHhp.cjs.map} +1 -1
  260. package/dist/chunks/{NcActionInput-CfznemNH.mjs → NcActionInput-D4MLI-0P.mjs} +10 -10
  261. package/dist/chunks/{NcActionInput-CfznemNH.mjs.map → NcActionInput-D4MLI-0P.mjs.map} +1 -1
  262. package/dist/chunks/{NcActionRadio-Bg5VuF7I.mjs → NcActionRadio-BmVR-lhZ.mjs} +4 -4
  263. package/dist/chunks/{NcActionRadio-CBh6AlC4.cjs.map → NcActionRadio-BmVR-lhZ.mjs.map} +1 -1
  264. package/dist/chunks/{NcActionRadio-CBh6AlC4.cjs → NcActionRadio-DPF0_wH9.cjs} +4 -4
  265. package/dist/chunks/{NcActionRadio-Bg5VuF7I.mjs.map → NcActionRadio-DPF0_wH9.cjs.map} +1 -1
  266. package/dist/chunks/{NcActionTextEditable-CSP4OjpU.mjs → NcActionTextEditable-5mNFl7Jm.mjs} +7 -7
  267. package/dist/chunks/{NcActionTextEditable-CSP4OjpU.mjs.map → NcActionTextEditable-5mNFl7Jm.mjs.map} +1 -1
  268. package/dist/chunks/{NcActionTextEditable-BhucWrOO.cjs → NcActionTextEditable-C8B1qqqe.cjs} +7 -7
  269. package/dist/chunks/NcActionTextEditable-C8B1qqqe.cjs.map +1 -0
  270. package/dist/chunks/{NcActions-A918mfXE.mjs → NcActions-BvFVkIzX.mjs} +64 -82
  271. package/dist/chunks/{NcActions-A918mfXE.mjs.map → NcActions-BvFVkIzX.mjs.map} +1 -1
  272. package/dist/chunks/{NcActions-D3N_As6c.cjs → NcActions-CF9VxHHD.cjs} +64 -82
  273. package/dist/chunks/{NcActions-D3N_As6c.cjs.map → NcActions-CF9VxHHD.cjs.map} +1 -1
  274. package/dist/chunks/{NcAppContent-CCyPMvUa.cjs → NcAppContent-BSyhjn2J.cjs} +23 -24
  275. package/dist/chunks/NcAppContent-BSyhjn2J.cjs.map +1 -0
  276. package/dist/chunks/{NcAppContent-DFlcxER-.mjs → NcAppContent-C7hwN-sU.mjs} +23 -24
  277. package/dist/chunks/NcAppContent-C7hwN-sU.mjs.map +1 -0
  278. package/dist/chunks/{NcAppNavigation-CLF6-i2t.mjs → NcAppNavigation-B2cKVKBH.mjs} +4 -5
  279. package/dist/chunks/{NcAppNavigation-CLF6-i2t.mjs.map → NcAppNavigation-B2cKVKBH.mjs.map} +1 -1
  280. package/dist/chunks/{NcAppNavigation-CCHYn0D6.cjs → NcAppNavigation-DApCpI_F.cjs} +4 -5
  281. package/dist/chunks/{NcAppNavigation-CCHYn0D6.cjs.map → NcAppNavigation-DApCpI_F.cjs.map} +1 -1
  282. package/dist/chunks/{NcAppNavigationCaption-DhW300oH.cjs → NcAppNavigationCaption-BOHmVyQb.cjs} +3 -3
  283. package/dist/chunks/{NcAppNavigationCaption-DhW300oH.cjs.map → NcAppNavigationCaption-BOHmVyQb.cjs.map} +1 -1
  284. package/dist/chunks/{NcAppNavigationCaption-CsG8P-1P.mjs → NcAppNavigationCaption-bTauZtcw.mjs} +3 -3
  285. package/dist/chunks/{NcAppNavigationCaption-CsG8P-1P.mjs.map → NcAppNavigationCaption-bTauZtcw.mjs.map} +1 -1
  286. package/dist/chunks/{NcAppNavigationItem-HZVy5JEa.cjs → NcAppNavigationItem-DbtR6u7Y.cjs} +10 -10
  287. package/dist/chunks/{NcAppNavigationItem-CwuKVEUN.mjs.map → NcAppNavigationItem-DbtR6u7Y.cjs.map} +1 -1
  288. package/dist/chunks/{NcAppNavigationItem-CwuKVEUN.mjs → NcAppNavigationItem-geCwhCsd.mjs} +10 -10
  289. package/dist/chunks/{NcAppNavigationItem-HZVy5JEa.cjs.map → NcAppNavigationItem-geCwhCsd.mjs.map} +1 -1
  290. package/dist/chunks/{NcAppNavigationNew-DbqusDUV.mjs → NcAppNavigationNew-BHzvRlVc.mjs} +2 -2
  291. package/dist/chunks/{NcAppNavigationNew-DbqusDUV.mjs.map → NcAppNavigationNew-BHzvRlVc.mjs.map} +1 -1
  292. package/dist/chunks/{NcAppNavigationNew-T56pahiu.cjs → NcAppNavigationNew-BYvFykgl.cjs} +2 -2
  293. package/dist/chunks/{NcAppNavigationNew-T56pahiu.cjs.map → NcAppNavigationNew-BYvFykgl.cjs.map} +1 -1
  294. package/dist/chunks/{NcAppNavigationNewItem-DMRZwa_y.cjs → NcAppNavigationNewItem-Dqnwa8Gl.cjs} +4 -4
  295. package/dist/chunks/{NcAppNavigationNewItem-DMRZwa_y.cjs.map → NcAppNavigationNewItem-Dqnwa8Gl.cjs.map} +1 -1
  296. package/dist/chunks/{NcAppNavigationNewItem-BsnZWCLW.mjs → NcAppNavigationNewItem-Yy56yPrn.mjs} +4 -4
  297. package/dist/chunks/{NcAppNavigationNewItem-BsnZWCLW.mjs.map → NcAppNavigationNewItem-Yy56yPrn.mjs.map} +1 -1
  298. package/dist/chunks/{NcAppNavigationSearch-DCMN2cWp.mjs → NcAppNavigationSearch-WfL4IPD8.mjs} +6 -10
  299. package/dist/chunks/{NcAppNavigationSearch-DCMN2cWp.mjs.map → NcAppNavigationSearch-WfL4IPD8.mjs.map} +1 -1
  300. package/dist/chunks/{NcAppNavigationSearch-BlG1xMok.cjs → NcAppNavigationSearch-pMlFjm9w.cjs} +6 -10
  301. package/dist/chunks/{NcAppNavigationSearch-BlG1xMok.cjs.map → NcAppNavigationSearch-pMlFjm9w.cjs.map} +1 -1
  302. package/dist/chunks/{NcAppNavigationSettings-n8OaxTbE.mjs → NcAppNavigationSettings-BhK7vlfP.mjs} +17 -11
  303. package/dist/chunks/NcAppNavigationSettings-BhK7vlfP.mjs.map +1 -0
  304. package/dist/chunks/{NcAppNavigationSettings-DlIDzhxh.cjs → NcAppNavigationSettings-C6qjJ3hF.cjs} +17 -11
  305. package/dist/chunks/NcAppNavigationSettings-C6qjJ3hF.cjs.map +1 -0
  306. package/dist/chunks/{NcAppNavigationToggle-Cn1UvxNP.cjs → NcAppNavigationToggle-8lSuagjd.cjs} +13 -14
  307. package/dist/chunks/{NcAppNavigationToggle-Cn1UvxNP.cjs.map → NcAppNavigationToggle-8lSuagjd.cjs.map} +1 -1
  308. package/dist/chunks/{NcAppNavigationToggle-ClYKr8Zn.mjs → NcAppNavigationToggle-DlnxjlcH.mjs} +13 -14
  309. package/dist/chunks/{NcAppNavigationToggle-ClYKr8Zn.mjs.map → NcAppNavigationToggle-DlnxjlcH.mjs.map} +1 -1
  310. package/dist/chunks/{NcAppSettingsDialog-R6Y-tl6d.cjs → NcAppSettingsDialog--RlMIfbo.cjs} +26 -28
  311. package/dist/chunks/NcAppSettingsDialog--RlMIfbo.cjs.map +1 -0
  312. package/dist/chunks/{NcAppSettingsDialog-Cpjr8Tca.mjs → NcAppSettingsDialog-8YaW7ud3.mjs} +27 -29
  313. package/dist/chunks/NcAppSettingsDialog-8YaW7ud3.mjs.map +1 -0
  314. package/dist/chunks/NcAppSettingsSection-DVrBPuLD.mjs +53 -0
  315. package/dist/chunks/NcAppSettingsSection-DVrBPuLD.mjs.map +1 -0
  316. package/dist/chunks/NcAppSettingsSection-OPWPqi2Y.cjs +52 -0
  317. package/dist/chunks/NcAppSettingsSection-OPWPqi2Y.cjs.map +1 -0
  318. package/dist/chunks/NcAppSettingsSectionShortcuts-CBYgfYGz.cjs +42 -0
  319. package/dist/chunks/NcAppSettingsSectionShortcuts-CBYgfYGz.cjs.map +1 -0
  320. package/dist/chunks/NcAppSettingsSectionShortcuts-CdP-4ktS.mjs +43 -0
  321. package/dist/chunks/NcAppSettingsSectionShortcuts-CdP-4ktS.mjs.map +1 -0
  322. package/dist/chunks/{NcAppSidebar-Ddt82bsA.cjs → NcAppSidebar-DLb6ALHL.cjs} +15 -18
  323. package/dist/chunks/{NcAppSidebar-Ddt82bsA.cjs.map → NcAppSidebar-DLb6ALHL.cjs.map} +1 -1
  324. package/dist/chunks/{NcAppSidebar-CVcOP4bk.mjs → NcAppSidebar-f7tuofzM.mjs} +15 -18
  325. package/dist/chunks/{NcAppSidebar-CVcOP4bk.mjs.map → NcAppSidebar-f7tuofzM.mjs.map} +1 -1
  326. package/dist/chunks/{NcAssistantButton-WQvWhoAr.cjs → NcAssistantButton-BMzPE7WA.cjs} +4 -4
  327. package/dist/chunks/{NcAssistantButton-WQvWhoAr.cjs.map → NcAssistantButton-BMzPE7WA.cjs.map} +1 -1
  328. package/dist/chunks/{NcAssistantButton-lDdWOemf.mjs → NcAssistantButton-enexPvoC.mjs} +4 -4
  329. package/dist/chunks/{NcAssistantButton-lDdWOemf.mjs.map → NcAssistantButton-enexPvoC.mjs.map} +1 -1
  330. package/dist/chunks/{NcAssistantIcon-RDQ8YhZE.cjs → NcAssistantIcon-DfVd2zWt.cjs} +4 -4
  331. package/dist/chunks/{NcAssistantIcon-RDQ8YhZE.cjs.map → NcAssistantIcon-DfVd2zWt.cjs.map} +1 -1
  332. package/dist/chunks/{NcAssistantIcon-BTjYuSQ9.mjs → NcAssistantIcon-XwQFzBgA.mjs} +4 -4
  333. package/dist/chunks/{NcAssistantIcon-BTjYuSQ9.mjs.map → NcAssistantIcon-XwQFzBgA.mjs.map} +1 -1
  334. package/dist/chunks/{NcAvatar-D_0Aw88L.cjs → NcAvatar-BwioPrbY.cjs} +23 -25
  335. package/dist/chunks/{NcAvatar-D_0Aw88L.cjs.map → NcAvatar-BwioPrbY.cjs.map} +1 -1
  336. package/dist/chunks/{NcAvatar-Cupl4prm.mjs → NcAvatar-DwUmx6Fg.mjs} +23 -25
  337. package/dist/chunks/{NcAvatar-Cupl4prm.mjs.map → NcAvatar-DwUmx6Fg.mjs.map} +1 -1
  338. package/dist/chunks/{NcBreadcrumb-FbePEaGS.cjs → NcBreadcrumb-B-zWjBNp.cjs} +6 -22
  339. package/dist/chunks/{NcBreadcrumb-FbePEaGS.cjs.map → NcBreadcrumb-B-zWjBNp.cjs.map} +1 -1
  340. package/dist/chunks/{NcBreadcrumb-VJGW992x.mjs → NcBreadcrumb-ljdZbX7p.mjs} +6 -22
  341. package/dist/chunks/{NcBreadcrumb-VJGW992x.mjs.map → NcBreadcrumb-ljdZbX7p.mjs.map} +1 -1
  342. package/dist/chunks/{NcBreadcrumbs-CrNBCyUa.cjs → NcBreadcrumbs-B6tPEu9b.cjs} +29 -47
  343. package/dist/chunks/{NcBreadcrumbs-DJSAcn8x.mjs.map → NcBreadcrumbs-B6tPEu9b.cjs.map} +1 -1
  344. package/dist/chunks/{NcBreadcrumbs-DJSAcn8x.mjs → NcBreadcrumbs-D2DtX3XC.mjs} +29 -47
  345. package/dist/chunks/{NcBreadcrumbs-CrNBCyUa.cjs.map → NcBreadcrumbs-D2DtX3XC.mjs.map} +1 -1
  346. package/dist/chunks/{NcButton-DK7bNZIL.cjs → NcButton-CJBZrdiL.cjs} +18 -33
  347. package/dist/chunks/{NcButton-D3CaJu1f.mjs.map → NcButton-CJBZrdiL.cjs.map} +1 -1
  348. package/dist/chunks/{NcButton-D3CaJu1f.mjs → NcButton-DUZTtFhr.mjs} +18 -33
  349. package/dist/chunks/{NcButton-DK7bNZIL.cjs.map → NcButton-DUZTtFhr.mjs.map} +1 -1
  350. package/dist/chunks/{NcCheckboxRadioSwitch-ezquUuPz.mjs → NcCheckboxRadioSwitch-NPJuwzqS.mjs} +8 -8
  351. package/dist/chunks/{NcCheckboxRadioSwitch-ezquUuPz.mjs.map → NcCheckboxRadioSwitch-NPJuwzqS.mjs.map} +1 -1
  352. package/dist/chunks/{NcCheckboxRadioSwitch-CDFUoj2J.cjs → NcCheckboxRadioSwitch-wSD3hWxs.cjs} +8 -8
  353. package/dist/chunks/{NcCheckboxRadioSwitch-CDFUoj2J.cjs.map → NcCheckboxRadioSwitch-wSD3hWxs.cjs.map} +1 -1
  354. package/dist/chunks/{NcCollectionList-zAI6Ysc0.cjs → NcCollectionList-Br6V_EiM.cjs} +7 -8
  355. package/dist/chunks/{NcCollectionList-zAI6Ysc0.cjs.map → NcCollectionList-Br6V_EiM.cjs.map} +1 -1
  356. package/dist/chunks/{NcCollectionList-w-7M5HGN.mjs → NcCollectionList-D85QdobI.mjs} +7 -8
  357. package/dist/chunks/{NcCollectionList-w-7M5HGN.mjs.map → NcCollectionList-D85QdobI.mjs.map} +1 -1
  358. package/dist/chunks/{NcColorPicker-DpLU-oKM.mjs → NcColorPicker-BoS26yac.mjs} +15 -35
  359. package/dist/chunks/{NcColorPicker-DpLU-oKM.mjs.map → NcColorPicker-BoS26yac.mjs.map} +1 -1
  360. package/dist/chunks/{NcColorPicker-F-UP8OaJ.cjs → NcColorPicker-Dg3d5_aQ.cjs} +15 -35
  361. package/dist/chunks/{NcColorPicker-F-UP8OaJ.cjs.map → NcColorPicker-Dg3d5_aQ.cjs.map} +1 -1
  362. package/dist/chunks/{NcContent-DITvuNbF.cjs → NcContent-BbPae-OV.cjs} +5 -5
  363. package/dist/chunks/{NcContent-DITvuNbF.cjs.map → NcContent-BbPae-OV.cjs.map} +1 -1
  364. package/dist/chunks/{NcContent-C0_AA_wt.mjs → NcContent-D8OFKv52.mjs} +5 -5
  365. package/dist/chunks/{NcContent-C0_AA_wt.mjs.map → NcContent-D8OFKv52.mjs.map} +1 -1
  366. package/dist/chunks/{NcCounterBubble-B_H3NCef.cjs → NcCounterBubble-hyvazclA.cjs} +4 -6
  367. package/dist/chunks/{NcCounterBubble-B_H3NCef.cjs.map → NcCounterBubble-hyvazclA.cjs.map} +1 -1
  368. package/dist/chunks/{NcCounterBubble-BKPpoBiy.mjs → NcCounterBubble-oxV8oMlX.mjs} +4 -6
  369. package/dist/chunks/{NcCounterBubble-BKPpoBiy.mjs.map → NcCounterBubble-oxV8oMlX.mjs.map} +1 -1
  370. package/dist/chunks/{NcDashboardWidget-CEL-DhKX.mjs → NcDashboardWidget-SSlGHcII.mjs} +5 -5
  371. package/dist/chunks/{NcDashboardWidget-CEL-DhKX.mjs.map → NcDashboardWidget-SSlGHcII.mjs.map} +1 -1
  372. package/dist/chunks/{NcDashboardWidget--n1nzfhg.cjs → NcDashboardWidget-mEPmvuR0.cjs} +5 -5
  373. package/dist/chunks/{NcDashboardWidget--n1nzfhg.cjs.map → NcDashboardWidget-mEPmvuR0.cjs.map} +1 -1
  374. package/dist/chunks/{NcDashboardWidgetItem-DeQtScn8.mjs → NcDashboardWidgetItem-BqlNJI6a.mjs} +4 -4
  375. package/dist/chunks/{NcDashboardWidgetItem-DeQtScn8.mjs.map → NcDashboardWidgetItem-BqlNJI6a.mjs.map} +1 -1
  376. package/dist/chunks/{NcDashboardWidgetItem-loanO02A.cjs → NcDashboardWidgetItem-C7AmqxH4.cjs} +4 -4
  377. package/dist/chunks/{NcDashboardWidgetItem-loanO02A.cjs.map → NcDashboardWidgetItem-C7AmqxH4.cjs.map} +1 -1
  378. package/dist/chunks/{NcDialog-BM_wTqUn.mjs → NcDialog-Bg0hY6TP.mjs} +3 -3
  379. package/dist/chunks/{NcDialog-BM_wTqUn.mjs.map → NcDialog-Bg0hY6TP.mjs.map} +1 -1
  380. package/dist/chunks/{NcDialog-CG2sufkb.cjs → NcDialog-D020rlVy.cjs} +3 -3
  381. package/dist/chunks/{NcDialog-CG2sufkb.cjs.map → NcDialog-D020rlVy.cjs.map} +1 -1
  382. package/dist/chunks/{NcDialogButton-DkfxsIhv.cjs → NcDialogButton-8JhFaC5X.cjs} +6 -7
  383. package/dist/chunks/{NcDialogButton-DkfxsIhv.cjs.map → NcDialogButton-8JhFaC5X.cjs.map} +1 -1
  384. package/dist/chunks/{NcDialogButton-Cr0wVMne.mjs → NcDialogButton-DSrC6lFd.mjs} +6 -7
  385. package/dist/chunks/{NcDialogButton-Cr0wVMne.mjs.map → NcDialogButton-DSrC6lFd.mjs.map} +1 -1
  386. package/dist/chunks/{NcEmojiPicker-BV_iVlIv.mjs → NcEmojiPicker-CAphjgaf.mjs} +12 -13
  387. package/dist/chunks/{NcEmojiPicker-BV_iVlIv.mjs.map → NcEmojiPicker-CAphjgaf.mjs.map} +1 -1
  388. package/dist/chunks/{NcEmojiPicker-fgsuVz7X.cjs → NcEmojiPicker-DwXhWYHY.cjs} +12 -13
  389. package/dist/chunks/{NcEmojiPicker-fgsuVz7X.cjs.map → NcEmojiPicker-DwXhWYHY.cjs.map} +1 -1
  390. package/dist/chunks/{NcHeaderButton-CNQVz4QP.cjs → NcHeaderButton-6kuTEKbj.cjs} +4 -4
  391. package/dist/chunks/{NcHeaderButton-CNQVz4QP.cjs.map → NcHeaderButton-6kuTEKbj.cjs.map} +1 -1
  392. package/dist/chunks/{NcHeaderButton-TJML067P.mjs → NcHeaderButton-TgPjfPtk.mjs} +4 -4
  393. package/dist/chunks/{NcHeaderButton-TJML067P.mjs.map → NcHeaderButton-TgPjfPtk.mjs.map} +1 -1
  394. package/dist/chunks/{NcHeaderMenu-BzyFhg55.cjs → NcHeaderMenu-CwjH_j0c.cjs} +10 -12
  395. package/dist/chunks/{NcHeaderMenu-D5ddiKnF.mjs.map → NcHeaderMenu-CwjH_j0c.cjs.map} +1 -1
  396. package/dist/chunks/{NcHeaderMenu-D5ddiKnF.mjs → NcHeaderMenu-Hk8OTuma.mjs} +10 -12
  397. package/dist/chunks/{NcHeaderMenu-BzyFhg55.cjs.map → NcHeaderMenu-Hk8OTuma.mjs.map} +1 -1
  398. package/dist/chunks/NcHotkey-BVMf1V89.mjs +60 -0
  399. package/dist/chunks/NcHotkey-BVMf1V89.mjs.map +1 -0
  400. package/dist/chunks/NcHotkey-CUPH5u09.cjs +59 -0
  401. package/dist/chunks/NcHotkey-CUPH5u09.cjs.map +1 -0
  402. package/dist/chunks/NcHotkeyList-CUjp1-hr.cjs +47 -0
  403. package/dist/chunks/NcHotkeyList-CUjp1-hr.cjs.map +1 -0
  404. package/dist/chunks/NcHotkeyList-jfSroQAQ.mjs +48 -0
  405. package/dist/chunks/NcHotkeyList-jfSroQAQ.mjs.map +1 -0
  406. package/dist/chunks/{NcIconSvgWrapper-BCVwmZN2.mjs → NcIconSvgWrapper-BreCg8pX.mjs} +2 -2
  407. package/dist/chunks/{NcIconSvgWrapper-BCVwmZN2.mjs.map → NcIconSvgWrapper-BreCg8pX.mjs.map} +1 -1
  408. package/dist/chunks/{NcIconSvgWrapper-DoVPfeNg.cjs → NcIconSvgWrapper-D-aKMbf3.cjs} +2 -2
  409. package/dist/chunks/{NcIconSvgWrapper-DoVPfeNg.cjs.map → NcIconSvgWrapper-D-aKMbf3.cjs.map} +1 -1
  410. package/dist/chunks/{NcInputConfirmCancel-DVVTaxWi.cjs → NcInputConfirmCancel-Bk_FQ5aA.cjs} +3 -3
  411. package/dist/chunks/{NcInputConfirmCancel-DVVTaxWi.cjs.map → NcInputConfirmCancel-Bk_FQ5aA.cjs.map} +1 -1
  412. package/dist/chunks/{NcInputConfirmCancel-C8WnMK2V.mjs → NcInputConfirmCancel-XPlRewAN.mjs} +3 -3
  413. package/dist/chunks/{NcInputConfirmCancel-C8WnMK2V.mjs.map → NcInputConfirmCancel-XPlRewAN.mjs.map} +1 -1
  414. package/dist/chunks/{NcInputField-LBv3nCrt.cjs → NcInputField-DAllLk3X.cjs} +12 -16
  415. package/dist/chunks/NcInputField-DAllLk3X.cjs.map +1 -0
  416. package/dist/chunks/{NcInputField-1ujONIvp.mjs → NcInputField-DUtDY_1I.mjs} +12 -16
  417. package/dist/chunks/NcInputField-DUtDY_1I.mjs.map +1 -0
  418. package/dist/chunks/NcKbd-BdW5UbhW.mjs +66 -0
  419. package/dist/chunks/NcKbd-BdW5UbhW.mjs.map +1 -0
  420. package/dist/chunks/NcKbd-CVBh8nyU.cjs +65 -0
  421. package/dist/chunks/NcKbd-CVBh8nyU.cjs.map +1 -0
  422. package/dist/chunks/{NcListItem-DFEvD1TA.cjs → NcListItem-D3HiK7ra.cjs} +7 -9
  423. package/dist/chunks/{NcListItem-DFEvD1TA.cjs.map → NcListItem-D3HiK7ra.cjs.map} +1 -1
  424. package/dist/chunks/{NcListItem-DNMfT12A.mjs → NcListItem-YVemqwZ_.mjs} +7 -9
  425. package/dist/chunks/{NcListItem-DNMfT12A.mjs.map → NcListItem-YVemqwZ_.mjs.map} +1 -1
  426. package/dist/chunks/{NcListItemIcon-PNp6Wael.mjs → NcListItemIcon-BKwmcXnO.mjs} +5 -6
  427. package/dist/chunks/{NcListItemIcon-PNp6Wael.mjs.map → NcListItemIcon-BKwmcXnO.mjs.map} +1 -1
  428. package/dist/chunks/{NcListItemIcon-OzD38-2R.cjs → NcListItemIcon-DL1VwHvL.cjs} +5 -6
  429. package/dist/chunks/{NcListItemIcon-OzD38-2R.cjs.map → NcListItemIcon-DL1VwHvL.cjs.map} +1 -1
  430. package/dist/chunks/{NcPasswordField-lqTDeja4.cjs → NcPasswordField-BeEYmL5N.cjs} +16 -29
  431. package/dist/chunks/{NcPasswordField-lqTDeja4.cjs.map → NcPasswordField-BeEYmL5N.cjs.map} +1 -1
  432. package/dist/chunks/{NcPasswordField-D2iDTTpp.mjs → NcPasswordField-CujpFQHq.mjs} +16 -29
  433. package/dist/chunks/{NcPasswordField-D2iDTTpp.mjs.map → NcPasswordField-CujpFQHq.mjs.map} +1 -1
  434. package/dist/chunks/{NcPopover-DrXnNOgM.cjs → NcPopover-BgUZkmjk.cjs} +8 -12
  435. package/dist/chunks/{NcPopover-nzbq2IjT.mjs.map → NcPopover-BgUZkmjk.cjs.map} +1 -1
  436. package/dist/chunks/{NcPopover-nzbq2IjT.mjs → NcPopover-gxcAqoEb.mjs} +8 -12
  437. package/dist/chunks/{NcPopover-DrXnNOgM.cjs.map → NcPopover-gxcAqoEb.mjs.map} +1 -1
  438. package/dist/chunks/{NcProgressBar-BwnuvxiZ.mjs → NcProgressBar-D7zYeXBH.mjs} +2 -2
  439. package/dist/chunks/{NcProgressBar-BwnuvxiZ.mjs.map → NcProgressBar-D7zYeXBH.mjs.map} +1 -1
  440. package/dist/chunks/{NcProgressBar-D10gQgAY.cjs → NcProgressBar-DvxA9bq5.cjs} +2 -2
  441. package/dist/chunks/{NcProgressBar-D10gQgAY.cjs.map → NcProgressBar-DvxA9bq5.cjs.map} +1 -1
  442. package/dist/chunks/{NcRadioGroup-DsnIVQZJ.cjs → NcRadioGroup-BZ-humrK.cjs} +5 -23
  443. package/dist/chunks/{NcRadioGroup-sZaH_3Y0.mjs.map → NcRadioGroup-BZ-humrK.cjs.map} +1 -1
  444. package/dist/chunks/{NcRadioGroup-sZaH_3Y0.mjs → NcRadioGroup-VKZJ0Vnh.mjs} +5 -23
  445. package/dist/chunks/{NcRadioGroup-DsnIVQZJ.cjs.map → NcRadioGroup-VKZJ0Vnh.mjs.map} +1 -1
  446. package/dist/chunks/{NcRadioGroupButton-B6m10k9G.mjs → NcRadioGroupButton-CD4tkF_s.mjs} +9 -9
  447. package/dist/chunks/{NcRadioGroupButton-B6m10k9G.mjs.map → NcRadioGroupButton-CD4tkF_s.mjs.map} +1 -1
  448. package/dist/chunks/{NcRadioGroupButton-CDf_01-t.cjs → NcRadioGroupButton-DrqgN-8C.cjs} +9 -9
  449. package/dist/chunks/{NcRadioGroupButton-CDf_01-t.cjs.map → NcRadioGroupButton-DrqgN-8C.cjs.map} +1 -1
  450. package/dist/chunks/{NcRelatedResourcesPanel-Q6jZk-Pm.mjs → NcRelatedResourcesPanel-BTyqVb_E.mjs} +35 -44
  451. package/dist/chunks/{NcRelatedResourcesPanel-Q6jZk-Pm.mjs.map → NcRelatedResourcesPanel-BTyqVb_E.mjs.map} +1 -1
  452. package/dist/chunks/{NcRelatedResourcesPanel-bfv-6W_Z.cjs → NcRelatedResourcesPanel-CO6jajKF.cjs} +35 -44
  453. package/dist/chunks/{NcRelatedResourcesPanel-bfv-6W_Z.cjs.map → NcRelatedResourcesPanel-CO6jajKF.cjs.map} +1 -1
  454. package/dist/chunks/{NcRichContenteditable-8_poOeSx.mjs → NcRichContenteditable-BivvoSO5.mjs} +32 -54
  455. package/dist/chunks/{NcRichContenteditable-8_poOeSx.mjs.map → NcRichContenteditable-BivvoSO5.mjs.map} +1 -1
  456. package/dist/chunks/{NcRichContenteditable-CtLNSs0S.cjs → NcRichContenteditable-BjxmdpS0.cjs} +32 -54
  457. package/dist/chunks/{NcRichContenteditable-CtLNSs0S.cjs.map → NcRichContenteditable-BjxmdpS0.cjs.map} +1 -1
  458. package/dist/chunks/{NcRichText-CEsiozf5.cjs → NcRichText-DoQg3Lha.cjs} +120 -111
  459. package/dist/chunks/{NcRichText-CEsiozf5.cjs.map → NcRichText-DoQg3Lha.cjs.map} +1 -1
  460. package/dist/chunks/{NcRichText-Dnx5x9WS.mjs → NcRichText-Dy5By94Y.mjs} +120 -113
  461. package/dist/chunks/{NcRichText-Dnx5x9WS.mjs.map → NcRichText-Dy5By94Y.mjs.map} +1 -1
  462. package/dist/chunks/{NcSelect-bo6wla87.cjs → NcSelect-Bw8EG_xU.cjs} +25 -42
  463. package/dist/chunks/{NcSelect-bo6wla87.cjs.map → NcSelect-Bw8EG_xU.cjs.map} +1 -1
  464. package/dist/chunks/{NcSelect-TjZw7TJ_.mjs → NcSelect-QVd6uJPA.mjs} +25 -42
  465. package/dist/chunks/{NcSelect-TjZw7TJ_.mjs.map → NcSelect-QVd6uJPA.mjs.map} +1 -1
  466. package/dist/chunks/{NcSelectTags-CytnLDOw.mjs → NcSelectTags-D-22teKJ.mjs} +28 -49
  467. package/dist/chunks/{NcSelectTags-D2OSaAfO.cjs.map → NcSelectTags-D-22teKJ.mjs.map} +1 -1
  468. package/dist/chunks/{NcSelectTags-D2OSaAfO.cjs → NcSelectTags-aGwTgIM-.cjs} +28 -49
  469. package/dist/chunks/{NcSelectTags-CytnLDOw.mjs.map → NcSelectTags-aGwTgIM-.cjs.map} +1 -1
  470. package/dist/chunks/{NcSelectUsers-Bm0877Tm.mjs → NcSelectUsers-DR6-q1aK.mjs} +7 -8
  471. package/dist/chunks/{NcSelectUsers-Bm0877Tm.mjs.map → NcSelectUsers-DR6-q1aK.mjs.map} +1 -1
  472. package/dist/chunks/{NcSelectUsers-wcRyExkC.cjs → NcSelectUsers-Qhrizan5.cjs} +7 -8
  473. package/dist/chunks/{NcSelectUsers-wcRyExkC.cjs.map → NcSelectUsers-Qhrizan5.cjs.map} +1 -1
  474. package/dist/chunks/{NcSettingsInputText-DaFMiOS6.cjs → NcSettingsInputText-O8870Grr.cjs} +4 -4
  475. package/dist/chunks/{NcSettingsInputText-DaFMiOS6.cjs.map → NcSettingsInputText-O8870Grr.cjs.map} +1 -1
  476. package/dist/chunks/{NcSettingsInputText-DPAtsY2T.mjs → NcSettingsInputText-Q8DDr-Yj.mjs} +4 -4
  477. package/dist/chunks/{NcSettingsInputText-DPAtsY2T.mjs.map → NcSettingsInputText-Q8DDr-Yj.mjs.map} +1 -1
  478. package/dist/chunks/{NcSettingsSection-r4NOxKIz.cjs → NcSettingsSection-DKpzo7eI.cjs} +3 -4
  479. package/dist/chunks/{NcSettingsSection-r4NOxKIz.cjs.map → NcSettingsSection-DKpzo7eI.cjs.map} +1 -1
  480. package/dist/chunks/{NcSettingsSection-CX5q924g.mjs → NcSettingsSection-VxcVEF8L.mjs} +3 -4
  481. package/dist/chunks/{NcSettingsSection-CX5q924g.mjs.map → NcSettingsSection-VxcVEF8L.mjs.map} +1 -1
  482. package/dist/chunks/{NcSettingsSelectGroup-DYYAPkgp.cjs → NcSettingsSelectGroup-BQWwtSEb.cjs} +10 -26
  483. package/dist/chunks/{NcSettingsSelectGroup-DYYAPkgp.cjs.map → NcSettingsSelectGroup-BQWwtSEb.cjs.map} +1 -1
  484. package/dist/chunks/{NcSettingsSelectGroup-CR4XLrgs.mjs → NcSettingsSelectGroup-CZ0EjeJb.mjs} +10 -26
  485. package/dist/chunks/{NcSettingsSelectGroup-CR4XLrgs.mjs.map → NcSettingsSelectGroup-CZ0EjeJb.mjs.map} +1 -1
  486. package/dist/chunks/{NcTextArea-If_ygOSv.mjs → NcTextArea-DHmD6-6s.mjs} +5 -5
  487. package/dist/chunks/{NcTextArea-If_ygOSv.mjs.map → NcTextArea-DHmD6-6s.mjs.map} +1 -1
  488. package/dist/chunks/{NcTextArea-iDhGI-Ko.cjs → NcTextArea-DkVtHTpD.cjs} +5 -5
  489. package/dist/chunks/{NcTextArea-iDhGI-Ko.cjs.map → NcTextArea-DkVtHTpD.cjs.map} +1 -1
  490. package/dist/chunks/{NcTextField-OPiMgNR7.cjs → NcTextField-52Fnd27A.cjs} +17 -31
  491. package/dist/chunks/{NcTextField-OPiMgNR7.cjs.map → NcTextField-52Fnd27A.cjs.map} +1 -1
  492. package/dist/chunks/{NcTextField-BE9R1pLt.mjs → NcTextField-CVfixgfj.mjs} +17 -31
  493. package/dist/chunks/{NcTextField-BE9R1pLt.mjs.map → NcTextField-CVfixgfj.mjs.map} +1 -1
  494. package/dist/chunks/{NcThemeProvider-E_S5rhIQ.mjs → NcThemeProvider-25ResoIv.mjs} +2 -2
  495. package/dist/chunks/{NcThemeProvider-E_S5rhIQ.mjs.map → NcThemeProvider-25ResoIv.mjs.map} +1 -1
  496. package/dist/chunks/{NcThemeProvider-DbNRSwkX.cjs → NcThemeProvider-BqGPTeWg.cjs} +2 -2
  497. package/dist/chunks/{NcThemeProvider-DbNRSwkX.cjs.map → NcThemeProvider-BqGPTeWg.cjs.map} +1 -1
  498. package/dist/chunks/{NcTimezonePicker-D4y736xC.mjs → NcTimezonePicker-BInLNCSt.mjs} +6 -6
  499. package/dist/chunks/{NcTimezonePicker-D4y736xC.mjs.map → NcTimezonePicker-BInLNCSt.mjs.map} +1 -1
  500. package/dist/chunks/{NcTimezonePicker-DPpWz5fa.cjs → NcTimezonePicker-CtFsF-jG.cjs} +6 -6
  501. package/dist/chunks/{NcTimezonePicker-DPpWz5fa.cjs.map → NcTimezonePicker-CtFsF-jG.cjs.map} +1 -1
  502. package/dist/chunks/{NcUserBubble-Bb9WBP1S.cjs → NcUserBubble-ByvVV8jh.cjs} +6 -7
  503. package/dist/chunks/{NcUserBubble-Bb9WBP1S.cjs.map → NcUserBubble-ByvVV8jh.cjs.map} +1 -1
  504. package/dist/chunks/{NcUserBubble-8Mts76ii.mjs → NcUserBubble-sIUM-Rru.mjs} +6 -7
  505. package/dist/chunks/{NcUserBubble-8Mts76ii.mjs.map → NcUserBubble-sIUM-Rru.mjs.map} +1 -1
  506. package/dist/chunks/{NcUserStatusIcon-DV2H-KfR.cjs → NcUserStatusIcon-CYsrjxDh.cjs} +9 -12
  507. package/dist/chunks/{NcUserStatusIcon-DV2H-KfR.cjs.map → NcUserStatusIcon-CYsrjxDh.cjs.map} +1 -1
  508. package/dist/chunks/{NcUserStatusIcon-BWxo_etm.mjs → NcUserStatusIcon-DZI9jlXE.mjs} +9 -12
  509. package/dist/chunks/{NcUserStatusIcon-BWxo_etm.mjs.map → NcUserStatusIcon-DZI9jlXE.mjs.map} +1 -1
  510. package/dist/chunks/{ScopeComponent-CDX-s-IV.cjs → ScopeComponent-BCznIxFT.cjs} +2 -2
  511. package/dist/chunks/{ScopeComponent-CDX-s-IV.cjs.map → ScopeComponent-BCznIxFT.cjs.map} +1 -1
  512. package/dist/chunks/{ScopeComponent-DsONbC6w.mjs → ScopeComponent-CNZ_b7IG.mjs} +2 -2
  513. package/dist/chunks/{ScopeComponent-DsONbC6w.mjs.map → ScopeComponent-CNZ_b7IG.mjs.map} +1 -1
  514. package/dist/chunks/{_l10n-DSLCwJSN.mjs → _l10n-BWisB7-O.mjs} +43 -43
  515. package/dist/chunks/_l10n-BWisB7-O.mjs.map +1 -0
  516. package/dist/chunks/{_l10n-9b4TMo5Q.cjs → _l10n-eOBJ3Dwl.cjs} +24 -24
  517. package/dist/chunks/{_l10n-9b4TMo5Q.cjs.map → _l10n-eOBJ3Dwl.cjs.map} +1 -1
  518. package/dist/chunks/{actionText-ZM1k96ts.mjs → actionText-BMig9Egt.mjs} +2 -2
  519. package/dist/chunks/{actionText-ZM1k96ts.mjs.map → actionText-BMig9Egt.mjs.map} +1 -1
  520. package/dist/chunks/{actionText-D_3-6fCH.cjs → actionText-D2-z0ud3.cjs} +2 -2
  521. package/dist/chunks/{actionText-D_3-6fCH.cjs.map → actionText-D2-z0ud3.cjs.map} +1 -1
  522. package/dist/chunks/{colors-DcbJ13is.cjs → colors-BsDQ1Yz3.cjs} +4 -4
  523. package/dist/chunks/{colors-DcbJ13is.cjs.map → colors-BsDQ1Yz3.cjs.map} +1 -1
  524. package/dist/chunks/{colors-BMiIMYXK.mjs → colors-D3xlq-id.mjs} +4 -4
  525. package/dist/chunks/{colors-BMiIMYXK.mjs.map → colors-D3xlq-id.mjs.map} +1 -1
  526. package/dist/chunks/createElementId-DhjFt1I9.mjs +8 -0
  527. package/dist/chunks/{createElementId-5skgwxOP.mjs.map → createElementId-DhjFt1I9.mjs.map} +1 -1
  528. package/dist/chunks/createElementId-lalylSCf.cjs +7 -0
  529. package/dist/chunks/{createElementId-DaJhnLzq.cjs.map → createElementId-lalylSCf.cjs.map} +1 -1
  530. package/dist/chunks/{customPickerElements-BPROmh4T.mjs → customPickerElements-DLFtgReB.mjs} +21 -43
  531. package/dist/chunks/{customPickerElements-BPROmh4T.mjs.map → customPickerElements-DLFtgReB.mjs.map} +1 -1
  532. package/dist/chunks/{customPickerElements-DBEOrbce.cjs → customPickerElements-GyIIOHiQ.cjs} +21 -43
  533. package/dist/chunks/{customPickerElements-DBEOrbce.cjs.map → customPickerElements-GyIIOHiQ.cjs.map} +1 -1
  534. package/dist/chunks/{emoji-V6ytyzoR.mjs → emoji-BY_D0V5K.mjs} +3 -4
  535. package/dist/chunks/{emoji-V6ytyzoR.mjs.map → emoji-BY_D0V5K.mjs.map} +1 -1
  536. package/dist/chunks/{emoji-BCCCB3t3.cjs → emoji-VgSjNTd5.cjs} +3 -4
  537. package/dist/chunks/{emoji-BCCCB3t3.cjs.map → emoji-VgSjNTd5.cjs.map} +1 -1
  538. package/dist/chunks/{focusTrap-DhhUL4JZ.cjs → focusTrap-DUTqW_IG.cjs} +2 -3
  539. package/dist/chunks/{focusTrap-BibOtksr.mjs.map → focusTrap-DUTqW_IG.cjs.map} +1 -1
  540. package/dist/chunks/{focusTrap-BibOtksr.mjs → focusTrap-HJQ4pqHV.mjs} +2 -3
  541. package/dist/chunks/{focusTrap-DhhUL4JZ.cjs.map → focusTrap-HJQ4pqHV.mjs.map} +1 -1
  542. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs +14 -0
  543. package/dist/chunks/{getAvatarUrl-DwWyuiUZ.cjs.map → getAvatarUrl-Du9Y3cPO.cjs.map} +1 -1
  544. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs +15 -0
  545. package/dist/chunks/{getAvatarUrl-C8Q41hfR.mjs.map → getAvatarUrl-IhLacDEr.mjs.map} +1 -1
  546. package/dist/chunks/{index-D_jGr37E.cjs → index-CgkN1xho.cjs} +9 -9
  547. package/dist/chunks/{index-D_jGr37E.cjs.map → index-CgkN1xho.cjs.map} +1 -1
  548. package/dist/chunks/{index-JArK0Dbx.mjs → index-CxTT94_h.mjs} +4 -22
  549. package/dist/chunks/{index-JArK0Dbx.mjs.map → index-CxTT94_h.mjs.map} +1 -1
  550. package/dist/chunks/{index-CmwBGDjr.cjs → index-Dr9k4hIP.cjs} +4 -22
  551. package/dist/chunks/{index-CmwBGDjr.cjs.map → index-Dr9k4hIP.cjs.map} +1 -1
  552. package/dist/chunks/{index-BsEMR4S4.mjs → index-TmAR7I2T.mjs} +9 -9
  553. package/dist/chunks/{index-BsEMR4S4.mjs.map → index-TmAR7I2T.mjs.map} +1 -1
  554. package/dist/chunks/legacy-KBXhWdRy.cjs +5 -0
  555. package/dist/chunks/{legacy-NU_qxPFK.mjs.map → legacy-KBXhWdRy.cjs.map} +1 -1
  556. package/dist/chunks/legacy-MK4GvP26.mjs +6 -0
  557. package/dist/chunks/{legacy-DUgfmdiS.cjs.map → legacy-MK4GvP26.mjs.map} +1 -1
  558. package/dist/chunks/{referencePickerModal-DpJUQ5fq.mjs → referencePickerModal-Cl3fIc9s.mjs} +34 -65
  559. package/dist/chunks/{referencePickerModal-DpJUQ5fq.mjs.map → referencePickerModal-Cl3fIc9s.mjs.map} +1 -1
  560. package/dist/chunks/{referencePickerModal-CusxgEsK.cjs → referencePickerModal-Dz1h1EHq.cjs} +34 -65
  561. package/dist/chunks/{referencePickerModal-CusxgEsK.cjs.map → referencePickerModal-Dz1h1EHq.cjs.map} +1 -1
  562. package/dist/chunks/useAppSettingsDialog-CPqmms-u.cjs.map +1 -1
  563. package/dist/chunks/useAppSettingsDialog-Dn48dw1k.mjs.map +1 -1
  564. package/dist/chunks/{useModelMigration-HPf30klj.cjs → useModelMigration-D5zhrNXr.cjs} +2 -2
  565. package/dist/chunks/{useModelMigration-HPf30klj.cjs.map → useModelMigration-D5zhrNXr.cjs.map} +1 -1
  566. package/dist/chunks/{useModelMigration-DBUi8saj.mjs → useModelMigration-EhAWvqDD.mjs} +2 -2
  567. package/dist/chunks/{useModelMigration-DBUi8saj.mjs.map → useModelMigration-EhAWvqDD.mjs.map} +1 -1
  568. package/dist/chunks/{useTrapStackControl-2gEo3rvr.mjs → useTrapStackControl-BnLfCgGU.mjs} +2 -2
  569. package/dist/chunks/{useTrapStackControl-2gEo3rvr.mjs.map → useTrapStackControl-BnLfCgGU.mjs.map} +1 -1
  570. package/dist/chunks/{useTrapStackControl-dthvITlQ.cjs → useTrapStackControl-XYABY64G.cjs} +2 -2
  571. package/dist/chunks/{useTrapStackControl-dthvITlQ.cjs.map → useTrapStackControl-XYABY64G.cjs.map} +1 -1
  572. package/dist/components/NcAppSettingsDialog/useAppSettingsDialog.d.ts +3 -2
  573. package/dist/components/NcAppSettingsSection/index.d.ts +5 -0
  574. package/dist/components/NcAppSettingsSectionShortcuts/index.d.ts +1 -0
  575. package/dist/components/NcHotkey/index.d.ts +1 -0
  576. package/dist/components/NcHotkeyList/index.d.ts +1 -0
  577. package/dist/index.cjs +74 -65
  578. package/dist/index.cjs.map +1 -1
  579. package/dist/index.mjs +76 -67
  580. package/dist/index.mjs.map +1 -1
  581. package/package.json +11 -12
  582. package/dist/assets/NcAppNavigationSettings-1YRzh-xl.css +0 -74
  583. package/dist/chunks/NcActionTextEditable-BhucWrOO.cjs.map +0 -1
  584. package/dist/chunks/NcAppContent-CCyPMvUa.cjs.map +0 -1
  585. package/dist/chunks/NcAppContent-DFlcxER-.mjs.map +0 -1
  586. package/dist/chunks/NcAppNavigationSettings-DlIDzhxh.cjs.map +0 -1
  587. package/dist/chunks/NcAppNavigationSettings-n8OaxTbE.mjs.map +0 -1
  588. package/dist/chunks/NcAppSettingsDialog-Cpjr8Tca.mjs.map +0 -1
  589. package/dist/chunks/NcAppSettingsDialog-R6Y-tl6d.cjs.map +0 -1
  590. package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs +0 -88
  591. package/dist/chunks/NcAppSettingsSection-BNVlt4g0.mjs.map +0 -1
  592. package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs +0 -87
  593. package/dist/chunks/NcAppSettingsSection-CTqViPnP.cjs.map +0 -1
  594. package/dist/chunks/NcInputField-1ujONIvp.mjs.map +0 -1
  595. package/dist/chunks/NcInputField-LBv3nCrt.cjs.map +0 -1
  596. package/dist/chunks/_l10n-DSLCwJSN.mjs.map +0 -1
  597. package/dist/chunks/createElementId-5skgwxOP.mjs +0 -9
  598. package/dist/chunks/createElementId-DaJhnLzq.cjs +0 -8
  599. package/dist/chunks/getAvatarUrl-C8Q41hfR.mjs +0 -16
  600. package/dist/chunks/getAvatarUrl-DwWyuiUZ.cjs +0 -15
  601. package/dist/chunks/legacy-DUgfmdiS.cjs +0 -6
  602. package/dist/chunks/legacy-NU_qxPFK.mjs +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"NcCollectionList-w-7M5HGN.mjs","sources":["../../src/components/NcCollectionList/NcCollectionListItem.vue","../../src/components/NcCollectionList/service.ts","../../src/components/NcCollectionList/useCollections.js","../../src/components/NcCollectionList/NcCollectionList.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<li class=\"collection-list-item\">\n\t\t<NcAvatar :display-name=\"collection.name\" allow-placeholder class=\"collection-avatar\" />\n\t\t<span\n\t\t\tv-if=\"newName === null\"\n\t\t\tclass=\"collection-item-name\"\n\t\t\ttitle=\"\"\n\t\t\t@click=\"showDetails\">{{ collection.name }}</span>\n\t\t<form v-else :class=\"{ 'should-shake': error }\" @submit.prevent=\"renameCollection\">\n\t\t\t<input\n\t\t\t\tv-model=\"newName\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tautocomplete=\"off\"\n\t\t\t\tautocapitalize=\"off\">\n\t\t\t<input type=\"submit\" value=\"\" class=\"icon-confirm\">\n\t\t</form>\n\t\t<div v-if=\"!detailsOpen && newName === null\" class=\"linked-icons\">\n\t\t\t<component\n\t\t\t\t:is=\"getComponent(resource).component\"\n\t\t\t\tv-for=\"resource in resources.slice(0, 2)\"\n\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t:title=\"resource.name\"\n\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t:href=\"getComponent(resource).href\"\n\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t</component>\n\t\t</div>\n\n\t\t<span v-if=\"newName === null\" class=\"sharingOptionsGroup\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton\n\t\t\t\t\ticon=\"icon-info\"\n\t\t\t\t\t@click.prevent=\"toggleDetails\">\n\t\t\t\t\t{{ detailsOpen ? t('Hide details') : t('Show details') }}\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton\n\t\t\t\t\ticon=\"icon-rename\"\n\t\t\t\t\t@click.prevent=\"openRename\">\n\t\t\t\t\t{{ t('Rename project') }}\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</span>\n\n\t\t<transition name=\"fade\">\n\t\t\t<div v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</div>\n\t\t</transition>\n\t\t<transition name=\"fade\">\n\t\t\t<ul v-if=\"detailsOpen\" class=\"resource-list-details\">\n\t\t\t\t<li\n\t\t\t\t\tv-for=\"resource in resources\"\n\t\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t\t<component\n\t\t\t\t\t\t:is=\"getComponent(resource).component\"\n\t\t\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t\t\t:href=\"getComponent(resource).href\">\n\t\t\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t\t\t\t<span class=\"resource-name\">{{ resource.name || '' }}</span>\n\t\t\t\t\t</component>\n\t\t\t\t\t<span class=\"icon-close\" @click=\"removeResource(collection, resource)\" />\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</transition>\n\t</li>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcAvatar from '../NcAvatar/index.js'\nimport { getRoute } from '../NcRichText/autolink.js'\n\nexport default {\n\tname: 'NcCollectionListItem',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The collection\n\t\t */\n\t\tcollection: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Current error if any\n\t\t */\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\temits: ['remove-resource', 'rename-collection'],\n\n\tdata() {\n\t\treturn {\n\t\t\tdetailsOpen: false,\n\t\t\tnewName: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tgetIcon() {\n\t\t\treturn (resource) => [resource.iconClass]\n\t\t},\n\n\t\ttypeClass() {\n\t\t\treturn (resource) => 'resource-type-' + resource.type\n\t\t},\n\n\t\tresources() {\n\t\t\t// invalid resources come from server as empty array ([]) and not an object\n\t\t\treturn this.collection.resources?.filter((resource) => !Array.isArray(resource)) ?? []\n\t\t},\n\n\t\tgetComponent() {\n\t\t\treturn (resource) => {\n\t\t\t\tconst route = getRoute(this.$router, resource.link)\n\n\t\t\t\treturn route\n\t\t\t\t\t? { component: 'router-link', to: route, href: undefined }\n\t\t\t\t\t: { component: 'a', to: undefined, href: resource.link }\n\t\t\t}\n\t\t},\n\n\t\ticonUrl() {\n\t\t\treturn (resource) => {\n\t\t\t\tif (resource.mimetype) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl(resource.mimetype)\n\t\t\t\t}\n\t\t\t\tif (resource.iconUrl) {\n\t\t\t\t\treturn resource.iconUrl\n\t\t\t\t}\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\ttoggleDetails() {\n\t\t\tthis.detailsOpen = !this.detailsOpen\n\t\t},\n\n\t\tshowDetails() {\n\t\t\tthis.detailsOpen = true\n\t\t},\n\n\t\tremoveResource(collection, resource) {\n\t\t\tthis.$emit('remove-resource', {\n\t\t\t\tcollectionId: collection.id,\n\t\t\t\tresourceType: resource.type,\n\t\t\t\tresourceId: resource.id,\n\t\t\t})\n\t\t},\n\n\t\topenRename() {\n\t\t\tthis.newName = this.collection.name\n\t\t},\n\n\t\trenameCollection() {\n\t\t\tif (this.newName) {\n\t\t\t\tthis.$emit('rename-collection', {\n\t\t\t\t\tcollectionId: this.collection.id,\n\t\t\t\t\tname: this.newName,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthis.newName = null\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s ease;\n}\n\n.fade-enter, .fade-leave-to\n\t/* .fade-leave-active below version 2.1.8 */\n{\n\topacity: 0;\n}\n\n.linked-icons {\n\tdisplay: flex;\n\n\timg {\n\t\tpadding: 12px;\n\t\theight: 44px;\n\t\tdisplay: block;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\topacity: 0.7;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n.popovermenu {\n\tdisplay: none;\n\n\t&.open {\n\t\tdisplay: block;\n\t}\n}\n\nli.collection-list-item {\n\tflex-wrap: wrap;\n\theight: auto;\n\tcursor: pointer;\n\tmargin-bottom: 0 !important;\n\n\t.collection-avatar {\n\t\tmargin-top: 0;\n\t}\n\n\tform, .collection-item-name {\n\t\tflex-basis: 10%;\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t}\n\n\t.collection-item-name {\n\t\tpadding: 12px 9px;\n\t}\n\n\tinput {\n\t\tmargin-top: 4px;\n\t\tborder-color: var(--color-border-maxcontrast);\n\n\t\t&[type=text] {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t.error {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\t}\n\n\t.resource-list-details {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\n\t\tli {\n\t\t\tdisplay: flex;\n\t\t\tmargin-left: 44px;\n\t\t\tborder-radius: 3px;\n\t\t\tcursor: pointer;\n\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-dark);\n\t\t\t}\n\n\t\t\ta {\n\t\t\t\tflex-grow: 1;\n\t\t\t\tpadding: 3px;\n\t\t\t\tmax-width: calc(100% - 30px);\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\tspan {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: top;\n\t\t\tmargin-right: 10px;\n\t\t}\n\n\t\tspan.resource-name {\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\tposition: relative;\n\t\t\tvertical-align: top;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-grow: 1;\n\t\t\tpadding: 4px;\n\t\t}\n\n\t\timg {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t}\n\n\t\t.icon-close {\n\t\t\topacity: .7;\n\n\t\t\t&:hover, &:focus {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.should-shake {\n\tanimation: shake 0.6s 1 linear;\n}\n\n@keyframes shake {\n\t0% {\n\t\ttransform: translate(15px);\n\t}\n\t20% {\n\t\ttransform: translate(-15px);\n\t}\n\t40% {\n\t\ttransform: translate(7px);\n\t}\n\t60% {\n\t\ttransform: translate(-7px);\n\t}\n\t80% {\n\t\ttransform: translate(3px);\n\t}\n\t100% {\n\t\ttransform: translate(0px);\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { OCSResponse } from '@nextcloud/typings/ocs'\n\nimport axios, { type AxiosResponse } from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\n\n/**\n * Extracts the OCS data from a response\n *\n * @param response OCS response\n */\nfunction extractOcsData(response: AxiosResponse<OCSResponse>) {\n\treturn response.data.ocs.data\n}\n\n/**\n * Lists all collections\n *\n * @param collectionId Collection ID\n */\nexport function listCollectionService(collectionId: number) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId })).then(extractOcsData)\n}\n\n/**\n * Renames a collection\n *\n * @param collectionId Collection ID\n * @param collectionName New collection name\n */\nexport function renameCollectionService(collectionId: number, collectionName: string) {\n\treturn axios.put(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { collectionName }).then(extractOcsData)\n}\n\n/**\n * Lists all collections for a resource\n *\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function getCollectionsByResourceService(resourceType: string, resourceId: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId })).then(extractOcsData)\n}\n\n/**\n * Creates a collection\n *\n * @param resourceType Resource type\n * @param resourceId Resource ID\n * @param name Collection name\n */\nexport function createCollectionService(resourceType: string, resourceId: string, name: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId }), { name }).then(extractOcsData)\n}\n\n/**\n * Adds a resource to a collection\n *\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function addResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { resourceType, resourceId }).then(extractOcsData)\n}\n\n/**\n * Removes a resource from a collection\n *\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function removeResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.delete(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { params: { resourceType, resourceId } }).then(extractOcsData)\n}\n\n/**\n * Searches for collections\n *\n * @param query Search query\n */\nexport function searchService(query: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/search/{query}', { query })).then(extractOcsData)\n}\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { ref, set } from 'vue'\nimport {\n\taddResourceService,\n\tcreateCollectionService,\n\tgetCollectionsByResourceService,\n\tremoveResourceService,\n\trenameCollectionService,\n} from './service.ts'\n\n/**\n * Use collections composable\n */\nexport function useCollections() {\n\t// State\n\tconst storedCollections = ref([])\n\n\t// Mutations\n\tconst addCollections = (collections) => {\n\t\tset(storedCollections, 'value', collections)\n\t}\n\n\tconst addCollection = (collection) => {\n\t\tset(storedCollections, 'value', [...storedCollections.value, collection])\n\t}\n\n\tconst removeCollection = (collectionId) => {\n\t\tset(storedCollections, 'value', storedCollections.value.filter((item) => item.id !== collectionId))\n\t}\n\n\tconst updateCollection = (collection) => {\n\t\tconst index = storedCollections.value.findIndex((item) => item.id === collection.id)\n\t\tif (index !== -1) {\n\t\t\tset(storedCollections.value, index, collection)\n\t\t} else {\n\t\t\taddCollection(collection)\n\t\t}\n\t}\n\n\t// Actions\n\tconst fetchCollectionsByResource = async ({ resourceType, resourceId }) => {\n\t\tconst collections = await getCollectionsByResourceService(resourceType, resourceId)\n\n\t\taddCollections(collections)\n\t}\n\n\tconst createCollection = async ({ baseResourceType, baseResourceId, resourceType, resourceId, name }) => {\n\t\tconst collection = await createCollectionService(baseResourceType, baseResourceId, name)\n\n\t\taddCollection(collection)\n\t\tawait addResourceToCollection({\n\t\t\tcollectionId: collection.id,\n\t\t\tresourceType,\n\t\t\tresourceId,\n\t\t})\n\t}\n\n\tconst renameCollection = async ({ collectionId, name }) => {\n\t\tconst collection = await renameCollectionService(collectionId, name)\n\n\t\tupdateCollection(collection)\n\t}\n\n\t/**\n\t * @param {*} options - Options\n\t */\n\tasync function addResourceToCollection({ collectionId, resourceType, resourceId }) {\n\t\tconst collection = await addResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst removeResourceFromCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await removeResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tif (collection.resources.length > 0) {\n\t\t\tupdateCollection(collection)\n\t\t} else {\n\t\t\tremoveCollection(collectionId)\n\t\t}\n\t}\n\n\treturn {\n\t\tstoredCollections,\n\t\tfetchCollectionsByResource,\n\t\tcreateCollection,\n\t\trenameCollection,\n\t\taddResourceToCollection,\n\t\tremoveResourceFromCollection,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nProvides a Vue standalone component for Nextcloud Projects feature introduced in Nextcloud 16. Replaces deprecated `nextcloud-vue-collections` library.\n\nProjects feature is deprecated since Nextcloud 25, and superseded by Related resources. See [NcRelatedResourcesPanel](#/Components/NcRelatedResourcesPanel) documentation for more information.\n\n### Usage\n\nTo enable feature in Nextcloud, run following command:\n```sh\nocc config:system:set --value true 'projects.enabled'\n```\n</docs>\n\n<template>\n\t<ul v-if=\"collections && type && id\" id=\"collection-list\" class=\"collection-list\">\n\t\t<li @click=\"showSelect\">\n\t\t\t<div class=\"avatar\">\n\t\t\t\t<span class=\"icon-projects\" />\n\t\t\t</div>\n\t\t\t<div id=\"collection-select-container\">\n\t\t\t\t<NcSelect\n\t\t\t\t\tref=\"select\"\n\t\t\t\t\tv-model=\"value\"\n\t\t\t\t\t:aria-label-combobox=\"t('Add to a project')\"\n\t\t\t\t\t:options=\"options\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\tlabel=\"title\"\n\t\t\t\t\t:limit=\"5\"\n\t\t\t\t\t@close=\"isSelectOpen = false\"\n\t\t\t\t\t@open=\"isSelectOpen = true\"\n\t\t\t\t\t@option:selected=\"select\"\n\t\t\t\t\t@search=\"search\">\n\t\t\t\t\t<template #selected-option=\"option\">\n\t\t\t\t\t\t<span class=\"option__desc\">\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #option=\"option\">\n\t\t\t\t\t\t<span class=\"option__wrapper\">\n\t\t\t\t\t\t\t<span v-if=\"option.class\" :class=\"option.class\" class=\"avatar\" />\n\t\t\t\t\t\t\t<NcAvatar v-else-if=\"option.method !== 2\" allow-placeholder :display-name=\"option.title\" />\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<p class=\"hint\">\n\t\t\t\t\t\t{{ t('Connect items to a project to make them easier to find') }}\n\t\t\t\t\t</p>\n\t\t\t\t</NcSelect>\n\t\t\t</div>\n\t\t</li>\n\t\t<transition name=\"fade\">\n\t\t\t<li v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</li>\n\t\t</transition>\n\t\t<NcCollectionListItem\n\t\t\tv-for=\"collection in collections\"\n\t\t\t:key=\"collection.id\"\n\t\t\t:collection=\"collection\"\n\t\t\t:error=\"collectionsError[collection.id]\"\n\t\t\t@rename-collection=\"renameCollectionFromItem\"\n\t\t\t@remove-resource=\"removeResourceFromCollection\" />\n\t</ul>\n</template>\n\n<script>\nimport debounce from 'debounce'\nimport { ref } from 'vue'\nimport NcCollectionListItem from './NcCollectionListItem.vue'\nimport { t } from '../../l10n.js'\nimport { logger } from '../../utils/logger.ts'\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcSelect from '../NcSelect/index.js'\nimport { searchService } from './service.ts'\nimport { useCollections } from './useCollections.js'\n\nconst METHOD_CREATE_COLLECTION = 0\nconst METHOD_ADD_TO_COLLECTION = 1\n\nexport default {\n\tname: 'NcCollectionList',\n\n\tcomponents: {\n\t\tNcCollectionListItem,\n\t\tNcAvatar,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Resource type identifier\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Unique id of the resource\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Name of the resource\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether the component is active (to start fetch resources)\n\t\t */\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t} = useCollections()\n\n\t\tconst searchCollections = ref([])\n\t\tconst search = debounce(function(query, loading) {\n\t\t\tif (query !== '') {\n\t\t\t\tloading(true)\n\t\t\t\tsearchService(query).then((collections) => {\n\t\t\t\t\tsearchCollections.value = collections\n\t\t\t\t}).catch((error) => {\n\t\t\t\t\tlogger.error('Failed to search for collections', { error })\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tloading(false)\n\t\t\t\t})\n\t\t\t}\n\t\t}, 500)\n\n\t\treturn {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t\tsearchCollections,\n\t\t\tsearch,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tselectIsOpen: false,\n\t\t\tgeneratingCodes: false,\n\t\t\tcodes: undefined,\n\t\t\tvalue: null,\n\t\t\tmodel: {},\n\t\t\tcollectionsError: {},\n\t\t\terror: null,\n\t\t\tisSelectOpen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcollections() {\n\t\t\treturn this.storedCollections.filter((collection) => collection.resources\n\t\t\t\t.some((resource) => resource && resource.id === String(this.id) && resource.type === this.type))\n\t\t},\n\n\t\tplaceholder() {\n\t\t\treturn this.isSelectOpen\n\t\t\t\t? t('Type to search for existing projects')\n\t\t\t\t: t('Add to a project')\n\t\t},\n\n\t\toptions() {\n\t\t\tconst options = []\n\t\t\twindow.OCP.Collaboration.getTypes().sort().forEach((type) => {\n\t\t\t\toptions.push({\n\t\t\t\t\tmethod: METHOD_CREATE_COLLECTION,\n\t\t\t\t\ttype,\n\t\t\t\t\ttitle: window.OCP.Collaboration.getLabel(type),\n\t\t\t\t\tclass: window.OCP.Collaboration.getIcon(type),\n\t\t\t\t\taction: () => window.OCP.Collaboration.trigger(type),\n\t\t\t\t})\n\t\t\t})\n\t\t\tfor (const index in this.searchCollections) {\n\t\t\t\tif (!this.collections.find((collection) => collection.id === this.searchCollections[index].id)) {\n\t\t\t\t\toptions.push({\n\t\t\t\t\t\tmethod: METHOD_ADD_TO_COLLECTION,\n\t\t\t\t\t\ttitle: this.searchCollections[index].name,\n\t\t\t\t\t\tcollectionId: this.searchCollections[index].id,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn options\n\t\t},\n\n\t\tresourceIdentifier() {\n\t\t\treturn {\n\t\t\t\tresourceType: this.type,\n\t\t\t\tresourceId: this.id,\n\t\t\t\tisActive: this.isActive,\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tresourceIdentifier: {\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t\thandler(resourceIdentifier) {\n\t\t\t\tif (!resourceIdentifier.isActive || !resourceIdentifier.resourceId || !resourceIdentifier.resourceType) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.fetchCollectionsByResource(resourceIdentifier)\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tselect(selectedOption) {\n\t\t\tif (selectedOption.method === METHOD_CREATE_COLLECTION) {\n\t\t\t\tselectedOption.action().then((resourceId) => {\n\t\t\t\t\tthis.createCollection({\n\t\t\t\t\t\tbaseResourceType: this.type,\n\t\t\t\t\t\tbaseResourceId: this.id,\n\t\t\t\t\t\tresourceType: selectedOption.type,\n\t\t\t\t\t\tresourceId,\n\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\tthis.setError(t('Failed to create a project'), e)\n\t\t\t\t\t})\n\t\t\t\t}).catch((error) => {\n\t\t\t\t\tlogger.error('No resource selected', { error })\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (selectedOption.method === METHOD_ADD_TO_COLLECTION) {\n\t\t\t\tthis.addResourceToCollection({\n\t\t\t\t\tcollectionId: selectedOption.collectionId, resourceType: this.type, resourceId: this.id,\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tthis.setError(t('Failed to add the item to the project'), e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.value = null\n\t\t},\n\n\t\tshowSelect() {\n\t\t\tthis.selectIsOpen = true\n\t\t\tthis.$refs.select.$el.focus()\n\t\t},\n\n\t\tsetError(error, e) {\n\t\t\tlogger.error(error, { error: e })\n\t\t\tthis.error = error\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.error = null\n\t\t\t}, 5000)\n\t\t},\n\n\t\trenameCollectionFromItem({ collectionId, name }) {\n\t\t\tthis.renameCollection({ collectionId, name })\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tlogger.error(t('Failed to rename the project'), { error })\n\t\t\t\t\tthis.collectionsError[collectionId] = t('Failed to rename the project')\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.collectionsError[collectionId] = null\n\t\t\t\t\t}, 5000)\n\t\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.collection-list * {\n\tbox-sizing: border-box;\n}\n\n.collection-list > li {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\n\t& > .avatar {\n\t\tmargin-top: 0;\n\t}\n}\n\n#collection-select-container {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.v-select {\n\t// NcAvatar in the dropdown\n\tspan.avatar {\n\t\tdisplay: block;\n\t\tpadding: 16px;\n\t\topacity: .7;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\np.hint {\n\tz-index: 1;\n\t// fix alignment\n\tmargin-top: -16px;\n\tpadding: 8px 8px;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: normal;\n}\n\ndiv.avatar {\n\twidth: 32px;\n\theight: 32px;\n\tmargin: 0;\n\tpadding: 8px;\n\tbackground-color: var(--color-background-dark);\n\tmargin-top: 30px;\n}\n\n/** TODO provide white icon in core */\n.icon-projects {\n\tdisplay: block;\n\tpadding: 8px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n}\n\n.option__wrapper {\n\tdisplay: flex;\n\n\t.avatar {\n\t\tdisplay: block;\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tbackground-color: var(--color-background-darker) !important;\n\t}\n\n\t.option__title {\n\t\tpadding: 4px;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .5s;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\n}\n\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;;;;AAiFA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,mBAAA,mBAAA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,CAAA,aAAA,CAAA,SAAA,SAAA;AAAA,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AA,iBAAA,YAAA,IAAA,EAAA,8BAAA;AACA,mBAAA,MAAA;AACA,eAAA,iBAAA,YAAA,IAAA;AAAA,QACA,GAAA,GAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcCollectionList-D85QdobI.mjs","sources":["../../src/components/NcCollectionList/NcCollectionListItem.vue","../../src/components/NcCollectionList/service.ts","../../src/components/NcCollectionList/useCollections.js","../../src/components/NcCollectionList/NcCollectionList.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<li class=\"collection-list-item\">\n\t\t<NcAvatar :display-name=\"collection.name\" allow-placeholder class=\"collection-avatar\" />\n\t\t<span\n\t\t\tv-if=\"newName === null\"\n\t\t\tclass=\"collection-item-name\"\n\t\t\ttitle=\"\"\n\t\t\t@click=\"showDetails\">{{ collection.name }}</span>\n\t\t<form v-else :class=\"{ 'should-shake': error }\" @submit.prevent=\"renameCollection\">\n\t\t\t<input\n\t\t\t\tv-model=\"newName\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tautocomplete=\"off\"\n\t\t\t\tautocapitalize=\"off\">\n\t\t\t<input type=\"submit\" value=\"\" class=\"icon-confirm\">\n\t\t</form>\n\t\t<div v-if=\"!detailsOpen && newName === null\" class=\"linked-icons\">\n\t\t\t<component\n\t\t\t\t:is=\"getComponent(resource).component\"\n\t\t\t\tv-for=\"resource in resources.slice(0, 2)\"\n\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t:title=\"resource.name\"\n\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t:href=\"getComponent(resource).href\"\n\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t</component>\n\t\t</div>\n\n\t\t<span v-if=\"newName === null\" class=\"sharingOptionsGroup\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton\n\t\t\t\t\ticon=\"icon-info\"\n\t\t\t\t\t@click.prevent=\"toggleDetails\">\n\t\t\t\t\t{{ detailsOpen ? t('Hide details') : t('Show details') }}\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton\n\t\t\t\t\ticon=\"icon-rename\"\n\t\t\t\t\t@click.prevent=\"openRename\">\n\t\t\t\t\t{{ t('Rename project') }}\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</span>\n\n\t\t<transition name=\"fade\">\n\t\t\t<div v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</div>\n\t\t</transition>\n\t\t<transition name=\"fade\">\n\t\t\t<ul v-if=\"detailsOpen\" class=\"resource-list-details\">\n\t\t\t\t<li\n\t\t\t\t\tv-for=\"resource in resources\"\n\t\t\t\t\t:key=\"resource.type + '|' + resource.id\"\n\t\t\t\t\t:class=\"typeClass(resource)\">\n\t\t\t\t\t<component\n\t\t\t\t\t\t:is=\"getComponent(resource).component\"\n\t\t\t\t\t\t:to=\"getComponent(resource).to\"\n\t\t\t\t\t\t:href=\"getComponent(resource).href\">\n\t\t\t\t\t\t<img :src=\"iconUrl(resource)\" :alt=\"resource.name\">\n\t\t\t\t\t\t<span class=\"resource-name\">{{ resource.name || '' }}</span>\n\t\t\t\t\t</component>\n\t\t\t\t\t<span class=\"icon-close\" @click=\"removeResource(collection, resource)\" />\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</transition>\n\t</li>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcAvatar from '../NcAvatar/index.js'\nimport { getRoute } from '../NcRichText/autolink.js'\n\nexport default {\n\tname: 'NcCollectionListItem',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The collection\n\t\t */\n\t\tcollection: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Current error if any\n\t\t */\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\temits: ['remove-resource', 'rename-collection'],\n\n\tdata() {\n\t\treturn {\n\t\t\tdetailsOpen: false,\n\t\t\tnewName: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tgetIcon() {\n\t\t\treturn (resource) => [resource.iconClass]\n\t\t},\n\n\t\ttypeClass() {\n\t\t\treturn (resource) => 'resource-type-' + resource.type\n\t\t},\n\n\t\tresources() {\n\t\t\t// invalid resources come from server as empty array ([]) and not an object\n\t\t\treturn this.collection.resources?.filter((resource) => !Array.isArray(resource)) ?? []\n\t\t},\n\n\t\tgetComponent() {\n\t\t\treturn (resource) => {\n\t\t\t\tconst route = getRoute(this.$router, resource.link)\n\n\t\t\t\treturn route\n\t\t\t\t\t? { component: 'router-link', to: route, href: undefined }\n\t\t\t\t\t: { component: 'a', to: undefined, href: resource.link }\n\t\t\t}\n\t\t},\n\n\t\ticonUrl() {\n\t\t\treturn (resource) => {\n\t\t\t\tif (resource.mimetype) {\n\t\t\t\t\treturn OC.MimeType.getIconUrl(resource.mimetype)\n\t\t\t\t}\n\t\t\t\tif (resource.iconUrl) {\n\t\t\t\t\treturn resource.iconUrl\n\t\t\t\t}\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\ttoggleDetails() {\n\t\t\tthis.detailsOpen = !this.detailsOpen\n\t\t},\n\n\t\tshowDetails() {\n\t\t\tthis.detailsOpen = true\n\t\t},\n\n\t\tremoveResource(collection, resource) {\n\t\t\tthis.$emit('remove-resource', {\n\t\t\t\tcollectionId: collection.id,\n\t\t\t\tresourceType: resource.type,\n\t\t\t\tresourceId: resource.id,\n\t\t\t})\n\t\t},\n\n\t\topenRename() {\n\t\t\tthis.newName = this.collection.name\n\t\t},\n\n\t\trenameCollection() {\n\t\t\tif (this.newName) {\n\t\t\t\tthis.$emit('rename-collection', {\n\t\t\t\t\tcollectionId: this.collection.id,\n\t\t\t\t\tname: this.newName,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthis.newName = null\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .3s ease;\n}\n\n.fade-enter, .fade-leave-to\n\t/* .fade-leave-active below version 2.1.8 */\n{\n\topacity: 0;\n}\n\n.linked-icons {\n\tdisplay: flex;\n\n\timg {\n\t\tpadding: 12px;\n\t\theight: 44px;\n\t\tdisplay: block;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\topacity: 0.7;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n.popovermenu {\n\tdisplay: none;\n\n\t&.open {\n\t\tdisplay: block;\n\t}\n}\n\nli.collection-list-item {\n\tflex-wrap: wrap;\n\theight: auto;\n\tcursor: pointer;\n\tmargin-bottom: 0 !important;\n\n\t.collection-avatar {\n\t\tmargin-top: 0;\n\t}\n\n\tform, .collection-item-name {\n\t\tflex-basis: 10%;\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t}\n\n\t.collection-item-name {\n\t\tpadding: 12px 9px;\n\t}\n\n\tinput {\n\t\tmargin-top: 4px;\n\t\tborder-color: var(--color-border-maxcontrast);\n\n\t\t&[type=text] {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t.error {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\t}\n\n\t.resource-list-details {\n\t\tflex-basis: 100%;\n\t\twidth: 100%;\n\n\t\tli {\n\t\t\tdisplay: flex;\n\t\t\tmargin-left: 44px;\n\t\t\tborder-radius: 3px;\n\t\t\tcursor: pointer;\n\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-dark);\n\t\t\t}\n\n\t\t\ta {\n\t\t\t\tflex-grow: 1;\n\t\t\t\tpadding: 3px;\n\t\t\t\tmax-width: calc(100% - 30px);\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\tspan {\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: top;\n\t\t\tmargin-right: 10px;\n\t\t}\n\n\t\tspan.resource-name {\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t\tposition: relative;\n\t\t\tvertical-align: top;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-grow: 1;\n\t\t\tpadding: 4px;\n\t\t}\n\n\t\timg {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t}\n\n\t\t.icon-close {\n\t\t\topacity: .7;\n\n\t\t\t&:hover, &:focus {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.should-shake {\n\tanimation: shake 0.6s 1 linear;\n}\n\n@keyframes shake {\n\t0% {\n\t\ttransform: translate(15px);\n\t}\n\t20% {\n\t\ttransform: translate(-15px);\n\t}\n\t40% {\n\t\ttransform: translate(7px);\n\t}\n\t60% {\n\t\ttransform: translate(-7px);\n\t}\n\t80% {\n\t\ttransform: translate(3px);\n\t}\n\t100% {\n\t\ttransform: translate(0px);\n\t}\n}\n</style>\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { OCSResponse } from '@nextcloud/typings/ocs'\n\nimport axios, { type AxiosResponse } from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\n\n/**\n * Extracts the OCS data from a response\n *\n * @param response OCS response\n */\nfunction extractOcsData(response: AxiosResponse<OCSResponse>) {\n\treturn response.data.ocs.data\n}\n\n/**\n * Lists all collections\n *\n * @param collectionId Collection ID\n */\nexport function listCollectionService(collectionId: number) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId })).then(extractOcsData)\n}\n\n/**\n * Renames a collection\n *\n * @param collectionId Collection ID\n * @param collectionName New collection name\n */\nexport function renameCollectionService(collectionId: number, collectionName: string) {\n\treturn axios.put(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { collectionName }).then(extractOcsData)\n}\n\n/**\n * Lists all collections for a resource\n *\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function getCollectionsByResourceService(resourceType: string, resourceId: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId })).then(extractOcsData)\n}\n\n/**\n * Creates a collection\n *\n * @param resourceType Resource type\n * @param resourceId Resource ID\n * @param name Collection name\n */\nexport function createCollectionService(resourceType: string, resourceId: string, name: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/{resourceType}/{resourceId}', { resourceType, resourceId }), { name }).then(extractOcsData)\n}\n\n/**\n * Adds a resource to a collection\n *\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function addResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.post(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { resourceType, resourceId }).then(extractOcsData)\n}\n\n/**\n * Removes a resource from a collection\n *\n * @param collectionId Collection ID\n * @param resourceType Resource type\n * @param resourceId Resource ID\n */\nexport function removeResourceService(collectionId: number, resourceType: string, resourceId: string) {\n\treturn axios.delete(generateOcsUrl('collaboration/resources/collections/{collectionId}', { collectionId }), { params: { resourceType, resourceId } }).then(extractOcsData)\n}\n\n/**\n * Searches for collections\n *\n * @param query Search query\n */\nexport function searchService(query: string) {\n\treturn axios.get(generateOcsUrl('collaboration/resources/collections/search/{query}', { query })).then(extractOcsData)\n}\n","/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { ref, set } from 'vue'\nimport {\n\taddResourceService,\n\tcreateCollectionService,\n\tgetCollectionsByResourceService,\n\tremoveResourceService,\n\trenameCollectionService,\n} from './service.ts'\n\n/**\n * Use collections composable\n */\nexport function useCollections() {\n\t// State\n\tconst storedCollections = ref([])\n\n\t// Mutations\n\tconst addCollections = (collections) => {\n\t\tset(storedCollections, 'value', collections)\n\t}\n\n\tconst addCollection = (collection) => {\n\t\tset(storedCollections, 'value', [...storedCollections.value, collection])\n\t}\n\n\tconst removeCollection = (collectionId) => {\n\t\tset(storedCollections, 'value', storedCollections.value.filter((item) => item.id !== collectionId))\n\t}\n\n\tconst updateCollection = (collection) => {\n\t\tconst index = storedCollections.value.findIndex((item) => item.id === collection.id)\n\t\tif (index !== -1) {\n\t\t\tset(storedCollections.value, index, collection)\n\t\t} else {\n\t\t\taddCollection(collection)\n\t\t}\n\t}\n\n\t// Actions\n\tconst fetchCollectionsByResource = async ({ resourceType, resourceId }) => {\n\t\tconst collections = await getCollectionsByResourceService(resourceType, resourceId)\n\n\t\taddCollections(collections)\n\t}\n\n\tconst createCollection = async ({ baseResourceType, baseResourceId, resourceType, resourceId, name }) => {\n\t\tconst collection = await createCollectionService(baseResourceType, baseResourceId, name)\n\n\t\taddCollection(collection)\n\t\tawait addResourceToCollection({\n\t\t\tcollectionId: collection.id,\n\t\t\tresourceType,\n\t\t\tresourceId,\n\t\t})\n\t}\n\n\tconst renameCollection = async ({ collectionId, name }) => {\n\t\tconst collection = await renameCollectionService(collectionId, name)\n\n\t\tupdateCollection(collection)\n\t}\n\n\t/**\n\t * @param {*} options - Options\n\t */\n\tasync function addResourceToCollection({ collectionId, resourceType, resourceId }) {\n\t\tconst collection = await addResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tupdateCollection(collection)\n\t}\n\n\tconst removeResourceFromCollection = async ({ collectionId, resourceType, resourceId }) => {\n\t\tconst collection = await removeResourceService(collectionId, resourceType, String(resourceId))\n\n\t\tif (collection.resources.length > 0) {\n\t\t\tupdateCollection(collection)\n\t\t} else {\n\t\t\tremoveCollection(collectionId)\n\t\t}\n\t}\n\n\treturn {\n\t\tstoredCollections,\n\t\tfetchCollectionsByResource,\n\t\tcreateCollection,\n\t\trenameCollection,\n\t\taddResourceToCollection,\n\t\tremoveResourceFromCollection,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nProvides a Vue standalone component for Nextcloud Projects feature introduced in Nextcloud 16. Replaces deprecated `nextcloud-vue-collections` library.\n\nProjects feature is deprecated since Nextcloud 25, and superseded by Related resources. See [NcRelatedResourcesPanel](#/Components/NcRelatedResourcesPanel) documentation for more information.\n\n### Usage\n\nTo enable feature in Nextcloud, run following command:\n```sh\nocc config:system:set --value true 'projects.enabled'\n```\n</docs>\n\n<template>\n\t<ul v-if=\"collections && type && id\" id=\"collection-list\" class=\"collection-list\">\n\t\t<li @click=\"showSelect\">\n\t\t\t<div class=\"avatar\">\n\t\t\t\t<span class=\"icon-projects\" />\n\t\t\t</div>\n\t\t\t<div id=\"collection-select-container\">\n\t\t\t\t<NcSelect\n\t\t\t\t\tref=\"select\"\n\t\t\t\t\tv-model=\"value\"\n\t\t\t\t\t:aria-label-combobox=\"t('Add to a project')\"\n\t\t\t\t\t:options=\"options\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\tlabel=\"title\"\n\t\t\t\t\t:limit=\"5\"\n\t\t\t\t\t@close=\"isSelectOpen = false\"\n\t\t\t\t\t@open=\"isSelectOpen = true\"\n\t\t\t\t\t@option:selected=\"select\"\n\t\t\t\t\t@search=\"search\">\n\t\t\t\t\t<template #selected-option=\"option\">\n\t\t\t\t\t\t<span class=\"option__desc\">\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #option=\"option\">\n\t\t\t\t\t\t<span class=\"option__wrapper\">\n\t\t\t\t\t\t\t<span v-if=\"option.class\" :class=\"option.class\" class=\"avatar\" />\n\t\t\t\t\t\t\t<NcAvatar v-else-if=\"option.method !== 2\" allow-placeholder :display-name=\"option.title\" />\n\t\t\t\t\t\t\t<span class=\"option__title\">{{ option.title }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<p class=\"hint\">\n\t\t\t\t\t\t{{ t('Connect items to a project to make them easier to find') }}\n\t\t\t\t\t</p>\n\t\t\t\t</NcSelect>\n\t\t\t</div>\n\t\t</li>\n\t\t<transition name=\"fade\">\n\t\t\t<li v-if=\"error\" class=\"error\">\n\t\t\t\t{{ error }}\n\t\t\t</li>\n\t\t</transition>\n\t\t<NcCollectionListItem\n\t\t\tv-for=\"collection in collections\"\n\t\t\t:key=\"collection.id\"\n\t\t\t:collection=\"collection\"\n\t\t\t:error=\"collectionsError[collection.id]\"\n\t\t\t@rename-collection=\"renameCollectionFromItem\"\n\t\t\t@remove-resource=\"removeResourceFromCollection\" />\n\t</ul>\n</template>\n\n<script>\nimport debounce from 'debounce'\nimport { ref } from 'vue'\nimport NcCollectionListItem from './NcCollectionListItem.vue'\nimport { t } from '../../l10n.js'\nimport { logger } from '../../utils/logger.ts'\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcSelect from '../NcSelect/index.js'\nimport { searchService } from './service.ts'\nimport { useCollections } from './useCollections.js'\n\nconst METHOD_CREATE_COLLECTION = 0\nconst METHOD_ADD_TO_COLLECTION = 1\n\nexport default {\n\tname: 'NcCollectionList',\n\n\tcomponents: {\n\t\tNcCollectionListItem,\n\t\tNcAvatar,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Resource type identifier\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Unique id of the resource\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Name of the resource\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether the component is active (to start fetch resources)\n\t\t */\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t} = useCollections()\n\n\t\tconst searchCollections = ref([])\n\t\tconst search = debounce(function(query, loading) {\n\t\t\tif (query !== '') {\n\t\t\t\tloading(true)\n\t\t\t\tsearchService(query).then((collections) => {\n\t\t\t\t\tsearchCollections.value = collections\n\t\t\t\t}).catch((error) => {\n\t\t\t\t\tlogger.error('Failed to search for collections', { error })\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tloading(false)\n\t\t\t\t})\n\t\t\t}\n\t\t}, 500)\n\n\t\treturn {\n\t\t\tstoredCollections,\n\t\t\tfetchCollectionsByResource,\n\t\t\tcreateCollection,\n\t\t\taddResourceToCollection,\n\t\t\tremoveResourceFromCollection,\n\t\t\trenameCollection,\n\t\t\tsearchCollections,\n\t\t\tsearch,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tselectIsOpen: false,\n\t\t\tgeneratingCodes: false,\n\t\t\tcodes: undefined,\n\t\t\tvalue: null,\n\t\t\tmodel: {},\n\t\t\tcollectionsError: {},\n\t\t\terror: null,\n\t\t\tisSelectOpen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcollections() {\n\t\t\treturn this.storedCollections.filter((collection) => collection.resources\n\t\t\t\t.some((resource) => resource && resource.id === String(this.id) && resource.type === this.type))\n\t\t},\n\n\t\tplaceholder() {\n\t\t\treturn this.isSelectOpen\n\t\t\t\t? t('Type to search for existing projects')\n\t\t\t\t: t('Add to a project')\n\t\t},\n\n\t\toptions() {\n\t\t\tconst options = []\n\t\t\twindow.OCP.Collaboration.getTypes().sort().forEach((type) => {\n\t\t\t\toptions.push({\n\t\t\t\t\tmethod: METHOD_CREATE_COLLECTION,\n\t\t\t\t\ttype,\n\t\t\t\t\ttitle: window.OCP.Collaboration.getLabel(type),\n\t\t\t\t\tclass: window.OCP.Collaboration.getIcon(type),\n\t\t\t\t\taction: () => window.OCP.Collaboration.trigger(type),\n\t\t\t\t})\n\t\t\t})\n\t\t\tfor (const index in this.searchCollections) {\n\t\t\t\tif (!this.collections.find((collection) => collection.id === this.searchCollections[index].id)) {\n\t\t\t\t\toptions.push({\n\t\t\t\t\t\tmethod: METHOD_ADD_TO_COLLECTION,\n\t\t\t\t\t\ttitle: this.searchCollections[index].name,\n\t\t\t\t\t\tcollectionId: this.searchCollections[index].id,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn options\n\t\t},\n\n\t\tresourceIdentifier() {\n\t\t\treturn {\n\t\t\t\tresourceType: this.type,\n\t\t\t\tresourceId: this.id,\n\t\t\t\tisActive: this.isActive,\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tresourceIdentifier: {\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t\thandler(resourceIdentifier) {\n\t\t\t\tif (!resourceIdentifier.isActive || !resourceIdentifier.resourceId || !resourceIdentifier.resourceType) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.fetchCollectionsByResource(resourceIdentifier)\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tselect(selectedOption) {\n\t\t\tif (selectedOption.method === METHOD_CREATE_COLLECTION) {\n\t\t\t\tselectedOption.action().then((resourceId) => {\n\t\t\t\t\tthis.createCollection({\n\t\t\t\t\t\tbaseResourceType: this.type,\n\t\t\t\t\t\tbaseResourceId: this.id,\n\t\t\t\t\t\tresourceType: selectedOption.type,\n\t\t\t\t\t\tresourceId,\n\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\tthis.setError(t('Failed to create a project'), e)\n\t\t\t\t\t})\n\t\t\t\t}).catch((error) => {\n\t\t\t\t\tlogger.error('No resource selected', { error })\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (selectedOption.method === METHOD_ADD_TO_COLLECTION) {\n\t\t\t\tthis.addResourceToCollection({\n\t\t\t\t\tcollectionId: selectedOption.collectionId, resourceType: this.type, resourceId: this.id,\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\tthis.setError(t('Failed to add the item to the project'), e)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.value = null\n\t\t},\n\n\t\tshowSelect() {\n\t\t\tthis.selectIsOpen = true\n\t\t\tthis.$refs.select.$el.focus()\n\t\t},\n\n\t\tsetError(error, e) {\n\t\t\tlogger.error(error, { error: e })\n\t\t\tthis.error = error\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.error = null\n\t\t\t}, 5000)\n\t\t},\n\n\t\trenameCollectionFromItem({ collectionId, name }) {\n\t\t\tthis.renameCollection({ collectionId, name })\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tlogger.error(t('Failed to rename the project'), { error })\n\t\t\t\t\tthis.collectionsError[collectionId] = t('Failed to rename the project')\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tthis.collectionsError[collectionId] = null\n\t\t\t\t\t}, 5000)\n\t\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.collection-list * {\n\tbox-sizing: border-box;\n}\n\n.collection-list > li {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\n\t& > .avatar {\n\t\tmargin-top: 0;\n\t}\n}\n\n#collection-select-container {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.v-select {\n\t// NcAvatar in the dropdown\n\tspan.avatar {\n\t\tdisplay: block;\n\t\tpadding: 16px;\n\t\topacity: .7;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\n\t\t&:hover {\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\np.hint {\n\tz-index: 1;\n\t// fix alignment\n\tmargin-top: -16px;\n\tpadding: 8px 8px;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: normal;\n}\n\ndiv.avatar {\n\twidth: 32px;\n\theight: 32px;\n\tmargin: 0;\n\tpadding: 8px;\n\tbackground-color: var(--color-background-dark);\n\tmargin-top: 30px;\n}\n\n/** TODO provide white icon in core */\n.icon-projects {\n\tdisplay: block;\n\tpadding: 8px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: center;\n}\n\n.option__wrapper {\n\tdisplay: flex;\n\n\t.avatar {\n\t\tdisplay: block;\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tbackground-color: var(--color-background-darker) !important;\n\t}\n\n\t.option__title {\n\t\tpadding: 4px;\n\t}\n}\n\n.fade-enter-active, .fade-leave-active {\n\ttransition: opacity .5s;\n}\n\n.fade-enter, .fade-leave-to {\n\topacity: 0;\n}\n\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;;;;AAiFA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,mBAAA,mBAAA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,CAAA,aAAA,CAAA,SAAA,SAAA;AAAA,IACA;AAAA,IAEA,YAAA;AACA,aAAA,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AAA,MAAA;AACA,eAAA,iBAAA,YAAA,IAAA;AAAA,QACA,GAAA,GAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,42 +3,24 @@ import { defineComponent, ref, computed } from "vue";
3
3
  import { h as mdiDotsHorizontal, i as mdiCloseCircleOutline, a as mdiCheck, j as mdiArrowLeft } from "./mdi-CKSXwCsV.mjs";
4
4
  import { useVModel } from "@vueuse/core";
5
5
  import { Chrome } from "vue-color";
6
- import { N as NcButton } from "./NcButton-D3CaJu1f.mjs";
7
- import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BCVwmZN2.mjs";
8
- import { N as NcPopover } from "./NcPopover-nzbq2IjT.mjs";
9
- import { u as useModelMigration } from "./useModelMigration-DBUi8saj.mjs";
10
- import { r as register, a as t } from "./_l10n-DSLCwJSN.mjs";
11
- import { d as defaultPalette, a as COLOR_BLACK, b as COLOR_WHITE } from "./colors-BMiIMYXK.mjs";
12
- import { c as createElementId } from "./createElementId-5skgwxOP.mjs";
6
+ import { N as NcButton } from "./NcButton-DUZTtFhr.mjs";
7
+ import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BreCg8pX.mjs";
8
+ import { N as NcPopover } from "./NcPopover-gxcAqoEb.mjs";
9
+ import { u as useModelMigration } from "./useModelMigration-EhAWvqDD.mjs";
10
+ import { r as register, a as t } from "./_l10n-BWisB7-O.mjs";
11
+ import { d as defaultPalette, a as COLOR_BLACK, b as COLOR_WHITE } from "./colors-D3xlq-id.mjs";
12
+ import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
13
13
  import { l as logger } from "./logger-D3RVzcfQ.mjs";
14
14
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
15
15
  register();
16
- var __defProp = Object.defineProperty;
17
- var __defProps = Object.defineProperties;
18
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
19
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
20
- var __hasOwnProp = Object.prototype.hasOwnProperty;
21
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
22
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
23
- var __spreadValues = (a, b) => {
24
- for (var prop in b || (b = {}))
25
- if (__hasOwnProp.call(b, prop))
26
- __defNormalProp(a, prop, b[prop]);
27
- if (__getOwnPropSymbols)
28
- for (var prop of __getOwnPropSymbols(b)) {
29
- if (__propIsEnum.call(b, prop))
30
- __defNormalProp(a, prop, b[prop]);
31
- }
32
- return a;
33
- };
34
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
35
16
  const __default__ = {
36
17
  model: {
37
18
  event: "update:modelValue",
38
19
  prop: "modelValue"
39
20
  }
40
21
  };
41
- const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
22
+ const _sfc_main = /* @__PURE__ */ defineComponent({
23
+ ...__default__,
42
24
  __name: "NcColorPicker",
43
25
  props: {
44
26
  advancedFields: { type: Boolean },
@@ -59,10 +41,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
59
41
  const id = createElementId();
60
42
  const advanced = ref(false);
61
43
  const normalizedPalette = computed(() => {
62
- var _a;
63
44
  let palette = props.palette;
64
45
  for (const color of palette) {
65
- if (typeof color === "string" && !color.match(HEX_REGEX) || typeof color === "object" && !((_a = color.color) == null ? void 0 : _a.match(HEX_REGEX))) {
46
+ if (typeof color === "string" && !color.match(HEX_REGEX) || typeof color === "object" && !color.color?.match(HEX_REGEX)) {
66
47
  logger.error("[NcColorPicker] Invalid palette passed", { color });
67
48
  palette = [];
68
49
  break;
@@ -105,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
105
86
  }
106
87
  return { __sfc: true, props, emit, currentColor, modelOpen, HEX_REGEX, id, advanced, normalizedPalette, handleConfirm, toggleColor, pickCustomColor, getContrastColor, calculateLuma, hexToRGB, mdiArrowLeft, mdiCheck, mdiCloseCircleOutline, mdiDotsHorizontal, Chrome, NcButton, NcIconSvgWrapper, NcPopover, t };
107
88
  }
108
- }));
89
+ });
109
90
  var _sfc_render = function render() {
110
91
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
111
92
  return _c(_setup.NcPopover, _vm._g(_vm._b({ attrs: { "shown": _setup.modelOpen, "container": _vm.container, "popup-role": "dialog" }, on: { "update:shown": function($event) {
@@ -115,7 +96,6 @@ var _sfc_render = function render() {
115
96
  } }, scopedSlots: _vm._u([{ key: "trigger", fn: function(slotProps) {
116
97
  return [_vm._t("default", null, null, slotProps)];
117
98
  } }, { key: "default", fn: function(slotProps) {
118
- var _a;
119
99
  return [_c("div", { staticClass: "color-picker", class: {
120
100
  "color-picker--advanced-fields": _setup.advanced && _vm.advancedFields,
121
101
  "color-picker--clearable": _vm.clearable
@@ -123,12 +103,12 @@ var _sfc_render = function render() {
123
103
  return _c("label", { key: index, staticClass: "color-picker__simple-color-circle", class: { "color-picker__simple-color-circle--active": color === _setup.currentColor }, style: {
124
104
  backgroundColor: color,
125
105
  color: _setup.getContrastColor(color)
126
- } }, [_c("span", { staticClass: "hidden-visually" }, [_vm._v(" " + _vm._s(color) + " -- " + _vm._s(_setup.currentColor) + " ")]), color === _setup.currentColor ? _c(_setup.NcIconSvgWrapper, { attrs: { "path": _setup.mdiCheck } }) : _vm._e(), _c("input", { staticClass: "hidden-visually", attrs: { "type": "radio", "aria-label": name, "name": "color-picker-".concat(_setup.id) }, domProps: { "checked": color === _setup.currentColor }, on: { "click": function($event) {
106
+ } }, [_c("span", { staticClass: "hidden-visually" }, [_vm._v(" " + _vm._s(color) + " -- " + _vm._s(_setup.currentColor) + " ")]), color === _setup.currentColor ? _c(_setup.NcIconSvgWrapper, { attrs: { "path": _setup.mdiCheck } }) : _vm._e(), _c("input", { staticClass: "hidden-visually", attrs: { "type": "radio", "aria-label": name, "name": `color-picker-${_setup.id}` }, domProps: { "checked": color === _setup.currentColor }, on: { "click": function($event) {
127
107
  return _setup.toggleColor(color);
128
108
  } } })], 1);
129
- }), _vm.clearable ? _c("label", { staticClass: "color-picker__clear", attrs: { "title": _setup.t("No color") } }, [_c(_setup.NcIconSvgWrapper, { attrs: { "size": _setup.currentColor ? 28 : 34, "path": _setup.mdiCloseCircleOutline } }), _c("input", { staticClass: "hidden-visually", attrs: { "type": "radio", "aria-label": _setup.t("No color"), "name": "color-picker-".concat(_setup.id) }, domProps: { "checked": !_setup.currentColor }, on: { "click": function($event) {
109
+ }), _vm.clearable ? _c("label", { staticClass: "color-picker__clear", attrs: { "title": _setup.t("No color") } }, [_c(_setup.NcIconSvgWrapper, { attrs: { "size": _setup.currentColor ? 28 : 34, "path": _setup.mdiCloseCircleOutline } }), _c("input", { staticClass: "hidden-visually", attrs: { "type": "radio", "aria-label": _setup.t("No color"), "name": `color-picker-${_setup.id}` }, domProps: { "checked": !_setup.currentColor }, on: { "click": function($event) {
130
110
  _setup.currentColor = void 0;
131
- } } })], 1) : _vm._e()], 2) : _c(_setup.Chrome, { staticClass: "color-picker__advanced", attrs: { "disable-alpha": true, "disable-fields": !_vm.advancedFields, "value": (_a = _setup.currentColor) != null ? _a : "#000000" }, on: { "input": _setup.pickCustomColor } })], 1), !_vm.paletteOnly ? _c("div", { staticClass: "color-picker__navigation" }, [_setup.advanced ? _c(_setup.NcButton, { attrs: { "aria-label": _setup.t("Back"), "title": _setup.t("Back"), "variant": "tertiary" }, on: { "click": function($event) {
111
+ } } })], 1) : _vm._e()], 2) : _c(_setup.Chrome, { staticClass: "color-picker__advanced", attrs: { "disable-alpha": true, "disable-fields": !_vm.advancedFields, "value": _setup.currentColor ?? "#000000" }, on: { "input": _setup.pickCustomColor } })], 1), !_vm.paletteOnly ? _c("div", { staticClass: "color-picker__navigation" }, [_setup.advanced ? _c(_setup.NcButton, { attrs: { "aria-label": _setup.t("Back"), "title": _setup.t("Back"), "variant": "tertiary" }, on: { "click": function($event) {
132
112
  _setup.advanced = false;
133
113
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
134
114
  return [_c(_setup.NcIconSvgWrapper, { attrs: { "directional": "", "path": _setup.mdiArrowLeft } })];
@@ -154,4 +134,4 @@ const NcColorPicker = __component__.exports;
154
134
  export {
155
135
  NcColorPicker as N
156
136
  };
157
- //# sourceMappingURL=NcColorPicker-DpLU-oKM.mjs.map
137
+ //# sourceMappingURL=NcColorPicker-BoS26yac.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcColorPicker-DpLU-oKM.mjs","sources":["../../src/components/NcColorPicker/NcColorPicker.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Color } from '../../utils/colors.ts'\n\nimport { mdiArrowLeft, mdiCheck, mdiCloseCircleOutline, mdiDotsHorizontal } from '@mdi/js'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { Chrome } from 'vue-color'\nimport NcButton from '../NcButton/NcButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcPopover from '../NcPopover/NcPopover.vue'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { t } from '../../l10n.js'\nimport { COLOR_BLACK, COLOR_WHITE, defaultPalette } from '../../utils/colors.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * Set to `true` to enable advanced fields including HEX, RGB, and HSL\n\t */\n\tadvancedFields?: boolean\n\n\t/**\n\t * Allow to clear the current color.\n\t * When set the `update:modelValue` and `submit` event might emit also `undefined`.\n\t */\n\tclearable?: boolean\n\n\t/**\n\t * Selector for the popover container\n\t */\n\tcontainer?: string | Element\n\n\t/**\n\t * The model value (selected color).\n\t */\n\tmodelValue?: string // eslint-disable-line vue/no-unused-properties -- used by useModelMigration\n\n\t/**\n\t * @deprecated use `modelValue`\n\t */\n\tvalue?: string // eslint-disable-line vue/no-unused-properties -- used by useModelMigration\n\n\t/**\n\t * Current open state of the color picker\n\t */\n\topen?: boolean // eslint-disable-line vue/no-unused-properties -- used by useVModel\n\n\t/**\n\t * Provide a custom array of colors to show.\n\t * Can be either an array of string hexadecimal colors,\n\t * or an array of object with a `color` property with hexadecimal color string,\n\t * and a `name` property for accessibility.\n\t */\n\tpalette?: string[] | Color[]\n\n\t/**\n\t * Limit selectable colors to only the provided palette\n\t */\n\tpaletteOnly?: boolean\n}>(), {\n\tcontainer: 'body',\n\tpalette: () => [],\n\tmodelValue: '',\n\tvalue: undefined,\n})\n\nconst emit = defineEmits<{\n\t/**\n\t * Emitted when the submit button was pressed.\n\t * The payload is the same as the current modelValue.\n\t *\n\t * The value might be undefined if the `clearable` prop is set.\n\t */\n\t(e: 'submit', v: string | undefined): void\n\n\t/**\n\t * The color picker was fully closed.\n\t */\n\t(e: 'close'): void\n\n\t/**\n\t * The updated color\n\t */\n\t(e: 'update:modelValue', v: string | undefined): void\n\n\t/**\n\t * @deprecated use `update:modelValue`\n\t */\n\t(e: 'update:value', v: string | undefined): void\n}>()\n\nconst currentColor = useModelMigration<string | undefined>('value', 'update:value', true)\n// watchEffect(() => console.error('current: ', currentColor.value))\n\nconst modelOpen = useVModel(props, 'open', emit, { passive: true, eventName: 'update:open' })\n\nconst HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i\n\n/**\n * Unique id used to identify different color pickers\n */\nconst id = createElementId()\n\n/**\n * Is the advanced picker is open\n */\nconst advanced = ref(false)\n\n/**\n * Normalized palette by converting array of hex colors to color objects.\n * This also ensures there is a default palette if needed (no palette passed).\n */\nconst normalizedPalette = computed(() => {\n\tlet palette = props.palette as (string | Color)[]\n\tfor (const color of palette) {\n\t\tif ((typeof color === 'string' && !color.match(HEX_REGEX))\n\t\t\t|| (typeof color === 'object' && !color.color?.match(HEX_REGEX))) {\n\t\t\tlogger.error('[NcColorPicker] Invalid palette passed', { color })\n\t\t\tpalette = []\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (palette.length === 0) {\n\t\tpalette = props.clearable\n\t\t\t? [...defaultPalette, COLOR_BLACK, COLOR_WHITE]\n\t\t\t: [...defaultPalette]\n\t}\n\n\treturn palette.map((item: Color | string) => ({\n\t\tcolor: typeof item === 'object' ? item.color : item,\n\t\tname: typeof item === 'object' && item.name\n\t\t\t? item.name\n\t\t\t: t('A color with a HEX value {hex}', { hex: typeof item === 'string' ? item : item.color }),\n\t}))\n})\n\n/**\n * Submit a picked colour and close picker\n *\n * @param hideCallback - callback to close popover\n */\nfunction handleConfirm(hideCallback: () => void) {\n\temit('submit', currentColor.value)\n\thideCallback()\n\tadvanced.value = false\n}\n\n/**\n * Toggle the currently selected palette color.\n *\n * @param color - The color to toggle\n */\nfunction toggleColor(color: string | Color) {\n\tcolor = typeof color === 'string' ? color : color.color\n\n\tif (props.clearable && currentColor.value === color) {\n\t\tcurrentColor.value = undefined\n\t} else {\n\t\tcurrentColor.value = color\n\t}\n}\n\n/**\n * @param color - The picked color from the Chrome component\n * @param color.hex - The hex string of the color\n */\nfunction pickCustomColor(color: { hex: string }): void {\n\tcurrentColor.value = color.hex\n}\n\n/**\n * Get the text color with the most constrast for a given background color.\n *\n * @param color - The background color\n */\nfunction getContrastColor(color: string): string {\n\treturn calculateLuma(color) > 0.5\n\t\t? COLOR_BLACK.color\n\t\t: COLOR_WHITE.color\n}\n\n/**\n * Calculate luminance of provided hex color\n *\n * @param color - The hex color\n */\nfunction calculateLuma(color: string) {\n\tconst [red, green, blue] = hexToRGB(color)\n\treturn (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255\n}\n\n/**\n * Convert hex color to RGB\n *\n * @param hex - The hex color\n */\nfunction hexToRGB(hex: string) {\n\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\treturn result\n\t\t? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]\n\t\t: [0, 0, 0]\n}\n</script>\n\n<script lang=\"ts\">\nexport default {\n\tmodel: {\n\t\tevent: 'update:modelValue',\n\t\tprop: 'modelValue',\n\t},\n}\n</script>\n\n<template>\n\t<NcPopover\n\t\t:shown.sync=\"modelOpen\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-hide=\"emit('close')\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<template #default=\"slotProps\">\n\t\t\t<div\n\t\t\t\trole=\"dialog\"\n\t\t\t\tclass=\"color-picker\"\n\t\t\t\taria-modal=\"true\"\n\t\t\t\t:aria-label=\"t('Color picker')\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'color-picker--advanced-fields': advanced && advancedFields,\n\t\t\t\t\t'color-picker--clearable': clearable,\n\t\t\t\t}\">\n\t\t\t\t<Transition name=\"slide\" mode=\"out-in\">\n\t\t\t\t\t<div v-if=\"!advanced\" class=\"color-picker__simple\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tv-for=\"({ color, name }, index) in normalizedPalette\"\n\t\t\t\t\t\t\t:key=\"index\"\n\t\t\t\t\t\t\tclass=\"color-picker__simple-color-circle\"\n\t\t\t\t\t\t\t:class=\"{ 'color-picker__simple-color-circle--active': color === currentColor }\"\n\t\t\t\t\t\t\t:style=\"{\n\t\t\t\t\t\t\t\tbackgroundColor: color,\n\t\t\t\t\t\t\t\tcolor: getContrastColor(color),\n\t\t\t\t\t\t\t}\">\n\t\t\t\t\t\t\t<span class=\"hidden-visually\">\n\t\t\t\t\t\t\t\t{{ color }} -- {{ currentColor }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<NcIconSvgWrapper v-if=\"color === currentColor\" :path=\"mdiCheck\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"name\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${id}`\"\n\t\t\t\t\t\t\t\t:checked=\"color === currentColor\"\n\t\t\t\t\t\t\t\t@click=\"toggleColor(color)\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label v-if=\"clearable\" class=\"color-picker__clear\" :title=\"t('No color')\">\n\t\t\t\t\t\t\t<NcIconSvgWrapper\n\t\t\t\t\t\t\t\t:size=\"currentColor ? 28 : 34 /* size is adusted so that inner mdi icon aligns with color circles */\"\n\t\t\t\t\t\t\t\t:path=\"mdiCloseCircleOutline\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('No color')\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${id}`\"\n\t\t\t\t\t\t\t\t:checked=\"!currentColor\"\n\t\t\t\t\t\t\t\t@click=\"currentColor = undefined\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Chrome\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"color-picker__advanced\"\n\t\t\t\t\t\t:disable-alpha=\"true\"\n\t\t\t\t\t\t:disable-fields=\"!advancedFields\"\n\t\t\t\t\t\t:value=\"currentColor ?? '#000000'\"\n\t\t\t\t\t\t@input=\"pickCustomColor\" />\n\t\t\t\t</Transition>\n\t\t\t\t<div v-if=\"!paletteOnly\" class=\"color-picker__navigation\">\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-if=\"advanced\"\n\t\t\t\t\t\t:aria-label=\"t('Back')\"\n\t\t\t\t\t\t:title=\"t('Back')\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"advanced = false\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiArrowLeft\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\t:aria-label=\"t('More options')\"\n\t\t\t\t\t\t:title=\"t('More options')\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"advanced = true\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiDotsHorizontal\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t@click=\"handleConfirm(slotProps.hide)\">\n\t\t\t\t\t\t{{ t('Choose') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</template>\n\t</NcPopover>\n</template>\n\n<style lang=\"scss\" scoped>\n.color-picker {\n\tdisplay: flex;\n\toverflow: hidden;\n\talign-content: flex-end;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tpadding: var(--border-radius-element); // align with NcPopover border radius\n\tmin-width: calc(4 * var(--default-clickable-area) + 2 * var(--border-radius-element)); // space for 4 color circles\n\n\t&--clearable {\n\t\tmin-width: calc(5 * var(--default-clickable-area) + 2 * var(--border-radius-element));\n\t}\n\n\t&--advanced-fields {\n\t\tmin-width: 264px;\n\t}\n\n\t&__clear {\n\t\tcolor: var(--color-main-text);\n\n\t\t&:hover:not(:has(:checked)) {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t&__simple {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, var(--default-clickable-area));\n\t\tgrid-auto-rows: var(--default-clickable-area);\n\n\t\t&-color-circle {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: calc(var(--default-clickable-area) - 10px);\n\t\t\theight: calc(var(--default-clickable-area) - 10px);\n\t\t\tmin-height: calc(var(--default-clickable-area) - 10px);\n\t\t\tmargin: auto;\n\t\t\tpadding: 0;\n\t\t\tcolor: white;\n\t\t\tborder: 1px solid rgba(0, 0, 0, 0.25);\n\t\t\tborder-radius: 50%;\n\t\t\tfont-size: 16px;\n\t\t\t&:focus-within {\n\t\t\t\toutline: 2px solid var(--color-main-text);\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\topacity: .6;\n\t\t\t}\n\t\t\t&--active {\n\t\t\t\twidth: calc(var(--default-clickable-area) - 6px);\n\t\t\t\theight: calc(var(--default-clickable-area) - 6px);\n\t\t\t\tmin-height: calc(var(--default-clickable-area) - 6px);\n\t\t\t\ttransition: all 100ms ease-in-out;\n\t\t\t\topacity: 1 !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__advanced {\n\t\tbox-shadow: none !important;\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: var(--default-grid-baseline);\n\t\tjustify-content: space-between;\n\t\tmargin-top: calc(2 * var(--default-grid-baseline));\n\t}\n}\n\n:deep() .vc {\n\t&-chrome {\n\t\twidth: unset;\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&-color-wrap {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\n\t\t&-active-color {\n\t\t\tborder-radius: 17px;\n\t\t}\n\n\t\t&-body {\n\t\t\tpadding: 14px 0 0 0;\n\t\t\tbackground-color: var(--color-main-background);\n\n\t\t\t.vc-input__input {\n\t\t\t\t--input-border-radius: var(--border-radius-element, var(--border-radius-large));\n\t\t\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\t\t\twidth: 100%;\n\t\t\t\theight: var(--default-clickable-area);\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-inline: calc(var(--border-radius-large) + var(--input-border-width-offset));\n\t\t\t\tpadding-block: var(--input-border-width-offset);\n\t\t\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\t\t\t\tborder-radius: var(--input-border-radius);\n\t\t\t\tfont-size: var(--default-font-size);\n\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\tbox-shadow: none;\n\n\t\t\t\t&:active:not([disabled]),\n\t\t\t\t&:hover:not([disabled]),\n\t\t\t\t&:focus:not([disabled]) {\n\t\t\t\t\t// Reset padding offset when focused\n\t\t\t\t\t--input-border-width-offset: 0px;\n\t\t\t\t\tborder-color: var(--color-main-text);\n\t\t\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\n\t\t\t\t\t& + .vc-input__label {\n\t\t\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vc-input__label {\n\t\t\t\tposition: absolute;\n\t\t\t\tinset-inline: var(--border-width-input-focused, 2px);\n\t\t\t\tinset-block-start: calc(-1.5 * var(--font-size-small, 13px) / 2);\n\t\t\t\tmax-width: fit-content;\n\t\t\t\tmargin-inline: calc(var(--border-radius-large) - var(--default-grid-baseline));\n\t\t\t\tmargin-block: 0;\n\t\t\t\tpadding-inline: var(--default-grid-baseline);\n\t\t\t\tfont-family: var(--font-face);\n\t\t\t\tfont-size: var(--font-size-small, 13px);\n\t\t\t\tline-height: 1.5;\n\t\t\t\tfont-weight: 500;\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\n\t\t&-toggle-btn {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tmargin-inline-start: 6px;\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\n\t\t&-toggle-icon {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t&-toggle-icon-highlight {\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tinset: 0;\n\t\t}\n\n\t\t&-saturation {\n\t\t\t&-wrap {\n\t\t\t\tborder-radius: 3px;\n\t\t\t}\n\n\t\t\t&-circle {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.slide {\n\t&-enter {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-to {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave-to {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-active,\n\t&-leave-active {\n\t\ttransition: all 50ms ease-in-out;\n\t}\n}\n</style>\n\n<docs>\n### General description\n\nThis component allows the user to choose a color. It consists of 2\nactual pickers:\n\n- One simple picker with a predefined palette of colors;\n- One more advanced picker that provides the full color spectrum;\n\n### Usage\n\n* Using v-model and passing in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<NcColorPicker v-model=\"color\" :palette=\"customPalette\">\n\t\t\t<NcButton> Click Me for a custom palette </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\tcustomPalette: [\n\t\t\t\t'#E40303',\n\t\t\t\t'#FF8C00',\n\t\t\t\t'#FFED00',\n\t\t\t\t'#008026',\n\t\t\t\t'#24408E',\n\t\t\t\t'#732982',\n\t\t\t\t'#5BCEFA',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#FFFFFF',\n\t\t\t\t'#F5A9B8',\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using v-bind for both color and open state and emitting an event that updates the color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcButton @click=\"open = !open\"> Click Me </NcButton>\n\t\t<NcColorPicker v-model=\"color\" :open.sync=\"open\" v-slot=\"{ attrs }\">\n\t\t\t<div v-bind=\"attrs\" :style=\"{'background-color': color}\" class=\"color1\" />\n\t\t</NcColorPicker>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t},\n}\n</script>\n<style>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color1 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Allowing to clear the selected color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcColorPicker clearable v-model=\"color\">\n\t\t\t<NcButton>Click Me</NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color-preview\" :class=\"{'color-preview--none': !color}\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t}\n}\n</script>\n<style scoped>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color-preview {\n\twidth: 100px;\n\theight: 34px;\n\tborder: 1px solid black;\n\tborder-radius: 6px;\n}\n\n.color-preview--none {\n\tbackground: repeating-conic-gradient(#808080 0 25%, #0000 0 50%) 50% / 20px 20px;\n}\n</style>\n```\n\n* Using advanced fields including HEX, RGB, and HSL:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\"\n\t\t\t:advanced-fields=\"true\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9'\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoNA,MAAA,cAAe;AAAA,EACd,OAAO;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAER;;;;;;;;;;;;;;;;AAxHA,UAAM,eAAe,kBAAsC,SAAS,gBAAgB,IAAI;AAGxF,UAAM,YAAY,UAAU,OAAO,QAAQ,MAAM,EAAE,SAAS,MAAM,WAAW,eAAe;AAE5F,UAAM,YAAY;AAKlB,UAAM,KAAK,gBAAA;AAKX,UAAM,WAAW,IAAI,KAAK;AAM1B,UAAM,oBAAoB,SAAS,MAAM;;AACxC,UAAI,UAAU,MAAM;AACpB,iBAAW,SAAS,SAAS;AAC5B,YAAK,OAAO,UAAU,YAAY,CAAC,MAAM,MAAM,SAAS,KACnD,OAAO,UAAU,YAAY,GAAC,KAAA,MAAM,UAAN,OAAA,SAAA,GAAa,MAAM,SAAA,IAAa;AAClE,iBAAO,MAAM,0CAA0C,EAAE,MAAA,CAAO;AAChE,oBAAU,CAAA;AACV;AAAA,QACD;AAAA,MACD;AAEA,UAAI,QAAQ,WAAW,GAAG;AACzB,kBAAU,MAAM,YACb,CAAC,GAAG,gBAAgB,aAAa,WAAW,IAC5C,CAAC,GAAG,cAAc;AAAA,MACtB;AAEA,aAAO,QAAQ,IAAI,C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2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Color } from '../../utils/colors.ts'\n\nimport { mdiArrowLeft, mdiCheck, mdiCloseCircleOutline, mdiDotsHorizontal } from '@mdi/js'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { Chrome } from 'vue-color'\nimport NcButton from '../NcButton/NcButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcPopover from '../NcPopover/NcPopover.vue'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { t } from '../../l10n.js'\nimport { COLOR_BLACK, COLOR_WHITE, defaultPalette } from '../../utils/colors.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * Set to `true` to enable advanced fields including HEX, RGB, and HSL\n\t */\n\tadvancedFields?: boolean\n\n\t/**\n\t * Allow to clear the current color.\n\t * When set the `update:modelValue` and `submit` event might emit also `undefined`.\n\t */\n\tclearable?: boolean\n\n\t/**\n\t * Selector for the popover container\n\t */\n\tcontainer?: string | Element\n\n\t/**\n\t * The model value (selected color).\n\t */\n\tmodelValue?: string // eslint-disable-line vue/no-unused-properties -- used by useModelMigration\n\n\t/**\n\t * @deprecated use `modelValue`\n\t */\n\tvalue?: string // eslint-disable-line vue/no-unused-properties -- used by useModelMigration\n\n\t/**\n\t * Current open state of the color picker\n\t */\n\topen?: boolean // eslint-disable-line vue/no-unused-properties -- used by useVModel\n\n\t/**\n\t * Provide a custom array of colors to show.\n\t * Can be either an array of string hexadecimal colors,\n\t * or an array of object with a `color` property with hexadecimal color string,\n\t * and a `name` property for accessibility.\n\t */\n\tpalette?: string[] | Color[]\n\n\t/**\n\t * Limit selectable colors to only the provided palette\n\t */\n\tpaletteOnly?: boolean\n}>(), {\n\tcontainer: 'body',\n\tpalette: () => [],\n\tmodelValue: '',\n\tvalue: undefined,\n})\n\nconst emit = defineEmits<{\n\t/**\n\t * Emitted when the submit button was pressed.\n\t * The payload is the same as the current modelValue.\n\t *\n\t * The value might be undefined if the `clearable` prop is set.\n\t */\n\t(e: 'submit', v: string | undefined): void\n\n\t/**\n\t * The color picker was fully closed.\n\t */\n\t(e: 'close'): void\n\n\t/**\n\t * The updated color\n\t */\n\t(e: 'update:modelValue', v: string | undefined): void\n\n\t/**\n\t * @deprecated use `update:modelValue`\n\t */\n\t(e: 'update:value', v: string | undefined): void\n}>()\n\nconst currentColor = useModelMigration<string | undefined>('value', 'update:value', true)\n// watchEffect(() => console.error('current: ', currentColor.value))\n\nconst modelOpen = useVModel(props, 'open', emit, { passive: true, eventName: 'update:open' })\n\nconst HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i\n\n/**\n * Unique id used to identify different color pickers\n */\nconst id = createElementId()\n\n/**\n * Is the advanced picker is open\n */\nconst advanced = ref(false)\n\n/**\n * Normalized palette by converting array of hex colors to color objects.\n * This also ensures there is a default palette if needed (no palette passed).\n */\nconst normalizedPalette = computed(() => {\n\tlet palette = props.palette as (string | Color)[]\n\tfor (const color of palette) {\n\t\tif ((typeof color === 'string' && !color.match(HEX_REGEX))\n\t\t\t|| (typeof color === 'object' && !color.color?.match(HEX_REGEX))) {\n\t\t\tlogger.error('[NcColorPicker] Invalid palette passed', { color })\n\t\t\tpalette = []\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (palette.length === 0) {\n\t\tpalette = props.clearable\n\t\t\t? [...defaultPalette, COLOR_BLACK, COLOR_WHITE]\n\t\t\t: [...defaultPalette]\n\t}\n\n\treturn palette.map((item: Color | string) => ({\n\t\tcolor: typeof item === 'object' ? item.color : item,\n\t\tname: typeof item === 'object' && item.name\n\t\t\t? item.name\n\t\t\t: t('A color with a HEX value {hex}', { hex: typeof item === 'string' ? item : item.color }),\n\t}))\n})\n\n/**\n * Submit a picked colour and close picker\n *\n * @param hideCallback - callback to close popover\n */\nfunction handleConfirm(hideCallback: () => void) {\n\temit('submit', currentColor.value)\n\thideCallback()\n\tadvanced.value = false\n}\n\n/**\n * Toggle the currently selected palette color.\n *\n * @param color - The color to toggle\n */\nfunction toggleColor(color: string | Color) {\n\tcolor = typeof color === 'string' ? color : color.color\n\n\tif (props.clearable && currentColor.value === color) {\n\t\tcurrentColor.value = undefined\n\t} else {\n\t\tcurrentColor.value = color\n\t}\n}\n\n/**\n * @param color - The picked color from the Chrome component\n * @param color.hex - The hex string of the color\n */\nfunction pickCustomColor(color: { hex: string }): void {\n\tcurrentColor.value = color.hex\n}\n\n/**\n * Get the text color with the most constrast for a given background color.\n *\n * @param color - The background color\n */\nfunction getContrastColor(color: string): string {\n\treturn calculateLuma(color) > 0.5\n\t\t? COLOR_BLACK.color\n\t\t: COLOR_WHITE.color\n}\n\n/**\n * Calculate luminance of provided hex color\n *\n * @param color - The hex color\n */\nfunction calculateLuma(color: string) {\n\tconst [red, green, blue] = hexToRGB(color)\n\treturn (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255\n}\n\n/**\n * Convert hex color to RGB\n *\n * @param hex - The hex color\n */\nfunction hexToRGB(hex: string) {\n\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\treturn result\n\t\t? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]\n\t\t: [0, 0, 0]\n}\n</script>\n\n<script lang=\"ts\">\nexport default {\n\tmodel: {\n\t\tevent: 'update:modelValue',\n\t\tprop: 'modelValue',\n\t},\n}\n</script>\n\n<template>\n\t<NcPopover\n\t\t:shown.sync=\"modelOpen\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-hide=\"emit('close')\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<template #default=\"slotProps\">\n\t\t\t<div\n\t\t\t\trole=\"dialog\"\n\t\t\t\tclass=\"color-picker\"\n\t\t\t\taria-modal=\"true\"\n\t\t\t\t:aria-label=\"t('Color picker')\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'color-picker--advanced-fields': advanced && advancedFields,\n\t\t\t\t\t'color-picker--clearable': clearable,\n\t\t\t\t}\">\n\t\t\t\t<Transition name=\"slide\" mode=\"out-in\">\n\t\t\t\t\t<div v-if=\"!advanced\" class=\"color-picker__simple\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tv-for=\"({ color, name }, index) in normalizedPalette\"\n\t\t\t\t\t\t\t:key=\"index\"\n\t\t\t\t\t\t\tclass=\"color-picker__simple-color-circle\"\n\t\t\t\t\t\t\t:class=\"{ 'color-picker__simple-color-circle--active': color === currentColor }\"\n\t\t\t\t\t\t\t:style=\"{\n\t\t\t\t\t\t\t\tbackgroundColor: color,\n\t\t\t\t\t\t\t\tcolor: getContrastColor(color),\n\t\t\t\t\t\t\t}\">\n\t\t\t\t\t\t\t<span class=\"hidden-visually\">\n\t\t\t\t\t\t\t\t{{ color }} -- {{ currentColor }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<NcIconSvgWrapper v-if=\"color === currentColor\" :path=\"mdiCheck\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"name\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${id}`\"\n\t\t\t\t\t\t\t\t:checked=\"color === currentColor\"\n\t\t\t\t\t\t\t\t@click=\"toggleColor(color)\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label v-if=\"clearable\" class=\"color-picker__clear\" :title=\"t('No color')\">\n\t\t\t\t\t\t\t<NcIconSvgWrapper\n\t\t\t\t\t\t\t\t:size=\"currentColor ? 28 : 34 /* size is adusted so that inner mdi icon aligns with color circles */\"\n\t\t\t\t\t\t\t\t:path=\"mdiCloseCircleOutline\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('No color')\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${id}`\"\n\t\t\t\t\t\t\t\t:checked=\"!currentColor\"\n\t\t\t\t\t\t\t\t@click=\"currentColor = undefined\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Chrome\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"color-picker__advanced\"\n\t\t\t\t\t\t:disable-alpha=\"true\"\n\t\t\t\t\t\t:disable-fields=\"!advancedFields\"\n\t\t\t\t\t\t:value=\"currentColor ?? '#000000'\"\n\t\t\t\t\t\t@input=\"pickCustomColor\" />\n\t\t\t\t</Transition>\n\t\t\t\t<div v-if=\"!paletteOnly\" class=\"color-picker__navigation\">\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-if=\"advanced\"\n\t\t\t\t\t\t:aria-label=\"t('Back')\"\n\t\t\t\t\t\t:title=\"t('Back')\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"advanced = false\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiArrowLeft\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\t:aria-label=\"t('More options')\"\n\t\t\t\t\t\t:title=\"t('More options')\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"advanced = true\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiDotsHorizontal\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t@click=\"handleConfirm(slotProps.hide)\">\n\t\t\t\t\t\t{{ t('Choose') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</template>\n\t</NcPopover>\n</template>\n\n<style lang=\"scss\" scoped>\n.color-picker {\n\tdisplay: flex;\n\toverflow: hidden;\n\talign-content: flex-end;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tpadding: var(--border-radius-element); // align with NcPopover border radius\n\tmin-width: calc(4 * var(--default-clickable-area) + 2 * var(--border-radius-element)); // space for 4 color circles\n\n\t&--clearable {\n\t\tmin-width: calc(5 * var(--default-clickable-area) + 2 * var(--border-radius-element));\n\t}\n\n\t&--advanced-fields {\n\t\tmin-width: 264px;\n\t}\n\n\t&__clear {\n\t\tcolor: var(--color-main-text);\n\n\t\t&:hover:not(:has(:checked)) {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t&__simple {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, var(--default-clickable-area));\n\t\tgrid-auto-rows: var(--default-clickable-area);\n\n\t\t&-color-circle {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: calc(var(--default-clickable-area) - 10px);\n\t\t\theight: calc(var(--default-clickable-area) - 10px);\n\t\t\tmin-height: calc(var(--default-clickable-area) - 10px);\n\t\t\tmargin: auto;\n\t\t\tpadding: 0;\n\t\t\tcolor: white;\n\t\t\tborder: 1px solid rgba(0, 0, 0, 0.25);\n\t\t\tborder-radius: 50%;\n\t\t\tfont-size: 16px;\n\t\t\t&:focus-within {\n\t\t\t\toutline: 2px solid var(--color-main-text);\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\topacity: .6;\n\t\t\t}\n\t\t\t&--active {\n\t\t\t\twidth: calc(var(--default-clickable-area) - 6px);\n\t\t\t\theight: calc(var(--default-clickable-area) - 6px);\n\t\t\t\tmin-height: calc(var(--default-clickable-area) - 6px);\n\t\t\t\ttransition: all 100ms ease-in-out;\n\t\t\t\topacity: 1 !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__advanced {\n\t\tbox-shadow: none !important;\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: var(--default-grid-baseline);\n\t\tjustify-content: space-between;\n\t\tmargin-top: calc(2 * var(--default-grid-baseline));\n\t}\n}\n\n:deep() .vc {\n\t&-chrome {\n\t\twidth: unset;\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&-color-wrap {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\n\t\t&-active-color {\n\t\t\tborder-radius: 17px;\n\t\t}\n\n\t\t&-body {\n\t\t\tpadding: 14px 0 0 0;\n\t\t\tbackground-color: var(--color-main-background);\n\n\t\t\t.vc-input__input {\n\t\t\t\t--input-border-radius: var(--border-radius-element, var(--border-radius-large));\n\t\t\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\t\t\twidth: 100%;\n\t\t\t\theight: var(--default-clickable-area);\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-inline: calc(var(--border-radius-large) + var(--input-border-width-offset));\n\t\t\t\tpadding-block: var(--input-border-width-offset);\n\t\t\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\t\t\t\tborder-radius: var(--input-border-radius);\n\t\t\t\tfont-size: var(--default-font-size);\n\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\tbox-shadow: none;\n\n\t\t\t\t&:active:not([disabled]),\n\t\t\t\t&:hover:not([disabled]),\n\t\t\t\t&:focus:not([disabled]) {\n\t\t\t\t\t// Reset padding offset when focused\n\t\t\t\t\t--input-border-width-offset: 0px;\n\t\t\t\t\tborder-color: var(--color-main-text);\n\t\t\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\n\t\t\t\t\t& + .vc-input__label {\n\t\t\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vc-input__label {\n\t\t\t\tposition: absolute;\n\t\t\t\tinset-inline: var(--border-width-input-focused, 2px);\n\t\t\t\tinset-block-start: calc(-1.5 * var(--font-size-small, 13px) / 2);\n\t\t\t\tmax-width: fit-content;\n\t\t\t\tmargin-inline: calc(var(--border-radius-large) - var(--default-grid-baseline));\n\t\t\t\tmargin-block: 0;\n\t\t\t\tpadding-inline: var(--default-grid-baseline);\n\t\t\t\tfont-family: var(--font-face);\n\t\t\t\tfont-size: var(--font-size-small, 13px);\n\t\t\t\tline-height: 1.5;\n\t\t\t\tfont-weight: 500;\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\n\t\t&-toggle-btn {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tmargin-inline-start: 6px;\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\n\t\t&-toggle-icon {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t&-toggle-icon-highlight {\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tinset: 0;\n\t\t}\n\n\t\t&-saturation {\n\t\t\t&-wrap {\n\t\t\t\tborder-radius: 3px;\n\t\t\t}\n\n\t\t\t&-circle {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.slide {\n\t&-enter {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-to {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave-to {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-active,\n\t&-leave-active {\n\t\ttransition: all 50ms ease-in-out;\n\t}\n}\n</style>\n\n<docs>\n### General description\n\nThis component allows the user to choose a color. It consists of 2\nactual pickers:\n\n- One simple picker with a predefined palette of colors;\n- One more advanced picker that provides the full color spectrum;\n\n### Usage\n\n* Using v-model and passing in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<NcColorPicker v-model=\"color\" :palette=\"customPalette\">\n\t\t\t<NcButton> Click Me for a custom palette </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\tcustomPalette: [\n\t\t\t\t'#E40303',\n\t\t\t\t'#FF8C00',\n\t\t\t\t'#FFED00',\n\t\t\t\t'#008026',\n\t\t\t\t'#24408E',\n\t\t\t\t'#732982',\n\t\t\t\t'#5BCEFA',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#FFFFFF',\n\t\t\t\t'#F5A9B8',\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using v-bind for both color and open state and emitting an event that updates the color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcButton @click=\"open = !open\"> Click Me </NcButton>\n\t\t<NcColorPicker v-model=\"color\" :open.sync=\"open\" v-slot=\"{ attrs }\">\n\t\t\t<div v-bind=\"attrs\" :style=\"{'background-color': color}\" class=\"color1\" />\n\t\t</NcColorPicker>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t},\n}\n</script>\n<style>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color1 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Allowing to clear the selected color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcColorPicker clearable v-model=\"color\">\n\t\t\t<NcButton>Click Me</NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color-preview\" :class=\"{'color-preview--none': !color}\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t}\n}\n</script>\n<style scoped>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color-preview {\n\twidth: 100px;\n\theight: 34px;\n\tborder: 1px solid black;\n\tborder-radius: 6px;\n}\n\n.color-preview--none {\n\tbackground: repeating-conic-gradient(#808080 0 25%, #0000 0 50%) 50% / 20px 20px;\n}\n</style>\n```\n\n* Using advanced fields including HEX, RGB, and HSL:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\"\n\t\t\t:advanced-fields=\"true\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9'\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoNA,MAAA,cA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;AAAA,IACD;AAMA,aAAS,gBAAgB,OAA8B;AACtD,mBAAa,QAAQ,MAAM;AAAA,IAC5B;AAOA,aAAS,iBAAiB,OAAuB;AAChD,aAAO,cAAc,KAAK,IAAI,MAC3B,YAAY,QACZ,YAAY;AAAA,IAChB;AAOA,aAAS,cAAc,OAAe;AACrC,YAAM,CAAC,KAAK,OAAO,IAAI,IAAI,SAAS,KAAK;AACzC,cAAQ,SAAS,MAAM,SAAS,QAAQ,SAAS,QAAQ;AAAA,IAC1D;AAOA,aAAS,SAAS,KAAa;AAC9B,YAAM,SAAS,4CAA4C,KAAK,GAAG;AACnE,aAAO,SACJ,CAAC,SAAS,OAAO,CAAC,GAAG,EAAE,GAAG,SAAS,OAAO,CAAC,GAAG,EAAE,GAAG,SAAS,OAAO,CAAC,GAAG,EAAE,CAAC,IAC1E,CAAC,GAAG,GAAG,CAAC;AAAA,IACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,42 +4,24 @@ const Vue = require("vue");
4
4
  const mdi = require("./mdi-Nhb6SBw8.cjs");
5
5
  const core = require("@vueuse/core");
6
6
  const vueColor = require("vue-color");
7
- const NcButton = require("./NcButton-DK7bNZIL.cjs");
8
- const NcIconSvgWrapper = require("./NcIconSvgWrapper-DoVPfeNg.cjs");
9
- const NcPopover = require("./NcPopover-DrXnNOgM.cjs");
10
- const useModelMigration = require("./useModelMigration-HPf30klj.cjs");
11
- const _l10n = require("./_l10n-9b4TMo5Q.cjs");
12
- const colors = require("./colors-DcbJ13is.cjs");
13
- const createElementId = require("./createElementId-DaJhnLzq.cjs");
7
+ const NcButton = require("./NcButton-CJBZrdiL.cjs");
8
+ const NcIconSvgWrapper = require("./NcIconSvgWrapper-D-aKMbf3.cjs");
9
+ const NcPopover = require("./NcPopover-BgUZkmjk.cjs");
10
+ const useModelMigration = require("./useModelMigration-D5zhrNXr.cjs");
11
+ const _l10n = require("./_l10n-eOBJ3Dwl.cjs");
12
+ const colors = require("./colors-BsDQ1Yz3.cjs");
13
+ const createElementId = require("./createElementId-lalylSCf.cjs");
14
14
  const logger = require("./logger-3HuiEIF6.cjs");
15
15
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
16
16
  _l10n.register();
17
- var __defProp = Object.defineProperty;
18
- var __defProps = Object.defineProperties;
19
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
20
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
21
- var __hasOwnProp = Object.prototype.hasOwnProperty;
22
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
23
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
24
- var __spreadValues = (a, b) => {
25
- for (var prop in b || (b = {}))
26
- if (__hasOwnProp.call(b, prop))
27
- __defNormalProp(a, prop, b[prop]);
28
- if (__getOwnPropSymbols)
29
- for (var prop of __getOwnPropSymbols(b)) {
30
- if (__propIsEnum.call(b, prop))
31
- __defNormalProp(a, prop, b[prop]);
32
- }
33
- return a;
34
- };
35
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
36
17
  const __default__ = {
37
18
  model: {
38
19
  event: "update:modelValue",
39
20
  prop: "modelValue"
40
21
  }
41
22
  };
42
- const _sfc_main = /* @__PURE__ */ Vue.defineComponent(__spreadProps(__spreadValues({}, __default__), {
23
+ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
24
+ ...__default__,
43
25
  __name: "NcColorPicker",
44
26
  props: {
45
27
  advancedFields: { type: Boolean },
@@ -60,10 +42,9 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent(__spreadProps(__spreadValu
60
42
  const id = createElementId.createElementId();
61
43
  const advanced = Vue.ref(false);
62
44
  const normalizedPalette = Vue.computed(() => {
63
- var _a;
64
45
  let palette = props.palette;
65
46
  for (const color of palette) {
66
- if (typeof color === "string" && !color.match(HEX_REGEX) || typeof color === "object" && !((_a = color.color) == null ? void 0 : _a.match(HEX_REGEX))) {
47
+ if (typeof color === "string" && !color.match(HEX_REGEX) || typeof color === "object" && !color.color?.match(HEX_REGEX)) {
67
48
  logger.logger.error("[NcColorPicker] Invalid palette passed", { color });
68
49
  palette = [];
69
50
  break;
@@ -106,7 +87,7 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent(__spreadProps(__spreadValu
106
87
  }
107
88
  return { __sfc: true, props, emit, currentColor, modelOpen, HEX_REGEX, id, advanced, normalizedPalette, handleConfirm, toggleColor, pickCustomColor, getContrastColor, calculateLuma, hexToRGB, mdiArrowLeft: mdi.mdiArrowLeft, mdiCheck: mdi.mdiCheck, mdiCloseCircleOutline: mdi.mdiCloseCircleOutline, mdiDotsHorizontal: mdi.mdiDotsHorizontal, Chrome: vueColor.Chrome, NcButton: NcButton.NcButton, NcIconSvgWrapper: NcIconSvgWrapper.NcIconSvgWrapper, NcPopover: NcPopover.NcPopover, t: _l10n.t };
108
89
  }
109
- }));
90
+ });
110
91
  var _sfc_render = function render() {
111
92
  var _vm = this, _c = _vm._self._c, _setup = _vm._self._setupProxy;
112
93
  return _c(_setup.NcPopover, _vm._g(_vm._b({ attrs: { "shown": _setup.modelOpen, "container": _vm.container, "popup-role": "dialog" }, on: { "update:shown": function($event) {
@@ -116,7 +97,6 @@ var _sfc_render = function render() {
116
97
  } }, scopedSlots: _vm._u([{ key: "trigger", fn: function(slotProps) {
117
98
  return [_vm._t("default", null, null, slotProps)];
118
99
  } }, { key: "default", fn: function(slotProps) {
119
- var _a;
120
100
  return [_c("div", { staticClass: "color-picker", class: {
121
101
  "color-picker--advanced-fields": _setup.advanced && _vm.advancedFields,
122
102
  "color-picker--clearable": _vm.clearable
@@ -124,12 +104,12 @@ var _sfc_render = function render() {
124
104
  return _c("label", { key: index, staticClass: "color-picker__simple-color-circle", class: { "color-picker__simple-color-circle--active": color === _setup.currentColor }, style: {
125
105
  backgroundColor: color,
126
106
  color: _setup.getContrastColor(color)
127
- } }, [_c("span", { staticClass: "hidden-visually" }, [_vm._v(" " + _vm._s(color) + " -- " + _vm._s(_setup.currentColor) + " ")]), color === _setup.currentColor ? _c(_setup.NcIconSvgWrapper, { attrs: { "path": _setup.mdiCheck } }) : _vm._e(), _c("input", { staticClass: "hidden-visually", attrs: { "type": "radio", "aria-label": name, "name": "color-picker-".concat(_setup.id) }, domProps: { "checked": color === _setup.currentColor }, on: { "click": function($event) {
107
+ } }, [_c("span", { staticClass: "hidden-visually" }, [_vm._v(" " + _vm._s(color) + " -- " + _vm._s(_setup.currentColor) + " ")]), color === _setup.currentColor ? _c(_setup.NcIconSvgWrapper, { attrs: { "path": _setup.mdiCheck } }) : _vm._e(), _c("input", { staticClass: "hidden-visually", attrs: { "type": "radio", "aria-label": name, "name": `color-picker-${_setup.id}` }, domProps: { "checked": color === _setup.currentColor }, on: { "click": function($event) {
128
108
  return _setup.toggleColor(color);
129
109
  } } })], 1);
130
- }), _vm.clearable ? _c("label", { staticClass: "color-picker__clear", attrs: { "title": _setup.t("No color") } }, [_c(_setup.NcIconSvgWrapper, { attrs: { "size": _setup.currentColor ? 28 : 34, "path": _setup.mdiCloseCircleOutline } }), _c("input", { staticClass: "hidden-visually", attrs: { "type": "radio", "aria-label": _setup.t("No color"), "name": "color-picker-".concat(_setup.id) }, domProps: { "checked": !_setup.currentColor }, on: { "click": function($event) {
110
+ }), _vm.clearable ? _c("label", { staticClass: "color-picker__clear", attrs: { "title": _setup.t("No color") } }, [_c(_setup.NcIconSvgWrapper, { attrs: { "size": _setup.currentColor ? 28 : 34, "path": _setup.mdiCloseCircleOutline } }), _c("input", { staticClass: "hidden-visually", attrs: { "type": "radio", "aria-label": _setup.t("No color"), "name": `color-picker-${_setup.id}` }, domProps: { "checked": !_setup.currentColor }, on: { "click": function($event) {
131
111
  _setup.currentColor = void 0;
132
- } } })], 1) : _vm._e()], 2) : _c(_setup.Chrome, { staticClass: "color-picker__advanced", attrs: { "disable-alpha": true, "disable-fields": !_vm.advancedFields, "value": (_a = _setup.currentColor) != null ? _a : "#000000" }, on: { "input": _setup.pickCustomColor } })], 1), !_vm.paletteOnly ? _c("div", { staticClass: "color-picker__navigation" }, [_setup.advanced ? _c(_setup.NcButton, { attrs: { "aria-label": _setup.t("Back"), "title": _setup.t("Back"), "variant": "tertiary" }, on: { "click": function($event) {
112
+ } } })], 1) : _vm._e()], 2) : _c(_setup.Chrome, { staticClass: "color-picker__advanced", attrs: { "disable-alpha": true, "disable-fields": !_vm.advancedFields, "value": _setup.currentColor ?? "#000000" }, on: { "input": _setup.pickCustomColor } })], 1), !_vm.paletteOnly ? _c("div", { staticClass: "color-picker__navigation" }, [_setup.advanced ? _c(_setup.NcButton, { attrs: { "aria-label": _setup.t("Back"), "title": _setup.t("Back"), "variant": "tertiary" }, on: { "click": function($event) {
133
113
  _setup.advanced = false;
134
114
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
135
115
  return [_c(_setup.NcIconSvgWrapper, { attrs: { "directional": "", "path": _setup.mdiArrowLeft } })];
@@ -153,4 +133,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
153
133
  );
154
134
  const NcColorPicker = __component__.exports;
155
135
  exports.NcColorPicker = NcColorPicker;
156
- //# sourceMappingURL=NcColorPicker-F-UP8OaJ.cjs.map
136
+ //# sourceMappingURL=NcColorPicker-Dg3d5_aQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcColorPicker-F-UP8OaJ.cjs","sources":["../../src/components/NcColorPicker/NcColorPicker.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Color } from '../../utils/colors.ts'\n\nimport { mdiArrowLeft, mdiCheck, mdiCloseCircleOutline, mdiDotsHorizontal } from '@mdi/js'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { Chrome } from 'vue-color'\nimport NcButton from '../NcButton/NcButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcPopover from '../NcPopover/NcPopover.vue'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { t } from '../../l10n.js'\nimport { COLOR_BLACK, COLOR_WHITE, defaultPalette } from '../../utils/colors.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * Set to `true` to enable advanced fields including HEX, RGB, and HSL\n\t */\n\tadvancedFields?: boolean\n\n\t/**\n\t * Allow to clear the current color.\n\t * When set the `update:modelValue` and `submit` event might emit also `undefined`.\n\t */\n\tclearable?: boolean\n\n\t/**\n\t * Selector for the popover container\n\t */\n\tcontainer?: string | Element\n\n\t/**\n\t * The model value (selected color).\n\t */\n\tmodelValue?: string // eslint-disable-line vue/no-unused-properties -- used by useModelMigration\n\n\t/**\n\t * @deprecated use `modelValue`\n\t */\n\tvalue?: string // eslint-disable-line vue/no-unused-properties -- used by useModelMigration\n\n\t/**\n\t * Current open state of the color picker\n\t */\n\topen?: boolean // eslint-disable-line vue/no-unused-properties -- used by useVModel\n\n\t/**\n\t * Provide a custom array of colors to show.\n\t * Can be either an array of string hexadecimal colors,\n\t * or an array of object with a `color` property with hexadecimal color string,\n\t * and a `name` property for accessibility.\n\t */\n\tpalette?: string[] | Color[]\n\n\t/**\n\t * Limit selectable colors to only the provided palette\n\t */\n\tpaletteOnly?: boolean\n}>(), {\n\tcontainer: 'body',\n\tpalette: () => [],\n\tmodelValue: '',\n\tvalue: undefined,\n})\n\nconst emit = defineEmits<{\n\t/**\n\t * Emitted when the submit button was pressed.\n\t * The payload is the same as the current modelValue.\n\t *\n\t * The value might be undefined if the `clearable` prop is set.\n\t */\n\t(e: 'submit', v: string | undefined): void\n\n\t/**\n\t * The color picker was fully closed.\n\t */\n\t(e: 'close'): void\n\n\t/**\n\t * The updated color\n\t */\n\t(e: 'update:modelValue', v: string | undefined): void\n\n\t/**\n\t * @deprecated use `update:modelValue`\n\t */\n\t(e: 'update:value', v: string | undefined): void\n}>()\n\nconst currentColor = useModelMigration<string | undefined>('value', 'update:value', true)\n// watchEffect(() => console.error('current: ', currentColor.value))\n\nconst modelOpen = useVModel(props, 'open', emit, { passive: true, eventName: 'update:open' })\n\nconst HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i\n\n/**\n * Unique id used to identify different color pickers\n */\nconst id = createElementId()\n\n/**\n * Is the advanced picker is open\n */\nconst advanced = ref(false)\n\n/**\n * Normalized palette by converting array of hex colors to color objects.\n * This also ensures there is a default palette if needed (no palette passed).\n */\nconst normalizedPalette = computed(() => {\n\tlet palette = props.palette as (string | Color)[]\n\tfor (const color of palette) {\n\t\tif ((typeof color === 'string' && !color.match(HEX_REGEX))\n\t\t\t|| (typeof color === 'object' && !color.color?.match(HEX_REGEX))) {\n\t\t\tlogger.error('[NcColorPicker] Invalid palette passed', { color })\n\t\t\tpalette = []\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (palette.length === 0) {\n\t\tpalette = props.clearable\n\t\t\t? [...defaultPalette, COLOR_BLACK, COLOR_WHITE]\n\t\t\t: [...defaultPalette]\n\t}\n\n\treturn palette.map((item: Color | string) => ({\n\t\tcolor: typeof item === 'object' ? item.color : item,\n\t\tname: typeof item === 'object' && item.name\n\t\t\t? item.name\n\t\t\t: t('A color with a HEX value {hex}', { hex: typeof item === 'string' ? item : item.color }),\n\t}))\n})\n\n/**\n * Submit a picked colour and close picker\n *\n * @param hideCallback - callback to close popover\n */\nfunction handleConfirm(hideCallback: () => void) {\n\temit('submit', currentColor.value)\n\thideCallback()\n\tadvanced.value = false\n}\n\n/**\n * Toggle the currently selected palette color.\n *\n * @param color - The color to toggle\n */\nfunction toggleColor(color: string | Color) {\n\tcolor = typeof color === 'string' ? color : color.color\n\n\tif (props.clearable && currentColor.value === color) {\n\t\tcurrentColor.value = undefined\n\t} else {\n\t\tcurrentColor.value = color\n\t}\n}\n\n/**\n * @param color - The picked color from the Chrome component\n * @param color.hex - The hex string of the color\n */\nfunction pickCustomColor(color: { hex: string }): void {\n\tcurrentColor.value = color.hex\n}\n\n/**\n * Get the text color with the most constrast for a given background color.\n *\n * @param color - The background color\n */\nfunction getContrastColor(color: string): string {\n\treturn calculateLuma(color) > 0.5\n\t\t? COLOR_BLACK.color\n\t\t: COLOR_WHITE.color\n}\n\n/**\n * Calculate luminance of provided hex color\n *\n * @param color - The hex color\n */\nfunction calculateLuma(color: string) {\n\tconst [red, green, blue] = hexToRGB(color)\n\treturn (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255\n}\n\n/**\n * Convert hex color to RGB\n *\n * @param hex - The hex color\n */\nfunction hexToRGB(hex: string) {\n\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\treturn result\n\t\t? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]\n\t\t: [0, 0, 0]\n}\n</script>\n\n<script lang=\"ts\">\nexport default {\n\tmodel: {\n\t\tevent: 'update:modelValue',\n\t\tprop: 'modelValue',\n\t},\n}\n</script>\n\n<template>\n\t<NcPopover\n\t\t:shown.sync=\"modelOpen\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-hide=\"emit('close')\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<template #default=\"slotProps\">\n\t\t\t<div\n\t\t\t\trole=\"dialog\"\n\t\t\t\tclass=\"color-picker\"\n\t\t\t\taria-modal=\"true\"\n\t\t\t\t:aria-label=\"t('Color picker')\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'color-picker--advanced-fields': advanced && advancedFields,\n\t\t\t\t\t'color-picker--clearable': clearable,\n\t\t\t\t}\">\n\t\t\t\t<Transition name=\"slide\" mode=\"out-in\">\n\t\t\t\t\t<div v-if=\"!advanced\" class=\"color-picker__simple\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tv-for=\"({ color, name }, index) in normalizedPalette\"\n\t\t\t\t\t\t\t:key=\"index\"\n\t\t\t\t\t\t\tclass=\"color-picker__simple-color-circle\"\n\t\t\t\t\t\t\t:class=\"{ 'color-picker__simple-color-circle--active': color === currentColor }\"\n\t\t\t\t\t\t\t:style=\"{\n\t\t\t\t\t\t\t\tbackgroundColor: color,\n\t\t\t\t\t\t\t\tcolor: getContrastColor(color),\n\t\t\t\t\t\t\t}\">\n\t\t\t\t\t\t\t<span class=\"hidden-visually\">\n\t\t\t\t\t\t\t\t{{ color }} -- {{ currentColor }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<NcIconSvgWrapper v-if=\"color === currentColor\" :path=\"mdiCheck\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"name\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${id}`\"\n\t\t\t\t\t\t\t\t:checked=\"color === currentColor\"\n\t\t\t\t\t\t\t\t@click=\"toggleColor(color)\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label v-if=\"clearable\" class=\"color-picker__clear\" :title=\"t('No color')\">\n\t\t\t\t\t\t\t<NcIconSvgWrapper\n\t\t\t\t\t\t\t\t:size=\"currentColor ? 28 : 34 /* size is adusted so that inner mdi icon aligns with color circles */\"\n\t\t\t\t\t\t\t\t:path=\"mdiCloseCircleOutline\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('No color')\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${id}`\"\n\t\t\t\t\t\t\t\t:checked=\"!currentColor\"\n\t\t\t\t\t\t\t\t@click=\"currentColor = undefined\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Chrome\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"color-picker__advanced\"\n\t\t\t\t\t\t:disable-alpha=\"true\"\n\t\t\t\t\t\t:disable-fields=\"!advancedFields\"\n\t\t\t\t\t\t:value=\"currentColor ?? '#000000'\"\n\t\t\t\t\t\t@input=\"pickCustomColor\" />\n\t\t\t\t</Transition>\n\t\t\t\t<div v-if=\"!paletteOnly\" class=\"color-picker__navigation\">\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-if=\"advanced\"\n\t\t\t\t\t\t:aria-label=\"t('Back')\"\n\t\t\t\t\t\t:title=\"t('Back')\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"advanced = false\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiArrowLeft\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\t:aria-label=\"t('More options')\"\n\t\t\t\t\t\t:title=\"t('More options')\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"advanced = true\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiDotsHorizontal\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t@click=\"handleConfirm(slotProps.hide)\">\n\t\t\t\t\t\t{{ t('Choose') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</template>\n\t</NcPopover>\n</template>\n\n<style lang=\"scss\" scoped>\n.color-picker {\n\tdisplay: flex;\n\toverflow: hidden;\n\talign-content: flex-end;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tpadding: var(--border-radius-element); // align with NcPopover border radius\n\tmin-width: calc(4 * var(--default-clickable-area) + 2 * var(--border-radius-element)); // space for 4 color circles\n\n\t&--clearable {\n\t\tmin-width: calc(5 * var(--default-clickable-area) + 2 * var(--border-radius-element));\n\t}\n\n\t&--advanced-fields {\n\t\tmin-width: 264px;\n\t}\n\n\t&__clear {\n\t\tcolor: var(--color-main-text);\n\n\t\t&:hover:not(:has(:checked)) {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t&__simple {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, var(--default-clickable-area));\n\t\tgrid-auto-rows: var(--default-clickable-area);\n\n\t\t&-color-circle {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: calc(var(--default-clickable-area) - 10px);\n\t\t\theight: calc(var(--default-clickable-area) - 10px);\n\t\t\tmin-height: calc(var(--default-clickable-area) - 10px);\n\t\t\tmargin: auto;\n\t\t\tpadding: 0;\n\t\t\tcolor: white;\n\t\t\tborder: 1px solid rgba(0, 0, 0, 0.25);\n\t\t\tborder-radius: 50%;\n\t\t\tfont-size: 16px;\n\t\t\t&:focus-within {\n\t\t\t\toutline: 2px solid var(--color-main-text);\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\topacity: .6;\n\t\t\t}\n\t\t\t&--active {\n\t\t\t\twidth: calc(var(--default-clickable-area) - 6px);\n\t\t\t\theight: calc(var(--default-clickable-area) - 6px);\n\t\t\t\tmin-height: calc(var(--default-clickable-area) - 6px);\n\t\t\t\ttransition: all 100ms ease-in-out;\n\t\t\t\topacity: 1 !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__advanced {\n\t\tbox-shadow: none !important;\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: var(--default-grid-baseline);\n\t\tjustify-content: space-between;\n\t\tmargin-top: calc(2 * var(--default-grid-baseline));\n\t}\n}\n\n:deep() .vc {\n\t&-chrome {\n\t\twidth: unset;\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&-color-wrap {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\n\t\t&-active-color {\n\t\t\tborder-radius: 17px;\n\t\t}\n\n\t\t&-body {\n\t\t\tpadding: 14px 0 0 0;\n\t\t\tbackground-color: var(--color-main-background);\n\n\t\t\t.vc-input__input {\n\t\t\t\t--input-border-radius: var(--border-radius-element, var(--border-radius-large));\n\t\t\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\t\t\twidth: 100%;\n\t\t\t\theight: var(--default-clickable-area);\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-inline: calc(var(--border-radius-large) + var(--input-border-width-offset));\n\t\t\t\tpadding-block: var(--input-border-width-offset);\n\t\t\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\t\t\t\tborder-radius: var(--input-border-radius);\n\t\t\t\tfont-size: var(--default-font-size);\n\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\tbox-shadow: none;\n\n\t\t\t\t&:active:not([disabled]),\n\t\t\t\t&:hover:not([disabled]),\n\t\t\t\t&:focus:not([disabled]) {\n\t\t\t\t\t// Reset padding offset when focused\n\t\t\t\t\t--input-border-width-offset: 0px;\n\t\t\t\t\tborder-color: var(--color-main-text);\n\t\t\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\n\t\t\t\t\t& + .vc-input__label {\n\t\t\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vc-input__label {\n\t\t\t\tposition: absolute;\n\t\t\t\tinset-inline: var(--border-width-input-focused, 2px);\n\t\t\t\tinset-block-start: calc(-1.5 * var(--font-size-small, 13px) / 2);\n\t\t\t\tmax-width: fit-content;\n\t\t\t\tmargin-inline: calc(var(--border-radius-large) - var(--default-grid-baseline));\n\t\t\t\tmargin-block: 0;\n\t\t\t\tpadding-inline: var(--default-grid-baseline);\n\t\t\t\tfont-family: var(--font-face);\n\t\t\t\tfont-size: var(--font-size-small, 13px);\n\t\t\t\tline-height: 1.5;\n\t\t\t\tfont-weight: 500;\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\n\t\t&-toggle-btn {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tmargin-inline-start: 6px;\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\n\t\t&-toggle-icon {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t&-toggle-icon-highlight {\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tinset: 0;\n\t\t}\n\n\t\t&-saturation {\n\t\t\t&-wrap {\n\t\t\t\tborder-radius: 3px;\n\t\t\t}\n\n\t\t\t&-circle {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.slide {\n\t&-enter {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-to {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave-to {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-active,\n\t&-leave-active {\n\t\ttransition: all 50ms ease-in-out;\n\t}\n}\n</style>\n\n<docs>\n### General description\n\nThis component allows the user to choose a color. It consists of 2\nactual pickers:\n\n- One simple picker with a predefined palette of colors;\n- One more advanced picker that provides the full color spectrum;\n\n### Usage\n\n* Using v-model and passing in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<NcColorPicker v-model=\"color\" :palette=\"customPalette\">\n\t\t\t<NcButton> Click Me for a custom palette </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\tcustomPalette: [\n\t\t\t\t'#E40303',\n\t\t\t\t'#FF8C00',\n\t\t\t\t'#FFED00',\n\t\t\t\t'#008026',\n\t\t\t\t'#24408E',\n\t\t\t\t'#732982',\n\t\t\t\t'#5BCEFA',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#FFFFFF',\n\t\t\t\t'#F5A9B8',\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using v-bind for both color and open state and emitting an event that updates the color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcButton @click=\"open = !open\"> Click Me </NcButton>\n\t\t<NcColorPicker v-model=\"color\" :open.sync=\"open\" v-slot=\"{ attrs }\">\n\t\t\t<div v-bind=\"attrs\" :style=\"{'background-color': color}\" class=\"color1\" />\n\t\t</NcColorPicker>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t},\n}\n</script>\n<style>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color1 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Allowing to clear the selected color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcColorPicker clearable v-model=\"color\">\n\t\t\t<NcButton>Click Me</NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color-preview\" :class=\"{'color-preview--none': !color}\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t}\n}\n</script>\n<style scoped>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color-preview {\n\twidth: 100px;\n\theight: 34px;\n\tborder: 1px solid black;\n\tborder-radius: 6px;\n}\n\n.color-preview--none {\n\tbackground: repeating-conic-gradient(#808080 0 25%, #0000 0 50%) 50% / 20px 20px;\n}\n</style>\n```\n\n* Using advanced fields including HEX, RGB, and HSL:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\"\n\t\t\t:advanced-fields=\"true\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9'\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n</docs>\n"],"names":["useModelMigration","useVModel","createElementId","ref","computed","logger","defaultPalette","COLOR_BLACK","COLOR_WHITE","t"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoNA,MAAA,cAAe;AAAA,EACd,OAAO;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAER;;;;;;;;;;;;;;;;AAxHA,UAAM,eAAeA,kBAAAA,kBAAsC,SAAS,gBAAgB,IAAI;AAGxF,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ACtD,mBAAa,QAAQ,MAAM;AAAA,IAC5B;AAOA,aAAS,iBAAiB,OAAuB;AAChD,aAAO,cAAc,KAAK,IAAI,MAC3BF,OAAAA,YAAY,QACZC,OAAAA,YAAY;AAAA,IAChB;AAOA,aAAS,cAAc,OAAe;AACrC,YAAM,CAAC,KAAK,OAAO,IAAI,IAAI,SAAS,KAAK;AACzC,cAAQ,SAAS,MAAM,SAAS,QAAQ,SAAS,QAAQ;AAAA,IAC1D;AAOA,aAAS,SAAS,KAAa;AAC9B,YAAM,SAAS,4CAA4C,KAAK,GAAG;AACnE,aAAO,SACJ,CAAC,SAAS,OAAO,CAAC,GAAG,EAAE,GAAG,SAAS,OAAO,CAAC,GAAG,EAAE,GAAG,SAAS,OAAO,CAAC,GAAG,EAAE,CAAC,IAC1E,CAAC,GAAG,GAAG,CAAC;AAAA,IACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcColorPicker-Dg3d5_aQ.cjs","sources":["../../src/components/NcColorPicker/NcColorPicker.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Color } from '../../utils/colors.ts'\n\nimport { mdiArrowLeft, mdiCheck, mdiCloseCircleOutline, mdiDotsHorizontal } from '@mdi/js'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { Chrome } from 'vue-color'\nimport NcButton from '../NcButton/NcButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcPopover from '../NcPopover/NcPopover.vue'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { t } from '../../l10n.js'\nimport { COLOR_BLACK, COLOR_WHITE, defaultPalette } from '../../utils/colors.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * Set to `true` to enable advanced fields including HEX, RGB, and HSL\n\t */\n\tadvancedFields?: boolean\n\n\t/**\n\t * Allow to clear the current color.\n\t * When set the `update:modelValue` and `submit` event might emit also `undefined`.\n\t */\n\tclearable?: boolean\n\n\t/**\n\t * Selector for the popover container\n\t */\n\tcontainer?: string | Element\n\n\t/**\n\t * The model value (selected color).\n\t */\n\tmodelValue?: string // eslint-disable-line vue/no-unused-properties -- used by useModelMigration\n\n\t/**\n\t * @deprecated use `modelValue`\n\t */\n\tvalue?: string // eslint-disable-line vue/no-unused-properties -- used by useModelMigration\n\n\t/**\n\t * Current open state of the color picker\n\t */\n\topen?: boolean // eslint-disable-line vue/no-unused-properties -- used by useVModel\n\n\t/**\n\t * Provide a custom array of colors to show.\n\t * Can be either an array of string hexadecimal colors,\n\t * or an array of object with a `color` property with hexadecimal color string,\n\t * and a `name` property for accessibility.\n\t */\n\tpalette?: string[] | Color[]\n\n\t/**\n\t * Limit selectable colors to only the provided palette\n\t */\n\tpaletteOnly?: boolean\n}>(), {\n\tcontainer: 'body',\n\tpalette: () => [],\n\tmodelValue: '',\n\tvalue: undefined,\n})\n\nconst emit = defineEmits<{\n\t/**\n\t * Emitted when the submit button was pressed.\n\t * The payload is the same as the current modelValue.\n\t *\n\t * The value might be undefined if the `clearable` prop is set.\n\t */\n\t(e: 'submit', v: string | undefined): void\n\n\t/**\n\t * The color picker was fully closed.\n\t */\n\t(e: 'close'): void\n\n\t/**\n\t * The updated color\n\t */\n\t(e: 'update:modelValue', v: string | undefined): void\n\n\t/**\n\t * @deprecated use `update:modelValue`\n\t */\n\t(e: 'update:value', v: string | undefined): void\n}>()\n\nconst currentColor = useModelMigration<string | undefined>('value', 'update:value', true)\n// watchEffect(() => console.error('current: ', currentColor.value))\n\nconst modelOpen = useVModel(props, 'open', emit, { passive: true, eventName: 'update:open' })\n\nconst HEX_REGEX = /^#([a-f0-9]{3}|[a-f0-9]{6})$/i\n\n/**\n * Unique id used to identify different color pickers\n */\nconst id = createElementId()\n\n/**\n * Is the advanced picker is open\n */\nconst advanced = ref(false)\n\n/**\n * Normalized palette by converting array of hex colors to color objects.\n * This also ensures there is a default palette if needed (no palette passed).\n */\nconst normalizedPalette = computed(() => {\n\tlet palette = props.palette as (string | Color)[]\n\tfor (const color of palette) {\n\t\tif ((typeof color === 'string' && !color.match(HEX_REGEX))\n\t\t\t|| (typeof color === 'object' && !color.color?.match(HEX_REGEX))) {\n\t\t\tlogger.error('[NcColorPicker] Invalid palette passed', { color })\n\t\t\tpalette = []\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (palette.length === 0) {\n\t\tpalette = props.clearable\n\t\t\t? [...defaultPalette, COLOR_BLACK, COLOR_WHITE]\n\t\t\t: [...defaultPalette]\n\t}\n\n\treturn palette.map((item: Color | string) => ({\n\t\tcolor: typeof item === 'object' ? item.color : item,\n\t\tname: typeof item === 'object' && item.name\n\t\t\t? item.name\n\t\t\t: t('A color with a HEX value {hex}', { hex: typeof item === 'string' ? item : item.color }),\n\t}))\n})\n\n/**\n * Submit a picked colour and close picker\n *\n * @param hideCallback - callback to close popover\n */\nfunction handleConfirm(hideCallback: () => void) {\n\temit('submit', currentColor.value)\n\thideCallback()\n\tadvanced.value = false\n}\n\n/**\n * Toggle the currently selected palette color.\n *\n * @param color - The color to toggle\n */\nfunction toggleColor(color: string | Color) {\n\tcolor = typeof color === 'string' ? color : color.color\n\n\tif (props.clearable && currentColor.value === color) {\n\t\tcurrentColor.value = undefined\n\t} else {\n\t\tcurrentColor.value = color\n\t}\n}\n\n/**\n * @param color - The picked color from the Chrome component\n * @param color.hex - The hex string of the color\n */\nfunction pickCustomColor(color: { hex: string }): void {\n\tcurrentColor.value = color.hex\n}\n\n/**\n * Get the text color with the most constrast for a given background color.\n *\n * @param color - The background color\n */\nfunction getContrastColor(color: string): string {\n\treturn calculateLuma(color) > 0.5\n\t\t? COLOR_BLACK.color\n\t\t: COLOR_WHITE.color\n}\n\n/**\n * Calculate luminance of provided hex color\n *\n * @param color - The hex color\n */\nfunction calculateLuma(color: string) {\n\tconst [red, green, blue] = hexToRGB(color)\n\treturn (0.2126 * red + 0.7152 * green + 0.0722 * blue) / 255\n}\n\n/**\n * Convert hex color to RGB\n *\n * @param hex - The hex color\n */\nfunction hexToRGB(hex: string) {\n\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\treturn result\n\t\t? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]\n\t\t: [0, 0, 0]\n}\n</script>\n\n<script lang=\"ts\">\nexport default {\n\tmodel: {\n\t\tevent: 'update:modelValue',\n\t\tprop: 'modelValue',\n\t},\n}\n</script>\n\n<template>\n\t<NcPopover\n\t\t:shown.sync=\"modelOpen\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-hide=\"emit('close')\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<template #default=\"slotProps\">\n\t\t\t<div\n\t\t\t\trole=\"dialog\"\n\t\t\t\tclass=\"color-picker\"\n\t\t\t\taria-modal=\"true\"\n\t\t\t\t:aria-label=\"t('Color picker')\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'color-picker--advanced-fields': advanced && advancedFields,\n\t\t\t\t\t'color-picker--clearable': clearable,\n\t\t\t\t}\">\n\t\t\t\t<Transition name=\"slide\" mode=\"out-in\">\n\t\t\t\t\t<div v-if=\"!advanced\" class=\"color-picker__simple\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tv-for=\"({ color, name }, index) in normalizedPalette\"\n\t\t\t\t\t\t\t:key=\"index\"\n\t\t\t\t\t\t\tclass=\"color-picker__simple-color-circle\"\n\t\t\t\t\t\t\t:class=\"{ 'color-picker__simple-color-circle--active': color === currentColor }\"\n\t\t\t\t\t\t\t:style=\"{\n\t\t\t\t\t\t\t\tbackgroundColor: color,\n\t\t\t\t\t\t\t\tcolor: getContrastColor(color),\n\t\t\t\t\t\t\t}\">\n\t\t\t\t\t\t\t<span class=\"hidden-visually\">\n\t\t\t\t\t\t\t\t{{ color }} -- {{ currentColor }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<NcIconSvgWrapper v-if=\"color === currentColor\" :path=\"mdiCheck\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"name\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${id}`\"\n\t\t\t\t\t\t\t\t:checked=\"color === currentColor\"\n\t\t\t\t\t\t\t\t@click=\"toggleColor(color)\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label v-if=\"clearable\" class=\"color-picker__clear\" :title=\"t('No color')\">\n\t\t\t\t\t\t\t<NcIconSvgWrapper\n\t\t\t\t\t\t\t\t:size=\"currentColor ? 28 : 34 /* size is adusted so that inner mdi icon aligns with color circles */\"\n\t\t\t\t\t\t\t\t:path=\"mdiCloseCircleOutline\" />\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('No color')\"\n\t\t\t\t\t\t\t\t:name=\"`color-picker-${id}`\"\n\t\t\t\t\t\t\t\t:checked=\"!currentColor\"\n\t\t\t\t\t\t\t\t@click=\"currentColor = undefined\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Chrome\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\tclass=\"color-picker__advanced\"\n\t\t\t\t\t\t:disable-alpha=\"true\"\n\t\t\t\t\t\t:disable-fields=\"!advancedFields\"\n\t\t\t\t\t\t:value=\"currentColor ?? '#000000'\"\n\t\t\t\t\t\t@input=\"pickCustomColor\" />\n\t\t\t\t</Transition>\n\t\t\t\t<div v-if=\"!paletteOnly\" class=\"color-picker__navigation\">\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-if=\"advanced\"\n\t\t\t\t\t\t:aria-label=\"t('Back')\"\n\t\t\t\t\t\t:title=\"t('Back')\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"advanced = false\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiArrowLeft\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\t:aria-label=\"t('More options')\"\n\t\t\t\t\t\t:title=\"t('More options')\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t@click=\"advanced = true\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiDotsHorizontal\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t@click=\"handleConfirm(slotProps.hide)\">\n\t\t\t\t\t\t{{ t('Choose') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</template>\n\t</NcPopover>\n</template>\n\n<style lang=\"scss\" scoped>\n.color-picker {\n\tdisplay: flex;\n\toverflow: hidden;\n\talign-content: flex-end;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tpadding: var(--border-radius-element); // align with NcPopover border radius\n\tmin-width: calc(4 * var(--default-clickable-area) + 2 * var(--border-radius-element)); // space for 4 color circles\n\n\t&--clearable {\n\t\tmin-width: calc(5 * var(--default-clickable-area) + 2 * var(--border-radius-element));\n\t}\n\n\t&--advanced-fields {\n\t\tmin-width: 264px;\n\t}\n\n\t&__clear {\n\t\tcolor: var(--color-main-text);\n\n\t\t&:hover:not(:has(:checked)) {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t&__simple {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, var(--default-clickable-area));\n\t\tgrid-auto-rows: var(--default-clickable-area);\n\n\t\t&-color-circle {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: calc(var(--default-clickable-area) - 10px);\n\t\t\theight: calc(var(--default-clickable-area) - 10px);\n\t\t\tmin-height: calc(var(--default-clickable-area) - 10px);\n\t\t\tmargin: auto;\n\t\t\tpadding: 0;\n\t\t\tcolor: white;\n\t\t\tborder: 1px solid rgba(0, 0, 0, 0.25);\n\t\t\tborder-radius: 50%;\n\t\t\tfont-size: 16px;\n\t\t\t&:focus-within {\n\t\t\t\toutline: 2px solid var(--color-main-text);\n\t\t\t}\n\t\t\t&:hover {\n\t\t\t\topacity: .6;\n\t\t\t}\n\t\t\t&--active {\n\t\t\t\twidth: calc(var(--default-clickable-area) - 6px);\n\t\t\t\theight: calc(var(--default-clickable-area) - 6px);\n\t\t\t\tmin-height: calc(var(--default-clickable-area) - 6px);\n\t\t\t\ttransition: all 100ms ease-in-out;\n\t\t\t\topacity: 1 !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__advanced {\n\t\tbox-shadow: none !important;\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: var(--default-grid-baseline);\n\t\tjustify-content: space-between;\n\t\tmargin-top: calc(2 * var(--default-grid-baseline));\n\t}\n}\n\n:deep() .vc {\n\t&-chrome {\n\t\twidth: unset;\n\t\tbackground-color: var(--color-main-background);\n\n\t\t&-color-wrap {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\n\t\t&-active-color {\n\t\t\tborder-radius: 17px;\n\t\t}\n\n\t\t&-body {\n\t\t\tpadding: 14px 0 0 0;\n\t\t\tbackground-color: var(--color-main-background);\n\n\t\t\t.vc-input__input {\n\t\t\t\t--input-border-radius: var(--border-radius-element, var(--border-radius-large));\n\t\t\t\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t\t\t\twidth: 100%;\n\t\t\t\theight: var(--default-clickable-area);\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding-inline: calc(var(--border-radius-large) + var(--input-border-width-offset));\n\t\t\t\tpadding-block: var(--input-border-width-offset);\n\t\t\t\tborder: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);\n\t\t\t\tborder-radius: var(--input-border-radius);\n\t\t\t\tfont-size: var(--default-font-size);\n\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\tbox-shadow: none;\n\n\t\t\t\t&:active:not([disabled]),\n\t\t\t\t&:hover:not([disabled]),\n\t\t\t\t&:focus:not([disabled]) {\n\t\t\t\t\t// Reset padding offset when focused\n\t\t\t\t\t--input-border-width-offset: 0px;\n\t\t\t\t\tborder-color: var(--color-main-text);\n\t\t\t\t\tborder-width: var(--border-width-input-focused, 2px);\n\t\t\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\n\t\t\t\t\t& + .vc-input__label {\n\t\t\t\t\t\tcolor: var(--color-main-text);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vc-input__label {\n\t\t\t\tposition: absolute;\n\t\t\t\tinset-inline: var(--border-width-input-focused, 2px);\n\t\t\t\tinset-block-start: calc(-1.5 * var(--font-size-small, 13px) / 2);\n\t\t\t\tmax-width: fit-content;\n\t\t\t\tmargin-inline: calc(var(--border-radius-large) - var(--default-grid-baseline));\n\t\t\t\tmargin-block: 0;\n\t\t\t\tpadding-inline: var(--default-grid-baseline);\n\t\t\t\tfont-family: var(--font-face);\n\t\t\t\tfont-size: var(--font-size-small, 13px);\n\t\t\t\tline-height: 1.5;\n\t\t\t\tfont-weight: 500;\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t\tbackground-color: var(--color-main-background);\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\n\t\t&-toggle-btn {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tmargin-inline-start: 6px;\n\t\t\tfilter: var(--background-invert-if-dark);\n\t\t}\n\n\t\t&-toggle-icon {\n\t\t\twidth: 24px;\n\t\t\theight: 24px;\n\t\t\tmargin: 0;\n\t\t}\n\n\t\t&-toggle-icon-highlight {\n\t\t\twidth: var(--default-clickable-area);\n\t\t\theight: var(--default-clickable-area);\n\t\t\tinset: 0;\n\t\t}\n\n\t\t&-saturation {\n\t\t\t&-wrap {\n\t\t\t\tborder-radius: 3px;\n\t\t\t}\n\n\t\t\t&-circle {\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.slide {\n\t&-enter {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-to {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave {\n\t\ttransform: translateX(0);\n\t\topacity: 1;\n\t}\n\t&-leave-to {\n\t\ttransform: translateX(-50%);\n\t\topacity: 0;\n\t}\n\t&-enter-active,\n\t&-leave-active {\n\t\ttransition: all 50ms ease-in-out;\n\t}\n}\n</style>\n\n<docs>\n### General description\n\nThis component allows the user to choose a color. It consists of 2\nactual pickers:\n\n- One simple picker with a predefined palette of colors;\n- One more advanced picker that provides the full color spectrum;\n\n### Usage\n\n* Using v-model and passing in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<NcColorPicker v-model=\"color\" :palette=\"customPalette\">\n\t\t\t<NcButton> Click Me for a custom palette </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\tcustomPalette: [\n\t\t\t\t'#E40303',\n\t\t\t\t'#FF8C00',\n\t\t\t\t'#FFED00',\n\t\t\t\t'#008026',\n\t\t\t\t'#24408E',\n\t\t\t\t'#732982',\n\t\t\t\t'#5BCEFA',\n\t\t\t\t'#F5A9B8',\n\t\t\t\t'#FFFFFF',\n\t\t\t\t'#F5A9B8',\n\t\t\t],\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Using v-bind for both color and open state and emitting an event that updates the color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcButton @click=\"open = !open\"> Click Me </NcButton>\n\t\t<NcColorPicker v-model=\"color\" :open.sync=\"open\" v-slot=\"{ attrs }\">\n\t\t\t<div v-bind=\"attrs\" :style=\"{'background-color': color}\" class=\"color1\" />\n\t\t</NcColorPicker>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t},\n}\n</script>\n<style>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color1 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n\n* Allowing to clear the selected color\n\n```vue\n<template>\n\t<div class=\"container1\">\n\t\t<NcColorPicker clearable v-model=\"color\">\n\t\t\t<NcButton>Click Me</NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color-preview\" :class=\"{'color-preview--none': !color}\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9',\n\t\t\topen: false\n\t\t}\n\t}\n}\n</script>\n<style scoped>\n.container1 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color-preview {\n\twidth: 100px;\n\theight: 34px;\n\tborder: 1px solid black;\n\tborder-radius: 6px;\n}\n\n.color-preview--none {\n\tbackground: repeating-conic-gradient(#808080 0 25%, #0000 0 50%) 50% / 20px 20px;\n}\n</style>\n```\n\n* Using advanced fields including HEX, RGB, and HSL:\n\n```vue\n<template>\n\t<div class=\"container0\">\n\t\t<NcColorPicker v-model=\"color\"\n\t\t\t:advanced-fields=\"true\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcColorPicker>\n\t\t<div :style=\"{'background-color': color}\" class=\"color0\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tcolor: '#0082c9'\n\t\t}\n\t}\n}\n</script>\n<style>\n.container0 {\n\tdisplay: flex;\n\tgap: 20px;\n}\n\n.color0 {\n\twidth: 100px;\n\theight: 34px;\n\tborder-radius: 6px;\n}\n</style>\n```\n</docs>\n"],"names":["useModelMigration","useVModel","createElementId","ref","computed","logger","defaultPalette","COLOR_BLACK","COLOR_WHITE","t"],"mappings":";;;;;;;;;;;;;;;AAoNA,MAAA,cAAe;AAAA,EACd,OAAO;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAER;;;;;;;;;;;;;;;;;AAxHA,UAAM,eAAeA,kBAAAA,kBAAsC,SAAS,gBAAgB,IAAI;AAGxF,UAAM,YAAYC,KAAAA,UAAU,OAAO,QAAQ,MAAM,EAAE,SAAS,MAAM,WAAW,eAAe;AAE5F,UAAM,YAAY;AAKlB,UAAM,KAAKC,gBAAAA,gBAAA;AAKX,UAAM,WAAWC,IAAAA,IAAI,KAAK;AAM1B,UAAM,oBAAoBC,IAAAA,SAAS,MAAM;AACxC,UAAI,UAAU,MAAM;AACpB,iBAAW,SAAS,SAAS;AAC5B,YAAK,OAAO,UAAU,YAAY,CAAC,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