@mlightcad/ribbon 0.0.8 → 0.1.0
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 +7 -1
- package/dist/components/Ribbon.vue.d.ts +2 -2
- package/dist/index.d.ts +11 -1
- package/dist/items/RibbonButton.vue.d.ts +65 -0
- package/dist/items/RibbonButtonGroup.vue.d.ts +20 -6
- package/dist/items/RibbonDropdown.vue.d.ts +83 -0
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +1033 -725
- package/dist/ml-ribbon.umd.js +1 -1
- package/dist/types.d.ts +7 -0
- 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
|
|
3
|
-
import { ArrowDown as
|
|
2
|
+
import { ElButton as ee, ElButtonGroup as A, ElCheckbox as te, ElColorPicker as ne, ElConfigProvider as j, ElDrawer as M, ElDropdown as N, ElDropdownItem as P, ElDropdownMenu as F, ElIcon as I, ElOption as L, ElPopover as R, ElSegmented as re, ElSelect as z, ElSwitch as B, ElTooltip as V, useGlobalConfig as ie } from "element-plus";
|
|
3
|
+
import { ArrowDown as H, ArrowDownBold as U, ArrowUp as ae, ArrowUpBold as W, Grid as oe, Menu as se, Promotion as ce } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
|
-
var
|
|
5
|
+
var le = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/ribbon/composables/useRibbonState.ts
|
|
8
|
-
function
|
|
8
|
+
function G(e) {
|
|
9
9
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function K(e) {
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = { ...e };
|
|
14
|
-
return "icon" in t && (t.icon =
|
|
14
|
+
return "icon" in t && (t.icon = G(t.icon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
|
|
15
15
|
if (!e || typeof e != "object") return e;
|
|
16
16
|
let t = e;
|
|
17
17
|
return "icon" in t ? {
|
|
18
18
|
...t,
|
|
19
|
-
icon:
|
|
19
|
+
icon: G(t.icon)
|
|
20
20
|
} : t;
|
|
21
21
|
})), t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function q(e) {
|
|
24
24
|
return {
|
|
25
25
|
...e,
|
|
26
|
-
icon:
|
|
27
|
-
props:
|
|
26
|
+
icon: G(e.icon),
|
|
27
|
+
props: K(e.props)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function ue(e) {
|
|
31
31
|
return {
|
|
32
32
|
...e,
|
|
33
|
-
icon:
|
|
34
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
33
|
+
icon: G(e.icon),
|
|
34
|
+
footerMenuItems: e.footerMenuItems?.map(q),
|
|
35
35
|
collections: e.collections?.map((e) => ({
|
|
36
36
|
...e,
|
|
37
|
-
items: e.items.map(
|
|
37
|
+
items: e.items.map(q)
|
|
38
38
|
}))
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function de(e) {
|
|
42
42
|
return {
|
|
43
43
|
...e,
|
|
44
|
-
groups: e.groups?.map(
|
|
44
|
+
groups: e.groups?.map(ue)
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return e.map(
|
|
47
|
+
function J(e) {
|
|
48
|
+
return e.map(de);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function fe(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 Y(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 J(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 X(e, n, r, i, a, o, s, c) {
|
|
65
|
+
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(J(n)), m = b(!1), h = b(!1), g = b(!1), _ = b([]), v = b(""), y = b(s), x = b(c), S = t(() => p.value.filter((e) => e.visible !== !1)), C = {
|
|
66
66
|
addTab(e) {
|
|
67
|
-
p.value.push(
|
|
67
|
+
p.value.push(de(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 me(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 ??= [], fe(t), n.groups.push(ue(t)));
|
|
86
86
|
},
|
|
87
87
|
removeGroup(e, t) {
|
|
88
88
|
let n = p.value.find((t) => t.id === e);
|
|
@@ -97,16 +97,16 @@ function me(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
|
+
Y(p.value, e, t, n, (e) => e.push(q(r)));
|
|
101
101
|
},
|
|
102
102
|
removeItem(e, t, n, r) {
|
|
103
|
-
|
|
103
|
+
Y(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
|
+
Y(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 me(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 Z = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstage__content" }, me = { key: 0 }, he = { key: 1 }, ge = /* @__PURE__ */ l({
|
|
159
159
|
__name: "RibbonBackstage",
|
|
160
160
|
props: {
|
|
161
161
|
open: { type: Boolean },
|
|
@@ -170,7 +170,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { 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(M), {
|
|
174
174
|
"model-value": l.open,
|
|
175
175
|
size: "100%",
|
|
176
176
|
"with-header": !1,
|
|
@@ -184,24 +184,24 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { 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", Z, [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", pe, [l.title ? (v(), i("h2", me, w(l.title), 1)) : r("", !0), l.description ? (v(), i("p", he, w(l.description), 1)) : r("", !0)])], 64))], 2)]),
|
|
194
194
|
_: 3
|
|
195
195
|
}, 8, ["model-value"]));
|
|
196
196
|
}
|
|
197
|
-
}),
|
|
197
|
+
}), Q = {
|
|
198
198
|
class: "ml-ribbon-tabs",
|
|
199
199
|
role: "tablist"
|
|
200
|
-
},
|
|
200
|
+
}, _e = [
|
|
201
201
|
"aria-selected",
|
|
202
202
|
"disabled",
|
|
203
203
|
"onClick"
|
|
204
|
-
],
|
|
204
|
+
], ve = /* @__PURE__ */ l({
|
|
205
205
|
__name: "RibbonTabs",
|
|
206
206
|
props: {
|
|
207
207
|
tabs: {},
|
|
@@ -217,7 +217,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { 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", Q, [(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 Y = { class: "ml-ribbon-backstage__nav" }, he = { 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, _e))), 128))]));
|
|
229
229
|
}
|
|
230
|
-
}),
|
|
230
|
+
}), ye = { class: "ml-ribbon-contextual-tabs" }, be = { class: "ml-ribbon-contextual-tabs__normal" }, xe = { class: "ml-ribbon-contextual-tabs__ctx" }, Se = /* @__PURE__ */ l({
|
|
231
231
|
__name: "RibbonContextualTabs",
|
|
232
232
|
props: {
|
|
233
233
|
tabs: {},
|
|
@@ -238,7 +238,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { 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", ye, [a("div", be, [c(ve, {
|
|
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 Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
247
247
|
"tabs",
|
|
248
248
|
"active-tab",
|
|
249
249
|
"disabled"
|
|
250
|
-
])]), a("div",
|
|
250
|
+
])]), a("div", xe, [(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(ve, {
|
|
255
255
|
tabs: [e],
|
|
256
256
|
"active-tab": t.activeTab,
|
|
257
257
|
disabled: r.disabled,
|
|
@@ -262,7 +262,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
262
262
|
"disabled"
|
|
263
263
|
])], 4))), 128))])]));
|
|
264
264
|
}
|
|
265
|
-
}),
|
|
265
|
+
}), Ce = ["disabled"], we = /* @__PURE__ */ l({
|
|
266
266
|
__name: "RibbonFileMenu",
|
|
267
267
|
props: {
|
|
268
268
|
items: {},
|
|
@@ -273,7 +273,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { 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 = ie("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 Y = { class: "ml-ribbon-backstage__nav" }, he = { 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(N), {
|
|
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(F), null, {
|
|
297
|
+
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(P), {
|
|
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(P), {
|
|
304
304
|
key: e.id,
|
|
305
305
|
divided: u.showOpenBackstage !== !1 && t === 0,
|
|
306
306
|
command: e.id,
|
|
@@ -319,11 +319,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { 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, Ce)]),
|
|
323
323
|
_: 1
|
|
324
324
|
}, 8, ["disabled", "popper-class"]));
|
|
325
325
|
}
|
|
326
|
-
}),
|
|
326
|
+
}), Te = /* @__PURE__ */ l({
|
|
327
327
|
__name: "RibbonCollection",
|
|
328
328
|
props: {
|
|
329
329
|
id: {},
|
|
@@ -337,87 +337,430 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
337
337
|
style: h(r.value)
|
|
338
338
|
}, [S(e.$slots, "default")], 6));
|
|
339
339
|
}
|
|
340
|
-
}),
|
|
341
|
-
key:
|
|
342
|
-
class: "ml-ribbon-
|
|
343
|
-
},
|
|
344
|
-
|
|
340
|
+
}), Ee = {
|
|
341
|
+
key: 3,
|
|
342
|
+
class: "ml-ribbon-item-host__label ml-ribbon-button__label"
|
|
343
|
+
}, De = /* @__PURE__ */ l({
|
|
344
|
+
name: "MlRibbonButton",
|
|
345
|
+
__name: "RibbonButton",
|
|
345
346
|
props: {
|
|
346
347
|
id: {},
|
|
347
|
-
label: {},
|
|
348
|
-
|
|
348
|
+
label: { default: void 0 },
|
|
349
|
+
icon: { default: void 0 },
|
|
349
350
|
disabled: {
|
|
350
351
|
type: Boolean,
|
|
351
352
|
default: !1
|
|
352
353
|
},
|
|
353
|
-
|
|
354
|
+
hideLabel: {
|
|
355
|
+
type: Boolean,
|
|
356
|
+
default: !1
|
|
357
|
+
},
|
|
358
|
+
ariaLabel: { default: void 0 },
|
|
359
|
+
iconSize: { default: void 0 },
|
|
360
|
+
size: { default: void 0 },
|
|
361
|
+
buttonType: { default: "default" },
|
|
362
|
+
nativeType: { default: "button" }
|
|
354
363
|
},
|
|
355
|
-
emits: ["
|
|
356
|
-
setup(
|
|
357
|
-
let o = t,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
364
|
+
emits: ["click"],
|
|
365
|
+
setup(e, { emit: a }) {
|
|
366
|
+
let o = e, c = a, l = t(() => o.label === void 0 ? o.id : o.label.trim()), u = t(() => !o.hideLabel && l.value.length > 0), d = t(() => o.ariaLabel?.trim() || l.value || o.id), f = t(() => !o.icon || typeof o.icon == "string" ? null : o.icon), p = t(() => {
|
|
367
|
+
if (typeof o.icon != "string") return null;
|
|
368
|
+
let e = o.icon.trim();
|
|
369
|
+
return e.length > 0 ? e : null;
|
|
370
|
+
}), g = t(() => u.value ? "ml-ribbon-item-host__icon--with-label" : "ml-ribbon-item-host__icon--icon-only"), _ = t(() => {
|
|
371
|
+
if (o.iconSize) return { fontSize: o.iconSize };
|
|
372
|
+
});
|
|
373
|
+
function y(e) {
|
|
374
|
+
o.disabled || c("click", e);
|
|
375
|
+
}
|
|
376
|
+
return (t, a) => (v(), n(E(ee), {
|
|
377
|
+
class: "ml-ribbon-button",
|
|
378
|
+
"data-ribbon-button-id": e.id,
|
|
379
|
+
type: e.buttonType,
|
|
380
|
+
size: e.size,
|
|
381
|
+
"native-type": e.nativeType,
|
|
382
|
+
disabled: e.disabled,
|
|
383
|
+
"aria-label": d.value,
|
|
384
|
+
onClick: y
|
|
385
|
+
}, {
|
|
386
|
+
default: O(() => [
|
|
387
|
+
t.$slots.icon ? (v(), i("span", {
|
|
388
|
+
key: 0,
|
|
389
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
390
|
+
style: h(_.value),
|
|
391
|
+
"aria-hidden": "true"
|
|
392
|
+
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(I), {
|
|
393
|
+
key: 1,
|
|
394
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
395
|
+
style: h(_.value)
|
|
396
|
+
}, {
|
|
397
|
+
default: O(() => [(v(), n(C(f.value)))]),
|
|
398
|
+
_: 1
|
|
399
|
+
}, 8, ["class", "style"])) : p.value ? (v(), i("i", {
|
|
400
|
+
key: 2,
|
|
401
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class ml-ribbon-button__icon", [p.value, g.value]]),
|
|
402
|
+
style: h(_.value),
|
|
403
|
+
"aria-hidden": "true"
|
|
404
|
+
}, null, 6)) : r("", !0),
|
|
405
|
+
u.value ? (v(), i("span", Ee, [S(t.$slots, "label", {}, () => [s(w(l.value), 1)])])) : r("", !0),
|
|
406
|
+
S(t.$slots, "default")
|
|
407
|
+
]),
|
|
408
|
+
_: 3
|
|
409
|
+
}, 8, [
|
|
410
|
+
"data-ribbon-button-id",
|
|
411
|
+
"type",
|
|
412
|
+
"size",
|
|
413
|
+
"native-type",
|
|
414
|
+
"disabled",
|
|
415
|
+
"aria-label"
|
|
416
|
+
]));
|
|
371
417
|
}
|
|
372
|
-
}),
|
|
418
|
+
}), Oe = ["data-id"], ke = {
|
|
419
|
+
key: 0,
|
|
420
|
+
class: "ml-ribbon-button-group__label"
|
|
421
|
+
}, Ae = { class: "ml-ribbon-button-group__text" }, je = /* @__PURE__ */ l({
|
|
373
422
|
__name: "RibbonButtonGroup",
|
|
374
423
|
props: {
|
|
375
424
|
id: {},
|
|
376
425
|
label: {},
|
|
377
426
|
options: {},
|
|
427
|
+
hideLabel: {
|
|
428
|
+
type: Boolean,
|
|
429
|
+
default: !1
|
|
430
|
+
},
|
|
431
|
+
wrap: {
|
|
432
|
+
type: Boolean,
|
|
433
|
+
default: !0
|
|
434
|
+
},
|
|
435
|
+
equalWidth: {
|
|
436
|
+
type: Boolean,
|
|
437
|
+
default: !1
|
|
438
|
+
},
|
|
439
|
+
buttonSize: {},
|
|
440
|
+
iconSize: {},
|
|
441
|
+
tooltipShowAfter: { default: 1e3 },
|
|
442
|
+
tooltipHideAfter: { default: 0 },
|
|
378
443
|
disabled: {
|
|
379
444
|
type: Boolean,
|
|
380
445
|
default: !1
|
|
381
446
|
}
|
|
382
447
|
},
|
|
383
448
|
emits: ["change"],
|
|
384
|
-
setup(t, { emit:
|
|
385
|
-
let l = t, u =
|
|
449
|
+
setup(t, { emit: s }) {
|
|
450
|
+
let l = t, u = s;
|
|
386
451
|
function d(e) {
|
|
387
452
|
l.disabled || u("change", e);
|
|
388
453
|
}
|
|
389
|
-
|
|
390
|
-
|
|
454
|
+
function f(e) {
|
|
455
|
+
return typeof e == "string" && e.trim().length > 0;
|
|
456
|
+
}
|
|
457
|
+
function p(e) {
|
|
458
|
+
if (typeof e != "string") return;
|
|
459
|
+
let t = e.trim();
|
|
460
|
+
return t.length > 0 ? t : void 0;
|
|
461
|
+
}
|
|
462
|
+
function h(e) {
|
|
463
|
+
if (typeof e == "string") {
|
|
464
|
+
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
465
|
+
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : void 0;
|
|
466
|
+
}
|
|
467
|
+
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
468
|
+
}
|
|
469
|
+
function g(e) {
|
|
470
|
+
return p(e.tooltip) ?? p(e.label) ?? h(e.value);
|
|
471
|
+
}
|
|
472
|
+
return (s, l) => (v(), i("div", {
|
|
473
|
+
class: m(["ml-ribbon-button-group", {
|
|
474
|
+
"ml-ribbon-button-group--nowrap": !t.wrap,
|
|
475
|
+
"ml-ribbon-button-group--equal-width": !t.wrap && t.equalWidth
|
|
476
|
+
}]),
|
|
391
477
|
"data-id": t.id
|
|
392
|
-
}, [
|
|
393
|
-
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(
|
|
394
|
-
key: e.value,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
478
|
+
}, [!t.hideLabel && t.label ? (v(), i("div", ke, 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(V), {
|
|
480
|
+
key: String(e.value),
|
|
481
|
+
content: g(e),
|
|
482
|
+
disabled: !g(e),
|
|
483
|
+
"show-after": t.tooltipShowAfter,
|
|
484
|
+
"hide-after": t.tooltipHideAfter,
|
|
485
|
+
placement: "top",
|
|
486
|
+
effect: "dark"
|
|
398
487
|
}, {
|
|
399
|
-
default: O(() => [
|
|
400
|
-
|
|
401
|
-
class: "ml-ribbon-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
488
|
+
default: O(() => [c(De, {
|
|
489
|
+
id: String(e.value),
|
|
490
|
+
class: "ml-ribbon-button-group__button",
|
|
491
|
+
label: e.label,
|
|
492
|
+
icon: e.icon,
|
|
493
|
+
"icon-size": t.iconSize,
|
|
494
|
+
size: t.buttonSize,
|
|
495
|
+
disabled: t.disabled,
|
|
496
|
+
"hide-label": !f(e.label),
|
|
497
|
+
"aria-label": g(e) ?? String(e.value),
|
|
498
|
+
onClick: (t) => d(e.value)
|
|
499
|
+
}, o({ _: 2 }, [f(e.label) ? {
|
|
500
|
+
name: "label",
|
|
501
|
+
fn: O(() => [a("span", Ae, w(e.label), 1)]),
|
|
502
|
+
key: "0"
|
|
503
|
+
} : void 0]), 1032, [
|
|
504
|
+
"id",
|
|
505
|
+
"label",
|
|
506
|
+
"icon",
|
|
507
|
+
"icon-size",
|
|
508
|
+
"size",
|
|
509
|
+
"disabled",
|
|
510
|
+
"hide-label",
|
|
511
|
+
"aria-label",
|
|
512
|
+
"onClick"
|
|
513
|
+
])]),
|
|
406
514
|
_: 2
|
|
407
|
-
}, 1032, [
|
|
515
|
+
}, 1032, [
|
|
516
|
+
"content",
|
|
517
|
+
"disabled",
|
|
518
|
+
"show-after",
|
|
519
|
+
"hide-after"
|
|
520
|
+
]))), 128))]),
|
|
408
521
|
_: 1
|
|
409
|
-
})],
|
|
522
|
+
})], 10, Oe));
|
|
523
|
+
}
|
|
524
|
+
}), Me = { class: "ml-ribbon-item-host__content ml-ribbon-dropdown__content" }, Ne = { class: "ml-ribbon-item-host__text-row ml-ribbon-dropdown__text-row" }, Pe = {
|
|
525
|
+
key: 0,
|
|
526
|
+
class: "ml-ribbon-item-host__label ml-ribbon-dropdown__label"
|
|
527
|
+
}, Fe = { class: "ml-ribbon-dropdown-item__content" }, Ie = { class: "ml-ribbon-dropdown-item__label" }, Le = /* @__PURE__ */ l({
|
|
528
|
+
name: "MlRibbonDropdown",
|
|
529
|
+
__name: "RibbonDropdown",
|
|
530
|
+
props: {
|
|
531
|
+
id: {},
|
|
532
|
+
label: { default: void 0 },
|
|
533
|
+
tooltip: { default: void 0 },
|
|
534
|
+
icon: { default: void 0 },
|
|
535
|
+
options: { default: () => [] },
|
|
536
|
+
disabled: {
|
|
537
|
+
type: Boolean,
|
|
538
|
+
default: !1
|
|
539
|
+
},
|
|
540
|
+
hideLabel: {
|
|
541
|
+
type: Boolean,
|
|
542
|
+
default: !1
|
|
543
|
+
},
|
|
544
|
+
syncLabelWithSelection: {
|
|
545
|
+
type: Boolean,
|
|
546
|
+
default: !1
|
|
547
|
+
},
|
|
548
|
+
itemSize: { default: "medium" },
|
|
549
|
+
tooltipShowAfter: { default: 1e3 },
|
|
550
|
+
tooltipHideAfter: { default: 0 },
|
|
551
|
+
popperClass: { default: void 0 }
|
|
552
|
+
},
|
|
553
|
+
emits: [
|
|
554
|
+
"command",
|
|
555
|
+
"click",
|
|
556
|
+
"tooltip-change"
|
|
557
|
+
],
|
|
558
|
+
setup(o, { emit: l }) {
|
|
559
|
+
let u = o, d = l, f = ie("size", ""), p = t(() => f.value || "default"), h = b(!1), g = b(void 0), _ = t(() => Array.isArray(u.options) ? u.options : []), y = t(() => _.value.find((e) => W(e) === g.value) ?? null), T = t(() => {
|
|
560
|
+
if (y.value && u.syncLabelWithSelection) {
|
|
561
|
+
let e = se(y.value);
|
|
562
|
+
if (e) return e;
|
|
563
|
+
}
|
|
564
|
+
return G(u.label) ?? u.id;
|
|
565
|
+
}), D = t(() => !u.hideLabel && T.value.length > 0), A = t(() => {
|
|
566
|
+
if (y.value) {
|
|
567
|
+
let e = B(y.value);
|
|
568
|
+
if (e) return e;
|
|
569
|
+
}
|
|
570
|
+
return !u.icon || typeof u.icon == "string" ? null : u.icon;
|
|
571
|
+
}), te = t(() => {
|
|
572
|
+
if (y.value) {
|
|
573
|
+
let e = U(y.value);
|
|
574
|
+
if (e) return e;
|
|
575
|
+
}
|
|
576
|
+
if (typeof u.icon != "string") return null;
|
|
577
|
+
let e = u.icon.trim();
|
|
578
|
+
return e.length > 0 ? e : null;
|
|
579
|
+
}), ne = t(() => !!(A.value || te.value)), j = t(() => le(y.value) ?? G(u.tooltip) ?? G(T.value) ?? G(u.label) ?? K(u.id)), M = t(() => [
|
|
580
|
+
"ml-ribbon-dropdown-menu",
|
|
581
|
+
"ml-ribbon-popper",
|
|
582
|
+
`ml-ribbon-popper--size-${p.value}`,
|
|
583
|
+
u.popperClass
|
|
584
|
+
].filter(Boolean).join(" "));
|
|
585
|
+
function L(e) {
|
|
586
|
+
if (u.disabled) {
|
|
587
|
+
h.value = !1;
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
h.value = e;
|
|
591
|
+
}
|
|
592
|
+
function R() {
|
|
593
|
+
u.disabled || (h.value = !h.value);
|
|
594
|
+
}
|
|
595
|
+
function re(e) {
|
|
596
|
+
u.disabled || (g.value = e, d("tooltip-change", le(y.value) ?? j.value), d("command", e), h.value = !1);
|
|
597
|
+
}
|
|
598
|
+
function z() {
|
|
599
|
+
if (u.disabled) return;
|
|
600
|
+
let e = y.value;
|
|
601
|
+
if (!e) {
|
|
602
|
+
d("click");
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
d("command", W(e));
|
|
606
|
+
}
|
|
607
|
+
function B(e) {
|
|
608
|
+
if (!e || typeof e != "object") return null;
|
|
609
|
+
let t = e.icon;
|
|
610
|
+
return !t || typeof t == "string" ? null : t;
|
|
611
|
+
}
|
|
612
|
+
function U(e) {
|
|
613
|
+
if (!e || typeof e != "object") return null;
|
|
614
|
+
let t = e.icon;
|
|
615
|
+
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
616
|
+
}
|
|
617
|
+
function W(e) {
|
|
618
|
+
if (!(!e || typeof e != "object")) return e.value;
|
|
619
|
+
}
|
|
620
|
+
function oe(e) {
|
|
621
|
+
let t = W(e);
|
|
622
|
+
if (typeof t == "string" || typeof t == "number" || t && typeof t == "object") return t;
|
|
623
|
+
}
|
|
624
|
+
function se(e) {
|
|
625
|
+
if (!e || typeof e != "object") return;
|
|
626
|
+
let t = e.label;
|
|
627
|
+
return typeof t == "string" ? t : void 0;
|
|
628
|
+
}
|
|
629
|
+
function ce(e) {
|
|
630
|
+
if (typeof e == "string") return K(e);
|
|
631
|
+
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
632
|
+
}
|
|
633
|
+
function le(e) {
|
|
634
|
+
if (!(!e || typeof e != "object")) return G(e.tooltip) ?? se(e) ?? ce(W(e));
|
|
635
|
+
}
|
|
636
|
+
function G(e) {
|
|
637
|
+
if (typeof e != "string") return;
|
|
638
|
+
let t = e.trim();
|
|
639
|
+
return t.length > 0 ? t : void 0;
|
|
640
|
+
}
|
|
641
|
+
function K(e) {
|
|
642
|
+
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
643
|
+
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
644
|
+
}
|
|
645
|
+
return (t, l) => (v(), n(E(N), {
|
|
646
|
+
class: m(["ml-ribbon-dropdown", [`ml-ribbon-dropdown--item-${o.itemSize}`, { "is-label-hidden": o.hideLabel }]]),
|
|
647
|
+
trigger: "click",
|
|
648
|
+
disabled: o.disabled,
|
|
649
|
+
"popper-class": M.value,
|
|
650
|
+
onVisibleChange: L,
|
|
651
|
+
onCommand: re
|
|
652
|
+
}, {
|
|
653
|
+
dropdown: O(() => [c(E(F), null, {
|
|
654
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(P), {
|
|
655
|
+
key: String(W(e)),
|
|
656
|
+
command: oe(e),
|
|
657
|
+
disabled: e.disabled === !0
|
|
658
|
+
}, {
|
|
659
|
+
default: O(() => [c(E(V), {
|
|
660
|
+
content: le(e),
|
|
661
|
+
disabled: !le(e),
|
|
662
|
+
"show-after": o.tooltipShowAfter,
|
|
663
|
+
"hide-after": o.tooltipHideAfter,
|
|
664
|
+
placement: "top",
|
|
665
|
+
effect: "dark"
|
|
666
|
+
}, {
|
|
667
|
+
default: O(() => [a("span", Fe, [S(t.$slots, "option", { option: e }, () => [B(e) ? (v(), n(E(I), {
|
|
668
|
+
key: 0,
|
|
669
|
+
class: "ml-ribbon-dropdown-item__icon"
|
|
670
|
+
}, {
|
|
671
|
+
default: O(() => [(v(), n(C(B(e))))]),
|
|
672
|
+
_: 2
|
|
673
|
+
}, 1024)) : U(e) ? (v(), i("i", {
|
|
674
|
+
key: 1,
|
|
675
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", U(e)]),
|
|
676
|
+
"aria-hidden": "true"
|
|
677
|
+
}, null, 2)) : r("", !0), a("span", Ie, w(se(e)), 1)])])]),
|
|
678
|
+
_: 2
|
|
679
|
+
}, 1032, [
|
|
680
|
+
"content",
|
|
681
|
+
"disabled",
|
|
682
|
+
"show-after",
|
|
683
|
+
"hide-after"
|
|
684
|
+
])]),
|
|
685
|
+
_: 2
|
|
686
|
+
}, 1032, ["command", "disabled"]))), 128))]),
|
|
687
|
+
_: 3
|
|
688
|
+
})]),
|
|
689
|
+
default: O(() => [c(E(ee), {
|
|
690
|
+
type: "default",
|
|
691
|
+
disabled: o.disabled,
|
|
692
|
+
"aria-label": j.value,
|
|
693
|
+
onClick: R
|
|
694
|
+
}, {
|
|
695
|
+
default: O(() => [a("span", Me, [t.$slots.icon || ne.value ? (v(), i("span", {
|
|
696
|
+
key: 0,
|
|
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(z, ["stop"])
|
|
699
|
+
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [A.value ? (v(), n(E(I), { key: 0 }, {
|
|
700
|
+
default: O(() => [(v(), n(C(A.value)))]),
|
|
701
|
+
_: 1
|
|
702
|
+
})) : te.value ? (v(), i("i", {
|
|
703
|
+
key: 1,
|
|
704
|
+
class: m(te.value),
|
|
705
|
+
"aria-hidden": "true"
|
|
706
|
+
}, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span", Ne, [D.value ? (v(), i("span", Pe, [S(t.$slots, "label", {
|
|
707
|
+
selectedOption: y.value,
|
|
708
|
+
label: T.value
|
|
709
|
+
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(I), { 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(ae) : E(H))))]),
|
|
711
|
+
_: 1
|
|
712
|
+
}, 8, ["class"])])])]),
|
|
713
|
+
_: 3
|
|
714
|
+
}, 8, ["disabled", "aria-label"])]),
|
|
715
|
+
_: 3
|
|
716
|
+
}, 8, [
|
|
717
|
+
"class",
|
|
718
|
+
"disabled",
|
|
719
|
+
"popper-class"
|
|
720
|
+
]));
|
|
721
|
+
}
|
|
722
|
+
}), Re = {
|
|
723
|
+
key: 0,
|
|
724
|
+
class: "ml-ribbon-gallery__title"
|
|
725
|
+
}, ze = { class: "ml-ribbon-gallery__categories" }, Be = { class: "ml-ribbon-gallery__category-title" }, Ve = { class: "ml-ribbon-gallery__grid" }, He = ["disabled", "onClick"], Ue = { class: "ml-ribbon-gallery__preview" }, We = { class: "ml-ribbon-gallery__label" }, Ge = /* @__PURE__ */ l({
|
|
726
|
+
__name: "RibbonGallery",
|
|
727
|
+
props: {
|
|
728
|
+
id: {},
|
|
729
|
+
label: {},
|
|
730
|
+
categories: {},
|
|
731
|
+
disabled: {
|
|
732
|
+
type: Boolean,
|
|
733
|
+
default: !1
|
|
734
|
+
},
|
|
735
|
+
previewFallback: {}
|
|
736
|
+
},
|
|
737
|
+
emits: ["select"],
|
|
738
|
+
setup(t, { emit: n }) {
|
|
739
|
+
let o = t, s = n, c = b("");
|
|
740
|
+
function l(e) {
|
|
741
|
+
o.disabled || (c.value = e, s("select", e));
|
|
742
|
+
}
|
|
743
|
+
return (n, s) => (v(), i("div", { class: m(["ml-ribbon-gallery", { "is-disabled": t.disabled }]) }, [t.label ? (v(), i("div", Re, w(t.label), 1)) : r("", !0), a("div", ze, [(v(!0), i(e, null, x(t.categories, (n) => (v(), i("section", {
|
|
744
|
+
key: n.id,
|
|
745
|
+
class: "ml-ribbon-gallery__category"
|
|
746
|
+
}, [a("h4", Be, w(n.title), 1), a("div", Ve, [(v(!0), i(e, null, x(n.items, (e) => (v(), i("button", {
|
|
747
|
+
key: e.id,
|
|
748
|
+
type: "button",
|
|
749
|
+
class: m(["ml-ribbon-gallery__item", { "is-selected": c.value === e.id }]),
|
|
750
|
+
disabled: t.disabled,
|
|
751
|
+
onClick: (t) => l(e.id)
|
|
752
|
+
}, [a("div", Ue, w(e.preview ?? o.previewFallback), 1), a("div", We, w(e.label), 1)], 10, He))), 128))])]))), 128))])], 2));
|
|
410
753
|
}
|
|
411
|
-
}),
|
|
754
|
+
}), Ke = ["data-id"], qe = {
|
|
412
755
|
key: 0,
|
|
413
756
|
class: "ml-ribbon-segmented__label"
|
|
414
|
-
},
|
|
757
|
+
}, Je = ["data-option-value"], $ = {
|
|
415
758
|
key: 2,
|
|
416
759
|
class: "ml-ribbon-segmented__option-label"
|
|
417
|
-
},
|
|
760
|
+
}, Ye = {
|
|
418
761
|
key: 3,
|
|
419
762
|
class: "ml-ribbon-segmented__option-sr-label"
|
|
420
|
-
},
|
|
763
|
+
}, Xe = /* @__PURE__ */ l({
|
|
421
764
|
__name: "RibbonSegmented",
|
|
422
765
|
props: {
|
|
423
766
|
id: {},
|
|
@@ -473,7 +816,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
473
816
|
return (t, o) => (v(), i("div", {
|
|
474
817
|
class: "ml-ribbon-segmented",
|
|
475
818
|
"data-id": e.id
|
|
476
|
-
}, [d.value ? (v(), i("div",
|
|
819
|
+
}, [d.value ? (v(), i("div", qe, w(u.value), 1)) : r("", !0), c(E(re), {
|
|
477
820
|
class: "ml-ribbon-segmented__control",
|
|
478
821
|
options: e.options,
|
|
479
822
|
"model-value": e.modelValue,
|
|
@@ -486,7 +829,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
486
829
|
default: O(({ item: e }) => [a("span", {
|
|
487
830
|
class: "ml-ribbon-segmented__option",
|
|
488
831
|
"data-option-value": y(e)
|
|
489
|
-
}, [h(e) ? (v(), n(E(
|
|
832
|
+
}, [h(e) ? (v(), n(E(I), {
|
|
490
833
|
key: 0,
|
|
491
834
|
class: "ml-ribbon-segmented__option-icon",
|
|
492
835
|
"aria-hidden": "true"
|
|
@@ -497,7 +840,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
497
840
|
key: 1,
|
|
498
841
|
class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", g(e)]),
|
|
499
842
|
"aria-hidden": "true"
|
|
500
|
-
}, null, 2)) : r("", !0), _(e) ? (v(), i("span",
|
|
843
|
+
}, null, 2)) : r("", !0), _(e) ? (v(), i("span", $, w(p(e)), 1)) : (v(), i("span", Ye, w(p(e)), 1))], 8, Je)]),
|
|
501
844
|
_: 1
|
|
502
845
|
}, 8, [
|
|
503
846
|
"options",
|
|
@@ -506,12 +849,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
506
849
|
"block",
|
|
507
850
|
"disabled",
|
|
508
851
|
"aria-label"
|
|
509
|
-
])], 8,
|
|
852
|
+
])], 8, Ke));
|
|
510
853
|
}
|
|
511
|
-
}),
|
|
512
|
-
key: 2,
|
|
513
|
-
class: "ml-ribbon-item-host__label"
|
|
514
|
-
}, We = /* @__PURE__ */ l({
|
|
854
|
+
}), Ze = /* @__PURE__ */ l({
|
|
515
855
|
__name: "RibbonToggleButton",
|
|
516
856
|
props: {
|
|
517
857
|
id: {},
|
|
@@ -534,51 +874,39 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
534
874
|
inactiveLabel: { default: void 0 }
|
|
535
875
|
},
|
|
536
876
|
emits: ["change"],
|
|
537
|
-
setup(e, { emit:
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
function s(e) {
|
|
542
|
-
return typeof e != "string" || e.trim().length === 0 ? null : e;
|
|
543
|
-
}
|
|
544
|
-
let c = e, l = a, u = b(!!c.modelValue);
|
|
545
|
-
D(() => c.modelValue, (e) => {
|
|
546
|
-
u.value = !!e;
|
|
877
|
+
setup(e, { emit: r }) {
|
|
878
|
+
let i = e, a = r, o = b(!!i.modelValue);
|
|
879
|
+
D(() => i.modelValue, (e) => {
|
|
880
|
+
o.value = !!e;
|
|
547
881
|
}, { immediate: !0 });
|
|
548
|
-
let
|
|
549
|
-
function
|
|
550
|
-
if (
|
|
551
|
-
let e = !
|
|
552
|
-
|
|
553
|
-
}
|
|
554
|
-
return (t,
|
|
555
|
-
|
|
556
|
-
|
|
882
|
+
let s = t(() => o.value), c = t(() => s.value ? i.activeIcon ?? i.inactiveIcon : i.inactiveIcon ?? i.activeIcon), l = t(() => (s.value ? i.activeLabel?.trim() : i.inactiveLabel?.trim()) || i.label?.trim() || i.id), u = t(() => !i.hideLabel && l.value.length > 0);
|
|
883
|
+
function d() {
|
|
884
|
+
if (i.disabled) return;
|
|
885
|
+
let e = !o.value;
|
|
886
|
+
o.value = e, a("change", e);
|
|
887
|
+
}
|
|
888
|
+
return (t, r) => (v(), n(De, {
|
|
889
|
+
id: e.id,
|
|
890
|
+
class: m(["ml-ribbon-toggle", { "is-active": s.value }]),
|
|
891
|
+
icon: c.value,
|
|
892
|
+
label: l.value,
|
|
557
893
|
disabled: e.disabled,
|
|
558
|
-
"
|
|
559
|
-
"aria-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
class: "ml-ribbon-item-host__icon"
|
|
565
|
-
}, {
|
|
566
|
-
default: O(() => [(v(), n(C(p.value)))]),
|
|
567
|
-
_: 1
|
|
568
|
-
})) : h.value ? (v(), i("i", {
|
|
569
|
-
key: 1,
|
|
570
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", h.value]),
|
|
571
|
-
"aria-hidden": "true"
|
|
572
|
-
}, null, 2)) : r("", !0), _.value ? (v(), i("span", Ue, w(g.value), 1)) : r("", !0)]),
|
|
573
|
-
_: 1
|
|
574
|
-
}, 8, [
|
|
894
|
+
"hide-label": !u.value,
|
|
895
|
+
"aria-label": l.value,
|
|
896
|
+
"aria-pressed": String(s.value),
|
|
897
|
+
onClick: d
|
|
898
|
+
}, null, 8, [
|
|
899
|
+
"id",
|
|
575
900
|
"class",
|
|
901
|
+
"icon",
|
|
902
|
+
"label",
|
|
576
903
|
"disabled",
|
|
904
|
+
"hide-label",
|
|
577
905
|
"aria-label",
|
|
578
906
|
"aria-pressed"
|
|
579
907
|
]));
|
|
580
908
|
}
|
|
581
|
-
}),
|
|
909
|
+
}), Qe = ["data-template-id", "aria-disabled"], $e = /* @__PURE__ */ l({
|
|
582
910
|
__name: "RibbonTemplateItem",
|
|
583
911
|
props: {
|
|
584
912
|
id: {},
|
|
@@ -593,18 +921,12 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
593
921
|
}, [S(t.$slots, "default", {
|
|
594
922
|
item: e.item,
|
|
595
923
|
disabled: e.disabled
|
|
596
|
-
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8,
|
|
924
|
+
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8, Qe));
|
|
597
925
|
}
|
|
598
|
-
}),
|
|
926
|
+
}), et = ["data-item-id"], tt = {
|
|
599
927
|
key: 0,
|
|
600
928
|
class: "ml-ribbon-item-host__keytip"
|
|
601
|
-
},
|
|
602
|
-
key: 0,
|
|
603
|
-
class: "ml-ribbon-item-host__label"
|
|
604
|
-
}, Ze = { class: "ml-ribbon-dropdown-item__content" }, Qe = { class: "ml-ribbon-dropdown-item__label" }, $e = {
|
|
605
|
-
key: 2,
|
|
606
|
-
class: "ml-ribbon-item-host__label"
|
|
607
|
-
}, et = /* @__PURE__ */ l({
|
|
929
|
+
}, nt = /* @__PURE__ */ l({
|
|
608
930
|
__name: "RibbonItemHost",
|
|
609
931
|
props: {
|
|
610
932
|
id: {},
|
|
@@ -613,147 +935,138 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
613
935
|
galleryPreviewFallback: {}
|
|
614
936
|
},
|
|
615
937
|
emits: ["item-click"],
|
|
616
|
-
setup(o, { emit:
|
|
617
|
-
let
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
let t = De(e);
|
|
624
|
-
if (t) return t;
|
|
625
|
-
}
|
|
626
|
-
return d.item.label ?? d.item.id;
|
|
627
|
-
}), G = t(() => {
|
|
628
|
-
if (U.value) {
|
|
629
|
-
let e = we(U.value);
|
|
630
|
-
if (e) return e;
|
|
631
|
-
}
|
|
632
|
-
return j.value;
|
|
633
|
-
}), K = t(() => {
|
|
634
|
-
if (U.value) {
|
|
635
|
-
let e = Te(U.value);
|
|
636
|
-
if (e) return e;
|
|
637
|
-
}
|
|
638
|
-
return G.value ? null : L.value;
|
|
639
|
-
}), fe = t(() => {
|
|
640
|
-
if (!h?.keyTipsOpen.value || h?.disabled.value || !ce.value) return !1;
|
|
641
|
-
let e = h.keyTipsSequence.value.toLowerCase();
|
|
642
|
-
return e ? ce.value.toLowerCase().startsWith(e) : !0;
|
|
643
|
-
}), q = t(() => d.item.disabled === !0 || h?.disabled.value === !0), pe = t(() => d.item.props?.modelValue), J = t(() => d.item.props?.activeLabel), me = t(() => d.item.props?.inactiveLabel), Y = t(() => {
|
|
644
|
-
let e = d.item.props?.component;
|
|
938
|
+
setup(o, { emit: c }) {
|
|
939
|
+
let l = o, d = c, p = u(le, null), g = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), _ = ie("size", ""), y = t(() => _.value || "default"), T = t(() => be(p?.tooltipShowAfter.value, 1e3)), k = t(() => be(p?.tooltipHideAfter.value, 0)), ee = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${y.value}`), A = t(() => l.item.props?.icon || l.item.icon), j = t(() => l.item.hideLabel !== !0), M = b(void 0), N = t(() => l.item.type === "dropdown" && M.value ? M.value : ye(l.item.tooltip) ?? ye(l.item.label) ?? Te(l.item) ?? Ee(l.item.id)), P = t(() => l.item.type !== "buttonGroup"), F = t(() => !P.value || !N.value), I = t(() => N.value ?? l.item.id), R = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), re = t(() => {
|
|
940
|
+
if (!p?.keyTipsOpen.value || p?.disabled.value || !R.value) return !1;
|
|
941
|
+
let e = p.keyTipsSequence.value.toLowerCase();
|
|
942
|
+
return e ? R.value.toLowerCase().startsWith(e) : !0;
|
|
943
|
+
}), B = t(() => l.item.disabled === !0 || p?.disabled.value === !0), H = t(() => l.item.props?.modelValue), U = t(() => l.item.props?.activeLabel), ae = t(() => l.item.props?.inactiveLabel), W = t(() => {
|
|
944
|
+
let e = l.item.props?.component;
|
|
645
945
|
return !e || typeof e == "string" ? null : e;
|
|
646
|
-
}),
|
|
647
|
-
let e =
|
|
946
|
+
}), oe = t(() => {
|
|
947
|
+
let e = l.item.props?.componentProps;
|
|
648
948
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
949
|
+
}), se = t(() => l.item.props?.wrap !== !1), ce = t(() => l.item.props?.equalWidth === !0), G = t(() => {
|
|
950
|
+
let e = l.item.props?.buttonSize;
|
|
951
|
+
if (e === "large" || e === "default" || e === "small") return e;
|
|
952
|
+
}), K = t(() => Ce(l.item.props?.iconSize)), q = t(() => xe(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), ue = t(() => l.item.props?.modelValue), de = t(() => we(l.item.props?.labelWrapLines)), J = t(() => Se(l.item.props?.labelWrapWidth)), fe = t(() => l.item.type === "button" && l.item.size === "large" && j.value && (de.value ?? 0) > 1), Y = t(() => {
|
|
953
|
+
if (!fe.value) return {};
|
|
954
|
+
let e = { "--ml-rb-item-label-max-lines": String(de.value ?? 2) };
|
|
955
|
+
return J.value && (e["--ml-rb-item-label-wrap-width"] = J.value), e;
|
|
956
|
+
});
|
|
957
|
+
D(() => l.item.id, () => {
|
|
958
|
+
M.value = void 0;
|
|
649
959
|
});
|
|
650
960
|
function X() {
|
|
651
|
-
|
|
961
|
+
B.value || d("item-click", l.id);
|
|
652
962
|
}
|
|
653
|
-
function
|
|
654
|
-
if (
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
}
|
|
660
|
-
function _e(e) {
|
|
661
|
-
q.value || (ue.value = e, ye(e), H.value = !1);
|
|
662
|
-
}
|
|
663
|
-
function Z() {
|
|
664
|
-
q.value || (H.value = !H.value);
|
|
665
|
-
}
|
|
666
|
-
function ve() {
|
|
667
|
-
if (q.value) return;
|
|
668
|
-
let e = U.value;
|
|
669
|
-
if (!e) {
|
|
963
|
+
function Z(e) {
|
|
964
|
+
if (!B.value) {
|
|
965
|
+
if (typeof e == "string" || typeof e == "number") {
|
|
966
|
+
d("item-click", String(e));
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
670
969
|
X();
|
|
671
|
-
return;
|
|
672
970
|
}
|
|
673
|
-
ye(Ee(e));
|
|
674
971
|
}
|
|
675
|
-
function
|
|
676
|
-
|
|
677
|
-
p("item-click", String(e));
|
|
678
|
-
return;
|
|
679
|
-
}
|
|
680
|
-
X();
|
|
972
|
+
function pe(e) {
|
|
973
|
+
M.value = e;
|
|
681
974
|
}
|
|
682
|
-
function
|
|
683
|
-
if (!
|
|
975
|
+
function me(e) {
|
|
976
|
+
if (!B.value) {
|
|
684
977
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
685
|
-
|
|
978
|
+
d("item-click", String(e));
|
|
686
979
|
return;
|
|
687
980
|
}
|
|
688
981
|
X();
|
|
689
982
|
}
|
|
690
983
|
}
|
|
691
|
-
function
|
|
692
|
-
if (
|
|
693
|
-
let t = e ?
|
|
984
|
+
function he(e) {
|
|
985
|
+
if (B.value) return;
|
|
986
|
+
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
694
987
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
695
|
-
|
|
988
|
+
d("item-click", String(t));
|
|
696
989
|
return;
|
|
697
990
|
}
|
|
698
|
-
|
|
991
|
+
d("item-click", String(e));
|
|
699
992
|
}
|
|
700
|
-
function
|
|
701
|
-
if (!
|
|
993
|
+
function ge(e) {
|
|
994
|
+
if (!B.value) {
|
|
702
995
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
703
|
-
|
|
996
|
+
d("item-click", String(e));
|
|
704
997
|
return;
|
|
705
998
|
}
|
|
706
999
|
X();
|
|
707
1000
|
}
|
|
708
1001
|
}
|
|
709
|
-
function
|
|
710
|
-
if (!
|
|
711
|
-
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
712
|
-
|
|
1002
|
+
function Q(e) {
|
|
1003
|
+
if (!B.value) {
|
|
1004
|
+
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1005
|
+
d("item-click", String(e));
|
|
713
1006
|
return;
|
|
714
1007
|
}
|
|
715
1008
|
X();
|
|
716
1009
|
}
|
|
717
1010
|
}
|
|
718
|
-
function
|
|
719
|
-
if (!
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
727
|
-
}
|
|
728
|
-
function Ee(e) {
|
|
729
|
-
if (!(!e || typeof e != "object")) return e.value;
|
|
1011
|
+
function _e(e) {
|
|
1012
|
+
if (!B.value) {
|
|
1013
|
+
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1014
|
+
d("item-click", String(e));
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
X();
|
|
1018
|
+
}
|
|
730
1019
|
}
|
|
731
|
-
function
|
|
1020
|
+
function ve(e) {
|
|
732
1021
|
if (!e || typeof e != "object") return;
|
|
733
1022
|
let t = e.label;
|
|
734
1023
|
return typeof t == "string" ? t : void 0;
|
|
735
1024
|
}
|
|
736
|
-
function
|
|
1025
|
+
function ye(e) {
|
|
737
1026
|
if (typeof e != "string") return;
|
|
738
1027
|
let t = e.trim();
|
|
739
1028
|
return t.length > 0 ? t : void 0;
|
|
740
1029
|
}
|
|
741
|
-
function
|
|
1030
|
+
function be(e, t) {
|
|
742
1031
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
743
1032
|
}
|
|
744
|
-
function
|
|
745
|
-
|
|
1033
|
+
function xe(e, t) {
|
|
1034
|
+
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1035
|
+
if (typeof e == "string") {
|
|
1036
|
+
let n = e.trim();
|
|
1037
|
+
return n ? n.toLowerCase() === "full" ? "100%" : n : t;
|
|
1038
|
+
}
|
|
1039
|
+
return t;
|
|
1040
|
+
}
|
|
1041
|
+
function Se(e) {
|
|
1042
|
+
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1043
|
+
if (typeof e == "string") {
|
|
1044
|
+
let t = e.trim();
|
|
1045
|
+
return t ? t.toLowerCase() === "full" ? "100%" : t : void 0;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
function Ce(e) {
|
|
1049
|
+
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1050
|
+
if (typeof e != "string") return;
|
|
1051
|
+
let t = e.trim();
|
|
1052
|
+
return t.length > 0 ? t : void 0;
|
|
1053
|
+
}
|
|
1054
|
+
function we(e) {
|
|
1055
|
+
if (!(typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e))) return Math.max(1, Math.round(e));
|
|
1056
|
+
}
|
|
1057
|
+
function Te(e) {
|
|
1058
|
+
let t = g.value.map((e) => ve(e)).filter((e) => !!e);
|
|
746
1059
|
if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
|
|
747
1060
|
}
|
|
748
|
-
function
|
|
1061
|
+
function Ee(e) {
|
|
749
1062
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
750
1063
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
751
1064
|
}
|
|
752
|
-
return (t,
|
|
753
|
-
content:
|
|
754
|
-
disabled:
|
|
1065
|
+
return (t, c) => (v(), n(E(V), {
|
|
1066
|
+
content: N.value,
|
|
1067
|
+
disabled: F.value,
|
|
755
1068
|
"show-after": T.value,
|
|
756
|
-
"hide-after":
|
|
1069
|
+
"hide-after": k.value,
|
|
757
1070
|
placement: "top",
|
|
758
1071
|
effect: "dark"
|
|
759
1072
|
}, {
|
|
@@ -761,23 +1074,41 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
761
1074
|
class: m(["ml-ribbon-item-host", [
|
|
762
1075
|
`is-${o.item.size ?? "medium"}`,
|
|
763
1076
|
`type-${o.item.type}`,
|
|
764
|
-
{
|
|
1077
|
+
{
|
|
1078
|
+
"is-label-hidden": o.item.hideLabel === !0,
|
|
1079
|
+
"is-label-wrap": fe.value
|
|
1080
|
+
}
|
|
765
1081
|
]]),
|
|
1082
|
+
style: h(Y.value),
|
|
766
1083
|
"data-item-id": o.id,
|
|
767
1084
|
role: "group"
|
|
768
|
-
}, [
|
|
1085
|
+
}, [re.value ? (v(), i("span", tt, w(R.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(je, {
|
|
769
1086
|
key: 1,
|
|
770
1087
|
id: o.item.id,
|
|
771
1088
|
label: o.item.label ?? "",
|
|
772
1089
|
options: o.item.props?.options ?? [],
|
|
773
|
-
|
|
774
|
-
|
|
1090
|
+
"hide-label": o.item.hideLabel === !0,
|
|
1091
|
+
wrap: se.value,
|
|
1092
|
+
"equal-width": ce.value,
|
|
1093
|
+
"button-size": G.value,
|
|
1094
|
+
"icon-size": K.value,
|
|
1095
|
+
"tooltip-show-after": T.value,
|
|
1096
|
+
"tooltip-hide-after": k.value,
|
|
1097
|
+
disabled: B.value,
|
|
1098
|
+
onChange: ge
|
|
775
1099
|
}, null, 8, [
|
|
776
1100
|
"id",
|
|
777
1101
|
"label",
|
|
778
1102
|
"options",
|
|
1103
|
+
"hide-label",
|
|
1104
|
+
"wrap",
|
|
1105
|
+
"equal-width",
|
|
1106
|
+
"button-size",
|
|
1107
|
+
"icon-size",
|
|
1108
|
+
"tooltip-show-after",
|
|
1109
|
+
"tooltip-hide-after",
|
|
779
1110
|
"disabled"
|
|
780
|
-
])) : o.item.type === "segmented" ? (v(), n(
|
|
1111
|
+
])) : o.item.type === "segmented" ? (v(), n(Xe, {
|
|
781
1112
|
key: 2,
|
|
782
1113
|
id: o.item.id,
|
|
783
1114
|
label: o.item.label ?? o.item.id,
|
|
@@ -785,9 +1116,9 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
785
1116
|
"model-value": o.item.props?.modelValue,
|
|
786
1117
|
direction: o.item.props?.direction ?? "horizontal",
|
|
787
1118
|
block: o.item.props?.block === !0,
|
|
788
|
-
disabled:
|
|
1119
|
+
disabled: B.value,
|
|
789
1120
|
"hide-label": o.item.hideLabel === !0,
|
|
790
|
-
onChange:
|
|
1121
|
+
onChange: me
|
|
791
1122
|
}, null, 8, [
|
|
792
1123
|
"id",
|
|
793
1124
|
"label",
|
|
@@ -797,18 +1128,18 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
797
1128
|
"block",
|
|
798
1129
|
"disabled",
|
|
799
1130
|
"hide-label"
|
|
800
|
-
])) : o.item.type === "toggle" ? (v(), n(
|
|
1131
|
+
])) : o.item.type === "toggle" ? (v(), n(Ze, {
|
|
801
1132
|
key: 3,
|
|
802
1133
|
id: o.item.id,
|
|
803
1134
|
label: o.item.label ?? o.item.id,
|
|
804
|
-
"model-value":
|
|
1135
|
+
"model-value": H.value,
|
|
805
1136
|
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
806
1137
|
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
807
|
-
"active-label":
|
|
808
|
-
"inactive-label":
|
|
809
|
-
disabled:
|
|
1138
|
+
"active-label": U.value,
|
|
1139
|
+
"inactive-label": ae.value,
|
|
1140
|
+
disabled: B.value,
|
|
810
1141
|
"hide-label": o.item.hideLabel === !0,
|
|
811
|
-
onChange:
|
|
1142
|
+
onChange: he
|
|
812
1143
|
}, null, 8, [
|
|
813
1144
|
"id",
|
|
814
1145
|
"label",
|
|
@@ -819,13 +1150,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
819
1150
|
"inactive-label",
|
|
820
1151
|
"disabled",
|
|
821
1152
|
"hide-label"
|
|
822
|
-
])) : o.item.type === "gallery" ? (v(), n(
|
|
1153
|
+
])) : o.item.type === "gallery" ? (v(), n(Ge, {
|
|
823
1154
|
key: 4,
|
|
824
1155
|
id: o.item.id,
|
|
825
1156
|
label: o.item.label ?? "",
|
|
826
1157
|
categories: o.item.props?.categories ?? [],
|
|
827
|
-
"preview-fallback":
|
|
828
|
-
disabled:
|
|
1158
|
+
"preview-fallback": l.galleryPreviewFallback,
|
|
1159
|
+
disabled: B.value,
|
|
829
1160
|
onSelect: X
|
|
830
1161
|
}, null, 8, [
|
|
831
1162
|
"id",
|
|
@@ -833,17 +1164,17 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
833
1164
|
"categories",
|
|
834
1165
|
"preview-fallback",
|
|
835
1166
|
"disabled"
|
|
836
|
-
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(
|
|
1167
|
+
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n($e, {
|
|
837
1168
|
key: 5,
|
|
838
1169
|
id: o.item.id,
|
|
839
1170
|
item: o.item,
|
|
840
|
-
disabled:
|
|
1171
|
+
disabled: B.value
|
|
841
1172
|
}, {
|
|
842
|
-
default: O(() => [
|
|
1173
|
+
default: O(() => [W.value ? (v(), n(C(W.value), f({ key: 0 }, oe.value, {
|
|
843
1174
|
item: o.item,
|
|
844
1175
|
"group-id": o.groupId,
|
|
845
|
-
disabled:
|
|
846
|
-
"emit-item-click":
|
|
1176
|
+
disabled: B.value,
|
|
1177
|
+
"emit-item-click": _e
|
|
847
1178
|
}), null, 16, [
|
|
848
1179
|
"item",
|
|
849
1180
|
"group-id",
|
|
@@ -851,111 +1182,88 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
851
1182
|
])) : S(t.$slots, "template", {
|
|
852
1183
|
key: 1,
|
|
853
1184
|
item: o.item,
|
|
854
|
-
disabled:
|
|
1185
|
+
disabled: B.value
|
|
855
1186
|
})]),
|
|
856
1187
|
_: 3
|
|
857
1188
|
}, 8, [
|
|
858
1189
|
"id",
|
|
859
1190
|
"item",
|
|
860
1191
|
"disabled"
|
|
861
|
-
])) : o.item.type === "dropdown" ? (v(), n(
|
|
1192
|
+
])) : o.item.type === "dropdown" ? (v(), n(Le, {
|
|
862
1193
|
key: 6,
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
type: "default",
|
|
891
|
-
disabled: q.value,
|
|
892
|
-
"aria-label": V.value,
|
|
893
|
-
onClick: Z
|
|
894
|
-
}, {
|
|
895
|
-
default: O(() => [a("span", $, [G.value ? (v(), i("span", {
|
|
896
|
-
key: 0,
|
|
897
|
-
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary",
|
|
898
|
-
onClick: k(ve, ["stop"])
|
|
899
|
-
}, [c(E(F), null, {
|
|
900
|
-
default: O(() => [(v(), n(C(G.value)))]),
|
|
901
|
-
_: 1
|
|
902
|
-
})])) : K.value ? (v(), i("span", {
|
|
903
|
-
key: 1,
|
|
904
|
-
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class ml-ribbon-item-host__icon--dropdown-primary",
|
|
905
|
-
onClick: k(ve, ["stop"])
|
|
906
|
-
}, [a("i", {
|
|
907
|
-
class: m(K.value),
|
|
908
|
-
"aria-hidden": "true"
|
|
909
|
-
}, null, 2)])) : r("", !0), a("span", Ye, [ie.value ? (v(), i("span", Xe, w(W.value), 1)) : r("", !0), c(E(F), { class: m(["ml-ribbon-item-host__dropdown-arrow", { "is-open": H.value }]) }, {
|
|
910
|
-
default: O(() => [(v(), n(C(H.value ? E(se) : E(B))))]),
|
|
911
|
-
_: 1
|
|
912
|
-
}, 8, ["class"])])])]),
|
|
913
|
-
_: 1
|
|
914
|
-
}, 8, ["disabled", "aria-label"])]),
|
|
915
|
-
_: 1
|
|
916
|
-
}, 8, ["disabled", "popper-class"])) : o.item.type === "checkbox" ? (v(), n(E(te), {
|
|
1194
|
+
id: o.item.id,
|
|
1195
|
+
label: o.item.label ?? o.item.id,
|
|
1196
|
+
tooltip: o.item.tooltip,
|
|
1197
|
+
icon: A.value,
|
|
1198
|
+
options: o.item.props?.options ?? [],
|
|
1199
|
+
disabled: B.value,
|
|
1200
|
+
"hide-label": o.item.hideLabel === !0,
|
|
1201
|
+
"item-size": o.item.size ?? "medium",
|
|
1202
|
+
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1203
|
+
"tooltip-show-after": T.value,
|
|
1204
|
+
"tooltip-hide-after": k.value,
|
|
1205
|
+
onCommand: Z,
|
|
1206
|
+
onTooltipChange: pe,
|
|
1207
|
+
onClick: X
|
|
1208
|
+
}, null, 8, [
|
|
1209
|
+
"id",
|
|
1210
|
+
"label",
|
|
1211
|
+
"tooltip",
|
|
1212
|
+
"icon",
|
|
1213
|
+
"options",
|
|
1214
|
+
"disabled",
|
|
1215
|
+
"hide-label",
|
|
1216
|
+
"item-size",
|
|
1217
|
+
"sync-label-with-selection",
|
|
1218
|
+
"tooltip-show-after",
|
|
1219
|
+
"tooltip-hide-after"
|
|
1220
|
+
])) : o.item.type === "checkbox" ? (v(), n(E(te), {
|
|
917
1221
|
key: 7,
|
|
918
|
-
disabled:
|
|
1222
|
+
disabled: B.value,
|
|
919
1223
|
onChange: X
|
|
920
1224
|
}, {
|
|
921
1225
|
default: O(() => [s(w(o.item.label), 1)]),
|
|
922
1226
|
_: 1
|
|
923
1227
|
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(ne), {
|
|
924
1228
|
key: 8,
|
|
925
|
-
disabled:
|
|
1229
|
+
disabled: B.value,
|
|
926
1230
|
onChange: X
|
|
927
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(
|
|
1231
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(z), {
|
|
928
1232
|
key: 9,
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
1233
|
+
"model-value": ue.value,
|
|
1234
|
+
disabled: B.value,
|
|
1235
|
+
"popper-class": ee.value,
|
|
1236
|
+
style: h({ width: q.value }),
|
|
1237
|
+
onChange: Q
|
|
933
1238
|
}, {
|
|
934
|
-
default: O(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(E(
|
|
1239
|
+
default: O(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(E(L), {
|
|
935
1240
|
key: String(e.value),
|
|
936
1241
|
label: String(e.label),
|
|
937
1242
|
value: e.value
|
|
938
1243
|
}, null, 8, ["label", "value"]))), 128))]),
|
|
939
1244
|
_: 1
|
|
940
|
-
}, 8, [
|
|
1245
|
+
}, 8, [
|
|
1246
|
+
"model-value",
|
|
1247
|
+
"disabled",
|
|
1248
|
+
"popper-class",
|
|
1249
|
+
"style"
|
|
1250
|
+
])) : (v(), n(De, {
|
|
941
1251
|
key: 10,
|
|
942
|
-
|
|
943
|
-
|
|
1252
|
+
id: o.item.id,
|
|
1253
|
+
label: o.item.label ?? o.item.id,
|
|
1254
|
+
icon: A.value,
|
|
1255
|
+
disabled: B.value,
|
|
1256
|
+
"hide-label": !j.value,
|
|
1257
|
+
"aria-label": I.value,
|
|
944
1258
|
onClick: X
|
|
945
|
-
},
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
key: 1,
|
|
954
|
-
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", L.value]),
|
|
955
|
-
"aria-hidden": "true"
|
|
956
|
-
}, null, 2)) : r("", !0), ie.value ? (v(), i("span", $e, w(o.item.label ?? o.item.id), 1)) : r("", !0)]),
|
|
957
|
-
_: 1
|
|
958
|
-
}, 8, ["disabled", "aria-label"]))], 10, qe)]),
|
|
1259
|
+
}, null, 8, [
|
|
1260
|
+
"id",
|
|
1261
|
+
"label",
|
|
1262
|
+
"icon",
|
|
1263
|
+
"disabled",
|
|
1264
|
+
"hide-label",
|
|
1265
|
+
"aria-label"
|
|
1266
|
+
]))], 14, et)]),
|
|
959
1267
|
_: 3
|
|
960
1268
|
}, 8, [
|
|
961
1269
|
"content",
|
|
@@ -964,7 +1272,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
964
1272
|
"hide-after"
|
|
965
1273
|
]));
|
|
966
1274
|
}
|
|
967
|
-
}),
|
|
1275
|
+
}), rt = /* @__PURE__ */ l({
|
|
968
1276
|
__name: "RibbonGroupContent",
|
|
969
1277
|
props: {
|
|
970
1278
|
group: {},
|
|
@@ -973,13 +1281,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
973
1281
|
emits: ["item-click"],
|
|
974
1282
|
setup(t, { emit: r }) {
|
|
975
1283
|
let a = t, o = r;
|
|
976
|
-
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(
|
|
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(Te, {
|
|
977
1285
|
id: t.id,
|
|
978
1286
|
key: t.id,
|
|
979
1287
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
980
1288
|
rows: t.rows
|
|
981
1289
|
}, {
|
|
982
|
-
default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(
|
|
1290
|
+
default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(nt, {
|
|
983
1291
|
id: e.id,
|
|
984
1292
|
key: e.id,
|
|
985
1293
|
item: e,
|
|
@@ -1002,15 +1310,15 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1002
1310
|
"rows"
|
|
1003
1311
|
]))), 128))], 2));
|
|
1004
1312
|
}
|
|
1005
|
-
}),
|
|
1313
|
+
}), it = ["data-priority"], at = { class: "ml-ribbon-group__body" }, ot = { class: "ml-ribbon-group__footer" }, st = { class: "ml-ribbon-group__title" }, ct = [
|
|
1006
1314
|
"aria-label",
|
|
1007
1315
|
"aria-expanded",
|
|
1008
1316
|
"disabled"
|
|
1009
|
-
],
|
|
1317
|
+
], lt = { class: "ml-ribbon-group__overflow-content" }, ut = [
|
|
1010
1318
|
"aria-label",
|
|
1011
1319
|
"aria-expanded",
|
|
1012
1320
|
"disabled"
|
|
1013
|
-
],
|
|
1321
|
+
], dt = { class: "ml-ribbon-group__overflow-content" }, ft = /* @__PURE__ */ l({
|
|
1014
1322
|
__name: "RibbonGroup",
|
|
1015
1323
|
props: {
|
|
1016
1324
|
id: {},
|
|
@@ -1029,7 +1337,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1029
1337
|
},
|
|
1030
1338
|
emits: ["item-click"],
|
|
1031
1339
|
setup(e, { emit: o }) {
|
|
1032
|
-
let s = e, l = o, d = u(
|
|
1340
|
+
let s = e, l = o, d = u(le, null), f = t(() => s.width == null && s.autoWidth !== !1), y = t(() => {
|
|
1033
1341
|
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
1034
1342
|
let e = `${s.width}px`;
|
|
1035
1343
|
return {
|
|
@@ -1038,13 +1346,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1038
1346
|
maxWidth: e,
|
|
1039
1347
|
flex: `0 0 ${e}`
|
|
1040
1348
|
};
|
|
1041
|
-
}), x = t(() => d?.disabled.value === !0), T = b(null), k = b([]),
|
|
1349
|
+
}), x = t(() => d?.disabled.value === !0), T = b(null), k = b([]), A = b(null), te = b(null), ne = b(0), j = b(0), M = ie("size", ""), N = t(() => M.value || "default"), P = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${N.value}`), F = t(() => ({ modifiers: [{
|
|
1042
1350
|
name: "offset",
|
|
1043
1351
|
options: { offset: [ne.value, 8] }
|
|
1044
|
-
}] })),
|
|
1352
|
+
}] })), L = t(() => ({ modifiers: [{
|
|
1045
1353
|
name: "offset",
|
|
1046
|
-
options: { offset: [
|
|
1047
|
-
}] })),
|
|
1354
|
+
options: { offset: [j.value, 8] }
|
|
1355
|
+
}] })), re = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), z = t(() => k.value.length > 0), B = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), V = b(!1), U = b(!1), W = t(() => {
|
|
1048
1356
|
if (!s.groupModel || !k.value.length) return null;
|
|
1049
1357
|
let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
|
|
1050
1358
|
...t,
|
|
@@ -1054,7 +1362,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1054
1362
|
...s.groupModel,
|
|
1055
1363
|
collections: t
|
|
1056
1364
|
} : null;
|
|
1057
|
-
}),
|
|
1365
|
+
}), oe = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
1058
1366
|
id: `${s.groupModel.id}-footer-menu`,
|
|
1059
1367
|
title: "",
|
|
1060
1368
|
orientation: "row",
|
|
@@ -1064,7 +1372,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1064
1372
|
items: s.groupModel.footerMenuItems
|
|
1065
1373
|
}]
|
|
1066
1374
|
} : null);
|
|
1067
|
-
function
|
|
1375
|
+
function se() {
|
|
1068
1376
|
let e = T.value?.querySelector(".ml-ribbon-group__content");
|
|
1069
1377
|
if (!e) {
|
|
1070
1378
|
k.value.length > 0 && (k.value = []);
|
|
@@ -1083,13 +1391,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1083
1391
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
1084
1392
|
}), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
|
|
1085
1393
|
}
|
|
1086
|
-
function
|
|
1394
|
+
function G() {
|
|
1087
1395
|
p(() => {
|
|
1088
|
-
|
|
1396
|
+
Z(), K(), q(), se();
|
|
1089
1397
|
});
|
|
1090
1398
|
}
|
|
1091
|
-
function
|
|
1092
|
-
let e = T.value?.getBoundingClientRect(), t =
|
|
1399
|
+
function K() {
|
|
1400
|
+
let e = T.value?.getBoundingClientRect(), t = A.value?.getBoundingClientRect();
|
|
1093
1401
|
if (!e || !t) {
|
|
1094
1402
|
ne.value !== 0 && (ne.value = 0);
|
|
1095
1403
|
return;
|
|
@@ -1097,83 +1405,83 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1097
1405
|
let n = Math.round(e.left - t.left);
|
|
1098
1406
|
ne.value !== n && (ne.value = n);
|
|
1099
1407
|
}
|
|
1100
|
-
function
|
|
1408
|
+
function q() {
|
|
1101
1409
|
let e = T.value?.getBoundingClientRect(), t = te.value?.getBoundingClientRect();
|
|
1102
1410
|
if (!e || !t) {
|
|
1103
|
-
|
|
1411
|
+
j.value !== 0 && (j.value = 0);
|
|
1104
1412
|
return;
|
|
1105
1413
|
}
|
|
1106
1414
|
let n = Math.round(e.left - t.left);
|
|
1107
|
-
|
|
1415
|
+
j.value !== n && (j.value = n);
|
|
1108
1416
|
}
|
|
1109
|
-
function
|
|
1110
|
-
z.value = e;
|
|
1111
|
-
}
|
|
1112
|
-
function fe(e) {
|
|
1417
|
+
function ue(e) {
|
|
1113
1418
|
V.value = e;
|
|
1114
1419
|
}
|
|
1115
|
-
function
|
|
1116
|
-
|
|
1420
|
+
function de(e) {
|
|
1421
|
+
U.value = e;
|
|
1117
1422
|
}
|
|
1118
|
-
function
|
|
1423
|
+
function J() {
|
|
1119
1424
|
x.value || (V.value = !V.value);
|
|
1120
1425
|
}
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1426
|
+
function fe() {
|
|
1427
|
+
x.value || (U.value = !U.value);
|
|
1428
|
+
}
|
|
1429
|
+
let Y = null, X = null;
|
|
1430
|
+
function Z() {
|
|
1431
|
+
if (!Y) return;
|
|
1124
1432
|
let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1125
|
-
|
|
1433
|
+
X !== e && (X && Y.unobserve(X), e && Y.observe(e), X = e);
|
|
1126
1434
|
}
|
|
1127
1435
|
return D(() => s.groupModel, () => {
|
|
1128
|
-
|
|
1436
|
+
G();
|
|
1129
1437
|
}, { deep: !0 }), D(x, (e) => {
|
|
1130
|
-
e && (
|
|
1438
|
+
e && (V.value = !1, U.value = !1);
|
|
1131
1439
|
}), g(() => {
|
|
1132
|
-
typeof ResizeObserver < "u" && (
|
|
1133
|
-
|
|
1134
|
-
}), T.value &&
|
|
1440
|
+
typeof ResizeObserver < "u" && (Y = new ResizeObserver(() => {
|
|
1441
|
+
K(), q(), se();
|
|
1442
|
+
}), T.value && Y.observe(T.value), Z()), G();
|
|
1135
1443
|
}), _(() => {
|
|
1136
|
-
|
|
1444
|
+
Y?.disconnect();
|
|
1137
1445
|
}), (t, o) => (v(), i("section", {
|
|
1138
1446
|
ref_key: "groupSectionRef",
|
|
1139
1447
|
ref: T,
|
|
1140
1448
|
class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
|
|
1141
1449
|
"data-priority": e.priority ?? 100,
|
|
1142
1450
|
style: h(y.value)
|
|
1143
|
-
}, [a("div",
|
|
1144
|
-
|
|
1451
|
+
}, [a("div", at, [S(t.$slots, "default")]), a("footer", ot, [
|
|
1452
|
+
re.value ? (v(), n(E(I), {
|
|
1145
1453
|
key: 0,
|
|
1146
1454
|
class: "ml-ribbon-group__icon"
|
|
1147
1455
|
}, {
|
|
1148
|
-
default: O(() => [(v(), n(C(
|
|
1456
|
+
default: O(() => [(v(), n(C(re.value)))]),
|
|
1149
1457
|
_: 1
|
|
1150
1458
|
})) : r("", !0),
|
|
1151
|
-
a("span",
|
|
1152
|
-
|
|
1459
|
+
a("span", st, w(e.title), 1),
|
|
1460
|
+
B.value && oe.value ? (v(), n(E(R), {
|
|
1153
1461
|
key: 1,
|
|
1154
1462
|
trigger: "click",
|
|
1155
1463
|
placement: "bottom-start",
|
|
1156
1464
|
disabled: x.value,
|
|
1157
|
-
"popper-class":
|
|
1158
|
-
"popper-options":
|
|
1159
|
-
onShow: o[1] ||= (e) =>
|
|
1160
|
-
onHide: o[2] ||= (e) =>
|
|
1465
|
+
"popper-class": P.value,
|
|
1466
|
+
"popper-options": L.value,
|
|
1467
|
+
onShow: o[1] ||= (e) => ue(!0),
|
|
1468
|
+
onHide: o[2] ||= (e) => ue(!1)
|
|
1161
1469
|
}, {
|
|
1162
1470
|
reference: O(() => [a("button", {
|
|
1163
1471
|
ref_key: "footerTriggerRef",
|
|
1164
1472
|
ref: te,
|
|
1165
1473
|
type: "button",
|
|
1166
|
-
class: m(["ml-ribbon-group__footer-trigger", { "is-open":
|
|
1474
|
+
class: m(["ml-ribbon-group__footer-trigger", { "is-open": V.value }]),
|
|
1167
1475
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1168
|
-
"aria-expanded":
|
|
1476
|
+
"aria-expanded": V.value,
|
|
1169
1477
|
disabled: x.value,
|
|
1170
|
-
onClick:
|
|
1171
|
-
}, [c(E(
|
|
1172
|
-
default: O(() => [(v(), n(C(
|
|
1478
|
+
onClick: J
|
|
1479
|
+
}, [c(E(I), null, {
|
|
1480
|
+
default: O(() => [(v(), n(C(V.value ? E(ae) : E(H))))]),
|
|
1173
1481
|
_: 1
|
|
1174
|
-
})], 10,
|
|
1175
|
-
default: O(() => [a("div",
|
|
1176
|
-
group:
|
|
1482
|
+
})], 10, ct)]),
|
|
1483
|
+
default: O(() => [a("div", lt, [c(rt, {
|
|
1484
|
+
group: oe.value,
|
|
1177
1485
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1178
1486
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
1179
1487
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
@@ -1183,31 +1491,31 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1183
1491
|
"popper-class",
|
|
1184
1492
|
"popper-options"
|
|
1185
1493
|
])) : r("", !0),
|
|
1186
|
-
|
|
1494
|
+
z.value && W.value ? (v(), n(E(R), {
|
|
1187
1495
|
key: 2,
|
|
1188
1496
|
trigger: "click",
|
|
1189
1497
|
placement: "bottom-start",
|
|
1190
1498
|
disabled: x.value,
|
|
1191
|
-
"popper-class":
|
|
1192
|
-
"popper-options":
|
|
1193
|
-
onShow: o[4] ||= (e) =>
|
|
1194
|
-
onHide: o[5] ||= (e) =>
|
|
1499
|
+
"popper-class": P.value,
|
|
1500
|
+
"popper-options": F.value,
|
|
1501
|
+
onShow: o[4] ||= (e) => de(!0),
|
|
1502
|
+
onHide: o[5] ||= (e) => de(!1)
|
|
1195
1503
|
}, {
|
|
1196
1504
|
reference: O(() => [a("button", {
|
|
1197
1505
|
ref_key: "overflowTriggerRef",
|
|
1198
|
-
ref:
|
|
1506
|
+
ref: A,
|
|
1199
1507
|
type: "button",
|
|
1200
|
-
class: m(["ml-ribbon-group__overflow-trigger", { "is-open":
|
|
1508
|
+
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": U.value }]),
|
|
1201
1509
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1202
|
-
"aria-expanded":
|
|
1510
|
+
"aria-expanded": U.value,
|
|
1203
1511
|
disabled: x.value,
|
|
1204
|
-
onClick:
|
|
1205
|
-
}, [c(E(
|
|
1206
|
-
default: O(() => [(v(), n(C(
|
|
1512
|
+
onClick: fe
|
|
1513
|
+
}, [c(E(I), null, {
|
|
1514
|
+
default: O(() => [(v(), n(C(U.value ? E(ae) : E(H))))]),
|
|
1207
1515
|
_: 1
|
|
1208
|
-
})], 10,
|
|
1209
|
-
default: O(() => [a("div",
|
|
1210
|
-
group:
|
|
1516
|
+
})], 10, ut)]),
|
|
1517
|
+
default: O(() => [a("div", dt, [c(rt, {
|
|
1518
|
+
group: W.value,
|
|
1211
1519
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1212
1520
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
1213
1521
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
@@ -1217,30 +1525,30 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1217
1525
|
"popper-class",
|
|
1218
1526
|
"popper-options"
|
|
1219
1527
|
])) : r("", !0),
|
|
1220
|
-
e.showLauncherIcon ?? e.launcher ? (v(), n(E(
|
|
1528
|
+
e.showLauncherIcon ?? e.launcher ? (v(), n(E(ee), {
|
|
1221
1529
|
key: 3,
|
|
1222
1530
|
link: "",
|
|
1223
1531
|
class: "ml-ribbon-group__launcher",
|
|
1224
1532
|
disabled: x.value
|
|
1225
1533
|
}, {
|
|
1226
|
-
default: O(() => [c(E(
|
|
1227
|
-
default: O(() => [c(E(
|
|
1534
|
+
default: O(() => [c(E(I), null, {
|
|
1535
|
+
default: O(() => [c(E(ce))]),
|
|
1228
1536
|
_: 1
|
|
1229
1537
|
})]),
|
|
1230
1538
|
_: 1
|
|
1231
1539
|
}, 8, ["disabled"])) : r("", !0)
|
|
1232
|
-
])], 14,
|
|
1540
|
+
])], 14, it));
|
|
1233
1541
|
}
|
|
1234
|
-
}),
|
|
1542
|
+
}), pt = ["inert", "aria-disabled"], mt = { class: "ml-ribbon__head-left" }, ht = { class: "ml-ribbon__head-right" }, gt = {
|
|
1235
1543
|
key: 2,
|
|
1236
1544
|
class: "ml-ribbon__tabs-extra"
|
|
1237
|
-
},
|
|
1545
|
+
}, _t = ["data-active-tab"], vt = {
|
|
1238
1546
|
key: 0,
|
|
1239
1547
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1240
|
-
},
|
|
1548
|
+
}, yt = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, bt = ["aria-label", "disabled"], xt = { class: "ml-ribbon-overflow-list" }, St = { class: "ml-ribbon-overflow-group__header" }, Ct = ["data-active-tab"], wt = ["disabled"], Tt = { class: "ml-ribbon-simplified-group__panel" }, Et = ["data-active-tab"], Dt = {
|
|
1241
1549
|
key: 0,
|
|
1242
1550
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1243
|
-
},
|
|
1551
|
+
}, Ot = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, kt = ["aria-label", "disabled"], At = { class: "ml-ribbon-overflow-list" }, jt = { class: "ml-ribbon-overflow-group__header" }, Mt = ["data-active-tab"], Nt = ["disabled"], Pt = { class: "ml-ribbon-simplified-group__panel" }, Ft = 40, It = /* @__PURE__ */ l({
|
|
1244
1552
|
__name: "Ribbon",
|
|
1245
1553
|
props: {
|
|
1246
1554
|
id: { default: "ml-ribbon-root" },
|
|
@@ -1311,7 +1619,7 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1311
1619
|
} : t;
|
|
1312
1620
|
})), t;
|
|
1313
1621
|
}
|
|
1314
|
-
function
|
|
1622
|
+
function A(e) {
|
|
1315
1623
|
return {
|
|
1316
1624
|
...e,
|
|
1317
1625
|
icon: f(e.icon),
|
|
@@ -1322,10 +1630,10 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1322
1630
|
return {
|
|
1323
1631
|
...e,
|
|
1324
1632
|
icon: f(e.icon),
|
|
1325
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
1633
|
+
footerMenuItems: e.footerMenuItems?.map(A),
|
|
1326
1634
|
collections: e.collections?.map((e) => ({
|
|
1327
1635
|
...e,
|
|
1328
|
-
items: e.items?.map(
|
|
1636
|
+
items: e.items?.map(A)
|
|
1329
1637
|
}))
|
|
1330
1638
|
};
|
|
1331
1639
|
}
|
|
@@ -1335,10 +1643,10 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1335
1643
|
groups: e.groups?.map(te)
|
|
1336
1644
|
}));
|
|
1337
1645
|
}
|
|
1338
|
-
function
|
|
1646
|
+
function M(e, t) {
|
|
1339
1647
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1340
1648
|
}
|
|
1341
|
-
let
|
|
1649
|
+
let N = {
|
|
1342
1650
|
layoutSwitcherTooltip: "Switch ribbon layout",
|
|
1343
1651
|
minimizeTooltip: "Minimize ribbon",
|
|
1344
1652
|
keyTipsToggleText: "Key Tips",
|
|
@@ -1353,69 +1661,69 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1353
1661
|
keyTipsEmptySequence: "No key sequence",
|
|
1354
1662
|
contextualTabDefaultTitle: "Contextual",
|
|
1355
1663
|
galleryPreviewFallback: "Preview unavailable"
|
|
1356
|
-
},
|
|
1357
|
-
y(
|
|
1358
|
-
|
|
1359
|
-
}, { deep: !0 }), D(() =>
|
|
1360
|
-
e !==
|
|
1361
|
-
}), D(() =>
|
|
1664
|
+
}, P = s, F = u, { context: L, visibleTabs: re } = X(P.id, P.tabs, P.disabled, P.activeLayout ? String(P.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : P.layout, P.minimized, P.activeTab || P.tabs[0]?.id || "", M(P.tooltipShowAfter, 1e3), M(P.tooltipHideAfter, 0));
|
|
1665
|
+
y(le, L), D(() => P.tabs, (e) => {
|
|
1666
|
+
L.tabs.value = ne(e), L.tabs.value.some((e) => e.id === L.activeTab.value) || (L.activeTab.value = L.tabs.value[0]?.id || "");
|
|
1667
|
+
}, { deep: !0 }), D(() => P.layout, (e) => {
|
|
1668
|
+
e !== L.layout.value && (L.layout.value = e);
|
|
1669
|
+
}), D(() => P.activeLayout, (e) => {
|
|
1362
1670
|
if (!e) return;
|
|
1363
1671
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
1364
|
-
t !==
|
|
1365
|
-
}), D(() =>
|
|
1366
|
-
e !==
|
|
1367
|
-
}), D(() =>
|
|
1368
|
-
e !==
|
|
1369
|
-
}), D(() =>
|
|
1370
|
-
e && e !==
|
|
1371
|
-
}), D(() =>
|
|
1372
|
-
let t =
|
|
1373
|
-
t !==
|
|
1374
|
-
}), D(() =>
|
|
1375
|
-
let t =
|
|
1376
|
-
t !==
|
|
1377
|
-
}), D(
|
|
1378
|
-
|
|
1379
|
-
}), D(
|
|
1380
|
-
|
|
1381
|
-
}), D(
|
|
1382
|
-
|
|
1383
|
-
}), D(
|
|
1384
|
-
|
|
1385
|
-
}), D(
|
|
1386
|
-
|
|
1672
|
+
t !== L.layout.value && (L.layout.value = t);
|
|
1673
|
+
}), D(() => P.minimized, (e) => {
|
|
1674
|
+
e !== L.minimized.value && (L.minimized.value = e);
|
|
1675
|
+
}), D(() => P.disabled, (e) => {
|
|
1676
|
+
e !== L.disabled.value && (L.disabled.value = e);
|
|
1677
|
+
}), D(() => P.activeTab, (e) => {
|
|
1678
|
+
e && e !== L.activeTab.value && (L.activeTab.value = e);
|
|
1679
|
+
}), D(() => P.tooltipShowAfter, (e) => {
|
|
1680
|
+
let t = M(e, 1e3);
|
|
1681
|
+
t !== L.tooltipShowAfter.value && (L.tooltipShowAfter.value = t);
|
|
1682
|
+
}), D(() => P.tooltipHideAfter, (e) => {
|
|
1683
|
+
let t = M(e, 0);
|
|
1684
|
+
t !== L.tooltipHideAfter.value && (L.tooltipHideAfter.value = t);
|
|
1685
|
+
}), D(L.activeTab, (e) => {
|
|
1686
|
+
F("update:activeTab", e), F("tabChange", e);
|
|
1687
|
+
}), D(L.layout, (e) => {
|
|
1688
|
+
F("update:layout", e), F("layoutChange", e);
|
|
1689
|
+
}), D(L.minimized, (e) => {
|
|
1690
|
+
F("update:minimized", e);
|
|
1691
|
+
}), D(L.overflowOpen, (e) => {
|
|
1692
|
+
F(e ? "overflowOpen" : "overflowClose");
|
|
1693
|
+
}), D(L.backdropOpen, (e) => {
|
|
1694
|
+
F(e ? "backstageOpen" : "backstageClose");
|
|
1387
1695
|
});
|
|
1388
|
-
let
|
|
1696
|
+
let z = t(() => re.value.find((e) => e.id === L.activeTab.value)), H = t(() => z.value?.groups?.filter((e) => e.visible !== !1) ?? []), ae = b(null), ce = b(null), G = b(null), K = b(null), q = b(!1), ue = b(0), de = b({
|
|
1389
1697
|
left: "0px",
|
|
1390
1698
|
top: "0px",
|
|
1391
1699
|
width: "1px",
|
|
1392
1700
|
height: "0px"
|
|
1393
|
-
}),
|
|
1394
|
-
layoutSwitcherTooltip:
|
|
1395
|
-
minimizeTooltip:
|
|
1396
|
-
keyTipsToggleText:
|
|
1397
|
-
overflowTriggerAriaLabel:
|
|
1398
|
-
groupOverflowTriggerAriaLabel:
|
|
1399
|
-
fileMenuLabel:
|
|
1400
|
-
fileMenuOpenBackstageLabel:
|
|
1401
|
-
backstageBackLabel:
|
|
1402
|
-
backstageTitle:
|
|
1403
|
-
backstageDescription:
|
|
1404
|
-
keyTipsSequencePrefix:
|
|
1405
|
-
keyTipsEmptySequence:
|
|
1406
|
-
contextualTabDefaultTitle:
|
|
1407
|
-
galleryPreviewFallback:
|
|
1408
|
-
})),
|
|
1409
|
-
if (!
|
|
1410
|
-
let e =
|
|
1411
|
-
let n =
|
|
1701
|
+
}), J = b(/* @__PURE__ */ new Set()), fe = b({}), Y = ie("size", ""), Z = t(() => P.size || Y.value || "default"), pe = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${Z.value}`), me = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${Z.value}`), he = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${Z.value}`), Q = t(() => ({
|
|
1702
|
+
layoutSwitcherTooltip: P.texts.layoutSwitcherTooltip || N.layoutSwitcherTooltip,
|
|
1703
|
+
minimizeTooltip: P.texts.minimizeTooltip || N.minimizeTooltip,
|
|
1704
|
+
keyTipsToggleText: P.texts.keyTipsToggleText || N.keyTipsToggleText,
|
|
1705
|
+
overflowTriggerAriaLabel: P.texts.overflowTriggerAriaLabel || N.overflowTriggerAriaLabel,
|
|
1706
|
+
groupOverflowTriggerAriaLabel: P.texts.groupOverflowTriggerAriaLabel || N.groupOverflowTriggerAriaLabel,
|
|
1707
|
+
fileMenuLabel: P.texts.fileMenuLabel || N.fileMenuLabel,
|
|
1708
|
+
fileMenuOpenBackstageLabel: P.texts.fileMenuOpenBackstageLabel || N.fileMenuOpenBackstageLabel,
|
|
1709
|
+
backstageBackLabel: P.texts.backstageBackLabel || N.backstageBackLabel,
|
|
1710
|
+
backstageTitle: P.texts.backstageTitle || N.backstageTitle,
|
|
1711
|
+
backstageDescription: P.texts.backstageDescription || N.backstageDescription,
|
|
1712
|
+
keyTipsSequencePrefix: P.texts.keyTipsSequencePrefix || N.keyTipsSequencePrefix,
|
|
1713
|
+
keyTipsEmptySequence: P.texts.keyTipsEmptySequence || N.keyTipsEmptySequence,
|
|
1714
|
+
contextualTabDefaultTitle: P.texts.contextualTabDefaultTitle || N.contextualTabDefaultTitle,
|
|
1715
|
+
galleryPreviewFallback: P.texts.galleryPreviewFallback || N.galleryPreviewFallback
|
|
1716
|
+
})), _e = t(() => M(P.tooltipShowAfter, 1e3)), ve = t(() => M(P.tooltipHideAfter, 0)), ye = t(() => L.minimized.value ? W : U), be = t(() => H.value.filter((e) => !J.value.has(e.id))), xe = t(() => H.value.filter((e) => J.value.has(e.id))), Ce = t(() => {
|
|
1717
|
+
if (!xe.value.length) return 220;
|
|
1718
|
+
let e = xe.value.reduce((e, t) => {
|
|
1719
|
+
let n = fe.value[t.id] ?? De(t);
|
|
1412
1720
|
return Math.max(e, n);
|
|
1413
1721
|
}, 0), t = Math.ceil(e + 40);
|
|
1414
1722
|
return Math.max(220, Math.min(720, t));
|
|
1415
1723
|
});
|
|
1416
|
-
function
|
|
1724
|
+
function Te(e) {
|
|
1417
1725
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
1418
|
-
...
|
|
1726
|
+
...A(e),
|
|
1419
1727
|
size: "medium"
|
|
1420
1728
|
})));
|
|
1421
1729
|
return {
|
|
@@ -1428,13 +1736,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1428
1736
|
}]
|
|
1429
1737
|
};
|
|
1430
1738
|
}
|
|
1431
|
-
function
|
|
1739
|
+
function Ee(e) {
|
|
1432
1740
|
return e.priority ?? 100;
|
|
1433
1741
|
}
|
|
1434
|
-
function
|
|
1742
|
+
function De(e) {
|
|
1435
1743
|
return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width : e.autoWidth === !1 ? 190 : 140;
|
|
1436
1744
|
}
|
|
1437
|
-
function
|
|
1745
|
+
function Oe(e) {
|
|
1438
1746
|
let t = {};
|
|
1439
1747
|
return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
|
|
1440
1748
|
let n = e.dataset.groupId;
|
|
@@ -1443,106 +1751,106 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1443
1751
|
r > 0 && (t[n] = r);
|
|
1444
1752
|
}), t;
|
|
1445
1753
|
}
|
|
1446
|
-
function
|
|
1447
|
-
let e =
|
|
1448
|
-
let n =
|
|
1449
|
-
return e + Math.max(n,
|
|
1754
|
+
function ke() {
|
|
1755
|
+
let e = H.value.reduce((e, t) => {
|
|
1756
|
+
let n = fe.value[t.id] ?? De(t);
|
|
1757
|
+
return e + Math.max(n, De(t));
|
|
1450
1758
|
}, 0);
|
|
1451
1759
|
return Math.max(220, e);
|
|
1452
1760
|
}
|
|
1453
|
-
function
|
|
1761
|
+
function Ae(e) {
|
|
1454
1762
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
1455
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
1763
|
+
return Number.isFinite(t) && t > 0 ? t : Ft;
|
|
1456
1764
|
}
|
|
1457
|
-
function
|
|
1458
|
-
if (
|
|
1459
|
-
|
|
1765
|
+
function je() {
|
|
1766
|
+
if (L.layout.value !== "classic") {
|
|
1767
|
+
J.value = /* @__PURE__ */ new Set();
|
|
1460
1768
|
return;
|
|
1461
1769
|
}
|
|
1462
|
-
let e =
|
|
1770
|
+
let e = L.minimized.value ? K.value : G.value;
|
|
1463
1771
|
if (!e) return;
|
|
1464
|
-
let t =
|
|
1772
|
+
let t = H.value;
|
|
1465
1773
|
if (!t.length) {
|
|
1466
|
-
|
|
1774
|
+
J.value = /* @__PURE__ */ new Set();
|
|
1467
1775
|
return;
|
|
1468
1776
|
}
|
|
1469
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
1470
|
-
|
|
1471
|
-
...
|
|
1777
|
+
let n = Math.round(e.getBoundingClientRect().width), r = Ae(e), i = Oe(e);
|
|
1778
|
+
fe.value = {
|
|
1779
|
+
...fe.value,
|
|
1472
1780
|
...i
|
|
1473
1781
|
};
|
|
1474
1782
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
1475
1783
|
group: e,
|
|
1476
1784
|
index: t
|
|
1477
1785
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
1478
|
-
let n =
|
|
1786
|
+
let n = Ee(t.group) - Ee(e.group);
|
|
1479
1787
|
return n === 0 ? t.index - e.index : n;
|
|
1480
|
-
}), l = (e) => i[e.id] ??
|
|
1788
|
+
}), l = (e) => i[e.id] ?? De(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;
|
|
1481
1789
|
for (; f(s) > n && p < c.length;) {
|
|
1482
1790
|
let e = c[p].group;
|
|
1483
1791
|
s.add(e.id), p += 1;
|
|
1484
1792
|
}
|
|
1485
|
-
|
|
1793
|
+
J.value = s;
|
|
1486
1794
|
}
|
|
1487
|
-
function
|
|
1795
|
+
function Me() {
|
|
1488
1796
|
p(() => {
|
|
1489
|
-
if (
|
|
1490
|
-
|
|
1797
|
+
if (L.layout.value !== "classic" || L.minimized.value) {
|
|
1798
|
+
je();
|
|
1491
1799
|
return;
|
|
1492
1800
|
}
|
|
1493
|
-
if (
|
|
1494
|
-
|
|
1801
|
+
if (J.value.size === 0) {
|
|
1802
|
+
je();
|
|
1495
1803
|
return;
|
|
1496
1804
|
}
|
|
1497
|
-
|
|
1498
|
-
|
|
1805
|
+
J.value = /* @__PURE__ */ new Set(), p(() => {
|
|
1806
|
+
je();
|
|
1499
1807
|
});
|
|
1500
1808
|
});
|
|
1501
1809
|
}
|
|
1502
|
-
function
|
|
1503
|
-
let e =
|
|
1810
|
+
function Ne() {
|
|
1811
|
+
let e = ae.value, t = ce.value;
|
|
1504
1812
|
if (!e || !t) return;
|
|
1505
1813
|
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);
|
|
1506
|
-
|
|
1814
|
+
ue.value = Math.round(a > 0 ? a : L.layout.value === "classic" ? ke() : Math.max(360, H.value.length * 120)), de.value = {
|
|
1507
1815
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
1508
1816
|
top: "0px",
|
|
1509
1817
|
width: "1px",
|
|
1510
1818
|
height: `${Math.round(r.height)}px`
|
|
1511
1819
|
};
|
|
1512
1820
|
}
|
|
1513
|
-
function
|
|
1514
|
-
|
|
1821
|
+
function Pe() {
|
|
1822
|
+
q.value = !1;
|
|
1515
1823
|
}
|
|
1516
|
-
function
|
|
1517
|
-
if (
|
|
1518
|
-
let t =
|
|
1519
|
-
if (
|
|
1520
|
-
|
|
1824
|
+
function Fe(e) {
|
|
1825
|
+
if (L.disabled.value) return;
|
|
1826
|
+
let t = L.activeTab.value === e.id;
|
|
1827
|
+
if (L.activeTab.value = e.id, !L.minimized.value) {
|
|
1828
|
+
Pe();
|
|
1521
1829
|
return;
|
|
1522
1830
|
}
|
|
1523
|
-
|
|
1831
|
+
Ne(), q.value = t ? !q.value : !0;
|
|
1832
|
+
}
|
|
1833
|
+
function Ie() {
|
|
1834
|
+
L.disabled.value || L.api.toggleSimplified();
|
|
1524
1835
|
}
|
|
1525
1836
|
function Le() {
|
|
1526
|
-
|
|
1837
|
+
L.disabled.value || (L.minimized.value || Pe(), L.minimized.value = !L.minimized.value);
|
|
1527
1838
|
}
|
|
1528
|
-
function Re() {
|
|
1529
|
-
|
|
1839
|
+
function Re(e) {
|
|
1840
|
+
L.disabled.value || (Pe(), F("fileMenuSelect", e));
|
|
1530
1841
|
}
|
|
1531
|
-
function ze(
|
|
1532
|
-
|
|
1842
|
+
function ze() {
|
|
1843
|
+
L.disabled.value || (Pe(), L.backdropOpen.value = !0);
|
|
1533
1844
|
}
|
|
1534
1845
|
function Be() {
|
|
1535
|
-
|
|
1846
|
+
L.disabled.value || (L.backdropOpen.value = !1);
|
|
1536
1847
|
}
|
|
1537
|
-
function Ve() {
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
function Q(e, t) {
|
|
1541
|
-
I.disabled.value || (P("itemClick", {
|
|
1542
|
-
tabId: I.activeTab.value,
|
|
1848
|
+
function Ve(e, t) {
|
|
1849
|
+
L.disabled.value || (F("itemClick", {
|
|
1850
|
+
tabId: L.activeTab.value,
|
|
1543
1851
|
groupId: e,
|
|
1544
1852
|
itemId: t
|
|
1545
|
-
}),
|
|
1853
|
+
}), L.minimized.value && Pe());
|
|
1546
1854
|
}
|
|
1547
1855
|
function He(e) {
|
|
1548
1856
|
if (!(e instanceof HTMLElement)) return !1;
|
|
@@ -1551,13 +1859,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1551
1859
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
1552
1860
|
}
|
|
1553
1861
|
function Ue() {
|
|
1554
|
-
if (
|
|
1555
|
-
|
|
1862
|
+
if (L.disabled.value) {
|
|
1863
|
+
L.keyTips.value = [];
|
|
1556
1864
|
return;
|
|
1557
1865
|
}
|
|
1558
|
-
let e =
|
|
1866
|
+
let e = z.value;
|
|
1559
1867
|
if (!e?.groups?.length) {
|
|
1560
|
-
|
|
1868
|
+
L.keyTips.value = [];
|
|
1561
1869
|
return;
|
|
1562
1870
|
}
|
|
1563
1871
|
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) => {
|
|
@@ -1570,134 +1878,134 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1570
1878
|
scope: "item"
|
|
1571
1879
|
} : null;
|
|
1572
1880
|
}).filter((e) => !!e)));
|
|
1573
|
-
|
|
1881
|
+
L.keyTips.value = t;
|
|
1574
1882
|
}
|
|
1575
1883
|
function We(e) {
|
|
1576
|
-
if (
|
|
1577
|
-
let t =
|
|
1884
|
+
if (L.disabled.value) return;
|
|
1885
|
+
let t = z.value;
|
|
1578
1886
|
if (t?.groups?.length) {
|
|
1579
1887
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
1580
1888
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
1581
1889
|
if (r) {
|
|
1582
|
-
|
|
1890
|
+
Ve(n.id, r.id), L.keyTipsOpen.value = !1, L.keyTipsSequence.value = "";
|
|
1583
1891
|
return;
|
|
1584
1892
|
}
|
|
1585
1893
|
}
|
|
1586
1894
|
}
|
|
1587
1895
|
}
|
|
1588
1896
|
function Ge() {
|
|
1589
|
-
|
|
1897
|
+
L.keyTipsSequence.value = "";
|
|
1590
1898
|
}
|
|
1591
1899
|
function Ke(e) {
|
|
1592
|
-
if (!
|
|
1900
|
+
if (!L.disabled.value && !He(e.target)) {
|
|
1593
1901
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
1594
|
-
e.preventDefault(),
|
|
1902
|
+
e.preventDefault(), L.keyTipsOpen.value = !L.keyTipsOpen.value, L.keyTipsOpen.value || Ge();
|
|
1595
1903
|
return;
|
|
1596
1904
|
}
|
|
1597
|
-
if (
|
|
1905
|
+
if (L.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
1598
1906
|
if (e.key === "Escape") {
|
|
1599
|
-
e.preventDefault(),
|
|
1907
|
+
e.preventDefault(), L.keyTipsOpen.value = !1, Ge();
|
|
1600
1908
|
return;
|
|
1601
1909
|
}
|
|
1602
1910
|
if (e.key === "Backspace") {
|
|
1603
|
-
e.preventDefault(),
|
|
1911
|
+
e.preventDefault(), L.keyTipsSequence.value = L.keyTipsSequence.value.slice(0, -1);
|
|
1604
1912
|
return;
|
|
1605
1913
|
}
|
|
1606
1914
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
1607
1915
|
e.preventDefault();
|
|
1608
|
-
let t = `${
|
|
1609
|
-
|
|
1610
|
-
let n = t.toLowerCase(), r =
|
|
1916
|
+
let t = `${L.keyTipsSequence.value}${e.key.toUpperCase()}`;
|
|
1917
|
+
L.keyTipsSequence.value = t;
|
|
1918
|
+
let n = t.toLowerCase(), r = L.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
1611
1919
|
if (r) {
|
|
1612
1920
|
We(r);
|
|
1613
1921
|
return;
|
|
1614
1922
|
}
|
|
1615
|
-
|
|
1923
|
+
L.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Ge();
|
|
1616
1924
|
}
|
|
1617
1925
|
}
|
|
1618
1926
|
}
|
|
1619
1927
|
}
|
|
1620
1928
|
function qe(e) {
|
|
1621
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
1929
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? oe : null;
|
|
1622
1930
|
}
|
|
1623
1931
|
function Je(e) {
|
|
1624
|
-
|
|
1932
|
+
q.value = e;
|
|
1625
1933
|
}
|
|
1626
1934
|
D([
|
|
1627
|
-
|
|
1628
|
-
() =>
|
|
1629
|
-
() =>
|
|
1935
|
+
H,
|
|
1936
|
+
() => L.layout.value,
|
|
1937
|
+
() => L.minimized.value
|
|
1630
1938
|
], () => {
|
|
1631
|
-
|
|
1939
|
+
Me();
|
|
1632
1940
|
}), D([
|
|
1633
|
-
|
|
1634
|
-
() =>
|
|
1635
|
-
() =>
|
|
1941
|
+
z,
|
|
1942
|
+
() => L.tabs.value,
|
|
1943
|
+
() => L.disabled.value
|
|
1636
1944
|
], () => {
|
|
1637
1945
|
Ue(), Ge();
|
|
1638
1946
|
}, {
|
|
1639
1947
|
deep: !0,
|
|
1640
1948
|
immediate: !0
|
|
1641
|
-
}), D(() =>
|
|
1949
|
+
}), D(() => L.keyTipsOpen.value, (e) => {
|
|
1642
1950
|
e || Ge();
|
|
1643
|
-
}), D(() =>
|
|
1644
|
-
e && (
|
|
1951
|
+
}), D(() => L.disabled.value, (e) => {
|
|
1952
|
+
e && (L.overflowOpen.value = !1, L.backdropOpen.value = !1, L.keyTipsOpen.value = !1, Pe(), Ge());
|
|
1645
1953
|
}), D([
|
|
1646
|
-
() =>
|
|
1647
|
-
() =>
|
|
1648
|
-
|
|
1954
|
+
() => L.minimized.value,
|
|
1955
|
+
() => L.layout.value,
|
|
1956
|
+
z
|
|
1649
1957
|
], ([e, , t]) => {
|
|
1650
|
-
(!e || !t) &&
|
|
1651
|
-
}), D([
|
|
1652
|
-
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) &&
|
|
1653
|
-
}, { flush: "post" }), D(
|
|
1958
|
+
(!e || !t) && Pe();
|
|
1959
|
+
}), D([G, K], ([e, t], [n, r]) => {
|
|
1960
|
+
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Me();
|
|
1961
|
+
}, { flush: "post" }), D(q, (e) => {
|
|
1654
1962
|
e && p(() => {
|
|
1655
|
-
|
|
1963
|
+
Ne(), Me();
|
|
1656
1964
|
});
|
|
1657
1965
|
});
|
|
1658
1966
|
let $ = null;
|
|
1659
1967
|
g(() => {
|
|
1660
1968
|
window.addEventListener("keydown", Ke), window.addEventListener("resize", Ye), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
1661
|
-
|
|
1662
|
-
}),
|
|
1969
|
+
Ne(), Me();
|
|
1970
|
+
}), G.value && $.observe(G.value), K.value && $.observe(K.value)), Ne(), Me();
|
|
1663
1971
|
}), _(() => {
|
|
1664
1972
|
window.removeEventListener("keydown", Ke), window.removeEventListener("resize", Ye), $?.disconnect();
|
|
1665
1973
|
});
|
|
1666
1974
|
function Ye() {
|
|
1667
|
-
|
|
1975
|
+
q.value && Ne();
|
|
1668
1976
|
}
|
|
1669
|
-
return l(
|
|
1977
|
+
return l(L.api), (t, l) => (v(), n(E(j), { size: P.size }, {
|
|
1670
1978
|
default: O(() => [(v(), i("section", {
|
|
1671
1979
|
ref_key: "ribbonRootRef",
|
|
1672
|
-
ref:
|
|
1673
|
-
key: E(
|
|
1980
|
+
ref: ae,
|
|
1981
|
+
key: E(L).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
1674
1982
|
class: m(["ml-ribbon", [
|
|
1675
|
-
`ml-ribbon--${E(
|
|
1676
|
-
`ml-ribbon--size-${
|
|
1983
|
+
`ml-ribbon--${E(L).layout.value}`,
|
|
1984
|
+
`ml-ribbon--size-${Z.value}`,
|
|
1677
1985
|
{
|
|
1678
|
-
"ml-ribbon--disabled": E(
|
|
1679
|
-
"ml-ribbon--minimized": E(
|
|
1680
|
-
"ml-ribbon--keytips-open": E(
|
|
1986
|
+
"ml-ribbon--disabled": E(L).disabled.value,
|
|
1987
|
+
"ml-ribbon--minimized": E(L).minimized.value,
|
|
1988
|
+
"ml-ribbon--keytips-open": E(L).keyTipsOpen.value
|
|
1681
1989
|
}
|
|
1682
1990
|
]]),
|
|
1683
|
-
inert: E(
|
|
1684
|
-
"aria-disabled": E(
|
|
1991
|
+
inert: E(L).disabled.value,
|
|
1992
|
+
"aria-disabled": E(L).disabled.value
|
|
1685
1993
|
}, [
|
|
1686
1994
|
a("header", {
|
|
1687
1995
|
ref_key: "ribbonHeaderRef",
|
|
1688
|
-
ref:
|
|
1996
|
+
ref: ce,
|
|
1689
1997
|
class: "ml-ribbon__header"
|
|
1690
1998
|
}, [
|
|
1691
|
-
a("div",
|
|
1692
|
-
s.showFileMenu ? (v(), n(
|
|
1999
|
+
a("div", mt, [
|
|
2000
|
+
s.showFileMenu ? (v(), n(we, {
|
|
1693
2001
|
key: 0,
|
|
1694
2002
|
items: s.fileMenuItems,
|
|
1695
|
-
disabled: E(
|
|
1696
|
-
label:
|
|
1697
|
-
"open-backstage-label":
|
|
2003
|
+
disabled: E(L).disabled.value,
|
|
2004
|
+
label: Q.value.fileMenuLabel,
|
|
2005
|
+
"open-backstage-label": Q.value.fileMenuOpenBackstageLabel,
|
|
1698
2006
|
"show-open-backstage": s.showOpenBackstage,
|
|
1699
|
-
onSelect:
|
|
1700
|
-
onOpenBackstage:
|
|
2007
|
+
onSelect: Re,
|
|
2008
|
+
onOpenBackstage: ze
|
|
1701
2009
|
}, null, 8, [
|
|
1702
2010
|
"items",
|
|
1703
2011
|
"disabled",
|
|
@@ -1705,33 +2013,33 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1705
2013
|
"open-backstage-label",
|
|
1706
2014
|
"show-open-backstage"
|
|
1707
2015
|
])) : r("", !0),
|
|
1708
|
-
c(
|
|
1709
|
-
tabs: E(
|
|
1710
|
-
"active-tab": E(
|
|
1711
|
-
disabled: E(
|
|
1712
|
-
"default-contextual-title":
|
|
1713
|
-
onSelect:
|
|
2016
|
+
c(Se, {
|
|
2017
|
+
tabs: E(re),
|
|
2018
|
+
"active-tab": E(L).activeTab.value,
|
|
2019
|
+
disabled: E(L).disabled.value,
|
|
2020
|
+
"default-contextual-title": Q.value.contextualTabDefaultTitle,
|
|
2021
|
+
onSelect: Fe
|
|
1714
2022
|
}, null, 8, [
|
|
1715
2023
|
"tabs",
|
|
1716
2024
|
"active-tab",
|
|
1717
2025
|
"disabled",
|
|
1718
2026
|
"default-contextual-title"
|
|
1719
2027
|
]),
|
|
1720
|
-
|
|
2028
|
+
P.hideMinimizeButton ? r("", !0) : (v(), n(E(V), {
|
|
1721
2029
|
key: 1,
|
|
1722
|
-
content:
|
|
1723
|
-
"show-after":
|
|
1724
|
-
"hide-after":
|
|
2030
|
+
content: Q.value.minimizeTooltip,
|
|
2031
|
+
"show-after": _e.value,
|
|
2032
|
+
"hide-after": ve.value
|
|
1725
2033
|
}, {
|
|
1726
|
-
default: O(() => [c(E(
|
|
2034
|
+
default: O(() => [c(E(ee), {
|
|
1727
2035
|
class: m([
|
|
1728
2036
|
"ml-ribbon__control",
|
|
1729
2037
|
"ml-ribbon__control--minimize",
|
|
1730
|
-
E(
|
|
2038
|
+
E(L).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
1731
2039
|
]),
|
|
1732
|
-
icon:
|
|
1733
|
-
disabled: E(
|
|
1734
|
-
onClick:
|
|
2040
|
+
icon: ye.value,
|
|
2041
|
+
disabled: E(L).disabled.value,
|
|
2042
|
+
onClick: Le
|
|
1735
2043
|
}, null, 8, [
|
|
1736
2044
|
"class",
|
|
1737
2045
|
"icon",
|
|
@@ -1744,19 +2052,19 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1744
2052
|
"hide-after"
|
|
1745
2053
|
]))
|
|
1746
2054
|
]),
|
|
1747
|
-
a("div",
|
|
1748
|
-
|
|
2055
|
+
a("div", ht, [
|
|
2056
|
+
P.hideLayoutSwitcher ? r("", !0) : (v(), n(E(V), {
|
|
1749
2057
|
key: 0,
|
|
1750
|
-
content:
|
|
1751
|
-
"show-after":
|
|
1752
|
-
"hide-after":
|
|
2058
|
+
content: Q.value.layoutSwitcherTooltip,
|
|
2059
|
+
"show-after": _e.value,
|
|
2060
|
+
"hide-after": ve.value
|
|
1753
2061
|
}, {
|
|
1754
|
-
default: O(() => [c(E(
|
|
2062
|
+
default: O(() => [c(E(ee), {
|
|
1755
2063
|
circle: "",
|
|
1756
2064
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
1757
|
-
icon: E(
|
|
1758
|
-
disabled: E(
|
|
1759
|
-
onClick:
|
|
2065
|
+
icon: E(se),
|
|
2066
|
+
disabled: E(L).disabled.value,
|
|
2067
|
+
onClick: Ie
|
|
1760
2068
|
}, null, 8, ["icon", "disabled"])]),
|
|
1761
2069
|
_: 1
|
|
1762
2070
|
}, 8, [
|
|
@@ -1764,51 +2072,51 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1764
2072
|
"show-after",
|
|
1765
2073
|
"hide-after"
|
|
1766
2074
|
])),
|
|
1767
|
-
|
|
2075
|
+
P.hideKeyTipsToggle ? r("", !0) : (v(), n(E(B), {
|
|
1768
2076
|
key: 1,
|
|
1769
2077
|
"inline-prompt": "",
|
|
1770
2078
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
1771
|
-
"active-text":
|
|
1772
|
-
"inactive-text":
|
|
1773
|
-
"model-value": E(
|
|
1774
|
-
disabled: E(
|
|
1775
|
-
onChange: l[0] ||= (e) => E(
|
|
2079
|
+
"active-text": Q.value.keyTipsToggleText,
|
|
2080
|
+
"inactive-text": Q.value.keyTipsToggleText,
|
|
2081
|
+
"model-value": E(L).keyTipsOpen.value,
|
|
2082
|
+
disabled: E(L).disabled.value,
|
|
2083
|
+
onChange: l[0] ||= (e) => E(L).keyTipsOpen.value = !E(L).keyTipsOpen.value
|
|
1776
2084
|
}, null, 8, [
|
|
1777
2085
|
"active-text",
|
|
1778
2086
|
"inactive-text",
|
|
1779
2087
|
"model-value",
|
|
1780
2088
|
"disabled"
|
|
1781
2089
|
])),
|
|
1782
|
-
t.$slots["tabs-extra"] ? (v(), i("div",
|
|
1783
|
-
activeTab: E(
|
|
1784
|
-
layout: E(
|
|
1785
|
-
minimized: E(
|
|
1786
|
-
disabled: E(
|
|
2090
|
+
t.$slots["tabs-extra"] ? (v(), i("div", gt, [S(t.$slots, "tabs-extra", {
|
|
2091
|
+
activeTab: E(L).activeTab.value,
|
|
2092
|
+
layout: E(L).layout.value,
|
|
2093
|
+
minimized: E(L).minimized.value,
|
|
2094
|
+
disabled: E(L).disabled.value
|
|
1787
2095
|
})])) : r("", !0)
|
|
1788
2096
|
]),
|
|
1789
|
-
|
|
2097
|
+
z.value ? (v(), n(E(R), {
|
|
1790
2098
|
key: 0,
|
|
1791
2099
|
placement: "bottom-start",
|
|
1792
|
-
visible:
|
|
1793
|
-
width:
|
|
1794
|
-
disabled: E(
|
|
2100
|
+
visible: q.value,
|
|
2101
|
+
width: ue.value || void 0,
|
|
2102
|
+
disabled: E(L).disabled.value || !E(L).minimized.value,
|
|
1795
2103
|
"show-arrow": !1,
|
|
1796
2104
|
offset: 0,
|
|
1797
|
-
"popper-class":
|
|
2105
|
+
"popper-class": he.value,
|
|
1798
2106
|
"onUpdate:visible": Je
|
|
1799
2107
|
}, {
|
|
1800
2108
|
reference: O(() => [a("span", {
|
|
1801
2109
|
"aria-hidden": "true",
|
|
1802
2110
|
class: "ml-ribbon__minimized-anchor",
|
|
1803
|
-
style: h(
|
|
2111
|
+
style: h(de.value)
|
|
1804
2112
|
}, null, 4)]),
|
|
1805
|
-
default: O(() => [E(
|
|
2113
|
+
default: O(() => [E(L).layout.value === "classic" ? (v(), i("main", {
|
|
1806
2114
|
key: 0,
|
|
1807
2115
|
ref_key: "minimizedClassicPanelRef",
|
|
1808
|
-
ref:
|
|
2116
|
+
ref: K,
|
|
1809
2117
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
1810
|
-
"data-active-tab":
|
|
1811
|
-
}, [(v(!0), i(e, null, x(
|
|
2118
|
+
"data-active-tab": z.value.id
|
|
2119
|
+
}, [(v(!0), i(e, null, x(be.value, (e) => (v(), n(ft, {
|
|
1812
2120
|
id: e.id,
|
|
1813
2121
|
key: e.id,
|
|
1814
2122
|
"data-group-id": e.id,
|
|
@@ -1822,14 +2130,14 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1822
2130
|
launcher: e.launcher,
|
|
1823
2131
|
"show-launcher-icon": e.showLauncherIcon,
|
|
1824
2132
|
"group-model": e,
|
|
1825
|
-
"overflow-trigger-aria-label":
|
|
1826
|
-
"gallery-preview-fallback":
|
|
1827
|
-
onItemClick: l[2] ||= (e) =>
|
|
2133
|
+
"overflow-trigger-aria-label": Q.value.groupOverflowTriggerAriaLabel,
|
|
2134
|
+
"gallery-preview-fallback": Q.value.galleryPreviewFallback,
|
|
2135
|
+
onItemClick: l[2] ||= (e) => Ve(e.groupId, e.itemId)
|
|
1828
2136
|
}, {
|
|
1829
|
-
default: O(() => [c(
|
|
2137
|
+
default: O(() => [c(rt, {
|
|
1830
2138
|
group: e,
|
|
1831
|
-
"gallery-preview-fallback":
|
|
1832
|
-
onItemClick: l[1] ||= (e) =>
|
|
2139
|
+
"gallery-preview-fallback": Q.value.galleryPreviewFallback,
|
|
2140
|
+
onItemClick: l[1] ||= (e) => Ve(e.groupId, e.itemId)
|
|
1833
2141
|
}, null, 8, ["group", "gallery-preview-fallback"])]),
|
|
1834
2142
|
_: 2
|
|
1835
2143
|
}, 1032, [
|
|
@@ -1847,66 +2155,66 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1847
2155
|
"group-model",
|
|
1848
2156
|
"overflow-trigger-aria-label",
|
|
1849
2157
|
"gallery-preview-fallback"
|
|
1850
|
-
]))), 128)),
|
|
2158
|
+
]))), 128)), xe.value.length ? (v(), i("section", vt, [a("div", yt, [c(E(R), {
|
|
1851
2159
|
trigger: "click",
|
|
1852
2160
|
placement: "bottom-end",
|
|
1853
|
-
width:
|
|
1854
|
-
disabled: E(
|
|
2161
|
+
width: Ce.value,
|
|
2162
|
+
disabled: E(L).disabled.value,
|
|
1855
2163
|
"show-arrow": !1,
|
|
1856
|
-
"popper-class":
|
|
1857
|
-
onShow: l[4] ||= (e) => E(
|
|
1858
|
-
onHide: l[5] ||= (e) => E(
|
|
2164
|
+
"popper-class": me.value,
|
|
2165
|
+
onShow: l[4] ||= (e) => E(L).overflowOpen.value = !0,
|
|
2166
|
+
onHide: l[5] ||= (e) => E(L).overflowOpen.value = !1
|
|
1859
2167
|
}, {
|
|
1860
2168
|
reference: O(() => [a("button", {
|
|
1861
2169
|
type: "button",
|
|
1862
2170
|
class: "ml-ribbon-overflow-trigger",
|
|
1863
|
-
"aria-label":
|
|
1864
|
-
disabled: E(
|
|
1865
|
-
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
1866
|
-
default: O(() => [a("div",
|
|
2171
|
+
"aria-label": Q.value.overflowTriggerAriaLabel,
|
|
2172
|
+
disabled: E(L).disabled.value
|
|
2173
|
+
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, bt)]),
|
|
2174
|
+
default: O(() => [a("div", xt, [(v(!0), i(e, null, x(xe.value, (e) => (v(), i("section", {
|
|
1867
2175
|
key: e.id,
|
|
1868
2176
|
class: "ml-ribbon-overflow-group"
|
|
1869
|
-
}, [a("header",
|
|
2177
|
+
}, [a("header", St, w(e.title), 1), c(rt, {
|
|
1870
2178
|
group: e,
|
|
1871
|
-
"gallery-preview-fallback":
|
|
1872
|
-
onItemClick: l[3] ||= (e) =>
|
|
2179
|
+
"gallery-preview-fallback": Q.value.galleryPreviewFallback,
|
|
2180
|
+
onItemClick: l[3] ||= (e) => Ve(e.groupId, e.itemId)
|
|
1873
2181
|
}, null, 8, ["group", "gallery-preview-fallback"])]))), 128))])]),
|
|
1874
2182
|
_: 1
|
|
1875
2183
|
}, 8, [
|
|
1876
2184
|
"width",
|
|
1877
2185
|
"disabled",
|
|
1878
2186
|
"popper-class"
|
|
1879
|
-
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
2187
|
+
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, _t)) : (v(), i("main", {
|
|
1880
2188
|
key: 1,
|
|
1881
2189
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
1882
|
-
"data-active-tab":
|
|
1883
|
-
}, [(v(!0), i(e, null, x(
|
|
2190
|
+
"data-active-tab": z.value.id
|
|
2191
|
+
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(R), {
|
|
1884
2192
|
key: e.id,
|
|
1885
2193
|
trigger: "click",
|
|
1886
2194
|
placement: "bottom-start",
|
|
1887
2195
|
width: 340,
|
|
1888
|
-
disabled: E(
|
|
2196
|
+
disabled: E(L).disabled.value,
|
|
1889
2197
|
"show-arrow": !1,
|
|
1890
|
-
"popper-class":
|
|
2198
|
+
"popper-class": pe.value
|
|
1891
2199
|
}, {
|
|
1892
2200
|
reference: O(() => [a("button", {
|
|
1893
2201
|
class: "ml-ribbon-simplified-group",
|
|
1894
2202
|
type: "button",
|
|
1895
|
-
disabled: E(
|
|
1896
|
-
}, [qe(e) ? (v(), n(E(
|
|
2203
|
+
disabled: E(L).disabled.value
|
|
2204
|
+
}, [qe(e) ? (v(), n(E(I), {
|
|
1897
2205
|
key: 0,
|
|
1898
2206
|
class: "ml-ribbon-simplified-group__icon"
|
|
1899
2207
|
}, {
|
|
1900
2208
|
default: O(() => [(v(), n(C(qe(e))))]),
|
|
1901
2209
|
_: 2
|
|
1902
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
1903
|
-
default: O(() => [a("div",
|
|
1904
|
-
group:
|
|
1905
|
-
"gallery-preview-fallback":
|
|
1906
|
-
onItemClick: l[6] ||= (e) =>
|
|
2210
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, wt)]),
|
|
2211
|
+
default: O(() => [a("div", Tt, [c(rt, {
|
|
2212
|
+
group: Te(e),
|
|
2213
|
+
"gallery-preview-fallback": Q.value.galleryPreviewFallback,
|
|
2214
|
+
onItemClick: l[6] ||= (e) => Ve(e.groupId, e.itemId)
|
|
1907
2215
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
1908
2216
|
_: 2
|
|
1909
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2217
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, Ct))]),
|
|
1910
2218
|
_: 1
|
|
1911
2219
|
}, 8, [
|
|
1912
2220
|
"visible",
|
|
@@ -1915,13 +2223,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1915
2223
|
"popper-class"
|
|
1916
2224
|
])) : r("", !0)
|
|
1917
2225
|
], 512),
|
|
1918
|
-
!E(
|
|
2226
|
+
!E(L).minimized.value && z.value && E(L).layout.value === "classic" ? (v(), i("main", {
|
|
1919
2227
|
key: 0,
|
|
1920
2228
|
class: "ml-ribbon__panel",
|
|
1921
|
-
"data-active-tab":
|
|
2229
|
+
"data-active-tab": z.value.id,
|
|
1922
2230
|
ref_key: "classicPanelRef",
|
|
1923
|
-
ref:
|
|
1924
|
-
}, [(v(!0), i(e, null, x(
|
|
2231
|
+
ref: G
|
|
2232
|
+
}, [(v(!0), i(e, null, x(be.value, (e) => (v(), n(ft, {
|
|
1925
2233
|
id: e.id,
|
|
1926
2234
|
key: e.id,
|
|
1927
2235
|
"data-group-id": e.id,
|
|
@@ -1935,14 +2243,14 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1935
2243
|
launcher: e.launcher,
|
|
1936
2244
|
"show-launcher-icon": e.showLauncherIcon,
|
|
1937
2245
|
"group-model": e,
|
|
1938
|
-
"overflow-trigger-aria-label":
|
|
1939
|
-
"gallery-preview-fallback":
|
|
1940
|
-
onItemClick: l[8] ||= (e) =>
|
|
2246
|
+
"overflow-trigger-aria-label": Q.value.groupOverflowTriggerAriaLabel,
|
|
2247
|
+
"gallery-preview-fallback": Q.value.galleryPreviewFallback,
|
|
2248
|
+
onItemClick: l[8] ||= (e) => Ve(e.groupId, e.itemId)
|
|
1941
2249
|
}, {
|
|
1942
|
-
default: O(() => [c(
|
|
2250
|
+
default: O(() => [c(rt, {
|
|
1943
2251
|
group: e,
|
|
1944
|
-
"gallery-preview-fallback":
|
|
1945
|
-
onItemClick: l[7] ||= (e) =>
|
|
2252
|
+
"gallery-preview-fallback": Q.value.galleryPreviewFallback,
|
|
2253
|
+
onItemClick: l[7] ||= (e) => Ve(e.groupId, e.itemId)
|
|
1946
2254
|
}, null, 8, ["group", "gallery-preview-fallback"])]),
|
|
1947
2255
|
_: 2
|
|
1948
2256
|
}, 1032, [
|
|
@@ -1960,82 +2268,82 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
1960
2268
|
"group-model",
|
|
1961
2269
|
"overflow-trigger-aria-label",
|
|
1962
2270
|
"gallery-preview-fallback"
|
|
1963
|
-
]))), 128)),
|
|
2271
|
+
]))), 128)), xe.value.length ? (v(), i("section", Dt, [a("div", Ot, [c(E(R), {
|
|
1964
2272
|
trigger: "click",
|
|
1965
2273
|
placement: "bottom-end",
|
|
1966
|
-
width:
|
|
1967
|
-
disabled: E(
|
|
1968
|
-
"popper-class":
|
|
1969
|
-
onShow: l[10] ||= (e) => E(
|
|
1970
|
-
onHide: l[11] ||= (e) => E(
|
|
2274
|
+
width: Ce.value,
|
|
2275
|
+
disabled: E(L).disabled.value,
|
|
2276
|
+
"popper-class": me.value,
|
|
2277
|
+
onShow: l[10] ||= (e) => E(L).overflowOpen.value = !0,
|
|
2278
|
+
onHide: l[11] ||= (e) => E(L).overflowOpen.value = !1
|
|
1971
2279
|
}, {
|
|
1972
2280
|
reference: O(() => [a("button", {
|
|
1973
2281
|
type: "button",
|
|
1974
2282
|
class: "ml-ribbon-overflow-trigger",
|
|
1975
|
-
"aria-label":
|
|
1976
|
-
disabled: E(
|
|
1977
|
-
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
1978
|
-
default: O(() => [a("div",
|
|
2283
|
+
"aria-label": Q.value.overflowTriggerAriaLabel,
|
|
2284
|
+
disabled: E(L).disabled.value
|
|
2285
|
+
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, kt)]),
|
|
2286
|
+
default: O(() => [a("div", At, [(v(!0), i(e, null, x(xe.value, (e) => (v(), i("section", {
|
|
1979
2287
|
key: e.id,
|
|
1980
2288
|
class: "ml-ribbon-overflow-group"
|
|
1981
|
-
}, [a("header",
|
|
2289
|
+
}, [a("header", jt, w(e.title), 1), c(rt, {
|
|
1982
2290
|
group: e,
|
|
1983
|
-
"gallery-preview-fallback":
|
|
1984
|
-
onItemClick: l[9] ||= (e) =>
|
|
2291
|
+
"gallery-preview-fallback": Q.value.galleryPreviewFallback,
|
|
2292
|
+
onItemClick: l[9] ||= (e) => Ve(e.groupId, e.itemId)
|
|
1985
2293
|
}, null, 8, ["group", "gallery-preview-fallback"])]))), 128))])]),
|
|
1986
2294
|
_: 1
|
|
1987
2295
|
}, 8, [
|
|
1988
2296
|
"width",
|
|
1989
2297
|
"disabled",
|
|
1990
2298
|
"popper-class"
|
|
1991
|
-
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
1992
|
-
!E(
|
|
2299
|
+
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, Et)) : r("", !0),
|
|
2300
|
+
!E(L).minimized.value && z.value && E(L).layout.value === "simplified" ? (v(), i("main", {
|
|
1993
2301
|
key: 1,
|
|
1994
2302
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
1995
|
-
"data-active-tab":
|
|
1996
|
-
}, [(v(!0), i(e, null, x(
|
|
2303
|
+
"data-active-tab": z.value.id
|
|
2304
|
+
}, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(R), {
|
|
1997
2305
|
key: e.id,
|
|
1998
2306
|
trigger: "click",
|
|
1999
2307
|
placement: "bottom-start",
|
|
2000
2308
|
width: 340,
|
|
2001
|
-
disabled: E(
|
|
2002
|
-
"popper-class":
|
|
2309
|
+
disabled: E(L).disabled.value,
|
|
2310
|
+
"popper-class": pe.value
|
|
2003
2311
|
}, {
|
|
2004
2312
|
reference: O(() => [a("button", {
|
|
2005
2313
|
class: "ml-ribbon-simplified-group",
|
|
2006
2314
|
type: "button",
|
|
2007
|
-
disabled: E(
|
|
2008
|
-
}, [qe(e) ? (v(), n(E(
|
|
2315
|
+
disabled: E(L).disabled.value
|
|
2316
|
+
}, [qe(e) ? (v(), n(E(I), {
|
|
2009
2317
|
key: 0,
|
|
2010
2318
|
class: "ml-ribbon-simplified-group__icon"
|
|
2011
2319
|
}, {
|
|
2012
2320
|
default: O(() => [(v(), n(C(qe(e))))]),
|
|
2013
2321
|
_: 2
|
|
2014
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
2015
|
-
default: O(() => [a("div",
|
|
2016
|
-
group:
|
|
2017
|
-
"gallery-preview-fallback":
|
|
2018
|
-
onItemClick: l[12] ||= (e) =>
|
|
2322
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, Nt)]),
|
|
2323
|
+
default: O(() => [a("div", Pt, [c(rt, {
|
|
2324
|
+
group: Te(e),
|
|
2325
|
+
"gallery-preview-fallback": Q.value.galleryPreviewFallback,
|
|
2326
|
+
onItemClick: l[12] ||= (e) => Ve(e.groupId, e.itemId)
|
|
2019
2327
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
2020
2328
|
_: 2
|
|
2021
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2022
|
-
c(
|
|
2023
|
-
open: E(
|
|
2024
|
-
size:
|
|
2025
|
-
"back-label":
|
|
2026
|
-
title:
|
|
2027
|
-
description:
|
|
2028
|
-
onClose:
|
|
2329
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, Mt)) : r("", !0),
|
|
2330
|
+
c(ge, {
|
|
2331
|
+
open: E(L).backdropOpen.value,
|
|
2332
|
+
size: Z.value,
|
|
2333
|
+
"back-label": Q.value.backstageBackLabel,
|
|
2334
|
+
title: Q.value.backstageTitle,
|
|
2335
|
+
description: Q.value.backstageDescription,
|
|
2336
|
+
onClose: Be
|
|
2029
2337
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
2030
2338
|
name: "default",
|
|
2031
2339
|
fn: O(() => [S(t.$slots, "backstage", {
|
|
2032
|
-
close:
|
|
2033
|
-
open: E(
|
|
2034
|
-
size:
|
|
2035
|
-
backLabel:
|
|
2036
|
-
title:
|
|
2037
|
-
description:
|
|
2038
|
-
disabled: E(
|
|
2340
|
+
close: Be,
|
|
2341
|
+
open: E(L).backdropOpen.value,
|
|
2342
|
+
size: Z.value,
|
|
2343
|
+
backLabel: Q.value.backstageBackLabel,
|
|
2344
|
+
title: Q.value.backstageTitle,
|
|
2345
|
+
description: Q.value.backstageDescription,
|
|
2346
|
+
disabled: E(L).disabled.value
|
|
2039
2347
|
})]),
|
|
2040
2348
|
key: "0"
|
|
2041
2349
|
} : void 0]), 1032, [
|
|
@@ -2045,14 +2353,14 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
2045
2353
|
"title",
|
|
2046
2354
|
"description"
|
|
2047
2355
|
])
|
|
2048
|
-
], 10,
|
|
2356
|
+
], 10, pt))]),
|
|
2049
2357
|
_: 3
|
|
2050
2358
|
}, 8, ["size"]));
|
|
2051
2359
|
}
|
|
2052
|
-
}),
|
|
2360
|
+
}), Lt = {
|
|
2053
2361
|
class: "ml-ribbon-tab-definition",
|
|
2054
2362
|
hidden: ""
|
|
2055
|
-
},
|
|
2363
|
+
}, Rt = /* @__PURE__ */ l({
|
|
2056
2364
|
__name: "RibbonTab",
|
|
2057
2365
|
props: {
|
|
2058
2366
|
id: {},
|
|
@@ -2063,13 +2371,13 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
2063
2371
|
contextualTitle: {}
|
|
2064
2372
|
},
|
|
2065
2373
|
setup(e) {
|
|
2066
|
-
return (e, t) => (v(), i("div",
|
|
2374
|
+
return (e, t) => (v(), i("div", Lt, [S(e.$slots, "default")]));
|
|
2067
2375
|
}
|
|
2068
|
-
}),
|
|
2376
|
+
}), zt = {
|
|
2069
2377
|
key: 0,
|
|
2070
2378
|
class: "ml-ribbon-keytips",
|
|
2071
2379
|
"aria-live": "polite"
|
|
2072
|
-
},
|
|
2380
|
+
}, Bt = { class: "ml-ribbon-keytips__hint" }, Vt = /* @__PURE__ */ l({
|
|
2073
2381
|
__name: "RibbonKeyTips",
|
|
2074
2382
|
props: {
|
|
2075
2383
|
open: { type: Boolean },
|
|
@@ -2104,11 +2412,11 @@ var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstag
|
|
|
2104
2412
|
}
|
|
2105
2413
|
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), D(() => s.open, (e) => {
|
|
2106
2414
|
e || y();
|
|
2107
|
-
}), (t, o) => n.open ? (v(), i("div",
|
|
2415
|
+
}), (t, o) => n.open ? (v(), i("div", zt, [a("div", Bt, w(f.value), 1), (v(!0), i(e, null, x(u.value, (e) => (v(), i("span", {
|
|
2108
2416
|
key: e.id,
|
|
2109
2417
|
class: "ml-ribbon-keytip"
|
|
2110
2418
|
}, w(e.key), 1))), 128))])) : r("", !0);
|
|
2111
2419
|
}
|
|
2112
2420
|
});
|
|
2113
2421
|
//#endregion
|
|
2114
|
-
export {
|
|
2422
|
+
export { It as MlRibbon, ge as MlRibbonBackstage, De as MlRibbonButton, je as MlRibbonButtonGroup, Te as MlRibbonCollection, Se as MlRibbonContextualTabs, Le as MlRibbonDropdown, we as MlRibbonFileMenu, Ge as MlRibbonGallery, ft as MlRibbonGroup, nt as MlRibbonItemHost, Vt as MlRibbonKeyTips, Xe as MlRibbonSegmented, Rt as MlRibbonTab, ve as MlRibbonTabs, $e as MlRibbonTemplateItem, Ze as MlRibbonToggleButton };
|