@warp-ds/elements 1.3.2-next.1 → 1.3.3-next.1

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.
@@ -2266,12 +2266,8 @@ var WarpAttention = class extends kebabCaseAttributes(WarpElement) {
2266
2266
  connectedCallback() {
2267
2267
  super.connectedCallback();
2268
2268
  if (!this.placement || !Object.keys(opposites).includes(this.placement)) {
2269
- throw new Error(
2270
- `Invalid "placement" attribute. Set its value to one of the following:
2271
- ${JSON.stringify(
2272
- Object.keys(opposites)
2273
- )}`
2274
- );
2269
+ throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
2270
+ ${JSON.stringify(Object.keys(opposites))}`);
2275
2271
  }
2276
2272
  setTimeout(() => this.requestUpdate(), 0);
2277
2273
  }
@@ -2286,16 +2282,10 @@ ${JSON.stringify(
2286
2282
  }
2287
2283
  updated() {
2288
2284
  if (!this.callout) {
2289
- this._attentionEl.style.setProperty(
2290
- "--attention-visibility",
2291
- this.show ? "" : "hidden"
2292
- );
2285
+ this._attentionEl.style.setProperty("--attention-visibility", this.show ? "" : "hidden");
2293
2286
  }
2294
2287
  if (!this.tooltip) {
2295
- this._attentionEl.style.setProperty(
2296
- "--attention-display",
2297
- this.show ? "flex" : "none"
2298
- );
2288
+ this._attentionEl.style.setProperty("--attention-display", this.show ? "flex" : "none");
2299
2289
  }
2300
2290
  this.attentionState = {
2301
2291
  isShowing: this.show,
@@ -2453,12 +2443,7 @@ ${JSON.stringify(
2453
2443
  }
2454
2444
  get _closeBtnHtml() {
2455
2445
  return html2`
2456
- <button
2457
- aria-label="${this._ariaClose}"
2458
- @click="${this.close}"
2459
- @keydown=${this.keypressed}
2460
- class="${attention.closeBtn}"
2461
- >
2446
+ <button aria-label="${this._ariaClose}" @click="${this.close}" @keydown=${this.keypressed} class="${attention.closeBtn}">
2462
2447
  <w-icon-close-16 />
2463
2448
  </button>
2464
2449
  `;
@@ -2469,12 +2454,7 @@ ${JSON.stringify(
2469
2454
  ${this.placement === "right" || this.placement === "bottom" ? html2`
2470
2455
  <slot name="target"></slot>
2471
2456
 
2472
- <div
2473
- id="attention"
2474
- role="${this.tooltip ? "tooltip" : "img"}"
2475
- aria-label="${this.defaultAriaLabel()}"
2476
- class="${this._wrapperClasses}"
2477
- >
2457
+ <div id="attention" role="${this.tooltip ? "tooltip" : "img"}" aria-label="${this.defaultAriaLabel()}" class="${this._wrapperClasses}">
2478
2458
  ${this._arrowHtml}
2479
2459
  <slot name="message"></slot>
2480
2460
  ${this.canClose ? this._closeBtnHtml : nothing}
@@ -2482,8 +2462,7 @@ ${JSON.stringify(
2482
2462
  ` : html2`
2483
2463
  <div id="attention" class="${this._wrapperClasses}">
2484
2464
  <slot name="message"></slot>
2485
- ${this._arrowHtml}
2486
- ${this.canClose ? this._closeBtnHtml : nothing}
2465
+ ${this._arrowHtml} ${this.canClose ? this._closeBtnHtml : nothing}
2487
2466
  </div>
2488
2467
  <slot name="target"></slot>
2489
2468
  `}