@eturnity/eturnity_reusable_components 6.37.0-EPDM-8148.6 → 6.37.0-EPDM-2198.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.
Files changed (47) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +42 -181
  3. package/src/assets/svgIcons/charger_icon_white.svg +44 -0
  4. package/src/assets/svgIcons/collections.svg +3 -0
  5. package/src/assets/svgIcons/dashboard.svg +3 -0
  6. package/src/assets/svgIcons/energy_meter.svg +12 -0
  7. package/src/assets/svgIcons/erase.svg +1 -1
  8. package/src/assets/svgIcons/expand.svg +1 -0
  9. package/src/assets/svgIcons/logout.svg +3 -0
  10. package/src/assets/svgIcons/split.svg +94 -0
  11. package/src/assets/svgIcons/subscriptions.svg +3 -0
  12. package/src/assets/theme.js +3 -0
  13. package/src/components/addNewButton/index.vue +12 -8
  14. package/src/components/buttons/mainButton/index.vue +35 -23
  15. package/src/components/card/index.vue +95 -0
  16. package/src/components/draggableInputHandle/index.vue +47 -0
  17. package/src/components/errorMessage/index.vue +1 -3
  18. package/src/components/filter/filterSettings.vue +15 -10
  19. package/src/components/filter/index.vue +12 -1
  20. package/src/components/icon/iconCollection.vue +5 -5
  21. package/src/components/icon/index.vue +10 -2
  22. package/src/components/iconWrapper/index.vue +17 -12
  23. package/src/components/infoCard/index.vue +36 -0
  24. package/src/components/infoText/index.vue +2 -12
  25. package/src/components/inputs/checkbox/index.vue +5 -0
  26. package/src/components/inputs/inputNumber/index.vue +48 -17
  27. package/src/components/inputs/inputText/index.vue +24 -5
  28. package/src/components/inputs/radioButton/index.vue +66 -49
  29. package/src/components/inputs/searchInput/index.vue +6 -0
  30. package/src/components/inputs/select/index.vue +138 -68
  31. package/src/components/inputs/select/option/index.vue +15 -2
  32. package/src/components/inputs/switchField/index.vue +7 -11
  33. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +0 -8
  34. package/src/components/inputs/textAreaInput/index.vue +12 -7
  35. package/src/components/inputs/toggle/index.vue +82 -82
  36. package/src/components/label/index.vue +103 -0
  37. package/src/components/modals/modal/index.vue +46 -13
  38. package/src/components/navigationTabs/index.vue +105 -0
  39. package/src/components/pageSubtitle/index.vue +1 -8
  40. package/src/components/pageTitle/index.vue +32 -4
  41. package/src/components/pagination/index.vue +136 -129
  42. package/src/components/projectMarker/index.vue +39 -33
  43. package/src/components/sideMenu/index.vue +270 -0
  44. package/src/components/tables/mainTable/index.vue +3 -3
  45. package/src/components/threeDots/index.vue +31 -22
  46. package/src/helpers/numberConverter.js +4 -2
  47. package/src/helpers/translateLang.js +9 -1
@@ -8,7 +8,7 @@
8
8
  :hasLabel="!!label && label.length > 0"
9
9
  :alignItems="alignItems"
10
10
  >
11
- <label-wrapper v-if="label">
11
+ <label-wrapper v-if="label" :data-id="labelDataId">
12
12
  <input-label
13
13
  :fontColor="
14
14
  labelFontColor || colorMode == 'dark' ? 'white' : 'eturnityGrey'
@@ -22,9 +22,7 @@
22
22
  <info-text
23
23
  v-if="infoTextMessage"
24
24
  :text="infoTextMessage"
25
- borderColor="#ccc"
26
- :size="fontSize ? fontSize : '16px'"
27
- :alignText="infoTextAlign"
25
+ :size="infoTextSize"
28
26
  />
29
27
  </label-wrapper>
