@eturnity/eturnity_reusable_components 1.2.20-3d-master.0 → 1.2.21
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/babel.config.js +1 -1
- package/package.json +3 -2
- package/src/App.vue +53 -75
- package/src/assets/svgIcons/{duplicate-3.svg → bookmaker.svg} +0 -0
- package/src/assets/svgIcons/cross.svg +4 -0
- package/src/assets/svgIcons/obstacle_tool.svg +1 -1
- package/src/assets/svgIcons/transfer.svg +4 -0
- package/src/assets/theme.js +0 -2
- package/src/components/icon/index.vue +19 -11
- package/src/components/infoText/index.vue +53 -68
- package/src/components/inputs/inputNumber/index.vue +25 -120
- package/src/components/inputs/inputText/index.vue +10 -12
- package/src/components/inputs/radioButton/index.vue +32 -39
- package/src/components/inputs/searchInput/index.vue +2 -1
- package/src/components/inputs/textAreaInput/index.vue +2 -7
- package/src/components/inputs/toggle/index.vue +2 -2
- package/src/components/pageSubtitle/index.vue +8 -4
- package/src/components/pageTitle/index.vue +12 -4
- package/src/components/projectMarker/index.vue +285 -0
- package/src/components/tables/mainTable/index.vue +8 -3
- package/src/components/threeDots/index.vue +36 -27
- package/src/helpers/numberConverter.js +0 -4
- package/src/main.js +2 -0
- package/src/assets/icons/error_icon copy.png +0 -0
- package/src/assets/svgIcons/base_layer.svg +0 -3
- package/src/assets/svgIcons/margin_tool.svg +0 -4
- package/src/assets/svgIcons/redo.svg +0 -6
- package/src/assets/svgIcons/roof_layer.svg +0 -3
- package/src/assets/svgIcons/undo.svg +0 -6
- package/src/components/errorMessage/index.vue +0 -62
- package/src/components/iconWrapper/index.vue +0 -116
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<container
|
|
2
|
+
<container>
|
|
3
3
|
<label-wrapper v-if="labelText">
|
|
4
4
|
<label-text>
|
|
5
5
|
{{ labelText }}
|
|
@@ -8,19 +8,17 @@
|
|
|
8
8
|
v-if="labelInfoText"
|
|
9
9
|
:text="labelInfoText"
|
|
10
10
|
borderColor="#ccc"
|
|
11
|
-
size="
|
|
11
|
+
size="13"
|
|
12
12
|
:alignText="labelInfoAlign"
|
|
13
13
|
/>
|
|
14
14
|
</label-wrapper>
|
|
15
15
|
<input-wrapper>
|
|
16
16
|
<input-container
|
|
17
|
-
v-bind="$attrs"
|
|
18
17
|
ref="inputField1"
|
|
19
18
|
:hasUnit="unitName && !!unitName.length"
|
|
20
|
-
:placeholder="
|
|
19
|
+
:placeholder="placeholder"
|
|
21
20
|
:isError="isError"
|
|
22
21
|
:inputWidth="inputWidth"
|
|
23
|
-
:inputHeight="inputHeight"
|
|
24
22
|
:minWidth="minWidth"
|
|
25
23
|
:value="formatWithCurrency(value)"
|
|
26
24
|
@blur="onInputBlur($event)"
|
|
@@ -32,25 +30,13 @@
|
|
|
32
30
|
:textAlign="textAlign"
|
|
33
31
|
:fontSize="fontSize"
|
|
34
32
|
:fontColor="fontColor"
|
|
35
|
-
v-on="$listeners"
|
|
36
|
-
:hasSlot="hasSlot"
|
|
37
|
-
:slotSize="slotSize"
|
|
38
33
|
/>
|
|
39
|
-
<slot-container v-if="hasSlot" :slotSize="slotSize" :isError="isError">
|
|
40
|
-
<slot></slot>
|
|
41
|
-
</slot-container>
|
|
42
|
-
|
|
43
34
|
<unit-container
|
|
44
|
-
v-if="unitName && showLinearUnitName
|
|
35
|
+
v-if="unitName && showLinearUnitName"
|
|
45
36
|
:hasLength="!!textInput.length"
|
|
46
37
|
:isError="isError"
|
|
47
38
|
>{{ unitName }}</unit-container
|
|
48
39
|
>
|
|
49
|
-
<icon
|
|
50
|
-
v-if="(isError || inputIcon) && !showLinearUnitName"
|
|
51
|
-
:class="inputIconImageClass"
|
|
52
|
-
:src="isError ? warningIcon : inputIconImage"
|
|
53
|
-
/>
|
|
54
40
|
</input-wrapper>
|
|
55
41
|
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
|
56
42
|
</container>
|
|
@@ -88,8 +74,11 @@ import {
|
|
|
88
74
|
numberToString
|
|
89
75
|
} from '../../../helpers/numberConverter'
|
|
90
76
|
import InfoText from '../../infoText'
|
|
91
|
-
|
|
92
|
-
|
|
77
|
+
|
|
78
|
+
const Container = styled.div`
|
|
79
|
+
width: 100%;
|
|
80
|
+
position: relative;
|
|
81
|
+
`
|
|
93
82
|
|
|
94
83
|
const inputProps = {
|
|
95
84
|
isError: Boolean,
|
|
@@ -100,17 +89,8 @@ const inputProps = {
|
|
|
100
89
|
noBorder: Boolean,
|
|
101
90
|
textAlign: String,
|
|
102
91
|
fontSize: String,
|
|
103
|
-
fontColor: String
|
|
104
|
-
hasSlot: Boolean,
|
|
105
|
-
slotSize: String,
|
|
106
|
-
inputHeight:String
|
|
92
|
+
fontColor: String
|
|
107
93
|
}
|
|
108
|
-
|
|
109
|
-
const Container = styled('div', inputProps)`
|
|
110
|
-
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
111
|
-
position: relative;
|
|
112
|
-
`
|
|
113
|
-
|
|
114
94
|
const InputContainer = styled('input', inputProps)`
|
|
115
95
|
border: ${(props) =>
|
|
116
96
|
props.isError
|
|
@@ -118,15 +98,8 @@ const InputContainer = styled('input', inputProps)`
|
|
|
118
98
|
: props.noBorder
|
|
119
99
|
? 'none'
|
|
120
100
|
: '1px solid ' + props.theme.colors.mediumGray};
|
|
121
|
-
padding
|
|
122
|
-
|
|
123
|
-
padding-left: 10px;
|
|
124
|
-
padding-right: ${(props) =>
|
|
125
|
-
props.slotSize
|
|
126
|
-
? 'calc(' + props.slotSize + ' + 10px)'
|
|
127
|
-
: props.hasUnit
|
|
128
|
-
? '40px'
|
|
129
|
-
: '5px'};
|
|
101
|
+
padding: ${(props) =>
|
|
102
|
+
props.hasUnit ? '11px 40px 11px 10px' : '11px 5px 11px 10px'};
|
|
130
103
|
border-radius: 4px;
|
|
131
104
|
text-align: ${(props) => props.textAlign};
|
|
132
105
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
|
|
@@ -142,7 +115,7 @@ const InputContainer = styled('input', inputProps)`
|
|
|
142
115
|
background-color: ${(props) =>
|
|
143
116
|
props.isDisabled ? props.theme.colors.grey5 : '#fff'};
|
|
144
117
|
box-sizing: border-box;
|
|
145
|
-
|
|
118
|
+
|
|
146
119
|
&::placeholder {
|
|
147
120
|
color: ${(props) =>
|
|
148
121
|
props.isError ? props.theme.colors.red : props.theme.colors.darkGray};
|
|
@@ -152,15 +125,6 @@ const InputContainer = styled('input', inputProps)`
|
|
|
152
125
|
outline: none;
|
|
153
126
|
}
|
|
154
127
|
`
|
|
155
|
-
const IconProps = {
|
|
156
|
-
inputIconHeight: String
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const Icon = styled('img', IconProps)`
|
|
160
|
-
position: absolute;
|
|
161
|
-
right: 10px;
|
|
162
|
-
top: 2px;
|
|
163
|
-
`
|
|
164
128
|
|
|
165
129
|
const InputWrapper = styled.span`
|
|
166
130
|
position: relative;
|
|
@@ -178,7 +142,6 @@ const UnitContainer = styled('span', inputProps)`
|
|
|
178
142
|
right: 10px;
|
|
179
143
|
top: 0;
|
|
180
144
|
padding-left: 10px;
|
|
181
|
-
text-align: right;
|
|
182
145
|
color: ${(props) =>
|
|
183
146
|
props.isError
|
|
184
147
|
? props.theme.colors.red
|
|
@@ -187,27 +150,11 @@ const UnitContainer = styled('span', inputProps)`
|
|
|
187
150
|
: props.theme.colors.mediumGray};
|
|
188
151
|
`
|
|
189
152
|
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
${(props) =>
|
|
194
|
-
props.isError
|
|
195
|
-
? props.theme.colors.red
|
|
196
|
-
: props.hasLength
|
|
197
|
-
? props.theme.colors.black
|
|
198
|
-
: props.theme.colors.mediumGray};
|
|
153
|
+
const ErrorMessage = styled.div`
|
|
154
|
+
font-size: 14px;
|
|
155
|
+
color: ${(props) => props.theme.colors.red};
|
|
199
156
|
position: absolute;
|
|
200
|
-
|
|
201
|
-
props.slotSize ? 'calc(' + props.slotSize + ' - 10px)' : 'fit-content'};
|
|
202
|
-
right: 10px;
|
|
203
|
-
top: 0;
|
|
204
|
-
padding-left: 10px;
|
|
205
|
-
color: ${(props) =>
|
|
206
|
-
props.isError
|
|
207
|
-
? props.theme.colors.red
|
|
208
|
-
: props.hasLength
|
|
209
|
-
? props.theme.colors.black
|
|
210
|
-
: props.theme.colors.mediumGray};
|
|
157
|
+
top: calc(100% + 1px);
|
|
211
158
|
`
|
|
212
159
|
|
|
213
160
|
const LabelWrapper = styled.div`
|
|
@@ -231,16 +178,12 @@ export default {
|
|
|
231
178
|
ErrorMessage,
|
|
232
179
|
LabelWrapper,
|
|
233
180
|
LabelText,
|
|
234
|
-
InfoText
|
|
235
|
-
Icon,
|
|
236
|
-
SlotContainer
|
|
181
|
+
InfoText
|
|
237
182
|
},
|
|
238
|
-
inheritAttrs: false,
|
|
239
183
|
data() {
|
|
240
184
|
return {
|
|
241
185
|
textInput: '',
|
|
242
|
-
isFocused: false
|
|
243
|
-
warningIcon: warningIcon,
|
|
186
|
+
isFocused: false
|
|
244
187
|
}
|
|
245
188
|
},
|
|
246
189
|
props: {
|
|
@@ -260,10 +203,6 @@ export default {
|
|
|
260
203
|
required: false,
|
|
261
204
|
default: null
|
|
262
205
|
},
|
|
263
|
-
inputHeight:{
|
|
264
|
-
required:false,
|
|
265
|
-
default:null
|
|
266
|
-
},
|
|
267
206
|
value: {
|
|
268
207
|
required: true,
|
|
269
208
|
default: null
|
|
@@ -314,7 +253,7 @@ export default {
|
|
|
314
253
|
},
|
|
315
254
|
labelInfoAlign: {
|
|
316
255
|
required: false,
|
|
317
|
-
default: '
|
|
256
|
+
default: 'right'
|
|
318
257
|
},
|
|
319
258
|
minNumber: {
|
|
320
259
|
required: false,
|
|
@@ -327,41 +266,11 @@ export default {
|
|
|
327
266
|
numberToStringEnabled: {
|
|
328
267
|
required: false,
|
|
329
268
|
default: true
|
|
330
|
-
},
|
|
331
|
-
inputIcon: {
|
|
332
|
-
require: false,
|
|
333
|
-
type: Boolean,
|
|
334
|
-
default: false
|
|
335
|
-
},
|
|
336
|
-
inputIconImage: {
|
|
337
|
-
require: false,
|
|
338
|
-
type: String,
|
|
339
|
-
default: ''
|
|
340
|
-
},
|
|
341
|
-
inputIconImageClass: {
|
|
342
|
-
require: false,
|
|
343
|
-
type: Array,
|
|
344
|
-
default: () => []
|
|
345
|
-
},
|
|
346
|
-
slotSize: {
|
|
347
|
-
required: false
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
computed: {
|
|
351
|
-
displayedPlaceholder() {
|
|
352
|
-
if (this.placeholder) return this.placeholder
|
|
353
|
-
return `${this.minNumber || 0} ${this.unitName ? this.unitName : ''}`
|
|
354
|
-
},
|
|
355
|
-
hasSlot() {
|
|
356
|
-
return !!this.$slots.default
|
|
357
|
-
},
|
|
358
|
-
computedSlotSize() {
|
|
359
|
-
return this.slotSize || this.$slots['default'][0].elm.clientWidth
|
|
360
269
|
}
|
|
361
270
|
},
|
|
362
271
|
methods: {
|
|
363
272
|
onChangeHandler(event) {
|
|
364
|
-
if (isNaN(event)
|
|
273
|
+
if (isNaN(event)) {
|
|
365
274
|
event = this.minNumber || this.minNumber === 0 ? this.minNumber : event
|
|
366
275
|
}
|
|
367
276
|
this.$emit('input-change', event)
|
|
@@ -396,8 +305,6 @@ export default {
|
|
|
396
305
|
value: evaluated,
|
|
397
306
|
numberPrecision: this.numberPrecision
|
|
398
307
|
})
|
|
399
|
-
}else if(typeof evaluated === 'number'){
|
|
400
|
-
evaluated=evaluated.toFixed(this.numberPrecision)
|
|
401
308
|
}
|
|
402
309
|
return evaluated
|
|
403
310
|
},
|
|
@@ -414,11 +321,11 @@ export default {
|
|
|
414
321
|
})
|
|
415
322
|
}
|
|
416
323
|
let adjustedMinValue =
|
|
417
|
-
|
|
418
|
-
?
|
|
324
|
+
value && value.length
|
|
325
|
+
? value
|
|
419
326
|
: this.minNumber || this.minNumber === 0
|
|
420
327
|
? this.minNumber
|
|
421
|
-
: ''
|
|
328
|
+
: ''
|
|
422
329
|
this.$emit('input-blur', adjustedMinValue)
|
|
423
330
|
},
|
|
424
331
|
focusInput() {
|
|
@@ -429,7 +336,6 @@ export default {
|
|
|
429
336
|
this.$nextTick(() => {
|
|
430
337
|
this.$refs.inputField1.$el.select()
|
|
431
338
|
})
|
|
432
|
-
this.$emit('input-focus')
|
|
433
339
|
},
|
|
434
340
|
formatWithCurrency(value) {
|
|
435
341
|
let adjustedMinValue =
|
|
@@ -446,7 +352,6 @@ export default {
|
|
|
446
352
|
})
|
|
447
353
|
: adjustedMinValue
|
|
448
354
|
let unit = this.showLinearUnitName ? '' : this.unitName
|
|
449
|
-
//return input + ' ' + unit
|
|
450
355
|
return input + ' ' + unit
|
|
451
356
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
|
452
357
|
return ''
|
|
@@ -482,4 +387,4 @@ export default {
|
|
|
482
387
|
}
|
|
483
388
|
}
|
|
484
389
|
}
|
|
485
|
-
</script>
|
|
390
|
+
</script>
|
|
@@ -10,11 +10,10 @@
|
|
|
10
10
|
v-if="infoTextMessage"
|
|
11
11
|
:text="infoTextMessage"
|
|
12
12
|
borderColor="#ccc"
|
|
13
|
-
:size="fontSize ? fontSize : '
|
|
13
|
+
:size="fontSize ? fontSize : '16'"
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-wrapper>
|
|
17
|
-
<input-error-wrapper>
|
|
18
17
|
<input-container
|
|
19
18
|
:placeholder="placeholder"
|
|
20
19
|
:isError="isError"
|
|
@@ -27,27 +26,20 @@
|
|
|
27
26
|
:isDisabled="disabled"
|
|
28
27
|
:fontSize="fontSize"
|
|
29
28
|
/>
|
|
30
|
-
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
|
31
|
-
</input-error-wrapper>
|
|
32
29
|
</input-wrapper>
|
|
30
|
+
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
|
33
31
|
</container>
|
|
34
32
|
</template>
|
|
35
33
|
|
|
36
34
|
<script>
|
|
37
35
|
import styled from "vue-styled-components"
|
|
38
36
|
import InfoText from "../../infoText"
|
|
39
|
-
import ErrorMessage from '../../errorMessage'
|
|
40
37
|
|
|
41
38
|
const Container = styled.div`
|
|
42
39
|
width: 100%;
|
|
43
40
|
position: relative;
|
|
44
41
|
`
|
|
45
|
-
|
|
46
|
-
display: inline-grid;
|
|
47
|
-
grid-template-row: auto auto;
|
|
48
|
-
grid-gap: 0px;
|
|
49
|
-
align-items: center;
|
|
50
|
-
`
|
|
42
|
+
|
|
51
43
|
const labelAttrs = { fontSize: String }
|
|
52
44
|
const InputLabel = styled("div", labelAttrs)`
|
|
53
45
|
font-weight: bold;
|
|
@@ -112,6 +104,13 @@ const InputWrapper = styled("div", inputAttrs)`
|
|
|
112
104
|
props.alignItems === "vertical" || !props.hasLabel ? "1fr" : "auto 1fr"};
|
|
113
105
|
`
|
|
114
106
|
|
|
107
|
+
const ErrorMessage = styled.div`
|
|
108
|
+
font-size: 14px;
|
|
109
|
+
color: ${(props) => props.theme.colors.red};
|
|
110
|
+
position: absolute;
|
|
111
|
+
top: calc(100% + 1px);
|
|
112
|
+
`
|
|
113
|
+
|
|
115
114
|
export default {
|
|
116
115
|
// import InputText from "@eturnity/eturnity_reusable_components/src/components/inputs/inputText"
|
|
117
116
|
// To use:
|
|
@@ -137,7 +136,6 @@ export default {
|
|
|
137
136
|
ErrorMessage,
|
|
138
137
|
InfoText,
|
|
139
138
|
InputLabel,
|
|
140
|
-
InputErrorWrapper,
|
|
141
139
|
LabelWrapper,
|
|
142
140
|
},
|
|
143
141
|
props: {
|
|
@@ -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" :isChecked="selectedOption === item.value">
|
|
5
5
|
<radio
|
|
6
6
|
type="radio"
|
|
7
7
|
:value="selectedOption"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
/>
|
|
13
13
|
<span class="checkmark"></span>
|
|
14
14
|
<label-text :isDisabled="item.disabled">{{ item.label }}</label-text>
|
|
15
|
-
<info-text v-if="item.infoText" :text="item.infoText" size="
|
|
15
|
+
<info-text v-if="item.infoText" :text="item.infoText" size="16" />
|
|
16
16
|
</label-container>
|
|
17
17
|
<image-container v-if="item.img">
|
|
18
18
|
<radio-image :src="item.img" />
|
|
@@ -76,14 +76,6 @@ 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
|
-
}
|
|
87
79
|
`
|
|
88
80
|
|
|
89
81
|
const RadioWrapper = styled.div`
|
|
@@ -91,22 +83,22 @@ const RadioWrapper = styled.div`
|
|
|
91
83
|
grid-gap: 10px;
|
|
92
84
|
`
|
|
93
85
|
|
|
94
|
-
const containerProps = { size: String, isDisabled: Boolean }
|
|
86
|
+
const containerProps = { size: String, isDisabled: Boolean, isChecked: Boolean }
|
|
95
87
|
const LabelContainer = styled("label", containerProps)`
|
|
96
88
|
display: grid;
|
|
97
89
|
grid-template-columns: auto 1fr auto;
|
|
98
90
|
grid-gap: 15px;
|
|
99
91
|
align-items: center;
|
|
100
92
|
color: ${(props) =>
|
|
101
|
-
props.isDisabled ? props.theme.colors.
|
|
93
|
+
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
|
102
94
|
position: relative;
|
|
103
95
|
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
|
104
96
|
font-size: ${(props) =>
|
|
105
97
|
props.size === "large"
|
|
106
98
|
? "16px"
|
|
107
99
|
: props.size === "medium"
|
|
108
|
-
|
|
109
|
-
|
|
100
|
+
? "13px"
|
|
101
|
+
: "10px"};
|
|
110
102
|
user-select: none;
|
|
111
103
|
flex: auto;
|
|
112
104
|
align-self: baseline;
|
|
@@ -116,14 +108,14 @@ const LabelContainer = styled("label", containerProps)`
|
|
|
116
108
|
props.size === "large"
|
|
117
109
|
? "23px"
|
|
118
110
|
: props.size === "medium"
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
? "16px"
|
|
112
|
+
: "12px"};
|
|
121
113
|
width: ${(props) =>
|
|
122
114
|
props.size === "large"
|
|
123
115
|
? "23px"
|
|
124
116
|
: props.size === "medium"
|
|
125
|
-
|
|
126
|
-
|
|
117
|
+
? "16px"
|
|
118
|
+
: "12px"};
|
|
127
119
|
background-color: #fff;
|
|
128
120
|
border-radius: 100%;
|
|
129
121
|
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
|
@@ -133,32 +125,29 @@ const LabelContainer = styled("label", containerProps)`
|
|
|
133
125
|
|
|
134
126
|
&:after {
|
|
135
127
|
content: "";
|
|
136
|
-
display: none;
|
|
128
|
+
display: ${(props) => props.isChecked ? 'block' : 'none'};
|
|
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};
|
|
137
143
|
}
|
|
138
144
|
}
|
|
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
|
-
}
|
|
156
145
|
`
|
|
157
146
|
|
|
158
147
|
const textAttrs = { isDisabled: Boolean }
|
|
159
148
|
const LabelText = styled("div", textAttrs)`
|
|
160
149
|
color: ${(props) =>
|
|
161
|
-
props.isDisabled ? props.theme.colors.
|
|
150
|
+
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
|
162
151
|
`
|
|
163
152
|
|
|
164
153
|
const RadioImage = styled.img`
|
|
@@ -228,11 +217,15 @@ export default {
|
|
|
228
217
|
required: false,
|
|
229
218
|
default: "medium", // small, medium, large
|
|
230
219
|
},
|
|
220
|
+
name: {
|
|
221
|
+
required: false,
|
|
222
|
+
default: ''
|
|
223
|
+
}
|
|
231
224
|
},
|
|
232
225
|
data() {
|
|
233
226
|
return {
|
|
234
|
-
radioName: "",
|
|
235
227
|
selectedImage: null,
|
|
228
|
+
radioName: ''
|
|
236
229
|
}
|
|
237
230
|
},
|
|
238
231
|
methods: {
|
|
@@ -247,7 +240,7 @@ export default {
|
|
|
247
240
|
},
|
|
248
241
|
},
|
|
249
242
|
created() {
|
|
250
|
-
this.radioName = Math.round(Math.random() * 10000)
|
|
243
|
+
this.radioName = this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
|
|
251
244
|
},
|
|
252
245
|
}
|
|
253
246
|
</script>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-if="infoTextMessage"
|
|
11
11
|
:text="infoTextMessage"
|
|
12
12
|
borderColor="#ccc"
|
|
13
|
-
size="
|
|
13
|
+
size="16"
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-wrapper>
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
:disabled="isDisabled"
|
|
24
24
|
:fontSize="fontSize"
|
|
25
25
|
@input="onChangeHandler"
|
|
26
|
-
:resize="resize"
|
|
27
26
|
/>
|
|
28
27
|
</input-wrapper>
|
|
29
28
|
<error-message v-if="isError && errorText">{{ errorText }}</error-message>
|
|
@@ -175,11 +174,7 @@ export default {
|
|
|
175
174
|
},
|
|
176
175
|
inputWidth: {
|
|
177
176
|
required: false,
|
|
178
|
-
default: null
|
|
179
|
-
},
|
|
180
|
-
resize:{
|
|
181
|
-
required:false,
|
|
182
|
-
default: "none"
|
|
177
|
+
default: null
|
|
183
178
|
}
|
|
184
179
|
},
|
|
185
180
|
methods: {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-if="infoTextMessage"
|
|
11
11
|
:text="infoTextMessage"
|
|
12
12
|
borderColor="#ccc"
|
|
13
|
-
size="
|
|
13
|
+
size="14"
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-container>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
v-if="infoTextMessage"
|
|
47
47
|
:text="infoTextMessage"
|
|
48
48
|
borderColor="#ccc"
|
|
49
|
-
size="
|
|
49
|
+
size="14"
|
|
50
50
|
:alignText="infoTextAlign"
|
|
51
51
|
/>
|
|
52
52
|
</label-container>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<subtitle-text :color="color" :hasInfoText="!!infoText">
|
|
2
|
+
<subtitle-text :color="color" :marginBottom="marginBottom" :hasInfoText="!!infoText">
|
|
3
3
|
<span>
|
|
4
4
|
{{ text }}
|
|
5
5
|
</span>
|
|
6
6
|
<info-text
|
|
7
7
|
:text="infoText"
|
|
8
8
|
v-if="!!infoText"
|
|
9
|
-
size="
|
|
9
|
+
size="14"
|
|
10
10
|
borderColor="#ccc"
|
|
11
11
|
:alignText="alignInfoText"
|
|
12
12
|
/>
|
|
@@ -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, marginBottom: String }
|
|
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: 30px;
|
|
36
|
+
margin-bottom: ${(props) => (props.marginBottom ? props.marginBottom : '30px')};
|
|
37
37
|
line-height: 1.5;
|
|
38
38
|
position: relative;
|
|
39
39
|
`
|
|
@@ -59,6 +59,10 @@ export default {
|
|
|
59
59
|
required: false,
|
|
60
60
|
default: "left",
|
|
61
61
|
},
|
|
62
|
+
marginBottom: {
|
|
63
|
+
required: false,
|
|
64
|
+
default: "30px",
|
|
65
|
+
}
|
|
62
66
|
},
|
|
63
67
|
}
|
|
64
68
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<title-text :color="color">{{ text }}</title-text>
|
|
2
|
+
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">{{ 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, fontSize: String, uppercase: Boolean }
|
|
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: 16px;
|
|
19
|
-
text-transform: uppercase;
|
|
18
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
|
19
|
+
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
|
20
20
|
margin-bottom: 20px;
|
|
21
21
|
`
|
|
22
22
|
|
|
@@ -32,6 +32,14 @@ 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
|
+
}
|
|
35
43
|
},
|
|
36
44
|
}
|
|
37
45
|
</script>
|