@fluentui/web-components 2.5.0 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.json +76 -1
  2. package/CHANGELOG.md +29 -2
  3. package/dist/dts/_docs/design-system/color-explorer/app.d.ts +25 -0
  4. package/dist/dts/_docs/design-system/color-explorer/colors.d.ts +13 -0
  5. package/dist/dts/_docs/design-system/color-explorer/component-types.d.ts +6 -0
  6. package/dist/dts/_docs/design-system/color-explorer/components/color-block.d.ts +10 -0
  7. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.d.ts +190 -0
  8. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.d.ts +15 -0
  9. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.d.ts +3 -0
  10. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/color-picker.template.d.ts +8 -0
  11. package/dist/dts/_docs/design-system/color-explorer/components/color-picker/index.d.ts +9 -0
  12. package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.d.ts +8 -0
  13. package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.d.ts +1 -0
  14. package/dist/dts/_docs/design-system/color-explorer/components/control-pane/control-pane.template.d.ts +2 -0
  15. package/dist/dts/_docs/design-system/color-explorer/components/control-pane/index.d.ts +6 -0
  16. package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.d.ts +5 -0
  17. package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.styles.d.ts +1 -0
  18. package/dist/dts/_docs/design-system/color-explorer/components/gradient/gradient.template.d.ts +2 -0
  19. package/dist/dts/_docs/design-system/color-explorer/components/gradient/index.d.ts +6 -0
  20. package/dist/dts/_docs/design-system/color-explorer/components/layer-background/index.d.ts +21 -0
  21. package/dist/dts/_docs/design-system/color-explorer/components/sample-app/index.d.ts +6 -0
  22. package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.d.ts +3 -0
  23. package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.d.ts +1 -0
  24. package/dist/dts/_docs/design-system/color-explorer/components/sample-app/sample-app.template.d.ts +1 -0
  25. package/dist/dts/_docs/design-system/color-explorer/components/sample-page/index.d.ts +6 -0
  26. package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.d.ts +3 -0
  27. package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.d.ts +1 -0
  28. package/dist/dts/_docs/design-system/color-explorer/components/sample-page/sample-page.template.d.ts +1 -0
  29. package/dist/dts/_docs/design-system/color-explorer/components/swatch.d.ts +30 -0
  30. package/dist/dts/_docs/design-system/color-explorer/custom-elements.d.ts +7 -0
  31. package/dist/dts/_docs/design-system/color-explorer/index.d.ts +2 -0
  32. package/dist/esm/_docs/design-system/color-explorer/app.js +247 -0
  33. package/dist/esm/_docs/design-system/color-explorer/colors.js +24 -0
  34. package/dist/esm/_docs/design-system/color-explorer/component-types.js +7 -0
  35. package/dist/esm/_docs/design-system/color-explorer/components/color-block.js +408 -0
  36. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.form-associated.js +16 -0
  37. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.js +297 -0
  38. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.styles.js +124 -0
  39. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/color-picker.template.js +130 -0
  40. package/dist/esm/_docs/design-system/color-explorer/components/color-picker/index.js +15 -0
  41. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.js +24 -0
  42. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.styles.js +19 -0
  43. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/control-pane.template.js +52 -0
  44. package/dist/esm/_docs/design-system/color-explorer/components/control-pane/index.js +18 -0
  45. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.js +11 -0
  46. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.styles.js +31 -0
  47. package/dist/esm/_docs/design-system/color-explorer/components/gradient/gradient.template.js +21 -0
  48. package/dist/esm/_docs/design-system/color-explorer/components/gradient/index.js +18 -0
  49. package/dist/esm/_docs/design-system/color-explorer/components/layer-background/index.js +70 -0
  50. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/index.js +18 -0
  51. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.js +3 -0
  52. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.styles.js +166 -0
  53. package/dist/esm/_docs/design-system/color-explorer/components/sample-app/sample-app.template.js +97 -0
  54. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/index.js +18 -0
  55. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.js +3 -0
  56. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.styles.js +130 -0
  57. package/dist/esm/_docs/design-system/color-explorer/components/sample-page/sample-page.template.js +82 -0
  58. package/dist/esm/_docs/design-system/color-explorer/components/swatch.js +163 -0
  59. package/dist/esm/_docs/design-system/color-explorer/custom-elements.js +3 -0
  60. package/dist/esm/_docs/design-system/color-explorer/index.js +14 -0
  61. package/dist/esm/card/card.stories.js +1 -1
  62. package/dist/esm/data-grid/data-grid.stories.js +1 -1
  63. package/dist/web-components.js +634 -278
  64. package/dist/web-components.min.js +222 -222
  65. package/package.json +6 -6
@@ -321,36 +321,6 @@ const DOM = Object.freeze({
321
321
 
322
322
  });
323
323
 
324
- function spilloverSubscribe(subscriber) {
325
- const spillover = this.spillover;
326
- const index = spillover.indexOf(subscriber);
327
-
328
- if (index === -1) {
329
- spillover.push(subscriber);
330
- }
331
- }
332
-
333
- function spilloverUnsubscribe(subscriber) {
334
- const spillover = this.spillover;
335
- const index = spillover.indexOf(subscriber);
336
-
337
- if (index !== -1) {
338
- spillover.splice(index, 1);
339
- }
340
- }
341
-
342
- function spilloverNotifySubscribers(args) {
343
- const spillover = this.spillover;
344
- const source = this.source;
345
-
346
- for (let i = 0, ii = spillover.length; i < ii; ++i) {
347
- spillover[i].handleChange(source, args);
348
- }
349
- }
350
-
351
- function spilloverHas(subscriber) {
352
- return this.spillover.indexOf(subscriber) !== -1;
353
- }
354
324
  /**
355
325
  * An implementation of {@link Notifier} that efficiently keeps track of
356
326
  * subscribers interested in a specific change notification on an
@@ -362,8 +332,6 @@ function spilloverHas(subscriber) {
362
332
  * If the set ever exceeds two subscribers, it upgrades to an array automatically.
363
333
  * @public
364
334
  */
