@eturnity/eturnity_reusable_components 6.42.1-EPDM-3013.6 → 6.42.2
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 +3 -6
- package/src/components/iconWrapper/index.vue +118 -125
- package/src/components/inputs/searchInput/index.vue +10 -20
- package/src/components/inputs/select/index.vue +11 -4
- package/src/components/inputs/select/option/index.vue +48 -57
- package/src/helpers/translateLang.js +0 -2
- package/postcss.config.js +0 -6
- package/src/assets/svgIcons/update.svg +0 -3
- package/src/components/filter/filterSettings.vue +0 -644
- package/src/components/filter/index.vue +0 -132
- package/src/components/filter/parentDropdown.vue +0 -91
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "6.42.
|
3
|
+
"version": "6.42.2",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -11,14 +11,11 @@
|
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
13
|
"@vueform/slider": "1.0.5",
|
14
|
+
"core-js": "^3.31.1",
|
14
15
|
"html-loader": "0.5.5",
|
15
|
-
"postcss": "^8.4.25",
|
16
16
|
"v-click-outside": "2.1.4",
|
17
17
|
"vue": "2.6.11",
|
18
|
-
"vue-styled-components": "1.6.0"
|
19
|
-
"vue2-datepicker": "3.11.1",
|
20
|
-
"vuedraggable": "2.24.3",
|
21
|
-
"core-js": "^3.31.1"
|
18
|
+
"vue-styled-components": "1.6.0"
|
22
19
|
},
|
23
20
|
"devDependencies": {
|
24
21
|
"@storybook/addon-actions": "6.2.8",
|
@@ -1,136 +1,129 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
:disabled="disabled"
|
4
|
-
:size="size"
|
5
|
-
:backgroundColor="backgroundColor"
|
2
|
+
<Wrapper
|
3
|
+
:disabled="disabled"
|
4
|
+
:size="size"
|
5
|
+
:backgroundColor="backgroundColor"
|
6
6
|
:borderRadius="borderRadius"
|
7
7
|
:hasBorder="hasBorder"
|
8
8
|
:color="iconColor"
|
9
9
|
:hoveredBackgroundColor="hoveredBackgroundColor"
|
10
10
|
:isHovered="isHovered"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
</template>
|
31
|
-
|
32
|
-
<script>
|
33
|
-
// import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
|
34
|
-
// How to use:
|
35
|
-
//<icon
|
36
|
-
// name="House" //required. a svg file named [name].svg should be present in /assets/svgIcons
|
37
|
-
// color="red"
|
38
|
-
// hoveredColor="blue"
|
39
|
-
// size="60px" by default, this is 30px
|
40
|
-
// />
|
41
|
-
|
42
|
-
import styled from 'vue-styled-components'
|
43
|
-
import icon from '../icon'
|
44
|
-
const wrapperAttrs = {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
props.hoveredBackgroundColor
|
68
|
-
: ''};
|
69
|
-
&:hover {
|
70
|
-
background-color: ${(props) =>
|
71
|
-
props.theme.colors[props.hoveredBackgroundColor] ||
|
72
|
-
props.hoveredBackgroundColor};
|
73
|
-
}
|
74
|
-
`
|
75
|
-
const caret = styled.div`
|
76
|
-
position: absolute;
|
77
|
-
bottom: 3px;
|
78
|
-
right: 2px;
|
79
|
-
height: 10px;
|
80
|
-
`
|
11
|
+
>
|
12
|
+
<icon :disabled="disabled"
|
13
|
+
:size="iconSize"
|
14
|
+
:name="name"
|
15
|
+
:color="iconColor"
|
16
|
+
:hoveredColor="hoveredIconColor"
|
17
|
+
:isStriked="isStriked"
|
18
|
+
/>
|
19
|
+
|
20
|
+
<caret v-if="hasCaret">
|
21
|
+
<iconWrapper :disabled="disabled"
|
22
|
+
size="10px"
|
23
|
+
name="arrow_down"
|
24
|
+
:iconColor="iconColor"
|
25
|
+
:hoveredBackgroundColor="hoveredIconColor"
|
26
|
+
borderRadius="1px"
|
27
|
+
/>
|
28
|
+
</caret>
|
29
|
+
</Wrapper>
|
30
|
+
</template>
|
31
|
+
|
32
|
+
<script>
|
33
|
+
// import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
|
34
|
+
// How to use:
|
35
|
+
//<icon
|
36
|
+
// name="House" //required. a svg file named [name].svg should be present in /assets/svgIcons
|
37
|
+
// color="red"
|
38
|
+
// hoveredColor="blue"
|
39
|
+
// size="60px" by default, this is 30px
|
40
|
+
// />
|
41
|
+
|
42
|
+
import styled from 'vue-styled-components'
|
43
|
+
import icon from '../icon'
|
44
|
+
const wrapperAttrs = { color: String, isHovered:Boolean,borderRadius:String,disabled: Boolean, size: String,backgroundColor:String,hoveredBackgroundColor:String,hasBorder:Boolean }
|
45
|
+
const Wrapper = styled('div', wrapperAttrs)`
|
46
|
+
position:relative;
|
47
|
+
display: inline-flex;
|
48
|
+
width: ${(props) => props.size};
|
49
|
+
height: ${(props) => props.size};
|
50
|
+
border: ${(props) => props.hasBorder? 'solid 1px '+props.theme.colors[props.color] || props.color : ""};
|
51
|
+
justify-content:center;
|
52
|
+
align-items:center;
|
53
|
+
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
|
54
|
+
background-color: ${(props)=>props.theme.colors[props.backgroundColor] || props.backgroundColor};
|
55
|
+
border-radius: ${(props) => props.borderRadius};
|
56
|
+
${(props)=>(props.isHovered ? 'background-color:'+props.theme.colors[props.hoveredBackgroundColor] || props.hoveredBackgroundColor : "")};
|
57
|
+
&:hover{
|
58
|
+
background-color:${(props)=>props.theme.colors[props.hoveredBackgroundColor] || props.hoveredBackgroundColor};
|
59
|
+
}
|
60
|
+
`
|
61
|
+
const caret=styled.div`
|
62
|
+
position:absolute;
|
63
|
+
bottom:3px;
|
64
|
+
right:2px;
|
65
|
+
height:10px;
|
66
|
+
`
|
81
67
|
|
82
|
-
export default {
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
},
|
89
|
-
props: {
|
90
|
-
disabled: {
|
91
|
-
required: false,
|
92
|
-
default: false
|
93
|
-
},
|
94
|
-
name: {
|
95
|
-
required: true
|
96
|
-
},
|
97
|
-
iconColor: {
|
98
|
-
required: false,
|
99
|
-
default: 'white'
|
100
|
-
},
|
101
|
-
hoveredIconColor: {
|
102
|
-
required: false
|
103
|
-
},
|
104
|
-
backgroundColor: {
|
105
|
-
required: false
|
106
|
-
},
|
107
|
-
hoveredBackgroundColor: {
|
108
|
-
required: false,
|
109
|
-
default: 'transparentWhite1'
|
110
|
-
},
|
111
|
-
size: {
|
112
|
-
required: false,
|
113
|
-
default: '32px'
|
114
|
-
},
|
115
|
-
iconSize: {
|
116
|
-
required: false,
|
117
|
-
default: '18px'
|
118
|
-
},
|
119
|
-
hasCaret: {
|
120
|
-
required: false,
|
121
|
-
default: false
|
68
|
+
export default {
|
69
|
+
name: 'iconWrapper',
|
70
|
+
components: {
|
71
|
+
Wrapper,
|
72
|
+
icon,
|
73
|
+
caret
|
122
74
|
},
|
123
|
-
|
124
|
-
|
125
|
-
|
75
|
+
props: {
|
76
|
+
disabled: {
|
77
|
+
required: false,
|
78
|
+
default: false
|
79
|
+
},
|
80
|
+
name: {
|
81
|
+
required: true
|
82
|
+
},
|
83
|
+
iconColor: {
|
84
|
+
required: false,
|
85
|
+
default: 'white'
|
86
|
+
},
|
87
|
+
hoveredIconColor: {
|
88
|
+
required: false
|
89
|
+
},
|
90
|
+
backgroundColor: {
|
91
|
+
required: false,
|
92
|
+
},
|
93
|
+
hasBorder: {
|
94
|
+
required: false,
|
95
|
+
},
|
96
|
+
hoveredBackgroundColor: {
|
97
|
+
required: false,
|
98
|
+
default:"transparentWhite1"
|
99
|
+
},
|
100
|
+
size: {
|
101
|
+
required: false,
|
102
|
+
default: '32px'
|
103
|
+
},
|
104
|
+
iconSize:{
|
105
|
+
required: false,
|
106
|
+
default:'18px'
|
107
|
+
},
|
108
|
+
hasCaret:{
|
109
|
+
required: false,
|
110
|
+
default: false
|
111
|
+
},
|
112
|
+
borderRadius:{
|
113
|
+
required:false,
|
114
|
+
default:'4px'
|
115
|
+
},
|
116
|
+
isHovered:{
|
117
|
+
required:false,
|
118
|
+
default:false
|
119
|
+
},
|
120
|
+
isStriked:{
|
121
|
+
required:false,
|
122
|
+
default:false
|
123
|
+
}
|
126
124
|
},
|
127
|
-
|
128
|
-
|
129
|
-
default: false
|
125
|
+
data() {
|
126
|
+
return {}
|
130
127
|
}
|
131
|
-
},
|
132
|
-
data() {
|
133
|
-
return {}
|
134
128
|
}
|
135
|
-
|
136
|
-
</script>
|
129
|
+
</script>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<container
|
2
|
+
<container>
|
3
3
|
<input-wrapper>
|
4
4
|
<input-container
|
5
5
|
ref="inputElement"
|
@@ -9,7 +9,6 @@
|
|
9
9
|
:disabled="disabled"
|
10
10
|
:isDisabled="disabled"
|
11
11
|
:inputWidth="inputWidth"
|
12
|
-
:isFilter="isFilter"
|
13
12
|
:hasFocus="hasFocus"
|
14
13
|
/>
|
15
14
|
<img
|
@@ -29,24 +28,18 @@
|
|
29
28
|
// :disabled="true"
|
30
29
|
// inputWidth="250px"
|
31
30
|
// @on-change="function($event)"
|
32
|
-
// :isFilter="true" // to set the height at 30px
|
33
31
|
// />
|
34
32
|
import styled from 'vue-styled-components'
|
35
33
|
|
36
|
-
const
|
37
|
-
|
38
|
-
inputWidth: String,
|
39
|
-
isFilter: Boolean
|
40
|
-
}
|
41
|
-
const Container = styled('div', inputAttrs)`
|
42
|
-
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
34
|
+
const Container = styled.div`
|
35
|
+
width: 100%;
|
43
36
|
position: relative;
|
44
37
|
`
|
45
38
|
|
39
|
+
const inputAttrs = { isDisabled: Boolean, inputWidth: String }
|
46
40
|
const InputContainer = styled('input', inputAttrs)`
|
47
|
-
border: 1px solid ${(props) => props.theme.colors.
|
48
|
-
padding:
|
49
|
-
props.isFilter ? '7px 30px 7px 10px' : '11px 30px 11px 10px'};
|
41
|
+
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
42
|
+
padding: 11px 30px 11px 10px;
|
50
43
|
border-radius: 4px;
|
51
44
|
font-size: 13px;
|
52
45
|
color: ${(props) => props.theme.colors.black};
|
@@ -97,10 +90,6 @@ export default {
|
|
97
90
|
required: false,
|
98
91
|
default: null
|
99
92
|
},
|
100
|
-
isFilter: {
|
101
|
-
required: false,
|
102
|
-
default: false
|
103
|
-
},
|
104
93
|
hasFocus: {
|
105
94
|
required: false,
|
106
95
|
default: false
|
@@ -110,10 +99,10 @@ export default {
|
|
110
99
|
onChangeHandler(event) {
|
111
100
|
this.$emit('on-change', event)
|
112
101
|
},
|
113
|
-
focusInputElement()
|
102
|
+
focusInputElement(){
|
114
103
|
this.$nextTick(() => {
|
115
|
-
this.$refs.inputElement.$el.focus()
|
116
|
-
})
|
104
|
+
this.$refs.inputElement.$el.focus();
|
105
|
+
});
|
117
106
|
}
|
118
107
|
},
|
119
108
|
watch: {
|
@@ -123,5 +112,6 @@ export default {
|
|
123
112
|
}
|
124
113
|
}
|
125
114
|
}
|
115
|
+
|
126
116
|
}
|
127
117
|
</script>
|
@@ -32,6 +32,7 @@
|
|
32
32
|
ref="select"
|
33
33
|
@click="toggleDropdown"
|
34
34
|
:selectHeight="selectHeight"
|
35
|
+
:selectMinHeight="selectMinHeight"
|
35
36
|
:bgColor="
|
36
37
|
buttonBgColor || colorMode == 'dark' ? 'transparentBlack1' : 'white'
|
37
38
|
"
|
@@ -144,6 +145,7 @@ const Caret = styled.div`
|
|
144
145
|
min-width: 30px;
|
145
146
|
height: 100%;
|
146
147
|
align-items: stretch
|
148
|
+
padding-top: 5px;
|
147
149
|
cursor: pointer;
|
148
150
|
margin-left: auto;
|
149
151
|
`
|
@@ -191,6 +193,7 @@ const selectButtonAttrs = {
|
|
191
193
|
hasError: Boolean,
|
192
194
|
disabled: Boolean,
|
193
195
|
selectHeight: String,
|
196
|
+
selectMinHeight: String,
|
194
197
|
isSearchBarVisible: Boolean,
|
195
198
|
showBorder: Boolean
|
196
199
|
}
|
@@ -201,7 +204,7 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
201
204
|
padding: ${(props) => (props.isSearchBarVisible ? '0' : '0px 0px 0 15px')};
|
202
205
|
text-align: left;
|
203
206
|
border-radius: 4px;
|
204
|
-
min-height:
|
207
|
+
min-height: ${(props) => props.selectMinHeight};
|
205
208
|
display: flex;
|
206
209
|
align-items: center;
|
207
210
|
max-height: ${(props) => props.selectHeight};
|
@@ -251,9 +254,8 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
|
|
251
254
|
props.theme.colors[props.fontColor]
|
252
255
|
? props.theme.colors[props.fontColor]
|
253
256
|
: props.fontColor};
|
254
|
-
max-height:
|
255
|
-
|
256
|
-
overflow-y: auto;
|
257
|
+
max-height:300px;
|
258
|
+
overflow-y:auto;
|
257
259
|
& [data-value="${(props) => props.selectedValue}"]{
|
258
260
|
backdrop-filter: brightness(1.4);
|
259
261
|
}
|
@@ -303,9 +305,14 @@ export default {
|
|
303
305
|
default: null
|
304
306
|
},
|
305
307
|
selectHeight: {
|
308
|
+
type: String,
|
306
309
|
required: false,
|
307
310
|
default: null
|
308
311
|
},
|
312
|
+
selectMinHeight: {
|
313
|
+
required: false,
|
314
|
+
default: '36px'
|
315
|
+
},
|
309
316
|
optionWidth: {
|
310
317
|
required: false,
|
311
318
|
default: null
|
@@ -1,68 +1,59 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
@click="clickHandler"
|
8
|
-
@mouseover="hoverHandler"
|
9
|
-
>
|
10
|
-
<slot></slot>
|
11
|
-
</optionContainer>
|
12
|
-
</template>
|
2
|
+
<optionContainer :data-value="value" :hoveredBgColor="hoveredBgColor || colorMode=='dark'?'#000000':'grey5'" @click="clickHandler" @mouseover="hoverHandler">
|
3
|
+
<slot></slot>
|
4
|
+
</optionContainer>
|
5
|
+
</template>
|
13
6
|
|
14
|
-
<script>
|
7
|
+
<script>
|
15
8
|
// import selectButton from './selectButton'
|
16
9
|
// import selectDropdown from './selectDropDown'
|
17
|
-
import styled from 'vue-styled-components'
|
18
|
-
const optionProps
|
19
|
-
const optionContainer = styled('div',
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
: props.hoveredBgColor};
|
34
|
-
}
|
35
|
-
`
|
10
|
+
import styled from 'vue-styled-components'
|
11
|
+
const optionProps={hoveredBgColor:String}
|
12
|
+
const optionContainer = styled('div',optionProps)`
|
13
|
+
display:flex;
|
14
|
+
cursor: pointer;
|
15
|
+
flex-direction: row;
|
16
|
+
justify-content: space-between;
|
17
|
+
align-items: center;
|
18
|
+
padding: 12px 10px;
|
19
|
+
gap: 14px;
|
20
|
+
width:100%;
|
21
|
+
box-sizing:inherit;
|
22
|
+
&:hover{
|
23
|
+
background-color:${(props) => props.theme.colors[props.hoveredBgColor]?props.theme.colors[props.hoveredBgColor]:props.hoveredBgColor};
|
24
|
+
}
|
25
|
+
`
|
36
26
|
|
37
|
-
export default {
|
38
|
-
|
27
|
+
export default {
|
28
|
+
name: 'RCoption',
|
39
29
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
30
|
+
props: {
|
31
|
+
value: {
|
32
|
+
required: true
|
33
|
+
},
|
34
|
+
hoveredBgColor:{
|
35
|
+
required:false,
|
36
|
+
},
|
37
|
+
colorMode:{
|
38
|
+
required:false,
|
39
|
+
default:'light'
|
40
|
+
}
|
46
41
|
},
|
47
|
-
colorMode: {
|
48
|
-
required: false,
|
49
|
-
default: 'light'
|
50
|
-
}
|
51
|
-
},
|
52
42
|
|
53
|
-
|
43
|
+
components: {optionContainer},
|
54
44
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
45
|
+
data() {
|
46
|
+
return {}
|
47
|
+
},
|
48
|
+
methods:{
|
49
|
+
clickHandler(){
|
50
|
+
this.$parent.$emit('option-selected',this.value)
|
51
|
+
},
|
52
|
+
hoverHandler(){
|
53
|
+
this.$parent.$emit('option-hovered',this.value)
|
54
|
+
}
|
61
55
|
},
|
62
|
-
|
63
|
-
this.$parent.$emit('option-hovered', this.value)
|
56
|
+
computed: {
|
64
57
|
}
|
65
|
-
}
|
66
|
-
|
67
|
-
}
|
68
|
-
</script>
|
58
|
+
}
|
59
|
+
</script>
|
package/postcss.config.js
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M11.4545 4.45454L8.90909 7H10.8182C10.8182 9.10636 9.10636 10.8182 7 10.8182C6.35727 10.8182 5.74636 10.6591 5.21818 10.3727L4.28909 11.3018C5.07182 11.7982 6.00091 12.0909 7 12.0909C9.81273 12.0909 12.0909 9.81272 12.0909 7H14L11.4545 4.45454ZM3.18182 7C3.18182 4.89363 4.89364 3.18182 7 3.18182C7.64273 3.18182 8.25364 3.34091 8.78182 3.62727L9.71091 2.69818C8.92818 2.20182 7.99909 1.90909 7 1.90909C4.18727 1.90909 1.90909 4.18727 1.90909 7H0L2.54545 9.54545L5.09091 7H3.18182Z" fill="#263238"/>
|
3
|
-
</svg>
|