@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.2 → 7.24.3-qa-elisee-7.32.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 (83) hide show
  1. package/.prettierrc +6 -8
  2. package/package.json +21 -9
  3. package/public/favicon.ico +0 -0
  4. package/public/index.html +17 -0
  5. package/src/App.vue +78 -79
  6. package/src/assets/svgIcons/adjust_roof.svg +6 -0
  7. package/src/assets/svgIcons/copy.svg +10 -0
  8. package/src/assets/theme.js +3 -3
  9. package/src/components/addNewButton/AddNewButton.stories.js +2 -2
  10. package/src/components/addNewButton/index.vue +51 -48
  11. package/src/components/banner/actionBanner/index.vue +55 -54
  12. package/src/components/banner/banner/banner.stories.js +5 -5
  13. package/src/components/banner/banner/index.vue +159 -159
  14. package/src/components/banner/infoBanner/index.vue +53 -41
  15. package/src/components/buttons/buttonIcon/index.vue +122 -125
  16. package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
  17. package/src/components/buttons/closeButton/index.vue +49 -49
  18. package/src/components/buttons/mainButton/index.vue +119 -119
  19. package/src/components/card/index.vue +70 -70
  20. package/src/components/collapsableInfoText/index.vue +94 -96
  21. package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
  22. package/src/components/deleteIcon/index.vue +54 -54
  23. package/src/components/draggableInputHandle/index.vue +37 -37
  24. package/src/components/dropdown/Dropdown.stories.js +10 -9
  25. package/src/components/dropdown/index.vue +106 -106
  26. package/src/components/errorMessage/index.vue +52 -52
  27. package/src/components/filter/filterSettings.vue +433 -439
  28. package/src/components/filter/index.vue +135 -135
  29. package/src/components/filter/parentDropdown.vue +73 -73
  30. package/src/components/icon/Icons.stories.js +7 -7
  31. package/src/components/icon/iconCollection.vue +53 -53
  32. package/src/components/icon/index.vue +121 -121
  33. package/src/components/iconWrapper/index.vue +156 -156
  34. package/src/components/infoCard/index.vue +26 -26
  35. package/src/components/infoText/index.vue +132 -133
  36. package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
  37. package/src/components/inputs/checkbox/index.vue +180 -190
  38. package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
  39. package/src/components/inputs/inputNumber/index.vue +644 -647
  40. package/src/components/inputs/inputNumberQuestion/index.vue +182 -185
  41. package/src/components/inputs/inputText/InputText.stories.js +22 -22
  42. package/src/components/inputs/inputText/index.vue +336 -337
  43. package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
  44. package/src/components/inputs/radioButton/index.vue +219 -221
  45. package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
  46. package/src/components/inputs/searchInput/index.vue +126 -126
  47. package/src/components/inputs/select/index.vue +776 -778
  48. package/src/components/inputs/select/option/index.vue +124 -124
  49. package/src/components/inputs/select/select.stories.js +32 -31
  50. package/src/components/inputs/slider/index.vue +99 -99
  51. package/src/components/inputs/switchField/index.vue +222 -220
  52. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
  53. package/src/components/inputs/textAreaInput/index.vue +173 -171
  54. package/src/components/inputs/toggle/Toggle.stories.js +14 -14
  55. package/src/components/inputs/toggle/index.vue +217 -214
  56. package/src/components/label/index.vue +82 -82
  57. package/src/components/markerItem/index.vue +66 -68
  58. package/src/components/modals/actionModal/index.vue +54 -54
  59. package/src/components/modals/infoModal/index.vue +36 -39
  60. package/src/components/modals/modal/index.vue +134 -134
  61. package/src/components/modals/modal/modal.stories.js +5 -5
  62. package/src/components/navigationTabs/index.vue +94 -96
  63. package/src/components/pageSubtitle/index.vue +49 -55
  64. package/src/components/pageTitle/index.vue +56 -56
  65. package/src/components/pagination/index.vue +89 -92
  66. package/src/components/progressBar/index.vue +107 -107
  67. package/src/components/projectMarker/index.vue +244 -246
  68. package/src/components/rangeSlider/Slider.vue +465 -491
  69. package/src/components/rangeSlider/index.vue +410 -410
  70. package/src/components/rangeSlider/utils/dom.js +5 -5
  71. package/src/components/selectedOptions/index.vue +119 -119
  72. package/src/components/sideMenu/index.vue +199 -199
  73. package/src/components/spinner/index.vue +57 -57
  74. package/src/components/tableDropdown/index.vue +520 -520
  75. package/src/components/tables/mainTable/index.vue +362 -366
  76. package/src/components/tables/viewTable/index.vue +171 -171
  77. package/src/components/threeDots/index.vue +334 -340
  78. package/src/components/videoThumbnail/index.vue +86 -86
  79. package/src/components/videoThumbnail/videoThumbnail.stories.js +16 -14
  80. package/src/helpers/numberConverter.js +2 -2
  81. package/src/helpers/translateLang.js +9 -9
  82. package/src/mixins/inputValidations.js +5 -5
  83. package/.eslintrc.js +0 -184
