@eturnity/eturnity_reusable_components 7.12.6-EPDM-10310.2 → 7.12.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
@@ -46,10 +46,7 @@
|
|
46
46
|
:data-id="dataId"
|
47
47
|
:paddingLeft="paddingLeft"
|
48
48
|
>
|
49
|
-
<draggableInputHandle
|
50
|
-
v-if="isDraggable && !isSearchBarVisible"
|
51
|
-
:height="selectHeight"
|
52
|
-
/>
|
49
|
+
<draggableInputHandle v-if="isDraggable && !isSearchBarVisible" :height="selectHeight" />
|
53
50
|
<inputText
|
54
51
|
v-if="isSearchBarVisible"
|
55
52
|
ref="searchInput"
|
@@ -66,12 +63,7 @@
|
|
66
63
|
@input-change="searchChange"
|
67
64
|
@click.native.stop
|
68
65
|
/>
|
69
|
-
<selector
|
70
|
-
v-else
|
71
|
-
:showBorder="showBorder"
|
72
|
-
:selectWidth="selectWidth"
|
73
|
-
:paddingLeft="paddingLeft"
|
74
|
-
>
|
66
|
+
<selector v-else :selectWidth="selectWidth" :paddingLeft="paddingLeft">
|
75
67
|
<slot name="selector" :selectedValue="selectedValue"></slot>
|
76
68
|
</selector>
|
77
69
|
<Caret @click.stop="toggleCaretDropdown">
|
@@ -166,23 +158,11 @@ const Caret = styled.div`
|
|
166
158
|
margin-left: auto;
|
167
159
|
`
|
168
160
|
|
169
|
-
const
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
const Selector = styled('div', selectorProps)`
|
175
|
-
${(props) => props.selectWidth === '100%' ? 'width: 100%;' : `width: calc(${props.selectWidth} -
|
176
|
-
(
|
177
|
-
${CARET_WIDTH} +
|
178
|
-
${props.paddingLeft}
|
179
|
-
${props.showBorder ? `+ (${BORDER_WIDTH} * 2)` : ''}
|
180
|
-
)
|
181
|
-
);
|
182
|
-
white-space: nowrap;
|
183
|
-
text-overflow: ellipsis;
|
184
|
-
overflow: hidden;`
|
185
|
-
}
|
161
|
+
const Selector = styled('div', { selectWidth: String, paddingLeft: String })`
|
162
|
+
width: ${(props) => `calc(${props.selectWidth} - (${CARET_WIDTH} + ${props.paddingLeft} + (${BORDER_WIDTH} * 2)))`};
|
163
|
+
white-space: nowrap;
|
164
|
+
text-overflow: ellipsis;
|
165
|
+
overflow: hidden;
|
186
166
|
`
|
187
167
|
|
188
168
|
const labelAttrs = { fontSize: String, fontColor: String }
|
@@ -234,8 +214,7 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
234
214
|
position: relative;
|
235
215
|
box-sizing: border-box;
|
236
216
|
border-radius: 4px;
|
237
|
-
${(props) =>
|
238
|
-
props.isSearchBarVisible ? '' : `padding-left: ${props.paddingLeft}`};
|
217
|
+
${(props) => (props.isSearchBarVisible ? '' : `padding-left: ${props.paddingLeft}` )};
|
239
218
|
text-align: left;
|
240
219
|
min-height: ${(props) =>
|
241
220
|
props.selectHeight
|
@@ -251,9 +230,7 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
251
230
|
${({ showBorder, theme, hasError }) =>
|
252
231
|
showBorder &&
|
253
232
|
`
|
254
|
-
border: ${BORDER_WIDTH} solid ${
|
255
|
-
hasError ? theme.colors.red : theme.colors.grey4
|
256
|
-
}
|
233
|
+
border: ${BORDER_WIDTH} solid ${hasError ? theme.colors.red : theme.colors.grey4}
|
257
234
|
`}
|
258
235
|
background-color:${(props) =>
|
259
236
|
props.disabled
|
@@ -267,10 +244,8 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
267
244
|
: props.fontColor};
|
268
245
|
${(props) => (props.disabled ? 'pointer-events: none' : '')};
|
269
246
|
overflow: hidden;
|
270
|
-
&
|
271
|
-
border-right
|
272
|
-
props.hasError ? props.theme.colors.red : props.theme.colors.grey4}
|
273
|
-
1px solid;
|
247
|
+
& >.handle{
|
248
|
+
border-right:${(props) =>props.hasError ? props.theme.colors.red : props.theme.colors.grey4} 1px solid;
|
274
249
|
}
|
275
250
|
`
|
276
251
|
const selectDropdownAttrs = {
|
@@ -283,34 +258,34 @@ const selectDropdownAttrs = {
|
|
283
258
|
selectedValue: Number | String
|
284
259
|
}
|
285
260
|
const selectDropdown = styled('div', selectDropdownAttrs)`
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
261
|
+
box-sizing: border-box;
|
262
|
+
z-index:${(props) => (props.isActive ? '2' : '1')};
|
263
|
+
position:absolute;
|
264
|
+
top:5px;
|
265
|
+
border: ${BORDER_WIDTH} solid ${(props) => props.theme.colors.grey4};
|
266
|
+
border-radius:4px;
|
267
|
+
display: flex;
|
268
|
+
flex-direction: column;
|
269
|
+
align-items: flex-start;
|
270
|
+
padding: 0px;
|
271
|
+
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
272
|
+
width: ${(props) => (props.optionWidth ? props.optionWidth : '100%')};
|
273
|
+
background-color:${(props) =>
|
274
|
+
props.theme.colors[props.bgColor]
|
275
|
+
? props.theme.colors[props.bgColor]
|
276
|
+
: props.bgColor};
|
277
|
+
color:${(props) =>
|
278
|
+
props.theme.colors[props.fontColor]
|
279
|
+
? props.theme.colors[props.fontColor]
|
280
|
+
: props.fontColor};
|
281
|
+
max-height:300px;
|
282
|
+
overflow-y:auto;
|
283
|
+
&>div[data-value="${(props) => props.hoveredValue}"]{
|
284
|
+
background-color:${(props) =>
|
285
|
+
props.theme.colors[props.hoveredBgColor]
|
286
|
+
? props.theme.colors[props.hoveredBgColor]
|
287
|
+
: props.hoveredBgColor};
|
288
|
+
}
|
314
289
|
`
|
315
290
|
const DropdownWrapper = styled('div')`
|
316
291
|
position: relative;
|