@fluentui/web-components 3.0.0-beta.114 → 3.0.0-beta.115
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 Mon, 04 Aug 2025 04:07:36 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-beta.115](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.115)
|
|
8
|
+
|
|
9
|
+
Mon, 04 Aug 2025 04:07:36 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.114..@fluentui/web-components_v3.0.0-beta.115)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- fix: avoid setting tabindex before button is connected ([PR #34960](https://github.com/microsoft/fluentui/pull/34960) by machi@microsoft.com)
|
|
15
|
+
|
|
7
16
|
## [3.0.0-beta.114](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.114)
|
|
8
17
|
|
|
9
|
-
Fri, 25 Jul 2025 04:07:
|
|
18
|
+
Fri, 25 Jul 2025 04:07:23 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.113..@fluentui/web-components_v3.0.0-beta.114)
|
|
11
20
|
|
|
12
21
|
### Changes
|
|
@@ -15,6 +15,9 @@ import { ButtonType } from './button.options.js';
|
|
|
15
15
|
*/
|
|
16
16
|
export class BaseButton extends FASTElement {
|
|
17
17
|
disabledChanged() {
|
|
18
|
+
if (!this.$fastController.isConnected) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
18
21
|
if (this.disabled) {
|
|
19
22
|
this.removeAttribute('tabindex');
|
|
20
23
|
}
|
|
@@ -91,6 +94,7 @@ export class BaseButton extends FASTElement {
|
|
|
91
94
|
connectedCallback() {
|
|
92
95
|
super.connectedCallback();
|
|
93
96
|
this.elementInternals.ariaDisabled = `${!!this.disabledFocusable}`;
|
|
97
|
+
this.disabledChanged();
|
|
94
98
|
}
|
|
95
99
|
constructor() {
|
|
96
100
|
super();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.base.js","sourceRoot":"","sources":["../../../src/button/button.base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAyB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAExE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IA+B/B,eAAe;QACvB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,wEAAwE;YACxE,yEAAyE;YACzE,8CAA8C;YAC9C,yFAAyF;YACzF,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;IAYD;;;;;;OAMG;IACI,wBAAwB,CAAC,QAAiB,EAAE,IAAa;QAC9D,IAAI,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC;YACrC,IAAI,CAAC,gBAAgB,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACnD,CAAC;IACH,CAAC;IASD;;;;OAIG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,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,CAAC;kDACvB;AAyBzB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;8CACG;AAoB9B;IADN,IAAI;wCACgB;AAWd;IADN,IAAI;wCACoB;AA0BlB;IADN,IAAI;yCACiB"}
|
package/dist/web-components.js
CHANGED
|
@@ -5795,6 +5795,9 @@ class BaseButton extends FASTElement {
|
|
|
5795
5795
|
this.elementInternals.role = "button";
|
|
5796
5796
|
}
|
|
5797
5797
|
disabledChanged() {
|
|
5798
|
+
if (!this.$fastController.isConnected) {
|
|
5799
|
+
return;
|
|
5800
|
+
}
|
|
5798
5801
|
if (this.disabled) {
|
|
5799
5802
|
this.removeAttribute("tabindex");
|
|
5800
5803
|
} else {
|
|
@@ -5859,6 +5862,7 @@ class BaseButton extends FASTElement {
|
|
|
5859
5862
|
connectedCallback() {
|
|
5860
5863
|
super.connectedCallback();
|
|
5861
5864
|
this.elementInternals.ariaDisabled = `${!!this.disabledFocusable}`;
|
|
5865
|
+
this.disabledChanged();
|
|
5862
5866
|
}
|
|
5863
5867
|
/**
|
|
5864
5868
|
* This fallback creates a new slot, then creates a submit button to mirror the custom element's
|
|
@@ -376,7 +376,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
376
376
|
${oa}
|
|
377
377
|
${ta}
|
|
378
378
|
`.withBehaviors(U(u`
|
|
379
|
-
:host,:host([appearance='outline']),:host([appearance='tint']){border-color:CanvasText}`));function aa(o={}){return b` ${Le(o)}<slot>${he(o.defaultContent)}</slot>${ot(o)} `}const zh=aa(),Th=Kt.compose({name:`${p.prefix}-badge`,template:zh,styles:Ph});Th.define(p.registry);var Bh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,Se=(o,e,t,i)=>{for(var r=i>1?void 0:i?Oh(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&&Bh(e,t,r),r};class pe extends ${constructor(){super(),this.disabled=!1,this.disabledFocusable=!1,this.elementInternals=this.attachInternals(),this.elementInternals.role="button"}disabledChanged(){this.disabled?this.removeAttribute("tabindex"):this.tabIndex=Number(this.getAttribute("tabindex")??0)<0?-1:0}disabledFocusableChanged(e,t){this.$fastController.isConnected&&(this.elementInternals.ariaDisabled=`${!!t}`)}get form(){return this.elementInternals.form}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}typeChanged(e,t){t!==yi.submit&&(this.formSubmissionFallbackControl?.remove(),this.shadowRoot?.querySelector('slot[name="internal"]')?.remove())}clickHandler(e){if(e&&this.disabledFocusable){e.stopImmediatePropagation();return}return this.press(),!0}connectedCallback(){super.connectedCallback(),this.elementInternals.ariaDisabled=`${!!this.disabledFocusable}
|
|
379
|
+
:host,:host([appearance='outline']),:host([appearance='tint']){border-color:CanvasText}`));function aa(o={}){return b` ${Le(o)}<slot>${he(o.defaultContent)}</slot>${ot(o)} `}const zh=aa(),Th=Kt.compose({name:`${p.prefix}-badge`,template:zh,styles:Ph});Th.define(p.registry);var Bh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,Se=(o,e,t,i)=>{for(var r=i>1?void 0:i?Oh(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&&Bh(e,t,r),r};class pe extends ${constructor(){super(),this.disabled=!1,this.disabledFocusable=!1,this.elementInternals=this.attachInternals(),this.elementInternals.role="button"}disabledChanged(){this.$fastController.isConnected&&(this.disabled?this.removeAttribute("tabindex"):this.tabIndex=Number(this.getAttribute("tabindex")??0)<0?-1:0)}disabledFocusableChanged(e,t){this.$fastController.isConnected&&(this.elementInternals.ariaDisabled=`${!!t}`)}get form(){return this.elementInternals.form}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}typeChanged(e,t){t!==yi.submit&&(this.formSubmissionFallbackControl?.remove(),this.shadowRoot?.querySelector('slot[name="internal"]')?.remove())}clickHandler(e){if(e&&this.disabledFocusable){e.stopImmediatePropagation();return}return this.press(),!0}connectedCallback(){super.connectedCallback(),this.elementInternals.ariaDisabled=`${!!this.disabledFocusable}`,this.disabledChanged()}createAndInsertFormSubmissionFallbackControl(){const e=this.formSubmissionFallbackControlSlot??document.createElement("slot");e.setAttribute("name","internal"),this.shadowRoot?.appendChild(e),this.formSubmissionFallbackControlSlot=e;const t=this.formSubmissionFallbackControl??document.createElement("button");t.style.display="none",t.setAttribute("type","submit"),t.setAttribute("slot","internal"),this.formNoValidate&&t.toggleAttribute("formnovalidate",!0),this.elementInternals.form?.id&&t.setAttribute("form",this.elementInternals.form.id),this.name&&t.setAttribute("name",this.name),this.value&&t.setAttribute("value",this.value),this.formAction&&t.setAttribute("formaction",this.formAction??""),this.formEnctype&&t.setAttribute("formenctype",this.formEnctype??""),this.formMethod&&t.setAttribute("formmethod",this.formMethod??""),this.formTarget&&t.setAttribute("formtarget",this.formTarget??""),this.append(t),this.formSubmissionFallbackControl=t}formDisabledCallback(e){this.disabled=e}keypressHandler(e){if(e&&this.disabledFocusable){e.stopImmediatePropagation();return}if(e.key===fo||e.key===Zo){this.click();return}return!0}press(){switch(this.type){case yi.reset:{this.resetForm();break}case yi.submit:{this.submitForm();break}}}resetForm(){this.elementInternals.form?.reset()}submitForm(){if(!(!this.elementInternals.form||this.disabled||this.type!==yi.submit)){if(!this.name&&!this.formAction&&!this.formEnctype&&!this.formAttribute&&!this.formMethod&&!this.formNoValidate&&!this.formTarget){this.elementInternals.form.requestSubmit();return}try{this.elementInternals.setFormValue(this.value??""),this.elementInternals.form.requestSubmit(this)}catch{this.createAndInsertFormSubmissionFallbackControl(),this.elementInternals.setFormValue(null),this.elementInternals.form.requestSubmit(this.formSubmissionFallbackControl)}}}}pe.formAssociated=!0,Se([a({mode:"boolean"})],pe.prototype,"autofocus",2),Se([g],pe.prototype,"defaultSlottedContent",2),Se([a({mode:"boolean"})],pe.prototype,"disabled",2),Se([a({attribute:"disabled-focusable",mode:"boolean"})],pe.prototype,"disabledFocusable",2),Se([a({attribute:"formaction"})],pe.prototype,"formAction",2),Se([a({attribute:"form"})],pe.prototype,"formAttribute",2),Se([a({attribute:"formenctype"})],pe.prototype,"formEnctype",2),Se([a({attribute:"formmethod"})],pe.prototype,"formMethod",2),Se([a({attribute:"formnovalidate",mode:"boolean"})],pe.prototype,"formNoValidate",2),Se([a({attribute:"formtarget"})],pe.prototype,"formTarget",2),Se([a],pe.prototype,"name",2),Se([a],pe.prototype,"type",2),Se([a],pe.prototype,"value",2);var Ah=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,Ci=(o,e,t,i)=>{for(var r=i>1?void 0:i?_h(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&&Ah(e,t,r),r};class Ze extends pe{constructor(){super(...arguments),this.iconOnly=!1}}Ci([a],Ze.prototype,"appearance",2),Ci([a],Ze.prototype,"shape",2),Ci([a],Ze.prototype,"size",2),Ci([a({attribute:"icon-only",mode:"boolean"})],Ze.prototype,"iconOnly",2),Ke(Ze,Ue);function Ar(o={}){return b`<template @click="${(e,t)=>e.clickHandler(t.event)}" @keypress="${(e,t)=>e.keypressHandler(t.event)}">${Le(o)}<span class="content" part="content"><slot ${L("defaultSlottedContent")}></slot></span>${ot(o)}</template>`}const Eh=Ar(),Nh=Ze.compose({name:`${p.prefix}-button`,template:Eh,styles:ki});Nh.define(p.registry);var Fh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,at=(o,e,t,i)=>{for(var r=i>1?void 0:i?Mh(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&&Fh(e,t,r),r};class Pe extends ${constructor(){super(...arguments),this.initialValue="on",this._keydownPressed=!1,this.dirtyChecked=!1,this.elementInternals=this.attachInternals(),this._validationFallbackMessage="",this._value=this.initialValue}get checked(){return m.track(this,"checked"),!!this._checked}set checked(e){this._checked=e,this.setFormValue(e?this.value:null),this.setValidity(),this.setAriaChecked(),y(this.elementInternals,"checked",e),m.notify(this,"checked")}disabledChanged(e,t){this.disabled?this.removeAttribute("tabindex"):this.tabIndex=Number(this.getAttribute("tabindex")??0)<0?-1:0,this.elementInternals.ariaDisabled=this.disabled?"true":"false",y(this.elementInternals,"disabled",this.disabled)}disabledAttributeChanged(e,t){this.disabled=!!t}initialCheckedChanged(e,t){this.dirtyChecked||(this.checked=!!t)}initialValueChanged(e,t){this._value=t}requiredChanged(e,t){this.$fastController.isConnected&&(this.setValidity(),this.elementInternals.ariaRequired=this.required?"true":"false")}get form(){return this.elementInternals.form}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}get validationMessage(){if(this.elementInternals.validationMessage)return this.elementInternals.validationMessage;if(!this._validationFallbackMessage){const e=document.createElement("input");e.type="checkbox",e.required=!0,e.checked=!1,this._validationFallbackMessage=e.validationMessage}return this._validationFallbackMessage}get validity(){return this.elementInternals.validity}get value(){return m.track(this,"value"),this._value}set value(e){this._value=e,this.$fastController.isConnected&&(this.setFormValue(e),this.setValidity(),m.notify(this,"value"))}get willValidate(){return this.elementInternals.willValidate}checkValidity(){return this.elementInternals.checkValidity()}clickHandler(e){if(this.disabled)return;this.dirtyChecked=!0;const t=this.checked;return this.toggleChecked(),t!==this.checked&&(this.$emit("change"),this.$emit("input")),!0}connectedCallback(){super.connectedCallback(),this.disabled=!!this.disabledAttribute,this.setAriaChecked(),this.setValidity()}inputHandler(e){return this.setFormValue(this.value),this.setValidity(),!0}keydownHandler(e){if(e.key!==" ")return!0;this._keydownPressed=!0}keyupHandler(e){if(!this._keydownPressed||e.key!==" ")return!0;this._keydownPressed=!1,this.click()}formResetCallback(){this.checked=this.initialChecked??!1,this.dirtyChecked=!1,this.setValidity()}reportValidity(){return this.elementInternals.reportValidity()}setAriaChecked(e=this.checked){this.elementInternals.ariaChecked=e?"true":"false"}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}setCustomValidity(e){this.elementInternals.setValidity({customError:!0},e),this.setValidity()}setValidity(e,t,i){if(this.$fastController.isConnected){if(this.disabled||!this.required){this.elementInternals.setValidity({});return}this.elementInternals.setValidity({valueMissing:!!this.required&&!this.checked,...e},t??this.validationMessage,i)}}toggleChecked(e=!this.checked){this.checked=e}}Pe.formAssociated=!0,at([a({mode:"boolean"})],Pe.prototype,"autofocus",2),at([g],Pe.prototype,"disabled",2),at([a({attribute:"disabled",mode:"boolean"})],Pe.prototype,"disabledAttribute",2),at([a({attribute:"form"})],Pe.prototype,"formAttribute",2),at([a({attribute:"checked",mode:"boolean"})],Pe.prototype,"initialChecked",2),at([a({attribute:"value",mode:"fromView"})],Pe.prototype,"initialValue",2),at([a],Pe.prototype,"name",2),at([a({mode:"boolean"})],Pe.prototype,"required",2);var Dh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,_r=(o,e,t,i)=>{for(var r=i>1?void 0:i?Hh(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&&Dh(e,t,r),r};class Si extends Pe{indeterminateChanged(e,t){this.setAriaChecked(),y(this.elementInternals,"indeterminate",t)}constructor(){super(),this.elementInternals.role="checkbox"}setAriaChecked(e=this.checked){if(this.indeterminate){this.elementInternals.ariaChecked="mixed";return}super.setAriaChecked(e)}toggleChecked(e=!this.checked){this.indeterminate=!1,super.toggleChecked(e)}}_r([g],Si.prototype,"indeterminate",2),_r([a],Si.prototype,"shape",2),_r([a],Si.prototype,"size",2);const Vh=P("active"),Lh=P("bad-input"),x=P("checked"),jh=P("custom-error"),Rh=P("description"),ye=P("disabled");P("error");const qh=P("flip-block"),Wh=P("focus-visible");P("has-message");const It=P("indeterminate"),Yt=P("multiple"),Gh=P("open"),Xh=P("pattern-mismatch"),Uh=P("placeholder-shown"),F=P("pressed"),Kh=P("range-overflow"),Yh=P("range-underflow"),Qh=P("required"),Er=P("selected"),Zh=P("step-mismatch"),Ii=P("submenu"),Jh=P("too-long"),eu=P("too-short"),tu=P("type-mismatch"),ou=P("user-invalid"),iu=P("valid"),ru=P("value-missing"),su=u`
|
|
380
380
|
${k("inline-flex")}
|
|
381
381
|
|
|
382
382
|
:host{--size:16px;background-color:${I};border-radius:${Oe};border:${T} solid ${je};box-sizing:border-box;cursor:pointer;position:relative;width:var(--size)}:host,.indeterminate-indicator,.checked-indicator{aspect-ratio:1}:host(:hover){border-color:${$t}}:host(:active){border-color:${yt}}:host(${x}:hover){background-color:${Vt};border-color:${Ql}}:host(${x}:active){background-color:${Lt};border-color:${xn}}:host(:focus-visible){outline:none}:host(:not([slot='input']))::after{content:'';position:absolute;inset:-8px;box-sizing:border-box;outline:none;border:${$e} solid ${J};border-radius:${C}}:host(:not([slot='input']):focus-visible)::after{border-color:${Ce}}.indeterminate-indicator,.checked-indicator{color:${ft};inset:0;margin:auto;position:absolute}::slotted([slot='checked-indicator']),.checked-indicator{fill:currentColor;display:inline-flex;flex:1 0 auto;width:12px}:host(:not(${x})) *:is(::slotted([slot='checked-indicator']),.checked-indicator){display:none}:host(${x}),:host(${It}){border-color:${xt}}:host(${x}),:host(${It}) .indeterminate-indicator{background-color:${vt}}:host(${It}) .indeterminate-indicator{border-radius:${Oe};position:absolute;width:calc(var(--size) / 2);inset:0}:host([size='large']){--size:20px}:host([size='large']) ::slotted([slot='checked-indicator']),:host([size='large']) .checked-indicator{width:16px}:host([shape='circular']),:host([shape='circular']) .indeterminate-indicator{border-radius:${me}}:host([disabled]),:host([disabled]${x}){background-color:${it};border-color:${we}}:host([disabled]){cursor:unset}:host([disabled]${It}) .indeterminate-indicator{background-color:${we}}:host([disabled]${x}) .checked-indicator{color:${we}}`.withBehaviors(U(u`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/web-components",
|
|
3
3
|
"description": "A library of Fluent Web Components",
|
|
4
|
-
"version": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.115",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Microsoft",
|
|
7
7
|
"url": "https://discord.gg/FcSNfg4"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@microsoft/fast-web-utilities": "^6.0.0",
|
|
86
|
-
"@fluentui/tokens": "1.0.0-alpha.
|
|
86
|
+
"@fluentui/tokens": "1.0.0-alpha.22",
|
|
87
87
|
"tabbable": "^6.2.0",
|
|
88
88
|
"tslib": "^2.1.0"
|
|
89
89
|
},
|