@mlightcad/ribbon 0.1.14 → 0.1.16
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/LICENSE +21 -0
- package/README.md +5 -1
- 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 +1 -0
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +720 -663
- package/dist/ml-ribbon.umd.js +4 -1
- package/dist/utils/labelLines.d.ts +12 -0
- package/package.json +5 -3
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,11 +754,11 @@ 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 O([() => u.syncLabelWithSelection,
|
|
747
|
-
u.syncLabelWithSelection && d("tooltip-change",
|
|
760
|
+
return O([() => u.syncLabelWithSelection, P], () => {
|
|
761
|
+
u.syncLabelWithSelection && d("tooltip-change", P.value);
|
|
748
762
|
}, {
|
|
749
763
|
immediate: !0,
|
|
750
764
|
flush: "post"
|
|
@@ -752,44 +766,44 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
752
766
|
class: m(["ml-ribbon-dropdown", [`ml-ribbon-dropdown--item-${o.itemSize}`, { "is-label-hidden": o.hideLabel }]]),
|
|
753
767
|
trigger: "click",
|
|
754
768
|
disabled: o.disabled,
|
|
755
|
-
"popper-class":
|
|
756
|
-
onVisibleChange:
|
|
757
|
-
onCommand:
|
|
769
|
+
"popper-class": R.value,
|
|
770
|
+
onVisibleChange: z,
|
|
771
|
+
onCommand: B
|
|
758
772
|
}, {
|
|
759
773
|
dropdown: k(() => [c(D(re), null, {
|
|
760
774
|
default: k(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(D(I), {
|
|
761
|
-
key: String(
|
|
762
|
-
command:
|
|
775
|
+
key: String(U(e)),
|
|
776
|
+
command: ue(e),
|
|
763
777
|
disabled: e.disabled === !0,
|
|
764
778
|
divided: e.divided === !0,
|
|
765
|
-
"aria-current":
|
|
766
|
-
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) })
|
|
767
781
|
}, {
|
|
768
782
|
default: k(() => [c(D(H), {
|
|
769
|
-
content:
|
|
770
|
-
disabled: !
|
|
783
|
+
content: fe(e),
|
|
784
|
+
disabled: !fe(e),
|
|
771
785
|
"show-after": o.tooltipShowAfter,
|
|
772
786
|
"hide-after": o.tooltipHideAfter,
|
|
773
787
|
placement: "top",
|
|
774
788
|
effect: "dark"
|
|
775
789
|
}, {
|
|
776
|
-
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), {
|
|
777
791
|
key: 0,
|
|
778
792
|
class: "ml-ribbon-dropdown-item__check-icon"
|
|
779
793
|
}, {
|
|
780
|
-
default: k(() => [c(D(
|
|
794
|
+
default: k(() => [c(D(G))]),
|
|
781
795
|
_: 1
|
|
782
|
-
})) : r("", !0)])) : r("", !0), a("span",
|
|
796
|
+
})) : r("", !0)])) : r("", !0), a("span", Qe, [ae(e) ? (v(), n(D(L), {
|
|
783
797
|
key: 0,
|
|
784
798
|
class: "ml-ribbon-dropdown-item__icon"
|
|
785
799
|
}, {
|
|
786
|
-
default: k(() => [(v(), n(w(
|
|
800
|
+
default: k(() => [(v(), n(w(ae(e))))]),
|
|
787
801
|
_: 2
|
|
788
|
-
}, 1024)) :
|
|
802
|
+
}, 1024)) : ce(e) ? (v(), i("i", {
|
|
789
803
|
key: 1,
|
|
790
|
-
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)]),
|
|
791
805
|
"aria-hidden": "true"
|
|
792
|
-
}, null, 2)) : r("", !0), a("span",
|
|
806
|
+
}, null, 2)) : r("", !0), a("span", $e, T(W(e)), 1)])])], !0)])]),
|
|
793
807
|
_: 2
|
|
794
808
|
}, 1032, [
|
|
795
809
|
"content",
|
|
@@ -810,25 +824,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
810
824
|
default: k(() => [c(D(te), {
|
|
811
825
|
type: "default",
|
|
812
826
|
disabled: o.disabled,
|
|
813
|
-
"aria-label":
|
|
814
|
-
onClick:
|
|
827
|
+
"aria-label": P.value,
|
|
828
|
+
onClick: ie
|
|
815
829
|
}, {
|
|
816
|
-
default: k(() => [a("span",
|
|
830
|
+
default: k(() => [a("span", Ge, [t.$slots.icon || ne.value ? (v(), i("span", {
|
|
817
831
|
key: 0,
|
|
818
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class":
|
|
819
|
-
onClick: ee(
|
|
820
|
-
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [
|
|
821
|
-
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)))]),
|
|
822
836
|
_: 1
|
|
823
|
-
})) :
|
|
837
|
+
})) : N.value ? (v(), i("i", {
|
|
824
838
|
key: 1,
|
|
825
|
-
class: m(
|
|
839
|
+
class: m(N.value),
|
|
826
840
|
"aria-hidden": "true"
|
|
827
|
-
}, 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", {
|
|
828
842
|
selectedOption: y.value,
|
|
829
|
-
label: C.value
|
|
830
|
-
|
|
831
|
-
|
|
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))))]),
|
|
832
847
|
_: 1
|
|
833
848
|
}, 8, ["class"])])])]),
|
|
834
849
|
_: 3
|
|
@@ -840,50 +855,50 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
840
855
|
"popper-class"
|
|
841
856
|
]));
|
|
842
857
|
}
|
|
843
|
-
}), [["__scopeId", "data-v-
|
|
858
|
+
}), [["__scopeId", "data-v-453b1e92"]]), tt = ["disabled"], nt = ["src"], rt = {
|
|
844
859
|
key: 3,
|
|
845
860
|
class: "ml-ribbon-gallery__preview-svg",
|
|
846
861
|
role: "presentation",
|
|
847
862
|
"aria-hidden": "true"
|
|
848
|
-
},
|
|
863
|
+
}, it = ["href"], at = { class: "ml-ribbon-gallery__label ml-ribbon-gallery__collapsed-label" }, ot = { class: "ml-ribbon-gallery__panel" }, st = {
|
|
849
864
|
key: 0,
|
|
850
865
|
class: "ml-ribbon-gallery__panel-category-title"
|
|
851
|
-
},
|
|
866
|
+
}, ct = ["disabled", "onClick"], lt = ["src"], ut = {
|
|
852
867
|
key: 3,
|
|
853
868
|
class: "ml-ribbon-gallery__preview-svg",
|
|
854
869
|
role: "presentation",
|
|
855
870
|
"aria-hidden": "true"
|
|
856
|
-
},
|
|
871
|
+
}, dt = ["href"], ft = { class: "ml-ribbon-gallery__label" }, pt = {
|
|
857
872
|
key: 1,
|
|
858
873
|
class: "ml-ribbon-gallery__title"
|
|
859
|
-
},
|
|
874
|
+
}, mt = {
|
|
860
875
|
key: 2,
|
|
861
876
|
class: "ml-ribbon-gallery__categories"
|
|
862
|
-
},
|
|
877
|
+
}, ht = {
|
|
863
878
|
key: 0,
|
|
864
879
|
class: "ml-ribbon-gallery__category-title"
|
|
865
|
-
},
|
|
880
|
+
}, gt = ["disabled", "onClick"], _t = ["src"], vt = {
|
|
866
881
|
key: 3,
|
|
867
882
|
class: "ml-ribbon-gallery__preview-svg",
|
|
868
883
|
role: "presentation",
|
|
869
884
|
"aria-hidden": "true"
|
|
870
|
-
},
|
|
885
|
+
}, yt = ["href"], bt = { class: "ml-ribbon-gallery__label" }, xt = {
|
|
871
886
|
key: 0,
|
|
872
887
|
class: "ml-ribbon-gallery__controls",
|
|
873
888
|
"aria-label": "Gallery navigation"
|
|
874
|
-
},
|
|
889
|
+
}, St = ["disabled"], Ct = ["disabled"], wt = ["disabled"], Tt = {
|
|
875
890
|
key: 0,
|
|
876
891
|
class: "ml-ribbon-gallery__panel-category-title"
|
|
877
|
-
},
|
|
892
|
+
}, Et = [
|
|
878
893
|
"data-gallery-row-index",
|
|
879
894
|
"disabled",
|
|
880
895
|
"onClick"
|
|
881
|
-
],
|
|
896
|
+
], Dt = ["src"], Ot = {
|
|
882
897
|
key: 3,
|
|
883
898
|
class: "ml-ribbon-gallery__preview-svg",
|
|
884
899
|
role: "presentation",
|
|
885
900
|
"aria-hidden": "true"
|
|
886
|
-
},
|
|
901
|
+
}, kt = ["href"], At = { class: "ml-ribbon-gallery__label" }, jt = 6, Mt = 64, Nt = 4, Pt = 16, Ft = 4, It = 22, Lt = /* @__PURE__ */ l({
|
|
887
902
|
name: "MlRibbonGallery",
|
|
888
903
|
__name: "RibbonGallery",
|
|
889
904
|
props: {
|
|
@@ -905,105 +920,105 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
905
920
|
},
|
|
906
921
|
emits: ["select"],
|
|
907
922
|
setup(o, { emit: l }) {
|
|
908
|
-
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(() => {
|
|
909
924
|
let e = B.value, t = R.value.length;
|
|
910
925
|
return t === 0 ? Math.min(e, 1) : Math.min(e, t);
|
|
911
|
-
}), 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(() => {
|
|
912
927
|
let e = H.value * V.value;
|
|
913
928
|
return R.value.slice(e, e + V.value);
|
|
914
|
-
}),
|
|
929
|
+
}), G = t(() => new Set(ue.value.map((e) => e.id))), de = t(() => R.value.length > V.value), fe = t(() => {
|
|
915
930
|
let e = [
|
|
916
931
|
"ml-ribbon-gallery-panel",
|
|
917
932
|
`ml-ribbon-gallery-panel--${u.collapsed ? "collapsed" : "inline"}`,
|
|
918
933
|
`ml-ribbon-gallery-panel--size-${N.value}`
|
|
919
934
|
];
|
|
920
935
|
return u.inlineItemWidthMode === "auto" && e.push("ml-ribbon-gallery-panel--item-width-auto"), e.join(" ");
|
|
921
|
-
}),
|
|
936
|
+
}), pe = t(() => ({
|
|
922
937
|
"--ml-ribbon-gallery-panel-columns": String(V.value),
|
|
923
938
|
"--ml-ribbon-gallery-panel-item-width": `${P.value}px`
|
|
924
|
-
})),
|
|
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: [{
|
|
925
940
|
name: "offset",
|
|
926
941
|
options: { offset: [j.value, 0] }
|
|
927
942
|
}] }));
|
|
928
943
|
O(() => u.modelValue, (e) => {
|
|
929
|
-
typeof e == "string" && (_.value = e,
|
|
944
|
+
typeof e == "string" && (_.value = e, ve(e));
|
|
930
945
|
}, { immediate: !0 }), O(() => [
|
|
931
946
|
R.value.map((e) => e.id).join("\0"),
|
|
932
947
|
V.value,
|
|
933
948
|
_.value
|
|
934
949
|
], () => {
|
|
935
|
-
|
|
950
|
+
ve() || (C.value = Math.min(C.value, ae.value - 1));
|
|
936
951
|
}), O(y, async (e) => {
|
|
937
|
-
!e || u.collapsed || (
|
|
952
|
+
!e || u.collapsed || (ye(), await p(), await p(), be());
|
|
938
953
|
});
|
|
939
|
-
function
|
|
954
|
+
function q(e) {
|
|
940
955
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(E(e)) : e;
|
|
941
956
|
}
|
|
942
|
-
function
|
|
957
|
+
function J(e) {
|
|
943
958
|
let t = I.value.toLowerCase(), n = e.title.trim().toLowerCase();
|
|
944
959
|
return re.value > 1 || !t || n !== t;
|
|
945
960
|
}
|
|
946
|
-
function
|
|
947
|
-
return
|
|
961
|
+
function he(e) {
|
|
962
|
+
return de.value ? e.items.filter((e) => G.value.has(e.id)) : e.items;
|
|
948
963
|
}
|
|
949
|
-
function
|
|
950
|
-
if (u.disabled || !
|
|
964
|
+
function ge(e) {
|
|
965
|
+
if (u.disabled || !de.value) return;
|
|
951
966
|
let t = H.value + e;
|
|
952
967
|
C.value = Math.min(Math.max(t, 0), ae.value - 1);
|
|
953
968
|
}
|
|
954
|
-
function
|
|
969
|
+
function _e(e) {
|
|
955
970
|
let t = R.value.findIndex((t) => t.id === e.id);
|
|
956
971
|
return t < 0 ? 0 : Math.floor(t / V.value);
|
|
957
972
|
}
|
|
958
|
-
function
|
|
973
|
+
function ve(e = _.value) {
|
|
959
974
|
let t = R.value.find((t) => t.id === e);
|
|
960
|
-
return t ? (C.value =
|
|
975
|
+
return t ? (C.value = _e(t), !0) : !1;
|
|
961
976
|
}
|
|
962
|
-
function
|
|
977
|
+
function ye() {
|
|
963
978
|
let e = A.value, t = ee.value;
|
|
964
979
|
if (!e || !t) {
|
|
965
980
|
j.value = 0;
|
|
966
981
|
return;
|
|
967
982
|
}
|
|
968
983
|
let n = e.querySelector(".ml-ribbon-gallery__grid .ml-ribbon-gallery__item")?.getBoundingClientRect().left ?? e.getBoundingClientRect().left;
|
|
969
|
-
j.value = Math.round(n - t.getBoundingClientRect().left -
|
|
984
|
+
j.value = Math.round(n - t.getBoundingClientRect().left - jt);
|
|
970
985
|
}
|
|
971
|
-
function
|
|
986
|
+
function be() {
|
|
972
987
|
let e = te.value;
|
|
973
988
|
e && e.querySelector(`[data-gallery-row-index="${H.value}"]`)?.scrollIntoView?.({ block: "start" });
|
|
974
989
|
}
|
|
975
|
-
function
|
|
976
|
-
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;
|
|
977
992
|
}
|
|
978
|
-
function
|
|
979
|
-
return e.component ?
|
|
993
|
+
function xe(e) {
|
|
994
|
+
return e.component ? q(e.component) : null;
|
|
980
995
|
}
|
|
981
|
-
function
|
|
996
|
+
function X(e) {
|
|
982
997
|
return u.disabled || e.disabled === !0;
|
|
983
998
|
}
|
|
984
|
-
function
|
|
999
|
+
function Z(e) {
|
|
985
1000
|
if (typeof e.icon != "string") return null;
|
|
986
1001
|
let t = e.icon.trim();
|
|
987
1002
|
return t.length > 0 ? t : null;
|
|
988
1003
|
}
|
|
989
|
-
function
|
|
1004
|
+
function Q(e) {
|
|
990
1005
|
let t = e.previewSvg ?? e.svg;
|
|
991
1006
|
if (typeof t != "string") return null;
|
|
992
1007
|
let n = t.trim();
|
|
993
1008
|
return n.length > 0 ? n : null;
|
|
994
1009
|
}
|
|
995
|
-
function
|
|
1010
|
+
function Se(e) {
|
|
996
1011
|
return e.startsWith("data:image/svg+xml") || e.endsWith(".svg");
|
|
997
1012
|
}
|
|
998
|
-
function
|
|
999
|
-
let t =
|
|
1000
|
-
return t ?
|
|
1013
|
+
function Ce(e) {
|
|
1014
|
+
let t = Q(e);
|
|
1015
|
+
return t ? Se(t) : !1;
|
|
1001
1016
|
}
|
|
1002
|
-
function
|
|
1017
|
+
function we(e) {
|
|
1003
1018
|
return typeof e.preview == "string" ? e.preview : u.previewFallback;
|
|
1004
1019
|
}
|
|
1005
|
-
function
|
|
1006
|
-
|
|
1020
|
+
function $(e) {
|
|
1021
|
+
X(e) || (_.value = e.id, C.value = _e(e), y.value = !1, g("select", e.id));
|
|
1007
1022
|
}
|
|
1008
1023
|
return (t, l) => (v(), i("div", {
|
|
1009
1024
|
ref_key: "galleryRef",
|
|
@@ -1022,8 +1037,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1022
1037
|
trigger: "click",
|
|
1023
1038
|
placement: "bottom-start",
|
|
1024
1039
|
disabled: o.disabled,
|
|
1025
|
-
width:
|
|
1026
|
-
"popper-class":
|
|
1040
|
+
width: me.value,
|
|
1041
|
+
"popper-class": fe.value
|
|
1027
1042
|
}, {
|
|
1028
1043
|
reference: k(() => [a("button", {
|
|
1029
1044
|
type: "button",
|
|
@@ -1031,84 +1046,84 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1031
1046
|
"is-selected": _.value === z.value.id,
|
|
1032
1047
|
"is-open": y.value
|
|
1033
1048
|
}]),
|
|
1034
|
-
disabled:
|
|
1035
|
-
}, [
|
|
1049
|
+
disabled: X(z.value)
|
|
1050
|
+
}, [xe(z.value) ? (v(), n(w(xe(z.value)), f({ key: 0 }, z.value.componentProps, {
|
|
1036
1051
|
item: z.value,
|
|
1037
1052
|
selected: _.value === z.value.id,
|
|
1038
|
-
disabled:
|
|
1053
|
+
disabled: X(z.value)
|
|
1039
1054
|
}), null, 16, [
|
|
1040
1055
|
"item",
|
|
1041
1056
|
"selected",
|
|
1042
1057
|
"disabled"
|
|
1043
1058
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview ml-ribbon-gallery__collapsed-preview", {
|
|
1044
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1045
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1046
|
-
}]) }, [
|
|
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), {
|
|
1047
1062
|
key: 0,
|
|
1048
1063
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1049
1064
|
}, {
|
|
1050
|
-
default: k(() => [(v(), n(w(
|
|
1065
|
+
default: k(() => [(v(), n(w(Y(z.value))))]),
|
|
1051
1066
|
_: 1
|
|
1052
|
-
})) :
|
|
1067
|
+
})) : Z(z.value) ? (v(), i("i", {
|
|
1053
1068
|
key: 1,
|
|
1054
|
-
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)]),
|
|
1055
1070
|
"aria-hidden": "true"
|
|
1056
|
-
}, null, 2)) :
|
|
1071
|
+
}, null, 2)) : Q(z.value) && Ce(z.value) ? (v(), i("img", {
|
|
1057
1072
|
key: 2,
|
|
1058
1073
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1059
|
-
src:
|
|
1074
|
+
src: Q(z.value) ?? "",
|
|
1060
1075
|
alt: ""
|
|
1061
|
-
}, null, 8,
|
|
1062
|
-
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", {
|
|
1063
1078
|
key: o.id,
|
|
1064
1079
|
class: "ml-ribbon-gallery__panel-category"
|
|
1065
|
-
}, [
|
|
1080
|
+
}, [J(o) ? (v(), i("h4", st, T(o.title), 1)) : r("", !0), a("div", {
|
|
1066
1081
|
class: "ml-ribbon-gallery__panel-grid",
|
|
1067
|
-
style: h(
|
|
1082
|
+
style: h(pe.value)
|
|
1068
1083
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
1069
1084
|
key: r.id,
|
|
1070
1085
|
type: "button",
|
|
1071
1086
|
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
1072
|
-
disabled:
|
|
1073
|
-
onClick: (e) =>
|
|
1087
|
+
disabled: X(r),
|
|
1088
|
+
onClick: (e) => $(r)
|
|
1074
1089
|
}, [S(t.$slots, "item", {
|
|
1075
1090
|
item: r,
|
|
1076
1091
|
category: o,
|
|
1077
1092
|
selected: _.value === r.id,
|
|
1078
|
-
disabled:
|
|
1079
|
-
select: () =>
|
|
1080
|
-
}, () => [
|
|
1093
|
+
disabled: X(r),
|
|
1094
|
+
select: () => $(r)
|
|
1095
|
+
}, () => [xe(r) ? (v(), n(w(xe(r)), f({
|
|
1081
1096
|
key: 0,
|
|
1082
1097
|
ref_for: !0
|
|
1083
1098
|
}, r.componentProps, {
|
|
1084
1099
|
item: r,
|
|
1085
1100
|
category: o,
|
|
1086
1101
|
selected: _.value === r.id,
|
|
1087
|
-
disabled:
|
|
1102
|
+
disabled: X(r)
|
|
1088
1103
|
}), null, 16, [
|
|
1089
1104
|
"item",
|
|
1090
1105
|
"category",
|
|
1091
1106
|
"selected",
|
|
1092
1107
|
"disabled"
|
|
1093
1108
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1094
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1095
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1096
|
-
}]) }, [
|
|
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), {
|
|
1097
1112
|
key: 0,
|
|
1098
1113
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1099
1114
|
}, {
|
|
1100
|
-
default: k(() => [(v(), n(w(
|
|
1115
|
+
default: k(() => [(v(), n(w(Y(r))))]),
|
|
1101
1116
|
_: 2
|
|
1102
|
-
}, 1024)) :
|
|
1117
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1103
1118
|
key: 1,
|
|
1104
|
-
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)]),
|
|
1105
1120
|
"aria-hidden": "true"
|
|
1106
|
-
}, null, 2)) :
|
|
1121
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
1107
1122
|
key: 2,
|
|
1108
1123
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1109
|
-
src:
|
|
1124
|
+
src: Q(r) ?? "",
|
|
1110
1125
|
alt: ""
|
|
1111
|
-
}, 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))])]),
|
|
1112
1127
|
_: 3
|
|
1113
1128
|
}, 8, [
|
|
1114
1129
|
"visible",
|
|
@@ -1116,86 +1131,86 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1116
1131
|
"width",
|
|
1117
1132
|
"popper-class"
|
|
1118
1133
|
])) : r("", !0),
|
|
1119
|
-
!o.collapsed && I.value ? (v(), i("div",
|
|
1120
|
-
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", {
|
|
1121
1136
|
key: o.id,
|
|
1122
1137
|
class: "ml-ribbon-gallery__category"
|
|
1123
|
-
}, [I.value &&
|
|
1138
|
+
}, [I.value && J(o) ? (v(), i("h4", ht, T(o.title), 1)) : r("", !0), a("div", {
|
|
1124
1139
|
class: "ml-ribbon-gallery__grid",
|
|
1125
1140
|
style: h({ "--ml-ribbon-gallery-inline-columns": String(V.value) })
|
|
1126
|
-
}, [(v(!0), i(e, null, x(
|
|
1141
|
+
}, [(v(!0), i(e, null, x(he(o), (r) => (v(), i("button", {
|
|
1127
1142
|
key: r.id,
|
|
1128
1143
|
type: "button",
|
|
1129
1144
|
class: m(["ml-ribbon-gallery__item", { "is-selected": _.value === r.id }]),
|
|
1130
|
-
disabled:
|
|
1131
|
-
onClick: (e) =>
|
|
1145
|
+
disabled: X(r),
|
|
1146
|
+
onClick: (e) => $(r)
|
|
1132
1147
|
}, [S(t.$slots, "item", {
|
|
1133
1148
|
item: r,
|
|
1134
1149
|
category: o,
|
|
1135
1150
|
selected: _.value === r.id,
|
|
1136
|
-
disabled:
|
|
1137
|
-
select: () =>
|
|
1138
|
-
}, () => [
|
|
1151
|
+
disabled: X(r),
|
|
1152
|
+
select: () => $(r)
|
|
1153
|
+
}, () => [xe(r) ? (v(), n(w(xe(r)), f({
|
|
1139
1154
|
key: 0,
|
|
1140
1155
|
ref_for: !0
|
|
1141
1156
|
}, r.componentProps, {
|
|
1142
1157
|
item: r,
|
|
1143
1158
|
category: o,
|
|
1144
1159
|
selected: _.value === r.id,
|
|
1145
|
-
disabled:
|
|
1160
|
+
disabled: X(r)
|
|
1146
1161
|
}), null, 16, [
|
|
1147
1162
|
"item",
|
|
1148
1163
|
"category",
|
|
1149
1164
|
"selected",
|
|
1150
1165
|
"disabled"
|
|
1151
1166
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1152
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1153
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1154
|
-
}]) }, [
|
|
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), {
|
|
1155
1170
|
key: 0,
|
|
1156
1171
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1157
1172
|
}, {
|
|
1158
|
-
default: k(() => [(v(), n(w(
|
|
1173
|
+
default: k(() => [(v(), n(w(Y(r))))]),
|
|
1159
1174
|
_: 2
|
|
1160
|
-
}, 1024)) :
|
|
1175
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1161
1176
|
key: 1,
|
|
1162
|
-
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)]),
|
|
1163
1178
|
"aria-hidden": "true"
|
|
1164
|
-
}, null, 2)) :
|
|
1179
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
1165
1180
|
key: 2,
|
|
1166
1181
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1167
|
-
src:
|
|
1182
|
+
src: Q(r) ?? "",
|
|
1168
1183
|
alt: ""
|
|
1169
|
-
}, 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, [
|
|
1170
1185
|
a("button", {
|
|
1171
1186
|
type: "button",
|
|
1172
1187
|
class: "ml-ribbon-gallery__control-button",
|
|
1173
1188
|
disabled: o.disabled || !ce.value,
|
|
1174
1189
|
"aria-label": "Show previous gallery row",
|
|
1175
|
-
onClick: l[1] ||= (e) =>
|
|
1190
|
+
onClick: l[1] ||= (e) => ge(-1)
|
|
1176
1191
|
}, [c(D(L), null, {
|
|
1177
|
-
default: k(() => [c(D(
|
|
1192
|
+
default: k(() => [c(D(le))]),
|
|
1178
1193
|
_: 1
|
|
1179
|
-
})], 8,
|
|
1194
|
+
})], 8, St),
|
|
1180
1195
|
a("button", {
|
|
1181
1196
|
type: "button",
|
|
1182
1197
|
class: "ml-ribbon-gallery__control-button",
|
|
1183
|
-
disabled: o.disabled || !
|
|
1198
|
+
disabled: o.disabled || !U.value,
|
|
1184
1199
|
"aria-label": "Show next gallery row",
|
|
1185
|
-
onClick: l[2] ||= (e) =>
|
|
1200
|
+
onClick: l[2] ||= (e) => ge(1)
|
|
1186
1201
|
}, [c(D(L), null, {
|
|
1187
1202
|
default: k(() => [c(D(se))]),
|
|
1188
1203
|
_: 1
|
|
1189
|
-
})], 8,
|
|
1204
|
+
})], 8, Ct),
|
|
1190
1205
|
c(D(ie), {
|
|
1191
1206
|
visible: y.value,
|
|
1192
1207
|
"onUpdate:visible": l[3] ||= (e) => y.value = e,
|
|
1193
1208
|
trigger: "click",
|
|
1194
1209
|
placement: "bottom-start",
|
|
1195
1210
|
disabled: o.disabled,
|
|
1196
|
-
width:
|
|
1197
|
-
"popper-class":
|
|
1198
|
-
"popper-options":
|
|
1211
|
+
width: me.value,
|
|
1212
|
+
"popper-class": fe.value,
|
|
1213
|
+
"popper-options": K.value
|
|
1199
1214
|
}, {
|
|
1200
1215
|
reference: k(() => [a("button", {
|
|
1201
1216
|
ref_key: "inlineMoreButtonRef",
|
|
@@ -1204,11 +1219,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1204
1219
|
class: m(["ml-ribbon-gallery__control-button ml-ribbon-gallery__more-button", { "is-open": y.value }]),
|
|
1205
1220
|
disabled: o.disabled,
|
|
1206
1221
|
"aria-label": "Show more gallery items",
|
|
1207
|
-
onClick:
|
|
1222
|
+
onClick: ye
|
|
1208
1223
|
}, [c(D(L), null, {
|
|
1209
|
-
default: k(() => [c(D(
|
|
1224
|
+
default: k(() => [c(D(W))]),
|
|
1210
1225
|
_: 1
|
|
1211
|
-
})], 10,
|
|
1226
|
+
})], 10, wt)]),
|
|
1212
1227
|
default: k(() => [a("div", {
|
|
1213
1228
|
ref_key: "inlinePanelRef",
|
|
1214
1229
|
ref: te,
|
|
@@ -1216,54 +1231,54 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1216
1231
|
}, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1217
1232
|
key: o.id,
|
|
1218
1233
|
class: "ml-ribbon-gallery__panel-category"
|
|
1219
|
-
}, [
|
|
1234
|
+
}, [J(o) ? (v(), i("h4", Tt, T(o.title), 1)) : r("", !0), a("div", {
|
|
1220
1235
|
class: "ml-ribbon-gallery__panel-grid",
|
|
1221
|
-
style: h(
|
|
1236
|
+
style: h(pe.value)
|
|
1222
1237
|
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
1223
1238
|
key: r.id,
|
|
1224
1239
|
type: "button",
|
|
1225
1240
|
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
1226
|
-
"data-gallery-row-index":
|
|
1227
|
-
disabled:
|
|
1228
|
-
onClick: (e) =>
|
|
1241
|
+
"data-gallery-row-index": _e(r),
|
|
1242
|
+
disabled: X(r),
|
|
1243
|
+
onClick: (e) => $(r)
|
|
1229
1244
|
}, [S(t.$slots, "item", {
|
|
1230
1245
|
item: r,
|
|
1231
1246
|
category: o,
|
|
1232
1247
|
selected: _.value === r.id,
|
|
1233
|
-
disabled:
|
|
1234
|
-
select: () =>
|
|
1235
|
-
}, () => [
|
|
1248
|
+
disabled: X(r),
|
|
1249
|
+
select: () => $(r)
|
|
1250
|
+
}, () => [xe(r) ? (v(), n(w(xe(r)), f({
|
|
1236
1251
|
key: 0,
|
|
1237
1252
|
ref_for: !0
|
|
1238
1253
|
}, r.componentProps, {
|
|
1239
1254
|
item: r,
|
|
1240
1255
|
category: o,
|
|
1241
1256
|
selected: _.value === r.id,
|
|
1242
|
-
disabled:
|
|
1257
|
+
disabled: X(r)
|
|
1243
1258
|
}), null, 16, [
|
|
1244
1259
|
"item",
|
|
1245
1260
|
"category",
|
|
1246
1261
|
"selected",
|
|
1247
1262
|
"disabled"
|
|
1248
1263
|
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1249
|
-
"ml-ribbon-gallery__preview--icon":
|
|
1250
|
-
"ml-ribbon-gallery__preview--svg":
|
|
1251
|
-
}]) }, [
|
|
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), {
|
|
1252
1267
|
key: 0,
|
|
1253
1268
|
class: "ml-ribbon-gallery__preview-icon"
|
|
1254
1269
|
}, {
|
|
1255
|
-
default: k(() => [(v(), n(w(
|
|
1270
|
+
default: k(() => [(v(), n(w(Y(r))))]),
|
|
1256
1271
|
_: 2
|
|
1257
|
-
}, 1024)) :
|
|
1272
|
+
}, 1024)) : Z(r) ? (v(), i("i", {
|
|
1258
1273
|
key: 1,
|
|
1259
|
-
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)]),
|
|
1260
1275
|
"aria-hidden": "true"
|
|
1261
|
-
}, null, 2)) :
|
|
1276
|
+
}, null, 2)) : Q(r) && Ce(r) ? (v(), i("img", {
|
|
1262
1277
|
key: 2,
|
|
1263
1278
|
class: "ml-ribbon-gallery__preview-svg",
|
|
1264
|
-
src:
|
|
1279
|
+
src: Q(r) ?? "",
|
|
1265
1280
|
alt: ""
|
|
1266
|
-
}, 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)]),
|
|
1267
1282
|
_: 3
|
|
1268
1283
|
}, 8, [
|
|
1269
1284
|
"visible",
|
|
@@ -1275,13 +1290,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1275
1290
|
])) : r("", !0)]))
|
|
1276
1291
|
], 2));
|
|
1277
1292
|
}
|
|
1278
|
-
}),
|
|
1293
|
+
}), Rt = ["data-id", "onKeydown"], zt = {
|
|
1279
1294
|
key: 0,
|
|
1280
1295
|
class: "ml-ribbon-input-number__prefix"
|
|
1281
|
-
},
|
|
1296
|
+
}, Bt = {
|
|
1282
1297
|
key: 2,
|
|
1283
1298
|
class: "ml-ribbon-input-number__prefix-label"
|
|
1284
|
-
},
|
|
1299
|
+
}, Vt = /* @__PURE__ */ l({
|
|
1285
1300
|
name: "MlRibbonInputNumber",
|
|
1286
1301
|
__name: "RibbonInputNumber",
|
|
1287
1302
|
props: {
|
|
@@ -1340,7 +1355,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1340
1355
|
style: h(d.value),
|
|
1341
1356
|
"data-id": e.id,
|
|
1342
1357
|
onKeydown: A(ee(O, ["stop", "prevent"]), ["enter"])
|
|
1343
|
-
}, [x.value ? (v(), i("span",
|
|
1358
|
+
}, [x.value ? (v(), i("span", zt, [_.value ? (v(), n(D(L), {
|
|
1344
1359
|
key: 0,
|
|
1345
1360
|
class: "ml-ribbon-input-number__prefix-icon",
|
|
1346
1361
|
"aria-hidden": "true"
|
|
@@ -1351,7 +1366,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1351
1366
|
key: 1,
|
|
1352
1367
|
class: m(["ml-ribbon-input-number__prefix-icon ml-ribbon-input-number__prefix-icon--class", y.value]),
|
|
1353
1368
|
"aria-hidden": "true"
|
|
1354
|
-
}, 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, {
|
|
1355
1370
|
"model-value": e.modelValue,
|
|
1356
1371
|
disabled: e.disabled,
|
|
1357
1372
|
style: p.value,
|
|
@@ -1362,18 +1377,18 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1362
1377
|
"disabled",
|
|
1363
1378
|
"style",
|
|
1364
1379
|
"aria-label"
|
|
1365
|
-
])], 46,
|
|
1380
|
+
])], 46, Rt));
|
|
1366
1381
|
}
|
|
1367
|
-
}),
|
|
1382
|
+
}), Ht = ["data-id"], Ut = {
|
|
1368
1383
|
key: 0,
|
|
1369
1384
|
class: "ml-ribbon-segmented__label"
|
|
1370
|
-
},
|
|
1385
|
+
}, Wt = ["data-option-value", "aria-label"], Gt = {
|
|
1371
1386
|
key: 2,
|
|
1372
1387
|
class: "ml-ribbon-segmented__option-label"
|
|
1373
|
-
},
|
|
1388
|
+
}, Kt = {
|
|
1374
1389
|
key: 3,
|
|
1375
1390
|
class: "ml-ribbon-segmented__option-sr-label"
|
|
1376
|
-
},
|
|
1391
|
+
}, qt = /* @__PURE__ */ l({
|
|
1377
1392
|
__name: "RibbonSegmented",
|
|
1378
1393
|
props: {
|
|
1379
1394
|
id: {},
|
|
@@ -1454,7 +1469,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1454
1469
|
return (t, o) => (v(), i("div", {
|
|
1455
1470
|
class: "ml-ribbon-segmented",
|
|
1456
1471
|
"data-id": e.id
|
|
1457
|
-
}, [d.value ? (v(), i("div",
|
|
1472
|
+
}, [d.value ? (v(), i("div", Ut, T(u.value), 1)) : r("", !0), c(D(B), {
|
|
1458
1473
|
class: "ml-ribbon-segmented__control",
|
|
1459
1474
|
options: e.options,
|
|
1460
1475
|
"model-value": e.modelValue,
|
|
@@ -1487,7 +1502,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1487
1502
|
key: 1,
|
|
1488
1503
|
class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", b(t)]),
|
|
1489
1504
|
"aria-hidden": "true"
|
|
1490
|
-
}, 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)]),
|
|
1491
1506
|
_: 2
|
|
1492
1507
|
}, 1032, [
|
|
1493
1508
|
"content",
|
|
@@ -1503,9 +1518,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1503
1518
|
"block",
|
|
1504
1519
|
"disabled",
|
|
1505
1520
|
"aria-label"
|
|
1506
|
-
])], 8,
|
|
1521
|
+
])], 8, Ht));
|
|
1507
1522
|
}
|
|
1508
|
-
}),
|
|
1523
|
+
}), Jt = /* @__PURE__ */ l({
|
|
1509
1524
|
__name: "RibbonToggleButton",
|
|
1510
1525
|
props: {
|
|
1511
1526
|
id: {},
|
|
@@ -1539,7 +1554,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1539
1554
|
let e = !o.value;
|
|
1540
1555
|
o.value = e, a("change", e);
|
|
1541
1556
|
}
|
|
1542
|
-
return (t, r) => (v(), n(
|
|
1557
|
+
return (t, r) => (v(), n(Be, {
|
|
1543
1558
|
id: e.id,
|
|
1544
1559
|
class: m(["ml-ribbon-toggle", { "is-active": s.value }]),
|
|
1545
1560
|
icon: c.value,
|
|
@@ -1560,7 +1575,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1560
1575
|
"aria-pressed"
|
|
1561
1576
|
]));
|
|
1562
1577
|
}
|
|
1563
|
-
}),
|
|
1578
|
+
}), Yt = ["data-template-id", "aria-disabled"], Xt = /* @__PURE__ */ l({
|
|
1564
1579
|
__name: "RibbonTemplateItem",
|
|
1565
1580
|
props: {
|
|
1566
1581
|
id: {},
|
|
@@ -1575,12 +1590,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1575
1590
|
}, [S(t.$slots, "default", {
|
|
1576
1591
|
item: e.item,
|
|
1577
1592
|
disabled: e.disabled
|
|
1578
|
-
}, () => [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));
|
|
1579
1594
|
}
|
|
1580
|
-
}),
|
|
1595
|
+
}), Zt = ["data-item-id"], Qt = {
|
|
1581
1596
|
key: 0,
|
|
1582
1597
|
class: "ml-ribbon-item-host__keytip"
|
|
1583
|
-
},
|
|
1598
|
+
}, $t = /* @__PURE__ */ l({
|
|
1584
1599
|
__name: "RibbonItemHost",
|
|
1585
1600
|
props: {
|
|
1586
1601
|
id: {},
|
|
@@ -1591,61 +1606,65 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1591
1606
|
},
|
|
1592
1607
|
emits: ["item-click"],
|
|
1593
1608
|
setup(o, { emit: c }) {
|
|
1594
|
-
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(() => {
|
|
1595
1614
|
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !R.value) return !1;
|
|
1596
1615
|
let e = g.keyTipsSequence.value.toLowerCase();
|
|
1597
1616
|
return e ? R.value.toLowerCase().startsWith(e) : !0;
|
|
1598
|
-
}), 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(() => {
|
|
1599
1618
|
let e = l.item.props?.modelValue;
|
|
1600
1619
|
return typeof e == "string" ? e : void 0;
|
|
1601
|
-
}),
|
|
1620
|
+
}), ue = t(() => {
|
|
1602
1621
|
let e = l.item.props?.inlineItemLimit;
|
|
1603
1622
|
return typeof e == "number" ? e : void 0;
|
|
1604
|
-
}),
|
|
1623
|
+
}), W = t(() => l.item.props?.inlineItemWidthMode === "auto" ? "auto" : "fixed"), G = t(() => {
|
|
1605
1624
|
let e = l.item.props?.component;
|
|
1606
1625
|
return !e || typeof e == "string" ? null : d(E(e));
|
|
1607
|
-
}),
|
|
1626
|
+
}), de = t(() => {
|
|
1608
1627
|
let e = l.item.props?.componentProps;
|
|
1609
1628
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
1610
|
-
}),
|
|
1629
|
+
}), fe = t(() => l.item.props?.wrap !== !1), pe = t(() => l.item.props?.equalWidth === !0), K = t(() => {
|
|
1611
1630
|
let e = l.item.props?.buttonSize;
|
|
1612
1631
|
if (e === "large" || e === "default" || e === "small") return e;
|
|
1613
|
-
}),
|
|
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(() => {
|
|
1614
1633
|
let e = { ...l.item.props ?? {} };
|
|
1615
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;
|
|
1616
|
-
}),
|
|
1617
|
-
if (!
|
|
1618
|
-
let e = { "--ml-rb-item-label-max-lines": String(
|
|
1619
|
-
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;
|
|
1620
1639
|
});
|
|
1621
1640
|
O(() => l.item.id, () => {
|
|
1622
1641
|
P.value = void 0;
|
|
1623
1642
|
});
|
|
1624
|
-
function
|
|
1643
|
+
function X() {
|
|
1625
1644
|
B.value || p("item-click", l.id);
|
|
1626
1645
|
}
|
|
1627
|
-
function
|
|
1646
|
+
function Z(e) {
|
|
1628
1647
|
if (!B.value) {
|
|
1629
1648
|
if (typeof e == "string" || typeof e == "number") {
|
|
1630
1649
|
p("item-click", String(e));
|
|
1631
1650
|
return;
|
|
1632
1651
|
}
|
|
1633
|
-
|
|
1652
|
+
X();
|
|
1634
1653
|
}
|
|
1635
1654
|
}
|
|
1636
|
-
function
|
|
1655
|
+
function Q(e) {
|
|
1637
1656
|
P.value = e;
|
|
1638
1657
|
}
|
|
1639
|
-
function
|
|
1658
|
+
function Se(e) {
|
|
1640
1659
|
if (!B.value) {
|
|
1641
1660
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1642
1661
|
p("item-click", String(e));
|
|
1643
1662
|
return;
|
|
1644
1663
|
}
|
|
1645
|
-
|
|
1664
|
+
X();
|
|
1646
1665
|
}
|
|
1647
1666
|
}
|
|
1648
|
-
function
|
|
1667
|
+
function Ce(e) {
|
|
1649
1668
|
if (B.value) return;
|
|
1650
1669
|
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
1651
1670
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
@@ -1654,60 +1673,60 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1654
1673
|
}
|
|
1655
1674
|
p("item-click", String(e));
|
|
1656
1675
|
}
|
|
1657
|
-
function
|
|
1676
|
+
function we(e) {
|
|
1658
1677
|
if (!B.value) {
|
|
1659
1678
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1660
1679
|
p("item-click", String(e));
|
|
1661
1680
|
return;
|
|
1662
1681
|
}
|
|
1663
|
-
|
|
1682
|
+
X();
|
|
1664
1683
|
}
|
|
1665
1684
|
}
|
|
1666
|
-
function
|
|
1685
|
+
function $(e) {
|
|
1667
1686
|
B.value || p("item-click", e);
|
|
1668
1687
|
}
|
|
1669
|
-
function
|
|
1688
|
+
function Te(e) {
|
|
1670
1689
|
if (!B.value) {
|
|
1671
1690
|
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1672
1691
|
p("item-click", String(e));
|
|
1673
1692
|
return;
|
|
1674
1693
|
}
|
|
1675
|
-
|
|
1694
|
+
X();
|
|
1676
1695
|
}
|
|
1677
1696
|
}
|
|
1678
|
-
function
|
|
1697
|
+
function Ee(e) {
|
|
1679
1698
|
if (!B.value) {
|
|
1680
1699
|
if (l.item.props?.emitValueOnChange === !0 && typeof e == "number" && Number.isFinite(e)) {
|
|
1681
1700
|
let t = l.item.props?.valuePrefix;
|
|
1682
1701
|
p("item-click", `${typeof t == "string" ? t : ""}${e}`);
|
|
1683
1702
|
return;
|
|
1684
1703
|
}
|
|
1685
|
-
|
|
1704
|
+
X();
|
|
1686
1705
|
}
|
|
1687
1706
|
}
|
|
1688
|
-
function
|
|
1707
|
+
function De(e) {
|
|
1689
1708
|
if (!B.value) {
|
|
1690
1709
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1691
1710
|
p("item-click", String(e));
|
|
1692
1711
|
return;
|
|
1693
1712
|
}
|
|
1694
|
-
|
|
1713
|
+
X();
|
|
1695
1714
|
}
|
|
1696
1715
|
}
|
|
1697
|
-
function
|
|
1716
|
+
function Oe(e) {
|
|
1698
1717
|
if (!e || typeof e != "object") return;
|
|
1699
1718
|
let t = e.label;
|
|
1700
1719
|
return typeof t == "string" ? t : void 0;
|
|
1701
1720
|
}
|
|
1702
|
-
function
|
|
1721
|
+
function ke(e) {
|
|
1703
1722
|
if (typeof e != "string") return;
|
|
1704
1723
|
let t = e.trim();
|
|
1705
1724
|
return t.length > 0 ? t : void 0;
|
|
1706
1725
|
}
|
|
1707
|
-
function
|
|
1726
|
+
function Ae(e, t) {
|
|
1708
1727
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1709
1728
|
}
|
|
1710
|
-
function
|
|
1729
|
+
function je(e, t) {
|
|
1711
1730
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1712
1731
|
if (typeof e == "string") {
|
|
1713
1732
|
let n = e.trim();
|
|
@@ -1715,27 +1734,27 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1715
1734
|
}
|
|
1716
1735
|
return t;
|
|
1717
1736
|
}
|
|
1718
|
-
function
|
|
1737
|
+
function Me(e) {
|
|
1719
1738
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1720
1739
|
if (typeof e == "string") {
|
|
1721
1740
|
let t = e.trim();
|
|
1722
1741
|
return t ? t.toLowerCase() === "full" ? "100%" : t : void 0;
|
|
1723
1742
|
}
|
|
1724
1743
|
}
|
|
1725
|
-
function
|
|
1744
|
+
function Ne(e) {
|
|
1726
1745
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1727
1746
|
if (typeof e != "string") return;
|
|
1728
1747
|
let t = e.trim();
|
|
1729
1748
|
return t.length > 0 ? t : void 0;
|
|
1730
1749
|
}
|
|
1731
|
-
function
|
|
1750
|
+
function Pe(e) {
|
|
1732
1751
|
if (!(typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e))) return Math.max(1, Math.round(e));
|
|
1733
1752
|
}
|
|
1734
|
-
function
|
|
1735
|
-
let t = _.value.map((e) =>
|
|
1753
|
+
function Fe(e) {
|
|
1754
|
+
let t = _.value.map((e) => Oe(e)).filter((e) => !!e);
|
|
1736
1755
|
if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
|
|
1737
1756
|
}
|
|
1738
|
-
function
|
|
1757
|
+
function Ie(e) {
|
|
1739
1758
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1740
1759
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
1741
1760
|
}
|
|
@@ -1753,26 +1772,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1753
1772
|
`type-${o.item.type}`,
|
|
1754
1773
|
{
|
|
1755
1774
|
"is-label-hidden": o.item.hideLabel === !0,
|
|
1756
|
-
"is-label-wrap":
|
|
1775
|
+
"is-label-wrap": Y.value
|
|
1757
1776
|
}
|
|
1758
1777
|
]]),
|
|
1759
|
-
style: h(
|
|
1778
|
+
style: h(xe.value),
|
|
1760
1779
|
"data-item-id": o.id,
|
|
1761
1780
|
role: "group"
|
|
1762
|
-
}, [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, {
|
|
1763
1782
|
key: 1,
|
|
1764
1783
|
id: o.item.id,
|
|
1765
1784
|
label: o.item.label ?? "",
|
|
1766
1785
|
options: o.item.props?.options ?? [],
|
|
1767
1786
|
"hide-label": o.item.hideLabel === !0,
|
|
1768
|
-
wrap:
|
|
1769
|
-
"equal-width":
|
|
1770
|
-
"button-size":
|
|
1771
|
-
"icon-size":
|
|
1787
|
+
wrap: fe.value,
|
|
1788
|
+
"equal-width": pe.value,
|
|
1789
|
+
"button-size": K.value,
|
|
1790
|
+
"icon-size": q.value,
|
|
1772
1791
|
"tooltip-show-after": A.value,
|
|
1773
1792
|
"tooltip-hide-after": ee.value,
|
|
1774
1793
|
disabled: B.value,
|
|
1775
|
-
onChange:
|
|
1794
|
+
onChange: we
|
|
1776
1795
|
}, null, 8, [
|
|
1777
1796
|
"id",
|
|
1778
1797
|
"label",
|
|
@@ -1785,7 +1804,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1785
1804
|
"tooltip-show-after",
|
|
1786
1805
|
"tooltip-hide-after",
|
|
1787
1806
|
"disabled"
|
|
1788
|
-
])) : o.item.type === "segmented" ? (v(), n(
|
|
1807
|
+
])) : o.item.type === "segmented" ? (v(), n(qt, {
|
|
1789
1808
|
key: 2,
|
|
1790
1809
|
id: o.item.id,
|
|
1791
1810
|
label: o.item.label ?? o.item.id,
|
|
@@ -1797,7 +1816,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1797
1816
|
"hide-label": o.item.hideLabel === !0,
|
|
1798
1817
|
"tooltip-show-after": A.value,
|
|
1799
1818
|
"tooltip-hide-after": ee.value,
|
|
1800
|
-
onChange:
|
|
1819
|
+
onChange: Se
|
|
1801
1820
|
}, null, 8, [
|
|
1802
1821
|
"id",
|
|
1803
1822
|
"label",
|
|
@@ -1809,7 +1828,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1809
1828
|
"hide-label",
|
|
1810
1829
|
"tooltip-show-after",
|
|
1811
1830
|
"tooltip-hide-after"
|
|
1812
|
-
])) : o.item.type === "toggle" ? (v(), n(
|
|
1831
|
+
])) : o.item.type === "toggle" ? (v(), n(Jt, {
|
|
1813
1832
|
key: 3,
|
|
1814
1833
|
id: o.item.id,
|
|
1815
1834
|
label: o.item.label ?? o.item.id,
|
|
@@ -1820,7 +1839,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1820
1839
|
"inactive-label": ce.value,
|
|
1821
1840
|
disabled: B.value,
|
|
1822
1841
|
"hide-label": o.item.hideLabel === !0,
|
|
1823
|
-
onChange:
|
|
1842
|
+
onChange: Ce
|
|
1824
1843
|
}, null, 8, [
|
|
1825
1844
|
"id",
|
|
1826
1845
|
"label",
|
|
@@ -1831,18 +1850,18 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1831
1850
|
"inactive-label",
|
|
1832
1851
|
"disabled",
|
|
1833
1852
|
"hide-label"
|
|
1834
|
-
])) : o.item.type === "gallery" ? (v(), n(
|
|
1853
|
+
])) : o.item.type === "gallery" ? (v(), n(Lt, {
|
|
1835
1854
|
key: 4,
|
|
1836
1855
|
id: o.item.id,
|
|
1837
1856
|
label: o.item.label ?? "",
|
|
1838
|
-
categories:
|
|
1839
|
-
"model-value":
|
|
1857
|
+
categories: U.value,
|
|
1858
|
+
"model-value": le.value,
|
|
1840
1859
|
collapsed: o.item.props?.collapsed === !0,
|
|
1841
|
-
"inline-item-limit":
|
|
1842
|
-
"inline-item-width-mode":
|
|
1860
|
+
"inline-item-limit": ue.value,
|
|
1861
|
+
"inline-item-width-mode": W.value,
|
|
1843
1862
|
"preview-fallback": l.galleryPreviewFallback,
|
|
1844
1863
|
disabled: B.value,
|
|
1845
|
-
onSelect:
|
|
1864
|
+
onSelect: $
|
|
1846
1865
|
}, null, 8, [
|
|
1847
1866
|
"id",
|
|
1848
1867
|
"label",
|
|
@@ -1853,17 +1872,17 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1853
1872
|
"inline-item-width-mode",
|
|
1854
1873
|
"preview-fallback",
|
|
1855
1874
|
"disabled"
|
|
1856
|
-
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(
|
|
1875
|
+
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(Xt, {
|
|
1857
1876
|
key: 5,
|
|
1858
1877
|
id: o.item.id,
|
|
1859
1878
|
item: o.item,
|
|
1860
1879
|
disabled: B.value
|
|
1861
1880
|
}, {
|
|
1862
|
-
default: k(() => [
|
|
1881
|
+
default: k(() => [G.value ? (v(), n(w(G.value), f({ key: 0 }, de.value, {
|
|
1863
1882
|
item: o.item,
|
|
1864
1883
|
"group-id": o.groupId,
|
|
1865
1884
|
disabled: B.value,
|
|
1866
|
-
"emit-item-click":
|
|
1885
|
+
"emit-item-click": De
|
|
1867
1886
|
}), null, 16, [
|
|
1868
1887
|
"item",
|
|
1869
1888
|
"group-id",
|
|
@@ -1878,7 +1897,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1878
1897
|
"id",
|
|
1879
1898
|
"item",
|
|
1880
1899
|
"disabled"
|
|
1881
|
-
])) : o.item.type === "dropdown" ? (v(), n(
|
|
1900
|
+
])) : o.item.type === "dropdown" ? (v(), n(et, {
|
|
1882
1901
|
key: 6,
|
|
1883
1902
|
id: o.item.id,
|
|
1884
1903
|
label: o.item.label ?? o.item.id,
|
|
@@ -1892,9 +1911,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1892
1911
|
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1893
1912
|
"tooltip-show-after": A.value,
|
|
1894
1913
|
"tooltip-hide-after": ee.value,
|
|
1895
|
-
onCommand:
|
|
1896
|
-
onTooltipChange:
|
|
1897
|
-
onClick:
|
|
1914
|
+
onCommand: Z,
|
|
1915
|
+
onTooltipChange: Q,
|
|
1916
|
+
onClick: X
|
|
1898
1917
|
}, null, 8, [
|
|
1899
1918
|
"id",
|
|
1900
1919
|
"label",
|
|
@@ -1911,21 +1930,21 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1911
1930
|
])) : o.item.type === "checkbox" ? (v(), n(D(M), {
|
|
1912
1931
|
key: 7,
|
|
1913
1932
|
disabled: B.value,
|
|
1914
|
-
onChange:
|
|
1933
|
+
onChange: X
|
|
1915
1934
|
}, {
|
|
1916
1935
|
default: k(() => [s(T(o.item.label), 1)]),
|
|
1917
1936
|
_: 1
|
|
1918
1937
|
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(D(N), {
|
|
1919
1938
|
key: 8,
|
|
1920
1939
|
disabled: B.value,
|
|
1921
|
-
onChange:
|
|
1940
|
+
onChange: X
|
|
1922
1941
|
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(D(V), {
|
|
1923
1942
|
key: 9,
|
|
1924
|
-
"model-value":
|
|
1943
|
+
"model-value": he.value,
|
|
1925
1944
|
disabled: B.value,
|
|
1926
1945
|
"popper-class": te.value,
|
|
1927
|
-
style: h({ width:
|
|
1928
|
-
onChange:
|
|
1946
|
+
style: h({ width: J.value }),
|
|
1947
|
+
onChange: Te
|
|
1929
1948
|
}, {
|
|
1930
1949
|
default: k(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(D(z), {
|
|
1931
1950
|
key: String(e.value),
|
|
@@ -1938,17 +1957,17 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1938
1957
|
"disabled",
|
|
1939
1958
|
"popper-class",
|
|
1940
1959
|
"style"
|
|
1941
|
-
])) : o.item.type === "inputNumber" ? (v(), n(
|
|
1960
|
+
])) : o.item.type === "inputNumber" ? (v(), n(Vt, {
|
|
1942
1961
|
key: 10,
|
|
1943
1962
|
id: o.item.id,
|
|
1944
|
-
"model-value":
|
|
1945
|
-
width:
|
|
1963
|
+
"model-value": _e.value,
|
|
1964
|
+
width: ge.value,
|
|
1946
1965
|
"prefix-label": o.item.props?.prefixLabel,
|
|
1947
1966
|
"prefix-icon": o.item.props?.prefixIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1948
1967
|
"prefix-icon-class": o.item.props?.prefixIconClass,
|
|
1949
|
-
"control-props":
|
|
1968
|
+
"control-props": ve.value,
|
|
1950
1969
|
disabled: B.value,
|
|
1951
|
-
onChange:
|
|
1970
|
+
onChange: Ee
|
|
1952
1971
|
}, null, 8, [
|
|
1953
1972
|
"id",
|
|
1954
1973
|
"model-value",
|
|
@@ -1958,7 +1977,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1958
1977
|
"prefix-icon-class",
|
|
1959
1978
|
"control-props",
|
|
1960
1979
|
"disabled"
|
|
1961
|
-
])) : (v(), n(
|
|
1980
|
+
])) : (v(), n(Be, {
|
|
1962
1981
|
key: 11,
|
|
1963
1982
|
id: o.item.id,
|
|
1964
1983
|
label: o.item.label ?? o.item.id,
|
|
@@ -1966,7 +1985,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1966
1985
|
disabled: B.value,
|
|
1967
1986
|
"hide-label": !ne.value,
|
|
1968
1987
|
"aria-label": L.value,
|
|
1969
|
-
onClick:
|
|
1988
|
+
onClick: X
|
|
1970
1989
|
}, null, 8, [
|
|
1971
1990
|
"id",
|
|
1972
1991
|
"label",
|
|
@@ -1974,7 +1993,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1974
1993
|
"disabled",
|
|
1975
1994
|
"hide-label",
|
|
1976
1995
|
"aria-label"
|
|
1977
|
-
]))], 14,
|
|
1996
|
+
]))], 14, Zt)]),
|
|
1978
1997
|
_: 3
|
|
1979
1998
|
}, 8, [
|
|
1980
1999
|
"content",
|
|
@@ -1983,7 +2002,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1983
2002
|
"hide-after"
|
|
1984
2003
|
]));
|
|
1985
2004
|
}
|
|
1986
|
-
}),
|
|
2005
|
+
}), en = /* @__PURE__ */ l({
|
|
1987
2006
|
__name: "RibbonGroupContent",
|
|
1988
2007
|
props: {
|
|
1989
2008
|
group: {},
|
|
@@ -1993,13 +2012,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
1993
2012
|
emits: ["item-click"],
|
|
1994
2013
|
setup(t, { emit: r }) {
|
|
1995
2014
|
let a = t, o = r;
|
|
1996
|
-
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, {
|
|
1997
2016
|
id: t.id,
|
|
1998
2017
|
key: t.id,
|
|
1999
2018
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
2000
2019
|
rows: t.rows
|
|
2001
2020
|
}, {
|
|
2002
|
-
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, {
|
|
2003
2022
|
id: e.id,
|
|
2004
2023
|
key: e.id,
|
|
2005
2024
|
item: e,
|
|
@@ -2024,15 +2043,81 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2024
2043
|
"rows"
|
|
2025
2044
|
]))), 128))], 2));
|
|
2026
2045
|
}
|
|
2027
|
-
}),
|
|
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 = t, s = r, l = b(!1);
|
|
2063
|
+
function u() {
|
|
2064
|
+
o.disabled || (l.value = !l.value);
|
|
2065
|
+
}
|
|
2066
|
+
function d(e, t) {
|
|
2067
|
+
t?.(), l.value = !1, s("itemClick", e);
|
|
2068
|
+
}
|
|
2069
|
+
return (r, o) => (v(), n(D(ie), {
|
|
2070
|
+
visible: l.value,
|
|
2071
|
+
"onUpdate:visible": o[0] ||= (e) => l.value = e,
|
|
2072
|
+
trigger: [],
|
|
2073
|
+
placement: "bottom-end",
|
|
2074
|
+
width: t.popoverWidth,
|
|
2075
|
+
disabled: t.disabled,
|
|
2076
|
+
"show-arrow": !1,
|
|
2077
|
+
teleported: !0,
|
|
2078
|
+
"popper-options": { strategy: "fixed" },
|
|
2079
|
+
"popper-class": t.popoverClass,
|
|
2080
|
+
onShow: o[1] ||= (e) => s("open"),
|
|
2081
|
+
onHide: o[2] ||= (e) => s("close")
|
|
2082
|
+
}, {
|
|
2083
|
+
reference: k(() => [a("button", {
|
|
2084
|
+
type: "button",
|
|
2085
|
+
class: "ml-ribbon-overflow-trigger",
|
|
2086
|
+
"aria-label": t.triggerAriaLabel,
|
|
2087
|
+
disabled: t.disabled,
|
|
2088
|
+
onClick: u
|
|
2089
|
+
}, [...o[3] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, tn)]),
|
|
2090
|
+
default: k(({ hide: n }) => [a("div", nn, [(v(!0), i(e, null, x(t.groups, (e) => (v(), i("section", {
|
|
2091
|
+
key: e.id,
|
|
2092
|
+
class: "ml-ribbon-overflow-group-flyout"
|
|
2093
|
+
}, [c(en, {
|
|
2094
|
+
group: e,
|
|
2095
|
+
"gallery-preview-fallback": t.galleryPreviewFallback,
|
|
2096
|
+
disabled: t.disabled,
|
|
2097
|
+
onItemClick: (e) => d(e, n)
|
|
2098
|
+
}, null, 8, [
|
|
2099
|
+
"group",
|
|
2100
|
+
"gallery-preview-fallback",
|
|
2101
|
+
"disabled",
|
|
2102
|
+
"onItemClick"
|
|
2103
|
+
]), a("footer", rn, T(e.title), 1)]))), 128))])]),
|
|
2104
|
+
_: 1
|
|
2105
|
+
}, 8, [
|
|
2106
|
+
"visible",
|
|
2107
|
+
"width",
|
|
2108
|
+
"disabled",
|
|
2109
|
+
"popper-class"
|
|
2110
|
+
]));
|
|
2111
|
+
}
|
|
2112
|
+
}), on = ["data-priority"], sn = { class: "ml-ribbon-group__body" }, cn = { class: "ml-ribbon-group__footer" }, ln = { class: "ml-ribbon-group__title" }, un = [
|
|
2028
2113
|
"aria-label",
|
|
2029
2114
|
"aria-expanded",
|
|
2030
2115
|
"disabled"
|
|
2031
|
-
],
|
|
2116
|
+
], dn = { class: "ml-ribbon-group__overflow-content" }, fn = [
|
|
2032
2117
|
"aria-label",
|
|
2033
2118
|
"aria-expanded",
|
|
2034
2119
|
"disabled"
|
|
2035
|
-
],
|
|
2120
|
+
], pn = { class: "ml-ribbon-group__overflow-content" }, mn = /* @__PURE__ */ l({
|
|
2036
2121
|
__name: "RibbonGroup",
|
|
2037
2122
|
props: {
|
|
2038
2123
|
id: {},
|
|
@@ -2051,7 +2136,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2051
2136
|
},
|
|
2052
2137
|
emits: ["item-click"],
|
|
2053
2138
|
setup(e, { emit: o }) {
|
|
2054
|
-
let s = e, l = o, d = u(
|
|
2139
|
+
let s = e, l = o, d = u(me, null), f = t(() => s.width == null), y = t(() => {
|
|
2055
2140
|
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
2056
2141
|
let e = `${s.width}px`;
|
|
2057
2142
|
return {
|
|
@@ -2105,12 +2190,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2105
2190
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
2106
2191
|
}), E.value.length === n.length && E.value.every((e, t) => e === n[t]) || (E.value = n);
|
|
2107
2192
|
}
|
|
2108
|
-
function
|
|
2193
|
+
function U() {
|
|
2109
2194
|
p(() => {
|
|
2110
|
-
|
|
2195
|
+
he(), ue(), W(), ce();
|
|
2111
2196
|
});
|
|
2112
2197
|
}
|
|
2113
|
-
function
|
|
2198
|
+
function ue() {
|
|
2114
2199
|
let e = C.value?.getBoundingClientRect(), t = A.value?.getBoundingClientRect();
|
|
2115
2200
|
if (!e || !t) {
|
|
2116
2201
|
j.value !== 0 && (j.value = 0);
|
|
@@ -2119,7 +2204,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2119
2204
|
let n = Math.round(e.left - t.left);
|
|
2120
2205
|
j.value !== n && (j.value = n);
|
|
2121
2206
|
}
|
|
2122
|
-
function
|
|
2207
|
+
function W() {
|
|
2123
2208
|
let e = C.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
|
|
2124
2209
|
if (!e || !t) {
|
|
2125
2210
|
M.value !== 0 && (M.value = 0);
|
|
@@ -2128,41 +2213,41 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2128
2213
|
let n = Math.round(e.left - t.left);
|
|
2129
2214
|
M.value !== n && (M.value = n);
|
|
2130
2215
|
}
|
|
2131
|
-
function
|
|
2132
|
-
B.value = e;
|
|
2133
|
-
}
|
|
2134
|
-
function W(e) {
|
|
2135
|
-
V.value = e;
|
|
2136
|
-
}
|
|
2137
|
-
function pe() {
|
|
2216
|
+
function G() {
|
|
2138
2217
|
x.value || (B.value = !B.value);
|
|
2139
2218
|
}
|
|
2140
|
-
function
|
|
2219
|
+
function de() {
|
|
2141
2220
|
x.value || (V.value = !V.value);
|
|
2142
2221
|
}
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2222
|
+
function fe(e, t) {
|
|
2223
|
+
t?.(), B.value = !1, l("item-click", e);
|
|
2224
|
+
}
|
|
2225
|
+
function K(e, t) {
|
|
2226
|
+
t?.(), V.value = !1, l("item-click", e);
|
|
2227
|
+
}
|
|
2228
|
+
let q = null, J = null;
|
|
2229
|
+
function he() {
|
|
2230
|
+
if (!q) return;
|
|
2146
2231
|
let e = C.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
2147
|
-
|
|
2232
|
+
J !== e && (J && q.unobserve(J), e && q.observe(e), J = e);
|
|
2148
2233
|
}
|
|
2149
2234
|
return O(() => s.groupModel, () => {
|
|
2150
|
-
|
|
2235
|
+
U();
|
|
2151
2236
|
}, { deep: !0 }), O(x, (e) => {
|
|
2152
2237
|
e && (B.value = !1, V.value = !1);
|
|
2153
2238
|
}), g(() => {
|
|
2154
|
-
typeof ResizeObserver < "u" && (
|
|
2155
|
-
|
|
2156
|
-
}), C.value &&
|
|
2239
|
+
typeof ResizeObserver < "u" && (q = new ResizeObserver(() => {
|
|
2240
|
+
ue(), W(), ce();
|
|
2241
|
+
}), C.value && q.observe(C.value), he()), U();
|
|
2157
2242
|
}), _(() => {
|
|
2158
|
-
|
|
2243
|
+
q?.disconnect();
|
|
2159
2244
|
}), (t, o) => (v(), i("section", {
|
|
2160
2245
|
ref_key: "groupSectionRef",
|
|
2161
2246
|
ref: C,
|
|
2162
2247
|
class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
|
|
2163
2248
|
"data-priority": e.priority ?? 100,
|
|
2164
2249
|
style: h(y.value)
|
|
2165
|
-
}, [a("div",
|
|
2250
|
+
}, [a("div", sn, [S(t.$slots, "default")]), a("footer", cn, [
|
|
2166
2251
|
re.value ? (v(), n(D(L), {
|
|
2167
2252
|
key: 0,
|
|
2168
2253
|
class: "ml-ribbon-group__icon"
|
|
@@ -2170,16 +2255,16 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2170
2255
|
default: k(() => [(v(), n(w(re.value)))]),
|
|
2171
2256
|
_: 1
|
|
2172
2257
|
})) : r("", !0),
|
|
2173
|
-
a("span",
|
|
2258
|
+
a("span", ln, T(e.title), 1),
|
|
2174
2259
|
z.value && H.value ? (v(), n(D(ie), {
|
|
2175
2260
|
key: 1,
|
|
2176
|
-
|
|
2261
|
+
visible: B.value,
|
|
2262
|
+
"onUpdate:visible": o[0] ||= (e) => B.value = e,
|
|
2263
|
+
trigger: [],
|
|
2177
2264
|
placement: "bottom-start",
|
|
2178
2265
|
disabled: x.value,
|
|
2179
2266
|
"popper-class": P.value,
|
|
2180
|
-
"popper-options": I.value
|
|
2181
|
-
onShow: o[1] ||= (e) => U(!0),
|
|
2182
|
-
onHide: o[2] ||= (e) => U(!1)
|
|
2267
|
+
"popper-options": I.value
|
|
2183
2268
|
}, {
|
|
2184
2269
|
reference: k(() => [a("button", {
|
|
2185
2270
|
ref_key: "footerTriggerRef",
|
|
@@ -2189,36 +2274,38 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2189
2274
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2190
2275
|
"aria-expanded": B.value,
|
|
2191
2276
|
disabled: x.value,
|
|
2192
|
-
onClick:
|
|
2277
|
+
onClick: G
|
|
2193
2278
|
}, [c(D(L), null, {
|
|
2194
|
-
default: k(() => [(v(), n(w(B.value ? D(
|
|
2279
|
+
default: k(() => [(v(), n(w(B.value ? D(le) : D(se))))]),
|
|
2195
2280
|
_: 1
|
|
2196
|
-
})], 10,
|
|
2197
|
-
default: k(() => [a("div",
|
|
2281
|
+
})], 10, un)]),
|
|
2282
|
+
default: k(({ hide: t }) => [a("div", dn, [c(en, {
|
|
2198
2283
|
group: H.value,
|
|
2199
2284
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2200
2285
|
disabled: x.value,
|
|
2201
|
-
onItemClick:
|
|
2286
|
+
onItemClick: (e) => fe(e, t)
|
|
2202
2287
|
}, null, 8, [
|
|
2203
2288
|
"group",
|
|
2204
2289
|
"gallery-preview-fallback",
|
|
2205
|
-
"disabled"
|
|
2290
|
+
"disabled",
|
|
2291
|
+
"onItemClick"
|
|
2206
2292
|
])])]),
|
|
2207
2293
|
_: 1
|
|
2208
2294
|
}, 8, [
|
|
2295
|
+
"visible",
|
|
2209
2296
|
"disabled",
|
|
2210
2297
|
"popper-class",
|
|
2211
2298
|
"popper-options"
|
|
2212
2299
|
])) : r("", !0),
|
|
2213
2300
|
R.value && ae.value ? (v(), n(D(ie), {
|
|
2214
2301
|
key: 2,
|
|
2215
|
-
|
|
2302
|
+
visible: V.value,
|
|
2303
|
+
"onUpdate:visible": o[1] ||= (e) => V.value = e,
|
|
2304
|
+
trigger: [],
|
|
2216
2305
|
placement: "bottom-start",
|
|
2217
2306
|
disabled: x.value,
|
|
2218
2307
|
"popper-class": P.value,
|
|
2219
|
-
"popper-options": F.value
|
|
2220
|
-
onShow: o[4] ||= (e) => W(!0),
|
|
2221
|
-
onHide: o[5] ||= (e) => W(!1)
|
|
2308
|
+
"popper-options": F.value
|
|
2222
2309
|
}, {
|
|
2223
2310
|
reference: k(() => [a("button", {
|
|
2224
2311
|
ref_key: "overflowTriggerRef",
|
|
@@ -2228,23 +2315,25 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2228
2315
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
2229
2316
|
"aria-expanded": V.value,
|
|
2230
2317
|
disabled: x.value,
|
|
2231
|
-
onClick:
|
|
2318
|
+
onClick: de
|
|
2232
2319
|
}, [c(D(L), null, {
|
|
2233
|
-
default: k(() => [(v(), n(w(V.value ? D(
|
|
2320
|
+
default: k(() => [(v(), n(w(V.value ? D(le) : D(se))))]),
|
|
2234
2321
|
_: 1
|
|
2235
|
-
})], 10,
|
|
2236
|
-
default: k(() => [a("div",
|
|
2322
|
+
})], 10, fn)]),
|
|
2323
|
+
default: k(({ hide: t }) => [a("div", pn, [c(en, {
|
|
2237
2324
|
group: ae.value,
|
|
2238
2325
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
2239
2326
|
disabled: x.value,
|
|
2240
|
-
onItemClick:
|
|
2327
|
+
onItemClick: (e) => K(e, t)
|
|
2241
2328
|
}, null, 8, [
|
|
2242
2329
|
"group",
|
|
2243
2330
|
"gallery-preview-fallback",
|
|
2244
|
-
"disabled"
|
|
2331
|
+
"disabled",
|
|
2332
|
+
"onItemClick"
|
|
2245
2333
|
])])]),
|
|
2246
2334
|
_: 1
|
|
2247
2335
|
}, 8, [
|
|
2336
|
+
"visible",
|
|
2248
2337
|
"disabled",
|
|
2249
2338
|
"popper-class",
|
|
2250
2339
|
"popper-options"
|
|
@@ -2256,26 +2345,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2256
2345
|
disabled: x.value
|
|
2257
2346
|
}, {
|
|
2258
2347
|
default: k(() => [c(D(L), null, {
|
|
2259
|
-
default: k(() => [c(D(
|
|
2348
|
+
default: k(() => [c(D(pe))]),
|
|
2260
2349
|
_: 1
|
|
2261
2350
|
})]),
|
|
2262
2351
|
_: 1
|
|
2263
2352
|
}, 8, ["disabled"])) : r("", !0)
|
|
2264
|
-
])], 14,
|
|
2353
|
+
])], 14, on));
|
|
2265
2354
|
}
|
|
2266
|
-
}),
|
|
2355
|
+
}), hn = ["inert", "aria-disabled"], gn = { class: "ml-ribbon__head-left" }, _n = {
|
|
2267
2356
|
key: 2,
|
|
2268
2357
|
class: "ml-ribbon__tabs-after"
|
|
2269
|
-
},
|
|
2358
|
+
}, vn = { class: "ml-ribbon__head-right" }, yn = {
|
|
2270
2359
|
key: 2,
|
|
2271
2360
|
class: "ml-ribbon__tabs-extra"
|
|
2272
|
-
},
|
|
2361
|
+
}, bn = ["data-active-tab"], xn = {
|
|
2273
2362
|
key: 0,
|
|
2274
2363
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
2275
|
-
},
|
|
2364
|
+
}, 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 = {
|
|
2276
2365
|
key: 0,
|
|
2277
2366
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
2278
|
-
},
|
|
2367
|
+
}, 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({
|
|
2279
2368
|
__name: "Ribbon",
|
|
2280
2369
|
props: {
|
|
2281
2370
|
id: { default: "ml-ribbon-root" },
|
|
@@ -2403,9 +2492,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2403
2492
|
keyTipsSequencePrefix: "Sequence:",
|
|
2404
2493
|
keyTipsEmptySequence: "No key sequence",
|
|
2405
2494
|
galleryPreviewFallback: "Preview unavailable"
|
|
2406
|
-
}, P = s, F = u, { context: I, visibleTabs: re } =
|
|
2407
|
-
y(
|
|
2408
|
-
I.tabs.value = j(e),
|
|
2495
|
+
}, 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));
|
|
2496
|
+
y(me, I), O(() => P.tabs, (e) => {
|
|
2497
|
+
I.tabs.value = j(e), ve(I.tabs.value.find((e) => e.id === I.activeTab.value)) || (I.activeTab.value = ye(I.tabs.value));
|
|
2409
2498
|
}, { deep: !0 }), O(() => P.layout, (e) => {
|
|
2410
2499
|
e !== I.layout.value && (I.layout.value = e);
|
|
2411
2500
|
}), O(() => P.activeLayout, (e) => {
|
|
@@ -2435,12 +2524,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2435
2524
|
}), O(I.backdropOpen, (e) => {
|
|
2436
2525
|
F(e ? "backstageOpen" : "backstageClose");
|
|
2437
2526
|
});
|
|
2438
|
-
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(() =>
|
|
2527
|
+
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({
|
|
2439
2528
|
left: "0px",
|
|
2440
2529
|
top: "0px",
|
|
2441
2530
|
width: "1px",
|
|
2442
2531
|
height: "0px"
|
|
2443
|
-
}),
|
|
2532
|
+
}), 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(() => ({
|
|
2444
2533
|
layoutSwitcherTooltip: P.texts.layoutSwitcherTooltip || N.layoutSwitcherTooltip,
|
|
2445
2534
|
minimizeTooltip: P.texts.minimizeTooltip || N.minimizeTooltip,
|
|
2446
2535
|
keyTipsToggleText: P.texts.keyTipsToggleText || N.keyTipsToggleText,
|
|
@@ -2454,15 +2543,15 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2454
2543
|
keyTipsSequencePrefix: P.texts.keyTipsSequencePrefix || N.keyTipsSequencePrefix,
|
|
2455
2544
|
keyTipsEmptySequence: P.texts.keyTipsEmptySequence || N.keyTipsEmptySequence,
|
|
2456
2545
|
galleryPreviewFallback: P.texts.galleryPreviewFallback || N.galleryPreviewFallback
|
|
2457
|
-
})),
|
|
2458
|
-
if (
|
|
2459
|
-
let e =
|
|
2460
|
-
let n =
|
|
2546
|
+
})), 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(() => {
|
|
2547
|
+
if (!$.value.length) return 220;
|
|
2548
|
+
let e = $.value.reduce((e, t) => {
|
|
2549
|
+
let n = J.value[t.id] ?? Oe(t);
|
|
2461
2550
|
return Math.max(e, n);
|
|
2462
|
-
}, 0), t = Math.ceil(e +
|
|
2551
|
+
}, 0), t = Math.ceil(e + 28);
|
|
2463
2552
|
return Math.max(220, Math.min(720, t));
|
|
2464
2553
|
});
|
|
2465
|
-
function
|
|
2554
|
+
function Ee(e) {
|
|
2466
2555
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
2467
2556
|
...A(e),
|
|
2468
2557
|
size: "medium"
|
|
@@ -2477,13 +2566,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2477
2566
|
}]
|
|
2478
2567
|
};
|
|
2479
2568
|
}
|
|
2480
|
-
function
|
|
2569
|
+
function De(e) {
|
|
2481
2570
|
return e.priority ?? 100;
|
|
2482
2571
|
}
|
|
2483
|
-
function
|
|
2572
|
+
function Oe(e) {
|
|
2484
2573
|
return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width : 140;
|
|
2485
2574
|
}
|
|
2486
|
-
function
|
|
2575
|
+
function ke(e) {
|
|
2487
2576
|
let t = {};
|
|
2488
2577
|
return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
|
|
2489
2578
|
let n = e.dataset.groupId;
|
|
@@ -2492,117 +2581,107 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2492
2581
|
r > 0 && (t[n] = r);
|
|
2493
2582
|
}), t;
|
|
2494
2583
|
}
|
|
2495
|
-
function
|
|
2584
|
+
function je() {
|
|
2496
2585
|
let e = V.value.reduce((e, t) => {
|
|
2497
|
-
let n =
|
|
2498
|
-
return e + Math.max(n,
|
|
2586
|
+
let n = J.value[t.id] ?? Oe(t);
|
|
2587
|
+
return e + Math.max(n, Oe(t));
|
|
2499
2588
|
}, 0);
|
|
2500
2589
|
return Math.max(220, e);
|
|
2501
2590
|
}
|
|
2502
|
-
function
|
|
2591
|
+
function Me(e) {
|
|
2503
2592
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
2504
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
2593
|
+
return Number.isFinite(t) && t > 0 ? t : Mn;
|
|
2505
2594
|
}
|
|
2506
|
-
function
|
|
2595
|
+
function Ne() {
|
|
2507
2596
|
if (I.layout.value !== "classic") {
|
|
2508
|
-
|
|
2597
|
+
q.value = /* @__PURE__ */ new Set();
|
|
2509
2598
|
return;
|
|
2510
2599
|
}
|
|
2511
|
-
let e = I.minimized.value ?
|
|
2600
|
+
let e = I.minimized.value ? W.value : le.value;
|
|
2512
2601
|
if (!e) return;
|
|
2513
2602
|
let t = V.value;
|
|
2514
2603
|
if (!t.length) {
|
|
2515
|
-
|
|
2604
|
+
q.value = /* @__PURE__ */ new Set();
|
|
2516
2605
|
return;
|
|
2517
2606
|
}
|
|
2518
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
2519
|
-
|
|
2520
|
-
...
|
|
2607
|
+
let n = Math.round(e.getBoundingClientRect().width), r = Me(e), i = ke(e);
|
|
2608
|
+
J.value = {
|
|
2609
|
+
...J.value,
|
|
2521
2610
|
...i
|
|
2522
2611
|
};
|
|
2523
2612
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
2524
2613
|
group: e,
|
|
2525
2614
|
index: t
|
|
2526
2615
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
2527
|
-
let n =
|
|
2616
|
+
let n = De(t.group) - De(e.group);
|
|
2528
2617
|
return n === 0 ? t.index - e.index : n;
|
|
2529
|
-
}), l = (e) => i[e.id] ??
|
|
2618
|
+
}), 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;
|
|
2530
2619
|
for (; f(s) > n && p < c.length;) {
|
|
2531
2620
|
let e = c[p].group;
|
|
2532
2621
|
s.add(e.id), p += 1;
|
|
2533
2622
|
}
|
|
2534
|
-
|
|
2623
|
+
q.value = s;
|
|
2535
2624
|
}
|
|
2536
|
-
function
|
|
2625
|
+
function Fe() {
|
|
2537
2626
|
p(() => {
|
|
2538
|
-
|
|
2539
|
-
Pe();
|
|
2540
|
-
return;
|
|
2541
|
-
}
|
|
2542
|
-
if (K.value.size === 0) {
|
|
2543
|
-
Pe();
|
|
2544
|
-
return;
|
|
2545
|
-
}
|
|
2546
|
-
K.value = /* @__PURE__ */ new Set(), p(() => {
|
|
2547
|
-
Pe();
|
|
2548
|
-
});
|
|
2627
|
+
Ne();
|
|
2549
2628
|
});
|
|
2550
2629
|
}
|
|
2551
|
-
function
|
|
2552
|
-
let e = se.value, t =
|
|
2630
|
+
function Ie() {
|
|
2631
|
+
let e = se.value, t = U.value;
|
|
2553
2632
|
if (!e || !t) return;
|
|
2554
2633
|
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);
|
|
2555
|
-
|
|
2634
|
+
pe.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? je() : Math.max(360, V.value.length * 120)), K.value = {
|
|
2556
2635
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
2557
2636
|
top: "0px",
|
|
2558
2637
|
width: "1px",
|
|
2559
2638
|
height: `${Math.round(r.height)}px`
|
|
2560
2639
|
};
|
|
2561
2640
|
}
|
|
2562
|
-
function
|
|
2563
|
-
|
|
2641
|
+
function Le() {
|
|
2642
|
+
G.value = !1;
|
|
2564
2643
|
}
|
|
2565
|
-
function
|
|
2644
|
+
function Re(e) {
|
|
2566
2645
|
return I.disabled.value ? !0 : !e || z.value.size === 0 ? !1 : !z.value.has(e.id);
|
|
2567
2646
|
}
|
|
2568
|
-
function
|
|
2647
|
+
function ze(e) {
|
|
2569
2648
|
if (I.disabled.value) return;
|
|
2570
2649
|
let t = I.activeTab.value === e.id;
|
|
2571
2650
|
if (I.activeTab.value = e.id, !I.minimized.value) {
|
|
2572
|
-
|
|
2651
|
+
Le();
|
|
2573
2652
|
return;
|
|
2574
2653
|
}
|
|
2575
|
-
|
|
2654
|
+
Ie(), G.value = t ? !G.value : !0;
|
|
2576
2655
|
}
|
|
2577
|
-
function
|
|
2656
|
+
function Be() {
|
|
2578
2657
|
I.disabled.value || I.api.toggleSimplified();
|
|
2579
2658
|
}
|
|
2580
|
-
function
|
|
2581
|
-
I.disabled.value || (I.minimized.value ||
|
|
2659
|
+
function Ve() {
|
|
2660
|
+
I.disabled.value || (I.minimized.value || Le(), I.minimized.value = !I.minimized.value);
|
|
2582
2661
|
}
|
|
2583
|
-
function
|
|
2584
|
-
I.disabled.value || (
|
|
2662
|
+
function He(e) {
|
|
2663
|
+
I.disabled.value || (Le(), F("fileMenuSelect", e));
|
|
2585
2664
|
}
|
|
2586
|
-
function
|
|
2587
|
-
I.disabled.value || (
|
|
2665
|
+
function Ue() {
|
|
2666
|
+
I.disabled.value || (Le(), I.backdropOpen.value = !0);
|
|
2588
2667
|
}
|
|
2589
|
-
function
|
|
2668
|
+
function We() {
|
|
2590
2669
|
I.disabled.value || (I.backdropOpen.value = !1);
|
|
2591
2670
|
}
|
|
2592
|
-
function
|
|
2671
|
+
function Ge(e, t) {
|
|
2593
2672
|
B.value || (F("itemClick", {
|
|
2594
2673
|
tabId: I.activeTab.value,
|
|
2595
2674
|
groupId: e,
|
|
2596
2675
|
itemId: t
|
|
2597
|
-
}), I.minimized.value &&
|
|
2676
|
+
}), I.minimized.value && Le());
|
|
2598
2677
|
}
|
|
2599
|
-
function
|
|
2678
|
+
function Ke(e) {
|
|
2600
2679
|
if (!(e instanceof HTMLElement)) return !1;
|
|
2601
2680
|
if (e.isContentEditable) return !0;
|
|
2602
2681
|
let t = e.tagName;
|
|
2603
2682
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
2604
2683
|
}
|
|
2605
|
-
function
|
|
2684
|
+
function qe() {
|
|
2606
2685
|
if (B.value) {
|
|
2607
2686
|
I.keyTips.value = [];
|
|
2608
2687
|
return;
|
|
@@ -2624,31 +2703,31 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2624
2703
|
}).filter((e) => !!e)));
|
|
2625
2704
|
I.keyTips.value = t;
|
|
2626
2705
|
}
|
|
2627
|
-
function
|
|
2706
|
+
function Je(e) {
|
|
2628
2707
|
if (I.disabled.value) return;
|
|
2629
2708
|
let t = R.value;
|
|
2630
2709
|
if (t?.groups?.length) {
|
|
2631
2710
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
2632
2711
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
2633
2712
|
if (r) {
|
|
2634
|
-
|
|
2713
|
+
Ge(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
|
|
2635
2714
|
return;
|
|
2636
2715
|
}
|
|
2637
2716
|
}
|
|
2638
2717
|
}
|
|
2639
2718
|
}
|
|
2640
|
-
function
|
|
2719
|
+
function Ye() {
|
|
2641
2720
|
I.keyTipsSequence.value = "";
|
|
2642
2721
|
}
|
|
2643
|
-
function
|
|
2644
|
-
if (!I.disabled.value && !
|
|
2722
|
+
function Xe(e) {
|
|
2723
|
+
if (!I.disabled.value && !Ke(e.target)) {
|
|
2645
2724
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
2646
|
-
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value ||
|
|
2725
|
+
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value || Ye();
|
|
2647
2726
|
return;
|
|
2648
2727
|
}
|
|
2649
2728
|
if (I.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
2650
2729
|
if (e.key === "Escape") {
|
|
2651
|
-
e.preventDefault(), I.keyTipsOpen.value = !1,
|
|
2730
|
+
e.preventDefault(), I.keyTipsOpen.value = !1, Ye();
|
|
2652
2731
|
return;
|
|
2653
2732
|
}
|
|
2654
2733
|
if (e.key === "Backspace") {
|
|
@@ -2661,62 +2740,73 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2661
2740
|
I.keyTipsSequence.value = t;
|
|
2662
2741
|
let n = t.toLowerCase(), r = I.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
2663
2742
|
if (r) {
|
|
2664
|
-
|
|
2743
|
+
Je(r);
|
|
2665
2744
|
return;
|
|
2666
2745
|
}
|
|
2667
|
-
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) ||
|
|
2746
|
+
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Ye();
|
|
2668
2747
|
}
|
|
2669
2748
|
}
|
|
2670
2749
|
}
|
|
2671
2750
|
}
|
|
2672
|
-
function
|
|
2673
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
2751
|
+
function Ze(e) {
|
|
2752
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? de : null;
|
|
2674
2753
|
}
|
|
2675
|
-
function
|
|
2676
|
-
|
|
2754
|
+
function Qe(e) {
|
|
2755
|
+
G.value = e;
|
|
2677
2756
|
}
|
|
2678
2757
|
O([
|
|
2679
2758
|
V,
|
|
2680
2759
|
() => I.layout.value,
|
|
2681
2760
|
() => I.minimized.value
|
|
2682
2761
|
], () => {
|
|
2683
|
-
|
|
2762
|
+
Fe();
|
|
2684
2763
|
}), O([
|
|
2685
2764
|
R,
|
|
2686
2765
|
() => I.tabs.value,
|
|
2687
2766
|
() => I.disabled.value
|
|
2688
2767
|
], () => {
|
|
2689
|
-
|
|
2768
|
+
qe(), Ye();
|
|
2690
2769
|
}, {
|
|
2691
2770
|
deep: !0,
|
|
2692
2771
|
immediate: !0
|
|
2693
2772
|
}), O(() => I.keyTipsOpen.value, (e) => {
|
|
2694
|
-
e ||
|
|
2773
|
+
e || Ye();
|
|
2695
2774
|
}), O(() => I.disabled.value, (e) => {
|
|
2696
|
-
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1,
|
|
2775
|
+
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Le(), Ye());
|
|
2697
2776
|
}), O([
|
|
2698
2777
|
() => I.minimized.value,
|
|
2699
2778
|
() => I.layout.value,
|
|
2700
2779
|
R
|
|
2701
2780
|
], ([e, , t]) => {
|
|
2702
|
-
(!e || !t) &&
|
|
2703
|
-
})
|
|
2704
|
-
|
|
2705
|
-
|
|
2781
|
+
(!e || !t) && Le();
|
|
2782
|
+
});
|
|
2783
|
+
function $e() {
|
|
2784
|
+
if (!et) return;
|
|
2785
|
+
let e = I.minimized.value ? W.value : le.value, t = [le.value, W.value];
|
|
2786
|
+
for (let n of t) n && n !== e && et.unobserve(n);
|
|
2787
|
+
e && et.observe(e);
|
|
2788
|
+
}
|
|
2789
|
+
O([
|
|
2790
|
+
le,
|
|
2791
|
+
W,
|
|
2792
|
+
() => I.minimized.value
|
|
2793
|
+
], () => {
|
|
2794
|
+
$e(), Fe();
|
|
2795
|
+
}, { flush: "post" }), O(G, (e) => {
|
|
2706
2796
|
e && p(() => {
|
|
2707
|
-
|
|
2797
|
+
Ie(), Fe();
|
|
2708
2798
|
});
|
|
2709
2799
|
});
|
|
2710
|
-
let
|
|
2800
|
+
let et = null;
|
|
2711
2801
|
g(() => {
|
|
2712
|
-
window.addEventListener("keydown",
|
|
2713
|
-
|
|
2714
|
-
}),
|
|
2802
|
+
window.addEventListener("keydown", Xe), window.addEventListener("resize", tt), typeof ResizeObserver < "u" && (et = new ResizeObserver(() => {
|
|
2803
|
+
Ie(), Fe();
|
|
2804
|
+
}), $e()), Ie(), Fe();
|
|
2715
2805
|
}), _(() => {
|
|
2716
|
-
window.removeEventListener("keydown",
|
|
2806
|
+
window.removeEventListener("keydown", Xe), window.removeEventListener("resize", tt), et?.disconnect();
|
|
2717
2807
|
});
|
|
2718
|
-
function
|
|
2719
|
-
|
|
2808
|
+
function tt() {
|
|
2809
|
+
G.value && Ie();
|
|
2720
2810
|
}
|
|
2721
2811
|
return l(I.api), (t, l) => (v(), n(D(ne), { size: P.size }, {
|
|
2722
2812
|
default: k(() => [(v(), i("section", {
|
|
@@ -2725,7 +2815,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2725
2815
|
key: D(I).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
2726
2816
|
class: m(["ml-ribbon", [
|
|
2727
2817
|
`ml-ribbon--${D(I).layout.value}`,
|
|
2728
|
-
`ml-ribbon--size-${
|
|
2818
|
+
`ml-ribbon--size-${ge.value}`,
|
|
2729
2819
|
{
|
|
2730
2820
|
"ml-ribbon--disabled": D(I).disabled.value,
|
|
2731
2821
|
"ml-ribbon--minimized": D(I).minimized.value,
|
|
@@ -2737,19 +2827,19 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2737
2827
|
}, [
|
|
2738
2828
|
a("header", {
|
|
2739
2829
|
ref_key: "ribbonHeaderRef",
|
|
2740
|
-
ref:
|
|
2830
|
+
ref: U,
|
|
2741
2831
|
class: "ml-ribbon__header"
|
|
2742
2832
|
}, [
|
|
2743
|
-
a("div",
|
|
2744
|
-
s.showFileMenu ? (v(), n(
|
|
2833
|
+
a("div", gn, [
|
|
2834
|
+
s.showFileMenu ? (v(), n(Pe, {
|
|
2745
2835
|
key: 0,
|
|
2746
2836
|
items: s.fileMenuItems,
|
|
2747
2837
|
disabled: D(I).disabled.value,
|
|
2748
|
-
label:
|
|
2749
|
-
"open-backstage-label":
|
|
2838
|
+
label: X.value.fileMenuLabel,
|
|
2839
|
+
"open-backstage-label": X.value.fileMenuOpenBackstageLabel,
|
|
2750
2840
|
"show-open-backstage": s.showOpenBackstage,
|
|
2751
|
-
onSelect:
|
|
2752
|
-
onOpenBackstage:
|
|
2841
|
+
onSelect: He,
|
|
2842
|
+
onOpenBackstage: Ue
|
|
2753
2843
|
}, null, 8, [
|
|
2754
2844
|
"items",
|
|
2755
2845
|
"disabled",
|
|
@@ -2757,11 +2847,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2757
2847
|
"open-backstage-label",
|
|
2758
2848
|
"show-open-backstage"
|
|
2759
2849
|
])) : r("", !0),
|
|
2760
|
-
c(
|
|
2850
|
+
c(Ae, {
|
|
2761
2851
|
tabs: D(re),
|
|
2762
2852
|
"active-tab": D(I).activeTab.value,
|
|
2763
2853
|
disabled: D(I).disabled.value,
|
|
2764
|
-
onSelect:
|
|
2854
|
+
onSelect: ze
|
|
2765
2855
|
}, null, 8, [
|
|
2766
2856
|
"tabs",
|
|
2767
2857
|
"active-tab",
|
|
@@ -2769,9 +2859,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2769
2859
|
]),
|
|
2770
2860
|
P.hideMinimizeButton ? r("", !0) : (v(), n(D(H), {
|
|
2771
2861
|
key: 1,
|
|
2772
|
-
content:
|
|
2773
|
-
"show-after":
|
|
2774
|
-
"hide-after":
|
|
2862
|
+
content: X.value.minimizeTooltip,
|
|
2863
|
+
"show-after": Z.value,
|
|
2864
|
+
"hide-after": Q.value
|
|
2775
2865
|
}, {
|
|
2776
2866
|
default: k(() => [c(D(te), {
|
|
2777
2867
|
class: m([
|
|
@@ -2779,9 +2869,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2779
2869
|
"ml-ribbon__control--minimize",
|
|
2780
2870
|
D(I).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
2781
2871
|
]),
|
|
2782
|
-
icon:
|
|
2872
|
+
icon: Se.value,
|
|
2783
2873
|
disabled: D(I).disabled.value,
|
|
2784
|
-
onClick:
|
|
2874
|
+
onClick: Ve
|
|
2785
2875
|
}, null, 8, [
|
|
2786
2876
|
"class",
|
|
2787
2877
|
"icon",
|
|
@@ -2793,26 +2883,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2793
2883
|
"show-after",
|
|
2794
2884
|
"hide-after"
|
|
2795
2885
|
])),
|
|
2796
|
-
t.$slots["tabs-after"] ? (v(), i("div",
|
|
2886
|
+
t.$slots["tabs-after"] ? (v(), i("div", _n, [S(t.$slots, "tabs-after", {
|
|
2797
2887
|
activeTab: D(I).activeTab.value,
|
|
2798
2888
|
layout: D(I).layout.value,
|
|
2799
2889
|
minimized: D(I).minimized.value,
|
|
2800
2890
|
disabled: D(I).disabled.value
|
|
2801
2891
|
})])) : r("", !0)
|
|
2802
2892
|
]),
|
|
2803
|
-
a("div",
|
|
2893
|
+
a("div", vn, [
|
|
2804
2894
|
P.hideLayoutSwitcher ? r("", !0) : (v(), n(D(H), {
|
|
2805
2895
|
key: 0,
|
|
2806
|
-
content:
|
|
2807
|
-
"show-after":
|
|
2808
|
-
"hide-after":
|
|
2896
|
+
content: X.value.layoutSwitcherTooltip,
|
|
2897
|
+
"show-after": Z.value,
|
|
2898
|
+
"hide-after": Q.value
|
|
2809
2899
|
}, {
|
|
2810
2900
|
default: k(() => [c(D(te), {
|
|
2811
2901
|
circle: "",
|
|
2812
2902
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
2813
|
-
icon: D(
|
|
2903
|
+
icon: D(fe),
|
|
2814
2904
|
disabled: D(I).disabled.value,
|
|
2815
|
-
onClick:
|
|
2905
|
+
onClick: Be
|
|
2816
2906
|
}, null, 8, ["icon", "disabled"])]),
|
|
2817
2907
|
_: 1
|
|
2818
2908
|
}, 8, [
|
|
@@ -2824,8 +2914,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2824
2914
|
key: 1,
|
|
2825
2915
|
"inline-prompt": "",
|
|
2826
2916
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
2827
|
-
"active-text":
|
|
2828
|
-
"inactive-text":
|
|
2917
|
+
"active-text": X.value.keyTipsToggleText,
|
|
2918
|
+
"inactive-text": X.value.keyTipsToggleText,
|
|
2829
2919
|
"model-value": D(I).keyTipsOpen.value,
|
|
2830
2920
|
disabled: D(I).disabled.value,
|
|
2831
2921
|
onChange: l[0] ||= (e) => D(I).keyTipsOpen.value = !D(I).keyTipsOpen.value
|
|
@@ -2835,7 +2925,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2835
2925
|
"model-value",
|
|
2836
2926
|
"disabled"
|
|
2837
2927
|
])),
|
|
2838
|
-
t.$slots["tabs-extra"] ? (v(), i("div",
|
|
2928
|
+
t.$slots["tabs-extra"] ? (v(), i("div", yn, [S(t.$slots, "tabs-extra", {
|
|
2839
2929
|
activeTab: D(I).activeTab.value,
|
|
2840
2930
|
layout: D(I).layout.value,
|
|
2841
2931
|
minimized: D(I).minimized.value,
|
|
@@ -2845,26 +2935,26 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2845
2935
|
R.value ? (v(), n(D(ie), {
|
|
2846
2936
|
key: 0,
|
|
2847
2937
|
placement: "bottom-start",
|
|
2848
|
-
visible:
|
|
2849
|
-
width:
|
|
2938
|
+
visible: G.value,
|
|
2939
|
+
width: pe.value || void 0,
|
|
2850
2940
|
disabled: D(I).disabled.value || !D(I).minimized.value,
|
|
2851
2941
|
"show-arrow": !1,
|
|
2852
2942
|
offset: 0,
|
|
2853
|
-
"popper-class":
|
|
2854
|
-
"onUpdate:visible":
|
|
2943
|
+
"popper-class": Y.value,
|
|
2944
|
+
"onUpdate:visible": Qe
|
|
2855
2945
|
}, {
|
|
2856
2946
|
reference: k(() => [a("span", {
|
|
2857
2947
|
"aria-hidden": "true",
|
|
2858
2948
|
class: "ml-ribbon__minimized-anchor",
|
|
2859
|
-
style: h(
|
|
2949
|
+
style: h(K.value)
|
|
2860
2950
|
}, null, 4)]),
|
|
2861
|
-
default: k(() => [D(I).layout.value === "classic" ? (v(), i("main", {
|
|
2951
|
+
default: k(() => [D(I).minimized.value && D(I).layout.value === "classic" ? (v(), i("main", {
|
|
2862
2952
|
key: 0,
|
|
2863
2953
|
ref_key: "minimizedClassicPanelRef",
|
|
2864
|
-
ref:
|
|
2954
|
+
ref: W,
|
|
2865
2955
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
2866
2956
|
"data-active-tab": R.value.id
|
|
2867
|
-
}, [(v(!0), i(e, null, x(
|
|
2957
|
+
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(mn, {
|
|
2868
2958
|
id: e.id,
|
|
2869
2959
|
key: e.id,
|
|
2870
2960
|
"data-group-id": e.id,
|
|
@@ -2877,16 +2967,16 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2877
2967
|
launcher: e.launcher,
|
|
2878
2968
|
"show-launcher-icon": e.showLauncherIcon,
|
|
2879
2969
|
"group-model": e,
|
|
2880
|
-
"overflow-trigger-aria-label":
|
|
2881
|
-
"gallery-preview-fallback":
|
|
2970
|
+
"overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
|
|
2971
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2882
2972
|
disabled: B.value,
|
|
2883
|
-
onItemClick: l[2] ||= (e) =>
|
|
2973
|
+
onItemClick: l[2] ||= (e) => Ge(e.groupId, e.itemId)
|
|
2884
2974
|
}, {
|
|
2885
|
-
default: k(() => [c(
|
|
2975
|
+
default: k(() => [c(en, {
|
|
2886
2976
|
group: e,
|
|
2887
|
-
"gallery-preview-fallback":
|
|
2977
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2888
2978
|
disabled: B.value,
|
|
2889
|
-
onItemClick: l[1] ||= (e) =>
|
|
2979
|
+
onItemClick: l[1] ||= (e) => Ge(e.groupId, e.itemId)
|
|
2890
2980
|
}, null, 8, [
|
|
2891
2981
|
"group",
|
|
2892
2982
|
"gallery-preview-fallback",
|
|
@@ -2908,41 +2998,24 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2908
2998
|
"overflow-trigger-aria-label",
|
|
2909
2999
|
"gallery-preview-fallback",
|
|
2910
3000
|
"disabled"
|
|
2911
|
-
]))), 128)),
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
width:
|
|
3001
|
+
]))), 128)), $.value.length ? (v(), i("section", xn, [a("div", Sn, [c(an, {
|
|
3002
|
+
groups: $.value,
|
|
3003
|
+
"popover-class": be.value,
|
|
3004
|
+
"popover-width": Te.value,
|
|
3005
|
+
"trigger-aria-label": X.value.overflowTriggerAriaLabel ?? "",
|
|
3006
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback ?? "",
|
|
2915
3007
|
disabled: B.value,
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
default: k(() => [a("div", gn, [(v(!0), i(e, null, x(Q.value, (e) => (v(), i("section", {
|
|
2928
|
-
key: e.id,
|
|
2929
|
-
class: "ml-ribbon-overflow-group"
|
|
2930
|
-
}, [a("header", _n, T(e.title), 1), c(Xt, {
|
|
2931
|
-
group: e,
|
|
2932
|
-
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2933
|
-
disabled: B.value,
|
|
2934
|
-
onItemClick: l[3] ||= (e) => Ke(e.groupId, e.itemId)
|
|
2935
|
-
}, null, 8, [
|
|
2936
|
-
"group",
|
|
2937
|
-
"gallery-preview-fallback",
|
|
2938
|
-
"disabled"
|
|
2939
|
-
])]))), 128))])]),
|
|
2940
|
-
_: 1
|
|
2941
|
-
}, 8, [
|
|
2942
|
-
"width",
|
|
2943
|
-
"disabled",
|
|
2944
|
-
"popper-class"
|
|
2945
|
-
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, fn)) : (v(), i("main", {
|
|
3008
|
+
onOpen: l[3] ||= (e) => D(I).overflowOpen.value = !0,
|
|
3009
|
+
onClose: l[4] ||= (e) => D(I).overflowOpen.value = !1,
|
|
3010
|
+
onItemClick: l[5] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3011
|
+
}, null, 8, [
|
|
3012
|
+
"groups",
|
|
3013
|
+
"popover-class",
|
|
3014
|
+
"popover-width",
|
|
3015
|
+
"trigger-aria-label",
|
|
3016
|
+
"gallery-preview-fallback",
|
|
3017
|
+
"disabled"
|
|
3018
|
+
])]), 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", {
|
|
2946
3019
|
key: 1,
|
|
2947
3020
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
2948
3021
|
"data-active-tab": R.value.id
|
|
@@ -2953,31 +3026,31 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2953
3026
|
width: 340,
|
|
2954
3027
|
disabled: B.value,
|
|
2955
3028
|
"show-arrow": !1,
|
|
2956
|
-
"popper-class":
|
|
3029
|
+
"popper-class": _e.value
|
|
2957
3030
|
}, {
|
|
2958
3031
|
reference: k(() => [a("button", {
|
|
2959
3032
|
class: "ml-ribbon-simplified-group",
|
|
2960
3033
|
type: "button",
|
|
2961
3034
|
disabled: B.value
|
|
2962
|
-
}, [
|
|
3035
|
+
}, [Ze(e) ? (v(), n(D(L), {
|
|
2963
3036
|
key: 0,
|
|
2964
3037
|
class: "ml-ribbon-simplified-group__icon"
|
|
2965
3038
|
}, {
|
|
2966
|
-
default: k(() => [(v(), n(w(
|
|
3039
|
+
default: k(() => [(v(), n(w(Ze(e))))]),
|
|
2967
3040
|
_: 2
|
|
2968
|
-
}, 1024)) : r("", !0), a("span", null, T(e.title), 1)], 8,
|
|
2969
|
-
default: k(() => [a("div",
|
|
2970
|
-
group:
|
|
2971
|
-
"gallery-preview-fallback":
|
|
3041
|
+
}, 1024)) : r("", !0), a("span", null, T(e.title), 1)], 8, wn)]),
|
|
3042
|
+
default: k(() => [a("div", Tn, [c(en, {
|
|
3043
|
+
group: Ee(e),
|
|
3044
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2972
3045
|
disabled: B.value,
|
|
2973
|
-
onItemClick: l[6] ||= (e) =>
|
|
3046
|
+
onItemClick: l[6] ||= (e) => Ge(e.groupId, e.itemId)
|
|
2974
3047
|
}, null, 8, [
|
|
2975
3048
|
"group",
|
|
2976
3049
|
"gallery-preview-fallback",
|
|
2977
3050
|
"disabled"
|
|
2978
3051
|
])])]),
|
|
2979
3052
|
_: 2
|
|
2980
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
3053
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, Cn)) : r("", !0)]),
|
|
2981
3054
|
_: 1
|
|
2982
3055
|
}, 8, [
|
|
2983
3056
|
"visible",
|
|
@@ -2991,8 +3064,8 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
2991
3064
|
class: "ml-ribbon__panel",
|
|
2992
3065
|
"data-active-tab": R.value.id,
|
|
2993
3066
|
ref_key: "classicPanelRef",
|
|
2994
|
-
ref:
|
|
2995
|
-
}, [(v(!0), i(e, null, x(
|
|
3067
|
+
ref: le
|
|
3068
|
+
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(mn, {
|
|
2996
3069
|
id: e.id,
|
|
2997
3070
|
key: e.id,
|
|
2998
3071
|
"data-group-id": e.id,
|
|
@@ -3005,16 +3078,16 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3005
3078
|
launcher: e.launcher,
|
|
3006
3079
|
"show-launcher-icon": e.showLauncherIcon,
|
|
3007
3080
|
"group-model": e,
|
|
3008
|
-
"overflow-trigger-aria-label":
|
|
3009
|
-
"gallery-preview-fallback":
|
|
3081
|
+
"overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
|
|
3082
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
3010
3083
|
disabled: B.value,
|
|
3011
|
-
onItemClick: l[8] ||= (e) =>
|
|
3084
|
+
onItemClick: l[8] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3012
3085
|
}, {
|
|
3013
|
-
default: k(() => [c(
|
|
3086
|
+
default: k(() => [c(en, {
|
|
3014
3087
|
group: e,
|
|
3015
|
-
"gallery-preview-fallback":
|
|
3088
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
3016
3089
|
disabled: B.value,
|
|
3017
|
-
onItemClick: l[7] ||= (e) =>
|
|
3090
|
+
onItemClick: l[7] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3018
3091
|
}, null, 8, [
|
|
3019
3092
|
"group",
|
|
3020
3093
|
"gallery-preview-fallback",
|
|
@@ -3036,40 +3109,24 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3036
3109
|
"overflow-trigger-aria-label",
|
|
3037
3110
|
"gallery-preview-fallback",
|
|
3038
3111
|
"disabled"
|
|
3039
|
-
]))), 128)),
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
width:
|
|
3112
|
+
]))), 128)), $.value.length ? (v(), i("section", Dn, [a("div", On, [c(an, {
|
|
3113
|
+
groups: $.value,
|
|
3114
|
+
"popover-class": be.value,
|
|
3115
|
+
"popover-width": Te.value,
|
|
3116
|
+
"trigger-aria-label": X.value.overflowTriggerAriaLabel ?? "",
|
|
3117
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback ?? "",
|
|
3043
3118
|
disabled: B.value,
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
},
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
key: e.id,
|
|
3056
|
-
class: "ml-ribbon-overflow-group"
|
|
3057
|
-
}, [a("header", En, T(e.title), 1), c(Xt, {
|
|
3058
|
-
group: e,
|
|
3059
|
-
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
3060
|
-
disabled: B.value,
|
|
3061
|
-
onItemClick: l[9] ||= (e) => Ke(e.groupId, e.itemId)
|
|
3062
|
-
}, null, 8, [
|
|
3063
|
-
"group",
|
|
3064
|
-
"gallery-preview-fallback",
|
|
3065
|
-
"disabled"
|
|
3066
|
-
])]))), 128))])]),
|
|
3067
|
-
_: 1
|
|
3068
|
-
}, 8, [
|
|
3069
|
-
"width",
|
|
3070
|
-
"disabled",
|
|
3071
|
-
"popper-class"
|
|
3072
|
-
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, xn)) : r("", !0),
|
|
3119
|
+
onOpen: l[9] ||= (e) => D(I).overflowOpen.value = !0,
|
|
3120
|
+
onClose: l[10] ||= (e) => D(I).overflowOpen.value = !1,
|
|
3121
|
+
onItemClick: l[11] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3122
|
+
}, null, 8, [
|
|
3123
|
+
"groups",
|
|
3124
|
+
"popover-class",
|
|
3125
|
+
"popover-width",
|
|
3126
|
+
"trigger-aria-label",
|
|
3127
|
+
"gallery-preview-fallback",
|
|
3128
|
+
"disabled"
|
|
3129
|
+
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, En)) : r("", !0),
|
|
3073
3130
|
!D(I).minimized.value && R.value && D(I).layout.value === "simplified" ? (v(), i("main", {
|
|
3074
3131
|
key: 1,
|
|
3075
3132
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
@@ -3080,47 +3137,47 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3080
3137
|
placement: "bottom-start",
|
|
3081
3138
|
width: 340,
|
|
3082
3139
|
disabled: B.value,
|
|
3083
|
-
"popper-class":
|
|
3140
|
+
"popper-class": _e.value
|
|
3084
3141
|
}, {
|
|
3085
3142
|
reference: k(() => [a("button", {
|
|
3086
3143
|
class: "ml-ribbon-simplified-group",
|
|
3087
3144
|
type: "button",
|
|
3088
3145
|
disabled: B.value
|
|
3089
|
-
}, [
|
|
3146
|
+
}, [Ze(e) ? (v(), n(D(L), {
|
|
3090
3147
|
key: 0,
|
|
3091
3148
|
class: "ml-ribbon-simplified-group__icon"
|
|
3092
3149
|
}, {
|
|
3093
|
-
default: k(() => [(v(), n(w(
|
|
3150
|
+
default: k(() => [(v(), n(w(Ze(e))))]),
|
|
3094
3151
|
_: 2
|
|
3095
|
-
}, 1024)) : r("", !0), a("span", null, T(e.title), 1)], 8,
|
|
3096
|
-
default: k(() => [a("div",
|
|
3097
|
-
group:
|
|
3098
|
-
"gallery-preview-fallback":
|
|
3152
|
+
}, 1024)) : r("", !0), a("span", null, T(e.title), 1)], 8, An)]),
|
|
3153
|
+
default: k(() => [a("div", jn, [c(en, {
|
|
3154
|
+
group: Ee(e),
|
|
3155
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
3099
3156
|
disabled: B.value,
|
|
3100
|
-
onItemClick: l[12] ||= (e) =>
|
|
3157
|
+
onItemClick: l[12] ||= (e) => Ge(e.groupId, e.itemId)
|
|
3101
3158
|
}, null, 8, [
|
|
3102
3159
|
"group",
|
|
3103
3160
|
"gallery-preview-fallback",
|
|
3104
3161
|
"disabled"
|
|
3105
3162
|
])])]),
|
|
3106
3163
|
_: 2
|
|
3107
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
3108
|
-
c(
|
|
3164
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, kn)) : r("", !0),
|
|
3165
|
+
c(Ce, {
|
|
3109
3166
|
open: D(I).backdropOpen.value,
|
|
3110
|
-
size:
|
|
3111
|
-
"back-label":
|
|
3112
|
-
title:
|
|
3113
|
-
description:
|
|
3114
|
-
onClose:
|
|
3167
|
+
size: ge.value,
|
|
3168
|
+
"back-label": X.value.backstageBackLabel,
|
|
3169
|
+
title: X.value.backstageTitle,
|
|
3170
|
+
description: X.value.backstageDescription,
|
|
3171
|
+
onClose: We
|
|
3115
3172
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
3116
3173
|
name: "default",
|
|
3117
3174
|
fn: k(() => [S(t.$slots, "backstage", {
|
|
3118
|
-
close:
|
|
3175
|
+
close: We,
|
|
3119
3176
|
open: D(I).backdropOpen.value,
|
|
3120
|
-
size:
|
|
3121
|
-
backLabel:
|
|
3122
|
-
title:
|
|
3123
|
-
description:
|
|
3177
|
+
size: ge.value,
|
|
3178
|
+
backLabel: X.value.backstageBackLabel,
|
|
3179
|
+
title: X.value.backstageTitle,
|
|
3180
|
+
description: X.value.backstageDescription,
|
|
3124
3181
|
disabled: D(I).disabled.value
|
|
3125
3182
|
})]),
|
|
3126
3183
|
key: "0"
|
|
@@ -3131,14 +3188,14 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3131
3188
|
"title",
|
|
3132
3189
|
"description"
|
|
3133
3190
|
])
|
|
3134
|
-
], 10,
|
|
3191
|
+
], 10, hn))]),
|
|
3135
3192
|
_: 3
|
|
3136
3193
|
}, 8, ["size"]));
|
|
3137
3194
|
}
|
|
3138
|
-
}),
|
|
3195
|
+
}), Pn = {
|
|
3139
3196
|
class: "ml-ribbon-tab-definition",
|
|
3140
3197
|
hidden: ""
|
|
3141
|
-
},
|
|
3198
|
+
}, Fn = /* @__PURE__ */ l({
|
|
3142
3199
|
__name: "RibbonTab",
|
|
3143
3200
|
props: {
|
|
3144
3201
|
id: {},
|
|
@@ -3149,13 +3206,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3149
3206
|
contextualTitle: {}
|
|
3150
3207
|
},
|
|
3151
3208
|
setup(e) {
|
|
3152
|
-
return (e, t) => (v(), i("div",
|
|
3209
|
+
return (e, t) => (v(), i("div", Pn, [S(e.$slots, "default")]));
|
|
3153
3210
|
}
|
|
3154
|
-
}),
|
|
3211
|
+
}), In = {
|
|
3155
3212
|
key: 0,
|
|
3156
3213
|
class: "ml-ribbon-keytips",
|
|
3157
3214
|
"aria-live": "polite"
|
|
3158
|
-
},
|
|
3215
|
+
}, Ln = { class: "ml-ribbon-keytips__hint" }, Rn = /* @__PURE__ */ l({
|
|
3159
3216
|
__name: "RibbonKeyTips",
|
|
3160
3217
|
props: {
|
|
3161
3218
|
open: { type: Boolean },
|
|
@@ -3190,11 +3247,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, X = { class: "ml-ribbon-backstage
|
|
|
3190
3247
|
}
|
|
3191
3248
|
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), O(() => s.open, (e) => {
|
|
3192
3249
|
e || y();
|
|
3193
|
-
}), (t, o) => n.open ? (v(), i("div",
|
|
3250
|
+
}), (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", {
|
|
3194
3251
|
key: e.id,
|
|
3195
3252
|
class: "ml-ribbon-keytip"
|
|
3196
3253
|
}, T(e.key), 1))), 128))])) : r("", !0);
|
|
3197
3254
|
}
|
|
3198
3255
|
});
|
|
3199
3256
|
//#endregion
|
|
3200
|
-
export {
|
|
3257
|
+
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 };
|