@nextcloud/vue 8.0.0-beta.6 → 8.0.0-beta.8

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 (568) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/Components/NcActionButton.cjs +49 -1
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +48 -12
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionButtonGroup.cjs +30 -1
  7. package/dist/Components/NcActionButtonGroup.cjs.map +1 -1
  8. package/dist/Components/NcActionButtonGroup.mjs +30 -9
  9. package/dist/Components/NcActionButtonGroup.mjs.map +1 -1
  10. package/dist/Components/NcActionCaption.cjs +29 -1
  11. package/dist/Components/NcActionCaption.cjs.map +1 -1
  12. package/dist/Components/NcActionCaption.mjs +29 -9
  13. package/dist/Components/NcActionCaption.mjs.map +1 -1
  14. package/dist/Components/NcActionCheckbox.cjs +78 -1
  15. package/dist/Components/NcActionCheckbox.cjs.map +1 -1
  16. package/dist/Components/NcActionCheckbox.mjs +80 -19
  17. package/dist/Components/NcActionCheckbox.mjs.map +1 -1
  18. package/dist/Components/NcActionInput.cjs +226 -1
  19. package/dist/Components/NcActionInput.cjs.map +1 -1
  20. package/dist/Components/NcActionInput.mjs +227 -68
  21. package/dist/Components/NcActionInput.mjs.map +1 -1
  22. package/dist/Components/NcActionLink.cjs +69 -1
  23. package/dist/Components/NcActionLink.cjs.map +1 -1
  24. package/dist/Components/NcActionLink.mjs +65 -13
  25. package/dist/Components/NcActionLink.mjs.map +1 -1
  26. package/dist/Components/NcActionRadio.cjs +85 -1
  27. package/dist/Components/NcActionRadio.cjs.map +1 -1
  28. package/dist/Components/NcActionRadio.mjs +87 -19
  29. package/dist/Components/NcActionRadio.mjs.map +1 -1
  30. package/dist/Components/NcActionRouter.cjs +42 -1
  31. package/dist/Components/NcActionRouter.cjs.map +1 -1
  32. package/dist/Components/NcActionRouter.mjs +41 -12
  33. package/dist/Components/NcActionRouter.mjs.map +1 -1
  34. package/dist/Components/NcActionSeparator.cjs +20 -1
  35. package/dist/Components/NcActionSeparator.cjs.map +1 -1
  36. package/dist/Components/NcActionSeparator.mjs +20 -9
  37. package/dist/Components/NcActionSeparator.mjs.map +1 -1
  38. package/dist/Components/NcActionText.cjs +23 -1
  39. package/dist/Components/NcActionText.cjs.map +1 -1
  40. package/dist/Components/NcActionText.mjs +20 -8
  41. package/dist/Components/NcActionText.mjs.map +1 -1
  42. package/dist/Components/NcActionTextEditable.cjs +81 -1
  43. package/dist/Components/NcActionTextEditable.cjs.map +1 -1
  44. package/dist/Components/NcActionTextEditable.mjs +79 -22
  45. package/dist/Components/NcActionTextEditable.mjs.map +1 -1
  46. package/dist/Components/NcActions.cjs +455 -1
  47. package/dist/Components/NcActions.cjs.map +1 -1
  48. package/dist/Components/NcActions.mjs +459 -100
  49. package/dist/Components/NcActions.mjs.map +1 -1
  50. package/dist/Components/NcAppContent.cjs +218 -1
  51. package/dist/Components/NcAppContent.cjs.map +1 -1
  52. package/dist/Components/NcAppContent.mjs +220 -66
  53. package/dist/Components/NcAppContent.mjs.map +1 -1
  54. package/dist/Components/NcAppContentDetails.cjs +19 -1
  55. package/dist/Components/NcAppContentDetails.cjs.map +1 -1
  56. package/dist/Components/NcAppContentDetails.mjs +18 -7
  57. package/dist/Components/NcAppContentDetails.mjs.map +1 -1
  58. package/dist/Components/NcAppContentList.cjs +29 -1
  59. package/dist/Components/NcAppContentList.cjs.map +1 -1
  60. package/dist/Components/NcAppContentList.mjs +29 -8
  61. package/dist/Components/NcAppContentList.mjs.map +1 -1
  62. package/dist/Components/NcAppNavigation.cjs +66 -1
  63. package/dist/Components/NcAppNavigation.cjs.map +1 -1
  64. package/dist/Components/NcAppNavigation.mjs +67 -28
  65. package/dist/Components/NcAppNavigation.mjs.map +1 -1
  66. package/dist/Components/NcAppNavigationCaption.cjs +44 -1
  67. package/dist/Components/NcAppNavigationCaption.cjs.map +1 -1
  68. package/dist/Components/NcAppNavigationCaption.mjs +40 -9
  69. package/dist/Components/NcAppNavigationCaption.mjs.map +1 -1
  70. package/dist/Components/NcAppNavigationIconBullet.cjs +40 -1
  71. package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
  72. package/dist/Components/NcAppNavigationIconBullet.mjs +40 -15
  73. package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
  74. package/dist/Components/NcAppNavigationItem.cjs +386 -1
  75. package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
  76. package/dist/Components/NcAppNavigationItem.mjs +382 -81
  77. package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
  78. package/dist/Components/NcAppNavigationNew.cjs +50 -1
  79. package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
  80. package/dist/Components/NcAppNavigationNew.mjs +51 -14
  81. package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
  82. package/dist/Components/NcAppNavigationNewItem.cjs +87 -1
  83. package/dist/Components/NcAppNavigationNewItem.cjs.map +1 -1
  84. package/dist/Components/NcAppNavigationNewItem.mjs +83 -17
  85. package/dist/Components/NcAppNavigationNewItem.mjs.map +1 -1
  86. package/dist/Components/NcAppNavigationSettings.cjs +69 -1
  87. package/dist/Components/NcAppNavigationSettings.cjs.map +1 -1
  88. package/dist/Components/NcAppNavigationSettings.mjs +60 -21
  89. package/dist/Components/NcAppNavigationSettings.mjs.map +1 -1
  90. package/dist/Components/NcAppNavigationSpacer.cjs +20 -1
  91. package/dist/Components/NcAppNavigationSpacer.cjs.map +1 -1
  92. package/dist/Components/NcAppNavigationSpacer.mjs +20 -9
  93. package/dist/Components/NcAppNavigationSpacer.mjs.map +1 -1
  94. package/dist/Components/NcAppNavigationToggle.cjs +25 -1
  95. package/dist/Components/NcAppNavigationToggle.cjs.map +1 -1
  96. package/dist/Components/NcAppNavigationToggle.mjs +21 -1
  97. package/dist/Components/NcAppNavigationToggle.mjs.map +1 -1
  98. package/dist/Components/NcAppSettingsDialog.cjs +207 -1
  99. package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
  100. package/dist/Components/NcAppSettingsDialog.mjs +209 -48
  101. package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
  102. package/dist/Components/NcAppSettingsSection.cjs +39 -1
  103. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  104. package/dist/Components/NcAppSettingsSection.mjs +39 -13
  105. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  106. package/dist/Components/NcAppSidebar.cjs +443 -1
  107. package/dist/Components/NcAppSidebar.cjs.map +1 -1
  108. package/dist/Components/NcAppSidebar.mjs +409 -92
  109. package/dist/Components/NcAppSidebar.mjs.map +1 -1
  110. package/dist/Components/NcAppSidebarTab.cjs +83 -1
  111. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  112. package/dist/Components/NcAppSidebarTab.mjs +83 -20
  113. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  114. package/dist/Components/NcAvatar.cjs +3 -1
  115. package/dist/Components/NcAvatar.cjs.map +1 -1
  116. package/dist/Components/NcAvatar.mjs +1 -1
  117. package/dist/Components/NcBreadcrumb.cjs +175 -1
  118. package/dist/Components/NcBreadcrumb.cjs.map +1 -1
  119. package/dist/Components/NcBreadcrumb.mjs +175 -35
  120. package/dist/Components/NcBreadcrumb.mjs.map +1 -1
  121. package/dist/Components/NcBreadcrumbs.cjs +372 -1
  122. package/dist/Components/NcBreadcrumbs.cjs.map +1 -1
  123. package/dist/Components/NcBreadcrumbs.mjs +373 -142
  124. package/dist/Components/NcBreadcrumbs.mjs.map +1 -1
  125. package/dist/Components/NcButton.cjs +226 -1
  126. package/dist/Components/NcButton.cjs.map +1 -1
  127. package/dist/Components/NcButton.mjs +226 -24
  128. package/dist/Components/NcButton.mjs.map +1 -1
  129. package/dist/Components/NcCheckboxRadioSwitch.cjs +237 -1
  130. package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
  131. package/dist/Components/NcCheckboxRadioSwitch.mjs +243 -57
  132. package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
  133. package/dist/Components/NcColorPicker.cjs +118 -1
  134. package/dist/Components/NcColorPicker.cjs.map +1 -1
  135. package/dist/Components/NcColorPicker.mjs +124 -46
  136. package/dist/Components/NcColorPicker.mjs.map +1 -1
  137. package/dist/Components/NcContent.cjs +25 -1
  138. package/dist/Components/NcContent.cjs.map +1 -1
  139. package/dist/Components/NcContent.mjs +24 -8
  140. package/dist/Components/NcContent.mjs.map +1 -1
  141. package/dist/Components/NcCounterBubble.cjs +47 -1
  142. package/dist/Components/NcCounterBubble.cjs.map +1 -1
  143. package/dist/Components/NcCounterBubble.mjs +46 -12
  144. package/dist/Components/NcCounterBubble.mjs.map +1 -1
  145. package/dist/Components/NcDashboardWidget.cjs +133 -1
  146. package/dist/Components/NcDashboardWidget.cjs.map +1 -1
  147. package/dist/Components/NcDashboardWidget.mjs +128 -39
  148. package/dist/Components/NcDashboardWidget.mjs.map +1 -1
  149. package/dist/Components/NcDashboardWidgetItem.cjs +138 -1
  150. package/dist/Components/NcDashboardWidgetItem.cjs.map +1 -1
  151. package/dist/Components/NcDashboardWidgetItem.mjs +129 -22
  152. package/dist/Components/NcDashboardWidgetItem.mjs.map +1 -1
  153. package/dist/Components/NcDateTime.cjs +125 -0
  154. package/dist/Components/{NcDatetime.mjs.map → NcDateTime.cjs.map} +1 -1
  155. package/dist/Components/NcDateTime.mjs +129 -0
  156. package/dist/Components/{NcDatetime.cjs.map → NcDateTime.mjs.map} +1 -1
  157. package/dist/Components/NcDateTimePicker.cjs +217 -0
  158. package/dist/Components/NcDateTimePicker.cjs.map +1 -0
  159. package/dist/Components/NcDateTimePicker.mjs +228 -0
  160. package/dist/Components/NcDateTimePicker.mjs.map +1 -0
  161. package/dist/Components/NcDateTimePickerNative.cjs +199 -1
  162. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  163. package/dist/Components/NcDateTimePickerNative.mjs +195 -58
  164. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  165. package/dist/Components/NcEllipsisedOption.cjs +74 -1
  166. package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
  167. package/dist/Components/NcEllipsisedOption.mjs +73 -20
  168. package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
  169. package/dist/Components/NcEmojiPicker.cjs +175 -1
  170. package/dist/Components/NcEmojiPicker.cjs.map +1 -1
  171. package/dist/Components/NcEmojiPicker.mjs +173 -53
  172. package/dist/Components/NcEmojiPicker.mjs.map +1 -1
  173. package/dist/Components/NcEmptyContent.cjs +54 -1
  174. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  175. package/dist/Components/NcEmptyContent.mjs +46 -10
  176. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  177. package/dist/Components/NcGuestContent.cjs +26 -1
  178. package/dist/Components/NcGuestContent.cjs.map +1 -1
  179. package/dist/Components/NcGuestContent.mjs +24 -11
  180. package/dist/Components/NcGuestContent.mjs.map +1 -1
  181. package/dist/Components/NcHeaderMenu.cjs +167 -1
  182. package/dist/Components/NcHeaderMenu.cjs.map +1 -1
  183. package/dist/Components/NcHeaderMenu.mjs +161 -49
  184. package/dist/Components/NcHeaderMenu.mjs.map +1 -1
  185. package/dist/Components/NcHighlight.cjs +3 -1
  186. package/dist/Components/NcHighlight.cjs.map +1 -1
  187. package/dist/Components/NcHighlight.mjs +1 -1
  188. package/dist/Components/NcIconSvgWrapper.cjs +44 -1
  189. package/dist/Components/NcIconSvgWrapper.cjs.map +1 -1
  190. package/dist/Components/NcIconSvgWrapper.mjs +45 -15
  191. package/dist/Components/NcIconSvgWrapper.mjs.map +1 -1
  192. package/dist/Components/NcInputField.cjs +210 -1
  193. package/dist/Components/NcInputField.cjs.map +1 -1
  194. package/dist/Components/NcInputField.mjs +211 -38
  195. package/dist/Components/NcInputField.mjs.map +1 -1
  196. package/dist/Components/NcListItem.cjs +237 -1
  197. package/dist/Components/NcListItem.cjs.map +1 -1
  198. package/dist/Components/NcListItem.mjs +233 -57
  199. package/dist/Components/NcListItem.mjs.map +1 -1
  200. package/dist/Components/NcListItemIcon.cjs +150 -1
  201. package/dist/Components/NcListItemIcon.cjs.map +1 -1
  202. package/dist/Components/NcListItemIcon.mjs +142 -26
  203. package/dist/Components/NcListItemIcon.mjs.map +1 -1
  204. package/dist/Components/NcLoadingIcon.cjs +54 -1
  205. package/dist/Components/NcLoadingIcon.cjs.map +1 -1
  206. package/dist/Components/NcLoadingIcon.mjs +54 -14
  207. package/dist/Components/NcLoadingIcon.mjs.map +1 -1
  208. package/dist/Components/NcModal.cjs +405 -1
  209. package/dist/Components/NcModal.cjs.map +1 -1
  210. package/dist/Components/NcModal.mjs +401 -103
  211. package/dist/Components/NcModal.mjs.map +1 -1
  212. package/dist/Components/NcNoteCard.cjs +71 -1
  213. package/dist/Components/NcNoteCard.cjs.map +1 -1
  214. package/dist/Components/NcNoteCard.mjs +71 -37
  215. package/dist/Components/NcNoteCard.mjs.map +1 -1
  216. package/dist/Components/NcPasswordField.cjs +152 -1
  217. package/dist/Components/NcPasswordField.cjs.map +1 -1
  218. package/dist/Components/NcPasswordField.mjs +157 -53
  219. package/dist/Components/NcPasswordField.mjs.map +1 -1
  220. package/dist/Components/NcPopover.cjs +125 -1
  221. package/dist/Components/NcPopover.cjs.map +1 -1
  222. package/dist/Components/NcPopover.mjs +124 -41
  223. package/dist/Components/NcPopover.mjs.map +1 -1
  224. package/dist/Components/NcProgressBar.cjs +57 -1
  225. package/dist/Components/NcProgressBar.cjs.map +1 -1
  226. package/dist/Components/NcProgressBar.mjs +57 -15
  227. package/dist/Components/NcProgressBar.mjs.map +1 -1
  228. package/dist/Components/NcRelatedResourcesPanel.cjs +168 -1
  229. package/dist/Components/NcRelatedResourcesPanel.cjs.map +1 -1
  230. package/dist/Components/NcRelatedResourcesPanel.mjs +166 -60
  231. package/dist/Components/NcRelatedResourcesPanel.mjs.map +1 -1
  232. package/dist/Components/NcRichContenteditable.cjs +478 -1
  233. package/dist/Components/NcRichContenteditable.cjs.map +1 -1
  234. package/dist/Components/NcRichContenteditable.mjs +447 -127
  235. package/dist/Components/NcRichContenteditable.mjs.map +1 -1
  236. package/dist/Components/NcRichText.cjs +44 -1
  237. package/dist/Components/NcRichText.cjs.map +1 -1
  238. package/dist/Components/NcRichText.mjs +25 -4
  239. package/dist/Components/NcRichText.mjs.map +1 -1
  240. package/dist/Components/NcSavingIndicatorIcon.cjs +59 -1
  241. package/dist/Components/NcSavingIndicatorIcon.cjs.map +1 -1
  242. package/dist/Components/NcSavingIndicatorIcon.mjs +56 -9
  243. package/dist/Components/NcSavingIndicatorIcon.mjs.map +1 -1
  244. package/dist/Components/NcSelect.cjs +406 -1
  245. package/dist/Components/NcSelect.cjs.map +1 -1
  246. package/dist/Components/NcSelect.mjs +402 -49
  247. package/dist/Components/NcSelect.mjs.map +1 -1
  248. package/dist/Components/NcSelectTags.cjs +251 -2
  249. package/dist/Components/NcSelectTags.cjs.map +1 -1
  250. package/dist/Components/NcSelectTags.mjs +236 -73
  251. package/dist/Components/NcSelectTags.mjs.map +1 -1
  252. package/dist/Components/NcSettingsInputText.cjs +90 -1
  253. package/dist/Components/NcSettingsInputText.cjs.map +1 -1
  254. package/dist/Components/NcSettingsInputText.mjs +88 -19
  255. package/dist/Components/NcSettingsInputText.mjs.map +1 -1
  256. package/dist/Components/NcSettingsSection.cjs +62 -1
  257. package/dist/Components/NcSettingsSection.cjs.map +1 -1
  258. package/dist/Components/NcSettingsSection.mjs +62 -15
  259. package/dist/Components/NcSettingsSection.mjs.map +1 -1
  260. package/dist/Components/NcSettingsSelectGroup.cjs +26 -1
  261. package/dist/Components/NcSettingsSelectGroup.cjs.map +1 -1
  262. package/dist/Components/NcSettingsSelectGroup.mjs +24 -53
  263. package/dist/Components/NcSettingsSelectGroup.mjs.map +1 -1
  264. package/dist/Components/NcTextField.cjs +74 -1
  265. package/dist/Components/NcTextField.cjs.map +1 -1
  266. package/dist/Components/NcTextField.mjs +77 -21
  267. package/dist/Components/NcTextField.mjs.map +1 -1
  268. package/dist/Components/NcTimezonePicker.cjs +4387 -614
  269. package/dist/Components/NcTimezonePicker.cjs.map +1 -1
  270. package/dist/Components/NcTimezonePicker.mjs +4372 -663
  271. package/dist/Components/NcTimezonePicker.mjs.map +1 -1
  272. package/dist/Components/NcUserBubble.cjs +189 -1
  273. package/dist/Components/NcUserBubble.cjs.map +1 -1
  274. package/dist/Components/NcUserBubble.mjs +190 -47
  275. package/dist/Components/NcUserBubble.mjs.map +1 -1
  276. package/dist/Components/NcVNodes.cjs +35 -1
  277. package/dist/Components/NcVNodes.cjs.map +1 -1
  278. package/dist/Components/NcVNodes.mjs +35 -8
  279. package/dist/Components/NcVNodes.mjs.map +1 -1
  280. package/dist/Directives/Focus.cjs +30 -1
  281. package/dist/Directives/Focus.cjs.map +1 -1
  282. package/dist/Directives/Focus.mjs +28 -5
  283. package/dist/Directives/Focus.mjs.map +1 -1
  284. package/dist/Directives/Linkify.cjs +8 -1
  285. package/dist/Directives/Linkify.cjs.map +1 -1
  286. package/dist/Directives/Linkify.mjs +6 -6
  287. package/dist/Directives/Linkify.mjs.map +1 -1
  288. package/dist/Directives/Tooltip.cjs +37 -1
  289. package/dist/Directives/Tooltip.cjs.map +1 -1
  290. package/dist/Directives/Tooltip.mjs +29 -4
  291. package/dist/Directives/Tooltip.mjs.map +1 -1
  292. package/dist/Functions/emoji.cjs +36 -1
  293. package/dist/Functions/emoji.cjs.map +1 -1
  294. package/dist/Functions/emoji.mjs +32 -11
  295. package/dist/Functions/emoji.mjs.map +1 -1
  296. package/dist/Functions/usernameToColor.cjs +39 -1
  297. package/dist/Functions/usernameToColor.cjs.map +1 -1
  298. package/dist/Functions/usernameToColor.mjs +32 -11
  299. package/dist/Functions/usernameToColor.mjs.map +1 -1
  300. package/dist/Mixins/clickOutsideOptions.cjs +40 -1
  301. package/dist/Mixins/clickOutsideOptions.cjs.map +1 -1
  302. package/dist/Mixins/clickOutsideOptions.mjs +39 -4
  303. package/dist/Mixins/clickOutsideOptions.mjs.map +1 -1
  304. package/dist/Mixins/isFullscreen.cjs +44 -1
  305. package/dist/Mixins/isFullscreen.cjs.map +1 -1
  306. package/dist/Mixins/isFullscreen.mjs +42 -11
  307. package/dist/Mixins/isFullscreen.mjs.map +1 -1
  308. package/dist/Mixins/isMobile.cjs +87 -1
  309. package/dist/Mixins/isMobile.cjs.map +1 -1
  310. package/dist/Mixins/isMobile.mjs +86 -11
  311. package/dist/Mixins/isMobile.mjs.map +1 -1
  312. package/dist/Mixins/richEditor.cjs +10 -1
  313. package/dist/Mixins/richEditor.cjs.map +1 -1
  314. package/dist/Mixins/richEditor.mjs +2 -2
  315. package/dist/assets/{index28.css → NcAppNavigationToggle-2cc5b864.css} +16 -2
  316. package/dist/assets/NcInputConfirmCancel-2ba60a52.css +51 -0
  317. package/dist/assets/NcMentionBubble-6e887c5f.css +81 -0
  318. package/dist/assets/{index46.css → NcSettingsSelectGroup-0d38d76b.css} +15 -2
  319. package/dist/assets/index-01e5adf4.css +79 -0
  320. package/dist/assets/index-03ec5f40.css +60 -0
  321. package/dist/assets/{index.css → index-0557f12a.css} +26 -2
  322. package/dist/assets/index-0ab8e182.css +128 -0
  323. package/dist/assets/index-0adc989c.css +96 -0
  324. package/dist/assets/index-1151d229.css +41 -0
  325. package/dist/assets/index-165fce0e.css +82 -0
  326. package/dist/assets/index-194e9415.css +163 -0
  327. package/dist/assets/index-1beccc92.css +140 -0
  328. package/dist/assets/index-1cf8eeb4.css +97 -0
  329. package/dist/assets/index-23e64bbb.css +59 -0
  330. package/dist/assets/{index50.css → index-24f6c355.css} +67 -3
  331. package/dist/assets/index-294382c8.css +879 -0
  332. package/dist/assets/index-2a8e4ca1.css +540 -0
  333. package/dist/assets/index-2d4de2fc.css +38 -0
  334. package/dist/assets/{index2.css → index-30e099f7.css} +17 -2
  335. package/dist/assets/{NcInputConfirmCancel.css → index-33da80f0.css} +32 -2
  336. package/dist/assets/index-34dfc54e.css +88 -0
  337. package/dist/assets/index-3764a447.css +99 -0
  338. package/dist/assets/index-376d2dec.css +243 -0
  339. package/dist/assets/{index17.css → index-441b6552.css} +25 -2
  340. package/dist/assets/index-4a775ba1.css +204 -0
  341. package/dist/assets/index-4ebacc78.css +107 -0
  342. package/dist/assets/index-4ef32afd.css +128 -0
  343. package/dist/assets/{index47.css → index-5072b6ee.css} +77 -3
  344. package/dist/assets/index-50b0766d.css +202 -0
  345. package/dist/assets/index-5eff69c7.css +149 -0
  346. package/dist/assets/index-5fa0ac5a.css +46 -0
  347. package/dist/assets/index-61b63a8f.css +57 -0
  348. package/dist/assets/index-6405cd50.css +76 -0
  349. package/dist/assets/index-6416f636.css +83 -0
  350. package/dist/assets/index-6c47e88a.css +46 -0
  351. package/dist/assets/index-76a58945.css +68 -0
  352. package/dist/assets/index-76dd9f11.css +5 -0
  353. package/dist/assets/index-7768d5e5.css +148 -0
  354. package/dist/assets/index-7813bab3.css +66 -0
  355. package/dist/assets/index-793eae6b.css +234 -0
  356. package/dist/assets/index-8aa4712e.css +51 -0
  357. package/dist/assets/{index27.css → index-8f52a20f.css} +16 -2
  358. package/dist/assets/index-9354264c.css +80 -0
  359. package/dist/assets/index-93ad846c.css +259 -0
  360. package/dist/assets/index-a2b51bce.css +47 -0
  361. package/dist/assets/index-a2d55f92.css +204 -0
  362. package/dist/assets/{index13.css → index-a9e4fe04.css} +27 -2
  363. package/dist/assets/{NcAppNavigationToggle.css → index-b8f13a1f.css} +13 -2
  364. package/dist/assets/index-b991895f.css +87 -0
  365. package/dist/assets/{index48.css → index-baf8711a.css} +67 -3
  366. package/dist/assets/index-becfbea7.css +128 -0
  367. package/dist/assets/index-c6f0da2e.css +69 -0
  368. package/dist/assets/index-c7905a53.css +44 -0
  369. package/dist/assets/index-d211cae8.css +93 -0
  370. package/dist/assets/{index22.css → index-d646553d.css} +22 -2
  371. package/dist/assets/index-de0326c7.css +304 -0
  372. package/dist/assets/index-ed4adf1d.css +115 -0
  373. package/dist/assets/index-edee3304.css +52 -0
  374. package/dist/assets/index-fbdeb5ab.css +303 -0
  375. package/dist/assets/index-fc61f2d8.css +41 -0
  376. package/dist/assets/index-fec4bb7b.css +132 -0
  377. package/dist/assets/referencePickerModal-0acecb5e.css +482 -0
  378. package/dist/chunks/GenColors-38246c38.mjs +46 -0
  379. package/dist/chunks/{GenColors-8097de04.cjs.map → GenColors-38246c38.mjs.map} +1 -1
  380. package/dist/chunks/GenColors-eedcc70a.cjs +45 -0
  381. package/dist/chunks/{GenColors-85cb6194.mjs.map → GenColors-eedcc70a.cjs.map} +1 -1
  382. package/dist/{assets/index29.css → chunks/GenRandomId-c214d235.cjs} +8 -5
  383. package/dist/chunks/{GenRandomId-67df40eb.cjs.map → GenRandomId-c214d235.cjs.map} +1 -1
  384. package/dist/chunks/GenRandomId-cb9ccebe.mjs +25 -0
  385. package/dist/chunks/{GenRandomId-1e1b509a.mjs.map → GenRandomId-cb9ccebe.mjs.map} +1 -1
  386. package/dist/chunks/Linkify-39f20c9a.mjs +33 -0
  387. package/dist/chunks/{Linkify-a0faf443.mjs.map → Linkify-39f20c9a.mjs.map} +1 -1
  388. package/dist/chunks/Linkify-40cdd635.cjs +32 -0
  389. package/dist/chunks/{Linkify-a4db36a9.cjs.map → Linkify-40cdd635.cjs.map} +1 -1
  390. package/dist/chunks/NcAppNavigationToggle-960658a0.cjs +49 -0
  391. package/dist/chunks/NcAppNavigationToggle-960658a0.cjs.map +1 -0
  392. package/dist/chunks/NcAppNavigationToggle-d868f651.mjs +55 -0
  393. package/dist/chunks/NcAppNavigationToggle-d868f651.mjs.map +1 -0
  394. package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs +83 -0
  395. package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs.map +1 -0
  396. package/dist/chunks/NcInputConfirmCancel-f881168d.mjs +89 -0
  397. package/dist/chunks/NcInputConfirmCancel-f881168d.mjs.map +1 -0
  398. package/dist/chunks/NcRichText-1c3d2654.mjs +302 -0
  399. package/dist/chunks/{NcRichText-13b09624.mjs.map → NcRichText-1c3d2654.mjs.map} +1 -1
  400. package/dist/chunks/NcRichText-d385dc10.cjs +289 -0
  401. package/dist/chunks/{NcRichText-1e8854a1.cjs.map → NcRichText-d385dc10.cjs.map} +1 -1
  402. package/dist/chunks/NcSettingsSelectGroup-0f4a0f94.mjs +192 -0
  403. package/dist/chunks/NcSettingsSelectGroup-0f4a0f94.mjs.map +1 -0
  404. package/dist/chunks/NcSettingsSelectGroup-47d9c113.cjs +183 -0
  405. package/dist/chunks/NcSettingsSelectGroup-47d9c113.cjs.map +1 -0
  406. package/dist/chunks/ScopeComponent-1c75ec38.cjs +28 -0
  407. package/dist/chunks/{ScopeComponent-f6122f5a.cjs.map → ScopeComponent-1c75ec38.cjs.map} +1 -1
  408. package/dist/chunks/ScopeComponent-97a014a1.mjs +29 -0
  409. package/dist/chunks/{ScopeComponent-dbcd0e07.mjs.map → ScopeComponent-97a014a1.mjs.map} +1 -1
  410. package/dist/chunks/_plugin-vue2_normalizer-71e2aa87.mjs +32 -0
  411. package/dist/chunks/_plugin-vue2_normalizer-71e2aa87.mjs.map +1 -0
  412. package/dist/chunks/_plugin-vue2_normalizer-7f9efb60.cjs +31 -0
  413. package/dist/chunks/_plugin-vue2_normalizer-7f9efb60.cjs.map +1 -0
  414. package/dist/chunks/actionGlobal-8c1c28c9.mjs +50 -0
  415. package/dist/chunks/{actionGlobal-cda46023.mjs.map → actionGlobal-8c1c28c9.mjs.map} +1 -1
  416. package/dist/chunks/actionGlobal-9e29e11b.cjs +49 -0
  417. package/dist/chunks/{actionGlobal-ec7003e8.cjs.map → actionGlobal-9e29e11b.cjs.map} +1 -1
  418. package/dist/chunks/actionText-9f5c55bd.mjs +121 -0
  419. package/dist/chunks/{actionText-6c35d3fc.mjs.map → actionText-9f5c55bd.mjs.map} +1 -1
  420. package/dist/chunks/actionText-b0bd6eb7.cjs +120 -0
  421. package/dist/chunks/{actionText-bef01778.cjs.map → actionText-b0bd6eb7.cjs.map} +1 -1
  422. package/dist/chunks/focusTrap-14985831.cjs +26 -0
  423. package/dist/chunks/{focusTrap-173aba65.mjs.map → focusTrap-14985831.cjs.map} +1 -1
  424. package/dist/chunks/focusTrap-5d0f71d4.mjs +27 -0
  425. package/dist/chunks/{focusTrap-139520e2.cjs.map → focusTrap-5d0f71d4.mjs.map} +1 -1
  426. package/dist/chunks/index-20a9ace9.mjs +149 -0
  427. package/dist/chunks/{index-cd3f1f8f.mjs.map → index-20a9ace9.mjs.map} +1 -1
  428. package/dist/chunks/index-2a5b8ace.cjs +434 -0
  429. package/dist/chunks/index-2a5b8ace.cjs.map +1 -0
  430. package/dist/chunks/index-4398f925.cjs +149 -0
  431. package/dist/chunks/{index-c4cd0463.cjs.map → index-4398f925.cjs.map} +1 -1
  432. package/dist/chunks/index-5f2a5f57.mjs +155 -0
  433. package/dist/chunks/{index-9c621303.mjs.map → index-5f2a5f57.mjs.map} +1 -1
  434. package/dist/chunks/index-6c221fa0.mjs +447 -0
  435. package/dist/chunks/index-6c221fa0.mjs.map +1 -0
  436. package/dist/chunks/index-e894376a.cjs +148 -0
  437. package/dist/chunks/{index-df3f51c6.cjs.map → index-e894376a.cjs.map} +1 -1
  438. package/dist/chunks/l10n-27a75c40.mjs +31 -0
  439. package/dist/chunks/l10n-27a75c40.mjs.map +1 -0
  440. package/dist/chunks/l10n-4326316a.cjs +8 -0
  441. package/dist/chunks/l10n-4326316a.cjs.map +1 -0
  442. package/dist/chunks/l10n-903083c4.cjs +29 -0
  443. package/dist/chunks/l10n-903083c4.cjs.map +1 -0
  444. package/dist/chunks/l10n-c5f5f001.mjs +10 -0
  445. package/dist/chunks/l10n-c5f5f001.mjs.map +1 -0
  446. package/dist/chunks/logger-3612e664.mjs +25 -0
  447. package/dist/chunks/{logger-01af1a78.cjs.map → logger-3612e664.mjs.map} +1 -1
  448. package/dist/chunks/logger-4998b668.cjs +24 -0
  449. package/dist/chunks/{logger-ccc7ee65.mjs.map → logger-4998b668.cjs.map} +1 -1
  450. package/dist/chunks/referencePickerModal-0fde503d.mjs +877 -0
  451. package/dist/chunks/referencePickerModal-0fde503d.mjs.map +1 -0
  452. package/dist/chunks/referencePickerModal-9b4ff88d.cjs +858 -0
  453. package/dist/chunks/referencePickerModal-9b4ff88d.cjs.map +1 -0
  454. package/dist/index.cjs +251 -1
  455. package/dist/index.cjs.map +1 -1
  456. package/dist/index.mjs +286 -140
  457. package/dist/index.mjs.map +1 -1
  458. package/package.json +7 -7
  459. package/dist/Components/NcDatetime.cjs +0 -1
  460. package/dist/Components/NcDatetime.mjs +0 -44
  461. package/dist/Components/NcDatetimePicker.cjs +0 -1
  462. package/dist/Components/NcDatetimePicker.cjs.map +0 -1
  463. package/dist/Components/NcDatetimePicker.mjs +0 -69
  464. package/dist/Components/NcDatetimePicker.mjs.map +0 -1
  465. package/dist/assets/NcMentionBubble.css +0 -21
  466. package/dist/assets/index10.css +0 -21
  467. package/dist/assets/index11.css +0 -21
  468. package/dist/assets/index12.css +0 -21
  469. package/dist/assets/index14.css +0 -21
  470. package/dist/assets/index15.css +0 -21
  471. package/dist/assets/index16.css +0 -21
  472. package/dist/assets/index18.css +0 -21
  473. package/dist/assets/index19.css +0 -21
  474. package/dist/assets/index20.css +0 -21
  475. package/dist/assets/index21.css +0 -21
  476. package/dist/assets/index23.css +0 -21
  477. package/dist/assets/index24.css +0 -1
  478. package/dist/assets/index25.css +0 -21
  479. package/dist/assets/index26.css +0 -21
  480. package/dist/assets/index3.css +0 -21
  481. package/dist/assets/index30.css +0 -21
  482. package/dist/assets/index31.css +0 -21
  483. package/dist/assets/index32.css +0 -21
  484. package/dist/assets/index33.css +0 -21
  485. package/dist/assets/index34.css +0 -21
  486. package/dist/assets/index35.css +0 -21
  487. package/dist/assets/index36.css +0 -21
  488. package/dist/assets/index37.css +0 -21
  489. package/dist/assets/index38.css +0 -21
  490. package/dist/assets/index39.css +0 -21
  491. package/dist/assets/index4.css +0 -21
  492. package/dist/assets/index40.css +0 -21
  493. package/dist/assets/index41.css +0 -21
  494. package/dist/assets/index42.css +0 -21
  495. package/dist/assets/index43.css +0 -42
  496. package/dist/assets/index44.css +0 -21
  497. package/dist/assets/index45.css +0 -42
  498. package/dist/assets/index49.css +0 -42
  499. package/dist/assets/index5.css +0 -21
  500. package/dist/assets/index51.css +0 -21
  501. package/dist/assets/index52.css +0 -21
  502. package/dist/assets/index53.css +0 -42
  503. package/dist/assets/index54.css +0 -21
  504. package/dist/assets/index55.css +0 -21
  505. package/dist/assets/index56.css +0 -21
  506. package/dist/assets/index57.css +0 -21
  507. package/dist/assets/index58.css +0 -42
  508. package/dist/assets/index6.css +0 -21
  509. package/dist/assets/index7.css +0 -21
  510. package/dist/assets/index8.css +0 -21
  511. package/dist/assets/index9.css +0 -21
  512. package/dist/assets/referencePickerModal.css +0 -21
  513. package/dist/chunks/GenColors-8097de04.cjs +0 -1
  514. package/dist/chunks/GenColors-85cb6194.mjs +0 -25
  515. package/dist/chunks/GenRandomId-1e1b509a.mjs +0 -4
  516. package/dist/chunks/GenRandomId-67df40eb.cjs +0 -1
  517. package/dist/chunks/IsMobileState-151fc57d.cjs +0 -1
  518. package/dist/chunks/IsMobileState-151fc57d.cjs.map +0 -1
  519. package/dist/chunks/IsMobileState-e1fe5f58.mjs +0 -15
  520. package/dist/chunks/IsMobileState-e1fe5f58.mjs.map +0 -1
  521. package/dist/chunks/Linkify-a0faf443.mjs +0 -5
  522. package/dist/chunks/Linkify-a4db36a9.cjs +0 -1
  523. package/dist/chunks/NcAppNavigationToggle-5aa396d7.mjs +0 -23
  524. package/dist/chunks/NcAppNavigationToggle-5aa396d7.mjs.map +0 -1
  525. package/dist/chunks/NcAppNavigationToggle-c566f66e.cjs +0 -1
  526. package/dist/chunks/NcAppNavigationToggle-c566f66e.cjs.map +0 -1
  527. package/dist/chunks/NcInputConfirmCancel-77c2b04f.cjs +0 -1
  528. package/dist/chunks/NcInputConfirmCancel-77c2b04f.cjs.map +0 -1
  529. package/dist/chunks/NcInputConfirmCancel-c440e1b1.mjs +0 -43
  530. package/dist/chunks/NcInputConfirmCancel-c440e1b1.mjs.map +0 -1
  531. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_357e6d0e_lang-b35c2f97.cjs.map +0 -1
  532. package/dist/chunks/NcMentionBubble.vue_vue_type_style_index_0_scoped_357e6d0e_lang-b99cdc21.mjs.map +0 -1
  533. package/dist/chunks/NcRichText-13b09624.mjs +0 -123
  534. package/dist/chunks/NcRichText-1e8854a1.cjs +0 -1
  535. package/dist/chunks/ScopeComponent-dbcd0e07.mjs +0 -8
  536. package/dist/chunks/ScopeComponent-f6122f5a.cjs +0 -1
  537. package/dist/chunks/_plugin-vue2_normalizer-5b4c43a4.mjs +0 -24
  538. package/dist/chunks/_plugin-vue2_normalizer-5b4c43a4.mjs.map +0 -1
  539. package/dist/chunks/_plugin-vue2_normalizer-764a4c12.cjs +0 -1
  540. package/dist/chunks/_plugin-vue2_normalizer-764a4c12.cjs.map +0 -1
  541. package/dist/chunks/actionGlobal-cda46023.mjs +0 -15
  542. package/dist/chunks/actionGlobal-ec7003e8.cjs +0 -1
  543. package/dist/chunks/actionText-6c35d3fc.mjs +0 -23
  544. package/dist/chunks/actionText-bef01778.cjs +0 -1
  545. package/dist/chunks/focusTrap-139520e2.cjs +0 -1
  546. package/dist/chunks/focusTrap-173aba65.mjs +0 -6
  547. package/dist/chunks/index-12fa9b26.cjs +0 -1
  548. package/dist/chunks/index-12fa9b26.cjs.map +0 -1
  549. package/dist/chunks/index-7aa3fc24.mjs +0 -171
  550. package/dist/chunks/index-7aa3fc24.mjs.map +0 -1
  551. package/dist/chunks/index-9c621303.mjs +0 -46
  552. package/dist/chunks/index-c4cd0463.cjs +0 -3
  553. package/dist/chunks/index-cd3f1f8f.mjs +0 -43
  554. package/dist/chunks/index-df3f51c6.cjs +0 -1
  555. package/dist/chunks/l10n-05baf7da.mjs +0 -5
  556. package/dist/chunks/l10n-05baf7da.mjs.map +0 -1
  557. package/dist/chunks/l10n-46d0c1c0.cjs +0 -1
  558. package/dist/chunks/l10n-46d0c1c0.cjs.map +0 -1
  559. package/dist/chunks/l10n-9a5a6afc.mjs +0 -18
  560. package/dist/chunks/l10n-9a5a6afc.mjs.map +0 -1
  561. package/dist/chunks/l10n-dacb6440.cjs +0 -1
  562. package/dist/chunks/l10n-dacb6440.cjs.map +0 -1
  563. package/dist/chunks/logger-01af1a78.cjs +0 -1
  564. package/dist/chunks/logger-ccc7ee65.mjs +0 -5
  565. package/dist/chunks/referencePickerModal-2b16b319.mjs +0 -428
  566. package/dist/chunks/referencePickerModal-2b16b319.mjs.map +0 -1
  567. package/dist/chunks/referencePickerModal-44160fb3.cjs +0 -1
  568. package/dist/chunks/referencePickerModal-44160fb3.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NcPasswordField.mjs","sources":["../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\n - @author Carl Schwan <carl@carlschwan.eu>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField :value.sync=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\t:value.sync=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\t:value.sync=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField :value.sync=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField :value.sync=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"{...$attrs, ...$props }\"\n\t\tref=\"inputField\"\n\t\t:type=\"isPasswordHidden ? 'password' : 'text'\"\n\t\t:show-trailing-button=\"showTrailingButton && true\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"togglePasswordVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\t\t<template #trailing-button-icon>\n\t\t\t<Eye v-if=\"isPasswordHidden\" :size=\"18\" />\n\t\t\t<EyeOff v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport debounce from 'debounce'\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { t } from '../../l10n.js'\nimport logger from '../../utils/logger.js'\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tEye,\n\t\tEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t...NcInputField.props,\n\n\t\t/**\n\t\t * Additional error message\n\t\t *\n\t\t * This will be displayed beneath the input field\n\t\t */\n\t\thelperText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t'update:value',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tisPasswordHidden: true,\n\t\t\tinternalHelpMessage: '',\n\t\t\tpasswordPolicy: loadState('core', 'capabilities', {}).password_policy || null,\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength, passwordPolicy } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.isPasswordHidden ? t('Show password') : t('Hide password')\n\t\t},\n\t},\n\n\twatch: {\n\t\tvalue(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (this.passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (this.passwordPolicy) {\n\t\t\t\t\tthis.checkPassword(newValue)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\t/**\n\t\t\t * Triggers when the value inside the password field is\n\t\t\t * updated.\n\t\t\t *\n\t\t\t * @property {string} The new value\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\ttogglePasswordVisibility() {\n\t\t\tthis.isPasswordHidden = !this.isPasswordHidden\n\t\t},\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcInputField","Eye","EyeOff","loadState","minlength","passwordPolicy","t","newValue","event","debounce","password","data","axios","generateOcsUrl","logger"],"mappings":";;;;;;;;;;AAmIA,MAAAA,IAAA,EACA,MAAA,mBAEA,YAAA,EACA,cAAAC,GACA,KAAAC,GACA,QAAAC,EACA,GAGA,cAAA,IAEA,OAAA,EACA,GAAAF,EAAA,OAOA,YAAA,EACA,MAAA,QACA,SAAA,GACA,GASA,uBAAA,EACA,MAAA,SACA,SAAA,GACA,GAMA,WAAA,EACA,MAAA,QACA,SAAA,EACA,GAMA,WAAA,EACA,MAAA,QACA,SAAA,KACA,GAKA,oBAAA,EACA,MAAA,SACA,SAAA,GACA,EACA,GAEA,OAAA,CACA,SACA,WACA,cACA,GAEA,OAAA;AACA,SAAA,EACA,kBAAA,IACA,qBAAA,IACA,gBAAAG,EAAA,QAAA,gBAAA,CAAA,CAAA,EAAA,mBAAA,MACA,SAAA,KACA;AACA,GAEA,UAAA,EACA,gBAAA;AACA,SAAA,KAAA,SAAA,KAAA,YAAA;AACA,GACA,kBAAA;AACA,SAAA,KAAA,WAAA,KAAA,YAAA;AACA,GACA,qBAAA;AACA,SAAA,KAAA,WAAA,SAAA,IACA,KAAA,aAEA,KAAA;AACA,GAEA,QAAA;AACA,QAAA,EAAA,WAAAC,GAAA,gBAAAC,EAAA,IAAA;AACA,SAAA,EACA,WAAAD,gBAAAC,uBAAA,UACA;AACA,GAEA,8BAAA;AACA,SAAA,KAAA,mBAAAC,EAAA,eAAA,IAAAA,EAAA,eAAA;AACA,EACA,GAEA,OAAA,EACA,MAAAC,GAAA;AACA,MAAA,KAAA,uBAAA;AACA,QAAA,KAAA,mBAAA;AACA;AAEA,SAAA,kBACA,KAAA,cAAAA,CAAA;AAAA,EAAA;AAGA,EACA,GAEA,SAAA,EAMA,QAAA;AACA,OAAA,MAAA,WAAA,MAAA;AACA,GAOA,SAAA;AACA,OAAA,MAAA,WAAA,OAAA;AACA,GAEA,YAAAC,GAAA;AAOA,OAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AACA,GACA,2BAAA;AACA,OAAA,mBAAA,CAAA,KAAA;AACA,GACA,eAAAC,EAAA,eAAAC,GAAA;AACA,MAAA;AACA,UAAA,EAAA,MAAAC,MAAA,MAAAC,EAAA,KAAAC,EAAA,sCAAA,GAAA,EAAA,UAAAH,GAAA;AAEA,QADA,KAAA,UAAAC,EAAA,IAAA,KAAA,QACAA,EAAA,IAAA,KAAA,QAAA;AACA,WAAA,sBAAAL,EAAA,oBAAA,GAKA,KAAA,MAAA,OAAA;AACA;AAAA,IAAA;AAGA,SAAA,sBAAAK,EAAA,IAAA,KAAA,QAKA,KAAA,MAAA,SAAA;AAAA,EACA,SAAA,GAAA;AACAG,MAAA,MAAA,qCAAA,CAAA;AAAA,EACA;AACA,GAAA,GAAA,EACA,EACA;;;;;;;;"}
