@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.0 → 7.24.3-EPDM-11143.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 (67) hide show
  1. package/.prettierrc +7 -0
  2. package/package.json +20 -6
  3. package/public/favicon.ico +0 -0
  4. package/public/index.html +17 -0
  5. package/src/App.vue +70 -75
  6. package/src/assets/svgIcons/copy.svg +10 -0
  7. package/src/components/addNewButton/index.vue +27 -24
  8. package/src/components/banner/actionBanner/index.vue +30 -32
  9. package/src/components/banner/banner/index.vue +80 -88
  10. package/src/components/banner/infoBanner/index.vue +44 -36
  11. package/src/components/buttons/buttonIcon/index.vue +78 -83
  12. package/src/components/buttons/closeButton/index.vue +26 -26
  13. package/src/components/buttons/mainButton/index.vue +76 -80
  14. package/src/components/card/index.vue +52 -56
  15. package/src/components/collapsableInfoText/index.vue +76 -81
  16. package/src/components/deleteIcon/index.vue +28 -31
  17. package/src/components/draggableInputHandle/index.vue +17 -20
  18. package/src/components/dropdown/Dropdown.stories.js +8 -8
  19. package/src/components/dropdown/index.vue +72 -75
  20. package/src/components/errorMessage/index.vue +23 -23
  21. package/src/components/filter/filterSettings.vue +329 -349
  22. package/src/components/filter/index.vue +130 -130
  23. package/src/components/filter/parentDropdown.vue +40 -43
  24. package/src/components/icon/Icons.stories.js +4 -4
  25. package/src/components/icon/iconCache.js +1 -1
  26. package/src/components/icon/iconCollection.vue +37 -40
  27. package/src/components/icon/index.vue +65 -72
  28. package/src/components/iconWrapper/index.vue +118 -122
  29. package/src/components/infoCard/index.vue +17 -20
  30. package/src/components/infoText/index.vue +82 -88
  31. package/src/components/inputs/checkbox/index.vue +94 -91
  32. package/src/components/inputs/inputNumber/index.vue +488 -508
  33. package/src/components/inputs/inputNumberQuestion/index.vue +124 -127
  34. package/src/components/inputs/inputText/index.vue +252 -265
  35. package/src/components/inputs/radioButton/index.vue +120 -135
  36. package/src/components/inputs/searchInput/index.vue +81 -84
  37. package/src/components/inputs/select/index.vue +631 -644
  38. package/src/components/inputs/select/option/index.vue +91 -91
  39. package/src/components/inputs/select/select.stories.js +7 -7
  40. package/src/components/inputs/slider/index.vue +46 -46
  41. package/src/components/inputs/switchField/index.vue +152 -159
  42. package/src/components/inputs/textAreaInput/index.vue +113 -120
  43. package/src/components/inputs/toggle/index.vue +127 -137
  44. package/src/components/label/index.vue +61 -64
  45. package/src/components/markerItem/index.vue +40 -40
  46. package/src/components/modals/actionModal/index.vue +29 -32
  47. package/src/components/modals/infoModal/index.vue +27 -34
  48. package/src/components/modals/modal/index.vue +80 -88
  49. package/src/components/navigationTabs/index.vue +47 -50
  50. package/src/components/pageSubtitle/index.vue +29 -33
  51. package/src/components/pageTitle/index.vue +39 -47
  52. package/src/components/pagination/index.vue +62 -64
  53. package/src/components/progressBar/index.vue +67 -70
  54. package/src/components/projectMarker/index.vue +163 -172
  55. package/src/components/rangeSlider/Slider.vue +449 -449
  56. package/src/components/rangeSlider/index.vue +270 -282
  57. package/src/components/rangeSlider/utils/dom.js +3 -3
  58. package/src/components/selectedOptions/index.vue +51 -51
  59. package/src/components/sideMenu/index.vue +109 -117
  60. package/src/components/spinner/index.vue +34 -37
  61. package/src/components/tableDropdown/index.vue +326 -343
  62. package/src/components/tables/mainTable/index.vue +106 -109
  63. package/src/components/tables/viewTable/index.vue +92 -105
  64. package/src/components/threeDots/index.vue +171 -174
  65. package/src/components/videoThumbnail/index.vue +59 -67
  66. package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
  67. package/.eslintrc.js +0 -125
