@eturnity/eturnity_reusable_components 7.30.3-EPDM-10647.0 → 7.30.3-EPDM-10576.2

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 (82) 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 +486 -452
  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 -701
  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 -792
  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
  82. package/src/utils/index.js +0 -12
@@ -1,165 +1,170 @@
1
1
  <template>
2
- <component-wrapper>
3
- <icon-wrapper :size="size">
4
- <icon-img
2
+ <ComponentWrapper>
3
+ <IconWrapper :size="size">
4
+ <IconImg
5
5
  @click.prevent="toggleShowInfo()"
6
6
  @mouseenter="openTrigger == 'onHover' ? toggleShowInfo() : ''"
7
7
  @mouseleave="openTrigger == 'onHover' ? toggleShowInfo() : ''"
8
8
  >
9
- <icon :size="size" name="info" :color="iconColor" cursor="pointer" />
10
- </icon-img>
11
- <text-overlay
9
+ <IconComponent
10
+ :color="iconColor"
11
+ cursor="pointer"
12
+ name="info"
13
+ :size="size"
14
+ />
15
+ </IconImg>
16
+ <TextOverlay
12
17
  v-if="showInfo"
18
+ :align-arrow="alignArrow"
19
+ :half-computed-text-info-width="halfComputedTextInfoWidth"
20
+ :icon-size="size"
21
+ :max-width="maxWidth"
13
22
  :width="width"
14
- :halfComputedTextInfoWidth="halfComputedTextInfoWidth"
15
- :alignArrow="alignArrow"
16
- :iconSize="size"
17
- :maxWidth="maxWidth"
18
- ><slot />
23
+ ><slot></slot>
19
24
  <span v-html="text"></span>
20
- </text-overlay>
21
- </icon-wrapper>
22
- </component-wrapper>
25
+ </TextOverlay>
26
+ </IconWrapper>
27
+ </ComponentWrapper>
23
28
  </template>
24
29
 
25
30
  <script>
26
- // import InfoText from "@eturnity/eturnity_reusable_components/src/components/infoText"
27
- //To use:
28
- // <info-text
29
- // text="Veritatis et quasi architecto beatae vitae"
30
- // size="20px"
31
- // alignArrow="right" // which side the arrow should be on
32
- // />
33
- import theme from '../../assets/theme.js'
34
- import styled from 'vue3-styled-components'
35
- import icon from '../icon'
31
+ // import InfoText from "@eturnity/eturnity_reusable_components/src/components/infoText"
32
+ //To use:
33
+ // <info-text
34
+ // text="Veritatis et quasi architecto beatae vitae"
35
+ // size="20px"
36
+ // alignArrow="right" // which side the arrow should be on
37
+ // />
38
+ import theme from '../../assets/theme.js'
39
+ import styled from 'vue3-styled-components'
40
+ import IconComponent from '../icon'
36
41
 
37
- const textAttrs = {
38
- iconSize: String,
39
- alignArrow: String,
40
- width: String,
41
- halfComputedTextInfoWidth: Number
42
- }
43
- const TextOverlay = styled('div', textAttrs)`
44
- position: absolute;
45
- top: ${(props) => 'calc(' + props.iconSize + ' + 15px)'};
46
- ${(props) =>
47
- props.alignArrow === 'left'
48
- ? 'left: calc(' + props.iconSize + ' /2 - 18px)'
49
- : props.alignArrow === 'center'
50
- ? 'left: calc((-' + props.width + ' + ' + props.iconSize + ') /2 + 2px)'
51
- : 'right: calc(' + props.iconSize + ' /2 - 17px)'};
52
- text-align: left;
53
- background: ${(props) => props.theme.colors.black};
54
- padding: 10px;
55
- width: ${(props) => props.width};
56
- max-width: ${(props) => props.maxWidth};
57
- font-size: 13px;
58
- font-weight: 400;
59
- line-height: normal;
60
- border-radius: 4px;
61
- z-index: 99;
62
- color: ${(props) => props.theme.colors.white};
63
-
64
- :before {
65
- content: '';
66
- background-color: ${(props) => props.theme.colors.black};
42
+ const textAttrs = {
43
+ iconSize: String,
44
+ alignArrow: String,
45
+ width: String,
46
+ halfComputedTextInfoWidth: Number,
47
+ }
48
+ const TextOverlay = styled('div', textAttrs)`
67
49
  position: absolute;
