@eturnity/eturnity_reusable_components 7.48.0 → 7.48.1-EPDM-12680.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 +1 -1
- package/src/assets/svgIcons/collapse_all.svg +4 -0
- package/src/assets/svgIcons/hybrid.svg +4 -0
- package/src/assets/svgIcons/module.svg +3 -0
- package/src/assets/svgIcons/optimizer.svg +6 -0
- package/src/assets/svgIcons/string_design.svg +5 -0
- package/src/components/buttons/buttonIcon/index.vue +3 -1
- package/src/components/icon/index.vue +1 -0
- package/src/components/inputs/inputNumber/index.vue +170 -8
- package/src/components/inputs/inputText/InputText.stories.js +55 -60
- package/src/components/inputs/inputText/index.vue +68 -10
- package/src/components/inputs/inputText/inputText.spec.js +588 -0
- package/src/components/inputs/radioButton/index.vue +1 -0
- package/src/components/inputs/select/index.vue +57 -17
- package/src/components/inputs/select/option/index.vue +11 -2
- package/src/components/spinner/index.vue +11 -0
- package/src/components/stringDesign/DropdownMenu/index.vue +533 -0
@@ -2,22 +2,26 @@
|
|
2
2
|
<Container>
|
3
3
|
<InputWrapper
|
4
4
|
:align-items="alignItems"
|
5
|
+
data-test-id="input_wrapper"
|
5
6
|
:has-label="!!label && label.length > 0"
|
6
7
|
>
|
7
8
|
<LabelWrapper v-if="label">
|
8
9
|
<InputLabel
|
10
|
+
ref="label"
|
9
11
|
:data-id="labelDataId"
|
12
|
+
data-test-id="label_wrapper"
|
10
13
|
:font-size="fontSize"
|
11
14
|
:label-font-color="labelFontColor"
|
12
15
|
>
|
13
16
|
{{ label }}
|
14
|
-
<OptionalLabel v-if="labelOptional">
|
17
|
+
<OptionalLabel v-if="labelOptional" data-test-id="label_optional">
|
15
18
|
({{ $gettext('Optional') }})
|
16
19
|
</OptionalLabel>
|
17
20
|
</InputLabel>
|
18
21
|
<InfoText
|
19
|
-
v-if="infoTextMessage"
|
22
|
+
v-if="infoTextMessage != ''"
|
20
23
|
:align-arrow="infoTextAlign"
|
24
|
+
data-test-id="info_text_message"
|
21
25
|
:size="fontSize ? fontSize : '16px'"
|
22
26
|
:text="infoTextMessage"
|
23
27
|
/>
|
@@ -27,7 +31,10 @@
|
|
27
31
|
<InputContainer
|
28
32
|
ref="inputElement"
|
29
33
|
:background-color="backgroundColor"
|
34
|
+
:border-color="borderColor"
|
30
35
|
:data-id="inputDataId"
|
36
|
+
data-test-id="input"
|
37
|
+
:default-padding="defaultPadding"
|
31
38
|
:disabled="disabled"
|
32
39
|
:disabled-background-color="disabledBackgroundColor"
|
33
40
|
:font-color="fontColor"
|
@@ -50,16 +57,27 @@
|
|
50
57
|
/>
|
51
58
|
<IconWrapper
|
52
59
|
v-if="inputType === 'password' && !isError"
|
60
|
+
data-test-id="password_visiblity_change_icon"
|
53
61
|
size="20px"
|
54
62
|
@click="toggleShowPassword()"
|
55
63
|
>
|
56
64
|
<Icon name="current_variant" size="20px" />
|
57
65
|
</IconWrapper>
|
58
|
-
<IconWrapper v-if="hasError" size="16px">
|
66
|
+
<IconWrapper v-if="hasError" data-test-id="error_wrapper" size="16px">
|
59
67
|
<Icon cursor="default" name="warning" size="16px" />
|
60
68
|
</IconWrapper>
|
69
|
+
<IconWrapper
|
70
|
+
v-if="iconName && !hasError && inputType !== 'password'"
|
71
|
+
:default-padding="defaultPadding"
|
72
|
+
size="16px"
|
73
|
+
>
|
74
|
+
<Icon color="white" cursor="default" :name="iconName" size="16px" />
|
75
|
+
</IconWrapper>
|
61
76
|
</IconContainer>
|
62
|
-
<ErrorMessage
|
77
|
+
<ErrorMessage
|
78
|
+
v-if="hasError && hasErrorMessage"
|
79
|
+
data-test-id="error_message_wrapper"
|
80
|
+
>
|
63
81
|
{{ dynamicErrorMessage }}
|
64
82
|
</ErrorMessage>
|
65
83
|
</InputErrorWrapper>
|
@@ -122,6 +140,7 @@
|
|
122
140
|
borderColor: String,
|
123
141
|
inputHeight: String,
|
124
142
|
disabledBackgroundColor: String,
|
143
|
+
defaultPadding: Boolean,
|
125
144
|
}
|
126
145
|
const InputContainer = styled('input', inputProps)`
|
127
146
|
border: ${(props) =>
|
@@ -139,6 +158,8 @@
|
|
139
158
|
? '11px 25px 11px 10px'
|
140
159
|
: props.inputType === 'password'
|
141
160
|
? '11px 25px 11px 10px'
|
161
|
+
: props.defaultPadding
|
162
|
+
? '10px 35px 10px 15px'
|
142
163
|
: '11px 5px 11px 10px'};
|
143
164
|
border-radius: 4px;
|
144
165
|
position: relative;
|
@@ -185,13 +206,13 @@
|
|
185
206
|
props.alignItems === 'vertical' || !props.hasLabel ? '1fr' : 'auto 1fr'};
|
186
207
|
`
|
187
208
|
|
188
|
-
const IconAttrs = { size: String }
|
209
|
+
const IconAttrs = { size: String, defaultPadding: Boolean }
|
189
210
|
const IconWrapper = styled('div', IconAttrs)`
|
190
211
|
position: absolute;
|
191
212
|
top: 0;
|
192
213
|
bottom: 0;
|
193
214
|
margin: auto;
|
194
|
-
right: 5px;
|
215
|
+
right: ${(props) => (props.defaultPadding ? '15px' : '5px')};
|
195
216
|
height: ${(props) => (props.size ? props.size : 'auto')};
|
196
217
|
`
|
197
218
|
|
@@ -237,93 +258,132 @@
|
|
237
258
|
placeholder: {
|
238
259
|
required: false,
|
239
260
|
default: '',
|
261
|
+
type: String,
|
240
262
|
},
|
241
263
|
alignItems: {
|
242
264
|
required: false,
|
243
265
|
default: 'horizontal',
|
266
|
+
type: String,
|
267
|
+
validator(value) {
|
268
|
+
return ['horizontal', 'vertical'].includes(value)
|
269
|
+
},
|
244
270
|
},
|
245
271
|
isError: {
|
246
272
|
required: false,
|
247
273
|
default: false,
|
274
|
+
type: Boolean,
|
248
275
|
},
|
249
276
|
inputWidth: {
|
250
277
|
required: false,
|
251
278
|
default: null,
|
279
|
+
type: String,
|
252
280
|
},
|
253
281
|
inputHeight: {
|
254
282
|
required: false,
|
255
283
|
default: null,
|
284
|
+
type: String,
|
256
285
|
},
|
257
286
|
minWidth: {
|
258
287
|
required: false,
|
259
288
|
default: null,
|
289
|
+
type: String,
|
260
290
|
},
|
261
291
|
value: {
|
262
292
|
required: true,
|
263
293
|
default: null,
|
294
|
+
type: String,
|
264
295
|
},
|
265
296
|
errorMessage: {
|
266
297
|
required: false,
|
267
298
|
default: '',
|
299
|
+
type: String,
|
268
300
|
},
|
269
301
|
infoTextMessage: {
|
270
302
|
required: false,
|
303
|
+
default: '',
|
304
|
+
type: String,
|
271
305
|
},
|
272
306
|
infoTextAlign: {
|
273
307
|
required: false,
|
308
|
+
default: 'left',
|
309
|
+
type: String,
|
274
310
|
},
|
275
311
|
label: {
|
276
312
|
required: false,
|
313
|
+
default: '',
|
314
|
+
type: String,
|
277
315
|
},
|
278
316
|
labelOptional: {
|
279
317
|
required: false,
|
280
318
|
default: false,
|
319
|
+
type: Boolean,
|
281
320
|
},
|
282
321
|
noBorder: {
|
283
322
|
required: false,
|
284
323
|
default: false,
|
324
|
+
type: Boolean,
|
285
325
|
},
|
286
326
|
disabled: {
|
287
327
|
required: false,
|
288
328
|
default: false,
|
329
|
+
type: Boolean,
|
289
330
|
},
|
290
331
|
fontSize: {
|
291
332
|
required: false,
|
292
333
|
default: null,
|
334
|
+
type: String,
|
293
335
|
},
|
294
336
|
inputType: {
|
295
337
|
required: false,
|
296
338
|
default: 'text',
|
339
|
+
type: String,
|
297
340
|
},
|
298
341
|
labelFontColor: {
|
299
342
|
required: false,
|
300
343
|
default: 'black',
|
344
|
+
type: String,
|
301
345
|
},
|
302
346
|
backgroundColor: {
|
303
347
|
required: false,
|
348
|
+
type: String,
|
304
349
|
},
|
305
350
|
disabledBackgroundColor: {
|
306
351
|
required: false,
|
307
352
|
default: null,
|
353
|
+
type: String,
|
308
354
|
},
|
309
355
|
fontColor: {
|
310
356
|
required: false,
|
311
357
|
default: 'black',
|
358
|
+
type: String,
|
312
359
|
},
|
313
360
|
hasFocus: {
|
314
361
|
required: false,
|
315
362
|
default: false,
|
363
|
+
type: Boolean,
|
316
364
|
},
|
317
365
|
borderColor: {
|
318
366
|
required: false,
|
367
|
+
type: String,
|
319
368
|
},
|
320
369
|
labelDataId: {
|
321
370
|
required: false,
|
322
371
|
default: '',
|
372
|
+
type: String,
|
323
373
|
},
|
324
374
|
inputDataId: {
|
325
375
|
required: false,
|
326
376
|
default: '',
|
377
|
+
type: String,
|
378
|
+
},
|
379
|
+
iconName: {
|
380
|
+
required: false,
|
381
|
+
default: null,
|
382
|
+
type: String,
|
383
|
+
},
|
384
|
+
defaultPadding: {
|
385
|
+
required: false,
|
386
|
+
default: false,
|
327
387
|
},
|
328
388
|
},
|
329
389
|
data() {
|
@@ -336,12 +396,10 @@
|
|
336
396
|
return this.isError || this.error
|
337
397
|
},
|
338
398
|
hasErrorMessage() {
|
339
|
-
return
|
340
|
-
(this.errorMessage && this.errorMessage.length > 0) || this.errMessage
|
341
|
-
)
|
399
|
+
return this.errorMessage && this.errorMessage.length > 0
|
342
400
|
},
|
343
401
|
dynamicErrorMessage() {
|
344
|
-
return this.
|
402
|
+
return this.errorMessage
|
345
403
|
},
|
346
404
|
},
|
347
405
|
watch: {
|