@nextcloud/vue 3.10.2 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +114 -19
- package/README.md +9 -10
- package/dist/Components/ActionButton.js +24 -3
- package/dist/Components/ActionButton.js.map +1 -1
- package/dist/Components/ActionCaption.js +23 -0
- package/dist/Components/ActionCaption.js.map +1 -0
- package/dist/Components/ActionCheckbox.js +24 -3
- package/dist/Components/ActionCheckbox.js.map +1 -1
- package/dist/Components/ActionInput.js +124 -21
- package/dist/Components/ActionInput.js.map +1 -1
- package/dist/Components/ActionLink.js +24 -3
- package/dist/Components/ActionLink.js.map +1 -1
- package/dist/Components/ActionRadio.js +24 -3
- package/dist/Components/ActionRadio.js.map +1 -1
- package/dist/Components/ActionRouter.js +23 -2
- package/dist/Components/ActionRouter.js.map +1 -1
- package/dist/Components/ActionSeparator.js +1 -1
- package/dist/Components/ActionSeparator.js.map +1 -1
- package/dist/Components/ActionText.js +23 -2
- package/dist/Components/ActionText.js.map +1 -1
- package/dist/Components/ActionTextEditable.js +45 -3
- package/dist/Components/ActionTextEditable.js.map +1 -1
- package/dist/Components/Actions.js +25 -4
- package/dist/Components/Actions.js.map +1 -1
- package/dist/Components/AppContent.js +21 -1
- package/dist/Components/AppContent.js.map +1 -1
- package/dist/Components/AppContentDetails.js +1 -1
- package/dist/Components/AppContentDetails.js.map +1 -1
- package/dist/Components/AppContentList.js +1 -1
- package/dist/Components/AppContentList.js.map +1 -1
- package/dist/Components/AppNavigation.js +109 -2
- package/dist/Components/AppNavigation.js.map +1 -1
- package/dist/Components/AppNavigationCaption.js +66 -1
- package/dist/Components/AppNavigationCaption.js.map +1 -1
- package/dist/Components/AppNavigationCounter.js +2 -2
- package/dist/Components/AppNavigationCounter.js.map +1 -1
- package/dist/Components/AppNavigationIconBullet.js +2 -2
- package/dist/Components/AppNavigationIconBullet.js.map +1 -1
- package/dist/Components/AppNavigationItem.js +49 -7
- package/dist/Components/AppNavigationItem.js.map +1 -1
- package/dist/Components/AppNavigationNew.js +1 -1
- package/dist/Components/AppNavigationNew.js.map +1 -1
- package/dist/Components/AppNavigationNewItem.js +2 -2
- package/dist/Components/AppNavigationNewItem.js.map +1 -1
- package/dist/Components/AppNavigationSettings.js +5 -5
- package/dist/Components/AppNavigationSettings.js.map +1 -1
- package/dist/Components/AppNavigationSpacer.js +1 -1
- package/dist/Components/AppNavigationSpacer.js.map +1 -1
- package/dist/Components/AppNavigationToggle.js +109 -2
- package/dist/Components/AppNavigationToggle.js.map +1 -1
- package/dist/Components/AppSettingsDialog.js +64 -22
- package/dist/Components/AppSettingsDialog.js.map +1 -1
- package/dist/Components/AppSettingsSection.js +1 -1
- package/dist/Components/AppSettingsSection.js.map +1 -1
- package/dist/Components/AppSidebar.js +38 -17
- package/dist/Components/AppSidebar.js.map +1 -1
- package/dist/Components/AppSidebarTab.js +1 -1
- package/dist/Components/AppSidebarTab.js.map +1 -1
- package/dist/Components/Avatar.js +9 -10
- package/dist/Components/Avatar.js.map +1 -1
- package/dist/Components/Breadcrumb.js +33 -12
- package/dist/Components/Breadcrumb.js.map +1 -1
- package/dist/Components/Breadcrumbs.js +59 -17
- package/dist/Components/Breadcrumbs.js.map +1 -1
- package/dist/Components/CheckboxRadioSwitch.js +44 -0
- package/dist/Components/CheckboxRadioSwitch.js.map +1 -0
- package/dist/Components/ColorPicker.js +6 -7
- package/dist/Components/ColorPicker.js.map +1 -1
- package/dist/Components/Content.js +2 -2
- package/dist/Components/Content.js.map +1 -1
- package/dist/Components/CounterBubble.js +23 -0
- package/dist/Components/CounterBubble.js.map +1 -0
- package/dist/Components/DatetimePicker.js +341 -3
- package/dist/Components/DatetimePicker.js.map +1 -1
- package/dist/Components/EmojiPicker.js +14 -14
- package/dist/Components/EmojiPicker.js.map +1 -1
- package/dist/Components/EmptyContent.js +2 -2
- package/dist/Components/EmptyContent.js.map +1 -1
- package/dist/Components/Highlight.js +3 -3
- package/dist/Components/Highlight.js.map +1 -1
- package/dist/Components/ListItem.js +130 -0
- package/dist/Components/ListItem.js.map +1 -0
- package/dist/Components/ListItemIcon.js +20 -21
- package/dist/Components/ListItemIcon.js.map +1 -1
- package/dist/Components/Modal.js +53 -11
- package/dist/Components/Modal.js.map +1 -1
- package/dist/Components/Multiselect.js +22 -23
- package/dist/Components/Multiselect.js.map +1 -1
- package/dist/Components/MultiselectTags.js +24 -25
- package/dist/Components/MultiselectTags.js.map +1 -1
- package/dist/Components/Popover.js +2 -2
- package/dist/Components/Popover.js.map +1 -1
- package/dist/Components/PopoverMenu.js +1 -1
- package/dist/Components/PopoverMenu.js.map +1 -1
- package/dist/Components/ProgressBar.js +2 -2
- package/dist/Components/ProgressBar.js.map +1 -1
- package/dist/Components/RichContenteditable.js +2 -2
- package/dist/Components/RichContenteditable.js.map +1 -1
- package/dist/Components/SettingsInputText.js +22 -1
- package/dist/Components/SettingsInputText.js.map +1 -1
- package/dist/Components/SettingsSection.js +2 -2
- package/dist/Components/SettingsSection.js.map +1 -1
- package/dist/Components/SettingsSelectGroup.js +41 -21
- package/dist/Components/SettingsSelectGroup.js.map +1 -1
- package/dist/Components/TimezonePicker.js +340 -0
- package/dist/Components/TimezonePicker.js.map +1 -0
- package/dist/Components/UserBubble.js +35 -36
- package/dist/Components/UserBubble.js.map +1 -1
- package/dist/Directives/Focus.js +1 -1
- package/dist/Directives/Focus.js.map +1 -1
- package/dist/Directives/Linkify.js +1 -1
- package/dist/Directives/Linkify.js.map +1 -1
- package/dist/Directives/Tooltip.js +2 -2
- package/dist/Directives/Tooltip.js.map +1 -1
- package/dist/Functions/usernameToColor.js +2 -3
- package/dist/Functions/usernameToColor.js.map +1 -1
- package/dist/Mixins/excludeClickOutsideClasses.js +2 -2
- package/dist/Mixins/excludeClickOutsideClasses.js.map +1 -1
- package/dist/Mixins/isFullscreen.js +1 -1
- package/dist/Mixins/isFullscreen.js.map +1 -1
- package/dist/Mixins/isMobile.js +1 -1
- package/dist/Mixins/isMobile.js.map +1 -1
- package/dist/Mixins/richEditor.js +1 -1
- package/dist/Mixins/richEditor.js.map +1 -1
- package/dist/ncvuecomponents.js +276 -69
- package/dist/ncvuecomponents.js.map +1 -1
- package/package.json +28 -43
- package/src/assets/action.scss +0 -132
- package/src/assets/iconfont/README.md +0 -30
- package/src/assets/iconfont/arrow-left-double.svg +0 -3
- package/src/assets/iconfont/arrow-left.svg +0 -3
- package/src/assets/iconfont/arrow-right-double.svg +0 -3
- package/src/assets/iconfont/arrow-right.svg +0 -3
- package/src/assets/iconfont/breadcrumb.svg +0 -1
- package/src/assets/iconfont/checkmark.svg +0 -1
- package/src/assets/iconfont/close.svg +0 -1
- package/src/assets/iconfont/confirm.svg +0 -1
- package/src/assets/iconfont/info.svg +0 -1
- package/src/assets/iconfont/menu.svg +0 -1
- package/src/assets/iconfont/more.svg +0 -1
- package/src/assets/iconfont/pause.svg +0 -1
- package/src/assets/iconfont/play.svg +0 -1
- package/src/assets/iconfont/triangle-s.svg +0 -1
- package/src/assets/iconfont/user-status-away.svg +0 -2
- package/src/assets/iconfont/user-status-dnd.svg +0 -2
- package/src/assets/iconfont/user-status-invisible.svg +0 -2
- package/src/assets/iconfont/user-status-online.svg +0 -2
- package/src/assets/inputs.scss +0 -104
- package/src/assets/variables.scss +0 -57
- package/src/components/ActionButton/ActionButton.vue +0 -160
- package/src/components/ActionButton/index.js +0 -24
- package/src/components/ActionCheckbox/ActionCheckbox.vue +0 -220
- package/src/components/ActionCheckbox/index.js +0 -24
- package/src/components/ActionInput/ActionInput.vue +0 -418
- package/src/components/ActionInput/index.js +0 -24
- package/src/components/ActionLink/ActionLink.vue +0 -132
- package/src/components/ActionLink/index.js +0 -24
- package/src/components/ActionRadio/ActionRadio.vue +0 -219
- package/src/components/ActionRadio/index.js +0 -24
- package/src/components/ActionRouter/ActionRouter.vue +0 -100
- package/src/components/ActionRouter/index.js +0 -24
- package/src/components/ActionSeparator/ActionSeparator.vue +0 -43
- package/src/components/ActionSeparator/index.js +0 -24
- package/src/components/ActionText/ActionText.vue +0 -87
- package/src/components/ActionText/index.js +0 -24
- package/src/components/ActionTextEditable/ActionTextEditable.vue +0 -306
- package/src/components/ActionTextEditable/index.js +0 -24
- package/src/components/Actions/Actions.vue +0 -764
- package/src/components/Actions/index.js +0 -24
- package/src/components/AppContent/AppContent.vue +0 -93
- package/src/components/AppContent/index.js +0 -23
- package/src/components/AppContentDetails/AppContentDetails.vue +0 -34
- package/src/components/AppContentDetails/index.js +0 -23
- package/src/components/AppContentList/AppContentList.vue +0 -44
- package/src/components/AppContentList/index.js +0 -23
- package/src/components/AppNavigation/AppNavigation.vue +0 -190
- package/src/components/AppNavigation/index.js +0 -23
- package/src/components/AppNavigationCaption/AppNavigationCaption.vue +0 -39
- package/src/components/AppNavigationCaption/index.js +0 -3
- package/src/components/AppNavigationCounter/AppNavigationCounter.vue +0 -82
- package/src/components/AppNavigationCounter/index.js +0 -25
- package/src/components/AppNavigationIconBullet/AppNavigationIconBullet.vue +0 -95
- package/src/components/AppNavigationIconBullet/index.js +0 -24
- package/src/components/AppNavigationItem/AppNavigationIconCollapsible.vue +0 -90
- package/src/components/AppNavigationItem/AppNavigationItem.vue +0 -629
- package/src/components/AppNavigationItem/InputConfirmCancel.vue +0 -134
- package/src/components/AppNavigationItem/index.js +0 -24
- package/src/components/AppNavigationNew/AppNavigationNew.vue +0 -76
- package/src/components/AppNavigationNew/index.js +0 -23
- package/src/components/AppNavigationNewItem/AppNavigationNewItem.vue +0 -165
- package/src/components/AppNavigationNewItem/index.js +0 -24
- package/src/components/AppNavigationSettings/AppNavigationSettings.vue +0 -105
- package/src/components/AppNavigationSettings/index.js +0 -23
- package/src/components/AppNavigationSpacer/AppNavigationSpacer.vue +0 -39
- package/src/components/AppNavigationSpacer/index.js +0 -23
- package/src/components/AppNavigationToggle/AppNavigationToggle.vue +0 -78
- package/src/components/AppNavigationToggle/index.js +0 -24
- package/src/components/AppSettingsDialog/AppSettingsDialog.vue +0 -331
- package/src/components/AppSettingsDialog/index.js +0 -25
- package/src/components/AppSettingsSection/AppSettingsSection.vue +0 -64
- package/src/components/AppSettingsSection/index.js +0 -25
- package/src/components/AppSidebar/AppSidebar.vue +0 -802
- package/src/components/AppSidebar/AppSidebarTabs.vue +0 -348
- package/src/components/AppSidebar/index.js +0 -23
- package/src/components/AppSidebarTab/AppSidebarTab.vue +0 -103
- package/src/components/AppSidebarTab/index.js +0 -23
- package/src/components/Avatar/Avatar.vue +0 -758
- package/src/components/Avatar/index.js +0 -25
- package/src/components/Breadcrumb/Breadcrumb.vue +0 -262
- package/src/components/Breadcrumb/index.js +0 -25
- package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -537
- package/src/components/Breadcrumbs/index.js +0 -25
- package/src/components/ColorPicker/ColorPicker.vue +0 -380
- package/src/components/ColorPicker/index.js +0 -25
- package/src/components/Content/Content.vue +0 -77
- package/src/components/Content/index.js +0 -23
- package/src/components/DatetimePicker/DatetimePicker.vue +0 -195
- package/src/components/DatetimePicker/index.js +0 -28
- package/src/components/DatetimePicker/index.scss +0 -405
- package/src/components/EmojiPicker/EmojiPicker.vue +0 -302
- package/src/components/EmojiPicker/index.js +0 -23
- package/src/components/EmptyContent/EmptyContent.vue +0 -120
- package/src/components/EmptyContent/index.js +0 -24
- package/src/components/Highlight/Highlight.vue +0 -183
- package/src/components/Highlight/index.js +0 -25
- package/src/components/ListItemIcon/ListItemIcon.vue +0 -277
- package/src/components/ListItemIcon/index.js +0 -25
- package/src/components/Modal/Modal.vue +0 -833
- package/src/components/Modal/index.js +0 -27
- package/src/components/Multiselect/EllipsisedOption.vue +0 -141
- package/src/components/Multiselect/Multiselect.vue +0 -430
- package/src/components/Multiselect/index.js +0 -28
- package/src/components/Multiselect/index.scss +0 -290
- package/src/components/MultiselectTags/MultiselectTags.vue +0 -179
- package/src/components/MultiselectTags/api.js +0 -115
- package/src/components/MultiselectTags/index.js +0 -23
- package/src/components/Popover/Popover.vue +0 -208
- package/src/components/Popover/index.js +0 -25
- package/src/components/PopoverMenu/PopoverMenu.vue +0 -62
- package/src/components/PopoverMenu/PopoverMenuItem.vue +0 -382
- package/src/components/PopoverMenu/index.js +0 -24
- package/src/components/ProgressBar/ProgressBar.vue +0 -135
- package/src/components/ProgressBar/index.js +0 -25
- package/src/components/RichContenteditable/AutoCompleteResult.vue +0 -191
- package/src/components/RichContenteditable/MentionBubble.vue +0 -165
- package/src/components/RichContenteditable/RichContenteditable.vue +0 -517
- package/src/components/RichContenteditable/index.js +0 -25
- package/src/components/SettingsInputText/SettingsInputText.vue +0 -207
- package/src/components/SettingsInputText/index.js +0 -24
- package/src/components/SettingsSection/SettingsSection.vue +0 -151
- package/src/components/SettingsSection/index.js +0 -24
- package/src/components/SettingsSelectGroup/SettingsSelectGroup.vue +0 -149
- package/src/components/SettingsSelectGroup/index.js +0 -25
- package/src/components/UserBubble/UserBubble.vue +0 -319
- package/src/components/UserBubble/index.js +0 -25
- package/src/components/index.js +0 -110
- package/src/directives/Focus/index.js +0 -29
- package/src/directives/Linkify/index.js +0 -31
- package/src/directives/Tooltip/index.js +0 -32
- package/src/directives/Tooltip/index.scss +0 -117
- package/src/directives/index.js +0 -31
- package/src/fonts/iconfont-vue-f56d517.eot +0 -0
- package/src/fonts/iconfont-vue-f56d517.svg +0 -1
- package/src/fonts/iconfont-vue-f56d517.ttf +0 -0
- package/src/fonts/iconfont-vue-f56d517.woff +0 -0
- package/src/fonts/scss/iconfont-vue.scss +0 -115
- package/src/functions/usernameToColor/index.js +0 -25
- package/src/functions/usernameToColor/usernameToColor.js +0 -68
- package/src/index.js +0 -40
- package/src/l10n.js +0 -42
- package/src/mixins/actionGlobal.js +0 -59
- package/src/mixins/actionText.js +0 -85
- package/src/mixins/excludeClickOutsideClasses/index.js +0 -72
- package/src/mixins/index.js +0 -35
- package/src/mixins/isFullscreen/index.js +0 -46
- package/src/mixins/isMobile/index.js +0 -43
- package/src/mixins/l10n.js +0 -8
- package/src/mixins/richEditor/index.js +0 -160
- package/src/mixins/userStatus.js +0 -76
- package/src/utils/FindRanges.js +0 -47
- package/src/utils/GenColors.js +0 -79
- package/src/utils/GenRandomId.js +0 -31
- package/src/utils/GetChildren.js +0 -47
- package/src/utils/GetParent.js +0 -41
- package/src/utils/IsMobileState.js +0 -49
- package/src/utils/IsOutOfViewport.js +0 -36
- package/src/utils/ScopeComponent.js +0 -37
- package/src/utils/Timer.js +0 -61
- package/src/utils/ValidateChildren.js +0 -50
- package/src/utils/ValidateSlot.js +0 -57
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
|
|
3
|
-
*
|
|
4
|
-
* @author Julius Härtl <jus@bitgrid.net>
|
|
5
|
-
*
|
|
6
|
-
* @license GNU AGPL version 3 or any later version
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import axios from '@nextcloud/axios'
|
|
24
|
-
import { generateRemoteUrl } from '@nextcloud/router'
|
|
25
|
-
|
|
26
|
-
const xmlToJson = (xml) => {
|
|
27
|
-
let obj = {}
|
|
28
|
-
|
|
29
|
-
if (xml.nodeType === 1) {
|
|
30
|
-
if (xml.attributes.length > 0) {
|
|
31
|
-
obj['@attributes'] = {}
|
|
32
|
-
for (let j = 0; j < xml.attributes.length; j++) {
|
|
33
|
-
const attribute = xml.attributes.item(j)
|
|
34
|
-
obj['@attributes'][attribute.nodeName] = attribute.nodeValue
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
} else if (xml.nodeType === 3) {
|
|
38
|
-
obj = xml.nodeValue
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (xml.hasChildNodes()) {
|
|
42
|
-
for (let i = 0; i < xml.childNodes.length; i++) {
|
|
43
|
-
const item = xml.childNodes.item(i)
|
|
44
|
-
const nodeName = item.nodeName
|
|
45
|
-
if (typeof (obj[nodeName]) === 'undefined') {
|
|
46
|
-
obj[nodeName] = xmlToJson(item)
|
|
47
|
-
} else {
|
|
48
|
-
if (typeof obj[nodeName].push === 'undefined') {
|
|
49
|
-
const old = obj[nodeName]
|
|
50
|
-
obj[nodeName] = []
|
|
51
|
-
obj[nodeName].push(old)
|
|
52
|
-
}
|
|
53
|
-
obj[nodeName].push(xmlToJson(item))
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return obj
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const parseXml = (xml) => {
|
|
61
|
-
let dom = null
|
|
62
|
-
try {
|
|
63
|
-
dom = (new DOMParser()).parseFromString(xml, 'text/xml')
|
|
64
|
-
} catch (e) {
|
|
65
|
-
console.error('Failed to parse xml document', e)
|
|
66
|
-
}
|
|
67
|
-
return dom
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const xmlToTagList = (xml) => {
|
|
71
|
-
const json = xmlToJson(parseXml(xml))
|
|
72
|
-
const list = json['d:multistatus']['d:response']
|
|
73
|
-
const result = []
|
|
74
|
-
for (const index in list) {
|
|
75
|
-
const tag = list[index]['d:propstat']
|
|
76
|
-
|
|
77
|
-
if (tag['d:status']['#text'] !== 'HTTP/1.1 200 OK') {
|
|
78
|
-
continue
|
|
79
|
-
}
|
|
80
|
-
result.push({
|
|
81
|
-
id: parseInt(tag['d:prop']['oc:id']['#text']),
|
|
82
|
-
displayName: tag['d:prop']['oc:display-name']['#text'],
|
|
83
|
-
canAssign: tag['d:prop']['oc:can-assign']['#text'] === 'true',
|
|
84
|
-
userAssignable: tag['d:prop']['oc:user-assignable']['#text'] === 'true',
|
|
85
|
-
userVisible: tag['d:prop']['oc:user-visible']['#text'] === 'true',
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
return result
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const searchTags = async function() {
|
|
92
|
-
if (window.NextcloudVueDocs) {
|
|
93
|
-
return Promise.resolve(xmlToTagList(window.NextcloudVueDocs.tags))
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const result = await axios({
|
|
97
|
-
method: 'PROPFIND',
|
|
98
|
-
url: generateRemoteUrl('dav') + '/systemtags/',
|
|
99
|
-
data: `<?xml version="1.0"?>
|
|
100
|
-
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
|
|
101
|
-
<d:prop>
|
|
102
|
-
<oc:id />
|
|
103
|
-
<oc:display-name />
|
|
104
|
-
<oc:user-visible />
|
|
105
|
-
<oc:user-assignable />
|
|
106
|
-
<oc:can-assign />
|
|
107
|
-
</d:prop>
|
|
108
|
-
</d:propfind>`,
|
|
109
|
-
})
|
|
110
|
-
return xmlToTagList(result.data)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export {
|
|
114
|
-
searchTags,
|
|
115
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
*
|
|
6
|
-
* @license GNU AGPL version 3 or any later version
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*/
|
|
21
|
-
import MultiselectTags from './MultiselectTags'
|
|
22
|
-
|
|
23
|
-
export default MultiselectTags
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@pm.me>
|
|
3
|
-
-
|
|
4
|
-
- @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
5
|
-
-
|
|
6
|
-
- @license GNU AGPL version 3 or any later version
|
|
7
|
-
-
|
|
8
|
-
- This program is free software: you can redistribute it and/or modify
|
|
9
|
-
- it under the terms of the GNU Affero General Public License as
|
|
10
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
- License, or (at your option) any later version.
|
|
12
|
-
-
|
|
13
|
-
- This program is distributed in the hope that it will be useful,
|
|
14
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
- GNU Affero General Public License for more details.
|
|
17
|
-
-
|
|
18
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
-->
|
|
21
|
-
|
|
22
|
-
<docs>
|
|
23
|
-
|
|
24
|
-
### General description
|
|
25
|
-
|
|
26
|
-
This component is just a wrapper for the v-component plugin by Akryum,
|
|
27
|
-
please refer to this documentation for customization:
|
|
28
|
-
https://github.com/Akryum/v-tooltip
|
|
29
|
-
|
|
30
|
-
This components has two slots:
|
|
31
|
-
* 'trigger' which can be any html element and it will trigger the popover
|
|
32
|
-
this slot is optional since you can toggle the popover also by updating the
|
|
33
|
-
open prop on this component;
|
|
34
|
-
|
|
35
|
-
* a default slot that is for the content of the popover.
|
|
36
|
-
|
|
37
|
-
### Examples
|
|
38
|
-
|
|
39
|
-
With a `<button>` as a trigger:
|
|
40
|
-
```vue
|
|
41
|
-
<template>
|
|
42
|
-
<Popover>
|
|
43
|
-
<button slot="trigger"> I am the trigger </button>
|
|
44
|
-
<template>
|
|
45
|
-
<h2>this is some content</h2>
|
|
46
|
-
</template>
|
|
47
|
-
</Popover>
|
|
48
|
-
</template>
|
|
49
|
-
```
|
|
50
|
-
</docs>
|
|
51
|
-
|
|
52
|
-
<template>
|
|
53
|
-
<VPopover
|
|
54
|
-
ref="popover"
|
|
55
|
-
v-bind="$attrs"
|
|
56
|
-
popover-base-class="popover"
|
|
57
|
-
popover-wrapper-class="popover__wrapper"
|
|
58
|
-
popover-arrow-class="popover__arrow"
|
|
59
|
-
popover-inner-class="popover__inner"
|
|
60
|
-
v-on="$listeners">
|
|
61
|
-
<!-- This will be the popover target (for the events and position) -->
|
|
62
|
-
<slot name="trigger" />
|
|
63
|
-
<!-- This will be the content of the popover -->
|
|
64
|
-
<template slot="popover">
|
|
65
|
-
<slot />
|
|
66
|
-
</template>
|
|
67
|
-
</VPopover>
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<script>
|
|
71
|
-
import { VPopover } from 'v-tooltip'
|
|
72
|
-
|
|
73
|
-
export default {
|
|
74
|
-
name: 'Popover',
|
|
75
|
-
components: {
|
|
76
|
-
VPopover,
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
mounted() {
|
|
80
|
-
this.$watch(
|
|
81
|
-
() => {
|
|
82
|
-
// required because v-tooltip doesn't provide events
|
|
83
|
-
// and @show is too early
|
|
84
|
-
// see https://github.com/Akryum/v-tooltip/issues/661
|
|
85
|
-
return this.$refs.popover.isOpen
|
|
86
|
-
},
|
|
87
|
-
(val) => {
|
|
88
|
-
if (val) {
|
|
89
|
-
/**
|
|
90
|
-
* Triggered after the tooltip was visually displayed.
|
|
91
|
-
*
|
|
92
|
-
* This is different from the 'show' and 'apply-show' which
|
|
93
|
-
* run earlier than this where there is no guarantee that the
|
|
94
|
-
* tooltip is already visible and in the DOM.
|
|
95
|
-
*/
|
|
96
|
-
this.$emit('after-show')
|
|
97
|
-
} else {
|
|
98
|
-
/**
|
|
99
|
-
* Triggered after the tooltip was visually hidden.
|
|
100
|
-
*/
|
|
101
|
-
this.$emit('after-hide')
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
},
|
|
106
|
-
}
|
|
107
|
-
</script>
|
|
108
|
-
|
|
109
|
-
<style lang="scss">
|
|
110
|
-
$arrow-width: 10px;
|
|
111
|
-
|
|
112
|
-
.popover {
|
|
113
|
-
z-index: 100000;
|
|
114
|
-
display: block !important;
|
|
115
|
-
|
|
116
|
-
filter: drop-shadow(0 1px 10px var(--color-box-shadow));
|
|
117
|
-
|
|
118
|
-
&__inner {
|
|
119
|
-
padding: 0;
|
|
120
|
-
color: var(--color-main-text);
|
|
121
|
-
border-radius: var(--border-radius);
|
|
122
|
-
background: var(--color-main-background);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&__arrow {
|
|
126
|
-
position: absolute;
|
|
127
|
-
z-index: 1;
|
|
128
|
-
width: 0;
|
|
129
|
-
height: 0;
|
|
130
|
-
margin: $arrow-width;
|
|
131
|
-
border-style: solid;
|
|
132
|
-
border-color: var(--color-main-background);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&[x-placement^='top'] {
|
|
136
|
-
margin-bottom: $arrow-width;
|
|
137
|
-
|
|
138
|
-
.popover__arrow {
|
|
139
|
-
bottom: -$arrow-width;
|
|
140
|
-
left: calc(50% - $arrow-width);
|
|
141
|
-
margin-top: 0;
|
|
142
|
-
margin-bottom: 0;
|
|
143
|
-
border-width: $arrow-width $arrow-width 0 $arrow-width;
|
|
144
|
-
border-right-color: transparent !important;
|
|
145
|
-
border-bottom-color: transparent !important;
|
|
146
|
-
border-left-color: transparent !important;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
&[x-placement^='bottom'] {
|
|
151
|
-
margin-top: $arrow-width;
|
|
152
|
-
|
|
153
|
-
.popover__arrow {
|
|
154
|
-
top: -$arrow-width;
|
|
155
|
-
left: calc(50% - $arrow-width);
|
|
156
|
-
margin-top: 0;
|
|
157
|
-
margin-bottom: 0;
|
|
158
|
-
border-width: 0 $arrow-width $arrow-width $arrow-width;
|
|
159
|
-
border-top-color: transparent !important;
|
|
160
|
-
border-right-color: transparent !important;
|
|
161
|
-
border-left-color: transparent !important;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&[x-placement^='right'] {
|
|
166
|
-
margin-left: $arrow-width;
|
|
167
|
-
|
|
168
|
-
.popover__arrow {
|
|
169
|
-
top: calc(50% - $arrow-width);
|
|
170
|
-
left: -$arrow-width;
|
|
171
|
-
margin-right: 0;
|
|
172
|
-
margin-left: 0;
|
|
173
|
-
border-width: $arrow-width $arrow-width $arrow-width 0;
|
|
174
|
-
border-top-color: transparent !important;
|
|
175
|
-
border-bottom-color: transparent !important;
|
|
176
|
-
border-left-color: transparent !important;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
&[x-placement^='left'] {
|
|
181
|
-
margin-right: $arrow-width;
|
|
182
|
-
|
|
183
|
-
.popover__arrow {
|
|
184
|
-
top: calc(50% - $arrow-width);
|
|
185
|
-
right: -$arrow-width;
|
|
186
|
-
margin-right: 0;
|
|
187
|
-
margin-left: 0;
|
|
188
|
-
border-width: $arrow-width 0 $arrow-width $arrow-width;
|
|
189
|
-
border-top-color: transparent !important;
|
|
190
|
-
border-right-color: transparent !important;
|
|
191
|
-
border-bottom-color: transparent !important;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
&[aria-hidden='true'] {
|
|
196
|
-
visibility: hidden;
|
|
197
|
-
transition: opacity var(--animation-quick), visibility var(--animation-quick);
|
|
198
|
-
opacity: 0;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
&[aria-hidden='false'] {
|
|
202
|
-
visibility: visible;
|
|
203
|
-
transition: opacity var(--animation-quick);
|
|
204
|
-
opacity: 1;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
</style>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@pm.me>
|
|
3
|
-
*
|
|
4
|
-
* @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
5
|
-
*
|
|
6
|
-
* @license GNU AGPL version 3 or any later version
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import Popover from './Popover'
|
|
24
|
-
|
|
25
|
-
export default Popover
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
-
|
|
4
|
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
-
|
|
6
|
-
- @license GNU AGPL version 3 or any later version
|
|
7
|
-
-
|
|
8
|
-
- This program is free software: you can redistribute it and/or modify
|
|
9
|
-
- it under the terms of the GNU Affero General Public License as
|
|
10
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
- License, or (at your option) any later version.
|
|
12
|
-
-
|
|
13
|
-
- This program is distributed in the hope that it will be useful,
|
|
14
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
- GNU Affero General Public License for more details.
|
|
17
|
-
-
|
|
18
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
-
|
|
21
|
-
-->
|
|
22
|
-
|
|
23
|
-
<docs>
|
|
24
|
-
This component is deprecated. Please use the [Actions](#/Components?id=actions-1) component instead.
|
|
25
|
-
</docs>
|
|
26
|
-
|
|
27
|
-
<template>
|
|
28
|
-
<ul class="popover__menu">
|
|
29
|
-
<PopoverMenuItem v-for="(item, key) in menu" :key="key" :item="item" />
|
|
30
|
-
</ul>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script>
|
|
34
|
-
import PopoverMenuItem from './PopoverMenuItem'
|
|
35
|
-
|
|
36
|
-
export default {
|
|
37
|
-
name: 'PopoverMenu',
|
|
38
|
-
components: {
|
|
39
|
-
PopoverMenuItem,
|
|
40
|
-
},
|
|
41
|
-
props: {
|
|
42
|
-
menu: {
|
|
43
|
-
type: Array,
|
|
44
|
-
default: () => {
|
|
45
|
-
return [{
|
|
46
|
-
href: 'https://nextcloud.com',
|
|
47
|
-
icon: 'icon-links',
|
|
48
|
-
text: 'Nextcloud',
|
|
49
|
-
}]
|
|
50
|
-
},
|
|
51
|
-
required: true,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
<style lang="scss" scoped>
|
|
58
|
-
ul {
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
}
|
|
62
|
-
</style>
|
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
-
|
|
4
|
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
-
|
|
6
|
-
- @license GNU AGPL version 3 or any later version
|
|
7
|
-
-
|
|
8
|
-
- This program is free software: you can redistribute it and/or modify
|
|
9
|
-
- it under the terms of the GNU Affero General Public License as
|
|
10
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
- License, or (at your option) any later version.
|
|
12
|
-
-
|
|
13
|
-
- This program is distributed in the hope that it will be useful,
|
|
14
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
- GNU Affero General Public License for more details.
|
|
17
|
-
-
|
|
18
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
-
|
|
21
|
-
-->
|
|
22
|
-
|
|
23
|
-
<template>
|
|
24
|
-
<li class="popover__menuitem">
|
|
25
|
-
<!-- If item.href is set, a link will be directly used -->
|
|
26
|
-
<a v-if="item.href"
|
|
27
|
-
:href="(item.href) ? item.href : '#' "
|
|
28
|
-
:target="(item.target) ? item.target : '' "
|
|
29
|
-
:download="item.download"
|
|
30
|
-
class="focusable"
|
|
31
|
-
rel="noreferrer noopener"
|
|
32
|
-
@click="action">
|
|
33
|
-
<span v-if="!iconIsUrl" :class="item.icon" />
|
|
34
|
-
<img v-else :src="item.icon">
|
|
35
|
-
<p v-if="item.text && item.longtext">
|
|
36
|
-
<strong class="menuitem-text">
|
|
37
|
-
{{ item.text }}
|
|
38
|
-
</strong><br>
|
|
39
|
-
<span class="menuitem-text-detail">
|
|
40
|
-
{{ item.longtext }}
|
|
41
|
-
</span>
|
|
42
|
-
</p>
|
|
43
|
-
<span v-else-if="item.text">
|
|
44
|
-
{{ item.text }}
|
|
45
|
-
</span>
|
|
46
|
-
<p v-else-if="item.longtext">
|
|
47
|
-
{{ item.longtext }}
|
|
48
|
-
</p>
|
|
49
|
-
</a>
|
|
50
|
-
|
|
51
|
-
<!-- If item.input is set instead, an put will be used -->
|
|
52
|
-
<span v-else-if="item.input" class="menuitem" :class="{active: item.active}">
|
|
53
|
-
<!-- does not show if input is checkbox -->
|
|
54
|
-
<span v-if="item.input !== 'checkbox'" :class="item.icon" />
|
|
55
|
-
|
|
56
|
-
<!-- only shows if input is text -->
|
|
57
|
-
<form v-if="item.input === 'text'"
|
|
58
|
-
:class="item.input"
|
|
59
|
-
@submit.prevent="item.action">
|
|
60
|
-
<input :type="item.input"
|
|
61
|
-
:value="item.value"
|
|
62
|
-
:placeholder="item.text"
|
|
63
|
-
required>
|
|
64
|
-
<input type="submit" value="" class="icon-confirm">
|
|
65
|
-
</form>
|
|
66
|
-
|
|
67
|
-
<!-- checkbox -->
|
|
68
|
-
<template v-else>
|
|
69
|
-
<!-- eslint-disable-next-line -->
|
|
70
|
-
<input :id="key" v-model="item.model"
|
|
71
|
-
:type="item.input"
|
|
72
|
-
:class="item.input"
|
|
73
|
-
@change="item.action">
|
|
74
|
-
<label :for="key" @click.stop.prevent="item.action">
|
|
75
|
-
{{ item.text }}
|
|
76
|
-
</label>
|
|
77
|
-
</template>
|
|
78
|
-
</span>
|
|
79
|
-
|
|
80
|
-
<!-- If item.action is set instead, a button will be used -->
|
|
81
|
-
<button v-else-if="item.action"
|
|
82
|
-
class="menuitem focusable"
|
|
83
|
-
:class="{active: item.active}"
|
|
84
|
-
:disabled="item.disabled"
|
|
85
|
-
type="button"
|
|
86
|
-
@click.stop.prevent="item.action">
|
|
87
|
-
<span :class="item.icon" />
|
|
88
|
-
<p v-if="item.text && item.longtext">
|
|
89
|
-
<strong class="menuitem-text">
|
|
90
|
-
{{ item.text }}
|
|
91
|
-
</strong><br>
|
|
92
|
-
<span class="menuitem-text-detail">
|
|
93
|
-
{{ item.longtext }}
|
|
94
|
-
</span>
|
|
95
|
-
</p>
|
|
96
|
-
<span v-else-if="item.text">
|
|
97
|
-
{{ item.text }}
|
|
98
|
-
</span>
|
|
99
|
-
<p v-else-if="item.longtext">
|
|
100
|
-
{{ item.longtext }}
|
|
101
|
-
</p>
|
|
102
|
-
</button>
|
|
103
|
-
|
|
104
|
-
<!-- If item.longtext is set AND the item does not have an action -->
|
|
105
|
-
<span v-else class="menuitem" :class="{active: item.active}">
|
|
106
|
-
<span :class="item.icon" />
|
|
107
|
-
<p v-if="item.text && item.longtext">
|
|
108
|
-
<strong class="menuitem-text">
|
|
109
|
-
{{ item.text }}
|
|
110
|
-
</strong><br>
|
|
111
|
-
<span class="menuitem-text-detail">
|
|
112
|
-
{{ item.longtext }}
|
|
113
|
-
</span>
|
|
114
|
-
</p>
|
|
115
|
-
<span v-else-if="item.text">
|
|
116
|
-
{{ item.text }}
|
|
117
|
-
</span>
|
|
118
|
-
<p v-else-if="item.longtext">
|
|
119
|
-
{{ item.longtext }}
|
|
120
|
-
</p>
|
|
121
|
-
</span>
|
|
122
|
-
</li>
|
|
123
|
-
</template>
|
|
124
|
-
|
|
125
|
-
<script>
|
|
126
|
-
export default {
|
|
127
|
-
name: 'PopoverMenuItem',
|
|
128
|
-
props: {
|
|
129
|
-
item: {
|
|
130
|
-
type: Object,
|
|
131
|
-
required: true,
|
|
132
|
-
default: () => {
|
|
133
|
-
return {
|
|
134
|
-
key: 'nextcloud-link',
|
|
135
|
-
href: 'https://nextcloud.com',
|
|
136
|
-
icon: 'icon-links',
|
|
137
|
-
text: 'Nextcloud',
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
// check the input types
|
|
141
|
-
// TODO: add more validation of types
|
|
142
|
-
validator: item => {
|
|
143
|
-
// TODO: support radio
|
|
144
|
-
if (item.input) {
|
|
145
|
-
return ['text', 'checkbox'].indexOf(item.input) !== -1
|
|
146
|
-
}
|
|
147
|
-
return true
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
computed: {
|
|
152
|
-
// random key for inputs binding if not provided
|
|
153
|
-
key() {
|
|
154
|
-
return this.item.key
|
|
155
|
-
? this.item.key
|
|
156
|
-
: Math.round(Math.random() * 16 * 1000000).toString(16)
|
|
157
|
-
},
|
|
158
|
-
iconIsUrl() {
|
|
159
|
-
try {
|
|
160
|
-
// eslint-disable-next-line no-new
|
|
161
|
-
new URL(this.item.icon)
|
|
162
|
-
return true
|
|
163
|
-
} catch (_) {
|
|
164
|
-
return false
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
methods: {
|
|
169
|
-
// allow us to use both link and an action on `a`
|
|
170
|
-
// we still need to make sure item.action exists
|
|
171
|
-
action(event) {
|
|
172
|
-
if (this.item.action) {
|
|
173
|
-
this.item.action(event)
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
}
|
|
178
|
-
</script>
|
|
179
|
-
|
|
180
|
-
<style scoped>
|
|
181
|
-
button.menuitem {
|
|
182
|
-
text-align: left;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
button.menuitem * {
|
|
186
|
-
cursor: pointer;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
button.menuitem:disabled {
|
|
190
|
-
opacity: 0.5 !important;
|
|
191
|
-
cursor: default;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
button.menuitem:disabled * {
|
|
195
|
-
cursor: default;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.menuitem.active {
|
|
199
|
-
box-shadow: inset 2px 0 var(--color-primary);
|
|
200
|
-
border-radius: 0;
|
|
201
|
-
}
|
|
202
|
-
</style>
|
|
203
|
-
|
|
204
|
-
<style lang="scss" scoped>
|
|
205
|
-
li {
|
|
206
|
-
display: flex;
|
|
207
|
-
flex: 0 0 auto;
|
|
208
|
-
|
|
209
|
-
&.hidden {
|
|
210
|
-
display: none;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
> button,
|
|
214
|
-
> a,
|
|
215
|
-
> .menuitem {
|
|
216
|
-
cursor: pointer;
|
|
217
|
-
line-height: $clickable-area;
|
|
218
|
-
border: 0;
|
|
219
|
-
border-radius: 0; // otherwise Safari will cut the border-radius area
|
|
220
|
-
background-color: transparent;
|
|
221
|
-
display: flex;
|
|
222
|
-
align-items: flex-start;
|
|
223
|
-
height: auto;
|
|
224
|
-
margin: 0;
|
|
225
|
-
padding: 0;
|
|
226
|
-
font-weight: normal;
|
|
227
|
-
box-shadow: none;
|
|
228
|
-
width: 100%;
|
|
229
|
-
color: var(--color-main-text);
|
|
230
|
-
white-space: nowrap;
|
|
231
|
-
opacity: $opacity_normal;
|
|
232
|
-
|
|
233
|
-
// TODO split into individual components for readability
|
|
234
|
-
span[class^='icon-'],
|
|
235
|
-
span[class*=' icon-'],
|
|
236
|
-
&[class^='icon-'],
|
|
237
|
-
&[class*=' icon-'] {
|
|
238
|
-
min-width: 0; /* Overwrite icons*/
|
|
239
|
-
min-height: 0;
|
|
240
|
-
background-position: #{$icon-margin} center;
|
|
241
|
-
background-size: $icon-size;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
span[class^='icon-'],
|
|
245
|
-
span[class*=' icon-'] {
|
|
246
|
-
/* Keep padding to define the width to
|
|
247
|
-
assure correct position of a possible text */
|
|
248
|
-
padding: #{$clickable-area / 2} 0 #{$clickable-area / 2} $clickable-area;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
// If no icons set, force left margin to align
|
|
252
|
-
&:not([class^='icon-']):not([class*='icon-']) {
|
|
253
|
-
> span,
|
|
254
|
-
> input,
|
|
255
|
-
> form {
|
|
256
|
-
&:not([class^='icon-']):not([class*='icon-']):first-child {
|
|
257
|
-
margin-left: $clickable-area;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
&[class^='icon-'],
|
|
263
|
-
&[class*=' icon-'] {
|
|
264
|
-
padding: 0 $icon-margin 0 $clickable-area;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
&:not(:disabled):hover,
|
|
268
|
-
&:not(:disabled):focus,
|
|
269
|
-
&:not(:disabled).active {
|
|
270
|
-
opacity: $opacity_full !important;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/* prevent .action class to break the design */
|
|
274
|
-
&.action {
|
|
275
|
-
padding: inherit !important;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
> span {
|
|
279
|
-
cursor: pointer;
|
|
280
|
-
white-space: nowrap;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
// long text area
|
|
284
|
-
> p {
|
|
285
|
-
width: 150px;
|
|
286
|
-
line-height: 1.6em;
|
|
287
|
-
padding: 8px 0;
|
|
288
|
-
white-space: normal;
|
|
289
|
-
|
|
290
|
-
// in case there are no spaces like long email addresses
|
|
291
|
-
overflow: hidden;
|
|
292
|
-
text-overflow: ellipsis;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// TODO: do we really supports it?
|
|
296
|
-
> select {
|
|
297
|
-
margin: 0;
|
|
298
|
-
margin-left: 6px;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/* Add padding if contains icon+text */
|
|
302
|
-
&:not(:empty) {
|
|
303
|
-
padding-right: $icon-margin !important;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/* DEPRECATED! old img in popover fallback
|
|
307
|
-
* TODO: to remove */
|
|
308
|
-
> img {
|
|
309
|
-
width: $icon-size;
|
|
310
|
-
padding: $icon-margin;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/* checkbox/radio fixes */
|
|
314
|
-
> input.radio + label,
|
|
315
|
-
> input.checkbox + label {
|
|
316
|
-
padding: 0 !important;
|
|
317
|
-
width: 100%;
|
|
318
|
-
}
|
|
319
|
-
> input.checkbox + label::before {
|
|
320
|
-
margin: -2px 13px 0;
|
|
321
|
-
}
|
|
322
|
-
> input.radio + label::before {
|
|
323
|
-
margin: -2px 12px 0;
|
|
324
|
-
}
|
|
325
|
-
> input:not([type=radio]):not([type=checkbox]):not([type=image]) {
|
|
326
|
-
width: 150px;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// Forms & text inputs
|
|
330
|
-
form {
|
|
331
|
-
display: flex;
|
|
332
|
-
flex: 1 1 auto;
|
|
333
|
-
/* put a small space between text and form
|
|
334
|
-
if there is an element before */
|
|
335
|
-
&:not(:first-child) {
|
|
336
|
-
margin-left: 5px;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
/* no margin if hidden span before */
|
|
340
|
-
> span.hidden + form,
|
|
341
|
-
> span[style*='display:none'] + form {
|
|
342
|
-
margin-left: 0;
|
|
343
|
-
}
|
|
344
|
-
/* Inputs inside popover supports text, submit & reset */
|
|
345
|
-
input {
|
|
346
|
-
min-width: $clickable-area;
|
|
347
|
-
max-height: #{$clickable-area - 4px}; /* twice the element margin-y */
|
|
348
|
-
margin: 2px 0;
|
|
349
|
-
flex: 1 1 auto;
|
|
350
|
-
// space between inline inputs
|
|
351
|
-
&:not(:first-child) {
|
|
352
|
-
margin-left: 5px;
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// TODO: do that in js, should be cleaner
|
|
358
|
-
/* css hack, only first not hidden */
|
|
359
|
-
&:not(.hidden):not([style*='display:none']) {
|
|
360
|
-
&:first-of-type {
|
|
361
|
-
> button, > a, > .menuitem {
|
|
362
|
-
> form, > input {
|
|
363
|
-
margin-top: $icon-margin - 2px; // minus the input margin
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
&:last-of-type {
|
|
368
|
-
> button, > a, > .menuitem {
|
|
369
|
-
> form, > input {
|
|
370
|
-
margin-bottom: $icon-margin - 2px; // minus the input margin
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
> button {
|
|
376
|
-
padding: 0;
|
|
377
|
-
span {
|
|
378
|
-
opacity: $opacity_full;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
</style>
|