@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,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2020 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
|
-
import ListItemIcon from './ListItemIcon'
|
|
24
|
-
|
|
25
|
-
export default ListItemIcon
|
|
@@ -1,833 +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
|
-
-->
|
|
22
|
-
|
|
23
|
-
<docs>
|
|
24
|
-
|
|
25
|
-
```vue
|
|
26
|
-
<template>
|
|
27
|
-
<div>
|
|
28
|
-
<button @click="showModal">Show Modal</button>
|
|
29
|
-
<modal v-if="modal" @close="closeModal">
|
|
30
|
-
<div class="modal__content">Hello world</div>
|
|
31
|
-
</modal>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
<style scoped>
|
|
35
|
-
.modal__content {
|
|
36
|
-
width: 50vw;
|
|
37
|
-
text-align: center;
|
|
38
|
-
margin: 10vw 0;
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
41
|
-
<script>
|
|
42
|
-
export default {
|
|
43
|
-
data() {
|
|
44
|
-
return {
|
|
45
|
-
modal: false
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
methods: {
|
|
49
|
-
showModal() {
|
|
50
|
-
this.modal = true
|
|
51
|
-
},
|
|
52
|
-
closeModal() {
|
|
53
|
-
this.modal = false
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
</script>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
</docs>
|
|
61
|
-
<template>
|
|
62
|
-
<transition name="fade">
|
|
63
|
-
<div ref="mask"
|
|
64
|
-
class="modal-mask"
|
|
65
|
-
:class="{ 'modal-mask--dark': dark }"
|
|
66
|
-
@click="handleMouseMove"
|
|
67
|
-
@mousemove="handleMouseMove"
|
|
68
|
-
@touchmove="handleMouseMove">
|
|
69
|
-
<!-- Header -->
|
|
70
|
-
<transition name="fade-visibility">
|
|
71
|
-
<div v-show="!clearView"
|
|
72
|
-
:class="{
|
|
73
|
-
invisible: clearView
|
|
74
|
-
}"
|
|
75
|
-
class="modal-header">
|
|
76
|
-
<div v-if="title.trim() !== ''" class="modal-title">
|
|
77
|
-
{{ title }}
|
|
78
|
-
</div>
|
|
79
|
-
<div class="icons-menu">
|
|
80
|
-
<!-- Play-pause toggle -->
|
|
81
|
-
<button v-if="hasNext && enableSlideshow"
|
|
82
|
-
v-tooltip.auto="playPauseTitle"
|
|
83
|
-
:class="{ 'play-pause--paused': slideshowPaused }"
|
|
84
|
-
class="play-pause"
|
|
85
|
-
type="button"
|
|
86
|
-
@click="togglePlayPause">
|
|
87
|
-
<!-- Progress circle, css animated -->
|
|
88
|
-
<div :class="[playing ? 'icon-pause' : 'icon-play']">
|
|
89
|
-
<span class="hidden-visually">
|
|
90
|
-
{{ playPauseTitle }}
|
|
91
|
-
</span>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<!-- Progress circle, css animated -->
|
|
95
|
-
<svg v-if="playing"
|
|
96
|
-
class="progress-ring"
|
|
97
|
-
height="50"
|
|
98
|
-
width="50">
|
|
99
|
-
<circle class="progress-ring__circle"
|
|
100
|
-
stroke="white"
|
|
101
|
-
stroke-width="2"
|
|
102
|
-
fill="transparent"
|
|
103
|
-
r="15"
|
|
104
|
-
cx="25"
|
|
105
|
-
cy="25" />
|
|
106
|
-
</svg>
|
|
107
|
-
</button>
|
|
108
|
-
|
|
109
|
-
<!-- Actions menu -->
|
|
110
|
-
<Actions class="header-actions">
|
|
111
|
-
<!-- @slot List of actions to show -->
|
|
112
|
-
<slot name="actions" />
|
|
113
|
-
</Actions>
|
|
114
|
-
|
|
115
|
-
<!-- Close modal -->
|
|
116
|
-
<Actions v-if="canClose" class="header-close">
|
|
117
|
-
<ActionButton icon="icon-close" @click="close">
|
|
118
|
-
{{ t('Close') }}
|
|
119
|
-
</ActionButton>
|
|
120
|
-
</Actions>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</transition>
|
|
124
|
-
|
|
125
|
-
<!-- Content wrapper -->
|
|
126
|
-
<transition :name="modalTransitionName">
|
|
127
|
-
<div
|
|
128
|
-
v-show="showModal"
|
|
129
|
-
:class="[
|
|
130
|
-
`modal-wrapper--${size}`,
|
|
131
|
-
spreadNavigation ? 'modal-wrapper--spread-navigation' : ''
|
|
132
|
-
]"
|
|
133
|
-
class="modal-wrapper"
|
|
134
|
-
@mousedown.self="close">
|
|
135
|
-
<!-- Navigation button -->
|
|
136
|
-
<transition name="fade-visibility">
|
|
137
|
-
<a v-show="hasPrevious && !clearView"
|
|
138
|
-
class="prev"
|
|
139
|
-
:class="{
|
|
140
|
-
invisible: clearView || !hasPrevious
|
|
141
|
-
}"
|
|
142
|
-
@click="previous">
|
|
143
|
-
<div class="icon icon-previous">
|
|
144
|
-
<span class="hidden-visually">
|
|
145
|
-
{{ t('Previous') }}
|
|
146
|
-
</span>
|
|
147
|
-
</div>
|
|
148
|
-
</a>
|
|
149
|
-
</transition>
|
|
150
|
-
|
|
151
|
-
<!-- Content -->
|
|
152
|
-
<div class="modal-container">
|
|
153
|
-
<!-- @slot Modal content to render -->
|
|
154
|
-
<slot />
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
<!-- Navigation button -->
|
|
158
|
-
<transition name="fade-visibility">
|
|
159
|
-
<a v-show="hasNext && !clearView"
|
|
160
|
-
class="next"
|
|
161
|
-
:class="{
|
|
162
|
-
invisible: clearView || !hasNext
|
|
163
|
-
}"
|
|
164
|
-
@click="next">
|
|
165
|
-
<div class="icon icon-next">
|
|
166
|
-
<span class="hidden-visually">
|
|
167
|
-
{{ t('Next') }}
|
|
168
|
-
</span>
|
|
169
|
-
</div>
|
|
170
|
-
</a>
|
|
171
|
-
</transition>
|
|
172
|
-
</div>
|
|
173
|
-
</transition>
|
|
174
|
-
</div>
|
|
175
|
-
</transition>
|
|
176
|
-
</template>
|
|
177
|
-
|
|
178
|
-
<script>
|
|
179
|
-
import Hammer from 'hammerjs'
|
|
180
|
-
import Actions from '../Actions'
|
|
181
|
-
import ActionButton from '../ActionButton'
|
|
182
|
-
import l10n from '../../mixins/l10n'
|
|
183
|
-
import { t } from '../../l10n'
|
|
184
|
-
import Tooltip from '../../directives/Tooltip'
|
|
185
|
-
import Timer from '../../utils/Timer'
|
|
186
|
-
|
|
187
|
-
export default {
|
|
188
|
-
name: 'Modal',
|
|
189
|
-
|
|
190
|
-
components: {
|
|
191
|
-
Actions,
|
|
192
|
-
ActionButton,
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
directives: {
|
|
196
|
-
tooltip: Tooltip,
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
mixins: [l10n],
|
|
200
|
-
|
|
201
|
-
props: {
|
|
202
|
-
/**
|
|
203
|
-
* Title to be shown with the modal
|
|
204
|
-
*/
|
|
205
|
-
title: {
|
|
206
|
-
type: String,
|
|
207
|
-
default: '',
|
|
208
|
-
},
|
|
209
|
-
/**
|
|
210
|
-
* Declare if a previous slide is available
|
|
211
|
-
*/
|
|
212
|
-
hasPrevious: {
|
|
213
|
-
type: Boolean,
|
|
214
|
-
default: false,
|
|
215
|
-
},
|
|
216
|
-
/**
|
|
217
|
-
* Declare if a next slide is available
|
|
218
|
-
*/
|
|
219
|
-
hasNext: {
|
|
220
|
-
type: Boolean,
|
|
221
|
-
default: false,
|
|
222
|
-
},
|
|
223
|
-
/**
|
|
224
|
-
* Declare if hiding the modal should be animated
|
|
225
|
-
*/
|
|
226
|
-
outTransition: {
|
|
227
|
-
type: Boolean,
|
|
228
|
-
default: false,
|
|
229
|
-
},
|
|
230
|
-
/**
|
|
231
|
-
* Declare if the slideshow functionality should be enabled
|
|
232
|
-
*/
|
|
233
|
-
enableSlideshow: {
|
|
234
|
-
type: Boolean,
|
|
235
|
-
default: false,
|
|
236
|
-
},
|
|
237
|
-
clearViewDelay: {
|
|
238
|
-
type: Number,
|
|
239
|
-
default: 5000,
|
|
240
|
-
},
|
|
241
|
-
/**
|
|
242
|
-
* Declare the slide interval
|
|
243
|
-
*/
|
|
244
|
-
slideshowDelay: {
|
|
245
|
-
type: Number,
|
|
246
|
-
default: 3000,
|
|
247
|
-
},
|
|
248
|
-
/**
|
|
249
|
-
* Allow to pause an ongoing slideshow
|
|
250
|
-
*/
|
|
251
|
-
slideshowPaused: {
|
|
252
|
-
type: Boolean,
|
|
253
|
-
default: false,
|
|
254
|
-
},
|
|
255
|
-
/**
|
|
256
|
-
* Enable swipe between slides
|
|
257
|
-
*/
|
|
258
|
-
enableSwipe: {
|
|
259
|
-
type: Boolean,
|
|
260
|
-
default: true,
|
|
261
|
-
},
|
|
262
|
-
spreadNavigation: {
|
|
263
|
-
type: Boolean,
|
|
264
|
-
default: false,
|
|
265
|
-
},
|
|
266
|
-
size: {
|
|
267
|
-
type: String,
|
|
268
|
-
default: 'normal',
|
|
269
|
-
validator: size => {
|
|
270
|
-
return ['normal', 'large', 'full'].indexOf(size) !== -1
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
/**
|
|
274
|
-
* Declare if the modal can be closed
|
|
275
|
-
*/
|
|
276
|
-
canClose: {
|
|
277
|
-
type: Boolean,
|
|
278
|
-
default: true,
|
|
279
|
-
},
|
|
280
|
-
/** Makes the modal backdrop black if true */
|
|
281
|
-
dark: {
|
|
282
|
-
type: Boolean,
|
|
283
|
-
default: false,
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Selector for the modal container
|
|
288
|
-
*/
|
|
289
|
-
container: {
|
|
290
|
-
type: String,
|
|
291
|
-
default: 'body',
|
|
292
|
-
},
|
|
293
|
-
},
|
|
294
|
-
|
|
295
|
-
data() {
|
|
296
|
-
return {
|
|
297
|
-
mc: null,
|
|
298
|
-
showModal: false,
|
|
299
|
-
clearView: false,
|
|
300
|
-
clearViewTimeout: null,
|
|
301
|
-
playing: false,
|
|
302
|
-
slideshowTimeout: null,
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
computed: {
|
|
307
|
-
modalTransitionName() {
|
|
308
|
-
return `modal-${this.outTransition ? 'out' : 'in'}`
|
|
309
|
-
},
|
|
310
|
-
playPauseTitle() {
|
|
311
|
-
return this.playing ? t('Pause slideshow') : t('Start slideshow')
|
|
312
|
-
},
|
|
313
|
-
},
|
|
314
|
-
|
|
315
|
-
watch: {
|
|
316
|
-
/**
|
|
317
|
-
* Handle play/pause of an ongoing slideshow
|
|
318
|
-
* @param {boolean} paused is the player paused
|
|
319
|
-
*/
|
|
320
|
-
slideshowPaused(paused) {
|
|
321
|
-
if (this.slideshowTimeout) {
|
|
322
|
-
if (paused) {
|
|
323
|
-
this.slideshowTimeout.pause()
|
|
324
|
-
} else {
|
|
325
|
-
this.slideshowTimeout.start()
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
beforeMount() {
|
|
332
|
-
window.addEventListener('keydown', this.handleKeydown)
|
|
333
|
-
},
|
|
334
|
-
beforeDestroy() {
|
|
335
|
-
window.removeEventListener('keydown', this.handleKeydown)
|
|
336
|
-
this.mc.off('swipeleft swiperight')
|
|
337
|
-
this.mc.destroy()
|
|
338
|
-
},
|
|
339
|
-
mounted() {
|
|
340
|
-
this.showModal = true
|
|
341
|
-
|
|
342
|
-
// init clear view
|
|
343
|
-
this.handleMouseMove()
|
|
344
|
-
|
|
345
|
-
this.mc = new Hammer(this.$refs.mask)
|
|
346
|
-
this.mc.on('swipeleft swiperight', e => {
|
|
347
|
-
this.handleSwipe(e)
|
|
348
|
-
})
|
|
349
|
-
|
|
350
|
-
if (this.container === 'body') {
|
|
351
|
-
// force mount the component to body
|
|
352
|
-
document.body.insertBefore(this.$el, document.body.lastChild)
|
|
353
|
-
} else {
|
|
354
|
-
const container = document.querySelector(this.container)
|
|
355
|
-
container.appendChild(this.$el)
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
},
|
|
359
|
-
destroyed() {
|
|
360
|
-
this.$el.remove()
|
|
361
|
-
},
|
|
362
|
-
|
|
363
|
-
methods: {
|
|
364
|
-
// Events emitters
|
|
365
|
-
previous(data) {
|
|
366
|
-
// do not send the event if nothing is available
|
|
367
|
-
if (this.hasPrevious) {
|
|
368
|
-
// if data is set, then it's a user mouse event
|
|
369
|
-
// and not the slideshow handler, therefore
|
|
370
|
-
// we reset the timer
|
|
371
|
-
if (data) {
|
|
372
|
-
this.resetSlideshow()
|
|
373
|
-
}
|
|
374
|
-
this.$emit('previous', data)
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
next(data) {
|
|
378
|
-
// do not send the event if nothing is available
|
|
379
|
-
if (this.hasNext) {
|
|
380
|
-
// if data is set, then it's a mouse event
|
|
381
|
-
// and not the slideshow handler, therefore
|
|
382
|
-
// we reset the timer
|
|
383
|
-
if (data) {
|
|
384
|
-
this.resetSlideshow()
|
|
385
|
-
}
|
|
386
|
-
this.$emit('next', data)
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
close(data) {
|
|
390
|
-
// do not fire event if forbidden
|
|
391
|
-
if (this.canClose) {
|
|
392
|
-
this.showModal = false
|
|
393
|
-
|
|
394
|
-
// delay closing for animation
|
|
395
|
-
setTimeout(() => {
|
|
396
|
-
/**
|
|
397
|
-
* Emitted when the closing animation is finished
|
|
398
|
-
*/
|
|
399
|
-
this.$emit('close', data)
|
|
400
|
-
}, 300)
|
|
401
|
-
}
|
|
402
|
-
},
|
|
403
|
-
|
|
404
|
-
// Key Handlers
|
|
405
|
-
handleKeydown(e) {
|
|
406
|
-
switch (e.keyCode) {
|
|
407
|
-
case 37: // left arrow
|
|
408
|
-
this.previous(e)
|
|
409
|
-
break
|
|
410
|
-
case 13: // enter key
|
|
411
|
-
case 39: // rigth arrow
|
|
412
|
-
this.next(e)
|
|
413
|
-
break
|
|
414
|
-
case 27: // escape key
|
|
415
|
-
this.close(e)
|
|
416
|
-
break
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
|
-
handleSwipe(e) {
|
|
420
|
-
if (this.enableSwipe) {
|
|
421
|
-
if (e.type === 'swipeleft') {
|
|
422
|
-
// swiping to left to go to the next item
|
|
423
|
-
this.next(e)
|
|
424
|
-
} else if (e.type === 'swiperight') {
|
|
425
|
-
// swiping to right to go back to the previous item
|
|
426
|
-
this.previous(e)
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
handleMouseMove() {
|
|
431
|
-
if (this.clearViewDelay > 0) {
|
|
432
|
-
this.clearView = false
|
|
433
|
-
clearTimeout(this.clearViewTimeout)
|
|
434
|
-
this.clearViewTimeout = setTimeout(() => {
|
|
435
|
-
this.clearView = true
|
|
436
|
-
}, this.clearViewDelay)
|
|
437
|
-
}
|
|
438
|
-
},
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* Toggle the slideshow state
|
|
442
|
-
*/
|
|
443
|
-
togglePlayPause() {
|
|
444
|
-
this.playing = !this.playing
|
|
445
|
-
if (this.playing) {
|
|
446
|
-
this.handleSlideshow()
|
|
447
|
-
} else {
|
|
448
|
-
this.clearSlideshowTimeout()
|
|
449
|
-
}
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Reset the slideshow timer and keep going if it was on
|
|
454
|
-
*/
|
|
455
|
-
resetSlideshow() {
|
|
456
|
-
this.playing = !this.playing
|
|
457
|
-
this.clearSlideshowTimeout()
|
|
458
|
-
this.$nextTick(function() {
|
|
459
|
-
this.togglePlayPause()
|
|
460
|
-
})
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Handle the slideshow timer and next event
|
|
465
|
-
*/
|
|
466
|
-
handleSlideshow() {
|
|
467
|
-
this.playing = true
|
|
468
|
-
if (this.hasNext) {
|
|
469
|
-
this.slideshowTimeout = new Timer(() => {
|
|
470
|
-
this.next()
|
|
471
|
-
this.handleSlideshow()
|
|
472
|
-
}, this.slideshowDelay)
|
|
473
|
-
} else {
|
|
474
|
-
this.playing = false
|
|
475
|
-
this.clearSlideshowTimeout()
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* Clear slideshowTimeout if ongoing
|
|
481
|
-
*/
|
|
482
|
-
clearSlideshowTimeout() {
|
|
483
|
-
if (this.slideshowTimeout) {
|
|
484
|
-
this.slideshowTimeout.clear()
|
|
485
|
-
}
|
|
486
|
-
},
|
|
487
|
-
},
|
|
488
|
-
}
|
|
489
|
-
</script>
|
|
490
|
-
|
|
491
|
-
<style lang="scss" scoped>
|
|
492
|
-
@import '../../fonts/scss/iconfont-vue';
|
|
493
|
-
$header-size: 50px;
|
|
494
|
-
|
|
495
|
-
.modal-mask {
|
|
496
|
-
position: fixed;
|
|
497
|
-
z-index: 9998;
|
|
498
|
-
top: 0;
|
|
499
|
-
left: 0;
|
|
500
|
-
display: block;
|
|
501
|
-
width: 100%;
|
|
502
|
-
height: 100%;
|
|
503
|
-
background-color: rgba(0, 0, 0, .5);
|
|
504
|
-
&--dark {
|
|
505
|
-
background-color: rgba(0, 0, 0, .92);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
.modal-header {
|
|
510
|
-
position: absolute;
|
|
511
|
-
z-index: 10001;
|
|
512
|
-
top: 0;
|
|
513
|
-
right: 0;
|
|
514
|
-
left: 0;
|
|
515
|
-
// prevent vue show to use display:none and reseting
|
|
516
|
-
// the circle animation loop
|
|
517
|
-
display: flex !important;
|
|
518
|
-
align-items: center;
|
|
519
|
-
justify-content: center;
|
|
520
|
-
width: 100%;
|
|
521
|
-
height: $header-size;
|
|
522
|
-
transition: opacity 250ms,
|
|
523
|
-
visibility 250ms;
|
|
524
|
-
|
|
525
|
-
// replace display by visibility
|
|
526
|
-
&.invisible[style*='display:none'],
|
|
527
|
-
&.invisible[style*='display: none'] {
|
|
528
|
-
visibility: hidden;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
.modal-title {
|
|
532
|
-
overflow-x: hidden;
|
|
533
|
-
box-sizing: border-box;
|
|
534
|
-
width: 100%;
|
|
535
|
-
padding: 0 #{$clickable-area * 3} 0 12px; // maximum actions is 3
|
|
536
|
-
transition: padding ease 100ms;
|
|
537
|
-
white-space: nowrap;
|
|
538
|
-
text-overflow: ellipsis;
|
|
539
|
-
color: #fff;
|
|
540
|
-
font-size: $icon-margin;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
// On wider screens the title can be centered
|
|
544
|
-
@media only screen and (min-width: $breakpoint-mobile/2) {
|
|
545
|
-
.modal-title {
|
|
546
|
-
text-align: center;
|
|
547
|
-
padding-left: #{$clickable-area * 3}; // maximum actions is 3
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
.icons-menu {
|
|
552
|
-
position: absolute;
|
|
553
|
-
right: 0;
|
|
554
|
-
display: flex;
|
|
555
|
-
align-items: center;
|
|
556
|
-
justify-content: flex-end;
|
|
557
|
-
|
|
558
|
-
.icon-close {
|
|
559
|
-
box-sizing: border-box;
|
|
560
|
-
margin: ($header-size - $clickable-area) / 2;
|
|
561
|
-
// not using $icon-margin since we have a custom font size
|
|
562
|
-
// and alignement seems odd
|
|
563
|
-
padding: 10px 11px;
|
|
564
|
-
color: #fff;
|
|
565
|
-
background-image: none;
|
|
566
|
-
font-size: 23px;
|
|
567
|
-
|
|
568
|
-
@include iconfont('close');
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
.play-pause {
|
|
572
|
-
position: relative;
|
|
573
|
-
width: $header-size;
|
|
574
|
-
height: $header-size;
|
|
575
|
-
margin: 0;
|
|
576
|
-
padding: 0;
|
|
577
|
-
cursor: pointer;
|
|
578
|
-
color: white;
|
|
579
|
-
border: none;
|
|
580
|
-
background-color: transparent;
|
|
581
|
-
font-size: 22px;
|
|
582
|
-
&:hover,
|
|
583
|
-
&:focus {
|
|
584
|
-
.icon-play,
|
|
585
|
-
.icon-pause {
|
|
586
|
-
opacity: 1;
|
|
587
|
-
border-radius: $clickable-area / 2;
|
|
588
|
-
background-color: $icon-focus-bg;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
.icon-play,
|
|
592
|
-
.icon-pause {
|
|
593
|
-
box-sizing: border-box;
|
|
594
|
-
width: $clickable-area;
|
|
595
|
-
height: $clickable-area;
|
|
596
|
-
margin: ($header-size - $clickable-area) / 2;
|
|
597
|
-
opacity: .7;
|
|
598
|
-
background-image: none;
|
|
599
|
-
cursor: pointer;
|
|
600
|
-
}
|
|
601
|
-
.icon-play {
|
|
602
|
-
// better visual
|
|
603
|
-
padding: 11px 13px;
|
|
604
|
-
@include iconfont('play');
|
|
605
|
-
}
|
|
606
|
-
.icon-pause {
|
|
607
|
-
padding: 12px;
|
|
608
|
-
// ! align with circle
|
|
609
|
-
font-size: 19.5px;
|
|
610
|
-
@include iconfont('pause');
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.header-actions {
|
|
615
|
-
margin: ($header-size - $clickable-area) / 2;
|
|
616
|
-
color: white;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
.action-item--single {
|
|
620
|
-
box-sizing: border-box;
|
|
621
|
-
width: $clickable-area;
|
|
622
|
-
height: $clickable-area;
|
|
623
|
-
cursor: pointer;
|
|
624
|
-
background-position: center;
|
|
625
|
-
background-size: 22px;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
&::v-deep .action-item__menutoggle {
|
|
629
|
-
padding: 13px 11px;
|
|
630
|
-
// force white instead of default main text
|
|
631
|
-
color: #fff;
|
|
632
|
-
// 22px is a somehow better looking for the icon-more icon
|
|
633
|
-
font-size: 22px;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
.modal-wrapper {
|
|
640
|
-
display: flex;
|
|
641
|
-
align-items: center;
|
|
642
|
-
justify-content: center;
|
|
643
|
-
box-sizing: border-box;
|
|
644
|
-
width: 100%;
|
|
645
|
-
height: 100%;
|
|
646
|
-
|
|
647
|
-
/* Navigation buttons */
|
|
648
|
-
.prev,
|
|
649
|
-
.next {
|
|
650
|
-
z-index: 10000;
|
|
651
|
-
// ignore display: none
|
|
652
|
-
display: flex !important;
|
|
653
|
-
align-items: center;
|
|
654
|
-
justify-content: center;
|
|
655
|
-
width: 15%;
|
|
656
|
-
min-width: 60px;
|
|
657
|
-
height: 100%;
|
|
658
|
-
transition: opacity 250ms,
|
|
659
|
-
visibility 250ms;
|
|
660
|
-
|
|
661
|
-
// we want to keep the elements on page
|
|
662
|
-
// even if hidden to avoid having a unbalanced
|
|
663
|
-
// centered content
|
|
664
|
-
// replace display by visibility
|
|
665
|
-
&.invisible[style*='display:none'],
|
|
666
|
-
&.invisible[style*='display: none'] {
|
|
667
|
-
visibility: hidden;
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
// buttons/icons
|
|
672
|
-
.icon-next,
|
|
673
|
-
.icon-previous {
|
|
674
|
-
box-sizing: border-box;
|
|
675
|
-
width: $clickable-area;
|
|
676
|
-
height: $clickable-area;
|
|
677
|
-
padding: 12px 11px;
|
|
678
|
-
color: white;
|
|
679
|
-
border-radius: $clickable-area / 2;
|
|
680
|
-
background-image: none;
|
|
681
|
-
font-size: 24px;
|
|
682
|
-
}
|
|
683
|
-
.icon-previous {
|
|
684
|
-
@include iconfont('arrow-left');
|
|
685
|
-
}
|
|
686
|
-
.icon-next {
|
|
687
|
-
@include iconfont('arrow-right');
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
/* Content */
|
|
691
|
-
.modal-container {
|
|
692
|
-
display: block;
|
|
693
|
-
overflow: hidden;
|
|
694
|
-
padding: 0;
|
|
695
|
-
transition: transform 300ms ease;
|
|
696
|
-
border-radius: var(--border-radius-large);
|
|
697
|
-
background-color: var(--color-main-background);
|
|
698
|
-
box-shadow: 0 0 40px rgba(0, 0, 0, .2);
|
|
699
|
-
}
|
|
700
|
-
&:not(&--large):not(&--full) .modal-container {
|
|
701
|
-
max-width: 900px;
|
|
702
|
-
max-height: 80%;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
// Sizing
|
|
706
|
-
&--full {
|
|
707
|
-
.modal-container {
|
|
708
|
-
max-width: 100%;
|
|
709
|
-
max-height: 100%;
|
|
710
|
-
border-radius: 0;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
&--full,
|
|
714
|
-
&--spread-navigation {
|
|
715
|
-
.prev,
|
|
716
|
-
.next {
|
|
717
|
-
position: absolute;
|
|
718
|
-
width: 10%;
|
|
719
|
-
}
|
|
720
|
-
.prev {
|
|
721
|
-
left: 0;
|
|
722
|
-
}
|
|
723
|
-
.next {
|
|
724
|
-
right: 0;
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
&--large {
|
|
728
|
-
.modal-container {
|
|
729
|
-
max-width: 85%;
|
|
730
|
-
max-height: 90%;
|
|
731
|
-
}
|
|
732
|
-
.prev,
|
|
733
|
-
.next {
|
|
734
|
-
width: 10%;
|
|
735
|
-
min-width: $clickable-area;
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
/* TRANSITIONS */
|
|
741
|
-
.fade-enter-active,
|
|
742
|
-
.fade-leave-active {
|
|
743
|
-
transition: opacity 250ms;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
.fade-enter,
|
|
747
|
-
.fade-leave-to {
|
|
748
|
-
opacity: 0;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
.fade-visibility-enter,
|
|
752
|
-
.fade-visibility-leave-to {
|
|
753
|
-
visibility: hidden;
|
|
754
|
-
opacity: 0;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
.modal-in-enter-active,
|
|
758
|
-
.modal-in-leave-active,
|
|
759
|
-
.modal-out-enter-active,
|
|
760
|
-
.modal-out-leave-active {
|
|
761
|
-
transition: opacity 250ms;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
.modal-in-enter,
|
|
765
|
-
.modal-in-leave-to,
|
|
766
|
-
.modal-out-enter,
|
|
767
|
-
.modal-out-leave-to {
|
|
768
|
-
opacity: 0;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
.modal-in-enter .modal-container,
|
|
772
|
-
.modal-in-leave-to .modal-container {
|
|
773
|
-
transform: scale(.9);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
.modal-out-enter .modal-container,
|
|
777
|
-
.modal-out-leave-to .modal-container {
|
|
778
|
-
transform: scale(1.1);
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
// animated circle
|
|
782
|
-
$radius: 15;
|
|
783
|
-
$pi: 3.14159265358979;
|
|
784
|
-
|
|
785
|
-
.modal-mask .play-pause {
|
|
786
|
-
.progress-ring {
|
|
787
|
-
position: absolute;
|
|
788
|
-
top: 0;
|
|
789
|
-
left: 0;
|
|
790
|
-
transform: rotate(-90deg);
|
|
791
|
-
.progress-ring__circle {
|
|
792
|
-
transition: 100ms stroke-dashoffset;
|
|
793
|
-
transform-origin: 50% 50%; // axis compensation
|
|
794
|
-
animation: progressring linear 3s infinite;
|
|
795
|
-
|
|
796
|
-
stroke-linecap: round;
|
|
797
|
-
stroke-dashoffset: $radius * 2 * $pi; // radius * 2 * PI
|
|
798
|
-
stroke-dasharray: $radius * 2 * $pi; // radius * 2 * PI
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
&--paused {
|
|
802
|
-
.icon-pause {
|
|
803
|
-
animation: breath 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
804
|
-
}
|
|
805
|
-
.progress-ring__circle {
|
|
806
|
-
animation-play-state: paused !important;
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
// keyframes get scoped too and break the animation name, we need them unscoped
|
|
812
|
-
@keyframes progressring {
|
|
813
|
-
from {
|
|
814
|
-
stroke-dashoffset: $radius * 2 * $pi; // radius * 2 * PI
|
|
815
|
-
}
|
|
816
|
-
to {
|
|
817
|
-
stroke-dashoffset: 0;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
@keyframes breath {
|
|
822
|
-
0% {
|
|
823
|
-
opacity: 1;
|
|
824
|
-
}
|
|
825
|
-
50% {
|
|
826
|
-
opacity: 0;
|
|
827
|
-
}
|
|
828
|
-
100% {
|
|
829
|
-
opacity: 1;
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
</style>
|