@eturnity/eturnity_reusable_components 8.7.4-EPDM-12729.17 → 8.7.4-EPDM-12729.18
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
<svg width="
|
2
|
-
<
|
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"/>
|
1
|
+
<svg width="10" height="8" viewBox="0 0 10 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.8645 1.42847H2.42875V5.86422L6.8645 1.42847ZM3.13585 6.57132H7.5716V2.13557L3.13585 6.57132ZM1.42875 0.428467H2.42875H7.5716H8.5716V1.42847V3.35704H9.99983V4.35704H8.5716V6.57132V7.57132H7.5716H2.42875H1.42875V6.57132V4.35704H0V3.35704H1.42875V1.42847V0.428467Z" fill="#263238"/>
|
6
3
|
</svg>
|
@@ -7,21 +7,38 @@
|
|
7
7
|
@mouseleave="!isMobile && openTrigger === 'onHover' && hideInfo()"
|
8
8
|
>
|
9
9
|
<div ref="icon" data-test-id="infoText_trigger">
|
10
|
-
<IconWrapper
|
10
|
+
<IconWrapper
|
11
|
+
:background-color="backgroundColor"
|
12
|
+
:border-radius="borderRadius"
|
13
|
+
:padding="padding"
|
14
|
+
>
|
15
|
+
<LabelWrapper
|
16
|
+
v-if="labelText && labelAlign === 'left'"
|
17
|
+
:color="iconColor || computedIconColor"
|
18
|
+
:size="labelSize"
|
19
|
+
>
|
20
|
+
{{ labelText }}
|
21
|
+
</LabelWrapper>
|
11
22
|
<Dot
|
12
23
|
v-if="type === 'dot'"
|
13
24
|
:color="dotColor"
|
14
25
|
data-test-id="infoText_dot"
|
15
26
|
/>
|
16
27
|
<IconComponent
|
17
|
-
v-else
|
28
|
+
v-else-if="!noIcon"
|
18
29
|
:color="iconColor || computedIconColor"
|
19
30
|
:cursor="isDisabled ? 'not-allowed' : 'pointer'"
|
20
31
|
:disabled="isDisabled"
|
21
32
|
:name="iconName"
|
22
33
|
:size="size"
|
23
34
|
/>
|
24
|
-
<
|
35
|
+
<LabelWrapper
|
36
|
+
v-if="labelText && labelAlign === 'right'"
|
37
|
+
:color="iconColor || computedIconColor"
|
38
|
+
:size="labelSize"
|
39
|
+
>
|
40
|
+
{{ labelText }}
|
41
|
+
</LabelWrapper>
|
25
42
|
</IconWrapper>
|
26
43
|
</div>
|
27
44
|
<Teleport v-if="isVisible" to="body">
|
@@ -129,12 +146,29 @@
|
|
129
146
|
border-radius: 50%;
|
130
147
|
`
|
131
148
|
|
132
|
-
const
|
149
|
+
const IconWrapperAttrs = {
|
150
|
+
backgroundColor: String,
|
151
|
+
borderRadius: String,
|
152
|
+
padding: String,
|
153
|
+
}
|
154
|
+
const IconWrapper = styled('div', IconWrapperAttrs)`
|
133
155
|
display: flex;
|
134
156
|
align-items: center;
|
135
157
|
justify-content: center;
|
136
158
|
gap: 6px;
|
137
159
|
white-space: nowrap;
|
160
|
+
background-color: ${(props) => props.backgroundColor};
|
161
|
+
border-radius: ${(props) => props.borderRadius};
|
162
|
+
padding: ${(props) => props.padding};
|
163
|
+
`
|
164
|
+
|
165
|
+
const LabelWrapperAttrs = {
|
166
|
+
size: String,
|
167
|
+
color: String,
|
168
|
+
}
|
169
|
+
const LabelWrapper = styled('div', LabelWrapperAttrs)`
|
170
|
+
font-size: ${(props) => props.size};
|
171
|
+
color: ${(props) => props.color};
|
138
172
|
`
|
139
173
|
|
140
174
|
export default {
|
@@ -148,6 +182,7 @@
|
|
148
182
|
TextWrapper,
|
149
183
|
OverlayImage,
|
150
184
|
IconWrapper,
|
185
|
+
LabelWrapper,
|
151
186
|
},
|
152
187
|
props: {
|
153
188
|
text: {
|
@@ -216,6 +251,36 @@
|
|
216
251
|
default: 'light', // light or dark
|
217
252
|
required: false,
|
218
253
|
},
|
254
|
+
labelAlign: {
|
255
|
+
type: String,
|
256
|
+
default: 'right',
|
257
|
+
required: false,
|
258
|
+
},
|
259
|
+
backgroundColor: {
|
260
|
+
type: String,
|
261
|
+
default: '',
|
262
|
+
required: false,
|
263
|
+
},
|
264
|
+
borderRadius: {
|
265
|
+
type: String,
|
266
|
+
default: '',
|
267
|
+
required: false,
|
268
|
+
},
|
269
|
+
padding: {
|
270
|
+
type: String,
|
271
|
+
default: '',
|
272
|
+
required: false,
|
273
|
+
},
|
274
|
+
labelSize: {
|
275
|
+
type: String,
|
276
|
+
default: '12px',
|
277
|
+
required: false,
|
278
|
+
},
|
279
|
+
noIcon: {
|
280
|
+
type: Boolean,
|
281
|
+
default: false,
|
282
|
+
required: false,
|
283
|
+
},
|
219
284
|
},
|
220
285
|
setup(props) {
|
221
286
|
const isVisible = ref(false)
|