@eturnity/eturnity_reusable_components 7.30.3 → 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 (81) hide show
  1. package/.eslintrc.js +184 -0
  2. package/.prettierrc +8 -6
  3. package/package.json +9 -21
  4. package/src/App.vue +79 -78
  5. package/src/assets/theme.js +3 -3
  6. package/src/components/addNewButton/AddNewButton.stories.js +2 -2
  7. package/src/components/addNewButton/index.vue +48 -51
  8. package/src/components/banner/actionBanner/index.vue +54 -55
  9. package/src/components/banner/banner/banner.stories.js +5 -5
  10. package/src/components/banner/banner/index.vue +159 -159
  11. package/src/components/banner/infoBanner/index.vue +41 -53
  12. package/src/components/buttons/buttonIcon/index.vue +125 -122
  13. package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
  14. package/src/components/buttons/closeButton/index.vue +49 -49
  15. package/src/components/buttons/mainButton/index.vue +108 -108
  16. package/src/components/card/index.vue +70 -70
  17. package/src/components/collapsableInfoText/index.vue +96 -94
  18. package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
  19. package/src/components/deleteIcon/index.vue +54 -54
  20. package/src/components/draggableInputHandle/index.vue +37 -37
  21. package/src/components/dropdown/Dropdown.stories.js +9 -10
  22. package/src/components/dropdown/index.vue +106 -106
  23. package/src/components/errorMessage/index.vue +52 -52
  24. package/src/components/filter/filterSettings.vue +428 -422
  25. package/src/components/filter/index.vue +135 -135
  26. package/src/components/filter/parentDropdown.vue +73 -73
  27. package/src/components/icon/Icons.stories.js +7 -7
  28. package/src/components/icon/iconCollection.vue +53 -53
  29. package/src/components/icon/index.vue +122 -122
  30. package/src/components/iconWrapper/index.vue +156 -156
  31. package/src/components/infoCard/index.vue +30 -32
  32. package/src/components/infoText/index.vue +142 -137
  33. package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
  34. package/src/components/inputs/checkbox/index.vue +190 -180
  35. package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
  36. package/src/components/inputs/inputNumber/index.vue +696 -696
  37. package/src/components/inputs/inputNumberQuestion/index.vue +185 -182
  38. package/src/components/inputs/inputText/InputText.stories.js +22 -22
  39. package/src/components/inputs/inputText/index.vue +337 -336
  40. package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
  41. package/src/components/inputs/radioButton/index.vue +222 -219
  42. package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
  43. package/src/components/inputs/searchInput/index.vue +127 -126
  44. package/src/components/inputs/select/index.vue +792 -791
  45. package/src/components/inputs/select/option/index.vue +124 -124
  46. package/src/components/inputs/select/select.stories.js +31 -32
  47. package/src/components/inputs/slider/index.vue +99 -99
  48. package/src/components/inputs/switchField/index.vue +220 -222
  49. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
  50. package/src/components/inputs/textAreaInput/index.vue +171 -173
  51. package/src/components/inputs/toggle/Toggle.stories.js +14 -14
  52. package/src/components/inputs/toggle/index.vue +214 -217
  53. package/src/components/label/index.vue +82 -82
  54. package/src/components/markerItem/index.vue +68 -66
  55. package/src/components/modals/actionModal/index.vue +54 -54
  56. package/src/components/modals/infoModal/index.vue +39 -36
  57. package/src/components/modals/modal/index.vue +134 -134
  58. package/src/components/modals/modal/modal.stories.js +5 -5
  59. package/src/components/navigationTabs/index.vue +96 -94
  60. package/src/components/pageSubtitle/index.vue +55 -49
  61. package/src/components/pageTitle/index.vue +56 -56
  62. package/src/components/pagination/index.vue +92 -89
  63. package/src/components/progressBar/index.vue +107 -107
  64. package/src/components/projectMarker/index.vue +246 -244
  65. package/src/components/rangeSlider/Slider.vue +491 -465
  66. package/src/components/rangeSlider/index.vue +410 -410
  67. package/src/components/rangeSlider/utils/dom.js +5 -5
  68. package/src/components/selectedOptions/index.vue +119 -119
  69. package/src/components/sideMenu/index.vue +199 -199
  70. package/src/components/spinner/index.vue +57 -57
  71. package/src/components/tableDropdown/index.vue +520 -520
  72. package/src/components/tables/mainTable/index.vue +417 -400
  73. package/src/components/tables/viewTable/index.vue +171 -171
  74. package/src/components/threeDots/index.vue +340 -334
  75. package/src/components/videoThumbnail/index.vue +86 -86
  76. package/src/components/videoThumbnail/videoThumbnail.stories.js +14 -16
  77. package/src/helpers/numberConverter.js +2 -2
  78. package/src/helpers/translateLang.js +9 -9
  79. package/src/mixins/inputValidations.js +5 -5
  80. package/public/favicon.ico +0 -0
  81. package/public/index.html +0 -17
