genus-ui 1.34.1 → 1.35.2
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,25 +636,25 @@ 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 =
|
|
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 =
|
|
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=${() => {
|
|
650
650
|
this._showContent(i);
|
|
651
651
|
}} checked/>
|
|
652
|
-
<label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i] = this._tabNames[i].replace(
|
|
652
|
+
<label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i] = this._tabNames[i].replace(/-/g, " ")}</label>
|
|
653
653
|
`) : this._tabsTemplate.push(z`
|
|
654
654
|
<input class="tab-radio" id=${this._tabNames[i]} type="radio" name="tabGroup" @change=${() => {
|
|
655
655
|
this._showContent(i);
|
|
656
656
|
}}/>
|
|
657
|
-
<label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i] = this._tabNames[i].replace(
|
|
657
|
+
<label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i] = this._tabNames[i].replace(/-/g, " ")}</label>
|
|
658
658
|
`);
|
|
659
659
|
};
|
|
660
660
|
}
|
|
@@ -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,12 +485,12 @@
|
|
|
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=
|
|
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
|
-
<label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i]=this._tabNames[i].replace(
|
|
490
|
+
<label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i]=this._tabNames[i].replace(/-/g," ")}</label>
|
|
491
491
|
`):this._tabsTemplate.push(x.html`
|
|
492
492
|
<input class="tab-radio" id=${this._tabNames[i]} type="radio" name="tabGroup" @change=${()=>{this._showContent(i)}}/>
|
|
493
|
-
<label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i]=this._tabNames[i].replace(
|
|
493
|
+
<label class="tab ${this._tabNames[i]}-tab" for=${this._tabNames[i]}>${this._tabNames[i]=this._tabNames[i].replace(/-/g," ")}</label>
|
|
494
494
|
`)}}firstUpdated(){this._tabContents.forEach(i=>{i.classList.add("hide-content")}),this._tabContents[0].classList.add("show-content"),this._numberOfTabs=this._tabContents.length,this._generateTabs()}render(){return x.html`
|
|
495
495
|
<div class='tab-container'>
|
|
496
496
|
<div class='tab-labels'>
|
|
@@ -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