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