@eturnity/eturnity_reusable_components 8.26.11-EPDM-16030.0 → 8.26.11-qa-07.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.
package/dist/main.es23.js CHANGED
@@ -1,543 +1,232 @@
1
- import "./main.es3.js";
2
- import _sfc_main$1 from "./main.es24.js";
3
1
  import styled from "./main.es7.js";
2
+ import _sfc_main$1 from "./main.es24.js";
4
3
  import theme from "./main.es8.js";
4
+ import "./main.es3.js";
5
5
  import _export_sfc from "./main.es11.js";
6
- import { computed, onMounted, onUnmounted, watch, nextTick, resolveComponent, openBlock, createBlock, withCtx, createElementVNode as createBaseVNode, createVNode, createElementBlock, createTextVNode, createCommentVNode, Fragment, renderSlot, Teleport } from "./main.es6.js";
7
- import { toDisplayString, normalizeStyle } from "./main.es17.js";
8
- import { ref } from "./main.es19.js";
9
- const TextOverlayAttrs = {
6
+ import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createCommentVNode, createTextVNode } from "./main.es6.js";
7
+ import { toDisplayString } from "./main.es16.js";
8
+ const PageContainer = styled.div``;
9
+ const ButtonAttrs = {
10
+ type: String,
11
+ isDisabled: Boolean,
12
+ minWidth: String,
13
+ width: String,
14
+ noWrap: Boolean,
15
+ height: String,
16
+ variant: String,
17
+ buttonSize: String,
10
18
  appTheme: String,
11
- image: Boolean,
12
- width: Number
19
+ isActive: Boolean
13
20
  };
14
- const TextOverlay = styled("div", TextOverlayAttrs)`
15
- color: ${(props) => props.image ? props.theme.colors.grey1 : props.theme.colors.black};
16
- font-size: ${(props) => props.image ? "12px" : "13px"};
21
+ const ButtonContainer = styled("div", ButtonAttrs)`
22
+ display: flex;
23
+ justify-content: center;
24
+ padding: ${(props) => {
25
+ var _a, _b, _c, _d;
26
+ return (_d = (_c = (_b = (_a = props.theme) == null ? void 0 : _a.mainButton) == null ? void 0 : _b.size) == null ? void 0 : _c[props.buttonSize]) == null ? void 0 : _d.padding;
27
+ }};
28
+ font-size: ${(props) => {
29
+ var _a, _b, _c, _d;
30
+ return (_d = (_c = (_b = (_a = props.theme) == null ? void 0 : _a.mainButton) == null ? void 0 : _b.size) == null ? void 0 : _c[props.buttonSize]) == null ? void 0 : _d.fontSize;
31
+ }};
32
+ color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.textColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.textColor};
33
+ background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.isActive ? props.theme.mainButton[props.appTheme][props.type][props.variant].active.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.backgroundColor};
34
+ border: ${(props) => {
35
+ const borderValue = props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.borderColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.borderColor;
36
+ return borderValue ? "1px solid " + borderValue : "none";
37
+ }};
17
38
  border-radius: 4px;
18
- padding: 10px;
19
- word-wrap: break-word;
20
- overflow-wrap: break-word;
21
- white-space: normal;
22
- width: ${(props) => props.width ? `${props.width}px` : "100%"};
23
- box-shadow: ${(props) => props.image ? "0 2px 10px rgba(0, 0, 0, 0.1)" : "none"};
24
-
25
- a {
26
- color: ${(props) => props.theme.colors.blue};
39
+ text-align: center;
40
+ cursor: ${(props) => props.isDisabled ? "not-allowed" : "pointer"};
41
+ user-select: none;
42
+ ${(props) => props.minWidth ? `min-width: ${props.minWidth};` : ""};
43
+ ${(props) => props.noWrap ? `white-space: nowrap;` : ""};
44
+ height: ${(props) => props.height};
45
+ line-height: 1;
46
+ width: ${(props) => props.width};
47
+ &:hover {
48
+ background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].hover.backgroundColor};
27
49
  }
28
50
 
