@mlightcad/ribbon 0.1.13 → 0.1.15
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 +2 -2
- package/dist/components/Ribbon.vue.d.ts +2 -2
- package/dist/components/RibbonClassicOverflow.vue.d.ts +26 -0
- package/dist/items/RibbonButton.vue.d.ts +4 -1
- package/dist/items/RibbonDropdown.vue.d.ts +2 -1
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +700 -650
- package/dist/ml-ribbon.umd.js +4 -1
- package/dist/utils/labelLines.d.ts +12 -0
- package/package.json +1 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
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, resolveComponent as C, resolveDynamicComponent as w, toDisplayString as T, toRaw as E, unref as D, watch as O, withCtx as k, withKeys as A, withModifiers as ee } from "vue";
|
|
2
2
|
import { ElButton as te, ElButtonGroup as j, ElCheckbox as M, ElColorPicker as N, ElConfigProvider as ne, ElDrawer as P, ElDropdown as F, ElDropdownItem as I, ElDropdownMenu as re, ElIcon as L, ElInputNumber as R, ElOption as z, ElPopover as ie, ElSegmented as B, ElSelect as V, ElSwitch as ae, ElTooltip as H, useGlobalConfig as oe } from "element-plus";
|
|
3
|
-
import { ArrowDown as se, ArrowDownBold as ce, ArrowRight as
|
|
3
|
+
import { ArrowDown as se, ArrowDownBold as ce, ArrowRight as U, ArrowUp as le, ArrowUpBold as ue, Bottom as W, Check as G, Grid as de, Menu as fe, Promotion as pe } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
|
-
var
|
|
5
|
+
var me = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/ribbon/composables/useRibbonState.ts
|
|
8
|
-
function
|
|
8
|
+
function K(e) {
|
|
9
9
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(E(e)) : e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function q(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 = K(t.component)), "icon" in t && (t.icon = K(t.icon)), "activeIcon" in t && (t.activeIcon = K(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = K(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: K(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,54 +28,54 @@ function K(e) {
|
|
|
28
28
|
let t = e;
|
|
29
29
|
return {
|
|
30
30
|
...t,
|
|
31
|
-
preview:
|
|
32
|
-
icon:
|
|
33
|
-
component:
|
|
31
|
+
preview: K(t.preview),
|
|
32
|
+
icon: K(t.icon),
|
|
33
|
+
component: K(t.component)
|
|
34
34
|
};
|
|
35
35
|
}) : t.items
|
|
36
36
|
};
|
|
37
37
|
})), t;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function J(e) {
|
|
40
40
|
return {
|
|
41
41
|
...e,
|
|
42
|
-
icon:
|
|
43
|
-
props:
|
|
42
|
+
icon: K(e.icon),
|
|
43
|
+
props: q(e.props)
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function he(e) {
|
|
47
47
|
return {
|
|
48
48
|
...e,
|
|
49
|
-
icon:
|
|
50
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
49
|
+
icon: K(e.icon),
|
|
50
|
+
footerMenuItems: e.footerMenuItems?.map(J),
|
|
51
51
|
collections: e.collections?.map((e) => ({
|
|
52
52
|
...e,
|
|
53
|
-
items: e.items.map(
|
|
53
|
+
items: e.items.map(J)
|
|
54
54
|
}))
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function ge(e) {
|
|
58
58
|
return {
|
|
59
59
|
...e,
|
|
60
|
-
groups: e.groups?.map(
|
|
60
|
+
groups: e.groups?.map(he)
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
+
function _e(e) {
|
|
64
|
+
return e.map(ge);
|
|
65
|
+
}
|
|
63
66
|
function ve(e) {
|
|
64
|
-
return e.
|
|
67
|
+
return e != null && e.visible !== !1;
|
|
65
68
|
}
|
|
66
69
|
function ye(e) {
|
|
67
|
-
return e
|
|
70
|
+
return e.find(ve)?.id ?? "";
|
|
68
71
|
}
|
|
69
72
|
function be(e) {
|
|
70
|
-
return e.find(ye)?.id ?? "";
|
|
71
|
-
}
|
|
72
|
-
function xe(e) {
|
|
73
73
|
(!e.collections || e.collections.length === 0) && (e.collections = [{
|
|
74
74
|
id: `${e.id}-collection-1`,
|
|
75
75
|
items: []
|
|
76
76
|
}]);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Y(e, t, n, r, i) {
|
|
79
79
|
let a = e.find((e) => e.id === t);
|
|
80
80
|
if (!a?.groups) return;
|
|
81
81
|
let o = a.groups.find((e) => e.id === n);
|
|
@@ -83,10 +83,10 @@ function J(e, t, n, r, i) {
|
|
|
83
83
|
let s = o.collections.find((e) => e.id === r);
|
|
84
84
|
s && i(s.items);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
let l = b(r), u = b(i), d = b(a), f = b(
|
|
86
|
+
function xe(e, n, r, i, a, o, s, c) {
|
|
87
|
+
let l = b(r), u = b(i), d = b(a), f = b(ve(n.find((e) => e.id === o)) ? o : ye(n)), p = b(_e(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 = {
|
|
88
88
|
addTab(e) {
|
|
89
|
-
p.value.push(
|
|
89
|
+
p.value.push(ge(e)), f.value ||= e.id;
|
|
90
90
|
},
|
|
91
91
|
removeTab(e) {
|
|
92
92
|
p.value = p.value.filter((t) => t.id !== e), f.value === e && (f.value = S.value[0]?.id ?? "");
|
|
@@ -97,14 +97,14 @@ function Se(e, n, r, i, a, o, s, c) {
|
|
|
97
97
|
},
|
|
98
98
|
hideTab(e) {
|
|
99
99
|
let t = p.value.find((t) => t.id === e);
|
|
100
|
-
t && (t.visible = !1), f.value === e && (f.value =
|
|
100
|
+
t && (t.visible = !1), f.value === e && (f.value = ye(p.value));
|
|
101
101
|
},
|
|
102
102
|
selectTab(e) {
|
|
103
103
|
f.value = e;
|
|
104
104
|
},
|
|
105
105
|
addGroup(e, t) {
|
|
106
106
|
let n = p.value.find((t) => t.id === e);
|
|
107
|
-
n && (n.groups ??= [],
|
|
107
|
+
n && (n.groups ??= [], be(t), n.groups.push(he(t)));
|
|
108
108
|
},
|
|
109
109
|
removeGroup(e, t) {
|
|
110
110
|
let n = p.value.find((t) => t.id === e);
|
|
@@ -119,16 +119,16 @@ function Se(e, n, r, i, a, o, s, c) {
|
|
|
119
119
|
n && (n.visible = !1);
|
|
120
120
|
},
|
|
121
121
|
addItem(e, t, n, r) {
|
|
122
|
-
|
|
122
|
+
Y(p.value, e, t, n, (e) => e.push(J(r)));
|
|
123
123
|
},
|
|
124
124
|
removeItem(e, t, n, r) {
|
|
125
|
-
|
|
125
|
+
Y(p.value, e, t, n, (e) => {
|
|
126
126
|
let t = e.findIndex((e) => e.id === r);
|
|
127
127
|
t >= 0 && e.splice(t, 1);
|
|
128
128
|
});
|
|
129
129
|
},
|
|
130
130
|
updateItem(e, t, n, r, i) {
|
|
131
|
-
|
|
131
|
+
Y(p.value, e, t, n, (e) => {
|
|
132
132
|
let t = e.find((e) => e.id === r);
|
|
133
133
|
t && Object.assign(t, i);
|
|
134
134
|
});
|
|
@@ -177,7 +177,7 @@ function Se(e, n, r, i, a, o, s, c) {
|
|
|
177
177
|
}
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region src/ribbon/modules/RibbonBackstage.vue?vue&type=script&setup=true&lang.ts
|
|
180
|
-
var
|
|
180
|
+
var X = { class: "ml-ribbon-backstage__nav" }, Z = { class: "ml-ribbon-backstage__content" }, Q = { key: 0 }, Se = { key: 1 }, Ce = /* @__PURE__ */ l({
|
|
181
181
|
__name: "RibbonBackstage",
|
|
182
182
|
props: {
|
|
183
183
|
open: { type: Boolean },
|
|
@@ -206,24 +206,24 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
206
206
|
title: l.title,
|
|
207
207
|
description: l.description,
|
|
208
208
|
size: l.size
|
|
209
|
-
}) : (v(), i(e, { key: 1 }, [a("aside",
|
|
209
|
+
}) : (v(), i(e, { key: 1 }, [a("aside", X, [c(D(te), {
|
|
210
210
|
type: "primary",
|
|
211
211
|
onClick: d
|
|
212
212
|
}, {
|
|
213
213
|
default: k(() => [s(T(l.backLabel), 1)]),
|
|
214
214
|
_: 1
|
|
215
|
-
})]), a("section",
|
|
215
|
+
})]), a("section", Z, [l.title ? (v(), i("h2", Q, T(l.title), 1)) : r("", !0), l.description ? (v(), i("p", Se, T(l.description), 1)) : r("", !0)])], 64))], 2)]),
|
|
216
216
|
_: 3
|
|
217
217
|
}, 8, ["model-value"]));
|
|
218
218
|
}
|
|
219
|
-
}),
|
|
219
|
+
}), we = {
|
|
220
220
|
class: "ml-ribbon-tabs",
|
|
221
221
|
role: "tablist"
|
|
222
|
-
},
|
|
222
|
+
}, $ = [
|
|
223
223
|
"aria-selected",
|
|
224
224
|
"disabled",
|
|
225
225
|
"onClick"
|
|
226
|
-
],
|
|
226
|
+
], Te = /* @__PURE__ */ l({
|
|
227
227
|
__name: "RibbonTabs",
|
|
228
228
|
props: {
|
|
229
229
|
tabs: {},
|
|
@@ -239,7 +239,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
239
239
|
triggerEl: t.currentTarget instanceof HTMLElement ? t.currentTarget : null
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
|
-
return (t, r) => (v(), i("div",
|
|
242
|
+
return (t, r) => (v(), i("div", we, [(v(!0), i(e, null, x(s.value, (e) => (v(), i("button", {
|
|
243
243
|
key: e.id,
|
|
244
244
|
type: "button",
|
|
245
245
|
class: m(["ml-ribbon-tab", { "is-active": n.activeTab === e.id }]),
|
|
@@ -247,9 +247,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
247
247
|
"aria-selected": n.activeTab === e.id,
|
|
248
248
|
disabled: a.disabled,
|
|
249
249
|
onClick: (t) => c(e.id, t)
|
|
250
|
-
}, T(e.title), 11,
|
|
250
|
+
}, T(e.title), 11, $))), 128))]));
|
|
251
251
|
}
|
|
252
|
-
}),
|
|
252
|
+
}), Ee = { class: "ml-ribbon-contextual-tabs" }, De = { class: "ml-ribbon-contextual-tabs__normal" }, Oe = { class: "ml-ribbon-contextual-tabs__ctx" }, ke = { key: 0 }, Ae = /* @__PURE__ */ l({
|
|
253
253
|
__name: "RibbonContextualTabs",
|
|
254
254
|
props: {
|
|
255
255
|
tabs: {},
|
|
@@ -259,7 +259,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
259
259
|
emits: ["select"],
|
|
260
260
|
setup(t, { emit: n }) {
|
|
261
261
|
let o = t, s = n;
|
|
262
|
-
return (n, l) => (v(), i("div",
|
|
262
|
+
return (n, l) => (v(), i("div", Ee, [a("div", De, [c(Te, {
|
|
263
263
|
tabs: o.tabs.filter((e) => !e.contextual),
|
|
264
264
|
"active-tab": t.activeTab,
|
|
265
265
|
disabled: o.disabled,
|
|
@@ -268,11 +268,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
268
268
|
"tabs",
|
|
269
269
|
"active-tab",
|
|
270
270
|
"disabled"
|
|
271
|
-
])]), a("div",
|
|
271
|
+
])]), a("div", Oe, [(v(!0), i(e, null, x(o.tabs.filter((e) => e.contextual), (e) => (v(), i("section", {
|
|
272
272
|
key: e.id,
|
|
273
273
|
class: "ml-ribbon-contextual-tabs__block",
|
|
274
274
|
style: h({ "--ctx-color": e.contextualColor || "#67c23a" })
|
|
275
|
-
}, [e.contextualTitle?.trim() ? (v(), i("small",
|
|
275
|
+
}, [e.contextualTitle?.trim() ? (v(), i("small", ke, T(e.contextualTitle.trim()), 1)) : r("", !0), c(Te, {
|
|
276
276
|
tabs: [e],
|
|
277
277
|
"active-tab": t.activeTab,
|
|
278
278
|
disabled: o.disabled,
|
|
@@ -283,7 +283,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
283
283
|
"disabled"
|
|
284
284
|
])], 4))), 128))])]));
|
|
285
285
|
}
|
|
286
|
-
}),
|
|
286
|
+
}), je = { class: "ml-ribbon-file-menu-submenu__trigger" }, Me = /* @__PURE__ */ l({
|
|
287
287
|
__name: "RibbonFileMenuItem",
|
|
288
288
|
props: {
|
|
289
289
|
item: {},
|
|
@@ -327,8 +327,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
327
327
|
]))), 128))]),
|
|
328
328
|
_: 1
|
|
329
329
|
})]),
|
|
330
|
-
default: k(() => [a("span",
|
|
331
|
-
default: k(() => [c(D(
|
|
330
|
+
default: k(() => [a("span", je, [s(T(o.item.label) + " ", 1), c(D(L), { class: "ml-ribbon-file-menu-submenu__arrow" }, {
|
|
331
|
+
default: k(() => [c(D(U))]),
|
|
332
332
|
_: 1
|
|
333
333
|
})])]),
|
|
334
334
|
_: 1
|
|
@@ -349,7 +349,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
349
349
|
]));
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
}),
|
|
352
|
+
}), Ne = ["disabled"], Pe = /* @__PURE__ */ l({
|
|
353
353
|
__name: "RibbonFileMenu",
|
|
354
354
|
props: {
|
|
355
355
|
items: {},
|
|
@@ -387,7 +387,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
387
387
|
}, {
|
|
388
388
|
default: k(() => [s(T(u.openBackstageLabel), 1)]),
|
|
389
389
|
_: 1
|
|
390
|
-
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(
|
|
390
|
+
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(Me, {
|
|
391
391
|
key: e.id,
|
|
392
392
|
item: e,
|
|
393
393
|
divided: e.divided === !0 || u.showOpenBackstage !== !1 && t === 0,
|
|
@@ -404,11 +404,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
404
404
|
type: "button",
|
|
405
405
|
class: m(["ml-ribbon-tab ml-ribbon-tab--file", { "is-active": f.value }]),
|
|
406
406
|
disabled: u.disabled
|
|
407
|
-
}, T(u.label), 11,
|
|
407
|
+
}, T(u.label), 11, Ne)]),
|
|
408
408
|
_: 1
|
|
409
409
|
}, 8, ["disabled", "popper-class"]));
|
|
410
410
|
}
|
|
411
|
-
}),
|
|
411
|
+
}), Fe = /* @__PURE__ */ l({
|
|
412
412
|
__name: "RibbonCollection",
|
|
413
413
|
props: {
|
|
414
414
|
id: {},
|
|
@@ -422,10 +422,21 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
422
422
|
style: h(r.value)
|
|
423
423
|
}, [S(e.$slots, "default")], 6));
|
|
424
424
|
}
|
|
425
|
-
})
|
|
425
|
+
});
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/ribbon/utils/labelLines.ts
|
|
428
|
+
function Ie(e) {
|
|
429
|
+
return e.replace(/\r\n?/g, "\n").split("\n");
|
|
430
|
+
}
|
|
431
|
+
function Le(e) {
|
|
432
|
+
return e.replace(/\r\n?/g, "\n").replace(/\n+/g, " ");
|
|
433
|
+
}
|
|
434
|
+
//#endregion
|
|
435
|
+
//#region src/ribbon/items/RibbonButton.vue?vue&type=script&setup=true&lang.ts
|
|
436
|
+
var Re = {
|
|
426
437
|
key: 3,
|
|
427
438
|
class: "ml-ribbon-item-host__label ml-ribbon-button__label"
|
|
428
|
-
},
|
|
439
|
+
}, ze = { key: 0 }, Be = /* @__PURE__ */ l({
|
|
429
440
|
name: "MlRibbonButton",
|
|
430
441
|
__name: "RibbonButton",
|
|
431
442
|
props: {
|
|
@@ -447,47 +458,50 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
447
458
|
nativeType: { default: "button" }
|
|
448
459
|
},
|
|
449
460
|
emits: ["click"],
|
|
450
|
-
setup(
|
|
451
|
-
let
|
|
452
|
-
if (typeof
|
|
453
|
-
let e =
|
|
461
|
+
setup(a, { emit: o }) {
|
|
462
|
+
let c = a, l = o, u = t(() => c.label === void 0 ? c.id : c.label.trim()), d = t(() => !c.hideLabel && u.value.length > 0), f = t(() => Ie(u.value)), p = t(() => c.ariaLabel?.trim() || Le(u.value) || c.id), g = t(() => !c.icon || typeof c.icon == "string" ? null : c.icon), _ = t(() => {
|
|
463
|
+
if (typeof c.icon != "string") return null;
|
|
464
|
+
let e = c.icon.trim();
|
|
454
465
|
return e.length > 0 ? e : null;
|
|
455
|
-
}),
|
|
456
|
-
if (
|
|
466
|
+
}), y = t(() => d.value ? "ml-ribbon-item-host__icon--with-label" : "ml-ribbon-item-host__icon--icon-only"), b = t(() => {
|
|
467
|
+
if (c.iconSize) return { fontSize: c.iconSize };
|
|
457
468
|
});
|
|
458
|
-
function
|
|
459
|
-
|
|
469
|
+
function C(e) {
|
|
470
|
+
c.disabled || l("click", e);
|
|
460
471
|
}
|
|
461
|
-
return (t,
|
|
472
|
+
return (t, o) => (v(), n(D(te), {
|
|
462
473
|
class: "ml-ribbon-button",
|
|
463
|
-
"data-ribbon-button-id":
|
|
464
|
-
type:
|
|
465
|
-
size:
|
|
466
|
-
"native-type":
|
|
467
|
-
disabled:
|
|
468
|
-
"aria-label":
|
|
469
|
-
onClick:
|
|
474
|
+
"data-ribbon-button-id": a.id,
|
|
475
|
+
type: a.buttonType,
|
|
476
|
+
size: a.size,
|
|
477
|
+
"native-type": a.nativeType,
|
|
478
|
+
disabled: a.disabled,
|
|
479
|
+
"aria-label": p.value,
|
|
480
|
+
onClick: C
|
|
470
481
|
}, {
|
|
471
482
|
default: k(() => [
|
|
472
483
|
t.$slots.icon ? (v(), i("span", {
|
|
473
484
|
key: 0,
|
|
474
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon",
|
|
475
|
-
style: h(
|
|
485
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", y.value]),
|
|
486
|
+
style: h(b.value),
|
|
476
487
|
"aria-hidden": "true"
|
|
477
|
-
}, [S(t.$slots, "icon")], 6)) :
|
|
488
|
+
}, [S(t.$slots, "icon")], 6)) : g.value ? (v(), n(D(L), {
|
|
478
489
|
key: 1,
|
|
479
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon",
|
|
480
|
-
style: h(
|
|
490
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", y.value]),
|
|
491
|
+
style: h(b.value)
|
|
481
492
|
}, {
|
|
482
|
-
default: k(() => [(v(), n(w(
|
|
493
|
+
default: k(() => [(v(), n(w(g.value)))]),
|
|
483
494
|
_: 1
|
|
484
|
-
}, 8, ["class", "style"])) :
|
|
495
|
+
}, 8, ["class", "style"])) : _.value ? (v(), i("i", {
|
|
485
496
|
key: 2,
|
|
486
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class ml-ribbon-button__icon", [
|
|
487
|
-
style: h(
|
|
497
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class ml-ribbon-button__icon", [_.value, y.value]]),
|
|
498
|
+
style: h(b.value),
|
|
488
499
|
"aria-hidden": "true"
|
|
489
500
|
}, null, 6)) : r("", !0),
|
|
490
|
-
|
|
501
|
+
d.value ? (v(), i("span", Re, [S(t.$slots, "label", {
|
|
502
|
+
label: u.value,
|
|
503
|
+
lines: f.value
|
|
504
|
+
}, () => [(v(!0), i(e, null, x(f.value, (t, n) => (v(), i(e, { key: n }, [n > 0 ? (v(), i("br", ze)) : r("", !0), s(T(t), 1)], 64))), 128))])])) : r("", !0),
|
|
491
505
|
S(t.$slots, "default")
|
|
492
506
|
]),
|
|
493
507
|
_: 3
|
|
@@ -500,10 +514,10 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
500
514
|
"aria-label"
|
|
501
515
|
]));
|
|
502
516
|
}
|
|
503
|
-
}),
|
|
517
|
+
}), Ve = ["data-id"], He = {
|
|
504
518
|
key: 0,
|
|
505
519
|
class: "ml-ribbon-button-group__label"
|
|
506
|
-
},
|
|
520
|
+
}, Ue = { class: "ml-ribbon-button-group__text" }, We = /* @__PURE__ */ l({
|
|
507
521
|
__name: "RibbonButtonGroup",
|
|
508
522
|
props: {
|
|
509
523
|
id: {},
|
|
@@ -560,7 +574,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
560
574
|
"ml-ribbon-button-group--equal-width": !t.wrap && t.equalWidth
|
|
561
575
|
}]),
|
|
562
576
|
"data-id": t.id
|
|
563
|
-
}, [!t.hideLabel && t.label ? (v(), i("div",
|
|
577
|
+
}, [!t.hideLabel && t.label ? (v(), i("div", He, T(t.label), 1)) : r("", !0), c(D(j), null, {
|
|
564
578
|
default: k(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(D(H), {
|
|
565
579
|
key: String(e.value),
|
|
566
580
|
content: g(e),
|
|
@@ -570,7 +584,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
570
584
|
placement: "top",
|
|
571
585
|
effect: "dark"
|
|
572
586
|
}, {
|
|
573
|
-
default: k(() => [c(
|
|
587
|
+
default: k(() => [c(Be, {
|
|
574
588
|
id: String(e.value),
|
|
575
589
|
class: "ml-ribbon-button-group__button",
|
|
576
590
|
label: e.label,
|
|
@@ -583,7 +597,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
583
597
|
onClick: (t) => d(e.value)
|
|
584
598
|
}, o({ _: 2 }, [f(e.label) ? {
|
|
585
599
|
name: "label",
|
|
586
|
-
fn: k(() => [a("span",
|
|
600
|
+
fn: k(() => [a("span", Ue, T(e.label), 1)]),
|
|
587
601
|
key: "0"
|
|
588
602
|
} : void 0]), 1032, [
|
|
589
603
|
"id",
|
|
@@ -604,16 +618,16 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
604
618
|
"hide-after"
|
|
605
619
|
]))), 128))]),
|
|
606
620
|
_: 1
|
|
607
|
-
})], 10,
|
|
621
|
+
})], 10, Ve));
|
|
608
622
|
}
|
|
609
|
-
}),
|
|
623
|
+
}), Ge = { class: "ml-ribbon-item-host__content ml-ribbon-dropdown__content" }, Ke = { class: "ml-ribbon-item-host__text-row ml-ribbon-dropdown__text-row" }, qe = {
|
|
610
624
|
key: 0,
|
|
611
625
|
class: "ml-ribbon-item-host__label ml-ribbon-dropdown__label"
|
|
612
|
-
},
|
|
626
|
+
}, Je = { key: 0 }, Ye = { class: "ml-ribbon-dropdown-item__content" }, Xe = { class: "ml-ribbon-dropdown-item__row" }, Ze = {
|
|
613
627
|
key: 0,
|
|
614
628
|
class: "ml-ribbon-dropdown-item__check",
|
|
615
629
|
"aria-hidden": "true"
|
|
616
|
-
},
|
|
630
|
+
}, Qe = { class: "ml-ribbon-dropdown-item__main" }, $e = { class: "ml-ribbon-dropdown-item__label" }, et = /* @__PURE__ */ ((e, t) => {
|
|
617
631
|
let n = e.__vccOpts || e;
|
|
618
632
|
for (let [e, r] of t) n[e] = r;
|
|
619
633
|
return n;
|
|
@@ -654,82 +668,82 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
654
668
|
O(() => u.modelValue, (e) => {
|
|
655
669
|
e !== void 0 && (g.value = e);
|
|
656
670
|
}, { immediate: !0 });
|
|
657
|
-
let _ = t(() => Array.isArray(u.options) ? u.options : []), y = t(() => _.value.find((e) =>
|
|
671
|
+
let _ = t(() => Array.isArray(u.options) ? u.options : []), y = t(() => _.value.find((e) => U(e) === g.value) || (u.syncLabelWithSelection && g.value === void 0 ? _.value[0] ?? null : null)), C = t(() => {
|
|
658
672
|
if (y.value && u.syncLabelWithSelection) {
|
|
659
|
-
let e =
|
|
673
|
+
let e = W(y.value);
|
|
660
674
|
if (e) return e;
|
|
661
675
|
}
|
|
662
676
|
return pe(u.label) ?? u.id;
|
|
663
|
-
}), E = t(() => !u.hideLabel && C.value.length > 0), A = t(() => u.modelValue !== void 0
|
|
677
|
+
}), E = t(() => !u.hideLabel && C.value.length > 0), A = t(() => Ie(C.value)), j = t(() => u.modelValue !== void 0), M = t(() => {
|
|
664
678
|
if (y.value) {
|
|
665
|
-
let e =
|
|
679
|
+
let e = ae(y.value);
|
|
666
680
|
if (e) return e;
|
|
667
681
|
}
|
|
668
682
|
return !u.icon || typeof u.icon == "string" ? null : u.icon;
|
|
669
|
-
}),
|
|
683
|
+
}), N = t(() => {
|
|
670
684
|
if (y.value) {
|
|
671
|
-
let e =
|
|
685
|
+
let e = ce(y.value);
|
|
672
686
|
if (e) return e;
|
|
673
687
|
}
|
|
674
688
|
if (typeof u.icon != "string") return null;
|
|
675
689
|
let e = u.icon.trim();
|
|
676
690
|
return e.length > 0 ? e : null;
|
|
677
|
-
}),
|
|
691
|
+
}), ne = t(() => !!(M.value || N.value)), P = t(() => Le(fe(y.value) ?? pe(u.tooltip) ?? pe(C.value) ?? pe(u.label) ?? me(u.id))), R = t(() => [
|
|
678
692
|
"ml-ribbon-dropdown-menu",
|
|
679
693
|
"ml-ribbon-popper",
|
|
680
694
|
`ml-ribbon-popper--size-${p.value}`,
|
|
681
695
|
u.popperClass
|
|
682
696
|
].filter(Boolean).join(" "));
|
|
683
|
-
function
|
|
697
|
+
function z(e) {
|
|
684
698
|
if (u.disabled) {
|
|
685
699
|
h.value = !1;
|
|
686
700
|
return;
|
|
687
701
|
}
|
|
688
702
|
h.value = e;
|
|
689
703
|
}
|
|
690
|
-
function
|
|
704
|
+
function ie() {
|
|
691
705
|
u.disabled || (h.value = !h.value);
|
|
692
706
|
}
|
|
693
|
-
function
|
|
694
|
-
u.disabled || (g.value = e, d("tooltip-change",
|
|
707
|
+
function B(e) {
|
|
708
|
+
u.disabled || (g.value = e, d("tooltip-change", fe(y.value) ?? P.value), d("command", e), h.value = !1);
|
|
695
709
|
}
|
|
696
|
-
function
|
|
710
|
+
function V() {
|
|
697
711
|
if (u.disabled) return;
|
|
698
712
|
let e = y.value;
|
|
699
713
|
if (!e) {
|
|
700
714
|
d("click");
|
|
701
715
|
return;
|
|
702
716
|
}
|
|
703
|
-
d("command",
|
|
717
|
+
d("command", U(e));
|
|
704
718
|
}
|
|
705
|
-
function
|
|
719
|
+
function ae(e) {
|
|
706
720
|
if (!e || typeof e != "object") return null;
|
|
707
721
|
let t = e.icon;
|
|
708
722
|
return !t || typeof t == "string" ? null : t;
|
|
709
723
|
}
|
|
710
|
-
function
|
|
724
|
+
function ce(e) {
|
|
711
725
|
if (!e || typeof e != "object") return null;
|
|
712
726
|
let t = e.icon;
|
|
713
727
|
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
714
728
|
}
|
|
715
|
-
function
|
|
729
|
+
function U(e) {
|
|
716
730
|
if (!(!e || typeof e != "object")) return e.value;
|
|
717
731
|
}
|
|
718
|
-
function
|
|
719
|
-
let t =
|
|
732
|
+
function ue(e) {
|
|
733
|
+
let t = U(e);
|
|
720
734
|
if (typeof t == "string" || typeof t == "number" || t && typeof t == "object") return t;
|
|
721
735
|
}
|
|
722
|
-
function
|
|
736
|
+
function W(e) {
|
|
723
737
|
if (!e || typeof e != "object") return;
|
|
724
738
|
let t = e.label;
|
|
725
739
|
return typeof t == "string" ? t : void 0;
|
|
726
740
|
}
|
|
727
|
-
function
|
|
741
|
+
function de(e) {
|
|
728
742
|
if (typeof e == "string") return me(e);
|
|
729
743
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
730
744
|
}
|
|
731
|
-
function
|
|
732
|
-
if (!(!e || typeof e != "object")) return pe(e.tooltip) ??
|
|
745
|
+
function fe(e) {
|
|
746
|
+
if (!(!e || typeof e != "object")) return pe(e.tooltip) ?? W(e) ?? de(U(e));
|
|
733
747
|
}
|
|
734
748
|
function pe(e) {
|
|
735
749
|
if (typeof e != "string") return;
|
|
@@ -740,51 +754,56 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
740
754
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
741
755
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
742
756
|
}
|
|
743
|
-
function
|
|
744
|
-
return
|
|
757
|
+
function K(e) {
|
|
758
|
+
return U(e) === g.value;
|
|
745
759
|
}
|
|
746
|
-
return (
|
|
760
|
+
return O([() => u.syncLabelWithSelection, P], () => {
|
|
761
|
+
u.syncLabelWithSelection && d("tooltip-change", P.value);
|
|
762
|
+
}, {
|
|
763
|
+
immediate: !0,
|
|
764
|
+
flush: "post"
|
|
765
|
+
}), (t, l) => (v(), n(D(F), {
|
|
747
766
|
class: m(["ml-ribbon-dropdown", [`ml-ribbon-dropdown--item-${o.itemSize}`, { "is-label-hidden": o.hideLabel }]]),
|
|
748
767
|
trigger: "click",
|
|
749
768
|
disabled: o.disabled,
|
|
750
|
-
"popper-class":
|
|
751
|
-
onVisibleChange:
|
|
752
|
-
onCommand:
|
|
769
|
+
"popper-class": R.value,
|
|
770
|
+
onVisibleChange: z,
|
|
771
|
+
onCommand: B
|
|
753
772
|
}, {
|
|
754
773
|
dropdown: k(() => [c(D(re), null, {
|
|
755
774
|
default: k(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(D(I), {
|
|
756
|
-
key: String(
|
|
757
|
-
command:
|
|
775
|
+
key: String(U(e)),
|
|
776
|
+
command: ue(e),
|
|
758
777
|
disabled: e.disabled === !0,
|
|
759
778
|
divided: e.divided === !0,
|
|
760
|
-
"aria-current":
|
|
761
|
-
class: m({ "ml-ribbon-dropdown-item--selected":
|
|
779
|
+
"aria-current": K(e) ? "true" : void 0,
|
|
780
|
+
class: m({ "ml-ribbon-dropdown-item--selected": K(e) })
|
|
762
781
|
}, {
|
|
763
782
|
default: k(() => [c(D(H), {
|
|
764
|
-
content:
|
|
765
|
-
disabled: !
|
|
783
|
+
content: fe(e),
|
|
784
|
+
disabled: !fe(e),
|
|
766
785
|
"show-after": o.tooltipShowAfter,
|
|
767
786
|
"hide-after": o.tooltipHideAfter,
|
|
768
787
|
placement: "top",
|
|
769
788
|
effect: "dark"
|
|
770
789
|
}, {
|
|
771
|
-
default: k(() => [a("span",
|
|
790
|
+
default: k(() => [a("span", Ye, [S(t.$slots, "option", { option: e }, () => [a("span", Xe, [j.value ? (v(), i("span", Ze, [K(e) ? (v(), n(D(L), {
|
|
772
791
|
key: 0,
|
|
773
792
|
class: "ml-ribbon-dropdown-item__check-icon"
|
|
774
793
|
}, {
|
|
775
|
-
default: k(() => [c(D(
|
|
794
|
+
default: k(() => [c(D(G))]),
|
|
776
795
|
_: 1
|
|
777
|
-
})) : r("", !0)])) : r("", !0), a("span",
|
|
796
|
+
})) : r("", !0)])) : r("", !0), a("span", Qe, [ae(e) ? (v(), n(D(L), {
|
|
778
797
|
key: 0,
|
|
779
798
|
class: "ml-ribbon-dropdown-item__icon"
|
|
780
799
|
}, {
|
|
781
|
-
default: k(() => [(v(), n(w(
|
|
800
|
+
default: k(() => [(v(), n(w(ae(e))))]),
|
|
782
801
|
_: 2
|
|
783
|
-
}, 1024)) :
|
|
802
|
+
}, 1024)) : ce(e) ? (v(), i("i", {
|
|
784
803
|
key: 1,
|
|
785
|
-
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class",
|
|
804
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", ce(e)]),
|
|
786
805
|
"aria-hidden": "true"
|
|
787
|
-
}, null, 2)) : r("", !0), a("span",
|
|
806
|
+
}, null, 2)) : r("", !0), a("span", $e, T(W(e)), 1)])])], !0)])]),
|
|
788
807
|
_: 2
|
|
789
808
|
}, 1032, [
|
|
790
809
|
"content",
|
|
@@ -805,25 +824,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
805
824
|
default: k(() => [c(D(te), {
|
|
806
825
|
type: "default",
|
|
807
826
|
disabled: o.disabled,
|
|
808
|
-
"aria-label":
|
|
809
|
-
onClick:
|
|
827
|
+
"aria-label": P.value,
|
|
828
|
+
onClick: ie
|
|
810
829
|
}, {
|
|
811
|
-
default: k(() => [a("span",
|
|
830
|
+
default: k(() => [a("span", Ge, [t.$slots.icon || ne.value ? (v(), i("span", {
|
|
812
831
|
key: 0,
|
|
813
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class":
|
|
814
|
-
onClick: ee(
|
|
815
|
-
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [
|
|
816
|
-
default: k(() => [(v(), n(w(
|
|
832
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class": N.value && !M.value && !t.$slots.icon }]),
|
|
833
|
+
onClick: ee(V, ["stop"])
|
|
834
|
+
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [M.value ? (v(), n(D(L), { key: 0 }, {
|
|
835
|
+
default: k(() => [(v(), n(w(M.value)))]),
|
|
817
836
|
_: 1
|
|
818
|
-
})) :
|
|
837
|
+
})) : N.value ? (v(), i("i", {
|
|
819
838
|
key: 1,
|
|
820
|
-
class: m(
|
|
839
|
+
class: m(N.value),
|
|
821
840
|
"aria-hidden": "true"
|
|
822
|
-
}, null, 2)) : r("", !0)], !0)], 2)) : r("", !0), a("span",
|
|
841
|
+
}, null, 2)) : r("", !0)], !0)], 2)) : r("", !0), a("span", Ke, [E.value ? (v(), i("span", qe, [S(t.$slots, "label", {
|
|
823
842
|
selectedOption: y.value,
|
|
824
|
-
label: C.value
|
|
825
|
-
|
|
826
|
-
|
|
843
|
+
label: C.value,
|
|
844
|
+
lines: A.value
|
|
845
|
+
}, () => [(v(!0), i(e, null, x(A.value, (t, n) => (v(), i(e, { key: n }, [n > 0 ? (v(), i("br", Je)) : r("", !0), s(T(t), 1)], 64))), 128))], !0)])) : r("", !0), c(D(L), { class: m(["ml-ribbon-item-host__dropdown-arrow ml-ribbon-dropdown__arrow", { "is-open": h.value }]) }, {
|
|
846
|
+
default: k(() => [(v(), n(w(h.value ? D(le) : D(se))))]),
|
|
827
847
|
_: 1
|
|
828
848
|
}, 8, ["class"])])])]),
|
|
829
849
|
_: 3
|
|
@@ -835,50 +855,50 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
835
855
|
"popper-class"
|
|
836
856
|
]));
|
|
837
857
|
}
|
|
838
|
-
}), [["__scopeId", "data-v-
|
|
858
|
+
}), [["__scopeId", "data-v-453b1e92"]]), tt = ["disabled"], nt = ["src"], rt = {
|
|
839
859
|
key: 3,
|
|
840
860
|
class: "ml-ribbon-gallery__preview-svg",
|
|
841
861
|
role: "presentation",
|
|
842
862
|
"aria-hidden": "true"
|
|
843
|
-
},
|
|
863
|
+
}, it = ["href"], at = { class: "ml-ribbon-gallery__label ml-ribbon-gallery__collapsed-label" }, ot = { class: "ml-ribbon-gallery__panel" }, st = {
|
|
844
864
|
key: 0,
|
|
845
865
|
class: "ml-ribbon-gallery__panel-category-title"
|
|
846
|
-
},
|
|
866
|
+
}, ct = ["disabled", "onClick"], lt = ["src"], ut = {
|
|
847
867
|
key: 3,
|
|
848
868
|
class: "ml-ribbon-gallery__preview-svg",
|
|
849
869
|
role: "presentation",
|
|
850
870
|
"aria-hidden": "true"
|
|
851
|
-
},
|
|
871
|
+
}, dt = ["href"], ft = { class: "ml-ribbon-gallery__label" }, pt = {
|
|
852
872
|
key: 1,
|
|
853
873
|
class: "ml-ribbon-gallery__title"
|
|
854
|
-
},
|
|
874
|
+
}, mt = {
|
|
855
875
|
key: 2,
|
|
856
876
|
class: "ml-ribbon-gallery__categories"
|
|
857
|
-
},
|
|
877
|
+
}, ht = {
|
|
858
878
|
key: 0,
|
|
859
879
|
class: "ml-ribbon-gallery__category-title"
|
|
860
|
-
},
|
|
880
|
+
}, gt = ["disabled", "onClick"], _t = ["src"], vt = {
|
|
861
881
|
key: 3,
|
|
862
882
|
class: "ml-ribbon-gallery__preview-svg",
|
|
863
883
|
role: "presentation",
|
|
864
884
|
"aria-hidden": "true"
|
|
865
|
-
},
|
|
885
|
+
}, yt = ["href"], bt = { class: "ml-ribbon-gallery__label" }, xt = {
|
|
866
886
|
key: 0,
|
|
867
887
|
class: "ml-ribbon-gallery__controls",
|
|
868
888
|
"aria-label": "Gallery navigation"
|
|
869
|
-
},
|
|
889
|
+
}, St = ["disabled"], Ct = ["disabled"], wt = ["disabled"], Tt = {
|
|
870
890
|
key: 0,
|
|
871
891
|
class: "ml-ribbon-gallery__panel-category-title"
|
|
872
|
-
},
|
|
892
|
+
}, Et = [
|
|
873
893
|
"data-gallery-row-index",
|
|
874
894
|
"disabled",
|
|
875
895
|
"onClick"
|
|
876
|
-
],
|
|
896
|
+
], Dt = ["src"], Ot = {
|
|
877
897
|
key: 3,
|
|
878
898
|
class: "ml-ribbon-gallery__preview-svg",
|
|
879
899
|
role: "presentation",
|
|
880
900
|
"aria-hidden": "true"
|
|
881
|
-
},
|
|
901
|
+
}, kt = ["href"], At = { class: "ml-ribbon-gallery__label" }, jt = 6, Mt = 64, Nt = 4, Pt = 16, Ft = 4, It = 22, Lt = /* @__PURE__ */ l({
|
|
882
902
|
name: "MlRibbonGallery",
|
|
883
903
|
__name: "RibbonGallery",
|
|
884
904
|
props: {
|
|
@@ -900,105 +920,105 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
900
920
|
},
|
|
901
921
|
emits: ["select"],
|
|
902
922
|
setup(o, { emit: l }) {
|
|
903
|
-
let u = o, g = l, _ = b(""), y = b(!1), C = b(0), A = b(null), ee = b(null), te = b(null), j = b(0), M = oe("size", ""), N = t(() => M.value || "default"), ne = t(() => N.value === "small" ? .92 : N.value === "large" ? 1.08 : 1), P = t(() => Math.round(
|
|
923
|
+
let u = o, g = l, _ = b(""), y = b(!1), C = b(0), A = b(null), ee = b(null), te = b(null), j = b(0), M = oe("size", ""), N = t(() => M.value || "default"), ne = t(() => N.value === "small" ? .92 : N.value === "large" ? 1.08 : 1), P = t(() => Math.round(Mt * ne.value)), F = t(() => Math.round(It * ne.value)), I = t(() => u.label?.trim() ?? ""), re = t(() => u.categories.filter((e) => e.items.length > 0).length), R = t(() => u.categories.flatMap((e) => e.items)), z = t(() => R.value.find((e) => e.id === _.value) ?? R.value[0]), B = t(() => !Number.isFinite(u.inlineItemLimit) || u.inlineItemLimit <= 0 ? 4 : Math.floor(u.inlineItemLimit)), V = t(() => {
|
|
904
924
|
let e = B.value, t = R.value.length;
|
|
905
925
|
return t === 0 ? Math.min(e, 1) : Math.min(e, t);
|
|
906
|
-
}), ae = t(() => Math.max(1, Math.ceil(R.value.length / V.value))), H = t(() => Math.min(C.value, ae.value - 1)), ce = t(() =>
|
|
926
|
+
}), ae = t(() => Math.max(1, Math.ceil(R.value.length / V.value))), H = t(() => Math.min(C.value, ae.value - 1)), ce = t(() => de.value && H.value > 0), U = t(() => de.value && H.value < ae.value - 1), ue = t(() => {
|
|
907
927
|
let e = H.value * V.value;
|
|
908
928
|
return R.value.slice(e, e + V.value);
|
|
909
|
-
}),
|
|
929
|
+
}), G = t(() => new Set(ue.value.map((e) => e.id))), de = t(() => R.value.length > V.value), fe = t(() => {
|
|
910
930
|
let e = [
|
|
911
931
|
"ml-ribbon-gallery-panel",
|
|
912
932
|
`ml-ribbon-gallery-panel--${u.collapsed ? "collapsed" : "inline"}`,
|
|
913
933
|
`ml-ribbon-gallery-panel--size-${N.value}`
|
|
914
934
|
];
|
|
915
935
|
return u.inlineItemWidthMode === "auto" && e.push("ml-ribbon-gallery-panel--item-width-auto"), e.join(" ");
|
|
916
|
-
}),
|
|
936
|
+
}), pe = t(() => ({
|
|
917
937
|
"--ml-ribbon-gallery-panel-columns": String(V.value),
|
|
918
938
|
"--ml-ribbon-gallery-panel-item-width": `${P.value}px`
|
|
919
|
-
})),
|
|
939
|
+
})), me = t(() => u.inlineItemWidthMode === "auto" ? "fit-content" : V.value * P.value + Math.max(0, V.value - 1) * Nt + jt * 2 + (u.collapsed ? Pt : Ft + F.value)), K = t(() => ({ modifiers: [{
|
|
920
940
|
name: "offset",
|
|
921
941
|
options: { offset: [j.value, 0] }
|
|
922
942
|
}] }));
|
|
923
943
|
O(() => u.modelValue, (e) => {
|
|
924
|
-
typeof e == "string" && (_.value = e,
|
|
944
|
+
typeof e == "string" && (_.value = e, ve(e));
|
|
925
945
|
}, { immediate: !0 }), O(() => [
|
|
926
946
|
R.value.map((e) => e.id).join("\0"),
|
|
927
947
|
V.value,
|
|
928
948
|
_.value
|
|
929
949
|
], () => {
|
|
930
|
-
|
|
950
|
+
ve() || (C.value = Math.min(C.value, ae.value - 1));
|
|
931
951
|
}), O(y, async (e) => {
|
|
932
|
-
!e || u.collapsed || (
|
|
952
|
+
!e || u.collapsed || (ye(), await p(), await p(), be());
|
|
933
953
|
});
|
|
934
|
-
function
|
|
954
|
+
function q(e) {
|
|
935
955
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(E(e)) : e;
|
|
936
956
|
}
|
|
937
|
-
function
|
|
957
|
+
function J(e) {
|
|
938
958
|
let t = I.value.toLowerCase(), n = e.title.trim().toLowerCase();
|
|
939
959
|
return re.value > 1 || !t || n !== t;
|
|
940
960
|
}
|
|
941
|
-
function
|
|
942
|
-
return
|
|
961
|
+
function he(e) {
|
|
962
|
+
return de.value ? e.items.filter((e) => G.value.has(e.id)) : e.items;
|
|
943
963
|
}
|
|
944
|
-
function
|
|
945
|
-
if (u.disabled || !
|
|
964
|
+
function ge(e) {
|
|
965
|
+
if (u.disabled || !de.value) return;
|
|
946
966
|
let t = H.value + e;
|
|
947
967
|
C.value = Math.min(Math.max(t, 0), ae.value - 1);
|
|
948
968
|
}
|
|
949
|
-
function
|
|
969
|
+
function _e(e) {
|
|
950
970
|
let t = R.value.findIndex((t) => t.id === e.id);
|
|
951
971
|
return t < 0 ? 0 : Math.floor(t / V.value);
|
|
952
972
|
}
|
|
953
|
-
function
|
|
973
|
+
function ve(e = _.value) {
|
|
954
974
|
let t = R.value.find((t) => t.id === e);
|
|
955
|
-
return t ? (C.value =
|
|
975
|
+
return t ? (C.value = _e(t), !0) : !1;
|
|
956
976
|
}
|
|
957
|
-
function
|
|
977
|
+
function ye() {
|
|
958
978
|
let e = A.value, t = ee.value;
|
|
959
979
|
if (!e || !t) {
|
|
960
980
|
j.value = 0;
|
|
961
981
|
return;
|
|
962
982
|
}
|
|
963
983
|
let n = e.querySelector(".ml-ribbon-gallery__grid .ml-ribbon-gallery__item")?.getBoundingClientRect().left ?? e.getBoundingClientRect().left;
|
|
964
|
-
j.value = Math.round(n - t.getBoundingClientRect().left -
|
|
984
|
+
j.value = Math.round(n - t.getBoundingClientRect().left - jt);
|
|
965
985
|
}
|
|
966
|
-
function
|
|
986
|
+
function be() {
|
|
967
987
|
let e = te.value;
|
|
968
988
|
e && e.querySelector(`[data-gallery-row-index="${H.value}"]`)?.scrollIntoView?.({ block: "start" });
|
|
969
989
|
}
|
|
970
|
-
function
|
|
971
|
-
return e.preview && typeof e.preview != "string" ?
|
|
990
|
+
function Y(e) {
|
|
991
|
+
return e.preview && typeof e.preview != "string" ? q(e.preview) : e.icon && typeof e.icon != "string" ? q(e.icon) : null;
|
|
972
992
|
}
|
|
973
|
-
function
|
|
974
|
-
return e.component ?
|
|
993
|
+
function xe(e) {
|
|
994
|
+
return e.component ? q(e.component) : null;
|
|
975
995
|
}
|
|
976
|
-
function
|
|
996
|
+
function X(e) {
|
|
977
997
|
return u.disabled || e.disabled === !0;
|
|
978
998
|
}
|
|
979
|
-
function
|
|
999
|
+
function Z(e) {
|
|
980
1000
|
if (typeof e.icon != "string") return null;
|
|
981
1001
|
let t = e.icon.trim();
|
|
982
1002
|
return t.length > 0 ? t : null;
|
|
983
1003
|
}
|
|
984
|
-
function
|
|
1004
|
+
function Q(e) {
|
|
985
1005
|
let t = e.previewSvg ?? e.svg;
|
|
986
1006
|
if (typeof t != "string") return null;
|
|
987
1007
|
let n = t.trim();
|
|
988
1008
|
return n.length > 0 ? n : null;
|
|
989
1009
|
}
|
|
990
|
-
function
|
|
1010
|
+
function Se(e) {
|
|
991
1011
|
return e.startsWith("data:image/svg+xml") || e.endsWith(".svg");
|
|
992
1012
|
}
|
|
993
|
-
function
|
|
994
|
-
let t =
|
|
995
|
-
return t ?
|
|
1013
|
+
function Ce(e) {
|
|
1014
|
+
let t = Q(e);
|
|
1015
|
+
return t ? Se(t) : !1;
|
|
996
1016
|
}
|
|
997
|
-
function
|
|
1017
|
+
function we(e) {
|
|
998
1018
|
return typeof e.preview == "string" ? e.preview : u.previewFallback;
|
|
999
1019
|
}
|
|
1000
|
-
function
|
|
1001
|
-
|
|
1020
|
+
function $(e) {
|
|
1021
|
+
X(e) || (_.value = e.id, C.value = _e(e), y.value = !1, g("select", e.id));
|
|
1002
1022
|
}
|
|
1003
1023
|
return (t, l) => (v(), i("div", {
|
|
1004
1024
|
ref_key: "galleryRef",
|
|
@@ -1017,8 +1037,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1017
1037
|
trigger: "click",
|
|
1018
1038
|
placement: "bottom-start",
|
|
1019
1039
|
disabled: o.disabled,
|
|
1020
|
-
width:
|
|
1021
|
-
"popper-class":
|
|
1040
|
+
width: me.value,
|
|
1041
|
+
"popper-class": fe.value
|
|
1022
1042
|
}, {
|
|
1023
1043
|
reference: k(() => [a("button", {
|
|
1024
1044
|
type: "button",
|
|
@@ -1026,84 +1046,84 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1026
1046
|
"is-selected": _.value === z.value.id,
|
|
1027
1047
|
"is-open": y.value
|
|
1028
1048
|
}]),
|
|
1029
|
-
disabled:
|
|
1030
|
-
}, [
|
|
1049
|
+
disabled: X(z.value)
|
|
1050
|
+
}, [xe(z.value) ? (v(), n(w(xe(z.value)), f({ key: 0 }, z.value.componentProps, {
|
|
1031
1051
|
item: z.value,
|
|
1032
1052
|
selected: _.value === z.value.id,
|
|
1033
|
-
disabled:
|
|
1053
|
+
disabled: X(z.value)
|
|
1034
1054
|
}), null, 16, [
|
|
1035
1055
|
"item",
|
|
1036
1056
|
"selected",
|
|
1037
1057
|
"disabled"
|
|
1038
1058
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview ml-ribbon-gallery__collapsed-preview", {
|
|
1039
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1040
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1041
|
-
}]) }, [
|
|
1059
|
+
"ml-ribbon-gallery__preview--icon": Y(z.value) || Z(z.value),
|
|
1060
|
+
"ml-ribbon-gallery__preview--svg": Q(z.value)
|
|
1061
|
+
}]) }, [Y(z.value) ? (v(), n(D(L), {
|
|
1042
1062
|
key: 0,
|
|
1043
1063
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1044
1064
|
}, {
|
|
1045
|
-
default: k(() => [(v(), n(w(
|
|
1065
|
+
default: k(() => [(v(), n(w(Y(z.value))))]),
|
|
1046
1066
|
_: 1
|
|
1047
|
-
})) :
|
|
1067
|
+
})) : Z(z.value) ? (v(), i("i", {
|
|
1048
1068
|
key: 1,
|
|
1049
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class",
|
|
1069
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(z.value)]),
|
|
1050
1070
|
"aria-hidden": "true"
|
|
1051
|
-
}, null, 2)) :
|
|
1071
|
+
}, null, 2)) : Q(z.value) && Ce(z.value) ? (v(), i("img", {
|
|
1052
1072
|
key: 2,
|
|
1053
1073
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1054
|
-
src:
|
|
1074
|
+
src: Q(z.value) ?? "",
|
|
1055
1075
|
alt: ""
|
|
1056
|
-
}, null, 8,
|
|
1057
|
-
default: k(() => [a("div",
|
|
1076
|
+
}, null, 8, nt)) : Q(z.value) ? (v(), i("svg", rt, [a("use", { href: Q(z.value) ?? "" }, null, 8, it)])) : (v(), i(e, { key: 4 }, [s(T(we(z.value)), 1)], 64))], 2), a("div", at, T(z.value.label), 1)], 64))], 10, tt)]),
|
|
1077
|
+
default: k(() => [a("div", ot, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1058
1078
|
key: o.id,
|
|
1059
1079
|
class: "ml-ribbon-gallery__panel-category"
|
|
1060
|
-
}, [
|
|
1080
|
+
}, [J(o) ? (v(), i("h4", st, T(o.title), 1)) : r("", !0), a("div", {
|
|
1061
1081
|
class: "ml-ribbon-gallery__panel-grid",
|
|
1062
|
-
style: h(
|
|
1082
|
+
style: h(pe.value)
|
|
1063
1083
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
1064
1084
|
key: r.id,
|
|
1065
1085
|
type: "button",
|
|
1066
1086
|
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
1067
|
-
disabled:
|
|
1068
|
-
onClick: (e) =>
|
|
1087
|
+
disabled: X(r),
|
|
1088
|
+
onClick: (e) => $(r)
|
|
1069
1089
|
}, [S(t.$slots, "item", {
|
|
1070
1090
|
item: r,
|
|
1071
1091
|
category: o,
|
|
1072
1092
|
selected: _.value === r.id,
|
|
1073
|
-
disabled:
|
|
1074
|
-
select: () =>
|
|
1075
|
-
}, () => [
|
|
1093
|
+
disabled: X(r),
|
|
1094
|
+
select: () => $(r)
|
|
1095
|
+
}, () => [xe(r) ? (v(), n(w(xe(r)), f({
|
|
1076
1096
|
key: 0,
|
|
1077
1097
|
ref_for: !0
|
|
1078
1098
|
}, r.componentProps, {
|
|
1079
1099
|
item: r,
|
|
1080
1100
|
category: o,
|
|
1081
1101
|
selected: _.value === r.id,
|
|
1082
|
-
disabled:
|
|
1102
|
+
disabled: X(r)
|
|
1083
1103
|
}), null, 16, [
|
|
1084
1104
|
"item",
|
|
1085
1105
|
"category",
|
|
1086
1106
|
"selected",
|
|
1087
1107
|
"disabled"
|
|
1088
1108
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1089
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1090
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1091
|
-
}]) }, [
|
|
1109
|
+
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
1110
|
+
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1111
|
+
}]) }, [Y(r) ? (v(), n(D(L), {
|
|
1092
1112
|
key: 0,
|
|
1093
1113
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1094
1114
|
}, {
|
|
1095
|
-
default: k(() => [(v(), n(w(
|
|
1115
|
+
default: k(() => [(v(), n(w(Y(r))))]),
|
|
1096
1116
|
_: 2
|
|
1097
|
-
}, 1024)) :
|
|
1117
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1098
1118
|
key: 1,
|
|
1099
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class",
|
|
1119
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
1100
1120
|
"aria-hidden": "true"
|
|
1101
|
-
}, null, 2)) :
|
|
1121
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
1102
1122
|
key: 2,
|
|
1103
1123
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1104
|
-
src:
|
|
1124
|
+
src: Q(r) ?? "",
|
|
1105
1125
|
alt: ""
|
|
1106
|
-
}, null, 8,
|
|
1126
|
+
}, null, 8, lt)) : Q(r) ? (v(), i("svg", ut, [a("use", { href: Q(r) ?? "" }, null, 8, dt)])) : (v(), i(e, { key: 4 }, [s(T(we(r)), 1)], 64))], 2), a("div", ft, T(r.label), 1)], 64))])], 10, ct))), 128))], 4)]))), 128))])]),
|
|
1107
1127
|
_: 3
|
|
1108
1128
|
}, 8, [
|
|
1109
1129
|
"visible",
|
|
@@ -1111,86 +1131,86 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1111
1131
|
"width",
|
|
1112
1132
|
"popper-class"
|
|
1113
1133
|
])) : r("", !0),
|
|
1114
|
-
!o.collapsed && I.value ? (v(), i("div",
|
|
1115
|
-
o.collapsed ? r("", !0) : (v(), i("div",
|
|
1134
|
+
!o.collapsed && I.value ? (v(), i("div", pt, T(I.value), 1)) : r("", !0),
|
|
1135
|
+
o.collapsed ? r("", !0) : (v(), i("div", mt, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1116
1136
|
key: o.id,
|
|
1117
1137
|
class: "ml-ribbon-gallery__category"
|
|
1118
|
-
}, [I.value &&
|
|
1138
|
+
}, [I.value && J(o) ? (v(), i("h4", ht, T(o.title), 1)) : r("", !0), a("div", {
|
|
1119
1139
|
class: "ml-ribbon-gallery__grid",
|
|
1120
1140
|
style: h({ "--ml-ribbon-gallery-inline-columns": String(V.value) })
|
|
1121
|
-
}, [(v(!0), i(e, null, x(
|
|
1141
|
+
}, [(v(!0), i(e, null, x(he(o), (r) => (v(), i("button", {
|
|
1122
1142
|
key: r.id,
|
|
1123
1143
|
type: "button",
|
|
1124
1144
|
class: m(["ml-ribbon-gallery__item", { "is-selected": _.value === r.id }]),
|
|
1125
|
-
disabled:
|
|
1126
|
-
onClick: (e) =>
|
|
1145
|
+
disabled: X(r),
|
|
1146
|
+
onClick: (e) => $(r)
|
|
1127
1147
|
}, [S(t.$slots, "item", {
|
|
1128
1148
|
item: r,
|
|
1129
1149
|
category: o,
|
|
1130
1150
|
selected: _.value === r.id,
|
|
1131
|
-
disabled:
|
|
1132
|
-
select: () =>
|
|
1133
|
-
}, () => [
|
|
1151
|
+
disabled: X(r),
|
|
1152
|
+
select: () => $(r)
|
|
1153
|
+
}, () => [xe(r) ? (v(), n(w(xe(r)), f({
|
|
1134
1154
|
key: 0,
|
|
1135
1155
|
ref_for: !0
|
|
1136
1156
|
}, r.componentProps, {
|
|
1137
1157
|
item: r,
|
|
1138
1158
|
category: o,
|
|
1139
1159
|
selected: _.value === r.id,
|
|
1140
|
-
disabled:
|
|
1160
|
+
disabled: X(r)
|
|
1141
1161
|
}), null, 16, [
|
|
1142
1162
|
"item",
|
|
1143
1163
|
"category",
|
|
1144
1164
|
"selected",
|
|
1145
1165
|
"disabled"
|
|
1146
1166
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1147
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1148
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1149
|
-
}]) }, [
|
|
1167
|
+
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
1168
|
+
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1169
|
+
}]) }, [Y(r) ? (v(), n(D(L), {
|
|
1150
1170
|
key: 0,
|
|
1151
1171
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1152
1172
|
}, {
|
|
1153
|
-
default: k(() => [(v(), n(w(
|
|
1173
|
+
default: k(() => [(v(), n(w(Y(r))))]),
|
|
1154
1174
|
_: 2
|
|
1155
|
-
}, 1024)) :
|
|
1175
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1156
1176
|
key: 1,
|
|
1157
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class",
|
|
1177
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
1158
1178
|
"aria-hidden": "true"
|
|
1159
|
-
}, null, 2)) :
|
|
1179
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
1160
1180
|
key: 2,
|
|
1161
1181
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1162
|
-
src:
|
|
1182
|
+
src: Q(r) ?? "",
|
|
1163
1183
|
alt: ""
|
|
1164
|
-
}, null, 8,
|
|
1184
|
+
}, null, 8, _t)) : Q(r) ? (v(), i("svg", vt, [a("use", { href: Q(r) ?? "" }, null, 8, yt)])) : (v(), i(e, { key: 4 }, [s(T(we(r)), 1)], 64))], 2), a("div", bt, T(r.label), 1)], 64))])], 10, gt))), 128))], 4)]))), 128)), de.value ? (v(), i("div", xt, [
|
|
1165
1185
|
a("button", {
|
|
1166
1186
|
type: "button",
|
|
1167
1187
|
class: "ml-ribbon-gallery__control-button",
|
|
1168
1188
|
disabled: o.disabled || !ce.value,
|
|
1169
1189
|
"aria-label": "Show previous gallery row",
|
|
1170
|
-
onClick: l[1] ||= (e) =>
|
|
1190
|
+
onClick: l[1] ||= (e) => ge(-1)
|
|
1171
1191
|
}, [c(D(L), null, {
|
|
1172
|
-
default: k(() => [c(D(
|
|
1192
|
+
default: k(() => [c(D(le))]),
|
|
1173
1193
|
_: 1
|
|
1174
|
-
})], 8,
|
|
1194
|
+
})], 8, St),
|
|
1175
1195
|
a("button", {
|
|
1176
1196
|
type: "button",
|
|
1177
1197
|
class: "ml-ribbon-gallery__control-button",
|
|
1178
|
-
disabled: o.disabled || !
|
|
1198
|
+
disabled: o.disabled || !U.value,
|
|
1179
1199
|
"aria-label": "Show next gallery row",
|
|
1180
|
-
onClick: l[2] ||= (e) =>
|
|
1200
|
+
onClick: l[2] ||= (e) => ge(1)
|
|
1181
1201
|
}, [c(D(L), null, {
|
|
1182
1202
|
default: k(() => [c(D(se))]),
|
|
1183
1203
|
_: 1
|
|
1184
|
-
})], 8,
|
|
1204
|
+
})], 8, Ct),
|
|
1185
1205
|
c(D(ie), {
|
|
1186
1206
|
visible: y.value,
|
|
1187
1207
|
"onUpdate:visible": l[3] ||= (e) => y.value = e,
|
|
1188
1208
|
trigger: "click",
|
|
1189
1209
|
placement: "bottom-start",
|
|
1190
1210
|
disabled: o.disabled,
|
|
1191
|
-
width:
|
|
1192
|
-
"popper-class":
|
|
1193
|
-
"popper-options":
|
|
1211
|
+
width: me.value,
|
|
1212
|
+
"popper-class": fe.value,
|
|
1213
|
+
"popper-options": K.value
|
|
1194
1214
|
}, {
|
|
1195
1215
|
reference: k(() => [a("button", {
|
|
1196
1216
|
ref_key: "inlineMoreButtonRef",
|
|
@@ -1199,11 +1219,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1199
1219
|
class: m(["ml-ribbon-gallery__control-button ml-ribbon-gallery__more-button", { "is-open": y.value }]),
|
|
1200
1220
|
disabled: o.disabled,
|
|
1201
1221
|
"aria-label": "Show more gallery items",
|
|
1202
|
-
onClick:
|
|
1222
|
+
onClick: ye
|
|
1203
1223
|
}, [c(D(L), null, {
|
|
1204
|
-
default: k(() => [c(D(
|
|
1224
|
+
default: k(() => [c(D(W))]),
|
|
1205
1225
|
_: 1
|
|
1206
|
-
})], 10,
|
|
1226
|
+
})], 10, wt)]),
|
|
1207
1227
|
default: k(() => [a("div", {
|
|
1208
1228
|
ref_key: "inlinePanelRef",
|
|
1209
1229
|
ref: te,
|
|
@@ -1211,54 +1231,54 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1211
1231
|
}, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1212
1232
|
key: o.id,
|
|
1213
1233
|
class: "ml-ribbon-gallery__panel-category"
|
|
1214
|
-
}, [
|
|
1234
|
+
}, [J(o) ? (v(), i("h4", Tt, T(o.title), 1)) : r("", !0), a("div", {
|
|
1215
1235
|
class: "ml-ribbon-gallery__panel-grid",
|
|
1216
|
-
style: h(
|
|
1236
|
+
style: h(pe.value)
|
|
1217
1237
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
1218
1238
|
key: r.id,
|
|
1219
1239
|
type: "button",
|
|
1220
1240
|
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
1221
|
-
"data-gallery-row-index":
|
|
1222
|
-
disabled:
|
|
1223
|
-
onClick: (e) =>
|
|
1241
|
+
"data-gallery-row-index": _e(r),
|
|
1242
|
+
disabled: X(r),
|
|
1243
|
+
onClick: (e) => $(r)
|
|
1224
1244
|
}, [S(t.$slots, "item", {
|
|
1225
1245
|
item: r,
|
|
1226
1246
|
category: o,
|
|
1227
1247
|
selected: _.value === r.id,
|
|
1228
|
-
disabled:
|
|
1229
|
-
select: () =>
|
|
1230
|
-
}, () => [
|
|
1248
|
+
disabled: X(r),
|
|
1249
|
+
select: () => $(r)
|
|
1250
|
+
}, () => [xe(r) ? (v(), n(w(xe(r)), f({
|
|
1231
1251
|
key: 0,
|
|
1232
1252
|
ref_for: !0
|
|
1233
1253
|
}, r.componentProps, {
|
|
1234
1254
|
item: r,
|
|
1235
1255
|
category: o,
|
|
1236
1256
|
selected: _.value === r.id,
|
|
1237
|
-
disabled:
|
|
1257
|
+
disabled: X(r)
|
|
1238
1258
|
}), null, 16, [
|
|
1239
1259
|
"item",
|
|
1240
1260
|
"category",
|
|
1241
1261
|
"selected",
|
|
1242
1262
|
"disabled"
|
|
1243
1263
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1244
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1245
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1246
|
-
}]) }, [
|
|
1264
|
+
"ml-ribbon-gallery__preview--icon": Y(r) || Z(r),
|
|
1265
|
+
"ml-ribbon-gallery__preview--svg": Q(r)
|
|
1266
|
+
}]) }, [Y(r) ? (v(), n(D(L), {
|
|
1247
1267
|
key: 0,
|
|
1248
1268
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1249
1269
|
}, {
|
|
1250
|
-
default: k(() => [(v(), n(w(
|
|
1270
|
+
default: k(() => [(v(), n(w(Y(r))))]),
|
|
1251
1271
|
_: 2
|
|
1252
|
-
}, 1024)) :
|
|
1272
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1253
1273
|
key: 1,
|
|
1254
|
-
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class",
|
|
1274
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", Z(r)]),
|
|
1255
1275
|
"aria-hidden": "true"
|
|
1256
|
-
}, null, 2)) :
|
|
1276
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
1257
1277
|
key: 2,
|
|
1258
1278
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1259
|
-
src:
|
|
1279
|
+
src: Q(r) ?? "",
|
|
1260
1280
|
alt: ""
|
|
1261
|
-
}, null, 8,
|
|
1281
|
+
}, null, 8, Dt)) : Q(r) ? (v(), i("svg", Ot, [a("use", { href: Q(r) ?? "" }, null, 8, kt)])) : (v(), i(e, { key: 4 }, [s(T(we(r)), 1)], 64))], 2), a("div", At, T(r.label), 1)], 64))])], 10, Et))), 128))], 4)]))), 128))], 512)]),
|
|
1262
1282
|
_: 3
|
|
1263
1283
|
}, 8, [
|
|
1264
1284
|
"visible",
|
|
@@ -1270,13 +1290,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1270
1290
|
])) : r("", !0)]))
|
|
1271
1291
|
], 2));
|
|
1272
1292
|
}
|
|
1273
|
-
}),
|
|
1293
|
+
}), Rt = ["data-id", "onKeydown"], zt = {
|
|
1274
1294
|
key: 0,
|
|
1275
1295
|
class: "ml-ribbon-input-number__prefix"
|
|
1276
|
-
},
|
|
1296
|
+
}, Bt = {
|
|
1277
1297
|
key: 2,
|
|
1278
1298
|
class: "ml-ribbon-input-number__prefix-label"
|
|
1279
|
-
},
|
|
1299
|
+
}, Vt = /* @__PURE__ */ l({
|
|
1280
1300
|
name: "MlRibbonInputNumber",
|
|
1281
1301
|
__name: "RibbonInputNumber",
|
|
1282
1302
|
props: {
|
|
@@ -1335,7 +1355,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1335
1355
|
style: h(d.value),
|
|
1336
1356
|
"data-id": e.id,
|
|
1337
1357
|
onKeydown: A(ee(O, ["stop", "prevent"]), ["enter"])
|
|
1338
|
-
}, [x.value ? (v(), i("span",
|
|
1358
|
+
}, [x.value ? (v(), i("span", zt, [_.value ? (v(), n(D(L), {
|
|
1339
1359
|
key: 0,
|
|
1340
1360
|
class: "ml-ribbon-input-number__prefix-icon",
|
|
1341
1361
|
"aria-hidden": "true"
|
|
@@ -1346,7 +1366,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1346
1366
|
key: 1,
|
|
1347
1367
|
class: m(["ml-ribbon-input-number__prefix-icon ml-ribbon-input-number__prefix-icon--class", y.value]),
|
|
1348
1368
|
"aria-hidden": "true"
|
|
1349
|
-
}, null, 2)) : r("", !0), g.value ? (v(), i("span",
|
|
1369
|
+
}, null, 2)) : r("", !0), g.value ? (v(), i("span", Bt, T(g.value), 1)) : r("", !0)])) : r("", !0), c(D(R), f(e.controlProps, {
|
|
1350
1370
|
"model-value": e.modelValue,
|
|
1351
1371
|
disabled: e.disabled,
|
|
1352
1372
|
style: p.value,
|
|
@@ -1357,18 +1377,18 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1357
1377
|
"disabled",
|
|
1358
1378
|
"style",
|
|
1359
1379
|
"aria-label"
|
|
1360
|
-
])], 46,
|
|
1380
|
+
])], 46, Rt));
|
|
1361
1381
|
}
|
|
1362
|
-
}),
|
|
1382
|
+
}), Ht = ["data-id"], Ut = {
|
|
1363
1383
|
key: 0,
|
|
1364
1384
|
class: "ml-ribbon-segmented__label"
|
|
1365
|
-
},
|
|
1385
|
+
}, Wt = ["data-option-value", "aria-label"], Gt = {
|
|
1366
1386
|
key: 2,
|
|
1367
1387
|
class: "ml-ribbon-segmented__option-label"
|
|
1368
|
-
},
|
|
1388
|
+
}, Kt = {
|
|
1369
1389
|
key: 3,
|
|
1370
1390
|
class: "ml-ribbon-segmented__option-sr-label"
|
|
1371
|
-
},
|
|
1391
|
+
}, qt = /* @__PURE__ */ l({
|
|
1372
1392
|
__name: "RibbonSegmented",
|
|
1373
1393
|
props: {
|
|
1374
1394
|
id: {},
|
|
@@ -1449,7 +1469,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1449
1469
|
return (t, o) => (v(), i("div", {
|
|
1450
1470
|
class: "ml-ribbon-segmented",
|
|
1451
1471
|
"data-id": e.id
|
|
1452
|
-
}, [d.value ? (v(), i("div",
|
|
1472
|
+
}, [d.value ? (v(), i("div", Ut, T(u.value), 1)) : r("", !0), c(D(B), {
|
|
1453
1473
|
class: "ml-ribbon-segmented__control",
|
|
1454
1474
|
options: e.options,
|
|
1455
1475
|
"model-value": e.modelValue,
|
|
@@ -1482,7 +1502,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1482
1502
|
key: 1,
|
|
1483
1503
|
class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", b(t)]),
|
|
1484
1504
|
"aria-hidden": "true"
|
|
1485
|
-
}, null, 2)) : r("", !0), x(t) ? (v(), i("span",
|
|
1505
|
+
}, null, 2)) : r("", !0), x(t) ? (v(), i("span", Gt, T(g(t)), 1)) : (v(), i("span", Kt, T(g(t)), 1))], 8, Wt)]),
|
|
1486
1506
|
_: 2
|
|
1487
1507
|
}, 1032, [
|
|
1488
1508
|
"content",
|
|
@@ -1498,9 +1518,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1498
1518
|
"block",
|
|
1499
1519
|
"disabled",
|
|
1500
1520
|
"aria-label"
|
|
1501
|
-
])], 8,
|
|
1521
|
+
])], 8, Ht));
|
|
1502
1522
|
}
|
|
1503
|
-
}),
|
|
1523
|
+
}), Jt = /* @__PURE__ */ l({
|
|
1504
1524
|
__name: "RibbonToggleButton",
|
|
1505
1525
|
props: {
|
|
1506
1526
|
id: {},
|
|
@@ -1534,7 +1554,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1534
1554
|
let e = !o.value;
|
|
1535
1555
|
o.value = e, a("change", e);
|
|
1536
1556
|
}
|
|
1537
|
-
return (t, r) => (v(), n(
|
|
1557
|
+
return (t, r) => (v(), n(Be, {
|
|
1538
1558
|
id: e.id,
|
|
1539
1559
|
class: m(["ml-ribbon-toggle", { "is-active": s.value }]),
|
|
1540
1560
|
icon: c.value,
|
|
@@ -1555,7 +1575,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1555
1575
|
"aria-pressed"
|
|
1556
1576
|
]));
|
|
1557
1577
|
}
|
|
1558
|
-
}),
|
|
1578
|
+
}), Yt = ["data-template-id", "aria-disabled"], Xt = /* @__PURE__ */ l({
|
|
1559
1579
|
__name: "RibbonTemplateItem",
|
|
1560
1580
|
props: {
|
|
1561
1581
|
id: {},
|
|
@@ -1570,12 +1590,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1570
1590
|
}, [S(t.$slots, "default", {
|
|
1571
1591
|
item: e.item,
|
|
1572
1592
|
disabled: e.disabled
|
|
1573
|
-
}, () => [a("span", null, T(e.item.label ?? e.item.id), 1)])], 8,
|
|
1593
|
+
}, () => [a("span", null, T(e.item.label ?? e.item.id), 1)])], 8, Yt));
|
|
1574
1594
|
}
|
|
1575
|
-
}),
|
|
1595
|
+
}), Zt = ["data-item-id"], Qt = {
|
|
1576
1596
|
key: 0,
|
|
1577
1597
|
class: "ml-ribbon-item-host__keytip"
|
|
1578
|
-
},
|
|
1598
|
+
}, $t = /* @__PURE__ */ l({
|
|
1579
1599
|
__name: "RibbonItemHost",
|
|
1580
1600
|
props: {
|
|
1581
1601
|
id: {},
|
|
@@ -1586,61 +1606,65 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1586
1606
|
},
|
|
1587
1607
|
emits: ["item-click"],
|
|
1588
1608
|
setup(o, { emit: c }) {
|
|
1589
|
-
let l = o, p = c, g = u(
|
|
1609
|
+
let l = o, p = c, g = u(me, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y = oe("size", ""), C = t(() => y.value || "default"), A = t(() => Ae(g?.tooltipShowAfter.value, 1e3)), ee = t(() => Ae(g?.tooltipHideAfter.value, 0)), te = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${C.value}`), j = t(() => l.item.props?.icon || l.item.icon), ne = t(() => l.item.hideLabel !== !0), P = b(void 0), F = t(() => {
|
|
1610
|
+
if (l.item.type === "dropdown" && P.value) return Le(P.value);
|
|
1611
|
+
let e = ke(l.item.tooltip) ?? ke(l.item.label) ?? Fe(l.item) ?? Ie(l.item.id);
|
|
1612
|
+
return e && Le(e);
|
|
1613
|
+
}), I = t(() => l.item.type !== "buttonGroup" && l.item.type !== "segmented"), re = t(() => !I.value || !F.value), L = t(() => F.value ?? l.item.id), R = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), ie = t(() => {
|
|
1590
1614
|
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !R.value) return !1;
|
|
1591
1615
|
let e = g.keyTipsSequence.value.toLowerCase();
|
|
1592
1616
|
return e ? R.value.toLowerCase().startsWith(e) : !0;
|
|
1593
|
-
}), B = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), ae = t(() => l.item.props?.modelValue), se = t(() => l.item.props?.activeLabel), ce = t(() => l.item.props?.inactiveLabel),
|
|
1617
|
+
}), B = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), ae = t(() => l.item.props?.modelValue), se = t(() => l.item.props?.activeLabel), ce = t(() => l.item.props?.inactiveLabel), U = t(() => Array.isArray(l.item.props?.categories) ? l.item.props.categories : []), le = t(() => {
|
|
1594
1618
|
let e = l.item.props?.modelValue;
|
|
1595
1619
|
return typeof e == "string" ? e : void 0;
|
|
1596
|
-
}),
|
|
1620
|
+
}), ue = t(() => {
|
|
1597
1621
|
let e = l.item.props?.inlineItemLimit;
|
|
1598
1622
|
return typeof e == "number" ? e : void 0;
|
|
1599
|
-
}),
|
|
1623
|
+
}), W = t(() => l.item.props?.inlineItemWidthMode === "auto" ? "auto" : "fixed"), G = t(() => {
|
|
1600
1624
|
let e = l.item.props?.component;
|
|
1601
1625
|
return !e || typeof e == "string" ? null : d(E(e));
|
|
1602
|
-
}),
|
|
1626
|
+
}), de = t(() => {
|
|
1603
1627
|
let e = l.item.props?.componentProps;
|
|
1604
1628
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
1605
|
-
}),
|
|
1629
|
+
}), fe = t(() => l.item.props?.wrap !== !1), pe = t(() => l.item.props?.equalWidth === !0), K = t(() => {
|
|
1606
1630
|
let e = l.item.props?.buttonSize;
|
|
1607
1631
|
if (e === "large" || e === "default" || e === "small") return e;
|
|
1608
|
-
}),
|
|
1632
|
+
}), q = t(() => Ne(l.item.props?.iconSize)), J = t(() => je(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), he = t(() => l.item.props?.modelValue), ge = t(() => je(l.item.props?.width ?? l.item.props?.inputNumberWidth, "96px")), _e = t(() => l.item.props?.modelValue), ve = t(() => {
|
|
1609
1633
|
let e = { ...l.item.props ?? {} };
|
|
1610
1634
|
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;
|
|
1611
|
-
}),
|
|
1612
|
-
if (!
|
|
1613
|
-
let e = { "--ml-rb-item-label-max-lines": String(
|
|
1614
|
-
return
|
|
1635
|
+
}), ye = t(() => Pe(l.item.props?.labelWrapLines)), be = t(() => Me(l.item.props?.labelWrapWidth)), Y = t(() => (l.item.type === "button" || l.item.type === "dropdown") && l.item.size === "large" && ne.value && (ye.value ?? 0) > 1), xe = t(() => {
|
|
1636
|
+
if (!Y.value) return {};
|
|
1637
|
+
let e = { "--ml-rb-item-label-max-lines": String(ye.value ?? 2) };
|
|
1638
|
+
return be.value && (e["--ml-rb-item-label-wrap-width"] = be.value), e;
|
|
1615
1639
|
});
|
|
1616
1640
|
O(() => l.item.id, () => {
|
|
1617
1641
|
P.value = void 0;
|
|
1618
1642
|
});
|
|
1619
|
-
function
|
|
1643
|
+
function X() {
|
|
1620
1644
|
B.value || p("item-click", l.id);
|
|
1621
1645
|
}
|
|
1622
|
-
function
|
|
1646
|
+
function Z(e) {
|
|
1623
1647
|
if (!B.value) {
|
|
1624
1648
|
if (typeof e == "string" || typeof e == "number") {
|
|
1625
1649
|
p("item-click", String(e));
|
|
1626
1650
|
return;
|
|
1627
1651
|
}
|
|
1628
|
-
|
|
1652
|
+
X();
|
|
1629
1653
|
}
|
|
1630
1654
|
}
|
|
1631
|
-
function
|
|
1655
|
+
function Q(e) {
|
|
1632
1656
|
P.value = e;
|
|
1633
1657
|
}
|
|
1634
|
-
function
|
|
1658
|
+
function Se(e) {
|
|
1635
1659
|
if (!B.value) {
|
|
1636
1660
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1637
1661
|
p("item-click", String(e));
|
|
1638
1662
|
return;
|
|
1639
1663
|
}
|
|
1640
|
-
|
|
1664
|
+
X();
|
|
1641
1665
|
}
|
|
1642
1666
|
}
|
|
1643
|
-
function
|
|
1667
|
+
function Ce(e) {
|
|
1644
1668
|
if (B.value) return;
|
|
1645
1669
|
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
1646
1670
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
@@ -1649,60 +1673,60 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1649
1673
|
}
|
|
1650
1674
|
p("item-click", String(e));
|
|
1651
1675
|
}
|
|
1652
|
-
function
|
|
1676
|
+
function we(e) {
|
|
1653
1677
|
if (!B.value) {
|
|
1654
1678
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1655
1679
|
p("item-click", String(e));
|
|
1656
1680
|
return;
|
|
1657
1681
|
}
|
|
1658
|
-
|
|
1682
|
+
X();
|
|
1659
1683
|
}
|
|
1660
1684
|
}
|
|
1661
|
-
function
|
|
1685
|
+
function $(e) {
|
|
1662
1686
|
B.value || p("item-click", e);
|
|
1663
1687
|
}
|
|
1664
|
-
function
|
|
1688
|
+
function Te(e) {
|
|
1665
1689
|
if (!B.value) {
|
|
1666
1690
|
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1667
1691
|
p("item-click", String(e));
|
|
1668
1692
|
return;
|
|
1669
1693
|
}
|
|
1670
|
-
|
|
1694
|
+
X();
|
|
1671
1695
|
}
|
|
1672
1696
|
}
|
|
1673
|
-
function
|
|
1697
|
+
function Ee(e) {
|
|
1674
1698
|
if (!B.value) {
|
|
1675
1699
|
if (l.item.props?.emitValueOnChange === !0 && typeof e == "number" && Number.isFinite(e)) {
|
|
1676
1700
|
let t = l.item.props?.valuePrefix;
|
|
1677
1701
|
p("item-click", `${typeof t == "string" ? t : ""}${e}`);
|
|
1678
1702
|
return;
|
|
1679
1703
|
}
|
|
1680
|
-
|
|
1704
|
+
X();
|
|
1681
1705
|
}
|
|
1682
1706
|
}
|
|
1683
|
-
function
|
|
1707
|
+
function De(e) {
|
|
1684
1708
|
if (!B.value) {
|
|
1685
1709
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1686
1710
|
p("item-click", String(e));
|
|
1687
1711
|
return;
|
|
1688
1712
|
}
|
|
1689
|
-
|
|
1713
|
+
X();
|
|
1690
1714
|
}
|
|
1691
1715
|
}
|
|
1692
|
-
function
|
|
1716
|
+
function Oe(e) {
|
|
1693
1717
|
if (!e || typeof e != "object") return;
|
|
1694
1718
|
let t = e.label;
|
|
1695
1719
|
return typeof t == "string" ? t : void 0;
|
|
1696
1720
|
}
|
|
1697
|
-
function
|
|
1721
|
+
function ke(e) {
|
|
1698
1722
|
if (typeof e != "string") return;
|
|
1699
1723
|
let t = e.trim();
|
|
1700
1724
|
return t.length > 0 ? t : void 0;
|
|
1701
1725
|
}
|
|
1702
|
-
function
|
|
1726
|
+
function Ae(e, t) {
|
|
1703
1727
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1704
1728
|
}
|
|
1705
|
-
function
|
|
1729
|
+
function je(e, t) {
|
|
1706
1730
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1707
1731
|
if (typeof e == "string") {
|
|
1708
1732
|
let n = e.trim();
|
|
@@ -1710,27 +1734,27 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1710
1734
|
}
|
|
1711
1735
|
return t;
|
|
1712
1736
|
}
|
|
1713
|
-
function
|
|
1737
|
+
function Me(e) {
|
|
1714
1738
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1715
1739
|
if (typeof e == "string") {
|
|
1716
1740
|
let t = e.trim();
|
|
1717
1741
|
return t ? t.toLowerCase() === "full" ? "100%" : t : void 0;
|
|
1718
1742
|
}
|
|
1719
1743
|
}
|
|
1720
|
-
function
|
|
1744
|
+
function Ne(e) {
|
|
1721
1745
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1722
1746
|
if (typeof e != "string") return;
|
|
1723
1747
|
let t = e.trim();
|
|
1724
1748
|
return t.length > 0 ? t : void 0;
|
|
1725
1749
|
}
|
|
1726
|
-
function
|
|
1750
|
+
function Pe(e) {
|
|
1727
1751
|
if (!(typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e))) return Math.max(1, Math.round(e));
|
|
1728
1752
|
}
|
|
1729
|
-
function
|
|
1730
|
-
let t = _.value.map((e) =>
|
|
1753
|
+
function Fe(e) {
|
|
1754
|
+
let t = _.value.map((e) => Oe(e)).filter((e) => !!e);
|
|
1731
1755
|
if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
|
|
1732
1756
|
}
|
|
1733
|
-
function
|
|
1757
|
+
function Ie(e) {
|
|
1734
1758
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1735
1759
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
1736
1760
|
}
|
|
@@ -1748,26 +1772,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1748
1772
|
`type-${o.item.type}`,
|
|
1749
1773
|
{
|
|
1750
1774
|
"is-label-hidden": o.item.hideLabel === !0,
|
|
1751
|
-
"is-label-wrap":
|
|
1775
|
+
"is-label-wrap": Y.value
|
|
1752
1776
|
}
|
|
1753
1777
|
]]),
|
|
1754
|
-
style: h(
|
|
1778
|
+
style: h(xe.value),
|
|
1755
1779
|
"data-item-id": o.id,
|
|
1756
1780
|
role: "group"
|
|
1757
|
-
}, [ie.value ? (v(), i("span",
|
|
1781
|
+
}, [ie.value ? (v(), i("span", Qt, T(R.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(We, {
|
|
1758
1782
|
key: 1,
|
|
1759
1783
|
id: o.item.id,
|
|
1760
1784
|
label: o.item.label ?? "",
|
|
1761
1785
|
options: o.item.props?.options ?? [],
|
|
1762
1786
|
"hide-label": o.item.hideLabel === !0,
|
|
1763
|
-
wrap:
|
|
1764
|
-
"equal-width":
|
|
1765
|
-
"button-size":
|
|
1766
|
-
"icon-size":
|
|
1787
|
+
wrap: fe.value,
|
|
1788
|
+
"equal-width": pe.value,
|
|
1789
|
+
"button-size": K.value,
|
|
1790
|
+
"icon-size": q.value,
|
|
1767
1791
|
"tooltip-show-after": A.value,
|
|
1768
1792
|
"tooltip-hide-after": ee.value,
|
|
1769
1793
|
disabled: B.value,
|
|
1770
|
-
onChange:
|
|
1794
|
+
onChange: we
|
|
1771
1795
|
}, null, 8, [
|
|
1772
1796
|
"id",
|
|
1773
1797
|
"label",
|
|
@@ -1780,7 +1804,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1780
1804
|
"tooltip-show-after",
|
|
1781
1805
|
"tooltip-hide-after",
|
|
1782
1806
|
"disabled"
|
|
1783
|
-
])) : o.item.type === "segmented" ? (v(), n(
|
|
1807
|
+
])) : o.item.type === "segmented" ? (v(), n(qt, {
|
|
1784
1808
|
key: 2,
|
|
1785
1809
|
id: o.item.id,
|
|
1786
1810
|
label: o.item.label ?? o.item.id,
|
|
@@ -1792,7 +1816,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1792
1816
|
"hide-label": o.item.hideLabel === !0,
|
|
1793
1817
|
"tooltip-show-after": A.value,
|
|
1794
1818
|
"tooltip-hide-after": ee.value,
|
|
1795
|
-
onChange:
|
|
1819
|
+
onChange: Se
|
|
1796
1820
|
}, null, 8, [
|
|
1797
1821
|
"id",
|
|
1798
1822
|
"label",
|
|
@@ -1804,7 +1828,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1804
1828
|
"hide-label",
|
|
1805
1829
|
"tooltip-show-after",
|
|
1806
1830
|
"tooltip-hide-after"
|
|
1807
|
-
])) : o.item.type === "toggle" ? (v(), n(
|
|
1831
|
+
])) : o.item.type === "toggle" ? (v(), n(Jt, {
|
|
1808
1832
|
key: 3,
|
|
1809
1833
|
id: o.item.id,
|
|
1810
1834
|
label: o.item.label ?? o.item.id,
|
|
@@ -1815,7 +1839,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1815
1839
|
"inactive-label": ce.value,
|
|
1816
1840
|
disabled: B.value,
|
|
1817
1841
|
"hide-label": o.item.hideLabel === !0,
|
|
1818
|
-
onChange:
|
|
1842
|
+
onChange: Ce
|
|
1819
1843
|
}, null, 8, [
|
|
1820
1844
|
"id",
|
|
1821
1845
|
"label",
|
|
@@ -1826,18 +1850,18 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1826
1850
|
"inactive-label",
|
|
1827
1851
|
"disabled",
|
|
1828
1852
|
"hide-label"
|
|
1829
|
-
])) : o.item.type === "gallery" ? (v(), n(
|
|
1853
|
+
])) : o.item.type === "gallery" ? (v(), n(Lt, {
|
|
1830
1854
|
key: 4,
|
|
1831
1855
|
id: o.item.id,
|
|
1832
1856
|
label: o.item.label ?? "",
|
|
1833
|
-
categories:
|
|
1834
|
-
"model-value":
|
|
1857
|
+
categories: U.value,
|
|
1858
|
+
"model-value": le.value,
|
|
1835
1859
|
collapsed: o.item.props?.collapsed === !0,
|
|
1836
|
-
"inline-item-limit":
|
|
1837
|
-
"inline-item-width-mode":
|
|
1860
|
+
"inline-item-limit": ue.value,
|
|
1861
|
+
"inline-item-width-mode": W.value,
|
|
1838
1862
|
"preview-fallback": l.galleryPreviewFallback,
|
|
1839
1863
|
disabled: B.value,
|
|
1840
|
-
onSelect:
|
|
1864
|
+
onSelect: $
|
|
1841
1865
|
}, null, 8, [
|
|
1842
1866
|
"id",
|
|
1843
1867
|
"label",
|
|
@@ -1848,17 +1872,17 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1848
1872
|
"inline-item-width-mode",
|
|
1849
1873
|
"preview-fallback",
|
|
1850
1874
|
"disabled"
|
|
1851
|
-
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(
|
|
1875
|
+
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(Xt, {
|
|
1852
1876
|
key: 5,
|
|
1853
1877
|
id: o.item.id,
|
|
1854
1878
|
item: o.item,
|
|
1855
1879
|
disabled: B.value
|
|
1856
1880
|
}, {
|
|
1857
|
-
default: k(() => [
|
|
1881
|
+
default: k(() => [G.value ? (v(), n(w(G.value), f({ key: 0 }, de.value, {
|
|
1858
1882
|
item: o.item,
|
|
1859
1883
|
"group-id": o.groupId,
|
|
1860
1884
|
disabled: B.value,
|
|
1861
|
-
"emit-item-click":
|
|
1885
|
+
"emit-item-click": De
|
|
1862
1886
|
}), null, 16, [
|
|
1863
1887
|
"item",
|
|
1864
1888
|
"group-id",
|
|
@@ -1873,7 +1897,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1873
1897
|
"id",
|
|
1874
1898
|
"item",
|
|
1875
1899
|
"disabled"
|
|
1876
|
-
])) : o.item.type === "dropdown" ? (v(), n(
|
|
1900
|
+
])) : o.item.type === "dropdown" ? (v(), n(et, {
|
|
1877
1901
|
key: 6,
|
|
1878
1902
|
id: o.item.id,
|
|
1879
1903
|
label: o.item.label ?? o.item.id,
|
|
@@ -1887,9 +1911,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1887
1911
|
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1888
1912
|
"tooltip-show-after": A.value,
|
|
1889
1913
|
"tooltip-hide-after": ee.value,
|
|
1890
|
-
onCommand:
|
|
1891
|
-
onTooltipChange:
|
|
1892
|
-
onClick:
|
|
1914
|
+
onCommand: Z,
|
|
1915
|
+
onTooltipChange: Q,
|
|
1916
|
+
onClick: X
|
|
1893
1917
|
}, null, 8, [
|
|
1894
1918
|
"id",
|
|
1895
1919
|
"label",
|
|
@@ -1906,21 +1930,21 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1906
1930
|
])) : o.item.type === "checkbox" ? (v(), n(D(M), {
|
|
1907
1931
|
key: 7,
|
|
1908
1932
|
disabled: B.value,
|
|
1909
|
-
onChange:
|
|
1933
|
+
onChange: X
|
|
1910
1934
|
}, {
|
|
1911
1935
|
default: k(() => [s(T(o.item.label), 1)]),
|
|
1912
1936
|
_: 1
|
|
1913
1937
|
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(D(N), {
|
|
1914
1938
|
key: 8,
|
|
1915
1939
|
disabled: B.value,
|
|
1916
|
-
onChange:
|
|
1940
|
+
onChange: X
|
|
1917
1941
|
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(D(V), {
|
|
1918
1942
|
key: 9,
|
|
1919
|
-
"model-value":
|
|
1943
|
+
"model-value": he.value,
|
|
1920
1944
|
disabled: B.value,
|
|
1921
1945
|
"popper-class": te.value,
|
|
1922
|
-
style: h({ width:
|
|
1923
|
-
onChange:
|
|
1946
|
+
style: h({ width: J.value }),
|
|
1947
|
+
onChange: Te
|
|
1924
1948
|
}, {
|
|
1925
1949
|
default: k(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(D(z), {
|
|
1926
1950
|
key: String(e.value),
|
|
@@ -1933,17 +1957,17 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1933
1957
|
"disabled",
|
|
1934
1958
|
"popper-class",
|
|
1935
1959
|
"style"
|
|
1936
|
-
])) : o.item.type === "inputNumber" ? (v(), n(
|
|
1960
|
+
])) : o.item.type === "inputNumber" ? (v(), n(Vt, {
|
|
1937
1961
|
key: 10,
|
|
1938
1962
|
id: o.item.id,
|
|
1939
|
-
"model-value":
|
|
1940
|
-
width:
|
|
1963
|
+
"model-value": _e.value,
|
|
1964
|
+
width: ge.value,
|
|
1941
1965
|
"prefix-label": o.item.props?.prefixLabel,
|
|
1942
1966
|
"prefix-icon": o.item.props?.prefixIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1943
1967
|
"prefix-icon-class": o.item.props?.prefixIconClass,
|
|
1944
|
-
"control-props":
|
|
1968
|
+
"control-props": ve.value,
|
|
1945
1969
|
disabled: B.value,
|
|
1946
|
-
onChange:
|
|
1970
|
+
onChange: Ee
|
|
1947
1971
|
}, null, 8, [
|
|
1948
1972
|
"id",
|
|
1949
1973
|
"model-value",
|
|
@@ -1953,7 +1977,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1953
1977
|
"prefix-icon-class",
|
|
1954
1978
|
"control-props",
|
|
1955
1979
|
"disabled"
|
|
1956
|
-
])) : (v(), n(
|
|
1980
|
+
])) : (v(), n(Be, {
|
|
1957
1981
|
key: 11,
|
|
1958
1982
|
id: o.item.id,
|
|
1959
1983
|
label: o.item.label ?? o.item.id,
|
|
@@ -1961,7 +1985,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1961
1985
|
disabled: B.value,
|
|
1962
1986
|
"hide-label": !ne.value,
|
|
1963
1987
|
"aria-label": L.value,
|
|
1964
|
-
onClick:
|
|
1988
|
+
onClick: X
|
|
1965
1989
|
}, null, 8, [
|
|
1966
1990
|
"id",
|
|
1967
1991
|
"label",
|
|
@@ -1969,7 +1993,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1969
1993
|
"disabled",
|
|
1970
1994
|
"hide-label",
|
|
1971
1995
|
"aria-label"
|
|
1972
|
-
]))], 14,
|
|
1996
|
+
]))], 14, Zt)]),
|
|
1973
1997
|
_: 3
|
|
1974
1998
|
}, 8, [
|
|
1975
1999
|
"content",
|
|
@@ -1978,7 +2002,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1978
2002
|
"hide-after"
|
|
1979
2003
|
]));
|
|
1980
2004
|
}
|
|
1981
|
-
}),
|
|
2005
|
+
}), en = /* @__PURE__ */ l({
|
|
1982
2006
|
__name: "RibbonGroupContent",
|
|
1983
2007
|
props: {
|
|
1984
2008
|
group: {},
|
|
@@ -1988,13 +2012,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1988
2012
|
emits: ["item-click"],
|
|
1989
2013
|
setup(t, { emit: r }) {
|
|
1990
2014
|
let a = t, o = r;
|
|
1991
|
-
return (t, r) => (v(), i("div", { class: m(["ml-ribbon-group__content", [`ml-ribbon-group__content--${a.group.orientation ?? "column"}`]]) }, [(v(!0), i(e, null, x(a.group.collections ?? [], (t) => (v(), n(
|
|
2015
|
+
return (t, r) => (v(), i("div", { class: m(["ml-ribbon-group__content", [`ml-ribbon-group__content--${a.group.orientation ?? "column"}`]]) }, [(v(!0), i(e, null, x(a.group.collections ?? [], (t) => (v(), n(Fe, {
|
|
1992
2016
|
id: t.id,
|
|
1993
2017
|
key: t.id,
|
|
1994
2018
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
1995
2019
|
rows: t.rows
|
|
1996
2020
|
}, {
|
|
1997
|
-
default: k(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(
|
|
2021
|
+
default: k(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n($t, {
|
|
1998
2022
|
id: e.id,
|
|
1999
2023
|
key: e.id,
|
|
2000
2024
|
item: e,
|
|
@@ -2019,15 +2043,73 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2019
2043
|
"rows"
|
|
2020
2044
|
]))), 128))], 2));
|
|
2021
2045
|
}
|
|
2022
|
-
}),
|
|
2046
|
+
}), tn = ["aria-label", "disabled"], nn = { class: "ml-ribbon-overflow-list" }, rn = { class: "ml-ribbon-overflow-group-flyout__footer" }, an = /* @__PURE__ */ l({
|
|
2047
|
+
__name: "RibbonClassicOverflow",
|
|
2048
|
+
props: {
|
|
2049
|
+
groups: {},
|
|
2050
|
+
popoverClass: {},
|
|
2051
|
+
popoverWidth: {},
|
|
2052
|
+
triggerAriaLabel: {},
|
|
2053
|
+
galleryPreviewFallback: {},
|
|
2054
|
+
disabled: { type: Boolean }
|
|
2055
|
+
},
|
|
2056
|
+
emits: [
|
|
2057
|
+
"open",
|
|
2058
|
+
"close",
|
|
2059
|
+
"itemClick"
|
|
2060
|
+
],
|
|
2061
|
+
setup(t, { emit: r }) {
|
|
2062
|
+
let o = r;
|
|
2063
|
+
function s(e) {
|
|
2064
|
+
o("itemClick", e);
|
|
2065
|
+
}
|
|
2066
|
+
return (r, l) => (v(), n(D(ie), {
|
|
2067
|
+
trigger: "click",
|
|
2068
|
+
placement: "bottom-end",
|
|
2069
|
+
width: t.popoverWidth,
|
|
2070
|
+
disabled: t.disabled,
|
|
2071
|
+
"show-arrow": !1,
|
|
2072
|
+
teleported: !0,
|
|
2073
|
+
"popper-options": { strategy: "fixed" },
|
|
2074
|
+
"popper-class": t.popoverClass,
|
|
2075
|
+
onShow: l[0] ||= (e) => o("open"),
|
|
2076
|
+
onHide: l[1] ||= (e) => o("close")
|
|
2077
|
+
}, {
|
|
2078
|
+
reference: k(() => [a("button", {
|
|
2079
|
+
type: "button",
|
|
2080
|
+
class: "ml-ribbon-overflow-trigger",
|
|
2081
|
+
"aria-label": t.triggerAriaLabel,
|
|
2082
|
+
disabled: t.disabled
|
|
2083
|
+
}, [...l[2] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, tn)]),
|
|
2084
|
+
default: k(() => [a("div", nn, [(v(!0), i(e, null, x(t.groups, (e) => (v(), i("section", {
|
|
2085
|
+
key: e.id,
|
|
2086
|
+
class: "ml-ribbon-overflow-group-flyout"
|
|
2087
|
+
}, [c(en, {
|
|
2088
|
+
group: e,
|
|
2089
|
+
"gallery-preview-fallback": t.galleryPreviewFallback,
|
|
2090
|
+
disabled: t.disabled,
|
|
2091
|
+
onItemClick: s
|
|
2092
|
+
}, null, 8, [
|
|
2093
|
+
"group",
|
|
2094
|
+
"gallery-preview-fallback",
|
|
2095
|
+
"disabled"
|
|
2096
|
+
]), a("footer", rn, T(e.title), 1)]))), 128))])]),
|
|
2097
|
+
_: 1
|
|
2098
|
+
}, 8, [
|
|
2099
|
+
"width",
|
|
2100
|
+
"disabled",
|
|
2101
|
+
"popper-class"
|
|
2102
|
+
]));
|
|
2103
|
+
}
|
|
2104
|
+
}), on = ["data-priority"], sn = { class: "ml-ribbon-group__body" }, cn = { class: "ml-ribbon-group__footer" }, ln = { class: "ml-ribbon-group__title" }, un = [
|
|
2023
2105
|
"aria-label",
|
|
2024
2106
|
"aria-expanded",
|
|
2025
2107
|
"disabled"
|
|
2026
|
-
],
|
|
2108
|
+
], dn = { class: "ml-ribbon-group__overflow-content" }, fn = [
|
|
2027
2109
|
"aria-label",
|
|
2028
2110
|
"aria-expanded",
|
|
2029
2111
|
"disabled"
|
|
2030
|
-
],
|
|
2112
|
+
], pn = { class: "ml-ribbon-group__overflow-content" }, mn = /* @__PURE__ */ l({
|
|
2031
2113
|
__name: "RibbonGroup",
|
|
2032
2114
|
props: {
|
|
2033
2115
|
id: {},
|
|
@@ -2046,7 +2128,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2046
2128
|
},
|
|
2047
2129
|
emits: ["item-click"],
|
|
2048
2130
|
setup(e, { emit: o }) {
|
|
2049
|
-
let s = e, l = o, d = u(
|
|
2131
|
+
let s = e, l = o, d = u(me, null), f = t(() => s.width == null), y = t(() => {
|
|
2050
2132
|
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
2051
2133
|
let e = `${s.width}px`;
|
|
2052
2134
|
return {
|
|
@@ -2100,12 +2182,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2100
2182
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
2101
2183
|
}), E.value.length === n.length && E.value.every((e, t) => e === n[t]) || (E.value = n);
|
|
2102
2184
|
}
|
|
2103
|
-
function
|
|
2185
|
+
function U() {
|
|
2104
2186
|
p(() => {
|
|
2105
|
-
|
|
2187
|
+
he(), ue(), W(), ce();
|
|
2106
2188
|
});
|
|
2107
2189
|
}
|
|
2108
|
-
function
|
|
2190
|
+
function ue() {
|
|
2109
2191
|
let e = C.value?.getBoundingClientRect(), t = A.value?.getBoundingClientRect();
|
|
2110
2192
|
if (!e || !t) {
|
|
2111
2193
|
j.value !== 0 && (j.value = 0);
|
|
@@ -2114,7 +2196,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2114
2196
|
let n = Math.round(e.left - t.left);
|
|
2115
2197
|
j.value !== n && (j.value = n);
|
|
2116
2198
|
}
|
|
2117
|
-
function
|
|
2199
|
+
function W() {
|
|
2118
2200
|
let e = C.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
|
|
2119
2201
|
if (!e || !t) {
|
|
2120
2202
|
M.value !== 0 && (M.value = 0);
|
|
@@ -2123,41 +2205,41 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2123
2205
|
let n = Math.round(e.left - t.left);
|
|
2124
2206
|
M.value !== n && (M.value = n);
|
|
2125
2207
|
}
|
|
2126
|
-
function
|
|
2208
|
+
function G(e) {
|
|
2127
2209
|
B.value = e;
|
|
2128
2210
|
}
|
|
2129
|
-
function
|
|
2211
|
+
function de(e) {
|
|
2130
2212
|
V.value = e;
|
|
2131
2213
|
}
|
|
2132
|
-
function
|
|
2214
|
+
function fe() {
|
|
2133
2215
|
x.value || (B.value = !B.value);
|
|
2134
2216
|
}
|
|
2135
|
-
function
|
|
2217
|
+
function K() {
|
|
2136
2218
|
x.value || (V.value = !V.value);
|
|
2137
2219
|
}
|
|
2138
|
-
let
|
|
2139
|
-
function
|
|
2140
|
-
if (!
|
|
2220
|
+
let q = null, J = null;
|
|
2221
|
+
function he() {
|
|
2222
|
+
if (!q) return;
|
|
2141
2223
|
let e = C.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
2142
|
-
|
|
2224
|
+
J !== e && (J && q.unobserve(J), e && q.observe(e), J = e);
|
|
2143
2225
|
}
|
|
2144
2226
|
return O(() => s.groupModel, () => {
|
|
2145
|
-
|
|
2227
|
+
U();
|
|
2146
2228
|
}, { deep: !0 }), O(x, (e) => {
|
|
2147
2229
|
e && (B.value = !1, V.value = !1);
|
|
2148
2230
|
}), g(() => {
|
|
2149
|
-
typeof ResizeObserver < "u" && (
|
|
2150
|
-
|
|
2151
|
-
}), C.value &&
|
|
2231
|
+
typeof ResizeObserver < "u" && (q = new ResizeObserver(() => {
|
|
2232
|
+
ue(), W(), ce();
|
|
2233
|
+
}), C.value && q.observe(C.value), he()), U();
|
|
2152
2234
|
}), _(() => {
|
|
2153
|
-
|
|
2235
|
+
q?.disconnect();
|
|
2154
2236
|
}), (t, o) => (v(), i("section", {
|
|
2155
2237
|
ref_key: "groupSectionRef",
|
|
2156
2238
|
ref: C,
|
|
2157
2239
|
class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
|
|
2158
2240
|
"data-priority": e.priority ?? 100,
|
|
2159
2241
|
style: h(y.value)
|
|
2160
|
-
}, [a("div",
|
|
2242
|
+
}, [a("div", sn, [S(t.$slots, "default")]), a("footer", cn, [
|
|
2161
2243
|
re.value ? (v(), n(D(L), {
|
|
2162
2244
|
key: 0,
|
|
2163
2245
|
class: "ml-ribbon-group__icon"
|
|
@@ -2165,7 +2247,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2165
2247
|
default: k(() => [(v(), n(w(re.value)))]),
|
|
2166
2248
|
_: 1
|
|
2167
2249
|
})) : r("", !0),
|
|
2168
|
-
a("span",
|
|
2250
|
+
a("span", ln, T(e.title), 1),
|
|
2169
2251
|
z.value && H.value ? (v(), n(D(ie), {
|
|
2170
2252
|
key: 1,
|
|
2171
2253
|
trigger: "click",
|
|
@@ -2173,8 +2255,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2173
2255
|
disabled: x.value,
|
|
2174
2256
|
"popper-class": P.value,
|
|
2175
2257
|
"popper-options": I.value,
|
|
2176
|
-
onShow: o[1] ||= (e) =>
|
|
2177
|
-
onHide: o[2] ||= (e) =>
|
|
2258
|
+
onShow: o[1] ||= (e) => G(!0),
|
|
2259
|
+
onHide: o[2] ||= (e) => G(!1)
|
|
2178
2260
|
}, {
|
|
2179
2261
|
reference: k(() => [a("button", {
|
|
2180
2262
|
ref_key: "footerTriggerRef",
|
|
@@ -2184,12 +2266,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2184
2266
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2185
2267
|
"aria-expanded": B.value,
|
|
2186
2268
|
disabled: x.value,
|
|
2187
|
-
onClick:
|
|
2269
|
+
onClick: fe
|
|
2188
2270
|
}, [c(D(L), null, {
|
|
2189
|
-
default: k(() => [(v(), n(w(B.value ? D(
|
|
2271
|
+
default: k(() => [(v(), n(w(B.value ? D(le) : D(se))))]),
|
|
2190
2272
|
_: 1
|
|
2191
|
-
})], 10,
|
|
2192
|
-
default: k(() => [a("div",
|
|
2273
|
+
})], 10, un)]),
|
|
2274
|
+
default: k(() => [a("div", dn, [c(en, {
|
|
2193
2275
|
group: H.value,
|
|
2194
2276
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2195
2277
|
disabled: x.value,
|
|
@@ -2212,8 +2294,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2212
2294
|
disabled: x.value,
|
|
2213
2295
|
"popper-class": P.value,
|
|
2214
2296
|
"popper-options": F.value,
|
|
2215
|
-
onShow: o[4] ||= (e) =>
|
|
2216
|
-
onHide: o[5] ||= (e) =>
|
|
2297
|
+
onShow: o[4] ||= (e) => de(!0),
|
|
2298
|
+
onHide: o[5] ||= (e) => de(!1)
|
|
2217
2299
|
}, {
|
|
2218
2300
|
reference: k(() => [a("button", {
|
|
2219
2301
|
ref_key: "overflowTriggerRef",
|
|
@@ -2223,12 +2305,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2223
2305
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2224
2306
|
"aria-expanded": V.value,
|
|
2225
2307
|
disabled: x.value,
|
|
2226
|
-
onClick:
|
|
2308
|
+
onClick: K
|
|
2227
2309
|
}, [c(D(L), null, {
|
|
2228
|
-
default: k(() => [(v(), n(w(V.value ? D(
|
|
2310
|
+
default: k(() => [(v(), n(w(V.value ? D(le) : D(se))))]),
|
|
2229
2311
|
_: 1
|
|
2230
|
-
})], 10,
|
|
2231
|
-
default: k(() => [a("div",
|
|
2312
|
+
})], 10, fn)]),
|
|
2313
|
+
default: k(() => [a("div", pn, [c(en, {
|
|
2232
2314
|
group: ae.value,
|
|
2233
2315
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2234
2316
|
disabled: x.value,
|
|
@@ -2251,26 +2333,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2251
2333
|
disabled: x.value
|
|
2252
2334
|
}, {
|
|
2253
2335
|
default: k(() => [c(D(L), null, {
|
|
2254
|
-
default: k(() => [c(D(
|
|
2336
|
+
default: k(() => [c(D(pe))]),
|
|
2255
2337
|
_: 1
|
|
2256
2338
|
})]),
|
|
2257
2339
|
_: 1
|
|
2258
2340
|
}, 8, ["disabled"])) : r("", !0)
|
|
2259
|
-
])], 14,
|
|
2341
|
+
])], 14, on));
|
|
2260
2342
|
}
|
|
2261
|
-
}),
|
|
2343
|
+
}), hn = ["inert", "aria-disabled"], gn = { class: "ml-ribbon__head-left" }, _n = {
|
|
2262
2344
|
key: 2,
|
|
2263
2345
|
class: "ml-ribbon__tabs-after"
|
|
2264
|
-
},
|
|
2346
|
+
}, vn = { class: "ml-ribbon__head-right" }, yn = {
|
|
2265
2347
|
key: 2,
|
|
2266
2348
|
class: "ml-ribbon__tabs-extra"
|
|
2267
|
-
},
|
|
2349
|
+
}, bn = ["data-active-tab"], xn = {
|
|
2268
2350
|
key: 0,
|
|
2269
2351
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
2270
|
-
},
|
|
2352
|
+
}, Sn = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, Cn = ["data-active-tab"], wn = ["disabled"], Tn = { class: "ml-ribbon-simplified-group__panel" }, En = ["data-active-tab"], Dn = {
|
|
2271
2353
|
key: 0,
|
|
2272
2354
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
2273
|
-
},
|
|
2355
|
+
}, On = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, kn = ["data-active-tab"], An = ["disabled"], jn = { class: "ml-ribbon-simplified-group__panel" }, Mn = 40, Nn = /* @__PURE__ */ l({
|
|
2274
2356
|
__name: "Ribbon",
|
|
2275
2357
|
props: {
|
|
2276
2358
|
id: { default: "ml-ribbon-root" },
|
|
@@ -2398,9 +2480,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2398
2480
|
keyTipsSequencePrefix: "Sequence:",
|
|
2399
2481
|
keyTipsEmptySequence: "No key sequence",
|
|
2400
2482
|
galleryPreviewFallback: "Preview unavailable"
|
|
2401
|
-
}, P = s, F = u, { context: I, visibleTabs: re } =
|
|
2402
|
-
y(
|
|
2403
|
-
I.tabs.value = j(e),
|
|
2483
|
+
}, P = s, F = u, { context: I, visibleTabs: re } = xe(P.id, P.tabs, P.disabled, P.activeLayout ? String(P.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : P.layout, P.minimized, P.activeTab || P.tabs[0]?.id || "", M(P.tooltipShowAfter, 1e3), M(P.tooltipHideAfter, 0));
|
|
2484
|
+
y(me, I), O(() => P.tabs, (e) => {
|
|
2485
|
+
I.tabs.value = j(e), ve(I.tabs.value.find((e) => e.id === I.activeTab.value)) || (I.activeTab.value = ye(I.tabs.value));
|
|
2404
2486
|
}, { deep: !0 }), O(() => P.layout, (e) => {
|
|
2405
2487
|
e !== I.layout.value && (I.layout.value = e);
|
|
2406
2488
|
}), O(() => P.activeLayout, (e) => {
|
|
@@ -2430,12 +2512,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2430
2512
|
}), O(I.backdropOpen, (e) => {
|
|
2431
2513
|
F(e ? "backstageOpen" : "backstageClose");
|
|
2432
2514
|
});
|
|
2433
|
-
let R = t(() => re.value.find((e) => e.id === I.activeTab.value)), z = t(() => new Set(re.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), B = t(() =>
|
|
2515
|
+
let R = t(() => re.value.find((e) => e.id === I.activeTab.value)), z = t(() => new Set(re.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), B = t(() => Re(R.value)), V = t(() => R.value?.groups?.filter((e) => e.visible !== !1) ?? []), se = b(null), U = b(null), le = b(null), W = b(null), G = b(!1), pe = b(0), K = b({
|
|
2434
2516
|
left: "0px",
|
|
2435
2517
|
top: "0px",
|
|
2436
2518
|
width: "1px",
|
|
2437
2519
|
height: "0px"
|
|
2438
|
-
}),
|
|
2520
|
+
}), q = b(/* @__PURE__ */ new Set()), J = b({}), he = oe("size", ""), ge = t(() => P.size || he.value || "default"), _e = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${ge.value}`), be = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${ge.value}`), Y = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${ge.value}`), X = t(() => ({
|
|
2439
2521
|
layoutSwitcherTooltip: P.texts.layoutSwitcherTooltip || N.layoutSwitcherTooltip,
|
|
2440
2522
|
minimizeTooltip: P.texts.minimizeTooltip || N.minimizeTooltip,
|
|
2441
2523
|
keyTipsToggleText: P.texts.keyTipsToggleText || N.keyTipsToggleText,
|
|
@@ -2449,15 +2531,15 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2449
2531
|
keyTipsSequencePrefix: P.texts.keyTipsSequencePrefix || N.keyTipsSequencePrefix,
|
|
2450
2532
|
keyTipsEmptySequence: P.texts.keyTipsEmptySequence || N.keyTipsEmptySequence,
|
|
2451
2533
|
galleryPreviewFallback: P.texts.galleryPreviewFallback || N.galleryPreviewFallback
|
|
2452
|
-
})),
|
|
2453
|
-
if (
|
|
2454
|
-
let e =
|
|
2455
|
-
let n =
|
|
2534
|
+
})), Z = t(() => M(P.tooltipShowAfter, 1e3)), Q = t(() => M(P.tooltipHideAfter, 0)), Se = t(() => I.minimized.value ? ue : ce), we = t(() => V.value.filter((e) => !q.value.has(e.id))), $ = t(() => V.value.filter((e) => q.value.has(e.id))), Te = t(() => {
|
|
2535
|
+
if (!$.value.length) return 220;
|
|
2536
|
+
let e = $.value.reduce((e, t) => {
|
|
2537
|
+
let n = J.value[t.id] ?? Oe(t);
|
|
2456
2538
|
return Math.max(e, n);
|
|
2457
|
-
}, 0), t = Math.ceil(e +
|
|
2539
|
+
}, 0), t = Math.ceil(e + 28);
|
|
2458
2540
|
return Math.max(220, Math.min(720, t));
|
|
2459
2541
|
});
|
|
2460
|
-
function
|
|
2542
|
+
function Ee(e) {
|
|
2461
2543
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
2462
2544
|
...A(e),
|
|
2463
2545
|
size: "medium"
|
|
@@ -2472,13 +2554,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2472
2554
|
}]
|
|
2473
2555
|
};
|
|
2474
2556
|
}
|
|
2475
|
-
function
|
|
2557
|
+
function De(e) {
|
|
2476
2558
|
return e.priority ?? 100;
|
|
2477
2559
|
}
|
|
2478
|
-
function
|
|
2560
|
+
function Oe(e) {
|
|
2479
2561
|
return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width : 140;
|
|
2480
2562
|
}
|
|
2481
|
-
function
|
|
2563
|
+
function ke(e) {
|
|
2482
2564
|
let t = {};
|
|
2483
2565
|
return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
|
|
2484
2566
|
let n = e.dataset.groupId;
|
|
@@ -2487,117 +2569,107 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2487
2569
|
r > 0 && (t[n] = r);
|
|
2488
2570
|
}), t;
|
|
2489
2571
|
}
|
|
2490
|
-
function
|
|
2572
|
+
function je() {
|
|
2491
2573
|
let e = V.value.reduce((e, t) => {
|
|
2492
|
-
let n =
|
|
2493
|
-
return e + Math.max(n,
|
|
2574
|
+
let n = J.value[t.id] ?? Oe(t);
|
|
2575
|
+
return e + Math.max(n, Oe(t));
|
|
2494
2576
|
}, 0);
|
|
2495
2577
|
return Math.max(220, e);
|
|
2496
2578
|
}
|
|
2497
|
-
function
|
|
2579
|
+
function Me(e) {
|
|
2498
2580
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
2499
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
2581
|
+
return Number.isFinite(t) && t > 0 ? t : Mn;
|
|
2500
2582
|
}
|
|
2501
|
-
function
|
|
2583
|
+
function Ne() {
|
|
2502
2584
|
if (I.layout.value !== "classic") {
|
|
2503
|
-
|
|
2585
|
+
q.value = /* @__PURE__ */ new Set();
|
|
2504
2586
|
return;
|
|
2505
2587
|
}
|
|
2506
|
-
let e = I.minimized.value ?
|
|
2588
|
+
let e = I.minimized.value ? W.value : le.value;
|
|
2507
2589
|
if (!e) return;
|
|
2508
2590
|
let t = V.value;
|
|
2509
2591
|
if (!t.length) {
|
|
2510
|
-
|
|
2592
|
+
q.value = /* @__PURE__ */ new Set();
|
|
2511
2593
|
return;
|
|
2512
2594
|
}
|
|
2513
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
2514
|
-
|
|
2515
|
-
...
|
|
2595
|
+
let n = Math.round(e.getBoundingClientRect().width), r = Me(e), i = ke(e);
|
|
2596
|
+
J.value = {
|
|
2597
|
+
...J.value,
|
|
2516
2598
|
...i
|
|
2517
2599
|
};
|
|
2518
2600
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
2519
2601
|
group: e,
|
|
2520
2602
|
index: t
|
|
2521
2603
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
2522
|
-
let n =
|
|
2604
|
+
let n = De(t.group) - De(e.group);
|
|
2523
2605
|
return n === 0 ? t.index - e.index : n;
|
|
2524
|
-
}), l = (e) => i[e.id] ??
|
|
2606
|
+
}), l = (e) => i[e.id] ?? J.value[e.id] ?? Oe(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;
|
|
2525
2607
|
for (; f(s) > n && p < c.length;) {
|
|
2526
2608
|
let e = c[p].group;
|
|
2527
2609
|
s.add(e.id), p += 1;
|
|
2528
2610
|
}
|
|
2529
|
-
|
|
2611
|
+
q.value = s;
|
|
2530
2612
|
}
|
|
2531
|
-
function
|
|
2613
|
+
function Fe() {
|
|
2532
2614
|
p(() => {
|
|
2533
|
-
|
|
2534
|
-
Pe();
|
|
2535
|
-
return;
|
|
2536
|
-
}
|
|
2537
|
-
if (K.value.size === 0) {
|
|
2538
|
-
Pe();
|
|
2539
|
-
return;
|
|
2540
|
-
}
|
|
2541
|
-
K.value = /* @__PURE__ */ new Set(), p(() => {
|
|
2542
|
-
Pe();
|
|
2543
|
-
});
|
|
2615
|
+
Ne();
|
|
2544
2616
|
});
|
|
2545
2617
|
}
|
|
2546
|
-
function
|
|
2547
|
-
let e = se.value, t =
|
|
2618
|
+
function Ie() {
|
|
2619
|
+
let e = se.value, t = U.value;
|
|
2548
2620
|
if (!e || !t) return;
|
|
2549
2621
|
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);
|
|
2550
|
-
|
|
2622
|
+
pe.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? je() : Math.max(360, V.value.length * 120)), K.value = {
|
|
2551
2623
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
2552
2624
|
top: "0px",
|
|
2553
2625
|
width: "1px",
|
|
2554
2626
|
height: `${Math.round(r.height)}px`
|
|
2555
2627
|
};
|
|
2556
2628
|
}
|
|
2557
|
-
function
|
|
2558
|
-
|
|
2629
|
+
function Le() {
|
|
2630
|
+
G.value = !1;
|
|
2559
2631
|
}
|
|
2560
|
-
function
|
|
2632
|
+
function Re(e) {
|
|
2561
2633
|
return I.disabled.value ? !0 : !e || z.value.size === 0 ? !1 : !z.value.has(e.id);
|
|
2562
2634
|
}
|
|
2563
|
-
function
|
|
2635
|
+
function ze(e) {
|
|
2564
2636
|
if (I.disabled.value) return;
|
|
2565
2637
|
let t = I.activeTab.value === e.id;
|
|
2566
2638
|
if (I.activeTab.value = e.id, !I.minimized.value) {
|
|
2567
|
-
|
|
2639
|
+
Le();
|
|
2568
2640
|
return;
|
|
2569
2641
|
}
|
|
2570
|
-
|
|
2642
|
+
Ie(), G.value = t ? !G.value : !0;
|
|
2571
2643
|
}
|
|
2572
|
-
function
|
|
2644
|
+
function Be() {
|
|
2573
2645
|
I.disabled.value || I.api.toggleSimplified();
|
|
2574
2646
|
}
|
|
2575
|
-
function
|
|
2576
|
-
I.disabled.value || (I.minimized.value ||
|
|
2647
|
+
function Ve() {
|
|
2648
|
+
I.disabled.value || (I.minimized.value || Le(), I.minimized.value = !I.minimized.value);
|
|
2649
|
+
}
|
|
2650
|
+
function He(e) {
|
|
2651
|
+
I.disabled.value || (Le(), F("fileMenuSelect", e));
|
|
2577
2652
|
}
|
|
2578
|
-
function Ue(
|
|
2579
|
-
I.disabled.value || (
|
|
2653
|
+
function Ue() {
|
|
2654
|
+
I.disabled.value || (Le(), I.backdropOpen.value = !0);
|
|
2580
2655
|
}
|
|
2581
2656
|
function We() {
|
|
2582
|
-
I.disabled.value || (Re(), I.backdropOpen.value = !0);
|
|
2583
|
-
}
|
|
2584
|
-
function Ge() {
|
|
2585
2657
|
I.disabled.value || (I.backdropOpen.value = !1);
|
|
2586
2658
|
}
|
|
2587
|
-
function
|
|
2659
|
+
function Ge(e, t) {
|
|
2588
2660
|
B.value || (F("itemClick", {
|
|
2589
2661
|
tabId: I.activeTab.value,
|
|
2590
2662
|
groupId: e,
|
|
2591
2663
|
itemId: t
|
|
2592
|
-
}), I.minimized.value &&
|
|
2664
|
+
}), I.minimized.value && Le());
|
|
2593
2665
|
}
|
|
2594
|
-
function
|
|
2666
|
+
function Ke(e) {
|
|
2595
2667
|
if (!(e instanceof HTMLElement)) return !1;
|
|
2596
2668
|
if (e.isContentEditable) return !0;
|
|
2597
2669
|
let t = e.tagName;
|
|
2598
2670
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
2599
2671
|
}
|
|
2600
|
-
function
|
|
2672
|
+
function qe() {
|
|
2601
2673
|
if (B.value) {
|
|
2602
2674
|
I.keyTips.value = [];
|
|
2603
2675
|
return;
|
|
@@ -2619,31 +2691,31 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2619
2691
|
}).filter((e) => !!e)));
|
|
2620
2692
|
I.keyTips.value = t;
|
|
2621
2693
|
}
|
|
2622
|
-
function
|
|
2694
|
+
function Je(e) {
|
|
2623
2695
|
if (I.disabled.value) return;
|
|
2624
2696
|
let t = R.value;
|
|
2625
2697
|
if (t?.groups?.length) {
|
|
2626
2698
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
2627
2699
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
2628
2700
|
if (r) {
|
|
2629
|
-
|
|
2701
|
+
Ge(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
|
|
2630
2702
|
return;
|
|
2631
2703
|
}
|
|
2632
2704
|
}
|
|
2633
2705
|
}
|
|
2634
2706
|
}
|
|
2635
|
-
function
|
|
2707
|
+
function Ye() {
|
|
2636
2708
|
I.keyTipsSequence.value = "";
|
|
2637
2709
|
}
|
|
2638
|
-
function
|
|
2639
|
-
if (!I.disabled.value && !
|
|
2710
|
+
function Xe(e) {
|
|
2711
|
+
if (!I.disabled.value && !Ke(e.target)) {
|
|
2640
2712
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
2641
|
-
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value ||
|
|
2713
|
+
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value || Ye();
|
|
2642
2714
|
return;
|
|
2643
2715
|
}
|
|
2644
2716
|
if (I.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
2645
2717
|
if (e.key === "Escape") {
|
|
2646
|
-
e.preventDefault(), I.keyTipsOpen.value = !1,
|
|
2718
|
+
e.preventDefault(), I.keyTipsOpen.value = !1, Ye();
|
|
2647
2719
|
return;
|
|
2648
2720
|
}
|
|
2649
2721
|
if (e.key === "Backspace") {
|
|
@@ -2656,62 +2728,73 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2656
2728
|
I.keyTipsSequence.value = t;
|
|
2657
2729
|
let n = t.toLowerCase(), r = I.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
2658
2730
|
if (r) {
|
|
2659
|
-
|
|
2731
|
+
Je(r);
|
|
2660
2732
|
return;
|
|
2661
2733
|
}
|
|
2662
|
-
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) ||
|
|
2734
|
+
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Ye();
|
|
2663
2735
|
}
|
|
2664
2736
|
}
|
|
2665
2737
|
}
|
|
2666
2738
|
}
|
|
2667
|
-
function
|
|
2668
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
2739
|
+
function Ze(e) {
|
|
2740
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? de : null;
|
|
2669
2741
|
}
|
|
2670
|
-
function
|
|
2671
|
-
|
|
2742
|
+
function Qe(e) {
|
|
2743
|
+
G.value = e;
|
|
2672
2744
|
}
|
|
2673
2745
|
O([
|
|
2674
2746
|
V,
|
|
2675
2747
|
() => I.layout.value,
|
|
2676
2748
|
() => I.minimized.value
|
|
2677
2749
|
], () => {
|
|
2678
|
-
|
|
2750
|
+
Fe();
|
|
2679
2751
|
}), O([
|
|
2680
2752
|
R,
|
|
2681
2753
|
() => I.tabs.value,
|
|
2682
2754
|
() => I.disabled.value
|
|
2683
2755
|
], () => {
|
|
2684
|
-
|
|
2756
|
+
qe(), Ye();
|
|
2685
2757
|
}, {
|
|
2686
2758
|
deep: !0,
|
|
2687
2759
|
immediate: !0
|
|
2688
2760
|
}), O(() => I.keyTipsOpen.value, (e) => {
|
|
2689
|
-
e ||
|
|
2761
|
+
e || Ye();
|
|
2690
2762
|
}), O(() => I.disabled.value, (e) => {
|
|
2691
|
-
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1,
|
|
2763
|
+
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Le(), Ye());
|
|
2692
2764
|
}), O([
|
|
2693
2765
|
() => I.minimized.value,
|
|
2694
2766
|
() => I.layout.value,
|
|
2695
2767
|
R
|
|
2696
2768
|
], ([e, , t]) => {
|
|
2697
|
-
(!e || !t) &&
|
|
2698
|
-
})
|
|
2699
|
-
|
|
2700
|
-
|
|
2769
|
+
(!e || !t) && Le();
|
|
2770
|
+
});
|
|
2771
|
+
function $e() {
|
|
2772
|
+
if (!et) return;
|
|
2773
|
+
let e = I.minimized.value ? W.value : le.value, t = [le.value, W.value];
|
|
2774
|
+
for (let n of t) n && n !== e && et.unobserve(n);
|
|
2775
|
+
e && et.observe(e);
|
|
2776
|
+
}
|
|
2777
|
+
O([
|
|
2778
|
+
le,
|
|
2779
|
+
W,
|
|
2780
|
+
() => I.minimized.value
|
|
2781
|
+
], () => {
|
|
2782
|
+
$e(), Fe();
|
|
2783
|
+
}, { flush: "post" }), O(G, (e) => {
|
|
2701
2784
|
e && p(() => {
|
|
2702
|
-
|
|
2785
|
+
Ie(), Fe();
|
|
2703
2786
|
});
|
|
2704
2787
|
});
|
|
2705
|
-
let
|
|
2788
|
+
let et = null;
|
|
2706
2789
|
g(() => {
|
|
2707
|
-
window.addEventListener("keydown",
|
|
2708
|
-
|
|
2709
|
-
}),
|
|
2790
|
+
window.addEventListener("keydown", Xe), window.addEventListener("resize", tt), typeof ResizeObserver < "u" && (et = new ResizeObserver(() => {
|
|
2791
|
+
Ie(), Fe();
|
|
2792
|
+
}), $e()), Ie(), Fe();
|
|
2710
2793
|
}), _(() => {
|
|
2711
|
-
window.removeEventListener("keydown",
|
|
2794
|
+
window.removeEventListener("keydown", Xe), window.removeEventListener("resize", tt), et?.disconnect();
|
|
2712
2795
|
});
|
|
2713
|
-
function
|
|
2714
|
-
|
|
2796
|
+
function tt() {
|
|
2797
|
+
G.value && Ie();
|
|
2715
2798
|
}
|
|
2716
2799
|
return l(I.api), (t, l) => (v(), n(D(ne), { size: P.size }, {
|
|
2717
2800
|
default: k(() => [(v(), i("section", {
|
|
@@ -2720,7 +2803,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2720
2803
|
key: D(I).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
2721
2804
|
class: m(["ml-ribbon", [
|
|
2722
2805
|
`ml-ribbon--${D(I).layout.value}`,
|
|
2723
|
-
`ml-ribbon--size-${
|
|
2806
|
+
`ml-ribbon--size-${ge.value}`,
|
|
2724
2807
|
{
|
|
2725
2808
|
"ml-ribbon--disabled": D(I).disabled.value,
|
|
2726
2809
|
"ml-ribbon--minimized": D(I).minimized.value,
|
|
@@ -2732,19 +2815,19 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2732
2815
|
}, [
|
|
2733
2816
|
a("header", {
|
|
2734
2817
|
ref_key: "ribbonHeaderRef",
|
|
2735
|
-
ref:
|
|
2818
|
+
ref: U,
|
|
2736
2819
|
class: "ml-ribbon__header"
|
|
2737
2820
|
}, [
|
|
2738
|
-
a("div",
|
|
2739
|
-
s.showFileMenu ? (v(), n(
|
|
2821
|
+
a("div", gn, [
|
|
2822
|
+
s.showFileMenu ? (v(), n(Pe, {
|
|
2740
2823
|
key: 0,
|
|
2741
2824
|
items: s.fileMenuItems,
|
|
2742
2825
|
disabled: D(I).disabled.value,
|
|
2743
|
-
label:
|
|
2744
|
-
"open-backstage-label":
|
|
2826
|
+
label: X.value.fileMenuLabel,
|
|
2827
|
+
"open-backstage-label": X.value.fileMenuOpenBackstageLabel,
|
|
2745
2828
|
"show-open-backstage": s.showOpenBackstage,
|
|
2746
|
-
onSelect:
|
|
2747
|
-
onOpenBackstage:
|
|
2829
|
+
onSelect: He,
|
|
2830
|
+
onOpenBackstage: Ue
|
|
2748
2831
|
}, null, 8, [
|
|
2749
2832
|
"items",
|
|
2750
2833
|
"disabled",
|
|
@@ -2752,11 +2835,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2752
2835
|
"open-backstage-label",
|
|
2753
2836
|
"show-open-backstage"
|
|
2754
2837
|
])) : r("", !0),
|
|
2755
|
-
c(
|
|
2838
|
+
c(Ae, {
|
|
2756
2839
|
tabs: D(re),
|
|
2757
2840
|
"active-tab": D(I).activeTab.value,
|
|
2758
2841
|
disabled: D(I).disabled.value,
|
|
2759
|
-
onSelect:
|
|
2842
|
+
onSelect: ze
|
|
2760
2843
|
}, null, 8, [
|
|
2761
2844
|
"tabs",
|
|
2762
2845
|
"active-tab",
|
|
@@ -2764,9 +2847,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2764
2847
|
]),
|
|
2765
2848
|
P.hideMinimizeButton ? r("", !0) : (v(), n(D(H), {
|
|
2766
2849
|
key: 1,
|
|
2767
|
-
content:
|
|
2768
|
-
"show-after":
|
|
2769
|
-
"hide-after":
|
|
2850
|
+
content: X.value.minimizeTooltip,
|
|
2851
|
+
"show-after": Z.value,
|
|
2852
|
+
"hide-after": Q.value
|
|
2770
2853
|
}, {
|
|
2771
2854
|
default: k(() => [c(D(te), {
|
|
2772
2855
|
class: m([
|
|
@@ -2774,9 +2857,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2774
2857
|
"ml-ribbon__control--minimize",
|
|
2775
2858
|
D(I).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
2776
2859
|
]),
|
|
2777
|
-
icon:
|
|
2860
|
+
icon: Se.value,
|
|
2778
2861
|
disabled: D(I).disabled.value,
|
|
2779
|
-
onClick:
|
|
2862
|
+
onClick: Ve
|
|
2780
2863
|
}, null, 8, [
|
|
2781
2864
|
"class",
|
|
2782
2865
|
"icon",
|
|
@@ -2788,26 +2871,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2788
2871
|
"show-after",
|
|
2789
2872
|
"hide-after"
|
|
2790
2873
|
])),
|
|
2791
|
-
t.$slots["tabs-after"] ? (v(), i("div",
|
|
2874
|
+
t.$slots["tabs-after"] ? (v(), i("div", _n, [S(t.$slots, "tabs-after", {
|
|
2792
2875
|
activeTab: D(I).activeTab.value,
|
|
2793
2876
|
layout: D(I).layout.value,
|
|
2794
2877
|
minimized: D(I).minimized.value,
|
|
2795
2878
|
disabled: D(I).disabled.value
|
|
2796
2879
|
})])) : r("", !0)
|
|
2797
2880
|
]),
|
|
2798
|
-
a("div",
|
|
2881
|
+
a("div", vn, [
|
|
2799
2882
|
P.hideLayoutSwitcher ? r("", !0) : (v(), n(D(H), {
|
|
2800
2883
|
key: 0,
|
|
2801
|
-
content:
|
|
2802
|
-
"show-after":
|
|
2803
|
-
"hide-after":
|
|
2884
|
+
content: X.value.layoutSwitcherTooltip,
|
|
2885
|
+
"show-after": Z.value,
|
|
2886
|
+
"hide-after": Q.value
|
|
2804
2887
|
}, {
|
|
2805
2888
|
default: k(() => [c(D(te), {
|
|
2806
2889
|
circle: "",
|
|
2807
2890
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
2808
|
-
icon: D(
|
|
2891
|
+
icon: D(fe),
|
|
2809
2892
|
disabled: D(I).disabled.value,
|
|
2810
|
-
onClick:
|
|
2893
|
+
onClick: Be
|
|
2811
2894
|
}, null, 8, ["icon", "disabled"])]),
|
|
2812
2895
|
_: 1
|
|
2813
2896
|
}, 8, [
|
|
@@ -2819,8 +2902,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2819
2902
|
key: 1,
|
|
2820
2903
|
"inline-prompt": "",
|
|
2821
2904
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
2822
|
-
"active-text":
|
|
2823
|
-
"inactive-text":
|
|
2905
|
+
"active-text": X.value.keyTipsToggleText,
|
|
2906
|
+
"inactive-text": X.value.keyTipsToggleText,
|
|
2824
2907
|
"model-value": D(I).keyTipsOpen.value,
|
|
2825
2908
|
disabled: D(I).disabled.value,
|
|
2826
2909
|
onChange: l[0] ||= (e) => D(I).keyTipsOpen.value = !D(I).keyTipsOpen.value
|
|
@@ -2830,7 +2913,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2830
2913
|
"model-value",
|
|
2831
2914
|
"disabled"
|
|
2832
2915
|
])),
|
|
2833
|
-
t.$slots["tabs-extra"] ? (v(), i("div",
|
|
2916
|
+
t.$slots["tabs-extra"] ? (v(), i("div", yn, [S(t.$slots, "tabs-extra", {
|
|
2834
2917
|
activeTab: D(I).activeTab.value,
|
|
2835
2918
|
layout: D(I).layout.value,
|
|
2836
2919
|
minimized: D(I).minimized.value,
|
|
@@ -2840,26 +2923,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2840
2923
|
R.value ? (v(), n(D(ie), {
|
|
2841
2924
|
key: 0,
|
|
2842
2925
|
placement: "bottom-start",
|
|
2843
|
-
visible:
|
|
2844
|
-
width:
|
|
2926
|
+
visible: G.value,
|
|
2927
|
+
width: pe.value || void 0,
|
|
2845
2928
|
disabled: D(I).disabled.value || !D(I).minimized.value,
|
|
2846
2929
|
"show-arrow": !1,
|
|
2847
2930
|
offset: 0,
|
|
2848
|
-
"popper-class":
|
|
2849
|
-
"onUpdate:visible":
|
|
2931
|
+
"popper-class": Y.value,
|
|
2932
|
+
"onUpdate:visible": Qe
|
|
2850
2933
|
}, {
|
|
2851
2934
|
reference: k(() => [a("span", {
|
|
2852
2935
|
"aria-hidden": "true",
|
|
2853
2936
|
class: "ml-ribbon__minimized-anchor",
|
|
2854
|
-
style: h(
|
|
2937
|
+
style: h(K.value)
|
|
2855
2938
|
}, null, 4)]),
|
|
2856
|
-
default: k(() => [D(I).layout.value === "classic" ? (v(), i("main", {
|
|
2939
|
+
default: k(() => [D(I).minimized.value && D(I).layout.value === "classic" ? (v(), i("main", {
|
|
2857
2940
|
key: 0,
|
|
2858
2941
|
ref_key: "minimizedClassicPanelRef",
|
|
2859
|
-
ref:
|
|
2942
|
+
ref: W,
|
|
2860
2943
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
2861
2944
|
"data-active-tab": R.value.id
|
|
2862
|
-
}, [(v(!0), i(e, null, x(
|
|
2945
|
+
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(mn, {
|
|
2863
2946
|
id: e.id,
|
|
2864
2947
|
key: e.id,
|
|
2865
2948
|
"data-group-id": e.id,
|
|
@@ -2872,16 +2955,16 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2872
2955
|
launcher: e.launcher,
|
|
2873
2956
|
"show-launcher-icon": e.showLauncherIcon,
|
|
2874
2957
|
"group-model": e,
|
|
2875
|
-
"overflow-trigger-aria-label":
|
|
2876
|
-
"gallery-preview-fallback":
|
|
2958
|
+
"overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
|
|
2959
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2877
2960
|
disabled: B.value,
|
|
2878
|
-
onItemClick: l[2] ||= (e) =>
|
|
2961
|
+
onItemClick: l[2] ||= (e) => Ge(e.groupId, e.itemId)
|
|
2879
2962
|
}, {
|
|
2880
|
-
default: k(() => [c(
|
|
2963
|
+
default: k(() => [c(en, {
|
|
2881
2964
|
group: e,
|
|
2882
|
-
"gallery-preview-fallback":
|
|
2965
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2883
2966
|
disabled: B.value,
|
|
2884
|
-
onItemClick: l[1] ||= (e) =>
|
|
2967
|
+
onItemClick: l[1] ||= (e) => Ge(e.groupId, e.itemId)
|
|
2885
2968
|
}, null, 8, [
|
|
2886
2969
|
"group",
|
|
2887
2970
|
"gallery-preview-fallback",
|
|
@@ -2903,41 +2986,24 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2903
2986
|
"overflow-trigger-aria-label",
|
|
2904
2987
|
"gallery-preview-fallback",
|
|
2905
2988
|
"disabled"
|
|
2906
|
-
]))), 128)),
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
width:
|
|
2989
|
+
]))), 128)), $.value.length ? (v(), i("section", xn, [a("div", Sn, [c(an, {
|
|
2990
|
+
groups: $.value,
|
|
2991
|
+
"popover-class": be.value,
|
|
2992
|
+
"popover-width": Te.value,
|
|
2993
|
+
"trigger-aria-label": X.value.overflowTriggerAriaLabel ?? "",
|
|
2994
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback ?? "",
|
|
2910
2995
|
disabled: B.value,
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
default: k(() => [a("div", gn, [(v(!0), i(e, null, x(Q.value, (e) => (v(), i("section", {
|
|
2923
|
-
key: e.id,
|
|
2924
|
-
class: "ml-ribbon-overflow-group"
|
|
2925
|
-
}, [a("header", _n, T(e.title), 1), c(Xt, {
|
|
2926
|
-
group: e,
|
|
2927
|
-
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2928
|
-
disabled: B.value,
|
|
2929
|
-
onItemClick: l[3] ||= (e) => Ke(e.groupId, e.itemId)
|
|
2930
|
-
}, null, 8, [
|
|
2931
|
-
"group",
|
|
2932
|
-
"gallery-preview-fallback",
|
|
2933
|
-
"disabled"
|
|
2934
|
-
])]))), 128))])]),
|
|
2935
|
-
_: 1
|
|
2936
|
-
}, 8, [
|
|
2937
|
-
"width",
|
|
2938
|
-
"disabled",
|
|
2939
|
-
"popper-class"
|
|
2940
|
-
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, fn)) : (v(), i("main", {
|
|
2996
|
+
onOpen: l[3] ||= (e) => D(I).overflowOpen.value = !0,
|
|
2997
|
+
onClose: l[4] ||= (e) => D(I).overflowOpen.value = !1,
|
|
2998
|
+
onItemClick: l[5] ||= (e) => Ge(e.groupId, e.itemId)
|
|
2999
|
+
}, null, 8, [
|
|
3000
|
+
"groups",
|
|
3001
|
+
"popover-class",
|
|
3002
|
+
"popover-width",
|
|
3003
|
+
"trigger-aria-label",
|
|
3004
|
+
"gallery-preview-fallback",
|
|
3005
|
+
"disabled"
|
|
3006
|
+
])]), l[13] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, bn)) : D(I).minimized.value ? (v(), i("main", {
|
|
2941
3007
|
key: 1,
|
|
2942
3008
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
2943
3009
|
"data-active-tab": R.value.id
|
|
@@ -2948,31 +3014,31 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2948
3014
|
width: 340,
|
|
2949
3015
|
disabled: B.value,
|
|
2950
3016
|
"show-arrow": !1,
|
|
2951
|
-
"popper-class":
|
|
3017
|
+
"popper-class": _e.value
|
|
2952
3018
|
}, {
|
|
2953
3019
|
reference: k(() => [a("button", {
|
|
2954
3020
|
class: "ml-ribbon-simplified-group",
|
|
2955
3021
|
type: "button",
|
|
2956
3022
|
disabled: B.value
|
|
2957
|
-
}, [
|
|
3023
|
+
}, [Ze(e) ? (v(), n(D(L), {
|
|
2958
3024
|
key: 0,
|
|
2959
3025
|
class: "ml-ribbon-simplified-group__icon"
|
|
2960
3026
|
}, {
|
|
2961
|
-
default: k(() => [(v(), n(w(
|
|
3027
|
+
default: k(() => [(v(), n(w(Ze(e))))]),
|
|
2962
3028
|
_: 2
|
|
2963
|
-
}, 1024)) : r("", !0), a("span", null, T(e.title), 1)], 8,
|
|
2964
|
-
default: k(() => [a("div",
|
|
2965
|
-
group:
|
|
2966
|
-
"gallery-preview-fallback":
|
|
3029
|
+
}, 1024)) : r("", !0), a("span", null, T(e.title), 1)], 8, wn)]),
|
|
3030
|
+
default: k(() => [a("div", Tn, [c(en, {
|
|
3031
|
+
group: Ee(e),
|
|
3032
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2967
3033
|
disabled: B.value,
|
|
2968
|
-
onItemClick: l[6] ||= (e) =>
|
|
3034
|
+
onItemClick: l[6] ||= (e) => Ge(e.groupId, e.itemId)
|
|
2969
3035
|
}, null, 8, [
|
|
2970
3036
|
"group",
|
|
2971
3037
|
"gallery-preview-fallback",
|
|
2972
3038
|
"disabled"
|
|
2973
3039
|
])])]),
|
|
2974
3040
|
_: 2
|
|
2975
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
3041
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, Cn)) : r("", !0)]),
|
|
2976
3042
|
_: 1
|
|
2977
3043
|
}, 8, [
|
|
2978
3044
|
"visible",
|
|
@@ -2986,8 +3052,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2986
3052
|
class: "ml-ribbon__panel",
|
|
2987
3053
|
"data-active-tab": R.value.id,
|
|
2988
3054
|
ref_key: "classicPanelRef",
|
|
2989
|
-
ref:
|
|
2990
|
-
}, [(v(!0), i(e, null, x(
|
|
3055
|
+
ref: le
|
|
3056
|
+
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(mn, {
|
|
2991
3057
|
id: e.id,
|
|
2992
3058
|
key: e.id,
|
|
2993
3059
|
"data-group-id": e.id,
|
|
@@ -3000,16 +3066,16 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3000
3066
|
launcher: e.launcher,
|
|
3001
3067
|
"show-launcher-icon": e.showLauncherIcon,
|
|
3002
3068
|
"group-model": e,
|
|
3003
|
-
"overflow-trigger-aria-label":
|
|
3004
|
-
"gallery-preview-fallback":
|
|
3069
|
+
"overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
|
|
3070
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
3005
3071
|
disabled: B.value,
|
|
3006
|
-
onItemClick: l[8] ||= (e) =>
|
|
3072
|
+
onItemClick: l[8] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3007
3073
|
}, {
|
|
3008
|
-
default: k(() => [c(
|
|
3074
|
+
default: k(() => [c(en, {
|
|
3009
3075
|
group: e,
|
|
3010
|
-
"gallery-preview-fallback":
|
|
3076
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
3011
3077
|
disabled: B.value,
|
|
3012
|
-
onItemClick: l[7] ||= (e) =>
|
|
3078
|
+
onItemClick: l[7] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3013
3079
|
}, null, 8, [
|
|
3014
3080
|
"group",
|
|
3015
3081
|
"gallery-preview-fallback",
|
|
@@ -3031,40 +3097,24 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3031
3097
|
"overflow-trigger-aria-label",
|
|
3032
3098
|
"gallery-preview-fallback",
|
|
3033
3099
|
"disabled"
|
|
3034
|
-
]))), 128)),
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
width:
|
|
3100
|
+
]))), 128)), $.value.length ? (v(), i("section", Dn, [a("div", On, [c(an, {
|
|
3101
|
+
groups: $.value,
|
|
3102
|
+
"popover-class": be.value,
|
|
3103
|
+
"popover-width": Te.value,
|
|
3104
|
+
"trigger-aria-label": X.value.overflowTriggerAriaLabel ?? "",
|
|
3105
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback ?? "",
|
|
3038
3106
|
disabled: B.value,
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
},
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
key: e.id,
|
|
3051
|
-
class: "ml-ribbon-overflow-group"
|
|
3052
|
-
}, [a("header", En, T(e.title), 1), c(Xt, {
|
|
3053
|
-
group: e,
|
|
3054
|
-
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
3055
|
-
disabled: B.value,
|
|
3056
|
-
onItemClick: l[9] ||= (e) => Ke(e.groupId, e.itemId)
|
|
3057
|
-
}, null, 8, [
|
|
3058
|
-
"group",
|
|
3059
|
-
"gallery-preview-fallback",
|
|
3060
|
-
"disabled"
|
|
3061
|
-
])]))), 128))])]),
|
|
3062
|
-
_: 1
|
|
3063
|
-
}, 8, [
|
|
3064
|
-
"width",
|
|
3065
|
-
"disabled",
|
|
3066
|
-
"popper-class"
|
|
3067
|
-
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, xn)) : r("", !0),
|
|
3107
|
+
onOpen: l[9] ||= (e) => D(I).overflowOpen.value = !0,
|
|
3108
|
+
onClose: l[10] ||= (e) => D(I).overflowOpen.value = !1,
|
|
3109
|
+
onItemClick: l[11] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3110
|
+
}, null, 8, [
|
|
3111
|
+
"groups",
|
|
3112
|
+
"popover-class",
|
|
3113
|
+
"popover-width",
|
|
3114
|
+
"trigger-aria-label",
|
|
3115
|
+
"gallery-preview-fallback",
|
|
3116
|
+
"disabled"
|
|
3117
|
+
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, En)) : r("", !0),
|
|
3068
3118
|
!D(I).minimized.value && R.value && D(I).layout.value === "simplified" ? (v(), i("main", {
|
|
3069
3119
|
key: 1,
|
|
3070
3120
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
@@ -3075,47 +3125,47 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3075
3125
|
placement: "bottom-start",
|
|
3076
3126
|
width: 340,
|
|
3077
3127
|
disabled: B.value,
|
|
3078
|
-
"popper-class":
|
|
3128
|
+
"popper-class": _e.value
|
|
3079
3129
|
}, {
|
|
3080
3130
|
reference: k(() => [a("button", {
|
|
3081
3131
|
class: "ml-ribbon-simplified-group",
|
|
3082
3132
|
type: "button",
|
|
3083
3133
|
disabled: B.value
|
|
3084
|
-
}, [
|
|
3134
|
+
}, [Ze(e) ? (v(), n(D(L), {
|
|
3085
3135
|
key: 0,
|
|
3086
3136
|
class: "ml-ribbon-simplified-group__icon"
|
|
3087
3137
|
}, {
|
|
3088
|
-
default: k(() => [(v(), n(w(
|
|
3138
|
+
default: k(() => [(v(), n(w(Ze(e))))]),
|
|
3089
3139
|
_: 2
|
|
3090
|
-
}, 1024)) : r("", !0), a("span", null, T(e.title), 1)], 8,
|
|
3091
|
-
default: k(() => [a("div",
|
|
3092
|
-
group:
|
|
3093
|
-
"gallery-preview-fallback":
|
|
3140
|
+
}, 1024)) : r("", !0), a("span", null, T(e.title), 1)], 8, An)]),
|
|
3141
|
+
default: k(() => [a("div", jn, [c(en, {
|
|
3142
|
+
group: Ee(e),
|
|
3143
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
3094
3144
|
disabled: B.value,
|
|
3095
|
-
onItemClick: l[12] ||= (e) =>
|
|
3145
|
+
onItemClick: l[12] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3096
3146
|
}, null, 8, [
|
|
3097
3147
|
"group",
|
|
3098
3148
|
"gallery-preview-fallback",
|
|
3099
3149
|
"disabled"
|
|
3100
3150
|
])])]),
|
|
3101
3151
|
_: 2
|
|
3102
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
3103
|
-
c(
|
|
3152
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, kn)) : r("", !0),
|
|
3153
|
+
c(Ce, {
|
|
3104
3154
|
open: D(I).backdropOpen.value,
|
|
3105
|
-
size:
|
|
3106
|
-
"back-label":
|
|
3107
|
-
title:
|
|
3108
|
-
description:
|
|
3109
|
-
onClose:
|
|
3155
|
+
size: ge.value,
|
|
3156
|
+
"back-label": X.value.backstageBackLabel,
|
|
3157
|
+
title: X.value.backstageTitle,
|
|
3158
|
+
description: X.value.backstageDescription,
|
|
3159
|
+
onClose: We
|
|
3110
3160
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
3111
3161
|
name: "default",
|
|
3112
3162
|
fn: k(() => [S(t.$slots, "backstage", {
|
|
3113
|
-
close:
|
|
3163
|
+
close: We,
|
|
3114
3164
|
open: D(I).backdropOpen.value,
|
|
3115
|
-
size:
|
|
3116
|
-
backLabel:
|
|
3117
|
-
title:
|
|
3118
|
-
description:
|
|
3165
|
+
size: ge.value,
|
|
3166
|
+
backLabel: X.value.backstageBackLabel,
|
|
3167
|
+
title: X.value.backstageTitle,
|
|
3168
|
+
description: X.value.backstageDescription,
|
|
3119
3169
|
disabled: D(I).disabled.value
|
|
3120
3170
|
})]),
|
|
3121
3171
|
key: "0"
|
|
@@ -3126,14 +3176,14 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3126
3176
|
"title",
|
|
3127
3177
|
"description"
|
|
3128
3178
|
])
|
|
3129
|
-
], 10,
|
|
3179
|
+
], 10, hn))]),
|
|
3130
3180
|
_: 3
|
|
3131
3181
|
}, 8, ["size"]));
|
|
3132
3182
|
}
|
|
3133
|
-
}),
|
|
3183
|
+
}), Pn = {
|
|
3134
3184
|
class: "ml-ribbon-tab-definition",
|
|
3135
3185
|
hidden: ""
|
|
3136
|
-
},
|
|
3186
|
+
}, Fn = /* @__PURE__ */ l({
|
|
3137
3187
|
__name: "RibbonTab",
|
|
3138
3188
|
props: {
|
|
3139
3189
|
id: {},
|
|
@@ -3144,13 +3194,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3144
3194
|
contextualTitle: {}
|
|
3145
3195
|
},
|
|
3146
3196
|
setup(e) {
|
|
3147
|
-
return (e, t) => (v(), i("div",
|
|
3197
|
+
return (e, t) => (v(), i("div", Pn, [S(e.$slots, "default")]));
|
|
3148
3198
|
}
|
|
3149
|
-
}),
|
|
3199
|
+
}), In = {
|
|
3150
3200
|
key: 0,
|
|
3151
3201
|
class: "ml-ribbon-keytips",
|
|
3152
3202
|
"aria-live": "polite"
|
|
3153
|
-
},
|
|
3203
|
+
}, Ln = { class: "ml-ribbon-keytips__hint" }, Rn = /* @__PURE__ */ l({
|
|
3154
3204
|
__name: "RibbonKeyTips",
|
|
3155
3205
|
props: {
|
|
3156
3206
|
open: { type: Boolean },
|
|
@@ -3185,11 +3235,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3185
3235
|
}
|
|
3186
3236
|
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), O(() => s.open, (e) => {
|
|
3187
3237
|
e || y();
|
|
3188
|
-
}), (t, o) => n.open ? (v(), i("div",
|
|
3238
|
+
}), (t, o) => n.open ? (v(), i("div", In, [a("div", Ln, T(f.value), 1), (v(!0), i(e, null, x(u.value, (e) => (v(), i("span", {
|
|
3189
3239
|
key: e.id,
|
|
3190
3240
|
class: "ml-ribbon-keytip"
|
|
3191
3241
|
}, T(e.key), 1))), 128))])) : r("", !0);
|
|
3192
3242
|
}
|
|
3193
3243
|
});
|
|
3194
3244
|
//#endregion
|
|
3195
|
-
export {
|
|
3245
|
+
export { Nn as MlRibbon, Ce as MlRibbonBackstage, Be as MlRibbonButton, We as MlRibbonButtonGroup, Fe as MlRibbonCollection, Ae as MlRibbonContextualTabs, et as MlRibbonDropdown, Pe as MlRibbonFileMenu, Lt as MlRibbonGallery, mn as MlRibbonGroup, Vt as MlRibbonInputNumber, $t as MlRibbonItemHost, Rn as MlRibbonKeyTips, qt as MlRibbonSegmented, Fn as MlRibbonTab, Te as MlRibbonTabs, Xt as MlRibbonTemplateItem, Jt as MlRibbonToggleButton };
|