@eturnity/eturnity_reusable_components 6.42.2-EPDM-6921.0 → 6.42.2-EPDM-7447.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
package/src/App.vue
CHANGED
@@ -1,109 +1,107 @@
|
|
1
1
|
<template>
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
3
3
|
<page-container>
|
4
|
+
<br />
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
height="600px"
|
46
|
-
/>
|
6
|
+
{{ alignItems }}
|
7
|
+
<input-number
|
8
|
+
:value="value"
|
9
|
+
:minNumber="0"
|
10
|
+
unitName="mm"
|
11
|
+
:numberPrecision="0"
|
12
|
+
backgroundColor="transparent"
|
13
|
+
borderColor="eturnityGrey"
|
14
|
+
inputHeight="34px"
|
15
|
+
inputWidth="420px"
|
16
|
+
textAlign="left"
|
17
|
+
:isInteractive="true"
|
18
|
+
:interactionStep="1"
|
19
|
+
@on-input="value = $event"
|
20
|
+
@input-change="changeHandler"
|
21
|
+
@input-focus="focusHandler"
|
22
|
+
@input-blur="blurHandler"
|
23
|
+
>
|
24
|
+
<template v-slot:label>
|
25
|
+
<div>Interactive Label</div>
|
26
|
+
</template>
|
27
|
+
</input-number>
|
28
|
+
|
29
|
+
<dropdown-component openingMode="hover" gap="30px">
|
30
|
+
<template #trigger><i>Click Me</i></template>
|
31
|
+
<template #dropdown>
|
32
|
+
<div>
|
33
|
+
<a href="">test1</a>
|
34
|
+
<button href="">test2</button><br>
|
35
|
+
<p>Text</p>
|
36
|
+
</div>
|
37
|
+
</template>
|
38
|
+
</dropdown-component>
|
39
|
+
|
40
|
+
<videoThumbnail src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
|
41
|
+
playIconColor="red"
|
42
|
+
playIconSize="20px"
|
43
|
+
width="400px"
|
44
|
+
height="600px"
|
45
|
+
/>
|
47
46
|
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
<SwitchField
|
48
|
+
@on-switch-change="onInputChange($event)"
|
49
|
+
:options="[
|
51
50
|
{ value: 0, content: 'zero' },
|
52
51
|
{ value: 1, content: 'one' },
|
53
52
|
{ value: 2, content: 'two' }
|
54
53
|
]"
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
>
|
83
|
-
<template #selector="{ selectedValue }">
|
84
|
-
value selected: {{ selectedValue }}
|
85
|
-
</template>
|
86
|
-
<template #dropdown>
|
87
|
-
<Option
|
88
|
-
v-for="opt in filteredOptionList"
|
89
|
-
:key="opt.id"
|
90
|
-
:value="opt.val"
|
91
|
-
>{{ opt.lookFor }}
|
92
|
-
</Option
|
54
|
+
:value="value"
|
55
|
+
label="label"
|
56
|
+
toggleColor="red"
|
57
|
+
size="large"
|
58
|
+
backgroundColor="blue"
|
59
|
+
labelAlign="left"
|
60
|
+
fontColor="black"
|
61
|
+
:disabled="false"
|
62
|
+
/>
|
63
|
+
<icon
|
64
|
+
name="opacity"
|
65
|
+
color="red"
|
66
|
+
hoveredColor="blue"
|
67
|
+
size="60px"
|
68
|
+
cursor="default"
|
69
|
+
isStriked = "true"
|
70
|
+
/>
|
71
|
+
<Select
|
72
|
+
:value="value"
|
73
|
+
selectWidth="100%"
|
74
|
+
optionWidth="50%"
|
75
|
+
label="that is a label"
|
76
|
+
alignItems="vertical"
|
77
|
+
colorMode="dark"
|
78
|
+
isSearchable="true"
|
79
|
+
@input-change="value = $event"
|
80
|
+
@search-change="searchValue = $event"
|
93
81
|
>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
82
|
+
<template #selector="{ selectedValue }">
|
83
|
+
value selected: {{ selectedValue }}
|
84
|
+
</template>
|
85
|
+
<template #dropdown>
|
86
|
+
<Option
|
87
|
+
v-for="opt in filteredOptionList"
|
88
|
+
:key="opt.id"
|
89
|
+
:value="opt.val"
|
90
|
+
>{{ opt.lookFor }}</Option
|
91
|
+
>
|
92
|
+
</template>
|
93
|
+
</Select>
|
94
|
+
|
95
|
+
|
96
|
+
{{ filteredOptionList }}
|
97
|
+
|
98
|
+
<iconCollection color="red" />
|
101
99
|
</page-container>
|
102
100
|
</ThemeProvider>
|
103
101
|
</template>
|
104
102
|
|
105
103
|
<script>
|
106
|
-
import {ThemeProvider} from 'vue-styled-components'
|
104
|
+
import { ThemeProvider } from 'vue-styled-components'
|
107
105
|
import theme from './assets/theme'
|
108
106
|
import styled from 'vue-styled-components'
|
109
107
|
import InputNumber from '@/components/inputs/inputNumber'
|
@@ -146,14 +144,14 @@ export default {
|
|
146
144
|
value2: 42,
|
147
145
|
companyName: 'toto',
|
148
146
|
optionList: [
|
149
|
-
{id: 'a', val: 'A', lookFor: 'babababa'},
|
150
|
-
{id: 'b', val: 'B', lookFor: 'abab'},
|
151
|
-
{id: 'c', val: 'C', lookFor: 'ccc'},
|
152
|
-
{id: 'd', val: 'D', lookFor: 'ddd'},
|
153
|
-
{id: 'e', val: 'E', lookFor: 'dddee'},
|
154
|
-
{id: 'f', val: 'F', lookFor: 'ddfff'},
|
155
|
-
{id: 'g', val: 'G', lookFor: 'dggg'},
|
156
|
-
{id: 'h', val: 'H', lookFor: 'dddhhh'},
|
147
|
+
{ id: 'a', val: 'A', lookFor: 'babababa' },
|
148
|
+
{ id: 'b', val: 'B', lookFor: 'abab' },
|
149
|
+
{ id: 'c', val: 'C', lookFor: 'ccc' },
|
150
|
+
{ id: 'd', val: 'D', lookFor: 'ddd' },
|
151
|
+
{ id: 'e', val: 'E', lookFor: 'dddee' },
|
152
|
+
{ id: 'f', val: 'F', lookFor: 'ddfff' },
|
153
|
+
{ id: 'g', val: 'G', lookFor: 'dggg' },
|
154
|
+
{ id: 'h', val: 'H', lookFor: 'dddhhh' },
|
157
155
|
],
|
158
156
|
searchValue: ''
|
159
157
|
}
|
@@ -161,7 +159,7 @@ export default {
|
|
161
159
|
computed: {
|
162
160
|
filteredOptionList() {
|
163
161
|
return this.optionList.filter((opt) =>
|
164
|
-
|
162
|
+
opt.lookFor.includes(this.searchValue)
|
165
163
|
)
|
166
164
|
}
|
167
165
|
},
|
@@ -224,7 +222,7 @@ export default {
|
|
224
222
|
]
|
225
223
|
return items
|
226
224
|
},
|
227
|
-
getComponentInfo({row, value}) {
|
225
|
+
getComponentInfo({ row, value }) {
|
228
226
|
let item
|
229
227
|
if (row.selectedValue && row.selectedValue[value]) {
|
230
228
|
item = row.selectedValue[value]
|
@@ -433,6 +433,10 @@ export default {
|
|
433
433
|
labelFontColor: {
|
434
434
|
required: false,
|
435
435
|
default: 'eturnityGrey'
|
436
|
+
},
|
437
|
+
focus:{
|
438
|
+
required: false,
|
439
|
+
default: false
|
436
440
|
}
|
437
441
|
},
|
438
442
|
computed: {
|
@@ -574,7 +578,7 @@ export default {
|
|
574
578
|
}
|
575
579
|
this.isFocused = true
|
576
580
|
this.$nextTick(() => {
|
577
|
-
this.$refs.inputField1.$el.
|
581
|
+
this.$refs.inputField1.$el.focus()
|
578
582
|
})
|
579
583
|
this.$emit('input-focus')
|
580
584
|
},
|
@@ -660,7 +664,17 @@ export default {
|
|
660
664
|
})
|
661
665
|
}
|
662
666
|
},
|
667
|
+
mounted(){
|
668
|
+
if(this.focus){
|
669
|
+
this.focusInput()
|
670
|
+
}
|
671
|
+
},
|
663
672
|
watch: {
|
673
|
+
focus(value){
|
674
|
+
if(value){
|
675
|
+
this.focusInput()
|
676
|
+
}
|
677
|
+
},
|
664
678
|
clearInput: function (value) {
|
665
679
|
if (value) {
|
666
680
|
// If the value is typed, then we should clear the textInput on Continue
|
@@ -32,7 +32,6 @@
|
|
32
32
|
ref="select"
|
33
33
|
@click="toggleDropdown"
|
34
34
|
:selectHeight="selectHeight"
|
35
|
-
:height="height"
|
36
35
|
:selectMinHeight="selectMinHeight"
|
37
36
|
:bgColor="
|
38
37
|
buttonBgColor || colorMode == 'dark' ? 'transparentBlack1' : 'white'
|
@@ -144,7 +143,9 @@ const Caret = styled.div`
|
|
144
143
|
justify-content: center;
|
145
144
|
width: 30px;
|
146
145
|
min-width: 30px;
|
147
|
-
|
146
|
+
height: 100%;
|
147
|
+
align-items: stretch
|
148
|
+
padding-top: 5px;
|
148
149
|
cursor: pointer;
|
149
150
|
margin-left: auto;
|
150
151
|
`
|
@@ -192,7 +193,6 @@ const selectButtonAttrs = {
|
|
192
193
|
hasError: Boolean,
|
193
194
|
disabled: Boolean,
|
194
195
|
selectHeight: String,
|
195
|
-
height: String,
|
196
196
|
selectMinHeight: String,
|
197
197
|
isSearchBarVisible: Boolean,
|
198
198
|
showBorder: Boolean
|
@@ -208,7 +208,6 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
208
208
|
display: flex;
|
209
209
|
align-items: center;
|
210
210
|
max-height: ${(props) => props.selectHeight};
|
211
|
-
${(props) => (props.height ? `height: ${props.height}` : '')};
|
212
211
|
${({ showBorder, theme, hasError }) =>
|
213
212
|
showBorder &&
|
214
213
|
`
|
@@ -310,10 +309,6 @@ export default {
|
|
310
309
|
required: false,
|
311
310
|
default: null
|
312
311
|
},
|
313
|
-
height: {
|
314
|
-
required: false,
|
315
|
-
default: null
|
316
|
-
},
|
317
312
|
selectMinHeight: {
|
318
313
|
required: false,
|
319
314
|
default: '36px'
|