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