@eturnity/eturnity_reusable_components 7.12.6-EPDM-10310.1 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.12.6-EPDM-10310.1",
3
+ "version": "7.12.6",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -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,21 +158,8 @@ const Caret = styled.div`
166
158
  margin-left: auto;
167
159
  `
168
160
 
169
- const selectorProps = {
170
- selectWidth: String,
171
- paddingLeft: String,
172
- showBorder: Boolean
173
- }
174
- const Selector = styled('div', selectorProps)`
175
- width: ${(props) =>
176
- props.selectWidth === '100%' ? props.selectWidth :
177
- `calc(${props.selectWidth} -
178
- (
179
- ${CARET_WIDTH} +
180
- ${props.paddingLeft}
181
- ${props.showBorder ? `+ (${BORDER_WIDTH} * 2)` : ''}
182
- )
183
- )`};
161
+ const Selector = styled('div', { selectWidth: String, paddingLeft: String })`
162
+ width: ${(props) => `calc(${props.selectWidth} - (${CARET_WIDTH} + ${props.paddingLeft} + (${BORDER_WIDTH} * 2)))`};
184
163
  white-space: nowrap;
185
164
  text-overflow: ellipsis;
186
165
  overflow: hidden;
@@ -235,8 +214,7 @@ const selectButton = styled('div', selectButtonAttrs)`
235
214
  position: relative;
236
215
  box-sizing: border-box;
237
216
  border-radius: 4px;
238
- ${(props) =>
239
- props.isSearchBarVisible ? '' : `padding-left: ${props.paddingLeft}`};
217
+ ${(props) => (props.isSearchBarVisible ? '' : `padding-left: ${props.paddingLeft}` )};
240
218
  text-align: left;
241
219
  min-height: ${(props) =>
242
220
  props.selectHeight
@@ -252,9 +230,7 @@ const selectButton = styled('div', selectButtonAttrs)`
252
230
  ${({ showBorder, theme, hasError }) =>
253
231
  showBorder &&
254
232
  `
255
- border: ${BORDER_WIDTH} solid ${
256
- hasError ? theme.colors.red : theme.colors.grey4
257
- }
233
+ border: ${BORDER_WIDTH} solid ${hasError ? theme.colors.red : theme.colors.grey4}
258
234
  `}
259
235
  background-color:${(props) =>
260
236
  props.disabled
@@ -268,10 +244,8 @@ const selectButton = styled('div', selectButtonAttrs)`
268
244
  : props.fontColor};
269
245
  ${(props) => (props.disabled ? 'pointer-events: none' : '')};
270
246
  overflow: hidden;
271
- & > .handle {
272
- border-right: ${(props) =>
273
- props.hasError ? props.theme.colors.red : props.theme.colors.grey4}
274
- 1px solid;
247
+ & >.handle{
248
+ border-right:${(props) =>props.hasError ? props.theme.colors.red : props.theme.colors.grey4} 1px solid;
275
249
  }
276
250
  `
277
251
  const selectDropdownAttrs = {
@@ -284,34 +258,34 @@ const selectDropdownAttrs = {
284
258
  selectedValue: Number | String
285
259
  }
286
260
  const selectDropdown = styled('div', selectDropdownAttrs)`
287
- box-sizing: border-box;
288
- z-index: ${(props) => (props.isActive ? '2' : '1')};
289
- position: absolute;
290
- top: 5px;
291
- border: ${BORDER_WIDTH} solid ${(props) => props.theme.colors.grey4};
292
- border-radius: 4px;
293
- display: flex;
294
- flex-direction: column;
295
- align-items: flex-start;
296
- padding: 0px;
297
- box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
298
- width: ${(props) => (props.optionWidth ? props.optionWidth : '100%')};
299
- background-color: ${(props) =>
300
- props.theme.colors[props.bgColor]
301
- ? props.theme.colors[props.bgColor]
302
- : props.bgColor};
303
- color: ${(props) =>
304
- props.theme.colors[props.fontColor]
305
- ? props.theme.colors[props.fontColor]
306
- : props.fontColor};
307
- max-height: 300px;
308
- overflow-y: auto;
309
- & > div[data-value='${(props) => props.hoveredValue}'] {
310
- background-color: ${(props) =>
311
- props.theme.colors[props.hoveredBgColor]
312
- ? props.theme.colors[props.hoveredBgColor]
313
- : props.hoveredBgColor};
314
- }
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
+ }
315
289
  `
316
290
  const DropdownWrapper = styled('div')`
317
291
  position: relative;