@eturnity/eturnity_reusable_components 1.2.48-EPDM-5846.5 → 1.2.48-EPDM-5846.6
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
@@ -20,7 +20,7 @@
|
|
20
20
|
:alignText="infoTextAlign"
|
21
21
|
/>
|
22
22
|
</label-wrapper>
|
23
|
-
<
|
23
|
+
<select-button-wrapper :disabled="disabled">
|
24
24
|
<selectButton
|
25
25
|
ref="select"
|
26
26
|
@click="toggleDropdown"
|
@@ -29,6 +29,7 @@
|
|
29
29
|
:fontColor="buttonFontColor || colorMode=='dark'?'white':'black'"
|
30
30
|
:hasError="hasError"
|
31
31
|
:isSearchBarVisible="isSearchBarVisible"
|
32
|
+
:disabled="disabled"
|
32
33
|
@keydown.native="onKeyDown"
|
33
34
|
>
|
34
35
|
<inputText
|
@@ -65,7 +66,7 @@
|
|
65
66
|
<slot name="dropdown"></slot>
|
66
67
|
</selectDropdown>
|
67
68
|
</DropdownWrapper>
|
68
|
-
</
|
69
|
+
</select-button-wrapper>
|
69
70
|
</input-wrapper>
|
70
71
|
</Container>
|
71
72
|
</template>
|
@@ -130,10 +131,19 @@ const LabelWrapper = styled.div`
|
|
130
131
|
align-items: center;
|
131
132
|
justify-content: start;
|
132
133
|
`
|
134
|
+
|
135
|
+
const SelectButtonWrapperAttrs = {
|
136
|
+
disabled: Boolean
|
137
|
+
}
|
138
|
+
const SelectButtonWrapper = styled('div', SelectButtonWrapperAttrs)`
|
139
|
+
${(props) => props.disabled ? 'cursor: not-allowed' : '' };
|
140
|
+
`
|
141
|
+
|
133
142
|
const selectButtonAttrs={
|
134
143
|
bgColor: String,
|
135
144
|
fontColor: String,
|
136
145
|
hasError: Boolean,
|
146
|
+
disabled: Boolean,
|
137
147
|
selectHeight: String,
|
138
148
|
isSearchBarVisible: Boolean
|
139
149
|
}
|
@@ -149,8 +159,9 @@ const selectButton = styled('div',selectButtonAttrs)`
|
|
149
159
|
align-items: center;
|
150
160
|
max-height:${props=>props.selectHeight};
|
151
161
|
border:1px solid ${(props) => props.hasError ? props.theme.colors.red : props.theme.colors.grey4}
|
152
|
-
background-color:${(props) => props.theme.colors[props.bgColor]?props.theme.colors[props.bgColor]:props.bgColor};
|
162
|
+
background-color:${(props) => props.disabled ? props.theme.colors.grey5 : props.theme.colors[props.bgColor] ? props.theme.colors[props.bgColor] : props.bgColor};
|
153
163
|
color:${(props) => props.theme.colors[props.fontColor]?props.theme.colors[props.fontColor]:props.fontColor};
|
164
|
+
${(props) => props.disabled ? 'pointer-events: none' : '' };
|
154
165
|
`
|
155
166
|
const selectDropdownAttrs={bgColor:String,fontColor:String,selectWidth: String, optionWidth: String,hoveredIndex:Number,selectedValue:Number | String}
|
156
167
|
const selectDropdown = styled('div',selectDropdownAttrs)`
|
@@ -261,6 +272,10 @@ const InputWrapper = styled('div', inputAttrs)`
|
|
261
272
|
required: false,
|
262
273
|
default: false
|
263
274
|
},
|
275
|
+
disabled: {
|
276
|
+
required: false,
|
277
|
+
default: false
|
278
|
+
},
|
264
279
|
isAutoSearch:{
|
265
280
|
required:false,
|
266
281
|
default:true
|
@@ -269,6 +284,7 @@ const InputWrapper = styled('div', inputAttrs)`
|
|
269
284
|
|
270
285
|
components: {
|
271
286
|
selectButton,
|
287
|
+
SelectButtonWrapper,
|
272
288
|
selectDropdown,
|
273
289
|
Container,
|
274
290
|
InputLabel,
|