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