@eturnity/eturnity_reusable_components 7.51.3 → 7.51.4
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 +2 -3
- package/src/assets/gifs/spinner.gif +0 -0
- package/src/assets/svgIcons/checkmark.svg +3 -0
- package/src/assets/svgIcons/collapse_all.svg +4 -0
- package/src/assets/svgIcons/expand_all.svg +4 -0
- package/src/assets/svgIcons/export_document.svg +3 -0
- package/src/assets/svgIcons/hybrid.svg +4 -0
- package/src/assets/svgIcons/module.svg +3 -0
- package/src/assets/svgIcons/move_down.svg +3 -0
- package/src/assets/svgIcons/move_up.svg +3 -0
- package/src/assets/svgIcons/optimizer.svg +6 -0
- package/src/assets/svgIcons/string_design.svg +5 -0
- package/src/assets/svgIcons/string_directions.svg +10 -0
- package/src/components/banner/notificationBanner/index.vue +131 -0
- package/src/components/buttons/buttonIcon/index.vue +4 -2
- package/src/components/buttons/mainButton/index.vue +16 -2
- package/src/components/icon/index.vue +1 -0
- package/src/components/infoText/index.vue +38 -11
- package/src/components/inputs/checkbox/index.vue +19 -8
- package/src/components/inputs/inputNumber/index.vue +203 -13
- package/src/components/inputs/inputText/index.vue +23 -2
- package/src/components/inputs/radioButton/index.vue +27 -6
- package/src/components/inputs/select/index.vue +69 -25
- package/src/components/inputs/select/option/index.vue +11 -2
- package/src/components/markerItem/index.vue +8 -1
- package/src/components/spinner/index.vue +11 -0
- package/src/components/spinnerGif/index.vue +98 -0
- package/src/components/stringDesign/DropdownMenu/index.vue +981 -0
@@ -17,7 +17,9 @@
|
|
17
17
|
>
|
18
18
|
<InputLabel
|
19
19
|
:font-color="
|
20
|
-
labelFontColor || colorMode == 'dark'
|
20
|
+
labelFontColor || colorMode == 'dark' || colorMode == 'transparent'
|
21
|
+
? 'white'
|
22
|
+
: 'eturnityGrey'
|
21
23
|
"
|
22
24
|
:font-size="fontSize"
|
23
25
|
>{{ label }}
|
@@ -40,18 +42,26 @@
|
|
40
42
|
<SelectButton
|
41
43
|
ref="select"
|
42
44
|
:bg-color="
|
43
|
-
buttonBgColor || colorMode == 'dark'
|
45
|
+
buttonBgColor || colorMode == 'dark'
|
46
|
+
? 'transparentBlack1'
|
47
|
+
: colorMode == 'transparent'
|
48
|
+
? 'transparent'
|
49
|
+
: 'white'
|
44
50
|
"
|
45
51
|
class="select-button"
|
52
|
+
:color-mode="colorMode"
|
46
53
|
:data-id="dataId"
|
47
54
|
:disabled="disabled"
|
48
55
|
:font-color="
|
49
|
-
buttonFontColor || colorMode == 'dark'
|
56
|
+
buttonFontColor || colorMode == 'dark' || colorMode == 'transparent'
|
57
|
+
? 'white'
|
58
|
+
: 'black'
|
50
59
|
"
|
51
60
|
:font-size="fontSize"
|
52
61
|
:has-error="hasError"
|
53
62
|
:has-no-padding="isSearchBarVisible || !hasSelectButtonPadding"
|
54
63
|
:height="height"
|
64
|
+
:is-search-bar-visible="isSearchBarVisible"
|
55
65
|
:no-relative="noRelative"
|
56
66
|
:padding-left="paddingLeft"
|
57
67
|
:select-height="selectHeight"
|
@@ -72,7 +82,11 @@
|
|
72
82
|
ref="searchInput"
|
73
83
|
background-color="transparent"
|
74
84
|
:font-color="
|
75
|
-
buttonFontColor ||
|
85
|
+
buttonFontColor ||
|
86
|
+
colorMode == 'dark' ||
|
87
|
+
colorMode == 'transparent'
|
88
|
+
? 'white'
|
89
|
+
: 'black'
|
76
90
|
"
|
77
91
|
:font-size="fontSize"
|
78
92
|
input-height="34px"
|
@@ -93,30 +107,30 @@
|
|
93
107
|
>
|
94
108
|
<slot name="selector" :selected-value="selectedValue"></slot>
|
95
109
|
</Selector>
|
96
|
-
<Caret
|
110
|
+
<Caret
|
111
|
+
class="caret_dropdown"
|
112
|
+
:color-mode="colorMode"
|
113
|
+
@click.stop="toggleCaretDropdown"
|
114
|
+
>
|
97
115
|
<Icon
|
98
116
|
v-if="isDropdownOpen"
|
99
117
|
:color="
|
100
|
-
caretColor ||
|
101
|
-
? 'grey2'
|
102
|
-
: colorMode == 'dark'
|
118
|
+
caretColor || colorMode == 'dark' || colorMode == 'transparent'
|
103
119
|
? 'white'
|
104
120
|
: 'transparentBlack1'
|
105
121
|
"
|
106
122
|
name="arrow_up"
|
107
|
-
size="12px"
|
123
|
+
:size="colorMode === 'transparent' ? '8px' : '12px'"
|
108
124
|
/>
|
109
125
|
<Icon
|
110
126
|
v-else
|
111
127
|
:color="
|
112
|
-
caretColor ||
|
113
|
-
? 'grey2'
|
114
|
-
: colorMode == 'dark'
|
128
|
+
caretColor || colorMode == 'dark' || colorMode == 'transparent'
|
115
129
|
? 'white'
|
116
130
|
: 'transparentBlack1'
|
117
131
|
"
|
118
132
|
name="arrow_down"
|
119
|
-
size="12px"
|
133
|
+
:size="colorMode === 'transparent' ? '8px' : '12px'"
|
120
134
|
/>
|
121
135
|
</Caret>
|
122
136
|
</SelectButton>
|
@@ -126,15 +140,27 @@
|
|
126
140
|
v-show="isSelectDropdownShown"
|
127
141
|
ref="dropdown"
|
128
142
|
:bg-color="
|
129
|
-
dropdownBgColor ||
|
143
|
+
dropdownBgColor ||
|
144
|
+
colorMode == 'dark' ||
|
145
|
+
colorMode == 'transparent'
|
146
|
+
? 'black'
|
147
|
+
: 'white'
|
130
148
|
"
|
131
149
|
:dropdown-position="dropdownPosition"
|
132
150
|
:font-color="
|
133
|
-
dropdownFontColor ||
|
151
|
+
dropdownFontColor ||
|
152
|
+
colorMode == 'dark' ||
|
153
|
+
colorMode == 'transparent'
|
154
|
+
? 'white'
|
155
|
+
: 'black'
|
134
156
|
"
|
135
157
|
:font-size="fontSize"
|
136
158
|
:hovered-bg-color="
|
137
|
-
colorMode == 'dark'
|
159
|
+
colorMode == 'dark'
|
160
|
+
? '#000000'
|
161
|
+
: colorMode == 'transparent'
|
162
|
+
? 'grey6'
|
163
|
+
: dropdownBgColor
|
138
164
|
"
|
139
165
|
:hovered-index="hoveredIndex"
|
140
166
|
:hovered-value="hoveredValue"
|
@@ -191,12 +217,15 @@
|
|
191
217
|
const CARET_WIDTH = '30px'
|
192
218
|
const BORDER_WIDTH = '1px'
|
193
219
|
|
194
|
-
const
|
220
|
+
const CaretAttrs = { colorMode: String }
|
221
|
+
const Caret = styled('div', CaretAttrs)`
|
195
222
|
display: flex;
|
196
223
|
align-items: center;
|
197
224
|
justify-content: center;
|
198
|
-
width: ${
|
199
|
-
|
225
|
+
width: ${(props) =>
|
226
|
+
props.colorMode === 'transparent' ? '15px' : CARET_WIDTH};
|
227
|
+
min-width: ${(props) =>
|
228
|
+
props.colorMode === 'transparent' ? '15px' : CARET_WIDTH};
|
200
229
|
height: 100%;
|
201
230
|
align-items: center;
|
202
231
|
cursor: pointer;
|
@@ -237,6 +266,7 @@
|
|
237
266
|
`
|
238
267
|
const OptionalLabel = styled.span`
|
239
268
|
font-weight: 300;
|
269
|
+
text-transform: lowercase;
|
240
270
|
`
|
241
271
|
const inputProps = {
|
242
272
|
selectWidth: String,
|
@@ -281,6 +311,8 @@
|
|
281
311
|
noRelative: Boolean,
|
282
312
|
tablePaddingLeft: String,
|
283
313
|
showDisabledBackground: Boolean,
|
314
|
+
colorMode: String,
|
315
|
+
isSearchBarVisible: Boolean,
|
284
316
|
}
|
285
317
|
const SelectButton = styled('div', selectButtonAttrs)`
|
286
318
|
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
@@ -288,7 +320,11 @@
|
|
288
320
|
border-radius: 4px;
|
289
321
|
max-width: ${(props) => (props.selectWidth ? props.selectWidth : '100%')};
|
290
322
|
${(props) =>
|
291
|
-
props.
|
323
|
+
props.colorMode === 'transparent'
|
324
|
+
? props.isSearchBarVisible
|
325
|
+
? 'padding: 10px 15px 10px 5px;'
|
326
|
+
: 'padding: 10px 15px;'
|
327
|
+
: props.isSearchBarVisible
|
292
328
|
? ''
|
293
329
|
: `padding-left: ${
|
294
330
|
props.hasNoPadding
|
@@ -316,14 +352,22 @@
|
|
316
352
|
hasError ? theme.colors.red : theme.colors.grey4
|
317
353
|
}
|
318
354
|
`}
|
319
|
-
|
320
|
-
props.
|
321
|
-
|
355
|
+
opacity: ${(props) =>
|
356
|
+
props.colorMode === 'transparent' && props.disabled ? '0.4' : '1'};
|
357
|
+
background-color: ${(props) =>
|
358
|
+
props.colorMode === 'transparent'
|
359
|
+
? 'transparent'
|
360
|
+
: props.disabled && props.showDisabledBackground
|
361
|
+
? props.theme.colors.disabled
|
322
362
|
: props.theme.colors[props.bgColor]
|
323
363
|
? props.theme.colors[props.bgColor]
|
324
364
|
: props.bgColor};
|
325
365
|
color: ${(props) =>
|
326
|
-
props.
|
366
|
+
props.colorMode === 'transparent'
|
367
|
+
? props.theme.colors.white
|
368
|
+
: props.disabled && props.showDisabledBackground
|
369
|
+
? props.theme.colors.black
|
370
|
+
: props.theme.colors[props.fontColor]
|
327
371
|
? props.theme.colors[props.fontColor]
|
328
372
|
: props.fontColor};
|
329
373
|
${(props) => (props.disabled ? 'pointer-events: none' : '')};
|
@@ -621,7 +665,7 @@
|
|
621
665
|
if (this.isDropdownOpen) {
|
622
666
|
return this.$refs.dropdown.$el.childElementCount > 1
|
623
667
|
? this.$refs.dropdown.$el.childElementCount
|
624
|
-
:
|
668
|
+
: this.$refs.dropdown.$el.children[0]
|
625
669
|
? this.$refs.dropdown.$el.children[0].childElementCount
|
626
670
|
: 0
|
627
671
|
}
|
@@ -1,6 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<OptionContainer
|
3
|
-
:background-color="
|
3
|
+
:background-color="
|
4
|
+
colorMode == 'dark'
|
5
|
+
? '#000000'
|
6
|
+
: colorMode == 'transparent'
|
7
|
+
? 'black'
|
8
|
+
: backgroundColor
|
9
|
+
"
|
4
10
|
:cursor-type="cursorType"
|
5
11
|
:data-value="value"
|
6
12
|
:disabled-bg-color="disabledBgColor"
|
@@ -8,6 +14,8 @@
|
|
8
14
|
:hovered-bg-color="
|
9
15
|
colorMode == 'dark'
|
10
16
|
? '#000000'
|
17
|
+
: colorMode == 'transparent'
|
18
|
+
? 'grey6'
|
11
19
|
: hoveredBgColor
|
12
20
|
? hoveredBgColor
|
13
21
|
: 'grey5'
|
@@ -130,7 +138,8 @@
|
|
130
138
|
default: '12px 10px',
|
131
139
|
},
|
132
140
|
textColor: {
|
133
|
-
type:
|
141
|
+
type: String,
|
142
|
+
required: false,
|
134
143
|
default: 'inherit',
|
135
144
|
},
|
136
145
|
},
|
@@ -12,7 +12,7 @@
|
|
12
12
|
:name="iconName"
|
13
13
|
size="10px"
|
14
14
|
/>
|
15
|
-
<span>{{ label }}</span>
|
15
|
+
<span :title="label">{{ label }}</span>
|
16
16
|
</MarkerContainer>
|
17
17
|
</PageContainer>
|
18
18
|
</template>
|
@@ -60,6 +60,13 @@
|
|
60
60
|
border-radius: 4px;
|
61
61
|
white-space: nowrap;
|
62
62
|
cursor: ${(props) => (props.isEditionAllowed ? 'pointer' : props.cursor)};
|
63
|
+
overflow: hidden;
|
64
|
+
text-overflow: ellipsis;
|
65
|
+
|
66
|
+
span {
|
67
|
+
overflow: hidden;
|
68
|
+
text-overflow: ellipsis;
|
69
|
+
}
|
63
70
|
`
|
64
71
|
|
65
72
|
export default {
|
@@ -3,6 +3,7 @@
|
|
3
3
|
<Container>
|
4
4
|
<SpinnerWrapper data-test-id="spinner_full_wrapper">
|
5
5
|
<SpinnerSvg
|
6
|
+
:class="{ white: isWhite }"
|
6
7
|
data-test-id="spinner_full_icon"
|
7
8
|
:style="{ width: size, height: size }"
|
8
9
|
/>
|
@@ -16,6 +17,7 @@
|
|
16
17
|
>
|
17
18
|
<SpinnerWrapper data-test-id="spinner_wrapper">
|
18
19
|
<SpinnerSvg
|
20
|
+
:class="{ white: isWhite }"
|
19
21
|
data-test-id="spinner_icon"
|
20
22
|
:style="{ width: size, height: size }"
|
21
23
|
/>
|
@@ -54,6 +56,10 @@
|
|
54
56
|
const SpinnerWrapper = styled.div`
|
55
57
|
width: ${(props) => (props.size ? props.size : '60px')};
|
56
58
|
height: auto;
|
59
|
+
|
60
|
+
.white {
|
61
|
+
filter: brightness(0) invert(1);
|
62
|
+
}
|
57
63
|
`
|
58
64
|
|
59
65
|
export default {
|
@@ -80,6 +86,11 @@
|
|
80
86
|
default: '60px',
|
81
87
|
type: String,
|
82
88
|
},
|
89
|
+
isWhite: {
|
90
|
+
required: false,
|
91
|
+
default: false,
|
92
|
+
type: Boolean,
|
93
|
+
},
|
83
94
|
},
|
84
95
|
}
|
85
96
|
</script>
|
@@ -0,0 +1,98 @@
|
|
1
|
+
<template>
|
2
|
+
<SpinnerContainer v-if="fullWidth" data-test-id="spinner_full_container">
|
3
|
+
<Container>
|
4
|
+
<SpinnerWrapper data-test-id="spinner_full_wrapper">
|
5
|
+
<img
|
6
|
+
:class="{ white: isWhite }"
|
7
|
+
data-test-id="spinner_full_icon"
|
8
|
+
src="../../assets/gifs/spinner.gif"
|
9
|
+
:style="{ width: size, height: size }"
|
10
|
+
/>
|
11
|
+
</SpinnerWrapper>
|
12
|
+
</Container>
|
13
|
+
</SpinnerContainer>
|
14
|
+
<Container
|
15
|
+
v-else
|
16
|
+
data-test-id="spinner_container"
|
17
|
+
:limited-to-modal="limitedToModal"
|
18
|
+
>
|
19
|
+
<SpinnerWrapper data-test-id="spinner_wrapper">
|
20
|
+
<img
|
21
|
+
:class="{ white: isWhite }"
|
22
|
+
data-test-id="spinner_full_icon"
|
23
|
+
src="../../assets/gifs/spinner.gif"
|
24
|
+
:style="{ width: size, height: size }"
|
25
|
+
/>
|
26
|
+
</SpinnerWrapper>
|
27
|
+
</Container>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
<script>
|
31
|
+
// import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
|
32
|
+
// <spinner size="30px" />
|
33
|
+
import styled from 'vue3-styled-components'
|
34
|
+
import SpinnerSvg from '../../assets/icons/black_spinner.svg'
|
35
|
+
|
36
|
+
const SpinnerContainer = styled.div`
|
37
|
+
position: fixed;
|
38
|
+
top: 0;
|
39
|
+
left: 0;
|
40
|
+
width: 100%;
|
41
|
+
height: 100%;
|
42
|
+
background: rgba(255, 255, 255, 0.8);
|
43
|
+
display: grid;
|
44
|
+
align-items: center;
|
45
|
+
justify-items: center;
|
46
|
+
z-index: 100;
|
47
|
+
`
|
48
|
+
const containerAttrs = { limitedToModal: Boolean }
|
49
|
+
const Container = styled('div', containerAttrs)`
|
50
|
+
display: grid;
|
51
|
+
align-items: center;
|
52
|
+
justify-items: center;
|
53
|
+
position: ${(props) => (props.limitedToModal ? 'absolute' : 'inherit')};
|
54
|
+
height: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
|
55
|
+
width: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
|
56
|
+
`
|
57
|
+
|
58
|
+
const SpinnerWrapper = styled.div`
|
59
|
+
width: ${(props) => (props.size ? props.size : '60px')};
|
60
|
+
height: auto;
|
61
|
+
|
62
|
+
.white {
|
63
|
+
filter: brightness(0) invert(1);
|
64
|
+
}
|
65
|
+
`
|
66
|
+
|
67
|
+
export default {
|
68
|
+
name: 'SpinnerComponent',
|
69
|
+
components: {
|
70
|
+
Container,
|
71
|
+
SpinnerWrapper,
|
72
|
+
SpinnerContainer,
|
73
|
+
SpinnerSvg,
|
74
|
+
},
|
75
|
+
props: {
|
76
|
+
fullWidth: {
|
77
|
+
required: false,
|
78
|
+
default: false,
|
79
|
+
type: Boolean,
|
80
|
+
},
|
81
|
+
limitedToModal: {
|
82
|
+
required: false,
|
83
|
+
default: false,
|
84
|
+
type: Boolean,
|
85
|
+
},
|
86
|
+
size: {
|
87
|
+
required: false,
|
88
|
+
default: '60px',
|
89
|
+
type: String,
|
90
|
+
},
|
91
|
+
isWhite: {
|
92
|
+
required: false,
|
93
|
+
default: false,
|
94
|
+
type: Boolean,
|
95
|
+
},
|
96
|
+
},
|
97
|
+
}
|
98
|
+
</script>
|