@florid-kit/components 0.10.24 → 0.10.26

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 +14 -10
  2. package/index.mjs +14 -10
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -185,6 +185,7 @@
185
185
  <button
186
186
  type="button"
187
187
  aria-label=${P(i)}
188
+ aria-describedby=${this.getAttribute("aria-describedby")||d}
188
189
  class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
189
190
  ?disabled="${this.disabled}"
190
191
  >
@@ -396,14 +397,15 @@
396
397
  ${this.addToBagProductCount?l`<span class="a-quantity">${this.addToBagProductCount}</span>`:null}
397
398
  </div>
398
399
  <o-icon-button
399
- icon="cross"
400
- size="small"
401
- class="close-btn"
402
- bgstyle="background-light"
403
- @click=${this.handleClosePanel}
404
- @keydown=${this.handleClosePanel}
405
- srlabel="${this.closeButtonLabel}"
406
- ?showsrlabel=${!0}
400
+ icon="cross"
401
+ size="small"
402
+ class="close-btn"
403
+ bgstyle="background-light"
404
+ @click=${this.handleClosePanel}
405
+ @keydown=${this.handleClosePanel}
406
+ srlabel="${this.closeButtonLabel}"
407
+ ?showsrlabel=${!0}
408
+ aria-describedby="panel-title"
407
409
  ></o-icon-button>
408
410
  </div>
409
411
  `:null;return l`
@@ -696,7 +698,8 @@
696
698
  box-sizing: border-box;
697
699
  }
698
700
  `;p.focusablesSelector='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';p.focusablesCustomElementsSelector="o-icon-button, o-button";p.shadowRootOptions={...u.shadowRootOptions,delegatesFocus:!0};y([a({type:Boolean,reflect:!0})],p.prototype,"open",2);y([a({type:Boolean,reflect:!0})],p.prototype,"showHeader",2);y([a({type:Boolean,reflect:!0})],p.prototype,"showFooter",2);y([a({type:Boolean,reflect:!0})],p.prototype,"showHeaderStartIcon",2);y([a({type:String,reflect:!0})],p.prototype,"headerTitle",2);y([a({type:String,reflect:!0})],p.prototype,"headerTitleClassName",2);y([a({type:String,reflect:!0})],p.prototype,"labelDialog",2);y([a({type:String,reflect:!0})],p.prototype,"addToBagProductCount",2);y([a({type:String,reflect:!0})],p.prototype,"closeButtonLabel",2);y([a({type:String,reflect:!0})],p.prototype,"goBackButtonLabel",2);y([a({type:String,reflect:!0})],p.prototype,"firstButtonLabel",2);y([a({type:String,reflect:!0})],p.prototype,"firstButtonVariant",2);y([a({type:Object,reflect:!0})],p.prototype,"firstButtonProps",2);y([a({type:Boolean,reflect:!0})],p.prototype,"onFirstButtonClickClose",2);y([a({type:String,reflect:!0})],p.prototype,"secondButtonLabel",2);y([a({type:String,reflect:!0})],p.prototype,"secondButtonVariant",2);y([a({type:Object,reflect:!0})],p.prototype,"secondButtonProps",2);y([a({type:Boolean,reflect:!0})],p.prototype,"onSecondButtonClickClose",2);y([a({type:Boolean,reflect:!0})],p.prototype,"disablePortal",2);y([a({type:Number,reflect:!0})],p.prototype,"zIndex",2);y([a({type:Boolean,reflect:!0})],p.prototype,"initialized",2);y([a({type:Boolean})],p.prototype,"showDetail",2);y([a({type:Boolean})],p.prototype,"isHidingDetail",2);p=y([b("o-side-panel")],p);var No=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,_=(o,t,e,n)=>{for(var i=n>1?void 0:n?qo(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&&No(t,e,i),i};const Vo=Xt(u);let m=class extends Vo{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.text="",this.textsecond="",this.fullwidth=!1,this.disabled=!1,this.startIconModel="",this.endIconModel="",this.startIcon=!1,this.endIcon=!1,this.panelTarget="",this.href="",this.target="",this.underlined=!1,this.withbadge=!1}get name(){return this.getAttribute("name")??""}set name(o){this.setAttribute("name",o)}get form(){return this[Gt].form}handleClick(o){if(!(o instanceof KeyboardEvent&&!["Enter"," "].includes(o.key))&&this.panelTarget){const t=document.getElementById(this.panelTarget);t instanceof p&&(t!=null&&t.openPanel)&&typeof t.openPanel=="function"?(o.preventDefault(),t.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){const t=o==="start"?this.startIconModel:this.endIconModel;if(!t)return d;const e=Z[t].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`<span class="${o==="start"?"icon-start":"icon-end"}">${S(e)}</span>`}renderButton(){const o=this.text||this.textsecond;return l`
