@fluentui/web-components 3.0.0-beta.30 → 3.0.0-beta.32

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 (87) hide show
  1. package/CHANGELOG.md +28 -2
  2. package/dist/dts/anchor-button/anchor-button.d.ts +39 -4
  3. package/dist/dts/anchor-button/anchor-button.options.d.ts +0 -1
  4. package/dist/dts/badge/badge.d.ts +30 -0
  5. package/dist/dts/button/button.d.ts +25 -1
  6. package/dist/dts/button/button.options.d.ts +0 -1
  7. package/dist/dts/checkbox/checkbox.d.ts +13 -1
  8. package/dist/dts/compound-button/compound-button.options.d.ts +0 -5
  9. package/dist/dts/counter-badge/counter-badge.d.ts +36 -0
  10. package/dist/dts/divider/divider.d.ts +18 -0
  11. package/dist/dts/image/image.d.ts +36 -0
  12. package/dist/dts/label/label.d.ts +24 -0
  13. package/dist/dts/link/link.d.ts +12 -0
  14. package/dist/dts/menu-button/menu-button.options.d.ts +0 -1
  15. package/dist/dts/progress-bar/progress-bar.d.ts +18 -0
  16. package/dist/dts/spinner/spinner.d.ts +13 -1
  17. package/dist/dts/styles/states/index.d.ts +175 -0
  18. package/dist/dts/text-input/text-input.d.ts +12 -0
  19. package/dist/dts/toggle-button/toggle-button.options.d.ts +0 -1
  20. package/dist/esm/anchor-button/anchor-button.js +76 -8
  21. package/dist/esm/anchor-button/anchor-button.js.map +1 -1
  22. package/dist/esm/anchor-button/anchor-button.styles.js +8 -1
  23. package/dist/esm/anchor-button/anchor-button.styles.js.map +1 -1
  24. package/dist/esm/anchor-button/anchor-button.template.js +2 -2
  25. package/dist/esm/anchor-button/anchor-button.template.js.map +1 -1
  26. package/dist/esm/badge/badge.js +59 -0
  27. package/dist/esm/badge/badge.js.map +1 -1
  28. package/dist/esm/badge/badge.styles.js +6 -5
  29. package/dist/esm/badge/badge.styles.js.map +1 -1
  30. package/dist/esm/button/button.js +48 -0
  31. package/dist/esm/button/button.js.map +1 -1
  32. package/dist/esm/button/button.options.js +0 -1
  33. package/dist/esm/button/button.options.js.map +1 -1
  34. package/dist/esm/button/button.styles.js +40 -49
  35. package/dist/esm/button/button.styles.js.map +1 -1
  36. package/dist/esm/checkbox/checkbox.js +26 -0
  37. package/dist/esm/checkbox/checkbox.js.map +1 -1
  38. package/dist/esm/checkbox/checkbox.styles.js +6 -5
  39. package/dist/esm/checkbox/checkbox.styles.js.map +1 -1
  40. package/dist/esm/compound-button/compound-button.styles.js +14 -15
  41. package/dist/esm/compound-button/compound-button.styles.js.map +1 -1
  42. package/dist/esm/counter-badge/counter-badge.js +67 -0
  43. package/dist/esm/counter-badge/counter-badge.js.map +1 -1
  44. package/dist/esm/counter-badge/counter-badge.styles.js +12 -6
  45. package/dist/esm/counter-badge/counter-badge.styles.js.map +1 -1
  46. package/dist/esm/divider/divider.js +47 -2
  47. package/dist/esm/divider/divider.js.map +1 -1
  48. package/dist/esm/divider/divider.styles.js +31 -30
  49. package/dist/esm/divider/divider.styles.js.map +1 -1
  50. package/dist/esm/image/image.js +68 -0
  51. package/dist/esm/image/image.js.map +1 -1
  52. package/dist/esm/image/image.styles.js +10 -9
  53. package/dist/esm/image/image.styles.js.map +1 -1
  54. package/dist/esm/label/label.js +41 -0
  55. package/dist/esm/label/label.js.map +1 -1
  56. package/dist/esm/label/label.styles.js +7 -6
  57. package/dist/esm/label/label.styles.js.map +1 -1
  58. package/dist/esm/link/link.js +22 -0
  59. package/dist/esm/link/link.js.map +1 -1
  60. package/dist/esm/link/link.styles.js +11 -4
  61. package/dist/esm/link/link.styles.js.map +1 -1
  62. package/dist/esm/link/link.template.js +2 -2
  63. package/dist/esm/link/link.template.js.map +1 -1
  64. package/dist/esm/progress-bar/progress-bar.js +40 -0
  65. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  66. package/dist/esm/progress-bar/progress-bar.styles.js +7 -6
  67. package/dist/esm/progress-bar/progress-bar.styles.js.map +1 -1
  68. package/dist/esm/spinner/spinner.js +27 -0
  69. package/dist/esm/spinner/spinner.js.map +1 -1
  70. package/dist/esm/spinner/spinner.styles.js +9 -8
  71. package/dist/esm/spinner/spinner.styles.js.map +1 -1
  72. package/dist/esm/styles/partials/badge.partials.js +43 -42
  73. package/dist/esm/styles/partials/badge.partials.js.map +1 -1
  74. package/dist/esm/styles/states/index.js +177 -0
  75. package/dist/esm/styles/states/index.js.map +1 -0
  76. package/dist/esm/text-input/text-input.js +27 -0
  77. package/dist/esm/text-input/text-input.js.map +1 -1
  78. package/dist/esm/text-input/text-input.styles.js +23 -22
  79. package/dist/esm/text-input/text-input.styles.js.map +1 -1
  80. package/dist/esm/toggle-button/toggle-button.js +2 -1
  81. package/dist/esm/toggle-button/toggle-button.js.map +1 -1
  82. package/dist/esm/toggle-button/toggle-button.styles.js +24 -23
  83. package/dist/esm/toggle-button/toggle-button.styles.js.map +1 -1
  84. package/dist/web-components.d.ts +276 -16
  85. package/dist/web-components.js +649 -94
  86. package/dist/web-components.min.js +341 -340
  87. package/package.json +3 -2
