@mlightcad/ribbon 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +403 -344
- package/dist/ml-ribbon.umd.js +1 -1
- package/package.json +2 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
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, nextTick as f, normalizeClass as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, provide as v, ref as y, renderList as b, renderSlot as x, resolveDynamicComponent as S, toDisplayString as C, toRaw as w, unref as T, watch as E, withCtx as D } from "vue";
|
|
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, nextTick as f, normalizeClass as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, provide as v, ref as y, renderList as b, renderSlot as x, resolveDynamicComponent as S, toDisplayString as C, toRaw as w, unref as T, watch as E, withCtx as D, withModifiers as O } from "vue";
|
|
2
|
+
import { ElButton as k, ElButtonGroup as A, ElCheckbox as ee, ElColorPicker as te, ElConfigProvider as ne, ElDrawer as j, ElDropdown as M, ElDropdownItem as N, ElDropdownMenu as P, ElIcon as F, ElOption as I, ElPopover as re, ElSelect as L, ElSwitch as ie, ElTooltip as R, useGlobalConfig as ae } from "element-plus";
|
|
3
|
+
import { ArrowDown as z, ArrowDownBold as oe, ArrowUp as B, ArrowUpBold as V, Grid as se, Menu as H, Promotion as U } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
|
-
var
|
|
5
|
+
var ce = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/ribbon/composables/useRibbonState.ts
|
|
8
|
-
function
|
|
8
|
+
function W(e) {
|
|
9
9
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(w(e)) : e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function G(e) {
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = { ...e };
|
|
14
|
-
return "icon" in t && (t.icon =
|
|
14
|
+
return "icon" in t && (t.icon = W(t.icon)), 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: W(t.icon)
|
|
20
20
|
} : t;
|
|
21
21
|
})), t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function K(e) {
|
|
24
24
|
return {
|
|
25
25
|
...e,
|
|
26
|
-
icon:
|
|
27
|
-
props:
|
|
26
|
+
icon: W(e.icon),
|
|
27
|
+
props: G(e.props)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
function q(e) {
|
|
31
31
|
return {
|
|
32
32
|
...e,
|
|
33
|
-
icon:
|
|
34
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
33
|
+
icon: W(e.icon),
|
|
34
|
+
footerMenuItems: e.footerMenuItems?.map(K),
|
|
35
35
|
collections: e.collections?.map((e) => ({
|
|
36
36
|
...e,
|
|
37
|
-
items: e.items.map(
|
|
37
|
+
items: e.items.map(K)
|
|
38
38
|
}))
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -47,13 +47,13 @@ function J(e) {
|
|
|
47
47
|
function Y(e) {
|
|
48
48
|
return e.map(J);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function le(e) {
|
|
51
51
|
(!e.collections || e.collections.length === 0) && (e.collections = [{
|
|
52
52
|
id: `${e.id}-collection-1`,
|
|
53
53
|
items: []
|
|
54
54
|
}]);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function X(e, t, n, r, i) {
|
|
57
57
|
let a = e.find((e) => e.id === t);
|
|
58
58
|
if (!a?.groups) return;
|
|
59
59
|
let o = a.groups.find((e) => e.id === n);
|
|
@@ -61,7 +61,7 @@ function ce(e, t, n, r, i) {
|
|
|
61
61
|
let s = o.collections.find((e) => e.id === r);
|
|
62
62
|
s && i(s.items);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function ue(e, n, r, i, a) {
|
|
65
65
|
let o = y(r), s = y(i), c = y(a), l = y(Y(n)), u = y(!1), d = y(!1), f = y(!1), p = y([]), m = y(""), h = t(() => l.value.filter((e) => e.visible !== !1)), g = {
|
|
66
66
|
addTab(e) {
|
|
67
67
|
l.value.push(J(e)), c.value ||= e.id;
|
|
@@ -82,7 +82,7 @@ function le(e, n, r, i, a) {
|
|
|
82
82
|
},
|
|
83
83
|
addGroup(e, t) {
|
|
84
84
|
let n = l.value.find((t) => t.id === e);
|
|
85
|
-
n && (n.groups ??= [],
|
|
85
|
+
n && (n.groups ??= [], le(t), n.groups.push(q(t)));
|
|
86
86
|
},
|
|
87
87
|
removeGroup(e, t) {
|
|
88
88
|
let n = l.value.find((t) => t.id === e);
|
|
@@ -97,16 +97,16 @@ function le(e, n, r, i, a) {
|
|
|
97
97
|
n && (n.visible = !1);
|
|
98
98
|
},
|
|
99
99
|
addItem(e, t, n, r) {
|
|
100
|
-
|
|
100
|
+
X(l.value, e, t, n, (e) => e.push(K(r)));
|
|
101
101
|
},
|
|
102
102
|
removeItem(e, t, n, r) {
|
|
103
|
-
|
|
103
|
+
X(l.value, e, t, n, (e) => {
|
|
104
104
|
let t = e.findIndex((e) => e.id === r);
|
|
105
105
|
t >= 0 && e.splice(t, 1);
|
|
106
106
|
});
|
|
107
107
|
},
|
|
108
108
|
updateItem(e, t, n, r, i) {
|
|
109
|
-
|
|
109
|
+
X(l.value, e, t, n, (e) => {
|
|
110
110
|
let t = e.find((e) => e.id === r);
|
|
111
111
|
t && Object.assign(t, i);
|
|
112
112
|
});
|
|
@@ -152,7 +152,7 @@ function le(e, n, r, i, a) {
|
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/ribbon/modules/RibbonBackstage.vue?vue&type=script&setup=true&lang.ts
|
|
155
|
-
var
|
|
155
|
+
var Z = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backstage__content" }, fe = { key: 0 }, pe = { key: 1 }, me = /* @__PURE__ */ l({
|
|
156
156
|
__name: "RibbonBackstage",
|
|
157
157
|
props: {
|
|
158
158
|
open: { type: Boolean },
|
|
@@ -181,7 +181,7 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
181
181
|
title: l.title,
|
|
182
182
|
description: l.description,
|
|
183
183
|
size: l.size
|
|
184
|
-
}) : (_(), i(e, { key: 1 }, [a("aside",
|
|
184
|
+
}) : (_(), i(e, { key: 1 }, [a("aside", Z, [c(T(k), {
|
|
185
185
|
type: "primary",
|
|
186
186
|
onClick: d
|
|
187
187
|
}, {
|
|
@@ -246,7 +246,7 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
246
246
|
},
|
|
247
247
|
emits: ["select", "open-backstage"],
|
|
248
248
|
setup(o, { emit: l }) {
|
|
249
|
-
let u = l, d = y(!1), f =
|
|
249
|
+
let u = l, d = y(!1), f = ae("size", ""), m = t(() => f.value || "default"), h = t(() => `ml-ribbon-file-menu-dropdown ml-ribbon-popper ml-ribbon-popper--size-${m.value}`);
|
|
250
250
|
function g(e) {
|
|
251
251
|
d.value = e;
|
|
252
252
|
}
|
|
@@ -309,7 +309,7 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
309
309
|
}), we = {
|
|
310
310
|
key: 0,
|
|
311
311
|
class: "ml-ribbon-gallery__title"
|
|
312
|
-
}, Te = { class: "ml-ribbon-gallery__categories" }, Ee = { class: "ml-ribbon-gallery__category-title" }, De = { class: "ml-ribbon-gallery__grid" },
|
|
312
|
+
}, Te = { class: "ml-ribbon-gallery__categories" }, Ee = { class: "ml-ribbon-gallery__category-title" }, De = { class: "ml-ribbon-gallery__grid" }, Oe = ["disabled", "onClick"], ke = { class: "ml-ribbon-gallery__preview" }, Ae = { class: "ml-ribbon-gallery__label" }, Q = /* @__PURE__ */ l({
|
|
313
313
|
__name: "RibbonGallery",
|
|
314
314
|
props: {
|
|
315
315
|
id: {},
|
|
@@ -336,9 +336,9 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
336
336
|
class: p(["ml-ribbon-gallery__item", { "is-selected": c.value === e.id }]),
|
|
337
337
|
disabled: t.disabled,
|
|
338
338
|
onClick: (t) => l(e.id)
|
|
339
|
-
}, [a("div",
|
|
339
|
+
}, [a("div", ke, C(e.preview ?? o.previewFallback), 1), a("div", Ae, C(e.label), 1)], 10, Oe))), 128))])]))), 128))])], 2));
|
|
340
340
|
}
|
|
341
|
-
}),
|
|
341
|
+
}), je = ["data-id"], Me = { class: "ml-ribbon-group-button__label" }, $ = /* @__PURE__ */ l({
|
|
342
342
|
__name: "RibbonGroupButton",
|
|
343
343
|
props: {
|
|
344
344
|
id: {},
|
|
@@ -368,8 +368,8 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
368
368
|
return (o, l) => (_(), i("div", {
|
|
369
369
|
class: "ml-ribbon-group-button",
|
|
370
370
|
"data-id": t.id
|
|
371
|
-
}, [a("div",
|
|
372
|
-
default: D(() => [(_(!0), i(e, null, b(t.options, (e) => (_(), n(T(
|
|
371
|
+
}, [a("div", Me, C(t.label), 1), c(T(A), null, {
|
|
372
|
+
default: D(() => [(_(!0), i(e, null, b(t.options, (e) => (_(), n(T(k), {
|
|
373
373
|
key: e.value,
|
|
374
374
|
disabled: t.disabled,
|
|
375
375
|
type: d.value.includes(e.value) ? "primary" : "default",
|
|
@@ -389,9 +389,9 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
389
389
|
"onClick"
|
|
390
390
|
]))), 128))]),
|
|
391
391
|
_: 1
|
|
392
|
-
})], 8,
|
|
392
|
+
})], 8, je));
|
|
393
393
|
}
|
|
394
|
-
}),
|
|
394
|
+
}), Ne = ["data-template-id"], Pe = /* @__PURE__ */ l({
|
|
395
395
|
__name: "RibbonTemplateItem",
|
|
396
396
|
props: {
|
|
397
397
|
id: {},
|
|
@@ -401,18 +401,18 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
401
401
|
return (t, n) => (_(), i("div", {
|
|
402
402
|
class: "ml-ribbon-template-item",
|
|
403
403
|
"data-template-id": e.id
|
|
404
|
-
}, [x(t.$slots, "default", { item: e.item }, () => [a("span", null, C(e.item.label ?? e.item.id), 1)])], 8,
|
|
404
|
+
}, [x(t.$slots, "default", { item: e.item }, () => [a("span", null, C(e.item.label ?? e.item.id), 1)])], 8, Ne));
|
|
405
405
|
}
|
|
406
|
-
}),
|
|
406
|
+
}), Fe = ["data-item-id"], Ie = {
|
|
407
407
|
key: 0,
|
|
408
408
|
class: "ml-ribbon-item-host__keytip"
|
|
409
|
-
},
|
|
409
|
+
}, Le = { class: "ml-ribbon-item-host__content" }, Re = { class: "ml-ribbon-item-host__text-row" }, ze = {
|
|
410
410
|
key: 0,
|
|
411
411
|
class: "ml-ribbon-item-host__label"
|
|
412
|
-
},
|
|
413
|
-
key:
|
|
412
|
+
}, Be = { class: "ml-ribbon-dropdown-item__content" }, Ve = { class: "ml-ribbon-dropdown-item__label" }, He = {
|
|
413
|
+
key: 2,
|
|
414
414
|
class: "ml-ribbon-item-host__label"
|
|
415
|
-
},
|
|
415
|
+
}, Ue = /* @__PURE__ */ l({
|
|
416
416
|
__name: "RibbonItemHost",
|
|
417
417
|
props: {
|
|
418
418
|
id: {},
|
|
@@ -422,33 +422,78 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
422
422
|
},
|
|
423
423
|
emits: ["item-click"],
|
|
424
424
|
setup(o, { emit: l }) {
|
|
425
|
-
let d = o, f = l, m = u(
|
|
426
|
-
|
|
425
|
+
let d = o, f = l, m = u(ce, null), h = t(() => Array.isArray(d.item.props?.options) ? d.item.props.options : []), g = ae("size", ""), v = t(() => g.value || "default"), w = t(() => `ml-ribbon-dropdown-menu ml-ribbon-popper ml-ribbon-popper--size-${v.value}`), E = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${v.value}`), A = t(() => d.item.props?.icon || (typeof d.item.icon == "string" || !d.item.icon ? null : d.item.icon)), ne = t(() => {
|
|
426
|
+
let e = d.item.props?.icon;
|
|
427
|
+
return typeof e == "string" && e.trim().length > 0 ? e : typeof d.item.icon == "string" && d.item.icon.trim().length > 0 ? d.item.icon : null;
|
|
428
|
+
}), j = t(() => d.item.hideLabel !== !0), re = t(() => d.item.label || d.item.id), ie = t(() => d.item.keyTip?.trim().toUpperCase() ?? ""), R = y(!1), oe = y(void 0), V = t(() => h.value.find((e) => Z(e) === oe.value) ?? null), se = t(() => {
|
|
429
|
+
let e = V.value;
|
|
430
|
+
if (e) {
|
|
431
|
+
let t = de(e);
|
|
432
|
+
if (t) return t;
|
|
433
|
+
}
|
|
434
|
+
return d.item.label ?? d.item.id;
|
|
435
|
+
}), H = t(() => {
|
|
436
|
+
if (V.value) {
|
|
437
|
+
let e = X(V.value);
|
|
438
|
+
if (e) return e;
|
|
439
|
+
}
|
|
440
|
+
return A.value;
|
|
441
|
+
}), U = t(() => {
|
|
442
|
+
if (V.value) {
|
|
443
|
+
let e = ue(V.value);
|
|
444
|
+
if (e) return e;
|
|
445
|
+
}
|
|
446
|
+
return H.value ? null : ne.value;
|
|
447
|
+
}), W = t(() => {
|
|
448
|
+
if (!m?.keyTipsOpen.value || !ie.value) return !1;
|
|
427
449
|
let e = m.keyTipsSequence.value.toLowerCase();
|
|
428
|
-
return e ?
|
|
450
|
+
return e ? ie.value.toLowerCase().startsWith(e) : !0;
|
|
429
451
|
});
|
|
430
|
-
function
|
|
452
|
+
function G() {
|
|
431
453
|
f("item-click", d.id);
|
|
432
454
|
}
|
|
433
|
-
function
|
|
434
|
-
|
|
455
|
+
function K(e) {
|
|
456
|
+
R.value = e;
|
|
435
457
|
}
|
|
436
|
-
function
|
|
437
|
-
|
|
458
|
+
function q(e) {
|
|
459
|
+
oe.value = e, le(e), R.value = !1;
|
|
438
460
|
}
|
|
439
|
-
function
|
|
440
|
-
|
|
461
|
+
function J() {
|
|
462
|
+
R.value = !R.value;
|
|
441
463
|
}
|
|
442
|
-
function
|
|
464
|
+
function Y() {
|
|
465
|
+
let e = V.value;
|
|
466
|
+
if (!e) {
|
|
467
|
+
G();
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
le(Z(e));
|
|
471
|
+
}
|
|
472
|
+
function le(e) {
|
|
473
|
+
if (typeof e == "string" || typeof e == "number") {
|
|
474
|
+
f("item-click", String(e));
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
G();
|
|
478
|
+
}
|
|
479
|
+
function X(e) {
|
|
443
480
|
if (!e || typeof e != "object") return null;
|
|
444
481
|
let t = e.icon;
|
|
445
482
|
return !t || typeof t == "string" ? null : t;
|
|
446
483
|
}
|
|
447
|
-
function
|
|
484
|
+
function ue(e) {
|
|
448
485
|
if (!e || typeof e != "object") return null;
|
|
449
486
|
let t = e.icon;
|
|
450
487
|
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
451
488
|
}
|
|
489
|
+
function Z(e) {
|
|
490
|
+
if (!(!e || typeof e != "object")) return e.value;
|
|
491
|
+
}
|
|
492
|
+
function de(e) {
|
|
493
|
+
if (!e || typeof e != "object") return;
|
|
494
|
+
let t = e.label;
|
|
495
|
+
return typeof t == "string" ? t : void 0;
|
|
496
|
+
}
|
|
452
497
|
return (t, l) => (_(), i("div", {
|
|
453
498
|
class: p(["ml-ribbon-item-host", [
|
|
454
499
|
`is-${o.item.size ?? "medium"}`,
|
|
@@ -457,35 +502,35 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
457
502
|
]]),
|
|
458
503
|
"data-item-id": o.id,
|
|
459
504
|
role: "group"
|
|
460
|
-
}, [
|
|
505
|
+
}, [W.value ? (_(), i("span", Ie, C(ie.value), 1)) : r("", !0), o.item.type === "groupButton" ? (_(), n($, {
|
|
461
506
|
key: 1,
|
|
462
507
|
id: o.item.id,
|
|
463
508
|
label: o.item.label ?? "",
|
|
464
509
|
options: o.item.props?.options ?? [],
|
|
465
510
|
multiple: !!o.item.props?.multiple,
|
|
466
511
|
disabled: o.item.disabled,
|
|
467
|
-
onChange:
|
|
512
|
+
onChange: G
|
|
468
513
|
}, null, 8, [
|
|
469
514
|
"id",
|
|
470
515
|
"label",
|
|
471
516
|
"options",
|
|
472
517
|
"multiple",
|
|
473
518
|
"disabled"
|
|
474
|
-
])) : o.item.type === "gallery" ? (_(), n(
|
|
519
|
+
])) : o.item.type === "gallery" ? (_(), n(Q, {
|
|
475
520
|
key: 2,
|
|
476
521
|
id: o.item.id,
|
|
477
522
|
label: o.item.label ?? "",
|
|
478
523
|
categories: o.item.props?.categories ?? [],
|
|
479
524
|
"preview-fallback": d.galleryPreviewFallback,
|
|
480
525
|
disabled: o.item.disabled,
|
|
481
|
-
onSelect:
|
|
526
|
+
onSelect: G
|
|
482
527
|
}, null, 8, [
|
|
483
528
|
"id",
|
|
484
529
|
"label",
|
|
485
530
|
"categories",
|
|
486
531
|
"preview-fallback",
|
|
487
532
|
"disabled"
|
|
488
|
-
])) : o.item.type === "template" ? (_(), n(
|
|
533
|
+
])) : o.item.type === "template" ? (_(), n(Pe, {
|
|
489
534
|
key: 3,
|
|
490
535
|
id: o.item.id,
|
|
491
536
|
item: o.item
|
|
@@ -497,42 +542,50 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
497
542
|
trigger: "click",
|
|
498
543
|
disabled: o.item.disabled,
|
|
499
544
|
"popper-class": w.value,
|
|
500
|
-
onVisibleChange:
|
|
501
|
-
onCommand:
|
|
545
|
+
onVisibleChange: K,
|
|
546
|
+
onCommand: q
|
|
502
547
|
}, {
|
|
503
548
|
dropdown: D(() => [c(T(P), null, {
|
|
504
549
|
default: D(() => [(_(!0), i(e, null, b(h.value, (e) => (_(), n(T(N), {
|
|
505
550
|
key: String(e.value),
|
|
506
551
|
command: e.value
|
|
507
552
|
}, {
|
|
508
|
-
default: D(() => [a("span",
|
|
553
|
+
default: D(() => [a("span", Be, [X(e) ? (_(), n(T(F), {
|
|
509
554
|
key: 0,
|
|
510
555
|
class: "ml-ribbon-dropdown-item__icon"
|
|
511
556
|
}, {
|
|
512
|
-
default: D(() => [(_(), n(S(
|
|
557
|
+
default: D(() => [(_(), n(S(X(e))))]),
|
|
513
558
|
_: 2
|
|
514
|
-
}, 1024)) :
|
|
559
|
+
}, 1024)) : ue(e) ? (_(), i("i", {
|
|
515
560
|
key: 1,
|
|
516
|
-
class: p(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class",
|
|
561
|
+
class: p(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", ue(e)]),
|
|
517
562
|
"aria-hidden": "true"
|
|
518
|
-
}, null, 2)) : r("", !0), a("span",
|
|
563
|
+
}, null, 2)) : r("", !0), a("span", Ve, C(e.label), 1)])]),
|
|
519
564
|
_: 2
|
|
520
565
|
}, 1032, ["command"]))), 128))]),
|
|
521
566
|
_: 1
|
|
522
567
|
})]),
|
|
523
|
-
default: D(() => [c(T(
|
|
568
|
+
default: D(() => [c(T(k), {
|
|
524
569
|
type: "default",
|
|
525
|
-
"aria-label":
|
|
526
|
-
onClick:
|
|
570
|
+
"aria-label": re.value,
|
|
571
|
+
onClick: J
|
|
527
572
|
}, {
|
|
528
|
-
default: D(() => [a("span",
|
|
573
|
+
default: D(() => [a("span", Le, [H.value ? (_(), i("span", {
|
|
529
574
|
key: 0,
|
|
530
|
-
class: "ml-ribbon-item-host__icon"
|
|
531
|
-
|
|
532
|
-
|
|
575
|
+
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary",
|
|
576
|
+
onClick: O(Y, ["stop"])
|
|
577
|
+
}, [c(T(F), null, {
|
|
578
|
+
default: D(() => [(_(), n(S(H.value)))]),
|
|
533
579
|
_: 1
|
|
534
|
-
})) :
|
|
535
|
-
|
|
580
|
+
})])) : U.value ? (_(), i("span", {
|
|
581
|
+
key: 1,
|
|
582
|
+
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class ml-ribbon-item-host__icon--dropdown-primary",
|
|
583
|
+
onClick: O(Y, ["stop"])
|
|
584
|
+
}, [a("i", {
|
|
585
|
+
class: p(U.value),
|
|
586
|
+
"aria-hidden": "true"
|
|
587
|
+
}, null, 2)])) : r("", !0), a("span", Re, [j.value ? (_(), i("span", ze, C(se.value), 1)) : r("", !0), c(T(F), { class: p(["ml-ribbon-item-host__dropdown-arrow", { "is-open": R.value }]) }, {
|
|
588
|
+
default: D(() => [(_(), n(S(R.value ? T(B) : T(z))))]),
|
|
536
589
|
_: 1
|
|
537
590
|
}, 8, ["class"])])])]),
|
|
538
591
|
_: 1
|
|
@@ -541,20 +594,20 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
541
594
|
}, 8, ["disabled", "popper-class"])) : o.item.type === "checkbox" ? (_(), n(T(ee), {
|
|
542
595
|
key: 5,
|
|
543
596
|
disabled: o.item.disabled,
|
|
544
|
-
onChange:
|
|
597
|
+
onChange: G
|
|
545
598
|
}, {
|
|
546
599
|
default: D(() => [s(C(o.item.label), 1)]),
|
|
547
600
|
_: 1
|
|
548
601
|
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (_(), n(T(te), {
|
|
549
602
|
key: 6,
|
|
550
603
|
disabled: o.item.disabled,
|
|
551
|
-
onChange:
|
|
552
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (_(), n(T(
|
|
604
|
+
onChange: G
|
|
605
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (_(), n(T(L), {
|
|
553
606
|
key: 7,
|
|
554
607
|
disabled: o.item.disabled,
|
|
555
608
|
"popper-class": E.value,
|
|
556
609
|
style: { width: "92px" },
|
|
557
|
-
onChange:
|
|
610
|
+
onChange: G
|
|
558
611
|
}, {
|
|
559
612
|
default: D(() => [(_(!0), i(e, null, b(h.value, (e) => (_(), n(T(I), {
|
|
560
613
|
key: String(e.value),
|
|
@@ -562,23 +615,27 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
562
615
|
value: e.value
|
|
563
616
|
}, null, 8, ["label", "value"]))), 128))]),
|
|
564
617
|
_: 1
|
|
565
|
-
}, 8, ["disabled", "popper-class"])) : (_(), n(T(
|
|
618
|
+
}, 8, ["disabled", "popper-class"])) : (_(), n(T(k), {
|
|
566
619
|
key: 8,
|
|
567
620
|
disabled: o.item.disabled,
|
|
568
|
-
"aria-label":
|
|
569
|
-
onClick:
|
|
621
|
+
"aria-label": re.value,
|
|
622
|
+
onClick: G
|
|
570
623
|
}, {
|
|
571
|
-
default: D(() => [
|
|
624
|
+
default: D(() => [A.value ? (_(), n(T(F), {
|
|
572
625
|
key: 0,
|
|
573
626
|
class: "ml-ribbon-item-host__icon"
|
|
574
627
|
}, {
|
|
575
|
-
default: D(() => [(_(), n(S(
|
|
628
|
+
default: D(() => [(_(), n(S(A.value)))]),
|
|
576
629
|
_: 1
|
|
577
|
-
})) :
|
|
630
|
+
})) : ne.value ? (_(), i("i", {
|
|
631
|
+
key: 1,
|
|
632
|
+
class: p(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", ne.value]),
|
|
633
|
+
"aria-hidden": "true"
|
|
634
|
+
}, null, 2)) : r("", !0), j.value ? (_(), i("span", He, C(o.item.label ?? o.item.id), 1)) : r("", !0)]),
|
|
578
635
|
_: 1
|
|
579
|
-
}, 8, ["disabled", "aria-label"]))], 10,
|
|
636
|
+
}, 8, ["disabled", "aria-label"]))], 10, Fe));
|
|
580
637
|
}
|
|
581
|
-
}),
|
|
638
|
+
}), We = /* @__PURE__ */ l({
|
|
582
639
|
__name: "RibbonGroupContent",
|
|
583
640
|
props: {
|
|
584
641
|
group: {},
|
|
@@ -593,7 +650,7 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
593
650
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
594
651
|
rows: t.rows
|
|
595
652
|
}, {
|
|
596
|
-
default: D(() => [(_(!0), i(e, null, b(t.items, (e) => (_(), n(
|
|
653
|
+
default: D(() => [(_(!0), i(e, null, b(t.items, (e) => (_(), n(Ue, {
|
|
597
654
|
id: e.id,
|
|
598
655
|
key: e.id,
|
|
599
656
|
item: e,
|
|
@@ -617,7 +674,7 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
617
674
|
"rows"
|
|
618
675
|
]))), 128))], 2));
|
|
619
676
|
}
|
|
620
|
-
}),
|
|
677
|
+
}), Ge = ["data-priority"], Ke = { class: "ml-ribbon-group__body" }, qe = { class: "ml-ribbon-group__footer" }, Je = { class: "ml-ribbon-group__title" }, Ye = ["aria-label", "aria-expanded"], Xe = { class: "ml-ribbon-group__overflow-content" }, Ze = ["aria-label", "aria-expanded"], Qe = { class: "ml-ribbon-group__overflow-content" }, $e = /* @__PURE__ */ l({
|
|
621
678
|
__name: "RibbonGroup",
|
|
622
679
|
props: {
|
|
623
680
|
id: {},
|
|
@@ -635,13 +692,13 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
635
692
|
},
|
|
636
693
|
emits: ["item-click"],
|
|
637
694
|
setup(e, { emit: o }) {
|
|
638
|
-
let s = e, l = o, u = t(() => s.autoWidth !== !1), d = y(null), m = y([]), v = y(null), b = y(null), w = y(0),
|
|
695
|
+
let s = e, l = o, u = t(() => s.autoWidth !== !1), d = y(null), m = y([]), v = y(null), b = y(null), w = y(0), O = y(0), A = ae("size", ""), ee = t(() => A.value || "default"), te = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${ee.value}`), ne = t(() => ({ modifiers: [{
|
|
639
696
|
name: "offset",
|
|
640
697
|
options: { offset: [w.value, 8] }
|
|
641
|
-
}] })),
|
|
698
|
+
}] })), j = t(() => ({ modifiers: [{
|
|
642
699
|
name: "offset",
|
|
643
|
-
options: { offset: [
|
|
644
|
-
}] })),
|
|
700
|
+
options: { offset: [O.value, 8] }
|
|
701
|
+
}] })), M = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), N = t(() => m.value.length > 0), P = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), I = y(!1), L = y(!1), ie = t(() => {
|
|
645
702
|
if (!s.groupModel || !m.value.length) return null;
|
|
646
703
|
let e = new Set(m.value), t = s.groupModel.collections?.map((t) => ({
|
|
647
704
|
...t,
|
|
@@ -651,7 +708,7 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
651
708
|
...s.groupModel,
|
|
652
709
|
collections: t
|
|
653
710
|
} : null;
|
|
654
|
-
}),
|
|
711
|
+
}), R = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
655
712
|
id: `${s.groupModel.id}-footer-menu`,
|
|
656
713
|
title: "",
|
|
657
714
|
orientation: "row",
|
|
@@ -661,7 +718,7 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
661
718
|
items: s.groupModel.footerMenuItems
|
|
662
719
|
}]
|
|
663
720
|
} : null);
|
|
664
|
-
function
|
|
721
|
+
function oe() {
|
|
665
722
|
let e = d.value?.querySelector(".ml-ribbon-group__content");
|
|
666
723
|
if (!e) {
|
|
667
724
|
m.value.length > 0 && (m.value = []);
|
|
@@ -680,12 +737,12 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
680
737
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
681
738
|
}), m.value.length === n.length && m.value.every((e, t) => e === n[t]) || (m.value = n);
|
|
682
739
|
}
|
|
683
|
-
function
|
|
740
|
+
function V() {
|
|
684
741
|
f(() => {
|
|
685
|
-
|
|
742
|
+
Y(), se(), H(), oe();
|
|
686
743
|
});
|
|
687
744
|
}
|
|
688
|
-
function
|
|
745
|
+
function se() {
|
|
689
746
|
let e = d.value?.getBoundingClientRect(), t = v.value?.getBoundingClientRect();
|
|
690
747
|
if (!e || !t) {
|
|
691
748
|
w.value !== 0 && (w.value = 0);
|
|
@@ -694,134 +751,134 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
694
751
|
let n = Math.round(e.left - t.left);
|
|
695
752
|
w.value !== n && (w.value = n);
|
|
696
753
|
}
|
|
697
|
-
function
|
|
754
|
+
function H() {
|
|
698
755
|
let e = d.value?.getBoundingClientRect(), t = b.value?.getBoundingClientRect();
|
|
699
756
|
if (!e || !t) {
|
|
700
|
-
|
|
757
|
+
O.value !== 0 && (O.value = 0);
|
|
701
758
|
return;
|
|
702
759
|
}
|
|
703
760
|
let n = Math.round(e.left - t.left);
|
|
704
|
-
|
|
761
|
+
O.value !== n && (O.value = n);
|
|
705
762
|
}
|
|
706
|
-
function
|
|
707
|
-
|
|
763
|
+
function ce(e) {
|
|
764
|
+
I.value = e;
|
|
708
765
|
}
|
|
709
|
-
function
|
|
710
|
-
|
|
766
|
+
function W(e) {
|
|
767
|
+
L.value = e;
|
|
711
768
|
}
|
|
712
|
-
function
|
|
713
|
-
|
|
769
|
+
function G() {
|
|
770
|
+
I.value = !I.value;
|
|
714
771
|
}
|
|
715
|
-
function
|
|
716
|
-
|
|
772
|
+
function K() {
|
|
773
|
+
L.value = !L.value;
|
|
717
774
|
}
|
|
718
|
-
let
|
|
719
|
-
function
|
|
720
|
-
if (!
|
|
775
|
+
let q = null, J = null;
|
|
776
|
+
function Y() {
|
|
777
|
+
if (!q) return;
|
|
721
778
|
let e = d.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
722
|
-
|
|
779
|
+
J !== e && (J && q.unobserve(J), e && q.observe(e), J = e);
|
|
723
780
|
}
|
|
724
781
|
return E(() => s.groupModel, () => {
|
|
725
|
-
|
|
782
|
+
V();
|
|
726
783
|
}, { deep: !0 }), h(() => {
|
|
727
|
-
typeof ResizeObserver < "u" && (
|
|
728
|
-
|
|
729
|
-
}), d.value &&
|
|
784
|
+
typeof ResizeObserver < "u" && (q = new ResizeObserver(() => {
|
|
785
|
+
se(), H(), oe();
|
|
786
|
+
}), d.value && q.observe(d.value), Y()), V();
|
|
730
787
|
}), g(() => {
|
|
731
|
-
|
|
788
|
+
q?.disconnect();
|
|
732
789
|
}), (t, o) => (_(), i("section", {
|
|
733
790
|
ref_key: "groupSectionRef",
|
|
734
791
|
ref: d,
|
|
735
792
|
class: p(["ml-ribbon-group", { "ml-ribbon-group--auto-width": u.value }]),
|
|
736
793
|
"data-priority": e.priority ?? 100
|
|
737
|
-
}, [a("div",
|
|
738
|
-
|
|
794
|
+
}, [a("div", Ke, [x(t.$slots, "default")]), a("footer", qe, [
|
|
795
|
+
M.value ? (_(), n(T(F), {
|
|
739
796
|
key: 0,
|
|
740
797
|
class: "ml-ribbon-group__icon"
|
|
741
798
|
}, {
|
|
742
|
-
default: D(() => [(_(), n(S(
|
|
799
|
+
default: D(() => [(_(), n(S(M.value)))]),
|
|
743
800
|
_: 1
|
|
744
801
|
})) : r("", !0),
|
|
745
|
-
a("span",
|
|
746
|
-
|
|
802
|
+
a("span", Je, C(e.title), 1),
|
|
803
|
+
P.value && R.value ? (_(), n(T(re), {
|
|
747
804
|
key: 1,
|
|
748
805
|
trigger: "click",
|
|
749
806
|
placement: "bottom-start",
|
|
750
|
-
"popper-class":
|
|
751
|
-
"popper-options":
|
|
752
|
-
onShow: o[1] ||= (e) =>
|
|
753
|
-
onHide: o[2] ||= (e) =>
|
|
807
|
+
"popper-class": te.value,
|
|
808
|
+
"popper-options": j.value,
|
|
809
|
+
onShow: o[1] ||= (e) => ce(!0),
|
|
810
|
+
onHide: o[2] ||= (e) => ce(!1)
|
|
754
811
|
}, {
|
|
755
812
|
reference: D(() => [a("button", {
|
|
756
813
|
ref_key: "footerTriggerRef",
|
|
757
814
|
ref: b,
|
|
758
815
|
type: "button",
|
|
759
|
-
class: p(["ml-ribbon-group__footer-trigger", { "is-open":
|
|
816
|
+
class: p(["ml-ribbon-group__footer-trigger", { "is-open": I.value }]),
|
|
760
817
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
761
|
-
"aria-expanded":
|
|
762
|
-
onClick:
|
|
818
|
+
"aria-expanded": I.value,
|
|
819
|
+
onClick: G
|
|
763
820
|
}, [c(T(F), null, {
|
|
764
|
-
default: D(() => [(_(), n(S(
|
|
821
|
+
default: D(() => [(_(), n(S(I.value ? T(B) : T(z))))]),
|
|
765
822
|
_: 1
|
|
766
|
-
})], 10,
|
|
767
|
-
default: D(() => [a("div",
|
|
768
|
-
group:
|
|
823
|
+
})], 10, Ye)]),
|
|
824
|
+
default: D(() => [a("div", Xe, [c(We, {
|
|
825
|
+
group: R.value,
|
|
769
826
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
770
827
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
771
828
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
772
829
|
_: 1
|
|
773
830
|
}, 8, ["popper-class", "popper-options"])) : r("", !0),
|
|
774
|
-
|
|
831
|
+
N.value && ie.value ? (_(), n(T(re), {
|
|
775
832
|
key: 2,
|
|
776
833
|
trigger: "click",
|
|
777
834
|
placement: "bottom-start",
|
|
778
|
-
"popper-class":
|
|
779
|
-
"popper-options":
|
|
780
|
-
onShow: o[4] ||= (e) =>
|
|
781
|
-
onHide: o[5] ||= (e) =>
|
|
835
|
+
"popper-class": te.value,
|
|
836
|
+
"popper-options": ne.value,
|
|
837
|
+
onShow: o[4] ||= (e) => W(!0),
|
|
838
|
+
onHide: o[5] ||= (e) => W(!1)
|
|
782
839
|
}, {
|
|
783
840
|
reference: D(() => [a("button", {
|
|
784
841
|
ref_key: "overflowTriggerRef",
|
|
785
842
|
ref: v,
|
|
786
843
|
type: "button",
|
|
787
|
-
class: p(["ml-ribbon-group__overflow-trigger", { "is-open":
|
|
844
|
+
class: p(["ml-ribbon-group__overflow-trigger", { "is-open": L.value }]),
|
|
788
845
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
789
|
-
"aria-expanded":
|
|
790
|
-
onClick:
|
|
846
|
+
"aria-expanded": L.value,
|
|
847
|
+
onClick: K
|
|
791
848
|
}, [c(T(F), null, {
|
|
792
|
-
default: D(() => [(_(), n(S(
|
|
849
|
+
default: D(() => [(_(), n(S(L.value ? T(B) : T(z))))]),
|
|
793
850
|
_: 1
|
|
794
|
-
})], 10,
|
|
795
|
-
default: D(() => [a("div",
|
|
796
|
-
group:
|
|
851
|
+
})], 10, Ze)]),
|
|
852
|
+
default: D(() => [a("div", Qe, [c(We, {
|
|
853
|
+
group: ie.value,
|
|
797
854
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
798
855
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
799
856
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
800
857
|
_: 1
|
|
801
858
|
}, 8, ["popper-class", "popper-options"])) : r("", !0),
|
|
802
|
-
e.showLauncherIcon ?? e.launcher ? (_(), n(T(
|
|
859
|
+
e.showLauncherIcon ?? e.launcher ? (_(), n(T(k), {
|
|
803
860
|
key: 3,
|
|
804
861
|
link: "",
|
|
805
862
|
class: "ml-ribbon-group__launcher"
|
|
806
863
|
}, {
|
|
807
864
|
default: D(() => [c(T(F), null, {
|
|
808
|
-
default: D(() => [c(T(
|
|
865
|
+
default: D(() => [c(T(U))]),
|
|
809
866
|
_: 1
|
|
810
867
|
})]),
|
|
811
868
|
_: 1
|
|
812
869
|
})) : r("", !0)
|
|
813
|
-
])], 10,
|
|
870
|
+
])], 10, Ge));
|
|
814
871
|
}
|
|
815
|
-
}),
|
|
872
|
+
}), et = { class: "ml-ribbon__header" }, tt = { class: "ml-ribbon__head-left" }, nt = { class: "ml-ribbon__head-right" }, rt = {
|
|
816
873
|
key: 2,
|
|
817
874
|
class: "ml-ribbon__tabs-extra"
|
|
818
|
-
},
|
|
875
|
+
}, it = ["data-active-tab"], at = {
|
|
819
876
|
key: 0,
|
|
820
877
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
821
|
-
},
|
|
878
|
+
}, ot = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, st = ["aria-label"], ct = { class: "ml-ribbon-overflow-list" }, lt = { class: "ml-ribbon-overflow-group__header" }, ut = ["data-active-tab"], dt = {
|
|
822
879
|
class: "ml-ribbon-simplified-group",
|
|
823
880
|
type: "button"
|
|
824
|
-
},
|
|
881
|
+
}, ft = { class: "ml-ribbon-simplified-group__panel" }, pt = 40, mt = /* @__PURE__ */ l({
|
|
825
882
|
__name: "Ribbon",
|
|
826
883
|
props: {
|
|
827
884
|
id: { default: "ml-ribbon-root" },
|
|
@@ -874,7 +931,7 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
874
931
|
function m(e) {
|
|
875
932
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(w(e)) : e;
|
|
876
933
|
}
|
|
877
|
-
function
|
|
934
|
+
function O(e) {
|
|
878
935
|
if (!e) return;
|
|
879
936
|
let t = { ...e };
|
|
880
937
|
return "icon" in t && (t.icon = m(t.icon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
|
|
@@ -886,31 +943,31 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
886
943
|
} : t;
|
|
887
944
|
})), t;
|
|
888
945
|
}
|
|
889
|
-
function
|
|
946
|
+
function A(e) {
|
|
890
947
|
return {
|
|
891
948
|
...e,
|
|
892
949
|
icon: m(e.icon),
|
|
893
|
-
props:
|
|
950
|
+
props: O(e.props)
|
|
894
951
|
};
|
|
895
952
|
}
|
|
896
|
-
function
|
|
953
|
+
function ee(e) {
|
|
897
954
|
return {
|
|
898
955
|
...e,
|
|
899
956
|
icon: m(e.icon),
|
|
900
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
957
|
+
footerMenuItems: e.footerMenuItems?.map(A),
|
|
901
958
|
collections: e.collections?.map((e) => ({
|
|
902
959
|
...e,
|
|
903
|
-
items: e.items?.map(
|
|
960
|
+
items: e.items?.map(A)
|
|
904
961
|
}))
|
|
905
962
|
};
|
|
906
963
|
}
|
|
907
|
-
function
|
|
964
|
+
function te(e) {
|
|
908
965
|
return e.map((e) => ({
|
|
909
966
|
...e,
|
|
910
|
-
groups: e.groups?.map(
|
|
967
|
+
groups: e.groups?.map(ee)
|
|
911
968
|
}));
|
|
912
969
|
}
|
|
913
|
-
let
|
|
970
|
+
let j = {
|
|
914
971
|
layoutSwitcherTooltip: "Switch ribbon layout",
|
|
915
972
|
minimizeTooltip: "Minimize ribbon",
|
|
916
973
|
keyTipsToggleText: "Key Tips",
|
|
@@ -925,54 +982,56 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
925
982
|
keyTipsEmptySequence: "No key sequence",
|
|
926
983
|
contextualTabDefaultTitle: "Contextual",
|
|
927
984
|
galleryPreviewFallback: "Preview unavailable"
|
|
928
|
-
},
|
|
929
|
-
v(
|
|
930
|
-
|
|
931
|
-
}, { deep: !0 }), E(() =>
|
|
932
|
-
e !==
|
|
933
|
-
}), E(() =>
|
|
985
|
+
}, M = s, N = u, { context: P, visibleTabs: I } = ue(M.id, M.tabs, M.activeLayout ? String(M.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : M.layout, M.minimized, M.activeTab || M.tabs[0]?.id || "");
|
|
986
|
+
v(ce, P), E(() => M.tabs, (e) => {
|
|
987
|
+
P.tabs.value = te(e), P.tabs.value.some((e) => e.id === P.activeTab.value) || (P.activeTab.value = P.tabs.value[0]?.id || "");
|
|
988
|
+
}, { deep: !0 }), E(() => M.layout, (e) => {
|
|
989
|
+
e !== P.layout.value && (P.layout.value = e);
|
|
990
|
+
}), E(() => M.activeLayout, (e) => {
|
|
934
991
|
if (!e) return;
|
|
935
992
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
936
|
-
t !==
|
|
937
|
-
}), E(() =>
|
|
938
|
-
e !==
|
|
939
|
-
}), E(() =>
|
|
940
|
-
e && e !==
|
|
941
|
-
}), E(
|
|
942
|
-
|
|
943
|
-
}), E(
|
|
944
|
-
|
|
945
|
-
}), E(
|
|
946
|
-
|
|
947
|
-
}), E(
|
|
948
|
-
|
|
993
|
+
t !== P.layout.value && (P.layout.value = t);
|
|
994
|
+
}), E(() => M.minimized, (e) => {
|
|
995
|
+
e !== P.minimized.value && (P.minimized.value = e);
|
|
996
|
+
}), E(() => M.activeTab, (e) => {
|
|
997
|
+
e && e !== P.activeTab.value && (P.activeTab.value = e);
|
|
998
|
+
}), E(P.activeTab, (e) => {
|
|
999
|
+
N("update:activeTab", e), N("tabChange", e);
|
|
1000
|
+
}), E(P.layout, (e) => {
|
|
1001
|
+
N("update:layout", e), N("layoutChange", e);
|
|
1002
|
+
}), E(P.minimized, (e) => {
|
|
1003
|
+
N("update:minimized", e);
|
|
1004
|
+
}), E(P.overflowOpen, (e) => {
|
|
1005
|
+
N(e ? "overflowOpen" : "overflowClose");
|
|
1006
|
+
}), E(P.backdropOpen, (e) => {
|
|
1007
|
+
N(e ? "backstageOpen" : "backstageClose");
|
|
949
1008
|
});
|
|
950
|
-
let
|
|
951
|
-
layoutSwitcherTooltip:
|
|
952
|
-
minimizeTooltip:
|
|
953
|
-
keyTipsToggleText:
|
|
954
|
-
overflowTriggerAriaLabel:
|
|
955
|
-
groupOverflowTriggerAriaLabel:
|
|
956
|
-
fileMenuLabel:
|
|
957
|
-
fileMenuOpenBackstageLabel:
|
|
958
|
-
backstageBackLabel:
|
|
959
|
-
backstageTitle:
|
|
960
|
-
backstageDescription:
|
|
961
|
-
keyTipsSequencePrefix:
|
|
962
|
-
keyTipsEmptySequence:
|
|
963
|
-
contextualTabDefaultTitle:
|
|
964
|
-
galleryPreviewFallback:
|
|
965
|
-
})),
|
|
966
|
-
if (!
|
|
967
|
-
let e =
|
|
968
|
-
let n =
|
|
1009
|
+
let L = t(() => I.value.find((e) => e.id === P.activeTab.value)), z = t(() => L.value?.groups?.filter((e) => e.visible !== !1) ?? []), B = y(null), U = y(/* @__PURE__ */ new Set()), W = y({}), G = ae("size", ""), K = t(() => M.size || G.value || "default"), q = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${K.value}`), J = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${K.value}`), Y = t(() => ({
|
|
1010
|
+
layoutSwitcherTooltip: M.texts.layoutSwitcherTooltip || j.layoutSwitcherTooltip,
|
|
1011
|
+
minimizeTooltip: M.texts.minimizeTooltip || j.minimizeTooltip,
|
|
1012
|
+
keyTipsToggleText: M.texts.keyTipsToggleText || j.keyTipsToggleText,
|
|
1013
|
+
overflowTriggerAriaLabel: M.texts.overflowTriggerAriaLabel || j.overflowTriggerAriaLabel,
|
|
1014
|
+
groupOverflowTriggerAriaLabel: M.texts.groupOverflowTriggerAriaLabel || j.groupOverflowTriggerAriaLabel,
|
|
1015
|
+
fileMenuLabel: M.texts.fileMenuLabel || j.fileMenuLabel,
|
|
1016
|
+
fileMenuOpenBackstageLabel: M.texts.fileMenuOpenBackstageLabel || j.fileMenuOpenBackstageLabel,
|
|
1017
|
+
backstageBackLabel: M.texts.backstageBackLabel || j.backstageBackLabel,
|
|
1018
|
+
backstageTitle: M.texts.backstageTitle || j.backstageTitle,
|
|
1019
|
+
backstageDescription: M.texts.backstageDescription || j.backstageDescription,
|
|
1020
|
+
keyTipsSequencePrefix: M.texts.keyTipsSequencePrefix || j.keyTipsSequencePrefix,
|
|
1021
|
+
keyTipsEmptySequence: M.texts.keyTipsEmptySequence || j.keyTipsEmptySequence,
|
|
1022
|
+
contextualTabDefaultTitle: M.texts.contextualTabDefaultTitle || j.contextualTabDefaultTitle,
|
|
1023
|
+
galleryPreviewFallback: M.texts.galleryPreviewFallback || j.galleryPreviewFallback
|
|
1024
|
+
})), le = t(() => P.minimized.value ? V : oe), X = t(() => z.value.filter((e) => !U.value.has(e.id))), Z = t(() => z.value.filter((e) => U.value.has(e.id))), de = t(() => {
|
|
1025
|
+
if (!Z.value.length) return 220;
|
|
1026
|
+
let e = Z.value.reduce((e, t) => {
|
|
1027
|
+
let n = W.value[t.id] ?? he(t);
|
|
969
1028
|
return Math.max(e, n);
|
|
970
1029
|
}, 0), t = Math.ceil(e + 40);
|
|
971
1030
|
return Math.max(220, Math.min(720, t));
|
|
972
1031
|
});
|
|
973
|
-
function
|
|
1032
|
+
function fe(e) {
|
|
974
1033
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
975
|
-
...
|
|
1034
|
+
...A(e),
|
|
976
1035
|
size: "medium"
|
|
977
1036
|
})));
|
|
978
1037
|
return {
|
|
@@ -985,13 +1044,13 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
985
1044
|
}]
|
|
986
1045
|
};
|
|
987
1046
|
}
|
|
988
|
-
function
|
|
1047
|
+
function pe(e) {
|
|
989
1048
|
return e.priority ?? 100;
|
|
990
1049
|
}
|
|
991
|
-
function
|
|
1050
|
+
function he(e) {
|
|
992
1051
|
return e.autoWidth === !1 ? 190 : 140;
|
|
993
1052
|
}
|
|
994
|
-
function
|
|
1053
|
+
function ge(e) {
|
|
995
1054
|
let t = {};
|
|
996
1055
|
return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
|
|
997
1056
|
let n = e.dataset.groupId;
|
|
@@ -1000,73 +1059,73 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1000
1059
|
r > 0 && (t[n] = r);
|
|
1001
1060
|
}), t;
|
|
1002
1061
|
}
|
|
1003
|
-
function
|
|
1062
|
+
function _e(e) {
|
|
1004
1063
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
1005
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
1064
|
+
return Number.isFinite(t) && t > 0 ? t : pt;
|
|
1006
1065
|
}
|
|
1007
|
-
function
|
|
1008
|
-
if (
|
|
1009
|
-
|
|
1066
|
+
function ve() {
|
|
1067
|
+
if (P.layout.value !== "classic") {
|
|
1068
|
+
U.value = /* @__PURE__ */ new Set();
|
|
1010
1069
|
return;
|
|
1011
1070
|
}
|
|
1012
|
-
let e =
|
|
1071
|
+
let e = B.value;
|
|
1013
1072
|
if (!e) return;
|
|
1014
|
-
let t =
|
|
1073
|
+
let t = z.value;
|
|
1015
1074
|
if (!t.length) {
|
|
1016
|
-
|
|
1075
|
+
U.value = /* @__PURE__ */ new Set();
|
|
1017
1076
|
return;
|
|
1018
1077
|
}
|
|
1019
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
1020
|
-
|
|
1021
|
-
...
|
|
1078
|
+
let n = Math.round(e.getBoundingClientRect().width), r = _e(e), i = ge(e);
|
|
1079
|
+
W.value = {
|
|
1080
|
+
...W.value,
|
|
1022
1081
|
...i
|
|
1023
1082
|
};
|
|
1024
1083
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
1025
1084
|
group: e,
|
|
1026
1085
|
index: t
|
|
1027
1086
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
1028
|
-
let n =
|
|
1087
|
+
let n = pe(t.group) - pe(e.group);
|
|
1029
1088
|
return n === 0 ? t.index - e.index : n;
|
|
1030
|
-
}), l = (e) => i[e.id] ??
|
|
1089
|
+
}), l = (e) => i[e.id] ?? he(e), u = a.reduce((e, t) => e + l(t), 0), d = (e) => o.filter(({ group: t }) => !e.has(t.id)).reduce((e, { group: t }) => e + l(t), 0), f = (e) => u + d(e) + (e.size > 0 ? r : 0), p = 0;
|
|
1031
1090
|
for (; f(s) > n && p < c.length;) {
|
|
1032
1091
|
let e = c[p].group;
|
|
1033
1092
|
s.add(e.id), p += 1;
|
|
1034
1093
|
}
|
|
1035
|
-
|
|
1094
|
+
U.value = s;
|
|
1036
1095
|
}
|
|
1037
|
-
function
|
|
1096
|
+
function ye() {
|
|
1038
1097
|
f(() => {
|
|
1039
|
-
if (
|
|
1040
|
-
|
|
1098
|
+
if (P.layout.value !== "classic" || P.minimized.value) {
|
|
1099
|
+
ve();
|
|
1041
1100
|
return;
|
|
1042
1101
|
}
|
|
1043
|
-
if (
|
|
1044
|
-
|
|
1102
|
+
if (U.value.size === 0) {
|
|
1103
|
+
ve();
|
|
1045
1104
|
return;
|
|
1046
1105
|
}
|
|
1047
|
-
|
|
1048
|
-
|
|
1106
|
+
U.value = /* @__PURE__ */ new Set(), f(() => {
|
|
1107
|
+
ve();
|
|
1049
1108
|
});
|
|
1050
1109
|
});
|
|
1051
1110
|
}
|
|
1052
|
-
function
|
|
1053
|
-
|
|
1111
|
+
function be(e) {
|
|
1112
|
+
P.activeTab.value = e;
|
|
1054
1113
|
}
|
|
1055
|
-
function
|
|
1056
|
-
|
|
1114
|
+
function Ce() {
|
|
1115
|
+
P.api.toggleSimplified();
|
|
1057
1116
|
}
|
|
1058
|
-
function
|
|
1059
|
-
|
|
1117
|
+
function we() {
|
|
1118
|
+
P.minimized.value = !P.minimized.value;
|
|
1060
1119
|
}
|
|
1061
|
-
function
|
|
1062
|
-
|
|
1120
|
+
function Te(e) {
|
|
1121
|
+
N("fileMenuSelect", e);
|
|
1063
1122
|
}
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1123
|
+
function Ee() {
|
|
1124
|
+
P.backdropOpen.value = !1;
|
|
1066
1125
|
}
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1069
|
-
tabId:
|
|
1126
|
+
function De(e, t) {
|
|
1127
|
+
N("itemClick", {
|
|
1128
|
+
tabId: P.activeTab.value,
|
|
1070
1129
|
groupId: e,
|
|
1071
1130
|
itemId: t
|
|
1072
1131
|
});
|
|
@@ -1078,9 +1137,9 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1078
1137
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
1079
1138
|
}
|
|
1080
1139
|
function ke() {
|
|
1081
|
-
let e =
|
|
1140
|
+
let e = L.value;
|
|
1082
1141
|
if (!e?.groups?.length) {
|
|
1083
|
-
|
|
1142
|
+
P.keyTips.value = [];
|
|
1084
1143
|
return;
|
|
1085
1144
|
}
|
|
1086
1145
|
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) => {
|
|
@@ -1093,96 +1152,96 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1093
1152
|
scope: "item"
|
|
1094
1153
|
} : null;
|
|
1095
1154
|
}).filter((e) => !!e)));
|
|
1096
|
-
|
|
1155
|
+
P.keyTips.value = t;
|
|
1097
1156
|
}
|
|
1098
1157
|
function Ae(e) {
|
|
1099
|
-
let t =
|
|
1158
|
+
let t = L.value;
|
|
1100
1159
|
if (t?.groups?.length) {
|
|
1101
1160
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
1102
1161
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
1103
1162
|
if (r) {
|
|
1104
|
-
|
|
1163
|
+
De(n.id, r.id), P.keyTipsOpen.value = !1, P.keyTipsSequence.value = "";
|
|
1105
1164
|
return;
|
|
1106
1165
|
}
|
|
1107
1166
|
}
|
|
1108
1167
|
}
|
|
1109
1168
|
}
|
|
1110
1169
|
function Q() {
|
|
1111
|
-
|
|
1170
|
+
P.keyTipsSequence.value = "";
|
|
1112
1171
|
}
|
|
1113
1172
|
function je(e) {
|
|
1114
1173
|
if (!Oe(e.target)) {
|
|
1115
1174
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
1116
|
-
e.preventDefault(),
|
|
1175
|
+
e.preventDefault(), P.keyTipsOpen.value = !P.keyTipsOpen.value, P.keyTipsOpen.value || Q();
|
|
1117
1176
|
return;
|
|
1118
1177
|
}
|
|
1119
|
-
if (
|
|
1178
|
+
if (P.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
1120
1179
|
if (e.key === "Escape") {
|
|
1121
|
-
e.preventDefault(),
|
|
1180
|
+
e.preventDefault(), P.keyTipsOpen.value = !1, Q();
|
|
1122
1181
|
return;
|
|
1123
1182
|
}
|
|
1124
1183
|
if (e.key === "Backspace") {
|
|
1125
|
-
e.preventDefault(),
|
|
1184
|
+
e.preventDefault(), P.keyTipsSequence.value = P.keyTipsSequence.value.slice(0, -1);
|
|
1126
1185
|
return;
|
|
1127
1186
|
}
|
|
1128
1187
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
1129
1188
|
e.preventDefault();
|
|
1130
|
-
let t = `${
|
|
1131
|
-
|
|
1132
|
-
let n = t.toLowerCase(), r =
|
|
1189
|
+
let t = `${P.keyTipsSequence.value}${e.key.toUpperCase()}`;
|
|
1190
|
+
P.keyTipsSequence.value = t;
|
|
1191
|
+
let n = t.toLowerCase(), r = P.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
1133
1192
|
if (r) {
|
|
1134
1193
|
Ae(r);
|
|
1135
1194
|
return;
|
|
1136
1195
|
}
|
|
1137
|
-
|
|
1196
|
+
P.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Q();
|
|
1138
1197
|
}
|
|
1139
1198
|
}
|
|
1140
1199
|
}
|
|
1141
1200
|
}
|
|
1142
1201
|
function Me(e) {
|
|
1143
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
1202
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? se : null;
|
|
1144
1203
|
}
|
|
1145
1204
|
E([
|
|
1146
|
-
|
|
1147
|
-
() =>
|
|
1148
|
-
() =>
|
|
1205
|
+
z,
|
|
1206
|
+
() => P.layout.value,
|
|
1207
|
+
() => P.minimized.value
|
|
1149
1208
|
], () => {
|
|
1150
|
-
|
|
1151
|
-
}), E([
|
|
1209
|
+
ye();
|
|
1210
|
+
}), E([L, () => P.tabs.value], () => {
|
|
1152
1211
|
ke(), Q();
|
|
1153
1212
|
}, {
|
|
1154
1213
|
deep: !0,
|
|
1155
1214
|
immediate: !0
|
|
1156
|
-
}), E(() =>
|
|
1215
|
+
}), E(() => P.keyTipsOpen.value, (e) => {
|
|
1157
1216
|
e || Q();
|
|
1158
|
-
}), E(
|
|
1217
|
+
}), E(B, (e, t) => {
|
|
1159
1218
|
t && $ && $.unobserve(t), e && $ && $.observe(e);
|
|
1160
1219
|
}, { flush: "post" });
|
|
1161
1220
|
let $ = null;
|
|
1162
1221
|
return h(() => {
|
|
1163
1222
|
window.addEventListener("keydown", je), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
1164
|
-
|
|
1165
|
-
}),
|
|
1223
|
+
ye();
|
|
1224
|
+
}), B.value && $.observe(B.value)), ye();
|
|
1166
1225
|
}), g(() => {
|
|
1167
1226
|
window.removeEventListener("keydown", je), $?.disconnect();
|
|
1168
|
-
}), l(
|
|
1227
|
+
}), l(P.api), (t, l) => (_(), n(T(ne), { size: M.size }, {
|
|
1169
1228
|
default: D(() => [a("section", { class: p(["ml-ribbon", [
|
|
1170
|
-
`ml-ribbon--${T(
|
|
1171
|
-
`ml-ribbon--size-${
|
|
1229
|
+
`ml-ribbon--${T(P).layout.value}`,
|
|
1230
|
+
`ml-ribbon--size-${K.value}`,
|
|
1172
1231
|
{
|
|
1173
|
-
"ml-ribbon--minimized": T(
|
|
1174
|
-
"ml-ribbon--keytips-open": T(
|
|
1232
|
+
"ml-ribbon--minimized": T(P).minimized.value,
|
|
1233
|
+
"ml-ribbon--keytips-open": T(P).keyTipsOpen.value
|
|
1175
1234
|
}
|
|
1176
1235
|
]]) }, [
|
|
1177
|
-
a("header",
|
|
1236
|
+
a("header", et, [a("div", tt, [
|
|
1178
1237
|
s.showFileMenu ? (_(), n(Se, {
|
|
1179
1238
|
key: 0,
|
|
1180
1239
|
items: s.fileMenuItems,
|
|
1181
|
-
label:
|
|
1182
|
-
"open-backstage-label":
|
|
1240
|
+
label: Y.value.fileMenuLabel,
|
|
1241
|
+
"open-backstage-label": Y.value.fileMenuOpenBackstageLabel,
|
|
1183
1242
|
"show-open-backstage": s.showOpenBackstage,
|
|
1184
|
-
onSelect:
|
|
1185
|
-
onOpenBackstage: l[0] ||= (e) => T(
|
|
1243
|
+
onSelect: Te,
|
|
1244
|
+
onOpenBackstage: l[0] ||= (e) => T(P).backdropOpen.value = !0
|
|
1186
1245
|
}, null, 8, [
|
|
1187
1246
|
"items",
|
|
1188
1247
|
"label",
|
|
@@ -1190,69 +1249,69 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1190
1249
|
"show-open-backstage"
|
|
1191
1250
|
])) : r("", !0),
|
|
1192
1251
|
c(xe, {
|
|
1193
|
-
tabs: T(
|
|
1194
|
-
"active-tab": T(
|
|
1195
|
-
"default-contextual-title":
|
|
1196
|
-
onSelect:
|
|
1252
|
+
tabs: T(I),
|
|
1253
|
+
"active-tab": T(P).activeTab.value,
|
|
1254
|
+
"default-contextual-title": Y.value.contextualTabDefaultTitle,
|
|
1255
|
+
onSelect: be
|
|
1197
1256
|
}, null, 8, [
|
|
1198
1257
|
"tabs",
|
|
1199
1258
|
"active-tab",
|
|
1200
1259
|
"default-contextual-title"
|
|
1201
1260
|
]),
|
|
1202
|
-
|
|
1261
|
+
M.hideMinimizeButton ? r("", !0) : (_(), n(T(R), {
|
|
1203
1262
|
key: 1,
|
|
1204
|
-
content:
|
|
1263
|
+
content: Y.value.minimizeTooltip
|
|
1205
1264
|
}, {
|
|
1206
|
-
default: D(() => [c(T(
|
|
1265
|
+
default: D(() => [c(T(k), {
|
|
1207
1266
|
class: p([
|
|
1208
1267
|
"ml-ribbon__control",
|
|
1209
1268
|
"ml-ribbon__control--minimize",
|
|
1210
|
-
T(
|
|
1269
|
+
T(P).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
1211
1270
|
]),
|
|
1212
|
-
icon:
|
|
1213
|
-
onClick:
|
|
1271
|
+
icon: le.value,
|
|
1272
|
+
onClick: we
|
|
1214
1273
|
}, null, 8, ["class", "icon"])]),
|
|
1215
1274
|
_: 1
|
|
1216
1275
|
}, 8, ["content"]))
|
|
1217
|
-
]), a("div",
|
|
1218
|
-
|
|
1276
|
+
]), a("div", nt, [
|
|
1277
|
+
M.hideLayoutSwitcher ? r("", !0) : (_(), n(T(R), {
|
|
1219
1278
|
key: 0,
|
|
1220
|
-
content:
|
|
1279
|
+
content: Y.value.layoutSwitcherTooltip
|
|
1221
1280
|
}, {
|
|
1222
|
-
default: D(() => [c(T(
|
|
1281
|
+
default: D(() => [c(T(k), {
|
|
1223
1282
|
circle: "",
|
|
1224
1283
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
1225
|
-
icon: T(
|
|
1226
|
-
onClick:
|
|
1284
|
+
icon: T(H),
|
|
1285
|
+
onClick: Ce
|
|
1227
1286
|
}, null, 8, ["icon"])]),
|
|
1228
1287
|
_: 1
|
|
1229
1288
|
}, 8, ["content"])),
|
|
1230
|
-
|
|
1289
|
+
M.hideKeyTipsToggle ? r("", !0) : (_(), n(T(ie), {
|
|
1231
1290
|
key: 1,
|
|
1232
1291
|
"inline-prompt": "",
|
|
1233
1292
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
1234
|
-
"active-text":
|
|
1235
|
-
"inactive-text":
|
|
1236
|
-
"model-value": T(
|
|
1237
|
-
onChange: l[1] ||= (e) => T(
|
|
1293
|
+
"active-text": Y.value.keyTipsToggleText,
|
|
1294
|
+
"inactive-text": Y.value.keyTipsToggleText,
|
|
1295
|
+
"model-value": T(P).keyTipsOpen.value,
|
|
1296
|
+
onChange: l[1] ||= (e) => T(P).keyTipsOpen.value = !T(P).keyTipsOpen.value
|
|
1238
1297
|
}, null, 8, [
|
|
1239
1298
|
"active-text",
|
|
1240
1299
|
"inactive-text",
|
|
1241
1300
|
"model-value"
|
|
1242
1301
|
])),
|
|
1243
|
-
t.$slots["tabs-extra"] ? (_(), i("div",
|
|
1244
|
-
activeTab: T(
|
|
1245
|
-
layout: T(
|
|
1246
|
-
minimized: T(
|
|
1302
|
+
t.$slots["tabs-extra"] ? (_(), i("div", rt, [x(t.$slots, "tabs-extra", {
|
|
1303
|
+
activeTab: T(P).activeTab.value,
|
|
1304
|
+
layout: T(P).layout.value,
|
|
1305
|
+
minimized: T(P).minimized.value
|
|
1247
1306
|
})])) : r("", !0)
|
|
1248
1307
|
])]),
|
|
1249
|
-
!T(
|
|
1308
|
+
!T(P).minimized.value && L.value && T(P).layout.value === "classic" ? (_(), i("main", {
|
|
1250
1309
|
key: 0,
|
|
1251
1310
|
class: "ml-ribbon__panel",
|
|
1252
|
-
"data-active-tab":
|
|
1311
|
+
"data-active-tab": L.value.id,
|
|
1253
1312
|
ref_key: "classicPanelRef",
|
|
1254
|
-
ref:
|
|
1255
|
-
}, [(_(!0), i(e, null, b(
|
|
1313
|
+
ref: B
|
|
1314
|
+
}, [(_(!0), i(e, null, b(X.value, (e) => (_(), n($e, {
|
|
1256
1315
|
id: e.id,
|
|
1257
1316
|
key: e.id,
|
|
1258
1317
|
"data-group-id": e.id,
|
|
@@ -1265,14 +1324,14 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1265
1324
|
launcher: e.launcher,
|
|
1266
1325
|
"show-launcher-icon": e.showLauncherIcon,
|
|
1267
1326
|
"group-model": e,
|
|
1268
|
-
"overflow-trigger-aria-label":
|
|
1269
|
-
"gallery-preview-fallback":
|
|
1270
|
-
onItemClick: l[3] ||= (e) =>
|
|
1327
|
+
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
1328
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
1329
|
+
onItemClick: l[3] ||= (e) => De(e.groupId, e.itemId)
|
|
1271
1330
|
}, {
|
|
1272
|
-
default: D(() => [c(
|
|
1331
|
+
default: D(() => [c(We, {
|
|
1273
1332
|
group: e,
|
|
1274
|
-
"gallery-preview-fallback":
|
|
1275
|
-
onItemClick: l[2] ||= (e) =>
|
|
1333
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
1334
|
+
onItemClick: l[2] ||= (e) => De(e.groupId, e.itemId)
|
|
1276
1335
|
}, null, 8, ["group", "gallery-preview-fallback"])]),
|
|
1277
1336
|
_: 2
|
|
1278
1337
|
}, 1032, [
|
|
@@ -1289,70 +1348,70 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1289
1348
|
"group-model",
|
|
1290
1349
|
"overflow-trigger-aria-label",
|
|
1291
1350
|
"gallery-preview-fallback"
|
|
1292
|
-
]))), 128)),
|
|
1351
|
+
]))), 128)), Z.value.length ? (_(), i("section", at, [a("div", ot, [c(T(re), {
|
|
1293
1352
|
trigger: "click",
|
|
1294
1353
|
placement: "bottom-end",
|
|
1295
|
-
width:
|
|
1296
|
-
"popper-class":
|
|
1297
|
-
onShow: l[5] ||= (e) => T(
|
|
1298
|
-
onHide: l[6] ||= (e) => T(
|
|
1354
|
+
width: de.value,
|
|
1355
|
+
"popper-class": J.value,
|
|
1356
|
+
onShow: l[5] ||= (e) => T(P).overflowOpen.value = !0,
|
|
1357
|
+
onHide: l[6] ||= (e) => T(P).overflowOpen.value = !1
|
|
1299
1358
|
}, {
|
|
1300
1359
|
reference: D(() => [a("button", {
|
|
1301
1360
|
type: "button",
|
|
1302
1361
|
class: "ml-ribbon-overflow-trigger",
|
|
1303
|
-
"aria-label":
|
|
1304
|
-
}, [...l[8] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
1305
|
-
default: D(() => [a("div",
|
|
1362
|
+
"aria-label": Y.value.overflowTriggerAriaLabel
|
|
1363
|
+
}, [...l[8] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, st)]),
|
|
1364
|
+
default: D(() => [a("div", ct, [(_(!0), i(e, null, b(Z.value, (e) => (_(), i("section", {
|
|
1306
1365
|
key: e.id,
|
|
1307
1366
|
class: "ml-ribbon-overflow-group"
|
|
1308
|
-
}, [a("header",
|
|
1367
|
+
}, [a("header", lt, C(e.title), 1), c(We, {
|
|
1309
1368
|
group: e,
|
|
1310
|
-
"gallery-preview-fallback":
|
|
1311
|
-
onItemClick: l[4] ||= (e) =>
|
|
1369
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
1370
|
+
onItemClick: l[4] ||= (e) => De(e.groupId, e.itemId)
|
|
1312
1371
|
}, null, 8, ["group", "gallery-preview-fallback"])]))), 128))])]),
|
|
1313
1372
|
_: 1
|
|
1314
|
-
}, 8, ["width", "popper-class"])]), l[9] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
1315
|
-
!T(
|
|
1373
|
+
}, 8, ["width", "popper-class"])]), l[9] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, it)) : r("", !0),
|
|
1374
|
+
!T(P).minimized.value && L.value && T(P).layout.value === "simplified" ? (_(), i("main", {
|
|
1316
1375
|
key: 1,
|
|
1317
1376
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
1318
|
-
"data-active-tab":
|
|
1319
|
-
}, [(_(!0), i(e, null, b(
|
|
1377
|
+
"data-active-tab": L.value.id
|
|
1378
|
+
}, [(_(!0), i(e, null, b(z.value, (e) => (_(), n(T(re), {
|
|
1320
1379
|
key: e.id,
|
|
1321
1380
|
trigger: "click",
|
|
1322
1381
|
placement: "bottom-start",
|
|
1323
1382
|
width: 340,
|
|
1324
|
-
"popper-class":
|
|
1383
|
+
"popper-class": q.value
|
|
1325
1384
|
}, {
|
|
1326
|
-
reference: D(() => [a("button",
|
|
1385
|
+
reference: D(() => [a("button", dt, [Me(e) ? (_(), n(T(F), {
|
|
1327
1386
|
key: 0,
|
|
1328
1387
|
class: "ml-ribbon-simplified-group__icon"
|
|
1329
1388
|
}, {
|
|
1330
1389
|
default: D(() => [(_(), n(S(Me(e))))]),
|
|
1331
1390
|
_: 2
|
|
1332
1391
|
}, 1024)) : r("", !0), a("span", null, C(e.title), 1)])]),
|
|
1333
|
-
default: D(() => [a("div",
|
|
1334
|
-
group:
|
|
1335
|
-
"gallery-preview-fallback":
|
|
1336
|
-
onItemClick: l[7] ||= (e) =>
|
|
1392
|
+
default: D(() => [a("div", ft, [c(We, {
|
|
1393
|
+
group: fe(e),
|
|
1394
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
1395
|
+
onItemClick: l[7] ||= (e) => De(e.groupId, e.itemId)
|
|
1337
1396
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
1338
1397
|
_: 2
|
|
1339
|
-
}, 1032, ["popper-class"]))), 128))], 8,
|
|
1398
|
+
}, 1032, ["popper-class"]))), 128))], 8, ut)) : r("", !0),
|
|
1340
1399
|
c(me, {
|
|
1341
|
-
open: T(
|
|
1342
|
-
size:
|
|
1343
|
-
"back-label":
|
|
1344
|
-
title:
|
|
1345
|
-
description:
|
|
1346
|
-
onClose:
|
|
1400
|
+
open: T(P).backdropOpen.value,
|
|
1401
|
+
size: K.value,
|
|
1402
|
+
"back-label": Y.value.backstageBackLabel,
|
|
1403
|
+
title: Y.value.backstageTitle,
|
|
1404
|
+
description: Y.value.backstageDescription,
|
|
1405
|
+
onClose: Ee
|
|
1347
1406
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
1348
1407
|
name: "default",
|
|
1349
1408
|
fn: D(() => [x(t.$slots, "backstage", {
|
|
1350
|
-
close:
|
|
1351
|
-
open: T(
|
|
1352
|
-
size:
|
|
1353
|
-
backLabel:
|
|
1354
|
-
title:
|
|
1355
|
-
description:
|
|
1409
|
+
close: Ee,
|
|
1410
|
+
open: T(P).backdropOpen.value,
|
|
1411
|
+
size: K.value,
|
|
1412
|
+
backLabel: Y.value.backstageBackLabel,
|
|
1413
|
+
title: Y.value.backstageTitle,
|
|
1414
|
+
description: Y.value.backstageDescription
|
|
1356
1415
|
})]),
|
|
1357
1416
|
key: "0"
|
|
1358
1417
|
} : void 0]), 1032, [
|
|
@@ -1366,10 +1425,10 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1366
1425
|
_: 3
|
|
1367
1426
|
}, 8, ["size"]));
|
|
1368
1427
|
}
|
|
1369
|
-
}),
|
|
1428
|
+
}), ht = {
|
|
1370
1429
|
class: "ml-ribbon-tab-definition",
|
|
1371
1430
|
hidden: ""
|
|
1372
|
-
},
|
|
1431
|
+
}, gt = /* @__PURE__ */ l({
|
|
1373
1432
|
__name: "RibbonTab",
|
|
1374
1433
|
props: {
|
|
1375
1434
|
id: {},
|
|
@@ -1380,13 +1439,13 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1380
1439
|
contextualTitle: {}
|
|
1381
1440
|
},
|
|
1382
1441
|
setup(e) {
|
|
1383
|
-
return (e, t) => (_(), i("div",
|
|
1442
|
+
return (e, t) => (_(), i("div", ht, [x(e.$slots, "default")]));
|
|
1384
1443
|
}
|
|
1385
|
-
}),
|
|
1444
|
+
}), _t = {
|
|
1386
1445
|
key: 0,
|
|
1387
1446
|
class: "ml-ribbon-keytips",
|
|
1388
1447
|
"aria-live": "polite"
|
|
1389
|
-
},
|
|
1448
|
+
}, vt = { class: "ml-ribbon-keytips__hint" }, yt = /* @__PURE__ */ l({
|
|
1390
1449
|
__name: "RibbonKeyTips",
|
|
1391
1450
|
props: {
|
|
1392
1451
|
open: { type: Boolean },
|
|
@@ -1421,11 +1480,11 @@ var ue = { class: "ml-ribbon-backstage__nav" }, de = { class: "ml-ribbon-backsta
|
|
|
1421
1480
|
}
|
|
1422
1481
|
return h(() => window.addEventListener("keydown", S)), g(() => window.removeEventListener("keydown", S)), E(() => s.open, (e) => {
|
|
1423
1482
|
e || x();
|
|
1424
|
-
}), (t, o) => n.open ? (_(), i("div",
|
|
1483
|
+
}), (t, o) => n.open ? (_(), i("div", _t, [a("div", vt, C(f.value), 1), (_(!0), i(e, null, b(u.value, (e) => (_(), i("span", {
|
|
1425
1484
|
key: e.id,
|
|
1426
1485
|
class: "ml-ribbon-keytip"
|
|
1427
1486
|
}, C(e.key), 1))), 128))])) : r("", !0);
|
|
1428
1487
|
}
|
|
1429
1488
|
});
|
|
1430
1489
|
//#endregion
|
|
1431
|
-
export {
|
|
1490
|
+
export { mt as MlRibbon, me as MlRibbonBackstage, Ce as MlRibbonCollection, xe as MlRibbonContextualTabs, Se as MlRibbonFileMenu, Q as MlRibbonGallery, $e as MlRibbonGroup, $ as MlRibbonGroupButton, Ue as MlRibbonItemHost, yt as MlRibbonKeyTips, gt as MlRibbonTab, _e as MlRibbonTabs, Pe as MlRibbonTemplateItem };
|