@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,9 +1,6 @@
1
1
  <template>
2
- <ActionModal
3
- :is-open="isOpen"
4
- @on-close="closeModal"
5
- >
6
- <ModalContainer>
2
+ <ActionModal :is-open="isOpen" @on-close="closeModal">
3
+ <modalContainer>
7
4
  <template name="title">
8
5
  <slot name="title"></slot>
9
6
  </template>
@@ -11,51 +8,62 @@
11
8
  <slot name="body"></slot>
12
9
  </template>
13
10
  <template name="buttons">
14
- <ButtonContainer>
15
- <Button
16
- min-width="150px"
17
- :text="$gettext('Got it')"
18
- type="primary"
19
- @click="closeModal"
20
- />
21
- </ButtonContainer>
11
+ <buttonContainer>
12
+ <Button type="primary" :text="$gettext('Got it')" minWidth="150px" @click="closeModal" />
13
+ </buttonContainer>
22
14
  </template>
23
- </ModalContainer>
15
+
16
+ </modalContainer>
24
17
  </ActionModal>
25
18
  </template>
26
19
  <script>
27
20
 
28
- import styled from 'vue3-styled-components'
29
- import ActionModal from '../actionModal'
21
+ import styled from 'vue3-styled-components'
22
+ import ActionModal from '../actionModal'
30
23
 
31
- const ModalContainer = styled.div`
24
+ const modalContainer = styled.div`
32
25
  width: 450px;
33
26
  min-height: 205px;
34
27
  padding: 40px 40px 30px 40px;
35
28
  `
36
- const ButtonContainer = styled.div`
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`
37
39
  display: inline-flex;
38
40
  align-items: flex-start;
39
41
  gap: 20px;
40
42
  `
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
- }
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')
59
66
  }
60
67
  }
68
+ }
61
69
  </script>
@@ -1,26 +1,21 @@
1
1
  <template>
2
- <PageContainer>
3
- <ButtonWrapper
4
- :custom-color="customColor"
2
+ <page-container>
3
+ <button-wrapper
4
+ :isDisabled="isDisabled"
5
+ :minWidth="minWidth"
6
+ :customColor="customColor"
5
7
  :height="height"
6
- :is-disabled="isDisabled"
7
- :min-width="minWidth"
8
8
  >
9
- <IconContainer :width="height">
10
- <Icon
11
- :color="fontColor ? fontColor : theme.colors.white"
12
- :name="iconName"
13
- size="14px"
9
+ <icon-container :width="height">
10
+ <icon
11
+ :name="iconName"
12
+ :color="fontColor ? fontColor : theme.colors.white"
13
+ size="14px"
14
14
  />
15
- </IconContainer>
16
- <ButtonContainer
17
- :font-color="fontColor"
18
- :font-size="fontSize"
19
- >
20
- {{ text }}
21
- </ButtonContainer>
22
- </ButtonWrapper>
23
- </PageContainer>
15
+ </icon-container>
16
+ <button-container :fontSize="fontSize" :fontColor="fontColor">{{ text }}</button-container>
17
+ </button-wrapper>
18
+ </page-container>
24
19
  </template>
25
20
 
26
21
  <script>
@@ -36,19 +31,19 @@
36
31
  // height="24px"
37
32
  // />
38
33
 
39
- import Icon from "../../icon"
40
- import styled from "vue3-styled-components"
41
- import Theme from "@/assets/theme";
34
+ import Icon from "../../icon"
35
+ import styled from "vue3-styled-components"
36
+ import Theme from "@/assets/theme";
42
37
 
43
- const PageContainer = styled.div``
38
+ const PageContainer = styled.div``
44
39
 
45
- const ButtonAttrs = {
46
- isDisabled: Boolean,
47
- minWidth: String,
48
- customColor: String,
49
- height: String
50
- }
51
- const ButtonWrapper = styled("div", ButtonAttrs)`
40
+ const ButtonAttrs = {
41
+ isDisabled: Boolean,
42
+ minWidth: String,
43
+ customColor: String,
44
+ height: String
45
+ }
46
+ const ButtonWrapper = styled("div", ButtonAttrs)`
52
47
  display: grid;
