@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,18 +1,10 @@
1
1
  <template>
2
- <TitleWrap :has-info-text="!!infoText">
3
- <TitleText
4
- :color="color"
5
- :font-size="fontSize"
6
- :uppercase="uppercase"
7
- >
2
+ <title-wrap :hasInfoText="!!infoText">
3
+ <title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
8
4
  {{ text }}
9
- </TitleText>
10
- <InfoText
11
- v-if="!!infoText"
12
- :align-arrow="infoAlign"
13
- :text="infoText"
14
- />
15
- </TitleWrap>
5
+ </title-text>
6
+ <info-text v-if="!!infoText" :text="infoText" :alignArrow="infoAlign" />
7
+ </title-wrap>
16
8
  </template>
17
9
 
18
10
  <script>
@@ -22,55 +14,55 @@
22
14
  // text="My Page Title"
23
15
  // color="red"
24
16
  // />
25
- import styled from 'vue3-styled-components'
26
- import InfoText from '../infoText'
17
+ import styled from 'vue3-styled-components'
18
+ import InfoText from '../infoText'
27
19
 
28
- const wrapAttrs = { hasInfoText: Boolean }
29
- const TitleWrap = styled('div', wrapAttrs)`
20
+ const wrapAttrs = { hasInfoText: Boolean }
21
+ const TitleWrap = styled('div', wrapAttrs)`
30
22
  display: grid;
31
23
  align-items: center;
32
24
  grid-gap: 12px;
33
25
  grid-template-columns: ${(props) =>
34
- props.hasInfoText ? 'auto auto 1fr' : '1fr'};
26
+ props.hasInfoText ? 'auto auto 1fr' : '1fr'};
35
27
  margin-bottom: 20px;
36
28
  `
37
29
 
38
- const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
39
- const TitleText = styled('span', titleAttrs)`
30
+ const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
31
+ const TitleText = styled('span', titleAttrs)`
40
32
  color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
41
33
  font-weight: bold;
42
34
  font-size: ${(props) => (props.fontSize ? props.fontSize : '18px')};
43
35
  text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
44
36
  `
45
37
 
