@eturnity/eturnity_reusable_components 8.7.5-EPDM-12618.3 → 8.7.5-EPIC-8593.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/src/App.vue +6 -6
- package/src/Test.vue +12 -76
- package/src/assets/svgIcons/add_icon-1.svg +2 -2
- package/src/assets/svgIcons/add_plus.svg +4 -0
- package/src/assets/svgIcons/arrow_down_unfilled.svg +4 -0
- package/src/assets/svgIcons/arrow_up_unfilled.svg +4 -0
- package/src/assets/svgIcons/battery.svg +2 -2
- package/src/assets/svgIcons/bell_alt.svg +1 -3
- package/src/assets/svgIcons/bexio.svg +3 -3
- package/src/assets/svgIcons/bom.svg +2 -2
- package/src/assets/svgIcons/checkmark_white.svg +4 -0
- package/src/assets/svgIcons/clenergy.svg +4 -0
- package/src/assets/svgIcons/clickable_info.svg +2 -2
- package/src/assets/svgIcons/clickable_info_white.svg +5 -0
- package/src/assets/svgIcons/collections.svg +1 -1
- package/src/assets/svgIcons/customer.svg +3 -0
- package/src/assets/svgIcons/dashboard.svg +1 -1
- package/src/assets/svgIcons/deal_flow.svg +2 -4
- package/src/assets/svgIcons/documents.svg +2 -3
- package/src/assets/svgIcons/efs.svg +5 -0
- package/src/assets/svgIcons/ems-1.svg +2 -2
- package/src/assets/svgIcons/ems.svg +2 -2
- package/src/assets/svgIcons/energy_meter.svg +3 -12
- package/src/assets/svgIcons/erase_white.svg +4 -0
- package/src/assets/svgIcons/financing_for_pv.svg +2 -5
- package/src/assets/svgIcons/free_technology.svg +2 -4
- package/src/assets/svgIcons/heat_pump.svg +5 -0
- package/src/assets/svgIcons/heating_system.svg +3 -0
- package/src/assets/svgIcons/initial_situation.svg +2 -2
- package/src/assets/svgIcons/integrations.svg +2 -2
- package/src/assets/svgIcons/inverter.svg +2 -2
- package/src/assets/svgIcons/k2.svg +4 -0
- package/src/assets/svgIcons/module.svg +2 -2
- package/src/assets/svgIcons/optimizer.svg +2 -5
- package/src/assets/svgIcons/order.svg +3 -0
- package/src/assets/svgIcons/profile.svg +2 -3
- package/src/assets/svgIcons/profitability.svg +2 -2
- package/src/assets/svgIcons/project_analysis.svg +2 -3
- package/src/assets/svgIcons/project_settings.svg +2 -3
- package/src/assets/svgIcons/pv.svg +2 -2
- package/src/assets/svgIcons/question_mark.svg +3 -0
- package/src/assets/svgIcons/question_mark_white.svg +4 -0
- package/src/assets/svgIcons/reorder_string.svg +3 -0
- package/src/assets/svgIcons/run_simulation.svg +2 -2
- package/src/assets/svgIcons/settings.svg +2 -2
- package/src/assets/svgIcons/subscriptions.svg +2 -2
- package/src/assets/svgIcons/subsidies.svg +2 -2
- package/src/assets/svgIcons/switch_polarity.svg +5 -0
- package/src/assets/svgIcons/transparent_warning.svg +4 -0
- package/src/assets/svgIcons/variants.svg +2 -5
- package/src/assets/svgIcons/vdv.svg +5 -0
- package/src/assets/svgIcons/virtual_storage.svg +2 -3
- package/src/assets/svgIcons/warning_triangle.svg +3 -0
- package/src/assets/svgIcons/warning_triangle_white.svg +5 -0
- package/src/assets/theme.js +602 -25
- package/src/components/buttons/buttonIcon/index.vue +131 -28
- package/src/components/buttons/mainButton/MainButton.stories.js +13 -0
- package/src/components/buttons/mainButton/index.vue +105 -31
- package/src/components/filter/filterSettings.vue +4 -3
- package/src/components/icon/index.vue +26 -6
- package/src/components/infoCard/index.vue +12 -8
- package/src/components/infoLabel/index.vue +63 -0
- package/src/components/infoText/index.vue +176 -42
- package/src/components/infoText/infoText.spec.js +1 -1
- package/src/components/inputs/checkbox/index.vue +11 -2
- package/src/components/inputs/inputNumber/index.vue +5 -0
- package/src/components/inputs/inputText/index.vue +9 -1
- package/src/components/modals/modal/index.vue +21 -6
- package/src/components/panelRangeInfo/index.vue +196 -0
- package/src/components/projectMarker/index.vue +2 -1
- package/src/components/selectedOptions/index.vue +3 -12
- package/src/components/selectedOptions/selectedOptions.spec.js +1 -1
- package/src/components/sideMenu/index.vue +92 -48
- package/src/components/spinner/index.vue +66 -33
- package/src/components/tableDropdown/index.vue +44 -39
- package/src/components/tables/mainTable/index.vue +16 -11
- package/src/components/tabsHeader/index.vue +75 -61
- package/src/assets/svgIcons/inverter-1.svg +0 -5
- package/src/assets/svgIcons/subsidies-1.svg +0 -5
- package/src/components/stringDesign/DropdownMenu/index.vue +0 -1009
- /package/src/assets/svgIcons/{close_for_modals,_tool_tips.svg → close.svg} +0 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
<template>
|
2
|
+
<PageContainer :info-type="infoType">
|
3
|
+
<LabelText>{{ getLabelText }}</LabelText>
|
4
|
+
</PageContainer>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script>
|
8
|
+
// import InfoLabel from "@eturnity/eturnity_reusable_components/src/components/infoLabel"
|
9
|
+
import styled from 'vue3-styled-components'
|
10
|
+
|
11
|
+
const PageAttrs = {
|
12
|
+
infoType: 'String',
|
13
|
+
}
|
14
|
+
const PageContainer = styled('div', PageAttrs)`
|
15
|
+
background-color: ${(props) =>
|
16
|
+
props.infoType === 'warning'
|
17
|
+
? props.theme.colors.yellow4
|
18
|
+
: props.infoType === 'error'
|
19
|
+
? props.theme.colors.red4
|
20
|
+
: props.theme.colors.blue4};
|
21
|
+
padding: 4px 8px;
|
22
|
+
border-radius: 8px;
|
23
|
+
font-size: 12px;
|
24
|
+
font-weight: 400;
|
25
|
+
color: ${(props) => props.theme.colors.black};
|
26
|
+
`
|
27
|
+
|
28
|
+
const LabelText = styled.div``
|
29
|
+
|
30
|
+
export default {
|
31
|
+
name: 'InfoLabel',
|
32
|
+
components: {
|
33
|
+
PageContainer,
|
34
|
+
LabelText,
|
35
|
+
},
|
36
|
+
props: {
|
37
|
+
infoType: {
|
38
|
+
type: String,
|
39
|
+
default: 'hint', // hint, warning, error
|
40
|
+
},
|
41
|
+
labelText: {
|
42
|
+
type: String,
|
43
|
+
default: '',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
computed: {
|
47
|
+
getLabelText() {
|
48
|
+
if (this.labelText) {
|
49
|
+
return this.labelText
|
50
|
+
}
|
51
|
+
const infoType = this.infoType.toLowerCase()
|
52
|
+
switch (infoType) {
|
53
|
+
case 'warning':
|
54
|
+
return this.$gettext('Warning')
|
55
|
+
case 'error':
|
56
|
+
return this.$gettext('error')
|
57
|
+
default:
|
58
|
+
return this.$gettext('info')
|
59
|
+
}
|
60
|
+
},
|
61
|
+
},
|
62
|
+
}
|
63
|
+
</script>
|
@@ -1,30 +1,55 @@
|
|
1
1
|
<template>
|
2
|
-
<PageContainer
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
>
|
10
|
-
<
|
11
|
-
|
12
|
-
:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
2
|
+
<PageContainer
|
3
|
+
ref="container"
|
4
|
+
:type="type"
|
5
|
+
@click=";(isMobile || openTrigger === 'onClick') && toggleInfo()"
|
6
|
+
@mouseenter="!isMobile && openTrigger === 'onHover' && showInfo()"
|
7
|
+
@mouseleave="!isMobile && openTrigger === 'onHover' && hideInfo()"
|
8
|
+
>
|
9
|
+
<div ref="icon" data-test-id="infoText_trigger">
|
10
|
+
<IconWrapper
|
11
|
+
:background-color="backgroundColor"
|
12
|
+
:border-radius="borderRadius"
|
13
|
+
:hovered-icon="hoveredIcon"
|
14
|
+
:is-active="isActive"
|
15
|
+
:is-disabled="isDisabled"
|
16
|
+
:padding="padding"
|
17
|
+
>
|
18
|
+
<LabelWrapper
|
19
|
+
v-if="labelText && labelAlign === 'left'"
|
20
|
+
:color="iconColor || computedIconColor"
|
21
|
+
:size="labelSize"
|
22
|
+
>
|
23
|
+
{{ labelText }}
|
24
|
+
</LabelWrapper>
|
25
|
+
<Dot
|
26
|
+
v-if="type === 'dot'"
|
27
|
+
:color="dotColor"
|
28
|
+
data-test-id="infoText_dot"
|
29
|
+
/>
|
30
|
+
<IconComponent
|
31
|
+
v-else-if="!noIcon"
|
32
|
+
:color="iconColor || computedIconColor"
|
33
|
+
:cursor="isDisabled ? 'not-allowed' : 'pointer'"
|
34
|
+
:disabled="isDisabled"
|
35
|
+
:hovered-color="iconColor || computedIconColor"
|
36
|
+
:name="iconName"
|
37
|
+
:size="size"
|
38
|
+
/>
|
39
|
+
<LabelWrapper
|
40
|
+
v-if="labelText && labelAlign === 'right'"
|
41
|
+
:color="iconColor || computedIconColor"
|
42
|
+
:size="labelSize"
|
43
|
+
>
|
44
|
+
{{ labelText }}
|
45
|
+
</LabelWrapper>
|
46
|
+
</IconWrapper>
|
23
47
|
</div>
|
24
48
|
<Teleport v-if="isVisible" to="body">
|
25
49
|
<TextWrapper :style="wrapperStyle">
|
26
50
|
<TextOverlay
|
27
51
|
ref="infoBox"
|
52
|
+
:app-theme="appTheme"
|
28
53
|
:image="image"
|
29
54
|
:style="boxStyle"
|
30
55
|
:width="infoBoxWidth"
|
@@ -36,13 +61,13 @@
|
|
36
61
|
:src="image"
|
37
62
|
@load="onImageLoad"
|
38
63
|
/>
|
39
|
-
<span ref="textContent" :style="textStyle">
|
64
|
+
<span v-if="!hideInfoText" ref="textContent" :style="textStyle">
|
40
65
|
<slot>
|
41
66
|
<span v-html="text"></span>
|
42
67
|
</slot>
|
43
68
|
</span>
|
44
69
|
</TextOverlay>
|
45
|
-
<Arrow :image="image" :style="arrowStyle" />
|
70
|
+
<!-- <Arrow :image="image" :style="arrowStyle" /> -->
|
46
71
|
</TextWrapper>
|
47
72
|
</Teleport>
|
48
73
|
</PageContainer>
|
@@ -63,11 +88,14 @@
|
|
63
88
|
import styled from 'vue3-styled-components'
|
64
89
|
import theme from '../../assets/theme.js'
|
65
90
|
|
66
|
-
const
|
67
|
-
|
68
|
-
|
91
|
+
const TextOverlayAttrs = {
|
92
|
+
appTheme: String,
|
93
|
+
image: Boolean,
|
94
|
+
width: Number,
|
95
|
+
}
|
96
|
+
const TextOverlay = styled('div', TextOverlayAttrs)`
|
69
97
|
color: ${(props) =>
|
70
|
-
props.image ? props.theme.colors.grey1 : props.theme.colors.
|
98
|
+
props.image ? props.theme.colors.grey1 : props.theme.colors.black};
|
71
99
|
font-size: ${(props) => (props.image ? '12px' : '13px')};
|
72
100
|
border-radius: 4px;
|
73
101
|
padding: 10px;
|
@@ -88,16 +116,20 @@
|
|
88
116
|
}
|
89
117
|
`
|
90
118
|
|
91
|
-
const Arrow = styled('div')`
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
119
|
+
// const Arrow = styled('div')`
|
120
|
+
// position: absolute;
|
121
|
+
// width: 0;
|
122
|
+
// height: 0;
|
123
|
+
// border: 8px solid transparent;
|
124
|
+
// border-top-color: ${(props) =>
|
125
|
+
// props.image
|
126
|
+
// ? props.theme.colors.white
|
127
|
+
// : props.appTheme === 'dark'
|
128
|
+
// ? props.theme.colors.grey5
|
129
|
+
// : props.theme.colors.black};
|
130
|
+
// filter: ${(props) =>
|
131
|
+
// props.image ? 'drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1))' : 'none'};
|
132
|
+
// `
|
101
133
|
|
102
134
|
const PageContainer = styled('div')`
|
103
135
|
display: ${(props) => (props.type === 'dot' ? 'unset' : 'inline-block')};
|
@@ -121,16 +153,57 @@
|
|
121
153
|
border-radius: 50%;
|
122
154
|
`
|
123
155
|
|
156
|
+
const IconWrapperAttrs = {
|
157
|
+
backgroundColor: String,
|
158
|
+
borderRadius: String,
|
159
|
+
padding: String,
|
160
|
+
hoveredIcon: Boolean,
|
161
|
+
isActive: Boolean,
|
162
|
+
isDisabled: Boolean,
|
163
|
+
}
|
164
|
+
const IconWrapper = styled('div', IconWrapperAttrs)`
|
165
|
+
display: flex;
|
166
|
+
align-items: center;
|
167
|
+
justify-content: center;
|
168
|
+
gap: 6px;
|
169
|
+
white-space: nowrap;
|
170
|
+
background-color: ${(props) => props.backgroundColor};
|
171
|
+
border-radius: ${(props) =>
|
172
|
+
props.hoveredIcon ? '6px' : props.borderRadius};
|
173
|
+
padding: ${(props) => props.padding};
|
174
|
+
width: ${(props) => (props.hoveredIcon ? '32px' : '')};
|
175
|
+
height: ${(props) => (props.hoveredIcon ? '32px' : '')};
|
176
|
+
cursor: pointer;
|
177
|
+
background-color: ${(props) =>
|
178
|
+
props.isActive ? props.theme.colors.transparentWhite2 : ''};
|
179
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
180
|
+
&:hover {
|
181
|
+
background-color: ${(props) =>
|
182
|
+
props.hoveredIcon ? props.theme.colors.transparentWhite2 : ''};
|
183
|
+
}
|
184
|
+
`
|
185
|
+
|
186
|
+
const LabelWrapperAttrs = {
|
187
|
+
size: String,
|
188
|
+
color: String,
|
189
|
+
}
|
190
|
+
const LabelWrapper = styled('div', LabelWrapperAttrs)`
|
191
|
+
font-size: ${(props) => props.size};
|
192
|
+
color: ${(props) => props.color};
|
193
|
+
`
|
194
|
+
|
124
195
|
export default {
|
125
196
|
name: 'InfoText',
|
126
197
|
components: {
|
127
198
|
IconComponent,
|
128
199
|
TextOverlay,
|
129
|
-
Arrow,
|
200
|
+
// Arrow,
|
130
201
|
Dot,
|
131
202
|
PageContainer,
|
132
203
|
TextWrapper,
|
133
204
|
OverlayImage,
|
205
|
+
IconWrapper,
|
206
|
+
LabelWrapper,
|
134
207
|
},
|
135
208
|
props: {
|
136
209
|
text: {
|
@@ -138,6 +211,16 @@
|
|
138
211
|
default: '',
|
139
212
|
type: String,
|
140
213
|
},
|
214
|
+
isActive: {
|
215
|
+
required: false,
|
216
|
+
default: false,
|
217
|
+
type: Boolean,
|
218
|
+
},
|
219
|
+
labelText: {
|
220
|
+
required: false,
|
221
|
+
default: '',
|
222
|
+
type: String,
|
223
|
+
},
|
141
224
|
size: {
|
142
225
|
type: String,
|
143
226
|
default: '14px',
|
@@ -182,13 +265,58 @@
|
|
182
265
|
dotColor: {
|
183
266
|
type: String,
|
184
267
|
required: false,
|
185
|
-
default: theme.
|
268
|
+
default: theme.semanticColors.blue[400],
|
186
269
|
},
|
187
270
|
type: {
|
188
271
|
type: String,
|
189
272
|
required: false,
|
190
273
|
default: 'info', // info, dot
|
191
274
|
},
|
275
|
+
appTheme: {
|
276
|
+
type: String,
|
277
|
+
default: 'light', // light or dark
|
278
|
+
required: false,
|
279
|
+
},
|
280
|
+
labelAlign: {
|
281
|
+
type: String,
|
282
|
+
default: 'right',
|
283
|
+
required: false,
|
284
|
+
},
|
285
|
+
backgroundColor: {
|
286
|
+
type: String,
|
287
|
+
default: '',
|
288
|
+
required: false,
|
289
|
+
},
|
290
|
+
borderRadius: {
|
291
|
+
type: String,
|
292
|
+
default: '',
|
293
|
+
required: false,
|
294
|
+
},
|
295
|
+
padding: {
|
296
|
+
type: String,
|
297
|
+
default: '',
|
298
|
+
required: false,
|
299
|
+
},
|
300
|
+
labelSize: {
|
301
|
+
type: String,
|
302
|
+
default: '12px',
|
303
|
+
required: false,
|
304
|
+
},
|
305
|
+
noIcon: {
|
306
|
+
type: Boolean,
|
307
|
+
default: false,
|
308
|
+
required: false,
|
309
|
+
},
|
310
|
+
hoveredIcon: {
|
311
|
+
type: Boolean,
|
312
|
+
default: false,
|
313
|
+
required: false,
|
314
|
+
},
|
315
|
+
hideInfoText: {
|
316
|
+
type: Boolean,
|
317
|
+
default: false,
|
318
|
+
required: false,
|
319
|
+
},
|
192
320
|
},
|
193
321
|
setup(props) {
|
194
322
|
const isVisible = ref(false)
|
@@ -206,7 +334,11 @@
|
|
206
334
|
|
207
335
|
const textStyle = computed(() => ({
|
208
336
|
fontSize: props.image ? '12px' : '13px',
|
209
|
-
color: props.image
|
337
|
+
color: props.image
|
338
|
+
? theme.colors.grey1
|
339
|
+
: props.appTheme === 'dark'
|
340
|
+
? theme.colors.black
|
341
|
+
: theme.colors.white,
|
210
342
|
textAlign: props.image ? 'right' : 'left',
|
211
343
|
}))
|
212
344
|
|
@@ -336,7 +468,9 @@
|
|
336
468
|
overflowY: 'auto',
|
337
469
|
backgroundColor: props.image
|
338
470
|
? theme.colors.white
|
339
|
-
:
|
471
|
+
: props.appTheme === 'light'
|
472
|
+
? theme.colors.black
|
473
|
+
: theme.colors.grey5,
|
340
474
|
}
|
341
475
|
}
|
342
476
|
|
@@ -408,7 +542,7 @@
|
|
408
542
|
|
409
543
|
// Calculate new width
|
410
544
|
const calculatedWidth = Math.min(
|
411
|
-
Math.max(contentWidth,
|
545
|
+
Math.max(contentWidth, 230),
|
412
546
|
parseInt(props.maxWidth, 10)
|
413
547
|
)
|
414
548
|
|
@@ -5,7 +5,7 @@ import theme from '@/assets/theme'
|
|
5
5
|
|
6
6
|
jest.mock('@/components/icon/iconCache.mjs', () => ({
|
7
7
|
// need to mock this due to how jest handles import.meta
|
8
|
-
fetchIcon: jest.fn(() => Promise.resolve('
|
8
|
+
fetchIcon: jest.fn(() => Promise.resolve('close.svg')),
|
9
9
|
}))
|
10
10
|
|
11
11
|
describe('InfoText Component', () => {
|
@@ -5,6 +5,7 @@
|
|
5
5
|
:check-color="checkColor"
|
6
6
|
:cursor-type="cursorType"
|
7
7
|
:data-test-id="dataId"
|
8
|
+
:font-color="fontColor"
|
8
9
|
:has-label="hasLabel"
|
9
10
|
:is-checked="isChecked"
|
10
11
|
:is-disabled="isDisabled"
|
@@ -63,6 +64,7 @@
|
|
63
64
|
isChecked: Boolean,
|
64
65
|
isDisabled: Boolean,
|
65
66
|
cursorType: String,
|
67
|
+
fontColor: String,
|
66
68
|
}
|
67
69
|
const Container = styled('label', containerAttrs)`
|
68
70
|
display: grid;
|
@@ -70,7 +72,10 @@
|
|
70
72
|
props.hasLabel ? '16px auto' : '16px'};
|
71
73
|
grid-gap: 16px;
|
72
74
|
align-content: center;
|
73
|
-
color: ${(props) =>
|
75
|
+
color: ${(props) =>
|
76
|
+
props.theme.colors[props.fontColor]
|
77
|
+
? props.theme.colors[props.fontColor]
|
78
|
+
: props.fontColor};
|
74
79
|
position: relative;
|
75
80
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
|
76
81
|
font-size: 16px;
|
@@ -176,7 +181,7 @@
|
|
176
181
|
align-items: center;
|
177
182
|
min-height: 18px;
|
178
183
|
color: ${(props) =>
|
179
|
-
props.isDisabled ? props.theme.colors.grey2 :
|
184
|
+
props.isDisabled ? props.theme.colors.grey2 : 'unset'};
|
180
185
|
`
|
181
186
|
|
182
187
|
export default {
|
@@ -193,6 +198,10 @@
|
|
193
198
|
required: false,
|
194
199
|
default: '',
|
195
200
|
},
|
201
|
+
fontColor: {
|
202
|
+
required: false,
|
203
|
+
default: 'black',
|
204
|
+
},
|
196
205
|
isChecked: {
|
197
206
|
required: true,
|
198
207
|
default: false,
|
@@ -25,6 +25,7 @@
|
|
25
25
|
<InfoText
|
26
26
|
v-if="labelInfoText"
|
27
27
|
:align-arrow="labelInfoAlign"
|
28
|
+
:app-theme="appTheme"
|
28
29
|
:text="labelInfoText"
|
29
30
|
/>
|
30
31
|
</LabelWrapper>
|
@@ -474,6 +475,10 @@
|
|
474
475
|
},
|
475
476
|
inheritAttrs: false,
|
476
477
|
props: {
|
478
|
+
appTheme: {
|
479
|
+
type: String,
|
480
|
+
required: false,
|
481
|
+
},
|
477
482
|
placeholder: {
|
478
483
|
type: String,
|
479
484
|
required: false,
|
@@ -21,6 +21,7 @@
|
|
21
21
|
<InfoText
|
22
22
|
v-if="infoTextMessage != ''"
|
23
23
|
:align-arrow="infoTextAlign"
|
24
|
+
:app-theme="appTheme"
|
24
25
|
data-test-id="info_text_message"
|
25
26
|
:size="fontSize ? fontSize : '16px'"
|
26
27
|
:text="infoTextMessage"
|
@@ -168,7 +169,9 @@
|
|
168
169
|
position: relative;
|
169
170
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
170
171
|
color: ${(props) =>
|
171
|
-
props.
|
172
|
+
props.isError
|
173
|
+
? props.theme.colors.grey6
|
174
|
+
: props.isDisabled
|
172
175
|
? props.theme.colors.grey2
|
173
176
|
: props.fontColor
|
174
177
|
? props.fontColor + ' !important'
|
@@ -261,6 +264,11 @@
|
|
261
264
|
default: '',
|
262
265
|
type: String,
|
263
266
|
},
|
267
|
+
appTheme: {
|
268
|
+
type: String,
|
269
|
+
required: false,
|
270
|
+
default: 'light',
|
271
|
+
},
|
264
272
|
alignItems: {
|
265
273
|
required: false,
|
266
274
|
default: 'horizontal',
|
@@ -1,20 +1,26 @@
|
|
1
1
|
<template>
|
2
2
|
<PageWrapper
|
3
3
|
v-if="isOpen"
|
4
|
+
:add-padding-top="addPaddingTop"
|
4
5
|
:backdrop="backdrop"
|
5
6
|
:is-open="isOpen"
|
6
7
|
:position="position"
|
7
8
|
>
|
8
9
|
<ModalContainer
|
9
10
|
v-if="isOpen"
|
11
|
+
:is-loading="isLoading"
|
10
12
|
:overflow="overflowRule"
|
11
13
|
@click="onClickModalContainer"
|
12
14
|
>
|
13
15
|
<Spinner v-if="isLoading" :limited-to-modal="true" size="50px" />
|
14
|
-
<ContentContainer
|
16
|
+
<ContentContainer v-if="!isLoading">
|
15
17
|
<slot></slot>
|
16
18
|
</ContentContainer>
|
17
|
-
<CloseButton
|
19
|
+
<CloseButton
|
20
|
+
v-if="!hideClose && !isLoading"
|
21
|
+
class="close"
|
22
|
+
@click="onCloseModal()"
|
23
|
+
/>
|
18
24
|
</ModalContainer>
|
19
25
|
</PageWrapper>
|
20
26
|
</template>
|
@@ -36,7 +42,11 @@
|
|
36
42
|
|
37
43
|
const ContentContainer = styled.div``
|
38
44
|
|
39
|
-
const pageAttrs = {
|
45
|
+
const pageAttrs = {
|
46
|
+
backdrop: String,
|
47
|
+
position: String,
|
48
|
+
addPaddingTop: Boolean,
|
49
|
+
}
|
40
50
|
const PageWrapper = styled('div', pageAttrs)`
|
41
51
|
position: ${(props) => props.position}
|
42
52
|
display: grid;
|
@@ -50,13 +60,14 @@
|
|
50
60
|
: 'rgba(255, 255, 255, 0.9)'};
|
51
61
|
z-index: 99999;
|
52
62
|
overflow: auto;
|
63
|
+
padding-top: ${(props) => (props.addPaddingTop ? '80px' : '0')};
|
53
64
|
|
54
65
|
@media (max-width: 425px) {
|
55
66
|
background: white;
|
56
67
|
}
|
57
68
|
`
|
58
69
|
|
59
|
-
const modalContainerAttrs = { overflow: String }
|
70
|
+
const modalContainerAttrs = { overflow: String, isLoading: Boolean }
|
60
71
|
const ModalContainer = styled('div', modalContainerAttrs)`
|
61
72
|
align-self: center;
|
62
73
|
justify-self: center;
|
@@ -68,8 +79,8 @@
|
|
68
79
|
overflow: ${(props) => props.overflow};
|
69
80
|
max-width: 95%;
|
70
81
|
max-height: 95%;
|
71
|
-
min-width: 100px;
|
72
|
-
min-height: 100px;
|
82
|
+
min-width: ${(props) => (props.isLoading ? '400px' : '100px')};
|
83
|
+
min-height: ${(props) => (props.isLoading ? '500px' : '100px')};
|
73
84
|
|
74
85
|
::-webkit-scrollbar {
|
75
86
|
width: 0.3em;
|
@@ -147,6 +158,10 @@
|
|
147
158
|
type: String,
|
148
159
|
default: 'auto',
|
149
160
|
},
|
161
|
+
addPaddingTop: {
|
162
|
+
type: Boolean,
|
163
|
+
default: false,
|
164
|
+
},
|
150
165
|
},
|
151
166
|
watch: {
|
152
167
|
isOpen: {
|