@eturnity/eturnity_reusable_components 8.31.6-EPDM-16298.0 → 8.31.6-EPDM-13620.1

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": "8.31.6-EPDM-16298.0",
3
+ "version": "8.31.6-EPDM-13620.1",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -16,9 +16,6 @@
16
16
  :width="width"
17
17
  >
18
18
  <LabelComponent :has-icon="Boolean(icon)">
19
- <FlexSpinner v-if="isLoading">
20
- <RCSpinner size="tiny" />
21
- </FlexSpinner>
22
19
  <Icon
23
20
  v-if="icon"
24
21
  :color="getIconColor"
@@ -47,7 +44,6 @@
47
44
  // />
48
45
 
49
46
  import styled from 'vue3-styled-components'
50
- import RCSpinner from '../../spinner'
51
47
  import Icon from '../../icon'
52
48
  import theme from '../../../assets/theme'
53
49
 
@@ -175,10 +171,6 @@
175
171
  transform: rotate(20deg);
176
172
  cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
177
173
  `
178
- const FlexSpinner = styled('div')`
179
- flex: 0;
180
- margin-right: 8px;
181
- `
182
174
 
183
175
  export default {
184
176
  name: 'MainButton',
@@ -188,8 +180,6 @@
188
180
  PageContainer,
189
181
  ButtonContainer,
190
182
  BetaTag,
191
- RCSpinner,
192
- FlexSpinner,
193
183
  },
194
184
  props: {
195
185
  type: {
@@ -287,10 +277,6 @@
287
277
  type: Boolean,
288
278
  default: false,
289
279
  },
290
- isLoading: {
291
- type: Boolean,
292
- default: false,
293
- },
294
280
  },
295
281
  computed: {
296
282
  theme() {
@@ -201,6 +201,12 @@
201
201
  </SelectDropdown>
202
202
  </Component>
203
203
  </DropdownWrapper>
204
+ <ErrorMessage
205
+ v-if="hasError && hasErrorMessage"
206
+ data-test-id="error_message_wrapper"
207
+ >
208
+ {{ dynamicErrorMessage }}
209
+ </ErrorMessage>
204
210
  </SelectButtonWrapper>
205
211
  </InputWrapper>
206
212
  </Container>
@@ -233,6 +239,7 @@
233
239
  import { Teleport, inject } from 'vue'
234
240
  import styled from 'vue3-styled-components'
235
241
  import InfoText from '../../infoText'
242
+ import ErrorMessage from '../../errorMessage'
236
243
  import Icon from '../../icon'
237
244
  import InputText from '../inputText'
238
245
  import DraggableInputHandle from '../../draggableInputHandle'
@@ -302,7 +309,6 @@
302
309
  const Container = styled('div', inputProps)`
303
310
  width: ${(props) => props.selectWidth};
304
311
  position: ${(props) => (props.noRelative ? 'static' : 'relative')};
305
- display: inline-block;
306
312
  text-align: ${(props) => (props.textCenter ? 'center' : 'left')};
307
313
  `
308
314
 
@@ -514,6 +520,7 @@
514
520
  Teleport,
515
521
  DraggableInputHandle,
516
522
  IsRequiredLabelStar,
523
+ ErrorMessage,
517
524
  },
518
525
 
519
526
  props: {
@@ -620,9 +627,14 @@
620
627
  default: true,
621
628
  },
622
629
  hasError: {
630
+ type: Boolean,
623
631
  required: false,
624
632
  default: false,
625
633
  },
634
+ errorMessage: {
635
+ type: String,
636
+ default: '',
637
+ },
626
638
  disabled: {
627
639
  required: false,
628
640
  type: Boolean,
@@ -735,6 +747,12 @@
735
747
  }
736
748
  },
737
749
  computed: {
750
+ hasErrorMessage() {
751
+ return this.errorMessage && this.errorMessage.length > 0
752
+ },
753
+ dynamicErrorMessage() {
754
+ return this.errorMessage
755
+ },
738
756
  optionLength() {
739
757
  if (this.isDropdownOpen) {
740
758
  return this.$refs.dropdown.$el.childElementCount > 1
@@ -25,6 +25,8 @@
25
25
  :resize="resize"
26
26
  :rows="rowHeight"
27
27
  :value="value"
28
+ @blur="onInputBlur"
29
+ @focus="onInputFocus"
28
30
  @input="onChangeHandler"
29
31
  ></textarea>
30
32
  </InputContainer>
@@ -208,6 +210,12 @@
208
210
  }
209
211
  this.$emit('input-change', $event.target.value)
210
212
  },
213
+ onInputBlur($event) {
214
+ this.$emit('input-blur', $event.target.value)
215
+ },
216
+ onInputFocus($event) {
217
+ this.$emit('input-focus', $event.target.value)
218
+ },
211
219
  },
212
220
  }
213
221
  </script>
@@ -59,8 +59,6 @@
59
59
 
60
60
  const getSpinnerSize = (size) => {
61
61
  switch (size) {
62
- case 'tiny':
63
- return '16px'
64
62
  case 'small':
65
63
  return '24px'
66
64
  case 'large':