46
- export default {
47
- name: 'PageTitle',
48
- components: {
49
- TitleText,
50
- TitleWrap,
51
- InfoText
38
+ export default {
39
+ name: 'page-title',
40
+ components: {
41
+ TitleText,
42
+ TitleWrap,
43
+ InfoText
44
+ },
45
+ props: {
46
+ text: {
47
+ required: true
52
48
  },
53
- props: {
54
- text: {
55
- required: true
56
- },
57
- color: {
58
- required: false
59
- },
60
- fontSize: {
61
- required: false
62
- },
63
- uppercase: {
64
- required: false,
65
- default: true
66
- },
67
- infoText: {
68
- required: false,
69
- default: null
70
- },
71
- infoAlign: {
72
- required: false
73
- }
49
+ color: {
50
+ required: false
51
+ },
52
+ fontSize: {
53
+ required: false
54
+ },
55
+ uppercase: {
56
+ required: false,
57
+ default: true
58
+ },
59
+ infoText: {
60
+ required: false,
61
+ default: null
62
+ },
63
+ infoAlign: {
64
+ required: false
74
65
  }
75
66
  }
67
+ }
76
68
  </script>
@@ -1,82 +1,80 @@
1
1
  <template>
2
2
  <!-- Check, if pages more than 1 -->
3
- <PaginationWrapper v-if="paginationParams.pages > 1">
3
+ <paginationWrapper v-if="paginationParams.pages > 1">
4
4
  <!-- Back button -->
5
- <PaginationLink
5
+ <paginationLink
6
6
  v-if="paginationParams.previous"
7
7
  @click="fetchPage(paginationParams.previous)"
8
8
  >
9
- <ArrowIconContainer>
10
- <RCIcon
11
- :color="getTheme.colors.brightBlue"
9
+ <arrowIconContainer>
10
+ <icon
12
11
  name="arrow_left"
12
+ :color="getTheme.colors.brightBlue"
13
13
  size="12px"
14
14
  />
15
- </ArrowIconContainer>
16
- <ArrowText>{{ $gettext('back') }}</ArrowText>
17
- </PaginationLink>
15
+ </arrowIconContainer>
16
+ <arrowText>{{ $gettext('back') }}</arrowText>
17
+ </paginationLink>
18
18
 
19
19
  <!-- First page -->
20
- <PaginationLink
20
+ <paginationLink
21
21
  v-if="currentPage > 2 && paginationParams.pages > 3"
22
22
  @click="fetchPage(1)"
23
+ >1</paginationLink
23
24
  >
24
- 1
25
- </PaginationLink>
26
25
 
27
26
  <!-- Back tree dots -->
28
27
  <span v-if="currentPage > 3 && paginationParams.pages > 4">...</span>
29
28
 
30
29
  <!-- Current block -->
31
- <PaginationLink
30
+ <paginationLink
32
31
  v-for="number in paginationNumbers()"
33
32
  :key="number"
34
33
  :class="[currentPage === number ? 'active' : '']"
35
34
  @click="fetchPage(number)"
35
+ >{{ number }}</paginationLink
36
36
  >
37
- {{ number }}
38
- </PaginationLink>
39
37
 
40
38
  <!-- Forward tree dots -->
41
39
  <span
42
40
  v-if="
43
41
  paginationParams.pages - currentPage > 2 && paginationParams.pages > 4
44
42
  "
45
- >...</span>
43
+ >...</span
44
+ >
46
45
 
47
46
  <!-- End page -->
48
- <PaginationLink
47
+ <paginationLink
49
48
  v-if="
50
49
  paginationParams.pages - currentPage > 1 && paginationParams.pages > 3
51
50
  "
52
51
  @click="fetchPage(paginationParams.pages)"
52
+ >{{ paginationParams.pages }}</paginationLink
53
53
  >
54
- {{ paginationParams.pages }}
55
- </PaginationLink>
56
54
 
57
55
  <!-- Forward button -->
58
- <PaginationLink
56
+ <paginationLink
59
57
  v-if="paginationParams.next"
60
58
  @click="fetchPage(paginationParams.next)"
61
59
  >
62
- <ArrowText>{{ $gettext('forward') }}</ArrowText>
63
- <ArrowIconContainer>
64
- <RCIcon
65
- :color="getTheme.colors.brightBlue"
60
+ <arrowText>{{ $gettext('forward') }}</arrowText>
61
+ <arrowIconContainer>
62
+ <icon
66
63
  name="arrow_right"
64
+ :color="getTheme.colors.brightBlue"
67
65
  size="12px"
68
66
  />
69
- </ArrowIconContainer>
70
- </PaginationLink>
71
- </PaginationWrapper>
67
+ </arrowIconContainer>
68
+ </paginationLink>
69
+ </paginationWrapper>
72
70
  </template>
73
71
 
74
72
  <script>
75
- import styled from 'vue3-styled-components'
76
- import RCIcon from '../icon'
77
- import theme from '@/assets/theme.js'
73
+ import styled from 'vue3-styled-components'
74
+ import icon from '../icon'
75
+ import theme from '@/assets/theme.js'
78
76
 
79
- const paginationWrapper = styled.nav`
77
+ const paginationWrapper = styled.nav`
80
78
  color: ${(props) => props.theme.colors.brightBlue};
81
79
  font-size: 13px;
82
80
  display: flex;
@@ -84,7 +82,7 @@
84
82
  justify-content: flex-end;
85
83
  align-items: center;
86
84
  `
87
- const paginationLink = styled.div`
85
+ const paginationLink = styled.div`
88
86
  display: flex;
89
87
  padding: 0px 5px;
90
88
  margin: 0 2px;
@@ -101,47 +99,47 @@
101
99
  border-radius: 4px;
102
100
  }
103
101
  `
104
- const arrowText = styled.div`
102
+ const arrowText = styled.div`
105
103
  color: ${(props) => props.theme.colors.brightBlue};
106
104
  `
107
- const arrowIconContainer = styled.div`
105
+ const arrowIconContainer = styled.div`
108
106
  margin: 0 10px;
109
107
  display: flex;
110
108
  align-items: center;
111
109
  `
112
- export default {
113
- name: 'PaginationComponent',
114
- components: {
115
- paginationWrapper,
116
- paginationLink,
117
- RCIcon,
118
- arrowText,
119
- arrowIconContainer
120
- },
121
- props: ['fetchPage', 'currentPage', 'paginationParams'],
122
- computed: {
123
- getTheme() {
124
- return theme
125
- }
110
+ export default {
111
+ name: 'pagination-component',
112
+ components: {
113
+ paginationWrapper,
114
+ paginationLink,
115
+ icon,
116
+ arrowText,
117
+ arrowIconContainer
118
+ },
119
+ props: ['fetchPage', 'currentPage', 'paginationParams'],
120
+ computed: {
121
+ getTheme() {
122
+ return theme
123
+ }
124
+ },
125
+ methods: {
126
+ getNewProjects(num) {
127
+ this.$emit('on-pagination-change', num)
126
128
  },
127
- methods: {
128
- getNewProjects(num) {
129
- this.$emit('on-pagination-change', num)
130
- },
131
- paginationNumbers() {
132
- const prev = this.paginationParams.previous
133
- const next = this.paginationParams.next
134
- const n = prev + 1 || next - 1
135
- if (this.paginationParams.pages === 2) {
136
- return prev ? [n - 1, n] : [n, n + 1]
137
- } else {
138
- return prev
139
- ? next
140
- ? [n - 1, n, n + 1]
141
- : [n - 2, n - 1, n]
142
- : [n, n + 1, n + 2]
143
- }
129
+ paginationNumbers() {
130
+ const prev = this.paginationParams.previous
131
+ const next = this.paginationParams.next
132
+ const n = prev + 1 || next - 1
133
+ if (this.paginationParams.pages === 2) {
134
+ return prev ? [n - 1, n] : [n, n + 1]
135
+ } else {
136
+ return prev
137
+ ? next
138
+ ? [n - 1, n, n + 1]
139
+ : [n - 2, n - 1, n]
140
+ : [n, n + 1, n + 2]
144
141
  }
145
142
  }
146
143
  }
144
+ }
147
145
  </script>
@@ -1,25 +1,22 @@
1
1
  <template>
2
- <Container>
3
- <ProgressContainer
4
- :background-color="backgroundColor"
2
+ <container>
3
+ <progress-container
4
+ :backgroundColor="backgroundColor"
5
+ :maxWidth="maxWidth"
6
+ :minWidth="minWidth"
5
7
  class="progress-container"
6
- :max-width="maxWidth"
7
- :min-width="minWidth"
8
8
  >
9
- <ProgressFill
9
+ <progress-fill
10
10
  class="progress-bar"
11
- :fill-color="fillColor"
12
- :fill-progress="fillProgress"
11
+ :fillProgress="fillProgress"
12
+ :fillColor="fillColor"
13
13
  />
14
- </ProgressContainer>
15
- <LabelText
16
- v-if="stepNumber || labelText"
17
- class="progress-text"
14
+ </progress-container>
15
+ <label-text class="progress-text" v-if="stepNumber || labelText"
16
+ >{{ labelText ? labelText : "" }}
17
+ {{ stepNumber ? stepNumber : "" }}</label-text
18
18
  >
19
- {{ labelText ? labelText : "" }}
20
- {{ stepNumber ? stepNumber : "" }}
21
- </LabelText>
22
- </Container>
19
+ </container>
23
20
  </template>
24
21
 
25
22
  <script>
@@ -34,9 +31,9 @@
34
31
  // stepNumber="4"
35
32
  // :labelText="translate('step')"
36
33
  // />
37
- import styled from "vue3-styled-components"
34
+ import styled from "vue3-styled-components"
38
35
 
39
- const Container = styled.div`
36
+ const Container = styled.div`
40
37
  display: grid;
41
38
  grid-template-columns: 1fr;
42
39
  grid-row-gap: 16px;
@@ -46,12 +43,12 @@
46
43
  }
47
44
  `
48
45
 
49
- const containerProps = {
50
- backgroundColor: String,
51
- maxWidth: String,
52
- minWidth: String,
53
- }
54
- const ProgressContainer = styled("div", containerProps)`
46
+ const containerProps = {
47
+ backgroundColor: String,
48
+ maxWidth: String,
49
+ minWidth: String,
50
+ }
51
+ const ProgressContainer = styled("div", containerProps)`
55
52
  width: 100%;
56
53
  min-width: ${(props) => (props.minWidth ? props.minWidth : "auto")};
57
54
  max-width: ${(props) => (props.maxWidth ? props.maxWidth : "none")};
@@ -59,21 +56,21 @@
59
56
  background-color: ${(props) =>
60
57
  props.backgroundColor
61
58
  ? props.backgroundColor
62
- : props.theme.colors.lightGray};
59
+ : props.theme.colors.lightGray};
63
60
  @media (max-width: ${(props) => props.theme.screen.mobile}) {
64
61
  height: 4px;
65
62
  }
66
63
  `
67
64
 
68
- const fillProps = { fillColor: String, fillProgress: String | Number }
69
- const ProgressFill = styled("div", fillProps)`
65
+ const fillProps = { fillColor: String, fillProgress: String | Number }
66
+ const ProgressFill = styled("div", fillProps)`
70
67
  height: 100%;
71
68
  width: ${(props) => props.fillProgress + "%"};
72
69
  background-color: ${(props) =>
73
- props.fillColor ? props.fillColor : props.theme.colors.secondary};
70
+ props.fillColor ? props.fillColor : props.theme.colors.secondary};
74
71
  `
75
72
 
76
- const LabelText = styled.div`
73
+ const labelText = styled.div`
77
74
  color: ${(props) => props.theme.colors.darkGray};
78
75
  font-size: 16px;
79
76
 
@@ -82,47 +79,47 @@
82
79
  }
83
80
  `
84
81
 
85
- export default {
86
- name: "ProgressBar",
87
- components: {
88
- Container,
89
- ProgressContainer,
90
- ProgressFill,
91
- LabelText,
82
+ export default {
83
+ name: "progress-bar",
84
+ components: {
85
+ Container,
86
+ ProgressContainer,
87
+ ProgressFill,
88
+ labelText,
89
+ },
90
+ props: {
91
+ fillColor: {
92
+ required: false,
93
+ type: String,
94
+ default: null,
92
95
  },
93
- props: {
94
- fillColor: {
95
- required: false,
96
- type: String,
97
- default: null,
98
- },
99
- backgroundColor: {
100
- required: false,
101
- type: String,
102
- default: null,
103
- },
104
- minWidth: {
105
- required: false,
106
- type: String,
107
- default: null,
108
- },
109
- maxWidth: {
110
- required: false,
111
- type: String,
112
- default: null,
113
- },
114
- fillProgress: {
115
- required: false,
116
- default: 0,
117
- },
118
- labelText: {
119
- required: false,
120
- default: null,
121
- },
122
- stepNumber: {
123
- required: false,
124
- default: null,
125
- },
96
+ backgroundColor: {
97
+ required: false,
98
+ type: String,
99
+ default: null,
126
100
  },
127
- }
101
+ minWidth: {
102
+ required: false,
103
+ type: String,
104
+ default: null,
105
+ },
106
+ maxWidth: {
107
+ required: false,
108
+ type: String,
109
+ default: null,
110
+ },
111
+ fillProgress: {
112
+ required: false,
113
+ default: 0,
114
+ },
115
+ labelText: {
116
+ required: false,
117
+ default: null,
118
+ },
119
+ stepNumber: {
120
+ required: false,
121
+ default: null,
122
+ },
123
+ },
124
+ }
128
125
  </script>