@eturnity/eturnity_reusable_components 8.16.9-EPDM-11600.8 → 8.16.9-EPDM-14690.5
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/TestChart.vue +229 -0
- package/src/assets/svgIcons/erase.svg +3 -2
- package/src/assets/theme.js +1 -1
- package/src/components/barchart/BottomFields.vue +125 -37
- package/src/components/barchart/composables/useAxisCalculations.js +1 -1
- package/src/components/barchart/composables/useChartData.js +1 -1
- package/src/components/barchart/composables/useTooltip.js +28 -3
- package/src/components/barchart/index.vue +54 -16
- package/src/components/barchart/styles/bottomFields.js +18 -4
- package/src/components/barchart/styles/chart.js +15 -12
- package/src/components/errorMessage/index.vue +1 -1
- package/src/components/infoCard/index.vue +18 -10
- package/src/components/infoCard/infoCard.spec.js +3 -3
- package/src/components/infoText/index.vue +36 -31
- package/src/components/inputs/inputNumber/InputNumber.stories.js +5 -19
- package/src/components/inputs/inputNumber/index.vue +74 -57
- package/src/components/pageSubtitle/index.vue +1 -7
- package/src/components/pageTitle/index.vue +3 -4
@@ -30,45 +30,55 @@
|
|
30
30
|
/>
|
31
31
|
</LabelWrapper>
|
32
32
|
<InputWrapper>
|
33
|
-
<
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
33
|
+
<InfoText info-position="bottom" :text="inputInfoText">
|
34
|
+
<template #trigger>
|
35
|
+
<InputContainer
|
36
|
+
v-bind="$attrs"
|
37
|
+
ref="inputField1"
|
38
|
+
:align-items="alignItems"
|
39
|
+
:background-color="
|
40
|
+
colorMode === 'transparent' ? 'transparent' : backgroundColor
|
41
|
+
"
|
42
|
+
:border-color="
|
43
|
+
colorMode === 'transparent' && !borderColor
|
44
|
+
? 'white'
|
45
|
+
: borderColor
|
46
|
+
"
|
47
|
+
:color-mode="colorMode"
|
48
|
+
:data-id="inputDataId"
|
49
|
+
:data-qa-id="dataQaId"
|
50
|
+
:disabled="disabled"
|
51
|
+
:font-color="colorMode === 'transparent' ? 'white' : fontColor"
|
52
|
+
:font-size="fontSize"
|
53
|
+
:has-label-slot="hasLabelSlot"
|
54
|
+
:has-slot="hasSlot"
|
55
|
+
:has-unit="unitName && !!unitName.length"
|
56
|
+
:input-height="inputHeight"
|
57
|
+
:is-border-error-only="isBorderErrorOnly"
|
58
|
+
:is-disabled="disabled"
|
59
|
+
:is-error="isError"
|
60
|
+
:is-info-border="isInfoBorder"
|
61
|
+
:is-interactive="isInteractive"
|
62
|
+
:min-width="minWidth"
|
63
|
+
:no-border="noBorder"
|
64
|
+
:placeholder="displayedPlaceholder"
|
65
|
+
:read-only="isReadOnly"
|
66
|
+
:readonly="isReadOnly"
|
67
|
+
:show-arrow-controls="showArrowControls"
|
68
|
+
:show-linear-unit-name="showLinearUnitName"
|
69
|
+
:slot-size="slotSize"
|
70
|
+
:text-align="textAlign"
|
71
|
+
:value="formatWithCurrency(value)"
|
72
|
+
@blur="onInputBlur($event)"
|
73
|
+
@focus="focusInput()"
|
74
|
+
@input="onInput($event)"
|
75
|
+
@keydown.down="decrementValue"
|
76
|
+
@keydown.up="incrementValue"
|
77
|
+
@keyup.enter="onEnterPress"
|
78
|
+
/>
|
79
|
+
</template>
|
80
|
+
</InfoText>
|
81
|
+
|
72
82
|
<SlotContainer v-if="hasSlot" :is-error="isError" :slot-size="slotSize">
|
73
83
|
<slot></slot>
|
74
84
|
</SlotContainer>
|
@@ -80,7 +90,7 @@
|
|
80
90
|
>{{ unitName }}</UnitContainer
|
81
91
|
>
|
82
92
|
<IconWrapper
|
83
|
-
v-if="isError && !showLinearUnitName"
|
93
|
+
v-if="isError && !showLinearUnitName && !isBorderErrorOnly"
|
84
94
|
:margin-right="showSelect ? selectWidth : 0"
|
85
95
|
size="16px"
|
86
96
|
>
|
@@ -134,7 +144,9 @@
|
|
134
144
|
</ArrowButton>
|
135
145
|
</ArrowControls>
|
136
146
|
</InputWrapper>
|
137
|
-
<ErrorMessage v-if="isError && errorMessage">{{
|
147
|
+
<ErrorMessage v-if="isError && errorMessage">{{
|
148
|
+
errorMessage
|
149
|
+
}}</ErrorMessage>
|
138
150
|
</Container>
|
139
151
|
</template>
|
140
152
|
|
@@ -197,7 +209,6 @@
|
|
197
209
|
slotSize: String,
|
198
210
|
inputHeight: String,
|
199
211
|
isInteractive: Boolean,
|
200
|
-
isPreDefined: Boolean,
|
201
212
|
alignItems: String,
|
202
213
|
labelFontColor: String,
|
203
214
|
labelFontWeight: String,
|
@@ -206,6 +217,8 @@
|
|
206
217
|
colorMode: String,
|
207
218
|
showArrowControls: Boolean,
|
208
219
|
readOnly: Boolean,
|
220
|
+
isBorderErrorOnly: Boolean,
|
221
|
+
isInfoBorder: Boolean,
|
209
222
|
}
|
210
223
|
|
211
224
|
const Container = styled('div', inputProps)`
|
@@ -218,7 +231,9 @@
|
|
218
231
|
|
219
232
|
const InputContainer = styled('input', inputProps)`
|
220
233
|
border: ${(props) =>
|
221
|
-
props.
|
234
|
+
props.isInfoBorder
|
235
|
+
? '1px solid ' + props.theme.semanticColors.blue[500]
|
236
|
+
: props.isError
|
222
237
|
? '1px solid ' + props.theme.colors.red
|
223
238
|
: props.noBorder
|
224
239
|
? 'none'
|
@@ -237,16 +252,17 @@
|
|
237
252
|
showLinearUnitName,
|
238
253
|
colorMode,
|
239
254
|
showArrowControls,
|
255
|
+
isBorderErrorOnly,
|
240
256
|
}) =>
|
241
257
|
showArrowControls
|
242
258
|
? '40px'
|
243
259
|
: colorMode === 'transparent'
|
244
260
|
? '0'
|
245
261
|
: slotSize
|
246
|
-
? isError && !showLinearUnitName
|
262
|
+
? isError && !showLinearUnitName && !isBorderErrorOnly
|
247
263
|
? 'calc(' + slotSize + ' + 24px)'
|
248
264
|
: 'calc(' + slotSize + ' + 10px)'
|
249
|
-
: isError && !showLinearUnitName
|
265
|
+
: isError && !showLinearUnitName && !isBorderErrorOnly
|
250
266
|
? '24px'
|
251
267
|
: '5px'};
|
252
268
|
border-radius: ${(props) =>
|
@@ -260,7 +276,7 @@
|
|
260
276
|
color: ${(props) =>
|
261
277
|
props.isError
|
262
278
|
? props.theme.colors.grey6
|
263
|
-
: props.isDisabled
|
279
|
+
: props.isDisabled
|
264
280
|
? props.colorMode === 'transparent'
|
265
281
|
? props.theme.colors.white
|
266
282
|
: props.theme.colors.grey2
|
@@ -538,11 +554,6 @@
|
|
538
554
|
required: false,
|
539
555
|
default: 0,
|
540
556
|
},
|
541
|
-
isPreDefined: {
|
542
|
-
type: Boolean,
|
543
|
-
required: false,
|
544
|
-
default: false,
|
545
|
-
},
|
546
557
|
minDecimals: {
|
547
558
|
type: Number,
|
548
559
|
required: false,
|
@@ -663,18 +674,12 @@
|
|
663
674
|
required: false,
|
664
675
|
default: '',
|
665
676
|
},
|
666
|
-
labelDataTestId: {
|
667
|
-
type: String,
|
668
|
-
required: false,
|
669
|
-
default: '',
|
670
|
-
},
|
671
677
|
inputDataId: {
|
672
678
|
type: String,
|
673
679
|
required: false,
|
674
680
|
default: '',
|
675
681
|
},
|
676
682
|
dataQaId: {
|
677
|
-
type: String,
|
678
683
|
required: false,
|
679
684
|
default: '',
|
680
685
|
},
|
@@ -710,6 +715,18 @@
|
|
710
715
|
type: Boolean,
|
711
716
|
default: false,
|
712
717
|
},
|
718
|
+
isBorderErrorOnly: {
|
719
|
+
type: Boolean,
|
720
|
+
default: false,
|
721
|
+
},
|
722
|
+
isInfoBorder: {
|
723
|
+
type: Boolean,
|
724
|
+
default: false,
|
725
|
+
},
|
726
|
+
inputInfoText: {
|
727
|
+
type: String,
|
728
|
+
default: '',
|
729
|
+
},
|
713
730
|
},
|
714
731
|
data() {
|
715
732
|
return {
|
@@ -5,8 +5,7 @@
|
|
5
5
|
:has-info-text="!!infoText"
|
6
6
|
:margin-bottom="marginBottom"
|
7
7
|
>
|
8
|
-
<span
|
9
|
-
<span v-else data-test-id="page_subtitle_text">
|
8
|
+
<span data-test-id="page_subtitle_text">
|
10
9
|
{{ text }}
|
11
10
|
</span>
|
12
11
|
<InfoText
|
@@ -59,11 +58,6 @@
|
|
59
58
|
required: true,
|
60
59
|
type: String,
|
61
60
|
},
|
62
|
-
containsHtml: {
|
63
|
-
required: false,
|
64
|
-
type: Boolean,
|
65
|
-
default: false,
|
66
|
-
},
|
67
61
|
color: {
|
68
62
|
required: false,
|
69
63
|
type: String,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<template>
|
2
2
|
<TitleWrap data-test-id="page_wrapper" :has-info-text="!!infoText">
|
3
3
|
<TitleText
|
4
|
-
data-test-id="page_title_text"
|
5
4
|
:color="color"
|
5
|
+
data-test-id="page_title_text"
|
6
6
|
:font-size="fontSize"
|
7
7
|
:uppercase="uppercase"
|
8
8
|
>
|
@@ -10,8 +10,8 @@
|
|
10
10
|
</TitleText>
|
11
11
|
<InfoText
|
12
12
|
v-if="!!infoText"
|
13
|
-
data-test-id="page_title_tooltip"
|
14
13
|
:align-arrow="infoAlign"
|
14
|
+
data-test-id="page_title_tooltip"
|
15
15
|
:text="infoText"
|
16
16
|
/>
|
17
17
|
</TitleWrap>
|
@@ -44,9 +44,8 @@
|
|
44
44
|
const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
45
45
|
const TitleText = styled('span', titleAttrs)`
|
46
46
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
47
|
-
font-weight:
|
47
|
+
font-weight: 500;
|
48
48
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '20px')};
|
49
|
-
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
50
49
|
`
|
51
50
|
|
52
51
|
export default {
|