@mlightcad/ribbon 0.1.6 → 0.1.7
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/README.md +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/items/RibbonSegmented.vue.d.ts +12 -12
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +584 -539
- package/dist/ml-ribbon.umd.js +1 -1
- package/dist/types.d.ts +10 -0
- package/package.json +1 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, markRaw as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onMounted as g, onUnmounted as _, openBlock as v, provide as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, toRaw as T, unref as E, watch as D, withCtx as O, withKeys as k, withModifiers as
|
|
2
|
-
import { ElButton as
|
|
3
|
-
import { ArrowDown as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, markRaw as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onMounted as g, onUnmounted as _, openBlock as v, provide as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, toRaw as T, unref as E, watch as D, withCtx as O, withKeys as k, withModifiers as A } from "vue";
|
|
2
|
+
import { ElButton as j, ElButtonGroup as M, ElCheckbox as ee, ElColorPicker as N, ElConfigProvider as te, ElDrawer as P, ElDropdown as F, ElDropdownItem as I, ElDropdownMenu as L, ElIcon as R, ElInputNumber as ne, ElOption as z, ElPopover as B, ElSegmented as V, ElSelect as H, ElSwitch as U, ElTooltip as re, useGlobalConfig as ie } from "element-plus";
|
|
3
|
+
import { ArrowDown as W, ArrowDownBold as ae, ArrowUp as oe, ArrowUpBold as se, Bottom as ce, Grid as le, Menu as ue, Promotion as de } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
|
-
var
|
|
5
|
+
var fe = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/ribbon/composables/useRibbonState.ts
|
|
8
|
-
function
|
|
8
|
+
function G(e) {
|
|
9
9
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function K(e) {
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = { ...e };
|
|
14
|
-
return "component" in t && (t.component =
|
|
14
|
+
return "component" in t && (t.component = G(t.component)), "icon" in t && (t.icon = G(t.icon)), "activeIcon" in t && (t.activeIcon = G(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = G(t.inactiveIcon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
|
|
15
15
|
if (!e || typeof e != "object") return e;
|
|
16
16
|
let t = e;
|
|
17
17
|
return "icon" in t ? {
|
|
18
18
|
...t,
|
|
19
|
-
icon:
|
|
19
|
+
icon: G(t.icon)
|
|
20
20
|
} : t;
|
|
21
21
|
})), Array.isArray(t.categories) && (t.categories = t.categories.map((e) => {
|
|
22
22
|
if (!e || typeof e != "object") return e;
|
|
@@ -28,48 +28,48 @@ function G(e) {
|
|
|
28
28
|
let t = e;
|
|
29
29
|
return {
|
|
30
30
|
...t,
|
|
31
|
-
preview:
|
|
32
|
-
icon:
|
|
33
|
-
component:
|
|
31
|
+
preview: G(t.preview),
|
|
32
|
+
icon: G(t.icon),
|
|
33
|
+
component: G(t.component)
|
|
34
34
|
};
|
|
35
35
|
}) : t.items
|
|
36
36
|
};
|
|
37
37
|
})), t;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function pe(e) {
|
|
40
40
|
return {
|
|
41
41
|
...e,
|
|
42
|
-
icon:
|
|
43
|
-
props:
|
|
42
|
+
icon: G(e.icon),
|
|
43
|
+
props: K(e.props)
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function me(e) {
|
|
47
47
|
return {
|
|
48
48
|
...e,
|
|
49
|
-
icon:
|
|
50
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
49
|
+
icon: G(e.icon),
|
|
50
|
+
footerMenuItems: e.footerMenuItems?.map(pe),
|
|
51
51
|
collections: e.collections?.map((e) => ({
|
|
52
52
|
...e,
|
|
53
|
-
items: e.items.map(
|
|
53
|
+
items: e.items.map(pe)
|
|
54
54
|
}))
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function q(e) {
|
|
58
58
|
return {
|
|
59
59
|
...e,
|
|
60
|
-
groups: e.groups?.map(
|
|
60
|
+
groups: e.groups?.map(me)
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return e.map(
|
|
63
|
+
function J(e) {
|
|
64
|
+
return e.map(q);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function he(e) {
|
|
67
67
|
(!e.collections || e.collections.length === 0) && (e.collections = [{
|
|
68
68
|
id: `${e.id}-collection-1`,
|
|
69
69
|
items: []
|
|
70
70
|
}]);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function ge(e, t, n, r, i) {
|
|
73
73
|
let a = e.find((e) => e.id === t);
|
|
74
74
|
if (!a?.groups) return;
|
|
75
75
|
let o = a.groups.find((e) => e.id === n);
|
|
@@ -78,9 +78,9 @@ function J(e, t, n, r, i) {
|
|
|
78
78
|
s && i(s.items);
|
|
79
79
|
}
|
|
80
80
|
function _e(e, n, r, i, a, o, s, c) {
|
|
81
|
-
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(
|
|
81
|
+
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(J(n)), m = b(!1), h = b(!1), g = b(!1), _ = b([]), v = b(""), y = b(s), x = b(c), S = t(() => p.value.filter((e) => e.visible !== !1)), C = {
|
|
82
82
|
addTab(e) {
|
|
83
|
-
p.value.push(
|
|
83
|
+
p.value.push(q(e)), f.value ||= e.id;
|
|
84
84
|
},
|
|
85
85
|
removeTab(e) {
|
|
86
86
|
p.value = p.value.filter((t) => t.id !== e), f.value === e && (f.value = S.value[0]?.id ?? "");
|
|
@@ -98,7 +98,7 @@ function _e(e, n, r, i, a, o, s, c) {
|
|
|
98
98
|
},
|
|
99
99
|
addGroup(e, t) {
|
|
100
100
|
let n = p.value.find((t) => t.id === e);
|
|
101
|
-
n && (n.groups ??= [],
|
|
101
|
+
n && (n.groups ??= [], he(t), n.groups.push(me(t)));
|
|
102
102
|
},
|
|
103
103
|
removeGroup(e, t) {
|
|
104
104
|
let n = p.value.find((t) => t.id === e);
|
|
@@ -113,16 +113,16 @@ function _e(e, n, r, i, a, o, s, c) {
|
|
|
113
113
|
n && (n.visible = !1);
|
|
114
114
|
},
|
|
115
115
|
addItem(e, t, n, r) {
|
|
116
|
-
|
|
116
|
+
ge(p.value, e, t, n, (e) => e.push(pe(r)));
|
|
117
117
|
},
|
|
118
118
|
removeItem(e, t, n, r) {
|
|
119
|
-
|
|
119
|
+
ge(p.value, e, t, n, (e) => {
|
|
120
120
|
let t = e.findIndex((e) => e.id === r);
|
|
121
121
|
t >= 0 && e.splice(t, 1);
|
|
122
122
|
});
|
|
123
123
|
},
|
|
124
124
|
updateItem(e, t, n, r, i) {
|
|
125
|
-
|
|
125
|
+
ge(p.value, e, t, n, (e) => {
|
|
126
126
|
let t = e.find((e) => e.id === r);
|
|
127
127
|
t && Object.assign(t, i);
|
|
128
128
|
});
|
|
@@ -186,7 +186,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
186
186
|
function d() {
|
|
187
187
|
u("close");
|
|
188
188
|
}
|
|
189
|
-
return (t, o) => (v(), n(E(
|
|
189
|
+
return (t, o) => (v(), n(E(P), {
|
|
190
190
|
"model-value": l.open,
|
|
191
191
|
size: "100%",
|
|
192
192
|
"with-header": !1,
|
|
@@ -200,7 +200,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
200
200
|
title: l.title,
|
|
201
201
|
description: l.description,
|
|
202
202
|
size: l.size
|
|
203
|
-
}) : (v(), i(e, { key: 1 }, [a("aside", ve, [c(E(
|
|
203
|
+
}) : (v(), i(e, { key: 1 }, [a("aside", ve, [c(E(j), {
|
|
204
204
|
type: "primary",
|
|
205
205
|
onClick: d
|
|
206
206
|
}, {
|
|
@@ -288,7 +288,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
288
288
|
},
|
|
289
289
|
emits: ["select", "open-backstage"],
|
|
290
290
|
setup(o, { emit: l }) {
|
|
291
|
-
let u = o, d = l, f = b(!1), p =
|
|
291
|
+
let u = o, d = l, f = b(!1), p = ie("size", ""), h = t(() => p.value || "default"), g = t(() => `ml-ribbon-file-menu-dropdown ml-ribbon-popper ml-ribbon-popper--size-${h.value}`);
|
|
292
292
|
function _(e) {
|
|
293
293
|
f.value = e;
|
|
294
294
|
}
|
|
@@ -301,21 +301,21 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
301
301
|
}
|
|
302
302
|
return D(() => u.disabled, (e) => {
|
|
303
303
|
e && (f.value = !1);
|
|
304
|
-
}), (t, o) => (v(), n(E(
|
|
304
|
+
}), (t, o) => (v(), n(E(F), {
|
|
305
305
|
trigger: "click",
|
|
306
306
|
disabled: u.disabled,
|
|
307
307
|
"popper-class": g.value,
|
|
308
308
|
onCommand: y,
|
|
309
309
|
onVisibleChange: _
|
|
310
310
|
}, {
|
|
311
|
-
dropdown: O(() => [c(E(
|
|
312
|
-
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(
|
|
311
|
+
dropdown: O(() => [c(E(L), null, {
|
|
312
|
+
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(I), {
|
|
313
313
|
key: 0,
|
|
314
314
|
command: "__backstage"
|
|
315
315
|
}, {
|
|
316
316
|
default: O(() => [s(w(u.openBackstageLabel), 1)]),
|
|
317
317
|
_: 1
|
|
318
|
-
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(
|
|
318
|
+
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(I), {
|
|
319
319
|
key: e.id,
|
|
320
320
|
divided: u.showOpenBackstage !== !1 && t === 0,
|
|
321
321
|
command: e.id,
|
|
@@ -388,7 +388,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
388
388
|
function y(e) {
|
|
389
389
|
o.disabled || c("click", e);
|
|
390
390
|
}
|
|
391
|
-
return (t, a) => (v(), n(E(
|
|
391
|
+
return (t, a) => (v(), n(E(j), {
|
|
392
392
|
class: "ml-ribbon-button",
|
|
393
393
|
"data-ribbon-button-id": e.id,
|
|
394
394
|
type: e.buttonType,
|
|
@@ -404,7 +404,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
404
404
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
405
405
|
style: h(_.value),
|
|
406
406
|
"aria-hidden": "true"
|
|
407
|
-
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(
|
|
407
|
+
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(R), {
|
|
408
408
|
key: 1,
|
|
409
409
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
410
410
|
style: h(_.value)
|
|
@@ -490,8 +490,8 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
490
490
|
"ml-ribbon-button-group--equal-width": !t.wrap && t.equalWidth
|
|
491
491
|
}]),
|
|
492
492
|
"data-id": t.id
|
|
493
|
-
}, [!t.hideLabel && t.label ? (v(), i("div", Ne, w(t.label), 1)) : r("", !0), c(E(
|
|
494
|
-
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(
|
|
493
|
+
}, [!t.hideLabel && t.label ? (v(), i("div", Ne, w(t.label), 1)) : r("", !0), c(E(M), null, {
|
|
494
|
+
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(re), {
|
|
495
495
|
key: String(e.value),
|
|
496
496
|
content: g(e),
|
|
497
497
|
disabled: !g(e),
|
|
@@ -571,126 +571,126 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
571
571
|
"tooltip-change"
|
|
572
572
|
],
|
|
573
573
|
setup(o, { emit: l }) {
|
|
574
|
-
let u = o, d = l, f =
|
|
574
|
+
let u = o, d = l, f = ie("size", ""), p = t(() => f.value || "default"), h = b(!1), g = b(void 0), _ = t(() => Array.isArray(u.options) ? u.options : []), y = t(() => _.value.find((e) => U(e) === g.value) ?? null), T = t(() => {
|
|
575
575
|
if (y.value && u.syncLabelWithSelection) {
|
|
576
|
-
let e =
|
|
576
|
+
let e = se(y.value);
|
|
577
577
|
if (e) return e;
|
|
578
578
|
}
|
|
579
|
-
return
|
|
579
|
+
return ue(u.label) ?? u.id;
|
|
580
580
|
}), D = t(() => !u.hideLabel && T.value.length > 0), k = t(() => {
|
|
581
581
|
if (y.value) {
|
|
582
|
-
let e =
|
|
582
|
+
let e = V(y.value);
|
|
583
583
|
if (e) return e;
|
|
584
584
|
}
|
|
585
585
|
return !u.icon || typeof u.icon == "string" ? null : u.icon;
|
|
586
|
-
}),
|
|
586
|
+
}), M = t(() => {
|
|
587
587
|
if (y.value) {
|
|
588
|
-
let e =
|
|
588
|
+
let e = H(y.value);
|
|
589
589
|
if (e) return e;
|
|
590
590
|
}
|
|
591
591
|
if (typeof u.icon != "string") return null;
|
|
592
592
|
let e = u.icon.trim();
|
|
593
593
|
return e.length > 0 ? e : null;
|
|
594
|
-
}),
|
|
594
|
+
}), ee = t(() => !!(k.value || M.value)), N = t(() => le(y.value) ?? ue(u.tooltip) ?? ue(T.value) ?? ue(u.label) ?? de(u.id)), te = t(() => [
|
|
595
595
|
"ml-ribbon-dropdown-menu",
|
|
596
596
|
"ml-ribbon-popper",
|
|
597
597
|
`ml-ribbon-popper--size-${p.value}`,
|
|
598
598
|
u.popperClass
|
|
599
599
|
].filter(Boolean).join(" "));
|
|
600
|
-
function
|
|
600
|
+
function P(e) {
|
|
601
601
|
if (u.disabled) {
|
|
602
602
|
h.value = !1;
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
605
|
h.value = e;
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function ne() {
|
|
608
608
|
u.disabled || (h.value = !h.value);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
u.disabled || (g.value = e, d("tooltip-change",
|
|
610
|
+
function z(e) {
|
|
611
|
+
u.disabled || (g.value = e, d("tooltip-change", le(y.value) ?? N.value), d("command", e), h.value = !1);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function B() {
|
|
614
614
|
if (u.disabled) return;
|
|
615
615
|
let e = y.value;
|
|
616
616
|
if (!e) {
|
|
617
617
|
d("click");
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
620
|
-
d("command",
|
|
620
|
+
d("command", U(e));
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function V(e) {
|
|
623
623
|
if (!e || typeof e != "object") return null;
|
|
624
624
|
let t = e.icon;
|
|
625
625
|
return !t || typeof t == "string" ? null : t;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function H(e) {
|
|
628
628
|
if (!e || typeof e != "object") return null;
|
|
629
629
|
let t = e.icon;
|
|
630
630
|
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function U(e) {
|
|
633
633
|
if (!(!e || typeof e != "object")) return e.value;
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
let t =
|
|
635
|
+
function ae(e) {
|
|
636
|
+
let t = U(e);
|
|
637
637
|
if (typeof t == "string" || typeof t == "number" || t && typeof t == "object") return t;
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function se(e) {
|
|
640
640
|
if (!e || typeof e != "object") return;
|
|
641
641
|
let t = e.label;
|
|
642
642
|
return typeof t == "string" ? t : void 0;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
if (typeof e == "string") return
|
|
644
|
+
function ce(e) {
|
|
645
|
+
if (typeof e == "string") return de(e);
|
|
646
646
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
if (!(!e || typeof e != "object")) return
|
|
648
|
+
function le(e) {
|
|
649
|
+
if (!(!e || typeof e != "object")) return ue(e.tooltip) ?? se(e) ?? ce(U(e));
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function ue(e) {
|
|
652
652
|
if (typeof e != "string") return;
|
|
653
653
|
let t = e.trim();
|
|
654
654
|
return t.length > 0 ? t : void 0;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function de(e) {
|
|
657
657
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
658
658
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
659
659
|
}
|
|
660
|
-
return (t, l) => (v(), n(E(
|
|
660
|
+
return (t, l) => (v(), n(E(F), {
|
|
661
661
|
class: m(["ml-ribbon-dropdown", [`ml-ribbon-dropdown--item-${o.itemSize}`, { "is-label-hidden": o.hideLabel }]]),
|
|
662
662
|
trigger: "click",
|
|
663
663
|
disabled: o.disabled,
|
|
664
|
-
"popper-class":
|
|
665
|
-
onVisibleChange:
|
|
666
|
-
onCommand:
|
|
664
|
+
"popper-class": te.value,
|
|
665
|
+
onVisibleChange: P,
|
|
666
|
+
onCommand: z
|
|
667
667
|
}, {
|
|
668
|
-
dropdown: O(() => [c(E(
|
|
669
|
-
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(
|
|
670
|
-
key: String(
|
|
671
|
-
command:
|
|
668
|
+
dropdown: O(() => [c(E(L), null, {
|
|
669
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(I), {
|
|
670
|
+
key: String(U(e)),
|
|
671
|
+
command: ae(e),
|
|
672
672
|
disabled: e.disabled === !0,
|
|
673
673
|
divided: e.divided === !0
|
|
674
674
|
}, {
|
|
675
|
-
default: O(() => [c(E(
|
|
676
|
-
content:
|
|
677
|
-
disabled: !
|
|
675
|
+
default: O(() => [c(E(re), {
|
|
676
|
+
content: le(e),
|
|
677
|
+
disabled: !le(e),
|
|
678
678
|
"show-after": o.tooltipShowAfter,
|
|
679
679
|
"hide-after": o.tooltipHideAfter,
|
|
680
680
|
placement: "top",
|
|
681
681
|
effect: "dark"
|
|
682
682
|
}, {
|
|
683
|
-
default: O(() => [a("span", ze, [S(t.$slots, "option", { option: e }, () => [
|
|
683
|
+
default: O(() => [a("span", ze, [S(t.$slots, "option", { option: e }, () => [V(e) ? (v(), n(E(R), {
|
|
684
684
|
key: 0,
|
|
685
685
|
class: "ml-ribbon-dropdown-item__icon"
|
|
686
686
|
}, {
|
|
687
|
-
default: O(() => [(v(), n(C(
|
|
687
|
+
default: O(() => [(v(), n(C(V(e))))]),
|
|
688
688
|
_: 2
|
|
689
|
-
}, 1024)) :
|
|
689
|
+
}, 1024)) : H(e) ? (v(), i("i", {
|
|
690
690
|
key: 1,
|
|
691
|
-
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class",
|
|
691
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", H(e)]),
|
|
692
692
|
"aria-hidden": "true"
|
|
693
|
-
}, null, 2)) : r("", !0), a("span", Be, w(
|
|
693
|
+
}, null, 2)) : r("", !0), a("span", Be, w(se(e)), 1)])])]),
|
|
694
694
|
_: 2
|
|
695
695
|
}, 1032, [
|
|
696
696
|
"content",
|
|
@@ -706,28 +706,28 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
706
706
|
]))), 128))]),
|
|
707
707
|
_: 3
|
|
708
708
|
})]),
|
|
709
|
-
default: O(() => [c(E(
|
|
709
|
+
default: O(() => [c(E(j), {
|
|
710
710
|
type: "default",
|
|
711
711
|
disabled: o.disabled,
|
|
712
|
-
"aria-label":
|
|
713
|
-
onClick:
|
|
712
|
+
"aria-label": N.value,
|
|
713
|
+
onClick: ne
|
|
714
714
|
}, {
|
|
715
|
-
default: O(() => [a("span", Ie, [t.$slots.icon ||
|
|
715
|
+
default: O(() => [a("span", Ie, [t.$slots.icon || ee.value ? (v(), i("span", {
|
|
716
716
|
key: 0,
|
|
717
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class":
|
|
718
|
-
onClick:
|
|
719
|
-
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [k.value ? (v(), n(E(
|
|
717
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class": M.value && !k.value && !t.$slots.icon }]),
|
|
718
|
+
onClick: A(B, ["stop"])
|
|
719
|
+
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [k.value ? (v(), n(E(R), { key: 0 }, {
|
|
720
720
|
default: O(() => [(v(), n(C(k.value)))]),
|
|
721
721
|
_: 1
|
|
722
|
-
})) :
|
|
722
|
+
})) : M.value ? (v(), i("i", {
|
|
723
723
|
key: 1,
|
|
724
|
-
class: m(
|
|
724
|
+
class: m(M.value),
|
|
725
725
|
"aria-hidden": "true"
|
|
726
726
|
}, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span", Le, [D.value ? (v(), i("span", Re, [S(t.$slots, "label", {
|
|
727
727
|
selectedOption: y.value,
|
|
728
728
|
label: T.value
|
|
729
|
-
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(
|
|
730
|
-
default: O(() => [(v(), n(C(h.value ? E(
|
|
729
|
+
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(R), { class: m(["ml-ribbon-item-host__dropdown-arrow ml-ribbon-dropdown__arrow", { "is-open": h.value }]) }, {
|
|
730
|
+
default: O(() => [(v(), n(C(h.value ? E(oe) : E(W))))]),
|
|
731
731
|
_: 1
|
|
732
732
|
}, 8, ["class"])])])]),
|
|
733
733
|
_: 3
|
|
@@ -804,78 +804,78 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
804
804
|
},
|
|
805
805
|
emits: ["select"],
|
|
806
806
|
setup(o, { emit: l }) {
|
|
807
|
-
let u = o, g = l, _ = b(""), y = b(!1), k = b(0),
|
|
808
|
-
let e =
|
|
807
|
+
let u = o, g = l, _ = b(""), y = b(!1), k = b(0), A = b(null), j = b(null), M = b(null), ee = b(0), N = ie("size", ""), te = t(() => N.value || "default"), P = t(() => te.value === "small" ? .92 : te.value === "large" ? 1.08 : 1), F = t(() => Math.round(vt * P.value)), I = t(() => Math.round(St * P.value)), L = t(() => u.label?.trim() ?? ""), ne = t(() => u.categories.filter((e) => e.items.length > 0).length), z = t(() => u.categories.flatMap((e) => e.items)), V = t(() => z.value.find((e) => e.id === _.value) ?? z.value[0]), H = t(() => !Number.isFinite(u.inlineItemLimit) || u.inlineItemLimit <= 0 ? 4 : Math.floor(u.inlineItemLimit)), U = t(() => {
|
|
808
|
+
let e = H.value, t = z.value.length;
|
|
809
809
|
return t === 0 ? Math.min(e, 1) : Math.min(e, t);
|
|
810
|
-
}),
|
|
811
|
-
let e =
|
|
812
|
-
return
|
|
813
|
-
}),
|
|
810
|
+
}), re = t(() => Math.max(1, Math.ceil(z.value.length / U.value))), ae = t(() => Math.min(k.value, re.value - 1)), se = t(() => fe.value && ae.value > 0), le = t(() => fe.value && ae.value < re.value - 1), ue = t(() => {
|
|
811
|
+
let e = ae.value * U.value;
|
|
812
|
+
return z.value.slice(e, e + U.value);
|
|
813
|
+
}), de = t(() => new Set(ue.value.map((e) => e.id))), fe = t(() => z.value.length > U.value), G = t(() => {
|
|
814
814
|
let e = [
|
|
815
815
|
"ml-ribbon-gallery-panel",
|
|
816
816
|
`ml-ribbon-gallery-panel--${u.collapsed ? "collapsed" : "inline"}`,
|
|
817
|
-
`ml-ribbon-gallery-panel--size-${
|
|
817
|
+
`ml-ribbon-gallery-panel--size-${te.value}`
|
|
818
818
|
];
|
|
819
819
|
return u.inlineItemWidthMode === "auto" && e.push("ml-ribbon-gallery-panel--item-width-auto"), e.join(" ");
|
|
820
|
-
}),
|
|
821
|
-
"--ml-ribbon-gallery-panel-columns": String(
|
|
822
|
-
"--ml-ribbon-gallery-panel-item-width": `${
|
|
823
|
-
})),
|
|
820
|
+
}), K = t(() => ({
|
|
821
|
+
"--ml-ribbon-gallery-panel-columns": String(U.value),
|
|
822
|
+
"--ml-ribbon-gallery-panel-item-width": `${F.value}px`
|
|
823
|
+
})), pe = t(() => u.inlineItemWidthMode === "auto" ? "fit-content" : U.value * F.value + Math.max(0, U.value - 1) * yt + _t * 2 + (u.collapsed ? bt : xt + I.value)), me = t(() => ({ modifiers: [{
|
|
824
824
|
name: "offset",
|
|
825
|
-
options: { offset: [
|
|
825
|
+
options: { offset: [ee.value, 0] }
|
|
826
826
|
}] }));
|
|
827
827
|
D(() => u.modelValue, (e) => {
|
|
828
828
|
typeof e == "string" && (_.value = e, ve(e));
|
|
829
829
|
}, { immediate: !0 }), D(() => [
|
|
830
|
-
|
|
831
|
-
|
|
830
|
+
z.value.map((e) => e.id).join("\0"),
|
|
831
|
+
U.value,
|
|
832
832
|
_.value
|
|
833
833
|
], () => {
|
|
834
|
-
ve() || (k.value = Math.min(k.value,
|
|
834
|
+
ve() || (k.value = Math.min(k.value, re.value - 1));
|
|
835
835
|
}), D(y, async (e) => {
|
|
836
836
|
!e || u.collapsed || (ye(), await p(), await p(), be());
|
|
837
837
|
});
|
|
838
|
-
function
|
|
838
|
+
function q(e) {
|
|
839
839
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
842
|
-
let t =
|
|
843
|
-
return
|
|
841
|
+
function J(e) {
|
|
842
|
+
let t = L.value.toLowerCase(), n = e.title.trim().toLowerCase();
|
|
843
|
+
return ne.value > 1 || !t || n !== t;
|
|
844
844
|
}
|
|
845
|
-
function
|
|
846
|
-
return
|
|
845
|
+
function he(e) {
|
|
846
|
+
return fe.value ? e.items.filter((e) => de.value.has(e.id)) : e.items;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
849
|
-
if (u.disabled || !
|
|
850
|
-
let t =
|
|
851
|
-
k.value = Math.min(Math.max(t, 0),
|
|
848
|
+
function ge(e) {
|
|
849
|
+
if (u.disabled || !fe.value) return;
|
|
850
|
+
let t = ae.value + e;
|
|
851
|
+
k.value = Math.min(Math.max(t, 0), re.value - 1);
|
|
852
852
|
}
|
|
853
853
|
function _e(e) {
|
|
854
|
-
let t =
|
|
855
|
-
return t < 0 ? 0 : Math.floor(t /
|
|
854
|
+
let t = z.value.findIndex((t) => t.id === e.id);
|
|
855
|
+
return t < 0 ? 0 : Math.floor(t / U.value);
|
|
856
856
|
}
|
|
857
857
|
function ve(e = _.value) {
|
|
858
|
-
let t =
|
|
858
|
+
let t = z.value.find((t) => t.id === e);
|
|
859
859
|
return t ? (k.value = _e(t), !0) : !1;
|
|
860
860
|
}
|
|
861
861
|
function ye() {
|
|
862
|
-
let e =
|
|
862
|
+
let e = A.value, t = j.value;
|
|
863
863
|
if (!e || !t) {
|
|
864
|
-
|
|
864
|
+
ee.value = 0;
|
|
865
865
|
return;
|
|
866
866
|
}
|
|
867
867
|
let n = e.querySelector(".ml-ribbon-gallery__grid .ml-ribbon-gallery__item")?.getBoundingClientRect().left ?? e.getBoundingClientRect().left;
|
|
868
|
-
|
|
868
|
+
ee.value = Math.round(n - t.getBoundingClientRect().left - _t);
|
|
869
869
|
}
|
|
870
870
|
function be() {
|
|
871
|
-
let e =
|
|
872
|
-
e && e.querySelector(`[data-gallery-row-index="${
|
|
871
|
+
let e = M.value;
|
|
872
|
+
e && e.querySelector(`[data-gallery-row-index="${ae.value}"]`)?.scrollIntoView?.({ block: "start" });
|
|
873
873
|
}
|
|
874
874
|
function Y(e) {
|
|
875
|
-
return e.preview && typeof e.preview != "string" ?
|
|
875
|
+
return e.preview && typeof e.preview != "string" ? q(e.preview) : e.icon && typeof e.icon != "string" ? q(e.icon) : null;
|
|
876
876
|
}
|
|
877
877
|
function xe(e) {
|
|
878
|
-
return e.component ?
|
|
878
|
+
return e.component ? q(e.component) : null;
|
|
879
879
|
}
|
|
880
880
|
function X(e) {
|
|
881
881
|
return u.disabled || e.disabled === !0;
|
|
@@ -906,64 +906,64 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
906
906
|
}
|
|
907
907
|
return (t, l) => (v(), i("div", {
|
|
908
908
|
ref_key: "galleryRef",
|
|
909
|
-
ref:
|
|
909
|
+
ref: A,
|
|
910
910
|
class: m(["ml-ribbon-gallery", {
|
|
911
911
|
"is-disabled": o.disabled,
|
|
912
912
|
"is-collapsed": o.collapsed,
|
|
913
|
-
"is-unlabeled": !o.collapsed && !
|
|
913
|
+
"is-unlabeled": !o.collapsed && !L.value,
|
|
914
914
|
"is-inline-item-width-auto": !o.collapsed && o.inlineItemWidthMode === "auto"
|
|
915
915
|
}])
|
|
916
916
|
}, [
|
|
917
|
-
o.collapsed &&
|
|
917
|
+
o.collapsed && V.value ? (v(), n(E(B), {
|
|
918
918
|
key: 0,
|
|
919
919
|
visible: y.value,
|
|
920
920
|
"onUpdate:visible": l[0] ||= (e) => y.value = e,
|
|
921
921
|
trigger: "click",
|
|
922
922
|
placement: "bottom-start",
|
|
923
923
|
disabled: o.disabled,
|
|
924
|
-
width:
|
|
925
|
-
"popper-class":
|
|
924
|
+
width: pe.value,
|
|
925
|
+
"popper-class": G.value
|
|
926
926
|
}, {
|
|
927
927
|
reference: O(() => [a("button", {
|
|
928
928
|
type: "button",
|
|
929
929
|
class: m(["ml-ribbon-gallery__collapsed-button", {
|
|
930
|
-
"is-selected": _.value ===
|
|
930
|
+
"is-selected": _.value === V.value.id,
|
|
931
931
|
"is-open": y.value
|
|
932
932
|
}]),
|
|
933
|
-
disabled: X(
|
|
934
|
-
}, [xe(
|
|
935
|
-
item:
|
|
936
|
-
selected: _.value ===
|
|
937
|
-
disabled: X(
|
|
933
|
+
disabled: X(V.value)
|
|
934
|
+
}, [xe(V.value) ? (v(), n(C(xe(V.value)), f({ key: 0 }, V.value.componentProps, {
|
|
935
|
+
item: V.value,
|
|
936
|
+
selected: _.value === V.value.id,
|
|
937
|
+
disabled: X(V.value)
|
|
938
938
|
}), null, 16, [
|
|
939
939
|
"item",
|
|
940
940
|
"selected",
|
|
941
941
|
"disabled"
|
|
942
942
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview ml-ribbon-gallery__collapsed-preview", {
|
|
943
|
-
"ml-ribbon-gallery__preview--icon": Y(
|
|
944
|
-
"ml-ribbon-gallery__preview--svg": Q(
|
|
945
|
-
}]) }, [Y(
|
|
943
|
+
"ml-ribbon-gallery__preview--icon": Y(V.value) || Z(V.value),
|
|
944
|
+
"ml-ribbon-gallery__preview--svg": Q(V.value)
|
|
945
|
+
}]) }, [Y(V.value) ? (v(), n(E(R), {
|
|
946
946
|
key: 0,
|
|
947
947
|
class: "ml-ribbon-gallery__preview-icon"
|
|
948
948
|
}, {
|
|
949
|
-
default: O(() => [(v(), n(C(Y(
|
|
949
|
+
default: O(() => [(v(), n(C(Y(V.value))))]),
|
|
950
950
|
_: 1
|
|
951
|
-
})) : Z(
|
|
951
|
+
})) : Z(V.value) ? (v(), i("i", {
|
|
952
952
|
key: 1,
|
|
953
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(
|
|
953
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(V.value)]),
|
|
954
954
|
"aria-hidden": "true"
|
|
955
|
-
}, null, 2)) : Q(
|
|
955
|
+
}, null, 2)) : Q(V.value) && Ce(V.value) ? (v(), i("img", {
|
|
956
956
|
key: 2,
|
|
957
957
|
class: "ml-ribbon-gallery__preview-svg",
|
|
958
|
-
src: Q(
|
|
958
|
+
src: Q(V.value) ?? "",
|
|
959
959
|
alt: ""
|
|
960
|
-
}, null, 8, Ue)) : Q(
|
|
960
|
+
}, null, 8, Ue)) : Q(V.value) ? (v(), i("svg", We, [a("use", { href: Q(V.value) ?? "" }, null, 8, Ge)])) : (v(), i(e, { key: 4 }, [s(w(we(V.value)), 1)], 64))], 2), a("div", Ke, w(V.value.label), 1)], 64))], 10, He)]),
|
|
961
961
|
default: O(() => [a("div", qe, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
962
962
|
key: o.id,
|
|
963
963
|
class: "ml-ribbon-gallery__panel-category"
|
|
964
|
-
}, [
|
|
964
|
+
}, [J(o) ? (v(), i("h4", Je, w(o.title), 1)) : r("", !0), a("div", {
|
|
965
965
|
class: "ml-ribbon-gallery__panel-grid",
|
|
966
|
-
style: h(
|
|
966
|
+
style: h(K.value)
|
|
967
967
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
968
968
|
key: r.id,
|
|
969
969
|
type: "button",
|
|
@@ -992,7 +992,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
992
992
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
993
993
|
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
994
994
|
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
995
|
-
}]) }, [Y(r) ? (v(), n(E(
|
|
995
|
+
}]) }, [Y(r) ? (v(), n(E(R), {
|
|
996
996
|
key: 0,
|
|
997
997
|
class: "ml-ribbon-gallery__preview-icon"
|
|
998
998
|
}, {
|
|
@@ -1015,14 +1015,14 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1015
1015
|
"width",
|
|
1016
1016
|
"popper-class"
|
|
1017
1017
|
])) : r("", !0),
|
|
1018
|
-
!o.collapsed &&
|
|
1018
|
+
!o.collapsed && L.value ? (v(), i("div", $e, w(L.value), 1)) : r("", !0),
|
|
1019
1019
|
o.collapsed ? r("", !0) : (v(), i("div", et, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1020
1020
|
key: o.id,
|
|
1021
1021
|
class: "ml-ribbon-gallery__category"
|
|
1022
|
-
}, [
|
|
1022
|
+
}, [L.value && J(o) ? (v(), i("h4", tt, w(o.title), 1)) : r("", !0), a("div", {
|
|
1023
1023
|
class: "ml-ribbon-gallery__grid",
|
|
1024
|
-
style: h({ "--ml-ribbon-gallery-inline-columns": String(
|
|
1025
|
-
}, [(v(!0), i(e, null, x(
|
|
1024
|
+
style: h({ "--ml-ribbon-gallery-inline-columns": String(U.value) })
|
|
1025
|
+
}, [(v(!0), i(e, null, x(he(o), (r) => (v(), i("button", {
|
|
1026
1026
|
key: r.id,
|
|
1027
1027
|
type: "button",
|
|
1028
1028
|
class: m(["ml-ribbon-gallery__item", { "is-selected": _.value === r.id }]),
|
|
@@ -1050,7 +1050,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1050
1050
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1051
1051
|
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
1052
1052
|
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1053
|
-
}]) }, [Y(r) ? (v(), n(E(
|
|
1053
|
+
}]) }, [Y(r) ? (v(), n(E(R), {
|
|
1054
1054
|
key: 0,
|
|
1055
1055
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1056
1056
|
}, {
|
|
@@ -1065,59 +1065,59 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1065
1065
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1066
1066
|
src: Q(r) ?? "",
|
|
1067
1067
|
alt: ""
|
|
1068
|
-
}, null, 8, rt)) : Q(r) ? (v(), i("svg", it, [a("use", { href: Q(r) ?? "" }, null, 8, at)])) : (v(), i(e, { key: 4 }, [s(w(we(r)), 1)], 64))], 2), a("div", ot, w(r.label), 1)], 64))])], 10, nt))), 128))], 4)]))), 128)),
|
|
1068
|
+
}, null, 8, rt)) : Q(r) ? (v(), i("svg", it, [a("use", { href: Q(r) ?? "" }, null, 8, at)])) : (v(), i(e, { key: 4 }, [s(w(we(r)), 1)], 64))], 2), a("div", ot, w(r.label), 1)], 64))])], 10, nt))), 128))], 4)]))), 128)), fe.value ? (v(), i("div", st, [
|
|
1069
1069
|
a("button", {
|
|
1070
1070
|
type: "button",
|
|
1071
1071
|
class: "ml-ribbon-gallery__control-button",
|
|
1072
|
-
disabled: o.disabled || !
|
|
1072
|
+
disabled: o.disabled || !se.value,
|
|
1073
1073
|
"aria-label": "Show previous gallery row",
|
|
1074
|
-
onClick: l[1] ||= (e) =>
|
|
1075
|
-
}, [c(E(
|
|
1076
|
-
default: O(() => [c(E(
|
|
1074
|
+
onClick: l[1] ||= (e) => ge(-1)
|
|
1075
|
+
}, [c(E(R), null, {
|
|
1076
|
+
default: O(() => [c(E(oe))]),
|
|
1077
1077
|
_: 1
|
|
1078
1078
|
})], 8, ct),
|
|
1079
1079
|
a("button", {
|
|
1080
1080
|
type: "button",
|
|
1081
1081
|
class: "ml-ribbon-gallery__control-button",
|
|
1082
|
-
disabled: o.disabled || !
|
|
1082
|
+
disabled: o.disabled || !le.value,
|
|
1083
1083
|
"aria-label": "Show next gallery row",
|
|
1084
|
-
onClick: l[2] ||= (e) =>
|
|
1085
|
-
}, [c(E(
|
|
1086
|
-
default: O(() => [c(E(
|
|
1084
|
+
onClick: l[2] ||= (e) => ge(1)
|
|
1085
|
+
}, [c(E(R), null, {
|
|
1086
|
+
default: O(() => [c(E(W))]),
|
|
1087
1087
|
_: 1
|
|
1088
1088
|
})], 8, lt),
|
|
1089
|
-
c(E(
|
|
1089
|
+
c(E(B), {
|
|
1090
1090
|
visible: y.value,
|
|
1091
1091
|
"onUpdate:visible": l[3] ||= (e) => y.value = e,
|
|
1092
1092
|
trigger: "click",
|
|
1093
1093
|
placement: "bottom-start",
|
|
1094
1094
|
disabled: o.disabled,
|
|
1095
|
-
width:
|
|
1096
|
-
"popper-class":
|
|
1097
|
-
"popper-options":
|
|
1095
|
+
width: pe.value,
|
|
1096
|
+
"popper-class": G.value,
|
|
1097
|
+
"popper-options": me.value
|
|
1098
1098
|
}, {
|
|
1099
1099
|
reference: O(() => [a("button", {
|
|
1100
1100
|
ref_key: "inlineMoreButtonRef",
|
|
1101
|
-
ref:
|
|
1101
|
+
ref: j,
|
|
1102
1102
|
type: "button",
|
|
1103
1103
|
class: m(["ml-ribbon-gallery__control-button ml-ribbon-gallery__more-button", { "is-open": y.value }]),
|
|
1104
1104
|
disabled: o.disabled,
|
|
1105
1105
|
"aria-label": "Show more gallery items",
|
|
1106
1106
|
onClick: ye
|
|
1107
|
-
}, [c(E(
|
|
1108
|
-
default: O(() => [c(E(
|
|
1107
|
+
}, [c(E(R), null, {
|
|
1108
|
+
default: O(() => [c(E(ce))]),
|
|
1109
1109
|
_: 1
|
|
1110
1110
|
})], 10, ut)]),
|
|
1111
1111
|
default: O(() => [a("div", {
|
|
1112
1112
|
ref_key: "inlinePanelRef",
|
|
1113
|
-
ref:
|
|
1113
|
+
ref: M,
|
|
1114
1114
|
class: "ml-ribbon-gallery__panel"
|
|
1115
1115
|
}, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1116
1116
|
key: o.id,
|
|
1117
1117
|
class: "ml-ribbon-gallery__panel-category"
|
|
1118
|
-
}, [
|
|
1118
|
+
}, [J(o) ? (v(), i("h4", dt, w(o.title), 1)) : r("", !0), a("div", {
|
|
1119
1119
|
class: "ml-ribbon-gallery__panel-grid",
|
|
1120
|
-
style: h(
|
|
1120
|
+
style: h(K.value)
|
|
1121
1121
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
1122
1122
|
key: r.id,
|
|
1123
1123
|
type: "button",
|
|
@@ -1147,7 +1147,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1147
1147
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1148
1148
|
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
1149
1149
|
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1150
|
-
}]) }, [Y(r) ? (v(), n(E(
|
|
1150
|
+
}]) }, [Y(r) ? (v(), n(E(R), {
|
|
1151
1151
|
key: 0,
|
|
1152
1152
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1153
1153
|
}, {
|
|
@@ -1198,32 +1198,32 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1198
1198
|
},
|
|
1199
1199
|
emits: ["change"],
|
|
1200
1200
|
setup(e, { emit: a }) {
|
|
1201
|
-
let o = e, s = a, l = t(() =>
|
|
1201
|
+
let o = e, s = a, l = t(() => te(o.width, "96px")), u = t(() => l.value === "100%"), d = t(() => u.value ? { width: "100%" } : {}), p = t(() => u.value ? {} : { width: l.value }), g = t(() => N(o.prefixLabel)), _ = t(() => !o.prefixIcon || typeof o.prefixIcon == "string" ? null : o.prefixIcon), y = t(() => N(o.prefixIconClass ?? (typeof o.prefixIcon == "string" ? o.prefixIcon : void 0)) ?? null), x = t(() => !!(g.value || _.value || y.value)), S = t(() => g.value ?? o.id), T = b(void 0);
|
|
1202
1202
|
function D(e) {
|
|
1203
|
-
|
|
1203
|
+
M(e);
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function j(e) {
|
|
1206
1206
|
e.preventDefault(), e.stopPropagation();
|
|
1207
1207
|
let t = e.target;
|
|
1208
1208
|
if (!(t instanceof HTMLInputElement)) return;
|
|
1209
|
-
let n =
|
|
1210
|
-
n === void 0 && t.value.trim().length > 0 ||
|
|
1209
|
+
let n = ee(t.value);
|
|
1210
|
+
n === void 0 && t.value.trim().length > 0 || M(n);
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function M(e) {
|
|
1213
1213
|
Object.is(T.value, e) || (T.value = e, s("change", e));
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function ee(e) {
|
|
1216
1216
|
let t = e.trim();
|
|
1217
1217
|
if (!t) return;
|
|
1218
1218
|
let n = Number(t);
|
|
1219
1219
|
return Number.isFinite(n) ? n : void 0;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function N(e) {
|
|
1222
1222
|
if (typeof e != "string") return;
|
|
1223
1223
|
let t = e.trim();
|
|
1224
1224
|
return t.length > 0 ? t : void 0;
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function te(e, t) {
|
|
1227
1227
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1228
1228
|
if (typeof e == "string") {
|
|
1229
1229
|
let n = e.trim();
|
|
@@ -1238,8 +1238,8 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1238
1238
|
}]),
|
|
1239
1239
|
style: h(d.value),
|
|
1240
1240
|
"data-id": e.id,
|
|
1241
|
-
onKeydown: k(
|
|
1242
|
-
}, [x.value ? (v(), i("span", Tt, [_.value ? (v(), n(E(
|
|
1241
|
+
onKeydown: k(A(j, ["stop", "prevent"]), ["enter"])
|
|
1242
|
+
}, [x.value ? (v(), i("span", Tt, [_.value ? (v(), n(E(R), {
|
|
1243
1243
|
key: 0,
|
|
1244
1244
|
class: "ml-ribbon-input-number__prefix-icon",
|
|
1245
1245
|
"aria-hidden": "true"
|
|
@@ -1250,7 +1250,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1250
1250
|
key: 1,
|
|
1251
1251
|
class: m(["ml-ribbon-input-number__prefix-icon ml-ribbon-input-number__prefix-icon--class", y.value]),
|
|
1252
1252
|
"aria-hidden": "true"
|
|
1253
|
-
}, null, 2)) : r("", !0), g.value ? (v(), i("span", Et, w(g.value), 1)) : r("", !0)])) : r("", !0), c(E(
|
|
1253
|
+
}, null, 2)) : r("", !0), g.value ? (v(), i("span", Et, w(g.value), 1)) : r("", !0)])) : r("", !0), c(E(ne), f(e.controlProps, {
|
|
1254
1254
|
"model-value": e.modelValue,
|
|
1255
1255
|
disabled: e.disabled,
|
|
1256
1256
|
style: p.value,
|
|
@@ -1266,7 +1266,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1266
1266
|
}), Ot = ["data-id"], kt = {
|
|
1267
1267
|
key: 0,
|
|
1268
1268
|
class: "ml-ribbon-segmented__label"
|
|
1269
|
-
}, At = ["data-option-value"], jt = {
|
|
1269
|
+
}, At = ["data-option-value", "aria-label"], jt = {
|
|
1270
1270
|
key: 2,
|
|
1271
1271
|
class: "ml-ribbon-segmented__option-label"
|
|
1272
1272
|
}, Mt = {
|
|
@@ -1298,7 +1298,9 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1298
1298
|
hideLabel: {
|
|
1299
1299
|
type: Boolean,
|
|
1300
1300
|
default: !1
|
|
1301
|
-
}
|
|
1301
|
+
},
|
|
1302
|
+
tooltipShowAfter: { default: 1e3 },
|
|
1303
|
+
tooltipHideAfter: { default: 0 }
|
|
1302
1304
|
},
|
|
1303
1305
|
emits: ["change"],
|
|
1304
1306
|
setup(e, { emit: o }) {
|
|
@@ -1307,28 +1309,51 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1307
1309
|
return e;
|
|
1308
1310
|
}
|
|
1309
1311
|
function p(e) {
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
+
if (typeof e != "string") return;
|
|
1313
|
+
let t = e.trim();
|
|
1314
|
+
return t.length > 0 ? t : void 0;
|
|
1312
1315
|
}
|
|
1313
1316
|
function h(e) {
|
|
1314
|
-
|
|
1317
|
+
if (typeof e == "string") {
|
|
1318
|
+
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1319
|
+
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : void 0;
|
|
1320
|
+
}
|
|
1321
|
+
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
1315
1322
|
}
|
|
1316
1323
|
function g(e) {
|
|
1317
|
-
|
|
1324
|
+
let t = f(e);
|
|
1325
|
+
return t.label?.trim() || String(t.value);
|
|
1318
1326
|
}
|
|
1319
1327
|
function _(e) {
|
|
1320
|
-
|
|
1328
|
+
let t = f(e);
|
|
1329
|
+
return p(t.tooltip) ?? p(t.label) ?? h(t.value);
|
|
1321
1330
|
}
|
|
1322
1331
|
function y(e) {
|
|
1323
|
-
|
|
1332
|
+
let t = f(e).icon;
|
|
1333
|
+
return t && typeof t != "string" ? t : null;
|
|
1324
1334
|
}
|
|
1325
1335
|
function b(e) {
|
|
1336
|
+
let t = f(e).iconClass;
|
|
1337
|
+
if (typeof t == "string" && t.trim()) return t;
|
|
1338
|
+
let n = f(e).icon;
|
|
1339
|
+
return typeof n == "string" && n.trim() ? n.trim() : null;
|
|
1340
|
+
}
|
|
1341
|
+
function x(e) {
|
|
1342
|
+
return !y(e) && !b(e);
|
|
1343
|
+
}
|
|
1344
|
+
function S(e) {
|
|
1345
|
+
return String(f(e).value);
|
|
1346
|
+
}
|
|
1347
|
+
function T(e) {
|
|
1348
|
+
return _(e) ?? S(e);
|
|
1349
|
+
}
|
|
1350
|
+
function D(e) {
|
|
1326
1351
|
l("change", e);
|
|
1327
1352
|
}
|
|
1328
1353
|
return (t, o) => (v(), i("div", {
|
|
1329
1354
|
class: "ml-ribbon-segmented",
|
|
1330
1355
|
"data-id": e.id
|
|
1331
|
-
}, [d.value ? (v(), i("div", kt, w(u.value), 1)) : r("", !0), c(E(
|
|
1356
|
+
}, [d.value ? (v(), i("div", kt, w(u.value), 1)) : r("", !0), c(E(V), {
|
|
1332
1357
|
class: "ml-ribbon-segmented__control",
|
|
1333
1358
|
options: e.options,
|
|
1334
1359
|
"model-value": e.modelValue,
|
|
@@ -1336,23 +1361,39 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1336
1361
|
block: e.block,
|
|
1337
1362
|
disabled: e.disabled,
|
|
1338
1363
|
"aria-label": u.value || e.id,
|
|
1339
|
-
onChange:
|
|
1364
|
+
onChange: D
|
|
1340
1365
|
}, {
|
|
1341
|
-
default: O(({ item:
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1366
|
+
default: O(({ item: t }) => [c(E(re), {
|
|
1367
|
+
content: _(t),
|
|
1368
|
+
disabled: !_(t),
|
|
1369
|
+
"show-after": e.tooltipShowAfter,
|
|
1370
|
+
"hide-after": e.tooltipHideAfter,
|
|
1371
|
+
placement: "top",
|
|
1372
|
+
effect: "dark"
|
|
1348
1373
|
}, {
|
|
1349
|
-
default: O(() => [(
|
|
1374
|
+
default: O(() => [a("span", {
|
|
1375
|
+
class: "ml-ribbon-segmented__option",
|
|
1376
|
+
"data-option-value": S(t),
|
|
1377
|
+
"aria-label": T(t)
|
|
1378
|
+
}, [y(t) ? (v(), n(E(R), {
|
|
1379
|
+
key: 0,
|
|
1380
|
+
class: "ml-ribbon-segmented__option-icon",
|
|
1381
|
+
"aria-hidden": "true"
|
|
1382
|
+
}, {
|
|
1383
|
+
default: O(() => [(v(), n(C(y(t))))]),
|
|
1384
|
+
_: 2
|
|
1385
|
+
}, 1024)) : b(t) ? (v(), i("i", {
|
|
1386
|
+
key: 1,
|
|
1387
|
+
class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", b(t)]),
|
|
1388
|
+
"aria-hidden": "true"
|
|
1389
|
+
}, null, 2)) : r("", !0), x(t) ? (v(), i("span", jt, w(g(t)), 1)) : (v(), i("span", Mt, w(g(t)), 1))], 8, At)]),
|
|
1350
1390
|
_: 2
|
|
1351
|
-
},
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
"
|
|
1355
|
-
|
|
1391
|
+
}, 1032, [
|
|
1392
|
+
"content",
|
|
1393
|
+
"disabled",
|
|
1394
|
+
"show-after",
|
|
1395
|
+
"hide-after"
|
|
1396
|
+
])]),
|
|
1356
1397
|
_: 1
|
|
1357
1398
|
}, 8, [
|
|
1358
1399
|
"options",
|
|
@@ -1449,41 +1490,41 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1449
1490
|
},
|
|
1450
1491
|
emits: ["item-click"],
|
|
1451
1492
|
setup(o, { emit: c }) {
|
|
1452
|
-
let l = o, p = c, g = u(
|
|
1453
|
-
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !
|
|
1493
|
+
let l = o, p = c, g = u(fe, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y = ie("size", ""), k = t(() => y.value || "default"), A = t(() => Me(g?.tooltipShowAfter.value, 1e3)), j = t(() => Me(g?.tooltipHideAfter.value, 0)), M = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${k.value}`), te = t(() => l.item.props?.icon || l.item.icon), P = t(() => l.item.hideLabel !== !0), F = b(void 0), I = t(() => l.item.type === "dropdown" && F.value ? F.value : Ae(l.item.tooltip) ?? Ae(l.item.label) ?? Re(l.item) ?? ze(l.item.id)), L = t(() => l.item.type !== "buttonGroup" && l.item.type !== "segmented"), R = t(() => !L.value || !I.value), ne = t(() => I.value ?? l.item.id), B = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), V = t(() => {
|
|
1494
|
+
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !B.value) return !1;
|
|
1454
1495
|
let e = g.keyTipsSequence.value.toLowerCase();
|
|
1455
|
-
return e ?
|
|
1456
|
-
}),
|
|
1496
|
+
return e ? B.value.toLowerCase().startsWith(e) : !0;
|
|
1497
|
+
}), U = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), W = t(() => l.item.props?.modelValue), ae = t(() => l.item.props?.activeLabel), oe = t(() => l.item.props?.inactiveLabel), se = t(() => Array.isArray(l.item.props?.categories) ? l.item.props.categories : []), ce = t(() => {
|
|
1457
1498
|
let e = l.item.props?.modelValue;
|
|
1458
1499
|
return typeof e == "string" ? e : void 0;
|
|
1459
|
-
}),
|
|
1500
|
+
}), le = t(() => {
|
|
1460
1501
|
let e = l.item.props?.inlineItemLimit;
|
|
1461
1502
|
return typeof e == "number" ? e : void 0;
|
|
1462
|
-
}),
|
|
1503
|
+
}), ue = t(() => l.item.props?.inlineItemWidthMode === "auto" ? "auto" : "fixed"), de = t(() => {
|
|
1463
1504
|
let e = l.item.props?.component;
|
|
1464
1505
|
return !e || typeof e == "string" ? null : d(T(e));
|
|
1465
|
-
}),
|
|
1506
|
+
}), G = t(() => {
|
|
1466
1507
|
let e = l.item.props?.componentProps;
|
|
1467
1508
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
1468
|
-
}),
|
|
1509
|
+
}), K = t(() => l.item.props?.wrap !== !1), pe = t(() => l.item.props?.equalWidth === !0), me = t(() => {
|
|
1469
1510
|
let e = l.item.props?.buttonSize;
|
|
1470
1511
|
if (e === "large" || e === "default" || e === "small") return e;
|
|
1471
|
-
}),
|
|
1512
|
+
}), q = t(() => Ie(l.item.props?.iconSize)), J = t(() => Ne(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), he = t(() => l.item.props?.modelValue), ge = t(() => Ne(l.item.props?.width ?? l.item.props?.inputNumberWidth, "96px")), _e = t(() => l.item.props?.modelValue), ve = t(() => {
|
|
1472
1513
|
let e = { ...l.item.props ?? {} };
|
|
1473
1514
|
return delete e.modelValue, delete e.width, delete e.inputNumberWidth, delete e.prefixLabel, delete e.prefixIcon, delete e.prefixIconClass, delete e.emitValueOnChange, delete e.valuePrefix, delete e.options, delete e.component, delete e.componentProps, e;
|
|
1474
|
-
}), ye = t(() => Le(l.item.props?.labelWrapLines)), be = t(() => Pe(l.item.props?.labelWrapWidth)), Y = t(() => l.item.type === "button" && l.item.size === "large" &&
|
|
1515
|
+
}), ye = t(() => Le(l.item.props?.labelWrapLines)), be = t(() => Pe(l.item.props?.labelWrapWidth)), Y = t(() => l.item.type === "button" && l.item.size === "large" && P.value && (ye.value ?? 0) > 1), xe = t(() => {
|
|
1475
1516
|
if (!Y.value) return {};
|
|
1476
1517
|
let e = { "--ml-rb-item-label-max-lines": String(ye.value ?? 2) };
|
|
1477
1518
|
return be.value && (e["--ml-rb-item-label-wrap-width"] = be.value), e;
|
|
1478
1519
|
});
|
|
1479
1520
|
D(() => l.item.id, () => {
|
|
1480
|
-
|
|
1521
|
+
F.value = void 0;
|
|
1481
1522
|
});
|
|
1482
1523
|
function X() {
|
|
1483
|
-
|
|
1524
|
+
U.value || p("item-click", l.id);
|
|
1484
1525
|
}
|
|
1485
1526
|
function Z(e) {
|
|
1486
|
-
if (!
|
|
1527
|
+
if (!U.value) {
|
|
1487
1528
|
if (typeof e == "string" || typeof e == "number") {
|
|
1488
1529
|
p("item-click", String(e));
|
|
1489
1530
|
return;
|
|
@@ -1492,10 +1533,10 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1492
1533
|
}
|
|
1493
1534
|
}
|
|
1494
1535
|
function Q(e) {
|
|
1495
|
-
|
|
1536
|
+
F.value = e;
|
|
1496
1537
|
}
|
|
1497
1538
|
function Se(e) {
|
|
1498
|
-
if (!
|
|
1539
|
+
if (!U.value) {
|
|
1499
1540
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1500
1541
|
p("item-click", String(e));
|
|
1501
1542
|
return;
|
|
@@ -1504,7 +1545,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1504
1545
|
}
|
|
1505
1546
|
}
|
|
1506
1547
|
function Ce(e) {
|
|
1507
|
-
if (
|
|
1548
|
+
if (U.value) return;
|
|
1508
1549
|
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
1509
1550
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
1510
1551
|
p("item-click", String(t));
|
|
@@ -1513,7 +1554,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1513
1554
|
p("item-click", String(e));
|
|
1514
1555
|
}
|
|
1515
1556
|
function we(e) {
|
|
1516
|
-
if (!
|
|
1557
|
+
if (!U.value) {
|
|
1517
1558
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1518
1559
|
p("item-click", String(e));
|
|
1519
1560
|
return;
|
|
@@ -1522,10 +1563,10 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1522
1563
|
}
|
|
1523
1564
|
}
|
|
1524
1565
|
function Te(e) {
|
|
1525
|
-
|
|
1566
|
+
U.value || p("item-click", e);
|
|
1526
1567
|
}
|
|
1527
1568
|
function Ee(e) {
|
|
1528
|
-
if (!
|
|
1569
|
+
if (!U.value) {
|
|
1529
1570
|
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1530
1571
|
p("item-click", String(e));
|
|
1531
1572
|
return;
|
|
@@ -1534,7 +1575,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1534
1575
|
}
|
|
1535
1576
|
}
|
|
1536
1577
|
function De(e) {
|
|
1537
|
-
if (!
|
|
1578
|
+
if (!U.value) {
|
|
1538
1579
|
if (l.item.props?.emitValueOnChange === !0 && typeof e == "number" && Number.isFinite(e)) {
|
|
1539
1580
|
let t = l.item.props?.valuePrefix;
|
|
1540
1581
|
p("item-click", `${typeof t == "string" ? t : ""}${e}`);
|
|
@@ -1544,7 +1585,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1544
1585
|
}
|
|
1545
1586
|
}
|
|
1546
1587
|
function Oe(e) {
|
|
1547
|
-
if (!
|
|
1588
|
+
if (!U.value) {
|
|
1548
1589
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1549
1590
|
p("item-click", String(e));
|
|
1550
1591
|
return;
|
|
@@ -1597,11 +1638,11 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1597
1638
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1598
1639
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
1599
1640
|
}
|
|
1600
|
-
return (t, c) => (v(), n(E(
|
|
1601
|
-
content:
|
|
1602
|
-
disabled:
|
|
1603
|
-
"show-after":
|
|
1604
|
-
"hide-after":
|
|
1641
|
+
return (t, c) => (v(), n(E(re), {
|
|
1642
|
+
content: I.value,
|
|
1643
|
+
disabled: R.value,
|
|
1644
|
+
"show-after": A.value,
|
|
1645
|
+
"hide-after": j.value,
|
|
1605
1646
|
placement: "top",
|
|
1606
1647
|
effect: "dark"
|
|
1607
1648
|
}, {
|
|
@@ -1617,19 +1658,19 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1617
1658
|
style: h(xe.value),
|
|
1618
1659
|
"data-item-id": o.id,
|
|
1619
1660
|
role: "group"
|
|
1620
|
-
}, [
|
|
1661
|
+
}, [V.value ? (v(), i("span", Rt, w(B.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Fe, {
|
|
1621
1662
|
key: 1,
|
|
1622
1663
|
id: o.item.id,
|
|
1623
1664
|
label: o.item.label ?? "",
|
|
1624
1665
|
options: o.item.props?.options ?? [],
|
|
1625
1666
|
"hide-label": o.item.hideLabel === !0,
|
|
1626
|
-
wrap:
|
|
1627
|
-
"equal-width":
|
|
1628
|
-
"button-size":
|
|
1629
|
-
"icon-size":
|
|
1630
|
-
"tooltip-show-after":
|
|
1631
|
-
"tooltip-hide-after":
|
|
1632
|
-
disabled:
|
|
1667
|
+
wrap: K.value,
|
|
1668
|
+
"equal-width": pe.value,
|
|
1669
|
+
"button-size": me.value,
|
|
1670
|
+
"icon-size": q.value,
|
|
1671
|
+
"tooltip-show-after": A.value,
|
|
1672
|
+
"tooltip-hide-after": j.value,
|
|
1673
|
+
disabled: U.value,
|
|
1633
1674
|
onChange: we
|
|
1634
1675
|
}, null, 8, [
|
|
1635
1676
|
"id",
|
|
@@ -1651,8 +1692,10 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1651
1692
|
"model-value": o.item.props?.modelValue,
|
|
1652
1693
|
direction: o.item.props?.direction ?? "horizontal",
|
|
1653
1694
|
block: o.item.props?.block === !0,
|
|
1654
|
-
disabled:
|
|
1695
|
+
disabled: U.value,
|
|
1655
1696
|
"hide-label": o.item.hideLabel === !0,
|
|
1697
|
+
"tooltip-show-after": A.value,
|
|
1698
|
+
"tooltip-hide-after": j.value,
|
|
1656
1699
|
onChange: Se
|
|
1657
1700
|
}, null, 8, [
|
|
1658
1701
|
"id",
|
|
@@ -1662,17 +1705,19 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1662
1705
|
"direction",
|
|
1663
1706
|
"block",
|
|
1664
1707
|
"disabled",
|
|
1665
|
-
"hide-label"
|
|
1708
|
+
"hide-label",
|
|
1709
|
+
"tooltip-show-after",
|
|
1710
|
+
"tooltip-hide-after"
|
|
1666
1711
|
])) : o.item.type === "toggle" ? (v(), n(Pt, {
|
|
1667
1712
|
key: 3,
|
|
1668
1713
|
id: o.item.id,
|
|
1669
1714
|
label: o.item.label ?? o.item.id,
|
|
1670
|
-
"model-value":
|
|
1715
|
+
"model-value": W.value,
|
|
1671
1716
|
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1672
1717
|
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1673
|
-
"active-label":
|
|
1674
|
-
"inactive-label":
|
|
1675
|
-
disabled:
|
|
1718
|
+
"active-label": ae.value,
|
|
1719
|
+
"inactive-label": oe.value,
|
|
1720
|
+
disabled: U.value,
|
|
1676
1721
|
"hide-label": o.item.hideLabel === !0,
|
|
1677
1722
|
onChange: Ce
|
|
1678
1723
|
}, null, 8, [
|
|
@@ -1689,13 +1734,13 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1689
1734
|
key: 4,
|
|
1690
1735
|
id: o.item.id,
|
|
1691
1736
|
label: o.item.label ?? "",
|
|
1692
|
-
categories:
|
|
1693
|
-
"model-value":
|
|
1737
|
+
categories: se.value,
|
|
1738
|
+
"model-value": ce.value,
|
|
1694
1739
|
collapsed: o.item.props?.collapsed === !0,
|
|
1695
|
-
"inline-item-limit":
|
|
1696
|
-
"inline-item-width-mode":
|
|
1740
|
+
"inline-item-limit": le.value,
|
|
1741
|
+
"inline-item-width-mode": ue.value,
|
|
1697
1742
|
"preview-fallback": l.galleryPreviewFallback,
|
|
1698
|
-
disabled:
|
|
1743
|
+
disabled: U.value,
|
|
1699
1744
|
onSelect: Te
|
|
1700
1745
|
}, null, 8, [
|
|
1701
1746
|
"id",
|
|
@@ -1711,12 +1756,12 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1711
1756
|
key: 5,
|
|
1712
1757
|
id: o.item.id,
|
|
1713
1758
|
item: o.item,
|
|
1714
|
-
disabled:
|
|
1759
|
+
disabled: U.value
|
|
1715
1760
|
}, {
|
|
1716
|
-
default: O(() => [
|
|
1761
|
+
default: O(() => [de.value ? (v(), n(C(de.value), f({ key: 0 }, G.value, {
|
|
1717
1762
|
item: o.item,
|
|
1718
1763
|
"group-id": o.groupId,
|
|
1719
|
-
disabled:
|
|
1764
|
+
disabled: U.value,
|
|
1720
1765
|
"emit-item-click": Oe
|
|
1721
1766
|
}), null, 16, [
|
|
1722
1767
|
"item",
|
|
@@ -1725,7 +1770,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1725
1770
|
])) : S(t.$slots, "template", {
|
|
1726
1771
|
key: 1,
|
|
1727
1772
|
item: o.item,
|
|
1728
|
-
disabled:
|
|
1773
|
+
disabled: U.value
|
|
1729
1774
|
})]),
|
|
1730
1775
|
_: 3
|
|
1731
1776
|
}, 8, [
|
|
@@ -1737,14 +1782,14 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1737
1782
|
id: o.item.id,
|
|
1738
1783
|
label: o.item.label ?? o.item.id,
|
|
1739
1784
|
tooltip: o.item.tooltip,
|
|
1740
|
-
icon:
|
|
1785
|
+
icon: te.value,
|
|
1741
1786
|
options: o.item.props?.options ?? [],
|
|
1742
|
-
disabled:
|
|
1787
|
+
disabled: U.value,
|
|
1743
1788
|
"hide-label": o.item.hideLabel === !0,
|
|
1744
1789
|
"item-size": o.item.size ?? "medium",
|
|
1745
1790
|
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1746
|
-
"tooltip-show-after":
|
|
1747
|
-
"tooltip-hide-after":
|
|
1791
|
+
"tooltip-show-after": A.value,
|
|
1792
|
+
"tooltip-hide-after": j.value,
|
|
1748
1793
|
onCommand: Z,
|
|
1749
1794
|
onTooltipChange: Q,
|
|
1750
1795
|
onClick: X
|
|
@@ -1760,26 +1805,26 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1760
1805
|
"sync-label-with-selection",
|
|
1761
1806
|
"tooltip-show-after",
|
|
1762
1807
|
"tooltip-hide-after"
|
|
1763
|
-
])) : o.item.type === "checkbox" ? (v(), n(E(
|
|
1808
|
+
])) : o.item.type === "checkbox" ? (v(), n(E(ee), {
|
|
1764
1809
|
key: 7,
|
|
1765
|
-
disabled:
|
|
1810
|
+
disabled: U.value,
|
|
1766
1811
|
onChange: X
|
|
1767
1812
|
}, {
|
|
1768
1813
|
default: O(() => [s(w(o.item.label), 1)]),
|
|
1769
1814
|
_: 1
|
|
1770
|
-
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(
|
|
1815
|
+
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(N), {
|
|
1771
1816
|
key: 8,
|
|
1772
|
-
disabled:
|
|
1817
|
+
disabled: U.value,
|
|
1773
1818
|
onChange: X
|
|
1774
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(
|
|
1819
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(H), {
|
|
1775
1820
|
key: 9,
|
|
1776
|
-
"model-value":
|
|
1777
|
-
disabled:
|
|
1778
|
-
"popper-class":
|
|
1779
|
-
style: h({ width:
|
|
1821
|
+
"model-value": he.value,
|
|
1822
|
+
disabled: U.value,
|
|
1823
|
+
"popper-class": M.value,
|
|
1824
|
+
style: h({ width: J.value }),
|
|
1780
1825
|
onChange: Ee
|
|
1781
1826
|
}, {
|
|
1782
|
-
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(
|
|
1827
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(z), {
|
|
1783
1828
|
key: String(e.value),
|
|
1784
1829
|
label: String(e.label),
|
|
1785
1830
|
value: e.value
|
|
@@ -1794,12 +1839,12 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1794
1839
|
key: 10,
|
|
1795
1840
|
id: o.item.id,
|
|
1796
1841
|
"model-value": _e.value,
|
|
1797
|
-
width:
|
|
1842
|
+
width: ge.value,
|
|
1798
1843
|
"prefix-label": o.item.props?.prefixLabel,
|
|
1799
1844
|
"prefix-icon": o.item.props?.prefixIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1800
1845
|
"prefix-icon-class": o.item.props?.prefixIconClass,
|
|
1801
1846
|
"control-props": ve.value,
|
|
1802
|
-
disabled:
|
|
1847
|
+
disabled: U.value,
|
|
1803
1848
|
onChange: De
|
|
1804
1849
|
}, null, 8, [
|
|
1805
1850
|
"id",
|
|
@@ -1814,10 +1859,10 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1814
1859
|
key: 11,
|
|
1815
1860
|
id: o.item.id,
|
|
1816
1861
|
label: o.item.label ?? o.item.id,
|
|
1817
|
-
icon:
|
|
1818
|
-
disabled:
|
|
1819
|
-
"hide-label": !
|
|
1820
|
-
"aria-label":
|
|
1862
|
+
icon: te.value,
|
|
1863
|
+
disabled: U.value,
|
|
1864
|
+
"hide-label": !P.value,
|
|
1865
|
+
"aria-label": ne.value,
|
|
1821
1866
|
onClick: X
|
|
1822
1867
|
}, null, 8, [
|
|
1823
1868
|
"id",
|
|
@@ -1903,7 +1948,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1903
1948
|
},
|
|
1904
1949
|
emits: ["item-click"],
|
|
1905
1950
|
setup(e, { emit: o }) {
|
|
1906
|
-
let s = e, l = o, d = u(
|
|
1951
|
+
let s = e, l = o, d = u(fe, null), f = t(() => s.width == null), y = t(() => {
|
|
1907
1952
|
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
1908
1953
|
let e = `${s.width}px`;
|
|
1909
1954
|
return {
|
|
@@ -1912,13 +1957,13 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1912
1957
|
maxWidth: e,
|
|
1913
1958
|
flex: `0 0 ${e}`
|
|
1914
1959
|
};
|
|
1915
|
-
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]),
|
|
1960
|
+
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), A = b(null), M = b(null), ee = b(0), N = b(0), te = ie("size", ""), P = t(() => te.value || "default"), F = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${P.value}`), I = t(() => ({ modifiers: [{
|
|
1916
1961
|
name: "offset",
|
|
1917
|
-
options: { offset: [
|
|
1918
|
-
}] })),
|
|
1962
|
+
options: { offset: [ee.value, 8] }
|
|
1963
|
+
}] })), L = t(() => ({ modifiers: [{
|
|
1919
1964
|
name: "offset",
|
|
1920
|
-
options: { offset: [
|
|
1921
|
-
}] })),
|
|
1965
|
+
options: { offset: [N.value, 8] }
|
|
1966
|
+
}] })), ne = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), z = t(() => k.value.length > 0), V = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), H = b(!1), U = b(!1), re = t(() => {
|
|
1922
1967
|
if (!s.groupModel || !k.value.length) return null;
|
|
1923
1968
|
let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
|
|
1924
1969
|
...t,
|
|
@@ -1928,7 +1973,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1928
1973
|
...s.groupModel,
|
|
1929
1974
|
collections: t
|
|
1930
1975
|
} : null;
|
|
1931
|
-
}),
|
|
1976
|
+
}), ae = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
1932
1977
|
id: `${s.groupModel.id}-footer-menu`,
|
|
1933
1978
|
title: "",
|
|
1934
1979
|
orientation: "row",
|
|
@@ -1938,7 +1983,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1938
1983
|
items: s.groupModel.footerMenuItems
|
|
1939
1984
|
}]
|
|
1940
1985
|
} : null);
|
|
1941
|
-
function
|
|
1986
|
+
function se() {
|
|
1942
1987
|
let e = T.value?.querySelector(".ml-ribbon-group__content");
|
|
1943
1988
|
if (!e) {
|
|
1944
1989
|
k.value.length > 0 && (k.value = []);
|
|
@@ -1957,57 +2002,57 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
1957
2002
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
1958
2003
|
}), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
|
|
1959
2004
|
}
|
|
1960
|
-
function
|
|
2005
|
+
function ce() {
|
|
1961
2006
|
p(() => {
|
|
1962
|
-
|
|
2007
|
+
he(), le(), ue(), se();
|
|
1963
2008
|
});
|
|
1964
2009
|
}
|
|
1965
|
-
function
|
|
1966
|
-
let e = T.value?.getBoundingClientRect(), t =
|
|
2010
|
+
function le() {
|
|
2011
|
+
let e = T.value?.getBoundingClientRect(), t = A.value?.getBoundingClientRect();
|
|
1967
2012
|
if (!e || !t) {
|
|
1968
|
-
|
|
2013
|
+
ee.value !== 0 && (ee.value = 0);
|
|
1969
2014
|
return;
|
|
1970
2015
|
}
|
|
1971
2016
|
let n = Math.round(e.left - t.left);
|
|
1972
|
-
|
|
2017
|
+
ee.value !== n && (ee.value = n);
|
|
1973
2018
|
}
|
|
1974
|
-
function
|
|
1975
|
-
let e = T.value?.getBoundingClientRect(), t =
|
|
2019
|
+
function ue() {
|
|
2020
|
+
let e = T.value?.getBoundingClientRect(), t = M.value?.getBoundingClientRect();
|
|
1976
2021
|
if (!e || !t) {
|
|
1977
|
-
|
|
2022
|
+
N.value !== 0 && (N.value = 0);
|
|
1978
2023
|
return;
|
|
1979
2024
|
}
|
|
1980
2025
|
let n = Math.round(e.left - t.left);
|
|
1981
|
-
|
|
1982
|
-
}
|
|
1983
|
-
function W(e) {
|
|
1984
|
-
V.value = e;
|
|
2026
|
+
N.value !== n && (N.value = n);
|
|
1985
2027
|
}
|
|
1986
2028
|
function G(e) {
|
|
1987
2029
|
H.value = e;
|
|
1988
2030
|
}
|
|
1989
|
-
function
|
|
1990
|
-
|
|
2031
|
+
function K(e) {
|
|
2032
|
+
U.value = e;
|
|
1991
2033
|
}
|
|
1992
|
-
function
|
|
2034
|
+
function pe() {
|
|
1993
2035
|
x.value || (H.value = !H.value);
|
|
1994
2036
|
}
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
2037
|
+
function me() {
|
|
2038
|
+
x.value || (U.value = !U.value);
|
|
2039
|
+
}
|
|
2040
|
+
let q = null, J = null;
|
|
2041
|
+
function he() {
|
|
2042
|
+
if (!q) return;
|
|
1998
2043
|
let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1999
|
-
|
|
2044
|
+
J !== e && (J && q.unobserve(J), e && q.observe(e), J = e);
|
|
2000
2045
|
}
|
|
2001
2046
|
return D(() => s.groupModel, () => {
|
|
2002
|
-
|
|
2047
|
+
ce();
|
|
2003
2048
|
}, { deep: !0 }), D(x, (e) => {
|
|
2004
|
-
e && (
|
|
2049
|
+
e && (H.value = !1, U.value = !1);
|
|
2005
2050
|
}), g(() => {
|
|
2006
|
-
typeof ResizeObserver < "u" && (
|
|
2007
|
-
|
|
2008
|
-
}), T.value &&
|
|
2051
|
+
typeof ResizeObserver < "u" && (q = new ResizeObserver(() => {
|
|
2052
|
+
le(), ue(), se();
|
|
2053
|
+
}), T.value && q.observe(T.value), he()), ce();
|
|
2009
2054
|
}), _(() => {
|
|
2010
|
-
|
|
2055
|
+
q?.disconnect();
|
|
2011
2056
|
}), (t, o) => (v(), i("section", {
|
|
2012
2057
|
ref_key: "groupSectionRef",
|
|
2013
2058
|
ref: T,
|
|
@@ -2015,39 +2060,39 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2015
2060
|
"data-priority": e.priority ?? 100,
|
|
2016
2061
|
style: h(y.value)
|
|
2017
2062
|
}, [a("div", Ht, [S(t.$slots, "default")]), a("footer", Ut, [
|
|
2018
|
-
|
|
2063
|
+
ne.value ? (v(), n(E(R), {
|
|
2019
2064
|
key: 0,
|
|
2020
2065
|
class: "ml-ribbon-group__icon"
|
|
2021
2066
|
}, {
|
|
2022
|
-
default: O(() => [(v(), n(C(
|
|
2067
|
+
default: O(() => [(v(), n(C(ne.value)))]),
|
|
2023
2068
|
_: 1
|
|
2024
2069
|
})) : r("", !0),
|
|
2025
2070
|
a("span", Wt, w(e.title), 1),
|
|
2026
|
-
|
|
2071
|
+
V.value && ae.value ? (v(), n(E(B), {
|
|
2027
2072
|
key: 1,
|
|
2028
2073
|
trigger: "click",
|
|
2029
2074
|
placement: "bottom-start",
|
|
2030
2075
|
disabled: x.value,
|
|
2031
|
-
"popper-class":
|
|
2032
|
-
"popper-options":
|
|
2033
|
-
onShow: o[1] ||= (e) =>
|
|
2034
|
-
onHide: o[2] ||= (e) =>
|
|
2076
|
+
"popper-class": F.value,
|
|
2077
|
+
"popper-options": L.value,
|
|
2078
|
+
onShow: o[1] ||= (e) => G(!0),
|
|
2079
|
+
onHide: o[2] ||= (e) => G(!1)
|
|
2035
2080
|
}, {
|
|
2036
2081
|
reference: O(() => [a("button", {
|
|
2037
2082
|
ref_key: "footerTriggerRef",
|
|
2038
|
-
ref:
|
|
2083
|
+
ref: M,
|
|
2039
2084
|
type: "button",
|
|
2040
|
-
class: m(["ml-ribbon-group__footer-trigger", { "is-open":
|
|
2085
|
+
class: m(["ml-ribbon-group__footer-trigger", { "is-open": H.value }]),
|
|
2041
2086
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2042
|
-
"aria-expanded":
|
|
2087
|
+
"aria-expanded": H.value,
|
|
2043
2088
|
disabled: x.value,
|
|
2044
|
-
onClick:
|
|
2045
|
-
}, [c(E(
|
|
2046
|
-
default: O(() => [(v(), n(C(
|
|
2089
|
+
onClick: pe
|
|
2090
|
+
}, [c(E(R), null, {
|
|
2091
|
+
default: O(() => [(v(), n(C(H.value ? E(oe) : E(W))))]),
|
|
2047
2092
|
_: 1
|
|
2048
2093
|
})], 10, Gt)]),
|
|
2049
2094
|
default: O(() => [a("div", Kt, [c(Bt, {
|
|
2050
|
-
group:
|
|
2095
|
+
group: ae.value,
|
|
2051
2096
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2052
2097
|
disabled: x.value,
|
|
2053
2098
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
@@ -2062,31 +2107,31 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2062
2107
|
"popper-class",
|
|
2063
2108
|
"popper-options"
|
|
2064
2109
|
])) : r("", !0),
|
|
2065
|
-
|
|
2110
|
+
z.value && re.value ? (v(), n(E(B), {
|
|
2066
2111
|
key: 2,
|
|
2067
2112
|
trigger: "click",
|
|
2068
2113
|
placement: "bottom-start",
|
|
2069
2114
|
disabled: x.value,
|
|
2070
|
-
"popper-class":
|
|
2071
|
-
"popper-options":
|
|
2072
|
-
onShow: o[4] ||= (e) =>
|
|
2073
|
-
onHide: o[5] ||= (e) =>
|
|
2115
|
+
"popper-class": F.value,
|
|
2116
|
+
"popper-options": I.value,
|
|
2117
|
+
onShow: o[4] ||= (e) => K(!0),
|
|
2118
|
+
onHide: o[5] ||= (e) => K(!1)
|
|
2074
2119
|
}, {
|
|
2075
2120
|
reference: O(() => [a("button", {
|
|
2076
2121
|
ref_key: "overflowTriggerRef",
|
|
2077
|
-
ref:
|
|
2122
|
+
ref: A,
|
|
2078
2123
|
type: "button",
|
|
2079
|
-
class: m(["ml-ribbon-group__overflow-trigger", { "is-open":
|
|
2124
|
+
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": U.value }]),
|
|
2080
2125
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2081
|
-
"aria-expanded":
|
|
2126
|
+
"aria-expanded": U.value,
|
|
2082
2127
|
disabled: x.value,
|
|
2083
|
-
onClick:
|
|
2084
|
-
}, [c(E(
|
|
2085
|
-
default: O(() => [(v(), n(C(
|
|
2128
|
+
onClick: me
|
|
2129
|
+
}, [c(E(R), null, {
|
|
2130
|
+
default: O(() => [(v(), n(C(U.value ? E(oe) : E(W))))]),
|
|
2086
2131
|
_: 1
|
|
2087
2132
|
})], 10, qt)]),
|
|
2088
2133
|
default: O(() => [a("div", Jt, [c(Bt, {
|
|
2089
|
-
group:
|
|
2134
|
+
group: re.value,
|
|
2090
2135
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2091
2136
|
disabled: x.value,
|
|
2092
2137
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
@@ -2101,14 +2146,14 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2101
2146
|
"popper-class",
|
|
2102
2147
|
"popper-options"
|
|
2103
2148
|
])) : r("", !0),
|
|
2104
|
-
e.showLauncherIcon ?? e.launcher ? (v(), n(E(
|
|
2149
|
+
e.showLauncherIcon ?? e.launcher ? (v(), n(E(j), {
|
|
2105
2150
|
key: 3,
|
|
2106
2151
|
link: "",
|
|
2107
2152
|
class: "ml-ribbon-group__launcher",
|
|
2108
2153
|
disabled: x.value
|
|
2109
2154
|
}, {
|
|
2110
|
-
default: O(() => [c(E(
|
|
2111
|
-
default: O(() => [c(E(
|
|
2155
|
+
default: O(() => [c(E(R), null, {
|
|
2156
|
+
default: O(() => [c(E(de))]),
|
|
2112
2157
|
_: 1
|
|
2113
2158
|
})]),
|
|
2114
2159
|
_: 1
|
|
@@ -2211,34 +2256,34 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2211
2256
|
};
|
|
2212
2257
|
})), t;
|
|
2213
2258
|
}
|
|
2214
|
-
function
|
|
2259
|
+
function A(e) {
|
|
2215
2260
|
return {
|
|
2216
2261
|
...e,
|
|
2217
2262
|
icon: f(e.icon),
|
|
2218
2263
|
props: k(e.props)
|
|
2219
2264
|
};
|
|
2220
2265
|
}
|
|
2221
|
-
function
|
|
2266
|
+
function M(e) {
|
|
2222
2267
|
return {
|
|
2223
2268
|
...e,
|
|
2224
2269
|
icon: f(e.icon),
|
|
2225
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
2270
|
+
footerMenuItems: e.footerMenuItems?.map(A),
|
|
2226
2271
|
collections: e.collections?.map((e) => ({
|
|
2227
2272
|
...e,
|
|
2228
|
-
items: e.items?.map(
|
|
2273
|
+
items: e.items?.map(A)
|
|
2229
2274
|
}))
|
|
2230
2275
|
};
|
|
2231
2276
|
}
|
|
2232
|
-
function
|
|
2277
|
+
function ee(e) {
|
|
2233
2278
|
return e.map((e) => ({
|
|
2234
2279
|
...e,
|
|
2235
|
-
groups: e.groups?.map(
|
|
2280
|
+
groups: e.groups?.map(M)
|
|
2236
2281
|
}));
|
|
2237
2282
|
}
|
|
2238
|
-
function
|
|
2283
|
+
function N(e, t) {
|
|
2239
2284
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
2240
2285
|
}
|
|
2241
|
-
let
|
|
2286
|
+
let P = {
|
|
2242
2287
|
layoutSwitcherTooltip: "Switch ribbon layout",
|
|
2243
2288
|
minimizeTooltip: "Minimize ribbon",
|
|
2244
2289
|
keyTipsToggleText: "Key Tips",
|
|
@@ -2252,68 +2297,68 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2252
2297
|
keyTipsSequencePrefix: "Sequence:",
|
|
2253
2298
|
keyTipsEmptySequence: "No key sequence",
|
|
2254
2299
|
galleryPreviewFallback: "Preview unavailable"
|
|
2255
|
-
},
|
|
2256
|
-
y(
|
|
2257
|
-
|
|
2258
|
-
}, { deep: !0 }), D(() =>
|
|
2259
|
-
e !==
|
|
2260
|
-
}), D(() =>
|
|
2300
|
+
}, F = s, I = u, { context: L, visibleTabs: ne } = _e(F.id, F.tabs, F.disabled, F.activeLayout ? String(F.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : F.layout, F.minimized, F.activeTab || F.tabs[0]?.id || "", N(F.tooltipShowAfter, 1e3), N(F.tooltipHideAfter, 0));
|
|
2301
|
+
y(fe, L), D(() => F.tabs, (e) => {
|
|
2302
|
+
L.tabs.value = ee(e), L.tabs.value.some((e) => e.id === L.activeTab.value) || (L.activeTab.value = L.tabs.value[0]?.id || "");
|
|
2303
|
+
}, { deep: !0 }), D(() => F.layout, (e) => {
|
|
2304
|
+
e !== L.layout.value && (L.layout.value = e);
|
|
2305
|
+
}), D(() => F.activeLayout, (e) => {
|
|
2261
2306
|
if (!e) return;
|
|
2262
2307
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
2263
|
-
t !==
|
|
2264
|
-
}), D(() =>
|
|
2265
|
-
e !==
|
|
2266
|
-
}), D(() =>
|
|
2267
|
-
e !==
|
|
2268
|
-
}), D(() =>
|
|
2269
|
-
e && e !==
|
|
2270
|
-
}), D(() =>
|
|
2271
|
-
let t =
|
|
2272
|
-
t !==
|
|
2273
|
-
}), D(() =>
|
|
2274
|
-
let t =
|
|
2275
|
-
t !==
|
|
2276
|
-
}), D(
|
|
2277
|
-
|
|
2278
|
-
}), D(
|
|
2279
|
-
|
|
2280
|
-
}), D(
|
|
2281
|
-
|
|
2282
|
-
}), D(
|
|
2283
|
-
|
|
2284
|
-
}), D(
|
|
2285
|
-
|
|
2308
|
+
t !== L.layout.value && (L.layout.value = t);
|
|
2309
|
+
}), D(() => F.minimized, (e) => {
|
|
2310
|
+
e !== L.minimized.value && (L.minimized.value = e);
|
|
2311
|
+
}), D(() => F.disabled, (e) => {
|
|
2312
|
+
e !== L.disabled.value && (L.disabled.value = e);
|
|
2313
|
+
}), D(() => F.activeTab, (e) => {
|
|
2314
|
+
e && e !== L.activeTab.value && (L.activeTab.value = e);
|
|
2315
|
+
}), D(() => F.tooltipShowAfter, (e) => {
|
|
2316
|
+
let t = N(e, 1e3);
|
|
2317
|
+
t !== L.tooltipShowAfter.value && (L.tooltipShowAfter.value = t);
|
|
2318
|
+
}), D(() => F.tooltipHideAfter, (e) => {
|
|
2319
|
+
let t = N(e, 0);
|
|
2320
|
+
t !== L.tooltipHideAfter.value && (L.tooltipHideAfter.value = t);
|
|
2321
|
+
}), D(L.activeTab, (e) => {
|
|
2322
|
+
I("update:activeTab", e), I("tabChange", e);
|
|
2323
|
+
}), D(L.layout, (e) => {
|
|
2324
|
+
I("update:layout", e), I("layoutChange", e);
|
|
2325
|
+
}), D(L.minimized, (e) => {
|
|
2326
|
+
I("update:minimized", e);
|
|
2327
|
+
}), D(L.overflowOpen, (e) => {
|
|
2328
|
+
I(e ? "overflowOpen" : "overflowClose");
|
|
2329
|
+
}), D(L.backdropOpen, (e) => {
|
|
2330
|
+
I(e ? "backstageOpen" : "backstageClose");
|
|
2286
2331
|
});
|
|
2287
|
-
let
|
|
2332
|
+
let z = t(() => ne.value.find((e) => e.id === L.activeTab.value)), V = t(() => new Set(ne.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), H = t(() => Le(z.value)), W = t(() => z.value?.groups?.filter((e) => e.visible !== !1) ?? []), oe = b(null), ce = b(null), de = b(null), G = b(null), K = b(!1), pe = b(0), me = b({
|
|
2288
2333
|
left: "0px",
|
|
2289
2334
|
top: "0px",
|
|
2290
2335
|
width: "1px",
|
|
2291
2336
|
height: "0px"
|
|
2292
|
-
}),
|
|
2293
|
-
layoutSwitcherTooltip:
|
|
2294
|
-
minimizeTooltip:
|
|
2295
|
-
keyTipsToggleText:
|
|
2296
|
-
overflowTriggerAriaLabel:
|
|
2297
|
-
groupOverflowTriggerAriaLabel:
|
|
2298
|
-
fileMenuLabel:
|
|
2299
|
-
fileMenuOpenBackstageLabel:
|
|
2300
|
-
backstageBackLabel:
|
|
2301
|
-
backstageTitle:
|
|
2302
|
-
backstageDescription:
|
|
2303
|
-
keyTipsSequencePrefix:
|
|
2304
|
-
keyTipsEmptySequence:
|
|
2305
|
-
galleryPreviewFallback:
|
|
2306
|
-
})), X = t(() =>
|
|
2337
|
+
}), q = b(/* @__PURE__ */ new Set()), J = b({}), he = ie("size", ""), ge = t(() => F.size || he.value || "default"), ve = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${ge.value}`), ye = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${ge.value}`), be = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${ge.value}`), Y = t(() => ({
|
|
2338
|
+
layoutSwitcherTooltip: F.texts.layoutSwitcherTooltip || P.layoutSwitcherTooltip,
|
|
2339
|
+
minimizeTooltip: F.texts.minimizeTooltip || P.minimizeTooltip,
|
|
2340
|
+
keyTipsToggleText: F.texts.keyTipsToggleText || P.keyTipsToggleText,
|
|
2341
|
+
overflowTriggerAriaLabel: F.texts.overflowTriggerAriaLabel || P.overflowTriggerAriaLabel,
|
|
2342
|
+
groupOverflowTriggerAriaLabel: F.texts.groupOverflowTriggerAriaLabel || P.groupOverflowTriggerAriaLabel,
|
|
2343
|
+
fileMenuLabel: F.texts.fileMenuLabel || P.fileMenuLabel,
|
|
2344
|
+
fileMenuOpenBackstageLabel: F.texts.fileMenuOpenBackstageLabel || P.fileMenuOpenBackstageLabel,
|
|
2345
|
+
backstageBackLabel: F.texts.backstageBackLabel || P.backstageBackLabel,
|
|
2346
|
+
backstageTitle: F.texts.backstageTitle || P.backstageTitle,
|
|
2347
|
+
backstageDescription: F.texts.backstageDescription || P.backstageDescription,
|
|
2348
|
+
keyTipsSequencePrefix: F.texts.keyTipsSequencePrefix || P.keyTipsSequencePrefix,
|
|
2349
|
+
keyTipsEmptySequence: F.texts.keyTipsEmptySequence || P.keyTipsEmptySequence,
|
|
2350
|
+
galleryPreviewFallback: F.texts.galleryPreviewFallback || P.galleryPreviewFallback
|
|
2351
|
+
})), X = t(() => N(F.tooltipShowAfter, 1e3)), Z = t(() => N(F.tooltipHideAfter, 0)), Q = t(() => L.minimized.value ? se : ae), Se = t(() => W.value.filter((e) => !q.value.has(e.id))), Ce = t(() => W.value.filter((e) => q.value.has(e.id))), we = t(() => {
|
|
2307
2352
|
if (!Ce.value.length) return 220;
|
|
2308
2353
|
let e = Ce.value.reduce((e, t) => {
|
|
2309
|
-
let n =
|
|
2354
|
+
let n = J.value[t.id] ?? ke(t);
|
|
2310
2355
|
return Math.max(e, n);
|
|
2311
2356
|
}, 0), t = Math.ceil(e + 40);
|
|
2312
2357
|
return Math.max(220, Math.min(720, t));
|
|
2313
2358
|
});
|
|
2314
2359
|
function Te(e) {
|
|
2315
2360
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
2316
|
-
...
|
|
2361
|
+
...A(e),
|
|
2317
2362
|
size: "medium"
|
|
2318
2363
|
})));
|
|
2319
2364
|
return {
|
|
@@ -2342,8 +2387,8 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2342
2387
|
}), t;
|
|
2343
2388
|
}
|
|
2344
2389
|
function je() {
|
|
2345
|
-
let e =
|
|
2346
|
-
let n =
|
|
2390
|
+
let e = W.value.reduce((e, t) => {
|
|
2391
|
+
let n = J.value[t.id] ?? ke(t);
|
|
2347
2392
|
return e + Math.max(n, ke(t));
|
|
2348
2393
|
}, 0);
|
|
2349
2394
|
return Math.max(220, e);
|
|
@@ -2353,20 +2398,20 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2353
2398
|
return Number.isFinite(t) && t > 0 ? t : yn;
|
|
2354
2399
|
}
|
|
2355
2400
|
function Ne() {
|
|
2356
|
-
if (
|
|
2357
|
-
|
|
2401
|
+
if (L.layout.value !== "classic") {
|
|
2402
|
+
q.value = /* @__PURE__ */ new Set();
|
|
2358
2403
|
return;
|
|
2359
2404
|
}
|
|
2360
|
-
let e =
|
|
2405
|
+
let e = L.minimized.value ? G.value : de.value;
|
|
2361
2406
|
if (!e) return;
|
|
2362
|
-
let t =
|
|
2407
|
+
let t = W.value;
|
|
2363
2408
|
if (!t.length) {
|
|
2364
|
-
|
|
2409
|
+
q.value = /* @__PURE__ */ new Set();
|
|
2365
2410
|
return;
|
|
2366
2411
|
}
|
|
2367
2412
|
let n = Math.round(e.getBoundingClientRect().width), r = Me(e), i = Ae(e);
|
|
2368
|
-
|
|
2369
|
-
...
|
|
2413
|
+
J.value = {
|
|
2414
|
+
...J.value,
|
|
2370
2415
|
...i
|
|
2371
2416
|
};
|
|
2372
2417
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
@@ -2380,28 +2425,28 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2380
2425
|
let e = c[p].group;
|
|
2381
2426
|
s.add(e.id), p += 1;
|
|
2382
2427
|
}
|
|
2383
|
-
|
|
2428
|
+
q.value = s;
|
|
2384
2429
|
}
|
|
2385
2430
|
function Pe() {
|
|
2386
2431
|
p(() => {
|
|
2387
|
-
if (
|
|
2432
|
+
if (L.layout.value !== "classic" || L.minimized.value) {
|
|
2388
2433
|
Ne();
|
|
2389
2434
|
return;
|
|
2390
2435
|
}
|
|
2391
|
-
if (
|
|
2436
|
+
if (q.value.size === 0) {
|
|
2392
2437
|
Ne();
|
|
2393
2438
|
return;
|
|
2394
2439
|
}
|
|
2395
|
-
|
|
2440
|
+
q.value = /* @__PURE__ */ new Set(), p(() => {
|
|
2396
2441
|
Ne();
|
|
2397
2442
|
});
|
|
2398
2443
|
});
|
|
2399
2444
|
}
|
|
2400
2445
|
function Fe() {
|
|
2401
|
-
let e =
|
|
2446
|
+
let e = oe.value, t = ce.value;
|
|
2402
2447
|
if (!e || !t) return;
|
|
2403
2448
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = Number.parseFloat(getComputedStyle(e).borderLeftWidth || "0") || 0, a = Math.max(n.width - i * 2, e.clientWidth, r.width, t.clientWidth);
|
|
2404
|
-
|
|
2449
|
+
pe.value = Math.round(a > 0 ? a : L.layout.value === "classic" ? je() : Math.max(360, W.value.length * 120)), me.value = {
|
|
2405
2450
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
2406
2451
|
top: "0px",
|
|
2407
2452
|
width: "1px",
|
|
@@ -2409,41 +2454,41 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2409
2454
|
};
|
|
2410
2455
|
}
|
|
2411
2456
|
function Ie() {
|
|
2412
|
-
|
|
2457
|
+
K.value = !1;
|
|
2413
2458
|
}
|
|
2414
2459
|
function Le(e) {
|
|
2415
|
-
return
|
|
2460
|
+
return L.disabled.value ? !0 : !e || V.value.size === 0 ? !1 : !V.value.has(e.id);
|
|
2416
2461
|
}
|
|
2417
2462
|
function Re(e) {
|
|
2418
|
-
if (
|
|
2419
|
-
let t =
|
|
2420
|
-
if (
|
|
2463
|
+
if (L.disabled.value) return;
|
|
2464
|
+
let t = L.activeTab.value === e.id;
|
|
2465
|
+
if (L.activeTab.value = e.id, !L.minimized.value) {
|
|
2421
2466
|
Ie();
|
|
2422
2467
|
return;
|
|
2423
2468
|
}
|
|
2424
|
-
Fe(),
|
|
2469
|
+
Fe(), K.value = t ? !K.value : !0;
|
|
2425
2470
|
}
|
|
2426
2471
|
function ze() {
|
|
2427
|
-
|
|
2472
|
+
L.disabled.value || L.api.toggleSimplified();
|
|
2428
2473
|
}
|
|
2429
2474
|
function Be() {
|
|
2430
|
-
|
|
2475
|
+
L.disabled.value || (L.minimized.value || Ie(), L.minimized.value = !L.minimized.value);
|
|
2431
2476
|
}
|
|
2432
2477
|
function Ve(e) {
|
|
2433
|
-
|
|
2478
|
+
L.disabled.value || (Ie(), I("fileMenuSelect", e));
|
|
2434
2479
|
}
|
|
2435
2480
|
function He() {
|
|
2436
|
-
|
|
2481
|
+
L.disabled.value || (Ie(), L.backdropOpen.value = !0);
|
|
2437
2482
|
}
|
|
2438
2483
|
function Ue() {
|
|
2439
|
-
|
|
2484
|
+
L.disabled.value || (L.backdropOpen.value = !1);
|
|
2440
2485
|
}
|
|
2441
2486
|
function We(e, t) {
|
|
2442
|
-
|
|
2443
|
-
tabId:
|
|
2487
|
+
H.value || (I("itemClick", {
|
|
2488
|
+
tabId: L.activeTab.value,
|
|
2444
2489
|
groupId: e,
|
|
2445
2490
|
itemId: t
|
|
2446
|
-
}),
|
|
2491
|
+
}), L.minimized.value && Ie());
|
|
2447
2492
|
}
|
|
2448
2493
|
function Ge(e) {
|
|
2449
2494
|
if (!(e instanceof HTMLElement)) return !1;
|
|
@@ -2452,13 +2497,13 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2452
2497
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
2453
2498
|
}
|
|
2454
2499
|
function Ke() {
|
|
2455
|
-
if (
|
|
2456
|
-
|
|
2500
|
+
if (H.value) {
|
|
2501
|
+
L.keyTips.value = [];
|
|
2457
2502
|
return;
|
|
2458
2503
|
}
|
|
2459
|
-
let e =
|
|
2504
|
+
let e = z.value;
|
|
2460
2505
|
if (!e?.groups?.length) {
|
|
2461
|
-
|
|
2506
|
+
L.keyTips.value = [];
|
|
2462
2507
|
return;
|
|
2463
2508
|
}
|
|
2464
2509
|
let t = e.groups.filter((e) => e.visible !== !1).flatMap((t) => (t.collections ?? []).flatMap((n) => n.items.filter((e) => e.keyTip && e.disabled !== !0).map((n) => {
|
|
@@ -2471,87 +2516,87 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2471
2516
|
scope: "item"
|
|
2472
2517
|
} : null;
|
|
2473
2518
|
}).filter((e) => !!e)));
|
|
2474
|
-
|
|
2519
|
+
L.keyTips.value = t;
|
|
2475
2520
|
}
|
|
2476
2521
|
function qe(e) {
|
|
2477
|
-
if (
|
|
2478
|
-
let t =
|
|
2522
|
+
if (L.disabled.value) return;
|
|
2523
|
+
let t = z.value;
|
|
2479
2524
|
if (t?.groups?.length) {
|
|
2480
2525
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
2481
2526
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
2482
2527
|
if (r) {
|
|
2483
|
-
We(n.id, r.id),
|
|
2528
|
+
We(n.id, r.id), L.keyTipsOpen.value = !1, L.keyTipsSequence.value = "";
|
|
2484
2529
|
return;
|
|
2485
2530
|
}
|
|
2486
2531
|
}
|
|
2487
2532
|
}
|
|
2488
2533
|
}
|
|
2489
2534
|
function Je() {
|
|
2490
|
-
|
|
2535
|
+
L.keyTipsSequence.value = "";
|
|
2491
2536
|
}
|
|
2492
2537
|
function Ye(e) {
|
|
2493
|
-
if (!
|
|
2538
|
+
if (!L.disabled.value && !Ge(e.target)) {
|
|
2494
2539
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
2495
|
-
e.preventDefault(),
|
|
2540
|
+
e.preventDefault(), L.keyTipsOpen.value = !L.keyTipsOpen.value, L.keyTipsOpen.value || Je();
|
|
2496
2541
|
return;
|
|
2497
2542
|
}
|
|
2498
|
-
if (
|
|
2543
|
+
if (L.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
2499
2544
|
if (e.key === "Escape") {
|
|
2500
|
-
e.preventDefault(),
|
|
2545
|
+
e.preventDefault(), L.keyTipsOpen.value = !1, Je();
|
|
2501
2546
|
return;
|
|
2502
2547
|
}
|
|
2503
2548
|
if (e.key === "Backspace") {
|
|
2504
|
-
e.preventDefault(),
|
|
2549
|
+
e.preventDefault(), L.keyTipsSequence.value = L.keyTipsSequence.value.slice(0, -1);
|
|
2505
2550
|
return;
|
|
2506
2551
|
}
|
|
2507
2552
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
2508
2553
|
e.preventDefault();
|
|
2509
|
-
let t = `${
|
|
2510
|
-
|
|
2511
|
-
let n = t.toLowerCase(), r =
|
|
2554
|
+
let t = `${L.keyTipsSequence.value}${e.key.toUpperCase()}`;
|
|
2555
|
+
L.keyTipsSequence.value = t;
|
|
2556
|
+
let n = t.toLowerCase(), r = L.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
2512
2557
|
if (r) {
|
|
2513
2558
|
qe(r);
|
|
2514
2559
|
return;
|
|
2515
2560
|
}
|
|
2516
|
-
|
|
2561
|
+
L.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Je();
|
|
2517
2562
|
}
|
|
2518
2563
|
}
|
|
2519
2564
|
}
|
|
2520
2565
|
}
|
|
2521
2566
|
function Xe(e) {
|
|
2522
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
2567
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? le : null;
|
|
2523
2568
|
}
|
|
2524
2569
|
function Ze(e) {
|
|
2525
|
-
|
|
2570
|
+
K.value = e;
|
|
2526
2571
|
}
|
|
2527
2572
|
D([
|
|
2528
|
-
|
|
2529
|
-
() =>
|
|
2530
|
-
() =>
|
|
2573
|
+
W,
|
|
2574
|
+
() => L.layout.value,
|
|
2575
|
+
() => L.minimized.value
|
|
2531
2576
|
], () => {
|
|
2532
2577
|
Pe();
|
|
2533
2578
|
}), D([
|
|
2534
|
-
|
|
2535
|
-
() =>
|
|
2536
|
-
() =>
|
|
2579
|
+
z,
|
|
2580
|
+
() => L.tabs.value,
|
|
2581
|
+
() => L.disabled.value
|
|
2537
2582
|
], () => {
|
|
2538
2583
|
Ke(), Je();
|
|
2539
2584
|
}, {
|
|
2540
2585
|
deep: !0,
|
|
2541
2586
|
immediate: !0
|
|
2542
|
-
}), D(() =>
|
|
2587
|
+
}), D(() => L.keyTipsOpen.value, (e) => {
|
|
2543
2588
|
e || Je();
|
|
2544
|
-
}), D(() =>
|
|
2545
|
-
e && (
|
|
2589
|
+
}), D(() => L.disabled.value, (e) => {
|
|
2590
|
+
e && (L.overflowOpen.value = !1, L.backdropOpen.value = !1, L.keyTipsOpen.value = !1, Ie(), Je());
|
|
2546
2591
|
}), D([
|
|
2547
|
-
() =>
|
|
2548
|
-
() =>
|
|
2549
|
-
|
|
2592
|
+
() => L.minimized.value,
|
|
2593
|
+
() => L.layout.value,
|
|
2594
|
+
z
|
|
2550
2595
|
], ([e, , t]) => {
|
|
2551
2596
|
(!e || !t) && Ie();
|
|
2552
|
-
}), D([
|
|
2597
|
+
}), D([de, G], ([e, t], [n, r]) => {
|
|
2553
2598
|
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Pe();
|
|
2554
|
-
}, { flush: "post" }), D(
|
|
2599
|
+
}, { flush: "post" }), D(K, (e) => {
|
|
2555
2600
|
e && p(() => {
|
|
2556
2601
|
Fe(), Pe();
|
|
2557
2602
|
});
|
|
@@ -2560,40 +2605,40 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2560
2605
|
g(() => {
|
|
2561
2606
|
window.addEventListener("keydown", Ye), window.addEventListener("resize", Qe), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
2562
2607
|
Fe(), Pe();
|
|
2563
|
-
}),
|
|
2608
|
+
}), de.value && $.observe(de.value), G.value && $.observe(G.value)), Fe(), Pe();
|
|
2564
2609
|
}), _(() => {
|
|
2565
2610
|
window.removeEventListener("keydown", Ye), window.removeEventListener("resize", Qe), $?.disconnect();
|
|
2566
2611
|
});
|
|
2567
2612
|
function Qe() {
|
|
2568
|
-
|
|
2613
|
+
K.value && Fe();
|
|
2569
2614
|
}
|
|
2570
|
-
return l(
|
|
2615
|
+
return l(L.api), (t, l) => (v(), n(E(te), { size: F.size }, {
|
|
2571
2616
|
default: O(() => [(v(), i("section", {
|
|
2572
2617
|
ref_key: "ribbonRootRef",
|
|
2573
|
-
ref:
|
|
2574
|
-
key: E(
|
|
2618
|
+
ref: oe,
|
|
2619
|
+
key: E(L).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
2575
2620
|
class: m(["ml-ribbon", [
|
|
2576
|
-
`ml-ribbon--${E(
|
|
2577
|
-
`ml-ribbon--size-${
|
|
2621
|
+
`ml-ribbon--${E(L).layout.value}`,
|
|
2622
|
+
`ml-ribbon--size-${ge.value}`,
|
|
2578
2623
|
{
|
|
2579
|
-
"ml-ribbon--disabled": E(
|
|
2580
|
-
"ml-ribbon--minimized": E(
|
|
2581
|
-
"ml-ribbon--keytips-open": E(
|
|
2624
|
+
"ml-ribbon--disabled": E(L).disabled.value,
|
|
2625
|
+
"ml-ribbon--minimized": E(L).minimized.value,
|
|
2626
|
+
"ml-ribbon--keytips-open": E(L).keyTipsOpen.value
|
|
2582
2627
|
}
|
|
2583
2628
|
]]),
|
|
2584
|
-
inert: E(
|
|
2585
|
-
"aria-disabled": E(
|
|
2629
|
+
inert: E(L).disabled.value,
|
|
2630
|
+
"aria-disabled": E(L).disabled.value
|
|
2586
2631
|
}, [
|
|
2587
2632
|
a("header", {
|
|
2588
2633
|
ref_key: "ribbonHeaderRef",
|
|
2589
|
-
ref:
|
|
2634
|
+
ref: ce,
|
|
2590
2635
|
class: "ml-ribbon__header"
|
|
2591
2636
|
}, [
|
|
2592
2637
|
a("div", Zt, [
|
|
2593
2638
|
s.showFileMenu ? (v(), n(Oe, {
|
|
2594
2639
|
key: 0,
|
|
2595
2640
|
items: s.fileMenuItems,
|
|
2596
|
-
disabled: E(
|
|
2641
|
+
disabled: E(L).disabled.value,
|
|
2597
2642
|
label: Y.value.fileMenuLabel,
|
|
2598
2643
|
"open-backstage-label": Y.value.fileMenuOpenBackstageLabel,
|
|
2599
2644
|
"show-open-backstage": s.showOpenBackstage,
|
|
@@ -2607,29 +2652,29 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2607
2652
|
"show-open-backstage"
|
|
2608
2653
|
])) : r("", !0),
|
|
2609
2654
|
c(Ee, {
|
|
2610
|
-
tabs: E(
|
|
2611
|
-
"active-tab": E(
|
|
2612
|
-
disabled: E(
|
|
2655
|
+
tabs: E(ne),
|
|
2656
|
+
"active-tab": E(L).activeTab.value,
|
|
2657
|
+
disabled: E(L).disabled.value,
|
|
2613
2658
|
onSelect: Re
|
|
2614
2659
|
}, null, 8, [
|
|
2615
2660
|
"tabs",
|
|
2616
2661
|
"active-tab",
|
|
2617
2662
|
"disabled"
|
|
2618
2663
|
]),
|
|
2619
|
-
|
|
2664
|
+
F.hideMinimizeButton ? r("", !0) : (v(), n(E(re), {
|
|
2620
2665
|
key: 1,
|
|
2621
2666
|
content: Y.value.minimizeTooltip,
|
|
2622
2667
|
"show-after": X.value,
|
|
2623
2668
|
"hide-after": Z.value
|
|
2624
2669
|
}, {
|
|
2625
|
-
default: O(() => [c(E(
|
|
2670
|
+
default: O(() => [c(E(j), {
|
|
2626
2671
|
class: m([
|
|
2627
2672
|
"ml-ribbon__control",
|
|
2628
2673
|
"ml-ribbon__control--minimize",
|
|
2629
|
-
E(
|
|
2674
|
+
E(L).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
2630
2675
|
]),
|
|
2631
2676
|
icon: Q.value,
|
|
2632
|
-
disabled: E(
|
|
2677
|
+
disabled: E(L).disabled.value,
|
|
2633
2678
|
onClick: Be
|
|
2634
2679
|
}, null, 8, [
|
|
2635
2680
|
"class",
|
|
@@ -2644,17 +2689,17 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2644
2689
|
]))
|
|
2645
2690
|
]),
|
|
2646
2691
|
a("div", Qt, [
|
|
2647
|
-
|
|
2692
|
+
F.hideLayoutSwitcher ? r("", !0) : (v(), n(E(re), {
|
|
2648
2693
|
key: 0,
|
|
2649
2694
|
content: Y.value.layoutSwitcherTooltip,
|
|
2650
2695
|
"show-after": X.value,
|
|
2651
2696
|
"hide-after": Z.value
|
|
2652
2697
|
}, {
|
|
2653
|
-
default: O(() => [c(E(
|
|
2698
|
+
default: O(() => [c(E(j), {
|
|
2654
2699
|
circle: "",
|
|
2655
2700
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
2656
|
-
icon: E(
|
|
2657
|
-
disabled: E(
|
|
2701
|
+
icon: E(ue),
|
|
2702
|
+
disabled: E(L).disabled.value,
|
|
2658
2703
|
onClick: ze
|
|
2659
2704
|
}, null, 8, ["icon", "disabled"])]),
|
|
2660
2705
|
_: 1
|
|
@@ -2663,15 +2708,15 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2663
2708
|
"show-after",
|
|
2664
2709
|
"hide-after"
|
|
2665
2710
|
])),
|
|
2666
|
-
|
|
2711
|
+
F.hideKeyTipsToggle ? r("", !0) : (v(), n(E(U), {
|
|
2667
2712
|
key: 1,
|
|
2668
2713
|
"inline-prompt": "",
|
|
2669
2714
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
2670
2715
|
"active-text": Y.value.keyTipsToggleText,
|
|
2671
2716
|
"inactive-text": Y.value.keyTipsToggleText,
|
|
2672
|
-
"model-value": E(
|
|
2673
|
-
disabled: E(
|
|
2674
|
-
onChange: l[0] ||= (e) => E(
|
|
2717
|
+
"model-value": E(L).keyTipsOpen.value,
|
|
2718
|
+
disabled: E(L).disabled.value,
|
|
2719
|
+
onChange: l[0] ||= (e) => E(L).keyTipsOpen.value = !E(L).keyTipsOpen.value
|
|
2675
2720
|
}, null, 8, [
|
|
2676
2721
|
"active-text",
|
|
2677
2722
|
"inactive-text",
|
|
@@ -2679,18 +2724,18 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2679
2724
|
"disabled"
|
|
2680
2725
|
])),
|
|
2681
2726
|
t.$slots["tabs-extra"] ? (v(), i("div", $t, [S(t.$slots, "tabs-extra", {
|
|
2682
|
-
activeTab: E(
|
|
2683
|
-
layout: E(
|
|
2684
|
-
minimized: E(
|
|
2685
|
-
disabled: E(
|
|
2727
|
+
activeTab: E(L).activeTab.value,
|
|
2728
|
+
layout: E(L).layout.value,
|
|
2729
|
+
minimized: E(L).minimized.value,
|
|
2730
|
+
disabled: E(L).disabled.value
|
|
2686
2731
|
})])) : r("", !0)
|
|
2687
2732
|
]),
|
|
2688
|
-
|
|
2733
|
+
z.value ? (v(), n(E(B), {
|
|
2689
2734
|
key: 0,
|
|
2690
2735
|
placement: "bottom-start",
|
|
2691
|
-
visible:
|
|
2692
|
-
width:
|
|
2693
|
-
disabled: E(
|
|
2736
|
+
visible: K.value,
|
|
2737
|
+
width: pe.value || void 0,
|
|
2738
|
+
disabled: E(L).disabled.value || !E(L).minimized.value,
|
|
2694
2739
|
"show-arrow": !1,
|
|
2695
2740
|
offset: 0,
|
|
2696
2741
|
"popper-class": be.value,
|
|
@@ -2699,14 +2744,14 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2699
2744
|
reference: O(() => [a("span", {
|
|
2700
2745
|
"aria-hidden": "true",
|
|
2701
2746
|
class: "ml-ribbon__minimized-anchor",
|
|
2702
|
-
style: h(
|
|
2747
|
+
style: h(me.value)
|
|
2703
2748
|
}, null, 4)]),
|
|
2704
|
-
default: O(() => [E(
|
|
2749
|
+
default: O(() => [E(L).layout.value === "classic" ? (v(), i("main", {
|
|
2705
2750
|
key: 0,
|
|
2706
2751
|
ref_key: "minimizedClassicPanelRef",
|
|
2707
|
-
ref:
|
|
2752
|
+
ref: G,
|
|
2708
2753
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
2709
|
-
"data-active-tab":
|
|
2754
|
+
"data-active-tab": z.value.id
|
|
2710
2755
|
}, [(v(!0), i(e, null, x(Se.value, (e) => (v(), n(Yt, {
|
|
2711
2756
|
id: e.id,
|
|
2712
2757
|
key: e.id,
|
|
@@ -2722,13 +2767,13 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2722
2767
|
"group-model": e,
|
|
2723
2768
|
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
2724
2769
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2725
|
-
disabled:
|
|
2770
|
+
disabled: H.value,
|
|
2726
2771
|
onItemClick: l[2] ||= (e) => We(e.groupId, e.itemId)
|
|
2727
2772
|
}, {
|
|
2728
2773
|
default: O(() => [c(Bt, {
|
|
2729
2774
|
group: e,
|
|
2730
2775
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2731
|
-
disabled:
|
|
2776
|
+
disabled: H.value,
|
|
2732
2777
|
onItemClick: l[1] ||= (e) => We(e.groupId, e.itemId)
|
|
2733
2778
|
}, null, 8, [
|
|
2734
2779
|
"group",
|
|
@@ -2751,21 +2796,21 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2751
2796
|
"overflow-trigger-aria-label",
|
|
2752
2797
|
"gallery-preview-fallback",
|
|
2753
2798
|
"disabled"
|
|
2754
|
-
]))), 128)), Ce.value.length ? (v(), i("section", tn, [a("div", nn, [c(E(
|
|
2799
|
+
]))), 128)), Ce.value.length ? (v(), i("section", tn, [a("div", nn, [c(E(B), {
|
|
2755
2800
|
trigger: "click",
|
|
2756
2801
|
placement: "bottom-end",
|
|
2757
2802
|
width: we.value,
|
|
2758
|
-
disabled:
|
|
2803
|
+
disabled: H.value,
|
|
2759
2804
|
"show-arrow": !1,
|
|
2760
2805
|
"popper-class": ye.value,
|
|
2761
|
-
onShow: l[4] ||= (e) => E(
|
|
2762
|
-
onHide: l[5] ||= (e) => E(
|
|
2806
|
+
onShow: l[4] ||= (e) => E(L).overflowOpen.value = !0,
|
|
2807
|
+
onHide: l[5] ||= (e) => E(L).overflowOpen.value = !1
|
|
2763
2808
|
}, {
|
|
2764
2809
|
reference: O(() => [a("button", {
|
|
2765
2810
|
type: "button",
|
|
2766
2811
|
class: "ml-ribbon-overflow-trigger",
|
|
2767
2812
|
"aria-label": Y.value.overflowTriggerAriaLabel,
|
|
2768
|
-
disabled:
|
|
2813
|
+
disabled: H.value
|
|
2769
2814
|
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, rn)]),
|
|
2770
2815
|
default: O(() => [a("div", an, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), i("section", {
|
|
2771
2816
|
key: e.id,
|
|
@@ -2773,7 +2818,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2773
2818
|
}, [a("header", on, w(e.title), 1), c(Bt, {
|
|
2774
2819
|
group: e,
|
|
2775
2820
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2776
|
-
disabled:
|
|
2821
|
+
disabled: H.value,
|
|
2777
2822
|
onItemClick: l[3] ||= (e) => We(e.groupId, e.itemId)
|
|
2778
2823
|
}, null, 8, [
|
|
2779
2824
|
"group",
|
|
@@ -2788,21 +2833,21 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2788
2833
|
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, en)) : (v(), i("main", {
|
|
2789
2834
|
key: 1,
|
|
2790
2835
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
2791
|
-
"data-active-tab":
|
|
2792
|
-
}, [(v(!0), i(e, null, x(
|
|
2836
|
+
"data-active-tab": z.value.id
|
|
2837
|
+
}, [(v(!0), i(e, null, x(W.value, (e) => (v(), n(E(B), {
|
|
2793
2838
|
key: e.id,
|
|
2794
2839
|
trigger: "click",
|
|
2795
2840
|
placement: "bottom-start",
|
|
2796
2841
|
width: 340,
|
|
2797
|
-
disabled:
|
|
2842
|
+
disabled: H.value,
|
|
2798
2843
|
"show-arrow": !1,
|
|
2799
2844
|
"popper-class": ve.value
|
|
2800
2845
|
}, {
|
|
2801
2846
|
reference: O(() => [a("button", {
|
|
2802
2847
|
class: "ml-ribbon-simplified-group",
|
|
2803
2848
|
type: "button",
|
|
2804
|
-
disabled:
|
|
2805
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2849
|
+
disabled: H.value
|
|
2850
|
+
}, [Xe(e) ? (v(), n(E(R), {
|
|
2806
2851
|
key: 0,
|
|
2807
2852
|
class: "ml-ribbon-simplified-group__icon"
|
|
2808
2853
|
}, {
|
|
@@ -2812,7 +2857,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2812
2857
|
default: O(() => [a("div", ln, [c(Bt, {
|
|
2813
2858
|
group: Te(e),
|
|
2814
2859
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2815
|
-
disabled:
|
|
2860
|
+
disabled: H.value,
|
|
2816
2861
|
onItemClick: l[6] ||= (e) => We(e.groupId, e.itemId)
|
|
2817
2862
|
}, null, 8, [
|
|
2818
2863
|
"group",
|
|
@@ -2829,12 +2874,12 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2829
2874
|
"popper-class"
|
|
2830
2875
|
])) : r("", !0)
|
|
2831
2876
|
], 512),
|
|
2832
|
-
!E(
|
|
2877
|
+
!E(L).minimized.value && z.value && E(L).layout.value === "classic" ? (v(), i("main", {
|
|
2833
2878
|
key: 0,
|
|
2834
2879
|
class: "ml-ribbon__panel",
|
|
2835
|
-
"data-active-tab":
|
|
2880
|
+
"data-active-tab": z.value.id,
|
|
2836
2881
|
ref_key: "classicPanelRef",
|
|
2837
|
-
ref:
|
|
2882
|
+
ref: de
|
|
2838
2883
|
}, [(v(!0), i(e, null, x(Se.value, (e) => (v(), n(Yt, {
|
|
2839
2884
|
id: e.id,
|
|
2840
2885
|
key: e.id,
|
|
@@ -2850,13 +2895,13 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2850
2895
|
"group-model": e,
|
|
2851
2896
|
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
2852
2897
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2853
|
-
disabled:
|
|
2898
|
+
disabled: H.value,
|
|
2854
2899
|
onItemClick: l[8] ||= (e) => We(e.groupId, e.itemId)
|
|
2855
2900
|
}, {
|
|
2856
2901
|
default: O(() => [c(Bt, {
|
|
2857
2902
|
group: e,
|
|
2858
2903
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2859
|
-
disabled:
|
|
2904
|
+
disabled: H.value,
|
|
2860
2905
|
onItemClick: l[7] ||= (e) => We(e.groupId, e.itemId)
|
|
2861
2906
|
}, null, 8, [
|
|
2862
2907
|
"group",
|
|
@@ -2879,20 +2924,20 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2879
2924
|
"overflow-trigger-aria-label",
|
|
2880
2925
|
"gallery-preview-fallback",
|
|
2881
2926
|
"disabled"
|
|
2882
|
-
]))), 128)), Ce.value.length ? (v(), i("section", dn, [a("div", fn, [c(E(
|
|
2927
|
+
]))), 128)), Ce.value.length ? (v(), i("section", dn, [a("div", fn, [c(E(B), {
|
|
2883
2928
|
trigger: "click",
|
|
2884
2929
|
placement: "bottom-end",
|
|
2885
2930
|
width: we.value,
|
|
2886
|
-
disabled:
|
|
2931
|
+
disabled: H.value,
|
|
2887
2932
|
"popper-class": ye.value,
|
|
2888
|
-
onShow: l[10] ||= (e) => E(
|
|
2889
|
-
onHide: l[11] ||= (e) => E(
|
|
2933
|
+
onShow: l[10] ||= (e) => E(L).overflowOpen.value = !0,
|
|
2934
|
+
onHide: l[11] ||= (e) => E(L).overflowOpen.value = !1
|
|
2890
2935
|
}, {
|
|
2891
2936
|
reference: O(() => [a("button", {
|
|
2892
2937
|
type: "button",
|
|
2893
2938
|
class: "ml-ribbon-overflow-trigger",
|
|
2894
2939
|
"aria-label": Y.value.overflowTriggerAriaLabel,
|
|
2895
|
-
disabled:
|
|
2940
|
+
disabled: H.value
|
|
2896
2941
|
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, pn)]),
|
|
2897
2942
|
default: O(() => [a("div", mn, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), i("section", {
|
|
2898
2943
|
key: e.id,
|
|
@@ -2900,7 +2945,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2900
2945
|
}, [a("header", hn, w(e.title), 1), c(Bt, {
|
|
2901
2946
|
group: e,
|
|
2902
2947
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2903
|
-
disabled:
|
|
2948
|
+
disabled: H.value,
|
|
2904
2949
|
onItemClick: l[9] ||= (e) => We(e.groupId, e.itemId)
|
|
2905
2950
|
}, null, 8, [
|
|
2906
2951
|
"group",
|
|
@@ -2913,23 +2958,23 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2913
2958
|
"disabled",
|
|
2914
2959
|
"popper-class"
|
|
2915
2960
|
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, un)) : r("", !0),
|
|
2916
|
-
!E(
|
|
2961
|
+
!E(L).minimized.value && z.value && E(L).layout.value === "simplified" ? (v(), i("main", {
|
|
2917
2962
|
key: 1,
|
|
2918
2963
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
2919
|
-
"data-active-tab":
|
|
2920
|
-
}, [(v(!0), i(e, null, x(
|
|
2964
|
+
"data-active-tab": z.value.id
|
|
2965
|
+
}, [(v(!0), i(e, null, x(W.value, (e) => (v(), n(E(B), {
|
|
2921
2966
|
key: e.id,
|
|
2922
2967
|
trigger: "click",
|
|
2923
2968
|
placement: "bottom-start",
|
|
2924
2969
|
width: 340,
|
|
2925
|
-
disabled:
|
|
2970
|
+
disabled: H.value,
|
|
2926
2971
|
"popper-class": ve.value
|
|
2927
2972
|
}, {
|
|
2928
2973
|
reference: O(() => [a("button", {
|
|
2929
2974
|
class: "ml-ribbon-simplified-group",
|
|
2930
2975
|
type: "button",
|
|
2931
|
-
disabled:
|
|
2932
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2976
|
+
disabled: H.value
|
|
2977
|
+
}, [Xe(e) ? (v(), n(E(R), {
|
|
2933
2978
|
key: 0,
|
|
2934
2979
|
class: "ml-ribbon-simplified-group__icon"
|
|
2935
2980
|
}, {
|
|
@@ -2939,7 +2984,7 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2939
2984
|
default: O(() => [a("div", vn, [c(Bt, {
|
|
2940
2985
|
group: Te(e),
|
|
2941
2986
|
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2942
|
-
disabled:
|
|
2987
|
+
disabled: H.value,
|
|
2943
2988
|
onItemClick: l[12] ||= (e) => We(e.groupId, e.itemId)
|
|
2944
2989
|
}, null, 8, [
|
|
2945
2990
|
"group",
|
|
@@ -2949,8 +2994,8 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2949
2994
|
_: 2
|
|
2950
2995
|
}, 1032, ["disabled", "popper-class"]))), 128))], 8, gn)) : r("", !0),
|
|
2951
2996
|
c(xe, {
|
|
2952
|
-
open: E(
|
|
2953
|
-
size:
|
|
2997
|
+
open: E(L).backdropOpen.value,
|
|
2998
|
+
size: ge.value,
|
|
2954
2999
|
"back-label": Y.value.backstageBackLabel,
|
|
2955
3000
|
title: Y.value.backstageTitle,
|
|
2956
3001
|
description: Y.value.backstageDescription,
|
|
@@ -2959,12 +3004,12 @@ var ve = { class: "ml-ribbon-backstage__nav" }, ye = { class: "ml-ribbon-backsta
|
|
|
2959
3004
|
name: "default",
|
|
2960
3005
|
fn: O(() => [S(t.$slots, "backstage", {
|
|
2961
3006
|
close: Ue,
|
|
2962
|
-
open: E(
|
|
2963
|
-
size:
|
|
3007
|
+
open: E(L).backdropOpen.value,
|
|
3008
|
+
size: ge.value,
|
|
2964
3009
|
backLabel: Y.value.backstageBackLabel,
|
|
2965
3010
|
title: Y.value.backstageTitle,
|
|
2966
3011
|
description: Y.value.backstageDescription,
|
|
2967
|
-
disabled: E(
|
|
3012
|
+
disabled: E(L).disabled.value
|
|
2968
3013
|
})]),
|
|
2969
3014
|
key: "0"
|
|
2970
3015
|
} : void 0]), 1032, [
|