@eturnity/eturnity_reusable_components 7.48.1-EPDM-12680.11 → 7.48.1-dev-14.0

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 (31) hide show
  1. package/package.json +3 -2
  2. package/src/assets/theme.js +1 -0
  3. package/src/components/buttons/buttonIcon/index.vue +1 -3
  4. package/src/components/buttons/mainButton/index.vue +0 -10
  5. package/src/components/icon/index.vue +0 -1
  6. package/src/components/infoCard/InfoCard.stories.js +170 -0
  7. package/src/components/infoCard/defaultProps.js +7 -0
  8. package/src/components/infoCard/index.vue +107 -22
  9. package/src/components/infoCard/infoCard.spec.js +64 -0
  10. package/src/components/infoText/index.vue +125 -289
  11. package/src/components/inputs/inputNumber/index.vue +11 -185
  12. package/src/components/inputs/inputText/index.vue +2 -23
  13. package/src/components/inputs/radioButton/defaultProps.js +0 -2
  14. package/src/components/inputs/radioButton/index.vue +6 -27
  15. package/src/components/inputs/radioButton/radioButton.spec.js +62 -99
  16. package/src/components/inputs/select/index.vue +29 -69
  17. package/src/components/inputs/select/option/index.vue +2 -11
  18. package/src/components/markerItem/index.vue +1 -8
  19. package/src/components/modals/modal/index.vue +9 -3
  20. package/src/components/sideMenu/index.vue +12 -3
  21. package/src/components/spinner/index.vue +0 -11
  22. package/src/components/tables/mainTable/index.vue +12 -4
  23. package/src/assets/svgIcons/collapse_all.svg +0 -4
  24. package/src/assets/svgIcons/hybrid.svg +0 -4
  25. package/src/assets/svgIcons/module.svg +0 -3
  26. package/src/assets/svgIcons/move_down.svg +0 -3
  27. package/src/assets/svgIcons/move_up.svg +0 -3
  28. package/src/assets/svgIcons/optimizer.svg +0 -6
  29. package/src/assets/svgIcons/string_design.svg +0 -5
  30. package/src/components/infoText/placeholder.vue +0 -225
  31. package/src/components/stringDesign/DropdownMenu/index.vue +0 -715
