@fluentui/web-components 3.0.0-beta.106 → 3.0.0-beta.108

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/custom-elements.json +14 -0
  3. package/dist/esm/button/button.base.js +1 -1
  4. package/dist/esm/button/button.base.js.map +1 -1
  5. package/dist/esm/checkbox/checkbox.base.d.ts +10 -1
  6. package/dist/esm/checkbox/checkbox.base.js +13 -2
  7. package/dist/esm/checkbox/checkbox.base.js.map +1 -1
  8. package/dist/esm/dropdown/dropdown.base.js +1 -0
  9. package/dist/esm/dropdown/dropdown.base.js.map +1 -1
  10. package/dist/esm/field/field.base.d.ts +2 -0
  11. package/dist/esm/field/field.base.js +8 -5
  12. package/dist/esm/field/field.base.js.map +1 -1
  13. package/dist/esm/field/field.styles.js +13 -12
  14. package/dist/esm/field/field.styles.js.map +1 -1
  15. package/dist/esm/label/label.template.js +1 -1
  16. package/dist/esm/label/label.template.js.map +1 -1
  17. package/dist/esm/progress-bar/progress-bar.base.d.ts +4 -5
  18. package/dist/esm/progress-bar/progress-bar.base.js +26 -15
  19. package/dist/esm/progress-bar/progress-bar.base.js.map +1 -1
  20. package/dist/esm/progress-bar/progress-bar.d.ts +1 -1
  21. package/dist/esm/progress-bar/progress-bar.styles.js +11 -0
  22. package/dist/esm/progress-bar/progress-bar.styles.js.map +1 -1
  23. package/dist/esm/progress-bar/progress-bar.template.js +2 -8
  24. package/dist/esm/progress-bar/progress-bar.template.js.map +1 -1
  25. package/dist/esm/radio-group/radio-group.styles.js +5 -1
  26. package/dist/esm/radio-group/radio-group.styles.js.map +1 -1
  27. package/dist/esm/styles/states/index.d.ts +5 -0
  28. package/dist/esm/styles/states/index.js +5 -0
  29. package/dist/esm/styles/states/index.js.map +1 -1
  30. package/dist/esm/text/text.styles.js +0 -1
  31. package/dist/esm/text/text.styles.js.map +1 -1
  32. package/dist/web-components.d.ts +16 -6
  33. package/dist/web-components.js +53 -22
  34. package/dist/web-components.min.js +120 -120
  35. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.styles.js","sourceRoot":"","sources":["../../../src/radio-group/radio-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,MAAM,CAAC;;;;;WAKR,gBAAgB;;;;;;;;;;;;;aAad,uBAAuB;;;;aAIvB,uBAAuB;;;;aAIvB,uBAAuB;;;cAGtB,aAAa;aACd,8BAA8B;;;cAG7B,YAAY;aACb,uBAAuB;;CAEnC,CAAC"}