365
-
366
-
367
335
  class SubscriberSet {
368
336
  /**
369
337
  * Creates an instance of SubscriberSet for the specified source.
@@ -384,7 +352,7 @@ class SubscriberSet {
384
352
 
385
353
 
386
354
  has(subscriber) {
387
- return this.sub1 === subscriber || this.sub2 === subscriber;
355
+ return this.spillover === void 0 ? this.sub1 === subscriber || this.sub2 === subscriber : this.spillover.indexOf(subscriber) !== -1;
388
356
  }
389
357
  /**
390
358
  * Subscribes to notification of changes in an object's state.
@@ -393,27 +361,33 @@ class SubscriberSet {
393
361
 
394
362
 
395
363
  subscribe(subscriber) {
396
- if (this.has(subscriber)) {
397
- return;
398
- }
364
+ const spillover = this.spillover;
399
365
 
400
- if (this.sub1 === void 0) {
401
- this.sub1 = subscriber;
402
- return;
403
- }
366
+ if (spillover === void 0) {
367
+ if (this.has(subscriber)) {
368
+ return;
369
+ }
404
370
 
405
- if (this.sub2 === void 0) {
406
- this.sub2 = subscriber;
407
- return;
408
- }
371
+ if (this.sub1 === void 0) {
372
+ this.sub1 = subscriber;
373
+ return;
374
+ }
409
375
 
410
- this.spillover = [this.sub1, this.sub2, subscriber];
411
- this.subscribe = spilloverSubscribe;
412
- this.unsubscribe = spilloverUnsubscribe;
413
- this.notify = spilloverNotifySubscribers;
414
- this.has = spilloverHas;
415
- this.sub1 = void 0;
416
- this.sub2 = void 0;
376
+ if (this.sub2 === void 0) {
377
+ this.sub2 = subscriber;
378
+ return;
379
+ }
380
+
381
+ this.spillover = [this.sub1, this.sub2, subscriber];
382
+ this.sub1 = void 0;
383
+ this.sub2 = void 0;
384
+ } else {
385
+ const index = spillover.indexOf(subscriber);
386
+
387
+ if (index === -1) {
388
+ spillover.push(subscriber);
389
+ }
390
+ }
417
391
  }
418
392
  /**
419
393
  * Unsubscribes from notification of changes in an object's state.
@@ -422,10 +396,20 @@ class SubscriberSet {
422
396
 
423
397
 
424
398
  unsubscribe(subscriber) {
425
- if (this.sub1 === subscriber) {
426
- this.sub1 = void 0;
427
- } else if (this.sub2 === subscriber) {
428
- this.sub2 = void 0;
399
+ const spillover = this.spillover;
400
+
401
+ if (spillover === void 0) {
402
+ if (this.sub1 === subscriber) {
403
+ this.sub1 = void 0;
404
+ } else if (this.sub2 === subscriber) {
405
+ this.sub2 = void 0;
406
+ }
407
+ } else {
408
+ const index = spillover.indexOf(subscriber);
409
+
410
+ if (index !== -1) {
411
+ spillover.splice(index, 1);
412
+ }
429
413
  }
430
414
  }
431
415
  /**
@@ -435,16 +419,24 @@ class SubscriberSet {
435
419
 
436
420
 
437
421
  notify(args) {
438
- const sub1 = this.sub1;
439
- const sub2 = this.sub2;
422
+ const spillover = this.spillover;
440
423
  const source = this.source;
441
424
 
442
- if (sub1 !== void 0) {
443
- sub1.handleChange(source, args);
444
- }
425
+ if (spillover === void 0) {
426
+ const sub1 = this.sub1;
427
+ const sub2 = this.sub2;
445
428
 
446
- if (sub2 !== void 0) {
447
- sub2.handleChange(source, args);
429
+ if (sub1 !== void 0) {
430
+ sub1.handleChange(source, args);
431
+ }
432
+
433
+ if (sub2 !== void 0) {
434
+ sub2.handleChange(source, args);
435
+ }
436
+ } else {
437
+ for (let i = 0, ii = spillover.length; i < ii; ++i) {
438
+ spillover[i].handleChange(source, args);
439
+ }
448
440
  }
449
441
  }
450
442
 
@@ -677,6 +669,8 @@ const Observable = FAST.getById(2
677
669
  /* eslint-disable-next-line */
678
670
 
679
671
  prevValue = prev.propertySource[prev.propertyName];
672
+ /* eslint-disable-next-line @typescript-eslint/no-this-alias */
673
+
680
674
  watcher = this;
681
675
 
682
676
  if (propertySource === prevValue) {
@@ -1362,6 +1356,7 @@ class CompilationContext {
1362
1356
  }
1363
1357
 
1364
1358
  release() {
1359
+ /* eslint-disable-next-line @typescript-eslint/no-this-alias */
1365
1360
  sharedContext = this;
1366
1361
  }
1367
1362
 
@@ -1929,9 +1924,6 @@ function html(strings, ...values) {
1929
1924
  class ElementStyles {
1930
1925
  constructor() {
1931
1926
  this.targets = new WeakSet();
1932
- /** @internal */
1933
-
1934
- this.behaviors = null;
1935
1927
  }
1936
1928
  /** @internal */
1937
1929
 
@@ -3505,6 +3497,11 @@ class ArrayObserver extends SubscriberSet {
3505
3497
  });
3506
3498
  }
3507
3499
 
3500
+ subscribe(subscriber) {
3501
+ this.flush();
3502
+ super.subscribe(subscriber);
3503
+ }
3504
+
3508
3505
  addSplice(splice) {
3509
3506
  if (this.splices === void 0) {
3510
3507
  this.splices = [splice];
@@ -5951,6 +5948,22 @@ function applyMixins(derivedCtor, ...baseCtors) {
5951
5948
 
5952
5949
  /**
5953
5950
  * An individual item in an {@link @microsoft/fast-foundation#(Accordion:class) }.
5951
+ *
5952
+ * @slot start - Content which can be provided between the heading and the icon
5953
+ * @slot end - Content which can be provided between the start slot and icon
5954
+ * @slot heading - Content which serves as the accordion item heading and text of the expand button
5955
+ * @slot - The default slot for accordion item content
5956
+ * @slot expanded-icon - The expanded icon
5957
+ * @slot collapsed-icon - The collapsed icon
5958
+ * @fires change - Fires a custom 'change' event when the button is invoked
5959
+ * @csspart heading - Wraps the button
5960
+ * @csspart button - The button which serves to invoke the item
5961
+ * @csspart heading-content - Wraps the slot for the heading content within the button
5962
+ * @csspart icon - The icon container
5963
+ * @csspart expanded-icon - The expanded icon slot
5964
+ * @csspart collapsed-icon - The collapsed icon
5965
+ * @csspart region - The wrapper for the accordion item content
5966
+ *
5954
5967
  * @public
5955
5968
  */
5956
5969
 
@@ -6019,12 +6032,13 @@ html`<template><slot ${slotted({
6019
6032
  filter: elements()
6020
6033
  })}></slot><slot name="item" part="item" ${slotted("accordionItems")}></slot></template>`;
6021
6034
 
6022
- var Orientation;
6023
-
6024
- (function (Orientation) {
6025
- Orientation["horizontal"] = "horizontal";
6026
- Orientation["vertical"] = "vertical";
6027
- })(Orientation || (Orientation = {}));
6035
+ /**
6036
+ * Standard orientation values
6037
+ */
6038
+ const Orientation = {
6039
+ horizontal: "horizontal",
6040
+ vertical: "vertical"
6041
+ };
6028
6042
 
6029
6043
  /**
6030
6044
  * Returns the index of the last element in the array where predicate is true, and -1 otherwise.
@@ -6321,29 +6335,29 @@ var SystemColors;
6321
6335
  * @public
6322
6336
  */
6323
6337
 
6324
- var AccordionExpandMode;
6325
-
6326
- (function (AccordionExpandMode) {
6338
+ const AccordionExpandMode = {
6327
6339
  /**
6328
6340
  * Designates only a single {@link @microsoft/fast-foundation#(AccordionItem:class) } can be open a time.
6329
6341
  */
6330
- AccordionExpandMode["single"] = "single";
6342
+ single: "single",
6343
+
6331
6344
  /**
6332
6345
  * Designates multiple {@link @microsoft/fast-foundation#(AccordionItem:class) | AccordionItems} can be open simultaneously.
6333
6346
  */
6334
-
6335
- AccordionExpandMode["multi"] = "multi";
6336
- })(AccordionExpandMode || (AccordionExpandMode = {}));
6347
+ multi: "multi"
6348
+ };
6337
6349
  /**
6338
6350
  * An Accordion Custom HTML Element
6339
6351
  * Implements {@link https://www.w3.org/TR/wai-aria-practices-1.1/#accordion | ARIA Accordion}.
6352
+ *
6353
+ * @fires change - Fires a custom 'change' event when the active item changes
6354
+ * @csspart item - The slot for the accordion items
6340
6355
  * @public
6341
6356
  *
6342
6357
  * @remarks
6343
6358
  * Designed to be used with {@link @microsoft/fast-foundation#accordionTemplate} and {@link @microsoft/fast-foundation#(AccordionItem:class)}.
6344
6359
  */
6345
6360
 
6346
-
6347
6361
  class Accordion extends FoundationElement {
6348
6362
  constructor() {
6349
6363
  super(...arguments);
@@ -6624,6 +6638,12 @@ __decorate$1([attr({
6624
6638
  * An Anchor Custom HTML Element.
6625
6639
  * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
6626
6640
  *
6641
+ * @slot start - Content which can be provided before the anchor content
6642
+ * @slot end - Content which can be provided after the anchor content
6643
+ * @slot - The default slot for anchor content
6644
+ * @csspart control - The anchor element
6645
+ * @csspart content - The element wrapping anchor content
6646
+ *
6627
6647
  * @public
6628
6648
  */
6629
6649
 
@@ -6825,6 +6845,10 @@ class IntersectionService {
6825
6845
  /**
6826
6846
  * An anchored region Custom HTML Element.
6827
6847
  *
6848
+ * @slot - The default slot for the content
6849
+ * @fires loaded - Fires a custom 'loaded' event when the region is loaded and visible
6850
+ * @fires positionchange - Fires a custom 'positionchange' event when the position has changed
6851
+ *
6828
6852
  * @public
6829
6853
  */
6830
6854
 
@@ -7357,7 +7381,7 @@ class AnchoredRegion extends FoundationElement {
7357
7381
  switch (this.horizontalScaling) {
7358
7382
  case "anchor":
7359
7383
  case "fill":
7360
- nextRegionWidth = nextPositionerDimension.width;
7384
+ nextRegionWidth = this.horizontalViewportLock ? this.viewportRect.width : nextPositionerDimension.width;
7361
7385
  this.regionWidth = `${nextRegionWidth}px`;
7362
7386
  break;
7363
7387
 
@@ -7441,7 +7465,7 @@ class AnchoredRegion extends FoundationElement {
7441
7465
  switch (this.verticalScaling) {
7442
7466
  case "anchor":
7443
7467
  case "fill":
7444
- nextRegionHeight = nextPositionerDimension.height;
7468
+ nextRegionHeight = this.verticalViewportLock ? this.viewportRect.height : nextPositionerDimension.height;
7445
7469
  this.regionHeight = `${nextRegionHeight}px`;
7446
7470
  break;
7447
7471
 
@@ -7894,6 +7918,8 @@ const badgeTemplate = (context, definition) => html`<template class="${x => x.ci
7894
7918
 
7895
7919
  /**
7896
7920
  * A Badge Custom HTML Element.
7921
+ * @slot - The default slot for the badge
7922
+ * @csspart control - The element representing the badge, which wraps the default slot
7897
7923
  *
7898
7924
  * @public
7899
7925
  */
@@ -7975,6 +8001,8 @@ const breadcrumbTemplate = (context, definition) => html`<template role="navigat
7975
8001
 
7976
8002
  /**
7977
8003
  * A Breadcrumb Custom HTML Element.
8004
+ * @slot - The default slot for the breadcrumb items
8005
+ * @csspart list - The element wrapping the slotted items
7978
8006
  *
7979
8007
  * @public
7980
8008
  */
@@ -8617,6 +8645,12 @@ class FormAssociatedButton extends FormAssociated(_Button) {
8617
8645
  * A Button Custom HTML Element.
8618
8646
  * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | <button> element }.
8619
8647
  *
8648
+ * @slot start - Content which can be provided before the button content
8649
+ * @slot end - Content which can be provided after the button content
8650
+ * @slot - The default slot for button content
8651
+ * @csspart control - The button element
8652
+ * @csspart content - The element wrapping button content
8653
+ *
8620
8654
  * @public
8621
8655
  */
8622
8656
 
@@ -9000,6 +9034,10 @@ class DateFormatter {
9000
9034
 
9001
9035
  /**
9002
9036
  * Calendar component
9037
+ *
9038
+ * @slot - The default slot for calendar content
9039
+ * @fires dateselected - Fires a custom 'dateselected' event when Enter is invoked via keyboard on a date
9040
+ *
9003
9041
  * @public
9004
9042
  */
9005
9043
 
@@ -9326,50 +9364,44 @@ __decorate$1([attr({
9326
9364
  })], Calendar$1.prototype, "selectedDates", void 0);
9327
9365
 
9328
9366
  /**
9329
- * Enumerates auto generated header options
9367
+ * Enumerates the data grid auto generated header options
9330
9368
  * default option generates a non-sticky header row
9331
9369
  *
9332
9370
  * @public
9333
9371
  */
9334
- var GenerateHeaderOptions;
9335
-
9336
- (function (GenerateHeaderOptions) {
9337
- GenerateHeaderOptions["none"] = "none";
9338
- GenerateHeaderOptions["default"] = "default";
9339
- GenerateHeaderOptions["sticky"] = "sticky";
9340
- })(GenerateHeaderOptions || (GenerateHeaderOptions = {}));
9372
+ const GenerateHeaderOptions = {
9373
+ none: "none",
9374
+ default: "default",
9375
+ sticky: "sticky"
9376
+ };
9341
9377
  /**
9342
- * Enumerates possible cell types.
9378
+ * Enumerates possible data grid cell types.
9343
9379
  *
9344
9380
  * @public
9345
9381
  */
9346
9382
 
9347
-
9348
- var DataGridCellTypes;
9349
-
9350
- (function (DataGridCellTypes) {
9351
- DataGridCellTypes["default"] = "default";
9352
- DataGridCellTypes["columnHeader"] = "columnheader";
9353
- DataGridCellTypes["rowHeader"] = "rowheader";
9354
- })(DataGridCellTypes || (DataGridCellTypes = {}));
9383
+ const DataGridCellTypes = {
9384
+ default: "default",
9385
+ columnHeader: "columnheader",
9386
+ rowHeader: "rowheader"
9387
+ };
9355
9388
  /**
9356
- * Enumerates possible row types
9389
+ * Enumerates possible data grid row types
9357
9390
  *
9358
9391
  * @public
9359
9392
  */
9360
9393
 
9361
-
9362
- var DataGridRowTypes;
9363
-
9364
- (function (DataGridRowTypes) {
9365
- DataGridRowTypes["default"] = "default";
9366
- DataGridRowTypes["header"] = "header";
9367
- DataGridRowTypes["stickyHeader"] = "sticky-header";
9368
- })(DataGridRowTypes || (DataGridRowTypes = {}));
9394
+ const DataGridRowTypes = {
9395
+ default: "default",
9396
+ header: "header",
9397
+ stickyHeader: "sticky-header"
9398
+ };
9369
9399
 
9370
9400
  /**
9371
9401
  * A Data Grid Row Custom HTML Element.
9372
9402
  *
9403
+ * @fires row-focused - Fires a custom 'row-focused' event when focus is on an element (usually a cell or its contents) in the row
9404
+ * @slot - The default slot for custom cell elements
9373
9405
  * @public
9374
9406
  */
9375
9407
 
@@ -9605,6 +9637,7 @@ const dataGridTemplate = (context, definition) => {
9605
9637
  /**
9606
9638
  * A Data Grid Custom HTML Element.
9607
9639
  *
9640
+ * @slot - The default slot for custom row elements
9608
9641
  * @public
9609
9642
  */
9610
9643
 
@@ -10103,6 +10136,8 @@ const defaultHeaderCellContentsTemplate = html`<template>${x => x.columnDefiniti
10103
10136
  /**
10104
10137
  * A Data Grid Cell Custom HTML Element.
10105
10138
  *
10139
+ * @fires cell-focused - Fires a custom 'cell-focused' event when focus is on the cell or its contents
10140
+ * @slot - The default slot for cell contents. The "cell contents template" renders here.
10106
10141
  * @public
10107
10142
  */
10108
10143
 
@@ -10473,6 +10508,8 @@ const cardTemplate = (context, definition) => html`<slot></slot>`;
10473
10508
  /**
10474
10509
  * An Card Custom HTML Element.
10475
10510
  *
10511
+ * @slot - The default slot for the card content
10512
+ *
10476
10513
  * @public
10477
10514
  */
10478
10515
 
@@ -10505,6 +10542,13 @@ class FormAssociatedCheckbox extends CheckableFormAssociated(_Checkbox) {
10505
10542
  * A Checkbox Custom HTML Element.
10506
10543
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#checkbox | ARIA checkbox }.
10507
10544
  *
10545
+ * @slot checked-indicator - The checked indicator
10546
+ * @slot indeterminate-indicator - The indeterminate indicator
10547
+ * @slot - The default slot for the label
10548
+ * @csspart control - The element representing the visual checkbox control
10549
+ * @csspart label - The label
10550
+ * @fires change - Emits a custom change event when the checked state changes
10551
+ *
10508
10552
  * @public
10509
10553
  */
10510
10554
 
@@ -10580,6 +10624,11 @@ function isListboxOption(el) {
10580
10624
  * An Option Custom HTML Element.
10581
10625
  * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.
10582
10626
  *
10627
+ * @slot start - Content which can be provided before the listbox option content
10628
+ * @slot end - Content which can be provided after the listbox option content
10629
+ * @slot - The default slot for listbox option content
10630
+ * @csspart content - Wraps the listbox option content
10631
+ *
10583
10632
  * @public
10584
10633
  */
10585
10634
 
@@ -10646,7 +10695,25 @@ class ListboxOption extends FoundationElement {
10646
10695
  return;
10647
10696
  }
10648
10697
 
10649
- this.ariaChecked = undefined;
10698
+ this.ariaChecked = null;
10699
+ }
10700
+ /**
10701
+ * Updates the proxy's text content when the default slot changes.
10702
+ * @param prev - the previous content value
10703
+ * @param next - the current content value
10704
+ *
10705
+ * @internal
10706
+ */
10707
+
10708
+
10709
+ contentChanged(prev, next) {
10710
+ if (this.proxy instanceof HTMLOptionElement) {
10711
+ this.proxy.textContent = this.textContent;
10712
+ }
10713
+
10714
+ this.$emit("contentchange", null, {
10715
+ bubbles: true
10716
+ });
10650
10717
  }
10651
10718
 
10652
10719
  defaultSelectedChanged() {
@@ -10697,31 +10764,34 @@ class ListboxOption extends FoundationElement {
10697
10764
  }
10698
10765
 
10699
10766
  get label() {
10700
- var _a, _b;
10767
+ var _a;
10701
10768
 
10702
- return (_b = (_a = this.value) !== null && _a !== void 0 ? _a : this.textContent) !== null && _b !== void 0 ? _b : "";
10769
+ return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;
10703
10770
  }
10704
10771
 
10705
10772
  get text() {
10706
- return this.textContent;
10773
+ var _a, _b;
10774
+
10775
+ return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, " ").trim()) !== null && _b !== void 0 ? _b : "";
10707
10776
  }
10708
10777
 
10709
10778
  set value(next) {
10710
- this._value = next;
10779
+ const newValue = `${next !== null && next !== void 0 ? next : ""}`;
10780
+ this._value = newValue;
10711
10781
  this.dirtyValue = true;
10712
10782
 
10713
- if (this.proxy instanceof HTMLElement) {
10714
- this.proxy.value = next;
10783
+ if (this.proxy instanceof HTMLOptionElement) {
10784
+ this.proxy.value = newValue;
10715
10785
  }
10716
10786
 
10717
10787
  Observable.notify(this, "value");
10718
10788
  }
10719
10789
 
10720
10790
  get value() {
10721
- var _a, _b;
10791
+ var _a;
10722
10792
 
10723
10793
  Observable.track(this, "value");
10724
- return (_b = (_a = this._value) !== null && _a !== void 0 ? _a : this.textContent) !== null && _b !== void 0 ? _b : "";
10794
+ return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
10725
10795
  }
10726
10796
 
10727
10797
  get form() {
@@ -10732,6 +10802,8 @@ class ListboxOption extends FoundationElement {
10732
10802
 
10733
10803
  __decorate$1([observable], ListboxOption.prototype, "checked", void 0);
10734
10804
 
10805
+ __decorate$1([observable], ListboxOption.prototype, "content", void 0);
10806
+
10735
10807
  __decorate$1([observable], ListboxOption.prototype, "defaultSelected", void 0);
10736
10808
 
10737
10809
  __decorate$1([attr({
@@ -10773,6 +10845,8 @@ applyMixins(ListboxOption, StartEnd, DelegatesARIAListboxOption);
10773
10845
  * A Listbox Custom HTML Element.
10774
10846
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#listbox | ARIA listbox }.
10775
10847
  *
10848
+ * @slot - The default slot for the listbox options
10849
+ *
10776
10850
  * @public
10777
10851
  */
10778
10852
 
@@ -11140,6 +11214,19 @@ class Listbox$1 extends FoundationElement {
11140
11214
  this.shouldSkipFocus = !this.contains(document.activeElement);
11141
11215
  return true;
11142
11216
  }
11217
+ /**
11218
+ * Switches between single-selection and multi-selection mode.
11219
+ *
11220
+ * @param prev - the previous value of the `multiple` attribute
11221
+ * @param next - the next value of the `multiple` attribute
11222
+ *
11223
+ * @internal
11224
+ */
11225
+
11226
+
11227
+ multipleChanged(prev, next) {
11228
+ this.ariaMultiSelectable = next ? "true" : null;
11229
+ }
11143
11230
  /**
11144
11231
  * Updates the list of selected options when the `selectedIndex` changes.
11145
11232
  *
@@ -11338,7 +11425,7 @@ class Listbox$1 extends FoundationElement {
11338
11425
  * @public
11339
11426
  */
11340
11427
 
11341
- Listbox$1.slottedOptionFilter = n => isListboxOption(n) && !n.disabled && !n.hidden;
11428
+ Listbox$1.slottedOptionFilter = n => isListboxOption(n) && !n.hidden;
11342
11429
  /**
11343
11430
  * Typeahead timeout in milliseconds.
11344
11431
  *
@@ -11383,12 +11470,10 @@ applyMixins(Listbox$1, DelegatesARIAListbox);
11383
11470
  * Positioning directions for the listbox when a select is open.
11384
11471
  * @public
11385
11472
  */
11386
- var SelectPosition;
11387
-
11388
- (function (SelectPosition) {
11389
- SelectPosition["above"] = "above";
11390
- SelectPosition["below"] = "below";
11391
- })(SelectPosition || (SelectPosition = {}));
11473
+ const SelectPosition = {
11474
+ above: "above",
11475
+ below: "below"
11476
+ };
11392
11477
 
11393
11478
  class _Combobox extends Listbox$1 {}
11394
11479
  /**
@@ -11410,19 +11495,28 @@ class FormAssociatedCombobox extends FormAssociated(_Combobox) {
11410
11495
  * Autocomplete values for combobox.
11411
11496
  * @public
11412
11497
  */
11413
- var ComboboxAutocomplete;
11414
-
11415
- (function (ComboboxAutocomplete) {
11416
- ComboboxAutocomplete["inline"] = "inline";
11417
- ComboboxAutocomplete["list"] = "list";
11418
- ComboboxAutocomplete["both"] = "both";
11419
- ComboboxAutocomplete["none"] = "none";
11420
- })(ComboboxAutocomplete || (ComboboxAutocomplete = {}));
11498
+ const ComboboxAutocomplete = {
11499
+ inline: "inline",
11500
+ list: "list",
11501
+ both: "both",
11502
+ none: "none"
11503
+ };
11421
11504
 
11422
11505
  /**
11423
11506
  * A Combobox Custom HTML Element.
11424
11507
  * Implements the {@link https://w3c.github.io/aria-practices/#combobox | ARIA combobox }.
11425
11508
  *
11509
+ * @slot start - Content which can be provided before the input
11510
+ * @slot end - Content which can be provided after the input
11511
+ * @slot control - Used to replace the input element representing the combobox
11512
+ * @slot indicator - The visual indicator representing the expanded state
11513
+ * @slot - The default slot for the options
11514
+ * @csspart control - The wrapper element containing the input area, including start and end
11515
+ * @csspart selected-value - The input element representing the selected value
11516
+ * @csspart indicator - The element wrapping the indicator slot
11517
+ * @csspart listbox - The wrapper for the listbox slotted options
11518
+ * @fires change - Fires a custom 'change' event when the value updates
11519
+ *
11426
11520
  * @public
11427
11521
  */
11428
11522
 
@@ -11480,13 +11574,6 @@ class Combobox$1 extends FormAssociatedCombobox {
11480
11574
  */
11481
11575
 
11482
11576
  this.open = false;
11483
- /**
11484
- * The current state of the calculated position of the listbox.
11485
- *
11486
- * @public
11487
- */
11488
-
11489
- this.position = SelectPosition.below;
11490
11577
  }
11491
11578
  /**
11492
11579
  * Reset the element to its first selectable option when its parent form is reset.
@@ -11566,8 +11653,8 @@ class Combobox$1 extends FormAssociatedCombobox {
11566
11653
  }
11567
11654
  }
11568
11655
 
11569
- positionChanged() {
11570
- this.positionAttribute = this.position;
11656
+ positionChanged(prev, next) {
11657
+ this.positionAttribute = next;
11571
11658
  this.setPositioning();
11572
11659
  }
11573
11660
  /**
@@ -11623,6 +11710,7 @@ class Combobox$1 extends FormAssociatedCombobox {
11623
11710
 
11624
11711
  this.selectedOptions = [captured];
11625
11712
  this.control.value = captured.text;
11713
+ this.clearSelectionRange();
11626
11714
  this.updateValue(true);
11627
11715
  }
11628
11716
 
@@ -11788,8 +11876,7 @@ class Combobox$1 extends FormAssociatedCombobox {
11788
11876
  }
11789
11877
 
11790
11878
  this.open = false;
11791
- const controlValueLength = this.control.value.length;
11792
- this.control.setSelectionRange(controlValueLength, controlValueLength);
11879
+ this.clearSelectionRange();
11793
11880
  break;
11794
11881
  }
11795
11882
 
@@ -12019,6 +12106,15 @@ class Combobox$1 extends FormAssociatedCombobox {
12019
12106
  this.$emit("change");
12020
12107
  }
12021
12108
  }
12109
+ /**
12110
+ * @internal
12111
+ */
12112
+
12113
+
12114
+ clearSelectionRange() {
12115
+ const controlValueLength = this.control.value.length;
12116
+ this.control.setSelectionRange(controlValueLength, controlValueLength);
12117
+ }
12022
12118
 
12023
12119
  }
12024
12120
 
@@ -13586,6 +13682,13 @@ var isFocusable = function isFocusable(node, options) {
13586
13682
  * A Switch Custom HTML Element.
13587
13683
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#dialog | ARIA dialog }.
13588
13684
  *
13685
+ * @slot - The default slot for the dialog content
13686
+ * @csspart positioning-region - A wrapping element used to center the dialog and position the modal overlay
13687
+ * @csspart overlay - The modal dialog overlay
13688
+ * @csspart control - The dialog element
13689
+ * @fires cancel - Fires a custom 'cancel' event when the modal overlay is clicked
13690
+ * @fires close - Fires a custom 'close' event when the dialog is hidden
13691
+ *
13589
13692
  * @public
13590
13693
  */
13591
13694
 
@@ -13912,19 +14015,17 @@ const dividerTemplate = (context, definition) => html`<template role="${x => x.r
13912
14015
  * Divider roles
13913
14016
  * @public
13914
14017
  */
13915
- var DividerRole;
13916
-
13917
- (function (DividerRole) {
14018
+ const DividerRole = {
13918
14019
  /**
13919
14020
  * The divider semantically separates content
13920
14021
  */
13921
- DividerRole["separator"] = "separator";
14022
+ separator: "separator",
14023
+
13922
14024
  /**
13923
14025
  * The divider has no semantic value and is for visual presentation only.
13924
14026
  */
13925
-
13926
- DividerRole["presentation"] = "presentation";
13927
- })(DividerRole || (DividerRole = {}));
14027
+ presentation: "presentation"
14028
+ };
13928
14029
 
13929
14030
  /**
13930
14031
  * A Divider Custom HTML Element.
@@ -13940,7 +14041,6 @@ class Divider extends FoundationElement {
13940
14041
  * The role of the element.
13941
14042
  *
13942
14043
  * @public
13943
- * @defaultValue - {@link DividerRole.separator}
13944
14044
  * @remarks
13945
14045
  * HTML Attribute: role
13946
14046
  */
@@ -13967,12 +14067,10 @@ __decorate$1([attr], Divider.prototype, "orientation", void 0);
13967
14067
  * The direction options for flipper.
13968
14068
  * @public
13969
14069
  */
13970
- var FlipperDirection;
13971
-
13972
- (function (FlipperDirection) {
13973
- FlipperDirection["next"] = "next";
13974
- FlipperDirection["previous"] = "previous";
13975
- })(FlipperDirection || (FlipperDirection = {}));
14070
+ const FlipperDirection = {
14071
+ next: "next",
14072
+ previous: "previous"
14073
+ };
13976
14074
 
13977
14075
  /**
13978
14076
  * The template for the {@link @microsoft/fast-foundation#Flipper} component.
@@ -13985,6 +14083,12 @@ const flipperTemplate = (context, definition) => html`<template role="button" ar
13985
14083
  * A Flipper Custom HTML Element.
13986
14084
  * Flippers are a form of button that implies directional content navigation, such as in a carousel.
13987
14085
  *
14086
+ * @slot next - The next flipper content
14087
+ * @slot previous - The previous flipper content
14088
+ * @csspart next - Wraps the next flipper content
14089
+ * @csspart previous - Wraps the previous flipper content
14090
+ * @fires click - Fires a custom 'click' event when Enter or Space is invoked via keyboard and the flipper is exposed to assistive technologies.
14091
+ *
13988
14092
  * @public
13989
14093
  */
13990
14094
 
@@ -14023,7 +14127,7 @@ class Flipper extends FoundationElement {
14023
14127
  if (!this.hiddenFromAT) {
14024
14128
  const key = e.key;
14025
14129
 
14026
- if (key === "Enter") {
14130
+ if (key === "Enter" || key === "Space") {
14027
14131
  this.$emit("click", e);
14028
14132
  }
14029
14133
 
@@ -14051,7 +14155,7 @@ __decorate$1([attr], Flipper.prototype, "direction", void 0);
14051
14155
  * @public
14052
14156
  */
14053
14157
 
14054
- 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>`;
14158
+ 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 ${slotted("content")}></slot></span>${endSlotTemplate(context, definition)}</template>`;
14055
14159
 
14056
14160
  /**
14057
14161
  * A Listbox Custom HTML Element.
@@ -14475,7 +14579,7 @@ class ListboxElement extends Listbox$1 {
14475
14579
  multipleChanged(prev, next) {
14476
14580
  var _a;
14477
14581
 
14478
- this.ariaMultiSelectable = next ? "true" : undefined;
14582
+ this.ariaMultiSelectable = next ? "true" : null;
14479
14583
  (_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(o => {
14480
14584
  o.checked = next ? false : undefined;
14481
14585
  });
@@ -14609,29 +14713,26 @@ const listboxTemplate = (context, definition) => html`<template aria-activedesce
14609
14713
  * Menu items roles.
14610
14714
  * @public
14611
14715
  */
14612
- var MenuItemRole;
14613
-
14614
- (function (MenuItemRole) {
14716
+ const MenuItemRole = {
14615
14717
  /**
14616
14718
  * The menu item has a "menuitem" role
14617
14719
  */
14618
- MenuItemRole["menuitem"] = "menuitem";
14720
+ menuitem: "menuitem",
14721
+
14619
14722
  /**
14620
14723
  * The menu item has a "menuitemcheckbox" role
14621
14724
  */
14725
+ menuitemcheckbox: "menuitemcheckbox",
14622
14726
 
14623
- MenuItemRole["menuitemcheckbox"] = "menuitemcheckbox";
14624
14727
  /**
14625
14728
  * The menu item has a "menuitemradio" role
14626
14729
  */
14627
-
14628
- MenuItemRole["menuitemradio"] = "menuitemradio";
14629
- })(MenuItemRole || (MenuItemRole = {}));
14730
+ menuitemradio: "menuitemradio"
14731
+ };
14630
14732
  /**
14631
14733
  * @internal
14632
14734
  */
14633
14735
 
14634
-
14635
14736
  const roleForMenuItem = {
14636
14737
  [MenuItemRole.menuitem]: "menuitem",
14637
14738
  [MenuItemRole.menuitemcheckbox]: "menuitemcheckbox",
@@ -14642,6 +14743,23 @@ const roleForMenuItem = {
14642
14743
  * A Switch Custom HTML Element.
14643
14744
  * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#menuitem | ARIA menuitem }, {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox | ARIA menuitemcheckbox}, or {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio | ARIA menuitemradio }.
14644
14745
  *
14746
+ * @slot checked-indicator - The checked indicator
14747
+ * @slot radio-indicator - The radio indicator
14748
+ * @slot start - Content which can be provided before the menu item content
14749
+ * @slot end - Content which can be provided after the menu item content
14750
+ * @slot - The default slot for menu item content
14751
+ * @slot expand-collapse-indicator - The expand/collapse indicator
14752
+ * @slot submenu - Used to nest menu's within menu items
14753
+ * @csspart input-container - The element representing the visual checked or radio indicator
14754
+ * @csspart checkbox - The element wrapping the `menuitemcheckbox` indicator
14755
+ * @csspart radio - The element wrapping the `menuitemradio` indicator
14756
+ * @csspart content - The element wrapping the menu item content
14757
+ * @csspart expand-collapse-glyph-container - The element wrapping the expand collapse element
14758
+ * @csspart expand-collapse - The expand/collapse element
14759
+ * @csspart submenu-region - The container for the submenu, used for positioning
14760
+ * @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes
14761
+ * @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked
14762
+ *
14645
14763
  * @public
14646
14764
  */
14647
14765
 
@@ -14932,6 +15050,8 @@ const menuTemplate = (context, definition) => html`<template slot="${x => x.slot
14932
15050
  * A Menu Custom HTML Element.
14933
15051
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.
14934
15052
  *
15053
+ * @slot - The default slot for the menu items
15054
+ *
14935
15055
  * @public
14936
15056
  */
14937
15057
 
@@ -15280,39 +15400,45 @@ class FormAssociatedTextField extends FormAssociated(_TextField) {
15280
15400
  * Text field sub-types
15281
15401
  * @public
15282
15402
  */
15283
- var TextFieldType;
15284
-
15285
- (function (TextFieldType) {
15403
+ const TextFieldType = {
15286
15404
  /**
15287
15405
  * An email TextField
15288
15406
  */
15289
- TextFieldType["email"] = "email";
15407
+ email: "email",
15408
+
15290
15409
  /**
15291
15410
  * A password TextField
15292
15411
  */
15412
+ password: "password",
15293
15413
 
15294
- TextFieldType["password"] = "password";
15295
15414
  /**
15296
15415
  * A telephone TextField
15297
15416
  */
15417
+ tel: "tel",
15298
15418
 
15299
- TextFieldType["tel"] = "tel";
15300
15419
  /**
15301
15420
  * A text TextField
15302
15421
  */
15422
+ text: "text",
15303
15423
 
15304
- TextFieldType["text"] = "text";
15305
15424
  /**
15306
15425
  * A URL TextField
15307
15426
  */
15308
-
15309
- TextFieldType["url"] = "url";
15310
- })(TextFieldType || (TextFieldType = {}));
15427
+ url: "url"
15428
+ };
15311
15429
 
15312
15430
  /**
15313
15431
  * A Text Field Custom HTML Element.
15314
15432
  * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text | <input type="text" /> element }.
15315
15433
  *
15434
+ * @slot start - Content which can be provided before the number field input
15435
+ * @slot end - Content which can be provided after the number field input
15436
+ * @slot - The default slot for the label
15437
+ * @csspart label - The label
15438
+ * @csspart root - The element wrapping the control, including start and end slots
15439
+ * @csspart control - The text field element
15440
+ * @fires change - Fires a custom 'change' event when the value has changed
15441
+ *
15316
15442
  * @public
15317
15443
  */
15318
15444
 
@@ -15411,6 +15537,24 @@ class TextField$1 extends FormAssociatedTextField {
15411
15537
  });
15412
15538
  }
15413
15539
  }
15540
+ /**
15541
+ * Selects all the text in the text field
15542
+ *
15543
+ * @public
15544
+ */
15545
+
15546
+
15547
+ select() {
15548
+ this.control.select();
15549
+ /**
15550
+ * The select event does not permeate the shadow DOM boundary.
15551
+ * This fn effectively proxies the select event,
15552
+ * emitting a `select` event whenever the internal
15553
+ * control emits a `select` event
15554
+ */
15555
+
15556
+ this.$emit("select");
15557
+ }
15414
15558
  /**
15415
15559
  * Handles the internal control's `input` event
15416
15560
  * @internal
@@ -15502,6 +15646,20 @@ class FormAssociatedNumberField extends FormAssociated(_NumberField) {
15502
15646
  * A Number Field Custom HTML Element.
15503
15647
  * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number | <input type="number" /> element }.
15504
15648
  *
15649
+ * @slot start - Content which can be provided before the number field input
15650
+ * @slot end - Content which can be provided after the number field input
15651
+ * @slot - The default slot for the label
15652
+ * @slot step-up-glyph - The glyph for the step up control
15653
+ * @slot step-down-glyph - The glyph for the step down control
15654
+ * @csspart label - The label
15655
+ * @csspart root - The element wrapping the control, including start and end slots
15656
+ * @csspart control - The element representing the input
15657
+ * @csspart controls - The step up and step down controls
15658
+ * @csspart step-up - The step up control
15659
+ * @csspart step-down - The step down control
15660
+ * @fires input - Fires a custom 'input' event when the value has changed
15661
+ * @fires change - Fires a custom 'change' event when the value has changed
15662
+ *
15505
15663
  * @public
15506
15664
  */
15507
15665
 
@@ -15682,6 +15840,24 @@ class NumberField$1 extends FormAssociatedNumberField {
15682
15840
  });
15683
15841
  }
15684
15842
  }
15843
+ /**
15844
+ * Selects all the text in the number field
15845
+ *
15846
+ * @public
15847
+ */
15848
+
15849
+
15850
+ select() {
15851
+ this.control.select();
15852
+ /**
15853
+ * The select event does not permeate the shadow DOM boundary.
15854
+ * This fn effectively proxies the select event,
15855
+ * emitting a `select` event whenever the internal
15856
+ * control emits a `select` event
15857
+ */
15858
+
15859
+ this.$emit("select");
15860
+ }
15685
15861
  /**
15686
15862
  * Handles the internal control's `input` event
15687
15863
  * @internal
@@ -15799,6 +15975,11 @@ const progressRingTemplate = (context, definition) => html`<template role="progr
15799
15975
  * An Progress HTML Element.
15800
15976
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#progressbar | ARIA progressbar }.
15801
15977
  *
15978
+ * @slot indeterminate - The slot for a custom indeterminate indicator
15979
+ * @csspart progress - Represents the progress element
15980
+ * @csspart determinate - The determinate indicator
15981
+ * @csspart indeterminate - The indeterminate indicator
15982
+ *
15802
15983
  * @public
15803
15984
  */
15804
15985
 
@@ -15889,6 +16070,11 @@ const radioGroupTemplate = (context, definition) => html`<template role="radiogr
15889
16070
  * An Radio Group Custom HTML Element.
15890
16071
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radiogroup | ARIA radiogroup }.
15891
16072
  *
16073
+ * @slot label - The slot for the label
16074
+ * @slot - The default slot for radio buttons
16075
+ * @csspart positioning-region - The positioning region for laying out the radios
16076
+ * @fires change - Fires a custom 'change' event when the value changes
16077
+ *
15892
16078
  * @public
15893
16079
  */
15894
16080
 
@@ -16345,6 +16531,12 @@ class FormAssociatedRadio extends CheckableFormAssociated(_Radio) {
16345
16531
  * A Radio Custom HTML Element.
16346
16532
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radio | ARIA radio }.
16347
16533
  *
16534
+ * @slot checked-indicator - The checked indicator
16535
+ * @slot - The default slot for the label
16536
+ * @csspart control - The element representing the visual radio control
16537
+ * @csspart label - The label
16538
+ * @fires change - Emits a custom change event when the checked state changes
16539
+ *
16348
16540
  * @public
16349
16541
  */
16350
16542
 
@@ -16460,6 +16652,19 @@ __decorate$1([observable], Radio.prototype, "defaultSlottedNodes", void 0);
16460
16652
 
16461
16653
  /**
16462
16654
  * A HorizontalScroll Custom HTML Element
16655
+ *
16656
+ * @slot start - Content which can be provided before the scroll area
16657
+ * @slot end - Content which can be provided after the scroll area
16658
+ * @csspart scroll-area - Wraps the entire scrollable region
16659
+ * @csspart scroll-view - The visible scroll area
16660
+ * @csspart content-container - The container for the content
16661
+ * @csspart scroll-prev - The previous flipper container
16662
+ * @csspart scroll-action-previous - The element wrapping the previous flipper
16663
+ * @csspart scroll-next - The next flipper container
16664
+ * @csspart scroll-action-next - The element wrapping the next flipper
16665
+ * @fires scrollstart - Fires a custom 'scrollstart' event when scrolling
16666
+ * @fires scrollend - Fires a custom 'scrollend' event when scrolling stops
16667
+ *
16463
16668
  * @public
16464
16669
  */
16465
16670
 
@@ -16877,6 +17082,16 @@ class FormAssociatedSearch extends FormAssociated(_Search) {
16877
17082
  * A Search Custom HTML Element.
16878
17083
  * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search | <input type="search" /> element }.
16879
17084
  *
17085
+ * @slot start - Content which can be provided before the search input
17086
+ * @slot end - Content which can be provided after the search clear button
17087
+ * @slot - The default slot for the label
17088
+ * @slot close-button - The clear button
17089
+ * @slot close-glyph - The clear glyph
17090
+ * @csspart label - The label
17091
+ * @csspart root - The element wrapping the control, including start and end slots
17092
+ * @csspart control - The element representing the input
17093
+ * @csspart clear-button - The button to clear the input
17094
+ *
16880
17095
  * @public
16881
17096
  */
16882
17097
 
@@ -17054,6 +17269,19 @@ class FormAssociatedSelect extends FormAssociated(_Select) {
17054
17269
  * A Select Custom HTML Element.
17055
17270
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#select | ARIA select }.
17056
17271
  *
17272
+ * @slot start - Content which can be provided before the button content
17273
+ * @slot end - Content which can be provided after the button content
17274
+ * @slot button-container - The element representing the select button
17275
+ * @slot selected-value - The selected value
17276
+ * @slot indicator - The visual indicator for the expand/collapse state of the button
17277
+ * @slot - The default slot for slotted options
17278
+ * @csspart control - The element representing the select invoking element
17279
+ * @csspart selected-value - The element wrapping the selected value
17280
+ * @csspart indicator - The element wrapping the visual indicator
17281
+ * @csspart listbox - The listbox element
17282
+ * @fires input - Fires a custom 'input' event when the value updates
17283
+ * @fires change - Fires a custom 'change' event when the value updates
17284
+ *
17057
17285
  * @public
17058
17286
  */
17059
17287
 
@@ -17076,13 +17304,6 @@ class Select$1 extends FormAssociatedSelect {
17076
17304
  */
17077
17305
 
17078
17306
  this.forcedPosition = false;
17079
- /**
17080
- * Holds the current state for the calculated position of the listbox.
17081
- *
17082
- * @public
17083
- */
17084
-
17085
- this.position = SelectPosition.below;
17086
17307
  /**
17087
17308
  * The unique id for the internal listbox element.
17088
17309
  *
@@ -17097,13 +17318,6 @@ class Select$1 extends FormAssociatedSelect {
17097
17318
  */
17098
17319
 
17099
17320
  this.maxHeight = 0;
17100
- /**
17101
- * The value displayed on the button.
17102
- *
17103
- * @public
17104
- */
17105
-
17106
- this.displayValue = "";
17107
17321
  }
17108
17322
  /**
17109
17323
  * Sets focus and synchronizes ARIA attributes when the open property changes.
@@ -17157,31 +17371,29 @@ class Select$1 extends FormAssociatedSelect {
17157
17371
  }
17158
17372
 
17159
17373
  set value(next) {
17160
- var _a;
17374
+ var _a, _b, _c, _d, _e, _f, _g;
17161
17375
 
17162
17376
  const prev = `${this._value}`;
17163
17377
 
17164
- if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) {
17165
- const selectedIndex = this.options.findIndex(el => el.value === next);
17166
- const prevSelectedOption = this.options[this.selectedIndex];
17167
- const nextSelectedOption = this.options[selectedIndex];
17168
- const prevSelectedValue = prevSelectedOption ? prevSelectedOption.value : null;
17169
- const nextSelectedValue = nextSelectedOption ? nextSelectedOption.value : null;
17378
+ if ((_a = this._options) === null || _a === void 0 ? void 0 : _a.length) {
17379
+ const selectedIndex = this._options.findIndex(el => el.value === next);
17380
+
17381
+ const prevSelectedValue = (_c = (_b = this._options[this.selectedIndex]) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : null;
17382
+ const nextSelectedValue = (_e = (_d = this._options[selectedIndex]) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : null;
17170
17383
 
17171
17384
  if (selectedIndex === -1 || prevSelectedValue !== nextSelectedValue) {
17172
17385
  next = "";
17173
17386
  this.selectedIndex = selectedIndex;
17174
17387
  }
17175
17388
 
17176
- if (this.firstSelectedOption) {
17177
- next = this.firstSelectedOption.value;
17178
- }
17389
+ next = (_g = (_f = this.firstSelectedOption) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : next;
17179
17390
  }
17180
17391
 
17181
17392
  if (prev !== next) {
17182
17393
  this._value = next;
17183
17394
  super.valueChanged(prev, next);
17184
17395
  Observable.notify(this, "value");
17396
+ this.updateDisplayValue();
17185
17397
  }
17186
17398
  }
17187
17399
  /**
@@ -17194,9 +17406,10 @@ class Select$1 extends FormAssociatedSelect {
17194
17406
 
17195
17407
 
17196
17408
  updateValue(shouldEmit) {
17409
+ var _a, _b;
17410
+
17197
17411
  if (this.$fastController.isConnected) {
17198
- this.value = this.firstSelectedOption ? this.firstSelectedOption.value : "";
17199
- this.displayValue = this.firstSelectedOption ? this.firstSelectedOption.textContent || this.firstSelectedOption.value : this.value;
17412
+ this.value = (_b = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
17200
17413
  }
17201
17414
 
17202
17415
  if (shouldEmit) {
@@ -17222,8 +17435,8 @@ class Select$1 extends FormAssociatedSelect {
17222
17435
  this.updateValue();
17223
17436
  }
17224
17437
 
17225
- positionChanged() {
17226
- this.positionAttribute = this.position;
17438
+ positionChanged(prev, next) {
17439
+ this.positionAttribute = next;
17227
17440
  this.setPositioning();
17228
17441
  }
17229
17442
  /**
@@ -17241,6 +17454,19 @@ class Select$1 extends FormAssociatedSelect {
17241
17454
  this.positionAttribute = this.forcedPosition ? this.positionAttribute : this.position;
17242
17455
  this.maxHeight = this.position === SelectPosition.above ? ~~currentBox.top : ~~availableBottom;
17243
17456
  }
17457
+ /**
17458
+ * The value displayed on the button.
17459
+ *
17460
+ * @public
17461
+ */
17462
+
17463
+
17464
+ get displayValue() {
17465
+ var _a, _b;
17466
+
17467
+ Observable.track(this, "displayValue");
17468
+ return (_b = (_a = this.firstSelectedOption) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : "";
17469
+ }
17244
17470
  /**
17245
17471
  * Synchronize the `aria-disabled` property when the `disabled` property changes.
17246
17472
  *
@@ -17338,6 +17564,24 @@ class Select$1 extends FormAssociatedSelect {
17338
17564
  }
17339
17565
  }
17340
17566
  }
17567
+ /**
17568
+ * Updates the value when an option's value changes.
17569
+ *
17570
+ * @param source - the source object
17571
+ * @param propertyName - the property to evaluate
17572
+ *
17573
+ * @internal
17574
+ * @override
17575
+ */
17576
+
17577
+
17578
+ handleChange(source, propertyName) {
17579
+ super.handleChange(source, propertyName);
17580
+
17581
+ if (propertyName === "value") {
17582
+ this.updateValue();
17583
+ }
17584
+ }
17341
17585
  /**
17342
17586
  * Synchronize the form-associated proxy and updates the value property of the element.
17343
17587
  *
@@ -17349,7 +17593,15 @@ class Select$1 extends FormAssociatedSelect {
17349
17593
 
17350
17594
 
17351
17595
  slottedOptionsChanged(prev, next) {
17596
+ this.options.forEach(o => {
17597
+ const notifier = Observable.getNotifier(o);
17598
+ notifier.unsubscribe(this, "value");
17599
+ });
17352
17600
  super.slottedOptionsChanged(prev, next);
17601
+ this.options.forEach(o => {
17602
+ const notifier = Observable.getNotifier(o);
17603
+ notifier.subscribe(this, "value");
17604
+ });
17353
17605
  this.setProxyOptions();
17354
17606
  this.updateValue();
17355
17607
  }
@@ -17517,12 +17769,18 @@ class Select$1 extends FormAssociatedSelect {
17517
17769
  this.indexWhenOpened = this.selectedIndex;
17518
17770
  }
17519
17771
 
17520
- return !(key in ArrowKeys);
17772
+ return !(key === keyArrowDown || key === keyArrowUp);
17521
17773
  }
17522
17774
 
17523
17775
  connectedCallback() {
17524
17776
  super.connectedCallback();
17525
17777
  this.forcedPosition = !!this.positionAttribute;
17778
+ this.addEventListener("contentchange", this.updateDisplayValue);
17779
+ }
17780
+
17781
+ disconnectedCallback() {
17782
+ this.removeEventListener("contentchange", this.updateDisplayValue);
17783
+ super.disconnectedCallback();
17526
17784
  }
17527
17785
  /**
17528
17786
  * Updates the proxy's size property when the size attribute changes.
@@ -17542,6 +17800,17 @@ class Select$1 extends FormAssociatedSelect {
17542
17800
  this.proxy.size = next;
17543
17801
  }
17544
17802
  }
17803
+ /**
17804
+ *
17805
+ * @internal
17806
+ */
17807
+
17808
+
17809
+ updateDisplayValue() {
17810
+ if (this.collapsible) {
17811
+ Observable.notify(this, "displayValue");
17812
+ }
17813
+ }
17545
17814
 
17546
17815
  }
17547
17816
 
@@ -17561,8 +17830,6 @@ __decorate$1([attr({
17561
17830
  __decorate$1([observable], Select$1.prototype, "position", void 0);
17562
17831
 
17563
17832
  __decorate$1([observable], Select$1.prototype, "maxHeight", void 0);
17564
-
17565
- __decorate$1([observable], Select$1.prototype, "displayValue", void 0);
17566
17833
  /**
17567
17834
  * Includes ARIA states and properties relating to the ARIA select role.
17568
17835
  *
@@ -17598,6 +17865,8 @@ const skeletonTemplate = (context, definition) => html`<template class="${x => x
17598
17865
  /**
17599
17866
  * A Skeleton Custom HTML Element.
17600
17867
  *
17868
+ * @slot - The default slot
17869
+ *
17601
17870
  * @public
17602
17871
  */
17603
17872
 
@@ -17658,6 +17927,9 @@ const defaultConfig = {
17658
17927
  /**
17659
17928
  * A label element intended to be used with the {@link @microsoft/fast-foundation#(Slider:class)} component.
17660
17929
  *
17930
+ * @slot - The default slot for the label content
17931
+ * @csspart root - The element wrapping the label mark and text
17932
+ *
17661
17933
  * @public
17662
17934
  */
17663
17935
 
@@ -17682,7 +17954,7 @@ class SliderLabel extends FoundationElement {
17682
17954
  this.getSliderConfiguration = () => {
17683
17955
  if (!this.isSliderConfig(this.parentNode)) {
17684
17956
  this.sliderDirection = defaultConfig.direction || Direction.ltr;
17685
- this.sliderOrientation = defaultConfig.orientation || Orientation.horizontal;
17957
+ this.sliderOrientation = defaultConfig.orientation ;
17686
17958
  this.sliderMaxPosition = defaultConfig.max;
17687
17959
  this.sliderMinPosition = defaultConfig.min;
17688
17960
  } else {
@@ -17845,19 +18117,26 @@ class FormAssociatedSlider extends FormAssociated(_Slider) {
17845
18117
  * @public
17846
18118
  */
17847
18119
 
17848
- var SliderMode;
17849
-
17850
- (function (SliderMode) {
17851
- SliderMode["singleValue"] = "single-value";
17852
- })(SliderMode || (SliderMode = {}));
18120
+ const SliderMode = {
18121
+ singleValue: "single-value"
18122
+ };
17853
18123
  /**
17854
18124
  * A Slider Custom HTML Element.
17855
18125
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#slider | ARIA slider }.
17856
18126
  *
18127
+ * @slot track - The track of the slider
18128
+ * @slot track-start - The track-start visual indicator
18129
+ * @slot thumb - The slider thumb
18130
+ * @slot - The default slot for labels
18131
+ * @csspart positioning-region - The region used to position the elements of the slider
18132
+ * @csspart track-container - The region containing the track elements
18133
+ * @csspart track-start - The element wrapping the track start slot
18134
+ * @csspart thumb-container - The thumb container element which is programatically positioned
18135
+ * @fires change - Fires a custom 'change' event when the slider value changes
18136
+ *
17857
18137
  * @public
17858
18138
  */
17859
18139
 
17860
-
17861
18140
  class Slider extends FormAssociatedSlider {
17862
18141
  constructor() {
17863
18142
  super(...arguments);
@@ -17956,6 +18235,10 @@ class Slider extends FormAssociatedSlider {
17956
18235
  this.mode = SliderMode.singleValue;
17957
18236
 
17958
18237
  this.keypressHandler = e => {
18238
+ if (this.readOnly) {
18239
+ return;
18240
+ }
18241
+
17959
18242
  if (e.key === keyHome) {
17960
18243
  e.preventDefault();
17961
18244
  this.value = `${this.min}`;
@@ -18348,6 +18631,16 @@ class FormAssociatedSwitch extends CheckableFormAssociated(_Switch) {
18348
18631
  * A Switch Custom HTML Element.
18349
18632
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#switch | ARIA switch }.
18350
18633
  *
18634
+ * @slot - The deafult slot for the label
18635
+ * @slot checked-message - The message when in a checked state
18636
+ * @slot unchecked-message - The message when in an unchecked state
18637
+ * @csspart label - The label
18638
+ * @csspart switch - The element representing the switch, which wraps the indicator
18639
+ * @csspart status-message - The wrapper for the status messages
18640
+ * @csspart checked-message - The checked message
18641
+ * @csspart unchecked-message - The unchecked message
18642
+ * @fires change - Emits a custom change event when the checked state changes
18643
+ *
18351
18644
  * @public
18352
18645
  */
18353
18646
 
@@ -18427,6 +18720,9 @@ const tabPanelTemplate = (context, definition) => html`<template slot="tabpanel"
18427
18720
 
18428
18721
  /**
18429
18722
  * A TabPanel Component to be used with {@link @microsoft/fast-foundation#(Tabs:class)}
18723
+ *
18724
+ * @slot - The default slot for the tabpanel content
18725
+ *
18430
18726
  * @public
18431
18727
  */
18432
18728
 
@@ -18441,6 +18737,9 @@ const tabTemplate = (context, definition) => html`<template slot="tab" role="tab
18441
18737
 
18442
18738
  /**
18443
18739
  * A Tab Component to be used with {@link @microsoft/fast-foundation#(Tabs:class)}
18740
+ *
18741
+ * @slot - The default slot for the tab content
18742
+ *
18444
18743
  * @public
18445
18744
  */
18446
18745
 
@@ -18462,20 +18761,27 @@ const tabsTemplate = (context, definition) => html`<template class="${x => x.ori
18462
18761
  * @public
18463
18762
  */
18464
18763
 
18465
- var TabsOrientation;
18466
-
18467
- (function (TabsOrientation) {
18468
- TabsOrientation["vertical"] = "vertical";
18469
- TabsOrientation["horizontal"] = "horizontal";
18470
- })(TabsOrientation || (TabsOrientation = {}));
18764
+ const TabsOrientation = {
18765
+ vertical: "vertical",
18766
+ horizontal: "horizontal"
18767
+ };
18471
18768
  /**
18472
18769
  * A Tabs Custom HTML Element.
18473
18770
  * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#tablist | ARIA tablist }.
18474
18771
  *
18772
+ * @slot start - Content which can be provided before the tablist element
18773
+ * @slot end - Content which can be provided after the tablist element
18774
+ * @slot tab - The slot for tabs
18775
+ * @slot tabpanel - The slot for tabpanels
18776
+ * @csspart tablist - The element wrapping for the tabs
18777
+ * @csspart tab - The tab slot
18778
+ * @csspart activeIndicator - The visual indicator
18779
+ * @csspart tabpanel - The tabpanel slot
18780
+ * @fires change - Fires a custom 'change' event when a tab is clicked or during keyboard navigation
18781
+ *
18475
18782
  * @public
18476
18783
  */
18477
18784
 
18478
-
18479
18785
  class Tabs extends FoundationElement {
18480
18786
  constructor() {
18481
18787
  super(...arguments);
@@ -18520,8 +18826,6 @@ class Tabs extends FoundationElement {
18520
18826
  const gridHorizontalProperty = "gridColumn";
18521
18827
  const gridVerticalProperty = "gridRow";
18522
18828
  const gridProperty = this.isHorizontal() ? gridHorizontalProperty : gridVerticalProperty;
18523
- this.tabIds = this.getTabIds();
18524
- this.tabpanelIds = this.getTabPanelIds();
18525
18829
  this.activeTabIndex = this.getActiveIndex();
18526
18830
  this.showActiveIndicator = false;
18527
18831
  this.tabs.forEach((tab, index) => {
@@ -18556,8 +18860,6 @@ class Tabs extends FoundationElement {
18556
18860
  };
18557
18861
 
18558
18862
  this.setTabPanels = () => {
18559
- this.tabIds = this.getTabIds();
18560
- this.tabpanelIds = this.getTabPanelIds();
18561
18863
  this.tabpanels.forEach((tabpanel, index) => {
18562
18864
  const tabId = this.tabIds[index];
18563
18865
  const tabpanelId = this.tabpanelIds[index];
@@ -18699,6 +19001,8 @@ class Tabs extends FoundationElement {
18699
19001
 
18700
19002
  tabsChanged() {
18701
19003
  if (this.$fastController.isConnected && this.tabs.length <= this.tabpanels.length) {
19004
+ this.tabIds = this.getTabIds();
19005
+ this.tabpanelIds = this.getTabPanelIds();
18702
19006
  this.setTabs();
18703
19007
  this.setTabPanels();
18704
19008
  this.handleActiveIndicatorPosition();
@@ -18711,6 +19015,8 @@ class Tabs extends FoundationElement {
18711
19015
 
18712
19016
  tabpanelsChanged() {
18713
19017
  if (this.$fastController.isConnected && this.tabpanels.length <= this.tabs.length) {
19018
+ this.tabIds = this.getTabIds();
19019
+ this.tabpanelIds = this.getTabPanelIds();
18714
19020
  this.setTabs();
18715
19021
  this.setTabPanels();
18716
19022
  this.handleActiveIndicatorPosition();
@@ -18855,34 +19161,38 @@ class FormAssociatedTextArea extends FormAssociated(_TextArea) {
18855
19161
  * Resize mode for a TextArea
18856
19162
  * @public
18857
19163
  */
18858
- var TextAreaResize;
18859
-
18860
- (function (TextAreaResize) {
19164
+ const TextAreaResize = {
18861
19165
  /**
18862
19166
  * No resize.
18863
19167
  */
18864
- TextAreaResize["none"] = "none";
19168
+ none: "none",
19169
+
18865
19170
  /**
18866
19171
  * Resize vertically and horizontally.
18867
19172
  */
19173
+ both: "both",
18868
19174
 
18869
- TextAreaResize["both"] = "both";
18870
19175
  /**
18871
19176
  * Resize horizontally.
18872
19177
  */
19178
+ horizontal: "horizontal",
18873
19179
 
18874
- TextAreaResize["horizontal"] = "horizontal";
18875
19180
  /**
18876
19181
  * Resize vertically.
18877
19182
  */
18878
-
18879
- TextAreaResize["vertical"] = "vertical";
18880
- })(TextAreaResize || (TextAreaResize = {}));
19183
+ vertical: "vertical"
19184
+ };
18881
19185
 
18882
19186
  /**
18883
19187
  * A Text Area Custom HTML Element.
18884
19188
  * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.
18885
19189
  *
19190
+ * @slot - The default slot for the label
19191
+ * @csspart label - The label
19192
+ * @csspart root - The element wrapping the control
19193
+ * @csspart control - The textarea element
19194
+ * @fires change - Emits a custom 'change' event when the textarea emits a change event
19195
+ *
18886
19196
  * @public
18887
19197
  */
18888
19198
 
@@ -18950,6 +19260,24 @@ class TextArea$1 extends FormAssociatedTextArea {
18950
19260
  this.proxy.spellcheck = this.spellcheck;
18951
19261
  }
18952
19262
  }
19263
+ /**
19264
+ * Selects all the text in the text area
19265
+ *
19266
+ * @public
19267
+ */
19268
+
19269
+
19270
+ select() {
19271
+ this.control.select();
19272
+ /**
19273
+ * The select event does not permeate the shadow DOM boundary.
19274
+ * This fn effectively proxies the select event,
19275
+ * emitting a `select` event whenever the internal
19276
+ * control emits a `select` event
19277
+ */
19278
+
19279
+ this.$emit("select");
19280
+ }
18953
19281
  /**
18954
19282
  * Change event handler for inner control.
18955
19283
  * @remarks
@@ -19036,7 +19364,12 @@ const textFieldTemplate = (context, definition) => html`<template class=" ${x =>
19036
19364
  * @public
19037
19365
  */
19038
19366
 
19039
- const toolbarTemplate = (context, definition) => html`<template aria-label="${x => x.ariaLabel}" aria-labelledby="${x => x.ariaLabelledby}" aria-orientation="${x => x.orientation}" orientation="${x => x.orientation}" role="toolbar" @click="${(x, c) => x.clickHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}"><slot name="label"></slot><div class="positioning-region" part="positioning-region">${startSlotTemplate(context, definition)}<slot ${slotted({
19367
+ const toolbarTemplate = (context, definition) => html`<template aria-label="${x => x.ariaLabel}" aria-labelledby="${x => x.ariaLabelledby}" aria-orientation="${x => x.orientation}" orientation="${x => x.orientation}" role="toolbar" @click="${(x, c) => x.clickHandler(c.event)}" @focusin="${(x, c) => x.focusinHandler(c.event)}" @keydown="${(x, c) => x.keydownHandler(c.event)}" ${children({
19368
+ property: "childItems",
19369
+ attributeFilter: ["disabled", "hidden"],
19370
+ filter: elements(),
19371
+ subtree: true
19372
+ })}><slot name="label"></slot><div class="positioning-region" part="positioning-region">${startSlotTemplate(context, definition)}<slot ${slotted({
19040
19373
  filter: elements(),
19041
19374
  property: "slottedItems"
19042
19375
  })}></slot>${endSlotTemplate(context, definition)}</div></template>`;
@@ -19072,6 +19405,12 @@ const ToolbarArrowKeyMap = Object.freeze({
19072
19405
  * A Toolbar Custom HTML Element.
19073
19406
  * Implements the {@link https://w3c.github.io/aria-practices/#Toolbar|ARIA Toolbar}.
19074
19407
  *
19408
+ * @slot start - Content which can be provided before the slotted items
19409
+ * @slot end - Content which can be provided after the slotted items
19410
+ * @slot - The default slot for slotted items
19411
+ * @slot label - The toolbar label
19412
+ * @csspart positioning-region - The element containing the items, start and end slots
19413
+ *
19075
19414
  * @public
19076
19415
  */
19077
19416
 
@@ -19101,12 +19440,6 @@ class Toolbar$1 extends FoundationElement {
19101
19440
  */
19102
19441
 
19103
19442
  this.orientation = Orientation.horizontal;
19104
-
19105
- this.startEndSlotChange = () => {
19106
- if (this.$fastController.isConnected) {
19107
- this.reduceFocusableElements();
19108
- }
19109
- };
19110
19443
  }
19111
19444
  /**
19112
19445
  * The index of the currently focused element, clamped between 0 and the last element.
@@ -19150,6 +19483,12 @@ class Toolbar$1 extends FoundationElement {
19150
19483
 
19151
19484
  return true;
19152
19485
  }
19486
+
19487
+ childItemsChanged(prev, next) {
19488
+ if (this.$fastController.isConnected) {
19489
+ this.reduceFocusableElements();
19490
+ }
19491
+ }
19153
19492
  /**
19154
19493
  * @internal
19155
19494
  */
@@ -19158,18 +19497,6 @@ class Toolbar$1 extends FoundationElement {
19158
19497
  connectedCallback() {
19159
19498
  super.connectedCallback();
19160
19499
  this.direction = getDirection(this);
19161
- this.start.addEventListener("slotchange", this.startEndSlotChange);
19162
- this.end.addEventListener("slotchange", this.startEndSlotChange);
19163
- }
19164
- /**
19165
- * @internal
19166
- */
19167
-
19168
-
19169
- disconnectedCallback() {
19170
- super.disconnectedCallback();
19171
- this.start.removeEventListener("slotchange", this.startEndSlotChange);
19172
- this.end.removeEventListener("slotchange", this.startEndSlotChange);
19173
19500
  }
19174
19501
  /**
19175
19502
  * When the toolbar receives focus, set the currently active element as focused.
@@ -19247,7 +19574,14 @@ class Toolbar$1 extends FoundationElement {
19247
19574
 
19248
19575
 
19249
19576
  reduceFocusableElements() {
19250
- this.focusableElements = this.allSlottedItems.reduce(Toolbar$1.reduceFocusableItems, []);
19577
+ var _a;
19578
+
19579
+ const previousFocusedElement = (_a = this.focusableElements) === null || _a === void 0 ? void 0 : _a[this.activeIndex];
19580
+ this.focusableElements = this.allSlottedItems.reduce(Toolbar$1.reduceFocusableItems, []); // If the previously active item is still focusable, adjust the active index to the
19581
+ // index of that item.
19582
+
19583
+ const adjustedActiveIndex = this.focusableElements.indexOf(previousFocusedElement);
19584
+ this.activeIndex = Math.max(0, adjustedActiveIndex);
19251
19585
  this.setFocusableElements();
19252
19586
  }
19253
19587
  /**
@@ -19282,7 +19616,7 @@ class Toolbar$1 extends FoundationElement {
19282
19616
  const isFocusableFastElement = (_b = (_a = element.$fastController) === null || _a === void 0 ? void 0 : _a.definition.shadowOptions) === null || _b === void 0 ? void 0 : _b.delegatesFocus;
19283
19617
  const hasFocusableShadow = Array.from((_d = (_c = element.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll("*")) !== null && _d !== void 0 ? _d : []).some(x => isFocusable(x));
19284
19618
 
19285
- if (isFocusable(element) || isRoleRadio || isFocusableFastElement || hasFocusableShadow) {
19619
+ if (!element.hasAttribute("disabled") && !element.hasAttribute("hidden") && (isFocusable(element) || isRoleRadio || isFocusableFastElement || hasFocusableShadow)) {
19286
19620
  elements.push(element);
19287
19621
  return elements;
19288
19622
  }
@@ -19315,6 +19649,8 @@ __decorate$1([attr], Toolbar$1.prototype, "orientation", void 0);
19315
19649
  __decorate$1([observable], Toolbar$1.prototype, "slottedItems", void 0);
19316
19650
 
19317
19651
  __decorate$1([observable], Toolbar$1.prototype, "slottedLabel", void 0);
19652
+
19653
+ __decorate$1([observable], Toolbar$1.prototype, "childItems", void 0);
19318
19654
  /**
19319
19655
  * Includes ARIA states and properties relating to the ARIA toolbar role
19320
19656
  *
@@ -19349,83 +19685,85 @@ const tooltipTemplate = (context, definition) => {
19349
19685
  *
19350
19686
  * @public
19351
19687
  */
19352
- var TooltipPosition;
19353
-
19354
- (function (TooltipPosition) {
19688
+ const TooltipPosition = {
19355
19689
  /**
19356
19690
  * The tooltip is positioned above the element
19357
19691
  */
19358
- TooltipPosition["top"] = "top";
19692
+ top: "top",
19693
+
19359
19694
  /**
19360
19695
  * The tooltip is positioned to the right of the element
19361
19696
  */
19697
+ right: "right",
19362
19698
 
19363
- TooltipPosition["right"] = "right";
19364
19699
  /**
19365
19700
  * The tooltip is positioned below the element
19366
19701
  */
19702
+ bottom: "bottom",
19367
19703
 
19368
- TooltipPosition["bottom"] = "bottom";
19369
19704
  /**
19370
19705
  * The tooltip is positioned to the left of the element
19371
19706
  */
19707
+ left: "left",
19372
19708
 
19373
- TooltipPosition["left"] = "left";
19374
19709
  /**
19375
19710
  * The tooltip is positioned before the element
19376
19711
  */
19712
+ start: "start",
19377
19713
 
19378
- TooltipPosition["start"] = "start";
19379
19714
  /**
19380
19715
  * The tooltip is positioned after the element
19381
19716
  */
19717
+ end: "end",
19382
19718
 
19383
- TooltipPosition["end"] = "end";
19384
19719
  /**
19385
19720
  * The tooltip is positioned above the element and to the left
19386
19721
  */
19722
+ topLeft: "top-left",
19387
19723
 
19388
- TooltipPosition["topLeft"] = "top-left";
19389
19724
  /**
19390
19725
  * The tooltip is positioned above the element and to the right
19391
19726
  */
19727
+ topRight: "top-right",
19392
19728
 
19393
- TooltipPosition["topRight"] = "top-right";
19394
19729
  /**
19395
19730
  * The tooltip is positioned below the element and to the left
19396
19731
  */
19732
+ bottomLeft: "bottom-left",
19397
19733
 
19398
- TooltipPosition["bottomLeft"] = "bottom-left";
19399
19734
  /**
19400
19735
  * The tooltip is positioned below the element and to the right
19401
19736
  */
19737
+ bottomRight: "bottom-right",
19402
19738
 
19403
- TooltipPosition["bottomRight"] = "bottom-right";
19404
19739
  /**
19405
19740
  * The tooltip is positioned above the element and to the left
19406
19741
  */
19742
+ topStart: "top-start",
19407
19743
 
19408
- TooltipPosition["topStart"] = "top-start";
19409
19744
  /**
19410
19745
  * The tooltip is positioned above the element and to the right
19411
19746
  */
19747
+ topEnd: "top-end",
19412
19748
 
19413
- TooltipPosition["topEnd"] = "top-end";
19414
19749
  /**
19415
19750
  * The tooltip is positioned below the element and to the left
19416
19751
  */
19752
+ bottomStart: "bottom-start",
19417
19753
 
19418
- TooltipPosition["bottomStart"] = "bottom-start";
19419
19754
  /**
19420
19755
  * The tooltip is positioned below the element and to the right
19421
19756
  */
19422
-
19423
- TooltipPosition["bottomEnd"] = "bottom-end";
19424
- })(TooltipPosition || (TooltipPosition = {}));
19757
+ bottomEnd: "bottom-end"
19758
+ };
19425
19759
 
19426
19760
  /**
19427
19761
  * An Tooltip Custom HTML Element.
19428
19762
  *
19763
+ * @slot - The default slot for the tooltip content
19764
+ * @csspart tooltip - The tooltip element
19765
+ * @fires dismiss - Fires a custom 'dismiss' event when the tooltip is visible and escape key is pressed
19766
+ *
19429
19767
  * @public
19430
19768
  */
19431
19769
 
@@ -20030,6 +20368,18 @@ function isTreeItemElement(el) {
20030
20368
  /**
20031
20369
  * A Tree item Custom HTML Element.
20032
20370
  *
20371
+ * @slot start - Content which can be provided before the tree item content
20372
+ * @slot end - Content which can be provided after the tree item content
20373
+ * @slot - The default slot for tree item text content
20374
+ * @slot item - The slot for tree items (fast tree items manage this assignment themselves)
20375
+ * @slot expand-collapse-button - The expand/collapse button
20376
+ * @csspart positioning-region - The element used to position the tree item content with exception of any child nodes
20377
+ * @csspart content-region - The element containing the expand/collapse, start, and end slots
20378
+ * @csspart items - The element wrapping any child items
20379
+ * @csspart expand-collapse-button - The expand/collapse button
20380
+ * @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes
20381
+ * @fires selected-change - Fires a custom 'selected-change' event when the selected state changes
20382
+ *
20033
20383
  * @public
20034
20384
  */
20035
20385
 
@@ -20179,6 +20529,8 @@ const treeViewTemplate = (context, definition) => html`<template role="tree" ${r
20179
20529
  * A Tree view Custom HTML Element.
20180
20530
  * Implements the {@link https://w3c.github.io/aria-practices/#TreeView | ARIA TreeView }.
20181
20531
  *
20532
+ * @slot - The default slot for tree items
20533
+ *
20182
20534
  * @public
20183
20535
  */
20184
20536
 
@@ -20270,8 +20622,10 @@ class TreeView extends FoundationElement {
20270
20622
  if (e.target && this.isFocusableElement(e.target)) {
20271
20623
  const item = e.target;
20272
20624
 
20273
- if (item instanceof TreeItem && item.childItemLength() > 0) {
20625
+ if (item instanceof TreeItem && item.childItemLength() > 0 && item.expanded) {
20274
20626
  item.expanded = false;
20627
+ } else if (item instanceof TreeItem && item.parentElement instanceof TreeItem) {
20628
+ TreeItem.focusItem(item.parentElement);
20275
20629
  }
20276
20630
  }
20277
20631
 
@@ -20281,8 +20635,10 @@ class TreeView extends FoundationElement {
20281
20635
  if (e.target && this.isFocusableElement(e.target)) {
20282
20636
  const item = e.target;
20283
20637
 
20284
- if (item instanceof TreeItem && item.childItemLength() > 0) {
20638
+ if (item instanceof TreeItem && item.childItemLength() > 0 && !item.expanded) {
20285
20639
  item.expanded = true;
20640
+ } else if (item instanceof TreeItem && item.childItemLength() > 0) {
20641
+ this.focusNextNode(1, e.target);
20286
20642
  }
20287
20643
  }
20288
20644