53
48
  grid-template-columns: auto 1fr;
54
49
  background-color: ${(props) =>
@@ -56,7 +51,7 @@
56
51
  ? props.theme.colors.disabled
57
52
  : props.customColor
58
53
  ? props.customColor
59
- : props.theme.colors.yellow};
54
+ : props.theme.colors.yellow};
60
55
  cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
61
56
  user-select: none;
62
57
  border-radius: 4px;
@@ -73,11 +68,11 @@
73
68
  }
74
69
  `
75
70
 
76
- const ButtonContainerAttrs = {
77
- fontSize: String,
78
- fontColor: String
79
- }
80
- const ButtonContainer = styled('div', ButtonContainerAttrs)`
71
+ const ButtonContainerAttrs = {
72
+ fontSize: String,
73
+ fontColor: String
74
+ }
75
+ const ButtonContainer = styled('div', ButtonContainerAttrs)`
81
76
  font-size: ${(props) => props.fontSize};
82
77
  color: ${(props) => props.fontColor ? props.fontColor : props.theme.colors.white};
83
78
  display: flex;
@@ -86,10 +81,10 @@
86
81
  padding: 0 15px;
87
82
  `
88
83
 
89
- const IconContainerAttrs = {
90
- width: String
91
- }
92
- const IconContainer = styled('div', IconContainerAttrs)`
84
+ const IconContainerAttrs = {
85
+ width: String
86
+ }
87
+ const IconContainer = styled('div', IconContainerAttrs)`
93
88
  display: grid;
94
89
  align-items: center;
95
90
  justify-items: center;
@@ -97,51 +92,51 @@
97
92
  background: ${(props) => props.theme.colors.white + '1a'};
98
93
  `
99
94
 
100
- export default {
101
- name: "ButtonIcon",
102
- components: {
103
- PageContainer,
104
- ButtonContainer,
105
- ButtonWrapper,
106
- IconContainer,
107
- Icon
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
108
115
  },
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
- }
116
+ customColor: {
117
+ required: false,
118
+ default: null
140
119
  },
141
- data() {
142
- return {
143
- theme: Theme
144
- }
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
145
139
  }
146
140
  }
141
+ }
147
142
  </script>
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <Wrapper>
3
- <Container>
4
- <LeftLine :color="color" />
5
- <RightLine :color="color" />
6
- </Container>
7
- </Wrapper>
2
+ <wrapper>
3
+ <container>
4
+ <left-line :color="color" />
5
+ <right-line :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: 'CloseButton',
49
- components: {
50
- Container,
51
- Wrapper,
52
- LeftLine,
53
- RightLine
54
- },
55
- props: {
56
- color: {
57
- required: false
58
- }
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
59
58
  }
60
59
  }
60
+ }
61
61
  </script>
@@ -1,25 +1,21 @@
1
1
  <template>
2
- <PageContainer>
3
- <ButtonContainer
2
+ <page-container>
3
+ <button-container
4
4
  :id="id"
5
- :custom-color="customColor"
6
- :data-id="dataId"
7
- :font-color="fontColor"
8
- :is-disabled="isDisabled"
9
- :min-width="minWidth"
10
- :no-wrap="noWrap"
11
5
  :type="type"
6
+ :minWidth="minWidth"
7
+ :isDisabled="isDisabled"
8
+ :customColor="customColor"
9
+ :noWrap="noWrap"
10
+ :data-id="dataId"
11
+ :fontColor="fontColor"
12
12
  >
13
- <Label :has-icon="Boolean(icon)">
14
- <Icon
15
- v-if="icon"
16
- :name="icon"
17
- size="14px"
18
- />
13
+ <Label :hasIcon="Boolean(icon)">
14
+ <icon v-if="icon" :name="icon" size="14px" />
19
15
  {{ text }}
20
16
  </Label>
21
- </ButtonContainer>
22
- </PageContainer>
17
+ </button-container>
18
+ </page-container>
23
19
  </template>
24
20
 
25
21
  <script>
@@ -35,24 +31,24 @@
35
31
  // :data-id="test_data_id"
36
32
  // />
37
33
 
38
- import styled from 'vue3-styled-components'
39
- import Icon from '../../icon'
34
+ import styled from 'vue3-styled-components'
35
+ import Icon from '../../icon'
40
36
 
41
- const PageContainer = styled.div``
37
+ const PageContainer = styled.div``
42
38
 
43
- const ButtonAttrs = {
44
- type: String,
45
- isDisabled: Boolean,
46
- minWidth: String,
47
- customColor: String,
48
- fontColor: String,
49
- noWrap: Boolean
50
- }
51
- const ButtonContainer = styled('div', ButtonAttrs)`
39
+ const ButtonAttrs = {
40
+ type: String,
41
+ isDisabled: Boolean,
42
+ minWidth: String,
43
+ customColor: String,
44
+ fontColor: String,
45
+ noWrap: Boolean
46
+ }
47
+ const ButtonContainer = styled('div', ButtonAttrs)`
52
48
  padding: 7px 15px;
53
49
  font-size: 13px;
54
50
  color: ${(props) =>
55
- props.fontColor ? props.fontColor : props.theme.colors.white};
51
+ props.fontColor ? props.fontColor : props.theme.colors.white};
56
52
  background-color: ${(props) =>
57
53
  props.isDisabled
58
54
  ? props.theme.colors.disabled
@@ -64,7 +60,7 @@
64
60
  ? props.theme.colors.grey3
65
61
  : props.type === 'cancel'
66
62
  ? props.theme.colors.red
67
- : props.theme.colors.black};
63
+ : props.theme.colors.black};
68
64
  border-radius: 4px;
69
65
  text-align: center;
70
66
  cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
@@ -81,64 +77,64 @@
81
77
  }
82
78
  `
