@getflip/swirl-components 0.390.0 → 0.392.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 (146) hide show
  1. package/components.json +37 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{media-query.service-BcAHijM-.js → media-query.service-B8u-DqoO.js} +1 -1
  4. package/dist/cjs/swirl-action-list_2.cjs.entry.js +2 -2
  5. package/dist/cjs/swirl-app-layout_5.cjs.entry.js +2 -2
  6. package/dist/cjs/swirl-autocomplete.cjs.entry.js +1 -1
  7. package/dist/cjs/swirl-avatar.cjs.entry.js +2 -2
  8. package/dist/cjs/swirl-banner.cjs.entry.js +2 -2
  9. package/dist/cjs/swirl-button.cjs.entry.js +2 -2
  10. package/dist/cjs/swirl-carousel.cjs.entry.js +1 -1
  11. package/dist/cjs/swirl-chip.cjs.entry.js +2 -2
  12. package/dist/cjs/swirl-components.cjs.js +1 -1
  13. package/dist/cjs/swirl-console-layout.cjs.entry.js +1 -1
  14. package/dist/cjs/swirl-date-input.cjs.entry.js +2 -2
  15. package/dist/cjs/swirl-date-picker_2.cjs.entry.js +1 -1
  16. package/dist/cjs/swirl-file-chip.cjs.entry.js +1 -1
  17. package/dist/cjs/swirl-file-viewer_8.cjs.entry.js +1 -1
  18. package/dist/cjs/swirl-form-control.cjs.entry.js +1 -1
  19. package/dist/cjs/swirl-icon-error_3.cjs.entry.js +2 -2
  20. package/dist/cjs/swirl-image-grid-item.cjs.entry.js +1 -1
  21. package/dist/cjs/swirl-inline-status.cjs.entry.js +2 -2
  22. package/dist/cjs/swirl-lightbox.cjs.entry.js +1 -1
  23. package/dist/cjs/swirl-menu-item.cjs.entry.js +1 -1
  24. package/dist/cjs/swirl-menu.cjs.entry.js +1 -1
  25. package/dist/cjs/swirl-modal.cjs.entry.js +1 -1
  26. package/dist/cjs/swirl-option-list_2.cjs.entry.js +2 -2
  27. package/dist/cjs/swirl-pagination.cjs.entry.js +1 -1
  28. package/dist/cjs/swirl-pdf-reader.cjs.entry.js +1 -1
  29. package/dist/cjs/swirl-popover_2.cjs.entry.js +1 -1
  30. package/dist/cjs/swirl-resource-list-file-item.cjs.entry.js +2 -2
  31. package/dist/cjs/swirl-search.cjs.entry.js +2 -2
  32. package/dist/cjs/swirl-select.cjs.entry.js +1 -1
  33. package/dist/cjs/swirl-shell-layout.cjs.entry.js +1 -1
  34. package/dist/cjs/swirl-tab-bar.cjs.entry.js +1 -1
  35. package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
  36. package/dist/cjs/swirl-table-row.cjs.entry.js +1 -1
  37. package/dist/cjs/swirl-table.cjs.entry.js +1 -1
  38. package/dist/cjs/swirl-tabs.cjs.entry.js +1 -1
  39. package/dist/cjs/swirl-text-input.cjs.entry.js +2 -2
  40. package/dist/cjs/swirl-time-input.cjs.entry.js +2 -2
  41. package/dist/cjs/swirl-toast.cjs.entry.js +2 -2
  42. package/dist/cjs/swirl-toolbar.cjs.entry.js +1 -1
  43. package/dist/cjs/swirl-tooltip.cjs.entry.js +36 -10
  44. package/dist/cjs/{utils-CllbYlRY.js → utils-UfZG-xPD.js} +6 -0
  45. package/dist/collection/components/swirl-avatar/swirl-avatar.css +5 -0
  46. package/dist/collection/components/swirl-avatar/swirl-avatar.js +2 -2
  47. package/dist/collection/components/swirl-tooltip/swirl-tooltip.css +5 -0
  48. package/dist/collection/components/swirl-tooltip/swirl-tooltip.js +57 -10
  49. package/dist/collection/utils.js +5 -0
  50. package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
  51. package/dist/components/media-query.service.js +1 -1
  52. package/dist/components/swirl-avatar.js +2 -2
  53. package/dist/components/swirl-tooltip2.js +39 -11
  54. package/dist/components/utils.js +6 -1
  55. package/dist/esm/loader.js +1 -1
  56. package/dist/esm/{media-query.service-CpP-qu5C.js → media-query.service-BZg4zbFx.js} +1 -1
  57. package/dist/esm/swirl-action-list_2.entry.js +2 -2
  58. package/dist/esm/swirl-app-layout_5.entry.js +2 -2
  59. package/dist/esm/swirl-autocomplete.entry.js +1 -1
  60. package/dist/esm/swirl-avatar.entry.js +2 -2
  61. package/dist/esm/swirl-banner.entry.js +2 -2
  62. package/dist/esm/swirl-button.entry.js +2 -2
  63. package/dist/esm/swirl-carousel.entry.js +1 -1
  64. package/dist/esm/swirl-chip.entry.js +2 -2
  65. package/dist/esm/swirl-components.js +1 -1
  66. package/dist/esm/swirl-console-layout.entry.js +1 -1
  67. package/dist/esm/swirl-date-input.entry.js +2 -2
  68. package/dist/esm/swirl-date-picker_2.entry.js +1 -1
  69. package/dist/esm/swirl-file-chip.entry.js +1 -1
  70. package/dist/esm/swirl-file-viewer_8.entry.js +1 -1
  71. package/dist/esm/swirl-form-control.entry.js +1 -1
  72. package/dist/esm/swirl-icon-error_3.entry.js +2 -2
  73. package/dist/esm/swirl-image-grid-item.entry.js +1 -1
  74. package/dist/esm/swirl-inline-status.entry.js +2 -2
  75. package/dist/esm/swirl-lightbox.entry.js +1 -1
  76. package/dist/esm/swirl-menu-item.entry.js +1 -1
  77. package/dist/esm/swirl-menu.entry.js +1 -1
  78. package/dist/esm/swirl-modal.entry.js +1 -1
  79. package/dist/esm/swirl-option-list_2.entry.js +2 -2
  80. package/dist/esm/swirl-pagination.entry.js +1 -1
  81. package/dist/esm/swirl-pdf-reader.entry.js +1 -1
  82. package/dist/esm/swirl-popover_2.entry.js +1 -1
  83. package/dist/esm/swirl-resource-list-file-item.entry.js +2 -2
  84. package/dist/esm/swirl-search.entry.js +2 -2
  85. package/dist/esm/swirl-select.entry.js +1 -1
  86. package/dist/esm/swirl-shell-layout.entry.js +1 -1
  87. package/dist/esm/swirl-tab-bar.entry.js +1 -1
  88. package/dist/esm/swirl-table-column.entry.js +1 -1
  89. package/dist/esm/swirl-table-row.entry.js +1 -1
  90. package/dist/esm/swirl-table.entry.js +1 -1
  91. package/dist/esm/swirl-tabs.entry.js +1 -1
  92. package/dist/esm/swirl-text-input.entry.js +2 -2
  93. package/dist/esm/swirl-time-input.entry.js +2 -2
  94. package/dist/esm/swirl-toast.entry.js +2 -2
  95. package/dist/esm/swirl-toolbar.entry.js +1 -1
  96. package/dist/esm/swirl-tooltip.entry.js +36 -10
  97. package/dist/esm/{utils-DytJsmhr.js → utils-wi_3Z3FQ.js} +6 -1
  98. package/dist/swirl-components/{p-84522af5.entry.js → p-08096eb7.entry.js} +1 -1
  99. package/dist/swirl-components/{p-7eaa0fa6.entry.js → p-0f996944.entry.js} +1 -1
  100. package/dist/swirl-components/{p-d9d2d3cd.entry.js → p-19dadeeb.entry.js} +1 -1
  101. package/dist/swirl-components/{p-27a2334e.entry.js → p-1a298d4a.entry.js} +1 -1
  102. package/dist/swirl-components/{p-2fae365b.entry.js → p-1b8edbad.entry.js} +1 -1
  103. package/dist/swirl-components/{p-744bb10c.entry.js → p-2ba77bbd.entry.js} +1 -1
  104. package/dist/swirl-components/{p-41514546.entry.js → p-3a51cd1d.entry.js} +1 -1
  105. package/dist/swirl-components/{p-81b2e380.entry.js → p-3cb860e0.entry.js} +1 -1
  106. package/dist/swirl-components/{p-0da2362d.entry.js → p-3ff37617.entry.js} +1 -1
  107. package/dist/swirl-components/{p-922134b6.entry.js → p-40d6a295.entry.js} +1 -1
  108. package/dist/swirl-components/{p-2a61a410.entry.js → p-488cfc82.entry.js} +1 -1
  109. package/dist/swirl-components/{p-81ee71b8.entry.js → p-492d52f6.entry.js} +1 -1
  110. package/dist/swirl-components/{p-bfa2491e.entry.js → p-59116473.entry.js} +1 -1
  111. package/dist/swirl-components/{p-2a285267.entry.js → p-5b34a195.entry.js} +1 -1
  112. package/dist/swirl-components/{p-1182eb75.entry.js → p-5c5c2a10.entry.js} +1 -1
  113. package/dist/swirl-components/{p-fc502f05.entry.js → p-5d81e853.entry.js} +1 -1
  114. package/dist/swirl-components/{p-b9a299b9.entry.js → p-6d325fa7.entry.js} +1 -1
  115. package/dist/swirl-components/{p-192e260b.entry.js → p-6e55cabe.entry.js} +1 -1
  116. package/dist/swirl-components/{p-f28a4f8e.entry.js → p-74aa7188.entry.js} +1 -1
  117. package/dist/swirl-components/{p-042ee5d4.entry.js → p-7bc63fc2.entry.js} +1 -1
  118. package/dist/swirl-components/{p-8acdbcb3.entry.js → p-7f4e05df.entry.js} +1 -1
  119. package/dist/swirl-components/{p-1531276b.entry.js → p-92fb5c55.entry.js} +1 -1
  120. package/dist/swirl-components/{p-180ed63e.entry.js → p-971f8aa4.entry.js} +1 -1
  121. package/dist/swirl-components/{p-fb5079da.entry.js → p-9b0a52d8.entry.js} +1 -1
  122. package/dist/swirl-components/{p-7a9af724.entry.js → p-9d829bc6.entry.js} +1 -1
  123. package/dist/swirl-components/{p-DJ2FyZeW.js → p-BKpD2IO9.js} +1 -1
  124. package/dist/swirl-components/{p-64e4d854.entry.js → p-ab26446b.entry.js} +1 -1
  125. package/dist/swirl-components/{p-350a5b37.entry.js → p-acf964f6.entry.js} +1 -1
  126. package/dist/swirl-components/{p-6a4c15e4.entry.js → p-b1926a98.entry.js} +1 -1
  127. package/dist/swirl-components/{p-84535964.entry.js → p-b674e398.entry.js} +1 -1
  128. package/dist/swirl-components/{p-c8e30ded.entry.js → p-b80acce3.entry.js} +1 -1
  129. package/dist/swirl-components/{p-6f8ef29e.entry.js → p-bf1ed31d.entry.js} +1 -1
  130. package/dist/swirl-components/{p-0d5171f8.entry.js → p-bf4d2ac3.entry.js} +1 -1
  131. package/dist/swirl-components/{p-e872b698.entry.js → p-c31d13e2.entry.js} +1 -1
  132. package/dist/swirl-components/{p-e7744a13.entry.js → p-d1fa14ba.entry.js} +1 -1
  133. package/dist/swirl-components/{p-441c94ba.entry.js → p-d92888a6.entry.js} +1 -1
  134. package/dist/swirl-components/{p-57dfce0c.entry.js → p-eaa660fd.entry.js} +1 -1
  135. package/dist/swirl-components/{p-157e2343.entry.js → p-ebac4d1b.entry.js} +1 -1
  136. package/dist/swirl-components/{p-750914d8.entry.js → p-f1b42a86.entry.js} +1 -1
  137. package/dist/swirl-components/p-f38f71c9.entry.js +1 -0
  138. package/dist/swirl-components/{p-DytJsmhr.js → p-wi_3Z3FQ.js} +1 -1
  139. package/dist/swirl-components/swirl-components.esm.js +1 -1
  140. package/dist/types/components/swirl-avatar/swirl-avatar.d.ts +1 -1
  141. package/dist/types/components/swirl-tooltip/swirl-tooltip.d.ts +7 -0
  142. package/dist/types/components.d.ts +10 -0
  143. package/dist/types/utils.d.ts +1 -0
  144. package/package.json +1 -1
  145. package/vscode-data.json +7 -0
  146. package/dist/swirl-components/p-eef34c13.entry.js +0 -1
