@eturnity/eturnity_reusable_components 1.2.84 → 1.2.85-EPDM-3013.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 +6 -3
- package/postcss.config.js +6 -0
- package/src/assets/svgIcons/subdirectory.svg +1 -0
- package/src/assets/svgIcons/upload_image_tool.svg +7 -0
- package/src/components/filter/filterSettings.vue +612 -0
- package/src/components/filter/index.vue +123 -0
- package/src/components/filter/parentDropdown.vue +91 -0
- package/src/components/icon/index.vue +3 -1
- package/src/components/iconWrapper/index.vue +125 -107
- package/src/components/inputs/inputNumber/index.vue +2 -1
- package/src/components/inputs/inputText/index.vue +10 -3
- package/src/components/inputs/searchInput/index.vue +20 -10
- package/src/components/inputs/select/index.vue +18 -8
- package/src/components/inputs/select/option/index.vue +57 -48
- package/src/components/pagination/index.vue +137 -0
- package/src/components/tables/mainTable/index.vue +1 -0
- package/src/helpers/translateLang.js +2 -0
@@ -0,0 +1,123 @@
|
|
1
|
+
<template>
|
2
|
+
<page-wrapper ref="dropdown">
|
3
|
+
<parent-dropdown
|
4
|
+
@on-toggle="onToggleDropdown()"
|
5
|
+
:isOpen="isDropdownOpen"
|
6
|
+
:dropdownText="dropdownText ? dropdownText : 'Default view'"
|
7
|
+
/>
|
8
|
+
<filter-settings
|
9
|
+
v-if="isDropdownOpen"
|
10
|
+
:filterData="filterData"
|
11
|
+
:filterViews="filterViews"
|
12
|
+
:buttonText="buttonText"
|
13
|
+
@on-view-select="onViewSelect($event)"
|
14
|
+
@on-view-delete="onViewDelete($event)"
|
15
|
+
@on-save-new-view="$emit('on-save-new-view')"
|
16
|
+
@on-filter-change="onFilterChange($event)"
|
17
|
+
@on-cancel-view="onCancelSettings()"
|
18
|
+
@on-drag-change="$emit('on-drag-change', $event)"
|
19
|
+
@on-apply-current-view="onApplyCurrentView()"
|
20
|
+
@on-prevent-close="onPreventClose($event)"
|
21
|
+
:hasActiveView="hasActiveView"
|
22
|
+
:activeView="activeView"
|
23
|
+
:activeLanguage="activeLanguage"
|
24
|
+
:settingsTranslations="settingsTranslations"
|
25
|
+
/>
|
26
|
+
</page-wrapper>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script>
|
30
|
+
import styled from 'vue-styled-components'
|
31
|
+
import parentDropdown from './parentDropdown'
|
32
|
+
import filterSettings from './filterSettings'
|
33
|
+
|
34
|
+
const PageWrapper = styled.div`
|
35
|
+
position: relative;
|
36
|
+
`
|
37
|
+
|
38
|
+
export default {
|
39
|
+
name: 'filter-component',
|
40
|
+
components: {
|
41
|
+
parentDropdown,
|
42
|
+
PageWrapper,
|
43
|
+
filterSettings
|
44
|
+
},
|
45
|
+
props: {
|
46
|
+
filterData: {
|
47
|
+
required: true
|
48
|
+
},
|
49
|
+
dropdownText: {
|
50
|
+
required: false
|
51
|
+
},
|
52
|
+
filterViews: {
|
53
|
+
required: true
|
54
|
+
},
|
55
|
+
activeView: {
|
56
|
+
required: false,
|
57
|
+
default: null
|
58
|
+
},
|
59
|
+
buttonText: {
|
60
|
+
required: false
|
61
|
+
},
|
62
|
+
hasActiveView: {
|
63
|
+
required: false
|
64
|
+
},
|
65
|
+
activeLanguage: {
|
66
|
+
required: false,
|
67
|
+
default: 'en-us'
|
68
|
+
},
|
69
|
+
settingsTranslations: {
|
70
|
+
required: false
|
71
|
+
}
|
72
|
+
},
|
73
|
+
data() {
|
74
|
+
return {
|
75
|
+
isDropdownOpen: false,
|
76
|
+
activeFilter: null,
|
77
|
+
preventOutsideClick: false
|
78
|
+
}
|
79
|
+
},
|
80
|
+
methods: {
|
81
|
+
onToggleDropdown() {
|
82
|
+
this.isDropdownOpen = !this.isDropdownOpen
|
83
|
+
},
|
84
|
+
clickOutside(event) {
|
85
|
+
if (
|
86
|
+
!this.$refs.dropdown.$el.contains(event.target) &&
|
87
|
+
!this.preventOutsideClick
|
88
|
+
) {
|
89
|
+
this.isDropdownOpen = false
|
90
|
+
}
|
91
|
+
},
|
92
|
+
onPreventClose(value) {
|
93
|
+
setTimeout(() => {
|
94
|
+
this.preventOutsideClick = value
|
95
|
+
}, 100)
|
96
|
+
},
|
97
|
+
onFilterChange(data) {
|
98
|
+
this.$emit('on-filter-settings-change', data)
|
99
|
+
},
|
100
|
+
onCancelSettings() {
|
101
|
+
this.onToggleDropdown()
|
102
|
+
this.$emit('on-cancel-view')
|
103
|
+
},
|
104
|
+
onViewSelect(item) {
|
105
|
+
this.onToggleDropdown()
|
106
|
+
this.$emit('on-filter-view-select', item)
|
107
|
+
},
|
108
|
+
onViewDelete(item) {
|
109
|
+
this.$emit('on-filter-view-delete', item)
|
110
|
+
},
|
111
|
+
onApplyCurrentView() {
|
112
|
+
this.onToggleDropdown()
|
113
|
+
this.$emit('on-apply-current-view')
|
114
|
+
}
|
115
|
+
},
|
116
|
+
mounted() {
|
117
|
+
document.addEventListener('click', this.clickOutside)
|
118
|
+
},
|
119
|
+
beforeDestroy() {
|
120
|
+
document.removeEventListener('click', this.clickOutside)
|
121
|
+
}
|
122
|
+
}
|
123
|
+
</script>
|
@@ -0,0 +1,91 @@
|
|
1
|
+
<template>
|
2
|
+
<page-wrapper @click="$emit('on-toggle')">
|
3
|
+
<icon-wrapper>
|
4
|
+
<icon name="settings" size="18px" />
|
5
|
+
</icon-wrapper>
|
6
|
+
<title-wrapper :isOpen="isOpen">
|
7
|
+
<title-text>
|
8
|
+
{{ dropdownText }}
|
9
|
+
</title-text>
|
10
|
+
<arrow-wrapper>
|
11
|
+
<icon
|
12
|
+
@click.native.stop="$emit('on-toggle')"
|
13
|
+
:name="isOpen ? 'arrow_up' : 'arrow_down'"
|
14
|
+
size="12px"
|
15
|
+
/>
|
16
|
+
</arrow-wrapper>
|
17
|
+
</title-wrapper>
|
18
|
+
</page-wrapper>
|
19
|
+
</template>
|
20
|
+
|
21
|
+
<script>
|
22
|
+
import styled from 'vue-styled-components'
|
23
|
+
import Icon from '../icon'
|
24
|
+
|
25
|
+
const PageWrapper = styled.div`
|
26
|
+
display: grid;
|
27
|
+
grid-template-columns: auto auto;
|
28
|
+
cursor: pointer;
|
29
|
+
`
|
30
|
+
|
31
|
+
const IconWrapper = styled.div`
|
32
|
+
display: grid;
|
33
|
+
align-items: center;
|
34
|
+
justify-items: center;
|
35
|
+
border: 1px solid ${(props) => props.theme.colors.grey4};
|
36
|
+
border-radius: 4px 0px 0px 4px;
|
37
|
+
padding: 6px;
|
38
|
+
`
|
39
|
+
|
40
|
+
const TitleAttrs = { isOpen: Boolean }
|
41
|
+
const TitleWrapper = styled('div', TitleAttrs)`
|
42
|
+
display: grid;
|
43
|
+
grid-template-columns: auto auto;
|
44
|
+
align-items: center;
|
45
|
+
justify-items: center;
|
46
|
+
grid-gap: 10px;
|
47
|
+
border: 1px solid ${(props) => props.theme.colors.grey4};
|
48
|
+
background-color: ${(props) =>
|
49
|
+
props.isOpen ? props.theme.colors.grey5 : props.theme.colors.white};
|
50
|
+
border-left: none;
|
51
|
+
border-radius: 0px 4px 4px 0px;
|
52
|
+
padding: 6px 14px;
|
53
|
+
user-select: none;
|
54
|
+
`
|
55
|
+
|
56
|
+
const TitleText = styled.div`
|
57
|
+
font-size: 13px;
|
58
|
+
`
|
59
|
+
|
60
|
+
const ArrowWrapper = styled.div`
|
61
|
+
display: grid;
|
62
|
+
align-items: center;
|
63
|
+
|
64
|
+
div {
|
65
|
+
height: auto !important;
|
66
|
+
min-height: unset;
|
67
|
+
}
|
68
|
+
`
|
69
|
+
|
70
|
+
export default {
|
71
|
+
name: 'parent-dropdown',
|
72
|
+
components: {
|
73
|
+
PageWrapper,
|
74
|
+
Icon,
|
75
|
+
IconWrapper,
|
76
|
+
TitleWrapper,
|
77
|
+
TitleText,
|
78
|
+
ArrowWrapper
|
79
|
+
},
|
80
|
+
props: {
|
81
|
+
isOpen: {
|
82
|
+
required: true,
|
83
|
+
default: false
|
84
|
+
},
|
85
|
+
dropdownText: {
|
86
|
+
required: true,
|
87
|
+
default: 'View'
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
</script>
|
@@ -27,7 +27,9 @@ import styled from 'vue-styled-components'
|
|
27
27
|
|
28
28
|
const wrapperAttrs = { isDisabled: Boolean, size: String, cursor: String }
|
29
29
|
const Wrapper = styled('div', wrapperAttrs)`
|
30
|
-
display:
|
30
|
+
display: flex;
|
31
|
+
align-content: center;
|
32
|
+
justify-content: center;
|
31
33
|
width: ${(props) => props.size};
|
32
34
|
height: ${(props) => props.size};
|
33
35
|
min-width: ${(props) => props.size};
|
@@ -1,116 +1,134 @@
|
|
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
|
:hoveredBackgroundColor="hoveredBackgroundColor"
|
8
8
|
:isHovered="isHovered"
|
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
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
9
|
+
>
|
10
|
+
<icon
|
11
|
+
:disabled="disabled"
|
12
|
+
:size="iconSize"
|
13
|
+
:name="name"
|
14
|
+
:color="iconColor"
|
15
|
+
:hoveredColor="hoveredIconColor"
|
16
|
+
/>
|
17
|
+
<caret v-if="hasCaret">
|
18
|
+
<iconWrapper
|
19
|
+
:disabled="disabled"
|
20
|
+
size="10px"
|
21
|
+
name="arrow_down"
|
22
|
+
:iconColor="iconColor"
|
23
|
+
:hoveredBackgroundColor="hoveredIconColor"
|
24
|
+
borderRadius="1px"
|
25
|
+
/>
|
26
|
+
</caret>
|
27
|
+
</Wrapper>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
<script>
|
31
|
+
// import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
|
32
|
+
// How to use:
|
33
|
+
//<icon
|
34
|
+
// name="House" //required. a svg file named [name].svg should be present in /assets/svgIcons
|
35
|
+
// color="red"
|
36
|
+
// hoveredColor="blue"
|
37
|
+
// size="60px" by default, this is 30px
|
38
|
+
// />
|
39
|
+
|
40
|
+
import styled from 'vue-styled-components'
|
41
|
+
import icon from '../icon'
|
42
|
+
const wrapperAttrs = {
|
43
|
+
isHovered: Boolean,
|
44
|
+
borderRadius: String,
|
45
|
+
disabled: Boolean,
|
46
|
+
size: String,
|
47
|
+
backgroundColor: String,
|
48
|
+
hoveredBackgroundColor: String
|
49
|
+
}
|
50
|
+
const Wrapper = styled('div', wrapperAttrs)`
|
51
|
+
position: relative;
|
52
|
+
display: inline-flex;
|
53
|
+
width: ${(props) => props.size};
|
54
|
+
height: ${(props) => props.size};
|
55
|
+
justify-content: center;
|
56
|
+
align-items: center;
|
57
|
+
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
|
58
|
+
background-color: ${(props) =>
|
59
|
+
props.theme.colors[props.backgroundColor] || props.backgroundColor};
|
60
|
+
border-radius: ${(props) => props.borderRadius};
|
61
|
+
${(props) =>
|
62
|
+
props.isHovered
|
63
|
+
? 'background-color:' +
|
64
|
+
props.theme.colors[props.hoveredBackgroundColor] ||
|
65
|
+
props.hoveredBackgroundColor
|
66
|
+
: ''};
|
67
|
+
&:hover {
|
68
|
+
background-color: ${(props) =>
|
69
|
+
props.theme.colors[props.hoveredBackgroundColor] ||
|
70
|
+
props.hoveredBackgroundColor};
|
71
|
+
}
|
72
|
+
`
|
73
|
+
const caret = styled.div`
|
74
|
+
position: absolute;
|
75
|
+
bottom: 3px;
|
76
|
+
right: 2px;
|
77
|
+
height: 10px;
|
78
|
+
`
|
61
79
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
80
|
+
export default {
|
81
|
+
name: 'iconWrapper',
|
82
|
+
components: {
|
83
|
+
Wrapper,
|
84
|
+
icon,
|
85
|
+
caret
|
86
|
+
},
|
87
|
+
props: {
|
88
|
+
disabled: {
|
89
|
+
required: false,
|
90
|
+
default: false
|
91
|
+
},
|
92
|
+
name: {
|
93
|
+
required: true
|
94
|
+
},
|
95
|
+
iconColor: {
|
96
|
+
required: false,
|
97
|
+
default: 'white'
|
98
|
+
},
|
99
|
+
hoveredIconColor: {
|
100
|
+
required: false
|
101
|
+
},
|
102
|
+
backgroundColor: {
|
103
|
+
required: false
|
104
|
+
},
|
105
|
+
hoveredBackgroundColor: {
|
106
|
+
required: false,
|
107
|
+
default: 'transparentWhite1'
|
108
|
+
},
|
109
|
+
size: {
|
110
|
+
required: false,
|
111
|
+
default: '32px'
|
112
|
+
},
|
113
|
+
iconSize: {
|
114
|
+
required: false,
|
115
|
+
default: '18px'
|
116
|
+
},
|
117
|
+
hasCaret: {
|
118
|
+
required: false,
|
119
|
+
default: false
|
68
120
|
},
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
default: false
|
73
|
-
},
|
74
|
-
name: {
|
75
|
-
required: true
|
76
|
-
},
|
77
|
-
iconColor: {
|
78
|
-
required: false,
|
79
|
-
default: 'white'
|
80
|
-
},
|
81
|
-
hoveredIconColor: {
|
82
|
-
required: false
|
83
|
-
},
|
84
|
-
backgroundColor: {
|
85
|
-
required: false,
|
86
|
-
},
|
87
|
-
hoveredBackgroundColor: {
|
88
|
-
required: false,
|
89
|
-
default:"transparentWhite1"
|
90
|
-
},
|
91
|
-
size: {
|
92
|
-
required: false,
|
93
|
-
default: '32px'
|
94
|
-
},
|
95
|
-
iconSize:{
|
96
|
-
required: false,
|
97
|
-
default:'18px'
|
98
|
-
},
|
99
|
-
hasCaret:{
|
100
|
-
required: false,
|
101
|
-
default: false
|
102
|
-
},
|
103
|
-
borderRadius:{
|
104
|
-
required:false,
|
105
|
-
default:'6px'
|
106
|
-
},
|
107
|
-
isHovered:{
|
108
|
-
required:false,
|
109
|
-
default:false
|
110
|
-
}
|
121
|
+
borderRadius: {
|
122
|
+
required: false,
|
123
|
+
default: '6px'
|
111
124
|
},
|
112
|
-
|
113
|
-
|
125
|
+
isHovered: {
|
126
|
+
required: false,
|
127
|
+
default: false
|
114
128
|
}
|
129
|
+
},
|
130
|
+
data() {
|
131
|
+
return {}
|
115
132
|
}
|
116
|
-
|
133
|
+
}
|
134
|
+
</script>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<label-wrapper v-if="label">
|
8
8
|
<input-label :labelFontColor="labelFontColor" :fontSize="fontSize">{{
|
9
9
|
label
|
10
|
-
}}</input-label>
|
10
|
+
}} <optionalLabel v-if="labelOptional">({{ $gettext('Optional') }})</optionalLabel></input-label>
|
11
11
|
<info-text
|
12
12
|
v-if="infoTextMessage"
|
13
13
|
:text="infoTextMessage"
|
@@ -81,7 +81,9 @@ const InputLabel = styled('div', labelAttrs)`
|
|
81
81
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
82
82
|
font-weight: 700;
|
83
83
|
`
|
84
|
-
|
84
|
+
const optionalLabel = styled.span`
|
85
|
+
font-weight: 300;
|
86
|
+
`
|
85
87
|
const LabelWrapper = styled.div`
|
86
88
|
display: inline-grid;
|
87
89
|
grid-template-columns: auto auto;
|
@@ -217,7 +219,8 @@ export default {
|
|
217
219
|
Icon,
|
218
220
|
IconWrapper,
|
219
221
|
IconContainer,
|
220
|
-
InputErrorWrapper
|
222
|
+
InputErrorWrapper,
|
223
|
+
optionalLabel
|
221
224
|
},
|
222
225
|
data() {
|
223
226
|
return {
|
@@ -266,6 +269,10 @@ export default {
|
|
266
269
|
label: {
|
267
270
|
required: false
|
268
271
|
},
|
272
|
+
labelOptional: {
|
273
|
+
required: false,
|
274
|
+
default: false
|
275
|
+
},
|
269
276
|
noBorder: {
|
270
277
|
required: false,
|
271
278
|
default: false
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<container>
|
2
|
+
<container :inputWidth="inputWidth">
|
3
3
|
<input-wrapper>
|
4
4
|
<input-container
|
5
5
|
ref="inputElement"
|
@@ -9,6 +9,7 @@
|
|
9
9
|
:disabled="disabled"
|
10
10
|
:isDisabled="disabled"
|
11
11
|
:inputWidth="inputWidth"
|
12
|
+
:isFilter="isFilter"
|
12
13
|
:hasFocus="hasFocus"
|
13
14
|
/>
|
14
15
|
<img
|
@@ -28,18 +29,24 @@
|
|
28
29
|
// :disabled="true"
|
29
30
|
// inputWidth="250px"
|
30
31
|
// @on-change="function($event)"
|
32
|
+
// :isFilter="true" // to set the height at 30px
|
31
33
|
// />
|
32
34
|
import styled from 'vue-styled-components'
|
33
35
|
|
34
|
-
const
|
35
|
-
|
36
|
+
const inputAttrs = {
|
37
|
+
isDisabled: Boolean,
|
38
|
+
inputWidth: String,
|
39
|
+
isFilter: Boolean
|
40
|
+
}
|
41
|
+
const Container = styled('div', inputAttrs)`
|
42
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
36
43
|
position: relative;
|
37
44
|
`
|
38
45
|
|
39
|
-
const inputAttrs = { isDisabled: Boolean, inputWidth: String }
|
40
46
|
const InputContainer = styled('input', inputAttrs)`
|
41
|
-
border: 1px solid ${(props) => props.theme.colors.
|
42
|
-
padding:
|
47
|
+
border: 1px solid ${(props) => props.theme.colors.grey4};
|
48
|
+
padding: ${(props) =>
|
49
|
+
props.isFilter ? '7px 30px 7px 10px' : '11px 30px 11px 10px'};
|
43
50
|
border-radius: 4px;
|
44
51
|
font-size: 13px;
|
45
52
|
color: ${(props) => props.theme.colors.black};
|
@@ -90,6 +97,10 @@ export default {
|
|
90
97
|
required: false,
|
91
98
|
default: null
|
92
99
|
},
|
100
|
+
isFilter: {
|
101
|
+
required: false,
|
102
|
+
default: false
|
103
|
+
},
|
93
104
|
hasFocus: {
|
94
105
|
required: false,
|
95
106
|
default: false
|
@@ -99,10 +110,10 @@ export default {
|
|
99
110
|
onChangeHandler(event) {
|
100
111
|
this.$emit('on-change', event)
|
101
112
|
},
|
102
|
-
focusInputElement(){
|
113
|
+
focusInputElement() {
|
103
114
|
this.$nextTick(() => {
|
104
|
-
this.$refs.inputElement.$el.focus()
|
105
|
-
})
|
115
|
+
this.$refs.inputElement.$el.focus()
|
116
|
+
})
|
106
117
|
}
|
107
118
|
},
|
108
119
|
watch: {
|
@@ -112,6 +123,5 @@ export default {
|
|
112
123
|
}
|
113
124
|
}
|
114
125
|
}
|
115
|
-
|
116
126
|
}
|
117
127
|
</script>
|
@@ -14,8 +14,11 @@
|
|
14
14
|
labelFontColor || colorMode == 'dark' ? 'white' : 'eturnityGrey'
|
15
15
|
"
|
16
16
|
:fontSize="fontSize"
|
17
|
-
>{{ label }}
|
18
|
-
|
17
|
+
>{{ label }}
|
18
|
+
<optionalLabel v-if="labelOptional">
|
19
|
+
({{ $gettext('Optional') }})</optionalLabel
|
20
|
+
>
|
21
|
+
</input-label>
|
19
22
|
<info-text
|
20
23
|
v-if="infoTextMessage"
|
21
24
|
:text="infoTextMessage"
|
@@ -45,6 +48,7 @@
|
|
45
48
|
v-if="isSearchBarVisible"
|
46
49
|
ref="searchInput"
|
47
50
|
tabindex="0"
|
51
|
+
inputHeight="34px"
|
48
52
|
:noBorder="true"
|
49
53
|
:fontSize="fontSize"
|
50
54
|
backgroundColor="transparent"
|
@@ -140,7 +144,6 @@ const Caret = styled.div`
|
|
140
144
|
min-width: 30px;
|
141
145
|
height: 100%;
|
142
146
|
align-items: stretch
|
143
|
-
padding-top: 5px;
|
144
147
|
cursor: pointer;
|
145
148
|
margin-left: auto;
|
146
149
|
`
|
@@ -158,6 +161,9 @@ const InputLabel = styled('div', labelAttrs)`
|
|
158
161
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
159
162
|
font-weight: 700;
|
160
163
|
`
|
164
|
+
const optionalLabel = styled.span`
|
165
|
+
font-weight: 300;
|
166
|
+
`
|
161
167
|
const inputProps = { selectWidth: String, optionWidth: String }
|
162
168
|
const Container = styled('div', inputProps)`
|
163
169
|
width: ${(props) => (props.selectWidth ? props.selectWidth : '100%')};
|
@@ -192,8 +198,7 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
192
198
|
position: relative;
|
193
199
|
box-sizing: border-box;
|
194
200
|
border-radius: 4px;
|
195
|
-
padding: ${(props) =>
|
196
|
-
props.isSearchBarVisible ? '0 10px 0 0' : '0px 10px 0 15px'};
|
201
|
+
padding: ${(props) => (props.isSearchBarVisible ? '0' : '0px 0px 0 15px')};
|
197
202
|
text-align: left;
|
198
203
|
border-radius: 4px;
|
199
204
|
min-height: 36px;
|
@@ -230,7 +235,6 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
|
|
230
235
|
z-index:${(props) => (props.isActive ? '2' : '1')};
|
231
236
|
position:absolute;
|
232
237
|
top:5px;
|
233
|
-
padding:10px;
|
234
238
|
border:1px solid ${(props) => props.theme.colors.grey4}
|
235
239
|
border-radius:4px;
|
236
240
|
display: flex;
|
@@ -247,8 +251,9 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
|
|
247
251
|
props.theme.colors[props.fontColor]
|
248
252
|
? props.theme.colors[props.fontColor]
|
249
253
|
: props.fontColor};
|
250
|
-
max-height:300px;
|
251
|
-
|
254
|
+
max-height: 300px;
|
255
|
+
min-height: 39px;
|
256
|
+
overflow-y: auto;
|
252
257
|
& [data-value="${(props) => props.selectedValue}"]{
|
253
258
|
backdrop-filter: brightness(1.4);
|
254
259
|
}
|
@@ -283,6 +288,10 @@ export default {
|
|
283
288
|
label: {
|
284
289
|
required: false
|
285
290
|
},
|
291
|
+
labelOptional: {
|
292
|
+
required: false,
|
293
|
+
default: false
|
294
|
+
},
|
286
295
|
infoTextMessage: {
|
287
296
|
required: false
|
288
297
|
},
|
@@ -360,6 +369,7 @@ export default {
|
|
360
369
|
Container,
|
361
370
|
InputLabel,
|
362
371
|
LabelWrapper,
|
372
|
+
optionalLabel,
|
363
373
|
InfoText,
|
364
374
|
InputWrapper,
|
365
375
|
DropdownWrapper,
|