1
+ {"version":3,"file":"NcPasswordField.mjs","sources":["../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2022 Marco Ambrosini <marcoambrosini@pm.me>\n -\n - @author Marco Ambrosini <marcoambrosini@pm.me>\n - @author Carl Schwan <carl@carlschwan.eu>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField :value.sync=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\t:value.sync=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\t:value.sync=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField :value.sync=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField :value.sync=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"{...$attrs, ...$props }\"\n\t\tref=\"inputField\"\n\t\t:type=\"isPasswordHidden ? 'password' : 'text'\"\n\t\t:show-trailing-button=\"showTrailingButton && true\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"togglePasswordVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\t\t<template #trailing-button-icon>\n\t\t\t<Eye v-if=\"isPasswordHidden\" :size=\"18\" />\n\t\t\t<EyeOff v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport debounce from 'debounce'\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { t } from '../../l10n.js'\nimport logger from '../../utils/logger.js'\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tEye,\n\t\tEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t...NcInputField.props,\n\n\t\t/**\n\t\t * Additional error message\n\t\t *\n\t\t * This will be displayed beneath the input field\n\t\t */\n\t\thelperText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t'update:value',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tisPasswordHidden: true,\n\t\t\tinternalHelpMessage: '',\n\t\t\tpasswordPolicy: loadState('core', 'capabilities', {}).password_policy || null,\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength, passwordPolicy } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.isPasswordHidden ? t('Show password') : t('Hide password')\n\t\t},\n\t},\n\n\twatch: {\n\t\tvalue(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (this.passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (this.passwordPolicy) {\n\t\t\t\t\tthis.checkPassword(newValue)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\t/**\n\t\t\t * Triggers when the value inside the password field is\n\t\t\t * updated.\n\t\t\t *\n\t\t\t * @property {string} The new value\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\ttogglePasswordVisibility() {\n\t\t\tthis.isPasswordHidden = !this.isPasswordHidden\n\t\t},\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n"],"names":["_sfc_main","NcInputField","Eye","EyeOff","loadState","minlength","passwordPolicy","t","newValue","event","debounce","password","data","axios","generateOcsUrl","logger"],"mappings":";;;;;;;;;;AAmIA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,KAAAC;AAAA,IACA,QAAAC;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,GAAAF,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,uBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,kBAAA;AAAA,MACA,qBAAA;AAAA,MACA,gBAAAG,EAAA,QAAA,gBAAA,CAAA,CAAA,EAAA,mBAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,gBAAA;AACA,aAAA,KAAA,SAAA,KAAA,YAAA;AAAA,IACA;AAAA,IACA,kBAAA;AACA,aAAA,KAAA,WAAA,KAAA,YAAA;AAAA,IACA;AAAA,IACA,qBAAA;AACA,aAAA,KAAA,WAAA,SAAA,IACA,KAAA,aAEA,KAAA;AAAA,IACA;AAAA,IAEA,QAAA;AACA,YAAA,EAAA,WAAAC,GAAA,gBAAAC,EAAA,IAAA;AACA,aAAA;AAAA,QACA,WAAAD,KAAA,OAAAA,IAAAC,KAAA,gBAAAA,EAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,8BAAA;AACA,aAAA,KAAA,mBAAAC,EAAA,eAAA,IAAAA,EAAA,eAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAAC,GAAA;AACA,UAAA,KAAA,uBAAA;AACA,YAAA,KAAA,mBAAA;AACA;AAEA,QAAA,KAAA,kBACA,KAAA,cAAAA,CAAA;AAAA,MAEA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AACA,WAAA,MAAA,WAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AACA,WAAA,MAAA,WAAA,OAAA;AAAA,IACA;AAAA,IAEA,YAAAC,GAAA;AAOA,WAAA,MAAA,gBAAAA,EAAA,OAAA,KAAA;AAAA,IACA;AAAA,IACA,2BAAA;AACA,WAAA,mBAAA,CAAA,KAAA;AAAA,IACA;AAAA,IACA,eAAAC,EAAA,eAAAC,GAAA;AACA,UAAA;AACA,cAAA,EAAA,MAAAC,MAAA,MAAAC,EAAA,KAAAC,EAAA,sCAAA,GAAA,EAAA,UAAAH,GAAA;AAEA,YADA,KAAA,UAAAC,EAAA,IAAA,KAAA,QACAA,EAAA,IAAA,KAAA,QAAA;AACA,eAAA,sBAAAL,EAAA,oBAAA,GAKA,KAAA,MAAA,OAAA;AACA;AAAA,QACA;AAEA,aAAA,sBAAAK,EAAA,IAAA,KAAA,QAKA,KAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACA,QAAAG,EAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1 +1,125 @@
1
- var d=require("../assets/index23.css");const r=require("floating-vue"),s=require("focus-trap"),a=require("../chunks/focusTrap-139520e2.cjs"),p=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const n={name:"NcPopover",components:{Dropdown:r.Dropdown},inheritAttrs:!1,props:{popoverBaseClass:{type:String,default:""},focusTrap:{type:Boolean,default:!0},setReturnFocus:{default:void 0,type:[HTMLElement,SVGElement,String,Boolean]}},emits:["after-show","after-hide"],beforeDestroy(){this.clearFocusTrap(),this.clearEscapeStopPropagation()},methods:{getPopoverContentElement(){var e,t;return(t=(e=this.$refs.popover)==null?void 0:e.$refs.popperContent)==null?void 0:t.$el},async useFocusTrap(){if(await this.$nextTick(),!this.focusTrap)return;const e=this.getPopoverContentElement();e&&(this.$focusTrap=s.createFocusTrap(e,{escapeDeactivates:!1,allowOutsideClick:!0,setReturnFocus:this.setReturnFocus,trapStack:a.getTrapStack()}),this.$focusTrap.activate())},clearFocusTrap(e={}){var t;try{(t=this.$focusTrap)==null||t.deactivate(e),this.$focusTrap=null}catch(o){console.warn(o)}},addEscapeStopPropagation(){var e;(e=this.getPopoverContentElement())==null||e.addEventListener("keydown",this.stopKeydownEscapeHandler)},clearEscapeStopPropagation(){var e;(e=this.getPopoverContentElement())==null||e.removeEventListener("keydown",this.stopKeydownEscapeHandler)},stopKeydownEscapeHandler(e){e.type==="keydown"&&e.key==="Escape"&&e.stopPropagation()},afterShow(){this.$nextTick(()=>{this.$emit("after-show"),this.useFocusTrap(),this.addEscapeStopPropagation()})},afterHide(){this.$emit("after-hide"),this.clearFocusTrap(),this.clearEscapeStopPropagation()}}};var i=function(){var e=this,t=e._self._c;return t("Dropdown",e._g(e._b({ref:"popover",attrs:{distance:10,"arrow-padding":10,"no-auto-focus":!0,"popper-class":e.popoverBaseClass},on:{"apply-show":e.afterShow,"apply-hide":e.afterHide},scopedSlots:e._u([{key:"popper",fn:function(){return[e._t("default")]},proxy:!0}],null,!0)},"Dropdown",e.$attrs,!1),e.$listeners),[e._t("trigger")],2)},c=[],l=p.normalizeComponent(n,i,c,!1,null,null,null,null);const u=l.exports;module.exports=u;
1
+ var d = require("../assets/index-4ebacc78.css");
2
+ const r = require("floating-vue"), s = require("focus-trap"), a = require("../chunks/focusTrap-14985831.cjs"), n = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
+ const p = {
4
+ name: "NcPopover",
5
+ components: {
6
+ Dropdown: r.Dropdown
7
+ },
8
+ inheritAttrs: !1,
9
+ props: {
10
+ popoverBaseClass: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ /**
15
+ * Enable popover focus trap
16
+ */
17
+ focusTrap: {
18
+ type: Boolean,
19
+ default: !0
20
+ },
21
+ /**
22
+ * Set element to return focus to after focus trap deactivation
23
+ *
24
+ * @type {import('focus-trap').FocusTargetValueOrFalse}
25
+ */
26
+ setReturnFocus: {
27
+ default: void 0,
28
+ type: [HTMLElement, SVGElement, String, Boolean]
29
+ }
30
+ },
31
+ emits: [
32
+ "after-show",
33
+ "after-hide"
34
+ ],
35
+ beforeDestroy() {
36
+ this.clearFocusTrap(), this.clearEscapeStopPropagation();
37
+ },
38
+ methods: {
39
+ /**
40
+ * @return {HTMLElement|undefined}
41
+ */
42
+ getPopoverContentElement() {
43
+ var e, t;
44
+ return (t = (e = this.$refs.popover) == null ? void 0 : e.$refs.popperContent) == null ? void 0 : t.$el;
45
+ },
46
+ /**
47
+ * Add focus trap for accessibility.
48
+ */
49
+ async useFocusTrap() {
50
+ if (await this.$nextTick(), !this.focusTrap)
51
+ return;
52
+ const e = this.getPopoverContentElement();
53
+ e && (this.$focusTrap = s.createFocusTrap(e, {
54
+ // Prevents to lose focus using esc key
55
+ // Focus will be release when popover be hide
56
+ escapeDeactivates: !1,
57
+ allowOutsideClick: !0,
58
+ setReturnFocus: this.setReturnFocus,
59
+ trapStack: a.getTrapStack()
60
+ }), this.$focusTrap.activate());
61
+ },
62
+ /**
63
+ * Remove focus trap
64
+ *
65
+ * @param {object} options The configuration options for focusTrap
66
+ */
67
+ clearFocusTrap(e = {}) {
68
+ var t;
69
+ try {
70
+ (t = this.$focusTrap) == null || t.deactivate(e), this.$focusTrap = null;
71
+ } catch (o) {
72
+ console.warn(o);
73
+ }
74
+ },
75
+ /**
76
+ * Add stopPropagation for Escape.
77
+ * It prevents global Escape handling after closing popover.
78
+ *
79
+ * Manual event handling is used here instead of v-on because there is no direct access to the node.
80
+ * Alternative - wrap <template #popover> in a div wrapper.
81
+ */
82
+ addEscapeStopPropagation() {
83
+ const e = this.getPopoverContentElement();
84
+ e == null || e.addEventListener("keydown", this.stopKeydownEscapeHandler);
85
+ },
86
+ /**
87
+ * Remove stop Escape handler
88
+ */
89
+ clearEscapeStopPropagation() {
90
+ const e = this.getPopoverContentElement();
91
+ e == null || e.removeEventListener("keydown", this.stopKeydownEscapeHandler);
92
+ },
93
+ /**
94
+ * @param {KeyboardEvent} event - native keydown event
95
+ */
96
+ stopKeydownEscapeHandler(e) {
97
+ e.type === "keydown" && e.key === "Escape" && e.stopPropagation();
98
+ },
99
+ afterShow() {
100
+ this.$nextTick(() => {
101
+ this.$emit("after-show"), this.useFocusTrap(), this.addEscapeStopPropagation();
102
+ });
103
+ },
104
+ afterHide() {
105
+ this.$emit("after-hide"), this.clearFocusTrap(), this.clearEscapeStopPropagation();
106
+ }
107
+ }
108
+ };
109
+ var c = function() {
110
+ var t = this, o = t._self._c;
111
+ return o("Dropdown", t._g(t._b({ ref: "popover", attrs: { distance: 10, "arrow-padding": 10, "no-auto-focus": !0, "popper-class": t.popoverBaseClass }, on: { "apply-show": t.afterShow, "apply-hide": t.afterHide }, scopedSlots: t._u([{ key: "popper", fn: function() {
112
+ return [t._t("default")];
113
+ }, proxy: !0 }], null, !0) }, "Dropdown", t.$attrs, !1), t.$listeners), [t._t("trigger")], 2);
114
+ }, i = [], u = /* @__PURE__ */ n.normalizeComponent(
115
+ p,
116
+ c,
117
+ i,
118
+ !1,
119
+ null,
120
+ null,
121
+ null,
122
+ null
123
+ );
124
+ const l = u.exports;
125
+ module.exports = l;
@@ -1 +1 @@
1
- {"version":3,"file":"NcPopover.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"NcPopover.cjs","sources":["../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<button>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" @submit.prevent>\n\t\t\t\t\t<h2>this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown ref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"popoverBaseClass\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t<slot name=\"trigger\" />\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper>\n\t\t\t<slot />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport { Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { getTrapStack } from '../../utils/focusTrap.js'\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {import('focus-trap').FocusTargetValueOrFalse}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [HTMLElement, SVGElement, String, Boolean],\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t],\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (!this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus,\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tafterShow() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t *\n\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t */\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$emit('after-show')\n\t\t\t\tthis.useFocusTrap()\n\t\t\t\tthis.addEscapeStopPropagation()\n\t\t\t})\n\t\t},\n\t\tafterHide() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t */\n\t\t\tthis.$emit('after-hide')\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\n.resize-observer {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\tz-index:-1;\n\twidth:100%;\n\theight:100%;\n\tborder:none;\n\tbackground-color:transparent;\n\tpointer-events:none;\n\tdisplay:block;\n\toverflow:hidden;\n\topacity:0\n}\n\n.resize-observer object {\n\tdisplay:block;\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\theight:100%;\n\twidth:100%;\n\toverflow:hidden;\n\tpointer-events:none;\n\tz-index:-1\n}\n\n$arrow-width: 10px;\n\n.v-popper--theme-dropdown {\n\t&.v-popper__popper {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\tfilter: drop-shadow(0 1px 10px var(--color-box-shadow));\n\n\t\t.v-popper__inner {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t.v-popper__arrow-container {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] .v-popper__arrow-container {\n\t\t\tbottom: -$arrow-width;\n\t\t\tborder-bottom-width: 0;\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] .v-popper__arrow-container {\n\t\t\ttop: -$arrow-width;\n\t\t\tborder-top-width: 0;\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] .v-popper__arrow-container {\n\t\t\tleft: -$arrow-width;\n\t\t\tborder-left-width: 0;\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] .v-popper__arrow-container {\n\t\t\tright: -$arrow-width;\n\t\t\tborder-right-width: 0;\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","floatingVue","_b","_a","el","focusTrap","focusTrap$1","options","err","event"],"mappings":";;AAgIA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC,EAAA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA,CAAA,aAAA,YAAA,QAAA,OAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,gBAAA;AACA,SAAA,eAAA,GACA,KAAA,2BAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA,IAIA,2BAAA;;AACA,cAAAC,KAAAC,IAAA,KAAA,MAAA,YAAA,gBAAAA,EAAA,MAAA,kBAAA,gBAAAD,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA,eAAA;AAGA,UAFA,MAAA,KAAA,UAAA,GAEA,CAAA,KAAA;AACA;AAGA,YAAAE,IAAA,KAAA,yBAAA;AAEA,MAAAA,MAKA,KAAA,aAAAC,EAAA,gBAAAD,GAAA;AAAA;AAAA;AAAA,QAGA,mBAAA;AAAA,QACA,mBAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,WAAAE,EAAA,aAAA;AAAA,MACA,CAAA,GACA,KAAA,WAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,eAAAC,IAAA,CAAA,GAAA;;AACA,UAAA;AACA,SAAAJ,IAAA,KAAA,eAAA,QAAAA,EAAA,WAAAI,IACA,KAAA,aAAA;AAAA,MACA,SAAAC,GAAA;AACA,gBAAA,KAAAA,CAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,2BAAA;AACA,YAAAJ,IAAA,KAAA,yBAAA;AACA,MAAAA,KAAA,QAAAA,EAAA,iBAAA,WAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,6BAAA;AACA,YAAAA,IAAA,KAAA,yBAAA;AACA,MAAAA,KAAA,QAAAA,EAAA,oBAAA,WAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAAK,GAAA;AACA,MAAAA,EAAA,SAAA,aAAAA,EAAA,QAAA,YACAA,EAAA,gBAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AAQA,WAAA,UAAA,MAAA;AACA,aAAA,MAAA,YAAA,GACA,KAAA,aAAA,GACA,KAAA,yBAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IACA,YAAA;AAIA,WAAA,MAAA,YAAA,GACA,KAAA,eAAA,GACA,KAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
@@ -1,47 +1,130 @@
1
- import "../assets/index6.css";
1
+ import "../assets/index-4ebacc78.css";
2
2
  import { Dropdown as r } from "floating-vue";
3
3
  import { createFocusTrap as s } from "focus-trap";
4
- import { g as a } from "../chunks/focusTrap-173aba65.mjs";
5
- import { n as p } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
6
- const n = { name: "NcPopover", components: { Dropdown: r }, inheritAttrs: !1, props: { popoverBaseClass: { type: String, default: "" }, focusTrap: { type: Boolean, default: !0 }, setReturnFocus: { default: void 0, type: [HTMLElement, SVGElement, String, Boolean] } }, emits: ["after-show", "after-hide"], beforeDestroy() {
7
- this.clearFocusTrap(), this.clearEscapeStopPropagation();
8
- }, methods: { getPopoverContentElement() {
9
- var e, t;
10
- return (t = (e = this.$refs.popover) == null ? void 0 : e.$refs.popperContent) == null ? void 0 : t.$el;
11
- }, async useFocusTrap() {
12
- if (await this.$nextTick(), !this.focusTrap)
13
- return;
14
- const e = this.getPopoverContentElement();
15
- e && (this.$focusTrap = s(e, { escapeDeactivates: !1, allowOutsideClick: !0, setReturnFocus: this.setReturnFocus, trapStack: a() }), this.$focusTrap.activate());
16
- }, clearFocusTrap(e = {}) {
17
- var t;
18
- try {
19
- (t = this.$focusTrap) == null || t.deactivate(e), this.$focusTrap = null;
20
- } catch (o) {
21
- console.warn(o);
4
+ import { g as a } from "../chunks/focusTrap-5d0f71d4.mjs";
5
+ import { n } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
6
+ const p = {
7
+ name: "NcPopover",
8
+ components: {
9
+ Dropdown: r
10
+ },
11
+ inheritAttrs: !1,
12
+ props: {
13
+ popoverBaseClass: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ /**
18
+ * Enable popover focus trap
19
+ */
20
+ focusTrap: {
21
+ type: Boolean,
22
+ default: !0
23
+ },
24
+ /**
25
+ * Set element to return focus to after focus trap deactivation
26
+ *
27
+ * @type {import('focus-trap').FocusTargetValueOrFalse}
28
+ */
29
+ setReturnFocus: {
30
+ default: void 0,
31
+ type: [HTMLElement, SVGElement, String, Boolean]
32
+ }
33
+ },
34
+ emits: [
35
+ "after-show",
36
+ "after-hide"
37
+ ],
38
+ beforeDestroy() {
39
+ this.clearFocusTrap(), this.clearEscapeStopPropagation();
40
+ },
41
+ methods: {
42
+ /**
43
+ * @return {HTMLElement|undefined}
44
+ */
45
+ getPopoverContentElement() {
46
+ var e, t;
47
+ return (t = (e = this.$refs.popover) == null ? void 0 : e.$refs.popperContent) == null ? void 0 : t.$el;
48
+ },
49
+ /**
50
+ * Add focus trap for accessibility.
51
+ */
52
+ async useFocusTrap() {
53
+ if (await this.$nextTick(), !this.focusTrap)
54
+ return;
55
+ const e = this.getPopoverContentElement();
56
+ e && (this.$focusTrap = s(e, {
57
+ // Prevents to lose focus using esc key
58
+ // Focus will be release when popover be hide
59
+ escapeDeactivates: !1,
60
+ allowOutsideClick: !0,
61
+ setReturnFocus: this.setReturnFocus,
62
+ trapStack: a()
63
+ }), this.$focusTrap.activate());
64
+ },
65
+ /**
66
+ * Remove focus trap
67
+ *
68
+ * @param {object} options The configuration options for focusTrap
69
+ */
70
+ clearFocusTrap(e = {}) {
71
+ var t;
72
+ try {
73
+ (t = this.$focusTrap) == null || t.deactivate(e), this.$focusTrap = null;
74
+ } catch (o) {
75
+ console.warn(o);
76
+ }
77
+ },
78
+ /**
79
+ * Add stopPropagation for Escape.
80
+ * It prevents global Escape handling after closing popover.
81
+ *
82
+ * Manual event handling is used here instead of v-on because there is no direct access to the node.
83
+ * Alternative - wrap <template #popover> in a div wrapper.
84
+ */
85
+ addEscapeStopPropagation() {
86
+ const e = this.getPopoverContentElement();
87
+ e == null || e.addEventListener("keydown", this.stopKeydownEscapeHandler);
88
+ },
89
+ /**
90
+ * Remove stop Escape handler
91
+ */
92
+ clearEscapeStopPropagation() {
93
+ const e = this.getPopoverContentElement();
94
+ e == null || e.removeEventListener("keydown", this.stopKeydownEscapeHandler);
95
+ },
96
+ /**
97
+ * @param {KeyboardEvent} event - native keydown event
98
+ */
99
+ stopKeydownEscapeHandler(e) {
100
+ e.type === "keydown" && e.key === "Escape" && e.stopPropagation();
101
+ },
102
+ afterShow() {
103
+ this.$nextTick(() => {
104
+ this.$emit("after-show"), this.useFocusTrap(), this.addEscapeStopPropagation();
105
+ });
106
+ },
107
+ afterHide() {
108
+ this.$emit("after-hide"), this.clearFocusTrap(), this.clearEscapeStopPropagation();
109
+ }
22
110
  }
23
- }, addEscapeStopPropagation() {
24
- var e;
25
- (e = this.getPopoverContentElement()) == null || e.addEventListener("keydown", this.stopKeydownEscapeHandler);
26
- }, clearEscapeStopPropagation() {
27
- var e;
28
- (e = this.getPopoverContentElement()) == null || e.removeEventListener("keydown", this.stopKeydownEscapeHandler);
29
- }, stopKeydownEscapeHandler(e) {
30
- e.type === "keydown" && e.key === "Escape" && e.stopPropagation();
31
- }, afterShow() {
32
- this.$nextTick(() => {
33
- this.$emit("after-show"), this.useFocusTrap(), this.addEscapeStopPropagation();
34
- });
35
- }, afterHide() {
36
- this.$emit("after-hide"), this.clearFocusTrap(), this.clearEscapeStopPropagation();
37
- } } };
111
+ };
38
112
  var i = function() {
39
- var e = this, t = e._self._c;
40
- return t("Dropdown", e._g(e._b({ ref: "popover", attrs: { distance: 10, "arrow-padding": 10, "no-auto-focus": !0, "popper-class": e.popoverBaseClass }, on: { "apply-show": e.afterShow, "apply-hide": e.afterHide }, scopedSlots: e._u([{ key: "popper", fn: function() {
41
- return [e._t("default")];
42
- }, proxy: !0 }], null, !0) }, "Dropdown", e.$attrs, !1), e.$listeners), [e._t("trigger")], 2);
43
- }, c = [], l = p(n, i, c, !1, null, null, null, null);
44
- const w = l.exports;
113
+ var t = this, o = t._self._c;
114
+ return o("Dropdown", t._g(t._b({ ref: "popover", attrs: { distance: 10, "arrow-padding": 10, "no-auto-focus": !0, "popper-class": t.popoverBaseClass }, on: { "apply-show": t.afterShow, "apply-hide": t.afterHide }, scopedSlots: t._u([{ key: "popper", fn: function() {
115
+ return [t._t("default")];
116
+ }, proxy: !0 }], null, !0) }, "Dropdown", t.$attrs, !1), t.$listeners), [t._t("trigger")], 2);
117
+ }, c = [], l = /* @__PURE__ */ n(
118
+ p,
119
+ i,
120
+ c,
121
+ !1,
122
+ null,
123
+ null,
124
+ null,
125
+ null
126
+ );
127
+ const _ = l.exports;
45
128
  export {
46
- w as default
129
+ _ as default
47
130
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcPopover.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcPopover.mjs","sources":["../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<button>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" @submit.prevent>\n\t\t\t\t\t<h2>this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown ref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"popoverBaseClass\"\n\t\tv-on=\"$listeners\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t<slot name=\"trigger\" />\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper>\n\t\t\t<slot />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport { Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { getTrapStack } from '../../utils/focusTrap.js'\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {import('focus-trap').FocusTargetValueOrFalse}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [HTMLElement, SVGElement, String, Boolean],\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t],\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (!this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus,\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tafterShow() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t *\n\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t */\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$emit('after-show')\n\t\t\t\tthis.useFocusTrap()\n\t\t\t\tthis.addEscapeStopPropagation()\n\t\t\t})\n\t\t},\n\t\tafterHide() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t */\n\t\t\tthis.$emit('after-hide')\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\n.resize-observer {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\tz-index:-1;\n\twidth:100%;\n\theight:100%;\n\tborder:none;\n\tbackground-color:transparent;\n\tpointer-events:none;\n\tdisplay:block;\n\toverflow:hidden;\n\topacity:0\n}\n\n.resize-observer object {\n\tdisplay:block;\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\theight:100%;\n\twidth:100%;\n\toverflow:hidden;\n\tpointer-events:none;\n\tz-index:-1\n}\n\n$arrow-width: 10px;\n\n.v-popper--theme-dropdown {\n\t&.v-popper__popper {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\tfilter: drop-shadow(0 1px 10px var(--color-box-shadow));\n\n\t\t.v-popper__inner {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t.v-popper__arrow-container {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] .v-popper__arrow-container {\n\t\t\tbottom: -$arrow-width;\n\t\t\tborder-bottom-width: 0;\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] .v-popper__arrow-container {\n\t\t\ttop: -$arrow-width;\n\t\t\tborder-top-width: 0;\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] .v-popper__arrow-container {\n\t\t\tleft: -$arrow-width;\n\t\t\tborder-left-width: 0;\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] .v-popper__arrow-container {\n\t\t\tright: -$arrow-width;\n\t\t\tborder-right-width: 0;\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","Dropdown","_b","_a","el","createFocusTrap","getTrapStack","options","err","event"],"mappings":";;;;;AAgIA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA,CAAA,aAAA,YAAA,QAAA,OAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,gBAAA;AACA,SAAA,eAAA,GACA,KAAA,2BAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA,IAIA,2BAAA;;AACA,cAAAC,KAAAC,IAAA,KAAA,MAAA,YAAA,gBAAAA,EAAA,MAAA,kBAAA,gBAAAD,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA,eAAA;AAGA,UAFA,MAAA,KAAA,UAAA,GAEA,CAAA,KAAA;AACA;AAGA,YAAAE,IAAA,KAAA,yBAAA;AAEA,MAAAA,MAKA,KAAA,aAAAC,EAAAD,GAAA;AAAA;AAAA;AAAA,QAGA,mBAAA;AAAA,QACA,mBAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,WAAAE,EAAA;AAAA,MACA,CAAA,GACA,KAAA,WAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,eAAAC,IAAA,CAAA,GAAA;;AACA,UAAA;AACA,SAAAJ,IAAA,KAAA,eAAA,QAAAA,EAAA,WAAAI,IACA,KAAA,aAAA;AAAA,MACA,SAAAC,GAAA;AACA,gBAAA,KAAAA,CAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,2BAAA;AACA,YAAAJ,IAAA,KAAA,yBAAA;AACA,MAAAA,KAAA,QAAAA,EAAA,iBAAA,WAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,6BAAA;AACA,YAAAA,IAAA,KAAA,yBAAA;AACA,MAAAA,KAAA,QAAAA,EAAA,oBAAA,WAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAAK,GAAA;AACA,MAAAA,EAAA,SAAA,aAAAA,EAAA,QAAA,YACAA,EAAA,gBAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AAQA,WAAA,UAAA,MAAA;AACA,aAAA,MAAA,YAAA,GACA,KAAA,aAAA,GACA,KAAA,yBAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IACA,YAAA;AAIA,WAAA,MAAA,YAAA,GACA,KAAA,eAAA,GACA,KAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1 +1,57 @@
1
- var n=require("../assets/index20.css");const s=require("../chunks/_plugin-vue2_normalizer-764a4c12.cjs");const t={name:"NcProgressBar",props:{value:{type:Number,default:0,validator(r){return r>=0&&r<=100}},size:{type:String,default:"small",validator(r){return["small","medium"].indexOf(r)!==-1}},error:{type:Boolean,default:!1}},computed:{height(){return this.size==="small"?"4px":"6px"}}};var a=function(){var r=this,e=r._self._c;return e("progress",{staticClass:"progress-bar vue",class:{"progress-bar--error":r.error},style:{"--progress-bar-height":r.height},attrs:{max:"100"},domProps:{value:r.value}})},l=[],o=s.normalizeComponent(t,a,l,!1,null,"b171a315",null,null);const u=o.exports;module.exports=u;
1
+ var i = require("../assets/index-61b63a8f.css");
2
+ const t = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
+ const a = {
4
+ name: "NcProgressBar",
5
+ props: {
6
+ /**
7
+ * An integer between 1 and 100
8
+ */
9
+ value: {
10
+ type: Number,
11
+ default: 0,
12
+ validator(r) {
13
+ return r >= 0 && r <= 100;
14
+ }
15
+ },
16
+ /**
17
+ * Determines the height of the progressbar.
18
+ * Possible values:
19
+ * - 'small' (default)
20
+ * - 'medium'
21
+ */
22
+ size: {
23
+ type: String,
24
+ default: "small",
25
+ validator(r) {
26
+ return ["small", "medium"].indexOf(r) !== -1;
27
+ }
28
+ },
29
+ /**
30
+ * Applies an error color to the progressbar if true.
31
+ */
32
+ error: {
33
+ type: Boolean,
34
+ default: !1
35
+ }
36
+ },
37
+ computed: {
38
+ height() {
39
+ return this.size === "small" ? "4px" : "6px";
40
+ }
41
+ }
42
+ };
43
+ var o = function() {
44
+ var e = this, s = e._self._c;
45
+ return s("progress", { staticClass: "progress-bar vue", class: { "progress-bar--error": e.error }, style: { "--progress-bar-height": e.height }, attrs: { max: "100" }, domProps: { value: e.value } });
46
+ }, n = [], l = /* @__PURE__ */ t.normalizeComponent(
47
+ a,
48
+ o,
49
+ n,
50
+ !1,
51
+ null,
52
+ "b171a315",
53
+ null,
54
+ null
55
+ );
56
+ const _ = l.exports;
57
+ module.exports = _;
@@ -1 +1 @@
1
- {"version":3,"file":"NcProgressBar.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"NcProgressBar.cjs","sources":["../../src/components/NcProgressBar/NcProgressBar.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\nThis is a simple progress bar component.\n## Usage:\n\n### Small\n```vue\n<NcProgressBar :value=\"60\" />\n```\n\n### Medium\n```vue\n<NcProgressBar :value=\"60\" size=\"medium\" />\n```\n\n### error\n```vue\n<NcProgressBar :value=\"60\" :error=\"true\" />\n```\n\n</docs>\n\n<template>\n\t<progress class=\"progress-bar vue\"\n\t\t:class=\"{ 'progress-bar--error': error }\"\n\t\t:style=\"{'--progress-bar-height': height }\"\n\t\t:value=\"value\"\n\t\tmax=\"100\" />\n</template>\n\n<script>\nexport default {\n\n\tname: 'NcProgressBar',\n\n\tprops: {\n\t\t/**\n\t\t * An integer between 1 and 100\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t\tvalidator(value) {\n\t\t\t\treturn value >= 0\n\t\t\t\t\t&& value <= 100\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * Determines the height of the progressbar.\n\t\t * Possible values:\n\t\t * - 'small' (default)\n\t\t * - 'medium'\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'small',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['small', 'medium'].indexOf(value) !== -1\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * Applies an error color to the progressbar if true.\n\t\t */\n\t\terror: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tcomputed: {\n\t\theight() {\n\t\t\tif (this.size === 'small') {\n\t\t\t\treturn '4px'\n\t\t\t}\n\t\t\treturn '6px'\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n\n.progress-bar {\n\tdisplay: block;\n\theight: var(--progress-bar-height);\n\twidth: 100%;\n\toverflow: hidden;\n\tborder: 0;\n\tpadding: 0;\n\tbackground: var(--color-background-dark);\n\tborder-radius: calc(var(--progress-bar-height) / 2);\n\n\t// Browser specific rules\n\t&::-webkit-progress-bar {\n\t\theight: var(--progress-bar-height);\n\t\tbackground-color: transparent;\n\t}\n\t&::-webkit-progress-value {\n\t\tbackground: var(--gradient-primary-background);\n\t\tborder-radius: calc(var(--progress-bar-height) / 2);\n\t}\n\t&::-moz-progress-bar {\n\t\tbackground: var(--gradient-primary-background);\n\t\tborder-radius: calc(var(--progress-bar-height) / 2);\n\t}\n\t&--error {\n\t\t// Override previous values\n\t\t&::-moz-progress-bar {\n\t\t\tbackground: var(--color-error) !important;\n\t\t}\n\t\t&::-webkit-progress-value {\n\t\t\tbackground: var(--color-error) !important;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","value"],"mappings":";;AAmDA,MAAAA,IAAA;AAAA,EAEA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAAC,GAAA;AACA,eAAAA,KAAA,KACAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAAA,GAAA;AACA,eAAA,CAAA,SAAA,QAAA,EAAA,QAAAA,CAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA,IACA,SAAA;AACA,aAAA,KAAA,SAAA,UACA,QAEA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,59 @@
1
- import "../assets/index54.css";
2
- import { n as s } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
3
- const t = { name: "NcProgressBar", props: { value: { type: Number, default: 0, validator(r) {
4
- return r >= 0 && r <= 100;
5
- } }, size: { type: String, default: "small", validator(r) {
6
- return ["small", "medium"].indexOf(r) !== -1;
7
- } }, error: { type: Boolean, default: !1 } }, computed: { height() {
8
- return this.size === "small" ? "4px" : "6px";
9
- } } };
10
- var a = function() {
11
- var r = this, e = r._self._c;
12
- return e("progress", { staticClass: "progress-bar vue", class: { "progress-bar--error": r.error }, style: { "--progress-bar-height": r.height }, attrs: { max: "100" }, domProps: { value: r.value } });
13
- }, l = [], o = s(t, a, l, !1, null, "b171a315", null, null);
14
- const n = o.exports;
1
+ import "../assets/index-61b63a8f.css";
2
+ import { n as a } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
3
+ const t = {
4
+ name: "NcProgressBar",
5
+ props: {
6
+ /**
7
+ * An integer between 1 and 100
8
+ */
9
+ value: {
10
+ type: Number,
11
+ default: 0,
12
+ validator(r) {
13
+ return r >= 0 && r <= 100;
14
+ }
15
+ },
16
+ /**
17
+ * Determines the height of the progressbar.
18
+ * Possible values:
19
+ * - 'small' (default)
20
+ * - 'medium'
21
+ */
22
+ size: {
23
+ type: String,
24
+ default: "small",
25
+ validator(r) {
26
+ return ["small", "medium"].indexOf(r) !== -1;
27
+ }
28
+ },
29
+ /**
30
+ * Applies an error color to the progressbar if true.
31
+ */
32
+ error: {
33
+ type: Boolean,
34
+ default: !1
35
+ }
36
+ },
37
+ computed: {
38
+ height() {
39
+ return this.size === "small" ? "4px" : "6px";
40
+ }
41
+ }
42
+ };
43
+ var o = function() {
44
+ var e = this, s = e._self._c;
45
+ return s("progress", { staticClass: "progress-bar vue", class: { "progress-bar--error": e.error }, style: { "--progress-bar-height": e.height }, attrs: { max: "100" }, domProps: { value: e.value } });
46
+ }, l = [], n = /* @__PURE__ */ a(
47
+ t,
48
+ o,
49
+ l,
50
+ !1,
51
+ null,
52
+ "b171a315",
53
+ null,
54
+ null
55
+ );
56
+ const p = n.exports;
15
57
  export {
16
- n as default
58
+ p as default
17
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcProgressBar.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcProgressBar.mjs","sources":["../../src/components/NcProgressBar/NcProgressBar.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<docs>\nThis is a simple progress bar component.\n## Usage:\n\n### Small\n```vue\n<NcProgressBar :value=\"60\" />\n```\n\n### Medium\n```vue\n<NcProgressBar :value=\"60\" size=\"medium\" />\n```\n\n### error\n```vue\n<NcProgressBar :value=\"60\" :error=\"true\" />\n```\n\n</docs>\n\n<template>\n\t<progress class=\"progress-bar vue\"\n\t\t:class=\"{ 'progress-bar--error': error }\"\n\t\t:style=\"{'--progress-bar-height': height }\"\n\t\t:value=\"value\"\n\t\tmax=\"100\" />\n</template>\n\n<script>\nexport default {\n\n\tname: 'NcProgressBar',\n\n\tprops: {\n\t\t/**\n\t\t * An integer between 1 and 100\n\t\t */\n\t\tvalue: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t\tvalidator(value) {\n\t\t\t\treturn value >= 0\n\t\t\t\t\t&& value <= 100\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * Determines the height of the progressbar.\n\t\t * Possible values:\n\t\t * - 'small' (default)\n\t\t * - 'medium'\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'small',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['small', 'medium'].indexOf(value) !== -1\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * Applies an error color to the progressbar if true.\n\t\t */\n\t\terror: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tcomputed: {\n\t\theight() {\n\t\t\tif (this.size === 'small') {\n\t\t\t\treturn '4px'\n\t\t\t}\n\t\t\treturn '6px'\n\t\t},\n\t},\n}\n\n</script>\n\n<style lang=\"scss\" scoped>\n\n.progress-bar {\n\tdisplay: block;\n\theight: var(--progress-bar-height);\n\twidth: 100%;\n\toverflow: hidden;\n\tborder: 0;\n\tpadding: 0;\n\tbackground: var(--color-background-dark);\n\tborder-radius: calc(var(--progress-bar-height) / 2);\n\n\t// Browser specific rules\n\t&::-webkit-progress-bar {\n\t\theight: var(--progress-bar-height);\n\t\tbackground-color: transparent;\n\t}\n\t&::-webkit-progress-value {\n\t\tbackground: var(--gradient-primary-background);\n\t\tborder-radius: calc(var(--progress-bar-height) / 2);\n\t}\n\t&::-moz-progress-bar {\n\t\tbackground: var(--gradient-primary-background);\n\t\tborder-radius: calc(var(--progress-bar-height) / 2);\n\t}\n\t&--error {\n\t\t// Override previous values\n\t\t&::-moz-progress-bar {\n\t\t\tbackground: var(--color-error) !important;\n\t\t}\n\t\t&::-webkit-progress-value {\n\t\t\tbackground: var(--color-error) !important;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","value"],"mappings":";;AAmDA,MAAAA,IAAA;AAAA,EAEA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAAC,GAAA;AACA,eAAAA,KAAA,KACAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAAA,GAAA;AACA,eAAA,CAAA,SAAA,QAAA,EAAA,QAAAA,CAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA,IACA,SAAA;AACA,aAAA,KAAA,SAAA,UACA,QAEA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}