@@ -1,30 +1,24 @@
1
1
  <template>
2
- <ComponentWrapper>
3
- <IconWrapper :size="size">
4
- <IconImg
2
+ <component-wrapper>
3
+ <icon-wrapper :size="size">
4
+ <icon-img
5
5
  @click.prevent="toggleShowInfo()"
6
6
  @mouseenter="openTrigger == 'onHover' ? toggleShowInfo() : ''"
7
7
  @mouseleave="openTrigger == 'onHover' ? toggleShowInfo() : ''"
8
8
  >
9
- <RCIcon
10
- :color="iconColor"
11
- cursor="pointer"
12
- name="info"
13
- :size="size"
14
- />
15
- </IconImg>
16
- <TextOverlay
9
+ <icon :size="size" name="info" :color="iconColor" cursor="pointer" />
10
+ </icon-img>
11
+ <text-overlay
17
12
  v-if="showInfo"
18
- :align-arrow="alignArrow"
19
- :half-computed-text-info-width="halfComputedTextInfoWidth"
20
- :icon-size="size"
21
13
  :width="width"
22
- >
23
- <slot></slot>
14
+ :halfComputedTextInfoWidth="halfComputedTextInfoWidth"
15
+ :alignArrow="alignArrow"
16
+ :iconSize="size"
17
+ ><slot />
24
18
  <span v-html="text"></span>
25
- </TextOverlay>
26
- </IconWrapper>
27
- </ComponentWrapper>
19
+ </text-overlay>
20
+ </icon-wrapper>
21
+ </component-wrapper>
28
22
  </template>
29
23
 
30
24
  <script>
@@ -35,17 +29,17 @@
35
29
  // size="20px"
36
30
  // alignArrow="right" // which side the arrow should be on
37
31
  // />
38
- import theme from '../../assets/theme.js'
39
- import styled from 'vue3-styled-components'
40
- import RCIcon from '../icon'
32
+ import theme from '../../assets/theme.js'
33
+ import styled from 'vue3-styled-components'
34
+ import icon from '../icon'
41
35
 
42
- const textAttrs = {
43
- iconSize: String,
44
- alignArrow: String,
45
- width: String,
46
- halfComputedTextInfoWidth: Number
47
- }
48
- const TextOverlay = styled('div', textAttrs)`
36
+ const textAttrs = {
37
+ iconSize: String,
38
+ alignArrow: String,
39
+ width: String,
40
+ halfComputedTextInfoWidth: Number
41
+ }
42
+ const TextOverlay = styled('div', textAttrs)`
49
43
  position: absolute;
50
44
  top: ${(props) => 'calc(' + props.iconSize + ' + 15px)'};
51
45
  ${(props) =>
@@ -53,7 +47,7 @@
53
47
  ? 'left: calc(' + props.iconSize + ' /2 - 18px)'
54
48
  : props.alignArrow === 'center'
55
49
  ? 'left: calc((-' + props.width + ' + ' + props.iconSize + ') /2 + 2px)'
56
- : 'right: calc(' + props.iconSize + ' /2 - 17px)'};
50
+ : 'right: calc(' + props.iconSize + ' /2 - 17px)'};
57
51
  text-align: left;
58
52
  background: ${(props) => props.theme.colors.black};
59
53
  padding: 10px;
@@ -76,7 +70,7 @@
76
70
  ? 'left:40px;'
77
71
  : props.alignArrow == 'center'
78
72
  ? 'left: calc(50% + 19px);'
79
- : 'right:-13px;'};
73
+ : 'right:-13px;'};
80
74
  height: 8px;
81
75
  width: 8px;
82
76
  transform-origin: center center;
@@ -88,79 +82,79 @@
88
82
  }
89
83
  `
90
84
 
91
- const iconAttrs = { size: String }
92
- const IconWrapper = styled('div', iconAttrs)`
85
+ const iconAttrs = { size: String }
86
+ const IconWrapper = styled('div', iconAttrs)`
93
87
  position: relative;
94
88
  height: ${(props) => props.size};
95
89
  `
