@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,198 +1,200 @@
1
1
  <template>
2
- <Container :input-width="inputWidth">
3
- <InputWrapper
4
- :align-items="alignItems"
5
- :has-label="label && label.length > 0"
2
+ <container :inputWidth="inputWidth">
3
+ <input-wrapper
4
+ :alignItems="alignItems"
5
+ :hasLabel="label && label.length > 0"
6
6
  >
7
- <LabelWrapper v-if="label">
8
- <InputLabel :data-id="labelDataId" :font-size="fontSize">
9
- {{ label }}
10
- </InputLabel>
11
- <InfoText v-if="infoTextMessage" size="16px" :text="infoTextMessage" />
12
- </LabelWrapper>
13
- <InputContainer
7
+ <label-wrapper v-if="label">
8
+ <input-label :fontSize="fontSize" :data-id="labelDataId">{{
9
+ label
10
+ }}</input-label>
11
+ <info-text
12
+ v-if="infoTextMessage"
13
+ :text="infoTextMessage"
14
+ size="16px"
15
+ />
16
+ </label-wrapper>
17
+ <input-container
18
+ :inputWidth="inputWidth"
19
+ :isError="isError"
20
+ :fontSize="fontSize"
14
21
  :disabled="isDisabled"
15
- :font-size="fontSize"
16
- :input-width="inputWidth"
17
- :is-error="isError"
18
22
  >
19
23
  <textarea
20
- :data-id="inputDataId"
21
- :disabled="isDisabled"
22
24
  :placeholder="placeholder"
23
- :resize="resize"
24
25
  :rows="rowHeight"
25
26
  :value="value"
27
+ :disabled="isDisabled"
26
28
  @input="onChangeHandler"
27
- ></textarea>
28
- </InputContainer>
29
- </InputWrapper>
30
- <ErrorMessage v-if="isError && errorText">
31
- {{ errorText }}
32
- </ErrorMessage>
33
- </Container>
29
+ :resize="resize"
30
+ :data-id="inputDataId"
31
+ />
32
+ </input-container>
33
+ </input-wrapper>
34
+ <error-message v-if="isError && errorText">{{ errorText }}</error-message>
35
+ </container>
34
36
  </template>
35
37
 
36
38
  <script>
37
- // import TextAreaInput from "@eturnity/eturnity_reusable_components/src/components/inputs/textAreaInput"
38
- // To use:
39
- // <text-area-input
40
- // placeholder="Comments"
41
- // @input-change="onInputChange({ value: $event, type: 'note' })"
42
- // :value="form.note"
43
- // rowHeight="4" //optional
44
- // :isError="false"
45
- // :errorText="$gettext('field_required')"
46
- // infoTextMessage="My info message"
47
- // label="Question 5"
48
- // alignItems="horizontal" // horizontal, vertical
49
- // :isDisabled="true"
50
- // fontSize="13px"
51
- // />
52
- import styled from 'vue3-styled-components'
53
- import InfoText from '../../infoText'
54
- import ErrorMessage from '../../errorMessage'
39
+ // import TextAreaInput from "@eturnity/eturnity_reusable_components/src/components/inputs/textAreaInput"
40
+ // To use:
41
+ // <text-area-input
42
+ // placeholder="Comments"
43
+ // @input-change="onInputChange({ value: $event, type: 'note' })"
44
+ // :value="form.note"
45
+ // rowHeight="4" //optional
46
+ // :isError="false"
47
+ // :errorText="$gettext('field_required')"
48
+ // infoTextMessage="My info message"
49
+ // label="Question 5"
50
+ // alignItems="horizontal" // horizontal, vertical
51
+ // :isDisabled="true"
52
+ // fontSize="13px"
53
+ // />
54
+ import styled from 'vue3-styled-components'
55
+ import InfoText from '../../infoText'
56
+ import ErrorMessage from '../../errorMessage'
55
57
 
56
- const containerProps = { inputWidth: String }
57
- const Container = styled('div', containerProps)`
58
- width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
59
- position: relative;
60
- margin-bottom: 20px;
61
- `
58
+ const containerProps = { inputWidth: String }
59
+ const Container = styled('div', containerProps)`
60
+ width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
61
+ position: relative;
62
+ margin-bottom: 20px;
63
+ `
62
64
 
63
- const LabelWrapper = styled.div`
64
- display: inline-grid;
65
- grid-template-columns: auto 1fr;
66
- grid-gap: 12px;
67
- align-items: center;
68
- `
65
+ const LabelWrapper = styled.div`
66
+ display: inline-grid;
67
+ grid-template-columns: auto 1fr;
68
+ grid-gap: 12px;
69
+ align-items: center;
70
+ `
69
71
 
