@eturnity/eturnity_reusable_components 1.2.29-3d-master.1 → 1.2.29-EPDM-5477
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/App.vue +51 -128
- package/src/assets/svgIcons/dislike.svg +3 -0
- package/src/assets/svgIcons/external_icon.svg +5 -0
- package/src/assets/svgIcons/like.svg +3 -0
- package/src/assets/svgIcons/map_icon.svg +2 -4
- package/src/assets/svgIcons/obstacle_tool.svg +11 -7
- package/src/assets/theme.js +4 -4
- package/src/components/buttons/buttonIcon/index.vue +143 -0
- package/src/components/errorMessage/index.vue +4 -4
- package/src/components/icon/index.vue +10 -11
- package/src/components/infoText/index.vue +40 -25
- package/src/components/inputs/inputNumber/index.vue +34 -95
- package/src/components/inputs/inputText/index.vue +52 -49
- package/src/components/inputs/searchInput/index.vue +16 -15
- package/src/components/inputs/textAreaInput/index.vue +8 -14
- package/src/components/modals/modal/index.vue +2 -7
- package/src/helpers/numberConverter.js +0 -1
- package/src/assets/svgIcons/areas_tool.svg +0 -14
- package/src/assets/svgIcons/base_layer.svg +0 -3
- package/src/assets/svgIcons/direction_arrow.svg +0 -4
- package/src/assets/svgIcons/distance_tool.svg +0 -8
- package/src/assets/svgIcons/distort_tool.svg +0 -10
- package/src/assets/svgIcons/distort_tool2.svg +0 -16
- package/src/assets/svgIcons/draggable_corner.svg +0 -5
- package/src/assets/svgIcons/draw_tool.svg +0 -3
- package/src/assets/svgIcons/magic_tool.svg +0 -6
- package/src/assets/svgIcons/map_settings.svg +0 -3
- package/src/assets/svgIcons/margin_tool.svg +0 -4
- package/src/assets/svgIcons/obstacle_tool_origin.svg +0 -3
- package/src/assets/svgIcons/opacity.svg +0 -1
- package/src/assets/svgIcons/outline_tool.svg +0 -11
- package/src/assets/svgIcons/redo.svg +0 -6
- package/src/assets/svgIcons/resizer.svg +0 -5
- package/src/assets/svgIcons/roof_layer.svg +0 -3
- package/src/assets/svgIcons/rotate_tool.svg +0 -3
- package/src/assets/svgIcons/ruler_tool.svg +0 -3
- package/src/assets/svgIcons/trim_tool.svg +0 -4
- package/src/assets/svgIcons/undo.svg +0 -6
- package/src/assets/svgIcons/vertical_tool.svg +0 -3
- package/src/components/buttons/externalButton/index.vue +0 -101
- package/src/components/iconWrapper/index.vue +0 -116
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<container :inputWidth="inputWidth"
|
|
3
|
-
<label-slot-wrapper v-if="hasLabelSlot" :isInteractive="isInteractive" @mousedown="initInteraction">
|
|
4
|
-
|
|
5
|
-
<slot name="label"></slot>
|
|
6
|
-
</label-slot-wrapper>
|
|
7
|
-
|
|
2
|
+
<container :inputWidth="inputWidth">
|
|
8
3
|
<label-wrapper v-if="labelText">
|
|
9
4
|
<label-text>
|
|
10
5
|
{{ labelText }}
|
|
@@ -24,23 +19,21 @@
|
|
|
24
19
|
:hasUnit="unitName && !!unitName.length"
|
|
25
20
|
:placeholder="displayedPlaceholder"
|
|
26
21
|
:isError="isError"
|
|
22
|
+
:inputWidth="inputWidth"
|
|
27
23
|
:inputHeight="inputHeight"
|
|
28
24
|
:minWidth="minWidth"
|
|
29
25
|
:value="formatWithCurrency(value)"
|
|
30
26
|
@blur="onInputBlur($event)"
|
|
31
27
|
@focus="focusInput()"
|
|
32
28
|
@keyup.enter="$emit('on-enter-click')"
|
|
33
|
-
@input="onInput($event)"
|
|
34
29
|
:disabled="disabled"
|
|
35
30
|
:isDisabled="disabled"
|
|
36
31
|
:noBorder="noBorder"
|
|
37
32
|
:textAlign="textAlign"
|
|
38
33
|
:fontSize="fontSize"
|
|
39
34
|
:fontColor="fontColor"
|
|
40
|
-
:backgroundColor="backgroundColor"
|
|
41
35
|
v-on="$listeners"
|
|
42
36
|
:hasSlot="hasSlot"
|
|
43
|
-
:hasLabelSlot="hasLabelSlot"
|
|
44
37
|
:slotSize="slotSize"
|
|
45
38
|
/>
|
|
46
39
|
<slot-container v-if="hasSlot" :slotSize="slotSize" :isError="isError">
|
|
@@ -108,21 +101,14 @@ const inputProps = {
|
|
|
108
101
|
textAlign: String,
|
|
109
102
|
fontSize: String,
|
|
110
103
|
fontColor: String,
|
|
111
|
-
backgroundColor:String,
|
|
112
104
|
hasSlot: Boolean,
|
|
113
|
-
hasLabelSlot: Boolean,
|
|
114
105
|
slotSize: String,
|
|
115
|
-
inputHeight:String
|
|
116
|
-
isInteractive:Boolean,
|
|
117
|
-
alignItems:String
|
|
106
|
+
inputHeight: String
|
|
118
107
|
}
|
|
119
108
|
|
|
120
109
|
const Container = styled('div', inputProps)`
|
|
121
110
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
122
111
|
position: relative;
|
|
123
|
-
display:grid;
|
|
124
|
-
grid-template-columns: ${(props) =>
|
|
125
|
-
props.alignItems === "vertical" ? "1fr" : "auto 1fr"};
|
|
126
112
|
`
|
|
127
113
|
|
|
128
114
|
const InputContainer = styled('input', inputProps)`
|
|
@@ -131,13 +117,15 @@ const InputContainer = styled('input', inputProps)`
|
|
|
131
117
|
? '1px solid ' + props.theme.colors.red
|
|
132
118
|
: props.noBorder
|
|
133
119
|
? 'none'
|
|
134
|
-
: '1px solid ' + props.theme.colors.
|
|
120
|
+
: '1px solid ' + props.theme.colors.grey4};
|
|
135
121
|
padding-top: 11px;
|
|
136
122
|
padding-bottom: 11px;
|
|
137
123
|
padding-left: 10px;
|
|
138
124
|
padding-right: ${(props) =>
|
|
139
125
|
props.slotSize
|
|
140
126
|
? 'calc(' + props.slotSize + ' + 10px)'
|
|
127
|
+
: props.hasUnit
|
|
128
|
+
? '40px'
|
|
141
129
|
: '5px'};
|
|
142
130
|
border-radius: 4px;
|
|
143
131
|
text-align: ${(props) => props.textAlign};
|
|
@@ -145,22 +133,20 @@ const InputContainer = styled('input', inputProps)`
|
|
|
145
133
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
|
146
134
|
color: ${(props) =>
|
|
147
135
|
props.isError
|
|
148
|
-
? props.theme.colors.
|
|
136
|
+
? props.theme.colors.grey6
|
|
137
|
+
: props.isDisabled
|
|
138
|
+
? props.theme.colors.grey2
|
|
149
139
|
: props.fontColor
|
|
150
140
|
? props.fontColor + ' !important'
|
|
151
141
|
: props.theme.colors.black};
|
|
152
|
-
|
|
153
|
-
? props.backgroundColor+' !important'
|
|
154
|
-
: props.theme.colors.white};
|
|
155
|
-
width: ${(props) => (props.inputWidth && !props.hasLabelSlot ? props.inputWidth : '100%')};
|
|
142
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
156
143
|
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
|
157
144
|
background-color: ${(props) =>
|
|
158
145
|
props.isDisabled ? props.theme.colors.grey5 : '#fff'};
|
|
159
146
|
box-sizing: border-box;
|
|
160
|
-
max-height: ${(props) =>
|
|
147
|
+
max-height: ${(props) => props.inputHeight};
|
|
161
148
|
&::placeholder {
|
|
162
|
-
color: ${(props) =>
|
|
163
|
-
props.isError ? props.theme.colors.red : props.theme.colors.darkGray};
|
|
149
|
+
color: ${(props) => props.theme.colors.grey2};
|
|
164
150
|
}
|
|
165
151
|
|
|
166
152
|
&:focus {
|
|
@@ -225,22 +211,16 @@ const SlotContainer = styled('span', inputProps)`
|
|
|
225
211
|
: props.theme.colors.mediumGray};
|
|
226
212
|
`
|
|
227
213
|
|
|
228
|
-
const LabelWrapper = styled
|
|
214
|
+
const LabelWrapper = styled.div`
|
|
229
215
|
display: flex;
|
|
230
216
|
gap: 10px;
|
|
231
217
|
margin-bottom: 8px;
|
|
232
|
-
cursor: ${(props) => (props.isInteractive?'ew-resize':'auto')};
|
|
233
|
-
`
|
|
234
|
-
const LabelSlotWrapper = styled('div',inputProps)`
|
|
235
|
-
display: flex;
|
|
236
|
-
gap: 10px;
|
|
237
|
-
align-items:center;
|
|
238
|
-
cursor: ${(props) => (props.isInteractive?'ew-resize':'auto')};
|
|
239
218
|
`
|
|
240
219
|
|
|
241
220
|
const LabelText = styled.div`
|
|
242
|
-
font-weight: bold;
|
|
243
221
|
font-size: 13px;
|
|
222
|
+
color: ${(props) => props.theme.colors.eturnityGrey};
|
|
223
|
+
font-weight: 700;
|
|
244
224
|
`
|
|
245
225
|
|
|
246
226
|
export default {
|
|
@@ -252,18 +232,17 @@ export default {
|
|
|
252
232
|
UnitContainer,
|
|
253
233
|
ErrorMessage,
|
|
254
234
|
LabelWrapper,
|
|
255
|
-
LabelSlotWrapper,
|
|
256
235
|
LabelText,
|
|
257
236
|
InfoText,
|
|
258
237
|
Icon,
|
|
259
|
-
SlotContainer
|
|
238
|
+
SlotContainer
|
|
260
239
|
},
|
|
261
240
|
inheritAttrs: false,
|
|
262
241
|
data() {
|
|
263
242
|
return {
|
|
264
243
|
textInput: '',
|
|
265
244
|
isFocused: false,
|
|
266
|
-
warningIcon: warningIcon
|
|
245
|
+
warningIcon: warningIcon
|
|
267
246
|
}
|
|
268
247
|
},
|
|
269
248
|
props: {
|
|
@@ -283,9 +262,9 @@ export default {
|
|
|
283
262
|
required: false,
|
|
284
263
|
default: null
|
|
285
264
|
},
|
|
286
|
-
inputHeight:{
|
|
287
|
-
required:false,
|
|
288
|
-
default:null
|
|
265
|
+
inputHeight: {
|
|
266
|
+
required: false,
|
|
267
|
+
default: null
|
|
289
268
|
},
|
|
290
269
|
value: {
|
|
291
270
|
required: true,
|
|
@@ -295,10 +274,6 @@ export default {
|
|
|
295
274
|
required: false,
|
|
296
275
|
default: false
|
|
297
276
|
},
|
|
298
|
-
alignItems: {
|
|
299
|
-
required: false,
|
|
300
|
-
default: "vertical",
|
|
301
|
-
},
|
|
302
277
|
errorMessage: {
|
|
303
278
|
required: false,
|
|
304
279
|
default: 'Please insert a correct number'
|
|
@@ -331,14 +306,6 @@ export default {
|
|
|
331
306
|
required: false,
|
|
332
307
|
default: '13px'
|
|
333
308
|
},
|
|
334
|
-
isInteractive: {
|
|
335
|
-
required: false,
|
|
336
|
-
default: false
|
|
337
|
-
},
|
|
338
|
-
interactionStep:{
|
|
339
|
-
required:false,
|
|
340
|
-
default:1
|
|
341
|
-
},
|
|
342
309
|
labelText: {
|
|
343
310
|
required: false,
|
|
344
311
|
default: null
|
|
@@ -359,10 +326,6 @@ export default {
|
|
|
359
326
|
required: false,
|
|
360
327
|
default: null
|
|
361
328
|
},
|
|
362
|
-
backgroundColor: {
|
|
363
|
-
required: false,
|
|
364
|
-
default: null
|
|
365
|
-
},
|
|
366
329
|
numberToStringEnabled: {
|
|
367
330
|
required: false,
|
|
368
331
|
default: true
|
|
@@ -377,6 +340,10 @@ export default {
|
|
|
377
340
|
type: String,
|
|
378
341
|
default: ''
|
|
379
342
|
},
|
|
343
|
+
allowNegative: {
|
|
344
|
+
required: false,
|
|
345
|
+
default: true
|
|
346
|
+
},
|
|
380
347
|
inputIconImageClass: {
|
|
381
348
|
require: false,
|
|
382
349
|
type: Array,
|
|
@@ -394,18 +361,18 @@ export default {
|
|
|
394
361
|
hasSlot() {
|
|
395
362
|
return !!this.$slots.default
|
|
396
363
|
},
|
|
397
|
-
hasLabelSlot(){
|
|
398
|
-
return !!this.$slots.label
|
|
399
|
-
},
|
|
400
364
|
computedSlotSize() {
|
|
401
365
|
return this.slotSize || this.$slots['default'][0].elm.clientWidth
|
|
402
366
|
}
|
|
403
367
|
},
|
|
404
368
|
methods: {
|
|
405
369
|
onChangeHandler(event) {
|
|
406
|
-
if (isNaN(event) || event==
|
|
370
|
+
if (isNaN(event) || event == '') {
|
|
407
371
|
event = this.minNumber || this.minNumber === 0 ? this.minNumber : event
|
|
408
372
|
}
|
|
373
|
+
if (!this.allowNegative) {
|
|
374
|
+
event = Math.abs(event)
|
|
375
|
+
}
|
|
409
376
|
this.$emit('input-change', event)
|
|
410
377
|
},
|
|
411
378
|
onEvaluateCode(val) {
|
|
@@ -438,15 +405,11 @@ export default {
|
|
|
438
405
|
value: evaluated,
|
|
439
406
|
numberPrecision: this.numberPrecision
|
|
440
407
|
})
|
|
441
|
-
}else if(typeof evaluated === 'number'){
|
|
442
|
-
evaluated=evaluated.toFixed(this.numberPrecision)
|
|
408
|
+
} else if (typeof evaluated === 'number') {
|
|
409
|
+
evaluated = evaluated.toFixed(this.numberPrecision)
|
|
443
410
|
}
|
|
444
411
|
return evaluated
|
|
445
412
|
},
|
|
446
|
-
onInput(value){
|
|
447
|
-
let evaluatedInput = this.onEvaluateCode(value)
|
|
448
|
-
this.$emit('on-input',evaluatedInput)
|
|
449
|
-
},
|
|
450
413
|
onInputBlur(e) {
|
|
451
414
|
this.isFocused = false
|
|
452
415
|
let value = e.target.value
|
|
@@ -460,11 +423,11 @@ export default {
|
|
|
460
423
|
})
|
|
461
424
|
}
|
|
462
425
|
let adjustedMinValue =
|
|
463
|
-
|
|
426
|
+
evaluatedInput && evaluatedInput.length
|
|
464
427
|
? evaluatedInput
|
|
465
428
|
: this.minNumber || this.minNumber === 0
|
|
466
429
|
? this.minNumber
|
|
467
|
-
: ''
|
|
430
|
+
: ''
|
|
468
431
|
this.$emit('input-blur', adjustedMinValue)
|
|
469
432
|
},
|
|
470
433
|
focusInput() {
|
|
@@ -504,31 +467,7 @@ export default {
|
|
|
504
467
|
})
|
|
505
468
|
: adjustedMinValue
|
|
506
469
|
}
|
|
507
|
-
}
|
|
508
|
-
initInteraction(e) {
|
|
509
|
-
window.addEventListener('mousemove', this.interact, false);
|
|
510
|
-
window.addEventListener('mouseup', this.stopInteract, false);
|
|
511
|
-
e.preventDefault()
|
|
512
|
-
},
|
|
513
|
-
interact(e) {
|
|
514
|
-
e.preventDefault()
|
|
515
|
-
let value=parseInt(this.value || 0)
|
|
516
|
-
|
|
517
|
-
value+=parseFloat(this.interactionStep)*parseInt(e.movementX)
|
|
518
|
-
this.$emit('on-input',value)
|
|
519
|
-
|
|
520
|
-
this.textInput=numberToString({
|
|
521
|
-
value:
|
|
522
|
-
value && value.length ? value : this.minNumber,
|
|
523
|
-
numberPrecision: this.numberPrecision
|
|
524
|
-
})
|
|
525
|
-
//this.value=value
|
|
526
|
-
},
|
|
527
|
-
stopInteract(e) {
|
|
528
|
-
e.preventDefault()
|
|
529
|
-
window.removeEventListener('mousemove', this.interact, false);
|
|
530
|
-
window.removeEventListener('mouseup', this.stopInteract, false);
|
|
531
|
-
},
|
|
470
|
+
}
|
|
532
471
|
},
|
|
533
472
|
created() {
|
|
534
473
|
if (this.value) {
|
|
@@ -552,4 +491,4 @@ export default {
|
|
|
552
491
|
}
|
|
553
492
|
}
|
|
554
493
|
}
|
|
555
|
-
</script>
|
|
494
|
+
</script>
|
|
@@ -14,33 +14,38 @@
|
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-wrapper>
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<icon
|
|
42
|
-
|
|
43
|
-
|
|
17
|
+
<input-error-wrapper>
|
|
18
|
+
<icon-container>
|
|
19
|
+
<input-container
|
|
20
|
+
:placeholder="placeholder"
|
|
21
|
+
:isError="isError"
|
|
22
|
+
:inputWidth="inputWidth"
|
|
23
|
+
:minWidth="minWidth"
|
|
24
|
+
:value="value"
|
|
25
|
+
@input="onChangeHandler"
|
|
26
|
+
@blur="onInputBlur"
|
|
27
|
+
:noBorder="noBorder"
|
|
28
|
+
:disabled="disabled"
|
|
29
|
+
:isDisabled="disabled"
|
|
30
|
+
:fontSize="fontSize"
|
|
31
|
+
:inputType="inputType"
|
|
32
|
+
:type="inputTypeData"
|
|
33
|
+
/>
|
|
34
|
+
<icon-wrapper
|
|
35
|
+
v-if="inputType === 'password' && !isError"
|
|
36
|
+
@click="toggleShowPassword()"
|
|
37
|
+
size="20px"
|
|
38
|
+
>
|
|
39
|
+
<icon name="current_variant" size="20px" />
|
|
40
|
+
</icon-wrapper>
|
|
41
|
+
<icon-wrapper v-if="isError" size="16px">
|
|
42
|
+
<icon name="warning" size="16px" cursor="default" />
|
|
43
|
+
</icon-wrapper>
|
|
44
|
+
</icon-container>
|
|
45
|
+
<error-message v-if="isError && errorMessage">{{
|
|
46
|
+
errorMessage
|
|
47
|
+
}}</error-message>
|
|
48
|
+
</input-error-wrapper>
|
|
44
49
|
</input-wrapper>
|
|
45
50
|
</container>
|
|
46
51
|
</template>
|
|
@@ -49,21 +54,18 @@
|
|
|
49
54
|
import styled from 'vue-styled-components'
|
|
50
55
|
import InfoText from '../../infoText'
|
|
51
56
|
import Icon from '../../icon'
|
|
57
|
+
import ErrorMessage from '../../errorMessage'
|
|
52
58
|
|
|
53
59
|
const Container = styled.div`
|
|
54
60
|
width: 100%;
|
|
55
61
|
position: relative;
|
|
56
62
|
`
|
|
57
|
-
|
|
58
|
-
display: inline-grid;
|
|
59
|
-
grid-template-row: auto auto;
|
|
60
|
-
grid-gap: 0px;
|
|
61
|
-
align-items: center;
|
|
62
|
-
`
|
|
63
|
+
|
|
63
64
|
const labelAttrs = { fontSize: String }
|
|
64
65
|
const InputLabel = styled('div', labelAttrs)`
|
|
65
|
-
|
|
66
|
+
color: ${(props) => props.theme.colors.eturnityGrey};
|
|
66
67
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
|
68
|
+
font-weight: 700;
|
|
67
69
|
`
|
|
68
70
|
|
|
69
71
|
const LabelWrapper = styled.div`
|
|
@@ -74,6 +76,13 @@ const LabelWrapper = styled.div`
|
|
|
74
76
|
justify-content: start;
|
|
75
77
|
`
|
|
76
78
|
|
|
79
|
+
const InputErrorWrapper = styled.div`
|
|
80
|
+
display: inline-grid;
|
|
81
|
+
grid-template-row: auto auto;
|
|
82
|
+
grid-gap: 0px;
|
|
83
|
+
align-items: center;
|
|
84
|
+
`
|
|
85
|
+
|
|
77
86
|
const inputProps = {
|
|
78
87
|
isError: Boolean,
|
|
79
88
|
inputWidth: String,
|
|
@@ -89,9 +98,7 @@ const InputContainer = styled('input', inputProps)`
|
|
|
89
98
|
? '1px solid ' + props.theme.colors.red
|
|
90
99
|
: props.noBorder
|
|
91
100
|
? 'none'
|
|
92
|
-
: props.
|
|
93
|
-
? '1px solid ' + props.theme.colors.black
|
|
94
|
-
: '1px solid ' + props.theme.colors.mediumGray};
|
|
101
|
+
: '1px solid ' + props.theme.colors.grey4};
|
|
95
102
|
padding: ${(props) =>
|
|
96
103
|
props.isError
|
|
97
104
|
? '11px 25px 11px 10px'
|
|
@@ -102,7 +109,11 @@ const InputContainer = styled('input', inputProps)`
|
|
|
102
109
|
position: relative;
|
|
103
110
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
|
104
111
|
color: ${(props) =>
|
|
105
|
-
props.isError
|
|
112
|
+
props.isError
|
|
113
|
+
? props.theme.colors.grey6
|
|
114
|
+
: props.isDisabled
|
|
115
|
+
? props.theme.colors.grey2
|
|
116
|
+
: props.theme.colors.black};
|
|
106
117
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
107
118
|
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
|
108
119
|
box-sizing: border-box; // to allow width of 100% with padding
|
|
@@ -112,8 +123,7 @@ const InputContainer = styled('input', inputProps)`
|
|
|
112
123
|
props.isDisabled ? props.theme.colors.grey5 : '#fff'};
|
|
113
124
|
|
|
114
125
|
&::placeholder {
|
|
115
|
-
color: ${(props) =>
|
|
116
|
-
props.isError ? props.theme.colors.red : props.theme.colors.darkGray};
|
|
126
|
+
color: ${(props) => props.theme.colors.grey2};
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
&:focus {
|
|
@@ -131,13 +141,6 @@ const InputWrapper = styled('div', inputAttrs)`
|
|
|
131
141
|
props.alignItems === 'vertical' || !props.hasLabel ? '1fr' : 'auto 1fr'};
|
|
132
142
|
`
|
|
133
143
|
|
|
134
|
-
const ErrorMessage = styled.div`
|
|
135
|
-
font-size: 14px;
|
|
136
|
-
color: ${(props) => props.theme.colors.red};
|
|
137
|
-
position: absolute;
|
|
138
|
-
top: calc(100% + 1px);
|
|
139
|
-
`
|
|
140
|
-
|
|
141
144
|
const IconAttrs = { size: String }
|
|
142
145
|
const IconWrapper = styled('div', IconAttrs)`
|
|
143
146
|
position: absolute;
|
|
@@ -178,11 +181,11 @@ export default {
|
|
|
178
181
|
ErrorMessage,
|
|
179
182
|
InfoText,
|
|
180
183
|
InputLabel,
|
|
181
|
-
InputErrorWrapper,
|
|
182
184
|
LabelWrapper,
|
|
183
185
|
Icon,
|
|
184
186
|
IconWrapper,
|
|
185
|
-
IconContainer
|
|
187
|
+
IconContainer,
|
|
188
|
+
InputErrorWrapper
|
|
186
189
|
},
|
|
187
190
|
data() {
|
|
188
191
|
return {
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
// :value="companyName"
|
|
26
26
|
// :disabled="true"
|
|
27
27
|
// inputWidth="250px"
|
|
28
|
+
// @on-change="function($event)"
|
|
28
29
|
// />
|
|
29
|
-
import styled from
|
|
30
|
+
import styled from 'vue-styled-components'
|
|
30
31
|
|
|
31
32
|
const Container = styled.div`
|
|
32
33
|
width: 100%;
|
|
@@ -34,15 +35,15 @@ const Container = styled.div`
|
|
|
34
35
|
`
|
|
35
36
|
|
|
36
37
|
const inputAttrs = { isDisabled: Boolean, inputWidth: String }
|
|
37
|
-
const InputContainer = styled(
|
|
38
|
+
const InputContainer = styled('input', inputAttrs)`
|
|
38
39
|
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
|
39
40
|
padding: 11px 30px 11px 10px;
|
|
40
41
|
border-radius: 4px;
|
|
41
|
-
font-size:
|
|
42
|
+
font-size: 13px;
|
|
42
43
|
color: ${(props) => props.theme.colors.black};
|
|
43
|
-
width: ${(props) => (props.inputWidth ? props.inputWidth :
|
|
44
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
44
45
|
box-sizing: border-box;
|
|
45
|
-
cursor: ${(props) => (props.isDisabled ?
|
|
46
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
|
|
46
47
|
background: ${(props) => props.theme.colors.white} !important;
|
|
47
48
|
&::placeholder {
|
|
48
49
|
color: ${(props) => props.theme.colors.darkGray};
|
|
@@ -65,33 +66,33 @@ const InputWrapper = styled.span`
|
|
|
65
66
|
`
|
|
66
67
|
|
|
67
68
|
export default {
|
|
68
|
-
name:
|
|
69
|
+
name: 'search-input',
|
|
69
70
|
components: {
|
|
70
71
|
InputContainer,
|
|
71
72
|
InputWrapper,
|
|
72
|
-
Container
|
|
73
|
+
Container
|
|
73
74
|
},
|
|
74
75
|
props: {
|
|
75
76
|
value: {
|
|
76
|
-
required: true
|
|
77
|
+
required: true
|
|
77
78
|
},
|
|
78
79
|
disabled: {
|
|
79
80
|
required: false,
|
|
80
|
-
default: false
|
|
81
|
+
default: false
|
|
81
82
|
},
|
|
82
83
|
placeholder: {
|
|
83
84
|
required: false,
|
|
84
|
-
default:
|
|
85
|
+
default: ''
|
|
85
86
|
},
|
|
86
87
|
inputWidth: {
|
|
87
88
|
required: false,
|
|
88
|
-
default: null
|
|
89
|
-
}
|
|
89
|
+
default: null
|
|
90
|
+
}
|
|
90
91
|
},
|
|
91
92
|
methods: {
|
|
92
93
|
onChangeHandler(event) {
|
|
93
|
-
this.$emit(
|
|
94
|
-
}
|
|
95
|
-
}
|
|
94
|
+
this.$emit('on-change', event)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
96
97
|
}
|
|
97
98
|
</script>
|
|
@@ -45,9 +45,11 @@
|
|
|
45
45
|
// label="Question 5"
|
|
46
46
|
// alignItems="horizontal" // horizontal, vertical
|
|
47
47
|
// :isDisabled="true"
|
|
48
|
+
// . fontSize="13px"
|
|
48
49
|
// />
|
|
49
50
|
import styled from 'vue-styled-components'
|
|
50
51
|
import InfoText from '../../infoText'
|
|
52
|
+
import ErrorMessage from '../../errorMessage'
|
|
51
53
|
|
|
52
54
|
const containerProps = { inputWidth: String }
|
|
53
55
|
const Container = styled('div', containerProps)`
|
|
@@ -73,7 +75,7 @@ const InputContainer = styled('textarea', inputProps)`
|
|
|
73
75
|
border: ${(props) =>
|
|
74
76
|
props.isError
|
|
75
77
|
? '1px solid ' + props.theme.colors.red
|
|
76
|
-
: '1px solid ' + props.theme.colors.
|
|
78
|
+
: '1px solid ' + props.theme.colors.grey4};
|
|
77
79
|
padding: ${(props) =>
|
|
78
80
|
props.hasUnit ? '11px 40px 11px 10px' : '11px 5px 11px 10px'};
|
|
79
81
|
border-radius: 4px;
|
|
@@ -85,8 +87,7 @@ const InputContainer = styled('textarea', inputProps)`
|
|
|
85
87
|
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'inherit')};
|
|
86
88
|
|
|
87
89
|
&::placeholder {
|
|
88
|
-
color: ${(props) =>
|
|
89
|
-
props.isError ? props.theme.colors.red : props.theme.colors.darkGray};
|
|
90
|
+
color: ${(props) => props.theme.colors.grey2};
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
&:focus {
|
|
@@ -108,13 +109,6 @@ const InputWrapper = styled('div', inputAttrs)`
|
|
|
108
109
|
: 'auto 1fr'};
|
|
109
110
|
`
|
|
110
111
|
|
|
111
|
-
const ErrorMessage = styled.div`
|
|
112
|
-
font-size: 14px;
|
|
113
|
-
color: ${(props) => props.theme.colors.red};
|
|
114
|
-
position: absolute;
|
|
115
|
-
top: calc(100% + 1px);
|
|
116
|
-
`
|
|
117
|
-
|
|
118
112
|
const labelAttrs = { fontSize: String }
|
|
119
113
|
const InputLabel = styled('div', labelAttrs)`
|
|
120
114
|
font-weight: bold;
|
|
@@ -175,11 +169,11 @@ export default {
|
|
|
175
169
|
},
|
|
176
170
|
inputWidth: {
|
|
177
171
|
required: false,
|
|
178
|
-
default: null
|
|
172
|
+
default: null
|
|
179
173
|
},
|
|
180
|
-
resize:{
|
|
181
|
-
required:false,
|
|
182
|
-
default:
|
|
174
|
+
resize: {
|
|
175
|
+
required: false,
|
|
176
|
+
default: 'none'
|
|
183
177
|
}
|
|
184
178
|
},
|
|
185
179
|
methods: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<page-wrapper
|
|
3
|
-
:position="position"
|
|
4
3
|
:isOpen="isOpen"
|
|
5
4
|
:class="{ visible: isOpen, hidden: !isOpen }"
|
|
6
5
|
@click.native="onOutsideClose()"
|
|
@@ -37,9 +36,9 @@ const ContentContainer = styled('div', contentAttrs)`
|
|
|
37
36
|
visibility: ${(props) => (props.visible ? 'inherit' : 'hidden')};
|
|
38
37
|
`
|
|
39
38
|
|
|
40
|
-
const pageAttrs = { isOpen: Boolean, backdrop: String
|
|
39
|
+
const pageAttrs = { isOpen: Boolean, backdrop: String }
|
|
41
40
|
const PageWrapper = styled('div', pageAttrs)`
|
|
42
|
-
position:
|
|
41
|
+
position: fixed;
|
|
43
42
|
display: grid;
|
|
44
43
|
top: 0;
|
|
45
44
|
left: 0;
|
|
@@ -133,10 +132,6 @@ export default {
|
|
|
133
132
|
backdrop: {
|
|
134
133
|
required: false,
|
|
135
134
|
default: 'white'
|
|
136
|
-
},
|
|
137
|
-
position: {
|
|
138
|
-
required: false,
|
|
139
|
-
default: 'fixed'
|
|
140
135
|
}
|
|
141
136
|
},
|
|
142
137
|
methods: {
|
|
@@ -94,7 +94,6 @@ export const numberToString = ({ value, numberPrecision }) => {
|
|
|
94
94
|
? 'fr-fr'
|
|
95
95
|
: localStorage.getItem('lang')
|
|
96
96
|
: 'en-US'
|
|
97
|
-
if(selectedLang=="null"){selectedLang='en-US'}
|
|
98
97
|
value=parseFloat(value)
|
|
99
98
|
return value.toLocaleString(selectedLang, {
|
|
100
99
|
minimumFractionDigits: numberPrecision,
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg width="20" height="18" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect x="3.79834" y="3" width="12" height="1.6" transform="rotate(90 3.79834 3)" fill="#B2B9C5"/>
|
|
3
|
-
<rect x="16.0015" y="2.80005" width="12" height="1.6" transform="rotate(-180 16.0015 2.80005)" fill="#B2B9C5"/>
|
|
4
|
-
<rect x="16.0015" y="16.8" width="12" height="1.6" transform="rotate(-180 16.0015 16.8)" fill="#B2B9C5"/>
|
|
5
|
-
<path d="M4.99854 2C4.99854 3.10457 4.1031 4 2.99854 4C1.89397 4 0.998535 3.10457 0.998535 2C0.998535 0.89543 1.89397 0 2.99854 0C4.1031 0 4.99854 0.89543 4.99854 2Z" fill="white"/>
|
|
6
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.99854 3C3.55082 3 3.99854 2.55228 3.99854 2C3.99854 1.44772 3.55082 1 2.99854 1C2.44625 1 1.99854 1.44772 1.99854 2C1.99854 2.55228 2.44625 3 2.99854 3ZM2.99854 4C4.1031 4 4.99854 3.10457 4.99854 2C4.99854 0.895431 4.1031 0 2.99854 0C1.89397 0 0.998535 0.895431 0.998535 2C0.998535 3.10457 1.89397 4 2.99854 4Z" fill="#B2B9C5"/>
|
|
7
|
-
<rect x="17.7983" y="3" width="12" height="1.6" transform="rotate(90 17.7983 3)" fill="#B2B9C5"/>
|
|
8
|
-
<path d="M19.0015 2C19.0015 3.10457 18.106 4 17.0015 4C15.8969 4 15.0015 3.10457 15.0015 2C15.0015 0.89543 15.8969 0 17.0015 0C18.106 0 19.0015 0.89543 19.0015 2Z" fill="white"/>
|
|
9
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.0015 3C17.5537 3 18.0015 2.55228 18.0015 2C18.0015 1.44772 17.5537 1 17.0015 1C16.4492 1 16.0015 1.44772 16.0015 2C16.0015 2.55228 16.4492 3 17.0015 3ZM17.0015 4C18.106 4 19.0015 3.10457 19.0015 2C19.0015 0.895431 18.106 0 17.0015 0C15.8969 0 15.0015 0.895431 15.0015 2C15.0015 3.10457 15.8969 4 17.0015 4Z" fill="#B2B9C5"/>
|
|
10
|
-
<path d="M19.0015 16C19.0015 17.1046 18.106 18 17.0015 18C15.8969 18 15.0015 17.1046 15.0015 16C15.0015 14.8954 15.8969 14 17.0015 14C18.106 14 19.0015 14.8954 19.0015 16Z" fill="white"/>
|
|
11
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.0015 17C17.5537 17 18.0015 16.5523 18.0015 16C18.0015 15.4477 17.5537 15 17.0015 15C16.4492 15 16.0015 15.4477 16.0015 16C16.0015 16.5523 16.4492 17 17.0015 17ZM17.0015 18C18.106 18 19.0015 17.1046 19.0015 16C19.0015 14.8954 18.106 14 17.0015 14C15.8969 14 15.0015 14.8954 15.0015 16C15.0015 17.1046 15.8969 18 17.0015 18Z" fill="#B2B9C5"/>
|
|
12
|
-
<path d="M4.99854 16C4.99854 17.1046 4.1031 18 2.99854 18C1.89397 18 0.998535 17.1046 0.998535 16C0.998535 14.8954 1.89397 14 2.99854 14C4.1031 14 4.99854 14.8954 4.99854 16Z" fill="white"/>
|
|
13
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.99854 17C3.55082 17 3.99854 16.5523 3.99854 16C3.99854 15.4477 3.55082 15 2.99854 15C2.44625 15 1.99854 15.4477 1.99854 16C1.99854 16.5523 2.44625 17 2.99854 17ZM2.99854 18C4.1031 18 4.99854 17.1046 4.99854 16C4.99854 14.8954 4.1031 14 2.99854 14C1.89397 14 0.998535 14.8954 0.998535 16C0.998535 17.1046 1.89397 18 2.99854 18Z" fill="#B2B9C5"/>
|
|
14
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="18" height="10" viewBox="0 0 18 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect x="18" y="5.80005" width="12" height="1.6" transform="rotate(-180 18 5.80005)" fill="#B2B9C5"/>
|
|
3
|
-
<path d="M-2.18557e-07 5L7 10L7 3.0598e-07L-2.18557e-07 5Z" fill="#B2B9C5"/>
|
|
4
|
-
</svg>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect x="18" y="8" width="10" height="1.6" transform="rotate(90 18 8)" fill="#B2B9C5"/>
|
|
3
|
-
<rect x="1.6001" y="8" width="10" height="1.6" transform="rotate(90 1.6001 8)" fill="#B2B9C5"/>
|
|
4
|
-
<path d="M5.19971 5.38V0.082216H6.07325C6.25138 0.082216 6.36957 0.164432 6.42781 0.328863L6.51002 0.673142C6.60251 0.577224 6.69672 0.488157 6.79264 0.405941C6.89198 0.323725 6.99818 0.253499 7.11123 0.195263C7.22427 0.133601 7.34588 0.0856414 7.47606 0.0513849C7.60966 0.0171283 7.75354 0 7.90769 0C8.23313 0 8.50204 0.0873543 8.71443 0.262063C8.92683 0.433346 9.08783 0.662865 9.19745 0.950621C9.28309 0.782763 9.38758 0.638886 9.5109 0.518988C9.63765 0.395664 9.77468 0.29632 9.92198 0.220955C10.0727 0.145591 10.2303 0.0907802 10.3947 0.0565236C10.5626 0.0188412 10.7304 0 10.8983 0C11.1963 0 11.4601 0.0445336 11.6896 0.133601C11.9191 0.222668 12.111 0.354556 12.2651 0.529264C12.4227 0.700548 12.5426 0.911226 12.6248 1.1613C12.707 1.41137 12.7482 1.6957 12.7482 2.01429V5.38H11.3299V2.01429C11.3299 1.39424 11.0644 1.08422 10.5335 1.08422C10.4136 1.08422 10.3022 1.10478 10.1995 1.14588C10.1001 1.18357 10.011 1.2418 9.93226 1.32059C9.85689 1.39938 9.79694 1.49701 9.75241 1.61349C9.7113 1.72996 9.69075 1.86356 9.69075 2.01429V5.38H8.27252V2.01429C8.27252 1.67857 8.20572 1.44049 8.07212 1.30004C7.94195 1.15616 7.7484 1.08422 7.49147 1.08422C7.32704 1.08422 7.17117 1.12362 7.02387 1.20241C6.87999 1.27777 6.74468 1.38397 6.61793 1.52099V5.38H5.19971Z" fill="#B2B9C5"/>
|
|
5
|
-
<path d="M14.2998 12.9L11.5998 10.2L11.5998 15.6L14.2998 12.9Z" fill="#B2B9C5"/>
|
|
6
|
-
<rect x="13.1707" y="13.7" width="8" height="1.6" transform="rotate(-180 13.1707 13.7)" fill="#B2B9C5"/>
|
|
7
|
-
<path d="M3.59985 12.9L6.29985 15.6L6.29985 10.2L3.59985 12.9Z" fill="#B2B9C5"/>
|
|
8
|
-
</svg>
|