@nextcloud/vue 8.0.1 → 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.
- package/CHANGELOG.md +43 -0
- package/dist/Components/NcActionButton.cjs +16 -8
- package/dist/Components/NcActionButton.cjs.map +1 -1
- package/dist/Components/NcActionButton.mjs +21 -13
- package/dist/Components/NcActionButton.mjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.cjs +22 -11
- package/dist/Components/NcActionButtonGroup.cjs.map +1 -1
- package/dist/Components/NcActionButtonGroup.mjs +19 -7
- package/dist/Components/NcActionButtonGroup.mjs.map +1 -1
- package/dist/Components/NcActionCaption.cjs +17 -11
- package/dist/Components/NcActionCaption.cjs.map +1 -1
- package/dist/Components/NcActionCaption.mjs +14 -8
- package/dist/Components/NcActionCaption.mjs.map +1 -1
- package/dist/Components/NcActionCheckbox.cjs +26 -11
- package/dist/Components/NcActionCheckbox.cjs.map +1 -1
- package/dist/Components/NcActionCheckbox.mjs +26 -11
- package/dist/Components/NcActionCheckbox.mjs.map +1 -1
- package/dist/Components/NcActionInput.cjs +7 -5
- package/dist/Components/NcActionInput.cjs.map +1 -1
- package/dist/Components/NcActionInput.mjs +11 -9
- package/dist/Components/NcActionInput.mjs.map +1 -1
- package/dist/Components/NcActionLink.cjs +14 -6
- package/dist/Components/NcActionLink.cjs.map +1 -1
- package/dist/Components/NcActionLink.mjs +19 -11
- package/dist/Components/NcActionLink.mjs.map +1 -1
- package/dist/Components/NcActionRadio.cjs +29 -14
- package/dist/Components/NcActionRadio.cjs.map +1 -1
- package/dist/Components/NcActionRadio.mjs +26 -11
- package/dist/Components/NcActionRadio.mjs.map +1 -1
- package/dist/Components/NcActionRouter.cjs +14 -8
- package/dist/Components/NcActionRouter.cjs.map +1 -1
- package/dist/Components/NcActionRouter.mjs +17 -11
- package/dist/Components/NcActionRouter.mjs.map +1 -1
- package/dist/Components/NcActionSeparator.cjs +10 -10
- package/dist/Components/NcActionSeparator.cjs.map +1 -1
- package/dist/Components/NcActionSeparator.mjs +11 -11
- package/dist/Components/NcActionSeparator.mjs.map +1 -1
- package/dist/Components/NcActionText.cjs +15 -9
- package/dist/Components/NcActionText.cjs.map +1 -1
- package/dist/Components/NcActionText.mjs +20 -14
- package/dist/Components/NcActionText.mjs.map +1 -1
- package/dist/Components/NcActionTextEditable.cjs +1 -1
- package/dist/Components/NcActionTextEditable.mjs +1 -1
- package/dist/Components/NcActions.cjs +100 -79
- package/dist/Components/NcActions.cjs.map +1 -1
- package/dist/Components/NcActions.mjs +103 -82
- package/dist/Components/NcActions.mjs.map +1 -1
- package/dist/Components/NcAppContent.cjs +9 -5
- package/dist/Components/NcAppContent.cjs.map +1 -1
- package/dist/Components/NcAppContent.mjs +13 -9
- package/dist/Components/NcAppContent.mjs.map +1 -1
- package/dist/Components/NcAppNavigation.cjs +11 -7
- package/dist/Components/NcAppNavigation.cjs.map +1 -1
- package/dist/Components/NcAppNavigation.mjs +9 -5
- package/dist/Components/NcAppNavigation.mjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.cjs +16 -12
- package/dist/Components/NcAppNavigationItem.cjs.map +1 -1
- package/dist/Components/NcAppNavigationItem.mjs +14 -10
- package/dist/Components/NcAppNavigationItem.mjs.map +1 -1
- package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
- package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
- package/dist/Components/NcAppNavigationSettings.cjs +4 -2
- package/dist/Components/NcAppNavigationSettings.cjs.map +1 -1
- package/dist/Components/NcAppNavigationSettings.mjs +6 -4
- package/dist/Components/NcAppNavigationSettings.mjs.map +1 -1
- package/dist/Components/NcAppNavigationToggle.cjs +1 -1
- package/dist/Components/NcAppNavigationToggle.mjs +1 -1
- package/dist/Components/NcAppSettingsDialog.cjs +43 -39
- package/dist/Components/NcAppSettingsDialog.cjs.map +1 -1
- package/dist/Components/NcAppSettingsDialog.mjs +63 -58
- package/dist/Components/NcAppSettingsDialog.mjs.map +1 -1
- package/dist/Components/NcAppSidebar.cjs +3 -3
- package/dist/Components/NcAppSidebar.cjs.map +1 -1
- package/dist/Components/NcAppSidebar.mjs +3 -3
- package/dist/Components/NcAppSidebar.mjs.map +1 -1
- package/dist/Components/NcAvatar.cjs +1 -1
- package/dist/Components/NcAvatar.mjs +1 -1
- package/dist/Components/NcButton.cjs +6 -4
- package/dist/Components/NcButton.cjs.map +1 -1
- package/dist/Components/NcButton.mjs +11 -9
- package/dist/Components/NcButton.mjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.cjs +3 -3
- package/dist/Components/NcCheckboxRadioSwitch.cjs.map +1 -1
- package/dist/Components/NcCheckboxRadioSwitch.mjs +3 -3
- package/dist/Components/NcCheckboxRadioSwitch.mjs.map +1 -1
- package/dist/Components/NcColorPicker.cjs +48 -31
- package/dist/Components/NcColorPicker.cjs.map +1 -1
- package/dist/Components/NcColorPicker.mjs +56 -38
- package/dist/Components/NcColorPicker.mjs.map +1 -1
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +2 -2
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTime.cjs +17 -14
- package/dist/Components/NcDateTime.cjs.map +1 -1
- package/dist/Components/NcDateTime.mjs +18 -15
- package/dist/Components/NcDateTime.mjs.map +1 -1
- package/dist/Components/NcDateTimePicker.cjs +2 -2
- package/dist/Components/NcDateTimePicker.mjs +4 -4
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcEmojiPicker.cjs +1 -1
- package/dist/Components/NcEmojiPicker.mjs +1 -1
- package/dist/Components/NcHeaderMenu.cjs +11 -9
- package/dist/Components/NcHeaderMenu.cjs.map +1 -1
- package/dist/Components/NcHeaderMenu.mjs +16 -14
- package/dist/Components/NcHeaderMenu.mjs.map +1 -1
- package/dist/Components/NcListItem.cjs +1 -1
- package/dist/Components/NcListItem.mjs +1 -1
- package/dist/Components/NcListItemIcon.cjs +4 -2
- package/dist/Components/NcListItemIcon.cjs.map +1 -1
- package/dist/Components/NcListItemIcon.mjs +9 -7
- package/dist/Components/NcListItemIcon.mjs.map +1 -1
- package/dist/Components/NcModal.cjs +1 -1
- package/dist/Components/NcModal.mjs +3 -3
- package/dist/Components/NcPasswordField.cjs +1 -1
- package/dist/Components/NcPasswordField.mjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
- package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +5 -5
- package/dist/Components/NcRichContenteditable.cjs.map +1 -1
- package/dist/Components/NcRichContenteditable.mjs +5 -5
- package/dist/Components/NcRichContenteditable.mjs.map +1 -1
- package/dist/Components/NcRichText.cjs +1 -1
- package/dist/Components/NcRichText.mjs +3 -3
- package/dist/Components/NcSelect.cjs +2 -2
- package/dist/Components/NcSelect.cjs.map +1 -1
- package/dist/Components/NcSelect.mjs +3 -3
- package/dist/Components/NcSelect.mjs.map +1 -1
- package/dist/Components/NcSelectTags.cjs +1 -1
- package/dist/Components/NcSelectTags.mjs +1 -1
- package/dist/Components/NcSettingsInputText.cjs +1 -1
- package/dist/Components/NcSettingsInputText.mjs +1 -1
- package/dist/Components/NcSettingsSection.cjs +1 -1
- package/dist/Components/NcSettingsSection.mjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
- package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
- package/dist/Components/NcTextArea.cjs +5 -5
- package/dist/Components/NcTextArea.cjs.map +1 -1
- package/dist/Components/NcTextArea.mjs +4 -4
- package/dist/Components/NcTextArea.mjs.map +1 -1
- package/dist/Components/NcTextField.cjs +25 -17
- package/dist/Components/NcTextField.cjs.map +1 -1
- package/dist/Components/NcTextField.mjs +27 -19
- package/dist/Components/NcTextField.mjs.map +1 -1
- package/dist/Components/NcTimezonePicker.cjs +1 -1
- package/dist/Components/NcTimezonePicker.mjs +1 -1
- package/dist/Components/NcUserBubble.cjs +1 -1
- package/dist/Components/NcUserBubble.mjs +1 -1
- package/dist/Composables/useIsFullscreen.cjs +34 -0
- package/dist/Composables/useIsFullscreen.cjs.map +1 -0
- package/dist/Composables/useIsFullscreen.mjs +34 -0
- package/dist/Composables/useIsFullscreen.mjs.map +1 -0
- package/dist/Composables/useIsMobile.cjs +35 -0
- package/dist/Composables/useIsMobile.cjs.map +1 -0
- package/dist/Composables/useIsMobile.mjs +35 -0
- package/dist/Composables/useIsMobile.mjs.map +1 -0
- package/dist/Functions/usernameToColor.cjs +1 -1
- package/dist/Functions/usernameToColor.mjs +1 -1
- package/dist/Mixins/isFullscreen.cjs +10 -19
- package/dist/Mixins/isFullscreen.cjs.map +1 -1
- package/dist/Mixins/isFullscreen.mjs +10 -19
- package/dist/Mixins/isFullscreen.mjs.map +1 -1
- package/dist/Mixins/isMobile.cjs +10 -62
- package/dist/Mixins/isMobile.cjs.map +1 -1
- package/dist/Mixins/isMobile.mjs +10 -62
- package/dist/Mixins/isMobile.mjs.map +1 -1
- package/dist/assets/{NcSettingsSelectGroup-0d38d76b.css → NcSettingsSelectGroup-6ddb63a6.css} +2 -2
- package/dist/assets/{index-d3702c91.css → index-00012a4c.css} +18 -18
- package/dist/assets/{index-8f52a20f.css → index-018895f7.css} +2 -2
- package/dist/assets/{index-6899d75b.css → index-30ca9574.css} +31 -30
- package/dist/assets/{index-7d211db9.css → index-3d1ccc15.css} +31 -16
- package/dist/assets/{index-441b6552.css → index-418d4e87.css} +2 -2
- package/dist/assets/{index-ebbb7829.css → index-4437e6bf.css} +8 -8
- package/dist/assets/{index-4271da53.css → index-4596132f.css} +17 -17
- package/dist/assets/{index-05760fea.css → index-4ba699a1.css} +12 -12
- package/dist/assets/{index-db5a8b1c.css → index-51c1f2a9.css} +15 -11
- package/dist/assets/{index-24f6c355.css → index-542cf50a.css} +12 -12
- package/dist/assets/{index-dea0aef3.css → index-5c74e333.css} +10 -10
- package/dist/assets/{index-802d2118.css → index-7fac55ed.css} +16 -16
- package/dist/assets/{index-e7c55791.css → index-9020d9ca.css} +67 -67
- package/dist/assets/{index-4ef32afd.css → index-a9d1ad5c.css} +26 -23
- package/dist/assets/{index-55600948.css → index-d1c0876d.css} +11 -11
- package/dist/assets/{index-fbc0b606.css → index-db846386.css} +10 -9
- package/dist/assets/{index-baf8711a.css → index-e0e6bab6.css} +12 -12
- package/dist/assets/{index-0e9b11c7.css → index-e9fce208.css} +16 -16
- package/dist/assets/{index-d812ed9e.css → index-f091e784.css} +43 -43
- package/dist/assets/{index-9176105d.css → index-f8d6daf3.css} +41 -41
- package/dist/assets/{index-750c02cc.css → index-f9bfa317.css} +3 -0
- package/dist/assets/{index-d9ae9479.css → index-ffa6d11c.css} +7 -7
- package/dist/chunks/GenColors-02173e2c.mjs +56 -0
- package/dist/chunks/GenColors-02173e2c.mjs.map +1 -0
- package/dist/chunks/GenColors-4314c256.cjs +55 -0
- package/dist/chunks/GenColors-4314c256.cjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-60664a28.cjs → NcAppNavigationToggle-1301e882.cjs} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-60664a28.cjs.map → NcAppNavigationToggle-1301e882.cjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-82764816.mjs → NcAppNavigationToggle-2574bba5.mjs} +1 -1
- package/dist/chunks/{NcAppNavigationToggle-82764816.mjs.map → NcAppNavigationToggle-2574bba5.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-262d455f.cjs → NcInputConfirmCancel-9906b563.cjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-262d455f.cjs.map → NcInputConfirmCancel-9906b563.cjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-906c7816.mjs → NcInputConfirmCancel-a612e6a3.mjs} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-906c7816.mjs.map → NcInputConfirmCancel-a612e6a3.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-ae95c854.cjs → NcRichText-9f77a9c6.cjs} +1 -1
- package/dist/chunks/{NcRichText-ae95c854.cjs.map → NcRichText-9f77a9c6.cjs.map} +1 -1
- package/dist/chunks/{NcRichText-1e8fd02d.mjs → NcRichText-f5cfcd57.mjs} +1 -1
- package/dist/chunks/{NcRichText-1e8fd02d.mjs.map → NcRichText-f5cfcd57.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-ae323579.mjs → NcSettingsSelectGroup-091c0306.mjs} +12 -12
- package/dist/chunks/NcSettingsSelectGroup-091c0306.mjs.map +1 -0
- package/dist/chunks/{NcSettingsSelectGroup-e8f9f9fe.cjs → NcSettingsSelectGroup-0f71fef4.cjs} +12 -12
- package/dist/chunks/NcSettingsSelectGroup-0f71fef4.cjs.map +1 -0
- package/dist/chunks/{ScopeComponent-1ab1ebb9.mjs → ScopeComponent-3ea00dcd.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-1ab1ebb9.mjs.map → ScopeComponent-3ea00dcd.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-50287dad.cjs → ScopeComponent-df4b58b1.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-50287dad.cjs.map → ScopeComponent-df4b58b1.cjs.map} +1 -1
- package/dist/chunks/{actionText-a64be267.mjs → actionText-60ff01d1.mjs} +3 -1
- package/dist/chunks/{actionText-54bc24a6.cjs.map → actionText-60ff01d1.mjs.map} +1 -1
- package/dist/chunks/{actionText-54bc24a6.cjs → actionText-9582810f.cjs} +3 -1
- package/dist/chunks/{actionText-a64be267.mjs.map → actionText-9582810f.cjs.map} +1 -1
- package/dist/chunks/{index-fbf943b3.mjs → index-cea13a24.mjs} +6 -4
- package/dist/chunks/{index-fbf943b3.mjs.map → index-cea13a24.mjs.map} +1 -1
- package/dist/chunks/{index-e06b96d3.cjs → index-dc10fd2b.cjs} +7 -5
- package/dist/chunks/{index-e06b96d3.cjs.map → index-dc10fd2b.cjs.map} +1 -1
- package/dist/chunks/{l10n-ec2d3010.cjs → l10n-a12cdbfa.cjs} +1 -1
- package/dist/chunks/{l10n-ec2d3010.cjs.map → l10n-a12cdbfa.cjs.map} +1 -1
- package/dist/chunks/{l10n-9fc9974f.mjs → l10n-c603e589.mjs} +1 -1
- package/dist/chunks/{l10n-9fc9974f.mjs.map → l10n-c603e589.mjs.map} +1 -1
- package/dist/chunks/l10n-e9ffbe5e.cjs +29 -0
- package/dist/chunks/l10n-e9ffbe5e.cjs.map +1 -0
- package/dist/chunks/l10n-ef44019c.mjs +31 -0
- package/dist/chunks/l10n-ef44019c.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-e033bf2c.cjs → referencePickerModal-aa5d3f47.cjs} +1 -1
- package/dist/chunks/{referencePickerModal-e033bf2c.cjs.map → referencePickerModal-aa5d3f47.cjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-6bc8f6b9.mjs → referencePickerModal-c2f33569.mjs} +1 -1
- package/dist/chunks/{referencePickerModal-6bc8f6b9.mjs.map → referencePickerModal-c2f33569.mjs.map} +1 -1
- package/dist/index.cjs +139 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +96 -89
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunks/GenColors-38246c38.mjs +0 -46
- package/dist/chunks/GenColors-38246c38.mjs.map +0 -1
- package/dist/chunks/GenColors-eedcc70a.cjs +0 -45
- package/dist/chunks/GenColors-eedcc70a.cjs.map +0 -1
- package/dist/chunks/NcSettingsSelectGroup-ae323579.mjs.map +0 -1
- package/dist/chunks/NcSettingsSelectGroup-e8f9f9fe.cjs.map +0 -1
- package/dist/chunks/l10n-f491109d.cjs +0 -29
- package/dist/chunks/l10n-f491109d.cjs.map +0 -1
- package/dist/chunks/l10n-f692947e.mjs +0 -31
- package/dist/chunks/l10n-f692947e.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionText.cjs","sources":["../../src/components/NcActionText/NcActionText.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<li class=\"action\">\n\t\t<span class=\"action-text\"\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span v-if=\"icon !== ''\"\n\t\t\t\t\t:class=\"[isIconUrl ? 'action-text__icon--url' : icon]\"\n\t\t\t\t\
|
|
1
|
+
{"version":3,"file":"NcActionText.cjs","sources":["../../src/components/NcActionText/NcActionText.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<li class=\"action\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<span class=\"action-text\"\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span v-if=\"icon !== ''\"\n\t\t\t\t\t:class=\"[isIconUrl ? 'action-text__icon--url' : icon]\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\tclass=\"action-text__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span v-if=\"name\"\n\t\t\t\tclass=\"action-text__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-text__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-text__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-text__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-text__text\">{{ text }}</span>\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</span>\n\t</li>\n</template>\n\n<script>\nimport ActionTextMixin from '../../mixins/actionText.js'\n\nexport default {\n\tname: 'NcActionText',\n\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action-item('text');\n@include action--disabled;\n\n.action-text {\n\t&,\n\tspan {\n\t\tcursor: default;\n\t}\n}\n</style>\n"],"names":["_sfc_main","actionText"],"mappings":";;AAmEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA,CAAAC,EAAA,eAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import "../assets/index-
|
|
2
|
-
import { A as
|
|
3
|
-
import { n as
|
|
4
|
-
const
|
|
1
|
+
import "../assets/index-00012a4c.css";
|
|
2
|
+
import { A as e } from "../chunks/actionText-60ff01d1.mjs";
|
|
3
|
+
import { n as s } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
|
|
4
|
+
const a = {
|
|
5
5
|
name: "NcActionText",
|
|
6
|
-
mixins: [
|
|
6
|
+
mixins: [e],
|
|
7
|
+
inject: {
|
|
8
|
+
isInSemanticMenu: {
|
|
9
|
+
from: "NcActions:isSemanticMenu",
|
|
10
|
+
default: !1
|
|
11
|
+
}
|
|
12
|
+
}
|
|
7
13
|
};
|
|
8
|
-
var
|
|
14
|
+
var c = function() {
|
|
9
15
|
var t = this, n = t._self._c;
|
|
10
|
-
return n("li", { staticClass: "action" }, [n("span", { staticClass: "action-text", on: { click: t.onClick } }, [t._t("icon", function() {
|
|
11
|
-
return [t.icon !== "" ? n("span", { staticClass: "action-text__icon", class: [t.isIconUrl ? "action-text__icon--url" : t.icon], style: { backgroundImage: t.isIconUrl ? `url(${t.icon})` : null }, attrs: { "aria-hidden":
|
|
16
|
+
return n("li", { staticClass: "action", attrs: { role: t.isInSemanticMenu && "presentation" } }, [n("span", { staticClass: "action-text", on: { click: t.onClick } }, [t._t("icon", function() {
|
|
17
|
+
return [t.icon !== "" ? n("span", { staticClass: "action-text__icon", class: [t.isIconUrl ? "action-text__icon--url" : t.icon], style: { backgroundImage: t.isIconUrl ? `url(${t.icon})` : null }, attrs: { "aria-hidden": "true" } }) : t._e()];
|
|
12
18
|
}), t.name ? n("span", { staticClass: "action-text__longtext-wrapper" }, [n("strong", { staticClass: "action-text__name" }, [t._v(" " + t._s(t.name) + " ")]), n("br"), n("span", { staticClass: "action-text__longtext", domProps: { textContent: t._s(t.text) } })]) : t.isLongText ? n("span", { staticClass: "action-text__longtext", domProps: { textContent: t._s(t.text) } }) : n("span", { staticClass: "action-text__text" }, [t._v(t._s(t.text))]), t._e()], 2)]);
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
o,
|
|
19
|
+
}, i = [], o = /* @__PURE__ */ s(
|
|
20
|
+
a,
|
|
16
21
|
c,
|
|
22
|
+
i,
|
|
17
23
|
!1,
|
|
18
24
|
null,
|
|
19
|
-
"
|
|
25
|
+
"34d9a49c",
|
|
20
26
|
null,
|
|
21
27
|
null
|
|
22
28
|
);
|
|
23
|
-
const
|
|
29
|
+
const m = o.exports;
|
|
24
30
|
export {
|
|
25
|
-
|
|
31
|
+
m as default
|
|
26
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcActionText.mjs","sources":["../../src/components/NcActionText/NcActionText.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<li class=\"action\">\n\t\t<span class=\"action-text\"\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span v-if=\"icon !== ''\"\n\t\t\t\t\t:class=\"[isIconUrl ? 'action-text__icon--url' : icon]\"\n\t\t\t\t\
|
|
1
|
+
{"version":3,"file":"NcActionText.mjs","sources":["../../src/components/NcActionText/NcActionText.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<li class=\"action\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<span class=\"action-text\"\n\t\t\t@click=\"onClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span v-if=\"icon !== ''\"\n\t\t\t\t\t:class=\"[isIconUrl ? 'action-text__icon--url' : icon]\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\tclass=\"action-text__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span v-if=\"name\"\n\t\t\t\tclass=\"action-text__longtext-wrapper\">\n\t\t\t\t<strong class=\"action-text__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<br>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span class=\"action-text__longtext\" v-text=\"text\" />\n\t\t\t</span>\n\n\t\t\t<!-- long text only -->\n\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t<span v-else-if=\"isLongText\"\n\t\t\t\tclass=\"action-text__longtext\"\n\t\t\t\tv-text=\"text\" />\n\n\t\t\t<!-- default text display -->\n\t\t\t<span v-else class=\"action-text__text\">{{ text }}</span>\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</span>\n\t</li>\n</template>\n\n<script>\nimport ActionTextMixin from '../../mixins/actionText.js'\n\nexport default {\n\tname: 'NcActionText',\n\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action-item('text');\n@include action--disabled;\n\n.action-text {\n\t&,\n\tspan {\n\t\tcursor: default;\n\t}\n}\n</style>\n"],"names":["_sfc_main","ActionTextMixin"],"mappings":";;;AAmEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var b = require("../assets/index-93ad846c.css");
|
|
2
|
-
const n = require("../chunks/actionText-
|
|
2
|
+
const n = require("../chunks/actionText-9582810f.cjs"), i = require("../chunks/GenRandomId-c214d235.cjs"), o = require("../chunks/ArrowRight-7315f6c1.cjs"), l = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs");
|
|
3
3
|
const r = {
|
|
4
4
|
name: "NcActionTextEditable",
|
|
5
5
|
components: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../assets/index-93ad846c.css";
|
|
2
|
-
import { A as n } from "../chunks/actionText-
|
|
2
|
+
import { A as n } from "../chunks/actionText-60ff01d1.mjs";
|
|
3
3
|
import { G as i } from "../chunks/GenRandomId-cb9ccebe.mjs";
|
|
4
4
|
import { A as l } from "../chunks/ArrowRight-74a9fcb2.mjs";
|
|
5
5
|
import { n as o } from "../chunks/_plugin-vue2_normalizer-71e2aa87.mjs";
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
const
|
|
3
|
-
const
|
|
1
|
+
var oe = require("../assets/index-d1c0876d.css");
|
|
2
|
+
const U = require("./NcButton.cjs"), j = require("./NcPopover.cjs"), J = require("../chunks/GenRandomId-c214d235.cjs"), Q = require("../chunks/l10n-e9ffbe5e.cjs"), V = require("vue"), W = require("../chunks/DotsHorizontal-ac96129a.cjs"), X = require("../chunks/_plugin-vue2_normalizer-7f9efb60.cjs"), Y = (e) => e && e.__esModule ? e : { default: e }, Z = /* @__PURE__ */ Y(V);
|
|
3
|
+
const a = ".focusable", ee = {
|
|
4
4
|
name: "NcActions",
|
|
5
5
|
components: {
|
|
6
|
-
NcButton:
|
|
7
|
-
DotsHorizontal:
|
|
8
|
-
NcPopover:
|
|
6
|
+
NcButton: U,
|
|
7
|
+
DotsHorizontal: W.DotsHorizontal,
|
|
8
|
+
NcPopover: j
|
|
9
|
+
},
|
|
10
|
+
provide() {
|
|
11
|
+
return {
|
|
12
|
+
/**
|
|
13
|
+
* NcActions can be used as:
|
|
14
|
+
* - Application menu (has menu role)
|
|
15
|
+
* - Navigation (has no specific role, should be used an element with navigation role)
|
|
16
|
+
* - Popover with plain text or text inputs (has no specific role)
|
|
17
|
+
* Depending on the usage (used items), the menu and its items should have different roles for a11y.
|
|
18
|
+
* Provide the role for NcAction* components in the NcActions content.
|
|
19
|
+
* @type {import('vue').ComputedRef<boolean>}
|
|
20
|
+
*/
|
|
21
|
+
"NcActions:isSemanticMenu": V.computed(() => this.isSemanticMenu)
|
|
22
|
+
};
|
|
9
23
|
},
|
|
10
24
|
props: {
|
|
11
25
|
/**
|
|
@@ -83,10 +97,12 @@ const d = ".focusable", J = {
|
|
|
83
97
|
*/
|
|
84
98
|
ariaLabel: {
|
|
85
99
|
type: String,
|
|
86
|
-
default:
|
|
100
|
+
default: Q.t("Actions")
|
|
87
101
|
},
|
|
88
102
|
/**
|
|
89
|
-
*
|
|
103
|
+
* @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.
|
|
104
|
+
* @todo Add a check in @nextcloud/vue 9 that this prop is not provided,
|
|
105
|
+
* otherwise root element will inherit incorrect aria-hidden.
|
|
90
106
|
*/
|
|
91
107
|
ariaHidden: {
|
|
92
108
|
type: Boolean,
|
|
@@ -140,7 +156,10 @@ const d = ".focusable", J = {
|
|
|
140
156
|
return {
|
|
141
157
|
opened: this.open,
|
|
142
158
|
focusIndex: 0,
|
|
143
|
-
randomId: `menu-${
|
|
159
|
+
randomId: `menu-${J.GenRandomId()}`,
|
|
160
|
+
isSemanticMenu: !1,
|
|
161
|
+
isSemanticNavigation: !1,
|
|
162
|
+
isSemanticPopoverLike: !1
|
|
144
163
|
};
|
|
145
164
|
},
|
|
146
165
|
computed: {
|
|
@@ -163,8 +182,8 @@ const d = ".focusable", J = {
|
|
|
163
182
|
* @return {boolean}
|
|
164
183
|
*/
|
|
165
184
|
isValidSingleAction(e) {
|
|
166
|
-
var
|
|
167
|
-
const s = (
|
|
185
|
+
var r, p, u, f, d;
|
|
186
|
+
const s = (d = (u = (p = (r = e == null ? void 0 : e.componentOptions) == null ? void 0 : r.Ctor) == null ? void 0 : p.extendOptions) == null ? void 0 : u.name) != null ? d : (f = e == null ? void 0 : e.componentOptions) == null ? void 0 : f.tag;
|
|
168
187
|
return ["NcActionButton", "NcActionLink", "NcActionRouter"].includes(s);
|
|
169
188
|
},
|
|
170
189
|
// MENU STATE MANAGEMENT
|
|
@@ -188,11 +207,11 @@ const d = ".focusable", J = {
|
|
|
188
207
|
if (document.activeElement === e.target)
|
|
189
208
|
return;
|
|
190
209
|
const s = e.target.closest("li");
|
|
191
|
-
if (s) {
|
|
192
|
-
const
|
|
193
|
-
if (
|
|
194
|
-
const
|
|
195
|
-
|
|
210
|
+
if (s && this.$refs.menu.contains(s)) {
|
|
211
|
+
const r = s.querySelector(a);
|
|
212
|
+
if (r) {
|
|
213
|
+
const u = [...this.$refs.menu.querySelectorAll(a)].indexOf(r);
|
|
214
|
+
u > -1 && (this.focusIndex = u, this.focusAction());
|
|
196
215
|
}
|
|
197
216
|
}
|
|
198
217
|
},
|
|
@@ -202,14 +221,14 @@ const d = ".focusable", J = {
|
|
|
202
221
|
* @param {object} event The keydown event
|
|
203
222
|
*/
|
|
204
223
|
onKeydown(e) {
|
|
205
|
-
|
|
224
|
+
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());
|
|
206
225
|
},
|
|
207
226
|
removeCurrentActive() {
|
|
208
227
|
const e = this.$refs.menu.querySelector("li.active");
|
|
209
228
|
e && e.classList.remove("active");
|
|
210
229
|
},
|
|
211
230
|
focusAction() {
|
|
212
|
-
const e = this.$refs.menu.querySelectorAll(
|
|
231
|
+
const e = this.$refs.menu.querySelectorAll(a)[this.focusIndex];
|
|
213
232
|
if (e) {
|
|
214
233
|
this.removeCurrentActive();
|
|
215
234
|
const s = e.closest("li.action");
|
|
@@ -217,23 +236,23 @@ const d = ".focusable", J = {
|
|
|
217
236
|
}
|
|
218
237
|
},
|
|
219
238
|
focusPreviousAction(e) {
|
|
220
|
-
this.opened && (this.focusIndex === 0 ? this.
|
|
239
|
+
this.opened && (this.focusIndex === 0 ? this.focusLastAction(e) : (this.preventIfEvent(e), this.focusIndex = this.focusIndex - 1), this.focusAction());
|
|
221
240
|
},
|
|
222
241
|
focusNextAction(e) {
|
|
223
242
|
if (this.opened) {
|
|
224
|
-
const s = this.$refs.menu.querySelectorAll(
|
|
225
|
-
this.focusIndex === s ? this.
|
|
243
|
+
const s = this.$refs.menu.querySelectorAll(a).length - 1;
|
|
244
|
+
this.focusIndex === s ? this.focusFirstAction(e) : (this.preventIfEvent(e), this.focusIndex = this.focusIndex + 1), this.focusAction();
|
|
226
245
|
}
|
|
227
246
|
},
|
|
228
247
|
focusFirstAction(e) {
|
|
229
248
|
if (this.opened) {
|
|
230
249
|
this.preventIfEvent(e);
|
|
231
|
-
const s = [...this.$refs.menu.querySelectorAll(
|
|
250
|
+
const s = [...this.$refs.menu.querySelectorAll(a)].findIndex((r) => r.parentElement.getAttribute("aria-selected"));
|
|
232
251
|
this.focusIndex = s > -1 ? s : 0, this.focusAction();
|
|
233
252
|
}
|
|
234
253
|
},
|
|
235
254
|
focusLastAction(e) {
|
|
236
|
-
this.opened && (this.preventIfEvent(e), this.focusIndex = this.$refs.menu.querySelectorAll(
|
|
255
|
+
this.opened && (this.preventIfEvent(e), this.focusIndex = this.$refs.menu.querySelectorAll(a).length - 1, this.focusAction());
|
|
237
256
|
},
|
|
238
257
|
preventIfEvent(e) {
|
|
239
258
|
e && (e.preventDefault(), e.stopPropagation());
|
|
@@ -254,66 +273,65 @@ const d = ".focusable", J = {
|
|
|
254
273
|
render(e) {
|
|
255
274
|
const s = (this.$slots.default || []).filter(
|
|
256
275
|
(t) => {
|
|
257
|
-
var
|
|
258
|
-
return ((
|
|
276
|
+
var n, i, o, c;
|
|
277
|
+
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);
|
|
259
278
|
}
|
|
260
|
-
),
|
|
261
|
-
var
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
let
|
|
266
|
-
if (this.forceMenu &&
|
|
279
|
+
), r = (t) => {
|
|
280
|
+
var n, i, o, c, m;
|
|
281
|
+
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;
|
|
282
|
+
}, p = ["NcActionButton", "NcActionButtonGroup", "NcActionCheckbox", "NcActionRadio"], u = ["NcActionInput", "NcActionTextEditable"], f = ["NcActionLink", "NcActionRouter"], d = s.some((t) => u.includes(r(t))), A = s.some((t) => p.includes(r(t))), G = s.some((t) => f.includes(r(t)));
|
|
283
|
+
this.isSemanticMenu = A && !d, this.isSemanticNavigation = G && !A && !d, this.isSemanticPopoverLike = !this.isSemanticMenu && !this.isSemanticNavigation;
|
|
284
|
+
let l = s.filter(this.isValidSingleAction);
|
|
285
|
+
if (this.forceMenu && l.length > 0 && this.inline > 0 && (Z.default.util.warn("Specifying forceMenu will ignore any inline actions rendering."), l = []), s.length === 0)
|
|
267
286
|
return;
|
|
268
|
-
const
|
|
269
|
-
var
|
|
270
|
-
const
|
|
271
|
-
let
|
|
272
|
-
return this.forceName ||
|
|
287
|
+
const g = (t) => {
|
|
288
|
+
var x, _, I, N, S, $, B, k, O, M, L, h, q, E, w, P, D, F, T, C, z, R, H;
|
|
289
|
+
const n = ((I = (_ = (x = t == null ? void 0 : t.data) == null ? void 0 : x.scopedSlots) == null ? void 0 : _.icon()) == null ? void 0 : I[0]) || e("span", { class: ["icon", (S = (N = t == null ? void 0 : t.componentOptions) == null ? void 0 : N.propsData) == null ? void 0 : S.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 = (q = (h = (L = (M = (O = t == null ? void 0 : t.componentOptions) == null ? void 0 : O.children) == null ? void 0 : M[0]) == null ? void 0 : L.text) == null ? void 0 : h.trim) == null ? void 0 : q.call(h), m = ((w = (E = t == null ? void 0 : t.componentOptions) == null ? void 0 : E.propsData) == null ? void 0 : w.ariaLabel) || c, b = this.forceName ? c : "";
|
|
290
|
+
let y = (D = (P = t == null ? void 0 : t.componentOptions) == null ? void 0 : P.propsData) == null ? void 0 : D.title;
|
|
291
|
+
return this.forceName || y || (y = c), e(
|
|
273
292
|
"NcButton",
|
|
274
293
|
{
|
|
275
294
|
class: [
|
|
276
295
|
"action-item action-item--single",
|
|
277
|
-
(
|
|
278
|
-
(
|
|
296
|
+
(F = t == null ? void 0 : t.data) == null ? void 0 : F.staticClass,
|
|
297
|
+
(T = t == null ? void 0 : t.data) == null ? void 0 : T.class
|
|
279
298
|
],
|
|
280
299
|
attrs: {
|
|
281
|
-
...
|
|
282
|
-
"aria-label":
|
|
283
|
-
title:
|
|
300
|
+
...i,
|
|
301
|
+
"aria-label": m,
|
|
302
|
+
title: y
|
|
284
303
|
},
|
|
285
|
-
ref: (
|
|
304
|
+
ref: (C = t == null ? void 0 : t.data) == null ? void 0 : C.ref,
|
|
286
305
|
props: {
|
|
287
306
|
// If it has a menuName, we use a secondary button
|
|
288
|
-
type: this.type || (
|
|
289
|
-
disabled: this.disabled || ((
|
|
290
|
-
|
|
291
|
-
...(z = t == null ? void 0 : t.componentOptions) == null ? void 0 : z.propsData
|
|
307
|
+
type: this.type || (b ? "secondary" : "tertiary"),
|
|
308
|
+
disabled: this.disabled || ((R = (z = t == null ? void 0 : t.componentOptions) == null ? void 0 : z.propsData) == null ? void 0 : R.disabled),
|
|
309
|
+
...(H = t == null ? void 0 : t.componentOptions) == null ? void 0 : H.propsData
|
|
292
310
|
},
|
|
293
311
|
on: {
|
|
294
312
|
focus: this.onFocus,
|
|
295
313
|
blur: this.onBlur,
|
|
296
314
|
// If we have a click listener,
|
|
297
315
|
// we bind it to execute on click and forward the click event
|
|
298
|
-
...!!
|
|
299
|
-
click: (
|
|
300
|
-
|
|
316
|
+
...!!o && {
|
|
317
|
+
click: (K) => {
|
|
318
|
+
o && o(K);
|
|
301
319
|
}
|
|
302
320
|
}
|
|
303
321
|
}
|
|
304
322
|
},
|
|
305
323
|
[
|
|
306
|
-
e("template", { slot: "icon" }, [
|
|
307
|
-
|
|
324
|
+
e("template", { slot: "icon" }, [n]),
|
|
325
|
+
b
|
|
308
326
|
]
|
|
309
327
|
);
|
|
310
|
-
},
|
|
311
|
-
var i,
|
|
312
|
-
const
|
|
328
|
+
}, v = (t) => {
|
|
329
|
+
var i, o;
|
|
330
|
+
const n = ((i = this.$slots.icon) == null ? void 0 : i[0]) || (this.defaultIcon ? e("span", { class: ["icon", this.defaultIcon] }) : e("DotsHorizontal", {
|
|
313
331
|
props: {
|
|
314
332
|
size: 20
|
|
315
333
|
}
|
|
316
|
-
}))
|
|
334
|
+
}));
|
|
317
335
|
return e(
|
|
318
336
|
"NcPopover",
|
|
319
337
|
{
|
|
@@ -326,7 +344,10 @@ const d = ".focusable", J = {
|
|
|
326
344
|
boundary: this.boundariesElement,
|
|
327
345
|
container: this.container,
|
|
328
346
|
popoverBaseClass: "action-item__popper",
|
|
329
|
-
|
|
347
|
+
// Menu and navigation should not have focus trap
|
|
348
|
+
// Tab should close the menu and move focus to the next UI element
|
|
349
|
+
setReturnFocus: this.isSemanticPopoverLike ? (o = this.$refs.menuButton) == null ? void 0 : o.$el : null,
|
|
350
|
+
focusTrap: this.isSemanticPopoverLike
|
|
330
351
|
},
|
|
331
352
|
// For some reason the popover component
|
|
332
353
|
// does not react to props given under the 'props' key,
|
|
@@ -351,23 +372,23 @@ const d = ".focusable", J = {
|
|
|
351
372
|
class: "action-item__menutoggle",
|
|
352
373
|
props: {
|
|
353
374
|
type: this.triggerBtnType,
|
|
354
|
-
disabled: this.disabled
|
|
355
|
-
ariaHidden: this.ariaHidden
|
|
375
|
+
disabled: this.disabled
|
|
356
376
|
},
|
|
357
377
|
slot: "trigger",
|
|
358
378
|
ref: "menuButton",
|
|
359
379
|
attrs: {
|
|
360
|
-
"aria-haspopup":
|
|
380
|
+
"aria-haspopup": this.isSemanticMenu ? null : "menu",
|
|
361
381
|
"aria-label": this.menuName ? null : this.ariaLabel,
|
|
362
382
|
"aria-controls": this.opened ? this.randomId : null,
|
|
363
|
-
|
|
383
|
+
// Do not add aria-expanded="true" when it is closed
|
|
384
|
+
"aria-expanded": this.opened ? "true" : void 0
|
|
364
385
|
},
|
|
365
386
|
on: {
|
|
366
387
|
focus: this.onFocus,
|
|
367
388
|
blur: this.onBlur
|
|
368
389
|
}
|
|
369
390
|
}, [
|
|
370
|
-
e("template", { slot: "icon" }, [
|
|
391
|
+
e("template", { slot: "icon" }, [n]),
|
|
371
392
|
this.menuName
|
|
372
393
|
]),
|
|
373
394
|
e("div", {
|
|
@@ -387,7 +408,7 @@ const d = ".focusable", J = {
|
|
|
387
408
|
attrs: {
|
|
388
409
|
id: this.randomId,
|
|
389
410
|
tabindex: "-1",
|
|
390
|
-
role:
|
|
411
|
+
role: this.isSemanticMenu ? "menu" : void 0
|
|
391
412
|
}
|
|
392
413
|
}, [
|
|
393
414
|
t
|
|
@@ -396,12 +417,12 @@ const d = ".focusable", J = {
|
|
|
396
417
|
]
|
|
397
418
|
);
|
|
398
419
|
};
|
|
399
|
-
if (s.length === 1 &&
|
|
400
|
-
return
|
|
420
|
+
if (s.length === 1 && l.length === 1 && !this.forceMenu)
|
|
421
|
+
return g(l[0]);
|
|
401
422
|
if (this.$nextTick(() => {
|
|
402
423
|
this.opened && this.$refs.menu && (this.$refs.menu.querySelector("li.active") || []).length === 0 && this.focusFirstAction();
|
|
403
|
-
}),
|
|
404
|
-
const t =
|
|
424
|
+
}), l.length > 0 && this.inline > 0) {
|
|
425
|
+
const t = l.slice(0, this.inline), n = s.filter((i) => !t.includes(i));
|
|
405
426
|
return e(
|
|
406
427
|
"div",
|
|
407
428
|
{
|
|
@@ -412,9 +433,9 @@ const d = ".focusable", J = {
|
|
|
412
433
|
},
|
|
413
434
|
[
|
|
414
435
|
// Render inline actions
|
|
415
|
-
...t.map(
|
|
436
|
+
...t.map(g),
|
|
416
437
|
// render the rest within the popover menu
|
|
417
|
-
|
|
438
|
+
n.length > 0 ? e(
|
|
418
439
|
"div",
|
|
419
440
|
{
|
|
420
441
|
class: [
|
|
@@ -425,7 +446,7 @@ const d = ".focusable", J = {
|
|
|
425
446
|
]
|
|
426
447
|
},
|
|
427
448
|
[
|
|
428
|
-
|
|
449
|
+
v(n)
|
|
429
450
|
]
|
|
430
451
|
) : null
|
|
431
452
|
]
|
|
@@ -443,20 +464,20 @@ const d = ".focusable", J = {
|
|
|
443
464
|
]
|
|
444
465
|
},
|
|
445
466
|
[
|
|
446
|
-
|
|
467
|
+
v(s)
|
|
447
468
|
]
|
|
448
469
|
);
|
|
449
470
|
}
|
|
450
|
-
},
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
471
|
+
}, te = null, se = null;
|
|
472
|
+
var ne = /* @__PURE__ */ X.normalizeComponent(
|
|
473
|
+
ee,
|
|
474
|
+
te,
|
|
475
|
+
se,
|
|
455
476
|
!1,
|
|
456
477
|
null,
|
|
457
|
-
"
|
|
478
|
+
"7baca6e4",
|
|
458
479
|
null,
|
|
459
480
|
null
|
|
460
481
|
);
|
|
461
|
-
const
|
|
462
|
-
module.exports =
|
|
482
|
+
const ie = ne.exports;
|
|
483
|
+
module.exports = ie;
|