699
- <button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}>
701
+ <button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
702
+ aria-describedby=${this.getAttribute("aria-describedby")||d} >
700
703
  ${this.startIcon?this.renderIcon("start"):d}
701
704
  ${o?l`
702
705
  ${this.text?l`<span class="text">${this.text}</span>`:d}
@@ -1298,6 +1301,7 @@
1298
1301
  .tag.background-emphasis {
1299
1302
  background-color: var(--color-container-bg-emphasis);
1300
1303
  color: var(--color-content-body);
1304
+
1301
1305
  }
1302
1306
 
1303
1307
  .tag.background-white {
@@ -2347,7 +2351,7 @@
2347
2351
  overflow: hidden;
2348
2352
  text-overflow: ellipsis;
2349
2353
  display: -webkit-box;
2350
- -webkit-line-clamp: 2;
2354
+ -webkit-line-clamp: 1;
2351
2355
  -webkit-box-orient: vertical;
2352
2356
  }
2353
2357
 
package/index.mjs CHANGED
@@ -1080,6 +1080,7 @@ let B = class extends u {
1080
1080
  <button
1081
1081
  type="button"
1082
1082
  aria-label=${P(i)}
1083
+ aria-describedby=${this.getAttribute("aria-describedby") || d}
1083
1084
  class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
1084
1085
  ?disabled="${this.disabled}"
1085
1086
  >
@@ -1529,14 +1530,15 @@ let p = class extends u {
1529
1530
  ${this.addToBagProductCount ? l`<span class="a-quantity">${this.addToBagProductCount}</span>` : null}
1530
1531
  </div>
1531
1532
  <o-icon-button
1532
- icon="cross"
1533
- size="small"
1534
- class="close-btn"
1535
- bgstyle="background-light"
1536
- @click=${this.handleClosePanel}
1537
- @keydown=${this.handleClosePanel}
1538
- srlabel="${this.closeButtonLabel}"
1539
- ?showsrlabel=${!0}
1533
+ icon="cross"
1534
+ size="small"
1535
+ class="close-btn"
1536
+ bgstyle="background-light"
1537
+ @click=${this.handleClosePanel}
1538
+ @keydown=${this.handleClosePanel}
1539
+ srlabel="${this.closeButtonLabel}"
1540
+ ?showsrlabel=${!0}
1541
+ aria-describedby="panel-title"
1540
1542
  ></o-icon-button>
1541
1543
  </div>
1542
1544
  ` : null;
@@ -1952,7 +1954,8 @@ let m = class extends Vo {
1952
1954
  renderButton() {
1953
1955
  const o = this.text || this.textsecond;
1954
1956
  return l`
1955
- <button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}>
1957
+ <button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
1958
+ aria-describedby=${this.getAttribute("aria-describedby") || d} >
1956
1959
  ${this.startIcon ? this.renderIcon("start") : d}
1957
1960
  ${o ? l`
1958
1961
  ${this.text ? l`<span class="text">${this.text}</span>` : d}
@@ -2851,6 +2854,7 @@ wt.styles = v`
2851
2854
  .tag.background-emphasis {
2852
2855
  background-color: var(--color-container-bg-emphasis);
2853
2856
  color: var(--color-content-body);
2857
+
2854
2858
  }
2855
2859
 
2856
2860
  .tag.background-white {
@@ -4396,7 +4400,7 @@ se.styles = v`
4396
4400
  overflow: hidden;
4397
4401
  text-overflow: ellipsis;
4398
4402
  display: -webkit-box;
4399
- -webkit-line-clamp: 2;
4403
+ -webkit-line-clamp: 1;
4400
4404
  -webkit-box-orient: vertical;
4401
4405
  }
4402
4406
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "0.10.24",
3
+ "version": "0.10.26",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",