@eturnity/eturnity_reusable_components 1.2.19-EPDM-5310.14 → 1.2.19-EPDM-5295.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component-wrapper :layout="layout">
|
|
3
3
|
<radio-wrapper v-for="(item, index) in options" :key="item.value">
|
|
4
|
-
<label-container :size="size" :isDisabled="item.disabled"
|
|
4
|
+
<label-container :size="size" :isDisabled="item.disabled">
|
|
5
5
|
<radio
|
|
6
6
|
type="radio"
|
|
7
7
|
:value="selectedOption"
|
|
@@ -76,6 +76,14 @@ const Radio = styled.input`
|
|
|
76
76
|
cursor: pointer;
|
|
77
77
|
height: 0;
|
|
78
78
|
width: 0;
|
|
79
|
+
|
|
80
|
+
&:checked ~ .checkmark {
|
|
81
|
+
background-color: white;
|
|
82
|
+
|
|
83
|
+
&:after {
|
|
84
|
+
display: block;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
79
87
|
`
|
|
80
88
|
|
|
81
89
|
const RadioWrapper = styled.div`
|
|
@@ -83,22 +91,22 @@ const RadioWrapper = styled.div`
|
|
|
83
91
|
grid-gap: 10px;
|
|
84
92
|
`
|
|
85
93
|
|
|
86
|
-
const containerProps = { size: String, isDisabled: Boolean
|
|
94
|
+
const containerProps = { size: String, isDisabled: Boolean }
|
|
87
95
|
const LabelContainer = styled("label", containerProps)`
|
|
88
96
|
display: grid;
|
|
89
97
|
grid-template-columns: auto 1fr auto;
|
|
90
98
|
grid-gap: 15px;
|
|
91
99
|
align-items: center;
|
|
92
100
|
color: ${(props) =>
|
|
93
|
-
props.isDisabled ? props.theme.colors.
|
|
101
|
+
props.isDisabled ? props.theme.colors.disabled : props.theme.colors.black};
|
|
94
102
|
position: relative;
|
|
95
103
|
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
|
96
104
|
font-size: ${(props) =>
|
|
97
105
|
props.size === "large"
|
|
98
106
|
? "16px"
|
|
99
107
|
: props.size === "medium"
|
|
100
|
-
|
|
101
|
-
|
|
108
|
+
? "13px"
|
|
109
|
+
: "10px"};
|
|
102
110
|
user-select: none;
|
|
103
111
|
flex: auto;
|
|
104
112
|
align-self: baseline;
|
|
@@ -108,14 +116,14 @@ const LabelContainer = styled("label", containerProps)`
|
|
|
108
116
|
props.size === "large"
|
|
109
117
|
? "23px"
|
|
110
118
|
: props.size === "medium"
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
? "16px"
|
|
120
|
+
: "12px"};
|
|
113
121
|
width: ${(props) =>
|
|
114
122
|
props.size === "large"
|
|
115
123
|
? "23px"
|
|
116
124
|
: props.size === "medium"
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
? "16px"
|
|
126
|
+
: "12px"};
|
|
119
127
|
background-color: #fff;
|
|
120
128
|
border-radius: 100%;
|
|
121
129
|
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
|
@@ -125,29 +133,32 @@ const LabelContainer = styled("label", containerProps)`
|
|
|
125
133
|
|
|
126
134
|
&:after {
|
|
127
135
|
content: "";
|
|
128
|
-
display:
|
|
129
|
-
width: ${(props) =>
|
|
130
|
-
props.size === "large"
|
|
131
|
-
? "10px"
|
|
132
|
-
: props.size === "medium"
|
|
133
|
-
? "8px"
|
|
134
|
-
: "6px"};
|
|
135
|
-
height: ${(props) =>
|
|
136
|
-
props.size === "large"
|
|
137
|
-
? "10px"
|
|
138
|
-
: props.size === "medium"
|
|
139
|
-
? "8px"
|
|
140
|
-
: "6px"};
|
|
141
|
-
border-radius: 100%;
|
|
142
|
-
background: ${(props) => props.theme.colors.primary};
|
|
136
|
+
display: none;
|
|
143
137
|
}
|
|
144
138
|
}
|
|
139
|
+
|
|
140
|
+
.checkmark:after {
|
|
141
|
+
width: ${(props) =>
|
|
142
|
+
props.size === "large"
|
|
143
|
+
? "10px"
|
|
144
|
+
: props.size === "medium"
|
|
145
|
+
? "8px"
|
|
146
|
+
: "6px"};
|
|
147
|
+
height: ${(props) =>
|
|
148
|
+
props.size === "large"
|
|
149
|
+
? "10px"
|
|
150
|
+
: props.size === "medium"
|
|
151
|
+
? "8px"
|
|
152
|
+
: "6px"};
|
|
153
|
+
border-radius: 100%;
|
|
154
|
+
background: ${(props) => props.theme.colors.primary};
|
|
155
|
+
}
|
|
145
156
|
`
|
|
146
157
|
|
|
147
158
|
const textAttrs = { isDisabled: Boolean }
|
|
148
159
|
const LabelText = styled("div", textAttrs)`
|
|
149
160
|
color: ${(props) =>
|
|
150
|
-
props.isDisabled ? props.theme.colors.
|
|
161
|
+
props.isDisabled ? props.theme.colors.disabled : props.theme.colors.black};
|
|
151
162
|
`
|
|
152
163
|
|
|
153
164
|
const RadioImage = styled.img`
|
|
@@ -217,15 +228,11 @@ export default {
|
|
|
217
228
|
required: false,
|
|
218
229
|
default: "medium", // small, medium, large
|
|
219
230
|
},
|
|
220
|
-
name: {
|
|
221
|
-
required: false,
|
|
222
|
-
default: ''
|
|
223
|
-
}
|
|
224
231
|
},
|
|
225
232
|
data() {
|
|
226
233
|
return {
|
|
234
|
+
radioName: "",
|
|
227
235
|
selectedImage: null,
|
|
228
|
-
radioName: ''
|
|
229
236
|
}
|
|
230
237
|
},
|
|
231
238
|
methods: {
|
|
@@ -240,7 +247,7 @@ export default {
|
|
|
240
247
|
},
|
|
241
248
|
},
|
|
242
249
|
created() {
|
|
243
|
-
this.radioName =
|
|
250
|
+
this.radioName = Math.round(Math.random() * 10000)
|
|
244
251
|
},
|
|
245
252
|
}
|
|
246
253
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<subtitle-text :color="color" :
|
|
2
|
+
<subtitle-text :color="color" :hasInfoText="!!infoText">
|
|
3
3
|
<span>
|
|
4
4
|
{{ text }}
|
|
5
5
|
</span>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import styled from "vue-styled-components"
|
|
25
25
|
import InfoText from "../infoText"
|
|
26
26
|
|
|
27
|
-
const textAttrs = { color: String, hasInfoText: Boolean
|
|
27
|
+
const textAttrs = { color: String, hasInfoText: Boolean }
|
|
28
28
|
const SubtitleText = styled("div", textAttrs)`
|
|
29
29
|
display: grid;
|
|
30
30
|
align-items: center;
|
|
@@ -33,7 +33,7 @@ const SubtitleText = styled("div", textAttrs)`
|
|
|
33
33
|
props.hasInfoText ? "auto auto 1fr" : "1fr"};
|
|
34
34
|
color: ${(props) => (props.color ? props.color : props.theme.colors.gray1)};
|
|
35
35
|
font-size: 13px;
|
|
36
|
-
margin-bottom:
|
|
36
|
+
margin-bottom: 30px;
|
|
37
37
|
line-height: 1.5;
|
|
38
38
|
position: relative;
|
|
39
39
|
`
|
|
@@ -59,10 +59,6 @@ export default {
|
|
|
59
59
|
required: false,
|
|
60
60
|
default: "left",
|
|
61
61
|
},
|
|
62
|
-
marginBottom: {
|
|
63
|
-
required: false,
|
|
64
|
-
default: "30px",
|
|
65
|
-
}
|
|
66
62
|
},
|
|
67
63
|
}
|
|
68
64
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<title-text :color="color"
|
|
2
|
+
<title-text :color="color">{{ text }}</title-text>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
// />
|
|
12
12
|
import styled from "vue-styled-components"
|
|
13
13
|
|
|
14
|
-
const textAttrs = { color: String
|
|
14
|
+
const textAttrs = { color: String }
|
|
15
15
|
const TitleText = styled("div", textAttrs)`
|
|
16
16
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
|
17
17
|
font-weight: bold;
|
|
18
|
-
font-size:
|
|
19
|
-
text-transform:
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
text-transform: uppercase;
|
|
20
20
|
margin-bottom: 20px;
|
|
21
21
|
`
|
|
22
22
|
|
|
@@ -32,14 +32,6 @@ export default {
|
|
|
32
32
|
color: {
|
|
33
33
|
required: false,
|
|
34
34
|
},
|
|
35
|
-
fontSize: {
|
|
36
|
-
required: false,
|
|
37
|
-
default: '16px'
|
|
38
|
-
},
|
|
39
|
-
uppercase: {
|
|
40
|
-
required: false,
|
|
41
|
-
default: true
|
|
42
|
-
}
|
|
43
35
|
},
|
|
44
36
|
}
|
|
45
37
|
</script>
|