@nextcloud/vue 8.0.0-beta.9 → 8.0.1

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 (292) hide show
  1. package/CHANGELOG.md +52 -2
  2. package/dist/Components/NcActionButton.cjs +23 -12
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +21 -9
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionInput.cjs +1 -1
  7. package/dist/Components/NcActionInput.mjs +1 -1
  8. package/dist/Components/NcActionLink.cjs +1 -1
  9. package/dist/Components/NcActionLink.mjs +1 -1
  10. package/dist/Components/NcActionRouter.cjs +1 -1
  11. package/dist/Components/NcActionRouter.mjs +1 -1
  12. package/dist/Components/NcActionText.cjs +1 -1
  13. package/dist/Components/NcActionText.mjs +1 -1
  14. package/dist/Components/NcActionTextEditable.cjs +10 -10
  15. package/dist/Components/NcActionTextEditable.cjs.map +1 -1
  16. package/dist/Components/NcActionTextEditable.mjs +1 -1
  17. package/dist/Components/NcActions.cjs +55 -52
  18. package/dist/Components/NcActions.cjs.map +1 -1
  19. package/dist/Components/NcActions.mjs +44 -41
  20. package/dist/Components/NcActions.mjs.map +1 -1
  21. package/dist/Components/NcAppContent.cjs +19 -20
  22. package/dist/Components/NcAppContent.cjs.map +1 -1
  23. package/dist/Components/NcAppContent.mjs +8 -8
  24. package/dist/Components/NcAppContent.mjs.map +1 -1
  25. package/dist/Components/NcAppNavigation.cjs +58 -27
  26. package/dist/Components/NcAppNavigation.cjs.map +1 -1
  27. package/dist/Components/NcAppNavigation.mjs +67 -34
  28. package/dist/Components/NcAppNavigation.mjs.map +1 -1
  29. package/dist/Components/NcAppNavigationItem.cjs +166 -62
  30. package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
  31. package/dist/Components/NcAppNavigationItem.mjs +145 -43
  32. package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
  33. package/dist/Components/NcAppNavigationNew.cjs +6 -6
  34. package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
  35. package/dist/Components/NcAppNavigationNew.mjs +17 -17
  36. package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
  37. package/dist/Components/NcAppNavigationNewItem.cjs +7 -7
  38. package/dist/Components/NcAppNavigationNewItem.cjs.map +1 -1
  39. package/dist/Components/NcAppNavigationNewItem.mjs +5 -5
  40. package/dist/Components/NcAppNavigationNewItem.mjs.map +1 -1
  41. package/dist/Components/NcAppNavigationSettings.cjs +46 -14
  42. package/dist/Components/NcAppNavigationSettings.cjs.map +1 -1
  43. package/dist/Components/NcAppNavigationSettings.mjs +48 -16
  44. package/dist/Components/NcAppNavigationSettings.mjs.map +1 -1
  45. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  46. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  47. package/dist/Components/NcAppSettingsDialog.cjs +75 -54
  48. package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
  49. package/dist/Components/NcAppSettingsDialog.mjs +79 -57
  50. package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
  51. package/dist/Components/NcAppSettingsSection.cjs +29 -10
  52. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  53. package/dist/Components/NcAppSettingsSection.mjs +29 -10
  54. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  55. package/dist/Components/NcAppSidebar.cjs +99 -33
  56. package/dist/Components/NcAppSidebar.cjs.map +1 -1
  57. package/dist/Components/NcAppSidebar.mjs +156 -92
  58. package/dist/Components/NcAppSidebar.mjs.map +1 -1
  59. package/dist/Components/NcAppSidebarTab.cjs +7 -7
  60. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  61. package/dist/Components/NcAppSidebarTab.mjs +6 -6
  62. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  63. package/dist/Components/NcAvatar.cjs +1 -1
  64. package/dist/Components/NcAvatar.mjs +1 -1
  65. package/dist/Components/NcBreadcrumb.cjs +10 -10
  66. package/dist/Components/NcBreadcrumb.cjs.map +1 -1
  67. package/dist/Components/NcBreadcrumb.mjs +1 -1
  68. package/dist/Components/NcBreadcrumbs.cjs +85 -53
  69. package/dist/Components/NcBreadcrumbs.cjs.map +1 -1
  70. package/dist/Components/NcBreadcrumbs.mjs +91 -60
  71. package/dist/Components/NcBreadcrumbs.mjs.map +1 -1
  72. package/dist/Components/NcButton.cjs +25 -25
  73. package/dist/Components/NcButton.cjs.map +1 -1
  74. package/dist/Components/NcButton.mjs +25 -25
  75. package/dist/Components/NcButton.mjs.map +1 -1
  76. package/dist/Components/NcCheckboxRadioSwitch.cjs +305 -67
  77. package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
  78. package/dist/Components/NcCheckboxRadioSwitch.mjs +307 -75
  79. package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
  80. package/dist/Components/NcColorPicker.cjs +18 -18
  81. package/dist/Components/NcColorPicker.cjs.map +1 -1
  82. package/dist/Components/NcColorPicker.mjs +17 -17
  83. package/dist/Components/NcColorPicker.mjs.map +1 -1
  84. package/dist/Components/NcCounterBubble.cjs +6 -6
  85. package/dist/Components/NcCounterBubble.cjs.map +1 -1
  86. package/dist/Components/NcCounterBubble.mjs +2 -2
  87. package/dist/Components/NcCounterBubble.mjs.map +1 -1
  88. package/dist/Components/NcDashboardWidget.cjs +30 -30
  89. package/dist/Components/NcDashboardWidget.cjs.map +1 -1
  90. package/dist/Components/NcDashboardWidget.mjs +3 -3
  91. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  92. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  93. package/dist/Components/NcDateTime.cjs +1 -1
  94. package/dist/Components/NcDateTime.mjs +1 -1
  95. package/dist/Components/NcDateTimePicker.cjs +109 -44
  96. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  97. package/dist/Components/NcDateTimePicker.mjs +115 -52
  98. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  99. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  100. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  101. package/dist/Components/NcDialogButton.cjs +11 -11
  102. package/dist/Components/NcDialogButton.cjs.map +1 -1
  103. package/dist/Components/NcDialogButton.mjs +14 -14
  104. package/dist/Components/NcDialogButton.mjs.map +1 -1
  105. package/dist/Components/NcEmojiPicker.cjs +1 -1
  106. package/dist/Components/NcEmojiPicker.mjs +1 -1
  107. package/dist/Components/NcEmptyContent.cjs +14 -14
  108. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  109. package/dist/Components/NcEmptyContent.mjs +7 -7
  110. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  111. package/dist/Components/NcInputField.cjs +16 -16
  112. package/dist/Components/NcInputField.cjs.map +1 -1
  113. package/dist/Components/NcInputField.mjs +5 -5
  114. package/dist/Components/NcInputField.mjs.map +1 -1
  115. package/dist/Components/NcListItem.cjs +3 -3
  116. package/dist/Components/NcListItem.cjs.map +1 -1
  117. package/dist/Components/NcListItem.mjs +3 -3
  118. package/dist/Components/NcListItem.mjs.map +1 -1
  119. package/dist/Components/NcListItemIcon.cjs +1 -1
  120. package/dist/Components/NcListItemIcon.mjs +1 -1
  121. package/dist/Components/NcModal.cjs +165 -68
  122. package/dist/Components/NcModal.cjs.map +1 -1
  123. package/dist/Components/NcModal.mjs +129 -35
  124. package/dist/Components/NcModal.mjs.map +1 -1
  125. package/dist/Components/NcNoteCard.cjs +146 -18
  126. package/dist/Components/NcNoteCard.cjs.map +1 -1
  127. package/dist/Components/NcNoteCard.mjs +146 -21
  128. package/dist/Components/NcNoteCard.mjs.map +1 -1
  129. package/dist/Components/NcPasswordField.cjs +84 -20
  130. package/dist/Components/NcPasswordField.cjs.map +1 -1
  131. package/dist/Components/NcPasswordField.mjs +104 -42
  132. package/dist/Components/NcPasswordField.mjs.map +1 -1
  133. package/dist/Components/NcRelatedResourcesPanel.cjs +48 -31
  134. package/dist/Components/NcRelatedResourcesPanel.cjs.map +1 -1
  135. package/dist/Components/NcRelatedResourcesPanel.mjs +31 -14
  136. package/dist/Components/NcRelatedResourcesPanel.mjs.map +1 -1
  137. package/dist/Components/NcRichContenteditable.cjs +22 -18
  138. package/dist/Components/NcRichContenteditable.cjs.map +1 -1
  139. package/dist/Components/NcRichContenteditable.mjs +32 -28
  140. package/dist/Components/NcRichContenteditable.mjs.map +1 -1
  141. package/dist/Components/NcRichText.cjs +1 -1
  142. package/dist/Components/NcRichText.mjs +3 -3
  143. package/dist/Components/NcSelect.cjs +80 -57
  144. package/dist/Components/NcSelect.cjs.map +1 -1
  145. package/dist/Components/NcSelect.mjs +75 -50
  146. package/dist/Components/NcSelect.mjs.map +1 -1
  147. package/dist/Components/NcSelectTags.cjs +2 -2
  148. package/dist/Components/NcSelectTags.cjs.map +1 -1
  149. package/dist/Components/NcSelectTags.mjs +4 -4
  150. package/dist/Components/NcSelectTags.mjs.map +1 -1
  151. package/dist/Components/NcSettingsInputText.cjs +1 -1
  152. package/dist/Components/NcSettingsInputText.mjs +1 -1
  153. package/dist/Components/NcSettingsSection.cjs +46 -14
  154. package/dist/Components/NcSettingsSection.cjs.map +1 -1
  155. package/dist/Components/NcSettingsSection.mjs +44 -12
  156. package/dist/Components/NcSettingsSection.mjs.map +1 -1
  157. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  158. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  159. package/dist/Components/NcTextArea.cjs +14 -14
  160. package/dist/Components/NcTextArea.cjs.map +1 -1
  161. package/dist/Components/NcTextArea.mjs +6 -6
  162. package/dist/Components/NcTextArea.mjs.map +1 -1
  163. package/dist/Components/NcTextField.cjs +51 -19
  164. package/dist/Components/NcTextField.cjs.map +1 -1
  165. package/dist/Components/NcTextField.mjs +59 -28
  166. package/dist/Components/NcTextField.mjs.map +1 -1
  167. package/dist/Components/NcTimezonePicker.cjs +32 -24
  168. package/dist/Components/NcTimezonePicker.cjs.map +1 -1
  169. package/dist/Components/NcTimezonePicker.mjs +36 -27
  170. package/dist/Components/NcTimezonePicker.mjs.map +1 -1
  171. package/dist/Components/NcUserBubble.cjs +24 -20
  172. package/dist/Components/NcUserBubble.cjs.map +1 -1
  173. package/dist/Components/NcUserBubble.mjs +25 -20
  174. package/dist/Components/NcUserBubble.mjs.map +1 -1
  175. package/dist/assets/{NcAppNavigationToggle-2cc5b864.css → NcAppNavigationToggle-9e170630.css} +3 -2
  176. package/dist/assets/{NcInputConfirmCancel-2ba60a52.css → NcInputConfirmCancel-45d1d76b.css} +7 -7
  177. package/dist/assets/{index-af72a30b.css → index-05760fea.css} +5 -1
  178. package/dist/assets/{index-30e099f7.css → index-0ac09203.css} +3 -3
  179. package/dist/assets/{index-eea65531.css → index-0e9b11c7.css} +20 -16
  180. package/dist/assets/{index-7813bab3.css → index-17673ea1.css} +7 -9
  181. package/dist/assets/{index-1151d229.css → index-1f25a3c0.css} +3 -3
  182. package/dist/assets/{index-9dcf6260.css → index-2e5e3b55.css} +30 -30
  183. package/dist/assets/{index-ed4adf1d.css → index-4271da53.css} +18 -17
  184. package/dist/assets/{index-abb90c97.css → index-4e03d941.css} +48 -48
  185. package/dist/assets/{index-4b75fe20.css → index-55600948.css} +11 -11
  186. package/dist/assets/{index-236620b0.css → index-6899d75b.css} +29 -29
  187. package/dist/assets/{index-5ee8a575.css → index-73ded07b.css} +63 -63
  188. package/dist/assets/{index-1beccc92.css → index-750c02cc.css} +28 -10
  189. package/dist/assets/{index-9e9587e1.css → index-77a548be.css} +4 -4
  190. package/dist/assets/{index-c5ae3bc4.css → index-7d211db9.css} +11 -11
  191. package/dist/assets/{index-8304db49.css → index-802d2118.css} +5 -1
  192. package/dist/assets/{index-a2d55f92.css → index-9176105d.css} +41 -41
  193. package/dist/assets/index-93bc89ef.css +197 -0
  194. package/dist/assets/{index-50b0766d.css → index-a0532427.css} +55 -70
  195. package/dist/assets/{index-e828b286.css → index-ab715d82.css} +4 -4
  196. package/dist/assets/{index-9e44e336.css → index-c221fe05.css} +9 -9
  197. package/dist/assets/{index-c6f0da2e.css → index-c239a2fc.css} +14 -8
  198. package/dist/assets/{index-73867d38.css → index-d3702c91.css} +5 -1
  199. package/dist/assets/{index-4a775ba1.css → index-d812ed9e.css} +43 -43
  200. package/dist/assets/{index-793eae6b.css → index-d9ae9479.css} +6 -6
  201. package/dist/assets/{index-f85aa003.css → index-db5a8b1c.css} +22 -10
  202. package/dist/assets/{index-574438d6.css → index-dea0aef3.css} +10 -10
  203. package/dist/assets/{index-0adc989c.css → index-ebbb7829.css} +9 -13
  204. package/dist/assets/{index-c06ad941.css → index-fbc0b606.css} +58 -42
  205. package/dist/chunks/AlertCircleOutline-7085c10f.cjs +35 -0
  206. package/dist/chunks/AlertCircleOutline-7085c10f.cjs.map +1 -0
  207. package/dist/chunks/AlertCircleOutline-b73838e0.mjs +37 -0
  208. package/dist/chunks/AlertCircleOutline-b73838e0.mjs.map +1 -0
  209. package/dist/chunks/ArrowLeft-2f9b9323.cjs +35 -0
  210. package/dist/chunks/ArrowLeft-2f9b9323.cjs.map +1 -0
  211. package/dist/chunks/ArrowLeft-3779ba88.mjs +37 -0
  212. package/dist/chunks/ArrowLeft-3779ba88.mjs.map +1 -0
  213. package/dist/chunks/ArrowRight-7315f6c1.cjs +35 -0
  214. package/dist/chunks/ArrowRight-7315f6c1.cjs.map +1 -0
  215. package/dist/chunks/ArrowRight-74a9fcb2.mjs +37 -0
  216. package/dist/chunks/ArrowRight-74a9fcb2.mjs.map +1 -0
  217. package/dist/chunks/Check-2ea0a88a.mjs +37 -0
  218. package/dist/chunks/Check-2ea0a88a.mjs.map +1 -0
  219. package/dist/chunks/Check-be8cd6af.cjs +35 -0
  220. package/dist/chunks/Check-be8cd6af.cjs.map +1 -0
  221. package/dist/chunks/ChevronDown-a72d365d.mjs +37 -0
  222. package/dist/chunks/ChevronDown-a72d365d.mjs.map +1 -0
  223. package/dist/chunks/ChevronDown-dc32e51d.cjs +35 -0
  224. package/dist/chunks/ChevronDown-dc32e51d.cjs.map +1 -0
  225. package/dist/chunks/ChevronRight-1a6a6cf2.mjs +37 -0
  226. package/dist/chunks/ChevronRight-1a6a6cf2.mjs.map +1 -0
  227. package/dist/chunks/ChevronRight-a4c1e0d3.cjs +35 -0
  228. package/dist/chunks/ChevronRight-a4c1e0d3.cjs.map +1 -0
  229. package/dist/chunks/Close-271f72e2.mjs +37 -0
  230. package/dist/chunks/Close-271f72e2.mjs.map +1 -0
  231. package/dist/chunks/Close-98cb6f12.cjs +35 -0
  232. package/dist/chunks/Close-98cb6f12.cjs.map +1 -0
  233. package/dist/chunks/DotsHorizontal-0ee7d901.mjs +37 -0
  234. package/dist/chunks/DotsHorizontal-0ee7d901.mjs.map +1 -0
  235. package/dist/chunks/DotsHorizontal-ac96129a.cjs +35 -0
  236. package/dist/chunks/DotsHorizontal-ac96129a.cjs.map +1 -0
  237. package/dist/chunks/NcAppNavigationToggle-60664a28.cjs +113 -0
  238. package/dist/chunks/NcAppNavigationToggle-60664a28.cjs.map +1 -0
  239. package/dist/chunks/NcAppNavigationToggle-82764816.mjs +118 -0
  240. package/dist/chunks/NcAppNavigationToggle-82764816.mjs.map +1 -0
  241. package/dist/chunks/NcInputConfirmCancel-262d455f.cjs +90 -0
  242. package/dist/chunks/{NcInputConfirmCancel-44052477.mjs.map → NcInputConfirmCancel-262d455f.cjs.map} +1 -1
  243. package/dist/chunks/{NcInputConfirmCancel-44052477.mjs → NcInputConfirmCancel-906c7816.mjs} +11 -11
  244. package/dist/chunks/{NcInputConfirmCancel-6bea0fdc.cjs.map → NcInputConfirmCancel-906c7816.mjs.map} +1 -1
  245. package/dist/chunks/{NcRichText-8fda53c8.mjs → NcRichText-1e8fd02d.mjs} +1 -1
  246. package/dist/chunks/{NcRichText-8fda53c8.mjs.map → NcRichText-1e8fd02d.mjs.map} +1 -1
  247. package/dist/chunks/{NcRichText-332fe454.cjs → NcRichText-ae95c854.cjs} +1 -1
  248. package/dist/chunks/{NcRichText-332fe454.cjs.map → NcRichText-ae95c854.cjs.map} +1 -1
  249. package/dist/chunks/{NcSettingsSelectGroup-fdd3309c.mjs → NcSettingsSelectGroup-ae323579.mjs} +2 -2
  250. package/dist/chunks/{NcSettingsSelectGroup-fdd3309c.mjs.map → NcSettingsSelectGroup-ae323579.mjs.map} +1 -1
  251. package/dist/chunks/{NcSettingsSelectGroup-a5ff8c36.cjs → NcSettingsSelectGroup-e8f9f9fe.cjs} +1 -1
  252. package/dist/chunks/{NcSettingsSelectGroup-a5ff8c36.cjs.map → NcSettingsSelectGroup-e8f9f9fe.cjs.map} +1 -1
  253. package/dist/chunks/{ScopeComponent-9519afcc.mjs → ScopeComponent-1ab1ebb9.mjs} +1 -1
  254. package/dist/chunks/{ScopeComponent-9519afcc.mjs.map → ScopeComponent-1ab1ebb9.mjs.map} +1 -1
  255. package/dist/chunks/{ScopeComponent-e060526a.cjs → ScopeComponent-50287dad.cjs} +1 -1
  256. package/dist/chunks/{ScopeComponent-e060526a.cjs.map → ScopeComponent-50287dad.cjs.map} +1 -1
  257. package/dist/chunks/{index-032137a6.cjs → index-e06b96d3.cjs} +56 -47
  258. package/dist/chunks/index-e06b96d3.cjs.map +1 -0
  259. package/dist/chunks/{index-fb2ee22c.mjs → index-fbf943b3.mjs} +93 -84
  260. package/dist/chunks/index-fbf943b3.mjs.map +1 -0
  261. package/dist/chunks/{l10n-9aa6482d.mjs → l10n-9fc9974f.mjs} +1 -1
  262. package/dist/chunks/{l10n-9aa6482d.mjs.map → l10n-9fc9974f.mjs.map} +1 -1
  263. package/dist/chunks/{l10n-c7bd0ea6.cjs → l10n-ec2d3010.cjs} +1 -1
  264. package/dist/chunks/{l10n-c7bd0ea6.cjs.map → l10n-ec2d3010.cjs.map} +1 -1
  265. package/dist/chunks/l10n-f491109d.cjs +29 -0
  266. package/dist/chunks/l10n-f491109d.cjs.map +1 -0
  267. package/dist/chunks/l10n-f692947e.mjs +31 -0
  268. package/dist/chunks/l10n-f692947e.mjs.map +1 -0
  269. package/dist/chunks/{referencePickerModal-443a4c57.mjs → referencePickerModal-6bc8f6b9.mjs} +156 -124
  270. package/dist/chunks/referencePickerModal-6bc8f6b9.mjs.map +1 -0
  271. package/dist/chunks/{referencePickerModal-279a483d.cjs → referencePickerModal-e033bf2c.cjs} +144 -111
  272. package/dist/chunks/referencePickerModal-e033bf2c.cjs.map +1 -0
  273. package/dist/index.cjs +4 -8
  274. package/dist/index.cjs.map +1 -1
  275. package/dist/index.mjs +26 -30
  276. package/dist/index.mjs.map +1 -1
  277. package/dist/vendor.LICENSE.txt +5 -1
  278. package/package.json +3 -3
  279. package/dist/assets/index-d646553d.css +0 -41
  280. package/dist/chunks/NcAppNavigationToggle-841d3015.cjs +0 -49
  281. package/dist/chunks/NcAppNavigationToggle-841d3015.cjs.map +0 -1
  282. package/dist/chunks/NcAppNavigationToggle-e358aa47.mjs +0 -55
  283. package/dist/chunks/NcAppNavigationToggle-e358aa47.mjs.map +0 -1
  284. package/dist/chunks/NcInputConfirmCancel-6bea0fdc.cjs +0 -90
  285. package/dist/chunks/index-032137a6.cjs.map +0 -1
  286. package/dist/chunks/index-fb2ee22c.mjs.map +0 -1
  287. package/dist/chunks/l10n-05a09c66.mjs +0 -31
  288. package/dist/chunks/l10n-05a09c66.mjs.map +0 -1
  289. package/dist/chunks/l10n-b1d264c7.cjs +0 -29
  290. package/dist/chunks/l10n-b1d264c7.cjs.map +0 -1
  291. package/dist/chunks/referencePickerModal-279a483d.cjs.map +0 -1
  292. package/dist/chunks/referencePickerModal-443a4c57.mjs.map +0 -1