96
90
 
97
- const IconImg = styled.div`
91
+ const IconImg = styled.div`
98
92
  line-height: 0;
99
93
  `
100
94
 
101
- const ComponentWrapper = styled.div`
95
+ const ComponentWrapper = styled.div`
102
96
  display: inline-block;
103
97
  `
104
98
 
105
- export default {
106
- name: 'InfoText',
107
- components: {
108
- IconWrapper,
109
- TextOverlay,
110
- ComponentWrapper,
111
- IconImg,
112
- RCIcon
99
+ export default {
100
+ name: 'info-text',
101
+ components: {
102
+ IconWrapper,
103
+ TextOverlay,
104
+ ComponentWrapper,
105
+ IconImg,
106
+ icon
107
+ },
108
+ props: {
109
+ text: {
110
+ required: false
113
111
  },
114
- props: {
115
- text: {
116
- required: false
117
- },
118
- size: {
119
- required: false,
120
- default: '14px'
121
- },
122
- alignArrow: {
123
- required: false,
124
- default: 'center'
125
- },
126
- openTrigger: {
127
- required: false,
128
- default: 'onHover' // onHover, onClick
129
- },
130
- width: {
131
- required: false,
132
- default: '165px'
133
- }
112
+ size: {
113
+ required: false,
114
+ default: '14px'
134
115
  },
135
- data() {
136
- return {
137
- showInfo: false
138
- }
116
+ alignArrow: {
117
+ required: false,
118
+ default: 'center'
139
119
  },
140
- computed: {
141
- iconColor() {
142
- return theme.colors.mediumGray
143
- },
144
- halfComputedTextInfoWidth() {
145
- return parseInt(this.width) / 2
146
- }
120
+ openTrigger: {
121
+ required: false,
122
+ default: 'onHover' // onHover, onClick
147
123
  },
148
- methods: {
149
- toggleShowInfo() {
150
- this.showInfo = !this.showInfo
124
+ width: {
125
+ required: false,
126
+ default: '165px'
127
+ }
128
+ },
129
+ methods: {
130
+ toggleShowInfo() {
131
+ this.showInfo = !this.showInfo
151
132
 
152
- if (this.showInfo) {
153
- document.addEventListener('click', this.clickOutside)
154
- } else {
155
- document.removeEventListener('click', this.clickOutside)
156
- }
157
- },
158
- clickOutside(event) {
159
- if (this.$el.contains(event.target)) {
160
- return
161
- }
162
- this.toggleShowInfo()
133
+ if (this.showInfo) {
134
+ document.addEventListener('click', this.clickOutside)
135
+ } else {
136
+ document.removeEventListener('click', this.clickOutside)
163
137
  }
138
+ },
139
+ clickOutside(event) {
140
+ if (this.$el.contains(event.target)) {
141
+ return
142
+ }
143
+ this.toggleShowInfo()
144
+ }
145
+ },
146
+ data() {
147
+ return {
148
+ showInfo: false
149
+ }
150
+ },
151
+ computed: {
152
+ iconColor() {
153
+ return theme.colors.mediumGray
154
+ },
155
+ halfComputedTextInfoWidth() {
156
+ return parseInt(this.width) / 2
164
157
  }
165
158
  }
159
+ }
166
160
  </script>
@@ -1,28 +1,26 @@
1
1
  <template>
2
- <ComponentWrapper>
3
- <Container
4
- :background-color="backgroundColor"
5
- :check-color="checkColor"
6
- :cursor-type="cursorType"
7
- :has-label="label && !!label.length"
8
- :is-checked="isChecked"
9
- :is-disabled="isDisabled"
2
+ <component-wrapper>
3
+ <container
4
+ :checkColor="checkColor"
10
5
  :size="size"
6
+ :hasLabel="label && !!label.length"
7
+ :backgroundColor="backgroundColor"
8
+ :isChecked="isChecked"
9
+ :isDisabled="isDisabled"
10
+ :cursorType="cursorType"
11
11
  >
12
- <InputCheckbox
12
+ <input-checkbox
13
+ type="checkbox"
13
14
  :checked="isChecked"
14
15
  :data-id="dataId"
15
- type="checkbox"
16
16
  @change="onChangeHandler(!isChecked)"
17
17
  />
18
- <CheckWrapper :has-label="hasLabel">
18
+ <check-wrapper :hasLabel="hasLabel">
19
19
  <span class="checkmark"></span>
20
- </CheckWrapper>
21
- <LabelText v-if="label && !!label.length">
22
- {{ label }}
23
- </LabelText>
24
- </Container>
25
- </ComponentWrapper>
20
+ </check-wrapper>
21
+ <label-text v-if="label && !!label.length">{{ label }}</label-text>
22
+ </container>
23
+ </component-wrapper>
26
24
  </template>
27
25
 
28
26
  <script>
@@ -38,13 +36,13 @@
38
36
  // :isDisabled="true"
39
37
  // cursorType="default"
40
38
  // />
41
- import styled from 'vue3-styled-components'
39
+ import styled from 'vue3-styled-components'
42
40
 
43
- const ComponentWrapper = styled.div`
41
+ const ComponentWrapper = styled.div`
44
42
  min-height: 18px;
45
43
  `
46
44
 
47
- const CheckWrapper = styled('div', { hasLabel: Boolean })`
45
+ const CheckWrapper = styled('div', { hasLabel: Boolean })`
48
46
  ${(props) =>
49
47
  props.hasLabel &&
50
48
  `
@@ -53,16 +51,16 @@
53
51
  `}
54
52
  `
55
53
 
56
- const containerAttrs = {
57
- checkColor: String,
58
- size: String,
59
- hasLabel: Boolean,
60
- backgroundColor: String,
61
- isChecked: Boolean,
62
- isDisabled: Boolean,
63
- cursorType: String
64
- }
65
- const Container = styled('label', containerAttrs)`
54
+ const containerAttrs = {
55
+ checkColor: String,
56
+ size: String,
57
+ hasLabel: Boolean,
58
+ backgroundColor: String,
59
+ isChecked: Boolean,
60
+ isDisabled: Boolean,
61
+ cursorType: String
62
+ }
63
+ const Container = styled('label', containerAttrs)`
66
64
  display: grid;
67
65
  grid-template-columns: ${(props) => (props.hasLabel ? '16px auto' : '16px')};
68
66
  grid-gap: 16px;
@@ -80,13 +78,13 @@
80
78
  ? '25px'
81
79
  : props.size === 'small'
82
80
  ? '16px'
83
- : '25px'};
81
+ : '25px'};
84
82
  width: ${(props) =>
85
83
  props.size === 'medium'
86
84
  ? '25px'
87
85
  : props.size === 'small'
88
86
  ? '16px'
89
- : '25px'};
87
+ : '25px'};
90
88
  background-color: ${(props) =>
91
89
  props.isChecked
92
90
  ? props.backgroundColor
@@ -94,7 +92,7 @@
94
92
  : props.theme.colors.green
95
93
  : props.isDisabled
96
94
  ? props.theme.colors.lightGray
97
- : props.theme.colors.white};
95
+ : props.theme.colors.white};
98
96
  border-radius: 4px;
99
97
  border: 1px solid
100
98
  ${(props) =>
@@ -102,7 +100,7 @@
102
100
  ? props.backgroundColor
103
101
  ? props.backgroundColor
104
102
  : props.theme.colors.green
105
- : props.theme.colors.mediumGray};
103
+ : props.theme.colors.mediumGray};
106
104
 
107
105
  &:after {
108
106
  content: '';
@@ -113,31 +111,31 @@
113
111
 
114
112
  .checkmark:after {
115
113
  left: ${(props) =>
116
- props.size === 'medium' ? '9px' : props.size === 'small' ? '5px' : '9px'};
114
+ props.size === 'medium' ? '9px' : props.size === 'small' ? '5px' : '9px'};
117
115
  top: ${(props) =>
118
- props.size === 'medium' ? '5px' : props.size === 'small' ? '2px' : '5px'};
116
+ props.size === 'medium' ? '5px' : props.size === 'small' ? '2px' : '5px'};
119
117
  width: ${(props) =>
120
- props.size === 'medium' ? '5px' : props.size === 'small' ? '3px' : '5px'};
118
+ props.size === 'medium' ? '5px' : props.size === 'small' ? '3px' : '5px'};
121
119
  height: ${(props) =>
122
120
  props.size === 'medium'
123
121
  ? '10px'
124
122
  : props.size === 'small'
125
123
  ? '6px'
126
- : '10px'};
124
+ : '10px'};
127
125
  border: solid