@@ -184,6 +184,11 @@ function isDocumentMimeType(mimeType) {
184
184
  mimeType.startsWith("application/vnd.openxmlformats-officedocument.wordprocessingml.document") ||
185
185
  mimeType.startsWith("application/vnd.apple.pages"));
186
186
  }
187
+ function getPixelsFromRemToken(token) {
188
+ return (+getComputedStyle(document.documentElement)
189
+ .getPropertyValue(token)
190
+ .replace("rem", "") * 16);
191
+ }
187
192
 
188
193
  exports.closestPassShadow = closestPassShadow;
189
194
  exports.debounce = debounce;
@@ -191,6 +196,7 @@ exports.getActiveElement = getActiveElement;
191
196
  exports.getCircularArrayIndex = getCircularArrayIndex;
192
197
  exports.getDesktopMediaQuery = getDesktopMediaQuery;
193
198
  exports.getISODateString = getISODateString;
199
+ exports.getPixelsFromRemToken = getPixelsFromRemToken;
194
200
  exports.getVisibleHeight = getVisibleHeight;
195
201
  exports.isAudioMimeType = isAudioMimeType;
196
202
  exports.isCompressedArchiveMimeType = isCompressedArchiveMimeType;
@@ -243,6 +243,11 @@
243
243
  background-color: var(--s-decorative-radish-surface-subdued);