@@ -1,7 +1,7 @@
1
- import RadioButton from './index.vue'
1
+ import RadioButton from "./index.vue"
2
2
 
3
3
  export default {
4
- title: 'RadioButton',
4
+ title: "RadioButton",
5
5
  component: RadioButton,
6
6
  // argTypes: {},
7
7
  }
@@ -34,25 +34,25 @@ const Template = (args, { argTypes }) => ({
34
34
  export const Default = Template.bind({})
35
35
  Default.args = {
36
36
  options: [
37
- { label: 'Button 1', value: 'button_1', infoText: 'my info text' },
38
- { label: 'Button 2', value: 'button_2', infoText: 'my info text 2' },
39
- { label: 'Button 3', value: 'button_3', disabled: true },
40
- { label: 'Button 4', value: 'button_4', disabled: true },
37
+ { label: "Button 1", value: "button_1", infoText: "my info text" },
38
+ { label: "Button 2", value: "button_2", infoText: "my info text 2" },
39
+ { label: "Button 3", value: "button_3", disabled: true },
40
+ { label: "Button 4", value: "button_4", disabled: true },
41
41
  ],
42
- selectedOption: 'button_2',
43
- layout: 'horizontal',
44
- size: 'medium',
42
+ selectedOption: "button_2",
43
+ layout: "horizontal",
44
+ size: "medium",
45
45
  }
46
46
 
47
47
  export const VerticalLayout = Template.bind({})
48
48
  VerticalLayout.args = {
49
49
  options: [
50
- { label: 'Button 1', value: 'button_1' },
51
- { label: 'Button 2', value: 'button_2' },
52
- { label: 'Button 3', value: 'button_3' },
53
- { label: 'Button 4', value: 'button_4', disabled: true },
50
+ { label: "Button 1", value: "button_1" },
51
+ { label: "Button 2", value: "button_2" },
52
+ { label: "Button 3", value: "button_3" },
53
+ { label: "Button 4", value: "button_4", disabled: true },
54
54
  ],
55
- selectedOption: 'button_2',
56
- layout: 'vertical',
57
- size: 'medium',
55
+ selectedOption: "button_2",
56
+ layout: "vertical",
57
+ size: "medium",
58
58
  }
@@ -1,272 +1,270 @@
1
1
  <template>
2
- <ComponentWrapper :layout="layout">
3
- <RadioWrapper v-for="(item, index) in options" :key="item.value">
4
- <LabelContainer
5
- :checkmark-color="checkmarkColor"
6
- :has-label="item.label"
7
- :is-checked="selectedOption === item.value"
8
- :is-disabled="item.disabled"
2
+ <component-wrapper :layout="layout">
3
+ <radio-wrapper v-for="(item, index) in options" :key="item.value">
4
+ <label-container
9
5
  :size="size"
6
+ :hasLabel="item.label"
7
+ :isDisabled="item.disabled"
8
+ :isChecked="selectedOption === item.value"
9
+ :checkmarkColor="checkmarkColor"
10
10
  >
11
- <Radio
12
- :checked="selectedOption === item.value"
13
- :data-id="`radio_button_${dataId}_option_${item.value}`"
14
- :disabled="item.disabled"
15
- :name="'radioButtons_' + radioName"
11
+ <radio
16
12
  type="radio"
17
13
  :value="selectedOption"
18
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}`"
19
19
  />
20
20
  <span class="checkmark"></span>
21
- <LabelText v-if="item.label" :is-disabled="item.disabled">
22
- {{ item.label }}
23
- </LabelText>
24
- <InfoText v-if="item.infoText" size="16px" :text="item.infoText" />
25
- </LabelContainer>
26
- <ImageContainer v-if="item.img">
27
- <RadioImage :src="item.img" />
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" />
28
26
  <div class="search-icn-container" @click="toggleImageModal(index)">
29
27
  <img
30
28
  class="search-icn"
31
29
  :src="require('../../../assets/icons/search_icon.png')"
32
30
  />
33
31
  </div>
34
- </ImageContainer>
35
- <Modal
32
+ </image-container>
33
+ <modal
36
34
  v-if="item.img"
37
- :is-open="isImageOpen(index)"
35
+ :isOpen="isImageOpen(index)"
38
36
  @on-close="toggleImageModal(null)"
39
37
  >
40
- <ModalImageContainer>
41
- <ModalImage :src="item.img" />
42
- </ModalImageContainer>
43
- </Modal>
44
- </RadioWrapper>
45
- </ComponentWrapper>
38
+ <modal-image-container>
39
+ <modal-image :src="item.img" />
40
+ </modal-image-container>
41
+ </modal>
42
+ </radio-wrapper>
43
+ </component-wrapper>
46
44
  </template>
47
45
 
48
46
  <script>
49
- // import RadioButton from "@eturnity/eturnity_reusable_components/src/components/inputs/radioButton"
50
- // To use:
51
- // <radio-button
52
- // :options="radioOptions"
53
- // :selectedOption="checkedOption"
54
- // @on-radio-change="onInputChange($event)"
55
- // layout="vertical"
56
- // size="large"
57
- // />
58
- // Data being passed should look like:
59
- // radioOptions: [
60
- // { label: 'Button 1', value: 'button_1', img: 'www.imagesrc.com', infoText: 'my info text' },
61
- // { label: 'Button 2', value: 'button_2', img: 'www.imagesrc.com', infoText: 'my info text 2' },
62
- // { label: 'Button 3', value: 'button_3', img: 'www.imagesrc.com', disabled: true },
63
- // { label: 'Button 4', value: 'button_4', disabled: true }
64
- // ]
47
+ // import RadioButton from "@eturnity/eturnity_reusable_components/src/components/inputs/radioButton"
48
+ // To use:
49
+ // <radio-button
50
+ // :options="radioOptions"
51
+ // :selectedOption="checkedOption"
52
+ // @on-radio-change="onInputChange($event)"
53
+ // layout="vertical"
54
+ // size="large"
55
+ // />
56
+ // Data being passed should look like:
57
+ // radioOptions: [
58
+ // { label: 'Button 1', value: 'button_1', img: 'www.imagesrc.com', infoText: 'my info text' },
59
+ // { label: 'Button 2', value: 'button_2', img: 'www.imagesrc.com', infoText: 'my info text 2' },
60
+ // { label: 'Button 3', value: 'button_3', img: 'www.imagesrc.com', disabled: true },
61
+ // { label: 'Button 4', value: 'button_4', disabled: true }
62
+ // ]
65
63
 
66
- import styled from 'vue3-styled-components'
67
- import Modal from '../../modals/modal'
68
- import InfoText from '../../infoText'
64
+ import styled from 'vue3-styled-components'
65
+ import Modal from '../../modals/modal'
66
+ import InfoText from '../../infoText'
69
67
 
70
- const wrapperProps = {
71
- layout: String,
72
- }
73
- const ComponentWrapper = styled('div', wrapperProps)`
74
- display: flex;
75
- flex-direction: ${(props) =>
76
- props.layout === 'vertical' ? 'column' : 'row'};
77
- grid-gap: 10px 5px;
78
- flex-wrap: wrap;
79
- `
68
+ const wrapperProps = {
69
+ layout: String
70
+ }
71
+ const ComponentWrapper = styled('div', wrapperProps)`
72
+ display: flex;
73
+ flex-direction: ${(props) =>
74
+ props.layout === 'vertical' ? 'column' : 'row'};
75
+ grid-gap: 10px 5px;
76
+ flex-wrap: wrap;
77
+ `
80
78
 
81
- const Radio = styled.input`
82
- cursor: pointer;
83
- position: absolute;
84
- opacity: 0;
85
- cursor: pointer;
86
- height: 0;
87
- width: 0;
88
- `
79
+ const Radio = styled.input`
80
+ cursor: pointer;
81
+ position: absolute;
82
+ opacity: 0;
83
+ cursor: pointer;
84
+ height: 0;
85
+ width: 0;
86
+ `
89
87
 
90
- const RadioWrapper = styled.div`
91
- display: grid;
92
- grid-gap: 10px;
93
- `
88
+ const RadioWrapper = styled.div`
89
+ display: grid;
90
+ grid-gap: 10px;
91
+ `
94
92
 
95
- const containerProps = {
96
- size: String,
97
- isDisabled: Boolean,
98
- isChecked: Boolean,
99
- checkmarkColor: String,
100
- }
101
- const LabelContainer = styled('label', containerProps)`
102
- display: grid;
103
- grid-template-columns: auto 1fr auto;
104
- grid-gap: ${(props) => (props.hasLabel ? '15px' : 0)};
105
- align-items: center;
106
- color: ${(props) =>
107
- props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
108
- position: relative;
109
- cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
110
- font-size: ${(props) =>
93
+ const containerProps = {
94
+ size: String,
95
+ isDisabled: Boolean,
96
+ isChecked: Boolean,
97
+ checkmarkColor: String
98
+ }
99
+ const LabelContainer = styled('label', containerProps)`
100
+ display: grid;
101
+ grid-template-columns: auto 1fr auto;
102
+ grid-gap: ${(props) =>
103
+ props.hasLabel
104
+ ? '15px' : 0 };
105
+ align-items: center;
106
+ color: ${(props) =>
107
+ props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
108
+ position: relative;
109
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
110
+ font-size: ${(props) =>
111
+ props.size === 'large'
112
+ ? '16px'
113
+ : props.size === 'medium'
114
+ ? '13px'
115
+ : '10px'};
116
+ user-select: none;
117
+ flex: auto;
118
+ align-self: baseline;
119
+
120
+ .checkmark {
121
+ height: ${(props) =>
111
122
  props.size === 'large'
123
+ ? '23px'
124
+ : props.size === 'medium'
112
125
  ? '16px'
126
+ : '12px'};
127
+ width: ${(props) =>
128
+ props.size === 'large'
129
+ ? '23px'
113
130
  : props.size === 'medium'
114
- ? '13px'
115
- : '10px'};
116
- user-select: none;
117
- flex: auto;
118
- align-self: baseline;
131
+ ? '16px'
132
+ : '12px'};
133
+ background-color: #fff;
134
+ border-radius: 100%;
135
+ border: 1px solid ${(props) => props.theme.colors.mediumGray};
136
+ display: flex;
137
+ align-items: center;
138
+ justify-content: center;
119
139
 
120
- .checkmark {
121
- height: ${(props) =>
140
+ &:after {
141
+ content: '';
142
+ display: ${(props) => (props.isChecked ? 'block' : 'none')};
143
+ width: ${(props) =>
122
144
  props.size === 'large'
123
- ? '23px'
145
+ ? '10px'
124
146
  : props.size === 'medium'
125
- ? '16px'
126
- : '12px'};
127
- width: ${(props) =>
147
+ ? '8px'
148
+ : '6px'};
149
+ height: ${(props) =>
128
150
  props.size === 'large'
129
- ? '23px'
151
+ ? '10px'
130
152
  : props.size === 'medium'
131
- ? '16px'
132
- : '12px'};
133
- background-color: #fff;
153
+ ? '8px'
154
+ : '6px'};
134
155
  border-radius: 100%;
135
- border: 1px solid ${(props) => props.theme.colors.mediumGray};
136
- display: flex;
137
- align-items: center;
138
- justify-content: center;
139
-
140
- &:after {
141
- content: '';
142
- display: ${(props) => (props.isChecked ? 'block' : 'none')};
143
- width: ${(props) =>
144
- props.size === 'large'
145
- ? '10px'
146
- : props.size === 'medium'
147
- ? '8px'
148
- : '6px'};
149
- height: ${(props) =>
150
- props.size === 'large'
151
- ? '10px'
152
- : props.size === 'medium'
153
- ? '8px'
154
- : '6px'};
155
- border-radius: 100%;
156
- background: ${(props) =>
157
- props.checkmarkColor
158
- ? props.checkmarkColor
159
- : props.theme.colors.green};
160
- }
156
+ background: ${(props) =>
157
+ props.checkmarkColor ? props.checkmarkColor : props.theme.colors.green};
161
158
  }
162
- `
159
+ }
160
+ `
163
161
 
164
- const textAttrs = { isDisabled: Boolean }
165
- const LabelText = styled('div', textAttrs)`
166
- color: ${(props) =>
167
- props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
168
- `
162
+ const textAttrs = { isDisabled: Boolean }
163
+ const LabelText = styled('div', textAttrs)`
164
+ color: ${(props) =>
165
+ props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
166
+ `
169
167
 
170
- const RadioImage = styled.img`
171
- max-width: 100px;
172
- `
168
+ const RadioImage = styled.img`
169
+ max-width: 100px;
170
+ `
173
171
 
174
- const ImageContainer = styled.div`
175
- border-radius: 4px;
176
- cursor: pointer;
177
- display: grid;
178
- align-items: center;
179
- justify-items: center;
180
- position: relative;
172
+ const ImageContainer = styled.div`
173
+ border-radius: 4px;
174
+ cursor: pointer;
175
+ display: grid;
176
+ align-items: center;
177
+ justify-items: center;
178
+ position: relative;
181
179
 
182
- .search-icn-container {
183
- display: none;
184
- }
180
+ .search-icn-container {
181
+ display: none;
182
+ }
185
183
 
186
- &:hover {
187
- .search-icn-container {
188
- display: grid;
189
- position: absolute;
190
- background: rgba(0, 0, 0, 0.4);
191
- width: 100%;
192
- height: 100%;
193
- align-items: center;
194
- justify-items: center;
195
- }
184
+ &:hover {
185
+ .search-icn-container {
186
+ display: grid;
187
+ position: absolute;
188
+ background: rgba(0, 0, 0, 0.4);
189
+ width: 100%;
190
+ height: 100%;
191
+ align-items: center;
192
+ justify-items: center;
196
193
  }
197
- `
194
+ }
195
+ `
198
196
 
199
- const ModalImage = styled.img``
197
+ const ModalImage = styled.img``
200
198
 
201
- const ModalImageContainer = styled.div`
202
- padding: 40px;
203
- `
199
+ const ModalImageContainer = styled.div`
200
+ padding: 40px;
201
+ `
204
202
 
205
- export default {
206
- name: 'RadioButton',
207
- components: {
208
- Radio,
209
- ComponentWrapper,
210
- LabelContainer,
211
- RadioWrapper,
212
- RadioImage,
213
- ImageContainer,
214
- Modal,
215
- ModalImage,
216
- ModalImageContainer,
217
- InfoText,
218
- 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
219
222
  },
220
- props: {
221
- selectedOption: {
222
- required: true,
223
- default: false,
224
- },
225
- options: {
226
- required: true,
227
- default: [],
228
- },
229
- layout: {
230
- required: false,
231
- default: 'horizontal', //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
232
- },
233
- size: {
234
- required: false,
235
- default: 'medium', // small, medium, large
236
- },
237
- name: {
238
- required: false,
239
- default: '',
240
- },
241
- checkmarkColor: {
242
- required: false,
243
- default: '',
244
- },
245
- dataId: {
246
- type: String,
247
- default: 'key',
248
- },
223
+ options: {
224
+ required: true,
225
+ default: []
249
226
  },
250
- data() {
251
- return {
252
- selectedImage: null,
253
- radioName: '',
254
- }
227
+ layout: {
228
+ required: false,
229
+ default: 'horizontal' //2 options: 'vertical' (only 1 per row) & 'horizontal' (many per row)
255
230
  },
256
- created() {
257
- this.radioName =
258
- this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
231
+ size: {
232
+ required: false,
233
+ default: 'medium' // small, medium, large
259
234
  },
260
- methods: {
261
- onInputHandler(value) {
262
- this.$emit('on-radio-change', value)
263
- },
264
- isImageOpen(index) {
265
- return this.selectedImage === index
266
- },
267
- toggleImageModal(value) {
268
- this.selectedImage = value
269
- },
235
+ name: {
236
+ required: false,
237
+ default: ''
270
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)
257
+ },
258
+ isImageOpen(index) {
259
+ return this.selectedImage === index
260
+ },
261
+ toggleImageModal(value) {
262
+ this.selectedImage = value
263
+ }
264
+ },
265
+ created() {
266
+ this.radioName =
267
+ this.name.length === 0 ? Math.round(Math.random() * 10000) : this.name
271
268
  }
269
+ }
272
270
  </script>
@@ -1,7 +1,7 @@
1
- import SearchInput from './index.vue'
1
+ import SearchInput from "./index.vue"
2
2
 
3
3
  export default {
4
- title: 'SearchInput',
4
+ title: "SearchInput",
5
5
  component: SearchInput,
6
6
  // argTypes: {},
7
7
  }
@@ -25,16 +25,16 @@ const Template = (args, { argTypes }) => ({
25
25
 
26
26
  export const Default = Template.bind({})
27
27
  Default.args = {
28
- placeholder: 'Search...',
28
+ placeholder: "Search...",
29
29
  disabled: false,
30
- value: '',
31
- inputWidth: '250px',
30
+ value: "",
31
+ inputWidth: "250px",
32
32
  }
33
33
 
34
34
  export const Disabled = Template.bind({})
35
35
  Disabled.args = {
36
- placeholder: 'Search...',
36
+ placeholder: "Search...",
37
37
  disabled: true,
38
- value: '',
39
- inputWidth: '250px',
38
+ value: "",
39
+ inputWidth: "250px",
40
40
  }