128
126
  ${(props) =>
129
- props.checkColor ? props.checkColor : props.theme.colors.white};
127
+ props.checkColor ? props.checkColor : props.theme.colors.white};
130
128
  border-width: ${(props) =>
131
129
  props.size === 'medium'
132
130
  ? '0 3px 3px 0'
133
131
  : props.size === 'small'
134
132
  ? '0 2px 2px 0'
135
- : '0 3px 3px 0'};
133
+ : '0 3px 3px 0'};
136
134
  transform: rotate(45deg);
137
135
  }
138
136
  `
139
137
 
140
- const InputCheckbox = styled.input`
138
+ const InputCheckbox = styled.input`
141
139
  cursor: pointer;
142
140
  position: absolute;
143
141
  opacity: 0;
@@ -146,66 +144,71 @@
146
144
  width: 0;
147
145
  `
148
146
 
149
- const LabelText = styled.div`
147
+ const LabelText = styled.div`
150
148
  font-size: 13px;
151
149
  display: grid;
152
150
  align-items: flex-start;
153
151
  min-height: 18px;
154
152
  `
155
153
 
156
- export default {
157
- name: 'Checkbox',
158
- components: {
159
- ComponentWrapper,
160
- Container,
161
- InputCheckbox,
162
- LabelText,
163
- CheckWrapper
154
+ export default {
155
+ name: 'checkbox',
156
+ components: {
157
+ ComponentWrapper,
158
+ Container,
159
+ InputCheckbox,
160
+ LabelText,
161
+ CheckWrapper
162
+ },
163
+ props: {
164
+ label: {
165
+ required: false,
166
+ default: ''
164
167
  },
165
- props: {
166
- label: {
167
- required: false,
168
- default: ''
169
- },
170
- isChecked: {
171
- required: true,
172
- default: false
173
- },
174
- checkColor: {
175
- required: false
176
- },
177
- size: {
178
- required: false,
179
- default: 'medium' // small, medium
180
- },
181
- backgroundColor: {
182
- required: false
183
- },
184
- isDisabled: {
185
- required: false,
186
- default: false
187
- },
188
- dataId: {
189
- type: String,
190
- default: ''
191
- },
192
- cursorType: {
193
- type: String,
194
- default: 'pointer'
195
- }
168
+ isChecked: {
169
+ required: true,
170
+ default: false
196
171
  },
197
- computed: {
198
- hasLabel() {
199
- return !!this.label.length
200
- }
172
+ checkColor: {
173
+ required: false
174
+ },
175
+ size: {
176
+ required: false,
177
+ default: 'medium' // small, medium
201
178
  },
202
- methods: {
203
- onChangeHandler(value) {
204
- if (this.isDisabled) {
205
- return
206
- }
207
- this.$emit('on-event-handler', value)
179
+ backgroundColor: {
180
+ required: false
181
+ },
182
+ isDisabled: {
183
+ required: false,
184
+ default: false
185
+ },
186
+ dataId: {
187
+ type: String,
188
+ default: ''
189
+ },
190
+ cursorType: {
191
+ type: String,
192
+ default: 'pointer'
193
+ }
194
+ },
195
+ computed: {
196
+ hasLabel() {
197
+ return !!this.label.length
198
+ }
199
+ },
200
+ computed: {
201
+ hasLabel() {
202
+ return !!this.label.length
203
+ }
204
+ },
205
+ methods: {
206
+ onChangeHandler(value) {
207
+ if (this.isDisabled) {
208
+ return
208
209
  }
210
+ this.$emit('on-event-handler', value)
209
211
  }
210
212
  }
213
+ }
211
214
  </script>