30
28
  <select-button-wrapper :disabled="disabled">
@@ -45,7 +43,13 @@
45
43
  :disabled="disabled"
46
44
  @keydown.native="onKeyDown"
47
45
  :showBorder="showBorder"
46
+ :data-id="dataId"
47
+ :paddingLeft="paddingLeft"
48
48
  >
49
+ <draggableInputHandle
50
+ v-if="isDraggable && !isSearchBarVisible"
51
+ :height="selectHeight"
52
+ />
49
53
  <inputText
50
54
  v-if="isSearchBarVisible"
51
55
  ref="searchInput"
@@ -62,7 +66,12 @@
62
66
  @input-change="searchChange"
63
67
  @click.native.stop
64
68
  />
65
- <selector v-else>
69
+ <selector
70
+ v-else
71
+ :showBorder="showBorder"
72
+ :selectWidth="selectWidth"
73
+ :paddingLeft="paddingLeft"
74
+ >
66
75
  <slot name="selector" :selectedValue="selectedValue"></slot>
67
76
  </selector>
68
77
  <Caret @click.stop="toggleCaretDropdown">
@@ -104,6 +113,7 @@
104
113
  :selectedValue="selectedValue"
105
114
  @option-selected="optionSelected"
106
115
  @option-hovered="optionHovered"
116
+ @mouseleave="optionLeave"
107
117
  >
108
118
  <slot name="dropdown"></slot>
109
119
  </selectDropdown>
@@ -121,6 +131,8 @@
121
131
  // optionWidth="50%"
122
132
  // label="that is a label"
123
133
  // alignItems="vertical"
134
+ // label-data-id="test-label0data-id"
135
+ // data-id="test-data-id"
124
136
  // >
125
137
  // <template #selector="{selectedValue}">
126
138
  // value selected: {{selectedValue}}
@@ -137,21 +149,40 @@ import styled from 'vue-styled-components'
137
149
  import InfoText from '../../infoText'
138
150
  import icon from '../../icon'
139
151
  import inputText from '../inputText'
152
+ import draggableInputHandle from '../../draggableInputHandle'
153
+
154
+ const CARET_WIDTH = '30px'
155
+ const BORDER_WIDTH = '1px'
140
156
 
141
157
  const Caret = styled.div`
142
158
  display: flex;
143
159
  align-items: center;
144
160
  justify-content: center;
145
- width: 30px;
146
- min-width: 30px;
161
+ width: ${CARET_WIDTH};
162
+ min-width: ${CARET_WIDTH};
147
163
  height: 100%;
148
- align-items: stretch
164
+ align-items: stretch;
149
165
  cursor: pointer;
150
166
  margin-left: auto;
151
167
  `
152
168
 
153
- const Selector = styled.div`
154
- width: 100%;
169
+ const selectorProps = {
170
+ selectWidth: String,
171
+ paddingLeft: String,
172
+ showBorder: Boolean
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
+ }
155
186
  `
156
187
 
157
188
  const labelAttrs = { fontSize: String, fontColor: String }
@@ -160,7 +191,7 @@ const InputLabel = styled('div', labelAttrs)`
160
191
  props.theme.colors[props.fontColor]
161
192
  ? props.theme.colors[props.fontColor]
162
193
  : props.fontColor};
163
- font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
194
+ font-size: ${(props) => props.fontSize};
164
195
  font-weight: 700;
165
196
  `
166
197
  const optionalLabel = styled.span`
@@ -168,7 +199,7 @@ const optionalLabel = styled.span`
168
199
  `
169
200
  const inputProps = { selectWidth: String, optionWidth: String }
170
201
  const Container = styled('div', inputProps)`
171
- width: ${(props) => (props.selectWidth ? props.selectWidth : '100%')};
202
+ width: ${(props) => props.selectWidth};
172
203
  position: relative;
173
204
  display: inline-block;
