@eturnity/eturnity_reusable_components 1.2.48-EPDM-5846.2 → 1.2.48-EPDM-5846.4
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
@@ -24,11 +24,11 @@
|
|
24
24
|
<selectButton
|
25
25
|
ref="select"
|
26
26
|
@click="toggleDropdown"
|
27
|
-
:isDropdownOpen="isDropdownOpen"
|
28
27
|
:selectHeight="selectHeight"
|
29
28
|
:bgColor="buttonBgColor || colorMode=='dark'?'transparentBlack1':'white'"
|
30
29
|
:fontColor="buttonFontColor || colorMode=='dark'?'white':'black'"
|
31
30
|
:hasError="hasError"
|
31
|
+
:isSearchBarVisible="isSearchBarVisible"
|
32
32
|
@keydown.native="onKeyDown"
|
33
33
|
>
|
34
34
|
<inputText
|
@@ -36,7 +36,7 @@
|
|
36
36
|
ref="searchInput"
|
37
37
|
tabindex="0"
|
38
38
|
:noBorder="true"
|
39
|
-
:
|
39
|
+
:fontSize="fontSize"
|
40
40
|
backgroundColor="transparent"
|
41
41
|
:fontColor="buttonFontColor || colorMode=='dark'?'white':'black'"
|
42
42
|
:value="textSearch"
|
@@ -45,8 +45,9 @@
|
|
45
45
|
<div v-else>
|
46
46
|
<slot name="selector" :selectedValue="selectedValue"></slot>
|
47
47
|
</div>
|
48
|
-
<Caret
|
49
|
-
<icon name="arrow_up" size="12px" :color="caretColor || colorMode=='dark'?'white':'transparentBlack1'"/>
|
48
|
+
<Caret @click.stop="toggleCaretDropdown" >
|
49
|
+
<icon v-if="isDropdownOpen" name="arrow_up" size="12px" :color="caretColor || colorMode=='dark'?'white':'transparentBlack1'"/>
|
50
|
+
<icon v-else name="arrow_down" size="12px" :color="caretColor || colorMode=='dark'?'white':'transparentBlack1'"/>
|
50
51
|
</Caret>
|
51
52
|
</selectButton>
|
52
53
|
<DropdownWrapper>
|
@@ -94,16 +95,13 @@
|
|
94
95
|
import icon from '../../icon'
|
95
96
|
import inputText from '../inputText'
|
96
97
|
|
97
|
-
const
|
98
|
-
const Caret=styled('div', caretAttrs)`
|
98
|
+
const Caret=styled.div`
|
99
99
|
position:absolute;
|
100
100
|
display:flex;
|
101
101
|
align-items:center;
|
102
102
|
height:100%;
|
103
103
|
right:15px;
|
104
|
-
top
|
105
|
-
transform: ${props=>!props.isUp?"rotate(180deg)":""};
|
106
|
-
transform-origin: center;
|
104
|
+
padding-top: 5px;
|
107
105
|
`
|
108
106
|
|
109
107
|
const labelAttrs = { fontSize: String }
|
@@ -130,13 +128,13 @@ const selectButtonAttrs={
|
|
130
128
|
fontColor: String,
|
131
129
|
hasError: Boolean,
|
132
130
|
selectHeight: String,
|
133
|
-
|
131
|
+
isSearchBarVisible: Boolean
|
134
132
|
}
|
135
133
|
const selectButton = styled('div',selectButtonAttrs)`
|
136
134
|
position:relative;
|
137
135
|
box-sizing: border-box;
|
138
136
|
border-radius:4px;
|
139
|
-
padding:0px 10px;
|
137
|
+
padding: ${(props) => props.isSearchBarVisible ? '0 10px 0 0' : '0px 10px' };
|
140
138
|
text-align:left;
|
141
139
|
border-radius:4px;
|
142
140
|
min-height:36px;
|
@@ -144,7 +142,7 @@ const selectButton = styled('div',selectButtonAttrs)`
|
|
144
142
|
grid-template-columns:auto 40px;
|
145
143
|
align-items: center;
|
146
144
|
max-height:${props=>props.selectHeight};
|
147
|
-
border:1px solid ${(props) => props.hasError
|
145
|
+
border:1px solid ${(props) => props.hasError ? props.theme.colors.red : props.theme.colors.grey4}
|
148
146
|
background-color:${(props) => props.theme.colors[props.bgColor]?props.theme.colors[props.bgColor]:props.bgColor};
|
149
147
|
color:${(props) => props.theme.colors[props.fontColor]?props.theme.colors[props.fontColor]:props.fontColor};
|
150
148
|
`
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<slot></slot>
|
4
4
|
</optionContainer>
|
5
5
|
</template>
|
6
|
-
|
6
|
+
|
7
7
|
<script>
|
8
8
|
// import selectButton from './selectButton'
|
9
9
|
// import selectDropdown from './selectDropDown'
|
@@ -15,7 +15,7 @@
|
|
15
15
|
flex-direction: row;
|
16
16
|
justify-content: space-between;
|
17
17
|
align-items: center;
|
18
|
-
padding: 12px
|
18
|
+
padding: 12px 10px;
|
19
19
|
gap: 14px;
|
20
20
|
width:100%;
|
21
21
|
box-sizing:inherit;
|
@@ -23,10 +23,10 @@
|
|
23
23
|
background-color:${(props) => props.theme.colors[props.hoveredBgColor]?props.theme.colors[props.hoveredBgColor]:props.hoveredBgColor};
|
24
24
|
}
|
25
25
|
`
|
26
|
-
|
26
|
+
|
27
27
|
export default {
|
28
28
|
name: 'RCoption',
|
29
|
-
|
29
|
+
|
30
30
|
props: {
|
31
31
|
value: {
|
32
32
|
required: true
|
@@ -39,9 +39,9 @@
|
|
39
39
|
default:'light'
|
40
40
|
}
|
41
41
|
},
|
42
|
-
|
42
|
+
|
43
43
|
components: {optionContainer},
|
44
|
-
|
44
|
+
|
45
45
|
data() {
|
46
46
|
return {}
|
47
47
|
},
|
@@ -57,4 +57,3 @@
|
|
57
57
|
}
|
58
58
|
}
|
59
59
|
</script>
|
60
|
-
|