@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,18 +1,26 @@
1
1
  <template>
2
- <page-wrapper
3
- :position="position"
4
- :isOpen="isOpen"
5
- :class="{ visible: isOpen, hidden: !isOpen }"
2
+ <PageWrapper
6
3
  :backdrop="backdrop"
4
+ :class="{ visible: isOpen, hidden: !isOpen }"
5
+ :is-open="isOpen"
6
+ :position="position"
7
7
  >
8
- <modal-container @click="onClickModalContainer">
9
- <spinner v-if="isLoading" size="50px" :limitedToModal="true" />
10
- <content-container :visible="!isLoading">
11
- <slot />
12
- </content-container>
13
- <close-button v-if="!hideClose" @click="onCloseModal()" class="close" />
14
- </modal-container>
15
- </page-wrapper>
8
+ <ModalContainer @click="onClickModalContainer">
9
+ <Spinner
10
+ v-if="isLoading"
11
+ :limited-to-modal="true"
12
+ size="50px"
13
+ />
14
+ <ContentContainer :visible="!isLoading">
15
+ <slot></slot>
16
+ </ContentContainer>
17
+ <CloseButton
18
+ v-if="!hideClose"
19
+ class="close"
20
+ @click="onCloseModal()"
21
+ />
22
+ </ModalContainer>
23
+ </PageWrapper>
16
24
  </template>
17
25
 
18
26
  <script>
@@ -26,17 +34,17 @@
26
34
  // <div>Data....</div>
27
35
  // </modal>
28
36
 
29
- import styled from 'vue3-styled-components'
30
- import CloseButton from '../../buttons/closeButton'
31
- import Spinner from '../../spinner'
37
+ import styled from 'vue3-styled-components'
38
+ import CloseButton from '../../buttons/closeButton'
39
+ import Spinner from '../../spinner'
32
40
 
33
- const contentAttrs = { visible: Boolean }
34
- const ContentContainer = styled('div', contentAttrs)`
41
+ const contentAttrs = { visible: Boolean }
42
+ const ContentContainer = styled('div', contentAttrs)`
35
43
  visibility: ${(props) => (props.visible ? 'inherit' : 'hidden')};
36
44
  `
37
45
 
38
- const pageAttrs = { isOpen: Boolean, backdrop: String, position: String }
39
- const PageWrapper = styled('div', pageAttrs)`
46
+ const pageAttrs = { isOpen: Boolean, backdrop: String, position: String }
47
+ const PageWrapper = styled('div', pageAttrs)`
40
48
  position: ${(props) => props.position}
41
49
  display: grid;
42
50
  top: 0;
@@ -46,7 +54,7 @@ const PageWrapper = styled('div', pageAttrs)`
46
54
  background-color: ${(props) =>
47
55
  props.backdrop == 'dark'
48
56
  ? 'rgba(0, 0, 0, 0.4)'
49
- : 'rgba(255, 255, 255, 0.9)'};
57
+ : 'rgba(255, 255, 255, 0.9)'};
50
58
  z-index: 99999;
51
59
  overflow: auto;
52
60
 
@@ -67,7 +75,7 @@ const PageWrapper = styled('div', pageAttrs)`
67
75
  }
68
76
  `
69
77
 
70
- const ModalContainer = styled.div`
78
+ const ModalContainer = styled.div`
71
79
  align-self: center;
72
80
  justify-self: center;
73
81
  position: relative;
@@ -118,71 +126,71 @@ const ModalContainer = styled.div`
118
126
  }
119
127
  `
120
128
 
