@eturnity/eturnity_reusable_components 7.48.0 → 7.48.1-EPDM-12680.0

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.
@@ -17,7 +17,9 @@
17
17
  >
18
18
  <InputLabel
19
19
  :font-color="
20
- labelFontColor || colorMode == 'dark' ? 'white' : 'eturnityGrey'
20
+ labelFontColor || colorMode == 'dark' || colorMode == 'transparent'
21
+ ? 'white'
22
+ : 'eturnityGrey'
21
23
  "
22
24
  :font-size="fontSize"
23
25
  >{{ label }}
@@ -40,18 +42,26 @@
40
42
  <SelectButton
41
43
  ref="select"
42
44
  :bg-color="
43
- buttonBgColor || colorMode == 'dark' ? 'transparentBlack1' : 'white'
45
+ buttonBgColor || colorMode == 'dark'
46
+ ? 'transparentBlack1'
47
+ : colorMode == 'transparent'
48
+ ? 'transparent'
49
+ : 'white'
44
50
  "
45
51
  class="select-button"
52
+ :color-mode="colorMode"
46
53
  :data-id="dataId"
47
54
  :disabled="disabled"
48
55
  :font-color="
49
- buttonFontColor || colorMode == 'dark' ? 'white' : 'black'
56
+ buttonFontColor || colorMode == 'dark' || colorMode == 'transparent'
57
+ ? 'white'
58
+ : 'black'
50
59
  "
51
60
  :font-size="fontSize"
52
61
  :has-error="hasError"
53
62
  :has-no-padding="isSearchBarVisible || !hasSelectButtonPadding"
54
63
  :height="height"
64
+ :is-search-bar-visible="isSearchBarVisible"
55
65
  :no-relative="noRelative"
56
66
  :padding-left="paddingLeft"
57
67
  :select-height="selectHeight"
@@ -72,7 +82,11 @@
72
82
  ref="searchInput"
73
83
  background-color="transparent"
74
84
  :font-color="
75
- buttonFontColor || colorMode == 'dark' ? 'white' : 'black'
85
+ buttonFontColor ||
86
+ colorMode == 'dark' ||
87
+ colorMode == 'transparent'
88
+ ? 'white'
89
+ : 'black'
76
90
  "
77
91
  :font-size="fontSize"
78
92
  input-height="34px"
@@ -92,26 +106,30 @@
92
106
  >
93
107
  <slot name="selector" :selected-value="selectedValue"></slot>
94
108
  </Selector>
95
- <Caret class="caret_dropdown" @click.stop="toggleCaretDropdown">
109
+ <Caret
110
+ class="caret_dropdown"
111
+ :color-mode="colorMode"
112
+ @click.stop="toggleCaretDropdown"
113
+ >
96
114
  <Icon
97
115
  v-if="isDropdownOpen"
98
116
  :color="
99
- caretColor || colorMode == 'dark'
117
+ caretColor || colorMode == 'dark' || colorMode == 'transparent'
100
118
  ? 'white'
101
119
  : 'transparentBlack1'
102
120
  "
103
121
  name="arrow_up"
104
- size="12px"
122
+ :size="colorMode === 'transparent' ? '8px' : '12px'"
105
123
  />
106
124
  <Icon
107
125
  v-else
108
126
  :color="
109
- caretColor || colorMode == 'dark'
127
+ caretColor || colorMode == 'dark' || colorMode == 'transparent'
110
128
  ? 'white'
111
129
  : 'transparentBlack1'
112
130
  "
113
131
  name="arrow_down"
114
- size="12px"
132
+ :size="colorMode === 'transparent' ? '8px' : '12px'"
115
133
  />
116
134
  </Caret>
117
135
  </SelectButton>
@@ -121,15 +139,27 @@
121
139
  v-show="isSelectDropdownShown"
122
140
  ref="dropdown"
123
141
  :bg-color="
124
- dropdownBgColor || colorMode == 'dark' ? 'black' : 'white'
142
+ dropdownBgColor ||
143
+ colorMode == 'dark' ||
144
+ colorMode == 'transparent'
145
+ ? 'black'
146
+ : 'white'
125
147
  "
126
148
  :dropdown-position="dropdownPosition"
127
149
  :font-color="
128
- dropdownFontColor || colorMode == 'dark' ? 'white' : 'black'
150
+ dropdownFontColor ||
151
+ colorMode == 'dark' ||
152
+ colorMode == 'transparent'
153
+ ? 'white'
154
+ : 'black'
129
155
  "
130
156
  :font-size="fontSize"
131
157
  :hovered-bg-color="
132
- colorMode == 'dark' ? '#000000' : dropdownBgColor
158
+ colorMode == 'dark'
159
+ ? '#000000'
160
+ : colorMode == 'transparent'
161
+ ? 'grey6'
162
+ : dropdownBgColor
133
163
  "
134
164
  :hovered-index="hoveredIndex"
135
165
  :hovered-value="hoveredValue"
@@ -186,12 +216,15 @@
186
216
  const CARET_WIDTH = '30px'
