@cal.macconnachie/web-components 2.1.3 → 2.1.5

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/index.d.ts CHANGED
@@ -433,7 +433,7 @@ export declare class BaseToast extends BaseElement {
433
433
  private pauseTimer;
434
434
  private resumeTimer;
435
435
  show(): void;
436
- remove(): void;
436
+ hide(): void;
437
437
  static styles: CSSResult;
438
438
  render(): TemplateResult<1>;
439
439
  }
package/dist/index.js CHANGED
@@ -6708,6 +6708,15 @@ class oe extends I {
6708
6708
  transition: none !important;
6709
6709
  }
6710
6710
  }
6711
+ .rotate-90 {
6712
+ transform: rotate(90deg);
6713
+ transition: transform 0.2s ease-in-out;
6714
+ }
6715
+
6716
+ .rotate-270 {
6717
+ transform: rotate(270deg);
6718
+ transition: transform 0.2s ease-in-out;
6719
+ }
6711
6720
  `;
6712
6721
  }
6713
6722
  connectedCallback() {
@@ -6861,11 +6870,11 @@ class oe extends I {
6861
6870
  @click=${this.toggleSidebar}
6862
6871
  aria-label="Toggle sidebar"
6863
6872
  >
6864
- ${t ? m`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
6865
- <path d="M11 19l-7-7 7-7" />
6866
- </svg>` : m`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
6867
- <path d="M9 5l7 7-7 7" />
6868
- </svg>`}
6873
+ <base-icon
6874
+ name="arrow"
6875
+ class="${t ? "rotate-270" : "rotate-90"}"
6876
+ size="28px"
6877
+ ></base-icon>
6869
6878
  </button>
6870
6879
 
6871
6880
  <!-- Tabs Navigation -->
@@ -7250,7 +7259,7 @@ class Te extends I {
7250
7259
  o === "s" ? s = t * 1e3 : o === "ms" && (s = t);
7251
7260
  const i = s - e;
7252
7261
  this.timerStarted = Date.now(), this.toastTimout = setTimeout(() => {
7253
- this.remove();
7262
+ this.hide();
7254
7263
  }, i), this.style.animationPlayState = "running";
7255
7264
  const a = this.shadowRoot?.querySelector(".toast-container");
7256
7265
  a && (a.style.animationPlayState = "running");
@@ -7262,7 +7271,7 @@ class Te extends I {
7262
7271
  const e = parseInt(this.dismiss), t = this.dismiss.replace(e.toString(), "");
7263
7272
  let o = 0;
7264
7273
  this.addEventListener("mouseenter", this.pauseTimer.bind(this)), this.addEventListener("mouseleave", this.resumeTimer.bind(this)), t === "s" ? o = e * 1e3 : t === "ms" && (o = e), this.style.setProperty("--toast-duration", `${o}ms`), this.toastTimout = setTimeout(() => {
7265
- this.remove();
7274
+ this.hide();
7266
7275
  }, o);
7267
7276
  }
7268
7277
  this.dispatchEvent(
@@ -7273,7 +7282,7 @@ class Te extends I {
7273
7282
  })
7274
7283
  );
7275
7284
  }
7276
- remove() {
7285
+ hide() {
7277
7286
  this.classList.remove("show"), this.classList.add("hide"), this.toastTimout && clearTimeout(this.toastTimout), this.removeEventListener("mouseenter", this.pauseTimer.bind(this)), this.removeEventListener("mouseleave", this.resumeTimer.bind(this)), this.dispatchEvent(
7278
7287
  new CustomEvent("toast-hidden", {
7279
7288
  detail: { toast: this },
@@ -7645,7 +7654,7 @@ class Te extends I {
7645
7654
  <button
7646
7655
  class="toast-dismiss-btn ${this.variant}"
7647
7656
  aria-label="Dismiss toast"
7648
- @click=${() => this.remove()}
7657
+ @click=${() => this.hide()}
7649
7658
  >
7650
7659
  &times;
7651
7660
  </button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cal.macconnachie/web-components",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "Web components hosted on a CDN",
5
5
  "keywords": [
6
6
  "web-components",