@getflip/swirl-components 0.84.0 → 0.85.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/components.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-08-14T11:23:35",
2
+ "timestamp": "2023-08-15T07:15:59",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "3.3.1",
@@ -24944,7 +24944,17 @@
24944
24944
  }
24945
24945
  ],
24946
24946
  "methods": [],
24947
- "events": [],
24947
+ "events": [
24948
+ {
24949
+ "event": "remove",
24950
+ "detail": "MouseEvent",
24951
+ "bubbles": true,
24952
+ "cancelable": true,
24953
+ "composed": true,
24954
+ "docs": "",
24955
+ "docsTags": []
24956
+ }
24957
+ ],
24948
24958
  "listeners": [],
24949
24959
  "styles": [],
24950
24960
  "slots": [],
@@ -55,6 +55,7 @@ const swirlThumbnailCss = ":host{display:inline-flex}:host *{box-sizing:border-b
55
55
  const SwirlThumbnail = class {
56
56
  constructor(hostRef) {
57
57
  index.registerInstance(this, hostRef);
58
+ this.remove = index.createEvent(this, "remove", 7);
58
59
  this.alt = undefined;
59
60
  this.format = "landscape";
60
61
  this.progress = undefined;
@@ -71,7 +72,7 @@ const SwirlThumbnail = class {
71
72
  const className = index$1.classnames("thumbnail", `thumbnail--format-${this.format}`, `thumbnail--size-${this.size}`, {
72
73
  "thumbnail--has-progress": this.progress !== undefined,
73
74
  });
74
- return (index.h(index.Host, null, index.h("span", { class: className, role: "group" }, index.h("img", { alt: this.alt, class: "thumbnail__image", loading: "lazy", src: this.src }), this.progress !== undefined && (index.h("span", { class: "thumbnail__progress-indicator" }, index.h("swirl-progress-indicator", { label: this.progressLabel, value: this.progress }))), showRemoveButton && (index.h("span", { class: "thumbnail__remove-button" }, index.h("swirl-button", { hideLabel: true, icon: "<swirl-icon-close></swirl-icon-close>", label: this.removeButtonLabel, pill: true, variant: "on-image" }))), showTimestamp && (index.h("span", { class: "thumbnail__timestamp" }, this.timestamp)))));
75
+ return (index.h(index.Host, null, index.h("span", { class: className, role: "group" }, index.h("img", { alt: this.alt, class: "thumbnail__image", loading: "lazy", src: this.src }), this.progress !== undefined && (index.h("span", { class: "thumbnail__progress-indicator" }, index.h("swirl-progress-indicator", { label: this.progressLabel, value: this.progress }))), showRemoveButton && (index.h("span", { class: "thumbnail__remove-button" }, index.h("swirl-button", { hideLabel: true, icon: "<swirl-icon-close></swirl-icon-close>", label: this.removeButtonLabel, onClick: this.remove.emit, pill: true, variant: "on-image" }))), showTimestamp && (index.h("span", { class: "thumbnail__timestamp" }, this.timestamp)))));
75
76
  }
76
77
  };
77
78
  SwirlThumbnail.style = swirlThumbnailCss;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-506fe4ea.js');
6
6
  const floatingUi_dom_esm = require('./floating-ui.dom.esm-39236b6a.js');
7
7
 
8
- const swirlTooltipCss = ":host{display:inline-flex}:host *{box-sizing:border-box}.tooltip{display:inline-flex}.tooltip .tooltip__reference{display:inline-flex}.tooltip__popper{position:fixed;z-index:var(--s-z-40);max-width:17.5rem}.tooltip__bubble{position:relative;display:block;padding-top:var(--s-space-8);padding-right:var(--s-space-12);padding-bottom:var(--s-space-8);padding-left:var(--s-space-12);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);line-height:var(--s-line-height-base);animation:tooltip-fade-in 0.1s}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.tooltip__bubble{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.tooltip__arrow{position:absolute;width:0.5rem;height:0.5rem;background-color:var(--s-surface-neutral-default)}@keyframes tooltip-fade-in{from{opacity:0}to{opacity:1}}";
8
+ const swirlTooltipCss = ":host{display:inline-flex}:host *{box-sizing:border-box}.tooltip{display:inline-flex}.tooltip .tooltip__reference{display:inline-flex}.tooltip__popper{position:fixed;z-index:var(--s-z-40);max-width:17.5rem}.tooltip__bubble{position:relative;display:block;padding-top:var(--s-space-8);padding-right:var(--s-space-12);padding-bottom:var(--s-space-8);padding-left:var(--s-space-12);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);line-height:var(--s-line-height-base);animation:tooltip-fade-in 0.2s;animation-delay:0.1s;animation-fill-mode:forwards;opacity:0}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.tooltip__bubble{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.tooltip__arrow{position:absolute;width:0.5rem;height:0.5rem;background-color:var(--s-surface-neutral-default)}@keyframes tooltip-fade-in{from{opacity:0}to{opacity:1}}";
9
9
 
10
10
  const SwirlTooltip = class {
11
11
  constructor(hostRef) {
@@ -25,6 +25,7 @@ const SwirlTooltip = class {
25
25
  this.visible = true;
26
26
  requestAnimationFrame(() => {
27
27
  this.reposition();
28
+ this.disableAutoUpdate = floatingUi_dom_esm.autoUpdate(this.referenceEl, this.popperEl, this.reposition.bind(this));
28
29
  });
29
30
  };
30
31
  this.showWithDelay = () => {
@@ -42,6 +43,7 @@ const SwirlTooltip = class {
42
43
  this.showTimeout = undefined;
43
44
  }
44
45
  this.visible = false;
46
+ this.disableAutoUpdate?.();
45
47
  };
46
48
  this.updateOptions = () => {
47
49
  const margin = +getComputedStyle(document.documentElement)