@eturnity/eturnity_reusable_components 7.24.1-EPDM-10528.0 → 7.24.1-EPDM-10647.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/components/buttons/mainButton/index.vue +1 -7
- package/src/components/iconWrapper/index.vue +3 -23
- package/src/components/infoText/index.vue +6 -1
- package/src/components/inputs/checkbox/index.vue +1 -1
- package/src/components/inputs/inputNumber/index.vue +78 -4
- package/src/components/inputs/select/index.vue +15 -2
- package/src/assets/svgIcons/house_3d-1.svg +0 -8
- package/src/assets/svgIcons/house_3d.svg +0 -8
package/package.json
CHANGED
@@ -8,7 +8,6 @@
|
|
8
8
|
:customColor="customColor"
|
9
9
|
:noWrap="noWrap"
|
10
10
|
:data-id="dataId"
|
11
|
-
:fontColor="fontColor"
|
12
11
|
>
|
13
12
|
{{ text }}
|
14
13
|
</button-container>
|
@@ -36,14 +35,12 @@ const ButtonAttrs = {
|
|
36
35
|
isDisabled: Boolean,
|
37
36
|
minWidth: String,
|
38
37
|
customColor: String,
|
39
|
-
fontColor: String,
|
40
38
|
noWrap: Boolean
|
41
39
|
}
|
42
40
|
const ButtonContainer = styled('div', ButtonAttrs)`
|
43
41
|
padding: 7px 15px;
|
44
42
|
font-size: 13px;
|
45
|
-
color: ${(props) =>
|
46
|
-
props.fontColor ? props.fontColor : props.theme.colors.white};
|
43
|
+
color: ${(props) => props.theme.colors.white};
|
47
44
|
background-color: ${(props) =>
|
48
45
|
props.isDisabled
|
49
46
|
? props.theme.colors.disabled
|
@@ -94,9 +91,6 @@ export default {
|
|
94
91
|
required: false,
|
95
92
|
default: null
|
96
93
|
},
|
97
|
-
fontColor: {
|
98
|
-
required: false
|
99
|
-
},
|
100
94
|
noWrap: {
|
101
95
|
required: false,
|
102
96
|
default: false
|
@@ -9,7 +9,6 @@
|
|
9
9
|
:hoveredBackgroundColor="hoveredBackgroundColor"
|
10
10
|
:isHovered="isHovered"
|
11
11
|
:data-id="dataId"
|
12
|
-
:noCursor="noCursor"
|
13
12
|
>
|
14
13
|
<icon
|
15
14
|
:disabled="disabled"
|
@@ -31,9 +30,6 @@
|
|
31
30
|
borderRadius="1px"
|
32
31
|
/>
|
33
32
|
</caret>
|
34
|
-
<lockContainer v-if="hasLock">
|
35
|
-
<icon size="9px" name="lock" color="yellow" />
|
36
|
-
</lockContainer>
|
37
33
|
</Wrapper>
|
38
34
|
</template>
|
39
35
|
|
@@ -58,14 +54,8 @@ const wrapperAttrs = {
|
|
58
54
|
size: String,
|
59
55
|
backgroundColor: String,
|
60
56
|
hoveredBackgroundColor: String,
|
61
|
-
hasBorder: Boolean
|
62
|
-
noCursor: Boolean
|
57
|
+
hasBorder: Boolean
|
63
58
|
}
|
64
|
-
const lockContainer = styled.div`
|
65
|
-
position: absolute;
|
66
|
-
bottom: 6px;
|
67
|
-
right: 6px;
|
68
|
-
`
|
69
59
|
const Wrapper = styled('div', wrapperAttrs)`
|
70
60
|
position: relative;
|
71
61
|
display: inline-flex;
|
@@ -77,8 +67,7 @@ const Wrapper = styled('div', wrapperAttrs)`
|
|
77
67
|
: ''};
|
78
68
|
justify-content: center;
|
79
69
|
align-items: center;
|
80
|
-
cursor: ${(props) =>
|
81
|
-
props.noCursor ? 'auto' : props.disabled ? 'not-allowed' : 'pointer'};
|
70
|
+
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
|
82
71
|
background-color: ${(props) =>
|
83
72
|
props.theme.colors[props.backgroundColor] || props.backgroundColor};
|
84
73
|
border-radius: ${(props) => props.borderRadius};
|
@@ -106,8 +95,7 @@ export default {
|
|
106
95
|
components: {
|
107
96
|
Wrapper,
|
108
97
|
icon,
|
109
|
-
caret
|
110
|
-
lockContainer
|
98
|
+
caret
|
111
99
|
},
|
112
100
|
props: {
|
113
101
|
disabled: {
|
@@ -165,14 +153,6 @@ export default {
|
|
165
153
|
isLoading: {
|
166
154
|
required: false,
|
167
155
|
default: false
|
168
|
-
},
|
169
|
-
noCursor: {
|
170
|
-
required: false,
|
171
|
-
default: false
|
172
|
-
},
|
173
|
-
hasLock: {
|
174
|
-
required: false,
|
175
|
-
default: false
|
176
156
|
}
|
177
157
|
}
|
178
158
|
}
|
@@ -14,6 +14,7 @@
|
|
14
14
|
:halfComputedTextInfoWidth="halfComputedTextInfoWidth"
|
15
15
|
:alignArrow="alignArrow"
|
16
16
|
:iconSize="size"
|
17
|
+
:maxWidth="maxWidth"
|
17
18
|
><slot />
|
18
19
|
<span v-html="text"></span>
|
19
20
|
</text-overlay>
|
@@ -52,7 +53,7 @@ const TextOverlay = styled('div', textAttrs)`
|
|
52
53
|
background: ${(props) => props.theme.colors.black};
|
53
54
|
padding: 10px;
|
54
55
|
width: ${(props) => props.width};
|
55
|
-
max-width:
|
56
|
+
max-width: ${(props) => props.maxWidth};
|
56
57
|
font-size: 13px;
|
57
58
|
font-weight: 400;
|
58
59
|
line-height: normal;
|
@@ -124,6 +125,10 @@ export default {
|
|
124
125
|
width: {
|
125
126
|
required: false,
|
126
127
|
default: '165px'
|
128
|
+
},
|
129
|
+
maxWidth: {
|
130
|
+
type: String,
|
131
|
+
default: '400px'
|
127
132
|
}
|
128
133
|
},
|
129
134
|
methods: {
|
@@ -63,9 +63,34 @@
|
|
63
63
|
:isError="isError"
|
64
64
|
>{{ unitName }}</unit-container
|
65
65
|
>
|
66
|
-
<icon-wrapper
|
66
|
+
<icon-wrapper
|
67
|
+
v-if="isError && !showLinearUnitName"
|
68
|
+
size="16px"
|
69
|
+
:marginRight="showSelect ? selectWidth : 0"
|
70
|
+
>
|
67
71
|
<icon name="warning" size="16px" cursor="default" />
|
68
72
|
</icon-wrapper>
|
73
|
+
<select-wrapper v-if="showSelect">
|
74
|
+
<divider />
|
75
|
+
<Select
|
76
|
+
:showBorder="false"
|
77
|
+
:selectWidth="`${selectWidth}px`"
|
78
|
+
@input-change="$emit('select-change', $event)"
|
79
|
+
>
|
80
|
+
<template #selector>
|
81
|
+
<select-text>{{ getSelectValue }}</select-text>
|
82
|
+
</template>
|
83
|
+
<template #dropdown>
|
84
|
+
<Option
|
85
|
+
v-for="item in selectOptions"
|
86
|
+
:key="item.value"
|
87
|
+
:value="item.value"
|
88
|
+
>
|
89
|
+
{{ item.label }}
|
90
|
+
</Option>
|
91
|
+
</template>
|
92
|
+
</Select>
|
93
|
+
</select-wrapper>
|
69
94
|
</input-wrapper>
|
70
95
|
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
71
96
|
</container>
|
@@ -107,6 +132,8 @@ import {
|
|
107
132
|
} from '../../../helpers/numberConverter'
|
108
133
|
import InfoText from '../../infoText'
|
109
134
|
import ErrorMessage from '../../errorMessage'
|
135
|
+
import Select from '../select'
|
136
|
+
import Option from '../select/option'
|
110
137
|
import warningIcon from '../../../assets/icons/error_icon.png'
|
111
138
|
import Icon from '../../icon'
|
112
139
|
|
@@ -282,16 +309,35 @@ const LabelText = styled('div', inputProps)`
|
|
282
309
|
font-weight: 700;
|
283
310
|
`
|
284
311
|
|
285
|
-
const IconAttrs = { size: String }
|
312
|
+
const IconAttrs = { size: String, marginRight: Number }
|
286
313
|
const IconWrapper = styled('div', IconAttrs)`
|
287
314
|
position: absolute;
|
288
315
|
top: 0;
|
289
316
|
bottom: 0;
|
290
317
|
margin: auto;
|
291
|
-
right:
|
318
|
+
right: ${(props) => props.marginRight + 10}px;
|
292
319
|
height: ${(props) => (props.size ? props.size : 'auto')};
|
293
320
|
`
|
294
321
|
|
322
|
+
const SelectText = styled.div`
|
323
|
+
font-size: 13px;
|
324
|
+
`
|
325
|
+
|
326
|
+
const SelectWrapper = styled.div`
|
327
|
+
position: absolute;
|
328
|
+
top: 2px;
|
329
|
+
right: 2px;
|
330
|
+
display: flex;
|
331
|
+
height: 100%;
|
332
|
+
`
|
333
|
+
|
334
|
+
const Divider = styled.div`
|
335
|
+
margin-top: 6px;
|
336
|
+
height: calc(100% - 16px);
|
337
|
+
width: 1px;
|
338
|
+
background-color: ${({ theme }) => theme.colors.grey4};
|
339
|
+
`
|
340
|
+
|
295
341
|
export default {
|
296
342
|
name: 'input-number',
|
297
343
|
components: {
|
@@ -306,7 +352,12 @@ export default {
|
|
306
352
|
InfoText,
|
307
353
|
Icon,
|
308
354
|
SlotContainer,
|
309
|
-
IconWrapper
|
355
|
+
IconWrapper,
|
356
|
+
Select,
|
357
|
+
Option,
|
358
|
+
SelectWrapper,
|
359
|
+
SelectText,
|
360
|
+
Divider
|
310
361
|
},
|
311
362
|
inheritAttrs: false,
|
312
363
|
data() {
|
@@ -450,6 +501,22 @@ export default {
|
|
450
501
|
inputDataId: {
|
451
502
|
required: false,
|
452
503
|
default: ''
|
504
|
+
},
|
505
|
+
showSelect: {
|
506
|
+
type: Boolean,
|
507
|
+
default: false
|
508
|
+
},
|
509
|
+
selectWidth: {
|
510
|
+
type: Number,
|
511
|
+
default: 70
|
512
|
+
},
|
513
|
+
selectOptions: {
|
514
|
+
type: Array,
|
515
|
+
default: () => []
|
516
|
+
},
|
517
|
+
selectValue: {
|
518
|
+
type: [String, Number],
|
519
|
+
default: null
|
453
520
|
}
|
454
521
|
},
|
455
522
|
computed: {
|
@@ -464,6 +531,13 @@ export default {
|
|
464
531
|
},
|
465
532
|
hasLabelSlot() {
|
466
533
|
return !!this.$slots.label
|
534
|
+
},
|
535
|
+
getSelectValue() {
|
536
|
+
const item = this.selectOptions.find(
|
537
|
+
({ value }) => value === this.selectValue
|
538
|
+
)
|
539
|
+
|
540
|
+
return item ? item.label : '-'
|
467
541
|
}
|
468
542
|
},
|
469
543
|
methods: {
|
@@ -22,10 +22,15 @@
|
|
22
22
|
>
|
23
23
|
</input-label>
|
24
24
|
<info-text
|
25
|
-
v-if="infoTextMessage"
|
25
|
+
v-if="infoTextMessage || !!this.$slots.infoText"
|
26
26
|
:text="infoTextMessage"
|
27
27
|
:size="infoTextSize"
|
28
|
-
|
28
|
+
:alignArrow="infoTextAlignArrow"
|
29
|
+
:width="infoTextWidth"
|
30
|
+
:max-width="infoTextWidth"
|
31
|
+
>
|
32
|
+
<slot name="infoText" />
|
33
|
+
</info-text>
|
29
34
|
</label-wrapper>
|
30
35
|
<select-button-wrapper :disabled="disabled">
|
31
36
|
<selectButton
|
@@ -531,6 +536,14 @@ export default {
|
|
531
536
|
dropdownMenuPosition: {
|
532
537
|
type: String,
|
533
538
|
default: DROPDOWN_MENU_POSITIONS.Automatic // options: ['automatic', bottom]
|
539
|
+
},
|
540
|
+
infoTextWidth: {
|
541
|
+
type: String,
|
542
|
+
required: false
|
543
|
+
},
|
544
|
+
infoTextAlignArrow: {
|
545
|
+
type: String,
|
546
|
+
required: false
|
534
547
|
}
|
535
548
|
},
|
536
549
|
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
2
|
-
<mask id="path-1-inside-1_57915_53334" fill="white">
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.0303 2.75757L0 5.30302V11.2424L3.41022 12.4091V8.96996L4.53143 9.41845V12.7926L8.0606 14V8.0606L4.0303 2.75757Z"/>
|
4
|
-
</mask>
|
5
|
-
<path d="M0 5.30302L-0.694191 4.20389L-1.3 4.5865V5.30302H0ZM4.0303 2.75757L5.06531 1.97096L4.344 1.02187L3.33611 1.65843L4.0303 2.75757ZM0 11.2424H-1.3V12.1716L-0.420794 12.4724L0 11.2424ZM3.41022 12.4091L2.98943 13.6391L4.71022 14.2278V12.4091H3.41022ZM3.41022 8.96996L3.89303 7.76294L2.11022 7.04982V8.96996H3.41022ZM4.53143 9.41845H5.83143V8.5383L5.01424 8.21143L4.53143 9.41845ZM4.53143 12.7926H3.23143V13.7219L4.11064 14.0227L4.53143 12.7926ZM8.0606 14L7.63981 15.23L9.3606 15.8187V14H8.0606ZM8.0606 8.0606H9.3606V7.62266L9.09561 7.27399L8.0606 8.0606ZM0.694191 6.40216L4.72449 3.8567L3.33611 1.65843L-0.694191 4.20389L0.694191 6.40216ZM1.3 11.2424V5.30302H-1.3V11.2424H1.3ZM3.83102 11.1791L0.420794 10.0124L-0.420794 12.4724L2.98943 13.6391L3.83102 11.1791ZM4.71022 12.4091V8.96996H2.11022V12.4091H4.71022ZM2.92741 10.177L4.04862 10.6255L5.01424 8.21143L3.89303 7.76294L2.92741 10.177ZM3.23143 9.41845V12.7926H5.83143V9.41845H3.23143ZM8.48139 12.77L4.95223 11.5626L4.11064 14.0227L7.63981 15.23L8.48139 12.77ZM6.7606 8.0606V14H9.3606V8.0606H6.7606ZM2.99529 3.54418L7.02559 8.8472L9.09561 7.27399L5.06531 1.97096L2.99529 3.54418Z" fill="#0068DE" mask="url(#path-1-inside-1_57915_53334)"/>
|
6
|
-
<path d="M8.55859 13.2165V8.37967L13.498 6.08638V10.9232L8.55859 13.2165Z" fill="#0068DE" stroke="#0068DE"/>
|
7
|
-
<path d="M8.21608 7.43759L4.80515 2.94953L9.81611 0.623007L13.227 5.11107L8.21608 7.43759Z" fill="#0068DE" stroke="#0068DE"/>
|
8
|
-
</svg>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16" fill="none">
|
2
|
-
<mask id="path-1-inside-1_57915_3657" fill="white">
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.03081 3.71851L0 6.28736V12.2814L3.41065 13.4587V9.98801L4.532 10.4406V13.8458L8.06161 15.0643V9.07028L4.03081 3.71851Z"/>
|
4
|
-
</mask>
|
5
|
-
<path d="M0 6.28736L-0.698673 5.19107L-1.3 5.5743V6.28736H0ZM4.03081 3.71851L5.06922 2.9364L4.34595 1.9761L3.33213 2.62221L4.03081 3.71851ZM0 12.2814H-1.3V13.2079L-0.424205 13.5102L0 12.2814ZM3.41065 13.4587L2.98645 14.6876L4.71065 15.2828V13.4587H3.41065ZM3.41065 9.98801L3.89722 8.78251L2.11065 8.0614V9.98801H3.41065ZM4.532 10.4406H5.832V9.56343L5.01858 9.23511L4.532 10.4406ZM4.532 13.8458H3.232V14.7723L4.1078 15.0747L4.532 13.8458ZM8.06161 15.0643L7.63741 16.2931L9.36161 16.8883V15.0643H8.06161ZM8.06161 9.07028H9.36161V8.63549L9.10003 8.28818L8.06161 9.07028ZM0.698673 7.38365L4.72948 4.8148L3.33213 2.62221L-0.698673 5.19107L0.698673 7.38365ZM1.3 12.2814V6.28736H-1.3V12.2814H1.3ZM3.83485 12.2299L0.424205 11.0525L-0.424205 13.5102L2.98645 14.6876L3.83485 12.2299ZM4.71065 13.4587V9.98801H2.11065V13.4587H4.71065ZM2.92408 11.1935L4.04543 11.6461L5.01858 9.23511L3.89722 8.78251L2.92408 11.1935ZM3.232 10.4406V13.8458H5.832V10.4406H3.232ZM8.48582 13.8354L4.95621 12.617L4.1078 15.0747L7.63741 16.2931L8.48582 13.8354ZM6.76161 9.07028V15.0643H9.36161V9.07028H6.76161ZM2.99239 4.50061L7.0232 9.85239L9.10003 8.28818L5.06922 2.9364L2.99239 4.50061Z" fill="white" mask="url(#path-1-inside-1_57915_3657)"/>
|
6
|
-
<path d="M8.5625 14.2779V9.38818L13.5026 7.07375V11.9634L8.5625 14.2779Z" fill="white" stroke="white"/>
|
7
|
-
<path d="M8.21735 8.44534L4.80134 3.90984L9.81609 1.56045L13.2321 6.09596L8.21735 8.44534Z" fill="white" stroke="white"/>
|
8
|
-
</svg>
|