29
- img + span {
30
- margin-top: 10px;
31
- display: block;
51
+ &:active {
52
+ background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].active.backgroundColor};
32
53
  }
33
54
  `;
34
- const PageContainer = styled("div")`
35
- display: ${(props) => props.type === "dot" ? "unset" : "inline-block"};
36
- position: relative;
37
- `;
38
- const TextWrapper = styled("div")`
39
- z-index: 9999999999;
40
- position: absolute;
41
- `;
42
- const OverlayImage = styled("img")`
43
- width: 100%;
44
- height: auto;
55
+ const AltAttrs = {
56
+ altStyle: Boolean,
57
+ color: String
58
+ };
59
+ styled("div", AltAttrs)`
60
+ background-color: ${(props) => props.color ? props.color : props.theme.colors.transparentWhite1};
61
+ padding: 7px;
62
+ height: 100%;
63
+ width: 30%;
64
+ justify-content: center;
65
+ display: flex;
66
+ align-items: center;
67
+ border-radius: 4px 0 0 4px;
68
+ color: ${(props) => props.theme.colors.white};
69
+ all: ${(props) => props.altStyle ? "" : "unset"};
45
70
  `;
46
- const Dot = styled("div")`
47
- width: 5px;
48
- height: 5px;
49
- background-color: ${(props) => props.color};
50
- border-radius: 50%;
71
+ styled("span", AltAttrs)`
72
+ padding: ${(props) => props.altStyle ? "7px" : "0"};
73
+ all: ${(props) => props.altStyle ? "" : "unset"};
51
74
  `;
52
- const IconWrapperAttrs = {
53
- backgroundColor: String,
54
- borderRadius: String,
55
- padding: String,
56
- hoveredIcon: Boolean,
57
- isActive: Boolean,
58
- isDisabled: Boolean
75
+ const LabelAttrs = {
76
+ hasIcon: Boolean
59
77
  };
60
- const IconWrapper = styled("div", IconWrapperAttrs)`
78
+ const LabelComponent = styled("span", LabelAttrs)`
61
79
  display: flex;
62
80
  align-items: center;
63
81
  justify-content: center;
64
- gap: 6px;
65
- white-space: nowrap;
66
- background-color: ${(props) => props.backgroundColor};
67
- border-radius: ${(props) => props.hoveredIcon ? "6px" : props.borderRadius};
68
- padding: ${(props) => props.padding};
69
- width: ${(props) => props.hoveredIcon ? "32px" : ""};
70
- height: ${(props) => props.hoveredIcon ? "32px" : ""};
71
- cursor: pointer;
72
- background-color: ${(props) => props.isActive ? props.theme.colors.transparentWhite2 : ""};
73
- cursor: ${(props) => props.isDisabled ? "not-allowed" : "pointer"};
74
- &:hover {
75
- background-color: ${(props) => props.hoveredIcon ? props.theme.colors.transparentWhite2 : ""};
76
- }
77
- `;
78
- const LabelWrapperAttrs = {
79
- size: String,
80
- color: String
81
- };
82
- const LabelWrapper = styled("div", LabelWrapperAttrs)`
83
- font-size: ${(props) => props.size};
84
- color: ${(props) => props.color};
82
+ gap: ${(props) => props.hasIcon ? "5px" : "0"};
85
83
  `;
