@kumori/aurora-wui-components 0.0.267-dev4119.0 → 0.0.267-dev4119.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.
@@ -31,6 +31,8 @@ export declare class AxebowButton extends LitElement {
31
31
  private _syncPaddingVar;
32
32
  private _guardDisabledClick;
33
33
  static styles: import('lit').CSSResult[];
34
+ private _handlePrefixChange;
35
+ private _handleSuffixChange;
34
36
  render(): import('lit-html').TemplateResult<1>;
35
37
  }
36
38
  //# sourceMappingURL=axebow-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"axebow-button.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-button/axebow-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAkB,MAAM,KAAK,CAAC;AAIvD,OAAO,2DAA2D,CAAC;AAEnE,qBACa,YAAa,SAAQ,UAAU;IACC,OAAO,EAC9C,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,GACR,MAAM,CAAa;IAEoB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAY;IAC7C,OAAO,UAAS;IAChB,IAAI,UAAS;IACb,MAAM,UAAS;IACZ,QAAQ,UAAS;IACpB,OAAO,UAAS;IAChB,KAAK,UAAS;IAC9B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAY;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,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,CAAC,MAAM,EAAE,OAAO,CAAC;IAerC,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,mBAAmB,CAKzB;IAEF,MAAM,CAAC,MAAM,4BA0KX;IAEF,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,mBAAmB;IAY3B,MAAM;CAyBP"}
package/dist/index.js CHANGED
@@ -542,15 +542,27 @@ var AxebowButton = class AxebowButton extends LitElement {
542
542
  display: none !important;
543
543
  }
544
544
 
545
- :host(:has([slot='prefix'])) sl-button::part(prefix) {
545
+ :host([has-prefix]) sl-button::part(prefix) {
546
546
  display: flex !important;
547
547
  }
548
548
 
549
- :host(:has([slot='suffix'])) sl-button::part(suffix) {
549
+ :host([has-suffix]) sl-button::part(suffix) {
550
550
  display: flex !important;
551
551
  }
552
552
  `];
553
553
  }
554
+ _handlePrefixChange(e) {
555
+ if (e.target.assignedNodes().some((node) => {
556
+ return node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.TEXT_NODE && node.textContent?.trim() !== "";
557
+ })) this.setAttribute("has-prefix", "");
558
+ else this.removeAttribute("has-prefix");
559
+ }
560
+ _handleSuffixChange(e) {
561
+ if (e.target.assignedNodes().some((node) => {
562
+ return node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.TEXT_NODE && node.textContent?.trim() !== "";
563
+ })) this.setAttribute("has-suffix", "");
564
+ else this.removeAttribute("has-suffix");
565
+ }
554
566
  render() {
555
567
  return html`
556
568
  <sl-button
@@ -570,9 +582,9 @@ var AxebowButton = class AxebowButton extends LitElement {
570
582
  name=${ifDefined(this.name)}
571
583
  value=${ifDefined(this.value)}
572
584
  >
573
- <slot name="prefix" slot="prefix"></slot>
585
+ <slot name="prefix" slot="prefix" @slotchange=${this._handlePrefixChange}></slot>
574
586
  <slot></slot>
575
- <slot name="suffix" slot="suffix"></slot>
587
+ <slot name="suffix" slot="suffix" @slotchange=${this._handleSuffixChange}></slot>
576
588
  </sl-button>
577
589
  `;
578
590
  }