244
244
  }
245
245
 
246
+ .avatar--color-neutral .avatar__initials {
247
+ color: var(--s-text-subdued);
248
+ background-color: var(--s-surface-neutral-subdued);
249
+ }
250
+
246
251
  .avatar__image {
247
252
  overflow: hidden;
248
253
  width: 100%;
@@ -113,7 +113,7 @@ export class SwirlAvatar {
113
113
  });
114
114
  const badgeClassName = classnames("avatar__badge", `avatar__badge--position-${this.badgePosition}`);
115
115
  const toolClassName = classnames("avatar__tool", `avatar__tool--position-${this.toolPosition}`);
116
- return (h(Host, { key: 'a6c4c3e0d9c306ff28c1a80dc52546228fca1eba', "aria-label": this.interactive ? this.label : undefined, onKeydown: this.interactive ? this.onKeydown : undefined, onKeyup: this.interactive ? this.onKeyup : undefined, role: role, tabIndex: this.interactive ? 0 : undefined }, h("span", { key: '94f4224fca18e1e0a13f220f17ff16e3857d48d9', class: className, part: "avatar" }, showImage && (h("span", { key: '86584ed6e4bdd4e5eb8e74141ca9ef52a65e3657', class: "avatar__image" }, h("img", { key: '1db3a58ab870ae4832d0585b97f6a5ad04879e26', alt: "", height: swirlAvatarSizeMappings[this.size], loading: this.loading !== "intersecting" ? this.loading : undefined, ref: this.onImageElementUpdate, src: this.src, width: swirlAvatarSizeMappings[this.size] }))), showInitials && (h("span", { key: '2e98b96482f0eb8b42a60307f8c67f1f20c67a7b', class: "avatar__initials" }, h("span", { key: '889baa8fe8289cd53091d916c4e8c618a5ef55e2' }, this.initials))), showIcon && h("span", { key: '9b33d1c1064a2fd990dbc457aa40462a4409383c', class: "avatar__icon", innerHTML: this.icon }), showFallbackIcon && (h("span", { key: 'b30ec094c0b0b69239bbc248d458c7fe7c615dbd', class: "avatar__icon" }, h("swirl-icon-person", { key: '24ba56fd170f85ec0a3172d5d2340496c168e2d6' }))), showBadge && (h("span", { key: 'f80ab2dd833ef93dbaa1f4f34fcf4698577ddc70', class: badgeClassName, innerHTML: this.badge })), h("span", { key: '11ed60620a61049c67e9145019702ba961efeee8', class: toolClassName }, h("slot", { key: '0cbeaab4de7d5be5baae9144a89340f4135b76d9', name: "tool" }))), this.showLabel && (h("span", { key: 'dcb6182cc688f2a8fde5ef1701bf0e928d3a6280', "aria-hidden": true, class: "avatar__label" }, this.label))));
116
+ return (h(Host, { key: '42c11df526248247b9cb2bee6b2d58bc70aafa65', "aria-label": this.interactive ? this.label : undefined, onKeydown: this.interactive ? this.onKeydown : undefined, onKeyup: this.interactive ? this.onKeyup : undefined, role: role, tabIndex: this.interactive ? 0 : undefined }, h("span", { key: '96a01925f8c723fca2dbb17263152b1d56d26027', class: className, part: "avatar" }, showImage && (h("span", { key: '896d136ab3094a2f583b938c2b91d04e78f0d10f', class: "avatar__image" }, h("img", { key: 'fde4999892611a1634223519cbccf76130cdb51c', alt: "", height: swirlAvatarSizeMappings[this.size], loading: this.loading !== "intersecting" ? this.loading : undefined, ref: this.onImageElementUpdate, src: this.src, width: swirlAvatarSizeMappings[this.size] }))), showInitials && (h("span", { key: '4e1e6d7539ef10c696292cbb9f8a1a9dd492a97a', class: "avatar__initials" }, h("span", { key: '866a9aaaa0b2e2ef114cc992be91b503160aac69' }, this.initials))), showIcon && h("span", { key: '1cb19789413ef94288b19c209f80b9ccab454baa', class: "avatar__icon", innerHTML: this.icon }), showFallbackIcon && (h("span", { key: '36dee103b6406e226e48183c4376a978a6ecedc9', class: "avatar__icon" }, h("swirl-icon-person", { key: 'b992b47b9baa52c05193fff33e9b57211c23a51e' }))), showBadge && (h("span", { key: '6134b435fa2572c24dd3d8be7ca3f02b51e6ea3c', class: badgeClassName, innerHTML: this.badge })), h("span", { key: '20e4112658cd486eb49d7e2543f13678b4d7a5fd', class: toolClassName }, h("slot", { key: 'f03881df79fb42c911c2895cd787f706c9529a9f', name: "tool" }))), this.showLabel && (h("span", { key: 'beeb327bbc2a05443d756dea01be85e0a885e507', "aria-hidden": true, class: "avatar__label" }, this.label))));
117
117
  }