174
205
  `
@@ -196,15 +227,16 @@ const selectButtonAttrs = {
196
227
  height: String,
197
228
  selectMinHeight: String,
198
229
  isSearchBarVisible: Boolean,
199
- showBorder: Boolean
230
+ showBorder: Boolean,
231
+ paddingLeft: String
200
232
  }
201
233
  const selectButton = styled('div', selectButtonAttrs)`
202
234
  position: relative;
203
235
  box-sizing: border-box;
204
236
  border-radius: 4px;
205
- padding: ${(props) => (props.isSearchBarVisible ? '0' : '0px 0px 0 15px')};
237
+ ${(props) =>
238
+ props.isSearchBarVisible ? '' : `padding-left: ${props.paddingLeft}`};
206
239
  text-align: left;
207
- border-radius: 4px;
208
240
  min-height: ${(props) =>
209
241
  props.selectHeight
210
242
  ? props.selectHeight
@@ -219,7 +251,9 @@ const selectButton = styled('div', selectButtonAttrs)`
219
251
  ${({ showBorder, theme, hasError }) =>
220
252
  showBorder &&
221
253
  `
222
- border:1px solid ${hasError ? theme.colors.red : theme.colors.grey4}
254
+ border: ${BORDER_WIDTH} solid ${
255
+ hasError ? theme.colors.red : theme.colors.grey4
256
+ }
223
257
  `}
224
258
  background-color:${(props) =>
225
259
  props.disabled
@@ -232,46 +266,51 @@ const selectButton = styled('div', selectButtonAttrs)`
232
266
  ? props.theme.colors[props.fontColor]
233
267
  : props.fontColor};
234
268
  ${(props) => (props.disabled ? 'pointer-events: none' : '')};
269
+ overflow: hidden;
270
+ & > .handle {
271
+ border-right: ${(props) =>
272
+ props.hasError ? props.theme.colors.red : props.theme.colors.grey4}
273
+ 1px solid;
274
+ }
235
275
  `
236
276
  const selectDropdownAttrs = {
237
277
  hoveredBgColor: String,
238
278
  bgColor: String,
239
279
  fontColor: String,
240
- selectWidth: String,
241
280
  optionWidth: String,
242
281
  hoveredIndex: Number,
243
282
  hoveredValue: Number | String,
244
283
  selectedValue: Number | String
245
284
  }
246
285
  const selectDropdown = styled('div', selectDropdownAttrs)`
247
- box-sizing: border-box;
248
- z-index:${(props) => (props.isActive ? '2' : '1')};
249
- position:absolute;
250
- top:5px;
251
- border:1px solid ${(props) => props.theme.colors.grey4}
252
- border-radius:4px;
253
- display: flex;
254
- flex-direction: column;
255
- align-items: flex-start;
256
- padding: 0px;
257
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
258
- width: ${(props) => (props.optionWidth ? props.optionWidth : '100%')};
259
- background-color:${(props) =>
260
- props.theme.colors[props.bgColor]
261
- ? props.theme.colors[props.bgColor]
262
- : props.bgColor};
263
- color:${(props) =>
264
- props.theme.colors[props.fontColor]
265
- ? props.theme.colors[props.fontColor]
266
- : props.fontColor};
267
- max-height:300px;
268
- overflow-y:auto;
269
- &>div[data-value="${(props) => props.hoveredValue}"]{
270
- background-color:${(props) =>
271
- props.theme.colors[props.hoveredBgColor]
272
- ? props.theme.colors[props.hoveredBgColor]
273
- : props.hoveredBgColor};
274
- }
286
+ box-sizing: border-box;
287
+ z-index: ${(props) => (props.isActive ? '2' : '1')};
288
+ position: absolute;
289
+ top: 5px;
290
+ border: ${BORDER_WIDTH} solid ${(props) => props.theme.colors.grey4};
291
+ border-radius: 4px;
292
+ display: flex;
293
+ flex-direction: column;
294
+ align-items: flex-start;
295
+ padding: 0px;
296
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
297
+ width: ${(props) => (props.optionWidth ? props.optionWidth : '100%')};
298
+ background-color: ${(props) =>
299
+ props.theme.colors[props.bgColor]
300
+ ? props.theme.colors[props.bgColor]
301
+ : props.bgColor};
302
+ color: ${(props) =>
303
+ props.theme.colors[props.fontColor]
304
+ ? props.theme.colors[props.fontColor]
305
+ : props.fontColor};
306
+ max-height: 300px;
307
+ overflow-y: auto;
308
+ & > div[data-value='${(props) => props.hoveredValue}'] {
309
+ background-color: ${(props) =>
310
+ props.theme.colors[props.hoveredBgColor]
311
+ ? props.theme.colors[props.hoveredBgColor]
312
+ : props.hoveredBgColor};
313
+ }
275
314
  `
276
315
  const DropdownWrapper = styled('div')`
