@mlightcad/ribbon 0.1.0 → 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 +6 -1
- package/dist/components/RibbonGroup.vue.d.ts +2 -3
- package/dist/components/RibbonGroupContent.vue.d.ts +1 -0
- package/dist/components/RibbonItemHost.vue.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- 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 +728 -649
- package/dist/ml-ribbon.umd.js +1 -1
- package/dist/types.d.ts +3 -2
- 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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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,116 +928,132 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
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: {},
|
|
933
940
|
item: {},
|
|
934
941
|
groupId: {},
|
|
935
|
-
galleryPreviewFallback: {}
|
|
942
|
+
galleryPreviewFallback: {},
|
|
943
|
+
disabled: { type: Boolean }
|
|
936
944
|
},
|
|
937
945
|
emits: ["item-click"],
|
|
938
946
|
setup(o, { emit: c }) {
|
|
939
|
-
let l = o,
|
|
940
|
-
if (!
|
|
941
|
-
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();
|
|
942
950
|
return e ? R.value.toLowerCase().startsWith(e) : !0;
|
|
943
|
-
}),
|
|
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(() => {
|
|
944
952
|
let e = l.item.props?.component;
|
|
945
|
-
return !e || typeof e == "string" ? null : e;
|
|
946
|
-
}),
|
|
953
|
+
return !e || typeof e == "string" ? null : d(T(e));
|
|
954
|
+
}), de = t(() => {
|
|
947
955
|
let e = l.item.props?.componentProps;
|
|
948
956
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
949
|
-
}),
|
|
957
|
+
}), U = t(() => l.item.props?.wrap !== !1), W = t(() => l.item.props?.equalWidth === !0), G = t(() => {
|
|
950
958
|
let e = l.item.props?.buttonSize;
|
|
951
959
|
if (e === "large" || e === "default" || e === "small") return e;
|
|
952
|
-
}), K = t(() =>
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
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;
|
|
956
967
|
});
|
|
957
968
|
D(() => l.item.id, () => {
|
|
958
|
-
|
|
969
|
+
N.value = void 0;
|
|
959
970
|
});
|
|
960
|
-
function
|
|
961
|
-
|
|
971
|
+
function Y() {
|
|
972
|
+
V.value || p("item-click", l.id);
|
|
962
973
|
}
|
|
963
|
-
function
|
|
964
|
-
if (!
|
|
974
|
+
function be(e) {
|
|
975
|
+
if (!V.value) {
|
|
965
976
|
if (typeof e == "string" || typeof e == "number") {
|
|
966
|
-
|
|
977
|
+
p("item-click", String(e));
|
|
967
978
|
return;
|
|
968
979
|
}
|
|
969
|
-
|
|
980
|
+
Y();
|
|
970
981
|
}
|
|
971
982
|
}
|
|
972
|
-
function
|
|
973
|
-
|
|
983
|
+
function X(e) {
|
|
984
|
+
N.value = e;
|
|
974
985
|
}
|
|
975
|
-
function
|
|
976
|
-
if (!
|
|
986
|
+
function xe(e) {
|
|
987
|
+
if (!V.value) {
|
|
977
988
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
978
|
-
|
|
989
|
+
p("item-click", String(e));
|
|
979
990
|
return;
|
|
980
991
|
}
|
|
981
|
-
|
|
992
|
+
Y();
|
|
982
993
|
}
|
|
983
994
|
}
|
|
984
|
-
function
|
|
985
|
-
if (
|
|
995
|
+
function Se(e) {
|
|
996
|
+
if (V.value) return;
|
|
986
997
|
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
987
998
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
988
|
-
|
|
999
|
+
p("item-click", String(t));
|
|
989
1000
|
return;
|
|
990
1001
|
}
|
|
991
|
-
|
|
1002
|
+
p("item-click", String(e));
|
|
992
1003
|
}
|
|
993
|
-
function
|
|
994
|
-
if (!
|
|
1004
|
+
function Ce(e) {
|
|
1005
|
+
if (!V.value) {
|
|
995
1006
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
996
|
-
|
|
1007
|
+
p("item-click", String(e));
|
|
997
1008
|
return;
|
|
998
1009
|
}
|
|
999
|
-
|
|
1010
|
+
Y();
|
|
1000
1011
|
}
|
|
1001
1012
|
}
|
|
1002
|
-
function
|
|
1003
|
-
|
|
1013
|
+
function we(e) {
|
|
1014
|
+
V.value || p("item-click", e);
|
|
1015
|
+
}
|
|
1016
|
+
function Te(e) {
|
|
1017
|
+
if (!V.value) {
|
|
1004
1018
|
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1005
|
-
|
|
1019
|
+
p("item-click", String(e));
|
|
1006
1020
|
return;
|
|
1007
1021
|
}
|
|
1008
|
-
|
|
1022
|
+
Y();
|
|
1009
1023
|
}
|
|
1010
1024
|
}
|
|
1011
|
-
function
|
|
1012
|
-
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) {
|
|
1013
1036
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1014
|
-
|
|
1037
|
+
p("item-click", String(e));
|
|
1015
1038
|
return;
|
|
1016
1039
|
}
|
|
1017
|
-
|
|
1040
|
+
Y();
|
|
1018
1041
|
}
|
|
1019
1042
|
}
|
|
1020
|
-
function
|
|
1043
|
+
function Oe(e) {
|
|
1021
1044
|
if (!e || typeof e != "object") return;
|
|
1022
1045
|
let t = e.label;
|
|
1023
1046
|
return typeof t == "string" ? t : void 0;
|
|
1024
1047
|
}
|
|
1025
|
-
function
|
|
1048
|
+
function ke(e) {
|
|
1026
1049
|
if (typeof e != "string") return;
|
|
1027
1050
|
let t = e.trim();
|
|
1028
1051
|
return t.length > 0 ? t : void 0;
|
|
1029
1052
|
}
|
|
1030
|
-
function
|
|
1053
|
+
function je(e, t) {
|
|
1031
1054
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1032
1055
|
}
|
|
1033
|
-
function
|
|
1056
|
+
function Me(e, t) {
|
|
1034
1057
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1035
1058
|
if (typeof e == "string") {
|
|
1036
1059
|
let n = e.trim();
|
|
@@ -1038,35 +1061,35 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1038
1061
|
}
|
|
1039
1062
|
return t;
|
|
1040
1063
|
}
|
|
1041
|
-
function
|
|
1064
|
+
function Ne(e) {
|
|
1042
1065
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1043
1066
|
if (typeof e == "string") {
|
|
1044
1067
|
let t = e.trim();
|
|
1045
1068
|
return t ? t.toLowerCase() === "full" ? "100%" : t : void 0;
|
|
1046
1069
|
}
|
|
1047
1070
|
}
|
|
1048
|
-
function
|
|
1071
|
+
function Fe(e) {
|
|
1049
1072
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1050
1073
|
if (typeof e != "string") return;
|
|
1051
1074
|
let t = e.trim();
|
|
1052
1075
|
return t.length > 0 ? t : void 0;
|
|
1053
1076
|
}
|
|
1054
|
-
function
|
|
1077
|
+
function Ie(e) {
|
|
1055
1078
|
if (!(typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e))) return Math.max(1, Math.round(e));
|
|
1056
1079
|
}
|
|
1057
|
-
function
|
|
1058
|
-
let t =
|
|
1080
|
+
function Le(e) {
|
|
1081
|
+
let t = _.value.map((e) => Oe(e)).filter((e) => !!e);
|
|
1059
1082
|
if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
|
|
1060
1083
|
}
|
|
1061
|
-
function
|
|
1084
|
+
function Z(e) {
|
|
1062
1085
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1063
1086
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
1064
1087
|
}
|
|
1065
|
-
return (t, c) => (v(), n(E(
|
|
1066
|
-
content:
|
|
1067
|
-
disabled:
|
|
1068
|
-
"show-after":
|
|
1069
|
-
"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,
|
|
1070
1093
|
placement: "top",
|
|
1071
1094
|
effect: "dark"
|
|
1072
1095
|
}, {
|
|
@@ -1076,26 +1099,26 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1076
1099
|
`type-${o.item.type}`,
|
|
1077
1100
|
{
|
|
1078
1101
|
"is-label-hidden": o.item.hideLabel === !0,
|
|
1079
|
-
"is-label-wrap":
|
|
1102
|
+
"is-label-wrap": ve.value
|
|
1080
1103
|
}
|
|
1081
1104
|
]]),
|
|
1082
|
-
style: h(
|
|
1105
|
+
style: h(ye.value),
|
|
1083
1106
|
"data-item-id": o.id,
|
|
1084
1107
|
role: "group"
|
|
1085
|
-
}, [
|
|
1108
|
+
}, [B.value ? (v(), i("span", nt, w(R.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Pe, {
|
|
1086
1109
|
key: 1,
|
|
1087
1110
|
id: o.item.id,
|
|
1088
1111
|
label: o.item.label ?? "",
|
|
1089
1112
|
options: o.item.props?.options ?? [],
|
|
1090
1113
|
"hide-label": o.item.hideLabel === !0,
|
|
1091
|
-
wrap:
|
|
1092
|
-
"equal-width":
|
|
1114
|
+
wrap: U.value,
|
|
1115
|
+
"equal-width": W.value,
|
|
1093
1116
|
"button-size": G.value,
|
|
1094
1117
|
"icon-size": K.value,
|
|
1095
|
-
"tooltip-show-after":
|
|
1096
|
-
"tooltip-hide-after":
|
|
1097
|
-
disabled:
|
|
1098
|
-
onChange:
|
|
1118
|
+
"tooltip-show-after": ee.value,
|
|
1119
|
+
"tooltip-hide-after": A.value,
|
|
1120
|
+
disabled: V.value,
|
|
1121
|
+
onChange: Ce
|
|
1099
1122
|
}, null, 8, [
|
|
1100
1123
|
"id",
|
|
1101
1124
|
"label",
|
|
@@ -1108,7 +1131,7 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1108
1131
|
"tooltip-show-after",
|
|
1109
1132
|
"tooltip-hide-after",
|
|
1110
1133
|
"disabled"
|
|
1111
|
-
])) : o.item.type === "segmented" ? (v(), n(
|
|
1134
|
+
])) : o.item.type === "segmented" ? (v(), n($, {
|
|
1112
1135
|
key: 2,
|
|
1113
1136
|
id: o.item.id,
|
|
1114
1137
|
label: o.item.label ?? o.item.id,
|
|
@@ -1116,9 +1139,9 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1116
1139
|
"model-value": o.item.props?.modelValue,
|
|
1117
1140
|
direction: o.item.props?.direction ?? "horizontal",
|
|
1118
1141
|
block: o.item.props?.block === !0,
|
|
1119
|
-
disabled:
|
|
1142
|
+
disabled: V.value,
|
|
1120
1143
|
"hide-label": o.item.hideLabel === !0,
|
|
1121
|
-
onChange:
|
|
1144
|
+
onChange: xe
|
|
1122
1145
|
}, null, 8, [
|
|
1123
1146
|
"id",
|
|
1124
1147
|
"label",
|
|
@@ -1128,18 +1151,18 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1128
1151
|
"block",
|
|
1129
1152
|
"disabled",
|
|
1130
1153
|
"hide-label"
|
|
1131
|
-
])) : o.item.type === "toggle" ? (v(), n(
|
|
1154
|
+
])) : o.item.type === "toggle" ? (v(), n(Qe, {
|
|
1132
1155
|
key: 3,
|
|
1133
1156
|
id: o.item.id,
|
|
1134
1157
|
label: o.item.label ?? o.item.id,
|
|
1135
1158
|
"model-value": H.value,
|
|
1136
1159
|
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1137
1160
|
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1138
|
-
"active-label":
|
|
1139
|
-
"inactive-label":
|
|
1140
|
-
disabled:
|
|
1161
|
+
"active-label": ce.value,
|
|
1162
|
+
"inactive-label": le.value,
|
|
1163
|
+
disabled: V.value,
|
|
1141
1164
|
"hide-label": o.item.hideLabel === !0,
|
|
1142
|
-
onChange:
|
|
1165
|
+
onChange: Se
|
|
1143
1166
|
}, null, 8, [
|
|
1144
1167
|
"id",
|
|
1145
1168
|
"label",
|
|
@@ -1150,31 +1173,31 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1150
1173
|
"inactive-label",
|
|
1151
1174
|
"disabled",
|
|
1152
1175
|
"hide-label"
|
|
1153
|
-
])) : o.item.type === "gallery" ? (v(), n(
|
|
1176
|
+
])) : o.item.type === "gallery" ? (v(), n(Ke, {
|
|
1154
1177
|
key: 4,
|
|
1155
1178
|
id: o.item.id,
|
|
1156
1179
|
label: o.item.label ?? "",
|
|
1157
1180
|
categories: o.item.props?.categories ?? [],
|
|
1158
1181
|
"preview-fallback": l.galleryPreviewFallback,
|
|
1159
|
-
disabled:
|
|
1160
|
-
onSelect:
|
|
1182
|
+
disabled: V.value,
|
|
1183
|
+
onSelect: we
|
|
1161
1184
|
}, null, 8, [
|
|
1162
1185
|
"id",
|
|
1163
1186
|
"label",
|
|
1164
1187
|
"categories",
|
|
1165
1188
|
"preview-fallback",
|
|
1166
1189
|
"disabled"
|
|
1167
|
-
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(
|
|
1190
|
+
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(et, {
|
|
1168
1191
|
key: 5,
|
|
1169
1192
|
id: o.item.id,
|
|
1170
1193
|
item: o.item,
|
|
1171
|
-
disabled:
|
|
1194
|
+
disabled: V.value
|
|
1172
1195
|
}, {
|
|
1173
|
-
default: O(() => [
|
|
1196
|
+
default: O(() => [ue.value ? (v(), n(C(ue.value), f({ key: 0 }, de.value, {
|
|
1174
1197
|
item: o.item,
|
|
1175
1198
|
"group-id": o.groupId,
|
|
1176
|
-
disabled:
|
|
1177
|
-
"emit-item-click":
|
|
1199
|
+
disabled: V.value,
|
|
1200
|
+
"emit-item-click": De
|
|
1178
1201
|
}), null, 16, [
|
|
1179
1202
|
"item",
|
|
1180
1203
|
"group-id",
|
|
@@ -1182,29 +1205,29 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1182
1205
|
])) : S(t.$slots, "template", {
|
|
1183
1206
|
key: 1,
|
|
1184
1207
|
item: o.item,
|
|
1185
|
-
disabled:
|
|
1208
|
+
disabled: V.value
|
|
1186
1209
|
})]),
|
|
1187
1210
|
_: 3
|
|
1188
1211
|
}, 8, [
|
|
1189
1212
|
"id",
|
|
1190
1213
|
"item",
|
|
1191
1214
|
"disabled"
|
|
1192
|
-
])) : o.item.type === "dropdown" ? (v(), n(
|
|
1215
|
+
])) : o.item.type === "dropdown" ? (v(), n(ze, {
|
|
1193
1216
|
key: 6,
|
|
1194
1217
|
id: o.item.id,
|
|
1195
1218
|
label: o.item.label ?? o.item.id,
|
|
1196
1219
|
tooltip: o.item.tooltip,
|
|
1197
|
-
icon:
|
|
1220
|
+
icon: j.value,
|
|
1198
1221
|
options: o.item.props?.options ?? [],
|
|
1199
|
-
disabled:
|
|
1222
|
+
disabled: V.value,
|
|
1200
1223
|
"hide-label": o.item.hideLabel === !0,
|
|
1201
1224
|
"item-size": o.item.size ?? "medium",
|
|
1202
1225
|
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1203
|
-
"tooltip-show-after":
|
|
1204
|
-
"tooltip-hide-after":
|
|
1205
|
-
onCommand:
|
|
1206
|
-
onTooltipChange:
|
|
1207
|
-
onClick:
|
|
1226
|
+
"tooltip-show-after": ee.value,
|
|
1227
|
+
"tooltip-hide-after": A.value,
|
|
1228
|
+
onCommand: be,
|
|
1229
|
+
onTooltipChange: X,
|
|
1230
|
+
onClick: Y
|
|
1208
1231
|
}, null, 8, [
|
|
1209
1232
|
"id",
|
|
1210
1233
|
"label",
|
|
@@ -1219,24 +1242,24 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1219
1242
|
"tooltip-hide-after"
|
|
1220
1243
|
])) : o.item.type === "checkbox" ? (v(), n(E(te), {
|
|
1221
1244
|
key: 7,
|
|
1222
|
-
disabled:
|
|
1223
|
-
onChange:
|
|
1245
|
+
disabled: V.value,
|
|
1246
|
+
onChange: Y
|
|
1224
1247
|
}, {
|
|
1225
1248
|
default: O(() => [s(w(o.item.label), 1)]),
|
|
1226
1249
|
_: 1
|
|
1227
1250
|
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(ne), {
|
|
1228
1251
|
key: 8,
|
|
1229
|
-
disabled:
|
|
1230
|
-
onChange:
|
|
1231
|
-
}, 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), {
|
|
1232
1255
|
key: 9,
|
|
1233
|
-
"model-value":
|
|
1234
|
-
disabled:
|
|
1235
|
-
"popper-class":
|
|
1236
|
-
style: h({ width:
|
|
1237
|
-
onChange:
|
|
1256
|
+
"model-value": me.value,
|
|
1257
|
+
disabled: V.value,
|
|
1258
|
+
"popper-class": re.value,
|
|
1259
|
+
style: h({ width: pe.value }),
|
|
1260
|
+
onChange: Te
|
|
1238
1261
|
}, {
|
|
1239
|
-
default: O(() => [(v(!0), i(e, null, x(
|
|
1262
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(ie), {
|
|
1240
1263
|
key: String(e.value),
|
|
1241
1264
|
label: String(e.label),
|
|
1242
1265
|
value: e.value
|
|
@@ -1247,15 +1270,25 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1247
1270
|
"disabled",
|
|
1248
1271
|
"popper-class",
|
|
1249
1272
|
"style"
|
|
1250
|
-
])) : (v(), n(
|
|
1251
|
-
|
|
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,
|
|
1252
1285
|
id: o.item.id,
|
|
1253
1286
|
label: o.item.label ?? o.item.id,
|
|
1254
|
-
icon:
|
|
1255
|
-
disabled:
|
|
1256
|
-
"hide-label": !
|
|
1257
|
-
"aria-label":
|
|
1258
|
-
onClick:
|
|
1287
|
+
icon: j.value,
|
|
1288
|
+
disabled: V.value,
|
|
1289
|
+
"hide-label": !M.value,
|
|
1290
|
+
"aria-label": L.value,
|
|
1291
|
+
onClick: Y
|
|
1259
1292
|
}, null, 8, [
|
|
1260
1293
|
"id",
|
|
1261
1294
|
"label",
|
|
@@ -1263,7 +1296,7 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1263
1296
|
"disabled",
|
|
1264
1297
|
"hide-label",
|
|
1265
1298
|
"aria-label"
|
|
1266
|
-
]))], 14,
|
|
1299
|
+
]))], 14, tt)]),
|
|
1267
1300
|
_: 3
|
|
1268
1301
|
}, 8, [
|
|
1269
1302
|
"content",
|
|
@@ -1272,27 +1305,29 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1272
1305
|
"hide-after"
|
|
1273
1306
|
]));
|
|
1274
1307
|
}
|
|
1275
|
-
}),
|
|
1308
|
+
}), it = /* @__PURE__ */ l({
|
|
1276
1309
|
__name: "RibbonGroupContent",
|
|
1277
1310
|
props: {
|
|
1278
1311
|
group: {},
|
|
1279
|
-
galleryPreviewFallback: {}
|
|
1312
|
+
galleryPreviewFallback: {},
|
|
1313
|
+
disabled: { type: Boolean }
|
|
1280
1314
|
},
|
|
1281
1315
|
emits: ["item-click"],
|
|
1282
1316
|
setup(t, { emit: r }) {
|
|
1283
1317
|
let a = t, o = r;
|
|
1284
|
-
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, {
|
|
1285
1319
|
id: t.id,
|
|
1286
1320
|
key: t.id,
|
|
1287
1321
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
1288
1322
|
rows: t.rows
|
|
1289
1323
|
}, {
|
|
1290
|
-
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, {
|
|
1291
1325
|
id: e.id,
|
|
1292
1326
|
key: e.id,
|
|
1293
1327
|
item: e,
|
|
1294
1328
|
"group-id": a.group.id,
|
|
1295
1329
|
"gallery-preview-fallback": a.galleryPreviewFallback,
|
|
1330
|
+
disabled: a.disabled,
|
|
1296
1331
|
onItemClick: r[0] ||= (e) => o("item-click", {
|
|
1297
1332
|
groupId: a.group.id,
|
|
1298
1333
|
itemId: e
|
|
@@ -1301,7 +1336,8 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1301
1336
|
"id",
|
|
1302
1337
|
"item",
|
|
1303
1338
|
"group-id",
|
|
1304
|
-
"gallery-preview-fallback"
|
|
1339
|
+
"gallery-preview-fallback",
|
|
1340
|
+
"disabled"
|
|
1305
1341
|
]))), 128))]),
|
|
1306
1342
|
_: 2
|
|
1307
1343
|
}, 1032, [
|
|
@@ -1310,15 +1346,15 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1310
1346
|
"rows"
|
|
1311
1347
|
]))), 128))], 2));
|
|
1312
1348
|
}
|
|
1313
|
-
}),
|
|
1349
|
+
}), at = ["data-priority"], ot = { class: "ml-ribbon-group__body" }, st = { class: "ml-ribbon-group__footer" }, ct = { class: "ml-ribbon-group__title" }, lt = [
|
|
1314
1350
|
"aria-label",
|
|
1315
1351
|
"aria-expanded",
|
|
1316
1352
|
"disabled"
|
|
1317
|
-
],
|
|
1353
|
+
], ut = { class: "ml-ribbon-group__overflow-content" }, dt = [
|
|
1318
1354
|
"aria-label",
|
|
1319
1355
|
"aria-expanded",
|
|
1320
1356
|
"disabled"
|
|
1321
|
-
],
|
|
1357
|
+
], ft = { class: "ml-ribbon-group__overflow-content" }, pt = /* @__PURE__ */ l({
|
|
1322
1358
|
__name: "RibbonGroup",
|
|
1323
1359
|
props: {
|
|
1324
1360
|
id: {},
|
|
@@ -1326,18 +1362,18 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1326
1362
|
icon: {},
|
|
1327
1363
|
groupIconCss: {},
|
|
1328
1364
|
orientation: {},
|
|
1329
|
-
autoWidth: { type: Boolean },
|
|
1330
1365
|
width: {},
|
|
1331
1366
|
priority: {},
|
|
1332
1367
|
launcher: { type: Boolean },
|
|
1333
1368
|
showLauncherIcon: { type: Boolean },
|
|
1334
1369
|
groupModel: {},
|
|
1335
1370
|
overflowTriggerAriaLabel: {},
|
|
1336
|
-
galleryPreviewFallback: {}
|
|
1371
|
+
galleryPreviewFallback: {},
|
|
1372
|
+
disabled: { type: Boolean }
|
|
1337
1373
|
},
|
|
1338
1374
|
emits: ["item-click"],
|
|
1339
1375
|
setup(e, { emit: o }) {
|
|
1340
|
-
let s = e, l = o, d = u(
|
|
1376
|
+
let s = e, l = o, d = u(fe, null), f = t(() => s.width == null), y = t(() => {
|
|
1341
1377
|
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
1342
1378
|
let e = `${s.width}px`;
|
|
1343
1379
|
return {
|
|
@@ -1346,13 +1382,13 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1346
1382
|
maxWidth: e,
|
|
1347
1383
|
flex: `0 0 ${e}`
|
|
1348
1384
|
};
|
|
1349
|
-
}), x = t(() => 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: [{
|
|
1350
1386
|
name: "offset",
|
|
1351
1387
|
options: { offset: [ne.value, 8] }
|
|
1352
|
-
}] })),
|
|
1388
|
+
}] })), I = t(() => ({ modifiers: [{
|
|
1353
1389
|
name: "offset",
|
|
1354
|
-
options: { offset: [
|
|
1355
|
-
}] })),
|
|
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(() => {
|
|
1356
1392
|
if (!s.groupModel || !k.value.length) return null;
|
|
1357
1393
|
let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
|
|
1358
1394
|
...t,
|
|
@@ -1362,7 +1398,7 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1362
1398
|
...s.groupModel,
|
|
1363
1399
|
collections: t
|
|
1364
1400
|
} : null;
|
|
1365
|
-
}),
|
|
1401
|
+
}), ce = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
1366
1402
|
id: `${s.groupModel.id}-footer-menu`,
|
|
1367
1403
|
title: "",
|
|
1368
1404
|
orientation: "row",
|
|
@@ -1372,7 +1408,7 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1372
1408
|
items: s.groupModel.footerMenuItems
|
|
1373
1409
|
}]
|
|
1374
1410
|
} : null);
|
|
1375
|
-
function
|
|
1411
|
+
function le() {
|
|
1376
1412
|
let e = T.value?.querySelector(".ml-ribbon-group__content");
|
|
1377
1413
|
if (!e) {
|
|
1378
1414
|
k.value.length > 0 && (k.value = []);
|
|
@@ -1391,12 +1427,12 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1391
1427
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
1392
1428
|
}), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
|
|
1393
1429
|
}
|
|
1394
|
-
function
|
|
1430
|
+
function ue() {
|
|
1395
1431
|
p(() => {
|
|
1396
|
-
|
|
1432
|
+
he(), U(), W(), le();
|
|
1397
1433
|
});
|
|
1398
1434
|
}
|
|
1399
|
-
function
|
|
1435
|
+
function U() {
|
|
1400
1436
|
let e = T.value?.getBoundingClientRect(), t = A.value?.getBoundingClientRect();
|
|
1401
1437
|
if (!e || !t) {
|
|
1402
1438
|
ne.value !== 0 && (ne.value = 0);
|
|
@@ -1405,120 +1441,130 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1405
1441
|
let n = Math.round(e.left - t.left);
|
|
1406
1442
|
ne.value !== n && (ne.value = n);
|
|
1407
1443
|
}
|
|
1408
|
-
function
|
|
1444
|
+
function W() {
|
|
1409
1445
|
let e = T.value?.getBoundingClientRect(), t = te.value?.getBoundingClientRect();
|
|
1410
1446
|
if (!e || !t) {
|
|
1411
|
-
|
|
1447
|
+
re.value !== 0 && (re.value = 0);
|
|
1412
1448
|
return;
|
|
1413
1449
|
}
|
|
1414
1450
|
let n = Math.round(e.left - t.left);
|
|
1415
|
-
|
|
1451
|
+
re.value !== n && (re.value = n);
|
|
1416
1452
|
}
|
|
1417
|
-
function
|
|
1418
|
-
|
|
1453
|
+
function G(e) {
|
|
1454
|
+
R.value = e;
|
|
1419
1455
|
}
|
|
1420
|
-
function
|
|
1421
|
-
|
|
1456
|
+
function K(e) {
|
|
1457
|
+
z.value = e;
|
|
1422
1458
|
}
|
|
1423
|
-
function
|
|
1424
|
-
x.value || (
|
|
1459
|
+
function pe() {
|
|
1460
|
+
x.value || (R.value = !R.value);
|
|
1425
1461
|
}
|
|
1426
|
-
function
|
|
1427
|
-
x.value || (
|
|
1462
|
+
function me() {
|
|
1463
|
+
x.value || (z.value = !z.value);
|
|
1428
1464
|
}
|
|
1429
|
-
let
|
|
1430
|
-
function
|
|
1431
|
-
if (!
|
|
1465
|
+
let q = null, J = null;
|
|
1466
|
+
function he() {
|
|
1467
|
+
if (!q) return;
|
|
1432
1468
|
let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1433
|
-
|
|
1469
|
+
J !== e && (J && q.unobserve(J), e && q.observe(e), J = e);
|
|
1434
1470
|
}
|
|
1435
1471
|
return D(() => s.groupModel, () => {
|
|
1436
|
-
|
|
1472
|
+
ue();
|
|
1437
1473
|
}, { deep: !0 }), D(x, (e) => {
|
|
1438
|
-
e && (
|
|
1474
|
+
e && (R.value = !1, z.value = !1);
|
|
1439
1475
|
}), g(() => {
|
|
1440
|
-
typeof ResizeObserver < "u" && (
|
|
1441
|
-
|
|
1442
|
-
}), T.value &&
|
|
1476
|
+
typeof ResizeObserver < "u" && (q = new ResizeObserver(() => {
|
|
1477
|
+
U(), W(), le();
|
|
1478
|
+
}), T.value && q.observe(T.value), he()), ue();
|
|
1443
1479
|
}), _(() => {
|
|
1444
|
-
|
|
1480
|
+
q?.disconnect();
|
|
1445
1481
|
}), (t, o) => (v(), i("section", {
|
|
1446
1482
|
ref_key: "groupSectionRef",
|
|
1447
1483
|
ref: T,
|
|
1448
1484
|
class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
|
|
1449
1485
|
"data-priority": e.priority ?? 100,
|
|
1450
1486
|
style: h(y.value)
|
|
1451
|
-
}, [a("div",
|
|
1452
|
-
|
|
1487
|
+
}, [a("div", ot, [S(t.$slots, "default")]), a("footer", st, [
|
|
1488
|
+
ie.value ? (v(), n(E(F), {
|
|
1453
1489
|
key: 0,
|
|
1454
1490
|
class: "ml-ribbon-group__icon"
|
|
1455
1491
|
}, {
|
|
1456
|
-
default: O(() => [(v(), n(C(
|
|
1492
|
+
default: O(() => [(v(), n(C(ie.value)))]),
|
|
1457
1493
|
_: 1
|
|
1458
1494
|
})) : r("", !0),
|
|
1459
|
-
a("span",
|
|
1460
|
-
|
|
1495
|
+
a("span", ct, w(e.title), 1),
|
|
1496
|
+
oe.value && ce.value ? (v(), n(E(ae), {
|
|
1461
1497
|
key: 1,
|
|
1462
1498
|
trigger: "click",
|
|
1463
1499
|
placement: "bottom-start",
|
|
1464
1500
|
disabled: x.value,
|
|
1465
|
-
"popper-class":
|
|
1466
|
-
"popper-options":
|
|
1467
|
-
onShow: o[1] ||= (e) =>
|
|
1468
|
-
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)
|
|
1469
1505
|
}, {
|
|
1470
1506
|
reference: O(() => [a("button", {
|
|
1471
1507
|
ref_key: "footerTriggerRef",
|
|
1472
1508
|
ref: te,
|
|
1473
1509
|
type: "button",
|
|
1474
|
-
class: m(["ml-ribbon-group__footer-trigger", { "is-open":
|
|
1510
|
+
class: m(["ml-ribbon-group__footer-trigger", { "is-open": R.value }]),
|
|
1475
1511
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1476
|
-
"aria-expanded":
|
|
1512
|
+
"aria-expanded": R.value,
|
|
1477
1513
|
disabled: x.value,
|
|
1478
|
-
onClick:
|
|
1479
|
-
}, [c(E(
|
|
1480
|
-
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))))]),
|
|
1481
1517
|
_: 1
|
|
1482
|
-
})], 10,
|
|
1483
|
-
default: O(() => [a("div",
|
|
1484
|
-
group:
|
|
1518
|
+
})], 10, lt)]),
|
|
1519
|
+
default: O(() => [a("div", ut, [c(it, {
|
|
1520
|
+
group: ce.value,
|
|
1485
1521
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1522
|
+
disabled: x.value,
|
|
1486
1523
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
1487
|
-
}, null, 8, [
|
|
1524
|
+
}, null, 8, [
|
|
1525
|
+
"group",
|
|
1526
|
+
"gallery-preview-fallback",
|
|
1527
|
+
"disabled"
|
|
1528
|
+
])])]),
|
|
1488
1529
|
_: 1
|
|
1489
1530
|
}, 8, [
|
|
1490
1531
|
"disabled",
|
|
1491
1532
|
"popper-class",
|
|
1492
1533
|
"popper-options"
|
|
1493
1534
|
])) : r("", !0),
|
|
1494
|
-
|
|
1535
|
+
L.value && V.value ? (v(), n(E(ae), {
|
|
1495
1536
|
key: 2,
|
|
1496
1537
|
trigger: "click",
|
|
1497
1538
|
placement: "bottom-start",
|
|
1498
1539
|
disabled: x.value,
|
|
1499
|
-
"popper-class":
|
|
1500
|
-
"popper-options":
|
|
1501
|
-
onShow: o[4] ||= (e) =>
|
|
1502
|
-
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)
|
|
1503
1544
|
}, {
|
|
1504
1545
|
reference: O(() => [a("button", {
|
|
1505
1546
|
ref_key: "overflowTriggerRef",
|
|
1506
1547
|
ref: A,
|
|
1507
1548
|
type: "button",
|
|
1508
|
-
class: m(["ml-ribbon-group__overflow-trigger", { "is-open":
|
|
1549
|
+
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": z.value }]),
|
|
1509
1550
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1510
|
-
"aria-expanded":
|
|
1551
|
+
"aria-expanded": z.value,
|
|
1511
1552
|
disabled: x.value,
|
|
1512
|
-
onClick:
|
|
1513
|
-
}, [c(E(
|
|
1514
|
-
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))))]),
|
|
1515
1556
|
_: 1
|
|
1516
|
-
})], 10,
|
|
1517
|
-
default: O(() => [a("div",
|
|
1518
|
-
group:
|
|
1557
|
+
})], 10, dt)]),
|
|
1558
|
+
default: O(() => [a("div", ft, [c(it, {
|
|
1559
|
+
group: V.value,
|
|
1519
1560
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1561
|
+
disabled: x.value,
|
|
1520
1562
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
1521
|
-
}, null, 8, [
|
|
1563
|
+
}, null, 8, [
|
|
1564
|
+
"group",
|
|
1565
|
+
"gallery-preview-fallback",
|
|
1566
|
+
"disabled"
|
|
1567
|
+
])])]),
|
|
1522
1568
|
_: 1
|
|
1523
1569
|
}, 8, [
|
|
1524
1570
|
"disabled",
|
|
@@ -1531,24 +1577,24 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1531
1577
|
class: "ml-ribbon-group__launcher",
|
|
1532
1578
|
disabled: x.value
|
|
1533
1579
|
}, {
|
|
1534
|
-
default: O(() => [c(E(
|
|
1535
|
-
default: O(() => [c(E(
|
|
1580
|
+
default: O(() => [c(E(F), null, {
|
|
1581
|
+
default: O(() => [c(E(de))]),
|
|
1536
1582
|
_: 1
|
|
1537
1583
|
})]),
|
|
1538
1584
|
_: 1
|
|
1539
1585
|
}, 8, ["disabled"])) : r("", !0)
|
|
1540
|
-
])], 14,
|
|
1586
|
+
])], 14, at));
|
|
1541
1587
|
}
|
|
1542
|
-
}),
|
|
1588
|
+
}), mt = ["inert", "aria-disabled"], ht = { class: "ml-ribbon__head-left" }, gt = { class: "ml-ribbon__head-right" }, _t = {
|
|
1543
1589
|
key: 2,
|
|
1544
1590
|
class: "ml-ribbon__tabs-extra"
|
|
1545
|
-
},
|
|
1591
|
+
}, vt = ["data-active-tab"], yt = {
|
|
1546
1592
|
key: 0,
|
|
1547
1593
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1548
|
-
},
|
|
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 = {
|
|
1549
1595
|
key: 0,
|
|
1550
1596
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1551
|
-
},
|
|
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({
|
|
1552
1598
|
__name: "Ribbon",
|
|
1553
1599
|
props: {
|
|
1554
1600
|
id: { default: "ml-ribbon-root" },
|
|
@@ -1643,10 +1689,10 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1643
1689
|
groups: e.groups?.map(te)
|
|
1644
1690
|
}));
|
|
1645
1691
|
}
|
|
1646
|
-
function
|
|
1692
|
+
function j(e, t) {
|
|
1647
1693
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1648
1694
|
}
|
|
1649
|
-
let
|
|
1695
|
+
let M = {
|
|
1650
1696
|
layoutSwitcherTooltip: "Switch ribbon layout",
|
|
1651
1697
|
minimizeTooltip: "Minimize ribbon",
|
|
1652
1698
|
keyTipsToggleText: "Key Tips",
|
|
@@ -1661,67 +1707,67 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1661
1707
|
keyTipsEmptySequence: "No key sequence",
|
|
1662
1708
|
contextualTabDefaultTitle: "Contextual",
|
|
1663
1709
|
galleryPreviewFallback: "Preview unavailable"
|
|
1664
|
-
},
|
|
1665
|
-
y(
|
|
1666
|
-
|
|
1667
|
-
}, { deep: !0 }), D(() =>
|
|
1668
|
-
e !==
|
|
1669
|
-
}), 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) => {
|
|
1670
1716
|
if (!e) return;
|
|
1671
1717
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
1672
|
-
t !==
|
|
1673
|
-
}), D(() =>
|
|
1674
|
-
e !==
|
|
1675
|
-
}), D(() =>
|
|
1676
|
-
e !==
|
|
1677
|
-
}), D(() =>
|
|
1678
|
-
e && e !==
|
|
1679
|
-
}), D(() =>
|
|
1680
|
-
let t =
|
|
1681
|
-
t !==
|
|
1682
|
-
}), D(() =>
|
|
1683
|
-
let t =
|
|
1684
|
-
t !==
|
|
1685
|
-
}), D(
|
|
1686
|
-
|
|
1687
|
-
}), D(
|
|
1688
|
-
|
|
1689
|
-
}), D(
|
|
1690
|
-
|
|
1691
|
-
}), D(
|
|
1692
|
-
|
|
1693
|
-
}), D(
|
|
1694
|
-
|
|
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");
|
|
1695
1741
|
});
|
|
1696
|
-
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({
|
|
1697
1743
|
left: "0px",
|
|
1698
1744
|
top: "0px",
|
|
1699
1745
|
width: "1px",
|
|
1700
1746
|
height: "0px"
|
|
1701
|
-
}),
|
|
1702
|
-
layoutSwitcherTooltip:
|
|
1703
|
-
minimizeTooltip:
|
|
1704
|
-
keyTipsToggleText:
|
|
1705
|
-
overflowTriggerAriaLabel:
|
|
1706
|
-
groupOverflowTriggerAriaLabel:
|
|
1707
|
-
fileMenuLabel:
|
|
1708
|
-
fileMenuOpenBackstageLabel:
|
|
1709
|
-
backstageBackLabel:
|
|
1710
|
-
backstageTitle:
|
|
1711
|
-
backstageDescription:
|
|
1712
|
-
keyTipsSequencePrefix:
|
|
1713
|
-
keyTipsEmptySequence:
|
|
1714
|
-
contextualTabDefaultTitle:
|
|
1715
|
-
galleryPreviewFallback:
|
|
1716
|
-
})),
|
|
1717
|
-
if (!
|
|
1718
|
-
let e =
|
|
1719
|
-
let n =
|
|
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(() => {
|
|
1763
|
+
if (!Ee.value.length) return 220;
|
|
1764
|
+
let e = Ee.value.reduce((e, t) => {
|
|
1765
|
+
let n = J.value[t.id] ?? je(t);
|
|
1720
1766
|
return Math.max(e, n);
|
|
1721
1767
|
}, 0), t = Math.ceil(e + 40);
|
|
1722
1768
|
return Math.max(220, Math.min(720, t));
|
|
1723
1769
|
});
|
|
1724
|
-
function
|
|
1770
|
+
function ke(e) {
|
|
1725
1771
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
1726
1772
|
...A(e),
|
|
1727
1773
|
size: "medium"
|
|
@@ -1736,13 +1782,13 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1736
1782
|
}]
|
|
1737
1783
|
};
|
|
1738
1784
|
}
|
|
1739
|
-
function
|
|
1785
|
+
function Ae(e) {
|
|
1740
1786
|
return e.priority ?? 100;
|
|
1741
1787
|
}
|
|
1742
|
-
function
|
|
1743
|
-
return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width :
|
|
1788
|
+
function je(e) {
|
|
1789
|
+
return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width : 140;
|
|
1744
1790
|
}
|
|
1745
|
-
function
|
|
1791
|
+
function Me(e) {
|
|
1746
1792
|
let t = {};
|
|
1747
1793
|
return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
|
|
1748
1794
|
let n = e.dataset.groupId;
|
|
@@ -1751,121 +1797,124 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1751
1797
|
r > 0 && (t[n] = r);
|
|
1752
1798
|
}), t;
|
|
1753
1799
|
}
|
|
1754
|
-
function
|
|
1800
|
+
function Ne() {
|
|
1755
1801
|
let e = H.value.reduce((e, t) => {
|
|
1756
|
-
let n =
|
|
1757
|
-
return e + Math.max(n,
|
|
1802
|
+
let n = J.value[t.id] ?? je(t);
|
|
1803
|
+
return e + Math.max(n, je(t));
|
|
1758
1804
|
}, 0);
|
|
1759
1805
|
return Math.max(220, e);
|
|
1760
1806
|
}
|
|
1761
|
-
function
|
|
1807
|
+
function Pe(e) {
|
|
1762
1808
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
1763
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
1809
|
+
return Number.isFinite(t) && t > 0 ? t : It;
|
|
1764
1810
|
}
|
|
1765
|
-
function
|
|
1766
|
-
if (
|
|
1767
|
-
|
|
1811
|
+
function Fe() {
|
|
1812
|
+
if (I.layout.value !== "classic") {
|
|
1813
|
+
q.value = /* @__PURE__ */ new Set();
|
|
1768
1814
|
return;
|
|
1769
1815
|
}
|
|
1770
|
-
let e =
|
|
1816
|
+
let e = I.minimized.value ? G.value : W.value;
|
|
1771
1817
|
if (!e) return;
|
|
1772
1818
|
let t = H.value;
|
|
1773
1819
|
if (!t.length) {
|
|
1774
|
-
|
|
1820
|
+
q.value = /* @__PURE__ */ new Set();
|
|
1775
1821
|
return;
|
|
1776
1822
|
}
|
|
1777
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
1778
|
-
|
|
1779
|
-
...
|
|
1823
|
+
let n = Math.round(e.getBoundingClientRect().width), r = Pe(e), i = Me(e);
|
|
1824
|
+
J.value = {
|
|
1825
|
+
...J.value,
|
|
1780
1826
|
...i
|
|
1781
1827
|
};
|
|
1782
1828
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
1783
1829
|
group: e,
|
|
1784
1830
|
index: t
|
|
1785
1831
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
1786
|
-
let n =
|
|
1832
|
+
let n = Ae(t.group) - Ae(e.group);
|
|
1787
1833
|
return n === 0 ? t.index - e.index : n;
|
|
1788
|
-
}), 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;
|
|
1789
1835
|
for (; f(s) > n && p < c.length;) {
|
|
1790
1836
|
let e = c[p].group;
|
|
1791
1837
|
s.add(e.id), p += 1;
|
|
1792
1838
|
}
|
|
1793
|
-
|
|
1839
|
+
q.value = s;
|
|
1794
1840
|
}
|
|
1795
|
-
function
|
|
1841
|
+
function Ie() {
|
|
1796
1842
|
p(() => {
|
|
1797
|
-
if (
|
|
1798
|
-
|
|
1843
|
+
if (I.layout.value !== "classic" || I.minimized.value) {
|
|
1844
|
+
Fe();
|
|
1799
1845
|
return;
|
|
1800
1846
|
}
|
|
1801
|
-
if (
|
|
1802
|
-
|
|
1847
|
+
if (q.value.size === 0) {
|
|
1848
|
+
Fe();
|
|
1803
1849
|
return;
|
|
1804
1850
|
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1851
|
+
q.value = /* @__PURE__ */ new Set(), p(() => {
|
|
1852
|
+
Fe();
|
|
1807
1853
|
});
|
|
1808
1854
|
});
|
|
1809
1855
|
}
|
|
1810
|
-
function
|
|
1811
|
-
let e =
|
|
1856
|
+
function Le() {
|
|
1857
|
+
let e = de.value, t = U.value;
|
|
1812
1858
|
if (!e || !t) return;
|
|
1813
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);
|
|
1814
|
-
|
|
1860
|
+
pe.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? Ne() : Math.max(360, H.value.length * 120)), me.value = {
|
|
1815
1861
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
1816
1862
|
top: "0px",
|
|
1817
1863
|
width: "1px",
|
|
1818
1864
|
height: `${Math.round(r.height)}px`
|
|
1819
1865
|
};
|
|
1820
1866
|
}
|
|
1821
|
-
function
|
|
1822
|
-
|
|
1867
|
+
function Z() {
|
|
1868
|
+
K.value = !1;
|
|
1823
1869
|
}
|
|
1824
|
-
function
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1870
|
+
function Re(e) {
|
|
1871
|
+
return I.disabled.value ? !0 : !e || oe.value.size === 0 ? !1 : !oe.value.has(e.id);
|
|
1872
|
+
}
|
|
1873
|
+
function ze(e) {
|
|
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();
|
|
1829
1878
|
return;
|
|
1830
1879
|
}
|
|
1831
|
-
|
|
1880
|
+
Le(), K.value = t ? !K.value : !0;
|
|
1832
1881
|
}
|
|
1833
|
-
function
|
|
1834
|
-
|
|
1882
|
+
function Be() {
|
|
1883
|
+
I.disabled.value || I.api.toggleSimplified();
|
|
1835
1884
|
}
|
|
1836
|
-
function
|
|
1837
|
-
|
|
1885
|
+
function Ve() {
|
|
1886
|
+
I.disabled.value || (I.minimized.value || Z(), I.minimized.value = !I.minimized.value);
|
|
1838
1887
|
}
|
|
1839
|
-
function
|
|
1840
|
-
|
|
1888
|
+
function He(e) {
|
|
1889
|
+
I.disabled.value || (Z(), P("fileMenuSelect", e));
|
|
1841
1890
|
}
|
|
1842
|
-
function
|
|
1843
|
-
|
|
1891
|
+
function Ue() {
|
|
1892
|
+
I.disabled.value || (Z(), I.backdropOpen.value = !0);
|
|
1844
1893
|
}
|
|
1845
|
-
function
|
|
1846
|
-
|
|
1894
|
+
function We() {
|
|
1895
|
+
I.disabled.value || (I.backdropOpen.value = !1);
|
|
1847
1896
|
}
|
|
1848
|
-
function
|
|
1849
|
-
|
|
1850
|
-
tabId:
|
|
1897
|
+
function Q(e, t) {
|
|
1898
|
+
B.value || (P("itemClick", {
|
|
1899
|
+
tabId: I.activeTab.value,
|
|
1851
1900
|
groupId: e,
|
|
1852
1901
|
itemId: t
|
|
1853
|
-
}),
|
|
1902
|
+
}), I.minimized.value && Z());
|
|
1854
1903
|
}
|
|
1855
|
-
function
|
|
1904
|
+
function Ge(e) {
|
|
1856
1905
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1857
1906
|
if (e.isContentEditable) return !0;
|
|
1858
1907
|
let t = e.tagName;
|
|
1859
1908
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
1860
1909
|
}
|
|
1861
|
-
function
|
|
1862
|
-
if (
|
|
1863
|
-
|
|
1910
|
+
function Ke() {
|
|
1911
|
+
if (B.value) {
|
|
1912
|
+
I.keyTips.value = [];
|
|
1864
1913
|
return;
|
|
1865
1914
|
}
|
|
1866
|
-
let e =
|
|
1915
|
+
let e = L.value;
|
|
1867
1916
|
if (!e?.groups?.length) {
|
|
1868
|
-
|
|
1917
|
+
I.keyTips.value = [];
|
|
1869
1918
|
return;
|
|
1870
1919
|
}
|
|
1871
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) => {
|
|
@@ -1878,134 +1927,134 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
1878
1927
|
scope: "item"
|
|
1879
1928
|
} : null;
|
|
1880
1929
|
}).filter((e) => !!e)));
|
|
1881
|
-
|
|
1930
|
+
I.keyTips.value = t;
|
|
1882
1931
|
}
|
|
1883
|
-
function
|
|
1884
|
-
if (
|
|
1885
|
-
let t =
|
|
1932
|
+
function qe(e) {
|
|
1933
|
+
if (I.disabled.value) return;
|
|
1934
|
+
let t = L.value;
|
|
1886
1935
|
if (t?.groups?.length) {
|
|
1887
1936
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
1888
1937
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
1889
1938
|
if (r) {
|
|
1890
|
-
|
|
1939
|
+
Q(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
|
|
1891
1940
|
return;
|
|
1892
1941
|
}
|
|
1893
1942
|
}
|
|
1894
1943
|
}
|
|
1895
1944
|
}
|
|
1896
|
-
function
|
|
1897
|
-
|
|
1945
|
+
function Je() {
|
|
1946
|
+
I.keyTipsSequence.value = "";
|
|
1898
1947
|
}
|
|
1899
|
-
function
|
|
1900
|
-
if (!
|
|
1948
|
+
function Ye(e) {
|
|
1949
|
+
if (!I.disabled.value && !Ge(e.target)) {
|
|
1901
1950
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
1902
|
-
e.preventDefault(),
|
|
1951
|
+
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value || Je();
|
|
1903
1952
|
return;
|
|
1904
1953
|
}
|
|
1905
|
-
if (
|
|
1954
|
+
if (I.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
1906
1955
|
if (e.key === "Escape") {
|
|
1907
|
-
e.preventDefault(),
|
|
1956
|
+
e.preventDefault(), I.keyTipsOpen.value = !1, Je();
|
|
1908
1957
|
return;
|
|
1909
1958
|
}
|
|
1910
1959
|
if (e.key === "Backspace") {
|
|
1911
|
-
e.preventDefault(),
|
|
1960
|
+
e.preventDefault(), I.keyTipsSequence.value = I.keyTipsSequence.value.slice(0, -1);
|
|
1912
1961
|
return;
|
|
1913
1962
|
}
|
|
1914
1963
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
1915
1964
|
e.preventDefault();
|
|
1916
|
-
let t = `${
|
|
1917
|
-
|
|
1918
|
-
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);
|
|
1919
1968
|
if (r) {
|
|
1920
|
-
|
|
1969
|
+
qe(r);
|
|
1921
1970
|
return;
|
|
1922
1971
|
}
|
|
1923
|
-
|
|
1972
|
+
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Je();
|
|
1924
1973
|
}
|
|
1925
1974
|
}
|
|
1926
1975
|
}
|
|
1927
1976
|
}
|
|
1928
|
-
function
|
|
1929
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
1977
|
+
function Xe(e) {
|
|
1978
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? le : null;
|
|
1930
1979
|
}
|
|
1931
|
-
function
|
|
1932
|
-
|
|
1980
|
+
function Ze(e) {
|
|
1981
|
+
K.value = e;
|
|
1933
1982
|
}
|
|
1934
1983
|
D([
|
|
1935
1984
|
H,
|
|
1936
|
-
() =>
|
|
1937
|
-
() =>
|
|
1985
|
+
() => I.layout.value,
|
|
1986
|
+
() => I.minimized.value
|
|
1938
1987
|
], () => {
|
|
1939
|
-
|
|
1988
|
+
Ie();
|
|
1940
1989
|
}), D([
|
|
1941
|
-
|
|
1942
|
-
() =>
|
|
1943
|
-
() =>
|
|
1990
|
+
L,
|
|
1991
|
+
() => I.tabs.value,
|
|
1992
|
+
() => I.disabled.value
|
|
1944
1993
|
], () => {
|
|
1945
|
-
|
|
1994
|
+
Ke(), Je();
|
|
1946
1995
|
}, {
|
|
1947
1996
|
deep: !0,
|
|
1948
1997
|
immediate: !0
|
|
1949
|
-
}), D(() =>
|
|
1950
|
-
e ||
|
|
1951
|
-
}), D(() =>
|
|
1952
|
-
e && (
|
|
1998
|
+
}), D(() => I.keyTipsOpen.value, (e) => {
|
|
1999
|
+
e || Je();
|
|
2000
|
+
}), D(() => I.disabled.value, (e) => {
|
|
2001
|
+
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Z(), Je());
|
|
1953
2002
|
}), D([
|
|
1954
|
-
() =>
|
|
1955
|
-
() =>
|
|
1956
|
-
|
|
2003
|
+
() => I.minimized.value,
|
|
2004
|
+
() => I.layout.value,
|
|
2005
|
+
L
|
|
1957
2006
|
], ([e, , t]) => {
|
|
1958
|
-
(!e || !t) &&
|
|
1959
|
-
}), D([
|
|
1960
|
-
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) &&
|
|
1961
|
-
}, { 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) => {
|
|
1962
2011
|
e && p(() => {
|
|
1963
|
-
|
|
2012
|
+
Le(), Ie();
|
|
1964
2013
|
});
|
|
1965
2014
|
});
|
|
1966
2015
|
let $ = null;
|
|
1967
2016
|
g(() => {
|
|
1968
|
-
window.addEventListener("keydown",
|
|
1969
|
-
|
|
1970
|
-
}),
|
|
2017
|
+
window.addEventListener("keydown", Ye), window.addEventListener("resize", Qe), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
2018
|
+
Le(), Ie();
|
|
2019
|
+
}), W.value && $.observe(W.value), G.value && $.observe(G.value)), Le(), Ie();
|
|
1971
2020
|
}), _(() => {
|
|
1972
|
-
window.removeEventListener("keydown",
|
|
2021
|
+
window.removeEventListener("keydown", Ye), window.removeEventListener("resize", Qe), $?.disconnect();
|
|
1973
2022
|
});
|
|
1974
|
-
function
|
|
1975
|
-
|
|
2023
|
+
function Qe() {
|
|
2024
|
+
K.value && Le();
|
|
1976
2025
|
}
|
|
1977
|
-
return l(
|
|
2026
|
+
return l(I.api), (t, l) => (v(), n(E(re), { size: N.size }, {
|
|
1978
2027
|
default: O(() => [(v(), i("section", {
|
|
1979
2028
|
ref_key: "ribbonRootRef",
|
|
1980
|
-
ref:
|
|
1981
|
-
key: E(
|
|
2029
|
+
ref: de,
|
|
2030
|
+
key: E(I).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
1982
2031
|
class: m(["ml-ribbon", [
|
|
1983
|
-
`ml-ribbon--${E(
|
|
1984
|
-
`ml-ribbon--size-${
|
|
2032
|
+
`ml-ribbon--${E(I).layout.value}`,
|
|
2033
|
+
`ml-ribbon--size-${_e.value}`,
|
|
1985
2034
|
{
|
|
1986
|
-
"ml-ribbon--disabled": E(
|
|
1987
|
-
"ml-ribbon--minimized": E(
|
|
1988
|
-
"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
|
|
1989
2038
|
}
|
|
1990
2039
|
]]),
|
|
1991
|
-
inert: E(
|
|
1992
|
-
"aria-disabled": E(
|
|
2040
|
+
inert: E(I).disabled.value,
|
|
2041
|
+
"aria-disabled": E(I).disabled.value
|
|
1993
2042
|
}, [
|
|
1994
2043
|
a("header", {
|
|
1995
2044
|
ref_key: "ribbonHeaderRef",
|
|
1996
|
-
ref:
|
|
2045
|
+
ref: U,
|
|
1997
2046
|
class: "ml-ribbon__header"
|
|
1998
2047
|
}, [
|
|
1999
|
-
a("div",
|
|
2000
|
-
s.showFileMenu ? (v(), n(
|
|
2048
|
+
a("div", ht, [
|
|
2049
|
+
s.showFileMenu ? (v(), n(De, {
|
|
2001
2050
|
key: 0,
|
|
2002
2051
|
items: s.fileMenuItems,
|
|
2003
|
-
disabled: E(
|
|
2004
|
-
label:
|
|
2005
|
-
"open-backstage-label":
|
|
2052
|
+
disabled: E(I).disabled.value,
|
|
2053
|
+
label: X.value.fileMenuLabel,
|
|
2054
|
+
"open-backstage-label": X.value.fileMenuOpenBackstageLabel,
|
|
2006
2055
|
"show-open-backstage": s.showOpenBackstage,
|
|
2007
|
-
onSelect:
|
|
2008
|
-
onOpenBackstage:
|
|
2056
|
+
onSelect: He,
|
|
2057
|
+
onOpenBackstage: Ue
|
|
2009
2058
|
}, null, 8, [
|
|
2010
2059
|
"items",
|
|
2011
2060
|
"disabled",
|
|
@@ -2013,33 +2062,33 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2013
2062
|
"open-backstage-label",
|
|
2014
2063
|
"show-open-backstage"
|
|
2015
2064
|
])) : r("", !0),
|
|
2016
|
-
c(
|
|
2017
|
-
tabs: E(
|
|
2018
|
-
"active-tab": E(
|
|
2019
|
-
disabled: E(
|
|
2020
|
-
"default-contextual-title":
|
|
2021
|
-
onSelect:
|
|
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,
|
|
2070
|
+
onSelect: ze
|
|
2022
2071
|
}, null, 8, [
|
|
2023
2072
|
"tabs",
|
|
2024
2073
|
"active-tab",
|
|
2025
2074
|
"disabled",
|
|
2026
2075
|
"default-contextual-title"
|
|
2027
2076
|
]),
|
|
2028
|
-
|
|
2077
|
+
N.hideMinimizeButton ? r("", !0) : (v(), n(E(z), {
|
|
2029
2078
|
key: 1,
|
|
2030
|
-
content:
|
|
2031
|
-
"show-after":
|
|
2032
|
-
"hide-after":
|
|
2079
|
+
content: X.value.minimizeTooltip,
|
|
2080
|
+
"show-after": xe.value,
|
|
2081
|
+
"hide-after": Se.value
|
|
2033
2082
|
}, {
|
|
2034
2083
|
default: O(() => [c(E(ee), {
|
|
2035
2084
|
class: m([
|
|
2036
2085
|
"ml-ribbon__control",
|
|
2037
2086
|
"ml-ribbon__control--minimize",
|
|
2038
|
-
E(
|
|
2087
|
+
E(I).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
2039
2088
|
]),
|
|
2040
|
-
icon:
|
|
2041
|
-
disabled: E(
|
|
2042
|
-
onClick:
|
|
2089
|
+
icon: Ce.value,
|
|
2090
|
+
disabled: E(I).disabled.value,
|
|
2091
|
+
onClick: Ve
|
|
2043
2092
|
}, null, 8, [
|
|
2044
2093
|
"class",
|
|
2045
2094
|
"icon",
|
|
@@ -2052,19 +2101,19 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2052
2101
|
"hide-after"
|
|
2053
2102
|
]))
|
|
2054
2103
|
]),
|
|
2055
|
-
a("div",
|
|
2056
|
-
|
|
2104
|
+
a("div", gt, [
|
|
2105
|
+
N.hideLayoutSwitcher ? r("", !0) : (v(), n(E(z), {
|
|
2057
2106
|
key: 0,
|
|
2058
|
-
content:
|
|
2059
|
-
"show-after":
|
|
2060
|
-
"hide-after":
|
|
2107
|
+
content: X.value.layoutSwitcherTooltip,
|
|
2108
|
+
"show-after": xe.value,
|
|
2109
|
+
"hide-after": Se.value
|
|
2061
2110
|
}, {
|
|
2062
2111
|
default: O(() => [c(E(ee), {
|
|
2063
2112
|
circle: "",
|
|
2064
2113
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
2065
|
-
icon: E(
|
|
2066
|
-
disabled: E(
|
|
2067
|
-
onClick:
|
|
2114
|
+
icon: E(ue),
|
|
2115
|
+
disabled: E(I).disabled.value,
|
|
2116
|
+
onClick: Be
|
|
2068
2117
|
}, null, 8, ["icon", "disabled"])]),
|
|
2069
2118
|
_: 1
|
|
2070
2119
|
}, 8, [
|
|
@@ -2072,51 +2121,51 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2072
2121
|
"show-after",
|
|
2073
2122
|
"hide-after"
|
|
2074
2123
|
])),
|
|
2075
|
-
|
|
2124
|
+
N.hideKeyTipsToggle ? r("", !0) : (v(), n(E(R), {
|
|
2076
2125
|
key: 1,
|
|
2077
2126
|
"inline-prompt": "",
|
|
2078
2127
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
2079
|
-
"active-text":
|
|
2080
|
-
"inactive-text":
|
|
2081
|
-
"model-value": E(
|
|
2082
|
-
disabled: E(
|
|
2083
|
-
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
|
|
2084
2133
|
}, null, 8, [
|
|
2085
2134
|
"active-text",
|
|
2086
2135
|
"inactive-text",
|
|
2087
2136
|
"model-value",
|
|
2088
2137
|
"disabled"
|
|
2089
2138
|
])),
|
|
2090
|
-
t.$slots["tabs-extra"] ? (v(), i("div",
|
|
2091
|
-
activeTab: E(
|
|
2092
|
-
layout: E(
|
|
2093
|
-
minimized: E(
|
|
2094
|
-
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
|
|
2095
2144
|
})])) : r("", !0)
|
|
2096
2145
|
]),
|
|
2097
|
-
|
|
2146
|
+
L.value ? (v(), n(E(ae), {
|
|
2098
2147
|
key: 0,
|
|
2099
2148
|
placement: "bottom-start",
|
|
2100
|
-
visible:
|
|
2101
|
-
width:
|
|
2102
|
-
disabled: E(
|
|
2149
|
+
visible: K.value,
|
|
2150
|
+
width: pe.value || void 0,
|
|
2151
|
+
disabled: E(I).disabled.value || !E(I).minimized.value,
|
|
2103
2152
|
"show-arrow": !1,
|
|
2104
2153
|
offset: 0,
|
|
2105
|
-
"popper-class":
|
|
2106
|
-
"onUpdate:visible":
|
|
2154
|
+
"popper-class": be.value,
|
|
2155
|
+
"onUpdate:visible": Ze
|
|
2107
2156
|
}, {
|
|
2108
2157
|
reference: O(() => [a("span", {
|
|
2109
2158
|
"aria-hidden": "true",
|
|
2110
2159
|
class: "ml-ribbon__minimized-anchor",
|
|
2111
|
-
style: h(
|
|
2160
|
+
style: h(me.value)
|
|
2112
2161
|
}, null, 4)]),
|
|
2113
|
-
default: O(() => [E(
|
|
2162
|
+
default: O(() => [E(I).layout.value === "classic" ? (v(), i("main", {
|
|
2114
2163
|
key: 0,
|
|
2115
2164
|
ref_key: "minimizedClassicPanelRef",
|
|
2116
|
-
ref:
|
|
2165
|
+
ref: G,
|
|
2117
2166
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
2118
|
-
"data-active-tab":
|
|
2119
|
-
}, [(v(!0), i(e, null, x(
|
|
2167
|
+
"data-active-tab": L.value.id
|
|
2168
|
+
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(pt, {
|
|
2120
2169
|
id: e.id,
|
|
2121
2170
|
key: e.id,
|
|
2122
2171
|
"data-group-id": e.id,
|
|
@@ -2124,21 +2173,26 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2124
2173
|
icon: e.icon,
|
|
2125
2174
|
"group-icon-css": e.groupIconCss,
|
|
2126
2175
|
orientation: e.orientation,
|
|
2127
|
-
"auto-width": e.autoWidth,
|
|
2128
2176
|
width: e.width,
|
|
2129
2177
|
priority: e.priority ?? 100,
|
|
2130
2178
|
launcher: e.launcher,
|
|
2131
2179
|
"show-launcher-icon": e.showLauncherIcon,
|
|
2132
2180
|
"group-model": e,
|
|
2133
|
-
"overflow-trigger-aria-label":
|
|
2134
|
-
"gallery-preview-fallback":
|
|
2135
|
-
|
|
2181
|
+
"overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
|
|
2182
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2183
|
+
disabled: B.value,
|
|
2184
|
+
onItemClick: l[2] ||= (e) => Q(e.groupId, e.itemId)
|
|
2136
2185
|
}, {
|
|
2137
|
-
default: O(() => [c(
|
|
2186
|
+
default: O(() => [c(it, {
|
|
2138
2187
|
group: e,
|
|
2139
|
-
"gallery-preview-fallback":
|
|
2140
|
-
|
|
2141
|
-
|
|
2188
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2189
|
+
disabled: B.value,
|
|
2190
|
+
onItemClick: l[1] ||= (e) => Q(e.groupId, e.itemId)
|
|
2191
|
+
}, null, 8, [
|
|
2192
|
+
"group",
|
|
2193
|
+
"gallery-preview-fallback",
|
|
2194
|
+
"disabled"
|
|
2195
|
+
])]),
|
|
2142
2196
|
_: 2
|
|
2143
2197
|
}, 1032, [
|
|
2144
2198
|
"id",
|
|
@@ -2147,74 +2201,84 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2147
2201
|
"icon",
|
|
2148
2202
|
"group-icon-css",
|
|
2149
2203
|
"orientation",
|
|
2150
|
-
"auto-width",
|
|
2151
2204
|
"width",
|
|
2152
2205
|
"priority",
|
|
2153
2206
|
"launcher",
|
|
2154
2207
|
"show-launcher-icon",
|
|
2155
2208
|
"group-model",
|
|
2156
2209
|
"overflow-trigger-aria-label",
|
|
2157
|
-
"gallery-preview-fallback"
|
|
2158
|
-
|
|
2210
|
+
"gallery-preview-fallback",
|
|
2211
|
+
"disabled"
|
|
2212
|
+
]))), 128)), Ee.value.length ? (v(), i("section", yt, [a("div", bt, [c(E(ae), {
|
|
2159
2213
|
trigger: "click",
|
|
2160
2214
|
placement: "bottom-end",
|
|
2161
|
-
width:
|
|
2162
|
-
disabled:
|
|
2215
|
+
width: Oe.value,
|
|
2216
|
+
disabled: B.value,
|
|
2163
2217
|
"show-arrow": !1,
|
|
2164
|
-
"popper-class":
|
|
2165
|
-
onShow: l[4] ||= (e) => E(
|
|
2166
|
-
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
|
|
2167
2221
|
}, {
|
|
2168
2222
|
reference: O(() => [a("button", {
|
|
2169
2223
|
type: "button",
|
|
2170
2224
|
class: "ml-ribbon-overflow-trigger",
|
|
2171
|
-
"aria-label":
|
|
2172
|
-
disabled:
|
|
2173
|
-
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
2174
|
-
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", {
|
|
2175
2229
|
key: e.id,
|
|
2176
2230
|
class: "ml-ribbon-overflow-group"
|
|
2177
|
-
}, [a("header",
|
|
2231
|
+
}, [a("header", Ct, w(e.title), 1), c(it, {
|
|
2178
2232
|
group: e,
|
|
2179
|
-
"gallery-preview-fallback":
|
|
2180
|
-
|
|
2181
|
-
|
|
2233
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2234
|
+
disabled: B.value,
|
|
2235
|
+
onItemClick: l[3] ||= (e) => Q(e.groupId, e.itemId)
|
|
2236
|
+
}, null, 8, [
|
|
2237
|
+
"group",
|
|
2238
|
+
"gallery-preview-fallback",
|
|
2239
|
+
"disabled"
|
|
2240
|
+
])]))), 128))])]),
|
|
2182
2241
|
_: 1
|
|
2183
2242
|
}, 8, [
|
|
2184
2243
|
"width",
|
|
2185
2244
|
"disabled",
|
|
2186
2245
|
"popper-class"
|
|
2187
|
-
])]), 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", {
|
|
2188
2247
|
key: 1,
|
|
2189
2248
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
2190
|
-
"data-active-tab":
|
|
2191
|
-
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(
|
|
2249
|
+
"data-active-tab": L.value.id
|
|
2250
|
+
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(ae), {
|
|
2192
2251
|
key: e.id,
|
|
2193
2252
|
trigger: "click",
|
|
2194
2253
|
placement: "bottom-start",
|
|
2195
2254
|
width: 340,
|
|
2196
|
-
disabled:
|
|
2255
|
+
disabled: B.value,
|
|
2197
2256
|
"show-arrow": !1,
|
|
2198
|
-
"popper-class":
|
|
2257
|
+
"popper-class": ve.value
|
|
2199
2258
|
}, {
|
|
2200
2259
|
reference: O(() => [a("button", {
|
|
2201
2260
|
class: "ml-ribbon-simplified-group",
|
|
2202
2261
|
type: "button",
|
|
2203
|
-
disabled:
|
|
2204
|
-
}, [
|
|
2262
|
+
disabled: B.value
|
|
2263
|
+
}, [Xe(e) ? (v(), n(E(F), {
|
|
2205
2264
|
key: 0,
|
|
2206
2265
|
class: "ml-ribbon-simplified-group__icon"
|
|
2207
2266
|
}, {
|
|
2208
|
-
default: O(() => [(v(), n(C(
|
|
2267
|
+
default: O(() => [(v(), n(C(Xe(e))))]),
|
|
2209
2268
|
_: 2
|
|
2210
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
2211
|
-
default: O(() => [a("div",
|
|
2212
|
-
group:
|
|
2213
|
-
"gallery-preview-fallback":
|
|
2214
|
-
|
|
2215
|
-
|
|
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,
|
|
2274
|
+
onItemClick: l[6] ||= (e) => Q(e.groupId, e.itemId)
|
|
2275
|
+
}, null, 8, [
|
|
2276
|
+
"group",
|
|
2277
|
+
"gallery-preview-fallback",
|
|
2278
|
+
"disabled"
|
|
2279
|
+
])])]),
|
|
2216
2280
|
_: 2
|
|
2217
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2281
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, wt))]),
|
|
2218
2282
|
_: 1
|
|
2219
2283
|
}, 8, [
|
|
2220
2284
|
"visible",
|
|
@@ -2223,13 +2287,13 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2223
2287
|
"popper-class"
|
|
2224
2288
|
])) : r("", !0)
|
|
2225
2289
|
], 512),
|
|
2226
|
-
!E(
|
|
2290
|
+
!E(I).minimized.value && L.value && E(I).layout.value === "classic" ? (v(), i("main", {
|
|
2227
2291
|
key: 0,
|
|
2228
2292
|
class: "ml-ribbon__panel",
|
|
2229
|
-
"data-active-tab":
|
|
2293
|
+
"data-active-tab": L.value.id,
|
|
2230
2294
|
ref_key: "classicPanelRef",
|
|
2231
|
-
ref:
|
|
2232
|
-
}, [(v(!0), i(e, null, x(
|
|
2295
|
+
ref: W
|
|
2296
|
+
}, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(pt, {
|
|
2233
2297
|
id: e.id,
|
|
2234
2298
|
key: e.id,
|
|
2235
2299
|
"data-group-id": e.id,
|
|
@@ -2237,21 +2301,26 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2237
2301
|
icon: e.icon,
|
|
2238
2302
|
"group-icon-css": e.groupIconCss,
|
|
2239
2303
|
orientation: e.orientation,
|
|
2240
|
-
"auto-width": e.autoWidth,
|
|
2241
2304
|
width: e.width,
|
|
2242
2305
|
priority: e.priority ?? 100,
|
|
2243
2306
|
launcher: e.launcher,
|
|
2244
2307
|
"show-launcher-icon": e.showLauncherIcon,
|
|
2245
2308
|
"group-model": e,
|
|
2246
|
-
"overflow-trigger-aria-label":
|
|
2247
|
-
"gallery-preview-fallback":
|
|
2248
|
-
|
|
2309
|
+
"overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
|
|
2310
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2311
|
+
disabled: B.value,
|
|
2312
|
+
onItemClick: l[8] ||= (e) => Q(e.groupId, e.itemId)
|
|
2249
2313
|
}, {
|
|
2250
|
-
default: O(() => [c(
|
|
2314
|
+
default: O(() => [c(it, {
|
|
2251
2315
|
group: e,
|
|
2252
|
-
"gallery-preview-fallback":
|
|
2253
|
-
|
|
2254
|
-
|
|
2316
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2317
|
+
disabled: B.value,
|
|
2318
|
+
onItemClick: l[7] ||= (e) => Q(e.groupId, e.itemId)
|
|
2319
|
+
}, null, 8, [
|
|
2320
|
+
"group",
|
|
2321
|
+
"gallery-preview-fallback",
|
|
2322
|
+
"disabled"
|
|
2323
|
+
])]),
|
|
2255
2324
|
_: 2
|
|
2256
2325
|
}, 1032, [
|
|
2257
2326
|
"id",
|
|
@@ -2260,90 +2329,100 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2260
2329
|
"icon",
|
|
2261
2330
|
"group-icon-css",
|
|
2262
2331
|
"orientation",
|
|
2263
|
-
"auto-width",
|
|
2264
2332
|
"width",
|
|
2265
2333
|
"priority",
|
|
2266
2334
|
"launcher",
|
|
2267
2335
|
"show-launcher-icon",
|
|
2268
2336
|
"group-model",
|
|
2269
2337
|
"overflow-trigger-aria-label",
|
|
2270
|
-
"gallery-preview-fallback"
|
|
2271
|
-
|
|
2338
|
+
"gallery-preview-fallback",
|
|
2339
|
+
"disabled"
|
|
2340
|
+
]))), 128)), Ee.value.length ? (v(), i("section", Ot, [a("div", kt, [c(E(ae), {
|
|
2272
2341
|
trigger: "click",
|
|
2273
2342
|
placement: "bottom-end",
|
|
2274
|
-
width:
|
|
2275
|
-
disabled:
|
|
2276
|
-
"popper-class":
|
|
2277
|
-
onShow: l[10] ||= (e) => E(
|
|
2278
|
-
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
|
|
2279
2348
|
}, {
|
|
2280
2349
|
reference: O(() => [a("button", {
|
|
2281
2350
|
type: "button",
|
|
2282
2351
|
class: "ml-ribbon-overflow-trigger",
|
|
2283
|
-
"aria-label":
|
|
2284
|
-
disabled:
|
|
2285
|
-
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
2286
|
-
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", {
|
|
2287
2356
|
key: e.id,
|
|
2288
2357
|
class: "ml-ribbon-overflow-group"
|
|
2289
|
-
}, [a("header",
|
|
2358
|
+
}, [a("header", Mt, w(e.title), 1), c(it, {
|
|
2290
2359
|
group: e,
|
|
2291
|
-
"gallery-preview-fallback":
|
|
2292
|
-
|
|
2293
|
-
|
|
2360
|
+
"gallery-preview-fallback": X.value.galleryPreviewFallback,
|
|
2361
|
+
disabled: B.value,
|
|
2362
|
+
onItemClick: l[9] ||= (e) => Q(e.groupId, e.itemId)
|
|
2363
|
+
}, null, 8, [
|
|
2364
|
+
"group",
|
|
2365
|
+
"gallery-preview-fallback",
|
|
2366
|
+
"disabled"
|
|
2367
|
+
])]))), 128))])]),
|
|
2294
2368
|
_: 1
|
|
2295
2369
|
}, 8, [
|
|
2296
2370
|
"width",
|
|
2297
2371
|
"disabled",
|
|
2298
2372
|
"popper-class"
|
|
2299
|
-
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
2300
|
-
!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", {
|
|
2301
2375
|
key: 1,
|
|
2302
2376
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
2303
|
-
"data-active-tab":
|
|
2304
|
-
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(
|
|
2377
|
+
"data-active-tab": L.value.id
|
|
2378
|
+
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(ae), {
|
|
2305
2379
|
key: e.id,
|
|
2306
2380
|
trigger: "click",
|
|
2307
2381
|
placement: "bottom-start",
|
|
2308
2382
|
width: 340,
|
|
2309
|
-
disabled:
|
|
2310
|
-
"popper-class":
|
|
2383
|
+
disabled: B.value,
|
|
2384
|
+
"popper-class": ve.value
|
|
2311
2385
|
}, {
|
|
2312
2386
|
reference: O(() => [a("button", {
|
|
2313
2387
|
class: "ml-ribbon-simplified-group",
|
|
2314
2388
|
type: "button",
|
|
2315
|
-
disabled:
|
|
2316
|
-
}, [
|
|
2389
|
+
disabled: B.value
|
|
2390
|
+
}, [Xe(e) ? (v(), n(E(F), {
|
|
2317
2391
|
key: 0,
|
|
2318
2392
|
class: "ml-ribbon-simplified-group__icon"
|
|
2319
2393
|
}, {
|
|
2320
|
-
default: O(() => [(v(), n(C(
|
|
2394
|
+
default: O(() => [(v(), n(C(Xe(e))))]),
|
|
2321
2395
|
_: 2
|
|
2322
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
2323
|
-
default: O(() => [a("div",
|
|
2324
|
-
group:
|
|
2325
|
-
"gallery-preview-fallback":
|
|
2326
|
-
|
|
2327
|
-
|
|
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,
|
|
2401
|
+
onItemClick: l[12] ||= (e) => Q(e.groupId, e.itemId)
|
|
2402
|
+
}, null, 8, [
|
|
2403
|
+
"group",
|
|
2404
|
+
"gallery-preview-fallback",
|
|
2405
|
+
"disabled"
|
|
2406
|
+
])])]),
|
|
2328
2407
|
_: 2
|
|
2329
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2330
|
-
c(
|
|
2331
|
-
open: E(
|
|
2332
|
-
size:
|
|
2333
|
-
"back-label":
|
|
2334
|
-
title:
|
|
2335
|
-
description:
|
|
2336
|
-
onClose:
|
|
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,
|
|
2415
|
+
onClose: We
|
|
2337
2416
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
2338
2417
|
name: "default",
|
|
2339
2418
|
fn: O(() => [S(t.$slots, "backstage", {
|
|
2340
|
-
close:
|
|
2341
|
-
open: E(
|
|
2342
|
-
size:
|
|
2343
|
-
backLabel:
|
|
2344
|
-
title:
|
|
2345
|
-
description:
|
|
2346
|
-
disabled: E(
|
|
2419
|
+
close: We,
|
|
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
|
|
2347
2426
|
})]),
|
|
2348
2427
|
key: "0"
|
|
2349
2428
|
} : void 0]), 1032, [
|
|
@@ -2353,14 +2432,14 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2353
2432
|
"title",
|
|
2354
2433
|
"description"
|
|
2355
2434
|
])
|
|
2356
|
-
], 10,
|
|
2435
|
+
], 10, mt))]),
|
|
2357
2436
|
_: 3
|
|
2358
2437
|
}, 8, ["size"]));
|
|
2359
2438
|
}
|
|
2360
|
-
}),
|
|
2439
|
+
}), Rt = {
|
|
2361
2440
|
class: "ml-ribbon-tab-definition",
|
|
2362
2441
|
hidden: ""
|
|
2363
|
-
},
|
|
2442
|
+
}, zt = /* @__PURE__ */ l({
|
|
2364
2443
|
__name: "RibbonTab",
|
|
2365
2444
|
props: {
|
|
2366
2445
|
id: {},
|
|
@@ -2371,13 +2450,13 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2371
2450
|
contextualTitle: {}
|
|
2372
2451
|
},
|
|
2373
2452
|
setup(e) {
|
|
2374
|
-
return (e, t) => (v(), i("div",
|
|
2453
|
+
return (e, t) => (v(), i("div", Rt, [S(e.$slots, "default")]));
|
|
2375
2454
|
}
|
|
2376
|
-
}),
|
|
2455
|
+
}), Bt = {
|
|
2377
2456
|
key: 0,
|
|
2378
2457
|
class: "ml-ribbon-keytips",
|
|
2379
2458
|
"aria-live": "polite"
|
|
2380
|
-
},
|
|
2459
|
+
}, Vt = { class: "ml-ribbon-keytips__hint" }, Ht = /* @__PURE__ */ l({
|
|
2381
2460
|
__name: "RibbonKeyTips",
|
|
2382
2461
|
props: {
|
|
2383
2462
|
open: { type: Boolean },
|
|
@@ -2412,11 +2491,11 @@ var Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstag
|
|
|
2412
2491
|
}
|
|
2413
2492
|
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), D(() => s.open, (e) => {
|
|
2414
2493
|
e || y();
|
|
2415
|
-
}), (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", {
|
|
2416
2495
|
key: e.id,
|
|
2417
2496
|
class: "ml-ribbon-keytip"
|
|
2418
2497
|
}, w(e.key), 1))), 128))])) : r("", !0);
|
|
2419
2498
|
}
|
|
2420
2499
|
});
|
|
2421
2500
|
//#endregion
|
|
2422
|
-
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 };
|