@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,61 +1,46 @@
1
1
  <template>
2
- <ComponentWrapper :layout="layout">
3
- <RadioWrapper
4
- v-for="(item, index) in options"
5
- :key="item.value"
6
- >
7
- <LabelContainer
8
- :checkmark-color="checkmarkColor"
9
- :has-label="item.label"
10
- :is-checked="selectedOption === item.value"
11
- :is-disabled="item.disabled"
2
+ <component-wrapper :layout="layout">
3
+ <radio-wrapper v-for="(item, index) in options" :key="item.value">
4
+ <label-container
12
5
  :size="size"
6
+ :hasLabel="item.label"
7
+ :isDisabled="item.disabled"
8
+ :isChecked="selectedOption === item.value"
9
+ :checkmarkColor="checkmarkColor"
13
10
  >
14
- <Radio
15
- :checked="selectedOption === item.value"
16
- :data-id="`radio_button_${dataId}_option_${item.value}`"
17
- :disabled="item.disabled"
18
- :name="'radioButtons_' + radioName"
11
+ <radio
19
12
  type="radio"
20
13
  :value="selectedOption"
21
14
  @click="onInputHandler(item.value)"
15
+ :name="'radioButtons_' + radioName"
16
+ :checked="selectedOption === item.value"
17
+ :disabled="item.disabled"
18
+ :data-id="`radio_button_${dataId}_option_${item.value}`"
22
19
  />
23
20
  <span class="checkmark"></span>
24
- <LabelText
25
- v-if="item.label"
26
- :is-disabled="item.disabled"
27
- >
28
- {{ item.label }}
29
- </LabelText>
30
- <InfoText
31
- v-if="item.infoText"
32
- size="16px"
33
- :text="item.infoText"
34
- />
35
- </LabelContainer>
36
- <ImageContainer v-if="item.img">
37
- <RadioImage :src="item.img" />
38
- <div
39
- class="search-icn-container"
40
- @click="toggleImageModal(index)"
41
- >
21
+ <label-text :isDisabled="item.disabled" v-if="item.label">{{ item.label }}</label-text>
22
+ <info-text v-if="item.infoText" :text="item.infoText" size="16px" />
23
+ </label-container>
24
+ <image-container v-if="item.img">
25
+ <radio-image :src="item.img" />
26
+ <div class="search-icn-container" @click="toggleImageModal(index)">
42
27
  <img
43
28
  class="search-icn"
44
29
  :src="require('../../../assets/icons/search_icon.png')"
45
30
  />
46
31
  </div>
47
- </ImageContainer>
48
- <Modal
32
+ </image-container>
33
+ <modal
49
34
  v-if="item.img"
50
- :is-open="isImageOpen(index)"
35
+ :isOpen="isImageOpen(index)"
51
36
  @on-close="toggleImageModal(null)"
52
37
  >
53
- <ModalImageContainer>
54
- <ModalImage :src="item.img" />
55
- </ModalImageContainer>
56
- </Modal>
57
- </RadioWrapper>
58
- </ComponentWrapper>
38
+ <modal-image-container>
39
+ <modal-image :src="item.img" />
40
+ </modal-image-container>
41
+ </modal>
42
+ </radio-wrapper>
43
+ </component-wrapper>
59
44
  </template>
60
45
 
61
46
  <script>
@@ -76,22 +61,22 @@
76
61
  // { label: 'Button 4', value: 'button_4', disabled: true }
77
62
  // ]
78
63
 
79
- import styled from 'vue3-styled-components'
80
- import Modal from '../../modals/modal'
81
- import InfoText from '../../infoText'
64
+ import styled from 'vue3-styled-components'
65
+ import Modal from '../../modals/modal'
66
+ import InfoText from '../../infoText'
82
67
 
83
- const wrapperProps = {
84
- layout: String
85
- }
86
- const ComponentWrapper = styled('div', wrapperProps)`
68
+ const wrapperProps = {
69
+ layout: String
70
+ }
71
+ const ComponentWrapper = styled('div', wrapperProps)`
87
72
  display: flex;
88
73
  flex-direction: ${(props) =>
89
- props.layout === 'vertical' ? 'column' : 'row'};
74
+ props.layout === 'vertical' ? 'column' : 'row'};
90
75
  grid-gap: 10px 5px;
91
76
  flex-wrap: wrap;
