@fluentui/web-components 3.0.0-alpha.18 → 3.0.0-alpha.19

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 (47) hide show
  1. package/CHANGELOG.json +16 -1
  2. package/CHANGELOG.md +11 -2
  3. package/dist/dts/index.d.ts +2 -0
  4. package/dist/dts/menu-item/define.d.ts +1 -0
  5. package/dist/dts/menu-item/index.d.ts +4 -0
  6. package/dist/dts/menu-item/menu-item.d.ts +8 -0
  7. package/dist/dts/menu-item/menu-item.definition.d.ts +11 -0
  8. package/dist/dts/menu-item/menu-item.styles.d.ts +4 -0
  9. package/dist/dts/menu-item/menu-item.template.d.ts +3 -0
  10. package/dist/dts/menu-list/define.d.ts +1 -0
  11. package/dist/dts/menu-list/index.d.ts +4 -0
  12. package/dist/dts/menu-list/menu-list.d.ts +9 -0
  13. package/dist/dts/menu-list/menu-list.definition.d.ts +11 -0
  14. package/dist/dts/menu-list/menu-list.styles.d.ts +4 -0
  15. package/dist/dts/menu-list/menu-list.template.d.ts +3 -0
  16. package/dist/esm/index.js +2 -0
  17. package/dist/esm/index.js.map +1 -1
  18. package/dist/esm/menu-item/define.js +4 -0
  19. package/dist/esm/menu-item/define.js.map +1 -0
  20. package/dist/esm/menu-item/index.js +5 -0
  21. package/dist/esm/menu-item/index.js.map +1 -0
  22. package/dist/esm/menu-item/menu-item.definition.js +19 -0
  23. package/dist/esm/menu-item/menu-item.definition.js.map +1 -0
  24. package/dist/esm/menu-item/menu-item.js +8 -0
  25. package/dist/esm/menu-item/menu-item.js.map +1 -0
  26. package/dist/esm/menu-item/menu-item.styles.js +183 -0
  27. package/dist/esm/menu-item/menu-item.styles.js.map +1 -0
  28. package/dist/esm/menu-item/menu-item.template.js +10 -0
  29. package/dist/esm/menu-item/menu-item.template.js.map +1 -0
  30. package/dist/esm/menu-list/define.js +4 -0
  31. package/dist/esm/menu-list/define.js.map +1 -0
  32. package/dist/esm/menu-list/index.js +5 -0
  33. package/dist/esm/menu-list/index.js.map +1 -0
  34. package/dist/esm/menu-list/menu-list.definition.js +19 -0
  35. package/dist/esm/menu-list/menu-list.definition.js.map +1 -0
  36. package/dist/esm/menu-list/menu-list.js +36 -0
  37. package/dist/esm/menu-list/menu-list.js.map +1 -0
  38. package/dist/esm/menu-list/menu-list.styles.js +24 -0
  39. package/dist/esm/menu-list/menu-list.styles.js.map +1 -0
  40. package/dist/esm/menu-list/menu-list.template.js +3 -0
  41. package/dist/esm/menu-list/menu-list.template.js.map +1 -0
  42. package/dist/fluent-web-components.api.json +320 -0
  43. package/dist/web-components.d.ts +56 -0
  44. package/dist/web-components.js +2022 -93
  45. package/dist/web-components.min.js +158 -152
  46. package/docs/api-report.md +33 -0
  47. package/package.json +13 -5
@@ -3268,6 +3268,33 @@ function __decorate(decorators, target, key, desc) {
3268
3268
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3269
3269
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3270
3270
  }
3271
+ function __awaiter(thisArg, _arguments, P, generator) {
3272
+ function adopt(value) {
3273
+ return value instanceof P ? value : new P(function (resolve) {
3274
+ resolve(value);
3275
+ });
3276
+ }
3277
+ return new (P || (P = Promise))(function (resolve, reject) {
3278
+ function fulfilled(value) {
3279
+ try {
3280
+ step(generator.next(value));
3281
+ } catch (e) {
3282
+ reject(e);
3283
+ }
3284
+ }
3285
+ function rejected(value) {
3286
+ try {
3287
+ step(generator["throw"](value));
3288
+ } catch (e) {
3289
+ reject(e);
3290
+ }
3291
+ }
3292
+ function step(result) {
3293
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
3294
+ }
3295
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
3296
+ });
3297
+ }
3271
3298
 
3272
3299
  /**
3273
3300
  * Some states and properties are applicable to all host language elements regardless of whether a role is applied.
@@ -3378,6 +3405,13 @@ const Orientation = {
3378
3405
  vertical: "vertical"
3379
3406
  };
3380
3407
 
3408
+ /**
3409
+ * A test that ensures that all arguments are HTML Elements
3410
+ */
3411
+ function isHTMLElement$1(...args) {
3412
+ return args.every(arg => arg instanceof HTMLElement);
3413
+ }
3414
+
3381
3415
  /**
3382
3416
  * String values for use with KeyboardEvent.key
3383
3417
  */
@@ -3387,6 +3421,7 @@ const keyArrowRight = "ArrowRight";
3387
3421
  const keyArrowUp = "ArrowUp";
3388
3422
  const keyEnd = "End";
3389
3423
  const keyEnter = "Enter";
3424
+ const keyEscape = "Escape";
3390
3425
  const keyHome = "Home";
3391
3426
  const keySpace = " ";
3392
3427
 
@@ -4421,6 +4456,1252 @@ function buttonTemplate$1(options = {}) {
4421
4456
  return html`<button class="control" part="control" ?autofocus="${x => x.autofocus}" ?disabled="${x => x.disabled}" form="${x => x.formId}" formaction="${x => x.formaction}" formenctype="${x => x.formenctype}" formmethod="${x => x.formmethod}" ?formnovalidate="${x => x.formnovalidate}" formtarget="${x => x.formtarget}" name="${x => x.name}" type="${x => x.type}" value="${x => x.value}" 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-expanded="${x => x.ariaExpanded}" 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-pressed="${x => x.ariaPressed}" aria-relevant="${x => x.ariaRelevant}" aria-roledescription="${x => x.ariaRoledescription}" ${ref("control")}>${startSlotTemplate(options)}<span class="content" part="content"><slot ${slotted("defaultSlottedContent")}></slot></span>${endSlotTemplate(options)}</button>`;
4422
4457
  }
4423
4458
 