@@ -1,3 +0,0 @@
1
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M0.875 7.63636H4.55V0H9.45V7.63636H13.125L7 14L0.875 7.63636Z" fill="white"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M0.875 6.36364H4.55V14H9.45V6.36364H13.125L7 0L0.875 6.36364Z" fill="#B2B9C5"/>
3
- </svg>
@@ -1,6 +0,0 @@
1
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="3.11079" y="3.10981" width="7.77778" height="7.77778" stroke="white" stroke-width="1.55556"/>
3
- <line x1="3.72749" y1="10.3387" x2="10.7275" y2="3.3387" stroke="white" stroke-width="1.55556"/>
4
- <line x1="-0.000366211" y1="7.05425" x2="2.99963" y2="7.05425" stroke="white" stroke-width="1.55556"/>
5
- <line x1="10.9994" y1="6.99957" x2="13.9994" y2="6.99957" stroke="white" stroke-width="1.55556"/>
6
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="10" height="11" viewBox="0 0 10 11" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M2.85714 1.92857C2.85714 2.71755 2.21755 3.35714 1.42857 3.35714C0.639593 3.35714 0 2.71755 0 1.92857C0 1.13959 0.639593 0.5 1.42857 0.5C2.21755 0.5 2.85714 1.13959 2.85714 1.92857Z" fill="white"/>
3
- <path d="M10 9.07143C10 9.86041 9.36041 10.5 8.57143 10.5C7.78245 10.5 7.14286 9.86041 7.14286 9.07143C7.14286 8.28245 7.78245 7.64286 8.57143 7.64286C9.36041 7.64286 10 8.28245 10 9.07143Z" fill="white"/>
4
- <path d="M5.71429 3C5.71429 2.40827 6.19398 1.92857 6.78571 1.92857C7.37745 1.92857 7.85714 2.40827 7.85714 3V6.21429H9.28571V3C9.28571 1.61929 8.16643 0.5 6.78571 0.5C5.405 0.5 4.28571 1.61929 4.28571 3V8C4.28571 8.59173 3.80602 9.07143 3.21429 9.07143C2.62255 9.07143 2.14286 8.59173 2.14286 8V4.78571H0.714286V8C0.714286 9.38071 1.83357 10.5 3.21429 10.5C4.595 10.5 5.71429 9.38071 5.71429 8V3Z" fill="white"/>
5
- </svg>
@@ -1,225 +0,0 @@
1
- <template>
2
- <ComponentWrapper>
3
- <IconWrapper :size="size">
4
- <IconImg
5
- ref="iconImg"
6
- @click.prevent="toggleShowInfo()"
7
- @mouseenter="openTrigger == 'onHover' ? toggleShowInfo() : ''"
8
- @mouseleave="openTrigger == 'onHover' ? toggleShowInfo() : ''"
9
- >
10
- <IconComponent
11
- :color="iconColor"
12
- cursor="pointer"
13
- name="info"
14
- :size="size"
15
- />
16
- </IconImg>
17
- <TextOverlay
18
- v-if="showInfo"
19
- :arrow-position="arrowPosition"
20
- :icon-size="size"
21
- :max-width="maxWidth"
22
- :position="overlayPosition"
23
- :style="overlayStyle"
24
- :width="width"
25
- ><slot></slot>
26
- <span v-html="text"></span>
27
- </TextOverlay>
28
- </IconWrapper>
29
- </ComponentWrapper>
30
- </template>
31
-
32
- <script>
33
- // import InfoText from "@eturnity/eturnity_reusable_components/src/components/infoText"
34
- //To use:
35
- // <info-text
36
- // text="Veritatis et quasi architecto beatae vitae"
37
- // size="20px"
38
- // />
39
- import theme from '../../assets/theme.js'
40
- import styled from 'vue3-styled-components'
41
- import IconComponent from '../icon'
42
-
43
- const textAttrs = {
44
- iconSize: String,
45
- width: String,
46
- position: String,
47
- arrowPosition: String,
48
- }
49
- const TextOverlay = styled('div', textAttrs)`
50
- position: absolute;
51
- text-align: left;
52
- background: ${(props) => props.theme.colors.black};
53
- padding: 10px;
54
- width: ${(props) => props.width};
55
- max-width: ${(props) => props.maxWidth};
56
- font-size: 13px;
57
- font-weight: 400;
58
- line-height: normal;
59
- border-radius: 4px;
60
- z-index: 9999;
61
- color: ${(props) => props.theme.colors.white};
62
- word-wrap: break-word;
63
- overflow-wrap: break-word;
64
-
65
- :before {
66
- content: '';
67
- background-color: ${(props) => props.theme.colors.black};
68
- position: absolute;
69
- ${(props) => (props.position === 'top' ? 'bottom: -4px;' : 'top: -4px;')}
70
- ${(props) => {
71
- switch (props.arrowPosition) {
72
- case 'left':
73
- return 'left: 40px;'
74
- case 'center':
75
- return 'left: calc(50% - 4px);'
76
- case 'right':
77
- return 'right: 40px;'
78
- default:
79
- return 'left: calc(50% - 4px);'
80
- }
81
- }}
82
- height: 8px;
83
- width: 8px;
84
- transform-origin: center center;
85
- transform: rotate(45deg);
86
- }
87
-
88
- span a {
89
- color: #2cc0eb;
90
- }
91
- `
92
-
93
- const iconAttrs = { size: String }
94
- const IconWrapper = styled('div', iconAttrs)`
95
- position: relative;
96
- height: ${(props) => props.size};
97
- `
98
-
99
- const IconImg = styled.div`
100
- line-height: 0;
101
- `
102
-
103
- const ComponentWrapper = styled.div`
104
- display: inline-block;
105
- `
106
-
107
- export default {
108
- name: 'InfoText',
109
- components: {
110
- IconWrapper,
111
- TextOverlay,
112
- ComponentWrapper,
113
- IconImg,
114
- IconComponent,
115
- },
116
- props: {
117
- text: {
118
- required: false,
119
- },
120
- size: {
121
- required: false,
122
- default: '14px',
123
- },
124
- openTrigger: {
125
- required: false,
126
- default: 'onHover', // onHover, onClick
127
- },
128
- width: {
129
- required: false,
130
- default: '200px',
131
- },
132
- maxWidth: {
133
- type: String,
134
- default: '400px',
135
- },
136
- },
137
- data() {
138
- return {
139
- showInfo: false,
140
- overlayStyle: {},
141
- overlayPosition: 'top',
142
- arrowPosition: 'center',
143
- }
144
- },
145
- computed: {
146
- iconColor() {
147
- return theme.colors.mediumGray
148
- },
149
- },
150
- mounted() {
151
- window.addEventListener('resize', this.positionOverlay)
152
- },
153
- beforeUnmount() {
154
- window.removeEventListener('resize', this.positionOverlay)
155
- },
156
- methods: {
157
- toggleShowInfo() {
158
- this.showInfo = !this.showInfo
159
-
160
- if (this.showInfo) {
161
- document.addEventListener('click', this.clickOutside)
162
- this.$nextTick(() => {
163
- this.positionOverlay()
164
- })
165
- } else {
166
- document.removeEventListener('click', this.clickOutside)
167
- }
168
- },
169
- clickOutside(event) {
170
- if (this.$el.contains(event.target)) {
171
- return
172
- }
173
- this.toggleShowInfo()
174
- },
175
- positionOverlay() {
176
- const iconRect = this.$refs.iconImg.getBoundingClientRect()
177
- const overlayRect = this.$el
178
- .querySelector('.TextOverlay')
179
- .getBoundingClientRect()
180
-
181
- let top, left
182
-
183
- // Check if there's enough space above the icon
184
- if (
185
- iconRect.top > overlayRect.height + 10 &&
186
- iconRect.top > window.innerHeight / 2
187
- ) {
188
- top = -overlayRect.height - 10
189
- this.overlayPosition = 'top'
190
- } else {
191
- // If not, position it below the icon
192
- top = iconRect.height + 10
193
- this.overlayPosition = 'bottom'
194
- }
195
-
196
- left = -(overlayRect.width / 2) + iconRect.width / 2
197
-
198
- // Ensure the overlay doesn't go off-screen horizontally
199
- if (iconRect.left + left < 0) {
200
- left = -iconRect.left
201
- this.arrowPosition = 'left'
202
- } else if (
203
- iconRect.left + left + overlayRect.width >
204
- window.innerWidth
205
- ) {
206
- left = window.innerWidth - (iconRect.left + overlayRect.width)
207
- this.arrowPosition = 'right'
208
- } else {
209
- this.arrowPosition = 'center'
210
- }
211
-
212
- // Adjust vertical position if it goes off-screen
213
- const totalHeight = iconRect.top + top + overlayRect.height
214
- if (totalHeight > window.innerHeight) {
215
- top -= totalHeight - window.innerHeight + 10
216
- }
217
-
218
- this.overlayStyle = {
219
- top: `${top}px`,
220
- left: `${left}px`,
221
- }
222
- },
223
- },
224
- }
225
- </script>