68
- top: 2px;
50
+ top: ${(props) => 'calc(' + props.iconSize + ' + 15px)'};
69
51
  ${(props) =>
70
52
  props.alignArrow === 'left'
71
- ? 'left:40px;'
72
- : props.alignArrow == 'center'
73
- ? 'left: calc(50% + 19px);'
74
- : 'right:-13px;'};
75
- height: 8px;
76
- width: 8px;
77
- transform-origin: center center;
78
- transform: translate(-2em, -0.5em) rotate(45deg);
79
- }
53
+ ? 'left: calc(' + props.iconSize + ' /2 - 18px)'
54
+ : props.alignArrow === 'center'
55
+ ? 'left: calc((-' + props.width + ' + ' + props.iconSize + ') /2 + 2px)'
56
+ : 'right: calc(' + props.iconSize + ' /2 - 17px)'};
57
+ text-align: left;
58
+ background: ${(props) => props.theme.colors.black};
59
+ padding: 10px;
60
+ width: ${(props) => props.width};
61
+ max-width: ${(props) => props.maxWidth};
62
+ font-size: 13px;
63
+ font-weight: 400;
64
+ line-height: normal;
65
+ border-radius: 4px;
66
+ z-index: 99;
67
+ color: ${(props) => props.theme.colors.white};
80
68
 
81
- span a {
82
- color: #2cc0eb;
83
- }
84
- `
69
+ :before {
70
+ content: '';
71
+ background-color: ${(props) => props.theme.colors.black};
72
+ position: absolute;
73
+ top: 2px;
74
+ ${(props) =>
75
+ props.alignArrow === 'left'
76
+ ? 'left:40px;'
77
+ : props.alignArrow == 'center'
78
+ ? 'left: calc(50% + 19px);'
79
+ : 'right:-13px;'};
80
+ height: 8px;
81
+ width: 8px;
82
+ transform-origin: center center;
83
+ transform: translate(-2em, -0.5em) rotate(45deg);
84
+ }
85
+
86
+ span a {
87
+ color: #2cc0eb;
88
+ }
89
+ `
85
90
 
86
- const iconAttrs = { size: String }
87
- const IconWrapper = styled('div', iconAttrs)`
88
- position: relative;
89
- height: ${(props) => props.size};
90
- `
91
+ const iconAttrs = { size: String }
92
+ const IconWrapper = styled('div', iconAttrs)`
93
+ position: relative;
94
+ height: ${(props) => props.size};
95
+ `
91
96
 
92
- const IconImg = styled.div`
93
- line-height: 0;
94
- `
97
+ const IconImg = styled.div`
98
+ line-height: 0;
99
+ `
95
100
 
96
- const ComponentWrapper = styled.div`
97
- display: inline-block;
98
- `
101
+ const ComponentWrapper = styled.div`
102
+ display: inline-block;
103
+ `
99
104
 
