@nextcloud/vue 8.1.0 → 8.2.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 (215) hide show
  1. package/CHANGELOG.md +33 -5
  2. package/dist/Components/NcActionButton.cjs +16 -8
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +21 -13
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionButtonGroup.cjs +22 -11
  7. package/dist/Components/NcActionButtonGroup.cjs.map +1 -1
  8. package/dist/Components/NcActionButtonGroup.mjs +19 -7
  9. package/dist/Components/NcActionButtonGroup.mjs.map +1 -1
  10. package/dist/Components/NcActionCaption.cjs +17 -11
  11. package/dist/Components/NcActionCaption.cjs.map +1 -1
  12. package/dist/Components/NcActionCaption.mjs +14 -8
  13. package/dist/Components/NcActionCaption.mjs.map +1 -1
  14. package/dist/Components/NcActionCheckbox.cjs +26 -11
  15. package/dist/Components/NcActionCheckbox.cjs.map +1 -1
  16. package/dist/Components/NcActionCheckbox.mjs +26 -11
  17. package/dist/Components/NcActionCheckbox.mjs.map +1 -1
  18. package/dist/Components/NcActionInput.cjs +7 -5
  19. package/dist/Components/NcActionInput.cjs.map +1 -1
  20. package/dist/Components/NcActionInput.mjs +11 -9
  21. package/dist/Components/NcActionInput.mjs.map +1 -1
  22. package/dist/Components/NcActionLink.cjs +14 -6
  23. package/dist/Components/NcActionLink.cjs.map +1 -1
  24. package/dist/Components/NcActionLink.mjs +19 -11
  25. package/dist/Components/NcActionLink.mjs.map +1 -1
  26. package/dist/Components/NcActionRadio.cjs +29 -14
  27. package/dist/Components/NcActionRadio.cjs.map +1 -1
  28. package/dist/Components/NcActionRadio.mjs +26 -11
  29. package/dist/Components/NcActionRadio.mjs.map +1 -1
  30. package/dist/Components/NcActionRouter.cjs +14 -8
  31. package/dist/Components/NcActionRouter.cjs.map +1 -1
  32. package/dist/Components/NcActionRouter.mjs +17 -11
  33. package/dist/Components/NcActionRouter.mjs.map +1 -1
  34. package/dist/Components/NcActionSeparator.cjs +10 -10
  35. package/dist/Components/NcActionSeparator.cjs.map +1 -1
  36. package/dist/Components/NcActionSeparator.mjs +11 -11
  37. package/dist/Components/NcActionSeparator.mjs.map +1 -1
  38. package/dist/Components/NcActionText.cjs +15 -9
  39. package/dist/Components/NcActionText.cjs.map +1 -1
  40. package/dist/Components/NcActionText.mjs +20 -14
  41. package/dist/Components/NcActionText.mjs.map +1 -1
  42. package/dist/Components/NcActionTextEditable.cjs +1 -1
  43. package/dist/Components/NcActionTextEditable.mjs +1 -1
  44. package/dist/Components/NcActions.cjs +100 -79
  45. package/dist/Components/NcActions.cjs.map +1 -1
  46. package/dist/Components/NcActions.mjs +103 -82
  47. package/dist/Components/NcActions.mjs.map +1 -1
  48. package/dist/Components/NcAppContent.cjs +1 -1
  49. package/dist/Components/NcAppContent.mjs +1 -1
  50. package/dist/Components/NcAppNavigation.cjs +1 -1
  51. package/dist/Components/NcAppNavigation.mjs +1 -1
  52. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  53. package/dist/Components/NcAppNavigationItem.mjs +2 -2
  54. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  55. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  56. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  57. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  58. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  59. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  60. package/dist/Components/NcAppSettingsDialog.cjs +39 -39
  61. package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
  62. package/dist/Components/NcAppSettingsDialog.mjs +59 -58
  63. package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
  64. package/dist/Components/NcAppSidebar.cjs +3 -3
  65. package/dist/Components/NcAppSidebar.cjs.map +1 -1
  66. package/dist/Components/NcAppSidebar.mjs +3 -3
  67. package/dist/Components/NcAppSidebar.mjs.map +1 -1
  68. package/dist/Components/NcAvatar.cjs +1 -1
  69. package/dist/Components/NcAvatar.mjs +1 -1
  70. package/dist/Components/NcButton.cjs +6 -4
  71. package/dist/Components/NcButton.cjs.map +1 -1
  72. package/dist/Components/NcButton.mjs +11 -9
  73. package/dist/Components/NcButton.mjs.map +1 -1
  74. package/dist/Components/NcCheckboxRadioSwitch.cjs +3 -3
  75. package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
  76. package/dist/Components/NcCheckboxRadioSwitch.mjs +3 -3
  77. package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
  78. package/dist/Components/NcColorPicker.cjs +48 -31
  79. package/dist/Components/NcColorPicker.cjs.map +1 -1
  80. package/dist/Components/NcColorPicker.mjs +56 -38
  81. package/dist/Components/NcColorPicker.mjs.map +1 -1
  82. package/dist/Components/NcDashboardWidget.cjs +1 -1
  83. package/dist/Components/NcDashboardWidget.mjs +2 -2
  84. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  85. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  86. package/dist/Components/NcDateTime.cjs +17 -14
  87. package/dist/Components/NcDateTime.cjs.map +1 -1
  88. package/dist/Components/NcDateTime.mjs +18 -15
  89. package/dist/Components/NcDateTime.mjs.map +1 -1
  90. package/dist/Components/NcDateTimePicker.cjs +2 -2
  91. package/dist/Components/NcDateTimePicker.mjs +4 -4
  92. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  93. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  94. package/dist/Components/NcEmojiPicker.cjs +1 -1
  95. package/dist/Components/NcEmojiPicker.mjs +1 -1
  96. package/dist/Components/NcListItem.cjs +1 -1
  97. package/dist/Components/NcListItem.mjs +1 -1
  98. package/dist/Components/NcListItemIcon.cjs +1 -1
  99. package/dist/Components/NcListItemIcon.mjs +1 -1
  100. package/dist/Components/NcModal.cjs +1 -1
  101. package/dist/Components/NcModal.mjs +3 -3
  102. package/dist/Components/NcPasswordField.cjs +1 -1
  103. package/dist/Components/NcPasswordField.mjs +1 -1
  104. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  105. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  106. package/dist/Components/NcRichContenteditable.cjs +5 -5
  107. package/dist/Components/NcRichContenteditable.cjs.map +1 -1
  108. package/dist/Components/NcRichContenteditable.mjs +5 -5
  109. package/dist/Components/NcRichContenteditable.mjs.map +1 -1
  110. package/dist/Components/NcRichText.cjs +1 -1
  111. package/dist/Components/NcRichText.mjs +3 -3
  112. package/dist/Components/NcSelect.cjs +1 -1
  113. package/dist/Components/NcSelect.mjs +2 -2
  114. package/dist/Components/NcSelectTags.cjs +1 -1
  115. package/dist/Components/NcSelectTags.mjs +1 -1
  116. package/dist/Components/NcSettingsInputText.cjs +1 -1
  117. package/dist/Components/NcSettingsInputText.mjs +1 -1
  118. package/dist/Components/NcSettingsSection.cjs +1 -1
  119. package/dist/Components/NcSettingsSection.mjs +1 -1
  120. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  121. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  122. package/dist/Components/NcTextArea.cjs +5 -5
  123. package/dist/Components/NcTextArea.cjs.map +1 -1
  124. package/dist/Components/NcTextArea.mjs +4 -4
  125. package/dist/Components/NcTextArea.mjs.map +1 -1
  126. package/dist/Components/NcTextField.cjs +1 -1
  127. package/dist/Components/NcTextField.mjs +1 -1
  128. package/dist/Components/NcTimezonePicker.cjs +1 -1
  129. package/dist/Components/NcTimezonePicker.mjs +1 -1
  130. package/dist/Components/NcUserBubble.cjs +1 -1
  131. package/dist/Components/NcUserBubble.mjs +1 -1
  132. package/dist/Composables/useIsFullscreen.cjs +1 -2
  133. package/dist/Composables/useIsFullscreen.cjs.map +1 -1
  134. package/dist/Composables/useIsFullscreen.mjs +1 -2
  135. package/dist/Composables/useIsFullscreen.mjs.map +1 -1
  136. package/dist/Functions/usernameToColor.cjs +1 -1
  137. package/dist/Functions/usernameToColor.mjs +1 -1
  138. package/dist/assets/{NcSettingsSelectGroup-0d38d76b.css → NcSettingsSelectGroup-6ddb63a6.css} +2 -2
  139. package/dist/assets/{index-d3702c91.css → index-00012a4c.css} +18 -18
  140. package/dist/assets/{index-8f52a20f.css → index-018895f7.css} +2 -2
  141. package/dist/assets/{index-6899d75b.css → index-30ca9574.css} +31 -30
  142. package/dist/assets/{index-2e31f707.css → index-3d1ccc15.css} +29 -29
  143. package/dist/assets/{index-441b6552.css → index-418d4e87.css} +2 -2
  144. package/dist/assets/{index-05760fea.css → index-4ba699a1.css} +12 -12
  145. package/dist/assets/{index-9ca89b81.css → index-51c1f2a9.css} +15 -11
  146. package/dist/assets/{index-24f6c355.css → index-542cf50a.css} +12 -12
  147. package/dist/assets/{index-dce4b705.css → index-5c74e333.css} +10 -10
  148. package/dist/assets/{index-802d2118.css → index-7fac55ed.css} +16 -16
  149. package/dist/assets/{index-e7c55791.css → index-9020d9ca.css} +67 -67
  150. package/dist/assets/{index-4ef32afd.css → index-a9d1ad5c.css} +26 -23
  151. package/dist/assets/{index-55600948.css → index-d1c0876d.css} +11 -11
  152. package/dist/assets/{index-fbc0b606.css → index-db846386.css} +10 -9
  153. package/dist/assets/{index-baf8711a.css → index-e0e6bab6.css} +12 -12
  154. package/dist/assets/{index-0e9b11c7.css → index-e9fce208.css} +16 -16
  155. package/dist/assets/{index-d812ed9e.css → index-f091e784.css} +43 -43
  156. package/dist/assets/{index-d9ae9479.css → index-ffa6d11c.css} +7 -7
  157. package/dist/chunks/GenColors-02173e2c.mjs +56 -0
  158. package/dist/chunks/GenColors-02173e2c.mjs.map +1 -0
  159. package/dist/chunks/GenColors-4314c256.cjs +55 -0
  160. package/dist/chunks/GenColors-4314c256.cjs.map +1 -0
  161. package/dist/chunks/{NcAppNavigationToggle-d248cb09.cjs → NcAppNavigationToggle-1301e882.cjs} +1 -1
  162. package/dist/chunks/{NcAppNavigationToggle-d248cb09.cjs.map → NcAppNavigationToggle-1301e882.cjs.map} +1 -1
  163. package/dist/chunks/{NcAppNavigationToggle-a031dce0.mjs → NcAppNavigationToggle-2574bba5.mjs} +1 -1
  164. package/dist/chunks/{NcAppNavigationToggle-a031dce0.mjs.map → NcAppNavigationToggle-2574bba5.mjs.map} +1 -1
  165. package/dist/chunks/{NcInputConfirmCancel-00bdeac7.cjs → NcInputConfirmCancel-9906b563.cjs} +1 -1
  166. package/dist/chunks/{NcInputConfirmCancel-00bdeac7.cjs.map → NcInputConfirmCancel-9906b563.cjs.map} +1 -1
  167. package/dist/chunks/{NcInputConfirmCancel-40ea7cd1.mjs → NcInputConfirmCancel-a612e6a3.mjs} +1 -1
  168. package/dist/chunks/{NcInputConfirmCancel-40ea7cd1.mjs.map → NcInputConfirmCancel-a612e6a3.mjs.map} +1 -1
  169. package/dist/chunks/{NcRichText-89373b11.cjs → NcRichText-9f77a9c6.cjs} +1 -1
  170. package/dist/chunks/{NcRichText-89373b11.cjs.map → NcRichText-9f77a9c6.cjs.map} +1 -1
  171. package/dist/chunks/{NcRichText-e2026b55.mjs → NcRichText-f5cfcd57.mjs} +1 -1
  172. package/dist/chunks/{NcRichText-e2026b55.mjs.map → NcRichText-f5cfcd57.mjs.map} +1 -1
  173. package/dist/chunks/{NcSettingsSelectGroup-b49652df.mjs → NcSettingsSelectGroup-091c0306.mjs} +12 -12
  174. package/dist/chunks/NcSettingsSelectGroup-091c0306.mjs.map +1 -0
  175. package/dist/chunks/{NcSettingsSelectGroup-fad68876.cjs → NcSettingsSelectGroup-0f71fef4.cjs} +12 -12
  176. package/dist/chunks/NcSettingsSelectGroup-0f71fef4.cjs.map +1 -0
  177. package/dist/chunks/{ScopeComponent-a06864ef.mjs → ScopeComponent-3ea00dcd.mjs} +1 -1
  178. package/dist/chunks/{ScopeComponent-a06864ef.mjs.map → ScopeComponent-3ea00dcd.mjs.map} +1 -1
  179. package/dist/chunks/{ScopeComponent-a24eb082.cjs → ScopeComponent-df4b58b1.cjs} +1 -1
  180. package/dist/chunks/{ScopeComponent-a24eb082.cjs.map → ScopeComponent-df4b58b1.cjs.map} +1 -1
  181. package/dist/chunks/{actionText-a64be267.mjs → actionText-60ff01d1.mjs} +3 -1
  182. package/dist/chunks/{actionText-54bc24a6.cjs.map → actionText-60ff01d1.mjs.map} +1 -1
  183. package/dist/chunks/{actionText-54bc24a6.cjs → actionText-9582810f.cjs} +3 -1
  184. package/dist/chunks/{actionText-a64be267.mjs.map → actionText-9582810f.cjs.map} +1 -1
  185. package/dist/chunks/{index-831524a1.mjs → index-cea13a24.mjs} +1 -1
  186. package/dist/chunks/{index-831524a1.mjs.map → index-cea13a24.mjs.map} +1 -1
  187. package/dist/chunks/{index-ac31691c.cjs → index-dc10fd2b.cjs} +1 -1
  188. package/dist/chunks/{index-ac31691c.cjs.map → index-dc10fd2b.cjs.map} +1 -1
  189. package/dist/chunks/{l10n-098e6a54.cjs → l10n-a12cdbfa.cjs} +1 -1
  190. package/dist/chunks/{l10n-098e6a54.cjs.map → l10n-a12cdbfa.cjs.map} +1 -1
  191. package/dist/chunks/{l10n-a929cdef.mjs → l10n-c603e589.mjs} +1 -1
  192. package/dist/chunks/{l10n-a929cdef.mjs.map → l10n-c603e589.mjs.map} +1 -1
  193. package/dist/chunks/l10n-e9ffbe5e.cjs +29 -0
  194. package/dist/chunks/l10n-e9ffbe5e.cjs.map +1 -0
  195. package/dist/chunks/l10n-ef44019c.mjs +31 -0
  196. package/dist/chunks/l10n-ef44019c.mjs.map +1 -0
  197. package/dist/chunks/{referencePickerModal-b79b7b92.cjs → referencePickerModal-aa5d3f47.cjs} +1 -1
  198. package/dist/chunks/{referencePickerModal-b79b7b92.cjs.map → referencePickerModal-aa5d3f47.cjs.map} +1 -1
  199. package/dist/chunks/{referencePickerModal-c87eab17.mjs → referencePickerModal-c2f33569.mjs} +1 -1
  200. package/dist/chunks/{referencePickerModal-c87eab17.mjs.map → referencePickerModal-c2f33569.mjs.map} +1 -1
  201. package/dist/index.cjs +139 -134
  202. package/dist/index.cjs.map +1 -1
  203. package/dist/index.mjs +96 -89
  204. package/dist/index.mjs.map +1 -1
  205. package/package.json +2 -2
  206. package/dist/chunks/GenColors-38246c38.mjs +0 -46
  207. package/dist/chunks/GenColors-38246c38.mjs.map +0 -1
  208. package/dist/chunks/GenColors-eedcc70a.cjs +0 -45
  209. package/dist/chunks/GenColors-eedcc70a.cjs.map +0 -1
  210. package/dist/chunks/NcSettingsSelectGroup-b49652df.mjs.map +0 -1
  211. package/dist/chunks/NcSettingsSelectGroup-fad68876.cjs.map +0 -1
  212. package/dist/chunks/l10n-c3dbf018.cjs +0 -29
  213. package/dist/chunks/l10n-c3dbf018.cjs.map +0 -1
  214. package/dist/chunks/l10n-f51d3415.mjs +0 -31
  215. package/dist/chunks/l10n-f51d3415.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NcActions.cjs","sources":["../../src/components/NcActions/NcActions.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n - @author Raimund Schlüßler <raimund.schluessler@mailbox.org>\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<!-- Accessibility guidelines:\nhttps://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-actions.html -->\n\n<docs>\n### Single action\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton @click=\"actionDelete\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t},\n\tmethods: {\n\t\tactionDelete() {\n\t\t\talert('Delete')\n\t\t},\n\t},\n}\n</script>\n```\n\n### Multiple actions\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton @click=\"showMessage('Edit')\">\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t</template>\n\t\t\tLink\n\t\t</NcActionLink>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport OpenInNew from 'vue-material-design-icons/OpenInNew'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tOpenInNew,\n\t\tPencil,\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n\n### Multiple actions with 2 items inline\n\n```vue\n<template>\n\t<NcActions :inline=\"2\">\n\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t<template #icon>\n\t\t\t\t<Plus :size=\"20\" />\n\t\t\t</template>\n\t\t\tAdd\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Edit')\">\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t</template>\n\t\t\tLink\n\t\t</NcActionLink>\n\t</NcActions>\n</template>\n<script>\nimport Plus from 'vue-material-design-icons/Plus'\nimport Delete from 'vue-material-design-icons/Delete'\nimport OpenInNew from 'vue-material-design-icons/OpenInNew'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tOpenInNew,\n\t\tPencil,\n\t\tPlus,\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n\n### Multiple actions with 2 items inline AND forced names\n\n```vue\n<template>\n\t<NcActions :force-name=\"true\" :inline=\"2\">\n\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t<template #icon>\n\t\t\t\t<Plus :size=\"20\" />\n\t\t\t</template>\n\t\t\tAdd\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Edit')\">\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t</template>\n\t\t\tLink\n\t\t</NcActionLink>\n\t</NcActions>\n</template>\n<script>\nimport Plus from 'vue-material-design-icons/Plus'\nimport Delete from 'vue-material-design-icons/Delete'\nimport OpenInNew from 'vue-material-design-icons/OpenInNew'\nimport Pencil from 'vue-material-design-icons/Pencil'\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tOpenInNew,\n\t\tPencil,\n\t\tPlus,\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n\n### Multiple actions with custom icon\n\n```vue\n<template>\n\t<NcActions>\n\t\t<template #icon>\n\t\t\t<Pencil :size=\"20\" />\n\t\t</template>\n\t\t<NcActionButton @click=\"showMessage('Edit')\">\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t</template>\n\t\t\tLink\n\t\t</NcActionLink>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport OpenInNew from 'vue-material-design-icons/OpenInNew'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tOpenInNew,\n\t\tPencil,\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n\n### With menu name\n\n```vue\n<template>\n\t<NcActions menu-name=\"Object management\">\n\t\t<template #icon>\n\t\t\t<Pencil :size=\"20\" />\n\t\t</template>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tRename\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<ArrowRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tValidate\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Download :size=\"20\" />\n\t\t\t</template>\n\t\t\tDownload\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport ArrowRight from 'vue-material-design-icons/ArrowRight'\nimport Delete from 'vue-material-design-icons/Delete'\nimport Download from 'vue-material-design-icons/Download'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tArrowRight,\n\t\tDelete,\n\t\tDownload,\n\t\tPencil,\n\t},\n}\n</script>\n```\n\n### Various icons styles\n```vue\n<template>\n\t<NcActions :primary=\"true\">\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tPencil,\n\t},\n}\n</script>\n```\n\n```vue\n<template>\n\t<NcActions :primary=\"true\" menu-name=\"Object management\">\n\t\t<template #icon>\n\t\t\t<Plus :size=\"20\" />\n\t\t</template>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tRename\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<ArrowRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tValidate\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Download :size=\"20\" />\n\t\t\t</template>\n\t\t\tDownload\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport ArrowRight from 'vue-material-design-icons/ArrowRight'\nimport Delete from 'vue-material-design-icons/Delete'\nimport Download from 'vue-material-design-icons/Download'\nimport Pencil from 'vue-material-design-icons/Pencil'\nimport Plus from 'vue-material-design-icons/Plus'\n\nexport default {\n\tcomponents: {\n\t\tArrowRight,\n\t\tDelete,\n\t\tDownload,\n\t\tPencil,\n\t\tPlus,\n\t},\n}\n</script>\n```\n\n### Custom icon slot\nTo be used with `vue-material-design-icons` only. For icon classes use the `default-icon` slot.\nIt can be used with one or multiple actions.\n```vue\n<template>\n\t<div style=\"display: flex;align-items: center;\">\n\t\t<NcButton @click=\"toggled = !toggled\">Toggle multiple action</NcButton>\n\t\t<NcActions>\n\t\t\t<template #icon>\n\t\t\t\t<DotsHorizontalCircleOutline :size=\"20\" />\n\t\t\t</template>\n\t\t\t<NcActionButton>\n\t\t\t\t<template #icon>\n\t\t\t\t\t<MicrophoneOff :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tMute\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton v-if=\"toggled\">\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</NcActions>\n\t</div>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport DotsHorizontalCircleOutline from 'vue-material-design-icons/DotsHorizontalCircleOutline'\nimport MicrophoneOff from 'vue-material-design-icons/MicrophoneOff'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tDotsHorizontalCircleOutline,\n\t\tMicrophoneOff,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttoggled: false\n\t\t}\n\t}\n}\n</script>\n```\n\n### Custom icon slot in child elements\n```vue\n<template>\n\t<NcActions :primary=\"true\">\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Magnify :size=\"20\" />\n\t\t\t</template>\n\t\t\tSearch\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tMagnify,\n\t},\n}\n</script>\n```\n\n### Type variants\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions :type=\"current\">\n\t\t\t<template #icon>\n\t\t\t\t<SelectColor :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<NcActionButton v-if=\"current\" close-after-click @click=\"define()\">\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\tRemove\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton v-for=\"row in types\" close-after-click @click=\"define(row)\" :key=\"`type-icon--${row}`\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CheckboxMarkedCircleOutline v-if=\"row === current\" :size=\"20\" />\n\t\t\t\t\t<SelectColor v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ row }}\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\n\t\t<NcActions :type=\"current\" menu-name=\"Choose a type\">\n\t\t\t<NcActionButton v-if=\"current\" close-after-click @click=\"define()\">\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\tRemove\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton v-for=\"row in types\" close-after-click @click=\"define(row)\" :key=\"`type-text--${row}`\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CheckboxMarkedCircleOutline v-if=\"row === current\" :size=\"20\" />\n\t\t\t\t\t<SelectColor v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ row }}\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\n\t\t<NcActions :type=\"current\" menu-name=\"Choose a type\">\n\t\t\t<template #icon>\n\t\t\t\t<SelectColor :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<NcActionButton v-if=\"current\" close-after-click @click=\"define()\">\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\tRemove\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton v-for=\"row in types\" close-after-click @click=\"define(row)\" :key=\"`type-icon-text--${row}`\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CheckboxMarkedCircleOutline v-if=\"row === current\" :size=\"20\" />\n\t\t\t\t\t<SelectColor v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ row }}\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport Palette from 'vue-material-design-icons/Palette'\nimport SelectColor from 'vue-material-design-icons/SelectColor'\nimport CheckboxMarkedCircleOutline from 'vue-material-design-icons/CheckboxMarkedCircleOutline'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tPalette,\n\t\tSelectColor,\n\t\tCheckboxMarkedCircleOutline,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tcurrent: 'primary',\n\t\t\ttypes: [\n\t\t\t\t'primary',\n\t\t\t\t'secondary',\n\t\t\t\t'tertiary',\n\t\t\t\t'error',\n\t\t\t\t'warning',\n\t\t\t\t'success'\n\t\t\t]\n\t\t}\n\t},\n\tmethods: {\n\t\tdefine(row = undefined) {\n\t\t\tthis.current = row\n\t\t}\n\t}\n}\n</script>\n```\n\n</docs>\n\n<script>\nimport NcButton from '../NcButton/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport { t } from '../../l10n.js'\n\nimport Vue from 'vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\n\nconst focusableSelector = '.focusable'\n\n/**\n * The Actions component can be used to display one ore more actions.\n * If only a single action is provided, it will be rendered as an inline icon.\n * For more, a menu indicator will be shown and a popovermenu containing the\n * actions will be opened on click.\n *\n * @since 0.10.0\n */\nexport default {\n\tname: 'NcActions',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tDotsHorizontal,\n\t\tNcPopover,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Specify the open state of the popover menu\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * This disables the internal open management,\n\t\t * so the actions menu only respects the `open` prop.\n\t\t * This is e.g. necessary for the NcAvatar component\n\t\t * to only open the actions menu after loading it's entries has finished.\n\t\t */\n\t\tmanualOpen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Force the actions to display in a three dot menu\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Force the name to show for single actions\n\t\t */\n\t\tforceName: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Specify the menu name\n\t\t */\n\t\tmenuName: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Apply primary styling for this menu\n\t\t */\n\t\tprimary: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button type used for trigger and single actions buttons\n\t\t * Accepted values: primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success. If left empty,\n\t\t * the default button style will be applied.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].indexOf(value) !== -1\n\t\t\t},\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Icon to show for the toggle menu button\n\t\t * when more than one action is inside the actions component.\n\t\t * Only replace the default three-dot icon if really necessary.\n\t\t */\n\t\tdefaultIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Aria label for the actions menu.\n\t\t *\n\t\t * If `menuName` is defined this will not be used to prevent\n\t\t * any accessible name conflicts. This ensures that the\n\t\t * element can be activated via voice input.\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Actions'),\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 * Wanted direction of the menu\n\t\t */\n\t\tplacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\n\t\t},\n\n\t\t/**\n\t\t * DOM element for the actions' popover boundaries\n\t\t */\n\t\tboundariesElement: {\n\t\t\ttype: Element,\n\t\t\tdefault: () => document.querySelector('body'),\n\t\t},\n\n\t\t/**\n\t\t * Selector for the actions' popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Disabled state of the main button (single action or menu toggle)\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 * Display x items inline out of the dropdown menu\n\t\t * Will be ignored if `forceMenu` is set\n\t\t */\n\t\tinline: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\t},\n\n\temits: [\n\t\t'open',\n\t\t'update:open',\n\t\t'close',\n\t\t'focus',\n\t\t'blur',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\topened: this.open,\n\t\t\tfocusIndex: 0,\n\t\t\trandomId: `menu-${GenRandomId()}`,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\ttriggerBtnType() {\n\t\t\t// If requested, we use a primary button\n\t\t\treturn this.type || (this.primary\n\t\t\t\t? 'primary'\n\t\t\t\t// If it has a name, we use a secondary button\n\t\t\t\t: this.menuName ? 'secondary' : 'tertiary')\n\t\t},\n\t},\n\n\twatch: {\n\t\t// Watch parent prop\n\t\topen(state) {\n\t\t\tif (state === this.opened) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.opened = state\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Do we have exactly one Action and\n\t\t * is it allowed as a standalone element?\n\t\t *\n\t\t * @param {Array} action The action to check\n\t\t * @return {boolean}\n\t\t */\n\t\tisValidSingleAction(action) {\n\t\t\tconst componentName = action?.componentOptions?.Ctor?.extendOptions?.name ?? action?.componentOptions?.tag\n\t\t\treturn ['NcActionButton', 'NcActionLink', 'NcActionRouter'].includes(componentName)\n\t\t},\n\n\t\t// MENU STATE MANAGEMENT\n\t\topenMenu(e) {\n\t\t\tif (this.opened) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.opened = true\n\n\t\t\t/**\n\t\t\t * Event emitted when the popover menu open state is changed\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('update:open', true)\n\n\t\t\t/**\n\t\t\t * Event emitted when the popover menu is opened\n\t\t\t */\n\t\t\tthis.$emit('open')\n\t\t},\n\t\tcloseMenu(returnFocus = true) {\n\t\t\tif (!this.opened) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.opened = false\n\n\t\t\tthis.$refs.popover.clearFocusTrap({ returnFocus })\n\n\t\t\t/**\n\t\t\t * Event emitted when the popover menu open state is changed\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('update:open', false)\n\n\t\t\t/**\n\t\t\t * Event emitted when the popover menu is closed\n\t\t\t */\n\t\t\tthis.$emit('close')\n\n\t\t\t// close everything\n\t\t\tthis.focusIndex = 0\n\n\t\t\t// focus back the menu button\n\t\t\tthis.$refs.menuButton.$el.focus()\n\t\t},\n\n\t\tonOpen(event) {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.focusFirstAction(event)\n\t\t\t})\n\t\t},\n\n\t\t// MENU KEYS & FOCUS MANAGEMENT\n\t\t// focus nearest focusable item on mouse move\n\t\t// DO NOT change the focus if the target is already focused\n\t\t// this will prevent issues with input being unfocused\n\t\t// on mouse move\n\t\tonMouseFocusAction(event) {\n\t\t\tif (document.activeElement === event.target) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst menuItem = event.target.closest('li')\n\t\t\tif (menuItem) {\n\t\t\t\tconst focusableItem = menuItem.querySelector(focusableSelector)\n\t\t\t\tif (focusableItem) {\n\t\t\t\t\tconst focusList = this.$refs.menu.querySelectorAll(focusableSelector)\n\t\t\t\t\tconst focusIndex = [...focusList].indexOf(focusableItem)\n\t\t\t\t\tif (focusIndex > -1) {\n\t\t\t\t\t\tthis.focusIndex = focusIndex\n\t\t\t\t\t\tthis.focusAction()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Dispatches the keydown listener to different handlers\n\t\t *\n\t\t * @param {object} event The keydown event\n\t\t */\n\t\tonKeydown(event) {\n\t\t\t// Up or Shift+Tab\n\t\t\tif (event.keyCode === 38 || (event.keyCode === 9 && event.shiftKey)) {\n\t\t\t\tthis.focusPreviousAction(event)\n\t\t\t}\n\t\t\t// Down or Tab\n\t\t\tif (event.keyCode === 40 || (event.keyCode === 9 && !event.shiftKey)) {\n\t\t\t\tthis.focusNextAction(event)\n\t\t\t}\n\t\t\t// Page-Up\n\t\t\tif (event.keyCode === 33) {\n\t\t\t\tthis.focusFirstAction(event)\n\t\t\t}\n\t\t\t// Page-Down\n\t\t\tif (event.keyCode === 34) {\n\t\t\t\tthis.focusLastAction(event)\n\t\t\t}\n\t\t\t// Esc\n\t\t\tif (event.keyCode === 27) {\n\t\t\t\tthis.closeMenu()\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\t\tremoveCurrentActive() {\n\t\t\tconst currentActiveElement = this.$refs.menu.querySelector('li.active')\n\t\t\tif (currentActiveElement) {\n\t\t\t\tcurrentActiveElement.classList.remove('active')\n\t\t\t}\n\t\t},\n\t\tfocusAction() {\n\t\t\t// TODO: have a global disabled state for non input elements\n\t\t\tconst focusElement = this.$refs.menu.querySelectorAll(focusableSelector)[this.focusIndex]\n\t\t\tif (focusElement) {\n\t\t\t\tthis.removeCurrentActive()\n\t\t\t\tconst liMenuParent = focusElement.closest('li.action')\n\t\t\t\tfocusElement.focus()\n\t\t\t\tif (liMenuParent) {\n\t\t\t\t\tliMenuParent.classList.add('active')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tfocusPreviousAction(event) {\n\t\t\tif (this.opened) {\n\t\t\t\tif (this.focusIndex === 0) {\n\t\t\t\t\t// First element overflows to body-navigation (no preventDefault!) and closes Actions-menu\n\t\t\t\t\tthis.closeMenu()\n\t\t\t\t} else {\n\t\t\t\t\tthis.preventIfEvent(event)\n\t\t\t\t\tthis.focusIndex = this.focusIndex - 1\n\t\t\t\t}\n\t\t\t\tthis.focusAction()\n\t\t\t}\n\t\t},\n\t\tfocusNextAction(event) {\n\t\t\tif (this.opened) {\n\t\t\t\tconst indexLength = this.$refs.menu.querySelectorAll(focusableSelector).length - 1\n\t\t\t\tif (this.focusIndex === indexLength) {\n\t\t\t\t\t// Last element overflows to body-navigation (no preventDefault!) and closes Actions-menu\n\t\t\t\t\tthis.closeMenu()\n\t\t\t\t} else {\n\t\t\t\t\tthis.preventIfEvent(event)\n\t\t\t\t\tthis.focusIndex = this.focusIndex + 1\n\t\t\t\t}\n\t\t\t\tthis.focusAction()\n\t\t\t}\n\t\t},\n\t\tfocusFirstAction(event) {\n\t\t\tif (this.opened) {\n\t\t\t\tthis.preventIfEvent(event)\n\t\t\t\t// In case a button is considered aria-selected we will use this one as a initial focus\n\t\t\t\tconst firstSelectedIndex = [...this.$refs.menu.querySelectorAll(focusableSelector)].findIndex((button) => {\n\t\t\t\t\treturn button.parentElement.getAttribute('aria-selected')\n\t\t\t\t})\n\t\t\t\tthis.focusIndex = firstSelectedIndex > -1 ? firstSelectedIndex : 0\n\t\t\t\tthis.focusAction()\n\t\t\t}\n\t\t},\n\t\tfocusLastAction(event) {\n\t\t\tif (this.opened) {\n\t\t\t\tthis.preventIfEvent(event)\n\t\t\t\tthis.focusIndex = this.$refs.menu.querySelectorAll(focusableSelector).length - 1\n\t\t\t\tthis.focusAction()\n\t\t\t}\n\t\t},\n\t\tpreventIfEvent(event) {\n\t\t\tif (event) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\t\tonFocus(event) {\n\t\t\tthis.$emit('focus', event)\n\t\t},\n\t\tonBlur(event) {\n\t\t\tthis.$emit('blur', event)\n\t\t},\n\t},\n\n\t/**\n\t * The render function to display the component\n\t *\n\t * @param {Function} h The function to create VNodes\n\t * @return {object|undefined} The created VNode\n\t */\n\trender(h) {\n\t\t/**\n\t\t * Filter the Actions, so that we only get allowed components.\n\t\t * This also ensure that we don't get 'text' elements, which would\n\t\t * become problematic later on.\n\t\t */\n\t\tconst actions = (this.$slots.default || []).filter(\n\t\t\taction => action?.componentOptions?.tag || action?.componentOptions?.Ctor?.extendOptions?.name,\n\t\t)\n\n\t\tconst isNavLink = (action) => {\n\t\t\tconst componentName = action?.componentOptions?.Ctor?.extendOptions?.name ?? action?.componentOptions?.tag\n\t\t\tconst href = action?.componentOptions?.propsData?.href\n\t\t\treturn (\n\t\t\t\tcomponentName === 'NcActionLink'\n\t\t\t\t\t&& !href?.startsWith('#')\n\t\t\t\t\t&& new URL(href, window.location.origin).origin === window.location.origin\n\t\t\t)\n\t\t}\n\t\t// Automatically detect whether all actions are website navigation links\n\t\tconst isNav = actions.every(isNavLink)\n\n\t\t/**\n\t\t * Filter and list actions that are allowed to be displayed inline\n\t\t */\n\t\tlet inlineActions = actions.filter(this.isValidSingleAction)\n\t\tif (this.forceMenu && inlineActions.length > 0 && this.inline > 0) {\n\t\t\tVue.util.warn('Specifying forceMenu will ignore any inline actions rendering.')\n\t\t\tinlineActions = []\n\t\t}\n\n\t\t// Check that we have at least one action\n\t\tif (actions.length === 0) {\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Render the provided action\n\t\t *\n\t\t * @param {import('vue').VNode} action the action to render\n\t\t * @return {Function} the vue render function\n\t\t */\n\t\tconst renderInlineAction = (action) => {\n\t\t\tconst icon = action?.data?.scopedSlots?.icon()?.[0]\n\t\t\t\t|| h('span', { class: ['icon', action?.componentOptions?.propsData?.icon] })\n\t\t\tconst attrs = action?.data?.attrs || {}\n\t\t\tconst clickListener = action?.componentOptions?.listeners?.click\n\n\t\t\tconst text = action?.componentOptions?.children?.[0]?.text?.trim?.()\n\t\t\tconst ariaLabel = action?.componentOptions?.propsData?.ariaLabel || text\n\t\t\tconst buttonText = this.forceName ? text : ''\n\n\t\t\tlet title = action?.componentOptions?.propsData?.title\n\t\t\t// Show a default title for single actions if none is present\n\t\t\tif (!(this.forceName || title)) {\n\t\t\t\ttitle = text\n\t\t\t}\n\n\t\t\treturn h('NcButton',\n\t\t\t\t{\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'action-item action-item--single',\n\t\t\t\t\t\taction?.data?.staticClass,\n\t\t\t\t\t\taction?.data?.class,\n\t\t\t\t\t],\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\t...attrs,\n\t\t\t\t\t\t'aria-label': ariaLabel,\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t},\n\t\t\t\t\tref: action?.data?.ref,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t// If it has a menuName, we use a secondary button\n\t\t\t\t\t\ttype: this.type || (buttonText ? 'secondary' : 'tertiary'),\n\t\t\t\t\t\tdisabled: this.disabled || action?.componentOptions?.propsData?.disabled,\n\t\t\t\t\t\tariaHidden: this.ariaHidden,\n\t\t\t\t\t\t...action?.componentOptions?.propsData,\n\t\t\t\t\t},\n\t\t\t\t\ton: {\n\t\t\t\t\t\tfocus: this.onFocus,\n\t\t\t\t\t\tblur: this.onBlur,\n\t\t\t\t\t\t// If we have a click listener,\n\t\t\t\t\t\t// we bind it to execute on click and forward the click event\n\t\t\t\t\t\t...(!!clickListener && {\n\t\t\t\t\t\t\tclick: (event) => {\n\t\t\t\t\t\t\t\tif (clickListener) {\n\t\t\t\t\t\t\t\t\tclickListener(event)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[\n\t\t\t\t\th('template', { slot: 'icon' }, [icon]),\n\t\t\t\t\tbuttonText,\n\t\t\t\t],\n\t\t\t)\n\t\t}\n\n\t\t/**\n\t\t * Render the actions popover\n\t\t *\n\t\t * @param {Array} actions the actions to render within\n\t\t * @return {Function} the vue render function\n\t\t */\n\t\tconst renderActionsPopover = (actions) => {\n\t\t\tconst triggerIcon = this.$slots.icon?.[0] || (\n\t\t\t\tthis.defaultIcon\n\t\t\t\t\t? h('span', { class: ['icon', this.defaultIcon] })\n\t\t\t\t\t: h('DotsHorizontal', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tsize: 20,\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t)\n\t\t\tconst ariaExpandedForTrigger = () => {\n\t\t\t\treturn (isNav || this.opened) ? this.opened.toString() : null\n\t\t\t}\n\t\t\treturn h('NcPopover',\n\t\t\t\t{\n\t\t\t\t\tref: 'popover',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tdelay: 0,\n\t\t\t\t\t\thandleResize: true,\n\t\t\t\t\t\tshown: this.opened,\n\t\t\t\t\t\tplacement: this.placement,\n\t\t\t\t\t\tboundary: this.boundariesElement,\n\t\t\t\t\t\tcontainer: this.container,\n\t\t\t\t\t\tpopoverBaseClass: 'action-item__popper',\n\t\t\t\t\t\tsetReturnFocus: this.$refs.menuButton?.$el,\n\t\t\t\t\t},\n\t\t\t\t\t// For some reason the popover component\n\t\t\t\t\t// does not react to props given under the 'props' key,\n\t\t\t\t\t// so we use both 'attrs' and 'props'\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\tdelay: 0,\n\t\t\t\t\t\thandleResize: true,\n\t\t\t\t\t\tshown: this.opened,\n\t\t\t\t\t\tplacement: this.placement,\n\t\t\t\t\t\tboundary: this.boundariesElement,\n\t\t\t\t\t\tcontainer: this.container,\n\t\t\t\t\t\t...this.manualOpen && { triggers: [] },\n\t\t\t\t\t},\n\t\t\t\t\ton: {\n\t\t\t\t\t\tshow: this.openMenu,\n\t\t\t\t\t\t'after-show': this.onOpen,\n\t\t\t\t\t\thide: this.closeMenu,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[\n\t\t\t\t\th('NcButton', {\n\t\t\t\t\t\tclass: 'action-item__menutoggle',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\ttype: this.triggerBtnType,\n\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t\tariaHidden: this.ariaHidden,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tslot: 'trigger',\n\t\t\t\t\t\tref: 'menuButton',\n\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t'aria-haspopup': isNav ? null : 'menu',\n\t\t\t\t\t\t\t'aria-label': this.menuName ? null : this.ariaLabel,\n\t\t\t\t\t\t\t'aria-controls': this.opened ? this.randomId : null,\n\t\t\t\t\t\t\t'aria-expanded': ariaExpandedForTrigger(),\n\t\t\t\t\t\t},\n\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\tfocus: this.onFocus,\n\t\t\t\t\t\t\tblur: this.onBlur,\n\t\t\t\t\t\t},\n\t\t\t\t\t}, [\n\t\t\t\t\t\th('template', { slot: 'icon' }, [triggerIcon]),\n\t\t\t\t\t\tthis.menuName,\n\t\t\t\t\t]),\n\t\t\t\t\th('div', {\n\t\t\t\t\t\tclass: {\n\t\t\t\t\t\t\topen: this.opened,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\ttabindex: '-1',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\tkeydown: this.onKeydown,\n\t\t\t\t\t\t\tmousemove: this.onMouseFocusAction,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tref: 'menu',\n\t\t\t\t\t}, [\n\t\t\t\t\t\th('ul', {\n\t\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t\tid: this.randomId,\n\t\t\t\t\t\t\t\ttabindex: '-1',\n\t\t\t\t\t\t\t\trole: isNav ? null : 'menu',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tactions,\n\t\t\t\t\t\t]),\n\t\t\t\t\t]),\n\t\t\t\t],\n\t\t\t)\n\t\t}\n\n\t\t/**\n\t\t * If we have a single action only and didn't force a menu,\n\t\t * we render the action as a standalone button\n\t\t */\n\t\tif (actions.length === 1 && inlineActions.length === 1 && !this.forceMenu) {\n\t\t\treturn renderInlineAction(inlineActions[0])\n\t\t}\n\n\t\t// If we completely re-render the children\n\t\t// we need to focus the first action again\n\t\t// Mostly used when clicking a menu item\n\t\tthis.$nextTick(() => {\n\t\t\tif (this.opened && this.$refs.menu) {\n\t\t\t\tconst isAnyActive = this.$refs.menu.querySelector('li.active') || []\n\t\t\t\tif (isAnyActive.length === 0) {\n\t\t\t\t\tthis.focusFirstAction()\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\t/**\n\t\t * If we some inline actions to render, render them, then the menu\n\t\t */\n\t\tif (inlineActions.length > 0 && this.inline > 0) {\n\t\t\tconst renderedInlineActions = inlineActions.slice(0, this.inline)\n\t\t\t// Filter already rendered actions\n\t\t\tconst menuActions = actions.filter(action => !renderedInlineActions.includes(action))\n\t\t\treturn h('div',\n\t\t\t\t{\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'action-items',\n\t\t\t\t\t\t`action-item--${this.triggerBtnType}`,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t[\n\t\t\t\t\t// Render inline actions\n\t\t\t\t\t...renderedInlineActions.map(renderInlineAction),\n\t\t\t\t\t// render the rest within the popover menu\n\t\t\t\t\tmenuActions.length > 0\n\t\t\t\t\t\t? h('div',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t\t\t'action-item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'action-item--open': this.opened,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\trenderActionsPopover(menuActions),\n\t\t\t\t\t\t\t])\n\t\t\t\t\t\t: null,\n\t\t\t\t])\n\t\t}\n\n\t\t/**\n\t\t * Otherwise, we render the actions in a popover\n\t\t */\n\t\treturn h('div',\n\t\t\t{\n\t\t\t\tclass: [\n\t\t\t\t\t'action-item action-item--default-popover',\n\t\t\t\t\t`action-item--${this.triggerBtnType}`,\n\t\t\t\t\t{\n\t\t\t\t\t\t'action-item--open': this.opened,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t[\n\t\t\t\trenderActionsPopover(actions),\n\t\t\t],\n\t\t)\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n// Inline buttons\n.action-items {\n\tdisplay: flex;\n\talign-items: center;\n\n\t// Spacing between buttons\n\t& > button {\n\t\tmargin-right: math.div($icon-margin, 2);\n\t}\n}\n\n.action-item {\n\t--open-background-color: var(--color-background-hover, $action-background-hover);\n\tposition: relative;\n\tdisplay: inline-block;\n\n\t&.action-item--primary {\n\t\t--open-background-color: var(--color-primary-element-hover);\n\t}\n\n\t&.action-item--secondary {\n\t\t--open-background-color: var(--color-primary-element-light-hover);\n\t}\n\n\t&.action-item--error {\n\t\t--open-background-color: var(--color-error-hover);\n\t}\n\n\t&.action-item--warning {\n\t\t--open-background-color: var(--color-warning-hover);\n\t}\n\n\t&.action-item--success {\n\t\t--open-background-color: var(--color-success-hover);\n\t}\n\n\t&.action-item--tertiary-no-background {\n\t\t--open-background-color: transparent;\n\t}\n\n\t&.action-item--open .action-item__menutoggle {\n\t\tbackground-color: var(--open-background-color);\n\t}\n}\n</style>\n\n<style lang=\"scss\">\n// We overwrote the popover base class, so we can style\n// the popover__inner for actions only.\n.v-popper--theme-dropdown.v-popper__popper.action-item__popper .v-popper__wrapper {\n\tborder-radius: var(--border-radius-large);\n\toverflow:hidden;\n\n\t.v-popper__inner {\n\t\tborder-radius: var(--border-radius-large);\n\t\tpadding: 4px;\n\t\tmax-height: calc(50vh - 16px);\n\t\toverflow: auto;\n\t}\n}\n</style>\n"],"names":["focusableSelector","_sfc_main","Components_NcButton","DotsHorizontal","Components_NcPopover","value","l10n","GenRandomId","state","action","componentName","_e","_c","_b","_a","_d","returnFocus","event","menuItem","focusableItem","focusIndex","currentActiveElement","focusElement","liMenuParent","indexLength","firstSelectedIndex","button","h","actions","isNavLink","href","_g","_f","isNav","inlineActions","Vue__default","renderInlineAction","icon","attrs","clickListener","_h","text","_m","_l","_k","_j","_i","ariaLabel","_o","_n","buttonText","title","_q","_p","_r","_s","_t","_v","_u","_w","renderActionsPopover","triggerIcon","ariaExpandedForTrigger","renderedInlineActions","menuActions"],"mappings":";;AAikBA,MAAAA,IAAA,cAUAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC,EAAA;AAAA,IACA,WAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AA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A,KAAA,UAAA,MAAA;AACA,MAAA,KAAA,UAAA,KAAA,MAAA,SACA,KAAA,MAAA,KAAA,cAAA,WAAA,KAAA,CAAA,GACA,WAAA,KACA,KAAA,iBAAA;AAAA,IAGA,CAAA,GAKAA,EAAA,SAAA,KAAA,KAAA,SAAA,GAAA;AACA,YAAA6B,IAAA7B,EAAA,MAAA,GAAA,KAAA,MAAA,GAEA8B,IAAApC,EAAA,OAAA,CAAAnB,MAAA,CAAAsD,EAAA,SAAAtD,CAAA,CAAA;AACA,aAAAkB;AAAA,QAAA;AAAA,QACA;AAAA,UACA,OAAA;AAAA,YACA;AAAA,YACA,gBAAA,KAAA,cAAA;AAAA,UACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,UAEA,GAAAoC,EAAA,IAAA3B,CAAA;AAAA;AAAA,UAEA4B,EAAA,SAAA,IACArC;AAAA,YAAA;AAAA,YACA;AAAA,cACA,OAAA;AAAA,gBACA;AAAA,gBACA;AAAA,kBACA,qBAAA,KAAA;AAAA,gBACA;AAAA,cACA;AAAA,YACA;AAAA,YACA;AAAA,cACAiC,EAAAI,CAAA;AAAA,YACA;AAAA,UAAA,IACA;AAAA,QACA;AAAA,MAAA;AAAA,IACA;AAKA,WAAArC;AAAA,MAAA;AAAA,MACA;AAAA,QACA,OAAA;AAAA,UACA;AAAA,UACA,gBAAA,KAAA,cAAA;AAAA,UACA;AAAA,YACA,qBAAA,KAAA;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,MACA;AAAA,QACAiC,EAAAhC,CAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActions.cjs","sources":["../../src/components/NcActions/NcActions.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n - @author Raimund Schlüßler <raimund.schluessler@mailbox.org>\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<!-- Accessibility guidelines:\nhttps://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-actions.html -->\n\n<docs>\n### Single action\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton @click=\"actionDelete\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t},\n\tmethods: {\n\t\tactionDelete() {\n\t\t\talert('Delete')\n\t\t},\n\t},\n}\n</script>\n```\n\n### Multiple actions\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton @click=\"showMessage('Edit')\">\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t</template>\n\t\t\tLink\n\t\t</NcActionLink>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport OpenInNew from 'vue-material-design-icons/OpenInNew'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tOpenInNew,\n\t\tPencil,\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n\n### Multiple actions with 2 items inline\n\n```vue\n<template>\n\t<NcActions :inline=\"2\">\n\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t<template #icon>\n\t\t\t\t<Plus :size=\"20\" />\n\t\t\t</template>\n\t\t\tAdd\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Edit')\">\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t</template>\n\t\t\tLink\n\t\t</NcActionLink>\n\t</NcActions>\n</template>\n<script>\nimport Plus from 'vue-material-design-icons/Plus'\nimport Delete from 'vue-material-design-icons/Delete'\nimport OpenInNew from 'vue-material-design-icons/OpenInNew'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tOpenInNew,\n\t\tPencil,\n\t\tPlus,\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n\n### Multiple actions with 2 items inline AND forced names\n\n```vue\n<template>\n\t<NcActions :force-name=\"true\" :inline=\"2\">\n\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t<template #icon>\n\t\t\t\t<Plus :size=\"20\" />\n\t\t\t</template>\n\t\t\tAdd\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Edit')\">\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t</template>\n\t\t\tLink\n\t\t</NcActionLink>\n\t</NcActions>\n</template>\n<script>\nimport Plus from 'vue-material-design-icons/Plus'\nimport Delete from 'vue-material-design-icons/Delete'\nimport OpenInNew from 'vue-material-design-icons/OpenInNew'\nimport Pencil from 'vue-material-design-icons/Pencil'\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tOpenInNew,\n\t\tPencil,\n\t\tPlus,\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n\n### Multiple actions with custom icon\n\n```vue\n<template>\n\t<NcActions>\n\t\t<template #icon>\n\t\t\t<Pencil :size=\"20\" />\n\t\t</template>\n\t\t<NcActionButton @click=\"showMessage('Edit')\">\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionLink href=\"https://nextcloud.com\">\n\t\t\t<template #icon>\n\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t</template>\n\t\t\tLink\n\t\t</NcActionLink>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport OpenInNew from 'vue-material-design-icons/OpenInNew'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tOpenInNew,\n\t\tPencil,\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n\n### With menu name\n\n```vue\n<template>\n\t<NcActions menu-name=\"Object management\">\n\t\t<template #icon>\n\t\t\t<Pencil :size=\"20\" />\n\t\t</template>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tRename\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<ArrowRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tValidate\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Download :size=\"20\" />\n\t\t\t</template>\n\t\t\tDownload\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport ArrowRight from 'vue-material-design-icons/ArrowRight'\nimport Delete from 'vue-material-design-icons/Delete'\nimport Download from 'vue-material-design-icons/Download'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tArrowRight,\n\t\tDelete,\n\t\tDownload,\n\t\tPencil,\n\t},\n}\n</script>\n```\n\n### Various icons styles\n```vue\n<template>\n\t<NcActions :primary=\"true\">\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tEdit\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport Pencil from 'vue-material-design-icons/Pencil'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tPencil,\n\t},\n}\n</script>\n```\n\n```vue\n<template>\n\t<NcActions :primary=\"true\" menu-name=\"Object management\">\n\t\t<template #icon>\n\t\t\t<Plus :size=\"20\" />\n\t\t</template>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t</template>\n\t\t\tRename\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<ArrowRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tValidate\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Download :size=\"20\" />\n\t\t\t</template>\n\t\t\tDownload\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport ArrowRight from 'vue-material-design-icons/ArrowRight'\nimport Delete from 'vue-material-design-icons/Delete'\nimport Download from 'vue-material-design-icons/Download'\nimport Pencil from 'vue-material-design-icons/Pencil'\nimport Plus from 'vue-material-design-icons/Plus'\n\nexport default {\n\tcomponents: {\n\t\tArrowRight,\n\t\tDelete,\n\t\tDownload,\n\t\tPencil,\n\t\tPlus,\n\t},\n}\n</script>\n```\n\n### Custom icon slot\nTo be used with `vue-material-design-icons` only. For icon classes use the `default-icon` slot.\nIt can be used with one or multiple actions.\n```vue\n<template>\n\t<div style=\"display: flex;align-items: center;\">\n\t\t<NcButton @click=\"toggled = !toggled\">Toggle multiple action</NcButton>\n\t\t<NcActions>\n\t\t\t<template #icon>\n\t\t\t\t<DotsHorizontalCircleOutline :size=\"20\" />\n\t\t\t</template>\n\t\t\t<NcActionButton>\n\t\t\t\t<template #icon>\n\t\t\t\t\t<MicrophoneOff :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tMute\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton v-if=\"toggled\">\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</NcActions>\n\t</div>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport DotsHorizontalCircleOutline from 'vue-material-design-icons/DotsHorizontalCircleOutline'\nimport MicrophoneOff from 'vue-material-design-icons/MicrophoneOff'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tDotsHorizontalCircleOutline,\n\t\tMicrophoneOff,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttoggled: false\n\t\t}\n\t}\n}\n</script>\n```\n\n### Custom icon slot in child elements\n```vue\n<template>\n\t<NcActions :primary=\"true\">\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Magnify :size=\"20\" />\n\t\t\t</template>\n\t\t\tSearch\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<Delete :size=\"20\" />\n\t\t\t</template>\n\t\t\tDelete\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tMagnify,\n\t},\n}\n</script>\n```\n\n### Type variants\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions :type=\"current\">\n\t\t\t<template #icon>\n\t\t\t\t<SelectColor :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<NcActionButton v-if=\"current\" close-after-click @click=\"define()\">\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\tRemove\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton v-for=\"row in types\" close-after-click @click=\"define(row)\" :key=\"`type-icon--${row}`\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CheckboxMarkedCircleOutline v-if=\"row === current\" :size=\"20\" />\n\t\t\t\t\t<SelectColor v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ row }}\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\n\t\t<NcActions :type=\"current\" menu-name=\"Choose a type\">\n\t\t\t<NcActionButton v-if=\"current\" close-after-click @click=\"define()\">\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\tRemove\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton v-for=\"row in types\" close-after-click @click=\"define(row)\" :key=\"`type-text--${row}`\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CheckboxMarkedCircleOutline v-if=\"row === current\" :size=\"20\" />\n\t\t\t\t\t<SelectColor v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ row }}\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\n\t\t<NcActions :type=\"current\" menu-name=\"Choose a type\">\n\t\t\t<template #icon>\n\t\t\t\t<SelectColor :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<NcActionButton v-if=\"current\" close-after-click @click=\"define()\">\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\tRemove\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton v-for=\"row in types\" close-after-click @click=\"define(row)\" :key=\"`type-icon-text--${row}`\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CheckboxMarkedCircleOutline v-if=\"row === current\" :size=\"20\" />\n\t\t\t\t\t<SelectColor v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ row }}\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n\n<script>\nimport Delete from 'vue-material-design-icons/Delete'\nimport Palette from 'vue-material-design-icons/Palette'\nimport SelectColor from 'vue-material-design-icons/SelectColor'\nimport CheckboxMarkedCircleOutline from 'vue-material-design-icons/CheckboxMarkedCircleOutline'\n\nexport default {\n\tcomponents: {\n\t\tDelete,\n\t\tPalette,\n\t\tSelectColor,\n\t\tCheckboxMarkedCircleOutline,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tcurrent: 'primary',\n\t\t\ttypes: [\n\t\t\t\t'primary',\n\t\t\t\t'secondary',\n\t\t\t\t'tertiary',\n\t\t\t\t'error',\n\t\t\t\t'warning',\n\t\t\t\t'success'\n\t\t\t]\n\t\t}\n\t},\n\tmethods: {\n\t\tdefine(row = undefined) {\n\t\t\tthis.current = row\n\t\t}\n\t}\n}\n</script>\n```\n\n### Use cases\n\n```vue\n<template>\n\t<div>\n\t\t<h2>Application menu</h2>\n\t\tUses buttons, button groups, links and router links, separators, text. May have checkboxes and radio buttons.\n\t\t<p>\n\t\t\t<NcActions aria-label=\"Email menu\" type=\"tertiary\">\n\t\t\t\t<NcActionButtonGroup>\n\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<StarOutline :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tFavorite\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<EmailUnread :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tUnread\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Bookmark :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tImportant\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActionButtonGroup>\n\t\t\t\t<NcActionText>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<ClockOutlineIcon :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ new Date().toLocaleDateString('en-US') }}\n\t\t\t\t</NcActionText>\n\t\t\t\t<NcActionSeparator />\n\t\t\t\t<NcActionButton>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlertOctagonIcon :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tMark as spam\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionCheckbox :checked.sync=\"selected\">\n\t\t\t\t\tSelect\n\t\t\t\t</NcActionCheckbox>\n\t\t\t\t<NcActionButton>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<OpenInNewIcon :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tMove thread\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionLink href=\"#\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<DownloadIcon :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDownload message\n\t\t\t\t</NcActionLink>\n\t\t\t</NcActions>\n\t\t</p>\n\n\t\t<h2>Menu in menubar</h2>\n\t\tSame as application menu. Separator can be used to make groups of radio buttons as well.\n\t\t<p>\n\t\t\t<NcActions aria-label=\"Text settings\" type=\"tertiary\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatTitle :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<NcActionButtonGroup name=\"Allignment\">\n\t\t\t\t\t<NcActionButton aria-label=\"Left\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<NcActionButton aria-label=\"Center\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<NcActionButton aria-label=\"Right\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActionButtonGroup>\n\t\t\t\t<NcActionSeparator />\n\t\t\t\t<NcActionCheckbox :checked.sync=\"checked.bold\" value=\"bold\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<FormatBold :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tBold\n\t\t\t\t</NcActionCheckbox>\n\t\t\t\t<NcActionCheckbox :checked.sync=\"checked.italic\" value=\"italic\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<FormatItalic :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tItalic\n\t\t\t\t</NcActionCheckbox>\n\t\t\t\t<NcActionCheckbox :checked.sync=\"checked.underline\" value=\"underline\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<FormatUnderline :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tUnderline\n\t\t\t\t</NcActionCheckbox>\n\t\t\t\t<NcActionSeparator />\n\t\t\t\t<NcActionRadio name=\"color\" :checked.sync=\"color.black\" value=\"Black\">Black</NcActionRadio>\n\t\t\t\t<NcActionRadio name=\"color\" :checked.sync=\"color.blue\" value=\"Blue\">Blue</NcActionRadio>\n\t\t\t\t<NcActionRadio name=\"color\" :checked.sync=\"color.red\" value=\"Red\">Red</NcActionRadio>\n\t\t\t\t<NcActionRadio name=\"color\" :checked.sync=\"color.green\" value=\"Green\">Green</NcActionRadio>\n\t\t\t</NcActions>\n\t\t</p>\n\n\t\t<h2>Navigation</h2>\n\t\tUses links or router links. May use text elements, captions and separators.\n\t\t<p>\n\t\t\t<NcActions aria-label=\"Applications navigation\" :inline=\"2\" type=\"tertiary\">\n\t\t\t\t<NcActionLink href=\"/apps/dashboard\" icon=\"icon-category-dashboard-white\">\n\t\t\t\t\tDashboard\n\t\t\t\t</NcActionLink>\n\t\t\t\t<NcActionLink href=\"/apps/files\" icon=\"icon-files-white\">\n\t\t\t\t\tFiles\n\t\t\t\t</NcActionLink>\n\t\t\t\t<NcActionLink href=\"/apps/spreed\" icon=\"icon-talk-white\">\n\t\t\t\t\tTalk\n\t\t\t\t</NcActionLink>\n\t\t\t\t<NcActionLink href=\"/apps/contacts\" icon=\"icon-contacts-white\">\n\t\t\t\t\tContacts\n\t\t\t\t</NcActionLink>\n\t\t\t\t<NcActionLink href=\"/apps/spreed\" icon=\"icon-circles-white\">\n\t\t\t\t\tCircles\n\t\t\t\t</NcActionLink>\n\t\t\t</NcActions>\n\t\t</p>\n\n\t\t<h2>Popover</h2>\n\t\tHas any elements, including text input element, or no buttons.\n\t\t<p>\n\t\t\t<NcActions aria-label=\"Group management\">\n\t\t\t\t<NcActionInput trailing-button-label=\"Submit\" label=\"Rename group\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionInput>\n\t\t\t\t<NcActionButton>\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\tRemove group\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</p>\n\t</div>\n</template>\n\n<script>\n// Common icons\nimport Pencil from 'vue-material-design-icons/Pencil'\nimport Delete from 'vue-material-design-icons/Delete'\n\n// Email icons\nimport StarOutline from 'vue-material-design-icons/StarOutline'\nimport EmailUnread from 'vue-material-design-icons/Email'\nimport Bookmark from 'vue-material-design-icons/Bookmark'\nimport ClockOutlineIcon from 'vue-material-design-icons/ClockOutline'\nimport AlertOctagonIcon from 'vue-material-design-icons/AlertOctagon'\nimport CheckIcon from 'vue-material-design-icons/Check'\nimport OpenInNewIcon from 'vue-material-design-icons/OpenInNew'\nimport DownloadIcon from 'vue-material-design-icons/Download'\n\n// Formating icons\nimport FormatTitle from 'vue-material-design-icons/FormatTitle.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\nimport FormatBold from 'vue-material-design-icons/FormatBold.vue'\nimport FormatItalic from 'vue-material-design-icons/FormatItalic.vue'\nimport FormatUnderline from 'vue-material-design-icons/FormatUnderline.vue'\n\nexport default {\n\tcomponents: {\n\t\t// Common icons\n\t\tPencil,\n\t\tDelete,\n\n\t\t// Email icons\n\t\tStarOutline,\n\t\tEmailUnread,\n\t\tBookmark,\n\t\tClockOutlineIcon,\n\t\tAlertOctagonIcon,\n\t\tCheckIcon,\n\t\tOpenInNewIcon,\n\t\tDownloadIcon,\n\n\t\t// Formating icons\n\t\tFormatTitle,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t\tFormatBold,\n\t\tFormatItalic,\n\t\tFormatUnderline,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tselected: false,\n\t\t\t// Formating\n\t\t\tchecked: {\n\t\t\t\tbold: true,\n\t\t\t\titalic: false,\n\t\t\t\tunderline: false,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tblack: true,\n\t\t\t\tblue: false,\n\t\t\t\tred: false,\n\t\t\t\tgreen: false,\n\t\t\t},\n\t\t}\n\t},\n}\n</script>\n\n<style scoped>\np {\n\tmargin: 1rem 0;\n}\n</style>\n```\n\n</docs>\n\n<script>\nimport NcButton from '../NcButton/index.js'\nimport NcPopover from '../NcPopover/index.js'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport { t } from '../../l10n.js'\n\nimport Vue, { computed } from 'vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\n\nconst focusableSelector = '.focusable'\n\n/**\n * The Actions component can be used to display one ore more actions.\n * If only a single action is provided, it will be rendered as an inline icon.\n * For more, a menu indicator will be shown and a popovermenu containing the\n * actions will be opened on click.\n *\n * @since 0.10.0\n */\nexport default {\n\tname: 'NcActions',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tDotsHorizontal,\n\t\tNcPopover,\n\t},\n\n\tprovide() {\n\t\treturn {\n\t\t\t/**\n\t\t\t * NcActions can be used as:\n\t\t\t * - Application menu (has menu role)\n\t\t\t * - Navigation (has no specific role, should be used an element with navigation role)\n\t\t\t * - Popover with plain text or text inputs (has no specific role)\n\t\t\t * Depending on the usage (used items), the menu and its items should have different roles for a11y.\n\t\t\t * Provide the role for NcAction* components in the NcActions content.\n\t\t\t * @type {import('vue').ComputedRef<boolean>}\n\t\t\t */\n\t\t\t'NcActions:isSemanticMenu': computed(() => this.isSemanticMenu),\n\t\t}\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Specify the open state of the popover menu\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * This disables the internal open management,\n\t\t * so the actions menu only respects the `open` prop.\n\t\t * This is e.g. necessary for the NcAvatar component\n\t\t * to only open the actions menu after loading it's entries has finished.\n\t\t */\n\t\tmanualOpen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Force the actions to display in a three dot menu\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Force the name to show for single actions\n\t\t */\n\t\tforceName: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Specify the menu name\n\t\t */\n\t\tmenuName: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Apply primary styling for this menu\n\t\t */\n\t\tprimary: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Specifies the button type used for trigger and single actions buttons\n\t\t * Accepted values: primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success. If left empty,\n\t\t * the default button style will be applied.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].indexOf(value) !== -1\n\t\t\t},\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Icon to show for the toggle menu button\n\t\t * when more than one action is inside the actions component.\n\t\t * Only replace the default three-dot icon if really necessary.\n\t\t */\n\t\tdefaultIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Aria label for the actions menu.\n\t\t *\n\t\t * If `menuName` is defined this will not be used to prevent\n\t\t * any accessible name conflicts. This ensures that the\n\t\t * element can be activated via voice input.\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Actions'),\n\t\t},\n\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\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 * Wanted direction of the menu\n\t\t */\n\t\tplacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\n\t\t},\n\n\t\t/**\n\t\t * DOM element for the actions' popover boundaries\n\t\t */\n\t\tboundariesElement: {\n\t\t\ttype: Element,\n\t\t\tdefault: () => document.querySelector('body'),\n\t\t},\n\n\t\t/**\n\t\t * Selector for the actions' popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Disabled state of the main button (single action or menu toggle)\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 * Display x items inline out of the dropdown menu\n\t\t * Will be ignored if `forceMenu` is set\n\t\t */\n\t\tinline: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\t},\n\n\temits: [\n\t\t'open',\n\t\t'update:open',\n\t\t'close',\n\t\t'focus',\n\t\t'blur',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\topened: this.open,\n\t\t\tfocusIndex: 0,\n\t\t\trandomId: `menu-${GenRandomId()}`,\n\t\t\tisSemanticMenu: false,\n\t\t\tisSemanticNavigation: false,\n\t\t\tisSemanticPopoverLike: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\ttriggerBtnType() {\n\t\t\t// If requested, we use a primary button\n\t\t\treturn this.type || (this.primary\n\t\t\t\t? 'primary'\n\t\t\t\t// If it has a name, we use a secondary button\n\t\t\t\t: this.menuName ? 'secondary' : 'tertiary')\n\t\t},\n\t},\n\n\twatch: {\n\t\t// Watch parent prop\n\t\topen(state) {\n\t\t\tif (state === this.opened) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.opened = state\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Do we have exactly one Action and\n\t\t * is it allowed as a standalone element?\n\t\t *\n\t\t * @param {Array} action The action to check\n\t\t * @return {boolean}\n\t\t */\n\t\tisValidSingleAction(action) {\n\t\t\tconst componentName = action?.componentOptions?.Ctor?.extendOptions?.name ?? action?.componentOptions?.tag\n\t\t\treturn ['NcActionButton', 'NcActionLink', 'NcActionRouter'].includes(componentName)\n\t\t},\n\n\t\t// MENU STATE MANAGEMENT\n\t\topenMenu(e) {\n\t\t\tif (this.opened) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.opened = true\n\n\t\t\t/**\n\t\t\t * Event emitted when the popover menu open state is changed\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('update:open', true)\n\n\t\t\t/**\n\t\t\t * Event emitted when the popover menu is opened\n\t\t\t */\n\t\t\tthis.$emit('open')\n\t\t},\n\t\tcloseMenu(returnFocus = true) {\n\t\t\tif (!this.opened) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.opened = false\n\n\t\t\tthis.$refs.popover.clearFocusTrap({ returnFocus })\n\n\t\t\t/**\n\t\t\t * Event emitted when the popover menu open state is changed\n\t\t\t *\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tthis.$emit('update:open', false)\n\n\t\t\t/**\n\t\t\t * Event emitted when the popover menu is closed\n\t\t\t */\n\t\t\tthis.$emit('close')\n\n\t\t\t// close everything\n\t\t\tthis.focusIndex = 0\n\n\t\t\t// focus back the menu button\n\t\t\tthis.$refs.menuButton.$el.focus()\n\t\t},\n\n\t\tonOpen(event) {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.focusFirstAction(event)\n\t\t\t})\n\t\t},\n\n\t\t// MENU KEYS & FOCUS MANAGEMENT\n\t\t// focus nearest focusable item on mouse move\n\t\t// DO NOT change the focus if the target is already focused\n\t\t// this will prevent issues with input being unfocused\n\t\t// on mouse move\n\t\tonMouseFocusAction(event) {\n\t\t\tif (document.activeElement === event.target) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst menuItem = event.target.closest('li')\n\t\t\tif (menuItem && this.$refs.menu.contains(menuItem)) {\n\t\t\t\tconst focusableItem = menuItem.querySelector(focusableSelector)\n\t\t\t\tif (focusableItem) {\n\t\t\t\t\tconst focusList = this.$refs.menu.querySelectorAll(focusableSelector)\n\t\t\t\t\tconst focusIndex = [...focusList].indexOf(focusableItem)\n\t\t\t\t\tif (focusIndex > -1) {\n\t\t\t\t\t\tthis.focusIndex = focusIndex\n\t\t\t\t\t\tthis.focusAction()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Dispatches the keydown listener to different handlers\n\t\t *\n\t\t * @param {object} event The keydown event\n\t\t */\n\t\tonKeydown(event) {\n\t\t\tif (event.key === 'Tab' && !this.isSemanticPopoverLike) {\n\t\t\t\tthis.closeMenu(false)\n\t\t\t}\n\n\t\t\tif (event.key === 'ArrowUp') {\n\t\t\t\tthis.focusPreviousAction(event)\n\t\t\t}\n\n\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\tthis.focusNextAction(event)\n\t\t\t}\n\n\t\t\tif (event.key === 'PageUp') {\n\t\t\t\tthis.focusFirstAction(event)\n\t\t\t}\n\n\t\t\tif (event.key === 'PageDown') {\n\t\t\t\tthis.focusLastAction(event)\n\t\t\t}\n\n\t\t\tif (event.key === 'Escape') {\n\t\t\t\tthis.closeMenu()\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\t\tremoveCurrentActive() {\n\t\t\tconst currentActiveElement = this.$refs.menu.querySelector('li.active')\n\t\t\tif (currentActiveElement) {\n\t\t\t\tcurrentActiveElement.classList.remove('active')\n\t\t\t}\n\t\t},\n\t\tfocusAction() {\n\t\t\t// TODO: have a global disabled state for non input elements\n\t\t\tconst focusElement = this.$refs.menu.querySelectorAll(focusableSelector)[this.focusIndex]\n\t\t\tif (focusElement) {\n\t\t\t\tthis.removeCurrentActive()\n\t\t\t\tconst liMenuParent = focusElement.closest('li.action')\n\t\t\t\tfocusElement.focus()\n\t\t\t\tif (liMenuParent) {\n\t\t\t\t\tliMenuParent.classList.add('active')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tfocusPreviousAction(event) {\n\t\t\tif (this.opened) {\n\t\t\t\tif (this.focusIndex === 0) {\n\t\t\t\t\tthis.focusLastAction(event)\n\t\t\t\t} else {\n\t\t\t\t\tthis.preventIfEvent(event)\n\t\t\t\t\tthis.focusIndex = this.focusIndex - 1\n\t\t\t\t}\n\t\t\t\tthis.focusAction()\n\t\t\t}\n\t\t},\n\t\tfocusNextAction(event) {\n\t\t\tif (this.opened) {\n\t\t\t\tconst indexLength = this.$refs.menu.querySelectorAll(focusableSelector).length - 1\n\t\t\t\tif (this.focusIndex === indexLength) {\n\t\t\t\t\tthis.focusFirstAction(event)\n\t\t\t\t} else {\n\t\t\t\t\tthis.preventIfEvent(event)\n\t\t\t\t\tthis.focusIndex = this.focusIndex + 1\n\t\t\t\t}\n\t\t\t\tthis.focusAction()\n\t\t\t}\n\t\t},\n\t\tfocusFirstAction(event) {\n\t\t\tif (this.opened) {\n\t\t\t\tthis.preventIfEvent(event)\n\t\t\t\t// In case a button is considered aria-selected we will use this one as a initial focus\n\t\t\t\tconst firstSelectedIndex = [...this.$refs.menu.querySelectorAll(focusableSelector)].findIndex((button) => {\n\t\t\t\t\treturn button.parentElement.getAttribute('aria-selected')\n\t\t\t\t})\n\t\t\t\tthis.focusIndex = firstSelectedIndex > -1 ? firstSelectedIndex : 0\n\t\t\t\tthis.focusAction()\n\t\t\t}\n\t\t},\n\t\tfocusLastAction(event) {\n\t\t\tif (this.opened) {\n\t\t\t\tthis.preventIfEvent(event)\n\t\t\t\tthis.focusIndex = this.$refs.menu.querySelectorAll(focusableSelector).length - 1\n\t\t\t\tthis.focusAction()\n\t\t\t}\n\t\t},\n\t\tpreventIfEvent(event) {\n\t\t\tif (event) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\t\tonFocus(event) {\n\t\t\tthis.$emit('focus', event)\n\t\t},\n\t\tonBlur(event) {\n\t\t\tthis.$emit('blur', event)\n\t\t},\n\t},\n\n\t/**\n\t * The render function to display the component\n\t *\n\t * @param {Function} h The function to create VNodes\n\t * @return {object|undefined} The created VNode\n\t */\n\trender(h) {\n\t\t/**\n\t\t * Filter the Actions, so that we only get allowed components.\n\t\t * This also ensure that we don't get 'text' elements, which would\n\t\t * become problematic later on.\n\t\t */\n\t\tconst actions = (this.$slots.default || []).filter(\n\t\t\taction => action?.componentOptions?.tag || action?.componentOptions?.Ctor?.extendOptions?.name,\n\t\t)\n\n\t\tconst getActionName = (action) => action?.componentOptions?.Ctor?.extendOptions?.name ?? action?.componentOptions?.tag\n\n\t\tconst menuItemsActions = ['NcActionButton', 'NcActionButtonGroup', 'NcActionCheckbox', 'NcActionRadio']\n\t\tconst textInputActions = ['NcActionInput', 'NcActionTextEditable']\n\t\tconst linkActions = ['NcActionLink', 'NcActionRouter']\n\n\t\tconst hasTextInputAction = actions.some(action => textInputActions.includes(getActionName(action)))\n\t\tconst hasMenuItemAction = actions.some(action => menuItemsActions.includes(getActionName(action)))\n\t\tconst hasLinkAction = actions.some(action => linkActions.includes(getActionName(action)))\n\n\t\t// We consider the NcActions to have role=\"menu\" if it consists some button-like action and not text inputs\n\t\tthis.isSemanticMenu = hasMenuItemAction && !hasTextInputAction\n\t\t// We consider the NcActions to be navigation if it consists some link-like action\n\t\tthis.isSemanticNavigation = hasLinkAction && !hasMenuItemAction && !hasTextInputAction\n\t\t// If it is no a manu and not a navigation, it is a popover with items: a form or just a text\n\t\tthis.isSemanticPopoverLike = !this.isSemanticMenu && !this.isSemanticNavigation\n\n\t\t/**\n\t\t * Filter and list actions that are allowed to be displayed inline\n\t\t */\n\t\tlet inlineActions = actions.filter(this.isValidSingleAction)\n\t\tif (this.forceMenu && inlineActions.length > 0 && this.inline > 0) {\n\t\t\tVue.util.warn('Specifying forceMenu will ignore any inline actions rendering.')\n\t\t\tinlineActions = []\n\t\t}\n\n\t\t// Check that we have at least one action\n\t\tif (actions.length === 0) {\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Render the provided action\n\t\t *\n\t\t * @param {import('vue').VNode} action the action to render\n\t\t * @return {Function} the vue render function\n\t\t */\n\t\tconst renderInlineAction = (action) => {\n\t\t\tconst icon = action?.data?.scopedSlots?.icon()?.[0]\n\t\t\t\t|| h('span', { class: ['icon', action?.componentOptions?.propsData?.icon] })\n\t\t\tconst attrs = action?.data?.attrs || {}\n\t\t\tconst clickListener = action?.componentOptions?.listeners?.click\n\n\t\t\tconst text = action?.componentOptions?.children?.[0]?.text?.trim?.()\n\t\t\tconst ariaLabel = action?.componentOptions?.propsData?.ariaLabel || text\n\t\t\tconst buttonText = this.forceName ? text : ''\n\n\t\t\tlet title = action?.componentOptions?.propsData?.title\n\t\t\t// Show a default title for single actions if none is present\n\t\t\tif (!(this.forceName || title)) {\n\t\t\t\ttitle = text\n\t\t\t}\n\n\t\t\treturn h('NcButton',\n\t\t\t\t{\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'action-item action-item--single',\n\t\t\t\t\t\taction?.data?.staticClass,\n\t\t\t\t\t\taction?.data?.class,\n\t\t\t\t\t],\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\t...attrs,\n\t\t\t\t\t\t'aria-label': ariaLabel,\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t},\n\t\t\t\t\tref: action?.data?.ref,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t// If it has a menuName, we use a secondary button\n\t\t\t\t\t\ttype: this.type || (buttonText ? 'secondary' : 'tertiary'),\n\t\t\t\t\t\tdisabled: this.disabled || action?.componentOptions?.propsData?.disabled,\n\t\t\t\t\t\t...action?.componentOptions?.propsData,\n\t\t\t\t\t},\n\t\t\t\t\ton: {\n\t\t\t\t\t\tfocus: this.onFocus,\n\t\t\t\t\t\tblur: this.onBlur,\n\t\t\t\t\t\t// If we have a click listener,\n\t\t\t\t\t\t// we bind it to execute on click and forward the click event\n\t\t\t\t\t\t...(!!clickListener && {\n\t\t\t\t\t\t\tclick: (event) => {\n\t\t\t\t\t\t\t\tif (clickListener) {\n\t\t\t\t\t\t\t\t\tclickListener(event)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[\n\t\t\t\t\th('template', { slot: 'icon' }, [icon]),\n\t\t\t\t\tbuttonText,\n\t\t\t\t],\n\t\t\t)\n\t\t}\n\n\t\t/**\n\t\t * Render the actions popover\n\t\t *\n\t\t * @param {Array} actions the actions to render within\n\t\t * @return {Function} the vue render function\n\t\t */\n\t\tconst renderActionsPopover = (actions) => {\n\t\t\tconst triggerIcon = this.$slots.icon?.[0] || (\n\t\t\t\tthis.defaultIcon\n\t\t\t\t\t? h('span', { class: ['icon', this.defaultIcon] })\n\t\t\t\t\t: h('DotsHorizontal', {\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tsize: 20,\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t)\n\t\t\treturn h('NcPopover',\n\t\t\t\t{\n\t\t\t\t\tref: 'popover',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tdelay: 0,\n\t\t\t\t\t\thandleResize: true,\n\t\t\t\t\t\tshown: this.opened,\n\t\t\t\t\t\tplacement: this.placement,\n\t\t\t\t\t\tboundary: this.boundariesElement,\n\t\t\t\t\t\tcontainer: this.container,\n\t\t\t\t\t\tpopoverBaseClass: 'action-item__popper',\n\t\t\t\t\t\t// Menu and navigation should not have focus trap\n\t\t\t\t\t\t// Tab should close the menu and move focus to the next UI element\n\t\t\t\t\t\tsetReturnFocus: !this.isSemanticPopoverLike ? null : this.$refs.menuButton?.$el,\n\t\t\t\t\t\tfocusTrap: this.isSemanticPopoverLike,\n\t\t\t\t\t},\n\t\t\t\t\t// For some reason the popover component\n\t\t\t\t\t// does not react to props given under the 'props' key,\n\t\t\t\t\t// so we use both 'attrs' and 'props'\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\tdelay: 0,\n\t\t\t\t\t\thandleResize: true,\n\t\t\t\t\t\tshown: this.opened,\n\t\t\t\t\t\tplacement: this.placement,\n\t\t\t\t\t\tboundary: this.boundariesElement,\n\t\t\t\t\t\tcontainer: this.container,\n\t\t\t\t\t\t...this.manualOpen && { triggers: [] },\n\t\t\t\t\t},\n\t\t\t\t\ton: {\n\t\t\t\t\t\tshow: this.openMenu,\n\t\t\t\t\t\t'after-show': this.onOpen,\n\t\t\t\t\t\thide: this.closeMenu,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[\n\t\t\t\t\th('NcButton', {\n\t\t\t\t\t\tclass: 'action-item__menutoggle',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\ttype: this.triggerBtnType,\n\t\t\t\t\t\t\tdisabled: this.disabled,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tslot: 'trigger',\n\t\t\t\t\t\tref: 'menuButton',\n\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t'aria-haspopup': this.isSemanticMenu ? null : 'menu',\n\t\t\t\t\t\t\t'aria-label': this.menuName ? null : this.ariaLabel,\n\t\t\t\t\t\t\t'aria-controls': this.opened ? this.randomId : null,\n\t\t\t\t\t\t\t// Do not add aria-expanded=\"true\" when it is closed\n\t\t\t\t\t\t\t'aria-expanded': this.opened ? 'true' : undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\tfocus: this.onFocus,\n\t\t\t\t\t\t\tblur: this.onBlur,\n\t\t\t\t\t\t},\n\t\t\t\t\t}, [\n\t\t\t\t\t\th('template', { slot: 'icon' }, [triggerIcon]),\n\t\t\t\t\t\tthis.menuName,\n\t\t\t\t\t]),\n\t\t\t\t\th('div', {\n\t\t\t\t\t\tclass: {\n\t\t\t\t\t\t\topen: this.opened,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\ttabindex: '-1',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\tkeydown: this.onKeydown,\n\t\t\t\t\t\t\tmousemove: this.onMouseFocusAction,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tref: 'menu',\n\t\t\t\t\t}, [\n\t\t\t\t\t\th('ul', {\n\t\t\t\t\t\t\tattrs: {\n\t\t\t\t\t\t\t\tid: this.randomId,\n\t\t\t\t\t\t\t\ttabindex: '-1',\n\t\t\t\t\t\t\t\trole: this.isSemanticMenu ? 'menu' : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tactions,\n\t\t\t\t\t\t]),\n\t\t\t\t\t]),\n\t\t\t\t],\n\t\t\t)\n\t\t}\n\n\t\t/**\n\t\t * If we have a single action only and didn't force a menu,\n\t\t * we render the action as a standalone button\n\t\t */\n\t\tif (actions.length === 1 && inlineActions.length === 1 && !this.forceMenu) {\n\t\t\treturn renderInlineAction(inlineActions[0])\n\t\t}\n\n\t\t// If we completely re-render the children\n\t\t// we need to focus the first action again\n\t\t// Mostly used when clicking a menu item\n\t\tthis.$nextTick(() => {\n\t\t\tif (this.opened && this.$refs.menu) {\n\t\t\t\tconst isAnyActive = this.$refs.menu.querySelector('li.active') || []\n\t\t\t\tif (isAnyActive.length === 0) {\n\t\t\t\t\tthis.focusFirstAction()\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\t/**\n\t\t * If we some inline actions to render, render them, then the menu\n\t\t */\n\t\tif (inlineActions.length > 0 && this.inline > 0) {\n\t\t\tconst renderedInlineActions = inlineActions.slice(0, this.inline)\n\t\t\t// Filter already rendered actions\n\t\t\tconst menuActions = actions.filter(action => !renderedInlineActions.includes(action))\n\t\t\treturn h('div',\n\t\t\t\t{\n\t\t\t\t\tclass: [\n\t\t\t\t\t\t'action-items',\n\t\t\t\t\t\t`action-item--${this.triggerBtnType}`,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t[\n\t\t\t\t\t// Render inline actions\n\t\t\t\t\t...renderedInlineActions.map(renderInlineAction),\n\t\t\t\t\t// render the rest within the popover menu\n\t\t\t\t\tmenuActions.length > 0\n\t\t\t\t\t\t? h('div',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclass: [\n\t\t\t\t\t\t\t\t\t'action-item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'action-item--open': this.opened,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\trenderActionsPopover(menuActions),\n\t\t\t\t\t\t\t])\n\t\t\t\t\t\t: null,\n\t\t\t\t])\n\t\t}\n\n\t\t/**\n\t\t * Otherwise, we render the actions in a popover\n\t\t */\n\t\treturn h('div',\n\t\t\t{\n\t\t\t\tclass: [\n\t\t\t\t\t'action-item action-item--default-popover',\n\t\t\t\t\t`action-item--${this.triggerBtnType}`,\n\t\t\t\t\t{\n\t\t\t\t\t\t'action-item--open': this.opened,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t[\n\t\t\t\trenderActionsPopover(actions),\n\t\t\t],\n\t\t)\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n// Inline buttons\n.action-items {\n\tdisplay: flex;\n\talign-items: center;\n\n\t// Spacing between buttons\n\t& > button {\n\t\tmargin-right: math.div($icon-margin, 2);\n\t}\n}\n\n.action-item {\n\t--open-background-color: var(--color-background-hover, $action-background-hover);\n\tposition: relative;\n\tdisplay: inline-block;\n\n\t&.action-item--primary {\n\t\t--open-background-color: var(--color-primary-element-hover);\n\t}\n\n\t&.action-item--secondary {\n\t\t--open-background-color: var(--color-primary-element-light-hover);\n\t}\n\n\t&.action-item--error {\n\t\t--open-background-color: var(--color-error-hover);\n\t}\n\n\t&.action-item--warning {\n\t\t--open-background-color: var(--color-warning-hover);\n\t}\n\n\t&.action-item--success {\n\t\t--open-background-color: var(--color-success-hover);\n\t}\n\n\t&.action-item--tertiary-no-background {\n\t\t--open-background-color: transparent;\n\t}\n\n\t&.action-item--open .action-item__menutoggle {\n\t\tbackground-color: var(--open-background-color);\n\t}\n}\n</style>\n\n<style lang=\"scss\">\n// We overwrote the popover base class, so we can style\n// the popover__inner for actions only.\n.v-popper--theme-dropdown.v-popper__popper.action-item__popper .v-popper__wrapper {\n\tborder-radius: var(--border-radius-large);\n\toverflow:hidden;\n\n\t.v-popper__inner {\n\t\tborder-radius: var(--border-radius-large);\n\t\tpadding: 4px;\n\t\tmax-height: calc(50vh - 16px);\n\t\toverflow: auto;\n\t}\n}\n</style>\n"],"names":["focusableSelector","_sfc_main","Components_NcButton","DotsHorizontal","Components_NcPopover","Vue","value","l10n","GenRandomId","state","action","componentName","_e","_c","_b","_a","_d","returnFocus","event","menuItem","focusableItem","focusIndex","currentActiveElement","focusElement","liMenuParent","indexLength","firstSelectedIndex","button","h","actions","getActionName","menuItemsActions","textInputActions","linkActions","hasTextInputAction","hasMenuItemAction","hasLinkAction","inlineActions","Vue__default","renderInlineAction","icon","attrs","_f","clickListener","_h","_g","text","_m","_l","_k","_j","_i","ariaLabel","_o","_n","buttonText","title","_q","_p","_r","_s","_t","_v","_u","_w","renderActionsPopover","triggerIcon","renderedInlineActions","menuActions"],"mappings":";;AAuyBA,MAAAA,IAAA,cAUAC,KAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC,EAAA;AAAA,IACA,WAAAC;AAAA,EACA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUA,4BAAAC,EAAA,SAAA,MAAA,KAAA,cAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAAC,GAAA;AACA,eA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+B,IAAAvC,EAAA,OAAA,CAAAnB,MAAA,CAAAyD,EAAA,SAAAzD,CAAA,CAAA;AACA,aAAAkB;AAAA,QAAA;AAAA,QACA;AAAA,UACA,OAAA;AAAA,YACA;AAAA,YACA,gBAAA,KAAA,cAAA;AAAA,UACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,UAEA,GAAAuC,EAAA,IAAA5B,CAAA;AAAA;AAAA,UAEA6B,EAAA,SAAA,IACAxC;AAAA,YAAA;AAAA,YACA;AAAA,cACA,OAAA;AAAA,gBACA;AAAA,gBACA;AAAA,kBACA,qBAAA,KAAA;AAAA,gBACA;AAAA,cACA;AAAA,YACA;AAAA,YACA;AAAA,cACAqC,EAAAG,CAAA;AAAA,YACA;AAAA,UAAA,IACA;AAAA,QACA;AAAA,MAAA;AAAA,IACA;AAKA,WAAAxC;AAAA,MAAA;AAAA,MACA;AAAA,QACA,OAAA;AAAA,UACA;AAAA,UACA,gBAAA,KAAA,cAAA;AAAA,UACA;AAAA,YACA,qBAAA,KAAA;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,MACA;AAAA,QACAqC,EAAApC,CAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;"}