@@ -1,31 +1,94 @@
1
- import "../assets/index-574438d6.css";
2
- import { t as r } from "../chunks/l10n-05a09c66.mjs";
3
- import s from "./NcTimezonePicker.mjs";
4
- import p from "./NcPopover.mjs";
5
- import { l as c } from "../chunks/l10n-9aa6482d.mjs";
6
- import m from "vue-material-design-icons/CalendarBlank.vue";
7
- import u from "vue-material-design-icons/Web.vue";
8
- import { getMonthNames as d, getMonthNamesShort as f, getDayNames as h, getDayNamesShort as y, getDayNamesMin as _, getFirstDay as k } from "@nextcloud/l10n";
9
- import v from "vue2-datepicker";
10
- import { n as g } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
11
- import { S as w } from "../chunks/ScopeComponent-9519afcc.mjs";
12
- const l = {
1
+ import "../assets/index-dea0aef3.css";
2
+ import { t as r } from "../chunks/l10n-f692947e.mjs";
3
+ import c from "./NcTimezonePicker.mjs";
4
+ import u from "./NcPopover.mjs";
5
+ import { l as p } from "../chunks/l10n-9fc9974f.mjs";
6
+ import { n as l } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
7
+ import { getMonthNames as m, getMonthNamesShort as d, getDayNames as f, getDayNamesShort as _, getDayNamesMin as h, getFirstDay as v } from "@nextcloud/l10n";
8
+ import y from "vue2-datepicker";
9
+ import { S as g } from "../chunks/ScopeComponent-1ab1ebb9.mjs";
10
+ const k = {
11
+ name: "CalendarBlankIcon",
12
+ emits: ["click"],
13
+ props: {
14
+ title: {
15
+ type: String
16
+ },
17
+ fillColor: {
18
+ type: String,
19
+ default: "currentColor"
20
+ },
21
+ size: {
22
+ type: Number,
23
+ default: 24
24
+ }
25
+ }
26
+ };
27
+ var C = function() {
28
+ var e = this, t = e._self._c;
29
+ return t("span", e._b({ staticClass: "material-design-icon calendar-blank-icon", attrs: { "aria-hidden": !e.title, "aria-label": e.title, role: "img" }, on: { click: function(a) {
30
+ return e.$emit("click", a);
31
+ } } }, "span", e.$attrs, !1), [t("svg", { staticClass: "material-design-icon__svg", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: "0 0 24 24" } }, [t("path", { attrs: { d: "M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1" } }, [e.title ? t("title", [e._v(e._s(e.title))]) : e._e()])])]);
32
+ }, w = [], z = /* @__PURE__ */ l(
33
+ k,
34
+ C,
35
+ w,
36
+ !1,
37
+ null,
38
+ null,
39
+ null,
40
+ null
41
+ );
42
+ const M = z.exports, b = {
43
+ name: "WebIcon",
44
+ emits: ["click"],
45
+ props: {
46
+ title: {
47
+ type: String
48
+ },
49
+ fillColor: {
50
+ type: String,
51
+ default: "currentColor"
52
+ },
53
+ size: {
54
+ type: Number,
55
+ default: 24
56
+ }
57
+ }
58
+ };
59
+ var P = function() {
60
+ var e = this, t = e._self._c;
61
+ return t("span", e._b({ staticClass: "material-design-icon web-icon", attrs: { "aria-hidden": !e.title, "aria-label": e.title, role: "img" }, on: { click: function(a) {
62
+ return e.$emit("click", a);
63
+ } } }, "span", e.$attrs, !1), [t("svg", { staticClass: "material-design-icon__svg", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: "0 0 24 24" } }, [t("path", { attrs: { d: "M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" } }, [e.title ? t("title", [e._v(e._s(e.title))]) : e._e()])])]);
64
+ }, S = [], D = /* @__PURE__ */ l(
65
+ b,
66
+ P,
67
+ S,
68
+ !1,
69
+ null,
70
+ null,
71
+ null,
72
+ null
73
+ );
74
+ const T = D.exports;
75
+ const i = {
13
76
  date: "YYYY-MM-DD",
14
77
  datetime: "YYYY-MM-DD H:mm:ss",
15
78
  year: "YYYY",
16
79
  month: "YYYY-MM",
17
80
  time: "H:mm:ss",
18
81
  week: "w"
19
- }, z = {
82
+ }, $ = {
20
83
  name: "NcDateTimePicker",
21
84
  components: {
22
- CalendarBlank: m,
23
- DatePicker: v,
24
- NcPopover: p,
25
- NcTimezonePicker: s,
26
- Web: u
85
+ CalendarBlank: M,
86
+ DatePicker: y,
87
+ NcPopover: u,
88
+ NcTimezonePicker: c,
89
+ Web: T
27
90
  },
28
- mixins: [c],
91
+ mixins: [p],
29
92
  inheritAttrs: !1,
30
93
  props: {
31
94
  clearable: {
@@ -109,13 +172,13 @@ const l = {
109
172
  defaultLang() {
110
173
  return {
111
174
  formatLocale: {
112
- months: d(),
113
- monthsShort: f(),
114
- weekdays: h(),
115
- weekdaysShort: y(),
116
- weekdaysMin: _(),
175
+ months: m(),
176
+ monthsShort: d(),
177
+ weekdays: f(),
178
+ weekdaysShort: _(),
179
+ weekdaysMin: h(),
117
180
  // 0 = sunday, 1 = monday
118
- firstDayOfWeek: k()
181
+ firstDayOfWeek: v()
119
182
  },
120
183
  monthFormat: "MMM"
121
184
  };
@@ -135,29 +198,29 @@ const l = {
135
198
  * @return {string}
136
199
  */
137
200
  formatTypeMap() {
138
- var a;
139
- return (a = l[this.type]) != null ? a : l.date;
201
+ var n;
202
+ return (n = i[this.type]) != null ? n : i.date;
140
203
  }
141
204
  },
142
205
  methods: {
143
- handleSelectYear(a) {
206
+ handleSelectYear(n) {
144
207
  const e = this.$refs.datepicker.currentValue;
145
208
  if (e)
146
209
  try {
147
- const t = new Date(new Date(e).setFullYear(a));
210
+ const t = new Date(new Date(e).setFullYear(n));
148
211
  this.$refs.datepicker.selectDate(t);
149
212
  } catch {
150
- console.error("Invalid value", e, a);
213
+ console.error("Invalid value", e, n);
151
214
  }
152
215
  },
153
- handleSelectMonth(a) {
216
+ handleSelectMonth(n) {
154
217
  const e = this.$refs.datepicker.currentValue;
155
218
  if (e)
156
219
  try {
157
- const t = new Date(new Date(e).setMonth(a));
220
+ const t = new Date(new Date(e).setMonth(n));
158
221
  this.$refs.datepicker.selectDate(t);
159
222
  } catch {
160
- console.error("Invalid value", e, a);
223
+ console.error("Invalid value", e, n);
161
224
  }
162
225
  },
163
226
  /**
@@ -168,39 +231,39 @@ const l = {
168
231
  }
169
232
  }
170
233
  };
171
- var P = function() {
234
+ var H = function() {
172
235
  var e = this, t = e._self._c;
173
- return t("DatePicker", e._g(e._b({ ref: "datepicker", attrs: { "append-to-body": e.appendToBody, clearable: e.clearable, format: e.format ? e.format : e.formatTypeMap, formatter: e.formatter, lang: e.lang ? e.lang : e.defaultLang, "minute-step": e.minuteStep, placeholder: e.placeholder ? e.placeholder : e.defaultPlaceholder, "popup-class": { "show-week-number": e.showWeekNumber }, "show-week-number": e.showWeekNumber, type: e.type, value: e.value }, on: { "select-year": e.handleSelectYear, "select-month": e.handleSelectMonth, "update:value": function(o) {
236
+ return t("DatePicker", e._g(e._b({ ref: "datepicker", attrs: { "append-to-body": e.appendToBody, clearable: e.clearable, format: e.format ? e.format : e.formatTypeMap, formatter: e.formatter, lang: e.lang ? e.lang : e.defaultLang, "minute-step": e.minuteStep, placeholder: e.placeholder ? e.placeholder : e.defaultPlaceholder, "popup-class": { "show-week-number": e.showWeekNumber }, "show-week-number": e.showWeekNumber, type: e.type, value: e.value }, on: { "select-year": e.handleSelectYear, "select-month": e.handleSelectMonth, "update:value": function(a) {
174
237
  return e.$emit("update:value", e.value);
175
238
  } }, scopedSlots: e._u([{ key: "icon-calendar", fn: function() {
176
- return [e.showTimezoneSelect ? t("NcPopover", { attrs: { shown: e.showTimezonePopover, "popover-base-class": "timezone-select__popper" }, on: { "update:shown": function(o) {
177
- e.showTimezonePopover = o;
239
+ return [e.showTimezoneSelect ? t("NcPopover", { attrs: { shown: e.showTimezonePopover, "popover-base-class": "timezone-select__popper" }, on: { "update:shown": function(a) {
240
+ e.showTimezonePopover = a;
178
241
  } }, scopedSlots: e._u([{ key: "trigger", fn: function() {
179
- return [t("button", { staticClass: "datetime-picker-inline-icon", class: { "datetime-picker-inline-icon--highlighted": e.highlightTimezone }, on: { mousedown: function(o) {
180
- return o.stopPropagation(), o.preventDefault(), (() => {
242
+ return [t("button", { staticClass: "datetime-picker-inline-icon", class: { "datetime-picker-inline-icon--highlighted": e.highlightTimezone }, on: { mousedown: function(a) {
243
+ return a.stopPropagation(), a.preventDefault(), (() => {
181
244
  }).apply(null, arguments);
182
245
  } } }, [t("Web", { attrs: { size: 20 } })], 1)];
183
- }, proxy: !0 }], null, !1, 3375037618) }, [t("div", { staticClass: "timezone-popover-wrapper__label" }, [t("strong", [e._v(" " + e._s(e.t("Please select a time zone:")) + " ")])]), t("NcTimezonePicker", { staticClass: "timezone-popover-wrapper__timezone-select", on: { input: function(o) {
246
+ }, proxy: !0 }], null, !1, 3375037618) }, [t("div", { staticClass: "timezone-popover-wrapper__label" }, [t("strong", [e._v(" " + e._s(e.t("Please select a time zone:")) + " ")])]), t("NcTimezonePicker", { staticClass: "timezone-popover-wrapper__timezone-select", on: { input: function(a) {
184
247
  return e.$emit("update:timezone-id", arguments[0]);
185
- } }, model: { value: e.tzVal, callback: function(o) {
186
- e.tzVal = o;
248
+ } }, model: { value: e.tzVal, callback: function(a) {
249
+ e.tzVal = a;
187
250
  }, expression: "tzVal" } })], 1) : t("CalendarBlank", { attrs: { size: 20 } })];
188
- }, proxy: !0 }, e._l(e.$scopedSlots, function(o, n) {
189
- return { key: n, fn: function(i) {
190
- return [e._t(n, null, null, i)];
251
+ }, proxy: !0 }, e._l(e.$scopedSlots, function(a, o) {
252
+ return { key: o, fn: function(s) {
253
+ return [e._t(o, null, null, s)];
191
254
  } };
192
255
  })], null, !0) }, "DatePicker", e.$attrs, !1), e.$listeners));
193
- }, D = [], S = /* @__PURE__ */ g(
194
- z,
195
- P,
196
- D,
256
+ }, N = [], Y = /* @__PURE__ */ l(
257
+ $,
258
+ H,
259
+ N,
197
260
  !1,
198
261
  null,
199
262
  "26676d3b",
200
263
  null,
201
264
  null
202
265
  );
203
- const T = S.exports;
266
+ const x = Y.exports;
204
267
  /**
205
268
  * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
206
269
  *
@@ -222,7 +285,7 @@ const T = S.exports;
222
285
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
223
286
  *
224
287
  */
225
- w(T);
288
+ g(x);
226
289
  export {
227
- T as default
290
+ x as default
228
291
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcDateTimePicker.mjs","sources":["../../src/components/NcDateTimePicker/NcDateTimePicker.vue","../../src/components/NcDateTimePicker/index.js"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.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\n<docs>\n> We're wrapping the awesome datepicker library here https://github.com/mengxiong10/vue2-datepicker\n> Please check there for all the available options.\n\n### Defaults\n- cleareable: false\n- minute-step: 10\n\n### Example\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\" />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: new Date('2022-10-10 10:10:10'),\n\t\t}\n\t},\n}\n</script>\n```\n\n### Example with confirm button\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\"\n\t\t\tconfirm />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttime: null,\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n### Range picker\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\trange\n\t\t\ttype=\"date\" />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: null,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Time zone aware date picker\n\nThe datepicker can optionally include a picker for the preferred time zone. The selected time does not factor in the\npicked time zone, but you will have to convert it yourself when necessary.\n\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\"\n\t\t\t:show-timezone-select=\"true\"\n\t\t\t:timezone-id.sync=\"tz\" /><br>\n\t\t{{ time }} | {{ tz }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: undefined,\n\t\t\ttz: 'Europe/Berlin',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<DatePicker ref=\"datepicker\"\n\t\t:append-to-body=\"appendToBody\"\n\t\t:clearable=\"clearable\"\n\t\t:format=\"format ? format : formatTypeMap\"\n\t\t:formatter=\"formatter\"\n\t\t:lang=\"lang ? lang : defaultLang\"\n\t\t:minute-step=\"minuteStep\"\n\t\t:placeholder=\"placeholder ? placeholder : defaultPlaceholder\"\n\t\t:popup-class=\"{ 'show-week-number': showWeekNumber }\"\n\t\t:show-week-number=\"showWeekNumber\"\n\t\t:type=\"type\"\n\t\t:value=\"value\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@select-year=\"handleSelectYear\"\n\t\t@select-month=\"handleSelectMonth\"\n\t\t@update:value=\"$emit('update:value', value)\">\n\t\t<template #icon-calendar>\n\t\t\t<NcPopover v-if=\"showTimezoneSelect\"\n\t\t\t\t:shown.sync=\"showTimezonePopover\"\n\t\t\t\tpopover-base-class=\"timezone-select__popper\">\n\t\t\t\t<template #trigger>\n\t\t\t\t\t<button class=\"datetime-picker-inline-icon\"\n\t\t\t\t\t\t:class=\"{'datetime-picker-inline-icon--highlighted': highlightTimezone}\"\n\t\t\t\t\t\t@mousedown.stop.prevent=\"() => {}\">\n\t\t\t\t\t\t<Web :size=\"20\" />\n\t\t\t\t\t</button>\n\t\t\t\t</template>\n\n\t\t\t\t<div class=\"timezone-popover-wrapper__label\">\n\t\t\t\t\t<strong>\n\t\t\t\t\t\t{{ t('Please select a time zone:') }}\n\t\t\t\t\t</strong>\n\t\t\t\t</div>\n\t\t\t\t<NcTimezonePicker v-model=\"tzVal\"\n\t\t\t\t\tclass=\"timezone-popover-wrapper__timezone-select\"\n\t\t\t\t\t@input=\"$emit('update:timezone-id', arguments[0])\" />\n\t\t\t</NcPopover>\n\t\t\t<CalendarBlank v-else :size=\"20\" />\n\t\t</template>\n\t\t<template v-for=\"(_, slot) of $scopedSlots\" #[slot]=\"scope\">\n\t\t\t<slot :name=\"slot\" v-bind=\"scope\" />\n\t\t</template>\n\t</DatePicker>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\n\nimport NcTimezonePicker from '../NcTimezonePicker/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport l10n from '../../mixins/l10n.js'\n\nimport CalendarBlank from 'vue-material-design-icons/CalendarBlank.vue'\nimport Web from 'vue-material-design-icons/Web.vue'\n\nimport {\n\tgetFirstDay,\n\tgetDayNames,\n\tgetDayNamesShort,\n\tgetDayNamesMin,\n\tgetMonthNames,\n\tgetMonthNamesShort,\n} from '@nextcloud/l10n'\n\nimport DatePicker from 'vue2-datepicker'\n\nconst formatMap = {\n\tdate: 'YYYY-MM-DD',\n\tdatetime: 'YYYY-MM-DD H:mm:ss',\n\tyear: 'YYYY',\n\tmonth: 'YYYY-MM',\n\ttime: 'H:mm:ss',\n\tweek: 'w',\n}\n\nexport default {\n\tname: 'NcDateTimePicker',\n\n\tcomponents: {\n\t\tCalendarBlank,\n\t\tDatePicker,\n\t\tNcPopover,\n\t\tNcTimezonePicker,\n\t\tWeb,\n\t},\n\n\tmixins: [l10n],\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tclearable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tminuteStep: {\n\t\t\ttype: Number,\n\t\t\tdefault: 10,\n\t\t},\n\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t},\n\n\t\tformat: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tformatter: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tlang: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value to initialize, but also two-way bind the selected date. The date is – like the `Date` object in\n\t\t * JavaScript – tied to UTC. The selected time zone does not have an influence of the selected time and date\n\t\t * value. You have to translate the time yourself when you want to factor in time zones.\n\t\t */\n\t\t// eslint-disable-next-line\n\t\tvalue: {\n\t\t\tdefault: () => new Date(),\n\t\t},\n\n\t\t/**\n\t\t * The preselected IANA time zone ID for the time zone picker, only relevant in combination with `:show-timezone-select=\"true\"`. Example: `Europe/Berlin`. The prop supports two-way binding through the .sync modifier.\n\t\t */\n\t\ttimezoneId: {\n\t\t\ttype: String,\n\t\t\tdefault: 'UTC',\n\t\t},\n\n\t\tshowTimezoneSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\thighlightTimezone: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tappendToBody: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tshowWeekNumber: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'update:timezone-id',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tshowTimezonePopover: false,\n\t\t\ttzVal: this.timezoneId,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Datepicker language\n\t\t * https://github.com/mengxiong10/vue2-datepicker/blob/master/locale.md\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tdefaultLang() {\n\t\t\treturn {\n\t\t\t\tformatLocale: {\n\t\t\t\t\tmonths: getMonthNames(),\n\t\t\t\t\tmonthsShort: getMonthNamesShort(),\n\t\t\t\t\tweekdays: getDayNames(),\n\t\t\t\t\tweekdaysShort: getDayNamesShort(),\n\t\t\t\t\tweekdaysMin: getDayNamesMin(),\n\t\t\t\t\t// 0 = sunday, 1 = monday\n\t\t\t\t\tfirstDayOfWeek: getFirstDay(),\n\t\t\t\t},\n\t\t\t\tmonthFormat: 'MMM',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Translated placeholder\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tdefaultPlaceholder() {\n\t\t\tif (this.type === 'time') {\n\t\t\t\treturn t('Pick a time')\n\t\t\t}\n\t\t\tif (this.type === 'month') {\n\t\t\t\treturn t('Pick a month')\n\t\t\t}\n\t\t\tif (this.type === 'year') {\n\t\t\t\treturn t('Pick a year')\n\t\t\t}\n\t\t\tif (this.type === 'week') {\n\t\t\t\treturn t('Pick a week')\n\t\t\t}\n\t\t\tif (this.type === 'date') {\n\t\t\t\treturn t('Pick a date')\n\t\t\t}\n\t\t\treturn t('Pick a date and a time')\n\t\t},\n\n\t\t/**\n\t\t * If format is not provided, try to match the type\n\t\t * or fallback to 'date'\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tformatTypeMap() {\n\t\t\treturn formatMap[this.type] ?? formatMap.date\n\t\t},\n\t},\n\n\tmethods: {\n\t\thandleSelectYear(year) {\n\t\t\tconst value = this.$refs.datepicker.currentValue\n\t\t\tif (value) {\n\t\t\t\ttry {\n\t\t\t\t\tconst date = new Date(new Date(value).setFullYear(year))\n\t\t\t\t\tthis.$refs.datepicker.selectDate(date)\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('Invalid value', value, year)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\thandleSelectMonth(month) {\n\t\t\tconst value = this.$refs.datepicker.currentValue\n\t\t\tif (value) {\n\t\t\t\ttry {\n\t\t\t\t\tconst date = new Date(new Date(value).setMonth(month))\n\t\t\t\t\tthis.$refs.datepicker.selectDate(date)\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('Invalid value', value, month)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Toggles the visibility of the time zone popover\n\t\t */\n\t\ttoggleTimezonePopover() {\n\t\t\tif (!this.showTimezoneSelect) {\n\t\t\t\t// Just a click on the icon, but not for time zones -> ignore\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.showTimezonePopover = !this.showTimezonePopover\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.mx-datepicker :deep(.mx-input-wrapper .mx-input) {\n\tbackground-clip: border-box;\n}\n\n.datetime-picker-inline-icon {\n\topacity: .3;\n\tborder: none;\n\tbackground-color: transparent;\n\tborder-radius: 0;\n\tpadding: 0 !important;\n\tmargin: 0;\n\n\t&--highlighted {\n\t\topacity: .7;\n\t}\n\n\t&:focus,\n\t&:hover {\n\t\topacity: 1;\n\t}\n}\n</style>\n\n<style lang=\"scss\">\n// We overwrite the popover base class, so we can style\n// the popover for the timezone select only.\n.v-popper--theme-dropdown.v-popper__popper.timezone-select__popper .v-popper__wrapper {\n\tborder-radius: var(--border-radius-large);\n\n\t.v-popper__inner {\n\t\tpadding: 4px;\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t.timezone-popover-wrapper {\n\t\t\t&__label {\n\t\t\t\tpadding: 4px 0;\n\t\t\t\tpadding-left: 14px; // Left-align with NcSelect text\n\t\t\t}\n\n\t\t\t// We overwrite the border radius of the input to account for the popover border-radius minus the padding\n\t\t\t&__timezone-select.v-select {\n\t\t\t\t.vs__dropdown-toggle {\n\t\t\t\t\tborder-radius: calc(var(--border-radius-large) - 4px);\n\t\t\t\t}\n\n\t\t\t\t&.vs--open {\n\t\t\t\t\t.vs__dropdown-toggle {\n\t\t\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t\t\t}\n\t\t\t\t\t&.select--drop-up .vs__dropdown-toggle {\n\t\t\t\t\t\tborder-radius: 0 0 calc(var(--border-radius-large) - 4px) calc(var(--border-radius-large) - 4px);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n// TODO: This should be scoped or targeted by a specific selector, but the NcSelect component does not allow this yet.\n.vs__dropdown-menu--floating {\n\t// Higher z-index than the popover in which the NcSelect is located.\n\tz-index: 100001;\n}\n</style>\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\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 */\nimport './index.scss'\nimport NcDateTimePicker from './NcDateTimePicker.vue'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nScopeComponent(NcDateTimePicker)\n\nexport default NcDateTimePicker\n"],"names":["formatMap","_sfc_main","CalendarBlank","DatePicker","NcPopover","NcTimezonePicker","Web","l10n","getMonthNames","getMonthNamesShort","getDayNames","getDayNamesShort","getDayNamesMin","getFirstDay","t","_a","year","value","date","month","ScopeComponent","NcDateTimePicker"],"mappings":"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"}
1
+ {"version":3,"file":"NcDateTimePicker.mjs","sources":["../../node_modules/vue-material-design-icons/CalendarBlank.vue","../../node_modules/vue-material-design-icons/Web.vue","../../src/components/NcDateTimePicker/NcDateTimePicker.vue","../../src/components/NcDateTimePicker/index.js"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon calendar-blank-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CalendarBlankIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon web-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"WebIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.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\n<docs>\n> We're wrapping the awesome datepicker library here https://github.com/mengxiong10/vue2-datepicker\n> Please check there for all the available options.\n\n### Defaults\n- cleareable: false\n- minute-step: 10\n\n### Example\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\" />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: new Date('2022-10-10 10:10:10'),\n\t\t}\n\t},\n}\n</script>\n```\n\n### Example with confirm button\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\"\n\t\t\tconfirm />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttime: null,\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n### Range picker\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\trange\n\t\t\ttype=\"date\" />\n\t\t{{ time }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: null,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Time zone aware date picker\n\nThe datepicker can optionally include a picker for the preferred time zone. The selected time does not factor in the\npicked time zone, but you will have to convert it yourself when necessary.\n\n```vue\n<template>\n\t<span>\n\t\t<NcDateTimePicker\n\t\t\tv-model=\"time\"\n\t\t\ttype=\"datetime\"\n\t\t\t:show-timezone-select=\"true\"\n\t\t\t:timezone-id.sync=\"tz\" /><br>\n\t\t{{ time }} | {{ tz }}\n\t</span>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttime: undefined,\n\t\t\ttz: 'Europe/Berlin',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<DatePicker ref=\"datepicker\"\n\t\t:append-to-body=\"appendToBody\"\n\t\t:clearable=\"clearable\"\n\t\t:format=\"format ? format : formatTypeMap\"\n\t\t:formatter=\"formatter\"\n\t\t:lang=\"lang ? lang : defaultLang\"\n\t\t:minute-step=\"minuteStep\"\n\t\t:placeholder=\"placeholder ? placeholder : defaultPlaceholder\"\n\t\t:popup-class=\"{ 'show-week-number': showWeekNumber }\"\n\t\t:show-week-number=\"showWeekNumber\"\n\t\t:type=\"type\"\n\t\t:value=\"value\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t\t@select-year=\"handleSelectYear\"\n\t\t@select-month=\"handleSelectMonth\"\n\t\t@update:value=\"$emit('update:value', value)\">\n\t\t<template #icon-calendar>\n\t\t\t<NcPopover v-if=\"showTimezoneSelect\"\n\t\t\t\t:shown.sync=\"showTimezonePopover\"\n\t\t\t\tpopover-base-class=\"timezone-select__popper\">\n\t\t\t\t<template #trigger>\n\t\t\t\t\t<button class=\"datetime-picker-inline-icon\"\n\t\t\t\t\t\t:class=\"{'datetime-picker-inline-icon--highlighted': highlightTimezone}\"\n\t\t\t\t\t\t@mousedown.stop.prevent=\"() => {}\">\n\t\t\t\t\t\t<Web :size=\"20\" />\n\t\t\t\t\t</button>\n\t\t\t\t</template>\n\n\t\t\t\t<div class=\"timezone-popover-wrapper__label\">\n\t\t\t\t\t<strong>\n\t\t\t\t\t\t{{ t('Please select a time zone:') }}\n\t\t\t\t\t</strong>\n\t\t\t\t</div>\n\t\t\t\t<NcTimezonePicker v-model=\"tzVal\"\n\t\t\t\t\tclass=\"timezone-popover-wrapper__timezone-select\"\n\t\t\t\t\t@input=\"$emit('update:timezone-id', arguments[0])\" />\n\t\t\t</NcPopover>\n\t\t\t<CalendarBlank v-else :size=\"20\" />\n\t\t</template>\n\t\t<template v-for=\"(_, slot) of $scopedSlots\" #[slot]=\"scope\">\n\t\t\t<slot :name=\"slot\" v-bind=\"scope\" />\n\t\t</template>\n\t</DatePicker>\n</template>\n\n<script>\nimport { t } from '../../l10n.js'\n\nimport NcTimezonePicker from '../NcTimezonePicker/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport l10n from '../../mixins/l10n.js'\n\nimport CalendarBlank from 'vue-material-design-icons/CalendarBlank.vue'\nimport Web from 'vue-material-design-icons/Web.vue'\n\nimport {\n\tgetFirstDay,\n\tgetDayNames,\n\tgetDayNamesShort,\n\tgetDayNamesMin,\n\tgetMonthNames,\n\tgetMonthNamesShort,\n} from '@nextcloud/l10n'\n\nimport DatePicker from 'vue2-datepicker'\n\nconst formatMap = {\n\tdate: 'YYYY-MM-DD',\n\tdatetime: 'YYYY-MM-DD H:mm:ss',\n\tyear: 'YYYY',\n\tmonth: 'YYYY-MM',\n\ttime: 'H:mm:ss',\n\tweek: 'w',\n}\n\nexport default {\n\tname: 'NcDateTimePicker',\n\n\tcomponents: {\n\t\tCalendarBlank,\n\t\tDatePicker,\n\t\tNcPopover,\n\t\tNcTimezonePicker,\n\t\tWeb,\n\t},\n\n\tmixins: [l10n],\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tclearable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tminuteStep: {\n\t\t\ttype: Number,\n\t\t\tdefault: 10,\n\t\t},\n\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date',\n\t\t},\n\n\t\tformat: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tformatter: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tlang: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value to initialize, but also two-way bind the selected date. The date is – like the `Date` object in\n\t\t * JavaScript – tied to UTC. The selected time zone does not have an influence of the selected time and date\n\t\t * value. You have to translate the time yourself when you want to factor in time zones.\n\t\t */\n\t\t// eslint-disable-next-line\n\t\tvalue: {\n\t\t\tdefault: () => new Date(),\n\t\t},\n\n\t\t/**\n\t\t * The preselected IANA time zone ID for the time zone picker, only relevant in combination with `:show-timezone-select=\"true\"`. Example: `Europe/Berlin`. The prop supports two-way binding through the .sync modifier.\n\t\t */\n\t\ttimezoneId: {\n\t\t\ttype: String,\n\t\t\tdefault: 'UTC',\n\t\t},\n\n\t\tshowTimezoneSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\thighlightTimezone: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tappendToBody: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tshowWeekNumber: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:value',\n\t\t'update:timezone-id',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tshowTimezonePopover: false,\n\t\t\ttzVal: this.timezoneId,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Datepicker language\n\t\t * https://github.com/mengxiong10/vue2-datepicker/blob/master/locale.md\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tdefaultLang() {\n\t\t\treturn {\n\t\t\t\tformatLocale: {\n\t\t\t\t\tmonths: getMonthNames(),\n\t\t\t\t\tmonthsShort: getMonthNamesShort(),\n\t\t\t\t\tweekdays: getDayNames(),\n\t\t\t\t\tweekdaysShort: getDayNamesShort(),\n\t\t\t\t\tweekdaysMin: getDayNamesMin(),\n\t\t\t\t\t// 0 = sunday, 1 = monday\n\t\t\t\t\tfirstDayOfWeek: getFirstDay(),\n\t\t\t\t},\n\t\t\t\tmonthFormat: 'MMM',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Translated placeholder\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tdefaultPlaceholder() {\n\t\t\tif (this.type === 'time') {\n\t\t\t\treturn t('Pick a time')\n\t\t\t}\n\t\t\tif (this.type === 'month') {\n\t\t\t\treturn t('Pick a month')\n\t\t\t}\n\t\t\tif (this.type === 'year') {\n\t\t\t\treturn t('Pick a year')\n\t\t\t}\n\t\t\tif (this.type === 'week') {\n\t\t\t\treturn t('Pick a week')\n\t\t\t}\n\t\t\tif (this.type === 'date') {\n\t\t\t\treturn t('Pick a date')\n\t\t\t}\n\t\t\treturn t('Pick a date and a time')\n\t\t},\n\n\t\t/**\n\t\t * If format is not provided, try to match the type\n\t\t * or fallback to 'date'\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tformatTypeMap() {\n\t\t\treturn formatMap[this.type] ?? formatMap.date\n\t\t},\n\t},\n\n\tmethods: {\n\t\thandleSelectYear(year) {\n\t\t\tconst value = this.$refs.datepicker.currentValue\n\t\t\tif (value) {\n\t\t\t\ttry {\n\t\t\t\t\tconst date = new Date(new Date(value).setFullYear(year))\n\t\t\t\t\tthis.$refs.datepicker.selectDate(date)\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('Invalid value', value, year)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\thandleSelectMonth(month) {\n\t\t\tconst value = this.$refs.datepicker.currentValue\n\t\t\tif (value) {\n\t\t\t\ttry {\n\t\t\t\t\tconst date = new Date(new Date(value).setMonth(month))\n\t\t\t\t\tthis.$refs.datepicker.selectDate(date)\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('Invalid value', value, month)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Toggles the visibility of the time zone popover\n\t\t */\n\t\ttoggleTimezonePopover() {\n\t\t\tif (!this.showTimezoneSelect) {\n\t\t\t\t// Just a click on the icon, but not for time zones -> ignore\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.showTimezonePopover = !this.showTimezonePopover\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.mx-datepicker :deep(.mx-input-wrapper .mx-input) {\n\tbackground-clip: border-box;\n}\n\n.datetime-picker-inline-icon {\n\topacity: .3;\n\tborder: none;\n\tbackground-color: transparent;\n\tborder-radius: 0;\n\tpadding: 0 !important;\n\tmargin: 0;\n\n\t&--highlighted {\n\t\topacity: .7;\n\t}\n\n\t&:focus,\n\t&:hover {\n\t\topacity: 1;\n\t}\n}\n</style>\n\n<style lang=\"scss\">\n// We overwrite the popover base class, so we can style\n// the popover for the timezone select only.\n.v-popper--theme-dropdown.v-popper__popper.timezone-select__popper .v-popper__wrapper {\n\tborder-radius: var(--border-radius-large);\n\n\t.v-popper__inner {\n\t\tpadding: 4px;\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t.timezone-popover-wrapper {\n\t\t\t&__label {\n\t\t\t\tpadding: 4px 0;\n\t\t\t\tpadding-left: 14px; // Left-align with NcSelect text\n\t\t\t}\n\n\t\t\t// We overwrite the border radius of the input to account for the popover border-radius minus the padding\n\t\t\t&__timezone-select.v-select {\n\t\t\t\t.vs__dropdown-toggle {\n\t\t\t\t\tborder-radius: calc(var(--border-radius-large) - 4px);\n\t\t\t\t}\n\n\t\t\t\t&.vs--open {\n\t\t\t\t\t.vs__dropdown-toggle {\n\t\t\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t\t\t}\n\t\t\t\t\t&.select--drop-up .vs__dropdown-toggle {\n\t\t\t\t\t\tborder-radius: 0 0 calc(var(--border-radius-large) - 4px) calc(var(--border-radius-large) - 4px);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n// TODO: This should be scoped or targeted by a specific selector, but the NcSelect component does not allow this yet.\n.vs__dropdown-menu--floating {\n\t// Higher z-index than the popover in which the NcSelect is located.\n\tz-index: 100001;\n}\n</style>\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\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 */\nimport './index.scss'\nimport NcDateTimePicker from './NcDateTimePicker.vue'\nimport ScopeComponent from '../../utils/ScopeComponent.js'\n\nScopeComponent(NcDateTimePicker)\n\nexport default NcDateTimePicker\n"],"names":["_sfc_main$2","_sfc_main$1","formatMap","_sfc_main","CalendarBlank","DatePicker","NcPopover","NcTimezonePicker","Web","l10n","getMonthNames","getMonthNamesShort","getDayNames","getDayNamesShort","getDayNamesMin","getFirstDay","t","_a","year","value","date","month","ScopeComponent","NcDateTimePicker"],"mappings":"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","x_google_ignoreList":[0,1]}
@@ -1,5 +1,5 @@
1
1
  var D = require("../assets/index-2d4de2fc.css");
2
- const p = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), h = require("../chunks/ScopeComponent-e060526a.cjs");
2
+ const p = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), h = require("../chunks/ScopeComponent-50287dad.cjs");
3
3
  const f = ["date", "datetime-local", "month", "time", "week"], y = {
4
4
  name: "NcDateTimePickerNative",
5
5
  inheritAttrs: !1,
@@ -1,6 +1,6 @@
1
1
  import "../assets/index-2d4de2fc.css";
2
2
  import { n as p } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
3
- import { S as c } from "../chunks/ScopeComponent-9519afcc.mjs";
3
+ import { S as c } from "../chunks/ScopeComponent-1ab1ebb9.mjs";
4
4
  const f = ["date", "datetime-local", "month", "time", "week"], h = {
5
5
  name: "NcDateTimePickerNative",
6
6
  inheritAttrs: !1,
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  const o = require("vue"), l = require("./NcButton.cjs"), i = require("./NcIconSvgWrapper.cjs"), u = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), a = o.defineComponent({
3
3
  name: "NcDialogButton",
4
+ components: {
5
+ NcButton: l,
6
+ NcIconSvgWrapper: i
7
+ },
4
8
  props: {
5
9
  /**
6
10
  * The function that will be called when the button is pressed
@@ -38,21 +42,17 @@ const o = require("vue"), l = require("./NcButton.cjs"), i = require("./NcIconSv
38
42
  },
39
43
  emits: ["click"],
40
44
  setup(n, { emit: e }) {
41
- return {
42
- NcButton: l,
43
- NcIconSvgWrapper: i,
44
- handleClick: (c) => {
45
- var t;
46
- (t = n.callback) == null || t.call(n), e("click", c);
47
- }
48
- };
45
+ return { handleClick: (c) => {
46
+ var r;
47
+ (r = n.callback) == null || r.call(n), e("click", c);
48
+ } };
49
49
  }
50
50
  });
51
51
  var s = function() {
52
- var e = this, r = e._self._c;
53
- return e._self._setupProxy, r("NcButton", { attrs: { "aria-label": e.label, type: e.type }, on: { click: e.handleClick }, scopedSlots: e._u([{ key: "icon", fn: function() {
52
+ var e = this, t = e._self._c;
53
+ return e._self._setupProxy, t("NcButton", { attrs: { "aria-label": e.label, type: e.type }, on: { click: e.handleClick }, scopedSlots: e._u([{ key: "icon", fn: function() {
54
54
  return [e._t("icon", function() {
55
- return [e.icon !== void 0 ? r("NcIconSvgWrapper", { attrs: { svg: e.icon } }) : e._e()];
55
+ return [e.icon !== void 0 ? t("NcIconSvgWrapper", { attrs: { svg: e.icon } }) : e._e()];
56
56
  })];
57
57
  }, proxy: !0 }], null, !0) }, [e._v(" " + e._s(e.label) + " ")]);
58
58
  }, _ = [], d = /* @__PURE__ */ u.normalizeComponent(
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialogButton.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\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\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\" :type=\"type\" @click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nexport default defineComponent({\n\tname: 'NcDialogButton',\n\n\tprops: {\n\t\t/**\n\t\t * The function that will be called when the button is pressed\n\t\t * @type {() => void}\n\t\t */\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The label of the button\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Optional inline SVG icon for the button\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The button type, see NcButton\n\t\t * @values 'primary', 'secondary', 'error', 'warning', 'success'\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'secondary',\n\t\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'error', 'warning', 'success'].includes(type),\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tsetup(props, { emit }) {\n\t\t/**\n\t\t * Handle clicking the button\n\t\t * @param {MouseEvent} e The click event\n\t\t */\n\t\tconst handleClick = (e) => {\n\t\t\tprops.callback?.()\n\t\t\temit('click', e)\n\t\t}\n\n\t\treturn {\n\t\t\tNcButton,\n\t\t\tNcIconSvgWrapper,\n\n\t\t\thandleClick,\n\t\t}\n\t},\n})\n</script>\n"],"names":["_sfc_main","defineComponent","type","props","emit","NcButton","NcIconSvgWrapper","e","_a"],"mappings":";+JA2CAA,IAAAC,EAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAAA,KAAA,YAAA,CAAA,WAAA,aAAA,SAAA,WAAA,SAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,OAAA;AAAA,EAEA,MAAAC,GAAA,EAAA,MAAAC,KAAA;AAUA,WAAA;AAAA,MACA,UAAAC;AAAAA,MACA,kBAAAC;AAAAA,MAEA,aATA,CAAAC,MAAA;;AACA,SAAAC,IAAAL,EAAA,aAAA,QAAAK,EAAA,KAAAL,IACAC,EAAA,SAAAG,CAAA;AAAA,MACA;AAAA,IAOA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialogButton.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\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\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\" :type=\"type\" @click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nexport default defineComponent({\n\tname: 'NcDialogButton',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The function that will be called when the button is pressed\n\t\t * @type {() => void}\n\t\t */\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The label of the button\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Optional inline SVG icon for the button\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The button type, see NcButton\n\t\t * @values 'primary', 'secondary', 'error', 'warning', 'success'\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'secondary',\n\t\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'error', 'warning', 'success'].includes(type),\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tsetup(props, { emit }) {\n\t\t/**\n\t\t * Handle clicking the button\n\t\t * @param {MouseEvent} e The click event\n\t\t */\n\t\tconst handleClick = (e) => {\n\t\t\tprops.callback?.()\n\t\t\temit('click', e)\n\t\t}\n\n\t\treturn { handleClick }\n\t},\n})\n</script>\n"],"names":["_sfc_main","defineComponent","NcButton","NcIconSvgWrapper","type","props","emit","e","_a"],"mappings":";+JA2CAA,IAAAC,EAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAAA,IACA,kBAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAAA,KAAA,YAAA,CAAA,WAAA,aAAA,SAAA,WAAA,SAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,OAAA;AAAA,EAEA,MAAAC,GAAA,EAAA,MAAAC,KAAA;AAUA,WAAA,EAAA,aALA,CAAAC,MAAA;;AACA,OAAAC,IAAAH,EAAA,aAAA,QAAAG,EAAA,KAAAH,IACAC,EAAA,SAAAC,CAAA;AAAA,IACA,EAEA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,13 @@
1
- import { defineComponent as l } from "vue";
2
- import o from "./NcButton.mjs";
1
+ import { defineComponent as o } from "vue";
2
+ import l from "./NcButton.mjs";
3
3
  import i from "./NcIconSvgWrapper.mjs";
4
4
  import { n as a } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
5
- const u = l({
5
+ const u = o({
6
6
  name: "NcDialogButton",
7
+ components: {
8
+ NcButton: l,
9
+ NcIconSvgWrapper: i
10
+ },
7
11
  props: {
8
12
  /**
9
13
  * The function that will be called when the button is pressed
@@ -41,21 +45,17 @@ const u = l({
41
45
  },
42
46
  emits: ["click"],
43
47
  setup(n, { emit: e }) {
44
- return {
45
- NcButton: o,
46
- NcIconSvgWrapper: i,
47
- handleClick: (c) => {
48
- var t;
49
- (t = n.callback) == null || t.call(n), e("click", c);
50
- }
51
- };
48
+ return { handleClick: (c) => {
49
+ var r;
50
+ (r = n.callback) == null || r.call(n), e("click", c);
51
+ } };
52
52
  }
53
53
  });
54
54
  var s = function() {
55
- var e = this, r = e._self._c;
56
- return e._self._setupProxy, r("NcButton", { attrs: { "aria-label": e.label, type: e.type }, on: { click: e.handleClick }, scopedSlots: e._u([{ key: "icon", fn: function() {
55
+ var e = this, t = e._self._c;
56
+ return e._self._setupProxy, t("NcButton", { attrs: { "aria-label": e.label, type: e.type }, on: { click: e.handleClick }, scopedSlots: e._u([{ key: "icon", fn: function() {
57
57
  return [e._t("icon", function() {
58
- return [e.icon !== void 0 ? r("NcIconSvgWrapper", { attrs: { svg: e.icon } }) : e._e()];
58
+ return [e.icon !== void 0 ? t("NcIconSvgWrapper", { attrs: { svg: e.icon } }) : e._e()];
59
59
  })];
60
60
  }, proxy: !0 }], null, !0) }, [e._v(" " + e._s(e.label) + " ")]);
61
61
  }, d = [], f = /* @__PURE__ */ a(
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialogButton.mjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\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\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\" :type=\"type\" @click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nexport default defineComponent({\n\tname: 'NcDialogButton',\n\n\tprops: {\n\t\t/**\n\t\t * The function that will be called when the button is pressed\n\t\t * @type {() => void}\n\t\t */\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The label of the button\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Optional inline SVG icon for the button\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The button type, see NcButton\n\t\t * @values 'primary', 'secondary', 'error', 'warning', 'success'\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'secondary',\n\t\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'error', 'warning', 'success'].includes(type),\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tsetup(props, { emit }) {\n\t\t/**\n\t\t * Handle clicking the button\n\t\t * @param {MouseEvent} e The click event\n\t\t */\n\t\tconst handleClick = (e) => {\n\t\t\tprops.callback?.()\n\t\t\temit('click', e)\n\t\t}\n\n\t\treturn {\n\t\t\tNcButton,\n\t\t\tNcIconSvgWrapper,\n\n\t\t\thandleClick,\n\t\t}\n\t},\n})\n</script>\n"],"names":["_sfc_main","defineComponent","type","props","emit","NcButton","NcIconSvgWrapper","e","_a"],"mappings":";;;;AA2CA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAAA,KAAA,YAAA,CAAA,WAAA,aAAA,SAAA,WAAA,SAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,OAAA;AAAA,EAEA,MAAAC,GAAA,EAAA,MAAAC,KAAA;AAUA,WAAA;AAAA,MACA,UAAAC;AAAA,MACA,kBAAAC;AAAA,MAEA,aATA,CAAAC,MAAA;;AACA,SAAAC,IAAAL,EAAA,aAAA,QAAAK,EAAA,KAAAL,IACAC,EAAA,SAAAG,CAAA;AAAA,MACA;AAAA,IAOA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialogButton.mjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2023 Ferdinand Thiessen\n -\n - @author Ferdinand Thiessen <opensource@fthiessen.de>\n -\n - @license AGPL-3.0-or-later\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\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\" :type=\"type\" @click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nexport default defineComponent({\n\tname: 'NcDialogButton',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The function that will be called when the button is pressed\n\t\t * @type {() => void}\n\t\t */\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The label of the button\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Optional inline SVG icon for the button\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The button type, see NcButton\n\t\t * @values 'primary', 'secondary', 'error', 'warning', 'success'\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'secondary',\n\t\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'error', 'warning', 'success'].includes(type),\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tsetup(props, { emit }) {\n\t\t/**\n\t\t * Handle clicking the button\n\t\t * @param {MouseEvent} e The click event\n\t\t */\n\t\tconst handleClick = (e) => {\n\t\t\tprops.callback?.()\n\t\t\temit('click', e)\n\t\t}\n\n\t\treturn { handleClick }\n\t},\n})\n</script>\n"],"names":["_sfc_main","defineComponent","NcButton","NcIconSvgWrapper","type","props","emit","e","_a"],"mappings":";;;;AA2CA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,kBAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAAA,KAAA,YAAA,CAAA,WAAA,aAAA,SAAA,WAAA,SAAA,EAAA,SAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,OAAA;AAAA,EAEA,MAAAC,GAAA,EAAA,MAAAC,KAAA;AAUA,WAAA,EAAA,aALA,CAAAC,MAAA;;AACA,OAAAC,IAAAH,EAAA,aAAA,QAAAG,EAAA,KAAAH,IACAC,EAAA,SAAAC,CAAA;AAAA,IACA,EAEA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  var j = require("../assets/index-2a8e4ca1.css");
2
- const c = require("./NcPopover.cjs"), l = require("./NcTextField.cjs"), r = require("../chunks/l10n-b1d264c7.cjs"), a = require("emoji-mart-vue-fast"), u = require("emoji-mart-vue-fast/data/all.json"), f = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), p = (t) => t && t.__esModule ? t : { default: t }, d = /* @__PURE__ */ p(u);
2
+ const c = require("./NcPopover.cjs"), l = require("./NcTextField.cjs"), r = require("../chunks/l10n-f491109d.cjs"), a = require("emoji-mart-vue-fast"), u = require("emoji-mart-vue-fast/data/all.json"), f = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), p = (t) => t && t.__esModule ? t : { default: t }, d = /* @__PURE__ */ p(u);
3
3
  let o;
4
4
  const m = {
5
5
  search: r.t("Search emoji"),
@@ -1,7 +1,7 @@
1
1
  import "../assets/index-2a8e4ca1.css";
2
2
  import n from "./NcPopover.mjs";
3
3
  import c from "./NcTextField.mjs";
4
- import { t as r } from "../chunks/l10n-05a09c66.mjs";
4
+ import { t as r } from "../chunks/l10n-f692947e.mjs";
5
5
  import { Emoji as l, Picker as u, EmojiIndex as f } from "emoji-mart-vue-fast";
6
6
  import p from "emoji-mart-vue-fast/data/all.json";
7
7
  import { n as m } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
@@ -1,4 +1,4 @@
1
- var a = require("../assets/index-c6f0da2e.css");
1
+ var a = require("../assets/index-c239a2fc.css");
2
2
  const s = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
3
  const i = {
4
4
  name: "NcEmptyContent",
@@ -28,27 +28,27 @@ const i = {
28
28
  * Check if a description is given as either property or slot
29
29
  */
30
30
  hasDescription() {
31
- var e;
32
- return this.description !== "" || ((e = this.$slots.description) == null ? void 0 : e[0]);
31
+ var n;
32
+ return this.description !== "" || ((n = this.$slots.description) == null ? void 0 : n[0]);
33
33
  }
34
34
  }
35
35
  };
36
- var c = function() {
37
- var t = this, n = t._self._c;
38
- return n("div", { staticClass: "empty-content", attrs: { role: "note" } }, [t.$slots.icon ? n("div", { staticClass: "empty-content__icon", attrs: { "aria-hidden": "true" } }, [t._t("icon")], 2) : t._e(), t._t("name", function() {
39
- return [t.hasName ? n("h2", { staticClass: "empty-content__name" }, [t._v(" " + t._s(t.name) + " ")]) : t._e()];
40
- }), t.hasDescription ? n("p", [t._t("description", function() {
36
+ var o = function() {
37
+ var t = this, e = t._self._c;
38
+ return e("div", { staticClass: "empty-content", attrs: { role: "note" } }, [t.$slots.icon ? e("div", { staticClass: "empty-content__icon", attrs: { "aria-hidden": "true" } }, [t._t("icon")], 2) : t._e(), t._t("name", function() {
39
+ return [t.hasName ? e("span", { staticClass: "empty-content__name" }, [t._v(" " + t._s(t.name) + " ")]) : t._e()];
40
+ }), t.hasDescription ? e("p", { staticClass: "empty-content__description" }, [t._t("description", function() {
41
41
  return [t._v(" " + t._s(t.description) + " ")];
42
- })], 2) : t._e(), t.$slots.action ? n("div", { staticClass: "empty-content__action" }, [t._t("action")], 2) : t._e()], 2);
43
- }, o = [], r = /* @__PURE__ */ s.normalizeComponent(
42
+ })], 2) : t._e(), t.$slots.action ? e("div", { staticClass: "empty-content__action" }, [t._t("action")], 2) : t._e()], 2);
43
+ }, _ = [], c = /* @__PURE__ */ s.normalizeComponent(
44
44
  i,
45
- c,
46
45
  o,
46
+ _,
47
47
  !1,
48
48
  null,
49
- "3c45cf57",
49
+ "458108e7",
50
50
  null,
51
51
  null
52
52
  );
53
- const _ = r.exports;
54
- module.exports = _;
53
+ const r = c.exports;
54
+ module.exports = r;
@@ -1 +1 @@
1
- {"version":3,"file":"NcEmptyContent.cjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Greta Doci <gretadoci@gmail.com>\n -\n - @author 2020 Greta Doci <gretadoci@gmail.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\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton type=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<!-- @slot Optional material design icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<!-- @slot Optional name if not set as property, shall be enclosed by a header element -->\n\t\t<slot name=\"name\">\n\t\t\t<h2 v-if=\"hasName\" class=\"empty-content__name\">\n\t\t\t\t{{ name }}\n\t\t\t</h2>\n\t\t</slot>\n\t\t<p v-if=\"hasDescription\">\n\t\t\t<!-- @slot Optional formatted description rendered inside a paragraph -->\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<!-- @slot Optional slot for a button or the like -->\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcEmptyContent',\n\n\tprops: {\n\t\t/**\n\t\t * A header message about an empty content shown\n\t\t * @example 'No comments'\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Desription of the empty content\n\t\t * @example 'No comments yet, start the conversation!'\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thasName() {\n\t\t\treturn this.name !== ''\n\t\t},\n\t\t/**\n\t\t * Check if a description is given as either property or slot\n\t\t */\n\t\thasDescription() {\n\t\t\treturn this.description !== '' || this.$slots.description?.[0]\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","_a"],"mappings":";;AAsKA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;;AACA,aAAA,KAAA,gBAAA,QAAAC,IAAA,KAAA,OAAA,gBAAA,gBAAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcEmptyContent.cjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Greta Doci <gretadoci@gmail.com>\n -\n - @author 2020 Greta Doci <gretadoci@gmail.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\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent name=\"No comments\"\n\t\tdescription=\"Start writing comments and they will appear here.\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton type=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<div class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<!-- @slot Optional material design icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<!-- @slot Optional name if not set as property, shall be enclosed by a header element -->\n\t\t<slot name=\"name\">\n\t\t\t<span v-if=\"hasName\" class=\"empty-content__name\">\n\t\t\t\t{{ name }}\n\t\t\t</span>\n\t\t</slot>\n\t\t<p v-if=\"hasDescription\" class=\"empty-content__description\">\n\t\t\t<!-- @slot Optional formatted description rendered inside a paragraph -->\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<!-- @slot Optional slot for a button or the like -->\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'NcEmptyContent',\n\n\tprops: {\n\t\t/**\n\t\t * A header message about an empty content shown\n\t\t * @example 'No comments'\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Desription of the empty content\n\t\t * @example 'No comments yet, start the conversation!'\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\thasName() {\n\t\t\treturn this.name !== ''\n\t\t},\n\t\t/**\n\t\t * Check if a description is given as either property or slot\n\t\t */\n\t\thasDescription() {\n\t\t\treturn this.description !== '' || this.$slots.description?.[0]\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t}\n\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","_a"],"mappings":";;AAsKA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;;AACA,aAAA,KAAA,gBAAA,QAAAC,IAAA,KAAA,OAAA,gBAAA,gBAAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import "../assets/index-c6f0da2e.css";
1
+ import "../assets/index-c239a2fc.css";
2
2
  import { n as s } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
3
3
  const i = {
4
4
  name: "NcEmptyContent",
@@ -36,21 +36,21 @@ const i = {
36
36
  var o = function() {
37
37
  var t = this, n = t._self._c;
38
38
  return n("div", { staticClass: "empty-content", attrs: { role: "note" } }, [t.$slots.icon ? n("div", { staticClass: "empty-content__icon", attrs: { "aria-hidden": "true" } }, [t._t("icon")], 2) : t._e(), t._t("name", function() {
39
- return [t.hasName ? n("h2", { staticClass: "empty-content__name" }, [t._v(" " + t._s(t.name) + " ")]) : t._e()];
40
- }), t.hasDescription ? n("p", [t._t("description", function() {
39
+ return [t.hasName ? n("span", { staticClass: "empty-content__name" }, [t._v(" " + t._s(t.name) + " ")]) : t._e()];
40
+ }), t.hasDescription ? n("p", { staticClass: "empty-content__description" }, [t._t("description", function() {
41
41
  return [t._v(" " + t._s(t.description) + " ")];
42
42
  })], 2) : t._e(), t.$slots.action ? n("div", { staticClass: "empty-content__action" }, [t._t("action")], 2) : t._e()], 2);
43
- }, c = [], a = /* @__PURE__ */ s(
43
+ }, a = [], _ = /* @__PURE__ */ s(
44
44
  i,
45
45
  o,
46
- c,
46
+ a,
47
47
  !1,
48
48
  null,
49
- "3c45cf57",
49
+ "458108e7",
50
50
  null,
51
51
  null
52
52
  );
53
- const p = a.exports;
53
+ const p = _.exports;
54
54
  export {
55
55
  p as default
56
56
  };