@fluentui/web-components 3.0.0-beta.125 → 3.0.0-beta.126
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/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 10 Oct 2025 04:08:37 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-beta.126](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.126)
|
|
8
|
+
|
|
9
|
+
Fri, 10 Oct 2025 04:08:37 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.125..@fluentui/web-components_v3.0.0-beta.126)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- [fix]: voice over in navigation mode was not announcing tabs belonging to a disabled tablist as disabled ([PR #35299](https://github.com/microsoft/fluentui/pull/35299) by jes@microsoft.com)
|
|
15
|
+
|
|
7
16
|
## [3.0.0-beta.125](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.125)
|
|
8
17
|
|
|
9
|
-
Mon, 06 Oct 2025 04:08:
|
|
18
|
+
Mon, 06 Oct 2025 04:08:36 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.124..@fluentui/web-components_v3.0.0-beta.125)
|
|
11
20
|
|
|
12
21
|
### Changes
|
|
@@ -98,6 +98,9 @@ export class BaseTablist extends FASTElement {
|
|
|
98
98
|
*/
|
|
99
99
|
disabledChanged(prev, next) {
|
|
100
100
|
toggleState(this.elementInternals, 'disabled', next);
|
|
101
|
+
if (this.$fastController.isConnected) {
|
|
102
|
+
this.setTabs();
|
|
103
|
+
}
|
|
101
104
|
}
|
|
102
105
|
/**
|
|
103
106
|
* @internal
|
|
@@ -181,6 +184,10 @@ export class BaseTablist extends FASTElement {
|
|
|
181
184
|
if (tab.slot === 'tab') {
|
|
182
185
|
const isActiveTab = this.activeTabIndex === index && isFocusableElement(tab);
|
|
183
186
|
const tabId = this.tabIds[index];
|
|
187
|
+
console.log('disabled', this.disabled);
|
|
188
|
+
if (!tab.disabled) {
|
|
189
|
+
this.disabled ? tab.setAttribute('aria-disabled', 'true') : tab.removeAttribute('aria-disabled');
|
|
190
|
+
}
|
|
184
191
|
tab.setAttribute('id', tabId);
|
|
185
192
|
tab.setAttribute('aria-selected', isActiveTab ? 'true' : 'false');
|
|
186
193
|
tab.addEventListener('click', this.handleTabClick);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tablist.base.js","sourceRoot":"","sources":["../../../src/tablist/tablist.base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,OAAO,EACP,QAAQ,EACR,YAAY,GACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE;;;;WAIG;QACI,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;QACnE;;;;;WAKG;QAEI,aAAQ,GAAY,KAAK,CAAC;
|
|
1
|
+
{"version":3,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BAAkB,CAAC,KAAY,EAAE,KAAa;QACpD,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;QACrB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC;QAC9C,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,GAAG,CAAC,KAAK,EAAE,CAAC;QACZ,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEO,QAAQ;QACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,KAAK,EAAE,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9C,CAAC;CACF;AA9RQ;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;6CACO;AAuB1B;IADN,IAAI;gDACkE;AAsBhE;IADN,IAAI;6CACoB;AAmClB;IADN,UAAU;gDACiB;AAcrB;IADN,UAAU;yCACS"}
|
package/dist/web-components.js
CHANGED
|
@@ -11819,6 +11819,9 @@ class BaseTablist extends FASTElement {
|
|
|
11819
11819
|
*/
|
|
11820
11820
|
disabledChanged(prev, next) {
|
|
11821
11821
|
toggleState(this.elementInternals, "disabled", next);
|
|
11822
|
+
if (this.$fastController.isConnected) {
|
|
11823
|
+
this.setTabs();
|
|
11824
|
+
}
|
|
11822
11825
|
}
|
|
11823
11826
|
/**
|
|
11824
11827
|
* @internal
|
|
@@ -11901,6 +11904,10 @@ class BaseTablist extends FASTElement {
|
|
|
11901
11904
|
if (tab.slot === "tab") {
|
|
11902
11905
|
const isActiveTab = this.activeTabIndex === index && isFocusableElement(tab);
|
|
11903
11906
|
const tabId = this.tabIds[index];
|
|
11907
|
+
console.log("disabled", this.disabled);
|
|
11908
|
+
if (!tab.disabled) {
|
|
11909
|
+
this.disabled ? tab.setAttribute("aria-disabled", "true") : tab.removeAttribute("aria-disabled");
|
|
11910
|
+
}
|
|
11904
11911
|
tab.setAttribute("id", tabId);
|
|
11905
11912
|
tab.setAttribute("aria-selected", isActiveTab ? "true" : "false");
|
|
11906
11913
|
tab.addEventListener("click", this.handleTabClick);
|
|
@@ -539,7 +539,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
539
539
|
:host{--tabIndicatorScale:${this.activeTabScale.toString()}}`,this.$fastController.addStyles(this.styles)}activeidChanged(e,t){if(e&&this.tabs){const i=this.tabs.find(r=>r.id===e);i&&(this.previousActiveTabData=this.getTabPositionData(i))}super.activeidChanged(e,t),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}tabsChanged(){super.tabsChanged(),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}}Ur([a],No.prototype,"appearance",2),Ur([a({mode:"boolean"})],No.prototype,"disabled",2),Ur([a],No.prototype,"size",2),Xe(No,Ue);function Gg(o={}){return b` ${He(o)}<div class="tablist" part="tablist" role="tablist"><slot name="tab" ${G("tabs")}></slot></div>${tt(o)}<div class="tabpanel" part="tabpanel"><slot name="tabpanel" ${G("tabpanels")}></slot></div>`}const Ug=Gg({}),Xg=u`
|
|
540
540
|
${k("grid")}
|
|
541
541
|
|
|
542
|
-
:host{box-sizing:border-box;font-family:${v};font-size:${B};line-height:${A};color:${Ie};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}:host([disabled]){cursor:not-allowed;color:${S}}:host([disabled]) ::slotted(fluent-tab){pointer-events:none;cursor:not-allowed;color:${S}}:host([disabled]) ::slotted(fluent-tab:after){background-color:${S}}:host([disabled]) ::slotted(fluent-tab[aria-selected='true'])::after{background-color:${S}}:host([disabled]) ::slotted(fluent-tab:hover):before{content:unset}:host ::slotted(fluent-tab){border-radius:${C}}:host ::slotted(fluent-tab[aria-selected='true'])::before{background-color:${S}}.tablist{display:grid;grid-template-rows:auto auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end;box-sizing:border-box}::slotted([slot='start']),::slotted([slot='end']){display:flex;align-self:center}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host([orientation='vertical']){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host([orientation='vertical']) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;align-self:flex-start;width:100%}:host([orientation='vertical']) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host([orientation='vertical']) ::slotted([slot='end']){grid-row:3}:host([appearance='subtle']) ::slotted(fluent-tab:hover){background-color:${xo};color:${ur};fill:${sn}}:host([appearance='subtle']) ::slotted(fluent-tab:active){background-color:${gt};fill:${gt};color:${z}}:host([size='small']) ::slotted(fluent-tab){font-size:${B};line-height:${A};padding:${je} ${ee}}:host([size='large']) ::slotted(fluent-tab){font-size:${he};line-height:${ye};padding:${mi} ${ae}}:host ::slotted(fluent-tab[data-animate='true'])::after{transition-property:transform;transition-duration:${Rn};transition-timing-function:${Pr}}:host ::slotted(fluent-tab)::after{height:${se};margin-top:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted(fluent-tab)::after{width:${se};height:unset;margin-top:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted(fluent-tab)::before{height:${se};border-radius:${$e};content:'';inset:0;position:absolute;margin-top:auto}:host([orientation='vertical']) ::slotted(fluent-tab)::before{height:unset;width:${se};margin-inline-end:auto;transform-origin:top}:host ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:${se};margin-top:auto;transform-origin:left}:host([orientation='vertical']) ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:unset;margin-inline-end:auto;transform-origin:top;width:${se}}:host([orientation='vertical']) ::slotted(fluent-tab){align-items:flex-start;grid-column:2;padding-top:${je};padding-bottom:${je}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab){padding-top:${Rt};padding-bottom:${Rt}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab){padding-top:${V};padding-bottom:${V}}:host([size='small']) ::slotted(fluent-tab)::after,:host([size='small']) ::slotted(fluent-tab)::before,:host([size='small']) ::slotted(fluent-tab:hover)::after{right:${ee};left:${ee}}:host ::slotted(fluent-tab)::after,:host ::slotted(fluent-tab)::before,:host ::slotted(fluent-tab:hover)::after{right:${ae};left:${ae}}:host([size='large']) ::slotted(fluent-tab)::after,:host([size='large']) ::slotted(fluent-tab)::before,:host([size='large']) ::slotted(fluent-tab:hover)::after{right:${ae};left:${ae}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${je};bottom:${je}}:host([orientation='vertical']) ::slotted(fluent-tab)::after,:host([orientation='vertical']) ::slotted(fluent-tab)::before,:host([orientation='vertical']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${V};bottom:${V}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${Wt};bottom:${Wt}}`,Kg=No.compose({name:`${p.prefix}-tabs`,template:Ug,styles:Xg});Kg.define(p.registry);const Yg=o=>o.getAttribute("aria-disabled")==="true",Qg=o=>o.hasAttribute("hidden"),Vi=o=>!Yg(o)&&!Qg(o);function Zg(o,e="-tab"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}const Jg={subtle:"subtle",transparent:"transparent"},zt=ge;var ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,Fo=(o,e,t,i)=>{for(var r=i>1?void 0:i?tf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ef(e,t,r),r};class io extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.disabled=!1,this.orientation=zt.horizontal,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.tabPanelMap=new WeakMap,this.change=()=>{this.$emit("change",this.activetab)},this.handleTabClick=e=>{const t=e.currentTarget;t.nodeType===Node.ELEMENT_NODE&&Vi(t)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(t),this.setComponent())},this.handleTabKeyDown=e=>{const t=ei(this);switch(e.key){case uo:if(!this.isHorizontal())return;e.preventDefault(),this.adjust(t==="ltr"?-1:1);break;case po:if(!this.isHorizontal())return;e.preventDefault(),this.adjust(t==="ltr"?1:-1);break;case bo:if(this.isHorizontal())return;e.preventDefault(),this.adjust(-1);break;case ho:if(this.isHorizontal())return;e.preventDefault(),this.adjust(1);break;case mo:e.preventDefault(),this.adjust(-this.activeTabIndex);break;case go:e.preventDefault(),this.adjust(this.tabs.filter(i=>Vi(i)).length-this.activeTabIndex-1);break}}}disabledChanged(e,t){y(this.elementInternals,"disabled",t)}orientationChanged(e,t){this.elementInternals.ariaOrientation=t??zt.horizontal,wt(this.elementInternals,e,t,zt),this.$fastController.isConnected&&this.setTabs()}activeidChanged(e,t){if(this.$fastController.isConnected&&this.tabs.length>0){if(this.prevActiveTabIndex=this.tabs.findIndex(i=>i.id===e),this.setTabs(),e){const i=this.tabs[this.prevActiveTabIndex],r=this.tabPanelMap.get(i);r&&(r.hidden=!0)}if(t&&this.activetab){const i=this.tabPanelMap.get(this.activetab);i&&(i.hidden=!1)}e!==t&&this.change()}}slottedTabsChanged(e,t){this.tabs=t?.filter(i=>Zg(i))??[]}tabsChanged(){if(this.$fastController.isConnected&&this.tabs.length>0){this.tabIds=this.getTabIds(),this.setTabs();for(const e of this.tabs){const t=e.getAttribute("aria-controls")??"",r=this.getRootNode().getElementById(t);t&&r&&(r.role??(r.role="tabpanel"),r.hidden=this.activeid!==e.id,this.tabPanelMap.set(e,r))}}}getActiveIndex(){return this.activeid!==void 0?this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid):0}setTabs(){this.activeTabIndex=this.getActiveIndex();const e=this.tabs.some(t=>!!t.querySelector("[slot='start']"));this.tabs.forEach((t,i)=>{if(t.slot==="tab"){const r=this.activeTabIndex===i&&Vi(t),s=this.tabIds[i];t.setAttribute("id",s),t.setAttribute("aria-selected",r?"true":"false"),t.addEventListener("click",this.handleTabClick),t.addEventListener("keydown",this.handleTabKeyDown),t.setAttribute("tabindex",r&&!this.disabled?"0":"-1"),r&&(this.activetab=t,this.activeid=s),e&&this.orientation===zt.vertical&&t.setAttribute("data-hasIndent","")}})}getTabIds(){return this.tabs.map(e=>e.getAttribute("id")??`tab-${Ft()}`)}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab())}isHorizontal(){return this.orientation===zt.horizontal}adjust(e){const t=this.tabs.filter(n=>Vi(n)),i=t.indexOf(this.activetab),r=yl(0,t.length-1,i+e),s=this.tabs.indexOf(t[r]);s>-1&&this.activateTabByIndex(this.tabs,s)}activateTabByIndex(e,t){const i=e[t];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,i.focus(),this.setComponent()}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.activeTabIndex=this.getActiveIndex()}}Fo([a({mode:"boolean"})],io.prototype,"disabled",2),Fo([a],io.prototype,"orientation",2),Fo([a],io.prototype,"activeid",2),Fo([g],io.prototype,"slottedTabs",2),Fo([g],io.prototype,"tabs",2);var of=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,ka=(o,e,t,i)=>{for(var r=i>1?void 0:i?rf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&of(e,t,r),r};class Xr extends io{constructor(){super(...arguments),this.activeTabData={x:0,y:0,height:0,width:0},this.previousActiveTabData={x:0,y:0,height:0,width:0},this.activeTabOffset=0,this.activeTabScale=1,this.appearance=Jg.transparent}calculateAnimationProperties(e){this.activeTabOffset=this.getTabPosition(e),this.activeTabScale=this.getTabScale(e)}getTabPosition(e){return this.orientation===zt.horizontal?this.previousActiveTabData.x-(e.getBoundingClientRect().x-this.getBoundingClientRect().x):this.previousActiveTabData.y-(e.getBoundingClientRect().y-this.getBoundingClientRect().y)}getTabScale(e){return this.orientation===zt.horizontal?this.previousActiveTabData.width/e.getBoundingClientRect().width:this.previousActiveTabData.height/e.getBoundingClientRect().height}applyUpdatedCSSValues(e){this.calculateAnimationProperties(e),this.setAnimationVars()}animationLoop(e){e.setAttribute("data-animate","false"),this.applyUpdatedCSSValues(e),this.previousActiveTabData=this.activeTabData,this.applyUpdatedCSSValues(e),e.setAttribute("data-animate","true")}setTabData(){if(this.tabs&&this.tabs.length>0){const e=this.tabs,i=(this.activetab||e[0])?.getBoundingClientRect(),r=this.getBoundingClientRect();this.activeTabData={x:i.x-r.x,y:i.y-r.y,height:i.height,width:i.width},this.previousActiveTabData?.x!==this.activeTabData?.x&&this.previousActiveTabData?.y!==this.activeTabData?.y&&(this.previousActiveTabData=this.activeTabData)}}setAnimationVars(){this.style.setProperty("--tabIndicatorOffset",`${this.activeTabOffset}px`),this.style.setProperty("--tabIndicatorScale",`${this.activeTabScale}`)}activeidChanged(e,t){super.activeidChanged(e,t),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}tabsChanged(){super.tabsChanged(),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}}ka([a],Xr.prototype,"appearance",2),ka([a],Xr.prototype,"size",2);const sf=b`<template role="tablist"><slot name="tab" ${G("slottedTabs")}></slot></template>`,nf=u`
|
|
542
|
+
:host{box-sizing:border-box;font-family:${v};font-size:${B};line-height:${A};color:${Ie};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}:host([disabled]){cursor:not-allowed;color:${S}}:host([disabled]) ::slotted(fluent-tab){pointer-events:none;cursor:not-allowed;color:${S}}:host([disabled]) ::slotted(fluent-tab:after){background-color:${S}}:host([disabled]) ::slotted(fluent-tab[aria-selected='true'])::after{background-color:${S}}:host([disabled]) ::slotted(fluent-tab:hover):before{content:unset}:host ::slotted(fluent-tab){border-radius:${C}}:host ::slotted(fluent-tab[aria-selected='true'])::before{background-color:${S}}.tablist{display:grid;grid-template-rows:auto auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end;box-sizing:border-box}::slotted([slot='start']),::slotted([slot='end']){display:flex;align-self:center}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host([orientation='vertical']){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host([orientation='vertical']) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;align-self:flex-start;width:100%}:host([orientation='vertical']) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host([orientation='vertical']) ::slotted([slot='end']){grid-row:3}:host([appearance='subtle']) ::slotted(fluent-tab:hover){background-color:${xo};color:${ur};fill:${sn}}:host([appearance='subtle']) ::slotted(fluent-tab:active){background-color:${gt};fill:${gt};color:${z}}:host([size='small']) ::slotted(fluent-tab){font-size:${B};line-height:${A};padding:${je} ${ee}}:host([size='large']) ::slotted(fluent-tab){font-size:${he};line-height:${ye};padding:${mi} ${ae}}:host ::slotted(fluent-tab[data-animate='true'])::after{transition-property:transform;transition-duration:${Rn};transition-timing-function:${Pr}}:host ::slotted(fluent-tab)::after{height:${se};margin-top:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted(fluent-tab)::after{width:${se};height:unset;margin-top:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted(fluent-tab)::before{height:${se};border-radius:${$e};content:'';inset:0;position:absolute;margin-top:auto}:host([orientation='vertical']) ::slotted(fluent-tab)::before{height:unset;width:${se};margin-inline-end:auto;transform-origin:top}:host ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:${se};margin-top:auto;transform-origin:left}:host([orientation='vertical']) ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:unset;margin-inline-end:auto;transform-origin:top;width:${se}}:host([orientation='vertical']) ::slotted(fluent-tab){align-items:flex-start;grid-column:2;padding-top:${je};padding-bottom:${je}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab){padding-top:${Rt};padding-bottom:${Rt}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab){padding-top:${V};padding-bottom:${V}}:host([size='small']) ::slotted(fluent-tab)::after,:host([size='small']) ::slotted(fluent-tab)::before,:host([size='small']) ::slotted(fluent-tab:hover)::after{right:${ee};left:${ee}}:host ::slotted(fluent-tab)::after,:host ::slotted(fluent-tab)::before,:host ::slotted(fluent-tab:hover)::after{right:${ae};left:${ae}}:host([size='large']) ::slotted(fluent-tab)::after,:host([size='large']) ::slotted(fluent-tab)::before,:host([size='large']) ::slotted(fluent-tab:hover)::after{right:${ae};left:${ae}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${je};bottom:${je}}:host([orientation='vertical']) ::slotted(fluent-tab)::after,:host([orientation='vertical']) ::slotted(fluent-tab)::before,:host([orientation='vertical']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${V};bottom:${V}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${Wt};bottom:${Wt}}`,Kg=No.compose({name:`${p.prefix}-tabs`,template:Ug,styles:Xg});Kg.define(p.registry);const Yg=o=>o.getAttribute("aria-disabled")==="true",Qg=o=>o.hasAttribute("hidden"),Vi=o=>!Yg(o)&&!Qg(o);function Zg(o,e="-tab"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}const Jg={subtle:"subtle",transparent:"transparent"},zt=ge;var ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,Fo=(o,e,t,i)=>{for(var r=i>1?void 0:i?tf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ef(e,t,r),r};class io extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.disabled=!1,this.orientation=zt.horizontal,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.tabPanelMap=new WeakMap,this.change=()=>{this.$emit("change",this.activetab)},this.handleTabClick=e=>{const t=e.currentTarget;t.nodeType===Node.ELEMENT_NODE&&Vi(t)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(t),this.setComponent())},this.handleTabKeyDown=e=>{const t=ei(this);switch(e.key){case uo:if(!this.isHorizontal())return;e.preventDefault(),this.adjust(t==="ltr"?-1:1);break;case po:if(!this.isHorizontal())return;e.preventDefault(),this.adjust(t==="ltr"?1:-1);break;case bo:if(this.isHorizontal())return;e.preventDefault(),this.adjust(-1);break;case ho:if(this.isHorizontal())return;e.preventDefault(),this.adjust(1);break;case mo:e.preventDefault(),this.adjust(-this.activeTabIndex);break;case go:e.preventDefault(),this.adjust(this.tabs.filter(i=>Vi(i)).length-this.activeTabIndex-1);break}}}disabledChanged(e,t){y(this.elementInternals,"disabled",t),this.$fastController.isConnected&&this.setTabs()}orientationChanged(e,t){this.elementInternals.ariaOrientation=t??zt.horizontal,wt(this.elementInternals,e,t,zt),this.$fastController.isConnected&&this.setTabs()}activeidChanged(e,t){if(this.$fastController.isConnected&&this.tabs.length>0){if(this.prevActiveTabIndex=this.tabs.findIndex(i=>i.id===e),this.setTabs(),e){const i=this.tabs[this.prevActiveTabIndex],r=this.tabPanelMap.get(i);r&&(r.hidden=!0)}if(t&&this.activetab){const i=this.tabPanelMap.get(this.activetab);i&&(i.hidden=!1)}e!==t&&this.change()}}slottedTabsChanged(e,t){this.tabs=t?.filter(i=>Zg(i))??[]}tabsChanged(){if(this.$fastController.isConnected&&this.tabs.length>0){this.tabIds=this.getTabIds(),this.setTabs();for(const e of this.tabs){const t=e.getAttribute("aria-controls")??"",r=this.getRootNode().getElementById(t);t&&r&&(r.role??(r.role="tabpanel"),r.hidden=this.activeid!==e.id,this.tabPanelMap.set(e,r))}}}getActiveIndex(){return this.activeid!==void 0?this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid):0}setTabs(){this.activeTabIndex=this.getActiveIndex();const e=this.tabs.some(t=>!!t.querySelector("[slot='start']"));this.tabs.forEach((t,i)=>{if(t.slot==="tab"){const r=this.activeTabIndex===i&&Vi(t),s=this.tabIds[i];console.log("disabled",this.disabled),t.disabled||(this.disabled?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")),t.setAttribute("id",s),t.setAttribute("aria-selected",r?"true":"false"),t.addEventListener("click",this.handleTabClick),t.addEventListener("keydown",this.handleTabKeyDown),t.setAttribute("tabindex",r&&!this.disabled?"0":"-1"),r&&(this.activetab=t,this.activeid=s),e&&this.orientation===zt.vertical&&t.setAttribute("data-hasIndent","")}})}getTabIds(){return this.tabs.map(e=>e.getAttribute("id")??`tab-${Ft()}`)}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab())}isHorizontal(){return this.orientation===zt.horizontal}adjust(e){const t=this.tabs.filter(n=>Vi(n)),i=t.indexOf(this.activetab),r=yl(0,t.length-1,i+e),s=this.tabs.indexOf(t[r]);s>-1&&this.activateTabByIndex(this.tabs,s)}activateTabByIndex(e,t){const i=e[t];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,i.focus(),this.setComponent()}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.activeTabIndex=this.getActiveIndex()}}Fo([a({mode:"boolean"})],io.prototype,"disabled",2),Fo([a],io.prototype,"orientation",2),Fo([a],io.prototype,"activeid",2),Fo([g],io.prototype,"slottedTabs",2),Fo([g],io.prototype,"tabs",2);var of=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,ka=(o,e,t,i)=>{for(var r=i>1?void 0:i?rf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&of(e,t,r),r};class Xr extends io{constructor(){super(...arguments),this.activeTabData={x:0,y:0,height:0,width:0},this.previousActiveTabData={x:0,y:0,height:0,width:0},this.activeTabOffset=0,this.activeTabScale=1,this.appearance=Jg.transparent}calculateAnimationProperties(e){this.activeTabOffset=this.getTabPosition(e),this.activeTabScale=this.getTabScale(e)}getTabPosition(e){return this.orientation===zt.horizontal?this.previousActiveTabData.x-(e.getBoundingClientRect().x-this.getBoundingClientRect().x):this.previousActiveTabData.y-(e.getBoundingClientRect().y-this.getBoundingClientRect().y)}getTabScale(e){return this.orientation===zt.horizontal?this.previousActiveTabData.width/e.getBoundingClientRect().width:this.previousActiveTabData.height/e.getBoundingClientRect().height}applyUpdatedCSSValues(e){this.calculateAnimationProperties(e),this.setAnimationVars()}animationLoop(e){e.setAttribute("data-animate","false"),this.applyUpdatedCSSValues(e),this.previousActiveTabData=this.activeTabData,this.applyUpdatedCSSValues(e),e.setAttribute("data-animate","true")}setTabData(){if(this.tabs&&this.tabs.length>0){const e=this.tabs,i=(this.activetab||e[0])?.getBoundingClientRect(),r=this.getBoundingClientRect();this.activeTabData={x:i.x-r.x,y:i.y-r.y,height:i.height,width:i.width},this.previousActiveTabData?.x!==this.activeTabData?.x&&this.previousActiveTabData?.y!==this.activeTabData?.y&&(this.previousActiveTabData=this.activeTabData)}}setAnimationVars(){this.style.setProperty("--tabIndicatorOffset",`${this.activeTabOffset}px`),this.style.setProperty("--tabIndicatorScale",`${this.activeTabScale}`)}activeidChanged(e,t){super.activeidChanged(e,t),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}tabsChanged(){super.tabsChanged(),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}}ka([a],Xr.prototype,"appearance",2),ka([a],Xr.prototype,"size",2);const sf=b`<template role="tablist"><slot name="tab" ${G("slottedTabs")}></slot></template>`,nf=u`
|
|
543
543
|
${k("flex")}
|
|
544
544
|
|
|
545
545
|
:host{--tabPaddingInline:inherit;--tabPaddingBlock:inherit;--tabIndicatorInsetInline:0;--tabIndicatorInsetBlock:0;box-sizing:border-box;color:${Ie};flex-direction:row}:host([orientation='vertical']){flex-direction:column}:host([orientation='vertical']) ::slotted([role='tab']){justify-content:flex-start}:host ::slotted([slot='tab'][data-animate='true'])::after{transition-property:transform;transition-duration:${Rn};transition-timing-function:${Pr}}:host ::slotted([slot='tab'])::after{height:${se};margin-block-start:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted([slot='tab'])::after{width:${se};height:unset;margin-block-start:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted([slot='tab'])::before{height:${se};border-radius:${$e};content:'';inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock);position:absolute;margin-top:auto}:host ::slotted([slot='tab'])::before{inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock)}:host ::slotted([slot='tab'][aria-selected='true'])::before{background-color:${S}}:host ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:${se};margin-block-start:auto;transform-origin:left}:host([orientation='vertical']) ::slotted([slot='tab'])::before,:host([orientation='vertical']) ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:unset;width:${se};margin-inline-end:auto;transform-origin:top}:host(:where([size='small'],[size='large'])) ::slotted([slot='tab']){padding-inline:var(--tabPaddingInline);padding-block:var(--tabPaddingBlock)}:host([size='small']) ::slotted([slot='tab']){--tabPaddingBlock:${je};--tabPaddingInline:${ee};font-size:${B};line-height:${A}}:host([size='large']) ::slotted([slot='tab']){--tabPaddingBlock:${mi};--tabPaddingInline:${ae};font-size:${he};line-height:${ye}}:host ::slotted([slot='tab'])::after,:host ::slotted([slot='tab'])::before,:host ::slotted([slot='tab']:hover)::after{inset-inline:var(--tabIndicatorInsetInline)}:host ::slotted([slot='tab']){--tabIndicatorInsetInline:${ae}}:host([size='small']) ::slotted([slot='tab']){--tabIndicatorInsetInline:${ee}}:host([size='large']) ::slotted([slot='tab']){--tabIndicatorInsetInline:${ae}}:host([orientation='vertical']) ::slotted([slot='tab']){padding-block:var(--tabPaddingBlock)}:host([orientation='vertical']) ::slotted([slot='tab']){--tabPaddingBlock:${V}}:host([orientation='vertical'][size='small']) ::slotted([slot='tab']){--tabPaddingBlock:${Rt}}:host([orientation='vertical'][size='large']) ::slotted([slot='tab']){--tabPaddingBlock:${V}}:host([orientation='vertical']) ::slotted([slot='tab'])::after,:host([orientation='vertical']) ::slotted([slot='tab'])::before,:host([orientation='vertical']) ::slotted([slot='tab']:hover)::after{inset-inline:0;inset-block:var(--tabIndicatorInsetBlock)}:host([orientation='vertical']){--tabIndicatorInsetBlock:${V}}:host([orientation='vertical'][size='small']){--tabIndicatorInsetBlock:${je}}:host([orientation='vertical'][size='large']){--tabIndicatorInsetBlock:${Wt}}:host([disabled]){cursor:not-allowed;color:${S}}:host([disabled]) ::slotted([slot='tab']){pointer-events:none;cursor:not-allowed;color:${S}}:host([disabled]) ::slotted([slot='tab']:after){background-color:${S}}:host([disabled]) ::slotted([slot='tab'][aria-selected='true'])::after{background-color:${S}}:host([disabled]) ::slotted([slot='tab']:hover):before{content:unset}:host([appearance='subtle']) ::slotted([slot='tab']:hover){background-color:${xo};color:${ur};fill:${sn}}:host([appearance='subtle']) ::slotted([slot='tab']:active){background-color:${gt};fill:${gt};color:${z}}`,af=Xr.compose({name:`${p.prefix}-tablist`,template:sf,styles:nf});af.define(p.registry);const lf={outline:"outline",filledLighter:"filled-lighter",filledDarker:"filled-darker"},Li={none:"none",both:"both",horizontal:"horizontal",vertical:"vertical"};var cf=Object.defineProperty,df=Object.getOwnPropertyDescriptor,de=(o,e,t,i)=>{for(var r=i>1?void 0:i?df(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&cf(e,t,r),r};class K extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.filteredLabelSlottedNodes=[],this.labelSlottedNodes=[],this.userInteracted=!1,this.preConnectControlEl=document.createElement("textarea"),this.autoResize=!1,this.disabled=!1,this.displayShadow=!1,this.readOnly=!1,this.required=!1,this.resize=Li.none,this.spellcheck=!1}defaultSlottedNodesChanged(){const e=this.getContent();this.defaultValue=e,this.value=e}labelSlottedNodesChanged(){this.filteredLabelSlottedNodes=this.labelSlottedNodes.filter(on),this.labelEl&&(this.labelEl.hidden=!this.filteredLabelSlottedNodes.length),this.filteredLabelSlottedNodes.forEach(e=>{e.disabled=this.disabled,e.required=this.required})}autoResizeChanged(){this.maybeCreateAutoSizerEl(),y(this.elementInternals,"auto-resize",this.autoResize)}disabledChanged(){this.setDisabledSideEffect(this.disabled)}get form(){return this.elementInternals.form}get labels(){return this.elementInternals.labels}readOnlyChanged(){this.elementInternals.ariaReadOnly=`${!!this.readOnly}`}requiredChanged(){this.elementInternals.ariaRequired=`${!!this.required}`,this.filteredLabelSlottedNodes?.length&&this.filteredLabelSlottedNodes.forEach(e=>e.required=this.required)}resizeChanged(e,t){wt(this.elementInternals,e,t,Li,"resize-"),y(this.elementInternals,"resize",Xn(Li,t)&&t!==Li.none)}get textLength(){return this.controlEl.textLength}get type(){return"textarea"}get validity(){return this.elementInternals.validity}get validationMessage(){return this.elementInternals.validationMessage||this.controlEl.validationMessage}get willValidate(){return this.elementInternals.willValidate}get defaultValue(){return this.controlEl?.defaultValue??this.preConnectControlEl.defaultValue}set defaultValue(e){const t=this.controlEl??this.preConnectControlEl;t.defaultValue=e,this.controlEl&&!this.userInteracted&&(this.controlEl.value=e)}get value(){return this.controlEl?.value??this.preConnectControlEl.value}set value(e){const t=this.controlEl??this.preConnectControlEl;t.value=e,this.setFormValue(e),this.setValidity()}connectedCallback(){super.connectedCallback(),this.setDefaultValue(),this.maybeCreateAutoSizerEl(),this.bindEvents(),this.observeControlElAttrs()}disconnectedCallback(){super.disconnectedCallback(),this.autoSizerObserver?.disconnect(),this.controlElAttrObserver?.disconnect()}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(e){this.setDisabledSideEffect(e),this.setValidity()}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}checkValidity(){return this.elementInternals.checkValidity()}reportValidity(){return this.elementInternals.reportValidity()}setCustomValidity(e){this.elementInternals.setValidity({customError:!!e},e?e.toString():void 0),this.reportValidity()}setValidity(e,t,i){this.$fastController.isConnected&&(this.disabled||this.readOnly?this.elementInternals.setValidity({}):this.elementInternals.setValidity(e??this.controlEl.validity,t??this.controlEl.validationMessage,i??this.controlEl),this.userInteracted&&this.toggleUserValidityState())}select(){this.controlEl.select()}setDefaultValue(){this.defaultValue=this.innerHTML.trim()||this.preConnectControlEl.defaultValue||"",this.value=this.preConnectControlEl.value||this.defaultValue,this.setFormValue(this.value),this.setValidity(),this.preConnectControlEl=null}bindEvents(){this.controlEl.addEventListener("input",()=>this.userInteracted=!0,{once:!0})}getContent(){return this.defaultSlottedNodes.map(e=>{switch(e.nodeType){case Node.ELEMENT_NODE:return e.outerHTML;case Node.TEXT_NODE:return e.textContent.trim();default:return""}}).join("")||""}observeControlElAttrs(){this.controlElAttrObserver=new MutationObserver(()=>{this.setValidity()}),this.controlElAttrObserver.observe(this.controlEl,{attributes:!0,attributeFilter:["disabled","required","readonly","maxlength","minlength"]})}setDisabledSideEffect(e){this.elementInternals.ariaDisabled=`${e}`,this.controlEl&&(this.controlEl.disabled=e),this.filteredLabelSlottedNodes?.length&&this.filteredLabelSlottedNodes.forEach(t=>t.disabled=this.disabled)}toggleUserValidityState(){y(this.elementInternals,"user-invalid",!this.validity.valid),y(this.elementInternals,"user-valid",this.validity.valid)}maybeCreateAutoSizerEl(){if(!CSS.supports("field-sizing: content")){if(!this.autoResize){this.autoSizerEl?.remove(),this.autoSizerObserver?.disconnect();return}this.autoSizerEl||(this.autoSizerEl=document.createElement("div"),this.autoSizerEl.classList.add("auto-sizer"),this.autoSizerEl.ariaHidden="true"),this.shadowRoot.prepend(this.autoSizerEl),this.autoSizerObserver||(this.autoSizerObserver=new ResizeObserver((e,t)=>{const i=window.getComputedStyle(this).writingMode.startsWith("horizontal")?"height":"width";this.style.getPropertyValue(i)!==""&&(this.autoSizerEl?.remove(),t.disconnect())})),this.autoSizerObserver.observe(this)}}handleControlInput(){this.autoResize&&this.autoSizerEl&&(this.autoSizerEl.textContent=this.value+" "),this.setFormValue(this.value),this.setValidity()}handleControlChange(){this.toggleUserValidityState(),this.$emit("change")}handleControlSelect(){this.$emit("select")}}K.formAssociated=!0,de([g],K.prototype,"defaultSlottedNodes",2),de([g],K.prototype,"labelSlottedNodes",2),de([a],K.prototype,"autocomplete",2),de([a({attribute:"auto-resize",mode:"boolean"})],K.prototype,"autoResize",2),de([a({attribute:"dirname"})],K.prototype,"dirName",2),de([a({mode:"boolean"})],K.prototype,"disabled",2),de([a({attribute:"display-shadow",mode:"boolean"})],K.prototype,"displayShadow",2),de([a({attribute:"form"})],K.prototype,"initialForm",2),de([a({attribute:"maxlength",converter:re})],K.prototype,"maxLength",2),de([a({attribute:"minlength",converter:re})],K.prototype,"minLength",2),de([a],K.prototype,"name",2),de([a],K.prototype,"placeholder",2),de([a({attribute:"readonly",mode:"boolean"})],K.prototype,"readOnly",2),de([a({mode:"boolean"})],K.prototype,"required",2),de([a({mode:"fromView"})],K.prototype,"resize",2),de([a({mode:"boolean"})],K.prototype,"spellcheck",2);var hf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,Kr=(o,e,t,i)=>{for(var r=i>1?void 0:i?uf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&hf(e,t,r),r};class ji extends K{constructor(){super(...arguments),this.appearance=lf.outline,this.block=!1}labelSlottedNodesChanged(){super.labelSlottedNodesChanged(),this.labelSlottedNodes.forEach(e=>{e.size=this.size})}handleChange(e,t){switch(t){case"size":this.labelSlottedNodes.forEach(i=>{i.size=this.size});break}}connectedCallback(){super.connectedCallback(),m.getNotifier(this).subscribe(this,"size")}disconnectedCallback(){super.disconnectedCallback(),m.getNotifier(this).unsubscribe(this,"size")}}Kr([a({mode:"fromView"})],ji.prototype,"appearance",2),Kr([a({mode:"boolean"})],ji.prototype,"block",2),Kr([a],ji.prototype,"size",2);const pf=u`
|