@florid-kit/components 0.8.25 → 0.8.27
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/components/filter-chip.d.ts +1 -1
- package/index.js +2 -2
- package/index.mjs +7 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1951,7 +1951,7 @@
|
|
|
1951
1951
|
flex-wrap: wrap;
|
|
1952
1952
|
gap: var(--spacing-s);
|
|
1953
1953
|
}
|
|
1954
|
-
`;Ut([a({reflect:!0})],ct.prototype,"name",2);Ut([a({reflect:!0})],ct.prototype,"value",2);ct=Ut([x("o-chipset")],ct);var No=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,N=(o,t,e,r)=>{for(var i=r>1?void 0:r?Fo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&No(t,e,i),i};const Ro=Bt(u);let L=class extends Ro{constructor(){super(...arguments),this.name="",this.value="",this.
|
|
1954
|
+
`;Ut([a({reflect:!0})],ct.prototype,"name",2);Ut([a({reflect:!0})],ct.prototype,"value",2);ct=Ut([x("o-chipset")],ct);var No=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,N=(o,t,e,r)=>{for(var i=r>1?void 0:r?Fo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&No(t,e,i),i};const Ro=Bt(u);let L=class extends Ro{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=W[this.crossIconName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/stroke=[#"'a-z1-9]*/gi,"");return l`<span class="cross-icon">${E(o)}</span>`}strikeThroughImg(){const o=Je[this.strikethroughImgName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="strikethrough"').replace(/stroke=[#"'a-z1-9]*/gi,"");return E(o)}render(){const o=this.text;return l`${this.type==="link"?l`
|
|
1955
1955
|
<a role="button" tabindex="0" class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
|
|
1956
1956
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
1957
1957
|
${o?l`
|
|
@@ -2092,4 +2092,4 @@
|
|
|
2092
2092
|
stroke-linecap: round;
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
|
-
`;N([a({reflect:!0})],L.prototype,"name",2);N([a({reflect:!0})],L.prototype,"value",2);N([a({reflect:!0})],L.prototype,"
|
|
2095
|
+
`;N([a({reflect:!0})],L.prototype,"name",2);N([a({reflect:!0})],L.prototype,"value",2);N([a({type:String,reflect:!0})],L.prototype,"type",2);N([a({type:String})],L.prototype,"text",2);N([a({type:Boolean,reflect:!0})],L.prototype,"selected",2);N([a({type:Boolean,reflect:!0})],L.prototype,"disabled",2);N([a({type:Boolean,reflect:!0})],L.prototype,"fullwidth",2);L=N([x("o-filter-chip")],L);
|
package/index.mjs
CHANGED
|
@@ -3697,14 +3697,14 @@ var No = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, N = (o, t,
|
|
|
3697
3697
|
const Ro = Bt(u);
|
|
3698
3698
|
let L = class extends Ro {
|
|
3699
3699
|
constructor() {
|
|
3700
|
-
super(...arguments), this.name = "", this.value = "", this.
|
|
3700
|
+
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";
|
|
3701
3701
|
}
|
|
3702
3702
|
handleClick(o) {
|
|
3703
|
-
if (
|
|
3703
|
+
if (o instanceof KeyboardEvent && o.key !== "Enter" && o.key !== " ")
|
|
3704
3704
|
return;
|
|
3705
|
-
|
|
3705
|
+
this.selected = !this.selected;
|
|
3706
3706
|
const t = { selected: this.selected }, e = new CustomEvent("selected", { detail: t, bubbles: !0, composed: !0, cancelable: !0 });
|
|
3707
|
-
this.dispatchEvent(e), this.selected = t.selected;
|
|
3707
|
+
this.dispatchEvent(e), e.defaultPrevented && o.preventDefault(), this.selected = t.selected;
|
|
3708
3708
|
}
|
|
3709
3709
|
crossIcon() {
|
|
3710
3710
|
const o = W[this.crossIconName].replace(
|
|
@@ -3722,7 +3722,7 @@ let L = class extends Ro {
|
|
|
3722
3722
|
}
|
|
3723
3723
|
render() {
|
|
3724
3724
|
const o = this.text;
|
|
3725
|
-
return l`${this.
|
|
3725
|
+
return l`${this.type === "link" ? l`
|
|
3726
3726
|
<a role="button" tabindex="0" class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
|
|
3727
3727
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
3728
3728
|
${o ? l`
|
|
@@ -3874,8 +3874,8 @@ N([
|
|
|
3874
3874
|
a({ reflect: !0 })
|
|
3875
3875
|
], L.prototype, "value", 2);
|
|
3876
3876
|
N([
|
|
3877
|
-
a({ reflect: !0 })
|
|
3878
|
-
], L.prototype, "
|
|
3877
|
+
a({ type: String, reflect: !0 })
|
|
3878
|
+
], L.prototype, "type", 2);
|
|
3879
3879
|
N([
|
|
3880
3880
|
a({ type: String })
|
|
3881
3881
|
], L.prototype, "text", 2);
|