genus-ui 1.34.1 → 1.35.1

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/dist/index.es.js CHANGED
@@ -600,7 +600,7 @@ const Ra = D`
600
600
  color: var(--tab-font-color, #213e70);
601
601
  text-align: center;
602
602
  line-height: 3rem;
603
- width: -webkit-fill-available;
603
+ width: var(--tab-width, -webkit-fill-available);
604
604
  text-transform: capitalize;
605
605
  }
606
606
 
@@ -636,14 +636,14 @@ var Ua = Object.defineProperty, Ya = Object.getOwnPropertyDescriptor, Ke = (i, t
636
636
  };
637
637
  let jt = class extends et {
638
638
  constructor() {
639
- super(...arguments), this._numberOfTabs = 0, this._tabsTemplate = [], this._tabNames = [], this.tabNames = "", this._hideCurrentContent = () => {
639
+ super(...arguments), this._numberOfTabs = 0, this._tabsTemplate = [], this._tabNames = [], this.tabNames = [], this._hideCurrentContent = () => {
640
640
  this._tabContents.forEach((i) => {
641
641
  i.classList.contains("show-content") && i.classList.remove("show-content");
642
642
  });
643
643
  }, this._showContent = (i) => {
644
644
  this._hideCurrentContent(), this._tabContents[i].classList.add("show-content");
645
645
  }, this._generateTabs = () => {
646
- this._tabNames = JSON.parse(this.tabNames);
646
+ this._tabNames = this.tabNames;
647
647
  for (let i = 0; i < this._numberOfTabs; i++)
648
648
  i === 0 ? this._tabsTemplate.push(z`
649
649
  <input class="tab-radio" id=${this._tabNames[i]} type="radio" name="tabGroup" @change=${() => {
@@ -685,7 +685,7 @@ Ke([
685
685
  at()
686
686
  ], jt.prototype, "_tabsTemplate", 2);
687
687
  Ke([
688
- O({ attribute: "tab-names" })
688
+ O({ attribute: "tab-names", type: Array })
689
689
  ], jt.prototype, "tabNames", 2);
690
690
  jt = Ke([
691
691
  it("genus-tab-container")
package/dist/index.umd.js CHANGED
@@ -457,7 +457,7 @@
457
457
  color: var(--tab-font-color, #213e70);
458
458
  text-align: center;
459
459
  line-height: 3rem;
460
- width: -webkit-fill-available;
460
+ width: var(--tab-width, -webkit-fill-available);
461
461
  text-transform: capitalize;
462
462
  }
463
463
 
@@ -485,7 +485,7 @@
485
485
  }
486
486
  `,Oa=x.css`
487
487
  .tab-labels { display: flex; }
488
- `;var Sa=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,le=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ca(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Sa(t,e,n),n};let It=class extends x.LitElement{constructor(){super(...arguments),this._numberOfTabs=0,this._tabsTemplate=[],this._tabNames=[],this.tabNames="",this._hideCurrentContent=()=>{this._tabContents.forEach(i=>{i.classList.contains("show-content")&&i.classList.remove("show-content")})},this._showContent=i=>{this._hideCurrentContent(),this._tabContents[i].classList.add("show-content")},this._generateTabs=()=>{this._tabNames=JSON.parse(this.tabNames);for(let i=0;i<this._numberOfTabs;i++)i===0?this._tabsTemplate.push(x.html`
488
+ `;var Sa=Object.defineProperty,Ca=Object.getOwnPropertyDescriptor,le=(i,t,e,s)=>{for(var n=s>1?void 0:s?Ca(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Sa(t,e,n),n};let It=class extends x.LitElement{constructor(){super(...arguments),this._numberOfTabs=0,this._tabsTemplate=[],this._tabNames=[],this.tabNames=[],this._hideCurrentContent=()=>{this._tabContents.forEach(i=>{i.classList.contains("show-content")&&i.classList.remove("show-content")})},this._showContent=i=>{this._hideCurrentContent(),this._tabContents[i].classList.add("show-content")},this._generateTabs=()=>{this._tabNames=this.tabNames;for(let i=0;i<this._numberOfTabs;i++)i===0?this._tabsTemplate.push(x.html`
489
489
  <input class="tab-radio" id=${this._tabNames[i]} type="radio" name="tabGroup" @change=${()=>{this._showContent(i)}} checked/>
490
490
  <label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i]=this._tabNames[i].replace("-"," ")}</label>
491
491
  `):this._tabsTemplate.push(x.html`
@@ -498,7 +498,7 @@
498
498
  </div>
499
499
  <slot></slot>
500
500
  </div>
501
- `}};It.styles=[Ta,ka,Da,za,La,Oa],le([A.queryAssignedElements()],It.prototype,"_tabContents",2),le([A.state()],It.prototype,"_numberOfTabs",2),le([A.state()],It.prototype,"_tabsTemplate",2),le([A.property({attribute:"tab-names"})],It.prototype,"tabNames",2),It=le([A.customElement("genus-tab-container")],It);var Na=Object.defineProperty,Pa=Object.getOwnPropertyDescriptor,ja=(i,t,e,s)=>{for(var n=s>1?void 0:s?Pa(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Na(t,e,n),n};let zi=class extends x.LitElement{render(){return x.html`<slot></slot>`}};zi=ja([A.customElement("genus-tab-content")],zi);const Ea=Object.freeze(Object.defineProperty({__proto__:null,get GenusTabContainer(){return It},get GenusTabContent(){return zi}},Symbol.toStringTag,{value:"Module"})),vs=x.css`
501
+ `}};It.styles=[Ta,ka,Da,za,La,Oa],le([A.queryAssignedElements()],It.prototype,"_tabContents",2),le([A.state()],It.prototype,"_numberOfTabs",2),le([A.state()],It.prototype,"_tabsTemplate",2),le([A.property({attribute:"tab-names",type:Array})],It.prototype,"tabNames",2),It=le([A.customElement("genus-tab-container")],It);var Na=Object.defineProperty,Pa=Object.getOwnPropertyDescriptor,ja=(i,t,e,s)=>{for(var n=s>1?void 0:s?Pa(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(n=(s?a(t,e,n):a(n))||n);return s&&n&&Na(t,e,n),n};let zi=class extends x.LitElement{render(){return x.html`<slot></slot>`}};zi=ja([A.customElement("genus-tab-content")],zi);const Ea=Object.freeze(Object.defineProperty({__proto__:null,get GenusTabContainer(){return It},get GenusTabContent(){return zi}},Symbol.toStringTag,{value:"Module"})),vs=x.css`
502
502
  ::slotted(.hide-content)
503
503
  {
504
504
  visibility: hidden;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "genus-ui",
3
3
  "private": false,
4
- "version": "1.34.1",
4
+ "version": "1.35.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
@@ -4,7 +4,7 @@ export declare class GenusTabContainer extends LitElement {
4
4
  private _numberOfTabs;
5
5
  private _tabsTemplate;
6
6
  private _tabNames;
7
- tabNames: string;
7
+ tabNames: never[];
8
8
  private _hideCurrentContent;
9
9
  private _showContent;
10
10
  private _generateTabs;