@eturnity/eturnity_reusable_components 7.24.3-EPDM-10647.1 → 7.24.3-EPDM-11320.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 +119 -119
  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 +439 -433
  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 +121 -121
  30. package/src/components/iconWrapper/index.vue +156 -156
  31. package/src/components/infoCard/index.vue +26 -26
  32. package/src/components/infoText/index.vue +133 -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 +647 -723
  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 +221 -219
  42. package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
  43. package/src/components/inputs/searchInput/index.vue +126 -126
  44. package/src/components/inputs/select/index.vue +780 -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 +366 -362
  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,161 @@
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
+ <RCIcon :color="iconColor" cursor="pointer" name="info" :size="size" />
10
+ </IconImg>
11
+ <TextOverlay
12
12
  v-if="showInfo"
13
+ :align-arrow="alignArrow"
14
+ :half-computed-text-info-width="halfComputedTextInfoWidth"
15
+ :icon-size="size"
13
16
  :width="width"
14
- :halfComputedTextInfoWidth="halfComputedTextInfoWidth"
15
- :alignArrow="alignArrow"
16
- :iconSize="size"
17
- :maxWidth="maxWidth"
18
- ><slot />
17
+ >
18
+ <slot></slot>
19
19
  <span v-html="text"></span>
20
- </text-overlay>
21
- </icon-wrapper>
22
- </component-wrapper>
20
+ </TextOverlay>
21
+ </IconWrapper>
22
+ </ComponentWrapper>
23
23
  </template>
24
24
 
25
25
  <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'
36
-
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};
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 RCIcon from '../icon'
63
36
 
64
- :before {
65
- content: '';
66
- background-color: ${(props) => props.theme.colors.black};
37
+ const textAttrs = {
38
+ iconSize: String,
39
+ alignArrow: String,
40
+ width: String,
41
+ halfComputedTextInfoWidth: Number,
42
+ }
43
+ const TextOverlay = styled('div', textAttrs)`
67
44
  position: absolute;
68
- top: 2px;
45
+ top: ${(props) => 'calc(' + props.iconSize + ' + 15px)'};
69
46
  ${(props) =>
70
47
  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
- }
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: 400px;
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};
80
63
 
81
- span a {
82
- color: #2cc0eb;
83
- }
84
- `
64
+ :before {
65
+ content: '';
66
+ background-color: ${(props) => props.theme.colors.black};
67
+ position: absolute;
68
+ top: 2px;
69
+ ${(props) =>
70
+ 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
+ }
80
+
81
+ span a {
82
+ color: #2cc0eb;
83
+ }
84
+ `
85
85
 
86
- const iconAttrs = { size: String }
87
- const IconWrapper = styled('div', iconAttrs)`
88
- position: relative;
89
- height: ${(props) => props.size};
90
- `
86
+ const iconAttrs = { size: String }
87
+ const IconWrapper = styled('div', iconAttrs)`
88
+ position: relative;
89
+ height: ${(props) => props.size};
90
+ `
91
91
 
92
- const IconImg = styled.div`
93
- line-height: 0;
94
- `
92
+ const IconImg = styled.div`
93
+ line-height: 0;
94
+ `
95
95
 
96
- const ComponentWrapper = styled.div`
97
- display: inline-block;
98
- `
96
+ const ComponentWrapper = styled.div`
97
+ display: inline-block;
98
+ `
99
99
 
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'
100
+ export default {
101
+ name: 'InfoText',
102
+ components: {
103
+ IconWrapper,
104
+ TextOverlay,
105
+ ComponentWrapper,
106
+ IconImg,
107
+ RCIcon,
116
108
  },
117
- alignArrow: {
118
- required: false,
119
- default: 'center'
109
+ props: {
110
+ text: {
111
+ required: false,
112
+ },
113
+ size: {
114
+ required: false,
115
+ default: '14px',
116
+ },
117
+ alignArrow: {
118
+ required: false,
119
+ default: 'center',
120
+ },
121
+ openTrigger: {
122
+ required: false,
123
+ default: 'onHover', // onHover, onClick
124
+ },
125
+ width: {
126
+ required: false,
127
+ default: '165px',
128
+ },
120
129
  },
121
- openTrigger: {
122
- required: false,
123
- default: 'onHover' // onHover, onClick
130
+ data() {
131
+ return {
132
+ showInfo: false,
133
+ }
124
134
  },
125
- width: {
126
- required: false,
127
- default: '165px'
135
+ computed: {
136
+ iconColor() {
137
+ return theme.colors.mediumGray
138
+ },
139
+ halfComputedTextInfoWidth() {
140
+ return parseInt(this.width) / 2
141
+ },
128
142
  },
129
- maxWidth: {
130
- type: String,
131
- default: '400px'
132
- }
133
- },
134
- methods: {
135
- toggleShowInfo() {
136
- this.showInfo = !this.showInfo
143
+ methods: {
144
+ toggleShowInfo() {
145
+ this.showInfo = !this.showInfo
137
146
 
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
147
+ if (this.showInfo) {
148
+ document.addEventListener('click', this.clickOutside)
149
+ } else {
150
+ document.removeEventListener('click', this.clickOutside)
151
+ }
152
+ },
153
+ clickOutside(event) {
154
+ if (this.$el.contains(event.target)) {
155
+ return
156
+ }
157
+ this.toggleShowInfo()
158
+ },
159
159
  },
160
- halfComputedTextInfoWidth() {
161
- return parseInt(this.width) / 2
162
- }
163
160
  }
164
- }
165
161
  </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
  }