@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,61 +1,46 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
:key="item.value"
|
6
|
-
>
|
7
|
-
<LabelContainer
|
8
|
-
:checkmark-color="checkmarkColor"
|
9
|
-
:has-label="item.label"
|
10
|
-
:is-checked="selectedOption === item.value"
|
11
|
-
:is-disabled="item.disabled"
|
2
|
+
<component-wrapper :layout="layout">
|
3
|
+
<radio-wrapper v-for="(item, index) in options" :key="item.value">
|
4
|
+
<label-container
|
12
5
|
:size="size"
|
6
|
+
:hasLabel="item.label"
|
7
|
+
:isDisabled="item.disabled"
|
8
|
+
:isChecked="selectedOption === item.value"
|
9
|
+
:checkmarkColor="checkmarkColor"
|
13
10
|
>
|
14
|
-
<
|
15
|
-
:checked="selectedOption === item.value"
|
16
|
-
:data-id="`radio_button_${dataId}_option_${item.value}`"
|
17
|
-
:disabled="item.disabled"
|
18
|
-
:name="'radioButtons_' + radioName"
|
11
|
+
<radio
|
19
12
|
type="radio"
|
20
13
|
:value="selectedOption"
|
21
14
|
@click="onInputHandler(item.value)"
|
15
|
+
:name="'radioButtons_' + radioName"
|
16
|
+
:checked="selectedOption === item.value"
|
17
|
+
:disabled="item.disabled"
|
18
|
+
:data-id="`radio_button_${dataId}_option_${item.value}`"
|
22
19
|
/>
|
23
20
|
<span class="checkmark"></span>
|
24
|
-
<
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
<InfoText
|
31
|
-
v-if="item.infoText"
|
32
|
-
size="16px"
|
33
|
-
:text="item.infoText"
|
34
|
-
/>
|
35
|
-
</LabelContainer>
|
36
|
-
<ImageContainer v-if="item.img">
|
37
|
-
<RadioImage :src="item.img" />
|
38
|
-
<div
|
39
|
-
class="search-icn-container"
|
40
|
-
@click="toggleImageModal(index)"
|
41
|
-
>
|
21
|
+
<label-text :isDisabled="item.disabled" v-if="item.label">{{ item.label }}</label-text>
|
22
|
+
<info-text v-if="item.infoText" :text="item.infoText" size="16px" />
|
23
|
+
</label-container>
|
24
|
+
<image-container v-if="item.img">
|
25
|
+
<radio-image :src="item.img" />
|
26
|
+
<div class="search-icn-container" @click="toggleImageModal(index)">
|
42
27
|
<img
|
43
28
|
class="search-icn"
|
44
29
|
:src="require('../../../assets/icons/search_icon.png')"
|
45
30
|
/>
|
46
31
|
</div>
|
47
|
-
</
|
48
|
-
<
|
32
|
+
</image-container>
|
33
|
+
<modal
|
49
34
|
v-if="item.img"
|
50
|
-
:
|
35
|
+
:isOpen="isImageOpen(index)"
|
51
36
|
@on-close="toggleImageModal(null)"
|
52
37
|
>
|
53
|
-
<
|
54
|
-
<
|
55
|
-
</
|
56
|
-
</
|
57
|
-
</
|
58
|
-
</
|
38
|
+
<modal-image-container>
|
39
|
+
<modal-image :src="item.img" />
|
40
|
+
</modal-image-container>
|
41
|
+
</modal>
|
42
|
+
</radio-wrapper>
|
43
|
+
</component-wrapper>
|
59
44
|
</template>
|
60
45
|
|
61
46
|
<script>
|
@@ -76,22 +61,22 @@
|
|
76
61
|
// { label: 'Button 4', value: 'button_4', disabled: true }
|
77
62
|
// ]
|
78
63
|
|
79
|
-
|
80
|
-
|
81
|
-
|
64
|
+
import styled from 'vue3-styled-components'
|
65
|
+
import Modal from '../../modals/modal'
|
66
|
+
import InfoText from '../../infoText'
|
82
67
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
68
|
+
const wrapperProps = {
|
69
|
+
layout: String
|
70
|
+
}
|
71
|
+
const ComponentWrapper = styled('div', wrapperProps)`
|
87
72
|
display: flex;
|
88
73
|
flex-direction: ${(props) =>
|
89
|
-
|
74
|
+
props.layout === 'vertical' ? 'column' : 'row'};
|
90
75
|
grid-gap: 10px 5px;
|
91
76
|
flex-wrap: wrap;
|
92
77
|
`
|
93
78
|
|
94
|
-
|
79
|
+
const Radio = styled.input`
|
95
80
|
cursor: pointer;
|
96
81
|
position: absolute;
|
97
82
|
opacity: 0;
|
@@ -100,26 +85,26 @@
|
|
100
85
|
width: 0;
|
101
86
|
`
|
102
87
|
|
103
|
-
|
88
|
+
const RadioWrapper = styled.div`
|
104
89
|
display: grid;
|
105
90
|
grid-gap: 10px;
|
106
91
|
`
|
107
92
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
93
|
+
const containerProps = {
|
94
|
+
size: String,
|
95
|
+
isDisabled: Boolean,
|
96
|
+
isChecked: Boolean,
|
97
|
+
checkmarkColor: String
|
98
|
+
}
|
99
|
+
const LabelContainer = styled('label', containerProps)`
|
115
100
|
display: grid;
|
116
101
|
grid-template-columns: auto 1fr auto;
|
117
102
|
grid-gap: ${(props) =>
|
118
103
|
props.hasLabel
|
119
|
-
|
104
|
+
? '15px' : 0 };
|
120
105
|
align-items: center;
|
121
106
|
color: ${(props) =>
|
122
|
-
|
107
|
+
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
123
108
|
position: relative;
|
124
109
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
125
110
|
font-size: ${(props) =>
|
@@ -127,7 +112,7 @@
|
|
127
112
|
? '16px'
|
128
113
|
: props.size === 'medium'
|
129
114
|
? '13px'
|
130
|
-
|
115
|
+
: '10px'};
|
131
116
|
user-select: none;
|
132
117
|
flex: auto;
|
133
118
|
align-self: baseline;
|
@@ -138,13 +123,13 @@
|
|
138
123
|
? '23px'
|
139
124
|
: props.size === 'medium'
|
140
125
|
? '16px'
|
141
|
-
|
126
|
+
: '12px'};
|
142
127
|
width: ${(props) =>
|
143
128
|
props.size === 'large'
|
144
129
|
? '23px'
|
145
130
|
: props.size === 'medium'
|
146
131
|
? '16px'
|
147
|
-
|
132
|
+
: '12px'};
|
148
133
|
background-color: #fff;
|
149
134
|
border-radius: 100%;
|
150
135
|
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
@@ -160,31 +145,31 @@
|
|
160
145
|
? '10px'
|
161
146
|
: props.size === 'medium'
|
162
147
|
? '8px'
|
163
|
-
|
148
|
+
: '6px'};
|
164
149
|
height: ${(props) =>
|
165
150
|
props.size === 'large'
|
166
151
|
? '10px'
|
167
152
|
: props.size === 'medium'
|
168
153
|
? '8px'
|
169
|
-
|
154
|
+
: '6px'};
|
170
155
|
border-radius: 100%;
|
171
156
|
background: ${(props) =>
|
172
|
-
|
157
|
+
props.checkmarkColor ? props.checkmarkColor : props.theme.colors.green};
|
173
158
|
}
|
174
159
|
}
|
175
160
|
`
|
176
161
|
|
177
|
-
|
178
|
-
|
162
|
+
const textAttrs = { isDisabled: Boolean }
|
163
|
+
const LabelText = styled('div', textAttrs)`
|
179
164
|
color: ${(props) =>
|
180
|
-
|
165
|
+
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
181
166
|
`
|
182
167
|
|
183
|
-
|
168
|
+
const RadioImage = styled.img`
|
184
169
|
max-width: 100px;
|
185
170
|
`
|
186
171
|
|
187
|
-
|
172
|
+
const ImageContainer = styled.div`
|
188
173
|
border-radius: 4px;
|
189
174
|
cursor: pointer;
|
190
175
|
display: grid;
|
@@ -209,77 +194,77 @@
|
|
209
194
|
}
|
210
195
|
`
|
211
196
|
|
212
|
-
|
197
|
+
const ModalImage = styled.img``
|
213
198
|
|
214
|
-
|
199
|
+
const ModalImageContainer = styled.div`
|
215
200
|
padding: 40px;
|
216
201
|
`
|
217
202
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
203
|
+
export default {
|
204
|
+
name: 'radio-button',
|
205
|
+
components: {
|
206
|
+
Radio,
|
207
|
+
ComponentWrapper,
|
208
|
+
LabelContainer,
|
209
|
+
RadioWrapper,
|
210
|
+
RadioImage,
|
211
|
+
ImageContainer,
|
212
|
+
Modal,
|
213
|
+
ModalImage,
|
214
|
+
ModalImageContainer,
|
215
|
+
InfoText,
|
216
|
+
LabelText
|
217
|
+
},
|
218
|
+
props: {
|
219
|
+
selectedOption: {
|
220
|
+
required: true,
|
221
|
+
default: false
|
222
|
+
},
|
223
|
+
options: {
|
224
|
+
required: true,
|
225
|
+
default: []
|
226
|
+
},
|
227
|
+
layout: {
|
228
|
+
required: false,
|
229
|
+
default: 'horizontal' //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
|
232
230
|
},
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
default: false
|
237
|
-
},
|
238
|
-
options: {
|
239
|
-
required: true,
|
240
|
-
default: []
|
241
|
-
},
|
242
|
-
layout: {
|
243
|
-
required: false,
|
244
|
-
default: 'horizontal' //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
|
245
|
-
},
|
246
|
-
size: {
|
247
|
-
required: false,
|
248
|
-
default: 'medium' // small, medium, large
|
249
|
-
},
|
250
|
-
name: {
|
251
|
-
required: false,
|
252
|
-
default: ''
|
253
|
-
},
|
254
|
-
checkmarkColor: {
|
255
|
-
required: false,
|
256
|
-
default: ''
|
257
|
-
},
|
258
|
-
dataId: {
|
259
|
-
type: String,
|
260
|
-
default: 'key'
|
261
|
-
}
|
231
|
+
size: {
|
232
|
+
required: false,
|
233
|
+
default: 'medium' // small, medium, large
|
262
234
|
},
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
235
|
+
name: {
|
236
|
+
required: false,
|
237
|
+
default: ''
|
238
|
+
},
|
239
|
+
checkmarkColor: {
|
240
|
+
required: false,
|
241
|
+
default: ''
|
242
|
+
},
|
243
|
+
dataId: {
|
244
|
+
type: String,
|
245
|
+
default: 'key'
|
246
|
+
}
|
247
|
+
},
|
248
|
+
data() {
|
249
|
+
return {
|
250
|
+
selectedImage: null,
|
251
|
+
radioName: ''
|
252
|
+
}
|
253
|
+
},
|
254
|
+
methods: {
|
255
|
+
onInputHandler(value) {
|
256
|
+
this.$emit('on-radio-change', value)
|
268
257
|
},
|
269
|
-
|
270
|
-
this.
|
271
|
-
this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
|
258
|
+
isImageOpen(index) {
|
259
|
+
return this.selectedImage === index
|
272
260
|
},
|
273
|
-
|
274
|
-
|
275
|
-
this.$emit('on-radio-change', value)
|
276
|
-
},
|
277
|
-
isImageOpen(index) {
|
278
|
-
return this.selectedImage === index
|
279
|
-
},
|
280
|
-
toggleImageModal(value) {
|
281
|
-
this.selectedImage = value
|
282
|
-
}
|
261
|
+
toggleImageModal(value) {
|
262
|
+
this.selectedImage = value
|
283
263
|
}
|
264
|
+
},
|
265
|
+
created() {
|
266
|
+
this.radioName =
|
267
|
+
this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
|
284
268
|
}
|
269
|
+
}
|
285
270
|
</script>
|
@@ -1,24 +1,21 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
:icon-color="iconColor"
|
5
|
-
:icon-position="iconPosition"
|
6
|
-
>
|
2
|
+
<container :inputWidth="inputWidth">
|
3
|
+
<input-wrapper :iconPosition="iconPosition" :iconColor="iconColor">
|
7
4
|
<SearchIconSvg class="search-icn" />
|
8
|
-
<
|
5
|
+
<input-container
|
9
6
|
ref="inputElement"
|
10
|
-
:data-id="dataId"
|
11
|
-
:disabled="disabled"
|
12
|
-
:has-focus="hasFocus"
|
13
|
-
:input-width="inputWidth"
|
14
|
-
:is-disabled="disabled"
|
15
|
-
:is-filter="isFilter"
|
16
7
|
:placeholder="placeholder"
|
17
8
|
:value="value"
|
18
9
|
@input="onChangeHandler($event)"
|
10
|
+
:disabled="disabled"
|
11
|
+
:isDisabled="disabled"
|
12
|
+
:inputWidth="inputWidth"
|
13
|
+
:isFilter="isFilter"
|
14
|
+
:hasFocus="hasFocus"
|
15
|
+
:data-id="dataId"
|
19
16
|
/>
|
20
|
-
</
|
21
|
-
</
|
17
|
+
</input-wrapper>
|
18
|
+
</container>
|
22
19
|
</template>
|
23
20
|
|
24
21
|
<script>
|
@@ -35,23 +32,23 @@
|
|
35
32
|
// iconPosition="left"
|
36
33
|
// iconColor="grey2"
|
37
34
|
// />
|
38
|
-
|
39
|
-
|
35
|
+
import styled from 'vue3-styled-components'
|
36
|
+
import SearchIconSvg from '../../../assets/icons/search_icon_black.svg'
|
40
37
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
38
|
+
const inputAttrs = {
|
39
|
+
isDisabled: Boolean,
|
40
|
+
inputWidth: String,
|
41
|
+
isFilter: Boolean
|
42
|
+
}
|
43
|
+
const Container = styled('div', inputAttrs)`
|
47
44
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
48
45
|
position: relative;
|
49
46
|
`
|
50
47
|
|
51
|
-
|
48
|
+
const InputContainer = styled('input', inputAttrs)`
|
52
49
|
border: 1px solid ${(props) => props.theme.colors.grey4};
|
53
50
|
padding: ${(props) =>
|
54
|
-
|
51
|
+
props.isFilter ? '7px 30px 7px 10px' : '11px 30px 11px 10px'};
|
55
52
|
border-radius: 4px;
|
56
53
|
font-size: 13px;
|
57
54
|
color: ${(props) => props.theme.colors.black};
|
@@ -68,7 +65,7 @@
|
|
68
65
|
}
|
69
66
|
`
|
70
67
|
|
71
|
-
|
68
|
+
const InputWrapper = styled.span`
|
72
69
|
position: relative;
|
73
70
|
|
74
71
|
svg {
|
@@ -81,73 +78,73 @@
|
|
81
78
|
fill: ${(props) =>
|
82
79
|
props.theme.colors[props.iconColor]
|
83
80
|
? props.theme.colors[props.iconColor]
|
84
|
-
|
81
|
+
: props.iconColor};
|
85
82
|
}
|
86
83
|
}
|
87
84
|
`
|
88
85
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
86
|
+
export default {
|
87
|
+
name: 'search-input',
|
88
|
+
components: {
|
89
|
+
InputContainer,
|
90
|
+
InputWrapper,
|
91
|
+
Container,
|
92
|
+
SearchIconSvg
|
93
|
+
},
|
94
|
+
props: {
|
95
|
+
value: {
|
96
|
+
required: true
|
96
97
|
},
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
},
|
101
|
-
disabled: {
|
102
|
-
required: false,
|
103
|
-
default: false
|
104
|
-
},
|
105
|
-
placeholder: {
|
106
|
-
required: false,
|
107
|
-
default: ''
|
108
|
-
},
|
109
|
-
inputWidth: {
|
110
|
-
required: false,
|
111
|
-
default: null
|
112
|
-
},
|
113
|
-
isFilter: {
|
114
|
-
required: false,
|
115
|
-
default: false
|
116
|
-
},
|
117
|
-
hasFocus: {
|
118
|
-
required: false,
|
119
|
-
default: false
|
120
|
-
},
|
121
|
-
dataId: {
|
122
|
-
required: false,
|
123
|
-
default: ''
|
124
|
-
},
|
125
|
-
iconPosition: {
|
126
|
-
type: String,
|
127
|
-
default: 'right'
|
128
|
-
},
|
129
|
-
iconColor: {
|
130
|
-
type: String,
|
131
|
-
default: 'black'
|
132
|
-
}
|
98
|
+
disabled: {
|
99
|
+
required: false,
|
100
|
+
default: false
|
133
101
|
},
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
102
|
+
placeholder: {
|
103
|
+
required: false,
|
104
|
+
default: ''
|
105
|
+
},
|
106
|
+
inputWidth: {
|
107
|
+
required: false,
|
108
|
+
default: null
|
141
109
|
},
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
110
|
+
isFilter: {
|
111
|
+
required: false,
|
112
|
+
default: false
|
113
|
+
},
|
114
|
+
hasFocus: {
|
115
|
+
required: false,
|
116
|
+
default: false
|
117
|
+
},
|
118
|
+
dataId: {
|
119
|
+
required: false,
|
120
|
+
default: ''
|
121
|
+
},
|
122
|
+
iconPosition: {
|
123
|
+
type: String,
|
124
|
+
default: 'right'
|
125
|
+
},
|
126
|
+
iconColor: {
|
127
|
+
type: String,
|
128
|
+
default: 'black'
|
129
|
+
}
|
130
|
+
},
|
131
|
+
emits: ['on-change'],
|
132
|
+
methods: {
|
133
|
+
onChangeHandler(event) {
|
134
|
+
this.$emit('on-change', event.target.value)
|
135
|
+
},
|
136
|
+
focusInputElement() {
|
137
|
+
this.$nextTick(() => {
|
138
|
+
this.$refs.inputElement.$el.focus()
|
139
|
+
})
|
140
|
+
}
|
141
|
+
},
|
142
|
+
watch: {
|
143
|
+
hasFocus(newVal) {
|
144
|
+
if (newVal) {
|
145
|
+
this.focusInputElement()
|
150
146
|
}
|
151
147
|
}
|
152
148
|
}
|
149
|
+
}
|
153
150
|
</script>
|