@nextcloud/vue 8.0.0-beta.8 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/CHANGELOG.md +64 -2
  2. package/dist/Components/NcActionButton.cjs +22 -11
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +24 -12
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionInput.cjs +23 -18
  7. package/dist/Components/NcActionInput.cjs.map +1 -1
  8. package/dist/Components/NcActionInput.mjs +20 -14
  9. package/dist/Components/NcActionInput.mjs.map +1 -1
  10. package/dist/Components/NcActionLink.cjs +7 -7
  11. package/dist/Components/NcActionLink.cjs.map +1 -1
  12. package/dist/Components/NcActionLink.mjs +4 -4
  13. package/dist/Components/NcActionLink.mjs.map +1 -1
  14. package/dist/Components/NcActionRouter.cjs +8 -8
  15. package/dist/Components/NcActionRouter.cjs.map +1 -1
  16. package/dist/Components/NcActionRouter.mjs +4 -4
  17. package/dist/Components/NcActionRouter.mjs.map +1 -1
  18. package/dist/Components/NcActionText.cjs +10 -10
  19. package/dist/Components/NcActionText.cjs.map +1 -1
  20. package/dist/Components/NcActionText.mjs +11 -11
  21. package/dist/Components/NcActionText.mjs.map +1 -1
  22. package/dist/Components/NcActionTextEditable.cjs +10 -10
  23. package/dist/Components/NcActionTextEditable.cjs.map +1 -1
  24. package/dist/Components/NcActionTextEditable.mjs +2 -2
  25. package/dist/Components/NcActions.cjs +64 -57
  26. package/dist/Components/NcActions.cjs.map +1 -1
  27. package/dist/Components/NcActions.mjs +76 -69
  28. package/dist/Components/NcActions.mjs.map +1 -1
  29. package/dist/Components/NcAppContent.cjs +19 -20
  30. package/dist/Components/NcAppContent.cjs.map +1 -1
  31. package/dist/Components/NcAppContent.mjs +8 -8
  32. package/dist/Components/NcAppContent.mjs.map +1 -1
  33. package/dist/Components/NcAppNavigation.cjs +58 -27
  34. package/dist/Components/NcAppNavigation.cjs.map +1 -1
  35. package/dist/Components/NcAppNavigation.mjs +67 -34
  36. package/dist/Components/NcAppNavigation.mjs.map +1 -1
  37. package/dist/Components/NcAppNavigationItem.cjs +167 -63
  38. package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
  39. package/dist/Components/NcAppNavigationItem.mjs +142 -40
  40. package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
  41. package/dist/Components/NcAppNavigationNew.cjs +6 -6
  42. package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
  43. package/dist/Components/NcAppNavigationNew.mjs +17 -17
  44. package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
  45. package/dist/Components/NcAppNavigationNewItem.cjs +7 -7
  46. package/dist/Components/NcAppNavigationNewItem.cjs.map +1 -1
  47. package/dist/Components/NcAppNavigationNewItem.mjs +5 -5
  48. package/dist/Components/NcAppNavigationNewItem.mjs.map +1 -1
  49. package/dist/Components/NcAppNavigationSettings.cjs +46 -14
  50. package/dist/Components/NcAppNavigationSettings.cjs.map +1 -1
  51. package/dist/Components/NcAppNavigationSettings.mjs +48 -16
  52. package/dist/Components/NcAppNavigationSettings.mjs.map +1 -1
  53. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  54. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  55. package/dist/Components/NcAppSettingsDialog.cjs +87 -117
  56. package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
  57. package/dist/Components/NcAppSettingsDialog.mjs +95 -124
  58. package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
  59. package/dist/Components/NcAppSettingsSection.cjs +29 -10
  60. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  61. package/dist/Components/NcAppSettingsSection.mjs +29 -10
  62. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  63. package/dist/Components/NcAppSidebar.cjs +100 -34
  64. package/dist/Components/NcAppSidebar.cjs.map +1 -1
  65. package/dist/Components/NcAppSidebar.mjs +157 -93
  66. package/dist/Components/NcAppSidebar.mjs.map +1 -1
  67. package/dist/Components/NcAppSidebarTab.cjs +7 -7
  68. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  69. package/dist/Components/NcAppSidebarTab.mjs +4 -4
  70. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  71. package/dist/Components/NcAvatar.cjs +1 -1
  72. package/dist/Components/NcAvatar.mjs +1 -1
  73. package/dist/Components/NcBreadcrumb.cjs +10 -10
  74. package/dist/Components/NcBreadcrumb.cjs.map +1 -1
  75. package/dist/Components/NcBreadcrumb.mjs +1 -1
  76. package/dist/Components/NcBreadcrumbs.cjs +86 -54
  77. package/dist/Components/NcBreadcrumbs.cjs.map +1 -1
  78. package/dist/Components/NcBreadcrumbs.mjs +93 -62
  79. package/dist/Components/NcBreadcrumbs.mjs.map +1 -1
  80. package/dist/Components/NcButton.cjs +25 -25
  81. package/dist/Components/NcButton.cjs.map +1 -1
  82. package/dist/Components/NcButton.mjs +25 -25
  83. package/dist/Components/NcButton.mjs.map +1 -1
  84. package/dist/Components/NcCheckboxRadioSwitch.cjs +400 -54
  85. package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
  86. package/dist/Components/NcCheckboxRadioSwitch.mjs +398 -58
  87. package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
  88. package/dist/Components/NcColorPicker.cjs +18 -18
  89. package/dist/Components/NcColorPicker.cjs.map +1 -1
  90. package/dist/Components/NcColorPicker.mjs +17 -17
  91. package/dist/Components/NcColorPicker.mjs.map +1 -1
  92. package/dist/Components/NcDashboardWidget.cjs +30 -30
  93. package/dist/Components/NcDashboardWidget.cjs.map +1 -1
  94. package/dist/Components/NcDashboardWidget.mjs +3 -3
  95. package/dist/Components/NcDashboardWidgetItem.cjs +11 -11
  96. package/dist/Components/NcDashboardWidgetItem.cjs.map +1 -1
  97. package/dist/Components/NcDashboardWidgetItem.mjs +9 -9
  98. package/dist/Components/NcDashboardWidgetItem.mjs.map +1 -1
  99. package/dist/Components/NcDateTime.cjs +1 -1
  100. package/dist/Components/NcDateTime.mjs +1 -1
  101. package/dist/Components/NcDateTimePicker.cjs +109 -44
  102. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  103. package/dist/Components/NcDateTimePicker.mjs +115 -52
  104. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  105. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  106. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  107. package/dist/Components/NcDialog.cjs +171 -0
  108. package/dist/Components/NcDialog.cjs.map +1 -0
  109. package/dist/Components/NcDialog.mjs +177 -0
  110. package/dist/Components/NcDialog.mjs.map +1 -0
  111. package/dist/Components/NcDialogButton.cjs +69 -0
  112. package/dist/Components/NcDialogButton.cjs.map +1 -0
  113. package/dist/Components/NcDialogButton.mjs +74 -0
  114. package/dist/Components/NcDialogButton.mjs.map +1 -0
  115. package/dist/Components/NcEmojiPicker.cjs +1 -1
  116. package/dist/Components/NcEmojiPicker.mjs +1 -1
  117. package/dist/Components/NcEmptyContent.cjs +14 -14
  118. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  119. package/dist/Components/NcEmptyContent.mjs +7 -7
  120. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  121. package/dist/Components/NcIconSvgWrapper.cjs +29 -14
  122. package/dist/Components/NcIconSvgWrapper.cjs.map +1 -1
  123. package/dist/Components/NcIconSvgWrapper.mjs +32 -17
  124. package/dist/Components/NcIconSvgWrapper.mjs.map +1 -1
  125. package/dist/Components/NcInputField.cjs +16 -16
  126. package/dist/Components/NcInputField.cjs.map +1 -1
  127. package/dist/Components/NcInputField.mjs +5 -5
  128. package/dist/Components/NcInputField.mjs.map +1 -1
  129. package/dist/Components/NcListItem.cjs +3 -3
  130. package/dist/Components/NcListItem.cjs.map +1 -1
  131. package/dist/Components/NcListItem.mjs +3 -3
  132. package/dist/Components/NcListItem.mjs.map +1 -1
  133. package/dist/Components/NcListItemIcon.cjs +20 -12
  134. package/dist/Components/NcListItemIcon.cjs.map +1 -1
  135. package/dist/Components/NcListItemIcon.mjs +21 -13
  136. package/dist/Components/NcListItemIcon.mjs.map +1 -1
  137. package/dist/Components/NcModal.cjs +167 -72
  138. package/dist/Components/NcModal.cjs.map +1 -1
  139. package/dist/Components/NcModal.mjs +171 -79
  140. package/dist/Components/NcModal.mjs.map +1 -1
  141. package/dist/Components/NcNoteCard.cjs +147 -19
  142. package/dist/Components/NcNoteCard.cjs.map +1 -1
  143. package/dist/Components/NcNoteCard.mjs +148 -23
  144. package/dist/Components/NcNoteCard.mjs.map +1 -1
  145. package/dist/Components/NcPasswordField.cjs +114 -39
  146. package/dist/Components/NcPasswordField.cjs.map +1 -1
  147. package/dist/Components/NcPasswordField.mjs +125 -52
  148. package/dist/Components/NcPasswordField.mjs.map +1 -1
  149. package/dist/Components/NcRelatedResourcesPanel.cjs +70 -37
  150. package/dist/Components/NcRelatedResourcesPanel.cjs.map +1 -1
  151. package/dist/Components/NcRelatedResourcesPanel.mjs +60 -27
  152. package/dist/Components/NcRelatedResourcesPanel.mjs.map +1 -1
  153. package/dist/Components/NcRichContenteditable.cjs +22 -18
  154. package/dist/Components/NcRichContenteditable.cjs.map +1 -1
  155. package/dist/Components/NcRichContenteditable.mjs +32 -28
  156. package/dist/Components/NcRichContenteditable.mjs.map +1 -1
  157. package/dist/Components/NcRichText.cjs +1 -1
  158. package/dist/Components/NcRichText.mjs +3 -3
  159. package/dist/Components/NcSelect.cjs +82 -54
  160. package/dist/Components/NcSelect.cjs.map +1 -1
  161. package/dist/Components/NcSelect.mjs +77 -47
  162. package/dist/Components/NcSelect.mjs.map +1 -1
  163. package/dist/Components/NcSelectTags.cjs +2 -2
  164. package/dist/Components/NcSelectTags.cjs.map +1 -1
  165. package/dist/Components/NcSelectTags.mjs +4 -4
  166. package/dist/Components/NcSelectTags.mjs.map +1 -1
  167. package/dist/Components/NcSettingsInputText.cjs +1 -1
  168. package/dist/Components/NcSettingsInputText.mjs +1 -1
  169. package/dist/Components/NcSettingsSection.cjs +46 -14
  170. package/dist/Components/NcSettingsSection.cjs.map +1 -1
  171. package/dist/Components/NcSettingsSection.mjs +44 -12
  172. package/dist/Components/NcSettingsSection.mjs.map +1 -1
  173. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  174. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  175. package/dist/Components/NcTextArea.cjs +167 -0
  176. package/dist/Components/NcTextArea.cjs.map +1 -0
  177. package/dist/Components/NcTextArea.mjs +172 -0
  178. package/dist/Components/NcTextArea.mjs.map +1 -0
  179. package/dist/Components/NcTextField.cjs +79 -23
  180. package/dist/Components/NcTextField.cjs.map +1 -1
  181. package/dist/Components/NcTextField.mjs +82 -27
  182. package/dist/Components/NcTextField.mjs.map +1 -1
  183. package/dist/Components/NcTimezonePicker.cjs +26 -19
  184. package/dist/Components/NcTimezonePicker.cjs.map +1 -1
  185. package/dist/Components/NcTimezonePicker.mjs +31 -23
  186. package/dist/Components/NcTimezonePicker.mjs.map +1 -1
  187. package/dist/Components/NcUserBubble.cjs +24 -20
  188. package/dist/Components/NcUserBubble.cjs.map +1 -1
  189. package/dist/Components/NcUserBubble.mjs +25 -20
  190. package/dist/Components/NcUserBubble.mjs.map +1 -1
  191. package/dist/assets/{NcAppNavigationToggle-2cc5b864.css → NcAppNavigationToggle-9e170630.css} +3 -2
  192. package/dist/assets/{NcInputConfirmCancel-2ba60a52.css → NcInputConfirmCancel-45d1d76b.css} +7 -7
  193. package/dist/assets/{index-5072b6ee.css → index-05760fea.css} +16 -11
  194. package/dist/assets/{index-30e099f7.css → index-0ac09203.css} +3 -3
  195. package/dist/assets/{index-0ab8e182.css → index-0e9b11c7.css} +27 -22
  196. package/dist/assets/{index-1151d229.css → index-1f25a3c0.css} +3 -3
  197. package/dist/assets/{index-5eff69c7.css → index-2e5e3b55.css} +32 -30
  198. package/dist/assets/{index-03ec5f40.css → index-400b48a6.css} +7 -7
  199. package/dist/assets/{index-ed4adf1d.css → index-4271da53.css} +18 -17
  200. package/dist/assets/{index-33da80f0.css → index-4611417f.css} +8 -9
  201. package/dist/assets/{index-01e5adf4.css → index-55600948.css} +11 -11
  202. package/dist/assets/{index-c7905a53.css → index-57b305d3.css} +3 -3
  203. package/dist/assets/{index-de0326c7.css → index-5ee8a575.css} +69 -78
  204. package/dist/assets/index-6899d75b.css +150 -0
  205. package/dist/assets/{index-9354264c.css → index-6f721577.css} +16 -16
  206. package/dist/assets/{index-1beccc92.css → index-750c02cc.css} +28 -10
  207. package/dist/assets/{index-0557f12a.css → index-77a548be.css} +4 -4
  208. package/dist/assets/{index-fbdeb5ab.css → index-7d211db9.css} +11 -11
  209. package/dist/assets/{index-becfbea7.css → index-802d2118.css} +28 -23
  210. package/dist/assets/{index-a2d55f92.css → index-9176105d.css} +41 -41
  211. package/dist/assets/index-93bc89ef.css +197 -0
  212. package/dist/assets/{index-50b0766d.css → index-a0532427.css} +55 -70
  213. package/dist/assets/{index-6405cd50.css → index-ab715d82.css} +4 -4
  214. package/dist/assets/index-abb90c97.css +164 -0
  215. package/dist/assets/{index-23e64bbb.css → index-c221fe05.css} +9 -9
  216. package/dist/assets/{index-c6f0da2e.css → index-c239a2fc.css} +14 -8
  217. package/dist/assets/{index-fec4bb7b.css → index-d3702c91.css} +22 -17
  218. package/dist/assets/{index-194e9415.css → index-d5716ef0.css} +74 -59
  219. package/dist/assets/{index-4a775ba1.css → index-d812ed9e.css} +43 -43
  220. package/dist/assets/{index-793eae6b.css → index-d9ae9479.css} +6 -6
  221. package/dist/assets/{index-1cf8eeb4.css → index-db5a8b1c.css} +26 -33
  222. package/dist/assets/index-dc612aa3.css +112 -0
  223. package/dist/assets/{index-294382c8.css → index-e1a7aa6f.css} +43 -38
  224. package/dist/assets/{index-376d2dec.css → index-e7c55791.css} +67 -67
  225. package/dist/assets/{index-165fce0e.css → index-e7eadba7.css} +13 -13
  226. package/dist/assets/{index-0adc989c.css → index-ebbb7829.css} +9 -13
  227. package/dist/assets/{referencePickerModal-0acecb5e.css → referencePickerModal-3a127978.css} +55 -55
  228. package/dist/chunks/AlertCircleOutline-7085c10f.cjs +35 -0
  229. package/dist/chunks/AlertCircleOutline-7085c10f.cjs.map +1 -0
  230. package/dist/chunks/AlertCircleOutline-b73838e0.mjs +37 -0
  231. package/dist/chunks/AlertCircleOutline-b73838e0.mjs.map +1 -0
  232. package/dist/chunks/ArrowLeft-2f9b9323.cjs +35 -0
  233. package/dist/chunks/ArrowLeft-2f9b9323.cjs.map +1 -0
  234. package/dist/chunks/ArrowLeft-3779ba88.mjs +37 -0
  235. package/dist/chunks/ArrowLeft-3779ba88.mjs.map +1 -0
  236. package/dist/chunks/ArrowRight-7315f6c1.cjs +35 -0
  237. package/dist/chunks/ArrowRight-7315f6c1.cjs.map +1 -0
  238. package/dist/chunks/ArrowRight-74a9fcb2.mjs +37 -0
  239. package/dist/chunks/ArrowRight-74a9fcb2.mjs.map +1 -0
  240. package/dist/chunks/Check-2ea0a88a.mjs +37 -0
  241. package/dist/chunks/Check-2ea0a88a.mjs.map +1 -0
  242. package/dist/chunks/Check-be8cd6af.cjs +35 -0
  243. package/dist/chunks/Check-be8cd6af.cjs.map +1 -0
  244. package/dist/chunks/ChevronDown-a72d365d.mjs +37 -0
  245. package/dist/chunks/ChevronDown-a72d365d.mjs.map +1 -0
  246. package/dist/chunks/ChevronDown-dc32e51d.cjs +35 -0
  247. package/dist/chunks/ChevronDown-dc32e51d.cjs.map +1 -0
  248. package/dist/chunks/ChevronRight-1a6a6cf2.mjs +37 -0
  249. package/dist/chunks/ChevronRight-1a6a6cf2.mjs.map +1 -0
  250. package/dist/chunks/ChevronRight-a4c1e0d3.cjs +35 -0
  251. package/dist/chunks/ChevronRight-a4c1e0d3.cjs.map +1 -0
  252. package/dist/chunks/Close-271f72e2.mjs +37 -0
  253. package/dist/chunks/Close-271f72e2.mjs.map +1 -0
  254. package/dist/chunks/Close-98cb6f12.cjs +35 -0
  255. package/dist/chunks/Close-98cb6f12.cjs.map +1 -0
  256. package/dist/chunks/DotsHorizontal-0ee7d901.mjs +37 -0
  257. package/dist/chunks/DotsHorizontal-0ee7d901.mjs.map +1 -0
  258. package/dist/chunks/DotsHorizontal-ac96129a.cjs +35 -0
  259. package/dist/chunks/DotsHorizontal-ac96129a.cjs.map +1 -0
  260. package/dist/chunks/NcAppNavigationToggle-364eb664.cjs +113 -0
  261. package/dist/chunks/NcAppNavigationToggle-364eb664.cjs.map +1 -0
  262. package/dist/chunks/NcAppNavigationToggle-cd2ef112.mjs +118 -0
  263. package/dist/chunks/NcAppNavigationToggle-cd2ef112.mjs.map +1 -0
  264. package/dist/chunks/{NcInputConfirmCancel-f881168d.mjs → NcInputConfirmCancel-304f0b74.mjs} +22 -15
  265. package/dist/chunks/NcInputConfirmCancel-304f0b74.mjs.map +1 -0
  266. package/dist/chunks/NcInputConfirmCancel-c873bb9b.cjs +90 -0
  267. package/dist/chunks/NcInputConfirmCancel-c873bb9b.cjs.map +1 -0
  268. package/dist/chunks/{NcRichText-1c3d2654.mjs → NcRichText-25edeb8e.mjs} +9 -9
  269. package/dist/chunks/{NcRichText-d385dc10.cjs.map → NcRichText-25edeb8e.mjs.map} +1 -1
  270. package/dist/chunks/{NcRichText-d385dc10.cjs → NcRichText-dcb4fb97.cjs} +2 -2
  271. package/dist/chunks/{NcRichText-1c3d2654.mjs.map → NcRichText-dcb4fb97.cjs.map} +1 -1
  272. package/dist/chunks/{NcSettingsSelectGroup-47d9c113.cjs → NcSettingsSelectGroup-d639533d.cjs} +1 -1
  273. package/dist/chunks/{NcSettingsSelectGroup-47d9c113.cjs.map → NcSettingsSelectGroup-d639533d.cjs.map} +1 -1
  274. package/dist/chunks/{NcSettingsSelectGroup-0f4a0f94.mjs → NcSettingsSelectGroup-fd91d31a.mjs} +2 -2
  275. package/dist/chunks/{NcSettingsSelectGroup-0f4a0f94.mjs.map → NcSettingsSelectGroup-fd91d31a.mjs.map} +1 -1
  276. package/dist/chunks/{ScopeComponent-97a014a1.mjs → ScopeComponent-5b9e60d8.mjs} +3 -3
  277. package/dist/chunks/{ScopeComponent-97a014a1.mjs.map → ScopeComponent-5b9e60d8.mjs.map} +1 -1
  278. package/dist/chunks/{ScopeComponent-1c75ec38.cjs → ScopeComponent-dfa5ec75.cjs} +1 -1
  279. package/dist/chunks/{ScopeComponent-1c75ec38.cjs.map → ScopeComponent-dfa5ec75.cjs.map} +1 -1
  280. package/dist/chunks/{actionText-b0bd6eb7.cjs → actionText-54bc24a6.cjs} +1 -1
  281. package/dist/chunks/{actionText-9f5c55bd.mjs.map → actionText-54bc24a6.cjs.map} +1 -1
  282. package/dist/chunks/{actionText-9f5c55bd.mjs → actionText-a64be267.mjs} +1 -1
  283. package/dist/chunks/{actionText-b0bd6eb7.cjs.map → actionText-a64be267.mjs.map} +1 -1
  284. package/dist/chunks/{index-2a5b8ace.cjs → index-343ecbe5.cjs} +98 -55
  285. package/dist/chunks/index-343ecbe5.cjs.map +1 -0
  286. package/dist/chunks/{index-6c221fa0.mjs → index-a01ff595.mjs} +143 -100
  287. package/dist/chunks/index-a01ff595.mjs.map +1 -0
  288. package/dist/chunks/{l10n-4326316a.cjs → l10n-9321b50d.cjs} +1 -1
  289. package/dist/chunks/{l10n-4326316a.cjs.map → l10n-9321b50d.cjs.map} +1 -1
  290. package/dist/chunks/l10n-9f3afaf5.cjs +29 -0
  291. package/dist/chunks/l10n-9f3afaf5.cjs.map +1 -0
  292. package/dist/chunks/l10n-b6d21146.mjs +31 -0
  293. package/dist/chunks/l10n-b6d21146.mjs.map +1 -0
  294. package/dist/chunks/{l10n-c5f5f001.mjs → l10n-bef4ea85.mjs} +1 -1
  295. package/dist/chunks/{l10n-c5f5f001.mjs.map → l10n-bef4ea85.mjs.map} +1 -1
  296. package/dist/chunks/{referencePickerModal-0fde503d.mjs → referencePickerModal-58498cac.mjs} +157 -125
  297. package/dist/chunks/referencePickerModal-58498cac.mjs.map +1 -0
  298. package/dist/chunks/{referencePickerModal-9b4ff88d.cjs → referencePickerModal-a739a17b.cjs} +145 -112
  299. package/dist/chunks/referencePickerModal-a739a17b.cjs.map +1 -0
  300. package/dist/index.cjs +105 -103
  301. package/dist/index.cjs.map +1 -1
  302. package/dist/index.mjs +138 -133
  303. package/dist/index.mjs.map +1 -1
  304. package/dist/vendor.LICENSE.txt +5 -1
  305. package/package.json +8 -5
  306. package/dist/assets/index-7768d5e5.css +0 -148
  307. package/dist/assets/index-d646553d.css +0 -41
  308. package/dist/chunks/NcAppNavigationToggle-960658a0.cjs +0 -49
  309. package/dist/chunks/NcAppNavigationToggle-960658a0.cjs.map +0 -1
  310. package/dist/chunks/NcAppNavigationToggle-d868f651.mjs +0 -55
  311. package/dist/chunks/NcAppNavigationToggle-d868f651.mjs.map +0 -1
  312. package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs +0 -83
  313. package/dist/chunks/NcInputConfirmCancel-0c4bee9a.cjs.map +0 -1
  314. package/dist/chunks/NcInputConfirmCancel-f881168d.mjs.map +0 -1
  315. package/dist/chunks/index-2a5b8ace.cjs.map +0 -1
  316. package/dist/chunks/index-6c221fa0.mjs.map +0 -1
  317. package/dist/chunks/l10n-27a75c40.mjs +0 -31
  318. package/dist/chunks/l10n-27a75c40.mjs.map +0 -1
  319. package/dist/chunks/l10n-903083c4.cjs +0 -29
  320. package/dist/chunks/l10n-903083c4.cjs.map +0 -1
  321. package/dist/chunks/referencePickerModal-0fde503d.mjs.map +0 -1
  322. package/dist/chunks/referencePickerModal-9b4ff88d.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## v8 **Unreleased** (beta)
