@mlightcad/ribbon 0.1.1 → 0.1.3
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 +2 -0
- package/dist/index.d.ts +6 -1
- package/dist/items/RibbonGallery.vue.d.ts +49 -12
- package/dist/items/RibbonInputNumber.vue.d.ts +44 -0
- package/dist/items/RibbonToggleButton.vue.d.ts +2 -2
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +1141 -589
- package/dist/ml-ribbon.umd.js +1 -1
- package/dist/types.d.ts +18 -1
- package/package.json +1 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,59 +1,75 @@
|
|
|
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,
|
|
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 T, unref as E, watch as D, withCtx as O, withKeys as k, withModifiers as ee } from "vue";
|
|
2
|
+
import { ElButton as A, ElButtonGroup as j, ElCheckbox as te, ElColorPicker as M, ElConfigProvider as ne, ElDrawer as N, ElDropdown as P, ElDropdownItem as F, ElDropdownMenu as I, ElIcon as L, ElInputNumber as re, ElOption as R, ElPopover as z, ElSegmented as B, ElSelect as V, ElSwitch as H, ElTooltip as ie, useGlobalConfig as ae } from "element-plus";
|
|
3
|
+
import { ArrowDown as U, ArrowDownBold as oe, ArrowUp as se, ArrowUpBold as ce, Bottom as le, Grid as ue, Menu as de, Promotion as W } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
|
-
var
|
|
5
|
+
var fe = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/ribbon/composables/useRibbonState.ts
|
|
8
8
|
function G(e) {
|
|
9
9
|
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function K(e) {
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = { ...e };
|
|
14
|
-
return "icon" in t && (t.icon = G(t.icon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
|
|
14
|
+
return "component" in t && (t.component = G(t.component)), "icon" in t && (t.icon = G(t.icon)), "activeIcon" in t && (t.activeIcon = G(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = G(t.inactiveIcon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
|
|
15
15
|
if (!e || typeof e != "object") return e;
|
|
16
16
|
let t = e;
|
|
17
17
|
return "icon" in t ? {
|
|
18
18
|
...t,
|
|
19
19
|
icon: G(t.icon)
|
|
20
20
|
} : t;
|
|
21
|
+
})), Array.isArray(t.categories) && (t.categories = t.categories.map((e) => {
|
|
22
|
+
if (!e || typeof e != "object") return e;
|
|
23
|
+
let t = e;
|
|
24
|
+
return {
|
|
25
|
+
...t,
|
|
26
|
+
items: Array.isArray(t.items) ? t.items.map((e) => {
|
|
27
|
+
if (!e || typeof e != "object") return e;
|
|
28
|
+
let t = e;
|
|
29
|
+
return {
|
|
30
|
+
...t,
|
|
31
|
+
preview: G(t.preview),
|
|
32
|
+
icon: G(t.icon),
|
|
33
|
+
component: G(t.component)
|
|
34
|
+
};
|
|
35
|
+
}) : t.items
|
|
36
|
+
};
|
|
21
37
|
})), t;
|
|
22
38
|
}
|
|
23
|
-
function
|
|
39
|
+
function pe(e) {
|
|
24
40
|
return {
|
|
25
41
|
...e,
|
|
26
42
|
icon: G(e.icon),
|
|
27
|
-
props:
|
|
43
|
+
props: K(e.props)
|
|
28
44
|
};
|
|
29
45
|
}
|
|
30
|
-
function
|
|
46
|
+
function me(e) {
|
|
31
47
|
return {
|
|
32
48
|
...e,
|
|
33
49
|
icon: G(e.icon),
|
|
34
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
50
|
+
footerMenuItems: e.footerMenuItems?.map(pe),
|
|
35
51
|
collections: e.collections?.map((e) => ({
|
|
36
52
|
...e,
|
|
37
|
-
items: e.items.map(
|
|
53
|
+
items: e.items.map(pe)
|
|
38
54
|
}))
|
|
39
55
|
};
|
|
40
56
|
}
|
|
41
|
-
function
|
|
57
|
+
function q(e) {
|
|
42
58
|
return {
|
|
43
59
|
...e,
|
|
44
|
-
groups: e.groups?.map(
|
|
60
|
+
groups: e.groups?.map(me)
|
|
45
61
|
};
|
|
46
62
|
}
|
|
47
|
-
function
|
|
48
|
-
return e.map(
|
|
63
|
+
function he(e) {
|
|
64
|
+
return e.map(q);
|
|
49
65
|
}
|
|
50
|
-
function
|
|
66
|
+
function ge(e) {
|
|
51
67
|
(!e.collections || e.collections.length === 0) && (e.collections = [{
|
|
52
68
|
id: `${e.id}-collection-1`,
|
|
53
69
|
items: []
|
|
54
70
|
}]);
|
|
55
71
|
}
|
|
56
|
-
function
|
|
72
|
+
function _e(e, t, n, r, i) {
|
|
57
73
|
let a = e.find((e) => e.id === t);
|
|
58
74
|
if (!a?.groups) return;
|
|
59
75
|
let o = a.groups.find((e) => e.id === n);
|
|
@@ -61,10 +77,10 @@ function Y(e, t, n, r, i) {
|
|
|
61
77
|
let s = o.collections.find((e) => e.id === r);
|
|
62
78
|
s && i(s.items);
|
|
63
79
|
}
|
|
64
|
-
function
|
|
65
|
-
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(
|
|
80
|
+
function ve(e, n, r, i, a, o, s, c) {
|
|
81
|
+
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(he(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
82
|
addTab(e) {
|
|
67
|
-
p.value.push(
|
|
83
|
+
p.value.push(q(e)), f.value ||= e.id;
|
|
68
84
|
},
|
|
69
85
|
removeTab(e) {
|
|
70
86
|
p.value = p.value.filter((t) => t.id !== e), f.value === e && (f.value = S.value[0]?.id ?? "");
|
|
@@ -82,7 +98,7 @@ function X(e, n, r, i, a, o, s, c) {
|
|
|
82
98
|
},
|
|
83
99
|
addGroup(e, t) {
|
|
84
100
|
let n = p.value.find((t) => t.id === e);
|
|
85
|
-
n && (n.groups ??= [],
|
|
101
|
+
n && (n.groups ??= [], ge(t), n.groups.push(me(t)));
|
|
86
102
|
},
|
|
87
103
|
removeGroup(e, t) {
|
|
88
104
|
let n = p.value.find((t) => t.id === e);
|
|
@@ -97,16 +113,16 @@ function X(e, n, r, i, a, o, s, c) {
|
|
|
97
113
|
n && (n.visible = !1);
|
|
98
114
|
},
|
|
99
115
|
addItem(e, t, n, r) {
|
|
100
|
-
|
|
116
|
+
_e(p.value, e, t, n, (e) => e.push(pe(r)));
|
|
101
117
|
},
|
|
102
118
|
removeItem(e, t, n, r) {
|
|
103
|
-
|
|
119
|
+
_e(p.value, e, t, n, (e) => {
|
|
104
120
|
let t = e.findIndex((e) => e.id === r);
|
|
105
121
|
t >= 0 && e.splice(t, 1);
|
|
106
122
|
});
|
|
107
123
|
},
|
|
108
124
|
updateItem(e, t, n, r, i) {
|
|
109
|
-
|
|
125
|
+
_e(p.value, e, t, n, (e) => {
|
|
110
126
|
let t = e.find((e) => e.id === r);
|
|
111
127
|
t && Object.assign(t, i);
|
|
112
128
|
});
|
|
@@ -155,7 +171,7 @@ function X(e, n, r, i, a, o, s, c) {
|
|
|
155
171
|
}
|
|
156
172
|
//#endregion
|
|
157
173
|
//#region src/ribbon/modules/RibbonBackstage.vue?vue&type=script&setup=true&lang.ts
|
|
158
|
-
var
|
|
174
|
+
var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstage__content" }, be = { key: 0 }, Y = { key: 1 }, X = /* @__PURE__ */ l({
|
|
159
175
|
__name: "RibbonBackstage",
|
|
160
176
|
props: {
|
|
161
177
|
open: { type: Boolean },
|
|
@@ -170,7 +186,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
170
186
|
function d() {
|
|
171
187
|
u("close");
|
|
172
188
|
}
|
|
173
|
-
return (t, o) => (v(), n(E(
|
|
189
|
+
return (t, o) => (v(), n(E(N), {
|
|
174
190
|
"model-value": l.open,
|
|
175
191
|
size: "100%",
|
|
176
192
|
"with-header": !1,
|
|
@@ -184,24 +200,24 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
184
200
|
title: l.title,
|
|
185
201
|
description: l.description,
|
|
186
202
|
size: l.size
|
|
187
|
-
}) : (v(), i(e, { key: 1 }, [a("aside",
|
|
203
|
+
}) : (v(), i(e, { key: 1 }, [a("aside", ye, [c(E(A), {
|
|
188
204
|
type: "primary",
|
|
189
205
|
onClick: d
|
|
190
206
|
}, {
|
|
191
207
|
default: O(() => [s(w(l.backLabel), 1)]),
|
|
192
208
|
_: 1
|
|
193
|
-
})]), a("section",
|
|
209
|
+
})]), a("section", J, [l.title ? (v(), i("h2", be, w(l.title), 1)) : r("", !0), l.description ? (v(), i("p", Y, w(l.description), 1)) : r("", !0)])], 64))], 2)]),
|
|
194
210
|
_: 3
|
|
195
211
|
}, 8, ["model-value"]));
|
|
196
212
|
}
|
|
197
|
-
}),
|
|
213
|
+
}), Z = {
|
|
198
214
|
class: "ml-ribbon-tabs",
|
|
199
215
|
role: "tablist"
|
|
200
|
-
},
|
|
216
|
+
}, xe = [
|
|
201
217
|
"aria-selected",
|
|
202
218
|
"disabled",
|
|
203
219
|
"onClick"
|
|
204
|
-
],
|
|
220
|
+
], Se = /* @__PURE__ */ l({
|
|
205
221
|
__name: "RibbonTabs",
|
|
206
222
|
props: {
|
|
207
223
|
tabs: {},
|
|
@@ -217,7 +233,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
217
233
|
triggerEl: t.currentTarget instanceof HTMLElement ? t.currentTarget : null
|
|
218
234
|
});
|
|
219
235
|
}
|
|
220
|
-
return (t, r) => (v(), i("div",
|
|
236
|
+
return (t, r) => (v(), i("div", Z, [(v(!0), i(e, null, x(s.value, (e) => (v(), i("button", {
|
|
221
237
|
key: e.id,
|
|
222
238
|
type: "button",
|
|
223
239
|
class: m(["ml-ribbon-tab", { "is-active": n.activeTab === e.id }]),
|
|
@@ -225,9 +241,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
225
241
|
"aria-selected": n.activeTab === e.id,
|
|
226
242
|
disabled: a.disabled,
|
|
227
243
|
onClick: (t) => c(e.id, t)
|
|
228
|
-
}, w(e.title), 11,
|
|
244
|
+
}, w(e.title), 11, xe))), 128))]));
|
|
229
245
|
}
|
|
230
|
-
}),
|
|
246
|
+
}), Ce = { class: "ml-ribbon-contextual-tabs" }, Q = { class: "ml-ribbon-contextual-tabs__normal" }, we = { class: "ml-ribbon-contextual-tabs__ctx" }, Te = /* @__PURE__ */ l({
|
|
231
247
|
__name: "RibbonContextualTabs",
|
|
232
248
|
props: {
|
|
233
249
|
tabs: {},
|
|
@@ -238,7 +254,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
238
254
|
emits: ["select"],
|
|
239
255
|
setup(t, { emit: n }) {
|
|
240
256
|
let r = t, o = n;
|
|
241
|
-
return (n, s) => (v(), i("div",
|
|
257
|
+
return (n, s) => (v(), i("div", Ce, [a("div", Q, [c(Se, {
|
|
242
258
|
tabs: r.tabs.filter((e) => !e.contextual),
|
|
243
259
|
"active-tab": t.activeTab,
|
|
244
260
|
disabled: r.disabled,
|
|
@@ -247,11 +263,11 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
247
263
|
"tabs",
|
|
248
264
|
"active-tab",
|
|
249
265
|
"disabled"
|
|
250
|
-
])]), a("div",
|
|
266
|
+
])]), a("div", we, [(v(!0), i(e, null, x(r.tabs.filter((e) => e.contextual), (e) => (v(), i("section", {
|
|
251
267
|
key: e.id,
|
|
252
268
|
class: "ml-ribbon-contextual-tabs__block",
|
|
253
269
|
style: h({ "--ctx-color": e.contextualColor || "#67c23a" })
|
|
254
|
-
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(
|
|
270
|
+
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(Se, {
|
|
255
271
|
tabs: [e],
|
|
256
272
|
"active-tab": t.activeTab,
|
|
257
273
|
disabled: r.disabled,
|
|
@@ -262,7 +278,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
262
278
|
"disabled"
|
|
263
279
|
])], 4))), 128))])]));
|
|
264
280
|
}
|
|
265
|
-
}),
|
|
281
|
+
}), Ee = ["disabled"], De = /* @__PURE__ */ l({
|
|
266
282
|
__name: "RibbonFileMenu",
|
|
267
283
|
props: {
|
|
268
284
|
items: {},
|
|
@@ -273,7 +289,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
273
289
|
},
|
|
274
290
|
emits: ["select", "open-backstage"],
|
|
275
291
|
setup(o, { emit: l }) {
|
|
276
|
-
let u = o, d = l, f = b(!1), p =
|
|
292
|
+
let u = o, d = l, f = b(!1), p = ae("size", ""), h = t(() => p.value || "default"), g = t(() => `ml-ribbon-file-menu-dropdown ml-ribbon-popper ml-ribbon-popper--size-${h.value}`);
|
|
277
293
|
function _(e) {
|
|
278
294
|
f.value = e;
|
|
279
295
|
}
|
|
@@ -286,21 +302,21 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
286
302
|
}
|
|
287
303
|
return D(() => u.disabled, (e) => {
|
|
288
304
|
e && (f.value = !1);
|
|
289
|
-
}), (t, o) => (v(), n(E(
|
|
305
|
+
}), (t, o) => (v(), n(E(P), {
|
|
290
306
|
trigger: "click",
|
|
291
307
|
disabled: u.disabled,
|
|
292
308
|
"popper-class": g.value,
|
|
293
309
|
onCommand: y,
|
|
294
310
|
onVisibleChange: _
|
|
295
311
|
}, {
|
|
296
|
-
dropdown: O(() => [c(E(
|
|
297
|
-
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(
|
|
312
|
+
dropdown: O(() => [c(E(I), null, {
|
|
313
|
+
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(F), {
|
|
298
314
|
key: 0,
|
|
299
315
|
command: "__backstage"
|
|
300
316
|
}, {
|
|
301
317
|
default: O(() => [s(w(u.openBackstageLabel), 1)]),
|
|
302
318
|
_: 1
|
|
303
|
-
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(
|
|
319
|
+
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(F), {
|
|
304
320
|
key: e.id,
|
|
305
321
|
divided: u.showOpenBackstage !== !1 && t === 0,
|
|
306
322
|
command: e.id,
|
|
@@ -319,11 +335,11 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
319
335
|
type: "button",
|
|
320
336
|
class: m(["ml-ribbon-tab ml-ribbon-tab--file", { "is-active": f.value }]),
|
|
321
337
|
disabled: u.disabled
|
|
322
|
-
}, w(u.label), 11,
|
|
338
|
+
}, w(u.label), 11, Ee)]),
|
|
323
339
|
_: 1
|
|
324
340
|
}, 8, ["disabled", "popper-class"]));
|
|
325
341
|
}
|
|
326
|
-
}),
|
|
342
|
+
}), Oe = /* @__PURE__ */ l({
|
|
327
343
|
__name: "RibbonCollection",
|
|
328
344
|
props: {
|
|
329
345
|
id: {},
|
|
@@ -337,10 +353,10 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
337
353
|
style: h(r.value)
|
|
338
354
|
}, [S(e.$slots, "default")], 6));
|
|
339
355
|
}
|
|
340
|
-
}),
|
|
356
|
+
}), ke = {
|
|
341
357
|
key: 3,
|
|
342
358
|
class: "ml-ribbon-item-host__label ml-ribbon-button__label"
|
|
343
|
-
},
|
|
359
|
+
}, Ae = /* @__PURE__ */ l({
|
|
344
360
|
name: "MlRibbonButton",
|
|
345
361
|
__name: "RibbonButton",
|
|
346
362
|
props: {
|
|
@@ -373,7 +389,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
373
389
|
function y(e) {
|
|
374
390
|
o.disabled || c("click", e);
|
|
375
391
|
}
|
|
376
|
-
return (t, a) => (v(), n(E(
|
|
392
|
+
return (t, a) => (v(), n(E(A), {
|
|
377
393
|
class: "ml-ribbon-button",
|
|
378
394
|
"data-ribbon-button-id": e.id,
|
|
379
395
|
type: e.buttonType,
|
|
@@ -389,7 +405,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
389
405
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
390
406
|
style: h(_.value),
|
|
391
407
|
"aria-hidden": "true"
|
|
392
|
-
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(
|
|
408
|
+
}, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(L), {
|
|
393
409
|
key: 1,
|
|
394
410
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
|
|
395
411
|
style: h(_.value)
|
|
@@ -402,7 +418,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
402
418
|
style: h(_.value),
|
|
403
419
|
"aria-hidden": "true"
|
|
404
420
|
}, null, 6)) : r("", !0),
|
|
405
|
-
u.value ? (v(), i("span",
|
|
421
|
+
u.value ? (v(), i("span", ke, [S(t.$slots, "label", {}, () => [s(w(l.value), 1)])])) : r("", !0),
|
|
406
422
|
S(t.$slots, "default")
|
|
407
423
|
]),
|
|
408
424
|
_: 3
|
|
@@ -415,10 +431,10 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
415
431
|
"aria-label"
|
|
416
432
|
]));
|
|
417
433
|
}
|
|
418
|
-
}),
|
|
434
|
+
}), je = ["data-id"], Me = {
|
|
419
435
|
key: 0,
|
|
420
436
|
class: "ml-ribbon-button-group__label"
|
|
421
|
-
},
|
|
437
|
+
}, Ne = { class: "ml-ribbon-button-group__text" }, Pe = /* @__PURE__ */ l({
|
|
422
438
|
__name: "RibbonButtonGroup",
|
|
423
439
|
props: {
|
|
424
440
|
id: {},
|
|
@@ -475,8 +491,8 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
475
491
|
"ml-ribbon-button-group--equal-width": !t.wrap && t.equalWidth
|
|
476
492
|
}]),
|
|
477
493
|
"data-id": t.id
|
|
478
|
-
}, [!t.hideLabel && t.label ? (v(), i("div",
|
|
479
|
-
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(
|
|
494
|
+
}, [!t.hideLabel && t.label ? (v(), i("div", Me, w(t.label), 1)) : r("", !0), c(E(j), null, {
|
|
495
|
+
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(ie), {
|
|
480
496
|
key: String(e.value),
|
|
481
497
|
content: g(e),
|
|
482
498
|
disabled: !g(e),
|
|
@@ -485,7 +501,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
485
501
|
placement: "top",
|
|
486
502
|
effect: "dark"
|
|
487
503
|
}, {
|
|
488
|
-
default: O(() => [c(
|
|
504
|
+
default: O(() => [c(Ae, {
|
|
489
505
|
id: String(e.value),
|
|
490
506
|
class: "ml-ribbon-button-group__button",
|
|
491
507
|
label: e.label,
|
|
@@ -498,7 +514,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
498
514
|
onClick: (t) => d(e.value)
|
|
499
515
|
}, o({ _: 2 }, [f(e.label) ? {
|
|
500
516
|
name: "label",
|
|
501
|
-
fn: O(() => [a("span",
|
|
517
|
+
fn: O(() => [a("span", Ne, w(e.label), 1)]),
|
|
502
518
|
key: "0"
|
|
503
519
|
} : void 0]), 1032, [
|
|
504
520
|
"id",
|
|
@@ -519,12 +535,12 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
519
535
|
"hide-after"
|
|
520
536
|
]))), 128))]),
|
|
521
537
|
_: 1
|
|
522
|
-
})], 10,
|
|
538
|
+
})], 10, je));
|
|
523
539
|
}
|
|
524
|
-
}),
|
|
540
|
+
}), Fe = { class: "ml-ribbon-item-host__content ml-ribbon-dropdown__content" }, Ie = { class: "ml-ribbon-item-host__text-row ml-ribbon-dropdown__text-row" }, Le = {
|
|
525
541
|
key: 0,
|
|
526
542
|
class: "ml-ribbon-item-host__label ml-ribbon-dropdown__label"
|
|
527
|
-
},
|
|
543
|
+
}, Re = { class: "ml-ribbon-dropdown-item__content" }, ze = { class: "ml-ribbon-dropdown-item__label" }, Be = /* @__PURE__ */ l({
|
|
528
544
|
name: "MlRibbonDropdown",
|
|
529
545
|
__name: "RibbonDropdown",
|
|
530
546
|
props: {
|
|
@@ -556,44 +572,44 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
556
572
|
"tooltip-change"
|
|
557
573
|
],
|
|
558
574
|
setup(o, { emit: l }) {
|
|
559
|
-
let u = o, d = l, f =
|
|
575
|
+
let u = o, d = l, f = ae("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) => H(e) === g.value) ?? null), T = t(() => {
|
|
560
576
|
if (y.value && u.syncLabelWithSelection) {
|
|
561
577
|
let e = ce(y.value);
|
|
562
578
|
if (e) return e;
|
|
563
579
|
}
|
|
564
|
-
return
|
|
565
|
-
}), D = t(() => !u.hideLabel && T.value.length > 0),
|
|
580
|
+
return de(u.label) ?? u.id;
|
|
581
|
+
}), D = t(() => !u.hideLabel && T.value.length > 0), k = t(() => {
|
|
566
582
|
if (y.value) {
|
|
567
583
|
let e = B(y.value);
|
|
568
584
|
if (e) return e;
|
|
569
585
|
}
|
|
570
586
|
return !u.icon || typeof u.icon == "string" ? null : u.icon;
|
|
571
|
-
}),
|
|
587
|
+
}), j = t(() => {
|
|
572
588
|
if (y.value) {
|
|
573
|
-
let e =
|
|
589
|
+
let e = V(y.value);
|
|
574
590
|
if (e) return e;
|
|
575
591
|
}
|
|
576
592
|
if (typeof u.icon != "string") return null;
|
|
577
593
|
let e = u.icon.trim();
|
|
578
594
|
return e.length > 0 ? e : null;
|
|
579
|
-
}),
|
|
595
|
+
}), te = t(() => !!(k.value || j.value)), M = t(() => ue(y.value) ?? de(u.tooltip) ?? de(T.value) ?? de(u.label) ?? W(u.id)), ne = t(() => [
|
|
580
596
|
"ml-ribbon-dropdown-menu",
|
|
581
597
|
"ml-ribbon-popper",
|
|
582
598
|
`ml-ribbon-popper--size-${p.value}`,
|
|
583
599
|
u.popperClass
|
|
584
600
|
].filter(Boolean).join(" "));
|
|
585
|
-
function
|
|
601
|
+
function N(e) {
|
|
586
602
|
if (u.disabled) {
|
|
587
603
|
h.value = !1;
|
|
588
604
|
return;
|
|
589
605
|
}
|
|
590
606
|
h.value = e;
|
|
591
607
|
}
|
|
592
|
-
function
|
|
608
|
+
function re() {
|
|
593
609
|
u.disabled || (h.value = !h.value);
|
|
594
610
|
}
|
|
595
|
-
function
|
|
596
|
-
u.disabled || (g.value = e, d("tooltip-change",
|
|
611
|
+
function R(e) {
|
|
612
|
+
u.disabled || (g.value = e, d("tooltip-change", ue(y.value) ?? M.value), d("command", e), h.value = !1);
|
|
597
613
|
}
|
|
598
614
|
function z() {
|
|
599
615
|
if (u.disabled) return;
|
|
@@ -602,23 +618,23 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
602
618
|
d("click");
|
|
603
619
|
return;
|
|
604
620
|
}
|
|
605
|
-
d("command",
|
|
621
|
+
d("command", H(e));
|
|
606
622
|
}
|
|
607
623
|
function B(e) {
|
|
608
624
|
if (!e || typeof e != "object") return null;
|
|
609
625
|
let t = e.icon;
|
|
610
626
|
return !t || typeof t == "string" ? null : t;
|
|
611
627
|
}
|
|
612
|
-
function
|
|
628
|
+
function V(e) {
|
|
613
629
|
if (!e || typeof e != "object") return null;
|
|
614
630
|
let t = e.icon;
|
|
615
631
|
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
616
632
|
}
|
|
617
|
-
function
|
|
633
|
+
function H(e) {
|
|
618
634
|
if (!(!e || typeof e != "object")) return e.value;
|
|
619
635
|
}
|
|
620
|
-
function
|
|
621
|
-
let t =
|
|
636
|
+
function oe(e) {
|
|
637
|
+
let t = H(e);
|
|
622
638
|
if (typeof t == "string" || typeof t == "number" || t && typeof t == "object") return t;
|
|
623
639
|
}
|
|
624
640
|
function ce(e) {
|
|
@@ -626,55 +642,55 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
626
642
|
let t = e.label;
|
|
627
643
|
return typeof t == "string" ? t : void 0;
|
|
628
644
|
}
|
|
629
|
-
function
|
|
630
|
-
if (typeof e == "string") return
|
|
645
|
+
function le(e) {
|
|
646
|
+
if (typeof e == "string") return W(e);
|
|
631
647
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
632
648
|
}
|
|
633
|
-
function
|
|
634
|
-
if (!(!e || typeof e != "object")) return
|
|
649
|
+
function ue(e) {
|
|
650
|
+
if (!(!e || typeof e != "object")) return de(e.tooltip) ?? ce(e) ?? le(H(e));
|
|
635
651
|
}
|
|
636
|
-
function
|
|
652
|
+
function de(e) {
|
|
637
653
|
if (typeof e != "string") return;
|
|
638
654
|
let t = e.trim();
|
|
639
655
|
return t.length > 0 ? t : void 0;
|
|
640
656
|
}
|
|
641
|
-
function
|
|
657
|
+
function W(e) {
|
|
642
658
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
643
659
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
644
660
|
}
|
|
645
|
-
return (t, l) => (v(), n(E(
|
|
661
|
+
return (t, l) => (v(), n(E(P), {
|
|
646
662
|
class: m(["ml-ribbon-dropdown", [`ml-ribbon-dropdown--item-${o.itemSize}`, { "is-label-hidden": o.hideLabel }]]),
|
|
647
663
|
trigger: "click",
|
|
648
664
|
disabled: o.disabled,
|
|
649
|
-
"popper-class":
|
|
650
|
-
onVisibleChange:
|
|
651
|
-
onCommand:
|
|
665
|
+
"popper-class": ne.value,
|
|
666
|
+
onVisibleChange: N,
|
|
667
|
+
onCommand: R
|
|
652
668
|
}, {
|
|
653
|
-
dropdown: O(() => [c(E(
|
|
654
|
-
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(
|
|
655
|
-
key: String(
|
|
656
|
-
command:
|
|
669
|
+
dropdown: O(() => [c(E(I), null, {
|
|
670
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(F), {
|
|
671
|
+
key: String(H(e)),
|
|
672
|
+
command: oe(e),
|
|
657
673
|
disabled: e.disabled === !0
|
|
658
674
|
}, {
|
|
659
|
-
default: O(() => [c(E(
|
|
660
|
-
content:
|
|
661
|
-
disabled: !
|
|
675
|
+
default: O(() => [c(E(ie), {
|
|
676
|
+
content: ue(e),
|
|
677
|
+
disabled: !ue(e),
|
|
662
678
|
"show-after": o.tooltipShowAfter,
|
|
663
679
|
"hide-after": o.tooltipHideAfter,
|
|
664
680
|
placement: "top",
|
|
665
681
|
effect: "dark"
|
|
666
682
|
}, {
|
|
667
|
-
default: O(() => [a("span",
|
|
683
|
+
default: O(() => [a("span", Re, [S(t.$slots, "option", { option: e }, () => [B(e) ? (v(), n(E(L), {
|
|
668
684
|
key: 0,
|
|
669
685
|
class: "ml-ribbon-dropdown-item__icon"
|
|
670
686
|
}, {
|
|
671
687
|
default: O(() => [(v(), n(C(B(e))))]),
|
|
672
688
|
_: 2
|
|
673
|
-
}, 1024)) :
|
|
689
|
+
}, 1024)) : V(e) ? (v(), i("i", {
|
|
674
690
|
key: 1,
|
|
675
|
-
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class",
|
|
691
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", V(e)]),
|
|
676
692
|
"aria-hidden": "true"
|
|
677
|
-
}, null, 2)) : r("", !0), a("span",
|
|
693
|
+
}, null, 2)) : r("", !0), a("span", ze, w(ce(e)), 1)])])]),
|
|
678
694
|
_: 2
|
|
679
695
|
}, 1032, [
|
|
680
696
|
"content",
|
|
@@ -686,28 +702,28 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
686
702
|
}, 1032, ["command", "disabled"]))), 128))]),
|
|
687
703
|
_: 3
|
|
688
704
|
})]),
|
|
689
|
-
default: O(() => [c(E(
|
|
705
|
+
default: O(() => [c(E(A), {
|
|
690
706
|
type: "default",
|
|
691
707
|
disabled: o.disabled,
|
|
692
|
-
"aria-label":
|
|
693
|
-
onClick:
|
|
708
|
+
"aria-label": M.value,
|
|
709
|
+
onClick: re
|
|
694
710
|
}, {
|
|
695
|
-
default: O(() => [a("span",
|
|
711
|
+
default: O(() => [a("span", Fe, [t.$slots.icon || te.value ? (v(), i("span", {
|
|
696
712
|
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":
|
|
698
|
-
onClick:
|
|
699
|
-
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [
|
|
700
|
-
default: O(() => [(v(), n(C(
|
|
713
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class": j.value && !k.value && !t.$slots.icon }]),
|
|
714
|
+
onClick: ee(z, ["stop"])
|
|
715
|
+
}, [S(t.$slots, "icon", { selectedOption: y.value }, () => [k.value ? (v(), n(E(L), { key: 0 }, {
|
|
716
|
+
default: O(() => [(v(), n(C(k.value)))]),
|
|
701
717
|
_: 1
|
|
702
|
-
})) :
|
|
718
|
+
})) : j.value ? (v(), i("i", {
|
|
703
719
|
key: 1,
|
|
704
|
-
class: m(
|
|
720
|
+
class: m(j.value),
|
|
705
721
|
"aria-hidden": "true"
|
|
706
|
-
}, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span",
|
|
722
|
+
}, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span", Ie, [D.value ? (v(), i("span", Le, [S(t.$slots, "label", {
|
|
707
723
|
selectedOption: y.value,
|
|
708
724
|
label: T.value
|
|
709
|
-
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(
|
|
710
|
-
default: O(() => [(v(), n(C(h.value ? E(
|
|
725
|
+
}, () => [s(w(T.value), 1)])])) : r("", !0), c(E(L), { class: m(["ml-ribbon-item-host__dropdown-arrow ml-ribbon-dropdown__arrow", { "is-open": h.value }]) }, {
|
|
726
|
+
default: O(() => [(v(), n(C(h.value ? E(se) : E(U))))]),
|
|
711
727
|
_: 1
|
|
712
728
|
}, 8, ["class"])])])]),
|
|
713
729
|
_: 3
|
|
@@ -719,10 +735,51 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
719
735
|
"popper-class"
|
|
720
736
|
]));
|
|
721
737
|
}
|
|
722
|
-
}),
|
|
738
|
+
}), Ve = ["disabled"], He = ["src"], Ue = {
|
|
739
|
+
key: 3,
|
|
740
|
+
class: "ml-ribbon-gallery__preview-svg",
|
|
741
|
+
role: "presentation",
|
|
742
|
+
"aria-hidden": "true"
|
|
743
|
+
}, We = ["href"], Ge = { class: "ml-ribbon-gallery__label ml-ribbon-gallery__collapsed-label" }, Ke = { class: "ml-ribbon-gallery__panel" }, qe = {
|
|
723
744
|
key: 0,
|
|
745
|
+
class: "ml-ribbon-gallery__panel-category-title"
|
|
746
|
+
}, Je = ["disabled", "onClick"], Ye = ["src"], Xe = {
|
|
747
|
+
key: 3,
|
|
748
|
+
class: "ml-ribbon-gallery__preview-svg",
|
|
749
|
+
role: "presentation",
|
|
750
|
+
"aria-hidden": "true"
|
|
751
|
+
}, Ze = ["href"], $ = { class: "ml-ribbon-gallery__label" }, Qe = {
|
|
752
|
+
key: 1,
|
|
724
753
|
class: "ml-ribbon-gallery__title"
|
|
725
|
-
},
|
|
754
|
+
}, $e = {
|
|
755
|
+
key: 2,
|
|
756
|
+
class: "ml-ribbon-gallery__categories"
|
|
757
|
+
}, et = {
|
|
758
|
+
key: 0,
|
|
759
|
+
class: "ml-ribbon-gallery__category-title"
|
|
760
|
+
}, tt = ["disabled", "onClick"], nt = ["src"], rt = {
|
|
761
|
+
key: 3,
|
|
762
|
+
class: "ml-ribbon-gallery__preview-svg",
|
|
763
|
+
role: "presentation",
|
|
764
|
+
"aria-hidden": "true"
|
|
765
|
+
}, it = ["href"], at = { class: "ml-ribbon-gallery__label" }, ot = {
|
|
766
|
+
key: 0,
|
|
767
|
+
class: "ml-ribbon-gallery__controls",
|
|
768
|
+
"aria-label": "Gallery navigation"
|
|
769
|
+
}, st = ["disabled"], ct = ["disabled"], lt = ["disabled"], ut = {
|
|
770
|
+
key: 0,
|
|
771
|
+
class: "ml-ribbon-gallery__panel-category-title"
|
|
772
|
+
}, dt = [
|
|
773
|
+
"data-gallery-row-index",
|
|
774
|
+
"disabled",
|
|
775
|
+
"onClick"
|
|
776
|
+
], ft = ["src"], pt = {
|
|
777
|
+
key: 3,
|
|
778
|
+
class: "ml-ribbon-gallery__preview-svg",
|
|
779
|
+
role: "presentation",
|
|
780
|
+
"aria-hidden": "true"
|
|
781
|
+
}, mt = ["href"], ht = { class: "ml-ribbon-gallery__label" }, gt = 6, _t = 64, vt = 4, yt = 16, bt = 4, xt = 22, St = /* @__PURE__ */ l({
|
|
782
|
+
name: "MlRibbonGallery",
|
|
726
783
|
__name: "RibbonGallery",
|
|
727
784
|
props: {
|
|
728
785
|
id: {},
|
|
@@ -732,35 +789,466 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
732
789
|
type: Boolean,
|
|
733
790
|
default: !1
|
|
734
791
|
},
|
|
792
|
+
modelValue: {},
|
|
793
|
+
collapsed: {
|
|
794
|
+
type: Boolean,
|
|
795
|
+
default: !1
|
|
796
|
+
},
|
|
797
|
+
inlineItemLimit: { default: 4 },
|
|
735
798
|
previewFallback: {}
|
|
736
799
|
},
|
|
737
800
|
emits: ["select"],
|
|
738
|
-
setup(
|
|
739
|
-
let o =
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
801
|
+
setup(o, { emit: l }) {
|
|
802
|
+
let u = o, g = l, _ = b(""), y = b(!1), k = b(0), ee = b(null), A = b(null), j = b(null), te = b(0), M = ae("size", ""), ne = t(() => M.value || "default"), N = t(() => ne.value === "small" ? .92 : ne.value === "large" ? 1.08 : 1), P = t(() => Math.round(_t * N.value)), F = t(() => Math.round(xt * N.value)), I = t(() => u.label?.trim() ?? ""), re = t(() => u.categories.filter((e) => e.items.length > 0).length), R = t(() => u.categories.flatMap((e) => e.items)), B = t(() => R.value.find((e) => e.id === _.value) ?? R.value[0]), V = t(() => !Number.isFinite(u.inlineItemLimit) || u.inlineItemLimit <= 0 ? 4 : Math.floor(u.inlineItemLimit)), H = t(() => Math.max(1, Math.ceil(R.value.length / V.value))), ie = t(() => Math.min(k.value, H.value - 1)), oe = t(() => W.value && ie.value > 0), ce = t(() => W.value && ie.value < H.value - 1), ue = t(() => {
|
|
803
|
+
let e = ie.value * V.value;
|
|
804
|
+
return R.value.slice(e, e + V.value);
|
|
805
|
+
}), de = t(() => new Set(ue.value.map((e) => e.id))), W = t(() => R.value.length > V.value), fe = t(() => `ml-ribbon-gallery-panel ml-ribbon-gallery-panel--${u.collapsed ? "collapsed" : "inline"} ml-ribbon-gallery-panel--size-${ne.value}`), G = t(() => ({
|
|
806
|
+
"--ml-ribbon-gallery-panel-columns": String(V.value),
|
|
807
|
+
"--ml-ribbon-gallery-panel-item-width": `${P.value}px`
|
|
808
|
+
})), K = t(() => V.value * P.value + Math.max(0, V.value - 1) * vt + gt * 2 + (u.collapsed ? yt : bt + F.value)), pe = t(() => ({ modifiers: [{
|
|
809
|
+
name: "offset",
|
|
810
|
+
options: { offset: [te.value, 0] }
|
|
811
|
+
}] }));
|
|
812
|
+
D(() => u.modelValue, (e) => {
|
|
813
|
+
typeof e == "string" && (_.value = e);
|
|
814
|
+
}, { immediate: !0 }), D(() => [R.value.length, V.value], () => {
|
|
815
|
+
k.value >= H.value && (k.value = H.value - 1);
|
|
816
|
+
}), D(y, async (e) => {
|
|
817
|
+
!e || u.collapsed || (ve(), await p(), await p(), ye());
|
|
818
|
+
});
|
|
819
|
+
function me(e) {
|
|
820
|
+
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
821
|
+
}
|
|
822
|
+
function q(e) {
|
|
823
|
+
let t = I.value.toLowerCase(), n = e.title.trim().toLowerCase();
|
|
824
|
+
return re.value > 1 || !t || n !== t;
|
|
825
|
+
}
|
|
826
|
+
function he(e) {
|
|
827
|
+
return W.value ? e.items.filter((e) => de.value.has(e.id)) : e.items;
|
|
828
|
+
}
|
|
829
|
+
function ge(e) {
|
|
830
|
+
if (u.disabled || !W.value) return;
|
|
831
|
+
let t = ie.value + e;
|
|
832
|
+
k.value = Math.min(Math.max(t, 0), H.value - 1);
|
|
833
|
+
}
|
|
834
|
+
function _e(e) {
|
|
835
|
+
let t = R.value.findIndex((t) => t.id === e.id);
|
|
836
|
+
return t < 0 ? 0 : Math.floor(t / V.value);
|
|
837
|
+
}
|
|
838
|
+
function ve() {
|
|
839
|
+
let e = ee.value, t = A.value;
|
|
840
|
+
if (!e || !t) {
|
|
841
|
+
te.value = 0;
|
|
842
|
+
return;
|
|
843
|
+
}
|
|
844
|
+
let n = e.querySelector(".ml-ribbon-gallery__grid .ml-ribbon-gallery__item")?.getBoundingClientRect().left ?? e.getBoundingClientRect().left;
|
|
845
|
+
te.value = Math.round(n - t.getBoundingClientRect().left - gt);
|
|
846
|
+
}
|
|
847
|
+
function ye() {
|
|
848
|
+
let e = j.value;
|
|
849
|
+
e && e.querySelector(`[data-gallery-row-index="${ie.value}"]`)?.scrollIntoView?.({ block: "start" });
|
|
850
|
+
}
|
|
851
|
+
function J(e) {
|
|
852
|
+
return e.preview && typeof e.preview != "string" ? me(e.preview) : e.icon && typeof e.icon != "string" ? me(e.icon) : null;
|
|
853
|
+
}
|
|
854
|
+
function be(e) {
|
|
855
|
+
return e.component ? me(e.component) : null;
|
|
856
|
+
}
|
|
857
|
+
function Y(e) {
|
|
858
|
+
return u.disabled || e.disabled === !0;
|
|
859
|
+
}
|
|
860
|
+
function X(e) {
|
|
861
|
+
if (typeof e.icon != "string") return null;
|
|
862
|
+
let t = e.icon.trim();
|
|
863
|
+
return t.length > 0 ? t : null;
|
|
864
|
+
}
|
|
865
|
+
function Z(e) {
|
|
866
|
+
let t = e.previewSvg ?? e.svg;
|
|
867
|
+
if (typeof t != "string") return null;
|
|
868
|
+
let n = t.trim();
|
|
869
|
+
return n.length > 0 ? n : null;
|
|
870
|
+
}
|
|
871
|
+
function xe(e) {
|
|
872
|
+
return e.startsWith("data:image/svg+xml") || e.endsWith(".svg");
|
|
873
|
+
}
|
|
874
|
+
function Se(e) {
|
|
875
|
+
let t = Z(e);
|
|
876
|
+
return t ? xe(t) : !1;
|
|
877
|
+
}
|
|
878
|
+
function Ce(e) {
|
|
879
|
+
return typeof e.preview == "string" ? e.preview : u.previewFallback;
|
|
880
|
+
}
|
|
881
|
+
function Q(e) {
|
|
882
|
+
Y(e) || (_.value = e.id, k.value = _e(e), y.value = !1, g("select", e.id));
|
|
883
|
+
}
|
|
884
|
+
return (t, l) => (v(), i("div", {
|
|
885
|
+
ref_key: "galleryRef",
|
|
886
|
+
ref: ee,
|
|
887
|
+
class: m(["ml-ribbon-gallery", {
|
|
888
|
+
"is-disabled": o.disabled,
|
|
889
|
+
"is-collapsed": o.collapsed,
|
|
890
|
+
"is-unlabeled": !o.collapsed && !I.value
|
|
891
|
+
}])
|
|
892
|
+
}, [
|
|
893
|
+
o.collapsed && B.value ? (v(), n(E(z), {
|
|
894
|
+
key: 0,
|
|
895
|
+
visible: y.value,
|
|
896
|
+
"onUpdate:visible": l[0] ||= (e) => y.value = e,
|
|
897
|
+
trigger: "click",
|
|
898
|
+
placement: "bottom-start",
|
|
899
|
+
disabled: o.disabled,
|
|
900
|
+
width: K.value,
|
|
901
|
+
"popper-class": fe.value
|
|
902
|
+
}, {
|
|
903
|
+
reference: O(() => [a("button", {
|
|
904
|
+
type: "button",
|
|
905
|
+
class: m(["ml-ribbon-gallery__collapsed-button", {
|
|
906
|
+
"is-selected": _.value === B.value.id,
|
|
907
|
+
"is-open": y.value
|
|
908
|
+
}]),
|
|
909
|
+
disabled: Y(B.value)
|
|
910
|
+
}, [be(B.value) ? (v(), n(C(be(B.value)), f({ key: 0 }, B.value.componentProps, {
|
|
911
|
+
item: B.value,
|
|
912
|
+
selected: _.value === B.value.id,
|
|
913
|
+
disabled: Y(B.value)
|
|
914
|
+
}), null, 16, [
|
|
915
|
+
"item",
|
|
916
|
+
"selected",
|
|
917
|
+
"disabled"
|
|
918
|
+
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview ml-ribbon-gallery__collapsed-preview", {
|
|
919
|
+
"ml-ribbon-gallery__preview--icon": J(B.value) || X(B.value),
|
|
920
|
+
"ml-ribbon-gallery__preview--svg": Z(B.value)
|
|
921
|
+
}]) }, [J(B.value) ? (v(), n(E(L), {
|
|
922
|
+
key: 0,
|
|
923
|
+
class: "ml-ribbon-gallery__preview-icon"
|
|
924
|
+
}, {
|
|
925
|
+
default: O(() => [(v(), n(C(J(B.value))))]),
|
|
926
|
+
_: 1
|
|
927
|
+
})) : X(B.value) ? (v(), i("i", {
|
|
928
|
+
key: 1,
|
|
929
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", X(B.value)]),
|
|
930
|
+
"aria-hidden": "true"
|
|
931
|
+
}, null, 2)) : Z(B.value) && Se(B.value) ? (v(), i("img", {
|
|
932
|
+
key: 2,
|
|
933
|
+
class: "ml-ribbon-gallery__preview-svg",
|
|
934
|
+
src: Z(B.value) ?? "",
|
|
935
|
+
alt: ""
|
|
936
|
+
}, null, 8, He)) : Z(B.value) ? (v(), i("svg", Ue, [a("use", { href: Z(B.value) ?? "" }, null, 8, We)])) : (v(), i(e, { key: 4 }, [s(w(Ce(B.value)), 1)], 64))], 2), a("div", Ge, w(B.value.label), 1)], 64))], 10, Ve)]),
|
|
937
|
+
default: O(() => [a("div", Ke, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
938
|
+
key: o.id,
|
|
939
|
+
class: "ml-ribbon-gallery__panel-category"
|
|
940
|
+
}, [q(o) ? (v(), i("h4", qe, w(o.title), 1)) : r("", !0), a("div", {
|
|
941
|
+
class: "ml-ribbon-gallery__panel-grid",
|
|
942
|
+
style: h(G.value)
|
|
943
|
+
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
944
|
+
key: r.id,
|
|
945
|
+
type: "button",
|
|
946
|
+
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
947
|
+
disabled: Y(r),
|
|
948
|
+
onClick: (e) => Q(r)
|
|
949
|
+
}, [S(t.$slots, "item", {
|
|
950
|
+
item: r,
|
|
951
|
+
category: o,
|
|
952
|
+
selected: _.value === r.id,
|
|
953
|
+
disabled: Y(r),
|
|
954
|
+
select: () => Q(r)
|
|
955
|
+
}, () => [be(r) ? (v(), n(C(be(r)), f({
|
|
956
|
+
key: 0,
|
|
957
|
+
ref_for: !0
|
|
958
|
+
}, r.componentProps, {
|
|
959
|
+
item: r,
|
|
960
|
+
category: o,
|
|
961
|
+
selected: _.value === r.id,
|
|
962
|
+
disabled: Y(r)
|
|
963
|
+
}), null, 16, [
|
|
964
|
+
"item",
|
|
965
|
+
"category",
|
|
966
|
+
"selected",
|
|
967
|
+
"disabled"
|
|
968
|
+
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
969
|
+
"ml-ribbon-gallery__preview--icon": J(r) || X(r),
|
|
970
|
+
"ml-ribbon-gallery__preview--svg": Z(r)
|
|
971
|
+
}]) }, [J(r) ? (v(), n(E(L), {
|
|
972
|
+
key: 0,
|
|
973
|
+
class: "ml-ribbon-gallery__preview-icon"
|
|
974
|
+
}, {
|
|
975
|
+
default: O(() => [(v(), n(C(J(r))))]),
|
|
976
|
+
_: 2
|
|
977
|
+
}, 1024)) : X(r) ? (v(), i("i", {
|
|
978
|
+
key: 1,
|
|
979
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", X(r)]),
|
|
980
|
+
"aria-hidden": "true"
|
|
981
|
+
}, null, 2)) : Z(r) && Se(r) ? (v(), i("img", {
|
|
982
|
+
key: 2,
|
|
983
|
+
class: "ml-ribbon-gallery__preview-svg",
|
|
984
|
+
src: Z(r) ?? "",
|
|
985
|
+
alt: ""
|
|
986
|
+
}, null, 8, Ye)) : Z(r) ? (v(), i("svg", Xe, [a("use", { href: Z(r) ?? "" }, null, 8, Ze)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", $, w(r.label), 1)], 64))])], 10, Je))), 128))], 4)]))), 128))])]),
|
|
987
|
+
_: 3
|
|
988
|
+
}, 8, [
|
|
989
|
+
"visible",
|
|
990
|
+
"disabled",
|
|
991
|
+
"width",
|
|
992
|
+
"popper-class"
|
|
993
|
+
])) : r("", !0),
|
|
994
|
+
!o.collapsed && I.value ? (v(), i("div", Qe, w(I.value), 1)) : r("", !0),
|
|
995
|
+
o.collapsed ? r("", !0) : (v(), i("div", $e, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
996
|
+
key: o.id,
|
|
997
|
+
class: "ml-ribbon-gallery__category"
|
|
998
|
+
}, [I.value && q(o) ? (v(), i("h4", et, w(o.title), 1)) : r("", !0), a("div", {
|
|
999
|
+
class: "ml-ribbon-gallery__grid",
|
|
1000
|
+
style: h({ "--ml-ribbon-gallery-inline-columns": String(V.value) })
|
|
1001
|
+
}, [(v(!0), i(e, null, x(he(o), (r) => (v(), i("button", {
|
|
1002
|
+
key: r.id,
|
|
1003
|
+
type: "button",
|
|
1004
|
+
class: m(["ml-ribbon-gallery__item", { "is-selected": _.value === r.id }]),
|
|
1005
|
+
disabled: Y(r),
|
|
1006
|
+
onClick: (e) => Q(r)
|
|
1007
|
+
}, [S(t.$slots, "item", {
|
|
1008
|
+
item: r,
|
|
1009
|
+
category: o,
|
|
1010
|
+
selected: _.value === r.id,
|
|
1011
|
+
disabled: Y(r),
|
|
1012
|
+
select: () => Q(r)
|
|
1013
|
+
}, () => [be(r) ? (v(), n(C(be(r)), f({
|
|
1014
|
+
key: 0,
|
|
1015
|
+
ref_for: !0
|
|
1016
|
+
}, r.componentProps, {
|
|
1017
|
+
item: r,
|
|
1018
|
+
category: o,
|
|
1019
|
+
selected: _.value === r.id,
|
|
1020
|
+
disabled: Y(r)
|
|
1021
|
+
}), null, 16, [
|
|
1022
|
+
"item",
|
|
1023
|
+
"category",
|
|
1024
|
+
"selected",
|
|
1025
|
+
"disabled"
|
|
1026
|
+
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1027
|
+
"ml-ribbon-gallery__preview--icon": J(r) || X(r),
|
|
1028
|
+
"ml-ribbon-gallery__preview--svg": Z(r)
|
|
1029
|
+
}]) }, [J(r) ? (v(), n(E(L), {
|
|
1030
|
+
key: 0,
|
|
1031
|
+
class: "ml-ribbon-gallery__preview-icon"
|
|
1032
|
+
}, {
|
|
1033
|
+
default: O(() => [(v(), n(C(J(r))))]),
|
|
1034
|
+
_: 2
|
|
1035
|
+
}, 1024)) : X(r) ? (v(), i("i", {
|
|
1036
|
+
key: 1,
|
|
1037
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", X(r)]),
|
|
1038
|
+
"aria-hidden": "true"
|
|
1039
|
+
}, null, 2)) : Z(r) && Se(r) ? (v(), i("img", {
|
|
1040
|
+
key: 2,
|
|
1041
|
+
class: "ml-ribbon-gallery__preview-svg",
|
|
1042
|
+
src: Z(r) ?? "",
|
|
1043
|
+
alt: ""
|
|
1044
|
+
}, null, 8, nt)) : Z(r) ? (v(), i("svg", rt, [a("use", { href: Z(r) ?? "" }, null, 8, it)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", at, w(r.label), 1)], 64))])], 10, tt))), 128))], 4)]))), 128)), W.value ? (v(), i("div", ot, [
|
|
1045
|
+
a("button", {
|
|
1046
|
+
type: "button",
|
|
1047
|
+
class: "ml-ribbon-gallery__control-button",
|
|
1048
|
+
disabled: o.disabled || !oe.value,
|
|
1049
|
+
"aria-label": "Show previous gallery row",
|
|
1050
|
+
onClick: l[1] ||= (e) => ge(-1)
|
|
1051
|
+
}, [c(E(L), null, {
|
|
1052
|
+
default: O(() => [c(E(se))]),
|
|
1053
|
+
_: 1
|
|
1054
|
+
})], 8, st),
|
|
1055
|
+
a("button", {
|
|
1056
|
+
type: "button",
|
|
1057
|
+
class: "ml-ribbon-gallery__control-button",
|
|
1058
|
+
disabled: o.disabled || !ce.value,
|
|
1059
|
+
"aria-label": "Show next gallery row",
|
|
1060
|
+
onClick: l[2] ||= (e) => ge(1)
|
|
1061
|
+
}, [c(E(L), null, {
|
|
1062
|
+
default: O(() => [c(E(U))]),
|
|
1063
|
+
_: 1
|
|
1064
|
+
})], 8, ct),
|
|
1065
|
+
c(E(z), {
|
|
1066
|
+
visible: y.value,
|
|
1067
|
+
"onUpdate:visible": l[3] ||= (e) => y.value = e,
|
|
1068
|
+
trigger: "click",
|
|
1069
|
+
placement: "bottom-start",
|
|
1070
|
+
disabled: o.disabled,
|
|
1071
|
+
width: K.value,
|
|
1072
|
+
"popper-class": fe.value,
|
|
1073
|
+
"popper-options": pe.value
|
|
1074
|
+
}, {
|
|
1075
|
+
reference: O(() => [a("button", {
|
|
1076
|
+
ref_key: "inlineMoreButtonRef",
|
|
1077
|
+
ref: A,
|
|
1078
|
+
type: "button",
|
|
1079
|
+
class: m(["ml-ribbon-gallery__control-button ml-ribbon-gallery__more-button", { "is-open": y.value }]),
|
|
1080
|
+
disabled: o.disabled,
|
|
1081
|
+
"aria-label": "Show more gallery items",
|
|
1082
|
+
onClick: ve
|
|
1083
|
+
}, [c(E(L), null, {
|
|
1084
|
+
default: O(() => [c(E(le))]),
|
|
1085
|
+
_: 1
|
|
1086
|
+
})], 10, lt)]),
|
|
1087
|
+
default: O(() => [a("div", {
|
|
1088
|
+
ref_key: "inlinePanelRef",
|
|
1089
|
+
ref: j,
|
|
1090
|
+
class: "ml-ribbon-gallery__panel"
|
|
1091
|
+
}, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
|
|
1092
|
+
key: o.id,
|
|
1093
|
+
class: "ml-ribbon-gallery__panel-category"
|
|
1094
|
+
}, [q(o) ? (v(), i("h4", ut, w(o.title), 1)) : r("", !0), a("div", {
|
|
1095
|
+
class: "ml-ribbon-gallery__panel-grid",
|
|
1096
|
+
style: h(G.value)
|
|
1097
|
+
}, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
|
|
1098
|
+
key: r.id,
|
|
1099
|
+
type: "button",
|
|
1100
|
+
class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
|
|
1101
|
+
"data-gallery-row-index": _e(r),
|
|
1102
|
+
disabled: Y(r),
|
|
1103
|
+
onClick: (e) => Q(r)
|
|
1104
|
+
}, [S(t.$slots, "item", {
|
|
1105
|
+
item: r,
|
|
1106
|
+
category: o,
|
|
1107
|
+
selected: _.value === r.id,
|
|
1108
|
+
disabled: Y(r),
|
|
1109
|
+
select: () => Q(r)
|
|
1110
|
+
}, () => [be(r) ? (v(), n(C(be(r)), f({
|
|
1111
|
+
key: 0,
|
|
1112
|
+
ref_for: !0
|
|
1113
|
+
}, r.componentProps, {
|
|
1114
|
+
item: r,
|
|
1115
|
+
category: o,
|
|
1116
|
+
selected: _.value === r.id,
|
|
1117
|
+
disabled: Y(r)
|
|
1118
|
+
}), null, 16, [
|
|
1119
|
+
"item",
|
|
1120
|
+
"category",
|
|
1121
|
+
"selected",
|
|
1122
|
+
"disabled"
|
|
1123
|
+
])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
|
|
1124
|
+
"ml-ribbon-gallery__preview--icon": J(r) || X(r),
|
|
1125
|
+
"ml-ribbon-gallery__preview--svg": Z(r)
|
|
1126
|
+
}]) }, [J(r) ? (v(), n(E(L), {
|
|
1127
|
+
key: 0,
|
|
1128
|
+
class: "ml-ribbon-gallery__preview-icon"
|
|
1129
|
+
}, {
|
|
1130
|
+
default: O(() => [(v(), n(C(J(r))))]),
|
|
1131
|
+
_: 2
|
|
1132
|
+
}, 1024)) : X(r) ? (v(), i("i", {
|
|
1133
|
+
key: 1,
|
|
1134
|
+
class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", X(r)]),
|
|
1135
|
+
"aria-hidden": "true"
|
|
1136
|
+
}, null, 2)) : Z(r) && Se(r) ? (v(), i("img", {
|
|
1137
|
+
key: 2,
|
|
1138
|
+
class: "ml-ribbon-gallery__preview-svg",
|
|
1139
|
+
src: Z(r) ?? "",
|
|
1140
|
+
alt: ""
|
|
1141
|
+
}, null, 8, ft)) : Z(r) ? (v(), i("svg", pt, [a("use", { href: Z(r) ?? "" }, null, 8, mt)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", ht, w(r.label), 1)], 64))])], 10, dt))), 128))], 4)]))), 128))], 512)]),
|
|
1142
|
+
_: 3
|
|
1143
|
+
}, 8, [
|
|
1144
|
+
"visible",
|
|
1145
|
+
"disabled",
|
|
1146
|
+
"width",
|
|
1147
|
+
"popper-class",
|
|
1148
|
+
"popper-options"
|
|
1149
|
+
])
|
|
1150
|
+
])) : r("", !0)]))
|
|
1151
|
+
], 2));
|
|
753
1152
|
}
|
|
754
|
-
}),
|
|
1153
|
+
}), Ct = ["data-id", "onKeydown"], wt = {
|
|
1154
|
+
key: 0,
|
|
1155
|
+
class: "ml-ribbon-input-number__prefix"
|
|
1156
|
+
}, Tt = {
|
|
1157
|
+
key: 2,
|
|
1158
|
+
class: "ml-ribbon-input-number__prefix-label"
|
|
1159
|
+
}, Et = /* @__PURE__ */ l({
|
|
1160
|
+
name: "MlRibbonInputNumber",
|
|
1161
|
+
__name: "RibbonInputNumber",
|
|
1162
|
+
props: {
|
|
1163
|
+
id: {},
|
|
1164
|
+
modelValue: { default: void 0 },
|
|
1165
|
+
width: { default: "96px" },
|
|
1166
|
+
prefixLabel: { default: void 0 },
|
|
1167
|
+
prefixIcon: { default: void 0 },
|
|
1168
|
+
prefixIconClass: { default: void 0 },
|
|
1169
|
+
controlProps: { default: () => ({}) },
|
|
1170
|
+
disabled: {
|
|
1171
|
+
type: Boolean,
|
|
1172
|
+
default: !1
|
|
1173
|
+
}
|
|
1174
|
+
},
|
|
1175
|
+
emits: ["change"],
|
|
1176
|
+
setup(e, { emit: a }) {
|
|
1177
|
+
let o = e, s = a, l = t(() => ne(o.width, "96px")), u = t(() => l.value === "100%"), d = t(() => u.value ? { width: "100%" } : {}), p = t(() => u.value ? {} : { width: l.value }), g = t(() => M(o.prefixLabel)), _ = t(() => !o.prefixIcon || typeof o.prefixIcon == "string" ? null : o.prefixIcon), y = t(() => M(o.prefixIconClass ?? (typeof o.prefixIcon == "string" ? o.prefixIcon : void 0)) ?? null), x = t(() => !!(g.value || _.value || y.value)), S = t(() => g.value ?? o.id), T = b(void 0);
|
|
1178
|
+
function D(e) {
|
|
1179
|
+
j(e);
|
|
1180
|
+
}
|
|
1181
|
+
function A(e) {
|
|
1182
|
+
e.preventDefault(), e.stopPropagation();
|
|
1183
|
+
let t = e.target;
|
|
1184
|
+
if (!(t instanceof HTMLInputElement)) return;
|
|
1185
|
+
let n = te(t.value);
|
|
1186
|
+
n === void 0 && t.value.trim().length > 0 || j(n);
|
|
1187
|
+
}
|
|
1188
|
+
function j(e) {
|
|
1189
|
+
Object.is(T.value, e) || (T.value = e, s("change", e));
|
|
1190
|
+
}
|
|
1191
|
+
function te(e) {
|
|
1192
|
+
let t = e.trim();
|
|
1193
|
+
if (!t) return;
|
|
1194
|
+
let n = Number(t);
|
|
1195
|
+
return Number.isFinite(n) ? n : void 0;
|
|
1196
|
+
}
|
|
1197
|
+
function M(e) {
|
|
1198
|
+
if (typeof e != "string") return;
|
|
1199
|
+
let t = e.trim();
|
|
1200
|
+
return t.length > 0 ? t : void 0;
|
|
1201
|
+
}
|
|
1202
|
+
function ne(e, t) {
|
|
1203
|
+
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1204
|
+
if (typeof e == "string") {
|
|
1205
|
+
let n = e.trim();
|
|
1206
|
+
return n ? n.toLowerCase() === "full" ? "100%" : n : t;
|
|
1207
|
+
}
|
|
1208
|
+
return t;
|
|
1209
|
+
}
|
|
1210
|
+
return (t, a) => (v(), i("div", {
|
|
1211
|
+
class: m(["ml-ribbon-input-number", {
|
|
1212
|
+
"has-prefix": x.value,
|
|
1213
|
+
"is-full": u.value
|
|
1214
|
+
}]),
|
|
1215
|
+
style: h(d.value),
|
|
1216
|
+
"data-id": e.id,
|
|
1217
|
+
onKeydown: k(ee(A, ["stop", "prevent"]), ["enter"])
|
|
1218
|
+
}, [x.value ? (v(), i("span", wt, [_.value ? (v(), n(E(L), {
|
|
1219
|
+
key: 0,
|
|
1220
|
+
class: "ml-ribbon-input-number__prefix-icon",
|
|
1221
|
+
"aria-hidden": "true"
|
|
1222
|
+
}, {
|
|
1223
|
+
default: O(() => [(v(), n(C(_.value)))]),
|
|
1224
|
+
_: 1
|
|
1225
|
+
})) : y.value ? (v(), i("i", {
|
|
1226
|
+
key: 1,
|
|
1227
|
+
class: m(["ml-ribbon-input-number__prefix-icon ml-ribbon-input-number__prefix-icon--class", y.value]),
|
|
1228
|
+
"aria-hidden": "true"
|
|
1229
|
+
}, null, 2)) : r("", !0), g.value ? (v(), i("span", Tt, w(g.value), 1)) : r("", !0)])) : r("", !0), c(E(re), f(e.controlProps, {
|
|
1230
|
+
"model-value": e.modelValue,
|
|
1231
|
+
disabled: e.disabled,
|
|
1232
|
+
style: p.value,
|
|
1233
|
+
"aria-label": S.value,
|
|
1234
|
+
onChange: D
|
|
1235
|
+
}), null, 16, [
|
|
1236
|
+
"model-value",
|
|
1237
|
+
"disabled",
|
|
1238
|
+
"style",
|
|
1239
|
+
"aria-label"
|
|
1240
|
+
])], 46, Ct));
|
|
1241
|
+
}
|
|
1242
|
+
}), Dt = ["data-id"], Ot = {
|
|
755
1243
|
key: 0,
|
|
756
1244
|
class: "ml-ribbon-segmented__label"
|
|
757
|
-
},
|
|
1245
|
+
}, kt = ["data-option-value"], At = {
|
|
758
1246
|
key: 2,
|
|
759
1247
|
class: "ml-ribbon-segmented__option-label"
|
|
760
|
-
},
|
|
1248
|
+
}, jt = {
|
|
761
1249
|
key: 3,
|
|
762
1250
|
class: "ml-ribbon-segmented__option-sr-label"
|
|
763
|
-
},
|
|
1251
|
+
}, Mt = /* @__PURE__ */ l({
|
|
764
1252
|
__name: "RibbonSegmented",
|
|
765
1253
|
props: {
|
|
766
1254
|
id: {},
|
|
@@ -816,7 +1304,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
816
1304
|
return (t, o) => (v(), i("div", {
|
|
817
1305
|
class: "ml-ribbon-segmented",
|
|
818
1306
|
"data-id": e.id
|
|
819
|
-
}, [d.value ? (v(), i("div",
|
|
1307
|
+
}, [d.value ? (v(), i("div", Ot, w(u.value), 1)) : r("", !0), c(E(B), {
|
|
820
1308
|
class: "ml-ribbon-segmented__control",
|
|
821
1309
|
options: e.options,
|
|
822
1310
|
"model-value": e.modelValue,
|
|
@@ -829,7 +1317,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
829
1317
|
default: O(({ item: e }) => [a("span", {
|
|
830
1318
|
class: "ml-ribbon-segmented__option",
|
|
831
1319
|
"data-option-value": y(e)
|
|
832
|
-
}, [h(e) ? (v(), n(E(
|
|
1320
|
+
}, [h(e) ? (v(), n(E(L), {
|
|
833
1321
|
key: 0,
|
|
834
1322
|
class: "ml-ribbon-segmented__option-icon",
|
|
835
1323
|
"aria-hidden": "true"
|
|
@@ -840,7 +1328,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
840
1328
|
key: 1,
|
|
841
1329
|
class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", g(e)]),
|
|
842
1330
|
"aria-hidden": "true"
|
|
843
|
-
}, null, 2)) : r("", !0), _(e) ? (v(), i("span",
|
|
1331
|
+
}, null, 2)) : r("", !0), _(e) ? (v(), i("span", At, w(p(e)), 1)) : (v(), i("span", jt, w(p(e)), 1))], 8, kt)]),
|
|
844
1332
|
_: 1
|
|
845
1333
|
}, 8, [
|
|
846
1334
|
"options",
|
|
@@ -849,9 +1337,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
849
1337
|
"block",
|
|
850
1338
|
"disabled",
|
|
851
1339
|
"aria-label"
|
|
852
|
-
])], 8,
|
|
1340
|
+
])], 8, Dt));
|
|
853
1341
|
}
|
|
854
|
-
}),
|
|
1342
|
+
}), Nt = /* @__PURE__ */ l({
|
|
855
1343
|
__name: "RibbonToggleButton",
|
|
856
1344
|
props: {
|
|
857
1345
|
id: {},
|
|
@@ -885,7 +1373,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
885
1373
|
let e = !o.value;
|
|
886
1374
|
o.value = e, a("change", e);
|
|
887
1375
|
}
|
|
888
|
-
return (t, r) => (v(), n(
|
|
1376
|
+
return (t, r) => (v(), n(Ae, {
|
|
889
1377
|
id: e.id,
|
|
890
1378
|
class: m(["ml-ribbon-toggle", { "is-active": s.value }]),
|
|
891
1379
|
icon: c.value,
|
|
@@ -906,7 +1394,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
906
1394
|
"aria-pressed"
|
|
907
1395
|
]));
|
|
908
1396
|
}
|
|
909
|
-
}),
|
|
1397
|
+
}), Pt = ["data-template-id", "aria-disabled"], Ft = /* @__PURE__ */ l({
|
|
910
1398
|
__name: "RibbonTemplateItem",
|
|
911
1399
|
props: {
|
|
912
1400
|
id: {},
|
|
@@ -921,12 +1409,12 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
921
1409
|
}, [S(t.$slots, "default", {
|
|
922
1410
|
item: e.item,
|
|
923
1411
|
disabled: e.disabled
|
|
924
|
-
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8,
|
|
1412
|
+
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8, Pt));
|
|
925
1413
|
}
|
|
926
|
-
}),
|
|
1414
|
+
}), It = ["data-item-id"], Lt = {
|
|
927
1415
|
key: 0,
|
|
928
1416
|
class: "ml-ribbon-item-host__keytip"
|
|
929
|
-
},
|
|
1417
|
+
}, Rt = /* @__PURE__ */ l({
|
|
930
1418
|
__name: "RibbonItemHost",
|
|
931
1419
|
props: {
|
|
932
1420
|
id: {},
|
|
@@ -937,101 +1425,123 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
937
1425
|
},
|
|
938
1426
|
emits: ["item-click"],
|
|
939
1427
|
setup(o, { emit: c }) {
|
|
940
|
-
let l = o,
|
|
941
|
-
if (!
|
|
942
|
-
let e =
|
|
943
|
-
return e ?
|
|
944
|
-
}),
|
|
1428
|
+
let l = o, p = c, g = u(fe, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y = ae("size", ""), k = t(() => y.value || "default"), ee = t(() => je(g?.tooltipShowAfter.value, 1e3)), A = t(() => je(g?.tooltipHideAfter.value, 0)), j = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${k.value}`), ne = t(() => l.item.props?.icon || l.item.icon), N = t(() => l.item.hideLabel !== !0), P = b(void 0), F = t(() => l.item.type === "dropdown" && P.value ? P.value : ke(l.item.tooltip) ?? ke(l.item.label) ?? Le(l.item) ?? Re(l.item.id)), I = t(() => l.item.type !== "buttonGroup"), L = t(() => !I.value || !F.value), re = t(() => F.value ?? l.item.id), z = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), B = t(() => {
|
|
1429
|
+
if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !z.value) return !1;
|
|
1430
|
+
let e = g.keyTipsSequence.value.toLowerCase();
|
|
1431
|
+
return e ? z.value.toLowerCase().startsWith(e) : !0;
|
|
1432
|
+
}), H = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), U = t(() => l.item.props?.modelValue), oe = t(() => l.item.props?.activeLabel), se = t(() => l.item.props?.inactiveLabel), ce = t(() => Array.isArray(l.item.props?.categories) ? l.item.props.categories : []), le = t(() => {
|
|
1433
|
+
let e = l.item.props?.modelValue;
|
|
1434
|
+
return typeof e == "string" ? e : void 0;
|
|
1435
|
+
}), ue = t(() => {
|
|
1436
|
+
let e = l.item.props?.inlineItemLimit;
|
|
1437
|
+
return typeof e == "number" ? e : void 0;
|
|
1438
|
+
}), de = t(() => {
|
|
945
1439
|
let e = l.item.props?.component;
|
|
946
|
-
return !e || typeof e == "string" ? null : e;
|
|
947
|
-
}),
|
|
1440
|
+
return !e || typeof e == "string" ? null : d(T(e));
|
|
1441
|
+
}), W = t(() => {
|
|
948
1442
|
let e = l.item.props?.componentProps;
|
|
949
1443
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
950
|
-
}),
|
|
1444
|
+
}), G = t(() => l.item.props?.wrap !== !1), K = t(() => l.item.props?.equalWidth === !0), pe = t(() => {
|
|
951
1445
|
let e = l.item.props?.buttonSize;
|
|
952
1446
|
if (e === "large" || e === "default" || e === "small") return e;
|
|
953
|
-
}),
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1447
|
+
}), me = t(() => Fe(l.item.props?.iconSize)), q = t(() => Me(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), he = t(() => l.item.props?.modelValue), ge = t(() => Me(l.item.props?.width ?? l.item.props?.inputNumberWidth, "96px")), _e = t(() => l.item.props?.modelValue), ve = t(() => {
|
|
1448
|
+
let e = { ...l.item.props ?? {} };
|
|
1449
|
+
return delete e.modelValue, delete e.width, delete e.inputNumberWidth, delete e.prefixLabel, delete e.prefixIcon, delete e.prefixIconClass, delete e.emitValueOnChange, delete e.valuePrefix, delete e.options, delete e.component, delete e.componentProps, e;
|
|
1450
|
+
}), ye = t(() => Ie(l.item.props?.labelWrapLines)), J = t(() => Ne(l.item.props?.labelWrapWidth)), be = t(() => l.item.type === "button" && l.item.size === "large" && N.value && (ye.value ?? 0) > 1), Y = t(() => {
|
|
1451
|
+
if (!be.value) return {};
|
|
1452
|
+
let e = { "--ml-rb-item-label-max-lines": String(ye.value ?? 2) };
|
|
1453
|
+
return J.value && (e["--ml-rb-item-label-wrap-width"] = J.value), e;
|
|
957
1454
|
});
|
|
958
1455
|
D(() => l.item.id, () => {
|
|
959
|
-
|
|
1456
|
+
P.value = void 0;
|
|
960
1457
|
});
|
|
961
1458
|
function X() {
|
|
962
|
-
|
|
1459
|
+
H.value || p("item-click", l.id);
|
|
963
1460
|
}
|
|
964
|
-
function
|
|
965
|
-
if (!
|
|
1461
|
+
function Z(e) {
|
|
1462
|
+
if (!H.value) {
|
|
966
1463
|
if (typeof e == "string" || typeof e == "number") {
|
|
967
|
-
|
|
1464
|
+
p("item-click", String(e));
|
|
968
1465
|
return;
|
|
969
1466
|
}
|
|
970
1467
|
X();
|
|
971
1468
|
}
|
|
972
1469
|
}
|
|
973
|
-
function
|
|
974
|
-
|
|
1470
|
+
function xe(e) {
|
|
1471
|
+
P.value = e;
|
|
975
1472
|
}
|
|
976
|
-
function
|
|
977
|
-
if (!
|
|
1473
|
+
function Se(e) {
|
|
1474
|
+
if (!H.value) {
|
|
978
1475
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
979
|
-
|
|
1476
|
+
p("item-click", String(e));
|
|
980
1477
|
return;
|
|
981
1478
|
}
|
|
982
1479
|
X();
|
|
983
1480
|
}
|
|
984
1481
|
}
|
|
985
|
-
function
|
|
986
|
-
if (
|
|
1482
|
+
function Ce(e) {
|
|
1483
|
+
if (H.value) return;
|
|
987
1484
|
let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
|
|
988
1485
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
989
|
-
|
|
1486
|
+
p("item-click", String(t));
|
|
990
1487
|
return;
|
|
991
1488
|
}
|
|
992
|
-
|
|
1489
|
+
p("item-click", String(e));
|
|
993
1490
|
}
|
|
994
|
-
function
|
|
995
|
-
if (!
|
|
1491
|
+
function Q(e) {
|
|
1492
|
+
if (!H.value) {
|
|
996
1493
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
997
|
-
|
|
1494
|
+
p("item-click", String(e));
|
|
998
1495
|
return;
|
|
999
1496
|
}
|
|
1000
1497
|
X();
|
|
1001
1498
|
}
|
|
1002
1499
|
}
|
|
1003
|
-
function
|
|
1004
|
-
|
|
1500
|
+
function we(e) {
|
|
1501
|
+
H.value || p("item-click", e);
|
|
1502
|
+
}
|
|
1503
|
+
function Te(e) {
|
|
1504
|
+
if (!H.value) {
|
|
1005
1505
|
if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
|
|
1006
|
-
|
|
1506
|
+
p("item-click", String(e));
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1509
|
+
X();
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
function Ee(e) {
|
|
1513
|
+
if (!H.value) {
|
|
1514
|
+
if (l.item.props?.emitValueOnChange === !0 && typeof e == "number" && Number.isFinite(e)) {
|
|
1515
|
+
let t = l.item.props?.valuePrefix;
|
|
1516
|
+
p("item-click", `${typeof t == "string" ? t : ""}${e}`);
|
|
1007
1517
|
return;
|
|
1008
1518
|
}
|
|
1009
1519
|
X();
|
|
1010
1520
|
}
|
|
1011
1521
|
}
|
|
1012
|
-
function
|
|
1013
|
-
if (!
|
|
1522
|
+
function De(e) {
|
|
1523
|
+
if (!H.value) {
|
|
1014
1524
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
1015
|
-
|
|
1525
|
+
p("item-click", String(e));
|
|
1016
1526
|
return;
|
|
1017
1527
|
}
|
|
1018
1528
|
X();
|
|
1019
1529
|
}
|
|
1020
1530
|
}
|
|
1021
|
-
function
|
|
1531
|
+
function Oe(e) {
|
|
1022
1532
|
if (!e || typeof e != "object") return;
|
|
1023
1533
|
let t = e.label;
|
|
1024
1534
|
return typeof t == "string" ? t : void 0;
|
|
1025
1535
|
}
|
|
1026
|
-
function
|
|
1536
|
+
function ke(e) {
|
|
1027
1537
|
if (typeof e != "string") return;
|
|
1028
1538
|
let t = e.trim();
|
|
1029
1539
|
return t.length > 0 ? t : void 0;
|
|
1030
1540
|
}
|
|
1031
|
-
function
|
|
1541
|
+
function je(e, t) {
|
|
1032
1542
|
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1033
1543
|
}
|
|
1034
|
-
function
|
|
1544
|
+
function Me(e, t) {
|
|
1035
1545
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1036
1546
|
if (typeof e == "string") {
|
|
1037
1547
|
let n = e.trim();
|
|
@@ -1039,35 +1549,35 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1039
1549
|
}
|
|
1040
1550
|
return t;
|
|
1041
1551
|
}
|
|
1042
|
-
function
|
|
1552
|
+
function Ne(e) {
|
|
1043
1553
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1044
1554
|
if (typeof e == "string") {
|
|
1045
1555
|
let t = e.trim();
|
|
1046
1556
|
return t ? t.toLowerCase() === "full" ? "100%" : t : void 0;
|
|
1047
1557
|
}
|
|
1048
1558
|
}
|
|
1049
|
-
function
|
|
1559
|
+
function Fe(e) {
|
|
1050
1560
|
if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
|
|
1051
1561
|
if (typeof e != "string") return;
|
|
1052
1562
|
let t = e.trim();
|
|
1053
1563
|
return t.length > 0 ? t : void 0;
|
|
1054
1564
|
}
|
|
1055
|
-
function
|
|
1565
|
+
function Ie(e) {
|
|
1056
1566
|
if (!(typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e))) return Math.max(1, Math.round(e));
|
|
1057
1567
|
}
|
|
1058
|
-
function
|
|
1059
|
-
let t =
|
|
1568
|
+
function Le(e) {
|
|
1569
|
+
let t = _.value.map((e) => Oe(e)).filter((e) => !!e);
|
|
1060
1570
|
if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
|
|
1061
1571
|
}
|
|
1062
|
-
function
|
|
1572
|
+
function Re(e) {
|
|
1063
1573
|
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
1064
1574
|
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
1065
1575
|
}
|
|
1066
|
-
return (t, c) => (v(), n(E(
|
|
1067
|
-
content:
|
|
1068
|
-
disabled:
|
|
1069
|
-
"show-after":
|
|
1070
|
-
"hide-after":
|
|
1576
|
+
return (t, c) => (v(), n(E(ie), {
|
|
1577
|
+
content: F.value,
|
|
1578
|
+
disabled: L.value,
|
|
1579
|
+
"show-after": ee.value,
|
|
1580
|
+
"hide-after": A.value,
|
|
1071
1581
|
placement: "top",
|
|
1072
1582
|
effect: "dark"
|
|
1073
1583
|
}, {
|
|
@@ -1077,26 +1587,26 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1077
1587
|
`type-${o.item.type}`,
|
|
1078
1588
|
{
|
|
1079
1589
|
"is-label-hidden": o.item.hideLabel === !0,
|
|
1080
|
-
"is-label-wrap":
|
|
1590
|
+
"is-label-wrap": be.value
|
|
1081
1591
|
}
|
|
1082
1592
|
]]),
|
|
1083
1593
|
style: h(Y.value),
|
|
1084
1594
|
"data-item-id": o.id,
|
|
1085
1595
|
role: "group"
|
|
1086
|
-
}, [
|
|
1596
|
+
}, [B.value ? (v(), i("span", Lt, w(z.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Pe, {
|
|
1087
1597
|
key: 1,
|
|
1088
1598
|
id: o.item.id,
|
|
1089
1599
|
label: o.item.label ?? "",
|
|
1090
1600
|
options: o.item.props?.options ?? [],
|
|
1091
1601
|
"hide-label": o.item.hideLabel === !0,
|
|
1092
|
-
wrap:
|
|
1093
|
-
"equal-width":
|
|
1094
|
-
"button-size":
|
|
1095
|
-
"icon-size":
|
|
1096
|
-
"tooltip-show-after":
|
|
1097
|
-
"tooltip-hide-after":
|
|
1098
|
-
disabled:
|
|
1099
|
-
onChange:
|
|
1602
|
+
wrap: G.value,
|
|
1603
|
+
"equal-width": K.value,
|
|
1604
|
+
"button-size": pe.value,
|
|
1605
|
+
"icon-size": me.value,
|
|
1606
|
+
"tooltip-show-after": ee.value,
|
|
1607
|
+
"tooltip-hide-after": A.value,
|
|
1608
|
+
disabled: H.value,
|
|
1609
|
+
onChange: Q
|
|
1100
1610
|
}, null, 8, [
|
|
1101
1611
|
"id",
|
|
1102
1612
|
"label",
|
|
@@ -1109,7 +1619,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1109
1619
|
"tooltip-show-after",
|
|
1110
1620
|
"tooltip-hide-after",
|
|
1111
1621
|
"disabled"
|
|
1112
|
-
])) : o.item.type === "segmented" ? (v(), n(
|
|
1622
|
+
])) : o.item.type === "segmented" ? (v(), n(Mt, {
|
|
1113
1623
|
key: 2,
|
|
1114
1624
|
id: o.item.id,
|
|
1115
1625
|
label: o.item.label ?? o.item.id,
|
|
@@ -1117,9 +1627,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1117
1627
|
"model-value": o.item.props?.modelValue,
|
|
1118
1628
|
direction: o.item.props?.direction ?? "horizontal",
|
|
1119
1629
|
block: o.item.props?.block === !0,
|
|
1120
|
-
disabled:
|
|
1630
|
+
disabled: H.value,
|
|
1121
1631
|
"hide-label": o.item.hideLabel === !0,
|
|
1122
|
-
onChange:
|
|
1632
|
+
onChange: Se
|
|
1123
1633
|
}, null, 8, [
|
|
1124
1634
|
"id",
|
|
1125
1635
|
"label",
|
|
@@ -1129,18 +1639,18 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1129
1639
|
"block",
|
|
1130
1640
|
"disabled",
|
|
1131
1641
|
"hide-label"
|
|
1132
|
-
])) : o.item.type === "toggle" ? (v(), n(
|
|
1642
|
+
])) : o.item.type === "toggle" ? (v(), n(Nt, {
|
|
1133
1643
|
key: 3,
|
|
1134
1644
|
id: o.item.id,
|
|
1135
1645
|
label: o.item.label ?? o.item.id,
|
|
1136
|
-
"model-value":
|
|
1646
|
+
"model-value": U.value,
|
|
1137
1647
|
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1138
1648
|
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1139
|
-
"active-label":
|
|
1140
|
-
"inactive-label":
|
|
1141
|
-
disabled:
|
|
1649
|
+
"active-label": oe.value,
|
|
1650
|
+
"inactive-label": se.value,
|
|
1651
|
+
disabled: H.value,
|
|
1142
1652
|
"hide-label": o.item.hideLabel === !0,
|
|
1143
|
-
onChange:
|
|
1653
|
+
onChange: Ce
|
|
1144
1654
|
}, null, 8, [
|
|
1145
1655
|
"id",
|
|
1146
1656
|
"label",
|
|
@@ -1151,31 +1661,37 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1151
1661
|
"inactive-label",
|
|
1152
1662
|
"disabled",
|
|
1153
1663
|
"hide-label"
|
|
1154
|
-
])) : o.item.type === "gallery" ? (v(), n(
|
|
1664
|
+
])) : o.item.type === "gallery" ? (v(), n(St, {
|
|
1155
1665
|
key: 4,
|
|
1156
1666
|
id: o.item.id,
|
|
1157
1667
|
label: o.item.label ?? "",
|
|
1158
|
-
categories:
|
|
1668
|
+
categories: ce.value,
|
|
1669
|
+
"model-value": le.value,
|
|
1670
|
+
collapsed: o.item.props?.collapsed === !0,
|
|
1671
|
+
"inline-item-limit": ue.value,
|
|
1159
1672
|
"preview-fallback": l.galleryPreviewFallback,
|
|
1160
|
-
disabled:
|
|
1161
|
-
onSelect:
|
|
1673
|
+
disabled: H.value,
|
|
1674
|
+
onSelect: we
|
|
1162
1675
|
}, null, 8, [
|
|
1163
1676
|
"id",
|
|
1164
1677
|
"label",
|
|
1165
1678
|
"categories",
|
|
1679
|
+
"model-value",
|
|
1680
|
+
"collapsed",
|
|
1681
|
+
"inline-item-limit",
|
|
1166
1682
|
"preview-fallback",
|
|
1167
1683
|
"disabled"
|
|
1168
|
-
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(
|
|
1684
|
+
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(Ft, {
|
|
1169
1685
|
key: 5,
|
|
1170
1686
|
id: o.item.id,
|
|
1171
1687
|
item: o.item,
|
|
1172
|
-
disabled:
|
|
1688
|
+
disabled: H.value
|
|
1173
1689
|
}, {
|
|
1174
|
-
default: O(() => [
|
|
1690
|
+
default: O(() => [de.value ? (v(), n(C(de.value), f({ key: 0 }, W.value, {
|
|
1175
1691
|
item: o.item,
|
|
1176
1692
|
"group-id": o.groupId,
|
|
1177
|
-
disabled:
|
|
1178
|
-
"emit-item-click":
|
|
1693
|
+
disabled: H.value,
|
|
1694
|
+
"emit-item-click": De
|
|
1179
1695
|
}), null, 16, [
|
|
1180
1696
|
"item",
|
|
1181
1697
|
"group-id",
|
|
@@ -1183,28 +1699,28 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1183
1699
|
])) : S(t.$slots, "template", {
|
|
1184
1700
|
key: 1,
|
|
1185
1701
|
item: o.item,
|
|
1186
|
-
disabled:
|
|
1702
|
+
disabled: H.value
|
|
1187
1703
|
})]),
|
|
1188
1704
|
_: 3
|
|
1189
1705
|
}, 8, [
|
|
1190
1706
|
"id",
|
|
1191
1707
|
"item",
|
|
1192
1708
|
"disabled"
|
|
1193
|
-
])) : o.item.type === "dropdown" ? (v(), n(
|
|
1709
|
+
])) : o.item.type === "dropdown" ? (v(), n(Be, {
|
|
1194
1710
|
key: 6,
|
|
1195
1711
|
id: o.item.id,
|
|
1196
1712
|
label: o.item.label ?? o.item.id,
|
|
1197
1713
|
tooltip: o.item.tooltip,
|
|
1198
|
-
icon:
|
|
1714
|
+
icon: ne.value,
|
|
1199
1715
|
options: o.item.props?.options ?? [],
|
|
1200
|
-
disabled:
|
|
1716
|
+
disabled: H.value,
|
|
1201
1717
|
"hide-label": o.item.hideLabel === !0,
|
|
1202
1718
|
"item-size": o.item.size ?? "medium",
|
|
1203
1719
|
"sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
|
|
1204
|
-
"tooltip-show-after":
|
|
1205
|
-
"tooltip-hide-after":
|
|
1206
|
-
onCommand:
|
|
1207
|
-
onTooltipChange:
|
|
1720
|
+
"tooltip-show-after": ee.value,
|
|
1721
|
+
"tooltip-hide-after": A.value,
|
|
1722
|
+
onCommand: Z,
|
|
1723
|
+
onTooltipChange: xe,
|
|
1208
1724
|
onClick: X
|
|
1209
1725
|
}, null, 8, [
|
|
1210
1726
|
"id",
|
|
@@ -1220,24 +1736,24 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1220
1736
|
"tooltip-hide-after"
|
|
1221
1737
|
])) : o.item.type === "checkbox" ? (v(), n(E(te), {
|
|
1222
1738
|
key: 7,
|
|
1223
|
-
disabled:
|
|
1739
|
+
disabled: H.value,
|
|
1224
1740
|
onChange: X
|
|
1225
1741
|
}, {
|
|
1226
1742
|
default: O(() => [s(w(o.item.label), 1)]),
|
|
1227
1743
|
_: 1
|
|
1228
|
-
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(
|
|
1744
|
+
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(M), {
|
|
1229
1745
|
key: 8,
|
|
1230
|
-
disabled:
|
|
1746
|
+
disabled: H.value,
|
|
1231
1747
|
onChange: X
|
|
1232
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(
|
|
1748
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(V), {
|
|
1233
1749
|
key: 9,
|
|
1234
|
-
"model-value":
|
|
1235
|
-
disabled:
|
|
1236
|
-
"popper-class":
|
|
1237
|
-
style: h({ width:
|
|
1238
|
-
onChange:
|
|
1750
|
+
"model-value": he.value,
|
|
1751
|
+
disabled: H.value,
|
|
1752
|
+
"popper-class": j.value,
|
|
1753
|
+
style: h({ width: q.value }),
|
|
1754
|
+
onChange: Te
|
|
1239
1755
|
}, {
|
|
1240
|
-
default: O(() => [(v(!0), i(e, null, x(
|
|
1756
|
+
default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(R), {
|
|
1241
1757
|
key: String(e.value),
|
|
1242
1758
|
label: String(e.label),
|
|
1243
1759
|
value: e.value
|
|
@@ -1248,14 +1764,34 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1248
1764
|
"disabled",
|
|
1249
1765
|
"popper-class",
|
|
1250
1766
|
"style"
|
|
1251
|
-
])) : (v(), n(
|
|
1767
|
+
])) : o.item.type === "inputNumber" ? (v(), n(Et, {
|
|
1252
1768
|
key: 10,
|
|
1253
1769
|
id: o.item.id,
|
|
1770
|
+
"model-value": _e.value,
|
|
1771
|
+
width: ge.value,
|
|
1772
|
+
"prefix-label": o.item.props?.prefixLabel,
|
|
1773
|
+
"prefix-icon": o.item.props?.prefixIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
1774
|
+
"prefix-icon-class": o.item.props?.prefixIconClass,
|
|
1775
|
+
"control-props": ve.value,
|
|
1776
|
+
disabled: H.value,
|
|
1777
|
+
onChange: Ee
|
|
1778
|
+
}, null, 8, [
|
|
1779
|
+
"id",
|
|
1780
|
+
"model-value",
|
|
1781
|
+
"width",
|
|
1782
|
+
"prefix-label",
|
|
1783
|
+
"prefix-icon",
|
|
1784
|
+
"prefix-icon-class",
|
|
1785
|
+
"control-props",
|
|
1786
|
+
"disabled"
|
|
1787
|
+
])) : (v(), n(Ae, {
|
|
1788
|
+
key: 11,
|
|
1789
|
+
id: o.item.id,
|
|
1254
1790
|
label: o.item.label ?? o.item.id,
|
|
1255
|
-
icon:
|
|
1256
|
-
disabled:
|
|
1257
|
-
"hide-label": !
|
|
1258
|
-
"aria-label":
|
|
1791
|
+
icon: ne.value,
|
|
1792
|
+
disabled: H.value,
|
|
1793
|
+
"hide-label": !N.value,
|
|
1794
|
+
"aria-label": re.value,
|
|
1259
1795
|
onClick: X
|
|
1260
1796
|
}, null, 8, [
|
|
1261
1797
|
"id",
|
|
@@ -1264,7 +1800,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1264
1800
|
"disabled",
|
|
1265
1801
|
"hide-label",
|
|
1266
1802
|
"aria-label"
|
|
1267
|
-
]))], 14,
|
|
1803
|
+
]))], 14, It)]),
|
|
1268
1804
|
_: 3
|
|
1269
1805
|
}, 8, [
|
|
1270
1806
|
"content",
|
|
@@ -1273,7 +1809,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1273
1809
|
"hide-after"
|
|
1274
1810
|
]));
|
|
1275
1811
|
}
|
|
1276
|
-
}),
|
|
1812
|
+
}), zt = /* @__PURE__ */ l({
|
|
1277
1813
|
__name: "RibbonGroupContent",
|
|
1278
1814
|
props: {
|
|
1279
1815
|
group: {},
|
|
@@ -1283,13 +1819,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1283
1819
|
emits: ["item-click"],
|
|
1284
1820
|
setup(t, { emit: r }) {
|
|
1285
1821
|
let a = t, o = r;
|
|
1286
|
-
return (t, r) => (v(), i("div", { class: m(["ml-ribbon-group__content", [`ml-ribbon-group__content--${a.group.orientation ?? "column"}`]]) }, [(v(!0), i(e, null, x(a.group.collections ?? [], (t) => (v(), n(
|
|
1822
|
+
return (t, r) => (v(), i("div", { class: m(["ml-ribbon-group__content", [`ml-ribbon-group__content--${a.group.orientation ?? "column"}`]]) }, [(v(!0), i(e, null, x(a.group.collections ?? [], (t) => (v(), n(Oe, {
|
|
1287
1823
|
id: t.id,
|
|
1288
1824
|
key: t.id,
|
|
1289
1825
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
1290
1826
|
rows: t.rows
|
|
1291
1827
|
}, {
|
|
1292
|
-
default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(
|
|
1828
|
+
default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(Rt, {
|
|
1293
1829
|
id: e.id,
|
|
1294
1830
|
key: e.id,
|
|
1295
1831
|
item: e,
|
|
@@ -1314,15 +1850,15 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1314
1850
|
"rows"
|
|
1315
1851
|
]))), 128))], 2));
|
|
1316
1852
|
}
|
|
1317
|
-
}),
|
|
1853
|
+
}), Bt = ["data-priority"], Vt = { class: "ml-ribbon-group__body" }, Ht = { class: "ml-ribbon-group__footer" }, Ut = { class: "ml-ribbon-group__title" }, Wt = [
|
|
1318
1854
|
"aria-label",
|
|
1319
1855
|
"aria-expanded",
|
|
1320
1856
|
"disabled"
|
|
1321
|
-
],
|
|
1857
|
+
], Gt = { class: "ml-ribbon-group__overflow-content" }, Kt = [
|
|
1322
1858
|
"aria-label",
|
|
1323
1859
|
"aria-expanded",
|
|
1324
1860
|
"disabled"
|
|
1325
|
-
],
|
|
1861
|
+
], qt = { class: "ml-ribbon-group__overflow-content" }, Jt = /* @__PURE__ */ l({
|
|
1326
1862
|
__name: "RibbonGroup",
|
|
1327
1863
|
props: {
|
|
1328
1864
|
id: {},
|
|
@@ -1341,7 +1877,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1341
1877
|
},
|
|
1342
1878
|
emits: ["item-click"],
|
|
1343
1879
|
setup(e, { emit: o }) {
|
|
1344
|
-
let s = e, l = o, d = u(
|
|
1880
|
+
let s = e, l = o, d = u(fe, null), f = t(() => s.width == null), y = t(() => {
|
|
1345
1881
|
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
1346
1882
|
let e = `${s.width}px`;
|
|
1347
1883
|
return {
|
|
@@ -1350,13 +1886,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1350
1886
|
maxWidth: e,
|
|
1351
1887
|
flex: `0 0 ${e}`
|
|
1352
1888
|
};
|
|
1353
|
-
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]),
|
|
1889
|
+
}), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), ee = b(null), j = b(null), te = b(0), M = b(0), ne = ae("size", ""), N = t(() => ne.value || "default"), P = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${N.value}`), F = t(() => ({ modifiers: [{
|
|
1354
1890
|
name: "offset",
|
|
1355
|
-
options: { offset: [
|
|
1356
|
-
}] })),
|
|
1891
|
+
options: { offset: [te.value, 8] }
|
|
1892
|
+
}] })), I = t(() => ({ modifiers: [{
|
|
1357
1893
|
name: "offset",
|
|
1358
|
-
options: { offset: [
|
|
1359
|
-
}] })), re = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon),
|
|
1894
|
+
options: { offset: [M.value, 8] }
|
|
1895
|
+
}] })), re = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), R = t(() => k.value.length > 0), B = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), V = b(!1), H = b(!1), ie = t(() => {
|
|
1360
1896
|
if (!s.groupModel || !k.value.length) return null;
|
|
1361
1897
|
let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
|
|
1362
1898
|
...t,
|
|
@@ -1366,7 +1902,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1366
1902
|
...s.groupModel,
|
|
1367
1903
|
collections: t
|
|
1368
1904
|
} : null;
|
|
1369
|
-
}),
|
|
1905
|
+
}), oe = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
1370
1906
|
id: `${s.groupModel.id}-footer-menu`,
|
|
1371
1907
|
title: "",
|
|
1372
1908
|
orientation: "row",
|
|
@@ -1395,97 +1931,97 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1395
1931
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
1396
1932
|
}), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
|
|
1397
1933
|
}
|
|
1398
|
-
function
|
|
1934
|
+
function le() {
|
|
1399
1935
|
p(() => {
|
|
1400
|
-
|
|
1936
|
+
ge(), ue(), de(), ce();
|
|
1401
1937
|
});
|
|
1402
1938
|
}
|
|
1403
1939
|
function ue() {
|
|
1404
|
-
let e = T.value?.getBoundingClientRect(), t =
|
|
1940
|
+
let e = T.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
|
|
1405
1941
|
if (!e || !t) {
|
|
1406
|
-
|
|
1942
|
+
te.value !== 0 && (te.value = 0);
|
|
1407
1943
|
return;
|
|
1408
1944
|
}
|
|
1409
1945
|
let n = Math.round(e.left - t.left);
|
|
1410
|
-
|
|
1946
|
+
te.value !== n && (te.value = n);
|
|
1411
1947
|
}
|
|
1412
|
-
function
|
|
1413
|
-
let e = T.value?.getBoundingClientRect(), t =
|
|
1948
|
+
function de() {
|
|
1949
|
+
let e = T.value?.getBoundingClientRect(), t = j.value?.getBoundingClientRect();
|
|
1414
1950
|
if (!e || !t) {
|
|
1415
|
-
|
|
1951
|
+
M.value !== 0 && (M.value = 0);
|
|
1416
1952
|
return;
|
|
1417
1953
|
}
|
|
1418
1954
|
let n = Math.round(e.left - t.left);
|
|
1419
|
-
|
|
1955
|
+
M.value !== n && (M.value = n);
|
|
1420
1956
|
}
|
|
1421
|
-
function
|
|
1957
|
+
function G(e) {
|
|
1422
1958
|
V.value = e;
|
|
1423
1959
|
}
|
|
1424
|
-
function
|
|
1960
|
+
function K(e) {
|
|
1425
1961
|
H.value = e;
|
|
1426
1962
|
}
|
|
1427
|
-
function
|
|
1963
|
+
function pe() {
|
|
1428
1964
|
x.value || (V.value = !V.value);
|
|
1429
1965
|
}
|
|
1430
|
-
function
|
|
1966
|
+
function me() {
|
|
1431
1967
|
x.value || (H.value = !H.value);
|
|
1432
1968
|
}
|
|
1433
|
-
let
|
|
1434
|
-
function
|
|
1435
|
-
if (!
|
|
1969
|
+
let q = null, he = null;
|
|
1970
|
+
function ge() {
|
|
1971
|
+
if (!q) return;
|
|
1436
1972
|
let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1437
|
-
|
|
1973
|
+
he !== e && (he && q.unobserve(he), e && q.observe(e), he = e);
|
|
1438
1974
|
}
|
|
1439
1975
|
return D(() => s.groupModel, () => {
|
|
1440
|
-
|
|
1976
|
+
le();
|
|
1441
1977
|
}, { deep: !0 }), D(x, (e) => {
|
|
1442
1978
|
e && (V.value = !1, H.value = !1);
|
|
1443
1979
|
}), g(() => {
|
|
1444
|
-
typeof ResizeObserver < "u" && (
|
|
1445
|
-
ue(),
|
|
1446
|
-
}), T.value &&
|
|
1980
|
+
typeof ResizeObserver < "u" && (q = new ResizeObserver(() => {
|
|
1981
|
+
ue(), de(), ce();
|
|
1982
|
+
}), T.value && q.observe(T.value), ge()), le();
|
|
1447
1983
|
}), _(() => {
|
|
1448
|
-
|
|
1984
|
+
q?.disconnect();
|
|
1449
1985
|
}), (t, o) => (v(), i("section", {
|
|
1450
1986
|
ref_key: "groupSectionRef",
|
|
1451
1987
|
ref: T,
|
|
1452
1988
|
class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
|
|
1453
1989
|
"data-priority": e.priority ?? 100,
|
|
1454
1990
|
style: h(y.value)
|
|
1455
|
-
}, [a("div",
|
|
1456
|
-
re.value ? (v(), n(E(
|
|
1991
|
+
}, [a("div", Vt, [S(t.$slots, "default")]), a("footer", Ht, [
|
|
1992
|
+
re.value ? (v(), n(E(L), {
|
|
1457
1993
|
key: 0,
|
|
1458
1994
|
class: "ml-ribbon-group__icon"
|
|
1459
1995
|
}, {
|
|
1460
1996
|
default: O(() => [(v(), n(C(re.value)))]),
|
|
1461
1997
|
_: 1
|
|
1462
1998
|
})) : r("", !0),
|
|
1463
|
-
a("span",
|
|
1464
|
-
B.value &&
|
|
1999
|
+
a("span", Ut, w(e.title), 1),
|
|
2000
|
+
B.value && oe.value ? (v(), n(E(z), {
|
|
1465
2001
|
key: 1,
|
|
1466
2002
|
trigger: "click",
|
|
1467
2003
|
placement: "bottom-start",
|
|
1468
2004
|
disabled: x.value,
|
|
1469
2005
|
"popper-class": P.value,
|
|
1470
|
-
"popper-options":
|
|
1471
|
-
onShow: o[1] ||= (e) =>
|
|
1472
|
-
onHide: o[2] ||= (e) =>
|
|
2006
|
+
"popper-options": I.value,
|
|
2007
|
+
onShow: o[1] ||= (e) => G(!0),
|
|
2008
|
+
onHide: o[2] ||= (e) => G(!1)
|
|
1473
2009
|
}, {
|
|
1474
2010
|
reference: O(() => [a("button", {
|
|
1475
2011
|
ref_key: "footerTriggerRef",
|
|
1476
|
-
ref:
|
|
2012
|
+
ref: j,
|
|
1477
2013
|
type: "button",
|
|
1478
2014
|
class: m(["ml-ribbon-group__footer-trigger", { "is-open": V.value }]),
|
|
1479
2015
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1480
2016
|
"aria-expanded": V.value,
|
|
1481
2017
|
disabled: x.value,
|
|
1482
|
-
onClick:
|
|
1483
|
-
}, [c(E(
|
|
1484
|
-
default: O(() => [(v(), n(C(V.value ? E(
|
|
2018
|
+
onClick: pe
|
|
2019
|
+
}, [c(E(L), null, {
|
|
2020
|
+
default: O(() => [(v(), n(C(V.value ? E(se) : E(U))))]),
|
|
1485
2021
|
_: 1
|
|
1486
|
-
})], 10,
|
|
1487
|
-
default: O(() => [a("div",
|
|
1488
|
-
group:
|
|
2022
|
+
})], 10, Wt)]),
|
|
2023
|
+
default: O(() => [a("div", Gt, [c(zt, {
|
|
2024
|
+
group: oe.value,
|
|
1489
2025
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1490
2026
|
disabled: x.value,
|
|
1491
2027
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
@@ -1500,31 +2036,31 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1500
2036
|
"popper-class",
|
|
1501
2037
|
"popper-options"
|
|
1502
2038
|
])) : r("", !0),
|
|
1503
|
-
|
|
2039
|
+
R.value && ie.value ? (v(), n(E(z), {
|
|
1504
2040
|
key: 2,
|
|
1505
2041
|
trigger: "click",
|
|
1506
2042
|
placement: "bottom-start",
|
|
1507
2043
|
disabled: x.value,
|
|
1508
2044
|
"popper-class": P.value,
|
|
1509
2045
|
"popper-options": F.value,
|
|
1510
|
-
onShow: o[4] ||= (e) =>
|
|
1511
|
-
onHide: o[5] ||= (e) =>
|
|
2046
|
+
onShow: o[4] ||= (e) => K(!0),
|
|
2047
|
+
onHide: o[5] ||= (e) => K(!1)
|
|
1512
2048
|
}, {
|
|
1513
2049
|
reference: O(() => [a("button", {
|
|
1514
2050
|
ref_key: "overflowTriggerRef",
|
|
1515
|
-
ref:
|
|
2051
|
+
ref: ee,
|
|
1516
2052
|
type: "button",
|
|
1517
2053
|
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": H.value }]),
|
|
1518
2054
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1519
2055
|
"aria-expanded": H.value,
|
|
1520
2056
|
disabled: x.value,
|
|
1521
|
-
onClick:
|
|
1522
|
-
}, [c(E(
|
|
1523
|
-
default: O(() => [(v(), n(C(H.value ? E(
|
|
2057
|
+
onClick: me
|
|
2058
|
+
}, [c(E(L), null, {
|
|
2059
|
+
default: O(() => [(v(), n(C(H.value ? E(se) : E(U))))]),
|
|
1524
2060
|
_: 1
|
|
1525
|
-
})], 10,
|
|
1526
|
-
default: O(() => [a("div",
|
|
1527
|
-
group:
|
|
2061
|
+
})], 10, Kt)]),
|
|
2062
|
+
default: O(() => [a("div", qt, [c(zt, {
|
|
2063
|
+
group: ie.value,
|
|
1528
2064
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1529
2065
|
disabled: x.value,
|
|
1530
2066
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
@@ -1539,30 +2075,30 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1539
2075
|
"popper-class",
|
|
1540
2076
|
"popper-options"
|
|
1541
2077
|
])) : r("", !0),
|
|
1542
|
-
e.showLauncherIcon ?? e.launcher ? (v(), n(E(
|
|
2078
|
+
e.showLauncherIcon ?? e.launcher ? (v(), n(E(A), {
|
|
1543
2079
|
key: 3,
|
|
1544
2080
|
link: "",
|
|
1545
2081
|
class: "ml-ribbon-group__launcher",
|
|
1546
2082
|
disabled: x.value
|
|
1547
2083
|
}, {
|
|
1548
|
-
default: O(() => [c(E(
|
|
2084
|
+
default: O(() => [c(E(L), null, {
|
|
1549
2085
|
default: O(() => [c(E(W))]),
|
|
1550
2086
|
_: 1
|
|
1551
2087
|
})]),
|
|
1552
2088
|
_: 1
|
|
1553
2089
|
}, 8, ["disabled"])) : r("", !0)
|
|
1554
|
-
])], 14,
|
|
2090
|
+
])], 14, Bt));
|
|
1555
2091
|
}
|
|
1556
|
-
}),
|
|
2092
|
+
}), Yt = ["inert", "aria-disabled"], Xt = { class: "ml-ribbon__head-left" }, Zt = { class: "ml-ribbon__head-right" }, Qt = {
|
|
1557
2093
|
key: 2,
|
|
1558
2094
|
class: "ml-ribbon__tabs-extra"
|
|
1559
|
-
},
|
|
2095
|
+
}, $t = ["data-active-tab"], en = {
|
|
1560
2096
|
key: 0,
|
|
1561
2097
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1562
|
-
},
|
|
2098
|
+
}, tn = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, nn = ["aria-label", "disabled"], rn = { class: "ml-ribbon-overflow-list" }, an = { class: "ml-ribbon-overflow-group__header" }, on = ["data-active-tab"], sn = ["disabled"], cn = { class: "ml-ribbon-simplified-group__panel" }, ln = ["data-active-tab"], un = {
|
|
1563
2099
|
key: 0,
|
|
1564
2100
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1565
|
-
},
|
|
2101
|
+
}, dn = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, fn = ["aria-label", "disabled"], pn = { class: "ml-ribbon-overflow-list" }, mn = { class: "ml-ribbon-overflow-group__header" }, hn = ["data-active-tab"], gn = ["disabled"], _n = { class: "ml-ribbon-simplified-group__panel" }, vn = 40, yn = /* @__PURE__ */ l({
|
|
1566
2102
|
__name: "Ribbon",
|
|
1567
2103
|
props: {
|
|
1568
2104
|
id: { default: "ml-ribbon-root" },
|
|
@@ -1631,30 +2167,46 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1631
2167
|
...t,
|
|
1632
2168
|
icon: f(t.icon)
|
|
1633
2169
|
} : t;
|
|
2170
|
+
})), Array.isArray(t.categories) && (t.categories = t.categories.map((e) => {
|
|
2171
|
+
if (!e || typeof e != "object") return e;
|
|
2172
|
+
let t = e;
|
|
2173
|
+
return {
|
|
2174
|
+
...t,
|
|
2175
|
+
items: Array.isArray(t.items) ? t.items.map((e) => {
|
|
2176
|
+
if (!e || typeof e != "object") return e;
|
|
2177
|
+
let t = e;
|
|
2178
|
+
return {
|
|
2179
|
+
...t,
|
|
2180
|
+
preview: f(t.preview),
|
|
2181
|
+
icon: f(t.icon),
|
|
2182
|
+
component: f(t.component)
|
|
2183
|
+
};
|
|
2184
|
+
}) : t.items
|
|
2185
|
+
};
|
|
1634
2186
|
})), t;
|
|
1635
2187
|
}
|
|
1636
|
-
function
|
|
2188
|
+
function ee(e) {
|
|
1637
2189
|
return {
|
|
1638
2190
|
...e,
|
|
1639
2191
|
icon: f(e.icon),
|
|
1640
2192
|
props: k(e.props)
|
|
1641
2193
|
};
|
|
1642
2194
|
}
|
|
1643
|
-
function
|
|
2195
|
+
function j(e) {
|
|
1644
2196
|
return {
|
|
1645
2197
|
...e,
|
|
1646
2198
|
icon: f(e.icon),
|
|
1647
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
2199
|
+
footerMenuItems: e.footerMenuItems?.map(ee),
|
|
1648
2200
|
collections: e.collections?.map((e) => ({
|
|
1649
2201
|
...e,
|
|
1650
|
-
items: e.items?.map(
|
|
2202
|
+
items: e.items?.map(ee)
|
|
1651
2203
|
}))
|
|
1652
2204
|
};
|
|
1653
2205
|
}
|
|
1654
|
-
function
|
|
2206
|
+
function te(e) {
|
|
1655
2207
|
return e.map((e) => ({
|
|
1656
2208
|
...e,
|
|
1657
|
-
groups: e.groups?.map(
|
|
2209
|
+
groups: e.groups?.map(j)
|
|
1658
2210
|
}));
|
|
1659
2211
|
}
|
|
1660
2212
|
function M(e, t) {
|
|
@@ -1675,44 +2227,44 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1675
2227
|
keyTipsEmptySequence: "No key sequence",
|
|
1676
2228
|
contextualTabDefaultTitle: "Contextual",
|
|
1677
2229
|
galleryPreviewFallback: "Preview unavailable"
|
|
1678
|
-
}, P = s, F = u, { context:
|
|
1679
|
-
y(
|
|
1680
|
-
|
|
2230
|
+
}, P = s, F = u, { context: I, visibleTabs: re } = ve(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));
|
|
2231
|
+
y(fe, I), D(() => P.tabs, (e) => {
|
|
2232
|
+
I.tabs.value = te(e), I.tabs.value.some((e) => e.id === I.activeTab.value) || (I.activeTab.value = I.tabs.value[0]?.id || "");
|
|
1681
2233
|
}, { deep: !0 }), D(() => P.layout, (e) => {
|
|
1682
|
-
e !==
|
|
2234
|
+
e !== I.layout.value && (I.layout.value = e);
|
|
1683
2235
|
}), D(() => P.activeLayout, (e) => {
|
|
1684
2236
|
if (!e) return;
|
|
1685
2237
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
1686
|
-
t !==
|
|
2238
|
+
t !== I.layout.value && (I.layout.value = t);
|
|
1687
2239
|
}), D(() => P.minimized, (e) => {
|
|
1688
|
-
e !==
|
|
2240
|
+
e !== I.minimized.value && (I.minimized.value = e);
|
|
1689
2241
|
}), D(() => P.disabled, (e) => {
|
|
1690
|
-
e !==
|
|
2242
|
+
e !== I.disabled.value && (I.disabled.value = e);
|
|
1691
2243
|
}), D(() => P.activeTab, (e) => {
|
|
1692
|
-
e && e !==
|
|
2244
|
+
e && e !== I.activeTab.value && (I.activeTab.value = e);
|
|
1693
2245
|
}), D(() => P.tooltipShowAfter, (e) => {
|
|
1694
2246
|
let t = M(e, 1e3);
|
|
1695
|
-
t !==
|
|
2247
|
+
t !== I.tooltipShowAfter.value && (I.tooltipShowAfter.value = t);
|
|
1696
2248
|
}), D(() => P.tooltipHideAfter, (e) => {
|
|
1697
2249
|
let t = M(e, 0);
|
|
1698
|
-
t !==
|
|
1699
|
-
}), D(
|
|
2250
|
+
t !== I.tooltipHideAfter.value && (I.tooltipHideAfter.value = t);
|
|
2251
|
+
}), D(I.activeTab, (e) => {
|
|
1700
2252
|
F("update:activeTab", e), F("tabChange", e);
|
|
1701
|
-
}), D(
|
|
2253
|
+
}), D(I.layout, (e) => {
|
|
1702
2254
|
F("update:layout", e), F("layoutChange", e);
|
|
1703
|
-
}), D(
|
|
2255
|
+
}), D(I.minimized, (e) => {
|
|
1704
2256
|
F("update:minimized", e);
|
|
1705
|
-
}), D(
|
|
2257
|
+
}), D(I.overflowOpen, (e) => {
|
|
1706
2258
|
F(e ? "overflowOpen" : "overflowClose");
|
|
1707
|
-
}), D(
|
|
2259
|
+
}), D(I.backdropOpen, (e) => {
|
|
1708
2260
|
F(e ? "backstageOpen" : "backstageClose");
|
|
1709
2261
|
});
|
|
1710
|
-
let
|
|
2262
|
+
let R = t(() => re.value.find((e) => e.id === I.activeTab.value)), B = t(() => new Set(re.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), V = t(() => Le(R.value)), U = t(() => R.value?.groups?.filter((e) => e.visible !== !1) ?? []), se = b(null), le = b(null), W = b(null), G = b(null), K = b(!1), pe = b(0), me = b({
|
|
1711
2263
|
left: "0px",
|
|
1712
2264
|
top: "0px",
|
|
1713
2265
|
width: "1px",
|
|
1714
2266
|
height: "0px"
|
|
1715
|
-
}),
|
|
2267
|
+
}), q = b(/* @__PURE__ */ new Set()), he = b({}), ge = ae("size", ""), _e = t(() => P.size || ge.value || "default"), ye = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${_e.value}`), J = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${_e.value}`), be = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${_e.value}`), Y = t(() => ({
|
|
1716
2268
|
layoutSwitcherTooltip: P.texts.layoutSwitcherTooltip || N.layoutSwitcherTooltip,
|
|
1717
2269
|
minimizeTooltip: P.texts.minimizeTooltip || N.minimizeTooltip,
|
|
1718
2270
|
keyTipsToggleText: P.texts.keyTipsToggleText || N.keyTipsToggleText,
|
|
@@ -1727,17 +2279,17 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1727
2279
|
keyTipsEmptySequence: P.texts.keyTipsEmptySequence || N.keyTipsEmptySequence,
|
|
1728
2280
|
contextualTabDefaultTitle: P.texts.contextualTabDefaultTitle || N.contextualTabDefaultTitle,
|
|
1729
2281
|
galleryPreviewFallback: P.texts.galleryPreviewFallback || N.galleryPreviewFallback
|
|
1730
|
-
})),
|
|
1731
|
-
if (!
|
|
1732
|
-
let e =
|
|
1733
|
-
let n =
|
|
2282
|
+
})), Z = t(() => M(P.tooltipShowAfter, 1e3)), xe = t(() => M(P.tooltipHideAfter, 0)), Se = t(() => I.minimized.value ? ce : oe), Ce = t(() => U.value.filter((e) => !q.value.has(e.id))), Q = t(() => U.value.filter((e) => q.value.has(e.id))), we = t(() => {
|
|
2283
|
+
if (!Q.value.length) return 220;
|
|
2284
|
+
let e = Q.value.reduce((e, t) => {
|
|
2285
|
+
let n = he.value[t.id] ?? ke(t);
|
|
1734
2286
|
return Math.max(e, n);
|
|
1735
2287
|
}, 0), t = Math.ceil(e + 40);
|
|
1736
2288
|
return Math.max(220, Math.min(720, t));
|
|
1737
2289
|
});
|
|
1738
|
-
function
|
|
2290
|
+
function Ee(e) {
|
|
1739
2291
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
1740
|
-
...
|
|
2292
|
+
...ee(e),
|
|
1741
2293
|
size: "medium"
|
|
1742
2294
|
})));
|
|
1743
2295
|
return {
|
|
@@ -1750,13 +2302,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1750
2302
|
}]
|
|
1751
2303
|
};
|
|
1752
2304
|
}
|
|
1753
|
-
function
|
|
2305
|
+
function Oe(e) {
|
|
1754
2306
|
return e.priority ?? 100;
|
|
1755
2307
|
}
|
|
1756
|
-
function
|
|
2308
|
+
function ke(e) {
|
|
1757
2309
|
return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width : 140;
|
|
1758
2310
|
}
|
|
1759
|
-
function
|
|
2311
|
+
function Ae(e) {
|
|
1760
2312
|
let t = {};
|
|
1761
2313
|
return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
|
|
1762
2314
|
let n = e.dataset.groupId;
|
|
@@ -1765,109 +2317,109 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1765
2317
|
r > 0 && (t[n] = r);
|
|
1766
2318
|
}), t;
|
|
1767
2319
|
}
|
|
1768
|
-
function
|
|
1769
|
-
let e =
|
|
1770
|
-
let n =
|
|
1771
|
-
return e + Math.max(n,
|
|
2320
|
+
function je() {
|
|
2321
|
+
let e = U.value.reduce((e, t) => {
|
|
2322
|
+
let n = he.value[t.id] ?? ke(t);
|
|
2323
|
+
return e + Math.max(n, ke(t));
|
|
1772
2324
|
}, 0);
|
|
1773
2325
|
return Math.max(220, e);
|
|
1774
2326
|
}
|
|
1775
|
-
function
|
|
2327
|
+
function Me(e) {
|
|
1776
2328
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
1777
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
2329
|
+
return Number.isFinite(t) && t > 0 ? t : vn;
|
|
1778
2330
|
}
|
|
1779
|
-
function
|
|
1780
|
-
if (
|
|
1781
|
-
|
|
2331
|
+
function Ne() {
|
|
2332
|
+
if (I.layout.value !== "classic") {
|
|
2333
|
+
q.value = /* @__PURE__ */ new Set();
|
|
1782
2334
|
return;
|
|
1783
2335
|
}
|
|
1784
|
-
let e =
|
|
2336
|
+
let e = I.minimized.value ? G.value : W.value;
|
|
1785
2337
|
if (!e) return;
|
|
1786
|
-
let t =
|
|
2338
|
+
let t = U.value;
|
|
1787
2339
|
if (!t.length) {
|
|
1788
|
-
|
|
2340
|
+
q.value = /* @__PURE__ */ new Set();
|
|
1789
2341
|
return;
|
|
1790
2342
|
}
|
|
1791
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
1792
|
-
|
|
1793
|
-
...
|
|
2343
|
+
let n = Math.round(e.getBoundingClientRect().width), r = Me(e), i = Ae(e);
|
|
2344
|
+
he.value = {
|
|
2345
|
+
...he.value,
|
|
1794
2346
|
...i
|
|
1795
2347
|
};
|
|
1796
2348
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
1797
2349
|
group: e,
|
|
1798
2350
|
index: t
|
|
1799
2351
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
1800
|
-
let n =
|
|
2352
|
+
let n = Oe(t.group) - Oe(e.group);
|
|
1801
2353
|
return n === 0 ? t.index - e.index : n;
|
|
1802
|
-
}), l = (e) => i[e.id] ??
|
|
2354
|
+
}), l = (e) => i[e.id] ?? ke(e), u = a.reduce((e, t) => e + l(t), 0), d = (e) => o.filter(({ group: t }) => !e.has(t.id)).reduce((e, { group: t }) => e + l(t), 0), f = (e) => u + d(e) + (e.size > 0 ? r : 0), p = 0;
|
|
1803
2355
|
for (; f(s) > n && p < c.length;) {
|
|
1804
2356
|
let e = c[p].group;
|
|
1805
2357
|
s.add(e.id), p += 1;
|
|
1806
2358
|
}
|
|
1807
|
-
|
|
2359
|
+
q.value = s;
|
|
1808
2360
|
}
|
|
1809
|
-
function
|
|
2361
|
+
function Pe() {
|
|
1810
2362
|
p(() => {
|
|
1811
|
-
if (
|
|
1812
|
-
|
|
2363
|
+
if (I.layout.value !== "classic" || I.minimized.value) {
|
|
2364
|
+
Ne();
|
|
1813
2365
|
return;
|
|
1814
2366
|
}
|
|
1815
|
-
if (
|
|
1816
|
-
|
|
2367
|
+
if (q.value.size === 0) {
|
|
2368
|
+
Ne();
|
|
1817
2369
|
return;
|
|
1818
2370
|
}
|
|
1819
|
-
|
|
1820
|
-
|
|
2371
|
+
q.value = /* @__PURE__ */ new Set(), p(() => {
|
|
2372
|
+
Ne();
|
|
1821
2373
|
});
|
|
1822
2374
|
});
|
|
1823
2375
|
}
|
|
1824
|
-
function
|
|
1825
|
-
let e =
|
|
2376
|
+
function Fe() {
|
|
2377
|
+
let e = se.value, t = le.value;
|
|
1826
2378
|
if (!e || !t) return;
|
|
1827
2379
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = Number.parseFloat(getComputedStyle(e).borderLeftWidth || "0") || 0, a = Math.max(n.width - i * 2, e.clientWidth, r.width, t.clientWidth);
|
|
1828
|
-
|
|
2380
|
+
pe.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? je() : Math.max(360, U.value.length * 120)), me.value = {
|
|
1829
2381
|
left: `${Math.round(n.left - r.left + i)}px`,
|
|
1830
2382
|
top: "0px",
|
|
1831
2383
|
width: "1px",
|
|
1832
2384
|
height: `${Math.round(r.height)}px`
|
|
1833
2385
|
};
|
|
1834
2386
|
}
|
|
1835
|
-
function
|
|
1836
|
-
|
|
2387
|
+
function Ie() {
|
|
2388
|
+
K.value = !1;
|
|
2389
|
+
}
|
|
2390
|
+
function Le(e) {
|
|
2391
|
+
return I.disabled.value ? !0 : !e || B.value.size === 0 ? !1 : !B.value.has(e.id);
|
|
1837
2392
|
}
|
|
1838
2393
|
function Re(e) {
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
let t = L.activeTab.value === e.id;
|
|
1844
|
-
if (L.activeTab.value = e.id, !L.minimized.value) {
|
|
1845
|
-
Le();
|
|
2394
|
+
if (I.disabled.value) return;
|
|
2395
|
+
let t = I.activeTab.value === e.id;
|
|
2396
|
+
if (I.activeTab.value = e.id, !I.minimized.value) {
|
|
2397
|
+
Ie();
|
|
1846
2398
|
return;
|
|
1847
2399
|
}
|
|
1848
|
-
|
|
2400
|
+
Fe(), K.value = t ? !K.value : !0;
|
|
2401
|
+
}
|
|
2402
|
+
function ze() {
|
|
2403
|
+
I.disabled.value || I.api.toggleSimplified();
|
|
1849
2404
|
}
|
|
1850
2405
|
function Be() {
|
|
1851
|
-
|
|
2406
|
+
I.disabled.value || (I.minimized.value || Ie(), I.minimized.value = !I.minimized.value);
|
|
1852
2407
|
}
|
|
1853
|
-
function Ve() {
|
|
1854
|
-
|
|
2408
|
+
function Ve(e) {
|
|
2409
|
+
I.disabled.value || (Ie(), F("fileMenuSelect", e));
|
|
1855
2410
|
}
|
|
1856
|
-
function He(
|
|
1857
|
-
|
|
2411
|
+
function He() {
|
|
2412
|
+
I.disabled.value || (Ie(), I.backdropOpen.value = !0);
|
|
1858
2413
|
}
|
|
1859
2414
|
function Ue() {
|
|
1860
|
-
|
|
1861
|
-
}
|
|
1862
|
-
function We() {
|
|
1863
|
-
L.disabled.value || (L.backdropOpen.value = !1);
|
|
2415
|
+
I.disabled.value || (I.backdropOpen.value = !1);
|
|
1864
2416
|
}
|
|
1865
|
-
function
|
|
1866
|
-
|
|
1867
|
-
tabId:
|
|
2417
|
+
function We(e, t) {
|
|
2418
|
+
V.value || (F("itemClick", {
|
|
2419
|
+
tabId: I.activeTab.value,
|
|
1868
2420
|
groupId: e,
|
|
1869
2421
|
itemId: t
|
|
1870
|
-
}),
|
|
2422
|
+
}), I.minimized.value && Ie());
|
|
1871
2423
|
}
|
|
1872
2424
|
function Ge(e) {
|
|
1873
2425
|
if (!(e instanceof HTMLElement)) return !1;
|
|
@@ -1876,13 +2428,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1876
2428
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
1877
2429
|
}
|
|
1878
2430
|
function Ke() {
|
|
1879
|
-
if (
|
|
1880
|
-
|
|
2431
|
+
if (V.value) {
|
|
2432
|
+
I.keyTips.value = [];
|
|
1881
2433
|
return;
|
|
1882
2434
|
}
|
|
1883
|
-
let e =
|
|
2435
|
+
let e = R.value;
|
|
1884
2436
|
if (!e?.groups?.length) {
|
|
1885
|
-
|
|
2437
|
+
I.keyTips.value = [];
|
|
1886
2438
|
return;
|
|
1887
2439
|
}
|
|
1888
2440
|
let t = e.groups.filter((e) => e.visible !== !1).flatMap((t) => (t.collections ?? []).flatMap((n) => n.items.filter((e) => e.keyTip && e.disabled !== !0).map((n) => {
|
|
@@ -1895,134 +2447,134 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1895
2447
|
scope: "item"
|
|
1896
2448
|
} : null;
|
|
1897
2449
|
}).filter((e) => !!e)));
|
|
1898
|
-
|
|
2450
|
+
I.keyTips.value = t;
|
|
1899
2451
|
}
|
|
1900
2452
|
function qe(e) {
|
|
1901
|
-
if (
|
|
1902
|
-
let t =
|
|
2453
|
+
if (I.disabled.value) return;
|
|
2454
|
+
let t = R.value;
|
|
1903
2455
|
if (t?.groups?.length) {
|
|
1904
2456
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
1905
2457
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
1906
2458
|
if (r) {
|
|
1907
|
-
|
|
2459
|
+
We(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
|
|
1908
2460
|
return;
|
|
1909
2461
|
}
|
|
1910
2462
|
}
|
|
1911
2463
|
}
|
|
1912
2464
|
}
|
|
1913
2465
|
function Je() {
|
|
1914
|
-
|
|
2466
|
+
I.keyTipsSequence.value = "";
|
|
1915
2467
|
}
|
|
1916
2468
|
function Ye(e) {
|
|
1917
|
-
if (!
|
|
2469
|
+
if (!I.disabled.value && !Ge(e.target)) {
|
|
1918
2470
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
1919
|
-
e.preventDefault(),
|
|
2471
|
+
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value || Je();
|
|
1920
2472
|
return;
|
|
1921
2473
|
}
|
|
1922
|
-
if (
|
|
2474
|
+
if (I.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
1923
2475
|
if (e.key === "Escape") {
|
|
1924
|
-
e.preventDefault(),
|
|
2476
|
+
e.preventDefault(), I.keyTipsOpen.value = !1, Je();
|
|
1925
2477
|
return;
|
|
1926
2478
|
}
|
|
1927
2479
|
if (e.key === "Backspace") {
|
|
1928
|
-
e.preventDefault(),
|
|
2480
|
+
e.preventDefault(), I.keyTipsSequence.value = I.keyTipsSequence.value.slice(0, -1);
|
|
1929
2481
|
return;
|
|
1930
2482
|
}
|
|
1931
2483
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
1932
2484
|
e.preventDefault();
|
|
1933
|
-
let t = `${
|
|
1934
|
-
|
|
1935
|
-
let n = t.toLowerCase(), r =
|
|
2485
|
+
let t = `${I.keyTipsSequence.value}${e.key.toUpperCase()}`;
|
|
2486
|
+
I.keyTipsSequence.value = t;
|
|
2487
|
+
let n = t.toLowerCase(), r = I.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
1936
2488
|
if (r) {
|
|
1937
2489
|
qe(r);
|
|
1938
2490
|
return;
|
|
1939
2491
|
}
|
|
1940
|
-
|
|
2492
|
+
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Je();
|
|
1941
2493
|
}
|
|
1942
2494
|
}
|
|
1943
2495
|
}
|
|
1944
2496
|
}
|
|
1945
2497
|
function Xe(e) {
|
|
1946
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
2498
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? ue : null;
|
|
1947
2499
|
}
|
|
1948
2500
|
function Ze(e) {
|
|
1949
|
-
|
|
2501
|
+
K.value = e;
|
|
1950
2502
|
}
|
|
1951
2503
|
D([
|
|
1952
|
-
|
|
1953
|
-
() =>
|
|
1954
|
-
() =>
|
|
2504
|
+
U,
|
|
2505
|
+
() => I.layout.value,
|
|
2506
|
+
() => I.minimized.value
|
|
1955
2507
|
], () => {
|
|
1956
|
-
|
|
2508
|
+
Pe();
|
|
1957
2509
|
}), D([
|
|
1958
|
-
|
|
1959
|
-
() =>
|
|
1960
|
-
() =>
|
|
2510
|
+
R,
|
|
2511
|
+
() => I.tabs.value,
|
|
2512
|
+
() => I.disabled.value
|
|
1961
2513
|
], () => {
|
|
1962
2514
|
Ke(), Je();
|
|
1963
2515
|
}, {
|
|
1964
2516
|
deep: !0,
|
|
1965
2517
|
immediate: !0
|
|
1966
|
-
}), D(() =>
|
|
2518
|
+
}), D(() => I.keyTipsOpen.value, (e) => {
|
|
1967
2519
|
e || Je();
|
|
1968
|
-
}), D(() =>
|
|
1969
|
-
e && (
|
|
2520
|
+
}), D(() => I.disabled.value, (e) => {
|
|
2521
|
+
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Ie(), Je());
|
|
1970
2522
|
}), D([
|
|
1971
|
-
() =>
|
|
1972
|
-
() =>
|
|
1973
|
-
|
|
2523
|
+
() => I.minimized.value,
|
|
2524
|
+
() => I.layout.value,
|
|
2525
|
+
R
|
|
1974
2526
|
], ([e, , t]) => {
|
|
1975
|
-
(!e || !t) &&
|
|
1976
|
-
}), D([
|
|
1977
|
-
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) &&
|
|
1978
|
-
}, { flush: "post" }), D(
|
|
2527
|
+
(!e || !t) && Ie();
|
|
2528
|
+
}), D([W, G], ([e, t], [n, r]) => {
|
|
2529
|
+
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Pe();
|
|
2530
|
+
}, { flush: "post" }), D(K, (e) => {
|
|
1979
2531
|
e && p(() => {
|
|
1980
|
-
|
|
2532
|
+
Fe(), Pe();
|
|
1981
2533
|
});
|
|
1982
2534
|
});
|
|
1983
2535
|
let $ = null;
|
|
1984
2536
|
g(() => {
|
|
1985
2537
|
window.addEventListener("keydown", Ye), window.addEventListener("resize", Qe), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
1986
|
-
|
|
1987
|
-
}),
|
|
2538
|
+
Fe(), Pe();
|
|
2539
|
+
}), W.value && $.observe(W.value), G.value && $.observe(G.value)), Fe(), Pe();
|
|
1988
2540
|
}), _(() => {
|
|
1989
2541
|
window.removeEventListener("keydown", Ye), window.removeEventListener("resize", Qe), $?.disconnect();
|
|
1990
2542
|
});
|
|
1991
2543
|
function Qe() {
|
|
1992
|
-
|
|
2544
|
+
K.value && Fe();
|
|
1993
2545
|
}
|
|
1994
|
-
return l(
|
|
2546
|
+
return l(I.api), (t, l) => (v(), n(E(ne), { size: P.size }, {
|
|
1995
2547
|
default: O(() => [(v(), i("section", {
|
|
1996
2548
|
ref_key: "ribbonRootRef",
|
|
1997
|
-
ref:
|
|
1998
|
-
key: E(
|
|
2549
|
+
ref: se,
|
|
2550
|
+
key: E(I).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
1999
2551
|
class: m(["ml-ribbon", [
|
|
2000
|
-
`ml-ribbon--${E(
|
|
2001
|
-
`ml-ribbon--size-${
|
|
2552
|
+
`ml-ribbon--${E(I).layout.value}`,
|
|
2553
|
+
`ml-ribbon--size-${_e.value}`,
|
|
2002
2554
|
{
|
|
2003
|
-
"ml-ribbon--disabled": E(
|
|
2004
|
-
"ml-ribbon--minimized": E(
|
|
2005
|
-
"ml-ribbon--keytips-open": E(
|
|
2555
|
+
"ml-ribbon--disabled": E(I).disabled.value,
|
|
2556
|
+
"ml-ribbon--minimized": E(I).minimized.value,
|
|
2557
|
+
"ml-ribbon--keytips-open": E(I).keyTipsOpen.value
|
|
2006
2558
|
}
|
|
2007
2559
|
]]),
|
|
2008
|
-
inert: E(
|
|
2009
|
-
"aria-disabled": E(
|
|
2560
|
+
inert: E(I).disabled.value,
|
|
2561
|
+
"aria-disabled": E(I).disabled.value
|
|
2010
2562
|
}, [
|
|
2011
2563
|
a("header", {
|
|
2012
2564
|
ref_key: "ribbonHeaderRef",
|
|
2013
|
-
ref:
|
|
2565
|
+
ref: le,
|
|
2014
2566
|
class: "ml-ribbon__header"
|
|
2015
2567
|
}, [
|
|
2016
|
-
a("div",
|
|
2017
|
-
s.showFileMenu ? (v(), n(
|
|
2568
|
+
a("div", Xt, [
|
|
2569
|
+
s.showFileMenu ? (v(), n(De, {
|
|
2018
2570
|
key: 0,
|
|
2019
2571
|
items: s.fileMenuItems,
|
|
2020
|
-
disabled: E(
|
|
2021
|
-
label:
|
|
2022
|
-
"open-backstage-label":
|
|
2572
|
+
disabled: E(I).disabled.value,
|
|
2573
|
+
label: Y.value.fileMenuLabel,
|
|
2574
|
+
"open-backstage-label": Y.value.fileMenuOpenBackstageLabel,
|
|
2023
2575
|
"show-open-backstage": s.showOpenBackstage,
|
|
2024
|
-
onSelect:
|
|
2025
|
-
onOpenBackstage:
|
|
2576
|
+
onSelect: Ve,
|
|
2577
|
+
onOpenBackstage: He
|
|
2026
2578
|
}, null, 8, [
|
|
2027
2579
|
"items",
|
|
2028
2580
|
"disabled",
|
|
@@ -2030,33 +2582,33 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2030
2582
|
"open-backstage-label",
|
|
2031
2583
|
"show-open-backstage"
|
|
2032
2584
|
])) : r("", !0),
|
|
2033
|
-
c(
|
|
2585
|
+
c(Te, {
|
|
2034
2586
|
tabs: E(re),
|
|
2035
|
-
"active-tab": E(
|
|
2036
|
-
disabled: E(
|
|
2037
|
-
"default-contextual-title":
|
|
2038
|
-
onSelect:
|
|
2587
|
+
"active-tab": E(I).activeTab.value,
|
|
2588
|
+
disabled: E(I).disabled.value,
|
|
2589
|
+
"default-contextual-title": Y.value.contextualTabDefaultTitle,
|
|
2590
|
+
onSelect: Re
|
|
2039
2591
|
}, null, 8, [
|
|
2040
2592
|
"tabs",
|
|
2041
2593
|
"active-tab",
|
|
2042
2594
|
"disabled",
|
|
2043
2595
|
"default-contextual-title"
|
|
2044
2596
|
]),
|
|
2045
|
-
P.hideMinimizeButton ? r("", !0) : (v(), n(E(
|
|
2597
|
+
P.hideMinimizeButton ? r("", !0) : (v(), n(E(ie), {
|
|
2046
2598
|
key: 1,
|
|
2047
|
-
content:
|
|
2048
|
-
"show-after":
|
|
2599
|
+
content: Y.value.minimizeTooltip,
|
|
2600
|
+
"show-after": Z.value,
|
|
2049
2601
|
"hide-after": xe.value
|
|
2050
2602
|
}, {
|
|
2051
|
-
default: O(() => [c(E(
|
|
2603
|
+
default: O(() => [c(E(A), {
|
|
2052
2604
|
class: m([
|
|
2053
2605
|
"ml-ribbon__control",
|
|
2054
2606
|
"ml-ribbon__control--minimize",
|
|
2055
|
-
E(
|
|
2607
|
+
E(I).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
2056
2608
|
]),
|
|
2057
2609
|
icon: Se.value,
|
|
2058
|
-
disabled: E(
|
|
2059
|
-
onClick:
|
|
2610
|
+
disabled: E(I).disabled.value,
|
|
2611
|
+
onClick: Be
|
|
2060
2612
|
}, null, 8, [
|
|
2061
2613
|
"class",
|
|
2062
2614
|
"icon",
|
|
@@ -2069,19 +2621,19 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2069
2621
|
"hide-after"
|
|
2070
2622
|
]))
|
|
2071
2623
|
]),
|
|
2072
|
-
a("div",
|
|
2073
|
-
P.hideLayoutSwitcher ? r("", !0) : (v(), n(E(
|
|
2624
|
+
a("div", Zt, [
|
|
2625
|
+
P.hideLayoutSwitcher ? r("", !0) : (v(), n(E(ie), {
|
|
2074
2626
|
key: 0,
|
|
2075
|
-
content:
|
|
2076
|
-
"show-after":
|
|
2627
|
+
content: Y.value.layoutSwitcherTooltip,
|
|
2628
|
+
"show-after": Z.value,
|
|
2077
2629
|
"hide-after": xe.value
|
|
2078
2630
|
}, {
|
|
2079
|
-
default: O(() => [c(E(
|
|
2631
|
+
default: O(() => [c(E(A), {
|
|
2080
2632
|
circle: "",
|
|
2081
2633
|
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
2082
|
-
icon: E(
|
|
2083
|
-
disabled: E(
|
|
2084
|
-
onClick:
|
|
2634
|
+
icon: E(de),
|
|
2635
|
+
disabled: E(I).disabled.value,
|
|
2636
|
+
onClick: ze
|
|
2085
2637
|
}, null, 8, ["icon", "disabled"])]),
|
|
2086
2638
|
_: 1
|
|
2087
2639
|
}, 8, [
|
|
@@ -2089,51 +2641,51 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2089
2641
|
"show-after",
|
|
2090
2642
|
"hide-after"
|
|
2091
2643
|
])),
|
|
2092
|
-
P.hideKeyTipsToggle ? r("", !0) : (v(), n(E(
|
|
2644
|
+
P.hideKeyTipsToggle ? r("", !0) : (v(), n(E(H), {
|
|
2093
2645
|
key: 1,
|
|
2094
2646
|
"inline-prompt": "",
|
|
2095
2647
|
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
2096
|
-
"active-text":
|
|
2097
|
-
"inactive-text":
|
|
2098
|
-
"model-value": E(
|
|
2099
|
-
disabled: E(
|
|
2100
|
-
onChange: l[0] ||= (e) => E(
|
|
2648
|
+
"active-text": Y.value.keyTipsToggleText,
|
|
2649
|
+
"inactive-text": Y.value.keyTipsToggleText,
|
|
2650
|
+
"model-value": E(I).keyTipsOpen.value,
|
|
2651
|
+
disabled: E(I).disabled.value,
|
|
2652
|
+
onChange: l[0] ||= (e) => E(I).keyTipsOpen.value = !E(I).keyTipsOpen.value
|
|
2101
2653
|
}, null, 8, [
|
|
2102
2654
|
"active-text",
|
|
2103
2655
|
"inactive-text",
|
|
2104
2656
|
"model-value",
|
|
2105
2657
|
"disabled"
|
|
2106
2658
|
])),
|
|
2107
|
-
t.$slots["tabs-extra"] ? (v(), i("div",
|
|
2108
|
-
activeTab: E(
|
|
2109
|
-
layout: E(
|
|
2110
|
-
minimized: E(
|
|
2111
|
-
disabled: E(
|
|
2659
|
+
t.$slots["tabs-extra"] ? (v(), i("div", Qt, [S(t.$slots, "tabs-extra", {
|
|
2660
|
+
activeTab: E(I).activeTab.value,
|
|
2661
|
+
layout: E(I).layout.value,
|
|
2662
|
+
minimized: E(I).minimized.value,
|
|
2663
|
+
disabled: E(I).disabled.value
|
|
2112
2664
|
})])) : r("", !0)
|
|
2113
2665
|
]),
|
|
2114
|
-
|
|
2666
|
+
R.value ? (v(), n(E(z), {
|
|
2115
2667
|
key: 0,
|
|
2116
2668
|
placement: "bottom-start",
|
|
2117
|
-
visible:
|
|
2118
|
-
width:
|
|
2119
|
-
disabled: E(
|
|
2669
|
+
visible: K.value,
|
|
2670
|
+
width: pe.value || void 0,
|
|
2671
|
+
disabled: E(I).disabled.value || !E(I).minimized.value,
|
|
2120
2672
|
"show-arrow": !1,
|
|
2121
2673
|
offset: 0,
|
|
2122
|
-
"popper-class":
|
|
2674
|
+
"popper-class": be.value,
|
|
2123
2675
|
"onUpdate:visible": Ze
|
|
2124
2676
|
}, {
|
|
2125
2677
|
reference: O(() => [a("span", {
|
|
2126
2678
|
"aria-hidden": "true",
|
|
2127
2679
|
class: "ml-ribbon__minimized-anchor",
|
|
2128
|
-
style: h(
|
|
2680
|
+
style: h(me.value)
|
|
2129
2681
|
}, null, 4)]),
|
|
2130
|
-
default: O(() => [E(
|
|
2682
|
+
default: O(() => [E(I).layout.value === "classic" ? (v(), i("main", {
|
|
2131
2683
|
key: 0,
|
|
2132
2684
|
ref_key: "minimizedClassicPanelRef",
|
|
2133
|
-
ref:
|
|
2685
|
+
ref: G,
|
|
2134
2686
|
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
2135
|
-
"data-active-tab":
|
|
2136
|
-
}, [(v(!0), i(e, null, x(
|
|
2687
|
+
"data-active-tab": R.value.id
|
|
2688
|
+
}, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), n(Jt, {
|
|
2137
2689
|
id: e.id,
|
|
2138
2690
|
key: e.id,
|
|
2139
2691
|
"data-group-id": e.id,
|
|
@@ -2146,16 +2698,16 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2146
2698
|
launcher: e.launcher,
|
|
2147
2699
|
"show-launcher-icon": e.showLauncherIcon,
|
|
2148
2700
|
"group-model": e,
|
|
2149
|
-
"overflow-trigger-aria-label":
|
|
2150
|
-
"gallery-preview-fallback":
|
|
2151
|
-
disabled:
|
|
2152
|
-
onItemClick: l[2] ||= (e) =>
|
|
2701
|
+
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
2702
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2703
|
+
disabled: V.value,
|
|
2704
|
+
onItemClick: l[2] ||= (e) => We(e.groupId, e.itemId)
|
|
2153
2705
|
}, {
|
|
2154
|
-
default: O(() => [c(
|
|
2706
|
+
default: O(() => [c(zt, {
|
|
2155
2707
|
group: e,
|
|
2156
|
-
"gallery-preview-fallback":
|
|
2157
|
-
disabled:
|
|
2158
|
-
onItemClick: l[1] ||= (e) =>
|
|
2708
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2709
|
+
disabled: V.value,
|
|
2710
|
+
onItemClick: l[1] ||= (e) => We(e.groupId, e.itemId)
|
|
2159
2711
|
}, null, 8, [
|
|
2160
2712
|
"group",
|
|
2161
2713
|
"gallery-preview-fallback",
|
|
@@ -2177,30 +2729,30 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2177
2729
|
"overflow-trigger-aria-label",
|
|
2178
2730
|
"gallery-preview-fallback",
|
|
2179
2731
|
"disabled"
|
|
2180
|
-
]))), 128)),
|
|
2732
|
+
]))), 128)), Q.value.length ? (v(), i("section", en, [a("div", tn, [c(E(z), {
|
|
2181
2733
|
trigger: "click",
|
|
2182
2734
|
placement: "bottom-end",
|
|
2183
|
-
width:
|
|
2184
|
-
disabled:
|
|
2735
|
+
width: we.value,
|
|
2736
|
+
disabled: V.value,
|
|
2185
2737
|
"show-arrow": !1,
|
|
2186
|
-
"popper-class":
|
|
2187
|
-
onShow: l[4] ||= (e) => E(
|
|
2188
|
-
onHide: l[5] ||= (e) => E(
|
|
2738
|
+
"popper-class": J.value,
|
|
2739
|
+
onShow: l[4] ||= (e) => E(I).overflowOpen.value = !0,
|
|
2740
|
+
onHide: l[5] ||= (e) => E(I).overflowOpen.value = !1
|
|
2189
2741
|
}, {
|
|
2190
2742
|
reference: O(() => [a("button", {
|
|
2191
2743
|
type: "button",
|
|
2192
2744
|
class: "ml-ribbon-overflow-trigger",
|
|
2193
|
-
"aria-label":
|
|
2194
|
-
disabled:
|
|
2195
|
-
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
2196
|
-
default: O(() => [a("div",
|
|
2745
|
+
"aria-label": Y.value.overflowTriggerAriaLabel,
|
|
2746
|
+
disabled: V.value
|
|
2747
|
+
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, nn)]),
|
|
2748
|
+
default: O(() => [a("div", rn, [(v(!0), i(e, null, x(Q.value, (e) => (v(), i("section", {
|
|
2197
2749
|
key: e.id,
|
|
2198
2750
|
class: "ml-ribbon-overflow-group"
|
|
2199
|
-
}, [a("header",
|
|
2751
|
+
}, [a("header", an, w(e.title), 1), c(zt, {
|
|
2200
2752
|
group: e,
|
|
2201
|
-
"gallery-preview-fallback":
|
|
2202
|
-
disabled:
|
|
2203
|
-
onItemClick: l[3] ||= (e) =>
|
|
2753
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2754
|
+
disabled: V.value,
|
|
2755
|
+
onItemClick: l[3] ||= (e) => We(e.groupId, e.itemId)
|
|
2204
2756
|
}, null, 8, [
|
|
2205
2757
|
"group",
|
|
2206
2758
|
"gallery-preview-fallback",
|
|
@@ -2211,42 +2763,42 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2211
2763
|
"width",
|
|
2212
2764
|
"disabled",
|
|
2213
2765
|
"popper-class"
|
|
2214
|
-
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
2766
|
+
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, $t)) : (v(), i("main", {
|
|
2215
2767
|
key: 1,
|
|
2216
2768
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
2217
|
-
"data-active-tab":
|
|
2218
|
-
}, [(v(!0), i(e, null, x(
|
|
2769
|
+
"data-active-tab": R.value.id
|
|
2770
|
+
}, [(v(!0), i(e, null, x(U.value, (e) => (v(), n(E(z), {
|
|
2219
2771
|
key: e.id,
|
|
2220
2772
|
trigger: "click",
|
|
2221
2773
|
placement: "bottom-start",
|
|
2222
2774
|
width: 340,
|
|
2223
|
-
disabled:
|
|
2775
|
+
disabled: V.value,
|
|
2224
2776
|
"show-arrow": !1,
|
|
2225
|
-
"popper-class":
|
|
2777
|
+
"popper-class": ye.value
|
|
2226
2778
|
}, {
|
|
2227
2779
|
reference: O(() => [a("button", {
|
|
2228
2780
|
class: "ml-ribbon-simplified-group",
|
|
2229
2781
|
type: "button",
|
|
2230
|
-
disabled:
|
|
2231
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2782
|
+
disabled: V.value
|
|
2783
|
+
}, [Xe(e) ? (v(), n(E(L), {
|
|
2232
2784
|
key: 0,
|
|
2233
2785
|
class: "ml-ribbon-simplified-group__icon"
|
|
2234
2786
|
}, {
|
|
2235
2787
|
default: O(() => [(v(), n(C(Xe(e))))]),
|
|
2236
2788
|
_: 2
|
|
2237
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
2238
|
-
default: O(() => [a("div",
|
|
2239
|
-
group:
|
|
2240
|
-
"gallery-preview-fallback":
|
|
2241
|
-
disabled:
|
|
2242
|
-
onItemClick: l[6] ||= (e) =>
|
|
2789
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, sn)]),
|
|
2790
|
+
default: O(() => [a("div", cn, [c(zt, {
|
|
2791
|
+
group: Ee(e),
|
|
2792
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2793
|
+
disabled: V.value,
|
|
2794
|
+
onItemClick: l[6] ||= (e) => We(e.groupId, e.itemId)
|
|
2243
2795
|
}, null, 8, [
|
|
2244
2796
|
"group",
|
|
2245
2797
|
"gallery-preview-fallback",
|
|
2246
2798
|
"disabled"
|
|
2247
2799
|
])])]),
|
|
2248
2800
|
_: 2
|
|
2249
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2801
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, on))]),
|
|
2250
2802
|
_: 1
|
|
2251
2803
|
}, 8, [
|
|
2252
2804
|
"visible",
|
|
@@ -2255,13 +2807,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2255
2807
|
"popper-class"
|
|
2256
2808
|
])) : r("", !0)
|
|
2257
2809
|
], 512),
|
|
2258
|
-
!E(
|
|
2810
|
+
!E(I).minimized.value && R.value && E(I).layout.value === "classic" ? (v(), i("main", {
|
|
2259
2811
|
key: 0,
|
|
2260
2812
|
class: "ml-ribbon__panel",
|
|
2261
|
-
"data-active-tab":
|
|
2813
|
+
"data-active-tab": R.value.id,
|
|
2262
2814
|
ref_key: "classicPanelRef",
|
|
2263
|
-
ref:
|
|
2264
|
-
}, [(v(!0), i(e, null, x(
|
|
2815
|
+
ref: W
|
|
2816
|
+
}, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), n(Jt, {
|
|
2265
2817
|
id: e.id,
|
|
2266
2818
|
key: e.id,
|
|
2267
2819
|
"data-group-id": e.id,
|
|
@@ -2274,16 +2826,16 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2274
2826
|
launcher: e.launcher,
|
|
2275
2827
|
"show-launcher-icon": e.showLauncherIcon,
|
|
2276
2828
|
"group-model": e,
|
|
2277
|
-
"overflow-trigger-aria-label":
|
|
2278
|
-
"gallery-preview-fallback":
|
|
2279
|
-
disabled:
|
|
2280
|
-
onItemClick: l[8] ||= (e) =>
|
|
2829
|
+
"overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
|
|
2830
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2831
|
+
disabled: V.value,
|
|
2832
|
+
onItemClick: l[8] ||= (e) => We(e.groupId, e.itemId)
|
|
2281
2833
|
}, {
|
|
2282
|
-
default: O(() => [c(
|
|
2834
|
+
default: O(() => [c(zt, {
|
|
2283
2835
|
group: e,
|
|
2284
|
-
"gallery-preview-fallback":
|
|
2285
|
-
disabled:
|
|
2286
|
-
onItemClick: l[7] ||= (e) =>
|
|
2836
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2837
|
+
disabled: V.value,
|
|
2838
|
+
onItemClick: l[7] ||= (e) => We(e.groupId, e.itemId)
|
|
2287
2839
|
}, null, 8, [
|
|
2288
2840
|
"group",
|
|
2289
2841
|
"gallery-preview-fallback",
|
|
@@ -2305,29 +2857,29 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2305
2857
|
"overflow-trigger-aria-label",
|
|
2306
2858
|
"gallery-preview-fallback",
|
|
2307
2859
|
"disabled"
|
|
2308
|
-
]))), 128)),
|
|
2860
|
+
]))), 128)), Q.value.length ? (v(), i("section", un, [a("div", dn, [c(E(z), {
|
|
2309
2861
|
trigger: "click",
|
|
2310
2862
|
placement: "bottom-end",
|
|
2311
|
-
width:
|
|
2312
|
-
disabled:
|
|
2313
|
-
"popper-class":
|
|
2314
|
-
onShow: l[10] ||= (e) => E(
|
|
2315
|
-
onHide: l[11] ||= (e) => E(
|
|
2863
|
+
width: we.value,
|
|
2864
|
+
disabled: V.value,
|
|
2865
|
+
"popper-class": J.value,
|
|
2866
|
+
onShow: l[10] ||= (e) => E(I).overflowOpen.value = !0,
|
|
2867
|
+
onHide: l[11] ||= (e) => E(I).overflowOpen.value = !1
|
|
2316
2868
|
}, {
|
|
2317
2869
|
reference: O(() => [a("button", {
|
|
2318
2870
|
type: "button",
|
|
2319
2871
|
class: "ml-ribbon-overflow-trigger",
|
|
2320
|
-
"aria-label":
|
|
2321
|
-
disabled:
|
|
2322
|
-
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8,
|
|
2323
|
-
default: O(() => [a("div",
|
|
2872
|
+
"aria-label": Y.value.overflowTriggerAriaLabel,
|
|
2873
|
+
disabled: V.value
|
|
2874
|
+
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, fn)]),
|
|
2875
|
+
default: O(() => [a("div", pn, [(v(!0), i(e, null, x(Q.value, (e) => (v(), i("section", {
|
|
2324
2876
|
key: e.id,
|
|
2325
2877
|
class: "ml-ribbon-overflow-group"
|
|
2326
|
-
}, [a("header",
|
|
2878
|
+
}, [a("header", mn, w(e.title), 1), c(zt, {
|
|
2327
2879
|
group: e,
|
|
2328
|
-
"gallery-preview-fallback":
|
|
2329
|
-
disabled:
|
|
2330
|
-
onItemClick: l[9] ||= (e) =>
|
|
2880
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2881
|
+
disabled: V.value,
|
|
2882
|
+
onItemClick: l[9] ||= (e) => We(e.groupId, e.itemId)
|
|
2331
2883
|
}, null, 8, [
|
|
2332
2884
|
"group",
|
|
2333
2885
|
"gallery-preview-fallback",
|
|
@@ -2338,59 +2890,59 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2338
2890
|
"width",
|
|
2339
2891
|
"disabled",
|
|
2340
2892
|
"popper-class"
|
|
2341
|
-
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8,
|
|
2342
|
-
!E(
|
|
2893
|
+
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, ln)) : r("", !0),
|
|
2894
|
+
!E(I).minimized.value && R.value && E(I).layout.value === "simplified" ? (v(), i("main", {
|
|
2343
2895
|
key: 1,
|
|
2344
2896
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
2345
|
-
"data-active-tab":
|
|
2346
|
-
}, [(v(!0), i(e, null, x(
|
|
2897
|
+
"data-active-tab": R.value.id
|
|
2898
|
+
}, [(v(!0), i(e, null, x(U.value, (e) => (v(), n(E(z), {
|
|
2347
2899
|
key: e.id,
|
|
2348
2900
|
trigger: "click",
|
|
2349
2901
|
placement: "bottom-start",
|
|
2350
2902
|
width: 340,
|
|
2351
|
-
disabled:
|
|
2352
|
-
"popper-class":
|
|
2903
|
+
disabled: V.value,
|
|
2904
|
+
"popper-class": ye.value
|
|
2353
2905
|
}, {
|
|
2354
2906
|
reference: O(() => [a("button", {
|
|
2355
2907
|
class: "ml-ribbon-simplified-group",
|
|
2356
2908
|
type: "button",
|
|
2357
|
-
disabled:
|
|
2358
|
-
}, [Xe(e) ? (v(), n(E(
|
|
2909
|
+
disabled: V.value
|
|
2910
|
+
}, [Xe(e) ? (v(), n(E(L), {
|
|
2359
2911
|
key: 0,
|
|
2360
2912
|
class: "ml-ribbon-simplified-group__icon"
|
|
2361
2913
|
}, {
|
|
2362
2914
|
default: O(() => [(v(), n(C(Xe(e))))]),
|
|
2363
2915
|
_: 2
|
|
2364
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
2365
|
-
default: O(() => [a("div",
|
|
2366
|
-
group:
|
|
2367
|
-
"gallery-preview-fallback":
|
|
2368
|
-
disabled:
|
|
2369
|
-
onItemClick: l[12] ||= (e) =>
|
|
2916
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, gn)]),
|
|
2917
|
+
default: O(() => [a("div", _n, [c(zt, {
|
|
2918
|
+
group: Ee(e),
|
|
2919
|
+
"gallery-preview-fallback": Y.value.galleryPreviewFallback,
|
|
2920
|
+
disabled: V.value,
|
|
2921
|
+
onItemClick: l[12] ||= (e) => We(e.groupId, e.itemId)
|
|
2370
2922
|
}, null, 8, [
|
|
2371
2923
|
"group",
|
|
2372
2924
|
"gallery-preview-fallback",
|
|
2373
2925
|
"disabled"
|
|
2374
2926
|
])])]),
|
|
2375
2927
|
_: 2
|
|
2376
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2377
|
-
c(
|
|
2378
|
-
open: E(
|
|
2379
|
-
size:
|
|
2380
|
-
"back-label":
|
|
2381
|
-
title:
|
|
2382
|
-
description:
|
|
2383
|
-
onClose:
|
|
2928
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, hn)) : r("", !0),
|
|
2929
|
+
c(X, {
|
|
2930
|
+
open: E(I).backdropOpen.value,
|
|
2931
|
+
size: _e.value,
|
|
2932
|
+
"back-label": Y.value.backstageBackLabel,
|
|
2933
|
+
title: Y.value.backstageTitle,
|
|
2934
|
+
description: Y.value.backstageDescription,
|
|
2935
|
+
onClose: Ue
|
|
2384
2936
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
2385
2937
|
name: "default",
|
|
2386
2938
|
fn: O(() => [S(t.$slots, "backstage", {
|
|
2387
|
-
close:
|
|
2388
|
-
open: E(
|
|
2389
|
-
size:
|
|
2390
|
-
backLabel:
|
|
2391
|
-
title:
|
|
2392
|
-
description:
|
|
2393
|
-
disabled: E(
|
|
2939
|
+
close: Ue,
|
|
2940
|
+
open: E(I).backdropOpen.value,
|
|
2941
|
+
size: _e.value,
|
|
2942
|
+
backLabel: Y.value.backstageBackLabel,
|
|
2943
|
+
title: Y.value.backstageTitle,
|
|
2944
|
+
description: Y.value.backstageDescription,
|
|
2945
|
+
disabled: E(I).disabled.value
|
|
2394
2946
|
})]),
|
|
2395
2947
|
key: "0"
|
|
2396
2948
|
} : void 0]), 1032, [
|
|
@@ -2400,14 +2952,14 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2400
2952
|
"title",
|
|
2401
2953
|
"description"
|
|
2402
2954
|
])
|
|
2403
|
-
], 10,
|
|
2955
|
+
], 10, Yt))]),
|
|
2404
2956
|
_: 3
|
|
2405
2957
|
}, 8, ["size"]));
|
|
2406
2958
|
}
|
|
2407
|
-
}),
|
|
2959
|
+
}), bn = {
|
|
2408
2960
|
class: "ml-ribbon-tab-definition",
|
|
2409
2961
|
hidden: ""
|
|
2410
|
-
},
|
|
2962
|
+
}, xn = /* @__PURE__ */ l({
|
|
2411
2963
|
__name: "RibbonTab",
|
|
2412
2964
|
props: {
|
|
2413
2965
|
id: {},
|
|
@@ -2418,13 +2970,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2418
2970
|
contextualTitle: {}
|
|
2419
2971
|
},
|
|
2420
2972
|
setup(e) {
|
|
2421
|
-
return (e, t) => (v(), i("div",
|
|
2973
|
+
return (e, t) => (v(), i("div", bn, [S(e.$slots, "default")]));
|
|
2422
2974
|
}
|
|
2423
|
-
}),
|
|
2975
|
+
}), Sn = {
|
|
2424
2976
|
key: 0,
|
|
2425
2977
|
class: "ml-ribbon-keytips",
|
|
2426
2978
|
"aria-live": "polite"
|
|
2427
|
-
},
|
|
2979
|
+
}, Cn = { class: "ml-ribbon-keytips__hint" }, wn = /* @__PURE__ */ l({
|
|
2428
2980
|
__name: "RibbonKeyTips",
|
|
2429
2981
|
props: {
|
|
2430
2982
|
open: { type: Boolean },
|
|
@@ -2459,11 +3011,11 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
2459
3011
|
}
|
|
2460
3012
|
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), D(() => s.open, (e) => {
|
|
2461
3013
|
e || y();
|
|
2462
|
-
}), (t, o) => n.open ? (v(), i("div",
|
|
3014
|
+
}), (t, o) => n.open ? (v(), i("div", Sn, [a("div", Cn, w(f.value), 1), (v(!0), i(e, null, x(u.value, (e) => (v(), i("span", {
|
|
2463
3015
|
key: e.id,
|
|
2464
3016
|
class: "ml-ribbon-keytip"
|
|
2465
3017
|
}, w(e.key), 1))), 128))])) : r("", !0);
|
|
2466
3018
|
}
|
|
2467
3019
|
});
|
|
2468
3020
|
//#endregion
|
|
2469
|
-
export {
|
|
3021
|
+
export { yn as MlRibbon, X as MlRibbonBackstage, Ae as MlRibbonButton, Pe as MlRibbonButtonGroup, Oe as MlRibbonCollection, Te as MlRibbonContextualTabs, Be as MlRibbonDropdown, De as MlRibbonFileMenu, St as MlRibbonGallery, Jt as MlRibbonGroup, Et as MlRibbonInputNumber, Rt as MlRibbonItemHost, wn as MlRibbonKeyTips, Mt as MlRibbonSegmented, xn as MlRibbonTab, Se as MlRibbonTabs, Ft as MlRibbonTemplateItem, Nt as MlRibbonToggleButton };
|