@florid-kit/components 0.3.22 → 0.3.24

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 +2 -2
package/index.js CHANGED
@@ -277,7 +277,7 @@
277
277
  }
278
278
 
279
279
  }
280
- `;C([l({type:String,reflect:!0})],m.prototype,"bgstyle",2);C([l({type:String,reflect:!0})],m.prototype,"size",2);C([l({type:String,reflect:!0})],m.prototype,"status",2);C([l({type:String,reflect:!0})],m.prototype,"type",2);C([l({type:String})],m.prototype,"strokewidth",2);C([l({type:String})],m.prototype,"icon",2);C([l({type:Boolean,reflect:!0})],m.prototype,"disabled",2);m=C([U("o-icon-button")],m);var be=Object.defineProperty,ye=Object.getOwnPropertyDescriptor,v=(o,t,e,s)=>{for(var n=s>1?void 0:s?ye(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&be(t,e,n),n};const $e=Jt($);let u=class extends $e{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.text="",this.textsecond="",this.fullwidth=!1,this.disabled=!1,this.iconstrokewidth="1",this.icon="",this.startIcon=!1,this.endIcon=!1,this.iconSize="small",this.panelTarget="",this.href="",this.target=""}get name(){return this.getAttribute("name")??""}set name(o){this.setAttribute("name",o)}get form(){return this[dt].form}handleClick(){if(this.panelTarget){const o=document.getElementById(this.panelTarget);o!=null&&o.openPanel&&typeof o.openPanel=="function"?o.openPanel():console.warn(`[o-button] No side panel with id="${this.panelTarget}" found or it does not have an openPanel method.`)}}render(){return this.href?this.renderLink():this.renderButton()}renderIcon(o){return this.icon?d`<o-icon-button
280
+ `;C([l({type:String,reflect:!0})],m.prototype,"bgstyle",2);C([l({type:String,reflect:!0})],m.prototype,"size",2);C([l({type:String,reflect:!0})],m.prototype,"status",2);C([l({type:String,reflect:!0})],m.prototype,"type",2);C([l({type:String})],m.prototype,"strokewidth",2);C([l({type:String})],m.prototype,"icon",2);C([l({type:Boolean,reflect:!0})],m.prototype,"disabled",2);m=C([U("o-icon-button")],m);var be=Object.defineProperty,ye=Object.getOwnPropertyDescriptor,v=(o,t,e,s)=>{for(var n=s>1?void 0:s?ye(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&be(t,e,n),n};const $e=Jt($);let u=class extends $e{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.text="",this.textsecond="",this.fullwidth=!1,this.disabled=!1,this.iconstrokewidth="1",this.icon="",this.startIcon=!1,this.endIcon=!1,this.iconSize="small",this.panelTarget="",this.href="",this.target=""}get name(){return this.getAttribute("name")??""}set name(o){this.setAttribute("name",o)}get form(){return this[dt].form}handleClick(){if(console.log(`[o-button] Click event triggered trying to open ${this.panelTarget} panel.`),this.panelTarget){const o=document.getElementById(this.panelTarget);o!=null&&o.openPanel&&typeof o.openPanel=="function"?o.openPanel():console.warn(`[o-button] No side panel with id="${this.panelTarget}" found or it does not have an openPanel method.`)}}render(){return this.href?this.renderLink():this.renderButton()}renderIcon(o){return this.icon?d`<o-icon-button
281
281
  class=${o==="start"?"icon-start":"icon-end"}
282
282
  icon=${this.icon}
283
283
  bgstyle="${this.variant==="primary"?"none-light":"none-contrast"}"
@@ -438,7 +438,7 @@
438
438
  display: inline-flex;
439
439
  align-items: center;
440
440
  }
