@fluentui/web-components 3.0.0-beta.71 → 3.0.0-beta.73

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 (179) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/dist/dts/accordion/accordion.template.d.ts +1 -1
  3. package/dist/dts/accordion-item/accordion-item.d.ts +2 -2
  4. package/dist/dts/accordion-item/accordion-item.template.d.ts +1 -1
  5. package/dist/dts/anchor-button/anchor-button.d.ts +2 -2
  6. package/dist/dts/anchor-button/anchor-button.options.d.ts +1 -1
  7. package/dist/dts/anchor-button/anchor-button.template.d.ts +1 -1
  8. package/dist/dts/avatar/avatar.d.ts +1 -1
  9. package/dist/dts/avatar/avatar.template.d.ts +1 -1
  10. package/dist/dts/badge/badge.options.d.ts +1 -1
  11. package/dist/dts/badge/badge.template.d.ts +1 -1
  12. package/dist/dts/button/button.d.ts +1 -2
  13. package/dist/dts/button/button.options.d.ts +1 -1
  14. package/dist/dts/button/button.template.d.ts +2 -2
  15. package/dist/dts/compound-button/compound-button.options.d.ts +1 -1
  16. package/dist/dts/compound-button/compound-button.template.d.ts +1 -1
  17. package/dist/dts/counter-badge/counter-badge.options.d.ts +1 -1
  18. package/dist/dts/counter-badge/counter-badge.template.d.ts +2 -2
  19. package/dist/dts/dialog/dialog.template.d.ts +1 -1
  20. package/dist/dts/dialog-body/dialog-body.template.d.ts +1 -1
  21. package/dist/dts/divider/divider.d.ts +1 -1
  22. package/dist/dts/divider/divider.template.d.ts +1 -1
  23. package/dist/dts/drawer/drawer.template.d.ts +1 -1
  24. package/dist/dts/drawer-body/drawer-body.template.d.ts +1 -1
  25. package/dist/dts/field/field.d.ts +1 -1
  26. package/dist/dts/field/field.template.d.ts +1 -1
  27. package/dist/dts/image/image.template.d.ts +1 -1
  28. package/dist/dts/index-rollup.d.ts +1 -0
  29. package/dist/dts/index.d.ts +1 -0
  30. package/dist/dts/label/label.template.d.ts +2 -2
  31. package/dist/dts/link/link.d.ts +1 -1
  32. package/dist/dts/link/link.template.d.ts +1 -1
  33. package/dist/dts/menu/menu.d.ts +1 -1
  34. package/dist/dts/menu/menu.template.d.ts +1 -1
  35. package/dist/dts/menu-button/menu-button.template.d.ts +1 -1
  36. package/dist/dts/menu-item/menu-item.d.ts +1 -1
  37. package/dist/dts/menu-list/menu-list.template.d.ts +1 -1
  38. package/dist/dts/message-bar/message-bar.template.d.ts +1 -1
  39. package/dist/dts/patterns/start-end.d.ts +1 -1
  40. package/dist/dts/radio/radio.template.d.ts +1 -1
  41. package/dist/dts/radio-group/radio-group.template.d.ts +1 -1
  42. package/dist/dts/rating-display/rating-display.template.d.ts +1 -1
  43. package/dist/dts/slider/slider.d.ts +3 -3
  44. package/dist/dts/spinner/spinner.d.ts +1 -1
  45. package/dist/dts/spinner/spinner.template.d.ts +1 -1
  46. package/dist/dts/switch/switch.template.d.ts +2 -2
  47. package/dist/dts/tab/tab.d.ts +2 -1
  48. package/dist/dts/tab/tab.template.d.ts +1 -1
  49. package/dist/dts/tab-panel/tab-panel.template.d.ts +2 -2
  50. package/dist/dts/tablist/tablist.template.d.ts +1 -1
  51. package/dist/dts/tabs/tabs.d.ts +1 -1
  52. package/dist/dts/tabs/tabs.options.d.ts +2 -2
  53. package/dist/dts/tabs/tabs.template.d.ts +3 -3
  54. package/dist/dts/text/text.d.ts +1 -1
  55. package/dist/dts/text/text.template.d.ts +1 -1
  56. package/dist/dts/text-input/text-input.d.ts +1 -2
  57. package/dist/dts/textarea/textarea.template.d.ts +1 -1
  58. package/dist/dts/toggle-button/toggle-button.template.d.ts +1 -1
  59. package/dist/dts/tooltip/define.d.ts +1 -0
  60. package/dist/dts/tooltip/index.d.ts +5 -0
  61. package/dist/dts/tooltip/tooltip.d.ts +88 -0
  62. package/dist/dts/tooltip/tooltip.definition.d.ts +9 -0
  63. package/dist/dts/tooltip/tooltip.options.d.ts +24 -0
  64. package/dist/dts/tooltip/tooltip.styles.d.ts +5 -0
  65. package/dist/dts/tooltip/tooltip.template.d.ts +6 -0
  66. package/dist/dts/utils/element-internals.d.ts +23 -1
  67. package/dist/dts/utils/template-helpers.d.ts +1 -2
  68. package/dist/esm/accordion/accordion.template.js.map +1 -1
  69. package/dist/esm/accordion-item/accordion-item.js +4 -13
  70. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  71. package/dist/esm/accordion-item/accordion-item.template.js.map +1 -1
  72. package/dist/esm/anchor-button/anchor-button.js +5 -20
  73. package/dist/esm/anchor-button/anchor-button.js.map +1 -1
  74. package/dist/esm/anchor-button/anchor-button.template.js.map +1 -1
  75. package/dist/esm/avatar/avatar.js +3 -5
  76. package/dist/esm/avatar/avatar.js.map +1 -1
  77. package/dist/esm/avatar/avatar.template.js.map +1 -1
  78. package/dist/esm/badge/badge.js +6 -27
  79. package/dist/esm/badge/badge.js.map +1 -1
  80. package/dist/esm/badge/badge.template.js.map +1 -1
  81. package/dist/esm/button/button.js +6 -22
  82. package/dist/esm/button/button.js.map +1 -1
  83. package/dist/esm/button/button.template.js.map +1 -1
  84. package/dist/esm/checkbox/checkbox.js +5 -15
  85. package/dist/esm/checkbox/checkbox.js.map +1 -1
  86. package/dist/esm/compound-button/compound-button.template.js.map +1 -1
  87. package/dist/esm/counter-badge/counter-badge.js +6 -26
  88. package/dist/esm/counter-badge/counter-badge.js.map +1 -1
  89. package/dist/esm/counter-badge/counter-badge.template.js.map +1 -1
  90. package/dist/esm/dialog/dialog.template.js.map +1 -1
  91. package/dist/esm/dialog-body/dialog-body.template.js.map +1 -1
  92. package/dist/esm/divider/divider.js +6 -21
  93. package/dist/esm/divider/divider.js.map +1 -1
  94. package/dist/esm/divider/divider.template.js.map +1 -1
  95. package/dist/esm/drawer/drawer.template.js.map +1 -1
  96. package/dist/esm/drawer-body/drawer-body.template.js.map +1 -1
  97. package/dist/esm/field/field.js.map +1 -1
  98. package/dist/esm/field/field.template.js.map +1 -1
  99. package/dist/esm/image/image.js +4 -13
  100. package/dist/esm/image/image.js.map +1 -1
  101. package/dist/esm/image/image.template.js.map +1 -1
  102. package/dist/esm/index-rollup.js +1 -0
  103. package/dist/esm/index-rollup.js.map +1 -1
  104. package/dist/esm/index.js +1 -0
  105. package/dist/esm/index.js.map +1 -1
  106. package/dist/esm/label/label.js +4 -13
  107. package/dist/esm/label/label.js.map +1 -1
  108. package/dist/esm/label/label.template.js.map +1 -1
  109. package/dist/esm/link/link.js +3 -7
  110. package/dist/esm/link/link.js.map +1 -1
  111. package/dist/esm/link/link.template.js.map +1 -1
  112. package/dist/esm/menu/menu.js +0 -3
  113. package/dist/esm/menu/menu.js.map +1 -1
  114. package/dist/esm/menu/menu.template.js.map +1 -1
  115. package/dist/esm/menu-button/menu-button.template.js.map +1 -1
  116. package/dist/esm/menu-item/menu-item.js +0 -7
  117. package/dist/esm/menu-item/menu-item.js.map +1 -1
  118. package/dist/esm/menu-item/menu-item.template.js +1 -3
  119. package/dist/esm/menu-item/menu-item.template.js.map +1 -1
  120. package/dist/esm/menu-list/menu-list.js +1 -2
  121. package/dist/esm/menu-list/menu-list.js.map +1 -1
  122. package/dist/esm/menu-list/menu-list.template.js.map +1 -1
  123. package/dist/esm/message-bar/message-bar.js +5 -19
  124. package/dist/esm/message-bar/message-bar.js.map +1 -1
  125. package/dist/esm/message-bar/message-bar.template.js.map +1 -1
  126. package/dist/esm/patterns/start-end.js.map +1 -1
  127. package/dist/esm/progress-bar/progress-bar.js +5 -19
  128. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  129. package/dist/esm/progress-bar/progress-bar.options.js.map +1 -1
  130. package/dist/esm/radio/radio.template.js.map +1 -1
  131. package/dist/esm/radio-group/radio-group.js +1 -2
  132. package/dist/esm/radio-group/radio-group.js.map +1 -1
  133. package/dist/esm/radio-group/radio-group.template.js.map +1 -1
  134. package/dist/esm/rating-display/rating-display.js +4 -9
  135. package/dist/esm/rating-display/rating-display.js.map +1 -1
  136. package/dist/esm/rating-display/rating-display.template.js.map +1 -1
  137. package/dist/esm/slider/slider.js +5 -16
  138. package/dist/esm/slider/slider.js.map +1 -1
  139. package/dist/esm/spinner/spinner.js +4 -13
  140. package/dist/esm/spinner/spinner.js.map +1 -1
  141. package/dist/esm/switch/switch.template.js.map +1 -1
  142. package/dist/esm/tab/tab.js +1 -1
  143. package/dist/esm/tab/tab.js.map +1 -1
  144. package/dist/esm/tab/tab.template.js.map +1 -1
  145. package/dist/esm/tab-panel/tab-panel.template.js.map +1 -1
  146. package/dist/esm/tablist/tablist.js +6 -22
  147. package/dist/esm/tablist/tablist.js.map +1 -1
  148. package/dist/esm/tabs/tabs.js.map +1 -1
  149. package/dist/esm/tabs/tabs.template.js.map +1 -1
  150. package/dist/esm/text/text.js +6 -25
  151. package/dist/esm/text/text.js.map +1 -1
  152. package/dist/esm/text/text.template.js.map +1 -1
  153. package/dist/esm/text-input/text-input.js +5 -16
  154. package/dist/esm/text-input/text-input.js.map +1 -1
  155. package/dist/esm/textarea/textarea.js +10 -23
  156. package/dist/esm/textarea/textarea.js.map +1 -1
  157. package/dist/esm/textarea/textarea.template.js.map +1 -1
  158. package/dist/esm/tooltip/define.js +4 -0
  159. package/dist/esm/tooltip/define.js.map +1 -0
  160. package/dist/esm/tooltip/index.js +6 -0
  161. package/dist/esm/tooltip/index.js.map +1 -0
  162. package/dist/esm/tooltip/tooltip.definition.js +17 -0
  163. package/dist/esm/tooltip/tooltip.definition.js.map +1 -0
  164. package/dist/esm/tooltip/tooltip.js +188 -0
  165. package/dist/esm/tooltip/tooltip.js.map +1 -0
  166. package/dist/esm/tooltip/tooltip.options.js +19 -0
  167. package/dist/esm/tooltip/tooltip.options.js.map +1 -0
  168. package/dist/esm/tooltip/tooltip.styles.js +95 -0
  169. package/dist/esm/tooltip/tooltip.styles.js.map +1 -0
  170. package/dist/esm/tooltip/tooltip.template.js +11 -0
  171. package/dist/esm/tooltip/tooltip.template.js.map +1 -0
  172. package/dist/esm/utils/element-internals.js +45 -0
  173. package/dist/esm/utils/element-internals.js.map +1 -1
  174. package/dist/esm/utils/template-helpers.js +1 -1
  175. package/dist/esm/utils/template-helpers.js.map +1 -1
  176. package/dist/web-components.d.ts +130 -6
  177. package/dist/web-components.js +1134 -940
  178. package/dist/web-components.min.js +343 -330
  179. package/package.json +1 -1
@@ -4094,70 +4094,70 @@ function uniqueId(prefix = "") {
4094
4094
  return `${prefix}${uniqueIdCounter++}`;
4095
4095
  }
4096
4096
 
