@eturnity/eturnity_reusable_components 7.12.6-EPDM-7951.3 → 7.12.7-EPDM-10299.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.
Files changed (49) hide show
  1. package/.storybook/preview.js +1 -1
  2. package/package.json +23 -18
  3. package/src/App.vue +2 -2
  4. package/src/components/addNewButton/index.vue +3 -5
  5. package/src/components/buttons/buttonIcon/index.vue +1 -1
  6. package/src/components/buttons/closeButton/index.vue +1 -1
  7. package/src/components/buttons/mainButton/index.vue +1 -6
  8. package/src/components/deleteIcon/DeleteIcon.stories.js +7 -7
  9. package/src/components/deleteIcon/index.vue +21 -25
  10. package/src/components/draggableInputHandle/index.vue +25 -24
  11. package/src/components/dropdown/index.vue +110 -129
  12. package/src/components/errorMessage/index.vue +1 -1
  13. package/src/components/filter/filterSettings.vue +97 -55
  14. package/src/components/filter/index.vue +3 -3
  15. package/src/components/filter/parentDropdown.vue +2 -2
  16. package/src/components/icon/iconCollection.vue +2 -2
  17. package/src/components/icon/index.vue +54 -60
  18. package/src/components/iconWrapper/index.vue +4 -1
  19. package/src/components/infoCard/index.vue +3 -2
  20. package/src/components/infoText/index.vue +1 -1
  21. package/src/components/inputs/checkbox/index.vue +6 -21
  22. package/src/components/inputs/inputNumber/index.vue +10 -10
  23. package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
  24. package/src/components/inputs/inputText/index.vue +3 -3
  25. package/src/components/inputs/radioButton/index.vue +1 -1
  26. package/src/components/inputs/searchInput/index.vue +8 -7
  27. package/src/components/inputs/select/index.vue +71 -201
  28. package/src/components/inputs/select/option/index.vue +5 -5
  29. package/src/components/inputs/slider/index.vue +16 -16
  30. package/src/components/inputs/switchField/index.vue +2 -2
  31. package/src/components/inputs/textAreaInput/index.vue +1 -1
  32. package/src/components/inputs/toggle/index.vue +2 -2
  33. package/src/components/label/index.vue +31 -27
  34. package/src/components/modals/modal/index.vue +6 -2
  35. package/src/components/navigationTabs/index.vue +20 -27
  36. package/src/components/pageSubtitle/index.vue +1 -1
  37. package/src/components/pageTitle/index.vue +4 -4
  38. package/src/components/pagination/index.vue +1 -1
  39. package/src/components/progressBar/index.vue +1 -1
  40. package/src/components/projectMarker/index.vue +7 -10
  41. package/src/components/sideMenu/index.vue +1 -1
  42. package/src/components/spinner/index.vue +11 -6
  43. package/src/components/tableDropdown/index.vue +26 -21
  44. package/src/components/tables/mainTable/exampleNested.vue +1 -1
  45. package/src/components/tables/mainTable/index.vue +9 -10
  46. package/src/components/tables/viewTable/index.vue +2 -2
  47. package/src/components/threeDots/index.vue +1 -1
  48. package/src/components/videoThumbnail/index.vue +100 -95
  49. package/src/main.js +11 -4
@@ -60,7 +60,7 @@
60
60
  // { label: 'Button 4', value: 'button_4', disabled: true }
61
61
  // ]
62
62
 
63
- import styled from 'vue3-styled-components'
63
+ import styled from 'vue-styled-components'
64
64
  import Modal from '../../modals/modal'
65
65
  import InfoText from '../../infoText'
66
66
 
@@ -13,7 +13,10 @@
13
13
  :hasFocus="hasFocus"
14
14
  :data-id="dataId"
15
15
  />
16
- <SearchIconSvg class="search-icn" />
16
+ <img
17
+ class="search-icn"
18
+ :src="require('../../../assets/icons/search_icon_black.svg')"
19
+ />
17
20
  </input-wrapper>
18
21
  </container>
19
22
  </template>
@@ -30,8 +33,7 @@
30
33
  // :isFilter="true" // to set the height at 30px
31
34
  // data-id="test-data-id"
32
35
  // />