277
316
  position: relative;
@@ -295,7 +334,7 @@ export default {
295
334
  },
296
335
  fontSize: {
297
336
  required: false,
298
- default: null
337
+ default: '13px'
299
338
  },
300
339
  label: {
301
340
  required: false
@@ -304,15 +343,17 @@ export default {
304
343
  required: false,
305
344
  default: false
306
345
  },
307
- infoTextMessage: {
308
- required: false
346
+ labelDataId: {
347
+ required: false,
348
+ default: ''
309
349
  },
310
- infoTextAlign: {
350
+ infoTextMessage: {
311
351
  required: false
312
352
  },
313
353
  selectWidth: {
354
+ type: String,
314
355
  required: false,
315
- default: null
356
+ default: '100%'
316
357
  },
317
358
  selectHeight: {
318
359
  type: String,
@@ -335,6 +376,10 @@ export default {
335
376
  required: false,
336
377
  default: false
337
378
  },
379
+ dropdownAutoClose: {
380
+ required: false,
381
+ default: false
382
+ },
338
383
  alignItems: {
339
384
  required: false,
340
385
  default: 'horizontal'
@@ -381,6 +426,18 @@ export default {
381
426
  showBorder: {
382
427
  required: false,
383
428
  default: true
429
+ },
430
+ infoTextSize: {
431
+ required: false,
432
+ default: '14px'
433
+ },
434
+ dataId: {
435
+ type: String,
436
+ default: ''
437
+ },
438
+ isDraggable: {
439
+ type: Boolean,
440
+ default: false
384
441
  }
385
442
  },
386
443
 
@@ -398,17 +455,19 @@ export default {
398
455
  icon,
399
456
  Caret,
400
457
  Selector,
401
- inputText
458
+ inputText,
459
+ draggableInputHandle
402
460
  },
403
461
 
404
462
  data() {
405
463
  return {
406
464
  selectedValue: null,
465
+ paddingLeft: this.isDraggable ? '30px' : '15px',
407
466
  isDropdownOpen: false,
408
467
  isActive: false,
409
468
  textSearch: '',
410
469
  hoveredIndex: 0,
411
- hoveredValue:null,
470
+ hoveredValue: null,
412
471
  isClickOutsideActive: false
413
472
  }
414
473
  },
@@ -447,7 +506,7 @@ export default {
447
506
  this.$emit('input-change', e)
448
507
  },
449
508
  optionHovered(e) {
450
- this.hoveredValue=e
509
+ this.hoveredValue = e
451
510
  },
452
511
  mouseEnterHandler() {
453
512
  if (this.hoverDropdown) {
@@ -460,6 +519,11 @@ export default {
460
519
  this.blur()
461
520
  }
462
521
  },
522
+ optionLeave() {
523
+ if (this.dropdownAutoClose) {
524
+ this.isDropdownOpen = false
525
+ }
526
+ },
463
527
  searchChange(value) {
464
528
  this.textSearch = value
465
529
  this.$emit('search-change', value)
@@ -473,14 +537,15 @@ export default {
473
537
  }
474
538
  })
475
539
  },
476
- onSelectSlotClick() {
477
- this.toggleDropdown()
478
- },
479
540
  clickOutside(event) {
541
+ const dropdownRef = this.$refs.dropdown
542
+ // we need to prevent closing on selecting an option, because in the case of
543
+ // a disabled option, we don't want to close the dropdown
480
544
  if (!this.isClickOutsideActive) return
481
545
  if (
482
546
  this.$refs.select.$el == event.target ||
483
- this.$refs.select.$el.contains(event.target)
547
+ this.$refs.select.$el.contains(event.target) ||
548
+ event.target.parentNode === dropdownRef.$el
484
549
  ) {
485
550
  return
486
551
  } else {
@@ -502,31 +567,36 @@ export default {
502
567
  },
503
568
  onArrowPress(dir) {
504
569
  let newHoveredElem
505
- const currentHoveredElem=this.$refs.dropdown.$el.querySelector(`[data-value="${this.hoveredValue}"]`);
506
- if(currentHoveredElem){
507
- if(dir>0){
508
- newHoveredElem=currentHoveredElem.nextElementSibling
509
- }else{
510
- newHoveredElem=currentHoveredElem.previousElementSibling
570
+ const currentHoveredElem = this.$refs.dropdown.$el.querySelector(
571
+ `[data-value="${this.hoveredValue}"]`
572
+ )
573
+ if (currentHoveredElem) {
574
+ if (dir > 0) {
575
+ newHoveredElem = currentHoveredElem.nextElementSibling
576
+ } else {
577
+ newHoveredElem = currentHoveredElem.previousElementSibling
511
578
  }
512
- if(newHoveredElem){
579
+ if (newHoveredElem) {
513
580
  this.hoveredValue = newHoveredElem.getAttribute('data-value')
514
581
  const topPos = newHoveredElem.offsetTop
515
582
  this.$refs.dropdown.$el.scrollTop = topPos
516
583
  }
517
584
  }
585
+ },
586
+ clearSearch() {
587
+ this.textSearch = ''
518
588
  }
519
589
  },
520
590
  computed: {
521
591
  optionLength() {
522
592
  if (this.isDropdownOpen) {
523
- return this.$refs.dropdown.$children.length
524
- } else {
525
- return 0
593
+ return this.$refs.dropdown.$el.childElementCount
526
594
  }
595
+
596
+ return 0
527
597
  },
528
598
  isSearchBarVisible() {
529
- return this.isSearchable && this.optionLength >= 5 && this.isDropdownOpen
599
+ return this.isSearchable && this.isDropdownOpen
530
600
  }
531
601
  },
532
602
  watch: {
@@ -11,6 +11,7 @@
11
11
  @click="clickHandler"
12
12
  @mouseover="hoverHandler"
13
13
  :cursorType="cursorType"
14
+ :isDisabled="isDisabled"
14
15
  :backgroundColor="colorMode == 'dark' ? '#000000' : backgroundColor"
15
16
  :title="hoverText"
16
17
  >
@@ -23,13 +24,14 @@
23
24
  // import selectDropdown from './selectDropDown'
24
25
  import styled from 'vue-styled-components'
25
26
  const optionProps = {
27
+ isDisabled: Boolean,
26
28
  hoveredBgColor: String,
27
29
  cursorType: String,
28
30
  backgroundColor: String
29
31
  }
30
32
  const optionContainer = styled('div', optionProps)`
31
33
  display: flex;
32
- cursor: ${(props) => props.cursorType};
34
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
33
35
  flex-direction: row;
34
36
  justify-content: space-between;
35
37
  align-items: center;
@@ -45,6 +47,8 @@ const optionContainer = styled('div', optionProps)`
45
47
  props.theme.colors[props.backgroundColor]
46
48
  ? props.theme.colors[props.backgroundColor]
47
49
  : props.backgroundColor};
50
+ color: ${(props) =>
51
+ props.isDisabled ? props.theme.colors.grey3 : 'inherit'};
48
52
  &:hover {
49
53
  background-color: ${(props) =>
50
54
  props.theme.colors[props.hoveredBgColor]
@@ -77,6 +81,10 @@ export default {
77
81
  },
78
82
  hoverText: {
79
83
  required: false
84
+ },
85
+ isDisabled: {
86
+ required: false,
87
+ default: false
80
88
  }
81
89
  },
82
90
 
@@ -87,7 +95,12 @@ export default {
87
95
  },
88
96
  methods: {
89
97
  clickHandler() {
90
- this.$parent.$emit('option-selected', this.value)
98
+ if (this.isDisabled) {
99
+ // prevent emitter if the option is disabled
100
+ return
101
+ } else {
102
+ this.$parent.$emit('option-selected', this.value)
103
+ }
91
104
  },
92
105
  hoverHandler() {
93
106
  this.$parent.$emit('option-hovered', this.value)
@@ -10,14 +10,13 @@
10
10
  v-if="label && labelAlign === 'left'"
11
11
  :hasInfoMessage="!!infoTextMessage"
12
12
  :colorMode="colorMode"
13
+ :primaryColor="primaryColor"
14
+ :secondaryColor="secondaryColor"
13
15
  >
14
16
  <label-text :size="size">{{ label }}</label-text>
15
17
  <info-text
16
18
  v-if="infoTextMessage"
17
19
  :text="infoTextMessage"
18
- borderColor="#ccc"
19
- size="14px"
20
- :alignText="infoTextAlign"
21
20
  />
22
21
  </label-container>
23
22
 
@@ -35,6 +34,7 @@
35
34
  :primaryColor="primaryColor"
36
35
  :secondaryColor="secondaryColor"
37
36
  :inactiveColor="inactiveColor"
37
+ :data-id="item.hasOwnProperty('dataId') ? item.dataId : ''"
38
38
  >
39
39
  {{ item.content }}
40
40
  </switchOption>
@@ -48,9 +48,6 @@
48
48
  @click.native.stop
49
49
  v-if="infoTextMessage"
50
50
  :text="infoTextMessage"
51
- borderColor="#ccc"
52
- size="14px"
53
- :alignText="infoTextAlign"
54
51
  />
55
52
  </label-container>
56
53
  </flex-wrapper>
@@ -99,10 +96,12 @@ const toggleAttrs = {
99
96
  fontColor: String,
100
97
  disabled: Boolean,
101
98
  backgroundColor: String,
102
- isChecked: Boolean
99
+ isChecked: Boolean,
100
+ secondaryColor: String,
101
+ primaryColor: String,
103
102
  }
104
103
  const LabelText = styled('div', toggleAttrs)`
105
- color: white;
104
+ color: ${(props) => props.primaryColor };
106
105
  font-size: 13px;
107
106
  font-weight: 700;
108
107
  `
@@ -202,9 +201,6 @@ export default {
202
201
  infoTextMessage: {
203
202
  required: false
204
203
  },
205
- infoTextAlign: {
206
- required: false
207
- },
208
204
  colorMode: {
209
205
  required: false,
210
206
  default: 'light'
@@ -22,7 +22,6 @@ const Template = (args, { argTypes }) => ({
22
22
  // rowHeight="4" //optional
23
23
  // :isError="false"
24
24
  // :errorText="$gettext('field_required')"
25
- // infoTextAlign="right" // left by default
26
25
  // infoTextMessage="My info message"
27
26
  // label="Question 5"
28
27
  // alignItems="horizontal" // horizontal, vertical
@@ -37,7 +36,6 @@ Default.args = {
37
36
  rowHeight: "2",
38
37
  isError: false,
39
38
  errorText: "This field is required",
40
- infoTextAlign: "right",
41
39
  infoTextMessage: "",
42
40
  label: "",
43
41
  value: "",
@@ -52,7 +50,6 @@ Disabled.args = {
52
50
  rowHeight: "2",
53
51
  isError: false,
54
52
  errorText: "This field is required",
55
- infoTextAlign: "right",
56
53
  infoTextMessage: "",
57
54
  label: "",
58
55
  value: "",
@@ -67,7 +64,6 @@ Error.args = {
67
64
  rowHeight: "2",
68
65
  isError: true,
69
66
  errorText: "This field is required",
70
- infoTextAlign: "right",
71
67
  infoTextMessage: "",
72
68
  label: "",
73
69
  value: "",
@@ -82,7 +78,6 @@ WithLabel.args = {
82
78
  rowHeight: "2",
83
79
  isError: false,
84
80
  errorText: "This field is required",
85
- infoTextAlign: "right",
86
81
  infoTextMessage: "Here is some information",
87
82
  label: "Description",
88
83
  value: "Here is my description!",
@@ -97,7 +92,6 @@ HorizontalLabel.args = {
97
92
  rowHeight: "2",
98
93
  isError: false,
99
94
  errorText: "This field is required",
100
- infoTextAlign: "right",
101
95
  infoTextMessage: "Here is some information",
102
96
  label: "Description",
103
97
  value: "Here is my description!",
@@ -112,7 +106,6 @@ LargerTextArea.args = {
112
106
  rowHeight: "5",
113
107
  isError: false,
114
108
  errorText: "This field is required",
115
- infoTextAlign: "right",
116
109
  infoTextMessage: "Here is some information",
117
110
  label: "Description",
118
111
  value: "Here is my description!",
@@ -127,7 +120,6 @@ LargerFontSize.args = {
127
120
  fontSize: "24px",
128
121
  isError: false,
129
122
  errorText: "This field is required",
130
- infoTextAlign: "right",
131
123
  infoTextMessage: "Here is some information",
132
124
  label: "Description",
133
125
  value: "Here is my description!",
@@ -5,13 +5,13 @@
5
5
  :hasLabel="label && label.length > 0"
6
6
  >
7
7
  <label-wrapper v-if="label">
8
- <input-label :fontSize="fontSize">{{ label }}</input-label>
8
+ <input-label :fontSize="fontSize" :data-id="labelDataId">{{
9
+ label
10
+ }}</input-label>
9
11
  <info-text
10
12
  v-if="infoTextMessage"
11
13
  :text="infoTextMessage"
12
- borderColor="#ccc"
13
14
  size="16px"
14
- :alignText="infoTextAlign"
15
15
  />
16
16
  </label-wrapper>
17
17
  <input-container
@@ -27,6 +27,7 @@
27
27
  :disabled="isDisabled"
28
28
  @input="onChangeHandler"
29
29
  :resize="resize"
30
+ :data-id="inputDataId"
30
31
  />
31
32
  </input-container>
32
33
  </input-wrapper>
@@ -44,7 +45,6 @@
44
45
  // rowHeight="4" //optional
45
46
  // :isError="false"
46
47
  // :errorText="$gettext('field_required')"
47
- // infoTextAlign="right" // left by default
48
48
  // infoTextMessage="My info message"
49
49
  // label="Question 5"
50
50
  // alignItems="horizontal" // horizontal, vertical
@@ -164,9 +164,6 @@ export default {
164
164
  infoTextMessage: {
165
165
  required: false
166
166
  },
167
- infoTextAlign: {
168
- required: false
169
- },
170
167
  label: {
171
168
  required: false
172
169
  },
@@ -181,6 +178,14 @@ export default {
181
178
  resize: {
182
179
  required: false,
183
180
  default: 'none'
181
+ },
182
+ labelDataId: {
183
+ required: false,
184
+ default: ''
185
+ },
186
+ inputDataId: {
187
+ required: false,
188
+ default: ''
184
189
  }
185
190
  },
186
191
  methods: {