92
77
  `
93
78
 
94
- const Radio = styled.input`
79
+ const Radio = styled.input`
95
80
  cursor: pointer;
96
81
  position: absolute;
97
82
  opacity: 0;
@@ -100,26 +85,26 @@
100
85
  width: 0;
101
86
  `
102
87
 
103
- const RadioWrapper = styled.div`
88
+ const RadioWrapper = styled.div`
104
89
  display: grid;
105
90
  grid-gap: 10px;
106
91
  `
107
92
 
108
- const containerProps = {
109
- size: String,
110
- isDisabled: Boolean,
111
- isChecked: Boolean,
112
- checkmarkColor: String
113
- }
114
- const LabelContainer = styled('label', containerProps)`
93
+ const containerProps = {
94
+ size: String,
95
+ isDisabled: Boolean,
96
+ isChecked: Boolean,
97
+ checkmarkColor: String
98
+ }
99
+ const LabelContainer = styled('label', containerProps)`
115
100
  display: grid;
116
101
  grid-template-columns: auto 1fr auto;
117
102
  grid-gap: ${(props) =>
118
103
  props.hasLabel
119
- ? '15px' : 0 };
104
+ ? '15px' : 0 };
120
105
  align-items: center;
121
106
  color: ${(props) =>
122
- props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
107
+ props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
123
108
  position: relative;
124
109
  cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
125
110
  font-size: ${(props) =>
@@ -127,7 +112,7 @@
127
112
  ? '16px'
128
113
  : props.size === 'medium'
129
114
  ? '13px'
130
- : '10px'};
115
+ : '10px'};
131
116
  user-select: none;
132
117
  flex: auto;
133
118
  align-self: baseline;
@@ -138,13 +123,13 @@
138
123
  ? '23px'
139
124
  : props.size === 'medium'
140
125
  ? '16px'
141
- : '12px'};
126
+ : '12px'};
142
127
  width: ${(props) =>
143
128
  props.size === 'large'
144
129
  ? '23px'
145
130
  : props.size === 'medium'
146
131
  ? '16px'
147
- : '12px'};
132
+ : '12px'};
148
133
  background-color: #fff;
149
134
  border-radius: 100%;
150
135
  border: 1px solid ${(props) => props.theme.colors.mediumGray};
@@ -160,31 +145,31 @@
160
145
  ? '10px'
161
146
  : props.size === 'medium'
162
147
  ? '8px'
163
- : '6px'};
148
+ : '6px'};
164
149
  height: ${(props) =>
165
150
  props.size === 'large'
166
151
  ? '10px'
167
152
  : props.size === 'medium'
168
153
  ? '8px'
169
- : '6px'};
154
+ : '6px'};
170
155
  border-radius: 100%;
171
156
  background: ${(props) =>
172
- props.checkmarkColor ? props.checkmarkColor : props.theme.colors.green};
157
+ props.checkmarkColor ? props.checkmarkColor : props.theme.colors.green};
173
158
  }
174
159
  }
175
160
  `
176
161
 
177
- const textAttrs = { isDisabled: Boolean }
178
- const LabelText = styled('div', textAttrs)`
162
+ const textAttrs = { isDisabled: Boolean }
163
+ const LabelText = styled('div', textAttrs)`
179
164
  color: ${(props) =>
180
- props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
165
+ props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
181
166
  `
182
167
 
183
- const RadioImage = styled.img`
168
+ const RadioImage = styled.img`
184
169
  max-width: 100px;
185
170
  `
186
171
 
187
- const ImageContainer = styled.div`
172
+ const ImageContainer = styled.div`
188
173
  border-radius: 4px;
189
174
  cursor: pointer;
190
175
  display: grid;
@@ -209,77 +194,77 @@
209
194
  }
210
195
  `
211
196
 
212
- const ModalImage = styled.img``
197
+ const ModalImage = styled.img``
213
198
 
214
- const ModalImageContainer = styled.div`
199
+ const ModalImageContainer = styled.div`
215
200
  padding: 40px;
216
201
  `
217
202
 