@@ -1,200 +1,198 @@
1
1
  <template>
2
- <container :inputWidth="inputWidth">
3
- <input-wrapper
4
- :alignItems="alignItems"
5
- :hasLabel="label && label.length > 0"
2
+ <Container :input-width="inputWidth">
3
+ <InputWrapper
4
+ :align-items="alignItems"
5
+ :has-label="label && label.length > 0"
6
6
  >
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"
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
21
14
  :disabled="isDisabled"
15
+ :font-size="fontSize"
16
+ :input-width="inputWidth"
17
+ :is-error="isError"
22
18
  >
23
19
  <textarea
20
+ :data-id="inputDataId"
21
+ :disabled="isDisabled"
24
22
  :placeholder="placeholder"
23
+ :resize="resize"
25
24
  :rows="rowHeight"
26
25
  :value="value"
27
- :disabled="isDisabled"
28
26
  @input="onChangeHandler"
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>
27
+ ></textarea>
28
+ </InputContainer>
29
+ </InputWrapper>
30
+ <ErrorMessage v-if="isError && errorText">
31
+ {{ errorText }}
32
+ </ErrorMessage>
33
+ </Container>
36
34
  </template>
37
35
 
38
36
  <script>
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'
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'
57
55
 
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
- `
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
+ `
64
62
 
65
- const LabelWrapper = styled.div`
66
- display: inline-grid;
67
- grid-template-columns: auto 1fr;
68
- grid-gap: 12px;
69
- align-items: center;
70
- `
63
+ const LabelWrapper = styled.div`
64
+ display: inline-grid;
65
+ grid-template-columns: auto 1fr;
66
+ grid-gap: 12px;
67
+ align-items: center;
68
+ `
71
69
 
72
- const inputProps = {
73
- isError: Boolean,
74
- disabled: Boolean,
75
- fontSize: String,
76
- inputWidth: String
77
- }
70
+ const inputProps = {
71
+ isError: Boolean,
72
+ disabled: Boolean,
73
+ fontSize: String,
74
+ inputWidth: String,
75
+ }
78
76
 
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')};
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')};
94
92
 
95
- &::placeholder {
96
- color: ${(props) => `${props.theme.colors.grey2} !important`};
97
- }
93
+ &::placeholder {
94
+ color: ${(props) => `${props.theme.colors.grey2} !important`};
95
+ }
98
96
 
99
- &:focus {
100
- outline: none;
97
+ &:focus {
98
+ outline: none;
99
+ }
101
100
  }
102
- }
103
- `
101
+ `
104
102
 
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
- `
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
+ `
118
116
 
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
- `
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
+ `
124
122
 
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: ''
123
+ export default {
124
+ name: 'TextAreaInput',
125
+ components: {
126
+ Container,
127
+ InputContainer,
128
+ InputWrapper,
129
+ ErrorMessage,
130
+ InfoText,
131
+ LabelWrapper,
132
+ InputLabel,
140
133
  },
141
- isError: {
142
- required: false,
143
- default: false
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
+ },
144
188
  },
145
- rowHeight: {
146
- required: false,
147
- default: '2'
189
+ methods: {
190
+ onChangeHandler($event) {
191
+ if (this.isDisabled) {
192
+ return
193
+ }
194
+ this.$emit('input-change', $event.target.value)
195
+ },
148
196
  },
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
- }
198
197
  }
199
- }
200
198
  </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
  }