@eturnity/eturnity_reusable_components 7.22.3-EPDM-10647.0 → 7.22.4--EPDM-10563.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/components/icon/index.vue +3 -2
- package/src/components/infoText/index.vue +1 -6
- package/src/components/inputs/checkbox/index.vue +1 -1
- package/src/components/inputs/inputNumber/index.vue +4 -78
- package/src/components/inputs/select/index.vue +18 -23
- package/src/components/pageTitle/index.vue +1 -1
package/package.json
CHANGED
@@ -107,8 +107,9 @@ const IconImage = styled('div', {
|
|
107
107
|
svg path {
|
108
108
|
${({ theme, color }) => color && `fill: ${theme.colors[color] || color};`}
|
109
109
|
}
|
110
|
-
&:hover
|
111
|
-
${(
|
110
|
+
&:hover svg path {
|
111
|
+
${({ theme, hoveredColor }) =>
|
112
|
+
hoveredColor && `fill: ${theme.colors[hoveredColor] || hoveredColor};`}
|
112
113
|
}
|
113
114
|
&:hover + div {
|
114
115
|
background-color: ${(props) => props.hoveredColor};
|
@@ -14,7 +14,6 @@
|
|
14
14
|
:halfComputedTextInfoWidth="halfComputedTextInfoWidth"
|
15
15
|
:alignArrow="alignArrow"
|
16
16
|
:iconSize="size"
|
17
|
-
:maxWidth="maxWidth"
|
18
17
|
><slot />
|
19
18
|
<span v-html="text"></span>
|
20
19
|
</text-overlay>
|
@@ -53,7 +52,7 @@ const TextOverlay = styled('div', textAttrs)`
|
|
53
52
|
background: ${(props) => props.theme.colors.black};
|
54
53
|
padding: 10px;
|
55
54
|
width: ${(props) => props.width};
|
56
|
-
max-width:
|
55
|
+
max-width: 400px;
|
57
56
|
font-size: 13px;
|
58
57
|
font-weight: 400;
|
59
58
|
line-height: normal;
|
@@ -125,10 +124,6 @@ export default {
|
|
125
124
|
width: {
|
126
125
|
required: false,
|
127
126
|
default: '165px'
|
128
|
-
},
|
129
|
-
maxWidth: {
|
130
|
-
type: String,
|
131
|
-
default: '400px'
|
132
127
|
}
|
133
128
|
},
|
134
129
|
methods: {
|
@@ -63,34 +63,9 @@
|
|
63
63
|
:isError="isError"
|
64
64
|
>{{ unitName }}</unit-container
|
65
65
|
>
|
66
|
-
<icon-wrapper
|
67
|
-
v-if="isError && !showLinearUnitName"
|
68
|
-
size="16px"
|
69
|
-
:marginRight="showSelect ? selectWidth : 0"
|
70
|
-
>
|
66
|
+
<icon-wrapper v-if="isError && !showLinearUnitName" size="16px">
|
71
67
|
<icon name="warning" size="16px" cursor="default" />
|
72
68
|
</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>
|
94
69
|
</input-wrapper>
|
95
70
|
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
96
71
|
</container>
|
@@ -132,8 +107,6 @@ import {
|
|
132
107
|
} from '../../../helpers/numberConverter'
|
133
108
|
import InfoText from '../../infoText'
|
134
109
|
import ErrorMessage from '../../errorMessage'
|
135
|
-
import Select from '../select'
|
136
|
-
import Option from '../select/option'
|
137
110
|
import warningIcon from '../../../assets/icons/error_icon.png'
|
138
111
|
import Icon from '../../icon'
|
139
112
|
|
@@ -309,35 +282,16 @@ const LabelText = styled('div', inputProps)`
|
|
309
282
|
font-weight: 700;
|
310
283
|
`
|
311
284
|
|
312
|
-
const IconAttrs = { size: String
|
285
|
+
const IconAttrs = { size: String }
|
313
286
|
const IconWrapper = styled('div', IconAttrs)`
|
314
287
|
position: absolute;
|
315
288
|
top: 0;
|
316
289
|
bottom: 0;
|
317
290
|
margin: auto;
|
318
|
-
right:
|
291
|
+
right: 5px;
|
319
292
|
height: ${(props) => (props.size ? props.size : 'auto')};
|
320
293
|
`
|
321
294
|
|
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
|
-
|
341
295
|
export default {
|
342
296
|
name: 'input-number',
|
343
297
|
components: {
|
@@ -352,12 +306,7 @@ export default {
|
|
352
306
|
InfoText,
|
353
307
|
Icon,
|
354
308
|
SlotContainer,
|
355
|
-
IconWrapper
|
356
|
-
Select,
|
357
|
-
Option,
|
358
|
-
SelectWrapper,
|
359
|
-
SelectText,
|
360
|
-
Divider
|
309
|
+
IconWrapper
|
361
310
|
},
|
362
311
|
inheritAttrs: false,
|
363
312
|
data() {
|
@@ -501,22 +450,6 @@ export default {
|
|
501
450
|
inputDataId: {
|
502
451
|
required: false,
|
503
452
|
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
|
520
453
|
}
|
521
454
|
},
|
522
455
|
computed: {
|
@@ -531,13 +464,6 @@ export default {
|
|
531
464
|
},
|
532
465
|
hasLabelSlot() {
|
533
466
|
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 : '-'
|
541
467
|
}
|
542
468
|
},
|
543
469
|
methods: {
|
@@ -10,7 +10,11 @@
|
|
10
10
|
:alignItems="alignItems"
|
11
11
|
:noRelative="noRelative"
|
12
12
|
>
|
13
|
-
<label-wrapper
|
13
|
+
<label-wrapper
|
14
|
+
v-if="label"
|
15
|
+
:data-id="labelDataId"
|
16
|
+
:infoTextMessage="!!infoTextMessage"
|
17
|
+
>
|
14
18
|
<input-label
|
15
19
|
:fontColor="
|
16
20
|
labelFontColor || colorMode == 'dark' ? 'white' : 'eturnityGrey'
|
@@ -22,15 +26,10 @@
|
|
22
26
|
>
|
23
27
|
</input-label>
|
24
28
|
<info-text
|
25
|
-
v-if="infoTextMessage
|
29
|
+
v-if="infoTextMessage"
|
26
30
|
:text="infoTextMessage"
|
27
31
|
:size="infoTextSize"
|
28
|
-
|
29
|
-
:width="infoTextWidth"
|
30
|
-
:max-width="infoTextWidth"
|
31
|
-
>
|
32
|
-
<slot name="infoText" />
|
33
|
-
</info-text>
|
32
|
+
/>
|
34
33
|
</label-wrapper>
|
35
34
|
<select-button-wrapper :disabled="disabled">
|
36
35
|
<selectButton
|
@@ -48,7 +47,7 @@
|
|
48
47
|
buttonFontColor || colorMode == 'dark' ? 'white' : 'black'
|
49
48
|
"
|
50
49
|
:hasError="hasError"
|
51
|
-
:hasNoPadding="
|
50
|
+
:hasNoPadding="hasNoPadding"
|
52
51
|
:disabled="disabled"
|
53
52
|
@keydown="onKeyDown"
|
54
53
|
:showBorder="showBorder"
|
@@ -155,7 +154,7 @@
|
|
155
154
|
// alignItems="vertical"
|
156
155
|
// label-data-id="test-label-data-id"
|
157
156
|
// data-id="test-data-id"
|
158
|
-
// :
|
157
|
+
// :hasNoPadding="true"
|
159
158
|
// >
|
160
159
|
// <template #selector="{selectedValue}">
|
161
160
|
// value selected: {{selectedValue}}
|
@@ -233,9 +232,12 @@ const Container = styled('div', inputProps)`
|
|
233
232
|
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
234
233
|
display: inline-block;
|
235
234
|
`
|
236
|
-
|
235
|
+
|
236
|
+
const LabelWrapperAttrs = { infoTextMessage: Boolean }
|
237
|
+
const LabelWrapper = styled('div', LabelWrapperAttrs)`
|
237
238
|
display: inline-grid;
|
238
|
-
grid-template-columns:
|
239
|
+
grid-template-columns: ${(props) =>
|
240
|
+
props.infoTextMessage ? 'auto auto' : 'auto'};
|
239
241
|
grid-gap: 12px;
|
240
242
|
align-items: center;
|
241
243
|
justify-content: start;
|
@@ -514,10 +516,6 @@ export default {
|
|
514
516
|
type: String,
|
515
517
|
default: ''
|
516
518
|
},
|
517
|
-
hasSelectButtonPadding: {
|
518
|
-
type: Boolean,
|
519
|
-
default: true
|
520
|
-
},
|
521
519
|
isDraggable: {
|
522
520
|
type: Boolean,
|
523
521
|
default: false
|
@@ -537,13 +535,10 @@ export default {
|
|
537
535
|
type: String,
|
538
536
|
default: DROPDOWN_MENU_POSITIONS.Automatic // options: ['automatic', bottom]
|
539
537
|
},
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
infoTextAlignArrow: {
|
545
|
-
type: String,
|
546
|
-
required: false
|
538
|
+
hasNoPadding: {
|
539
|
+
required: false,
|
540
|
+
default: false,
|
541
|
+
type: Boolean
|
547
542
|
}
|
548
543
|
},
|
549
544
|
|
@@ -31,7 +31,7 @@ const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
|
31
31
|
const TitleText = styled('span', titleAttrs)`
|
32
32
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
33
33
|
font-weight: bold;
|
34
|
-
font-size: ${(props) => (props.fontSize ? props.fontSize : '
|
34
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : '20px')};
|
35
35
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
36
36
|
`
|
37
37
|
|