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