@eturnity/eturnity_reusable_components 6.37.0-EPDM-8148.6 → 6.37.0-EPDM-2198.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/package.json +1 -1
- package/src/App.vue +42 -181
- package/src/assets/svgIcons/charger_icon_white.svg +44 -0
- package/src/assets/svgIcons/collections.svg +3 -0
- package/src/assets/svgIcons/dashboard.svg +3 -0
- package/src/assets/svgIcons/energy_meter.svg +12 -0
- package/src/assets/svgIcons/erase.svg +1 -1
- package/src/assets/svgIcons/expand.svg +1 -0
- package/src/assets/svgIcons/logout.svg +3 -0
- package/src/assets/svgIcons/split.svg +94 -0
- package/src/assets/svgIcons/subscriptions.svg +3 -0
- package/src/assets/theme.js +3 -0
- package/src/components/addNewButton/index.vue +12 -8
- package/src/components/buttons/mainButton/index.vue +35 -23
- package/src/components/card/index.vue +95 -0
- package/src/components/draggableInputHandle/index.vue +47 -0
- package/src/components/errorMessage/index.vue +1 -3
- package/src/components/filter/filterSettings.vue +15 -10
- package/src/components/filter/index.vue +12 -1
- package/src/components/icon/iconCollection.vue +5 -5
- package/src/components/icon/index.vue +10 -2
- package/src/components/iconWrapper/index.vue +17 -12
- package/src/components/infoCard/index.vue +36 -0
- package/src/components/infoText/index.vue +2 -12
- package/src/components/inputs/checkbox/index.vue +5 -0
- package/src/components/inputs/inputNumber/index.vue +48 -17
- package/src/components/inputs/inputText/index.vue +24 -5
- package/src/components/inputs/radioButton/index.vue +66 -49
- package/src/components/inputs/searchInput/index.vue +6 -0
- package/src/components/inputs/select/index.vue +138 -68
- package/src/components/inputs/select/option/index.vue +15 -2
- package/src/components/inputs/switchField/index.vue +7 -11
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +0 -8
- package/src/components/inputs/textAreaInput/index.vue +12 -7
- package/src/components/inputs/toggle/index.vue +82 -82
- package/src/components/label/index.vue +103 -0
- package/src/components/modals/modal/index.vue +46 -13
- package/src/components/navigationTabs/index.vue +105 -0
- package/src/components/pageSubtitle/index.vue +1 -8
- package/src/components/pageTitle/index.vue +32 -4
- package/src/components/pagination/index.vue +136 -129
- package/src/components/projectMarker/index.vue +39 -33
- package/src/components/sideMenu/index.vue +270 -0
- package/src/components/tables/mainTable/index.vue +3 -3
- package/src/components/threeDots/index.vue +31 -22
- package/src/helpers/numberConverter.js +4 -2
- package/src/helpers/translateLang.js +9 -1
@@ -5,15 +5,20 @@
|
|
5
5
|
:alignItems="alignItems"
|
6
6
|
>
|
7
7
|
<label-wrapper v-if="label">
|
8
|
-
<input-label
|
9
|
-
|
10
|
-
|
8
|
+
<input-label
|
9
|
+
:labelFontColor="labelFontColor"
|
10
|
+
:fontSize="fontSize"
|
11
|
+
:data-id="labelDataId"
|
12
|
+
>{{ label }}
|
13
|
+
<optionalLabel v-if="labelOptional"
|
14
|
+
>({{ $gettext('Optional') }})</optionalLabel
|
15
|
+
></input-label
|
16
|
+
>
|
11
17
|
<info-text
|
12
18
|
v-if="infoTextMessage"
|
13
19
|
:text="infoTextMessage"
|
14
|
-
borderColor="#ccc"
|
15
20
|
:size="fontSize ? fontSize : '16px'"
|
16
|
-
:
|
21
|
+
:alignArrow="infoTextAlign"
|
17
22
|
/>
|
18
23
|
</label-wrapper>
|
19
24
|
<input-error-wrapper>
|
@@ -28,6 +33,7 @@
|
|
28
33
|
:value="value"
|
29
34
|
@input="onChangeHandler"
|
30
35
|
@blur="onInputBlur"
|
36
|
+
@keyup.enter="onEnterPress"
|
31
37
|
:noBorder="noBorder"
|
32
38
|
:disabled="disabled"
|
33
39
|
:isDisabled="disabled"
|
@@ -38,6 +44,7 @@
|
|
38
44
|
:hasFocus="hasFocus"
|
39
45
|
:backgroundColor="backgroundColor"
|
40
46
|
:disabledBackgroundColor="disabledBackgroundColor"
|
47
|
+
:data-id="inputDataId"
|
41
48
|
/>
|
42
49
|
<icon-wrapper
|
43
50
|
v-if="inputType === 'password' && !isError"
|
@@ -310,9 +317,21 @@ export default {
|
|
310
317
|
},
|
311
318
|
borderColor: {
|
312
319
|
required: false
|
320
|
+
},
|
321
|
+
labelDataId: {
|
322
|
+
required: false,
|
323
|
+
default: ''
|
324
|
+
},
|
325
|
+
inputDataId: {
|
326
|
+
required: false,
|
327
|
+
default: ''
|
313
328
|
}
|
314
329
|
},
|
315
330
|
methods: {
|
331
|
+
onEnterPress(event){
|
332
|
+
this.$emit('on-enter-click')
|
333
|
+
this.$refs.inputElement.$el.blur()
|
334
|
+
},
|
316
335
|
onChangeHandler($event) {
|
317
336
|
this.$emit('input-change', $event)
|
318
337
|
},
|
@@ -1,7 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<component-wrapper :layout="layout">
|
3
3
|
<radio-wrapper v-for="(item, index) in options" :key="item.value">
|
4
|
-
<label-container
|
4
|
+
<label-container
|
5
|
+
:size="size"
|
6
|
+
:isDisabled="item.disabled"
|
7
|
+
:isChecked="selectedOption === item.value"
|
8
|
+
:checkmarkColor="checkmarkColor"
|
9
|
+
>
|
5
10
|
<radio
|
6
11
|
type="radio"
|
7
12
|
:value="selectedOption"
|
@@ -9,6 +14,7 @@
|
|
9
14
|
:name="'radioButtons_' + radioName"
|
10
15
|
:checked="selectedOption === item.value"
|
11
16
|
:disabled="item.disabled"
|
17
|
+
:data-id="`radio_button_${dataId}_option_${item.value}`"
|
12
18
|
/>
|
13
19
|
<span class="checkmark"></span>
|
14
20
|
<label-text :isDisabled="item.disabled">{{ item.label }}</label-text>
|
@@ -54,17 +60,17 @@
|
|
54
60
|
// { label: 'Button 4', value: 'button_4', disabled: true }
|
55
61
|
// ]
|
56
62
|
|
57
|
-
import styled from
|
58
|
-
import Modal from
|
59
|
-
import InfoText from
|
63
|
+
import styled from 'vue-styled-components'
|
64
|
+
import Modal from '../../modals/modal'
|
65
|
+
import InfoText from '../../infoText'
|
60
66
|
|
61
67
|
const wrapperProps = {
|
62
|
-
layout: String
|
68
|
+
layout: String
|
63
69
|
}
|
64
|
-
const ComponentWrapper = styled(
|
70
|
+
const ComponentWrapper = styled('div', wrapperProps)`
|
65
71
|
display: flex;
|
66
72
|
flex-direction: ${(props) =>
|
67
|
-
props.layout ===
|
73
|
+
props.layout === 'vertical' ? 'column' : 'row'};
|
68
74
|
grid-gap: 10px 5px;
|
69
75
|
flex-wrap: wrap;
|
70
76
|
`
|
@@ -83,8 +89,13 @@ const RadioWrapper = styled.div`
|
|
83
89
|
grid-gap: 10px;
|
84
90
|
`
|
85
91
|
|
86
|
-
const containerProps = {
|
87
|
-
|
92
|
+
const containerProps = {
|
93
|
+
size: String,
|
94
|
+
isDisabled: Boolean,
|
95
|
+
isChecked: Boolean,
|
96
|
+
checkmarkColor: String
|
97
|
+
}
|
98
|
+
const LabelContainer = styled('label', containerProps)`
|
88
99
|
display: grid;
|
89
100
|
grid-template-columns: auto 1fr auto;
|
90
101
|
grid-gap: 15px;
|
@@ -92,30 +103,30 @@ const LabelContainer = styled("label", containerProps)`
|
|
92
103
|
color: ${(props) =>
|
93
104
|
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
94
105
|
position: relative;
|
95
|
-
cursor: ${(props) => (props.isDisabled ?
|
106
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
96
107
|
font-size: ${(props) =>
|
97
|
-
props.size ===
|
98
|
-
?
|
99
|
-
: props.size ===
|
100
|
-
|
101
|
-
|
108
|
+
props.size === 'large'
|
109
|
+
? '16px'
|
110
|
+
: props.size === 'medium'
|
111
|
+
? '13px'
|
112
|
+
: '10px'};
|
102
113
|
user-select: none;
|
103
114
|
flex: auto;
|
104
115
|
align-self: baseline;
|
105
116
|
|
106
117
|
.checkmark {
|
107
118
|
height: ${(props) =>
|
108
|
-
props.size ===
|
109
|
-
?
|
110
|
-
: props.size ===
|
111
|
-
|
112
|
-
|
119
|
+
props.size === 'large'
|
120
|
+
? '23px'
|
121
|
+
: props.size === 'medium'
|
122
|
+
? '16px'
|
123
|
+
: '12px'};
|
113
124
|
width: ${(props) =>
|
114
|
-
props.size ===
|
115
|
-
?
|
116
|
-
: props.size ===
|
117
|
-
|
118
|
-
|
125
|
+
props.size === 'large'
|
126
|
+
? '23px'
|
127
|
+
: props.size === 'medium'
|
128
|
+
? '16px'
|
129
|
+
: '12px'};
|
119
130
|
background-color: #fff;
|
120
131
|
border-radius: 100%;
|
121
132
|
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
@@ -124,28 +135,29 @@ const LabelContainer = styled("label", containerProps)`
|
|
124
135
|
justify-content: center;
|
125
136
|
|
126
137
|
&:after {
|
127
|
-
content:
|
128
|
-
display: ${(props) => props.isChecked ? 'block' : 'none'};
|
138
|
+
content: '';
|
139
|
+
display: ${(props) => (props.isChecked ? 'block' : 'none')};
|
129
140
|
width: ${(props) =>
|
130
|
-
props.size ===
|
131
|
-
?
|
132
|
-
: props.size ===
|
133
|
-
|
134
|
-
|
141
|
+
props.size === 'large'
|
142
|
+
? '10px'
|
143
|
+
: props.size === 'medium'
|
144
|
+
? '8px'
|
145
|
+
: '6px'};
|
135
146
|
height: ${(props) =>
|
136
|
-
props.size ===
|
137
|
-
?
|
138
|
-
: props.size ===
|
139
|
-
|
140
|
-
|
147
|
+
props.size === 'large'
|
148
|
+
? '10px'
|
149
|
+
: props.size === 'medium'
|
150
|
+
? '8px'
|
151
|
+
: '6px'};
|
141
152
|
border-radius: 100%;
|
142
|
-
background: ${(props) =>
|
153
|
+
background: ${(props) =>
|
154
|
+
props.checkmarkColor ? props.checkmarkColor : props.theme.colors.green};
|
143
155
|
}
|
144
156
|
}
|
145
157
|
`
|
146
158
|
|
147
159
|
const textAttrs = { isDisabled: Boolean }
|
148
|
-
const LabelText = styled(
|
160
|
+
const LabelText = styled('div', textAttrs)`
|
149
161
|
color: ${(props) =>
|
150
162
|
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
151
163
|
`
|
@@ -186,7 +198,7 @@ const ModalImageContainer = styled.div`
|
|
186
198
|
`
|
187
199
|
|
188
200
|
export default {
|
189
|
-
name:
|
201
|
+
name: 'radio-button',
|
190
202
|
components: {
|
191
203
|
Radio,
|
192
204
|
ComponentWrapper,
|
@@ -198,24 +210,24 @@ export default {
|
|
198
210
|
ModalImage,
|
199
211
|
ModalImageContainer,
|
200
212
|
InfoText,
|
201
|
-
LabelText
|
213
|
+
LabelText
|
202
214
|
},
|
203
215
|
props: {
|
204
216
|
selectedOption: {
|
205
217
|
required: true,
|
206
|
-
default: false
|
218
|
+
default: false
|
207
219
|
},
|
208
220
|
options: {
|
209
221
|
required: true,
|
210
|
-
default: []
|
222
|
+
default: []
|
211
223
|
},
|
212
224
|
layout: {
|
213
225
|
required: false,
|
214
|
-
default:
|
226
|
+
default: 'horizontal' //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
|
215
227
|
},
|
216
228
|
size: {
|
217
229
|
required: false,
|
218
|
-
default:
|
230
|
+
default: 'medium' // small, medium, large
|
219
231
|
},
|
220
232
|
name: {
|
221
233
|
required: false,
|
@@ -224,6 +236,10 @@ export default {
|
|
224
236
|
checkmarkColor: {
|
225
237
|
required: false,
|
226
238
|
default: ''
|
239
|
+
},
|
240
|
+
dataId: {
|
241
|
+
type: String,
|
242
|
+
default: 'key'
|
227
243
|
}
|
228
244
|
},
|
229
245
|
data() {
|
@@ -234,17 +250,18 @@ export default {
|
|
234
250
|
},
|
235
251
|
methods: {
|
236
252
|
onInputHandler(value) {
|
237
|
-
this.$emit(
|
253
|
+
this.$emit('on-radio-change', value)
|
238
254
|
},
|
239
255
|
isImageOpen(index) {
|
240
256
|
return this.selectedImage === index
|
241
257
|
},
|
242
258
|
toggleImageModal(value) {
|
243
259
|
this.selectedImage = value
|
244
|
-
}
|
260
|
+
}
|
245
261
|
},
|
246
262
|
created() {
|
247
|
-
this.radioName =
|
248
|
-
|
263
|
+
this.radioName =
|
264
|
+
this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
|
265
|
+
}
|
249
266
|
}
|
250
267
|
</script>
|
@@ -11,6 +11,7 @@
|
|
11
11
|
:inputWidth="inputWidth"
|
12
12
|
:isFilter="isFilter"
|
13
13
|
:hasFocus="hasFocus"
|
14
|
+
:data-id="dataId"
|
14
15
|
/>
|
15
16
|
<img
|
16
17
|
class="search-icn"
|
@@ -30,6 +31,7 @@
|
|
30
31
|
// inputWidth="250px"
|
31
32
|
// @on-change="function($event)"
|
32
33
|
// :isFilter="true" // to set the height at 30px
|
34
|
+
// data-id="test-data-id"
|
33
35
|
// />
|
34
36
|
import styled from 'vue-styled-components'
|
35
37
|
|
@@ -104,6 +106,10 @@ export default {
|
|
104
106
|
hasFocus: {
|
105
107
|
required: false,
|
106
108
|
default: false
|
109
|
+
},
|
110
|
+
dataId: {
|
111
|
+
required: false,
|
112
|
+
default: ''
|
107
113
|
}
|
108
114
|
},
|
109
115
|
methods: {
|