@fluentui/web-components 2.1.2 → 2.2.2

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.
@@ -1475,7 +1475,10 @@ function compileTemplate(template, directives) {
1475
1475
  // because something like a when, repeat, etc. could add nodes before the marker.
1476
1476
  // To mitigate this, we insert a stable first node. However, if we insert a node,
1477
1477
  // that will alter the result of the TreeWalker. So, we also need to offset the target index.
1478
- DOM.isMarker(fragment.firstChild) || fragment.childNodes.length === 1 && directives.length) {
1478
+ DOM.isMarker(fragment.firstChild) || // Or if there is only one node and a directive, it means the template's content
1479
+ // is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by
1480
+ // the directive. Inserting a new node ensures proper disposal of nodes added by the directive.
1481
+ fragment.childNodes.length === 1 && directives.length) {
1479
1482
  fragment.insertBefore(document.createComment(""), fragment.firstChild);
1480
1483
  targetOffset = -1;
1481
1484
  }
@@ -3631,7 +3634,8 @@ function when(binding, templateOrTemplateBinding) {
3631
3634
  }
3632
3635
 
3633
3636
  const defaultRepeatOptions = Object.freeze({
3634
- positioning: false
3637
+ positioning: false,
3638
+ recycle: true
3635
3639
  });
3636
3640
 
