@mlightcad/ribbon 0.0.7 → 0.0.8
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 +6 -1
- package/dist/components/Ribbon.vue.d.ts +6 -2
- package/dist/components/RibbonGroup.vue.d.ts +2 -0
- package/dist/components/RibbonItemHost.vue.d.ts +2 -2
- package/dist/components/RibbonTabs.vue.d.ts +8 -2
- package/dist/composables/useRibbonState.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/ml-ribbon.css +1 -1
- package/dist/ml-ribbon.es.js +948 -684
- package/dist/ml-ribbon.umd.js +1 -1
- package/dist/modules/RibbonContextualTabs.vue.d.ts +8 -2
- package/dist/types.d.ts +8 -0
- package/package.json +1 -1
package/dist/ml-ribbon.es.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, createVNode as c, defineComponent as l, inject as u, markRaw as d, 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
|
|
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, withModifiers as k } from "vue";
|
|
2
|
+
import { ElButton as A, ElButtonGroup as ee, ElCheckbox as te, ElColorPicker as ne, ElConfigProvider as re, ElDrawer as j, ElDropdown as M, ElDropdownItem as N, ElDropdownMenu as P, ElIcon as F, ElOption as I, ElPopover as L, ElSegmented as ie, ElSelect as R, ElSwitch as ae, ElTooltip as z, useGlobalConfig as oe } from "element-plus";
|
|
3
|
+
import { ArrowDown as B, ArrowDownBold as V, ArrowUp as se, ArrowUpBold as ce, Grid as le, Menu as H, Promotion as ue } from "@element-plus/icons-vue";
|
|
4
4
|
//#region src/ribbon/context.ts
|
|
5
|
-
var
|
|
5
|
+
var de = Symbol("RibbonContext");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/ribbon/composables/useRibbonState.ts
|
|
8
|
-
function
|
|
9
|
-
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(
|
|
8
|
+
function U(e) {
|
|
9
|
+
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function W(e) {
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = { ...e };
|
|
14
|
-
return "icon" in t && (t.icon =
|
|
14
|
+
return "icon" in t && (t.icon = U(t.icon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
|
|
15
15
|
if (!e || typeof e != "object") return e;
|
|
16
16
|
let t = e;
|
|
17
17
|
return "icon" in t ? {
|
|
18
18
|
...t,
|
|
19
|
-
icon:
|
|
19
|
+
icon: U(t.icon)
|
|
20
20
|
} : t;
|
|
21
21
|
})), t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function G(e) {
|
|
24
24
|
return {
|
|
25
25
|
...e,
|
|
26
|
-
icon:
|
|
27
|
-
props:
|
|
26
|
+
icon: U(e.icon),
|
|
27
|
+
props: W(e.props)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function K(e) {
|
|
31
31
|
return {
|
|
32
32
|
...e,
|
|
33
|
-
icon:
|
|
34
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
33
|
+
icon: U(e.icon),
|
|
34
|
+
footerMenuItems: e.footerMenuItems?.map(G),
|
|
35
35
|
collections: e.collections?.map((e) => ({
|
|
36
36
|
...e,
|
|
37
|
-
items: e.items.map(
|
|
37
|
+
items: e.items.map(G)
|
|
38
38
|
}))
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function fe(e) {
|
|
42
42
|
return {
|
|
43
43
|
...e,
|
|
44
|
-
groups: e.groups?.map(
|
|
44
|
+
groups: e.groups?.map(K)
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return e.map(
|
|
47
|
+
function q(e) {
|
|
48
|
+
return e.map(fe);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function pe(e) {
|
|
51
51
|
(!e.collections || e.collections.length === 0) && (e.collections = [{
|
|
52
52
|
id: `${e.id}-collection-1`,
|
|
53
53
|
items: []
|
|
54
54
|
}]);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function J(e, t, n, r, i) {
|
|
57
57
|
let a = e.find((e) => e.id === t);
|
|
58
58
|
if (!a?.groups) return;
|
|
59
59
|
let o = a.groups.find((e) => e.id === n);
|
|
@@ -61,99 +61,101 @@ 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
|
|
64
|
+
function me(e, n, r, i, a, o, s, c) {
|
|
65
|
+
let l = b(r), u = b(i), d = b(a), f = b(o), p = b(q(n)), m = b(!1), h = b(!1), g = b(!1), _ = b([]), v = b(""), y = b(s), x = b(c), S = t(() => p.value.filter((e) => e.visible !== !1)), C = {
|
|
66
66
|
addTab(e) {
|
|
67
|
-
|
|
67
|
+
p.value.push(fe(e)), f.value ||= e.id;
|
|
68
68
|
},
|
|
69
69
|
removeTab(e) {
|
|
70
|
-
|
|
70
|
+
p.value = p.value.filter((t) => t.id !== e), f.value === e && (f.value = S.value[0]?.id ?? "");
|
|
71
71
|
},
|
|
72
72
|
showTab(e) {
|
|
73
|
-
let t =
|
|
73
|
+
let t = p.value.find((t) => t.id === e);
|
|
74
74
|
t && (t.visible = !0);
|
|
75
75
|
},
|
|
76
76
|
hideTab(e) {
|
|
77
|
-
let t =
|
|
77
|
+
let t = p.value.find((t) => t.id === e);
|
|
78
78
|
t && (t.visible = !1);
|
|
79
79
|
},
|
|
80
80
|
selectTab(e) {
|
|
81
|
-
|
|
81
|
+
f.value = e;
|
|
82
82
|
},
|
|
83
83
|
addGroup(e, t) {
|
|
84
|
-
let n =
|
|
85
|
-
n && (n.groups ??= [],
|
|
84
|
+
let n = p.value.find((t) => t.id === e);
|
|
85
|
+
n && (n.groups ??= [], pe(t), n.groups.push(K(t)));
|
|
86
86
|
},
|
|
87
87
|
removeGroup(e, t) {
|
|
88
|
-
let n =
|
|
88
|
+
let n = p.value.find((t) => t.id === e);
|
|
89
89
|
n?.groups && (n.groups = n.groups.filter((e) => e.id !== t));
|
|
90
90
|
},
|
|
91
91
|
showGroup(e, t) {
|
|
92
|
-
let n =
|
|
92
|
+
let n = p.value.find((t) => t.id === e)?.groups?.find((e) => e.id === t);
|
|
93
93
|
n && (n.visible = !0);
|
|
94
94
|
},
|
|
95
95
|
hideGroup(e, t) {
|
|
96
|
-
let n =
|
|
96
|
+
let n = p.value.find((t) => t.id === e)?.groups?.find((e) => e.id === t);
|
|
97
97
|
n && (n.visible = !1);
|
|
98
98
|
},
|
|
99
99
|
addItem(e, t, n, r) {
|
|
100
|
-
|
|
100
|
+
J(p.value, e, t, n, (e) => e.push(G(r)));
|
|
101
101
|
},
|
|
102
102
|
removeItem(e, t, n, r) {
|
|
103
|
-
|
|
103
|
+
J(p.value, e, t, n, (e) => {
|
|
104
104
|
let t = e.findIndex((e) => e.id === r);
|
|
105
105
|
t >= 0 && e.splice(t, 1);
|
|
106
106
|
});
|
|
107
107
|
},
|
|
108
108
|
updateItem(e, t, n, r, i) {
|
|
109
|
-
|
|
109
|
+
J(p.value, e, t, n, (e) => {
|
|
110
110
|
let t = e.find((e) => e.id === r);
|
|
111
111
|
t && Object.assign(t, i);
|
|
112
112
|
});
|
|
113
113
|
},
|
|
114
114
|
enableItem(e, t, n, r) {
|
|
115
|
-
|
|
115
|
+
C.updateItem(e, t, n, r, { disabled: !1 });
|
|
116
116
|
},
|
|
117
117
|
disableItem(e, t, n, r) {
|
|
118
|
-
|
|
118
|
+
C.updateItem(e, t, n, r, { disabled: !0 });
|
|
119
119
|
},
|
|
120
120
|
refreshLayout() {
|
|
121
|
-
|
|
121
|
+
m.value = !1;
|
|
122
122
|
},
|
|
123
123
|
minimize(e) {
|
|
124
|
-
|
|
124
|
+
d.value = e;
|
|
125
125
|
},
|
|
126
126
|
toggleSimplified() {
|
|
127
|
-
|
|
127
|
+
u.value = u.value === "classic" ? "simplified" : "classic";
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
return {
|
|
131
131
|
context: {
|
|
132
132
|
id: e,
|
|
133
|
-
disabled:
|
|
134
|
-
layout:
|
|
135
|
-
minimized:
|
|
136
|
-
activeTab:
|
|
137
|
-
tabs:
|
|
138
|
-
overflowOpen:
|
|
139
|
-
backdropOpen:
|
|
140
|
-
keyTipsOpen:
|
|
141
|
-
keyTips:
|
|
142
|
-
keyTipsSequence:
|
|
133
|
+
disabled: l,
|
|
134
|
+
layout: u,
|
|
135
|
+
minimized: d,
|
|
136
|
+
activeTab: f,
|
|
137
|
+
tabs: p,
|
|
138
|
+
overflowOpen: m,
|
|
139
|
+
backdropOpen: h,
|
|
140
|
+
keyTipsOpen: g,
|
|
141
|
+
keyTips: _,
|
|
142
|
+
keyTipsSequence: v,
|
|
143
|
+
tooltipShowAfter: y,
|
|
144
|
+
tooltipHideAfter: x,
|
|
143
145
|
registerKeyTip: (e) => {
|
|
144
|
-
|
|
146
|
+
_.value.some((t) => t.id === e.id) || _.value.push(e);
|
|
145
147
|
},
|
|
146
148
|
unregisterKeyTip: (e) => {
|
|
147
|
-
|
|
149
|
+
_.value = _.value.filter((t) => t.id !== e);
|
|
148
150
|
},
|
|
149
|
-
api:
|
|
151
|
+
api: C
|
|
150
152
|
},
|
|
151
|
-
visibleTabs:
|
|
153
|
+
visibleTabs: S
|
|
152
154
|
};
|
|
153
155
|
}
|
|
154
156
|
//#endregion
|
|
155
157
|
//#region src/ribbon/modules/RibbonBackstage.vue?vue&type=script&setup=true&lang.ts
|
|
156
|
-
var
|
|
158
|
+
var Y = { class: "ml-ribbon-backstage__nav" }, he = { class: "ml-ribbon-backstage__content" }, X = { key: 0 }, ge = { key: 1 }, _e = /* @__PURE__ */ l({
|
|
157
159
|
__name: "RibbonBackstage",
|
|
158
160
|
props: {
|
|
159
161
|
open: { type: Boolean },
|
|
@@ -168,38 +170,38 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
168
170
|
function d() {
|
|
169
171
|
u("close");
|
|
170
172
|
}
|
|
171
|
-
return (t, o) => (v(), n(
|
|
173
|
+
return (t, o) => (v(), n(E(j), {
|
|
172
174
|
"model-value": l.open,
|
|
173
175
|
size: "100%",
|
|
174
176
|
"with-header": !1,
|
|
175
177
|
direction: "ltr",
|
|
176
178
|
onClose: d
|
|
177
179
|
}, {
|
|
178
|
-
default:
|
|
180
|
+
default: O(() => [a("div", { class: m(["ml-ribbon-backstage", `ml-ribbon-backstage--size-${l.size || "default"}`]) }, [t.$slots.default ? S(t.$slots, "default", {
|
|
179
181
|
key: 0,
|
|
180
182
|
close: d,
|
|
181
183
|
backLabel: l.backLabel,
|
|
182
184
|
title: l.title,
|
|
183
185
|
description: l.description,
|
|
184
186
|
size: l.size
|
|
185
|
-
}) : (v(), i(e, { key: 1 }, [a("aside",
|
|
187
|
+
}) : (v(), i(e, { key: 1 }, [a("aside", Y, [c(E(A), {
|
|
186
188
|
type: "primary",
|
|
187
189
|
onClick: d
|
|
188
190
|
}, {
|
|
189
|
-
default:
|
|
191
|
+
default: O(() => [s(w(l.backLabel), 1)]),
|
|
190
192
|
_: 1
|
|
191
|
-
})]), a("section",
|
|
193
|
+
})]), a("section", he, [l.title ? (v(), i("h2", X, w(l.title), 1)) : r("", !0), l.description ? (v(), i("p", ge, w(l.description), 1)) : r("", !0)])], 64))], 2)]),
|
|
192
194
|
_: 3
|
|
193
195
|
}, 8, ["model-value"]));
|
|
194
196
|
}
|
|
195
|
-
}),
|
|
197
|
+
}), Z = {
|
|
196
198
|
class: "ml-ribbon-tabs",
|
|
197
199
|
role: "tablist"
|
|
198
|
-
},
|
|
200
|
+
}, ve = [
|
|
199
201
|
"aria-selected",
|
|
200
202
|
"disabled",
|
|
201
203
|
"onClick"
|
|
202
|
-
],
|
|
204
|
+
], ye = /* @__PURE__ */ l({
|
|
203
205
|
__name: "RibbonTabs",
|
|
204
206
|
props: {
|
|
205
207
|
tabs: {},
|
|
@@ -209,15 +211,21 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
209
211
|
emits: ["select"],
|
|
210
212
|
setup(n, { emit: r }) {
|
|
211
213
|
let a = n, o = r, s = t(() => a.tabs.filter((e) => e.visible !== !1));
|
|
212
|
-
|
|
214
|
+
function c(e, t) {
|
|
215
|
+
o("select", {
|
|
216
|
+
id: e,
|
|
217
|
+
triggerEl: t.currentTarget instanceof HTMLElement ? t.currentTarget : null
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
return (t, r) => (v(), i("div", Z, [(v(!0), i(e, null, x(s.value, (e) => (v(), i("button", {
|
|
213
221
|
key: e.id,
|
|
214
222
|
type: "button",
|
|
215
223
|
class: m(["ml-ribbon-tab", { "is-active": n.activeTab === e.id }]),
|
|
216
224
|
role: "tab",
|
|
217
225
|
"aria-selected": n.activeTab === e.id,
|
|
218
226
|
disabled: a.disabled,
|
|
219
|
-
onClick: (t) =>
|
|
220
|
-
}, w(e.title), 11,
|
|
227
|
+
onClick: (t) => c(e.id, t)
|
|
228
|
+
}, w(e.title), 11, ve))), 128))]));
|
|
221
229
|
}
|
|
222
230
|
}), be = { class: "ml-ribbon-contextual-tabs" }, xe = { class: "ml-ribbon-contextual-tabs__normal" }, Se = { class: "ml-ribbon-contextual-tabs__ctx" }, Ce = /* @__PURE__ */ l({
|
|
223
231
|
__name: "RibbonContextualTabs",
|
|
@@ -230,7 +238,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
230
238
|
emits: ["select"],
|
|
231
239
|
setup(t, { emit: n }) {
|
|
232
240
|
let r = t, o = n;
|
|
233
|
-
return (n, s) => (v(), i("div", be, [a("div", xe, [c(
|
|
241
|
+
return (n, s) => (v(), i("div", be, [a("div", xe, [c(ye, {
|
|
234
242
|
tabs: r.tabs.filter((e) => !e.contextual),
|
|
235
243
|
"active-tab": t.activeTab,
|
|
236
244
|
disabled: r.disabled,
|
|
@@ -243,7 +251,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
243
251
|
key: e.id,
|
|
244
252
|
class: "ml-ribbon-contextual-tabs__block",
|
|
245
253
|
style: h({ "--ctx-color": e.contextualColor || "#67c23a" })
|
|
246
|
-
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(
|
|
254
|
+
}, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(ye, {
|
|
247
255
|
tabs: [e],
|
|
248
256
|
"active-tab": t.activeTab,
|
|
249
257
|
disabled: r.disabled,
|
|
@@ -265,7 +273,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
265
273
|
},
|
|
266
274
|
emits: ["select", "open-backstage"],
|
|
267
275
|
setup(o, { emit: l }) {
|
|
268
|
-
let u = o, d = l, f = b(!1), p =
|
|
276
|
+
let u = o, d = l, f = b(!1), p = oe("size", ""), h = t(() => p.value || "default"), g = t(() => `ml-ribbon-file-menu-dropdown ml-ribbon-popper ml-ribbon-popper--size-${h.value}`);
|
|
269
277
|
function _(e) {
|
|
270
278
|
f.value = e;
|
|
271
279
|
}
|
|
@@ -276,29 +284,29 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
276
284
|
}
|
|
277
285
|
d("select", e);
|
|
278
286
|
}
|
|
279
|
-
return
|
|
287
|
+
return D(() => u.disabled, (e) => {
|
|
280
288
|
e && (f.value = !1);
|
|
281
|
-
}), (t, o) => (v(), n(
|
|
289
|
+
}), (t, o) => (v(), n(E(M), {
|
|
282
290
|
trigger: "click",
|
|
283
291
|
disabled: u.disabled,
|
|
284
292
|
"popper-class": g.value,
|
|
285
293
|
onCommand: y,
|
|
286
294
|
onVisibleChange: _
|
|
287
295
|
}, {
|
|
288
|
-
dropdown:
|
|
289
|
-
default:
|
|
296
|
+
dropdown: O(() => [c(E(P), null, {
|
|
297
|
+
default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(N), {
|
|
290
298
|
key: 0,
|
|
291
299
|
command: "__backstage"
|
|
292
300
|
}, {
|
|
293
|
-
default:
|
|
301
|
+
default: O(() => [s(w(u.openBackstageLabel), 1)]),
|
|
294
302
|
_: 1
|
|
295
|
-
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(
|
|
303
|
+
})), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(N), {
|
|
296
304
|
key: e.id,
|
|
297
305
|
divided: u.showOpenBackstage !== !1 && t === 0,
|
|
298
306
|
command: e.id,
|
|
299
307
|
disabled: e.disabled
|
|
300
308
|
}, {
|
|
301
|
-
default:
|
|
309
|
+
default: O(() => [s(w(e.label), 1)]),
|
|
302
310
|
_: 2
|
|
303
311
|
}, 1032, [
|
|
304
312
|
"divided",
|
|
@@ -307,7 +315,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
307
315
|
]))), 128))]),
|
|
308
316
|
_: 1
|
|
309
317
|
})]),
|
|
310
|
-
default:
|
|
318
|
+
default: O(() => [a("button", {
|
|
311
319
|
type: "button",
|
|
312
320
|
class: m(["ml-ribbon-tab ml-ribbon-tab--file", { "is-active": f.value }]),
|
|
313
321
|
disabled: u.disabled
|
|
@@ -332,7 +340,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
332
340
|
}), De = {
|
|
333
341
|
key: 0,
|
|
334
342
|
class: "ml-ribbon-gallery__title"
|
|
335
|
-
}, Oe = { class: "ml-ribbon-gallery__categories" }, ke = { class: "ml-ribbon-gallery__category-title" }, Ae = { class: "ml-ribbon-gallery__grid" }, je = ["disabled", "onClick"],
|
|
343
|
+
}, Oe = { class: "ml-ribbon-gallery__categories" }, ke = { class: "ml-ribbon-gallery__category-title" }, Ae = { class: "ml-ribbon-gallery__grid" }, je = ["disabled", "onClick"], Me = { class: "ml-ribbon-gallery__preview" }, Ne = { class: "ml-ribbon-gallery__label" }, Pe = /* @__PURE__ */ l({
|
|
336
344
|
__name: "RibbonGallery",
|
|
337
345
|
props: {
|
|
338
346
|
id: {},
|
|
@@ -359,9 +367,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
359
367
|
class: m(["ml-ribbon-gallery__item", { "is-selected": c.value === e.id }]),
|
|
360
368
|
disabled: t.disabled,
|
|
361
369
|
onClick: (t) => l(e.id)
|
|
362
|
-
}, [a("div",
|
|
370
|
+
}, [a("div", Me, w(e.preview ?? o.previewFallback), 1), a("div", Ne, w(e.label), 1)], 10, je))), 128))])]))), 128))])], 2));
|
|
363
371
|
}
|
|
364
|
-
}),
|
|
372
|
+
}), Fe = ["data-id"], Ie = { class: "ml-ribbon-button-group__label" }, Le = /* @__PURE__ */ l({
|
|
365
373
|
__name: "RibbonButtonGroup",
|
|
366
374
|
props: {
|
|
367
375
|
id: {},
|
|
@@ -381,35 +389,35 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
381
389
|
return (o, l) => (v(), i("div", {
|
|
382
390
|
class: "ml-ribbon-button-group",
|
|
383
391
|
"data-id": t.id
|
|
384
|
-
}, [a("div",
|
|
385
|
-
default:
|
|
392
|
+
}, [a("div", Ie, w(t.label), 1), c(E(ee), null, {
|
|
393
|
+
default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(A), {
|
|
386
394
|
key: e.value,
|
|
387
395
|
disabled: t.disabled,
|
|
388
396
|
type: "default",
|
|
389
397
|
onClick: (t) => d(e.value)
|
|
390
398
|
}, {
|
|
391
|
-
default:
|
|
399
|
+
default: O(() => [e.icon ? (v(), n(E(F), {
|
|
392
400
|
key: 0,
|
|
393
401
|
class: "ml-ribbon-item-host__icon"
|
|
394
402
|
}, {
|
|
395
|
-
default:
|
|
403
|
+
default: O(() => [(v(), n(C(e.icon)))]),
|
|
396
404
|
_: 2
|
|
397
405
|
}, 1024)) : r("", !0), s(" " + w(e.label), 1)]),
|
|
398
406
|
_: 2
|
|
399
407
|
}, 1032, ["disabled", "onClick"]))), 128))]),
|
|
400
408
|
_: 1
|
|
401
|
-
})], 8,
|
|
409
|
+
})], 8, Fe));
|
|
402
410
|
}
|
|
403
|
-
}),
|
|
411
|
+
}), Re = ["data-id"], ze = {
|
|
404
412
|
key: 0,
|
|
405
413
|
class: "ml-ribbon-segmented__label"
|
|
406
|
-
},
|
|
414
|
+
}, Be = ["data-option-value"], Ve = {
|
|
407
415
|
key: 2,
|
|
408
416
|
class: "ml-ribbon-segmented__option-label"
|
|
409
|
-
},
|
|
417
|
+
}, Q = {
|
|
410
418
|
key: 3,
|
|
411
419
|
class: "ml-ribbon-segmented__option-sr-label"
|
|
412
|
-
},
|
|
420
|
+
}, He = /* @__PURE__ */ l({
|
|
413
421
|
__name: "RibbonSegmented",
|
|
414
422
|
props: {
|
|
415
423
|
id: {},
|
|
@@ -465,7 +473,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
465
473
|
return (t, o) => (v(), i("div", {
|
|
466
474
|
class: "ml-ribbon-segmented",
|
|
467
475
|
"data-id": e.id
|
|
468
|
-
}, [d.value ? (v(), i("div",
|
|
476
|
+
}, [d.value ? (v(), i("div", ze, w(u.value), 1)) : r("", !0), c(E(ie), {
|
|
469
477
|
class: "ml-ribbon-segmented__control",
|
|
470
478
|
options: e.options,
|
|
471
479
|
"model-value": e.modelValue,
|
|
@@ -475,21 +483,21 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
475
483
|
"aria-label": u.value || e.id,
|
|
476
484
|
onChange: b
|
|
477
485
|
}, {
|
|
478
|
-
default:
|
|
486
|
+
default: O(({ item: e }) => [a("span", {
|
|
479
487
|
class: "ml-ribbon-segmented__option",
|
|
480
488
|
"data-option-value": y(e)
|
|
481
|
-
}, [h(e) ? (v(), n(
|
|
489
|
+
}, [h(e) ? (v(), n(E(F), {
|
|
482
490
|
key: 0,
|
|
483
491
|
class: "ml-ribbon-segmented__option-icon",
|
|
484
492
|
"aria-hidden": "true"
|
|
485
493
|
}, {
|
|
486
|
-
default:
|
|
494
|
+
default: O(() => [(v(), n(C(h(e))))]),
|
|
487
495
|
_: 2
|
|
488
496
|
}, 1024)) : g(e) ? (v(), i("i", {
|
|
489
497
|
key: 1,
|
|
490
498
|
class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", g(e)]),
|
|
491
499
|
"aria-hidden": "true"
|
|
492
|
-
}, null, 2)) : r("", !0), _(e) ? (v(), i("span",
|
|
500
|
+
}, null, 2)) : r("", !0), _(e) ? (v(), i("span", Ve, w(p(e)), 1)) : (v(), i("span", Q, w(p(e)), 1))], 8, Be)]),
|
|
493
501
|
_: 1
|
|
494
502
|
}, 8, [
|
|
495
503
|
"options",
|
|
@@ -498,12 +506,12 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
498
506
|
"block",
|
|
499
507
|
"disabled",
|
|
500
508
|
"aria-label"
|
|
501
|
-
])], 8,
|
|
509
|
+
])], 8, Re));
|
|
502
510
|
}
|
|
503
|
-
}),
|
|
511
|
+
}), Ue = {
|
|
504
512
|
key: 2,
|
|
505
513
|
class: "ml-ribbon-item-host__label"
|
|
506
|
-
},
|
|
514
|
+
}, We = /* @__PURE__ */ l({
|
|
507
515
|
__name: "RibbonToggleButton",
|
|
508
516
|
props: {
|
|
509
517
|
id: {},
|
|
@@ -534,7 +542,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
534
542
|
return typeof e != "string" || e.trim().length === 0 ? null : e;
|
|
535
543
|
}
|
|
536
544
|
let c = e, l = a, u = b(!!c.modelValue);
|
|
537
|
-
|
|
545
|
+
D(() => c.modelValue, (e) => {
|
|
538
546
|
u.value = !!e;
|
|
539
547
|
}, { immediate: !0 });
|
|
540
548
|
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);
|
|
@@ -543,7 +551,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
543
551
|
let e = !u.value;
|
|
544
552
|
u.value = e, l("change", e);
|
|
545
553
|
}
|
|
546
|
-
return (t, a) => (v(), n(
|
|
554
|
+
return (t, a) => (v(), n(E(A), {
|
|
547
555
|
class: m(["ml-ribbon-toggle", { "is-active": d.value }]),
|
|
548
556
|
type: "default",
|
|
549
557
|
disabled: e.disabled,
|
|
@@ -551,17 +559,17 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
551
559
|
"aria-pressed": String(d.value),
|
|
552
560
|
onClick: y
|
|
553
561
|
}, {
|
|
554
|
-
default:
|
|
562
|
+
default: O(() => [p.value ? (v(), n(E(F), {
|
|
555
563
|
key: 0,
|
|
556
564
|
class: "ml-ribbon-item-host__icon"
|
|
557
565
|
}, {
|
|
558
|
-
default:
|
|
566
|
+
default: O(() => [(v(), n(C(p.value)))]),
|
|
559
567
|
_: 1
|
|
560
568
|
})) : h.value ? (v(), i("i", {
|
|
561
569
|
key: 1,
|
|
562
570
|
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", h.value]),
|
|
563
571
|
"aria-hidden": "true"
|
|
564
|
-
}, null, 2)) : r("", !0), _.value ? (v(), i("span",
|
|
572
|
+
}, null, 2)) : r("", !0), _.value ? (v(), i("span", Ue, w(g.value), 1)) : r("", !0)]),
|
|
565
573
|
_: 1
|
|
566
574
|
}, 8, [
|
|
567
575
|
"class",
|
|
@@ -570,7 +578,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
570
578
|
"aria-pressed"
|
|
571
579
|
]));
|
|
572
580
|
}
|
|
573
|
-
}),
|
|
581
|
+
}), Ge = ["data-template-id", "aria-disabled"], Ke = /* @__PURE__ */ l({
|
|
574
582
|
__name: "RibbonTemplateItem",
|
|
575
583
|
props: {
|
|
576
584
|
id: {},
|
|
@@ -585,12 +593,12 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
585
593
|
}, [S(t.$slots, "default", {
|
|
586
594
|
item: e.item,
|
|
587
595
|
disabled: e.disabled
|
|
588
|
-
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8,
|
|
596
|
+
}, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8, Ge));
|
|
589
597
|
}
|
|
590
|
-
}),
|
|
598
|
+
}), qe = ["data-item-id"], Je = {
|
|
591
599
|
key: 0,
|
|
592
600
|
class: "ml-ribbon-item-host__keytip"
|
|
593
|
-
},
|
|
601
|
+
}, $ = { class: "ml-ribbon-item-host__content" }, Ye = { class: "ml-ribbon-item-host__text-row" }, Xe = {
|
|
594
602
|
key: 0,
|
|
595
603
|
class: "ml-ribbon-item-host__label"
|
|
596
604
|
}, Ze = { class: "ml-ribbon-dropdown-item__content" }, Qe = { class: "ml-ribbon-dropdown-item__label" }, $e = {
|
|
@@ -606,73 +614,73 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
606
614
|
},
|
|
607
615
|
emits: ["item-click"],
|
|
608
616
|
setup(o, { emit: l }) {
|
|
609
|
-
let d = o, p = l, h = u(
|
|
617
|
+
let d = o, p = l, h = u(de, null), g = t(() => Array.isArray(d.item.props?.options) ? d.item.props.options : []), _ = oe("size", ""), y = t(() => _.value || "default"), T = t(() => ke(h?.tooltipShowAfter.value, 1e3)), D = t(() => ke(h?.tooltipHideAfter.value, 0)), ee = t(() => `ml-ribbon-dropdown-menu ml-ribbon-popper ml-ribbon-popper--size-${y.value}`), re = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${y.value}`), j = t(() => d.item.props?.icon || (typeof d.item.icon == "string" || !d.item.icon ? null : d.item.icon)), L = t(() => {
|
|
610
618
|
let e = d.item.props?.icon;
|
|
611
619
|
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
|
-
}),
|
|
620
|
+
}), ie = t(() => d.item.hideLabel !== !0), ae = t(() => Oe(d.item.tooltip) ?? Oe(d.item.label) ?? Ae(d.item) ?? je(d.item.id)), V = t(() => ae.value ?? d.item.id), ce = t(() => d.item.keyTip?.trim().toUpperCase() ?? ""), le = t(() => d.item.props?.syncLabelWithSelection === !0), H = b(!1), ue = b(void 0), U = t(() => g.value.find((e) => Ee(e) === ue.value) ?? null), W = t(() => {
|
|
613
621
|
let e = U.value;
|
|
614
|
-
if (e &&
|
|
615
|
-
let t =
|
|
622
|
+
if (e && le.value) {
|
|
623
|
+
let t = De(e);
|
|
616
624
|
if (t) return t;
|
|
617
625
|
}
|
|
618
626
|
return d.item.label ?? d.item.id;
|
|
619
|
-
}),
|
|
627
|
+
}), G = t(() => {
|
|
620
628
|
if (U.value) {
|
|
621
|
-
let e =
|
|
629
|
+
let e = we(U.value);
|
|
622
630
|
if (e) return e;
|
|
623
631
|
}
|
|
624
|
-
return
|
|
625
|
-
}),
|
|
632
|
+
return j.value;
|
|
633
|
+
}), K = t(() => {
|
|
626
634
|
if (U.value) {
|
|
627
|
-
let e =
|
|
635
|
+
let e = Te(U.value);
|
|
628
636
|
if (e) return e;
|
|
629
637
|
}
|
|
630
|
-
return
|
|
631
|
-
}),
|
|
632
|
-
if (!h?.keyTipsOpen.value || h?.disabled.value || !
|
|
638
|
+
return G.value ? null : L.value;
|
|
639
|
+
}), fe = t(() => {
|
|
640
|
+
if (!h?.keyTipsOpen.value || h?.disabled.value || !ce.value) return !1;
|
|
633
641
|
let e = h.keyTipsSequence.value.toLowerCase();
|
|
634
|
-
return e ?
|
|
635
|
-
}),
|
|
642
|
+
return e ? ce.value.toLowerCase().startsWith(e) : !0;
|
|
643
|
+
}), q = t(() => d.item.disabled === !0 || h?.disabled.value === !0), pe = t(() => d.item.props?.modelValue), J = t(() => d.item.props?.activeLabel), me = t(() => d.item.props?.inactiveLabel), Y = t(() => {
|
|
636
644
|
let e = d.item.props?.component;
|
|
637
645
|
return !e || typeof e == "string" ? null : e;
|
|
638
|
-
}),
|
|
646
|
+
}), he = t(() => {
|
|
639
647
|
let e = d.item.props?.componentProps;
|
|
640
648
|
return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
|
|
641
649
|
});
|
|
642
650
|
function X() {
|
|
643
|
-
|
|
651
|
+
q.value || p("item-click", d.id);
|
|
644
652
|
}
|
|
645
|
-
function
|
|
646
|
-
if (
|
|
647
|
-
|
|
653
|
+
function ge(e) {
|
|
654
|
+
if (q.value) {
|
|
655
|
+
H.value = !1;
|
|
648
656
|
return;
|
|
649
657
|
}
|
|
650
|
-
|
|
658
|
+
H.value = e;
|
|
651
659
|
}
|
|
652
|
-
function
|
|
653
|
-
|
|
660
|
+
function _e(e) {
|
|
661
|
+
q.value || (ue.value = e, ye(e), H.value = !1);
|
|
654
662
|
}
|
|
655
|
-
function
|
|
656
|
-
|
|
663
|
+
function Z() {
|
|
664
|
+
q.value || (H.value = !H.value);
|
|
657
665
|
}
|
|
658
|
-
function
|
|
659
|
-
if (
|
|
666
|
+
function ve() {
|
|
667
|
+
if (q.value) return;
|
|
660
668
|
let e = U.value;
|
|
661
669
|
if (!e) {
|
|
662
670
|
X();
|
|
663
671
|
return;
|
|
664
672
|
}
|
|
665
|
-
|
|
673
|
+
ye(Ee(e));
|
|
666
674
|
}
|
|
667
|
-
function
|
|
675
|
+
function ye(e) {
|
|
668
676
|
if (typeof e == "string" || typeof e == "number") {
|
|
669
677
|
p("item-click", String(e));
|
|
670
678
|
return;
|
|
671
679
|
}
|
|
672
680
|
X();
|
|
673
681
|
}
|
|
674
|
-
function
|
|
675
|
-
if (!
|
|
682
|
+
function be(e) {
|
|
683
|
+
if (!q.value) {
|
|
676
684
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
677
685
|
p("item-click", String(e));
|
|
678
686
|
return;
|
|
@@ -680,8 +688,8 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
680
688
|
X();
|
|
681
689
|
}
|
|
682
690
|
}
|
|
683
|
-
function
|
|
684
|
-
if (
|
|
691
|
+
function xe(e) {
|
|
692
|
+
if (q.value) return;
|
|
685
693
|
let t = e ? d.item.props?.activeValue : d.item.props?.inactiveValue;
|
|
686
694
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
|
|
687
695
|
p("item-click", String(t));
|
|
@@ -689,8 +697,8 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
689
697
|
}
|
|
690
698
|
p("item-click", String(e));
|
|
691
699
|
}
|
|
692
|
-
function
|
|
693
|
-
if (!
|
|
700
|
+
function Se(e) {
|
|
701
|
+
if (!q.value) {
|
|
694
702
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
695
703
|
p("item-click", String(e));
|
|
696
704
|
return;
|
|
@@ -698,8 +706,8 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
698
706
|
X();
|
|
699
707
|
}
|
|
700
708
|
}
|
|
701
|
-
function
|
|
702
|
-
if (!
|
|
709
|
+
function Ce(e) {
|
|
710
|
+
if (!q.value) {
|
|
703
711
|
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
|
|
704
712
|
p("item-click", String(e));
|
|
705
713
|
return;
|
|
@@ -707,223 +715,254 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
707
715
|
X();
|
|
708
716
|
}
|
|
709
717
|
}
|
|
710
|
-
function
|
|
718
|
+
function we(e) {
|
|
711
719
|
if (!e || typeof e != "object") return null;
|
|
712
720
|
let t = e.icon;
|
|
713
721
|
return !t || typeof t == "string" ? null : t;
|
|
714
722
|
}
|
|
715
|
-
function
|
|
723
|
+
function Te(e) {
|
|
716
724
|
if (!e || typeof e != "object") return null;
|
|
717
725
|
let t = e.icon;
|
|
718
726
|
return typeof t != "string" || t.trim().length === 0 ? null : t;
|
|
719
727
|
}
|
|
720
|
-
function
|
|
728
|
+
function Ee(e) {
|
|
721
729
|
if (!(!e || typeof e != "object")) return e.value;
|
|
722
730
|
}
|
|
723
|
-
function
|
|
731
|
+
function De(e) {
|
|
724
732
|
if (!e || typeof e != "object") return;
|
|
725
733
|
let t = e.label;
|
|
726
734
|
return typeof t == "string" ? t : void 0;
|
|
727
735
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
"
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
"
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
label: o.item.label ?? o.item.id,
|
|
752
|
-
options: o.item.props?.options ?? [],
|
|
753
|
-
"model-value": o.item.props?.modelValue,
|
|
754
|
-
direction: o.item.props?.direction ?? "horizontal",
|
|
755
|
-
block: o.item.props?.block === !0,
|
|
756
|
-
disabled: G.value,
|
|
757
|
-
"hide-label": o.item.hideLabel === !0,
|
|
758
|
-
onChange: _e
|
|
759
|
-
}, null, 8, [
|
|
760
|
-
"id",
|
|
761
|
-
"label",
|
|
762
|
-
"options",
|
|
763
|
-
"model-value",
|
|
764
|
-
"direction",
|
|
765
|
-
"block",
|
|
766
|
-
"disabled",
|
|
767
|
-
"hide-label"
|
|
768
|
-
])) : o.item.type === "toggle" ? (v(), n(Ue, {
|
|
769
|
-
key: 3,
|
|
770
|
-
id: o.item.id,
|
|
771
|
-
label: o.item.label ?? o.item.id,
|
|
772
|
-
"model-value": K.value,
|
|
773
|
-
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
774
|
-
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
775
|
-
"active-label": q.value,
|
|
776
|
-
"inactive-label": de.value,
|
|
777
|
-
disabled: G.value,
|
|
778
|
-
"hide-label": o.item.hideLabel === !0,
|
|
779
|
-
onChange: ve
|
|
780
|
-
}, null, 8, [
|
|
781
|
-
"id",
|
|
782
|
-
"label",
|
|
783
|
-
"model-value",
|
|
784
|
-
"active-icon",
|
|
785
|
-
"inactive-icon",
|
|
786
|
-
"active-label",
|
|
787
|
-
"inactive-label",
|
|
788
|
-
"disabled",
|
|
789
|
-
"hide-label"
|
|
790
|
-
])) : o.item.type === "gallery" ? (v(), n(Ne, {
|
|
791
|
-
key: 4,
|
|
792
|
-
id: o.item.id,
|
|
793
|
-
label: o.item.label ?? "",
|
|
794
|
-
categories: o.item.props?.categories ?? [],
|
|
795
|
-
"preview-fallback": d.galleryPreviewFallback,
|
|
796
|
-
disabled: G.value,
|
|
797
|
-
onSelect: X
|
|
798
|
-
}, null, 8, [
|
|
799
|
-
"id",
|
|
800
|
-
"label",
|
|
801
|
-
"categories",
|
|
802
|
-
"preview-fallback",
|
|
803
|
-
"disabled"
|
|
804
|
-
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(Ge, {
|
|
805
|
-
key: 5,
|
|
806
|
-
id: o.item.id,
|
|
807
|
-
item: o.item,
|
|
808
|
-
disabled: G.value
|
|
736
|
+
function Oe(e) {
|
|
737
|
+
if (typeof e != "string") return;
|
|
738
|
+
let t = e.trim();
|
|
739
|
+
return t.length > 0 ? t : void 0;
|
|
740
|
+
}
|
|
741
|
+
function ke(e, t) {
|
|
742
|
+
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
743
|
+
}
|
|
744
|
+
function Ae(e) {
|
|
745
|
+
let t = g.value.map((e) => De(e)).filter((e) => !!e);
|
|
746
|
+
if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
|
|
747
|
+
}
|
|
748
|
+
function je(e) {
|
|
749
|
+
let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
750
|
+
return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
|
|
751
|
+
}
|
|
752
|
+
return (t, l) => (v(), n(E(z), {
|
|
753
|
+
content: ae.value,
|
|
754
|
+
disabled: !ae.value,
|
|
755
|
+
"show-after": T.value,
|
|
756
|
+
"hide-after": D.value,
|
|
757
|
+
placement: "top",
|
|
758
|
+
effect: "dark"
|
|
809
759
|
}, {
|
|
810
|
-
default:
|
|
760
|
+
default: O(() => [a("div", {
|
|
761
|
+
class: m(["ml-ribbon-item-host", [
|
|
762
|
+
`is-${o.item.size ?? "medium"}`,
|
|
763
|
+
`type-${o.item.type}`,
|
|
764
|
+
{ "is-label-hidden": o.item.hideLabel === !0 }
|
|
765
|
+
]]),
|
|
766
|
+
"data-item-id": o.id,
|
|
767
|
+
role: "group"
|
|
768
|
+
}, [fe.value ? (v(), i("span", Je, w(ce.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Le, {
|
|
769
|
+
key: 1,
|
|
770
|
+
id: o.item.id,
|
|
771
|
+
label: o.item.label ?? "",
|
|
772
|
+
options: o.item.props?.options ?? [],
|
|
773
|
+
disabled: q.value,
|
|
774
|
+
onChange: Se
|
|
775
|
+
}, null, 8, [
|
|
776
|
+
"id",
|
|
777
|
+
"label",
|
|
778
|
+
"options",
|
|
779
|
+
"disabled"
|
|
780
|
+
])) : o.item.type === "segmented" ? (v(), n(He, {
|
|
781
|
+
key: 2,
|
|
782
|
+
id: o.item.id,
|
|
783
|
+
label: o.item.label ?? o.item.id,
|
|
784
|
+
options: o.item.props?.options ?? [],
|
|
785
|
+
"model-value": o.item.props?.modelValue,
|
|
786
|
+
direction: o.item.props?.direction ?? "horizontal",
|
|
787
|
+
block: o.item.props?.block === !0,
|
|
788
|
+
disabled: q.value,
|
|
789
|
+
"hide-label": o.item.hideLabel === !0,
|
|
790
|
+
onChange: be
|
|
791
|
+
}, null, 8, [
|
|
792
|
+
"id",
|
|
793
|
+
"label",
|
|
794
|
+
"options",
|
|
795
|
+
"model-value",
|
|
796
|
+
"direction",
|
|
797
|
+
"block",
|
|
798
|
+
"disabled",
|
|
799
|
+
"hide-label"
|
|
800
|
+
])) : o.item.type === "toggle" ? (v(), n(We, {
|
|
801
|
+
key: 3,
|
|
802
|
+
id: o.item.id,
|
|
803
|
+
label: o.item.label ?? o.item.id,
|
|
804
|
+
"model-value": pe.value,
|
|
805
|
+
"active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
806
|
+
"inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
|
|
807
|
+
"active-label": J.value,
|
|
808
|
+
"inactive-label": me.value,
|
|
809
|
+
disabled: q.value,
|
|
810
|
+
"hide-label": o.item.hideLabel === !0,
|
|
811
|
+
onChange: xe
|
|
812
|
+
}, null, 8, [
|
|
813
|
+
"id",
|
|
814
|
+
"label",
|
|
815
|
+
"model-value",
|
|
816
|
+
"active-icon",
|
|
817
|
+
"inactive-icon",
|
|
818
|
+
"active-label",
|
|
819
|
+
"inactive-label",
|
|
820
|
+
"disabled",
|
|
821
|
+
"hide-label"
|
|
822
|
+
])) : o.item.type === "gallery" ? (v(), n(Pe, {
|
|
823
|
+
key: 4,
|
|
824
|
+
id: o.item.id,
|
|
825
|
+
label: o.item.label ?? "",
|
|
826
|
+
categories: o.item.props?.categories ?? [],
|
|
827
|
+
"preview-fallback": d.galleryPreviewFallback,
|
|
828
|
+
disabled: q.value,
|
|
829
|
+
onSelect: X
|
|
830
|
+
}, null, 8, [
|
|
831
|
+
"id",
|
|
832
|
+
"label",
|
|
833
|
+
"categories",
|
|
834
|
+
"preview-fallback",
|
|
835
|
+
"disabled"
|
|
836
|
+
])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(Ke, {
|
|
837
|
+
key: 5,
|
|
838
|
+
id: o.item.id,
|
|
811
839
|
item: o.item,
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
840
|
+
disabled: q.value
|
|
841
|
+
}, {
|
|
842
|
+
default: O(() => [Y.value ? (v(), n(C(Y.value), f({ key: 0 }, he.value, {
|
|
843
|
+
item: o.item,
|
|
844
|
+
"group-id": o.groupId,
|
|
845
|
+
disabled: q.value,
|
|
846
|
+
"emit-item-click": Ce
|
|
847
|
+
}), null, 16, [
|
|
848
|
+
"item",
|
|
849
|
+
"group-id",
|
|
850
|
+
"disabled"
|
|
851
|
+
])) : S(t.$slots, "template", {
|
|
852
|
+
key: 1,
|
|
853
|
+
item: o.item,
|
|
854
|
+
disabled: q.value
|
|
855
|
+
})]),
|
|
856
|
+
_: 3
|
|
857
|
+
}, 8, [
|
|
858
|
+
"id",
|
|
816
859
|
"item",
|
|
817
|
-
"group-id",
|
|
818
860
|
"disabled"
|
|
819
|
-
])) :
|
|
820
|
-
key:
|
|
821
|
-
|
|
822
|
-
disabled:
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
trigger: "click",
|
|
832
|
-
disabled: G.value,
|
|
833
|
-
"popper-class": ee.value,
|
|
834
|
-
onVisibleChange: fe,
|
|
835
|
-
onCommand: pe
|
|
836
|
-
}, {
|
|
837
|
-
dropdown: D(() => [c(T(ne), null, {
|
|
838
|
-
default: D(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(T(F), {
|
|
839
|
-
key: String(e.value),
|
|
840
|
-
command: e.value
|
|
841
|
-
}, {
|
|
842
|
-
default: D(() => [a("span", Ze, [be(e) ? (v(), n(T(I), {
|
|
843
|
-
key: 0,
|
|
844
|
-
class: "ml-ribbon-dropdown-item__icon"
|
|
861
|
+
])) : o.item.type === "dropdown" ? (v(), n(E(M), {
|
|
862
|
+
key: 6,
|
|
863
|
+
trigger: "click",
|
|
864
|
+
disabled: q.value,
|
|
865
|
+
"popper-class": ee.value,
|
|
866
|
+
onVisibleChange: ge,
|
|
867
|
+
onCommand: _e
|
|
868
|
+
}, {
|
|
869
|
+
dropdown: O(() => [c(E(P), null, {
|
|
870
|
+
default: O(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(E(N), {
|
|
871
|
+
key: String(e.value),
|
|
872
|
+
command: e.value
|
|
845
873
|
}, {
|
|
846
|
-
default:
|
|
874
|
+
default: O(() => [a("span", Ze, [we(e) ? (v(), n(E(F), {
|
|
875
|
+
key: 0,
|
|
876
|
+
class: "ml-ribbon-dropdown-item__icon"
|
|
877
|
+
}, {
|
|
878
|
+
default: O(() => [(v(), n(C(we(e))))]),
|
|
879
|
+
_: 2
|
|
880
|
+
}, 1024)) : Te(e) ? (v(), i("i", {
|
|
881
|
+
key: 1,
|
|
882
|
+
class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", Te(e)]),
|
|
883
|
+
"aria-hidden": "true"
|
|
884
|
+
}, null, 2)) : r("", !0), a("span", Qe, w(e.label), 1)])]),
|
|
847
885
|
_: 2
|
|
848
|
-
},
|
|
886
|
+
}, 1032, ["command"]))), 128))]),
|
|
887
|
+
_: 1
|
|
888
|
+
})]),
|
|
889
|
+
default: O(() => [c(E(A), {
|
|
890
|
+
type: "default",
|
|
891
|
+
disabled: q.value,
|
|
892
|
+
"aria-label": V.value,
|
|
893
|
+
onClick: Z
|
|
894
|
+
}, {
|
|
895
|
+
default: O(() => [a("span", $, [G.value ? (v(), i("span", {
|
|
896
|
+
key: 0,
|
|
897
|
+
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary",
|
|
898
|
+
onClick: k(ve, ["stop"])
|
|
899
|
+
}, [c(E(F), null, {
|
|
900
|
+
default: O(() => [(v(), n(C(G.value)))]),
|
|
901
|
+
_: 1
|
|
902
|
+
})])) : K.value ? (v(), i("span", {
|
|
849
903
|
key: 1,
|
|
850
|
-
class:
|
|
904
|
+
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class ml-ribbon-item-host__icon--dropdown-primary",
|
|
905
|
+
onClick: k(ve, ["stop"])
|
|
906
|
+
}, [a("i", {
|
|
907
|
+
class: m(K.value),
|
|
851
908
|
"aria-hidden": "true"
|
|
852
|
-
}, null, 2)) : r("", !0), a("span",
|
|
853
|
-
|
|
854
|
-
|
|
909
|
+
}, null, 2)])) : r("", !0), a("span", Ye, [ie.value ? (v(), i("span", Xe, w(W.value), 1)) : r("", !0), c(E(F), { class: m(["ml-ribbon-item-host__dropdown-arrow", { "is-open": H.value }]) }, {
|
|
910
|
+
default: O(() => [(v(), n(C(H.value ? E(se) : E(B))))]),
|
|
911
|
+
_: 1
|
|
912
|
+
}, 8, ["class"])])])]),
|
|
913
|
+
_: 1
|
|
914
|
+
}, 8, ["disabled", "aria-label"])]),
|
|
855
915
|
_: 1
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
916
|
+
}, 8, ["disabled", "popper-class"])) : o.item.type === "checkbox" ? (v(), n(E(te), {
|
|
917
|
+
key: 7,
|
|
918
|
+
disabled: q.value,
|
|
919
|
+
onChange: X
|
|
920
|
+
}, {
|
|
921
|
+
default: O(() => [s(w(o.item.label), 1)]),
|
|
922
|
+
_: 1
|
|
923
|
+
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(ne), {
|
|
924
|
+
key: 8,
|
|
925
|
+
disabled: q.value,
|
|
926
|
+
onChange: X
|
|
927
|
+
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(R), {
|
|
928
|
+
key: 9,
|
|
929
|
+
disabled: q.value,
|
|
930
|
+
"popper-class": re.value,
|
|
931
|
+
style: { width: "92px" },
|
|
932
|
+
onChange: X
|
|
862
933
|
}, {
|
|
863
|
-
default:
|
|
934
|
+
default: O(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(E(I), {
|
|
935
|
+
key: String(e.value),
|
|
936
|
+
label: String(e.label),
|
|
937
|
+
value: e.value
|
|
938
|
+
}, null, 8, ["label", "value"]))), 128))]),
|
|
939
|
+
_: 1
|
|
940
|
+
}, 8, ["disabled", "popper-class"])) : (v(), n(E(A), {
|
|
941
|
+
key: 10,
|
|
942
|
+
disabled: q.value,
|
|
943
|
+
"aria-label": V.value,
|
|
944
|
+
onClick: X
|
|
945
|
+
}, {
|
|
946
|
+
default: O(() => [j.value ? (v(), n(E(F), {
|
|
864
947
|
key: 0,
|
|
865
|
-
class: "ml-ribbon-item-host__icon
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
default: D(() => [(v(), n(C(ce.value)))]),
|
|
948
|
+
class: "ml-ribbon-item-host__icon"
|
|
949
|
+
}, {
|
|
950
|
+
default: O(() => [(v(), n(C(j.value)))]),
|
|
869
951
|
_: 1
|
|
870
|
-
})
|
|
952
|
+
})) : L.value ? (v(), i("i", {
|
|
871
953
|
key: 1,
|
|
872
|
-
class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class
|
|
873
|
-
onClick: O(he, ["stop"])
|
|
874
|
-
}, [a("i", {
|
|
875
|
-
class: m(le.value),
|
|
954
|
+
class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", L.value]),
|
|
876
955
|
"aria-hidden": "true"
|
|
877
|
-
}, null, 2)
|
|
878
|
-
default: D(() => [(v(), n(C(V.value ? T(oe) : T(H))))]),
|
|
879
|
-
_: 1
|
|
880
|
-
}, 8, ["class"])])])]),
|
|
881
|
-
_: 1
|
|
882
|
-
}, 8, ["disabled", "aria-label"])]),
|
|
883
|
-
_: 1
|
|
884
|
-
}, 8, ["disabled", "popper-class"])) : o.item.type === "checkbox" ? (v(), n(T(j), {
|
|
885
|
-
key: 7,
|
|
886
|
-
disabled: G.value,
|
|
887
|
-
onChange: X
|
|
888
|
-
}, {
|
|
889
|
-
default: D(() => [s(w(o.item.label), 1)]),
|
|
890
|
-
_: 1
|
|
891
|
-
}, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(T(M), {
|
|
892
|
-
key: 8,
|
|
893
|
-
disabled: G.value,
|
|
894
|
-
onChange: X
|
|
895
|
-
}, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(T(z), {
|
|
896
|
-
key: 9,
|
|
897
|
-
disabled: G.value,
|
|
898
|
-
"popper-class": E.value,
|
|
899
|
-
style: { width: "92px" },
|
|
900
|
-
onChange: X
|
|
901
|
-
}, {
|
|
902
|
-
default: D(() => [(v(!0), i(e, null, x(g.value, (e) => (v(), n(T(L), {
|
|
903
|
-
key: String(e.value),
|
|
904
|
-
label: String(e.label),
|
|
905
|
-
value: e.value
|
|
906
|
-
}, null, 8, ["label", "value"]))), 128))]),
|
|
907
|
-
_: 1
|
|
908
|
-
}, 8, ["disabled", "popper-class"])) : (v(), n(T(k), {
|
|
909
|
-
key: 10,
|
|
910
|
-
disabled: G.value,
|
|
911
|
-
"aria-label": re.value,
|
|
912
|
-
onClick: X
|
|
913
|
-
}, {
|
|
914
|
-
default: D(() => [A.value ? (v(), n(T(I), {
|
|
915
|
-
key: 0,
|
|
916
|
-
class: "ml-ribbon-item-host__icon"
|
|
917
|
-
}, {
|
|
918
|
-
default: D(() => [(v(), n(C(A.value)))]),
|
|
956
|
+
}, null, 2)) : r("", !0), ie.value ? (v(), i("span", $e, w(o.item.label ?? o.item.id), 1)) : r("", !0)]),
|
|
919
957
|
_: 1
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
958
|
+
}, 8, ["disabled", "aria-label"]))], 10, qe)]),
|
|
959
|
+
_: 3
|
|
960
|
+
}, 8, [
|
|
961
|
+
"content",
|
|
962
|
+
"disabled",
|
|
963
|
+
"show-after",
|
|
964
|
+
"hide-after"
|
|
965
|
+
]));
|
|
927
966
|
}
|
|
928
967
|
}), tt = /* @__PURE__ */ l({
|
|
929
968
|
__name: "RibbonGroupContent",
|
|
@@ -940,7 +979,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
940
979
|
layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
|
|
941
980
|
rows: t.rows
|
|
942
981
|
}, {
|
|
943
|
-
default:
|
|
982
|
+
default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(et, {
|
|
944
983
|
id: e.id,
|
|
945
984
|
key: e.id,
|
|
946
985
|
item: e,
|
|
@@ -980,6 +1019,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
980
1019
|
groupIconCss: {},
|
|
981
1020
|
orientation: {},
|
|
982
1021
|
autoWidth: { type: Boolean },
|
|
1022
|
+
width: {},
|
|
983
1023
|
priority: {},
|
|
984
1024
|
launcher: { type: Boolean },
|
|
985
1025
|
showLauncherIcon: { type: Boolean },
|
|
@@ -989,15 +1029,24 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
989
1029
|
},
|
|
990
1030
|
emits: ["item-click"],
|
|
991
1031
|
setup(e, { emit: o }) {
|
|
992
|
-
let s = e, l = o, d = u(
|
|
1032
|
+
let s = e, l = o, d = u(de, null), f = t(() => s.width == null && s.autoWidth !== !1), y = t(() => {
|
|
1033
|
+
if (typeof s.width != "number" || Number.isNaN(s.width) || s.width <= 0) return;
|
|
1034
|
+
let e = `${s.width}px`;
|
|
1035
|
+
return {
|
|
1036
|
+
width: e,
|
|
1037
|
+
minWidth: e,
|
|
1038
|
+
maxWidth: e,
|
|
1039
|
+
flex: `0 0 ${e}`
|
|
1040
|
+
};
|
|
1041
|
+
}), x = t(() => d?.disabled.value === !0), T = b(null), k = b([]), ee = b(null), te = b(null), ne = b(0), re = b(0), j = oe("size", ""), M = t(() => j.value || "default"), N = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${M.value}`), P = t(() => ({ modifiers: [{
|
|
993
1042
|
name: "offset",
|
|
994
|
-
options: { offset: [
|
|
995
|
-
}] })),
|
|
1043
|
+
options: { offset: [ne.value, 8] }
|
|
1044
|
+
}] })), I = t(() => ({ modifiers: [{
|
|
996
1045
|
name: "offset",
|
|
997
|
-
options: { offset: [
|
|
998
|
-
}] })),
|
|
999
|
-
if (!s.groupModel || !
|
|
1000
|
-
let e = new Set(
|
|
1046
|
+
options: { offset: [re.value, 8] }
|
|
1047
|
+
}] })), ie = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), R = t(() => k.value.length > 0), ae = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), z = b(!1), V = b(!1), ce = t(() => {
|
|
1048
|
+
if (!s.groupModel || !k.value.length) return null;
|
|
1049
|
+
let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
|
|
1001
1050
|
...t,
|
|
1002
1051
|
items: t.items.filter((t) => e.has(t.id))
|
|
1003
1052
|
})).filter((e) => e.items.length > 0) ?? [];
|
|
@@ -1005,7 +1054,7 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1005
1054
|
...s.groupModel,
|
|
1006
1055
|
collections: t
|
|
1007
1056
|
} : null;
|
|
1008
|
-
}),
|
|
1057
|
+
}), le = t(() => s.groupModel?.footerMenuItems?.length ? {
|
|
1009
1058
|
id: `${s.groupModel.id}-footer-menu`,
|
|
1010
1059
|
title: "",
|
|
1011
1060
|
orientation: "row",
|
|
@@ -1015,15 +1064,15 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1015
1064
|
items: s.groupModel.footerMenuItems
|
|
1016
1065
|
}]
|
|
1017
1066
|
} : null);
|
|
1018
|
-
function
|
|
1019
|
-
let e =
|
|
1067
|
+
function H() {
|
|
1068
|
+
let e = T.value?.querySelector(".ml-ribbon-group__content");
|
|
1020
1069
|
if (!e) {
|
|
1021
|
-
|
|
1070
|
+
k.value.length > 0 && (k.value = []);
|
|
1022
1071
|
return;
|
|
1023
1072
|
}
|
|
1024
1073
|
let t = e.getBoundingClientRect();
|
|
1025
1074
|
if (t.width <= 0 || t.height <= 0) {
|
|
1026
|
-
|
|
1075
|
+
k.value.length > 0 && (k.value = []);
|
|
1027
1076
|
return;
|
|
1028
1077
|
}
|
|
1029
1078
|
let n = [];
|
|
@@ -1032,98 +1081,99 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1032
1081
|
if (!r) return;
|
|
1033
1082
|
let i = e.getBoundingClientRect();
|
|
1034
1083
|
(i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
|
|
1035
|
-
}),
|
|
1084
|
+
}), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
|
|
1036
1085
|
}
|
|
1037
|
-
function
|
|
1086
|
+
function U() {
|
|
1038
1087
|
p(() => {
|
|
1039
|
-
|
|
1088
|
+
Y(), W(), G(), H();
|
|
1040
1089
|
});
|
|
1041
1090
|
}
|
|
1042
|
-
function
|
|
1043
|
-
let e =
|
|
1091
|
+
function W() {
|
|
1092
|
+
let e = T.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
|
|
1044
1093
|
if (!e || !t) {
|
|
1045
|
-
|
|
1094
|
+
ne.value !== 0 && (ne.value = 0);
|
|
1046
1095
|
return;
|
|
1047
1096
|
}
|
|
1048
1097
|
let n = Math.round(e.left - t.left);
|
|
1049
|
-
|
|
1098
|
+
ne.value !== n && (ne.value = n);
|
|
1050
1099
|
}
|
|
1051
|
-
function
|
|
1052
|
-
let e =
|
|
1100
|
+
function G() {
|
|
1101
|
+
let e = T.value?.getBoundingClientRect(), t = te.value?.getBoundingClientRect();
|
|
1053
1102
|
if (!e || !t) {
|
|
1054
|
-
|
|
1103
|
+
re.value !== 0 && (re.value = 0);
|
|
1055
1104
|
return;
|
|
1056
1105
|
}
|
|
1057
1106
|
let n = Math.round(e.left - t.left);
|
|
1058
|
-
|
|
1107
|
+
re.value !== n && (re.value = n);
|
|
1059
1108
|
}
|
|
1060
|
-
function
|
|
1109
|
+
function K(e) {
|
|
1061
1110
|
z.value = e;
|
|
1062
1111
|
}
|
|
1063
|
-
function
|
|
1064
|
-
|
|
1112
|
+
function fe(e) {
|
|
1113
|
+
V.value = e;
|
|
1065
1114
|
}
|
|
1066
1115
|
function q() {
|
|
1067
|
-
|
|
1116
|
+
x.value || (z.value = !z.value);
|
|
1068
1117
|
}
|
|
1069
|
-
function
|
|
1070
|
-
|
|
1118
|
+
function pe() {
|
|
1119
|
+
x.value || (V.value = !V.value);
|
|
1071
1120
|
}
|
|
1072
|
-
let J = null,
|
|
1073
|
-
function
|
|
1121
|
+
let J = null, me = null;
|
|
1122
|
+
function Y() {
|
|
1074
1123
|
if (!J) return;
|
|
1075
|
-
let e =
|
|
1076
|
-
|
|
1124
|
+
let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
|
|
1125
|
+
me !== e && (me && J.unobserve(me), e && J.observe(e), me = e);
|
|
1077
1126
|
}
|
|
1078
|
-
return
|
|
1079
|
-
|
|
1080
|
-
}, { deep: !0 }),
|
|
1081
|
-
e && (z.value = !1,
|
|
1127
|
+
return D(() => s.groupModel, () => {
|
|
1128
|
+
U();
|
|
1129
|
+
}, { deep: !0 }), D(x, (e) => {
|
|
1130
|
+
e && (z.value = !1, V.value = !1);
|
|
1082
1131
|
}), g(() => {
|
|
1083
1132
|
typeof ResizeObserver < "u" && (J = new ResizeObserver(() => {
|
|
1084
|
-
|
|
1085
|
-
}),
|
|
1133
|
+
W(), G(), H();
|
|
1134
|
+
}), T.value && J.observe(T.value), Y()), U();
|
|
1086
1135
|
}), _(() => {
|
|
1087
1136
|
J?.disconnect();
|
|
1088
1137
|
}), (t, o) => (v(), i("section", {
|
|
1089
1138
|
ref_key: "groupSectionRef",
|
|
1090
|
-
ref:
|
|
1139
|
+
ref: T,
|
|
1091
1140
|
class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
|
|
1092
|
-
"data-priority": e.priority ?? 100
|
|
1141
|
+
"data-priority": e.priority ?? 100,
|
|
1142
|
+
style: h(y.value)
|
|
1093
1143
|
}, [a("div", rt, [S(t.$slots, "default")]), a("footer", it, [
|
|
1094
|
-
|
|
1144
|
+
ie.value ? (v(), n(E(F), {
|
|
1095
1145
|
key: 0,
|
|
1096
1146
|
class: "ml-ribbon-group__icon"
|
|
1097
1147
|
}, {
|
|
1098
|
-
default:
|
|
1148
|
+
default: O(() => [(v(), n(C(ie.value)))]),
|
|
1099
1149
|
_: 1
|
|
1100
1150
|
})) : r("", !0),
|
|
1101
1151
|
a("span", at, w(e.title), 1),
|
|
1102
|
-
|
|
1152
|
+
ae.value && le.value ? (v(), n(E(L), {
|
|
1103
1153
|
key: 1,
|
|
1104
1154
|
trigger: "click",
|
|
1105
1155
|
placement: "bottom-start",
|
|
1106
|
-
disabled:
|
|
1156
|
+
disabled: x.value,
|
|
1107
1157
|
"popper-class": N.value,
|
|
1108
|
-
"popper-options":
|
|
1109
|
-
onShow: o[1] ||= (e) =>
|
|
1110
|
-
onHide: o[2] ||= (e) =>
|
|
1158
|
+
"popper-options": I.value,
|
|
1159
|
+
onShow: o[1] ||= (e) => K(!0),
|
|
1160
|
+
onHide: o[2] ||= (e) => K(!1)
|
|
1111
1161
|
}, {
|
|
1112
|
-
reference:
|
|
1162
|
+
reference: O(() => [a("button", {
|
|
1113
1163
|
ref_key: "footerTriggerRef",
|
|
1114
|
-
ref:
|
|
1164
|
+
ref: te,
|
|
1115
1165
|
type: "button",
|
|
1116
1166
|
class: m(["ml-ribbon-group__footer-trigger", { "is-open": z.value }]),
|
|
1117
1167
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1118
1168
|
"aria-expanded": z.value,
|
|
1119
|
-
disabled:
|
|
1169
|
+
disabled: x.value,
|
|
1120
1170
|
onClick: q
|
|
1121
|
-
}, [c(
|
|
1122
|
-
default:
|
|
1171
|
+
}, [c(E(F), null, {
|
|
1172
|
+
default: O(() => [(v(), n(C(z.value ? E(se) : E(B))))]),
|
|
1123
1173
|
_: 1
|
|
1124
1174
|
})], 10, ot)]),
|
|
1125
|
-
default:
|
|
1126
|
-
group:
|
|
1175
|
+
default: O(() => [a("div", st, [c(tt, {
|
|
1176
|
+
group: le.value,
|
|
1127
1177
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1128
1178
|
onItemClick: o[0] ||= (e) => l("item-click", e)
|
|
1129
1179
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
@@ -1133,31 +1183,31 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1133
1183
|
"popper-class",
|
|
1134
1184
|
"popper-options"
|
|
1135
1185
|
])) : r("", !0),
|
|
1136
|
-
|
|
1186
|
+
R.value && ce.value ? (v(), n(E(L), {
|
|
1137
1187
|
key: 2,
|
|
1138
1188
|
trigger: "click",
|
|
1139
1189
|
placement: "bottom-start",
|
|
1140
|
-
disabled:
|
|
1190
|
+
disabled: x.value,
|
|
1141
1191
|
"popper-class": N.value,
|
|
1142
1192
|
"popper-options": P.value,
|
|
1143
|
-
onShow: o[4] ||= (e) =>
|
|
1144
|
-
onHide: o[5] ||= (e) =>
|
|
1193
|
+
onShow: o[4] ||= (e) => fe(!0),
|
|
1194
|
+
onHide: o[5] ||= (e) => fe(!1)
|
|
1145
1195
|
}, {
|
|
1146
|
-
reference:
|
|
1196
|
+
reference: O(() => [a("button", {
|
|
1147
1197
|
ref_key: "overflowTriggerRef",
|
|
1148
1198
|
ref: ee,
|
|
1149
1199
|
type: "button",
|
|
1150
|
-
class: m(["ml-ribbon-group__overflow-trigger", { "is-open":
|
|
1200
|
+
class: m(["ml-ribbon-group__overflow-trigger", { "is-open": V.value }]),
|
|
1151
1201
|
"aria-label": e.overflowTriggerAriaLabel,
|
|
1152
|
-
"aria-expanded":
|
|
1153
|
-
disabled:
|
|
1154
|
-
onClick:
|
|
1155
|
-
}, [c(
|
|
1156
|
-
default:
|
|
1202
|
+
"aria-expanded": V.value,
|
|
1203
|
+
disabled: x.value,
|
|
1204
|
+
onClick: pe
|
|
1205
|
+
}, [c(E(F), null, {
|
|
1206
|
+
default: O(() => [(v(), n(C(V.value ? E(se) : E(B))))]),
|
|
1157
1207
|
_: 1
|
|
1158
1208
|
})], 10, ct)]),
|
|
1159
|
-
default:
|
|
1160
|
-
group:
|
|
1209
|
+
default: O(() => [a("div", lt, [c(tt, {
|
|
1210
|
+
group: ce.value,
|
|
1161
1211
|
"gallery-preview-fallback": e.galleryPreviewFallback,
|
|
1162
1212
|
onItemClick: o[3] ||= (e) => l("item-click", e)
|
|
1163
1213
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
@@ -1167,27 +1217,30 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1167
1217
|
"popper-class",
|
|
1168
1218
|
"popper-options"
|
|
1169
1219
|
])) : r("", !0),
|
|
1170
|
-
e.showLauncherIcon ?? e.launcher ? (v(), n(
|
|
1220
|
+
e.showLauncherIcon ?? e.launcher ? (v(), n(E(A), {
|
|
1171
1221
|
key: 3,
|
|
1172
1222
|
link: "",
|
|
1173
1223
|
class: "ml-ribbon-group__launcher",
|
|
1174
|
-
disabled:
|
|
1224
|
+
disabled: x.value
|
|
1175
1225
|
}, {
|
|
1176
|
-
default:
|
|
1177
|
-
default:
|
|
1226
|
+
default: O(() => [c(E(F), null, {
|
|
1227
|
+
default: O(() => [c(E(ue))]),
|
|
1178
1228
|
_: 1
|
|
1179
1229
|
})]),
|
|
1180
1230
|
_: 1
|
|
1181
1231
|
}, 8, ["disabled"])) : r("", !0)
|
|
1182
|
-
])],
|
|
1232
|
+
])], 14, nt));
|
|
1183
1233
|
}
|
|
1184
|
-
}), dt = ["inert", "aria-disabled"], ft = { class: "ml-
|
|
1234
|
+
}), dt = ["inert", "aria-disabled"], ft = { class: "ml-ribbon__head-left" }, pt = { class: "ml-ribbon__head-right" }, mt = {
|
|
1185
1235
|
key: 2,
|
|
1186
1236
|
class: "ml-ribbon__tabs-extra"
|
|
1187
|
-
},
|
|
1237
|
+
}, ht = ["data-active-tab"], gt = {
|
|
1238
|
+
key: 0,
|
|
1239
|
+
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1240
|
+
}, _t = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, vt = ["aria-label", "disabled"], yt = { class: "ml-ribbon-overflow-list" }, bt = { class: "ml-ribbon-overflow-group__header" }, xt = ["data-active-tab"], St = ["disabled"], Ct = { class: "ml-ribbon-simplified-group__panel" }, wt = ["data-active-tab"], Tt = {
|
|
1188
1241
|
key: 0,
|
|
1189
1242
|
class: "ml-ribbon-group ml-ribbon-group--overflow"
|
|
1190
|
-
},
|
|
1243
|
+
}, Et = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, Dt = ["aria-label", "disabled"], Ot = { class: "ml-ribbon-overflow-list" }, kt = { class: "ml-ribbon-overflow-group__header" }, At = ["data-active-tab"], jt = ["disabled"], Mt = { class: "ml-ribbon-simplified-group__panel" }, Nt = 40, Pt = /* @__PURE__ */ l({
|
|
1191
1244
|
__name: "Ribbon",
|
|
1192
1245
|
props: {
|
|
1193
1246
|
id: { default: "ml-ribbon-root" },
|
|
@@ -1225,7 +1278,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1225
1278
|
default: !0
|
|
1226
1279
|
},
|
|
1227
1280
|
fileMenuItems: { default: () => [] },
|
|
1228
|
-
texts: { default: () => ({}) }
|
|
1281
|
+
texts: { default: () => ({}) },
|
|
1282
|
+
tooltipShowAfter: { default: 1e3 },
|
|
1283
|
+
tooltipHideAfter: { default: 0 }
|
|
1229
1284
|
},
|
|
1230
1285
|
emits: [
|
|
1231
1286
|
"update:activeTab",
|
|
@@ -1242,9 +1297,9 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1242
1297
|
],
|
|
1243
1298
|
setup(s, { expose: l, emit: u }) {
|
|
1244
1299
|
function f(e) {
|
|
1245
|
-
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(
|
|
1300
|
+
return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
|
|
1246
1301
|
}
|
|
1247
|
-
function
|
|
1302
|
+
function k(e) {
|
|
1248
1303
|
if (!e) return;
|
|
1249
1304
|
let t = { ...e };
|
|
1250
1305
|
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) => {
|
|
@@ -1256,30 +1311,33 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1256
1311
|
} : t;
|
|
1257
1312
|
})), t;
|
|
1258
1313
|
}
|
|
1259
|
-
function
|
|
1314
|
+
function ee(e) {
|
|
1260
1315
|
return {
|
|
1261
1316
|
...e,
|
|
1262
1317
|
icon: f(e.icon),
|
|
1263
|
-
props:
|
|
1318
|
+
props: k(e.props)
|
|
1264
1319
|
};
|
|
1265
1320
|
}
|
|
1266
|
-
function
|
|
1321
|
+
function te(e) {
|
|
1267
1322
|
return {
|
|
1268
1323
|
...e,
|
|
1269
1324
|
icon: f(e.icon),
|
|
1270
|
-
footerMenuItems: e.footerMenuItems?.map(
|
|
1325
|
+
footerMenuItems: e.footerMenuItems?.map(ee),
|
|
1271
1326
|
collections: e.collections?.map((e) => ({
|
|
1272
1327
|
...e,
|
|
1273
|
-
items: e.items?.map(
|
|
1328
|
+
items: e.items?.map(ee)
|
|
1274
1329
|
}))
|
|
1275
1330
|
};
|
|
1276
1331
|
}
|
|
1277
|
-
function
|
|
1332
|
+
function ne(e) {
|
|
1278
1333
|
return e.map((e) => ({
|
|
1279
1334
|
...e,
|
|
1280
|
-
groups: e.groups?.map(
|
|
1335
|
+
groups: e.groups?.map(te)
|
|
1281
1336
|
}));
|
|
1282
1337
|
}
|
|
1338
|
+
function j(e, t) {
|
|
1339
|
+
return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
|
|
1340
|
+
}
|
|
1283
1341
|
let M = {
|
|
1284
1342
|
layoutSwitcherTooltip: "Switch ribbon layout",
|
|
1285
1343
|
minimizeTooltip: "Minimize ribbon",
|
|
@@ -1295,33 +1353,44 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1295
1353
|
keyTipsEmptySequence: "No key sequence",
|
|
1296
1354
|
contextualTabDefaultTitle: "Contextual",
|
|
1297
1355
|
galleryPreviewFallback: "Preview unavailable"
|
|
1298
|
-
}, N = s, P = u, { context:
|
|
1299
|
-
y(
|
|
1300
|
-
|
|
1301
|
-
}, { deep: !0 }),
|
|
1302
|
-
e !==
|
|
1303
|
-
}),
|
|
1356
|
+
}, N = s, P = u, { context: I, visibleTabs: ie } = me(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 || "", j(N.tooltipShowAfter, 1e3), j(N.tooltipHideAfter, 0));
|
|
1357
|
+
y(de, I), D(() => N.tabs, (e) => {
|
|
1358
|
+
I.tabs.value = ne(e), I.tabs.value.some((e) => e.id === I.activeTab.value) || (I.activeTab.value = I.tabs.value[0]?.id || "");
|
|
1359
|
+
}, { deep: !0 }), D(() => N.layout, (e) => {
|
|
1360
|
+
e !== I.layout.value && (I.layout.value = e);
|
|
1361
|
+
}), D(() => N.activeLayout, (e) => {
|
|
1304
1362
|
if (!e) return;
|
|
1305
1363
|
let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
|
|
1306
|
-
t !==
|
|
1307
|
-
}),
|
|
1308
|
-
e !==
|
|
1309
|
-
}),
|
|
1310
|
-
e !==
|
|
1311
|
-
}),
|
|
1312
|
-
e && e !==
|
|
1313
|
-
}),
|
|
1364
|
+
t !== I.layout.value && (I.layout.value = t);
|
|
1365
|
+
}), D(() => N.minimized, (e) => {
|
|
1366
|
+
e !== I.minimized.value && (I.minimized.value = e);
|
|
1367
|
+
}), D(() => N.disabled, (e) => {
|
|
1368
|
+
e !== I.disabled.value && (I.disabled.value = e);
|
|
1369
|
+
}), D(() => N.activeTab, (e) => {
|
|
1370
|
+
e && e !== I.activeTab.value && (I.activeTab.value = e);
|
|
1371
|
+
}), D(() => N.tooltipShowAfter, (e) => {
|
|
1372
|
+
let t = j(e, 1e3);
|
|
1373
|
+
t !== I.tooltipShowAfter.value && (I.tooltipShowAfter.value = t);
|
|
1374
|
+
}), D(() => N.tooltipHideAfter, (e) => {
|
|
1375
|
+
let t = j(e, 0);
|
|
1376
|
+
t !== I.tooltipHideAfter.value && (I.tooltipHideAfter.value = t);
|
|
1377
|
+
}), D(I.activeTab, (e) => {
|
|
1314
1378
|
P("update:activeTab", e), P("tabChange", e);
|
|
1315
|
-
}),
|
|
1379
|
+
}), D(I.layout, (e) => {
|
|
1316
1380
|
P("update:layout", e), P("layoutChange", e);
|
|
1317
|
-
}),
|
|
1381
|
+
}), D(I.minimized, (e) => {
|
|
1318
1382
|
P("update:minimized", e);
|
|
1319
|
-
}),
|
|
1383
|
+
}), D(I.overflowOpen, (e) => {
|
|
1320
1384
|
P(e ? "overflowOpen" : "overflowClose");
|
|
1321
|
-
}),
|
|
1385
|
+
}), D(I.backdropOpen, (e) => {
|
|
1322
1386
|
P(e ? "backstageOpen" : "backstageClose");
|
|
1323
1387
|
});
|
|
1324
|
-
let
|
|
1388
|
+
let R = t(() => ie.value.find((e) => e.id === I.activeTab.value)), B = t(() => R.value?.groups?.filter((e) => e.visible !== !1) ?? []), se = b(null), ue = b(null), U = b(null), W = b(null), G = b(!1), K = b(0), fe = b({
|
|
1389
|
+
left: "0px",
|
|
1390
|
+
top: "0px",
|
|
1391
|
+
width: "1px",
|
|
1392
|
+
height: "0px"
|
|
1393
|
+
}), q = b(/* @__PURE__ */ new Set()), pe = b({}), J = oe("size", ""), Y = t(() => N.size || J.value || "default"), he = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${Y.value}`), X = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${Y.value}`), ge = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${Y.value}`), Z = t(() => ({
|
|
1325
1394
|
layoutSwitcherTooltip: N.texts.layoutSwitcherTooltip || M.layoutSwitcherTooltip,
|
|
1326
1395
|
minimizeTooltip: N.texts.minimizeTooltip || M.minimizeTooltip,
|
|
1327
1396
|
keyTipsToggleText: N.texts.keyTipsToggleText || M.keyTipsToggleText,
|
|
@@ -1336,17 +1405,17 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1336
1405
|
keyTipsEmptySequence: N.texts.keyTipsEmptySequence || M.keyTipsEmptySequence,
|
|
1337
1406
|
contextualTabDefaultTitle: N.texts.contextualTabDefaultTitle || M.contextualTabDefaultTitle,
|
|
1338
1407
|
galleryPreviewFallback: N.texts.galleryPreviewFallback || M.galleryPreviewFallback
|
|
1339
|
-
})),
|
|
1340
|
-
if (!
|
|
1341
|
-
let e =
|
|
1342
|
-
let n =
|
|
1408
|
+
})), ve = t(() => j(N.tooltipShowAfter, 1e3)), ye = t(() => j(N.tooltipHideAfter, 0)), be = t(() => I.minimized.value ? ce : V), xe = t(() => B.value.filter((e) => !q.value.has(e.id))), Se = t(() => B.value.filter((e) => q.value.has(e.id))), we = t(() => {
|
|
1409
|
+
if (!Se.value.length) return 220;
|
|
1410
|
+
let e = Se.value.reduce((e, t) => {
|
|
1411
|
+
let n = pe.value[t.id] ?? Oe(t);
|
|
1343
1412
|
return Math.max(e, n);
|
|
1344
1413
|
}, 0), t = Math.ceil(e + 40);
|
|
1345
1414
|
return Math.max(220, Math.min(720, t));
|
|
1346
1415
|
});
|
|
1347
|
-
function
|
|
1416
|
+
function Ee(e) {
|
|
1348
1417
|
let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
|
|
1349
|
-
...
|
|
1418
|
+
...ee(e),
|
|
1350
1419
|
size: "medium"
|
|
1351
1420
|
})));
|
|
1352
1421
|
return {
|
|
@@ -1359,13 +1428,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1359
1428
|
}]
|
|
1360
1429
|
};
|
|
1361
1430
|
}
|
|
1362
|
-
function
|
|
1431
|
+
function De(e) {
|
|
1363
1432
|
return e.priority ?? 100;
|
|
1364
1433
|
}
|
|
1365
|
-
function
|
|
1366
|
-
return e.autoWidth === !1 ? 190 : 140;
|
|
1434
|
+
function Oe(e) {
|
|
1435
|
+
return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width : e.autoWidth === !1 ? 190 : 140;
|
|
1367
1436
|
}
|
|
1368
|
-
function
|
|
1437
|
+
function ke(e) {
|
|
1369
1438
|
let t = {};
|
|
1370
1439
|
return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
|
|
1371
1440
|
let n = e.dataset.groupId;
|
|
@@ -1374,94 +1443,121 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1374
1443
|
r > 0 && (t[n] = r);
|
|
1375
1444
|
}), t;
|
|
1376
1445
|
}
|
|
1377
|
-
function
|
|
1446
|
+
function Ae() {
|
|
1447
|
+
let e = B.value.reduce((e, t) => {
|
|
1448
|
+
let n = pe.value[t.id] ?? Oe(t);
|
|
1449
|
+
return e + Math.max(n, Oe(t));
|
|
1450
|
+
}, 0);
|
|
1451
|
+
return Math.max(220, e);
|
|
1452
|
+
}
|
|
1453
|
+
function je(e) {
|
|
1378
1454
|
let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
|
|
1379
|
-
return Number.isFinite(t) && t > 0 ? t :
|
|
1455
|
+
return Number.isFinite(t) && t > 0 ? t : Nt;
|
|
1380
1456
|
}
|
|
1381
|
-
function
|
|
1382
|
-
if (
|
|
1383
|
-
|
|
1457
|
+
function Me() {
|
|
1458
|
+
if (I.layout.value !== "classic") {
|
|
1459
|
+
q.value = /* @__PURE__ */ new Set();
|
|
1384
1460
|
return;
|
|
1385
1461
|
}
|
|
1386
|
-
let e =
|
|
1462
|
+
let e = I.minimized.value ? W.value : U.value;
|
|
1387
1463
|
if (!e) return;
|
|
1388
|
-
let t =
|
|
1464
|
+
let t = B.value;
|
|
1389
1465
|
if (!t.length) {
|
|
1390
|
-
|
|
1466
|
+
q.value = /* @__PURE__ */ new Set();
|
|
1391
1467
|
return;
|
|
1392
1468
|
}
|
|
1393
|
-
let n = Math.round(e.getBoundingClientRect().width), r =
|
|
1394
|
-
|
|
1395
|
-
...
|
|
1469
|
+
let n = Math.round(e.getBoundingClientRect().width), r = je(e), i = ke(e);
|
|
1470
|
+
pe.value = {
|
|
1471
|
+
...pe.value,
|
|
1396
1472
|
...i
|
|
1397
1473
|
};
|
|
1398
1474
|
let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
|
|
1399
1475
|
group: e,
|
|
1400
1476
|
index: t
|
|
1401
1477
|
})), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
|
|
1402
|
-
let n =
|
|
1478
|
+
let n = De(t.group) - De(e.group);
|
|
1403
1479
|
return n === 0 ? t.index - e.index : n;
|
|
1404
|
-
}), l = (e) => i[e.id] ??
|
|
1480
|
+
}), l = (e) => i[e.id] ?? Oe(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;
|
|
1405
1481
|
for (; f(s) > n && p < c.length;) {
|
|
1406
1482
|
let e = c[p].group;
|
|
1407
1483
|
s.add(e.id), p += 1;
|
|
1408
1484
|
}
|
|
1409
|
-
|
|
1485
|
+
q.value = s;
|
|
1410
1486
|
}
|
|
1411
|
-
function
|
|
1487
|
+
function Ne() {
|
|
1412
1488
|
p(() => {
|
|
1413
|
-
if (
|
|
1414
|
-
|
|
1489
|
+
if (I.layout.value !== "classic" || I.minimized.value) {
|
|
1490
|
+
Me();
|
|
1415
1491
|
return;
|
|
1416
1492
|
}
|
|
1417
|
-
if (
|
|
1418
|
-
|
|
1493
|
+
if (q.value.size === 0) {
|
|
1494
|
+
Me();
|
|
1419
1495
|
return;
|
|
1420
1496
|
}
|
|
1421
|
-
|
|
1422
|
-
|
|
1497
|
+
q.value = /* @__PURE__ */ new Set(), p(() => {
|
|
1498
|
+
Me();
|
|
1423
1499
|
});
|
|
1424
1500
|
});
|
|
1425
1501
|
}
|
|
1426
|
-
function
|
|
1427
|
-
|
|
1502
|
+
function Pe() {
|
|
1503
|
+
let e = se.value, t = ue.value;
|
|
1504
|
+
if (!e || !t) return;
|
|
1505
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = Number.parseFloat(getComputedStyle(e).borderLeftWidth || "0") || 0, a = Math.max(n.width - i * 2, e.clientWidth, r.width, t.clientWidth);
|
|
1506
|
+
K.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? Ae() : Math.max(360, B.value.length * 120)), fe.value = {
|
|
1507
|
+
left: `${Math.round(n.left - r.left + i)}px`,
|
|
1508
|
+
top: "0px",
|
|
1509
|
+
width: "1px",
|
|
1510
|
+
height: `${Math.round(r.height)}px`
|
|
1511
|
+
};
|
|
1428
1512
|
}
|
|
1429
|
-
function
|
|
1430
|
-
|
|
1513
|
+
function Fe() {
|
|
1514
|
+
G.value = !1;
|
|
1431
1515
|
}
|
|
1432
|
-
function
|
|
1433
|
-
|
|
1516
|
+
function Ie(e) {
|
|
1517
|
+
if (I.disabled.value) return;
|
|
1518
|
+
let t = I.activeTab.value === e.id;
|
|
1519
|
+
if (I.activeTab.value = e.id, !I.minimized.value) {
|
|
1520
|
+
Fe();
|
|
1521
|
+
return;
|
|
1522
|
+
}
|
|
1523
|
+
Pe(), G.value = t ? !G.value : !0;
|
|
1434
1524
|
}
|
|
1435
|
-
function
|
|
1436
|
-
|
|
1525
|
+
function Le() {
|
|
1526
|
+
I.disabled.value || I.api.toggleSimplified();
|
|
1437
1527
|
}
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1528
|
+
function Re() {
|
|
1529
|
+
I.disabled.value || (I.minimized.value || Fe(), I.minimized.value = !I.minimized.value);
|
|
1440
1530
|
}
|
|
1441
|
-
function
|
|
1442
|
-
|
|
1531
|
+
function ze(e) {
|
|
1532
|
+
I.disabled.value || (Fe(), P("fileMenuSelect", e));
|
|
1443
1533
|
}
|
|
1444
|
-
function
|
|
1445
|
-
|
|
1446
|
-
|
|
1534
|
+
function Be() {
|
|
1535
|
+
I.disabled.value || (Fe(), I.backdropOpen.value = !0);
|
|
1536
|
+
}
|
|
1537
|
+
function Ve() {
|
|
1538
|
+
I.disabled.value || (I.backdropOpen.value = !1);
|
|
1539
|
+
}
|
|
1540
|
+
function Q(e, t) {
|
|
1541
|
+
I.disabled.value || (P("itemClick", {
|
|
1542
|
+
tabId: I.activeTab.value,
|
|
1447
1543
|
groupId: e,
|
|
1448
1544
|
itemId: t
|
|
1449
|
-
});
|
|
1545
|
+
}), I.minimized.value && Fe());
|
|
1450
1546
|
}
|
|
1451
|
-
function
|
|
1547
|
+
function He(e) {
|
|
1452
1548
|
if (!(e instanceof HTMLElement)) return !1;
|
|
1453
1549
|
if (e.isContentEditable) return !0;
|
|
1454
1550
|
let t = e.tagName;
|
|
1455
1551
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
|
|
1456
1552
|
}
|
|
1457
|
-
function
|
|
1458
|
-
if (
|
|
1459
|
-
|
|
1553
|
+
function Ue() {
|
|
1554
|
+
if (I.disabled.value) {
|
|
1555
|
+
I.keyTips.value = [];
|
|
1460
1556
|
return;
|
|
1461
1557
|
}
|
|
1462
|
-
let e =
|
|
1558
|
+
let e = R.value;
|
|
1463
1559
|
if (!e?.groups?.length) {
|
|
1464
|
-
|
|
1560
|
+
I.keyTips.value = [];
|
|
1465
1561
|
return;
|
|
1466
1562
|
}
|
|
1467
1563
|
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) => {
|
|
@@ -1474,192 +1570,358 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1474
1570
|
scope: "item"
|
|
1475
1571
|
} : null;
|
|
1476
1572
|
}).filter((e) => !!e)));
|
|
1477
|
-
|
|
1573
|
+
I.keyTips.value = t;
|
|
1478
1574
|
}
|
|
1479
|
-
function
|
|
1480
|
-
if (
|
|
1481
|
-
let t =
|
|
1575
|
+
function We(e) {
|
|
1576
|
+
if (I.disabled.value) return;
|
|
1577
|
+
let t = R.value;
|
|
1482
1578
|
if (t?.groups?.length) {
|
|
1483
1579
|
for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
|
|
1484
1580
|
let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
|
|
1485
1581
|
if (r) {
|
|
1486
|
-
|
|
1582
|
+
Q(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
|
|
1487
1583
|
return;
|
|
1488
1584
|
}
|
|
1489
1585
|
}
|
|
1490
1586
|
}
|
|
1491
1587
|
}
|
|
1492
|
-
function
|
|
1493
|
-
|
|
1588
|
+
function Ge() {
|
|
1589
|
+
I.keyTipsSequence.value = "";
|
|
1494
1590
|
}
|
|
1495
|
-
function
|
|
1496
|
-
if (!
|
|
1591
|
+
function Ke(e) {
|
|
1592
|
+
if (!I.disabled.value && !He(e.target)) {
|
|
1497
1593
|
if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
|
|
1498
|
-
e.preventDefault(),
|
|
1594
|
+
e.preventDefault(), I.keyTipsOpen.value = !I.keyTipsOpen.value, I.keyTipsOpen.value || Ge();
|
|
1499
1595
|
return;
|
|
1500
1596
|
}
|
|
1501
|
-
if (
|
|
1597
|
+
if (I.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
1502
1598
|
if (e.key === "Escape") {
|
|
1503
|
-
e.preventDefault(),
|
|
1599
|
+
e.preventDefault(), I.keyTipsOpen.value = !1, Ge();
|
|
1504
1600
|
return;
|
|
1505
1601
|
}
|
|
1506
1602
|
if (e.key === "Backspace") {
|
|
1507
|
-
e.preventDefault(),
|
|
1603
|
+
e.preventDefault(), I.keyTipsSequence.value = I.keyTipsSequence.value.slice(0, -1);
|
|
1508
1604
|
return;
|
|
1509
1605
|
}
|
|
1510
1606
|
if (/^[a-z0-9]$/i.test(e.key)) {
|
|
1511
1607
|
e.preventDefault();
|
|
1512
|
-
let t = `${
|
|
1513
|
-
|
|
1514
|
-
let n = t.toLowerCase(), r =
|
|
1608
|
+
let t = `${I.keyTipsSequence.value}${e.key.toUpperCase()}`;
|
|
1609
|
+
I.keyTipsSequence.value = t;
|
|
1610
|
+
let n = t.toLowerCase(), r = I.keyTips.value.find((e) => e.key.toLowerCase() === n);
|
|
1515
1611
|
if (r) {
|
|
1516
|
-
|
|
1612
|
+
We(r);
|
|
1517
1613
|
return;
|
|
1518
1614
|
}
|
|
1519
|
-
|
|
1615
|
+
I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Ge();
|
|
1520
1616
|
}
|
|
1521
1617
|
}
|
|
1522
1618
|
}
|
|
1523
1619
|
}
|
|
1524
|
-
function
|
|
1525
|
-
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ?
|
|
1620
|
+
function qe(e) {
|
|
1621
|
+
return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? le : null;
|
|
1526
1622
|
}
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1623
|
+
function Je(e) {
|
|
1624
|
+
G.value = e;
|
|
1625
|
+
}
|
|
1626
|
+
D([
|
|
1627
|
+
B,
|
|
1628
|
+
() => I.layout.value,
|
|
1629
|
+
() => I.minimized.value
|
|
1531
1630
|
], () => {
|
|
1532
|
-
|
|
1533
|
-
}),
|
|
1534
|
-
|
|
1535
|
-
() =>
|
|
1536
|
-
() =>
|
|
1631
|
+
Ne();
|
|
1632
|
+
}), D([
|
|
1633
|
+
R,
|
|
1634
|
+
() => I.tabs.value,
|
|
1635
|
+
() => I.disabled.value
|
|
1537
1636
|
], () => {
|
|
1538
|
-
|
|
1637
|
+
Ue(), Ge();
|
|
1539
1638
|
}, {
|
|
1540
1639
|
deep: !0,
|
|
1541
1640
|
immediate: !0
|
|
1542
|
-
}),
|
|
1543
|
-
e ||
|
|
1544
|
-
}),
|
|
1545
|
-
e && (
|
|
1546
|
-
}),
|
|
1547
|
-
|
|
1548
|
-
|
|
1641
|
+
}), D(() => I.keyTipsOpen.value, (e) => {
|
|
1642
|
+
e || Ge();
|
|
1643
|
+
}), D(() => I.disabled.value, (e) => {
|
|
1644
|
+
e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Fe(), Ge());
|
|
1645
|
+
}), D([
|
|
1646
|
+
() => I.minimized.value,
|
|
1647
|
+
() => I.layout.value,
|
|
1648
|
+
R
|
|
1649
|
+
], ([e, , t]) => {
|
|
1650
|
+
(!e || !t) && Fe();
|
|
1651
|
+
}), D([U, W], ([e, t], [n, r]) => {
|
|
1652
|
+
n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Ne();
|
|
1653
|
+
}, { flush: "post" }), D(G, (e) => {
|
|
1654
|
+
e && p(() => {
|
|
1655
|
+
Pe(), Ne();
|
|
1656
|
+
});
|
|
1657
|
+
});
|
|
1549
1658
|
let $ = null;
|
|
1550
|
-
|
|
1551
|
-
window.addEventListener("keydown",
|
|
1552
|
-
|
|
1553
|
-
}),
|
|
1659
|
+
g(() => {
|
|
1660
|
+
window.addEventListener("keydown", Ke), window.addEventListener("resize", Ye), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
1661
|
+
Pe(), Ne();
|
|
1662
|
+
}), U.value && $.observe(U.value), W.value && $.observe(W.value)), Pe(), Ne();
|
|
1554
1663
|
}), _(() => {
|
|
1555
|
-
window.removeEventListener("keydown",
|
|
1556
|
-
})
|
|
1557
|
-
|
|
1558
|
-
|
|
1664
|
+
window.removeEventListener("keydown", Ke), window.removeEventListener("resize", Ye), $?.disconnect();
|
|
1665
|
+
});
|
|
1666
|
+
function Ye() {
|
|
1667
|
+
G.value && Pe();
|
|
1668
|
+
}
|
|
1669
|
+
return l(I.api), (t, l) => (v(), n(E(re), { size: N.size }, {
|
|
1670
|
+
default: O(() => [(v(), i("section", {
|
|
1671
|
+
ref_key: "ribbonRootRef",
|
|
1672
|
+
ref: se,
|
|
1673
|
+
key: E(I).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
|
|
1559
1674
|
class: m(["ml-ribbon", [
|
|
1560
|
-
`ml-ribbon--${
|
|
1561
|
-
`ml-ribbon--size-${
|
|
1675
|
+
`ml-ribbon--${E(I).layout.value}`,
|
|
1676
|
+
`ml-ribbon--size-${Y.value}`,
|
|
1562
1677
|
{
|
|
1563
|
-
"ml-ribbon--disabled":
|
|
1564
|
-
"ml-ribbon--minimized":
|
|
1565
|
-
"ml-ribbon--keytips-open":
|
|
1678
|
+
"ml-ribbon--disabled": E(I).disabled.value,
|
|
1679
|
+
"ml-ribbon--minimized": E(I).minimized.value,
|
|
1680
|
+
"ml-ribbon--keytips-open": E(I).keyTipsOpen.value
|
|
1566
1681
|
}
|
|
1567
1682
|
]]),
|
|
1568
|
-
inert:
|
|
1569
|
-
"aria-disabled":
|
|
1683
|
+
inert: E(I).disabled.value,
|
|
1684
|
+
"aria-disabled": E(I).disabled.value
|
|
1570
1685
|
}, [
|
|
1571
|
-
a("header",
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
"
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1686
|
+
a("header", {
|
|
1687
|
+
ref_key: "ribbonHeaderRef",
|
|
1688
|
+
ref: ue,
|
|
1689
|
+
class: "ml-ribbon__header"
|
|
1690
|
+
}, [
|
|
1691
|
+
a("div", ft, [
|
|
1692
|
+
s.showFileMenu ? (v(), n(Te, {
|
|
1693
|
+
key: 0,
|
|
1694
|
+
items: s.fileMenuItems,
|
|
1695
|
+
disabled: E(I).disabled.value,
|
|
1696
|
+
label: Z.value.fileMenuLabel,
|
|
1697
|
+
"open-backstage-label": Z.value.fileMenuOpenBackstageLabel,
|
|
1698
|
+
"show-open-backstage": s.showOpenBackstage,
|
|
1699
|
+
onSelect: ze,
|
|
1700
|
+
onOpenBackstage: Be
|
|
1701
|
+
}, null, 8, [
|
|
1702
|
+
"items",
|
|
1703
|
+
"disabled",
|
|
1704
|
+
"label",
|
|
1705
|
+
"open-backstage-label",
|
|
1706
|
+
"show-open-backstage"
|
|
1707
|
+
])) : r("", !0),
|
|
1708
|
+
c(Ce, {
|
|
1709
|
+
tabs: E(ie),
|
|
1710
|
+
"active-tab": E(I).activeTab.value,
|
|
1711
|
+
disabled: E(I).disabled.value,
|
|
1712
|
+
"default-contextual-title": Z.value.contextualTabDefaultTitle,
|
|
1713
|
+
onSelect: Ie
|
|
1714
|
+
}, null, 8, [
|
|
1715
|
+
"tabs",
|
|
1716
|
+
"active-tab",
|
|
1717
|
+
"disabled",
|
|
1718
|
+
"default-contextual-title"
|
|
1719
|
+
]),
|
|
1720
|
+
N.hideMinimizeButton ? r("", !0) : (v(), n(E(z), {
|
|
1721
|
+
key: 1,
|
|
1722
|
+
content: Z.value.minimizeTooltip,
|
|
1723
|
+
"show-after": ve.value,
|
|
1724
|
+
"hide-after": ye.value
|
|
1725
|
+
}, {
|
|
1726
|
+
default: O(() => [c(E(A), {
|
|
1727
|
+
class: m([
|
|
1728
|
+
"ml-ribbon__control",
|
|
1729
|
+
"ml-ribbon__control--minimize",
|
|
1730
|
+
E(I).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
|
|
1731
|
+
]),
|
|
1732
|
+
icon: be.value,
|
|
1733
|
+
disabled: E(I).disabled.value,
|
|
1734
|
+
onClick: Re
|
|
1735
|
+
}, null, 8, [
|
|
1736
|
+
"class",
|
|
1737
|
+
"icon",
|
|
1738
|
+
"disabled"
|
|
1739
|
+
])]),
|
|
1740
|
+
_: 1
|
|
1741
|
+
}, 8, [
|
|
1742
|
+
"content",
|
|
1743
|
+
"show-after",
|
|
1744
|
+
"hide-after"
|
|
1745
|
+
]))
|
|
1599
1746
|
]),
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1747
|
+
a("div", pt, [
|
|
1748
|
+
N.hideLayoutSwitcher ? r("", !0) : (v(), n(E(z), {
|
|
1749
|
+
key: 0,
|
|
1750
|
+
content: Z.value.layoutSwitcherTooltip,
|
|
1751
|
+
"show-after": ve.value,
|
|
1752
|
+
"hide-after": ye.value
|
|
1753
|
+
}, {
|
|
1754
|
+
default: O(() => [c(E(A), {
|
|
1755
|
+
circle: "",
|
|
1756
|
+
class: "ml-ribbon__control ml-ribbon__control--layout",
|
|
1757
|
+
icon: E(H),
|
|
1758
|
+
disabled: E(I).disabled.value,
|
|
1759
|
+
onClick: Le
|
|
1760
|
+
}, null, 8, ["icon", "disabled"])]),
|
|
1761
|
+
_: 1
|
|
1762
|
+
}, 8, [
|
|
1763
|
+
"content",
|
|
1764
|
+
"show-after",
|
|
1765
|
+
"hide-after"
|
|
1766
|
+
])),
|
|
1767
|
+
N.hideKeyTipsToggle ? r("", !0) : (v(), n(E(ae), {
|
|
1768
|
+
key: 1,
|
|
1769
|
+
"inline-prompt": "",
|
|
1770
|
+
class: "ml-ribbon__control ml-ribbon__control--keytips",
|
|
1771
|
+
"active-text": Z.value.keyTipsToggleText,
|
|
1772
|
+
"inactive-text": Z.value.keyTipsToggleText,
|
|
1773
|
+
"model-value": E(I).keyTipsOpen.value,
|
|
1774
|
+
disabled: E(I).disabled.value,
|
|
1775
|
+
onChange: l[0] ||= (e) => E(I).keyTipsOpen.value = !E(I).keyTipsOpen.value
|
|
1613
1776
|
}, null, 8, [
|
|
1614
|
-
"
|
|
1615
|
-
"
|
|
1777
|
+
"active-text",
|
|
1778
|
+
"inactive-text",
|
|
1779
|
+
"model-value",
|
|
1616
1780
|
"disabled"
|
|
1617
|
-
])
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1781
|
+
])),
|
|
1782
|
+
t.$slots["tabs-extra"] ? (v(), i("div", mt, [S(t.$slots, "tabs-extra", {
|
|
1783
|
+
activeTab: E(I).activeTab.value,
|
|
1784
|
+
layout: E(I).layout.value,
|
|
1785
|
+
minimized: E(I).minimized.value,
|
|
1786
|
+
disabled: E(I).disabled.value
|
|
1787
|
+
})])) : r("", !0)
|
|
1788
|
+
]),
|
|
1789
|
+
R.value ? (v(), n(E(L), {
|
|
1622
1790
|
key: 0,
|
|
1623
|
-
|
|
1791
|
+
placement: "bottom-start",
|
|
1792
|
+
visible: G.value,
|
|
1793
|
+
width: K.value || void 0,
|
|
1794
|
+
disabled: E(I).disabled.value || !E(I).minimized.value,
|
|
1795
|
+
"show-arrow": !1,
|
|
1796
|
+
offset: 0,
|
|
1797
|
+
"popper-class": ge.value,
|
|
1798
|
+
"onUpdate:visible": Je
|
|
1624
1799
|
}, {
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
class: "ml-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1800
|
+
reference: O(() => [a("span", {
|
|
1801
|
+
"aria-hidden": "true",
|
|
1802
|
+
class: "ml-ribbon__minimized-anchor",
|
|
1803
|
+
style: h(fe.value)
|
|
1804
|
+
}, null, 4)]),
|
|
1805
|
+
default: O(() => [E(I).layout.value === "classic" ? (v(), i("main", {
|
|
1806
|
+
key: 0,
|
|
1807
|
+
ref_key: "minimizedClassicPanelRef",
|
|
1808
|
+
ref: W,
|
|
1809
|
+
class: "ml-ribbon__panel ml-ribbon__panel--floating",
|
|
1810
|
+
"data-active-tab": R.value.id
|
|
1811
|
+
}, [(v(!0), i(e, null, x(xe.value, (e) => (v(), n(ut, {
|
|
1812
|
+
id: e.id,
|
|
1813
|
+
key: e.id,
|
|
1814
|
+
"data-group-id": e.id,
|
|
1815
|
+
title: e.title,
|
|
1816
|
+
icon: e.icon,
|
|
1817
|
+
"group-icon-css": e.groupIconCss,
|
|
1818
|
+
orientation: e.orientation,
|
|
1819
|
+
"auto-width": e.autoWidth,
|
|
1820
|
+
width: e.width,
|
|
1821
|
+
priority: e.priority ?? 100,
|
|
1822
|
+
launcher: e.launcher,
|
|
1823
|
+
"show-launcher-icon": e.showLauncherIcon,
|
|
1824
|
+
"group-model": e,
|
|
1825
|
+
"overflow-trigger-aria-label": Z.value.groupOverflowTriggerAriaLabel,
|
|
1826
|
+
"gallery-preview-fallback": Z.value.galleryPreviewFallback,
|
|
1827
|
+
onItemClick: l[2] ||= (e) => Q(e.groupId, e.itemId)
|
|
1828
|
+
}, {
|
|
1829
|
+
default: O(() => [c(tt, {
|
|
1830
|
+
group: e,
|
|
1831
|
+
"gallery-preview-fallback": Z.value.galleryPreviewFallback,
|
|
1832
|
+
onItemClick: l[1] ||= (e) => Q(e.groupId, e.itemId)
|
|
1833
|
+
}, null, 8, ["group", "gallery-preview-fallback"])]),
|
|
1834
|
+
_: 2
|
|
1835
|
+
}, 1032, [
|
|
1836
|
+
"id",
|
|
1837
|
+
"data-group-id",
|
|
1838
|
+
"title",
|
|
1839
|
+
"icon",
|
|
1840
|
+
"group-icon-css",
|
|
1841
|
+
"orientation",
|
|
1842
|
+
"auto-width",
|
|
1843
|
+
"width",
|
|
1844
|
+
"priority",
|
|
1845
|
+
"launcher",
|
|
1846
|
+
"show-launcher-icon",
|
|
1847
|
+
"group-model",
|
|
1848
|
+
"overflow-trigger-aria-label",
|
|
1849
|
+
"gallery-preview-fallback"
|
|
1850
|
+
]))), 128)), Se.value.length ? (v(), i("section", gt, [a("div", _t, [c(E(L), {
|
|
1851
|
+
trigger: "click",
|
|
1852
|
+
placement: "bottom-end",
|
|
1853
|
+
width: we.value,
|
|
1854
|
+
disabled: E(I).disabled.value,
|
|
1855
|
+
"show-arrow": !1,
|
|
1856
|
+
"popper-class": X.value,
|
|
1857
|
+
onShow: l[4] ||= (e) => E(I).overflowOpen.value = !0,
|
|
1858
|
+
onHide: l[5] ||= (e) => E(I).overflowOpen.value = !1
|
|
1859
|
+
}, {
|
|
1860
|
+
reference: O(() => [a("button", {
|
|
1861
|
+
type: "button",
|
|
1862
|
+
class: "ml-ribbon-overflow-trigger",
|
|
1863
|
+
"aria-label": Z.value.overflowTriggerAriaLabel,
|
|
1864
|
+
disabled: E(I).disabled.value
|
|
1865
|
+
}, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, vt)]),
|
|
1866
|
+
default: O(() => [a("div", yt, [(v(!0), i(e, null, x(Se.value, (e) => (v(), i("section", {
|
|
1867
|
+
key: e.id,
|
|
1868
|
+
class: "ml-ribbon-overflow-group"
|
|
1869
|
+
}, [a("header", bt, w(e.title), 1), c(tt, {
|
|
1870
|
+
group: e,
|
|
1871
|
+
"gallery-preview-fallback": Z.value.galleryPreviewFallback,
|
|
1872
|
+
onItemClick: l[3] ||= (e) => Q(e.groupId, e.itemId)
|
|
1873
|
+
}, null, 8, ["group", "gallery-preview-fallback"])]))), 128))])]),
|
|
1874
|
+
_: 1
|
|
1875
|
+
}, 8, [
|
|
1876
|
+
"width",
|
|
1877
|
+
"disabled",
|
|
1878
|
+
"popper-class"
|
|
1879
|
+
])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, ht)) : (v(), i("main", {
|
|
1880
|
+
key: 1,
|
|
1881
|
+
class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
|
|
1882
|
+
"data-active-tab": R.value.id
|
|
1883
|
+
}, [(v(!0), i(e, null, x(B.value, (e) => (v(), n(E(L), {
|
|
1884
|
+
key: e.id,
|
|
1885
|
+
trigger: "click",
|
|
1886
|
+
placement: "bottom-start",
|
|
1887
|
+
width: 340,
|
|
1888
|
+
disabled: E(I).disabled.value,
|
|
1889
|
+
"show-arrow": !1,
|
|
1890
|
+
"popper-class": he.value
|
|
1891
|
+
}, {
|
|
1892
|
+
reference: O(() => [a("button", {
|
|
1893
|
+
class: "ml-ribbon-simplified-group",
|
|
1894
|
+
type: "button",
|
|
1895
|
+
disabled: E(I).disabled.value
|
|
1896
|
+
}, [qe(e) ? (v(), n(E(F), {
|
|
1897
|
+
key: 0,
|
|
1898
|
+
class: "ml-ribbon-simplified-group__icon"
|
|
1899
|
+
}, {
|
|
1900
|
+
default: O(() => [(v(), n(C(qe(e))))]),
|
|
1901
|
+
_: 2
|
|
1902
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, St)]),
|
|
1903
|
+
default: O(() => [a("div", Ct, [c(tt, {
|
|
1904
|
+
group: Ee(e),
|
|
1905
|
+
"gallery-preview-fallback": Z.value.galleryPreviewFallback,
|
|
1906
|
+
onItemClick: l[6] ||= (e) => Q(e.groupId, e.itemId)
|
|
1907
|
+
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
1908
|
+
_: 2
|
|
1909
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, xt))]),
|
|
1632
1910
|
_: 1
|
|
1633
|
-
}, 8, [
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
"
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
disabled: T(F).disabled.value,
|
|
1642
|
-
onChange: l[0] ||= (e) => T(F).keyTipsOpen.value = !T(F).keyTipsOpen.value
|
|
1643
|
-
}, null, 8, [
|
|
1644
|
-
"active-text",
|
|
1645
|
-
"inactive-text",
|
|
1646
|
-
"model-value",
|
|
1647
|
-
"disabled"
|
|
1648
|
-
])),
|
|
1649
|
-
t.$slots["tabs-extra"] ? (v(), i("div", ht, [S(t.$slots, "tabs-extra", {
|
|
1650
|
-
activeTab: T(F).activeTab.value,
|
|
1651
|
-
layout: T(F).layout.value,
|
|
1652
|
-
minimized: T(F).minimized.value,
|
|
1653
|
-
disabled: T(F).disabled.value
|
|
1654
|
-
})])) : r("", !0)
|
|
1655
|
-
])]),
|
|
1656
|
-
!T(F).minimized.value && L.value && T(F).layout.value === "classic" ? (v(), i("main", {
|
|
1911
|
+
}, 8, [
|
|
1912
|
+
"visible",
|
|
1913
|
+
"width",
|
|
1914
|
+
"disabled",
|
|
1915
|
+
"popper-class"
|
|
1916
|
+
])) : r("", !0)
|
|
1917
|
+
], 512),
|
|
1918
|
+
!E(I).minimized.value && R.value && E(I).layout.value === "classic" ? (v(), i("main", {
|
|
1657
1919
|
key: 0,
|
|
1658
1920
|
class: "ml-ribbon__panel",
|
|
1659
|
-
"data-active-tab":
|
|
1921
|
+
"data-active-tab": R.value.id,
|
|
1660
1922
|
ref_key: "classicPanelRef",
|
|
1661
|
-
ref:
|
|
1662
|
-
}, [(v(!0), i(e, null, x(
|
|
1923
|
+
ref: U
|
|
1924
|
+
}, [(v(!0), i(e, null, x(xe.value, (e) => (v(), n(ut, {
|
|
1663
1925
|
id: e.id,
|
|
1664
1926
|
key: e.id,
|
|
1665
1927
|
"data-group-id": e.id,
|
|
@@ -1668,18 +1930,19 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1668
1930
|
"group-icon-css": e.groupIconCss,
|
|
1669
1931
|
orientation: e.orientation,
|
|
1670
1932
|
"auto-width": e.autoWidth,
|
|
1933
|
+
width: e.width,
|
|
1671
1934
|
priority: e.priority ?? 100,
|
|
1672
1935
|
launcher: e.launcher,
|
|
1673
1936
|
"show-launcher-icon": e.showLauncherIcon,
|
|
1674
1937
|
"group-model": e,
|
|
1675
|
-
"overflow-trigger-aria-label":
|
|
1676
|
-
"gallery-preview-fallback":
|
|
1677
|
-
onItemClick: l[
|
|
1938
|
+
"overflow-trigger-aria-label": Z.value.groupOverflowTriggerAriaLabel,
|
|
1939
|
+
"gallery-preview-fallback": Z.value.galleryPreviewFallback,
|
|
1940
|
+
onItemClick: l[8] ||= (e) => Q(e.groupId, e.itemId)
|
|
1678
1941
|
}, {
|
|
1679
|
-
default:
|
|
1942
|
+
default: O(() => [c(tt, {
|
|
1680
1943
|
group: e,
|
|
1681
|
-
"gallery-preview-fallback":
|
|
1682
|
-
onItemClick: l[
|
|
1944
|
+
"gallery-preview-fallback": Z.value.galleryPreviewFallback,
|
|
1945
|
+
onItemClick: l[7] ||= (e) => Q(e.groupId, e.itemId)
|
|
1683
1946
|
}, null, 8, ["group", "gallery-preview-fallback"])]),
|
|
1684
1947
|
_: 2
|
|
1685
1948
|
}, 1032, [
|
|
@@ -1690,88 +1953,89 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1690
1953
|
"group-icon-css",
|
|
1691
1954
|
"orientation",
|
|
1692
1955
|
"auto-width",
|
|
1956
|
+
"width",
|
|
1693
1957
|
"priority",
|
|
1694
1958
|
"launcher",
|
|
1695
1959
|
"show-launcher-icon",
|
|
1696
1960
|
"group-model",
|
|
1697
1961
|
"overflow-trigger-aria-label",
|
|
1698
1962
|
"gallery-preview-fallback"
|
|
1699
|
-
]))), 128)),
|
|
1963
|
+
]))), 128)), Se.value.length ? (v(), i("section", Tt, [a("div", Et, [c(E(L), {
|
|
1700
1964
|
trigger: "click",
|
|
1701
1965
|
placement: "bottom-end",
|
|
1702
|
-
width:
|
|
1703
|
-
disabled:
|
|
1704
|
-
"popper-class":
|
|
1705
|
-
onShow: l[
|
|
1706
|
-
onHide: l[
|
|
1966
|
+
width: we.value,
|
|
1967
|
+
disabled: E(I).disabled.value,
|
|
1968
|
+
"popper-class": X.value,
|
|
1969
|
+
onShow: l[10] ||= (e) => E(I).overflowOpen.value = !0,
|
|
1970
|
+
onHide: l[11] ||= (e) => E(I).overflowOpen.value = !1
|
|
1707
1971
|
}, {
|
|
1708
|
-
reference:
|
|
1972
|
+
reference: O(() => [a("button", {
|
|
1709
1973
|
type: "button",
|
|
1710
1974
|
class: "ml-ribbon-overflow-trigger",
|
|
1711
|
-
"aria-label":
|
|
1712
|
-
disabled:
|
|
1713
|
-
}, [...l[
|
|
1714
|
-
default:
|
|
1975
|
+
"aria-label": Z.value.overflowTriggerAriaLabel,
|
|
1976
|
+
disabled: E(I).disabled.value
|
|
1977
|
+
}, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, Dt)]),
|
|
1978
|
+
default: O(() => [a("div", Ot, [(v(!0), i(e, null, x(Se.value, (e) => (v(), i("section", {
|
|
1715
1979
|
key: e.id,
|
|
1716
1980
|
class: "ml-ribbon-overflow-group"
|
|
1717
|
-
}, [a("header",
|
|
1981
|
+
}, [a("header", kt, w(e.title), 1), c(tt, {
|
|
1718
1982
|
group: e,
|
|
1719
|
-
"gallery-preview-fallback":
|
|
1720
|
-
onItemClick: l[
|
|
1983
|
+
"gallery-preview-fallback": Z.value.galleryPreviewFallback,
|
|
1984
|
+
onItemClick: l[9] ||= (e) => Q(e.groupId, e.itemId)
|
|
1721
1985
|
}, null, 8, ["group", "gallery-preview-fallback"])]))), 128))])]),
|
|
1722
1986
|
_: 1
|
|
1723
1987
|
}, 8, [
|
|
1724
1988
|
"width",
|
|
1725
1989
|
"disabled",
|
|
1726
1990
|
"popper-class"
|
|
1727
|
-
])]), l[
|
|
1728
|
-
!
|
|
1991
|
+
])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, wt)) : r("", !0),
|
|
1992
|
+
!E(I).minimized.value && R.value && E(I).layout.value === "simplified" ? (v(), i("main", {
|
|
1729
1993
|
key: 1,
|
|
1730
1994
|
class: "ml-ribbon__panel ml-ribbon__panel--simplified",
|
|
1731
|
-
"data-active-tab":
|
|
1732
|
-
}, [(v(!0), i(e, null, x(
|
|
1995
|
+
"data-active-tab": R.value.id
|
|
1996
|
+
}, [(v(!0), i(e, null, x(B.value, (e) => (v(), n(E(L), {
|
|
1733
1997
|
key: e.id,
|
|
1734
1998
|
trigger: "click",
|
|
1735
1999
|
placement: "bottom-start",
|
|
1736
2000
|
width: 340,
|
|
1737
|
-
disabled:
|
|
1738
|
-
"popper-class":
|
|
2001
|
+
disabled: E(I).disabled.value,
|
|
2002
|
+
"popper-class": he.value
|
|
1739
2003
|
}, {
|
|
1740
|
-
reference:
|
|
2004
|
+
reference: O(() => [a("button", {
|
|
1741
2005
|
class: "ml-ribbon-simplified-group",
|
|
1742
2006
|
type: "button",
|
|
1743
|
-
disabled:
|
|
1744
|
-
}, [
|
|
2007
|
+
disabled: E(I).disabled.value
|
|
2008
|
+
}, [qe(e) ? (v(), n(E(F), {
|
|
1745
2009
|
key: 0,
|
|
1746
2010
|
class: "ml-ribbon-simplified-group__icon"
|
|
1747
2011
|
}, {
|
|
1748
|
-
default:
|
|
2012
|
+
default: O(() => [(v(), n(C(qe(e))))]),
|
|
1749
2013
|
_: 2
|
|
1750
|
-
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8,
|
|
1751
|
-
default:
|
|
1752
|
-
group:
|
|
1753
|
-
"gallery-preview-fallback":
|
|
1754
|
-
onItemClick: l[
|
|
2014
|
+
}, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, jt)]),
|
|
2015
|
+
default: O(() => [a("div", Mt, [c(tt, {
|
|
2016
|
+
group: Ee(e),
|
|
2017
|
+
"gallery-preview-fallback": Z.value.galleryPreviewFallback,
|
|
2018
|
+
onItemClick: l[12] ||= (e) => Q(e.groupId, e.itemId)
|
|
1755
2019
|
}, null, 8, ["group", "gallery-preview-fallback"])])]),
|
|
1756
2020
|
_: 2
|
|
1757
|
-
}, 1032, ["disabled", "popper-class"]))), 128))], 8,
|
|
2021
|
+
}, 1032, ["disabled", "popper-class"]))), 128))], 8, At)) : r("", !0),
|
|
1758
2022
|
c(_e, {
|
|
1759
|
-
open:
|
|
1760
|
-
size:
|
|
1761
|
-
"back-label":
|
|
1762
|
-
title:
|
|
1763
|
-
description:
|
|
1764
|
-
onClose:
|
|
2023
|
+
open: E(I).backdropOpen.value,
|
|
2024
|
+
size: Y.value,
|
|
2025
|
+
"back-label": Z.value.backstageBackLabel,
|
|
2026
|
+
title: Z.value.backstageTitle,
|
|
2027
|
+
description: Z.value.backstageDescription,
|
|
2028
|
+
onClose: Ve
|
|
1765
2029
|
}, o({ _: 2 }, [t.$slots.backstage ? {
|
|
1766
2030
|
name: "default",
|
|
1767
|
-
fn:
|
|
1768
|
-
close:
|
|
1769
|
-
open:
|
|
1770
|
-
size:
|
|
1771
|
-
backLabel:
|
|
1772
|
-
title:
|
|
1773
|
-
description:
|
|
1774
|
-
disabled:
|
|
2031
|
+
fn: O(() => [S(t.$slots, "backstage", {
|
|
2032
|
+
close: Ve,
|
|
2033
|
+
open: E(I).backdropOpen.value,
|
|
2034
|
+
size: Y.value,
|
|
2035
|
+
backLabel: Z.value.backstageBackLabel,
|
|
2036
|
+
title: Z.value.backstageTitle,
|
|
2037
|
+
description: Z.value.backstageDescription,
|
|
2038
|
+
disabled: E(I).disabled.value
|
|
1775
2039
|
})]),
|
|
1776
2040
|
key: "0"
|
|
1777
2041
|
} : void 0]), 1032, [
|
|
@@ -1785,10 +2049,10 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1785
2049
|
_: 3
|
|
1786
2050
|
}, 8, ["size"]));
|
|
1787
2051
|
}
|
|
1788
|
-
}),
|
|
2052
|
+
}), Ft = {
|
|
1789
2053
|
class: "ml-ribbon-tab-definition",
|
|
1790
2054
|
hidden: ""
|
|
1791
|
-
},
|
|
2055
|
+
}, It = /* @__PURE__ */ l({
|
|
1792
2056
|
__name: "RibbonTab",
|
|
1793
2057
|
props: {
|
|
1794
2058
|
id: {},
|
|
@@ -1799,13 +2063,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1799
2063
|
contextualTitle: {}
|
|
1800
2064
|
},
|
|
1801
2065
|
setup(e) {
|
|
1802
|
-
return (e, t) => (v(), i("div",
|
|
2066
|
+
return (e, t) => (v(), i("div", Ft, [S(e.$slots, "default")]));
|
|
1803
2067
|
}
|
|
1804
|
-
}),
|
|
2068
|
+
}), Lt = {
|
|
1805
2069
|
key: 0,
|
|
1806
2070
|
class: "ml-ribbon-keytips",
|
|
1807
2071
|
"aria-live": "polite"
|
|
1808
|
-
},
|
|
2072
|
+
}, Rt = { class: "ml-ribbon-keytips__hint" }, zt = /* @__PURE__ */ l({
|
|
1809
2073
|
__name: "RibbonKeyTips",
|
|
1810
2074
|
props: {
|
|
1811
2075
|
open: { type: Boolean },
|
|
@@ -1838,13 +2102,13 @@ var pe = { class: "ml-ribbon-backstage__nav" }, me = { class: "ml-ribbon-backsta
|
|
|
1838
2102
|
}
|
|
1839
2103
|
}
|
|
1840
2104
|
}
|
|
1841
|
-
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)),
|
|
2105
|
+
return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), D(() => s.open, (e) => {
|
|
1842
2106
|
e || y();
|
|
1843
|
-
}), (t, o) => n.open ? (v(), i("div",
|
|
2107
|
+
}), (t, o) => n.open ? (v(), i("div", Lt, [a("div", Rt, w(f.value), 1), (v(!0), i(e, null, x(u.value, (e) => (v(), i("span", {
|
|
1844
2108
|
key: e.id,
|
|
1845
2109
|
class: "ml-ribbon-keytip"
|
|
1846
2110
|
}, w(e.key), 1))), 128))])) : r("", !0);
|
|
1847
2111
|
}
|
|
1848
2112
|
});
|
|
1849
2113
|
//#endregion
|
|
1850
|
-
export {
|
|
2114
|
+
export { Pt as MlRibbon, _e as MlRibbonBackstage, Le as MlRibbonButtonGroup, Ee as MlRibbonCollection, Ce as MlRibbonContextualTabs, Te as MlRibbonFileMenu, Pe as MlRibbonGallery, ut as MlRibbonGroup, et as MlRibbonItemHost, zt as MlRibbonKeyTips, He as MlRibbonSegmented, It as MlRibbonTab, ye as MlRibbonTabs, Ke as MlRibbonTemplateItem, We as MlRibbonToggleButton };
|