@mintplayer/web-components 2.15.0 → 2.17.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.
- package/accordion/index.mjs +5 -5
- package/calendar/index.mjs +1 -1
- package/carousel/index.mjs +57 -143
- package/charts/core/index.mjs +30 -20
- package/charts/core/src/attributes.d.ts +18 -0
- package/charts/core/src/index.d.ts +2 -0
- package/charts/core/src/view-window.d.ts +46 -0
- package/charts/hierarchy/index.mjs +245 -256
- package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +1 -3
- package/charts/sparkline/index.mjs +27 -26
- package/charts/trend/index.mjs +21 -20
- package/checkbox/index.mjs +1 -1
- package/checkbox/src/components/mp-checkbox.d.ts +1 -0
- package/chunks/attributes-L3eKsbdy.mjs +16 -0
- package/chunks/color-mode-warning-71FmlzWX.mjs +13 -0
- package/chunks/{form-check.styles-B0pxJ6YC.mjs → form-check.styles-DqvBnspm.mjs} +24 -3
- package/chunks/{mp-calendar.element-CJ8-t-Zn.mjs → mp-calendar.element-BIHS9SZZ.mjs} +11 -6
- package/chunks/{mp-checkbox-CzwS7Y_t.mjs → mp-checkbox-zV83gILn.mjs} +44 -36
- package/chunks/mp-datatable-eRpl7-2V.mjs +2238 -0
- package/chunks/{mp-datetime-picker.element-D1CiLbHm.mjs → mp-datetime-picker.element-Cxu5-qRE.mjs} +29 -32
- package/chunks/{mp-pagination-Dea75mD4.mjs → mp-pagination-hGy4dL7p.mjs} +9 -4
- package/chunks/{mp-radio-cL46sUA0.mjs → mp-radio-BhRVNdKp.mjs} +32 -28
- package/chunks/{mp-select-BNrbPwN4.mjs → mp-select-CgqYFvUj.mjs} +41 -26
- package/chunks/{mp-splitter-Ckn1kN4v.mjs → mp-splitter-DLehrw3Y.mjs} +144 -120
- package/chunks/{mp-timepicker.element-COZEUIoE.mjs → mp-timepicker.element-BiB9lkgc.mjs} +58 -45
- package/chunks/{mp-toggle-button-eo_aTQtu.mjs → mp-toggle-button-CaS9uYLE.mjs} +26 -24
- package/chunks/{mp-treeview-C8iltDbq.mjs → mp-treeview-CaMTDrvY.mjs} +51 -50
- package/chunks/{overlay-controller-D6agzzOI.mjs → overlay-controller-BHDagokg.mjs} +130 -70
- package/chunks/{id-DNZVAnGC.mjs → resource.service--lqLwEqk.mjs} +144 -206
- package/chunks/view-window-DGvFiDnW.mjs +263 -0
- package/code-snippet/index.mjs +70 -66
- package/code-snippet/src/hljs-loaders.generated.d.ts +1 -1
- package/custom-elements.json +65750 -0
- package/datatable/index.mjs +6 -5
- package/datatable/src/components/column-resize.d.ts +11 -0
- package/datatable/src/components/mp-datatable.d.ts +206 -1
- package/datatable/src/index.d.ts +3 -1
- package/datatable/src/types/column-def.d.ts +61 -0
- package/datatable/src/types/filter.d.ts +138 -0
- package/datatable/src/types/index.d.ts +3 -2
- package/datatable/src/types/labels.d.ts +58 -0
- package/datepicker/index.mjs +10 -9
- package/datetime-picker/index.mjs +1 -1
- package/datetime-picker/src/mp-datetime-picker.element.d.ts +3 -0
- package/dock/index.mjs +430 -463
- package/dock/src/components/mint-dock-manager.element.d.ts +25 -2
- package/dock/src/core/resize.d.ts +60 -0
- package/dropdown-menu/index.mjs +4 -2
- package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +6 -1
- package/dropdown-menu/src/index.d.ts +1 -1
- package/dropdown-menu/src/types/dropdown.d.ts +14 -1
- package/dropdown-menu/src/types/index.d.ts +1 -1
- package/file-manager/index.mjs +63 -61
- package/file-manager/src/components/mp-file-manager.d.ts +4 -3
- package/multi-range/index.mjs +56 -50
- package/multi-range/src/mint-multi-range.element.d.ts +4 -10
- package/multi-range/src/pointer-geometry.d.ts +31 -0
- package/navbar/index.mjs +89 -439
- package/overlay/index.mjs +5 -2
- package/overlay/src/index.d.ts +2 -0
- package/overlay/src/overlay-controller.d.ts +27 -14
- package/overlay/src/overlay-portal.d.ts +53 -0
- package/overlay/src/placement.d.ts +48 -0
- package/package.json +7 -1
- package/pagination/index.mjs +1 -1
- package/phone-input/index.mjs +44 -40
- package/phone-input/src/components/stack.d.ts +8 -0
- package/query-builder/index.mjs +418 -466
- package/query-builder/src/dnd/drag-controller.d.ts +12 -8
- package/query-builder/src/mp-query-builder.element.d.ts +5 -1
- package/query-builder/src/mp-query-condition.element.d.ts +1 -0
- package/radio/index.mjs +1 -1
- package/radio-group/index.mjs +1 -1
- package/ribbon/index.mjs +477 -498
- package/ribbon/src/core/band-text-color.d.ts +10 -0
- package/ribbon/src/core/key-tip-allocator.d.ts +10 -0
- package/ribbon/src/core/plan-reduce-steps.d.ts +62 -0
- package/ribbon/src/mp-ribbon.element.d.ts +0 -27
- package/scheduler/index.mjs +726 -711
- package/scheduler/src/components/mp-scheduler.d.ts +19 -3
- package/scheduler/src/drag/drag-manager.d.ts +1 -9
- package/scheduler/src/input/input-handler.d.ts +12 -2
- package/scheduler/src/utils/geometry.d.ts +39 -0
- package/scheduler/src/views/timeline-view.d.ts +0 -1
- package/scheduler-core/index.mjs +84 -71
- package/scheduler-core/src/services/resource.service.d.ts +0 -12
- package/scheduler-core/src/services/timeline.service.d.ts +0 -9
- package/select/index.mjs +1 -1
- package/select/src/components/mp-select.d.ts +1 -0
- package/signature-pad/index.mjs +21 -23
- package/signature-pad/src/canvas-point.d.ts +26 -0
- package/signature-pad/src/mp-signature-pad.element.d.ts +1 -7
- package/splitter/index.mjs +1 -1
- package/splitter/src/components/mp-splitter.d.ts +16 -0
- package/splitter/src/managers/index.d.ts +1 -0
- package/splitter/src/managers/rescale-panel-sizes.d.ts +14 -0
- package/swiper-core/index.mjs +2 -2
- package/theming/bs-theme-preboot.js +1 -0
- package/theming/color-mode.css +36 -0
- package/theming/index.d.ts +1 -0
- package/theming/index.mjs +327 -0
- package/theming/src/components/mp-theme-toggle.d.ts +71 -0
- package/theming/src/cookie.d.ts +31 -0
- package/theming/src/index.d.ts +5 -0
- package/theming/src/preboot.d.ts +1 -0
- package/theming/src/resolve.d.ts +36 -0
- package/theming/src/store.d.ts +27 -0
- package/theming/src/styles/theme-toggle.styles.d.ts +2 -0
- package/theming/src/testing/fake-broadcast-channel.d.ts +35 -0
- package/theming/src/toggle-modes.d.ts +23 -0
- package/tile-manager/index.mjs +252 -211
- package/tile-manager/src/components/mint-tile-manager.element.d.ts +8 -0
- package/tile-manager/src/utils/grid-geometry.d.ts +49 -0
- package/timeline/index.mjs +156 -164
- package/timeline/src/components/mp-timeline.d.ts +41 -7
- package/timepicker/index.mjs +7 -4
- package/timepicker/src/mp-time-list.element.d.ts +26 -0
- package/timepicker/src/mp-timepicker.element.d.ts +3 -0
- package/toggle-button/index.mjs +1 -1
- package/tree-select/index.mjs +21 -9
- package/treeview/index.mjs +1 -1
- package/treeview/src/components/mp-treeview.d.ts +6 -4
- package/chunks/color-DIeST-IS.mjs +0 -224
- package/chunks/mp-datatable-UJI8E73X.mjs +0 -1400
- package/datatable/src/styles/datatable.styles.d.ts +0 -2
- package/query-builder/src/mp-query-condition.element.template.d.ts +0 -2
package/ribbon/index.mjs
CHANGED
|
@@ -1,13 +1,76 @@
|
|
|
1
|
-
import { LitElement as
|
|
2
|
-
import { property as
|
|
1
|
+
import { LitElement as v, css as f, nothing as E, html as d } from "lit";
|
|
2
|
+
import { property as b, state as z, query as F } from "lit/decorators.js";
|
|
3
3
|
import { L as se } from "../chunks/live-announcer-Bi0orG4n.mjs";
|
|
4
|
-
import { O as
|
|
5
|
-
|
|
4
|
+
import { O as B } from "../chunks/overlay-controller-BHDagokg.mjs";
|
|
5
|
+
const V = "#262626", be = "#FFFFFF";
|
|
6
|
+
function ae(s) {
|
|
7
|
+
const e = s.trim().replace(/^#/, "");
|
|
8
|
+
return /^[0-9a-f]+$/i.test(e) ? e.length === 3 || e.length === 4 ? [...e.slice(0, 3)].map((i) => i + i).join("") : e.length === 6 || e.length === 8 ? e.slice(0, 6) : null : null;
|
|
9
|
+
}
|
|
10
|
+
function le(s) {
|
|
11
|
+
const e = ae(s);
|
|
12
|
+
if (!e) return V;
|
|
13
|
+
const [i, r, t] = [0, 2, 4].map((n) => parseInt(e.slice(n, n + 2), 16) / 255);
|
|
14
|
+
return 0.2126 * i + 0.7152 * r + 0.0722 * t >= 0.6 ? V : be;
|
|
15
|
+
}
|
|
16
|
+
const de = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0", Q = (s) => /[A-Z]/.test(s), ce = (s) => "AEIOU".includes(s);
|
|
17
|
+
function _(s, e, i) {
|
|
18
|
+
const r = [...(s ?? "").toUpperCase()], t = r.slice(0, 1).filter((p) => /[A-Z0-9]/.test(p)), o = r.slice(1).filter((p) => Q(p) && !ce(p)), n = r.filter(Q), l = (e ? [e.toUpperCase().slice(0, 1)] : [...t, ...o, ...n, ...de].filter((p) => !i.has(p)))[0] ?? "?";
|
|
19
|
+
return l !== "?" && i.add(l), l;
|
|
20
|
+
}
|
|
21
|
+
const P = 8;
|
|
22
|
+
function G(s, e) {
|
|
23
|
+
return s.reduce((i, r, t) => i + r + (t > 0 ? e : 0), 0);
|
|
24
|
+
}
|
|
25
|
+
function pe(s) {
|
|
26
|
+
return s.reduce(
|
|
27
|
+
(e, i, r) => i.collapsed || !i.autoScale ? e : e === -1 || i.priority <= s[e].priority ? r : e,
|
|
28
|
+
-1
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function ue(s) {
|
|
32
|
+
return s.reduce(
|
|
33
|
+
(e, i, r) => i.collapsed && (e === -1 || i.priority > s[e].priority) ? r : e,
|
|
34
|
+
-1
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function he(s) {
|
|
38
|
+
const { available: e, gap: i, groups: r } = s, t = G(
|
|
39
|
+
r.map((o) => o.width),
|
|
40
|
+
i
|
|
41
|
+
);
|
|
42
|
+
if (t > e) {
|
|
43
|
+
const o = pe(r);
|
|
44
|
+
return o === -1 ? null : { action: "collapse", index: o };
|
|
45
|
+
}
|
|
46
|
+
if (t < e) {
|
|
47
|
+
const o = ue(r);
|
|
48
|
+
return o === -1 || t + (r[o].naturalWidth - r[o].width) > e ? null : { action: "expand", index: o };
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const fe = 40;
|
|
53
|
+
function ge(s, e) {
|
|
54
|
+
const i = e - fe, r = s.findIndex(
|
|
55
|
+
(t, o) => G(s.slice(0, o + 1), P) > i
|
|
56
|
+
);
|
|
57
|
+
return r === -1 ? s.length : r;
|
|
58
|
+
}
|
|
59
|
+
function X(s, e, i, r) {
|
|
60
|
+
return s.slice(0, Math.max(0, e)).reduce(
|
|
61
|
+
(t, [o, n]) => o === i ? n : t,
|
|
62
|
+
r[i] ?? "large"
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
function me(s, e) {
|
|
66
|
+
return e === "large" ? s : e === "small" ? "small" : s === "large" ? "medium" : s;
|
|
67
|
+
}
|
|
68
|
+
var ve = Object.defineProperty, x = (s, e, i, r) => {
|
|
6
69
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
7
70
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
8
|
-
return t &&
|
|
71
|
+
return t && ve(e, i, t), t;
|
|
9
72
|
};
|
|
10
|
-
class
|
|
73
|
+
class m extends v {
|
|
11
74
|
constructor() {
|
|
12
75
|
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
76
|
if (this.keyTips === "on") {
|
|
@@ -108,7 +171,7 @@ class y extends k {
|
|
|
108
171
|
};
|
|
109
172
|
}
|
|
110
173
|
static {
|
|
111
|
-
this.styles =
|
|
174
|
+
this.styles = f`
|
|
112
175
|
:host {
|
|
113
176
|
display: block;
|
|
114
177
|
/* Tell the UA to pick the right scheme for native form controls
|
|
@@ -643,46 +706,12 @@ class y extends k {
|
|
|
643
706
|
activateKeyTipTarget(e) {
|
|
644
707
|
e.focus(), e.click();
|
|
645
708
|
}
|
|
646
|
-
/**
|
|
647
|
-
* Deterministic 1-letter tip allocator (FR-12). Tries (in order):
|
|
648
|
-
* 1. Explicit `data-key-tip` attribute on the element.
|
|
649
|
-
* 2. First letter of the label that isn't already taken.
|
|
650
|
-
* 3. Subsequent consonants in the label.
|
|
651
|
-
* 4. Other letters of the label.
|
|
652
|
-
* 5. Digits 1-9 then 0 (fallback when every letter is taken).
|
|
653
|
-
*/
|
|
654
|
-
allocateKeyTip(e, i, r) {
|
|
655
|
-
if (i) {
|
|
656
|
-
const n = i.toUpperCase().slice(0, 1);
|
|
657
|
-
return r.add(n), n;
|
|
658
|
-
}
|
|
659
|
-
const t = (e ?? "").toUpperCase(), o = (n) => "AEIOU".includes(n);
|
|
660
|
-
if (t.length > 0) {
|
|
661
|
-
const n = t[0];
|
|
662
|
-
if (/[A-Z0-9]/.test(n) && !r.has(n))
|
|
663
|
-
return r.add(n), n;
|
|
664
|
-
}
|
|
665
|
-
for (let n = 1; n < t.length; n++) {
|
|
666
|
-
const b = t[n];
|
|
667
|
-
if (/[A-Z]/.test(b) && !o(b) && !r.has(b))
|
|
668
|
-
return r.add(b), b;
|
|
669
|
-
}
|
|
670
|
-
for (let n = 0; n < t.length; n++) {
|
|
671
|
-
const b = t[n];
|
|
672
|
-
if (/[A-Z]/.test(b) && !r.has(b))
|
|
673
|
-
return r.add(b), b;
|
|
674
|
-
}
|
|
675
|
-
for (const n of "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0")
|
|
676
|
-
if (!r.has(n))
|
|
677
|
-
return r.add(n), n;
|
|
678
|
-
return "?";
|
|
679
|
-
}
|
|
680
709
|
/** Compute key-tip badges anchored under each tab button in the strip. */
|
|
681
710
|
deriveTabBadges() {
|
|
682
711
|
const e = [], i = /* @__PURE__ */ new Set(), r = this.tabElements;
|
|
683
712
|
for (const t of r) {
|
|
684
|
-
const o = t.getAttribute("data-tab-id") ?? "", n = this.tabsList.find((u) => u.tabId === o)?.element,
|
|
685
|
-
e.push({ tip:
|
|
713
|
+
const o = t.getAttribute("data-tab-id") ?? "", n = this.tabsList.find((u) => u.tabId === o)?.element, a = t.getAttribute("data-key-tip") ?? n?.getAttribute("data-key-tip") ?? null, l = t.textContent ?? "", p = _(l, a, i), c = t.getBoundingClientRect();
|
|
714
|
+
e.push({ tip: p, target: t, rect: { left: c.left + 4, top: c.bottom - 4 } });
|
|
686
715
|
}
|
|
687
716
|
return e;
|
|
688
717
|
}
|
|
@@ -693,20 +722,20 @@ class y extends k {
|
|
|
693
722
|
const i = this.collectActiveGroups(e.element), r = /* @__PURE__ */ new Set(), t = [];
|
|
694
723
|
for (const o of i) {
|
|
695
724
|
if (o.getAttribute("data-resolved-size") === "popup") {
|
|
696
|
-
const
|
|
725
|
+
const a = o.shadowRoot?.querySelector(
|
|
697
726
|
".ribbon-popup-trigger"
|
|
698
727
|
);
|
|
699
|
-
if (
|
|
700
|
-
const
|
|
701
|
-
t.push({ tip:
|
|
728
|
+
if (a) {
|
|
729
|
+
const l = o.getAttribute("data-key-tip"), p = o.getAttribute("label") ?? "", c = _(p, l, r), u = a.getBoundingClientRect();
|
|
730
|
+
t.push({ tip: c, target: a, rect: { left: u.left + 4, top: u.bottom - 6 } });
|
|
702
731
|
}
|
|
703
732
|
continue;
|
|
704
733
|
}
|
|
705
734
|
const n = this.collectGroupItems(o);
|
|
706
|
-
for (const
|
|
707
|
-
if (
|
|
708
|
-
const
|
|
709
|
-
t.push({ tip:
|
|
735
|
+
for (const a of n) {
|
|
736
|
+
if (a.hasAttribute("disabled")) continue;
|
|
737
|
+
const l = a.getAttribute("data-key-tip"), p = a.getAttribute("label") ?? "", c = _(p, l, r), u = a.getBoundingClientRect();
|
|
738
|
+
t.push({ tip: c, target: a, rect: { left: u.left + 2, top: u.bottom - 6 } });
|
|
710
739
|
}
|
|
711
740
|
}
|
|
712
741
|
return t;
|
|
@@ -721,18 +750,18 @@ class y extends k {
|
|
|
721
750
|
);
|
|
722
751
|
}
|
|
723
752
|
moveFocusBetweenGroups(e, i) {
|
|
724
|
-
const r = this.tabsList.find((
|
|
753
|
+
const r = this.tabsList.find((l) => l.tabId === this.activeTabId);
|
|
725
754
|
if (!r) return !1;
|
|
726
755
|
const t = this.collectActiveGroups(r.element).filter(
|
|
727
|
-
(
|
|
756
|
+
(l) => l.getAttribute("data-resolved-size") !== "popup" || l.hasAttribute("data-popup-open")
|
|
728
757
|
);
|
|
729
758
|
if (t.length === 0) return !1;
|
|
730
759
|
const o = t.indexOf(e);
|
|
731
760
|
if (o === -1) return !1;
|
|
732
761
|
const n = o + i;
|
|
733
762
|
if (n < 0 || n >= t.length) return !1;
|
|
734
|
-
const
|
|
735
|
-
return
|
|
763
|
+
const a = this.firstFocusableInGroup(t[n]);
|
|
764
|
+
return a ? (a.focus(), !0) : !1;
|
|
736
765
|
}
|
|
737
766
|
firstFocusableInGroup(e) {
|
|
738
767
|
const i = Array.from(
|
|
@@ -810,7 +839,7 @@ class y extends k {
|
|
|
810
839
|
<slot @slotchange="${this.onSlotChange}"></slot>
|
|
811
840
|
</div>`}
|
|
812
841
|
</div>
|
|
813
|
-
${this.keyTipMode !== "off" ? this.renderKeyTipOverlay() :
|
|
842
|
+
${this.keyTipMode !== "off" ? this.renderKeyTipOverlay() : E}
|
|
814
843
|
${this.liveAnnouncer.template()}
|
|
815
844
|
`;
|
|
816
845
|
}
|
|
@@ -839,13 +868,13 @@ class y extends k {
|
|
|
839
868
|
const t = r.contextualSetLabel, o = r.contextualColor, n = i;
|
|
840
869
|
for (; i < this.tabsList.length && this.tabsList[i].contextualSetLabel === t && this.tabsList[i].contextualColor === o; )
|
|
841
870
|
i++;
|
|
842
|
-
const
|
|
871
|
+
const a = this.tabsList.slice(n, i), l = le(o), p = `--bs-ribbon-contextual-color: ${o};--ribbon-contextual-text: ${l};`;
|
|
843
872
|
e.push(d`
|
|
844
|
-
<div class="ribbon-contextual-group" style="${
|
|
873
|
+
<div class="ribbon-contextual-group" style="${p}">
|
|
845
874
|
<div class="ribbon-contextual-group-band">${t}</div>
|
|
846
875
|
<div class="ribbon-contextual-group-tabs">
|
|
847
|
-
${
|
|
848
|
-
(
|
|
876
|
+
${a.map(
|
|
877
|
+
(c, u) => this.renderTabButton(c, n + u)
|
|
849
878
|
)}
|
|
850
879
|
</div>
|
|
851
880
|
</div>
|
|
@@ -853,17 +882,6 @@ class y extends k {
|
|
|
853
882
|
}
|
|
854
883
|
return e;
|
|
855
884
|
}
|
|
856
|
-
/**
|
|
857
|
-
* Office-faithful contrast rule: dark text on pastel bands, white text on
|
|
858
|
-
* saturated bands. Uses W3C relative luminance with a 0.6 cutoff. Accepts
|
|
859
|
-
* 6-digit hex; falls back to dark on parse failure (safe default).
|
|
860
|
-
*/
|
|
861
|
-
getBandTextColor(e) {
|
|
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";
|
|
866
|
-
}
|
|
867
885
|
renderTabButton(e, i) {
|
|
868
886
|
const r = e.tabId === this.activeTabId, t = !!e.contextualColor, o = r ? 0 : -1;
|
|
869
887
|
return d`
|
|
@@ -888,27 +906,27 @@ class y extends k {
|
|
|
888
906
|
"mp-ribbon-contextual-tab-set"
|
|
889
907
|
), n) {
|
|
890
908
|
if (n.hasAttribute("hidden") || o.hasAttribute("hidden")) continue;
|
|
891
|
-
const
|
|
909
|
+
const p = n.getAttribute("color") ?? "#5BAEFF", c = n.getAttribute("label") ?? "", u = Array.from(
|
|
892
910
|
n.querySelectorAll("mp-ribbon-tab")
|
|
893
|
-
),
|
|
894
|
-
for (const
|
|
895
|
-
const
|
|
911
|
+
), h = [];
|
|
912
|
+
for (const y of u) {
|
|
913
|
+
const L = y.getAttribute("tab-id") ?? "";
|
|
896
914
|
i.push({
|
|
897
|
-
tabId:
|
|
898
|
-
label:
|
|
899
|
-
element:
|
|
900
|
-
contextualColor:
|
|
901
|
-
contextualSetLabel:
|
|
902
|
-
}),
|
|
915
|
+
tabId: L,
|
|
916
|
+
label: y.getAttribute("label") ?? "",
|
|
917
|
+
element: y,
|
|
918
|
+
contextualColor: p,
|
|
919
|
+
contextualSetLabel: c
|
|
920
|
+
}), h.push(L);
|
|
903
921
|
}
|
|
904
|
-
|
|
922
|
+
h.length > 0 && r.push({ label: c, color: p, tabIds: h });
|
|
905
923
|
continue;
|
|
906
924
|
}
|
|
907
|
-
let
|
|
908
|
-
o.tagName === "MP-RIBBON-TAB" ?
|
|
909
|
-
tabId:
|
|
910
|
-
label:
|
|
911
|
-
element:
|
|
925
|
+
let a = null;
|
|
926
|
+
o.tagName === "MP-RIBBON-TAB" ? a = o : a = o.querySelector("mp-ribbon-tab"), a && i.push({
|
|
927
|
+
tabId: a.getAttribute("tab-id") ?? "",
|
|
928
|
+
label: a.getAttribute("label") ?? "",
|
|
929
|
+
element: a
|
|
912
930
|
});
|
|
913
931
|
}
|
|
914
932
|
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();
|
|
@@ -955,18 +973,18 @@ class y extends k {
|
|
|
955
973
|
*/
|
|
956
974
|
reflowOverflow() {
|
|
957
975
|
if (this.minimized) return;
|
|
958
|
-
const e = this.tabsList.find((
|
|
976
|
+
const e = this.tabsList.find((c) => c.tabId === this.activeTabId);
|
|
959
977
|
if (!e) return;
|
|
960
978
|
const i = e.element, r = this.collectActiveGroups(i);
|
|
961
979
|
if (r.length === 0) return;
|
|
962
980
|
if (this.layout === "simplified") {
|
|
963
|
-
for (const
|
|
964
|
-
|
|
981
|
+
for (const c of r)
|
|
982
|
+
c.hasAttribute("data-resolved-size") && c.removeAttribute("data-resolved-size");
|
|
965
983
|
this.diffCollapsedGroupsAndAnnounce(r);
|
|
966
984
|
return;
|
|
967
985
|
}
|
|
968
|
-
for (const
|
|
969
|
-
|
|
986
|
+
for (const c of r)
|
|
987
|
+
c.getAttribute("data-resolved-size") !== "popup" && this.naturalWidths.set(c, c.offsetWidth);
|
|
970
988
|
const t = i.reduceOrder, o = i.idealSizes;
|
|
971
989
|
if (t && t.length > 0) {
|
|
972
990
|
if (this.applyAuthorReduceOrder(
|
|
@@ -981,44 +999,25 @@ class y extends k {
|
|
|
981
999
|
this.diffCollapsedGroupsAndAnnounce(r);
|
|
982
1000
|
return;
|
|
983
1001
|
}
|
|
984
|
-
const n = i.clientWidth,
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
const z = h(I);
|
|
1004
|
-
(z > F || z === F && w < C) && (p = I, F = z, C = w);
|
|
1005
|
-
}
|
|
1006
|
-
return p;
|
|
1007
|
-
};
|
|
1008
|
-
let x = r.length;
|
|
1009
|
-
for (; c() > n && x-- > 0; ) {
|
|
1010
|
-
const p = f();
|
|
1011
|
-
if (!p) break;
|
|
1012
|
-
p.setAttribute("data-resolved-size", "popup"), a = !0;
|
|
1013
|
-
}
|
|
1014
|
-
for (x = r.length; c() < n && x-- > 0; ) {
|
|
1015
|
-
const p = m();
|
|
1016
|
-
if (!p) break;
|
|
1017
|
-
const F = this.naturalWidths.get(p) ?? 0, C = p.offsetWidth;
|
|
1018
|
-
if (c() + (F - C) > n) break;
|
|
1019
|
-
p.removeAttribute("data-resolved-size"), a = !0;
|
|
1020
|
-
}
|
|
1021
|
-
if (a) {
|
|
1002
|
+
const n = i.clientWidth, a = () => ({
|
|
1003
|
+
available: n,
|
|
1004
|
+
gap: P,
|
|
1005
|
+
groups: r.map((c) => ({
|
|
1006
|
+
width: c.offsetWidth,
|
|
1007
|
+
naturalWidth: this.naturalWidths.get(c) ?? 0,
|
|
1008
|
+
priority: Number(c.getAttribute("priority") ?? "0"),
|
|
1009
|
+
autoScale: c.getAttribute("auto-scale") !== "false",
|
|
1010
|
+
collapsed: c.getAttribute("data-resolved-size") === "popup"
|
|
1011
|
+
}))
|
|
1012
|
+
});
|
|
1013
|
+
let l = !1;
|
|
1014
|
+
const p = (c) => r.some(() => {
|
|
1015
|
+
const u = he(a());
|
|
1016
|
+
if (u?.action !== c) return !0;
|
|
1017
|
+
const h = r[u.index];
|
|
1018
|
+
return c === "collapse" ? h.setAttribute("data-resolved-size", "popup") : h.removeAttribute("data-resolved-size"), l = !0, !1;
|
|
1019
|
+
});
|
|
1020
|
+
if (p("collapse"), p("expand"), l) {
|
|
1022
1021
|
this.scheduleReflow();
|
|
1023
1022
|
return;
|
|
1024
1023
|
}
|
|
@@ -1064,44 +1063,33 @@ class y extends k {
|
|
|
1064
1063
|
* time and the runtime treats it as a no-op.
|
|
1065
1064
|
*/
|
|
1066
1065
|
applyAuthorReduceOrder(e, i, r, t) {
|
|
1067
|
-
const
|
|
1068
|
-
(
|
|
1069
|
-
|
|
1070
|
-
),
|
|
1071
|
-
let
|
|
1072
|
-
for (;
|
|
1073
|
-
const [
|
|
1074
|
-
if (!
|
|
1075
|
-
|
|
1066
|
+
const o = e.clientWidth, n = () => G(
|
|
1067
|
+
i.map((u) => u.offsetWidth),
|
|
1068
|
+
P
|
|
1069
|
+
), a = (u) => i.find((h) => h.getAttribute("group-id") === u) ?? null;
|
|
1070
|
+
let l = this.appliedReduceSteps.get(e) ?? 0, p = !1, c = r.length - l;
|
|
1071
|
+
for (; n() > o && l < r.length && c-- > 0; ) {
|
|
1072
|
+
const [u, h] = r[l], y = a(u);
|
|
1073
|
+
if (!y || y.getAttribute("auto-scale") === "false") {
|
|
1074
|
+
l++;
|
|
1076
1075
|
continue;
|
|
1077
1076
|
}
|
|
1078
|
-
this.applyGroupSize(
|
|
1077
|
+
this.applyGroupSize(y, h, t), l++, p = !0;
|
|
1079
1078
|
}
|
|
1080
|
-
for (
|
|
1081
|
-
const [
|
|
1082
|
-
if (!
|
|
1083
|
-
|
|
1079
|
+
for (c = l; l > 0 && c-- > 0; ) {
|
|
1080
|
+
const [u] = r[l - 1], h = a(u);
|
|
1081
|
+
if (!h) {
|
|
1082
|
+
l--;
|
|
1084
1083
|
continue;
|
|
1085
1084
|
}
|
|
1086
|
-
const
|
|
1087
|
-
if (this.applyGroupSize(
|
|
1088
|
-
this.applyGroupSize(
|
|
1085
|
+
const y = X(r, l - 1, u, t), L = X(r, l, u, t);
|
|
1086
|
+
if (this.applyGroupSize(h, y, t), n() > o) {
|
|
1087
|
+
this.applyGroupSize(h, L, t);
|
|
1089
1088
|
break;
|
|
1090
1089
|
}
|
|
1091
|
-
|
|
1090
|
+
l--, p = !0;
|
|
1092
1091
|
}
|
|
1093
|
-
return this.appliedReduceSteps.set(e,
|
|
1094
|
-
}
|
|
1095
|
-
/**
|
|
1096
|
-
* Compute the resolved size of `groupId` after the first `count` steps of
|
|
1097
|
-
* `steps` have been applied. The starting point is `idealSizes[groupId]`
|
|
1098
|
-
* or `large` if unset.
|
|
1099
|
-
*/
|
|
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;
|
|
1092
|
+
return this.appliedReduceSteps.set(e, l), p;
|
|
1105
1093
|
}
|
|
1106
1094
|
/**
|
|
1107
1095
|
* Apply a resolved size to a group + mutate slotted item sizes so the
|
|
@@ -1118,21 +1106,13 @@ class y extends k {
|
|
|
1118
1106
|
const t = this.collectGroupItems(e);
|
|
1119
1107
|
for (const o of t) {
|
|
1120
1108
|
if (!this.originalItemSizes.has(o)) {
|
|
1121
|
-
const
|
|
1122
|
-
this.originalItemSizes.set(o,
|
|
1109
|
+
const l = o.getAttribute("size") ?? "medium";
|
|
1110
|
+
this.originalItemSizes.set(o, l);
|
|
1123
1111
|
}
|
|
1124
|
-
const n = this.originalItemSizes.get(o),
|
|
1125
|
-
o.getAttribute("size") !==
|
|
1112
|
+
const n = this.originalItemSizes.get(o), a = me(n, i);
|
|
1113
|
+
o.getAttribute("size") !== a && o.setAttribute("size", a);
|
|
1126
1114
|
}
|
|
1127
1115
|
}
|
|
1128
|
-
/**
|
|
1129
|
-
* Compute the rendered item size given its consumer-declared "original"
|
|
1130
|
-
* size and the group's resolved size. Items can only ever shrink, never
|
|
1131
|
-
* grow above their original.
|
|
1132
|
-
*/
|
|
1133
|
-
deriveItemSize(e, i) {
|
|
1134
|
-
return i === "large" ? e : i === "small" ? "small" : e === "large" ? "medium" : e;
|
|
1135
|
-
}
|
|
1136
1116
|
collectGroupItems(e) {
|
|
1137
1117
|
return Array.from(
|
|
1138
1118
|
e.querySelectorAll(
|
|
@@ -1162,49 +1142,49 @@ class y extends k {
|
|
|
1162
1142
|
return r;
|
|
1163
1143
|
}
|
|
1164
1144
|
}
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
],
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
],
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
],
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
],
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
],
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
],
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
],
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
],
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
],
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
],
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
],
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
],
|
|
1201
|
-
typeof customElements < "u" && !customElements.get("mp-ribbon") && customElements.define("mp-ribbon",
|
|
1202
|
-
var
|
|
1145
|
+
x([
|
|
1146
|
+
b({ type: String, attribute: "active-tab-id", reflect: !0 })
|
|
1147
|
+
], m.prototype, "activeTabId");
|
|
1148
|
+
x([
|
|
1149
|
+
z()
|
|
1150
|
+
], m.prototype, "tabsList");
|
|
1151
|
+
x([
|
|
1152
|
+
z()
|
|
1153
|
+
], m.prototype, "contextualSets");
|
|
1154
|
+
x([
|
|
1155
|
+
b({ type: String, reflect: !0 })
|
|
1156
|
+
], m.prototype, "layout");
|
|
1157
|
+
x([
|
|
1158
|
+
b({ type: String, attribute: "region-label" })
|
|
1159
|
+
], m.prototype, "regionLabel");
|
|
1160
|
+
x([
|
|
1161
|
+
b({ type: Boolean })
|
|
1162
|
+
], m.prototype, "minimized");
|
|
1163
|
+
x([
|
|
1164
|
+
b({ type: String, reflect: !0 })
|
|
1165
|
+
], m.prototype, "version");
|
|
1166
|
+
x([
|
|
1167
|
+
b({ type: String, attribute: "color-scheme", reflect: !0 })
|
|
1168
|
+
], m.prototype, "colorScheme");
|
|
1169
|
+
x([
|
|
1170
|
+
b({ type: String, attribute: "touch-mode", reflect: !0 })
|
|
1171
|
+
], m.prototype, "touchMode");
|
|
1172
|
+
x([
|
|
1173
|
+
b({ type: String, attribute: "key-tips" })
|
|
1174
|
+
], m.prototype, "keyTips");
|
|
1175
|
+
x([
|
|
1176
|
+
z()
|
|
1177
|
+
], m.prototype, "keyTipMode");
|
|
1178
|
+
x([
|
|
1179
|
+
z()
|
|
1180
|
+
], m.prototype, "keyTipBadges");
|
|
1181
|
+
typeof customElements < "u" && !customElements.get("mp-ribbon") && customElements.define("mp-ribbon", m);
|
|
1182
|
+
var xe = Object.defineProperty, Y = (s, e, i, r) => {
|
|
1203
1183
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
1204
1184
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
1205
|
-
return t &&
|
|
1185
|
+
return t && xe(e, i, t), t;
|
|
1206
1186
|
};
|
|
1207
|
-
class
|
|
1187
|
+
class j extends v {
|
|
1208
1188
|
constructor() {
|
|
1209
1189
|
super(...arguments), this.label = "Quick Access Toolbar", this.touchMode = "auto", this.lastAppliedLabel = null, this.onKeyDown = (e) => {
|
|
1210
1190
|
const { key: i } = e;
|
|
@@ -1212,13 +1192,13 @@ class N extends k {
|
|
|
1212
1192
|
return;
|
|
1213
1193
|
const r = this.collectItems();
|
|
1214
1194
|
if (r.length === 0) return;
|
|
1215
|
-
const t = e.composedPath(), o = r.findIndex((
|
|
1216
|
-
let
|
|
1217
|
-
|
|
1195
|
+
const t = e.composedPath(), o = r.findIndex((c) => t.includes(c)), n = getComputedStyle(this).direction === "rtl", a = n ? i === "ArrowLeft" : i === "ArrowRight", l = n ? i === "ArrowRight" : i === "ArrowLeft";
|
|
1196
|
+
let p = o;
|
|
1197
|
+
l ? p = Math.max(0, o - 1) : a ? p = Math.min(r.length - 1, o + 1) : i === "Home" ? p = 0 : i === "End" && (p = r.length - 1), p !== o && p >= 0 && (r[p].focus(), e.preventDefault());
|
|
1218
1198
|
};
|
|
1219
1199
|
}
|
|
1220
1200
|
static {
|
|
1221
|
-
this.styles =
|
|
1201
|
+
this.styles = f`
|
|
1222
1202
|
:host {
|
|
1223
1203
|
display: block;
|
|
1224
1204
|
color-scheme: light dark;
|
|
@@ -1314,22 +1294,22 @@ class N extends k {
|
|
|
1314
1294
|
return i;
|
|
1315
1295
|
}
|
|
1316
1296
|
}
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
],
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
],
|
|
1323
|
-
typeof customElements < "u" && !customElements.get("mp-quick-access-toolbar") && customElements.define("mp-quick-access-toolbar",
|
|
1324
|
-
var
|
|
1297
|
+
Y([
|
|
1298
|
+
b({ type: String })
|
|
1299
|
+
], j.prototype, "label");
|
|
1300
|
+
Y([
|
|
1301
|
+
b({ type: String, attribute: "touch-mode", reflect: !0 })
|
|
1302
|
+
], j.prototype, "touchMode");
|
|
1303
|
+
typeof customElements < "u" && !customElements.get("mp-quick-access-toolbar") && customElements.define("mp-quick-access-toolbar", j);
|
|
1304
|
+
var ye = Object.defineProperty, k = (s, e, i, r) => {
|
|
1325
1305
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
1326
1306
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
1327
|
-
return t &&
|
|
1307
|
+
return t && ye(e, i, t), t;
|
|
1328
1308
|
};
|
|
1329
|
-
const
|
|
1330
|
-
class
|
|
1309
|
+
const we = "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";
|
|
1310
|
+
class w extends v {
|
|
1331
1311
|
constructor() {
|
|
1332
|
-
super(...arguments), this.tabId = "", this.label = "", this.active = !1, this.idealSizes = {}, this.reduceOrder = [], this.overflowEntries = [], this.overflowOverlay = new
|
|
1312
|
+
super(...arguments), this.tabId = "", this.label = "", this.active = !1, this.idealSizes = {}, this.reduceOrder = [], this.overflowEntries = [], this.overflowOverlay = new B(this, {
|
|
1333
1313
|
anchor: () => this.overflowTriggerEl ?? null,
|
|
1334
1314
|
panel: () => this.overflowPanelEl ?? null
|
|
1335
1315
|
}), this.overflowReflowFrame = 0, this.scheduleOverflowReflow = () => {
|
|
@@ -1341,7 +1321,7 @@ class $ extends k {
|
|
|
1341
1321
|
};
|
|
1342
1322
|
}
|
|
1343
1323
|
static {
|
|
1344
|
-
this.styles =
|
|
1324
|
+
this.styles = f`
|
|
1345
1325
|
:host {
|
|
1346
1326
|
display: none;
|
|
1347
1327
|
width: 100%;
|
|
@@ -1480,21 +1460,21 @@ class $ extends k {
|
|
|
1480
1460
|
popup: 0
|
|
1481
1461
|
}, i = (t) => this.idealSizes[t] ?? "large", r = /* @__PURE__ */ new Map();
|
|
1482
1462
|
for (let t = 0; t < this.reduceOrder.length; t++) {
|
|
1483
|
-
const o = this.reduceOrder[t], [n,
|
|
1484
|
-
if (!(
|
|
1463
|
+
const o = this.reduceOrder[t], [n, a] = o;
|
|
1464
|
+
if (!(a in e)) {
|
|
1485
1465
|
console.warn(
|
|
1486
|
-
`[mp-ribbon-tab "${this.tabId}"] reduceOrder[${t}] has invalid size "${
|
|
1466
|
+
`[mp-ribbon-tab "${this.tabId}"] reduceOrder[${t}] has invalid size "${a}". Expected large | medium | small | popup.`
|
|
1487
1467
|
);
|
|
1488
1468
|
continue;
|
|
1489
1469
|
}
|
|
1490
|
-
const
|
|
1491
|
-
if (e[
|
|
1470
|
+
const l = r.get(n) ?? i(n);
|
|
1471
|
+
if (e[a] >= e[l]) {
|
|
1492
1472
|
console.warn(
|
|
1493
|
-
`[mp-ribbon-tab "${this.tabId}"] reduceOrder[${t}] for "${n}" goes ${
|
|
1473
|
+
`[mp-ribbon-tab "${this.tabId}"] reduceOrder[${t}] for "${n}" goes ${l} → ${a}, which is not a reduction. Steps must monotonically decrease size per group.`
|
|
1494
1474
|
);
|
|
1495
1475
|
continue;
|
|
1496
1476
|
}
|
|
1497
|
-
r.set(n,
|
|
1477
|
+
r.set(n, a);
|
|
1498
1478
|
}
|
|
1499
1479
|
}
|
|
1500
1480
|
render() {
|
|
@@ -1522,7 +1502,7 @@ class $ extends k {
|
|
|
1522
1502
|
type="button"
|
|
1523
1503
|
@click="${() => this.activateOverflowEntry(e)}"
|
|
1524
1504
|
>
|
|
1525
|
-
${e.icon ? d`<span class="overflow-entry-icon">${e.icon}</span>` :
|
|
1505
|
+
${e.icon ? d`<span class="overflow-entry-icon">${e.icon}</span>` : E}
|
|
1526
1506
|
<span>${e.label || "(unnamed)"}</span>
|
|
1527
1507
|
</button>
|
|
1528
1508
|
`
|
|
@@ -1535,77 +1515,76 @@ class $ extends k {
|
|
|
1535
1515
|
this.querySelectorAll("mp-ribbon-group")
|
|
1536
1516
|
);
|
|
1537
1517
|
if (!e) {
|
|
1538
|
-
for (const
|
|
1518
|
+
for (const n of i) n.removeAttribute("data-overflow-hidden");
|
|
1539
1519
|
this.overflowEntries = [], this.removeAttribute("data-has-overflow"), this.overflowOverlay.isOpen && this.overflowOverlay.close(!1);
|
|
1540
1520
|
return;
|
|
1541
1521
|
}
|
|
1542
|
-
for (const
|
|
1522
|
+
for (const n of i) n.removeAttribute("data-overflow-hidden");
|
|
1543
1523
|
const r = this.clientWidth;
|
|
1544
1524
|
if (r <= 0 || i.length === 0) {
|
|
1545
1525
|
this.overflowEntries = [], this.removeAttribute("data-has-overflow");
|
|
1546
1526
|
return;
|
|
1547
1527
|
}
|
|
1548
|
-
const t =
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
target: u
|
|
1528
|
+
const t = i.slice(
|
|
1529
|
+
ge(
|
|
1530
|
+
i.map((n) => n.offsetWidth),
|
|
1531
|
+
r
|
|
1532
|
+
)
|
|
1533
|
+
);
|
|
1534
|
+
for (const n of t) n.setAttribute("data-overflow-hidden", "");
|
|
1535
|
+
const o = [];
|
|
1536
|
+
for (const n of t) {
|
|
1537
|
+
const a = n.querySelectorAll(we);
|
|
1538
|
+
for (const l of Array.from(a))
|
|
1539
|
+
l.hasAttribute("disabled") || o.push({
|
|
1540
|
+
label: l.getAttribute("label") ?? "",
|
|
1541
|
+
icon: l.getAttribute("icon") ?? "",
|
|
1542
|
+
target: l
|
|
1564
1543
|
});
|
|
1565
1544
|
}
|
|
1566
|
-
this.overflowEntries =
|
|
1545
|
+
this.overflowEntries = o, o.length > 0 ? this.setAttribute("data-has-overflow", "") : (this.removeAttribute("data-has-overflow"), this.overflowOverlay.isOpen && this.overflowOverlay.close(!1));
|
|
1567
1546
|
}
|
|
1568
1547
|
/** Activate an overflow item by forwarding `.click()` to the original element. */
|
|
1569
1548
|
activateOverflowEntry(e) {
|
|
1570
1549
|
this.overflowOverlay.close(), e.target.click();
|
|
1571
1550
|
}
|
|
1572
1551
|
}
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
],
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
],
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
],
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
],
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
],
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
],
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
],
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
],
|
|
1597
|
-
customElements.define("mp-ribbon-tab",
|
|
1598
|
-
var
|
|
1552
|
+
k([
|
|
1553
|
+
b({ type: String, attribute: "tab-id", reflect: !0 })
|
|
1554
|
+
], w.prototype, "tabId");
|
|
1555
|
+
k([
|
|
1556
|
+
b({ type: String, reflect: !0 })
|
|
1557
|
+
], w.prototype, "label");
|
|
1558
|
+
k([
|
|
1559
|
+
b({ type: Boolean, reflect: !0 })
|
|
1560
|
+
], w.prototype, "active");
|
|
1561
|
+
k([
|
|
1562
|
+
b({ attribute: !1 })
|
|
1563
|
+
], w.prototype, "idealSizes");
|
|
1564
|
+
k([
|
|
1565
|
+
b({ attribute: !1 })
|
|
1566
|
+
], w.prototype, "reduceOrder");
|
|
1567
|
+
k([
|
|
1568
|
+
z()
|
|
1569
|
+
], w.prototype, "overflowEntries");
|
|
1570
|
+
k([
|
|
1571
|
+
F(".overflow-trigger")
|
|
1572
|
+
], w.prototype, "overflowTriggerEl");
|
|
1573
|
+
k([
|
|
1574
|
+
F(".overflow-panel")
|
|
1575
|
+
], w.prototype, "overflowPanelEl");
|
|
1576
|
+
customElements.define("mp-ribbon-tab", w);
|
|
1577
|
+
var ke = Object.defineProperty, q = (s, e, i, r) => {
|
|
1599
1578
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
1600
1579
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
1601
|
-
return t &&
|
|
1580
|
+
return t && ke(e, i, t), t;
|
|
1602
1581
|
};
|
|
1603
|
-
class
|
|
1582
|
+
class D extends v {
|
|
1604
1583
|
constructor() {
|
|
1605
1584
|
super(...arguments), this.label = "", this.color = "#F0AF84", this.hidden = !1;
|
|
1606
1585
|
}
|
|
1607
1586
|
static {
|
|
1608
|
-
this.styles =
|
|
1587
|
+
this.styles = f`
|
|
1609
1588
|
:host { display: contents; }
|
|
1610
1589
|
`;
|
|
1611
1590
|
}
|
|
@@ -1622,24 +1601,24 @@ class j extends k {
|
|
|
1622
1601
|
return d`<slot></slot>`;
|
|
1623
1602
|
}
|
|
1624
1603
|
}
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
],
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
],
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
],
|
|
1634
|
-
customElements.define("mp-ribbon-contextual-tab-set",
|
|
1635
|
-
var
|
|
1604
|
+
q([
|
|
1605
|
+
b({ type: String, reflect: !0 })
|
|
1606
|
+
], D.prototype, "label");
|
|
1607
|
+
q([
|
|
1608
|
+
b({ type: String, reflect: !0 })
|
|
1609
|
+
], D.prototype, "color");
|
|
1610
|
+
q([
|
|
1611
|
+
b({ type: Boolean, reflect: !0 })
|
|
1612
|
+
], D.prototype, "hidden");
|
|
1613
|
+
customElements.define("mp-ribbon-contextual-tab-set", D);
|
|
1614
|
+
var Ae = Object.defineProperty, C = (s, e, i, r) => {
|
|
1636
1615
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
1637
1616
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
1638
|
-
return t &&
|
|
1617
|
+
return t && Ae(e, i, t), t;
|
|
1639
1618
|
};
|
|
1640
|
-
const
|
|
1619
|
+
const A = class K extends v {
|
|
1641
1620
|
constructor() {
|
|
1642
|
-
super(...arguments), this.groupId = "", this.label = "", this.icon = "", this.dialogLauncher = "", this.resolvedSize = "", this.priority = 0, this.autoScale = "true", this.overlay = new
|
|
1621
|
+
super(...arguments), this.groupId = "", this.label = "", this.icon = "", this.dialogLauncher = "", this.resolvedSize = "", this.priority = 0, this.autoScale = "true", this.overlay = new B(this, {
|
|
1643
1622
|
anchor: () => this.renderRoot.querySelector(".ribbon-popup-trigger"),
|
|
1644
1623
|
panel: () => this.renderRoot.querySelector(".ribbon-group"),
|
|
1645
1624
|
stickyOnAnchorOffscreen: !0,
|
|
@@ -1649,7 +1628,7 @@ const T = class U extends k {
|
|
|
1649
1628
|
}), this.onFocusIn = (e) => {
|
|
1650
1629
|
if (!e.target) return;
|
|
1651
1630
|
const t = e.composedPath().find(
|
|
1652
|
-
(o) => o instanceof HTMLElement && o.matches(
|
|
1631
|
+
(o) => o instanceof HTMLElement && o.matches(K.ITEM_SELECTOR) && this.contains(o)
|
|
1653
1632
|
);
|
|
1654
1633
|
if (t)
|
|
1655
1634
|
for (const o of this.collectItems())
|
|
@@ -1661,18 +1640,18 @@ const T = class U extends k {
|
|
|
1661
1640
|
return;
|
|
1662
1641
|
const r = e.composedPath(), t = r[0];
|
|
1663
1642
|
if (t && t instanceof HTMLElement) {
|
|
1664
|
-
const
|
|
1665
|
-
if (
|
|
1643
|
+
const h = t.tagName;
|
|
1644
|
+
if (h === "SELECT" || h === "INPUT" || h === "TEXTAREA") return;
|
|
1666
1645
|
}
|
|
1667
|
-
if (r.some((
|
|
1646
|
+
if (r.some((h) => h instanceof HTMLElement && h.tagName === "MP-RIBBON-GALLERY"))
|
|
1668
1647
|
return;
|
|
1669
1648
|
const o = this.collectItems();
|
|
1670
1649
|
if (o.length === 0) return;
|
|
1671
1650
|
const n = r.find(
|
|
1672
|
-
(
|
|
1673
|
-
),
|
|
1674
|
-
let u =
|
|
1675
|
-
|
|
1651
|
+
(h) => h instanceof HTMLElement && o.includes(h)
|
|
1652
|
+
), a = n ? o.indexOf(n) : -1, l = getComputedStyle(this).direction === "rtl", p = l ? i === "ArrowLeft" : i === "ArrowRight", c = l ? i === "ArrowRight" : i === "ArrowLeft";
|
|
1653
|
+
let u = a;
|
|
1654
|
+
c ? u = a <= 0 ? o.length - 1 : a - 1 : p ? u = a >= o.length - 1 ? 0 : a + 1 : i === "Home" ? u = 0 : i === "End" && (u = o.length - 1), u !== a && u >= 0 && (o[u].focus(), e.preventDefault());
|
|
1676
1655
|
}, this.onTriggerClick = async (e) => {
|
|
1677
1656
|
e.stopPropagation(), await this.overlay.toggle();
|
|
1678
1657
|
}, this.onTriggerKeyDown = async (e) => {
|
|
@@ -1680,7 +1659,7 @@ const T = class U extends k {
|
|
|
1680
1659
|
};
|
|
1681
1660
|
}
|
|
1682
1661
|
static {
|
|
1683
|
-
this.styles =
|
|
1662
|
+
this.styles = f`
|
|
1684
1663
|
:host { display: inline-flex; position: relative; }
|
|
1685
1664
|
:host::after {
|
|
1686
1665
|
content: '';
|
|
@@ -1875,7 +1854,7 @@ const T = class U extends k {
|
|
|
1875
1854
|
}
|
|
1876
1855
|
collectItems() {
|
|
1877
1856
|
return Array.from(
|
|
1878
|
-
this.querySelectorAll(
|
|
1857
|
+
this.querySelectorAll(K.ITEM_SELECTOR)
|
|
1879
1858
|
).filter((e) => !e.hasAttribute("disabled"));
|
|
1880
1859
|
}
|
|
1881
1860
|
updated(e) {
|
|
@@ -1898,7 +1877,7 @@ const T = class U extends k {
|
|
|
1898
1877
|
title="${this.dialogLauncher}"
|
|
1899
1878
|
aria-label="${this.dialogLauncher}"
|
|
1900
1879
|
@click="${this.onDialogLauncherClick}"
|
|
1901
|
-
>⬘</button>` :
|
|
1880
|
+
>⬘</button>` : E}
|
|
1902
1881
|
</div>
|
|
1903
1882
|
</div>
|
|
1904
1883
|
<button
|
|
@@ -1910,7 +1889,7 @@ const T = class U extends k {
|
|
|
1910
1889
|
@click="${this.onTriggerClick}"
|
|
1911
1890
|
@keydown="${this.onTriggerKeyDown}"
|
|
1912
1891
|
>
|
|
1913
|
-
${this.icon ? d`<span class="ribbon-popup-trigger-icon">${this.icon}</span>` :
|
|
1892
|
+
${this.icon ? d`<span class="ribbon-popup-trigger-icon">${this.icon}</span>` : E}
|
|
1914
1893
|
<span class="ribbon-popup-trigger-label">
|
|
1915
1894
|
${this.label}
|
|
1916
1895
|
<span class="ribbon-popup-trigger-chevron">▼</span>
|
|
@@ -1928,35 +1907,35 @@ const T = class U extends k {
|
|
|
1928
1907
|
);
|
|
1929
1908
|
}
|
|
1930
1909
|
};
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
],
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
],
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
],
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
],
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
],
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
],
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
],
|
|
1952
|
-
let
|
|
1953
|
-
customElements.define("mp-ribbon-group",
|
|
1954
|
-
var
|
|
1910
|
+
C([
|
|
1911
|
+
b({ type: String, attribute: "group-id", reflect: !0 })
|
|
1912
|
+
], A.prototype, "groupId");
|
|
1913
|
+
C([
|
|
1914
|
+
b({ type: String })
|
|
1915
|
+
], A.prototype, "label");
|
|
1916
|
+
C([
|
|
1917
|
+
b({ type: String })
|
|
1918
|
+
], A.prototype, "icon");
|
|
1919
|
+
C([
|
|
1920
|
+
b({ type: String, attribute: "dialog-launcher" })
|
|
1921
|
+
], A.prototype, "dialogLauncher");
|
|
1922
|
+
C([
|
|
1923
|
+
b({ type: String, attribute: "data-resolved-size", reflect: !0 })
|
|
1924
|
+
], A.prototype, "resolvedSize");
|
|
1925
|
+
C([
|
|
1926
|
+
b({ type: Number, reflect: !0 })
|
|
1927
|
+
], A.prototype, "priority");
|
|
1928
|
+
C([
|
|
1929
|
+
b({ type: String, attribute: "auto-scale", reflect: !0 })
|
|
1930
|
+
], A.prototype, "autoScale");
|
|
1931
|
+
let Fe = A;
|
|
1932
|
+
customElements.define("mp-ribbon-group", Fe);
|
|
1933
|
+
var Ce = Object.defineProperty, I = (s, e, i, r) => {
|
|
1955
1934
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
1956
1935
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
1957
|
-
return t &&
|
|
1936
|
+
return t && Ce(e, i, t), t;
|
|
1958
1937
|
};
|
|
1959
|
-
const
|
|
1938
|
+
const O = f`
|
|
1960
1939
|
:host([size="large"]) ::slotted([slot="icon"]) {
|
|
1961
1940
|
font-size: 28px;
|
|
1962
1941
|
width: 28px;
|
|
@@ -1994,13 +1973,13 @@ const P = g`
|
|
|
1994
1973
|
line-height: 1 !important;
|
|
1995
1974
|
}
|
|
1996
1975
|
`;
|
|
1997
|
-
class
|
|
1976
|
+
class g extends v {
|
|
1998
1977
|
constructor() {
|
|
1999
1978
|
super(...arguments), this.itemId = "", this.label = "", this.icon = "", this.size = "medium", this.disabled = !1, this.tooltip = "";
|
|
2000
1979
|
}
|
|
2001
1980
|
static {
|
|
2002
1981
|
this.shadowRootOptions = {
|
|
2003
|
-
...
|
|
1982
|
+
...v.shadowRootOptions,
|
|
2004
1983
|
delegatesFocus: !0
|
|
2005
1984
|
};
|
|
2006
1985
|
}
|
|
@@ -2033,27 +2012,27 @@ class v extends k {
|
|
|
2033
2012
|
super.updated(e), e.has("size") && this.setAttribute("data-size", this.size);
|
|
2034
2013
|
}
|
|
2035
2014
|
}
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
],
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
],
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
],
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
],
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
],
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
],
|
|
2054
|
-
class
|
|
2015
|
+
I([
|
|
2016
|
+
b({ type: String, attribute: "item-id" })
|
|
2017
|
+
], g.prototype, "itemId");
|
|
2018
|
+
I([
|
|
2019
|
+
b({ type: String })
|
|
2020
|
+
], g.prototype, "label");
|
|
2021
|
+
I([
|
|
2022
|
+
b({ type: String })
|
|
2023
|
+
], g.prototype, "icon");
|
|
2024
|
+
I([
|
|
2025
|
+
b({ type: String, reflect: !0 })
|
|
2026
|
+
], g.prototype, "size");
|
|
2027
|
+
I([
|
|
2028
|
+
b({ type: Boolean })
|
|
2029
|
+
], g.prototype, "disabled");
|
|
2030
|
+
I([
|
|
2031
|
+
b({ type: String })
|
|
2032
|
+
], g.prototype, "tooltip");
|
|
2033
|
+
class $e extends g {
|
|
2055
2034
|
static {
|
|
2056
|
-
this.styles = [
|
|
2035
|
+
this.styles = [O, f`
|
|
2057
2036
|
:host { display: inline-flex; }
|
|
2058
2037
|
:host([size="small"]) { display: flex; width: 100%; }
|
|
2059
2038
|
.ribbon-button {
|
|
@@ -2119,15 +2098,15 @@ class fe extends v {
|
|
|
2119
2098
|
`;
|
|
2120
2099
|
}
|
|
2121
2100
|
}
|
|
2122
|
-
customElements.define("mp-ribbon-button",
|
|
2123
|
-
var
|
|
2101
|
+
customElements.define("mp-ribbon-button", $e);
|
|
2102
|
+
var Ee = Object.defineProperty, N = (s, e, i, r) => {
|
|
2124
2103
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2125
2104
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2126
|
-
return t &&
|
|
2105
|
+
return t && Ee(e, i, t), t;
|
|
2127
2106
|
};
|
|
2128
|
-
class
|
|
2107
|
+
class M extends g {
|
|
2129
2108
|
constructor() {
|
|
2130
|
-
super(...arguments), this.overlay = new
|
|
2109
|
+
super(...arguments), this.overlay = new B(this, {
|
|
2131
2110
|
anchor: () => this.chevronEl,
|
|
2132
2111
|
panel: () => this.panelEl,
|
|
2133
2112
|
onOpen: () => this.emitMenuToggle(!0),
|
|
@@ -2157,7 +2136,7 @@ class q extends v {
|
|
|
2157
2136
|
};
|
|
2158
2137
|
}
|
|
2159
2138
|
static {
|
|
2160
|
-
this.styles = [
|
|
2139
|
+
this.styles = [O, f`
|
|
2161
2140
|
:host { display: inline-flex; position: relative; }
|
|
2162
2141
|
.ribbon-split-button {
|
|
2163
2142
|
display: inline-flex;
|
|
@@ -2296,24 +2275,24 @@ class q extends v {
|
|
|
2296
2275
|
);
|
|
2297
2276
|
}
|
|
2298
2277
|
}
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
],
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
],
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
],
|
|
2308
|
-
customElements.define("mp-ribbon-split-button",
|
|
2309
|
-
var
|
|
2278
|
+
N([
|
|
2279
|
+
F(".ribbon-split-button")
|
|
2280
|
+
], M.prototype, "groupEl");
|
|
2281
|
+
N([
|
|
2282
|
+
F(".ribbon-split-button-dropdown")
|
|
2283
|
+
], M.prototype, "chevronEl");
|
|
2284
|
+
N([
|
|
2285
|
+
F(".menu-panel")
|
|
2286
|
+
], M.prototype, "panelEl");
|
|
2287
|
+
customElements.define("mp-ribbon-split-button", M);
|
|
2288
|
+
var Ie = Object.defineProperty, Z = (s, e, i, r) => {
|
|
2310
2289
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2311
2290
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2312
|
-
return t &&
|
|
2291
|
+
return t && Ie(e, i, t), t;
|
|
2313
2292
|
};
|
|
2314
|
-
class
|
|
2293
|
+
class U extends g {
|
|
2315
2294
|
constructor() {
|
|
2316
|
-
super(...arguments), this.overlay = new
|
|
2295
|
+
super(...arguments), this.overlay = new B(this, {
|
|
2317
2296
|
anchor: () => this.triggerEl,
|
|
2318
2297
|
panel: () => this.panelEl,
|
|
2319
2298
|
onOpen: () => {
|
|
@@ -2343,7 +2322,7 @@ class V extends v {
|
|
|
2343
2322
|
};
|
|
2344
2323
|
}
|
|
2345
2324
|
static {
|
|
2346
|
-
this.styles = [
|
|
2325
|
+
this.styles = [O, f`
|
|
2347
2326
|
:host { display: inline-flex; position: relative; }
|
|
2348
2327
|
:host([size="small"]) { display: flex; width: 100%; }
|
|
2349
2328
|
.ribbon-dropdown-button {
|
|
@@ -2440,24 +2419,24 @@ class V extends v {
|
|
|
2440
2419
|
`;
|
|
2441
2420
|
}
|
|
2442
2421
|
}
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
],
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
],
|
|
2449
|
-
customElements.define("mp-ribbon-dropdown-button",
|
|
2450
|
-
var
|
|
2422
|
+
Z([
|
|
2423
|
+
F(".ribbon-dropdown-button")
|
|
2424
|
+
], U.prototype, "triggerEl");
|
|
2425
|
+
Z([
|
|
2426
|
+
F(".menu-panel")
|
|
2427
|
+
], U.prototype, "panelEl");
|
|
2428
|
+
customElements.define("mp-ribbon-dropdown-button", U);
|
|
2429
|
+
var Te = Object.defineProperty, Se = (s, e, i, r) => {
|
|
2451
2430
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2452
2431
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2453
|
-
return t &&
|
|
2432
|
+
return t && Te(e, i, t), t;
|
|
2454
2433
|
};
|
|
2455
|
-
class J extends
|
|
2434
|
+
class J extends g {
|
|
2456
2435
|
constructor() {
|
|
2457
2436
|
super(...arguments), this.pressed = !1;
|
|
2458
2437
|
}
|
|
2459
2438
|
static {
|
|
2460
|
-
this.styles = [
|
|
2439
|
+
this.styles = [O, f`
|
|
2461
2440
|
:host { display: inline-flex; }
|
|
2462
2441
|
:host([size="small"]) { display: flex; width: 100%; }
|
|
2463
2442
|
.ribbon-toggle-button {
|
|
@@ -2535,21 +2514,21 @@ class J extends v {
|
|
|
2535
2514
|
));
|
|
2536
2515
|
}
|
|
2537
2516
|
}
|
|
2538
|
-
|
|
2539
|
-
|
|
2517
|
+
Se([
|
|
2518
|
+
b({ type: Boolean, reflect: !0 })
|
|
2540
2519
|
], J.prototype, "pressed");
|
|
2541
2520
|
customElements.define("mp-ribbon-toggle-button", J);
|
|
2542
|
-
var
|
|
2521
|
+
var ze = Object.defineProperty, Oe = (s, e, i, r) => {
|
|
2543
2522
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2544
2523
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2545
|
-
return t &&
|
|
2524
|
+
return t && ze(e, i, t), t;
|
|
2546
2525
|
};
|
|
2547
|
-
class ee extends
|
|
2526
|
+
class ee extends g {
|
|
2548
2527
|
constructor() {
|
|
2549
2528
|
super(...arguments), this.checked = !1;
|
|
2550
2529
|
}
|
|
2551
2530
|
static {
|
|
2552
|
-
this.styles =
|
|
2531
|
+
this.styles = f`
|
|
2553
2532
|
:host { display: inline-flex; align-items: center; }
|
|
2554
2533
|
:host([size="small"]) { display: flex; width: 100%; }
|
|
2555
2534
|
.ribbon-checkbox {
|
|
@@ -2610,21 +2589,21 @@ class ee extends v {
|
|
|
2610
2589
|
);
|
|
2611
2590
|
}
|
|
2612
2591
|
}
|
|
2613
|
-
|
|
2614
|
-
|
|
2592
|
+
Oe([
|
|
2593
|
+
b({ type: Boolean, reflect: !0 })
|
|
2615
2594
|
], ee.prototype, "checked");
|
|
2616
2595
|
customElements.define("mp-ribbon-checkbox", ee);
|
|
2617
|
-
var
|
|
2596
|
+
var Re = Object.defineProperty, te = (s, e, i, r) => {
|
|
2618
2597
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2619
2598
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2620
|
-
return t &&
|
|
2599
|
+
return t && Re(e, i, t), t;
|
|
2621
2600
|
};
|
|
2622
|
-
class
|
|
2601
|
+
class H extends g {
|
|
2623
2602
|
constructor() {
|
|
2624
2603
|
super(...arguments), this.value = "", this.options = [];
|
|
2625
2604
|
}
|
|
2626
2605
|
static {
|
|
2627
|
-
this.styles =
|
|
2606
|
+
this.styles = f`
|
|
2628
2607
|
:host { display: inline-flex; align-items: center; }
|
|
2629
2608
|
.ribbon-combobox-select {
|
|
2630
2609
|
background: var(--bs-ribbon-tabpanel-bg, #fff);
|
|
@@ -2678,23 +2657,23 @@ class Q extends v {
|
|
|
2678
2657
|
}
|
|
2679
2658
|
}
|
|
2680
2659
|
te([
|
|
2681
|
-
|
|
2682
|
-
],
|
|
2660
|
+
b({ type: String })
|
|
2661
|
+
], H.prototype, "value");
|
|
2683
2662
|
te([
|
|
2684
|
-
|
|
2685
|
-
],
|
|
2686
|
-
customElements.define("mp-ribbon-combobox",
|
|
2687
|
-
var
|
|
2663
|
+
b({ type: Array })
|
|
2664
|
+
], H.prototype, "options");
|
|
2665
|
+
customElements.define("mp-ribbon-combobox", H);
|
|
2666
|
+
var Le = Object.defineProperty, Be = (s, e, i, r) => {
|
|
2688
2667
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2689
2668
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2690
|
-
return t &&
|
|
2669
|
+
return t && Le(e, i, t), t;
|
|
2691
2670
|
};
|
|
2692
|
-
class ie extends
|
|
2671
|
+
class ie extends g {
|
|
2693
2672
|
constructor() {
|
|
2694
2673
|
super(...arguments), this.color = "#000000";
|
|
2695
2674
|
}
|
|
2696
2675
|
static {
|
|
2697
|
-
this.styles =
|
|
2676
|
+
this.styles = f`
|
|
2698
2677
|
:host { display: inline-flex; align-items: center; }
|
|
2699
2678
|
:host([size="small"]) { display: flex; width: 100%; }
|
|
2700
2679
|
.ribbon-color-picker {
|
|
@@ -2770,21 +2749,21 @@ class ie extends v {
|
|
|
2770
2749
|
);
|
|
2771
2750
|
}
|
|
2772
2751
|
}
|
|
2773
|
-
|
|
2774
|
-
|
|
2752
|
+
Be([
|
|
2753
|
+
b({ type: String, reflect: !0 })
|
|
2775
2754
|
], ie.prototype, "color");
|
|
2776
2755
|
customElements.define("mp-ribbon-color-picker", ie);
|
|
2777
|
-
var
|
|
2756
|
+
var De = Object.defineProperty, oe = (s, e, i, r) => {
|
|
2778
2757
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2779
2758
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2780
|
-
return t &&
|
|
2759
|
+
return t && De(e, i, t), t;
|
|
2781
2760
|
};
|
|
2782
|
-
class
|
|
2761
|
+
class W extends g {
|
|
2783
2762
|
constructor() {
|
|
2784
2763
|
super(...arguments), this.selectedValue = "", this.buttons = [];
|
|
2785
2764
|
}
|
|
2786
2765
|
static {
|
|
2787
|
-
this.styles =
|
|
2766
|
+
this.styles = f`
|
|
2788
2767
|
:host { display: inline-flex; }
|
|
2789
2768
|
.ribbon-group-button {
|
|
2790
2769
|
display: inline-flex;
|
|
@@ -2859,23 +2838,23 @@ class Y extends v {
|
|
|
2859
2838
|
}
|
|
2860
2839
|
}
|
|
2861
2840
|
oe([
|
|
2862
|
-
|
|
2863
|
-
],
|
|
2841
|
+
b({ type: String, attribute: "selected-value", reflect: !0 })
|
|
2842
|
+
], W.prototype, "selectedValue");
|
|
2864
2843
|
oe([
|
|
2865
|
-
|
|
2866
|
-
],
|
|
2867
|
-
customElements.define("mp-ribbon-group-button",
|
|
2868
|
-
var
|
|
2844
|
+
b({ type: Array })
|
|
2845
|
+
], W.prototype, "buttons");
|
|
2846
|
+
customElements.define("mp-ribbon-group-button", W);
|
|
2847
|
+
var Me = Object.defineProperty, _e = (s, e, i, r) => {
|
|
2869
2848
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2870
2849
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2871
|
-
return t &&
|
|
2850
|
+
return t && Me(e, i, t), t;
|
|
2872
2851
|
};
|
|
2873
|
-
class re extends
|
|
2852
|
+
class re extends g {
|
|
2874
2853
|
constructor() {
|
|
2875
2854
|
super(...arguments), this.columns = 4;
|
|
2876
2855
|
}
|
|
2877
2856
|
static {
|
|
2878
|
-
this.styles =
|
|
2857
|
+
this.styles = f`
|
|
2879
2858
|
:host { display: inline-flex; }
|
|
2880
2859
|
.ribbon-gallery {
|
|
2881
2860
|
display: grid;
|
|
@@ -2900,21 +2879,21 @@ class re extends v {
|
|
|
2900
2879
|
`;
|
|
2901
2880
|
}
|
|
2902
2881
|
}
|
|
2903
|
-
|
|
2904
|
-
|
|
2882
|
+
_e([
|
|
2883
|
+
b({ type: Number })
|
|
2905
2884
|
], re.prototype, "columns");
|
|
2906
2885
|
customElements.define("mp-ribbon-gallery", re);
|
|
2907
|
-
var
|
|
2886
|
+
var Pe = Object.defineProperty, R = (s, e, i, r) => {
|
|
2908
2887
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2909
2888
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2910
|
-
return t &&
|
|
2889
|
+
return t && Pe(e, i, t), t;
|
|
2911
2890
|
};
|
|
2912
|
-
class
|
|
2891
|
+
class T extends v {
|
|
2913
2892
|
constructor() {
|
|
2914
2893
|
super(...arguments), this.itemId = "", this.label = "", this.icon = "", this.selected = !1, this.disabled = !1;
|
|
2915
2894
|
}
|
|
2916
2895
|
static {
|
|
2917
|
-
this.styles = [
|
|
2896
|
+
this.styles = [O, f`
|
|
2918
2897
|
:host { display: inline-flex; }
|
|
2919
2898
|
.gallery-item {
|
|
2920
2899
|
display: inline-flex;
|
|
@@ -2975,33 +2954,33 @@ class M extends k {
|
|
|
2975
2954
|
);
|
|
2976
2955
|
}
|
|
2977
2956
|
}
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
],
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
],
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
],
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
],
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
],
|
|
2993
|
-
customElements.define("mp-ribbon-gallery-item",
|
|
2994
|
-
var
|
|
2957
|
+
R([
|
|
2958
|
+
b({ type: String, attribute: "item-id" })
|
|
2959
|
+
], T.prototype, "itemId");
|
|
2960
|
+
R([
|
|
2961
|
+
b({ type: String })
|
|
2962
|
+
], T.prototype, "label");
|
|
2963
|
+
R([
|
|
2964
|
+
b({ type: String })
|
|
2965
|
+
], T.prototype, "icon");
|
|
2966
|
+
R([
|
|
2967
|
+
b({ type: Boolean, reflect: !0 })
|
|
2968
|
+
], T.prototype, "selected");
|
|
2969
|
+
R([
|
|
2970
|
+
b({ type: Boolean })
|
|
2971
|
+
], T.prototype, "disabled");
|
|
2972
|
+
customElements.define("mp-ribbon-gallery-item", T);
|
|
2973
|
+
var Ke = Object.defineProperty, Ge = (s, e, i, r) => {
|
|
2995
2974
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
2996
2975
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
2997
|
-
return t &&
|
|
2976
|
+
return t && Ke(e, i, t), t;
|
|
2998
2977
|
};
|
|
2999
|
-
class ne extends
|
|
2978
|
+
class ne extends v {
|
|
3000
2979
|
constructor() {
|
|
3001
2980
|
super(...arguments), this.size = "medium";
|
|
3002
2981
|
}
|
|
3003
2982
|
static {
|
|
3004
|
-
this.styles =
|
|
2983
|
+
this.styles = f`
|
|
3005
2984
|
:host { display: inline-flex; }
|
|
3006
2985
|
:host([size="small"]) { display: flex; width: 100%; }
|
|
3007
2986
|
`;
|
|
@@ -3010,27 +2989,27 @@ class ne extends k {
|
|
|
3010
2989
|
return d`<slot></slot>`;
|
|
3011
2990
|
}
|
|
3012
2991
|
}
|
|
3013
|
-
|
|
3014
|
-
|
|
2992
|
+
Ge([
|
|
2993
|
+
b({ type: String, reflect: !0 })
|
|
3015
2994
|
], ne.prototype, "size");
|
|
3016
2995
|
customElements.define("mp-ribbon-template-item", ne);
|
|
3017
|
-
var
|
|
2996
|
+
var je = Object.defineProperty, S = (s, e, i, r) => {
|
|
3018
2997
|
for (var t = void 0, o = s.length - 1, n; o >= 0; o--)
|
|
3019
2998
|
(n = s[o]) && (t = n(e, i, t) || t);
|
|
3020
|
-
return t &&
|
|
2999
|
+
return t && je(e, i, t), t;
|
|
3021
3000
|
};
|
|
3022
|
-
class
|
|
3001
|
+
class $ extends v {
|
|
3023
3002
|
constructor() {
|
|
3024
3003
|
super(...arguments), this.itemId = "", this.label = "", this.icon = "", this.kind = "action", this.checked = !1, this.disabled = !1;
|
|
3025
3004
|
}
|
|
3026
3005
|
static {
|
|
3027
3006
|
this.shadowRootOptions = {
|
|
3028
|
-
...
|
|
3007
|
+
...v.shadowRootOptions,
|
|
3029
3008
|
delegatesFocus: !0
|
|
3030
3009
|
};
|
|
3031
3010
|
}
|
|
3032
3011
|
static {
|
|
3033
|
-
this.styles =
|
|
3012
|
+
this.styles = f`
|
|
3034
3013
|
:host { display: block; }
|
|
3035
3014
|
.menu-item {
|
|
3036
3015
|
display: flex;
|
|
@@ -3084,11 +3063,11 @@ class R extends k {
|
|
|
3084
3063
|
<button
|
|
3085
3064
|
class="menu-item"
|
|
3086
3065
|
role="${e}"
|
|
3087
|
-
aria-checked="${this.kind === "action" ?
|
|
3066
|
+
aria-checked="${this.kind === "action" ? E : String(this.checked)}"
|
|
3088
3067
|
?disabled="${this.disabled}"
|
|
3089
3068
|
@click="${this.onActivate}"
|
|
3090
3069
|
>
|
|
3091
|
-
${this.kind !== "action" ? d`<span class="menu-item-check">${this.checked ? "✓" : ""}</span>` :
|
|
3070
|
+
${this.kind !== "action" ? d`<span class="menu-item-check">${this.checked ? "✓" : ""}</span>` : E}
|
|
3092
3071
|
<span class="menu-item-icon">
|
|
3093
3072
|
<slot name="icon">${this.icon ? this.icon : ""}</slot>
|
|
3094
3073
|
</span>
|
|
@@ -3106,28 +3085,28 @@ class R extends k {
|
|
|
3106
3085
|
));
|
|
3107
3086
|
}
|
|
3108
3087
|
}
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
],
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
],
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
],
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
],
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
],
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
],
|
|
3127
|
-
customElements.define("mp-ribbon-menu-item",
|
|
3128
|
-
class
|
|
3088
|
+
S([
|
|
3089
|
+
b({ type: String, attribute: "item-id" })
|
|
3090
|
+
], $.prototype, "itemId");
|
|
3091
|
+
S([
|
|
3092
|
+
b({ type: String })
|
|
3093
|
+
], $.prototype, "label");
|
|
3094
|
+
S([
|
|
3095
|
+
b({ type: String })
|
|
3096
|
+
], $.prototype, "icon");
|
|
3097
|
+
S([
|
|
3098
|
+
b({ type: String })
|
|
3099
|
+
], $.prototype, "kind");
|
|
3100
|
+
S([
|
|
3101
|
+
b({ type: Boolean })
|
|
3102
|
+
], $.prototype, "checked");
|
|
3103
|
+
S([
|
|
3104
|
+
b({ type: Boolean })
|
|
3105
|
+
], $.prototype, "disabled");
|
|
3106
|
+
customElements.define("mp-ribbon-menu-item", $);
|
|
3107
|
+
class qe extends v {
|
|
3129
3108
|
static {
|
|
3130
|
-
this.styles =
|
|
3109
|
+
this.styles = f`
|
|
3131
3110
|
:host { display: block; }
|
|
3132
3111
|
.separator {
|
|
3133
3112
|
height: 1px;
|
|
@@ -3143,25 +3122,25 @@ class Oe extends k {
|
|
|
3143
3122
|
return d`<div class="separator"></div>`;
|
|
3144
3123
|
}
|
|
3145
3124
|
}
|
|
3146
|
-
customElements.define("mp-ribbon-menu-separator",
|
|
3125
|
+
customElements.define("mp-ribbon-menu-separator", qe);
|
|
3147
3126
|
export {
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3127
|
+
j as MpQuickAccessToolbar,
|
|
3128
|
+
m as MpRibbon,
|
|
3129
|
+
$e as MpRibbonButton,
|
|
3151
3130
|
ee as MpRibbonCheckBox,
|
|
3152
3131
|
ie as MpRibbonColorPicker,
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3132
|
+
H as MpRibbonComboBox,
|
|
3133
|
+
D as MpRibbonContextualTabSet,
|
|
3134
|
+
U as MpRibbonDropdownButton,
|
|
3156
3135
|
re as MpRibbonGallery,
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3136
|
+
T as MpRibbonGalleryItem,
|
|
3137
|
+
Fe as MpRibbonGroup,
|
|
3138
|
+
W as MpRibbonGroupButton,
|
|
3139
|
+
g as MpRibbonItemBase,
|
|
3140
|
+
$ as MpRibbonMenuItem,
|
|
3141
|
+
qe as MpRibbonMenuSeparator,
|
|
3142
|
+
M as MpRibbonSplitButton,
|
|
3143
|
+
w as MpRibbonTab,
|
|
3165
3144
|
ne as MpRibbonTemplateItem,
|
|
3166
3145
|
J as MpRibbonToggleButton
|
|
3167
3146
|
};
|