187
217
  const BORDER_WIDTH = '1px'
188
218
 
189
- const Caret = styled.div`
219
+ const CaretAttrs = { colorMode: String }
220
+ const Caret = styled('div', CaretAttrs)`
190
221
  display: flex;
191
222
  align-items: center;
192
223
  justify-content: center;
193
- width: ${CARET_WIDTH};
194
- min-width: ${CARET_WIDTH};
224
+ width: ${(props) =>
225
+ props.colorMode === 'transparent' ? '15px' : CARET_WIDTH};
226
+ min-width: ${(props) =>
227
+ props.colorMode === 'transparent' ? '15px' : CARET_WIDTH};
195
228
  height: 100%;
196
229
  align-items: center;
197
230
  cursor: pointer;
@@ -230,6 +263,7 @@
230
263
  `
231
264
  const OptionalLabel = styled.span`
232
265
  font-weight: 300;
266
+ text-transform: lowercase;
233
267
  `
234
268
  const inputProps = {
235
269
  selectWidth: String,
@@ -274,6 +308,8 @@
274
308
  noRelative: Boolean,
275
309
  tablePaddingLeft: String,
276
310
  showDisabledBackground: Boolean,
311
+ colorMode: String,
312
+ isSearchBarVisible: Boolean,
277
313
  }
278
314
  const SelectButton = styled('div', selectButtonAttrs)`
279
315
  position: ${(props) => (props.noRelative ? 'static' : 'relative')};
@@ -281,7 +317,11 @@
281
317
  border-radius: 4px;
282
318
  max-width: ${(props) => (props.selectWidth ? props.selectWidth : '100%')};
283
319
  ${(props) =>
284
- props.isSearchBarVisible
320
+ props.colorMode === 'transparent'
321
+ ? props.isSearchBarVisible
322
+ ? 'padding: 10px 15px 10px 5px;'
323
+ : 'padding: 10px 15px;'
324
+ : props.isSearchBarVisible
285
325
  ? ''
286
326
  : `padding-left: ${
287
327
  props.hasNoPadding
@@ -613,7 +653,7 @@
613
653
  if (this.isDropdownOpen) {
614
654
  return this.$refs.dropdown.$el.childElementCount > 1
615
655
  ? this.$refs.dropdown.$el.childElementCount
616
- : !!this.$refs.dropdown.$el.children[0]
656
+ : this.$refs.dropdown.$el.children[0]
617
657
  ? this.$refs.dropdown.$el.children[0].childElementCount
618
658
  : 0
619
659
  }
@@ -1,6 +1,12 @@
1
1
  <template>
2
2
  <OptionContainer
3
- :background-color="colorMode == 'dark' ? '#000000' : backgroundColor"
3
+ :background-color="
4
+ colorMode == 'dark'
5
+ ? '#000000'
6
+ : colorMode == 'transparent'
7
+ ? 'black'
8
+ : backgroundColor
9
+ "
4
10
  :cursor-type="cursorType"
5
11
  :data-value="value"
6
12
  :disabled-bg-color="disabledBgColor"
@@ -8,6 +14,8 @@
8
14
  :hovered-bg-color="
9
15
  colorMode == 'dark'
10
16
  ? '#000000'
17
+ : colorMode == 'transparent'
18
+ ? 'grey6'
11
19
  : hoveredBgColor
12
20
  ? hoveredBgColor
13
21
  : 'grey5'
@@ -130,7 +138,8 @@
130
138
  default: '12px 10px',
131
139
  },
132
140
  textColor: {
133
- type: true,
141
+ type: String,
142
+ required: false,
134
143
  default: 'inherit',
135
144
  },
136
145
  },
@@ -3,6 +3,7 @@
3
3
  <Container>
4
4
  <SpinnerWrapper data-test-id="spinner_full_wrapper">
5
5
  <SpinnerSvg
6
+ :class="{ white: isWhite }"
6
7
  data-test-id="spinner_full_icon"
7
8
  :style="{ width: size, height: size }"
8
9
  />
@@ -16,6 +17,7 @@
16
17
  >
17
18
  <SpinnerWrapper data-test-id="spinner_wrapper">
18
19
  <SpinnerSvg
20
+ :class="{ white: isWhite }"
19
21
  data-test-id="spinner_icon"
20
22
  :style="{ width: size, height: size }"
21
23
  />
@@ -54,6 +56,10 @@
54
56
  const SpinnerWrapper = styled.div`
55
57
  width: ${(props) => (props.size ? props.size : '60px')};
56
58
  height: auto;
59
+
60
+ .white {
61
+ filter: brightness(0) invert(1);
62
+ }
57
63
  `
58
64
 
59
65
  export default {
@@ -80,6 +86,11 @@
80
86
  default: '60px',
81
87
  type: String,
82
88
  },
89
+ isWhite: {
90
+ required: false,
91
+ default: false,
92
+ type: Boolean,
93
+ },
83
94
  },
84
95
  }
85
96
  </script>