4459
+ function getAlignment(placement) {
4460
+ return placement.split('-')[1];
4461
+ }
4462
+ function getLengthFromAxis(axis) {
4463
+ return axis === 'y' ? 'height' : 'width';
4464
+ }
4465
+ function getSide(placement) {
4466
+ return placement.split('-')[0];
4467
+ }
4468
+ function getMainAxisFromPlacement(placement) {
4469
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
4470
+ }
4471
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
4472
+ let {
4473
+ reference,
4474
+ floating
4475
+ } = _ref;
4476
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
4477
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
4478
+ const mainAxis = getMainAxisFromPlacement(placement);
4479
+ const length = getLengthFromAxis(mainAxis);
4480
+ const commonAlign = reference[length] / 2 - floating[length] / 2;
4481
+ const side = getSide(placement);
4482
+ const isVertical = mainAxis === 'x';
4483
+ let coords;
4484
+ switch (side) {
4485
+ case 'top':
4486
+ coords = {
4487
+ x: commonX,
4488
+ y: reference.y - floating.height
4489
+ };
4490
+ break;
4491
+ case 'bottom':
4492
+ coords = {
4493
+ x: commonX,
4494
+ y: reference.y + reference.height
4495
+ };
4496
+ break;
4497
+ case 'right':
4498
+ coords = {
4499
+ x: reference.x + reference.width,
4500
+ y: commonY
4501
+ };
4502
+ break;
4503
+ case 'left':
4504
+ coords = {
4505
+ x: reference.x - floating.width,
4506
+ y: commonY
4507
+ };
4508
+ break;
4509
+ default:
4510
+ coords = {
4511
+ x: reference.x,
4512
+ y: reference.y
4513
+ };
4514
+ }
4515
+ switch (getAlignment(placement)) {
4516
+ case 'start':
4517
+ coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
4518
+ break;
4519
+ case 'end':
4520
+ coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
4521
+ break;
4522
+ }
4523
+ return coords;
4524
+ }
4525
+
4526
+ /**
4527
+ * Computes the `x` and `y` coordinates that will place the floating element
4528
+ * next to a reference element when it is given a certain positioning strategy.
4529
+ *
4530
+ * This export does not have any `platform` interface logic. You will need to
4531
+ * write one for the platform you are using Floating UI with.
4532
+ */
4533
+ const computePosition$1 = async (reference, floating, config) => {
4534
+ const {
4535
+ placement = 'bottom',
4536
+ strategy = 'absolute',
4537
+ middleware = [],
4538
+ platform
4539
+ } = config;
4540
+ const validMiddleware = middleware.filter(Boolean);
4541
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
4542
+ if (process.env.NODE_ENV !== "production") {
4543
+ if (platform == null) {
4544
+ console.error(['Floating UI: `platform` property was not passed to config. If you', 'want to use Floating UI on the web, install @floating-ui/dom', 'instead of the /core package. Otherwise, you can create your own', '`platform`: https://floating-ui.com/docs/platform'].join(' '));
4545
+ }
4546
+ if (validMiddleware.filter(_ref => {
4547
+ let {
4548
+ name
4549
+ } = _ref;
4550
+ return name === 'autoPlacement' || name === 'flip';
4551
+ }).length > 1) {
4552
+ throw new Error(['Floating UI: duplicate `flip` and/or `autoPlacement` middleware', 'detected. This will lead to an infinite loop. Ensure only one of', 'either has been passed to the `middleware` array.'].join(' '));
4553
+ }
4554
+ if (!reference || !floating) {
4555
+ console.error(['Floating UI: The reference and/or floating element was not defined', 'when `computePosition()` was called. Ensure that both elements have', 'been created and can be measured.'].join(' '));
4556
+ }
4557
+ }
4558
+ let rects = await platform.getElementRects({
4559
+ reference,
4560
+ floating,
4561
+ strategy
4562
+ });
4563
+ let {
4564
+ x,
4565
+ y
4566
+ } = computeCoordsFromPlacement(rects, placement, rtl);
4567
+ let statefulPlacement = placement;
4568
+ let middlewareData = {};
4569
+ let resetCount = 0;
4570
+ for (let i = 0; i < validMiddleware.length; i++) {
4571
+ const {
4572
+ name,
4573
+ fn
4574
+ } = validMiddleware[i];
4575
+ const {
4576
+ x: nextX,
4577
+ y: nextY,
4578
+ data,
4579
+ reset
4580
+ } = await fn({
4581
+ x,
4582
+ y,
4583
+ initialPlacement: placement,
4584
+ placement: statefulPlacement,
4585
+ strategy,
4586
+ middlewareData,
4587
+ rects,
4588
+ platform,
4589
+ elements: {
4590
+ reference,
4591
+ floating
4592
+ }
4593
+ });
4594
+ x = nextX != null ? nextX : x;
4595
+ y = nextY != null ? nextY : y;
4596
+ middlewareData = {
4597
+ ...middlewareData,
4598
+ [name]: {
4599
+ ...middlewareData[name],
4600
+ ...data
4601
+ }
4602
+ };
4603
+ if (process.env.NODE_ENV !== "production") {
4604
+ if (resetCount > 50) {
4605
+ console.warn(['Floating UI: The middleware lifecycle appears to be running in an', 'infinite loop. This is usually caused by a `reset` continually', 'being returned without a break condition.'].join(' '));
4606
+ }
4607
+ }
4608
+ if (reset && resetCount <= 50) {
4609
+ resetCount++;
4610
+ if (typeof reset === 'object') {
4611
+ if (reset.placement) {
4612
+ statefulPlacement = reset.placement;
4613
+ }
4614
+ if (reset.rects) {
4615
+ rects = reset.rects === true ? await platform.getElementRects({
4616
+ reference,
4617
+ floating,
4618
+ strategy
4619
+ }) : reset.rects;
4620
+ }
4621
+ ({
4622
+ x,
4623
+ y
4624
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
4625
+ }
4626
+ i = -1;
4627
+ continue;
4628
+ }
4629
+ }
4630
+ return {
4631
+ x,
4632
+ y,
4633
+ placement: statefulPlacement,
4634
+ strategy,
4635
+ middlewareData
4636
+ };
4637
+ };
4638
+ function expandPaddingObject(padding) {
4639
+ return {
4640
+ top: 0,
4641
+ right: 0,
4642
+ bottom: 0,
4643
+ left: 0,
4644
+ ...padding
4645
+ };
4646
+ }
4647
+ function getSideObjectFromPadding(padding) {
4648
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
4649
+ top: padding,
4650
+ right: padding,
4651
+ bottom: padding,
4652
+ left: padding
4653
+ };
4654
+ }
4655
+ function rectToClientRect(rect) {
4656
+ return {
4657
+ ...rect,
4658
+ top: rect.y,
4659
+ left: rect.x,
4660
+ right: rect.x + rect.width,
4661
+ bottom: rect.y + rect.height
4662
+ };
4663
+ }
4664
+
4665
+ /**
4666
+ * Resolves with an object of overflow side offsets that determine how much the
4667
+ * element is overflowing a given clipping boundary.
4668
+ * - positive = overflowing the boundary by that number of pixels
4669
+ * - negative = how many pixels left before it will overflow
4670
+ * - 0 = lies flush with the boundary
4671
+ * @see https://floating-ui.com/docs/detectOverflow
4672
+ */
4673
+ async function detectOverflow(middlewareArguments, options) {
4674
+ var _await$platform$isEle;
4675
+ if (options === void 0) {
4676
+ options = {};
4677
+ }
4678
+ const {
4679
+ x,
4680
+ y,
4681
+ platform,
4682
+ rects,
4683
+ elements,
4684
+ strategy
4685
+ } = middlewareArguments;
4686
+ const {
4687
+ boundary = 'clippingAncestors',
4688
+ rootBoundary = 'viewport',
4689
+ elementContext = 'floating',
4690
+ altBoundary = false,
4691
+ padding = 0
4692
+ } = options;
4693
+ const paddingObject = getSideObjectFromPadding(padding);
4694
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
4695
+ const element = elements[altBoundary ? altContext : elementContext];
4696
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
4697
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
4698
+ boundary,
4699
+ rootBoundary,
4700
+ strategy
4701
+ }));
4702
+ const rect = elementContext === 'floating' ? {
4703
+ ...rects.floating,
4704
+ x,
4705
+ y
4706
+ } : rects.reference;
4707
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
4708
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
4709
+ x: 1,
4710
+ y: 1
4711
+ } : {
4712
+ x: 1,
4713
+ y: 1
4714
+ };
4715
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
4716
+ rect,
4717
+ offsetParent,
4718
+ strategy
4719
+ }) : rect);
4720
+ if (process.env.NODE_ENV !== "production") ;
4721
+ return {
4722
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
4723
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
4724
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
4725
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
4726
+ };
4727
+ }
4728
+ const min$1 = Math.min;
4729
+ const max$1 = Math.max;
4730
+ function within(min$1$1, value, max$1$1) {
4731
+ return max$1(min$1$1, min$1(value, max$1$1));
4732
+ }
4733
+ const oppositeSideMap = {
4734
+ left: 'right',
4735
+ right: 'left',
4736
+ bottom: 'top',
4737
+ top: 'bottom'
4738
+ };
4739
+ function getOppositePlacement(placement) {
4740
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
4741
+ }
4742
+ function getAlignmentSides(placement, rects, rtl) {
4743
+ if (rtl === void 0) {
4744
+ rtl = false;
4745
+ }
4746
+ const alignment = getAlignment(placement);
4747
+ const mainAxis = getMainAxisFromPlacement(placement);
4748
+ const length = getLengthFromAxis(mainAxis);
4749
+ let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
4750
+ if (rects.reference[length] > rects.floating[length]) {
4751
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
4752
+ }
4753
+ return {
4754
+ main: mainAlignmentSide,
4755
+ cross: getOppositePlacement(mainAlignmentSide)
4756
+ };
4757
+ }
4758
+ const oppositeAlignmentMap = {
4759
+ start: 'end',
4760
+ end: 'start'
4761
+ };
4762
+ function getOppositeAlignmentPlacement(placement) {
4763
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
4764
+ }
4765
+ function getExpandedPlacements(placement) {
4766
+ const oppositePlacement = getOppositePlacement(placement);
4767
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
4768
+ }
4769
+ function getSideList(side, isStart, rtl) {
4770
+ const lr = ['left', 'right'];
4771
+ const rl = ['right', 'left'];
4772
+ const tb = ['top', 'bottom'];
4773
+ const bt = ['bottom', 'top'];
4774
+ switch (side) {
4775
+ case 'top':
4776
+ case 'bottom':
4777
+ if (rtl) return isStart ? rl : lr;
4778
+ return isStart ? lr : rl;
4779
+ case 'left':
4780
+ case 'right':
4781
+ return isStart ? tb : bt;
4782
+ default:
4783
+ return [];
4784
+ }
4785
+ }
4786
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
4787
+ const alignment = getAlignment(placement);
4788
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
4789
+ if (alignment) {
4790
+ list = list.map(side => side + "-" + alignment);
4791
+ if (flipAlignment) {
4792
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
4793
+ }
4794
+ }
4795
+ return list;
4796
+ }
4797
+
4798
+ /**
4799
+ * A visibility optimizer that changes the placement of the floating element in
4800
+ * order to keep it in view. By default, only the opposite placement is tried.
4801
+ *
4802
+ * It has the ability to flip to any placement, not just the opposite one. You
4803
+ * can use a series of “fallback” placements, where each placement is
4804
+ * progressively tried until the one that fits can be used.
4805
+ * @see https://floating-ui.com/docs/flip
4806
+ */
4807
+ const flip = function (options) {
4808
+ if (options === void 0) {
4809
+ options = {};
4810
+ }
4811
+ return {
4812
+ name: 'flip',
4813
+ options,
4814
+ async fn(middlewareArguments) {
4815
+ var _middlewareData$flip;
4816
+ const {
4817
+ placement,
4818
+ middlewareData,
4819
+ rects,
4820
+ initialPlacement,
4821
+ platform,
4822
+ elements
4823
+ } = middlewareArguments;
4824
+ const {
4825
+ mainAxis: checkMainAxis = true,
4826
+ crossAxis: checkCrossAxis = true,
4827
+ fallbackPlacements: specifiedFallbackPlacements,
4828
+ fallbackStrategy = 'bestFit',
4829
+ fallbackAxisSideDirection = 'none',
4830
+ flipAlignment = true,
4831
+ ...detectOverflowOptions
4832
+ } = options;
4833
+ const side = getSide(placement);
4834
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
4835
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
4836
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
4837
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
4838
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
4839
+ }
4840
+ const placements = [initialPlacement, ...fallbackPlacements];
4841
+ const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
4842
+ const overflows = [];
4843
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
4844
+ if (checkMainAxis) {
4845
+ overflows.push(overflow[side]);
4846
+ }
4847
+ if (checkCrossAxis) {
4848
+ const {
4849
+ main,
4850
+ cross
4851
+ } = getAlignmentSides(placement, rects, rtl);
4852
+ overflows.push(overflow[main], overflow[cross]);
4853
+ }
4854
+ overflowsData = [...overflowsData, {
4855
+ placement,
4856
+ overflows
4857
+ }];
4858
+
4859
+ // One or more sides is overflowing.
4860
+ if (!overflows.every(side => side <= 0)) {
4861
+ var _middlewareData$flip2, _overflowsData$filter;
4862
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
4863
+ const nextPlacement = placements[nextIndex];
4864
+ if (nextPlacement) {
4865
+ // Try next placement and re-run the lifecycle.
4866
+ return {
4867
+ data: {
4868
+ index: nextIndex,
4869
+ overflows: overflowsData
4870
+ },
4871
+ reset: {
4872
+ placement: nextPlacement
4873
+ }
4874
+ };
4875
+ }
4876
+
4877
+ // First, find the candidates that fit on the mainAxis side of overflow,
4878
+ // then find the placement that fits the best on the main crossAxis side.
4879
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
4880
+
4881
+ // Otherwise fallback.
4882
+ if (!resetPlacement) {
4883
+ switch (fallbackStrategy) {
4884
+ case 'bestFit':
4885
+ {
4886
+ var _overflowsData$map$so;
4887
+ const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
4888
+ if (placement) {
4889
+ resetPlacement = placement;
4890
+ }
4891
+ break;
4892
+ }
4893
+ case 'initialPlacement':
4894
+ resetPlacement = initialPlacement;
4895
+ break;
4896
+ }
4897
+ }
4898
+ if (placement !== resetPlacement) {
4899
+ return {
4900
+ reset: {
4901
+ placement: resetPlacement
4902
+ }
4903
+ };
4904
+ }
4905
+ }
4906
+ return {};
4907
+ }
4908
+ };
4909
+ };
4910
+ function getCrossAxis(axis) {
4911
+ return axis === 'x' ? 'y' : 'x';
4912
+ }
4913
+
4914
+ /**
4915
+ * A visibility optimizer that shifts the floating element along the specified
4916
+ * axes in order to keep it in view.
4917
+ * @see https://floating-ui.com/docs/shift
4918
+ */
4919
+ const shift = function (options) {
4920
+ if (options === void 0) {
4921
+ options = {};
4922
+ }
4923
+ return {
4924
+ name: 'shift',
4925
+ options,
4926
+ async fn(middlewareArguments) {
4927
+ const {
4928
+ x,
4929
+ y,
4930
+ placement
4931
+ } = middlewareArguments;
4932
+ const {
4933
+ mainAxis: checkMainAxis = true,
4934
+ crossAxis: checkCrossAxis = false,
4935
+ limiter = {
4936
+ fn: _ref => {
4937
+ let {
4938
+ x,
4939
+ y
4940
+ } = _ref;
4941
+ return {
4942
+ x,
4943
+ y
4944
+ };
4945
+ }
4946
+ },
4947
+ ...detectOverflowOptions
4948
+ } = options;
4949
+ const coords = {
4950
+ x,
4951
+ y
4952
+ };
4953
+ const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
4954
+ const mainAxis = getMainAxisFromPlacement(getSide(placement));
4955
+ const crossAxis = getCrossAxis(mainAxis);
4956
+ let mainAxisCoord = coords[mainAxis];
4957
+ let crossAxisCoord = coords[crossAxis];
4958
+ if (checkMainAxis) {
4959
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
4960
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
4961
+ const min = mainAxisCoord + overflow[minSide];
4962
+ const max = mainAxisCoord - overflow[maxSide];
4963
+ mainAxisCoord = within(min, mainAxisCoord, max);
4964
+ }
4965
+ if (checkCrossAxis) {
4966
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
4967
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
4968
+ const min = crossAxisCoord + overflow[minSide];
4969
+ const max = crossAxisCoord - overflow[maxSide];
4970
+ crossAxisCoord = within(min, crossAxisCoord, max);
4971
+ }
4972
+ const limitedCoords = limiter.fn({
4973
+ ...middlewareArguments,
4974
+ [mainAxis]: mainAxisCoord,
4975
+ [crossAxis]: crossAxisCoord
4976
+ });
4977
+ return {
4978
+ ...limitedCoords,
4979
+ data: {
4980
+ x: limitedCoords.x - x,
4981
+ y: limitedCoords.y - y
4982
+ }
4983
+ };
4984
+ }
4985
+ };
4986
+ };
4987
+
4988
+ /**
4989
+ * Provides data to change the size of the floating element. For instance,
4990
+ * prevent it from overflowing its clipping boundary or match the width of the
4991
+ * reference element.
4992
+ * @see https://floating-ui.com/docs/size
4993
+ */
4994
+ const size = function (options) {
4995
+ if (options === void 0) {
4996
+ options = {};
4997
+ }
4998
+ return {
4999
+ name: 'size',
5000
+ options,
5001
+ async fn(middlewareArguments) {
5002
+ const {
5003
+ placement,
5004
+ rects,
5005
+ platform,
5006
+ elements
5007
+ } = middlewareArguments;
5008
+ const {
5009
+ apply = () => {},
5010
+ ...detectOverflowOptions
5011
+ } = options;
5012
+ const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
5013
+ const side = getSide(placement);
5014
+ const alignment = getAlignment(placement);
5015
+ const axis = getMainAxisFromPlacement(placement);
5016
+ const isXAxis = axis === 'x';
5017
+ const {
5018
+ width,
5019
+ height
5020
+ } = rects.floating;
5021
+ let heightSide;
5022
+ let widthSide;
5023
+ if (side === 'top' || side === 'bottom') {
5024
+ heightSide = side;
5025
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
5026
+ } else {
5027
+ widthSide = side;
5028
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
5029
+ }
5030
+ const overflowAvailableHeight = height - overflow[heightSide];
5031
+ const overflowAvailableWidth = width - overflow[widthSide];
5032
+ let availableHeight = overflowAvailableHeight;
5033
+ let availableWidth = overflowAvailableWidth;
5034
+ if (isXAxis) {
5035
+ availableWidth = min$1(
5036
+ // Maximum clipping viewport width
5037
+ width - overflow.right - overflow.left, overflowAvailableWidth);
5038
+ } else {
5039
+ availableHeight = min$1(
5040
+ // Maximum clipping viewport height
5041
+ height - overflow.bottom - overflow.top, overflowAvailableHeight);
5042
+ }
5043
+ if (!middlewareArguments.middlewareData.shift && !alignment) {
5044
+ const xMin = max$1(overflow.left, 0);
5045
+ const xMax = max$1(overflow.right, 0);
5046
+ const yMin = max$1(overflow.top, 0);
5047
+ const yMax = max$1(overflow.bottom, 0);
5048
+ if (isXAxis) {
5049
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max$1(overflow.left, overflow.right));
5050
+ } else {
5051
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$1(overflow.top, overflow.bottom));
5052
+ }
5053
+ }
5054
+ await apply({
5055
+ ...middlewareArguments,
5056
+ availableWidth,
5057
+ availableHeight
5058
+ });
5059
+ const nextDimensions = await platform.getDimensions(elements.floating);
5060
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
5061
+ return {
5062
+ reset: {
5063
+ rects: true
5064
+ }
5065
+ };
5066
+ }
5067
+ return {};
5068
+ }
5069
+ };
5070
+ };
5071
+
5072
+ function getWindow(node) {
5073
+ var _node$ownerDocument;
5074
+ return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
5075
+ }
5076
+ function getComputedStyle$1(element) {
5077
+ return getWindow(element).getComputedStyle(element);
5078
+ }
5079
+ const min = Math.min;
5080
+ const max = Math.max;
5081
+ const round = Math.round;
5082
+ function getCssDimensions(element) {
5083
+ const css = getComputedStyle$1(element);
5084
+ let width = parseFloat(css.width);
5085
+ let height = parseFloat(css.height);
5086
+ const offsetWidth = element.offsetWidth;
5087
+ const offsetHeight = element.offsetHeight;
5088
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
5089
+ if (shouldFallback) {
5090
+ width = offsetWidth;
5091
+ height = offsetHeight;
5092
+ }
5093
+ return {
5094
+ width,
5095
+ height,
5096
+ fallback: shouldFallback
5097
+ };
5098
+ }
5099
+ function getNodeName(node) {
5100
+ return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
5101
+ }
5102
+ let uaString;
5103
+ function getUAString() {
5104
+ if (uaString) {
5105
+ return uaString;
5106
+ }
5107
+ const uaData = navigator.userAgentData;
5108
+ if (uaData && Array.isArray(uaData.brands)) {
5109
+ uaString = uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
5110
+ return uaString;
5111
+ }
5112
+ return navigator.userAgent;
5113
+ }
5114
+ function isHTMLElement(value) {
5115
+ return value instanceof getWindow(value).HTMLElement;
5116
+ }
5117
+ function isElement(value) {
5118
+ return value instanceof getWindow(value).Element;
5119
+ }
5120
+ function isNode(value) {
5121
+ return value instanceof getWindow(value).Node;
5122
+ }
5123
+ function isShadowRoot(node) {
5124
+ // Browsers without `ShadowRoot` support.
5125
+ if (typeof ShadowRoot === 'undefined') {
5126
+ return false;
5127
+ }
5128
+ const OwnElement = getWindow(node).ShadowRoot;
5129
+ return node instanceof OwnElement || node instanceof ShadowRoot;
5130
+ }
5131
+ function isOverflowElement(element) {
5132
+ const {
5133
+ overflow,
5134
+ overflowX,
5135
+ overflowY,
5136
+ display
5137
+ } = getComputedStyle$1(element);
5138
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
5139
+ }
5140
+ function isTableElement(element) {
5141
+ return ['table', 'td', 'th'].includes(getNodeName(element));
5142
+ }
5143
+ function isContainingBlock(element) {
5144
+ // TODO: Try to use feature detection here instead.
5145
+ const isFirefox = /firefox/i.test(getUAString());
5146
+ const css = getComputedStyle$1(element);
5147
+ const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
5148
+
5149
+ // This is non-exhaustive but covers the most common CSS properties that
5150
+ // create a containing block.
5151
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
5152
+ return css.transform !== 'none' || css.perspective !== 'none' || (backdropFilter ? backdropFilter !== 'none' : false) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective'].some(value => css.willChange.includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => {
5153
+ // Add type check for old browsers.
5154
+ const contain = css.contain;
5155
+ return contain != null ? contain.includes(value) : false;
5156
+ });
5157
+ }
5158
+
5159
+ /**
5160
+ * Determines whether or not `.getBoundingClientRect()` is affected by visual
5161
+ * viewport offsets. In Safari, the `x`/`y` offsets are values relative to the
5162
+ * visual viewport, while in other engines, they are values relative to the
5163
+ * layout viewport.
5164
+ */
5165
+ function isClientRectVisualViewportBased() {
5166
+ // TODO: Try to use feature detection here instead. Feature detection for
5167
+ // this can fail in various ways, making the userAgent check the most
5168
+ // reliable:
5169
+ // • Always-visible scrollbar or not
5170
+ // • Width of <html>
5171
+
5172
+ // Is Safari.
5173
+ return /^((?!chrome|android).)*safari/i.test(getUAString());
5174
+ }
5175
+ function isLastTraversableNode(node) {
5176
+ return ['html', 'body', '#document'].includes(getNodeName(node));
5177
+ }
5178
+ function unwrapElement(element) {
5179
+ return !isElement(element) ? element.contextElement : element;
5180
+ }
5181
+ const FALLBACK_SCALE = {
5182
+ x: 1,
5183
+ y: 1
5184
+ };
5185
+ function getScale(element) {
5186
+ const domElement = unwrapElement(element);
5187
+ if (!isHTMLElement(domElement)) {
5188
+ return FALLBACK_SCALE;
5189
+ }
5190
+ const rect = domElement.getBoundingClientRect();
5191
+ const {
5192
+ width,
5193
+ height,
5194
+ fallback
5195
+ } = getCssDimensions(domElement);
5196
+ let x = (fallback ? round(rect.width) : rect.width) / width;
5197
+ let y = (fallback ? round(rect.height) : rect.height) / height;
5198
+
5199
+ // 0, NaN, or Infinity should always fallback to 1.
5200
+
5201
+ if (!x || !Number.isFinite(x)) {
5202
+ x = 1;
5203
+ }
5204
+ if (!y || !Number.isFinite(y)) {
5205
+ y = 1;
5206
+ }
5207
+ return {
5208
+ x,
5209
+ y
5210
+ };
5211
+ }
5212
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
5213
+ var _win$visualViewport, _win$visualViewport2;
5214
+ if (includeScale === void 0) {
5215
+ includeScale = false;
5216
+ }
5217
+ if (isFixedStrategy === void 0) {
5218
+ isFixedStrategy = false;
5219
+ }
5220
+ const clientRect = element.getBoundingClientRect();
5221
+ const domElement = unwrapElement(element);
5222
+ let scale = FALLBACK_SCALE;
5223
+ if (includeScale) {
5224
+ if (offsetParent) {
5225
+ if (isElement(offsetParent)) {
5226
+ scale = getScale(offsetParent);
5227
+ }
5228
+ } else {
5229
+ scale = getScale(element);
5230
+ }
5231
+ }
5232
+ const win = domElement ? getWindow(domElement) : window;
5233
+ const addVisualOffsets = isClientRectVisualViewportBased() && isFixedStrategy;
5234
+ let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale.x;
5235
+ let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale.y;
5236
+ let width = clientRect.width / scale.x;
5237
+ let height = clientRect.height / scale.y;
5238
+ if (domElement) {
5239
+ const win = getWindow(domElement);
5240
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
5241
+ let currentIFrame = win.frameElement;
5242
+ while (currentIFrame && offsetParent && offsetWin !== win) {
5243
+ const iframeScale = getScale(currentIFrame);
5244
+ const iframeRect = currentIFrame.getBoundingClientRect();
5245
+ const css = getComputedStyle(currentIFrame);
5246
+ iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
5247
+ iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
5248
+ x *= iframeScale.x;
5249
+ y *= iframeScale.y;
5250
+ width *= iframeScale.x;
5251
+ height *= iframeScale.y;
5252
+ x += iframeRect.x;
5253
+ y += iframeRect.y;
5254
+ currentIFrame = getWindow(currentIFrame).frameElement;
5255
+ }
5256
+ }
5257
+ return {
5258
+ width,
5259
+ height,
5260
+ top: y,
5261
+ right: x + width,
5262
+ bottom: y + height,
5263
+ left: x,
5264
+ x,
5265
+ y
5266
+ };
5267
+ }
5268
+ function getDocumentElement(node) {
5269
+ return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
5270
+ }
5271
+ function getNodeScroll(element) {
5272
+ if (isElement(element)) {
5273
+ return {
5274
+ scrollLeft: element.scrollLeft,
5275
+ scrollTop: element.scrollTop
5276
+ };
5277
+ }
5278
+ return {
5279
+ scrollLeft: element.pageXOffset,
5280
+ scrollTop: element.pageYOffset
5281
+ };
5282
+ }
5283
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
5284
+ let {
5285
+ rect,
5286
+ offsetParent,
5287
+ strategy
5288
+ } = _ref;
5289
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
5290
+ const documentElement = getDocumentElement(offsetParent);
5291
+ if (offsetParent === documentElement) {
5292
+ return rect;
5293
+ }
5294
+ let scroll = {
5295
+ scrollLeft: 0,
5296
+ scrollTop: 0
5297
+ };
5298
+ let scale = {
5299
+ x: 1,
5300
+ y: 1
5301
+ };
5302
+ const offsets = {
5303
+ x: 0,
5304
+ y: 0
5305
+ };
5306
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
5307
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
5308
+ scroll = getNodeScroll(offsetParent);
5309
+ }
5310
+ if (isHTMLElement(offsetParent)) {
5311
+ const offsetRect = getBoundingClientRect(offsetParent);
5312
+ scale = getScale(offsetParent);
5313
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
5314
+ offsets.y = offsetRect.y + offsetParent.clientTop;
5315
+ }
5316
+ }
5317
+ return {
5318
+ width: rect.width * scale.x,
5319
+ height: rect.height * scale.y,
5320
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
5321
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
5322
+ };
5323
+ }
5324
+ function getWindowScrollBarX(element) {
5325
+ // If <html> has a CSS width greater than the viewport, then this will be
5326
+ // incorrect for RTL.
5327
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
5328
+ }
5329
+
5330
+ // Gets the entire size of the scrollable document area, even extending outside
5331
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
5332
+ function getDocumentRect(element) {
5333
+ const html = getDocumentElement(element);
5334
+ const scroll = getNodeScroll(element);
5335
+ const body = element.ownerDocument.body;
5336
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
5337
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
5338
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
5339
+ const y = -scroll.scrollTop;
5340
+ if (getComputedStyle$1(body).direction === 'rtl') {
5341
+ x += max(html.clientWidth, body.clientWidth) - width;
5342
+ }
5343
+ return {
5344
+ width,
5345
+ height,
5346
+ x,
5347
+ y
5348
+ };
5349
+ }
5350
+ function getParentNode(node) {
5351
+ if (getNodeName(node) === 'html') {
5352
+ return node;
5353
+ }
5354
+ const result =
5355
+ // Step into the shadow DOM of the parent of a slotted node.
5356
+ node.assignedSlot ||
5357
+ // DOM Element detected.
5358
+ node.parentNode ||
5359
+ // ShadowRoot detected.
5360
+ isShadowRoot(node) && node.host ||
5361
+ // Fallback.
5362
+ getDocumentElement(node);
5363
+ return isShadowRoot(result) ? result.host : result;
5364
+ }
5365
+ function getNearestOverflowAncestor(node) {
5366
+ const parentNode = getParentNode(node);
5367
+ if (isLastTraversableNode(parentNode)) {
5368
+ // `getParentNode` will never return a `Document` due to the fallback
5369
+ // check, so it's either the <html> or <body> element.
5370
+ return parentNode.ownerDocument.body;
5371
+ }
5372
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
5373
+ return parentNode;
5374
+ }
5375
+ return getNearestOverflowAncestor(parentNode);
5376
+ }
5377
+ function getOverflowAncestors(node, list) {
5378
+ var _node$ownerDocument;
5379
+ if (list === void 0) {
5380
+ list = [];
5381
+ }
5382
+ const scrollableAncestor = getNearestOverflowAncestor(node);
5383
+ const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
5384
+ const win = getWindow(scrollableAncestor);
5385
+ if (isBody) {
5386
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
5387
+ }
5388
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
5389
+ }
5390
+ function getViewportRect(element, strategy) {
5391
+ const win = getWindow(element);
5392
+ const html = getDocumentElement(element);
5393
+ const visualViewport = win.visualViewport;
5394
+ let width = html.clientWidth;
5395
+ let height = html.clientHeight;
5396
+ let x = 0;
5397
+ let y = 0;
5398
+ if (visualViewport) {
5399
+ width = visualViewport.width;
5400
+ height = visualViewport.height;
5401
+ const visualViewportBased = isClientRectVisualViewportBased();
5402
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
5403
+ x = visualViewport.offsetLeft;
5404
+ y = visualViewport.offsetTop;
5405
+ }
5406
+ }
5407
+ return {
5408
+ width,
5409
+ height,
5410
+ x,
5411
+ y
5412
+ };
5413
+ }
5414
+
5415
+ // Returns the inner client rect, subtracting scrollbars if present.
5416
+ function getInnerBoundingClientRect(element, strategy) {
5417
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
5418
+ const top = clientRect.top + element.clientTop;
5419
+ const left = clientRect.left + element.clientLeft;
5420
+ const scale = isHTMLElement(element) ? getScale(element) : {
5421
+ x: 1,
5422
+ y: 1
5423
+ };
5424
+ const width = element.clientWidth * scale.x;
5425
+ const height = element.clientHeight * scale.y;
5426
+ const x = left * scale.x;
5427
+ const y = top * scale.y;
5428
+ return {
5429
+ width,
5430
+ height,
5431
+ x,
5432
+ y
5433
+ };
5434
+ }
5435
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
5436
+ let rect;
5437
+ if (clippingAncestor === 'viewport') {
5438
+ rect = getViewportRect(element, strategy);
5439
+ } else if (clippingAncestor === 'document') {
5440
+ rect = getDocumentRect(getDocumentElement(element));
5441
+ } else if (isElement(clippingAncestor)) {
5442
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
5443
+ } else {
5444
+ const mutableRect = {
5445
+ ...clippingAncestor
5446
+ };
5447
+ if (isClientRectVisualViewportBased()) {
5448
+ var _win$visualViewport, _win$visualViewport2;
5449
+ const win = getWindow(element);
5450
+ mutableRect.x -= ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0;
5451
+ mutableRect.y -= ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0;
5452
+ }
5453
+ rect = mutableRect;
5454
+ }
5455
+ return rectToClientRect(rect);
5456
+ }
5457
+
5458
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
5459
+ // clipping (or hiding) child elements. This returns all clipping ancestors
5460
+ // of the given element up the tree.
5461
+ function getClippingElementAncestors(element, cache) {
5462
+ const cachedResult = cache.get(element);
5463
+ if (cachedResult) {
5464
+ return cachedResult;
5465
+ }
5466
+ let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
5467
+ let currentContainingBlockComputedStyle = null;
5468
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
5469
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
5470
+
5471
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
5472
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
5473
+ const computedStyle = getComputedStyle$1(currentNode);
5474
+ const containingBlock = isContainingBlock(currentNode);
5475
+ const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position);
5476
+ if (shouldDropCurrentNode) {
5477
+ // Drop non-containing blocks.
5478
+ result = result.filter(ancestor => ancestor !== currentNode);
5479
+ } else {
5480
+ // Record last containing block for next iteration.
5481
+ currentContainingBlockComputedStyle = computedStyle;
5482
+ }
5483
+ currentNode = getParentNode(currentNode);
5484
+ }
5485
+ cache.set(element, result);
5486
+ return result;
5487
+ }
5488
+
5489
+ // Gets the maximum area that the element is visible in due to any number of
5490
+ // clipping ancestors.
5491
+ function getClippingRect(_ref) {
5492
+ let {
5493
+ element,
5494
+ boundary,
5495
+ rootBoundary,
5496
+ strategy
5497
+ } = _ref;
5498
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
5499
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
5500
+ const firstClippingAncestor = clippingAncestors[0];
5501
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
5502
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
5503
+ accRect.top = max(rect.top, accRect.top);
5504
+ accRect.right = min(rect.right, accRect.right);
5505
+ accRect.bottom = min(rect.bottom, accRect.bottom);
5506
+ accRect.left = max(rect.left, accRect.left);
5507
+ return accRect;
5508
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
5509
+ return {
5510
+ width: clippingRect.right - clippingRect.left,
5511
+ height: clippingRect.bottom - clippingRect.top,
5512
+ x: clippingRect.left,
5513
+ y: clippingRect.top
5514
+ };
5515
+ }
5516
+ function getDimensions(element) {
5517
+ if (isHTMLElement(element)) {
5518
+ return getCssDimensions(element);
5519
+ }
5520
+ return element.getBoundingClientRect();
5521
+ }
5522
+ function getTrueOffsetParent(element, polyfill) {
5523
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
5524
+ return null;
5525
+ }
5526
+ if (polyfill) {
5527
+ return polyfill(element);
5528
+ }
5529
+ return element.offsetParent;
5530
+ }
5531
+ function getContainingBlock(element) {
5532
+ let currentNode = getParentNode(element);
5533
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
5534
+ if (isContainingBlock(currentNode)) {
5535
+ return currentNode;
5536
+ } else {
5537
+ currentNode = getParentNode(currentNode);
5538
+ }
5539
+ }
5540
+ return null;
5541
+ }
5542
+
5543
+ // Gets the closest ancestor positioned element. Handles some edge cases,
5544
+ // such as table ancestors and cross browser bugs.
5545
+ function getOffsetParent(element, polyfill) {
5546
+ const window = getWindow(element);
5547
+ let offsetParent = getTrueOffsetParent(element, polyfill);
5548
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
5549
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
5550
+ }
5551
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
5552
+ return window;
5553
+ }
5554
+ return offsetParent || getContainingBlock(element) || window;
5555
+ }
5556
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
5557
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
5558
+ const documentElement = getDocumentElement(offsetParent);
5559
+ const rect = getBoundingClientRect(element, true, strategy === 'fixed', offsetParent);
5560
+ let scroll = {
5561
+ scrollLeft: 0,
5562
+ scrollTop: 0
5563
+ };
5564
+ const offsets = {
5565
+ x: 0,
5566
+ y: 0
5567
+ };
5568
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
5569
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
5570
+ scroll = getNodeScroll(offsetParent);
5571
+ }
5572
+ if (isHTMLElement(offsetParent)) {
5573
+ const offsetRect = getBoundingClientRect(offsetParent, true);
5574
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
5575
+ offsets.y = offsetRect.y + offsetParent.clientTop;
5576
+ } else if (documentElement) {
5577
+ offsets.x = getWindowScrollBarX(documentElement);
5578
+ }
5579
+ }
5580
+ return {
5581
+ x: rect.left + scroll.scrollLeft - offsets.x,
5582
+ y: rect.top + scroll.scrollTop - offsets.y,
5583
+ width: rect.width,
5584
+ height: rect.height
5585
+ };
5586
+ }
5587
+ const platform = {
5588
+ getClippingRect,
5589
+ convertOffsetParentRelativeRectToViewportRelativeRect,
5590
+ isElement,
5591
+ getDimensions,
5592
+ getOffsetParent,
5593
+ getDocumentElement,
5594
+ getScale,
5595
+ async getElementRects(_ref) {
5596
+ let {
5597
+ reference,
5598
+ floating,
5599
+ strategy
5600
+ } = _ref;
5601
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
5602
+ const getDimensionsFn = this.getDimensions;
5603
+ return {
5604
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
5605
+ floating: {
5606
+ x: 0,
5607
+ y: 0,
5608
+ ...(await getDimensionsFn(floating))
5609
+ }
5610
+ };
5611
+ },
5612
+ getClientRects: element => Array.from(element.getClientRects()),
5613
+ isRTL: element => getComputedStyle$1(element).direction === 'rtl'
5614
+ };
5615
+
5616
+ /**
5617
+ * Automatically updates the position of the floating element when necessary.
5618
+ * @see https://floating-ui.com/docs/autoUpdate
5619
+ */
5620
+ function autoUpdate(reference, floating, update, options) {
5621
+ if (options === void 0) {
5622
+ options = {};
5623
+ }
5624
+ const {
5625
+ ancestorScroll: _ancestorScroll = true,
5626
+ ancestorResize = true,
5627
+ elementResize = true,
5628
+ animationFrame = false
5629
+ } = options;
5630
+ const ancestorScroll = _ancestorScroll && !animationFrame;
5631
+ const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : []), ...getOverflowAncestors(floating)] : [];
5632
+ ancestors.forEach(ancestor => {
5633
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
5634
+ passive: true
5635
+ });
5636
+ ancestorResize && ancestor.addEventListener('resize', update);
5637
+ });
5638
+ let observer = null;
5639
+ if (elementResize) {
5640
+ let initialUpdate = true;
5641
+ observer = new ResizeObserver(() => {
5642
+ if (!initialUpdate) {
5643
+ update();
5644
+ }
5645
+ initialUpdate = false;
5646
+ });
5647
+ isElement(reference) && !animationFrame && observer.observe(reference);
5648
+ if (!isElement(reference) && reference.contextElement && !animationFrame) {
5649
+ observer.observe(reference.contextElement);
5650
+ }
5651
+ observer.observe(floating);
5652
+ }
5653
+ let frameId;
5654
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
5655
+ if (animationFrame) {
5656
+ frameLoop();
5657
+ }
5658
+ function frameLoop() {
5659
+ const nextRefRect = getBoundingClientRect(reference);
5660
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
5661
+ update();
5662
+ }
5663
+ prevRefRect = nextRefRect;
5664
+ frameId = requestAnimationFrame(frameLoop);
5665
+ }
5666
+ update();
5667
+ return () => {
5668
+ var _observer;
5669
+ ancestors.forEach(ancestor => {
5670
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
5671
+ ancestorResize && ancestor.removeEventListener('resize', update);
5672
+ });
5673
+ (_observer = observer) == null ? void 0 : _observer.disconnect();
5674
+ observer = null;
5675
+ if (animationFrame) {
5676
+ cancelAnimationFrame(frameId);
5677
+ }
5678
+ };
5679
+ }
5680
+
5681
+ /**
5682
+ * Computes the `x` and `y` coordinates that will place the floating element
5683
+ * next to a reference element when it is given a certain CSS positioning
5684
+ * strategy.
5685
+ */
5686
+ const computePosition = (reference, floating, options) => {
5687
+ // This caches the expensive `getClippingElementAncestors` function so that
5688
+ // multiple lifecycle resets re-use the same result. It only lives for a
5689
+ // single call. If other functions become expensive, we can add them as well.
5690
+ const cache = new Map();
5691
+ const mergedOptions = {
5692
+ platform,
5693
+ ...options
5694
+ };
5695
+ const platformWithCache = {
5696
+ ...mergedOptions.platform,
5697
+ _c: cache
5698
+ };
5699
+ return computePosition$1(reference, floating, {
5700
+ ...mergedOptions,
5701
+ platform: platformWithCache
5702
+ });
5703
+ };
5704
+
4424
5705
  class DerivedValueEvaluator {
4425
5706
  constructor(value) {
4426
5707
  this.value = value;
@@ -5316,57 +6597,609 @@ FASTDesignTokenNode.cache = new WeakMap();
5316
6597
  */
5317
6598
  const DividerRole = {
5318
6599
  /**
5319
- * The divider semantically separates content
6600
+ * The divider semantically separates content
6601
+ */
6602
+ separator: "separator",
6603
+ /**
6604
+ * The divider has no semantic value and is for visual presentation only.
6605
+ */
6606
+ presentation: "presentation"
6607
+ };
6608
+ /**
6609
+ * Divider orientation
6610
+ * @public
6611
+ */
6612
+ const DividerOrientation = Orientation;
6613
+
6614
+ /**
6615
+ * The template for the {@link @microsoft/fast-foundation#FASTDivider} component.
6616
+ * @public
6617
+ */
6618
+ function dividerTemplate() {
6619
+ return html`<template role="${x => x.role}" aria-orientation="${x => x.orientation}"><slot></slot></template>`;
6620
+ }
6621
+
6622
+ /**
6623
+ * A Divider Custom HTML Element.
6624
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
6625
+ *
6626
+ * @public
6627
+ */
6628
+ class FASTDivider extends FASTElement {
6629
+ constructor() {
6630
+ super(...arguments);
6631
+ /**
6632
+ * The role of the element.
6633
+ *
6634
+ * @public
6635
+ * @remarks
6636
+ * HTML Attribute: role
6637
+ */
6638
+ this.role = DividerRole.separator;
6639
+ /**
6640
+ * The orientation of the divider.
6641
+ *
6642
+ * @public
6643
+ * @remarks
6644
+ * HTML Attribute: orientation
6645
+ */
6646
+ this.orientation = DividerOrientation.horizontal;
6647
+ }
6648
+ }
6649
+ __decorate([attr], FASTDivider.prototype, "role", void 0);
6650
+ __decorate([attr], FASTDivider.prototype, "orientation", void 0);
6651
+
6652
+ /**
6653
+ * Menu items roles.
6654
+ * @public
6655
+ */
6656
+ const MenuItemRole = {
6657
+ /**
6658
+ * The menu item has a "menuitem" role
6659
+ */
6660
+ menuitem: "menuitem",
6661
+ /**
6662
+ * The menu item has a "menuitemcheckbox" role
6663
+ */
6664
+ menuitemcheckbox: "menuitemcheckbox",
6665
+ /**
6666
+ * The menu item has a "menuitemradio" role
6667
+ */
6668
+ menuitemradio: "menuitemradio"
6669
+ };
6670
+
6671
+ /**
6672
+ * Generates a template for the {@link @microsoft/fast-foundation#(FASTMenuItem:class)} component using
6673
+ * the provided prefix.
6674
+ *
6675
+ * @public
6676
+ */
6677
+ function menuItemTemplate(options = {}) {
6678
+ return html`<template aria-haspopup="${x => x.hasSubmenu ? "menu" : void 0}" aria-checked="${x => x.role !== MenuItemRole.menuitem ? x.checked : void 0}" aria-disabled="${x => x.disabled}" aria-expanded="${x => x.expanded}" @keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}" @click="${(x, c) => x.handleMenuItemClick(c.event)}" @mouseover="${(x, c) => x.handleMouseOver(c.event)}" @mouseout="${(x, c) => x.handleMouseOut(c.event)}">${when(x => x.role === MenuItemRole.menuitemcheckbox, html`<div part="input-container" class="input-container"><span part="checkbox" class="checkbox"><slot name="checkbox-indicator">${staticallyCompose(options.checkboxIndicator)}</slot></span></div>`)} ${when(x => x.role === MenuItemRole.menuitemradio, html`<div part="input-container" class="input-container"><span part="radio" class="radio"><slot name="radio-indicator">${staticallyCompose(options.radioIndicator)}</slot></span></div>`)}</div>${startSlotTemplate(options)}<span class="content" part="content"><slot></slot></span>${endSlotTemplate(options)} ${when(x => x.hasSubmenu, html`<div part="expand-collapse-glyph-container" class="expand-collapse-glyph-container"><span part="expand-collapse" class="expand-collapse"><slot name="expand-collapse-indicator">${staticallyCompose(options.expandCollapseGlyph)}</slot></span></div>`)}<span ?hidden="${x => !x.expanded}" class="submenu-container" part="submenu-container" ${ref("submenuContainer")}><slot name="submenu" ${slotted({
6679
+ property: "slottedSubmenu",
6680
+ filter: elements("[role='menu']")
6681
+ })}></slot></span></template>`;
6682
+ }
6683
+
6684
+ /**
6685
+ * A Switch Custom HTML Element.
6686
+ * 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 }.
6687
+ *
6688
+ * @slot checked-indicator - The checked indicator
6689
+ * @slot radio-indicator - The radio indicator
6690
+ * @slot start - Content which can be provided before the menu item content
6691
+ * @slot end - Content which can be provided after the menu item content
6692
+ * @slot - The default slot for menu item content
6693
+ * @slot expand-collapse-indicator - The expand/collapse indicator
6694
+ * @slot submenu - Used to nest menu's within menu items
6695
+ * @csspart input-container - The element representing the visual checked or radio indicator
6696
+ * @csspart checkbox - The element wrapping the `menuitemcheckbox` indicator
6697
+ * @csspart radio - The element wrapping the `menuitemradio` indicator
6698
+ * @csspart content - The element wrapping the menu item content
6699
+ * @csspart expand-collapse-glyph-container - The element wrapping the expand collapse element
6700
+ * @csspart expand-collapse - The expand/collapse element
6701
+ * @csspart submenu-region - The container for the submenu, used for positioning
6702
+ * @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes
6703
+ * @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked
6704
+ *
6705
+ * @public
6706
+ */
6707
+ class FASTMenuItem extends FASTElement {
6708
+ constructor() {
6709
+ super(...arguments);
6710
+ /**
6711
+ * The role of the element.
6712
+ *
6713
+ * @public
6714
+ * @remarks
6715
+ * HTML Attribute: role
6716
+ */
6717
+ this.role = MenuItemRole.menuitem;
6718
+ /**
6719
+ * The checked value of the element.
6720
+ *
6721
+ * @public
6722
+ * @remarks
6723
+ * HTML Attribute: checked
6724
+ */
6725
+ this.checked = false;
6726
+ this.focusSubmenuOnLoad = false;
6727
+ /**
6728
+ * @internal
6729
+ */
6730
+ this.handleMenuItemKeyDown = e => {
6731
+ if (e.defaultPrevented) {
6732
+ return false;
6733
+ }
6734
+ switch (e.key) {
6735
+ case keyEnter:
6736
+ case keySpace:
6737
+ this.invoke();
6738
+ return false;
6739
+ case keyArrowRight:
6740
+ //open/focus on submenu
6741
+ this.expanded && this.submenu ? this.submenu.focus() : this.expandAndFocus();
6742
+ return false;
6743
+ case keyEscape:
6744
+ // close submenu
6745
+ if (this.expanded) {
6746
+ this.closeSubMenu();
6747
+ return false;
6748
+ }
6749
+ break;
6750
+ case keyArrowLeft:
6751
+ //close submenu
6752
+ if (this.expanded) {
6753
+ this.closeSubMenu();
6754
+ return false;
6755
+ }
6756
+ }
6757
+ return true;
6758
+ };
6759
+ /**
6760
+ * @internal
6761
+ */
6762
+ this.handleMenuItemClick = e => {
6763
+ if (e.defaultPrevented || this.disabled) {
6764
+ return false;
6765
+ }
6766
+ this.invoke();
6767
+ return false;
6768
+ };
6769
+ /**
6770
+ * @internal
6771
+ */
6772
+ this.submenuLoaded = () => {
6773
+ if (!this.focusSubmenuOnLoad) {
6774
+ return;
6775
+ }
6776
+ this.focusSubmenuOnLoad = false;
6777
+ if (this.submenu) {
6778
+ this.submenu.focus();
6779
+ this.setAttribute("tabindex", "-1");
6780
+ }
6781
+ };
6782
+ /**
6783
+ * @internal
6784
+ */
6785
+ this.handleMouseOver = e => {
6786
+ if (this.disabled || !this.hasSubmenu || this.expanded) {
6787
+ return false;
6788
+ }
6789
+ this.expanded = true;
6790
+ return false;
6791
+ };
6792
+ /**
6793
+ * @internal
6794
+ */
6795
+ this.handleMouseOut = e => {
6796
+ if (!this.expanded || this.contains(document.activeElement)) {
6797
+ return false;
6798
+ }
6799
+ this.expanded = false;
6800
+ return false;
6801
+ };
6802
+ /**
6803
+ * @internal
6804
+ */
6805
+ this.closeSubMenu = () => {
6806
+ // close submenu
6807
+ this.expanded = false;
6808
+ this.focus();
6809
+ };
6810
+ /**
6811
+ * @internal
6812
+ */
6813
+ this.expandAndFocus = () => {
6814
+ if (!this.hasSubmenu) {
6815
+ return;
6816
+ }
6817
+ this.focusSubmenuOnLoad = true;
6818
+ this.expanded = true;
6819
+ };
6820
+ /**
6821
+ * @internal
6822
+ */
6823
+ this.invoke = () => {
6824
+ if (this.disabled) {
6825
+ return;
6826
+ }
6827
+ switch (this.role) {
6828
+ case MenuItemRole.menuitemcheckbox:
6829
+ this.checked = !this.checked;
6830
+ break;
6831
+ case MenuItemRole.menuitem:
6832
+ if (this.hasSubmenu) {
6833
+ this.expandAndFocus();
6834
+ break;
6835
+ }
6836
+ this.$emit("change");
6837
+ break;
6838
+ case MenuItemRole.menuitemradio:
6839
+ if (!this.checked) {
6840
+ this.checked = true;
6841
+ }
6842
+ break;
6843
+ }
6844
+ };
6845
+ }
6846
+ expandedChanged(prev, next) {
6847
+ if (this.$fastController.isConnected) {
6848
+ if (next && this.submenu) {
6849
+ this.updateSubmenu();
6850
+ }
6851
+ this.$emit("expanded-change", this, {
6852
+ bubbles: false
6853
+ });
6854
+ }
6855
+ }
6856
+ checkedChanged(oldValue, newValue) {
6857
+ if (this.$fastController.isConnected) {
6858
+ this.$emit("change");
6859
+ }
6860
+ }
6861
+ /**
6862
+ * @internal
6863
+ */
6864
+ get hasSubmenu() {
6865
+ return !!this.submenu;
6866
+ }
6867
+ /**
6868
+ * Sets the submenu and updates its position.
6869
+ *
6870
+ * @internal
5320
6871
  */
5321
- separator: "separator",
6872
+ slottedSubmenuChanged(prev, next) {
6873
+ if (next.length) {
6874
+ this.submenu = next[0];
6875
+ this.updateSubmenu();
6876
+ }
6877
+ }
5322
6878
  /**
5323
- * The divider has no semantic value and is for visual presentation only.
6879
+ * @internal
5324
6880
  */
5325
- presentation: "presentation"
5326
- };
5327
- /**
5328
- * Divider orientation
5329
- * @public
5330
- */
5331
- const DividerOrientation = Orientation;
6881
+ disconnectedCallback() {
6882
+ var _a;
6883
+ (_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
6884
+ super.disconnectedCallback();
6885
+ }
6886
+ /**
6887
+ * Calculate and apply submenu positioning.
6888
+ *
6889
+ * @public
6890
+ */
6891
+ updateSubmenu() {
6892
+ var _a;
6893
+ (_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
6894
+ if (!this.submenu || !this.expanded) {
6895
+ return;
6896
+ }
6897
+ Updates.enqueue(() => {
6898
+ this.cleanup = autoUpdate(this, this.submenuContainer, () => __awaiter(this, void 0, void 0, function* () {
6899
+ const fallbackPlacements = ["left-start", "right-start"];
6900
+ const {
6901
+ x,
6902
+ y
6903
+ } = yield computePosition(this, this.submenuContainer, {
6904
+ middleware: [shift(), size({
6905
+ apply: ({
6906
+ availableWidth,
6907
+ rects
6908
+ }) => {
6909
+ if (availableWidth < rects.floating.width) {
6910
+ fallbackPlacements.push("bottom-end", "top-end");
6911
+ }
6912
+ }
6913
+ }), flip({
6914
+ fallbackPlacements
6915
+ })],
6916
+ placement: "right-start",
6917
+ strategy: "fixed"
6918
+ });
6919
+ Object.assign(this.submenuContainer.style, {
6920
+ left: `${x}px`,
6921
+ position: "fixed",
6922
+ top: `${y}px`
6923
+ });
6924
+ this.submenuLoaded();
6925
+ }));
6926
+ });
6927
+ }
6928
+ }
6929
+ __decorate([attr({
6930
+ mode: "boolean"
6931
+ })], FASTMenuItem.prototype, "disabled", void 0);
6932
+ __decorate([attr({
6933
+ mode: "boolean"
6934
+ })], FASTMenuItem.prototype, "expanded", void 0);
6935
+ __decorate([attr], FASTMenuItem.prototype, "role", void 0);
6936
+ __decorate([attr({
6937
+ mode: "boolean"
6938
+ })], FASTMenuItem.prototype, "checked", void 0);
6939
+ __decorate([attr({
6940
+ mode: "boolean"
6941
+ })], FASTMenuItem.prototype, "hidden", void 0);
6942
+ __decorate([observable], FASTMenuItem.prototype, "slottedSubmenu", void 0);
6943
+ __decorate([observable], FASTMenuItem.prototype, "submenu", void 0);
6944
+ applyMixins(FASTMenuItem, StartEnd);
5332
6945
 
5333
6946
  /**
5334
- * The template for the {@link @microsoft/fast-foundation#FASTDivider} component.
6947
+ * The template for the {@link @microsoft/fast-foundation#FASTMenu} component.
5335
6948
  * @public
5336
6949
  */
5337
- function dividerTemplate() {
5338
- return html`<template role="${x => x.role}" aria-orientation="${x => x.orientation}"><slot></slot></template>`;
6950
+ function menuTemplate() {
6951
+ return html`<template slot="${x => x.slot ? x.slot : x.isNestedMenu() ? "submenu" : void 0}" role="menu" @keydown="${(x, c) => x.handleMenuKeyDown(c.event)}" @focusout="${(x, c) => x.handleFocusOut(c.event)}"><slot ${slotted("items")}></slot></template>`;
5339
6952
  }
5340
6953
 
5341
6954
  /**
5342
- * A Divider Custom HTML Element.
5343
- * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
6955
+ * A Menu Custom HTML Element.
6956
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.
6957
+ *
6958
+ * @slot - The default slot for the menu items
5344
6959
  *
5345
6960
  * @public
5346
6961
  */
5347
- class FASTDivider extends FASTElement {
6962
+ class FASTMenu extends FASTElement {
5348
6963
  constructor() {
5349
6964
  super(...arguments);
6965
+ this.expandedItem = null;
5350
6966
  /**
5351
- * The role of the element.
5352
- *
5353
- * @public
5354
- * @remarks
5355
- * HTML Attribute: role
6967
+ * The index of the focusable element in the items array
6968
+ * defaults to -1
5356
6969
  */
5357
- this.role = DividerRole.separator;
6970
+ this.focusIndex = -1;
5358
6971
  /**
5359
- * The orientation of the divider.
5360
- *
5361
- * @public
5362
- * @remarks
5363
- * HTML Attribute: orientation
6972
+ * @internal
5364
6973
  */
5365
- this.orientation = DividerOrientation.horizontal;
6974
+ this.isNestedMenu = () => {
6975
+ return this.parentElement !== null && isHTMLElement$1(this.parentElement) && this.parentElement.getAttribute("role") === "menuitem";
6976
+ };
6977
+ /**
6978
+ * if focus is moving out of the menu, reset to a stable initial state
6979
+ * @internal
6980
+ */
6981
+ this.handleFocusOut = e => {
6982
+ if (!this.contains(e.relatedTarget) && this.menuItems !== undefined) {
6983
+ this.collapseExpandedItem();
6984
+ // find our first focusable element
6985
+ const focusIndex = this.menuItems.findIndex(this.isFocusableElement);
6986
+ // set the current focus index's tabindex to -1
6987
+ this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
6988
+ // set the first focusable element tabindex to 0
6989
+ this.menuItems[focusIndex].setAttribute("tabindex", "0");
6990
+ // set the focus index
6991
+ this.focusIndex = focusIndex;
6992
+ }
6993
+ };
6994
+ this.handleItemFocus = e => {
6995
+ const targetItem = e.target;
6996
+ if (this.menuItems !== undefined && targetItem !== this.menuItems[this.focusIndex]) {
6997
+ this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
6998
+ this.focusIndex = this.menuItems.indexOf(targetItem);
6999
+ targetItem.setAttribute("tabindex", "0");
7000
+ }
7001
+ };
7002
+ this.handleExpandedChanged = e => {
7003
+ if (e.defaultPrevented || e.target === null || this.menuItems === undefined || this.menuItems.indexOf(e.target) < 0) {
7004
+ return;
7005
+ }
7006
+ e.preventDefault();
7007
+ const changedItem = e.target;
7008
+ // closing an expanded item without opening another
7009
+ if (this.expandedItem !== null && changedItem === this.expandedItem && changedItem.expanded === false) {
7010
+ this.expandedItem = null;
7011
+ return;
7012
+ }
7013
+ if (changedItem.expanded) {
7014
+ if (this.expandedItem !== null && this.expandedItem !== changedItem) {
7015
+ this.expandedItem.expanded = false;
7016
+ }
7017
+ this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
7018
+ this.expandedItem = changedItem;
7019
+ this.focusIndex = this.menuItems.indexOf(changedItem);
7020
+ changedItem.setAttribute("tabindex", "0");
7021
+ }
7022
+ };
7023
+ /**
7024
+ * handle change from child element
7025
+ */
7026
+ this.changeHandler = e => {
7027
+ if (this.menuItems === undefined) {
7028
+ return;
7029
+ }
7030
+ const changedMenuItem = e.target;
7031
+ const changeItemIndex = this.menuItems.indexOf(changedMenuItem);
7032
+ if (changeItemIndex === -1) {
7033
+ return;
7034
+ }
7035
+ if (changedMenuItem.role === "menuitemradio" && changedMenuItem.checked === true) {
7036
+ for (let i = changeItemIndex - 1; i >= 0; --i) {
7037
+ const item = this.menuItems[i];
7038
+ const role = item.getAttribute("role");
7039
+ if (role === MenuItemRole.menuitemradio) {
7040
+ item.checked = false;
7041
+ }
7042
+ if (role === "separator") {
7043
+ break;
7044
+ }
7045
+ }
7046
+ const maxIndex = this.menuItems.length - 1;
7047
+ for (let i = changeItemIndex + 1; i <= maxIndex; ++i) {
7048
+ const item = this.menuItems[i];
7049
+ const role = item.getAttribute("role");
7050
+ if (role === MenuItemRole.menuitemradio) {
7051
+ item.checked = false;
7052
+ }
7053
+ if (role === "separator") {
7054
+ break;
7055
+ }
7056
+ }
7057
+ }
7058
+ };
7059
+ /**
7060
+ * check if the item is a menu item
7061
+ */
7062
+ this.isMenuItemElement = el => {
7063
+ return el instanceof FASTMenuItem || isHTMLElement$1(el) && el.getAttribute("role") in FASTMenu.focusableElementRoles;
7064
+ };
7065
+ /**
7066
+ * check if the item is focusable
7067
+ */
7068
+ this.isFocusableElement = el => {
7069
+ return this.isMenuItemElement(el);
7070
+ };
7071
+ }
7072
+ itemsChanged(oldValue, newValue) {
7073
+ // only update children after the component is connected and
7074
+ // the setItems has run on connectedCallback
7075
+ // (menuItems is undefined until then)
7076
+ if (this.$fastController.isConnected && this.menuItems !== undefined) {
7077
+ this.setItems();
7078
+ }
7079
+ }
7080
+ /**
7081
+ * @internal
7082
+ */
7083
+ connectedCallback() {
7084
+ super.connectedCallback();
7085
+ Updates.enqueue(() => {
7086
+ // wait until children have had a chance to
7087
+ // connect before setting/checking their props/attributes
7088
+ this.setItems();
7089
+ });
7090
+ this.addEventListener("change", this.changeHandler);
7091
+ }
7092
+ /**
7093
+ * @internal
7094
+ */
7095
+ disconnectedCallback() {
7096
+ super.disconnectedCallback();
7097
+ this.removeItemListeners();
7098
+ this.menuItems = undefined;
7099
+ this.removeEventListener("change", this.changeHandler);
7100
+ }
7101
+ /**
7102
+ * Focuses the first item in the menu.
7103
+ *
7104
+ * @public
7105
+ */
7106
+ focus() {
7107
+ this.setFocus(0, 1);
7108
+ }
7109
+ /**
7110
+ * Collapses any expanded menu items.
7111
+ *
7112
+ * @public
7113
+ */
7114
+ collapseExpandedItem() {
7115
+ if (this.expandedItem !== null) {
7116
+ this.expandedItem.expanded = false;
7117
+ this.expandedItem = null;
7118
+ }
7119
+ }
7120
+ /**
7121
+ * @internal
7122
+ */
7123
+ handleMenuKeyDown(e) {
7124
+ if (e.defaultPrevented || this.menuItems === undefined) {
7125
+ return;
7126
+ }
7127
+ switch (e.key) {
7128
+ case keyArrowDown:
7129
+ // go forward one index
7130
+ this.setFocus(this.focusIndex + 1, 1);
7131
+ return;
7132
+ case keyArrowUp:
7133
+ // go back one index
7134
+ this.setFocus(this.focusIndex - 1, -1);
7135
+ return;
7136
+ case keyEnd:
7137
+ // set focus on last item
7138
+ this.setFocus(this.menuItems.length - 1, -1);
7139
+ return;
7140
+ case keyHome:
7141
+ // set focus on first item
7142
+ this.setFocus(0, 1);
7143
+ return;
7144
+ default:
7145
+ // if we are not handling the event, do not prevent default
7146
+ return true;
7147
+ }
7148
+ }
7149
+ removeItemListeners(items = this.items) {
7150
+ items.forEach(item => {
7151
+ item.removeEventListener("focus", this.handleItemFocus);
7152
+ item.removeEventListener("expanded-changed", this.handleExpandedChanged);
7153
+ Observable.getNotifier(item).unsubscribe(this, "hidden");
7154
+ });
7155
+ }
7156
+ setItems() {
7157
+ const children = Array.from(this.children);
7158
+ this.removeItemListeners(children);
7159
+ children.forEach(child => Observable.getNotifier(child).subscribe(this, "hidden"));
7160
+ const newItems = children.filter(child => !child.hasAttribute("hidden"));
7161
+ this.menuItems = newItems;
7162
+ const menuItems = this.menuItems.filter(this.isMenuItemElement);
7163
+ // if our focus index is not -1 we have items
7164
+ if (menuItems.length) {
7165
+ this.focusIndex = 0;
7166
+ }
7167
+ menuItems.forEach((item, index) => {
7168
+ item.setAttribute("tabindex", index === 0 ? "0" : "-1");
7169
+ item.addEventListener("expanded-change", this.handleExpandedChanged);
7170
+ item.addEventListener("focus", this.handleItemFocus);
7171
+ });
7172
+ }
7173
+ handleChange(source, propertyName) {
7174
+ if (propertyName === "hidden") {
7175
+ this.setItems();
7176
+ }
7177
+ }
7178
+ setFocus(focusIndex, adjustment) {
7179
+ if (this.menuItems === undefined) {
7180
+ return;
7181
+ }
7182
+ while (focusIndex >= 0 && focusIndex < this.menuItems.length) {
7183
+ const child = this.menuItems[focusIndex];
7184
+ if (this.isFocusableElement(child)) {
7185
+ // change the previous index to -1
7186
+ if (this.focusIndex > -1 && this.menuItems.length >= this.focusIndex - 1) {
7187
+ this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
7188
+ }
7189
+ // update the focus index
7190
+ this.focusIndex = focusIndex;
7191
+ // update the tabindex of next focusable element
7192
+ child.setAttribute("tabindex", "0");
7193
+ // focus the element
7194
+ child.focus();
7195
+ break;
7196
+ }
7197
+ focusIndex += adjustment;
7198
+ }
5366
7199
  }
5367
7200
  }
5368
- __decorate([attr], FASTDivider.prototype, "role", void 0);
5369
- __decorate([attr], FASTDivider.prototype, "orientation", void 0);
7201
+ FASTMenu.focusableElementRoles = MenuItemRole;
7202
+ __decorate([observable], FASTMenu.prototype, "items", void 0);
5370
7203
 
5371
7204
  /**
5372
7205
  * A base class for progress components.
@@ -6324,9 +8157,9 @@ function display(displayValue) {
6324
8157
  */
6325
8158
  class Accordion extends FASTAccordion {}
6326
8159
 
6327
- const template$k = accordionTemplate();
8160
+ const template$m = accordionTemplate();
6328
8161
 
6329
- const styles$j = css`
8162
+ const styles$l = css`
6330
8163
  ${display('flex')}
6331
8164
 
6332
8165
  :host{flex-direction:column;width:100%;contain:content}`;
@@ -6346,10 +8179,10 @@ const FluentDesignSystem = Object.freeze({
6346
8179
  * @remarks
6347
8180
  * HTML Element: \<fluent-accordion\>
6348
8181
  */
6349
- const definition$k = Accordion.compose({
8182
+ const definition$m = Accordion.compose({
6350
8183
  name: `${FluentDesignSystem.prefix}-accordion`,
6351
- template: template$k,
6352
- styles: styles$j
8184
+ template: template$m,
8185
+ styles: styles$l
6353
8186
  });
6354
8187
 
6355
8188
  /**
@@ -7169,7 +9002,7 @@ var tokens = /*#__PURE__*/Object.freeze({
7169
9002
  shadow64Brand: shadow64Brand
7170
9003
  });
7171
9004
 
7172
- const styles$i = css`
9005
+ const styles$k = css`
7173
9006
  ${display('block')}
7174
9007
 
7175
9008
  :host{max-width:fit-content;contain:content}.heading{height:44px;display:grid;position:relative;vertical-align:middle;padding-inline:${spacingHorizontalM} ${spacingHorizontalMNudge};border-radius:${borderRadiusMedium};font-family:${fontFamilyBase};font-size:${fontSizeBase300};font-weight:${fontWeightRegular};line-height:${lineHeightBase300};grid-template-columns:auto auto 1fr auto}.heading-content{height:100%;display:flex;align-items:center}.button{box-sizing:border-box;appearance:none;border:none;outline:none;text-align:start;cursor:pointer;font-family:inherit;height:44px;color:${colorNeutralForeground1};background:${colorTransparentBackground};line-height:${lineHeightBase300};height:auto;padding:0;font-size:inherit;grid-column:auto / span 2;grid-row:1}.button::before{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall}}.icon{display:flex;align-items:center;justify-content:center;pointer-events:none;position:relative;height:100%;padding-right:${spacingHorizontalS};grid-column:1 / span 1;grid-row:1}.region{margin:0 ${spacingHorizontalM}}::slotted([slot='start']),::slotted([slot='end']){justify-content:center;align-items:center;padding-right:${spacingHorizontalS};grid-column:2 / span 1;grid-row:1 / span 1}button:focus-visible::after{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${borderRadiusSmall};outline:none;border:2px solid ${colorStrokeFocus1};box-shadow:inset 0 0 0 1px ${colorStrokeFocus2}}:host([disabled]) .button{color:${colorNeutralForegroundDisabled}}:host([disabled]) svg{filter:invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%)}:host([expanded]) .region{display:block}:host([expanded]) .default-collapsed-icon,:host([expanded]) ::slotted([slot='collapsed-icon']),:host(:not([expanded])) .default-expanded-icon,:host(:not([expanded])) ::slotted([slot='expanded-icon']),:host([expanded]) ::slotted([slot='end']),::slotted([slot='start']),.region{display:none}:host([expanded]) ::slotted([slot='start']),:host([expanded]) ::slotted([slot='expanded-icon']),:host(:not([expanded])) ::slotted([slot='collapsed-icon']),::slotted([slot='end']){display:flex}.heading{font-size:${fontSizeBase300};line-height:${lineHeightBase300}}:host([size='small']) .heading{font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']) .heading{font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='extra-large']) .heading{font-size:${fontSizeBase500};line-height:${lineHeightBase500}}:host([expand-icon-position='end']) :slotted(span[slot='start']),:host([expand-icon-position='end']) ::slotted(span[slot='end']){grid-column:1 / span 1;grid-row:1}:host([expand-icon-position='end']) ::slotted(span[slot='start']),:host([expand-icon-position='end']) ::slotted(span[slot='end']){grid-column:1 / span 1;grid-row:1}:host([expand-icon-position='end']) .icon{grid-column:4 / span 1;grid-row:1;display:flex;padding-left:10px;padding-right:0}:host([expand-icon-position='end']) .button{grid-column:2 / span 3;grid-row:1}:host([block]){max-width:100%}:host([expand-icon-position='end']) .heading{grid-template-columns:auto auto 28px}:host([expand-icon-position='end']) .icon{grid-column:5 / span 1}:host([block][expand-icon-position='end']) .heading{grid-template-columns:auto 1fr}:host([block][expand-icon-position='end']) .icon{grid-column:5 / span 1}`;
@@ -7204,7 +9037,7 @@ const chevronDown20Filled = html.partial(`<svg
7204
9037
  * The template for the fluent-accordion component.
7205
9038
  * @public
7206
9039
  */
7207
- const template$j = accordionItemTemplate({
9040
+ const template$l = accordionItemTemplate({
7208
9041
  collapsedIcon: chevronRight20Filled,
7209
9042
  expandedIcon: chevronDown20Filled
7210
9043
  });
@@ -7218,10 +9051,10 @@ const template$j = accordionItemTemplate({
7218
9051
  * @remarks
7219
9052
  * HTML Element: \<fluent-accordion-item\>
7220
9053
  */
7221
- const definition$j = AccordionItem.compose({
9054
+ const definition$l = AccordionItem.compose({
7222
9055
  name: `${FluentDesignSystem.prefix}-accordion-item`,
7223
- template: template$j,
7224
- styles: styles$i
9056
+ template: template$l,
9057
+ styles: styles$k
7225
9058
  });
7226
9059
 
7227
9060
  /**
@@ -7358,18 +9191,18 @@ const AnchorButtonSize = ButtonSize;
7358
9191
  * The template for the Button component.
7359
9192
  * @public
7360
9193
  */
7361
- const template$i = anchorTemplate();
9194
+ const template$k = anchorTemplate();
7362
9195
 
7363
9196
  // Need to support icon hover styles
7364
- const styles$h = css`
9197
+ const styles$j = css`
7365
9198
  ${display('inline-flex')}
7366
9199
 
7367
9200
  :host{--icon-spacing:${spacingHorizontalSNudge};contain:layout style;vertical-align:middle}:host .control{display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;text-decoration-line:none;margin:0;min-height:32px;outline-style:none;background-color:${colorNeutralBackground1};color:${colorNeutralForeground1};border:${strokeWidthThin} solid ${colorNeutralStroke1};padding:0 ${spacingHorizontalM};min-width:96px;border-radius:${borderRadiusMedium};font-size:${fontSizeBase300};font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};line-height:${lineHeightBase300};transition-duration:${durationFaster};transition-property:background,border,color;transition-timing-function:${curveEasyEase};cursor:pointer}.content{display:inherit}:host(:hover) .control{background-color:${colorNeutralBackground1Hover};color:${colorNeutralForeground1Hover};border-color:${colorNeutralStroke1Hover}}:host(:hover:active) .control{background-color:${colorNeutralBackground1Pressed};border-color:${colorNeutralStroke1Pressed};color:${colorNeutralForeground1Pressed};outline-style:none}:host .control:focus-visible{border-color:${colorTransparentStroke};outline:${strokeWidthThick} solid ${colorTransparentStroke};box-shadow:${shadow4},0 0 0 2px ${colorStrokeFocus2}}@media screen and (prefers-reduced-motion:reduce){transition-duration:0.01ms}::slotted(svg){font-size:20px;height:20px;width:20px;fill:currentColor}[slot='start'],::slotted([slot='start']){margin-inline-end:var(--icon-spacing)}[slot='end'],::slotted([slot='end']){margin-inline-start:var(--icon-spacing)}:host([icon-only]) .control{min-width:32px;max-width:32px}:host([size='small']){--icon-spacing:${spacingHorizontalXS}}:host([size='small']) .control{min-height:24px;min-width:64px;padding:0 ${spacingHorizontalS};border-radius:${borderRadiusSmall};font-size:${fontSizeBase200};line-height:${lineHeightBase200};font-weight:${fontWeightRegular}}:host([size='small'][icon-only]) .control{min-width:24px;max-width:24px}:host([size='large']) .control{min-height:40px;border-radius:${borderRadiusLarge};padding:0 ${spacingHorizontalL};font-size:${fontSizeBase400};line-height:${lineHeightBase400}}:host([size='large'][icon-only]) .control{min-width:40px;max-width:40px}:host([size='large']) ::slotted(svg){font-size:24px;height:24px;width:24px}:host([shape='circular']) .control,:host([shape='circular']) .control:focus-visible{border-radius:${borderRadiusCircular}}:host([shape='square']) .control,:host([shape='square']) .control:focus-visible{border-radius:${borderRadiusNone}}:host([appearance='primary']) .control{background-color:${colorBrandBackground};color:${colorNeutralForegroundOnBrand};border-color:transparent}:host([appearance='primary']:hover) .control{background-color:${colorBrandBackgroundHover}}:host([appearance='primary']:hover) .control,:host([appearance='primary']:hover:active) .control{border-color:transparent;color:${colorNeutralForegroundOnBrand}}:host([appearance='primary']:hover:active) .control{background-color:${colorBrandBackgroundPressed}}:host([appearance='primary']) .control:focus-visible{border-color:${colorNeutralForegroundOnBrand};box-shadow:${shadow2},0 0 0 2px ${colorStrokeFocus2}}:host(is:([disabled][appearance='primary'],[disabled-focusabale][appearance="primary"])) .control,:host(is:([disabled][appearance='primary'],[disabled-focusabale][appearance="primary"]):hover) .control,:host(is:([disabled][appearance='primary'],[disabled-focusabale][appearance="primary"]):hover:active) .control{border-color:transparent}:host([appearance='outline']) .control{background-color:${colorTransparentBackground}}:host([appearance='outline']:hover) .control{background-color:${colorTransparentBackgroundHover}}:host([appearance='outline']:hover:active) .control{background-color:${colorTransparentBackgroundPressed}}:host(is:([disabled][appearance='outline'],[disabled-focusabale][appearance="outline"])) .control,:host(is:([disabled][appearance='outline'],[disabled-focusabale][appearance="outline"]):hover) .control,:host(is:([disabled][appearance='outline'],[disabled-focusabale][appearance="outline"]):hover:active) .control{background-color:${colorTransparentBackground}}:host([appearance='subtle']) .control{background-color:${colorSubtleBackground};color:${colorNeutralForeground2};border-color:transparent}:host([appearance='subtle']:hover) .control{background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover};border-color:transparent}:host([appearance='subtle']:hover:active) .control{background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed};border-color:transparent}:host(is:([disabled][appearance='subtle'],[disabled-focusabale][appearance="subtle"])) .control,:host(is:([disabled][appearance='subtle'],[disabled-focusabale][appearance="subtle"]):hover) .control,:host(is:([disabled][appearance='subtle'],[disabled-focusabale][appearance="subtle"]):hover:active) .control{background-color:${colorTransparentBackground};border-color:transparent}:host([appearance='subtle']:hover) ::slotted(svg){fill:${colorNeutralForeground2BrandHover}}:host([appearance='subtle']:hover:active) ::slotted(svg){fill:${colorNeutralForeground2BrandPressed}}:host([appearance='transparent']) .control{background-color:${colorTransparentBackground};color:${colorNeutralForeground2}}:host([appearance='transparent']:hover) .control{background-color:${colorTransparentBackgroundHover};color:${colorNeutralForeground2BrandHover}}:host([appearance='transparent']:hover:active) .control{background-color:${colorTransparentBackgroundPressed};color:${colorNeutralForeground2BrandPressed}}:host([appearance='transparent']) .control,:host([appearance='transparent']:hover) .control,:host([appearance='transparent']:hover:active) .control{border-color:transparent}:host(is:([disabled][appearance='transparent'],[disabled-focusabale][appearance="transparent"])) .control,:host(is:([disabled][appearance='transparent'],[disabled-focusabale][appearance="transparent"]):hover) .control,:host(is:([disabled][appearance='transparent'],[disabled-focusabale][appearance="transparent"]):hover:active) .control{border-color:transparent;background-color:${colorTransparentBackground}}:host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable])) .control,:host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable]):hover) .control,:host(:is([disabled],[disabled-focusable],[appearance][disabled],[appearance][disabled-focusable]):hover:active)
7368
9201
  .control{background-color:${colorNeutralBackgroundDisabled};border-color:${colorNeutralStrokeDisabled};color:${colorNeutralForegroundDisabled};cursor:not-allowed}`;
7369
9202
 
7370
9203
  // Need to support icon hover styles
7371
- const styles$g = css`
7372
- ${styles$h}
9204
+ const styles$i = css`
9205
+ ${styles$j}
7373
9206
 
7374
9207
  .content{text-align:center}`;
7375
9208
 
@@ -7381,10 +9214,10 @@ const styles$g = css`
7381
9214
  * @remarks
7382
9215
  * HTML Element: \<fluent-anchor-button\>
7383
9216
  */
7384
- const definition$i = AnchorButton.compose({
9217
+ const definition$k = AnchorButton.compose({
7385
9218
  name: `${FluentDesignSystem.prefix}-anchor-button`,
7386
- template: template$i,
7387
- styles: styles$g,
9219
+ template: template$k,
9220
+ styles: styles$i,
7388
9221
  shadowOptions: {
7389
9222
  delegatesFocus: true
7390
9223
  }
@@ -7641,7 +9474,7 @@ const defaultIconTemplate = html`<svg width="1em" height="1em" viewBox="0 0 20 2
7641
9474
  function avatarTemplate() {
7642
9475
  return html`<template role="img" data-color=${x => x.generateColor()}><slot>${x => x.name || x.initials ? x.generateInitials() : defaultIconTemplate}</slot><slot name="badge"></slot></template>`;
7643
9476
  }
7644
- const template$h = avatarTemplate();
9477
+ const template$j = avatarTemplate();
7645
9478
 
7646
9479
  const animations = {
7647
9480
  fastOutSlowInMax: curveDecelerateMax,
@@ -7657,7 +9490,7 @@ const animations = {
7657
9490
  /** Avatar styles
7658
9491
  * @public
7659
9492
  */
7660
- const styles$f = css`
9493
+ const styles$h = css`
7661
9494
  ${display('inline-flex')} :host{position:relative;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;font-family:${fontFamilyBase};font-weight:${fontWeightSemibold};font-size:${fontSizeBase300};border-radius:${borderRadiusCircular};color:${colorNeutralForeground3};background-color:${colorNeutralBackground6};contain:layout style}.default-icon,::slotted(svg){width:20px;height:20px;font-size:20px}::slotted(img){box-sizing:border-box;width:100%;height:100%;border-radius:${borderRadiusCircular}}::slotted([slot='badge']){position:absolute;bottom:0;right:0;box-shadow:0 0 0 ${strokeWidthThin} ${colorNeutralBackground1}}:host([size='64']) ::slotted([slot='badge']),:host([size='72']) ::slotted([slot='badge']),:host([size='96']) ::slotted([slot='badge']),:host([size='120']) ::slotted([slot='badge']),:host([size='128']) ::slotted([slot='badge']){box-shadow:0 0 0 ${strokeWidthThick} ${colorNeutralBackground1}}:host([size='16']),:host([size='20']),:host([size='24']){font-size:${fontSizeBase100};font-weight:${fontWeightRegular}}:host([size='16']){width:16px;height:16px}:host([size='20']){width:20px;height:20px}:host([size='24']){width:24px;height:24px}:host([size='16']) .default-icon,:host([size='16']) ::slotted(svg){width:12px;height:12px;font-size:12px}:host([size='20']) .default-icon,:host([size='24']) .default-icon,:host([size='20']) ::slotted(svg),:host([size='24']) ::slotted(svg){width:16px;height:16px;font-size:16px}:host([size='28']){width:28px;height:28px;font-size:${fontSizeBase200}}:host([size='36']){width:36px;height:36px}:host([size='40']){width:40px;height:40px}:host([size='48']),:host([size='56']){font-size:${fontSizeBase400}}:host([size='48']){width:48px;height:48px}:host([size='48']) .default-icon,:host([size='48']) ::slotted(svg){width:24px;height:24px;font-size:24px}:host([size='56']){width:56px;height:56px}:host([size='56']) .default-icon,:host([size='56']) ::slotted(svg){width:28px;height:28px;font-size:28px}:host([size='64']),:host([size='72']),:host([size='96']){font-size:${fontSizeBase500}}:host([size='64']) .default-icon,:host([size='72']) .default-icon,:host([size='64']) ::slotted(svg),:host([size='72']) ::slotted(svg){width:32px;height:32px;font-size:32px}:host([size='64']){width:64px;height:64px}:host([size='72']){width:72px;height:72px}:host([size='96']){width:96px;height:96px}:host([size='96']) .default-icon,:host([size='120']) .default-icon,:host([size='128']) .default-icon,:host([size='96']) ::slotted(svg),:host([size='120']) ::slotted(svg),:host([size='128']) ::slotted(svg){width:48px;height:48px;font-size:48px}:host([size='120']),:host([size='128']){font-size:${fontSizeBase600}}:host([size='120']){width:120px;height:120px}:host([size='128']){width:128px;height:128px}:host([shape='square']){border-radius:${borderRadiusMedium}}:host([shape='square'][size='20']),:host([shape='square'][size='24']){border-radius:${borderRadiusSmall}}:host([shape='square'][size='56']),:host([shape='square'][size='64']),:host([shape='square'][size='72']){border-radius:${borderRadiusLarge}}:host([shape='square'][size='96']),:host([shape='square'][size='120']),:host([shape='square'][size='128']){border-radius:${borderRadiusXLarge}}:host([data-color='brand']){color:${colorNeutralForegroundStaticInverted};background-color:${colorBrandBackgroundStatic}}:host([data-color='dark-red']){color:${colorPaletteDarkRedForeground2};background-color:${colorPaletteDarkRedBackground2}}:host([data-color='cranberry']){color:${colorPaletteCranberryForeground2};background-color:${colorPaletteCranberryBackground2}}:host([data-color='red']){color:${colorPaletteRedForeground2};background-color:${colorPaletteRedBackground2}}:host([data-color='pumpkin']){color:${colorPalettePumpkinForeground2};background-color:${colorPalettePumpkinBackground2}}:host([data-color='peach']){color:${colorPalettePeachForeground2};background-color:${colorPalettePeachBackground2}}:host([data-color='marigold']){color:${colorPaletteMarigoldForeground2};background-color:${colorPaletteMarigoldBackground2}}:host([data-color='gold']){color:${colorPaletteGoldForeground2};background-color:${colorPaletteGoldBackground2}}:host([data-color='brass']){color:${colorPaletteBrassForeground2};background-color:${colorPaletteBrassBackground2}}:host([data-color='brown']){color:${colorPaletteBrownForeground2};background-color:${colorPaletteBrownBackground2}}:host([data-color='forest']){color:${colorPaletteForestForeground2};background-color:${colorPaletteForestBackground2}}:host([data-color='seafoam']){color:${colorPaletteSeafoamForeground2};background-color:${colorPaletteSeafoamBackground2}}:host([data-color='dark-green']){color:${colorPaletteDarkGreenForeground2};background-color:${colorPaletteDarkGreenBackground2}}:host([data-color='light-teal']){color:${colorPaletteLightTealForeground2};background-color:${colorPaletteLightTealBackground2}}:host([data-color='teal']){color:${colorPaletteTealForeground2};background-color:${colorPaletteTealBackground2}}:host([data-color='steel']){color:${colorPaletteSteelForeground2};background-color:${colorPaletteSteelBackground2}}:host([data-color='blue']){color:${colorPaletteBlueForeground2};background-color:${colorPaletteBlueBackground2}}:host([data-color='royal-blue']){color:${colorPaletteRoyalBlueForeground2};background-color:${colorPaletteRoyalBlueBackground2}}:host([data-color='cornflower']){color:${colorPaletteCornflowerForeground2};background-color:${colorPaletteCornflowerBackground2}}:host([data-color='navy']){color:${colorPaletteNavyForeground2};background-color:${colorPaletteNavyBackground2}}:host([data-color='lavender']){color:${colorPaletteLavenderForeground2};background-color:${colorPaletteLavenderBackground2}}:host([data-color='purple']){color:${colorPalettePurpleForeground2};background-color:${colorPalettePurpleBackground2}}:host([data-color='grape']){color:${colorPaletteGrapeForeground2};background-color:${colorPaletteGrapeBackground2}}:host([data-color='lilac']){color:${colorPaletteLilacForeground2};background-color:${colorPaletteLilacBackground2}}:host([data-color='pink']){color:${colorPalettePinkForeground2};background-color:${colorPalettePinkBackground2}}:host([data-color='magenta']){color:${colorPaletteMagentaForeground2};background-color:${colorPaletteMagentaBackground2}}:host([data-color='plum']){color:${colorPalettePlumForeground2};background-color:${colorPalettePlumBackground2}}:host([data-color='beige']){color:${colorPaletteBeigeForeground2};background-color:${colorPaletteBeigeBackground2}}:host([data-color='mink']){color:${colorPaletteMinkForeground2};background-color:${colorPaletteMinkBackground2}}:host([data-color='platinum']){color:${colorPalettePlatinumForeground2};background-color:${colorPalettePlatinumBackground2}}:host([data-color='anchor']){color:${colorPaletteAnchorForeground2};background-color:${colorPaletteAnchorBackground2}}:host([active]){transform:perspective(1px);transition-property:transform,opacity;transition-duration:${durationUltraSlow},${durationFaster};transition-delay:${animations.fastEase},${animations.nullEasing}}:host([active])::before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;transition-property:margin,opacity;transition-duration:${durationUltraSlow},${durationSlower};transition-delay:${animations.fastEase},${animations.nullEasing}}:host([active])::before{box-shadow:${shadow8};border-style:solid;border-color:${colorBrandBackgroundStatic}}:host([active][appearance='shadow'])::before{border-style:none;border-color:none}:host([active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThick});border-width:${strokeWidthThick}}:host([size='56'][active]:not([appearance='shadow']))::before,:host([size='64'][active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThicker});border-width:${strokeWidthThicker}}:host([size='72'][active]:not([appearance='shadow']))::before,:host([size='96'][active]:not([appearance='shadow']))::before,:host([size='120'][active]:not([appearance='shadow']))::before,:host([size='128'][active]:not([appearance='shadow']))::before{margin:calc(-2 * ${strokeWidthThickest});border-width:${strokeWidthThickest}}:host([size='20'][active][appearance])::before,:host([size='24'][active][appearance])::before,:host([size='28'][active][appearance])::before{box-shadow:${shadow4}}:host([size='56'][active][appearance])::before,:host([size='64'][active][appearance])::before{box-shadow:${shadow16}}:host([size='72'][active][appearance])::before,:host([size='96'][active][appearance])::before,:host([size='120'][active][appearance])::before,:host([size='128'][active][appearance])::before{box-shadow:${shadow28}}:host([active][appearance='ring'])::before{box-shadow:none}:host([active='inactive']){opacity:0.8;transform:scale(0.875);transition-property:transform,opacity;transition-duration:${durationUltraSlow},${durationFaster};transition-delay:${animations.fastOutSlowInMin},${animations.nullEasing}}:host([active='inactive'])::before{margin:0;opacity:0;transition-property:margin,opacity;transition-duration:${durationUltraSlow},${durationSlower};transition-delay:${animations.fastOutSlowInMin},${animations.nullEasing}}@media screen and (prefers-reduced-motion:reduce){:host([active]){transition-duration:0.01ms}:host([active])::before{transition-duration:0.01ms;transition-delay:0.01ms}}`;
7662
9495
 
7663
9496
  /**
@@ -7667,10 +9500,10 @@ const styles$f = css`
7667
9500
  * @remarks
7668
9501
  * HTML Element: \<fluent-badge\>
7669
9502
  */
7670
- const definition$h = Avatar.compose({
9503
+ const definition$j = Avatar.compose({
7671
9504
  name: `${FluentDesignSystem.prefix}-avatar`,
7672
- template: template$h,
7673
- styles: styles$f
9505
+ template: template$j,
9506
+ styles: styles$h
7674
9507
  });
7675
9508
 
7676
9509
  /**
@@ -7757,7 +9590,7 @@ applyMixins(Badge, StartEnd);
7757
9590
  function badgeTemplate(options = {}) {
7758
9591
  return html` ${startSlotTemplate(options)}<slot>${staticallyCompose(options.defaultContent)}</slot>${endSlotTemplate(options)} `;
7759
9592
  }
7760
- const template$g = badgeTemplate();
9593
+ const template$i = badgeTemplate();
7761
9594
 
7762
9595
  const textPadding = spacingHorizontalXXS;
7763
9596
  const badgeBaseStyles = css.partial`
@@ -8034,7 +9867,7 @@ const badgeTintStyles = css.partial`
8034
9867
  /** Badge styles
8035
9868
  * @public
8036
9869
  */
8037
- const styles$e = css`
9870
+ const styles$g = css`
8038
9871
  :host([shape='square']){border-radius:${borderRadiusNone}}:host([shape='rounded']){border-radius:${borderRadiusMedium}}:host([shape='rounded'][size='tiny']),:host([shape='rounded'][size='extra-small']),:host([shape='rounded'][size='small']){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
8039
9872
  ${badgeFilledStyles}
8040
9873
  ${badgeGhostStyles}
@@ -8052,10 +9885,10 @@ const styles$e = css`
8052
9885
  * @remarks
8053
9886
  * HTML Element: \<fluent-badge\>
8054
9887
  */
8055
- const definition$g = Badge.compose({
9888
+ const definition$i = Badge.compose({
8056
9889
  name: `${FluentDesignSystem.prefix}-badge`,
8057
- template: template$g,
8058
- styles: styles$e
9890
+ template: template$i,
9891
+ styles: styles$g
8059
9892
  });
8060
9893
 
8061
9894
  /**
@@ -8126,7 +9959,7 @@ __decorate([attr({
8126
9959
  * The template for the Button component.
8127
9960
  * @public
8128
9961
  */
8129
- const template$f = buttonTemplate$1();
9962
+ const template$h = buttonTemplate$1();
8130
9963
 
8131
9964
  /**
8132
9965
  * The Fluent Button Element. Implements {@link @microsoft/fast-foundation#Button },
@@ -8136,10 +9969,10 @@ const template$f = buttonTemplate$1();
8136
9969
  * @remarks
8137
9970
  * HTML Element: \<fluent-button\>
8138
9971
  */
8139
- const definition$f = Button.compose({
9972
+ const definition$h = Button.compose({
8140
9973
  name: `${FluentDesignSystem.prefix}-button`,
8141
- template: template$f,
8142
- styles: styles$h,
9974
+ template: template$h,
9975
+ styles: styles$j,
8143
9976
  shadowOptions: {
8144
9977
  delegatesFocus: true
8145
9978
  }
@@ -8178,11 +10011,11 @@ function buttonTemplate(options = {}) {
8178
10011
  * The template for the Button component.
8179
10012
  * @public
8180
10013
  */
8181
- const template$e = buttonTemplate();
10014
+ const template$g = buttonTemplate();
8182
10015
 
8183
10016
  // Need to support icon hover styles
8184
- const styles$d = css`
8185
- ${styles$h}
10017
+ const styles$f = css`
10018
+ ${styles$j}
8186
10019
 
8187
10020
  :host .control,:host(:is([size])) .control{gap:12px;height:auto;padding-top:14px;padding-inline:12px;padding-bottom:16px;font-size:${fontSizeBase300};line-height:${lineHeightBase300}}.content{display:flex;flex-direction:column;text-align:start}::slotted([slot='description']){color:${colorNeutralForeground2};line-height:100%;font-size:${fontSizeBase200};font-weight:${fontWeightRegular}}::slotted(svg),:host([size='large']) ::slotted(svg){font-size:40px;height:40px;width:40px}:host(:hover) ::slotted([slot='description']){color:${colorNeutralForeground2Hover}}:host(:active) ::slotted([slot='description']){color:${colorNeutralForeground2Pressed}}:host(:is([appearance='primary'],[appearance='primary']:hover,[appearance='primary']:active))
8188
10021
  ::slotted([slot='description']){color:${colorNeutralForegroundOnBrand}}:host(:is([appearance='subtle'],[appearance='subtle']:hover,[appearance='subtle']:active))
@@ -8197,10 +10030,10 @@ const styles$d = css`
8197
10030
  * @remarks
8198
10031
  * HTML Element: \<fluent-comopund-button\>
8199
10032
  */
8200
- const definition$e = CompoundButton.compose({
10033
+ const definition$g = CompoundButton.compose({
8201
10034
  name: `${FluentDesignSystem.prefix}-compound-button`,
8202
- template: template$e,
8203
- styles: styles$d,
10035
+ template: template$g,
10036
+ styles: styles$f,
8204
10037
  shadowOptions: {
8205
10038
  delegatesFocus: true
8206
10039
  }
@@ -8339,12 +10172,12 @@ function composeTemplate(options = {}) {
8339
10172
  * The template for the Counter Badge component.
8340
10173
  * @public
8341
10174
  */
8342
- const template$d = composeTemplate();
10175
+ const template$f = composeTemplate();
8343
10176
 
8344
10177
  /** Badge styles
8345
10178
  * @public
8346
10179
  */
8347
- const styles$c = css`
10180
+ const styles$e = css`
8348
10181
  :host([shape='rounded']){border-radius:${borderRadiusMedium}}:host([shape='rounded'][size='tiny']),:host([shape='rounded'][size='extra-small']),:host([shape='rounded'][size='small']){border-radius:${borderRadiusSmall}}${badgeSizeStyles}
8349
10182
  ${badgeFilledStyles}
8350
10183
  ${badgeGhostStyles}
@@ -8361,10 +10194,10 @@ const styles$c = css`
8361
10194
  * @remarks
8362
10195
  * HTML Element: \<fluent-counter-badge\>
8363
10196
  */
8364
- const definition$d = CounterBadge.compose({
10197
+ const definition$f = CounterBadge.compose({
8365
10198
  name: `${FluentDesignSystem.prefix}-counter-badge`,
8366
- template: template$d,
8367
- styles: styles$c
10199
+ template: template$f,
10200
+ styles: styles$e
8368
10201
  });
8369
10202
 
8370
10203
  /**
@@ -8406,12 +10239,12 @@ const DividerAppearance = {
8406
10239
  * Template for the Divider component
8407
10240
  * @public
8408
10241
  */
8409
- const template$c = dividerTemplate();
10242
+ const template$e = dividerTemplate();
8410
10243
 
8411
10244
  /** Divider styles
8412
10245
  * @public
8413
10246
  */
8414
- const styles$b = css`
10247
+ const styles$d = css`
8415
10248
  ${display('flex')}
8416
10249
 
8417
10250
  :host{contain:content}:host::after,:host::before{align-self:center;background:${colorNeutralStroke2};box-sizing:border-box;content:'';display:flex;flex-grow:1;height:${strokeWidthThin}}:host([inset]){padding:0 12px}:host ::slotted(*){color:${colorNeutralForeground2};font-family:${fontFamilyBase};font-size:${fontSizeBase200};font-weight:${fontWeightRegular};margin:0;padding:0 12px}:host([align-content='start'])::before,:host([align-content='end'])::after{flex-basis:12px;flex-grow:0;flex-shrink:0}:host([orientation='vertical']){height:100%;min-height:84px}:host([orientation='vertical']):empty{min-height:20px}:host([orientation='vertical']){flex-direction:column;align-items:center}:host([orientation='vertical'][inset])::before{margin-top:12px}:host([orientation='vertical'][inset])::after{margin-bottom:12px}:host([orientation='vertical']):empty::before,:host([orientation='vertical']):empty::after{height:10px;min-height:10px;flex-grow:0}:host([orientation='vertical'])::before,:host([orientation='vertical'])::after{width:${strokeWidthThin};min-height:20px;height:100%}:host([orientation='vertical']) ::slotted(*){display:flex;flex-direction:column;padding:12px 0;line-height:20px}:host([orientation='vertical'][align-content='start'])::before{min-height:8px}:host([orientation='vertical'][align-content='end'])::after{min-height:8px}:host([appearance='strong'])::before,:host([appearance='strong'])::after{background:${colorNeutralStroke1}}:host([appearance='strong']) ::slotted(*){color:${colorNeutralForeground1}}:host([appearance='brand'])::before,:host([appearance='brand'])::after{background:${colorBrandStroke1}}:host([appearance='brand']) ::slotted(*){color:${colorBrandForeground1}}:host([appearance='subtle'])::before,:host([appearance='subtle'])::after{background:${colorNeutralStroke3}}:host([appearance='subtle']) ::slotted(*){color:${colorNeutralForeground3}}`;
@@ -8423,10 +10256,10 @@ const styles$b = css`
8423
10256
  * @remarks
8424
10257
  * HTML Element: \<fluent-divider\>
8425
10258
  */
8426
- const definition$c = Divider.compose({
10259
+ const definition$e = Divider.compose({
8427
10260
  name: `${FluentDesignSystem.prefix}-divider`,
8428
- template: template$c,
8429
- styles: styles$b
10261
+ template: template$e,
10262
+ styles: styles$d
8430
10263
  });
8431
10264
 
8432
10265
  /**
@@ -8471,13 +10304,13 @@ const ImageShape = {
8471
10304
  * Template for the Image component
8472
10305
  * @public
8473
10306
  */
8474
- const template$b = html`<slot></slot>`;
10307
+ const template$d = html`<slot></slot>`;
8475
10308
 
8476
10309
  /** Image styles
8477
10310
  *
8478
10311
  * @public
8479
10312
  */
8480
- const styles$a = css`
10313
+ const styles$c = css`
8481
10314
  :host{contain:content}:host ::slotted(img){box-sizing:border-box;min-height:8px;min-width:8px;display:inline-block}:host([block]) ::slotted(img){width:100%;height:auto}:host([bordered]) ::slotted(img){border:${strokeWidthThin} solid ${colorNeutralStroke2}}:host([fit='none']) ::slotted(img){object-fit:none;object-position:top left;height:100%;width:100%}:host([fit='center']) ::slotted(img){object-fit:none;object-position:center;height:100%;width:100%}:host([fit='contain']) ::slotted(img){object-fit:contain;object-position:center;height:100%;width:100%}:host([fit='cover']) ::slotted(img){object-fit:cover;object-position:center;height:100%;width:100%}:host([shadow]) ::slotted(img){box-shadow:${shadow4}}:host([shape='circular']) ::slotted(img){border-radius:${borderRadiusCircular}}:host([shape='rounded']) ::slotted(img){border-radius:${borderRadiusMedium}}`;
8482
10315
 
8483
10316
  /**
@@ -8487,10 +10320,10 @@ const styles$a = css`
8487
10320
  * @remarks
8488
10321
  * HTML Element: \<fluent-image\>
8489
10322
  */
8490
- const definition$b = Image.compose({
10323
+ const definition$d = Image.compose({
8491
10324
  name: `${FluentDesignSystem.prefix}-image`,
8492
- template: template$b,
8493
- styles: styles$a
10325
+ template: template$d,
10326
+ styles: styles$c
8494
10327
  });
8495
10328
 
8496
10329
  /**
@@ -8530,7 +10363,7 @@ __decorate([attr({
8530
10363
  /** Label styles
8531
10364
  * @public
8532
10365
  */
8533
- const styles$9 = css`
10366
+ const styles$b = css`
8534
10367
  ${display('flex')}
8535
10368
 
8536
10369
  :host{font-family:${fontFamilyBase};font-size:${fontSizeBase300};line-height:${lineHeightBase300};font-weight:${fontWeightRegular};color:${colorNeutralForeground1}}.asterisk{color:${colorPaletteRedForeground1};margin-left:${spacingHorizontalXS}}:host([size='small']){font-size:${fontSizeBase200};line-height:${lineHeightBase200}}:host([size='large']){font-size:${fontSizeBase400};line-height:${lineHeightBase400};font-weight:${fontWeightSemibold}}:host([weight='semibold']){font-weight:${fontWeightSemibold}}:host([disabled]),:host([disabled]) .asterisk{color:${colorNeutralForegroundDisabled}}`;
@@ -8542,7 +10375,7 @@ const styles$9 = css`
8542
10375
  function labelTemplate() {
8543
10376
  return html`<slot></slot><span part="asterisk" class="asterisk" ?hidden="${x => !x.required}">*</span>`;
8544
10377
  }
8545
- const template$a = labelTemplate();
10378
+ const template$c = labelTemplate();
8546
10379
 
8547
10380
  /**
8548
10381
  * The Fluent Label Element.
@@ -8552,10 +10385,10 @@ const template$a = labelTemplate();
8552
10385
  * @remarks
8553
10386
  * HTML Element: \<fluent-label\>
8554
10387
  */
8555
- const definition$a = Label.compose({
10388
+ const definition$c = Label.compose({
8556
10389
  name: `${FluentDesignSystem.prefix}-label`,
8557
- template: template$a,
8558
- styles: styles$9
10390
+ template: template$c,
10391
+ styles: styles$b
8559
10392
  });
8560
10393
 
8561
10394
  /**
@@ -8584,7 +10417,7 @@ const MenuButtonSize = ButtonSize;
8584
10417
  * The template for the Button component.
8585
10418
  * @public
8586
10419
  */
8587
- const template$9 = buttonTemplate$1({
10420
+ const template$b = buttonTemplate$1({
8588
10421
  end: html.partial(`<svg slot="end" fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z" fill="currentColor"></path></svg>`)
8589
10422
  });
8590
10423
 
@@ -8596,15 +10429,111 @@ const template$9 = buttonTemplate$1({
8596
10429
  * @remarks
8597
10430
  * HTML Element: \<fluent-button\>
8598
10431
  */
8599
- const definition$9 = MenuButton.compose({
10432
+ const definition$b = MenuButton.compose({
8600
10433
  name: `${FluentDesignSystem.prefix}-menu-button`,
8601
- template: template$9,
8602
- styles: styles$h,
10434
+ template: template$b,
10435
+ styles: styles$j,
8603
10436
  shadowOptions: {
8604
10437
  delegatesFocus: true
8605
10438
  }
8606
10439
  });
8607
10440
 
10441
+ /**
10442
+ * The base class used for constructing a fluent-menu-item custom element
10443
+ * @public
10444
+ */
10445
+ class MenuItem extends FASTMenuItem {}
10446
+
10447
+ const Checkmark16Filled = html.partial(`<svg fill="currentColor" class="___12fm75w f1w7gpdv fez10in fg4l7m0" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.05 3.49c.28.3.27.77-.04 1.06l-7.93 7.47A.85.85 0 014.9 12L2.22 9.28a.75.75 0 111.06-1.06l2.24 2.27 7.47-7.04a.75.75 0 011.06.04z" fill="currentColor"></path></svg>`);
10448
+ const chevronRight16Filled = html.partial(`<svg fill="currentColor" class="___12fm75w f1w7gpdv fez10in fg4l7m0" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.74 3.2a.75.75 0 00-.04 1.06L9.23 8 5.7 11.74a.75.75 0 101.1 1.02l4-4.25a.75.75 0 000-1.02l-4-4.25a.75.75 0 00-1.06-.04z" fill="currentColor"></path></svg>`);
10449
+ const template$a = menuItemTemplate({
10450
+ checkboxIndicator: Checkmark16Filled,
10451
+ expandCollapseGlyph: chevronRight16Filled,
10452
+ radioIndicator: Checkmark16Filled
10453
+ });
10454
+
10455
+ /** MenuItem styles
10456
+ * @public
10457
+ */
10458
+ const styles$a = css`
10459
+ ${display('grid')}
10460
+
10461
+ :host{grid-template-columns:20px 20px auto 20px;align-items:center;grid-gap:4px;height:32px;background:${colorNeutralBackground1};font:${fontWeightRegular} ${fontSizeBase300} / ${lineHeightBase300} ${fontFamilyBase};border-radius:${borderRadiusMedium};color:${colorNeutralForeground2};padding:0 10px;cursor:pointer;overflow:visible;contain:layout}:host(:hover){background:${colorNeutralBackground1Hover}}.content{white-space:nowrap;flex-grow:1;grid-column:auto / span 2;padding:0 2px}.checkbox,.radio{display:none}.input-container,.expand-collapse-glyph-container,::slotted([slot='start']),::slotted([slot='end']),:host([checked]) .checkbox,:host([checked]) .radio{display:inline-flex;justify-content:center;align-items:center;color:${colorNeutralForeground2}}.expand-collapse-glyph-container,::slotted([slot='start']),::slotted([slot='end']){height:32px;font-size:${fontSizeBase500};width:fit-content}.input-container{width:20px}::slotted([slot='end']){color:${colorNeutralForeground3};font:${fontWeightRegular} ${fontSizeBase200} / ${lineHeightBase200} ${fontFamilyBase};white-space:nowrap;grid-column:4 / span 1;justify-self:flex-end}.expand-collapse-glyph-container{grid-column:4 / span 1;justify-self:flex-end}:host(:hover) .input-container,:host(:hover) .expand-collapse-glyph-container,:host(:hover) .content{color:${colorNeutralForeground2Hover}}:host([icon]:hover) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Hover}}:host(:active){background-color:${colorNeutralBackground1Selected}}:host(:active) .input-container,:host(:active) .expand-collapse-glyph-container,:host(:active) .content{color:${colorNeutralForeground2Pressed}}:host(:active) ::slotted([slot='start']){color:${colorCompoundBrandForeground1Pressed}}:host([disabled]){background-color:${colorNeutralBackgroundDisabled}}:host([disabled]) .content,:host([disabled]) .expand-collapse-glyph-container,:host([disabled]) ::slotted([slot='end']),:host([disabled]) ::slotted([slot='start']){color:${colorNeutralForegroundDisabled}}:host([data-indent]){display:grid}:host([data-indent='1']) .content{grid-column:2 / span 1}:host([data-indent='1'][role='menuitemcheckbox']){display:grid}:host([data-indent='2'][aria-haspopup='menu']) ::slotted([slot='end']){grid-column:4 / span 1}:host([data-indent='2'][aria-haspopup='menu']) .expand-collapse-glyph-container{grid-column:5 / span 1}:host([data-indent='1']) .content{grid-column:2 / span 1}:host([data-indent='1'][role='menuitemcheckbox']) .content,:host([data-indent='1'][role='menuitemradio']) .content{grid-column:auto / span 1}:host([icon]) ::slotted([slot='end']),:host([data-indent='1']) ::slotted([slot='end']){grid-column:4 / span 1;justify-self:flex-end}:host([data-indent='2']){display:grid;grid-template-columns:20px 20px auto auto}:host([data-indent='2']) .content{grid-column:3 / span 1}:host([data-indent='2']) .input-container{grid-column:1 / span 1}:host([data-indent='2']) ::slotted([slot='start']){grid-column:2 / span 1}:host([aria-haspopup='menu']){grid-template-columns:20px auto auto 20px}:host([data-indent='2'][aria-haspopup='menu']){grid-template-columns:20px 20px auto auto 20px}:host([aria-haspopup='menu']) ::slotted([slot='end']){grid-column:3 / span 1;justify-self:flex-end}:host([data-indent='2'][aria-haspopup='menu']) ::slotted([slot='end']){grid-column:4 / span 1;justify-self:flex-end}`;
10462
+
10463
+ /**
10464
+ * The Fluent Menu Item Element. Implements {@link @microsoft/fast-foundation#MenuItem },
10465
+ * {@link @microsoft/fast-foundation#menuItemTemplate}
10466
+ *
10467
+ *
10468
+ * @public
10469
+ * @remarks
10470
+ * HTML Element: <fluent-menu-item>
10471
+ */
10472
+ const definition$a = MenuItem.compose({
10473
+ name: `${FluentDesignSystem.prefix}-menu-item`,
10474
+ template: template$a,
10475
+ styles: styles$a
10476
+ });
10477
+
10478
+ /**
10479
+ * The base class used for constructing a fluent-menu-list custom element
10480
+ * @public
10481
+ */
10482
+ class MenuList extends FASTMenu {
10483
+ setItems() {
10484
+ var _a;
10485
+ super.setItems();
10486
+ /**
10487
+ * Set the indent attribute on MenuItem elements based on their
10488
+ * position in the MenuList. Each MenuItem element has a data-indent attribute that is
10489
+ * used to set the indent of the element's start slot content.
10490
+ */
10491
+ const filteredMenuListItems = (_a = this.menuItems) === null || _a === void 0 ? void 0 : _a.filter(this.isMenuItemElement);
10492
+ filteredMenuListItems === null || filteredMenuListItems === void 0 ? void 0 : filteredMenuListItems.forEach((item, index) => {
10493
+ const indent = filteredMenuListItems === null || filteredMenuListItems === void 0 ? void 0 : filteredMenuListItems.reduce((accum, current) => {
10494
+ const elementValue = MenuList.elementIndent(current);
10495
+ return Math.max(accum, elementValue);
10496
+ }, 0);
10497
+ if (item instanceof MenuItem) {
10498
+ item.setAttribute('data-indent', `${indent}`);
10499
+ }
10500
+ });
10501
+ }
10502
+ static elementIndent(el) {
10503
+ const role = el.getAttribute('role');
10504
+ const startSlot = el.querySelector('[slot=start]');
10505
+ if (role && role !== MenuItemRole.menuitem) {
10506
+ return startSlot ? 2 : 1;
10507
+ }
10508
+ return startSlot ? 1 : 0;
10509
+ }
10510
+ }
10511
+
10512
+ const template$9 = menuTemplate();
10513
+
10514
+ /** MenuList styles
10515
+ * @public
10516
+ */
10517
+ const styles$9 = css`
10518
+ ${display('flex')}
10519
+
10520
+ :host{flex-direction:column;height:fit-content;max-width:300px;min-width:160px;width:auto;background-color:${colorNeutralBackground1};border:1px solid ${colorTransparentStroke};border-radius:${borderRadiusMedium};box-shadow:${shadow16};padding:4px;row-gap:2px}`;
10521
+
10522
+ /**
10523
+ * The Fluent MenuList Element. Implements {@link @microsoft/fast-foundation#Menu },
10524
+ * {@link @microsoft/fast-foundation#menuTemplate}
10525
+ *
10526
+ *
10527
+ * @public
10528
+ * @remarks
10529
+ * HTML Element: <fluent-menu-list>
10530
+ */
10531
+ const definition$9 = MenuList.compose({
10532
+ name: `${FluentDesignSystem.prefix}-menu-list`,
10533
+ template: template$9,
10534
+ styles: styles$9
10535
+ });
10536
+
8608
10537
  /**
8609
10538
  * The base class used for constructing a fluent-progress-bar custom element
8610
10539
  * @public
@@ -9371,7 +11300,7 @@ const template = buttonTemplate$1();
9371
11300
 
9372
11301
  // Need to support icon hover styles
9373
11302
  const styles = css`
9374
- ${styles$h}
11303
+ ${styles$j}
9375
11304
 
9376
11305
  :host([aria-pressed="true"]) .control{border-color:${colorNeutralStroke1};background-color:${colorNeutralBackground1Selected};color:${colorNeutralForeground1};border-width:${strokeWidthThin}}:host([aria-pressed='true']:hover) .control{border-color:${colorNeutralStroke1Hover};background-color:${colorNeutralBackground1Hover}}:host([aria-pressed='true']:active) .control{border-color:${colorNeutralStroke1Pressed};background-color:${colorNeutralBackground1Pressed}}:host([aria-pressed='true'][appearance='primary']) .control{border-color:transparent;background-color:${colorBrandBackgroundSelected};color:${colorNeutralForegroundOnBrand}}:host([aria-pressed='true'][appearance='primary']:hover) .control{background-color:${colorBrandBackgroundHover}}:host([aria-pressed='true'][appearance='primary']:active) .control{background-color:${colorBrandBackgroundPressed}}:host([aria-pressed='true'][appearance='subtle']) .control{border-color:transparent;background-color:${colorSubtleBackgroundSelected};color:${colorNeutralForeground2Selected}}:host([aria-pressed='true'][appearance='subtle']:hover) .control{background-color:${colorSubtleBackgroundHover};color:${colorNeutralForeground2Hover}}:host([aria-pressed='true'][appearance='subtle']:active) .control{background-color:${colorSubtleBackgroundPressed};color:${colorNeutralForeground2Pressed}}:host([aria-pressed='true'][appearance='outline']) .control,:host([aria-pressed='true'][appearance='transparent']) .control{background-color:${colorTransparentBackgroundSelected}}:host([aria-pressed='true'][appearance='outline']:hover) .control,:host([aria-pressed='true'][appearance='transparent']:hover) .control{background-color:${colorTransparentBackgroundHover}}:host([aria-pressed='true'][appearance='outline']:active) .control,:host([aria-pressed='true'][appearance='transparent']:active) .control{background-color:${colorTransparentBackgroundPressed}}:host([aria-pressed='true'][appearance='transparent']) .control{border-color:transparent;color:${colorNeutralForeground2BrandSelected}}:host([aria-pressed='true'][appearance='transparent']:hover) .control{color:${colorNeutralForeground2BrandHover}}:host([aria-pressed='true'][appearance='transparent']:active) .control{color:${colorNeutralForeground2BrandPressed}}`;
9377
11306
 
@@ -9403,4 +11332,4 @@ const setTheme = theme => {
9403
11332
  }
9404
11333
  };
9405
11334
 
9406
- export { Accordion, AccordionItem, AccordionItemExpandIconPosition, AccordionItemSize, AnchorButton, AnchorButtonAppearance, definition$i as AnchorButtonDefinition, AnchorButtonShape, AnchorButtonSize, template$i as AnchorButtonTemplate, Avatar, AvatarActive, AvatarAppearance, AvatarColor, definition$h as AvatarDefinition, AvatarNamedColor, AvatarShape, AvatarSize, styles$f as AvatarStyles, template$h as AvatarTemplate, Badge, BadgeAppearance, BadgeColor, definition$g as BadgeDefinition, BadgeShape, BadgeSize, styles$e as BadgeStyles, template$g as BadgeTemplate, Button, ButtonAppearance, definition$f as ButtonDefinition, ButtonShape, ButtonSize, styles$h as ButtonStyles, template$f as ButtonTemplate, CompoundButton, CompoundButtonAppearance, definition$e as CompoundButtonDefinition, CompoundButtonShape, CompoundButtonSize, styles$d as CompoundButtonStyles, template$e as CompoundButtonTemplate, CounterBadge, CounterBadgeAppearance, CounterBadgeColor, definition$d as CounterBadgeDefinition, CounterBadgeShape, CounterBadgeSize, styles$c as CounterBadgeStyles, template$d as CounterBadgeTemplate, Divider, DividerAlignContent, DividerAppearance, definition$c as DividerDefinition, DividerOrientation, DividerRole, styles$b as DividerStyles, template$c as DividerTemplate, Image, definition$b as ImageDefinition, ImageFit, ImageShape, styles$a as ImageStyles, template$b as ImageTemplate, Label, definition$a as LabelDefinition, styles$9 as LabelStyles, template$a as LabelTemplate, MenuButton, MenuButtonAppearance, definition$9 as MenuButtonDefinition, MenuButtonShape, MenuButtonSize, styles$h as MenuButtonStyles, template$9 as MenuButtonTemplate, ProgressBar, definition$8 as ProgressBarDefinition, ProgressBarShape, styles$8 as ProgressBarStyles, template$8 as ProgressBarTemplate, ProgressBarThickness, ProgressBarValidationState, Slider, definition$7 as SliderDefinition, SliderOrientation, SliderSize, styles$7 as SliderStyles, template$7 as SliderTemplate, Spinner, SpinnerAppearance, definition$6 as SpinnerDefinition, SpinnerSize, styles$6 as SpinnerStyles, template$6 as SpinnerTemplate, Switch, SwitchLabelPosition, Tab, definition$3 as TabDefinition, TabPanel, definition$2 as TabPanelDefinition, styles$2 as TabPanelStyles, template$2 as TabPanelTemplate, styles$3 as TabStyles, template$3 as TabTemplate, Tabs, TabsAppearance, definition$4 as TabsDefinition, TabsOrientation, TabsSize, styles$4 as TabsStyles, template$4 as TabsTemplate, Text, TextAlign, definition$1 as TextDefinition, TextFont, TextSize, styles$1 as TextStyles, template$1 as TextTemplate, TextWeight, ToggleButton, ToggleButtonAppearance, definition as ToggleButtonDefinition, ToggleButtonShape, ToggleButtonSize, styles as ToggleButtonStyles, template as ToggleButtonTemplate, definition$k as accordionDefinition, definition$j as accordionItemDefinition, styles$i as accordionItemStyles, template$j as accordionItemTemplate, styles$j as accordionStyles, template$k as accordionTemplate, borderRadiusCircular, borderRadiusLarge, borderRadiusMedium, borderRadiusNone, borderRadiusSmall, borderRadiusXLarge, colorBackgroundOverlay, colorBrandBackground, colorBrandBackground2, colorBrandBackgroundHover, colorBrandBackgroundInverted, colorBrandBackgroundInvertedHover, colorBrandBackgroundInvertedPressed, colorBrandBackgroundInvertedSelected, colorBrandBackgroundPressed, colorBrandBackgroundSelected, colorBrandBackgroundStatic, colorBrandForeground1, colorBrandForeground2, colorBrandForegroundInverted, colorBrandForegroundInvertedHover, colorBrandForegroundInvertedPressed, colorBrandForegroundLink, colorBrandForegroundLinkHover, colorBrandForegroundLinkPressed, colorBrandForegroundLinkSelected, colorBrandForegroundOnLight, colorBrandForegroundOnLightHover, colorBrandForegroundOnLightPressed, colorBrandForegroundOnLightSelected, colorBrandShadowAmbient, colorBrandShadowKey, colorBrandStroke1, colorBrandStroke2, colorCompoundBrandBackground, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorCompoundBrandForeground1, colorCompoundBrandForeground1Hover, colorCompoundBrandForeground1Pressed, colorCompoundBrandStroke, colorCompoundBrandStrokeHover, colorCompoundBrandStrokePressed, colorNeutralBackground1, colorNeutralBackground1Hover, colorNeutralBackground1Pressed, colorNeutralBackground1Selected, colorNeutralBackground2, colorNeutralBackground2Hover, colorNeutralBackground2Pressed, colorNeutralBackground2Selected, colorNeutralBackground3, colorNeutralBackground3Hover, colorNeutralBackground3Pressed, colorNeutralBackground3Selected, colorNeutralBackground4, colorNeutralBackground4Hover, colorNeutralBackground4Pressed, colorNeutralBackground4Selected, colorNeutralBackground5, colorNeutralBackground5Hover, colorNeutralBackground5Pressed, colorNeutralBackground5Selected, colorNeutralBackground6, colorNeutralBackgroundDisabled, colorNeutralBackgroundInverted, colorNeutralBackgroundInvertedDisabled, colorNeutralBackgroundStatic, colorNeutralForeground1, colorNeutralForeground1Hover, colorNeutralForeground1Pressed, colorNeutralForeground1Selected, colorNeutralForeground1Static, colorNeutralForeground2, colorNeutralForeground2BrandHover, colorNeutralForeground2BrandPressed, colorNeutralForeground2BrandSelected, colorNeutralForeground2Hover, colorNeutralForeground2Link, colorNeutralForeground2LinkHover, colorNeutralForeground2LinkPressed, colorNeutralForeground2LinkSelected, colorNeutralForeground2Pressed, colorNeutralForeground2Selected, colorNeutralForeground3, colorNeutralForeground3BrandHover, colorNeutralForeground3BrandPressed, colorNeutralForeground3BrandSelected, colorNeutralForeground3Hover, colorNeutralForeground3Pressed, colorNeutralForeground3Selected, colorNeutralForeground4, colorNeutralForegroundDisabled, colorNeutralForegroundInverted, colorNeutralForegroundInverted2, colorNeutralForegroundInvertedDisabled, colorNeutralForegroundInvertedHover, colorNeutralForegroundInvertedLink, colorNeutralForegroundInvertedLinkHover, colorNeutralForegroundInvertedLinkPressed, colorNeutralForegroundInvertedLinkSelected, colorNeutralForegroundInvertedPressed, colorNeutralForegroundInvertedSelected, colorNeutralForegroundOnBrand, colorNeutralForegroundStaticInverted, colorNeutralShadowAmbient, colorNeutralShadowAmbientDarker, colorNeutralShadowAmbientLighter, colorNeutralShadowKey, colorNeutralShadowKeyDarker, colorNeutralShadowKeyLighter, colorNeutralStencil1, colorNeutralStencil1Alpha, colorNeutralStencil2, colorNeutralStencil2Alpha, colorNeutralStroke1, colorNeutralStroke1Hover, colorNeutralStroke1Pressed, colorNeutralStroke1Selected, colorNeutralStroke2, colorNeutralStroke3, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeAccessibleSelected, colorNeutralStrokeDisabled, colorNeutralStrokeInvertedDisabled, colorNeutralStrokeOnBrand, colorNeutralStrokeOnBrand2, colorNeutralStrokeOnBrand2Hover, colorNeutralStrokeOnBrand2Pressed, colorNeutralStrokeOnBrand2Selected, colorPaletteAnchorBackground2, colorPaletteAnchorBorderActive, colorPaletteAnchorForeground2, colorPaletteBeigeBackground2, colorPaletteBeigeBorderActive, colorPaletteBeigeForeground2, colorPaletteBerryBackground1, colorPaletteBerryBackground2, colorPaletteBerryBackground3, colorPaletteBerryBorder1, colorPaletteBerryBorder2, colorPaletteBerryBorderActive, colorPaletteBerryForeground1, colorPaletteBerryForeground2, colorPaletteBerryForeground3, colorPaletteBlueBackground2, colorPaletteBlueBorderActive, colorPaletteBlueForeground2, colorPaletteBrassBackground2, colorPaletteBrassBorderActive, colorPaletteBrassForeground2, colorPaletteBrownBackground2, colorPaletteBrownBorderActive, colorPaletteBrownForeground2, colorPaletteCornflowerBackground2, colorPaletteCornflowerBorderActive, colorPaletteCornflowerForeground2, colorPaletteCranberryBackground2, colorPaletteCranberryBorderActive, colorPaletteCranberryForeground2, colorPaletteDarkGreenBackground2, colorPaletteDarkGreenBorderActive, colorPaletteDarkGreenForeground2, colorPaletteDarkOrangeBackground1, colorPaletteDarkOrangeBackground2, colorPaletteDarkOrangeBackground3, colorPaletteDarkOrangeBorder1, colorPaletteDarkOrangeBorder2, colorPaletteDarkOrangeBorderActive, colorPaletteDarkOrangeForeground1, colorPaletteDarkOrangeForeground2, colorPaletteDarkOrangeForeground3, colorPaletteDarkRedBackground2, colorPaletteDarkRedBorderActive, colorPaletteDarkRedForeground2, colorPaletteForestBackground2, colorPaletteForestBorderActive, colorPaletteForestForeground2, colorPaletteGoldBackground2, colorPaletteGoldBorderActive, colorPaletteGoldForeground2, colorPaletteGrapeBackground2, colorPaletteGrapeBorderActive, colorPaletteGrapeForeground2, colorPaletteGreenBackground1, colorPaletteGreenBackground2, colorPaletteGreenBackground3, colorPaletteGreenBorder1, colorPaletteGreenBorder2, colorPaletteGreenBorderActive, colorPaletteGreenForeground1, colorPaletteGreenForeground2, colorPaletteGreenForeground3, colorPaletteGreenForegroundInverted, colorPaletteLavenderBackground2, colorPaletteLavenderBorderActive, colorPaletteLavenderForeground2, colorPaletteLightGreenBackground1, colorPaletteLightGreenBackground2, colorPaletteLightGreenBackground3, colorPaletteLightGreenBorder1, colorPaletteLightGreenBorder2, colorPaletteLightGreenBorderActive, colorPaletteLightGreenForeground1, colorPaletteLightGreenForeground2, colorPaletteLightGreenForeground3, colorPaletteLightTealBackground2, colorPaletteLightTealBorderActive, colorPaletteLightTealForeground2, colorPaletteLilacBackground2, colorPaletteLilacBorderActive, colorPaletteLilacForeground2, colorPaletteMagentaBackground2, colorPaletteMagentaBorderActive, colorPaletteMagentaForeground2, colorPaletteMarigoldBackground1, colorPaletteMarigoldBackground2, colorPaletteMarigoldBackground3, colorPaletteMarigoldBorder1, colorPaletteMarigoldBorder2, colorPaletteMarigoldBorderActive, colorPaletteMarigoldForeground1, colorPaletteMarigoldForeground2, colorPaletteMarigoldForeground3, colorPaletteMinkBackground2, colorPaletteMinkBorderActive, colorPaletteMinkForeground2, colorPaletteNavyBackground2, colorPaletteNavyBorderActive, colorPaletteNavyForeground2, colorPalettePeachBackground2, colorPalettePeachBorderActive, colorPalettePeachForeground2, colorPalettePinkBackground2, colorPalettePinkBorderActive, colorPalettePinkForeground2, colorPalettePlatinumBackground2, colorPalettePlatinumBorderActive, colorPalettePlatinumForeground2, colorPalettePlumBackground2, colorPalettePlumBorderActive, colorPalettePlumForeground2, colorPalettePumpkinBackground2, colorPalettePumpkinBorderActive, colorPalettePumpkinForeground2, colorPalettePurpleBackground2, colorPalettePurpleBorderActive, colorPalettePurpleForeground2, colorPaletteRedBackground1, colorPaletteRedBackground2, colorPaletteRedBackground3, colorPaletteRedBorder1, colorPaletteRedBorder2, colorPaletteRedBorderActive, colorPaletteRedForeground1, colorPaletteRedForeground2, colorPaletteRedForeground3, colorPaletteRedForegroundInverted, colorPaletteRoyalBlueBackground2, colorPaletteRoyalBlueBorderActive, colorPaletteRoyalBlueForeground2, colorPaletteSeafoamBackground2, colorPaletteSeafoamBorderActive, colorPaletteSeafoamForeground2, colorPaletteSteelBackground2, colorPaletteSteelBorderActive, colorPaletteSteelForeground2, colorPaletteTealBackground2, colorPaletteTealBorderActive, colorPaletteTealForeground2, colorPaletteYellowBackground1, colorPaletteYellowBackground2, colorPaletteYellowBackground3, colorPaletteYellowBorder1, colorPaletteYellowBorder2, colorPaletteYellowBorderActive, colorPaletteYellowForeground1, colorPaletteYellowForeground2, colorPaletteYellowForeground3, colorPaletteYellowForegroundInverted, colorScrollbarOverlay, colorStrokeFocus1, colorStrokeFocus2, colorSubtleBackground, colorSubtleBackgroundHover, colorSubtleBackgroundInverted, colorSubtleBackgroundInvertedHover, colorSubtleBackgroundInvertedPressed, colorSubtleBackgroundInvertedSelected, colorSubtleBackgroundLightAlphaHover, colorSubtleBackgroundLightAlphaPressed, colorSubtleBackgroundLightAlphaSelected, colorSubtleBackgroundPressed, colorSubtleBackgroundSelected, colorTransparentBackground, colorTransparentBackgroundHover, colorTransparentBackgroundPressed, colorTransparentBackgroundSelected, colorTransparentStroke, colorTransparentStrokeDisabled, colorTransparentStrokeInteractive, curveAccelerateMax, curveAccelerateMid, curveAccelerateMin, curveDecelerateMax, curveDecelerateMid, curveDecelerateMin, curveEasyEase, curveEasyEaseMax, curveLinear, definition$5 as definition, durationFast, durationFaster, durationNormal, durationSlow, durationSlower, durationUltraFast, durationUltraSlow, fontFamilyBase, fontFamilyMonospace, fontFamilyNumeric, fontSizeBase100, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontSizeBase500, fontSizeBase600, fontSizeHero1000, fontSizeHero700, fontSizeHero800, fontSizeHero900, fontWeightBold, fontWeightMedium, fontWeightRegular, fontWeightSemibold, lineHeightBase100, lineHeightBase200, lineHeightBase300, lineHeightBase400, lineHeightBase500, lineHeightBase600, lineHeightHero1000, lineHeightHero700, lineHeightHero800, lineHeightHero900, setTheme, shadow16, shadow16Brand, shadow2, shadow28, shadow28Brand, shadow2Brand, shadow4, shadow4Brand, shadow64, shadow64Brand, shadow8, shadow8Brand, spacingHorizontalL, spacingHorizontalM, spacingHorizontalMNudge, spacingHorizontalNone, spacingHorizontalS, spacingHorizontalSNudge, spacingHorizontalXL, spacingHorizontalXS, spacingHorizontalXXL, spacingHorizontalXXS, spacingHorizontalXXXL, spacingVerticalL, spacingVerticalM, spacingVerticalMNudge, spacingVerticalNone, spacingVerticalS, spacingVerticalSNudge, spacingVerticalXL, spacingVerticalXS, spacingVerticalXXL, spacingVerticalXXS, spacingVerticalXXXL, strokeWidthThick, strokeWidthThicker, strokeWidthThickest, strokeWidthThin, styles$5 as switchStyles, template$5 as switchTemplate };
11335
+ export { Accordion, AccordionItem, AccordionItemExpandIconPosition, AccordionItemSize, AnchorButton, AnchorButtonAppearance, definition$k as AnchorButtonDefinition, AnchorButtonShape, AnchorButtonSize, template$k as AnchorButtonTemplate, Avatar, AvatarActive, AvatarAppearance, AvatarColor, definition$j as AvatarDefinition, AvatarNamedColor, AvatarShape, AvatarSize, styles$h as AvatarStyles, template$j as AvatarTemplate, Badge, BadgeAppearance, BadgeColor, definition$i as BadgeDefinition, BadgeShape, BadgeSize, styles$g as BadgeStyles, template$i as BadgeTemplate, Button, ButtonAppearance, definition$h as ButtonDefinition, ButtonShape, ButtonSize, styles$j as ButtonStyles, template$h as ButtonTemplate, CompoundButton, CompoundButtonAppearance, definition$g as CompoundButtonDefinition, CompoundButtonShape, CompoundButtonSize, styles$f as CompoundButtonStyles, template$g as CompoundButtonTemplate, CounterBadge, CounterBadgeAppearance, CounterBadgeColor, definition$f as CounterBadgeDefinition, CounterBadgeShape, CounterBadgeSize, styles$e as CounterBadgeStyles, template$f as CounterBadgeTemplate, Divider, DividerAlignContent, DividerAppearance, definition$e as DividerDefinition, DividerOrientation, DividerRole, styles$d as DividerStyles, template$e as DividerTemplate, Image, definition$d as ImageDefinition, ImageFit, ImageShape, styles$c as ImageStyles, template$d as ImageTemplate, Label, definition$c as LabelDefinition, styles$b as LabelStyles, template$c as LabelTemplate, MenuButton, MenuButtonAppearance, definition$b as MenuButtonDefinition, MenuButtonShape, MenuButtonSize, styles$j as MenuButtonStyles, template$b as MenuButtonTemplate, MenuItem, definition$a as MenuItemDefinition, styles$a as MenuItemStyles, template$a as MenuItemTemplate, MenuList, definition$9 as MenuListDefinition, styles$9 as MenuListStyles, template$9 as MenuListTemplate, ProgressBar, definition$8 as ProgressBarDefinition, ProgressBarShape, styles$8 as ProgressBarStyles, template$8 as ProgressBarTemplate, ProgressBarThickness, ProgressBarValidationState, Slider, definition$7 as SliderDefinition, SliderOrientation, SliderSize, styles$7 as SliderStyles, template$7 as SliderTemplate, Spinner, SpinnerAppearance, definition$6 as SpinnerDefinition, SpinnerSize, styles$6 as SpinnerStyles, template$6 as SpinnerTemplate, Switch, SwitchLabelPosition, Tab, definition$3 as TabDefinition, TabPanel, definition$2 as TabPanelDefinition, styles$2 as TabPanelStyles, template$2 as TabPanelTemplate, styles$3 as TabStyles, template$3 as TabTemplate, Tabs, TabsAppearance, definition$4 as TabsDefinition, TabsOrientation, TabsSize, styles$4 as TabsStyles, template$4 as TabsTemplate, Text, TextAlign, definition$1 as TextDefinition, TextFont, TextSize, styles$1 as TextStyles, template$1 as TextTemplate, TextWeight, ToggleButton, ToggleButtonAppearance, definition as ToggleButtonDefinition, ToggleButtonShape, ToggleButtonSize, styles as ToggleButtonStyles, template as ToggleButtonTemplate, definition$m as accordionDefinition, definition$l as accordionItemDefinition, styles$k as accordionItemStyles, template$l as accordionItemTemplate, styles$l as accordionStyles, template$m as accordionTemplate, borderRadiusCircular, borderRadiusLarge, borderRadiusMedium, borderRadiusNone, borderRadiusSmall, borderRadiusXLarge, colorBackgroundOverlay, colorBrandBackground, colorBrandBackground2, colorBrandBackgroundHover, colorBrandBackgroundInverted, colorBrandBackgroundInvertedHover, colorBrandBackgroundInvertedPressed, colorBrandBackgroundInvertedSelected, colorBrandBackgroundPressed, colorBrandBackgroundSelected, colorBrandBackgroundStatic, colorBrandForeground1, colorBrandForeground2, colorBrandForegroundInverted, colorBrandForegroundInvertedHover, colorBrandForegroundInvertedPressed, colorBrandForegroundLink, colorBrandForegroundLinkHover, colorBrandForegroundLinkPressed, colorBrandForegroundLinkSelected, colorBrandForegroundOnLight, colorBrandForegroundOnLightHover, colorBrandForegroundOnLightPressed, colorBrandForegroundOnLightSelected, colorBrandShadowAmbient, colorBrandShadowKey, colorBrandStroke1, colorBrandStroke2, colorCompoundBrandBackground, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorCompoundBrandForeground1, colorCompoundBrandForeground1Hover, colorCompoundBrandForeground1Pressed, colorCompoundBrandStroke, colorCompoundBrandStrokeHover, colorCompoundBrandStrokePressed, colorNeutralBackground1, colorNeutralBackground1Hover, colorNeutralBackground1Pressed, colorNeutralBackground1Selected, colorNeutralBackground2, colorNeutralBackground2Hover, colorNeutralBackground2Pressed, colorNeutralBackground2Selected, colorNeutralBackground3, colorNeutralBackground3Hover, colorNeutralBackground3Pressed, colorNeutralBackground3Selected, colorNeutralBackground4, colorNeutralBackground4Hover, colorNeutralBackground4Pressed, colorNeutralBackground4Selected, colorNeutralBackground5, colorNeutralBackground5Hover, colorNeutralBackground5Pressed, colorNeutralBackground5Selected, colorNeutralBackground6, colorNeutralBackgroundDisabled, colorNeutralBackgroundInverted, colorNeutralBackgroundInvertedDisabled, colorNeutralBackgroundStatic, colorNeutralForeground1, colorNeutralForeground1Hover, colorNeutralForeground1Pressed, colorNeutralForeground1Selected, colorNeutralForeground1Static, colorNeutralForeground2, colorNeutralForeground2BrandHover, colorNeutralForeground2BrandPressed, colorNeutralForeground2BrandSelected, colorNeutralForeground2Hover, colorNeutralForeground2Link, colorNeutralForeground2LinkHover, colorNeutralForeground2LinkPressed, colorNeutralForeground2LinkSelected, colorNeutralForeground2Pressed, colorNeutralForeground2Selected, colorNeutralForeground3, colorNeutralForeground3BrandHover, colorNeutralForeground3BrandPressed, colorNeutralForeground3BrandSelected, colorNeutralForeground3Hover, colorNeutralForeground3Pressed, colorNeutralForeground3Selected, colorNeutralForeground4, colorNeutralForegroundDisabled, colorNeutralForegroundInverted, colorNeutralForegroundInverted2, colorNeutralForegroundInvertedDisabled, colorNeutralForegroundInvertedHover, colorNeutralForegroundInvertedLink, colorNeutralForegroundInvertedLinkHover, colorNeutralForegroundInvertedLinkPressed, colorNeutralForegroundInvertedLinkSelected, colorNeutralForegroundInvertedPressed, colorNeutralForegroundInvertedSelected, colorNeutralForegroundOnBrand, colorNeutralForegroundStaticInverted, colorNeutralShadowAmbient, colorNeutralShadowAmbientDarker, colorNeutralShadowAmbientLighter, colorNeutralShadowKey, colorNeutralShadowKeyDarker, colorNeutralShadowKeyLighter, colorNeutralStencil1, colorNeutralStencil1Alpha, colorNeutralStencil2, colorNeutralStencil2Alpha, colorNeutralStroke1, colorNeutralStroke1Hover, colorNeutralStroke1Pressed, colorNeutralStroke1Selected, colorNeutralStroke2, colorNeutralStroke3, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeAccessibleSelected, colorNeutralStrokeDisabled, colorNeutralStrokeInvertedDisabled, colorNeutralStrokeOnBrand, colorNeutralStrokeOnBrand2, colorNeutralStrokeOnBrand2Hover, colorNeutralStrokeOnBrand2Pressed, colorNeutralStrokeOnBrand2Selected, colorPaletteAnchorBackground2, colorPaletteAnchorBorderActive, colorPaletteAnchorForeground2, colorPaletteBeigeBackground2, colorPaletteBeigeBorderActive, colorPaletteBeigeForeground2, colorPaletteBerryBackground1, colorPaletteBerryBackground2, colorPaletteBerryBackground3, colorPaletteBerryBorder1, colorPaletteBerryBorder2, colorPaletteBerryBorderActive, colorPaletteBerryForeground1, colorPaletteBerryForeground2, colorPaletteBerryForeground3, colorPaletteBlueBackground2, colorPaletteBlueBorderActive, colorPaletteBlueForeground2, colorPaletteBrassBackground2, colorPaletteBrassBorderActive, colorPaletteBrassForeground2, colorPaletteBrownBackground2, colorPaletteBrownBorderActive, colorPaletteBrownForeground2, colorPaletteCornflowerBackground2, colorPaletteCornflowerBorderActive, colorPaletteCornflowerForeground2, colorPaletteCranberryBackground2, colorPaletteCranberryBorderActive, colorPaletteCranberryForeground2, colorPaletteDarkGreenBackground2, colorPaletteDarkGreenBorderActive, colorPaletteDarkGreenForeground2, colorPaletteDarkOrangeBackground1, colorPaletteDarkOrangeBackground2, colorPaletteDarkOrangeBackground3, colorPaletteDarkOrangeBorder1, colorPaletteDarkOrangeBorder2, colorPaletteDarkOrangeBorderActive, colorPaletteDarkOrangeForeground1, colorPaletteDarkOrangeForeground2, colorPaletteDarkOrangeForeground3, colorPaletteDarkRedBackground2, colorPaletteDarkRedBorderActive, colorPaletteDarkRedForeground2, colorPaletteForestBackground2, colorPaletteForestBorderActive, colorPaletteForestForeground2, colorPaletteGoldBackground2, colorPaletteGoldBorderActive, colorPaletteGoldForeground2, colorPaletteGrapeBackground2, colorPaletteGrapeBorderActive, colorPaletteGrapeForeground2, colorPaletteGreenBackground1, colorPaletteGreenBackground2, colorPaletteGreenBackground3, colorPaletteGreenBorder1, colorPaletteGreenBorder2, colorPaletteGreenBorderActive, colorPaletteGreenForeground1, colorPaletteGreenForeground2, colorPaletteGreenForeground3, colorPaletteGreenForegroundInverted, colorPaletteLavenderBackground2, colorPaletteLavenderBorderActive, colorPaletteLavenderForeground2, colorPaletteLightGreenBackground1, colorPaletteLightGreenBackground2, colorPaletteLightGreenBackground3, colorPaletteLightGreenBorder1, colorPaletteLightGreenBorder2, colorPaletteLightGreenBorderActive, colorPaletteLightGreenForeground1, colorPaletteLightGreenForeground2, colorPaletteLightGreenForeground3, colorPaletteLightTealBackground2, colorPaletteLightTealBorderActive, colorPaletteLightTealForeground2, colorPaletteLilacBackground2, colorPaletteLilacBorderActive, colorPaletteLilacForeground2, colorPaletteMagentaBackground2, colorPaletteMagentaBorderActive, colorPaletteMagentaForeground2, colorPaletteMarigoldBackground1, colorPaletteMarigoldBackground2, colorPaletteMarigoldBackground3, colorPaletteMarigoldBorder1, colorPaletteMarigoldBorder2, colorPaletteMarigoldBorderActive, colorPaletteMarigoldForeground1, colorPaletteMarigoldForeground2, colorPaletteMarigoldForeground3, colorPaletteMinkBackground2, colorPaletteMinkBorderActive, colorPaletteMinkForeground2, colorPaletteNavyBackground2, colorPaletteNavyBorderActive, colorPaletteNavyForeground2, colorPalettePeachBackground2, colorPalettePeachBorderActive, colorPalettePeachForeground2, colorPalettePinkBackground2, colorPalettePinkBorderActive, colorPalettePinkForeground2, colorPalettePlatinumBackground2, colorPalettePlatinumBorderActive, colorPalettePlatinumForeground2, colorPalettePlumBackground2, colorPalettePlumBorderActive, colorPalettePlumForeground2, colorPalettePumpkinBackground2, colorPalettePumpkinBorderActive, colorPalettePumpkinForeground2, colorPalettePurpleBackground2, colorPalettePurpleBorderActive, colorPalettePurpleForeground2, colorPaletteRedBackground1, colorPaletteRedBackground2, colorPaletteRedBackground3, colorPaletteRedBorder1, colorPaletteRedBorder2, colorPaletteRedBorderActive, colorPaletteRedForeground1, colorPaletteRedForeground2, colorPaletteRedForeground3, colorPaletteRedForegroundInverted, colorPaletteRoyalBlueBackground2, colorPaletteRoyalBlueBorderActive, colorPaletteRoyalBlueForeground2, colorPaletteSeafoamBackground2, colorPaletteSeafoamBorderActive, colorPaletteSeafoamForeground2, colorPaletteSteelBackground2, colorPaletteSteelBorderActive, colorPaletteSteelForeground2, colorPaletteTealBackground2, colorPaletteTealBorderActive, colorPaletteTealForeground2, colorPaletteYellowBackground1, colorPaletteYellowBackground2, colorPaletteYellowBackground3, colorPaletteYellowBorder1, colorPaletteYellowBorder2, colorPaletteYellowBorderActive, colorPaletteYellowForeground1, colorPaletteYellowForeground2, colorPaletteYellowForeground3, colorPaletteYellowForegroundInverted, colorScrollbarOverlay, colorStrokeFocus1, colorStrokeFocus2, colorSubtleBackground, colorSubtleBackgroundHover, colorSubtleBackgroundInverted, colorSubtleBackgroundInvertedHover, colorSubtleBackgroundInvertedPressed, colorSubtleBackgroundInvertedSelected, colorSubtleBackgroundLightAlphaHover, colorSubtleBackgroundLightAlphaPressed, colorSubtleBackgroundLightAlphaSelected, colorSubtleBackgroundPressed, colorSubtleBackgroundSelected, colorTransparentBackground, colorTransparentBackgroundHover, colorTransparentBackgroundPressed, colorTransparentBackgroundSelected, colorTransparentStroke, colorTransparentStrokeDisabled, colorTransparentStrokeInteractive, curveAccelerateMax, curveAccelerateMid, curveAccelerateMin, curveDecelerateMax, curveDecelerateMid, curveDecelerateMin, curveEasyEase, curveEasyEaseMax, curveLinear, definition$5 as definition, durationFast, durationFaster, durationNormal, durationSlow, durationSlower, durationUltraFast, durationUltraSlow, fontFamilyBase, fontFamilyMonospace, fontFamilyNumeric, fontSizeBase100, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontSizeBase500, fontSizeBase600, fontSizeHero1000, fontSizeHero700, fontSizeHero800, fontSizeHero900, fontWeightBold, fontWeightMedium, fontWeightRegular, fontWeightSemibold, lineHeightBase100, lineHeightBase200, lineHeightBase300, lineHeightBase400, lineHeightBase500, lineHeightBase600, lineHeightHero1000, lineHeightHero700, lineHeightHero800, lineHeightHero900, setTheme, shadow16, shadow16Brand, shadow2, shadow28, shadow28Brand, shadow2Brand, shadow4, shadow4Brand, shadow64, shadow64Brand, shadow8, shadow8Brand, spacingHorizontalL, spacingHorizontalM, spacingHorizontalMNudge, spacingHorizontalNone, spacingHorizontalS, spacingHorizontalSNudge, spacingHorizontalXL, spacingHorizontalXS, spacingHorizontalXXL, spacingHorizontalXXS, spacingHorizontalXXXL, spacingVerticalL, spacingVerticalM, spacingVerticalMNudge, spacingVerticalNone, spacingVerticalS, spacingVerticalSNudge, spacingVerticalXL, spacingVerticalXS, spacingVerticalXXL, spacingVerticalXXS, spacingVerticalXXXL, strokeWidthThick, strokeWidthThicker, strokeWidthThickest, strokeWidthThin, styles$5 as switchStyles, template$5 as switchTemplate };