@momentum-design/components 0.133.5 → 0.133.6
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/browser/index.js +2 -6
- package/dist/browser/index.js.map +2 -2
- package/dist/components/tab/tab.component.d.ts +4 -0
- package/dist/components/tab/tab.component.js +5 -4
- package/dist/components/tab/tab.styles.js +1 -2
- package/dist/custom-elements.json +20 -24
- package/dist/react/tab/index.d.ts +3 -0
- package/dist/react/tab/index.js +3 -0
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -6402,8 +6402,7 @@
|
|
|
6402
6402
|
display: none;
|
|
6403
6403
|
}
|
|
6404
6404
|
|
|
6405
|
-
:host::part(leading)
|
|
6406
|
-
:host::part(trailing) {
|
|
6405
|
+
:host::part(leading) {
|
|
6407
6406
|
display: flex;
|
|
6408
6407
|
align-items: center;
|
|
6409
6408
|
gap: var(--mdc-tab-content-gap);
|
|
@@ -6600,10 +6599,7 @@
|
|
|
6600
6599
|
>${this.text}</mdc-text
|
|
6601
6600
|
>`:K}
|
|
6602
6601
|
</div>
|
|
6603
|
-
<
|
|
6604
|
-
<slot name="badge"></slot>
|
|
6605
|
-
<slot name="chip"></slot>
|
|
6606
|
-
</div>
|
|
6602
|
+
<slot name="postfix"></slot>
|
|
6607
6603
|
</div>
|
|
6608
6604
|
<div part="indicator"></div>
|
|
6609
6605
|
`}};Io.styles=[...ue.styles,...Ty],h([u({type:Boolean,reflect:!0})],Io.prototype,"active",2),h([u({type:String,reflect:!0})],Io.prototype,"text",2),h([u({type:String,reflect:!0})],Io.prototype,"variant",2),h([u({type:String,reflect:!0,attribute:"tab-id"})],Io.prototype,"tabId",2);var Ui=Io;Ui.register(va);var mc=Ui;var cm=n=>n.at(0),xy=n=>n.at(n.length-1),Ay=(n,i)=>n.find(t=>t.tabId===i),hm=n=>n.find(i=>i.active);var uc=n=>{class i extends n{constructor(...e){super(...e),this.addEventListener("activechange",this.handleNestedTabActiveChange)}async update(e){if(super.update(e),e.has("activeTabId")){if(!this.navItems||!this.activeTabId)return;let o=Ay(this.navItems,this.activeTabId);if(!(o instanceof mc))return;this.setActiveTab(o),this.fireTabChangeEvent(o)}}setActiveTab(e){var o;(o=this.navItems)==null||o.forEach(l=>{l===e?l.setAttribute("active",""):l.removeAttribute("active")})}fireTabChangeEvent(e){let o=new CustomEvent("change",{detail:{tabId:e.tabId}});this.dispatchEvent(o)}async handleNestedTabActiveChange(e){e.stopPropagation();let o=e.target;o instanceof mc&&(this.activeTabId=o.tabId)}}return h([u({type:String,attribute:"active-tab-id",reflect:!0})],i.prototype,"activeTabId",2),i};var FS=[Qr,B`
|