@mlightcad/ribbon 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/items/RibbonGallery.vue.d.ts +10 -9
- package/dist/items/RibbonToggleButton.vue.d.ts +2 -2
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +634 -602
- package/dist/ml-ribbon.umd.js +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, markRaw as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onMounted as g, onUnmounted as _, openBlock as v, provide as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, toRaw as T, unref as E, watch as D, withCtx as O, withModifiers as k } from "vue";
|
|
2
|
-
import { ElButton as ee, ElButtonGroup as A, ElCheckbox as te, ElColorPicker as ne, ElConfigProvider as
|
|
3
|
-
import { ArrowDown as
|
|
2
|
+
import { ElButton as ee, ElButtonGroup as A, ElCheckbox as te, ElColorPicker as ne, ElConfigProvider as re, ElDrawer as j, ElDropdown as M, ElDropdownItem as N, ElDropdownMenu as P, ElIcon as F, ElInputNumber as I, ElOption as ie, ElPopover as ae, ElSegmented as L, ElSelect as oe, ElSwitch as R, ElTooltip as z, useGlobalConfig as se } from "element-plus";
|
|
3
|
+
import { ArrowDown as B, ArrowDownBold as V, ArrowUp as H, ArrowUpBold 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 U(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 W(e) {
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = { ...e };
|
|
14
|
-
return "icon" in t && (t.icon =
|
|
14
|
+
return "component" in t && (t.component = U(t.component)), "icon" in t && (t.icon = U(t.icon)), "activeIcon" in t && (t.activeIcon = U(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = U(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: U(t.icon)
|
|
20
20
|
} : t;
|
|
21
21
|
})), t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function G(e) {
|
|
24
24
|
return {
|
|
25
25
|
...e,
|
|
26
|
-
icon:
|
|
27
|
-
props:
|
|
26
|
+
icon: U(e.icon),
|
|
27
|
+
props: W(e.props)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function K(e) {
|
|
31
31
|
return {
|
|
32
32
|
...e,
|
|
33
|
-
icon:
|
|
34
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
33
|
+
icon: U(e.icon),
|
|
34
|
+
footerMenuItems: e.footerMenuItems?.map(G),
|
|
35
35
|
collections: e.collections?.map((e) => ({
|
|
36
36
|
...e,
|
|
37
|
-
items: e.items.map(
|
|
37
|
+
items: e.items.map(G)
|
|
38
38
|
}))
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function pe(e) {
|
|
42
42
|
return {
|
|
43
43
|
...e,
|
|
44
|
-
groups: e.groups?.map(
|
|
44
|
+
groups: e.groups?.map(K)
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return e.map(
|
|
47
|
+
function me(e) {
|
|
48
|
+
return e.map(pe);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function q(e) {
|
|
51
51
|
(!e.collections || e.collections.length === 0) && (e.collections = [{
|
|
52
52
|
id: `${e.id}-collection-1`,
|
|
53
53
|
items: []
|
|
54
54
|
}]);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function J(e, t, n, r, i) {
|
|
57
57
|
let a = e.find((e) => e.id === t);
|
|
58
58
|
if (!a?.groups) return;
|
|
59
59
|
let o = a.groups.find((e) => e.id === n);
|
|
@@ -61,10 +61,10 @@ function Y(e, t, n, r, i) {
|
|
|
61
61
|
let s = o.collections.find((e) => e.id === r);
|
|
62
62
|
s && i(s.items);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(
|
|
64
|
+
function he(e, n, r, i, a, o, s, c) {
|
|
65
|
+
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(me(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 = {
|
|
66
66
|
addTab(e) {
|
|
67
|
-
p.value.push(
|
|
67
|
+
p.value.push(pe(e)), f.value ||= e.id;
|
|
68
68
|
},
|
|
69
69
|
removeTab(e) {
|
|
70
70
|
p.value = p.value.filter((t) => t.id !== e), f.value === e && (f.value = S.value[0]?.id ?? "");
|
|
@@ -82,7 +82,7 @@ function X(e, n, r, i, a, o, s, c) {
|
|
|
82
82
|
},
|
|
83
83
|
addGroup(e, t) {
|
|
84
84
|
let n = p.value.find((t) => t.id === e);
|
|
85
|
-
n && (n.groups ??= [],
|
|
85
|
+
n && (n.groups ??= [], q(t), n.groups.push(K(t)));
|
|
86
86
|
},
|
|
87
87
|
removeGroup(e, t) {
|
|
88
88
|
let n = p.value.find((t) => t.id === e);
|
|
@@ -97,16 +97,16 @@ function X(e, n, r, i, a, o, s, c) {
|
|
|
97
97
|
n && (n.visible = !1);
|
|
98
98
|
},
|
|
99
99
|
addItem(e, t, n, r) {
|
|
100
|
-
|
|
100
|
+
J(p.value, e, t, n, (e) => e.push(G(r)));
|
|
101
101
|
},
|
|
102
102
|
removeItem(e, t, n, r) {
|
|
103
|
-
|
|
103
|
+
J(p.value, e, t, n, (e) => {
|
|
104
104
|
let t = e.findIndex((e) => e.id === r);
|
|
105
105
|
t >= 0 && e.splice(t, 1);
|
|
106
106
|
});
|
|
107
107
|
},
|
|
108
108
|
updateItem(e, t, n, r, i) {
|
|
109
|
-
|
|
109
|
+
J(p.value, e, t, n, (e) => {
|
|
110
110
|
let t = e.find((e) => e.id === r);
|
|
111
111
|
t && Object.assign(t, i);
|
|
112
112
|
});
|
|
@@ -155,7 +155,7 @@ function X(e, n, r, i, a, o, s, c) {
|
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/ribbon/modules/RibbonBackstage.vue?vue&type=script&setup=true&lang.ts
|
|
158
|
-
var
|
|
158
|
+
var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backstage__content" }, ve = { key: 0 }, ye = { key: 1 }, Y = /* @__PURE__ */ l({
|
|
159
159
|
__name: "RibbonBackstage",
|
|
160
160
|
props: {
|
|
161
161
|
open: { type: Boolean },
|
|
@@ -170,7 +170,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
170
170
|
function d() {
|
|
171
171
|
u("close");
|
|
172
172
|
}
|
|
173
|
-
return (t, o) => (v(), n(E(
|
|
173
|
+
return (t, o) => (v(), n(E(j), {
|
|
174
174
|
"model-value": l.open,
|
|
175
175
|
size: "100%",
|
|
176
176
|
"with-header": !1,
|
|
@@ -184,24 +184,24 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
184
184
|
title: l.title,
|
|
185
185
|
description: l.description,
|
|
186
186
|
size: l.size
|
|
187
|
-
}) : (v(), i(e, { key: 1 }, [a("aside",
|
|
187
|
+
}) : (v(), i(e, { key: 1 }, [a("aside", ge, [c(E(ee), {
|
|
188
188
|
type: "primary",
|
|
189
189
|
onClick: d
|
|
190
190
|
}, {
|
|
191
191
|
default: O(() => [s(w(l.backLabel), 1)]),
|
|
192
192
|
_: 1
|
|
193
|
-
})]), a("section",
|
|
193
|
+
})]), a("section", _e, [l.title ? (v(), i("h2", ve, w(l.title), 1)) : r("", !0), l.description ? (v(), i("p", ye, w(l.description), 1)) : r("", !0)])], 64))], 2)]),
|
|
194
194
|
_: 3
|
|
195
195
|
}, 8, ["model-value"]));
|
|
196
196
|
}
|
|
197
|
-
}),
|
|
197
|
+
}), be = {
|
|
198
198
|
class: "ml-ribbon-tabs",
|
|
199
199
|
role: "tablist"
|
|
200
|
-
},
|
|
200
|
+
}, X = [
|
|
201
201
|
"aria-selected",
|
|
202
202
|
"disabled",
|
|
203
203
|
"onClick"
|
|
204
|
-
],
|
|
204
|
+
], xe = /* @__PURE__ */ l({
|
|
205
205
|
__name: "RibbonTabs",
|
|
206
206
|
props: {
|
|
207
207
|
tabs: {},
|
|
@@ -217,7 +217,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
217
217
|
triggerEl: t.currentTarget instanceof HTMLElement ? t.currentTarget : null
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
return (t, r) => (v(), i("div",
|
|
220
|
+
return (t, r) => (v(), i("div", be, [(v(!0), i(e, null, x(s.value, (e) => (v(), i("button", {
|
|
221
221
|
key: e.id,
|
|
222
222
|
type: "button",
|
|
223
223
|
class: m(["ml-ribbon-tab", { "is-active": n.activeTab === e.id }]),
|
|
@@ -225,9 +225,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
225
225
|
"aria-selected": n.activeTab === e.id,
|
|
226
226
|
disabled: a.disabled,
|
|
227
227
|
onClick: (t) => c(e.id, t)
|
|
228
|
-
}, w(e.title), 11,
|
|
228
|
+
}, w(e.title), 11, X))), 128))]));
|
|
229
229
|
}
|
|
230
|
-
}),
|
|
230
|
+
}), Se = { class: "ml-ribbon-contextual-tabs" }, Ce = { class: "ml-ribbon-contextual-tabs__normal" }, we = { class: "ml-ribbon-contextual-tabs__ctx" }, Te = /* @__PURE__ */ l({
|
|
231
231
|
__name: "RibbonContextualTabs",
|
|
232
232
|
props: {
|
|
233
233
|
tabs: {},
|
|
@@ -238,7 +238,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
238
238
|
emits: ["select"],
|
|
239
239
|
setup(t, { emit: n }) {
|
|
240
240
|
let r = t, o = n;
|
|
241
|
-
return (n, s) => (v(), i("div",
|
|
241
|
+
return (n, s) => (v(), i("div", Se, [a("div", Ce, [c(xe, {
|
|
242
242
|
tabs: r.tabs.filter((e) => !e.contextual),
|
|
243
243
|
"active-tab": t.activeTab,
|
|
244
244
|
disabled: r.disabled,
|
|
@@ -247,11 +247,11 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
247
247
|
"tabs",
|
|
248
248
|
"active-tab",
|
|
249
249
|
"disabled"
|
|
250
|
-
])]), a("div",
|
|
250
|
+
])]), a("div", we, [(v(!0), i(e, null, x(r.tabs.filter((e) => e.contextual), (e) => (v(), i("section", {
|
|
251
251
|
key: e.id,
|
|
252
252
|
class: "ml-ribbon-contextual-tabs__block",
|
|
253
253
|
style: h({ "--ctx-color": e.contextualColor || "#67c23a" })
|
|
254
|
-
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(
|
|
254
|
+
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(xe, {
|
|
255
255
|
tabs: [e],
|
|
256
256
|
"active-tab": t.activeTab,
|
|
257
257
|
disabled: r.disabled,
|
|
@@ -262,7 +262,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
262
262
|
"disabled"
|
|
263
263
|
])], 4))), 128))])]));
|
|
264
264
|
}
|
|
265
|
-
}),
|
|
265
|
+
}), Ee = ["disabled"], De = /* @__PURE__ */ l({
|
|
266
266
|
__name: "RibbonFileMenu",
|
|
267
267
|
props: {
|
|
268
268
|
items: {},
|
|
@@ -273,7 +273,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
273
273
|
},
|
|
274
274
|
emits: ["select", "open-backstage"],
|
|
275
275
|
setup(o, { emit: l }) {
|
|
276
|
-
let u = o, d = l, f = b(!1), p =
|
|
276
|
+
let u = o, d = l, f = b(!1), p = se("size", ""), h = t(() => p.value || "default"), g = t(() => `ml-ribbon-file-menu-dropdown ml-ribbon-popper ml-ribbon-popper--size-${h.value}`);
|
|
277
277
|
function _(e) {
|
|
278
278
|
f.value = e;
|
|
279
279
|
}
|
|
@@ -286,21 +286,21 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
286
286
|
}
|
|
287
287
|
return D(() => u.disabled, (e) => {
|
|
288
288
|
e && (f.value = !1);
|
|
289
|
-
}), (t, o) => (v(), n(E(
|
|
289
|
+
}), (t, o) => (v(), n(E(M), {
|
|
290
290
|
trigger: "click",
|
|
291
291
|
disabled: u.disabled,
|
|
292
292
|
"popper-class": g.value,
|
|
293
293
|
onCommand: y,
|
|
294
294
|
onVisibleChange: _
|
|
295
295
|
}, {
|
|
296
|
-
dropdown: O(() => [c(E(
|
|
297
|
-
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(
|
|
296
|
+
dropdown: O(() => [c(E(P), null, {
|
|
297
|
+
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(N), {
|
|
298
298
|
key: 0,
|
|
299
299
|
command: "__backstage"
|
|
300
300
|
}, {
|
|
301
301
|
default: O(() => [s(w(u.openBackstageLabel), 1)]),
|
|
302
302
|
_: 1
|
|
303
|
-
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(
|
|
303
|
+
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(N), {
|
|
304
304
|
key: e.id,
|
|
305
305
|
divided: u.showOpenBackstage !== !1 && t === 0,
|
|
306
306
|
command: e.id,
|
|
@@ -319,11 +319,11 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
319
319
|
type: "button",
|
|
320
320
|
class: m(["ml-ribbon-tab ml-ribbon-tab--file", { "is-active": f.value }]),
|
|
321
321
|
disabled: u.disabled
|
|
322
|
-
}, w(u.label), 11,
|
|
322
|
+
}, w(u.label), 11, Ee)]),
|
|
323
323
|
_: 1
|
|
324
324
|
}, 8, ["disabled", "popper-class"]));
|
|
325
325
|
}
|
|
326
|
-
}),
|
|
326
|
+
}), Oe = /* @__PURE__ */ l({
|
|
327
327
|
__name: "RibbonCollection",
|
|
328
328
|
props: {
|
|
329
329
|
id: {},
|
|
@@ -337,10 +337,10 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
337
337
|
style: h(r.value)
|
|
338
338
|
}, [S(e.$slots, "default")], 6));
|
|
339
339
|
}
|
|
340
|
-
}),
|
|
340
|
+
}), ke = {
|
|
341
341
|
key: 3,
|
|
342
342
|
class: "ml-ribbon-item-host__label ml-ribbon-button__label"
|
|
343
|
-
},
|
|
343
|
+
}, Ae = /* @__PURE__ */ l({
|
|
344
344
|
name: "MlRibbonButton",
|
|
345
345
|
__name: "RibbonButton",
|
|
346
346
|
props: {
|
|
@@ -389,7 +389,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
389
389
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
390
390
|
style: h(_.value),
|
|
391
391
|
"aria-hidden": "true"
|
|
392
|
-
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(
|
|
392
|
+
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(F), {
|
|
393
393
|
key: 1,
|
|
394
394
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
395
395
|
style: h(_.value)
|
|
@@ -402,7 +402,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
402
402
|
style: h(_.value),
|
|
403
403
|
"aria-hidden": "true"
|
|
404
404
|
}, null, 6)) : r("", !0),
|
|
405
|
-
u.value ? (v(), i("span",
|
|
405
|
+
u.value ? (v(), i("span", ke, [S(t.$slots, "label", {}, () => [s(w(l.value), 1)])])) : r("", !0),
|
|
406
406
|
S(t.$slots, "default")
|
|
407
407
|
]),
|
|
408
408
|
_: 3
|
|
@@ -415,10 +415,10 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
415
415
|
"aria-label"
|
|
416
416
|
]));
|
|
417
417
|
}
|
|
418
|
-
}),
|
|
418
|
+
}), je = ["data-id"], Me = {
|
|
419
419
|
key: 0,
|
|
420
420
|
class: "ml-ribbon-button-group__label"
|
|
421
|
-
},
|
|
421
|
+
}, Ne = { class: "ml-ribbon-button-group__text" }, Pe = /* @__PURE__ */ l({
|
|
422
422
|
__name: "RibbonButtonGroup",
|
|
423
423
|
props: {
|
|
424
424
|
id: {},
|
|
@@ -475,8 +475,8 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
475
475
|
"ml-ribbon-button-group--equal-width": !t.wrap && t.equalWidth
|
|
476
476
|
}]),
|
|
477
477
|
"data-id": t.id
|
|
478
|
-
}, [!t.hideLabel && t.label ? (v(), i("div",
|
|
479
|
-
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(
|
|
478
|
+
}, [!t.hideLabel && t.label ? (v(), i("div", Me, w(t.label), 1)) : r("", !0), c(E(A), null, {
|
|
479
|
+
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(z), {
|
|
480
480
|
key: String(e.value),
|
|
481
481
|
content: g(e),
|
|
482
482
|
disabled: !g(e),
|
|
@@ -485,7 +485,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
485
485
|
placement: "top",
|
|
486
486
|
effect: "dark"
|
|
487
487
|
}, {
|
|
488
|
-
default: O(() => [c(
|
|
488
|
+
default: O(() => [c(Ae, {
|
|
489
489
|
id: String(e.value),
|
|
490
490
|
class: "ml-ribbon-button-group__button",
|
|
491
491
|
label: e.label,
|
|
@@ -498,7 +498,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
498
498
|
onClick: (t) => d(e.value)
|
|
499
499
|
}, o({ _: 2 }, [f(e.label) ? {
|
|
500
500
|
name: "label",
|
|
501
|
-
fn: O(() => [a("span",
|
|
501
|
+
fn: O(() => [a("span", Ne, w(e.label), 1)]),
|
|
502
502
|
key: "0"
|
|
503
503
|
} : void 0]), 1032, [
|
|
504
504
|
"id",
|
|
@@ -519,12 +519,12 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
519
519
|
"hide-after"
|
|
520
520
|
]))), 128))]),
|
|
521
521
|
_: 1
|
|
522
|
-
})], 10,
|
|
522
|
+
})], 10, je));
|
|
523
523
|
}
|
|
524
|
-
}),
|
|
524
|
+
}), Fe = { class: "ml-ribbon-item-host__content ml-ribbon-dropdown__content" }, Ie = { class: "ml-ribbon-item-host__text-row ml-ribbon-dropdown__text-row" }, Le = {
|
|
525
525
|
key: 0,
|
|
526
526
|
class: "ml-ribbon-item-host__label ml-ribbon-dropdown__label"
|
|
527
|
-
},
|
|
527
|
+
}, Z = { class: "ml-ribbon-dropdown-item__content" }, Re = { class: "ml-ribbon-dropdown-item__label" }, ze = /* @__PURE__ */ l({
|
|
528
528
|
name: "MlRibbonDropdown",
|
|
529
529
|
__name: "RibbonDropdown",
|
|
530
530
|
props: {
|
|
@@ -556,125 +556,125 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
556
556
|
"tooltip-change"
|
|
557
557
|
],
|
|
558
558
|
setup(o, { emit: l }) {
|
|
559
|
-
let u = o, d = l, f =
|
|
559
|
+
let u = o, d = l, f = se("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) => V(e) === g.value) ?? null), T = t(() => {
|
|
560
560
|
if (y.value && u.syncLabelWithSelection) {
|
|
561
|
-
let e =
|
|
561
|
+
let e = le(y.value);
|
|
562
562
|
if (e) return e;
|
|
563
563
|
}
|
|
564
|
-
return
|
|
564
|
+
return fe(u.label) ?? u.id;
|
|
565
565
|
}), D = t(() => !u.hideLabel && T.value.length > 0), A = t(() => {
|
|
566
566
|
if (y.value) {
|
|
567
|
-
let e =
|
|
567
|
+
let e = oe(y.value);
|
|
568
568
|
if (e) return e;
|
|
569
569
|
}
|
|
570
570
|
return !u.icon || typeof u.icon == "string" ? null : u.icon;
|
|
571
571
|
}), te = t(() => {
|
|
572
572
|
if (y.value) {
|
|
573
|
-
let e =
|
|
573
|
+
let e = R(y.value);
|
|
574
574
|
if (e) return e;
|
|
575
575
|
}
|
|
576
576
|
if (typeof u.icon != "string") return null;
|
|
577
577
|
let e = u.icon.trim();
|
|
578
578
|
return e.length > 0 ? e : null;
|
|
579
|
-
}), ne = t(() => !!(A.value || te.value)),
|
|
579
|
+
}), ne = t(() => !!(A.value || te.value)), re = t(() => de(y.value) ?? fe(u.tooltip) ?? fe(T.value) ?? fe(u.label) ?? U(u.id)), j = t(() => [
|
|
580
580
|
"ml-ribbon-dropdown-menu",
|
|
581
581
|
"ml-ribbon-popper",
|
|
582
582
|
`ml-ribbon-popper--size-${p.value}`,
|
|
583
583
|
u.popperClass
|
|
584
584
|
].filter(Boolean).join(" "));
|
|
585
|
-
function
|
|
585
|
+
function I(e) {
|
|
586
586
|
if (u.disabled) {
|
|
587
587
|
h.value = !1;
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
590
|
h.value = e;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function ie() {
|
|
593
593
|
u.disabled || (h.value = !h.value);
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
u.disabled || (g.value = e, d("tooltip-change",
|
|
595
|
+
function ae(e) {
|
|
596
|
+
u.disabled || (g.value = e, d("tooltip-change", de(y.value) ?? re.value), d("command", e), h.value = !1);
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function L() {
|
|
599
599
|
if (u.disabled) return;
|
|
600
600
|
let e = y.value;
|
|
601
601
|
if (!e) {
|
|
602
602
|
d("click");
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
|
-
d("command",
|
|
605
|
+
d("command", V(e));
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function oe(e) {
|
|
608
608
|
if (!e || typeof e != "object") return null;
|
|
609
609
|
let t = e.icon;
|
|
610
610
|
return !t || typeof t == "string" ? null : t;
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function R(e) {
|
|
613
613
|
if (!e || typeof e != "object") return null;
|
|
614
614
|
let t = e.icon;
|
|
615
615
|
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function V(e) {
|
|
618
618
|
if (!(!e || typeof e != "object")) return e.value;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
let t =
|
|
620
|
+
function ce(e) {
|
|
621
|
+
let t = V(e);
|
|
622
622
|
if (typeof t == "string" || typeof t == "number" || t && typeof t == "object") return t;
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function le(e) {
|
|
625
625
|
if (!e || typeof e != "object") return;
|
|
626
626
|
let t = e.label;
|
|
627
627
|
return typeof t == "string" ? t : void 0;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
if (typeof e == "string") return
|
|
629
|
+
function ue(e) {
|
|
630
|
+
if (typeof e == "string") return U(e);
|
|
631
631
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
if (!(!e || typeof e != "object")) return
|
|
633
|
+
function de(e) {
|
|
634
|
+
if (!(!e || typeof e != "object")) return fe(e.tooltip) ?? le(e) ?? ue(V(e));
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function fe(e) {
|
|
637
637
|
if (typeof e != "string") return;
|
|
638
638
|
let t = e.trim();
|
|
639
639
|
return t.length > 0 ? t : void 0;
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function U(e) {
|
|
642
642
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
643
643
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
644
644
|
}
|
|
645
|
-
return (t, l) => (v(), n(E(
|
|
645
|
+
return (t, l) => (v(), n(E(M), {
|
|
646
646
|
class: m(["ml-ribbon-dropdown", [`ml-ribbon-dropdown--item-${o.itemSize}`, { "is-label-hidden": o.hideLabel }]]),
|
|
647
647
|
trigger: "click",
|
|
648
648
|
disabled: o.disabled,
|
|
649
|
-
"popper-class":
|
|
650
|
-
onVisibleChange:
|
|
651
|
-
onCommand:
|
|
649
|
+
"popper-class": j.value,
|
|
650
|
+
onVisibleChange: I,
|
|
651
|
+
onCommand: ae
|
|
652
652
|
}, {
|
|
653
|
-
dropdown: O(() => [c(E(
|
|
654
|
-
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(
|
|
655
|
-
key: String(
|
|
656
|
-
command:
|
|
653
|
+
dropdown: O(() => [c(E(P), null, {
|
|
654
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(N), {
|
|
655
|
+
key: String(V(e)),
|
|
656
|
+
command: ce(e),
|
|
657
657
|
disabled: e.disabled === !0
|
|
658
658
|
}, {
|
|
659
|
-
default: O(() => [c(E(
|
|
660
|
-
content:
|
|
661
|
-
disabled: !
|
|
659
|
+
default: O(() => [c(E(z), {
|
|
660
|
+
content: de(e),
|
|
661
|
+
disabled: !de(e),
|
|
662
662
|
"show-after": o.tooltipShowAfter,
|
|
663
663
|
"hide-after": o.tooltipHideAfter,
|
|
664
664
|
placement: "top",
|
|
665
665
|
effect: "dark"
|
|
666
666
|
}, {
|
|
667
|
-
default: O(() => [a("span",
|
|
667
|
+
default: O(() => [a("span", Z, [S(t.$slots, "option", { option: e }, () => [oe(e) ? (v(), n(E(F), {
|
|
668
668
|
key: 0,
|
|
669
669
|
class: "ml-ribbon-dropdown-item__icon"
|
|
670
670
|
}, {
|
|
671
|
-
default: O(() => [(v(), n(C(
|
|
671
|
+
default: O(() => [(v(), n(C(oe(e))))]),
|
|
672
672
|
_: 2
|
|
673
|
-
}, 1024)) :
|
|
673
|
+
}, 1024)) : R(e) ? (v(), i("i", {
|
|
674
674
|
key: 1,
|
|
675
|
-
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class",
|
|
675
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", R(e)]),
|
|
676
676
|
"aria-hidden": "true"
|
|
677
|
-
}, null, 2)) : r("", !0), a("span",
|
|
677
|
+
}, null, 2)) : r("", !0), a("span", Re, w(le(e)), 1)])])]),
|
|
678
678
|
_: 2
|
|
679
679
|
}, 1032, [
|
|
680
680
|
"content",
|
|
@@ -689,25 +689,25 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
689
689
|
default: O(() => [c(E(ee), {
|
|
690
690
|
type: "default",
|
|
691
691
|
disabled: o.disabled,
|
|
692
|
-
"aria-label":
|
|
693
|
-
onClick:
|
|
692
|
+
"aria-label": re.value,
|
|
693
|
+
onClick: ie
|
|
694
694
|
}, {
|
|
695
|
-
default: O(() => [a("span",
|
|
695
|
+
default: O(() => [a("span", Fe, [t.$slots.icon || ne.value ? (v(), i("span", {
|
|
696
696
|
key: 0,
|
|
697
697
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class": te.value && !A.value && !t.$slots.icon }]),
|
|
698
|
-
onClick: k(
|
|
699
|
-
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [A.value ? (v(), n(E(
|
|
698
|
+
onClick: k(L, ["stop"])
|
|
699
|
+
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [A.value ? (v(), n(E(F), { key: 0 }, {
|
|
700
700
|
default: O(() => [(v(), n(C(A.value)))]),
|
|
701
701
|
_: 1
|
|
702
702
|
})) : te.value ? (v(), i("i", {
|
|
703
703
|
key: 1,
|
|
704
704
|
class: m(te.value),
|
|
705
705
|
"aria-hidden": "true"
|
|
706
|
-
}, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span",
|
|
706
|
+
}, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span", Ie, [D.value ? (v(), i("span", Le, [S(t.$slots, "label", {
|
|
707
707
|
selectedOption: y.value,
|
|
708
708
|
label: T.value
|
|
709
|
-
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(
|
|
710
|
-
default: O(() => [(v(), n(C(h.value ? E(
|
|
709
|
+
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(F), { class: m(["ml-ribbon-item-host__dropdown-arrow ml-ribbon-dropdown__arrow", { "is-open": h.value }]) }, {
|
|
710
|
+
default: O(() => [(v(), n(C(h.value ? E(H) : E(B))))]),
|
|
711
711
|
_: 1
|
|
712
712
|
}, 8, ["class"])])])]),
|
|
713
713
|
_: 3
|
|
@@ -719,10 +719,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
719
719
|
"popper-class"
|
|
720
720
|
]));
|
|
721
721
|
}
|
|
722
|
-
}),
|
|
722
|
+
}), Be = {
|
|
723
723
|
key: 0,
|
|
724
724
|
class: "ml-ribbon-gallery__title"
|
|
725
|
-
},
|
|
725
|
+
}, Ve = { class: "ml-ribbon-gallery__categories" }, He = {
|
|
726
|
+
key: 0,
|
|
727
|
+
class: "ml-ribbon-gallery__category-title"
|
|
728
|
+
}, Ue = { class: "ml-ribbon-gallery__grid" }, We = ["disabled", "onClick"], Q = { class: "ml-ribbon-gallery__preview" }, Ge = { class: "ml-ribbon-gallery__label" }, Ke = /* @__PURE__ */ l({
|
|
726
729
|
__name: "RibbonGallery",
|
|
727
730
|
props: {
|
|
728
731
|
id: {},
|
|
@@ -735,32 +738,36 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
735
738
|
previewFallback: {}
|
|
736
739
|
},
|
|
737
740
|
emits: ["select"],
|
|
738
|
-
setup(
|
|
739
|
-
let
|
|
740
|
-
function
|
|
741
|
-
|
|
741
|
+
setup(n, { emit: o }) {
|
|
742
|
+
let s = n, c = o, l = b(""), u = t(() => s.categories.filter((e) => e.items.length > 0).length);
|
|
743
|
+
function d(e) {
|
|
744
|
+
let t = s.label.trim().toLowerCase(), n = e.title.trim().toLowerCase();
|
|
745
|
+
return u.value > 1 || !t || n !== t;
|
|
746
|
+
}
|
|
747
|
+
function f(e) {
|
|
748
|
+
s.disabled || (l.value = e, c("select", e));
|
|
742
749
|
}
|
|
743
|
-
return (
|
|
744
|
-
key:
|
|
750
|
+
return (t, o) => (v(), i("div", { class: m(["ml-ribbon-gallery", { "is-disabled": n.disabled }]) }, [n.label ? (v(), i("div", Be, w(n.label), 1)) : r("", !0), a("div", Ve, [(v(!0), i(e, null, x(n.categories, (t) => (v(), i("section", {
|
|
751
|
+
key: t.id,
|
|
745
752
|
class: "ml-ribbon-gallery__category"
|
|
746
|
-
}, [
|
|
753
|
+
}, [d(t) ? (v(), i("h4", He, w(t.title), 1)) : r("", !0), a("div", Ue, [(v(!0), i(e, null, x(t.items, (e) => (v(), i("button", {
|
|
747
754
|
key: e.id,
|
|
748
755
|
type: "button",
|
|
749
|
-
class: m(["ml-ribbon-gallery__item", { "is-selected":
|
|
750
|
-
disabled:
|
|
751
|
-
onClick: (t) =>
|
|
752
|
-
}, [a("div",
|
|
756
|
+
class: m(["ml-ribbon-gallery__item", { "is-selected": l.value === e.id }]),
|
|
757
|
+
disabled: n.disabled,
|
|
758
|
+
onClick: (t) => f(e.id)
|
|
759
|
+
}, [a("div", Q, w(e.preview ?? s.previewFallback), 1), a("div", Ge, w(e.label), 1)], 10, We))), 128))])]))), 128))])], 2));
|
|
753
760
|
}
|
|
754
|
-
}),
|
|
761
|
+
}), qe = ["data-id"], Je = {
|
|
755
762
|
key: 0,
|
|
756
763
|
class: "ml-ribbon-segmented__label"
|
|
757
|
-
},
|
|
764
|
+
}, Ye = ["data-option-value"], Xe = {
|
|
758
765
|
key: 2,
|
|
759
766
|
class: "ml-ribbon-segmented__option-label"
|
|
760
|
-
},
|
|
767
|
+
}, Ze = {
|
|
761
768
|
key: 3,
|
|
762
769
|
class: "ml-ribbon-segmented__option-sr-label"
|
|
763
|
-
},
|
|
770
|
+
}, $ = /* @__PURE__ */ l({
|
|
764
771
|
__name: "RibbonSegmented",
|
|
765
772
|
props: {
|
|
766
773
|
id: {},
|
|
@@ -816,7 +823,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
816
823
|
return (t, o) => (v(), i("div", {
|
|
817
824
|
class: "ml-ribbon-segmented",
|
|
818
825
|
"data-id": e.id
|
|
819
|
-
}, [d.value ? (v(), i("div",
|
|
826
|
+
}, [d.value ? (v(), i("div", Je, w(u.value), 1)) : r("", !0), c(E(L), {
|
|
820
827
|
class: "ml-ribbon-segmented__control",
|
|
821
828
|
options: e.options,
|
|
822
829
|
"model-value": e.modelValue,
|
|
@@ -829,7 +836,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
829
836
|
default: O(({ item: e }) => [a("span", {
|
|
830
837
|
class: "ml-ribbon-segmented__option",
|
|
831
838
|
"data-option-value": y(e)
|
|
832
|
-
}, [h(e) ? (v(), n(E(
|
|
839
|
+
}, [h(e) ? (v(), n(E(F), {
|
|
833
840
|
key: 0,
|
|
834
841
|
class: "ml-ribbon-segmented__option-icon",
|
|
835
842
|
"aria-hidden": "true"
|
|
@@ -840,7 +847,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
840
847
|
key: 1,
|
|
841
848
|
class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", g(e)]),
|
|
842
849
|
"aria-hidden": "true"
|
|
843
|
-
}, null, 2)) : r("", !0), _(e) ? (v(), i("span",
|
|
850
|
+
}, null, 2)) : r("", !0), _(e) ? (v(), i("span", Xe, w(p(e)), 1)) : (v(), i("span", Ze, w(p(e)), 1))], 8, Ye)]),
|
|
844
851
|
_: 1
|
|
845
852
|
}, 8, [
|
|
846
853
|
"options",
|
|
@@ -849,9 +856,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
849
856
|
"block",
|
|
850
857
|
"disabled",
|
|
851
858
|
"aria-label"
|
|
852
|
-
])], 8,
|
|
859
|
+
])], 8, qe));
|
|
853
860
|
}
|
|
854
|
-
}),
|
|
861
|
+
}), Qe = /* @__PURE__ */ l({
|
|
855
862
|
__name: "RibbonToggleButton",
|
|
856
863
|
props: {
|
|
857
864
|
id: {},
|
|
@@ -885,7 +892,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
885
892
|
let e = !o.value;
|
|
886
893
|
o.value = e, a("change", e);
|
|
887
894
|
}
|
|
888
|
-
return (t, r) => (v(), n(
|
|
895
|
+
return (t, r) => (v(), n(Ae, {
|
|
889
896
|
id: e.id,
|
|
890
897
|
class: m(["ml-ribbon-toggle", { "is-active": s.value }]),
|
|
891
898
|
icon: c.value,
|
|
@@ -906,7 +913,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
906
913
|
"aria-pressed"
|
|
907
914
|
]));
|
|
908
915
|
}
|
|
909
|
-
}),
|
|
916
|
+
}), $e = ["data-template-id", "aria-disabled"], et = /* @__PURE__ */ l({
|
|
910
917
|
__name: "RibbonTemplateItem",
|
|
911
918
|
props: {
|
|
912
919
|
id: {},
|
|
@@ -921,12 +928,12 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
921
928
|
}, [S(t.$slots, "default", {
|
|
922
929
|
item: e.item,
|
|
923
930
|
disabled: e.disabled
|
|
924
|
-
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8,
|
|
931
|
+
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8, $e));
|
|
925
932
|
}
|
|
926
|
-
}),
|
|
933
|
+
}), tt = ["data-item-id"], nt = {
|
|
927
934
|
key: 0,
|
|
928
935
|
class: "ml-ribbon-item-host__keytip"
|
|
929
|
-
},
|
|
936
|
+
}, rt = /* @__PURE__ */ l({
|
|
930
937
|
__name: "RibbonItemHost",
|
|
931
938
|
props: {
|
|
932
939
|
id: {},
|
|
@@ -937,101 +944,116 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
937
944
|
},
|
|
938
945
|
emits: ["item-click"],
|
|
939
946
|
setup(o, { emit: c }) {
|
|
940
|
-
let l = o,
|
|
941
|
-
if (!
|
|
942
|
-
let e =
|
|
947
|
+
let l = o, p = c, g = u(fe, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y = se("size", ""), k = t(() => y.value || "default"), ee = t(() => je(g?.tooltipShowAfter.value, 1e3)), A = t(() => je(g?.tooltipHideAfter.value, 0)), re = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${k.value}`), j = t(() => l.item.props?.icon || l.item.icon), M = t(() => l.item.hideLabel !== !0), N = b(void 0), P = t(() => l.item.type === "dropdown" && N.value ? N.value : ke(l.item.tooltip) ?? ke(l.item.label) ?? Le(l.item) ?? Z(l.item.id)), F = t(() => l.item.type !== "buttonGroup"), ae = t(() => !F.value || !P.value), L = t(() => P.value ?? l.item.id), R = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), B = t(() => {
|
|
948
|
+
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !R.value) return !1;
|
|
949
|
+
let e = g.keyTipsSequence.value.toLowerCase();
|
|
943
950
|
return e ? R.value.toLowerCase().startsWith(e) : !0;
|
|
944
|
-
}),
|
|
951
|
+
}), V = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), H = t(() => l.item.props?.modelValue), ce = t(() => l.item.props?.activeLabel), le = t(() => l.item.props?.inactiveLabel), ue = t(() => {
|
|
945
952
|
let e = l.item.props?.component;
|
|
946
|
-
return !e || typeof e == "string" ? null : e;
|
|
947
|
-
}),
|
|
953
|
+
return !e || typeof e == "string" ? null : d(T(e));
|
|
954
|
+
}), de = t(() => {
|
|
948
955
|
let e = l.item.props?.componentProps;
|
|
949
956
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
950
|
-
}),
|
|
957
|
+
}), U = t(() => l.item.props?.wrap !== !1), W = t(() => l.item.props?.equalWidth === !0), G = t(() => {
|
|
951
958
|
let e = l.item.props?.buttonSize;
|
|
952
959
|
if (e === "large" || e === "default" || e === "small") return e;
|
|
953
|
-
}),
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
960
|
+
}), K = t(() => Fe(l.item.props?.iconSize)), pe = t(() => Me(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), me = t(() => l.item.props?.modelValue), q = t(() => Me(l.item.props?.width ?? l.item.props?.inputNumberWidth, "96px")), J = t(() => l.item.props?.modelValue), he = t(() => {
|
|
961
|
+
let e = { ...l.item.props ?? {} };
|
|
962
|
+
return delete e.modelValue, delete e.width, delete e.inputNumberWidth, delete e.emitValueOnChange, delete e.options, delete e.component, delete e.componentProps, e;
|
|
963
|
+
}), ge = t(() => Ie(l.item.props?.labelWrapLines)), _e = t(() => Ne(l.item.props?.labelWrapWidth)), ve = t(() => l.item.type === "button" && l.item.size === "large" && M.value && (ge.value ?? 0) > 1), ye = t(() => {
|
|
964
|
+
if (!ve.value) return {};
|
|
965
|
+
let e = { "--ml-rb-item-label-max-lines": String(ge.value ?? 2) };
|
|
966
|
+
return _e.value && (e["--ml-rb-item-label-wrap-width"] = _e.value), e;
|
|
957
967
|
});
|
|
958
968
|
D(() => l.item.id, () => {
|
|
959
|
-
|
|
969
|
+
N.value = void 0;
|
|
960
970
|
});
|
|
961
|
-
function
|
|
962
|
-
|
|
971
|
+
function Y() {
|
|
972
|
+
V.value || p("item-click", l.id);
|
|
963
973
|
}
|
|
964
|
-
function
|
|
965
|
-
if (!
|
|
974
|
+
function be(e) {
|
|
975
|
+
if (!V.value) {
|
|
966
976
|
if (typeof e == "string" || typeof e == "number") {
|
|
967
|
-
|
|
977
|
+
p("item-click", String(e));
|
|
968
978
|
return;
|
|
969
979
|
}
|
|
970
|
-
|
|
980
|
+
Y();
|
|
971
981
|
}
|
|
972
982
|
}
|
|
973
|
-
function
|
|
974
|
-
|
|
983
|
+
function X(e) {
|
|
984
|
+
N.value = e;
|
|
975
985
|
}
|
|
976
|
-
function
|
|
977
|
-
if (!
|
|
986
|
+
function xe(e) {
|
|
987
|
+
if (!V.value) {
|
|
978
988
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
979
|
-
|
|
989
|
+
p("item-click", String(e));
|
|
980
990
|
return;
|
|
981
991
|
}
|
|
982
|
-
|
|
992
|
+
Y();
|
|
983
993
|
}
|
|
984
994
|
}
|
|
985
|
-
function
|
|
986
|
-
if (
|
|
995
|
+
function Se(e) {
|
|
996
|
+
if (V.value) return;
|
|
987
997
|
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
988
998
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
989
|
-
|
|
999
|
+
p("item-click", String(t));
|
|
990
1000
|
return;
|
|
991
1001
|
}
|
|
992
|
-
|
|
1002
|
+
p("item-click", String(e));
|
|
993
1003
|
}
|
|
994
|
-
function
|
|
995
|
-
if (!
|
|
1004
|
+
function Ce(e) {
|
|
1005
|
+
if (!V.value) {
|
|
996
1006
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
997
|
-
|
|
1007
|
+
p("item-click", String(e));
|
|
998
1008
|
return;
|
|
999
1009
|
}
|
|
1000
|
-
|
|
1010
|
+
Y();
|
|
1001
1011
|
}
|
|
1002
1012
|
}
|
|
1003
|
-
function
|
|
1004
|
-
|
|
1013
|
+
function we(e) {
|
|
1014
|
+
V.value || p("item-click", e);
|
|
1015
|
+
}
|
|
1016
|
+
function Te(e) {
|
|
1017
|
+
if (!V.value) {
|
|
1005
1018
|
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1006
|
-
|
|
1019
|
+
p("item-click", String(e));
|
|
1007
1020
|
return;
|
|
1008
1021
|
}
|
|
1009
|
-
|
|
1022
|
+
Y();
|
|
1010
1023
|
}
|
|
1011
1024
|
}
|
|
1012
|
-
function
|
|
1013
|
-
if (!
|
|
1025
|
+
function Ee(e) {
|
|
1026
|
+
if (!V.value) {
|
|
1027
|
+
if (l.item.props?.emitValueOnChange === !0 && typeof e == "number" && Number.isFinite(e)) {
|
|
1028
|
+
p("item-click", String(e));
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1031
|
+
Y();
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
function De(e) {
|
|
1035
|
+
if (!V.value) {
|
|
1014
1036
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1015
|
-
|
|
1037
|
+
p("item-click", String(e));
|
|
1016
1038
|
return;
|
|
1017
1039
|
}
|
|
1018
|
-
|
|
1040
|
+
Y();
|
|
1019
1041
|
}
|
|
1020
1042
|
}
|
|
1021
|
-
function
|
|
1043
|
+
function Oe(e) {
|
|
1022
1044
|
if (!e || typeof e != "object") return;
|
|
1023
1045
|
let t = e.label;
|
|
1024
1046
|
return typeof t == "string" ? t : void 0;
|
|
1025
1047
|
}
|
|
1026
|
-
function
|
|
1048
|
+
function ke(e) {
|
|
1027
1049
|
if (typeof e != "string") return;
|
|
1028
1050
|
let t = e.trim();
|
|
1029
1051
|
return t.length > 0 ? t : void 0;
|
|
1030
1052
|
}
|
|
1031
|
-
function
|
|
1053
|
+
function je(e, t) {
|
|
1032
1054
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1033
1055
|
}
|
|
1034
|
-
function
|
|
1056
|
+
function Me(e, t) {
|
|
1035
1057
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1036
1058
|
if (typeof e == "string") {
|
|
1037
1059
|
let n = e.trim();
|
|
@@ -1039,35 +1061,35 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1039
1061
|
}
|
|
1040
1062
|
return t;
|
|
1041
1063
|
}
|
|
1042
|
-
function
|
|
1064
|
+
function Ne(e) {
|
|
1043
1065
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1044
1066
|
if (typeof e == "string") {
|
|
1045
1067
|
let t = e.trim();
|
|
1046
1068
|
return t ? t.toLowerCase() === "full" ? "100%" : t : void 0;
|
|
1047
1069
|
}
|
|
1048
1070
|
}
|
|
1049
|
-
function
|
|
1071
|
+
function Fe(e) {
|
|
1050
1072
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1051
1073
|
if (typeof e != "string") return;
|
|
1052
1074
|
let t = e.trim();
|
|
1053
1075
|
return t.length > 0 ? t : void 0;
|
|
1054
1076
|
}
|
|
1055
|
-
function
|
|
1077
|
+
function Ie(e) {
|
|
1056
1078
|
if (!(typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e))) return Math.max(1, Math.round(e));
|
|
1057
1079
|
}
|
|
1058
|
-
function
|
|
1059
|
-
let t =
|
|
1080
|
+
function Le(e) {
|
|
1081
|
+
let t = _.value.map((e) => Oe(e)).filter((e) => !!e);
|
|
1060
1082
|
if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
|
|
1061
1083
|
}
|
|
1062
|
-
function
|
|
1084
|
+
function Z(e) {
|
|
1063
1085
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1064
1086
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
1065
1087
|
}
|
|
1066
|
-
return (t, c) => (v(), n(E(
|
|
1067
|
-
content:
|
|
1068
|
-
disabled:
|
|
1069
|
-
"show-after":
|
|
1070
|
-
"hide-after":
|
|
1088
|
+
return (t, c) => (v(), n(E(z), {
|
|
1089
|
+
content: P.value,
|
|
1090
|
+
disabled: ae.value,
|
|
1091
|
+
"show-after": ee.value,
|
|
1092
|
+
"hide-after": A.value,
|
|
1071
1093
|
placement: "top",
|
|
1072
1094
|
effect: "dark"
|
|
1073
1095
|
}, {
|
|
@@ -1077,26 +1099,26 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1077
1099
|
`type-${o.item.type}`,
|
|
1078
1100
|
{
|
|
1079
1101
|
"is-label-hidden": o.item.hideLabel === !0,
|
|
1080
|
-
"is-label-wrap":
|
|
1102
|
+
"is-label-wrap": ve.value
|
|
1081
1103
|
}
|
|
1082
1104
|
]]),
|
|
1083
|
-
style: h(
|
|
1105
|
+
style: h(ye.value),
|
|
1084
1106
|
"data-item-id": o.id,
|
|
1085
1107
|
role: "group"
|
|
1086
|
-
}, [
|
|
1108
|
+
}, [B.value ? (v(), i("span", nt, w(R.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Pe, {
|
|
1087
1109
|
key: 1,
|
|
1088
1110
|
id: o.item.id,
|
|
1089
1111
|
label: o.item.label ?? "",
|
|
1090
1112
|
options: o.item.props?.options ?? [],
|
|
1091
1113
|
"hide-label": o.item.hideLabel === !0,
|
|
1092
|
-
wrap:
|
|
1114
|
+
wrap: U.value,
|
|
1093
1115
|
"equal-width": W.value,
|
|
1094
1116
|
"button-size": G.value,
|
|
1095
|
-
"icon-size":
|
|
1096
|
-
"tooltip-show-after":
|
|
1097
|
-
"tooltip-hide-after":
|
|
1098
|
-
disabled:
|
|
1099
|
-
onChange:
|
|
1117
|
+
"icon-size": K.value,
|
|
1118
|
+
"tooltip-show-after": ee.value,
|
|
1119
|
+
"tooltip-hide-after": A.value,
|
|
1120
|
+
disabled: V.value,
|
|
1121
|
+
onChange: Ce
|
|
1100
1122
|
}, null, 8, [
|
|
1101
1123
|
"id",
|
|
1102
1124
|
"label",
|
|
@@ -1109,7 +1131,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1109
1131
|
"tooltip-show-after",
|
|
1110
1132
|
"tooltip-hide-after",
|
|
1111
1133
|
"disabled"
|
|
1112
|
-
])) : o.item.type === "segmented" ? (v(), n(
|
|
1134
|
+
])) : o.item.type === "segmented" ? (v(), n($, {
|
|
1113
1135
|
key: 2,
|
|
1114
1136
|
id: o.item.id,
|
|
1115
1137
|
label: o.item.label ?? o.item.id,
|
|
@@ -1117,9 +1139,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1117
1139
|
"model-value": o.item.props?.modelValue,
|
|
1118
1140
|
direction: o.item.props?.direction ?? "horizontal",
|
|
1119
1141
|
block: o.item.props?.block === !0,
|
|
1120
|
-
disabled:
|
|
1142
|
+
disabled: V.value,
|
|
1121
1143
|
"hide-label": o.item.hideLabel === !0,
|
|
1122
|
-
onChange:
|
|
1144
|
+
onChange: xe
|
|
1123
1145
|
}, null, 8, [
|
|
1124
1146
|
"id",
|
|
1125
1147
|
"label",
|
|
@@ -1129,18 +1151,18 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1129
1151
|
"block",
|
|
1130
1152
|
"disabled",
|
|
1131
1153
|
"hide-label"
|
|
1132
|
-
])) : o.item.type === "toggle" ? (v(), n(
|
|
1154
|
+
])) : o.item.type === "toggle" ? (v(), n(Qe, {
|
|
1133
1155
|
key: 3,
|
|
1134
1156
|
id: o.item.id,
|
|
1135
1157
|
label: o.item.label ?? o.item.id,
|
|
1136
|
-
"model-value":
|
|
1158
|
+
"model-value": H.value,
|
|
1137
1159
|
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1138
1160
|
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1139
|
-
"active-label":
|
|
1140
|
-
"inactive-label":
|
|
1141
|
-
disabled:
|
|
1161
|
+
"active-label": ce.value,
|
|
1162
|
+
"inactive-label": le.value,
|
|
1163
|
+
disabled: V.value,
|
|
1142
1164
|
"hide-label": o.item.hideLabel === !0,
|
|
1143
|
-
onChange:
|
|
1165
|
+
onChange: Se
|
|
1144
1166
|
}, null, 8, [
|
|
1145
1167
|
"id",
|
|
1146
1168
|
"label",
|
|
@@ -1151,31 +1173,31 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1151
1173
|
"inactive-label",
|
|
1152
1174
|
"disabled",
|
|
1153
1175
|
"hide-label"
|
|
1154
|
-
])) : o.item.type === "gallery" ? (v(), n(
|
|
1176
|
+
])) : o.item.type === "gallery" ? (v(), n(Ke, {
|
|
1155
1177
|
key: 4,
|
|
1156
1178
|
id: o.item.id,
|
|
1157
1179
|
label: o.item.label ?? "",
|
|
1158
1180
|
categories: o.item.props?.categories ?? [],
|
|
1159
1181
|
"preview-fallback": l.galleryPreviewFallback,
|
|
1160
|
-
disabled:
|
|
1161
|
-
onSelect:
|
|
1182
|
+
disabled: V.value,
|
|
1183
|
+
onSelect: we
|
|
1162
1184
|
}, null, 8, [
|
|
1163
1185
|
"id",
|
|
1164
1186
|
"label",
|
|
1165
1187
|
"categories",
|
|
1166
1188
|
"preview-fallback",
|
|
1167
1189
|
"disabled"
|
|
1168
|
-
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(
|
|
1190
|
+
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(et, {
|
|
1169
1191
|
key: 5,
|
|
1170
1192
|
id: o.item.id,
|
|
1171
1193
|
item: o.item,
|
|
1172
|
-
disabled:
|
|
1194
|
+
disabled: V.value
|
|
1173
1195
|
}, {
|
|
1174
|
-
default: O(() => [
|
|
1196
|
+
default: O(() => [ue.value ? (v(), n(C(ue.value), f({ key: 0 }, de.value, {
|
|
1175
1197
|
item: o.item,
|
|
1176
1198
|
"group-id": o.groupId,
|
|
1177
|
-
disabled:
|
|
1178
|
-
"emit-item-click":
|
|
1199
|
+
disabled: V.value,
|
|
1200
|
+
"emit-item-click": De
|
|
1179
1201
|
}), null, 16, [
|
|
1180
1202
|
"item",
|
|
1181
1203
|
"group-id",
|
|
@@ -1183,29 +1205,29 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1183
1205
|
])) : S(t.$slots, "template", {
|
|
1184
1206
|
key: 1,
|
|
1185
1207
|
item: o.item,
|
|
1186
|
-
disabled:
|
|
1208
|
+
disabled: V.value
|
|
1187
1209
|
})]),
|
|
1188
1210
|
_: 3
|
|
1189
1211
|
}, 8, [
|
|
1190
1212
|
"id",
|
|
1191
1213
|
"item",
|
|
1192
1214
|
"disabled"
|
|
1193
|
-
])) : o.item.type === "dropdown" ? (v(), n(
|
|
1215
|
+
])) : o.item.type === "dropdown" ? (v(), n(ze, {
|
|
1194
1216
|
key: 6,
|
|
1195
1217
|
id: o.item.id,
|
|
1196
1218
|
label: o.item.label ?? o.item.id,
|
|
1197
1219
|
tooltip: o.item.tooltip,
|
|
1198
|
-
icon:
|
|
1220
|
+
icon: j.value,
|
|
1199
1221
|
options: o.item.props?.options ?? [],
|
|
1200
|
-
disabled:
|
|
1222
|
+
disabled: V.value,
|
|
1201
1223
|
"hide-label": o.item.hideLabel === !0,
|
|
1202
1224
|
"item-size": o.item.size ?? "medium",
|
|
1203
1225
|
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1204
|
-
"tooltip-show-after":
|
|
1205
|
-
"tooltip-hide-after":
|
|
1206
|
-
onCommand:
|
|
1207
|
-
onTooltipChange:
|
|
1208
|
-
onClick:
|
|
1226
|
+
"tooltip-show-after": ee.value,
|
|
1227
|
+
"tooltip-hide-after": A.value,
|
|
1228
|
+
onCommand: be,
|
|
1229
|
+
onTooltipChange: X,
|
|
1230
|
+
onClick: Y
|
|
1209
1231
|
}, null, 8, [
|
|
1210
1232
|
"id",
|
|
1211
1233
|
"label",
|
|
@@ -1220,24 +1242,24 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1220
1242
|
"tooltip-hide-after"
|
|
1221
1243
|
])) : o.item.type === "checkbox" ? (v(), n(E(te), {
|
|
1222
1244
|
key: 7,
|
|
1223
|
-
disabled:
|
|
1224
|
-
onChange:
|
|
1245
|
+
disabled: V.value,
|
|
1246
|
+
onChange: Y
|
|
1225
1247
|
}, {
|
|
1226
1248
|
default: O(() => [s(w(o.item.label), 1)]),
|
|
1227
1249
|
_: 1
|
|
1228
1250
|
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(ne), {
|
|
1229
1251
|
key: 8,
|
|
1230
|
-
disabled:
|
|
1231
|
-
onChange:
|
|
1232
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(
|
|
1252
|
+
disabled: V.value,
|
|
1253
|
+
onChange: Y
|
|
1254
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(oe), {
|
|
1233
1255
|
key: 9,
|
|
1234
|
-
"model-value":
|
|
1235
|
-
disabled:
|
|
1236
|
-
"popper-class":
|
|
1237
|
-
style: h({ width:
|
|
1238
|
-
onChange:
|
|
1256
|
+
"model-value": me.value,
|
|
1257
|
+
disabled: V.value,
|
|
1258
|
+
"popper-class": re.value,
|
|
1259
|
+
style: h({ width: pe.value }),
|
|
1260
|
+
onChange: Te
|
|
1239
1261
|
}, {
|
|
1240
|
-
default: O(() => [(v(!0), i(e, null, x(
|
|
1262
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(ie), {
|
|
1241
1263
|
key: String(e.value),
|
|
1242
1264
|
label: String(e.label),
|
|
1243
1265
|
value: e.value
|
|
@@ -1248,15 +1270,25 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1248
1270
|
"disabled",
|
|
1249
1271
|
"popper-class",
|
|
1250
1272
|
"style"
|
|
1251
|
-
])) : (v(), n(
|
|
1252
|
-
|
|
1273
|
+
])) : o.item.type === "inputNumber" ? (v(), n(E(I), f({ key: 10 }, he.value, {
|
|
1274
|
+
class: "ml-ribbon-input-number",
|
|
1275
|
+
"model-value": J.value,
|
|
1276
|
+
disabled: V.value,
|
|
1277
|
+
style: { width: q.value },
|
|
1278
|
+
onChange: Ee
|
|
1279
|
+
}), null, 16, [
|
|
1280
|
+
"model-value",
|
|
1281
|
+
"disabled",
|
|
1282
|
+
"style"
|
|
1283
|
+
])) : (v(), n(Ae, {
|
|
1284
|
+
key: 11,
|
|
1253
1285
|
id: o.item.id,
|
|
1254
1286
|
label: o.item.label ?? o.item.id,
|
|
1255
|
-
icon:
|
|
1256
|
-
disabled:
|
|
1257
|
-
"hide-label": !
|
|
1258
|
-
"aria-label":
|
|
1259
|
-
onClick:
|
|
1287
|
+
icon: j.value,
|
|
1288
|
+
disabled: V.value,
|
|
1289
|
+
"hide-label": !M.value,
|
|
1290
|
+
"aria-label": L.value,
|
|
1291
|
+
onClick: Y
|
|
1260
1292
|
}, null, 8, [
|
|
1261
1293
|
"id",
|
|
1262
1294
|
"label",
|
|
@@ -1264,7 +1296,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1264
1296
|
"disabled",
|
|
1265
1297
|
"hide-label",
|
|
1266
1298
|
"aria-label"
|
|
1267
|
-
]))], 14,
|
|
1299
|
+
]))], 14, tt)]),
|
|
1268
1300
|
_: 3
|
|
1269
1301
|
}, 8, [
|
|
1270
1302
|
"content",
|
|
@@ -1273,7 +1305,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1273
1305
|
"hide-after"
|
|
1274
1306
|
]));
|
|
1275
1307
|
}
|
|
1276
|
-
}),
|
|
1308
|
+
}), it = /* @__PURE__ */ l({
|
|
1277
1309
|
__name: "RibbonGroupContent",
|
|
1278
1310
|
props: {
|
|
1279
1311
|
group: {},
|
|
@@ -1283,13 +1315,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1283
1315
|
emits: ["item-click"],
|
|
1284
1316
|
setup(t, { emit: r }) {
|
|
1285
1317
|
let a = t, o = r;
|
|
1286
|
-
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(
|
|
1318
|
+
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(Oe, {
|
|
1287
1319
|
id: t.id,
|
|
1288
1320
|
key: t.id,
|
|
1289
1321
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
1290
1322
|
rows: t.rows
|
|
1291
1323
|
}, {
|
|
1292
|
-
default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(
|
|
1324
|
+
default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(rt, {
|
|
1293
1325
|
id: e.id,
|
|
1294
1326
|
key: e.id,
|
|
1295
1327
|
item: e,
|
|
@@ -1314,15 +1346,15 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1314
1346
|
"rows"
|
|
1315
1347
|
]))), 128))], 2));
|
|
1316
1348
|
}
|
|
1317
|
-
}),
|
|
1349
|
+
}), at = ["data-priority"], ot = { class: "ml-ribbon-group__body" }, st = { class: "ml-ribbon-group__footer" }, ct = { class: "ml-ribbon-group__title" }, lt = [
|
|
1318
1350
|
"aria-label",
|
|
1319
1351
|
"aria-expanded",
|
|
1320
1352
|
"disabled"
|
|
1321
|
-
],
|
|
1353
|
+
], ut = { class: "ml-ribbon-group__overflow-content" }, dt = [
|
|
1322
1354
|
"aria-label",
|
|
1323
1355
|
"aria-expanded",
|
|
1324
1356
|
"disabled"
|
|
1325
|
-
],
|
|
1357
|
+
], ft = { class: "ml-ribbon-group__overflow-content" }, pt = /* @__PURE__ */ l({
|
|
1326
1358
|
__name: "RibbonGroup",
|
|
1327
1359
|
props: {
|
|
1328
1360
|
id: {},
|
|
@@ -1341,7 +1373,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1341
1373
|
},
|
|
1342
1374
|
emits: ["item-click"],
|
|
1343
1375
|
setup(e, { emit: o }) {
|
|
1344
|
-
let s = e, l = o, d = u(
|
|
1376
|
+
let s = e, l = o, d = u(fe, null), f = t(() => s.width == null), y = t(() => {
|
|
1345
1377
|
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
1346
1378
|
let e = `${s.width}px`;
|
|
1347
1379
|
return {
|
|
@@ -1350,13 +1382,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1350
1382
|
maxWidth: e,
|
|
1351
1383
|
flex: `0 0 ${e}`
|
|
1352
1384
|
};
|
|
1353
|
-
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), A = b(null), te = b(null), ne = b(0),
|
|
1385
|
+
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), A = b(null), te = b(null), ne = b(0), re = b(0), j = se("size", ""), M = t(() => j.value || "default"), N = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${M.value}`), P = t(() => ({ modifiers: [{
|
|
1354
1386
|
name: "offset",
|
|
1355
1387
|
options: { offset: [ne.value, 8] }
|
|
1356
|
-
}] })),
|
|
1388
|
+
}] })), I = t(() => ({ modifiers: [{
|
|
1357
1389
|
name: "offset",
|
|
1358
|
-
options: { offset: [
|
|
1359
|
-
}] })),
|
|
1390
|
+
options: { offset: [re.value, 8] }
|
|
1391
|
+
}] })), ie = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), L = t(() => k.value.length > 0), oe = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), R = b(!1), z = b(!1), V = t(() => {
|
|
1360
1392
|
if (!s.groupModel || !k.value.length) return null;
|
|
1361
1393
|
let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
|
|
1362
1394
|
...t,
|
|
@@ -1366,7 +1398,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1366
1398
|
...s.groupModel,
|
|
1367
1399
|
collections: t
|
|
1368
1400
|
} : null;
|
|
1369
|
-
}),
|
|
1401
|
+
}), ce = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
1370
1402
|
id: `${s.groupModel.id}-footer-menu`,
|
|
1371
1403
|
title: "",
|
|
1372
1404
|
orientation: "row",
|
|
@@ -1376,7 +1408,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1376
1408
|
items: s.groupModel.footerMenuItems
|
|
1377
1409
|
}]
|
|
1378
1410
|
} : null);
|
|
1379
|
-
function
|
|
1411
|
+
function le() {
|
|
1380
1412
|
let e = T.value?.querySelector(".ml-ribbon-group__content");
|
|
1381
1413
|
if (!e) {
|
|
1382
1414
|
k.value.length > 0 && (k.value = []);
|
|
@@ -1395,12 +1427,12 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1395
1427
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
1396
1428
|
}), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
|
|
1397
1429
|
}
|
|
1398
|
-
function
|
|
1430
|
+
function ue() {
|
|
1399
1431
|
p(() => {
|
|
1400
|
-
|
|
1432
|
+
he(), U(), W(), le();
|
|
1401
1433
|
});
|
|
1402
1434
|
}
|
|
1403
|
-
function
|
|
1435
|
+
function U() {
|
|
1404
1436
|
let e = T.value?.getBoundingClientRect(), t = A.value?.getBoundingClientRect();
|
|
1405
1437
|
if (!e || !t) {
|
|
1406
1438
|
ne.value !== 0 && (ne.value = 0);
|
|
@@ -1409,83 +1441,83 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1409
1441
|
let n = Math.round(e.left - t.left);
|
|
1410
1442
|
ne.value !== n && (ne.value = n);
|
|
1411
1443
|
}
|
|
1412
|
-
function
|
|
1444
|
+
function W() {
|
|
1413
1445
|
let e = T.value?.getBoundingClientRect(), t = te.value?.getBoundingClientRect();
|
|
1414
1446
|
if (!e || !t) {
|
|
1415
|
-
|
|
1447
|
+
re.value !== 0 && (re.value = 0);
|
|
1416
1448
|
return;
|
|
1417
1449
|
}
|
|
1418
1450
|
let n = Math.round(e.left - t.left);
|
|
1419
|
-
|
|
1451
|
+
re.value !== n && (re.value = n);
|
|
1420
1452
|
}
|
|
1421
|
-
function
|
|
1422
|
-
|
|
1453
|
+
function G(e) {
|
|
1454
|
+
R.value = e;
|
|
1423
1455
|
}
|
|
1424
|
-
function
|
|
1425
|
-
|
|
1456
|
+
function K(e) {
|
|
1457
|
+
z.value = e;
|
|
1426
1458
|
}
|
|
1427
|
-
function
|
|
1428
|
-
x.value || (
|
|
1459
|
+
function pe() {
|
|
1460
|
+
x.value || (R.value = !R.value);
|
|
1429
1461
|
}
|
|
1430
|
-
function
|
|
1431
|
-
x.value || (
|
|
1462
|
+
function me() {
|
|
1463
|
+
x.value || (z.value = !z.value);
|
|
1432
1464
|
}
|
|
1433
|
-
let
|
|
1434
|
-
function
|
|
1435
|
-
if (!
|
|
1465
|
+
let q = null, J = null;
|
|
1466
|
+
function he() {
|
|
1467
|
+
if (!q) return;
|
|
1436
1468
|
let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1437
|
-
|
|
1469
|
+
J !== e && (J && q.unobserve(J), e && q.observe(e), J = e);
|
|
1438
1470
|
}
|
|
1439
1471
|
return D(() => s.groupModel, () => {
|
|
1440
|
-
|
|
1472
|
+
ue();
|
|
1441
1473
|
}, { deep: !0 }), D(x, (e) => {
|
|
1442
|
-
e && (
|
|
1474
|
+
e && (R.value = !1, z.value = !1);
|
|
1443
1475
|
}), g(() => {
|
|
1444
|
-
typeof ResizeObserver < "u" && (
|
|
1445
|
-
|
|
1446
|
-
}), T.value &&
|
|
1476
|
+
typeof ResizeObserver < "u" && (q = new ResizeObserver(() => {
|
|
1477
|
+
U(), W(), le();
|
|
1478
|
+
}), T.value && q.observe(T.value), he()), ue();
|
|
1447
1479
|
}), _(() => {
|
|
1448
|
-
|
|
1480
|
+
q?.disconnect();
|
|
1449
1481
|
}), (t, o) => (v(), i("section", {
|
|
1450
1482
|
ref_key: "groupSectionRef",
|
|
1451
1483
|
ref: T,
|
|
1452
1484
|
class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
|
|
1453
1485
|
"data-priority": e.priority ?? 100,
|
|
1454
1486
|
style: h(y.value)
|
|
1455
|
-
}, [a("div",
|
|
1456
|
-
|
|
1487
|
+
}, [a("div", ot, [S(t.$slots, "default")]), a("footer", st, [
|
|
1488
|
+
ie.value ? (v(), n(E(F), {
|
|
1457
1489
|
key: 0,
|
|
1458
1490
|
class: "ml-ribbon-group__icon"
|
|
1459
1491
|
}, {
|
|
1460
|
-
default: O(() => [(v(), n(C(
|
|
1492
|
+
default: O(() => [(v(), n(C(ie.value)))]),
|
|
1461
1493
|
_: 1
|
|
1462
1494
|
})) : r("", !0),
|
|
1463
|
-
a("span",
|
|
1464
|
-
|
|
1495
|
+
a("span", ct, w(e.title), 1),
|
|
1496
|
+
oe.value && ce.value ? (v(), n(E(ae), {
|
|
1465
1497
|
key: 1,
|
|
1466
1498
|
trigger: "click",
|
|
1467
1499
|
placement: "bottom-start",
|
|
1468
1500
|
disabled: x.value,
|
|
1469
|
-
"popper-class":
|
|
1470
|
-
"popper-options":
|
|
1471
|
-
onShow: o[1] ||= (e) =>
|
|
1472
|
-
onHide: o[2] ||= (e) =>
|
|
1501
|
+
"popper-class": N.value,
|
|
1502
|
+
"popper-options": I.value,
|
|
1503
|
+
onShow: o[1] ||= (e) => G(!0),
|
|
1504
|
+
onHide: o[2] ||= (e) => G(!1)
|
|
1473
1505
|
}, {
|
|
1474
1506
|
reference: O(() => [a("button", {
|
|
1475
1507
|
ref_key: "footerTriggerRef",
|
|
1476
1508
|
ref: te,
|
|
1477
1509
|
type: "button",
|
|
1478
|
-
class: m(["ml-ribbon-group__footer-trigger", { "is-open":
|
|
1510
|
+
class: m(["ml-ribbon-group__footer-trigger", { "is-open": R.value }]),
|
|
1479
1511
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1480
|
-
"aria-expanded":
|
|
1512
|
+
"aria-expanded": R.value,
|
|
1481
1513
|
disabled: x.value,
|
|
1482
|
-
onClick:
|
|
1483
|
-
}, [c(E(
|
|
1484
|
-
default: O(() => [(v(), n(C(
|
|
1514
|
+
onClick: pe
|
|
1515
|
+
}, [c(E(F), null, {
|
|
1516
|
+
default: O(() => [(v(), n(C(R.value ? E(H) : E(B))))]),
|
|
1485
1517
|
_: 1
|
|
1486
|
-
})], 10,
|
|
1487
|
-
default: O(() => [a("div",
|
|
1488
|
-
group:
|
|
1518
|
+
})], 10, lt)]),
|
|
1519
|
+
default: O(() => [a("div", ut, [c(it, {
|
|
1520
|
+
group: ce.value,
|
|
1489
1521
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1490
1522
|
disabled: x.value,
|
|
1491
1523
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
@@ -1500,31 +1532,31 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1500
1532
|
"popper-class",
|
|
1501
1533
|
"popper-options"
|
|
1502
1534
|
])) : r("", !0),
|
|
1503
|
-
|
|
1535
|
+
L.value && V.value ? (v(), n(E(ae), {
|
|
1504
1536
|
key: 2,
|
|
1505
1537
|
trigger: "click",
|
|
1506
1538
|
placement: "bottom-start",
|
|
1507
1539
|
disabled: x.value,
|
|
1508
|
-
"popper-class":
|
|
1509
|
-
"popper-options":
|
|
1510
|
-
onShow: o[4] ||= (e) =>
|
|
1511
|
-
onHide: o[5] ||= (e) =>
|
|
1540
|
+
"popper-class": N.value,
|
|
1541
|
+
"popper-options": P.value,
|
|
1542
|
+
onShow: o[4] ||= (e) => K(!0),
|
|
1543
|
+
onHide: o[5] ||= (e) => K(!1)
|
|
1512
1544
|
}, {
|
|
1513
1545
|
reference: O(() => [a("button", {
|
|
1514
1546
|
ref_key: "overflowTriggerRef",
|
|
1515
1547
|
ref: A,
|
|
1516
1548
|
type: "button",
|
|
1517
|
-
class: m(["ml-ribbon-group__overflow-trigger", { "is-open":
|
|
1549
|
+
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": z.value }]),
|
|
1518
1550
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1519
|
-
"aria-expanded":
|
|
1551
|
+
"aria-expanded": z.value,
|
|
1520
1552
|
disabled: x.value,
|
|
1521
|
-
onClick:
|
|
1522
|
-
}, [c(E(
|
|
1523
|
-
default: O(() => [(v(), n(C(
|
|
1553
|
+
onClick: me
|
|
1554
|
+
}, [c(E(F), null, {
|
|
1555
|
+
default: O(() => [(v(), n(C(z.value ? E(H) : E(B))))]),
|
|
1524
1556
|
_: 1
|
|
1525
|
-
})], 10,
|
|
1526
|
-
default: O(() => [a("div",
|
|
1527
|
-
group:
|
|
1557
|
+
})], 10, dt)]),
|
|
1558
|
+
default: O(() => [a("div", ft, [c(it, {
|
|
1559
|
+
group: V.value,
|
|
1528
1560
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1529
1561
|
disabled: x.value,
|
|
1530
1562
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
@@ -1545,24 +1577,24 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1545
1577
|
class: "ml-ribbon-group__launcher",
|
|
1546
1578
|
disabled: x.value
|
|
1547
1579
|
}, {
|
|
1548
|
-
default: O(() => [c(E(
|
|
1549
|
-
default: O(() => [c(E(
|
|
1580
|
+
default: O(() => [c(E(F), null, {
|
|
1581
|
+
default: O(() => [c(E(de))]),
|
|
1550
1582
|
_: 1
|
|
1551
1583
|
})]),
|
|
1552
1584
|
_: 1
|
|
1553
1585
|
}, 8, ["disabled"])) : r("", !0)
|
|
1554
|
-
])], 14,
|
|
1586
|
+
])], 14, at));
|
|
1555
1587
|
}
|
|
1556
|
-
}),
|
|
1588
|
+
}), mt = ["inert", "aria-disabled"], ht = { class: "ml-ribbon__head-left" }, gt = { class: "ml-ribbon__head-right" }, _t = {
|
|
1557
1589
|
key: 2,
|
|
1558
1590
|
class: "ml-ribbon__tabs-extra"
|
|
1559
|
-
},
|
|
1591
|
+
}, vt = ["data-active-tab"], yt = {
|
|
1560
1592
|
key: 0,
|
|
1561
1593
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1562
|
-
},
|
|
1594
|
+
}, bt = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, xt = ["aria-label", "disabled"], St = { class: "ml-ribbon-overflow-list" }, Ct = { class: "ml-ribbon-overflow-group__header" }, wt = ["data-active-tab"], Tt = ["disabled"], Et = { class: "ml-ribbon-simplified-group__panel" }, Dt = ["data-active-tab"], Ot = {
|
|
1563
1595
|
key: 0,
|
|
1564
1596
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1565
|
-
},
|
|
1597
|
+
}, kt = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, At = ["aria-label", "disabled"], jt = { class: "ml-ribbon-overflow-list" }, Mt = { class: "ml-ribbon-overflow-group__header" }, Nt = ["data-active-tab"], Pt = ["disabled"], Ft = { class: "ml-ribbon-simplified-group__panel" }, It = 40, Lt = /* @__PURE__ */ l({
|
|
1566
1598
|
__name: "Ribbon",
|
|
1567
1599
|
props: {
|
|
1568
1600
|
id: { default: "ml-ribbon-root" },
|
|
@@ -1657,10 +1689,10 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1657
1689
|
groups: e.groups?.map(te)
|
|
1658
1690
|
}));
|
|
1659
1691
|
}
|
|
1660
|
-
function
|
|
1692
|
+
function j(e, t) {
|
|
1661
1693
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1662
1694
|
}
|
|
1663
|
-
let
|
|
1695
|
+
let M = {
|
|
1664
1696
|
layoutSwitcherTooltip: "Switch ribbon layout",
|
|
1665
1697
|
minimizeTooltip: "Minimize ribbon",
|
|
1666
1698
|
keyTipsToggleText: "Key Tips",
|
|
@@ -1675,67 +1707,67 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1675
1707
|
keyTipsEmptySequence: "No key sequence",
|
|
1676
1708
|
contextualTabDefaultTitle: "Contextual",
|
|
1677
1709
|
galleryPreviewFallback: "Preview unavailable"
|
|
1678
|
-
},
|
|
1679
|
-
y(
|
|
1680
|
-
|
|
1681
|
-
}, { deep: !0 }), D(() =>
|
|
1682
|
-
e !==
|
|
1683
|
-
}), D(() =>
|
|
1710
|
+
}, N = s, P = u, { context: I, visibleTabs: ie } = he(N.id, N.tabs, N.disabled, N.activeLayout ? String(N.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : N.layout, N.minimized, N.activeTab || N.tabs[0]?.id || "", j(N.tooltipShowAfter, 1e3), j(N.tooltipHideAfter, 0));
|
|
1711
|
+
y(fe, I), D(() => N.tabs, (e) => {
|
|
1712
|
+
I.tabs.value = ne(e), I.tabs.value.some((e) => e.id === I.activeTab.value) || (I.activeTab.value = I.tabs.value[0]?.id || "");
|
|
1713
|
+
}, { deep: !0 }), D(() => N.layout, (e) => {
|
|
1714
|
+
e !== I.layout.value && (I.layout.value = e);
|
|
1715
|
+
}), D(() => N.activeLayout, (e) => {
|
|
1684
1716
|
if (!e) return;
|
|
1685
1717
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
1686
|
-
t !==
|
|
1687
|
-
}), D(() =>
|
|
1688
|
-
e !==
|
|
1689
|
-
}), D(() =>
|
|
1690
|
-
e !==
|
|
1691
|
-
}), D(() =>
|
|
1692
|
-
e && e !==
|
|
1693
|
-
}), D(() =>
|
|
1694
|
-
let t =
|
|
1695
|
-
t !==
|
|
1696
|
-
}), D(() =>
|
|
1697
|
-
let t =
|
|
1698
|
-
t !==
|
|
1699
|
-
}), D(
|
|
1700
|
-
|
|
1701
|
-
}), D(
|
|
1702
|
-
|
|
1703
|
-
}), D(
|
|
1704
|
-
|
|
1705
|
-
}), D(
|
|
1706
|
-
|
|
1707
|
-
}), D(
|
|
1708
|
-
|
|
1718
|
+
t !== I.layout.value && (I.layout.value = t);
|
|
1719
|
+
}), D(() => N.minimized, (e) => {
|
|
1720
|
+
e !== I.minimized.value && (I.minimized.value = e);
|
|
1721
|
+
}), D(() => N.disabled, (e) => {
|
|
1722
|
+
e !== I.disabled.value && (I.disabled.value = e);
|
|
1723
|
+
}), D(() => N.activeTab, (e) => {
|
|
1724
|
+
e && e !== I.activeTab.value && (I.activeTab.value = e);
|
|
1725
|
+
}), D(() => N.tooltipShowAfter, (e) => {
|
|
1726
|
+
let t = j(e, 1e3);
|
|
1727
|
+
t !== I.tooltipShowAfter.value && (I.tooltipShowAfter.value = t);
|
|
1728
|
+
}), D(() => N.tooltipHideAfter, (e) => {
|
|
1729
|
+
let t = j(e, 0);
|
|
1730
|
+
t !== I.tooltipHideAfter.value && (I.tooltipHideAfter.value = t);
|
|
1731
|
+
}), D(I.activeTab, (e) => {
|
|
1732
|
+
P("update:activeTab", e), P("tabChange", e);
|
|
1733
|
+
}), D(I.layout, (e) => {
|
|
1734
|
+
P("update:layout", e), P("layoutChange", e);
|
|
1735
|
+
}), D(I.minimized, (e) => {
|
|
1736
|
+
P("update:minimized", e);
|
|
1737
|
+
}), D(I.overflowOpen, (e) => {
|
|
1738
|
+
P(e ? "overflowOpen" : "overflowClose");
|
|
1739
|
+
}), D(I.backdropOpen, (e) => {
|
|
1740
|
+
P(e ? "backstageOpen" : "backstageClose");
|
|
1709
1741
|
});
|
|
1710
|
-
let
|
|
1742
|
+
let L = t(() => ie.value.find((e) => e.id === I.activeTab.value)), oe = t(() => new Set(ie.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), B = t(() => Re(L.value)), H = t(() => L.value?.groups?.filter((e) => e.visible !== !1) ?? []), de = b(null), U = b(null), W = b(null), G = b(null), K = b(!1), pe = b(0), me = b({
|
|
1711
1743
|
left: "0px",
|
|
1712
1744
|
top: "0px",
|
|
1713
1745
|
width: "1px",
|
|
1714
1746
|
height: "0px"
|
|
1715
|
-
}),
|
|
1716
|
-
layoutSwitcherTooltip:
|
|
1717
|
-
minimizeTooltip:
|
|
1718
|
-
keyTipsToggleText:
|
|
1719
|
-
overflowTriggerAriaLabel:
|
|
1720
|
-
groupOverflowTriggerAriaLabel:
|
|
1721
|
-
fileMenuLabel:
|
|
1722
|
-
fileMenuOpenBackstageLabel:
|
|
1723
|
-
backstageBackLabel:
|
|
1724
|
-
backstageTitle:
|
|
1725
|
-
backstageDescription:
|
|
1726
|
-
keyTipsSequencePrefix:
|
|
1727
|
-
keyTipsEmptySequence:
|
|
1728
|
-
contextualTabDefaultTitle:
|
|
1729
|
-
galleryPreviewFallback:
|
|
1730
|
-
})),
|
|
1747
|
+
}), q = b(/* @__PURE__ */ new Set()), J = b({}), ge = se("size", ""), _e = t(() => N.size || ge.value || "default"), ve = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${_e.value}`), ye = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${_e.value}`), be = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${_e.value}`), X = t(() => ({
|
|
1748
|
+
layoutSwitcherTooltip: N.texts.layoutSwitcherTooltip || M.layoutSwitcherTooltip,
|
|
1749
|
+
minimizeTooltip: N.texts.minimizeTooltip || M.minimizeTooltip,
|
|
1750
|
+
keyTipsToggleText: N.texts.keyTipsToggleText || M.keyTipsToggleText,
|
|
1751
|
+
overflowTriggerAriaLabel: N.texts.overflowTriggerAriaLabel || M.overflowTriggerAriaLabel,
|
|
1752
|
+
groupOverflowTriggerAriaLabel: N.texts.groupOverflowTriggerAriaLabel || M.groupOverflowTriggerAriaLabel,
|
|
1753
|
+
fileMenuLabel: N.texts.fileMenuLabel || M.fileMenuLabel,
|
|
1754
|
+
fileMenuOpenBackstageLabel: N.texts.fileMenuOpenBackstageLabel || M.fileMenuOpenBackstageLabel,
|
|
1755
|
+
backstageBackLabel: N.texts.backstageBackLabel || M.backstageBackLabel,
|
|
1756
|
+
backstageTitle: N.texts.backstageTitle || M.backstageTitle,
|
|
1757
|
+
backstageDescription: N.texts.backstageDescription || M.backstageDescription,
|
|
1758
|
+
keyTipsSequencePrefix: N.texts.keyTipsSequencePrefix || M.keyTipsSequencePrefix,
|
|
1759
|
+
keyTipsEmptySequence: N.texts.keyTipsEmptySequence || M.keyTipsEmptySequence,
|
|
1760
|
+
contextualTabDefaultTitle: N.texts.contextualTabDefaultTitle || M.contextualTabDefaultTitle,
|
|
1761
|
+
galleryPreviewFallback: N.texts.galleryPreviewFallback || M.galleryPreviewFallback
|
|
1762
|
+
})), xe = t(() => j(N.tooltipShowAfter, 1e3)), Se = t(() => j(N.tooltipHideAfter, 0)), Ce = t(() => I.minimized.value ? ce : V), we = t(() => H.value.filter((e) => !q.value.has(e.id))), Ee = t(() => H.value.filter((e) => q.value.has(e.id))), Oe = t(() => {
|
|
1731
1763
|
if (!Ee.value.length) return 220;
|
|
1732
1764
|
let e = Ee.value.reduce((e, t) => {
|
|
1733
|
-
let n =
|
|
1765
|
+
let n = J.value[t.id] ?? je(t);
|
|
1734
1766
|
return Math.max(e, n);
|
|
1735
1767
|
}, 0), t = Math.ceil(e + 40);
|
|
1736
1768
|
return Math.max(220, Math.min(720, t));
|
|
1737
1769
|
});
|
|
1738
|
-
function
|
|
1770
|
+
function ke(e) {
|
|
1739
1771
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
1740
1772
|
...A(e),
|
|
1741
1773
|
size: "medium"
|
|
@@ -1750,13 +1782,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1750
1782
|
}]
|
|
1751
1783
|
};
|
|
1752
1784
|
}
|
|
1753
|
-
function
|
|
1785
|
+
function Ae(e) {
|
|
1754
1786
|
return e.priority ?? 100;
|
|
1755
1787
|
}
|
|
1756
|
-
function
|
|
1788
|
+
function je(e) {
|
|
1757
1789
|
return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width : 140;
|
|
1758
1790
|
}
|
|
1759
|
-
function
|
|
1791
|
+
function Me(e) {
|
|
1760
1792
|
let t = {};
|
|
1761
1793
|
return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
|
|
1762
1794
|
let n = e.dataset.groupId;
|
|
@@ -1765,109 +1797,109 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1765
1797
|
r > 0 && (t[n] = r);
|
|
1766
1798
|
}), t;
|
|
1767
1799
|
}
|
|
1768
|
-
function
|
|
1769
|
-
let e =
|
|
1770
|
-
let n =
|
|
1771
|
-
return e + Math.max(n,
|
|
1800
|
+
function Ne() {
|
|
1801
|
+
let e = H.value.reduce((e, t) => {
|
|
1802
|
+
let n = J.value[t.id] ?? je(t);
|
|
1803
|
+
return e + Math.max(n, je(t));
|
|
1772
1804
|
}, 0);
|
|
1773
1805
|
return Math.max(220, e);
|
|
1774
1806
|
}
|
|
1775
|
-
function
|
|
1807
|
+
function Pe(e) {
|
|
1776
1808
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
1777
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
1809
|
+
return Number.isFinite(t) && t > 0 ? t : It;
|
|
1778
1810
|
}
|
|
1779
|
-
function
|
|
1780
|
-
if (
|
|
1781
|
-
|
|
1811
|
+
function Fe() {
|
|
1812
|
+
if (I.layout.value !== "classic") {
|
|
1813
|
+
q.value = /* @__PURE__ */ new Set();
|
|
1782
1814
|
return;
|
|
1783
1815
|
}
|
|
1784
|
-
let e =
|
|
1816
|
+
let e = I.minimized.value ? G.value : W.value;
|
|
1785
1817
|
if (!e) return;
|
|
1786
|
-
let t =
|
|
1818
|
+
let t = H.value;
|
|
1787
1819
|
if (!t.length) {
|
|
1788
|
-
|
|
1820
|
+
q.value = /* @__PURE__ */ new Set();
|
|
1789
1821
|
return;
|
|
1790
1822
|
}
|
|
1791
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
1792
|
-
|
|
1793
|
-
...
|
|
1823
|
+
let n = Math.round(e.getBoundingClientRect().width), r = Pe(e), i = Me(e);
|
|
1824
|
+
J.value = {
|
|
1825
|
+
...J.value,
|
|
1794
1826
|
...i
|
|
1795
1827
|
};
|
|
1796
1828
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
1797
1829
|
group: e,
|
|
1798
1830
|
index: t
|
|
1799
1831
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
1800
|
-
let n =
|
|
1832
|
+
let n = Ae(t.group) - Ae(e.group);
|
|
1801
1833
|
return n === 0 ? t.index - e.index : n;
|
|
1802
|
-
}), l = (e) => i[e.id] ??
|
|
1834
|
+
}), l = (e) => i[e.id] ?? je(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;
|
|
1803
1835
|
for (; f(s) > n && p < c.length;) {
|
|
1804
1836
|
let e = c[p].group;
|
|
1805
1837
|
s.add(e.id), p += 1;
|
|
1806
1838
|
}
|
|
1807
|
-
|
|
1839
|
+
q.value = s;
|
|
1808
1840
|
}
|
|
1809
|
-
function
|
|
1841
|
+
function Ie() {
|
|
1810
1842
|
p(() => {
|
|
1811
|
-
if (
|
|
1812
|
-
|
|
1843
|
+
if (I.layout.value !== "classic" || I.minimized.value) {
|
|
1844
|
+
Fe();
|
|
1813
1845
|
return;
|
|
1814
1846
|
}
|
|
1815
|
-
if (
|
|
1816
|
-
|
|
1847
|
+
if (q.value.size === 0) {
|
|
1848
|
+
Fe();
|
|
1817
1849
|
return;
|
|
1818
1850
|
}
|
|
1819
|
-
|
|
1820
|
-
|
|
1851
|
+
q.value = /* @__PURE__ */ new Set(), p(() => {
|
|
1852
|
+
Fe();
|
|
1821
1853
|
});
|
|
1822
1854
|
});
|
|
1823
1855
|
}
|
|
1824
|
-
function
|
|
1825
|
-
let e =
|
|
1856
|
+
function Le() {
|
|
1857
|
+
let e = de.value, t = U.value;
|
|
1826
1858
|
if (!e || !t) return;
|
|
1827
1859
|
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);
|
|
1828
|
-
|
|
1860
|
+
pe.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? Ne() : Math.max(360, H.value.length * 120)), me.value = {
|
|
1829
1861
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
1830
1862
|
top: "0px",
|
|
1831
1863
|
width: "1px",
|
|
1832
1864
|
height: `${Math.round(r.height)}px`
|
|
1833
1865
|
};
|
|
1834
1866
|
}
|
|
1835
|
-
function
|
|
1836
|
-
|
|
1867
|
+
function Z() {
|
|
1868
|
+
K.value = !1;
|
|
1837
1869
|
}
|
|
1838
1870
|
function Re(e) {
|
|
1839
|
-
return
|
|
1871
|
+
return I.disabled.value ? !0 : !e || oe.value.size === 0 ? !1 : !oe.value.has(e.id);
|
|
1840
1872
|
}
|
|
1841
1873
|
function ze(e) {
|
|
1842
|
-
if (
|
|
1843
|
-
let t =
|
|
1844
|
-
if (
|
|
1845
|
-
|
|
1874
|
+
if (I.disabled.value) return;
|
|
1875
|
+
let t = I.activeTab.value === e.id;
|
|
1876
|
+
if (I.activeTab.value = e.id, !I.minimized.value) {
|
|
1877
|
+
Z();
|
|
1846
1878
|
return;
|
|
1847
1879
|
}
|
|
1848
|
-
|
|
1880
|
+
Le(), K.value = t ? !K.value : !0;
|
|
1849
1881
|
}
|
|
1850
1882
|
function Be() {
|
|
1851
|
-
|
|
1883
|
+
I.disabled.value || I.api.toggleSimplified();
|
|
1852
1884
|
}
|
|
1853
1885
|
function Ve() {
|
|
1854
|
-
|
|
1886
|
+
I.disabled.value || (I.minimized.value || Z(), I.minimized.value = !I.minimized.value);
|
|
1855
1887
|
}
|
|
1856
1888
|
function He(e) {
|
|
1857
|
-
|
|
1889
|
+
I.disabled.value || (Z(), P("fileMenuSelect", e));
|
|
1858
1890
|
}
|
|
1859
1891
|
function Ue() {
|
|
1860
|
-
|
|
1892
|
+
I.disabled.value || (Z(), I.backdropOpen.value = !0);
|
|
1861
1893
|
}
|
|
1862
1894
|
function We() {
|
|
1863
|
-
|
|
1895
|
+
I.disabled.value || (I.backdropOpen.value = !1);
|
|
1864
1896
|
}
|
|
1865
1897
|
function Q(e, t) {
|
|
1866
|
-
|
|
1867
|
-
tabId:
|
|
1898
|
+
B.value || (P("itemClick", {
|
|
1899
|
+
tabId: I.activeTab.value,
|
|
1868
1900
|
groupId: e,
|
|
1869
1901
|
itemId: t
|
|
1870
|
-
}),
|
|
1902
|
+
}), I.minimized.value && Z());
|
|
1871
1903
|
}
|
|
1872
1904
|
function Ge(e) {
|
|
1873
1905
|
if (!(e instanceof HTMLElement)) return !1;
|
|
@@ -1876,13 +1908,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1876
1908
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
1877
1909
|
}
|
|
1878
1910
|
function Ke() {
|
|
1879
|
-
if (
|
|
1880
|
-
|
|
1911
|
+
if (B.value) {
|
|
1912
|
+
I.keyTips.value = [];
|
|
1881
1913
|
return;
|
|
1882
1914
|
}
|
|
1883
|
-
let e =
|
|
1915
|
+
let e = L.value;
|
|
1884
1916
|
if (!e?.groups?.length) {
|
|
1885
|
-
|
|
1917
|
+
I.keyTips.value = [];
|
|
1886
1918
|
return;
|
|
1887
1919
|
}
|
|
1888
1920
|
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) => {
|
|
@@ -1895,131 +1927,131 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1895
1927
|
scope: "item"
|
|
1896
1928
|
} : null;
|
|
1897
1929
|
}).filter((e) => !!e)));
|
|
1898
|
-
|
|
1930
|
+
I.keyTips.value = t;
|
|
1899
1931
|
}
|
|
1900
1932
|
function qe(e) {
|
|
1901
|
-
if (
|
|
1902
|
-
let t =
|
|
1933
|
+
if (I.disabled.value) return;
|
|
1934
|
+
let t = L.value;
|
|
1903
1935
|
if (t?.groups?.length) {
|
|
1904
1936
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
1905
1937
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
1906
1938
|
if (r) {
|
|
1907
|
-
Q(n.id, r.id),
|
|
1939
|
+
Q(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
|
|
1908
1940
|
return;
|
|
1909
1941
|
}
|
|
1910
1942
|
}
|
|
1911
1943
|
}
|
|
1912
1944
|
}
|
|
1913
1945
|
function Je() {
|
|
1914
|
-
|
|
1946
|
+
I.keyTipsSequence.value = "";
|
|
1915
1947
|
}
|
|
1916
1948
|
function Ye(e) {
|
|
1917
|
-
if (!
|
|
1949
|
+
if (!I.disabled.value && !Ge(e.target)) {
|
|
1918
1950
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
1919
|
-
e.preventDefault(),
|
|
1951
|
+
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value || Je();
|
|
1920
1952
|
return;
|
|
1921
1953
|
}
|
|
1922
|
-
if (
|
|
1954
|
+
if (I.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
1923
1955
|
if (e.key === "Escape") {
|
|
1924
|
-
e.preventDefault(),
|
|
1956
|
+
e.preventDefault(), I.keyTipsOpen.value = !1, Je();
|
|
1925
1957
|
return;
|
|
1926
1958
|
}
|
|
1927
1959
|
if (e.key === "Backspace") {
|
|
1928
|
-
e.preventDefault(),
|
|
1960
|
+
e.preventDefault(), I.keyTipsSequence.value = I.keyTipsSequence.value.slice(0, -1);
|
|
1929
1961
|
return;
|
|
1930
1962
|
}
|
|
1931
1963
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
1932
1964
|
e.preventDefault();
|
|
1933
|
-
let t = `${
|
|
1934
|
-
|
|
1935
|
-
let n = t.toLowerCase(), r =
|
|
1965
|
+
let t = `${I.keyTipsSequence.value}${e.key.toUpperCase()}`;
|
|
1966
|
+
I.keyTipsSequence.value = t;
|
|
1967
|
+
let n = t.toLowerCase(), r = I.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
1936
1968
|
if (r) {
|
|
1937
1969
|
qe(r);
|
|
1938
1970
|
return;
|
|
1939
1971
|
}
|
|
1940
|
-
|
|
1972
|
+
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Je();
|
|
1941
1973
|
}
|
|
1942
1974
|
}
|
|
1943
1975
|
}
|
|
1944
1976
|
}
|
|
1945
1977
|
function Xe(e) {
|
|
1946
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
1978
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? le : null;
|
|
1947
1979
|
}
|
|
1948
1980
|
function Ze(e) {
|
|
1949
|
-
|
|
1981
|
+
K.value = e;
|
|
1950
1982
|
}
|
|
1951
1983
|
D([
|
|
1952
|
-
|
|
1953
|
-
() =>
|
|
1954
|
-
() =>
|
|
1984
|
+
H,
|
|
1985
|
+
() => I.layout.value,
|
|
1986
|
+
() => I.minimized.value
|
|
1955
1987
|
], () => {
|
|
1956
|
-
|
|
1988
|
+
Ie();
|
|
1957
1989
|
}), D([
|
|
1958
|
-
|
|
1959
|
-
() =>
|
|
1960
|
-
() =>
|
|
1990
|
+
L,
|
|
1991
|
+
() => I.tabs.value,
|
|
1992
|
+
() => I.disabled.value
|
|
1961
1993
|
], () => {
|
|
1962
1994
|
Ke(), Je();
|
|
1963
1995
|
}, {
|
|
1964
1996
|
deep: !0,
|
|
1965
1997
|
immediate: !0
|
|
1966
|
-
}), D(() =>
|
|
1998
|
+
}), D(() => I.keyTipsOpen.value, (e) => {
|
|
1967
1999
|
e || Je();
|
|
1968
|
-
}), D(() =>
|
|
1969
|
-
e && (
|
|
2000
|
+
}), D(() => I.disabled.value, (e) => {
|
|
2001
|
+
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Z(), Je());
|
|
1970
2002
|
}), D([
|
|
1971
|
-
() =>
|
|
1972
|
-
() =>
|
|
1973
|
-
|
|
2003
|
+
() => I.minimized.value,
|
|
2004
|
+
() => I.layout.value,
|
|
2005
|
+
L
|
|
1974
2006
|
], ([e, , t]) => {
|
|
1975
|
-
(!e || !t) &&
|
|
1976
|
-
}), D([
|
|
1977
|
-
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) &&
|
|
1978
|
-
}, { flush: "post" }), D(
|
|
2007
|
+
(!e || !t) && Z();
|
|
2008
|
+
}), D([W, G], ([e, t], [n, r]) => {
|
|
2009
|
+
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Ie();
|
|
2010
|
+
}, { flush: "post" }), D(K, (e) => {
|
|
1979
2011
|
e && p(() => {
|
|
1980
|
-
|
|
2012
|
+
Le(), Ie();
|
|
1981
2013
|
});
|
|
1982
2014
|
});
|
|
1983
2015
|
let $ = null;
|
|
1984
2016
|
g(() => {
|
|
1985
2017
|
window.addEventListener("keydown", Ye), window.addEventListener("resize", Qe), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
1986
|
-
|
|
1987
|
-
}),
|
|
2018
|
+
Le(), Ie();
|
|
2019
|
+
}), W.value && $.observe(W.value), G.value && $.observe(G.value)), Le(), Ie();
|
|
1988
2020
|
}), _(() => {
|
|
1989
2021
|
window.removeEventListener("keydown", Ye), window.removeEventListener("resize", Qe), $?.disconnect();
|
|
1990
2022
|
});
|
|
1991
2023
|
function Qe() {
|
|
1992
|
-
|
|
2024
|
+
K.value && Le();
|
|
1993
2025
|
}
|
|
1994
|
-
return l(
|
|
2026
|
+
return l(I.api), (t, l) => (v(), n(E(re), { size: N.size }, {
|
|
1995
2027
|
default: O(() => [(v(), i("section", {
|
|
1996
2028
|
ref_key: "ribbonRootRef",
|
|
1997
|
-
ref:
|
|
1998
|
-
key: E(
|
|
2029
|
+
ref: de,
|
|
2030
|
+
key: E(I).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
1999
2031
|
class: m(["ml-ribbon", [
|
|
2000
|
-
`ml-ribbon--${E(
|
|
2001
|
-
`ml-ribbon--size-${
|
|
2032
|
+
`ml-ribbon--${E(I).layout.value}`,
|
|
2033
|
+
`ml-ribbon--size-${_e.value}`,
|
|
2002
2034
|
{
|
|
2003
|
-
"ml-ribbon--disabled": E(
|
|
2004
|
-
"ml-ribbon--minimized": E(
|
|
2005
|
-
"ml-ribbon--keytips-open": E(
|
|
2035
|
+
"ml-ribbon--disabled": E(I).disabled.value,
|
|
2036
|
+
"ml-ribbon--minimized": E(I).minimized.value,
|
|
2037
|
+
"ml-ribbon--keytips-open": E(I).keyTipsOpen.value
|
|
2006
2038
|
}
|
|
2007
2039
|
]]),
|
|
2008
|
-
inert: E(
|
|
2009
|
-
"aria-disabled": E(
|
|
2040
|
+
inert: E(I).disabled.value,
|
|
2041
|
+
"aria-disabled": E(I).disabled.value
|
|
2010
2042
|
}, [
|
|
2011
2043
|
a("header", {
|
|
2012
2044
|
ref_key: "ribbonHeaderRef",
|
|
2013
|
-
ref:
|
|
2045
|
+
ref: U,
|
|
2014
2046
|
class: "ml-ribbon__header"
|
|
2015
2047
|
}, [
|
|
2016
|
-
a("div",
|
|
2017
|
-
s.showFileMenu ? (v(), n(
|
|
2048
|
+
a("div", ht, [
|
|
2049
|
+
s.showFileMenu ? (v(), n(De, {
|
|
2018
2050
|
key: 0,
|
|
2019
2051
|
items: s.fileMenuItems,
|
|
2020
|
-
disabled: E(
|
|
2021
|
-
label:
|
|
2022
|
-
"open-backstage-label":
|
|
2052
|
+
disabled: E(I).disabled.value,
|
|
2053
|
+
label: X.value.fileMenuLabel,
|
|
2054
|
+
"open-backstage-label": X.value.fileMenuOpenBackstageLabel,
|
|
2023
2055
|
"show-open-backstage": s.showOpenBackstage,
|
|
2024
2056
|
onSelect: He,
|
|
2025
2057
|
onOpenBackstage: Ue
|
|
@@ -2030,11 +2062,11 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2030
2062
|
"open-backstage-label",
|
|
2031
2063
|
"show-open-backstage"
|
|
2032
2064
|
])) : r("", !0),
|
|
2033
|
-
c(
|
|
2034
|
-
tabs: E(
|
|
2035
|
-
"active-tab": E(
|
|
2036
|
-
disabled: E(
|
|
2037
|
-
"default-contextual-title":
|
|
2065
|
+
c(Te, {
|
|
2066
|
+
tabs: E(ie),
|
|
2067
|
+
"active-tab": E(I).activeTab.value,
|
|
2068
|
+
disabled: E(I).disabled.value,
|
|
2069
|
+
"default-contextual-title": X.value.contextualTabDefaultTitle,
|
|
2038
2070
|
onSelect: ze
|
|
2039
2071
|
}, null, 8, [
|
|
2040
2072
|
"tabs",
|
|
@@ -2042,20 +2074,20 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2042
2074
|
"disabled",
|
|
2043
2075
|
"default-contextual-title"
|
|
2044
2076
|
]),
|
|
2045
|
-
|
|
2077
|
+
N.hideMinimizeButton ? r("", !0) : (v(), n(E(z), {
|
|
2046
2078
|
key: 1,
|
|
2047
|
-
content:
|
|
2048
|
-
"show-after":
|
|
2049
|
-
"hide-after":
|
|
2079
|
+
content: X.value.minimizeTooltip,
|
|
2080
|
+
"show-after": xe.value,
|
|
2081
|
+
"hide-after": Se.value
|
|
2050
2082
|
}, {
|
|
2051
2083
|
default: O(() => [c(E(ee), {
|
|
2052
2084
|
class: m([
|
|
2053
2085
|
"ml-ribbon__control",
|
|
2054
2086
|
"ml-ribbon__control--minimize",
|
|
2055
|
-
E(
|
|
2087
|
+
E(I).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
2056
2088
|
]),
|
|
2057
|
-
icon:
|
|
2058
|
-
disabled: E(
|
|
2089
|
+
icon: Ce.value,
|
|
2090
|
+
disabled: E(I).disabled.value,
|
|
2059
2091
|
onClick: Ve
|
|
2060
2092
|
}, null, 8, [
|
|
2061
2093
|
"class",
|
|
@@ -2069,18 +2101,18 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2069
2101
|
"hide-after"
|
|
2070
2102
|
]))
|
|
2071
2103
|
]),
|
|
2072
|
-
a("div",
|
|
2073
|
-
|
|
2104
|
+
a("div", gt, [
|
|
2105
|
+
N.hideLayoutSwitcher ? r("", !0) : (v(), n(E(z), {
|
|
2074
2106
|
key: 0,
|
|
2075
|
-
content:
|
|
2076
|
-
"show-after":
|
|
2077
|
-
"hide-after":
|
|
2107
|
+
content: X.value.layoutSwitcherTooltip,
|
|
2108
|
+
"show-after": xe.value,
|
|
2109
|
+
"hide-after": Se.value
|
|
2078
2110
|
}, {
|
|
2079
2111
|
default: O(() => [c(E(ee), {
|
|
2080
2112
|
circle: "",
|
|
2081
2113
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
2082
|
-
icon: E(
|
|
2083
|
-
disabled: E(
|
|
2114
|
+
icon: E(ue),
|
|
2115
|
+
disabled: E(I).disabled.value,
|
|
2084
2116
|
onClick: Be
|
|
2085
2117
|
}, null, 8, ["icon", "disabled"])]),
|
|
2086
2118
|
_: 1
|
|
@@ -2089,51 +2121,51 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2089
2121
|
"show-after",
|
|
2090
2122
|
"hide-after"
|
|
2091
2123
|
])),
|
|
2092
|
-
|
|
2124
|
+
N.hideKeyTipsToggle ? r("", !0) : (v(), n(E(R), {
|
|
2093
2125
|
key: 1,
|
|
2094
2126
|
"inline-prompt": "",
|
|
2095
2127
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
2096
|
-
"active-text":
|
|
2097
|
-
"inactive-text":
|
|
2098
|
-
"model-value": E(
|
|
2099
|
-
disabled: E(
|
|
2100
|
-
onChange: l[0] ||= (e) => E(
|
|
2128
|
+
"active-text": X.value.keyTipsToggleText,
|
|
2129
|
+
"inactive-text": X.value.keyTipsToggleText,
|
|
2130
|
+
"model-value": E(I).keyTipsOpen.value,
|
|
2131
|
+
disabled: E(I).disabled.value,
|
|
2132
|
+
onChange: l[0] ||= (e) => E(I).keyTipsOpen.value = !E(I).keyTipsOpen.value
|
|
2101
2133
|
}, null, 8, [
|
|
2102
2134
|
"active-text",
|
|
2103
2135
|
"inactive-text",
|
|
2104
2136
|
"model-value",
|
|
2105
2137
|
"disabled"
|
|
2106
2138
|
])),
|
|
2107
|
-
t.$slots["tabs-extra"] ? (v(), i("div",
|
|
2108
|
-
activeTab: E(
|
|
2109
|
-
layout: E(
|
|
2110
|
-
minimized: E(
|
|
2111
|
-
disabled: E(
|
|
2139
|
+
t.$slots["tabs-extra"] ? (v(), i("div", _t, [S(t.$slots, "tabs-extra", {
|
|
2140
|
+
activeTab: E(I).activeTab.value,
|
|
2141
|
+
layout: E(I).layout.value,
|
|
2142
|
+
minimized: E(I).minimized.value,
|
|
2143
|
+
disabled: E(I).disabled.value
|
|
2112
2144
|
})])) : r("", !0)
|
|
2113
2145
|
]),
|
|
2114
|
-
|
|
2146
|
+
L.value ? (v(), n(E(ae), {
|
|
2115
2147
|
key: 0,
|
|
2116
2148
|
placement: "bottom-start",
|
|
2117
|
-
visible:
|
|
2118
|
-
width:
|
|
2119
|
-
disabled: E(
|
|
2149
|
+
visible: K.value,
|
|
2150
|
+
width: pe.value || void 0,
|
|
2151
|
+
disabled: E(I).disabled.value || !E(I).minimized.value,
|
|
2120
2152
|
"show-arrow": !1,
|
|
2121
2153
|
offset: 0,
|
|
2122
|
-
"popper-class":
|
|
2154
|
+
"popper-class": be.value,
|
|
2123
2155
|
"onUpdate:visible": Ze
|
|
2124
2156
|
}, {
|
|
2125
2157
|
reference: O(() => [a("span", {
|
|
2126
2158
|
"aria-hidden": "true",
|
|
2127
2159
|
class: "ml-ribbon__minimized-anchor",
|
|
2128
|
-
style: h(
|
|
2160
|
+
style: h(me.value)
|
|
2129
2161
|
}, null, 4)]),
|
|
2130
|
-
default: O(() => [E(
|
|
2162
|
+
default: O(() => [E(I).layout.value === "classic" ? (v(), i("main", {
|
|
2131
2163
|
key: 0,
|
|
2132
2164
|
ref_key: "minimizedClassicPanelRef",
|
|
2133
|
-
ref:
|
|
2165
|
+
ref: G,
|
|
2134
2166
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
2135
|
-
"data-active-tab":
|
|
2136
|
-
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(
|
|
2167
|
+
"data-active-tab": L.value.id
|
|
2168
|
+
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(pt, {
|
|
2137
2169
|
id: e.id,
|
|
2138
2170
|
key: e.id,
|
|
2139
2171
|
"data-group-id": e.id,
|
|
@@ -2146,15 +2178,15 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2146
2178
|
launcher: e.launcher,
|
|
2147
2179
|
"show-launcher-icon": e.showLauncherIcon,
|
|
2148
2180
|
"group-model": e,
|
|
2149
|
-
"overflow-trigger-aria-label":
|
|
2150
|
-
"gallery-preview-fallback":
|
|
2151
|
-
disabled:
|
|
2181
|
+
"overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
|
|
2182
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2183
|
+
disabled: B.value,
|
|
2152
2184
|
onItemClick: l[2] ||= (e) => Q(e.groupId, e.itemId)
|
|
2153
2185
|
}, {
|
|
2154
|
-
default: O(() => [c(
|
|
2186
|
+
default: O(() => [c(it, {
|
|
2155
2187
|
group: e,
|
|
2156
|
-
"gallery-preview-fallback":
|
|
2157
|
-
disabled:
|
|
2188
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2189
|
+
disabled: B.value,
|
|
2158
2190
|
onItemClick: l[1] ||= (e) => Q(e.groupId, e.itemId)
|
|
2159
2191
|
}, null, 8, [
|
|
2160
2192
|
"group",
|
|
@@ -2177,29 +2209,29 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2177
2209
|
"overflow-trigger-aria-label",
|
|
2178
2210
|
"gallery-preview-fallback",
|
|
2179
2211
|
"disabled"
|
|
2180
|
-
]))), 128)), Ee.value.length ? (v(), i("section",
|
|
2212
|
+
]))), 128)), Ee.value.length ? (v(), i("section", yt, [a("div", bt, [c(E(ae), {
|
|
2181
2213
|
trigger: "click",
|
|
2182
2214
|
placement: "bottom-end",
|
|
2183
|
-
width:
|
|
2184
|
-
disabled:
|
|
2215
|
+
width: Oe.value,
|
|
2216
|
+
disabled: B.value,
|
|
2185
2217
|
"show-arrow": !1,
|
|
2186
|
-
"popper-class":
|
|
2187
|
-
onShow: l[4] ||= (e) => E(
|
|
2188
|
-
onHide: l[5] ||= (e) => E(
|
|
2218
|
+
"popper-class": ye.value,
|
|
2219
|
+
onShow: l[4] ||= (e) => E(I).overflowOpen.value = !0,
|
|
2220
|
+
onHide: l[5] ||= (e) => E(I).overflowOpen.value = !1
|
|
2189
2221
|
}, {
|
|
2190
2222
|
reference: O(() => [a("button", {
|
|
2191
2223
|
type: "button",
|
|
2192
2224
|
class: "ml-ribbon-overflow-trigger",
|
|
2193
|
-
"aria-label":
|
|
2194
|
-
disabled:
|
|
2195
|
-
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
2196
|
-
default: O(() => [a("div",
|
|
2225
|
+
"aria-label": X.value.overflowTriggerAriaLabel,
|
|
2226
|
+
disabled: B.value
|
|
2227
|
+
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, xt)]),
|
|
2228
|
+
default: O(() => [a("div", St, [(v(!0), i(e, null, x(Ee.value, (e) => (v(), i("section", {
|
|
2197
2229
|
key: e.id,
|
|
2198
2230
|
class: "ml-ribbon-overflow-group"
|
|
2199
|
-
}, [a("header",
|
|
2231
|
+
}, [a("header", Ct, w(e.title), 1), c(it, {
|
|
2200
2232
|
group: e,
|
|
2201
|
-
"gallery-preview-fallback":
|
|
2202
|
-
disabled:
|
|
2233
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2234
|
+
disabled: B.value,
|
|
2203
2235
|
onItemClick: l[3] ||= (e) => Q(e.groupId, e.itemId)
|
|
2204
2236
|
}, null, 8, [
|
|
2205
2237
|
"group",
|
|
@@ -2211,34 +2243,34 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2211
2243
|
"width",
|
|
2212
2244
|
"disabled",
|
|
2213
2245
|
"popper-class"
|
|
2214
|
-
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
2246
|
+
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, vt)) : (v(), i("main", {
|
|
2215
2247
|
key: 1,
|
|
2216
2248
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
2217
|
-
"data-active-tab":
|
|
2218
|
-
}, [(v(!0), i(e, null, x(
|
|
2249
|
+
"data-active-tab": L.value.id
|
|
2250
|
+
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(ae), {
|
|
2219
2251
|
key: e.id,
|
|
2220
2252
|
trigger: "click",
|
|
2221
2253
|
placement: "bottom-start",
|
|
2222
2254
|
width: 340,
|
|
2223
|
-
disabled:
|
|
2255
|
+
disabled: B.value,
|
|
2224
2256
|
"show-arrow": !1,
|
|
2225
|
-
"popper-class":
|
|
2257
|
+
"popper-class": ve.value
|
|
2226
2258
|
}, {
|
|
2227
2259
|
reference: O(() => [a("button", {
|
|
2228
2260
|
class: "ml-ribbon-simplified-group",
|
|
2229
2261
|
type: "button",
|
|
2230
|
-
disabled:
|
|
2231
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2262
|
+
disabled: B.value
|
|
2263
|
+
}, [Xe(e) ? (v(), n(E(F), {
|
|
2232
2264
|
key: 0,
|
|
2233
2265
|
class: "ml-ribbon-simplified-group__icon"
|
|
2234
2266
|
}, {
|
|
2235
2267
|
default: O(() => [(v(), n(C(Xe(e))))]),
|
|
2236
2268
|
_: 2
|
|
2237
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
2238
|
-
default: O(() => [a("div",
|
|
2239
|
-
group:
|
|
2240
|
-
"gallery-preview-fallback":
|
|
2241
|
-
disabled:
|
|
2269
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, Tt)]),
|
|
2270
|
+
default: O(() => [a("div", Et, [c(it, {
|
|
2271
|
+
group: ke(e),
|
|
2272
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2273
|
+
disabled: B.value,
|
|
2242
2274
|
onItemClick: l[6] ||= (e) => Q(e.groupId, e.itemId)
|
|
2243
2275
|
}, null, 8, [
|
|
2244
2276
|
"group",
|
|
@@ -2246,7 +2278,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2246
2278
|
"disabled"
|
|
2247
2279
|
])])]),
|
|
2248
2280
|
_: 2
|
|
2249
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2281
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, wt))]),
|
|
2250
2282
|
_: 1
|
|
2251
2283
|
}, 8, [
|
|
2252
2284
|
"visible",
|
|
@@ -2255,13 +2287,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2255
2287
|
"popper-class"
|
|
2256
2288
|
])) : r("", !0)
|
|
2257
2289
|
], 512),
|
|
2258
|
-
!E(
|
|
2290
|
+
!E(I).minimized.value && L.value && E(I).layout.value === "classic" ? (v(), i("main", {
|
|
2259
2291
|
key: 0,
|
|
2260
2292
|
class: "ml-ribbon__panel",
|
|
2261
|
-
"data-active-tab":
|
|
2293
|
+
"data-active-tab": L.value.id,
|
|
2262
2294
|
ref_key: "classicPanelRef",
|
|
2263
|
-
ref:
|
|
2264
|
-
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(
|
|
2295
|
+
ref: W
|
|
2296
|
+
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(pt, {
|
|
2265
2297
|
id: e.id,
|
|
2266
2298
|
key: e.id,
|
|
2267
2299
|
"data-group-id": e.id,
|
|
@@ -2274,15 +2306,15 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2274
2306
|
launcher: e.launcher,
|
|
2275
2307
|
"show-launcher-icon": e.showLauncherIcon,
|
|
2276
2308
|
"group-model": e,
|
|
2277
|
-
"overflow-trigger-aria-label":
|
|
2278
|
-
"gallery-preview-fallback":
|
|
2279
|
-
disabled:
|
|
2309
|
+
"overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
|
|
2310
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2311
|
+
disabled: B.value,
|
|
2280
2312
|
onItemClick: l[8] ||= (e) => Q(e.groupId, e.itemId)
|
|
2281
2313
|
}, {
|
|
2282
|
-
default: O(() => [c(
|
|
2314
|
+
default: O(() => [c(it, {
|
|
2283
2315
|
group: e,
|
|
2284
|
-
"gallery-preview-fallback":
|
|
2285
|
-
disabled:
|
|
2316
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2317
|
+
disabled: B.value,
|
|
2286
2318
|
onItemClick: l[7] ||= (e) => Q(e.groupId, e.itemId)
|
|
2287
2319
|
}, null, 8, [
|
|
2288
2320
|
"group",
|
|
@@ -2305,28 +2337,28 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2305
2337
|
"overflow-trigger-aria-label",
|
|
2306
2338
|
"gallery-preview-fallback",
|
|
2307
2339
|
"disabled"
|
|
2308
|
-
]))), 128)), Ee.value.length ? (v(), i("section",
|
|
2340
|
+
]))), 128)), Ee.value.length ? (v(), i("section", Ot, [a("div", kt, [c(E(ae), {
|
|
2309
2341
|
trigger: "click",
|
|
2310
2342
|
placement: "bottom-end",
|
|
2311
|
-
width:
|
|
2312
|
-
disabled:
|
|
2313
|
-
"popper-class":
|
|
2314
|
-
onShow: l[10] ||= (e) => E(
|
|
2315
|
-
onHide: l[11] ||= (e) => E(
|
|
2343
|
+
width: Oe.value,
|
|
2344
|
+
disabled: B.value,
|
|
2345
|
+
"popper-class": ye.value,
|
|
2346
|
+
onShow: l[10] ||= (e) => E(I).overflowOpen.value = !0,
|
|
2347
|
+
onHide: l[11] ||= (e) => E(I).overflowOpen.value = !1
|
|
2316
2348
|
}, {
|
|
2317
2349
|
reference: O(() => [a("button", {
|
|
2318
2350
|
type: "button",
|
|
2319
2351
|
class: "ml-ribbon-overflow-trigger",
|
|
2320
|
-
"aria-label":
|
|
2321
|
-
disabled:
|
|
2322
|
-
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
2323
|
-
default: O(() => [a("div",
|
|
2352
|
+
"aria-label": X.value.overflowTriggerAriaLabel,
|
|
2353
|
+
disabled: B.value
|
|
2354
|
+
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, At)]),
|
|
2355
|
+
default: O(() => [a("div", jt, [(v(!0), i(e, null, x(Ee.value, (e) => (v(), i("section", {
|
|
2324
2356
|
key: e.id,
|
|
2325
2357
|
class: "ml-ribbon-overflow-group"
|
|
2326
|
-
}, [a("header",
|
|
2358
|
+
}, [a("header", Mt, w(e.title), 1), c(it, {
|
|
2327
2359
|
group: e,
|
|
2328
|
-
"gallery-preview-fallback":
|
|
2329
|
-
disabled:
|
|
2360
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2361
|
+
disabled: B.value,
|
|
2330
2362
|
onItemClick: l[9] ||= (e) => Q(e.groupId, e.itemId)
|
|
2331
2363
|
}, null, 8, [
|
|
2332
2364
|
"group",
|
|
@@ -2338,34 +2370,34 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2338
2370
|
"width",
|
|
2339
2371
|
"disabled",
|
|
2340
2372
|
"popper-class"
|
|
2341
|
-
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
2342
|
-
!E(
|
|
2373
|
+
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, Dt)) : r("", !0),
|
|
2374
|
+
!E(I).minimized.value && L.value && E(I).layout.value === "simplified" ? (v(), i("main", {
|
|
2343
2375
|
key: 1,
|
|
2344
2376
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
2345
|
-
"data-active-tab":
|
|
2346
|
-
}, [(v(!0), i(e, null, x(
|
|
2377
|
+
"data-active-tab": L.value.id
|
|
2378
|
+
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(ae), {
|
|
2347
2379
|
key: e.id,
|
|
2348
2380
|
trigger: "click",
|
|
2349
2381
|
placement: "bottom-start",
|
|
2350
2382
|
width: 340,
|
|
2351
|
-
disabled:
|
|
2352
|
-
"popper-class":
|
|
2383
|
+
disabled: B.value,
|
|
2384
|
+
"popper-class": ve.value
|
|
2353
2385
|
}, {
|
|
2354
2386
|
reference: O(() => [a("button", {
|
|
2355
2387
|
class: "ml-ribbon-simplified-group",
|
|
2356
2388
|
type: "button",
|
|
2357
|
-
disabled:
|
|
2358
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2389
|
+
disabled: B.value
|
|
2390
|
+
}, [Xe(e) ? (v(), n(E(F), {
|
|
2359
2391
|
key: 0,
|
|
2360
2392
|
class: "ml-ribbon-simplified-group__icon"
|
|
2361
2393
|
}, {
|
|
2362
2394
|
default: O(() => [(v(), n(C(Xe(e))))]),
|
|
2363
2395
|
_: 2
|
|
2364
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
2365
|
-
default: O(() => [a("div",
|
|
2366
|
-
group:
|
|
2367
|
-
"gallery-preview-fallback":
|
|
2368
|
-
disabled:
|
|
2396
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, Pt)]),
|
|
2397
|
+
default: O(() => [a("div", Ft, [c(it, {
|
|
2398
|
+
group: ke(e),
|
|
2399
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2400
|
+
disabled: B.value,
|
|
2369
2401
|
onItemClick: l[12] ||= (e) => Q(e.groupId, e.itemId)
|
|
2370
2402
|
}, null, 8, [
|
|
2371
2403
|
"group",
|
|
@@ -2373,24 +2405,24 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2373
2405
|
"disabled"
|
|
2374
2406
|
])])]),
|
|
2375
2407
|
_: 2
|
|
2376
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2377
|
-
c(
|
|
2378
|
-
open: E(
|
|
2379
|
-
size:
|
|
2380
|
-
"back-label":
|
|
2381
|
-
title:
|
|
2382
|
-
description:
|
|
2408
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, Nt)) : r("", !0),
|
|
2409
|
+
c(Y, {
|
|
2410
|
+
open: E(I).backdropOpen.value,
|
|
2411
|
+
size: _e.value,
|
|
2412
|
+
"back-label": X.value.backstageBackLabel,
|
|
2413
|
+
title: X.value.backstageTitle,
|
|
2414
|
+
description: X.value.backstageDescription,
|
|
2383
2415
|
onClose: We
|
|
2384
2416
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
2385
2417
|
name: "default",
|
|
2386
2418
|
fn: O(() => [S(t.$slots, "backstage", {
|
|
2387
2419
|
close: We,
|
|
2388
|
-
open: E(
|
|
2389
|
-
size:
|
|
2390
|
-
backLabel:
|
|
2391
|
-
title:
|
|
2392
|
-
description:
|
|
2393
|
-
disabled: E(
|
|
2420
|
+
open: E(I).backdropOpen.value,
|
|
2421
|
+
size: _e.value,
|
|
2422
|
+
backLabel: X.value.backstageBackLabel,
|
|
2423
|
+
title: X.value.backstageTitle,
|
|
2424
|
+
description: X.value.backstageDescription,
|
|
2425
|
+
disabled: E(I).disabled.value
|
|
2394
2426
|
})]),
|
|
2395
2427
|
key: "0"
|
|
2396
2428
|
} : void 0]), 1032, [
|
|
@@ -2400,14 +2432,14 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2400
2432
|
"title",
|
|
2401
2433
|
"description"
|
|
2402
2434
|
])
|
|
2403
|
-
], 10,
|
|
2435
|
+
], 10, mt))]),
|
|
2404
2436
|
_: 3
|
|
2405
2437
|
}, 8, ["size"]));
|
|
2406
2438
|
}
|
|
2407
|
-
}),
|
|
2439
|
+
}), Rt = {
|
|
2408
2440
|
class: "ml-ribbon-tab-definition",
|
|
2409
2441
|
hidden: ""
|
|
2410
|
-
},
|
|
2442
|
+
}, zt = /* @__PURE__ */ l({
|
|
2411
2443
|
__name: "RibbonTab",
|
|
2412
2444
|
props: {
|
|
2413
2445
|
id: {},
|
|
@@ -2418,13 +2450,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2418
2450
|
contextualTitle: {}
|
|
2419
2451
|
},
|
|
2420
2452
|
setup(e) {
|
|
2421
|
-
return (e, t) => (v(), i("div",
|
|
2453
|
+
return (e, t) => (v(), i("div", Rt, [S(e.$slots, "default")]));
|
|
2422
2454
|
}
|
|
2423
|
-
}),
|
|
2455
|
+
}), Bt = {
|
|
2424
2456
|
key: 0,
|
|
2425
2457
|
class: "ml-ribbon-keytips",
|
|
2426
2458
|
"aria-live": "polite"
|
|
2427
|
-
},
|
|
2459
|
+
}, Vt = { class: "ml-ribbon-keytips__hint" }, Ht = /* @__PURE__ */ l({
|
|
2428
2460
|
__name: "RibbonKeyTips",
|
|
2429
2461
|
props: {
|
|
2430
2462
|
open: { type: Boolean },
|
|
@@ -2459,11 +2491,11 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2459
2491
|
}
|
|
2460
2492
|
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), D(() => s.open, (e) => {
|
|
2461
2493
|
e || y();
|
|
2462
|
-
}), (t, o) => n.open ? (v(), i("div",
|
|
2494
|
+
}), (t, o) => n.open ? (v(), i("div", Bt, [a("div", Vt, w(f.value), 1), (v(!0), i(e, null, x(u.value, (e) => (v(), i("span", {
|
|
2463
2495
|
key: e.id,
|
|
2464
2496
|
class: "ml-ribbon-keytip"
|
|
2465
2497
|
}, w(e.key), 1))), 128))])) : r("", !0);
|
|
2466
2498
|
}
|
|
2467
2499
|
});
|
|
2468
2500
|
//#endregion
|
|
2469
|
-
export {
|
|
2501
|
+
export { Lt as MlRibbon, Y as MlRibbonBackstage, Ae as MlRibbonButton, Pe as MlRibbonButtonGroup, Oe as MlRibbonCollection, Te as MlRibbonContextualTabs, ze as MlRibbonDropdown, De as MlRibbonFileMenu, Ke as MlRibbonGallery, pt as MlRibbonGroup, rt as MlRibbonItemHost, Ht as MlRibbonKeyTips, $ as MlRibbonSegmented, zt as MlRibbonTab, xe as MlRibbonTabs, et as MlRibbonTemplateItem, Qe as MlRibbonToggleButton };
|