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