121
- export default {
122
- name: 'modal',
123
- components: {
124
- PageWrapper,
125
- ModalContainer,
126
- CloseButton,
127
- Spinner,
128
- ContentContainer
129
- },
130
- props: {
131
- isOpen: {
132
- required: true,
133
- default: false
134
- },
135
- isLoading: {
136
- required: false,
137
- default: false
138
- },
139
- hideClose: {
140
- required: false,
141
- default: false
142
- },
143
- backdrop: {
144
- required: false,
145
- default: 'white'
146
- },
147
- position: {
148
- required: false,
149
- default: 'fixed'
129
+ export default {
130
+ name: 'Modal',
131
+ components: {
132
+ PageWrapper,
133
+ ModalContainer,
134
+ CloseButton,
135
+ Spinner,
136
+ ContentContainer
150
137
  },
151
- stopPropagation: {
152
- type: Boolean,
153
- default: true
154
- }
155
- },
156
- beforeDestroy() {
157
- window.removeEventListener('keydown', this.handleKeyDown)
158
- },
159
- methods: {
160
- onCloseModal() {
161
- this.$emit('on-close')
162
- },
163
- handleKeyDown({ key }) {
164
- if (key === 'Escape') {
165
- this.onCloseModal()
138
+ props: {
139
+ isOpen: {
140
+ required: true,
141
+ default: false
142
+ },
143
+ isLoading: {
144
+ required: false,
145
+ default: false
146
+ },
147
+ hideClose: {
148
+ required: false,
149
+ default: false
150
+ },
151
+ backdrop: {
152
+ required: false,
153
+ default: 'white'
154
+ },
155
+ position: {
156
+ required: false,
157
+ default: 'fixed'
158
+ },
159
+ stopPropagation: {
160
+ type: Boolean,
161
+ default: true
166
162
  }
167
163
  },
168
- onClickModalContainer(event) {
169
- if (this.stopPropagation) {
170
- event.stopPropagation()
164
+ watch: {
165
+ isOpen: {
166
+ immediate: true,
167
+ handler(isOpen) {
168
+ document.body.style.overflow = isOpen ? 'hidden' : ''
169
+ if (isOpen) {
170
+ window.addEventListener('keydown', this.handleKeyDown)
171
+ } else {
172
+ window.removeEventListener('keydown', this.handleKeyDown)
173
+ }
174
+ }
171
175
  }
172
- }
173
- },
174
- watch: {
175
- isOpen: {
176
- immediate: true,
177
- handler(isOpen) {
178
- document.body.style.overflow = isOpen ? 'hidden' : ''
179
- if (isOpen) {
180
- window.addEventListener('keydown', this.handleKeyDown)
181
- } else {
182
- window.removeEventListener('keydown', this.handleKeyDown)
176
+ },
177
+ beforeDestroy() {
178
+ window.removeEventListener('keydown', this.handleKeyDown)
179
+ },
180
+ methods: {
181
+ onCloseModal() {
182
+ this.$emit('on-close')
183
+ },
184
+ handleKeyDown({ key }) {
185
+ if (key === 'Escape') {
186
+ this.onCloseModal()
187
+ }
188
+ },
189
+ onClickModalContainer(event) {
190
+ if (this.stopPropagation) {
191
+ event.stopPropagation()
183
192
  }
184
193
  }
185
194
  }
186
195
  }
187
- }
188
196
  </script>
@@ -1,6 +1,9 @@
1
1
  <template>
2
- <ActionModal :is-open="isOpen" @on-close="closeModal">
3
- <modalContainer>
2
+ <ActionModal
3
+ :is-open="isOpen"
4
+ @on-close="closeModal"
5
+ >
6
+ <ModalContainer>
4
7
  <template name="title">
5
8
  <slot name="title"></slot>
6
9
  </template>
@@ -8,62 +11,51 @@
8
11
  <slot name="body"></slot>
9
12
  </template>
10
13
  <template name="buttons">
11
- <buttonContainer>
12
- <Button type="primary" :text="$gettext('Got it')" minWidth="150px" @click="closeModal" />
13
- </buttonContainer>
14
+ <ButtonContainer>
15
+ <Button
16
+ min-width="150px"
17
+ :text="$gettext('Got it')"
18
+ type="primary"
19
+ @click="closeModal"
20
+ />
21
+ </ButtonContainer>
14
22
  </template>
15
-
16
- </modalContainer>
23
+ </ModalContainer>
17
24
  </ActionModal>
18
25
  </template>
19
26
  <script>
20
27
 
21
- import styled from 'vue3-styled-components'
22
- import ActionModal from '../actionModal'
28
+ import styled from 'vue3-styled-components'
29
+ import ActionModal from '../actionModal'
23
30
 
24
- const modalContainer = styled.div`
31
+ const ModalContainer = styled.div`
25
32
  width: 450px;
26
33
  min-height: 205px;
27
34
  padding: 40px 40px 30px 40px;
28
35
  `
29
- const modalTitle = styled.div`
30
- color: ${(props) => props.theme.colors.black};
31
- font-family: ${(props) => props.theme.fonts.mainFont};
32
- font-size: 18px;
33
- font-style: normal;
34
- font-weight: 700;
35
- line-height: 120%;
36
- text-transform: uppercase;
37
- `
38
- const buttonContainer = styled.div`
36
+ const ButtonContainer = styled.div`
39
37
  display: inline-flex;
40
38
  align-items: flex-start;
41
39
  gap: 20px;
42
40
  `
43
- const textContainer = styled.div`
44
- color: ${(props) => props.theme.colors.black};
45
- font-family: ${(props) => props.theme.fonts.mainFont};
46
- font-size: 13px;
47
- font-style: normal;
48
- font-weight: 400;
49
- line-height: normal;
50
- padding: 30px 0px;
51
- white-space: pre-wrap;
52
- `
53
- export default {
54
- name: 'InfoModal',
55
- props: ['isOpen'],
56
- components: {
57
- Modal,
58
- modalContainer,
59
- modalTitle,
60
- buttonContainer,
61
- textContainer
62
- },
63
- methods: {
64
- closeModal() {
65
- this.$emit('on-close')
41
+ export default {
42
+ name: 'InfoModal',
43
+ components: {
44
+ ModalContainer,
45
+ ButtonContainer,
46
+ ActionModal
47
+ },
48
+ props: {
49
+ isOpen: {
50
+ required: false,
51
+ default: false,
52
+ type: Boolean
53
+ }
54
+ },
55
+ methods: {
56
+ closeModal() {
57
+ this.$emit('on-close')
58
+ }
66
59
  }
67
60
  }
68
- }
69
61
  </script>
@@ -1,21 +1,26 @@
1
1
  <template>
2
- <page-container>
3
- <button-wrapper
4
- :isDisabled="isDisabled"
5
- :minWidth="minWidth"
6
- :customColor="customColor"
2
+ <PageContainer>
3
+ <ButtonWrapper
4
+ :custom-color="customColor"
7
5
  :height="height"
6
+ :is-disabled="isDisabled"
7
+ :min-width="minWidth"
8
8
  >
9
- <icon-container :width="height">
10
- <icon
11
- :name="iconName"
12
- :color="fontColor ? fontColor : theme.colors.white"
13
- size="14px"
9
+ <IconContainer :width="height">
10
+ <Icon
11
+ :color="fontColor ? fontColor : theme.colors.white"
12
+ :name="iconName"
13
+ size="14px"
14
14
  />
15
- </icon-container>
16
- <button-container :fontSize="fontSize" :fontColor="fontColor">{{ text }}</button-container>
17
- </button-wrapper>
18
- </page-container>
15
+ </IconContainer>
16
+ <ButtonContainer
17
+ :font-color="fontColor"
18
+ :font-size="fontSize"
19
+ >
20
+ {{ text }}
21
+ </ButtonContainer>
22
+ </ButtonWrapper>
23
+ </PageContainer>
19
24
  </template>
20
25
 
21
26
  <script>
@@ -31,19 +36,19 @@
31
36
  // height="24px"
32
37
  // />
33
38
 
34
- import Icon from "../../icon"
35
- import styled from "vue3-styled-components"
36
- import Theme from "@/assets/theme";
39
+ import Icon from "../../icon"
40
+ import styled from "vue3-styled-components"
41
+ import Theme from "@/assets/theme";
37
42
 
38
- const PageContainer = styled.div``
43
+ const PageContainer = styled.div``
39
44
 
40
- const ButtonAttrs = {
41
- isDisabled: Boolean,
42
- minWidth: String,
43
- customColor: String,
44
- height: String
45
- }
46
- const ButtonWrapper = styled("div", ButtonAttrs)`
45
+ const ButtonAttrs = {
46
+ isDisabled: Boolean,
47
+ minWidth: String,
48
+ customColor: String,
49
+ height: String
50
+ }
51
+ const ButtonWrapper = styled("div", ButtonAttrs)`
47
52
  display: grid;
48
53
  grid-template-columns: auto 1fr;
49
54
  background-color: ${(props) =>
@@ -51,7 +56,7 @@ const ButtonWrapper = styled("div", ButtonAttrs)`
51
56
  ? props.theme.colors.disabled
52
57
  : props.customColor
53
58
  ? props.customColor
54
- : props.theme.colors.yellow};
59
+ : props.theme.colors.yellow};
55
60
  cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
56
61
  user-select: none;
57
62
  border-radius: 4px;
@@ -68,11 +73,11 @@ const ButtonWrapper = styled("div", ButtonAttrs)`
68
73
  }
69
74
  `
70
75
 
71
- const ButtonContainerAttrs = {
72
- fontSize: String,
73
- fontColor: String
74
- }
75
- const ButtonContainer = styled('div', ButtonContainerAttrs)`
76
+ const ButtonContainerAttrs = {
77
+ fontSize: String,
78
+ fontColor: String
79
+ }
80
+ const ButtonContainer = styled('div', ButtonContainerAttrs)`
76
81
  font-size: ${(props) => props.fontSize};
77
82
  color: ${(props) => props.fontColor ? props.fontColor : props.theme.colors.white};
78
83
  display: flex;
@@ -81,10 +86,10 @@ const ButtonContainer = styled('div', ButtonContainerAttrs)`
81
86
  padding: 0 15px;
82
87
  `
83
88
 
84
- const IconContainerAttrs = {
85
- width: String
86
- }
87
- const IconContainer = styled('div', IconContainerAttrs)`
89
+ const IconContainerAttrs = {
90
+ width: String
91
+ }
92
+ const IconContainer = styled('div', IconContainerAttrs)`
88
93
  display: grid;
89
94
  align-items: center;
90
95
  justify-items: center;
@@ -92,51 +97,51 @@ const IconContainer = styled('div', IconContainerAttrs)`
92
97
  background: ${(props) => props.theme.colors.white + '1a'};
93
98
  `
94
99
 
95
- export default {
96
- name: "button-icon",
97
- components: {
98
- PageContainer,
99
- ButtonContainer,
100
- ButtonWrapper,
101
- IconContainer,
102
- Icon
103
- },
104
- props: {
105
- isDisabled: {
106
- required: false,
107
- default: false
108
- },
109
- text: {
110
- required: true
111
- },
112
- minWidth: {
113
- required: false,
114
- default: null
100
+ export default {
101
+ name: "ButtonIcon",
102
+ components: {
103
+ PageContainer,
104
+ ButtonContainer,
105
+ ButtonWrapper,
106
+ IconContainer,
107
+ Icon
115
108
  },
116
- customColor: {
117
- required: false,
118
- default: null
109
+ props: {
110
+ isDisabled: {
111
+ required: false,
112
+ default: false
113
+ },
114
+ text: {
115
+ required: true
116
+ },
117
+ minWidth: {
118
+ required: false,
119
+ default: null
120
+ },
121
+ customColor: {
122
+ required: false,
123
+ default: null
124
+ },
125
+ iconName: {
126
+ required: true
127
+ },
128
+ fontColor: {
129
+ required: false,
130
+ default: null
131
+ },
132
+ fontSize: {
133
+ required: false,
134
+ default: '13px'
135
+ },
136
+ height: {
137
+ required: false,
138
+ default: '30px'
139
+ }
119
140
  },
120
- iconName: {
121
- required: true
122
- },
123
- fontColor: {
124
- required: false,
125
- default: null
126
- },
127
- fontSize: {
128
- required: false,
129
- default: '13px'
130
- },
131
- height: {
132
- required: false,
133
- default: '30px'
134
- }
135
- },
136
- data () {
137
- return {
138
- theme: Theme
141
+ data() {
142
+ return {
143
+ theme: Theme
144
+ }
139
145
  }
140
146
  }
141
- }
142
147
  </script>
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <wrapper>
3
- <container>
4
- <left-line :color="color" />
5
- <right-line :color="color" />
6
- </container>
7
- </wrapper>
2
+ <Wrapper>
3
+ <Container>
4
+ <LeftLine :color="color" />
5
+ <RightLine :color="color" />
6
+ </Container>
7
+ </Wrapper>
8
8
  </template>
9
9
 
10
10
  <script>
@@ -13,49 +13,49 @@
13
13
  // <close-button
14
14
  // color="#fff"
15
15
  // />
16
- import styled from 'vue3-styled-components'
16
+ import styled from 'vue3-styled-components'
17
17
 
18
- const Container = styled.div`
18
+ const Container = styled.div`
19
19
  position: relative;
20
20
  width: 26px;
21
21
  height: 25px;
22
22
  `
23
23
 
24
- const Wrapper = styled.div`
24
+ const Wrapper = styled.div`
25
25
  display: inline-block;
26
26
  cursor: pointer;
27
27
  `
28
28
 
29
- const lineAttrs = { color: String }
30
- const Line = styled('div', lineAttrs)`
29
+ const lineAttrs = { color: String }
30
+ const Line = styled('div', lineAttrs)`
31
31
  width: 20px;
32
32
  height: 2px;
33
33
  background-color: ${(props) =>
34
- props.color ? props.color : props.theme.colors.red};
34
+ props.color ? props.color : props.theme.colors.red};
35
35
  position: absolute;
36
36
  top: 11px; //half of the height of the parent
37
37
  `
38
38
 
39
- const LeftLine = styled(Line)`
39
+ const LeftLine = styled(Line)`
40
40
  transform: rotate(135deg);
41
41
  `
42
42
 
43
- const RightLine = styled(Line)`
43
+ const RightLine = styled(Line)`
44
44
  transform: rotate(45deg);
45
45
  `
46
46
 
47
- export default {
48
- name: 'close-button',
49
- components: {
50
- Container,
51
- Wrapper,
52
- LeftLine,
53
- RightLine
54
- },
55
- props: {
56
- color: {
57
- required: false
47
+ export default {
48
+ name: 'CloseButton',
49
+ components: {
50
+ Container,
51
+ Wrapper,
52
+ LeftLine,
53
+ RightLine
54
+ },
55
+ props: {
56
+ color: {
57
+ required: false
58
+ }
58
59
  }
59
60
  }
60
- }
61
61
  </script>