@@ -4177,6 +4177,20 @@ const definition$u = Accordion.compose({
4177
4177
 
4178
4178
  definition$u.define(FluentDesignSystem.registry);
4179
4179
 
4180
+ const CustomStatesSetSupported = CSS.supports("selector(:state(g))");
4181
+ function toggleState(elementInternals, state, force) {
4182
+ if (!CustomStatesSetSupported) {
4183
+ elementInternals.shadowRoot.host.toggleAttribute(`state--${state}`, force);
4184
+ return;
4185
+ }
4186
+ force = force ?? !elementInternals.states.has(state);
4187
+ if (force) {
4188
+ elementInternals.states.add(state);
4189
+ return;
4190
+ }
4191
+ elementInternals.states.delete(state);
4192
+ }
4193
+
4180
4194
  const ButtonType = {
4181
4195
  submit: "submit",
4182
4196
  reset: "reset",
@@ -4205,6 +4219,11 @@ var __decorateClass$p = (decorators, target, key, kind) => {
4205
4219
  class BaseAnchor extends FASTElement {
4206
4220
  constructor() {
4207
4221
  super();
4222
+ /**
4223
+ * Holds a reference to the platform to manage ctrl+click on Windows and cmd+click on Mac
4224
+ * @internal
4225
+ */
4226
+ this.isMac = navigator.userAgent.includes("Mac");
4208
4227
  /**
4209
4228
  * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
4210
4229
  *
@@ -4250,24 +4269,38 @@ class BaseAnchor extends FASTElement {
4250
4269
  * @param e - The event object
4251
4270
  * @internal
4252
4271
  */
4253
- clickHandler() {
4254
- this.internalProxyAnchor.click();
4272
+ clickHandler(e) {
4273
+ if (this.href) {
4274
+ const newTab = !this.isMac ? e.ctrlKey : e.metaKey;
4275
+ this.handleNavigation(newTab);
4276
+ }
4255
4277
  return true;
4256
4278
  }
4257
4279
  /**
4258
- * Handles keypress events for the anchor.
4280
+ * Handles keydown events for the anchor.
4259
4281
  *
4260
4282
  * @param e - the keyboard event
4261
4283
  * @returns - the return value of the click handler
4262
4284
  * @public
4263
4285
  */
4264
- keypressHandler(e) {
4265
- if (e.key === keyEnter) {
4266
- this.internalProxyAnchor.click();
4267
- return;
4286
+ keydownHandler(e) {
4287
+ if (this.href) {
4288
+ if (e.key === keyEnter) {
4289
+ const newTab = !this.isMac ? e.ctrlKey : e.metaKey || e.ctrlKey;
4290
+ this.handleNavigation(newTab);
4291
+ return;
4292
+ }
4268
4293
  }
4269
4294
  return true;
4270
4295
  }
4296
+ /**
4297
+ * Handles navigation based on input
4298
+ * If the metaKey is pressed, opens the href in a new window, if false, uses the click on the proxy
4299
+ * @internal
4300
+ */
4301
+ handleNavigation(newTab) {
4302
+ newTab ? window.open(this.href, "_blank") : this.internalProxyAnchor.click();
4303
+ }
4271
4304
  /**
4272
4305
  * A method for updating proxy attributes when attributes have changed
4273
4306
  * @internal
@@ -4283,7 +4316,8 @@ class BaseAnchor extends FASTElement {
4283
4316
  }
4284
4317
  createProxyElement() {
4285
4318
  const proxy = this.internalProxyAnchor ?? document.createElement("a");
4286
- proxy.hidden = true;
4319
+ proxy.ariaHidden = "true";
4320
+ proxy.tabIndex = -1;
4287
4321
  return proxy;
4288
4322
  }
4289
4323
  }
@@ -4300,6 +4334,53 @@ class AnchorButton extends BaseAnchor {
4300
4334
  super(...arguments);
4301
4335
  this.iconOnly = false;
4302
4336
  }
4337
+ /**
4338
+ * Handles changes to appearance attribute custom states
4339
+ * @param prev - the previous state
4340
+ * @param next - the next state
4341
+ */
4342
+ appearanceChanged(prev, next) {
4343
+ if (prev) {
4344
+ toggleState(this.elementInternals, `${prev}`, false);
4345
+ }
4346
+ if (next) {
4347
+ toggleState(this.elementInternals, `${next}`, true);
4348
+ }
4349
+ }
4350
+ /**
4351
+ * Handles changes to shape attribute custom states
4352
+ * @param prev - the previous state
4353
+ * @param next - the next state
4354
+ */
4355
+ shapeChanged(prev, next) {
4356
+ if (prev) {
4357
+ toggleState(this.elementInternals, `${prev}`, false);
4358
+ }
4359
+ if (next) {
4360
+ toggleState(this.elementInternals, `${next}`, true);
4361
+ }
4362
+ }
4363
+ /**
4364
+ * Handles changes to size attribute custom states
4365
+ * @param prev - the previous state
4366
+ * @param next - the next state
4367
+ */
4368
+ sizeChanged(prev, next) {
4369
+ if (prev) {
4370
+ toggleState(this.elementInternals, `${prev}`, false);
4371
+ }
4372
+ if (next) {
4373
+ toggleState(this.elementInternals, `${next}`, true);
4374
+ }
4375
+ }
4376
+ /**
4377
+ * Handles changes to icon only custom states
4378
+ * @param prev - the previous state
4379
+ * @param next - the next state
4380
+ */
4381
+ iconOnlyChanged(prev, next) {
4382
+ toggleState(this.elementInternals, "icon", !!next);
4383
+ }
4303
4384
  }
4304
4385
  __decorateClass$p([attr], AnchorButton.prototype, "appearance", 2);
4305
4386
  __decorateClass$p([attr], AnchorButton.prototype, "shape", 2);
@@ -4310,21 +4391,60 @@ __decorateClass$p([attr({
4310
4391
  })], AnchorButton.prototype, "iconOnly", 2);
4311
4392
  applyMixins(AnchorButton, StartEnd);
4312
4393
 
4394
+ const filledLighterState = css.partial`:is([state--filled-lighter], :state(filled-lighter))`;
4395
+ const filledDarkerState = css.partial`:is([state--filled-darker], :state(filled-darker))`;
4396
+ const ghostState = css.partial`:is([state--ghost], :state(ghost))`;
4397
+ const invertedState = css.partial`:is([state--inverted], :state(inverted))`;
4398
+ const primaryState = css.partial`:is([state--primary], :state(primary))`;
4399
+ const outlineState = css.partial`:is([state--outline], :state(outline))`;
4400
+ const strongState = css.partial`:is([state--strong], :state(strong))`;
4401
+ const subtleState = css.partial`:is([state--subtle], :state(subtle))`;
4402
+ const tintState = css.partial`:is([state--tint], :state(tint))`;
4403
+ const underlineState = css.partial`:is([state--underline], :state(underline))`;
4404
+ const transparentState = css.partial`:is([state--transparent], :state(transparent))`;
4405
+ const circularState = css.partial`:is([state--circular], :state(circular))`;
4406
+ const roundedState = css.partial`:is([state--rounded], :state(rounded))`;
4407
+ const squareState = css.partial`:is([state--square], :state(square))`;
4408
+ const tinyState = css.partial`:is([state--tiny], :state(tiny))`;
4409
+ const extraSmallState = css.partial`:is([state--extra-small], :state(extra-small))`;
4410
+ const smallState = css.partial`:is([state--small], :state(small))`;
4411
+ const largeState = css.partial`:is([state--large], :state(large))`;
4412
+ const extraLargeState = css.partial`:is([state--extra-large], :state(extra-large))`;
4413
+ const hugeState = css.partial`:is([state--huge], :state(huge))`;
4414
+ const alignStartState = css.partial`:is([state--align-start], :state(align-start))`;
4415
+ const alignEndState = css.partial`:is([state--align-end], :state(align-end))`;
4416
+ const insetState = css.partial`:is([state--inset], :state(inset))`;
4417
+ const iconOnlyState = css.partial`:is([state--icon], :state(icon))`;
4418
+ const pressedState = css.partial`:is([state--pressed], :state(pressed))`;
4419
+ const brandState = css.partial`:is([state--brand], :state(brand))`;
4420
+ const errorState = css.partial`:is([state--error], :state(error))`;
4421
+ const dangerState = css.partial`:is([state--danger], :state(danger))`;
4422
+ const importantState = css.partial`:is([state--important], :state(important))`;
4423
+ const informativeState = css.partial`:is([state--informative], :state(informative))`;
4424
+ const severeState = css.partial`:is([state--severe], :state(severe))`;
4425
+ const successState = css.partial`:is([state--success], :state(success))`;
4426
+ const warningState = css.partial`:is([state--warning], :state(warning))`;
4427
+ const verticalState = css.partial`:is([state--vertical], :state(vertical))`;
4428
+ css.partial`:is([state--horizontal], :state(horizontal))`;
4429
+
4313
4430
  const baseButtonStyles = css`
4314
4431
  ${display("inline-flex")}
4315
4432
 
4316
- :host{--icon-spacing:${spacingHorizontalSNudge};contain:layout style;vertical-align:middle;align-items:center;box-sizing:border-box;justify-content:center;text-align:center;text-decoration-line:none;margin:0;min-height:32px;outline-style:none;background-color:${colorNeutralBackground1};color:${colorNeutralForeground1};border:${strokeWidthThin} solid ${colorNeutralStroke1};padding:0 ${spacingHorizontalM};min-width:96px;border-radius:${borderRadiusMedium};font-size:${fontSizeBase300};font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};line-height:${lineHeightBase300};transition-duration:${durationFaster};transition-property:background,border,color;transition-timing-function:${curveEasyEase};cursor:pointer;user-select:none}.content{display:inherit}:host(:hover){background-color:${colorNeutralBackground1Hover};color:${colorNeutralForeground1Hover};border-color:${colorNeutralStroke1Hover}}:host(:hover:active){background-color:${colorNeutralBackground1Pressed};border-color:${colorNeutralStroke1Pressed};color:${colorNeutralForeground1Pressed};outline-style:none}:host(:focus-visible){border-color:${colorTransparentStroke};outline:${strokeWidthThick} solid ${colorTransparentStroke};box-shadow:${shadow4},0 0 0 2px ${colorStrokeFocus2}}@media screen and (prefers-reduced-motion:reduce){transition-duration:0.01ms}::slotted(svg){font-size:20px;height:20px;width:20px;fill:currentColor}[slot='start'],::slotted([slot='start']){margin-inline-end:var(--icon-spacing)}[slot='end'],::slotted([slot='end']){margin-inline-start:var(--icon-spacing)}:host([icon-only]){min-width:32px;max-width:32px}:host([size='small']){--icon-spacing:${spacingHorizontalXS};min-height:24px;min-width:64px;padding:0 ${spacingHorizontalS};border-radius:${borderRadiusSmall};font-size:${fontSizeBase200};line-height:${lineHeightBase200};font-weight:${fontWeightRegular}}:host([size='small'][icon-only]){min-width:24px;max-width:24px}:host([size='large']){min-height:40px;border-radius:${borderRadiusLarge};padding:0 ${spacingHorizontalL};font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large'][icon-only]){min-width:40px;max-width:40px}:host([size='large']) ::slotted(svg){font-size:24px;height:24px;width:24px}:host([shape='circular']),:host([shape='circular']:focus-visible){border-radius:${borderRadiusCircular}}:host([shape='square']),:host([shape='square']:focus-visible){border-radius:${borderRadiusNone}}:host([appearance='primary']){background-color:${colorBrandBackground};color:${colorNeutralForegroundOnBrand};border-color:transparent}:host([appearance='primary']:hover){background-color:${colorBrandBackgroundHover}}:host([appearance='primary']:hover),:host([appearance='primary']:hover:active){border-color:transparent;color:${colorNeutralForegroundOnBrand}}:host([appearance='primary']:hover:active){background-color:${colorBrandBackgroundPressed}}:host([appearance='primary']:focus-visible){border-color:${colorNeutralForegroundOnBrand};box-shadow:${shadow2},0 0 0 2px ${colorStrokeFocus2}}:host([appearance='outline']){background-color:${colorTransparentBackground}}:host([appearance='outline']:hover){background-color:${colorTransparentBackgroundHover}}:host([appearance='outline']:hover:active){background-color:${colorTransparentBackgroundPressed}}:host([appearance='subtle']){background-color:${colorSubtleBackground};color:${colorNeutralForeground2};border-color:transparent}:host([appearance='subtle']:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover};border-color:transparent}:host([appearance='subtle']:hover:active){background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed};border-color:transparent}:host([appearance='subtle']:hover) ::slotted(svg){fill:${colorNeutralForeground2BrandHover}}:host([appearance='subtle']:hover:active) ::slotted(svg){fill:${colorNeutralForeground2BrandPressed}}:host([appearance='transparent']){background-color:${colorTransparentBackground};color:${colorNeutralForeground2}}:host([appearance='transparent']:hover){background-color:${colorTransparentBackgroundHover};color:${colorNeutralForeground2BrandHover}}:host([appearance='transparent']:hover:active){background-color:${colorTransparentBackgroundPressed};color:${colorNeutralForeground2BrandPressed}}:host([appearance='transparent']),:host([appearance='transparent']:hover),:host([appearance='transparent']:hover:active){border-color:transparent}`;
4433
+ :host{--icon-spacing:${spacingHorizontalSNudge};position:relative;contain:layout style;vertical-align:middle;align-items:center;box-sizing:border-box;justify-content:center;text-align:center;text-decoration-line:none;margin:0;min-height:32px;outline-style:none;background-color:${colorNeutralBackground1};color:${colorNeutralForeground1};border:${strokeWidthThin} solid ${colorNeutralStroke1};padding:0 ${spacingHorizontalM};min-width:96px;border-radius:${borderRadiusMedium};font-size:${fontSizeBase300};font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};line-height:${lineHeightBase300};transition-duration:${durationFaster};transition-property:background,border,color;transition-timing-function:${curveEasyEase};cursor:pointer;user-select:none}.content{display:inherit}:host(:hover){background-color:${colorNeutralBackground1Hover};color:${colorNeutralForeground1Hover};border-color:${colorNeutralStroke1Hover}}:host(:hover:active){background-color:${colorNeutralBackground1Pressed};border-color:${colorNeutralStroke1Pressed};color:${colorNeutralForeground1Pressed};outline-style:none}:host(:focus-visible){border-color:${colorTransparentStroke};outline:${strokeWidthThick} solid ${colorTransparentStroke};box-shadow:${shadow4},0 0 0 2px ${colorStrokeFocus2}}@media screen and (prefers-reduced-motion:reduce){transition-duration:0.01ms}::slotted(svg){font-size:20px;height:20px;width:20px;fill:currentColor}:is([slot='start'],::slotted([slot='start'])){margin-inline-end:var(--icon-spacing)}:is([slot='end'],::slotted([slot='end'])){margin-inline-start:var(--icon-spacing)}:host(${iconOnlyState}){min-width:32px;max-width:32px}:host(${smallState}){--icon-spacing:${spacingHorizontalXS};min-height:24px;min-width:64px;padding:0 ${spacingHorizontalS};border-radius:${borderRadiusSmall};font-size:${fontSizeBase200};line-height:${lineHeightBase200};font-weight:${fontWeightRegular}}:host(${smallState}${iconOnlyState}){min-width:24px;max-width:24px}:host(${largeState}){min-height:40px;border-radius:${borderRadiusLarge};padding:0 ${spacingHorizontalL};font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${largeState}${iconOnlyState}){min-width:40px;max-width:40px}:host(${largeState}) ::slotted(svg){font-size:24px;height:24px;width:24px}:host(:is(${circularState},${circularState}:focus-visible)){border-radius:${borderRadiusCircular}}:host(:is(${squareState},${squareState}:focus-visible)){border-radius:${borderRadiusNone}}:host(${primaryState}){background-color:${colorBrandBackground};color:${colorNeutralForegroundOnBrand};border-color:transparent}:host(${primaryState}:hover){background-color:${colorBrandBackgroundHover}}:host(${primaryState}:is(:hover,:hover:active)){border-color:transparent;color:${colorNeutralForegroundOnBrand}}:host(${primaryState}:hover:active){background-color:${colorBrandBackgroundPressed}}:host(${primaryState}:focus-visible){border-color:${colorNeutralForegroundOnBrand};box-shadow:${shadow2},0 0 0 2px ${colorStrokeFocus2}}:host(${outlineState}){background-color:${colorTransparentBackground}}:host(${outlineState}:hover){background-color:${colorTransparentBackgroundHover}}:host(${outlineState}:hover:active){background-color:${colorTransparentBackgroundPressed}}:host(${subtleState}){background-color:${colorSubtleBackground};color:${colorNeutralForeground2};border-color:transparent}:host(${subtleState}:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover};border-color:transparent}:host(${subtleState}:hover:active){background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed};border-color:transparent}:host(${subtleState}:hover) ::slotted(svg){fill:${colorNeutralForeground2BrandHover}}:host(${subtleState}:hover:active) ::slotted(svg){fill:${colorNeutralForeground2BrandPressed}}:host(${transparentState}){background-color:${colorTransparentBackground};color:${colorNeutralForeground2}}:host(${transparentState}:hover){background-color:${colorTransparentBackgroundHover};color:${colorNeutralForeground2BrandHover}}:host(${transparentState}:hover:active){background-color:${colorTransparentBackgroundPressed};color:${colorNeutralForeground2BrandPressed}}:host(:is(${transparentState},${transparentState}:is(:hover,:active))){border-color:transparent}`;
4317
4434
  const styles$s = css`
4318
4435
  ${baseButtonStyles}
4319
4436
 
4320
- :host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable])),:host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable]):hover),:host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable]):hover:active){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled};color:${colorNeutralForegroundDisabled};cursor:not-allowed}:host(:is([disabled][appearance='primary'],[disabled-focusable][appearance='primary'])),:host(:is([disabled][appearance='primary'],[disabled-focusable][appearance='primary']):hover),:host(:is([disabled][appearance='primary'],[disabled-focusable][appearance='primary']):hover:active){border-color:transparent}:host(:is([disabled][appearance='outline'],[disabled-focusable][appearance='outline'])),:host(:is([disabled][appearance='outline'],[disabled-focusable][appearance='outline']):hover),:host(:is([disabled][appearance='outline'],[disabled-focusable][appearance='outline']):hover:active){background-color:${colorTransparentBackground}}:host(:is([disabled][appearance='subtle'],[disabled-focusable][appearance='subtle'])),:host(:is([disabled][appearance='subtle'],[disabled-focusable][appearance='subtle']):hover),:host(:is([disabled][appearance='subtle'],[disabled-focusable][appearance='subtle']):hover:active){background-color:${colorTransparentBackground};border-color:transparent}:host(:is([disabled][appearance='transparent'],[disabled-focusable][appearance='transparent'])),:host(:is([disabled][appearance='transparent'],[disabled-focusable][appearance='transparent']):hover),:host(:is([disabled][appearance='transparent'],[disabled-focusable][appearance='transparent']):hover:active){border-color:transparent;background-color:${colorTransparentBackground}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
4437
+ :host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable])),:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable]):hover),:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable]):hover:active){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled};color:${colorNeutralForegroundDisabled};cursor:not-allowed}:host(${primaryState}:is(:disabled,[disabled-focusable])),:host(${primaryState}:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){border-color:transparent}:host(${outlineState}:is(:disabled,[disabled-focusable])),:host(${outlineState}:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){background-color:${colorTransparentBackground}}:host(${subtleState}:is(:disabled,[disabled-focusable])),:host(${subtleState}:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){background-color:${colorTransparentBackground};border-color:transparent}:host(${transparentState}:is(:disabled,[disabled-focusable])),:host(${transparentState}:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){border-color:transparent;background-color:${colorTransparentBackground}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
4321
4438
  :host{background:ButtonFace;color:ButtonText}:host(:is(:hover,:focus-visible)){border-color:Highlight}`));
4322
4439
 
4323
- const styles$r = baseButtonStyles.withBehaviors(forcedColorsStylesheetBehavior(css`
4440
+ const styles$r = css`
4441
+ ${baseButtonStyles}
4442
+
4443
+ ::slotted(a){position:absolute;inset:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
4324
4444
  :host{border-color:LinkText;color:LinkText}`));