3637
3641
  function bindWithoutPositioning(view, items, index, context) {
@@ -3775,7 +3779,7 @@ class RepeatBehavior {
3775
3779
  for (; addIndex < end; ++addIndex) {
3776
3780
  const neighbor = views[addIndex];
3777
3781
  const location = neighbor ? neighbor.firstChild : this.location;
3778
- const view = totalRemoved.length > 0 ? totalRemoved.shift() : template.create();
3782
+ const view = this.options.recycle && totalRemoved.length > 0 ? totalRemoved.shift() : template.create();
3779
3783
  views.splice(addIndex, 0, view);
3780
3784
  bindView(view, items, addIndex, childContext);
3781
3785
  view.insertBefore(location);
@@ -4173,7 +4177,7 @@ const startTemplate = html`<span part="start" ${ref("startContainer")}><slot nam
4173
4177
  * @public
4174
4178
  */
4175
4179
 
4176
- 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>`;
4177
4181
 
4178
4182
  /*! *****************************************************************************
4179
4183
  Copyright (c) Microsoft Corporation.
@@ -5559,7 +5563,9 @@ function isArrayIndex(value) {
5559
5563
  for (let i = 0; i < length; ++i) {
5560
5564
  ch = value.charCodeAt(i);
5561
5565
 
5562
- if (i === 0 && ch === 0x30 && length > 1 || ch < 0x30
5566
+ if (i === 0 && ch === 0x30 && length > 1
5567
+ /* must not start with 0 */
5568
+ || ch < 0x30
5563
5569
  /* 0 */
5564
5570
  || ch > 0x39
5565
5571
  /* 9 */
@@ -5899,7 +5905,12 @@ applyMixins(AccordionItem, StartEnd);
5899
5905
  * @public
5900
5906
  */
5901
5907
 
5902
- 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>`;
5903
5914
 
5904
5915
  var Orientation;
5905
5916
 
@@ -6107,12 +6118,12 @@ const ArrowKeys = {
6107
6118
  /**
6108
6119
  * Expose ltr and rtl strings
6109
6120
  */
6110
- var Direction$1;
6121
+ var Direction;
6111
6122
 
6112
6123
  (function (Direction) {
6113
6124
  Direction["ltr"] = "ltr";
6114
6125
  Direction["rtl"] = "rtl";
6115
- })(Direction$1 || (Direction$1 = {}));
6126
+ })(Direction || (Direction = {}));
6116
6127
 
6117
6128
  /**
6118
6129
  * This method keeps a given value within the bounds of a min and max value. If the value
@@ -6146,6 +6157,28 @@ function uniqueId(prefix = "") {
6146
6157
  return `${prefix}${uniqueIdCounter++}`;
6147
6158
  }
6148
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
+
6149
6182
  /**
6150
6183
  * Expand mode for {@link Accordion}
6151
6184
  * @public
@@ -6557,7 +6590,7 @@ const anchoredRegionTemplate = (context, definition) => html`<template class="${
6557
6590
 
6558
6591
  const getDirection = rootNode => {
6559
6592
  const dirNode = rootNode.closest("[dir]");
6560
- return dirNode !== null && dirNode.dir === "rtl" ? Direction$1.rtl : Direction$1.ltr;
6593
+ return dirNode !== null && dirNode.dir === "rtl" ? Direction.rtl : Direction.ltr;
6561
6594
  };
6562
6595
 
6563
6596
  /**
@@ -6845,7 +6878,7 @@ class AnchoredRegion extends FoundationElement {
6845
6878
  this.baseVerticalOffset = 0;
6846
6879
  this.pendingPositioningUpdate = false;
6847
6880
  this.pendingReset = false;
6848
- this.currentDirection = Direction$1.ltr;
6881
+ this.currentDirection = Direction.ltr;
6849
6882
  this.regionVisible = false; // indicates that a layout update should occur even if geometry has not changed
6850
6883
  // used to ensure some attribute changes are applied
6851
6884
 
@@ -7074,7 +7107,7 @@ class AnchoredRegion extends FoundationElement {
7074
7107
  return;
7075
7108
  }
7076
7109
 
7077
- if (this.currentDirection === Direction$1.ltr) {
7110
+ if (this.currentDirection === Direction.ltr) {
7078
7111
  dirCorrectedHorizontalDefaultPosition = dirCorrectedHorizontalDefaultPosition === "start" ? "left" : "right";
7079
7112
  } else {
7080
7113
  dirCorrectedHorizontalDefaultPosition = dirCorrectedHorizontalDefaultPosition === "start" ? "right" : "left";
@@ -8475,10 +8508,23 @@ class FormAssociatedButton extends FormAssociated(_Button) {
8475
8508
  class Button$1 extends FormAssociatedButton {
8476
8509
  constructor() {
8477
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
+ };
8478
8523
  /**
8479
8524
  * Submits the parent form
8480
8525
  */
8481
8526
 
8527
+
8482
8528
  this.handleSubmission = () => {
8483
8529
  if (!this.form) {
8484
8530
  return;
@@ -8573,9 +8619,35 @@ class Button$1 extends FormAssociatedButton {
8573
8619
 
8574
8620
 
8575
8621
  connectedCallback() {
8622
+ var _a;
8623
+
8576
8624
  super.connectedCallback();
8577
8625
  this.proxy.setAttribute("type", this.type);
8578
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
+ }
8579
8651
  }
8580
8652
 
8581
8653
  }
@@ -10336,28 +10408,6 @@ __decorate$1([observable], Checkbox.prototype, "defaultSlottedNodes", void 0);
10336
10408
 
10337
10409
  __decorate$1([observable], Checkbox.prototype, "indeterminate", void 0);
10338
10410
 
10339
- /**
10340
- * Positioning directions for the listbox when a select is open.
10341
- * @public
10342
- */
10343
- var SelectPosition;
10344
-
10345
- (function (SelectPosition) {
10346
- SelectPosition["above"] = "above";
10347
- SelectPosition["below"] = "below";
10348
- })(SelectPosition || (SelectPosition = {}));
10349
- /**
10350
- * Select role.
10351
- * @public
10352
- */
10353
-
10354
-
10355
- var SelectRole;
10356
-
10357
- (function (SelectRole) {
10358
- SelectRole["combobox"] = "combobox";
10359
- })(SelectRole || (SelectRole = {}));
10360
-
10361
10411
  /**
10362
10412
  * Determines if the element is a {@link (ListboxOption:class)}
10363
10413
  *
@@ -10423,6 +10473,24 @@ class ListboxOption extends FoundationElement {
10423
10473
  this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);
10424
10474
  this.proxy.disabled = this.disabled;
10425
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
+ }
10426
10494
 
10427
10495
  defaultSelectedChanged() {
10428
10496
  if (!this.dirtySelected) {
@@ -10435,6 +10503,8 @@ class ListboxOption extends FoundationElement {
10435
10503
  }
10436
10504
 
10437
10505
  disabledChanged(prev, next) {
10506
+ this.ariaDisabled = this.disabled ? "true" : "false";
10507
+
10438
10508
  if (this.proxy instanceof HTMLOptionElement) {
10439
10509
  this.proxy.disabled = this.disabled;
10440
10510
  }
@@ -10449,14 +10519,14 @@ class ListboxOption extends FoundationElement {
10449
10519
  }
10450
10520
 
10451
10521
  selectedChanged() {
10452
- if (this.$fastController.isConnected) {
10453
- if (!this.dirtySelected) {
10454
- this.dirtySelected = true;
10455
- }
10522
+ this.ariaSelected = this.selected ? "true" : "false";
10456
10523
 
10457
- if (this.proxy instanceof HTMLOptionElement) {
10458
- this.proxy.selected = this.selected;
10459
- }
10524
+ if (!this.dirtySelected) {
10525
+ this.dirtySelected = true;
10526
+ }
10527
+
10528
+ if (this.proxy instanceof HTMLOptionElement) {
10529
+ this.proxy.selected = this.selected;
10460
10530
  }
10461
10531
  }
10462
10532
 
@@ -10499,6 +10569,8 @@ class ListboxOption extends FoundationElement {
10499
10569
 
10500
10570
  }
10501
10571
 
10572
+ __decorate$1([observable], ListboxOption.prototype, "checked", void 0);
10573
+
10502
10574
  __decorate$1([observable], ListboxOption.prototype, "defaultSelected", void 0);
10503
10575
 
10504
10576
  __decorate$1([attr({
@@ -10516,18 +10588,25 @@ __decorate$1([attr({
10516
10588
  attribute: "value",
10517
10589
  mode: "fromView"
10518
10590
  })], ListboxOption.prototype, "initialValue", void 0);
10519
-
10520
- applyMixins(ListboxOption, StartEnd);
10521
-
10522
10591
  /**
10523
- * Listbox role.
10592
+ * States and properties relating to the ARIA `option` role.
10593
+ *
10524
10594
  * @public
10525
10595
  */
10526
- var ListboxRole;
10527
10596
 
10528
- (function (ListboxRole) {
10529
- ListboxRole["listbox"] = "listbox";
10530
- })(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);
10531
10610
 
10532
10611
  /**
10533
10612
  * A Listbox Custom HTML Element.
@@ -10536,125 +10615,85 @@ var ListboxRole;
10536
10615
  * @public
10537
10616
  */
10538
10617
 
10539
- class Listbox extends FoundationElement {
10618
+ class Listbox$1 extends FoundationElement {
10540
10619
  constructor() {
10541
10620
  super(...arguments);
10542
10621
  /**
10543
- * The index of the selected option
10622
+ * The internal unfiltered list of selectable options.
10544
10623
  *
10545
- * @public
10546
- */
10547
-
10548
- this.selectedIndex = -1;
10549
- /**
10550
- * @internal
10551
- */
10552
-
10553
- this.typeaheadBuffer = "";
10554
- /**
10555
10624
  * @internal
10556
10625
  */
10557
10626
 
10558
- this.typeaheadTimeout = -1;
10627
+ this._options = [];
10559
10628
  /**
10560
- * Flag for the typeahead timeout expiration.
10629
+ * The index of the selected option.
10561
10630
  *
10562
- * @internal
10631
+ * @public
10563
10632
  */
10564
10633
 
10565
- this.typeAheadExpired = true;
10634
+ this.selectedIndex = -1;
10566
10635
  /**
10567
- * The role of the element.
10636
+ * A collection of the selected options.
10568
10637
  *
10569
10638
  * @public
10570
- * @remarks
10571
- * HTML Attribute: role
10572
10639
  */
10573
10640
 
10574
- this.role = ListboxRole.listbox;
10641
+ this.selectedOptions = [];
10575
10642
  /**
10576
- * 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.
10577
10645
  *
10578
10646
  * @internal
10579
10647
  */
10580
10648
 
10581
- this._options = [];
10649
+ this.shouldSkipFocus = false;
10582
10650
  /**
10583
- * A collection of the selected options.
10651
+ * The current typeahead buffer string.
10584
10652
  *
10585
- * @public
10653
+ * @internal
10586
10654
  */
10587
10655
 
10588
- this.selectedOptions = [];
10656
+ this.typeaheadBuffer = "";
10589
10657
  /**
10590
- * A standard `click` event creates a `focus` event before firing, so a
10591
- * `mousedown` event is used to skip that initial focus.
10658
+ * Flag for the typeahead timeout expiration.
10592
10659
  *
10593
10660
  * @internal
10594
10661
  */
10595
10662
 
10596
- this.shouldSkipFocus = false;
10663
+ this.typeaheadExpired = true;
10597
10664
  /**
10598
- * Move focus to an option whose label matches characters typed by the user.
10599
- * Consecutive keystrokes are batched into a buffer of search text used
10600
- * to match against the set of options. If TYPE_AHEAD_TIMEOUT_MS passes
10601
- * between consecutive keystrokes, the search restarts.
10665
+ * The timeout ID for the typeahead handler.
10602
10666
  *
10603
- * @param key - the key to be evaluated
10667
+ * @internal
10604
10668
  */
10605
10669
 
10606
- this.handleTypeAhead = key => {
10607
- if (this.typeaheadTimeout) {
10608
- window.clearTimeout(this.typeaheadTimeout);
10609
- }
10610
-
10611
- this.typeaheadTimeout = window.setTimeout(() => this.typeAheadExpired = true, Listbox.TYPE_AHEAD_TIMEOUT_MS);
10612
-
10613
- if (key.length > 1) {
10614
- return;
10615
- }
10616
-
10617
- this.typeaheadBuffer = `${this.typeAheadExpired ? "" : this.typeaheadBuffer}${key}`;
10618
- };
10619
- }
10620
-
10621
- selectedIndexChanged(prev, next) {
10622
- this.setSelectedOptions();
10670
+ this.typeaheadTimeout = -1;
10623
10671
  }
10672
+ /**
10673
+ * The first selected option.
10674
+ *
10675
+ * @internal
10676
+ */
10624
10677
 
10625
- typeaheadBufferChanged(prev, next) {
10626
- if (this.$fastController.isConnected) {
10627
- const pattern = this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&");
10628
- const re = new RegExp(`^${pattern}`, "gi");
10629
- const filteredOptions = this.options.filter(o => o.text.trim().match(re));
10630
-
10631
- if (filteredOptions.length) {
10632
- const selectedIndex = this.options.indexOf(filteredOptions[0]);
10633
10678
 
10634
- if (selectedIndex > -1) {
10635
- this.selectedIndex = selectedIndex;
10636
- }
10637
- }
10679
+ get firstSelectedOption() {
10680
+ var _a;
10638
10681
 
10639
- this.typeAheadExpired = false;
10640
- }
10682
+ return (_a = this.selectedOptions[0]) !== null && _a !== void 0 ? _a : null;
10641
10683
  }
10684
+ /**
10685
+ * The number of options.
10686
+ *
10687
+ * @public
10688
+ */
10642
10689
 
10643
- slottedOptionsChanged(prev, next) {
10644
- if (this.$fastController.isConnected) {
10645
- this.options = next.reduce((options, item) => {
10646
- if (isListboxOption(item)) {
10647
- options.push(item);
10648
- }
10649
10690
 
10650
- return options;
10651
- }, []);
10652
- this.options.forEach(o => {
10653
- o.id = o.id || uniqueId("option-");
10654
- });
10655
- this.setSelectedOptions();
10656
- this.setDefaultSelectedOption();
10691
+ get length() {
10692
+ if (this.options) {
10693
+ return this.options.length;
10657
10694
  }
10695
+
10696
+ return 0;
10658
10697
  }
10659
10698
  /**
10660
10699
  * The list of options.
@@ -10672,23 +10711,39 @@ class Listbox extends FoundationElement {
10672
10711
  this._options = value;
10673
10712
  Observable.notify(this, "options");
10674
10713
  }
10714
+ /**
10715
+ * Flag for the typeahead timeout expiration.
10716
+ *
10717
+ * @deprecated use `Listbox.typeaheadExpired`
10718
+ * @internal
10719
+ */
10675
10720
 
10676
- selectedOptionsChanged(prev, next) {
10677
- if (this.$fastController.isConnected) {
10678
- this.options.forEach(o => {
10679
- o.selected = next.includes(o);
10680
- });
10681
- }
10721
+
10722
+ get typeAheadExpired() {
10723
+ return this.typeaheadExpired;
10724
+ }
10725
+
10726
+ set typeAheadExpired(value) {
10727
+ this.typeaheadExpired = value;
10682
10728
  }
10683
10729
  /**
10730
+ * Handle click events for listbox options.
10731
+ *
10684
10732
  * @internal
10685
10733
  */
10686
10734
 
10687
10735
 
10688
- get firstSelectedOption() {
10689
- 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
+ }
10690
10743
  }
10691
10744
  /**
10745
+ * Focus the first selected option and scroll it into view.
10746
+ *
10692
10747
  * @internal
10693
10748
  */
10694
10749
 
@@ -10704,6 +10759,10 @@ class Listbox extends FoundationElement {
10704
10759
  }
10705
10760
  }
10706
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
+ *
10707
10766
  * @internal
10708
10767
  */
10709
10768
 
@@ -10717,123 +10776,30 @@ class Listbox extends FoundationElement {
10717
10776
  this.shouldSkipFocus = false;
10718
10777
  }
10719
10778
  /**
10720
- * Prevents `focusin` events from firing before `click` events when the
10721
- * 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.
10722
10783
  *
10723
- * @internal
10724
- */
10725
-
10726
-
10727
- mousedownHandler(e) {
10728
- this.shouldSkipFocus = !this.contains(document.activeElement);
10729
- return true;
10730
- }
10731
- /**
10732
- * @internal
10784
+ * @param key - the key to be evaluated
10733
10785
  */
10734
10786
 
10735
10787
 
10736
- setDefaultSelectedOption() {
10737
- if (this.options && this.$fastController.isConnected) {
10738
- const selectedIndex = this.options.findIndex(el => el.getAttribute("selected") !== null);
10739
-
10740
- if (selectedIndex !== -1) {
10741
- this.selectedIndex = selectedIndex;
10742
- return;
10743
- }
10744
-
10745
- this.selectedIndex = 0;
10788
+ handleTypeAhead(key) {
10789
+ if (this.typeaheadTimeout) {
10790
+ window.clearTimeout(this.typeaheadTimeout);
10746
10791
  }
10747
- }
10748
- /**
10749
- * Sets an option as selected and gives it focus.
10750
- *
10751
- * @param index - option index to select
10752
- * @public
10753
- */
10754
10792
 
10793
+ this.typeaheadTimeout = window.setTimeout(() => this.typeaheadExpired = true, Listbox$1.TYPE_AHEAD_TIMEOUT_MS);
10755
10794
 
10756
- setSelectedOptions() {
10757
- if (this.$fastController.isConnected && this.options) {
10758
- const selectedOption = this.options[this.selectedIndex] || null;
10759
- this.selectedOptions = this.options.filter(el => el.isSameNode(selectedOption));
10760
- this.ariaActiveDescendant = this.firstSelectedOption ? this.firstSelectedOption.id : "";
10761
- this.focusAndScrollOptionIntoView();
10795
+ if (key.length > 1) {
10796
+ return;
10762
10797
  }
10763
- }
10764
- /**
10765
- * Moves focus to the first selectable option
10766
- *
10767
- * @public
10768
- */
10769
-
10770
10798
 
10771
- selectFirstOption() {
10772
- if (!this.disabled) {
10773
- this.selectedIndex = 0;
10774
- }
10799
+ this.typeaheadBuffer = `${this.typeaheadExpired ? "" : this.typeaheadBuffer}${key}`;
10775
10800
  }
10776
10801
  /**
10777
- * Moves focus to the last selectable option
10778
- *
10779
- * @internal
10780
- */
10781
-
10782
-
10783
- selectLastOption() {
10784
- if (!this.disabled) {
10785
- this.selectedIndex = this.options.length - 1;
10786
- }
10787
- }
10788
- /**
10789
- * Moves focus to the next selectable option
10790
- *
10791
- * @internal
10792
- */
10793
-
10794
-
10795
- selectNextOption() {
10796
- if (!this.disabled && this.options && this.selectedIndex < this.options.length - 1) {
10797
- this.selectedIndex += 1;
10798
- }
10799
- }
10800
-
10801
- get length() {
10802
- if (this.options) {
10803
- return this.options.length;
10804
- }
10805
-
10806
- return 0;
10807
- }
10808
- /**
10809
- * Moves focus to the previous selectable option
10810
- *
10811
- * @internal
10812
- */
10813
-
10814
-
10815
- selectPreviousOption() {
10816
- if (!this.disabled && this.selectedIndex > 0) {
10817
- this.selectedIndex = this.selectedIndex - 1;
10818
- }
10819
- }
10820
- /**
10821
- * Handles click events for listbox options
10822
- *
10823
- * @internal
10824
- */
10825
-
10826
-
10827
- clickHandler(e) {
10828
- const captured = e.target.closest(`option,[role=option]`);
10829
-
10830
- if (captured && !captured.disabled) {
10831
- this.selectedIndex = this.options.indexOf(captured);
10832
- return true;
10833
- }
10834
- }
10835
- /**
10836
- * Handles keydown actions for listbox navigation and typeahead
10802
+ * Handles `keydown` actions for listbox navigation and typeahead.
10837
10803
  *
10838
10804
  * @internal
10839
10805
  */
@@ -10849,7 +10815,7 @@ class Listbox extends FoundationElement {
10849
10815
 
10850
10816
  switch (key) {
10851
10817
  // Select the first available option
10852
- case "Home":
10818
+ case keyHome:
10853
10819
  {
10854
10820
  if (!e.shiftKey) {
10855
10821
  e.preventDefault();
@@ -10860,7 +10826,7 @@ class Listbox extends FoundationElement {
10860
10826
  }
10861
10827
  // Select the next selectable option
10862
10828
 
10863
- case "ArrowDown":
10829
+ case keyArrowDown:
10864
10830
  {
10865
10831
  if (!e.shiftKey) {
10866
10832
  e.preventDefault();
@@ -10871,7 +10837,7 @@ class Listbox extends FoundationElement {
10871
10837
  }
10872
10838
  // Select the previous selectable option
10873
10839
 
10874
- case "ArrowUp":
10840
+ case keyArrowUp:
10875
10841
  {
10876
10842
  if (!e.shiftKey) {
10877
10843
  e.preventDefault();
@@ -10882,28 +10848,28 @@ class Listbox extends FoundationElement {
10882
10848
  }
10883
10849
  // Select the last available option
10884
10850
 
10885
- case "End":
10851
+ case keyEnd:
10886
10852
  {
10887
10853
  e.preventDefault();
10888
10854
  this.selectLastOption();
10889
10855
  break;
10890
10856
  }
10891
10857
 
10892
- case "Tab":
10858
+ case keyTab:
10893
10859
  {
10894
10860
  this.focusAndScrollOptionIntoView();
10895
10861
  return true;
10896
10862
  }
10897
10863
 
10898
- case "Enter":
10899
- case "Escape":
10864
+ case keyEnter:
10865
+ case keyEscape:
10900
10866
  {
10901
10867
  return true;
10902
10868
  }
10903
10869
 
10904
- case " ":
10870
+ case keySpace:
10905
10871
  {
10906
- if (this.typeAheadExpired) {
10872
+ if (this.typeaheadExpired) {
10907
10873
  return true;
10908
10874
  }
10909
10875
  }
@@ -10919,67 +10885,309 @@ class Listbox extends FoundationElement {
10919
10885
  }
10920
10886
  }
10921
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
+ }
10922
11074
 
10923
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;
10924
11084
  /**
10925
11085
  * Typeahead timeout in milliseconds.
10926
11086
  *
10927
11087
  * @internal
10928
11088
  */
10929
11089
 
10930
- 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);
10931
11104
  /**
10932
- * A static filter to include only enabled elements
11105
+ * Includes ARIA states and properties relating to the ARIA listbox role
10933
11106
  *
10934
- * @param n - element to filter
10935
11107
  * @public
10936
11108
  */
10937
11109
 
10938
- Listbox.slottedOptionFilter = n => isListboxOption(n) && !n.disabled && !n.hidden;
10939
11110
 
10940
- __decorate$1([observable], Listbox.prototype, "selectedIndex", void 0);
11111
+ class DelegatesARIAListbox {}
10941
11112
 
10942
- __decorate$1([observable], Listbox.prototype, "typeaheadBuffer", void 0);
11113
+ __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaActiveDescendant", void 0);
10943
11114
 
10944
- __decorate$1([attr], Listbox.prototype, "role", void 0);
11115
+ __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaDisabled", void 0);
10945
11116
 
10946
- __decorate$1([attr({
10947
- mode: "boolean"
10948
- })], Listbox.prototype, "disabled", void 0);
11117
+ __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaExpanded", void 0);
10949
11118
 
10950
- __decorate$1([observable], Listbox.prototype, "slottedOptions", void 0);
11119
+ applyMixins(DelegatesARIAListbox, ARIAGlobalStatesAndProperties);
11120
+ applyMixins(Listbox$1, DelegatesARIAListbox);
10951
11121
 
10952
- __decorate$1([observable], Listbox.prototype, "selectedOptions", void 0);
10953
11122
  /**
10954
- * 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 }.
10955
11125
  *
10956
11126
  * @public
10957
11127
  */
10958
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
+ */
10959
11150
 
10960
- class DelegatesARIAListbox {
10961
- constructor() {
10962
- /**
10963
- * See {@link https://www.w3.org/WAI/PF/aria/roles#listbox} for more information
10964
- * @public
10965
- * @remarks
10966
- * HTML Attribute: aria-activedescendant
10967
- */
10968
- 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
+ }
10969
11160
  }
10970
11161
 
10971
11162
  }
10972
11163
 
10973
- __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaActiveDescendant", void 0);
11164
+ __decorate$1([attr({
11165
+ converter: nullableNumberConverter
11166
+ })], ListboxElement.prototype, "size", void 0);
10974
11167
 
10975
- __decorate$1([observable], DelegatesARIAListbox.prototype, "ariaDisabled", void 0);
11168
+ /**
11169
+ * The template for the {@link @microsoft/fast-foundation#(Listbox:class)} component.
11170
+ * @public
11171
+ */
10976
11172
 
10977
- __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>`;
10978
11178
 
10979
- applyMixins(DelegatesARIAListbox, ARIAGlobalStatesAndProperties);
10980
- applyMixins(Listbox, DelegatesARIAListbox);
11179
+ /**
11180
+ * Positioning directions for the listbox when a select is open.
11181
+ * @public
11182
+ */
11183
+ var SelectPosition;
10981
11184
 
10982
- 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 {}
10983
11191
  /**
10984
11192
  * A form-associated base class for the {@link (Combobox:class)} component.
10985
11193
  *
@@ -11076,15 +11284,6 @@ class Combobox$1 extends FormAssociatedCombobox {
11076
11284
  */
11077
11285
 
11078
11286
  this.position = SelectPosition.below;
11079
- /**
11080
- * The role of the element.
11081
- *
11082
- * @public
11083
- * @remarks
11084
- * HTML Attribute: role
11085
- */
11086
-
11087
- this.role = SelectRole.combobox;
11088
11287
  }
11089
11288
  /**
11090
11289
  * Reset the element to its first selectable option when its parent form is reset.
@@ -11118,12 +11317,16 @@ class Combobox$1 extends FormAssociatedCombobox {
11118
11317
  }
11119
11318
 
11120
11319
  openChanged() {
11121
- this.ariaExpanded = this.open ? "true" : "false";
11122
-
11123
11320
  if (this.open) {
11321
+ this.ariaControls = this.listbox.id;
11322
+ this.ariaExpanded = "true";
11124
11323
  this.setPositioning();
11125
11324
  this.focusAndScrollOptionIntoView();
11325
+ return;
11126
11326
  }
11327
+
11328
+ this.ariaControls = "";
11329
+ this.ariaExpanded = "false";
11127
11330
  }
11128
11331
  /**
11129
11332
  * The list of options.
@@ -11207,12 +11410,13 @@ class Combobox$1 extends FormAssociatedCombobox {
11207
11410
 
11208
11411
  this.selectedOptions = [captured];
11209
11412
  this.control.value = captured.text;
11413
+ this.updateValue(true);
11210
11414
  }
11211
11415
 
11212
11416
  this.open = !this.open;
11213
11417
 
11214
- if (!this.open) {
11215
- this.updateValue(true);
11418
+ if (this.open) {
11419
+ this.control.focus();
11216
11420
  }
11217
11421
 
11218
11422
  return true;
@@ -11225,6 +11429,10 @@ class Combobox$1 extends FormAssociatedCombobox {
11225
11429
  if (this.value) {
11226
11430
  this.initialValue = this.value;
11227
11431
  }
11432
+
11433
+ if (!this.listbox.id) {
11434
+ this.listbox.id = uniqueId("listbox-");
11435
+ }
11228
11436
  }
11229
11437
  /**
11230
11438
  * Synchronize the `aria-disabled` property when the `disabled` property changes.
@@ -11268,6 +11476,28 @@ class Combobox$1 extends FormAssociatedCombobox {
11268
11476
  });
11269
11477
  }
11270
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
+ }
11271
11501
  /**
11272
11502
  * Handle focus state when the element or its children lose focus.
11273
11503
  *
@@ -11601,12 +11831,11 @@ __decorate$1([observable], Combobox$1.prototype, "position", void 0);
11601
11831
 
11602
11832
  class DelegatesARIACombobox {}
11603
11833
 
11604
- __decorate$1([attr({
11605
- attribute: "aria-autocomplete",
11606
- mode: "fromView"
11607
- })], DelegatesARIACombobox.prototype, "ariaAutocomplete", void 0);
11834
+ __decorate$1([observable], DelegatesARIACombobox.prototype, "ariaAutoComplete", void 0);
11835
+
11836
+ __decorate$1([observable], DelegatesARIACombobox.prototype, "ariaControls", void 0);
11608
11837
 
11609
- applyMixins(DelegatesARIACombobox, ARIAGlobalStatesAndProperties);
11838
+ applyMixins(DelegatesARIACombobox, DelegatesARIAListbox);
11610
11839
  applyMixins(Combobox$1, StartEnd, DelegatesARIACombobox);
11611
11840
 
11612
11841
  /**
@@ -11614,8 +11843,8 @@ applyMixins(Combobox$1, StartEnd, DelegatesARIACombobox);
11614
11843
  * @public
11615
11844
  */
11616
11845
 
11617
- 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({
11618
- 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,
11619
11848
  flatten: true,
11620
11849
  property: "slottedOptions"
11621
11850
  })}></slot></div></template>`;
@@ -13718,7 +13947,7 @@ __decorate$1([attr({
13718
13947
  * @public
13719
13948
  */
13720
13949
 
13721
- 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>`;
13722
13951
 
13723
13952
  /**
13724
13953
  * Divider roles
@@ -13758,12 +13987,23 @@ class Divider extends FoundationElement {
13758
13987
  */
13759
13988
 
13760
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;
13761
13999
  }
13762
14000
 
13763
14001
  }
13764
14002
 
13765
14003
  __decorate$1([attr], Divider.prototype, "role", void 0);
13766
14004
 
14005
+ __decorate$1([attr], Divider.prototype, "orientation", void 0);
14006
+
13767
14007
  /**
13768
14008
  * The direction options for flipper.
13769
14009
  * @public
@@ -13852,18 +14092,7 @@ __decorate$1([attr], Flipper.prototype, "direction", void 0);
13852
14092
  * @public
13853
14093
  */
13854
14094
 
13855
- 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>`;
13856
-
13857
- /**
13858
- * The template for the {@link @microsoft/fast-foundation#(Listbox:class)} component.
13859
- * @public
13860
- */
13861
-
13862
- 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({
13863
- filter: Listbox.slottedOptionFilter,
13864
- flatten: true,
13865
- property: "slottedOptions"
13866
- })}></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>`;
13867
14096
 
13868
14097
  /**
13869
14098
  * Menu items roles.
@@ -13928,7 +14157,7 @@ class MenuItem extends FoundationElement {
13928
14157
  * @internal
13929
14158
  */
13930
14159
 
13931
- this.currentDirection = Direction$1.ltr;
14160
+ this.currentDirection = Direction.ltr;
13932
14161
  this.focusSubmenuOnLoad = false;
13933
14162
  /**
13934
14163
  * @internal
@@ -14044,7 +14273,6 @@ class MenuItem extends FoundationElement {
14044
14273
  switch (this.role) {
14045
14274
  case MenuItemRole.menuitemcheckbox:
14046
14275
  this.checked = !this.checked;
14047
- this.$emit("change");
14048
14276
  break;
14049
14277
 
14050
14278
  case MenuItemRole.menuitem:
@@ -14781,62 +15009,121 @@ class NumberField$1 extends FormAssociatedNumberField {
14781
15009
  */
14782
15010
 
14783
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;
14784
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
+ */
14785
15027
 
14786
- maxChanged(previousValue, nextValue) {
15028
+
15029
+ maxChanged(previous, next) {
14787
15030
  var _a;
14788
15031
 
14789
- 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);
14790
15033
  const min = Math.min(this.min, this.max);
14791
15034
 
14792
15035
  if (this.min !== undefined && this.min !== min) {
14793
15036
  this.min = min;
14794
15037
  }
14795
15038
 
14796
- this.valueChanged(this.value, this.value);
15039
+ this.value = this.getValidValue(this.value);
14797
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
+
14798
15050
 
14799
- minChanged(previousValue, nextValue) {
15051
+ minChanged(previous, next) {
14800
15052
  var _a;
14801
15053
 
14802
- 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);
14803
15055
  const max = Math.max(this.min, this.max);
14804
15056
 
14805
15057
  if (this.max !== undefined && this.max !== max) {
14806
15058
  this.max = max;
14807
15059
  }
14808
15060
 
14809
- this.valueChanged(this.value, this.value);
15061
+ this.value = this.getValidValue(this.value);
14810
15062
  }
14811
15063
  /**
15064
+ * The value property, typed as a number.
14812
15065
  *
14813
- * @param previousValue - previous stored value
14814
- * @param nextValue - value being updated
15066
+ * @public
14815
15067
  */
14816
15068
 
14817
15069
 
14818
- valueChanged(previousValue, nextValue) {
14819
- 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
+ */
14820
15084
 
14821
- let value = parseFloat(nextValue);
14822
15085
 
14823
- if (isNaN(value)) {
14824
- value = "";
14825
- } else {
14826
- value = Math.min(value, (_a = this.max) !== null && _a !== void 0 ? _a : value);
14827
- value = Math.max(value, (_b = this.min) !== null && _b !== void 0 ? _b : value);
14828
- }
15086
+ valueChanged(previous, next) {
15087
+ this.value = this.getValidValue(next);
14829
15088
 
14830
- this.value = value.toString();
15089
+ if (next !== this.value) {
15090
+ return;
15091
+ }
14831
15092
 
14832
- if (this.proxy instanceof HTMLInputElement) {
14833
- this.proxy.value = this.value;
15093
+ if (this.control && !this.isUserInput) {
15094
+ this.control.value = this.value;
14834
15095
  }
14835
15096
 
14836
- if (previousValue !== undefined) {
15097
+ super.valueChanged(previous, this.value);
15098
+
15099
+ if (previous !== undefined && !this.isUserInput) {
14837
15100
  this.$emit("input");
14838
15101
  this.$emit("change");
14839
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;
14840
15127
  }
14841
15128
  /**
14842
15129
  * Increments the value using the step value
@@ -14849,7 +15136,6 @@ class NumberField$1 extends FormAssociatedNumberField {
14849
15136
  const value = parseFloat(this.value);
14850
15137
  const stepUpValue = !isNaN(value) ? value + this.step : this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? this.step : 0;
14851
15138
  this.value = stepUpValue.toString();
14852
- this.control.value = this.value;
14853
15139
  }
14854
15140
  /**
14855
15141
  * Decrements the value using the step value
@@ -14862,9 +15148,9 @@ class NumberField$1 extends FormAssociatedNumberField {
14862
15148
  const value = parseFloat(this.value);
14863
15149
  const stepDownValue = !isNaN(value) ? value - this.step : this.min > 0 ? this.min : this.max < 0 ? this.max : !this.min ? 0 - this.step : 0;
14864
15150
  this.value = stepDownValue.toString();
14865
- this.control.value = this.value;
14866
15151
  }
14867
15152
  /**
15153
+ * Sets up the initial state of the number field
14868
15154
  * @internal
14869
15155
  */
14870
15156
 
@@ -14889,6 +15175,7 @@ class NumberField$1 extends FormAssociatedNumberField {
14889
15175
 
14890
15176
  handleTextInput() {
14891
15177
  this.control.value = this.control.value.replace(/[^0-9\-+e.]/g, "");
15178
+ this.isUserInput = true;
14892
15179
  this.value = this.control.value;
14893
15180
  }
14894
15181
  /**
@@ -15322,7 +15609,7 @@ class RadioGroup extends FoundationElement {
15322
15609
  case keyArrowRight:
15323
15610
  case keyArrowDown:
15324
15611
  {
15325
- if (this.direction === Direction$1.ltr) {
15612
+ if (this.direction === Direction.ltr) {
15326
15613
  this.moveRight(e);
15327
15614
  } else {
15328
15615
  this.moveLeft(e);
@@ -15334,7 +15621,7 @@ class RadioGroup extends FoundationElement {
15334
15621
  case keyArrowLeft:
15335
15622
  case keyArrowUp:
15336
15623
  {
15337
- if (this.direction === Direction$1.ltr) {
15624
+ if (this.direction === Direction.ltr) {
15338
15625
  this.moveLeft(e);
15339
15626
  } else {
15340
15627
  this.moveRight(e);
@@ -15758,7 +16045,7 @@ class HorizontalScroll$1 extends FoundationElement {
15758
16045
 
15759
16046
  scrollItemsChanged(previous, next) {
15760
16047
  if (next && !this.updatingItems) {
15761
- this.setStops();
16048
+ DOM.queueUpdate(() => this.setStops());
15762
16049
  }
15763
16050
  }
15764
16051
  /**
@@ -15916,134 +16203,311 @@ class HorizontalScroll$1 extends FoundationElement {
15916
16203
  const outOfView = this.scrollStops.findIndex(stop => Math.abs(scrollPosition) + this.width <= Math.abs(stop));
15917
16204
  let nextIndex = current;
15918
16205
 
15919
- if (outOfView > current + 2) {
15920
- nextIndex = outOfView - 2;
15921
- } else if (current < this.scrollStops.length - 2) {
15922
- 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;
15923
16408
  }
16409
+ }
15924
16410
 
15925
- this.scrollToPosition(this.scrollStops[nextIndex], scrollPosition);
16411
+ spellcheckChanged() {
16412
+ if (this.proxy instanceof HTMLInputElement) {
16413
+ this.proxy.spellcheck = this.spellcheck;
16414
+ }
15926
16415
  }
15927
16416
  /**
15928
- * Handles scrolling with easing
15929
- * @param position - starting position
15930
- * @param newPosition - position to scroll to
15931
- * @public
16417
+ * @internal
15932
16418
  */
15933
16419
 
15934
16420
 
15935
- scrollToPosition(newPosition, position = this.scrollContainer.scrollLeft) {
15936
- var _a;
15937
-
15938
- if (this.scrolling) {
15939
- return;
15940
- }
15941
-
15942
- this.scrolling = true;
15943
- const seconds = (_a = this.duration) !== null && _a !== void 0 ? _a : `${Math.abs(newPosition - position) / this.speed}s`;
15944
- this.content.style.setProperty("transition-duration", seconds);
15945
- const computedDuration = parseFloat(getComputedStyle(this.content).getPropertyValue("transition-duration"));
15946
-
15947
- const transitionendHandler = e => {
15948
- if (e && e.target !== e.currentTarget) {
15949
- return;
15950
- }
15951
-
15952
- this.content.style.setProperty("transition-duration", "0s");
15953
- this.content.style.removeProperty("transform");
15954
- this.scrollContainer.style.setProperty("scroll-behavior", "auto");
15955
- this.scrollContainer.scrollLeft = newPosition;
15956
- this.setFlippers();
15957
- this.content.removeEventListener("transitionend", transitionendHandler);
15958
- this.scrolling = false;
15959
- };
16421
+ connectedCallback() {
16422
+ super.connectedCallback();
16423
+ this.validate();
15960
16424
 
15961
- if (computedDuration === 0) {
15962
- transitionendHandler();
15963
- return;
16425
+ if (this.autofocus) {
16426
+ DOM.queueUpdate(() => {
16427
+ this.focus();
16428
+ });
15964
16429
  }
16430
+ }
16431
+ /**
16432
+ * Handles the internal control's `input` event
16433
+ * @internal
16434
+ */
15965
16435
 
15966
- this.content.addEventListener("transitionend", transitionendHandler);
15967
- const maxScrollValue = this.scrollContainer.scrollWidth - this.scrollContainer.clientWidth;
15968
- let transitionStop = this.scrollContainer.scrollLeft - Math.min(newPosition, maxScrollValue);
15969
-
15970
- if (this.isRtl) {
15971
- transitionStop = this.scrollContainer.scrollLeft + Math.min(Math.abs(newPosition), maxScrollValue);
15972
- }
15973
16436
 
15974
- this.content.style.setProperty("transition-property", "transform");
15975
- this.content.style.setProperty("transition-timing-function", this.easing);
15976
- this.content.style.setProperty("transform", `translateX(${transitionStop}px)`);
16437
+ handleTextInput() {
16438
+ this.value = this.control.value;
15977
16439
  }
15978
16440
  /**
15979
- * Monitors resize event on the horizontal-scroll element
16441
+ * Handles the control's clear value event
15980
16442
  * @public
15981
16443
  */
15982
16444
 
15983
16445
 
15984
- resized() {
15985
- if (this.resizeTimeout) {
15986
- this.resizeTimeout = clearTimeout(this.resizeTimeout);
15987
- }
15988
-
15989
- this.resizeTimeout = setTimeout(() => {
15990
- this.width = this.offsetWidth;
15991
- this.setFlippers();
15992
- }, this.frameTime);
16446
+ handleClearInput() {
16447
+ this.value = "";
16448
+ this.control.focus();
15993
16449
  }
15994
16450
  /**
15995
- * Monitors scrolled event on the content container
15996
- * @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
15997
16458
  */
15998
16459
 
15999
16460
 
16000
- scrolled() {
16001
- if (this.scrollTimeout) {
16002
- this.scrollTimeout = clearTimeout(this.scrollTimeout);
16003
- }
16004
-
16005
- this.scrollTimeout = setTimeout(() => {
16006
- this.setFlippers();
16007
- }, this.frameTime);
16461
+ handleChange() {
16462
+ this.$emit("change");
16008
16463
  }
16009
16464
 
16010
16465
  }
16011
16466
 
16012
16467
  __decorate$1([attr({
16013
- converter: nullableNumberConverter
16014
- })], HorizontalScroll$1.prototype, "speed", void 0);
16468
+ attribute: "readonly",
16469
+ mode: "boolean"
16470
+ })], Search$1.prototype, "readOnly", void 0);
16015
16471
 
16016
- __decorate$1([attr], HorizontalScroll$1.prototype, "duration", void 0);
16472
+ __decorate$1([attr({
16473
+ mode: "boolean"
16474
+ })], Search$1.prototype, "autofocus", void 0);
16017
16475
 
16018
- __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);
16019
16479
 
16020
16480
  __decorate$1([attr({
16021
- attribute: "aria-hidden",
16022
- converter: booleanConverter
16023
- })], HorizontalScroll$1.prototype, "flippersHiddenFromAT", void 0);
16481
+ converter: nullableNumberConverter
16482
+ })], Search$1.prototype, "maxlength", void 0);
16024
16483
 
16025
- __decorate$1([observable], HorizontalScroll$1.prototype, "scrolling", void 0);
16484
+ __decorate$1([attr({
16485
+ converter: nullableNumberConverter
16486
+ })], Search$1.prototype, "minlength", void 0);
16026
16487
 
16027
- __decorate$1([observable], HorizontalScroll$1.prototype, "scrollItems", void 0);
16488
+ __decorate$1([attr], Search$1.prototype, "pattern", void 0);
16028
16489
 
16029
16490
  __decorate$1([attr({
16030
- attribute: "view"
16031
- })], 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);
16032
16497
 
16498
+ __decorate$1([observable], Search$1.prototype, "defaultSlottedNodes", void 0);
16033
16499
  /**
16500
+ * Includes ARIA states and properties relating to the ARIA textbox role
16501
+ *
16034
16502
  * @public
16035
16503
  */
16036
16504
 
16037
- const horizontalScrollTemplate = (context, definition) => {
16038
- var _a, _b;
16039
16505
 
16040
- 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({
16041
- property: "scrollItems",
16042
- filter: elements()
16043
- })}></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>`;
16044
- };
16506
+ class DelegatesARIASearch {}
16507
+ applyMixins(DelegatesARIASearch, ARIAGlobalStatesAndProperties);
16508
+ applyMixins(Search$1, StartEnd, DelegatesARIASearch);
16045
16509
 
16046
- class _Select extends Listbox {}
16510
+ class _Select extends Listbox$1 {}
16047
16511
  /**
16048
16512
  * A form-associated base class for the {@link @microsoft/fast-foundation#(Select:class)} component.
16049
16513
  *
@@ -16083,15 +16547,6 @@ class Select$1 extends FormAssociatedSelect {
16083
16547
  */
16084
16548
 
16085
16549
  this.forcedPosition = false;
16086
- /**
16087
- * The role of the element.
16088
- *
16089
- * @public
16090
- * @remarks
16091
- * HTML Attribute: role
16092
- */
16093
-
16094
- this.role = SelectRole.combobox;
16095
16550
  /**
16096
16551
  * Holds the current state for the calculated position of the listbox.
16097
16552
  *
@@ -16116,13 +16571,17 @@ class Select$1 extends FormAssociatedSelect {
16116
16571
  }
16117
16572
 
16118
16573
  openChanged() {
16119
- this.ariaExpanded = this.open ? "true" : "false";
16120
-
16121
16574
  if (this.open) {
16575
+ this.ariaControls = this.listbox.id;
16576
+ this.ariaExpanded = "true";
16122
16577
  this.setPositioning();
16123
16578
  this.focusAndScrollOptionIntoView();
16124
16579
  this.indexWhenOpened = this.selectedIndex;
16580
+ return;
16125
16581
  }
16582
+
16583
+ this.ariaControls = "";
16584
+ this.ariaExpanded = "false";
16126
16585
  }
16127
16586
  /**
16128
16587
  * The value property.
@@ -16352,7 +16811,7 @@ class Select$1 extends FormAssociatedSelect {
16352
16811
  switch (key) {
16353
16812
  case " ":
16354
16813
  {
16355
- if (this.typeAheadExpired) {
16814
+ if (this.typeaheadExpired) {
16356
16815
  e.preventDefault();
16357
16816
  this.open = !this.open;
16358
16817
  }
@@ -16399,6 +16858,10 @@ class Select$1 extends FormAssociatedSelect {
16399
16858
  connectedCallback() {
16400
16859
  super.connectedCallback();
16401
16860
  this.forcedPosition = !!this.positionAttribute;
16861
+
16862
+ if (!this.listbox.id) {
16863
+ this.listbox.id = uniqueId("listbox-");
16864
+ }
16402
16865
  }
16403
16866
 
16404
16867
  }
@@ -16426,14 +16889,9 @@ __decorate$1([observable], Select$1.prototype, "displayValue", void 0);
16426
16889
 
16427
16890
  class DelegatesARIASelect {}
16428
16891
 
16429
- __decorate$1([observable], DelegatesARIASelect.prototype, "ariaExpanded", void 0);
16430
-
16431
- __decorate$1([attr({
16432
- attribute: "aria-pressed",
16433
- mode: "fromView"
16434
- })], DelegatesARIASelect.prototype, "ariaPressed", void 0);
16892
+ __decorate$1([observable], DelegatesARIASelect.prototype, "ariaControls", void 0);
16435
16893
 
16436
- applyMixins(DelegatesARIASelect, ARIAGlobalStatesAndProperties);
16894
+ applyMixins(DelegatesARIASelect, DelegatesARIAListbox);
16437
16895
  applyMixins(Select$1, StartEnd, DelegatesARIASelect);
16438
16896
 
16439
16897
  /**
@@ -16441,8 +16899,8 @@ applyMixins(Select$1, StartEnd, DelegatesARIASelect);
16441
16899
  * @public
16442
16900
  */
16443
16901
 
16444
- 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({
16445
- 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,
16446
16904
  flatten: true,
16447
16905
  property: "slottedOptions"
16448
16906
  })}></slot></div></template>`;
@@ -16500,7 +16958,7 @@ const sliderLabelTemplate = (context, definition) => html`<template aria-disable
16500
16958
  function convertPixelToPercent(pixelPos, minPosition, maxPosition, direction) {
16501
16959
  let pct = limit(0, 1, (pixelPos - minPosition) / (maxPosition - minPosition));
16502
16960
 
16503
- if (direction === Direction$1.rtl) {
16961
+ if (direction === Direction.rtl) {
16504
16962
  pct = 1 - pct;
16505
16963
  }
16506
16964
 
@@ -16510,7 +16968,7 @@ function convertPixelToPercent(pixelPos, minPosition, maxPosition, direction) {
16510
16968
  const defaultConfig = {
16511
16969
  min: 0,
16512
16970
  max: 0,
16513
- direction: Direction$1.ltr,
16971
+ direction: Direction.ltr,
16514
16972
  orientation: Orientation.horizontal,
16515
16973
  disabled: false
16516
16974
  };
@@ -16536,11 +16994,11 @@ class SliderLabel extends FoundationElement {
16536
16994
  * @internal
16537
16995
  */
16538
16996
 
16539
- this.sliderDirection = Direction$1.ltr;
16997
+ this.sliderDirection = Direction.ltr;
16540
16998
 
16541
16999
  this.getSliderConfiguration = () => {
16542
17000
  if (!this.isSliderConfig(this.parentNode)) {
16543
- this.sliderDirection = defaultConfig.direction || Direction$1.ltr;
17001
+ this.sliderDirection = defaultConfig.direction || Direction.ltr;
16544
17002
  this.sliderOrientation = defaultConfig.orientation || Orientation.horizontal;
16545
17003
  this.sliderMaxPosition = defaultConfig.max;
16546
17004
  this.sliderMinPosition = defaultConfig.min;
@@ -16558,7 +17016,7 @@ class SliderLabel extends FoundationElement {
16558
17016
  this.disabled = disabled;
16559
17017
  }
16560
17018
 
16561
- this.sliderDirection = direction || Direction$1.ltr;
17019
+ this.sliderDirection = direction || Direction.ltr;
16562
17020
  this.sliderOrientation = orientation || Orientation.horizontal;
16563
17021
  this.sliderMaxPosition = max;
16564
17022
  this.sliderMinPosition = min;
@@ -16566,18 +17024,18 @@ class SliderLabel extends FoundationElement {
16566
17024
  };
16567
17025
 
16568
17026
  this.positionAsStyle = () => {
16569
- const direction = this.sliderDirection ? this.sliderDirection : Direction$1.ltr;
17027
+ const direction = this.sliderDirection ? this.sliderDirection : Direction.ltr;
16570
17028
  const pct = convertPixelToPercent(Number(this.position), Number(this.sliderMinPosition), Number(this.sliderMaxPosition));
16571
17029
  let rightNum = Math.round((1 - pct) * 100);
16572
17030
  let leftNum = Math.round(pct * 100);
16573
17031
 
16574
- if (leftNum === Number.NaN && rightNum === Number.NaN) {
17032
+ if (Number.isNaN(leftNum) && Number.isNaN(rightNum)) {
16575
17033
  rightNum = 50;
16576
17034
  leftNum = 50;
16577
17035
  }
16578
17036
 
16579
17037
  if (this.sliderOrientation === Orientation.horizontal) {
16580
- 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}%;`;
16581
17039
  } else {
16582
17040
  return `top: ${leftNum}%; bottom: ${rightNum}%;`;
16583
17041
  }
@@ -16724,7 +17182,7 @@ class Slider extends FormAssociatedSlider {
16724
17182
  * @internal
16725
17183
  */
16726
17184
 
16727
- this.direction = Direction$1.ltr;
17185
+ this.direction = Direction.ltr;
16728
17186
  /**
16729
17187
  * @internal
16730
17188
  */
@@ -16976,6 +17434,20 @@ class Slider extends FormAssociatedSlider {
16976
17434
  this.proxy.readOnly = this.readOnly;
16977
17435
  }
16978
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
+ }
16979
17451
  /**
16980
17452
  * @internal
16981
17453
  */
@@ -17052,7 +17524,7 @@ class Slider extends FormAssociatedSlider {
17052
17524
 
17053
17525
 
17054
17526
  increment() {
17055
- 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);
17056
17528
  const incrementedVal = this.convertToConstrainedValue(newVal);
17057
17529
  const incrementedValString = incrementedVal < Number(this.max) ? `${incrementedVal}` : `${this.max}`;
17058
17530
  this.value = incrementedValString;
@@ -17065,7 +17537,7 @@ class Slider extends FormAssociatedSlider {
17065
17537
 
17066
17538
 
17067
17539
  decrement() {
17068
- 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);
17069
17541
  const decrementedVal = this.convertToConstrainedValue(newVal);
17070
17542
  const decrementedValString = decrementedVal > Number(this.min) ? `${decrementedVal}` : `${this.min}`;
17071
17543
  this.value = decrementedValString;
@@ -17879,14 +18351,14 @@ const ToolbarArrowKeyMap = Object.freeze({
17879
18351
  },
17880
18352
  [ArrowKeys.ArrowLeft]: {
17881
18353
  [Orientation.horizontal]: {
17882
- [Direction$1.ltr]: -1,
17883
- [Direction$1.rtl]: 1
18354
+ [Direction.ltr]: -1,
18355
+ [Direction.rtl]: 1
17884
18356
  }
17885
18357
  },
17886
18358
  [ArrowKeys.ArrowRight]: {
17887
18359
  [Orientation.horizontal]: {
17888
- [Direction$1.ltr]: 1,
17889
- [Direction$1.rtl]: -1
18360
+ [Direction.ltr]: 1,
18361
+ [Direction.rtl]: -1
17890
18362
  }
17891
18363
  }
17892
18364
  });
@@ -17913,7 +18385,7 @@ class Toolbar$1 extends FoundationElement {
17913
18385
  * @internal
17914
18386
  */
17915
18387
 
17916
- this.direction = Direction$1.ltr;
18388
+ this.direction = Direction.ltr;
17917
18389
  /**
17918
18390
  * The orientation of the toolbar.
17919
18391
  *
@@ -18253,7 +18725,7 @@ class Tooltip$1 extends FoundationElement {
18253
18725
  * @internal
18254
18726
  */
18255
18727
 
18256
- this.horizontalInset = "true";
18728
+ this.horizontalInset = "false";
18257
18729
  /**
18258
18730
  * @internal
18259
18731
  */
@@ -18263,7 +18735,7 @@ class Tooltip$1 extends FoundationElement {
18263
18735
  * @internal
18264
18736
  */
18265
18737
 
18266
- this.horizontalScaling = "anchor";
18738
+ this.horizontalScaling = "content";
18267
18739
  /**
18268
18740
  * @internal
18269
18741
  */
@@ -18291,7 +18763,7 @@ class Tooltip$1 extends FoundationElement {
18291
18763
  * @internal
18292
18764
  */
18293
18765
 
18294
- this.currentDirection = Direction$1.ltr;
18766
+ this.currentDirection = Direction.ltr;
18295
18767
  /**
18296
18768
  * The timer that tracks delay time before the tooltip is shown on hover
18297
18769
  */
@@ -18313,10 +18785,12 @@ class Tooltip$1 extends FoundationElement {
18313
18785
  this.classList.toggle("bottom", this.region.verticalPosition === "end");
18314
18786
  this.classList.toggle("inset-top", this.region.verticalPosition === "insetStart");
18315
18787
  this.classList.toggle("inset-bottom", this.region.verticalPosition === "insetEnd");
18788
+ this.classList.toggle("center-vertical", this.region.verticalPosition === "center");
18316
18789
  this.classList.toggle("left", this.region.horizontalPosition === "start");
18317
18790
  this.classList.toggle("right", this.region.horizontalPosition === "end");
18318
18791
  this.classList.toggle("inset-left", this.region.horizontalPosition === "insetStart");
18319
18792
  this.classList.toggle("inset-right", this.region.horizontalPosition === "insetEnd");
18793
+ this.classList.toggle("center-horizontal", this.region.horizontalPosition === "center");
18320
18794
  };
18321
18795
  /**
18322
18796
  * mouse enters anchor
@@ -18576,38 +19050,26 @@ class Tooltip$1 extends FoundationElement {
18576
19050
  case TooltipPosition.top:
18577
19051
  case TooltipPosition.bottom:
18578
19052
  this.verticalPositioningMode = "locktodefault";
18579
- this.horizontalPositioningMode = "dynamic";
19053
+ this.horizontalPositioningMode = "locktodefault";
18580
19054
  this.verticalDefaultPosition = this.position;
18581
- this.horizontalDefaultPosition = undefined;
18582
- this.horizontalInset = "true";
18583
- this.verticalInset = "false";
18584
- this.horizontalScaling = "anchor";
18585
- this.verticalScaling = "content";
19055
+ this.horizontalDefaultPosition = "center";
18586
19056
  break;
18587
19057
 
18588
19058
  case TooltipPosition.right:
18589
19059
  case TooltipPosition.left:
18590
19060
  case TooltipPosition.start:
18591
19061
  case TooltipPosition.end:
18592
- this.verticalPositioningMode = "dynamic";
19062
+ this.verticalPositioningMode = "locktodefault";
18593
19063
  this.horizontalPositioningMode = "locktodefault";
18594
- this.verticalDefaultPosition = undefined;
19064
+ this.verticalDefaultPosition = "center";
18595
19065
  this.horizontalDefaultPosition = this.position;
18596
- this.horizontalInset = "false";
18597
- this.verticalInset = "true";
18598
- this.horizontalScaling = "content";
18599
- this.verticalScaling = "anchor";
18600
19066
  break;
18601
19067
 
18602
19068
  default:
18603
19069
  this.verticalPositioningMode = "dynamic";
18604
19070
  this.horizontalPositioningMode = "dynamic";
18605
- this.verticalDefaultPosition = undefined;
18606
- this.horizontalDefaultPosition = undefined;
18607
- this.horizontalInset = "true";
18608
- this.verticalInset = "false";
18609
- this.horizontalScaling = "anchor";
18610
- this.verticalScaling = "content";
19071
+ this.verticalDefaultPosition = void 0;
19072
+ this.horizontalDefaultPosition = "center";
18611
19073
  break;
18612
19074
  }
18613
19075
  }
@@ -18754,7 +19216,15 @@ class TreeItem extends FoundationElement {
18754
19216
  }
18755
19217
 
18756
19218
  handleSelected(e) {
18757
- 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
+ }
18758
19228
  }
18759
19229
 
18760
19230
  setExpanded(expanded) {
@@ -19055,38 +19525,6 @@ __decorate$1([observable], TreeView.prototype, "nested", void 0);
19055
19525
 
19056
19526
  __decorate$1([observable], TreeView.prototype, "slottedTreeItems", void 0);
19057
19527
 
19058
- /**
19059
- * Expose ltr and rtl strings
19060
- */
19061
- var Direction;
19062
-
19063
- (function (Direction) {
19064
- Direction["ltr"] = "ltr";
19065
- Direction["rtl"] = "rtl";
19066
- })(Direction || (Direction = {}));
19067
-
19068
- /**
19069
- * Define system colors for use in CSS stylesheets.
19070
- *
19071
- * https://drafts.csswg.org/css-color/#css-system-colors
19072
- */
19073
- var SystemColors;
19074
-
19075
- (function (SystemColors) {
19076
- SystemColors["Canvas"] = "Canvas";
19077
- SystemColors["CanvasText"] = "CanvasText";
19078
- SystemColors["LinkText"] = "LinkText";
19079
- SystemColors["VisitedText"] = "VisitedText";
19080
- SystemColors["ActiveText"] = "ActiveText";
19081
- SystemColors["ButtonFace"] = "ButtonFace";
19082
- SystemColors["ButtonText"] = "ButtonText";
19083
- SystemColors["Field"] = "Field";
19084
- SystemColors["FieldText"] = "FieldText";
19085
- SystemColors["Highlight"] = "Highlight";
19086
- SystemColors["HighlightText"] = "HighlightText";
19087
- SystemColors["GrayText"] = "GrayText";
19088
- })(SystemColors || (SystemColors = {}));
19089
-
19090
19528
  /**
19091
19529
  * Ensures that an input number does not exceed a max value and is not less than a min value.
19092
19530
  * @param i - the number to clamp
@@ -22999,7 +23437,7 @@ const fluentDivider = Divider.compose({
22999
23437
  const dividerStyles = dividerStyles$1;
23000
23438
 
23001
23439
  const flipperStyles$1 = (context, definition) => css`
23002
- ${display('inline-flex')} :host{height:calc((${heightNumber} + ${designUnit}) * 1px);justify-content:center;align-items:center;fill:currentcolor;color:${neutralFillStrongRest};background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};box-sizing:border-box;border:calc(${focusStrokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);outline:none;padding:0}:host(.disabled){opacity:${disabledOpacity};cursor:${disabledCursor}}.next,.previous{display:flex}:host(:not(.disabled):hover){cursor:pointer}:host(:not(.disabled):hover){color:${neutralFillStrongHover}}:host(:not(.disabled):active){color:${neutralFillStrongActive}}:host(:${focusVisible}){border-color:${focusStrokeOuter}}:host::-moz-focus-inner{border:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
23440
+ ${display('inline-flex')} :host{height:calc((${heightNumber} + ${designUnit}) * 1px);justify-content:center;align-items:center;fill:currentcolor;color:${neutralFillStrongRest};background:padding-box linear-gradient(${neutralFillRest},${neutralFillRest}),border-box ${neutralStrokeControlRest};box-sizing:border-box;border:calc(${focusStrokeWidth} * 1px) solid transparent;border-radius:calc(${controlCornerRadius} * 1px);outline:none;padding:0}:host(.disabled){opacity:${disabledOpacity};cursor:${disabledCursor};pointer-events:none}.next,.previous{display:flex}:host(:not(.disabled):hover){cursor:pointer}:host(:not(.disabled):hover){color:${neutralFillStrongHover}}:host(:not(.disabled):active){color:${neutralFillStrongActive}}:host(:${focusVisible}){border-color:${focusStrokeOuter}}:host::-moz-focus-inner{border:0}`.withBehaviors(forcedColorsStylesheetBehavior(css`
23003
23441
  :host{background:${SystemColors.ButtonFace};border-color:${SystemColors.ButtonText}}:host .next,:host .previous{color:${SystemColors.ButtonText};fill:currentcolor}:host(:not(.disabled):hover){background:${SystemColors.Highlight}}:host(:not(.disabled):hover) .next,:host(:not(.disabled):hover) .previous{color:${SystemColors.HighlightText};fill:currentcolor}:host(.disabled){opacity:1}:host(.disabled),:host(.disabled) .next,:host(.disabled) .previous{border-color:${SystemColors.GrayText};color:${SystemColors.GrayText};fill:currentcolor}:host(:${focusVisible}){forced-color-adjust:none;border-color:${SystemColors.Highlight};box-shadow:0 0 0 2px ${SystemColors.ButtonFace},0 0 0 4px ${SystemColors.ButtonText}}`));
23004
23442
 
23005
23443
  /**
@@ -23098,6 +23536,7 @@ const horizontalScrollStyles = horizontalScrollStyles$1;
23098
23536
  const listboxStyles$1 = (context, definition) => css`
23099
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}`;
23100
23538
 
23539
+ class Listbox extends Listbox$1 {}
23101
23540
  /**
23102
23541
  * The Fluent listbox Custom Element. Implements, {@link @microsoft/fast-foundation#Listbox}
23103
23542
  * {@link @microsoft/fast-foundation#listboxTemplate}
@@ -23459,6 +23898,90 @@ const fluentRadioGroup = RadioGroup.compose({
23459
23898
 
23460
23899
  const radioGroupStyles = radioGroupStyles$1;
23461
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
+
23462
23985
  /**
23463
23986
  * The Fluent select class
23464
23987
  * @internal
@@ -23678,7 +24201,7 @@ const fluentTab = Tab.compose({
23678
24201
  const tabStyles = tabStyles$1;
23679
24202
 
23680
24203
  const tabPanelStyles$1 = (context, definition) => css`
23681
- ${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)}`;
23682
24205
 
23683
24206
  /**
23684
24207
  * The Fluent Tab Panel Custom Element. Implements {@link @microsoft/fast-foundation#TabPanel},
@@ -24062,6 +24585,7 @@ const allComponents = {
24062
24585
  fluentProgressRing,
24063
24586
  fluentRadio,
24064
24587
  fluentRadioGroup,
24588
+ fluentSearch,
24065
24589
  fluentSelect,
24066
24590
  fluentSkeleton,
24067
24591
  fluentSlider,
@@ -24117,4 +24641,4 @@ function provideFluentDesignSystem(element) {
24117
24641
 
24118
24642
  const FluentDesignSystem = provideFluentDesignSystem().register(allComponents);
24119
24643
 
24120
- 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 };