@mlightcad/ribbon 0.0.9 → 0.1.0

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