441
- `;v([l()],u.prototype,"type",2);v([l({reflect:!0})],u.prototype,"value",2);v([l({type:String,reflect:!0})],u.prototype,"variant",2);v([l({type:String})],u.prototype,"text",2);v([l({type:String})],u.prototype,"textsecond",2);v([l({type:Boolean,reflect:!0})],u.prototype,"fullwidth",2);v([l({type:Boolean,reflect:!0})],u.prototype,"disabled",2);v([l({type:String,attribute:"iconstrokewidth"})],u.prototype,"iconstrokewidth",2);v([l({type:String})],u.prototype,"icon",2);v([l({type:Boolean,reflect:!0,attribute:"starticon"})],u.prototype,"startIcon",2);v([l({type:Boolean,reflect:!0,attribute:"endicon"})],u.prototype,"endIcon",2);v([l({type:String,reflect:!0,attribute:"iconsize"})],u.prototype,"iconSize",2);v([l({type:String,attribute:"paneltarget"})],u.prototype,"panelTarget",2);v([l({type:String})],u.prototype,"href",2);v([l({type:String})],u.prototype,"target",2);u=v([U("o-button")],u);var me=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Q=(o,t,e,s)=>{for(var n=s>1?void 0:s?we(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&me(t,e,n),n};let T=class extends ${constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist",this.toggleStatus=()=>{this.status=this.status==="empty"?"filled":"empty",this.setAttribute("aria-pressed",String(this.status==="filled")),this.dispatchEvent(new CustomEvent("wishlist-toggle",{detail:{status:this.status},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-pressed",String(this.status==="filled"))}firstUpdated(){this.addEventListener("click",this.toggleStatus),this.addEventListener("keydown",this.handleKeydown)}handleKeydown(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.toggleStatus())}render(){const o=pt.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return d`
441
+ `;v([l()],u.prototype,"type",2);v([l({reflect:!0})],u.prototype,"value",2);v([l({type:String,reflect:!0})],u.prototype,"variant",2);v([l({type:String})],u.prototype,"text",2);v([l({type:String})],u.prototype,"textsecond",2);v([l({type:Boolean,reflect:!0})],u.prototype,"fullwidth",2);v([l({type:Boolean,reflect:!0})],u.prototype,"disabled",2);v([l({type:String,attribute:"iconstrokewidth"})],u.prototype,"iconstrokewidth",2);v([l({type:String})],u.prototype,"icon",2);v([l({type:Boolean,reflect:!0,attribute:"starticon"})],u.prototype,"startIcon",2);v([l({type:Boolean,reflect:!0,attribute:"endicon"})],u.prototype,"endIcon",2);v([l({type:String,reflect:!0,attribute:"iconsize"})],u.prototype,"iconSize",2);v([l({type:String,attribute:"paneltarget",reflect:!0})],u.prototype,"panelTarget",2);v([l({type:String})],u.prototype,"href",2);v([l({type:String})],u.prototype,"target",2);u=v([U("o-button")],u);var me=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Q=(o,t,e,s)=>{for(var n=s>1?void 0:s?we(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&me(t,e,n),n};let T=class extends ${constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist",this.toggleStatus=()=>{this.status=this.status==="empty"?"filled":"empty",this.setAttribute("aria-pressed",String(this.status==="filled")),this.dispatchEvent(new CustomEvent("wishlist-toggle",{detail:{status:this.status},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-pressed",String(this.status==="filled"))}firstUpdated(){this.addEventListener("click",this.toggleStatus),this.addEventListener("keydown",this.handleKeydown)}handleKeydown(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.toggleStatus())}render(){const o=pt.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return d`
442
442
  <button
443
443
  type="button"
444
444
  aria-describedby="${this.ariaDescribedBy}"
package/index.mjs CHANGED
@@ -1003,7 +1003,7 @@ let u = class extends $e {
1003
1003
  return this[dt].form;
1004
1004
  }
1005
1005
  handleClick() {
1006
- if (this.panelTarget) {
1006
+ if (console.log(`[o-button] Click event triggered trying to open ${this.panelTarget} panel.`), this.panelTarget) {
1007
1007
  const o = document.getElementById(this.panelTarget);
1008
1008
  o != null && o.openPanel && typeof o.openPanel == "function" ? o.openPanel() : console.warn(`[o-button] No side panel with id="${this.panelTarget}" found or it does not have an openPanel method.`);
1009
1009
  }
@@ -1224,7 +1224,7 @@ v([
1224
1224
  l({ type: String, reflect: !0, attribute: "iconsize" })
1225
1225
  ], u.prototype, "iconSize", 2);
1226
1226
  v([
1227
- l({ type: String, attribute: "paneltarget" })
1227
+ l({ type: String, attribute: "paneltarget", reflect: !0 })
1228
1228
  ], u.prototype, "panelTarget", 2);
1229
1229
  v([
1230
1230
  l({ type: String })
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "0.3.22",
3
+ "version": "0.3.24",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",
7
7
  "description": "This library was generated with [Nx](https://nx.dev).",
8
8
  "dependencies": {
9
- "@florid-kit/tokens": "^0.1.4"
9
+ "@florid-kit/tokens": "^0.1.5"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@storybook/addon-a11y": "8.6.14",