83
79
 
84
- const LabelAttrs = {
85
- hasIcon: Boolean
86
- }
80
+ const LabelAttrs = {
81
+ hasIcon: Boolean
82
+ }
87
83
 
88
- const Label = styled('span', LabelAttrs)`
84
+ const Label = styled('span', LabelAttrs)`
89
85
  display: flex;
90
86
  align-items: center;
91
87
  justify-content: center;
92
88
  gap: ${(props) => (props.hasIcon ? '5px' : '0')};
93
89
  `
94
90
 
95
- export default {
96
- name: 'MainButton',
97
- components: {
98
- Icon,
99
- Label,
100
- PageContainer,
101
- ButtonContainer
91
+ export default {
92
+ name: 'main-button',
93
+ components: {
94
+ Icon,
95
+ Label,
96
+ PageContainer,
97
+ ButtonContainer
98
+ },
99
+ props: {
100
+ type: {
101
+ required: false,
102
+ default: 'primary'
103
+ },
104
+ isDisabled: {
105
+ required: false,
106
+ default: false
107
+ },
108
+ icon: {
109
+ required: false,
110
+ default: null
111
+ },
112
+ text: {
113
+ required: true
114
+ },
115
+ customColor: {
116
+ required: false,
117
+ default: null
118
+ },
119
+ fontColor: {
120
+ required: false
121
+ },
122
+ noWrap: {
123
+ required: false,
124
+ default: false
125
+ },
126
+ minWidth: {
127
+ required: false,
128
+ default: null
129
+ },
130
+ id: {
131
+ required: false,
132
+ default: null
102
133
  },
103
- props: {
104
- type: {
105
- required: false,
106
- default: 'primary'
107
- },
108
- isDisabled: {
109
- required: false,
110
- default: false
111
- },
112
- icon: {
113
- required: false,
114
- default: null
115
- },
116
- text: {
117
- required: true
118
- },
119
- customColor: {
120
- required: false,
121
- default: null
122
- },
123
- fontColor: {
124
- required: false
125
- },
126
- noWrap: {
127
- required: false,
128
- default: false
129
- },
130
- minWidth: {
131
- required: false,
132
- default: null
133
- },
134
- id: {
135
- required: false,
136
- default: null
137
- },
138
- dataId: {
139
- type: String,
140
- default: ''
141
- }
134
+ dataId: {
135
+ type: String,
136
+ default: ''
142
137
  }
143
138
  }
139
+ }
144
140
  </script>