1
+ {"version":3,"file":"radio-group.styles.js","sourceRoot":"","sources":["../../../src/radio-group/radio-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,MAAM,CAAC;;;;;WAKR,gBAAgB;;;;;;;;;;;;;aAad,uBAAuB;;;;aAIvB,uBAAuB;;;;aAIvB,uBAAuB;;;cAGtB,aAAa;aACd,8BAA8B;;;cAG7B,YAAY;aACb,uBAAuB;;;;cAItB,gBAAgB,IAAI,kBAAkB;;CAEnD,CAAC"}
@@ -87,6 +87,11 @@ export declare const rangeOverflowState: ":state(range-overflow)" | "[state--ran
87
87
  * @public
88
88
  */
89
89
  export declare const rangeUnderflowState: ":state(range-underflow)" | "[state--range-underflow]";
90
+ /**
91
+ * Selector for the `required` state.
92
+ * @public
93
+ */
94
+ export declare const requiredState: ":state(required)" | "[state--required]";
90
95
  /**
91
96
  * Selector for the `selected` state.
92
97
  * @public
@@ -88,6 +88,11 @@ export const rangeOverflowState = stateSelector('range-overflow');
88
88
  * @public
89
89
  */
90
90
  export const rangeUnderflowState = stateSelector('range-underflow');
91
+ /**
92
+ * Selector for the `required` state.
93
+ * @public
94
+ */
95
+ export const requiredState = stateSelector('required');
91
96
  /**
92
97
  * Selector for the `selected` state.
93
98
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/styles/states/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;AAEvD;;;GAGG;A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AC,CAAC;AAEtD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC"}
@@ -8,7 +8,6 @@ export const styles = css `
8
8
  ${display('inline')}
9
9
 
10
10
  :host {
11
- contain: content;
12
11
  font-family: ${fontFamilyBase};
13
12
  font-size: ${fontSizeBase300};
14
13
  line-height: ${lineHeightBase300};
@@ -1 +1 @@
1
- {"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../src/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAC;;;;mBAIF,cAAc;iBAChB,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,gBAAgB;mBACd,kBAAkB;;;mBAGlB,mBAAmB;;;mBAGnB,iBAAiB;;;mBAGjB,gBAAgB;;;mBAGhB,kBAAkB;;;mBAGlB,cAAc;;;;;;;;;;;;;;;;;;;;CAoBhC,CAAC"}
1
+ {"version":3,"file":"text.styles.js","sourceRoot":"","sources":["../../../src/text/text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAC;;;mBAGF,cAAc;iBAChB,eAAe;mBACb,iBAAiB;mBACjB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6BnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,eAAe;mBACb,iBAAiB;;;iBAGnB,gBAAgB;mBACd,kBAAkB;;;mBAGlB,mBAAmB;;;mBAGnB,iBAAiB;;;mBAGjB,gBAAgB;;;mBAGhB,kBAAkB;;;mBAGlB,cAAc;;;;;;;;;;;;;;;;;;;;CAoBhC,CAAC"}
@@ -1336,6 +1336,14 @@ export declare class BaseCheckbox extends FASTElement {
1336
1336
  * @internal
1337
1337
  */
1338
1338
  protected initialValueChanged(prev: string, next: string): void;
1339
+ /**
1340
+ * Tracks whether the space key was pressed down while the checkbox was focused.
1341
+ * This is used to prevent inadvertently checking a required, unchecked checkbox when the space key is pressed on a
1342
+ * submit button and field validation is triggered.
1343
+ *
1344
+ * @internal
1345
+ */
1346
+ private _keydownPressed;
1339
1347
  /**
1340
1348
  * The name of the element. This element's value will be surfaced during form submission under the provided name.
1341
1349
  *
@@ -1467,7 +1475,8 @@ export declare class BaseCheckbox extends FASTElement {
1467
1475
  */
1468
1476
  inputHandler(e: InputEvent): boolean | void;
1469
1477
  /**
1470
- * Prevents scrolling when the user presses the space key.
1478
+ * Prevents scrolling when the user presses the space key, and sets a flag to indicate that the space key was pressed
1479
+ * down while the checkbox was focused.
1471
1480
  *
1472
1481
  * @param e - the event object
1473
1482
  * @internal
@@ -2140,6 +2149,8 @@ export declare class BaseField extends FASTElement {
2140
2149
  */
2141
2150
  clickHandler(e: MouseEvent): boolean | void;
2142
2151
  constructor();
2152
+ connectedCallback(): void;
2153
+ disconnectedCallback(): void;
2143
2154
  /**
2144
2155
  * Applies the `focus-visible` state to the element when the slotted input receives visible focus.
2145
2156
  *
@@ -2183,6 +2194,8 @@ export declare class BaseField extends FASTElement {
2183
2194
  * @public
2184
2195
  */
2185
2196
  export declare class BaseProgressBar extends FASTElement {
2197
+ /** @internal */
2198
+ indicator: HTMLElement;
2186
2199
  /**
2187
2200
  * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
2188
2201
  *
@@ -2240,12 +2253,9 @@ export declare class BaseProgressBar extends FASTElement {
2240
2253
  * @internal
2241
2254
  */
2242
2255
  protected maxChanged(prev: number | undefined, next: number | undefined): void;
2243
- /**
2244
- * Indicates progress in %
2245
- * @internal
2246
- */
2247
- get percentComplete(): number;
2248
2256
  constructor();
2257
+ connectedCallback(): void;
2258
+ private setIndicatorWidth;
2249
2259
  }
2250
2260
 
2251
2261
  /**
@@ -5961,7 +5961,7 @@ class BaseButton extends FASTElement {
5961
5961
  if (!this.elementInternals.form || this.disabled || this.type !== ButtonType.submit) {
5962
5962
  return;
5963
5963
  }
5964
- if (!this.name && !this.formAction && !this.formEnctype && !this.form && !this.formMethod && !this.formNoValidate && !this.formTarget) {
5964
+ if (!this.name && !this.formAction && !this.formEnctype && !this.formAttribute && !this.formMethod && !this.formNoValidate && !this.formTarget) {
5965
5965
  this.elementInternals.form.requestSubmit();
5966
5966
  return;
5967
5967
  }
@@ -6069,6 +6069,14 @@ class BaseCheckbox extends FASTElement {
6069
6069
  constructor() {
6070
6070
  super(...arguments);
6071
6071
  this.initialValue = "on";
6072
+ /**
6073
+ * Tracks whether the space key was pressed down while the checkbox was focused.
6074
+ * This is used to prevent inadvertently checking a required, unchecked checkbox when the space key is pressed on a
6075
+ * submit button and field validation is triggered.
6076
+ *
6077
+ * @internal
6078
+ */
6079
+ this._keydownPressed = false;
6072
6080
  /**
6073
6081
  * Indicates that the checked state has been changed by the user.
6074
6082
  *
@@ -6287,7 +6295,8 @@ class BaseCheckbox extends FASTElement {
6287
6295
  return true;
6288
6296
  }
6289
6297
  /**
6290
- * Prevents scrolling when the user presses the space key.
6298
+ * Prevents scrolling when the user presses the space key, and sets a flag to indicate that the space key was pressed
6299
+ * down while the checkbox was focused.
6291
6300
  *
6292
6301
  * @param e - the event object
6293
6302
  * @internal
@@ -6296,6 +6305,7 @@ class BaseCheckbox extends FASTElement {
6296
6305
  if (e.key !== " ") {
6297
6306
  return true;
6298
6307
  }
6308
+ this._keydownPressed = true;
6299
6309
  }
6300
6310
  /**
6301
6311
  * Toggles the checked state when the user releases the space key.
@@ -6304,9 +6314,10 @@ class BaseCheckbox extends FASTElement {
6304
6314
  * @internal
6305
6315
  */
6306
6316
  keyupHandler(e) {
6307
- if (e.key !== " ") {
6317
+ if (!this._keydownPressed || e.key !== " ") {
6308
6318
  return true;
6309
6319
  }
6320
+ this._keydownPressed = false;
6310
6321
  this.click();
6311
6322
  }
6312
6323
  /**
@@ -6481,7 +6492,7 @@ const disabledState = stateSelector("disabled");
6481
6492
  stateSelector("error");
6482
6493
  const flipBlockState = stateSelector("flip-block");
6483
6494
  const focusVisibleState = stateSelector("focus-visible");
6484
- const hasMessageState = stateSelector("has-message");
6495
+ stateSelector("has-message");
6485
6496
  const indeterminateState = stateSelector("indeterminate");
6486
6497
  const multipleState = stateSelector("multiple");
6487
6498
  const openState = stateSelector("open");
@@ -6490,6 +6501,7 @@ const placeholderShownState = stateSelector("placeholder-shown");
6490
6501
  const pressedState = stateSelector("pressed");
6491
6502
  const rangeOverflowState = stateSelector("range-overflow");
6492
6503
  const rangeUnderflowState = stateSelector("range-underflow");
6504
+ const requiredState = stateSelector("required");
6493
6505
  const selectedState = stateSelector("selected");
6494
6506
  const stepMismatchState = stateSelector("step-mismatch");
6495
6507
  const submenuState = stateSelector("submenu");
@@ -7209,6 +7221,7 @@ const _BaseDropdown = class _BaseDropdown extends FASTElement {
7209
7221
  if (next) {
7210
7222
  next.dropdown = this;
7211
7223
  next.popover = "manual";
7224
+ next.tabIndex = -1;
7212
7225
  this.listboxSlot.assign(next);
7213
7226
  const notifier = Observable.getNotifier(this);
7214
7227
  notifier.subscribe(next);
@@ -7895,15 +7908,6 @@ class BaseField extends FASTElement {
7895
7908
  */
7896
7909
  messageSlotChanged(prev, next) {
7897
7910
  toggleState(this.elementInternals, "has-message", !!next.length);
7898
- if (!next.length) {
7899
- this.removeEventListener("invalid", this.invalidHandler, {
7900
- capture: true
7901
- });
7902
- return;
7903
- }
7904
- this.addEventListener("invalid", this.invalidHandler, {
7905
- capture: true
7906
- });
7907
7911
  }
7908
7912
  /**
7909
7913
  * Sets the `input` property to the first slotted input.
@@ -7953,6 +7957,18 @@ class BaseField extends FASTElement {
7953
7957
  }
7954
7958
  return true;
7955
7959
  }
7960
+ connectedCallback() {
7961
+ super.connectedCallback();
7962
+ this.addEventListener("invalid", this.invalidHandler, {
7963
+ capture: true
7964
+ });
7965
+ }
7966
+ disconnectedCallback() {
7967
+ this.removeEventListener("invalid", this.invalidHandler, {
7968
+ capture: true
7969
+ });
7970
+ super.disconnectedCallback();
7971
+ }
7956
7972
  /**
7957
7973
  * Applies the `focus-visible` state to the element when the slotted input receives visible focus.
7958
7974
  *
@@ -8053,7 +8069,7 @@ __decorateClass$w([attr({
8053
8069
  const styles$r = css`
8054
8070
  ${display("inline-grid")}
8055
8071
 
8056
- :host{color:${colorNeutralForeground1};align-items:center;gap:0 ${spacingHorizontalM};justify-items:start;position:relative}:has([slot='message']){color:${colorNeutralForeground1};row-gap:${spacingVerticalS}}:not(::slotted([slot='label'])){gap:0}:host([label-position='before']){grid-template-areas:'label input' 'label message'}:host([label-position='after']){gap:0;grid-template-areas:'input label' 'message message';grid-template-columns:auto 1fr}:host([label-position='after']) ::slotted([slot='input']){margin-inline-end:${spacingHorizontalM}}:host([label-position='above']){grid-template-areas:'label' 'input' 'message';row-gap:${spacingVerticalXXS}}:host([label-position='below']){grid-template-areas:'input' 'label' 'message';justify-items:center}:host([label-position='below']) ::slotted([slot='label']){margin-block-start:${spacingVerticalM}}:host([label-position='below']:not(${hasMessageState})){grid-template-areas:'input' 'label'}::slotted([slot='label'])::after{content:'';display:block;position:absolute;inset:0}::slotted([slot='input']){grid-area:input;position:relative;z-index:1}::slotted([slot='message']){margin-block-start:${spacingVerticalXXS};grid-area:message}:host(${focusVisibleState}:focus-within){border-radius:${borderRadiusMedium};outline:${strokeWidthThick} solid ${colorStrokeFocus2}}::slotted(label),::slotted([slot='label']){cursor:inherit;display:inline-flex;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};grid-area:label;line-height:${lineHeightBase300};user-select:none}:host([size='small']) ::slotted(label){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']) ::slotted(label){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large']) ::slotted(label),:host([weight='semibold']) ::slotted(label){font-weight:${fontWeightSemibold}}:host(${disabledState}){cursor:default}::slotted([flag]){display:none}:host(${badInputState}) ::slotted([flag='${ValidationFlags.badInput}']),:host(${customErrorState}) ::slotted([flag='${ValidationFlags.customError}']),:host(${patternMismatchState}) ::slotted([flag='${ValidationFlags.patternMismatch}']),:host(${rangeOverflowState}) ::slotted([flag='${ValidationFlags.rangeOverflow}']),:host(${rangeUnderflowState}) ::slotted([flag='${ValidationFlags.rangeUnderflow}']),:host(${stepMismatchState}) ::slotted([flag='${ValidationFlags.stepMismatch}']),:host(${tooLongState}) ::slotted([flag='${ValidationFlags.tooLong}']),:host(${tooShortState}) ::slotted([flag='${ValidationFlags.tooShort}']),:host(${typeMismatchState}) ::slotted([flag='${ValidationFlags.typeMismatch}']),:host(${valueMissingState}) ::slotted([flag='${ValidationFlags.valueMissing}']),:host(${validState}) ::slotted([flag='${ValidationFlags.valid}']){display:block}`;
8072
+ :host{color:${colorNeutralForeground1};align-items:center;gap:0 ${spacingHorizontalM};justify-items:start;position:relative}:has([slot='message']){color:${colorNeutralForeground1};row-gap:${spacingVerticalS}}:not(::slotted([slot='label'])){gap:0}:host([label-position='before']){grid-template-areas:'label input' 'label message'}:host([label-position='after']){gap:0;grid-template-areas:'input label' 'message message';grid-template-columns:auto 1fr}:host([label-position='after']) ::slotted([slot='input']){margin-inline-end:${spacingHorizontalM}}:host([label-position='above']){grid-template-areas:'label' 'input' 'message';row-gap:${spacingVerticalXXS}}:host([label-position='below']){grid-template-areas:'input' 'label' 'message';justify-items:center}:host([label-position='below']) ::slotted([slot='label']){margin-block-start:${spacingVerticalM}}:host(${requiredState}) ::slotted([slot='label'])::after{content:'*' / '';color:${colorPaletteRedForeground1};margin-inline-start:${spacingHorizontalXS}}::slotted([slot='input']){grid-area:input;position:relative;z-index:1}::slotted([slot='message']){color:${colorNeutralForeground3};font-family:${fontFamilyBase};font-size:${fontSizeBase200};font-weight:${fontWeightRegular};grid-area:message;line-height:${lineHeightBase200};margin-block-start:${spacingVerticalXXS}}:host(${focusVisibleState}:focus-within){border-radius:${borderRadiusMedium};outline:${strokeWidthThick} solid ${colorStrokeFocus2}}::slotted(label),::slotted([slot='label']){cursor:inherit;display:inline-flex;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};grid-area:label;line-height:${lineHeightBase300};justify-self:stretch;user-select:none}:host([size='small']) ::slotted(label){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']) ::slotted(label){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large']) ::slotted(label),:host([weight='semibold']) ::slotted(label){font-weight:${fontWeightSemibold}}:host(${disabledState}){cursor:default}::slotted([flag]){display:none}:host(${badInputState}) ::slotted([flag='${ValidationFlags.badInput}']),:host(${customErrorState}) ::slotted([flag='${ValidationFlags.customError}']),:host(${patternMismatchState}) ::slotted([flag='${ValidationFlags.patternMismatch}']),:host(${rangeOverflowState}) ::slotted([flag='${ValidationFlags.rangeOverflow}']),:host(${rangeUnderflowState}) ::slotted([flag='${ValidationFlags.rangeUnderflow}']),:host(${stepMismatchState}) ::slotted([flag='${ValidationFlags.stepMismatch}']),:host(${tooLongState}) ::slotted([flag='${ValidationFlags.tooLong}']),:host(${tooShortState}) ::slotted([flag='${ValidationFlags.tooShort}']),:host(${typeMismatchState}) ::slotted([flag='${ValidationFlags.typeMismatch}']),:host(${valueMissingState}) ::slotted([flag='${ValidationFlags.valueMissing}']),:host(${validState}) ::slotted([flag='${ValidationFlags.valid}']){display:block}`;
8057
8073
 
8058
8074
  const template$s = html`<template @click="${(x, c) => x.clickHandler(c.event)}" @change="${(x, c) => x.changeHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" ${children({
8059
8075
  property: "slottedInputs",
@@ -8142,7 +8158,7 @@ const styles$p = css`
8142
8158
  :host{color:${colorNeutralForeground1};cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};user-select:none}.asterisk{color:${colorPaletteRedForeground1};margin-inline-start:${spacingHorizontalXS}}:host([size='small']){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(:is([size='large'],[weight='semibold'])){font-weight:${fontWeightSemibold}}:host([disabled]),:host([disabled]) .asterisk{color:${colorNeutralForegroundDisabled}}`;
8143
8159
 
8144
8160
  function labelTemplate() {
8145
- return html`<slot></slot><span part="asterisk" class="asterisk" ?hidden="${x => !x.required}">*</span>`;
8161
+ return html`<slot></slot><span part="asterisk" class="asterisk" aria-hidden="true" ?hidden="${x => !x.required}">*</span>`;
8146
8162
  }
8147
8163
  const template$q = labelTemplate();
8148
8164
 
@@ -9595,6 +9611,7 @@ class BaseProgressBar extends FASTElement {
9595
9611
  */
9596
9612
  valueChanged(prev, next) {
9597
9613
  this.elementInternals.ariaValueNow = typeof next === "number" ? `${next}` : null;
9614
+ this.setIndicatorWidth();
9598
9615
  }
9599
9616
  /**
9600
9617
  * Updates the percent complete when the `min` property changes.
@@ -9604,6 +9621,7 @@ class BaseProgressBar extends FASTElement {
9604
9621
  */
9605
9622
  minChanged(prev, next) {
9606
9623
  this.elementInternals.ariaValueMin = typeof next === "number" ? `${next}` : null;
9624
+ this.setIndicatorWidth();
9607
9625
  }
9608
9626
  /**
9609
9627
  * Updates the percent complete when the `max` property changes.
@@ -9614,15 +9632,29 @@ class BaseProgressBar extends FASTElement {
9614
9632
  */
9615
9633
  maxChanged(prev, next) {
9616
9634
  this.elementInternals.ariaValueMax = typeof next === "number" ? `${next}` : null;
9635
+ this.setIndicatorWidth();
9617
9636
  }
9618
- get percentComplete() {
9637
+ connectedCallback() {
9638
+ super.connectedCallback();
9639
+ this.setIndicatorWidth();
9640
+ }
9641
+ setIndicatorWidth() {
9642
+ if (!this.$fastController.isConnected || CSS.supports("width: attr(value type(<number>))")) {
9643
+ return;
9644
+ }
9645
+ if (Number.isNaN(this.value)) {
9646
+ this.indicator.style.removeProperty("width");
9647
+ return;
9648
+ }
9619
9649
  const min = this.min ?? 0;
9620
9650
  const max = this.max ?? 100;
9621
9651
  const value = this.value ?? 0;
9622
9652
  const range = max - min;
9623
- return range === 0 ? 0 : Math.fround((value - min) / range * 100);
9653
+ const width = range === 0 ? 0 : Math.fround((value - min) / range * 100);
9654
+ this.indicator.style.setProperty("width", `${width}%`);
9624
9655
  }
9625
9656
  }
9657
+ __decorateClass$m([observable], BaseProgressBar.prototype, "indicator", 2);
9626
9658
  __decorateClass$m([attr({
9627
9659
  attribute: "validation-state"
9628
9660
  })], BaseProgressBar.prototype, "validationState", 2);
@@ -9635,7 +9667,6 @@ __decorateClass$m([attr({
9635
9667
  __decorateClass$m([attr({
9636
9668
  converter: nullableNumberConverter
9637
9669
  })], BaseProgressBar.prototype, "max", 2);
9638
- __decorateClass$m([volatile], BaseProgressBar.prototype, "percentComplete", 1);
9639
9670
 
9640
9671
  var __defProp$l = Object.defineProperty;
9641
9672
  var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
@@ -9652,13 +9683,13 @@ __decorateClass$l([attr], ProgressBar.prototype, "shape", 2);
9652
9683
  const styles$h = css`
9653
9684
  ${display("block")}
9654
9685
 
9655
- :host{width:100%;height:2px;overflow-x:hidden;background-color:${colorNeutralBackground6};border-radius:${borderRadiusMedium};contain:content}:host([thickness='large']){height:4px}:host([shape='square']){border-radius:${borderRadiusNone}}.indicator{background-color:${colorCompoundBrandBackground};border-radius:inherit;height:100%}:host([value]) .indicator{transition:all 0.2s ease-in-out}:host(:not([value])) .indicator{position:relative;width:33%;background-image:linear-gradient(
9686
+ :host{width:100%;height:2px;overflow-x:hidden;background-color:${colorNeutralBackground6};border-radius:${borderRadiusMedium};contain:content;@supports (width:attr(value type(<number>))){--max:attr(max type(<number>),100);--min:attr(min type(<number>),0);--value:attr(value type(<number>),0);--indicator-width:clamp(0%,calc((var(--value) - var(--min)) / (var(--max) - var(--min)) * 100%),100%)}}:host([thickness='large']){height:4px}:host([shape='square']){border-radius:${borderRadiusNone}}.indicator{background-color:${colorCompoundBrandBackground};border-radius:inherit;height:100%}:host([value]) .indicator{transition:all 0.2s ease-in-out;@supports (width:attr(value type(<number>))){width:var(--indicator-width)}}:host(:not([value])) .indicator{position:relative;width:33%;background-image:linear-gradient(
9656
9687
  to right,${colorNeutralBackground6} 0%,${colorTransparentBackground} 50%,${colorNeutralBackground6} 100%
9657
9688
  );animation-name:indeterminate;animation-duration:3s;animation-timing-function:linear;animation-iteration-count:infinite}:host([validation-state='error']) .indicator{background-color:${colorPaletteRedBackground3}}:host([validation-state='warning']) .indicator{background-color:${colorPaletteDarkOrangeBackground3}}:host([validation-state='success']) .indicator{background-color:${colorPaletteGreenBackground3}}@layer animations{@media (prefers-reduced-motion:no-preference){:host([value]){transition:none}:host(:not([value])) .indicator{animation-duration:0.01ms;animation-iteration-count:1}}}@keyframes indeterminate{0%{inset-inline-start:-33%}100%{inset-inline-start:100%}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
9658
9689
  :host{background-color:CanvasText}.indicator,:host(:is([validation-state='success'],[validation-state='warning'],[validation-state='error'])) .indicator{background-color:Highlight}`));
9659
9690
 
9660
9691
  function progressTemplate() {
9661
- return html`<div class="indicator" part="indicator" style="${x => typeof x.value === "number" ? `width: ${x.percentComplete}%` : void 0}"></div>`;
9692
+ return html`<div class="indicator" part="indicator" ${ref("indicator")}></div>`;
9662
9693
  }
9663
9694
  const template$h = progressTemplate();
9664
9695
 
@@ -10206,7 +10237,7 @@ __decorateClass$k([attr({
10206
10237
  const styles$g = css`
10207
10238
  ${display("flex")}
10208
10239
 
10209
- :host{-webkit-tap-highlight-color:transparent;cursor:pointer;gap:${spacingVerticalL}}:host([orientation='vertical']){flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']){flex-direction:row}::slotted(*){color:${colorNeutralForeground3}}::slotted(:hover){color:${colorNeutralForeground2}}::slotted(:active){color:${colorNeutralForeground1}}::slotted(${disabledState}){color:${colorNeutralForegroundDisabled}}::slotted(${checkedState}){color:${colorNeutralForeground1}}`;
10240
+ :host{-webkit-tap-highlight-color:transparent;cursor:pointer;gap:${spacingVerticalL}}:host([orientation='vertical']){flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']){flex-direction:row}::slotted(*){color:${colorNeutralForeground3}}::slotted(:hover){color:${colorNeutralForeground2}}::slotted(:active){color:${colorNeutralForeground1}}::slotted(${disabledState}){color:${colorNeutralForegroundDisabled}}::slotted(${checkedState}){color:${colorNeutralForeground1}}:host([slot='input']){margin:${spacingVerticalS} ${spacingHorizontalS}}`;
10210
10241
 
10211
10242
  function radioGroupTemplate() {
10212
10243
  return html`<template @disabled="${(x, c) => x.disabledRadioHandler(c.event)}" @change="${(x, c) => x.changeHandler(c.event)}" @click="${(x, c) => x.clickHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><slot @slotchange="${(x, c) => x.slotchangeHandler(c.event)}"></slot></template>`;
@@ -12965,7 +12996,7 @@ __decorateClass$6([attr], Text.prototype, "align", 2);
12965
12996
  const styles$4 = css`
12966
12997
  ${display("inline")}
12967
12998
 
12968
- :host{contain:content;font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};font-weight:${fontWeightRegular};text-align:start}:host([nowrap]),:host([nowrap]) ::slotted(*){white-space:nowrap;overflow:hidden}:host([truncate]),:host([truncate]) ::slotted(*){text-overflow:ellipsis}:host([block]){display:block}:host([italic]){font-style:italic}:host([underline]){text-decoration-line:underline}:host([strikethrough]){text-decoration-line:line-through}:host([underline][strikethrough]){text-decoration-line:line-through underline}:host([size='100']){font-size:${fontSizeBase100};line-height:${lineHeightBase100}}:host([size='200']){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='400']){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='500']){font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host([size='600']){font-size:${fontSizeBase600};line-height:${lineHeightBase600}}:host([size='700']){font-size:${fontSizeHero700};line-height:${lineHeightHero700}}:host([size='800']){font-size:${fontSizeHero800};line-height:${lineHeightHero800}}:host([size='900']){font-size:${fontSizeHero900};line-height:${lineHeightHero900}}:host([size='1000']){font-size:${fontSizeHero1000};line-height:${lineHeightHero1000}}:host([font='monospace']){font-family:${fontFamilyMonospace}}:host([font='numeric']){font-family:${fontFamilyNumeric}}:host([weight='medium']){font-weight:${fontWeightMedium}}:host([weight='semibold']){font-weight:${fontWeightSemibold}}:host([weight='bold']){font-weight:${fontWeightBold}}:host([align='center']){text-align:center}:host([align='end']){text-align:end}:host([align='justify']){text-align:justify}::slotted(*){font:inherit;line-height:inherit;text-decoration-line:inherit;text-align:inherit;text-decoration-line:inherit;margin:0}`;
12999
+ :host{font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};font-weight:${fontWeightRegular};text-align:start}:host([nowrap]),:host([nowrap]) ::slotted(*){white-space:nowrap;overflow:hidden}:host([truncate]),:host([truncate]) ::slotted(*){text-overflow:ellipsis}:host([block]){display:block}:host([italic]){font-style:italic}:host([underline]){text-decoration-line:underline}:host([strikethrough]){text-decoration-line:line-through}:host([underline][strikethrough]){text-decoration-line:line-through underline}:host([size='100']){font-size:${fontSizeBase100};line-height:${lineHeightBase100}}:host([size='200']){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='400']){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='500']){font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host([size='600']){font-size:${fontSizeBase600};line-height:${lineHeightBase600}}:host([size='700']){font-size:${fontSizeHero700};line-height:${lineHeightHero700}}:host([size='800']){font-size:${fontSizeHero800};line-height:${lineHeightHero800}}:host([size='900']){font-size:${fontSizeHero900};line-height:${lineHeightHero900}}:host([size='1000']){font-size:${fontSizeHero1000};line-height:${lineHeightHero1000}}:host([font='monospace']){font-family:${fontFamilyMonospace}}:host([font='numeric']){font-family:${fontFamilyNumeric}}:host([weight='medium']){font-weight:${fontWeightMedium}}:host([weight='semibold']){font-weight:${fontWeightSemibold}}:host([weight='bold']){font-weight:${fontWeightBold}}:host([align='center']){text-align:center}:host([align='end']){text-align:end}:host([align='justify']){text-align:justify}::slotted(*){font:inherit;line-height:inherit;text-decoration-line:inherit;text-align:inherit;text-decoration-line:inherit;margin:0}`;
12969
13000
 
12970
13001
  const template$4 = html`<slot></slot>`;
12971
13002