@fluentui/web-components 2.1.3 → 2.2.3

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.
@@ -3634,7 +3634,8 @@ function when(binding, templateOrTemplateBinding) {
3634
3634
  }
3635
3635
 
3636
3636
  const defaultRepeatOptions = Object.freeze({
3637
- positioning: false
3637
+ positioning: false,
3638
+ recycle: true
3638
3639
  });
3639
3640
 
3640
3641
  function bindWithoutPositioning(view, items, index, context) {
@@ -3778,7 +3779,7 @@ class RepeatBehavior {
3778
3779
  for (; addIndex < end; ++addIndex) {
3779
3780
  const neighbor = views[addIndex];
3780
3781
  const location = neighbor ? neighbor.firstChild : this.location;
3781
- const view = totalRemoved.length > 0 ? totalRemoved.shift() : template.create();
3782
+ const view = this.options.recycle && totalRemoved.length > 0 ? totalRemoved.shift() : template.create();
3782
3783
  views.splice(addIndex, 0, view);
3783
3784
  bindView(view, items, addIndex, childContext);
3784
3785
  view.insertBefore(location);
@@ -4176,7 +4177,7 @@ const startTemplate = html`<span part="start" ${ref("startContainer")}><slot nam
4176
4177
  * @public
4177
4178
  */
4178
4179
 
4179
- const accordionItemTemplate = (context, definition) => html`<template class="${x => x.expanded ? "expanded" : ""}" slot="item"><div class="heading" part="heading" role="heading" aria-level="${x => x.headinglevel}"><button class="button" part="button" ${ref("expandbutton")} aria-expanded="${x => x.expanded}" aria-controls="${x => x.id}-panel" id="${x => x.id}" @click="${(x, c) => x.clickHandler(c.event)}"><span class="heading"><slot name="heading" part="heading"></slot></span></button>${startSlotTemplate(context, definition)} ${endSlotTemplate(context, definition)}<span class="icon" part="icon" aria-hidden="true"><slot name="expanded-icon" part="expanded-icon">${definition.expandedIcon || ""}</slot><slot name="collapsed-icon" part="collapsed-icon">${definition.collapsedIcon || ""}</slot><span></div><div class="region" part="region" id="${x => x.id}-panel" role="region" aria-labelledby="${x => x.id}"><slot></slot></div></template>`;
4180
+ const accordionItemTemplate = (context, definition) => html`<template class="${x => x.expanded ? "expanded" : ""}"><div class="heading" part="heading" role="heading" aria-level="${x => x.headinglevel}"><button class="button" part="button" ${ref("expandbutton")} aria-expanded="${x => x.expanded}" aria-controls="${x => x.id}-panel" id="${x => x.id}" @click="${(x, c) => x.clickHandler(c.event)}"><span class="heading"><slot name="heading" part="heading"></slot></span></button>${startSlotTemplate(context, definition)} ${endSlotTemplate(context, definition)}<span class="icon" part="icon" aria-hidden="true"><slot name="expanded-icon" part="expanded-icon">${definition.expandedIcon || ""}</slot><slot name="collapsed-icon" part="collapsed-icon">${definition.collapsedIcon || ""}</slot><span></div><div class="region" part="region" id="${x => x.id}-panel" role="region" aria-labelledby="${x => x.id}"><slot></slot></div></template>`;
4180
4181
 
4181
4182
  /*! *****************************************************************************
4182
4183
  Copyright (c) Microsoft Corporation.
@@ -5904,7 +5905,12 @@ applyMixins(AccordionItem, StartEnd);
5904
5905
  * @public
5905
5906
  */
5906
5907
 
5907
- const accordionTemplate = (context, definition) => html`<template><slot name="item" part="item" ${slotted("accordionItems")}></slot></template>`;
5908
+ const accordionTemplate = (context, definition) =>
5909
+ /* TODO: deprecate slot name `item` to only support default slot https://github.com/microsoft/fast/issues/5515 */
5910
+ html`<template><slot ${slotted({
5911
+ property: "accordionItems",
5912
+ filter: elements()
5913
+ })}></slot><slot name="item" part="item" ${slotted("accordionItems")}></slot></template>`;
5908
5914
 
5909
5915
  var Orientation;
5910
5916
 
@@ -6112,12 +6118,12 @@ const ArrowKeys = {
6112
6118
  /**
6113
6119
  * Expose ltr and rtl strings
6114
6120
  */
6115
- var Direction$1;
6121
+ var Direction;
6116
6122
 
6117
6123
  (function (Direction) {
6118
6124
  Direction["ltr"] = "ltr";
6119
6125
  Direction["rtl"] = "rtl";
6120
- })(Direction$1 || (Direction$1 = {}));
6126
+ })(Direction || (Direction = {}));
6121
6127
 
6122
6128
  /**
6123
6129
  * This method keeps a given value within the bounds of a min and max value. If the value
@@ -6151,6 +6157,28 @@ function uniqueId(prefix = "") {
6151
6157
  return `${prefix}${uniqueIdCounter++}`;
6152
6158
  }
6153
6159
 
6160
+ /**
6161
+ * Define system colors for use in CSS stylesheets.
6162
+ *
6163
+ * https://drafts.csswg.org/css-color/#css-system-colors
6164
+ */
6165
+ var SystemColors;
6166
+
6167
+ (function (SystemColors) {
6168
+ SystemColors["Canvas"] = "Canvas";
6169
+ SystemColors["CanvasText"] = "CanvasText";
6170
+ SystemColors["LinkText"] = "LinkText";
6171
+ SystemColors["VisitedText"] = "VisitedText";
6172
+ SystemColors["ActiveText"] = "ActiveText";
6173
+ SystemColors["ButtonFace"] = "ButtonFace";
6174
+ SystemColors["ButtonText"] = "ButtonText";
6175
+ SystemColors["Field"] = "Field";
6176
+ SystemColors["FieldText"] = "FieldText";
6177
+ SystemColors["Highlight"] = "Highlight";
6178
+ SystemColors["HighlightText"] = "HighlightText";
6179
+ SystemColors["GrayText"] = "GrayText";
6180
+ })(SystemColors || (SystemColors = {}));
6181
+
6154
6182
  /**
6155
6183
  * Expand mode for {@link Accordion}
6156
6184
  * @public
@@ -6562,7 +6590,7 @@ const anchoredRegionTemplate = (context, definition) => html`<template class="${
6562
6590
 
6563
6591
  const getDirection = rootNode => {
6564
6592
  const dirNode = rootNode.closest("[dir]");
6565
- return dirNode !== null && dirNode.dir === "rtl" ? Direction$1.rtl : Direction$1.ltr;
6593
+ return dirNode !== null && dirNode.dir === "rtl" ? Direction.rtl : Direction.ltr;
6566
6594
  };
6567
6595
 
6568
6596
  /**
@@ -6850,7 +6878,7 @@ class AnchoredRegion extends FoundationElement {
6850
6878
  this.baseVerticalOffset = 0;
6851
6879
  this.pendingPositioningUpdate = false;
6852
6880
  this.pendingReset = false;
6853
- this.currentDirection = Direction$1.ltr;
6881
+ this.currentDirection = Direction.ltr;
6854
6882
  this.regionVisible = false; // indicates that a layout update should occur even if geometry has not changed
6855
6883
  // used to ensure some attribute changes are applied
6856
6884
 
@@ -7079,7 +7107,7 @@ class AnchoredRegion extends FoundationElement {
7079
7107
  return;
7080
7108
  }
7081
7109
 
7082
- if (this.currentDirection === Direction$1.ltr) {
7110
+ if (this.currentDirection === Direction.ltr) {
7083
7111
  dirCorrectedHorizontalDefaultPosition = dirCorrectedHorizontalDefaultPosition === "start" ? "left" : "right";
7084
7112
  } else {
7085
7113
  dirCorrectedHorizontalDefaultPosition = dirCorrectedHorizontalDefaultPosition === "start" ? "right" : "left";
@@ -8480,10 +8508,23 @@ class FormAssociatedButton extends FormAssociated(_Button) {
8480
8508
  class Button$1 extends FormAssociatedButton {
8481
8509
  constructor() {
8482
8510
  super(...arguments);
8511
+ /**
8512
+ * Prevent events to propagate if disabled and has no slotted content wrapped in HTML elements
8513
+ * @internal
8514
+ */
8515
+
8516
+ this.handleClick = e => {
8517
+ var _a;
8518
+
8519
+ if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {
8520
+ e.stopPropagation();
8521
+ }
8522
+ };
8483
8523
  /**
8484
8524
  * Submits the parent form
8485
8525
  */
8486
8526
 
8527
+
8487
8528
  this.handleSubmission = () => {
8488
8529
  if (!this.form) {
8489
8530
  return;
@@ -8578,9 +8619,35 @@ class Button$1 extends FormAssociatedButton {
8578
8619
 
8579
8620
 
8580
8621
  connectedCallback() {
8622
+ var _a;
8623
+
8581
8624
  super.connectedCallback();
8582
8625
  this.proxy.setAttribute("type", this.type);
8583
8626
  this.handleUnsupportedDelegatesFocus();
8627
+ const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
8628
+
8629
+ if (elements) {
8630
+ elements.forEach(span => {
8631
+ span.addEventListener("click", this.handleClick);
8632
+ });
8633
+ }
8634
+ }
8635
+ /**
8636
+ * @internal
8637
+ */
8638
+
8639
+
8640
+ disconnectedCallback() {
8641
+ var _a;
8642
+
8643
+ super.disconnectedCallback();
8644
+ const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
8645
+
8646
+ if (elements) {
8647
+ elements.forEach(span => {
8648
+ span.removeEventListener("click", this.handleClick);
8649
+ });
8650
+ }
8584
8651
  }
8585
8652
 
8586
8653
  }
@@ -10341,28 +10408,6 @@ __decorate$1([observable], Checkbox.prototype, "defaultSlottedNodes", void 0);
10341
10408
 
10342
10409
  __decorate$1([observable], Checkbox.prototype, "indeterminate", void 0);
10343
10410
 
10344
- /**
10345
- * Positioning directions for the listbox when a select is open.
10346
- * @public
10347
- */
10348
- var SelectPosition;
10349
-
10350
- (function (SelectPosition) {
10351
- SelectPosition["above"] = "above";
10352
- SelectPosition["below"] = "below";
10353
- })(SelectPosition || (SelectPosition = {}));
10354
- /**
10355
- * Select role.
10356
- * @public
10357
- */
10358
-
10359
-
10360
- var SelectRole;
10361
-
10362
- (function (SelectRole) {
10363
- SelectRole["combobox"] = "combobox";
10364
- })(SelectRole || (SelectRole = {}));
10365
-
10366
10411
  /**
10367
10412
  * Determines if the element is a {@link (ListboxOption:class)}
10368
10413
  *
@@ -10428,6 +10473,24 @@ class ListboxOption extends FoundationElement {
10428
10473
  this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);
10429
10474
  this.proxy.disabled = this.disabled;
10430
10475
  }
10476
+ /**
10477
+ * Updates the ariaChecked property when the checked property changes.
10478
+ *
10479
+ * @param prev - the previous checked value
10480
+ * @param next - the current checked value
10481
+ *
10482
+ * @public
10483
+ */
10484
+
10485
+
10486
+ checkedChanged(prev, next) {
10487
+ if (typeof next === "boolean") {
10488
+ this.ariaChecked = next ? "true" : "false";
10489
+ return;
10490
+ }
10491
+
10492
+ this.ariaChecked = undefined;
10493
+ }
10431
10494
 
10432
10495
  defaultSelectedChanged() {
10433
10496
  if (!this.dirtySelected) {
@@ -10440,6 +10503,8 @@ class ListboxOption extends FoundationElement {
10440
10503
  }
10441
10504
 
10442
10505
  disabledChanged(prev, next) {
10506
+ this.ariaDisabled = this.disabled ? "true" : "false";
10507
+
10443
10508
  if (this.proxy instanceof HTMLOptionElement) {
10444
10509
  this.proxy.disabled = this.disabled;
10445
10510
  }
@@ -10454,14 +10519,14 @@ class ListboxOption extends FoundationElement {
10454
10519
  }
10455
10520
 
10456
10521
  selectedChanged() {
10457
- if (this.$fastController.isConnected) {
10458
- if (!this.dirtySelected) {
10459
- this.dirtySelected = true;
10460
- }
10522
+ this.ariaSelected = this.selected ? "true" : "false";
10461
10523
 
10462
- if (this.proxy instanceof HTMLOptionElement) {
10463
- this.proxy.selected = this.selected;
10464
- }
10524
+ if (!this.dirtySelected) {
10525
+ this.dirtySelected = true;
10526
+ }
10527
+
10528
+ if (this.proxy instanceof HTMLOptionElement) {
10529
+ this.proxy.selected = this.selected;
10465
10530
  }
10466
10531
  }
10467
10532
 
@@ -10504,6 +10569,8 @@ class ListboxOption extends FoundationElement {
10504
10569
 
10505
10570
  }
10506
10571
 
10572
+ __decorate$1([observable], ListboxOption.prototype, "checked", void 0);
10573
+
10507
10574
  __decorate$1([observable], ListboxOption.prototype, "defaultSelected", void 0);
10508
10575
 
10509
10576
  __decorate$1([attr({
@@ -10521,18 +10588,25 @@ __decorate$1([attr({
10521
10588
  attribute: "value",
10522
10589
  mode: "fromView"
10523
10590
  })], ListboxOption.prototype, "initialValue", void 0);
10524
-
10525
- applyMixins(ListboxOption, StartEnd);
10526
-
10527
10591
  /**
10528
- * Listbox role.
10592
+ * States and properties relating to the ARIA `option` role.
10593
+ *
10529
10594
  * @public
10530
10595
  */
10531
- var ListboxRole;
10532
10596
 
10533
- (function (ListboxRole) {
10534
- ListboxRole["listbox"] = "listbox";
10535
- })(ListboxRole || (ListboxRole = {}));
10597
+
10598
+ class DelegatesARIAListboxOption {}
10599
+
10600
+ __decorate$1([observable], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
10601
+
10602
+ __decorate$1([observable], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
10603
+
10604
+ __decorate$1([observable], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
10605
+
10606
+ __decorate$1([observable], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
10607
+
10608
+ applyMixins(DelegatesARIAListboxOption, ARIAGlobalStatesAndProperties);
10609
+ applyMixins(ListboxOption, StartEnd, DelegatesARIAListboxOption);
10536
10610
 
10537
10611
  /**
10538
10612
  * A Listbox Custom HTML Element.
@@ -10541,125 +10615,85 @@ var ListboxRole;
10541
10615
  * @public
10542
10616
  */
10543
10617
 
10544
- class Listbox extends FoundationElement {
10618
+ class Listbox$1 extends FoundationElement {
10545
10619
  constructor() {
10546
10620
  super(...arguments);
10547
10621
  /**
10548
- * The index of the selected option
10622
+ * The internal unfiltered list of selectable options.
10549
10623
  *
10550
- * @public
10551
- */
10552
-
10553
- this.selectedIndex = -1;
10554
- /**
10555
- * @internal
10556
- */
10557
-
10558
- this.typeaheadBuffer = "";
10559
- /**
10560
10624
  * @internal
10561
10625
  */
10562
10626
 
10563
- this.typeaheadTimeout = -1;
10627
+ this._options = [];
10564
10628
  /**
10565
- * Flag for the typeahead timeout expiration.
10629
+ * The index of the selected option.
10566
10630
  *
10567
- * @internal
10631
+ * @public
10568
10632
  */
10569
10633
 
10570
- this.typeAheadExpired = true;
10634
+ this.selectedIndex = -1;
10571
10635
  /**
10572
- * The role of the element.
10636
+ * A collection of the selected options.
10573
10637
  *
10574
10638
  * @public
10575
- * @remarks
10576
- * HTML Attribute: role
10577
10639
  */
10578
10640
 
10579
- this.role = ListboxRole.listbox;
10641
+ this.selectedOptions = [];
10580
10642
  /**
10581
- * The internal unfiltered list of selectable options.
10643
+ * A standard `click` event creates a `focus` event before firing, so a
10644
+ * `mousedown` event is used to skip that initial focus.
10582
10645
  *
10583
10646
  * @internal
10584
10647
  */
10585
10648
 
10586
- this._options = [];
10649
+ this.shouldSkipFocus = false;
10587
10650
  /**
10588
- * A collection of the selected options.
10651
+ * The current typeahead buffer string.
10589
10652
  *
10590
- * @public
10653
+ * @internal
10591
10654
  */
10592
10655
 
10593
- this.selectedOptions = [];
10656
+ this.typeaheadBuffer = "";
10594
10657
  /**
10595
- * A standard `click` event creates a `focus` event before firing, so a
10596
- * `mousedown` event is used to skip that initial focus.
10658
+ * Flag for the typeahead timeout expiration.
10597
10659
  *
10598
10660
  * @internal
10599
10661
  */
10600
10662
 
10601
- this.shouldSkipFocus = false;
10663
+ this.typeaheadExpired = true;
10602
10664
  /**
10603
- * Move focus to an option whose label matches characters typed by the user.
10604
- * Consecutive keystrokes are batched into a buffer of search text used
10605
- * to match against the set of options. If TYPE_AHEAD_TIMEOUT_MS passes
10606
- * between consecutive keystrokes, the search restarts.
10665
+ * The timeout ID for the typeahead handler.
10607
10666
  *
10608
- * @param key - the key to be evaluated
10667
+ * @internal
10609
10668
  */
10610
10669
 
10611
- this.handleTypeAhead = key => {
10612
- if (this.typeaheadTimeout) {
10613
- window.clearTimeout(this.typeaheadTimeout);
10614
- }
10615
-
10616
- this.typeaheadTimeout = window.setTimeout(() => this.typeAheadExpired = true, Listbox.TYPE_AHEAD_TIMEOUT_MS);
10617
-
10618
- if (key.length > 1) {
10619
- return;
10620
- }
10621
-
10622
- this.typeaheadBuffer = `${this.typeAheadExpired ? "" : this.typeaheadBuffer}${key}`;
10623
- };
10624
- }
10625
-
10626
- selectedIndexChanged(prev, next) {
10627
- this.setSelectedOptions();
10670
+ this.typeaheadTimeout = -1;
10628
10671
  }
10672
+ /**
10673
+ * The first selected option.
10674
+ *
10675
+ * @internal
10676
+ */
10629
10677
 
10630
- typeaheadBufferChanged(prev, next) {
10631
- if (this.$fastController.isConnected) {
10632
- const pattern = this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&");
10633
- const re = new RegExp(`^${pattern}`, "gi");
10634
- const filteredOptions = this.options.filter(o => o.text.trim().match(re));
10635
-
10636
- if (filteredOptions.length) {
10637
- const selectedIndex = this.options.indexOf(filteredOptions[0]);
10638
10678
 
10639
- if (selectedIndex > -1) {
10640
- this.selectedIndex = selectedIndex;
10641
- }
10642
- }
10679
+ get firstSelectedOption() {
10680
+ var _a;
10643
10681
 
10644
- this.typeAheadExpired = false;
10645
- }
10682
+ return (_a = this.selectedOptions[0]) !== null && _a !== void 0 ? _a : null;
10646
10683
  }
10684
+ /**
10685
+ * The number of options.
10686
+ *
10687
+ * @public
10688
+ */
10647
10689
 
10648
- slottedOptionsChanged(prev, next) {
10649
- if (this.$fastController.isConnected) {
10650
- this.options = next.reduce((options, item) => {
10651
- if (isListboxOption(item)) {
10652
- options.push(item);
10653
- }
10654
10690
 
10655
- return options;
10656
- }, []);
10657
- this.options.forEach(o => {
10658
- o.id = o.id || uniqueId("option-");
10659
- });
10660
- this.setSelectedOptions();
10661
- this.setDefaultSelectedOption();
10691
+ get length() {
10692
+ if (this.options) {
10693
+ return this.options.length;
10662
10694
  }
10695
+
10696
+ return 0;
10663
10697
  }
10664
10698
  /**
10665
10699
  * The list of options.
@@ -10677,23 +10711,39 @@ class Listbox extends FoundationElement {
10677
10711
  this._options = value;
10678
10712
  Observable.notify(this, "options");
10679
10713
  }
10714
+ /**
10715
+ * Flag for the typeahead timeout expiration.
10716
+ *
10717
+ * @deprecated use `Listbox.typeaheadExpired`
10718
+ * @internal
10719
+ */
10680
10720
 
10681
- selectedOptionsChanged(prev, next) {
10682
- if (this.$fastController.isConnected) {
10683
- this.options.forEach(o => {
10684
- o.selected = next.includes(o);
10685
- });
10686
- }
10721
+
10722
+ get typeAheadExpired() {
10723
+ return this.typeaheadExpired;
10724
+ }
10725
+
10726
+ set typeAheadExpired(value) {
10727
+ this.typeaheadExpired = value;
10687
10728
  }
10688
10729
  /**
10730
+ * Handle click events for listbox options.
10731
+ *
10689
10732
  * @internal
10690
10733
  */
10691
10734
 
10692
10735
 
10693
- get firstSelectedOption() {
10694
- return this.selectedOptions[0];
10736
+ clickHandler(e) {
10737
+ const captured = e.target.closest(`option,[role=option]`);
10738
+
10739
+ if (captured && !captured.disabled) {
10740
+ this.selectedIndex = this.options.indexOf(captured);
10741
+ return true;
10742
+ }
10695
10743
  }
10696
10744
  /**
10745
+ * Focus the first selected option and scroll it into view.
10746
+ *
10697
10747
  * @internal
10698
10748
  */
10699
10749
 
@@ -10709,6 +10759,10 @@ class Listbox extends FoundationElement {
10709
10759
  }
10710
10760
  }
10711
10761
  /**
10762
+ * Handles `focusin` actions for the component. When the component receives focus,
10763
+ * the list of selected options is refreshed and the first selected option is scrolled
10764
+ * into view.
10765
+ *
10712
10766
  * @internal
10713
10767
  */
10714
10768
 
@@ -10722,123 +10776,30 @@ class Listbox extends FoundationElement {
10722
10776
  this.shouldSkipFocus = false;
10723
10777
  }
10724
10778
  /**
10725
- * Prevents `focusin` events from firing before `click` events when the
10726
- * element is unfocused.
10779
+ * Moves focus to an option whose label matches characters typed by the user.
10780
+ * Consecutive keystrokes are batched into a buffer of search text used
10781
+ * to match against the set of options. If `TYPE_AHEAD_TIMEOUT_MS` passes
10782
+ * between consecutive keystrokes, the search restarts.
10727
10783
  *
10728
- * @internal
10729
- */
10730
-
10731
-
10732
- mousedownHandler(e) {
10733
- this.shouldSkipFocus = !this.contains(document.activeElement);
10734
- return true;
10735
- }
10736
- /**
10737
- * @internal
10784
+ * @param key - the key to be evaluated
10738
10785
  */
10739
10786
 
10740
10787
 
10741
- setDefaultSelectedOption() {
10742
- if (this.options && this.$fastController.isConnected) {
10743
- const selectedIndex = this.options.findIndex(el => el.getAttribute("selected") !== null);
10744
-
10745
- if (selectedIndex !== -1) {
10746
- this.selectedIndex = selectedIndex;
10747
- return;
10748
- }
10749
-
10750
- this.selectedIndex = 0;
10788
+ handleTypeAhead(key) {
10789
+ if (this.typeaheadTimeout) {
10790
+ window.clearTimeout(this.typeaheadTimeout);
10751
10791
  }
10752
- }
10753
- /**
10754
- * Sets an option as selected and gives it focus.
10755
- *
10756
- * @param index - option index to select
10757
- * @public
10758
- */
10759
10792
 
10793
+ this.typeaheadTimeout = window.setTimeout(() => this.typeaheadExpired = true, Listbox$1.TYPE_AHEAD_TIMEOUT_MS);
10760
10794
 
10761
- setSelectedOptions() {
10762
- if (this.$fastController.isConnected && this.options) {
10763
- const selectedOption = this.options[this.selectedIndex] || null;
10764
- this.selectedOptions = this.options.filter(el => el.isSameNode(selectedOption));
10765
- this.ariaActiveDescendant = this.firstSelectedOption ? this.firstSelectedOption.id : "";
10766
- this.focusAndScrollOptionIntoView();
10795
+ if (key.length > 1) {
10796
+ return;
10767
10797
  }
10768
- }
10769
- /**
10770
- * Moves focus to the first selectable option
10771
- *
10772
- * @public
10773
- */
10774
-
10775
10798
 
10776
- selectFirstOption() {
10777
- if (!this.disabled) {
10778
- this.selectedIndex = 0;
10779
- }
10799
+ this.typeaheadBuffer = `${this.typeaheadExpired ? "" : this.typeaheadBuffer}${key}`;
10780
10800
  }
10781
10801
  /**
10782
- * Moves focus to the last selectable option
10783
- *
10784
- * @internal
10785
- */
10786
-
10787
-
10788
- selectLastOption() {
10789
- if (!this.disabled) {
10790
- this.selectedIndex = this.options.length - 1;
10791
- }
10792
- }
10793
- /**
10794
- * Moves focus to the next selectable option
10795
- *
10796
- * @internal
10797
- */
10798
-
10799
-
10800
- selectNextOption() {
10801
- if (!this.disabled && this.options && this.selectedIndex < this.options.length - 1) {
10802
- this.selectedIndex += 1;
10803
- }
10804
- }
10805
-
10806
- get length() {
10807
- if (this.options) {
10808
- return this.options.length;
10809
- }
10810
-
10811
- return 0;
10812
- }
10813
- /**
10814
- * Moves focus to the previous selectable option
10815
- *
10816
- * @internal
10817
- */
10818
-
10819
-
10820
- selectPreviousOption() {
10821
- if (!this.disabled && this.selectedIndex > 0) {
10822
- this.selectedIndex = this.selectedIndex - 1;
10823
- }
10824
- }
10825
- /**
10826
- * Handles click events for listbox options
10827
- *
10828
- * @internal
10829
- */
10830
-
10831
-
10832
- clickHandler(e) {
10833
- const captured = e.target.closest(`option,[role=option]`);
10834
-
10835
- if (captured && !captured.disabled) {
10836
- this.selectedIndex = this.options.indexOf(captured);
10837
- return true;
10838
- }
10839
- }
10840
- /**
10841
- * Handles keydown actions for listbox navigation and typeahead
10802
+ * Handles `keydown` actions for listbox navigation and typeahead.
10842
10803
  *
10843
10804
  * @internal
10844
10805
  */
@@ -10854,7 +10815,7 @@ class Listbox extends FoundationElement {
10854
10815
 
10855
10816
  switch (key) {
10856
10817
  // Select the first available option
10857
- case "Home":
10818
+ case keyHome:
10858
10819
  {
10859
10820
  if (!e.shiftKey) {
10860
10821
  e.preventDefault();
@@ -10865,7 +10826,7 @@ class Listbox extends FoundationElement {
10865
10826
  }
10866
10827
  // Select the next selectable option
10867
10828
 
10868
- case "ArrowDown":
10829
+ case keyArrowDown:
10869
10830
  {
10870
10831
  if (!e.shiftKey) {
10871
10832
  e.preventDefault();
@@ -10876,7 +10837,7 @@ class Listbox extends FoundationElement {
10876
10837
  }
10877
10838
  // Select the previous selectable option
10878
10839
 
10879
- case "ArrowUp":
10840
+ case keyArrowUp:
10880
10841
  {
10881
10842
  if (!e.shiftKey) {
10882
10843
  e.preventDefault();
@@ -10887,28 +10848,28 @@ class Listbox extends FoundationElement {
10887
10848
  }
10888
10849
  // Select the last available option
10889
10850
 
10890
- case "End":
10851
+ case keyEnd:
10891
10852
  {
10892
10853
  e.preventDefault();
10893
10854
  this.selectLastOption();
10894
10855
  break;
10895
10856
  }
10896
10857
 
10897
- case "Tab":
10858
+ case keyTab:
10898
10859
  {
10899
10860
  this.focusAndScrollOptionIntoView();
10900
10861
  return true;
10901
10862
  }
10902
10863
 
10903
- case "Enter":
10904
- case "Escape":
10864
+ case keyEnter:
10865
+ case keyEscape:
10905
10866
  {
10906
10867
  return true;
10907
10868
  }
10908
10869
 
10909
- case " ":
10870
+ case keySpace:
10910
10871
  {
10911
- if (this.typeAheadExpired) {
10872
+ if (this.typeaheadExpired) {
10912
10873
  return true;
10913
10874
  }
10914
10875
  }
@@ -10924,67 +10885,309 @@ class Listbox extends FoundationElement {
10924
10885
  }
10925
10886
  }
10926
10887
  }
10888
+ /**
10889
+ * Prevents `focusin` events from firing before `click` events when the
10890
+ * element is unfocused.
10891
+ *
10892
+ * @internal
10893
+ */
10894
+
10895
+
10896
+ mousedownHandler(e) {
10897
+ this.shouldSkipFocus = !this.contains(document.activeElement);
10898
+ return true;
10899
+ }
10900
+ /**
10901
+ * Updates the list of selected options when the `selectedIndex` changes.
10902
+ *
10903
+ * @param prev - the previous selected index value
10904
+ * @param next - the current selected index value
10905
+ *
10906
+ * @internal
10907
+ */
10908
+
10909
+
10910
+ selectedIndexChanged(prev, next) {
10911
+ this.setSelectedOptions();
10912
+ }
10913
+ /**
10914
+ * Updates the selectedness of each option when the list of selected options changes.
10915
+ *
10916
+ * @param prev - the previous list of selected options
10917
+ * @param next - the current list of selected options
10918
+ *
10919
+ * @internal
10920
+ */
10921
+
10922
+
10923
+ selectedOptionsChanged(prev, next) {
10924
+ if (this.$fastController.isConnected) {
10925
+ this.options.forEach(o => {
10926
+ o.selected = next.includes(o);
10927
+ });
10928
+ }
10929
+ }
10930
+ /**
10931
+ * Moves focus to the first selectable option.
10932
+ *
10933
+ * @public
10934
+ */
10935
+
10936
+
10937
+ selectFirstOption() {
10938
+ if (!this.disabled) {
10939
+ this.selectedIndex = 0;
10940
+ }
10941
+ }
10942
+ /**
10943
+ * Moves focus to the last selectable option.
10944
+ *
10945
+ * @internal
10946
+ */
10947
+
10948
+
10949
+ selectLastOption() {
10950
+ if (!this.disabled) {
10951
+ this.selectedIndex = this.options.length - 1;
10952
+ }
10953
+ }
10954
+ /**
10955
+ * Moves focus to the next selectable option.
10956
+ *
10957
+ * @internal
10958
+ */
10959
+
10960
+
10961
+ selectNextOption() {
10962
+ if (!this.disabled && this.options && this.selectedIndex < this.options.length - 1) {
10963
+ this.selectedIndex += 1;
10964
+ }
10965
+ }
10966
+ /**
10967
+ * Moves focus to the previous selectable option.
10968
+ *
10969
+ * @internal
10970
+ */
10971
+
10972
+
10973
+ selectPreviousOption() {
10974
+ if (!this.disabled && this.selectedIndex > 0) {
10975
+ this.selectedIndex = this.selectedIndex - 1;
10976
+ }
10977
+ }
10978
+ /**
10979
+ * Updates the selected index to match the first selected option.
10980
+ *
10981
+ * @internal
10982
+ */
10983
+
10984
+
10985
+ setDefaultSelectedOption() {
10986
+ if (this.options && this.$fastController.isConnected) {
10987
+ const selectedIndex = this.options.findIndex(el => el.getAttribute("selected") !== null);
10988
+
10989
+ if (selectedIndex !== -1) {
10990
+ this.selectedIndex = selectedIndex;
10991
+ return;
10992
+ }
10993
+
10994
+ this.selectedIndex = 0;
10995
+ }
10996
+ }
10997
+ /**
10998
+ * Sets the selected option and gives it focus.
10999
+ *
11000
+ * @public
11001
+ */
11002
+
11003
+
11004
+ setSelectedOptions() {
11005
+ var _a, _b, _c;
11006
+
11007
+ if (this.$fastController.isConnected && this.options) {
11008
+ const selectedOption = (_a = this.options[this.selectedIndex]) !== null && _a !== void 0 ? _a : null;
11009
+ this.selectedOptions = this.options.filter(el => el.isSameNode(selectedOption));
11010
+ this.ariaActiveDescendant = (_c = (_b = this.firstSelectedOption) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : "";
11011
+ this.focusAndScrollOptionIntoView();
11012
+ }
11013
+ }
11014
+ /**
11015
+ * Updates the list of options and resets the selected option when the slotted option content changes.
11016
+ *
11017
+ * @param prev - the previous list of slotted options
11018
+ * @param next - the current list of slotted options
11019
+ *
11020
+ * @internal
11021
+ */
11022
+
11023
+
11024
+ slottedOptionsChanged(prev, next) {
11025
+ this.options = next.reduce((options, item) => {
11026
+ if (isListboxOption(item)) {
11027
+ options.push(item);
11028
+ }
11029
+
11030
+ return options;
11031
+ }, []);
11032
+ const setSize = `${this.options.length}`;
11033
+ this.options.forEach((option, index) => {
11034
+ if (!option.id) {
11035
+ option.id = uniqueId("option-");
11036
+ }
11037
+
11038
+ option.ariaPosInSet = `${index + 1}`;
11039
+ option.ariaSetSize = setSize;
11040
+ });
11041
+
11042
+ if (this.$fastController.isConnected) {
11043
+ this.setSelectedOptions();
11044
+ this.setDefaultSelectedOption();
11045
+ }
11046
+ }
11047
+ /**
11048
+ * Updates the filtered list of options when the typeahead buffer changes.
11049
+ *
11050
+ * @param prev - the previous typeahead buffer value
11051
+ * @param next - the current typeahead buffer value
11052
+ *
11053
+ * @internal
11054
+ */
11055
+
11056
+
11057
+ typeaheadBufferChanged(prev, next) {
11058
+ if (this.$fastController.isConnected) {
11059
+ const pattern = this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&");
11060
+ const re = new RegExp(`^${pattern}`, "gi");
11061
+ const filteredOptions = this.options.filter(o => o.text.trim().match(re));
11062
+
11063
+ if (filteredOptions.length) {
11064
+ const selectedIndex = this.options.indexOf(filteredOptions[0]);
11065
+
11066
+ if (selectedIndex > -1) {
11067
+ this.selectedIndex = selectedIndex;
11068
+ }
11069
+ }
11070
+
11071
+ this.typeaheadExpired = false;
11072
+ }
11073
+ }
10927
11074
 
10928
11075
  }
11076
+ /**
11077
+ * A static filter to include only selectable options.
11078
+ *
11079
+ * @param n - element to filter
11080
+ * @public
11081
+ */
11082
+
11083
+ Listbox$1.slottedOptionFilter = n => isListboxOption(n) && !n.disabled && !n.hidden;
10929
11084
  /**
10930
11085
  * Typeahead timeout in milliseconds.
10931
11086
  *
10932
11087
  * @internal
10933
11088
  */
10934
11089
 
10935
- Listbox.TYPE_AHEAD_TIMEOUT_MS = 1000;
11090
+
11091
+ Listbox$1.TYPE_AHEAD_TIMEOUT_MS = 1000;
11092
+
11093
+ __decorate$1([attr({
11094
+ mode: "boolean"
11095
+ })], Listbox$1.prototype, "disabled", void 0);
11096
+
11097
+ __decorate$1([observable], Listbox$1.prototype, "selectedIndex", void 0);
11098
+
11099
+ __decorate$1([observable], Listbox$1.prototype, "selectedOptions", void 0);
11100
+
11101
+ __decorate$1([observable], Listbox$1.prototype, "slottedOptions", void 0);
11102
+
11103
+ __decorate$1([observable], Listbox$1.prototype, "typeaheadBuffer", void 0);
10936
11104
  /**
10937
- * A static filter to include only enabled elements
11105
+ * Includes ARIA states and properties relating to the ARIA listbox role
10938
11106
  *
10939
- * @param n - element to filter
10940
11107
  * @public
10941
11108
  */
10942
11109
 
10943
- Listbox.slottedOptionFilter = n => isListboxOption(n) && !n.disabled && !n.hidden;
10944
11110
 
10945
- __decorate$1([observable], Listbox.prototype, "selectedIndex", void 0);
11111
+ class DelegatesARIAListbox {}
10946
11112
 
10947
- __decorate$1([observable], Listbox.prototype, "typeaheadBuffer", void 0);
11113
+ __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaActiveDescendant", void 0);
10948
11114
 
10949
- __decorate$1([attr], Listbox.prototype, "role", void 0);
11115
+ __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaDisabled", void 0);
10950
11116
 
10951
- __decorate$1([attr({
10952
- mode: "boolean"
10953
- })], Listbox.prototype, "disabled", void 0);
11117
+ __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaExpanded", void 0);
10954
11118
 
10955
- __decorate$1([observable], Listbox.prototype, "slottedOptions", void 0);
11119
+ applyMixins(DelegatesARIAListbox, ARIAGlobalStatesAndProperties);
11120
+ applyMixins(Listbox$1, DelegatesARIAListbox);
10956
11121
 
10957
- __decorate$1([observable], Listbox.prototype, "selectedOptions", void 0);
10958
11122
  /**
10959
- * Includes ARIA states and properties relating to the ARIA listbox role
11123
+ * A Listbox Custom HTML Element.
11124
+ * Implements the {@link https://w3c.github.io/aria/#listbox | ARIA listbox }.
10960
11125
  *
10961
11126
  * @public
10962
11127
  */
10963
11128
 
11129
+ class ListboxElement extends Listbox$1 {
11130
+ /**
11131
+ * Prevents `focusin` events from firing before `click` events when the
11132
+ * element is unfocused.
11133
+ *
11134
+ * @override
11135
+ * @internal
11136
+ */
11137
+ mousedownHandler(e) {
11138
+ if (e.offsetX >= 0 && e.offsetX <= this.scrollWidth) {
11139
+ return super.mousedownHandler(e);
11140
+ }
11141
+ }
11142
+ /**
11143
+ * Ensures the size is a positive integer when the property is updated.
11144
+ *
11145
+ * @param prev - the previous size value
11146
+ * @param next - the current size value
11147
+ *
11148
+ * @internal
11149
+ */
10964
11150
 
10965
- class DelegatesARIAListbox {
10966
- constructor() {
10967
- /**
10968
- * See {@link https://www.w3.org/WAI/PF/aria/roles#listbox} for more information
10969
- * @public
10970
- * @remarks
10971
- * HTML Attribute: aria-activedescendant
10972
- */
10973
- this.ariaActiveDescendant = "";
11151
+
11152
+ sizeChanged(prev, next) {
11153
+ const size = Math.max(0, parseInt(next.toFixed(), 10));
11154
+
11155
+ if (size !== next) {
11156
+ DOM.queueUpdate(() => {
11157
+ this.size = size;
11158
+ });
11159
+ }
10974
11160
  }
10975
11161
 
10976
11162
  }
10977
11163
 
10978
- __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaActiveDescendant", void 0);
11164
+ __decorate$1([attr({
11165
+ converter: nullableNumberConverter
11166
+ })], ListboxElement.prototype, "size", void 0);
10979
11167
 
10980
- __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaDisabled", void 0);
11168
+ /**
11169
+ * The template for the {@link @microsoft/fast-foundation#(Listbox:class)} component.
11170
+ * @public
11171
+ */
10981
11172
 
10982
- __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaExpanded", void 0);
11173
+ const listboxTemplate = (context, definition) => html`<template aria-activedescendant="${x => x.ariaActiveDescendant}" class="listbox" role="listbox" tabindex="${x => !x.disabled ? "0" : null}" @click="${(x, c) => x.clickHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" @mousedown="${(x, c) => x.mousedownHandler(c.event)}"><slot ${slotted({
11174
+ filter: ListboxElement.slottedOptionFilter,
11175
+ flatten: true,
11176
+ property: "slottedOptions"
11177
+ })}></slot></template>`;
10983
11178
 
10984
- applyMixins(DelegatesARIAListbox, ARIAGlobalStatesAndProperties);
10985
- applyMixins(Listbox, DelegatesARIAListbox);
11179
+ /**
11180
+ * Positioning directions for the listbox when a select is open.
11181
+ * @public
11182
+ */
11183
+ var SelectPosition;
10986
11184
 
10987
- class _Combobox extends Listbox {}
11185
+ (function (SelectPosition) {
11186
+ SelectPosition["above"] = "above";
11187
+ SelectPosition["below"] = "below";
11188
+ })(SelectPosition || (SelectPosition = {}));
11189
+
11190
+ class _Combobox extends Listbox$1 {}
10988
11191
  /**
10989
11192
  * A form-associated base class for the {@link (Combobox:class)} component.
10990
11193
  *
@@ -11081,15 +11284,6 @@ class Combobox$1 extends FormAssociatedCombobox {
11081
11284
  */
11082
11285
 
11083
11286
  this.position = SelectPosition.below;
11084
- /**
11085
- * The role of the element.
11086
- *
11087
- * @public
11088
- * @remarks
11089
- * HTML Attribute: role
11090
- */
11091
-
11092
- this.role = SelectRole.combobox;
11093
11287
  }
11094
11288
  /**
11095
11289
  * Reset the element to its first selectable option when its parent form is reset.
@@ -11123,12 +11317,16 @@ class Combobox$1 extends FormAssociatedCombobox {
11123
11317
  }
11124
11318
 
11125
11319
  openChanged() {
11126
- this.ariaExpanded = this.open ? "true" : "false";
11127
-
11128
11320
  if (this.open) {
11321
+ this.ariaControls = this.listbox.id;
11322
+ this.ariaExpanded = "true";
11129
11323
  this.setPositioning();
11130
11324
  this.focusAndScrollOptionIntoView();
11325
+ return;
11131
11326
  }
11327
+
11328
+ this.ariaControls = "";
11329
+ this.ariaExpanded = "false";
11132
11330
  }
11133
11331
  /**
11134
11332
  * The list of options.
@@ -11212,12 +11410,13 @@ class Combobox$1 extends FormAssociatedCombobox {
11212
11410
 
11213
11411
  this.selectedOptions = [captured];
11214
11412
  this.control.value = captured.text;
11413
+ this.updateValue(true);
11215
11414
  }
11216
11415
 
11217
11416
  this.open = !this.open;
11218
11417
 
11219
- if (!this.open) {
11220
- this.updateValue(true);
11418
+ if (this.open) {
11419
+ this.control.focus();
11221
11420
  }
11222
11421
 
11223
11422
  return true;
@@ -11230,6 +11429,10 @@ class Combobox$1 extends FormAssociatedCombobox {
11230
11429
  if (this.value) {
11231
11430
  this.initialValue = this.value;
11232
11431
  }
11432
+
11433
+ if (!this.listbox.id) {
11434
+ this.listbox.id = uniqueId("listbox-");
11435
+ }
11233
11436
  }
11234
11437
  /**
11235
11438
  * Synchronize the `aria-disabled` property when the `disabled` property changes.
@@ -11273,6 +11476,28 @@ class Combobox$1 extends FormAssociatedCombobox {
11273
11476
  });
11274
11477
  }
11275
11478
  }
11479
+ /**
11480
+ * Focus the control and scroll the first selected option into view.
11481
+ *
11482
+ * @internal
11483
+ * @remarks
11484
+ * Overrides: `Listbox.focusAndScrollOptionIntoView`
11485
+ */
11486
+
11487
+
11488
+ focusAndScrollOptionIntoView() {
11489
+ if (this.contains(document.activeElement)) {
11490
+ this.control.focus();
11491
+
11492
+ if (this.firstSelectedOption) {
11493
+ requestAnimationFrame(() => {
11494
+ this.firstSelectedOption.scrollIntoView({
11495
+ block: "nearest"
11496
+ });
11497
+ });
11498
+ }
11499
+ }
11500
+ }
11276
11501
  /**
11277
11502
  * Handle focus state when the element or its children lose focus.
11278
11503
  *
@@ -11606,12 +11831,11 @@ __decorate$1([observable], Combobox$1.prototype, "position", void 0);
11606
11831
 
11607
11832
  class DelegatesARIACombobox {}
11608
11833
 
11609
- __decorate$1([attr({
11610
- attribute: "aria-autocomplete",
11611
- mode: "fromView"
11612
- })], DelegatesARIACombobox.prototype, "ariaAutocomplete", void 0);
11834
+ __decorate$1([observable], DelegatesARIACombobox.prototype, "ariaAutoComplete", void 0);
11835
+
11836
+ __decorate$1([observable], DelegatesARIACombobox.prototype, "ariaControls", void 0);
11613
11837
 
11614
- applyMixins(DelegatesARIACombobox, ARIAGlobalStatesAndProperties);
11838
+ applyMixins(DelegatesARIACombobox, DelegatesARIAListbox);
11615
11839
  applyMixins(Combobox$1, StartEnd, DelegatesARIACombobox);
11616
11840
 
11617
11841
  /**
@@ -11619,8 +11843,8 @@ applyMixins(Combobox$1, StartEnd, DelegatesARIACombobox);
11619
11843
  * @public
11620
11844
  */
11621
11845
 
11622
- const comboboxTemplate = (context, definition) => html`<template autocomplete="${x => x.autocomplete}" class="${x => x.disabled ? "disabled" : ""} ${x => x.position}" tabindex="${x => !x.disabled ? "0" : null}" aria-disabled="${x => x.ariaDisabled}" aria-autocomplete="${x => x.autocomplete}" @click="${(x, c) => x.clickHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}"><div class="control" part="control">${startSlotTemplate(context, definition)}<slot name="control"><input class="selected-value" part="selected-value" placeholder="${x => x.placeholder}" role="${x => x.role}" type="text" aria-activedescendant="${x => x.open ? x.ariaActiveDescendant : null}" aria-controls="${x => x.listboxId}" aria-expanded="${x => x.ariaExpanded}" aria-haspopup="listbox" ?disabled="${x => x.disabled}" :value="${x => x.value}" @input="${(x, c) => x.inputHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" @keyup="${(x, c) => x.keyupHandler(c.event)}" ${ref("control")} /><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${definition.indicator || ""}</slot></div></slot>${endSlotTemplate(context, definition)}</div><div aria-disabled="${x => x.disabled}" class="listbox" id="${x => x.listboxId}" part="listbox" role="listbox" ?disabled="${x => x.disabled}" ?hidden="${x => !x.open}" ${ref("listbox")}><slot ${slotted({
11623
- filter: Listbox.slottedOptionFilter,
11846
+ const comboboxTemplate = (context, definition) => html`<template aria-disabled="${x => x.ariaDisabled}" autocomplete="${x => x.autocomplete}" class="${x => x.open ? "open" : ""} ${x => x.disabled ? "disabled" : ""} ${x => x.position}" tabindex="${x => !x.disabled ? "0" : null}" @click="${(x, c) => x.clickHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><div class="control" part="control">${startSlotTemplate(context, definition)}<slot name="control"><input aria-activedescendant="${x => x.open ? x.ariaActiveDescendant : null}" aria-autocomplete="${x => x.ariaAutoComplete}" aria-controls="${x => x.ariaControls}" aria-disabled="${x => x.ariaDisabled}" aria-expanded="${x => x.ariaExpanded}" aria-haspopup="listbox" class="selected-value" part="selected-value" placeholder="${x => x.placeholder}" role="combobox" type="text" ?disabled="${x => x.disabled}" :value="${x => x.value}" @input="${(x, c) => x.inputHandler(c.event)}" @keyup="${(x, c) => x.keyupHandler(c.event)}" ${ref("control")} /><div class="indicator" part="indicator" aria-hidden="true"><slot name="indicator">${definition.indicator || ""}</slot></div></slot>${endSlotTemplate(context, definition)}</div><div class="listbox" part="listbox" role="listbox" ?disabled="${x => x.disabled}" ?hidden="${x => !x.open}" ${ref("listbox")}><slot ${slotted({
11847
+ filter: Listbox$1.slottedOptionFilter,
11624
11848
  flatten: true,
11625
11849
  property: "slottedOptions"
11626
11850
  })}></slot></div></template>`;
@@ -13723,7 +13947,7 @@ __decorate$1([attr({
13723
13947
  * @public
13724
13948
  */
13725
13949
 
13726
- const dividerTemplate = (context, definition) => html`<template role="${x => x.role}"></template>`;
13950
+ const dividerTemplate = (context, definition) => html`<template role="${x => x.role}" aria-orientation="${x => x.orientation}"></template>`;
13727
13951
 
13728
13952
  /**
13729
13953
  * Divider roles
@@ -13763,12 +13987,23 @@ class Divider extends FoundationElement {
13763
13987
  */
13764
13988
 
13765
13989
  this.role = DividerRole.separator;
13990
+ /**
13991
+ * The orientation of the divider.
13992
+ *
13993
+ * @public
13994
+ * @remarks
13995
+ * HTML Attribute: orientation
13996
+ */
13997
+
13998
+ this.orientation = Orientation.horizontal;
13766
13999
  }
13767
14000
 
13768
14001
  }
13769
14002
 
13770
14003
  __decorate$1([attr], Divider.prototype, "role", void 0);
13771
14004
 
14005
+ __decorate$1([attr], Divider.prototype, "orientation", void 0);
14006
+
13772
14007
  /**
13773
14008
  * The direction options for flipper.
13774
14009
  * @public
@@ -13857,18 +14092,7 @@ __decorate$1([attr], Flipper.prototype, "direction", void 0);
13857
14092
  * @public
13858
14093
  */
13859
14094
 
13860
- const listboxOptionTemplate = (context, definition) => html`<template aria-selected="${x => x.selected}" class="${x => x.selected ? "selected" : ""} ${x => x.disabled ? "disabled" : ""}" role="option">${startSlotTemplate(context, definition)}<span class="content" part="content"><slot></slot></span>${endSlotTemplate(context, definition)}</template>`;
13861
-
13862
- /**
13863
- * The template for the {@link @microsoft/fast-foundation#(Listbox:class)} component.
13864
- * @public
13865
- */
13866
-
13867
- const listboxTemplate = (context, definition) => html`<template aria-activedescendant="${x => x.ariaActiveDescendant}" class="listbox" role="${x => x.role}" tabindex="${x => !x.disabled ? "0" : null}" @click="${(x, c) => x.clickHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" @mousedown="${(x, c) => x.mousedownHandler(c.event)}"><slot ${slotted({
13868
- filter: Listbox.slottedOptionFilter,
13869
- flatten: true,
13870
- property: "slottedOptions"
13871
- })}></slot></template>`;
14095
+ const listboxOptionTemplate = (context, definition) => html`<template aria-checked="${x => x.ariaChecked}" aria-disabled="${x => x.ariaDisabled}" aria-posinset="${x => x.ariaPosInSet}" aria-selected="${x => x.ariaSelected}" aria-setsize="${x => x.ariaSetSize}" class="${x => [x.checked && "checked", x.selected && "selected", x.disabled && "disabled"].filter(Boolean).join(" ")}" role="option">${startSlotTemplate(context, definition)}<span class="content" part="content"><slot></slot></span>${endSlotTemplate(context, definition)}</template>`;
13872
14096
 
13873
14097
  /**
13874
14098
  * Menu items roles.
@@ -13933,7 +14157,7 @@ class MenuItem extends FoundationElement {
13933
14157
  * @internal
13934
14158
  */
13935
14159
 
13936
- this.currentDirection = Direction$1.ltr;
14160
+ this.currentDirection = Direction.ltr;
13937
14161
  this.focusSubmenuOnLoad = false;
13938
14162
  /**
13939
14163
  * @internal
@@ -14049,7 +14273,6 @@ class MenuItem extends FoundationElement {
14049
14273
  switch (this.role) {
14050
14274
  case MenuItemRole.menuitemcheckbox:
14051
14275
  this.checked = !this.checked;
14052
- this.$emit("change");
14053
14276
  break;
14054
14277
 
14055
14278
  case MenuItemRole.menuitem:
@@ -14786,62 +15009,121 @@ class NumberField$1 extends FormAssociatedNumberField {
14786
15009
  */
14787
15010
 
14788
15011
  this.step = 1;
15012
+ /**
15013
+ * Flag to indicate that the value change is from the user input
15014
+ * @internal
15015
+ */
15016
+
15017
+ this.isUserInput = false;
14789
15018
  }
15019
+ /**
15020
+ * Ensures that the max is greater than the min and that the value
15021
+ * is less than the max
15022
+ * @param previous - the previous max value
15023
+ * @param next - updated max value
15024
+ *
15025
+ * @internal
15026
+ */
14790
15027
 
14791
- maxChanged(previousValue, nextValue) {
15028
+
15029
+ maxChanged(previous, next) {
14792
15030
  var _a;
14793
15031
 
14794
- this.max = Math.max(nextValue, (_a = this.min) !== null && _a !== void 0 ? _a : nextValue);
15032
+ this.max = Math.max(next, (_a = this.min) !== null && _a !== void 0 ? _a : next);
14795
15033
  const min = Math.min(this.min, this.max);
14796
15034
 
14797
15035
  if (this.min !== undefined && this.min !== min) {
14798
15036
  this.min = min;
14799
15037
  }
14800
15038
 
14801
- this.valueChanged(this.value, this.value);
15039
+ this.value = this.getValidValue(this.value);
14802
15040
  }
15041
+ /**
15042
+ * Ensures that the min is less than the max and that the value
15043
+ * is greater than the min
15044
+ * @param previous - previous min value
15045
+ * @param next - updated min value
15046
+ *
15047
+ * @internal
15048
+ */
15049
+
14803
15050
 
14804
- minChanged(previousValue, nextValue) {
15051
+ minChanged(previous, next) {
14805
15052
  var _a;
14806
15053
 
14807
- this.min = Math.min(nextValue, (_a = this.max) !== null && _a !== void 0 ? _a : nextValue);
15054
+ this.min = Math.min(next, (_a = this.max) !== null && _a !== void 0 ? _a : next);
14808
15055
  const max = Math.max(this.min, this.max);
14809
15056
 
14810
15057
  if (this.max !== undefined && this.max !== max) {
14811
15058
  this.max = max;
14812
15059
  }
14813
15060
 
14814
- this.valueChanged(this.value, this.value);
15061
+ this.value = this.getValidValue(this.value);
14815
15062
  }
14816
15063
  /**
15064
+ * The value property, typed as a number.
14817
15065
  *
14818
- * @param previousValue - previous stored value
14819
- * @param nextValue - value being updated
15066
+ * @public
14820
15067
  */
14821
15068
 
14822
15069
 
14823
- valueChanged(previousValue, nextValue) {
14824
- var _a, _b;
15070
+ get valueAsNumber() {
15071
+ return parseFloat(super.value);
15072
+ }
15073
+
15074
+ set valueAsNumber(next) {
15075
+ this.value = next.toString();
15076
+ }
15077
+ /**
15078
+ * Validates that the value is a number between the min and max
15079
+ * @param previous - previous stored value
15080
+ * @param next - value being updated
15081
+ * @param updateControl - should the text field be updated with value, defaults to true
15082
+ * @internal
15083
+ */
14825
15084
 
14826
- let value = parseFloat(nextValue);
14827
15085
 
14828
- if (isNaN(value)) {
14829
- value = "";
14830
- } else {
14831
- value = Math.min(value, (_a = this.max) !== null && _a !== void 0 ? _a : value);
14832
- value = Math.max(value, (_b = this.min) !== null && _b !== void 0 ? _b : value);
14833
- }
15086
+ valueChanged(previous, next) {
15087
+ this.value = this.getValidValue(next);
14834
15088
 
14835
- this.value = value.toString();
15089
+ if (next !== this.value) {
15090
+ return;
15091
+ }
14836
15092
 
14837
- if (this.proxy instanceof HTMLInputElement) {
14838
- this.proxy.value = this.value;
15093
+ if (this.control && !this.isUserInput) {
15094
+ this.control.value = this.value;
14839
15095
  }
14840
15096
 
14841
- if (previousValue !== undefined) {
15097
+ super.valueChanged(previous, this.value);
15098
+
15099
+ if (previous !== undefined && !this.isUserInput) {
14842
15100
  this.$emit("input");
14843
15101
  this.$emit("change");
14844
15102
  }
15103
+
15104
+ this.isUserInput = false;
15105
+ }
15106
+ /**
15107
+ * Sets the internal value to a valid number between the min and max properties
15108
+ * @param value - user input
15109
+ *
15110
+ * @internal
15111
+ */
15112
+
15113
+
15114
+ getValidValue(value) {
15115
+ var _a, _b;
15116
+
15117
+ let validValue = parseFloat(parseFloat(value).toPrecision(12));
15118
+
15119
+ if (isNaN(validValue)) {
15120
+ validValue = "";
15121
+ } else {
15122
+ validValue = Math.min(validValue, (_a = this.max) !== null && _a !== void 0 ? _a : validValue);
15123
+ validValue = Math.max(validValue, (_b = this.min) !== null && _b !== void 0 ? _b : validValue).toString();
15124
+ }
15125
+
15126
+ return validValue;
14845
15127
  }
14846
15128
  /**
14847
15129
  * Increments the value using the step value
@@ -14854,7 +15136,6 @@ class NumberField$1 extends FormAssociatedNumberField {
14854
15136
  const value = parseFloat(this.value);
14855
15137
  const stepUpValue = !isNaN(value) ? value + this.step : this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? this.step : 0;
14856
15138
  this.value = stepUpValue.toString();
14857
- this.control.value = this.value;
14858
15139
  }
14859
15140
  /**
14860
15141
  * Decrements the value using the step value
@@ -14867,9 +15148,9 @@ class NumberField$1 extends FormAssociatedNumberField {
14867
15148
  const value = parseFloat(this.value);
14868
15149
  const stepDownValue = !isNaN(value) ? value - this.step : this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? 0 - this.step : 0;
14869
15150
  this.value = stepDownValue.toString();
14870
- this.control.value = this.value;
14871
15151
  }
14872
15152
  /**
15153
+ * Sets up the initial state of the number field
14873
15154
  * @internal
14874
15155
  */
14875
15156
 
@@ -14894,6 +15175,7 @@ class NumberField$1 extends FormAssociatedNumberField {
14894
15175
 
14895
15176
  handleTextInput() {
14896
15177
  this.control.value = this.control.value.replace(/[^0-9\-+e.]/g, "");
15178
+ this.isUserInput = true;
14897
15179
  this.value = this.control.value;
14898
15180
  }
14899
15181
  /**
@@ -15327,7 +15609,7 @@ class RadioGroup extends FoundationElement {
15327
15609
  case keyArrowRight:
15328
15610
  case keyArrowDown:
15329
15611
  {
15330
- if (this.direction === Direction$1.ltr) {
15612
+ if (this.direction === Direction.ltr) {
15331
15613
  this.moveRight(e);
15332
15614
  } else {
15333
15615
  this.moveLeft(e);
@@ -15339,7 +15621,7 @@ class RadioGroup extends FoundationElement {
15339
15621
  case keyArrowLeft:
15340
15622
  case keyArrowUp:
15341
15623
  {
15342
- if (this.direction === Direction$1.ltr) {
15624
+ if (this.direction === Direction.ltr) {
15343
15625
  this.moveLeft(e);
15344
15626
  } else {
15345
15627
  this.moveRight(e);
@@ -15763,7 +16045,7 @@ class HorizontalScroll$1 extends FoundationElement {
15763
16045
 
15764
16046
  scrollItemsChanged(previous, next) {
15765
16047
  if (next && !this.updatingItems) {
15766
- this.setStops();
16048
+ DOM.queueUpdate(() => this.setStops());
15767
16049
  }
15768
16050
  }
15769
16051
  /**
@@ -15921,134 +16203,311 @@ class HorizontalScroll$1 extends FoundationElement {
15921
16203
  const outOfView = this.scrollStops.findIndex(stop => Math.abs(scrollPosition) + this.width <= Math.abs(stop));
15922
16204
  let nextIndex = current;
15923
16205
 
15924
- if (outOfView > current + 2) {
15925
- nextIndex = outOfView - 2;
15926
- } else if (current < this.scrollStops.length - 2) {
15927
- nextIndex = current + 1;
16206
+ if (outOfView > current + 2) {
16207
+ nextIndex = outOfView - 2;
16208
+ } else if (current < this.scrollStops.length - 2) {
16209
+ nextIndex = current + 1;
16210
+ }
16211
+
16212
+ this.scrollToPosition(this.scrollStops[nextIndex], scrollPosition);
16213
+ }
16214
+ /**
16215
+ * Handles scrolling with easing
16216
+ * @param position - starting position
16217
+ * @param newPosition - position to scroll to
16218
+ * @public
16219
+ */
16220
+
16221
+
16222
+ scrollToPosition(newPosition, position = this.scrollContainer.scrollLeft) {
16223
+ var _a;
16224
+
16225
+ if (this.scrolling) {
16226
+ return;
16227
+ }
16228
+
16229
+ this.scrolling = true;
16230
+ const seconds = (_a = this.duration) !== null && _a !== void 0 ? _a : `${Math.abs(newPosition - position) / this.speed}s`;
16231
+ this.content.style.setProperty("transition-duration", seconds);
16232
+ const computedDuration = parseFloat(getComputedStyle(this.content).getPropertyValue("transition-duration"));
16233
+
16234
+ const transitionendHandler = e => {
16235
+ if (e && e.target !== e.currentTarget) {
16236
+ return;
16237
+ }
16238
+
16239
+ this.content.style.setProperty("transition-duration", "0s");
16240
+ this.content.style.removeProperty("transform");
16241
+ this.scrollContainer.style.setProperty("scroll-behavior", "auto");
16242
+ this.scrollContainer.scrollLeft = newPosition;
16243
+ this.setFlippers();
16244
+ this.content.removeEventListener("transitionend", transitionendHandler);
16245
+ this.scrolling = false;
16246
+ };
16247
+
16248
+ if (computedDuration === 0) {
16249
+ transitionendHandler();
16250
+ return;
16251
+ }
16252
+
16253
+ this.content.addEventListener("transitionend", transitionendHandler);
16254
+ const maxScrollValue = this.scrollContainer.scrollWidth - this.scrollContainer.clientWidth;
16255
+ let transitionStop = this.scrollContainer.scrollLeft - Math.min(newPosition, maxScrollValue);
16256
+
16257
+ if (this.isRtl) {
16258
+ transitionStop = this.scrollContainer.scrollLeft + Math.min(Math.abs(newPosition), maxScrollValue);
16259
+ }
16260
+
16261
+ this.content.style.setProperty("transition-property", "transform");
16262
+ this.content.style.setProperty("transition-timing-function", this.easing);
16263
+ this.content.style.setProperty("transform", `translateX(${transitionStop}px)`);
16264
+ }
16265
+ /**
16266
+ * Monitors resize event on the horizontal-scroll element
16267
+ * @public
16268
+ */
16269
+
16270
+
16271
+ resized() {
16272
+ if (this.resizeTimeout) {
16273
+ this.resizeTimeout = clearTimeout(this.resizeTimeout);
16274
+ }
16275
+
16276
+ this.resizeTimeout = setTimeout(() => {
16277
+ this.width = this.offsetWidth;
16278
+ this.setFlippers();
16279
+ }, this.frameTime);
16280
+ }
16281
+ /**
16282
+ * Monitors scrolled event on the content container
16283
+ * @public
16284
+ */
16285
+
16286
+
16287
+ scrolled() {
16288
+ if (this.scrollTimeout) {
16289
+ this.scrollTimeout = clearTimeout(this.scrollTimeout);
16290
+ }
16291
+
16292
+ this.scrollTimeout = setTimeout(() => {
16293
+ this.setFlippers();
16294
+ }, this.frameTime);
16295
+ }
16296
+
16297
+ }
16298
+
16299
+ __decorate$1([attr({
16300
+ converter: nullableNumberConverter
16301
+ })], HorizontalScroll$1.prototype, "speed", void 0);
16302
+
16303
+ __decorate$1([attr], HorizontalScroll$1.prototype, "duration", void 0);
16304
+
16305
+ __decorate$1([attr], HorizontalScroll$1.prototype, "easing", void 0);
16306
+
16307
+ __decorate$1([attr({
16308
+ attribute: "aria-hidden",
16309
+ converter: booleanConverter
16310
+ })], HorizontalScroll$1.prototype, "flippersHiddenFromAT", void 0);
16311
+
16312
+ __decorate$1([observable], HorizontalScroll$1.prototype, "scrolling", void 0);
16313
+
16314
+ __decorate$1([observable], HorizontalScroll$1.prototype, "scrollItems", void 0);
16315
+
16316
+ __decorate$1([attr({
16317
+ attribute: "view"
16318
+ })], HorizontalScroll$1.prototype, "view", void 0);
16319
+
16320
+ /**
16321
+ * @public
16322
+ */
16323
+
16324
+ const horizontalScrollTemplate = (context, definition) => {
16325
+ var _a, _b;
16326
+
16327
+ return html`<template class="horizontal-scroll" @keyup="${(x, c) => x.keyupHandler(c.event)}">${startSlotTemplate(context, definition)}<div class="scroll-area" part="scroll-area"><div class="scroll-view" part="scroll-view" @scroll="${x => x.scrolled()}" ${ref("scrollContainer")}><div class="content-container" part="content-container" ${ref("content")}><slot ${slotted({
16328
+ property: "scrollItems",
16329
+ filter: elements()
16330
+ })}></slot></div></div>${when(x => x.view !== "mobile", html`<div class="scroll scroll-prev" part="scroll-prev" ${ref("previousFlipperContainer")}><div class="scroll-action" part="scroll-action-previous"><slot name="previous-flipper">${definition.previousFlipper instanceof Function ? definition.previousFlipper(context, definition) : (_a = definition.previousFlipper) !== null && _a !== void 0 ? _a : ""}</slot></div></div><div class="scroll scroll-next" part="scroll-next" ${ref("nextFlipperContainer")}><div class="scroll-action" part="scroll-action-next"><slot name="next-flipper">${definition.nextFlipper instanceof Function ? definition.nextFlipper(context, definition) : (_b = definition.nextFlipper) !== null && _b !== void 0 ? _b : ""}</slot></div></div>`)}</div>${endSlotTemplate(context, definition)}</template>`;
16331
+ };
16332
+
16333
+ class _Search extends FoundationElement {}
16334
+ /**
16335
+ * A form-associated base class for the {@link @microsoft/fast-foundation#(Search:class)} component.
16336
+ *
16337
+ * @internal
16338
+ */
16339
+
16340
+
16341
+ class FormAssociatedSearch extends FormAssociated(_Search) {
16342
+ constructor() {
16343
+ super(...arguments);
16344
+ this.proxy = document.createElement("input");
16345
+ }
16346
+
16347
+ }
16348
+
16349
+ /**
16350
+ * A Search Custom HTML Element.
16351
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search | <input type="search" /> element }.
16352
+ *
16353
+ * @public
16354
+ */
16355
+
16356
+ class Search$1 extends FormAssociatedSearch {
16357
+ readOnlyChanged() {
16358
+ if (this.proxy instanceof HTMLInputElement) {
16359
+ this.proxy.readOnly = this.readOnly;
16360
+ this.validate();
16361
+ }
16362
+ }
16363
+
16364
+ autofocusChanged() {
16365
+ if (this.proxy instanceof HTMLInputElement) {
16366
+ this.proxy.autofocus = this.autofocus;
16367
+ this.validate();
16368
+ }
16369
+ }
16370
+
16371
+ placeholderChanged() {
16372
+ if (this.proxy instanceof HTMLInputElement) {
16373
+ this.proxy.placeholder = this.placeholder;
16374
+ }
16375
+ }
16376
+
16377
+ listChanged() {
16378
+ if (this.proxy instanceof HTMLInputElement) {
16379
+ this.proxy.setAttribute("list", this.list);
16380
+ this.validate();
16381
+ }
16382
+ }
16383
+
16384
+ maxlengthChanged() {
16385
+ if (this.proxy instanceof HTMLInputElement) {
16386
+ this.proxy.maxLength = this.maxlength;
16387
+ this.validate();
16388
+ }
16389
+ }
16390
+
16391
+ minlengthChanged() {
16392
+ if (this.proxy instanceof HTMLInputElement) {
16393
+ this.proxy.minLength = this.minlength;
16394
+ this.validate();
16395
+ }
16396
+ }
16397
+
16398
+ patternChanged() {
16399
+ if (this.proxy instanceof HTMLInputElement) {
16400
+ this.proxy.pattern = this.pattern;
16401
+ this.validate();
16402
+ }
16403
+ }
16404
+
16405
+ sizeChanged() {
16406
+ if (this.proxy instanceof HTMLInputElement) {
16407
+ this.proxy.size = this.size;
15928
16408
  }
16409
+ }
15929
16410
 
15930
- this.scrollToPosition(this.scrollStops[nextIndex], scrollPosition);
16411
+ spellcheckChanged() {
16412
+ if (this.proxy instanceof HTMLInputElement) {
16413
+ this.proxy.spellcheck = this.spellcheck;
16414
+ }
15931
16415
  }
15932
16416
  /**
15933
- * Handles scrolling with easing
15934
- * @param position - starting position
15935
- * @param newPosition - position to scroll to
15936
- * @public
16417
+ * @internal
15937
16418
  */
15938
16419
 
15939
16420
 
15940
- scrollToPosition(newPosition, position = this.scrollContainer.scrollLeft) {
15941
- var _a;
15942
-
15943
- if (this.scrolling) {
15944
- return;
15945
- }
15946
-
15947
- this.scrolling = true;
15948
- const seconds = (_a = this.duration) !== null && _a !== void 0 ? _a : `${Math.abs(newPosition - position) / this.speed}s`;
15949
- this.content.style.setProperty("transition-duration", seconds);
15950
- const computedDuration = parseFloat(getComputedStyle(this.content).getPropertyValue("transition-duration"));
15951
-
15952
- const transitionendHandler = e => {
15953
- if (e && e.target !== e.currentTarget) {
15954
- return;
15955
- }
15956
-
15957
- this.content.style.setProperty("transition-duration", "0s");
15958
- this.content.style.removeProperty("transform");
15959
- this.scrollContainer.style.setProperty("scroll-behavior", "auto");
15960
- this.scrollContainer.scrollLeft = newPosition;
15961
- this.setFlippers();
15962
- this.content.removeEventListener("transitionend", transitionendHandler);
15963
- this.scrolling = false;
15964
- };
16421
+ connectedCallback() {
16422
+ super.connectedCallback();
16423
+ this.validate();
15965
16424
 
15966
- if (computedDuration === 0) {
15967
- transitionendHandler();
15968
- return;
16425
+ if (this.autofocus) {
16426
+ DOM.queueUpdate(() => {
16427
+ this.focus();
16428
+ });
15969
16429
  }
16430
+ }
16431
+ /**
16432
+ * Handles the internal control's `input` event
16433
+ * @internal
16434
+ */
15970
16435
 
15971
- this.content.addEventListener("transitionend", transitionendHandler);
15972
- const maxScrollValue = this.scrollContainer.scrollWidth - this.scrollContainer.clientWidth;
15973
- let transitionStop = this.scrollContainer.scrollLeft - Math.min(newPosition, maxScrollValue);
15974
-
15975
- if (this.isRtl) {
15976
- transitionStop = this.scrollContainer.scrollLeft + Math.min(Math.abs(newPosition), maxScrollValue);
15977
- }
15978
16436
 
15979
- this.content.style.setProperty("transition-property", "transform");
15980
- this.content.style.setProperty("transition-timing-function", this.easing);
15981
- this.content.style.setProperty("transform", `translateX(${transitionStop}px)`);
16437
+ handleTextInput() {
16438
+ this.value = this.control.value;
15982
16439
  }
15983
16440
  /**
15984
- * Monitors resize event on the horizontal-scroll element
16441
+ * Handles the control's clear value event
15985
16442
  * @public
15986
16443
  */
15987
16444
 
15988
16445
 
15989
- resized() {
15990
- if (this.resizeTimeout) {
15991
- this.resizeTimeout = clearTimeout(this.resizeTimeout);
15992
- }
15993
-
15994
- this.resizeTimeout = setTimeout(() => {
15995
- this.width = this.offsetWidth;
15996
- this.setFlippers();
15997
- }, this.frameTime);
16446
+ handleClearInput() {
16447
+ this.value = "";
16448
+ this.control.focus();
15998
16449
  }
15999
16450
  /**
16000
- * Monitors scrolled event on the content container
16001
- * @public
16451
+ * Change event handler for inner control.
16452
+ * @remarks
16453
+ * "Change" events are not `composable` so they will not
16454
+ * permeate the shadow DOM boundary. This fn effectively proxies
16455
+ * the change event, emitting a `change` event whenever the internal
16456
+ * control emits a `change` event
16457
+ * @internal
16002
16458
  */
16003
16459
 
16004
16460
 
16005
- scrolled() {
16006
- if (this.scrollTimeout) {
16007
- this.scrollTimeout = clearTimeout(this.scrollTimeout);
16008
- }
16009
-
16010
- this.scrollTimeout = setTimeout(() => {
16011
- this.setFlippers();
16012
- }, this.frameTime);
16461
+ handleChange() {
16462
+ this.$emit("change");
16013
16463
  }
16014
16464
 
16015
16465
  }
16016
16466
 
16017
16467
  __decorate$1([attr({
16018
- converter: nullableNumberConverter
16019
- })], HorizontalScroll$1.prototype, "speed", void 0);
16468
+ attribute: "readonly",
16469
+ mode: "boolean"
16470
+ })], Search$1.prototype, "readOnly", void 0);
16020
16471
 
16021
- __decorate$1([attr], HorizontalScroll$1.prototype, "duration", void 0);
16472
+ __decorate$1([attr({
16473
+ mode: "boolean"
16474
+ })], Search$1.prototype, "autofocus", void 0);
16022
16475
 
16023
- __decorate$1([attr], HorizontalScroll$1.prototype, "easing", void 0);
16476
+ __decorate$1([attr], Search$1.prototype, "placeholder", void 0);
16477
+
16478
+ __decorate$1([attr], Search$1.prototype, "list", void 0);
16024
16479
 
16025
16480
  __decorate$1([attr({
16026
- attribute: "aria-hidden",
16027
- converter: booleanConverter
16028
- })], HorizontalScroll$1.prototype, "flippersHiddenFromAT", void 0);
16481
+ converter: nullableNumberConverter
16482
+ })], Search$1.prototype, "maxlength", void 0);
16029
16483
 
16030
- __decorate$1([observable], HorizontalScroll$1.prototype, "scrolling", void 0);
16484
+ __decorate$1([attr({
16485
+ converter: nullableNumberConverter
16486
+ })], Search$1.prototype, "minlength", void 0);
16031
16487
 
16032
- __decorate$1([observable], HorizontalScroll$1.prototype, "scrollItems", void 0);
16488
+ __decorate$1([attr], Search$1.prototype, "pattern", void 0);
16033
16489
 
16034
16490
  __decorate$1([attr({
16035
- attribute: "view"
16036
- })], HorizontalScroll$1.prototype, "view", void 0);
16491
+ converter: nullableNumberConverter
16492
+ })], Search$1.prototype, "size", void 0);
16493
+
16494
+ __decorate$1([attr({
16495
+ mode: "boolean"
16496
+ })], Search$1.prototype, "spellcheck", void 0);
16037
16497
 
16498
+ __decorate$1([observable], Search$1.prototype, "defaultSlottedNodes", void 0);
16038
16499
  /**
16500
+ * Includes ARIA states and properties relating to the ARIA textbox role
16501
+ *
16039
16502
  * @public
16040
16503
  */
16041
16504
 
16042
- const horizontalScrollTemplate = (context, definition) => {
16043
- var _a, _b;
16044
16505
 
16045
- return html`<template class="horizontal-scroll" @keyup="${(x, c) => x.keyupHandler(c.event)}">${startSlotTemplate(context, definition)}<div class="scroll-area" part="scroll-area"><div class="scroll-view" part="scroll-view" @scroll="${x => x.scrolled()}" ${ref("scrollContainer")}><div class="content-container" part="content-container" ${ref("content")}><slot ${slotted({
16046
- property: "scrollItems",
16047
- filter: elements()
16048
- })}></slot></div></div>${when(x => x.view !== "mobile", html`<div class="scroll scroll-prev" part="scroll-prev" ${ref("previousFlipperContainer")}><div class="scroll-action" part="scroll-action-previous"><slot name="previous-flipper">${definition.previousFlipper instanceof Function ? definition.previousFlipper(context, definition) : (_a = definition.previousFlipper) !== null && _a !== void 0 ? _a : ""}</slot></div></div><div class="scroll scroll-next" part="scroll-next" ${ref("nextFlipperContainer")}><div class="scroll-action" part="scroll-action-next"><slot name="next-flipper">${definition.nextFlipper instanceof Function ? definition.nextFlipper(context, definition) : (_b = definition.nextFlipper) !== null && _b !== void 0 ? _b : ""}</slot></div></div>`)}</div>${endSlotTemplate(context, definition)}</template>`;
16049
- };
16506
+ class DelegatesARIASearch {}
16507
+ applyMixins(DelegatesARIASearch, ARIAGlobalStatesAndProperties);
16508
+ applyMixins(Search$1, StartEnd, DelegatesARIASearch);
16050
16509
 
16051
- class _Select extends Listbox {}
16510
+ class _Select extends Listbox$1 {}
16052
16511
  /**
16053
16512
  * A form-associated base class for the {@link @microsoft/fast-foundation#(Select:class)} component.
16054
16513
  *
@@ -16088,15 +16547,6 @@ class Select$1 extends FormAssociatedSelect {
16088
16547
  */
16089
16548
 
16090
16549
  this.forcedPosition = false;
16091
- /**
16092
- * The role of the element.
16093
- *
16094
- * @public
16095
- * @remarks
16096
- * HTML Attribute: role
16097
- */
16098
-
16099
- this.role = SelectRole.combobox;
16100
16550
  /**
16101
16551
  * Holds the current state for the calculated position of the listbox.
16102
16552
  *
@@ -16121,13 +16571,17 @@ class Select$1 extends FormAssociatedSelect {
16121
16571
  }
16122
16572
 
16123
16573
  openChanged() {
16124
- this.ariaExpanded = this.open ? "true" : "false";
16125
-
16126
16574
  if (this.open) {
16575
+ this.ariaControls = this.listbox.id;
16576
+ this.ariaExpanded = "true";
16127
16577
  this.setPositioning();
16128
16578
  this.focusAndScrollOptionIntoView();
16129
16579
  this.indexWhenOpened = this.selectedIndex;
16580
+ return;
16130
16581
  }
16582
+
16583
+ this.ariaControls = "";
16584
+ this.ariaExpanded = "false";
16131
16585
  }
16132
16586
  /**
16133
16587
  * The value property.
@@ -16357,7 +16811,7 @@ class Select$1 extends FormAssociatedSelect {
16357
16811
  switch (key) {
16358
16812
  case " ":
16359
16813
  {
16360
- if (this.typeAheadExpired) {
16814
+ if (this.typeaheadExpired) {
16361
16815
  e.preventDefault();
16362
16816
  this.open = !this.open;
16363
16817
  }
@@ -16404,6 +16858,10 @@ class Select$1 extends FormAssociatedSelect {
16404
16858
  connectedCallback() {
16405
16859
  super.connectedCallback();
16406
16860
  this.forcedPosition = !!this.positionAttribute;
16861
+
16862
+ if (!this.listbox.id) {
16863
+ this.listbox.id = uniqueId("listbox-");
16864
+ }
16407
16865
  }
16408
16866
 
16409
16867
  }
@@ -16431,14 +16889,9 @@ __decorate$1([observable], Select$1.prototype, "displayValue", void 0);
16431
16889
 
16432
16890
  class DelegatesARIASelect {}
16433
16891
 
16434
- __decorate$1([observable], DelegatesARIASelect.prototype, "ariaExpanded", void 0);
16435
-
16436
- __decorate$1([attr({
16437
- attribute: "aria-pressed",
16438
- mode: "fromView"
16439
- })], DelegatesARIASelect.prototype, "ariaPressed", void 0);
16892
+ __decorate$1([observable], DelegatesARIASelect.prototype, "ariaControls", void 0);
16440
16893
 
16441
- applyMixins(DelegatesARIASelect, ARIAGlobalStatesAndProperties);
16894
+ applyMixins(DelegatesARIASelect, DelegatesARIAListbox);
16442
16895
  applyMixins(Select$1, StartEnd, DelegatesARIASelect);
16443
16896
 
16444
16897
  /**
@@ -16446,8 +16899,8 @@ applyMixins(Select$1, StartEnd, DelegatesARIASelect);
16446
16899
  * @public
16447
16900
  */
16448
16901
 
16449
- const selectTemplate = (context, definition) => html`<template class="${x => x.open ? "open" : ""} ${x => x.disabled ? "disabled" : ""} ${x => x.position}" role="${x => x.role}" tabindex="${x => !x.disabled ? "0" : null}" aria-disabled="${x => x.ariaDisabled}" aria-expanded="${x => x.ariaExpanded}" @click="${(x, c) => x.clickHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><div aria-activedescendant="${x => x.open ? x.ariaActiveDescendant : null}" aria-controls="listbox" aria-expanded="${x => x.ariaExpanded}" aria-haspopup="listbox" class="control" part="control" role="button" ?disabled="${x => x.disabled}">${startSlotTemplate(context, definition)}<slot name="button-container"><div class="selected-value" part="selected-value"><slot name="selected-value">${x => x.displayValue}</slot></div><div class="indicator" part="indicator"><slot name="indicator">${definition.indicator || ""}</slot></div></slot>${endSlotTemplate(context, definition)}</div><div aria-disabled="${x => x.disabled}" class="listbox" id="listbox" part="listbox" role="listbox" ?disabled="${x => x.disabled}" ?hidden="${x => !x.open}" ${ref("listbox")}><slot ${slotted({
16450
- filter: Listbox.slottedOptionFilter,
16902
+ const selectTemplate = (context, definition) => html`<template class="${x => x.open ? "open" : ""} ${x => x.disabled ? "disabled" : ""} ${x => x.position}" aria-activedescendant="${x => x.ariaActiveDescendant}" aria-controls="${x => x.ariaControls}" aria-disabled="${x => x.ariaDisabled}" aria-expanded="${x => x.ariaExpanded}" aria-haspopup="listbox" role="combobox" tabindex="${x => !x.disabled ? "0" : null}" @click="${(x, c) => x.clickHandler(c.event)}" @focusout="${(x, c) => x.focusoutHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><div class="control" part="control" ?disabled="${x => x.disabled}">${startSlotTemplate(context, definition)}<slot name="button-container"><div class="selected-value" part="selected-value"><slot name="selected-value">${x => x.displayValue}</slot></div><div aria-hidden="true" class="indicator" part="indicator"><slot name="indicator">${definition.indicator || ""}</slot></div></slot>${endSlotTemplate(context, definition)}</div><div class="listbox" part="listbox" role="listbox" ?disabled="${x => x.disabled}" ?hidden="${x => !x.open}" ${ref("listbox")}><slot ${slotted({
16903
+ filter: Listbox$1.slottedOptionFilter,
16451
16904
  flatten: true,
16452
16905
  property: "slottedOptions"
16453
16906
  })}></slot></div></template>`;
@@ -16505,7 +16958,7 @@ const sliderLabelTemplate = (context, definition) => html`<template aria-disable
16505
16958
  function convertPixelToPercent(pixelPos, minPosition, maxPosition, direction) {
16506
16959
  let pct = limit(0, 1, (pixelPos - minPosition) / (maxPosition - minPosition));
16507
16960
 
16508
- if (direction === Direction$1.rtl) {
16961
+ if (direction === Direction.rtl) {
16509
16962
  pct = 1 - pct;
16510
16963
  }
16511
16964
 
@@ -16515,7 +16968,7 @@ function convertPixelToPercent(pixelPos, minPosition, maxPosition, direction) {
16515
16968
  const defaultConfig = {
16516
16969
  min: 0,
16517
16970
  max: 0,
16518
- direction: Direction$1.ltr,
16971
+ direction: Direction.ltr,
16519
16972
  orientation: Orientation.horizontal,
16520
16973
  disabled: false
16521
16974
  };
@@ -16541,11 +16994,11 @@ class SliderLabel extends FoundationElement {
16541
16994
  * @internal
16542
16995
  */
16543
16996
 
16544
- this.sliderDirection = Direction$1.ltr;
16997
+ this.sliderDirection = Direction.ltr;
16545
16998
 
16546
16999
  this.getSliderConfiguration = () => {
16547
17000
  if (!this.isSliderConfig(this.parentNode)) {
16548
- this.sliderDirection = defaultConfig.direction || Direction$1.ltr;
17001
+ this.sliderDirection = defaultConfig.direction || Direction.ltr;
16549
17002
  this.sliderOrientation = defaultConfig.orientation || Orientation.horizontal;
16550
17003
  this.sliderMaxPosition = defaultConfig.max;
16551
17004
  this.sliderMinPosition = defaultConfig.min;
@@ -16563,7 +17016,7 @@ class SliderLabel extends FoundationElement {
16563
17016
  this.disabled = disabled;
16564
17017
  }
16565
17018
 
16566
- this.sliderDirection = direction || Direction$1.ltr;
17019
+ this.sliderDirection = direction || Direction.ltr;
16567
17020
  this.sliderOrientation = orientation || Orientation.horizontal;
16568
17021
  this.sliderMaxPosition = max;
16569
17022
  this.sliderMinPosition = min;
@@ -16571,18 +17024,18 @@ class SliderLabel extends FoundationElement {
16571
17024
  };
16572
17025
 
16573
17026
  this.positionAsStyle = () => {
16574
- const direction = this.sliderDirection ? this.sliderDirection : Direction$1.ltr;
17027
+ const direction = this.sliderDirection ? this.sliderDirection : Direction.ltr;
16575
17028
  const pct = convertPixelToPercent(Number(this.position), Number(this.sliderMinPosition), Number(this.sliderMaxPosition));
16576
17029
  let rightNum = Math.round((1 - pct) * 100);
16577
17030
  let leftNum = Math.round(pct * 100);
16578
17031
 
16579
- if (leftNum === Number.NaN && rightNum === Number.NaN) {
17032
+ if (Number.isNaN(leftNum) && Number.isNaN(rightNum)) {
16580
17033
  rightNum = 50;
16581
17034
  leftNum = 50;
16582
17035
  }
16583
17036
 
16584
17037
  if (this.sliderOrientation === Orientation.horizontal) {
16585
- return direction === Direction$1.rtl ? `right: ${leftNum}%; left: ${rightNum}%;` : `left: ${leftNum}%; right: ${rightNum}%;`;
17038
+ return direction === Direction.rtl ? `right: ${leftNum}%; left: ${rightNum}%;` : `left: ${leftNum}%; right: ${rightNum}%;`;
16586
17039
  } else {
16587
17040
  return `top: ${leftNum}%; bottom: ${rightNum}%;`;
16588
17041
  }
@@ -16729,7 +17182,7 @@ class Slider extends FormAssociatedSlider {
16729
17182
  * @internal
16730
17183
  */
16731
17184
 
16732
- this.direction = Direction$1.ltr;
17185
+ this.direction = Direction.ltr;
16733
17186
  /**
16734
17187
  * @internal
16735
17188
  */
@@ -16981,6 +17434,20 @@ class Slider extends FormAssociatedSlider {
16981
17434
  this.proxy.readOnly = this.readOnly;
16982
17435
  }
16983
17436
  }
17437
+ /**
17438
+ * The value property, typed as a number.
17439
+ *
17440
+ * @public
17441
+ */
17442
+
17443
+
17444
+ get valueAsNumber() {
17445
+ return parseFloat(super.value);
17446
+ }
17447
+
17448
+ set valueAsNumber(next) {
17449
+ this.value = next.toString();
17450
+ }
16984
17451
  /**
16985
17452
  * @internal
16986
17453
  */
@@ -17057,7 +17524,7 @@ class Slider extends FormAssociatedSlider {
17057
17524
 
17058
17525
 
17059
17526
  increment() {
17060
- const newVal = this.direction !== Direction$1.rtl && this.orientation !== Orientation.vertical ? Number(this.value) + Number(this.step) : Number(this.value) - Number(this.step);
17527
+ const newVal = this.direction !== Direction.rtl && this.orientation !== Orientation.vertical ? Number(this.value) + Number(this.step) : Number(this.value) - Number(this.step);
17061
17528
  const incrementedVal = this.convertToConstrainedValue(newVal);
17062
17529
  const incrementedValString = incrementedVal < Number(this.max) ? `${incrementedVal}` : `${this.max}`;
17063
17530
  this.value = incrementedValString;
@@ -17070,7 +17537,7 @@ class Slider extends FormAssociatedSlider {
17070
17537
 
17071
17538
 
17072
17539
  decrement() {
17073
- const newVal = this.direction !== Direction$1.rtl && this.orientation !== Orientation.vertical ? Number(this.value) - Number(this.step) : Number(this.value) + Number(this.step);
17540
+ const newVal = this.direction !== Direction.rtl && this.orientation !== Orientation.vertical ? Number(this.value) - Number(this.step) : Number(this.value) + Number(this.step);
17074
17541
  const decrementedVal = this.convertToConstrainedValue(newVal);
17075
17542
  const decrementedValString = decrementedVal > Number(this.min) ? `${decrementedVal}` : `${this.min}`;
17076
17543
  this.value = decrementedValString;
@@ -17884,14 +18351,14 @@ const ToolbarArrowKeyMap = Object.freeze({
17884
18351
  },
17885
18352
  [ArrowKeys.ArrowLeft]: {
17886
18353
  [Orientation.horizontal]: {
17887
- [Direction$1.ltr]: -1,
17888
- [Direction$1.rtl]: 1
18354
+ [Direction.ltr]: -1,
18355
+ [Direction.rtl]: 1
17889
18356
  }
17890
18357
  },
17891
18358
  [ArrowKeys.ArrowRight]: {
17892
18359
  [Orientation.horizontal]: {
17893
- [Direction$1.ltr]: 1,
17894
- [Direction$1.rtl]: -1
18360
+ [Direction.ltr]: 1,
18361
+ [Direction.rtl]: -1
17895
18362
  }
17896
18363
  }
17897
18364
  });
@@ -17918,7 +18385,7 @@ class Toolbar$1 extends FoundationElement {
17918
18385
  * @internal
17919
18386
  */
17920
18387
 
17921
- this.direction = Direction$1.ltr;
18388
+ this.direction = Direction.ltr;
17922
18389
  /**
17923
18390
  * The orientation of the toolbar.
17924
18391
  *
@@ -18258,7 +18725,7 @@ class Tooltip$1 extends FoundationElement {
18258
18725
  * @internal
18259
18726
  */
18260
18727
 
18261
- this.horizontalInset = "true";
18728
+ this.horizontalInset = "false";
18262
18729
  /**
18263
18730
  * @internal
18264
18731
  */
@@ -18268,7 +18735,7 @@ class Tooltip$1 extends FoundationElement {
18268
18735
  * @internal
18269
18736
  */
18270
18737
 
18271
- this.horizontalScaling = "anchor";
18738
+ this.horizontalScaling = "content";
18272
18739
  /**
18273
18740
  * @internal
18274
18741
  */
@@ -18296,7 +18763,7 @@ class Tooltip$1 extends FoundationElement {
18296
18763
  * @internal
18297
18764
  */
18298
18765
 
18299
- this.currentDirection = Direction$1.ltr;
18766
+ this.currentDirection = Direction.ltr;
18300
18767
  /**
18301
18768
  * The timer that tracks delay time before the tooltip is shown on hover
18302
18769
  */
@@ -18318,10 +18785,12 @@ class Tooltip$1 extends FoundationElement {
18318
18785
  this.classList.toggle("bottom", this.region.verticalPosition === "end");
18319
18786
  this.classList.toggle("inset-top", this.region.verticalPosition === "insetStart");
18320
18787
  this.classList.toggle("inset-bottom", this.region.verticalPosition === "insetEnd");
18788
+ this.classList.toggle("center-vertical", this.region.verticalPosition === "center");
18321
18789
  this.classList.toggle("left", this.region.horizontalPosition === "start");
18322
18790
  this.classList.toggle("right", this.region.horizontalPosition === "end");
18323
18791
  this.classList.toggle("inset-left", this.region.horizontalPosition === "insetStart");
18324
18792
  this.classList.toggle("inset-right", this.region.horizontalPosition === "insetEnd");
18793
+ this.classList.toggle("center-horizontal", this.region.horizontalPosition === "center");
18325
18794
  };
18326
18795
  /**
18327
18796
  * mouse enters anchor
@@ -18581,38 +19050,26 @@ class Tooltip$1 extends FoundationElement {
18581
19050
  case TooltipPosition.top:
18582
19051
  case TooltipPosition.bottom:
18583
19052
  this.verticalPositioningMode = "locktodefault";
18584
- this.horizontalPositioningMode = "dynamic";
19053
+ this.horizontalPositioningMode = "locktodefault";
18585
19054
  this.verticalDefaultPosition = this.position;
18586
- this.horizontalDefaultPosition = undefined;
18587
- this.horizontalInset = "true";
18588
- this.verticalInset = "false";
18589
- this.horizontalScaling = "anchor";
18590
- this.verticalScaling = "content";
19055
+ this.horizontalDefaultPosition = "center";
18591
19056
  break;
18592
19057
 
18593
19058
  case TooltipPosition.right:
18594
19059
  case TooltipPosition.left:
18595
19060
  case TooltipPosition.start:
18596
19061
  case TooltipPosition.end:
18597
- this.verticalPositioningMode = "dynamic";
19062
+ this.verticalPositioningMode = "locktodefault";
18598
19063
  this.horizontalPositioningMode = "locktodefault";
18599
- this.verticalDefaultPosition = undefined;
19064
+ this.verticalDefaultPosition = "center";
18600
19065
  this.horizontalDefaultPosition = this.position;
18601
- this.horizontalInset = "false";
18602
- this.verticalInset = "true";
18603
- this.horizontalScaling = "content";
18604
- this.verticalScaling = "anchor";
18605
19066
  break;
18606
19067
 
18607
19068
  default:
18608
19069
  this.verticalPositioningMode = "dynamic";
18609
19070
  this.horizontalPositioningMode = "dynamic";
18610
- this.verticalDefaultPosition = undefined;
18611
- this.horizontalDefaultPosition = undefined;
18612
- this.horizontalInset = "true";
18613
- this.verticalInset = "false";
18614
- this.horizontalScaling = "anchor";
18615
- this.verticalScaling = "content";
19071
+ this.verticalDefaultPosition = void 0;
19072
+ this.horizontalDefaultPosition = "center";
18616
19073
  break;
18617
19074
  }
18618
19075
  }
@@ -18759,7 +19216,15 @@ class TreeItem extends FoundationElement {
18759
19216
  }
18760
19217
 
18761
19218
  handleSelected(e) {
18762
- this.$emit("selected-change", e);
19219
+ if (e === null || e === void 0 ? void 0 : e.defaultPrevented) {
19220
+ return;
19221
+ }
19222
+
19223
+ e === null || e === void 0 ? void 0 : e.preventDefault();
19224
+
19225
+ if (!this.disabled) {
19226
+ this.$emit("selected-change", e);
19227
+ }
18763
19228
  }
18764
19229
 
18765
19230
  setExpanded(expanded) {
@@ -19060,38 +19525,6 @@ __decorate$1([observable], TreeView.prototype, "nested", void 0);
19060
19525
 
19061
19526
  __decorate$1([observable], TreeView.prototype, "slottedTreeItems", void 0);
19062
19527
 
19063
- /**
19064
- * Expose ltr and rtl strings
19065
- */
19066
- var Direction;
19067
-
19068
- (function (Direction) {
19069
- Direction["ltr"] = "ltr";
19070
- Direction["rtl"] = "rtl";
19071
- })(Direction || (Direction = {}));
19072
-
19073
- /**
19074
- * Define system colors for use in CSS stylesheets.
19075
- *
19076
- * https://drafts.csswg.org/css-color/#css-system-colors
19077
- */
19078
- var SystemColors;
19079
-
19080
- (function (SystemColors) {
19081
- SystemColors["Canvas"] = "Canvas";
19082
- SystemColors["CanvasText"] = "CanvasText";
19083
- SystemColors["LinkText"] = "LinkText";
19084
- SystemColors["VisitedText"] = "VisitedText";
19085
- SystemColors["ActiveText"] = "ActiveText";
19086
- SystemColors["ButtonFace"] = "ButtonFace";
19087
- SystemColors["ButtonText"] = "ButtonText";
19088
- SystemColors["Field"] = "Field";
19089
- SystemColors["FieldText"] = "FieldText";
19090
- SystemColors["Highlight"] = "Highlight";
19091
- SystemColors["HighlightText"] = "HighlightText";
19092
- SystemColors["GrayText"] = "GrayText";
19093
- })(SystemColors || (SystemColors = {}));
19094
-
19095
19528
  /**
19096
19529
  * Ensures that an input number does not exceed a max value and is not less than a min value.
19097
19530
  * @param i - the number to clamp
@@ -20715,7 +21148,7 @@ const typeRampPlus1LineHeight = create('type-ramp-plus-1-line-height').withDefau
20715
21148
  const typeRampPlus2FontSize = create('type-ramp-plus-2-font-size').withDefault('20px');
20716
21149
  /** @public */
20717
21150
 
20718
- const typeRampPlus2LineHeight = create('type-ramp-plus-2-line-height').withDefault('28px');
21151
+ const typeRampPlus2LineHeight = create('type-ramp-plus-2-line-height').withDefault('26px');
20719
21152
  /** @public */
20720
21153
 
20721
21154
  const typeRampPlus3FontSize = create('type-ramp-plus-3-font-size').withDefault('24px');
@@ -23103,6 +23536,7 @@ const horizontalScrollStyles = horizontalScrollStyles$1;
23103
23536
  const listboxStyles$1 = (context, definition) => css`
23104
23537
  ${display('inline-flex')} :host{border:calc(${strokeWidth} * 1px) solid ${neutralStrokeRest};border-radius:calc(${controlCornerRadius} * 1px);box-sizing:border-box;flex-direction:column;padding:calc(${designUnit} * 1px) 0;outline:none}::slotted(${context.tagFor(ListboxOption)}){margin:0 calc(${designUnit} * 1px)}:host(:focus-within:not([disabled])){border-color:${focusStrokeOuter};box-shadow:0 0 0 1px ${focusStrokeOuter} inset}`;
23105
23538
 
23539
+ class Listbox extends Listbox$1 {}
23106
23540
  /**
23107
23541
  * The Fluent listbox Custom Element. Implements, {@link @microsoft/fast-foundation#Listbox}
23108
23542
  * {@link @microsoft/fast-foundation#listboxTemplate}
@@ -23464,6 +23898,90 @@ const fluentRadioGroup = RadioGroup.compose({
23464
23898
 
23465
23899
  const radioGroupStyles = radioGroupStyles$1;
23466
23900
 
23901
+ /**
23902
+ * @public
23903
+ */
23904
+
23905
+ const searchTemplate = (context, definition) => html`<template class=" ${x => x.readOnly ? 'readonly' : ''} "><label part="label" for="control" class="${x => x.defaultSlottedNodes && x.defaultSlottedNodes.length ? 'label' : 'label label__hidden'}"><slot ${slotted({
23906
+ property: 'defaultSlottedNodes',
23907
+ filter: whitespaceFilter
23908
+ })}></slot></label><div class="root" part="root" ${ref('root')}>${startSlotTemplate(context, definition)}<div class="input-wrapper" part="input-wrapper"><input class="control" part="control" id="control" @input="${x => x.handleTextInput()}" @change="${x => x.handleChange()}" ?autofocus="${x => x.autofocus}" ?disabled="${x => x.disabled}" list="${x => x.list}" maxlength="${x => x.maxlength}" minlength="${x => x.minlength}" pattern="${x => x.pattern}" placeholder="${x => x.placeholder}" ?readonly="${x => x.readOnly}" ?required="${x => x.required}" size="${x => x.size}" ?spellcheck="${x => x.spellcheck}" :value="${x => x.value}" type="search" aria-atomic="${x => x.ariaAtomic}" aria-busy="${x => x.ariaBusy}" aria-controls="${x => x.ariaControls}" aria-current="${x => x.ariaCurrent}" aria-describedby="${x => x.ariaDescribedby}" aria-details="${x => x.ariaDetails}" aria-disabled="${x => x.ariaDisabled}" aria-errormessage="${x => x.ariaErrormessage}" aria-flowto="${x => x.ariaFlowto}" aria-haspopup="${x => x.ariaHaspopup}" aria-hidden="${x => x.ariaHidden}" aria-invalid="${x => x.ariaInvalid}" aria-keyshortcuts="${x => x.ariaKeyshortcuts}" aria-label="${x => x.ariaLabel}" aria-labelledby="${x => x.ariaLabelledby}" aria-live="${x => x.ariaLive}" aria-owns="${x => x.ariaOwns}" aria-relevant="${x => x.ariaRelevant}" aria-roledescription="${x => x.ariaRoledescription}" ${ref('control')} /><slot name="clear-button"><button class="clear-button ${x => x.value ? '' : 'clear-button__hidden'}" part="clear-button" tabindex="-1" @click=${x => x.handleClearInput()}><slot name="clear-glyph"><svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg"><path d="m2.09 2.22.06-.07a.5.5 0 0 1 .63-.06l.07.06L6 5.29l3.15-3.14a.5.5 0 1 1 .7.7L6.71 6l3.14 3.15c.18.17.2.44.06.63l-.06.07a.5.5 0 0 1-.63.06l-.07-.06L6 6.71 2.85 9.85a.5.5 0 0 1-.7-.7L5.29 6 2.15 2.85a.5.5 0 0 1-.06-.63l.06-.07-.06.07Z" /></svg></slot></button></slot></div>${endSlotTemplate(context, definition)}</div></template>`;
23909
+
23910
+ const clearButtonHover = DesignToken.create("clear-button-hover").withDefault(target => {
23911
+ const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);
23912
+ const inputRecipe = neutralFillInputRecipe.getValueFor(target);
23913
+ return buttonRecipe.evaluate(target, inputRecipe.evaluate(target).focus).hover;
23914
+ });
23915
+ const clearButtonActive = DesignToken.create("clear-button-active").withDefault(target => {
23916
+ const buttonRecipe = neutralFillStealthRecipe.getValueFor(target);
23917
+ const inputRecipe = neutralFillInputRecipe.getValueFor(target);
23918
+ return buttonRecipe.evaluate(target, inputRecipe.evaluate(target).focus).active;
23919
+ });
23920
+ const searchFilledStyles = (context, definition) => css`
23921
+ ${inputFilledStyles(context, definition, '.root')}
23922
+ `.withBehaviors(forcedColorsStylesheetBehavior(css`
23923
+ ${inputFilledForcedColorStyles(context, definition, '.root')}
23924
+ `));
23925
+ const searchStyles$1 = (context, definition) => css`
23926
+ ${display('inline-block')}
23927
+ ${inputStyles(context, definition, '.root')}
23928
+ ${inputStateStyles()}
23929
+ .root{display:flex;flex-direction:row}.control{-webkit-appearance:none;color:inherit;background:transparent;border:0;height:calc(100% - 4px);margin-top:auto;margin-bottom:auto;padding:0 calc(${designUnit} * 2px + 1px);font-family:inherit;font-size:inherit;line-height:inherit}.clear-button{display:inline-flex;align-items:center;margin:1px;height:calc(100% - 2px);opacity:0;background:transparent;color:${neutralForegroundRest};fill:currentcolor;border:none;border-radius:calc(${controlCornerRadius} * 1px);min-width:calc(${heightNumber} * 1px);font-size:${typeRampBaseFontSize};line-height:${typeRampBaseLineHeight};outline:none;font-family:${bodyFont};padding:0 calc((10 + (${designUnit} * 2 * ${density})) * 1px)}.clear-button:hover{background:${clearButtonHover}}.clear-button:active{background:${clearButtonActive}}:host(:hover:not([disabled],[readOnly])) .clear-button,:host(:active:not([disabled],[readOnly])) .clear-button,:host(:focus-within:not([disabled],[readOnly])) .clear-button{opacity:1}:host(:hover:not([disabled],[readOnly])) .clear-button__hidden,:host(:active:not([disabled],[readOnly])) .clear-button__hidden,:host(:focus-within:not([disabled],[readOnly])) .clear-button__hidden{opacity:0}.control::-webkit-search-cancel-button{-webkit-appearance:none}.input-wrapper{display:flex;position:relative;width:100%}.start,.end{display:flex;margin:1px;align-items:center}.start{display:flex;margin-inline-start:11px}::slotted([slot="end"]){height:100%}.clear-button__hidden{opacity:0}.end{margin-inline-end:11px}::slotted(${context.tagFor(Button$1)}){margin-inline-end:1px}`.withBehaviors(appearanceBehavior('filled', searchFilledStyles(context, definition)), forcedColorsStylesheetBehavior(css`
23930
+ ${inputForcedColorStyles(context, definition, '.root')}
23931
+ `));
23932
+
23933
+ /**
23934
+ * The Fluent search class
23935
+ * @internal
23936
+ */
23937
+
23938
+ class Search extends Search$1 {
23939
+ constructor() {
23940
+ super(...arguments);
23941
+ /**
23942
+ * The appearance of the element.
23943
+ *
23944
+ * @public
23945
+ * @remarks
23946
+ * HTML Attribute: appearance
23947
+ */
23948
+
23949
+ this.appearance = 'outline';
23950
+ }
23951
+
23952
+ }
23953
+
23954
+ __decorate([attr], Search.prototype, "appearance", void 0);
23955
+ /**
23956
+ * The Fluent Search Custom Element. Implements {@link @microsoft/fast-foundation#Search},
23957
+ * {@link @microsoft/fast-foundation#searchTemplate}
23958
+ *
23959
+ *
23960
+ * @public
23961
+ * @remarks
23962
+ * HTML Element: \<fluent-search\>
23963
+ *
23964
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}
23965
+ */
23966
+
23967
+
23968
+ const fluentSearch = Search.compose({
23969
+ baseName: 'search',
23970
+ baseClass: Search$1,
23971
+ template: searchTemplate,
23972
+ styles: searchStyles$1,
23973
+ start: `<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg%22%3E"><path d="M8.5 3a5.5 5.5 0 0 1 4.23 9.02l4.12 4.13a.5.5 0 0 1-.63.76l-.07-.06-4.13-4.12A5.5 5.5 0 1 1 8.5 3Zm0 1a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z"/></svg>`,
23974
+ shadowOptions: {
23975
+ delegatesFocus: true
23976
+ }
23977
+ });
23978
+ /**
23979
+ * Styles for Search
23980
+ * @public
23981
+ */
23982
+
23983
+ const searchStyles = searchStyles$1;
23984
+
23467
23985
  /**
23468
23986
  * The Fluent select class
23469
23987
  * @internal
@@ -23683,7 +24201,7 @@ const fluentTab = Tab.compose({
23683
24201
  const tabStyles = tabStyles$1;
23684
24202
 
23685
24203
  const tabPanelStyles$1 = (context, definition) => css`
23686
- ${display('block')} :host{box-sizing:border-box;font-family:${bodyFont};font-size:${typeRampMinus1FontSize};font-weight:400;line-height:${typeRampMinus1LineHeight};padding:0 calc((6 + (${designUnit} * 2 * ${density})) * 1px)}`;
24204
+ ${display('block')} :host{box-sizing:border-box;font-family:${bodyFont};font-size:${typeRampBaseFontSize};font-weight:400;line-height:${typeRampBaseLineHeight};padding:0 calc((6 + (${designUnit} * 2 * ${density})) * 1px)}`;
23687
24205
 
23688
24206
  /**
23689
24207
  * The Fluent Tab Panel Custom Element. Implements {@link @microsoft/fast-foundation#TabPanel},
@@ -24067,6 +24585,7 @@ const allComponents = {
24067
24585
  fluentProgressRing,
24068
24586
  fluentRadio,
24069
24587
  fluentRadioGroup,
24588
+ fluentSearch,
24070
24589
  fluentSelect,
24071
24590
  fluentSkeleton,
24072
24591
  fluentSlider,
@@ -24122,4 +24641,4 @@ function provideFluentDesignSystem(element) {
24122
24641
 
24123
24642
  const FluentDesignSystem = provideFluentDesignSystem().register(allComponents);
24124
24643
 
24125
- export { AccentButtonStyles, Accordion, AccordionItem, Anchor, AnchoredRegion, Badge, Breadcrumb, BreadcrumbItem, Button, Card, Combobox, DataGrid, DataGridCell, DataGridRow, DesignSystemProvider, Dialog, DirectionalStyleSheetBehavior, Divider, Flipper, FluentDesignSystem, HorizontalScroll, HypertextStyles, LightweightButtonStyles, Listbox, Menu, MenuItem, NumberField, OptionStyles, OutlineButtonStyles, PaletteRGB, Progress, ProgressRing, Radio, RadioGroup, RadioStyles, Select, Skeleton, Slider, SliderLabel, StandardLuminance, StealthButtonStyles, SwatchRGB, Switch, Tab, TabPanel, Tabs, TextArea, TextField, Toolbar, Tooltip, TreeItem, TreeView, accentBaseColor, accentFillActive, accentFillActiveDelta, accentFillFocus, accentFillFocusDelta, accentFillHover, accentFillHoverDelta, accentFillRecipe, accentFillRest, accentFillRestDelta, accentForegroundActive, accentForegroundActiveDelta, accentForegroundCut, accentForegroundCutLarge, accentForegroundFocus, accentForegroundFocusDelta, accentForegroundHover, accentForegroundHoverDelta, accentForegroundRecipe, accentForegroundRest, accentForegroundRestDelta, accentPalette, accentStrokeControlActive, accentStrokeControlFocus, accentStrokeControlHover, accentStrokeControlRecipe, accentStrokeControlRest, accordionItemStyles, accordionStyles, allComponents, ambientShadow, anchorStyles, anchoredRegionStyles, badgeStyles, baseButtonStyles, baseHeightMultiplier, baseHorizontalSpacingMultiplier, baseLayerLuminance, bodyFont, breadcrumbItemStyles, breadcrumbStyles, buttonStyles, cardStyles, checkboxStyles, comboboxStyles, controlCornerRadius, cornerRadius, dataGridCellStyles, dataGridRowStyles, dataGridStyles, density, designUnit, dialogStyles, direction, directionalShadow, disabledOpacity, dividerStyles, elevatedCornerRadius, elevation, elevationShadowCardActive, elevationShadowCardActiveSize, elevationShadowCardFocus, elevationShadowCardFocusSize, elevationShadowCardHover, elevationShadowCardHoverSize, elevationShadowCardRest, elevationShadowCardRestSize, elevationShadowDialog, elevationShadowDialogSize, elevationShadowFlyout, elevationShadowFlyoutSize, elevationShadowRecipe, elevationShadowTooltip, elevationShadowTooltipSize, fillColor, flipperStyles, fluentAccordion, fluentAccordionItem, fluentAnchor, fluentAnchoredRegion, fluentBadge, fluentBreadcrumb, fluentBreadcrumbItem, fluentButton, fluentCalendar, fluentCard, fluentCheckbox, fluentCombobox, fluentDataGrid, fluentDataGridCell, fluentDataGridRow, fluentDesignSystemProvider, fluentDialog, fluentDivider, fluentFlipper, fluentHorizontalScroll, fluentListbox, fluentMenu, fluentMenuItem, fluentNumberField, fluentOption, fluentProgress, fluentProgressRing, fluentRadio, fluentRadioGroup, fluentSelect, fluentSkeleton, fluentSlider, fluentSliderLabel, fluentSwitch, fluentTab, fluentTabPanel, fluentTabs, fluentTextArea, fluentTextField, fluentToolbar, fluentTooltip, fluentTreeItem, fluentTreeView, focusOutlineWidth, focusStrokeInner, focusStrokeInnerRecipe, focusStrokeOuter, focusStrokeOuterRecipe, focusStrokeWidth, foregroundOnAccentActive, foregroundOnAccentActiveLarge, foregroundOnAccentFocus, foregroundOnAccentFocusLarge, foregroundOnAccentHover, foregroundOnAccentHoverLarge, foregroundOnAccentLargeRecipe, foregroundOnAccentRecipe, foregroundOnAccentRest, foregroundOnAccentRestLarge, heightNumber, horizontalScrollStyles, inputFilledForcedColorStyles, inputFilledStyles, inputForcedColorStyles, inputStateStyles, inputStyles, isDark, layerCornerRadius, listboxStyles, menuItemStyles, menuStyles, neutralBaseColor, neutralContrastFillActive, neutralContrastFillActiveDelta, neutralContrastFillFocus, neutralContrastFillFocusDelta, neutralContrastFillHover, neutralContrastFillHoverDelta, neutralContrastFillRest, neutralContrastFillRestDelta, neutralDivider, neutralDividerRestDelta, neutralFillActive, neutralFillActiveDelta, neutralFillCard, neutralFillCardDelta, neutralFillFocus, neutralFillFocusDelta, neutralFillHover, neutralFillHoverDelta, neutralFillInputActive, neutralFillInputActiveDelta, neutralFillInputAltActive, neutralFillInputAltActiveDelta, neutralFillInputAltFocus, neutralFillInputAltFocusDelta, neutralFillInputAltHover, neutralFillInputAltHoverDelta, neutralFillInputAltRecipe, neutralFillInputAltRest, neutralFillInputAltRestDelta, neutralFillInputFocus, neutralFillInputFocusDelta, neutralFillInputHover, neutralFillInputHoverDelta, neutralFillInputRecipe, neutralFillInputRest, neutralFillInputRestDelta, neutralFillInverseActive, neutralFillInverseActiveDelta, neutralFillInverseFocus, neutralFillInverseFocusDelta, neutralFillInverseHover, neutralFillInverseHoverDelta, neutralFillInverseRecipe, neutralFillInverseRest, neutralFillInverseRestDelta, neutralFillLayerActive, neutralFillLayerActiveDelta, neutralFillLayerAltRecipe, neutralFillLayerAltRest, neutralFillLayerAltRestDelta, neutralFillLayerHover, neutralFillLayerHoverDelta, neutralFillLayerRecipe, neutralFillLayerRest, neutralFillLayerRestDelta, neutralFillRecipe, neutralFillRest, neutralFillRestDelta, neutralFillSecondaryActive, neutralFillSecondaryActiveDelta, neutralFillSecondaryFocus, neutralFillSecondaryFocusDelta, neutralFillSecondaryHover, neutralFillSecondaryHoverDelta, neutralFillSecondaryRecipe, neutralFillSecondaryRest, neutralFillSecondaryRestDelta, neutralFillStealthActive, neutralFillStealthActiveDelta, neutralFillStealthFocus, neutralFillStealthFocusDelta, neutralFillStealthHover, neutralFillStealthHoverDelta, neutralFillStealthRecipe, neutralFillStealthRest, neutralFillStealthRestDelta, neutralFillStrongActive, neutralFillStrongActiveDelta, neutralFillStrongFocus, neutralFillStrongFocusDelta, neutralFillStrongHover, neutralFillStrongHoverDelta, neutralFillStrongRecipe, neutralFillStrongRest, neutralFillStrongRestDelta, neutralFillToggleActive, neutralFillToggleActiveDelta, neutralFillToggleFocus, neutralFillToggleFocusDelta, neutralFillToggleHover, neutralFillToggleHoverDelta, neutralFillToggleRest, neutralFillToggleRestDelta, neutralFocus, neutralFocusInnerAccent, neutralForegroundActive, neutralForegroundFocus, neutralForegroundHint, neutralForegroundHintRecipe, neutralForegroundHover, neutralForegroundRecipe, neutralForegroundRest, neutralLayer1, neutralLayer1Recipe, neutralLayer2, neutralLayer2Recipe, neutralLayer3, neutralLayer3Recipe, neutralLayer4, neutralLayer4Recipe, neutralLayerCardContainer, neutralLayerCardContainerRecipe, neutralLayerFloating, neutralLayerFloatingRecipe, neutralLayerL1, neutralLayerL2, neutralLayerL3, neutralLayerL4, neutralOutlineActive, neutralOutlineFocus, neutralOutlineHover, neutralOutlineRest, neutralPalette, neutralStrokeActive, neutralStrokeActiveDelta, neutralStrokeControlActive, neutralStrokeControlActiveDelta, neutralStrokeControlFocus, neutralStrokeControlFocusDelta, neutralStrokeControlHover, neutralStrokeControlHoverDelta, neutralStrokeControlRecipe, neutralStrokeControlRest, neutralStrokeControlRestDelta, neutralStrokeDividerRecipe, neutralStrokeDividerRest, neutralStrokeDividerRestDelta, neutralStrokeFocus, neutralStrokeFocusDelta, neutralStrokeHover, neutralStrokeHoverDelta, neutralStrokeInputActive, neutralStrokeInputFocus, neutralStrokeInputHover, neutralStrokeInputRecipe, neutralStrokeInputRest, neutralStrokeLayerActive, neutralStrokeLayerActiveDelta, neutralStrokeLayerHover, neutralStrokeLayerHoverDelta, neutralStrokeLayerRecipe, neutralStrokeLayerRest, neutralStrokeLayerRestDelta, neutralStrokeRecipe, neutralStrokeRest, neutralStrokeRestDelta, neutralStrokeStrongActive, neutralStrokeStrongActiveDelta, neutralStrokeStrongFocus, neutralStrokeStrongFocusDelta, neutralStrokeStrongHover, neutralStrokeStrongHoverDelta, neutralStrokeStrongRecipe, neutralStrokeStrongRest, numberFieldStyles, outlineWidth, progressRingStyles, progressStyles, provideFluentDesignSystem, radioGroupStyles, selectStyles, skeletonStyles, sliderLabelStyles, sliderStyles, strokeWidth, switchStyles, tabPanelStyles, tabStyles, tabsStyles, textAreaStyles, textFieldStyles, treeItemStyles, treeViewStyles, typeRampBaseFontSize, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6LineHeight };
24644
+ export { AccentButtonStyles, Accordion, AccordionItem, Anchor, AnchoredRegion, Badge, Breadcrumb, BreadcrumbItem, Button, Card, Combobox, DataGrid, DataGridCell, DataGridRow, DesignSystemProvider, Dialog, DirectionalStyleSheetBehavior, Divider, Flipper, FluentDesignSystem, HorizontalScroll, HypertextStyles, LightweightButtonStyles, Listbox, Menu, MenuItem, NumberField, OptionStyles, OutlineButtonStyles, PaletteRGB, Progress, ProgressRing, Radio, RadioGroup, RadioStyles, Search, Select, Skeleton, Slider, SliderLabel, StandardLuminance, StealthButtonStyles, SwatchRGB, Switch, Tab, TabPanel, Tabs, TextArea, TextField, Toolbar, Tooltip, TreeItem, TreeView, accentBaseColor, accentFillActive, accentFillActiveDelta, accentFillFocus, accentFillFocusDelta, accentFillHover, accentFillHoverDelta, accentFillRecipe, accentFillRest, accentFillRestDelta, accentForegroundActive, accentForegroundActiveDelta, accentForegroundCut, accentForegroundCutLarge, accentForegroundFocus, accentForegroundFocusDelta, accentForegroundHover, accentForegroundHoverDelta, accentForegroundRecipe, accentForegroundRest, accentForegroundRestDelta, accentPalette, accentStrokeControlActive, accentStrokeControlFocus, accentStrokeControlHover, accentStrokeControlRecipe, accentStrokeControlRest, accordionItemStyles, accordionStyles, allComponents, ambientShadow, anchorStyles, anchoredRegionStyles, badgeStyles, baseButtonStyles, baseHeightMultiplier, baseHorizontalSpacingMultiplier, baseLayerLuminance, bodyFont, breadcrumbItemStyles, breadcrumbStyles, buttonStyles, cardStyles, checkboxStyles, comboboxStyles, controlCornerRadius, cornerRadius, dataGridCellStyles, dataGridRowStyles, dataGridStyles, density, designUnit, dialogStyles, direction, directionalShadow, disabledOpacity, dividerStyles, elevatedCornerRadius, elevation, elevationShadowCardActive, elevationShadowCardActiveSize, elevationShadowCardFocus, elevationShadowCardFocusSize, elevationShadowCardHover, elevationShadowCardHoverSize, elevationShadowCardRest, elevationShadowCardRestSize, elevationShadowDialog, elevationShadowDialogSize, elevationShadowFlyout, elevationShadowFlyoutSize, elevationShadowRecipe, elevationShadowTooltip, elevationShadowTooltipSize, fillColor, flipperStyles, fluentAccordion, fluentAccordionItem, fluentAnchor, fluentAnchoredRegion, fluentBadge, fluentBreadcrumb, fluentBreadcrumbItem, fluentButton, fluentCalendar, fluentCard, fluentCheckbox, fluentCombobox, fluentDataGrid, fluentDataGridCell, fluentDataGridRow, fluentDesignSystemProvider, fluentDialog, fluentDivider, fluentFlipper, fluentHorizontalScroll, fluentListbox, fluentMenu, fluentMenuItem, fluentNumberField, fluentOption, fluentProgress, fluentProgressRing, fluentRadio, fluentRadioGroup, fluentSearch, fluentSelect, fluentSkeleton, fluentSlider, fluentSliderLabel, fluentSwitch, fluentTab, fluentTabPanel, fluentTabs, fluentTextArea, fluentTextField, fluentToolbar, fluentTooltip, fluentTreeItem, fluentTreeView, focusOutlineWidth, focusStrokeInner, focusStrokeInnerRecipe, focusStrokeOuter, focusStrokeOuterRecipe, focusStrokeWidth, foregroundOnAccentActive, foregroundOnAccentActiveLarge, foregroundOnAccentFocus, foregroundOnAccentFocusLarge, foregroundOnAccentHover, foregroundOnAccentHoverLarge, foregroundOnAccentLargeRecipe, foregroundOnAccentRecipe, foregroundOnAccentRest, foregroundOnAccentRestLarge, heightNumber, horizontalScrollStyles, inputFilledForcedColorStyles, inputFilledStyles, inputForcedColorStyles, inputStateStyles, inputStyles, isDark, layerCornerRadius, listboxStyles, menuItemStyles, menuStyles, neutralBaseColor, neutralContrastFillActive, neutralContrastFillActiveDelta, neutralContrastFillFocus, neutralContrastFillFocusDelta, neutralContrastFillHover, neutralContrastFillHoverDelta, neutralContrastFillRest, neutralContrastFillRestDelta, neutralDivider, neutralDividerRestDelta, neutralFillActive, neutralFillActiveDelta, neutralFillCard, neutralFillCardDelta, neutralFillFocus, neutralFillFocusDelta, neutralFillHover, neutralFillHoverDelta, neutralFillInputActive, neutralFillInputActiveDelta, neutralFillInputAltActive, neutralFillInputAltActiveDelta, neutralFillInputAltFocus, neutralFillInputAltFocusDelta, neutralFillInputAltHover, neutralFillInputAltHoverDelta, neutralFillInputAltRecipe, neutralFillInputAltRest, neutralFillInputAltRestDelta, neutralFillInputFocus, neutralFillInputFocusDelta, neutralFillInputHover, neutralFillInputHoverDelta, neutralFillInputRecipe, neutralFillInputRest, neutralFillInputRestDelta, neutralFillInverseActive, neutralFillInverseActiveDelta, neutralFillInverseFocus, neutralFillInverseFocusDelta, neutralFillInverseHover, neutralFillInverseHoverDelta, neutralFillInverseRecipe, neutralFillInverseRest, neutralFillInverseRestDelta, neutralFillLayerActive, neutralFillLayerActiveDelta, neutralFillLayerAltRecipe, neutralFillLayerAltRest, neutralFillLayerAltRestDelta, neutralFillLayerHover, neutralFillLayerHoverDelta, neutralFillLayerRecipe, neutralFillLayerRest, neutralFillLayerRestDelta, neutralFillRecipe, neutralFillRest, neutralFillRestDelta, neutralFillSecondaryActive, neutralFillSecondaryActiveDelta, neutralFillSecondaryFocus, neutralFillSecondaryFocusDelta, neutralFillSecondaryHover, neutralFillSecondaryHoverDelta, neutralFillSecondaryRecipe, neutralFillSecondaryRest, neutralFillSecondaryRestDelta, neutralFillStealthActive, neutralFillStealthActiveDelta, neutralFillStealthFocus, neutralFillStealthFocusDelta, neutralFillStealthHover, neutralFillStealthHoverDelta, neutralFillStealthRecipe, neutralFillStealthRest, neutralFillStealthRestDelta, neutralFillStrongActive, neutralFillStrongActiveDelta, neutralFillStrongFocus, neutralFillStrongFocusDelta, neutralFillStrongHover, neutralFillStrongHoverDelta, neutralFillStrongRecipe, neutralFillStrongRest, neutralFillStrongRestDelta, neutralFillToggleActive, neutralFillToggleActiveDelta, neutralFillToggleFocus, neutralFillToggleFocusDelta, neutralFillToggleHover, neutralFillToggleHoverDelta, neutralFillToggleRest, neutralFillToggleRestDelta, neutralFocus, neutralFocusInnerAccent, neutralForegroundActive, neutralForegroundFocus, neutralForegroundHint, neutralForegroundHintRecipe, neutralForegroundHover, neutralForegroundRecipe, neutralForegroundRest, neutralLayer1, neutralLayer1Recipe, neutralLayer2, neutralLayer2Recipe, neutralLayer3, neutralLayer3Recipe, neutralLayer4, neutralLayer4Recipe, neutralLayerCardContainer, neutralLayerCardContainerRecipe, neutralLayerFloating, neutralLayerFloatingRecipe, neutralLayerL1, neutralLayerL2, neutralLayerL3, neutralLayerL4, neutralOutlineActive, neutralOutlineFocus, neutralOutlineHover, neutralOutlineRest, neutralPalette, neutralStrokeActive, neutralStrokeActiveDelta, neutralStrokeControlActive, neutralStrokeControlActiveDelta, neutralStrokeControlFocus, neutralStrokeControlFocusDelta, neutralStrokeControlHover, neutralStrokeControlHoverDelta, neutralStrokeControlRecipe, neutralStrokeControlRest, neutralStrokeControlRestDelta, neutralStrokeDividerRecipe, neutralStrokeDividerRest, neutralStrokeDividerRestDelta, neutralStrokeFocus, neutralStrokeFocusDelta, neutralStrokeHover, neutralStrokeHoverDelta, neutralStrokeInputActive, neutralStrokeInputFocus, neutralStrokeInputHover, neutralStrokeInputRecipe, neutralStrokeInputRest, neutralStrokeLayerActive, neutralStrokeLayerActiveDelta, neutralStrokeLayerHover, neutralStrokeLayerHoverDelta, neutralStrokeLayerRecipe, neutralStrokeLayerRest, neutralStrokeLayerRestDelta, neutralStrokeRecipe, neutralStrokeRest, neutralStrokeRestDelta, neutralStrokeStrongActive, neutralStrokeStrongActiveDelta, neutralStrokeStrongFocus, neutralStrokeStrongFocusDelta, neutralStrokeStrongHover, neutralStrokeStrongHoverDelta, neutralStrokeStrongRecipe, neutralStrokeStrongRest, numberFieldStyles, outlineWidth, progressRingStyles, progressStyles, provideFluentDesignSystem, radioGroupStyles, searchStyles, searchTemplate, selectStyles, skeletonStyles, sliderLabelStyles, sliderStyles, strokeWidth, switchStyles, tabPanelStyles, tabStyles, tabsStyles, textAreaStyles, textFieldStyles, treeItemStyles, treeViewStyles, typeRampBaseFontSize, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6LineHeight };