70
- const inputProps = {
71
- isError: Boolean,
72
- disabled: Boolean,
73
- fontSize: String,
74
- inputWidth: String,
75
- }
72
+ const inputProps = {
73
+ isError: Boolean,
74
+ disabled: Boolean,
75
+ fontSize: String,
76
+ inputWidth: String
77
+ }
76
78
 
77
- const InputContainer = styled('div', inputProps)`
78
- textarea {
79
- border: ${(props) =>
80
- props.isError
81
- ? `1px solid ${props.theme.colors.red} !important`
82
- : `1px solid ${props.theme.colors.grey4} !important`};
83
- padding: ${(props) =>
84
- props.hasUnit ? '11px 40px 11px 10px !important' : '15px !important'};
85
- border-radius: 4px !important;
86
- font-size: ${(props) => `${props.fontSize} !important`};
87
- color: ${(props) => `${props.theme.colors.grey1} !important`};
88
- width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
89
- max-width: 100%;
90
- box-sizing: border-box; // to allow width of 100% with padding
91
- cursor: ${(props) => (props.disabled ? 'not-allowed' : 'inherit')};
79
+ const InputContainer = styled('div', inputProps)`
80
+ textarea {
81
+ border: ${(props) =>
82
+ props.isError
83
+ ? `1px solid ${props.theme.colors.red} !important`
84
+ : `1px solid ${props.theme.colors.grey4} !important`};
85
+ padding: ${(props) =>
86
+ props.hasUnit ? '11px 40px 11px 10px !important' : '15px !important'};
87
+ border-radius: 4px !important;
88
+ font-size: ${(props) => `${props.fontSize} !important`};
89
+ color: ${(props) => `${props.theme.colors.grey1} !important`};
90
+ width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
91
+ max-width: 100%;
92
+ box-sizing: border-box; // to allow width of 100% with padding
93
+ cursor: ${(props) => (props.disabled ? 'not-allowed' : 'inherit')};
92
94
 
93
- &::placeholder {
94
- color: ${(props) => `${props.theme.colors.grey2} !important`};
95
- }
95
+ &::placeholder {
96
+ color: ${(props) => `${props.theme.colors.grey2} !important`};
97
+ }
96
98
 
97
- &:focus {
98
- outline: none;
99
- }
99
+ &:focus {
100
+ outline: none;
100
101
  }
101
- `
102
+ }
103
+ `
102
104
 
103
- const inputAttrs = { alignItems: String, hasLabel: Boolean }
104
- const InputWrapper = styled('div', inputAttrs)`
105
- position: relative;
106
- display: grid;
107
- align-items: center;
108
- gap: 8px;
109
- grid-template-columns: ${(props) =>
110
- !props.hasLabel
111
- ? '1fr'
112
- : props.alignItems === 'vertical'
113
- ? '1fr'
114
- : 'auto 1fr'};
115
- `
105
+ const inputAttrs = { alignItems: String, hasLabel: Boolean }
106
+ const InputWrapper = styled('div', inputAttrs)`
107
+ position: relative;
108
+ display: grid;
109
+ align-items: center;
110
+ gap: 8px;
111
+ grid-template-columns: ${(props) =>
112
+ !props.hasLabel
113
+ ? '1fr'
114
+ : props.alignItems === 'vertical'
115
+ ? '1fr'
116
+ : 'auto 1fr'};
117
+ `
116
118
 
117
- const labelAttrs = { fontSize: String }
118
- const InputLabel = styled('div', labelAttrs)`
119
- font-weight: bold;
120
- font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
121
- `
119
+ const labelAttrs = { fontSize: String }
120
+ const InputLabel = styled('div', labelAttrs)`
121
+ font-weight: bold;
122
+ font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
123
+ `
122
124
 
123
- export default {
124
- name: 'TextAreaInput',
125
- components: {
126
- Container,
127
- InputContainer,
128
- InputWrapper,
129
- ErrorMessage,
130
- InfoText,
131
- LabelWrapper,
132
- InputLabel,
125
+ export default {
126
+ name: 'text-area-input',
127
+ components: {
128
+ Container,
129
+ InputContainer,
130
+ InputWrapper,
131
+ ErrorMessage,
132
+ InfoText,
133
+ LabelWrapper,
134
+ InputLabel
135
+ },
136
+ props: {
137
+ placeholder: {
138
+ required: false,
139
+ default: ''
133
140
  },
134
- props: {
135
- placeholder: {
136
- required: false,
137
- default: '',
138
- },
139
- isError: {
140
- required: false,
141
- default: false,
142
- },
143
- rowHeight: {
144
- required: false,
145
- default: '2',
146
- },
147
- value: {
148
- required: true,
149
- default: null,
150
- },
151
- errorText: {
152
- required: false,
153
- },
154
- isDisabled: {
155
- required: false,
156
- default: false,
157
- },
158
- alignItems: {
159
- required: false,
160
- default: 'horizontal',
161
- },
162
- infoTextMessage: {
163
- required: false,
164
- },
165
- label: {
166
- required: false,
167
- },
168
- fontSize: {
169
- required: false,
170
- default: '13px',
171
- },
172
- inputWidth: {
173
- required: false,
174
- default: null,
175
- },
176
- resize: {
177
- required: false,
178
- default: 'none',
179
- },
180
- labelDataId: {
181
- required: false,
182
- default: '',
183
- },
184
- inputDataId: {
185
- required: false,
186
- default: '',
187
- },
141
+ isError: {
142
+ required: false,
143
+ default: false
188
144
  },
189
- methods: {
190
- onChangeHandler($event) {
191
- if (this.isDisabled) {
192
- return
193
- }
194
- this.$emit('input-change', $event.target.value)
195
- },
145
+ rowHeight: {
146
+ required: false,
147
+ default: '2'
196
148
  },
149
+ value: {
150
+ required: true,
151
+ default: null
152
+ },
153
+ errorText: {
154
+ required: false
155
+ },
156
+ isDisabled: {
157
+ required: false,
158
+ default: false
159
+ },
160
+ alignItems: {
161
+ required: false,
162
+ default: 'horizontal'
163
+ },
164
+ infoTextMessage: {
165
+ required: false
166
+ },
167
+ label: {
168
+ required: false
169
+ },
170
+ fontSize: {
171
+ required: false,
172
+ default: '13px'
173
+ },
174
+ inputWidth: {
175
+ required: false,
176
+ default: null
177
+ },
178
+ resize: {
179
+ required: false,
180
+ default: 'none'
181
+ },
182
+ labelDataId: {
183
+ required: false,
184
+ default: ''
185
+ },
186
+ inputDataId: {
187
+ required: false,
188
+ default: ''
189
+ }
190
+ },
191
+ methods: {
192
+ onChangeHandler($event) {
193
+ if (this.isDisabled) {
194
+ return
195
+ }
196
+ this.$emit('input-change', $event.target.value)
197
+ }
197
198
  }
199
+ }
198
200
  </script>
@@ -1,7 +1,7 @@
1
- import Toggle from './index.vue'
1
+ import Toggle from "./index.vue"
2
2
 
3
3
  export default {
4
- title: 'Toggle',
4
+ title: "Toggle",
5
5
  component: Toggle,
6
6
  // argTypes: {},
7
7
  }
@@ -31,47 +31,47 @@ const Template = (args, { argTypes }) => ({
31
31
  export const Default = Template.bind({})
32
32
  Default.args = {
33
33
  isChecked: true,
34
- size: 'small', // "small" or "medium"
34
+ size: "small", // "small" or "medium"
35
35
  disabled: false,
36
36
  }
37
37
 
38
38
  export const Medium = Template.bind({})
39
39
  Medium.args = {
40
40
  isChecked: true,
41
- size: 'medium', // "small" or "medium"
41
+ size: "medium", // "small" or "medium"
42
42
  disabled: false,
43
43
  }
44
44
 
45
45
  export const CustomColor = Template.bind({})
46
46
  CustomColor.args = {
47
47
  isChecked: true,
48
- size: 'small', // "small" or "medium"
48
+ size: "small", // "small" or "medium"
49
49
  disabled: false,
50
- toggleColor: 'red',
51
- backgroundColor: 'blue',
50
+ toggleColor: "red",
51
+ backgroundColor: "blue",
52
52
  }
53
53
 
54
54
  export const LabelLeft = Template.bind({})
55
55
  LabelLeft.args = {
56
56
  isChecked: true,
57
- size: 'small', // "small" or "medium"
58
- label: 'My Label Text',
57
+ size: "small", // "small" or "medium"
58
+ label: "My Label Text",
59
59
  disabled: false,
60
- labelAlign: 'left',
60
+ labelAlign: "left",
61
61
  }
62
62
 
63
63
  export const LabelRight = Template.bind({})
64
64
  LabelRight.args = {
65
65
  isChecked: true,
66
- size: 'small', // "small" or "medium"
67
- label: 'My Label Text',
66
+ size: "small", // "small" or "medium"
67
+ label: "My Label Text",
68
68
  disabled: false,
69
- labelAlign: 'right',
69
+ labelAlign: "right",
70
70
  }
71
71
 
72
72
  export const Disabled = Template.bind({})
73
73
  Disabled.args = {
74
74
  isChecked: false,
75
- size: 'small', // "small" or "medium"
75
+ size: "small", // "small" or "medium"
76
76
  disabled: true,
77
77
  }