@florid-kit/components 0.10.16 → 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 +4 -3
  2. package/index.mjs +4 -3
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1994,12 +1994,13 @@
1994
1994
  overflow: hidden;
1995
1995
  }
1996
1996
  `;oe([a({type:Object,reflect:!0})],kt.prototype,"option",2);oe([a({type:Number,reflect:!0})],kt.prototype,"imageSize",2);kt=oe([g("o-reassurance")],kt);var fi=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,X=(o,t,e,n)=>{for(var i=n>1?void 0:n?vi(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&&fi(t,e,i),i};const gi=Xt(p);let O=class extends gi{constructor(){super(...arguments),this.link="",this.name="",this.value="",this.text="",this.size="standard",this.selected=!1,this.fullwidth=!1,this.inactive=!1}handleClick(o){this.selected||(this.selected=!0);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}render(){const o=this.text;return this.link?l`
1997
- <a href="${this.link}" class="o-chip" tabindex="${this.inactive?"-1":"0"}" aria-hidden="${this.inactive?"true":"false"}">
1997
+ <a href="${this.link}" class="o-chip" tabindex="${this.inactive?"-1":"0"}"
1998
+ aria-hidden="${this.inactive?"true":"false"}" aria-current="${this.selected?"true":d}">
1998
1999
  ${o?this.text:l`<slot></slot>`}
1999
2000
  </a>
2000
2001
  `:l`
2001
2002
  <button type="button" class="button" @click=${this.handleClick}
2002
- aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
2003
+ aria-label=${this.ariaLabel||d} aria-pressed=${this.selected}>
2003
2004
  ${o?this.text:l`<slot></slot>`}
2004
2005
  </button>
2005
2006
  `}};O.styles=f`
@@ -2106,7 +2107,7 @@
2106
2107
  }
2107
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`
2108
2109
  <a role="button" tabindex="0" class="button" href=${this.href} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
2109
- aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
2110
+ aria-label=${this.ariaLabel||d} aria-pressed=${this.selected}>
2110
2111
  ${o?l`
2111
2112
  ${this.text?l`<span class="text">${this.text}</span>`:d}
2112
2113
  `:l`
package/index.mjs CHANGED
@@ -3858,12 +3858,13 @@ let O = class extends gi {
3858
3858
  render() {
3859
3859
  const o = this.text;
3860
3860
  return this.link ? l`
3861
- <a href="${this.link}" class="o-chip" tabindex="${this.inactive ? "-1" : "0"}" aria-hidden="${this.inactive ? "true" : "false"}">
3861
+ <a href="${this.link}" class="o-chip" tabindex="${this.inactive ? "-1" : "0"}"
3862
+ aria-hidden="${this.inactive ? "true" : "false"}" aria-current="${this.selected ? "true" : d}">
3862
3863
  ${o ? this.text : l`<slot></slot>`}
3863
3864
  </a>
3864
3865
  ` : l`
3865
3866
  <button type="button" class="button" @click=${this.handleClick}
3866
- aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
3867
+ aria-label=${this.ariaLabel || d} aria-pressed=${this.selected}>
3867
3868
  ${o ? this.text : l`<slot></slot>`}
3868
3869
  </button>
3869
3870
  `;
@@ -4063,7 +4064,7 @@ let I = class extends wi {
4063
4064
  const o = this.text;
4064
4065
  return l`${this.type === "link" ? l`
4065
4066
  <a role="button" tabindex="0" class="button" href=${this.href} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
4066
- aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
4067
+ aria-label=${this.ariaLabel || d} aria-pressed=${this.selected}>
4067
4068
  ${o ? l`
4068
4069
  ${this.text ? l`<span class="text">${this.text}</span>` : d}
4069
4070
  ` : l`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "0.10.16",
3
+ "version": "0.10.18",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",