86
84
  const _sfc_main = {
87
- name: "InfoText",
85
+ name: "MainButton",
88
86
  components: {
89
- IconComponent: _sfc_main$1,
90
- TextOverlay,
91
- // Arrow,
92
- Dot,
87
+ Icon: _sfc_main$1,
88
+ LabelComponent,
93
89
  PageContainer,
94
- TextWrapper,
95
- OverlayImage,
96
- IconWrapper,
97
- LabelWrapper
90
+ ButtonContainer
98
91
  },
99
92
  props: {
100
- text: {
93
+ type: {
101
94
  required: false,
102
- default: "",
95
+ default: "primary",
96
+ // primary, secondary, tertiary, ghost
97
+ type: String
98
+ },
99
+ variant: {
100
+ required: false,
101
+ default: "main",
102
+ // main, cancel
103
103
  type: String
104
104
  },
105
+ isDisabled: {
106
+ required: false,
107
+ default: false,
108
+ type: Boolean
109
+ },
105
110
  isActive: {
106
111
  required: false,
107
112
  default: false,
108
113
  type: Boolean
109
114
  },
110
- labelText: {
115
+ icon: {
116
+ required: false,
117
+ default: null,
118
+ type: String
119
+ },
120
+ iconColor: {
111
121
  required: false,
112
122
  default: "",
113
123
  type: String
114
124
  },
115
- size: {
116
- type: String,
117
- default: "14px"
125
+ iconAltStyle: {
126
+ required: false,
127
+ default: false,
128
+ type: Boolean
118
129
  },
119
- infoPosition: {
130
+ iconAltStyleColor: {
120
131
  required: false,
121
132
  default: null,
122
133
  type: String
123
134
  },
124
- maxWidth: {
125
- default: "400px",
135
+ text: {
136
+ required: true,
126
137
  type: String
127
138
  },
128
- openTrigger: {
129
- type: String,
130
- default: "onHover",
131
- validator: (value) => ["onHover", "onClick"].includes(value)
132
- },
133
- buttonType: {
134
- type: String,
135
- default: "regular",
136
- validator: (value) => ["regular", "error"].includes(value)
137
- },
138
- image: {
139
- type: String,
140
- default: ""
141
- },
142
- iconName: {
143
- type: String,
144
- default: "info"
145
- },
146
- iconColor: {
147
- type: String,
148
- default: null,
149
- required: false
150
- },
151
- isDisabled: {
152
- type: Boolean,
139
+ noWrap: {
140
+ required: false,
153
141
  default: false,
154
- required: false
142
+ type: Boolean
155
143
  },
156
- dotColor: {
157
- type: String,
144
+ minWidth: {
158
145
  required: false,
159
- default: theme.semanticColors.blue[400]
146
+ default: null,
147
+ type: String
160
148
  },
161
- type: {
162
- type: String,
149
+ width: {
163
150
  required: false,
164
- default: "info"
165
- // info, dot
166
- },
167
- appTheme: {
168
- type: String,
169
- default: "light",
170
- // light or dark
171
- required: false
151
+ default: "auto",
152
+ type: String
172
153
  },
173
- labelAlign: {
174
- type: String,
175
- default: "right",
176
- required: false
154
+ height: {
155
+ required: false,
156
+ default: "auto",
157
+ type: String
177
158
  },
178
- backgroundColor: {
179
- type: String,
180
- default: "",
181
- required: false
159
+ id: {
160
+ required: false,
161
+ default: null,
162
+ type: String
182
163
  },
183
- contentBackgroundColor: {
164
+ dataId: {
184
165
  type: String,
185
- default: "",
186
- required: false
166
+ default: ""
187
167
  },
188
- borderRadius: {
168
+ dataQaId: {
189
169
  type: String,
190
- default: "",
191
- required: false
170
+ default: ""
192
171
  },
193
- padding: {
172
+ appTheme: {
194
173
  type: String,
195
- default: "",
196
- required: false
174
+ default: "light"
197
175
  },
198
- labelSize: {
176
+ buttonSize: {
199
177
  type: String,
200
- default: "12px",
201
- required: false
202
- },
203
- noIcon: {
204
- type: Boolean,
205
- default: false,
206
- required: false
207
- },
208
- hoveredIcon: {
209
- type: Boolean,
210
- default: false,
211
- required: false
212
- },
213
- hideInfoText: {
214
- type: Boolean,
215
- default: false,
178
+ default: "medium",
216
179
  required: false
217
180
  }
218
181
  },
219
- setup(props) {
220
- const isVisible = ref(false);
221
- const container = ref(null);
222
- const icon = ref(null);
223
- const infoBox = ref(null);
224
- const textContent = ref(null);
225
- const infoImage = ref(null);
226
- const infoBoxWidth = ref(0);
227
- const infoBoxHeight = ref(0);
228
- const boxStyle = ref({});
229
- const arrowStyle = ref({});
230
- const wrapperStyle = ref({});
231
- const isMobile = ref(window.innerWidth <= 768);
232
- const textStyle = computed(() => ({
233
- fontSize: props.image ? "12px" : "13px",
234
- color: props.image ? theme.colors.grey1 : props.appTheme === "dark" ? theme.colors.black : theme.colors.white,
235
- textAlign: props.image ? "right" : "left"
236
- }));
237
- const calculatePosition = (width) => {
238
- if (!icon.value || !width)
239
- return {};
240
- const iconRect = icon.value.getBoundingClientRect();
241
- const windowHeight = window.innerHeight;
242
- const windowWidth = window.innerWidth;
243
- const spaceBelow = windowHeight - iconRect.bottom - 10;
244
- const spaceAbove = iconRect.top - 10;
245
- const spaceRight = windowWidth - iconRect.right - 10;
246
- const spaceLeft = iconRect.left - 10;
247
- const positions = [{
248
- position: "bottom",
249
- space: spaceBelow
250
- }, {
251
- position: "top",
252
- space: spaceAbove
253
- }, {
254
- position: "right",
255
- space: spaceRight
256
- }, {
257
- position: "left",
258
- space: spaceLeft
259
- }].sort((a, b) => b.space - a.space);
260
- const bestPosition = props.infoPosition ? props.infoPosition : positions[0].position;
261
- let top, left, arrowPosition;
262
- switch (bestPosition) {
263
- case "bottom":
264
- top = Math.round(iconRect.bottom + 10);
265
- left = Math.round(Math.min(iconRect.left, windowWidth - width - 10));
266
- arrowPosition = {
267
- left: `${Math.round(Math.min(Math.max(iconRect.left - left + iconRect.width / 2 - 8, 2), width - 18))}px`,
268
- top: "-7px",
269
- bottom: "auto",
270
- transform: "rotate(180deg)"
271
- };
272
- break;
273
- case "top":
274
- top = Math.round(iconRect.top - infoBoxHeight.value - 10);
275
- left = Math.round(Math.min(iconRect.left, windowWidth - width - 10));
276
- arrowPosition = {
277
- left: `${Math.round(Math.min(Math.max(iconRect.left - left + iconRect.width / 2 - 8, 2), width - 18))}px`,
278
- top: "auto",
279
- bottom: "-7px",
280
- transform: "none"
281
- };
282
- break;
283
- case "right":
284
- top = Math.round(Math.max(Math.min(iconRect.top - (infoBoxHeight.value - iconRect.height) / 2, windowHeight - infoBoxHeight.value - 10), 10));
285
- left = Math.round(iconRect.right + 10);
286
- arrowPosition = {
287
- left: "-7px",
288
- top: `${Math.round(Math.min(Math.max(iconRect.top - top + iconRect.height / 2 - 8, 2), infoBoxHeight.value - 18))}px`,
289
- bottom: "auto",
290
- transform: "rotate(90deg)"
291
- };
292
- break;
293
- case "left":
294
- top = Math.round(Math.max(Math.min(iconRect.top - (infoBoxHeight.value - iconRect.height) / 2, windowHeight - infoBoxHeight.value - 10), 10));
295
- left = Math.round(iconRect.left - width - 10);
296
- arrowPosition = {
297
- left: "auto",
298
- right: "-7px",
299
- top: `${Math.round(Math.min(Math.max(iconRect.top - top + iconRect.height / 2 - 8, 2), infoBoxHeight.value - 18))}px`,
300
- bottom: "auto",
301
- transform: "rotate(-90deg)"
302
- };
303
- break;
304
- }
305
- arrowStyle.value = arrowPosition;
306
- wrapperStyle.value = {
307
- position: "fixed",
308
- top: `${top}px`,
309
- left: `${left}px`,
310
- transform: "none",
311
- width: `${width}px`
312
- };
313
- return {
314
- width: "100%",
315
- maxWidth: props.maxWidth,
316
- overflowY: "auto",
317
- backgroundColor: props.contentBackgroundColor ? props.contentBackgroundColor : props.image ? theme.colors.white : props.appTheme === "light" ? theme.colors.black : theme.colors.grey5
318
- };
319
- };
320
- const showInfo = async () => {
321
- isVisible.value = !props.hideInfoText;
322
- await nextTick();
323
- await nextTick();
324
- await updatePosition();
325
- };
326
- const hideInfo = () => {
327
- isVisible.value = false;
328
- infoBoxWidth.value = 0;
329
- };
330
- const toggleInfo = () => {
331
- isVisible.value ? hideInfo() : showInfo();
332
- };
333
- const handleScroll = () => {
334
- if (isVisible.value) {
335
- hideInfo();
336
- }
337
- updatePosition();
338
- };
339
- const isIconInView = () => {
340
- if (!icon.value)
341
- return false;
342
- const rect = icon.value.getBoundingClientRect();
343
- return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
344
- };
345
- const updatePosition = async () => {
346
- if (!infoBox.value || !textContent.value)
347
- return;
348
- if (infoBox.value.$el) {
349
- infoBox.value.$el.style.visibility = "hidden";
350
- infoBox.value.$el.style.display = "block";
351
- }
352
- await nextTick();
353
- if (!isIconInView()) {
354
- if (isVisible.value)
355
- hideInfo();
356
- return;
357
- }
358
- const clone = textContent.value.cloneNode(true);
359
- clone.style.position = "absolute";
360
- clone.style.visibility = "hidden";
361
- clone.style.width = "auto";
362
- clone.style.maxWidth = "none";
363
- clone.style.whiteSpace = "nowrap";
364
- document.body.appendChild(clone);
365
- const contentWidth = clone.offsetWidth;
366
- document.body.removeChild(clone);
367
- const calculatedWidth = Math.min(Math.max(contentWidth, 230), parseInt(props.maxWidth, 10));
368
- infoBoxWidth.value = calculatedWidth;
369
- await nextTick();
370
- infoBoxHeight.value = infoBox.value.$el.offsetHeight;
371
- boxStyle.value = calculatePosition(calculatedWidth);
372
- if (isVisible.value && infoBox.value.$el) {
373
- infoBox.value.$el.style.visibility = "visible";
374
- }
375
- };
376
- const onImageLoad = () => {
377
- if (infoImage.value) {
378
- infoBoxHeight.value = infoBox.value.$el.offsetHeight;
379
- updatePosition();
380
- }
381
- };
382
- const handleClickOutside = (event) => {
383
- if ((props.openTrigger === "onClick" || isMobile.value) && isVisible.value) {
384
- const clickedElement = event.target;
385
- if (infoBox.value && !infoBox.value.$el.contains(clickedElement) && !icon.value.contains(clickedElement)) {
386
- hideInfo();
387
- }
388
- }
389
- };
390
- const handleResize = () => {
391
- isMobile.value = window.innerWidth <= 768;
392
- updatePosition();
393
- };
394
- onMounted(() => {
395
- window.addEventListener("scroll", handleScroll, {
396
- passive: true
397
- });
398
- window.addEventListener("resize", handleResize);
399
- document.addEventListener("scroll", handleScroll, {
400
- passive: true,
401
- capture: true
402
- });
403
- document.addEventListener("click", handleClickOutside);
404
- });
405
- onUnmounted(() => {
406
- window.removeEventListener("scroll", handleScroll);
407
- window.removeEventListener("resize", handleResize);
408
- document.removeEventListener("scroll", handleScroll, {
409
- capture: true
410
- });
411
- document.removeEventListener("click", handleClickOutside);
412
- });
413
- watch(isVisible, (newValue) => {
414
- if (newValue) {
415
- updatePosition();
416
- }
417
- });
418
- return {
419
- isVisible,
420
- boxStyle,
421
- arrowStyle,
422
- showInfo,
423
- hideInfo,
424
- toggleInfo,
425
- container,
426
- icon,
427
- infoBox,
428
- textContent,
429
- infoImage,
430
- infoBoxWidth,
431
- infoBoxHeight,
432
- wrapperStyle,
433
- textStyle,
434
- onImageLoad,
435
- isMobile
436
- };
437
- },
438
182
  computed: {
439
- computedIconColor() {
440
- return this.buttonType === "error" ? theme.colors.red : theme.colors.mediumGray;
183
+ theme() {
184
+ return theme;
185
+ },
186
+ getIconColor() {
187
+ return this.isDisabled ? this.theme.mainButton[this.appTheme][this.type][this.variant].disabled.textColor : this.iconColor ? this.iconColor : this.theme.mainButton[this.appTheme][this.type][this.variant].default.textColor;
441
188
  }
442
189
  }
443
190
  };
444
- const _hoisted_1 = {
445
- ref: "icon",
446
- "data-test-id": "infoText_trigger"
447
- };
448
- const _hoisted_2 = ["innerHTML"];
449
191
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
450
- const _component_LabelWrapper = resolveComponent("LabelWrapper");
451
- const _component_Dot = resolveComponent("Dot");
452
- const _component_IconComponent = resolveComponent("IconComponent");
453
- const _component_IconWrapper = resolveComponent("IconWrapper");
454
- const _component_OverlayImage = resolveComponent("OverlayImage");
455
- const _component_TextOverlay = resolveComponent("TextOverlay");
456
- const _component_TextWrapper = resolveComponent("TextWrapper");
192
+ const _component_Icon = resolveComponent("Icon");
193
+ const _component_LabelComponent = resolveComponent("LabelComponent");
194
+ const _component_ButtonContainer = resolveComponent("ButtonContainer");
457
195
  const _component_PageContainer = resolveComponent("PageContainer");
458
- return openBlock(), createBlock(_component_PageContainer, {
459
- ref: "container",
460
- "data-test-id": "infoText_container",
461
- type: $props.type,
462
- onClick: _cache[0] || (_cache[0] = ($event) => {
463
- ($setup.isMobile || $props.openTrigger === "onClick") && $setup.toggleInfo();
464
- }),
465
- onMouseenter: _cache[1] || (_cache[1] = ($event) => !$setup.isMobile && $props.openTrigger === "onHover" && $setup.showInfo()),
466
- onMouseleave: _cache[2] || (_cache[2] = ($event) => !$setup.isMobile && $props.openTrigger === "onHover" && $setup.hideInfo())
467
- }, {
468
- default: withCtx(() => [createBaseVNode("div", _hoisted_1, [createVNode(_component_IconWrapper, {
469
- "background-color": $props.backgroundColor,
470
- "border-radius": $props.borderRadius,
471
- "hovered-icon": $props.hoveredIcon,
196
+ return openBlock(), createBlock(_component_PageContainer, null, {
197
+ default: withCtx(() => [createVNode(_component_ButtonContainer, {
198
+ id: $props.id,
199
+ "app-theme": $props.appTheme,
200
+ "button-size": $props.buttonSize,
201
+ "data-id": $props.dataId,
202
+ "data-qa-id": $props.dataQaId,
203
+ height: $props.height,
472
204
  "is-active": $props.isActive,
473
205
  "is-disabled": $props.isDisabled,
474
- padding: $props.padding
206
+ "min-width": $props.minWidth,
207
+ "no-wrap": $props.noWrap,
208
+ type: $props.type,
209
+ variant: $props.variant,
210
+ width: $props.width
475
211
  }, {
476
- default: withCtx(() => [!_ctx.$slots.trigger ? (openBlock(), createElementBlock(Fragment, {
477
- key: 0
478
- }, [$props.labelText && $props.labelAlign === "left" ? (openBlock(), createBlock(_component_LabelWrapper, {
479
- key: 0,
480
- color: $props.iconColor || $options.computedIconColor,
481
- size: $props.labelSize
212
+ default: withCtx(() => [createVNode(_component_LabelComponent, {
213
+ "has-icon": Boolean($props.icon)
482
214
  }, {
483
- default: withCtx(() => [createTextVNode(toDisplayString($props.labelText), 1)]),
484
- _: 1
485
- }, 8, ["color", "size"])) : createCommentVNode("", true), createTextVNode(), $props.type === "dot" ? (openBlock(), createBlock(_component_Dot, {
486
- key: 1,
487
- color: $props.dotColor,
488
- "data-test-id": "infoText_dot"
489
- }, null, 8, ["color"])) : !$props.noIcon ? (openBlock(), createBlock(_component_IconComponent, {
490
- key: 2,
491
- color: $props.iconColor || $options.computedIconColor,
492
- cursor: $props.isDisabled ? "not-allowed" : "pointer",
493
- disabled: $props.isDisabled,
494
- "hovered-color": $props.iconColor || $options.computedIconColor,
495
- name: $props.iconName,
496
- size: $props.size
497
- }, null, 8, ["color", "cursor", "disabled", "hovered-color", "name", "size"])) : createCommentVNode("", true), createTextVNode(), $props.labelText && $props.labelAlign === "right" ? (openBlock(), createBlock(_component_LabelWrapper, {
498
- key: 3,
499
- color: $props.iconColor || $options.computedIconColor,
500
- size: $props.labelSize
501
- }, {
502
- default: withCtx(() => [createTextVNode(toDisplayString($props.labelText), 1)]),
503
- _: 1
504
- }, 8, ["color", "size"])) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createTextVNode(), renderSlot(_ctx.$slots, "trigger")]),
505
- _: 3
506
- }, 8, ["background-color", "border-radius", "hovered-icon", "is-active", "is-disabled", "padding"])], 512), createTextVNode(), $setup.isVisible && (!!$props.text || _ctx.$slots.default) ? (openBlock(), createBlock(Teleport, {
507
- key: 0,
508
- to: "body"
509
- }, [createVNode(_component_TextWrapper, {
510
- "data-test-id": "info_text_wrapper",
511
- style: normalizeStyle($setup.wrapperStyle)
512
- }, {
513
- default: withCtx(() => [createVNode(_component_TextOverlay, {
514
- ref: "infoBox",
515
- "app-theme": $props.appTheme,
516
- image: $props.image,
517
- style: normalizeStyle($setup.boxStyle),
518
- width: $setup.infoBoxWidth
519
- }, {
520
- default: withCtx(() => [$props.image ? (openBlock(), createBlock(_component_OverlayImage, {
215
+ default: withCtx(() => [$props.icon ? (openBlock(), createBlock(_component_Icon, {
521
216
  key: 0,
522
- ref: "infoImage",
523
- alt: "Info Image",
524
- src: $props.image,
525
- onLoad: $setup.onImageLoad
526
- }, null, 8, ["src", "onLoad"])) : createCommentVNode("", true), createTextVNode(), !$props.hideInfoText ? (openBlock(), createElementBlock("span", {
527
- key: 1,
528
- ref: "textContent",
529
- style: normalizeStyle($setup.textStyle)
530
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createBaseVNode("span", {
531
- innerHTML: $props.text
532
- }, null, 8, _hoisted_2)])], 4)) : createCommentVNode("", true)]),
533
- _: 3
534
- }, 8, ["app-theme", "image", "style", "width"]), createTextVNode()]),
535
- _: 3
536
- }, 8, ["style"])])) : createCommentVNode("", true)]),
537
- _: 3
538
- }, 8, ["type"]);
217
+ color: $options.getIconColor,
218
+ "hovered-color": $options.getIconColor,
219
+ name: $props.icon,
220
+ size: "14px"
221
+ }, null, 8, ["color", "hovered-color", "name"])) : createCommentVNode("", true), createTextVNode(" " + toDisplayString($props.text), 1)]),
222
+ _: 1
223
+ }, 8, ["has-icon"])]),
224
+ _: 1
225
+ }, 8, ["id", "app-theme", "button-size", "data-id", "data-qa-id", "height", "is-active", "is-disabled", "min-width", "no-wrap", "type", "variant", "width"])]),
226
+ _: 1
227
+ });
539
228
  }
540
- const InfoText = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
229
+ const RCButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
541
230
  export {
542
- InfoText as default
231
+ RCButton as default
543
232
  };