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