4325
4445
 
4326
4446
  function anchorTemplate$1(options = {}) {
4327
- return html`<template tabindex="0" @click="${x => x.clickHandler()}" @keypress="${(x, c) => x.keypressHandler(c.event)}">${startSlotTemplate(options)}<span class="content" part="content"><slot></slot></span>${endSlotTemplate(options)}</template>`;
4447
+ return html`<template tabindex="0" @click="${(x, c) => x.clickHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}">${startSlotTemplate(options)}<span class="content" part="content"><slot></slot></span>${endSlotTemplate(options)}</template>`;
4328
4448
  }
4329
4449
  const template$t = anchorTemplate$1();
4330
4450
 
@@ -4377,20 +4497,6 @@ function getInitials(displayName, isRtl, options) {
4377
4497
  return getInitialsLatin(displayName, isRtl, options?.firstInitialOnly);
4378
4498
  }
4379
4499
 
4380
- const CustomStatesSetSupported = CSS.supports("selector(:state(g))");
4381
- function toggleState(elementInternals, state, force) {
4382
- if (!CustomStatesSetSupported) {
4383
- elementInternals.shadowRoot.host.toggleAttribute(`state--${state}`, force);
4384
- return;
4385
- }
4386
- force = force ?? !elementInternals.states.has(state);
4387
- if (force) {
4388
- elementInternals.states.add(state);
4389
- return;
4390
- }
4391
- elementInternals.states.delete(state);
4392
- }
4393
-
4394
4500
  const AvatarNamedColor = {
4395
4501
  darkRed: "dark-red",
4396
4502
  cranberry: "cranberry",
@@ -4580,9 +4686,67 @@ var __decorateClass$n = (decorators, target, key, kind) => {
4580
4686
  class Badge extends FASTElement {
4581
4687
  constructor() {
4582
4688
  super(...arguments);
4689
+ /**
4690
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
4691
+ *
4692
+ * @internal
4693
+ */
4694
+ this.elementInternals = this.attachInternals();
4583
4695
  this.appearance = BadgeAppearance.filled;
4584
4696
  this.color = BadgeColor.brand;
4585
4697
  }
4698
+ /**
4699
+ * Handles changes to appearance attribute custom states
4700
+ * @param prev - the previous state
4701
+ * @param next - the next state
4702
+ */
4703
+ appearanceChanged(prev, next) {
4704
+ if (prev) {
4705
+ toggleState(this.elementInternals, `${prev}`, false);
4706
+ }
4707
+ if (next) {
4708
+ toggleState(this.elementInternals, `${next}`, true);
4709
+ }
4710
+ }
4711
+ /**
4712
+ * Handles changes to color attribute custom states
4713
+ * @param prev - the previous state
4714
+ * @param next - the next state
4715
+ */
4716
+ colorChanged(prev, next) {
4717
+ if (prev) {
4718
+ toggleState(this.elementInternals, `${prev}`, false);
4719
+ }
4720
+ if (next) {
4721
+ toggleState(this.elementInternals, `${next}`, true);
4722
+ }
4723
+ }
4724
+ /**
4725
+ * Handles changes to shape attribute custom states
4726
+ * @param prev - the previous state
4727
+ * @param next - the next state
4728
+ */
4729
+ shapeChanged(prev, next) {
4730
+ if (prev) {
4731
+ toggleState(this.elementInternals, `${prev}`, false);
4732
+ }
4733
+ if (next) {
4734
+ toggleState(this.elementInternals, `${next}`, true);
4735
+ }
4736
+ }
4737
+ /**
4738
+ * Handles changes to size attribute custom states
4739
+ * @param prev - the previous state
4740
+ * @param next - the next state
4741
+ */
4742
+ sizeChanged(prev, next) {
4743
+ if (prev) {
4744
+ toggleState(this.elementInternals, `${prev}`, false);
4745
+ }
4746
+ if (next) {
4747
+ toggleState(this.elementInternals, `${next}`, true);
4748
+ }
4749
+ }
4586
4750
  }
4587
4751
  __decorateClass$n([attr], Badge.prototype, "appearance", 2);
4588
4752
  __decorateClass$n([attr], Badge.prototype, "color", 2);
@@ -4615,7 +4779,7 @@ const badgeBaseStyles = css.partial`
4615
4779
  font-size: 12px;
4616
4780
  }
4617
4781
 
4618
- :host(:not([appearance='ghost']))::after {
4782
+ :host(:not(${ghostState}))::after {
4619
4783
  position: absolute;
4620
4784
  content: '';
4621
4785
  top: 0;
@@ -4629,7 +4793,7 @@ const badgeBaseStyles = css.partial`
4629
4793
  }
4630
4794
  `;
4631
4795
  const badgeSizeStyles = css.partial`
4632
- :host([size='tiny']) {
4796
+ :host(${tinyState}) {
4633
4797
  width: 6px;
4634
4798
  height: 6px;
4635
4799
  font-size: 4px;
@@ -4637,10 +4801,10 @@ const badgeSizeStyles = css.partial`
4637
4801
  padding-inline: 0;
4638
4802
  min-width: unset;
4639
4803
  }
4640
- :host([size='tiny']) ::slotted(svg) {
4804
+ :host(${tinyState}) ::slotted(svg) {
4641
4805
  font-size: 6px;
4642
4806
  }
4643
- :host([size='extra-small']) {
4807
+ :host(${extraSmallState}) {
4644
4808
  width: 10px;
4645
4809
  height: 10px;
4646
4810
  font-size: 6px;
@@ -4648,191 +4812,191 @@ const badgeSizeStyles = css.partial`
4648
4812
  padding-inline: 0;
4649
4813
  min-width: unset;
4650
4814
  }
4651
- :host([size='extra-small']) ::slotted(svg) {
4815
+ :host(${extraSmallState}) ::slotted(svg) {
4652
4816
  font-size: 10px;
4653
4817
  }
4654
- :host([size='small']) {
4818
+ :host(${smallState}) {
4655
4819
  min-width: 16px;
4656
4820
  height: 16px;
4657
4821
  font-size: ${fontSizeBase100};
4658
4822
  line-height: ${lineHeightBase100};
4659
4823
  padding-inline: calc(${spacingHorizontalXXS} + ${textPadding});
4660
4824
  }
4661
- :host([size='small']) ::slotted(svg) {
4825
+ :host(${smallState}) ::slotted(svg) {
4662
4826
  font-size: 12px;
4663
4827
  }
4664
- :host([size='large']) {
4828
+ :host(${largeState}) {
4665
4829
  min-width: 24px;
4666
4830
  height: 24px;
4667
4831
  font-size: ${fontSizeBase200};
4668
4832
  line-height: ${lineHeightBase200};
4669
4833
  padding-inline: calc(${spacingHorizontalXS} + ${textPadding});
4670
4834
  }
4671
- :host([size='large']) ::slotted(svg) {
4835
+ :host(${largeState}) ::slotted(svg) {
4672
4836
  font-size: 16px;
4673
4837
  }
4674
- :host([size='extra-large']) {
4838
+ :host(${extraLargeState}) {
4675
4839
  min-width: 32px;
4676
4840
  height: 32px;
4677
4841
  font-size: ${fontSizeBase200};
4678
4842
  line-height: ${lineHeightBase200};
4679
4843
  padding-inline: calc(${spacingHorizontalSNudge} + ${textPadding});
4680
4844
  }
4681
- :host([size='extra-large']) ::slotted(svg) {
4845
+ :host(${extraLargeState}) ::slotted(svg) {
4682
4846
  font-size: 20px;
4683
4847
  }
4684
4848
  `;
4685
4849
  const badgeFilledStyles = css.partial`
4686
- :host([color='danger']) {
4850
+ :host(${dangerState}) {
4687
4851
  background-color: ${colorPaletteRedBackground3};
4688
4852
  color: ${colorNeutralForegroundOnBrand};
4689
4853
  }
4690
4854
 
4691
- :host([color='important']) {
4855
+ :host(${importantState}) {
4692
4856
  background-color: ${colorNeutralForeground1};
4693
4857
  color: ${colorNeutralBackground1};
4694
4858
  }
4695
4859
 
4696
- :host([color='informative']) {
4860
+ :host(${informativeState}) {
4697
4861
  background-color: ${colorNeutralBackground5};
4698
4862
  color: ${colorNeutralForeground3};
4699
4863
  }
4700
4864
 
4701
- :host([color='severe']) {
4865
+ :host(${severeState}) {
4702
4866
  background-color: ${colorPaletteDarkOrangeBackground3};
4703
4867
  color: ${colorNeutralForegroundOnBrand};
4704
4868
  }
4705
4869
 
4706
- :host([color='subtle']) {
4870
+ :host(${subtleState}) {
4707
4871
  background-color: ${colorNeutralBackground1};
4708
4872
  color: ${colorNeutralForeground1};
4709
4873
  }
4710
4874
 
4711
- :host([color='success']) {
4875
+ :host(${successState}) {
4712
4876
  background-color: ${colorPaletteGreenBackground3};
4713
4877
  color: ${colorNeutralForegroundOnBrand};
4714
4878
  }
4715
4879
 
4716
- :host([color='warning']) {
4880
+ :host(${warningState}) {
4717
4881
  background-color: ${colorPaletteYellowBackground3};
4718
4882
  color: ${colorNeutralForeground1Static};
4719
4883
  }
4720
4884
  `;
4721
4885
  const badgeGhostStyles = css.partial`
4722
- :host([appearance='ghost']) {
4886
+ :host(${ghostState}) {
4723
4887
  color: ${colorBrandForeground1};
4724
4888
  background-color: initial;
4725
4889
  }
4726
4890
 
4727
- :host([appearance='ghost'][color='danger']) {
4891
+ :host(${ghostState}${dangerState}) {
4728
4892
  color: ${colorPaletteRedForeground3};
4729
4893
  }
4730
4894
 
4731
- :host([appearance='ghost'][color='important']) {
4895
+ :host(${ghostState}${importantState}) {
4732
4896
  color: ${colorNeutralForeground1};
4733
4897
  }
4734
4898
 
4735
- :host([appearance='ghost'][color='informative']) {
4899
+ :host(${ghostState}${informativeState}) {
4736
4900
  color: ${colorNeutralForeground3};
4737
4901
  }
4738
4902
 
4739
- :host([appearance='ghost'][color='severe']) {
4903
+ :host(${ghostState}${severeState}) {
4740
4904
  color: ${colorPaletteDarkOrangeForeground3};
4741
4905
  }
4742
4906
 
4743
- :host([appearance='ghost'][color='subtle']) {
4907
+ :host(${ghostState}${subtleState}) {
4744
4908
  color: ${colorNeutralForegroundInverted};
4745
4909
  }
4746
4910
 
4747
- :host([appearance='ghost'][color='success']) {
4911
+ :host(${ghostState}${successState}) {
4748
4912
  color: ${colorPaletteGreenForeground3};
4749
4913
  }
4750
4914
 
4751
- :host([appearance='ghost'][color='warning']) {
4915
+ :host(${ghostState}${warningState}) {
4752
4916
  color: ${colorPaletteYellowForeground2};
4753
4917
  }
4754
4918
  `;
4755
4919
  const badgeOutlineStyles = css.partial`
4756
- :host([appearance='outline']) {
4920
+ :host(${outlineState}) {
4757
4921
  border-color: currentColor;
4758
4922
  color: ${colorBrandForeground1};
4759
4923
  background-color: initial;
4760
4924
  }
4761
4925
 
4762
- :host([appearance='outline'][color='danger']) {
4926
+ :host(${outlineState}${dangerState}) {
4763
4927
  color: ${colorPaletteRedForeground3};
4764
4928
  }
4765
4929
 
4766
- :host([appearance='outline'][color='important']) {
4930
+ :host(${outlineState}${importantState}) {
4767
4931
  color: ${colorNeutralForeground3};
4768
4932
  border-color: ${colorNeutralStrokeAccessible};
4769
4933
  }
4770
4934
 
4771
- :host([appearance='outline'][color='informative']) {
4935
+ :host(${outlineState}${informativeState}) {
4772
4936
  color: ${colorNeutralForeground3};
4773
4937
  border-color: ${colorNeutralStroke2};
4774
4938
  }
4775
4939
 
4776
- :host([appearance='outline'][color='severe']) {
4940
+ :host(${outlineState}${severeState}) {
4777
4941
  color: ${colorPaletteDarkOrangeForeground3};
4778
4942
  }
4779
4943
 
4780
- :host([appearance='outline'][color='subtle']) {
4944
+ :host(${outlineState}${subtleState}) {
4781
4945
  color: ${colorNeutralForegroundStaticInverted};
4782
4946
  }
4783
4947
 
4784
- :host([appearance='outline'][color='success']) {
4948
+ :host(${outlineState}${successState}) {
4785
4949
  color: ${colorPaletteGreenForeground2};
4786
4950
  }
4787
4951
 
4788
- :host([appearance='outline'][color='warning']) {
4952
+ :host(${outlineState}${warningState}) {
4789
4953
  color: ${colorPaletteYellowForeground2};
4790
4954
  }
4791
4955
  `;
4792
4956
  const badgeTintStyles = css.partial`
4793
- :host([appearance='tint']) {
4957
+ :host(${tintState}) {
4794
4958
  background-color: ${colorBrandBackground2};
4795
4959
  color: ${colorBrandForeground2};
4796
4960
  border-color: ${colorBrandStroke2};
4797
4961
  }
4798
4962
 
4799
- :host([appearance='tint'][color='danger']) {
4963
+ :host(${tintState}${dangerState}) {
4800
4964
  background-color: ${colorPaletteRedBackground1};
4801
4965
  color: ${colorPaletteRedForeground1};
4802
4966
  border-color: ${colorPaletteRedBorder1};
4803
4967
  }
4804
4968
 
4805
- :host([appearance='tint'][color='important']) {
4969
+ :host(${tintState}${importantState}) {
4806
4970
  background-color: ${colorNeutralForeground3};
4807
4971
  color: ${colorNeutralBackground1};
4808
4972
  border-color: ${colorTransparentStroke};
4809
4973
  }
4810
4974
 
4811
- :host([appearance='tint'][color='informative']) {
4975
+ :host(${tintState}${informativeState}) {
4812
4976
  background-color: ${colorNeutralBackground4};
4813
4977
  color: ${colorNeutralForeground3};
4814
4978
  border-color: ${colorNeutralStroke2};
4815
4979
  }
4816
4980
 
4817
- :host([appearance='tint'][color='severe']) {
4981
+ :host(${tintState}${severeState}) {
4818
4982
  background-color: ${colorPaletteDarkOrangeBackground1};
4819
4983
  color: ${colorPaletteDarkOrangeForeground1};
4820
4984
  border-color: ${colorPaletteDarkOrangeBorder1};
4821
4985
  }
4822
4986
 
4823
- :host([appearance='tint'][color='subtle']) {
4987
+ :host(${tintState}${subtleState}) {
4824
4988
  background-color: ${colorNeutralBackground1};
4825
4989
  color: ${colorNeutralForeground3};
4826
4990
  border-color: ${colorNeutralStroke2};
4827
4991
  }
4828
4992
 
4829
- :host([appearance='tint'][color='success']) {
4993
+ :host(${tintState}${successState}) {
4830
4994
  background-color: ${colorPaletteGreenBackground1};
4831
4995
  color: ${colorPaletteGreenForeground1};
4832
4996
  border-color: ${colorPaletteGreenBorder2};
4833
4997
  }
4834
4998
 
4835
- :host([appearance='tint'][color='warning']) {
4999
+ :host(${tintState}${warningState}) {
4836
5000
  background-color: ${colorPaletteYellowBackground1};
4837
5001
  color: ${colorPaletteYellowForeground2};
4838
5002
  border-color: ${colorPaletteYellowBorder1};
@@ -4943,7 +5107,7 @@ css.partial`
4943
5107
  `;
4944
5108
 
4945
5109
  const styles$p = css`
4946
- :host([shape='square']){border-radius:${borderRadiusNone}}:host([shape='rounded']){border-radius:${borderRadiusMedium}}:host([shape='rounded'][size='tiny']),:host([shape='rounded'][size='extra-small']),:host([shape='rounded'][size='small']){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
5110
+ :host(${squareState}){border-radius:${borderRadiusNone}}:host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
4947
5111
  ${badgeFilledStyles}
4948
5112
  ${badgeGhostStyles}
4949
5113
  ${badgeOutlineStyles}
@@ -4986,6 +5150,19 @@ class Button extends FASTElement {
4986
5150
  this.iconOnly = false;
4987
5151
  this.elementInternals.role = "button";
4988
5152
  }
5153
+ /**
5154
+ * Handles changes to appearance attribute custom states
5155
+ * @param prev - the previous state
5156
+ * @param next - the next state
5157
+ */
5158
+ appearanceChanged(prev, next) {
5159
+ if (prev) {
5160
+ toggleState(this.elementInternals, `${prev}`, false);
5161
+ }
5162
+ if (next) {
5163
+ toggleState(this.elementInternals, `${next}`, true);
5164
+ }
5165
+ }
4989
5166
  /**
4990
5167
  * Sets the element's internal disabled state when the element is focusable while disabled.
4991
5168
  *
@@ -5006,6 +5183,14 @@ class Button extends FASTElement {
5006
5183
  get form() {
5007
5184
  return this.elementInternals.form;
5008
5185
  }
5186
+ /**
5187
+ * Handles changes to icon only custom states
5188
+ * @param prev - the previous state
5189
+ * @param next - the next state
5190
+ */
5191
+ iconOnlyChanged(prev, next) {
5192
+ toggleState(this.elementInternals, "icon", next);
5193
+ }
5009
5194
  /**
5010
5195
  * A reference to all associated label elements.
5011
5196
  *
@@ -5014,6 +5199,32 @@ class Button extends FASTElement {
5014
5199
  get labels() {
5015
5200
  return Object.freeze(Array.from(this.elementInternals.labels));
5016
5201
  }
5202
+ /**
5203
+ * Handles changes to shape attribute custom states
5204
+ * @param prev - the previous state
5205
+ * @param next - the next state
5206
+ */
5207
+ shapeChanged(prev, next) {
5208
+ if (prev) {
5209
+ toggleState(this.elementInternals, `${prev}`, false);
5210
+ }
5211
+ if (next) {
5212
+ toggleState(this.elementInternals, `${next}`, true);
5213
+ }
5214
+ }
5215
+ /**
5216
+ * Handles changes to size attribute custom states
5217
+ * @param prev - the previous state
5218
+ * @param next - the next state
5219
+ */
5220
+ sizeChanged(prev, next) {
5221
+ if (prev) {
5222
+ toggleState(this.elementInternals, `${prev}`, false);
5223
+ }
5224
+ if (next) {
5225
+ toggleState(this.elementInternals, `${next}`, true);
5226
+ }
5227
+ }
5017
5228
  /**
5018
5229
  * Removes the form submission fallback control when the type changes.
5019
5230
  *
@@ -5583,7 +5794,34 @@ __decorateClass$l([attr], BaseCheckbox.prototype, "name", 2);
5583
5794
  __decorateClass$l([attr({
5584
5795
  mode: "boolean"
5585
5796
  })], BaseCheckbox.prototype, "required", 2);
5586
- class Checkbox extends BaseCheckbox {}
5797
+ class Checkbox extends BaseCheckbox {
5798
+ /**
5799
+ * Handles changes to shape attribute custom states
5800
+ * @param prev - the previous state
5801
+ * @param next - the next state
5802
+ */
5803
+ shapeChanged(prev, next) {
5804
+ if (prev) {
5805
+ toggleState(this.elementInternals, prev, false);
5806
+ }
5807
+ if (next) {
5808
+ toggleState(this.elementInternals, next, true);
5809
+ }
5810
+ }
5811
+ /**
5812
+ * Handles changes to size attribute custom states
5813
+ * @param prev - the previous state
5814
+ * @param next - the next state
5815
+ */
5816
+ sizeChanged(prev, next) {
5817
+ if (prev) {
5818
+ toggleState(this.elementInternals, prev, false);
5819
+ }
5820
+ if (next) {
5821
+ toggleState(this.elementInternals, next, true);
5822
+ }
5823
+ }
5824
+ }
5587
5825
  __decorateClass$l([attr], Checkbox.prototype, "shape", 2);
5588
5826
  __decorateClass$l([attr], Checkbox.prototype, "size", 2);
5589
5827
 
@@ -5592,7 +5830,7 @@ const indeterminateState = css.partial`:is([state--indeterminate], :state(indete
5592
5830
  const styles$o = css`
5593
5831
  ${display("inline-flex")}
5594
5832
 
5595
- :host{--size:16px;background-color:${colorNeutralBackground1};border-radius:${borderRadiusSmall};border:${strokeWidthThin} solid ${colorNeutralStrokeAccessible};box-sizing:border-box;cursor:pointer;position:relative;width:var(--size)}:host,.indeterminate-indicator,.checked-indicator{aspect-ratio:1}:host(:hover){border-color:${colorNeutralStrokeAccessibleHover}}:host(:active){border-color:${colorNeutralStrokeAccessiblePressed}}:host(${checkedState$1}:hover){background-color:${colorCompoundBrandBackgroundHover};border-color:${colorCompoundBrandStrokeHover}}:host(${checkedState$1}:active){background-color:${colorCompoundBrandBackgroundPressed};border-color:${colorCompoundBrandStrokePressed}}:host(:focus-visible){outline:none}:host(:not([slot='input']))::after{content:'';position:absolute;inset:-8px;box-sizing:border-box;outline:none;border:${strokeWidthThick} solid ${colorTransparentStroke};border-radius:${borderRadiusMedium}}:host(:not([slot='input']):focus-visible)::after{border-color:${colorStrokeFocus2}}.indeterminate-indicator,.checked-indicator{color:${colorNeutralForegroundInverted};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(${checkedState$1})) *:is(::slotted([slot='checked-indicator']),.checked-indicator){display:none}:host(${checkedState$1}),:host(${indeterminateState}){border-color:${colorCompoundBrandStroke}}:host(${checkedState$1}),:host(${indeterminateState}) .indeterminate-indicator{background-color:${colorCompoundBrandBackground}}:host(${indeterminateState}) .indeterminate-indicator{border-radius:${borderRadiusSmall};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:${borderRadiusCircular}}:host([disabled]),:host([disabled]${checkedState$1}){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}:host([disabled]){cursor:unset}:host([disabled]${indeterminateState}) .indeterminate-indicator{background-color:${colorNeutralStrokeDisabled}}:host([disabled]${checkedState$1}) .checked-indicator{color:${colorNeutralStrokeDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
5833
+ :host{--size:16px;background-color:${colorNeutralBackground1};border-radius:${borderRadiusSmall};border:${strokeWidthThin} solid ${colorNeutralStrokeAccessible};box-sizing:border-box;cursor:pointer;position:relative;width:var(--size)}:host,.indeterminate-indicator,.checked-indicator{aspect-ratio:1}:host(:hover){border-color:${colorNeutralStrokeAccessibleHover}}:host(:active){border-color:${colorNeutralStrokeAccessiblePressed}}:host(${checkedState$1}:hover){background-color:${colorCompoundBrandBackgroundHover};border-color:${colorCompoundBrandStrokeHover}}:host(${checkedState$1}:active){background-color:${colorCompoundBrandBackgroundPressed};border-color:${colorCompoundBrandStrokePressed}}:host(:focus-visible){outline:none}:host(:not([slot='input']))::after{content:'';position:absolute;inset:-8px;box-sizing:border-box;outline:none;border:${strokeWidthThick} solid ${colorTransparentStroke};border-radius:${borderRadiusMedium}}:host(:not([slot='input']):focus-visible)::after{border-color:${colorStrokeFocus2}}.indeterminate-indicator,.checked-indicator{color:${colorNeutralForegroundInverted};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(${checkedState$1})) *:is(::slotted([slot='checked-indicator']),.checked-indicator){display:none}:host(${checkedState$1}),:host(${indeterminateState}){border-color:${colorCompoundBrandStroke}}:host(${checkedState$1}),:host(${indeterminateState}) .indeterminate-indicator{background-color:${colorCompoundBrandBackground}}:host(${indeterminateState}) .indeterminate-indicator{border-radius:${borderRadiusSmall};position:absolute;width:calc(var(--size) / 2);inset:0}:host(${largeState}){--size:20px}:host(${largeState}) ::slotted([slot='checked-indicator']),:host(${largeState}) .checked-indicator{width:16px}:host(${circularState}),:host(${circularState}) .indeterminate-indicator{border-radius:${borderRadiusCircular}}:host([disabled]),:host([disabled]${checkedState$1}){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}:host([disabled]){cursor:unset}:host([disabled]${indeterminateState}) .indeterminate-indicator{background-color:${colorNeutralStrokeDisabled}}:host([disabled]${checkedState$1}) .checked-indicator{color:${colorNeutralStrokeDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
5596
5834
  :host{border-color:FieldText}:host(:not([slot='input']:focus-visible))::after{border-color:Canvas}:host(:not([disabled]):hover),:host(${checkedState$1}:not([disabled]):hover),:host(:not([slot='input']):focus-visible)::after{border-color:Highlight}.indeterminate-indicator,.checked-indicator{color:HighlightText}:host(${checkedState$1}),:host(${indeterminateState}) .indeterminate-indicator{background-color:FieldText}:host(${checkedState$1}:not([disabled]):hover),:host(${indeterminateState}:not([disabled]):hover) .indeterminate-indicator{background-color:Highlight}:host([disabled]){border-color:GrayText}:host([disabled]${indeterminateState}) .indeterminate-indicator{background-color:GrayText}:host([disabled]),:host([disabled]${checkedState$1}) .checked-indicator{color:GrayText}`));
5597
5835
 
5598
5836
  const checkedIndicator = html.partial( /* html */
@@ -5633,10 +5871,8 @@ class CompoundButton extends Button {}
5633
5871
  const styles$n = css`
5634
5872
  ${styles$s}
5635
5873
 
5636
- :host,:host(:is([size])){gap:12px;height:auto;padding-top:14px;padding-inline:12px;padding-bottom:16px;font-size:${fontSizeBase300};line-height:${lineHeightBase300}}.content{display:flex;flex-direction:column;text-align:start}::slotted([slot='description']){color:${colorNeutralForeground2};line-height:100%;font-size:${fontSizeBase200};font-weight:${fontWeightRegular}}::slotted(svg),:host([size='large']) ::slotted(svg){font-size:40px;height:40px;width:40px}:host(:hover) ::slotted([slot='description']){color:${colorNeutralForeground2Hover}}:host(:active) ::slotted([slot='description']){color:${colorNeutralForeground2Pressed}}:host(:is([appearance='primary'],[appearance='primary']:hover,[appearance='primary']:active))
5637
- ::slotted([slot='description']){color:${colorNeutralForegroundOnBrand}}:host(:is([appearance='subtle'],[appearance='subtle']:hover,[appearance='subtle']:active))
5638
- ::slotted([slot='description']),:host([appearance='transparent']) ::slotted([slot='description']){color:${colorNeutralForeground2}}:host([appearance='transparent']:hover) ::slotted([slot='description']){color:${colorNeutralForeground2BrandHover}}:host([appearance='transparent']:active) ::slotted([slot='description']){color:${colorNeutralForeground2BrandPressed}}:host(:is([disabled],[disabled][appearance],[disabled-focusable],[disabled-focusable][appearance]))
5639
- ::slotted([slot='description']){color:${colorNeutralForegroundDisabled}}:host([size='small']){padding:8px;padding-bottom:10px}:host([icon-only]){min-width:52px;max-width:52px;padding:${spacingHorizontalSNudge}}:host([icon-only][size='small']){min-width:48px;max-width:48px;padding:${spacingHorizontalXS}}:host([icon-only][size='large']){min-width:56px;max-width:56px;padding:${spacingHorizontalS}}:host([size='large']){padding-top:18px;padding-inline:16px;padding-bottom:20px;font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large']) ::slotted([slot='description']){font-size:${fontSizeBase300}}`;
5874
+ :host,:host(:is([size])){gap:12px;height:auto;padding-top:14px;padding-inline:12px;padding-bottom:16px;font-size:${fontSizeBase300};line-height:${lineHeightBase300}}.content{display:flex;flex-direction:column;text-align:start}::slotted([slot='description']){color:${colorNeutralForeground2};line-height:100%;font-size:${fontSizeBase200};font-weight:${fontWeightRegular}}::slotted(svg),:host(${largeState}) ::slotted(svg){font-size:40px;height:40px;width:40px}:host(:hover) ::slotted([slot='description']){color:${colorNeutralForeground2Hover}}:host(:active) ::slotted([slot='description']){color:${colorNeutralForeground2Pressed}}:host(:is(${primaryState},${primaryState}:hover,${primaryState}:active)) ::slotted([slot='description']){color:${colorNeutralForegroundOnBrand}}:host(:is(${subtleState},${subtleState}:hover,${subtleState}:active)) ::slotted([slot='description']),:host(${transparentState}) ::slotted([slot='description']){color:${colorNeutralForeground2}}:host(${transparentState}:hover) ::slotted([slot='description']){color:${colorNeutralForeground2BrandHover}}:host(${transparentState}:active) ::slotted([slot='description']){color:${colorNeutralForeground2BrandPressed}}:host(:is(:disabled,:disabled[appearance],[disabled-focusable],[disabled-focusable][appearance]))
5875
+ ::slotted([slot='description']){color:${colorNeutralForegroundDisabled}}:host(${smallState}){padding:8px;padding-bottom:10px}:host(${iconOnlyState}){min-width:52px;max-width:52px;padding:${spacingHorizontalSNudge}}:host(${iconOnlyState}${smallState}){min-width:48px;max-width:48px;padding:${spacingHorizontalXS}}:host(${iconOnlyState}${largeState}){min-width:56px;max-width:56px;padding:${spacingHorizontalS}}:host(${largeState}){padding-top:18px;padding-inline:16px;padding-bottom:20px;font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${largeState}) ::slotted([slot='description']){font-size:${fontSizeBase300}}`;
5640
5876
 
5641
5877
  function buttonTemplate(options = {}) {
5642
5878
  return html`<template ?disabled="${x => x.disabled}" tabindex="${x => x.disabled ? -1 : 0}">${startSlotTemplate(options)}<span class="content" part="content"><slot ${slotted("defaultSlottedContent")}></slot><slot name="description"></slot></span>${endSlotTemplate(options)}</template>`;
@@ -5662,17 +5898,83 @@ var __decorateClass$k = (decorators, target, key, kind) => {
5662
5898
  class CounterBadge extends FASTElement {
5663
5899
  constructor() {
5664
5900
  super(...arguments);
5901
+ /**
5902
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
5903
+ *
5904
+ * @internal
5905
+ */
5906
+ this.elementInternals = this.attachInternals();
5665
5907
  this.count = 0;
5666
5908
  this.overflowCount = 99;
5667
5909
  this.showZero = false;
5668
5910
  this.dot = false;
5669
5911
  }
5912
+ /**
5913
+ * Handles changes to appearance attribute custom states
5914
+ * @param prev - the previous state
5915
+ * @param next - the next state
5916
+ */
5917
+ appearanceChanged(prev, next) {
5918
+ if (prev) {
5919
+ toggleState(this.elementInternals, `${prev}`, false);
5920
+ }
5921
+ if (next) {
5922
+ toggleState(this.elementInternals, `${next}`, true);
5923
+ }
5924
+ }
5925
+ /**
5926
+ * Handles changes to color attribute custom states
5927
+ * @param prev - the previous state
5928
+ * @param next - the next state
5929
+ */
5930
+ colorChanged(prev, next) {
5931
+ if (prev) {
5932
+ toggleState(this.elementInternals, `${prev}`, false);
5933
+ }
5934
+ if (next) {
5935
+ toggleState(this.elementInternals, `${next}`, true);
5936
+ }
5937
+ }
5938
+ /**
5939
+ * Handles changes to shape attribute custom states
5940
+ * @param prev - the previous state
5941
+ * @param next - the next state
5942
+ */
5943
+ shapeChanged(prev, next) {
5944
+ if (prev) {
5945
+ toggleState(this.elementInternals, `${prev}`, false);
5946
+ }
5947
+ if (next) {
5948
+ toggleState(this.elementInternals, `${next}`, true);
5949
+ }
5950
+ }
5951
+ /**
5952
+ * Handles changes to size attribute custom states
5953
+ * @param prev - the previous state
5954
+ * @param next - the next state
5955
+ */
5956
+ sizeChanged(prev, next) {
5957
+ if (prev) {
5958
+ toggleState(this.elementInternals, `${prev}`, false);
5959
+ }
5960
+ if (next) {
5961
+ toggleState(this.elementInternals, `${next}`, true);
5962
+ }
5963
+ }
5670
5964
  countChanged() {
5671
5965
  this.setCount();
5672
5966
  }
5673
5967
  overflowCountChanged() {
5674
5968
  this.setCount();
5675
5969
  }
5970
+ /**
5971
+ * Handles changes to dot attribute custom states
5972
+ * @param prev - the previous state
5973
+ * @param next - the next state
5974
+ */
5975
+ dotChanged(prev, next) {
5976
+ toggleState(this.elementInternals, "dot", !!next);
5977
+ }
5676
5978
  /**
5677
5979
  * @internal
5678
5980
  * Function to set the count
@@ -5707,13 +6009,14 @@ __decorateClass$k([attr({
5707
6009
  })], CounterBadge.prototype, "dot", 2);
5708
6010
  applyMixins(CounterBadge, StartEnd);
5709
6011
 
6012
+ const dotState = css.partial`:is([state--dot], :state(dot))`;
5710
6013
  const styles$m = css`
5711
- :host([shape='rounded']){border-radius:${borderRadiusMedium}}:host([shape='rounded'][size='tiny']),:host([shape='rounded'][size='extra-small']),:host([shape='rounded'][size='small']){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
6014
+ :host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
5712
6015
  ${badgeFilledStyles}
5713
6016
  ${badgeGhostStyles}
5714
6017
  ${badgeBaseStyles}
5715
6018
 
5716
- :host([dot]),:host([dot][appearance][size]){min-width:auto;width:6px;height:6px;padding:0}`;
6019
+ :host(${dotState}),:host(${dotState}[appearance][size]){min-width:auto;width:6px;height:6px;padding:0}`;
5717
6020
 
5718
6021
  function composeTemplate(options = {}) {
5719
6022
  return badgeTemplate({
@@ -5909,6 +6212,41 @@ class Divider extends FASTElement {
5909
6212
  * @internal
5910
6213
  */
5911
6214
  this.elementInternals = this.attachInternals();
6215
+ this.inset = false;
6216
+ }
6217
+ /**
6218
+ * Handles changes to align-content attribute custom states
6219
+ * @param prev - the previous state
6220
+ * @param next - the next state
6221
+ */
6222
+ alignContentChanged(prev, next) {
6223
+ if (prev) {
6224
+ toggleState(this.elementInternals, `align-${prev}`, false);
6225
+ }
6226
+ if (next) {
6227
+ toggleState(this.elementInternals, `align-${next}`, true);
6228
+ }
6229
+ }
6230
+ /**
6231
+ * Handles changes to appearance attribute custom states
6232
+ * @param prev - the previous state
6233
+ * @param next - the next state
6234
+ */
6235
+ appearanceChanged(prev, next) {
6236
+ if (prev) {
6237
+ toggleState(this.elementInternals, `${prev}`, false);
6238
+ }
6239
+ if (next) {
6240
+ toggleState(this.elementInternals, `${next}`, true);
6241
+ }
6242
+ }
6243
+ /**
6244
+ * Handles changes to inset custom states
6245
+ * @param prev - the previous state
6246
+ * @param next - the next state
6247
+ */
6248
+ insetChanged(prev, next) {
6249
+ toggleState(this.elementInternals, "inset", next);
5912
6250
  }
5913
6251
  connectedCallback() {
5914
6252
  super.connectedCallback();
@@ -5940,8 +6278,12 @@ class Divider extends FASTElement {
5940
6278
  * @internal
5941
6279
  */
5942
6280
  orientationChanged(previous, next) {
5943
- if (this.$fastController.isConnected) {
5944
- this.elementInternals.ariaOrientation = this.role !== DividerRole.presentation ? next : null;
6281
+ this.elementInternals.ariaOrientation = this.role !== DividerRole.presentation ? next : null;
6282
+ if (previous) {
6283
+ toggleState(this.elementInternals, `${previous}`, false);
6284
+ }
6285
+ if (next) {
6286
+ toggleState(this.elementInternals, `${next}`, true);
5945
6287
  }
5946
6288
  }
5947
6289
  }
@@ -5963,8 +6305,8 @@ const template$k = dividerTemplate();
5963
6305
  const styles$j = css`
5964
6306
  ${display("flex")}
5965
6307
 
5966
- :host{contain:content}:host::after,:host::before{align-self:center;background:${colorNeutralStroke2};box-sizing:border-box;content:'';display:flex;flex-grow:1;height:${strokeWidthThin}}:host([inset]){padding:0 12px}:host ::slotted(*){color:${colorNeutralForeground2};font-family:${fontFamilyBase};font-size:${fontSizeBase200};font-weight:${fontWeightRegular};margin:0;padding:0 12px}:host([align-content='start'])::before,:host([align-content='end'])::after{flex-basis:12px;flex-grow:0;flex-shrink:0}:host([orientation='vertical']){height:100%;min-height:84px}:host([orientation='vertical']):empty{min-height:20px}:host([orientation='vertical']){flex-direction:column;align-items:center}:host([orientation='vertical'][inset])::before{margin-top:12px}:host([orientation='vertical'][inset])::after{margin-bottom:12px}:host([orientation='vertical']):empty::before,:host([orientation='vertical']):empty::after{height:10px;min-height:10px;flex-grow:0}:host([orientation='vertical'])::before,:host([orientation='vertical'])::after{width:${strokeWidthThin};min-height:20px;height:100%}:host([orientation='vertical']) ::slotted(*){display:flex;flex-direction:column;padding:12px 0;line-height:20px}:host([orientation='vertical'][align-content='start'])::before{min-height:8px}:host([orientation='vertical'][align-content='end'])::after{min-height:8px}:host([appearance='strong'])::before,:host([appearance='strong'])::after{background:${colorNeutralStroke1}}:host([appearance='strong']) ::slotted(*){color:${colorNeutralForeground1}}:host([appearance='brand'])::before,:host([appearance='brand'])::after{background:${colorBrandStroke1}}:host([appearance='brand']) ::slotted(*){color:${colorBrandForeground1}}:host([appearance='subtle'])::before,:host([appearance='subtle'])::after{background:${colorNeutralStroke3}}:host([appearance='subtle']) ::slotted(*){color:${colorNeutralForeground3}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
5967
- :host([appearance='strong'])::before,:host([appearance='strong'])::after,:host([appearance='brand'])::before,:host([appearance='brand'])::after,:host([appearance='subtle'])::before,:host([appearance='subtle'])::after,:host::after,:host::before{background:WindowText;color:WindowText}`));
6308
+ :host{contain:content}:host::after,:host::before{align-self:center;background:${colorNeutralStroke2};box-sizing:border-box;content:'';display:flex;flex-grow:1;height:${strokeWidthThin}}:host(${insetState}){padding:0 12px}:host ::slotted(*){color:${colorNeutralForeground2};font-family:${fontFamilyBase};font-size:${fontSizeBase200};font-weight:${fontWeightRegular};margin:0;padding:0 12px}:host(${alignStartState})::before,:host(${alignEndState})::after{flex-basis:12px;flex-grow:0;flex-shrink:0}:host(${verticalState}){height:100%;min-height:84px}:host(${verticalState}):empty{min-height:20px}:host(${verticalState}){flex-direction:column;align-items:center}:host(${verticalState}${insetState})::before{margin-top:12px}:host(${verticalState}${insetState})::after{margin-bottom:12px}:host(${verticalState}):empty::before,:host(${verticalState}):empty::after{height:10px;min-height:10px;flex-grow:0}:host(${verticalState})::before,:host(${verticalState})::after{width:${strokeWidthThin};min-height:20px;height:100%}:host(${verticalState}) ::slotted(*){display:flex;flex-direction:column;padding:12px 0;line-height:20px}:host(${verticalState}${alignStartState})::before{min-height:8px}:host(${verticalState}${alignEndState})::after{min-height:8px}:host(${strongState})::before,:host(${strongState})::after{background:${colorNeutralStroke1}}:host(${strongState}) ::slotted(*){color:${colorNeutralForeground1}}:host(${brandState})::before,:host(${brandState})::after{background:${colorBrandStroke1}}:host(${brandState}) ::slotted(*){color:${colorBrandForeground1}}:host(${subtleState})::before,:host(${subtleState})::after{background:${colorNeutralStroke3}}:host(${subtleState}) ::slotted(*){color:${colorNeutralForeground3}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
6309
+ :host(${strongState})::before,:host(${strongState})::after,:host(${brandState})::before,:host(${brandState})::after,:host(${subtleState})::before,:host(${subtleState})::after,:host::after,:host::before{background:WindowText;color:WindowText}`));
5968
6310
 
5969
6311
  const definition$k = Divider.compose({
5970
6312
  name: `${FluentDesignSystem.prefix}-divider`,
@@ -6173,7 +6515,68 @@ var __decorateClass$f = (decorators, target, key, kind) => {
6173
6515
  if (kind && result) __defProp$f(target, key, result);
6174
6516
  return result;
6175
6517
  };
6176
- class Image extends FASTElement {}
6518
+ class Image extends FASTElement {
6519
+ constructor() {
6520
+ super(...arguments);
6521
+ /**
6522
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
6523
+ *
6524
+ * @internal
6525
+ */
6526
+ this.elementInternals = this.attachInternals();
6527
+ this.block = false;
6528
+ }
6529
+ /**
6530
+ * Handles changes to block custom states
6531
+ * @param prev - the previous state
6532
+ * @param next - the next state
6533
+ */
6534
+ blockChanged(prev, next) {
6535
+ toggleState(this.elementInternals, "block", next);
6536
+ }
6537
+ /**
6538
+ * Handles changes to bordered custom states
6539
+ * @param prev - the previous state
6540
+ * @param next - the next state
6541
+ */
6542
+ borderedChanged(prev, next) {
6543
+ toggleState(this.elementInternals, "bordered", next);
6544
+ }
6545
+ /**
6546
+ * Handles changes to shadow custom states
6547
+ * @param prev - the previous state
6548
+ * @param next - the next state
6549
+ */
6550
+ shadowChanged(prev, next) {
6551
+ toggleState(this.elementInternals, "shadow", next);
6552
+ }
6553
+ /**
6554
+ * Handles changes to fit attribute custom states
6555
+ * @param prev - the previous state
6556
+ * @param next - the next state
6557
+ */
6558
+ fitChanged(prev, next) {
6559
+ if (prev) {
6560
+ toggleState(this.elementInternals, `fit-${prev}`, false);
6561
+ }
6562
+ if (next) {
6563
+ toggleState(this.elementInternals, `fit-${next}`, true);
6564
+ }
6565
+ }
6566
+ /**
6567
+ * Handles changes to shape attribute custom states
6568
+ * @param prev - the previous state
6569
+ * @param next - the next state
6570
+ */
6571
+ shapeChanged(prev, next) {
6572
+ if (prev) {
6573
+ toggleState(this.elementInternals, `${prev}`, false);
6574
+ }
6575
+ if (next) {
6576
+ toggleState(this.elementInternals, `${next}`, true);
6577
+ }
6578
+ }
6579
+ }
6177
6580
  __decorateClass$f([attr({
6178
6581
  mode: "boolean"
6179
6582
  })], Image.prototype, "block", 2);
@@ -6189,7 +6592,7 @@ __decorateClass$f([attr], Image.prototype, "shape", 2);
6189
6592
  const template$i = html`<slot></slot>`;
6190
6593
 
6191
6594
  const styles$h = css`
6192
- :host{contain:content}:host ::slotted(img){box-sizing:border-box;min-height:8px;min-width:8px;display:inline-block}:host([block]) ::slotted(img){width:100%;height:auto}:host([bordered]) ::slotted(img){border:${strokeWidthThin} solid ${colorNeutralStroke2}}:host([fit='none']) ::slotted(img){object-fit:none;object-position:top left;height:100%;width:100%}:host([fit='center']) ::slotted(img){object-fit:none;object-position:center;height:100%;width:100%}:host([fit='contain']) ::slotted(img){object-fit:contain;object-position:center;height:100%;width:100%}:host([fit='cover']) ::slotted(img){object-fit:cover;object-position:center;height:100%;width:100%}:host([shadow]) ::slotted(img){box-shadow:${shadow4}}:host([shape='circular']) ::slotted(img){border-radius:${borderRadiusCircular}}:host([shape='rounded']) ::slotted(img){border-radius:${borderRadiusMedium}}`;
6595
+ :host{contain:content}:host ::slotted(img){box-sizing:border-box;min-height:8px;min-width:8px;display:inline-block}:host(:is([state--block],:state(block))) ::slotted(img){width:100%;height:auto}:host(:is([state--bordered],:state(bordered))) ::slotted(img){border:${strokeWidthThin} solid ${colorNeutralStroke2}}:host(:is([state--fit-none],:state(fit-none))) ::slotted(img){object-fit:none;object-position:top left;height:100%;width:100%}:host(:is([state--fit-center],:state(fit-center))) ::slotted(img){object-fit:none;object-position:center;height:100%;width:100%}:host(:is([state--fit-contain],:state(fit-contain))) ::slotted(img){object-fit:contain;object-position:center;height:100%;width:100%}:host(:is([state--fit-cover],:state(fit-cover))) ::slotted(img){object-fit:cover;object-position:center;height:100%;width:100%}:host(:is([state--shadowed],:state(shadowed))) ::slotted(img){box-shadow:${shadow4}}:host(${circularState}) ::slotted(img){border-radius:${borderRadiusCircular}}:host(${roundedState}) ::slotted(img){border-radius:${borderRadiusMedium}}`;
6193
6596
 
6194
6597
  const definition$i = Image.compose({
6195
6598
  name: `${FluentDesignSystem.prefix}-image`,
@@ -6210,9 +6613,49 @@ var __decorateClass$e = (decorators, target, key, kind) => {
6210
6613
  class Label extends FASTElement {
6211
6614
  constructor() {
6212
6615
  super(...arguments);
6616
+ /**
6617
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
6618
+ *
6619
+ * @internal
6620
+ */
6621
+ this.elementInternals = this.attachInternals();
6213
6622
  this.disabled = false;
6214
6623
  this.required = false;
6215
6624
  }
6625
+ /**
6626
+ * Handles changes to size attribute custom states
6627
+ * @param prev - the previous state
6628
+ * @param next - the next state
6629
+ */
6630
+ sizeChanged(prev, next) {
6631
+ if (prev) {
6632
+ toggleState(this.elementInternals, `${prev}`, false);
6633
+ }
6634
+ if (next) {
6635
+ toggleState(this.elementInternals, `${next}`, true);
6636
+ }
6637
+ }
6638
+ /**
6639
+ * Handles changes to weight attribute custom states
6640
+ * @param prev - the previous state
6641
+ * @param next - the next state
6642
+ */
6643
+ weightChanged(prev, next) {
6644
+ if (prev) {
6645
+ toggleState(this.elementInternals, `${prev}`, false);
6646
+ }
6647
+ if (next) {
6648
+ toggleState(this.elementInternals, `${next}`, true);
6649
+ }
6650
+ }
6651
+ /**
6652
+ * Handles changes to disabled attribute custom states
6653
+ * @param prev - the previous state
6654
+ * @param next - the next state
6655
+ */
6656
+ disabledChanged(prev, next) {
6657
+ toggleState(this.elementInternals, "disabled", next);
6658
+ }
6216
6659
  }
6217
6660
  __decorateClass$e([attr], Label.prototype, "size", 2);
6218
6661
  __decorateClass$e([attr], Label.prototype, "weight", 2);
@@ -6226,7 +6669,7 @@ __decorateClass$e([attr({
6226
6669
  const styles$g = css`
6227
6670
  ${display("inline-flex")}
6228
6671
 
6229
- :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([size='large']),:host([weight='semibold']){font-weight:${fontWeightSemibold}}:host([disabled]),:host([disabled]) .asterisk{color:${colorNeutralForegroundDisabled}}`;
6672
+ :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(${smallState}){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host(${largeState}){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${largeState}),:host(:is([state--semibold],:state(semibold))){font-weight:${fontWeightSemibold}}:host(:is([state--disabled],:state(disabled))),:host(:is([state--disabled],:state(disabled))) .asterisk{color:${colorNeutralForegroundDisabled}}`;
6230
6673
 
6231
6674
  function labelTemplate() {
6232
6675
  return html`<slot></slot><span part="asterisk" class="asterisk" ?hidden="${x => !x.required}">*</span>`;
@@ -6254,6 +6697,27 @@ class Link extends BaseAnchor {
6254
6697
  super(...arguments);
6255
6698
  this.inline = false;
6256
6699
  }
6700
+ /**
6701
+ * Handles changes to appearance attribute custom states
6702
+ * @param prev - the previous state
6703
+ * @param next - the next state
6704
+ */
6705
+ appearanceChanged(prev, next) {
6706
+ if (prev) {
6707
+ toggleState(this.elementInternals, `${prev}`, false);
6708
+ }
6709
+ if (next) {
6710
+ toggleState(this.elementInternals, `${next}`, true);
6711
+ }
6712
+ }
6713
+ /**
6714
+ * Handles changes to inline attribute custom states
6715
+ * @param prev - the previous state
6716
+ * @param next - the next state
6717
+ */
6718
+ inlineChanged(prev, next) {
6719
+ toggleState(this.elementInternals, "inline", next);
6720
+ }
6257
6721
  }
6258
6722
  __decorateClass$d([attr], Link.prototype, "appearance", 2);
6259
6723
  __decorateClass$d([attr({
@@ -6263,11 +6727,11 @@ __decorateClass$d([attr({
6263
6727
  const styles$f = css`
6264
6728
  ${display("inline")}
6265
6729
 
6266
- :host{box-sizing:border-box;background-color:transparent;color:${colorBrandForegroundLink};cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};margin:0;padding:0;overflow:inherit;text-align:left;text-decoration:none;text-decoration-thinkness:${strokeWidthThin};text-overflow:inherit;user-select:text}:host(:is(:hover,:focus-visible)){outline:none;text-decoration-line:underline}@media (hover:hover){:host(:hover){color:${colorBrandForegroundLinkHover}}:host(:active){color:${colorBrandForegroundLinkPressed}}:host([appearance='subtle']:hover){color:${colorNeutralForeground2LinkHover}}:host([appearance='subtle']:active){color:${colorNeutralForeground2LinkPressed}}}:host([appearance='subtle']){color:${colorNeutralForeground2Link}}:host-context(:is(h1,h2,h3,h4,h5,h6,p,fluent-text)),:host([inline]){font:inherit;text-decoration:underline}:host(:not([href])){color:inherit;text-decoration:none}`.withBehaviors(forcedColorsStylesheetBehavior(css`
6730
+ :host{position:relative;box-sizing:border-box;background-color:transparent;color:${colorBrandForegroundLink};cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};margin:0;padding:0;overflow:inherit;text-align:left;text-decoration:none;text-decoration-thinkness:${strokeWidthThin};text-overflow:inherit;user-select:text}:host(:is(:hover,:focus-visible)){outline:none;text-decoration-line:underline}@media (hover:hover){:host(:hover){color:${colorBrandForegroundLinkHover}}:host(:active){color:${colorBrandForegroundLinkPressed}}:host(${subtleState}:hover){color:${colorNeutralForeground2LinkHover}}:host(${subtleState}:active){color:${colorNeutralForeground2LinkPressed}}}:host(${subtleState}){color:${colorNeutralForeground2Link}}:host-context(:is(h1,h2,h3,h4,h5,h6,p,fluent-text)),:host(:is([state--inline],:state(inline))){font:inherit;text-decoration:underline}:host(:not([href])){color:inherit;text-decoration:none}::slotted(a){position:absolute;inset:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
6267
6731
  :host{color:LinkText}`));
6268
6732
 
6269
6733
  function anchorTemplate() {
6270
- return html`<template tabindex="0" @click="${x => x.clickHandler()}" @keypress="${(x, c) => x.keypressHandler(c.event)}"><slot></slot></template>`;
6734
+ return html`<template tabindex="0" @click="${(x, c) => x.clickHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><slot></slot></template>`;
6271
6735
  }
6272
6736
  const template$g = anchorTemplate();
6273
6737
 
@@ -8159,6 +8623,45 @@ class ProgressBar extends FASTElement {
8159
8623
  this.validationState = null;
8160
8624
  this.elementInternals.role = "progressbar";
8161
8625
  }
8626
+ /**
8627
+ * Handles changes to thickness attribute custom states
8628
+ * @param prev - the previous state
8629
+ * @param next - the next state
8630
+ */
8631
+ thicknessChanged(prev, next) {
8632
+ if (prev) {
8633
+ toggleState(this.elementInternals, `${prev}`, false);
8634
+ }
8635
+ if (next) {
8636
+ toggleState(this.elementInternals, `${next}`, true);
8637
+ }
8638
+ }
8639
+ /**
8640
+ * Handles changes to shape attribute custom states
8641
+ * @param prev - the previous state
8642
+ * @param next - the next state
8643
+ */
8644
+ shapeChanged(prev, next) {
8645
+ if (prev) {
8646
+ toggleState(this.elementInternals, `${prev}`, false);
8647
+ }
8648
+ if (next) {
8649
+ toggleState(this.elementInternals, `${next}`, true);
8650
+ }
8651
+ }
8652
+ /**
8653
+ * Handles changes to validation-state attribute custom states
8654
+ * @param prev - the previous state
8655
+ * @param next - the next state
8656
+ */
8657
+ validationStateChanged(prev, next) {
8658
+ if (prev) {
8659
+ toggleState(this.elementInternals, `${prev}`, false);
8660
+ }
8661
+ if (next) {
8662
+ toggleState(this.elementInternals, `${next}`, true);
8663
+ }
8664
+ }
8162
8665
  /**
8163
8666
  * Updates the percent complete when the `value` property changes.
8164
8667
  *
@@ -8213,10 +8716,10 @@ __decorateClass$9([volatile], ProgressBar.prototype, "percentComplete", 1);
8213
8716
  const styles$b = css`
8214
8717
  ${display("block")}
8215
8718
 
8216
- :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(
8719
+ :host{width:100%;height:2px;overflow-x:hidden;background-color:${colorNeutralBackground6};border-radius:${borderRadiusMedium};contain:content}:host(${largeState}){height:4px}:host(${squareState}){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(
8217
8720
  to right,${colorNeutralBackground6} 0%,${colorTransparentBackground} 50%,${colorNeutralBackground6} 100%
8218
- );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`
8219
- :host{background-color:CanvasText}.indicator,:host(:is([validation-state='success'],[validation-state='warning'],[validation-state='error'])) .indicator{background-color:Highlight}`));
8721
+ );animation-name:indeterminate;animation-duration:3s;animation-timing-function:linear;animation-iteration-count:infinite}:host(${errorState}) .indicator{background-color:${colorPaletteRedBackground3}}:host(${warningState}) .indicator{background-color:${colorPaletteDarkOrangeBackground3}}:host(${successState}) .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`
8722
+ :host{background-color:CanvasText}.indicator,:host(:is(${successState},${warningState},${errorState})) .indicator{background-color:Highlight}`));
8220
8723
 
8221
8724
  function progressTemplate() {
8222
8725
  return html`<div class="indicator" part="indicator" style="${x => typeof x.value === "number" ? `width: ${x.percentComplete}%` : void 0}"></div>`;
@@ -9543,6 +10046,32 @@ class Spinner extends FASTElement {
9543
10046
  this.elementInternals = this.attachInternals();
9544
10047
  this.elementInternals.role = "progressbar";
9545
10048
  }
10049
+ /**
10050
+ * Handles changes to size attribute custom states
10051
+ * @param prev - the previous state
10052
+ * @param next - the next state
10053
+ */
10054
+ sizeChanged(prev, next) {
10055
+ if (prev) {
10056
+ toggleState(this.elementInternals, `${prev}`, false);
10057
+ }
10058
+ if (next) {
10059
+ toggleState(this.elementInternals, `${next}`, true);
10060
+ }
10061
+ }
10062
+ /**
10063
+ * Handles changes to appearance attribute custom states
10064
+ * @param prev - the previous state
10065
+ * @param next - the next state
10066
+ */
10067
+ appearanceChanged(prev, next) {
10068
+ if (prev) {
10069
+ toggleState(this.elementInternals, `${prev}`, false);
10070
+ }
10071
+ if (next) {
10072
+ toggleState(this.elementInternals, `${next}`, true);
10073
+ }
10074
+ }
9546
10075
  }
9547
10076
  __decorateClass$5([attr], Spinner.prototype, "size", 2);
9548
10077
  __decorateClass$5([attr], Spinner.prototype, "appearance", 2);
@@ -9550,7 +10079,7 @@ __decorateClass$5([attr], Spinner.prototype, "appearance", 2);
9550
10079
  const styles$7 = css`
9551
10080
  ${display("flex")}
9552
10081
 
9553
- :host{display:flex;align-items:center;height:32px;width:32px;contain:content}:host([size='tiny']){height:20px;width:20px}:host([size='extra-small']){height:24px;width:24px}:host([size='small']){height:28px;width:28px}:host([size='large']){height:36px;width:36px}:host([size='extra-large']){height:40px;width:40px}:host([size='huge']){height:44px;width:44px}.progress{height:100%;width:100%}.background{fill:none;stroke:${colorBrandStroke2};stroke-width:1.5px}:host([appearance='inverted']) .background{stroke:rgba(255,255,255,0.2)}.indicator{stroke:${colorBrandStroke1};fill:none;stroke-width:1.5px;stroke-linecap:round;transform-origin:50% 50%;transform:rotate(-90deg);transition:all 0.2s ease-in-out;animation:spin-infinite 3s cubic-bezier(0.53,0.21,0.29,0.67) infinite}:host([appearance='inverted']) .indicator{stroke:${colorNeutralStrokeOnBrand2}}@keyframes spin-infinite{0%{stroke-dasharray:0.01px 43.97px;transform:rotate(0deg)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}100%{stroke-dasharray:0.01px 43.97px;transform:rotate(1080deg)}}`;
10082
+ :host{display:flex;align-items:center;height:32px;width:32px;contain:content}:host(${tinyState}){height:20px;width:20px}:host(${extraSmallState}){height:24px;width:24px}:host(${smallState}){height:28px;width:28px}:host(${largeState}){height:36px;width:36px}:host(${extraLargeState}){height:40px;width:40px}:host(${hugeState}){height:44px;width:44px}.progress{height:100%;width:100%}.background{fill:none;stroke:${colorBrandStroke2};stroke-width:1.5px}:host(${invertedState}) .background{stroke:rgba(255,255,255,0.2)}.indicator{stroke:${colorBrandStroke1};fill:none;stroke-width:1.5px;stroke-linecap:round;transform-origin:50% 50%;transform:rotate(-90deg);transition:all 0.2s ease-in-out;animation:spin-infinite 3s cubic-bezier(0.53,0.21,0.29,0.67) infinite}:host(${invertedState}) .indicator{stroke:${colorNeutralStrokeOnBrand2}}@keyframes spin-infinite{0%{stroke-dasharray:0.01px 43.97px;transform:rotate(0deg)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}100%{stroke-dasharray:0.01px 43.97px;transform:rotate(1080deg)}}`;
9554
10083
 
9555
10084
  const template$7 = html`<slot name="indicator"><svg class="progress" part="progress" viewBox="0 0 16 16"><circle class="background" cx="8px" cy="8px" r="7px"></circle><circle class="indicator" cx="8px" cy="8px" r="7px"></circle></svg></slot>`;
9556
10085
 
@@ -10104,6 +10633,32 @@ class TextInput extends FASTElement {
10104
10633
  */
10105
10634
  this.elementInternals = this.attachInternals();
10106
10635
  }
10636
+ /**
10637
+ * Handles changes to appearance attribute custom states
10638
+ * @param prev - the previous state
10639
+ * @param next - the next state
10640
+ */
10641
+ appearanceChanged(prev, next) {
10642
+ if (prev) {
10643
+ toggleState(this.elementInternals, `${prev}`, false);
10644
+ }
10645
+ if (next) {
10646
+ toggleState(this.elementInternals, `${next}`, true);
10647
+ }
10648
+ }
10649
+ /**
10650
+ * Handles changes to `control-size` attribute custom states
10651
+ * @param prev - the previous state
10652
+ * @param next - the next state
10653
+ */
10654
+ controlSizeChanged(prev, next) {
10655
+ if (prev) {
10656
+ toggleState(this.elementInternals, `${prev}`, false);
10657
+ }
10658
+ if (next) {
10659
+ toggleState(this.elementInternals, `${next}`, true);
10660
+ }
10661
+ }
10107
10662
  /**
10108
10663
  * Updates the control label visibility based on the presence of default slotted content.
10109
10664
  *
@@ -10446,7 +11001,7 @@ applyMixins(TextInput, StartEnd);
10446
11001
  const styles$2 = css`
10447
11002
  ${display("block")}
10448
11003
 
10449
- :host{font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};max-width:400px}.label{display:flex;color:${colorNeutralForeground1};padding-bottom:${spacingVerticalXS};flex-shrink:0;padding-inline-end:${spacingHorizontalXS}}.label[hidden],:host(:empty) .label{display:none}.root{align-items:center;background-color:${colorNeutralBackground1};border:${strokeWidthThin} solid ${colorNeutralStroke1};border-bottom-color:${colorNeutralStrokeAccessible};border-radius:${borderRadiusMedium};box-sizing:border-box;height:32px;display:inline-flex;flex-direction:row;gap:${spacingHorizontalXXS};padding:0 ${spacingHorizontalMNudge};position:relative;width:100%}:has(.control:user-invalid){border-color:${colorPaletteRedBorder2}}.root::after{box-sizing:border-box;content:'';position:absolute;left:-1px;bottom:0px;right:-1px;height:max(2px,${borderRadiusMedium});border-radius:0 0 ${borderRadiusMedium} ${borderRadiusMedium};border-bottom:2px solid ${colorCompoundBrandStroke};clip-path:inset(calc(100% - 2px) 1px 0px);transform:scaleX(0);transition-property:transform;transition-duration:${durationUltraFast};transition-delay:${curveAccelerateMid}}.control{width:100%;height:100%;box-sizing:border-box;color:${colorNeutralForeground1};border-radius:${borderRadiusMedium};background:${colorTransparentBackground};font-family:${fontFamilyBase};font-weight:${fontWeightRegular};font-size:${fontSizeBase300};border:none;vertical-align:center}.control:focus-visible{outline:0;border:0}.control::placeholder{color:${colorNeutralForeground4}}:host ::slotted([slot='start']),:host ::slotted([slot='end']){display:flex;align-items:center;justify-content:center;color:${colorNeutralForeground3};font-size:${fontSizeBase500}}:host ::slotted([slot='start']){padding-right:${spacingHorizontalXXS}}:host ::slotted([slot='end']){padding-left:${spacingHorizontalXXS};gap:${spacingHorizontalXS}}:host(:hover) .root{border-color:${colorNeutralStroke1Hover};border-bottom-color:${colorNeutralStrokeAccessibleHover}}:host(:active) .root{border-color:${colorNeutralStroke1Pressed}}:host(:focus-within) .root{outline:transparent solid 2px;border-bottom:0}:host(:focus-within) .root::after{transform:scaleX(1);transition-property:transform;transition-duration:${durationNormal};transition-delay:${curveDecelerateMid}}:host(:focus-within:active) .root:after{border-bottom-color:${colorCompoundBrandStrokePressed}}:host([appearance='outline']:focus-within) .root{border:${strokeWidthThin} solid ${colorNeutralStroke1}}:host(:focus-within) .control{color:${colorNeutralForeground1}}:host([disabled]) .root{background:${colorTransparentBackground};border:${strokeWidthThin} solid ${colorNeutralStrokeDisabled}}:host([disabled]) .control::placeholder,:host([disabled]) ::slotted([slot='start']),:host([disabled]) ::slotted([slot='end']){color:${colorNeutralForegroundDisabled}}::selection{color:${colorNeutralForegroundInverted};background-color:${colorNeutralBackgroundInverted}}:host([control-size='small']) .control{font-size:${fontSizeBase200};font-weight:${fontWeightRegular};line-height:${lineHeightBase200}}:host([control-size='small']) .root{height:24px;gap:${spacingHorizontalXXS};padding:0 ${spacingHorizontalSNudge}}:host([control-size='small']) ::slotted([slot='start']),:host([control-size='small']) ::slotted([slot='end']){font-size:${fontSizeBase400}}:host([control-size='large']) .control{font-size:${fontSizeBase400};font-weight:${fontWeightRegular};line-height:${lineHeightBase400}}:host([control-size='large']) .root{height:40px;gap:${spacingHorizontalS};padding:0 ${spacingHorizontalM}}:host([control-size='large']) ::slotted([slot='start']),:host([control-size='large']) ::slotted([slot='end']){font-size:${fontSizeBase600}}:host([appearance='underline']) .root{background:${colorTransparentBackground};border:0;border-radius:0;border-bottom:${strokeWidthThin} solid ${colorNeutralStrokeAccessible}}:host([appearance='underline']:hover) .root{border-bottom-color:${colorNeutralStrokeAccessibleHover}}:host([appearance='underline']:active) .root{border-bottom-color:${colorNeutralStrokeAccessiblePressed}}:host([appearance='underline']:focus-within) .root{border:0;border-bottom-color:${colorNeutralStrokeAccessiblePressed}}:host([appearance='underline'][disabled]) .root{border-bottom-color:${colorNeutralStrokeDisabled}}:host([appearance='filled-lighter']) .root,:host([appearance='filled-darker']) .root{border:${strokeWidthThin} solid ${colorTransparentStroke};box-shadow:${shadow2}}:host([appearance='filled-lighter']) .root{background:${colorNeutralBackground1}}:host([appearance='filled-darker']) .root{background:${colorNeutralBackground3}}:host([appearance='filled-lighter']:hover) .root,:host([appearance='filled-darker']:hover) .root{border-color:${colorTransparentStrokeInteractive}}:host([appearance='filled-lighter']:active) .root,:host([appearance='filled-darker']:active) .root{border-color:${colorTransparentStrokeInteractive};background:${colorNeutralBackground3}}`;
11004
+ :host{font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};max-width:400px}.label{display:flex;color:${colorNeutralForeground1};padding-bottom:${spacingVerticalXS};flex-shrink:0;padding-inline-end:${spacingHorizontalXS}}.label[hidden],:host(:empty) .label{display:none}.root{align-items:center;background-color:${colorNeutralBackground1};border:${strokeWidthThin} solid ${colorNeutralStroke1};border-bottom-color:${colorNeutralStrokeAccessible};border-radius:${borderRadiusMedium};box-sizing:border-box;height:32px;display:inline-flex;flex-direction:row;gap:${spacingHorizontalXXS};padding:0 ${spacingHorizontalMNudge};position:relative;width:100%}:has(.control:user-invalid){border-color:${colorPaletteRedBorder2}}.root::after{box-sizing:border-box;content:'';position:absolute;left:-1px;bottom:0px;right:-1px;height:max(2px,${borderRadiusMedium});border-radius:0 0 ${borderRadiusMedium} ${borderRadiusMedium};border-bottom:2px solid ${colorCompoundBrandStroke};clip-path:inset(calc(100% - 2px) 1px 0px);transform:scaleX(0);transition-property:transform;transition-duration:${durationUltraFast};transition-delay:${curveAccelerateMid}}.control{width:100%;height:100%;box-sizing:border-box;color:${colorNeutralForeground1};border-radius:${borderRadiusMedium};background:${colorTransparentBackground};font-family:${fontFamilyBase};font-weight:${fontWeightRegular};font-size:${fontSizeBase300};border:none;vertical-align:center}.control:focus-visible{outline:0;border:0}.control::placeholder{color:${colorNeutralForeground4}}:host ::slotted([slot='start']),:host ::slotted([slot='end']){display:flex;align-items:center;justify-content:center;color:${colorNeutralForeground3};font-size:${fontSizeBase500}}:host ::slotted([slot='start']){padding-right:${spacingHorizontalXXS}}:host ::slotted([slot='end']){padding-left:${spacingHorizontalXXS};gap:${spacingHorizontalXS}}:host(:hover) .root{border-color:${colorNeutralStroke1Hover};border-bottom-color:${colorNeutralStrokeAccessibleHover}}:host(:active) .root{border-color:${colorNeutralStroke1Pressed}}:host(:focus-within) .root{outline:transparent solid 2px;border-bottom:0}:host(:focus-within) .root::after{transform:scaleX(1);transition-property:transform;transition-duration:${durationNormal};transition-delay:${curveDecelerateMid}}:host(:focus-within:active) .root:after{border-bottom-color:${colorCompoundBrandStrokePressed}}:host(${outlineState}:focus-within) .root{border:${strokeWidthThin} solid ${colorNeutralStroke1}}:host(:focus-within) .control{color:${colorNeutralForeground1}}:host([disabled]) .root{background:${colorTransparentBackground};border:${strokeWidthThin} solid ${colorNeutralStrokeDisabled}}:host([disabled]) .control::placeholder,:host([disabled]) ::slotted([slot='start']),:host([disabled]) ::slotted([slot='end']){color:${colorNeutralForegroundDisabled}}::selection{color:${colorNeutralForegroundInverted};background-color:${colorNeutralBackgroundInverted}}:host(${smallState}) .control{font-size:${fontSizeBase200};font-weight:${fontWeightRegular};line-height:${lineHeightBase200}}:host(${smallState}) .root{height:24px;gap:${spacingHorizontalXXS};padding:0 ${spacingHorizontalSNudge}}:host(${smallState}) ::slotted([slot='start']),:host(${smallState}) ::slotted([slot='end']){font-size:${fontSizeBase400}}:host(${largeState}) .control{font-size:${fontSizeBase400};font-weight:${fontWeightRegular};line-height:${lineHeightBase400}}:host(${largeState}) .root{height:40px;gap:${spacingHorizontalS};padding:0 ${spacingHorizontalM}}:host(${largeState}) ::slotted([slot='start']),:host(${largeState}) ::slotted([slot='end']){font-size:${fontSizeBase600}}:host(${underlineState}) .root{background:${colorTransparentBackground};border:0;border-radius:0;border-bottom:${strokeWidthThin} solid ${colorNeutralStrokeAccessible}}:host(${underlineState}:hover) .root{border-bottom-color:${colorNeutralStrokeAccessibleHover}}:host(${underlineState}:active) .root{border-bottom-color:${colorNeutralStrokeAccessiblePressed}}:host(${underlineState}:focus-within) .root{border:0;border-bottom-color:${colorNeutralStrokeAccessiblePressed}}:host(${underlineState}[disabled]) .root{border-bottom-color:${colorNeutralStrokeDisabled}}:host(${filledLighterState}) .root,:host(${filledDarkerState}) .root{border:${strokeWidthThin} solid ${colorTransparentStroke};box-shadow:${shadow2}}:host(${filledLighterState}) .root{background:${colorNeutralBackground1}}:host(${filledDarkerState}) .root{background:${colorNeutralBackground3}}:host(${filledLighterState}:hover) .root,:host(${filledDarkerState}:hover) .root{border-color:${colorTransparentStrokeInteractive}}:host(${filledLighterState}:active) .root,:host(${filledDarkerState}:active) .root{border-color:${colorTransparentStrokeInteractive};background:${colorNeutralBackground3}}`;
10450
11005
 
10451
11006
  function textInputTemplate(options = {}) {
10452
11007
  return html`<template @beforeinput="${(x, c) => x.beforeinputHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><label part="label" for="control" class="label" ${ref("controlLabel")}><slot ${slotted({
@@ -10572,7 +11127,7 @@ class ToggleButton extends Button {
10572
11127
  if (this.$fastController.isConnected) {
10573
11128
  const ariaPressed = `${this.mixed ? "mixed" : !!this.pressed}`;
10574
11129
  this.elementInternals.ariaPressed = ariaPressed;
10575
- this.setAttribute("aria-pressed", ariaPressed);
11130
+ toggleState(this.elementInternals, "pressed", !!this.pressed || !!this.mixed);
10576
11131
  }
10577
11132
  }
10578
11133
  }
@@ -10586,8 +11141,8 @@ __decorateClass([attr({
10586
11141
  const styles = css`
10587
11142
  ${styles$s}
10588
11143
 
10589
- :host([aria-pressed='true']){border-color:${colorNeutralStroke1};background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground1};border-width:${strokeWidthThin}}:host([aria-pressed='true']:hover){border-color:${colorNeutralStroke1Hover};background-color:${colorNeutralBackground1Hover}}:host([aria-pressed='true']:active){border-color:${colorNeutralStroke1Pressed};background-color:${colorNeutralBackground1Pressed}}:host([aria-pressed='true'][appearance='primary']){border-color:transparent;background-color:${colorBrandBackgroundSelected};color:${colorNeutralForegroundOnBrand}}:host([aria-pressed='true'][appearance='primary']:hover){background-color:${colorBrandBackgroundHover}}:host([aria-pressed='true'][appearance='primary']:active){background-color:${colorBrandBackgroundPressed}}:host([aria-pressed='true'][appearance='subtle']){border-color:transparent;background-color:${colorSubtleBackgroundSelected};color:${colorNeutralForeground2Selected}}:host([aria-pressed='true'][appearance='subtle']:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover}}:host([aria-pressed='true'][appearance='subtle']:active){background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed}}:host([aria-pressed='true'][appearance='outline']),:host([aria-pressed='true'][appearance='transparent']){background-color:${colorTransparentBackgroundSelected}}:host([aria-pressed='true'][appearance='outline']:hover),:host([aria-pressed='true'][appearance='transparent']:hover){background-color:${colorTransparentBackgroundHover}}:host([aria-pressed='true'][appearance='outline']:active),:host([aria-pressed='true'][appearance='transparent']:active){background-color:${colorTransparentBackgroundPressed}}:host([aria-pressed='true'][appearance='transparent']){border-color:transparent;color:${colorNeutralForeground2BrandSelected}}:host([aria-pressed='true'][appearance='transparent']:hover){color:${colorNeutralForeground2BrandHover}}:host([aria-pressed='true'][appearance='transparent']:active){color:${colorNeutralForeground2BrandPressed}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
10590
- :host([aria-pressed='true']),:host([aria-pressed='true'][appearance='primary']),:host([aria-pressed='true'][appearance='subtle']),:host([aria-pressed='true'][appearance='outline']),:host([aria-pressed='true'][appearance='transparent']){background:SelectedItem;color:SelectedItemText}`));
11144
+ :host(${pressedState}){border-color:${colorNeutralStroke1};background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground1};border-width:${strokeWidthThin}}:host(${pressedState}:hover){border-color:${colorNeutralStroke1Hover};background-color:${colorNeutralBackground1Hover}}:host(${pressedState}:active){border-color:${colorNeutralStroke1Pressed};background-color:${colorNeutralBackground1Pressed}}:host(${pressedState}${primaryState}){border-color:transparent;background-color:${colorBrandBackgroundSelected};color:${colorNeutralForegroundOnBrand}}:host(${pressedState}${primaryState}:hover){background-color:${colorBrandBackgroundHover}}:host(${pressedState}${primaryState}:active){background-color:${colorBrandBackgroundPressed}}:host(${pressedState}${subtleState}){border-color:transparent;background-color:${colorSubtleBackgroundSelected};color:${colorNeutralForeground2Selected}}:host(${pressedState}${subtleState}:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover}}:host(${pressedState}${subtleState}:active){background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed}}:host(${pressedState}${outlineState}),:host(${pressedState}${transparentState}){background-color:${colorTransparentBackgroundSelected}}:host(${pressedState}${outlineState}:hover),:host(${pressedState}${transparentState}:hover){background-color:${colorTransparentBackgroundHover}}:host(${pressedState}${outlineState}:active),:host(${pressedState}${transparentState}:active){background-color:${colorTransparentBackgroundPressed}}:host(${pressedState}${transparentState}){border-color:transparent;color:${colorNeutralForeground2BrandSelected}}:host(${pressedState}${transparentState}:hover){color:${colorNeutralForeground2BrandHover}}:host(${pressedState}${transparentState}:active){color:${colorNeutralForeground2BrandPressed}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
11145
+ :host(${pressedState}),:host(${pressedState}${primaryState}),:host(${pressedState}${subtleState}),:host(${pressedState}${outlineState}),:host(${pressedState}${transparentState}){background:SelectedItem;color:SelectedItemText}`));
10591
11146
 
10592
11147
  const template = buttonTemplate$1();
10593
11148