6
- [Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v7.11.2...v8.0.0-beta.6)
5
+ ## [v8.0.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.0.0) (2023-11-08)
6
+ [Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v7.11.2...v8.0.0)
7
7
 
8
8
  ### :boom: Breaking changes
9
9
  - Update node engines to next LTS (node 20 / npm 9)
@@ -28,6 +28,8 @@ All notable changes to this project will be documented in this file.
28
28
  - feat(NcIconSvgWrapper)!: remove ID from svg [\#4607](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4607) ([ShGKme](https://github.com/ShGKme))
29
29
 
30
30
  ### :rocket: Enhancements
31
+ - feat(NcAppSettingsDialog): Allow to add icons to the navigation sections [\#4745](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4745) ([susnux](https://github.com/susnux))
32
+ - feat(NcButton): Allow to format text of button [\#4367](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4367) ([susnux](https://github.com/susnux))
31
33
  - enh\(NcDatetime\): New component for displaying timestamps as time relative from now [\#4219](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4219) ([susnux](https://github.com/susnux))
32
34
  - feat\(NcInputField\): Append custom aria-describedby to input field [\#4225](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4225) ([Pytal](https://github.com/Pytal))
33
35
  - feat\(NcNoteCard\): Add new 'info' version to display informational messaged [\#4063](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4063) ([moan0s](https://github.com/moan0s))
@@ -49,6 +51,18 @@ All notable changes to this project will be documented in this file.
49
51
  - enh(NcAppNavigationCaption): Forward listeners [\#4494](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4494) ([Pytal](https://github.com/Pytal))
50
52
  - enh(a11y): Use button as header menu trigger [\#4481](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4481) ([Pytal](https://github.com/Pytal))
51
53
  - enh(a11y): Add nav to header menu [\#4487](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4487) ([Pytal](https://github.com/Pytal))
54
+ - feat(NcIconSvgWrapper): allow to render raw svg paths [\#4643](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4643) ([raimund-schluessler](https://github.com/raimund-schluessler))
55
+ - feat(NcDialog): New component (moved from `@nextcloud/dialogs`) [\#4550](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4550) ([susnux](https://github.com/susnux))
56
+ - feat(NcSelect): Allow to filter users by email notation [\#4653](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4653) ([susnux](https://github.com/susnux))
57
+ - enh(NcAppSidebarTabs): Make tab navigation accessible [\#4663](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4663) ([Pytal](https://github.com/Pytal))
58
+ - Add the resource type on RelatedResourcesPanel [\#4662](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4662) ([GretaD](https://github.com/GretaD))
59
+ - feat(NcTextArea): implement new textarea component [\#4605](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4605) ([st3iny](https://github.com/st3iny))
60
+ - Add header prop to NcRelatedResourcesPanel [\#4703](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4703) ([GretaD](https://github.com/GretaD)
61
+ - feat(NcAppNavigationItem): Add `active` property to set active state & use `aria-current` [\#4716](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4716) ([susnux](https://github.com/susnux)
62
+ - feat(NcActionButton): support menu styling [\#4724](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4724) ([skjnldsv](https://github.com/skjnldsv)
63
+ - Made description dynamic on related resources [\#4729](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4729) ([GretaD](https://github.com/GretaD)
64
+ - fix(NcTimezonePicker): Allow to set ID of inner select component [\#4734](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4734) ([susnux](https://github.com/susnux)
65
+ - Allow preventing link insertion in RichContentEditable [\#3890](https://github.com/nextcloud-libraries/nextcloud-vue/pull/3890) ([julien-nc](https://github.com/julien-nc)
52
66
 
53
67
  ### :bug: Fixed bugs
54
68
  - fix\(NcSettingsSelectGroup\): Migrate from deprecated `NcMultiselect` to `NcSelect` [\#4120](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4120) ([susnux](https://github.com/susnux))
@@ -125,6 +139,54 @@ All notable changes to this project will be documented in this file.
125
139
  - fix: handling of empty values in NcDateTimePickerNative [\#4540](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4540) ([st3iny](https://github.com/st3iny))
126
140
  - fix(NcIconSvgWrapper): remove new keepId prop [\#4609](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4609) ([ShGKme](https://github.com/ShGKme))
127
141
  - fix(NcInputField): Adjust styling of the internal label [\#4578](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4578) ([susnux](https://github.com/susnux))
142
+ - fix: invert datepicker buttons on dark mode [\#4618](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4618) ([raimund-schluessler](https://github.com/raimund-schluessler))
143
+ - fix(NcListItem): adjust paddings and hover styles for list items [\#4628](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4628) ([Antreesy](https://github.com/Antreesy))
144
+ - fix(NcActionInput): Set default trailing button label [\#4632](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4632) ([Pytal](https://github.com/Pytal))
145
+ - fix(NcAvatar): Ensure the aria label includes the status if there is any visible status indicator [\#4593](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4593) ([susnux](https://github.com/susnux))
146
+ - fix(NcAppNavigationItem): Ensure primary styling when the item is active [\#4650](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4650) ([susnux](https://github.com/susnux))
147
+ - fix(NcModal): Some modal improvments [\#4645](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4645) ([susnux](https://github.com/susnux))
148
+ - fix(NcActions): Various accessibility improvements [\#4648](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4648) ([Pytal](https://github.com/Pytal))
149
+ - Fix NcBreadcrumbs styles to wrap buttons [\#4640](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4640) ([JuliaKirschenheuter](https://github.com/JuliaKirschenheuter))
150
+ - fix(NcDashboardWidgetItem): do not assign href="" with empty link [\#4672](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4672) ([ShGKme](https://github.com/ShGKme))
151
+ - fix(NcActions): do not pass popoverBaseClass as an attr to NcPopover [\#4673](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4673) ([ShGKme](https://github.com/ShGKme))
152
+ - fix(NcActions): Allow to set attributes to inline actions [\#4671](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4671) ([susnux](https://github.com/susnux))
153
+ - fix(NcAvatar): make it a span phrasing element [\#4674](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4674) ([ShGKme](https://github.com/ShGKme))
154
+ - fix: Avoid closing all modals on escape if multiple are present [\#4677](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4677) ([juliushaertl](https://github.com/juliushaertl))
155
+ - fix: If a aria-selected button is present we focus on this one instead of the first entry [\#4678](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4678) ([juliushaertl](https://github.com/juliushaertl))
156
+ - fix(NcCheckboxRadioSwitch): Restore wrapper element prop [\#4679](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4679) ([Pytal](https://github.com/Pytal))
157
+ - fix(Nc*Field): do not pass all props to InputField BY filtering $props [\#4666](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4666) ([ShGKme](https://github.com/ShGKme))
158
+ - fix(NcDialog): NcModal registration [\#4682](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4682) ([Pytal](https://github.com/Pytal))
159
+ - fix: remove empty attributes values [\#4686](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4686) ([ShGKme](https://github.com/ShGKme))
160
+ - fix(dialog): fix component registration [\#4685](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4685) ([ShGKme](https://github.com/ShGKme))
161
+ - fix(NcCheckboxRadioSwitch): fix circular import [\#4691](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4691) ([raimund-schluessler](https://github.com/raimund-schluessler)
162
+ - fix(NcCheckboxRadioSwitch): forward indeterminate prop [\#4690](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4690) ([raimund-schluessler](https://github.com/raimund-schluessler)
163
+ - Change heading in EmptyContent to `span` [\#4702](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4702) ([JuliaKirschenheuter](https://github.com/JuliaKirschenheuter)
164
+ - fix(NcRelatedResourcesPanel): t is not defined [\#4705](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4705) ([raimund-schluessler](https://github.com/raimund-schluessler)
165
+ - fix(NcAppNavigationItem): Do not include `aria-expanded` attribute if there are no children [\#4715](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4715) ([susnux](https://github.com/susnux)
166
+ - fix(NcDialog): register components in NcDialogButton [\#4725](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4725) ([ShGKme](https://github.com/ShGKme)
167
+ - fix(NcActions): Detect navigation menu links correctly [\#4707](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4707) ([Pytal](https://github.com/Pytal)
168
+ - fix(NcSelect): Ensure selected option has enough contrast when the menu is opened [\#4733](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4733) ([susnux](https://github.com/susnux)
169
+ - fix(NcEmptyContent): Fix regression that changed the color of the description text [\#4735](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4735) ([susnux](https://github.com/susnux)
170
+ - fix(NcAppContent): Set normal scrollbar width on resizeable NcAppContentList [\#4710](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4710) ([mejo-](https://github.com/mejo-)
171
+ - fix(NcAvatar): Improve initials generation to filter out special characters [\#4737](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4737) ([susnux](https://github.com/susnux)
172
+ - fix(NcAvatar): remove alt attr from span[role=img] [\#4748](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4748) ([ShGKme](https://github.com/ShGKme)
173
+ - fix(NcSidebarTab): Ensure there is an `aria-label` if the `aria-labelledby` element does not exist [\#4736](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4736) ([susnux](https://github.com/susnux)
174
+ - add scoped to all ncappnavigation components [\#4730](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4730) ([szaimen](https://github.com/szaimen)
175
+ - Create outline for `focus-within` on RadioSwitch [\#4699](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4699) ([JuliaKirschenheuter](https://github.com/JuliaKirschenheuter)
176
+ - fix: NcUserBubble properties [\#4743](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4743) ([susnux](https://github.com/susnux)
177
+ - fix(NcUserBubble): only forward necessary props [\#4756](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4756) ([raimund-schluessler](https://github.com/raimund-schluessler)
178
+ - fix(NcInputField): Bring input field height to 44px and fixes its focus feedback [\#4718](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4718) ([marcoambrosini](https://github.com/marcoambrosini)
179
+ - fix(NcTimezonePicker): Add correct `aria-label` [\#4762](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4762) ([susnux](https://github.com/susnux)
180
+ - Fix input field trailing button alignment [\#4770](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4770) ([marcoambrosini](https://github.com/marcoambrosini)
181
+ - fix(NcSelectTags): Allow object type value [\#4771](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4771) ([Pytal](https://github.com/Pytal)
182
+ - fix(NcAppNavigation): Ensure `--app-navigation-padding` is set also on app-content [\#4776](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4776) ([susnux](https://github.com/susnux)
183
+ - fix(NcAppNavigation): add focus trap on mobile and improve a11y [\#4633](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4633) ([ShGKme](https://github.com/ShGKme)
184
+ - fix(NcAppNavigation): small screen support [\#4767](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4767) ([ShGKme](https://github.com/ShGKme)
185
+ ### Other Changes
186
+ - Updates for project Nextcloud vue library [\#4757](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4757) ([transifex-integration](https://github.com/transifex-integration)
187
+ - Change styles for focused Select [\#4728](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4728) ([JuliaKirschenheuter](https://github.com/JuliaKirschenheuter)
188
+ - feat(NcActions): focus the first action again if no action have a focus after render [\#4775](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4775) ([skjnldsv](https://github.com/skjnldsv)
189
+ - fix(NcAppNavigation): remove background square connecting toggle and navigation [\#4779](https://github.com/nextcloud-libraries/nextcloud-vue/pull/4779) ([ShGKme](https://github.com/ShGKme)
128
190
 
129
191
  ## [v7.11.2](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v7.11.2) (2023-05-05)
130
192
 
@@ -1,8 +1,11 @@
1
- var _ = require("../assets/index-becfbea7.css");
2
- const e = require("../chunks/actionText-b0bd6eb7.cjs"), s = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
1
+ var u = require("../assets/index-0e9b11c7.css");
2
+ const e = require("../chunks/ChevronRight-a4c1e0d3.cjs"), o = require("../chunks/actionText-54bc24a6.cjs"), s = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
3
  const a = {
4
4
  name: "NcActionButton",
5
- mixins: [e.ActionTextMixin],
5
+ components: {
6
+ ChevronRightIcon: e.ChevronRight
7
+ },
8
+ mixins: [o.ActionTextMixin],
6
9
  props: {
7
10
  /**
8
11
  * disabled state of the action button
@@ -17,6 +20,14 @@ const a = {
17
20
  ariaHidden: {
18
21
  type: Boolean,
19
22
  default: null
23
+ },
24
+ /**
25
+ * If this is a menu, a chevron icon will
26
+ * be added at the end of the line
27
+ */
28
+ isMenu: {
29
+ type: Boolean,
30
+ default: !1
20
31
  }
21
32
  },
22
33
  computed: {
@@ -30,20 +41,20 @@ const a = {
30
41
  }
31
42
  }
32
43
  };
33
- var o = function() {
44
+ var i = function() {
34
45
  var t = this, n = t._self._c;
35
- return n("li", { staticClass: "action", class: { "action--disabled": t.disabled }, attrs: { role: "presentation" } }, [n("button", { staticClass: "action-button", class: { focusable: t.isFocusable }, attrs: { "aria-label": t.ariaLabel, title: t.title, role: "menuitem", type: "button" }, on: { click: t.onClick } }, [t._t("icon", function() {
46
+ return n("li", { staticClass: "action", class: { "action--disabled": t.disabled } }, [n("button", { staticClass: "action-button", class: { focusable: t.isFocusable }, attrs: { "aria-label": t.ariaLabel, title: t.title, role: "menuitem", type: "button" }, on: { click: t.onClick } }, [t._t("icon", function() {
36
47
  return [n("span", { staticClass: "action-button__icon", class: [t.isIconUrl ? "action-button__icon--url" : t.icon], style: { backgroundImage: t.isIconUrl ? `url(${t.icon})` : null }, attrs: { "aria-hidden": t.ariaHidden } })];
37
- }), t.name ? n("p", [n("strong", { staticClass: "action-button__name" }, [t._v(" " + t._s(t.name) + " ")]), n("br"), n("span", { staticClass: "action-button__longtext", domProps: { textContent: t._s(t.text) } })]) : t.isLongText ? n("p", { staticClass: "action-button__longtext", domProps: { textContent: t._s(t.text) } }) : n("span", { staticClass: "action-button__text" }, [t._v(t._s(t.text))]), t._e()], 2)]);
38
- }, i = [], c = /* @__PURE__ */ s.normalizeComponent(
48
+ }), t.name ? n("span", { staticClass: "action-button__longtext-wrapper" }, [n("strong", { staticClass: "action-button__name" }, [t._v(" " + t._s(t.name) + " ")]), n("br"), n("span", { staticClass: "action-button__longtext", domProps: { textContent: t._s(t.text) } })]) : t.isLongText ? n("span", { staticClass: "action-button__longtext", domProps: { textContent: t._s(t.text) } }) : n("span", { staticClass: "action-button__text" }, [t._v(t._s(t.text))]), t.isMenu ? n("ChevronRightIcon", { staticClass: "action-button__menu-icon" }) : t._e(), t._e()], 2)]);
49
+ }, c = [], l = /* @__PURE__ */ s.normalizeComponent(
39
50
  a,
40
- o,
41
51
  i,
52
+ c,
42
53
  !1,
43
54
  null,
44
- "7ad61f44",
55
+ "4ad257bb",
45
56
  null,
46
57
  null
47
58
  );
48
- const l = c.exports;
49
- module.exports = l;
59
+ const r = l.exports;
60
+ module.exports = r;
@@ -1 +1 @@
1
- {"version":3,"file":"NcActionButton.cjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<div style=\"display: flex; align-items: center;\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete and close\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"focusInput\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tCreate\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDisabled button\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t\t<input ref=\"input\" />\n\t\t</div>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete'\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t\tfocusInput() {\n\t\t\t\tthis.$nextTick(() => this.$refs.input.focus())\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text you can specify a name\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete'\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" role=\"presentation\" :class=\"{ 'action--disabled': disabled }\">\n\t\t<button class=\"action-button\"\n\t\t\t:class=\"{ focusable: isFocusable }\"\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:title=\"title\"\n\t\t\trole=\"menuitem\"\n\t\t\ttype=\"button\"\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\t:aria-hidden=\"ariaHidden\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<p v-if=\"name\">\n\t\t\t\t<strong class=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-button__longtext\" v-text=\"text\" />\n\t\t\t</p>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<p v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-button__text\">{{ text }}</span>\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport ActionTextMixin from '../../mixins/actionText.js'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tmixins: [ActionTextMixin],\n\n\tprops: {\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * aria-hidden attribute for the icon slot\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n</style>\n"],"names":["_sfc_main","actionText"],"mappings":";;AAsOA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA,CAAAC,EAAA,eAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AACA,aAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActionButton.cjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete'\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text you can specify a name\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete'\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\">\n\t\t<button class=\"action-button\"\n\t\t\t:class=\"{ focusable: isFocusable }\"\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:title=\"title\"\n\t\t\trole=\"menuitem\"\n\t\t\ttype=\"button\"\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\t:aria-hidden=\"ariaHidden\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span v-if=\"name\"\n\t\t\t\tclass=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-button__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-button__text\">{{ text }}</span>\n\n\t\t\t<!-- right arrow icon when there is a sub-menu -->\n\t\t\t<ChevronRightIcon v-if=\"isMenu\" class=\"action-button__menu-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport ChevronRightIcon from 'vue-material-design-icons/ChevronRight.vue'\nimport ActionTextMixin from '../../mixins/actionText.js'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tChevronRightIcon,\n\t},\n\tmixins: [ActionTextMixin],\n\n\tprops: {\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * aria-hidden attribute for the icon slot\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n</style>\n"],"names":["_sfc_main","ChevronRight","actionText"],"mappings":";;AAqOA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,kBAAAC,EAAA;AAAA,EACA;AAAA,EACA,QAAA,CAAAC,EAAA,eAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AACA,aAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,12 @@
1
- import "../assets/index-becfbea7.css";
2
- import { A as a } from "../chunks/actionText-9f5c55bd.mjs";
3
- import { n as o } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
4
- const s = {
1
+ import "../assets/index-0e9b11c7.css";
2
+ import { C as o } from "../chunks/ChevronRight-1a6a6cf2.mjs";
3
+ import { A as a } from "../chunks/actionText-a64be267.mjs";
4
+ import { n as s } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
5
+ const e = {
5
6
  name: "NcActionButton",
7
+ components: {
8
+ ChevronRightIcon: o
9
+ },
6
10
  mixins: [a],
7
11
  props: {
8
12
  /**
@@ -18,6 +22,14 @@ const s = {
18
22
  ariaHidden: {
19
23
  type: Boolean,
20
24
  default: null
25
+ },
26
+ /**
27
+ * If this is a menu, a chevron icon will
28
+ * be added at the end of the line
29
+ */
30
+ isMenu: {
31
+ type: Boolean,
32
+ default: !1
21
33
  }
22
34
  },
23
35
  computed: {
@@ -31,22 +43,22 @@ const s = {
31
43
  }
32
44
  }
33
45
  };
34
- var e = function() {
46
+ var i = function() {
35
47
  var t = this, n = t._self._c;
36
- return n("li", { staticClass: "action", class: { "action--disabled": t.disabled }, attrs: { role: "presentation" } }, [n("button", { staticClass: "action-button", class: { focusable: t.isFocusable }, attrs: { "aria-label": t.ariaLabel, title: t.title, role: "menuitem", type: "button" }, on: { click: t.onClick } }, [t._t("icon", function() {
48
+ return n("li", { staticClass: "action", class: { "action--disabled": t.disabled } }, [n("button", { staticClass: "action-button", class: { focusable: t.isFocusable }, attrs: { "aria-label": t.ariaLabel, title: t.title, role: "menuitem", type: "button" }, on: { click: t.onClick } }, [t._t("icon", function() {
37
49
  return [n("span", { staticClass: "action-button__icon", class: [t.isIconUrl ? "action-button__icon--url" : t.icon], style: { backgroundImage: t.isIconUrl ? `url(${t.icon})` : null }, attrs: { "aria-hidden": t.ariaHidden } })];
38
- }), t.name ? n("p", [n("strong", { staticClass: "action-button__name" }, [t._v(" " + t._s(t.name) + " ")]), n("br"), n("span", { staticClass: "action-button__longtext", domProps: { textContent: t._s(t.text) } })]) : t.isLongText ? n("p", { staticClass: "action-button__longtext", domProps: { textContent: t._s(t.text) } }) : n("span", { staticClass: "action-button__text" }, [t._v(t._s(t.text))]), t._e()], 2)]);
39
- }, i = [], l = /* @__PURE__ */ o(
40
- s,
50
+ }), t.name ? n("span", { staticClass: "action-button__longtext-wrapper" }, [n("strong", { staticClass: "action-button__name" }, [t._v(" " + t._s(t.name) + " ")]), n("br"), n("span", { staticClass: "action-button__longtext", domProps: { textContent: t._s(t.text) } })]) : t.isLongText ? n("span", { staticClass: "action-button__longtext", domProps: { textContent: t._s(t.text) } }) : n("span", { staticClass: "action-button__text" }, [t._v(t._s(t.text))]), t.isMenu ? n("ChevronRightIcon", { staticClass: "action-button__menu-icon" }) : t._e(), t._e()], 2)]);
51
+ }, c = [], l = /* @__PURE__ */ s(
41
52
  e,
42
53
  i,
54
+ c,
43
55
  !1,
44
56
  null,
45
- "7ad61f44",
57
+ "4ad257bb",
46
58
  null,
47
59
  null
48
60
  );
49
- const d = l.exports;
61
+ const b = l.exports;
50
62
  export {
51
- d as default
63
+ b as default
52
64
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NcActionButton.mjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<div style=\"display: flex; align-items: center;\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete and close\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"focusInput\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tCreate\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDisabled button\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t\t<input ref=\"input\" />\n\t\t</div>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete'\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t\tfocusInput() {\n\t\t\t\tthis.$nextTick(() => this.$refs.input.focus())\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text you can specify a name\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete'\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" role=\"presentation\" :class=\"{ 'action--disabled': disabled }\">\n\t\t<button class=\"action-button\"\n\t\t\t:class=\"{ focusable: isFocusable }\"\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:title=\"title\"\n\t\t\trole=\"menuitem\"\n\t\t\ttype=\"button\"\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\t:aria-hidden=\"ariaHidden\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<p v-if=\"name\">\n\t\t\t\t<strong class=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-button__longtext\" v-text=\"text\" />\n\t\t\t</p>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<p v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-button__text\">{{ text }}</span>\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport ActionTextMixin from '../../mixins/actionText.js'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tmixins: [ActionTextMixin],\n\n\tprops: {\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * aria-hidden attribute for the icon slot\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n</style>\n"],"names":["_sfc_main","ActionTextMixin"],"mappings":";;;AAsOA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AACA,aAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActionButton.mjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete'\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text you can specify a name\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete'\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\">\n\t\t<button class=\"action-button\"\n\t\t\t:class=\"{ focusable: isFocusable }\"\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:title=\"title\"\n\t\t\trole=\"menuitem\"\n\t\t\ttype=\"button\"\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\t:aria-hidden=\"ariaHidden\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span v-if=\"name\"\n\t\t\t\tclass=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-button__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-button__text\">{{ text }}</span>\n\n\t\t\t<!-- right arrow icon when there is a sub-menu -->\n\t\t\t<ChevronRightIcon v-if=\"isMenu\" class=\"action-button__menu-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport ChevronRightIcon from 'vue-material-design-icons/ChevronRight.vue'\nimport ActionTextMixin from '../../mixins/actionText.js'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tChevronRightIcon,\n\t},\n\tmixins: [ActionTextMixin],\n\n\tprops: {\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * aria-hidden attribute for the icon slot\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n</style>\n"],"names":["_sfc_main","ChevronRight","ActionTextMixin"],"mappings":";;;;AAqOA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,kBAAAC;AAAA,EACA;AAAA,EACA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AACA,aAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,10 @@
1
- var h = require("../assets/index-376d2dec.css");
2
- const n = require("./NcDateTimePicker.cjs"), l = require("./NcDateTimePickerNative.cjs"), r = require("./NcPasswordField.cjs"), c = require("./NcSelect.cjs"), o = require("./NcTextField.cjs"), u = require("../chunks/actionGlobal-9e29e11b.cjs"), s = require("../chunks/GenRandomId-c214d235.cjs"), d = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
- const p = {
1
+ var v = require("../assets/index-e7c55791.css");
2
+ const s = require("./NcDateTimePicker.cjs"), n = require("./NcDateTimePickerNative.cjs"), r = require("./NcPasswordField.cjs"), c = require("./NcSelect.cjs"), o = require("./NcTextField.cjs"), u = require("../chunks/actionGlobal-9e29e11b.cjs"), l = require("../chunks/GenRandomId-c214d235.cjs"), d = require("../chunks/l10n-9f3afaf5.cjs"), p = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
3
+ const b = {
4
4
  name: "NcActionInput",
5
5
  components: {
6
- NcDateTimePicker: n,
7
- NcDateTimePickerNative: l,
6
+ NcDateTimePicker: s,
7
+ NcDateTimePickerNative: n,
8
8
  NcPasswordField: r,
9
9
  NcSelect: c,
10
10
  NcTextField: o
@@ -16,7 +16,7 @@ const p = {
16
16
  */
17
17
  id: {
18
18
  type: String,
19
- default: () => "action-" + s.GenRandomId(),
19
+ default: () => "action-" + l.GenRandomId(),
20
20
  validator: (t) => t.trim() !== ""
21
21
  },
22
22
  /**
@@ -24,7 +24,7 @@ const p = {
24
24
  */
25
25
  inputId: {
26
26
  type: String,
27
- default: () => "action-input-" + s.GenRandomId(),
27
+ default: () => "action-input-" + l.GenRandomId(),
28
28
  validator: (t) => t.trim() !== ""
29
29
  },
30
30
  /**
@@ -117,11 +117,18 @@ const p = {
117
117
  default: null
118
118
  },
119
119
  /**
120
- * Attribute forwarded to the underlining NcPasswordField and NcTextField
120
+ * Attribute forwarded to the underlying NcPasswordField and NcTextField
121
121
  */
122
122
  showTrailingButton: {
123
123
  type: Boolean,
124
124
  default: !0
125
+ },
126
+ /**
127
+ * Trailing button label forwarded to the underlying NcTextField
128
+ */
129
+ trailingButtonLabel: {
130
+ type: String,
131
+ default: d.t("Submit")
125
132
  }
126
133
  },
127
134
  emits: [
@@ -192,7 +199,7 @@ const p = {
192
199
  }
193
200
  }
194
201
  };
195
- var b = function() {
202
+ var _ = function() {
196
203
  var e = this, i = e._self._c;
197
204
  return i("li", { staticClass: "action", class: { "action--disabled": e.disabled } }, [i("span", { staticClass: "action-input", class: {
198
205
  "action-input-picker--disabled": e.disabled,
@@ -205,22 +212,20 @@ var b = function() {
205
212
  return e.$emit("input", a);
206
213
  }, change: function(a) {
207
214
  return e.$emit("change", a);
208
- } } }, "NcDateTimePickerNative", e.$attrs, !1)) : e.isMultiselectType ? i("NcSelect", e._g(e._b({ staticClass: "action-input__multi", attrs: { value: e.value, placeholder: e.text, disabled: e.disabled, "append-to-body": !1, "input-class": { focusable: e.isFocusable } } }, "NcSelect", e.$attrs, !1), e.$listeners)) : e.type === "password" ? i("NcPasswordField", e._g(e._b({ attrs: { id: e.inputId, value: e.value, label: e.label, "label-outside": !e.label || e.labelOutside, placeholder: e.text, disabled: e.disabled, "input-class": { focusable: e.isFocusable }, "trailing-button-icon": "arrowRight", "show-trailing-button": e.showTrailingButton && !e.disabled }, on: { "trailing-button-click": function(a) {
209
- return e.$refs.form.requestSubmit();
210
- }, input: e.onInput, change: e.onChange } }, "NcPasswordField", e.$attrs, !1), e.$listeners)) : e.type === "color" ? i("div", { staticClass: "action-input__container" }, [e.label && e.type === "color" ? i("label", { staticClass: "action-input__text-label", class: { "action-input__text-label--hidden": !e.labelOutside }, attrs: { for: e.inputId } }, [e._v(" " + e._s(e.label) + " ")]) : e._e(), i("div", { staticClass: "action-input__input-container" }, [i("NcColorPicker", e._g(e._b({ staticClass: "colorpicker__trigger", attrs: { id: "inputId", value: e.value }, on: { input: e.onInput, submit: function(a) {
215
+ } } }, "NcDateTimePickerNative", e.$attrs, !1)) : e.isMultiselectType ? i("NcSelect", e._g(e._b({ staticClass: "action-input__multi", attrs: { value: e.value, placeholder: e.text, disabled: e.disabled, "append-to-body": !1, "input-class": { focusable: e.isFocusable } } }, "NcSelect", e.$attrs, !1), e.$listeners)) : e.type === "password" ? i("NcPasswordField", e._g(e._b({ attrs: { id: e.inputId, value: e.value, label: e.label, "label-outside": !e.label || e.labelOutside, placeholder: e.text, disabled: e.disabled, "input-class": { focusable: e.isFocusable }, "show-trailing-button": e.showTrailingButton && !e.disabled }, on: { input: e.onInput, change: e.onChange } }, "NcPasswordField", e.$attrs, !1), e.$listeners)) : e.type === "color" ? i("div", { staticClass: "action-input__container" }, [e.label && e.type === "color" ? i("label", { staticClass: "action-input__text-label", class: { "action-input__text-label--hidden": !e.labelOutside }, attrs: { for: e.inputId } }, [e._v(" " + e._s(e.label) + " ")]) : e._e(), i("div", { staticClass: "action-input__input-container" }, [i("NcColorPicker", e._g(e._b({ staticClass: "colorpicker__trigger", attrs: { id: "inputId", value: e.value }, on: { input: e.onInput, submit: function(a) {
211
216
  return e.$refs.form.requestSubmit();
212
- } } }, "NcColorPicker", e.$attrs, !1), e.$listeners), [i("button", { staticClass: "colorpicker__preview", class: { focusable: e.isFocusable }, style: { "background-color": e.value } })])], 1)]) : i("NcTextField", e._g(e._b({ attrs: { id: e.inputId, value: e.value, label: e.label, "label-outside": !e.label || e.labelOutside, placeholder: e.text, disabled: e.disabled, "input-class": { focusable: e.isFocusable }, type: e.type, "trailing-button-icon": "arrowRight", "show-trailing-button": e.showTrailingButton && !e.disabled }, on: { "trailing-button-click": function(a) {
217
+ } } }, "NcColorPicker", e.$attrs, !1), e.$listeners), [i("button", { staticClass: "colorpicker__preview", class: { focusable: e.isFocusable }, style: { "background-color": e.value } })])], 1)]) : i("NcTextField", e._g(e._b({ attrs: { id: e.inputId, value: e.value, label: e.label, "label-outside": !e.label || e.labelOutside, placeholder: e.text, disabled: e.disabled, "input-class": { focusable: e.isFocusable }, type: e.type, "trailing-button-icon": "arrowRight", "trailing-button-label": e.trailingButtonLabel, "show-trailing-button": e.showTrailingButton && !e.disabled }, on: { "trailing-button-click": function(a) {
213
218
  return e.$refs.form.requestSubmit();
214
219
  }, input: e.onInput, change: e.onChange } }, "NcTextField", e.$attrs, !1), e.$listeners))], 1)])])])]);
215
- }, _ = [], m = /* @__PURE__ */ d.normalizeComponent(
216
- p,
220
+ }, m = [], f = /* @__PURE__ */ p.normalizeComponent(
217
221
  b,
218
222
  _,
223
+ m,
219
224
  !1,
220
225
  null,
221
- "444bf7e8",
226
+ "7412a2c7",
222
227
  null,
223
228
  null
224
229
  );
225
- const f = m.exports;
226
- module.exports = f;
230
+ const h = f.exports;
231
+ module.exports = h;
@@ -1 +1 @@
1
- {"version":3,"file":"NcActionInput.cjs","sources":["../../src/components/NcActionInput/NcActionInput.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nAll undocumented attributes will be bound to the input, the datepicker or the select component, e.g. `maxlength`, `not-before`.\nFor the `NcSelect` component, all events will be passed through. Please see the `NcSelect` component's documentation for more details and examples.\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionInput :value.sync=\"text\" :label-outside=\"true\" label=\"Label outside the input\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput :value.sync=\"text\" :show-trailing-button=\"false\" label=\"Input without trailing button\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput :value.sync=\"text\" label=\"Input with placeholder\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis is the placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"password\" :value.sync=\"text\" label=\"Password with visible label\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Key :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPassword placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"password\" :value.sync=\"text\" :show-trailing-button=\"false\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Key :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPassword placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"color\" :value.sync=\"color\" label=\"Favorite color\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Eyedropper :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tColor placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput label=\"Visible label\" :value.sync=\"text\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tInput with visible label\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput :disabled=\"true\" label=\"This is a disabled input\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Close :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"date\" isNativePicker :value=\"new Date()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a date\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"date\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a date\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"multiselect\" :options=\"['Apple', 'Banana', 'Cherry']\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a fruit\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput\n\t\t\t\tv-model=\"multiSelected\"\n\t\t\t\ttype=\"multiselect\"\n\t\t\t\tlabel=\"label\"\n\t\t\t\ttrack-by=\"id\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:options=\"[{label:'Apple', id: 'apple'}, {label:'Banana', id: 'banana'}, {label:'Cherry', id: 'cherry'}]\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a fruit object\n\t\t\t</NcActionInput>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Close from 'vue-material-design-icons/Close'\n\timport Eyedropper from 'vue-material-design-icons/Eyedropper'\n\timport Key from 'vue-material-design-icons/Key'\n\timport Pencil from 'vue-material-design-icons/Pencil'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tClose,\n\t\t\tEyedropper,\n\t\t\tKey,\n\t\t\tPencil,\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tcolor: '#0082C9',\n\t\t\t\ttext: 'This is the input text',\n\t\t\t\tmultiSelected: [],\n\t\t\t}\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\">\n\t\t<span :class=\"{\n\t\t\t\t'action-input-picker--disabled': disabled,\n\t\t\t\t'action-input--visible-label': labelOutside && label,\n\t\t\t}\"\n\t\t\tclass=\"action-input\"\n\t\t\t@mouseleave=\"onLeave\">\n\t\t\t<span class=\"action-input__icon-wrapper\">\n\t\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t\t<slot name=\"icon\">\n\t\t\t\t\t<span :class=\"[isIconUrl ? 'action-input__icon--url' : icon]\"\n\t\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\t\t:aria-hidden=\"ariaHidden\"\n\t\t\t\t\t\tclass=\"action-input__icon\" />\n\t\t\t\t</slot>\n\t\t\t</span>\n\n\t\t\t<!-- form and input -->\n\t\t\t<form ref=\"form\"\n\t\t\t\tclass=\"action-input__form\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@submit.prevent=\"onSubmit\">\n\t\t\t\t<div class=\"action-input__container\">\n\t\t\t\t\t<label v-if=\"label && labelOutside\"\n\t\t\t\t\t\tclass=\"action-input__text-label\"\n\t\t\t\t\t\t:class=\"{ 'action-input__text-label--hidden': !labelOutside}\"\n\t\t\t\t\t\t:for=\"inputId\">\n\t\t\t\t\t\t{{ label }}\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class=\"action-input__input-container\">\n\n\t\t\t\t\t\t<NcDateTimePicker v-if=\"datePickerType\"\n\t\t\t\t\t\t\tref=\"datetimepicker\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\tstyle=\"z-index: 99999999999;\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:type=\"datePickerType\"\n\t\t\t\t\t\t\t:input-class=\"['mx-input', { focusable: isFocusable }]\"\n\t\t\t\t\t\t\tclass=\"action-input__datetimepicker\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t\t\t@change=\"onChange\" />\n\n\t\t\t\t\t\t<NcDateTimePickerNative v-else-if=\"isNativePicker\"\n\t\t\t\t\t\t\t:id=\"idNativeDateTimePicker\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t:type=\"nativeDatePickerType\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\tclass=\"action-input__datetimepicker\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@input=\"$emit('input', $event)\"\n\t\t\t\t\t\t\t@change=\"$emit('change', $event)\" />\n\n\t\t\t\t\t\t<NcSelect v-else-if=\"isMultiselectType\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:append-to-body=\"false\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\tclass=\"action-input__multi\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\tv-on=\"$listeners\" />\n\n\t\t\t\t\t\t<NcPasswordField v-else-if=\"type==='password'\"\n\t\t\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:label-outside=\"!label || labelOutside\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\ttrailing-button-icon=\"arrowRight\"\n\t\t\t\t\t\t\t:show-trailing-button=\"showTrailingButton && !disabled\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t\t\t\t@trailing-button-click=\"$refs.form.requestSubmit()\"\n\t\t\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t\t\t@change=\"onChange\" />\n\n\t\t\t\t\t\t<div v-else-if=\"type === 'color'\" class=\"action-input__container\">\n\t\t\t\t\t\t\t<label v-if=\"label && type === 'color'\"\n\t\t\t\t\t\t\t\tclass=\"action-input__text-label\"\n\t\t\t\t\t\t\t\t:class=\"{ 'action-input__text-label--hidden': !labelOutside}\"\n\t\t\t\t\t\t\t\t:for=\"inputId\">\n\t\t\t\t\t\t\t\t{{ label }}\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<div class=\"action-input__input-container\">\n\t\t\t\t\t\t\t\t<NcColorPicker id=\"inputId\"\n\t\t\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t\t\tclass=\"colorpicker__trigger\"\n\t\t\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t\t\t\t\t@submit=\"$refs.form.requestSubmit()\">\n\t\t\t\t\t\t\t\t\t<button :style=\"{'background-color': value}\"\n\t\t\t\t\t\t\t\t\t\tclass=\"colorpicker__preview\"\n\t\t\t\t\t\t\t\t\t\t:class=\"{ focusable: isFocusable }\" />\n\t\t\t\t\t\t\t\t</NcColorPicker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<NcTextField v-else\n\t\t\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:label-outside=\"!label || labelOutside\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t:type=\"type\"\n\t\t\t\t\t\t\ttrailing-button-icon=\"arrowRight\"\n\t\t\t\t\t\t\t:show-trailing-button=\"showTrailingButton && !disabled\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t\t\t\t@trailing-button-click=\"$refs.form.requestSubmit()\"\n\t\t\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t\t\t@change=\"onChange\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</span>\n\t</li>\n</template>\n\n<script>\nimport NcDateTimePicker from '../NcDateTimePicker/index.js'\nimport NcDateTimePickerNative from '../NcDateTimePickerNative/index.js'\nimport NcPasswordField from '../NcPasswordField/index.js'\nimport NcSelect from '../NcSelect/index.js'\nimport NcTextField from '../NcTextField/index.js'\nimport ActionGlobalMixin from '../../mixins/actionGlobal.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default {\n\tname: 'NcActionInput',\n\n\tcomponents: {\n\t\tNcDateTimePicker,\n\t\tNcDateTimePickerNative,\n\t\tNcPasswordField,\n\t\tNcSelect,\n\t\tNcTextField,\n\t},\n\n\tmixins: [ActionGlobalMixin],\n\n\tprops: {\n\t\t/**\n\t\t * id attribute of the checkbox element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t\t/**\n\t\t * id attribute of the text input element\n\t\t */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-input-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t\t/**\n\t\t * Icon to show with the action, can be either a CSS class or an URL\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * type attribute of the input field\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'text',\n\t\t\tvalidator(type) {\n\t\t\t\treturn ['date', 'datetime-local', 'month', 'multiselect',\n\t\t\t\t\t'number', 'password', 'search', 'tel',\n\t\t\t\t\t'text', 'time', 'url', 'week', 'color',\n\t\t\t\t\t'email'].indexOf(type) > -1\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * id attribute for the native date time picker\n\t\t */\n\t\tidNativeDateTimePicker: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date-time-picker_id',\n\t\t},\n\t\t/**\n\t\t * Flag to use a native date time picker\n\t\t */\n\t\tisNativePicker: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The visible input label for accessibility purposes.\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * If you want to show the label just above the\n\t\t * input field, pass in `true` to this prop.\n\t\t */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * value attribute of the input field\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Date, Number, Array],\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * disabled state of the input field\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * aria-label attribute of the input field\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * aria-hidden attribute for the icon slot\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Attribute forwarded to the underlining NcPasswordField and NcTextField\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: [\n\t\t'input',\n\t\t'submit',\n\t\t'change',\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tisIconUrl() {\n\t\t\ttry {\n\t\t\t\treturn new URL(this.icon)\n\t\t\t} catch (error) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\tisMultiselectType() {\n\t\t\treturn this.type === 'multiselect'\n\t\t},\n\n\t\tnativeDatePickerType() {\n\t\t\tswitch (this.type) {\n\t\t\tcase 'date':\n\t\t\tcase 'month':\n\t\t\tcase 'time':\n\t\t\tcase 'week':\n\t\t\tcase 'datetime-local':\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\tdatePickerType() {\n\t\t\tif (!this.isNativePicker) {\n\t\t\t\tswitch (this.type) {\n\t\t\t\tcase 'date':\n\t\t\t\tcase 'month':\n\t\t\t\tcase 'time':\n\t\t\t\t\treturn this.type\n\n\t\t\t\tcase 'datetime-local':\n\t\t\t\t\treturn 'datetime'\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\t},\n\n\tmethods: {\n\t\t// closing datepicker popup on mouseleave = unfocus\n\t\tonLeave() {\n\t\t\tif (this.$refs.datetimepicker && this.$refs.datetimepicker.$refs.datepicker) {\n\t\t\t\tthis.$refs.datetimepicker.$refs.datepicker.closePopup()\n\t\t\t}\n\t\t},\n\t\tonInput(event) {\n\t\t\t/**\n\t\t\t * Emitted on input events of the text field\n\t\t\t *\n\t\t\t * @type {Event|Date}\n\t\t\t */\n\t\t\tthis.$emit('input', event)\n\t\t\t/**\n\t\t\t * Emitted when the inputs value changes\n\t\t\t * ! DatetimePicker only send the value\n\t\t\t *\n\t\t\t * @type {string|Date}\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target ? event.target.value : event)\n\t\t},\n\t\tonSubmit(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t} else {\n\t\t\t\t// ignore submit\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted on change of the input field\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/inputs';\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n\n$input-margin: 4px;\n\n.action-input {\n\tdisplay: flex;\n\talign-items: flex-start;\n\n\twidth: 100%;\n\theight: auto;\n\tmargin: 0;\n\tpadding: 0;\n\n\tcursor: pointer;\n\twhite-space: nowrap;\n\n\tcolor: var(--color-main-text);\n\tborder: 0;\n\tborder-radius: 0; // otherwise Safari will cut the border-radius area\n\tbackground-color: transparent;\n\tbox-shadow: none;\n\n\tfont-weight: normal;\n\n\t&__icon-wrapper {\n\t\tdisplay: flex;\n\t\talign-self: center;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\t&:deep(.material-design-icon) {\n\t\t\twidth: $clickable-area;\n\t\t\theight: $clickable-area;\n\t\t\topacity: $opacity_full;\n\n\t\t\t.material-design-icon__svg {\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > span {\n\t\tcursor: pointer;\n\t\twhite-space: nowrap;\n\t}\n\n\t&__icon {\n\t\tmin-width: 0; /* Overwrite icons*/\n\t\tmin-height: 0;\n\t\t/* Keep padding to define the width to\n\t\t\tassure correct position of a possible text */\n\t\tpadding: #{math.div($clickable-area, 2)} 0 #{math.div($clickable-area, 2)} $clickable-area;\n\n\t\tbackground-position: #{$icon-margin} center;\n\t\tbackground-size: $icon-size;\n\t}\n\n\t// Forms & text inputs\n\t&__form {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex: 1 1 auto;\n\n\t\tmargin: $input-margin 0;\n\t\tpadding-right: $icon-margin;\n\t}\n\n\t&__container {\n\t\twidth: 100%;\n\t}\n\n\t&__input-container {\n\t\tdisplay: flex;\n\n\t\t.colorpicker {\n\t\t\t&__trigger,\n\t\t\t&__preview {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t&__preview {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 36px;\n\t\t\t\tborder-radius: var(--border-radius-large);\n\t\t\t\tborder: 2px solid var(--color-border-maxcontrast);\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__text-label {\n\t\tpadding: 4px 0;\n\t\tdisplay: block;\n\n\t\t&--hidden {\n\t\t\tposition: absolute;\n\t\t\tleft: -10000px;\n\t\t\ttop: auto;\n\t\t\twidth: 1px;\n\t\t\theight: 1px;\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t&__datetimepicker {\n\t\twidth: 100%;\n\n\t\t:deep(.mx-input) {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t&__multi {\n\t\twidth: 100%;\n\t}\n}\n\n// if a form is the last of the list\n// add the same bottomMargin as the right padding\n// for visual balance\nli:last-child > .action-input {\n\tpadding-bottom: $icon-margin - $input-margin;\n}\n\n// same for first item\nli:first-child > .action-input:not(.action-input--visible-label) {\n\tpadding-top: $icon-margin - $input-margin;\n}\n\n</style>\n"],"names":["_sfc_main","Components_NcDateTimePicker","Components_NcDateTimePickerNative","Components_NcPasswordField","Components_NcSelect","Components_NcTextField","actionGlobal","GenRandomId","id","type","event"],"mappings":";;AA+QA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,kBAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,EAAA,iBAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,YAAAC,EAAA,YAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,kBAAAD,EAAA,YAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,EAAA,KAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAAC,GAAA;AACA,eAAA;AAAA,UAAA;AAAA,UAAA;AAAA,UAAA;AAAA,UAAA;AAAA,UACA;AAAA,UAAA;AAAA,UAAA;AAAA,UAAA;AAAA,UACA;AAAA,UAAA;AAAA,UAAA;AAAA,UAAA;AAAA,UAAA;AAAA,UACA;AAAA,QAAA,EAAA,QAAAA,CAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA,QAAA,KAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,YAAA;AACA,UAAA;AACA,eAAA,IAAA,IAAA,KAAA,IAAA;AAAA,MACA,QAAA;AACA,eAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,oBAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA,IAEA,uBAAA;AACA,cAAA,KAAA,MAAA;AAAA,QACA,KAAA;AAAA,QACA,KAAA;AAAA,QACA,KAAA;AAAA,QACA,KAAA;AAAA,QACA,KAAA;AACA,iBAAA,KAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,UAAA,CAAA,KAAA;AACA,gBAAA,KAAA,MAAA;AAAA,UACA,KAAA;AAAA,UACA,KAAA;AAAA,UACA,KAAA;AACA,mBAAA,KAAA;AAAA,UAEA,KAAA;AACA,mBAAA;AAAA,QACA;AAEA,aAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AACA,aAAA,CAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA,IAEA,UAAA;AACA,MAAA,KAAA,MAAA,kBAAA,KAAA,MAAA,eAAA,MAAA,cACA,KAAA,MAAA,eAAA,MAAA,WAAA,WAAA;AAAA,IAEA;AAAA,IACA,QAAAC,GAAA;AAMA,WAAA,MAAA,SAAAA,CAAA,GAOA,KAAA,MAAA,gBAAAA,EAAA,SAAAA,EAAA,OAAA,QAAAA,CAAA;AAAA,IACA;AAAA,IACA,SAAAA,GAAA;AAGA,UAFAA,EAAA,eAAA,GACAA,EAAA,gBAAA,GACA,CAAA,KAAA;AAMA,aAAA,MAAA,UAAAA,CAAA;AAAA;AAGA,eAAA;AAAA,IAEA;AAAA,IACA,SAAAA,GAAA;AAMA,WAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActionInput.cjs","sources":["../../src/components/NcActionInput/NcActionInput.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\nIt is recommended to not only provide a placeholder, but also a label.\nThe label should describe what input is expected and the placehold what format the input should have.\n\nAll undocumented attributes will be bound to the input, the datepicker or the select component, e.g. `maxlength`, `not-before`.\nFor the `NcSelect` component, all events will be passed through. Please see the `NcSelect` component's documentation for more details and examples.\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionInput :value.sync=\"text\" :label-outside=\"true\" label=\"Label outside the input\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput :value.sync=\"text\" :show-trailing-button=\"false\" label=\"Input without trailing button\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput :value.sync=\"text\" label=\"Input with placeholder\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis is the placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"password\" :value.sync=\"text\" label=\"Password with visible label\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Key :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPassword placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"password\" :value.sync=\"text\" :show-trailing-button=\"false\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Key :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPassword placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"color\" :value.sync=\"color\" label=\"Favorite color\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Eyedropper :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tColor placeholder\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput label=\"Visible label\" :value.sync=\"text\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tInput with visible label\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput :disabled=\"true\" label=\"This is a disabled input\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Close :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"date\" isNativePicker :value=\"new Date()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a date\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"date\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a date\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput type=\"multiselect\" :options=\"['Apple', 'Banana', 'Cherry']\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a fruit\n\t\t\t</NcActionInput>\n\t\t\t<NcActionInput\n\t\t\t\tv-model=\"multiSelected\"\n\t\t\t\ttype=\"multiselect\"\n\t\t\t\tlabel=\"label\"\n\t\t\t\ttrack-by=\"id\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:options=\"[{label:'Apple', id: 'apple'}, {label:'Banana', id: 'banana'}, {label:'Cherry', id: 'cherry'}]\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPlease pick a fruit object\n\t\t\t</NcActionInput>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Close from 'vue-material-design-icons/Close'\n\timport Eyedropper from 'vue-material-design-icons/Eyedropper'\n\timport Key from 'vue-material-design-icons/Key'\n\timport Pencil from 'vue-material-design-icons/Pencil'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tClose,\n\t\t\tEyedropper,\n\t\t\tKey,\n\t\t\tPencil,\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tcolor: '#0082C9',\n\t\t\t\ttext: 'This is the input text',\n\t\t\t\tmultiSelected: [],\n\t\t\t}\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\">\n\t\t<span :class=\"{\n\t\t\t\t'action-input-picker--disabled': disabled,\n\t\t\t\t'action-input--visible-label': labelOutside && label,\n\t\t\t}\"\n\t\t\tclass=\"action-input\"\n\t\t\t@mouseleave=\"onLeave\">\n\t\t\t<span class=\"action-input__icon-wrapper\">\n\t\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t\t<slot name=\"icon\">\n\t\t\t\t\t<span :class=\"[isIconUrl ? 'action-input__icon--url' : icon]\"\n\t\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\t\t:aria-hidden=\"ariaHidden\"\n\t\t\t\t\t\tclass=\"action-input__icon\" />\n\t\t\t\t</slot>\n\t\t\t</span>\n\n\t\t\t<!-- form and input -->\n\t\t\t<form ref=\"form\"\n\t\t\t\tclass=\"action-input__form\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t@submit.prevent=\"onSubmit\">\n\t\t\t\t<div class=\"action-input__container\">\n\t\t\t\t\t<label v-if=\"label && labelOutside\"\n\t\t\t\t\t\tclass=\"action-input__text-label\"\n\t\t\t\t\t\t:class=\"{ 'action-input__text-label--hidden': !labelOutside}\"\n\t\t\t\t\t\t:for=\"inputId\">\n\t\t\t\t\t\t{{ label }}\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class=\"action-input__input-container\">\n\n\t\t\t\t\t\t<NcDateTimePicker v-if=\"datePickerType\"\n\t\t\t\t\t\t\tref=\"datetimepicker\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\tstyle=\"z-index: 99999999999;\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:type=\"datePickerType\"\n\t\t\t\t\t\t\t:input-class=\"['mx-input', { focusable: isFocusable }]\"\n\t\t\t\t\t\t\tclass=\"action-input__datetimepicker\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t\t\t@change=\"onChange\" />\n\n\t\t\t\t\t\t<NcDateTimePickerNative v-else-if=\"isNativePicker\"\n\t\t\t\t\t\t\t:id=\"idNativeDateTimePicker\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t:type=\"nativeDatePickerType\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\tclass=\"action-input__datetimepicker\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t@input=\"$emit('input', $event)\"\n\t\t\t\t\t\t\t@change=\"$emit('change', $event)\" />\n\n\t\t\t\t\t\t<NcSelect v-else-if=\"isMultiselectType\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:append-to-body=\"false\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\tclass=\"action-input__multi\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\tv-on=\"$listeners\" />\n\n\t\t\t\t\t\t<NcPasswordField v-else-if=\"type==='password'\"\n\t\t\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:label-outside=\"!label || labelOutside\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t:show-trailing-button=\"showTrailingButton && !disabled\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t\t\t@change=\"onChange\" />\n\n\t\t\t\t\t\t<div v-else-if=\"type === 'color'\" class=\"action-input__container\">\n\t\t\t\t\t\t\t<label v-if=\"label && type === 'color'\"\n\t\t\t\t\t\t\t\tclass=\"action-input__text-label\"\n\t\t\t\t\t\t\t\t:class=\"{ 'action-input__text-label--hidden': !labelOutside}\"\n\t\t\t\t\t\t\t\t:for=\"inputId\">\n\t\t\t\t\t\t\t\t{{ label }}\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<div class=\"action-input__input-container\">\n\t\t\t\t\t\t\t\t<NcColorPicker id=\"inputId\"\n\t\t\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t\t\tclass=\"colorpicker__trigger\"\n\t\t\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t\t\t\t\t@submit=\"$refs.form.requestSubmit()\">\n\t\t\t\t\t\t\t\t\t<button :style=\"{'background-color': value}\"\n\t\t\t\t\t\t\t\t\t\tclass=\"colorpicker__preview\"\n\t\t\t\t\t\t\t\t\t\t:class=\"{ focusable: isFocusable }\" />\n\t\t\t\t\t\t\t\t</NcColorPicker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<NcTextField v-else\n\t\t\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\t\t\t:value=\"value\"\n\t\t\t\t\t\t\t:label=\"label\"\n\t\t\t\t\t\t\t:label-outside=\"!label || labelOutside\"\n\t\t\t\t\t\t\t:placeholder=\"text\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\t:input-class=\"{ focusable: isFocusable }\"\n\t\t\t\t\t\t\t:type=\"type\"\n\t\t\t\t\t\t\ttrailing-button-icon=\"arrowRight\"\n\t\t\t\t\t\t\t:trailing-button-label=\"trailingButtonLabel\"\n\t\t\t\t\t\t\t:show-trailing-button=\"showTrailingButton && !disabled\"\n\t\t\t\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t\t\t\tv-on=\"$listeners\"\n\t\t\t\t\t\t\t@trailing-button-click=\"$refs.form.requestSubmit()\"\n\t\t\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t\t\t@change=\"onChange\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</span>\n\t</li>\n</template>\n\n<script>\nimport NcDateTimePicker from '../NcDateTimePicker/index.js'\nimport NcDateTimePickerNative from '../NcDateTimePickerNative/index.js'\nimport NcPasswordField from '../NcPasswordField/index.js'\nimport NcSelect from '../NcSelect/index.js'\nimport NcTextField from '../NcTextField/index.js'\nimport ActionGlobalMixin from '../../mixins/actionGlobal.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcActionInput',\n\n\tcomponents: {\n\t\tNcDateTimePicker,\n\t\tNcDateTimePickerNative,\n\t\tNcPasswordField,\n\t\tNcSelect,\n\t\tNcTextField,\n\t},\n\n\tmixins: [ActionGlobalMixin],\n\n\tprops: {\n\t\t/**\n\t\t * id attribute of the checkbox element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t\t/**\n\t\t * id attribute of the text input element\n\t\t */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: () => 'action-input-' + GenRandomId(),\n\t\t\tvalidator: id => id.trim() !== '',\n\t\t},\n\t\t/**\n\t\t * Icon to show with the action, can be either a CSS class or an URL\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * type attribute of the input field\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'text',\n\t\t\tvalidator(type) {\n\t\t\t\treturn ['date', 'datetime-local', 'month', 'multiselect',\n\t\t\t\t\t'number', 'password', 'search', 'tel',\n\t\t\t\t\t'text', 'time', 'url', 'week', 'color',\n\t\t\t\t\t'email'].indexOf(type) > -1\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * id attribute for the native date time picker\n\t\t */\n\t\tidNativeDateTimePicker: {\n\t\t\ttype: String,\n\t\t\tdefault: 'date-time-picker_id',\n\t\t},\n\t\t/**\n\t\t * Flag to use a native date time picker\n\t\t */\n\t\tisNativePicker: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The visible input label for accessibility purposes.\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * If you want to show the label just above the\n\t\t * input field, pass in `true` to this prop.\n\t\t */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * value attribute of the input field\n\t\t */\n\t\tvalue: {\n\t\t\ttype: [String, Date, Number, Array],\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * disabled state of the input field\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * aria-label attribute of the input field\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * aria-hidden attribute for the icon slot\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * Attribute forwarded to the underlying NcPasswordField and NcTextField\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * Trailing button label forwarded to the underlying NcTextField\n\t\t */\n\t\ttrailingButtonLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Submit'),\n\t\t},\n\t},\n\n\temits: [\n\t\t'input',\n\t\t'submit',\n\t\t'change',\n\t\t'update:value',\n\t],\n\n\tcomputed: {\n\t\tisIconUrl() {\n\t\t\ttry {\n\t\t\t\treturn new URL(this.icon)\n\t\t\t} catch (error) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\tisMultiselectType() {\n\t\t\treturn this.type === 'multiselect'\n\t\t},\n\n\t\tnativeDatePickerType() {\n\t\t\tswitch (this.type) {\n\t\t\tcase 'date':\n\t\t\tcase 'month':\n\t\t\tcase 'time':\n\t\t\tcase 'week':\n\t\t\tcase 'datetime-local':\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\tdatePickerType() {\n\t\t\tif (!this.isNativePicker) {\n\t\t\t\tswitch (this.type) {\n\t\t\t\tcase 'date':\n\t\t\t\tcase 'month':\n\t\t\t\tcase 'time':\n\t\t\t\t\treturn this.type\n\n\t\t\t\tcase 'datetime-local':\n\t\t\t\t\treturn 'datetime'\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\t},\n\n\tmethods: {\n\t\t// closing datepicker popup on mouseleave = unfocus\n\t\tonLeave() {\n\t\t\tif (this.$refs.datetimepicker && this.$refs.datetimepicker.$refs.datepicker) {\n\t\t\t\tthis.$refs.datetimepicker.$refs.datepicker.closePopup()\n\t\t\t}\n\t\t},\n\t\tonInput(event) {\n\t\t\t/**\n\t\t\t * Emitted on input events of the text field\n\t\t\t *\n\t\t\t * @type {Event|Date}\n\t\t\t */\n\t\t\tthis.$emit('input', event)\n\t\t\t/**\n\t\t\t * Emitted when the inputs value changes\n\t\t\t * ! DatetimePicker only send the value\n\t\t\t *\n\t\t\t * @type {string|Date}\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target ? event.target.value : event)\n\t\t},\n\t\tonSubmit(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tif (!this.disabled) {\n\t\t\t\t/**\n\t\t\t\t * Emitted on submit of the input field\n\t\t\t\t *\n\t\t\t\t * @type {Event}\n\t\t\t\t */\n\t\t\t\tthis.$emit('submit', event)\n\t\t\t} else {\n\t\t\t\t// ignore submit\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\t\tonChange(event) {\n\t\t\t/**\n\t\t\t * Emitted on change of the input field\n\t\t\t *\n\t\t\t * @type {Event}\n\t\t\t */\n\t\t\tthis.$emit('change', event)\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/inputs';\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n\n$input-margin: 4px;\n\n.action-input {\n\tdisplay: flex;\n\talign-items: flex-start;\n\n\twidth: 100%;\n\theight: auto;\n\tmargin: 0;\n\tpadding: 0;\n\n\tcursor: pointer;\n\twhite-space: nowrap;\n\n\tcolor: var(--color-main-text);\n\tborder: 0;\n\tborder-radius: 0; // otherwise Safari will cut the border-radius area\n\tbackground-color: transparent;\n\tbox-shadow: none;\n\n\tfont-weight: normal;\n\n\t&__icon-wrapper {\n\t\tdisplay: flex;\n\t\talign-self: center;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\t&:deep(.material-design-icon) {\n\t\t\twidth: $clickable-area;\n\t\t\theight: $clickable-area;\n\t\t\topacity: $opacity_full;\n\n\t\t\t.material-design-icon__svg {\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > span {\n\t\tcursor: pointer;\n\t\twhite-space: nowrap;\n\t}\n\n\t&__icon {\n\t\tmin-width: 0; /* Overwrite icons*/\n\t\tmin-height: 0;\n\t\t/* Keep padding to define the width to\n\t\t\tassure correct position of a possible text */\n\t\tpadding: #{math.div($clickable-area, 2)} 0 #{math.div($clickable-area, 2)} $clickable-area;\n\n\t\tbackground-position: #{$icon-margin} center;\n\t\tbackground-size: $icon-size;\n\t}\n\n\t// Forms & text inputs\n\t&__form {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex: 1 1 auto;\n\n\t\tmargin: $input-margin 0;\n\t\tpadding-right: $icon-margin;\n\t}\n\n\t&__container {\n\t\twidth: 100%;\n\t}\n\n\t&__input-container {\n\t\tdisplay: flex;\n\n\t\t.colorpicker {\n\t\t\t&__trigger,\n\t\t\t&__preview {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t&__preview {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 36px;\n\t\t\t\tborder-radius: var(--border-radius-large);\n\t\t\t\tborder: 2px solid var(--color-border-maxcontrast);\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__text-label {\n\t\tpadding: 4px 0;\n\t\tdisplay: block;\n\n\t\t&--hidden {\n\t\t\tposition: absolute;\n\t\t\tleft: -10000px;\n\t\t\ttop: auto;\n\t\t\twidth: 1px;\n\t\t\theight: 1px;\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t&__datetimepicker {\n\t\twidth: 100%;\n\n\t\t:deep(.mx-input) {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t&__multi {\n\t\twidth: 100%;\n\t}\n}\n\n// if a form is the last of the list\n// add the same bottomMargin as the right padding\n// for visual balance\nli:last-child > .action-input {\n\tpadding-bottom: $icon-margin - $input-margin;\n}\n\n// same for first item\nli:first-child > .action-input:not(.action-input--visible-label) {\n\tpadding-top: $icon-margin - $input-margin;\n}\n\n</style>\n"],"names":["_sfc_main","Components_NcDateTimePicker","Components_NcDateTimePickerNative","Components_NcPasswordField","Components_NcSelect","Components_NcTextField","actionGlobal","GenRandomId","id","type","l10n","event"],"mappings":"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"}