@mlightcad/ribbon 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -1
- package/dist/components/RibbonItemHost.vue.d.ts +3 -3
- package/dist/index.d.ts +6 -1
- package/dist/items/RibbonTemplateItem.vue.d.ts +2 -1
- package/dist/items/RibbonToggleButton.vue.d.ts +28 -0
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +538 -412
- package/dist/ml-ribbon.umd.js +1 -1
- package/dist/types.d.ts +7 -1
- package/package.json +1 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
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,
|
|
2
|
-
import { ElButton as
|
|
3
|
-
import { ArrowDown as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, markRaw as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onMounted as g, onUnmounted as _, openBlock as v, provide as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, toRaw as ee, unref as T, watch as E, withCtx as D, withModifiers as O } from "vue";
|
|
2
|
+
import { ElButton as k, ElButtonGroup as A, ElCheckbox as j, ElColorPicker as M, ElConfigProvider as te, ElDrawer as N, ElDropdown as P, ElDropdownItem as F, ElDropdownMenu as ne, ElIcon as I, ElOption as L, ElPopover as re, ElSegmented as R, ElSelect as z, ElSwitch as B, ElTooltip as V, useGlobalConfig as ie } from "element-plus";
|
|
3
|
+
import { ArrowDown as H, ArrowDownBold as ae, ArrowUp as oe, ArrowUpBold as U, Grid as se, Menu as ce, Promotion as le } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
|
-
var
|
|
5
|
+
var ue = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/ribbon/composables/useRibbonState.ts
|
|
8
|
-
function
|
|
9
|
-
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(
|
|
8
|
+
function W(e) {
|
|
9
|
+
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(ee(e)) : e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function G(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 = W(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: W(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: W(e.icon),
|
|
27
|
+
props: G(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: W(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 de(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 J(e) {
|
|
48
|
+
return e.map(de);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Y(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 X(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 Z(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 s =
|
|
64
|
+
function fe(e, n, r, i, a, o) {
|
|
65
|
+
let s = b(r), c = b(i), l = b(a), u = b(o), d = b(J(n)), f = b(!1), p = b(!1), m = b(!1), h = b([]), g = b(""), _ = t(() => d.value.filter((e) => e.visible !== !1)), v = {
|
|
66
66
|
addTab(e) {
|
|
67
|
-
d.value.push(
|
|
67
|
+
d.value.push(de(e)), u.value ||= e.id;
|
|
68
68
|
},
|
|
69
69
|
removeTab(e) {
|
|
70
70
|
d.value = d.value.filter((t) => t.id !== e), u.value === e && (u.value = _.value[0]?.id ?? "");
|
|
@@ -82,7 +82,7 @@ function ue(e, n, r, i, a, o) {
|
|
|
82
82
|
},
|
|
83
83
|
addGroup(e, t) {
|
|
84
84
|
let n = d.value.find((t) => t.id === e);
|
|
85
|
-
n && (n.groups ??= [],
|
|
85
|
+
n && (n.groups ??= [], Y(t), n.groups.push(q(t)));
|
|
86
86
|
},
|
|
87
87
|
removeGroup(e, t) {
|
|
88
88
|
let n = d.value.find((t) => t.id === e);
|
|
@@ -97,16 +97,16 @@ function ue(e, n, r, i, a, o) {
|
|
|
97
97
|
n && (n.visible = !1);
|
|
98
98
|
},
|
|
99
99
|
addItem(e, t, n, r) {
|
|
100
|
-
|
|
100
|
+
X(d.value, e, t, n, (e) => e.push(K(r)));
|
|
101
101
|
},
|
|
102
102
|
removeItem(e, t, n, r) {
|
|
103
|
-
|
|
103
|
+
X(d.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
|
+
X(d.value, e, t, n, (e) => {
|
|
110
110
|
let t = e.find((e) => e.id === r);
|
|
111
111
|
t && Object.assign(t, i);
|
|
112
112
|
});
|
|
@@ -153,7 +153,7 @@ function ue(e, n, r, i, a, o) {
|
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/ribbon/modules/RibbonBackstage.vue?vue&type=script&setup=true&lang.ts
|
|
156
|
-
var
|
|
156
|
+
var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backstage__content" }, he = { key: 0 }, ge = { key: 1 }, _e = /* @__PURE__ */ l({
|
|
157
157
|
__name: "RibbonBackstage",
|
|
158
158
|
props: {
|
|
159
159
|
open: { type: Boolean },
|
|
@@ -168,38 +168,38 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
168
168
|
function d() {
|
|
169
169
|
u("close");
|
|
170
170
|
}
|
|
171
|
-
return (t, o) => (
|
|
171
|
+
return (t, o) => (v(), n(T(N), {
|
|
172
172
|
"model-value": l.open,
|
|
173
173
|
size: "100%",
|
|
174
174
|
"with-header": !1,
|
|
175
175
|
direction: "ltr",
|
|
176
176
|
onClose: d
|
|
177
177
|
}, {
|
|
178
|
-
default: D(() => [a("div", { class:
|
|
178
|
+
default: D(() => [a("div", { class: m(["ml-ribbon-backstage", `ml-ribbon-backstage--size-${l.size || "default"}`]) }, [t.$slots.default ? S(t.$slots, "default", {
|
|
179
179
|
key: 0,
|
|
180
180
|
close: d,
|
|
181
181
|
backLabel: l.backLabel,
|
|
182
182
|
title: l.title,
|
|
183
183
|
description: l.description,
|
|
184
184
|
size: l.size
|
|
185
|
-
}) : (
|
|
185
|
+
}) : (v(), i(e, { key: 1 }, [a("aside", pe, [c(T(k), {
|
|
186
186
|
type: "primary",
|
|
187
187
|
onClick: d
|
|
188
188
|
}, {
|
|
189
|
-
default: D(() => [s(
|
|
189
|
+
default: D(() => [s(w(l.backLabel), 1)]),
|
|
190
190
|
_: 1
|
|
191
|
-
})]), a("section",
|
|
191
|
+
})]), 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)]),
|
|
192
192
|
_: 3
|
|
193
193
|
}, 8, ["model-value"]));
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
195
|
+
}), ve = {
|
|
196
196
|
class: "ml-ribbon-tabs",
|
|
197
197
|
role: "tablist"
|
|
198
|
-
},
|
|
198
|
+
}, ye = [
|
|
199
199
|
"aria-selected",
|
|
200
200
|
"disabled",
|
|
201
201
|
"onClick"
|
|
202
|
-
],
|
|
202
|
+
], Z = /* @__PURE__ */ l({
|
|
203
203
|
__name: "RibbonTabs",
|
|
204
204
|
props: {
|
|
205
205
|
tabs: {},
|
|
@@ -209,17 +209,17 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
209
209
|
emits: ["select"],
|
|
210
210
|
setup(n, { emit: r }) {
|
|
211
211
|
let a = n, o = r, s = t(() => a.tabs.filter((e) => e.visible !== !1));
|
|
212
|
-
return (t, r) => (
|
|
212
|
+
return (t, r) => (v(), i("div", ve, [(v(!0), i(e, null, x(s.value, (e) => (v(), i("button", {
|
|
213
213
|
key: e.id,
|
|
214
214
|
type: "button",
|
|
215
|
-
class:
|
|
215
|
+
class: m(["ml-ribbon-tab", { "is-active": n.activeTab === e.id }]),
|
|
216
216
|
role: "tab",
|
|
217
217
|
"aria-selected": n.activeTab === e.id,
|
|
218
218
|
disabled: a.disabled,
|
|
219
219
|
onClick: (t) => o("select", e.id)
|
|
220
|
-
},
|
|
220
|
+
}, w(e.title), 11, ye))), 128))]));
|
|
221
221
|
}
|
|
222
|
-
}),
|
|
222
|
+
}), be = { class: "ml-ribbon-contextual-tabs" }, xe = { class: "ml-ribbon-contextual-tabs__normal" }, Se = { class: "ml-ribbon-contextual-tabs__ctx" }, Ce = /* @__PURE__ */ l({
|
|
223
223
|
__name: "RibbonContextualTabs",
|
|
224
224
|
props: {
|
|
225
225
|
tabs: {},
|
|
@@ -230,7 +230,7 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
230
230
|
emits: ["select"],
|
|
231
231
|
setup(t, { emit: n }) {
|
|
232
232
|
let r = t, o = n;
|
|
233
|
-
return (n, s) => (
|
|
233
|
+
return (n, s) => (v(), i("div", be, [a("div", xe, [c(Z, {
|
|
234
234
|
tabs: r.tabs.filter((e) => !e.contextual),
|
|
235
235
|
"active-tab": t.activeTab,
|
|
236
236
|
disabled: r.disabled,
|
|
@@ -239,11 +239,11 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
239
239
|
"tabs",
|
|
240
240
|
"active-tab",
|
|
241
241
|
"disabled"
|
|
242
|
-
])]), a("div",
|
|
242
|
+
])]), a("div", Se, [(v(!0), i(e, null, x(r.tabs.filter((e) => e.contextual), (e) => (v(), i("section", {
|
|
243
243
|
key: e.id,
|
|
244
244
|
class: "ml-ribbon-contextual-tabs__block",
|
|
245
|
-
style:
|
|
246
|
-
}, [a("small", null,
|
|
245
|
+
style: h({ "--ctx-color": e.contextualColor || "#67c23a" })
|
|
246
|
+
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(Z, {
|
|
247
247
|
tabs: [e],
|
|
248
248
|
"active-tab": t.activeTab,
|
|
249
249
|
disabled: r.disabled,
|
|
@@ -254,7 +254,7 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
254
254
|
"disabled"
|
|
255
255
|
])], 4))), 128))])]));
|
|
256
256
|
}
|
|
257
|
-
}),
|
|
257
|
+
}), we = ["disabled"], Te = /* @__PURE__ */ l({
|
|
258
258
|
__name: "RibbonFileMenu",
|
|
259
259
|
props: {
|
|
260
260
|
items: {},
|
|
@@ -265,11 +265,11 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
265
265
|
},
|
|
266
266
|
emits: ["select", "open-backstage"],
|
|
267
267
|
setup(o, { emit: l }) {
|
|
268
|
-
let u = o, d = l, f =
|
|
269
|
-
function
|
|
268
|
+
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}`);
|
|
269
|
+
function _(e) {
|
|
270
270
|
f.value = e;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function y(e) {
|
|
273
273
|
if (e === "__backstage") {
|
|
274
274
|
d("open-backstage");
|
|
275
275
|
return;
|
|
@@ -278,27 +278,27 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
278
278
|
}
|
|
279
279
|
return E(() => u.disabled, (e) => {
|
|
280
280
|
e && (f.value = !1);
|
|
281
|
-
}), (t, o) => (
|
|
281
|
+
}), (t, o) => (v(), n(T(P), {
|
|
282
282
|
trigger: "click",
|
|
283
283
|
disabled: u.disabled,
|
|
284
284
|
"popper-class": g.value,
|
|
285
|
-
onCommand:
|
|
286
|
-
onVisibleChange:
|
|
285
|
+
onCommand: y,
|
|
286
|
+
onVisibleChange: _
|
|
287
287
|
}, {
|
|
288
|
-
dropdown: D(() => [c(T(
|
|
289
|
-
default: D(() => [u.showOpenBackstage === !1 ? r("", !0) : (
|
|
288
|
+
dropdown: D(() => [c(T(ne), null, {
|
|
289
|
+
default: D(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(T(F), {
|
|
290
290
|
key: 0,
|
|
291
291
|
command: "__backstage"
|
|
292
292
|
}, {
|
|
293
|
-
default: D(() => [s(
|
|
293
|
+
default: D(() => [s(w(u.openBackstageLabel), 1)]),
|
|
294
294
|
_: 1
|
|
295
|
-
})), (
|
|
295
|
+
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(T(F), {
|
|
296
296
|
key: e.id,
|
|
297
297
|
divided: u.showOpenBackstage !== !1 && t === 0,
|
|
298
298
|
command: e.id,
|
|
299
299
|
disabled: e.disabled
|
|
300
300
|
}, {
|
|
301
|
-
default: D(() => [s(
|
|
301
|
+
default: D(() => [s(w(e.label), 1)]),
|
|
302
302
|
_: 2
|
|
303
303
|
}, 1032, [
|
|
304
304
|
"divided",
|
|
@@ -309,13 +309,13 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
309
309
|
})]),
|
|
310
310
|
default: D(() => [a("button", {
|
|
311
311
|
type: "button",
|
|
312
|
-
class:
|
|
312
|
+
class: m(["ml-ribbon-tab ml-ribbon-tab--file", { "is-active": f.value }]),
|
|
313
313
|
disabled: u.disabled
|
|
314
|
-
},
|
|
314
|
+
}, w(u.label), 11, we)]),
|
|
315
315
|
_: 1
|
|
316
316
|
}, 8, ["disabled", "popper-class"]));
|
|
317
317
|
}
|
|
318
|
-
}),
|
|
318
|
+
}), Ee = /* @__PURE__ */ l({
|
|
319
319
|
__name: "RibbonCollection",
|
|
320
320
|
props: {
|
|
321
321
|
id: {},
|
|
@@ -324,15 +324,15 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
324
324
|
},
|
|
325
325
|
setup(e) {
|
|
326
326
|
let n = e, r = t(() => ({ "--ml-ribbon-collection-rows": String(n.rows) }));
|
|
327
|
-
return (e, t) => (
|
|
328
|
-
class:
|
|
329
|
-
style:
|
|
330
|
-
}, [
|
|
327
|
+
return (e, t) => (v(), i("div", {
|
|
328
|
+
class: m(["ml-ribbon-collection", [`ml-ribbon-collection--${n.layout}`]]),
|
|
329
|
+
style: h(r.value)
|
|
330
|
+
}, [S(e.$slots, "default")], 6));
|
|
331
331
|
}
|
|
332
|
-
}),
|
|
332
|
+
}), De = {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "ml-ribbon-gallery__title"
|
|
335
|
-
},
|
|
335
|
+
}, Oe = { class: "ml-ribbon-gallery__categories" }, ke = { class: "ml-ribbon-gallery__category-title" }, Ae = { class: "ml-ribbon-gallery__grid" }, je = ["disabled", "onClick"], Q = { class: "ml-ribbon-gallery__preview" }, Me = { class: "ml-ribbon-gallery__label" }, Ne = /* @__PURE__ */ l({
|
|
336
336
|
__name: "RibbonGallery",
|
|
337
337
|
props: {
|
|
338
338
|
id: {},
|
|
@@ -346,22 +346,22 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
346
346
|
},
|
|
347
347
|
emits: ["select"],
|
|
348
348
|
setup(t, { emit: n }) {
|
|
349
|
-
let o = t, s = n, c =
|
|
349
|
+
let o = t, s = n, c = b("");
|
|
350
350
|
function l(e) {
|
|
351
351
|
o.disabled || (c.value = e, s("select", e));
|
|
352
352
|
}
|
|
353
|
-
return (n, s) => (
|
|
353
|
+
return (n, s) => (v(), i("div", { class: m(["ml-ribbon-gallery", { "is-disabled": t.disabled }]) }, [t.label ? (v(), i("div", De, w(t.label), 1)) : r("", !0), a("div", Oe, [(v(!0), i(e, null, x(t.categories, (n) => (v(), i("section", {
|
|
354
354
|
key: n.id,
|
|
355
355
|
class: "ml-ribbon-gallery__category"
|
|
356
|
-
}, [a("h4",
|
|
356
|
+
}, [a("h4", ke, w(n.title), 1), a("div", Ae, [(v(!0), i(e, null, x(n.items, (e) => (v(), i("button", {
|
|
357
357
|
key: e.id,
|
|
358
358
|
type: "button",
|
|
359
|
-
class:
|
|
359
|
+
class: m(["ml-ribbon-gallery__item", { "is-selected": c.value === e.id }]),
|
|
360
360
|
disabled: t.disabled,
|
|
361
361
|
onClick: (t) => l(e.id)
|
|
362
|
-
}, [a("div",
|
|
362
|
+
}, [a("div", Q, w(e.preview ?? o.previewFallback), 1), a("div", Me, w(e.label), 1)], 10, je))), 128))])]))), 128))])], 2));
|
|
363
363
|
}
|
|
364
|
-
}),
|
|
364
|
+
}), $ = ["data-id"], Pe = { class: "ml-ribbon-button-group__label" }, Fe = /* @__PURE__ */ l({
|
|
365
365
|
__name: "RibbonButtonGroup",
|
|
366
366
|
props: {
|
|
367
367
|
id: {},
|
|
@@ -378,38 +378,38 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
378
378
|
function d(e) {
|
|
379
379
|
l.disabled || u("change", e);
|
|
380
380
|
}
|
|
381
|
-
return (o, l) => (
|
|
381
|
+
return (o, l) => (v(), i("div", {
|
|
382
382
|
class: "ml-ribbon-button-group",
|
|
383
383
|
"data-id": t.id
|
|
384
|
-
}, [a("div",
|
|
385
|
-
default: D(() => [(
|
|
384
|
+
}, [a("div", Pe, w(t.label), 1), c(T(A), null, {
|
|
385
|
+
default: D(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(T(k), {
|
|
386
386
|
key: e.value,
|
|
387
387
|
disabled: t.disabled,
|
|
388
388
|
type: "default",
|
|
389
389
|
onClick: (t) => d(e.value)
|
|
390
390
|
}, {
|
|
391
|
-
default: D(() => [e.icon ? (
|
|
391
|
+
default: D(() => [e.icon ? (v(), n(T(I), {
|
|
392
392
|
key: 0,
|
|
393
393
|
class: "ml-ribbon-item-host__icon"
|
|
394
394
|
}, {
|
|
395
|
-
default: D(() => [(
|
|
395
|
+
default: D(() => [(v(), n(C(e.icon)))]),
|
|
396
396
|
_: 2
|
|
397
|
-
}, 1024)) : r("", !0), s(" " +
|
|
397
|
+
}, 1024)) : r("", !0), s(" " + w(e.label), 1)]),
|
|
398
398
|
_: 2
|
|
399
399
|
}, 1032, ["disabled", "onClick"]))), 128))]),
|
|
400
400
|
_: 1
|
|
401
|
-
})], 8,
|
|
401
|
+
})], 8, $));
|
|
402
402
|
}
|
|
403
|
-
}),
|
|
403
|
+
}), Ie = ["data-id"], Le = {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: "ml-ribbon-segmented__label"
|
|
406
|
-
},
|
|
406
|
+
}, Re = ["data-option-value"], ze = {
|
|
407
407
|
key: 2,
|
|
408
408
|
class: "ml-ribbon-segmented__option-label"
|
|
409
|
-
},
|
|
409
|
+
}, Be = {
|
|
410
410
|
key: 3,
|
|
411
411
|
class: "ml-ribbon-segmented__option-sr-label"
|
|
412
|
-
},
|
|
412
|
+
}, Ve = /* @__PURE__ */ l({
|
|
413
413
|
__name: "RibbonSegmented",
|
|
414
414
|
props: {
|
|
415
415
|
id: {},
|
|
@@ -443,7 +443,7 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
443
443
|
function f(e) {
|
|
444
444
|
return e;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function p(e) {
|
|
447
447
|
let t = f(e);
|
|
448
448
|
return t.label?.trim() || String(t.value);
|
|
449
449
|
}
|
|
@@ -453,7 +453,7 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
453
453
|
function g(e) {
|
|
454
454
|
return f(e).iconClass ?? null;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function _(e) {
|
|
457
457
|
return !h(e) && !g(e);
|
|
458
458
|
}
|
|
459
459
|
function y(e) {
|
|
@@ -462,10 +462,10 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
462
462
|
function b(e) {
|
|
463
463
|
l("change", e);
|
|
464
464
|
}
|
|
465
|
-
return (t, o) => (
|
|
465
|
+
return (t, o) => (v(), i("div", {
|
|
466
466
|
class: "ml-ribbon-segmented",
|
|
467
467
|
"data-id": e.id
|
|
468
|
-
}, [d.value ? (
|
|
468
|
+
}, [d.value ? (v(), i("div", Le, w(u.value), 1)) : r("", !0), c(T(R), {
|
|
469
469
|
class: "ml-ribbon-segmented__control",
|
|
470
470
|
options: e.options,
|
|
471
471
|
"model-value": e.modelValue,
|
|
@@ -478,18 +478,18 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
478
478
|
default: D(({ item: e }) => [a("span", {
|
|
479
479
|
class: "ml-ribbon-segmented__option",
|
|
480
480
|
"data-option-value": y(e)
|
|
481
|
-
}, [h(e) ? (
|
|
481
|
+
}, [h(e) ? (v(), n(T(I), {
|
|
482
482
|
key: 0,
|
|
483
483
|
class: "ml-ribbon-segmented__option-icon",
|
|
484
484
|
"aria-hidden": "true"
|
|
485
485
|
}, {
|
|
486
|
-
default: D(() => [(
|
|
486
|
+
default: D(() => [(v(), n(C(h(e))))]),
|
|
487
487
|
_: 2
|
|
488
|
-
}, 1024)) : g(e) ? (
|
|
488
|
+
}, 1024)) : g(e) ? (v(), i("i", {
|
|
489
489
|
key: 1,
|
|
490
|
-
class:
|
|
490
|
+
class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", g(e)]),
|
|
491
491
|
"aria-hidden": "true"
|
|
492
|
-
}, null, 2)) : r("", !0),
|
|
492
|
+
}, null, 2)) : r("", !0), _(e) ? (v(), i("span", ze, w(p(e)), 1)) : (v(), i("span", Be, w(p(e)), 1))], 8, Re)]),
|
|
493
493
|
_: 1
|
|
494
494
|
}, 8, [
|
|
495
495
|
"options",
|
|
@@ -498,9 +498,79 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
498
498
|
"block",
|
|
499
499
|
"disabled",
|
|
500
500
|
"aria-label"
|
|
501
|
-
])], 8,
|
|
501
|
+
])], 8, Ie));
|
|
502
|
+
}
|
|
503
|
+
}), He = {
|
|
504
|
+
key: 2,
|
|
505
|
+
class: "ml-ribbon-item-host__label"
|
|
506
|
+
}, Ue = /* @__PURE__ */ l({
|
|
507
|
+
__name: "RibbonToggleButton",
|
|
508
|
+
props: {
|
|
509
|
+
id: {},
|
|
510
|
+
label: { default: "" },
|
|
511
|
+
modelValue: {
|
|
512
|
+
type: Boolean,
|
|
513
|
+
default: !1
|
|
514
|
+
},
|
|
515
|
+
disabled: {
|
|
516
|
+
type: Boolean,
|
|
517
|
+
default: !1
|
|
518
|
+
},
|
|
519
|
+
hideLabel: {
|
|
520
|
+
type: Boolean,
|
|
521
|
+
default: !1
|
|
522
|
+
},
|
|
523
|
+
activeIcon: { default: void 0 },
|
|
524
|
+
inactiveIcon: { default: void 0 },
|
|
525
|
+
activeLabel: { default: void 0 },
|
|
526
|
+
inactiveLabel: { default: void 0 }
|
|
527
|
+
},
|
|
528
|
+
emits: ["change"],
|
|
529
|
+
setup(e, { emit: a }) {
|
|
530
|
+
function o(e) {
|
|
531
|
+
return !e || typeof e == "string" ? null : e;
|
|
532
|
+
}
|
|
533
|
+
function s(e) {
|
|
534
|
+
return typeof e != "string" || e.trim().length === 0 ? null : e;
|
|
535
|
+
}
|
|
536
|
+
let c = e, l = a, u = b(!!c.modelValue);
|
|
537
|
+
E(() => c.modelValue, (e) => {
|
|
538
|
+
u.value = !!e;
|
|
539
|
+
}, { immediate: !0 });
|
|
540
|
+
let d = t(() => u.value), f = t(() => d.value ? c.activeIcon ?? c.inactiveIcon : c.inactiveIcon ?? c.activeIcon), p = t(() => o(f.value)), h = t(() => p.value ? null : s(f.value)), g = t(() => (d.value ? c.activeLabel?.trim() : c.inactiveLabel?.trim()) || c.label?.trim() || c.id), _ = t(() => !c.hideLabel && g.value.length > 0);
|
|
541
|
+
function y() {
|
|
542
|
+
if (c.disabled) return;
|
|
543
|
+
let e = !u.value;
|
|
544
|
+
u.value = e, l("change", e);
|
|
545
|
+
}
|
|
546
|
+
return (t, a) => (v(), n(T(k), {
|
|
547
|
+
class: m(["ml-ribbon-toggle", { "is-active": d.value }]),
|
|
548
|
+
type: "default",
|
|
549
|
+
disabled: e.disabled,
|
|
550
|
+
"aria-label": g.value,
|
|
551
|
+
"aria-pressed": String(d.value),
|
|
552
|
+
onClick: y
|
|
553
|
+
}, {
|
|
554
|
+
default: D(() => [p.value ? (v(), n(T(I), {
|
|
555
|
+
key: 0,
|
|
556
|
+
class: "ml-ribbon-item-host__icon"
|
|
557
|
+
}, {
|
|
558
|
+
default: D(() => [(v(), n(C(p.value)))]),
|
|
559
|
+
_: 1
|
|
560
|
+
})) : h.value ? (v(), i("i", {
|
|
561
|
+
key: 1,
|
|
562
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", h.value]),
|
|
563
|
+
"aria-hidden": "true"
|
|
564
|
+
}, null, 2)) : r("", !0), _.value ? (v(), i("span", He, w(g.value), 1)) : r("", !0)]),
|
|
565
|
+
_: 1
|
|
566
|
+
}, 8, [
|
|
567
|
+
"class",
|
|
568
|
+
"disabled",
|
|
569
|
+
"aria-label",
|
|
570
|
+
"aria-pressed"
|
|
571
|
+
]));
|
|
502
572
|
}
|
|
503
|
-
}),
|
|
573
|
+
}), We = ["data-template-id", "aria-disabled"], Ge = /* @__PURE__ */ l({
|
|
504
574
|
__name: "RibbonTemplateItem",
|
|
505
575
|
props: {
|
|
506
576
|
id: {},
|
|
@@ -508,25 +578,25 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
508
578
|
disabled: { type: Boolean }
|
|
509
579
|
},
|
|
510
580
|
setup(e) {
|
|
511
|
-
return (t, n) => (
|
|
581
|
+
return (t, n) => (v(), i("div", {
|
|
512
582
|
class: "ml-ribbon-template-item",
|
|
513
583
|
"data-template-id": e.id,
|
|
514
584
|
"aria-disabled": e.disabled
|
|
515
|
-
}, [
|
|
585
|
+
}, [S(t.$slots, "default", {
|
|
516
586
|
item: e.item,
|
|
517
587
|
disabled: e.disabled
|
|
518
|
-
}, () => [a("span", null,
|
|
588
|
+
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8, We));
|
|
519
589
|
}
|
|
520
|
-
}),
|
|
590
|
+
}), Ke = ["data-item-id"], qe = {
|
|
521
591
|
key: 0,
|
|
522
592
|
class: "ml-ribbon-item-host__keytip"
|
|
523
|
-
},
|
|
593
|
+
}, Je = { class: "ml-ribbon-item-host__content" }, Ye = { class: "ml-ribbon-item-host__text-row" }, Xe = {
|
|
524
594
|
key: 0,
|
|
525
595
|
class: "ml-ribbon-item-host__label"
|
|
526
|
-
},
|
|
596
|
+
}, Ze = { class: "ml-ribbon-dropdown-item__content" }, Qe = { class: "ml-ribbon-dropdown-item__label" }, $e = {
|
|
527
597
|
key: 2,
|
|
528
598
|
class: "ml-ribbon-item-host__label"
|
|
529
|
-
},
|
|
599
|
+
}, et = /* @__PURE__ */ l({
|
|
530
600
|
__name: "RibbonItemHost",
|
|
531
601
|
props: {
|
|
532
602
|
id: {},
|
|
@@ -536,122 +606,146 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
536
606
|
},
|
|
537
607
|
emits: ["item-click"],
|
|
538
608
|
setup(o, { emit: l }) {
|
|
539
|
-
let d = o,
|
|
609
|
+
let d = o, p = l, h = u(ue, null), g = t(() => Array.isArray(d.item.props?.options) ? d.item.props.options : []), _ = ie("size", ""), y = t(() => _.value || "default"), ee = t(() => `ml-ribbon-dropdown-menu ml-ribbon-popper ml-ribbon-popper--size-${y.value}`), E = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${y.value}`), A = t(() => d.item.props?.icon || (typeof d.item.icon == "string" || !d.item.icon ? null : d.item.icon)), te = t(() => {
|
|
540
610
|
let e = d.item.props?.icon;
|
|
541
611
|
return typeof e == "string" && e.trim().length > 0 ? e : typeof d.item.icon == "string" && d.item.icon.trim().length > 0 ? d.item.icon : null;
|
|
542
|
-
}),
|
|
612
|
+
}), N = t(() => d.item.hideLabel !== !0), re = t(() => d.item.label || d.item.id), R = t(() => d.item.keyTip?.trim().toUpperCase() ?? ""), B = t(() => d.item.props?.syncLabelWithSelection === !0), V = b(!1), ae = b(void 0), U = t(() => g.value.find((e) => Se(e) === ae.value) ?? null), se = t(() => {
|
|
543
613
|
let e = U.value;
|
|
544
|
-
if (e &&
|
|
545
|
-
let t =
|
|
614
|
+
if (e && B.value) {
|
|
615
|
+
let t = Ce(e);
|
|
546
616
|
if (t) return t;
|
|
547
617
|
}
|
|
548
618
|
return d.item.label ?? d.item.id;
|
|
549
|
-
}),
|
|
619
|
+
}), ce = t(() => {
|
|
550
620
|
if (U.value) {
|
|
551
|
-
let e =
|
|
621
|
+
let e = be(U.value);
|
|
552
622
|
if (e) return e;
|
|
553
623
|
}
|
|
554
|
-
return
|
|
555
|
-
}),
|
|
624
|
+
return A.value;
|
|
625
|
+
}), le = t(() => {
|
|
556
626
|
if (U.value) {
|
|
557
|
-
let e =
|
|
627
|
+
let e = xe(U.value);
|
|
558
628
|
if (e) return e;
|
|
559
629
|
}
|
|
560
|
-
return
|
|
561
|
-
}),
|
|
562
|
-
if (!
|
|
563
|
-
let e =
|
|
564
|
-
return e ?
|
|
565
|
-
}),
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
630
|
+
return ce.value ? null : te.value;
|
|
631
|
+
}), W = t(() => {
|
|
632
|
+
if (!h?.keyTipsOpen.value || h?.disabled.value || !R.value) return !1;
|
|
633
|
+
let e = h.keyTipsSequence.value.toLowerCase();
|
|
634
|
+
return e ? R.value.toLowerCase().startsWith(e) : !0;
|
|
635
|
+
}), G = t(() => d.item.disabled === !0 || h?.disabled.value === !0), K = t(() => d.item.props?.modelValue), q = t(() => d.item.props?.activeLabel), de = t(() => d.item.props?.inactiveLabel), J = t(() => {
|
|
636
|
+
let e = d.item.props?.component;
|
|
637
|
+
return !e || typeof e == "string" ? null : e;
|
|
638
|
+
}), Y = t(() => {
|
|
639
|
+
let e = d.item.props?.componentProps;
|
|
640
|
+
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
641
|
+
});
|
|
642
|
+
function X() {
|
|
643
|
+
G.value || p("item-click", d.id);
|
|
644
|
+
}
|
|
645
|
+
function fe(e) {
|
|
646
|
+
if (G.value) {
|
|
647
|
+
V.value = !1;
|
|
572
648
|
return;
|
|
573
649
|
}
|
|
574
|
-
|
|
650
|
+
V.value = e;
|
|
575
651
|
}
|
|
576
|
-
function
|
|
577
|
-
|
|
652
|
+
function pe(e) {
|
|
653
|
+
G.value || (ae.value = e, ge(e), V.value = !1);
|
|
578
654
|
}
|
|
579
|
-
function
|
|
580
|
-
|
|
655
|
+
function me() {
|
|
656
|
+
G.value || (V.value = !V.value);
|
|
581
657
|
}
|
|
582
|
-
function
|
|
583
|
-
if (
|
|
658
|
+
function he() {
|
|
659
|
+
if (G.value) return;
|
|
584
660
|
let e = U.value;
|
|
585
661
|
if (!e) {
|
|
586
|
-
|
|
662
|
+
X();
|
|
587
663
|
return;
|
|
588
664
|
}
|
|
589
|
-
|
|
665
|
+
ge(Se(e));
|
|
590
666
|
}
|
|
591
|
-
function
|
|
667
|
+
function ge(e) {
|
|
592
668
|
if (typeof e == "string" || typeof e == "number") {
|
|
593
|
-
|
|
669
|
+
p("item-click", String(e));
|
|
594
670
|
return;
|
|
595
671
|
}
|
|
596
|
-
|
|
672
|
+
X();
|
|
597
673
|
}
|
|
598
|
-
function
|
|
599
|
-
if (!
|
|
674
|
+
function _e(e) {
|
|
675
|
+
if (!G.value) {
|
|
600
676
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
601
|
-
|
|
677
|
+
p("item-click", String(e));
|
|
602
678
|
return;
|
|
603
679
|
}
|
|
604
|
-
|
|
680
|
+
X();
|
|
605
681
|
}
|
|
606
682
|
}
|
|
607
|
-
function
|
|
608
|
-
if (
|
|
683
|
+
function ve(e) {
|
|
684
|
+
if (G.value) return;
|
|
685
|
+
let t = e ? d.item.props?.activeValue : d.item.props?.inactiveValue;
|
|
686
|
+
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
687
|
+
p("item-click", String(t));
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
p("item-click", String(e));
|
|
691
|
+
}
|
|
692
|
+
function ye(e) {
|
|
693
|
+
if (!G.value) {
|
|
609
694
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
610
|
-
|
|
695
|
+
p("item-click", String(e));
|
|
611
696
|
return;
|
|
612
697
|
}
|
|
613
|
-
|
|
698
|
+
X();
|
|
614
699
|
}
|
|
615
700
|
}
|
|
616
|
-
function
|
|
701
|
+
function Z(e) {
|
|
702
|
+
if (!G.value) {
|
|
703
|
+
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
704
|
+
p("item-click", String(e));
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
X();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
function be(e) {
|
|
617
711
|
if (!e || typeof e != "object") return null;
|
|
618
712
|
let t = e.icon;
|
|
619
713
|
return !t || typeof t == "string" ? null : t;
|
|
620
714
|
}
|
|
621
|
-
function
|
|
715
|
+
function xe(e) {
|
|
622
716
|
if (!e || typeof e != "object") return null;
|
|
623
717
|
let t = e.icon;
|
|
624
718
|
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
625
719
|
}
|
|
626
|
-
function
|
|
720
|
+
function Se(e) {
|
|
627
721
|
if (!(!e || typeof e != "object")) return e.value;
|
|
628
722
|
}
|
|
629
|
-
function
|
|
723
|
+
function Ce(e) {
|
|
630
724
|
if (!e || typeof e != "object") return;
|
|
631
725
|
let t = e.label;
|
|
632
726
|
return typeof t == "string" ? t : void 0;
|
|
633
727
|
}
|
|
634
|
-
return (t, l) => (
|
|
635
|
-
class:
|
|
728
|
+
return (t, l) => (v(), i("div", {
|
|
729
|
+
class: m(["ml-ribbon-item-host", [
|
|
636
730
|
`is-${o.item.size ?? "medium"}`,
|
|
637
731
|
`type-${o.item.type}`,
|
|
638
732
|
{ "is-label-hidden": o.item.hideLabel === !0 }
|
|
639
733
|
]]),
|
|
640
734
|
"data-item-id": o.id,
|
|
641
735
|
role: "group"
|
|
642
|
-
}, [
|
|
736
|
+
}, [W.value ? (v(), i("span", qe, w(R.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Fe, {
|
|
643
737
|
key: 1,
|
|
644
738
|
id: o.item.id,
|
|
645
739
|
label: o.item.label ?? "",
|
|
646
740
|
options: o.item.props?.options ?? [],
|
|
647
|
-
disabled:
|
|
648
|
-
onChange:
|
|
741
|
+
disabled: G.value,
|
|
742
|
+
onChange: ye
|
|
649
743
|
}, null, 8, [
|
|
650
744
|
"id",
|
|
651
745
|
"label",
|
|
652
746
|
"options",
|
|
653
747
|
"disabled"
|
|
654
|
-
])) : o.item.type === "segmented" ? (
|
|
748
|
+
])) : o.item.type === "segmented" ? (v(), n(Ve, {
|
|
655
749
|
key: 2,
|
|
656
750
|
id: o.item.id,
|
|
657
751
|
label: o.item.label ?? o.item.id,
|
|
@@ -659,9 +753,9 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
659
753
|
"model-value": o.item.props?.modelValue,
|
|
660
754
|
direction: o.item.props?.direction ?? "horizontal",
|
|
661
755
|
block: o.item.props?.block === !0,
|
|
662
|
-
disabled:
|
|
756
|
+
disabled: G.value,
|
|
663
757
|
"hide-label": o.item.hideLabel === !0,
|
|
664
|
-
onChange:
|
|
758
|
+
onChange: _e
|
|
665
759
|
}, null, 8, [
|
|
666
760
|
"id",
|
|
667
761
|
"label",
|
|
@@ -671,135 +765,167 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
671
765
|
"block",
|
|
672
766
|
"disabled",
|
|
673
767
|
"hide-label"
|
|
674
|
-
])) : o.item.type === "
|
|
768
|
+
])) : o.item.type === "toggle" ? (v(), n(Ue, {
|
|
675
769
|
key: 3,
|
|
676
770
|
id: o.item.id,
|
|
771
|
+
label: o.item.label ?? o.item.id,
|
|
772
|
+
"model-value": K.value,
|
|
773
|
+
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
774
|
+
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
775
|
+
"active-label": q.value,
|
|
776
|
+
"inactive-label": de.value,
|
|
777
|
+
disabled: G.value,
|
|
778
|
+
"hide-label": o.item.hideLabel === !0,
|
|
779
|
+
onChange: ve
|
|
780
|
+
}, null, 8, [
|
|
781
|
+
"id",
|
|
782
|
+
"label",
|
|
783
|
+
"model-value",
|
|
784
|
+
"active-icon",
|
|
785
|
+
"inactive-icon",
|
|
786
|
+
"active-label",
|
|
787
|
+
"inactive-label",
|
|
788
|
+
"disabled",
|
|
789
|
+
"hide-label"
|
|
790
|
+
])) : o.item.type === "gallery" ? (v(), n(Ne, {
|
|
791
|
+
key: 4,
|
|
792
|
+
id: o.item.id,
|
|
677
793
|
label: o.item.label ?? "",
|
|
678
794
|
categories: o.item.props?.categories ?? [],
|
|
679
795
|
"preview-fallback": d.galleryPreviewFallback,
|
|
680
|
-
disabled:
|
|
681
|
-
onSelect:
|
|
796
|
+
disabled: G.value,
|
|
797
|
+
onSelect: X
|
|
682
798
|
}, null, 8, [
|
|
683
799
|
"id",
|
|
684
800
|
"label",
|
|
685
801
|
"categories",
|
|
686
802
|
"preview-fallback",
|
|
687
803
|
"disabled"
|
|
688
|
-
])) : o.item.type === "template" ? (
|
|
689
|
-
key:
|
|
804
|
+
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(Ge, {
|
|
805
|
+
key: 5,
|
|
690
806
|
id: o.item.id,
|
|
691
807
|
item: o.item,
|
|
692
|
-
disabled:
|
|
808
|
+
disabled: G.value
|
|
693
809
|
}, {
|
|
694
|
-
default: D(() => [
|
|
810
|
+
default: D(() => [J.value ? (v(), n(C(J.value), f({ key: 0 }, Y.value, {
|
|
695
811
|
item: o.item,
|
|
696
|
-
|
|
812
|
+
"group-id": o.groupId,
|
|
813
|
+
disabled: G.value,
|
|
814
|
+
"emit-item-click": Z
|
|
815
|
+
}), null, 16, [
|
|
816
|
+
"item",
|
|
817
|
+
"group-id",
|
|
818
|
+
"disabled"
|
|
819
|
+
])) : S(t.$slots, "template", {
|
|
820
|
+
key: 1,
|
|
821
|
+
item: o.item,
|
|
822
|
+
disabled: G.value
|
|
697
823
|
})]),
|
|
698
824
|
_: 3
|
|
699
825
|
}, 8, [
|
|
700
826
|
"id",
|
|
701
827
|
"item",
|
|
702
828
|
"disabled"
|
|
703
|
-
])) : o.item.type === "dropdown" ? (
|
|
704
|
-
key:
|
|
829
|
+
])) : o.item.type === "dropdown" ? (v(), n(T(P), {
|
|
830
|
+
key: 6,
|
|
705
831
|
trigger: "click",
|
|
706
|
-
disabled:
|
|
707
|
-
"popper-class":
|
|
708
|
-
onVisibleChange:
|
|
709
|
-
onCommand:
|
|
832
|
+
disabled: G.value,
|
|
833
|
+
"popper-class": ee.value,
|
|
834
|
+
onVisibleChange: fe,
|
|
835
|
+
onCommand: pe
|
|
710
836
|
}, {
|
|
711
|
-
dropdown: D(() => [c(T(
|
|
712
|
-
default: D(() => [(
|
|
837
|
+
dropdown: D(() => [c(T(ne), null, {
|
|
838
|
+
default: D(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(T(F), {
|
|
713
839
|
key: String(e.value),
|
|
714
840
|
command: e.value
|
|
715
841
|
}, {
|
|
716
|
-
default: D(() => [a("span",
|
|
842
|
+
default: D(() => [a("span", Ze, [be(e) ? (v(), n(T(I), {
|
|
717
843
|
key: 0,
|
|
718
844
|
class: "ml-ribbon-dropdown-item__icon"
|
|
719
845
|
}, {
|
|
720
|
-
default: D(() => [(
|
|
846
|
+
default: D(() => [(v(), n(C(be(e))))]),
|
|
721
847
|
_: 2
|
|
722
|
-
}, 1024)) :
|
|
848
|
+
}, 1024)) : xe(e) ? (v(), i("i", {
|
|
723
849
|
key: 1,
|
|
724
|
-
class:
|
|
850
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", xe(e)]),
|
|
725
851
|
"aria-hidden": "true"
|
|
726
|
-
}, null, 2)) : r("", !0), a("span",
|
|
852
|
+
}, null, 2)) : r("", !0), a("span", Qe, w(e.label), 1)])]),
|
|
727
853
|
_: 2
|
|
728
854
|
}, 1032, ["command"]))), 128))]),
|
|
729
855
|
_: 1
|
|
730
856
|
})]),
|
|
731
|
-
default: D(() => [c(T(
|
|
857
|
+
default: D(() => [c(T(k), {
|
|
732
858
|
type: "default",
|
|
733
|
-
disabled:
|
|
859
|
+
disabled: G.value,
|
|
734
860
|
"aria-label": re.value,
|
|
735
|
-
onClick:
|
|
861
|
+
onClick: me
|
|
736
862
|
}, {
|
|
737
|
-
default: D(() => [a("span",
|
|
863
|
+
default: D(() => [a("span", Je, [ce.value ? (v(), i("span", {
|
|
738
864
|
key: 0,
|
|
739
865
|
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary",
|
|
740
|
-
onClick:
|
|
866
|
+
onClick: O(he, ["stop"])
|
|
741
867
|
}, [c(T(I), null, {
|
|
742
|
-
default: D(() => [(
|
|
868
|
+
default: D(() => [(v(), n(C(ce.value)))]),
|
|
743
869
|
_: 1
|
|
744
|
-
})])) :
|
|
870
|
+
})])) : le.value ? (v(), i("span", {
|
|
745
871
|
key: 1,
|
|
746
872
|
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class ml-ribbon-item-host__icon--dropdown-primary",
|
|
747
|
-
onClick:
|
|
873
|
+
onClick: O(he, ["stop"])
|
|
748
874
|
}, [a("i", {
|
|
749
|
-
class:
|
|
875
|
+
class: m(le.value),
|
|
750
876
|
"aria-hidden": "true"
|
|
751
|
-
}, null, 2)])) : r("", !0), a("span",
|
|
752
|
-
default: D(() => [(
|
|
877
|
+
}, null, 2)])) : r("", !0), a("span", Ye, [N.value ? (v(), i("span", Xe, w(se.value), 1)) : r("", !0), c(T(I), { class: m(["ml-ribbon-item-host__dropdown-arrow", { "is-open": V.value }]) }, {
|
|
878
|
+
default: D(() => [(v(), n(C(V.value ? T(oe) : T(H))))]),
|
|
753
879
|
_: 1
|
|
754
880
|
}, 8, ["class"])])])]),
|
|
755
881
|
_: 1
|
|
756
882
|
}, 8, ["disabled", "aria-label"])]),
|
|
757
883
|
_: 1
|
|
758
|
-
}, 8, ["disabled", "popper-class"])) : o.item.type === "checkbox" ? (
|
|
759
|
-
key:
|
|
760
|
-
disabled:
|
|
761
|
-
onChange:
|
|
884
|
+
}, 8, ["disabled", "popper-class"])) : o.item.type === "checkbox" ? (v(), n(T(j), {
|
|
885
|
+
key: 7,
|
|
886
|
+
disabled: G.value,
|
|
887
|
+
onChange: X
|
|
762
888
|
}, {
|
|
763
|
-
default: D(() => [s(
|
|
889
|
+
default: D(() => [s(w(o.item.label), 1)]),
|
|
764
890
|
_: 1
|
|
765
|
-
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (
|
|
766
|
-
key: 7,
|
|
767
|
-
disabled: q.value,
|
|
768
|
-
onChange: J
|
|
769
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (_(), n(T(R), {
|
|
891
|
+
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(T(M), {
|
|
770
892
|
key: 8,
|
|
771
|
-
disabled:
|
|
893
|
+
disabled: G.value,
|
|
894
|
+
onChange: X
|
|
895
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(T(z), {
|
|
896
|
+
key: 9,
|
|
897
|
+
disabled: G.value,
|
|
772
898
|
"popper-class": E.value,
|
|
773
899
|
style: { width: "92px" },
|
|
774
|
-
onChange:
|
|
900
|
+
onChange: X
|
|
775
901
|
}, {
|
|
776
|
-
default: D(() => [(
|
|
902
|
+
default: D(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(T(L), {
|
|
777
903
|
key: String(e.value),
|
|
778
904
|
label: String(e.label),
|
|
779
905
|
value: e.value
|
|
780
906
|
}, null, 8, ["label", "value"]))), 128))]),
|
|
781
907
|
_: 1
|
|
782
|
-
}, 8, ["disabled", "popper-class"])) : (
|
|
783
|
-
key:
|
|
784
|
-
disabled:
|
|
908
|
+
}, 8, ["disabled", "popper-class"])) : (v(), n(T(k), {
|
|
909
|
+
key: 10,
|
|
910
|
+
disabled: G.value,
|
|
785
911
|
"aria-label": re.value,
|
|
786
|
-
onClick:
|
|
912
|
+
onClick: X
|
|
787
913
|
}, {
|
|
788
|
-
default: D(() => [
|
|
914
|
+
default: D(() => [A.value ? (v(), n(T(I), {
|
|
789
915
|
key: 0,
|
|
790
916
|
class: "ml-ribbon-item-host__icon"
|
|
791
917
|
}, {
|
|
792
|
-
default: D(() => [(
|
|
918
|
+
default: D(() => [(v(), n(C(A.value)))]),
|
|
793
919
|
_: 1
|
|
794
|
-
})) : te.value ? (
|
|
920
|
+
})) : te.value ? (v(), i("i", {
|
|
795
921
|
key: 1,
|
|
796
|
-
class:
|
|
922
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", te.value]),
|
|
797
923
|
"aria-hidden": "true"
|
|
798
|
-
}, null, 2)) : r("", !0),
|
|
924
|
+
}, null, 2)) : r("", !0), N.value ? (v(), i("span", $e, w(o.item.label ?? o.item.id), 1)) : r("", !0)]),
|
|
799
925
|
_: 1
|
|
800
|
-
}, 8, ["disabled", "aria-label"]))], 10,
|
|
926
|
+
}, 8, ["disabled", "aria-label"]))], 10, Ke));
|
|
801
927
|
}
|
|
802
|
-
}),
|
|
928
|
+
}), tt = /* @__PURE__ */ l({
|
|
803
929
|
__name: "RibbonGroupContent",
|
|
804
930
|
props: {
|
|
805
931
|
group: {},
|
|
@@ -808,13 +934,13 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
808
934
|
emits: ["item-click"],
|
|
809
935
|
setup(t, { emit: r }) {
|
|
810
936
|
let a = t, o = r;
|
|
811
|
-
return (t, r) => (
|
|
937
|
+
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, {
|
|
812
938
|
id: t.id,
|
|
813
939
|
key: t.id,
|
|
814
940
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
815
941
|
rows: t.rows
|
|
816
942
|
}, {
|
|
817
|
-
default: D(() => [(
|
|
943
|
+
default: D(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(et, {
|
|
818
944
|
id: e.id,
|
|
819
945
|
key: e.id,
|
|
820
946
|
item: e,
|
|
@@ -837,15 +963,15 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
837
963
|
"rows"
|
|
838
964
|
]))), 128))], 2));
|
|
839
965
|
}
|
|
840
|
-
}),
|
|
966
|
+
}), nt = ["data-priority"], rt = { class: "ml-ribbon-group__body" }, it = { class: "ml-ribbon-group__footer" }, at = { class: "ml-ribbon-group__title" }, ot = [
|
|
841
967
|
"aria-label",
|
|
842
968
|
"aria-expanded",
|
|
843
969
|
"disabled"
|
|
844
|
-
],
|
|
970
|
+
], st = { class: "ml-ribbon-group__overflow-content" }, ct = [
|
|
845
971
|
"aria-label",
|
|
846
972
|
"aria-expanded",
|
|
847
973
|
"disabled"
|
|
848
|
-
],
|
|
974
|
+
], lt = { class: "ml-ribbon-group__overflow-content" }, ut = /* @__PURE__ */ l({
|
|
849
975
|
__name: "RibbonGroup",
|
|
850
976
|
props: {
|
|
851
977
|
id: {},
|
|
@@ -863,15 +989,15 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
863
989
|
},
|
|
864
990
|
emits: ["item-click"],
|
|
865
991
|
setup(e, { emit: o }) {
|
|
866
|
-
let s = e, l = o, d = u(
|
|
992
|
+
let s = e, l = o, d = u(ue, null), f = t(() => s.autoWidth !== !1), h = t(() => d?.disabled.value === !0), y = b(null), x = b([]), ee = b(null), O = b(null), A = b(0), j = b(0), M = ie("size", ""), te = t(() => M.value || "default"), N = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${te.value}`), P = t(() => ({ modifiers: [{
|
|
867
993
|
name: "offset",
|
|
868
994
|
options: { offset: [A.value, 8] }
|
|
869
995
|
}] })), F = t(() => ({ modifiers: [{
|
|
870
996
|
name: "offset",
|
|
871
997
|
options: { offset: [j.value, 8] }
|
|
872
|
-
}] })), ne = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), L = t(() =>
|
|
873
|
-
if (!s.groupModel || !
|
|
874
|
-
let e = new Set(
|
|
998
|
+
}] })), ne = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), L = t(() => x.value.length > 0), R = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), z = b(!1), B = b(!1), V = t(() => {
|
|
999
|
+
if (!s.groupModel || !x.value.length) return null;
|
|
1000
|
+
let e = new Set(x.value), t = s.groupModel.collections?.map((t) => ({
|
|
875
1001
|
...t,
|
|
876
1002
|
items: t.items.filter((t) => e.has(t.id))
|
|
877
1003
|
})).filter((e) => e.items.length > 0) ?? [];
|
|
@@ -879,7 +1005,7 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
879
1005
|
...s.groupModel,
|
|
880
1006
|
collections: t
|
|
881
1007
|
} : null;
|
|
882
|
-
}),
|
|
1008
|
+
}), ae = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
883
1009
|
id: `${s.groupModel.id}-footer-menu`,
|
|
884
1010
|
title: "",
|
|
885
1011
|
orientation: "row",
|
|
@@ -889,15 +1015,15 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
889
1015
|
items: s.groupModel.footerMenuItems
|
|
890
1016
|
}]
|
|
891
1017
|
} : null);
|
|
892
|
-
function
|
|
893
|
-
let e =
|
|
1018
|
+
function U() {
|
|
1019
|
+
let e = y.value?.querySelector(".ml-ribbon-group__content");
|
|
894
1020
|
if (!e) {
|
|
895
|
-
|
|
1021
|
+
x.value.length > 0 && (x.value = []);
|
|
896
1022
|
return;
|
|
897
1023
|
}
|
|
898
1024
|
let t = e.getBoundingClientRect();
|
|
899
1025
|
if (t.width <= 0 || t.height <= 0) {
|
|
900
|
-
|
|
1026
|
+
x.value.length > 0 && (x.value = []);
|
|
901
1027
|
return;
|
|
902
1028
|
}
|
|
903
1029
|
let n = [];
|
|
@@ -906,15 +1032,15 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
906
1032
|
if (!r) return;
|
|
907
1033
|
let i = e.getBoundingClientRect();
|
|
908
1034
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
909
|
-
}),
|
|
1035
|
+
}), x.value.length === n.length && x.value.every((e, t) => e === n[t]) || (x.value = n);
|
|
910
1036
|
}
|
|
911
|
-
function
|
|
912
|
-
|
|
913
|
-
|
|
1037
|
+
function se() {
|
|
1038
|
+
p(() => {
|
|
1039
|
+
X(), ce(), W(), U();
|
|
914
1040
|
});
|
|
915
1041
|
}
|
|
916
|
-
function
|
|
917
|
-
let e =
|
|
1042
|
+
function ce() {
|
|
1043
|
+
let e = y.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
|
|
918
1044
|
if (!e || !t) {
|
|
919
1045
|
A.value !== 0 && (A.value = 0);
|
|
920
1046
|
return;
|
|
@@ -922,8 +1048,8 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
922
1048
|
let n = Math.round(e.left - t.left);
|
|
923
1049
|
A.value !== n && (A.value = n);
|
|
924
1050
|
}
|
|
925
|
-
function
|
|
926
|
-
let e =
|
|
1051
|
+
function W() {
|
|
1052
|
+
let e = y.value?.getBoundingClientRect(), t = O.value?.getBoundingClientRect();
|
|
927
1053
|
if (!e || !t) {
|
|
928
1054
|
j.value !== 0 && (j.value = 0);
|
|
929
1055
|
return;
|
|
@@ -931,73 +1057,73 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
931
1057
|
let n = Math.round(e.left - t.left);
|
|
932
1058
|
j.value !== n && (j.value = n);
|
|
933
1059
|
}
|
|
934
|
-
function
|
|
1060
|
+
function G(e) {
|
|
935
1061
|
z.value = e;
|
|
936
1062
|
}
|
|
937
|
-
function
|
|
1063
|
+
function K(e) {
|
|
938
1064
|
B.value = e;
|
|
939
1065
|
}
|
|
940
|
-
function
|
|
941
|
-
|
|
1066
|
+
function q() {
|
|
1067
|
+
h.value || (z.value = !z.value);
|
|
942
1068
|
}
|
|
943
|
-
function
|
|
944
|
-
|
|
1069
|
+
function de() {
|
|
1070
|
+
h.value || (B.value = !B.value);
|
|
945
1071
|
}
|
|
946
|
-
let
|
|
947
|
-
function
|
|
948
|
-
if (!
|
|
949
|
-
let e =
|
|
950
|
-
|
|
1072
|
+
let J = null, Y = null;
|
|
1073
|
+
function X() {
|
|
1074
|
+
if (!J) return;
|
|
1075
|
+
let e = y.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1076
|
+
Y !== e && (Y && J.unobserve(Y), e && J.observe(e), Y = e);
|
|
951
1077
|
}
|
|
952
1078
|
return E(() => s.groupModel, () => {
|
|
953
|
-
|
|
954
|
-
}, { deep: !0 }), E(
|
|
1079
|
+
se();
|
|
1080
|
+
}, { deep: !0 }), E(h, (e) => {
|
|
955
1081
|
e && (z.value = !1, B.value = !1);
|
|
956
|
-
}), h(() => {
|
|
957
|
-
typeof ResizeObserver < "u" && (X = new ResizeObserver(() => {
|
|
958
|
-
K(), q(), oe();
|
|
959
|
-
}), b.value && X.observe(b.value), ue()), W();
|
|
960
1082
|
}), g(() => {
|
|
961
|
-
|
|
962
|
-
|
|
1083
|
+
typeof ResizeObserver < "u" && (J = new ResizeObserver(() => {
|
|
1084
|
+
ce(), W(), U();
|
|
1085
|
+
}), y.value && J.observe(y.value), X()), se();
|
|
1086
|
+
}), _(() => {
|
|
1087
|
+
J?.disconnect();
|
|
1088
|
+
}), (t, o) => (v(), i("section", {
|
|
963
1089
|
ref_key: "groupSectionRef",
|
|
964
|
-
ref:
|
|
965
|
-
class:
|
|
1090
|
+
ref: y,
|
|
1091
|
+
class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
|
|
966
1092
|
"data-priority": e.priority ?? 100
|
|
967
|
-
}, [a("div",
|
|
968
|
-
ne.value ? (
|
|
1093
|
+
}, [a("div", rt, [S(t.$slots, "default")]), a("footer", it, [
|
|
1094
|
+
ne.value ? (v(), n(T(I), {
|
|
969
1095
|
key: 0,
|
|
970
1096
|
class: "ml-ribbon-group__icon"
|
|
971
1097
|
}, {
|
|
972
|
-
default: D(() => [(
|
|
1098
|
+
default: D(() => [(v(), n(C(ne.value)))]),
|
|
973
1099
|
_: 1
|
|
974
1100
|
})) : r("", !0),
|
|
975
|
-
a("span",
|
|
976
|
-
R.value &&
|
|
1101
|
+
a("span", at, w(e.title), 1),
|
|
1102
|
+
R.value && ae.value ? (v(), n(T(re), {
|
|
977
1103
|
key: 1,
|
|
978
1104
|
trigger: "click",
|
|
979
1105
|
placement: "bottom-start",
|
|
980
|
-
disabled:
|
|
1106
|
+
disabled: h.value,
|
|
981
1107
|
"popper-class": N.value,
|
|
982
1108
|
"popper-options": F.value,
|
|
983
|
-
onShow: o[1] ||= (e) =>
|
|
984
|
-
onHide: o[2] ||= (e) =>
|
|
1109
|
+
onShow: o[1] ||= (e) => G(!0),
|
|
1110
|
+
onHide: o[2] ||= (e) => G(!1)
|
|
985
1111
|
}, {
|
|
986
1112
|
reference: D(() => [a("button", {
|
|
987
1113
|
ref_key: "footerTriggerRef",
|
|
988
|
-
ref:
|
|
1114
|
+
ref: O,
|
|
989
1115
|
type: "button",
|
|
990
|
-
class:
|
|
1116
|
+
class: m(["ml-ribbon-group__footer-trigger", { "is-open": z.value }]),
|
|
991
1117
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
992
1118
|
"aria-expanded": z.value,
|
|
993
|
-
disabled:
|
|
994
|
-
onClick:
|
|
1119
|
+
disabled: h.value,
|
|
1120
|
+
onClick: q
|
|
995
1121
|
}, [c(T(I), null, {
|
|
996
|
-
default: D(() => [(
|
|
1122
|
+
default: D(() => [(v(), n(C(z.value ? T(oe) : T(H))))]),
|
|
997
1123
|
_: 1
|
|
998
|
-
})], 10,
|
|
999
|
-
default: D(() => [a("div",
|
|
1000
|
-
group:
|
|
1124
|
+
})], 10, ot)]),
|
|
1125
|
+
default: D(() => [a("div", st, [c(tt, {
|
|
1126
|
+
group: ae.value,
|
|
1001
1127
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1002
1128
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
1003
1129
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
@@ -1007,31 +1133,31 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1007
1133
|
"popper-class",
|
|
1008
1134
|
"popper-options"
|
|
1009
1135
|
])) : r("", !0),
|
|
1010
|
-
L.value &&
|
|
1136
|
+
L.value && V.value ? (v(), n(T(re), {
|
|
1011
1137
|
key: 2,
|
|
1012
1138
|
trigger: "click",
|
|
1013
1139
|
placement: "bottom-start",
|
|
1014
|
-
disabled:
|
|
1140
|
+
disabled: h.value,
|
|
1015
1141
|
"popper-class": N.value,
|
|
1016
1142
|
"popper-options": P.value,
|
|
1017
|
-
onShow: o[4] ||= (e) =>
|
|
1018
|
-
onHide: o[5] ||= (e) =>
|
|
1143
|
+
onShow: o[4] ||= (e) => K(!0),
|
|
1144
|
+
onHide: o[5] ||= (e) => K(!1)
|
|
1019
1145
|
}, {
|
|
1020
1146
|
reference: D(() => [a("button", {
|
|
1021
1147
|
ref_key: "overflowTriggerRef",
|
|
1022
1148
|
ref: ee,
|
|
1023
1149
|
type: "button",
|
|
1024
|
-
class:
|
|
1150
|
+
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": B.value }]),
|
|
1025
1151
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1026
1152
|
"aria-expanded": B.value,
|
|
1027
|
-
disabled:
|
|
1028
|
-
onClick:
|
|
1153
|
+
disabled: h.value,
|
|
1154
|
+
onClick: de
|
|
1029
1155
|
}, [c(T(I), null, {
|
|
1030
|
-
default: D(() => [(
|
|
1156
|
+
default: D(() => [(v(), n(C(B.value ? T(oe) : T(H))))]),
|
|
1031
1157
|
_: 1
|
|
1032
|
-
})], 10,
|
|
1033
|
-
default: D(() => [a("div",
|
|
1034
|
-
group:
|
|
1158
|
+
})], 10, ct)]),
|
|
1159
|
+
default: D(() => [a("div", lt, [c(tt, {
|
|
1160
|
+
group: V.value,
|
|
1035
1161
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1036
1162
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
1037
1163
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
@@ -1041,27 +1167,27 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1041
1167
|
"popper-class",
|
|
1042
1168
|
"popper-options"
|
|
1043
1169
|
])) : r("", !0),
|
|
1044
|
-
e.showLauncherIcon ?? e.launcher ? (
|
|
1170
|
+
e.showLauncherIcon ?? e.launcher ? (v(), n(T(k), {
|
|
1045
1171
|
key: 3,
|
|
1046
1172
|
link: "",
|
|
1047
1173
|
class: "ml-ribbon-group__launcher",
|
|
1048
|
-
disabled:
|
|
1174
|
+
disabled: h.value
|
|
1049
1175
|
}, {
|
|
1050
1176
|
default: D(() => [c(T(I), null, {
|
|
1051
|
-
default: D(() => [c(T(
|
|
1177
|
+
default: D(() => [c(T(le))]),
|
|
1052
1178
|
_: 1
|
|
1053
1179
|
})]),
|
|
1054
1180
|
_: 1
|
|
1055
1181
|
}, 8, ["disabled"])) : r("", !0)
|
|
1056
|
-
])], 10,
|
|
1182
|
+
])], 10, nt));
|
|
1057
1183
|
}
|
|
1058
|
-
}),
|
|
1184
|
+
}), dt = ["inert", "aria-disabled"], ft = { class: "ml-ribbon__header" }, pt = { class: "ml-ribbon__head-left" }, mt = { class: "ml-ribbon__head-right" }, ht = {
|
|
1059
1185
|
key: 2,
|
|
1060
1186
|
class: "ml-ribbon__tabs-extra"
|
|
1061
|
-
},
|
|
1187
|
+
}, gt = ["data-active-tab"], _t = {
|
|
1062
1188
|
key: 0,
|
|
1063
1189
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1064
|
-
},
|
|
1190
|
+
}, vt = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, yt = ["aria-label", "disabled"], bt = { class: "ml-ribbon-overflow-list" }, xt = { class: "ml-ribbon-overflow-group__header" }, St = ["data-active-tab"], Ct = ["disabled"], wt = { class: "ml-ribbon-simplified-group__panel" }, Tt = 40, Et = /* @__PURE__ */ l({
|
|
1065
1191
|
__name: "Ribbon",
|
|
1066
1192
|
props: {
|
|
1067
1193
|
id: { default: "ml-ribbon-root" },
|
|
@@ -1115,36 +1241,36 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1115
1241
|
"fileMenuSelect"
|
|
1116
1242
|
],
|
|
1117
1243
|
setup(s, { expose: l, emit: u }) {
|
|
1118
|
-
function
|
|
1119
|
-
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(
|
|
1244
|
+
function f(e) {
|
|
1245
|
+
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(ee(e)) : e;
|
|
1120
1246
|
}
|
|
1121
|
-
function
|
|
1247
|
+
function h(e) {
|
|
1122
1248
|
if (!e) return;
|
|
1123
1249
|
let t = { ...e };
|
|
1124
|
-
return "icon" in t && (t.icon =
|
|
1250
|
+
return "component" in t && (t.component = f(t.component)), "icon" in t && (t.icon = f(t.icon)), "activeIcon" in t && (t.activeIcon = f(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = f(t.inactiveIcon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
|
|
1125
1251
|
if (!e || typeof e != "object") return e;
|
|
1126
1252
|
let t = e;
|
|
1127
1253
|
return "icon" in t ? {
|
|
1128
1254
|
...t,
|
|
1129
|
-
icon:
|
|
1255
|
+
icon: f(t.icon)
|
|
1130
1256
|
} : t;
|
|
1131
1257
|
})), t;
|
|
1132
1258
|
}
|
|
1133
|
-
function
|
|
1259
|
+
function O(e) {
|
|
1134
1260
|
return {
|
|
1135
1261
|
...e,
|
|
1136
|
-
icon:
|
|
1137
|
-
props:
|
|
1262
|
+
icon: f(e.icon),
|
|
1263
|
+
props: h(e.props)
|
|
1138
1264
|
};
|
|
1139
1265
|
}
|
|
1140
1266
|
function A(e) {
|
|
1141
1267
|
return {
|
|
1142
1268
|
...e,
|
|
1143
|
-
icon:
|
|
1144
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
1269
|
+
icon: f(e.icon),
|
|
1270
|
+
footerMenuItems: e.footerMenuItems?.map(O),
|
|
1145
1271
|
collections: e.collections?.map((e) => ({
|
|
1146
1272
|
...e,
|
|
1147
|
-
items: e.items?.map(
|
|
1273
|
+
items: e.items?.map(O)
|
|
1148
1274
|
}))
|
|
1149
1275
|
};
|
|
1150
1276
|
}
|
|
@@ -1169,8 +1295,8 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1169
1295
|
keyTipsEmptySequence: "No key sequence",
|
|
1170
1296
|
contextualTabDefaultTitle: "Contextual",
|
|
1171
1297
|
galleryPreviewFallback: "Preview unavailable"
|
|
1172
|
-
}, N = s, P = u, { context: F, visibleTabs: ne } =
|
|
1173
|
-
|
|
1298
|
+
}, N = s, P = u, { context: F, visibleTabs: ne } = fe(N.id, N.tabs, N.disabled, N.activeLayout ? String(N.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : N.layout, N.minimized, N.activeTab || N.tabs[0]?.id || "");
|
|
1299
|
+
y(ue, F), E(() => N.tabs, (e) => {
|
|
1174
1300
|
F.tabs.value = j(e), F.tabs.value.some((e) => e.id === F.activeTab.value) || (F.activeTab.value = F.tabs.value[0]?.id || "");
|
|
1175
1301
|
}, { deep: !0 }), E(() => N.layout, (e) => {
|
|
1176
1302
|
e !== F.layout.value && (F.layout.value = e);
|
|
@@ -1195,7 +1321,7 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1195
1321
|
}), E(F.backdropOpen, (e) => {
|
|
1196
1322
|
P(e ? "backstageOpen" : "backstageClose");
|
|
1197
1323
|
});
|
|
1198
|
-
let L = t(() => ne.value.find((e) => e.id === F.activeTab.value)), R = t(() => L.value?.groups?.filter((e) => e.visible !== !1) ?? []),
|
|
1324
|
+
let L = t(() => ne.value.find((e) => e.id === F.activeTab.value)), R = t(() => L.value?.groups?.filter((e) => e.visible !== !1) ?? []), z = b(null), H = b(/* @__PURE__ */ new Set()), oe = b({}), le = ie("size", ""), W = t(() => N.size || le.value || "default"), G = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${W.value}`), K = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${W.value}`), q = t(() => ({
|
|
1199
1325
|
layoutSwitcherTooltip: N.texts.layoutSwitcherTooltip || M.layoutSwitcherTooltip,
|
|
1200
1326
|
minimizeTooltip: N.texts.minimizeTooltip || M.minimizeTooltip,
|
|
1201
1327
|
keyTipsToggleText: N.texts.keyTipsToggleText || M.keyTipsToggleText,
|
|
@@ -1210,17 +1336,17 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1210
1336
|
keyTipsEmptySequence: N.texts.keyTipsEmptySequence || M.keyTipsEmptySequence,
|
|
1211
1337
|
contextualTabDefaultTitle: N.texts.contextualTabDefaultTitle || M.contextualTabDefaultTitle,
|
|
1212
1338
|
galleryPreviewFallback: N.texts.galleryPreviewFallback || M.galleryPreviewFallback
|
|
1213
|
-
})),
|
|
1214
|
-
if (!
|
|
1215
|
-
let e =
|
|
1216
|
-
let n =
|
|
1339
|
+
})), de = t(() => F.minimized.value ? U : ae), J = t(() => R.value.filter((e) => !H.value.has(e.id))), Y = t(() => R.value.filter((e) => H.value.has(e.id))), X = t(() => {
|
|
1340
|
+
if (!Y.value.length) return 220;
|
|
1341
|
+
let e = Y.value.reduce((e, t) => {
|
|
1342
|
+
let n = oe.value[t.id] ?? he(t);
|
|
1217
1343
|
return Math.max(e, n);
|
|
1218
1344
|
}, 0), t = Math.ceil(e + 40);
|
|
1219
1345
|
return Math.max(220, Math.min(720, t));
|
|
1220
1346
|
});
|
|
1221
|
-
function
|
|
1347
|
+
function pe(e) {
|
|
1222
1348
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
1223
|
-
...
|
|
1349
|
+
...O(e),
|
|
1224
1350
|
size: "medium"
|
|
1225
1351
|
})));
|
|
1226
1352
|
return {
|
|
@@ -1233,10 +1359,10 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1233
1359
|
}]
|
|
1234
1360
|
};
|
|
1235
1361
|
}
|
|
1236
|
-
function
|
|
1362
|
+
function me(e) {
|
|
1237
1363
|
return e.priority ?? 100;
|
|
1238
1364
|
}
|
|
1239
|
-
function
|
|
1365
|
+
function he(e) {
|
|
1240
1366
|
return e.autoWidth === !1 ? 190 : 140;
|
|
1241
1367
|
}
|
|
1242
1368
|
function ge(e) {
|
|
@@ -1248,52 +1374,52 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1248
1374
|
r > 0 && (t[n] = r);
|
|
1249
1375
|
}), t;
|
|
1250
1376
|
}
|
|
1251
|
-
function
|
|
1377
|
+
function ve(e) {
|
|
1252
1378
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
1253
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
1379
|
+
return Number.isFinite(t) && t > 0 ? t : Tt;
|
|
1254
1380
|
}
|
|
1255
|
-
function
|
|
1381
|
+
function ye() {
|
|
1256
1382
|
if (F.layout.value !== "classic") {
|
|
1257
1383
|
H.value = /* @__PURE__ */ new Set();
|
|
1258
1384
|
return;
|
|
1259
1385
|
}
|
|
1260
|
-
let e =
|
|
1386
|
+
let e = z.value;
|
|
1261
1387
|
if (!e) return;
|
|
1262
1388
|
let t = R.value;
|
|
1263
1389
|
if (!t.length) {
|
|
1264
1390
|
H.value = /* @__PURE__ */ new Set();
|
|
1265
1391
|
return;
|
|
1266
1392
|
}
|
|
1267
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
1268
|
-
|
|
1269
|
-
...
|
|
1393
|
+
let n = Math.round(e.getBoundingClientRect().width), r = ve(e), i = ge(e);
|
|
1394
|
+
oe.value = {
|
|
1395
|
+
...oe.value,
|
|
1270
1396
|
...i
|
|
1271
1397
|
};
|
|
1272
1398
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
1273
1399
|
group: e,
|
|
1274
1400
|
index: t
|
|
1275
1401
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
1276
|
-
let n =
|
|
1402
|
+
let n = me(t.group) - me(e.group);
|
|
1277
1403
|
return n === 0 ? t.index - e.index : n;
|
|
1278
|
-
}), l = (e) => i[e.id] ??
|
|
1404
|
+
}), l = (e) => i[e.id] ?? he(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;
|
|
1279
1405
|
for (; f(s) > n && p < c.length;) {
|
|
1280
1406
|
let e = c[p].group;
|
|
1281
1407
|
s.add(e.id), p += 1;
|
|
1282
1408
|
}
|
|
1283
1409
|
H.value = s;
|
|
1284
1410
|
}
|
|
1285
|
-
function
|
|
1286
|
-
|
|
1411
|
+
function Z() {
|
|
1412
|
+
p(() => {
|
|
1287
1413
|
if (F.layout.value !== "classic" || F.minimized.value) {
|
|
1288
|
-
|
|
1414
|
+
ye();
|
|
1289
1415
|
return;
|
|
1290
1416
|
}
|
|
1291
1417
|
if (H.value.size === 0) {
|
|
1292
|
-
|
|
1418
|
+
ye();
|
|
1293
1419
|
return;
|
|
1294
1420
|
}
|
|
1295
|
-
H.value = /* @__PURE__ */ new Set(),
|
|
1296
|
-
|
|
1421
|
+
H.value = /* @__PURE__ */ new Set(), p(() => {
|
|
1422
|
+
ye();
|
|
1297
1423
|
});
|
|
1298
1424
|
});
|
|
1299
1425
|
}
|
|
@@ -1303,10 +1429,10 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1303
1429
|
function xe() {
|
|
1304
1430
|
F.disabled.value || F.api.toggleSimplified();
|
|
1305
1431
|
}
|
|
1306
|
-
function
|
|
1432
|
+
function Se() {
|
|
1307
1433
|
F.disabled.value || (F.minimized.value = !F.minimized.value);
|
|
1308
1434
|
}
|
|
1309
|
-
function
|
|
1435
|
+
function we(e) {
|
|
1310
1436
|
F.disabled.value || P("fileMenuSelect", e);
|
|
1311
1437
|
}
|
|
1312
1438
|
function Ee() {
|
|
@@ -1396,14 +1522,14 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1396
1522
|
}
|
|
1397
1523
|
}
|
|
1398
1524
|
function Ne(e) {
|
|
1399
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
1525
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? se : null;
|
|
1400
1526
|
}
|
|
1401
1527
|
E([
|
|
1402
1528
|
R,
|
|
1403
1529
|
() => F.layout.value,
|
|
1404
1530
|
() => F.minimized.value
|
|
1405
1531
|
], () => {
|
|
1406
|
-
|
|
1532
|
+
Z();
|
|
1407
1533
|
}), E([
|
|
1408
1534
|
L,
|
|
1409
1535
|
() => F.tabs.value,
|
|
@@ -1417,22 +1543,22 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1417
1543
|
e || Q();
|
|
1418
1544
|
}), E(() => F.disabled.value, (e) => {
|
|
1419
1545
|
e && (F.overflowOpen.value = !1, F.backdropOpen.value = !1, F.keyTipsOpen.value = !1, Q());
|
|
1420
|
-
}), E(
|
|
1546
|
+
}), E(z, (e, t) => {
|
|
1421
1547
|
t && $ && $.unobserve(t), e && $ && $.observe(e);
|
|
1422
1548
|
}, { flush: "post" });
|
|
1423
1549
|
let $ = null;
|
|
1424
|
-
return
|
|
1550
|
+
return g(() => {
|
|
1425
1551
|
window.addEventListener("keydown", Me), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
1426
|
-
|
|
1427
|
-
}),
|
|
1428
|
-
}),
|
|
1552
|
+
Z();
|
|
1553
|
+
}), z.value && $.observe(z.value)), Z();
|
|
1554
|
+
}), _(() => {
|
|
1429
1555
|
window.removeEventListener("keydown", Me), $?.disconnect();
|
|
1430
|
-
}), l(F.api), (t, l) => (
|
|
1431
|
-
default: D(() => [(
|
|
1556
|
+
}), l(F.api), (t, l) => (v(), n(T(te), { size: N.size }, {
|
|
1557
|
+
default: D(() => [(v(), i("section", {
|
|
1432
1558
|
key: T(F).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
1433
|
-
class:
|
|
1559
|
+
class: m(["ml-ribbon", [
|
|
1434
1560
|
`ml-ribbon--${T(F).layout.value}`,
|
|
1435
|
-
`ml-ribbon--size-${
|
|
1561
|
+
`ml-ribbon--size-${W.value}`,
|
|
1436
1562
|
{
|
|
1437
1563
|
"ml-ribbon--disabled": T(F).disabled.value,
|
|
1438
1564
|
"ml-ribbon--minimized": T(F).minimized.value,
|
|
@@ -1442,15 +1568,15 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1442
1568
|
inert: T(F).disabled.value,
|
|
1443
1569
|
"aria-disabled": T(F).disabled.value
|
|
1444
1570
|
}, [
|
|
1445
|
-
a("header",
|
|
1446
|
-
s.showFileMenu ? (
|
|
1571
|
+
a("header", ft, [a("div", pt, [
|
|
1572
|
+
s.showFileMenu ? (v(), n(Te, {
|
|
1447
1573
|
key: 0,
|
|
1448
1574
|
items: s.fileMenuItems,
|
|
1449
1575
|
disabled: T(F).disabled.value,
|
|
1450
|
-
label:
|
|
1451
|
-
"open-backstage-label":
|
|
1576
|
+
label: q.value.fileMenuLabel,
|
|
1577
|
+
"open-backstage-label": q.value.fileMenuOpenBackstageLabel,
|
|
1452
1578
|
"show-open-backstage": s.showOpenBackstage,
|
|
1453
|
-
onSelect:
|
|
1579
|
+
onSelect: we,
|
|
1454
1580
|
onOpenBackstage: Ee
|
|
1455
1581
|
}, null, 8, [
|
|
1456
1582
|
"items",
|
|
@@ -1459,11 +1585,11 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1459
1585
|
"open-backstage-label",
|
|
1460
1586
|
"show-open-backstage"
|
|
1461
1587
|
])) : r("", !0),
|
|
1462
|
-
c(
|
|
1588
|
+
c(Ce, {
|
|
1463
1589
|
tabs: T(ne),
|
|
1464
1590
|
"active-tab": T(F).activeTab.value,
|
|
1465
1591
|
disabled: T(F).disabled.value,
|
|
1466
|
-
"default-contextual-title":
|
|
1592
|
+
"default-contextual-title": q.value.contextualTabDefaultTitle,
|
|
1467
1593
|
onSelect: be
|
|
1468
1594
|
}, null, 8, [
|
|
1469
1595
|
"tabs",
|
|
@@ -1471,19 +1597,19 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1471
1597
|
"disabled",
|
|
1472
1598
|
"default-contextual-title"
|
|
1473
1599
|
]),
|
|
1474
|
-
N.hideMinimizeButton ? r("", !0) : (
|
|
1600
|
+
N.hideMinimizeButton ? r("", !0) : (v(), n(T(V), {
|
|
1475
1601
|
key: 1,
|
|
1476
|
-
content:
|
|
1602
|
+
content: q.value.minimizeTooltip
|
|
1477
1603
|
}, {
|
|
1478
|
-
default: D(() => [c(T(
|
|
1479
|
-
class:
|
|
1604
|
+
default: D(() => [c(T(k), {
|
|
1605
|
+
class: m([
|
|
1480
1606
|
"ml-ribbon__control",
|
|
1481
1607
|
"ml-ribbon__control--minimize",
|
|
1482
1608
|
T(F).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
1483
1609
|
]),
|
|
1484
|
-
icon:
|
|
1610
|
+
icon: de.value,
|
|
1485
1611
|
disabled: T(F).disabled.value,
|
|
1486
|
-
onClick:
|
|
1612
|
+
onClick: Se
|
|
1487
1613
|
}, null, 8, [
|
|
1488
1614
|
"class",
|
|
1489
1615
|
"icon",
|
|
@@ -1491,26 +1617,26 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1491
1617
|
])]),
|
|
1492
1618
|
_: 1
|
|
1493
1619
|
}, 8, ["content"]))
|
|
1494
|
-
]), a("div",
|
|
1495
|
-
N.hideLayoutSwitcher ? r("", !0) : (
|
|
1620
|
+
]), a("div", mt, [
|
|
1621
|
+
N.hideLayoutSwitcher ? r("", !0) : (v(), n(T(V), {
|
|
1496
1622
|
key: 0,
|
|
1497
|
-
content:
|
|
1623
|
+
content: q.value.layoutSwitcherTooltip
|
|
1498
1624
|
}, {
|
|
1499
|
-
default: D(() => [c(T(
|
|
1625
|
+
default: D(() => [c(T(k), {
|
|
1500
1626
|
circle: "",
|
|
1501
1627
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
1502
|
-
icon: T(
|
|
1628
|
+
icon: T(ce),
|
|
1503
1629
|
disabled: T(F).disabled.value,
|
|
1504
1630
|
onClick: xe
|
|
1505
1631
|
}, null, 8, ["icon", "disabled"])]),
|
|
1506
1632
|
_: 1
|
|
1507
1633
|
}, 8, ["content"])),
|
|
1508
|
-
N.hideKeyTipsToggle ? r("", !0) : (
|
|
1634
|
+
N.hideKeyTipsToggle ? r("", !0) : (v(), n(T(B), {
|
|
1509
1635
|
key: 1,
|
|
1510
1636
|
"inline-prompt": "",
|
|
1511
1637
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
1512
|
-
"active-text":
|
|
1513
|
-
"inactive-text":
|
|
1638
|
+
"active-text": q.value.keyTipsToggleText,
|
|
1639
|
+
"inactive-text": q.value.keyTipsToggleText,
|
|
1514
1640
|
"model-value": T(F).keyTipsOpen.value,
|
|
1515
1641
|
disabled: T(F).disabled.value,
|
|
1516
1642
|
onChange: l[0] ||= (e) => T(F).keyTipsOpen.value = !T(F).keyTipsOpen.value
|
|
@@ -1520,20 +1646,20 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1520
1646
|
"model-value",
|
|
1521
1647
|
"disabled"
|
|
1522
1648
|
])),
|
|
1523
|
-
t.$slots["tabs-extra"] ? (
|
|
1649
|
+
t.$slots["tabs-extra"] ? (v(), i("div", ht, [S(t.$slots, "tabs-extra", {
|
|
1524
1650
|
activeTab: T(F).activeTab.value,
|
|
1525
1651
|
layout: T(F).layout.value,
|
|
1526
1652
|
minimized: T(F).minimized.value,
|
|
1527
1653
|
disabled: T(F).disabled.value
|
|
1528
1654
|
})])) : r("", !0)
|
|
1529
1655
|
])]),
|
|
1530
|
-
!T(F).minimized.value && L.value && T(F).layout.value === "classic" ? (
|
|
1656
|
+
!T(F).minimized.value && L.value && T(F).layout.value === "classic" ? (v(), i("main", {
|
|
1531
1657
|
key: 0,
|
|
1532
1658
|
class: "ml-ribbon__panel",
|
|
1533
1659
|
"data-active-tab": L.value.id,
|
|
1534
1660
|
ref_key: "classicPanelRef",
|
|
1535
|
-
ref:
|
|
1536
|
-
}, [(
|
|
1661
|
+
ref: z
|
|
1662
|
+
}, [(v(!0), i(e, null, x(J.value, (e) => (v(), n(ut, {
|
|
1537
1663
|
id: e.id,
|
|
1538
1664
|
key: e.id,
|
|
1539
1665
|
"data-group-id": e.id,
|
|
@@ -1546,13 +1672,13 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1546
1672
|
launcher: e.launcher,
|
|
1547
1673
|
"show-launcher-icon": e.showLauncherIcon,
|
|
1548
1674
|
"group-model": e,
|
|
1549
|
-
"overflow-trigger-aria-label":
|
|
1550
|
-
"gallery-preview-fallback":
|
|
1675
|
+
"overflow-trigger-aria-label": q.value.groupOverflowTriggerAriaLabel,
|
|
1676
|
+
"gallery-preview-fallback": q.value.galleryPreviewFallback,
|
|
1551
1677
|
onItemClick: l[2] ||= (e) => Oe(e.groupId, e.itemId)
|
|
1552
1678
|
}, {
|
|
1553
|
-
default: D(() => [c(
|
|
1679
|
+
default: D(() => [c(tt, {
|
|
1554
1680
|
group: e,
|
|
1555
|
-
"gallery-preview-fallback":
|
|
1681
|
+
"gallery-preview-fallback": q.value.galleryPreviewFallback,
|
|
1556
1682
|
onItemClick: l[1] ||= (e) => Oe(e.groupId, e.itemId)
|
|
1557
1683
|
}, null, 8, ["group", "gallery-preview-fallback"])]),
|
|
1558
1684
|
_: 2
|
|
@@ -1570,27 +1696,27 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1570
1696
|
"group-model",
|
|
1571
1697
|
"overflow-trigger-aria-label",
|
|
1572
1698
|
"gallery-preview-fallback"
|
|
1573
|
-
]))), 128)),
|
|
1699
|
+
]))), 128)), Y.value.length ? (v(), i("section", _t, [a("div", vt, [c(T(re), {
|
|
1574
1700
|
trigger: "click",
|
|
1575
1701
|
placement: "bottom-end",
|
|
1576
|
-
width:
|
|
1702
|
+
width: X.value,
|
|
1577
1703
|
disabled: T(F).disabled.value,
|
|
1578
|
-
"popper-class":
|
|
1704
|
+
"popper-class": K.value,
|
|
1579
1705
|
onShow: l[4] ||= (e) => T(F).overflowOpen.value = !0,
|
|
1580
1706
|
onHide: l[5] ||= (e) => T(F).overflowOpen.value = !1
|
|
1581
1707
|
}, {
|
|
1582
1708
|
reference: D(() => [a("button", {
|
|
1583
1709
|
type: "button",
|
|
1584
1710
|
class: "ml-ribbon-overflow-trigger",
|
|
1585
|
-
"aria-label":
|
|
1711
|
+
"aria-label": q.value.overflowTriggerAriaLabel,
|
|
1586
1712
|
disabled: T(F).disabled.value
|
|
1587
|
-
}, [...l[7] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
1588
|
-
default: D(() => [a("div",
|
|
1713
|
+
}, [...l[7] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, yt)]),
|
|
1714
|
+
default: D(() => [a("div", bt, [(v(!0), i(e, null, x(Y.value, (e) => (v(), i("section", {
|
|
1589
1715
|
key: e.id,
|
|
1590
1716
|
class: "ml-ribbon-overflow-group"
|
|
1591
|
-
}, [a("header",
|
|
1717
|
+
}, [a("header", xt, w(e.title), 1), c(tt, {
|
|
1592
1718
|
group: e,
|
|
1593
|
-
"gallery-preview-fallback":
|
|
1719
|
+
"gallery-preview-fallback": q.value.galleryPreviewFallback,
|
|
1594
1720
|
onItemClick: l[3] ||= (e) => Oe(e.groupId, e.itemId)
|
|
1595
1721
|
}, null, 8, ["group", "gallery-preview-fallback"])]))), 128))])]),
|
|
1596
1722
|
_: 1
|
|
@@ -1598,53 +1724,53 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1598
1724
|
"width",
|
|
1599
1725
|
"disabled",
|
|
1600
1726
|
"popper-class"
|
|
1601
|
-
])]), l[8] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
1602
|
-
!T(F).minimized.value && L.value && T(F).layout.value === "simplified" ? (
|
|
1727
|
+
])]), l[8] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, gt)) : r("", !0),
|
|
1728
|
+
!T(F).minimized.value && L.value && T(F).layout.value === "simplified" ? (v(), i("main", {
|
|
1603
1729
|
key: 1,
|
|
1604
1730
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
1605
1731
|
"data-active-tab": L.value.id
|
|
1606
|
-
}, [(
|
|
1732
|
+
}, [(v(!0), i(e, null, x(R.value, (e) => (v(), n(T(re), {
|
|
1607
1733
|
key: e.id,
|
|
1608
1734
|
trigger: "click",
|
|
1609
1735
|
placement: "bottom-start",
|
|
1610
1736
|
width: 340,
|
|
1611
1737
|
disabled: T(F).disabled.value,
|
|
1612
|
-
"popper-class":
|
|
1738
|
+
"popper-class": G.value
|
|
1613
1739
|
}, {
|
|
1614
1740
|
reference: D(() => [a("button", {
|
|
1615
1741
|
class: "ml-ribbon-simplified-group",
|
|
1616
1742
|
type: "button",
|
|
1617
1743
|
disabled: T(F).disabled.value
|
|
1618
|
-
}, [Ne(e) ? (
|
|
1744
|
+
}, [Ne(e) ? (v(), n(T(I), {
|
|
1619
1745
|
key: 0,
|
|
1620
1746
|
class: "ml-ribbon-simplified-group__icon"
|
|
1621
1747
|
}, {
|
|
1622
|
-
default: D(() => [(
|
|
1748
|
+
default: D(() => [(v(), n(C(Ne(e))))]),
|
|
1623
1749
|
_: 2
|
|
1624
|
-
}, 1024)) : r("", !0), a("span", null,
|
|
1625
|
-
default: D(() => [a("div",
|
|
1626
|
-
group:
|
|
1627
|
-
"gallery-preview-fallback":
|
|
1750
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, Ct)]),
|
|
1751
|
+
default: D(() => [a("div", wt, [c(tt, {
|
|
1752
|
+
group: pe(e),
|
|
1753
|
+
"gallery-preview-fallback": q.value.galleryPreviewFallback,
|
|
1628
1754
|
onItemClick: l[6] ||= (e) => Oe(e.groupId, e.itemId)
|
|
1629
1755
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
1630
1756
|
_: 2
|
|
1631
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
1632
|
-
c(
|
|
1757
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, St)) : r("", !0),
|
|
1758
|
+
c(_e, {
|
|
1633
1759
|
open: T(F).backdropOpen.value,
|
|
1634
|
-
size:
|
|
1635
|
-
"back-label":
|
|
1636
|
-
title:
|
|
1637
|
-
description:
|
|
1760
|
+
size: W.value,
|
|
1761
|
+
"back-label": q.value.backstageBackLabel,
|
|
1762
|
+
title: q.value.backstageTitle,
|
|
1763
|
+
description: q.value.backstageDescription,
|
|
1638
1764
|
onClose: De
|
|
1639
1765
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
1640
1766
|
name: "default",
|
|
1641
|
-
fn: D(() => [
|
|
1767
|
+
fn: D(() => [S(t.$slots, "backstage", {
|
|
1642
1768
|
close: De,
|
|
1643
1769
|
open: T(F).backdropOpen.value,
|
|
1644
|
-
size:
|
|
1645
|
-
backLabel:
|
|
1646
|
-
title:
|
|
1647
|
-
description:
|
|
1770
|
+
size: W.value,
|
|
1771
|
+
backLabel: q.value.backstageBackLabel,
|
|
1772
|
+
title: q.value.backstageTitle,
|
|
1773
|
+
description: q.value.backstageDescription,
|
|
1648
1774
|
disabled: T(F).disabled.value
|
|
1649
1775
|
})]),
|
|
1650
1776
|
key: "0"
|
|
@@ -1655,14 +1781,14 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1655
1781
|
"title",
|
|
1656
1782
|
"description"
|
|
1657
1783
|
])
|
|
1658
|
-
], 10,
|
|
1784
|
+
], 10, dt))]),
|
|
1659
1785
|
_: 3
|
|
1660
1786
|
}, 8, ["size"]));
|
|
1661
1787
|
}
|
|
1662
|
-
}),
|
|
1788
|
+
}), Dt = {
|
|
1663
1789
|
class: "ml-ribbon-tab-definition",
|
|
1664
1790
|
hidden: ""
|
|
1665
|
-
},
|
|
1791
|
+
}, Ot = /* @__PURE__ */ l({
|
|
1666
1792
|
__name: "RibbonTab",
|
|
1667
1793
|
props: {
|
|
1668
1794
|
id: {},
|
|
@@ -1673,13 +1799,13 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1673
1799
|
contextualTitle: {}
|
|
1674
1800
|
},
|
|
1675
1801
|
setup(e) {
|
|
1676
|
-
return (e, t) => (
|
|
1802
|
+
return (e, t) => (v(), i("div", Dt, [S(e.$slots, "default")]));
|
|
1677
1803
|
}
|
|
1678
|
-
}),
|
|
1804
|
+
}), kt = {
|
|
1679
1805
|
key: 0,
|
|
1680
1806
|
class: "ml-ribbon-keytips",
|
|
1681
1807
|
"aria-live": "polite"
|
|
1682
|
-
},
|
|
1808
|
+
}, At = { class: "ml-ribbon-keytips__hint" }, jt = /* @__PURE__ */ l({
|
|
1683
1809
|
__name: "RibbonKeyTips",
|
|
1684
1810
|
props: {
|
|
1685
1811
|
open: { type: Boolean },
|
|
@@ -1689,14 +1815,14 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1689
1815
|
},
|
|
1690
1816
|
emits: ["activate", "close"],
|
|
1691
1817
|
setup(n, { emit: o }) {
|
|
1692
|
-
let s = n, c = o, l =
|
|
1693
|
-
function
|
|
1818
|
+
let s = n, c = o, l = b(""), u = t(() => l.value ? s.tips.filter((e) => e.key.toLowerCase().startsWith(l.value.toLowerCase())) : s.tips), d = t(() => l.value || s.emptySequenceText || ""), f = t(() => s.sequencePrefix ? `${s.sequencePrefix}${d.value}` : d.value), p = t(() => l.value.toLowerCase()), m = t(() => s.tips.filter((e) => e.key.toLowerCase() === p.value)), h = t(() => s.tips.some((e) => e.key.toLowerCase().startsWith(p.value)));
|
|
1819
|
+
function y() {
|
|
1694
1820
|
l.value = "";
|
|
1695
1821
|
}
|
|
1696
1822
|
function S(e) {
|
|
1697
1823
|
if (s.open && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
1698
1824
|
if (e.key === "Escape") {
|
|
1699
|
-
e.preventDefault(),
|
|
1825
|
+
e.preventDefault(), y(), c("close");
|
|
1700
1826
|
return;
|
|
1701
1827
|
}
|
|
1702
1828
|
if (e.key === "Backspace") {
|
|
@@ -1705,20 +1831,20 @@ var de = { class: "ml-ribbon-backstage__nav" }, fe = { class: "ml-ribbon-backsta
|
|
|
1705
1831
|
}
|
|
1706
1832
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
1707
1833
|
if (e.preventDefault(), l.value += e.key.toUpperCase(), m.value.length > 0) {
|
|
1708
|
-
c("activate", m.value[0]),
|
|
1834
|
+
c("activate", m.value[0]), y();
|
|
1709
1835
|
return;
|
|
1710
1836
|
}
|
|
1711
|
-
|
|
1837
|
+
h.value || y();
|
|
1712
1838
|
}
|
|
1713
1839
|
}
|
|
1714
1840
|
}
|
|
1715
|
-
return
|
|
1716
|
-
e ||
|
|
1717
|
-
}), (t, o) => n.open ? (
|
|
1841
|
+
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), E(() => s.open, (e) => {
|
|
1842
|
+
e || y();
|
|
1843
|
+
}), (t, o) => n.open ? (v(), i("div", kt, [a("div", At, w(f.value), 1), (v(!0), i(e, null, x(u.value, (e) => (v(), i("span", {
|
|
1718
1844
|
key: e.id,
|
|
1719
1845
|
class: "ml-ribbon-keytip"
|
|
1720
|
-
},
|
|
1846
|
+
}, w(e.key), 1))), 128))])) : r("", !0);
|
|
1721
1847
|
}
|
|
1722
1848
|
});
|
|
1723
1849
|
//#endregion
|
|
1724
|
-
export {
|
|
1850
|
+
export { Et as MlRibbon, _e as MlRibbonBackstage, Fe as MlRibbonButtonGroup, Ee as MlRibbonCollection, Ce as MlRibbonContextualTabs, Te as MlRibbonFileMenu, Ne as MlRibbonGallery, ut as MlRibbonGroup, et as MlRibbonItemHost, jt as MlRibbonKeyTips, Ve as MlRibbonSegmented, Ot as MlRibbonTab, Z as MlRibbonTabs, Ge as MlRibbonTemplateItem, Ue as MlRibbonToggleButton };
|