@@ -1,17 +1,31 @@
1
- import "../assets/index-55600948.css";
2
- import P from "./NcButton.mjs";
3
- import R from "./NcPopover.mjs";
4
- import { G as z } from "../chunks/GenRandomId-cb9ccebe.mjs";
5
- import { t as K } from "../chunks/l10n-f51d3415.mjs";
6
- import V from "vue";
7
- import { D as G } from "../chunks/DotsHorizontal-0ee7d901.mjs";
8
- import { n as j } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
9
- const a = ".focusable", U = {
1
+ import "../assets/index-d1c0876d.css";
2
+ import K from "./NcButton.mjs";
3
+ import U from "./NcPopover.mjs";
4
+ import { G as j } from "../chunks/GenRandomId-cb9ccebe.mjs";
5
+ import { t as J } from "../chunks/l10n-ef44019c.mjs";
6
+ import Q, { computed as W } from "vue";
7
+ import { D as X } from "../chunks/DotsHorizontal-0ee7d901.mjs";
8
+ import { n as Y } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
9
+ const a = ".focusable", Z = {
10
10
  name: "NcActions",
11
11
  components: {
12
- NcButton: P,
13
- DotsHorizontal: G,
14
- NcPopover: R
12
+ NcButton: K,
13
+ DotsHorizontal: X,
14
+ NcPopover: U
15
+ },
16
+ provide() {
17
+ return {
18
+ /**
19
+ * NcActions can be used as:
20
+ * - Application menu (has menu role)
21
+ * - Navigation (has no specific role, should be used an element with navigation role)
22
+ * - Popover with plain text or text inputs (has no specific role)
23
+ * Depending on the usage (used items), the menu and its items should have different roles for a11y.
24
+ * Provide the role for NcAction* components in the NcActions content.
25
+ * @type {import('vue').ComputedRef<boolean>}
26
+ */
27
+ "NcActions:isSemanticMenu": W(() => this.isSemanticMenu)
28
+ };
15
29
  },
16
30
  props: {
17
31
  /**
@@ -89,10 +103,12 @@ const a = ".focusable", U = {
89
103
  */
90
104
  ariaLabel: {
91
105
  type: String,
92
- default: K("Actions")
106
+ default: J("Actions")
93
107
  },
94
108
  /**
95
- * aria-hidden attribute for the icon slot
109
+ * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.
110
+ * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,
111
+ * otherwise root element will inherit incorrect aria-hidden.
96
112
  */
97
113
  ariaHidden: {
98
114
  type: Boolean,
@@ -146,7 +162,10 @@ const a = ".focusable", U = {
146
162
  return {
147
163
  opened: this.open,
148
164
  focusIndex: 0,
149
- randomId: `menu-${z()}`
165
+ randomId: `menu-${j()}`,
166
+ isSemanticMenu: !1,
167
+ isSemanticNavigation: !1,
168
+ isSemanticPopoverLike: !1
150
169
  };
151
170
  },
152
171
  computed: {
@@ -169,8 +188,8 @@ const a = ".focusable", U = {
169
188
  * @return {boolean}
170
189
  */
171
190
  isValidSingleAction(e) {
172
- var u, p, o, d, f;
173
- const s = (f = (o = (p = (u = e == null ? void 0 : e.componentOptions) == null ? void 0 : u.Ctor) == null ? void 0 : p.extendOptions) == null ? void 0 : o.name) != null ? f : (d = e == null ? void 0 : e.componentOptions) == null ? void 0 : d.tag;
191
+ var r, p, l, d, f;
192
+ const s = (f = (l = (p = (r = e == null ? void 0 : e.componentOptions) == null ? void 0 : r.Ctor) == null ? void 0 : p.extendOptions) == null ? void 0 : l.name) != null ? f : (d = e == null ? void 0 : e.componentOptions) == null ? void 0 : d.tag;
174
193
  return ["NcActionButton", "NcActionLink", "NcActionRouter"].includes(s);
175
194
  },
176
195
  // MENU STATE MANAGEMENT
@@ -194,11 +213,11 @@ const a = ".focusable", U = {
194
213
  if (document.activeElement === e.target)
195
214
  return;
196
215
  const s = e.target.closest("li");
197
- if (s) {
198
- const u = s.querySelector(a);
199
- if (u) {
200
- const o = [...this.$refs.menu.querySelectorAll(a)].indexOf(u);
201
- o > -1 && (this.focusIndex = o, this.focusAction());
216
+ if (s && this.$refs.menu.contains(s)) {
217
+ const r = s.querySelector(a);
218
+ if (r) {
219
+ const l = [...this.$refs.menu.querySelectorAll(a)].indexOf(r);
220
+ l > -1 && (this.focusIndex = l, this.focusAction());
202
221
  }
203
222
  }
204
223
  },
@@ -208,7 +227,7 @@ const a = ".focusable", U = {
208
227
  * @param {object} event The keydown event
209
228
  */
210
229
  onKeydown(e) {
211
- (e.keyCode === 38 || e.keyCode === 9 && e.shiftKey) && this.focusPreviousAction(e), (e.keyCode === 40 || e.keyCode === 9 && !e.shiftKey) && this.focusNextAction(e), e.keyCode === 33 && this.focusFirstAction(e), e.keyCode === 34 && this.focusLastAction(e), e.keyCode === 27 && (this.closeMenu(), e.preventDefault());
230
+ e.key === "Tab" && !this.isSemanticPopoverLike && this.closeMenu(!1), e.key === "ArrowUp" && this.focusPreviousAction(e), e.key === "ArrowDown" && this.focusNextAction(e), e.key === "PageUp" && this.focusFirstAction(e), e.key === "PageDown" && this.focusLastAction(e), e.key === "Escape" && (this.closeMenu(), e.preventDefault());
212
231
  },
213
232
  removeCurrentActive() {
214
233
  const e = this.$refs.menu.querySelector("li.active");
@@ -223,18 +242,18 @@ const a = ".focusable", U = {
223
242
  }
224
243
  },
225
244
  focusPreviousAction(e) {
226
- this.opened && (this.focusIndex === 0 ? this.closeMenu() : (this.preventIfEvent(e), this.focusIndex = this.focusIndex - 1), this.focusAction());
245
+ this.opened && (this.focusIndex === 0 ? this.focusLastAction(e) : (this.preventIfEvent(e), this.focusIndex = this.focusIndex - 1), this.focusAction());
227
246
  },
228
247
  focusNextAction(e) {
229
248
  if (this.opened) {
230
249
  const s = this.$refs.menu.querySelectorAll(a).length - 1;
231
- this.focusIndex === s ? this.closeMenu() : (this.preventIfEvent(e), this.focusIndex = this.focusIndex + 1), this.focusAction();
250
+ this.focusIndex === s ? this.focusFirstAction(e) : (this.preventIfEvent(e), this.focusIndex = this.focusIndex + 1), this.focusAction();
232
251
  }
233
252
  },
234
253
  focusFirstAction(e) {
235
254
  if (this.opened) {
236
255
  this.preventIfEvent(e);
237
- const s = [...this.$refs.menu.querySelectorAll(a)].findIndex((u) => u.parentElement.getAttribute("aria-selected"));
256
+ const s = [...this.$refs.menu.querySelectorAll(a)].findIndex((r) => r.parentElement.getAttribute("aria-selected"));
238
257
  this.focusIndex = s > -1 ? s : 0, this.focusAction();
239
258
  }
240
259
  },
@@ -260,66 +279,65 @@ const a = ".focusable", U = {
260
279
  render(e) {
261
280
  const s = (this.$slots.default || []).filter(
262
281
  (t) => {
263
- var l, n, i, r;
264
- return ((l = t == null ? void 0 : t.componentOptions) == null ? void 0 : l.tag) || ((r = (i = (n = t == null ? void 0 : t.componentOptions) == null ? void 0 : n.Ctor) == null ? void 0 : i.extendOptions) == null ? void 0 : r.name);
282
+ var n, i, o, c;
283
+ return ((n = t == null ? void 0 : t.componentOptions) == null ? void 0 : n.tag) || ((c = (o = (i = t == null ? void 0 : t.componentOptions) == null ? void 0 : i.Ctor) == null ? void 0 : o.extendOptions) == null ? void 0 : c.name);
265
284
  }
266
- ), u = (t) => {
267
- var i, r, g, m, c, h, y;
268
- const l = (c = (g = (r = (i = t == null ? void 0 : t.componentOptions) == null ? void 0 : i.Ctor) == null ? void 0 : r.extendOptions) == null ? void 0 : g.name) != null ? c : (m = t == null ? void 0 : t.componentOptions) == null ? void 0 : m.tag, n = (y = (h = t == null ? void 0 : t.componentOptions) == null ? void 0 : h.propsData) == null ? void 0 : y.href;
269
- return l === "NcActionLink" && !(n != null && n.startsWith("#")) && new URL(n, window.location.origin).origin === window.location.origin;
270
- }, p = s.every(u);
271
- let o = s.filter(this.isValidSingleAction);
272
- if (this.forceMenu && o.length > 0 && this.inline > 0 && (V.util.warn("Specifying forceMenu will ignore any inline actions rendering."), o = []), s.length === 0)
285
+ ), r = (t) => {
286
+ var n, i, o, c, m;
287
+ return (m = (o = (i = (n = t == null ? void 0 : t.componentOptions) == null ? void 0 : n.Ctor) == null ? void 0 : i.extendOptions) == null ? void 0 : o.name) != null ? m : (c = t == null ? void 0 : t.componentOptions) == null ? void 0 : c.tag;
288
+ }, p = ["NcActionButton", "NcActionButtonGroup", "NcActionCheckbox", "NcActionRadio"], l = ["NcActionInput", "NcActionTextEditable"], d = ["NcActionLink", "NcActionRouter"], f = s.some((t) => l.includes(r(t))), A = s.some((t) => p.includes(r(t))), H = s.some((t) => d.includes(r(t)));
289
+ this.isSemanticMenu = A && !f, this.isSemanticNavigation = H && !A && !f, this.isSemanticPopoverLike = !this.isSemanticMenu && !this.isSemanticNavigation;
290
+ let u = s.filter(this.isValidSingleAction);
291
+ if (this.forceMenu && u.length > 0 && this.inline > 0 && (Q.util.warn("Specifying forceMenu will ignore any inline actions rendering."), u = []), s.length === 0)
273
292
  return;
274
- const d = (t) => {
275
- var h, y, x, b, v, I, _, N, $, O, B, A, S, k, w, L, C, E, M, F, D, q, T;
276
- const l = ((x = (y = (h = t == null ? void 0 : t.data) == null ? void 0 : h.scopedSlots) == null ? void 0 : y.icon()) == null ? void 0 : x[0]) || e("span", { class: ["icon", (v = (b = t == null ? void 0 : t.componentOptions) == null ? void 0 : b.propsData) == null ? void 0 : v.icon] }), n = ((I = t == null ? void 0 : t.data) == null ? void 0 : I.attrs) || {}, i = (N = (_ = t == null ? void 0 : t.componentOptions) == null ? void 0 : _.listeners) == null ? void 0 : N.click, r = (S = (A = (B = (O = ($ = t == null ? void 0 : t.componentOptions) == null ? void 0 : $.children) == null ? void 0 : O[0]) == null ? void 0 : B.text) == null ? void 0 : A.trim) == null ? void 0 : S.call(A), g = ((w = (k = t == null ? void 0 : t.componentOptions) == null ? void 0 : k.propsData) == null ? void 0 : w.ariaLabel) || r, m = this.forceName ? r : "";
277
- let c = (C = (L = t == null ? void 0 : t.componentOptions) == null ? void 0 : L.propsData) == null ? void 0 : C.title;
278
- return this.forceName || c || (c = r), e(
293
+ const g = (t) => {
294
+ var x, I, N, S, _, $, B, k, O, L, M, h, E, w, P, F, D, T, q, C, R, z, G;
295
+ const n = ((N = (I = (x = t == null ? void 0 : t.data) == null ? void 0 : x.scopedSlots) == null ? void 0 : I.icon()) == null ? void 0 : N[0]) || e("span", { class: ["icon", (_ = (S = t == null ? void 0 : t.componentOptions) == null ? void 0 : S.propsData) == null ? void 0 : _.icon] }), i = (($ = t == null ? void 0 : t.data) == null ? void 0 : $.attrs) || {}, o = (k = (B = t == null ? void 0 : t.componentOptions) == null ? void 0 : B.listeners) == null ? void 0 : k.click, c = (E = (h = (M = (L = (O = t == null ? void 0 : t.componentOptions) == null ? void 0 : O.children) == null ? void 0 : L[0]) == null ? void 0 : M.text) == null ? void 0 : h.trim) == null ? void 0 : E.call(h), m = ((P = (w = t == null ? void 0 : t.componentOptions) == null ? void 0 : w.propsData) == null ? void 0 : P.ariaLabel) || c, v = this.forceName ? c : "";
296
+ let y = (D = (F = t == null ? void 0 : t.componentOptions) == null ? void 0 : F.propsData) == null ? void 0 : D.title;
297
+ return this.forceName || y || (y = c), e(
279
298
  "NcButton",
280
299
  {
281
300
  class: [
282
301
  "action-item action-item--single",
283
- (E = t == null ? void 0 : t.data) == null ? void 0 : E.staticClass,
284
- (M = t == null ? void 0 : t.data) == null ? void 0 : M.class
302
+ (T = t == null ? void 0 : t.data) == null ? void 0 : T.staticClass,
303
+ (q = t == null ? void 0 : t.data) == null ? void 0 : q.class
285
304
  ],
286
305
  attrs: {
287
- ...n,
288
- "aria-label": g,
289
- title: c
306
+ ...i,
307
+ "aria-label": m,
308
+ title: y
290
309
  },
291
- ref: (F = t == null ? void 0 : t.data) == null ? void 0 : F.ref,
310
+ ref: (C = t == null ? void 0 : t.data) == null ? void 0 : C.ref,
292
311
  props: {
293
312
  // If it has a menuName, we use a secondary button
294
- type: this.type || (m ? "secondary" : "tertiary"),
295
- disabled: this.disabled || ((q = (D = t == null ? void 0 : t.componentOptions) == null ? void 0 : D.propsData) == null ? void 0 : q.disabled),
296
- ariaHidden: this.ariaHidden,
297
- ...(T = t == null ? void 0 : t.componentOptions) == null ? void 0 : T.propsData
313
+ type: this.type || (v ? "secondary" : "tertiary"),
314
+ disabled: this.disabled || ((z = (R = t == null ? void 0 : t.componentOptions) == null ? void 0 : R.propsData) == null ? void 0 : z.disabled),
315
+ ...(G = t == null ? void 0 : t.componentOptions) == null ? void 0 : G.propsData
298
316
  },
299
317
  on: {
300
318
  focus: this.onFocus,
301
319
  blur: this.onBlur,
302
320
  // If we have a click listener,
303
321
  // we bind it to execute on click and forward the click event
304
- ...!!i && {
305
- click: (H) => {
306
- i && i(H);
322
+ ...!!o && {
323
+ click: (V) => {
324
+ o && o(V);
307
325
  }
308
326
  }
309
327
  }
310
328
  },
311
329
  [
312
- e("template", { slot: "icon" }, [l]),
313
- m
330
+ e("template", { slot: "icon" }, [n]),
331
+ v
314
332
  ]
315
333
  );
316
- }, f = (t) => {
317
- var i, r;
318
- const l = ((i = this.$slots.icon) == null ? void 0 : i[0]) || (this.defaultIcon ? e("span", { class: ["icon", this.defaultIcon] }) : e("DotsHorizontal", {
334
+ }, b = (t) => {
335
+ var i, o;
336
+ const n = ((i = this.$slots.icon) == null ? void 0 : i[0]) || (this.defaultIcon ? e("span", { class: ["icon", this.defaultIcon] }) : e("DotsHorizontal", {
319
337
  props: {
320
338
  size: 20
321
339
  }
322
- })), n = () => p || this.opened ? this.opened.toString() : null;
340
+ }));
323
341
  return e(
324
342
  "NcPopover",
325
343
  {
@@ -332,7 +350,10 @@ const a = ".focusable", U = {
332
350
  boundary: this.boundariesElement,
333
351
  container: this.container,
334
352
  popoverBaseClass: "action-item__popper",
335
- setReturnFocus: (r = this.$refs.menuButton) == null ? void 0 : r.$el
353
+ // Menu and navigation should not have focus trap
354
+ // Tab should close the menu and move focus to the next UI element
355
+ setReturnFocus: this.isSemanticPopoverLike ? (o = this.$refs.menuButton) == null ? void 0 : o.$el : null,
356
+ focusTrap: this.isSemanticPopoverLike
336
357
  },
337
358
  // For some reason the popover component
338
359
  // does not react to props given under the 'props' key,
@@ -357,23 +378,23 @@ const a = ".focusable", U = {
357
378
  class: "action-item__menutoggle",
358
379
  props: {
359
380
  type: this.triggerBtnType,
360
- disabled: this.disabled,
361
- ariaHidden: this.ariaHidden
381
+ disabled: this.disabled
362
382
  },
363
383
  slot: "trigger",
364
384
  ref: "menuButton",
365
385
  attrs: {
366
- "aria-haspopup": p ? null : "menu",
386
+ "aria-haspopup": this.isSemanticMenu ? null : "menu",
367
387
  "aria-label": this.menuName ? null : this.ariaLabel,
368
388
  "aria-controls": this.opened ? this.randomId : null,
369
- "aria-expanded": n()
389
+ // Do not add aria-expanded="true" when it is closed
390
+ "aria-expanded": this.opened ? "true" : void 0
370
391
  },
371
392
  on: {
372
393
  focus: this.onFocus,
373
394
  blur: this.onBlur
374
395
  }
375
396
  }, [
376
- e("template", { slot: "icon" }, [l]),
397
+ e("template", { slot: "icon" }, [n]),
377
398
  this.menuName
378
399
  ]),
379
400
  e("div", {
@@ -393,7 +414,7 @@ const a = ".focusable", U = {
393
414
  attrs: {
394
415
  id: this.randomId,
395
416
  tabindex: "-1",
396
- role: p ? null : "menu"
417
+ role: this.isSemanticMenu ? "menu" : void 0
397
418
  }
398
419
  }, [
399
420
  t
@@ -402,12 +423,12 @@ const a = ".focusable", U = {
402
423
  ]
403
424
  );
404
425
  };
405
- if (s.length === 1 && o.length === 1 && !this.forceMenu)
406
- return d(o[0]);
426
+ if (s.length === 1 && u.length === 1 && !this.forceMenu)
427
+ return g(u[0]);
407
428
  if (this.$nextTick(() => {
408
429
  this.opened && this.$refs.menu && (this.$refs.menu.querySelector("li.active") || []).length === 0 && this.focusFirstAction();
409
- }), o.length > 0 && this.inline > 0) {
410
- const t = o.slice(0, this.inline), l = s.filter((n) => !t.includes(n));
430
+ }), u.length > 0 && this.inline > 0) {
431
+ const t = u.slice(0, this.inline), n = s.filter((i) => !t.includes(i));
411
432
  return e(
412
433
  "div",
413
434
  {
@@ -418,9 +439,9 @@ const a = ".focusable", U = {
418
439
  },
419
440
  [
420
441
  // Render inline actions
421
- ...t.map(d),
442
+ ...t.map(g),
422
443
  // render the rest within the popover menu
423
- l.length > 0 ? e(
444
+ n.length > 0 ? e(
424
445
  "div",
425
446
  {
426
447
  class: [
@@ -431,7 +452,7 @@ const a = ".focusable", U = {
431
452
  ]
432
453
  },
433
454
  [
434
- f(l)
455
+ b(n)
435
456
  ]
436
457
  ) : null
437
458
  ]
@@ -449,22 +470,22 @@ const a = ".focusable", U = {
449
470
  ]
450
471
  },
451
472
  [
452
- f(s)
473
+ b(s)
453
474
  ]
454
475
  );
455
476
  }
456
- }, W = null, J = null;
457
- var Q = /* @__PURE__ */ j(
458
- U,
459
- W,
460
- J,
477
+ }, ee = null, te = null;
478
+ var se = /* @__PURE__ */ Y(
479
+ Z,
480
+ ee,
481
+ te,
461
482
  !1,
462
483
  null,
463
- "f797c400",
484
+ "7baca6e4",
464
485
  null,
465
486
  null
466
487
  );
467
- const ie = Q.exports;
488
+ const pe = se.exports;
468
489
  export {
469
- ie as default
490
+ pe as default
470
491
  };