118
118
  static get is() { return "swirl-avatar"; }
119
119
  static get encapsulation() { return "shadow"; }
@@ -180,7 +180,7 @@ export class SwirlAvatar {
180
180
  "mutable": false,
181
181
  "complexType": {
182
182
  "original": "SwirlAvatarColor",
183
- "resolved": "\"banana\" | \"blueberry\" | \"chilli\" | \"grape\" | \"kiwi\" | \"pumpkin\" | \"radish\"",
183
+ "resolved": "\"banana\" | \"blueberry\" | \"chilli\" | \"grape\" | \"kiwi\" | \"neutral\" | \"pumpkin\" | \"radish\"",
184
184
  "references": {
185
185
  "SwirlAvatarColor": {
186
186
  "location": "local",
@@ -88,6 +88,11 @@
88
88
  background-color: var(--s-surface-neutral-default);
89
89
  }
90
90
 
91
+ .tooltip--promo .tooltip__bubble,
92
+ .tooltip--promo .tooltip__arrow {
93
+ background-color: var(--s-surface-info-default);
94
+ }
95
+
91
96
  @keyframes tooltip-fade-in {
92
97
  from {
93
98
  opacity: 0;
@@ -1,15 +1,23 @@
1
1
  import { arrow, autoUpdate, computePosition, flip, offset, shift, } from "@floating-ui/dom";
2
2
  import { h, Host, } from "@stencil/core";
3
3
  import classnames from "classnames";
4
+ import { getPixelsFromRemToken } from "../../utils";
4
5
  export class SwirlTooltip {
5
6
  constructor() {
6
7
  this.active = true;
7
8
  this.delay = 200;
8
9
  this.position = "top";
9
10
  this.positioning = "absolute";
11
+ /**
12
+ * If set to true, tooltip will be initially visible.
13
+ * It will only be dismissible via a click and will not reappear.
14
+ * Tooltip will have a blue background color.
15
+ */
16
+ this.isPromo = false;
10
17
  this.visible = false;
18
+ this.isPromoShown = false;
11
19
  this.onKeydown = (event) => {
12
- if (event.code === "Escape") {
20
+ if (event.code === "Escape" && !this.isPromo) {
13
21
  this.hide();
14
22
  }
15
23
  };
@@ -31,7 +39,7 @@ export class SwirlTooltip {
31
39
  };
32
40
  };
33
41
  this.show = () => {
34
- if (!this.active) {
42
+ if (!this.active || (this.isPromo && this.isPromoShown)) {
35
43
  return;
36
44
  }
37
45
  this.visible = true;
@@ -65,11 +73,22 @@ export class SwirlTooltip {
65
73
  this.disableAutoUpdate?.();
66
74
  };
67
75
  this.updateOptions = () => {
68
- const margin = +getComputedStyle(document.documentElement)
69
- .getPropertyValue("--s-space-12")
70
- .replace("rem", "") * 16;
76
+ const margin = getPixelsFromRemToken("--s-space-12");
77
+ const shiftPaddingY = getPixelsFromRemToken("--s-space-8");
78
+ const shiftPaddingX = getPixelsFromRemToken("--s-space-16");
71
79
  this.options = {
72
- middleware: [offset(margin), shift(), flip()],
80
+ middleware: [
81
+ offset(margin),
82
+ shift({
83
+ padding: {
84
+ top: shiftPaddingY,
85
+ bottom: shiftPaddingY,
86
+ left: shiftPaddingX,
87
+ right: shiftPaddingX,
88
+ },
89
+ }),
90
+ flip(),
91
+ ],
73
92
  placement: this.position,
74
93
  strategy: this.positioning,
75
94
  };
@@ -82,7 +101,9 @@ export class SwirlTooltip {
82
101
  this.showWithDelay();
83
102
  }
84
103
  onMouseLeave() {
85
- this.hide();
104
+ if (!this.isPromo) {
105
+ this.hide();
106
+ }
86
107
  }
87
108
  onWindowResize() {
88
109
  if (!this.active) {
@@ -101,13 +122,18 @@ export class SwirlTooltip {
101
122
  }
102
123
  componentDidLoad() {
103
124
  this.updateOptions();
125
+ if (this.isPromo) {
126
+ this.show();
127
+ this.isPromoShown = true;
128
+ }
104
129
  }
105
130
  render() {
106
131
  const className = classnames("tooltip", `tooltip--actual-placement-${this.actualPosition?.placement}`, {
107
132
  "tooltip--active": this.active,
108
133
  "tooltip--visible": this.visible,
134
+ "tooltip--promo": this.isPromo,
109
135
  });
110
- return (h(Host, { key: '7d75b9d6c223d29e88edff512c881d5c7689e287', onKeydown: this.onKeydown }, h("span", { key: '3abb23525fee5aa69bf2bf67ea1d7f72601b5328', class: className }, h("span", { key: 'b79893b8952d4258edea494bc008a7b416a179af', class: "tooltip__reference", "aria-describedby": "tooltip", onFocusout: this.hide, onClick: this.hide, onFocusin: this.show }, h("slot", { key: '710c29070174874d6a6be6a08ed5a5dd97bb1230' })), h("span", { key: '4003d8b277fc55de2460ec8c63f51535f9f64760', class: "tooltip__popper", ref: (el) => (this.popperEl = el), style: {
136
+ return (h(Host, { key: '0fa9404559103428ce19831a0b45a5330d00c9fa', onKeydown: this.onKeydown }, h("span", { key: '3602318c40723c65c318cef0254dab0161439cc6', class: className }, h("span", { key: 'a9aaf081590bcf01ad2c82c99b8ea10bc9b8f8a5', class: "tooltip__reference", "aria-describedby": "tooltip", onFocusout: !this.isPromo && this.hide, onClick: this.hide, onFocusin: this.show }, h("slot", { key: '73ad565e8b91925bba6fcb490b542d74890926c1' })), h("span", { key: 'bd84b556b64f4d24f2064d00556070af818524f5', class: "tooltip__popper", ref: (el) => (this.popperEl = el), style: {
111
137
  top: Boolean(this.actualPosition)
112
138
  ? `${this.actualPosition?.y}px`
113
139
  : "",
@@ -115,7 +141,7 @@ export class SwirlTooltip {
115
141
  ? `${this.actualPosition?.x}px`
116
142
  : "",
117
143
  position: this.positioning,
118
- } }, this.visible && (h("span", { key: '82c207a7951483894494abf1d7e46a1a997f1ff8', class: "tooltip__bubble", id: "tooltip", part: "tooltip__bubble", role: "tooltip" }, h("span", { key: '178678dc65ebe2d4232437b7f12564444c687510', class: "tooltip__content", innerHTML: this.content }))), h("span", { key: '0f97538a405da7b5fdf1b39cee2a7a4db82ece2f', class: "tooltip__arrow", ref: (el) => (this.arrowElement = el), style: {
144
+ } }, this.visible && (h("span", { key: '41fb5ef06491bfaf355d3fd5a98e00a92cd75a92', class: "tooltip__bubble", id: "tooltip", part: "tooltip__bubble", role: "tooltip" }, h("span", { key: 'a6a22b0bc86e87f2c7728fc3888ef109a8b9be8c', class: "tooltip__content", innerHTML: this.content }))), h("span", { key: 'b036d30ba31fbf5b4c8519b229aed70f20509874', class: "tooltip__arrow", ref: (el) => (this.arrowElement = el), style: {
119
145
  ...this.arrowStyles,
120
146
  visibility: this.visible ? "visible" : "hidden",
121
147
  } })))));
@@ -244,6 +270,26 @@ export class SwirlTooltip {
244
270
  "setter": false,
245
271
  "reflect": false,
246
272
  "defaultValue": "\"absolute\""
273
+ },
274
+ "isPromo": {
275
+ "type": "boolean",
276
+ "attribute": "is-promo",
277
+ "mutable": false,
278
+ "complexType": {
279
+ "original": "boolean",
280
+ "resolved": "boolean",
281
+ "references": {}
282
+ },
283
+ "required": false,
284
+ "optional": false,
285
+ "docs": {
286
+ "tags": [],
287
+ "text": "If set to true, tooltip will be initially visible.\nIt will only be dismissible via a click and will not reappear.\nTooltip will have a blue background color."
288
+ },
289
+ "getter": false,
290
+ "setter": false,
291
+ "reflect": false,
292
+ "defaultValue": "false"
247
293
  }
248
294
  };
249
295
  }
@@ -251,7 +297,8 @@ export class SwirlTooltip {
251
297
  return {
252
298
  "actualPosition": {},
253
299
  "arrowStyles": {},
254
- "visible": {}
300
+ "visible": {},
301
+ "isPromoShown": {}
255
302
  };
256
303
  }
257
304
  static get elementRef() { return "el"; }
@@ -240,3 +240,8 @@ export function isDocumentMimeType(mimeType) {
240
240
  mimeType.startsWith("application/vnd.openxmlformats-officedocument.wordprocessingml.document") ||
241
241
  mimeType.startsWith("application/vnd.apple.pages"));
242
242
  }
243
+ export function getPixelsFromRemToken(token) {
244
+ return (+getComputedStyle(document.documentElement)
245
+ .getPropertyValue(token)
246
+ .replace("rem", "") * 16);
247
+ }