@eturnity/eturnity_reusable_components 1.2.68 → 1.2.69
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
@@ -39,6 +39,7 @@
|
|
39
39
|
:isSearchBarVisible="isSearchBarVisible"
|
40
40
|
:disabled="disabled"
|
41
41
|
@keydown.native="onKeyDown"
|
42
|
+
:showBorder="showBorder"
|
42
43
|
>
|
43
44
|
<inputText
|
44
45
|
v-if="isSearchBarVisible"
|
@@ -184,33 +185,36 @@ const selectButtonAttrs = {
|
|
184
185
|
hasError: Boolean,
|
185
186
|
disabled: Boolean,
|
186
187
|
selectHeight: String,
|
187
|
-
isSearchBarVisible: Boolean
|
188
|
+
isSearchBarVisible: Boolean,
|
189
|
+
showBorder: Boolean
|
188
190
|
}
|
189
191
|
const selectButton = styled('div', selectButtonAttrs)`
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
props.
|
211
|
-
|
212
|
-
|
213
|
-
|
192
|
+
position: relative;
|
193
|
+
box-sizing: border-box;
|
194
|
+
border-radius: 4px;
|
195
|
+
padding: ${(props) => (props.isSearchBarVisible ? '0 10px 0 0' : '0px 10px')};
|
196
|
+
text-align: left;
|
197
|
+
border-radius: 4px;
|
198
|
+
min-height: 36px;
|
199
|
+
display: flex;
|
200
|
+
align-items: center;
|
201
|
+
max-height: ${(props) => props.selectHeight};
|
202
|
+
${({ showBorder, theme, hasError }) =>
|
203
|
+
showBorder &&
|
204
|
+
`
|
205
|
+
border:1px solid ${hasError ? theme.colors.red : theme.colors.grey4}
|
206
|
+
`}
|
207
|
+
background-color:${(props) =>
|
208
|
+
props.disabled
|
209
|
+
? props.theme.colors.grey5
|
210
|
+
: props.theme.colors[props.bgColor]
|
211
|
+
? props.theme.colors[props.bgColor]
|
212
|
+
: props.bgColor};
|
213
|
+
color: ${(props) =>
|
214
|
+
props.theme.colors[props.fontColor]
|
215
|
+
? props.theme.colors[props.fontColor]
|
216
|
+
: props.fontColor};
|
217
|
+
${(props) => (props.disabled ? 'pointer-events: none' : '')};
|
214
218
|
`
|
215
219
|
const selectDropdownAttrs = {
|
216
220
|
bgColor: String,
|
@@ -341,6 +345,10 @@ export default {
|
|
341
345
|
isAutoSearch: {
|
342
346
|
required: false,
|
343
347
|
default: true
|
348
|
+
},
|
349
|
+
showBorder: {
|
350
|
+
required: false,
|
351
|
+
default: true
|
344
352
|
}
|
345
353
|
},
|
346
354
|
|