218
- export default {
219
- name: 'RadioButton',
220
- components: {
221
- Radio,
222
- ComponentWrapper,
223
- LabelContainer,
224
- RadioWrapper,
225
- RadioImage,
226
- ImageContainer,
227
- Modal,
228
- ModalImage,
229
- ModalImageContainer,
230
- InfoText,
231
- LabelText
203
+ export default {
204
+ name: 'radio-button',
205
+ components: {
206
+ Radio,
207
+ ComponentWrapper,
208
+ LabelContainer,
209
+ RadioWrapper,
210
+ RadioImage,
211
+ ImageContainer,
212
+ Modal,
213
+ ModalImage,
214
+ ModalImageContainer,
215
+ InfoText,
216
+ LabelText
217
+ },
218
+ props: {
219
+ selectedOption: {
220
+ required: true,
221
+ default: false
222
+ },
223
+ options: {
224
+ required: true,
225
+ default: []
226
+ },
227
+ layout: {
228
+ required: false,
229
+ default: 'horizontal' //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
232
230
  },
233
- props: {
234
- selectedOption: {
235
- required: true,
236
- default: false
237
- },
238
- options: {
239
- required: true,
240
- default: []
241
- },
242
- layout: {
243
- required: false,
244
- default: 'horizontal' //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
245
- },
246
- size: {
247
- required: false,
248
- default: 'medium' // small, medium, large
249
- },
250
- name: {
251
- required: false,
252
- default: ''
253
- },
254
- checkmarkColor: {
255
- required: false,
256
- default: ''
257
- },
258
- dataId: {
259
- type: String,
260
- default: 'key'
261
- }
231
+ size: {
232
+ required: false,
233
+ default: 'medium' // small, medium, large
262
234
  },
263
- data() {
264
- return {
265
- selectedImage: null,
266
- radioName: ''
267
- }
235
+ name: {
236
+ required: false,
237
+ default: ''
238
+ },
239
+ checkmarkColor: {
240
+ required: false,
241
+ default: ''
242
+ },
243
+ dataId: {
244
+ type: String,
245
+ default: 'key'
246
+ }
247
+ },
248
+ data() {
249
+ return {
250
+ selectedImage: null,
251
+ radioName: ''
252
+ }
253
+ },
254
+ methods: {
255
+ onInputHandler(value) {
256
+ this.$emit('on-radio-change', value)
268
257
  },
269
- created() {
270
- this.radioName =
271
- this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
258
+ isImageOpen(index) {
259
+ return this.selectedImage === index
272
260
  },
273
- methods: {
274
- onInputHandler(value) {
275
- this.$emit('on-radio-change', value)
276
- },
277
- isImageOpen(index) {
278
- return this.selectedImage === index
279
- },
280
- toggleImageModal(value) {
281
- this.selectedImage = value
282
- }
261
+ toggleImageModal(value) {
262
+ this.selectedImage = value
283
263
  }
264
+ },
265
+ created() {
266
+ this.radioName =
267
+ this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
284
268
  }
269
+ }
285
270
  </script>
@@ -1,24 +1,21 @@
1
1
  <template>
2
- <Container :input-width="inputWidth">
3
- <InputWrapper
4
- :icon-color="iconColor"
5
- :icon-position="iconPosition"
6
- >
2
+ <container :inputWidth="inputWidth">
3
+ <input-wrapper :iconPosition="iconPosition" :iconColor="iconColor">
7
4
  <SearchIconSvg class="search-icn" />
8
- <InputContainer
5
+ <input-container
9
6
  ref="inputElement"
10
- :data-id="dataId"
11
- :disabled="disabled"
12
- :has-focus="hasFocus"
13
- :input-width="inputWidth"
14
- :is-disabled="disabled"
15
- :is-filter="isFilter"
16
7
  :placeholder="placeholder"
17
8
  :value="value"
18
9
  @input="onChangeHandler($event)"
10
+ :disabled="disabled"
11
+ :isDisabled="disabled"
12
+ :inputWidth="inputWidth"
13
+ :isFilter="isFilter"
14
+ :hasFocus="hasFocus"
15
+ :data-id="dataId"
19
16
  />
20
- </InputWrapper>
21
- </Container>
17
+ </input-wrapper>
18
+ </container>
22
19
  </template>
23
20
 
24
21
  <script>
@@ -35,23 +32,23 @@
35
32
  // iconPosition="left"
36
33
  // iconColor="grey2"
37
34
  // />
38
- import styled from 'vue3-styled-components'
39
- import SearchIconSvg from '../../../assets/icons/search_icon_black.svg'
35
+ import styled from 'vue3-styled-components'
36
+ import SearchIconSvg from '../../../assets/icons/search_icon_black.svg'
40
37
 
41
- const inputAttrs = {
42
- isDisabled: Boolean,
43
- inputWidth: String,
44
- isFilter: Boolean
45
- }
46
- const Container = styled('div', inputAttrs)`
38
+ const inputAttrs = {
39
+ isDisabled: Boolean,
40
+ inputWidth: String,
41
+ isFilter: Boolean
42
+ }
43
+ const Container = styled('div', inputAttrs)`
47
44
  width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
48
45
  position: relative;
49
46
  `
50
47
 
51
- const InputContainer = styled('input', inputAttrs)`
48
+ const InputContainer = styled('input', inputAttrs)`
52
49
  border: 1px solid ${(props) => props.theme.colors.grey4};
53
50
  padding: ${(props) =>
54
- props.isFilter ? '7px 30px 7px 10px' : '11px 30px 11px 10px'};
51
+ props.isFilter ? '7px 30px 7px 10px' : '11px 30px 11px 10px'};
55
52
  border-radius: 4px;
56
53
  font-size: 13px;
57
54
  color: ${(props) => props.theme.colors.black};
@@ -68,7 +65,7 @@
68
65
  }
69
66
  `
70
67
 
71
- const InputWrapper = styled.span`
68
+ const InputWrapper = styled.span`
72
69
  position: relative;
73
70
 
74
71
  svg {
@@ -81,73 +78,73 @@
81
78
  fill: ${(props) =>
82
79
  props.theme.colors[props.iconColor]
83
80
  ? props.theme.colors[props.iconColor]
84
- : props.iconColor};
81
+ : props.iconColor};
85
82
  }
86
83
  }
87
84
  `
88
85
 
89
- export default {
90
- name: 'SearchInput',
91
- components: {
92
- InputContainer,
93
- InputWrapper,
94
- Container,
95
- SearchIconSvg
86
+ export default {
87
+ name: 'search-input',
88
+ components: {
89
+ InputContainer,
90
+ InputWrapper,
91
+ Container,
92
+ SearchIconSvg
93
+ },
94
+ props: {
95
+ value: {
96
+ required: true
96
97
  },
97
- props: {
98
- value: {
99
- required: true
100
- },
101
- disabled: {
102
- required: false,
103
- default: false
104
- },
105
- placeholder: {
106
- required: false,
107
- default: ''
108
- },
109
- inputWidth: {
110
- required: false,
111
- default: null
112
- },
113
- isFilter: {
114
- required: false,
115
- default: false
116
- },
117
- hasFocus: {
118
- required: false,
119
- default: false
120
- },
121
- dataId: {
122
- required: false,
123
- default: ''
124
- },
125
- iconPosition: {
126
- type: String,
127
- default: 'right'
128
- },
129
- iconColor: {
130
- type: String,
131
- default: 'black'
132
- }
98
+ disabled: {
99
+ required: false,
100
+ default: false
133
101
  },
134
- emits: ['on-change'],
135
- watch: {
136
- hasFocus(newVal) {
137
- if (newVal) {
138
- this.focusInputElement()
139
- }
140
- }
102
+ placeholder: {
103
+ required: false,
104
+ default: ''
105
+ },
106
+ inputWidth: {
107
+ required: false,
108
+ default: null
141
109
  },
142
- methods: {
143
- onChangeHandler(event) {
144
- this.$emit('on-change', event.target.value)
145
- },
146
- focusInputElement() {
147
- this.$nextTick(() => {
148
- this.$refs.inputElement.$el.focus()
149
- })
110
+ isFilter: {
111
+ required: false,
112
+ default: false
113
+ },
114
+ hasFocus: {
115
+ required: false,
116
+ default: false
117
+ },
118
+ dataId: {
119
+ required: false,
120
+ default: ''
121
+ },
122
+ iconPosition: {
123
+ type: String,
124
+ default: 'right'
125
+ },
126
+ iconColor: {
127
+ type: String,
128
+ default: 'black'
129
+ }
130
+ },
131
+ emits: ['on-change'],
132
+ methods: {
133
+ onChangeHandler(event) {
134
+ this.$emit('on-change', event.target.value)
135
+ },
136
+ focusInputElement() {
137
+ this.$nextTick(() => {
138
+ this.$refs.inputElement.$el.focus()
139
+ })
140
+ }
141
+ },
142
+ watch: {
143
+ hasFocus(newVal) {
144
+ if (newVal) {
145
+ this.focusInputElement()
150
146
  }
151
147
  }
152
148
  }
149
+ }
153
150
  </script>