@florid-kit/components 0.10.17 → 0.10.18

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 (3) hide show
  1. package/index.js +2 -2
  2. package/index.mjs +2 -2
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -2000,7 +2000,7 @@
2000
2000
  </a>
2001
2001
  `:l`
2002
2002
  <button type="button" class="button" @click=${this.handleClick}
2003
- aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
2003
+ aria-label=${this.ariaLabel||d} aria-pressed=${this.selected}>
2004
2004
  ${o?this.text:l`<slot></slot>`}
2005
2005
  </button>
2006
2006
  `}};O.styles=f`
@@ -2107,7 +2107,7 @@
2107
2107
  }
2108
2108
  `;ie([a({reflect:!0})],_t.prototype,"name",2);ie([a({reflect:!0})],_t.prototype,"value",2);_t=ie([g("o-chipset")],_t);var mi=Object.defineProperty,xi=Object.getOwnPropertyDescriptor,N=(o,t,e,n)=>{for(var i=n>1?void 0:n?xi(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&mi(t,e,i),i};const wi=Xt(p);let I=class extends wi{constructor(){super(...arguments),this.name="",this.value="",this.type="",this.text="",this.selected=!1,this.disabled=!1,this.fullwidth=!1,this.crossIconName="cross",this.strikethroughImgName="strikeDiagonal"}handleClick(o){if(o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" ")return;this.selected=!this.selected;const t={selected:this.selected},e=new CustomEvent("selected",{detail:t,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e),e.defaultPrevented&&o.preventDefault(),this.selected=t.selected}crossIcon(){const o=Z[this.crossIconName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/stroke=[#"'a-z1-9]*/gi,"");return l`<span class="cross-icon">${S(o)}</span>`}strikeThroughImg(){const o=Ao[this.strikethroughImgName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="strikethrough"').replace(/stroke=[#"'a-z1-9]*/gi,"");return S(o)}render(){const o=this.text;return l`${this.type==="link"?l`
2109
2109
  <a role="button" tabindex="0" class="button" href=${this.href} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
2110
- aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
2110
+ aria-label=${this.ariaLabel||d} aria-pressed=${this.selected}>
2111
2111
  ${o?l`
2112
2112
  ${this.text?l`<span class="text">${this.text}</span>`:d}
2113
2113
  `:l`
package/index.mjs CHANGED
@@ -3864,7 +3864,7 @@ let O = class extends gi {
3864
3864
  </a>
3865
3865
  ` : l`
3866
3866
  <button type="button" class="button" @click=${this.handleClick}
3867
- aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
3867
+ aria-label=${this.ariaLabel || d} aria-pressed=${this.selected}>
3868
3868
  ${o ? this.text : l`<slot></slot>`}
3869
3869
  </button>
3870
3870
  `;
@@ -4064,7 +4064,7 @@ let I = class extends wi {
4064
4064
  const o = this.text;
4065
4065
  return l`${this.type === "link" ? l`
4066
4066
  <a role="button" tabindex="0" class="button" href=${this.href} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
4067
- aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
4067
+ aria-label=${this.ariaLabel || d} aria-pressed=${this.selected}>
4068
4068
  ${o ? l`
4069
4069
  ${this.text ? l`<span class="text">${this.text}</span>` : d}
4070
4070
  ` : l`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "0.10.17",
3
+ "version": "0.10.18",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",