@eturnity/eturnity_reusable_components 1.1.40 → 1.1.43
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
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<container>
|
|
3
3
|
<input-wrapper
|
|
4
|
-
:alignItems="alignItems"
|
|
5
4
|
:hasLabel="!!label && label.length > 0"
|
|
5
|
+
:alignItems="alignItems"
|
|
6
6
|
>
|
|
7
7
|
<label-wrapper v-if="label">
|
|
8
|
-
<input-label>{{ label }}</input-label>
|
|
8
|
+
<input-label :fontSize="fontSize">{{ label }}</input-label>
|
|
9
9
|
<info-text
|
|
10
10
|
v-if="infoTextMessage"
|
|
11
11
|
:text="infoTextMessage"
|
|
12
12
|
borderColor="#ccc"
|
|
13
|
-
size="16"
|
|
13
|
+
:size="fontSize ? fontSize : '16'"
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-wrapper>
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
:noBorder="noBorder"
|
|
25
25
|
:disabled="disabled"
|
|
26
26
|
:isDisabled="disabled"
|
|
27
|
+
:fontSize="fontSize"
|
|
27
28
|
/>
|
|
28
29
|
</input-wrapper>
|
|
29
30
|
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
|
@@ -39,8 +40,10 @@ const Container = styled.div`
|
|
|
39
40
|
position: relative;
|
|
40
41
|
`
|
|
41
42
|
|
|
42
|
-
const
|
|
43
|
+
const labelAttrs = { fontSize: String }
|
|
44
|
+
const InputLabel = styled("div", labelAttrs)`
|
|
43
45
|
font-weight: bold;
|
|
46
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : "16px")};
|
|
44
47
|
`
|
|
45
48
|
|
|
46
49
|
const LabelWrapper = styled.div`
|
|
@@ -48,7 +51,6 @@ const LabelWrapper = styled.div`
|
|
|
48
51
|
grid-template-columns: auto 1fr;
|
|
49
52
|
grid-gap: 12px;
|
|
50
53
|
align-items: center;
|
|
51
|
-
margin-bottom: 12px;
|
|
52
54
|
`
|
|
53
55
|
|
|
54
56
|
const inputProps = {
|
|
@@ -57,6 +59,7 @@ const inputProps = {
|
|
|
57
59
|
minWidth: String,
|
|
58
60
|
noBorder: Boolean,
|
|
59
61
|
isDisabled: Boolean,
|
|
62
|
+
fontSize: String,
|
|
60
63
|
}
|
|
61
64
|
const InputContainer = styled("input", inputProps)`
|
|
62
65
|
border: ${(props) =>
|
|
@@ -70,7 +73,7 @@ const InputContainer = styled("input", inputProps)`
|
|
|
70
73
|
padding: ${(props) =>
|
|
71
74
|
props.hasUnit ? "11px 40px 11px 10px" : "11px 5px 11px 10px"};
|
|
72
75
|
border-radius: 4px;
|
|
73
|
-
font-size: 16px;
|
|
76
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : "16px")};
|
|
74
77
|
color: ${(props) =>
|
|
75
78
|
props.isError ? props.theme.colors.red : props.theme.colors.black};
|
|
76
79
|
width: ${(props) => (props.inputWidth ? props.inputWidth : "100%")};
|
|
@@ -123,6 +126,7 @@ export default {
|
|
|
123
126
|
// alignItems="horizontal" // horizontal, vertical
|
|
124
127
|
// inputWidth="250px"
|
|
125
128
|
// minWidth="100px"
|
|
129
|
+
// fontSize="13px"
|
|
126
130
|
// />
|
|
127
131
|
name: "input-text",
|
|
128
132
|
components: {
|
|
@@ -180,6 +184,10 @@ export default {
|
|
|
180
184
|
required: false,
|
|
181
185
|
default: false,
|
|
182
186
|
},
|
|
187
|
+
fontSize: {
|
|
188
|
+
required: false,
|
|
189
|
+
default: null,
|
|
190
|
+
},
|
|
183
191
|
},
|
|
184
192
|
methods: {
|
|
185
193
|
onChangeHandler($event) {
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
<span>
|
|
4
4
|
{{ text }}
|
|
5
5
|
</span>
|
|
6
|
-
<info-text
|
|
6
|
+
<info-text
|
|
7
|
+
:text="infoText"
|
|
8
|
+
v-if="!!infoText"
|
|
9
|
+
size="14"
|
|
10
|
+
borderColor="#ccc"
|
|
11
|
+
/>
|
|
7
12
|
</subtitle-text>
|
|
8
13
|
</template>
|
|
9
14
|
|
|
@@ -21,6 +26,7 @@ import InfoText from "../infoText"
|
|
|
21
26
|
const textAttrs = { color: String, hasInfoText: Boolean }
|
|
22
27
|
const SubtitleText = styled("div", textAttrs)`
|
|
23
28
|
display: grid;
|
|
29
|
+
align-items: center;
|
|
24
30
|
grid-gap: 12px;
|
|
25
31
|
grid-template-columns: ${(props) =>
|
|
26
32
|
props.hasInfoText ? "auto auto 1fr" : "1fr"};
|