33
- import styled from 'vue3-styled-components'
34
- import SearchIconSvg from '../../../assets/icons/search_icon_black.svg'
36
+ import styled from 'vue-styled-components'
35
37
 
36
38
  const inputAttrs = {
37
39
  isDisabled: Boolean,
@@ -66,7 +68,7 @@ const InputContainer = styled('input', inputAttrs)`
66
68
  const InputWrapper = styled.span`
67
69
  position: relative;
68
70
 
69
- svg {
71
+ img {
70
72
  position: absolute;
71
73
  right: 10px;
72
74
  top: 50%;
@@ -79,8 +81,7 @@ export default {
79
81
  components: {
80
82
  InputContainer,
81
83
  InputWrapper,
82
- Container,
83
- SearchIconSvg
84
+ Container
84
85
  },
85
86
  props: {
86
87
  value: {
@@ -113,7 +114,7 @@ export default {
113
114
  },
114
115
  methods: {
115
116
  onChangeHandler(event) {
116
- this.$emit('on-change', event.target.value)
117
+ this.$emit('on-change', event)
117
118
  },
118
119
  focusInputElement() {
119
120
  this.$nextTick(() => {
@@ -28,9 +28,7 @@
28
28
  <select-button-wrapper :disabled="disabled">
29
29
  <selectButton
30
30
  ref="select"
31
- class="select-button"
32
31
  @click="toggleDropdown"
33
- :selectWidth="selectWidth"
34
32
  :selectHeight="selectHeight"
35
33
  :height="height"
36
34
  :selectMinHeight="selectMinHeight"
@@ -41,9 +39,9 @@
41
39
  buttonFontColor || colorMode == 'dark' ? 'white' : 'black'
42
40
  "
43
41
  :hasError="hasError"
44
- :hasNoPadding="isSearchBarVisible || !hasSelectButtonPadding"
42
+ :isSearchBarVisible="isSearchBarVisible"
45
43
  :disabled="disabled"
46
- @keydown="onKeyDown"
44
+ @keydown.native="onKeyDown"
47
45
  :showBorder="showBorder"
48
46
  :data-id="dataId"
49
47
  :paddingLeft="paddingLeft"
@@ -66,10 +64,11 @@
66
64
  :value="textSearch"
67
65
  @keydown.stop="onKeyDown"
68
66
  @input-change="searchChange"
69
- @click.stop
67
+ @click.native.stop
70
68
  />
71
69
  <selector
72
70
  v-else
71
+ :showBorder="showBorder"
73
72
  :selectWidth="selectWidth"
74
73
  :paddingLeft="paddingLeft"
75
74
  >
@@ -98,33 +97,26 @@
98
97
  />
99
98
  </Caret>
100
99
  </selectButton>
101
- <DropdownWrapper ref="dropdownWrapperRef">
102
- <Teleport to="#portal-target">
103
- <selectDropdown
104
- ref="dropdown"
105
- v-show="isSelectDropdownShown"
106
- :dropdownPosition="dropdownPosition"
107
- :hoveredIndex="hoveredIndex"
108
- :hoveredValue="hoveredValue"
109
- :isActive="isActive"
110
- :optionWidth="getOptionWidth"
111
- :hoveredBgColor="
112
- colorMode == 'dark' ? '#000000' : dropdownBgColor
113
- "
114
- :bgColor="
115
- dropdownBgColor || colorMode == 'dark' ? 'black' : 'white'
116
- "
117
- :fontColor="
118
- dropdownFontColor || colorMode == 'dark' ? 'white' : 'black'
119
- "
120
- :fontSize="fontSize"
121
- :selectedValue="selectedValue"
122
- @option-selected="optionSelected"
123
- @option-hovered="optionHovered"
124
- >
125
- <slot name="dropdown"></slot>
126
- </selectDropdown>
127
- </Teleport>
100
+ <DropdownWrapper>
101
+ <selectDropdown
102
+ ref="dropdown"
103
+ v-show="isDropdownOpen"
104
+ :hoveredIndex="hoveredIndex"
105
+ :hoveredValue="hoveredValue"
106
+ :isActive="isActive"
107
+ :optionWidth="optionWidth"
108
+ :hoveredBgColor="colorMode == 'dark' ? '#000000' : dropdownBgColor"
109
+ :bgColor="colorMode == 'dark' ? 'black' : dropdownBgColor"
110
+ :fontColor="
111
+ dropdownFontColor || colorMode == 'dark' ? 'white' : 'black'
112
+ "
113
+ :selectedValue="selectedValue"
114
+ @option-selected="optionSelected"
115
+ @option-hovered="optionHovered"
116
+ @mouseleave="optionLeave"
117
+ >
118
+ <slot name="dropdown"></slot>
119
+ </selectDropdown>
128
120
  </DropdownWrapper>
129
121
  </select-button-wrapper>
130
122
  </input-wrapper>
@@ -139,9 +131,8 @@
139
131
  // optionWidth="50%"
140
132
  // label="that is a label"
141
133
  // alignItems="vertical"
142
- // label-data-id="test-label-data-id"
134
+ // label-data-id="test-label0data-id"
143
135
  // data-id="test-data-id"
144
- // :hasSelectButtonPadding="false"
145
136
  // >
146
137
  // <template #selector="{selectedValue}">
147
138
  // value selected: {{selectedValue}}
@@ -154,8 +145,7 @@
154
145
  // </template>
155
146
  // </Select>
156
147
 
157
- import { Teleport } from 'vue'
158
- import styled from 'vue3-styled-components'
148
+ import styled from 'vue-styled-components'
159
149
  import InfoText from '../../infoText'
160
150
  import icon from '../../icon'
161
151
  import inputText from '../inputText'
@@ -171,17 +161,28 @@ const Caret = styled.div`
171
161
  width: ${CARET_WIDTH};
172
162
  min-width: ${CARET_WIDTH};
173
163
  height: 100%;
174
- align-items: center;
164
+ align-items: stretch;
175
165
  cursor: pointer;
176
166
  margin-left: auto;
177
167
  `
178
168
 
179
- const Selector = styled('div', { selectWidth: String, paddingLeft: String })`
180
- width: ${(props) =>
181
- `calc(${props.selectWidth} - (${CARET_WIDTH} + ${props.paddingLeft} + (${BORDER_WIDTH} * 2)))`};
182
- white-space: nowrap;
183
- text-overflow: ellipsis;
184
- overflow: hidden;
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
+ }
185
186
  `
186
187
 
187
188
  const labelAttrs = { fontSize: String, fontColor: String }
@@ -196,10 +197,7 @@ const InputLabel = styled('div', labelAttrs)`
196
197
  const optionalLabel = styled.span`
197
198
  font-weight: 300;
198
199
  `
199
- const inputProps = {
200
- selectWidth: String,
201
- optionWidth: String
202
- }
200
+ const inputProps = { selectWidth: String, optionWidth: String }
203
201
  const Container = styled('div', inputProps)`
204
202
  width: ${(props) => props.selectWidth};
205
203
  position: relative;
@@ -226,10 +224,9 @@ const selectButtonAttrs = {
226
224
  hasError: Boolean,
227
225
  disabled: Boolean,
228
226
  selectHeight: String,
229
- selectWidth: String,
230
227
  height: String,
231
228
  selectMinHeight: String,
232
- hasNoPadding: Boolean,
229
+ isSearchBarVisible: Boolean,
233
230
  showBorder: Boolean,
234
231
  paddingLeft: String
235
232
  }
@@ -237,9 +234,8 @@ const selectButton = styled('div', selectButtonAttrs)`
237
234
  position: relative;
238
235
  box-sizing: border-box;
239
236
  border-radius: 4px;
240
- max-width: ${(props) => (props.selectWidth ? props.selectWidth : '100%')};
241
237
  ${(props) =>
242
- props.hasNoPadding ? '' : `padding-left: ${props.paddingLeft}`};
238
+ props.isSearchBarVisible ? '' : `padding-left: ${props.paddingLeft}`};
243
239
  text-align: left;
244
240
  min-height: ${(props) =>
245
241
  props.selectHeight
@@ -251,7 +247,7 @@ const selectButton = styled('div', selectButtonAttrs)`
251
247
  : '36px'};
252
248
  display: flex;
253
249
  align-items: center;
254
- height: ${(props) => props.selectHeight};
250
+ max-height: ${(props) => props.selectHeight};
255
251
  ${({ showBorder, theme, hasError }) =>
256
252
  showBorder &&
257
253
  `
@@ -283,17 +279,14 @@ const selectDropdownAttrs = {
283
279
  fontColor: String,
284
280
  optionWidth: String,
285
281
  hoveredIndex: Number,
286
- fontSize: String,
287
- dropdownPosition: Object,
288
282
  hoveredValue: Number | String,
289
283
  selectedValue: Number | String
290
284
  }
291
285
  const selectDropdown = styled('div', selectDropdownAttrs)`
292
286
  box-sizing: border-box;
293
- z-index: ${(props) => (props.isActive ? '2' : '99999')};
287
+ z-index: ${(props) => (props.isActive ? '2' : '1')};
294
288
  position: absolute;
295
- top: ${(props) => props.dropdownPosition?.top}px;
296
- left: ${(props) => props.dropdownPosition?.left}px;
289
+ top: 5px;
297
290
  border: ${BORDER_WIDTH} solid ${(props) => props.theme.colors.grey4};
298
291
  border-radius: 4px;
299
292
  display: flex;
@@ -301,7 +294,7 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
301
294
  align-items: flex-start;
302
295
  padding: 0px;
303
296
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
304
- width: ${(props) => props.optionWidth};
297
+ width: ${(props) => (props.optionWidth ? props.optionWidth : '100%')};
305
298
  background-color: ${(props) =>
306
299
  props.theme.colors[props.bgColor]
307
300
  ? props.theme.colors[props.bgColor]
@@ -318,9 +311,7 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
318
311
  ? props.theme.colors[props.hoveredBgColor]
319
312
  : props.hoveredBgColor};
320
313
  }
321
- font-size: ${(props) => props.fontSize};
322
314
  `
323
- selectDropdown.emits = ['option-hovered', 'option-selected']
324
315
  const DropdownWrapper = styled('div')`
325
316
  position: relative;
326
317
  `
@@ -333,10 +324,6 @@ const InputWrapper = styled('div', inputAttrs)`
333
324
  grid-template-columns: ${(props) =>
334
325
  props.alignItems === 'vertical' || !props.hasLabel ? '1fr' : 'auto 1fr'};
335
326
  `
336
-
337
- const DROPDOWN_HEIGHT_OFFSET = 4
338
- const DROPDOWN_TOP_OFFSET = 21
339
-
340
327
  export default {
341
328
  name: 'RCselect',
342
329
 
@@ -448,10 +435,6 @@ export default {
448
435
  type: String,
449
436
  default: ''
450
437
  },
451
- hasSelectButtonPadding: {
452
- type: Boolean,
453
- default: true
454
- },
455
438
  isDraggable: {
456
439
  type: Boolean,
457
440
  default: false
@@ -473,7 +456,6 @@ export default {
473
456
  Caret,
474
457
  Selector,
475
458
  inputText,
476
- Teleport,
477
459
  draggableInputHandle
478
460
  },
479
461
 
@@ -485,38 +467,23 @@ export default {
485
467
  isActive: false,
486
468
  textSearch: '',
487
469
  hoveredIndex: 0,
488
- isClickOutsideActive: false,
489
- dropdownPosition: {
490
- left: null,
491
- top: null
492
- },
493
- dropdownWidth: null,
494
- hoveredValue: null
470
+ hoveredValue: null,
471
+ isClickOutsideActive: false
495
472
  }
496
473
  },
497
474
  mounted() {
498
- this.observeDropdownHeight()
499
- this.observeSelectWidth()
500
- window.addEventListener('resize', this.handleSetDropdownOffet)
501
- },
502
- beforeMount() {
503
475
  this.selectedValue = this.value
504
476
  document.addEventListener('click', this.clickOutside)
505
- this.getDropdownPosition()
506
- window.removeEventListener('resize', this.handleSetDropdownOffet)
507
- if (this.dropdownResizeObserver) this.dropdownResizeObserver.disconnect()
508
- if (this.selectResizeObserver) this.selectResizeObserver.disconnect()
509
477
  },
510
- unmounted() {
478
+ beforeDestroy() {
511
479
  document.removeEventListener('click', this.clickOutside)
512
480
  },
513
481
  methods: {
514
482
  focus() {
515
483
  this.isActive = true
516
484
  },
517
- blur(e) {
485
+ blur() {
518
486
  this.isActive = false
519
- this.$emit('blur', e)
520
487
  },
521
488
  toggleDropdown() {
522
489
  this.isDropdownOpen = !this.isDropdownOpen
@@ -532,9 +499,6 @@ export default {
532
499
  this.blur()
533
500
  this.isDropdownOpen = false
534
501
  },
535
- clearSearch() {
536
- this.textSearch = ''
537
- },
538
502
  optionSelected(e) {
539
503
  this.selectedValue = e
540
504
  this.closeDropdown()
@@ -563,15 +527,15 @@ export default {
563
527
  searchChange(value) {
564
528
  this.textSearch = value
565
529
  this.$emit('search-change', value)
566
- const dropdownChildren = [...this.$refs.dropdown.$el.children]
567
- dropdownChildren.forEach((el) => {
568
- if (!el.textContent.toLowerCase().includes(value.toLowerCase())) {
569
- el.style.display = 'none'
570
-
571
- return
572
- }
573
- el.style.display = 'inherit'
574
- })
530
+ this.$refs.dropdown.$children
531
+ .map((component) => component.$el)
532
+ .forEach((el) => {
533
+ if (!el.textContent.toLowerCase().includes(value.toLowerCase())) {
534
+ el.style.display = 'none'
535
+ } else {
536
+ el.style.display = 'inherit'
537
+ }
538
+ })
575
539
  },
576
540
  clickOutside(event) {
577
541
  const dropdownRef = this.$refs.dropdown
@@ -581,7 +545,6 @@ export default {
581
545
  if (
582
546
  this.$refs.select.$el == event.target ||
583
547
  this.$refs.select.$el.contains(event.target) ||
584
- event.target.id === 'more-button' ||
585
548
  event.target.parentNode === dropdownRef.$el
586
549
  ) {
587
550
  return
@@ -595,92 +558,13 @@ export default {
595
558
  } else if (e.key == 'ArrowUp') {
596
559
  this.onArrowPress(-1)
597
560
  } else if (e.key == 'Enter') {
598
- const optionHoveredComponent = [...this.$refs.dropdown.$el.children][
599
- (this.hoveredIndex - 1 + this.optionLength) % this.optionLength
600
- ]
561
+ const optionHoveredComponent =
562
+ this.$refs.dropdown.$children[
563
+ (this.hoveredIndex - 1 + this.optionLength) % this.optionLength
564
+ ]
601
565
  this.optionSelected(optionHoveredComponent.$el.dataset.value)
602
566
  }
603
567
  },
604
- // If some part of the dropdown menu is outside viewport of the bottom of the screen,
605
- // we need to offset it and display it at the top of the select dropdown instead
606
- async getDropdownPosition() {
607
- if (
608
- !this.$refs.dropdownWrapperRef ||
609
- !this.$refs.select ||
610
- !this.$refs.dropdown
611
- ) {
612
- return
613
- }
614
- await this.$nextTick()
615
- const isDisplayedAtBottom = await this.generateDropdownPosition()
616
- await this.$nextTick()
617
- // If the dropdown menu is going to be displayed at the bottom,
618
- // we need reverify its position after a dom update (nextTick)
619
- if (isDisplayedAtBottom) this.generateDropdownPosition()
620
- },
621
- async generateDropdownPosition() {
622
- const isDropdownNotCompletelyVisible =
623
- await this.isBottomOfDropdownOutOfViewport()
624
- const dropdownWrapperEl = this.$refs.dropdownWrapperRef.$el
625
- const selectButtonHeight = this.$refs.select.$el.clientHeight
626
- const dropdownHeight = this.$refs.dropdown.$el.clientHeight
627
- const dropdownWrapperRelativeHeight =
628
- dropdownWrapperEl.getBoundingClientRect().top +
629
- window.scrollY +
630
- DROPDOWN_HEIGHT_OFFSET
631
-
632
- const top = isDropdownNotCompletelyVisible
633
- ? dropdownWrapperRelativeHeight
634
- : dropdownWrapperRelativeHeight -
635
- dropdownHeight -
636
- selectButtonHeight -
637
- DROPDOWN_TOP_OFFSET
638
- const left = this.dropdownPosition.left
639
- ? this.dropdownPosition.left
640
- : dropdownWrapperEl.getBoundingClientRect().left + window.scrollX
641
-
642
- this.dropdownPosition = { left: Math.floor(left), top: Math.floor(top) }
643
-
644
- return isDropdownNotCompletelyVisible
645
- },
646
- async isBottomOfDropdownOutOfViewport() {
647
- if (!this.$refs.dropdown) {
648
- return false
649
- }
650
- await this.$nextTick()
651
- const rect = this.$refs.dropdown.$el.getBoundingClientRect()
652
- const windowHeight =
653
- window.innerHeight || document.documentElement.clientHeight
654
-
655
- // using Math.floor because the offsets may contain decimals we are not going to consider here
656
- return Math.floor(rect.top) + Math.floor(rect.height) <= windowHeight
657
- },
658
- observeDropdownHeight() {
659
- if (!this.$refs.dropdown) return
660
- this.dropdownResizeObserver = new ResizeObserver(() => {
661
- this.$nextTick(() => this.getDropdownPosition())
662
- })
663
- this.dropdownResizeObserver.observe(this.$refs.dropdown.$el)
664
- },
665
- handleSetDropdownOffet() {
666
- if (!this.$refs.select) return
667
- this.dropdownPosition.left = Math.floor(
668
- this.$refs.select.$el.getBoundingClientRect().left
669
- )
670
- this.getDropdownWidth()
671
- },
672
- observeSelectWidth() {
673
- if (!this.$refs.select) return
674
- this.selectResizeObserver = new ResizeObserver(() =>
675
- this.$nextTick(() => this.getDropdownWidth())
676
- )
677
- this.selectResizeObserver.observe(this.$refs.dropdown.$el)
678
- },
679
- async getDropdownWidth() {
680
- if (!this.$refs.select) return
681
- await this.$nextTick()
682
- this.dropdownWidth = `${this.$refs.select.$el.clientWidth}px`
683
- },
684
568
  onArrowPress(dir) {
685
569
  let newHoveredElem
686
570
  const currentHoveredElem = this.$refs.dropdown.$el.querySelector(
@@ -712,34 +596,20 @@ export default {
712
596
  return 0
713
597
  },
714
598
  isSearchBarVisible() {
715
- return this.isSearchable && this.optionLength >= 5 && this.isDropdownOpen
716
- },
717
- getOptionWidth() {
718
- if (this.optionWidth) return this.optionWidth
719
-
720
- return this.dropdownWidth
721
- },
722
- isSelectDropdownShown() {
723
- return (
724
- this.isSearchable &&
725
- this.isDropdownOpen &&
726
- this.dropdownPosition.left !== null
727
- )
599
+ return this.isSearchable && this.isDropdownOpen
728
600
  }
729
601
  },
730
602
  watch: {
731
603
  value(val) {
732
604
  this.selectedValue = val
733
605
  },
734
- async isDropdownOpen(val) {
606
+ isDropdownOpen(val) {
607
+ this.$emit('is-dropdown-open', val)
735
608
  if (val) {
736
609
  setTimeout(() => {
737
610
  this.isClickOutsideActive = true
738
611
  }, 10)
739
- await this.$nextTick()
740
- this.handleSetDropdownOffet()
741
612
  } else {
742
- this.dropdownPosition.left = null
743
613
  setTimeout(() => {
744
614
  this.isClickOutsideActive = false
745
615
  }, 10)
@@ -22,7 +22,7 @@
22
22
  <script>
23
23
  // import selectButton from './selectButton'
24
24
  // import selectDropdown from './selectDropDown'
25
- import styled from 'vue3-styled-components'
25
+ import styled from 'vue-styled-components'
26
26
  const optionProps = {
27
27
  isDisabled: Boolean,
28
28
  hoveredBgColor: String,
@@ -59,7 +59,7 @@ const optionContainer = styled('div', optionProps)`
59
59
 
60
60
  export default {
61
61
  name: 'RCoption',
62
- emits: ['option-hovered', 'option-selected'],
62
+
63
63
  props: {
64
64
  value: {
65
65
  required: true
@@ -73,7 +73,7 @@ export default {
73
73
  },
74
74
  cursorType: {
75
75
  required: false,
76
- default: 'pointer'
76
+ default: 'cursor'
77
77
  },
78
78
  backgroundColor: {
79
79
  required: false,
@@ -94,12 +94,12 @@ export default {
94
94
  return {}
95
95
  },
96
96
  methods: {
97
- clickHandler(e) {
97
+ clickHandler() {
98
98
  if (this.isDisabled) {
99
99
  // prevent emitter if the option is disabled
100
100
  return
101
101
  } else {
102
- this.$parent.$emit('option-selected', this.value, e)
102
+ this.$parent.$emit('option-selected', this.value)
103
103
  }
104
104
  },
105
105
  hoverHandler() {
@@ -21,8 +21,8 @@
21
21
  // :minValue="10" //default is 0 if not specified
22
22
  // :maxValue="500" //default is 100 if not specified
23
23
  // />
24
- import Slider from '@vueform/slider'
25
- import styled from 'vue3-styled-components'
24
+ import Slider from "@vueform/slider/dist/slider.vue2.js"
25
+ import styled from "vue-styled-components"
26
26
 
27
27
  const Container = styled.div`
28
28
  margin: 16px 0 16px 21px;
@@ -81,45 +81,45 @@ const NumberText = styled.div`
81
81
  `
82
82
 
83
83
  export default {
84
- name: 'slider',
84
+ name: "slider",
85
85
  components: {
86
86
  Slider,
87
87
  Container,
88
- NumberText
88
+ NumberText,
89
89
  },
90
90
  props: {
91
91
  value: {
92
92
  required: false,
93
- default: 0
93
+ default: 0,
94
94
  },
95
95
  unit: {
96
96
  required: false,
97
- default: ''
97
+ default: "",
98
98
  },
99
99
  minValue: {
100
100
  required: false,
101
- default: 0
101
+ default: 0,
102
102
  },
103
103
  maxValue: {
104
104
  required: false,
105
- default: 100
106
- }
105
+ default: 100,
106
+ },
107
107
  },
108
108
  methods: {
109
109
  onChange(value) {
110
- this.$emit('change', value)
111
- }
110
+ this.$emit("change", value)
111
+ },
112
112
  },
113
113
  mounted() {
114
114
  // This is to add the 3 white lines to the slider button
115
- let slider = document.querySelector('.slider-touch-area')
116
- let span1 = document.createElement('span')
117
- let span2 = document.createElement('span')
118
- let span3 = document.createElement('span')
115
+ let slider = document.querySelector(".slider-touch-area")
116
+ let span1 = document.createElement("span")
117
+ let span2 = document.createElement("span")
118
+ let span3 = document.createElement("span")
119
119
  slider.appendChild(span1)
120
120
  slider.appendChild(span2)
121
121
  slider.appendChild(span3)
122
- }
122
+ },
123
123
  }
124
124
  </script>
125
125
 
@@ -45,7 +45,7 @@
45
45
  >
46
46
  <label-text :size="size" :fontColor="fontColor">{{ label }}</label-text>
47
47
  <info-text
48
- @click.stop
48
+ @click.native.stop
49
49
  v-if="infoTextMessage"
50
50
  :text="infoTextMessage"
51
51
  />
@@ -70,7 +70,7 @@
70
70
  // :disabled="false"
71
71
  // />
72
72
 
73
- import styled from 'vue3-styled-components'
73
+ import styled from 'vue-styled-components'
74
74
  import InfoText from '../../infoText'
75
75
  import theme from '../../../assets/theme'
76
76
  const Container = styled.div``
@@ -51,7 +51,7 @@
51
51
  // :isDisabled="true"
52
52
  // . fontSize="13px"
53
53
  // />
54
- import styled from 'vue3-styled-components'
54
+ import styled from 'vue-styled-components'
55
55
  import InfoText from '../../infoText'
56
56
  import ErrorMessage from '../../errorMessage'
57
57
 
@@ -44,7 +44,7 @@
44
44
  >
45
45
  <label-text :size="size" :fontColor="fontColor">{{ label }}</label-text>
46
46
  <info-text
47
- @click.stop
47
+ @click.native.stop
48
48
  v-if="infoTextMessage"
49
49
  :text="infoTextMessage"
50
50
  />
@@ -70,7 +70,7 @@
70
70
  // data-id="test_data_id"
71
71
  // />
72
72
 
73
- import styled from 'vue3-styled-components'
73
+ import styled from 'vue-styled-components'
74
74
  import InfoText from '../../infoText'
75
75
 
76
76
  const Container = styled.div`