@mintplayer/web-components 2.1.1 → 2.3.0

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 (128) hide show
  1. package/a11y/index.mjs +26 -2
  2. package/a11y/src/dismiss-stack.d.ts +25 -0
  3. package/a11y/src/error-text.d.ts +41 -0
  4. package/a11y/src/focus-restore.d.ts +116 -0
  5. package/a11y/src/focus-trap.d.ts +69 -0
  6. package/a11y/src/form-associated.d.ts +48 -0
  7. package/a11y/src/host-aria.d.ts +154 -0
  8. package/a11y/src/index.d.ts +16 -0
  9. package/a11y/src/inert-regions.d.ts +52 -0
  10. package/a11y/src/live-announcer.d.ts +8 -0
  11. package/a11y/src/roving-focus.d.ts +118 -0
  12. package/a11y/src/testing/expect-idref-resolves.d.ts +31 -0
  13. package/a11y/src/testing/index.d.ts +1 -0
  14. package/accordion/index.d.ts +1 -0
  15. package/accordion/index.mjs +549 -0
  16. package/accordion/src/components/index.d.ts +3 -0
  17. package/accordion/src/components/mp-accordion-tab.d.ts +30 -0
  18. package/accordion/src/components/mp-accordion.d.ts +66 -0
  19. package/accordion/src/index.d.ts +3 -0
  20. package/accordion/src/styles/index.d.ts +1 -0
  21. package/calendar/index.mjs +1 -1
  22. package/calendar/src/mp-calendar.element.d.ts +2 -0
  23. package/carousel/index.d.ts +1 -0
  24. package/carousel/index.mjs +994 -0
  25. package/carousel/src/components/index.d.ts +1 -0
  26. package/carousel/src/components/mp-carousel.d.ts +58 -0
  27. package/carousel/src/index.d.ts +3 -0
  28. package/carousel/src/styles/index.d.ts +1 -0
  29. package/carousel/src/types/carousel.d.ts +10 -0
  30. package/carousel/src/types/index.d.ts +1 -0
  31. package/checkbox/index.mjs +1 -1
  32. package/checkbox/src/components/mp-checkbox.d.ts +59 -1
  33. package/chunks/focus-restore-DxuP1Oe2.mjs +94 -0
  34. package/chunks/focus-trap-DTOLJ5bb.mjs +121 -0
  35. package/chunks/form-associated-axmc5sY0.mjs +58 -0
  36. package/chunks/host-aria-WSGs7SPQ.mjs +152 -0
  37. package/chunks/inert-regions-DXCnn1LN.mjs +48 -0
  38. package/chunks/invalid-feedback.styles-he0JYrJm.mjs +11 -0
  39. package/chunks/{live-announcer-CZDTKulf.mjs → live-announcer-Bi0orG4n.mjs} +9 -9
  40. package/chunks/{mp-calendar.element-UC68iDbi.mjs → mp-calendar.element-u6uS31_j.mjs} +136 -105
  41. package/chunks/mp-checkbox-Ph2mMRGz.mjs +312 -0
  42. package/chunks/{mp-datatable-Bfw0KGkV.mjs → mp-datatable-BwTlh9A_.mjs} +265 -103
  43. package/chunks/{mp-pagination-BGxsawFL.mjs → mp-pagination-Dea75mD4.mjs} +25 -22
  44. package/chunks/mp-radio-BjW1HNSc.mjs +300 -0
  45. package/chunks/{mp-select-BDS1-YGn.mjs → mp-select-Ctu-v1-p.mjs} +163 -40
  46. package/chunks/{mp-splitter-C8cGCmac.mjs → mp-splitter-LszuRDbR.mjs} +53 -46
  47. package/chunks/{mp-tab-page-D1b4x-y2.mjs → mp-tab-page-CaCzX1ym.mjs} +46 -45
  48. package/chunks/{mp-timepicker.element-BwEiwX92.mjs → mp-timepicker.element-Bz393NDQ.mjs} +93 -86
  49. package/chunks/{mp-toggle-button-dLZNDUVz.mjs → mp-toggle-button-Kz6sIgBJ.mjs} +131 -37
  50. package/chunks/{mp-treeview-C48F63xb.mjs → mp-treeview-tkWu28iF.mjs} +67 -43
  51. package/chunks/overlay-controller-DPt13i8p.mjs +314 -0
  52. package/chunks/roving-focus-CrL9982a.mjs +129 -0
  53. package/code-snippet/index.mjs +21 -13
  54. package/code-snippet/src/mp-code-snippet.element.d.ts +6 -0
  55. package/datatable/index.mjs +1 -1
  56. package/datatable/src/components/mp-datatable.d.ts +50 -0
  57. package/datatable/src/types/index.d.ts +2 -0
  58. package/datatable/src/types/labels.d.ts +30 -0
  59. package/datepicker/index.mjs +45 -22
  60. package/datepicker/src/mp-datepicker.element.d.ts +30 -0
  61. package/datetime-picker/index.mjs +15 -9
  62. package/dock/index.mjs +365 -209
  63. package/dock/src/components/mint-dock-manager.element.d.ts +63 -3
  64. package/dropdown-menu/index.mjs +135 -90
  65. package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +12 -3
  66. package/file-manager/index.mjs +279 -214
  67. package/file-manager/src/components/mp-file-manager.d.ts +22 -0
  68. package/file-manager/src/types/messages.d.ts +9 -0
  69. package/multi-range/index.mjs +26 -10
  70. package/multi-range/src/mint-multi-range.element.d.ts +7 -0
  71. package/navbar/index.mjs +53 -39
  72. package/navbar/src/components/mp-navbar.d.ts +1 -0
  73. package/otp-input/index.mjs +82 -48
  74. package/otp-input/src/mint-otp-input.element.d.ts +31 -3
  75. package/overlay/index.mjs +2 -258
  76. package/overlay/src/overlay-controller.d.ts +64 -4
  77. package/package.json +21 -1
  78. package/pagination/index.mjs +1 -1
  79. package/query-builder/index.mjs +117 -87
  80. package/query-builder/src/model/messages.d.ts +9 -0
  81. package/radio/index.mjs +2 -160
  82. package/radio/src/components/mp-radio.d.ts +58 -3
  83. package/radio-group/index.d.ts +1 -0
  84. package/radio-group/index.mjs +145 -0
  85. package/radio-group/src/components/mp-radio-group.d.ts +52 -0
  86. package/radio-group/src/index.d.ts +1 -0
  87. package/radio-group/src/styles/radio-group.styles.d.ts +2 -0
  88. package/ribbon/index.mjs +316 -304
  89. package/ribbon/src/mp-ribbon.element.d.ts +16 -0
  90. package/scheduler/index.mjs +219 -132
  91. package/scheduler/src/components/mp-scheduler.d.ts +3 -0
  92. package/scheduler/src/views/base-view.d.ts +23 -0
  93. package/select/index.mjs +1 -1
  94. package/select/src/components/mp-select.d.ts +60 -3
  95. package/shell/index.mjs +142 -31
  96. package/shell/src/components/mp-shell.d.ts +1 -0
  97. package/signature-pad/index.d.ts +1 -0
  98. package/signature-pad/index.mjs +230 -0
  99. package/signature-pad/src/index.d.ts +2 -0
  100. package/signature-pad/src/mp-signature-pad.element.d.ts +143 -0
  101. package/signature-pad/src/mp-signature-pad.element.template.d.ts +2 -0
  102. package/signature-pad/src/types/signature.d.ts +12 -0
  103. package/splitter/index.mjs +1 -1
  104. package/splitter/src/components/mp-splitter.d.ts +7 -0
  105. package/splitter/src/index.d.ts +1 -1
  106. package/swiper-core/index.d.ts +1 -0
  107. package/swiper-core/index.mjs +184 -0
  108. package/swiper-core/src/index-machine.d.ts +59 -0
  109. package/swiper-core/src/index.d.ts +4 -0
  110. package/swiper-core/src/keymap.d.ts +2 -0
  111. package/swiper-core/src/models/index.d.ts +1 -0
  112. package/swiper-core/src/models/types.d.ts +99 -0
  113. package/swiper-core/src/pointer-arbiter.d.ts +45 -0
  114. package/tab-control/index.mjs +1 -1
  115. package/tile-manager/index.mjs +110 -93
  116. package/timeline/index.mjs +138 -54
  117. package/timeline/src/components/mp-timeline.d.ts +15 -0
  118. package/timepicker/index.mjs +1 -1
  119. package/timepicker/src/mp-time-list.element.d.ts +13 -4
  120. package/timepicker/src/mp-timepicker.element.d.ts +29 -0
  121. package/toggle-button/index.mjs +1 -1
  122. package/toggle-button/src/components/mp-toggle-button.d.ts +32 -1
  123. package/tree-select/index.mjs +233 -121
  124. package/tree-select/src/components/mp-tree-select.d.ts +37 -0
  125. package/treeview/index.mjs +1 -1
  126. package/treeview/src/components/mp-treeview.d.ts +10 -1
  127. package/chunks/mp-checkbox-BokLL7BS.mjs +0 -211
  128. package/dropdown/src/styles/dropdown.styles.d.ts +0 -2
package/ribbon/index.mjs CHANGED
@@ -1,15 +1,15 @@
1
- import { LitElement as w, css as g, nothing as B, html as d } from "lit";
1
+ import { LitElement as k, css as g, nothing as L, html as d } from "lit";
2
2
  import { property as l, state as _, query as S } from "lit/decorators.js";
