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