100
- export default {
101
- name: 'info-text',
102
- components: {
103
- IconWrapper,
104
- TextOverlay,
105
- ComponentWrapper,
106
- IconImg,
107
- icon
108
- },
109
- props: {
110
- text: {
111
- required: false
112
- },
113
- size: {
114
- required: false,
115
- default: '14px'
105
+ export default {
106
+ name: 'InfoText',
107
+ components: {
108
+ IconWrapper,
109
+ TextOverlay,
110
+ ComponentWrapper,
111
+ IconImg,
112
+ IconComponent,
116
113
  },
117
- alignArrow: {
118
- required: false,
119
- default: 'center'
114
+ props: {
115
+ text: {
116
+ required: false,
117
+ },
118
+ size: {
119
+ required: false,
120
+ default: '14px',
121
+ },
122
+ alignArrow: {
123
+ required: false,
124
+ default: 'center',
125
+ },
126
+ openTrigger: {
127
+ required: false,
128
+ default: 'onHover', // onHover, onClick
129
+ },
130
+ width: {
131
+ required: false,
132
+ default: '165px',
133
+ },
134
+ maxWidth: {
135
+ type: String,
136
+ default: '400px',
137
+ },
120
138
  },
121
- openTrigger: {
122
- required: false,
123
- default: 'onHover' // onHover, onClick
139
+ data() {
140
+ return {
141
+ showInfo: false,
142
+ }
124
143
  },
125
- width: {
126
- required: false,
127
- default: '165px'
144
+ computed: {
145
+ iconColor() {
146
+ return theme.colors.mediumGray
147
+ },
148
+ halfComputedTextInfoWidth() {
149
+ return parseInt(this.width) / 2
150
+ },
128
151
  },
129
- maxWidth: {
130
- type: String,
131
- default: '400px'
132
- }
133
- },
134
- methods: {
135
- toggleShowInfo() {
136
- this.showInfo = !this.showInfo
152
+ methods: {
153
+ toggleShowInfo() {
154
+ this.showInfo = !this.showInfo
137
155
 
138
- if (this.showInfo) {
139
- document.addEventListener('click', this.clickOutside)
140
- } else {
141
- document.removeEventListener('click', this.clickOutside)
142
- }
143
- },
144
- clickOutside(event) {
145
- if (this.$el.contains(event.target)) {
146
- return
147
- }
148
- this.toggleShowInfo()
149
- }
150
- },
151
- data() {
152
- return {
153
- showInfo: false
154
- }
155
- },
156
- computed: {
157
- iconColor() {
158
- return theme.colors.mediumGray
156
+ if (this.showInfo) {
157
+ document.addEventListener('click', this.clickOutside)
158
+ } else {
159
+ document.removeEventListener('click', this.clickOutside)
160
+ }
161
+ },
162
+ clickOutside(event) {
163
+ if (this.$el.contains(event.target)) {
164
+ return
165
+ }
166
+ this.toggleShowInfo()
167
+ },
159
168
  },
160
- halfComputedTextInfoWidth() {
161
- return parseInt(this.width) / 2
162
- }
163
169
  }
164
- }
165
170
  </script>
@@ -1,7 +1,7 @@
1
- import Checkbox from "./index.vue"
1
+ import Checkbox from './index.vue'
2
2
 
3
3
  export default {
4
- title: "Checkbox",
4
+ title: 'Checkbox',
5
5
  component: Checkbox,
6
6
  // argTypes: {},
7
7
  }
@@ -29,29 +29,29 @@ const Template = (args, { argTypes }) => ({
29
29
  export const Default = Template.bind({})
30
30
  Default.args = {
31
31
  isChecked: true,
32
- size: "medium", // "small" or "medium"
32
+ size: 'medium', // "small" or "medium"
33
33
  isDisabled: false,
34
34
  }
35
35
 
36
36
  export const Small = Template.bind({})
37
37
  Small.args = {
38
38
  isChecked: true,
39
- size: "small", // "small" or "medium"
39
+ size: 'small', // "small" or "medium"
40
40
  isDisabled: false,
41
41
  }
42
42
 
43
43
  export const CustomColor = Template.bind({})
44
44
  CustomColor.args = {
45
45
  isChecked: true,
46
- size: "medium", // "small" or "medium"
47
- checkColor: "blue",
48
- backgroundColor: "red",
46
+ size: 'medium', // "small" or "medium"
47
+ checkColor: 'blue',
48
+ backgroundColor: 'red',
49
49
  isDisabled: false,
50
50
  }
51
51
 
52
52
  export const Disabled = Template.bind({})
53
53
  Disabled.args = {
54
54
  isChecked: false,
55
- size: "medium", // "small" or "medium"
55
+ size: 'medium', // "small" or "medium"
56
56
  isDisabled: true,
57
57
  }