3
- import { L as se } from "../chunks/live-announcer-CZDTKulf.mjs";
4
- import { OverlayController as G } from "../overlay/index.mjs";
5
- var be = Object.defineProperty, F = (s, e, o, r) => {
6
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
7
- (n = s[i]) && (t = n(e, o, t) || t);
8
- return t && be(e, o, t), t;
3
+ import { L as se } from "../chunks/live-announcer-Bi0orG4n.mjs";
4
+ import { O as G } from "../chunks/overlay-controller-DPt13i8p.mjs";
5
+ var be = Object.defineProperty, A = (s, e, i, r) => {
6
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
7
+ (n = s[o]) && (t = n(e, i, t) || t);
8
+ return t && be(e, i, t), t;
9
9
  };
10
- class k extends w {
10
+ class y extends k {
11
11
  constructor() {
12
- super(), this.activeTabId = "", this.tabsList = [], this.contextualSets = [], this.contentSlot = null, this.layout = "classic", this.minimized = !1, this.version = "office-2016", this.colorScheme = "auto", this.touchMode = "auto", this.keyTips = "on", this.keyTipMode = "off", this.keyTipBadges = [], this.currentTabIndex = 0, this.reflowFrame = 0, this.naturalWidths = /* @__PURE__ */ new WeakMap(), this.liveAnnouncer = new se(this), this.collapsedGroupLabels = /* @__PURE__ */ new WeakMap(), this.previousCollapsedGroups = /* @__PURE__ */ new Set(), this.contextualSetHiddenState = /* @__PURE__ */ new Map(), this.appliedReduceSteps = /* @__PURE__ */ new WeakMap(), this.originalItemSizes = /* @__PURE__ */ new WeakMap(), this.altPressed = !1, this.altUsedForCombo = !1, this.onKeyTipKeyDown = (e) => {
12
+ super(), this.activeTabId = "", this.tabsList = [], this.contextualSets = [], this.contentSlot = null, this.layout = "classic", this.regionLabel = "Ribbon", this.minimized = !1, this.version = "office-2016", this.colorScheme = "auto", this.touchMode = "auto", this.keyTips = "on", this.keyTipMode = "off", this.keyTipBadges = [], this.currentTabIndex = 0, this.reflowFrame = 0, this.naturalWidths = /* @__PURE__ */ new WeakMap(), this.liveAnnouncer = new se(this), this.collapsedGroupLabels = /* @__PURE__ */ new WeakMap(), this.previousCollapsedGroups = /* @__PURE__ */ new Set(), this.contextualSetHiddenState = /* @__PURE__ */ new Map(), this.appliedReduceSteps = /* @__PURE__ */ new WeakMap(), this.originalItemSizes = /* @__PURE__ */ new WeakMap(), this.lastAppliedRegionLabel = null, this.altPressed = !1, this.altUsedForCombo = !1, this.onKeyTipKeyDown = (e) => {
13
13
  if (this.keyTips === "on") {
14
14
  if (e.key === "Alt" && !e.repeat) {
15
15
  this.altPressed = !0, this.altUsedForCombo = !1;
@@ -25,7 +25,7 @@ class k extends w {
25
25
  return;
26
26
  }
27
27
  if (e.key.length === 1) {
28
- const o = e.key.toUpperCase(), r = this.keyTipBadges.find((t) => t.tip === o);
28
+ const i = e.key.toUpperCase(), r = this.keyTipBadges.find((t) => t.tip === i);
29
29
  if (!r) return;
30
30
  if (e.preventDefault(), this.keyTipMode === "tabs") {
31
31
  const t = r.target.getAttribute("data-tab-id");
@@ -49,34 +49,34 @@ class k extends w {
49
49
  return;
50
50
  }
51
51
  if (e.ctrlKey && (e.key === "ArrowLeft" || e.key === "ArrowRight")) {
52
- const o = e.composedPath();
53
- if (o.some((t) => t instanceof HTMLElement && t.getAttribute("role") === "tab"))
52
+ const i = e.composedPath();
53
+ if (i.some((t) => t instanceof HTMLElement && t.getAttribute("role") === "tab"))
54
54
  return;
55
- const r = o.find(
55
+ const r = i.find(
56
56
  (t) => t instanceof HTMLElement && t.tagName === "MP-RIBBON-GROUP"
57
57
  );
58
58
  if (r) {
59
- const i = !(getComputedStyle(this).direction === "rtl"), n = e.key === "ArrowRight" === i ? 1 : -1;
59
+ const o = !(getComputedStyle(this).direction === "rtl"), n = e.key === "ArrowRight" === o ? 1 : -1;
60
60
  this.moveFocusBetweenGroups(r, n) && e.preventDefault();
61
61
  }
62
62
  }
63
63
  }, this.onContextualVisibilityChange = (e) => {
64
- const o = e.detail;
65
- if (o?.label) {
66
- const r = this.contextualSetHiddenState.get(o.label);
67
- r !== void 0 && r !== o.hidden && this.liveAnnouncer.announce(
68
- o.hidden ? `${o.label}, contextual, hidden` : `${o.label}, contextual, now available`
69
- ), this.contextualSetHiddenState.set(o.label, o.hidden);
64
+ const i = e.detail;
65
+ if (i?.label) {
66
+ const r = this.contextualSetHiddenState.get(i.label);
67
+ r !== void 0 && r !== i.hidden && this.liveAnnouncer.announce(
68
+ i.hidden ? `${i.label}, contextual, hidden` : `${i.label}, contextual, now available`
69
+ ), this.contextualSetHiddenState.set(i.label, i.hidden);
70
70
  }
71
71
  this.contentSlot && this.processSlot(this.contentSlot);
72
72
  }, this.onSlotChange = (e) => {
73
- const o = e.target;
74
- this.contentSlot = o, this.processSlot(o);
73
+ const i = e.target;
74
+ this.contentSlot = i, this.processSlot(i);
75
75
  }, this.onTabListKeydown = (e) => {
76
- const { key: o } = e;
76
+ const { key: i } = e;
77
77
  let r = !1;
78
78
  const t = getComputedStyle(this).direction === "rtl";
79
- switch (o) {
79
+ switch (i) {
80
80
  case "ArrowLeft":
81
81
  t ? this.focusNextTab() : this.focusPreviousTab(), r = !0;
82
82
  break;
@@ -97,9 +97,9 @@ class k extends w {
97
97
  break;
98
98
  case "Enter":
99
99
  case " ":
100
- const i = this.tabElements[this.currentTabIndex];
101
- if (i) {
102
- const n = i.getAttribute("data-tab-id");
100
+ const o = this.tabElements[this.currentTabIndex];
101
+ if (o) {
102
+ const n = o.getAttribute("data-tab-id");
103
103
  n && (this.selectTab(n), r = !0);
104
104
  }
105
105
  break;
@@ -607,8 +607,12 @@ class k extends w {
607
607
  get tabElements() {
608
608
  return Array.from(this.renderRoot.querySelectorAll('[role="tab"]'));
609
609
  }
610
+ applyRegionLabel() {
611
+ const e = this.getAttribute("aria-label");
612
+ e !== null && e !== this.lastAppliedRegionLabel && e !== this.regionLabel || (this.setAttribute("aria-label", this.regionLabel), this.lastAppliedRegionLabel = this.regionLabel);
613
+ }
610
614
  connectedCallback() {
611
- super.connectedCallback(), this.setAttribute("role", "region"), this.setAttribute("aria-label", "Ribbon"), typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver(() => this.scheduleReflow()), this.resizeObserver.observe(this)), this.addEventListener(
615
+ super.connectedCallback(), this.hasAttribute("role") || this.setAttribute("role", "region"), this.applyRegionLabel(), typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver(() => this.scheduleReflow()), this.resizeObserver.observe(this)), this.addEventListener(
612
616
  "contextual-visibility-change",
613
617
  this.onContextualVisibilityChange
614
618
  ), this.addEventListener("keydown", this.onHostKeyDown), document.addEventListener("keydown", this.onKeyTipKeyDown), document.addEventListener("keyup", this.onKeyTipKeyUp);
@@ -647,12 +651,12 @@ class k extends w {
647
651
  * 4. Other letters of the label.
648
652
  * 5. Digits 1-9 then 0 (fallback when every letter is taken).
649
653
  */
650
- allocateKeyTip(e, o, r) {
651
- if (o) {
652
- const n = o.toUpperCase().slice(0, 1);
654
+ allocateKeyTip(e, i, r) {
655
+ if (i) {
656
+ const n = i.toUpperCase().slice(0, 1);
653
657
  return r.add(n), n;
654
658
  }
655
- const t = (e ?? "").toUpperCase(), i = (n) => "AEIOU".includes(n);
659
+ const t = (e ?? "").toUpperCase(), o = (n) => "AEIOU".includes(n);
656
660
  if (t.length > 0) {
657
661
  const n = t[0];
658
662
  if (/[A-Z0-9]/.test(n) && !r.has(n))
@@ -660,7 +664,7 @@ class k extends w {
660
664
  }
661
665
  for (let n = 1; n < t.length; n++) {
662
666
  const b = t[n];
663
- if (/[A-Z]/.test(b) && !i(b) && !r.has(b))
667
+ if (/[A-Z]/.test(b) && !o(b) && !r.has(b))
664
668
  return r.add(b), b;
665
669
  }
666
670
  for (let n = 0; n < t.length; n++) {
@@ -675,30 +679,30 @@ class k extends w {
675
679
  }
676
680
  /** Compute key-tip badges anchored under each tab button in the strip. */
677
681
  deriveTabBadges() {
678
- const e = [], o = /* @__PURE__ */ new Set(), r = this.tabElements;
682
+ const e = [], i = /* @__PURE__ */ new Set(), r = this.tabElements;
679
683
  for (const t of r) {
680
- const i = t.getAttribute("data-tab-id") ?? "", n = this.tabsList.find((u) => u.tabId === i)?.element, b = t.getAttribute("data-key-tip") ?? n?.getAttribute("data-key-tip") ?? null, c = t.textContent ?? "", a = this.allocateKeyTip(c, b, o), h = t.getBoundingClientRect();
684
+ const o = t.getAttribute("data-tab-id") ?? "", n = this.tabsList.find((u) => u.tabId === o)?.element, b = t.getAttribute("data-key-tip") ?? n?.getAttribute("data-key-tip") ?? null, c = t.textContent ?? "", a = this.allocateKeyTip(c, b, i), h = t.getBoundingClientRect();
681
685
  e.push({ tip: a, target: t, rect: { left: h.left + 4, top: h.bottom - 4 } });
682
686
  }
683
687
  return e;
684
688
  }
685
689
  /** Compute key-tip badges for every item inside the currently active tab. */
686
690
  deriveItemBadges() {
687
- const e = this.tabsList.find((i) => i.tabId === this.activeTabId);
691
+ const e = this.tabsList.find((o) => o.tabId === this.activeTabId);
688
692
  if (!e) return [];
689
- const o = this.collectActiveGroups(e.element), r = /* @__PURE__ */ new Set(), t = [];
690
- for (const i of o) {
691
- if (i.getAttribute("data-resolved-size") === "popup") {
692
- const b = i.shadowRoot?.querySelector(
693
+ const i = this.collectActiveGroups(e.element), r = /* @__PURE__ */ new Set(), t = [];
694
+ for (const o of i) {
695
+ if (o.getAttribute("data-resolved-size") === "popup") {
696
+ const b = o.shadowRoot?.querySelector(
693
697
  ".ribbon-popup-trigger"
694
698
  );
695
699
  if (b) {
696
- const c = i.getAttribute("data-key-tip"), a = i.getAttribute("label") ?? "", h = this.allocateKeyTip(a, c, r), u = b.getBoundingClientRect();
700
+ const c = o.getAttribute("data-key-tip"), a = o.getAttribute("label") ?? "", h = this.allocateKeyTip(a, c, r), u = b.getBoundingClientRect();
697
701
  t.push({ tip: h, target: b, rect: { left: u.left + 4, top: u.bottom - 6 } });
698
702
  }
699
703
  continue;
700
704
  }
701
- const n = this.collectGroupItems(i);
705
+ const n = this.collectGroupItems(o);
702
706
  for (const b of n) {
703
707
  if (b.hasAttribute("disabled")) continue;
704
708
  const c = b.getAttribute("data-key-tip"), a = b.getAttribute("label") ?? "", h = this.allocateKeyTip(a, c, r), u = b.getBoundingClientRect();
@@ -716,33 +720,33 @@ class k extends w {
716
720
  })
717
721
  );
718
722
  }
719
- moveFocusBetweenGroups(e, o) {
723
+ moveFocusBetweenGroups(e, i) {
720
724
  const r = this.tabsList.find((c) => c.tabId === this.activeTabId);
721
725
  if (!r) return !1;
722
726
  const t = this.collectActiveGroups(r.element).filter(
723
727
  (c) => c.getAttribute("data-resolved-size") !== "popup" || c.hasAttribute("data-popup-open")
724
728
  );
725
729
  if (t.length === 0) return !1;
726
- const i = t.indexOf(e);
727
- if (i === -1) return !1;
728
- const n = i + o;
730
+ const o = t.indexOf(e);
731
+ if (o === -1) return !1;
732
+ const n = o + i;
729
733
  if (n < 0 || n >= t.length) return !1;
730
734
  const b = this.firstFocusableInGroup(t[n]);
731
735
  return b ? (b.focus(), !0) : !1;
732
736
  }
733
737
  firstFocusableInGroup(e) {
734
- const o = Array.from(
738
+ const i = Array.from(
735
739
  e.querySelectorAll(
736
740
  "mp-ribbon-button, mp-ribbon-toggle-button, mp-ribbon-checkbox, mp-ribbon-combobox, mp-ribbon-color-picker, mp-ribbon-group-button, mp-ribbon-split-button, mp-ribbon-dropdown-button, mp-ribbon-gallery, mp-ribbon-template-item"
737
741
  )
738
742
  ).filter((r) => !r.hasAttribute("disabled"));
739
- return o.length === 0 ? null : o.find((r) => r.getAttribute("tabindex") === "0") ?? o[0];
743
+ return i.length === 0 ? null : i.find((r) => r.getAttribute("tabindex") === "0") ?? i[0];
740
744
  }
741
745
  updated(e) {
742
- if (!this.activeTabId && this.tabsList.length > 0 && (this.activeTabId = this.tabsList[0].tabId), e.has("activeTabId")) {
746
+ if (e.has("regionLabel") && this.applyRegionLabel(), !this.activeTabId && this.tabsList.length > 0 && (this.activeTabId = this.tabsList[0].tabId), e.has("activeTabId")) {
743
747
  this.applyActiveAttribute();
744
- const o = this.tabsList.findIndex((r) => r.tabId === this.activeTabId);
745
- o >= 0 && (this.currentTabIndex = o);
748
+ const i = this.tabsList.findIndex((r) => r.tabId === this.activeTabId);
749
+ i >= 0 && (this.currentTabIndex = i);
746
750
  }
747
751
  (e.has("activeTabId") || e.has("minimized")) && this.scheduleReflow(), e.has("minimized") && e.get("minimized") !== void 0 && this.liveAnnouncer.announce(
748
752
  this.minimized ? "Ribbon minimized" : "Ribbon restored"
@@ -759,10 +763,10 @@ class k extends w {
759
763
  * the FR-6 path) when switching back to Classic.
760
764
  */
761
765
  applyLayoutPropagation() {
762
- const e = this.layout === "simplified" ? "simplified" : "classic", o = this.querySelectorAll(
766
+ const e = this.layout === "simplified" ? "simplified" : "classic", i = this.querySelectorAll(
763
767
  "mp-ribbon-tab, mp-ribbon-group, mp-ribbon-button, mp-ribbon-toggle-button, mp-ribbon-checkbox, mp-ribbon-combobox, mp-ribbon-color-picker, mp-ribbon-group-button, mp-ribbon-split-button, mp-ribbon-dropdown-button, mp-ribbon-gallery"
764
768
  );
765
- for (const t of Array.from(o))
769
+ for (const t of Array.from(i))
766
770
  t.setAttribute("data-ribbon-layout", e);
767
771
  const r = this.querySelectorAll(
768
772
  "mp-ribbon-button, mp-ribbon-toggle-button, mp-ribbon-checkbox, mp-ribbon-combobox, mp-ribbon-color-picker, mp-ribbon-group-button, mp-ribbon-split-button, mp-ribbon-dropdown-button, mp-ribbon-gallery"
@@ -770,15 +774,15 @@ class k extends w {
770
774
  if (this.layout === "simplified")
771
775
  for (const t of Array.from(r)) {
772
776
  if (!this.originalItemSizes.has(t)) {
773
- const i = t.getAttribute("size") ?? "medium";
774
- this.originalItemSizes.set(t, i);
777
+ const o = t.getAttribute("size") ?? "medium";
778
+ this.originalItemSizes.set(t, o);
775
779
  }
776
780
  t.getAttribute("size") !== "small" && t.setAttribute("size", "small");
777
781
  }
778
782
  else
779
783
  for (const t of Array.from(r)) {
780
- const i = this.originalItemSizes.get(t);
781
- i && t.getAttribute("size") !== i && t.setAttribute("size", i);
784
+ const o = this.originalItemSizes.get(t);
785
+ o && t.getAttribute("size") !== o && t.setAttribute("size", o);
782
786
  }
783
787
  }
784
788
  render() {
@@ -797,11 +801,16 @@ class k extends w {
797
801
  </div>
798
802
  </div>
799
803
 
800
- ${this.minimized ? d`<div hidden><slot @slotchange="${this.onSlotChange}"></slot></div>` : d`<div class="ribbon-content">
804
+ ${this.minimized ? d`<div hidden><slot @slotchange="${this.onSlotChange}"></slot></div>` : d`<div
805
+ class="ribbon-content"
806
+ role="tabpanel"
807
+ id="ribbon-active-panel"
808
+ aria-labelledby="ribbon-tab-${this.activeTabId}"
809
+ >
801
810
  <slot @slotchange="${this.onSlotChange}"></slot>
802
811
  </div>`}
803
812
  </div>
804
- ${this.keyTipMode !== "off" ? this.renderKeyTipOverlay() : B}
813
+ ${this.keyTipMode !== "off" ? this.renderKeyTipOverlay() : L}
805
814
  ${this.liveAnnouncer.template()}
806
815
  `;
807
816
  }
@@ -820,17 +829,17 @@ class k extends w {
820
829
  }
821
830
  renderTabStripItems() {
822
831
  const e = [];
823
- let o = 0;
824
- for (; o < this.tabsList.length; ) {
825
- const r = this.tabsList[o];
832
+ let i = 0;
833
+ for (; i < this.tabsList.length; ) {
834
+ const r = this.tabsList[i];
826
835
  if (!r.contextualColor || !r.contextualSetLabel) {
827
- e.push(this.renderTabButton(r, o)), o++;
836
+ e.push(this.renderTabButton(r, i)), i++;
828
837
  continue;
829
838
  }
830
- const t = r.contextualSetLabel, i = r.contextualColor, n = o;
831
- for (; o < this.tabsList.length && this.tabsList[o].contextualSetLabel === t && this.tabsList[o].contextualColor === i; )
832
- o++;
833
- const b = this.tabsList.slice(n, o), c = this.getBandTextColor(i), a = `--bs-ribbon-contextual-color: ${i};--ribbon-contextual-text: ${c};`;
839
+ const t = r.contextualSetLabel, o = r.contextualColor, n = i;
840
+ for (; i < this.tabsList.length && this.tabsList[i].contextualSetLabel === t && this.tabsList[i].contextualColor === o; )
841
+ i++;
842
+ const b = this.tabsList.slice(n, i), c = this.getBandTextColor(o), a = `--bs-ribbon-contextual-color: ${o};--ribbon-contextual-text: ${c};`;
834
843
  e.push(d`
835
844
  <div class="ribbon-contextual-group" style="${a}">
836
845
  <div class="ribbon-contextual-group-band">${t}</div>
@@ -850,21 +859,21 @@ class k extends w {
850
859
  * 6-digit hex; falls back to dark on parse failure (safe default).
851
860
  */
852
861
  getBandTextColor(e) {
853
- const o = e.replace("#", "").trim();
854
- if (o.length !== 6 || !/^[0-9a-fA-F]{6}$/.test(o)) return "#262626";
855
- const r = parseInt(o.substring(0, 2), 16) / 255, t = parseInt(o.substring(2, 4), 16) / 255, i = parseInt(o.substring(4, 6), 16) / 255;
856
- return 0.2126 * r + 0.7152 * t + 0.0722 * i >= 0.6 ? "#262626" : "#FFFFFF";
862
+ const i = e.replace("#", "").trim();
863
+ if (i.length !== 6 || !/^[0-9a-fA-F]{6}$/.test(i)) return "#262626";
864
+ const r = parseInt(i.substring(0, 2), 16) / 255, t = parseInt(i.substring(2, 4), 16) / 255, o = parseInt(i.substring(4, 6), 16) / 255;
865
+ return 0.2126 * r + 0.7152 * t + 0.0722 * o >= 0.6 ? "#262626" : "#FFFFFF";
857
866
  }
858
- renderTabButton(e, o) {
859
- const r = e.tabId === this.activeTabId, t = !!e.contextualColor, i = r ? 0 : -1;
867
+ renderTabButton(e, i) {
868
+ const r = e.tabId === this.activeTabId, t = !!e.contextualColor, o = r ? 0 : -1;
860
869
  return d`
861
870
  <button
862
871
  role="tab"
863
872
  id="ribbon-tab-${e.tabId}"
864
873
  class="ribbon-tab ${r ? "active" : ""} ${t ? "contextual" : ""}"
865
874
  aria-selected="${r}"
866
- aria-controls="ribbon-panel-${e.tabId}"
867
- tabindex="${i}"
875
+ aria-controls="ribbon-active-panel"
876
+ tabindex="${o}"
868
877
  data-tab-id="${e.tabId}"
869
878
  @click="${() => this.selectTab(e.tabId)}"
870
879
  @dblclick="${() => this.toggleMinimizedFromUser()}"
@@ -872,19 +881,19 @@ class k extends w {
872
881
  `;
873
882
  }
874
883
  processSlot(e) {
875
- const o = [], r = [];
876
- for (const i of e.assignedElements()) {
884
+ const i = [], r = [];
885
+ for (const o of e.assignedElements()) {
877
886
  let n = null;
878
- if (i.tagName === "MP-RIBBON-CONTEXTUAL-TAB-SET" ? n = i : n = i.querySelector(
887
+ if (o.tagName === "MP-RIBBON-CONTEXTUAL-TAB-SET" ? n = o : n = o.querySelector(
879
888
  "mp-ribbon-contextual-tab-set"
880
889
  ), n) {
881
- if (n.hasAttribute("hidden") || i.hasAttribute("hidden")) continue;
890
+ if (n.hasAttribute("hidden") || o.hasAttribute("hidden")) continue;
882
891
  const a = n.getAttribute("color") ?? "#5BAEFF", h = n.getAttribute("label") ?? "", u = Array.from(
883
892
  n.querySelectorAll("mp-ribbon-tab")
884
893
  ), f = [];
885
894
  for (const m of u) {
886
895
  const x = m.getAttribute("tab-id") ?? "";
887
- o.push({
896
+ i.push({
888
897
  tabId: x,
889
898
  label: m.getAttribute("label") ?? "",
890
899
  element: m,
@@ -896,25 +905,25 @@ class k extends w {
896
905
  continue;
897
906
  }
898
907
  let b = null;
899
- i.tagName === "MP-RIBBON-TAB" ? b = i : b = i.querySelector("mp-ribbon-tab"), b && o.push({
908
+ o.tagName === "MP-RIBBON-TAB" ? b = o : b = o.querySelector("mp-ribbon-tab"), b && i.push({
900
909
  tabId: b.getAttribute("tab-id") ?? "",
901
910
  label: b.getAttribute("label") ?? "",
902
911
  element: b
903
912
  });
904
913
  }
905
- this.tabsList = o, this.contextualSets = r, !o.some((i) => i.tabId === this.activeTabId) && o.length > 0 ? this.activeTabId = o[0].tabId : !this.activeTabId && o.length > 0 && (this.activeTabId = o[0].tabId), this.applyActiveAttribute(), this.applyLayoutPropagation(), this.scheduleReflow();
914
+ this.tabsList = i, this.contextualSets = r, !i.some((o) => o.tabId === this.activeTabId) && i.length > 0 ? this.activeTabId = i[0].tabId : !this.activeTabId && i.length > 0 && (this.activeTabId = i[0].tabId), this.applyActiveAttribute(), this.applyLayoutPropagation(), this.scheduleReflow();
906
915
  }
907
916
  applyActiveAttribute() {
908
917
  for (const e of this.tabsList)
909
918
  e.tabId === this.activeTabId ? e.element.setAttribute("active", "") : e.element.removeAttribute("active");
910
919
  }
911
920
  selectTab(e) {
912
- const o = this.activeTabId;
921
+ const i = this.activeTabId;
913
922
  this.activeTabId = e;
914
923
  const r = this.tabsList.findIndex((t) => t.tabId === e);
915
924
  r !== -1 && (this.currentTabIndex = r), this.dispatchEvent(
916
925
  new CustomEvent("tab-change", {
917
- detail: { previousTabId: o, activeTabId: e },
926
+ detail: { previousTabId: i, activeTabId: e },
918
927
  bubbles: !0,
919
928
  composed: !0
920
929
  })
@@ -948,7 +957,7 @@ class k extends w {
948
957
  if (this.minimized) return;
949
958
  const e = this.tabsList.find((p) => p.tabId === this.activeTabId);
950
959
  if (!e) return;
951
- const o = e.element, r = this.collectActiveGroups(o);
960
+ const i = e.element, r = this.collectActiveGroups(i);
952
961
  if (r.length === 0) return;
953
962
  if (this.layout === "simplified") {
954
963
  for (const p of r)
@@ -958,13 +967,13 @@ class k extends w {
958
967
  }
959
968
  for (const p of r)
960
969
  p.getAttribute("data-resolved-size") !== "popup" && this.naturalWidths.set(p, p.offsetWidth);
961
- const t = o.reduceOrder, i = o.idealSizes;
970
+ const t = i.reduceOrder, o = i.idealSizes;
962
971
  if (t && t.length > 0) {
963
972
  if (this.applyAuthorReduceOrder(
964
- o,
973
+ i,
965
974
  r,
966
975
  t,
967
- i ?? {}
976
+ o ?? {}
968
977
  )) {
969
978
  this.scheduleReflow();
970
979
  return;
@@ -972,27 +981,27 @@ class k extends w {
972
981
  this.diffCollapsedGroupsAndAnnounce(r);
973
982
  return;
974
983
  }
975
- const n = o.clientWidth, b = 8, c = () => r.reduce(
976
- (p, A, C) => p + A.offsetWidth + (C > 0 ? b : 0),
984
+ const n = i.clientWidth, b = 8, c = () => r.reduce(
985
+ (p, F, C) => p + F.offsetWidth + (C > 0 ? b : 0),
977
986
  0
978
987
  );
979
988
  let a = !1;
980
989
  const h = (p) => Number(p.getAttribute("priority") ?? "0"), u = (p) => p.getAttribute("auto-scale") !== "false", f = () => {
981
- let p = null, A = 1 / 0, C = -1;
982
- for (let y = 0; y < r.length; y++) {
983
- const $ = r[y];
984
- if ($.getAttribute("data-resolved-size") === "popup" || !u($)) continue;
985
- const z = h($);
986
- (z < A || z === A && y > C) && (p = $, A = z, C = y);
990
+ let p = null, F = 1 / 0, C = -1;
991
+ for (let w = 0; w < r.length; w++) {
992
+ const I = r[w];
993
+ if (I.getAttribute("data-resolved-size") === "popup" || !u(I)) continue;
994
+ const z = h(I);
995
+ (z < F || z === F && w > C) && (p = I, F = z, C = w);
987
996
  }
988
997
  return p;
989
998
  }, m = () => {
990
- let p = null, A = -1 / 0, C = 1 / 0;
991
- for (let y = 0; y < r.length; y++) {
992
- const $ = r[y];
993
- if ($.getAttribute("data-resolved-size") !== "popup") continue;
994
- const z = h($);
995
- (z > A || z === A && y < C) && (p = $, A = z, C = y);
999
+ let p = null, F = -1 / 0, C = 1 / 0;
1000
+ for (let w = 0; w < r.length; w++) {
1001
+ const I = r[w];
1002
+ if (I.getAttribute("data-resolved-size") !== "popup") continue;
1003
+ const z = h(I);
1004
+ (z > F || z === F && w < C) && (p = I, F = z, C = w);
996
1005
  }
997
1006
  return p;
998
1007
  };
@@ -1005,8 +1014,8 @@ class k extends w {
1005
1014
  for (x = r.length; c() < n && x-- > 0; ) {
1006
1015
  const p = m();
1007
1016
  if (!p) break;
1008
- const A = this.naturalWidths.get(p) ?? 0, C = p.offsetWidth;
1009
- if (c() + (A - C) > n) break;
1017
+ const F = this.naturalWidths.get(p) ?? 0, C = p.offsetWidth;
1018
+ if (c() + (F - C) > n) break;
1010
1019
  p.removeAttribute("data-resolved-size"), a = !0;
1011
1020
  }
1012
1021
  if (a) {
@@ -1021,25 +1030,25 @@ class k extends w {
1021
1030
  * default + author reduceOrder).
1022
1031
  */
1023
1032
  diffCollapsedGroupsAndAnnounce(e) {
1024
- const o = /* @__PURE__ */ new Set();
1033
+ const i = /* @__PURE__ */ new Set();
1025
1034
  for (const r of e)
1026
1035
  if (r.getAttribute("data-resolved-size") === "popup") {
1027
- o.add(r);
1036
+ i.add(r);
1028
1037
  const t = r.getAttribute("label") ?? "";
1029
1038
  t && this.collapsedGroupLabels.set(r, t);
1030
1039
  }
1031
- for (const r of o)
1040
+ for (const r of i)
1032
1041
  if (!this.previousCollapsedGroups.has(r)) {
1033
1042
  const t = this.collapsedGroupLabels.get(r) ?? r.getAttribute("label") ?? "";
1034
1043
  t && this.liveAnnouncer.announce(`${t} group collapsed`);
1035
1044
  }
1036
1045
  for (const r of this.previousCollapsedGroups)
1037
- if (!o.has(r)) {
1046
+ if (!i.has(r)) {
1038
1047
  const t = this.collapsedGroupLabels.get(r) ?? "";
1039
1048
  t && this.liveAnnouncer.announce(`${t} group expanded`);
1040
1049
  }
1041
1050
  this.previousCollapsedGroups.clear();
1042
- for (const r of o) this.previousCollapsedGroups.add(r);
1051
+ for (const r of i) this.previousCollapsedGroups.add(r);
1043
1052
  }
1044
1053
  /**
1045
1054
  * FR-6: walk an author-declared reduceOrder list. Returns true if any
@@ -1054,11 +1063,11 @@ class k extends w {
1054
1063
  * author lists a step for them, we drop a console.warn at validate
1055
1064
  * time and the runtime treats it as a no-op.
1056
1065
  */
1057
- applyAuthorReduceOrder(e, o, r, t) {
1058
- const n = e.clientWidth, b = () => o.reduce(
1066
+ applyAuthorReduceOrder(e, i, r, t) {
1067
+ const n = e.clientWidth, b = () => i.reduce(
1059
1068
  (f, m, x) => f + m.offsetWidth + (x > 0 ? 8 : 0),
1060
1069
  0
1061
- ), c = (f) => o.find((m) => m.getAttribute("group-id") === f) ?? null;
1070
+ ), c = (f) => i.find((m) => m.getAttribute("group-id") === f) ?? null;
1062
1071
  let a = this.appliedReduceSteps.get(e) ?? 0, h = !1, u = r.length - a;
1063
1072
  for (; b() > n && a < r.length && u-- > 0; ) {
1064
1073
  const [f, m] = r[a], x = c(f);
@@ -1088,11 +1097,11 @@ class k extends w {
1088
1097
  * `steps` have been applied. The starting point is `idealSizes[groupId]`
1089
1098
  * or `large` if unset.
1090
1099
  */
1091
- sizeAtStepIndex(e, o, r, t) {
1092
- let i = t[r] ?? "large";
1093
- for (let n = 0; n < o; n++)
1094
- e[n][0] === r && (i = e[n][1]);
1095
- return i;
1100
+ sizeAtStepIndex(e, i, r, t) {
1101
+ let o = t[r] ?? "large";
1102
+ for (let n = 0; n < i; n++)
1103
+ e[n][0] === r && (o = e[n][1]);
1104
+ return o;
1096
1105
  }
1097
1106
  /**
1098
1107
  * Apply a resolved size to a group + mutate slotted item sizes so the
@@ -1100,20 +1109,20 @@ class k extends w {
1100
1109
  * each item's original `size` to `originalItemSizes` the first time the
1101
1110
  * group downsizes, so going back to `large` restores it.
1102
1111
  */
1103
- applyGroupSize(e, o, r) {
1104
- if (o === "popup") {
1112
+ applyGroupSize(e, i, r) {
1113
+ if (i === "popup") {
1105
1114
  e.setAttribute("data-resolved-size", "popup");
1106
1115
  return;
1107
1116
  }
1108
- o === "large" ? e.removeAttribute("data-resolved-size") : e.setAttribute("data-resolved-size", o);
1117
+ i === "large" ? e.removeAttribute("data-resolved-size") : e.setAttribute("data-resolved-size", i);
1109
1118
  const t = this.collectGroupItems(e);
1110
- for (const i of t) {
1111
- if (!this.originalItemSizes.has(i)) {
1112
- const c = i.getAttribute("size") ?? "medium";
1113
- this.originalItemSizes.set(i, c);
1119
+ for (const o of t) {
1120
+ if (!this.originalItemSizes.has(o)) {
1121
+ const c = o.getAttribute("size") ?? "medium";
1122
+ this.originalItemSizes.set(o, c);
1114
1123
  }
1115
- const n = this.originalItemSizes.get(i), b = this.deriveItemSize(n, o);
1116
- i.getAttribute("size") !== b && i.setAttribute("size", b);
1124
+ const n = this.originalItemSizes.get(o), b = this.deriveItemSize(n, i);
1125
+ o.getAttribute("size") !== b && o.setAttribute("size", b);
1117
1126
  }
1118
1127
  }
1119
1128
  /**
@@ -1121,8 +1130,8 @@ class k extends w {
1121
1130
  * size and the group's resolved size. Items can only ever shrink, never
1122
1131
  * grow above their original.
1123
1132
  */
1124
- deriveItemSize(e, o) {
1125
- return o === "large" ? e : o === "small" ? "small" : e === "large" ? "medium" : e;
1133
+ deriveItemSize(e, i) {
1134
+ return i === "large" ? e : i === "small" ? "small" : e === "large" ? "medium" : e;
1126
1135
  }
1127
1136
  collectGroupItems(e) {
1128
1137
  return Array.from(
@@ -1139,70 +1148,73 @@ class k extends w {
1139
1148
  * root since each tab owns its own default slot.
1140
1149
  */
1141
1150
  collectActiveGroups(e) {
1142
- const o = e.shadowRoot?.querySelector("slot");
1143
- if (!o) return [];
1151
+ const i = e.shadowRoot?.querySelector("slot");
1152
+ if (!i) return [];
1144
1153
  const r = [];
1145
- for (const t of o.assignedElements()) {
1154
+ for (const t of i.assignedElements()) {
1146
1155
  if (t.tagName === "MP-RIBBON-GROUP") {
1147
1156
  r.push(t);
1148
1157
  continue;
1149
1158
  }
1150
- const i = t.querySelector("mp-ribbon-group");
1151
- i && r.push(i);
1159
+ const o = t.querySelector("mp-ribbon-group");
1160
+ o && r.push(o);
1152
1161
  }
1153
1162
  return r;
1154
1163
  }
1155
1164
  }
1156
- F([
1165
+ A([
1157
1166
  l({ type: String, attribute: "active-tab-id", reflect: !0 })
1158
- ], k.prototype, "activeTabId");
1159
- F([
1167
+ ], y.prototype, "activeTabId");
1168
+ A([
1160
1169
  _()
1161
- ], k.prototype, "tabsList");
1162
- F([
1170
+ ], y.prototype, "tabsList");
1171
+ A([
1163
1172
  _()
1164
- ], k.prototype, "contextualSets");
1165
- F([
1173
+ ], y.prototype, "contextualSets");
1174
+ A([
1166
1175
  l({ type: String, reflect: !0 })
1167
- ], k.prototype, "layout");
1168
- F([
1176
+ ], y.prototype, "layout");
1177
+ A([
1178
+ l({ type: String, attribute: "region-label" })
1179
+ ], y.prototype, "regionLabel");
1180
+ A([
1169
1181
  l({ type: Boolean })
1170
- ], k.prototype, "minimized");
1171
- F([
1182
+ ], y.prototype, "minimized");
1183
+ A([
1172
1184
  l({ type: String, reflect: !0 })
1173
- ], k.prototype, "version");
1174
- F([
1185
+ ], y.prototype, "version");
1186
+ A([
1175
1187
  l({ type: String, attribute: "color-scheme", reflect: !0 })
1176
- ], k.prototype, "colorScheme");
1177
- F([
1188
+ ], y.prototype, "colorScheme");
1189
+ A([
1178
1190
  l({ type: String, attribute: "touch-mode", reflect: !0 })
1179
- ], k.prototype, "touchMode");
1180
- F([
1191
+ ], y.prototype, "touchMode");
1192
+ A([
1181
1193
  l({ type: String, attribute: "key-tips" })
1182
- ], k.prototype, "keyTips");
1183
- F([
1194
+ ], y.prototype, "keyTips");
1195
+ A([
1184
1196
  _()
1185
- ], k.prototype, "keyTipMode");
1186
- F([
1197
+ ], y.prototype, "keyTipMode");
1198
+ A([
1187
1199
  _()
1188
- ], k.prototype, "keyTipBadges");
1189
- typeof customElements < "u" && !customElements.get("mp-ribbon") && customElements.define("mp-ribbon", k);
1190
- var ae = Object.defineProperty, Z = (s, e, o, r) => {
1191
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
1192
- (n = s[i]) && (t = n(e, o, t) || t);
1193
- return t && ae(e, o, t), t;
1200
+ ], y.prototype, "keyTipBadges");
1201
+ typeof customElements < "u" && !customElements.get("mp-ribbon") && customElements.define("mp-ribbon", y);
1202
+ var ae = Object.defineProperty, Z = (s, e, i, r) => {
1203
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
1204
+ (n = s[o]) && (t = n(e, i, t) || t);
1205
+ return t && ae(e, i, t), t;
1194
1206
  };
1195
- class N extends w {
1207
+ class N extends k {
1196
1208
  constructor() {
1197
1209
  super(...arguments), this.label = "Quick Access Toolbar", this.touchMode = "auto", this.onKeyDown = (e) => {
1198
- const { key: o } = e;
1199
- if (o !== "ArrowLeft" && o !== "ArrowRight" && o !== "Home" && o !== "End")
1210
+ const { key: i } = e;
1211
+ if (i !== "ArrowLeft" && i !== "ArrowRight" && i !== "Home" && i !== "End")
1200
1212
  return;
1201
1213
  const r = this.collectItems();
1202
1214
  if (r.length === 0) return;
1203
- const t = e.composedPath(), i = r.findIndex((h) => t.includes(h)), n = getComputedStyle(this).direction === "rtl", b = n ? o === "ArrowLeft" : o === "ArrowRight", c = n ? o === "ArrowRight" : o === "ArrowLeft";
1204
- let a = i;
1205
- c ? a = Math.max(0, i - 1) : b ? a = Math.min(r.length - 1, i + 1) : o === "Home" ? a = 0 : o === "End" && (a = r.length - 1), a !== i && a >= 0 && (r[a].focus(), e.preventDefault());
1215
+ const t = e.composedPath(), o = r.findIndex((h) => t.includes(h)), n = getComputedStyle(this).direction === "rtl", b = n ? i === "ArrowLeft" : i === "ArrowRight", c = n ? i === "ArrowRight" : i === "ArrowLeft";
1216
+ let a = o;
1217
+ c ? a = Math.max(0, o - 1) : b ? a = Math.min(r.length - 1, o + 1) : i === "Home" ? a = 0 : i === "End" && (a = r.length - 1), a !== o && a >= 0 && (r[a].focus(), e.preventDefault());
1206
1218
  };
1207
1219
  }
1208
1220
  static {
@@ -1288,14 +1300,14 @@ class N extends w {
1288
1300
  collectItems() {
1289
1301
  const e = this.renderRoot.querySelector("slot");
1290
1302
  if (!e) return [];
1291
- const o = [];
1303
+ const i = [];
1292
1304
  for (const r of e.assignedElements()) {
1293
- const i = r.querySelector(
1305
+ const o = r.querySelector(
1294
1306
  "mp-ribbon-button, mp-ribbon-toggle-button, mp-ribbon-checkbox, mp-ribbon-split-button, mp-ribbon-dropdown-button"
1295
1307
  ) ?? r;
1296
- i.tagName.startsWith("MP-RIBBON-") && !i.hasAttribute("disabled") && o.push(i);
1308
+ o.tagName.startsWith("MP-RIBBON-") && !o.hasAttribute("disabled") && i.push(o);
1297
1309
  }
1298
- return o;
1310
+ return i;
1299
1311
  }
1300
1312
  }
1301
1313
  Z([
@@ -1305,13 +1317,13 @@ Z([
1305
1317
  l({ type: String, attribute: "touch-mode", reflect: !0 })
1306
1318
  ], N.prototype, "touchMode");
1307
1319
  typeof customElements < "u" && !customElements.get("mp-quick-access-toolbar") && customElements.define("mp-quick-access-toolbar", N);
1308
- var le = Object.defineProperty, E = (s, e, o, r) => {
1309
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
1310
- (n = s[i]) && (t = n(e, o, t) || t);
1311
- return t && le(e, o, t), t;
1320
+ var le = Object.defineProperty, E = (s, e, i, r) => {
1321
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
1322
+ (n = s[o]) && (t = n(e, i, t) || t);
1323
+ return t && le(e, i, t), t;
1312
1324
  };
1313
1325
  const de = "mp-ribbon-button, mp-ribbon-toggle-button, mp-ribbon-checkbox, mp-ribbon-combobox, mp-ribbon-color-picker, mp-ribbon-group-button, mp-ribbon-split-button, mp-ribbon-dropdown-button, mp-ribbon-gallery";
1314
- class I extends w {
1326
+ class $ extends k {
1315
1327
  constructor() {
1316
1328
  super(...arguments), this.tabId = "", this.label = "", this.active = !1, this.idealSizes = {}, this.reduceOrder = [], this.overflowEntries = [], this.overflowOverlay = new G(this, {
1317
1329
  anchor: () => this.overflowTriggerEl ?? null,
@@ -1435,7 +1447,7 @@ class I extends w {
1435
1447
  `;
1436
1448
  }
1437
1449
  connectedCallback() {
1438
- super.connectedCallback(), this.setAttribute("role", "tabpanel"), typeof ResizeObserver < "u" && (this.overflowResizeObserver = new ResizeObserver(
1450
+ super.connectedCallback(), typeof ResizeObserver < "u" && (this.overflowResizeObserver = new ResizeObserver(
1439
1451
  () => this.scheduleOverflowReflow()
1440
1452
  ), this.overflowResizeObserver.observe(this));
1441
1453
  }
@@ -1443,7 +1455,7 @@ class I extends w {
1443
1455
  super.disconnectedCallback(), this.overflowResizeObserver?.disconnect(), this.overflowResizeObserver = void 0, this.overflowReflowFrame && cancelAnimationFrame(this.overflowReflowFrame);
1444
1456
  }
1445
1457
  updated(e) {
1446
- e.has("tabId") && this.tabId && (this.id = `ribbon-panel-${this.tabId}`, this.setAttribute("aria-labelledby", `ribbon-tab-${this.tabId}`)), (e.has("reduceOrder") || e.has("idealSizes")) && this.validateReduceOrder(), e.has("active") && this.active && this.scheduleOverflowReflow();
1458
+ (e.has("reduceOrder") || e.has("idealSizes")) && this.validateReduceOrder(), e.has("active") && this.active && this.scheduleOverflowReflow();
1447
1459
  }
1448
1460
  /**
1449
1461
  * Validates the author-declared reduceOrder against the FR-6 rules:
@@ -1462,16 +1474,16 @@ class I extends w {
1462
1474
  medium: 2,
1463
1475
  small: 1,
1464
1476
  popup: 0
1465
- }, o = (t) => this.idealSizes[t] ?? "large", r = /* @__PURE__ */ new Map();
1477
+ }, i = (t) => this.idealSizes[t] ?? "large", r = /* @__PURE__ */ new Map();
1466
1478
  for (let t = 0; t < this.reduceOrder.length; t++) {
1467
- const i = this.reduceOrder[t], [n, b] = i;
1479
+ const o = this.reduceOrder[t], [n, b] = o;
1468
1480
  if (!(b in e)) {
1469
1481
  console.warn(
1470
1482
  `[mp-ribbon-tab "${this.tabId}"] reduceOrder[${t}] has invalid size "${b}". Expected large | medium | small | popup.`
1471
1483
  );
1472
1484
  continue;
1473
1485
  }
1474
- const c = r.get(n) ?? o(n);
1486
+ const c = r.get(n) ?? i(n);
1475
1487
  if (e[b] >= e[c]) {
1476
1488
  console.warn(
1477
1489
  `[mp-ribbon-tab "${this.tabId}"] reduceOrder[${t}] for "${n}" goes ${c} → ${b}, which is not a reduction. Steps must monotonically decrease size per group.`
@@ -1506,7 +1518,7 @@ class I extends w {
1506
1518
  type="button"
1507
1519
  @click="${() => this.activateOverflowEntry(e)}"
1508
1520
  >
1509
- ${e.icon ? d`<span class="overflow-entry-icon">${e.icon}</span>` : B}
1521
+ ${e.icon ? d`<span class="overflow-entry-icon">${e.icon}</span>` : L}
1510
1522
  <span>${e.label || "(unnamed)"}</span>
1511
1523
  </button>
1512
1524
  `
@@ -1515,26 +1527,26 @@ class I extends w {
1515
1527
  `;
1516
1528
  }
1517
1529
  reflowSimplifiedOverflow() {
1518
- const e = this.getAttribute("data-ribbon-layout") === "simplified", o = Array.from(
1530
+ const e = this.getAttribute("data-ribbon-layout") === "simplified", i = Array.from(
1519
1531
  this.querySelectorAll("mp-ribbon-group")
1520
1532
  );
1521
1533
  if (!e) {
1522
- for (const a of o) a.removeAttribute("data-overflow-hidden");
1534
+ for (const a of i) a.removeAttribute("data-overflow-hidden");
1523
1535
  this.overflowEntries = [], this.removeAttribute("data-has-overflow"), this.overflowOverlay.isOpen && this.overflowOverlay.close(!1);
1524
1536
  return;
1525
1537
  }
1526
- for (const a of o) a.removeAttribute("data-overflow-hidden");
1538
+ for (const a of i) a.removeAttribute("data-overflow-hidden");
1527
1539
  const r = this.clientWidth;
1528
- if (r <= 0 || o.length === 0) {
1540
+ if (r <= 0 || i.length === 0) {
1529
1541
  this.overflowEntries = [], this.removeAttribute("data-has-overflow");
1530
1542
  return;
1531
1543
  }
1532
- const t = 40, i = 8;
1544
+ const t = 40, o = 8;
1533
1545
  let n = 0;
1534
1546
  const b = [];
1535
- for (let a = 0; a < o.length; a++) {
1536
- const h = o[a];
1537
- n += h.offsetWidth + (a > 0 ? i : 0), n > r - t && b.push(h);
1547
+ for (let a = 0; a < i.length; a++) {
1548
+ const h = i[a];
1549
+ n += h.offsetWidth + (a > 0 ? o : 0), n > r - t && b.push(h);
1538
1550
  }
1539
1551
  for (const a of b) a.setAttribute("data-overflow-hidden", "");
1540
1552
  const c = [];
@@ -1556,35 +1568,35 @@ class I extends w {
1556
1568
  }
1557
1569
  E([
1558
1570
  l({ type: String, attribute: "tab-id", reflect: !0 })
1559
- ], I.prototype, "tabId");
1571
+ ], $.prototype, "tabId");
1560
1572
  E([
1561
1573
  l({ type: String, reflect: !0 })
1562
- ], I.prototype, "label");
1574
+ ], $.prototype, "label");
1563
1575
  E([
1564
1576
  l({ type: Boolean, reflect: !0 })
1565
- ], I.prototype, "active");
1577
+ ], $.prototype, "active");
1566
1578
  E([
1567
1579
  l({ attribute: !1 })
1568
- ], I.prototype, "idealSizes");
1580
+ ], $.prototype, "idealSizes");
1569
1581
  E([
1570
1582
  l({ attribute: !1 })
1571
- ], I.prototype, "reduceOrder");
1583
+ ], $.prototype, "reduceOrder");
1572
1584
  E([
1573
1585
  _()
1574
- ], I.prototype, "overflowEntries");
1586
+ ], $.prototype, "overflowEntries");
1575
1587
  E([
1576
1588
  S(".overflow-trigger")
1577
- ], I.prototype, "overflowTriggerEl");
1589
+ ], $.prototype, "overflowTriggerEl");
1578
1590
  E([
1579
1591
  S(".overflow-panel")
1580
- ], I.prototype, "overflowPanelEl");
1581
- customElements.define("mp-ribbon-tab", I);
1582
- var ce = Object.defineProperty, W = (s, e, o, r) => {
1583
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
1584
- (n = s[i]) && (t = n(e, o, t) || t);
1585
- return t && ce(e, o, t), t;
1592
+ ], $.prototype, "overflowPanelEl");
1593
+ customElements.define("mp-ribbon-tab", $);
1594
+ var ce = Object.defineProperty, W = (s, e, i, r) => {
1595
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
1596
+ (n = s[o]) && (t = n(e, i, t) || t);
1597
+ return t && ce(e, i, t), t;
1586
1598
  };
1587
- class j extends w {
1599
+ class j extends k {
1588
1600
  constructor() {
1589
1601
  super(...arguments), this.label = "", this.color = "#F0AF84", this.hidden = !1;
1590
1602
  }
@@ -1616,12 +1628,12 @@ W([
1616
1628
  l({ type: Boolean, reflect: !0 })
1617
1629
  ], j.prototype, "hidden");
1618
1630
  customElements.define("mp-ribbon-contextual-tab-set", j);
1619
- var pe = Object.defineProperty, O = (s, e, o, r) => {
1620
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
1621
- (n = s[i]) && (t = n(e, o, t) || t);
1622
- return t && pe(e, o, t), t;
1631
+ var pe = Object.defineProperty, O = (s, e, i, r) => {
1632
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
1633
+ (n = s[o]) && (t = n(e, i, t) || t);
1634
+ return t && pe(e, i, t), t;
1623
1635
  };
1624
- const T = class U extends w {
1636
+ const T = class U extends k {
1625
1637
  constructor() {
1626
1638
  super(...arguments), this.groupId = "", this.label = "", this.icon = "", this.dialogLauncher = "", this.resolvedSize = "", this.priority = 0, this.autoScale = "true", this.overlay = new G(this, {
1627
1639
  anchor: () => this.renderRoot.querySelector(".ribbon-popup-trigger"),
@@ -1633,15 +1645,15 @@ const T = class U extends w {
1633
1645
  }), this.onFocusIn = (e) => {
1634
1646
  if (!e.target) return;
1635
1647
  const t = e.composedPath().find(
1636
- (i) => i instanceof HTMLElement && i.matches(U.ITEM_SELECTOR) && this.contains(i)
1648
+ (o) => o instanceof HTMLElement && o.matches(U.ITEM_SELECTOR) && this.contains(o)
1637
1649
  );
1638
1650
  if (t)
1639
- for (const i of this.collectItems())
1640
- i.setAttribute("tabindex", i === t ? "0" : "-1");
1651
+ for (const o of this.collectItems())
1652
+ o.setAttribute("tabindex", o === t ? "0" : "-1");
1641
1653
  }, this.onGroupKeyDown = (e) => {
1642
1654
  if (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) return;
1643
- const { key: o } = e;
1644
- if (o !== "ArrowLeft" && o !== "ArrowRight" && o !== "Home" && o !== "End")
1655
+ const { key: i } = e;
1656
+ if (i !== "ArrowLeft" && i !== "ArrowRight" && i !== "Home" && i !== "End")
1645
1657
  return;
1646
1658
  const r = e.composedPath(), t = r[0];
1647
1659
  if (t && t instanceof HTMLElement) {
@@ -1650,13 +1662,13 @@ const T = class U extends w {
1650
1662
  }
1651
1663
  if (r.some((f) => f instanceof HTMLElement && f.tagName === "MP-RIBBON-GALLERY"))
1652
1664
  return;
1653
- const i = this.collectItems();
1654
- if (i.length === 0) return;
1665
+ const o = this.collectItems();
1666
+ if (o.length === 0) return;
1655
1667
  const n = r.find(
1656
- (f) => f instanceof HTMLElement && i.includes(f)
1657
- ), b = n ? i.indexOf(n) : -1, c = getComputedStyle(this).direction === "rtl", a = c ? o === "ArrowLeft" : o === "ArrowRight", h = c ? o === "ArrowRight" : o === "ArrowLeft";
1668
+ (f) => f instanceof HTMLElement && o.includes(f)
1669
+ ), b = n ? o.indexOf(n) : -1, c = getComputedStyle(this).direction === "rtl", a = c ? i === "ArrowLeft" : i === "ArrowRight", h = c ? i === "ArrowRight" : i === "ArrowLeft";
1658
1670
  let u = b;
1659
- h ? u = b <= 0 ? i.length - 1 : b - 1 : a ? u = b >= i.length - 1 ? 0 : b + 1 : o === "Home" ? u = 0 : o === "End" && (u = i.length - 1), u !== b && u >= 0 && (i[u].focus(), e.preventDefault());
1671
+ h ? u = b <= 0 ? o.length - 1 : b - 1 : a ? u = b >= o.length - 1 ? 0 : b + 1 : i === "Home" ? u = 0 : i === "End" && (u = o.length - 1), u !== b && u >= 0 && (o[u].focus(), e.preventDefault());
1660
1672
  }, this.onTriggerClick = async (e) => {
1661
1673
  e.stopPropagation(), await this.overlay.toggle();
1662
1674
  }, this.onTriggerKeyDown = async (e) => {
@@ -1852,10 +1864,10 @@ const T = class U extends w {
1852
1864
  applyRovingTabindex() {
1853
1865
  const e = this.collectItems();
1854
1866
  if (e.length === 0) return;
1855
- let o = e.find((r) => r.getAttribute("tabindex") === "0");
1856
- o || (o = e[0]);
1867
+ let i = e.find((r) => r.getAttribute("tabindex") === "0");
1868
+ i || (i = e[0]);
1857
1869
  for (const r of e)
1858
- r.setAttribute("tabindex", r === o ? "0" : "-1");
1870
+ r.setAttribute("tabindex", r === i ? "0" : "-1");
1859
1871
  }
1860
1872
  collectItems() {
1861
1873
  return Array.from(
@@ -1882,7 +1894,7 @@ const T = class U extends w {
1882
1894
  title="${this.dialogLauncher}"
1883
1895
  aria-label="${this.dialogLauncher}"
1884
1896
  @click="${this.onDialogLauncherClick}"
1885
- >⬘</button>` : B}
1897
+ >⬘</button>` : L}
1886
1898
  </div>
1887
1899
  </div>
1888
1900
  <button
@@ -1894,7 +1906,7 @@ const T = class U extends w {
1894
1906
  @click="${this.onTriggerClick}"
1895
1907
  @keydown="${this.onTriggerKeyDown}"
1896
1908
  >
1897
- ${this.icon ? d`<span class="ribbon-popup-trigger-icon">${this.icon}</span>` : B}
1909
+ ${this.icon ? d`<span class="ribbon-popup-trigger-icon">${this.icon}</span>` : L}
1898
1910
  <span class="ribbon-popup-trigger-label">
1899
1911
  ${this.label}
1900
1912
  <span class="ribbon-popup-trigger-chevron">▼</span>
@@ -1935,10 +1947,10 @@ O([
1935
1947
  ], T.prototype, "autoScale");
1936
1948
  let ue = T;
1937
1949
  customElements.define("mp-ribbon-group", ue);
1938
- var he = Object.defineProperty, L = (s, e, o, r) => {
1939
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
1940
- (n = s[i]) && (t = n(e, o, t) || t);
1941
- return t && he(e, o, t), t;
1950
+ var he = Object.defineProperty, B = (s, e, i, r) => {
1951
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
1952
+ (n = s[o]) && (t = n(e, i, t) || t);
1953
+ return t && he(e, i, t), t;
1942
1954
  };
1943
1955
  const P = g`
1944
1956
  :host([size="large"]) ::slotted([slot="icon"]) {
@@ -1978,13 +1990,13 @@ const P = g`
1978
1990
  line-height: 1 !important;
1979
1991
  }
1980
1992
  `;
1981
- class v extends w {
1993
+ class v extends k {
1982
1994
  constructor() {
1983
1995
  super(...arguments), this.itemId = "", this.label = "", this.icon = "", this.size = "medium", this.disabled = !1, this.tooltip = "";
1984
1996
  }
1985
1997
  static {
1986
1998
  this.shadowRootOptions = {
1987
- ...w.shadowRootOptions,
1999
+ ...k.shadowRootOptions,
1988
2000
  delegatesFocus: !0
1989
2001
  };
1990
2002
  }
@@ -2017,22 +2029,22 @@ class v extends w {
2017
2029
  super.updated(e), e.has("size") && this.setAttribute("data-size", this.size);
2018
2030
  }
2019
2031
  }
2020
- L([
2032
+ B([
2021
2033
  l({ type: String, attribute: "item-id" })
2022
2034
  ], v.prototype, "itemId");
2023
- L([
2035
+ B([
2024
2036
  l({ type: String })
2025
2037
  ], v.prototype, "label");
2026
- L([
2038
+ B([
2027
2039
  l({ type: String })
2028
2040
  ], v.prototype, "icon");
2029
- L([
2041
+ B([
2030
2042
  l({ type: String, reflect: !0 })
2031
2043
  ], v.prototype, "size");
2032
- L([
2044
+ B([
2033
2045
  l({ type: Boolean })
2034
2046
  ], v.prototype, "disabled");
2035
- L([
2047
+ B([
2036
2048
  l({ type: String })
2037
2049
  ], v.prototype, "tooltip");
2038
2050
  class fe extends v {
@@ -2104,10 +2116,10 @@ class fe extends v {
2104
2116
  }
2105
2117
  }
2106
2118
  customElements.define("mp-ribbon-button", fe);
2107
- var ge = Object.defineProperty, H = (s, e, o, r) => {
2108
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2109
- (n = s[i]) && (t = n(e, o, t) || t);
2110
- return t && ge(e, o, t), t;
2119
+ var ge = Object.defineProperty, H = (s, e, i, r) => {
2120
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2121
+ (n = s[o]) && (t = n(e, i, t) || t);
2122
+ return t && ge(e, i, t), t;
2111
2123
  };
2112
2124
  class q extends v {
2113
2125
  constructor() {
@@ -2290,10 +2302,10 @@ H([
2290
2302
  S(".menu-panel")
2291
2303
  ], q.prototype, "panelEl");
2292
2304
  customElements.define("mp-ribbon-split-button", q);
2293
- var me = Object.defineProperty, X = (s, e, o, r) => {
2294
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2295
- (n = s[i]) && (t = n(e, o, t) || t);
2296
- return t && me(e, o, t), t;
2305
+ var me = Object.defineProperty, X = (s, e, i, r) => {
2306
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2307
+ (n = s[o]) && (t = n(e, i, t) || t);
2308
+ return t && me(e, i, t), t;
2297
2309
  };
2298
2310
  class V extends v {
2299
2311
  constructor() {
@@ -2431,10 +2443,10 @@ X([
2431
2443
  S(".menu-panel")
2432
2444
  ], V.prototype, "panelEl");
2433
2445
  customElements.define("mp-ribbon-dropdown-button", V);
2434
- var ve = Object.defineProperty, xe = (s, e, o, r) => {
2435
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2436
- (n = s[i]) && (t = n(e, o, t) || t);
2437
- return t && ve(e, o, t), t;
2446
+ var ve = Object.defineProperty, xe = (s, e, i, r) => {
2447
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2448
+ (n = s[o]) && (t = n(e, i, t) || t);
2449
+ return t && ve(e, i, t), t;
2438
2450
  };
2439
2451
  class J extends v {
2440
2452
  constructor() {
@@ -2523,10 +2535,10 @@ xe([
2523
2535
  l({ type: Boolean, reflect: !0 })
2524
2536
  ], J.prototype, "pressed");
2525
2537
  customElements.define("mp-ribbon-toggle-button", J);
2526
- var ye = Object.defineProperty, we = (s, e, o, r) => {
2527
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2528
- (n = s[i]) && (t = n(e, o, t) || t);
2529
- return t && ye(e, o, t), t;
2538
+ var ye = Object.defineProperty, we = (s, e, i, r) => {
2539
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2540
+ (n = s[o]) && (t = n(e, i, t) || t);
2541
+ return t && ye(e, i, t), t;
2530
2542
  };
2531
2543
  class ee extends v {
2532
2544
  constructor() {
@@ -2584,8 +2596,8 @@ class ee extends v {
2584
2596
  }
2585
2597
  onCheckChange(e) {
2586
2598
  if (this.disabled) return;
2587
- const o = e.target;
2588
- this.checked = o.checked, this.dispatchEvent(
2599
+ const i = e.target;
2600
+ this.checked = i.checked, this.dispatchEvent(
2589
2601
  new CustomEvent("check-change", {
2590
2602
  detail: { itemId: this.itemId, checked: this.checked },
2591
2603
  bubbles: !0,
@@ -2598,10 +2610,10 @@ we([
2598
2610
  l({ type: Boolean, reflect: !0 })
2599
2611
  ], ee.prototype, "checked");
2600
2612
  customElements.define("mp-ribbon-checkbox", ee);
2601
- var ke = Object.defineProperty, te = (s, e, o, r) => {
2602
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2603
- (n = s[i]) && (t = n(e, o, t) || t);
2604
- return t && ke(e, o, t), t;
2613
+ var ke = Object.defineProperty, te = (s, e, i, r) => {
2614
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2615
+ (n = s[o]) && (t = n(e, i, t) || t);
2616
+ return t && ke(e, i, t), t;
2605
2617
  };
2606
2618
  class Q extends v {
2607
2619
  constructor() {
@@ -2651,8 +2663,8 @@ class Q extends v {
2651
2663
  }
2652
2664
  onComboChange(e) {
2653
2665
  if (this.disabled) return;
2654
- const o = e.target;
2655
- this.value = o.value, this.dispatchEvent(
2666
+ const i = e.target;
2667
+ this.value = i.value, this.dispatchEvent(
2656
2668
  new CustomEvent("value-change", {
2657
2669
  detail: { itemId: this.itemId, value: this.value },
2658
2670
  bubbles: !0,
@@ -2668,12 +2680,12 @@ te([
2668
2680
  l({ type: Array })
2669
2681
  ], Q.prototype, "options");
2670
2682
  customElements.define("mp-ribbon-combobox", Q);
2671
- var Ae = Object.defineProperty, Fe = (s, e, o, r) => {
2672
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2673
- (n = s[i]) && (t = n(e, o, t) || t);
2674
- return t && Ae(e, o, t), t;
2683
+ var Ae = Object.defineProperty, Fe = (s, e, i, r) => {
2684
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2685
+ (n = s[o]) && (t = n(e, i, t) || t);
2686
+ return t && Ae(e, i, t), t;
2675
2687
  };
2676
- class oe extends v {
2688
+ class ie extends v {
2677
2689
  constructor() {
2678
2690
  super(...arguments), this.color = "#000000";
2679
2691
  }
@@ -2744,8 +2756,8 @@ class oe extends v {
2744
2756
  }
2745
2757
  onColorChange(e) {
2746
2758
  if (this.disabled) return;
2747
- const o = e.target;
2748
- this.color = o.value, this.dispatchEvent(
2759
+ const i = e.target;
2760
+ this.color = i.value, this.dispatchEvent(
2749
2761
  new CustomEvent("color-change", {
2750
2762
  detail: { itemId: this.itemId, color: this.color },
2751
2763
  bubbles: !0,
@@ -2756,12 +2768,12 @@ class oe extends v {
2756
2768
  }
2757
2769
  Fe([
2758
2770
  l({ type: String, reflect: !0 })
2759
- ], oe.prototype, "color");
2760
- customElements.define("mp-ribbon-color-picker", oe);
2761
- var Ce = Object.defineProperty, ie = (s, e, o, r) => {
2762
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2763
- (n = s[i]) && (t = n(e, o, t) || t);
2764
- return t && Ce(e, o, t), t;
2771
+ ], ie.prototype, "color");
2772
+ customElements.define("mp-ribbon-color-picker", ie);
2773
+ var Ce = Object.defineProperty, oe = (s, e, i, r) => {
2774
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2775
+ (n = s[o]) && (t = n(e, i, t) || t);
2776
+ return t && Ce(e, i, t), t;
2765
2777
  };
2766
2778
  class Y extends v {
2767
2779
  constructor() {
@@ -2822,7 +2834,7 @@ class Y extends v {
2822
2834
  role="radio"
2823
2835
  aria-checked="${this.selectedValue === e.value}"
2824
2836
  title="${e.label}"
2825
- @click="${(o) => this.onSelect(o, e.value)}"
2837
+ @click="${(i) => this.onSelect(i, e.value)}"
2826
2838
  >
2827
2839
  ${e.icon ? d`<span class="ribbon-group-button-icon">${e.icon}</span>` : ""}
2828
2840
  ${e.label ? d`<span class="ribbon-group-button-label">${e.label}</span>` : ""}
@@ -2832,8 +2844,8 @@ class Y extends v {
2832
2844
  </div>
2833
2845
  `;
2834
2846
  }
2835
- onSelect(e, o) {
2836
- e.stopPropagation(), !this.disabled && (this.selectedValue = o, this.dispatchEvent(
2847
+ onSelect(e, i) {
2848
+ e.stopPropagation(), !this.disabled && (this.selectedValue = i, this.dispatchEvent(
2837
2849
  new CustomEvent("group-select", {
2838
2850
  detail: { itemId: this.itemId, value: this.selectedValue },
2839
2851
  bubbles: !0,
@@ -2842,17 +2854,17 @@ class Y extends v {
2842
2854
  ));
2843
2855
  }
2844
2856
  }
2845
- ie([
2857
+ oe([
2846
2858
  l({ type: String, attribute: "selected-value", reflect: !0 })
2847
2859
  ], Y.prototype, "selectedValue");
2848
- ie([
2860
+ oe([
2849
2861
  l({ type: Array })
2850
2862
  ], Y.prototype, "buttons");
2851
2863
  customElements.define("mp-ribbon-group-button", Y);
2852
- var Ie = Object.defineProperty, $e = (s, e, o, r) => {
2853
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2854
- (n = s[i]) && (t = n(e, o, t) || t);
2855
- return t && Ie(e, o, t), t;
2864
+ var $e = Object.defineProperty, Ie = (s, e, i, r) => {
2865
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2866
+ (n = s[o]) && (t = n(e, i, t) || t);
2867
+ return t && $e(e, i, t), t;
2856
2868
  };
2857
2869
  class re extends v {
2858
2870
  constructor() {
@@ -2884,16 +2896,16 @@ class re extends v {
2884
2896
  `;
2885
2897
  }
2886
2898
  }
2887
- $e([
2899
+ Ie([
2888
2900
  l({ type: Number })
2889
2901
  ], re.prototype, "columns");
2890
2902
  customElements.define("mp-ribbon-gallery", re);
2891
- var Ee = Object.defineProperty, K = (s, e, o, r) => {
2892
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2893
- (n = s[i]) && (t = n(e, o, t) || t);
2894
- return t && Ee(e, o, t), t;
2903
+ var Ee = Object.defineProperty, K = (s, e, i, r) => {
2904
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2905
+ (n = s[o]) && (t = n(e, i, t) || t);
2906
+ return t && Ee(e, i, t), t;
2895
2907
  };
2896
- class M extends w {
2908
+ class M extends k {
2897
2909
  constructor() {
2898
2910
  super(...arguments), this.itemId = "", this.label = "", this.icon = "", this.selected = !1, this.disabled = !1;
2899
2911
  }
@@ -2975,12 +2987,12 @@ K([
2975
2987
  l({ type: Boolean })
2976
2988
  ], M.prototype, "disabled");
2977
2989
  customElements.define("mp-ribbon-gallery-item", M);
2978
- var Te = Object.defineProperty, ze = (s, e, o, r) => {
2979
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
2980
- (n = s[i]) && (t = n(e, o, t) || t);
2981
- return t && Te(e, o, t), t;
2990
+ var Te = Object.defineProperty, ze = (s, e, i, r) => {
2991
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
2992
+ (n = s[o]) && (t = n(e, i, t) || t);
2993
+ return t && Te(e, i, t), t;
2982
2994
  };
2983
- class ne extends w {
2995
+ class ne extends k {
2984
2996
  constructor() {
2985
2997
  super(...arguments), this.size = "medium";
2986
2998
  }
@@ -2998,18 +3010,18 @@ ze([
2998
3010
  l({ type: String, reflect: !0 })
2999
3011
  ], ne.prototype, "size");
3000
3012
  customElements.define("mp-ribbon-template-item", ne);
3001
- var Se = Object.defineProperty, D = (s, e, o, r) => {
3002
- for (var t = void 0, i = s.length - 1, n; i >= 0; i--)
3003
- (n = s[i]) && (t = n(e, o, t) || t);
3004
- return t && Se(e, o, t), t;
3013
+ var Se = Object.defineProperty, D = (s, e, i, r) => {
3014
+ for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
3015
+ (n = s[o]) && (t = n(e, i, t) || t);
3016
+ return t && Se(e, i, t), t;
3005
3017
  };
3006
- class R extends w {
3018
+ class R extends k {
3007
3019
  constructor() {
3008
3020
  super(...arguments), this.itemId = "", this.label = "", this.icon = "", this.kind = "action", this.checked = !1, this.disabled = !1;
3009
3021
  }
3010
3022
  static {
3011
3023
  this.shadowRootOptions = {
3012
- ...w.shadowRootOptions,
3024
+ ...k.shadowRootOptions,
3013
3025
  delegatesFocus: !0
3014
3026
  };
3015
3027
  }
@@ -3068,11 +3080,11 @@ class R extends w {
3068
3080
  <button
3069
3081
  class="menu-item"
3070
3082
  role="${e}"
3071
- aria-checked="${this.kind === "action" ? B : String(this.checked)}"
3083
+ aria-checked="${this.kind === "action" ? L : String(this.checked)}"
3072
3084
  ?disabled="${this.disabled}"
3073
3085
  @click="${this.onActivate}"
3074
3086
  >
3075
- ${this.kind !== "action" ? d`<span class="menu-item-check">${this.checked ? "✓" : ""}</span>` : B}
3087
+ ${this.kind !== "action" ? d`<span class="menu-item-check">${this.checked ? "✓" : ""}</span>` : L}
3076
3088
  <span class="menu-item-icon">
3077
3089
  <slot name="icon">${this.icon ? this.icon : ""}</slot>
3078
3090
  </span>
@@ -3109,7 +3121,7 @@ D([
3109
3121
  l({ type: Boolean })
3110
3122
  ], R.prototype, "disabled");
3111
3123
  customElements.define("mp-ribbon-menu-item", R);
3112
- class Oe extends w {
3124
+ class Oe extends k {
3113
3125
  static {
3114
3126
  this.styles = g`
3115
3127
  :host { display: block; }
@@ -3130,10 +3142,10 @@ class Oe extends w {
3130
3142
  customElements.define("mp-ribbon-menu-separator", Oe);
3131
3143
  export {
3132
3144
  N as MpQuickAccessToolbar,
3133
- k as MpRibbon,
3145
+ y as MpRibbon,
3134
3146
  fe as MpRibbonButton,
3135
3147
  ee as MpRibbonCheckBox,
3136
- oe as MpRibbonColorPicker,
3148
+ ie as MpRibbonColorPicker,
3137
3149
  Q as MpRibbonComboBox,
3138
3150
  j as MpRibbonContextualTabSet,
3139
3151
  V as MpRibbonDropdownButton,
@@ -3145,7 +3157,7 @@ export {
3145
3157
  R as MpRibbonMenuItem,
3146
3158
  Oe as MpRibbonMenuSeparator,
3147
3159
  q as MpRibbonSplitButton,
3148
- I as MpRibbonTab,
3160
+ $ as MpRibbonTab,
3149
3161
  ne as MpRibbonTemplateItem,
3150
3162
  J as MpRibbonToggleButton
3151
3163
  };