@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.0 → 7.24.3-EPDM-11143.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/.prettierrc +7 -0
- package/package.json +20 -6
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +70 -75
- package/src/assets/svgIcons/copy.svg +10 -0
- package/src/components/addNewButton/index.vue +27 -24
- package/src/components/banner/actionBanner/index.vue +30 -32
- package/src/components/banner/banner/index.vue +80 -88
- package/src/components/banner/infoBanner/index.vue +44 -36
- package/src/components/buttons/buttonIcon/index.vue +78 -83
- package/src/components/buttons/closeButton/index.vue +26 -26
- package/src/components/buttons/mainButton/index.vue +76 -80
- package/src/components/card/index.vue +52 -56
- package/src/components/collapsableInfoText/index.vue +76 -81
- package/src/components/deleteIcon/index.vue +28 -31
- package/src/components/draggableInputHandle/index.vue +17 -20
- package/src/components/dropdown/Dropdown.stories.js +8 -8
- package/src/components/dropdown/index.vue +72 -75
- package/src/components/errorMessage/index.vue +23 -23
- package/src/components/filter/filterSettings.vue +329 -349
- package/src/components/filter/index.vue +130 -130
- package/src/components/filter/parentDropdown.vue +40 -43
- package/src/components/icon/Icons.stories.js +4 -4
- package/src/components/icon/iconCache.js +1 -1
- package/src/components/icon/iconCollection.vue +37 -40
- package/src/components/icon/index.vue +65 -72
- package/src/components/iconWrapper/index.vue +118 -122
- package/src/components/infoCard/index.vue +17 -20
- package/src/components/infoText/index.vue +82 -88
- package/src/components/inputs/checkbox/index.vue +94 -91
- package/src/components/inputs/inputNumber/index.vue +488 -508
- package/src/components/inputs/inputNumberQuestion/index.vue +124 -127
- package/src/components/inputs/inputText/index.vue +252 -265
- package/src/components/inputs/radioButton/index.vue +120 -135
- package/src/components/inputs/searchInput/index.vue +81 -84
- package/src/components/inputs/select/index.vue +631 -644
- package/src/components/inputs/select/option/index.vue +91 -91
- package/src/components/inputs/select/select.stories.js +7 -7
- package/src/components/inputs/slider/index.vue +46 -46
- package/src/components/inputs/switchField/index.vue +152 -159
- package/src/components/inputs/textAreaInput/index.vue +113 -120
- package/src/components/inputs/toggle/index.vue +127 -137
- package/src/components/label/index.vue +61 -64
- package/src/components/markerItem/index.vue +40 -40
- package/src/components/modals/actionModal/index.vue +29 -32
- package/src/components/modals/infoModal/index.vue +27 -34
- package/src/components/modals/modal/index.vue +80 -88
- package/src/components/navigationTabs/index.vue +47 -50
- package/src/components/pageSubtitle/index.vue +29 -33
- package/src/components/pageTitle/index.vue +39 -47
- package/src/components/pagination/index.vue +62 -64
- package/src/components/progressBar/index.vue +67 -70
- package/src/components/projectMarker/index.vue +163 -172
- package/src/components/rangeSlider/Slider.vue +449 -449
- package/src/components/rangeSlider/index.vue +270 -282
- package/src/components/rangeSlider/utils/dom.js +3 -3
- package/src/components/selectedOptions/index.vue +51 -51
- package/src/components/sideMenu/index.vue +109 -117
- package/src/components/spinner/index.vue +34 -37
- package/src/components/tableDropdown/index.vue +326 -343
- package/src/components/tables/mainTable/index.vue +106 -109
- package/src/components/tables/viewTable/index.vue +92 -105
- package/src/components/threeDots/index.vue +171 -174
- package/src/components/videoThumbnail/index.vue +59 -67
- package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
- package/.eslintrc.js +0 -125
@@ -1,6 +1,6 @@
|
|
1
1
|
import { isFunction } from './fns'
|
2
2
|
|
3
|
-
export function matchesSelectorToParentElements(el, selector, baseNode) {
|
3
|
+
export function matchesSelectorToParentElements (el, selector, baseNode) {
|
4
4
|
let node = el
|
5
5
|
|
6
6
|
const matchesSelectorFunc = [
|
@@ -22,7 +22,7 @@ export function matchesSelectorToParentElements(el, selector, baseNode) {
|
|
22
22
|
return false
|
23
23
|
}
|
24
24
|
|
25
|
-
export function addEvent(el, event, handler) {
|
25
|
+
export function addEvent (el, event, handler) {
|
26
26
|
if (!el) {
|
27
27
|
return
|
28
28
|
}
|
@@ -35,7 +35,7 @@ export function addEvent(el, event, handler) {
|
|
35
35
|
}
|
36
36
|
}
|
37
37
|
|
38
|
-
export function removeEvent(el, event, handler) {
|
38
|
+
export function removeEvent (el, event, handler) {
|
39
39
|
if (!el) {
|
40
40
|
return
|
41
41
|
}
|
@@ -1,32 +1,32 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
{{ numberSelected }} {{ $gettext('selected') }}
|
6
|
-
|
7
|
-
<
|
8
|
-
<
|
2
|
+
<page-container>
|
3
|
+
<box-container>
|
4
|
+
<selected-container
|
5
|
+
>{{ numberSelected }} {{ $gettext('selected') }}</selected-container
|
6
|
+
>
|
7
|
+
<list-container v-if="optionsList.length">
|
8
|
+
<list-item
|
9
9
|
v-for="item in optionsList"
|
10
10
|
:key="item.type"
|
11
|
-
:
|
11
|
+
:hoverColor="item.hoverColor"
|
12
12
|
@click="$emit('on-' + item.type)"
|
13
13
|
>
|
14
14
|
{{ item.name }}
|
15
|
-
</
|
16
|
-
</
|
17
|
-
<
|
15
|
+
</list-item>
|
16
|
+
</list-container>
|
17
|
+
<empty-text v-if="!optionsList.length">
|
18
18
|
{{ $gettext('no_batch_actions_available') }}
|
19
|
-
</
|
20
|
-
<
|
21
|
-
<
|
22
|
-
color="white"
|
23
|
-
cursor="pointer"
|
19
|
+
</empty-text>
|
20
|
+
<icon-container @click="$emit('on-close')">
|
21
|
+
<icon
|
24
22
|
name="close_for_modals,_tool_tips"
|
23
|
+
color="white"
|
25
24
|
size="14px"
|
25
|
+
cursor="pointer"
|
26
26
|
/>
|
27
|
-
</
|
28
|
-
</
|
29
|
-
</
|
27
|
+
</icon-container>
|
28
|
+
</box-container>
|
29
|
+
</page-container>
|
30
30
|
</template>
|
31
31
|
|
32
32
|
<script>
|
@@ -49,17 +49,17 @@
|
|
49
49
|
// @on-close="onCloseFunction()"
|
50
50
|
// @on-export="function()" @on-delete="function()"
|
51
51
|
// />
|
52
|
-
|
53
|
-
|
52
|
+
import styled from 'vue3-styled-components'
|
53
|
+
import Icon from '../icon'
|
54
54
|
|
55
|
-
|
55
|
+
const PageContainer = styled.div`
|
56
56
|
position: fixed;
|
57
57
|
bottom: 30px;
|
58
58
|
left: 50%;
|
59
59
|
transform: translateX(-50%);
|
60
60
|
`
|
61
61
|
|
62
|
-
|
62
|
+
const SelectedContainer = styled.div`
|
63
63
|
display: grid;
|
64
64
|
align-items: center;
|
65
65
|
height: 100%;
|
@@ -67,7 +67,7 @@
|
|
67
67
|
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
68
68
|
`
|
69
69
|
|
70
|
-
|
70
|
+
const BoxContainer = styled.div`
|
71
71
|
display: flex;
|
72
72
|
align-items: center;
|
73
73
|
background-color: ${(props) => props.theme.colors.black};
|
@@ -79,27 +79,27 @@
|
|
79
79
|
height: 40px;
|
80
80
|
`
|
81
81
|
|
82
|
-
|
82
|
+
const ListContainer = styled.div`
|
83
83
|
padding: 0 20px;
|
84
84
|
display: flex;
|
85
85
|
gap: 20px;
|
86
86
|
color: ${(props) => props.theme.colors.white};
|
87
87
|
`
|
88
88
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
const ListAttrs = {
|
90
|
+
hoverColor: String
|
91
|
+
}
|
92
|
+
const ListItem = styled('div', ListAttrs)`
|
93
93
|
cursor: pointer;
|
94
94
|
&:hover {
|
95
95
|
color: ${(props) =>
|
96
96
|
props.hoverColor
|
97
97
|
? props.theme.colors[props.hoverColor]
|
98
|
-
|
98
|
+
: props.theme.colors.green};
|
99
99
|
}
|
100
100
|
`
|
101
101
|
|
102
|
-
|
102
|
+
const IconContainer = styled.div`
|
103
103
|
display: grid;
|
104
104
|
align-items: center;
|
105
105
|
justify-items: center;
|
@@ -114,32 +114,32 @@
|
|
114
114
|
}
|
115
115
|
`
|
116
116
|
|
117
|
-
|
117
|
+
const EmptyText = styled.div`
|
118
118
|
color: ${(props) => props.theme.colors.white};
|
119
119
|
font-size: 13px;
|
120
120
|
padding-left: 16px;
|
121
121
|
`
|
122
122
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
123
|
+
export default {
|
124
|
+
name: 'selected-options',
|
125
|
+
components: {
|
126
|
+
PageContainer,
|
127
|
+
BoxContainer,
|
128
|
+
SelectedContainer,
|
129
|
+
ListContainer,
|
130
|
+
ListItem,
|
131
|
+
Icon,
|
132
|
+
IconContainer,
|
133
|
+
EmptyText
|
134
|
+
},
|
135
|
+
props: {
|
136
|
+
optionsList: {
|
137
|
+
required: true
|
134
138
|
},
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
},
|
139
|
-
numberSelected: {
|
140
|
-
required: true,
|
141
|
-
default: 0
|
142
|
-
}
|
139
|
+
numberSelected: {
|
140
|
+
required: true,
|
141
|
+
default: 0
|
143
142
|
}
|
144
143
|
}
|
144
|
+
}
|
145
145
|
</script>
|
@@ -1,58 +1,50 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
</
|
6
|
-
<
|
2
|
+
<page-container :isLoading="!tabsData.length">
|
3
|
+
<spinner-container v-if="!tabsData.length">
|
4
|
+
<spinner />
|
5
|
+
</spinner-container>
|
6
|
+
<list-container v-else>
|
7
7
|
<template v-for="(item, idx) in tabsData">
|
8
|
-
<
|
8
|
+
<list-item
|
9
9
|
v-if="!item.children"
|
10
10
|
:key="idx"
|
11
11
|
:data-id="`sub_menu_settings_${item.key}`"
|
12
|
-
:
|
12
|
+
:isActive="activeTab === item.key"
|
13
13
|
@click="$emit('tab-click', { activeKey: item.key })"
|
14
14
|
>
|
15
|
-
<
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
</IconContainer>
|
23
|
-
<ListText>{{ $gettext(item.label) }}</ListText>
|
24
|
-
</ListItem>
|
25
|
-
<CollapseWrapper
|
26
|
-
v-else
|
27
|
-
:key="idx + item.key"
|
28
|
-
>
|
29
|
-
<CollapseContainer
|
15
|
+
<icon-container :isActive="activeTab === item.key">
|
16
|
+
<icon :name="item.icon" color="#fff" cursor="pointer" size="18px" />
|
17
|
+
</icon-container>
|
18
|
+
<list-text>{{ $gettext(item.label) }}</list-text>
|
19
|
+
</list-item>
|
20
|
+
<collapse-wrapper v-else :key="idx + item.key">
|
21
|
+
<collapse-container
|
30
22
|
:data-id="`sub_menu_settings_${item.key}`"
|
31
23
|
@click="toggleActiveDropdown(item.key)"
|
32
24
|
>
|
33
|
-
<
|
34
|
-
<
|
25
|
+
<icon-container :isActive="activeParentTab === item.key">
|
26
|
+
<icon
|
27
|
+
:name="item.icon"
|
35
28
|
color="#fff"
|
36
29
|
cursor="pointer"
|
37
|
-
:name="item.icon"
|
38
30
|
size="18px"
|
39
31
|
/>
|
40
|
-
</
|
41
|
-
<
|
42
|
-
<
|
43
|
-
<
|
44
|
-
color="white"
|
32
|
+
</icon-container>
|
33
|
+
<list-text>{{ $gettext(item.label) }}</list-text>
|
34
|
+
<arrow-container>
|
35
|
+
<icon
|
45
36
|
:name="activeDropdown === item.key ? 'arrow_up' : 'arrow_down'"
|
37
|
+
color="white"
|
46
38
|
size="10px"
|
47
39
|
/>
|
48
|
-
</
|
49
|
-
</
|
40
|
+
</arrow-container>
|
41
|
+
</collapse-container>
|
50
42
|
<template v-if="activeDropdown === item.key">
|
51
|
-
<
|
43
|
+
<sub-router
|
52
44
|
v-for="subItem in item.children"
|
53
45
|
:key="subItem.key"
|
46
|
+
:isActive="activeTab === subItem.key"
|
54
47
|
:data-id="`sub_menu_settings_${subItem.key}`"
|
55
|
-
:is-active="activeTab === subItem.key"
|
56
48
|
@click="
|
57
49
|
$emit('tab-click', {
|
58
50
|
activeKey: subItem.key,
|
@@ -61,39 +53,39 @@
|
|
61
53
|
"
|
62
54
|
>
|
63
55
|
{{ $gettext(subItem.label) }}
|
64
|
-
</
|
56
|
+
</sub-router>
|
65
57
|
</template>
|
66
|
-
</
|
58
|
+
</collapse-wrapper>
|
67
59
|
</template>
|
68
|
-
</
|
69
|
-
<
|
70
|
-
<
|
60
|
+
</list-container>
|
61
|
+
<bottom-section v-if="hasLogout">
|
62
|
+
<icon-container
|
63
|
+
:isActive="false"
|
64
|
+
:isButton="true"
|
71
65
|
data-id="button_settings_logout"
|
72
|
-
:is-active="false"
|
73
|
-
:is-button="true"
|
74
66
|
@click="$emit('on-logout')"
|
75
67
|
>
|
76
|
-
<
|
68
|
+
<rotate-icon
|
69
|
+
name="initial_situation"
|
77
70
|
color="#fff"
|
78
71
|
cursor="pointer"
|
79
|
-
name="initial_situation"
|
80
72
|
size="18px"
|
81
73
|
/>
|
82
|
-
</
|
83
|
-
<
|
84
|
-
</
|
85
|
-
</
|
74
|
+
</icon-container>
|
75
|
+
<app-version>{{ appVersion }}</app-version>
|
76
|
+
</bottom-section>
|
77
|
+
</page-container>
|
86
78
|
</template>
|
87
79
|
|
88
80
|
<script>
|
89
|
-
|
90
|
-
|
91
|
-
|
81
|
+
import styled from 'vue3-styled-components'
|
82
|
+
import Icon from '../icon'
|
83
|
+
import Spinner from '../spinner'
|
92
84
|
|
93
|
-
|
94
|
-
|
85
|
+
const PageAttrs = { isLoading: Boolean }
|
86
|
+
const PageContainer = styled('div', PageAttrs)`
|
95
87
|
background-color: ${(props) =>
|
96
|
-
|
88
|
+
props.isLoading ? props.theme.colors.white : props.theme.colors.grey6};
|
97
89
|
padding: 14px 12px;
|
98
90
|
min-width: 220px;
|
99
91
|
display: flex;
|
@@ -101,14 +93,14 @@
|
|
101
93
|
justify-content: space-between;
|
102
94
|
`
|
103
95
|
|
104
|
-
|
96
|
+
const ListContainer = styled.div`
|
105
97
|
display: grid;
|
106
98
|
grid-gap: 6px;
|
107
99
|
`
|
108
100
|
|
109
|
-
|
101
|
+
const IconAttrs = { isActive: Boolean, isButton: Boolean }
|
110
102
|
|
111
|
-
|
103
|
+
const ListItem = styled('div', IconAttrs)`
|
112
104
|
display: grid;
|
113
105
|
align-items: center;
|
114
106
|
grid-template-columns: auto 1fr;
|
@@ -117,27 +109,27 @@
|
|
117
109
|
padding: 4px;
|
118
110
|
border-radius: 6px;
|
119
111
|
background-color: ${(props) =>
|
120
|
-
|
112
|
+
props.isActive ? 'rgba(255, 255, 255, 0.1)' : ''};
|
121
113
|
|
122
114
|
:hover {
|
123
115
|
background-color: rgba(255, 255, 255, 0.1);
|
124
116
|
}
|
125
117
|
`
|
126
118
|
|
127
|
-
|
119
|
+
const ListText = styled.div`
|
128
120
|
font-size: 16px;
|
129
121
|
font-weight: 700;
|
130
122
|
color: ${(props) => props.theme.colors.white};
|
131
123
|
`
|
132
124
|
|
133
|
-
|
125
|
+
const IconContainer = styled('div', IconAttrs)`
|
134
126
|
display: grid;
|
135
127
|
align-items: center;
|
136
128
|
justify-items: center;
|
137
129
|
width: 32px;
|
138
130
|
height: 32px;
|
139
131
|
background-color: ${(props) =>
|
140
|
-
|
132
|
+
props.isActive ? props.theme.colors.red : 'rgba(255, 255, 255, 0.2)'};
|
141
133
|
border-radius: 6px;
|
142
134
|
|
143
135
|
${({ isButton = false }) =>
|
@@ -150,28 +142,28 @@
|
|
150
142
|
`}
|
151
143
|
`
|
152
144
|
|
153
|
-
|
145
|
+
const SpinnerContainer = styled.div`
|
154
146
|
margin-top: 30px;
|
155
147
|
`
|
156
148
|
|
157
|
-
|
149
|
+
const BottomSection = styled.div`
|
158
150
|
display: flex;
|
159
151
|
justify-content: space-between;
|
160
152
|
align-items: center;
|
161
153
|
`
|
162
154
|
|
163
|
-
|
155
|
+
const RotateIcon = styled(Icon)`
|
164
156
|
transform: rotate(-90deg);
|
165
157
|
`
|
166
158
|
|
167
|
-
|
159
|
+
const AppVersion = styled.p`
|
168
160
|
font-size: 11px;
|
169
161
|
line-height: 13px;
|
170
162
|
color: ${(props) => props.theme.colors.white};
|
171
163
|
margin-right: 6px;
|
172
164
|
`
|
173
165
|
|
174
|
-
|
166
|
+
const SubRouter = styled('div', IconAttrs)`
|
175
167
|
display: grid;
|
176
168
|
grid-template-columns: 1fr;
|
177
169
|
grid-gap: 10px;
|
@@ -194,7 +186,7 @@
|
|
194
186
|
}
|
195
187
|
`
|
196
188
|
|
197
|
-
|
189
|
+
const CollapseContainer = styled.div`
|
198
190
|
display: grid;
|
199
191
|
grid-template-columns: auto 1fr auto;
|
200
192
|
grid-gap: 20px;
|
@@ -207,7 +199,7 @@
|
|
207
199
|
}
|
208
200
|
`
|
209
201
|
|
210
|
-
|
202
|
+
const CollapseWrapper = styled.div`
|
211
203
|
display: grid;
|
212
204
|
grid-template-columns: 1fr;
|
213
205
|
grid-gap: 10px;
|
@@ -215,64 +207,64 @@
|
|
215
207
|
margin-bottom: 2px;
|
216
208
|
`
|
217
209
|
|
218
|
-
|
210
|
+
const ArrowContainer = styled.div`
|
219
211
|
padding-bottom: 5px;
|
220
212
|
`
|
221
213
|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
214
|
+
export default {
|
215
|
+
name: 'SideMenu',
|
216
|
+
components: {
|
217
|
+
PageContainer,
|
218
|
+
ListContainer,
|
219
|
+
ListItem,
|
220
|
+
ListText,
|
221
|
+
Icon,
|
222
|
+
IconContainer,
|
223
|
+
Spinner,
|
224
|
+
SpinnerContainer,
|
225
|
+
BottomSection,
|
226
|
+
RotateIcon,
|
227
|
+
AppVersion,
|
228
|
+
CollapseWrapper,
|
229
|
+
CollapseContainer,
|
230
|
+
SubRouter,
|
231
|
+
ArrowContainer
|
232
|
+
},
|
233
|
+
data() {
|
234
|
+
return {
|
235
|
+
activeDropdown: null
|
236
|
+
}
|
237
|
+
},
|
238
|
+
mounted() {
|
239
|
+
this.activeDropdown = this.activeParentTab
|
240
|
+
},
|
241
|
+
props: {
|
242
|
+
tabsData: {
|
243
|
+
required: true
|
240
244
|
},
|
241
|
-
|
242
|
-
|
243
|
-
required: true
|
244
|
-
},
|
245
|
-
activeTab: {
|
246
|
-
required: true
|
247
|
-
},
|
248
|
-
activeParentTab: {
|
249
|
-
required: false
|
250
|
-
},
|
251
|
-
hasLogout: {
|
252
|
-
required: false,
|
253
|
-
default: true
|
254
|
-
},
|
255
|
-
appVersion: {
|
256
|
-
required: false,
|
257
|
-
type: String
|
258
|
-
}
|
245
|
+
activeTab: {
|
246
|
+
required: true
|
259
247
|
},
|
260
|
-
|
261
|
-
|
262
|
-
activeDropdown: null
|
263
|
-
}
|
248
|
+
activeParentTab: {
|
249
|
+
required: false
|
264
250
|
},
|
265
|
-
|
266
|
-
|
251
|
+
hasLogout: {
|
252
|
+
required: false,
|
253
|
+
default: true
|
267
254
|
},
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
255
|
+
appVersion: {
|
256
|
+
required: false,
|
257
|
+
type: String
|
258
|
+
}
|
259
|
+
},
|
260
|
+
methods: {
|
261
|
+
toggleActiveDropdown(value) {
|
262
|
+
if (this.activeDropdown === value) {
|
263
|
+
this.activeDropdown = null
|
264
|
+
} else {
|
265
|
+
this.activeDropdown = value
|
275
266
|
}
|
276
267
|
}
|
277
268
|
}
|
269
|
+
}
|
278
270
|
</script>
|
@@ -1,24 +1,21 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
</
|
6
|
-
</
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
>
|
11
|
-
<SpinnerWrapper :size="size" />
|
12
|
-
</Container>
|
2
|
+
<spinner-container v-if="fullWidth">
|
3
|
+
<container>
|
4
|
+
<spinner-wrapper :size="size" />
|
5
|
+
</container>
|
6
|
+
</spinner-container>
|
7
|
+
<container v-else :limitedToModal="limitedToModal">
|
8
|
+
<spinner-wrapper :size="size" />
|
9
|
+
</container>
|
13
10
|
</template>
|
14
11
|
|
15
12
|
<script>
|
16
13
|
// import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
|
17
14
|
// <spinner size="30px" />
|
18
|
-
|
19
|
-
|
15
|
+
import styled from 'vue3-styled-components'
|
16
|
+
import SpinnerSvg from '../../assets/icons/black_spinner.svg?component'
|
20
17
|
|
21
|
-
|
18
|
+
const SpinnerContainer = styled.div`
|
22
19
|
position: fixed;
|
23
20
|
top: 0;
|
24
21
|
left: 0;
|
@@ -30,8 +27,8 @@
|
|
30
27
|
justify-items: center;
|
31
28
|
z-index: 100;
|
32
29
|
`
|
33
|
-
|
34
|
-
|
30
|
+
const containerAttrs = { limitedToModal: Boolean }
|
31
|
+
const Container = styled('div', containerAttrs)`
|
35
32
|
display: grid;
|
36
33
|
align-items: center;
|
37
34
|
justify-items: center;
|
@@ -40,32 +37,32 @@
|
|
40
37
|
width: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
|
41
38
|
`
|
42
39
|
|
43
|
-
|
44
|
-
|
40
|
+
const spinnerAttrs = { size: String }
|
41
|
+
const SpinnerWrapper = styled(SpinnerSvg, spinnerAttrs)`
|
45
42
|
width: ${(props) => (props.size ? props.size : '60px')};
|
46
43
|
height: auto;
|
47
44
|
`
|
48
45
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
export default {
|
47
|
+
name: 'spinner',
|
48
|
+
components: {
|
49
|
+
Container,
|
50
|
+
SpinnerWrapper,
|
51
|
+
SpinnerContainer
|
52
|
+
},
|
53
|
+
props: {
|
54
|
+
fullWidth: {
|
55
|
+
required: false,
|
56
|
+
default: false
|
55
57
|
},
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
default: false
|
64
|
-
},
|
65
|
-
size: {
|
66
|
-
required: false,
|
67
|
-
default: null
|
68
|
-
}
|
58
|
+
limitedToModal: {
|
59
|
+
required: false,
|
60
|
+
default: false
|
61
|
+
},
|
62
|
+
size: {
|
63
|
+
required: false,
|
64
|
+
default: null
|
69
65
|
}
|
70
66
|
}
|
67
|
+
}
|
71
68
|
</script>
|