4097
- var __defProp$w = Object.defineProperty;
4098
- var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
4099
- var __decorateClass$w = (decorators, target, key, kind) => {
4100
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
4097
+ var __defProp$x = Object.defineProperty;
4098
+ var __getOwnPropDesc$x = Object.getOwnPropertyDescriptor;
4099
+ var __decorateClass$x = (decorators, target, key, kind) => {
4100
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$x(target, key) : target;
4101
4101
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4102
- if (kind && result) __defProp$w(target, key, result);
4102
+ if (kind && result) __defProp$x(target, key, result);
4103
4103
  return result;
4104
4104
  };
4105
4105
  class ARIAGlobalStatesAndProperties {}
4106
- __decorateClass$w([attr({
4106
+ __decorateClass$x([attr({
4107
4107
  attribute: "aria-atomic"
4108
4108
  })], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", 2);
4109
- __decorateClass$w([attr({
4109
+ __decorateClass$x([attr({
4110
4110
  attribute: "aria-busy"
4111
4111
  })], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", 2);
4112
- __decorateClass$w([attr({
4112
+ __decorateClass$x([attr({
4113
4113
  attribute: "aria-controls"
4114
4114
  })], ARIAGlobalStatesAndProperties.prototype, "ariaControls", 2);
4115
- __decorateClass$w([attr({
4115
+ __decorateClass$x([attr({
4116
4116
  attribute: "aria-current"
4117
4117
  })], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", 2);
4118
- __decorateClass$w([attr({
4118
+ __decorateClass$x([attr({
4119
4119
  attribute: "aria-describedby"
4120
4120
  })], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", 2);
4121
- __decorateClass$w([attr({
4121
+ __decorateClass$x([attr({
4122
4122
  attribute: "aria-details"
4123
4123
  })], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", 2);
4124
- __decorateClass$w([attr({
4124
+ __decorateClass$x([attr({
4125
4125
  attribute: "aria-disabled"
4126
4126
  })], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", 2);
4127
- __decorateClass$w([attr({
4127
+ __decorateClass$x([attr({
4128
4128
  attribute: "aria-errormessage"
4129
4129
  })], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", 2);
4130
- __decorateClass$w([attr({
4130
+ __decorateClass$x([attr({
4131
4131
  attribute: "aria-flowto"
4132
4132
  })], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", 2);
4133
- __decorateClass$w([attr({
4133
+ __decorateClass$x([attr({
4134
4134
  attribute: "aria-haspopup"
4135
4135
  })], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", 2);
4136
- __decorateClass$w([attr({
4136
+ __decorateClass$x([attr({
4137
4137
  attribute: "aria-hidden"
4138
4138
  })], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", 2);
4139
- __decorateClass$w([attr({
4139
+ __decorateClass$x([attr({
4140
4140
  attribute: "aria-invalid"
4141
4141
  })], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", 2);
4142
- __decorateClass$w([attr({
4142
+ __decorateClass$x([attr({
4143
4143
  attribute: "aria-keyshortcuts"
4144
4144
  })], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", 2);
4145
- __decorateClass$w([attr({
4145
+ __decorateClass$x([attr({
4146
4146
  attribute: "aria-label"
4147
4147
  })], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", 2);
4148
- __decorateClass$w([attr({
4148
+ __decorateClass$x([attr({
4149
4149
  attribute: "aria-labelledby"
4150
4150
  })], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", 2);
4151
- __decorateClass$w([attr({
4151
+ __decorateClass$x([attr({
4152
4152
  attribute: "aria-live"
4153
4153
  })], ARIAGlobalStatesAndProperties.prototype, "ariaLive", 2);
4154
- __decorateClass$w([attr({
4154
+ __decorateClass$x([attr({
4155
4155
  attribute: "aria-owns"
4156
4156
  })], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", 2);
4157
- __decorateClass$w([attr({
4157
+ __decorateClass$x([attr({
4158
4158
  attribute: "aria-relevant"
4159
4159
  })], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", 2);
4160
- __decorateClass$w([attr({
4160
+ __decorateClass$x([attr({
4161
4161
  attribute: "aria-roledescription"
4162
4162
  })], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", 2);
4163
4163
 
@@ -4343,6 +4343,9 @@ function stateSelector(state) {
4343
4343
  return statesMap.get(state) ?? statesMap.set(state, CustomStatesSetSupported ? `:state(${state})` : `[state--${state}]`).get(state);
4344
4344
  }
4345
4345
  function toggleState(elementInternals, state, force) {
4346
+ if (!state) {
4347
+ return;
4348
+ }
4346
4349
  if (!CustomStatesSetSupported) {
4347
4350
  elementInternals.shadowRoot.host.toggleAttribute(`state--${state}`, force);
4348
4351
  return;
@@ -4353,13 +4356,42 @@ function toggleState(elementInternals, state, force) {
4353
4356
  }
4354
4357
  elementInternals.states.delete(state);
4355
4358
  }
4359
+ const matchingStateMap = /* @__PURE__ */new WeakMap();
4360
+ function hasMatchingState(States, state) {
4361
+ if (!States || !state) {
4362
+ return false;
4363
+ }
4364
+ if (matchingStateMap.has(States)) {
4365
+ return matchingStateMap.get(States).has(state);
4366
+ }
4367
+ const stateSet = new Set(Object.values(States));
4368
+ matchingStateMap.set(States, stateSet);
4369
+ return stateSet.has(state);
4370
+ }
4371
+ function swapStates(elementInternals, prev = "", next = "", States, prefix = "") {
4372
+ toggleState(elementInternals, `${prefix}${prev}`, false);
4373
+ if (!States || hasMatchingState(States, next)) {
4374
+ toggleState(elementInternals, `${prefix}${next}`, true);
4375
+ }
4376
+ }
4356
4377
 
4357
- var __defProp$v = Object.defineProperty;
4358
- var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
4359
- var __decorateClass$v = (decorators, target, key, kind) => {
4360
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
4378
+ const AccordionItemSize = {
4379
+ small: "small",
4380
+ medium: "medium",
4381
+ large: "large",
4382
+ extraLarge: "extra-large"
4383
+ };
4384
+ const AccordionItemMarkerPosition = {
4385
+ start: "start",
4386
+ end: "end"
4387
+ };
4388
+
4389
+ var __defProp$w = Object.defineProperty;
4390
+ var __getOwnPropDesc$w = Object.getOwnPropertyDescriptor;
4391
+ var __decorateClass$w = (decorators, target, key, kind) => {
4392
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$w(target, key) : target;
4361
4393
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4362
- if (kind && result) __defProp$v(target, key, result);
4394
+ if (kind && result) __defProp$w(target, key, result);
4363
4395
  return result;
4364
4396
  };
4365
4397
  class BaseAccordionItem extends FASTElement {
@@ -4393,18 +4425,18 @@ class BaseAccordionItem extends FASTElement {
4393
4425
  toggleState(this.elementInternals, "disabled", next);
4394
4426
  }
4395
4427
  }
4396
- __decorateClass$v([attr({
4428
+ __decorateClass$w([attr({
4397
4429
  attribute: "heading-level",
4398
4430
  mode: "fromView",
4399
4431
  converter: nullableNumberConverter
4400
4432
  })], BaseAccordionItem.prototype, "headinglevel", 2);
4401
- __decorateClass$v([attr({
4433
+ __decorateClass$w([attr({
4402
4434
  mode: "boolean"
4403
4435
  })], BaseAccordionItem.prototype, "expanded", 2);
4404
- __decorateClass$v([attr({
4436
+ __decorateClass$w([attr({
4405
4437
  mode: "boolean"
4406
4438
  })], BaseAccordionItem.prototype, "disabled", 2);
4407
- __decorateClass$v([attr], BaseAccordionItem.prototype, "id", 2);
4439
+ __decorateClass$w([attr], BaseAccordionItem.prototype, "id", 2);
4408
4440
  class AccordionItem extends BaseAccordionItem {
4409
4441
  constructor() {
4410
4442
  super(...arguments);
@@ -4416,12 +4448,7 @@ class AccordionItem extends BaseAccordionItem {
4416
4448
  * @param next - next value
4417
4449
  */
4418
4450
  sizeChanged(prev, next) {
4419
- if (prev) {
4420
- toggleState(this.elementInternals, prev, false);
4421
- }
4422
- if (next) {
4423
- toggleState(this.elementInternals, next, true);
4424
- }
4451
+ swapStates(this.elementInternals, prev, next, AccordionItemSize);
4425
4452
  }
4426
4453
  /**
4427
4454
  * Handles changes to marker-position attribute
@@ -4429,12 +4456,7 @@ class AccordionItem extends BaseAccordionItem {
4429
4456
  * @param next - next value
4430
4457
  */
4431
4458
  markerPositionChanged(prev, next) {
4432
- if (prev) {
4433
- toggleState(this.elementInternals, `align-${prev}`, false);
4434
- }
4435
- if (next) {
4436
- toggleState(this.elementInternals, `align-${next}`, true);
4437
- }
4459
+ swapStates(this.elementInternals, prev, next, AccordionItemMarkerPosition, "align-");
4438
4460
  }
4439
4461
  /**
4440
4462
  * Handles changes to block attribute
@@ -4445,11 +4467,11 @@ class AccordionItem extends BaseAccordionItem {
4445
4467
  toggleState(this.elementInternals, "block", next);
4446
4468
  }
4447
4469
  }
4448
- __decorateClass$v([attr], AccordionItem.prototype, "size", 2);
4449
- __decorateClass$v([attr({
4470
+ __decorateClass$w([attr], AccordionItem.prototype, "size", 2);
4471
+ __decorateClass$w([attr({
4450
4472
  attribute: "marker-position"
4451
4473
  })], AccordionItem.prototype, "markerPosition", 2);
4452
- __decorateClass$v([attr({
4474
+ __decorateClass$w([attr({
4453
4475
  mode: "boolean"
4454
4476
  })], AccordionItem.prototype, "block", 2);
4455
4477
  applyMixins(AccordionItem, StartEnd);
@@ -4653,6 +4675,8 @@ const colorTransparentStroke = "var(--colorTransparentStroke)";
4653
4675
  const colorTransparentStrokeInteractive = "var(--colorTransparentStrokeInteractive)";
4654
4676
  const colorStrokeFocus1 = "var(--colorStrokeFocus1)";
4655
4677
  const colorStrokeFocus2 = "var(--colorStrokeFocus2)";
4678
+ const colorNeutralShadowAmbient = "var(--colorNeutralShadowAmbient)";
4679
+ const colorNeutralShadowKey = "var(--colorNeutralShadowKey)";
4656
4680
  const colorPaletteRedBackground1 = "var(--colorPaletteRedBackground1)";
4657
4681
  const colorPaletteRedBackground2 = "var(--colorPaletteRedBackground2)";
4658
4682
  const colorPaletteRedBackground3 = "var(--colorPaletteRedBackground3)";
@@ -4813,7 +4837,7 @@ const curveEasyEaseMax = "var(--curveEasyEaseMax)";
4813
4837
  const curveEasyEase = "var(--curveEasyEase)";
4814
4838
  const curveLinear = "var(--curveLinear)";
4815
4839
 
4816
- const styles$A = css`
4840
+ const styles$B = css`
4817
4841
  ${display("block")}
4818
4842
 
4819
4843
  :host{max-width:fit-content;contain:content}.heading{height:44px;display:grid;position:relative;padding-inline:${spacingHorizontalM} ${spacingHorizontalMNudge};border-radius:${borderRadiusMedium};font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};grid-template-columns:auto auto 1fr auto}.button{appearance:none;background:${colorTransparentBackground};border:none;box-sizing:border-box;color:${colorNeutralForeground1};cursor:pointer;font:inherit;grid-column:auto / span 2;grid-row:1;height:44px;outline:none;padding:0;text-align:start}.button::before{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall}}:where(.default-marker-collapsed,.default-marker-expanded),::slotted(:is([slot='marker-collapsed'],[slot='marker-expanded'])){display:flex;align-items:center;justify-content:center;pointer-events:none;position:relative;height:100%;padding-inline-end:${spacingHorizontalS};grid-column:1 / span 1;grid-row:1}.content{margin:0 ${spacingHorizontalM}}::slotted([slot='start']){display:flex;justify-content:center;align-items:center;padding-right:${spacingHorizontalS};grid-column:2 / span 1;grid-row:1}button:focus-visible::after{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall};outline:none;border:2px solid ${colorStrokeFocus1};box-shadow:inset 0 0 0 1px ${colorStrokeFocus2}}:host(${disabledState}) .button{color:${colorNeutralForegroundDisabled}}:host(${disabledState}) svg{filter:invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%)}:host(${expandedState}) .content{display:block}:host(${expandedState}) .default-marker-collapsed,:host(${expandedState}) ::slotted([slot='marker-collapsed']),:host(:not(${expandedState})) :is(.default-marker-expanded,.content),:host(:not(${expandedState})) ::slotted([slot='marker-expanded']){display:none}:host(${expandedState}) ::slotted([slot='marker-expanded']),:host(:not(${expandedState})) ::slotted([slot='marker-collapsed']){display:flex}.heading{font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host(${smallState}) .heading{font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host(${largeState}) .heading{font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${extraLargeState}) .heading{font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host(${alignEndState}) :slotted([slot='start']){grid-column:1 / span 1}:host(${alignEndState}) :is(.default-marker-collapsed,.default-marker-expanded){grid-column:4 / span 1;padding-inline-start:${spacingHorizontalS};padding-inline-end:0}:host(${alignEndState}) .button{grid-column:2 / span 3}:host([block]){max-width:100%}:host(${alignEndState}) .heading{grid-template-columns:auto auto 28px;padding-inline:${spacingHorizontalM}}:host(${alignEndState}:has([slot='start'])) .heading{padding-inline:${spacingHorizontalMNudge} ${spacingHorizontalM}}:host(${blockState}${alignEndState}) .heading{grid-template-columns:auto 1fr}:host(${alignEndState}) :is(.default-marker-collapsed,.default-marker-expanded){grid-column:5 / span 1}`;
@@ -4849,30 +4873,30 @@ const chevronDown20Filled = html.partial(`<svg
4849
4873
  function accordionItemTemplate(options = {}) {
4850
4874
  return html`<div class="heading" part="heading" role="heading" aria-level="${x => x.headinglevel}"><button class="button" part="button" ${ref("expandbutton")} ?disabled="${x => x.disabled ? "true" : void 0}" aria-expanded="${x => x.expanded}" aria-controls="${x => x.id}-panel" id="${x => x.id}"><slot name="heading"></slot></button>${startSlotTemplate(options)}<slot name="marker-expanded">${staticallyCompose(options.expandedIcon)}</slot><slot name="marker-collapsed">${staticallyCompose(options.collapsedIcon)}</slot></div><div class="content" part="content" id="${x => x.id}-panel" role="region" aria-labelledby="${x => x.id}"><slot></slot></div>`;
4851
4875
  }
4852
- const template$B = accordionItemTemplate({
4876
+ const template$C = accordionItemTemplate({
4853
4877
  collapsedIcon: chevronRight20Filled,
4854
4878
  expandedIcon: chevronDown20Filled
4855
4879
  });
4856
4880
 
4857
- const definition$B = AccordionItem.compose({
4881
+ const definition$C = AccordionItem.compose({
4858
4882
  name: `${FluentDesignSystem.prefix}-accordion-item`,
4859
- template: template$B,
4860
- styles: styles$A
4883
+ template: template$C,
4884
+ styles: styles$B
4861
4885
  });
4862
4886
 
4863
- definition$B.define(FluentDesignSystem.registry);
4887
+ definition$C.define(FluentDesignSystem.registry);
4864
4888
 
4865
4889
  const AccordionExpandMode = {
4866
4890
  single: "single",
4867
4891
  multi: "multi"
4868
4892
  };
4869
4893
 
4870
- var __defProp$u = Object.defineProperty;
4871
- var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
4872
- var __decorateClass$u = (decorators, target, key, kind) => {
4873
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
4894
+ var __defProp$v = Object.defineProperty;
4895
+ var __getOwnPropDesc$v = Object.getOwnPropertyDescriptor;
4896
+ var __decorateClass$v = (decorators, target, key, kind) => {
4897
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$v(target, key) : target;
4874
4898
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4875
- if (kind && result) __defProp$u(target, key, result);
4899
+ if (kind && result) __defProp$v(target, key, result);
4876
4900
  return result;
4877
4901
  };
4878
4902
  class Accordion extends FASTElement {
@@ -5011,12 +5035,12 @@ class Accordion extends FASTElement {
5011
5035
  });
5012
5036
  }
5013
5037
  }
5014
- __decorateClass$u([attr({
5038
+ __decorateClass$v([attr({
5015
5039
  attribute: "expand-mode"
5016
5040
  })], Accordion.prototype, "expandmode", 2);
5017
- __decorateClass$u([observable], Accordion.prototype, "slottedAccordionItems", 2);
5041
+ __decorateClass$v([observable], Accordion.prototype, "slottedAccordionItems", 2);
5018
5042
 
5019
- const styles$z = css`
5043
+ const styles$A = css`
5020
5044
  ${display("flex")}
5021
5045
 
5022
5046
  :host{flex-direction:column;width:100%;contain:content}`;
@@ -5027,22 +5051,41 @@ function accordionTemplate() {
5027
5051
  filter: elements()
5028
5052
  })}></slot></template>`;
5029
5053
  }
5030
- const template$A = accordionTemplate();
5054
+ const template$B = accordionTemplate();
5031
5055
 
5032
- const definition$A = Accordion.compose({
5056
+ const definition$B = Accordion.compose({
5033
5057
  name: `${FluentDesignSystem.prefix}-accordion`,
5034
- template: template$A,
5035
- styles: styles$z
5058
+ template: template$B,
5059
+ styles: styles$A
5036
5060
  });
5037
5061
 
5038
- definition$A.define(FluentDesignSystem.registry);
5062
+ definition$B.define(FluentDesignSystem.registry);
5039
5063
 
5064
+ const ButtonAppearance = {
5065
+ primary: "primary",
5066
+ outline: "outline",
5067
+ subtle: "subtle",
5068
+ transparent: "transparent"
5069
+ };
5070
+ const ButtonShape = {
5071
+ circular: "circular",
5072
+ rounded: "rounded",
5073
+ square: "square"
5074
+ };
5075
+ const ButtonSize = {
5076
+ small: "small",
5077
+ medium: "medium",
5078
+ large: "large"
5079
+ };
5040
5080
  const ButtonType = {
5041
5081
  submit: "submit",
5042
5082
  reset: "reset",
5043
5083
  button: "button"
5044
5084
  };
5045
5085
 
5086
+ const AnchorButtonAppearance = ButtonAppearance;
5087
+ const AnchorButtonShape = ButtonShape;
5088
+ const AnchorButtonSize = ButtonSize;
5046
5089
  const AnchorAttributes = {
5047
5090
  download: "download",
5048
5091
  href: "href",
@@ -5054,12 +5097,12 @@ const AnchorAttributes = {
5054
5097
  type: "type"
5055
5098
  };
5056
5099
 
5057
- var __defProp$t = Object.defineProperty;
5058
- var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
5059
- var __decorateClass$t = (decorators, target, key, kind) => {
5060
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
5100
+ var __defProp$u = Object.defineProperty;
5101
+ var __getOwnPropDesc$u = Object.getOwnPropertyDescriptor;
5102
+ var __decorateClass$u = (decorators, target, key, kind) => {
5103
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$u(target, key) : target;
5061
5104
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5062
- if (kind && result) __defProp$t(target, key, result);
5105
+ if (kind && result) __defProp$u(target, key, result);
5063
5106
  return result;
5064
5107
  };
5065
5108
  class BaseAnchor extends FASTElement {
@@ -5167,14 +5210,14 @@ class BaseAnchor extends FASTElement {
5167
5210
  return proxy;
5168
5211
  }
5169
5212
  }
5170
- __decorateClass$t([attr], BaseAnchor.prototype, "download", 2);
5171
- __decorateClass$t([attr], BaseAnchor.prototype, "href", 2);
5172
- __decorateClass$t([attr], BaseAnchor.prototype, "hreflang", 2);
5173
- __decorateClass$t([attr], BaseAnchor.prototype, "ping", 2);
5174
- __decorateClass$t([attr], BaseAnchor.prototype, "referrerpolicy", 2);
5175
- __decorateClass$t([attr], BaseAnchor.prototype, "rel", 2);
5176
- __decorateClass$t([attr], BaseAnchor.prototype, "target", 2);
5177
- __decorateClass$t([attr], BaseAnchor.prototype, "type", 2);
5213
+ __decorateClass$u([attr], BaseAnchor.prototype, "download", 2);
5214
+ __decorateClass$u([attr], BaseAnchor.prototype, "href", 2);
5215
+ __decorateClass$u([attr], BaseAnchor.prototype, "hreflang", 2);
5216
+ __decorateClass$u([attr], BaseAnchor.prototype, "ping", 2);
5217
+ __decorateClass$u([attr], BaseAnchor.prototype, "referrerpolicy", 2);
5218
+ __decorateClass$u([attr], BaseAnchor.prototype, "rel", 2);
5219
+ __decorateClass$u([attr], BaseAnchor.prototype, "target", 2);
5220
+ __decorateClass$u([attr], BaseAnchor.prototype, "type", 2);
5178
5221
  class AnchorButton extends BaseAnchor {
5179
5222
  constructor() {
5180
5223
  super(...arguments);
@@ -5186,12 +5229,7 @@ class AnchorButton extends BaseAnchor {
5186
5229
  * @param next - the next state
5187
5230
  */
5188
5231
  appearanceChanged(prev, next) {
5189
- if (prev) {
5190
- toggleState(this.elementInternals, `${prev}`, false);
5191
- }
5192
- if (next) {
5193
- toggleState(this.elementInternals, `${next}`, true);
5194
- }
5232
+ swapStates(this.elementInternals, prev, next, AnchorButtonAppearance);
5195
5233
  }
5196
5234
  /**
5197
5235
  * Handles changes to shape attribute custom states
@@ -5199,12 +5237,7 @@ class AnchorButton extends BaseAnchor {
5199
5237
  * @param next - the next state
5200
5238
  */
5201
5239
  shapeChanged(prev, next) {
5202
- if (prev) {
5203
- toggleState(this.elementInternals, `${prev}`, false);
5204
- }
5205
- if (next) {
5206
- toggleState(this.elementInternals, `${next}`, true);
5207
- }
5240
+ swapStates(this.elementInternals, prev, next, AnchorButtonShape);
5208
5241
  }
5209
5242
  /**
5210
5243
  * Handles changes to size attribute custom states
@@ -5212,12 +5245,7 @@ class AnchorButton extends BaseAnchor {
5212
5245
  * @param next - the next state
5213
5246
  */
5214
5247
  sizeChanged(prev, next) {
5215
- if (prev) {
5216
- toggleState(this.elementInternals, `${prev}`, false);
5217
- }
5218
- if (next) {
5219
- toggleState(this.elementInternals, `${next}`, true);
5220
- }
5248
+ swapStates(this.elementInternals, prev, next, AnchorButtonSize);
5221
5249
  }
5222
5250
  /**
5223
5251
  * Handles changes to icon only custom states
@@ -5228,10 +5256,10 @@ class AnchorButton extends BaseAnchor {
5228
5256
  toggleState(this.elementInternals, "icon", !!next);
5229
5257
  }
5230
5258
  }
5231
- __decorateClass$t([attr], AnchorButton.prototype, "appearance", 2);
5232
- __decorateClass$t([attr], AnchorButton.prototype, "shape", 2);
5233
- __decorateClass$t([attr], AnchorButton.prototype, "size", 2);
5234
- __decorateClass$t([attr({
5259
+ __decorateClass$u([attr], AnchorButton.prototype, "appearance", 2);
5260
+ __decorateClass$u([attr], AnchorButton.prototype, "shape", 2);
5261
+ __decorateClass$u([attr], AnchorButton.prototype, "size", 2);
5262
+ __decorateClass$u([attr({
5235
5263
  attribute: "icon-only",
5236
5264
  mode: "boolean"
5237
5265
  })], AnchorButton.prototype, "iconOnly", 2);
@@ -5241,13 +5269,13 @@ const baseButtonStyles = css`
5241
5269
  ${display("inline-flex")}
5242
5270
 
5243
5271
  :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){:host{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'])){flex-shrink:0}:host(:not(${iconOnlyState})) :is([slot='end'],:host(:not(${iconOnlyState}))::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}`;
5244
- const styles$y = css`
5272
+ const styles$z = css`
5245
5273
  ${baseButtonStyles}
5246
5274
 
5247
5275
  :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`
5248
5276
  :host{background-color:ButtonFace;color:ButtonText}:host(:is(:hover,:focus-visible)){border-color:Highlight !important}:host(${primaryState}:not(:is(:hover,:focus-visible))){background-color:Highlight;color:HighlightText;forced-color-adjust:none}:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable])){background-color:ButtonFace;color:GrayText;border-color:ButtonText}`));
5249
5277
 
5250
- const styles$x = css`
5278
+ const styles$y = css`
5251
5279
  ${baseButtonStyles}
5252
5280
 
5253
5281
  ::slotted(a){position:absolute;inset:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
@@ -5256,15 +5284,15 @@ const styles$x = css`
5256
5284
  function anchorTemplate$1(options = {}) {
5257
5285
  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>`;
5258
5286
  }
5259
- const template$z = anchorTemplate$1();
5287
+ const template$A = anchorTemplate$1();
5260
5288
 
5261
- const definition$z = AnchorButton.compose({
5289
+ const definition$A = AnchorButton.compose({
5262
5290
  name: `${FluentDesignSystem.prefix}-anchor-button`,
5263
- template: template$z,
5264
- styles: styles$x
5291
+ template: template$A,
5292
+ styles: styles$y
5265
5293
  });
5266
5294
 
5267
- definition$z.define(FluentDesignSystem.registry);
5295
+ definition$A.define(FluentDesignSystem.registry);
5268
5296
 
5269
5297
  const UNWANTED_ENCLOSURES_REGEX = /[\(\[\{][^\)\]\}]*[\)\]\}]/g;
5270
5298
  const UNWANTED_CHARS_REGEX = /[\0-\u001F\!-/:-@\[-`\{-\u00BF\u0250-\u036F\uD800-\uFFFF]/g;
@@ -5346,12 +5374,12 @@ const AvatarColor = {
5346
5374
  ...AvatarNamedColor
5347
5375
  };
5348
5376
 
5349
- var __defProp$s = Object.defineProperty;
5350
- var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
5351
- var __decorateClass$s = (decorators, target, key, kind) => {
5352
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
5377
+ var __defProp$t = Object.defineProperty;
5378
+ var __getOwnPropDesc$t = Object.getOwnPropertyDescriptor;
5379
+ var __decorateClass$t = (decorators, target, key, kind) => {
5380
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$t(target, key) : target;
5353
5381
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5354
- if (kind && result) __defProp$s(target, key, result);
5382
+ if (kind && result) __defProp$t(target, key, result);
5355
5383
  return result;
5356
5384
  };
5357
5385
  class BaseAvatar extends FASTElement {
@@ -5366,9 +5394,9 @@ class BaseAvatar extends FASTElement {
5366
5394
  this.elementInternals.role = "img";
5367
5395
  }
5368
5396
  }
5369
- __decorateClass$s([attr], BaseAvatar.prototype, "name", 2);
5370
- __decorateClass$s([attr], BaseAvatar.prototype, "initials", 2);
5371
- __decorateClass$s([attr], BaseAvatar.prototype, "active", 2);
5397
+ __decorateClass$t([attr], BaseAvatar.prototype, "name", 2);
5398
+ __decorateClass$t([attr], BaseAvatar.prototype, "initials", 2);
5399
+ __decorateClass$t([attr], BaseAvatar.prototype, "active", 2);
5372
5400
  const _Avatar = class _Avatar extends BaseAvatar {
5373
5401
  /**
5374
5402
  * Handles changes to observable properties
@@ -5404,9 +5432,8 @@ const _Avatar = class _Avatar extends BaseAvatar {
5404
5432
  generateColor() {
5405
5433
  const colorful = this.color === AvatarColor.colorful;
5406
5434
  const prev = this.currentColor;
5407
- toggleState(this.elementInternals, `${prev}`, false);
5408
5435
  this.currentColor = colorful && this.colorId ? this.colorId : colorful ? _Avatar.colors[getHashCode(this.name ?? "") % _Avatar.colors.length] : this.color ?? AvatarColor.neutral;
5409
- toggleState(this.elementInternals, `${this.currentColor}`, true);
5436
+ swapStates(this.elementInternals, prev, this.currentColor);
5410
5437
  }
5411
5438
  connectedCallback() {
5412
5439
  super.connectedCallback();
@@ -5422,13 +5449,13 @@ const _Avatar = class _Avatar extends BaseAvatar {
5422
5449
  * An array of the available Avatar named colors
5423
5450
  */
5424
5451
  _Avatar.colors = Object.values(AvatarNamedColor);
5425
- __decorateClass$s([attr], _Avatar.prototype, "shape", 2);
5426
- __decorateClass$s([attr], _Avatar.prototype, "appearance", 2);
5427
- __decorateClass$s([attr({
5452
+ __decorateClass$t([attr], _Avatar.prototype, "shape", 2);
5453
+ __decorateClass$t([attr], _Avatar.prototype, "appearance", 2);
5454
+ __decorateClass$t([attr({
5428
5455
  converter: nullableNumberConverter
5429
5456
  })], _Avatar.prototype, "size", 2);
5430
- __decorateClass$s([attr], _Avatar.prototype, "color", 2);
5431
- __decorateClass$s([attr({
5457
+ __decorateClass$t([attr], _Avatar.prototype, "color", 2);
5458
+ __decorateClass$t([attr({
5432
5459
  attribute: "color-id"
5433
5460
  })], _Avatar.prototype, "colorId", 2);
5434
5461
  let Avatar = _Avatar;
@@ -5453,22 +5480,22 @@ const animations = {
5453
5480
  normalEase: curveEasyEase,
5454
5481
  nullEasing: curveLinear
5455
5482
  };
5456
- const styles$w = css`
5483
+ const styles$x = css`
5457
5484
  ${display("inline-flex")} :host{position:relative;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};font-size:${fontSizeBase300};border-radius:${borderRadiusCircular};color:${colorNeutralForeground3};background-color:${colorNeutralBackground6};contain:layout style}.default-icon,::slotted(svg){width:20px;height:20px;font-size:20px}::slotted(img){box-sizing:border-box;width:100%;height:100%;border-radius:${borderRadiusCircular}}::slotted([slot='badge']){position:absolute;bottom:0;right:0;box-shadow:0 0 0 ${strokeWidthThin}) ${colorNeutralBackground1}}:host([size='64']) ::slotted([slot='badge']),:host([size='72']) ::slotted([slot='badge']),:host([size='96']) ::slotted([slot='badge']),:host([size='120']) ::slotted([slot='badge']),:host([size='128']) ::slotted([slot='badge']){box-shadow:0 0 0 ${strokeWidthThick}) ${colorNeutralBackground1}}:host([size='16']),:host([size='20']),:host([size='24']){font-size:${fontSizeBase100};font-weight:${fontWeightRegular}}:host([size='16']){width:16px;height:16px}:host([size='20']){width:20px;height:20px}:host([size='24']){width:24px;height:24px}:host([size='16']) .default-icon,:host([size='16']) ::slotted(svg){width:12px;height:12px;font-size:12px}:host([size='20']) .default-icon,:host([size='24']) .default-icon,:host([size='20']) ::slotted(svg),:host([size='24']) ::slotted(svg){width:16px;height:16px;font-size:16px}:host([size='28']){width:28px;height:28px;font-size:${fontSizeBase200}}:host([size='36']){width:36px;height:36px}:host([size='40']){width:40px;height:40px}:host([size='48']),:host([size='56']){font-size:${fontSizeBase400}}:host([size='48']){width:48px;height:48px}:host([size='48']) .default-icon,:host([size='48']) ::slotted(svg){width:24px;height:24px;font-size:24px}:host([size='56']){width:56px;height:56px}:host([size='56']) .default-icon,:host([size='56']) ::slotted(svg){width:28px;height:28px;font-size:28px}:host([size='64']),:host([size='72']),:host([size='96']){font-size:${fontSizeBase500}}:host([size='64']) .default-icon,:host([size='72']) .default-icon,:host([size='64']) ::slotted(svg),:host([size='72']) ::slotted(svg){width:32px;height:32px;font-size:32px}:host([size='64']){width:64px;height:64px}:host([size='72']){width:72px;height:72px}:host([size='96']){width:96px;height:96px}:host([size='96']) .default-icon,:host([size='120']) .default-icon,:host([size='128']) .default-icon,:host([size='96']) ::slotted(svg),:host([size='120']) ::slotted(svg),:host([size='128']) ::slotted(svg){width:48px;height:48px;font-size:48px}:host([size='120']),:host([size='128']){font-size:${fontSizeBase600}}:host([size='120']){width:120px;height:120px}:host([size='128']){width:128px;height:128px}:host([shape='square']){border-radius:${borderRadiusMedium}}:host([shape='square'][size='20']),:host([shape='square'][size='24']){border-radius:${borderRadiusSmall}}:host([shape='square'][size='56']),:host([shape='square'][size='64']),:host([shape='square'][size='72']){border-radius:${borderRadiusLarge}}:host([shape='square'][size='96']),:host([shape='square'][size='120']),:host([shape='square'][size='128']){border-radius:${borderRadiusXLarge}}:host(${brandState}){color:${colorNeutralForegroundStaticInverted};background-color:${colorBrandBackgroundStatic}}:host(${darkRedState}){color:${colorPaletteDarkRedForeground2};background-color:${colorPaletteDarkRedBackground2}}:host(${cranberryState}){color:${colorPaletteCranberryForeground2};background-color:${colorPaletteCranberryBackground2}}:host(${redState}){color:${colorPaletteRedForeground2};background-color:${colorPaletteRedBackground2}}:host(${pumpkinState}){color:${colorPalettePumpkinForeground2};background-color:${colorPalettePumpkinBackground2}}:host(${peachState}){color:${colorPalettePeachForeground2};background-color:${colorPalettePeachBackground2}}:host(${marigoldState}){color:${colorPaletteMarigoldForeground2};background-color:${colorPaletteMarigoldBackground2}}:host(${goldState}){color:${colorPaletteGoldForeground2};background-color:${colorPaletteGoldBackground2}}:host(${brassState}){color:${colorPaletteBrassForeground2};background-color:${colorPaletteBrassBackground2}}:host(${brownState}){color:${colorPaletteBrownForeground2};background-color:${colorPaletteBrownBackground2}}:host(${forestState}){color:${colorPaletteForestForeground2};background-color:${colorPaletteForestBackground2}}:host(${seafoamState}){color:${colorPaletteSeafoamForeground2};background-color:${colorPaletteSeafoamBackground2}}:host(${darkGreenState}){color:${colorPaletteDarkGreenForeground2};background-color:${colorPaletteDarkGreenBackground2}}:host(${lightTealState}){color:${colorPaletteLightTealForeground2};background-color:${colorPaletteLightTealBackground2}}:host(${tealState}){color:${colorPaletteTealForeground2};background-color:${colorPaletteTealBackground2}}:host(${steelState}){color:${colorPaletteSteelForeground2};background-color:${colorPaletteSteelBackground2}}:host(${blueState}){color:${colorPaletteBlueForeground2};background-color:${colorPaletteBlueBackground2}}:host(${royalBlueState}){color:${colorPaletteRoyalBlueForeground2};background-color:${colorPaletteRoyalBlueBackground2}}:host(${cornflowerState}){color:${colorPaletteCornflowerForeground2};background-color:${colorPaletteCornflowerBackground2}}:host(${navyState}){color:${colorPaletteNavyForeground2};background-color:${colorPaletteNavyBackground2}}:host(${lavenderState}){color:${colorPaletteLavenderForeground2};background-color:${colorPaletteLavenderBackground2}}:host(${purpleState}){color:${colorPalettePurpleForeground2};background-color:${colorPalettePurpleBackground2}}:host(${grapeState}){color:${colorPaletteGrapeForeground2};background-color:${colorPaletteGrapeBackground2}}:host(${lilacState}){color:${colorPaletteLilacForeground2};background-color:${colorPaletteLilacBackground2}}:host(${pinkState}){color:${colorPalettePinkForeground2};background-color:${colorPalettePinkBackground2}}:host(${magentaState}){color:${colorPaletteMagentaForeground2};background-color:${colorPaletteMagentaBackground2}}:host(${plumState}){color:${colorPalettePlumForeground2};background-color:${colorPalettePlumBackground2}}:host(${beigeState}){color:${colorPaletteBeigeForeground2};background-color:${colorPaletteBeigeBackground2}}:host(${minkState}){color:${colorPaletteMinkForeground2};background-color:${colorPaletteMinkBackground2}}:host(${platinumState}){color:${colorPalettePlatinumForeground2};background-color:${colorPalettePlatinumBackground2}}:host(${anchorState}){color:${colorPaletteAnchorForeground2};background-color:${colorPaletteAnchorBackground2}}:host([active]){transform:perspective(1px);transition-property:transform,opacity;transition-duration:${durationUltraSlow},${durationFaster};transition-delay:${animations.fastEase},${animations.nullEasing}}:host([active])::before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;transition-property:margin,opacity;transition-duration:${durationUltraSlow}),${durationSlower};transition-delay:${animations.fastEase}),${animations.nullEasing})}:host([active])::before{box-shadow:${shadow8};border-style:solid;border-color:${colorBrandBackgroundStatic}}:host([active][appearance='shadow'])::before{border-style:none;border-color:none}:host([active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThick});border-width:${strokeWidthThick}}:host([size='56'][active]:not([appearance='shadow']))::before,:host([size='64'][active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThicker});border-width:${strokeWidthThicker}}:host([size='72'][active]:not([appearance='shadow']))::before,:host([size='96'][active]:not([appearance='shadow']))::before,:host([size='120'][active]:not([appearance='shadow']))::before,:host([size='128'][active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThickest});border-width:${strokeWidthThickest}}:host([size='20'][active][appearance])::before,:host([size='24'][active][appearance])::before,:host([size='28'][active][appearance])::before{box-shadow:${shadow4}}:host([size='56'][active][appearance])::before,:host([size='64'][active][appearance])::before{box-shadow:${shadow16}}:host([size='72'][active][appearance])::before,:host([size='96'][active][appearance])::before,:host([size='120'][active][appearance])::before,:host([size='128'][active][appearance])::before{box-shadow:${shadow28}}:host([active][appearance='ring'])::before{box-shadow:none}:host([active='inactive']){opacity:0.8;transform:scale(0.875);transition-property:transform,opacity;transition-duration:${durationUltraSlow},${durationFaster};transition-delay:${animations.fastOutSlowInMin},${animations.nullEasing}}:host([active='inactive'])::before{margin:0;opacity:0;transition-property:margin,opacity;transition-duration:${durationUltraSlow},${durationSlower};transition-delay:${animations.fastOutSlowInMin},${animations.nullEasing}}@media screen and (prefers-reduced-motion:reduce){:host([active]){transition-duration:0.01ms}:host([active])::before{transition-duration:0.01ms;transition-delay:0.01ms}}`;
5458
5485
 
5459
5486
  const defaultIconTemplate = html`<svg width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="default-icon" fill="currentcolor" aria-hidden="true"><path d="M10 2a4 4 0 100 8 4 4 0 000-8zM7 6a3 3 0 116 0 3 3 0 01-6 0zm-2 5a2 2 0 00-2 2c0 1.7.83 2.97 2.13 3.8A9.14 9.14 0 0010 18c1.85 0 3.58-.39 4.87-1.2A4.35 4.35 0 0017 13a2 2 0 00-2-2H5zm-1 2a1 1 0 011-1h10a1 1 0 011 1c0 1.3-.62 2.28-1.67 2.95A8.16 8.16 0 0110 17a8.16 8.16 0 01-4.33-1.05A3.36 3.36 0 014 13z"></path></svg>`;
5460
5487
  function avatarTemplate() {
5461
5488
  return html`<slot>${x => x.name || x.initials ? x.generateInitials() : defaultIconTemplate}</slot><slot name="badge"></slot>`;
5462
5489
  }
5463
- const template$y = avatarTemplate();
5490
+ const template$z = avatarTemplate();
5464
5491
 
5465
- const definition$y = Avatar.compose({
5492
+ const definition$z = Avatar.compose({
5466
5493
  name: `${FluentDesignSystem.prefix}-avatar`,
5467
- template: template$y,
5468
- styles: styles$w
5494
+ template: template$z,
5495
+ styles: styles$x
5469
5496
  });
5470
5497
 
5471
- definition$y.define(FluentDesignSystem.registry);
5498
+ definition$z.define(FluentDesignSystem.registry);
5472
5499
 
5473
5500
  const BadgeAppearance = {
5474
5501
  filled: "filled",
@@ -5486,13 +5513,26 @@ const BadgeColor = {
5486
5513
  success: "success",
5487
5514
  warning: "warning"
5488
5515
  };
5516
+ const BadgeShape = {
5517
+ circular: "circular",
5518
+ rounded: "rounded",
5519
+ square: "square"
5520
+ };
5521
+ const BadgeSize = {
5522
+ tiny: "tiny",
5523
+ extraSmall: "extra-small",
5524
+ small: "small",
5525
+ medium: "medium",
5526
+ large: "large",
5527
+ extraLarge: "extra-large"
5528
+ };
5489
5529
 
5490
- var __defProp$r = Object.defineProperty;
5491
- var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
5492
- var __decorateClass$r = (decorators, target, key, kind) => {
5493
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
5530
+ var __defProp$s = Object.defineProperty;
5531
+ var __getOwnPropDesc$s = Object.getOwnPropertyDescriptor;
5532
+ var __decorateClass$s = (decorators, target, key, kind) => {
5533
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$s(target, key) : target;
5494
5534
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5495
- if (kind && result) __defProp$r(target, key, result);
5535
+ if (kind && result) __defProp$s(target, key, result);
5496
5536
  return result;
5497
5537
  };
5498
5538
  class Badge extends FASTElement {
@@ -5513,12 +5553,7 @@ class Badge extends FASTElement {
5513
5553
  * @param next - the next state
5514
5554
  */
5515
5555
  appearanceChanged(prev, next) {
5516
- if (prev) {
5517
- toggleState(this.elementInternals, `${prev}`, false);
5518
- }
5519
- if (next) {
5520
- toggleState(this.elementInternals, `${next}`, true);
5521
- }
5556
+ swapStates(this.elementInternals, prev, next, BadgeAppearance);
5522
5557
  }
5523
5558
  /**
5524
5559
  * Handles changes to color attribute custom states
@@ -5526,12 +5561,7 @@ class Badge extends FASTElement {
5526
5561
  * @param next - the next state
5527
5562
  */
5528
5563
  colorChanged(prev, next) {
5529
- if (prev) {
5530
- toggleState(this.elementInternals, `${prev}`, false);
5531
- }
5532
- if (next) {
5533
- toggleState(this.elementInternals, `${next}`, true);
5534
- }
5564
+ swapStates(this.elementInternals, prev, next, BadgeColor);
5535
5565
  }
5536
5566
  /**
5537
5567
  * Handles changes to shape attribute custom states
@@ -5539,12 +5569,7 @@ class Badge extends FASTElement {
5539
5569
  * @param next - the next state
5540
5570
  */
5541
5571
  shapeChanged(prev, next) {
5542
- if (prev) {
5543
- toggleState(this.elementInternals, `${prev}`, false);
5544
- }
5545
- if (next) {
5546
- toggleState(this.elementInternals, `${next}`, true);
5547
- }
5572
+ swapStates(this.elementInternals, prev, next, BadgeShape);
5548
5573
  }
5549
5574
  /**
5550
5575
  * Handles changes to size attribute custom states
@@ -5552,18 +5577,13 @@ class Badge extends FASTElement {
5552
5577
  * @param next - the next state
5553
5578
  */
5554
5579
  sizeChanged(prev, next) {
5555
- if (prev) {
5556
- toggleState(this.elementInternals, `${prev}`, false);
5557
- }
5558
- if (next) {
5559
- toggleState(this.elementInternals, `${next}`, true);
5560
- }
5580
+ swapStates(this.elementInternals, prev, next, BadgeSize);
5561
5581
  }
5562
5582
  }
5563
- __decorateClass$r([attr], Badge.prototype, "appearance", 2);
5564
- __decorateClass$r([attr], Badge.prototype, "color", 2);
5565
- __decorateClass$r([attr], Badge.prototype, "shape", 2);
5566
- __decorateClass$r([attr], Badge.prototype, "size", 2);
5583
+ __decorateClass$s([attr], Badge.prototype, "appearance", 2);
5584
+ __decorateClass$s([attr], Badge.prototype, "color", 2);
5585
+ __decorateClass$s([attr], Badge.prototype, "shape", 2);
5586
+ __decorateClass$s([attr], Badge.prototype, "size", 2);
5567
5587
  applyMixins(Badge, StartEnd);
5568
5588
 
5569
5589
  const badgeBaseStyles = css.partial`
@@ -5917,7 +5937,7 @@ css.partial`
5917
5937
  font-weight: ${fontWeightSemibold};
5918
5938
  `;
5919
5939
 
5920
- const styles$v = css`
5940
+ const styles$w = css`
5921
5941
  :host(${squareState}){border-radius:${borderRadiusNone}}:host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
5922
5942
  ${badgeFilledStyles}
5923
5943
  ${badgeGhostStyles}
@@ -5930,22 +5950,22 @@ const styles$v = css`
5930
5950
  function badgeTemplate(options = {}) {
5931
5951
  return html` ${startSlotTemplate(options)}<slot>${staticallyCompose(options.defaultContent)}</slot>${endSlotTemplate(options)} `;
5932
5952
  }
5933
- const template$x = badgeTemplate();
5953
+ const template$y = badgeTemplate();
5934
5954
 
5935
- const definition$x = Badge.compose({
5955
+ const definition$y = Badge.compose({
5936
5956
  name: `${FluentDesignSystem.prefix}-badge`,
5937
- template: template$x,
5938
- styles: styles$v
5957
+ template: template$y,
5958
+ styles: styles$w
5939
5959
  });
5940
5960
 
5941
- definition$x.define(FluentDesignSystem.registry);
5961
+ definition$y.define(FluentDesignSystem.registry);
5942
5962
 
5943
- var __defProp$q = Object.defineProperty;
5944
- var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
5945
- var __decorateClass$q = (decorators, target, key, kind) => {
5946
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
5963
+ var __defProp$r = Object.defineProperty;
5964
+ var __getOwnPropDesc$r = Object.getOwnPropertyDescriptor;
5965
+ var __decorateClass$r = (decorators, target, key, kind) => {
5966
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$r(target, key) : target;
5947
5967
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5948
- if (kind && result) __defProp$q(target, key, result);
5968
+ if (kind && result) __defProp$r(target, key, result);
5949
5969
  return result;
5950
5970
  };
5951
5971
  class BaseButton extends FASTElement {
@@ -6149,44 +6169,44 @@ class BaseButton extends FASTElement {
6149
6169
  * @public
6150
6170
  */
6151
6171
  BaseButton.formAssociated = true;
6152
- __decorateClass$q([attr({
6172
+ __decorateClass$r([attr({
6153
6173
  mode: "boolean"
6154
6174
  })], BaseButton.prototype, "autofocus", 2);
6155
- __decorateClass$q([observable], BaseButton.prototype, "defaultSlottedContent", 2);
6156
- __decorateClass$q([attr({
6175
+ __decorateClass$r([observable], BaseButton.prototype, "defaultSlottedContent", 2);
6176
+ __decorateClass$r([attr({
6157
6177
  mode: "boolean"
6158
6178
  })], BaseButton.prototype, "disabled", 2);
6159
- __decorateClass$q([attr({
6179
+ __decorateClass$r([attr({
6160
6180
  attribute: "disabled-focusable",
6161
6181
  mode: "boolean"
6162
6182
  })], BaseButton.prototype, "disabledFocusable", 2);
6163
- __decorateClass$q([attr({
6183
+ __decorateClass$r([attr({
6164
6184
  attribute: "tabindex",
6165
6185
  mode: "fromView",
6166
6186
  converter: nullableNumberConverter
6167
6187
  })], BaseButton.prototype, "tabIndex", 2);
6168
- __decorateClass$q([attr({
6188
+ __decorateClass$r([attr({
6169
6189
  attribute: "formaction"
6170
6190
  })], BaseButton.prototype, "formAction", 2);
6171
- __decorateClass$q([attr({
6191
+ __decorateClass$r([attr({
6172
6192
  attribute: "form"
6173
6193
  })], BaseButton.prototype, "formAttribute", 2);
6174
- __decorateClass$q([attr({
6194
+ __decorateClass$r([attr({
6175
6195
  attribute: "formenctype"
6176
6196
  })], BaseButton.prototype, "formEnctype", 2);
6177
- __decorateClass$q([attr({
6197
+ __decorateClass$r([attr({
6178
6198
  attribute: "formmethod"
6179
6199
  })], BaseButton.prototype, "formMethod", 2);
6180
- __decorateClass$q([attr({
6200
+ __decorateClass$r([attr({
6181
6201
  attribute: "formnovalidate",
6182
6202
  mode: "boolean"
6183
6203
  })], BaseButton.prototype, "formNoValidate", 2);
6184
- __decorateClass$q([attr({
6204
+ __decorateClass$r([attr({
6185
6205
  attribute: "formtarget"
6186
6206
  })], BaseButton.prototype, "formTarget", 2);
6187
- __decorateClass$q([attr], BaseButton.prototype, "name", 2);
6188
- __decorateClass$q([attr], BaseButton.prototype, "type", 2);
6189
- __decorateClass$q([attr], BaseButton.prototype, "value", 2);
6207
+ __decorateClass$r([attr], BaseButton.prototype, "name", 2);
6208
+ __decorateClass$r([attr], BaseButton.prototype, "type", 2);
6209
+ __decorateClass$r([attr], BaseButton.prototype, "value", 2);
6190
6210
  class Button extends BaseButton {
6191
6211
  constructor() {
6192
6212
  super(...arguments);
@@ -6198,12 +6218,7 @@ class Button extends BaseButton {
6198
6218
  * @param next - the next state
6199
6219
  */
6200
6220
  appearanceChanged(prev, next) {
6201
- if (prev) {
6202
- toggleState(this.elementInternals, `${prev}`, false);
6203
- }
6204
- if (next) {
6205
- toggleState(this.elementInternals, `${next}`, true);
6206
- }
6221
+ swapStates(this.elementInternals, prev, next, ButtonAppearance);
6207
6222
  }
6208
6223
  /**
6209
6224
  * Handles changes to shape attribute custom states
@@ -6211,12 +6226,7 @@ class Button extends BaseButton {
6211
6226
  * @param next - the next state
6212
6227
  */
6213
6228
  shapeChanged(prev, next) {
6214
- if (prev) {
6215
- toggleState(this.elementInternals, `${prev}`, false);
6216
- }
6217
- if (next) {
6218
- toggleState(this.elementInternals, `${next}`, true);
6219
- }
6229
+ swapStates(this.elementInternals, prev, next, ButtonShape);
6220
6230
  }
6221
6231
  /**
6222
6232
  * Handles changes to size attribute custom states
@@ -6224,12 +6234,7 @@ class Button extends BaseButton {
6224
6234
  * @param next - the next state
6225
6235
  */
6226
6236
  sizeChanged(prev, next) {
6227
- if (prev) {
6228
- toggleState(this.elementInternals, `${prev}`, false);
6229
- }
6230
- if (next) {
6231
- toggleState(this.elementInternals, `${next}`, true);
6232
- }
6237
+ swapStates(this.elementInternals, prev, next, ButtonSize);
6233
6238
  }
6234
6239
  /**
6235
6240
  * Handles changes to icon only custom states
@@ -6240,10 +6245,10 @@ class Button extends BaseButton {
6240
6245
  toggleState(this.elementInternals, "icon", next);
6241
6246
  }
6242
6247
  }
6243
- __decorateClass$q([attr], Button.prototype, "appearance", 2);
6244
- __decorateClass$q([attr], Button.prototype, "shape", 2);
6245
- __decorateClass$q([attr], Button.prototype, "size", 2);
6246
- __decorateClass$q([attr({
6248
+ __decorateClass$r([attr], Button.prototype, "appearance", 2);
6249
+ __decorateClass$r([attr], Button.prototype, "shape", 2);
6250
+ __decorateClass$r([attr], Button.prototype, "size", 2);
6251
+ __decorateClass$r([attr({
6247
6252
  attribute: "icon-only",
6248
6253
  mode: "boolean"
6249
6254
  })], Button.prototype, "iconOnly", 2);
@@ -6252,22 +6257,31 @@ applyMixins(Button, StartEnd);
6252
6257
  function buttonTemplate$1(options = {}) {
6253
6258
  return html`<template tabindex="${x => x.disabled ? null : x.tabIndex ?? 0}" @click="${(x, c) => x.clickHandler(c.event)}" @keypress="${(x, c) => x.keypressHandler(c.event)}">${startSlotTemplate(options)}<span class="content" part="content"><slot ${slotted("defaultSlottedContent")}></slot></span>${endSlotTemplate(options)}</template>`;
6254
6259
  }
6255
- const template$w = buttonTemplate$1();
6260
+ const template$x = buttonTemplate$1();
6256
6261
 
6257
- const definition$w = Button.compose({
6262
+ const definition$x = Button.compose({
6258
6263
  name: `${FluentDesignSystem.prefix}-button`,
6259
- template: template$w,
6260
- styles: styles$y
6264
+ template: template$x,
6265
+ styles: styles$z
6261
6266
  });
6262
6267
 
6263
- definition$w.define(FluentDesignSystem.registry);
6268
+ definition$x.define(FluentDesignSystem.registry);
6264
6269
 
6265
- var __defProp$p = Object.defineProperty;
6266
- var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
6267
- var __decorateClass$p = (decorators, target, key, kind) => {
6268
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
6270
+ const CheckboxShape = {
6271
+ circular: "circular",
6272
+ square: "square"
6273
+ };
6274
+ const CheckboxSize = {
6275
+ medium: "medium",
6276
+ large: "large"
6277
+ };
6278
+
6279
+ var __defProp$q = Object.defineProperty;
6280
+ var __getOwnPropDesc$q = Object.getOwnPropertyDescriptor;
6281
+ var __decorateClass$q = (decorators, target, key, kind) => {
6282
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$q(target, key) : target;
6269
6283
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6270
- if (kind && result) __defProp$p(target, key, result);
6284
+ if (kind && result) __defProp$q(target, key, result);
6271
6285
  return result;
6272
6286
  };
6273
6287
  class BaseCheckbox extends FASTElement {
@@ -6601,27 +6615,27 @@ class BaseCheckbox extends FASTElement {
6601
6615
  * @public
6602
6616
  */
6603
6617
  BaseCheckbox.formAssociated = true;
6604
- __decorateClass$p([attr({
6618
+ __decorateClass$q([attr({
6605
6619
  mode: "boolean"
6606
6620
  })], BaseCheckbox.prototype, "autofocus", 2);
6607
- __decorateClass$p([observable], BaseCheckbox.prototype, "disabled", 2);
6608
- __decorateClass$p([attr({
6621
+ __decorateClass$q([observable], BaseCheckbox.prototype, "disabled", 2);
6622
+ __decorateClass$q([attr({
6609
6623
  attribute: "disabled",
6610
6624
  mode: "boolean"
6611
6625
  })], BaseCheckbox.prototype, "disabledAttribute", 2);
6612
- __decorateClass$p([attr({
6626
+ __decorateClass$q([attr({
6613
6627
  attribute: "form"
6614
6628
  })], BaseCheckbox.prototype, "formAttribute", 2);
6615
- __decorateClass$p([attr({
6629
+ __decorateClass$q([attr({
6616
6630
  attribute: "checked",
6617
6631
  mode: "boolean"
6618
6632
  })], BaseCheckbox.prototype, "initialChecked", 2);
6619
- __decorateClass$p([attr({
6633
+ __decorateClass$q([attr({
6620
6634
  attribute: "value",
6621
6635
  mode: "fromView"
6622
6636
  })], BaseCheckbox.prototype, "initialValue", 2);
6623
- __decorateClass$p([attr], BaseCheckbox.prototype, "name", 2);
6624
- __decorateClass$p([attr({
6637
+ __decorateClass$q([attr], BaseCheckbox.prototype, "name", 2);
6638
+ __decorateClass$q([attr({
6625
6639
  mode: "boolean"
6626
6640
  })], BaseCheckbox.prototype, "required", 2);
6627
6641
  class Checkbox extends BaseCheckbox {
@@ -6644,12 +6658,7 @@ class Checkbox extends BaseCheckbox {
6644
6658
  * @internal
6645
6659
  */
6646
6660
  shapeChanged(prev, next) {
6647
- if (prev) {
6648
- toggleState(this.elementInternals, prev, false);
6649
- }
6650
- if (next) {
6651
- toggleState(this.elementInternals, next, true);
6652
- }
6661
+ swapStates(this.elementInternals, prev, next, CheckboxShape);
6653
6662
  }
6654
6663
  /**
6655
6664
  * Applies size states when the `size` property changes.
@@ -6659,12 +6668,7 @@ class Checkbox extends BaseCheckbox {
6659
6668
  * @internal
6660
6669
  */
6661
6670
  sizeChanged(prev, next) {
6662
- if (prev) {
6663
- toggleState(this.elementInternals, prev, false);
6664
- }
6665
- if (next) {
6666
- toggleState(this.elementInternals, next, true);
6667
- }
6671
+ swapStates(this.elementInternals, prev, next, CheckboxSize);
6668
6672
  }
6669
6673
  constructor() {
6670
6674
  super();
@@ -6694,11 +6698,11 @@ class Checkbox extends BaseCheckbox {
6694
6698
  super.toggleChecked(force);
6695
6699
  }
6696
6700
  }
6697
- __decorateClass$p([observable], Checkbox.prototype, "indeterminate", 2);
6698
- __decorateClass$p([attr], Checkbox.prototype, "shape", 2);
6699
- __decorateClass$p([attr], Checkbox.prototype, "size", 2);
6701
+ __decorateClass$q([observable], Checkbox.prototype, "indeterminate", 2);
6702
+ __decorateClass$q([attr], Checkbox.prototype, "shape", 2);
6703
+ __decorateClass$q([attr], Checkbox.prototype, "size", 2);
6700
6704
 
6701
- const styles$u = css`
6705
+ const styles$v = css`
6702
6706
  ${display("inline-flex")}
6703
6707
 
6704
6708
  :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}:hover){background-color:${colorCompoundBrandBackgroundHover};border-color:${colorCompoundBrandStrokeHover}}:host(${checkedState}: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})) *:is(::slotted([slot='checked-indicator']),.checked-indicator){display:none}:host(${checkedState}),:host(${indeterminateState}){border-color:${colorCompoundBrandStroke}}:host(${checkedState}),: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}){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}:host([disabled]){cursor:unset}:host([disabled]${indeterminateState}) .indeterminate-indicator{background-color:${colorNeutralStrokeDisabled}}:host([disabled]${checkedState}) .checked-indicator{color:${colorNeutralStrokeDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
@@ -6724,23 +6728,23 @@ const indeterminateIndicator = html.partial( /* html */
6724
6728
  function checkboxTemplate(options = {}) {
6725
6729
  return html`<template tabindex="${x => !x.disabled ? 0 : void 0}" @click="${(x, c) => x.clickHandler(c.event)}" @input="${(x, c) => x.inputHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" @keyup="${(x, c) => x.keyupHandler(c.event)}"><slot name="checked-indicator">${staticallyCompose(options.checkedIndicator)}</slot><slot name="indeterminate-indicator">${staticallyCompose(options.indeterminateIndicator)}</slot></template>`;
6726
6730
  }
6727
- const template$v = checkboxTemplate({
6731
+ const template$w = checkboxTemplate({
6728
6732
  checkedIndicator: checkedIndicator$1,
6729
6733
  indeterminateIndicator
6730
6734
  });
6731
6735
 
6732
- const definition$v = Checkbox.compose({
6736
+ const definition$w = Checkbox.compose({
6733
6737
  name: `${FluentDesignSystem.prefix}-checkbox`,
6734
- template: template$v,
6735
- styles: styles$u
6738
+ template: template$w,
6739
+ styles: styles$v
6736
6740
  });
6737
6741
 
6738
- definition$v.define(FluentDesignSystem.registry);
6742
+ definition$w.define(FluentDesignSystem.registry);
6739
6743
 
6740
6744
  class CompoundButton extends Button {}
6741
6745
 
6742
- const styles$t = css`
6743
- ${styles$y}
6746
+ const styles$u = css`
6747
+ ${styles$z}
6744
6748
 
6745
6749
  :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]))
6746
6750
  ::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}}`;
@@ -6748,22 +6752,49 @@ const styles$t = css`
6748
6752
  function buttonTemplate(options = {}) {
6749
6753
  return html`<template ?disabled="${x => x.disabled}" tabindex="${x => x.disabled ? null : x.tabIndex ?? 0}">${startSlotTemplate(options)}<span class="content" part="content"><slot ${slotted("defaultSlottedContent")}></slot><slot name="description"></slot></span>${endSlotTemplate(options)}</template>`;
6750
6754
  }
6751
- const template$u = buttonTemplate();
6755
+ const template$v = buttonTemplate();
6752
6756
 
6753
- const definition$u = CompoundButton.compose({
6757
+ const definition$v = CompoundButton.compose({
6754
6758
  name: `${FluentDesignSystem.prefix}-compound-button`,
6755
- template: template$u,
6756
- styles: styles$t
6759
+ template: template$v,
6760
+ styles: styles$u
6757
6761
  });
6758
6762
 
6759
- definition$u.define(FluentDesignSystem.registry);
6763
+ definition$v.define(FluentDesignSystem.registry);
6760
6764
 
6761
- var __defProp$o = Object.defineProperty;
6762
- var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
6763
- var __decorateClass$o = (decorators, target, key, kind) => {
6764
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
6765
+ const CounterBadgeAppearance = {
6766
+ filled: "filled",
6767
+ ghost: "ghost"
6768
+ };
6769
+ const CounterBadgeColor = {
6770
+ brand: "brand",
6771
+ danger: "danger",
6772
+ important: "important",
6773
+ informative: "informative",
6774
+ severe: "severe",
6775
+ subtle: "subtle",
6776
+ success: "success",
6777
+ warning: "warning"
6778
+ };
6779
+ const CounterBadgeShape = {
6780
+ circular: "circular",
6781
+ rounded: "rounded"
6782
+ };
6783
+ const CounterBadgeSize = {
6784
+ tiny: "tiny",
6785
+ extraSmall: "extra-small",
6786
+ small: "small",
6787
+ medium: "medium",
6788
+ large: "large",
6789
+ extraLarge: "extra-large"
6790
+ };
6791
+
6792
+ var __defProp$p = Object.defineProperty;
6793
+ var __getOwnPropDesc$p = Object.getOwnPropertyDescriptor;
6794
+ var __decorateClass$p = (decorators, target, key, kind) => {
6795
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$p(target, key) : target;
6765
6796
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6766
- if (kind && result) __defProp$o(target, key, result);
6797
+ if (kind && result) __defProp$p(target, key, result);
6767
6798
  return result;
6768
6799
  };
6769
6800
  class CounterBadge extends FASTElement {
@@ -6786,12 +6817,7 @@ class CounterBadge extends FASTElement {
6786
6817
  * @param next - the next state
6787
6818
  */
6788
6819
  appearanceChanged(prev, next) {
6789
- if (prev) {
6790
- toggleState(this.elementInternals, `${prev}`, false);
6791
- }
6792
- if (next) {
6793
- toggleState(this.elementInternals, `${next}`, true);
6794
- }
6820
+ swapStates(this.elementInternals, prev, next, CounterBadgeAppearance);
6795
6821
  }
6796
6822
  /**
6797
6823
  * Handles changes to color attribute custom states
@@ -6799,12 +6825,7 @@ class CounterBadge extends FASTElement {
6799
6825
  * @param next - the next state
6800
6826
  */
6801
6827
  colorChanged(prev, next) {
6802
- if (prev) {
6803
- toggleState(this.elementInternals, `${prev}`, false);
6804
- }
6805
- if (next) {
6806
- toggleState(this.elementInternals, `${next}`, true);
6807
- }
6828
+ swapStates(this.elementInternals, prev, next, CounterBadgeColor);
6808
6829
  }
6809
6830
  /**
6810
6831
  * Handles changes to shape attribute custom states
@@ -6812,12 +6833,7 @@ class CounterBadge extends FASTElement {
6812
6833
  * @param next - the next state
6813
6834
  */
6814
6835
  shapeChanged(prev, next) {
6815
- if (prev) {
6816
- toggleState(this.elementInternals, `${prev}`, false);
6817
- }
6818
- if (next) {
6819
- toggleState(this.elementInternals, `${next}`, true);
6820
- }
6836
+ swapStates(this.elementInternals, prev, next, CounterBadgeShape);
6821
6837
  }
6822
6838
  /**
6823
6839
  * Handles changes to size attribute custom states
@@ -6825,12 +6841,7 @@ class CounterBadge extends FASTElement {
6825
6841
  * @param next - the next state
6826
6842
  */
6827
6843
  sizeChanged(prev, next) {
6828
- if (prev) {
6829
- toggleState(this.elementInternals, `${prev}`, false);
6830
- }
6831
- if (next) {
6832
- toggleState(this.elementInternals, `${next}`, true);
6833
- }
6844
+ swapStates(this.elementInternals, prev, next, CounterBadgeSize);
6834
6845
  }
6835
6846
  countChanged() {
6836
6847
  this.setCount();
@@ -6860,27 +6871,27 @@ class CounterBadge extends FASTElement {
6860
6871
  return;
6861
6872
  }
6862
6873
  }
6863
- __decorateClass$o([attr], CounterBadge.prototype, "appearance", 2);
6864
- __decorateClass$o([attr], CounterBadge.prototype, "color", 2);
6865
- __decorateClass$o([attr], CounterBadge.prototype, "shape", 2);
6866
- __decorateClass$o([attr], CounterBadge.prototype, "size", 2);
6867
- __decorateClass$o([attr({
6874
+ __decorateClass$p([attr], CounterBadge.prototype, "appearance", 2);
6875
+ __decorateClass$p([attr], CounterBadge.prototype, "color", 2);
6876
+ __decorateClass$p([attr], CounterBadge.prototype, "shape", 2);
6877
+ __decorateClass$p([attr], CounterBadge.prototype, "size", 2);
6878
+ __decorateClass$p([attr({
6868
6879
  converter: nullableNumberConverter
6869
6880
  })], CounterBadge.prototype, "count", 2);
6870
- __decorateClass$o([attr({
6881
+ __decorateClass$p([attr({
6871
6882
  attribute: "overflow-count",
6872
6883
  converter: nullableNumberConverter
6873
6884
  })], CounterBadge.prototype, "overflowCount", 2);
6874
- __decorateClass$o([attr({
6885
+ __decorateClass$p([attr({
6875
6886
  attribute: "show-zero",
6876
6887
  mode: "boolean"
6877
6888
  })], CounterBadge.prototype, "showZero", 2);
6878
- __decorateClass$o([attr({
6889
+ __decorateClass$p([attr({
6879
6890
  mode: "boolean"
6880
6891
  })], CounterBadge.prototype, "dot", 2);
6881
6892
  applyMixins(CounterBadge, StartEnd);
6882
6893
 
6883
- const styles$s = css`
6894
+ const styles$t = css`
6884
6895
  :host(${roundedState}){border-radius:${borderRadiusMedium}}:host(${roundedState}${tinyState}),:host(${roundedState}${extraSmallState}),:host(${roundedState}${smallState}){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
6885
6896
  ${badgeFilledStyles}
6886
6897
  ${badgeGhostStyles}
@@ -6893,15 +6904,15 @@ function composeTemplate(options = {}) {
6893
6904
  defaultContent: html`${x => x.setCount()}`
6894
6905
  });
6895
6906
  }
6896
- const template$t = composeTemplate();
6907
+ const template$u = composeTemplate();
6897
6908
 
6898
- const definition$t = CounterBadge.compose({
6909
+ const definition$u = CounterBadge.compose({
6899
6910
  name: `${FluentDesignSystem.prefix}-counter-badge`,
6900
- template: template$t,
6901
- styles: styles$s
6911
+ template: template$u,
6912
+ styles: styles$t
6902
6913
  });
6903
6914
 
6904
- definition$t.define(FluentDesignSystem.registry);
6915
+ definition$u.define(FluentDesignSystem.registry);
6905
6916
 
6906
6917
  const DialogType = {
6907
6918
  modal: "modal",
@@ -6909,12 +6920,12 @@ const DialogType = {
6909
6920
  alert: "alert"
6910
6921
  };
6911
6922
 
6912
- var __defProp$n = Object.defineProperty;
6913
- var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
6914
- var __decorateClass$n = (decorators, target, key, kind) => {
6915
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
6923
+ var __defProp$o = Object.defineProperty;
6924
+ var __getOwnPropDesc$o = Object.getOwnPropertyDescriptor;
6925
+ var __decorateClass$o = (decorators, target, key, kind) => {
6926
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$o(target, key) : target;
6916
6927
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
6917
- if (kind && result) __defProp$n(target, key, result);
6928
+ if (kind && result) __defProp$o(target, key, result);
6918
6929
  return result;
6919
6930
  };
6920
6931
  class Dialog extends FASTElement {
@@ -6982,35 +6993,35 @@ class Dialog extends FASTElement {
6982
6993
  return true;
6983
6994
  }
6984
6995
  }
6985
- __decorateClass$n([observable], Dialog.prototype, "dialog", 2);
6986
- __decorateClass$n([attr({
6996
+ __decorateClass$o([observable], Dialog.prototype, "dialog", 2);
6997
+ __decorateClass$o([attr({
6987
6998
  attribute: "aria-describedby"
6988
6999
  })], Dialog.prototype, "ariaDescribedby", 2);
6989
- __decorateClass$n([attr({
7000
+ __decorateClass$o([attr({
6990
7001
  attribute: "aria-labelledby"
6991
7002
  })], Dialog.prototype, "ariaLabelledby", 2);
6992
- __decorateClass$n([attr], Dialog.prototype, "type", 2);
7003
+ __decorateClass$o([attr], Dialog.prototype, "type", 2);
6993
7004
 
6994
- const template$s = html`<dialog role="${x => x.type === DialogType.alert ? "alertdialog" : "dialog"}" type="${x => x.type}" class="dialog" part="dialog" aria-modal="${x => x.type === DialogType.modal || x.type === DialogType.alert ? "true" : void 0}" aria-describedby="${x => x.ariaDescribedby}" aria-labelledby="${x => x.ariaLabelledby}" aria-label="${x => x.ariaLabel}" @click="${(x, c) => x.clickHandler(c.event)}" @cancel="${(x, c) => x.type === DialogType.alert ? c.event.preventDefault() : x.hide()}" ${ref("dialog")}><slot></slot></dialog>`;
7005
+ const template$t = html`<dialog role="${x => x.type === DialogType.alert ? "alertdialog" : "dialog"}" type="${x => x.type}" class="dialog" part="dialog" aria-modal="${x => x.type === DialogType.modal || x.type === DialogType.alert ? "true" : void 0}" aria-describedby="${x => x.ariaDescribedby}" aria-labelledby="${x => x.ariaLabelledby}" aria-label="${x => x.ariaLabel}" @click="${(x, c) => x.clickHandler(c.event)}" @cancel="${(x, c) => x.type === DialogType.alert ? c.event.preventDefault() : x.hide()}" ${ref("dialog")}><slot></slot></dialog>`;
6995
7006
 
6996
- const styles$r = css`
7007
+ const styles$s = css`
6997
7008
  @layer base{:host{--dialog-backdrop:${colorBackgroundOverlay};--dialog-starting-scale:0.85}::backdrop{background:var(--dialog-backdrop,rgba(0,0,0,0.4))}dialog{background:${colorNeutralBackground1};border-radius:${borderRadiusXLarge};border:none;box-shadow:${shadow64};color:${colorNeutralForeground1};max-height:calc(-48px + 100vh);padding:0;width:100%;max-width:600px}:host([type='non-modal']) dialog{inset:0;position:fixed;z-index:2;overflow:auto}}@layer animations{@media (prefers-reduced-motion:no-preference){dialog,::backdrop{transition:display allow-discrete,opacity,overlay allow-discrete,scale;transition-duration:${durationGentle};transition-timing-function:${curveDecelerateMid};opacity:0}::backdrop{transition-timing-function:${curveLinear}}[open],[open]::backdrop{opacity:1}dialog:not([open]){scale:var(--dialog-starting-scale);transition-timing-function:${curveAccelerateMid}}}@starting-style{[open],[open]::backdrop{opacity:0}dialog{scale:var(--dialog-starting-scale)}}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
6998
7009
  @layer base{dialog{border:${strokeWidthThin} solid ${colorTransparentStroke}}}`));
6999
7010
 
7000
- const definition$s = Dialog.compose({
7011
+ const definition$t = Dialog.compose({
7001
7012
  name: `${FluentDesignSystem.prefix}-dialog`,
7002
- template: template$s,
7003
- styles: styles$r
7013
+ template: template$t,
7014
+ styles: styles$s
7004
7015
  });
7005
7016
 
7006
- definition$s.define(FluentDesignSystem.registry);
7017
+ definition$t.define(FluentDesignSystem.registry);
7007
7018
 
7008
- var __defProp$m = Object.defineProperty;
7009
- var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
7010
- var __decorateClass$m = (decorators, target, key, kind) => {
7011
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
7019
+ var __defProp$n = Object.defineProperty;
7020
+ var __getOwnPropDesc$n = Object.getOwnPropertyDescriptor;
7021
+ var __decorateClass$n = (decorators, target, key, kind) => {
7022
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$n(target, key) : target;
7012
7023
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7013
- if (kind && result) __defProp$m(target, key, result);
7024
+ if (kind && result) __defProp$n(target, key, result);
7014
7025
  return result;
7015
7026
  };
7016
7027
  class DialogBody extends FASTElement {
@@ -7019,7 +7030,7 @@ class DialogBody extends FASTElement {
7019
7030
  this.noTitleAction = false;
7020
7031
  }
7021
7032
  }
7022
- __decorateClass$m([attr({
7033
+ __decorateClass$n([attr({
7023
7034
  mode: "boolean",
7024
7035
  attribute: "no-title-action"
7025
7036
  })], DialogBody.prototype, "noTitleAction", 2);
@@ -7038,20 +7049,20 @@ const dismissed16Regular = html.partial(`
7038
7049
  fill="currentColor"
7039
7050
  ></path>
7040
7051
  </svg>`);
7041
- const template$r = html`<div class="title" part="title"><slot name="title"></slot><slot name="title-action"><fluent-button ?hidden=${x => x.noTitleAction || x.parentNode?.type === DialogType.alert} tabindex="0" part="title-action" class="title-action" appearance="transparent" icon-only @click=${x => x.parentNode?.hide()} ${ref("defaultTitleAction")}>${dismissed16Regular}</fluent-button></slot></div><div class="content" part="content"><slot></slot></div><div class="actions" part="actions"><slot name="action"></slot></div>`;
7052
+ const template$s = html`<div class="title" part="title"><slot name="title"></slot><slot name="title-action"><fluent-button ?hidden=${x => x.noTitleAction || x.parentNode?.type === DialogType.alert} tabindex="0" part="title-action" class="title-action" appearance="transparent" icon-only @click=${x => x.parentNode?.hide()} ${ref("defaultTitleAction")}>${dismissed16Regular}</fluent-button></slot></div><div class="content" part="content"><slot></slot></div><div class="actions" part="actions"><slot name="action"></slot></div>`;
7042
7053
 
7043
- const styles$q = css`
7054
+ const styles$r = css`
7044
7055
  ${display("grid")}
7045
7056
 
7046
7057
  :host{background:${colorNeutralBackground1};box-sizing:border-box;gap:${spacingVerticalS};padding:${spacingVerticalXXL} ${spacingHorizontalXXL};container:dialog-body / inline-size}.title{box-sizing:border-box;align-items:flex-start;background:${colorNeutralBackground1};color:${colorNeutralForeground1};column-gap:8px;display:flex;font-family:${fontFamilyBase};font-size:${fontSizeBase500};font-weight:${fontWeightSemibold};inset-block-start:0;justify-content:space-between;line-height:${lineHeightBase500};margin-block-end:calc(${spacingVerticalS} * -1);margin-block-start:calc(${spacingVerticalXXL} * -1);padding-block-end:${spacingVerticalS};padding-block-start:${spacingVerticalXXL};position:sticky;z-index:1}.content{box-sizing:border-box;color:${colorNeutralForeground1};font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};min-height:32px}.actions{box-sizing:border-box;background:${colorNeutralBackground1};display:flex;flex-direction:column;gap:${spacingVerticalS};inset-block-end:0;margin-block-end:calc(${spacingVerticalXXL} * -1);padding-block-end:${spacingVerticalXXL};padding-block-start:${spacingVerticalL};position:sticky;z-index:2}:not(:has(:is([slot='title'],[slot='title-action']))) .title:not(:has(.title-action)),:not(:has([slot='action'])) .actions{display:none}@container (min-width:480px){.actions{align-items:center;flex-direction:row;justify-content:flex-end;margin-block-start:calc(${spacingVerticalS} * -1);padding-block-start:${spacingVerticalS}}}`;
7047
7058
 
7048
- const definition$r = DialogBody.compose({
7059
+ const definition$s = DialogBody.compose({
7049
7060
  name: `${FluentDesignSystem.prefix}-dialog-body`,
7050
- template: template$r,
7051
- styles: styles$q
7061
+ template: template$s,
7062
+ styles: styles$r
7052
7063
  });
7053
7064
 
7054
- definition$r.define(FluentDesignSystem.registry);
7065
+ definition$s.define(FluentDesignSystem.registry);
7055
7066
 
7056
7067
  const DividerRole = {
7057
7068
  /**
@@ -7064,13 +7075,23 @@ const DividerRole = {
7064
7075
  presentation: "presentation"
7065
7076
  };
7066
7077
  const DividerOrientation = Orientation;
7078
+ const DividerAlignContent = {
7079
+ center: "center",
7080
+ start: "start",
7081
+ end: "end"
7082
+ };
7083
+ const DividerAppearance = {
7084
+ strong: "strong",
7085
+ brand: "brand",
7086
+ subtle: "subtle"
7087
+ };
7067
7088
 
7068
- var __defProp$l = Object.defineProperty;
7069
- var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
7070
- var __decorateClass$l = (decorators, target, key, kind) => {
7071
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
7089
+ var __defProp$m = Object.defineProperty;
7090
+ var __getOwnPropDesc$m = Object.getOwnPropertyDescriptor;
7091
+ var __decorateClass$m = (decorators, target, key, kind) => {
7092
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$m(target, key) : target;
7072
7093
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7073
- if (kind && result) __defProp$l(target, key, result);
7094
+ if (kind && result) __defProp$m(target, key, result);
7074
7095
  return result;
7075
7096
  };
7076
7097
  class BaseDivider extends FASTElement {
@@ -7113,17 +7134,12 @@ class BaseDivider extends FASTElement {
7113
7134
  * @internal
7114
7135
  */
7115
7136
  orientationChanged(previous, next) {
7116
- this.elementInternals.ariaOrientation = this.role !== DividerRole.presentation ? next : null;
7117
- if (previous) {
7118
- toggleState(this.elementInternals, `${previous}`, false);
7119
- }
7120
- if (next) {
7121
- toggleState(this.elementInternals, `${next}`, true);
7122
- }
7137
+ this.elementInternals.ariaOrientation = this.role !== DividerRole.presentation ? next ?? null : null;
7138
+ swapStates(this.elementInternals, previous, next, DividerOrientation);
7123
7139
  }
7124
7140
  }
7125
- __decorateClass$l([attr], BaseDivider.prototype, "role", 2);
7126
- __decorateClass$l([attr], BaseDivider.prototype, "orientation", 2);
7141
+ __decorateClass$m([attr], BaseDivider.prototype, "role", 2);
7142
+ __decorateClass$m([attr], BaseDivider.prototype, "orientation", 2);
7127
7143
  class Divider extends BaseDivider {
7128
7144
  /**
7129
7145
  * Handles changes to align-content attribute custom states
@@ -7131,12 +7147,7 @@ class Divider extends BaseDivider {
7131
7147
  * @param next - the next state
7132
7148
  */
7133
7149
  alignContentChanged(prev, next) {
7134
- if (prev) {
7135
- toggleState(this.elementInternals, `align-${prev}`, false);
7136
- }
7137
- if (next) {
7138
- toggleState(this.elementInternals, `align-${next}`, true);
7139
- }
7150
+ swapStates(this.elementInternals, prev, next, DividerAlignContent, "align-");
7140
7151
  }
7141
7152
  /**
7142
7153
  * Handles changes to appearance attribute custom states
@@ -7144,12 +7155,7 @@ class Divider extends BaseDivider {
7144
7155
  * @param next - the next state
7145
7156
  */
7146
7157
  appearanceChanged(prev, next) {
7147
- if (prev) {
7148
- toggleState(this.elementInternals, `${prev}`, false);
7149
- }
7150
- if (next) {
7151
- toggleState(this.elementInternals, `${next}`, true);
7152
- }
7158
+ swapStates(this.elementInternals, prev, next, DividerAppearance);
7153
7159
  }
7154
7160
  /**
7155
7161
  * Handles changes to inset custom states
@@ -7160,32 +7166,32 @@ class Divider extends BaseDivider {
7160
7166
  toggleState(this.elementInternals, "inset", next);
7161
7167
  }
7162
7168
  }
7163
- __decorateClass$l([attr({
7169
+ __decorateClass$m([attr({
7164
7170
  attribute: "align-content"
7165
7171
  })], Divider.prototype, "alignContent", 2);
7166
- __decorateClass$l([attr], Divider.prototype, "appearance", 2);
7167
- __decorateClass$l([attr({
7172
+ __decorateClass$m([attr], Divider.prototype, "appearance", 2);
7173
+ __decorateClass$m([attr({
7168
7174
  mode: "boolean"
7169
7175
  })], Divider.prototype, "inset", 2);
7170
7176
 
7171
7177
  function dividerTemplate() {
7172
7178
  return html`<slot></slot>`;
7173
7179
  }
7174
- const template$q = dividerTemplate();
7180
+ const template$r = dividerTemplate();
7175
7181
 
7176
- const styles$p = css`
7182
+ const styles$q = css`
7177
7183
  ${display("flex")}
7178
7184
 
7179
7185
  :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`
7180
7186
  :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}`));
7181
7187
 
7182
- const definition$q = Divider.compose({
7188
+ const definition$r = Divider.compose({
7183
7189
  name: `${FluentDesignSystem.prefix}-divider`,
7184
- template: template$q,
7185
- styles: styles$p
7190
+ template: template$r,
7191
+ styles: styles$q
7186
7192
  });
7187
7193
 
7188
- definition$q.define(FluentDesignSystem.registry);
7194
+ definition$r.define(FluentDesignSystem.registry);
7189
7195
 
7190
7196
  const DrawerPosition = {
7191
7197
  start: "start",
@@ -7203,12 +7209,12 @@ const DrawerType = {
7203
7209
  inline: "inline"
7204
7210
  };
7205
7211
 
7206
- var __defProp$k = Object.defineProperty;
7207
- var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
7208
- var __decorateClass$k = (decorators, target, key, kind) => {
7209
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
7212
+ var __defProp$l = Object.defineProperty;
7213
+ var __getOwnPropDesc$l = Object.getOwnPropertyDescriptor;
7214
+ var __decorateClass$l = (decorators, target, key, kind) => {
7215
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$l(target, key) : target;
7210
7216
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7211
- if (kind && result) __defProp$k(target, key, result);
7217
+ if (kind && result) __defProp$l(target, key, result);
7212
7218
  return result;
7213
7219
  };
7214
7220
  class Drawer extends FASTElement {
@@ -7278,20 +7284,20 @@ class Drawer extends FASTElement {
7278
7284
  return true;
7279
7285
  }
7280
7286
  }
7281
- __decorateClass$k([attr], Drawer.prototype, "type", 2);
7282
- __decorateClass$k([attr({
7287
+ __decorateClass$l([attr], Drawer.prototype, "type", 2);
7288
+ __decorateClass$l([attr({
7283
7289
  attribute: "aria-labelledby"
7284
7290
  })], Drawer.prototype, "ariaLabelledby", 2);
7285
- __decorateClass$k([attr({
7291
+ __decorateClass$l([attr({
7286
7292
  attribute: "aria-describedby"
7287
7293
  })], Drawer.prototype, "ariaDescribedby", 2);
7288
- __decorateClass$k([attr], Drawer.prototype, "position", 2);
7289
- __decorateClass$k([attr({
7294
+ __decorateClass$l([attr], Drawer.prototype, "position", 2);
7295
+ __decorateClass$l([attr({
7290
7296
  attribute: "size"
7291
7297
  })], Drawer.prototype, "size", 2);
7292
- __decorateClass$k([observable], Drawer.prototype, "dialog", 2);
7298
+ __decorateClass$l([observable], Drawer.prototype, "dialog", 2);
7293
7299
 
7294
- const styles$o = css`
7300
+ const styles$p = css`
7295
7301
  ${display("block")}
7296
7302
 
7297
7303
  :host{--dialog-backdrop:${colorBackgroundOverlay}}:host([type='non-modal']) dialog[open]::backdrop{display:none}:host([type='non-modal']) dialog{position:fixed;top:0;bottom:0}:host([type='inline']){height:100%;width:fit-content}:host([type='inline']) dialog[open]{box-shadow:none;position:relative}:host([size='small']) dialog{width:320px;max-width:320px}:host([size='large']) dialog{width:940px;max-width:940px}:host([size='full']) dialog{width:100%;max-width:100%}:host([position='end']) dialog{margin-inline-start:auto;margin-inline-end:0}dialog{box-sizing:border-box;z-index:var(--drawer-elevation,1000);font-size:${fontSizeBase300};line-height:${lineHeightBase300};font-family:${fontFamilyBase};font-weight:${fontWeightRegular};color:${colorNeutralForeground1};max-width:var(--drawer-width,592px);max-height:100vh;height:100%;margin-inline-start:0;margin-inline-end:auto;border-inline-end-color:${colorTransparentStroke};border-inline-start-color:var(--drawer-separator,${colorTransparentStroke});outline:none;top:0;bottom:0;width:var(--drawer-width,592px);border-radius:0;padding:0;max-width:var(--drawer-width,592px);box-shadow:${shadow64};border:${strokeWidthThin} solid ${colorTransparentStroke};background:${colorNeutralBackground1}}dialog::backdrop{background:var(--dialog-backdrop)}@layer animations{@media (prefers-reduced-motion:no-preference){dialog{transition:display allow-discrete,opacity,overlay allow-discrete,transform;transition-duration:${durationGentle};transition-timing-function:${curveDecelerateMid}}:host dialog:not([open]){transform:translateX(-100%);transition-timing-function:${curveAccelerateMid}}:host([position='end']) dialog:not([open]){transform:translateX(100%);transition-timing-function:${curveAccelerateMid}}dialog[open]{transform:translateX(0)}dialog::backdrop{transition:display allow-discrete,opacity,overlay allow-discrete,scale;transition-duration:${durationGentle};transition-timing-function:${curveDecelerateMid};background:var(--dialog-backdrop,${colorBackgroundOverlay});opacity:0}dialog[open]::backdrop{opacity:1}dialog::backdrop{transition-timing-function:${curveLinear}}}@starting-style{dialog[open]{transform:translateX(-100%)}:host([position='end']) dialog[open]{transform:translateX(100%)}dialog[open]::backdrop{opacity:0}}}`;
@@ -7299,34 +7305,34 @@ const styles$o = css`
7299
7305
  function drawerTemplate() {
7300
7306
  return html`<dialog class="dialog" part="dialog" role="${x => x.type === "modal" ? "dialog" : x.role}" aria-modal="${x => x.type === "modal" ? "true" : void 0}" aria-describedby="${x => x.ariaDescribedby}" aria-labelledby="${x => x.ariaLabelledby}" aria-label="${x => x.ariaLabel}" size="${x => x.size}" position="${x => x.position}" type="${x => x.type}" @click="${(x, c) => x.clickHandler(c.event)}" @cancel="${(x, c) => x.hide()}" ${ref("dialog")}><slot></slot></dialog>`;
7301
7307
  }
7302
- const template$p = drawerTemplate();
7308
+ const template$q = drawerTemplate();
7303
7309
 
7304
- const definition$p = Drawer.compose({
7310
+ const definition$q = Drawer.compose({
7305
7311
  name: `${FluentDesignSystem.prefix}-drawer`,
7306
- template: template$p,
7307
- styles: styles$o
7312
+ template: template$q,
7313
+ styles: styles$p
7308
7314
  });
7309
7315
 
7310
- definition$p.define(FluentDesignSystem.registry);
7316
+ definition$q.define(FluentDesignSystem.registry);
7311
7317
 
7312
7318
  class DrawerBody extends FASTElement {}
7313
7319
 
7314
- const styles$n = css`
7320
+ const styles$o = css`
7315
7321
  ${display("grid")}
7316
7322
  :host{box-sizing:border-box;grid-template-rows:min-content auto min-content;position:relative;height:100%;padding:${spacingHorizontalXL};max-height:100svh}.header{display:flex;justify-content:space-between;align-items:center;${typographySubtitle1Styles}}.footer{display:flex;justify-content:flex-start;gap:${spacingHorizontalM}}`;
7317
7323
 
7318
7324
  function drawerBodyTemplate() {
7319
7325
  return html`<div class="header" part="header"><slot name="title"></slot><slot name="close"></slot></div><div class="content" part="content"><slot></slot></div><div class="footer" part="footer"><slot name="footer"></slot></div>`;
7320
7326
  }
7321
- const template$o = drawerBodyTemplate();
7327
+ const template$p = drawerBodyTemplate();
7322
7328
 
7323
- const definition$o = DrawerBody.compose({
7329
+ const definition$p = DrawerBody.compose({
7324
7330
  name: `${FluentDesignSystem.prefix}-drawer-body`,
7325
- template: template$o,
7326
- styles: styles$n
7331
+ template: template$p,
7332
+ styles: styles$o
7327
7333
  });
7328
7334
 
7329
- definition$o.define(FluentDesignSystem.registry);
7335
+ definition$p.define(FluentDesignSystem.registry);
7330
7336
 
7331
7337
  const LabelPosition = {
7332
7338
  above: "above",
@@ -7347,12 +7353,12 @@ const ValidationFlags = {
7347
7353
  valid: "valid"
7348
7354
  };
7349
7355
 
7350
- var __defProp$j = Object.defineProperty;
7351
- var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
7352
- var __decorateClass$j = (decorators, target, key, kind) => {
7353
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
7356
+ var __defProp$k = Object.defineProperty;
7357
+ var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
7358
+ var __decorateClass$k = (decorators, target, key, kind) => {
7359
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
7354
7360
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7355
- if (kind && result) __defProp$j(target, key, result);
7361
+ if (kind && result) __defProp$k(target, key, result);
7356
7362
  return result;
7357
7363
  };
7358
7364
  class BaseField extends FASTElement {
@@ -7520,26 +7526,26 @@ class BaseField extends FASTElement {
7520
7526
  }
7521
7527
  }
7522
7528
  }
7523
- __decorateClass$j([observable], BaseField.prototype, "labelSlot", 2);
7524
- __decorateClass$j([observable], BaseField.prototype, "messageSlot", 2);
7525
- __decorateClass$j([observable], BaseField.prototype, "slottedInputs", 2);
7526
- __decorateClass$j([observable], BaseField.prototype, "input", 2);
7529
+ __decorateClass$k([observable], BaseField.prototype, "labelSlot", 2);
7530
+ __decorateClass$k([observable], BaseField.prototype, "messageSlot", 2);
7531
+ __decorateClass$k([observable], BaseField.prototype, "slottedInputs", 2);
7532
+ __decorateClass$k([observable], BaseField.prototype, "input", 2);
7527
7533
  class Field extends BaseField {
7528
7534
  constructor() {
7529
7535
  super(...arguments);
7530
7536
  this.labelPosition = LabelPosition.above;
7531
7537
  }
7532
7538
  }
7533
- __decorateClass$j([attr({
7539
+ __decorateClass$k([attr({
7534
7540
  attribute: "label-position"
7535
7541
  })], Field.prototype, "labelPosition", 2);
7536
7542
 
7537
- const styles$m = css`
7543
+ const styles$n = css`
7538
7544
  ${display("inline-grid")}
7539
7545
 
7540
7546
  :host{color:${colorNeutralForeground1};align-items:center;gap:0 ${spacingHorizontalM};justify-items:start;position:relative}:has([slot='message']){color:${colorNeutralForeground1};row-gap:${spacingVerticalS}}:not(::slotted([slot='label'])){gap:0}:host([label-position='before']){grid-template-areas:'label input' 'label message'}:host([label-position='after']){gap:0;grid-template-areas:'input label' 'message message';grid-template-columns:auto 1fr}:host([label-position='after']) ::slotted([slot='input']){margin-inline-end:${spacingHorizontalM}}:host([label-position='above']){grid-template-areas:'label' 'input' 'message';row-gap:${spacingVerticalXXS}}:host([label-position='below']){grid-template-areas:'input' 'label' 'message';justify-items:center}:host([label-position='below']) ::slotted([slot='label']){margin-block-start:${spacingVerticalM}}:host([label-position='below']:not(${hasMessageState})){grid-template-areas:'input' 'label'}::slotted([slot='label'])::after{content:'';display:block;position:absolute;inset:0}::slotted([slot='input']){grid-area:input;position:relative;z-index:1}::slotted([slot='message']){margin-block-start:${spacingVerticalXXS};grid-area:message}:host(${focusVisibleState}:focus-within){border-radius:${borderRadiusMedium};outline:${strokeWidthThick} solid ${colorStrokeFocus2}}::slotted(label),::slotted([slot='label']){cursor:inherit;display:inline-flex;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};grid-area:label;line-height:${lineHeightBase300};user-select:none}:host([size='small']) ::slotted(label){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']) ::slotted(label){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large']) ::slotted(label),:host([weight='semibold']) ::slotted(label){font-weight:${fontWeightSemibold}}:host(${disabledState}){cursor:default}::slotted([flag]){display:none}:host(${badInputState}) ::slotted([flag='${ValidationFlags.badInput}']),:host(${customErrorState}) ::slotted([flag='${ValidationFlags.customError}']),:host(${patternMismatchState}) ::slotted([flag='${ValidationFlags.patternMismatch}']),:host(${rangeOverflowState}) ::slotted([flag='${ValidationFlags.rangeOverflow}']),:host(${rangeUnderflowState}) ::slotted([flag='${ValidationFlags.rangeUnderflow}']),:host(${stepMismatchState}) ::slotted([flag='${ValidationFlags.stepMismatch}']),:host(${tooLongState}) ::slotted([flag='${ValidationFlags.tooLong}']),:host(${tooShortState}) ::slotted([flag='${ValidationFlags.tooShort}']),:host(${typeMismatchState}) ::slotted([flag='${ValidationFlags.typeMismatch}']),:host(${valueMissingState}) ::slotted([flag='${ValidationFlags.valueMissing}']),:host(${validState}) ::slotted([flag='${ValidationFlags.valid}']){display:block}`;
7541
7547
 
7542
- const template$n = html`<template @click="${(x, c) => x.clickHandler(c.event)}" @change="${(x, c) => x.changeHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" ${children({
7548
+ const template$o = html`<template @click="${(x, c) => x.clickHandler(c.event)}" @change="${(x, c) => x.changeHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" ${children({
7543
7549
  property: "slottedInputs",
7544
7550
  attributes: true,
7545
7551
  attributeFilter: ["disabled", "required", "readonly"],
@@ -7551,23 +7557,35 @@ const template$n = html`<template @click="${(x, c) => x.clickHandler(c.event)}"
7551
7557
  filter: elements("[flag]")
7552
7558
  })}></slot></template>`;
7553
7559
 
7554
- const definition$n = Field.compose({
7560
+ const definition$o = Field.compose({
7555
7561
  name: `${FluentDesignSystem.prefix}-field`,
7556
- template: template$n,
7557
- styles: styles$m,
7562
+ template: template$o,
7563
+ styles: styles$n,
7558
7564
  shadowOptions: {
7559
7565
  delegatesFocus: true
7560
7566
  }
7561
7567
  });
7562
7568
 
7563
- definition$n.define(FluentDesignSystem.registry);
7569
+ definition$o.define(FluentDesignSystem.registry);
7564
7570
 
7565
- var __defProp$i = Object.defineProperty;
7566
- var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
7567
- var __decorateClass$i = (decorators, target, key, kind) => {
7568
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
7571
+ const ImageFit = {
7572
+ none: "none",
7573
+ center: "center",
7574
+ contain: "contain",
7575
+ cover: "cover"
7576
+ };
7577
+ const ImageShape = {
7578
+ circular: "circular",
7579
+ rounded: "rounded",
7580
+ square: "square"
7581
+ };
7582
+
7583
+ var __defProp$j = Object.defineProperty;
7584
+ var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
7585
+ var __decorateClass$j = (decorators, target, key, kind) => {
7586
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
7569
7587
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7570
- if (kind && result) __defProp$i(target, key, result);
7588
+ if (kind && result) __defProp$j(target, key, result);
7571
7589
  return result;
7572
7590
  };
7573
7591
  class Image extends FASTElement {
@@ -7610,12 +7628,7 @@ class Image extends FASTElement {
7610
7628
  * @param next - the next state
7611
7629
  */
7612
7630
  fitChanged(prev, next) {
7613
- if (prev) {
7614
- toggleState(this.elementInternals, `fit-${prev}`, false);
7615
- }
7616
- if (next) {
7617
- toggleState(this.elementInternals, `fit-${next}`, true);
7618
- }
7631
+ swapStates(this.elementInternals, prev, next, ImageFit, "fit-");
7619
7632
  }
7620
7633
  /**
7621
7634
  * Handles changes to shape attribute custom states
@@ -7623,45 +7636,50 @@ class Image extends FASTElement {
7623
7636
  * @param next - the next state
7624
7637
  */
7625
7638
  shapeChanged(prev, next) {
7626
- if (prev) {
7627
- toggleState(this.elementInternals, `${prev}`, false);
7628
- }
7629
- if (next) {
7630
- toggleState(this.elementInternals, `${next}`, true);
7631
- }
7639
+ swapStates(this.elementInternals, prev, next, ImageShape);
7632
7640
  }
7633
7641
  }
7634
- __decorateClass$i([attr({
7642
+ __decorateClass$j([attr({
7635
7643
  mode: "boolean"
7636
7644
  })], Image.prototype, "block", 2);
7637
- __decorateClass$i([attr({
7645
+ __decorateClass$j([attr({
7638
7646
  mode: "boolean"
7639
7647
  })], Image.prototype, "bordered", 2);
7640
- __decorateClass$i([attr({
7648
+ __decorateClass$j([attr({
7641
7649
  mode: "boolean"
7642
7650
  })], Image.prototype, "shadow", 2);
7643
- __decorateClass$i([attr], Image.prototype, "fit", 2);
7644
- __decorateClass$i([attr], Image.prototype, "shape", 2);
7651
+ __decorateClass$j([attr], Image.prototype, "fit", 2);
7652
+ __decorateClass$j([attr], Image.prototype, "shape", 2);
7645
7653
 
7646
- const template$m = html`<slot></slot>`;
7654
+ const template$n = html`<slot></slot>`;
7647
7655
 
7648
- const styles$l = css`
7656
+ const styles$m = css`
7649
7657
  :host{contain:content}:host ::slotted(img){box-sizing:border-box;min-height:8px;min-width:8px;display:inline-block}:host(${blockState}) ::slotted(img){width:100%;height:auto}:host(${borderedState}) ::slotted(img){border:${strokeWidthThin} solid ${colorNeutralStroke2}}:host(${fitNoneState}) ::slotted(img){object-fit:none;object-position:top left;height:100%;width:100%}:host(${fitCenterState}) ::slotted(img){object-fit:none;object-position:center;height:100%;width:100%}:host(${fitContainState}) ::slotted(img){object-fit:contain;object-position:center;height:100%;width:100%}:host(${fitCoverState}) ::slotted(img){object-fit:cover;object-position:center;height:100%;width:100%}:host(${shadowState}) ::slotted(img){box-shadow:${shadow4}}:host(${circularState}) ::slotted(img){border-radius:${borderRadiusCircular}}:host(${roundedState}) ::slotted(img){border-radius:${borderRadiusMedium}}`;
7650
7658
 
7651
- const definition$m = Image.compose({
7659
+ const definition$n = Image.compose({
7652
7660
  name: `${FluentDesignSystem.prefix}-image`,
7653
- template: template$m,
7654
- styles: styles$l
7661
+ template: template$n,
7662
+ styles: styles$m
7655
7663
  });
7656
7664
 
7657
- definition$m.define(FluentDesignSystem.registry);
7665
+ definition$n.define(FluentDesignSystem.registry);
7658
7666
 
7659
- var __defProp$h = Object.defineProperty;
7660
- var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
7661
- var __decorateClass$h = (decorators, target, key, kind) => {
7662
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
7667
+ const LabelSize = {
7668
+ small: "small",
7669
+ medium: "medium",
7670
+ large: "large"
7671
+ };
7672
+ const LabelWeight = {
7673
+ regular: "regular",
7674
+ semibold: "semibold"
7675
+ };
7676
+
7677
+ var __defProp$i = Object.defineProperty;
7678
+ var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
7679
+ var __decorateClass$i = (decorators, target, key, kind) => {
7680
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
7663
7681
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7664
- if (kind && result) __defProp$h(target, key, result);
7682
+ if (kind && result) __defProp$i(target, key, result);
7665
7683
  return result;
7666
7684
  };
7667
7685
  class Label extends FASTElement {
@@ -7682,12 +7700,7 @@ class Label extends FASTElement {
7682
7700
  * @param next - the next state
7683
7701
  */
7684
7702
  sizeChanged(prev, next) {
7685
- if (prev) {
7686
- toggleState(this.elementInternals, `${prev}`, false);
7687
- }
7688
- if (next) {
7689
- toggleState(this.elementInternals, `${next}`, true);
7690
- }
7703
+ swapStates(this.elementInternals, prev, next, LabelSize);
7691
7704
  }
7692
7705
  /**
7693
7706
  * Handles changes to weight attribute custom states
@@ -7695,12 +7708,7 @@ class Label extends FASTElement {
7695
7708
  * @param next - the next state
7696
7709
  */
7697
7710
  weightChanged(prev, next) {
7698
- if (prev) {
7699
- toggleState(this.elementInternals, `${prev}`, false);
7700
- }
7701
- if (next) {
7702
- toggleState(this.elementInternals, `${next}`, true);
7703
- }
7711
+ swapStates(this.elementInternals, prev, next, LabelWeight);
7704
7712
  }
7705
7713
  /**
7706
7714
  * Handles changes to disabled attribute custom states
@@ -7711,16 +7719,16 @@ class Label extends FASTElement {
7711
7719
  toggleState(this.elementInternals, "disabled", next);
7712
7720
  }
7713
7721
  }
7714
- __decorateClass$h([attr], Label.prototype, "size", 2);
7715
- __decorateClass$h([attr], Label.prototype, "weight", 2);
7716
- __decorateClass$h([attr({
7722
+ __decorateClass$i([attr], Label.prototype, "size", 2);
7723
+ __decorateClass$i([attr], Label.prototype, "weight", 2);
7724
+ __decorateClass$i([attr({
7717
7725
  mode: "boolean"
7718
7726
  })], Label.prototype, "disabled", 2);
7719
- __decorateClass$h([attr({
7727
+ __decorateClass$i([attr({
7720
7728
  mode: "boolean"
7721
7729
  })], Label.prototype, "required", 2);
7722
7730
 
7723
- const styles$k = css`
7731
+ const styles$l = css`
7724
7732
  ${display("inline-flex")}
7725
7733
 
7726
7734
  :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(:is(${largeState},${semiboldState})){font-weight:${fontWeightSemibold}}:host(${disabledState}),:host(${disabledState}) .asterisk{color:${colorNeutralForegroundDisabled}}`;
@@ -7728,22 +7736,26 @@ const styles$k = css`
7728
7736
  function labelTemplate() {
7729
7737
  return html`<slot></slot><span part="asterisk" class="asterisk" ?hidden="${x => !x.required}">*</span>`;
7730
7738
  }
7731
- const template$l = labelTemplate();
7739
+ const template$m = labelTemplate();
7732
7740
 
7733
- const definition$l = Label.compose({
7741
+ const definition$m = Label.compose({
7734
7742
  name: `${FluentDesignSystem.prefix}-label`,
7735
- template: template$l,
7736
- styles: styles$k
7743
+ template: template$m,
7744
+ styles: styles$l
7737
7745
  });
7738
7746
 
7739
- definition$l.define(FluentDesignSystem.registry);
7747
+ definition$m.define(FluentDesignSystem.registry);
7740
7748
 
7741
- var __defProp$g = Object.defineProperty;
7742
- var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
7743
- var __decorateClass$g = (decorators, target, key, kind) => {
7744
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
7749
+ const LinkAppearance = {
7750
+ subtle: "subtle"
7751
+ };
7752
+
7753
+ var __defProp$h = Object.defineProperty;
7754
+ var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
7755
+ var __decorateClass$h = (decorators, target, key, kind) => {
7756
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
7745
7757
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7746
- if (kind && result) __defProp$g(target, key, result);
7758
+ if (kind && result) __defProp$h(target, key, result);
7747
7759
  return result;
7748
7760
  };
7749
7761
  class Link extends BaseAnchor {
@@ -7757,12 +7769,7 @@ class Link extends BaseAnchor {
7757
7769
  * @param next - the next state
7758
7770
  */
7759
7771
  appearanceChanged(prev, next) {
7760
- if (prev) {
7761
- toggleState(this.elementInternals, `${prev}`, false);
7762
- }
7763
- if (next) {
7764
- toggleState(this.elementInternals, `${next}`, true);
7765
- }
7772
+ swapStates(this.elementInternals, prev, next, LinkAppearance);
7766
7773
  }
7767
7774
  /**
7768
7775
  * Handles changes to inline attribute custom states
@@ -7773,12 +7780,12 @@ class Link extends BaseAnchor {
7773
7780
  toggleState(this.elementInternals, "inline", next);
7774
7781
  }
7775
7782
  }
7776
- __decorateClass$g([attr], Link.prototype, "appearance", 2);
7777
- __decorateClass$g([attr({
7783
+ __decorateClass$h([attr], Link.prototype, "appearance", 2);
7784
+ __decorateClass$h([attr({
7778
7785
  mode: "boolean"
7779
7786
  })], Link.prototype, "inline", 2);
7780
7787
 
7781
- const styles$j = css`
7788
+ const styles$k = css`
7782
7789
  ${display("inline")}
7783
7790
 
7784
7791
  :host{position:relative;box-sizing:border-box;background-color:transparent;color:${colorBrandForegroundLink};cursor:pointer;font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};overflow:inherit;text-align:start;text-decoration:none;text-decoration-thickness:${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(${inlineState}){font:inherit;text-decoration:underline}:host(:not([href])){color:inherit;text-decoration:none}::slotted(a){position:absolute;inset:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
@@ -7787,19 +7794,19 @@ const styles$j = css`
7787
7794
  function anchorTemplate() {
7788
7795
  return html`<template tabindex="0" @click="${(x, c) => x.clickHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><slot></slot></template>`;
7789
7796
  }
7790
- const template$k = anchorTemplate();
7797
+ const template$l = anchorTemplate();
7791
7798
 
7792
- const definition$k = Link.compose({
7799
+ const definition$l = Link.compose({
7793
7800
  name: `${FluentDesignSystem.prefix}-link`,
7794
- template: template$k,
7795
- styles: styles$j
7801
+ template: template$l,
7802
+ styles: styles$k
7796
7803
  });
7797
7804
 
7798
- definition$k.define(FluentDesignSystem.registry);
7805
+ definition$l.define(FluentDesignSystem.registry);
7799
7806
 
7800
7807
  class MenuButton extends Button {}
7801
7808
 
7802
- const template$j = buttonTemplate$1({
7809
+ const template$k = buttonTemplate$1({
7803
7810
  end: html.partial( /* html */
7804
7811
  `
7805
7812
  <svg slot="end" fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
@@ -7808,13 +7815,13 @@ const template$j = buttonTemplate$1({
7808
7815
  `)
7809
7816
  });
7810
7817
 
7811
- const definition$j = MenuButton.compose({
7818
+ const definition$k = MenuButton.compose({
7812
7819
  name: `${FluentDesignSystem.prefix}-menu-button`,
7813
- template: template$j,
7814
- styles: styles$y
7820
+ template: template$k,
7821
+ styles: styles$z
7815
7822
  });
7816
7823
 
7817
- definition$j.define(FluentDesignSystem.registry);
7824
+ definition$k.define(FluentDesignSystem.registry);
7818
7825
 
7819
7826
  const MenuItemRole = {
7820
7827
  /**
@@ -7836,12 +7843,12 @@ const MenuItemRole = {
7836
7843
  [MenuItemRole.menuitemradio]: "menuitemradio"
7837
7844
  });
7838
7845
 
7839
- var __defProp$f = Object.defineProperty;
7840
- var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
7841
- var __decorateClass$f = (decorators, target, key, kind) => {
7842
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
7846
+ var __defProp$g = Object.defineProperty;
7847
+ var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
7848
+ var __decorateClass$g = (decorators, target, key, kind) => {
7849
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
7843
7850
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
7844
- if (kind && result) __defProp$f(target, key, result);
7851
+ if (kind && result) __defProp$g(target, key, result);
7845
7852
  return result;
7846
7853
  };
7847
7854
  const menuFilter = () => value => value.nodeType === 1 && value.elementInternals.role === "menu";
@@ -8031,21 +8038,21 @@ class MenuItem extends FASTElement {
8031
8038
  this.elementInternals.ariaChecked = this.role !== MenuItemRole.menuitem ? `${!!this.checked}` : null;
8032
8039
  }
8033
8040
  }
8034
- __decorateClass$f([attr({
8041
+ __decorateClass$g([attr({
8035
8042
  mode: "boolean"
8036
8043
  })], MenuItem.prototype, "disabled", 2);
8037
- __decorateClass$f([attr], MenuItem.prototype, "role", 2);
8038
- __decorateClass$f([attr({
8044
+ __decorateClass$g([attr], MenuItem.prototype, "role", 2);
8045
+ __decorateClass$g([attr({
8039
8046
  mode: "boolean"
8040
8047
  })], MenuItem.prototype, "checked", 2);
8041
- __decorateClass$f([attr({
8048
+ __decorateClass$g([attr({
8042
8049
  mode: "boolean"
8043
8050
  })], MenuItem.prototype, "hidden", 2);
8044
- __decorateClass$f([observable], MenuItem.prototype, "slottedSubmenu", 2);
8045
- __decorateClass$f([observable], MenuItem.prototype, "submenu", 2);
8051
+ __decorateClass$g([observable], MenuItem.prototype, "slottedSubmenu", 2);
8052
+ __decorateClass$g([observable], MenuItem.prototype, "submenu", 2);
8046
8053
  applyMixins(MenuItem, StartEnd);
8047
8054
 
8048
- const styles$i = css`
8055
+ const styles$j = css`
8049
8056
  ${display("grid")}
8050
8057
 
8051
8058
  :host{--indent:0;align-items:center;background:${colorNeutralBackground1};border-radius:${borderRadiusMedium};color:${colorNeutralForeground2};contain:layout;cursor:pointer;flex-shrink:0;font:${fontWeightRegular} ${fontSizeBase300} / ${lineHeightBase300} ${fontFamilyBase};grid-gap:4px;grid-template-columns:20px 20px auto 20px;height:32px;overflow:visible;padding:0 10px}:host(:hover){background:${colorNeutralBackground1Hover};color:${colorNeutralForeground2Hover}}:host(:active){background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground2Pressed}}:host(:active) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Pressed}}:host(${disabledState}){background-color:${colorNeutralBackgroundDisabled};color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='start']),:host(${disabledState}) ::slotted([slot='end']){color:${colorNeutralForegroundDisabled}}:host(:focus-visible){border-radius:${borderRadiusMedium};outline:2px solid ${colorStrokeFocus2}}.content{white-space:nowrap;flex-grow:1;grid-column:auto / span 2;padding:0 2px}:host(:not(${checkedState})) .indicator,:host(:not(${checkedState})) ::slotted([slot='indicator']),:host(:not(${submenuState})) .submenu-glyph,:host(:not(${submenuState})) ::slotted([slot='submenu-glyph']){display:none}::slotted([slot='end']){color:${colorNeutralForeground3};font:${fontWeightRegular} ${fontSizeBase200} / ${lineHeightBase200} ${fontFamilyBase};white-space:nowrap}:host([data-indent='1']){--indent:1}:host([data-indent='2']){--indent:2;grid-template-columns:20px 20px auto auto}:host(${submenuState}){grid-template-columns:20px auto auto 20px}:host([data-indent='2']${submenuState}){grid-template-columns:20px 20px auto auto 20px}.indicator,::slotted([slot='indicator']){grid-column:1 / span 1;width:20px}::slotted([slot='start']){display:inline-flex;grid-column:calc(var(--indent)) / span 1}.content{grid-column:calc(var(--indent) + 1) / span 1}::slotted([slot='end']){grid-column:calc(var(--indent) + 2) / span 1;justify-self:end}.submenu-glyph,::slotted([slot='submenu-glyph']){grid-column:-2 / span 1;justify-self:end}@layer popover{:host{anchor-name:--menu-trigger;position:relative}::slotted([popover]){margin:0;max-height:var(--menu-max-height,auto);position:absolute;position-anchor:--menu-trigger;position-area:inline-end span-block-end;position-try-fallbacks:flip-inline;z-index:1}::slotted([popover]:not(:popover-open)){display:none}::slotted([popover]:popover-open){inset:unset}@supports not (anchor-name:--menu-trigger){::slotted([popover]){align-self:start}}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
@@ -8054,32 +8061,30 @@ const styles$i = css`
8054
8061
  const Checkmark16Filled = html.partial(`<svg class="indicator" fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.05 3.49c.28.3.27.77-.04 1.06l-7.93 7.47A.85.85 0 014.9 12L2.22 9.28a.75.75 0 111.06-1.06l2.24 2.27 7.47-7.04a.75.75 0 011.06.04z" fill="currentColor"></path></svg>`);
8055
8062
  const chevronRight16Filled = html.partial(`<svg class="submenu-glyph" fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.74 3.2a.75.75 0 00-.04 1.06L9.23 8 5.7 11.74a.75.75 0 101.1 1.02l4-4.25a.75.75 0 000-1.02l-4-4.25a.75.75 0 00-1.06-.04z" fill="currentColor"></path></svg>`);
8056
8063
  function menuItemTemplate(options = {}) {
8057
- return html`<template @keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}" @click="${(x, c) => x.handleMenuItemClick(c.event)}" @mouseover="${(x, c) => x.handleMouseOver(c.event)}" @mouseout="${(x, c) => x.handleMouseOut(c.event)}" @toggle="${(x, c) =>
8058
- // @ts-expect-error - Baseline 2024
8059
- x.toggleHandler(c.event)}"><slot name="indicator">${staticallyCompose(options.indicator)}</slot>${startSlotTemplate(options)}<div part="content" class="content"><slot></slot></div>${endSlotTemplate(options)}<slot name="submenu-glyph">${staticallyCompose(options.submenuGlyph)}</slot><slot name="submenu" ${slotted({
8064
+ return html`<template @keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}" @click="${(x, c) => x.handleMenuItemClick(c.event)}" @mouseover="${(x, c) => x.handleMouseOver(c.event)}" @mouseout="${(x, c) => x.handleMouseOut(c.event)}" @toggle="${(x, c) => x.toggleHandler(c.event)}"><slot name="indicator">${staticallyCompose(options.indicator)}</slot>${startSlotTemplate(options)}<div part="content" class="content"><slot></slot></div>${endSlotTemplate(options)}<slot name="submenu-glyph">${staticallyCompose(options.submenuGlyph)}</slot><slot name="submenu" ${slotted({
8060
8065
  property: "slottedSubmenu",
8061
8066
  filter: menuFilter()
8062
8067
  })}></slot></template>`;
8063
8068
  }
8064
- const template$i = menuItemTemplate({
8069
+ const template$j = menuItemTemplate({
8065
8070
  indicator: Checkmark16Filled,
8066
8071
  submenuGlyph: chevronRight16Filled
8067
8072
  });
8068
8073
 
8069
- const definition$i = MenuItem.compose({
8074
+ const definition$j = MenuItem.compose({
8070
8075
  name: `${FluentDesignSystem.prefix}-menu-item`,
8071
- template: template$i,
8072
- styles: styles$i
8076
+ template: template$j,
8077
+ styles: styles$j
8073
8078
  });
8074
8079
 
8075
- definition$i.define(FluentDesignSystem.registry);
8080
+ definition$j.define(FluentDesignSystem.registry);
8076
8081
 
8077
- var __defProp$e = Object.defineProperty;
8078
- var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
8079
- var __decorateClass$e = (decorators, target, key, kind) => {
8080
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
8082
+ var __defProp$f = Object.defineProperty;
8083
+ var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
8084
+ var __decorateClass$f = (decorators, target, key, kind) => {
8085
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
8081
8086
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8082
- if (kind && result) __defProp$e(target, key, result);
8087
+ if (kind && result) __defProp$f(target, key, result);
8083
8088
  return result;
8084
8089
  };
8085
8090
  const _MenuList = class _MenuList extends FASTElement {
@@ -8295,10 +8300,10 @@ const _MenuList = class _MenuList extends FASTElement {
8295
8300
  }
8296
8301
  };
8297
8302
  _MenuList.focusableElementRoles = MenuItemRole;
8298
- __decorateClass$e([observable], _MenuList.prototype, "items", 2);
8303
+ __decorateClass$f([observable], _MenuList.prototype, "items", 2);
8299
8304
  let MenuList = _MenuList;
8300
8305
 
8301
- const styles$h = css`
8306
+ const styles$i = css`
8302
8307
  ${display("flex")}
8303
8308
 
8304
8309
  :host{flex-direction:column;height:fit-content;max-width:300px;min-width:160px;width:auto;background-color:${colorNeutralBackground1};border:1px solid ${colorTransparentStroke};border-radius:${borderRadiusMedium};box-shadow:${shadow16};padding:4px;row-gap:2px}`;
@@ -8306,22 +8311,22 @@ const styles$h = css`
8306
8311
  function menuTemplate$1() {
8307
8312
  return html`<template slot="${x => x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0}" @keydown="${(x, c) => x.handleMenuKeyDown(c.event)}" @focusout="${(x, c) => x.handleFocusOut(c.event)}"><slot ${slotted("items")}></slot></template>`;
8308
8313
  }
8309
- const template$h = menuTemplate$1();
8314
+ const template$i = menuTemplate$1();
8310
8315
 
8311
- const definition$h = MenuList.compose({
8316
+ const definition$i = MenuList.compose({
8312
8317
  name: `${FluentDesignSystem.prefix}-menu-list`,
8313
- template: template$h,
8314
- styles: styles$h
8318
+ template: template$i,
8319
+ styles: styles$i
8315
8320
  });
8316
8321
 
8317
- definition$h.define(FluentDesignSystem.registry);
8322
+ definition$i.define(FluentDesignSystem.registry);
8318
8323
 
8319
- var __defProp$d = Object.defineProperty;
8320
- var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
8321
- var __decorateClass$d = (decorators, target, key, kind) => {
8322
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
8324
+ var __defProp$e = Object.defineProperty;
8325
+ var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
8326
+ var __decorateClass$e = (decorators, target, key, kind) => {
8327
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
8323
8328
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8324
- if (kind && result) __defProp$d(target, key, result);
8329
+ if (kind && result) __defProp$e(target, key, result);
8325
8330
  return result;
8326
8331
  };
8327
8332
  class Menu extends FASTElement {
@@ -8601,30 +8606,30 @@ class Menu extends FASTElement {
8601
8606
  }
8602
8607
  }
8603
8608
  }
8604
- __decorateClass$d([attr({
8609
+ __decorateClass$e([attr({
8605
8610
  attribute: "open-on-hover",
8606
8611
  mode: "boolean"
8607
8612
  })], Menu.prototype, "openOnHover", 2);
8608
- __decorateClass$d([attr({
8613
+ __decorateClass$e([attr({
8609
8614
  attribute: "open-on-context",
8610
8615
  mode: "boolean"
8611
8616
  })], Menu.prototype, "openOnContext", 2);
8612
- __decorateClass$d([attr({
8617
+ __decorateClass$e([attr({
8613
8618
  attribute: "close-on-scroll",
8614
8619
  mode: "boolean"
8615
8620
  })], Menu.prototype, "closeOnScroll", 2);
8616
- __decorateClass$d([attr({
8621
+ __decorateClass$e([attr({
8617
8622
  attribute: "persist-on-item-click",
8618
8623
  mode: "boolean"
8619
8624
  })], Menu.prototype, "persistOnItemClick", 2);
8620
- __decorateClass$d([attr({
8625
+ __decorateClass$e([attr({
8621
8626
  mode: "boolean"
8622
8627
  })], Menu.prototype, "split", 2);
8623
- __decorateClass$d([observable], Menu.prototype, "slottedMenuList", 2);
8624
- __decorateClass$d([observable], Menu.prototype, "slottedTriggers", 2);
8625
- __decorateClass$d([observable], Menu.prototype, "primaryAction", 2);
8628
+ __decorateClass$e([observable], Menu.prototype, "slottedMenuList", 2);
8629
+ __decorateClass$e([observable], Menu.prototype, "slottedTriggers", 2);
8630
+ __decorateClass$e([observable], Menu.prototype, "primaryAction", 2);
8626
8631
 
8627
- const styles$g = css`
8632
+ const styles$h = css`
8628
8633
  ${display("inline-block")}
8629
8634
 
8630
8635
  ::slotted([slot='trigger']){anchor-name:--menu-trigger}::slotted([popover]){margin:0;max-height:var(--menu-max-height,auto);position-anchor:--menu-trigger;position-area:block-end span-inline-end;position-try-fallbacks:flip-block;position:absolute;z-index:1}:host([split]) ::slotted([popover]){position-area:block-end span-inline-start}::slotted([popover]:popover-open){inset:unset}::slotted([popover]:not(:popover-open)){display:none}:host([split]){display:inline-flex}:host([split]) ::slotted([slot='primary-action']){border-inline-end:${strokeWidthThin} solid ${colorNeutralStroke1};border-start-end-radius:0;border-end-end-radius:0}:host([split]) ::slotted([slot='primary-action']:focus-visible){z-index:1}:host([split]) ::slotted([slot='primary-action'][appearance='primary']){border-inline-end:${strokeWidthThin} solid white}:host([split]) ::slotted([slot='trigger']){border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0}`;
@@ -8638,22 +8643,37 @@ function menuTemplate() {
8638
8643
  filter: elements()
8639
8644
  })}></slot></template>`;
8640
8645
  }
8641
- const template$g = menuTemplate();
8646
+ const template$h = menuTemplate();
8642
8647
 
8643
- const definition$g = Menu.compose({
8648
+ const definition$h = Menu.compose({
8644
8649
  name: `${FluentDesignSystem.prefix}-menu`,
8645
- template: template$g,
8646
- styles: styles$g
8650
+ template: template$h,
8651
+ styles: styles$h
8647
8652
  });
8648
8653
 
8649
- definition$g.define(FluentDesignSystem.registry);
8654
+ definition$h.define(FluentDesignSystem.registry);
8650
8655
 
8651
- var __defProp$c = Object.defineProperty;
8652
- var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
8653
- var __decorateClass$c = (decorators, target, key, kind) => {
8654
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
8656
+ const MessageBarLayout = {
8657
+ multiline: "multiline",
8658
+ singleline: "singleline"
8659
+ };
8660
+ const MessageBarShape = {
8661
+ rounded: "rounded",
8662
+ square: "square"
8663
+ };
8664
+ const MessageBarIntent = {
8665
+ success: "success",
8666
+ warning: "warning",
8667
+ error: "error",
8668
+ info: "info"
8669
+ };
8670
+
8671
+ var __defProp$d = Object.defineProperty;
8672
+ var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
8673
+ var __decorateClass$d = (decorators, target, key, kind) => {
8674
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
8655
8675
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8656
- if (kind && result) __defProp$c(target, key, result);
8676
+ if (kind && result) __defProp$d(target, key, result);
8657
8677
  return result;
8658
8678
  };
8659
8679
  class MessageBar extends FASTElement {
@@ -8680,25 +8700,15 @@ class MessageBar extends FASTElement {
8680
8700
  * @param next - the next state
8681
8701
  */
8682
8702
  shapeChanged(prev, next) {
8683
- if (prev) {
8684
- toggleState(this.elementInternals, prev, false);
8685
- }
8686
- if (next) {
8687
- toggleState(this.elementInternals, next, true);
8688
- }
8703
+ swapStates(this.elementInternals, prev, next, MessageBarShape);
8689
8704
  }
8690
8705
  /**
8691
8706
  * Handles changes to the layout attribute custom states
8692
8707
  * @param prev - the previous state
8693
8708
  * @param next - the next state
8694
- */
8695
- layoutChanged(prev, next) {
8696
- if (prev) {
8697
- toggleState(this.elementInternals, prev, false);
8698
- }
8699
- if (next) {
8700
- toggleState(this.elementInternals, next, true);
8701
- }
8709
+ */
8710
+ layoutChanged(prev, next) {
8711
+ swapStates(this.elementInternals, prev, next, MessageBarLayout);
8702
8712
  }
8703
8713
  /**
8704
8714
  * Handles changes to the intent attribute custom states
@@ -8706,44 +8716,53 @@ class MessageBar extends FASTElement {
8706
8716
  * @param next - the next state
8707
8717
  */
8708
8718
  intentChanged(prev, next) {
8709
- if (prev) {
8710
- toggleState(this.elementInternals, prev, false);
8711
- }
8712
- if (next) {
8713
- toggleState(this.elementInternals, next, true);
8714
- }
8719
+ swapStates(this.elementInternals, prev, next, MessageBarIntent);
8715
8720
  }
8716
8721
  }
8717
- __decorateClass$c([attr], MessageBar.prototype, "shape", 2);
8718
- __decorateClass$c([attr], MessageBar.prototype, "layout", 2);
8719
- __decorateClass$c([attr], MessageBar.prototype, "intent", 2);
8722
+ __decorateClass$d([attr], MessageBar.prototype, "shape", 2);
8723
+ __decorateClass$d([attr], MessageBar.prototype, "layout", 2);
8724
+ __decorateClass$d([attr], MessageBar.prototype, "intent", 2);
8720
8725
 
8721
- const styles$f = css`
8726
+ const styles$g = css`
8722
8727
  :host{display:grid;box-sizing:border-box;font-family:${fontFamilyBase};font-size:${fontSizeBase200};line-height:${lineHeightBase200};width:100%;background:${colorNeutralBackground3};border:1px solid ${colorNeutralStroke1};padding-inline:${spacingHorizontalM};border-radius:${borderRadiusMedium};min-height:36px;align-items:center;grid-template:'icon body actions dismiss' / auto 1fr auto auto;contain:layout style paint}:host(${squareState}){border-radius:0}:host(${successState}){background-color:${colorPaletteGreenBackground1};border-color:${colorPaletteGreenBorder1}}:host(${warningState}){background-color:${colorPaletteDarkOrangeBackground1};border-color:${colorPaletteDarkOrangeBorder1}}:host(${errorState}){background-color:${colorPaletteRedBackground1};border-color:${colorPaletteRedBorder1}}:host(${multiLineState}){grid-template-areas:'icon body dismiss'
8723
8728
  'actions actions actions';grid-template-columns:auto 1fr auto;grid-template-rows:auto auto 1fr;padding-block:${spacingVerticalMNudge};padding-inline:${spacingHorizontalM}}.content{grid-area:body;max-width:520px;padding-block:${spacingVerticalMNudge};padding-inline:0}:host(${multiLineState}) .content{padding:0}::slotted([slot='icon']){display:flex;grid-area:icon;flex-direction:column;align-items:center;color:${colorNeutralForeground3};margin-inline-end:${spacingHorizontalS}}:host(${multiLineState}) ::slotted([slot='icon']){align-items:start;height:100%}::slotted([slot='dismiss']){grid-area:dismiss}.actions{grid-area:actions;display:flex;justify-self:end;margin-inline-end:${spacingHorizontalS};gap:${spacingHorizontalS}}:host(${multiLineState}) .actions{margin-block-start:${spacingVerticalMNudge};margin-inline-end:0}:host(${multiLineState}) ::slotted([slot='dismiss']){align-items:start;height:100%;padding-block-start:${spacingVerticalS}}::slotted(*){font-size:inherit}`;
8724
8729
 
8725
8730
  function messageBarTemplate() {
8726
8731
  return html`<slot name="icon"></slot><div class="content"><slot></slot></div><div class="actions"><slot name="actions"></slot></div><slot name="dismiss"></slot>`;
8727
8732
  }
8728
- const template$f = messageBarTemplate();
8733
+ const template$g = messageBarTemplate();
8729
8734
 
8730
- const definition$f = MessageBar.compose({
8735
+ const definition$g = MessageBar.compose({
8731
8736
  name: `${FluentDesignSystem.prefix}-message-bar`,
8732
- template: template$f,
8733
- styles: styles$f,
8737
+ template: template$g,
8738
+ styles: styles$g,
8734
8739
  shadowOptions: {
8735
8740
  mode: FluentDesignSystem.shadowRootMode
8736
8741
  }
8737
8742
  });
8738
8743
 
8739
- definition$f.define(FluentDesignSystem.registry);
8744
+ definition$g.define(FluentDesignSystem.registry);
8740
8745
 
8741
- var __defProp$b = Object.defineProperty;
8742
- var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
8743
- var __decorateClass$b = (decorators, target, key, kind) => {
8744
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
8746
+ const ProgressBarThickness = {
8747
+ medium: "medium",
8748
+ large: "large"
8749
+ };
8750
+ const ProgressBarShape = {
8751
+ rounded: "rounded",
8752
+ square: "square"
8753
+ };
8754
+ const ProgressBarValidationState = {
8755
+ success: "success",
8756
+ warning: "warning",
8757
+ error: "error"
8758
+ };
8759
+
8760
+ var __defProp$c = Object.defineProperty;
8761
+ var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
8762
+ var __decorateClass$c = (decorators, target, key, kind) => {
8763
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
8745
8764
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8746
- if (kind && result) __defProp$b(target, key, result);
8765
+ if (kind && result) __defProp$c(target, key, result);
8747
8766
  return result;
8748
8767
  };
8749
8768
  class BaseProgressBar extends FASTElement {
@@ -8764,12 +8783,7 @@ class BaseProgressBar extends FASTElement {
8764
8783
  * @param next - the next state
8765
8784
  */
8766
8785
  validationStateChanged(prev, next) {
8767
- if (prev) {
8768
- toggleState(this.elementInternals, `${prev}`, false);
8769
- }
8770
- if (next) {
8771
- toggleState(this.elementInternals, `${next}`, true);
8772
- }
8786
+ swapStates(this.elementInternals, prev, next, ProgressBarValidationState);
8773
8787
  }
8774
8788
  /**
8775
8789
  * Updates the percent complete when the `value` property changes.
@@ -8806,19 +8820,19 @@ class BaseProgressBar extends FASTElement {
8806
8820
  return range === 0 ? 0 : Math.fround((value - min) / range * 100);
8807
8821
  }
8808
8822
  }
8809
- __decorateClass$b([attr({
8823
+ __decorateClass$c([attr({
8810
8824
  attribute: "validation-state"
8811
8825
  })], BaseProgressBar.prototype, "validationState", 2);
8812
- __decorateClass$b([attr({
8826
+ __decorateClass$c([attr({
8813
8827
  converter: nullableNumberConverter
8814
8828
  })], BaseProgressBar.prototype, "value", 2);
8815
- __decorateClass$b([attr({
8829
+ __decorateClass$c([attr({
8816
8830
  converter: nullableNumberConverter
8817
8831
  })], BaseProgressBar.prototype, "min", 2);
8818
- __decorateClass$b([attr({
8832
+ __decorateClass$c([attr({
8819
8833
  converter: nullableNumberConverter
8820
8834
  })], BaseProgressBar.prototype, "max", 2);
8821
- __decorateClass$b([volatile], BaseProgressBar.prototype, "percentComplete", 1);
8835
+ __decorateClass$c([volatile], BaseProgressBar.prototype, "percentComplete", 1);
8822
8836
  class ProgressBar extends BaseProgressBar {
8823
8837
  /**
8824
8838
  * Handles changes to thickness attribute custom states
@@ -8826,12 +8840,7 @@ class ProgressBar extends BaseProgressBar {
8826
8840
  * @param next - the next state
8827
8841
  */
8828
8842
  thicknessChanged(prev, next) {
8829
- if (prev) {
8830
- toggleState(this.elementInternals, `${prev}`, false);
8831
- }
8832
- if (next) {
8833
- toggleState(this.elementInternals, `${next}`, true);
8834
- }
8843
+ swapStates(this.elementInternals, prev, next, ProgressBarThickness);
8835
8844
  }
8836
8845
  /**
8837
8846
  * Handles changes to shape attribute custom states
@@ -8839,18 +8848,13 @@ class ProgressBar extends BaseProgressBar {
8839
8848
  * @param next - the next state
8840
8849
  */
8841
8850
  shapeChanged(prev, next) {
8842
- if (prev) {
8843
- toggleState(this.elementInternals, `${prev}`, false);
8844
- }
8845
- if (next) {
8846
- toggleState(this.elementInternals, `${next}`, true);
8847
- }
8851
+ swapStates(this.elementInternals, prev, next, ProgressBarShape);
8848
8852
  }
8849
8853
  }
8850
- __decorateClass$b([attr], ProgressBar.prototype, "thickness", 2);
8851
- __decorateClass$b([attr], ProgressBar.prototype, "shape", 2);
8854
+ __decorateClass$c([attr], ProgressBar.prototype, "thickness", 2);
8855
+ __decorateClass$c([attr], ProgressBar.prototype, "shape", 2);
8852
8856
 
8853
- const styles$e = css`
8857
+ const styles$f = css`
8854
8858
  ${display("block")}
8855
8859
 
8856
8860
  :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(
@@ -8861,15 +8865,15 @@ const styles$e = css`
8861
8865
  function progressTemplate() {
8862
8866
  return html`<div class="indicator" part="indicator" style="${x => typeof x.value === "number" ? `width: ${x.percentComplete}%` : void 0}"></div>`;
8863
8867
  }
8864
- const template$e = progressTemplate();
8868
+ const template$f = progressTemplate();
8865
8869
 
8866
- const definition$e = ProgressBar.compose({
8870
+ const definition$f = ProgressBar.compose({
8867
8871
  name: `${FluentDesignSystem.prefix}-progress-bar`,
8868
- template: template$e,
8869
- styles: styles$e
8872
+ template: template$f,
8873
+ styles: styles$f
8870
8874
  });
8871
8875
 
8872
- definition$e.define(FluentDesignSystem.registry);
8876
+ definition$f.define(FluentDesignSystem.registry);
8873
8877
 
8874
8878
  class Radio extends BaseCheckbox {
8875
8879
  connectedCallback() {
@@ -8955,12 +8959,12 @@ function getRootActiveElement(element) {
8955
8959
 
8956
8960
  const RadioGroupOrientation = Orientation;
8957
8961
 
8958
- var __defProp$a = Object.defineProperty;
8959
- var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
8960
- var __decorateClass$a = (decorators, target, key, kind) => {
8961
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
8962
+ var __defProp$b = Object.defineProperty;
8963
+ var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
8964
+ var __decorateClass$b = (decorators, target, key, kind) => {
8965
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
8962
8966
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8963
- if (kind && result) __defProp$a(target, key, result);
8967
+ if (kind && result) __defProp$b(target, key, result);
8964
8968
  return result;
8965
8969
  };
8966
8970
  class RadioGroup extends FASTElement {
@@ -9383,23 +9387,23 @@ class RadioGroup extends FASTElement {
9383
9387
  * @public
9384
9388
  */
9385
9389
  RadioGroup.formAssociated = true;
9386
- __decorateClass$a([observable], RadioGroup.prototype, "checkedIndex", 2);
9387
- __decorateClass$a([attr({
9390
+ __decorateClass$b([observable], RadioGroup.prototype, "checkedIndex", 2);
9391
+ __decorateClass$b([attr({
9388
9392
  attribute: "disabled",
9389
9393
  mode: "boolean"
9390
9394
  })], RadioGroup.prototype, "disabled", 2);
9391
- __decorateClass$a([attr({
9395
+ __decorateClass$b([attr({
9392
9396
  attribute: "value",
9393
9397
  mode: "fromView"
9394
9398
  })], RadioGroup.prototype, "initialValue", 2);
9395
- __decorateClass$a([attr], RadioGroup.prototype, "name", 2);
9396
- __decorateClass$a([attr], RadioGroup.prototype, "orientation", 2);
9397
- __decorateClass$a([observable], RadioGroup.prototype, "radios", 2);
9398
- __decorateClass$a([attr({
9399
+ __decorateClass$b([attr], RadioGroup.prototype, "name", 2);
9400
+ __decorateClass$b([attr], RadioGroup.prototype, "orientation", 2);
9401
+ __decorateClass$b([observable], RadioGroup.prototype, "radios", 2);
9402
+ __decorateClass$b([attr({
9399
9403
  mode: "boolean"
9400
9404
  })], RadioGroup.prototype, "required", 2);
9401
9405
 
9402
- const styles$d = css`
9406
+ const styles$e = css`
9403
9407
  ${display("flex")}
9404
9408
 
9405
9409
  :host{-webkit-tap-highlight-color:transparent;cursor:pointer;gap:${spacingVerticalL}}:host(${disabledState}),:host([orientation='vertical']){flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']){flex-direction:row}::slotted(*){color:${colorNeutralForeground3}}::slotted(:hover){color:${colorNeutralForeground2}}::slotted(:active){color:${colorNeutralForeground1}}::slotted(${disabledState}){color:${colorNeutralForegroundDisabled}}::slotted(${checkedState}){color:${colorNeutralForeground1}}`;
@@ -9407,17 +9411,17 @@ const styles$d = css`
9407
9411
  function radioGroupTemplate() {
9408
9412
  return html`<template @disabled="${(x, c) => x.disabledRadioHandler(c.event)}" @change="${(x, c) => x.changeHandler(c.event)}" @click="${(x, c) => x.clickHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><slot @slotchange="${(x, c) => x.slotchangeHandler(c.event)}"></slot></template>`;
9409
9413
  }
9410
- const template$d = radioGroupTemplate();
9414
+ const template$e = radioGroupTemplate();
9411
9415
 
9412
- const definition$d = RadioGroup.compose({
9416
+ const definition$e = RadioGroup.compose({
9413
9417
  name: `${FluentDesignSystem.prefix}-radio-group`,
9414
- template: template$d,
9415
- styles: styles$d
9418
+ template: template$e,
9419
+ styles: styles$e
9416
9420
  });
9417
9421
 
9418
- definition$d.define(FluentDesignSystem.registry);
9422
+ definition$e.define(FluentDesignSystem.registry);
9419
9423
 
9420
- const styles$c = css`
9424
+ const styles$d = css`
9421
9425
  ${display("inline-flex")}
9422
9426
 
9423
9427
  :host{--size:16px;aspect-ratio:1;background-color:${colorNeutralBackground1};border:${strokeWidthThin} solid ${colorNeutralStrokeAccessible};border-radius:${borderRadiusCircular};box-sizing:border-box;position:relative;width:var(--size)}:host([size='large']){--size:20px}.checked-indicator{aspect-ratio:1;border-radius:${borderRadiusCircular};color:${colorNeutralForegroundInverted};inset:0;margin:auto;position:absolute;width:calc(var(--size) * 0.625)}:host(:not([slot='input']))::after{content:'' / '';position:absolute;display:block;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}}:host(:hover){border-color:${colorNeutralStrokeAccessibleHover}}:host(${checkedState}){border-color:${colorCompoundBrandStroke}}:host(${checkedState}) .checked-indicator{background-color:${colorCompoundBrandBackground}}:host(${checkedState}:hover) .checked-indicator{background-color:${colorCompoundBrandBackgroundHover}}:host(:active){border-color:${colorNeutralStrokeAccessiblePressed}}:host(${checkedState}:active) .checked-indicator{background-color:${colorCompoundBrandBackgroundPressed}}:host(:focus-visible){outline:none}:host(${disabledState}){background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}:host(${checkedState}${disabledState}) .checked-indicator{background-color:${colorNeutralStrokeDisabled}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
@@ -9430,24 +9434,35 @@ const checkedIndicator = html.partial( /* html */
9430
9434
  function radioTemplate(options = {}) {
9431
9435
  return html`<template @click="${(x, c) => x.clickHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" @keyup="${(x, c) => x.keyupHandler(c.event)}"><slot name="checked-indicator">${staticallyCompose(options.checkedIndicator)}</slot></template>`;
9432
9436
  }
9433
- const template$c = radioTemplate({
9437
+ const template$d = radioTemplate({
9434
9438
  checkedIndicator
9435
9439
  });
9436
9440
 
9437
- const definition$c = Radio.compose({
9441
+ const definition$d = Radio.compose({
9438
9442
  name: `${FluentDesignSystem.prefix}-radio`,
9439
- template: template$c,
9440
- styles: styles$c
9443
+ template: template$d,
9444
+ styles: styles$d
9441
9445
  });
9442
9446
 
9443
- definition$c.define(FluentDesignSystem.registry);
9447
+ definition$d.define(FluentDesignSystem.registry);
9444
9448
 
9445
- var __defProp$9 = Object.defineProperty;
9446
- var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
9447
- var __decorateClass$9 = (decorators, target, key, kind) => {
9448
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
9449
+ const RatingDisplayColor = {
9450
+ neutral: "neutral",
9451
+ brand: "brand",
9452
+ marigold: "marigold"
9453
+ };
9454
+ const RatingDisplaySize = {
9455
+ small: "small",
9456
+ medium: "medium",
9457
+ large: "large"
9458
+ };
9459
+
9460
+ var __defProp$a = Object.defineProperty;
9461
+ var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
9462
+ var __decorateClass$a = (decorators, target, key, kind) => {
9463
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
9449
9464
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9450
- if (kind && result) __defProp$9(target, key, result);
9465
+ if (kind && result) __defProp$a(target, key, result);
9451
9466
  return result;
9452
9467
  };
9453
9468
  class BaseRatingDisplay extends FASTElement {
@@ -9513,20 +9528,20 @@ class BaseRatingDisplay extends FASTElement {
9513
9528
  return htmlString;
9514
9529
  }
9515
9530
  }
9516
- __decorateClass$9([attr({
9531
+ __decorateClass$a([attr({
9517
9532
  converter: nullableNumberConverter
9518
9533
  })], BaseRatingDisplay.prototype, "count", 2);
9519
- __decorateClass$9([attr({
9534
+ __decorateClass$a([attr({
9520
9535
  attribute: "icon-view-box"
9521
9536
  })], BaseRatingDisplay.prototype, "iconViewBox", 2);
9522
- __decorateClass$9([attr({
9537
+ __decorateClass$a([attr({
9523
9538
  converter: nullableNumberConverter
9524
9539
  })], BaseRatingDisplay.prototype, "max", 2);
9525
- __decorateClass$9([attr({
9540
+ __decorateClass$a([attr({
9526
9541
  converter: nullableNumberConverter
9527
9542
  })], BaseRatingDisplay.prototype, "value", 2);
9528
- __decorateClass$9([observable], BaseRatingDisplay.prototype, "slottedIcon", 2);
9529
- __decorateClass$9([observable], BaseRatingDisplay.prototype, "customIcon", 2);
9543
+ __decorateClass$a([observable], BaseRatingDisplay.prototype, "slottedIcon", 2);
9544
+ __decorateClass$a([observable], BaseRatingDisplay.prototype, "customIcon", 2);
9530
9545
  class RatingDisplay extends BaseRatingDisplay {
9531
9546
  constructor() {
9532
9547
  super(...arguments);
@@ -9539,8 +9554,7 @@ class RatingDisplay extends BaseRatingDisplay {
9539
9554
  * @param next - The next state
9540
9555
  */
9541
9556
  colorChanged(prev, next) {
9542
- if (prev) toggleState(this.elementInternals, prev, false);
9543
- if (next) toggleState(this.elementInternals, next, true);
9557
+ swapStates(this.elementInternals, prev, next, RatingDisplayColor);
9544
9558
  }
9545
9559
  /**
9546
9560
  * Handles changes to the size attribute.
@@ -9549,8 +9563,7 @@ class RatingDisplay extends BaseRatingDisplay {
9549
9563
  * @param next - The next state
9550
9564
  */
9551
9565
  sizeChanged(prev, next) {
9552
- if (prev) toggleState(this.elementInternals, prev, false);
9553
- if (next) toggleState(this.elementInternals, next, true);
9566
+ swapStates(this.elementInternals, prev, next, RatingDisplaySize);
9554
9567
  }
9555
9568
  /**
9556
9569
  * Overrides the selected value and returns 1 if compact is true.
@@ -9569,13 +9582,13 @@ class RatingDisplay extends BaseRatingDisplay {
9569
9582
  return (this.compact ? 1 : this.max ?? 5) * 2;
9570
9583
  }
9571
9584
  }
9572
- __decorateClass$9([attr], RatingDisplay.prototype, "color", 2);
9573
- __decorateClass$9([attr], RatingDisplay.prototype, "size", 2);
9574
- __decorateClass$9([attr({
9585
+ __decorateClass$a([attr], RatingDisplay.prototype, "color", 2);
9586
+ __decorateClass$a([attr], RatingDisplay.prototype, "size", 2);
9587
+ __decorateClass$a([attr({
9575
9588
  mode: "boolean"
9576
9589
  })], RatingDisplay.prototype, "compact", 2);
9577
9590
 
9578
- const styles$b = css`
9591
+ const styles$c = css`
9579
9592
  ${display("inline-flex")}
9580
9593
 
9581
9594
  :host{--icon-size:16px;--icon-color-filled:${colorPaletteMarigoldBackground3};--icon-color-empty:${colorPaletteMarigoldBackground2};align-items:center;color:${colorNeutralForeground1};font-family:${fontFamilyBase};font-size:${fontSizeBase200};line-height:${lineHeightBase200};contain:layout style;user-select:none}:host(${smallState}){--icon-size:12px}:host(${largeState}){--icon-size:20px;font-size:${fontSizeBase300};line-height:${lineHeightBase300}}::slotted([slot='icon']){display:none}svg{width:var(--icon-size);height:var(--icon-size);fill:var(--icon-color-filled);margin-inline-end:${spacingHorizontalXXS}}svg:nth-child(odd){clip-path:inset(0 50% 0 0);margin-inline-end:calc(0px - var(--icon-size))}:host(${neutralState}) svg{--icon-color-filled:${colorNeutralForeground1}}:host(${brandState}) svg{--icon-color-filled:${colorBrandBackground}}:host(:is([value^='-'],[value='0'])) svg,:host(:not([value])) svg,svg[selected] ~ svg{fill:var(--icon-color-empty)}:host(${neutralState}:is([value^='-'],[value='0'])) svg,:host(${neutralState}:not([value])) svg,:host(${neutralState}) svg[selected] ~ svg{--icon-color-empty:${colorNeutralBackground1Pressed}}:host(${brandState}:is([value^='-'],[value='0'])) svg,:host(${brandState}:not([value])) svg,:host(${brandState}) svg[selected] ~ svg{--icon-color-empty:${colorBrandStroke2}}.value-label,::slotted([slot='value']){display:block;margin-inline-start:${spacingHorizontalXS};font-weight:${fontWeightSemibold}}:host(${smallState}) .value-label,:host(${smallState}) ::slotted([slot='value']){margin-inline-start:${spacingHorizontalXXS}}:host(${largeState}) .value-label,:host(${largeState}) ::slotted([slot='value']){margin-inline-start:${spacingHorizontalSNudge}}:host(:not([count])) .count-label{display:none}.count-label::before,::slotted([slot='count'])::before{content:'·';margin-inline:${spacingHorizontalXS}}:host(${smallState}) .count-label::before,:host(${smallState}) ::slotted([slot='count'])::before{margin-inline:${spacingHorizontalXXS}}:host(${largeState}) .count-label::before,:host(${largeState}) ::slotted([slot='count'])::before{margin-inline:${spacingHorizontalSNudge}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
@@ -9588,16 +9601,20 @@ function ratingDisplayTemplate() {
9588
9601
  filter: elements("svg")
9589
9602
  })}>${star}</slot><slot name="value"><span class="value-label" aria-hidden="true">${x => x.value}</span></slot><slot name="count"><span class="count-label" aria-hidden="true">${x => x.formattedCount}</span></slot>`;
9590
9603
  }
9591
- const template$b = ratingDisplayTemplate();
9604
+ const template$c = ratingDisplayTemplate();
9592
9605
 
9593
- const definition$b = RatingDisplay.compose({
9606
+ const definition$c = RatingDisplay.compose({
9594
9607
  name: `${FluentDesignSystem.prefix}-rating-display`,
9595
- template: template$b,
9596
- styles: styles$b
9608
+ template: template$c,
9609
+ styles: styles$c
9597
9610
  });
9598
9611
 
9599
- definition$b.define(FluentDesignSystem.registry);
9612
+ definition$c.define(FluentDesignSystem.registry);
9600
9613
 
9614
+ const SliderSize = {
9615
+ small: "small",
9616
+ medium: "medium"
9617
+ };
9601
9618
  const SliderOrientation = Orientation;
9602
9619
  const SliderMode = {
9603
9620
  singleValue: "single-value"
@@ -9611,12 +9628,12 @@ function convertPixelToPercent(pixelPos, minPosition, maxPosition, direction) {
9611
9628
  return pct;
9612
9629
  }
9613
9630
 
9614
- var __defProp$8 = Object.defineProperty;
9615
- var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
9616
- var __decorateClass$8 = (decorators, target, key, kind) => {
9617
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
9631
+ var __defProp$9 = Object.defineProperty;
9632
+ var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
9633
+ var __decorateClass$9 = (decorators, target, key, kind) => {
9634
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
9618
9635
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9619
- if (kind && result) __defProp$8(target, key, result);
9636
+ if (kind && result) __defProp$9(target, key, result);
9620
9637
  return result;
9621
9638
  };
9622
9639
  class Slider extends FASTElement {
@@ -9755,12 +9772,7 @@ class Slider extends FASTElement {
9755
9772
  return Object.freeze(Array.from(this.elementInternals.labels));
9756
9773
  }
9757
9774
  sizeChanged(prev, next) {
9758
- if (prev) {
9759
- toggleState(this.elementInternals, `${prev}`, false);
9760
- }
9761
- if (next) {
9762
- toggleState(this.elementInternals, `${next}`, true);
9763
- }
9775
+ swapStates(this.elementInternals, prev, next, SliderSize);
9764
9776
  }
9765
9777
  handleChange(_, propertyName) {
9766
9778
  switch (propertyName) {
@@ -10021,12 +10033,7 @@ class Slider extends FASTElement {
10021
10033
  }
10022
10034
  orientationChanged(prev, next) {
10023
10035
  this.elementInternals.ariaOrientation = next ?? Orientation.horizontal;
10024
- if (prev) {
10025
- toggleState(this.elementInternals, `${prev}`, false);
10026
- }
10027
- if (next) {
10028
- toggleState(this.elementInternals, `${next}`, true);
10029
- }
10036
+ swapStates(this.elementInternals, prev, next, Orientation);
10030
10037
  if (this.$fastController.isConnected) {
10031
10038
  this.setSliderPosition(this.direction);
10032
10039
  }
@@ -10155,36 +10162,36 @@ class Slider extends FASTElement {
10155
10162
  * @public
10156
10163
  */
10157
10164
  Slider.formAssociated = true;
10158
- __decorateClass$8([attr], Slider.prototype, "size", 2);
10159
- __decorateClass$8([attr({
10165
+ __decorateClass$9([attr], Slider.prototype, "size", 2);
10166
+ __decorateClass$9([attr({
10160
10167
  attribute: "value",
10161
10168
  mode: "fromView"
10162
10169
  })], Slider.prototype, "initialValue", 2);
10163
- __decorateClass$8([observable], Slider.prototype, "direction", 2);
10164
- __decorateClass$8([observable], Slider.prototype, "isDragging", 2);
10165
- __decorateClass$8([observable], Slider.prototype, "position", 2);
10166
- __decorateClass$8([observable], Slider.prototype, "trackWidth", 2);
10167
- __decorateClass$8([observable], Slider.prototype, "trackMinWidth", 2);
10168
- __decorateClass$8([observable], Slider.prototype, "trackHeight", 2);
10169
- __decorateClass$8([observable], Slider.prototype, "trackLeft", 2);
10170
- __decorateClass$8([observable], Slider.prototype, "trackMinHeight", 2);
10171
- __decorateClass$8([observable], Slider.prototype, "valueTextFormatter", 2);
10172
- __decorateClass$8([attr({
10170
+ __decorateClass$9([observable], Slider.prototype, "direction", 2);
10171
+ __decorateClass$9([observable], Slider.prototype, "isDragging", 2);
10172
+ __decorateClass$9([observable], Slider.prototype, "position", 2);
10173
+ __decorateClass$9([observable], Slider.prototype, "trackWidth", 2);
10174
+ __decorateClass$9([observable], Slider.prototype, "trackMinWidth", 2);
10175
+ __decorateClass$9([observable], Slider.prototype, "trackHeight", 2);
10176
+ __decorateClass$9([observable], Slider.prototype, "trackLeft", 2);
10177
+ __decorateClass$9([observable], Slider.prototype, "trackMinHeight", 2);
10178
+ __decorateClass$9([observable], Slider.prototype, "valueTextFormatter", 2);
10179
+ __decorateClass$9([attr({
10173
10180
  mode: "boolean"
10174
10181
  })], Slider.prototype, "disabled", 2);
10175
- __decorateClass$8([attr({
10182
+ __decorateClass$9([attr({
10176
10183
  converter: numberLikeStringConverter
10177
10184
  })], Slider.prototype, "min", 2);
10178
- __decorateClass$8([attr({
10185
+ __decorateClass$9([attr({
10179
10186
  converter: numberLikeStringConverter
10180
10187
  })], Slider.prototype, "max", 2);
10181
- __decorateClass$8([attr({
10188
+ __decorateClass$9([attr({
10182
10189
  converter: numberLikeStringConverter
10183
10190
  })], Slider.prototype, "step", 2);
10184
- __decorateClass$8([attr], Slider.prototype, "orientation", 2);
10185
- __decorateClass$8([attr], Slider.prototype, "mode", 2);
10191
+ __decorateClass$9([attr], Slider.prototype, "orientation", 2);
10192
+ __decorateClass$9([attr], Slider.prototype, "mode", 2);
10186
10193
 
10187
- const styles$a = css`
10194
+ const styles$b = css`
10188
10195
  ${display("inline-grid")}
10189
10196
 
10190
10197
  :host{--thumb-size:20px;--track-margin-inline:calc(var(--thumb-size) / 2);--track-size:4px;--track-overhang:calc(var(--track-size) / -2);--rail-color:${colorCompoundBrandBackground};--track-color:${colorNeutralStrokeAccessible};--slider-direction:90deg;--border-radius:${borderRadiusMedium};--step-marker-inset:var(--track-overhang) -1px;position:relative;align-items:center;justify-content:center;box-sizing:border-box;outline:none;user-select:none;touch-action:none;min-width:120px;min-height:32px;grid-template-rows:1fr var(--thumb-size) 1fr;grid-template-columns:var(--track-margin-inline) 1fr var(--track-margin-inline)}:host(:hover){--rail-color:${colorCompoundBrandBackgroundHover}}:host(:active){--rail-color:${colorCompoundBrandBackgroundPressed}}:host(:disabled){--rail-color:${colorNeutralForegroundDisabled};--track-color:${colorNeutralBackgroundDisabled}}:host(:not(:disabled)){cursor:pointer}:host(:dir(rtl)){--slider-direction:-90deg}:host(${smallState}){--thumb-size:16px;--track-overhang:-1px;--track-size:2px;--border-radius:${borderRadiusSmall}}:host(${verticalState}){--slider-direction:0deg;--step-marker-inset:-1px var(--track-overhang);min-height:120px;grid-template-rows:var(--track-margin-inline) 1fr var(--track-margin-inline);grid-template-columns:1fr var(--thumb-size) 1fr;width:unset;min-width:32px;justify-items:center}:host(:not([slot='input']):focus-visible){box-shadow:0 0 0 2pt ${colorStrokeFocus2};outline:1px solid ${colorStrokeFocus1}}:host:after,.track{height:var(--track-size);width:100%}:host:after{background-image:linear-gradient(
@@ -10197,24 +10204,38 @@ const styles$a = css`
10197
10204
  function sliderTemplate(options = {}) {
10198
10205
  return html`<template tabindex="${x => x.disabled ? null : 0}" @pointerdown="${(x, c) => x.handlePointerDown(c.event)}"><div ${ref("track")} part="track-container" class="track" style="${x => x.position}"></div><div ${ref("thumb")} part="thumb-container" class="thumb-container" style="${x => x.position}" @pointerdown="${(x, c) => x.handleThumbPointerDown(c.event)}"><slot name="thumb">${staticallyCompose(options.thumb)}</slot></div></template>`;
10199
10206
  }
10200
- const template$a = sliderTemplate({
10207
+ const template$b = sliderTemplate({
10201
10208
  thumb: `<div class="thumb"></div>`
10202
10209
  });
10203
10210
 
10204
- const definition$a = Slider.compose({
10211
+ const definition$b = Slider.compose({
10205
10212
  name: `${FluentDesignSystem.prefix}-slider`,
10206
- template: template$a,
10207
- styles: styles$a
10213
+ template: template$b,
10214
+ styles: styles$b
10208
10215
  });
10209
10216
 
10210
- definition$a.define(FluentDesignSystem.registry);
10217
+ definition$b.define(FluentDesignSystem.registry);
10211
10218
 
10212
- var __defProp$7 = Object.defineProperty;
10213
- var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
10214
- var __decorateClass$7 = (decorators, target, key, kind) => {
10215
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
10219
+ const SpinnerAppearance = {
10220
+ primary: "primary",
10221
+ inverted: "inverted"
10222
+ };
10223
+ const SpinnerSize = {
10224
+ tiny: "tiny",
10225
+ extraSmall: "extra-small",
10226
+ small: "small",
10227
+ medium: "medium",
10228
+ large: "large",
10229
+ extraLarge: "extra-large",
10230
+ huge: "huge"
10231
+ };
10232
+
10233
+ var __defProp$8 = Object.defineProperty;
10234
+ var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
10235
+ var __decorateClass$8 = (decorators, target, key, kind) => {
10236
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
10216
10237
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10217
- if (kind && result) __defProp$7(target, key, result);
10238
+ if (kind && result) __defProp$8(target, key, result);
10218
10239
  return result;
10219
10240
  };
10220
10241
  class BaseSpinner extends FASTElement {
@@ -10236,12 +10257,7 @@ class Spinner extends BaseSpinner {
10236
10257
  * @param next - the next state
10237
10258
  */
10238
10259
  sizeChanged(prev, next) {
10239
- if (prev) {
10240
- toggleState(this.elementInternals, `${prev}`, false);
10241
- }
10242
- if (next) {
10243
- toggleState(this.elementInternals, `${next}`, true);
10244
- }
10260
+ swapStates(this.elementInternals, prev, next, SpinnerSize);
10245
10261
  }
10246
10262
  /**
10247
10263
  * Handles changes to appearance attribute custom states
@@ -10249,32 +10265,27 @@ class Spinner extends BaseSpinner {
10249
10265
  * @param next - the next state
10250
10266
  */
10251
10267
  appearanceChanged(prev, next) {
10252
- if (prev) {
10253
- toggleState(this.elementInternals, `${prev}`, false);
10254
- }
10255
- if (next) {
10256
- toggleState(this.elementInternals, `${next}`, true);
10257
- }
10268
+ swapStates(this.elementInternals, prev, next, SpinnerAppearance);
10258
10269
  }
10259
10270
  }
10260
- __decorateClass$7([attr], Spinner.prototype, "size", 2);
10261
- __decorateClass$7([attr], Spinner.prototype, "appearance", 2);
10271
+ __decorateClass$8([attr], Spinner.prototype, "size", 2);
10272
+ __decorateClass$8([attr], Spinner.prototype, "appearance", 2);
10262
10273
 
10263
- const styles$9 = css`
10274
+ const styles$a = css`
10264
10275
  ${display("inline-flex")}
10265
10276
 
10266
10277
  :host{--duration:1.5s;--indicatorSize:${strokeWidthThicker};--size:32px;height:var(--size);width:var(--size);contain:strict;content-visibility:auto}:host(${tinyState}){--indicatorSize:${strokeWidthThick};--size:20px}:host(${extraSmallState}){--indicatorSize:${strokeWidthThick};--size:24px}:host(${smallState}){--indicatorSize:${strokeWidthThick};--size:28px}:host(${largeState}){--indicatorSize:${strokeWidthThicker};--size:36px}:host(${extraLargeState}){--indicatorSize:${strokeWidthThicker};--size:40px}:host(${hugeState}){--indicatorSize:${strokeWidthThickest};--size:44px}.progress,.background,.spinner,.start,.end,.indicator{position:absolute;inset:0}.progress,.spinner,.indicator{animation:none var(--duration) infinite ${curveEasyEase}}.progress{animation-timing-function:linear;animation-name:spin-linear}.background{border:var(--indicatorSize) solid ${colorBrandStroke2};border-radius:50%}:host(${invertedState}) .background{border-color:rgba(255,255,255,0.2)}.spinner{animation-name:spin-swing}.start{overflow:hidden;inset-inline-end:50%}.end{overflow:hidden;inset-inline-start:50%}.indicator{color:${colorBrandStroke1};box-sizing:border-box;border-radius:50%;border:var(--indicatorSize) solid transparent;border-block-start-color:currentcolor;border-inline-end-color:currentcolor}:host(${invertedState}) .indicator{color:${colorNeutralStrokeOnBrand2}}.start .indicator{rotate:135deg;inset:0 -100% 0 0;animation-name:spin-start}.end .indicator{rotate:135deg;inset:0 0 0 -100%;animation-name:spin-end}@keyframes spin-linear{100%{transform:rotate(360deg)}}@keyframes spin-swing{0%{transform:rotate(-135deg)}50%{transform:rotate(0deg)}100%{transform:rotate(225deg)}}@keyframes spin-start{0%,100%{transform:rotate(0deg)}50%{transform:rotate(-80deg)}}@keyframes spin-end{0%,100%{transform:rotate(0deg)}50%{transform:rotate(70deg)}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
10267
10278
  .background{display:none}.indicator{border-color:Canvas;border-block-start-color:Highlight;border-inline-end-color:Highlight}`));
10268
10279
 
10269
- const template$9 = html`<slot name="indicator"><div class="background"></div><div class="progress"><div class="spinner"><div class="start"><div class="indicator"></div></div><div class="end"><div class="indicator"></div></div></div></div></slot>`;
10280
+ const template$a = html`<slot name="indicator"><div class="background"></div><div class="progress"><div class="spinner"><div class="start"><div class="indicator"></div></div><div class="end"><div class="indicator"></div></div></div></div></slot>`;
10270
10281
 
10271
- const definition$9 = Spinner.compose({
10282
+ const definition$a = Spinner.compose({
10272
10283
  name: `${FluentDesignSystem.prefix}-spinner`,
10273
- template: template$9,
10274
- styles: styles$9
10284
+ template: template$a,
10285
+ styles: styles$a
10275
10286
  });
10276
10287
 
10277
- definition$9.define(FluentDesignSystem.registry);
10288
+ definition$a.define(FluentDesignSystem.registry);
10278
10289
 
10279
10290
  class Switch extends BaseCheckbox {
10280
10291
  constructor() {
@@ -10286,50 +10297,50 @@ class Switch extends BaseCheckbox {
10286
10297
  function switchTemplate(options = {}) {
10287
10298
  return html`<template tabindex="${x => !x.disabled ? 0 : void 0}" @click="${(x, c) => x.clickHandler(c.event)}" @input="${(x, c) => x.inputHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" @keyup="${(x, c) => x.keyupHandler(c.event)}"><slot name="switch">${staticallyCompose(options.switch)}</slot></template>`;
10288
10299
  }
10289
- const template$8 = switchTemplate({
10300
+ const template$9 = switchTemplate({
10290
10301
  switch: `<span class="checked-indicator" part="checked-indicator"></span>`
10291
10302
  });
10292
10303
 
10293
- const styles$8 = css`
10304
+ const styles$9 = css`
10294
10305
  ${display("inline-flex")}
10295
10306
 
10296
10307
  :host{box-sizing:border-box;align-items:center;flex-direction:row;outline:none;user-select:none;contain:content;padding:0 ${spacingHorizontalXXS};width:40px;height:20px;background-color:${colorTransparentBackground};border:1px solid ${colorNeutralStrokeAccessible};border-radius:${borderRadiusCircular};cursor:pointer}:host(:hover){background:none;border-color:${colorNeutralStrokeAccessibleHover}}:host(:active){border-color:${colorNeutralStrokeAccessiblePressed}}:host(:disabled),:host([readonly]){border:1px solid ${colorNeutralStrokeDisabled};background-color:none;pointer:default}:host(${checkedState}){background:${colorCompoundBrandBackground};border-color:${colorCompoundBrandBackground}}:host(${checkedState}:hover){background:${colorCompoundBrandBackgroundHover};border-color:${colorCompoundBrandBackgroundHover}}:host(${checkedState}:active){background:${colorCompoundBrandBackgroundPressed};border-color:${colorCompoundBrandBackgroundPressed}}:host(${checkedState}:disabled){background:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled}}.checked-indicator{height:14px;width:14px;border-radius:50%;margin-inline-start:0;background-color:${colorNeutralForeground3};transition-duration:${durationNormal};transition-timing-function:${curveEasyEase};transition-property:margin-inline-start}:host(${checkedState}) .checked-indicator{background-color:${colorNeutralForegroundInverted};margin-inline-start:calc(100% - 14px)}:host(${checkedState}:hover) .checked-indicator{background:${colorNeutralForegroundInvertedHover}}:host(${checkedState}:active) .checked-indicator{background:${colorNeutralForegroundInvertedPressed}}:host(:hover) .checked-indicator{background-color:${colorNeutralForeground3Hover}}:host(:active) .checked-indicator{background-color:${colorNeutralForeground3Pressed}}:host(:disabled) .checked-indicator,:host([readonly]) .checked-indicator{background:${colorNeutralForegroundDisabled}}:host(${checkedState}:disabled) .checked-indicator{background:${colorNeutralForegroundDisabled}}:host(:focus-visible){outline:none}:host(:not([slot='input']):focus-visible){border-color:${colorTransparentStroke};outline:${strokeWidthThick} solid ${colorTransparentStroke};box-shadow:${shadow4},0 0 0 2px ${colorStrokeFocus2}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
10297
10308
  :host{border-color:InactiveBorder}:host(${checkedState}),:host(${checkedState}:active),:host(${checkedState}:hover){background:Highlight;border-color:Highlight}.checked-indicator,:host(:hover) .checked-indicator,:host(:active) .checked-indicator{background-color:ActiveCaption}:host(${checkedState}) .checked-indicator,:host(${checkedState}:hover) .checked-indicator,:host(${checkedState}:active) .checked-indicator{background-color:ButtonFace}`));
10298
10309
 
10299
- const definition$8 = Switch.compose({
10310
+ const definition$9 = Switch.compose({
10300
10311
  name: `${FluentDesignSystem.prefix}-switch`,
10301
- template: template$8,
10302
- styles: styles$8
10312
+ template: template$9,
10313
+ styles: styles$9
10303
10314
  });
10304
10315
 
10305
- definition$8.define(FluentDesignSystem.registry);
10316
+ definition$9.define(FluentDesignSystem.registry);
10306
10317
 
10307
10318
  class TabPanel extends FASTElement {}
10308
10319
 
10309
10320
  function tabPanelTemplate() {
10310
10321
  return html`<template slot="tabpanel" role="tabpanel"><slot></slot></template>`;
10311
10322
  }
10312
- const template$7 = tabPanelTemplate();
10323
+ const template$8 = tabPanelTemplate();
10313
10324
 
10314
- const styles$7 = css`
10325
+ const styles$8 = css`
10315
10326
  ${display("block")}
10316
10327
 
10317
10328
  :host{box-sizing:border-box;padding:${spacingHorizontalM} ${spacingHorizontalMNudge}}`;
10318
10329
 
10319
- const definition$7 = TabPanel.compose({
10330
+ const definition$8 = TabPanel.compose({
10320
10331
  name: `${FluentDesignSystem.prefix}-tab-panel`,
10321
- template: template$7,
10322
- styles: styles$7
10332
+ template: template$8,
10333
+ styles: styles$8
10323
10334
  });
10324
10335
 
10325
- definition$7.define(FluentDesignSystem.registry);
10336
+ definition$8.define(FluentDesignSystem.registry);
10326
10337
 
10327
- var __defProp$6 = Object.defineProperty;
10328
- var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
10329
- var __decorateClass$6 = (decorators, target, key, kind) => {
10330
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
10338
+ var __defProp$7 = Object.defineProperty;
10339
+ var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
10340
+ var __decorateClass$7 = (decorators, target, key, kind) => {
10341
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
10331
10342
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10332
- if (kind && result) __defProp$6(target, key, result);
10343
+ if (kind && result) __defProp$7(target, key, result);
10333
10344
  return result;
10334
10345
  };
10335
10346
  class Tab extends FASTElement {
@@ -10343,7 +10354,7 @@ class Tab extends FASTElement {
10343
10354
  this.$fastController.addStyles(this.styles);
10344
10355
  }
10345
10356
  }
10346
- __decorateClass$6([attr({
10357
+ __decorateClass$7([attr({
10347
10358
  mode: "boolean"
10348
10359
  })], Tab.prototype, "disabled", 2);
10349
10360
  applyMixins(Tab, StartEnd);
@@ -10351,21 +10362,21 @@ applyMixins(Tab, StartEnd);
10351
10362
  function tabTemplate(options = {}) {
10352
10363
  return html`<template slot="tab" role="tab" aria-disabled="${x => x.disabled}">${startSlotTemplate(options)}<span class="tab-content"><slot></slot></span>${endSlotTemplate(options)}</template>`;
10353
10364
  }
10354
- const template$6 = tabTemplate({});
10365
+ const template$7 = tabTemplate({});
10355
10366
 
10356
- const styles$6 = css`
10367
+ const styles$7 = css`
10357
10368
  ${display("inline-flex")}
10358
10369
 
10359
10370
  :host{position:relative;flex-direction:column;cursor:pointer;box-sizing:border-box;justify-content:center;line-height:${lineHeightBase300};font-family:${fontFamilyBase};font-size:${fontSizeBase300};color:${colorNeutralForeground2};fill:currentcolor;grid-row:1;padding:${spacingHorizontalM} ${spacingHorizontalMNudge};border-radius:${borderRadiusMedium}}:host .tab-content{display:inline-flex;flex-direction:column;padding:0 2px}:host([aria-selected='true']){color:${colorNeutralForeground1};font-weight:${fontWeightSemibold}}:host .tab-content::after{content:var(--textContent);visibility:hidden;height:0;line-height:${lineHeightBase300};font-weight:${fontWeightSemibold}}:host([aria-selected='true'])::after{background-color:${colorCompoundBrandStroke};border-radius:${borderRadiusCircular};content:'';inset:0;position:absolute;z-index:2}:host([aria-selected='false']:hover)::after{background-color:${colorNeutralStroke1Hover};border-radius:${borderRadiusCircular};content:'';inset:0;position:absolute;z-index:1}:host([aria-selected='true'][disabled])::after{background-color:${colorNeutralForegroundDisabled}}::slotted([slot='start']),::slotted([slot='end']){display:flex}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}:host([disabled]){cursor:not-allowed;fill:${colorNeutralForegroundDisabled};color:${colorNeutralForegroundDisabled}}:host([disabled]:hover)::after{background-color:unset}:host(:focus){outline:none}:host(:focus-visible){border-radius:${borderRadiusSmall};box-shadow:0 0 0 3px ${colorStrokeFocus2};outline:1px solid ${colorStrokeFocus1}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
10360
10371
  :host([aria-selected='true'])::after{background-color:Highlight}`));
10361
10372
 
10362
- const definition$6 = Tab.compose({
10373
+ const definition$7 = Tab.compose({
10363
10374
  name: `${FluentDesignSystem.prefix}-tab`,
10364
- template: template$6,
10365
- styles: styles$6
10375
+ template: template$7,
10376
+ styles: styles$7
10366
10377
  });
10367
10378
 
10368
- definition$6.define(FluentDesignSystem.registry);
10379
+ definition$7.define(FluentDesignSystem.registry);
10369
10380
 
10370
10381
  const TabsAppearance = {
10371
10382
  subtle: "subtle",
@@ -10373,12 +10384,12 @@ const TabsAppearance = {
10373
10384
  };
10374
10385
  const TabsOrientation = Orientation;
10375
10386
 
10376
- var __defProp$5 = Object.defineProperty;
10377
- var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
10378
- var __decorateClass$5 = (decorators, target, key, kind) => {
10379
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
10387
+ var __defProp$6 = Object.defineProperty;
10388
+ var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
10389
+ var __decorateClass$6 = (decorators, target, key, kind) => {
10390
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
10380
10391
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10381
- if (kind && result) __defProp$5(target, key, result);
10392
+ if (kind && result) __defProp$6(target, key, result);
10382
10393
  return result;
10383
10394
  };
10384
10395
  class BaseTabs extends FASTElement {
@@ -10622,10 +10633,10 @@ class BaseTabs extends FASTElement {
10622
10633
  this.activeTabIndex = this.getActiveIndex();
10623
10634
  }
10624
10635
  }
10625
- __decorateClass$5([attr], BaseTabs.prototype, "orientation", 2);
10626
- __decorateClass$5([attr], BaseTabs.prototype, "activeid", 2);
10627
- __decorateClass$5([observable], BaseTabs.prototype, "tabs", 2);
10628
- __decorateClass$5([observable], BaseTabs.prototype, "tabpanels", 2);
10636
+ __decorateClass$6([attr], BaseTabs.prototype, "orientation", 2);
10637
+ __decorateClass$6([attr], BaseTabs.prototype, "activeid", 2);
10638
+ __decorateClass$6([observable], BaseTabs.prototype, "tabs", 2);
10639
+ __decorateClass$6([observable], BaseTabs.prototype, "tabpanels", 2);
10629
10640
  class Tabs extends BaseTabs {
10630
10641
  constructor() {
10631
10642
  super(...arguments);
@@ -10757,30 +10768,30 @@ class Tabs extends BaseTabs {
10757
10768
  this.setTabData();
10758
10769
  }
10759
10770
  }
10760
- __decorateClass$5([attr], Tabs.prototype, "appearance", 2);
10761
- __decorateClass$5([attr({
10771
+ __decorateClass$6([attr], Tabs.prototype, "appearance", 2);
10772
+ __decorateClass$6([attr({
10762
10773
  mode: "boolean"
10763
10774
  })], Tabs.prototype, "disabled", 2);
10764
- __decorateClass$5([attr], Tabs.prototype, "size", 2);
10775
+ __decorateClass$6([attr], Tabs.prototype, "size", 2);
10765
10776
  applyMixins(Tabs, StartEnd);
10766
10777
 
10767
10778
  function tabsTemplate(options = {}) {
10768
10779
  return html` ${startSlotTemplate(options)}<div class="tablist" part="tablist" role="tablist"><slot name="tab" ${slotted("tabs")}></slot></div>${endSlotTemplate(options)}<div class="tabpanel" part="tabpanel"><slot name="tabpanel" ${slotted("tabpanels")}></slot></div>`;
10769
10780
  }
10770
- const template$5 = tabsTemplate({});
10781
+ const template$6 = tabsTemplate({});
10771
10782
 
10772
- const styles$5 = css`
10783
+ const styles$6 = css`
10773
10784
  ${display("grid")}
10774
10785
 
10775
10786
  :host{box-sizing:border-box;font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};color:${colorNeutralForeground2};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}:host([disabled]){cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted(fluent-tab){pointer-events:none;cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted(fluent-tab:after){background-color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted(fluent-tab[aria-selected='true'])::after{background-color:${colorNeutralForegroundDisabled}}:host([disabled]) ::slotted(fluent-tab:hover):before{content:unset}:host ::slotted(fluent-tab){border-radius:${borderRadiusMedium}}:host ::slotted(fluent-tab[aria-selected='true'])::before{background-color:${colorNeutralForegroundDisabled}}.tablist{display:grid;grid-template-rows:auto auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end;box-sizing:border-box}::slotted([slot='start']),::slotted([slot='end']){display:flex;align-self:center}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host([orientation='vertical']){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host([orientation='vertical']) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;align-self:flex-start;width:100%}:host([orientation='vertical']) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host([orientation='vertical']) ::slotted([slot='end']){grid-row:3}:host([appearance='subtle']) ::slotted(fluent-tab:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground1Hover};fill:${colorCompoundBrandForeground1Hover}}:host([appearance='subtle']) ::slotted(fluent-tab:active){background-color:${colorSubtleBackgroundPressed};fill:${colorSubtleBackgroundPressed};color:${colorNeutralForeground1}}:host([size='small']) ::slotted(fluent-tab){font-size:${fontSizeBase300};line-height:${lineHeightBase300};padding:${spacingVerticalSNudge} ${spacingHorizontalSNudge}}:host([size='large']) ::slotted(fluent-tab){font-size:${fontSizeBase400};line-height:${lineHeightBase400};padding:${spacingVerticalL} ${spacingHorizontalMNudge}}:host ::slotted(fluent-tab[data-animate='true'])::after{transition-property:transform;transition-duration:${durationSlow};transition-timing-function:${curveDecelerateMax}}:host ::slotted(fluent-tab)::after{height:${strokeWidthThicker};margin-top:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted(fluent-tab)::after{width:${strokeWidthThicker};height:unset;margin-top:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted(fluent-tab)::before{height:${strokeWidthThicker};border-radius:${borderRadiusCircular};content:'';inset:0;position:absolute;margin-top:auto}:host([orientation='vertical']) ::slotted(fluent-tab)::before{height:unset;width:${strokeWidthThicker};margin-inline-end:auto;transform-origin:top}:host ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:${strokeWidthThicker};margin-top:auto;transform-origin:left}:host([orientation='vertical']) ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:unset;margin-inline-end:auto;transform-origin:top;width:${strokeWidthThicker}}:host([orientation='vertical']) ::slotted(fluent-tab){align-items:flex-start;grid-column:2;padding-top:${spacingVerticalSNudge};padding-bottom:${spacingVerticalSNudge}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab){padding-top:${spacingVerticalXXS};padding-bottom:${spacingVerticalXXS}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab){padding-top:${spacingVerticalS};padding-bottom:${spacingVerticalS}}:host([size='small']) ::slotted(fluent-tab)::after,:host([size='small']) ::slotted(fluent-tab)::before,:host([size='small']) ::slotted(fluent-tab:hover)::after{right:${spacingHorizontalSNudge};left:${spacingHorizontalSNudge}}:host ::slotted(fluent-tab)::after,:host ::slotted(fluent-tab)::before,:host ::slotted(fluent-tab:hover)::after{right:${spacingHorizontalMNudge};left:${spacingHorizontalMNudge}}:host([size='large']) ::slotted(fluent-tab)::after,:host([size='large']) ::slotted(fluent-tab)::before,:host([size='large']) ::slotted(fluent-tab:hover)::after{right:${spacingHorizontalMNudge};left:${spacingHorizontalMNudge}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${spacingVerticalSNudge};bottom:${spacingVerticalSNudge}}:host([orientation='vertical']) ::slotted(fluent-tab)::after,:host([orientation='vertical']) ::slotted(fluent-tab)::before,:host([orientation='vertical']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${spacingVerticalS};bottom:${spacingVerticalS}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${spacingVerticalMNudge};bottom:${spacingVerticalMNudge}}`;
10776
10787
 
10777
- const definition$5 = Tabs.compose({
10788
+ const definition$6 = Tabs.compose({
10778
10789
  name: `${FluentDesignSystem.prefix}-tabs`,
10779
- template: template$5,
10780
- styles: styles$5
10790
+ template: template$6,
10791
+ styles: styles$6
10781
10792
  });
10782
10793
 
10783
- definition$5.define(FluentDesignSystem.registry);
10794
+ definition$6.define(FluentDesignSystem.registry);
10784
10795
 
10785
10796
  const isARIADisabledElement = el => {
10786
10797
  return el.getAttribute("aria-disabled") === "true";
@@ -10796,14 +10807,19 @@ const TablistAppearance = {
10796
10807
  subtle: "subtle",
10797
10808
  transparent: "transparent"
10798
10809
  };
10810
+ const TablistSize = {
10811
+ small: "small",
10812
+ medium: "medium",
10813
+ large: "large"
10814
+ };
10799
10815
  const TablistOrientation = Orientation;
10800
10816
 
10801
- var __defProp$4 = Object.defineProperty;
10802
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
10803
- var __decorateClass$4 = (decorators, target, key, kind) => {
10804
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
10817
+ var __defProp$5 = Object.defineProperty;
10818
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
10819
+ var __decorateClass$5 = (decorators, target, key, kind) => {
10820
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
10805
10821
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
10806
- if (kind && result) __defProp$4(target, key, result);
10822
+ if (kind && result) __defProp$5(target, key, result);
10807
10823
  return result;
10808
10824
  };
10809
10825
  class BaseTablist extends FASTElement {
@@ -10887,12 +10903,7 @@ class BaseTablist extends FASTElement {
10887
10903
  */
10888
10904
  orientationChanged(prev, next) {
10889
10905
  this.elementInternals.ariaOrientation = next ?? TablistOrientation.horizontal;
10890
- if (prev) {
10891
- toggleState(this.elementInternals, `${prev}`, false);
10892
- }
10893
- if (next) {
10894
- toggleState(this.elementInternals, `${next}`, true);
10895
- }
10906
+ swapStates(this.elementInternals, prev, next, TablistOrientation);
10896
10907
  if (this.$fastController.isConnected) {
10897
10908
  this.setTabs();
10898
10909
  }
@@ -10997,12 +11008,12 @@ class BaseTablist extends FASTElement {
10997
11008
  this.activeTabIndex = this.getActiveIndex();
10998
11009
  }
10999
11010
  }
11000
- __decorateClass$4([attr({
11011
+ __decorateClass$5([attr({
11001
11012
  mode: "boolean"
11002
11013
  })], BaseTablist.prototype, "disabled", 2);
11003
- __decorateClass$4([attr], BaseTablist.prototype, "orientation", 2);
11004
- __decorateClass$4([attr], BaseTablist.prototype, "activeid", 2);
11005
- __decorateClass$4([observable], BaseTablist.prototype, "tabs", 2);
11014
+ __decorateClass$5([attr], BaseTablist.prototype, "orientation", 2);
11015
+ __decorateClass$5([attr], BaseTablist.prototype, "activeid", 2);
11016
+ __decorateClass$5([observable], BaseTablist.prototype, "tabs", 2);
11006
11017
  class Tablist extends BaseTablist {
11007
11018
  constructor() {
11008
11019
  super(...arguments);
@@ -11042,23 +11053,13 @@ class Tablist extends BaseTablist {
11042
11053
  * @internal
11043
11054
  */
11044
11055
  appearanceChanged(prev, next) {
11045
- if (prev) {
11046
- toggleState(this.elementInternals, `${prev}`, false);
11047
- }
11048
- if (next) {
11049
- toggleState(this.elementInternals, `${next}`, true);
11050
- }
11056
+ swapStates(this.elementInternals, prev, next, TablistAppearance);
11051
11057
  }
11052
11058
  /**
11053
11059
  * @internal
11054
11060
  */
11055
11061
  sizeChanged(prev, next) {
11056
- if (prev) {
11057
- toggleState(this.elementInternals, `${prev}`, false);
11058
- }
11059
- if (next) {
11060
- toggleState(this.elementInternals, `${next}`, true);
11061
- }
11062
+ swapStates(this.elementInternals, prev, next, TablistSize);
11062
11063
  }
11063
11064
  /**
11064
11065
  * calculateAnimationProperties
@@ -11164,24 +11165,29 @@ class Tablist extends BaseTablist {
11164
11165
  }
11165
11166
  }
11166
11167
  }
11167
- __decorateClass$4([attr], Tablist.prototype, "appearance", 2);
11168
- __decorateClass$4([attr], Tablist.prototype, "size", 2);
11168
+ __decorateClass$5([attr], Tablist.prototype, "appearance", 2);
11169
+ __decorateClass$5([attr], Tablist.prototype, "size", 2);
11169
11170
 
11170
- const template$4 = html`<template role="tablist"><slot name="tab" ${slotted("tabs")}></slot></template>`;
11171
+ const template$5 = html`<template role="tablist"><slot name="tab" ${slotted("tabs")}></slot></template>`;
11171
11172
 
11172
- const styles$4 = css`
11173
+ const styles$5 = css`
11173
11174
  ${display("flex")}
11174
11175
 
11175
11176
  :host{--tabPaddingInline:inherit;--tabPaddingBlock:inherit;--tabIndicatorInsetInline:0;--tabIndicatorInsetBlock:0;box-sizing:border-box;color:${colorNeutralForeground2};flex-direction:row}:host(${verticalState}){flex-direction:column}:host ::slotted([role='tab']){align-items:flex-start}:host ::slotted([slot='tab'][data-animate='true'])::after{transition-property:transform;transition-duration:${durationSlow};transition-timing-function:${curveDecelerateMax}}:host ::slotted([slot='tab'])::after{height:${strokeWidthThicker};margin-block-start:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host(${verticalState}) ::slotted([slot='tab'])::after{width:${strokeWidthThicker};height:unset;margin-block-start:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted([slot='tab'])::before{height:${strokeWidthThicker};border-radius:${borderRadiusCircular};content:'';inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock);position:absolute;margin-top:auto}:host ::slotted([slot='tab'])::before{inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock)}:host ::slotted([slot='tab'][aria-selected='true'])::before{background-color:${colorNeutralForegroundDisabled}}:host ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:${strokeWidthThicker};margin-block-start:auto;transform-origin:left}:host(${verticalState}) ::slotted([slot='tab'])::before,:host(${verticalState}) ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:unset;width:${strokeWidthThicker};margin-inline-end:auto;transform-origin:top}:host(:where(${smallState},${largeState})) ::slotted([slot='tab']){padding-inline:var(--tabPaddingInline);padding-block:var(--tabPaddingBlock)}:host(${smallState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalSNudge};--tabPaddingInline:${spacingHorizontalSNudge};font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host(${largeState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalL};--tabPaddingInline:${spacingHorizontalMNudge};font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host ::slotted([slot='tab'])::after,:host ::slotted([slot='tab'])::before,:host ::slotted([slot='tab']:hover)::after{inset-inline:var(--tabIndicatorInsetInline)}:host ::slotted([slot='tab']){--tabIndicatorInsetInline:${spacingHorizontalMNudge}}:host(${smallState}) ::slotted([slot='tab']){--tabIndicatorInsetInline:${spacingHorizontalSNudge}}:host(${largeState}) ::slotted([slot='tab']){--tabIndicatorInsetInline:${spacingHorizontalMNudge}}:host(${verticalState}) ::slotted([slot='tab']){padding-block:var(--tabPaddingBlock)}:host(${verticalState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalS}}:host(${verticalState}${smallState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalXXS}}:host(${verticalState}${largeState}) ::slotted([slot='tab']){--tabPaddingBlock:${spacingVerticalS}}:host(${verticalState}) ::slotted([slot='tab'])::after,:host(${verticalState}) ::slotted([slot='tab'])::before,:host(${verticalState}) ::slotted([slot='tab']:hover)::after{inset-inline:0;inset-block:var(--tabIndicatorInsetBlock)}:host(${verticalState}){--tabIndicatorInsetBlock:${spacingVerticalS}}:host(${verticalState}${smallState}){--tabIndicatorInsetBlock:${spacingVerticalSNudge}}:host(${verticalState}${largeState}){--tabIndicatorInsetBlock:${spacingVerticalMNudge}}:host(${disabledState}){cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='tab']){pointer-events:none;cursor:not-allowed;color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='tab']:after){background-color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='tab'][aria-selected='true'])::after{background-color:${colorNeutralForegroundDisabled}}:host(${disabledState}) ::slotted([slot='tab']:hover):before{content:unset}:host(${subtleState}) ::slotted([slot='tab']:hover){background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground1Hover};fill:${colorCompoundBrandForeground1Hover}}:host(${subtleState}) ::slotted([slot='tab']:active){background-color:${colorSubtleBackgroundPressed};fill:${colorSubtleBackgroundPressed};color:${colorNeutralForeground1}}`;
11176
11177
 
11177
- const definition$4 = Tablist.compose({
11178
+ const definition$5 = Tablist.compose({
11178
11179
  name: `${FluentDesignSystem.prefix}-tablist`,
11179
- template: template$4,
11180
- styles: styles$4
11180
+ template: template$5,
11181
+ styles: styles$5
11181
11182
  });
11182
11183
 
11183
- definition$4.define(FluentDesignSystem.registry);
11184
+ definition$5.define(FluentDesignSystem.registry);
11184
11185
 
11186
+ const TextAreaSize = {
11187
+ small: "small",
11188
+ medium: "medium",
11189
+ large: "large"
11190
+ };
11185
11191
  const TextAreaAppearance = {
11186
11192
  outline: "outline",
11187
11193
  filledLighter: "filled-lighter",
@@ -11195,12 +11201,12 @@ const TextAreaResize = {
11195
11201
  vertical: "vertical"
11196
11202
  };
11197
11203
 
11198
- var __defProp$3 = Object.defineProperty;
11199
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
11200
- var __decorateClass$3 = (decorators, target, key, kind) => {
11201
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
11204
+ var __defProp$4 = Object.defineProperty;
11205
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
11206
+ var __decorateClass$4 = (decorators, target, key, kind) => {
11207
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
11202
11208
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11203
- if (kind && result) __defProp$3(target, key, result);
11209
+ if (kind && result) __defProp$4(target, key, result);
11204
11210
  return result;
11205
11211
  };
11206
11212
  class BaseTextArea extends FASTElement {
@@ -11270,13 +11276,8 @@ class BaseTextArea extends FASTElement {
11270
11276
  }
11271
11277
  }
11272
11278
  resizeChanged(prev, next) {
11273
- if (prev) {
11274
- toggleState(this.elementInternals, `resize-${prev}`, false);
11275
- }
11276
- if (next) {
11277
- toggleState(this.elementInternals, `resize-${next}`, true);
11278
- }
11279
- toggleState(this.elementInternals, `resize`, [TextAreaResize.both, TextAreaResize.horizontal, TextAreaResize.vertical].includes(this.resize));
11279
+ swapStates(this.elementInternals, prev, next, TextAreaResize, "resize-");
11280
+ toggleState(this.elementInternals, "resize", hasMatchingState(TextAreaResize, next) && next !== TextAreaResize.none);
11280
11281
  }
11281
11282
  /**
11282
11283
  * The length of the current value.
@@ -11574,47 +11575,47 @@ class BaseTextArea extends FASTElement {
11574
11575
  * @public
11575
11576
  */
11576
11577
  BaseTextArea.formAssociated = true;
11577
- __decorateClass$3([observable], BaseTextArea.prototype, "defaultSlottedNodes", 2);
11578
- __decorateClass$3([observable], BaseTextArea.prototype, "labelSlottedNodes", 2);
11579
- __decorateClass$3([attr], BaseTextArea.prototype, "autocomplete", 2);
11580
- __decorateClass$3([attr({
11578
+ __decorateClass$4([observable], BaseTextArea.prototype, "defaultSlottedNodes", 2);
11579
+ __decorateClass$4([observable], BaseTextArea.prototype, "labelSlottedNodes", 2);
11580
+ __decorateClass$4([attr], BaseTextArea.prototype, "autocomplete", 2);
11581
+ __decorateClass$4([attr({
11581
11582
  attribute: "auto-resize",
11582
11583
  mode: "boolean"
11583
11584
  })], BaseTextArea.prototype, "autoResize", 2);
11584
- __decorateClass$3([attr({
11585
+ __decorateClass$4([attr({
11585
11586
  attribute: "dirname"
11586
11587
  })], BaseTextArea.prototype, "dirName", 2);
11587
- __decorateClass$3([attr({
11588
+ __decorateClass$4([attr({
11588
11589
  mode: "boolean"
11589
11590
  })], BaseTextArea.prototype, "disabled", 2);
11590
- __decorateClass$3([attr({
11591
+ __decorateClass$4([attr({
11591
11592
  attribute: "display-shadow",
11592
11593
  mode: "boolean"
11593
11594
  })], BaseTextArea.prototype, "displayShadow", 2);
11594
- __decorateClass$3([attr({
11595
+ __decorateClass$4([attr({
11595
11596
  attribute: "form"
11596
11597
  })], BaseTextArea.prototype, "initialForm", 2);
11597
- __decorateClass$3([attr({
11598
+ __decorateClass$4([attr({
11598
11599
  attribute: "maxlength",
11599
11600
  converter: nullableNumberConverter
11600
11601
  })], BaseTextArea.prototype, "maxLength", 2);
11601
- __decorateClass$3([attr({
11602
+ __decorateClass$4([attr({
11602
11603
  attribute: "minlength",
11603
11604
  converter: nullableNumberConverter
11604
11605
  })], BaseTextArea.prototype, "minLength", 2);
11605
- __decorateClass$3([attr], BaseTextArea.prototype, "name", 2);
11606
- __decorateClass$3([attr], BaseTextArea.prototype, "placeholder", 2);
11607
- __decorateClass$3([attr({
11606
+ __decorateClass$4([attr], BaseTextArea.prototype, "name", 2);
11607
+ __decorateClass$4([attr], BaseTextArea.prototype, "placeholder", 2);
11608
+ __decorateClass$4([attr({
11608
11609
  attribute: "readonly",
11609
11610
  mode: "boolean"
11610
11611
  })], BaseTextArea.prototype, "readOnly", 2);
11611
- __decorateClass$3([attr({
11612
+ __decorateClass$4([attr({
11612
11613
  mode: "boolean"
11613
11614
  })], BaseTextArea.prototype, "required", 2);
11614
- __decorateClass$3([attr({
11615
+ __decorateClass$4([attr({
11615
11616
  mode: "fromView"
11616
11617
  })], BaseTextArea.prototype, "resize", 2);
11617
- __decorateClass$3([attr({
11618
+ __decorateClass$4([attr({
11618
11619
  mode: "boolean"
11619
11620
  })], BaseTextArea.prototype, "spellcheck", 2);
11620
11621
  class TextArea extends BaseTextArea {
@@ -11630,25 +11631,18 @@ class TextArea extends BaseTextArea {
11630
11631
  });
11631
11632
  }
11632
11633
  appearanceChanged(prev, next) {
11633
- if (prev) {
11634
- toggleState(this.elementInternals, `${prev}`, false);
11635
- }
11636
- if (!next || !Array.from(Object.values(TextAreaAppearance)).includes(next)) {
11637
- toggleState(this.elementInternals, TextAreaAppearance.outline, true);
11634
+ toggleState(this.elementInternals, prev, false);
11635
+ if (hasMatchingState(TextAreaAppearance, next)) {
11636
+ toggleState(this.elementInternals, next, true);
11638
11637
  } else {
11639
- toggleState(this.elementInternals, `${next}`, true);
11638
+ this.appearance = TextAreaAppearance.outline;
11640
11639
  }
11641
11640
  }
11642
11641
  blockChanged() {
11643
11642
  toggleState(this.elementInternals, "block", this.block);
11644
11643
  }
11645
11644
  sizeChanged(prev, next) {
11646
- if (prev) {
11647
- toggleState(this.elementInternals, `${prev}`, false);
11648
- }
11649
- if (next) {
11650
- toggleState(this.elementInternals, `${next}`, true);
11651
- }
11645
+ swapStates(this.elementInternals, prev, next, TextAreaSize);
11652
11646
  }
11653
11647
  /**
11654
11648
  * @internal
@@ -11689,15 +11683,15 @@ class TextArea extends BaseTextArea {
11689
11683
  toggleState(this.elementInternals, "display-shadow", this.displayShadow && TextAreaAppearancesForDisplayShadow.includes(this.appearance));
11690
11684
  }
11691
11685
  }
11692
- __decorateClass$3([attr({
11686
+ __decorateClass$4([attr({
11693
11687
  mode: "fromView"
11694
11688
  })], TextArea.prototype, "appearance", 2);
11695
- __decorateClass$3([attr({
11689
+ __decorateClass$4([attr({
11696
11690
  mode: "boolean"
11697
11691
  })], TextArea.prototype, "block", 2);
11698
- __decorateClass$3([attr], TextArea.prototype, "size", 2);
11692
+ __decorateClass$4([attr], TextArea.prototype, "size", 2);
11699
11693
 
11700
- const styles$3 = css`
11694
+ const styles$4 = css`
11701
11695
  ${display("inline-block")}
11702
11696
 
11703
11697
  :host{--font-size:${fontSizeBase300};--line-height:${lineHeightBase300};--padding-inline:${spacingHorizontalMNudge};--padding-block:${spacingVerticalSNudge};--min-block-size:52px;--block-size:var(--min-block-size);--inline-size:18rem;--border-width:${strokeWidthThin};--control-padding-inline:${spacingHorizontalXXS};--color:${colorNeutralForeground1};--background-color:${colorNeutralBackground1};--border-color:${colorNeutralStroke1};--border-block-end-color:${colorNeutralStrokeAccessible};--placeholder-color:${colorNeutralForeground4};--focus-indicator-color:${colorCompoundBrandStroke};--box-shadow:none;--contain-size:size;--resize:none;color:var(--color);font-family:${fontFamilyBase};font-size:var(--font-size);font-weight:${fontWeightRegular};line-height:var(--line-height);position:relative}:host(:hover){--border-color:${colorNeutralStroke1Hover};--border-block-end-color:${colorNeutralStrokeAccessibleHover}}:host(:active){--border-color:${colorNeutralStroke1Pressed};--border-block-end-color:${colorNeutralStrokeAccessiblePressed}}:host(:focus-within){outline:none}:host(${blockState}:not([hidden])){display:block}:host(${smallState}){--font-size:${fontSizeBase200};--line-height:${lineHeightBase200};--min-block-size:40px;--padding-block:${spacingVerticalXS};--padding-inline:${spacingHorizontalSNudge};--control-padding-inline:${spacingHorizontalXXS}}:host(${largeState}){--font-size:${fontSizeBase400};--line-height:${lineHeightBase400};--min-block-size:64px;--padding-block:${spacingVerticalS};--padding-inline:${spacingHorizontalM};--control-padding-inline:${spacingHorizontalSNudge}}:host(${resizeBothState}:not(:disabled)){--resize:both}:host(${resizeHorizontalState}:not(:disabled)){--resize:horizontal}:host(${resizeVerticalState}:not(:disabled)){--resize:vertical}:host(${autoResizeState}){--block-size:auto;--contain-size:inline-size}:host(${filledDarkerState}){--background-color:${colorNeutralBackground3};--border-color:var(--background-color);--border-block-end-color:var(--border-color)}:host(${filledLighterState}){--border-color:var(--background-color);--border-block-end-color:var(--border-color)}:host(${filledDarkerState}${displayShadowState}),:host(${filledLighterState}${displayShadowState}){--box-shadow:${shadow2}}:host(${userInvalidState}){--border-color:${colorPaletteRedBorder2};--border-block-end-color:${colorPaletteRedBorder2}}:host(:disabled){--color:${colorNeutralForegroundDisabled};--background-color:${colorTransparentBackground};--border-color:${colorNeutralStrokeDisabled};--border-block-end-color:var(--border-color);--box-shadow:none;--placeholder-color:${colorNeutralForegroundDisabled};cursor:no-drop;user-select:none}.root{background-color:var(--background-color);border:var(--border-width) solid var(--border-color);border-block-end-color:var(--border-block-end-color);border-radius:${borderRadiusMedium};box-sizing:border-box;box-shadow:var(--box-shadow);contain:paint layout style var(--contain-size);display:grid;grid-template:1fr / 1fr;inline-size:var(--inline-size);min-block-size:var(--min-block-size);block-size:var(--block-size);overflow:hidden;padding:var(--padding-block) var(--padding-inline);position:relative;resize:var(--resize)}:host(${blockState}) .root{inline-size:auto}.root::after{border-bottom:2px solid var(--focus-indicator-color);border-radius:0 0 ${borderRadiusMedium} ${borderRadiusMedium};box-sizing:border-box;clip-path:inset(calc(100% - 2px) 1px 0px);content:'';height:max(2px,${borderRadiusMedium});inset:auto -1px 0;position:absolute;transform:scaleX(0);transition-delay:${curveAccelerateMid};transition-duration:${durationUltraFast};transition-property:transform}:host(:focus-within) .root::after{transform:scaleX(1);transition-property:transform;transition-duration:${durationNormal};transition-delay:${curveDecelerateMid}}:host([readonly]) .root::after,:host(:disabled) .root::after{content:none}label{color:var(--color);display:flex;inline-size:fit-content;padding-block-end:${spacingVerticalXS};padding-inline-end:${spacingHorizontalXS}}:host(:empty) label,label[hidden]{display:none}.auto-sizer,.control{box-sizing:border-box;font:inherit;grid-column:1 / -1;grid-row:1 / -1;letter-space:inherit;padding:0 var(--control-padding-inline)}.auto-sizer{display:none;padding-block-end:2px;pointer-events:none;visibility:hidden;white-space:pre-wrap}:host(${autoResizeState}) .auto-sizer{display:block}.control{appearance:none;background-color:transparent;border:0;color:inherit;field-sizing:content;max-block-size:100%;outline:0;resize:none;text-align:inherit}.control:disabled{cursor:inherit}.control::placeholder{color:var(--placeholder-color)}::selection{color:${colorNeutralForegroundInverted};background-color:${colorNeutralBackgroundInverted}}`.withBehaviors(forcedColorsStylesheetBehavior(css`
@@ -11712,19 +11706,30 @@ function textAreaTemplate() {
11712
11706
  filter: whitespaceFilter
11713
11707
  })}></slot></div></template>`;
11714
11708
  }
11715
- const template$3 = textAreaTemplate();
11709
+ const template$4 = textAreaTemplate();
11716
11710
 
11717
- const definition$3 = TextArea.compose({
11711
+ const definition$4 = TextArea.compose({
11718
11712
  name: `${FluentDesignSystem.prefix}-textarea`,
11719
- template: template$3,
11720
- styles: styles$3,
11713
+ template: template$4,
11714
+ styles: styles$4,
11721
11715
  shadowOptions: {
11722
11716
  delegatesFocus: true
11723
11717
  }
11724
11718
  });
11725
11719
 
11726
- definition$3.define(FluentDesignSystem.registry);
11720
+ definition$4.define(FluentDesignSystem.registry);
11727
11721
 
11722
+ const TextInputControlSize = {
11723
+ small: "small",
11724
+ medium: "medium",
11725
+ large: "large"
11726
+ };
11727
+ const TextInputAppearance = {
11728
+ outline: "outline",
11729
+ underline: "underline",
11730
+ filledLighter: "filled-lighter",
11731
+ filledDarker: "filled-darker"
11732
+ };
11728
11733
  const TextInputType = {
11729
11734
  email: "email",
11730
11735
  password: "password",
@@ -11734,12 +11739,12 @@ const TextInputType = {
11734
11739
  };
11735
11740
  const ImplicitSubmissionBlockingTypes = ["date", "datetime-local", "email", "month", "number", "password", "search", "tel", "text", "time", "url", "week"];
11736
11741
 
11737
- var __defProp$2 = Object.defineProperty;
11738
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
11739
- var __decorateClass$2 = (decorators, target, key, kind) => {
11740
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
11742
+ var __defProp$3 = Object.defineProperty;
11743
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
11744
+ var __decorateClass$3 = (decorators, target, key, kind) => {
11745
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
11741
11746
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11742
- if (kind && result) __defProp$2(target, key, result);
11747
+ if (kind && result) __defProp$3(target, key, result);
11743
11748
  return result;
11744
11749
  };
11745
11750
  class BaseTextInput extends FASTElement {
@@ -12055,53 +12060,53 @@ class BaseTextInput extends FASTElement {
12055
12060
  * @public
12056
12061
  */
12057
12062
  BaseTextInput.formAssociated = true;
12058
- __decorateClass$2([attr], BaseTextInput.prototype, "autocomplete", 2);
12059
- __decorateClass$2([attr({
12063
+ __decorateClass$3([attr], BaseTextInput.prototype, "autocomplete", 2);
12064
+ __decorateClass$3([attr({
12060
12065
  mode: "boolean"
12061
12066
  })], BaseTextInput.prototype, "autofocus", 2);
12062
- __decorateClass$2([observable], BaseTextInput.prototype, "defaultSlottedNodes", 2);
12063
- __decorateClass$2([attr], BaseTextInput.prototype, "dirname", 2);
12064
- __decorateClass$2([attr({
12067
+ __decorateClass$3([observable], BaseTextInput.prototype, "defaultSlottedNodes", 2);
12068
+ __decorateClass$3([attr], BaseTextInput.prototype, "dirname", 2);
12069
+ __decorateClass$3([attr({
12065
12070
  mode: "boolean"
12066
12071
  })], BaseTextInput.prototype, "disabled", 2);
12067
- __decorateClass$2([attr({
12072
+ __decorateClass$3([attr({
12068
12073
  attribute: "form"
12069
12074
  })], BaseTextInput.prototype, "formAttribute", 2);
12070
- __decorateClass$2([attr({
12075
+ __decorateClass$3([attr({
12071
12076
  attribute: "value",
12072
12077
  mode: "fromView"
12073
12078
  })], BaseTextInput.prototype, "initialValue", 2);
12074
- __decorateClass$2([attr], BaseTextInput.prototype, "list", 2);
12075
- __decorateClass$2([attr({
12079
+ __decorateClass$3([attr], BaseTextInput.prototype, "list", 2);
12080
+ __decorateClass$3([attr({
12076
12081
  converter: nullableNumberConverter
12077
12082
  })], BaseTextInput.prototype, "maxlength", 2);
12078
- __decorateClass$2([attr({
12083
+ __decorateClass$3([attr({
12079
12084
  converter: nullableNumberConverter
12080
12085
  })], BaseTextInput.prototype, "minlength", 2);
12081
- __decorateClass$2([attr({
12086
+ __decorateClass$3([attr({
12082
12087
  mode: "boolean"
12083
12088
  })], BaseTextInput.prototype, "multiple", 2);
12084
- __decorateClass$2([attr], BaseTextInput.prototype, "name", 2);
12085
- __decorateClass$2([attr], BaseTextInput.prototype, "pattern", 2);
12086
- __decorateClass$2([attr], BaseTextInput.prototype, "placeholder", 2);
12087
- __decorateClass$2([attr({
12089
+ __decorateClass$3([attr], BaseTextInput.prototype, "name", 2);
12090
+ __decorateClass$3([attr], BaseTextInput.prototype, "pattern", 2);
12091
+ __decorateClass$3([attr], BaseTextInput.prototype, "placeholder", 2);
12092
+ __decorateClass$3([attr({
12088
12093
  attribute: "readonly",
12089
12094
  mode: "boolean"
12090
12095
  })], BaseTextInput.prototype, "readOnly", 2);
12091
- __decorateClass$2([attr({
12096
+ __decorateClass$3([attr({
12092
12097
  mode: "boolean"
12093
12098
  })], BaseTextInput.prototype, "required", 2);
12094
- __decorateClass$2([attr({
12099
+ __decorateClass$3([attr({
12095
12100
  converter: nullableNumberConverter
12096
12101
  })], BaseTextInput.prototype, "size", 2);
12097
- __decorateClass$2([attr({
12102
+ __decorateClass$3([attr({
12098
12103
  converter: {
12099
12104
  fromView: value => typeof value === "string" ? ["true", ""].includes(value.trim().toLowerCase()) : null,
12100
12105
  toView: value => value.toString()
12101
12106
  }
12102
12107
  })], BaseTextInput.prototype, "spellcheck", 2);
12103
- __decorateClass$2([attr], BaseTextInput.prototype, "type", 2);
12104
- __decorateClass$2([observable], BaseTextInput.prototype, "controlLabel", 2);
12108
+ __decorateClass$3([attr], BaseTextInput.prototype, "type", 2);
12109
+ __decorateClass$3([observable], BaseTextInput.prototype, "controlLabel", 2);
12105
12110
  class TextInput extends BaseTextInput {
12106
12111
  /**
12107
12112
  * Handles changes to appearance attribute custom states
@@ -12109,12 +12114,7 @@ class TextInput extends BaseTextInput {
12109
12114
  * @param next - the next state
12110
12115
  */
12111
12116
  appearanceChanged(prev, next) {
12112
- if (prev) {
12113
- toggleState(this.elementInternals, `${prev}`, false);
12114
- }
12115
- if (next) {
12116
- toggleState(this.elementInternals, `${next}`, true);
12117
- }
12117
+ swapStates(this.elementInternals, prev, next, TextInputAppearance);
12118
12118
  }
12119
12119
  /**
12120
12120
  * Handles changes to `control-size` attribute custom states
@@ -12122,21 +12122,16 @@ class TextInput extends BaseTextInput {
12122
12122
  * @param next - the next state
12123
12123
  */
12124
12124
  controlSizeChanged(prev, next) {
12125
- if (prev) {
12126
- toggleState(this.elementInternals, `${prev}`, false);
12127
- }
12128
- if (next) {
12129
- toggleState(this.elementInternals, `${next}`, true);
12130
- }
12125
+ swapStates(this.elementInternals, prev, next, TextInputControlSize);
12131
12126
  }
12132
12127
  }
12133
- __decorateClass$2([attr], TextInput.prototype, "appearance", 2);
12134
- __decorateClass$2([attr({
12128
+ __decorateClass$3([attr], TextInput.prototype, "appearance", 2);
12129
+ __decorateClass$3([attr({
12135
12130
  attribute: "control-size"
12136
12131
  })], TextInput.prototype, "controlSize", 2);
12137
12132
  applyMixins(TextInput, StartEnd);
12138
12133
 
12139
- const styles$2 = css`
12134
+ const styles$3 = css`
12140
12135
  ${display("block")}
12141
12136
 
12142
12137
  :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}}`;
@@ -12147,25 +12142,55 @@ function textInputTemplate(options = {}) {
12147
12142
  filter: whitespaceFilter
12148
12143
  })}></slot></label><div class="root" part="root">${startSlotTemplate(options)}<input class="control" part="control" id="control" @change="${(x, c) => x.changeHandler(c.event)}" @input="${(x, c) => x.inputHandler(c.event)}" ?autofocus="${x => x.autofocus}" autocomplete="${x => x.autocomplete}" ?disabled="${x => x.disabled}" list="${x => x.list}" maxlength="${x => x.maxlength}" minlength="${x => x.minlength}" ?multiple="${x => x.multiple}" name="${x => x.name}" pattern="${x => x.pattern}" placeholder="${x => x.placeholder}" ?readonly="${x => x.readOnly}" ?required="${x => x.required}" size="${x => x.size}" spellcheck="${x => x.spellcheck}" type="${x => x.type}" value="${x => x.initialValue}" ${ref("control")} />${endSlotTemplate(options)}</div></template>`;
12149
12144
  }
12150
- const template$2 = textInputTemplate();
12145
+ const template$3 = textInputTemplate();
12151
12146
 
12152
- const definition$2 = TextInput.compose({
12147
+ const definition$3 = TextInput.compose({
12153
12148
  name: `${FluentDesignSystem.prefix}-text-input`,
12154
- template: template$2,
12155
- styles: styles$2,
12149
+ template: template$3,
12150
+ styles: styles$3,
12156
12151
  shadowOptions: {
12157
12152
  delegatesFocus: true
12158
12153
  }
12159
12154
  });
12160
12155
 
12161
- definition$2.define(FluentDesignSystem.registry);
12156
+ definition$3.define(FluentDesignSystem.registry);
12162
12157
 
12163
- var __defProp$1 = Object.defineProperty;
12164
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
12165
- var __decorateClass$1 = (decorators, target, key, kind) => {
12166
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
12158
+ const TextSize = {
12159
+ _100: "100",
12160
+ _200: "200",
12161
+ _300: "300",
12162
+ _400: "400",
12163
+ _500: "500",
12164
+ _600: "600",
12165
+ _700: "700",
12166
+ _800: "800",
12167
+ _900: "900",
12168
+ _1000: "1000"
12169
+ };
12170
+ const TextFont = {
12171
+ base: "base",
12172
+ numeric: "numeric",
12173
+ monospace: "monospace"
12174
+ };
12175
+ const TextWeight = {
12176
+ medium: "medium",
12177
+ regular: "regular",
12178
+ semibold: "semibold",
12179
+ bold: "bold"
12180
+ };
12181
+ const TextAlign = {
12182
+ start: "start",
12183
+ end: "end",
12184
+ center: "center",
12185
+ justify: "justify"
12186
+ };
12187
+
12188
+ var __defProp$2 = Object.defineProperty;
12189
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
12190
+ var __decorateClass$2 = (decorators, target, key, kind) => {
12191
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
12167
12192
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12168
- if (kind && result) __defProp$1(target, key, result);
12193
+ if (kind && result) __defProp$2(target, key, result);
12169
12194
  return result;
12170
12195
  };
12171
12196
  class Text extends FASTElement {
@@ -12190,12 +12215,7 @@ class Text extends FASTElement {
12190
12215
  * @param next - the next state
12191
12216
  */
12192
12217
  sizeChanged(prev, next) {
12193
- if (prev) {
12194
- toggleState(this.elementInternals, `size-${prev}`, false);
12195
- }
12196
- if (next) {
12197
- toggleState(this.elementInternals, `size-${next}`, true);
12198
- }
12218
+ swapStates(this.elementInternals, prev, next, TextSize, "size-");
12199
12219
  }
12200
12220
  /**
12201
12221
  * Handles changes to font attribute custom states
@@ -12203,12 +12223,7 @@ class Text extends FASTElement {
12203
12223
  * @param next - the next state
12204
12224
  */
12205
12225
  fontChanged(prev, next) {
12206
- if (prev) {
12207
- toggleState(this.elementInternals, prev, false);
12208
- }
12209
- if (next) {
12210
- toggleState(this.elementInternals, next, true);
12211
- }
12226
+ swapStates(this.elementInternals, prev, next, TextFont);
12212
12227
  }
12213
12228
  /**
12214
12229
  * Handles changes to weight attribute custom states
@@ -12216,12 +12231,7 @@ class Text extends FASTElement {
12216
12231
  * @param next - the next state
12217
12232
  */
12218
12233
  weightChanged(prev, next) {
12219
- if (prev) {
12220
- toggleState(this.elementInternals, prev, false);
12221
- }
12222
- if (next) {
12223
- toggleState(this.elementInternals, next, true);
12224
- }
12234
+ swapStates(this.elementInternals, prev, next, TextWeight);
12225
12235
  }
12226
12236
  /**
12227
12237
  * Handles changes to align attribute custom states
@@ -12229,12 +12239,7 @@ class Text extends FASTElement {
12229
12239
  * @param next - the next state
12230
12240
  */
12231
12241
  alignChanged(prev, next) {
12232
- if (prev) {
12233
- toggleState(this.elementInternals, prev, false);
12234
- }
12235
- if (next) {
12236
- toggleState(this.elementInternals, next, true);
12237
- }
12242
+ swapStates(this.elementInternals, prev, next, TextAlign);
12238
12243
  }
12239
12244
  connectedCallback() {
12240
12245
  super.connectedCallback();
@@ -12266,50 +12271,50 @@ class Text extends FASTElement {
12266
12271
  }
12267
12272
  }
12268
12273
  }
12269
- __decorateClass$1([attr({
12274
+ __decorateClass$2([attr({
12270
12275
  mode: "boolean"
12271
12276
  })], Text.prototype, "nowrap", 2);
12272
- __decorateClass$1([attr({
12277
+ __decorateClass$2([attr({
12273
12278
  mode: "boolean"
12274
12279
  })], Text.prototype, "truncate", 2);
12275
- __decorateClass$1([attr({
12280
+ __decorateClass$2([attr({
12276
12281
  mode: "boolean"
12277
12282
  })], Text.prototype, "italic", 2);
12278
- __decorateClass$1([attr({
12283
+ __decorateClass$2([attr({
12279
12284
  mode: "boolean"
12280
12285
  })], Text.prototype, "underline", 2);
12281
- __decorateClass$1([attr({
12286
+ __decorateClass$2([attr({
12282
12287
  mode: "boolean"
12283
12288
  })], Text.prototype, "strikethrough", 2);
12284
- __decorateClass$1([attr({
12289
+ __decorateClass$2([attr({
12285
12290
  mode: "boolean"
12286
12291
  })], Text.prototype, "block", 2);
12287
- __decorateClass$1([attr], Text.prototype, "size", 2);
12288
- __decorateClass$1([attr], Text.prototype, "font", 2);
12289
- __decorateClass$1([attr], Text.prototype, "weight", 2);
12290
- __decorateClass$1([attr], Text.prototype, "align", 2);
12292
+ __decorateClass$2([attr], Text.prototype, "size", 2);
12293
+ __decorateClass$2([attr], Text.prototype, "font", 2);
12294
+ __decorateClass$2([attr], Text.prototype, "weight", 2);
12295
+ __decorateClass$2([attr], Text.prototype, "align", 2);
12291
12296
 
12292
- const styles$1 = css`
12297
+ const styles$2 = css`
12293
12298
  ${display("inline")}
12294
12299
 
12295
12300
  :host{contain:content;font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};font-weight:${fontWeightRegular};text-align:start}:host(${nowrapState}),:host(${nowrapState}) ::slotted(*){white-space:nowrap;overflow:hidden}:host(${truncateState}),:host(${truncateState}) ::slotted(*){text-overflow:ellipsis}:host(${blockState}){display:block}:host(${italicState}){font-style:italic}:host(${underlineState}){text-decoration-line:underline}:host(${strikethroughState}){text-decoration-line:line-through}:host(${underlineState}${strikethroughState}){text-decoration-line:line-through underline}:host(${size100State}){font-size:${fontSizeBase100};line-height:${lineHeightBase100}}:host(${size200State}){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host(${size400State}){font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host(${size500State}){font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host(${size600State}){font-size:${fontSizeBase600};line-height:${lineHeightBase600}}:host(${size700State}){font-size:${fontSizeHero700};line-height:${lineHeightHero700}}:host(${size800State}){font-size:${fontSizeHero800};line-height:${lineHeightHero800}}:host(${size900State}){font-size:${fontSizeHero900};line-height:${lineHeightHero900}}:host(${size1000State}){font-size:${fontSizeHero1000};line-height:${lineHeightHero1000}}:host(${monospaceState}){font-family:${fontFamilyMonospace}}:host(${numericState}){font-family:${fontFamilyNumeric}}:host(${mediumState}){font-weight:${fontWeightMedium}}:host(${semiboldState}){font-weight:${fontWeightSemibold}}:host(${boldState}){font-weight:${fontWeightBold}}:host(${centerState}){text-align:center}:host(${endState}){text-align:end}:host(${justifyState}){text-align:justify}::slotted(*){font:inherit;line-height:inherit;text-decoration-line:inherit;text-align:inherit;text-decoration-line:inherit;margin:0}`;
12296
12301
 
12297
- const template$1 = html`<slot></slot>`;
12302
+ const template$2 = html`<slot></slot>`;
12298
12303
 
12299
- const definition$1 = Text.compose({
12304
+ const definition$2 = Text.compose({
12300
12305
  name: `${FluentDesignSystem.prefix}-text`,
12301
- template: template$1,
12302
- styles: styles$1
12306
+ template: template$2,
12307
+ styles: styles$2
12303
12308
  });
12304
12309
 
12305
- definition$1.define(FluentDesignSystem.registry);
12310
+ definition$2.define(FluentDesignSystem.registry);
12306
12311
 
12307
- var __defProp = Object.defineProperty;
12308
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12309
- var __decorateClass = (decorators, target, key, kind) => {
12310
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
12312
+ var __defProp$1 = Object.defineProperty;
12313
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
12314
+ var __decorateClass$1 = (decorators, target, key, kind) => {
12315
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
12311
12316
  for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12312
- if (kind && result) __defProp(target, key, result);
12317
+ if (kind && result) __defProp$1(target, key, result);
12313
12318
  return result;
12314
12319
  };
12315
12320
  class ToggleButton extends Button {
@@ -12356,23 +12361,212 @@ class ToggleButton extends Button {
12356
12361
  }
12357
12362
  }
12358
12363
  }
12359
- __decorateClass([attr({
12364
+ __decorateClass$1([attr({
12360
12365
  mode: "boolean"
12361
12366
  })], ToggleButton.prototype, "pressed", 2);
12362
- __decorateClass([attr({
12367
+ __decorateClass$1([attr({
12363
12368
  mode: "boolean"
12364
12369
  })], ToggleButton.prototype, "mixed", 2);
12365
12370
 
12366
- const styles = css`
12367
- ${styles$y}
12371
+ const styles$1 = css`
12372
+ ${styles$z}
12368
12373
 
12369
12374
  :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`
12370
12375
  :host(${pressedState}),:host(${pressedState}${primaryState}),:host(${pressedState}${subtleState}),:host(${pressedState}${outlineState}),:host(${pressedState}${transparentState}){background:SelectedItem;color:SelectedItemText}`));
12371
12376
 
12372
- const template = buttonTemplate$1();
12377
+ const template$1 = buttonTemplate$1();
12373
12378
 
12374
- const definition = ToggleButton.compose({
12379
+ const definition$1 = ToggleButton.compose({
12375
12380
  name: `${FluentDesignSystem.prefix}-toggle-button`,
12381
+ template: template$1,
12382
+ styles: styles$1
12383
+ });
12384
+
12385
+ definition$1.define(FluentDesignSystem.registry);
12386
+
12387
+ var __defProp = Object.defineProperty;
12388
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12389
+ var __decorateClass = (decorators, target, key, kind) => {
12390
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
12391
+ for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12392
+ if (kind && result) __defProp(target, key, result);
12393
+ return result;
12394
+ };
12395
+ const SUPPORTS_CSS_ANCHOR_POSITIONING = CSS.supports("anchor-name: --a");
12396
+ const SUPPORTS_HTML_ANCHOR_POSITIONING = "anchor" in HTMLElement.prototype;
12397
+ class Tooltip extends FASTElement {
12398
+ constructor() {
12399
+ super();
12400
+ /**
12401
+ * The attached element internals
12402
+ */
12403
+ this.elementInternals = this.attachInternals();
12404
+ this.id = uniqueId("tooltip-");
12405
+ /**
12406
+ * The default delay for the tooltip
12407
+ * @internal
12408
+ */
12409
+ this.defaultDelay = 250;
12410
+ this.anchor = "";
12411
+ /**
12412
+ * Reference to the anchor positioning style element
12413
+ * @internal
12414
+ */
12415
+ this.anchorPositioningStyleElement = null;
12416
+ /**
12417
+ * Show the tooltip on mouse enter
12418
+ */
12419
+ this.mouseenterAnchorHandler = () => this.showTooltip(this.delay);
12420
+ /**
12421
+ * Hide the tooltip on mouse leave
12422
+ */
12423
+ this.mouseleaveAnchorHandler = () => this.hideTooltip(this.delay);
12424
+ /**
12425
+ * Show the tooltip on focus
12426
+ */
12427
+ this.focusAnchorHandler = () => this.showTooltip(0);
12428
+ /**
12429
+ * Hide the tooltip on blur
12430
+ */
12431
+ this.blurAnchorHandler = () => this.hideTooltip(0);
12432
+ this.elementInternals.role = "tooltip";
12433
+ }
12434
+ /**
12435
+ * Reference to the anchor element
12436
+ * @internal
12437
+ */
12438
+ get anchorElement() {
12439
+ const rootNode = this.getRootNode();
12440
+ return (rootNode instanceof ShadowRoot ? rootNode : document).getElementById(this.anchor ?? "");
12441
+ }
12442
+ connectedCallback() {
12443
+ super.connectedCallback();
12444
+ if (!this.anchorElement) {
12445
+ return;
12446
+ }
12447
+ const anchorName = this.anchorElement.style.anchorName || `--${this.anchor}`;
12448
+ const describedBy = this.anchorElement.getAttribute("aria-describedby");
12449
+ this.anchorElement.setAttribute("aria-describedby", describedBy ? `${describedBy} ${this.id}` : this.id);
12450
+ if (SUPPORTS_CSS_ANCHOR_POSITIONING) {
12451
+ if (!SUPPORTS_HTML_ANCHOR_POSITIONING) {
12452
+ this.anchorElement.style.anchorName = anchorName;
12453
+ this.style.positionAnchor = anchorName;
12454
+ }
12455
+ } else {
12456
+ if (!this.anchorPositioningStyleElement) {
12457
+ this.anchorPositioningStyleElement = document.createElement("style");
12458
+ document.head.append(this.anchorPositioningStyleElement);
12459
+ }
12460
+ let [direction, alignment] = this.positioning?.split("-") ?? [];
12461
+ if (alignment === void 0 && (direction === "above" || direction === "below")) {
12462
+ alignment = "centerX";
12463
+ }
12464
+ if (alignment === void 0 && (direction === "before" || direction === "after")) {
12465
+ alignment = "centerY";
12466
+ }
12467
+ const directionCSSMap = {
12468
+ above: `bottom: anchor(${anchorName} top);`,
12469
+ below: `top: anchor(${anchorName} bottom);`,
12470
+ before: `right: anchor(${anchorName} left);`,
12471
+ after: `left: anchor(${anchorName} right);`
12472
+ };
12473
+ const directionCSS = directionCSSMap[direction] ?? directionCSSMap.above;
12474
+ const alignmentCSSMap = {
12475
+ start: `left: anchor(${anchorName} left);`,
12476
+ end: `right: anchor(${anchorName} right);`,
12477
+ top: `top: anchor(${anchorName} top);`,
12478
+ bottom: `bottom: anchor(${anchorName} bottom);`,
12479
+ centerX: `left: anchor(${anchorName} center); translate: -50% 0;`,
12480
+ centerY: `top: anchor(${anchorName} center); translate: 0 -50%;`
12481
+ };
12482
+ const alignmentCSS = alignmentCSSMap[alignment] ?? alignmentCSSMap.centerX;
12483
+ this.anchorPositioningStyleElement.textContent = `
12484
+ #${this.anchor} {
12485
+ anchor-name: ${anchorName};
12486
+ }
12487
+ #${this.id} {
12488
+ inset: unset;
12489
+ ${directionCSS}
12490
+ ${alignmentCSS}
12491
+ position: absolute;
12492
+ }
12493
+ `;
12494
+ if (window.CSS_ANCHOR_POLYFILL) {
12495
+ window.CSS_ANCHOR_POLYFILL.call({
12496
+ element: this.anchorPositioningStyleElement
12497
+ });
12498
+ }
12499
+ }
12500
+ this.anchorElement.addEventListener("focus", this.focusAnchorHandler);
12501
+ this.anchorElement.addEventListener("blur", this.blurAnchorHandler);
12502
+ this.anchorElement.addEventListener("mouseenter", this.mouseenterAnchorHandler);
12503
+ this.anchorElement.addEventListener("mouseleave", this.mouseleaveAnchorHandler);
12504
+ }
12505
+ disconnectedCallback() {
12506
+ super.disconnectedCallback();
12507
+ this.anchorElement?.removeEventListener("focus", this.focusAnchorHandler);
12508
+ this.anchorElement?.removeEventListener("blur", this.blurAnchorHandler);
12509
+ this.anchorElement?.removeEventListener("mouseenter", this.mouseenterAnchorHandler);
12510
+ this.anchorElement?.removeEventListener("mouseleave", this.mouseleaveAnchorHandler);
12511
+ }
12512
+ /**
12513
+ * Shows the tooltip
12514
+ * @param delay Number of milliseconds to delay showing the tooltip
12515
+ * @internal
12516
+ */
12517
+ showTooltip(delay = this.defaultDelay) {
12518
+ setTimeout(() => {
12519
+ this.setAttribute("aria-hidden", "false");
12520
+ this.showPopover();
12521
+ }, delay);
12522
+ }
12523
+ /**
12524
+ * Hide the tooltip
12525
+ * @param delay Number of milliseconds to delay hiding the tooltip
12526
+ * @internal
12527
+ */
12528
+ hideTooltip(delay = this.defaultDelay) {
12529
+ setTimeout(() => {
12530
+ if (this.matches(":hover") || this.anchorElement?.matches(":hover")) {
12531
+ this.hideTooltip(delay);
12532
+ return;
12533
+ }
12534
+ this.setAttribute("aria-hidden", "true");
12535
+ this.hidePopover();
12536
+ }, delay);
12537
+ }
12538
+ }
12539
+ __decorateClass([attr], Tooltip.prototype, "id", 2);
12540
+ __decorateClass([attr({
12541
+ converter: nullableNumberConverter
12542
+ })], Tooltip.prototype, "delay", 2);
12543
+ __decorateClass([attr], Tooltip.prototype, "positioning", 2);
12544
+ __decorateClass([attr], Tooltip.prototype, "anchor", 2);
12545
+
12546
+ const TooltipPositioningOption = {
12547
+ "above-start": "block-start span-inline-end",
12548
+ above: "block-start",
12549
+ "above-end": "block-start span-inline-start",
12550
+ "below-start": "block-end span-inline-end",
12551
+ below: "block-end",
12552
+ "below-end": "block-end span-inline-start",
12553
+ "before-top": "inline-start span-block-end",
12554
+ before: "inline-start",
12555
+ "before-bottom": "inline-start span-block-start",
12556
+ "after-top": "inline-end span-block-end",
12557
+ after: "inline-end",
12558
+ "after-bottom": "inline-end span-block-start"
12559
+ };
12560
+
12561
+ const styles = css`
12562
+ ${display("inline-flex")}
12563
+
12564
+ :host(:not(:popover-open)){display:none}:host{--position-area:block-start;--position-try-options:flip-block;--block-offset:${spacingVerticalXS};--inline-offset:${spacingHorizontalXS};background:${colorNeutralBackground1};border-radius:${borderRadiusMedium};border:1px solid ${colorTransparentStroke};box-sizing:border-box;color:${colorNeutralForeground1};display:inline-flex;filter:drop-shadow(0 0 2px ${colorNeutralShadowAmbient}) drop-shadow(0 4px 8px ${colorNeutralShadowKey});font-family:${fontFamilyBase};font-size:${fontSizeBase200};inset:unset;line-height:${lineHeightBase200};margin:unset;max-width:240px;padding:4px ${spacingHorizontalMNudge} 6px;position:absolute;position-area:var(--position-area);position-try-options:var(--position-try-options);width:auto;z-index:1}@supports (inset-area:block-start){:host{inset-area:var(--position-area);position-try-fallbacks:var(--position-try-options)}}:host(:is([positioning^='above'],[positioning^='below'],:not([positioning]))){margin-block:var(--block-offset)}:host(:is([positioning^='before'],[positioning^='after'])){margin-inline:var(--inline-offset);--position-try-options:flip-inline}:host([positioning='above-start']){--position-area:${TooltipPositioningOption["above-start"]}}:host([positioning='above']){--position-area:${TooltipPositioningOption.above}}:host([positioning='above-end']){--position-area:${TooltipPositioningOption["above-end"]}}:host([positioning='below-start']){--position-area:${TooltipPositioningOption["below-start"]}}:host([positioning='below']){--position-area:${TooltipPositioningOption.below}}:host([positioning='below-end']){--position-area:${TooltipPositioningOption.below}}:host([positioning='before-top']){--position-area:${TooltipPositioningOption["before-top"]}}:host([positioning='before']){--position-area:${TooltipPositioningOption.before}}:host([positioning='before-bottom']){--position-area:${TooltipPositioningOption["before-bottom"]}}:host([positioning='after-top']){--position-area:${TooltipPositioningOption["after-top"]}}:host([positioning='after']){--position-area:${TooltipPositioningOption.after}}:host([positioning='after-bottom']){--position-area:${TooltipPositioningOption["after-bottom"]}}`;
12565
+
12566
+ const template = html`<template popover aria-hidden="true"><slot></slot></template>`;
12567
+
12568
+ const definition = Tooltip.compose({
12569
+ name: `${FluentDesignSystem.prefix}-tooltip`,
12376
12570
  template,
12377
12571
  styles
12378
12572
  });