@mlightcad/ribbon 0.1.2 → 0.1.3

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,75 @@
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 A, ElCheckbox as te, ElColorPicker as ne, ElConfigProvider as re, ElDrawer as j, ElDropdown as M, ElDropdownItem as N, ElDropdownMenu as P, ElIcon as F, ElInputNumber as I, ElOption as ie, ElPopover as ae, ElSegmented as L, ElSelect as oe, ElSwitch as R, ElTooltip as z, useGlobalConfig as se } from "element-plus";
3
- import { ArrowDown as B, ArrowDownBold as V, ArrowUp as H, ArrowUpBold as ce, Grid as le, Menu as ue, Promotion as de } from "@element-plus/icons-vue";
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, withKeys as k, withModifiers as ee } from "vue";
2
+ import { ElButton as A, ElButtonGroup as j, ElCheckbox as te, ElColorPicker as M, ElConfigProvider as ne, ElDrawer as N, ElDropdown as P, ElDropdownItem as F, ElDropdownMenu as I, ElIcon as L, ElInputNumber as re, ElOption as R, ElPopover as z, ElSegmented as B, ElSelect as V, ElSwitch as H, ElTooltip as ie, useGlobalConfig as ae } from "element-plus";
3
+ import { ArrowDown as U, ArrowDownBold as oe, ArrowUp as se, ArrowUpBold as ce, Bottom as le, Grid as ue, Menu as de, Promotion as W } from "@element-plus/icons-vue";
4
4
  //#region src/ribbon/context.ts
5
5
  var fe = Symbol("RibbonContext");
6
6
  //#endregion
7
7
  //#region src/ribbon/composables/useRibbonState.ts
8
- function U(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 W(e) {
11
+ function K(e) {
12
12
  if (!e) return;
13
13
  let t = { ...e };
14
- return "component" in t && (t.component = U(t.component)), "icon" in t && (t.icon = U(t.icon)), "activeIcon" in t && (t.activeIcon = U(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = U(t.inactiveIcon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
14
+ return "component" in t && (t.component = G(t.component)), "icon" in t && (t.icon = G(t.icon)), "activeIcon" in t && (t.activeIcon = G(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = G(t.inactiveIcon)), 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: U(t.icon)
19
+ icon: G(t.icon)
20
20
  } : t;
21
+ })), Array.isArray(t.categories) && (t.categories = t.categories.map((e) => {
22
+ if (!e || typeof e != "object") return e;
23
+ let t = e;
24
+ return {
25
+ ...t,
26
+ items: Array.isArray(t.items) ? t.items.map((e) => {
27
+ if (!e || typeof e != "object") return e;
28
+ let t = e;
29
+ return {
30
+ ...t,
31
+ preview: G(t.preview),
32
+ icon: G(t.icon),
33
+ component: G(t.component)
34
+ };
35
+ }) : t.items
36
+ };
21
37
  })), t;
22
38
  }
23
- function G(e) {
39
+ function pe(e) {
24
40
  return {
25
41
  ...e,
26
- icon: U(e.icon),
27
- props: W(e.props)
42
+ icon: G(e.icon),
43
+ props: K(e.props)
28
44
  };
29
45
  }
30
- function K(e) {
46
+ function me(e) {
31
47
  return {
32
48
  ...e,
33
- icon: U(e.icon),
34
- footerMenuItems: e.footerMenuItems?.map(G),
49
+ icon: G(e.icon),
50
+ footerMenuItems: e.footerMenuItems?.map(pe),
35
51
  collections: e.collections?.map((e) => ({
36
52
  ...e,
37
- items: e.items.map(G)
53
+ items: e.items.map(pe)
38
54
  }))
39
55
  };
40
56
  }
41
- function pe(e) {
57
+ function q(e) {
42
58
  return {
43
59
  ...e,
44
- groups: e.groups?.map(K)
60
+ groups: e.groups?.map(me)
45
61
  };
46
62
  }
47
- function me(e) {
48
- return e.map(pe);
63
+ function he(e) {
64
+ return e.map(q);
49
65
  }
50
- function q(e) {
66
+ function ge(e) {
51
67
  (!e.collections || e.collections.length === 0) && (e.collections = [{
52
68
  id: `${e.id}-collection-1`,
53
69
  items: []
54
70
  }]);
55
71
  }
56
- function J(e, t, n, r, i) {
72
+ function _e(e, t, n, r, i) {
57
73
  let a = e.find((e) => e.id === t);
58
74
  if (!a?.groups) return;
59
75
  let o = a.groups.find((e) => e.id === n);
@@ -61,10 +77,10 @@ function J(e, t, n, r, i) {
61
77
  let s = o.collections.find((e) => e.id === r);
62
78
  s && i(s.items);
63
79
  }
64
- function he(e, n, r, i, a, o, s, c) {
65
- let l = b(r), u = b(i), d = b(a), f = b(o), p = b(me(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 = {
80
+ function ve(e, n, r, i, a, o, s, c) {
81
+ let l = b(r), u = b(i), d = b(a), f = b(o), p = b(he(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
82
  addTab(e) {
67
- p.value.push(pe(e)), f.value ||= e.id;
83
+ p.value.push(q(e)), f.value ||= e.id;
68
84
  },
69
85
  removeTab(e) {
70
86
  p.value = p.value.filter((t) => t.id !== e), f.value === e && (f.value = S.value[0]?.id ?? "");
@@ -82,7 +98,7 @@ function he(e, n, r, i, a, o, s, c) {
82
98
  },
83
99
  addGroup(e, t) {
84
100
  let n = p.value.find((t) => t.id === e);
85
- n && (n.groups ??= [], q(t), n.groups.push(K(t)));
101
+ n && (n.groups ??= [], ge(t), n.groups.push(me(t)));
86
102
  },
87
103
  removeGroup(e, t) {
88
104
  let n = p.value.find((t) => t.id === e);
@@ -97,16 +113,16 @@ function he(e, n, r, i, a, o, s, c) {
97
113
  n && (n.visible = !1);
98
114
  },
99
115
  addItem(e, t, n, r) {
100
- J(p.value, e, t, n, (e) => e.push(G(r)));
116
+ _e(p.value, e, t, n, (e) => e.push(pe(r)));
101
117
  },
102
118
  removeItem(e, t, n, r) {
103
- J(p.value, e, t, n, (e) => {
119
+ _e(p.value, e, t, n, (e) => {
104
120
  let t = e.findIndex((e) => e.id === r);
105
121
  t >= 0 && e.splice(t, 1);
106
122
  });
107
123
  },
108
124
  updateItem(e, t, n, r, i) {
109
- J(p.value, e, t, n, (e) => {
125
+ _e(p.value, e, t, n, (e) => {
110
126
  let t = e.find((e) => e.id === r);
111
127
  t && Object.assign(t, i);
112
128
  });
@@ -155,7 +171,7 @@ function he(e, n, r, i, a, o, s, c) {
155
171
  }
156
172
  //#endregion
157
173
  //#region src/ribbon/modules/RibbonBackstage.vue?vue&type=script&setup=true&lang.ts
158
- var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backstage__content" }, ve = { key: 0 }, ye = { key: 1 }, Y = /* @__PURE__ */ l({
174
+ var ye = { class: "ml-ribbon-backstage__nav" }, J = { class: "ml-ribbon-backstage__content" }, be = { key: 0 }, Y = { key: 1 }, X = /* @__PURE__ */ l({
159
175
  __name: "RibbonBackstage",
160
176
  props: {
161
177
  open: { type: Boolean },
@@ -170,7 +186,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
170
186
  function d() {
171
187
  u("close");
172
188
  }
173
- return (t, o) => (v(), n(E(j), {
189
+ return (t, o) => (v(), n(E(N), {
174
190
  "model-value": l.open,
175
191
  size: "100%",
176
192
  "with-header": !1,
@@ -184,24 +200,24 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
184
200
  title: l.title,
185
201
  description: l.description,
186
202
  size: l.size
187
- }) : (v(), i(e, { key: 1 }, [a("aside", ge, [c(E(ee), {
203
+ }) : (v(), i(e, { key: 1 }, [a("aside", ye, [c(E(A), {
188
204
  type: "primary",
189
205
  onClick: d
190
206
  }, {
191
207
  default: O(() => [s(w(l.backLabel), 1)]),
192
208
  _: 1
193
- })]), a("section", _e, [l.title ? (v(), i("h2", ve, w(l.title), 1)) : r("", !0), l.description ? (v(), i("p", ye, w(l.description), 1)) : r("", !0)])], 64))], 2)]),
209
+ })]), a("section", J, [l.title ? (v(), i("h2", be, w(l.title), 1)) : r("", !0), l.description ? (v(), i("p", Y, w(l.description), 1)) : r("", !0)])], 64))], 2)]),
194
210
  _: 3
195
211
  }, 8, ["model-value"]));
196
212
  }
197
- }), be = {
213
+ }), Z = {
198
214
  class: "ml-ribbon-tabs",
199
215
  role: "tablist"
200
- }, X = [
216
+ }, xe = [
201
217
  "aria-selected",
202
218
  "disabled",
203
219
  "onClick"
204
- ], xe = /* @__PURE__ */ l({
220
+ ], Se = /* @__PURE__ */ l({
205
221
  __name: "RibbonTabs",
206
222
  props: {
207
223
  tabs: {},
@@ -217,7 +233,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
217
233
  triggerEl: t.currentTarget instanceof HTMLElement ? t.currentTarget : null
218
234
  });
219
235
  }
220
- return (t, r) => (v(), i("div", be, [(v(!0), i(e, null, x(s.value, (e) => (v(), i("button", {
236
+ return (t, r) => (v(), i("div", Z, [(v(!0), i(e, null, x(s.value, (e) => (v(), i("button", {
221
237
  key: e.id,
222
238
  type: "button",
223
239
  class: m(["ml-ribbon-tab", { "is-active": n.activeTab === e.id }]),
@@ -225,9 +241,9 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
225
241
  "aria-selected": n.activeTab === e.id,
226
242
  disabled: a.disabled,
227
243
  onClick: (t) => c(e.id, t)
228
- }, w(e.title), 11, X))), 128))]));
244
+ }, w(e.title), 11, xe))), 128))]));
229
245
  }
230
- }), Se = { class: "ml-ribbon-contextual-tabs" }, Ce = { class: "ml-ribbon-contextual-tabs__normal" }, we = { class: "ml-ribbon-contextual-tabs__ctx" }, Te = /* @__PURE__ */ l({
246
+ }), Ce = { class: "ml-ribbon-contextual-tabs" }, Q = { class: "ml-ribbon-contextual-tabs__normal" }, we = { class: "ml-ribbon-contextual-tabs__ctx" }, Te = /* @__PURE__ */ l({
231
247
  __name: "RibbonContextualTabs",
232
248
  props: {
233
249
  tabs: {},
@@ -238,7 +254,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
238
254
  emits: ["select"],
239
255
  setup(t, { emit: n }) {
240
256
  let r = t, o = n;
241
- return (n, s) => (v(), i("div", Se, [a("div", Ce, [c(xe, {
257
+ return (n, s) => (v(), i("div", Ce, [a("div", Q, [c(Se, {
242
258
  tabs: r.tabs.filter((e) => !e.contextual),
243
259
  "active-tab": t.activeTab,
244
260
  disabled: r.disabled,
@@ -251,7 +267,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
251
267
  key: e.id,
252
268
  class: "ml-ribbon-contextual-tabs__block",
253
269
  style: h({ "--ctx-color": e.contextualColor || "#67c23a" })
254
- }, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(xe, {
270
+ }, [a("small", null, w(e.contextualTitle || r.defaultContextualTitle), 1), c(Se, {
255
271
  tabs: [e],
256
272
  "active-tab": t.activeTab,
257
273
  disabled: r.disabled,
@@ -273,7 +289,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
273
289
  },
274
290
  emits: ["select", "open-backstage"],
275
291
  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}`);
292
+ let u = o, d = l, f = b(!1), p = ae("size", ""), h = t(() => p.value || "default"), g = t(() => `ml-ribbon-file-menu-dropdown ml-ribbon-popper ml-ribbon-popper--size-${h.value}`);
277
293
  function _(e) {
278
294
  f.value = e;
279
295
  }
@@ -286,21 +302,21 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
286
302
  }
287
303
  return D(() => u.disabled, (e) => {
288
304
  e && (f.value = !1);
289
- }), (t, o) => (v(), n(E(M), {
305
+ }), (t, o) => (v(), n(E(P), {
290
306
  trigger: "click",
291
307
  disabled: u.disabled,
292
308
  "popper-class": g.value,
293
309
  onCommand: y,
294
310
  onVisibleChange: _
295
311
  }, {
296
- dropdown: O(() => [c(E(P), null, {
297
- default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(N), {
312
+ dropdown: O(() => [c(E(I), null, {
313
+ default: O(() => [u.showOpenBackstage === !1 ? r("", !0) : (v(), n(E(F), {
298
314
  key: 0,
299
315
  command: "__backstage"
300
316
  }, {
301
317
  default: O(() => [s(w(u.openBackstageLabel), 1)]),
302
318
  _: 1
303
- })), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(N), {
319
+ })), (v(!0), i(e, null, x(u.items, (e, t) => (v(), n(E(F), {
304
320
  key: e.id,
305
321
  divided: u.showOpenBackstage !== !1 && t === 0,
306
322
  command: e.id,
@@ -373,7 +389,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
373
389
  function y(e) {
374
390
  o.disabled || c("click", e);
375
391
  }
376
- return (t, a) => (v(), n(E(ee), {
392
+ return (t, a) => (v(), n(E(A), {
377
393
  class: "ml-ribbon-button",
378
394
  "data-ribbon-button-id": e.id,
379
395
  type: e.buttonType,
@@ -389,7 +405,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
389
405
  class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
390
406
  style: h(_.value),
391
407
  "aria-hidden": "true"
392
- }, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(F), {
408
+ }, [S(t.$slots, "icon")], 6)) : f.value ? (v(), n(E(L), {
393
409
  key: 1,
394
410
  class: m(["ml-ribbon-item-host__icon ml-ribbon-button__icon", g.value]),
395
411
  style: h(_.value)
@@ -475,8 +491,8 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
475
491
  "ml-ribbon-button-group--equal-width": !t.wrap && t.equalWidth
476
492
  }]),
477
493
  "data-id": t.id
478
- }, [!t.hideLabel && t.label ? (v(), i("div", Me, 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(z), {
494
+ }, [!t.hideLabel && t.label ? (v(), i("div", Me, w(t.label), 1)) : r("", !0), c(E(j), null, {
495
+ default: O(() => [(v(!0), i(e, null, x(t.options, (e) => (v(), n(E(ie), {
480
496
  key: String(e.value),
481
497
  content: g(e),
482
498
  disabled: !g(e),
@@ -524,7 +540,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
524
540
  }), Fe = { class: "ml-ribbon-item-host__content ml-ribbon-dropdown__content" }, Ie = { class: "ml-ribbon-item-host__text-row ml-ribbon-dropdown__text-row" }, Le = {
525
541
  key: 0,
526
542
  class: "ml-ribbon-item-host__label ml-ribbon-dropdown__label"
527
- }, Z = { class: "ml-ribbon-dropdown-item__content" }, Re = { class: "ml-ribbon-dropdown-item__label" }, ze = /* @__PURE__ */ l({
543
+ }, Re = { class: "ml-ribbon-dropdown-item__content" }, ze = { class: "ml-ribbon-dropdown-item__label" }, Be = /* @__PURE__ */ l({
528
544
  name: "MlRibbonDropdown",
529
545
  __name: "RibbonDropdown",
530
546
  props: {
@@ -556,125 +572,125 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
556
572
  "tooltip-change"
557
573
  ],
558
574
  setup(o, { emit: l }) {
559
- let u = o, d = l, f = se("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) => V(e) === g.value) ?? null), T = t(() => {
575
+ let u = o, d = l, f = ae("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) => H(e) === g.value) ?? null), T = t(() => {
560
576
  if (y.value && u.syncLabelWithSelection) {
561
- let e = le(y.value);
577
+ let e = ce(y.value);
562
578
  if (e) return e;
563
579
  }
564
- return fe(u.label) ?? u.id;
565
- }), D = t(() => !u.hideLabel && T.value.length > 0), A = t(() => {
580
+ return de(u.label) ?? u.id;
581
+ }), D = t(() => !u.hideLabel && T.value.length > 0), k = t(() => {
566
582
  if (y.value) {
567
- let e = oe(y.value);
583
+ let e = B(y.value);
568
584
  if (e) return e;
569
585
  }
570
586
  return !u.icon || typeof u.icon == "string" ? null : u.icon;
571
- }), te = t(() => {
587
+ }), j = t(() => {
572
588
  if (y.value) {
573
- let e = R(y.value);
589
+ let e = V(y.value);
574
590
  if (e) return e;
575
591
  }
576
592
  if (typeof u.icon != "string") return null;
577
593
  let e = u.icon.trim();
578
594
  return e.length > 0 ? e : null;
579
- }), ne = t(() => !!(A.value || te.value)), re = t(() => de(y.value) ?? fe(u.tooltip) ?? fe(T.value) ?? fe(u.label) ?? U(u.id)), j = t(() => [
595
+ }), te = t(() => !!(k.value || j.value)), M = t(() => ue(y.value) ?? de(u.tooltip) ?? de(T.value) ?? de(u.label) ?? W(u.id)), ne = t(() => [
580
596
  "ml-ribbon-dropdown-menu",
581
597
  "ml-ribbon-popper",
582
598
  `ml-ribbon-popper--size-${p.value}`,
583
599
  u.popperClass
584
600
  ].filter(Boolean).join(" "));
585
- function I(e) {
601
+ function N(e) {
586
602
  if (u.disabled) {
587
603
  h.value = !1;
588
604
  return;
589
605
  }
590
606
  h.value = e;
591
607
  }
592
- function ie() {
608
+ function re() {
593
609
  u.disabled || (h.value = !h.value);
594
610
  }
595
- function ae(e) {
596
- u.disabled || (g.value = e, d("tooltip-change", de(y.value) ?? re.value), d("command", e), h.value = !1);
611
+ function R(e) {
612
+ u.disabled || (g.value = e, d("tooltip-change", ue(y.value) ?? M.value), d("command", e), h.value = !1);
597
613
  }
598
- function L() {
614
+ function z() {
599
615
  if (u.disabled) return;
600
616
  let e = y.value;
601
617
  if (!e) {
602
618
  d("click");
603
619
  return;
604
620
  }
605
- d("command", V(e));
621
+ d("command", H(e));
606
622
  }
607
- function oe(e) {
623
+ function B(e) {
608
624
  if (!e || typeof e != "object") return null;
609
625
  let t = e.icon;
610
626
  return !t || typeof t == "string" ? null : t;
611
627
  }
612
- function R(e) {
628
+ function V(e) {
613
629
  if (!e || typeof e != "object") return null;
614
630
  let t = e.icon;
615
631
  return typeof t != "string" || t.trim().length === 0 ? null : t;
616
632
  }
617
- function V(e) {
633
+ function H(e) {
618
634
  if (!(!e || typeof e != "object")) return e.value;
619
635
  }
620
- function ce(e) {
621
- let t = V(e);
636
+ function oe(e) {
637
+ let t = H(e);
622
638
  if (typeof t == "string" || typeof t == "number" || t && typeof t == "object") return t;
623
639
  }
624
- function le(e) {
640
+ function ce(e) {
625
641
  if (!e || typeof e != "object") return;
626
642
  let t = e.label;
627
643
  return typeof t == "string" ? t : void 0;
628
644
  }
629
- function ue(e) {
630
- if (typeof e == "string") return U(e);
645
+ function le(e) {
646
+ if (typeof e == "string") return W(e);
631
647
  if (typeof e == "number" || typeof e == "boolean") return String(e);
632
648
  }
633
- function de(e) {
634
- if (!(!e || typeof e != "object")) return fe(e.tooltip) ?? le(e) ?? ue(V(e));
649
+ function ue(e) {
650
+ if (!(!e || typeof e != "object")) return de(e.tooltip) ?? ce(e) ?? le(H(e));
635
651
  }
636
- function fe(e) {
652
+ function de(e) {
637
653
  if (typeof e != "string") return;
638
654
  let t = e.trim();
639
655
  return t.length > 0 ? t : void 0;
640
656
  }
641
- function U(e) {
657
+ function W(e) {
642
658
  let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
643
659
  return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
644
660
  }
645
- return (t, l) => (v(), n(E(M), {
661
+ return (t, l) => (v(), n(E(P), {
646
662
  class: m(["ml-ribbon-dropdown", [`ml-ribbon-dropdown--item-${o.itemSize}`, { "is-label-hidden": o.hideLabel }]]),
647
663
  trigger: "click",
648
664
  disabled: o.disabled,
649
- "popper-class": j.value,
650
- onVisibleChange: I,
651
- onCommand: ae
665
+ "popper-class": ne.value,
666
+ onVisibleChange: N,
667
+ onCommand: R
652
668
  }, {
653
- dropdown: O(() => [c(E(P), null, {
654
- default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(N), {
655
- key: String(V(e)),
656
- command: ce(e),
669
+ dropdown: O(() => [c(E(I), null, {
670
+ default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(F), {
671
+ key: String(H(e)),
672
+ command: oe(e),
657
673
  disabled: e.disabled === !0
658
674
  }, {
659
- default: O(() => [c(E(z), {
660
- content: de(e),
661
- disabled: !de(e),
675
+ default: O(() => [c(E(ie), {
676
+ content: ue(e),
677
+ disabled: !ue(e),
662
678
  "show-after": o.tooltipShowAfter,
663
679
  "hide-after": o.tooltipHideAfter,
664
680
  placement: "top",
665
681
  effect: "dark"
666
682
  }, {
667
- default: O(() => [a("span", Z, [S(t.$slots, "option", { option: e }, () => [oe(e) ? (v(), n(E(F), {
683
+ default: O(() => [a("span", Re, [S(t.$slots, "option", { option: e }, () => [B(e) ? (v(), n(E(L), {
668
684
  key: 0,
669
685
  class: "ml-ribbon-dropdown-item__icon"
670
686
  }, {
671
- default: O(() => [(v(), n(C(oe(e))))]),
687
+ default: O(() => [(v(), n(C(B(e))))]),
672
688
  _: 2
673
- }, 1024)) : R(e) ? (v(), i("i", {
689
+ }, 1024)) : V(e) ? (v(), i("i", {
674
690
  key: 1,
675
- class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", R(e)]),
691
+ class: m(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", V(e)]),
676
692
  "aria-hidden": "true"
677
- }, null, 2)) : r("", !0), a("span", Re, w(le(e)), 1)])])]),
693
+ }, null, 2)) : r("", !0), a("span", ze, w(ce(e)), 1)])])]),
678
694
  _: 2
679
695
  }, 1032, [
680
696
  "content",
@@ -686,28 +702,28 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
686
702
  }, 1032, ["command", "disabled"]))), 128))]),
687
703
  _: 3
688
704
  })]),
689
- default: O(() => [c(E(ee), {
705
+ default: O(() => [c(E(A), {
690
706
  type: "default",
691
707
  disabled: o.disabled,
692
- "aria-label": re.value,
693
- onClick: ie
708
+ "aria-label": M.value,
709
+ onClick: re
694
710
  }, {
695
- default: O(() => [a("span", Fe, [t.$slots.icon || ne.value ? (v(), i("span", {
711
+ default: O(() => [a("span", Fe, [t.$slots.icon || te.value ? (v(), i("span", {
696
712
  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(L, ["stop"])
699
- }, [S(t.$slots, "icon", { selectedOption: y.value }, () => [A.value ? (v(), n(E(F), { key: 0 }, {
700
- default: O(() => [(v(), n(C(A.value)))]),
713
+ class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary ml-ribbon-dropdown__icon", { "ml-ribbon-item-host__icon--class": j.value && !k.value && !t.$slots.icon }]),
714
+ onClick: ee(z, ["stop"])
715
+ }, [S(t.$slots, "icon", { selectedOption: y.value }, () => [k.value ? (v(), n(E(L), { key: 0 }, {
716
+ default: O(() => [(v(), n(C(k.value)))]),
701
717
  _: 1
702
- })) : te.value ? (v(), i("i", {
718
+ })) : j.value ? (v(), i("i", {
703
719
  key: 1,
704
- class: m(te.value),
720
+ class: m(j.value),
705
721
  "aria-hidden": "true"
706
722
  }, null, 2)) : r("", !0)])], 2)) : r("", !0), a("span", Ie, [D.value ? (v(), i("span", Le, [S(t.$slots, "label", {
707
723
  selectedOption: y.value,
708
724
  label: T.value
709
- }, () => [s(w(T.value), 1)])])) : r("", !0), c(E(F), { 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(H) : E(B))))]),
725
+ }, () => [s(w(T.value), 1)])])) : r("", !0), c(E(L), { class: m(["ml-ribbon-item-host__dropdown-arrow ml-ribbon-dropdown__arrow", { "is-open": h.value }]) }, {
726
+ default: O(() => [(v(), n(C(h.value ? E(se) : E(U))))]),
711
727
  _: 1
712
728
  }, 8, ["class"])])])]),
713
729
  _: 3
@@ -719,13 +735,51 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
719
735
  "popper-class"
720
736
  ]));
721
737
  }
722
- }), Be = {
738
+ }), Ve = ["disabled"], He = ["src"], Ue = {
739
+ key: 3,
740
+ class: "ml-ribbon-gallery__preview-svg",
741
+ role: "presentation",
742
+ "aria-hidden": "true"
743
+ }, We = ["href"], Ge = { class: "ml-ribbon-gallery__label ml-ribbon-gallery__collapsed-label" }, Ke = { class: "ml-ribbon-gallery__panel" }, qe = {
723
744
  key: 0,
745
+ class: "ml-ribbon-gallery__panel-category-title"
746
+ }, Je = ["disabled", "onClick"], Ye = ["src"], Xe = {
747
+ key: 3,
748
+ class: "ml-ribbon-gallery__preview-svg",
749
+ role: "presentation",
750
+ "aria-hidden": "true"
751
+ }, Ze = ["href"], $ = { class: "ml-ribbon-gallery__label" }, Qe = {
752
+ key: 1,
724
753
  class: "ml-ribbon-gallery__title"
725
- }, Ve = { class: "ml-ribbon-gallery__categories" }, He = {
754
+ }, $e = {
755
+ key: 2,
756
+ class: "ml-ribbon-gallery__categories"
757
+ }, et = {
726
758
  key: 0,
727
759
  class: "ml-ribbon-gallery__category-title"
728
- }, Ue = { class: "ml-ribbon-gallery__grid" }, We = ["disabled", "onClick"], Q = { class: "ml-ribbon-gallery__preview" }, Ge = { class: "ml-ribbon-gallery__label" }, Ke = /* @__PURE__ */ l({
760
+ }, tt = ["disabled", "onClick"], nt = ["src"], rt = {
761
+ key: 3,
762
+ class: "ml-ribbon-gallery__preview-svg",
763
+ role: "presentation",
764
+ "aria-hidden": "true"
765
+ }, it = ["href"], at = { class: "ml-ribbon-gallery__label" }, ot = {
766
+ key: 0,
767
+ class: "ml-ribbon-gallery__controls",
768
+ "aria-label": "Gallery navigation"
769
+ }, st = ["disabled"], ct = ["disabled"], lt = ["disabled"], ut = {
770
+ key: 0,
771
+ class: "ml-ribbon-gallery__panel-category-title"
772
+ }, dt = [
773
+ "data-gallery-row-index",
774
+ "disabled",
775
+ "onClick"
776
+ ], ft = ["src"], pt = {
777
+ key: 3,
778
+ class: "ml-ribbon-gallery__preview-svg",
779
+ role: "presentation",
780
+ "aria-hidden": "true"
781
+ }, mt = ["href"], ht = { class: "ml-ribbon-gallery__label" }, gt = 6, _t = 64, vt = 4, yt = 16, bt = 4, xt = 22, St = /* @__PURE__ */ l({
782
+ name: "MlRibbonGallery",
729
783
  __name: "RibbonGallery",
730
784
  props: {
731
785
  id: {},
@@ -735,39 +789,466 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
735
789
  type: Boolean,
736
790
  default: !1
737
791
  },
792
+ modelValue: {},
793
+ collapsed: {
794
+ type: Boolean,
795
+ default: !1
796
+ },
797
+ inlineItemLimit: { default: 4 },
738
798
  previewFallback: {}
739
799
  },
740
800
  emits: ["select"],
741
- setup(n, { emit: o }) {
742
- let s = n, c = o, l = b(""), u = t(() => s.categories.filter((e) => e.items.length > 0).length);
743
- function d(e) {
744
- let t = s.label.trim().toLowerCase(), n = e.title.trim().toLowerCase();
745
- return u.value > 1 || !t || n !== t;
801
+ setup(o, { emit: l }) {
802
+ let u = o, g = l, _ = b(""), y = b(!1), k = b(0), ee = b(null), A = b(null), j = b(null), te = b(0), M = ae("size", ""), ne = t(() => M.value || "default"), N = t(() => ne.value === "small" ? .92 : ne.value === "large" ? 1.08 : 1), P = t(() => Math.round(_t * N.value)), F = t(() => Math.round(xt * N.value)), I = t(() => u.label?.trim() ?? ""), re = t(() => u.categories.filter((e) => e.items.length > 0).length), R = t(() => u.categories.flatMap((e) => e.items)), B = t(() => R.value.find((e) => e.id === _.value) ?? R.value[0]), V = t(() => !Number.isFinite(u.inlineItemLimit) || u.inlineItemLimit <= 0 ? 4 : Math.floor(u.inlineItemLimit)), H = t(() => Math.max(1, Math.ceil(R.value.length / V.value))), ie = t(() => Math.min(k.value, H.value - 1)), oe = t(() => W.value && ie.value > 0), ce = t(() => W.value && ie.value < H.value - 1), ue = t(() => {
803
+ let e = ie.value * V.value;
804
+ return R.value.slice(e, e + V.value);
805
+ }), de = t(() => new Set(ue.value.map((e) => e.id))), W = t(() => R.value.length > V.value), fe = t(() => `ml-ribbon-gallery-panel ml-ribbon-gallery-panel--${u.collapsed ? "collapsed" : "inline"} ml-ribbon-gallery-panel--size-${ne.value}`), G = t(() => ({
806
+ "--ml-ribbon-gallery-panel-columns": String(V.value),
807
+ "--ml-ribbon-gallery-panel-item-width": `${P.value}px`
808
+ })), K = t(() => V.value * P.value + Math.max(0, V.value - 1) * vt + gt * 2 + (u.collapsed ? yt : bt + F.value)), pe = t(() => ({ modifiers: [{
809
+ name: "offset",
810
+ options: { offset: [te.value, 0] }
811
+ }] }));
812
+ D(() => u.modelValue, (e) => {
813
+ typeof e == "string" && (_.value = e);
814
+ }, { immediate: !0 }), D(() => [R.value.length, V.value], () => {
815
+ k.value >= H.value && (k.value = H.value - 1);
816
+ }), D(y, async (e) => {
817
+ !e || u.collapsed || (ve(), await p(), await p(), ye());
818
+ });
819
+ function me(e) {
820
+ return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
746
821
  }
747
- function f(e) {
748
- s.disabled || (l.value = e, c("select", e));
822
+ function q(e) {
823
+ let t = I.value.toLowerCase(), n = e.title.trim().toLowerCase();
824
+ return re.value > 1 || !t || n !== t;
749
825
  }
750
- return (t, o) => (v(), i("div", { class: m(["ml-ribbon-gallery", { "is-disabled": n.disabled }]) }, [n.label ? (v(), i("div", Be, w(n.label), 1)) : r("", !0), a("div", Ve, [(v(!0), i(e, null, x(n.categories, (t) => (v(), i("section", {
751
- key: t.id,
752
- class: "ml-ribbon-gallery__category"
753
- }, [d(t) ? (v(), i("h4", He, w(t.title), 1)) : r("", !0), a("div", Ue, [(v(!0), i(e, null, x(t.items, (e) => (v(), i("button", {
754
- key: e.id,
755
- type: "button",
756
- class: m(["ml-ribbon-gallery__item", { "is-selected": l.value === e.id }]),
757
- disabled: n.disabled,
758
- onClick: (t) => f(e.id)
759
- }, [a("div", Q, w(e.preview ?? s.previewFallback), 1), a("div", Ge, w(e.label), 1)], 10, We))), 128))])]))), 128))])], 2));
826
+ function he(e) {
827
+ return W.value ? e.items.filter((e) => de.value.has(e.id)) : e.items;
828
+ }
829
+ function ge(e) {
830
+ if (u.disabled || !W.value) return;
831
+ let t = ie.value + e;
832
+ k.value = Math.min(Math.max(t, 0), H.value - 1);
833
+ }
834
+ function _e(e) {
835
+ let t = R.value.findIndex((t) => t.id === e.id);
836
+ return t < 0 ? 0 : Math.floor(t / V.value);
837
+ }
838
+ function ve() {
839
+ let e = ee.value, t = A.value;
840
+ if (!e || !t) {
841
+ te.value = 0;
842
+ return;
843
+ }
844
+ let n = e.querySelector(".ml-ribbon-gallery__grid .ml-ribbon-gallery__item")?.getBoundingClientRect().left ?? e.getBoundingClientRect().left;
845
+ te.value = Math.round(n - t.getBoundingClientRect().left - gt);
846
+ }
847
+ function ye() {
848
+ let e = j.value;
849
+ e && e.querySelector(`[data-gallery-row-index="${ie.value}"]`)?.scrollIntoView?.({ block: "start" });
850
+ }
851
+ function J(e) {
852
+ return e.preview && typeof e.preview != "string" ? me(e.preview) : e.icon && typeof e.icon != "string" ? me(e.icon) : null;
853
+ }
854
+ function be(e) {
855
+ return e.component ? me(e.component) : null;
856
+ }
857
+ function Y(e) {
858
+ return u.disabled || e.disabled === !0;
859
+ }
860
+ function X(e) {
861
+ if (typeof e.icon != "string") return null;
862
+ let t = e.icon.trim();
863
+ return t.length > 0 ? t : null;
864
+ }
865
+ function Z(e) {
866
+ let t = e.previewSvg ?? e.svg;
867
+ if (typeof t != "string") return null;
868
+ let n = t.trim();
869
+ return n.length > 0 ? n : null;
870
+ }
871
+ function xe(e) {
872
+ return e.startsWith("data:image/svg+xml") || e.endsWith(".svg");
873
+ }
874
+ function Se(e) {
875
+ let t = Z(e);
876
+ return t ? xe(t) : !1;
877
+ }
878
+ function Ce(e) {
879
+ return typeof e.preview == "string" ? e.preview : u.previewFallback;
880
+ }
881
+ function Q(e) {
882
+ Y(e) || (_.value = e.id, k.value = _e(e), y.value = !1, g("select", e.id));
883
+ }
884
+ return (t, l) => (v(), i("div", {
885
+ ref_key: "galleryRef",
886
+ ref: ee,
887
+ class: m(["ml-ribbon-gallery", {
888
+ "is-disabled": o.disabled,
889
+ "is-collapsed": o.collapsed,
890
+ "is-unlabeled": !o.collapsed && !I.value
891
+ }])
892
+ }, [
893
+ o.collapsed && B.value ? (v(), n(E(z), {
894
+ key: 0,
895
+ visible: y.value,
896
+ "onUpdate:visible": l[0] ||= (e) => y.value = e,
897
+ trigger: "click",
898
+ placement: "bottom-start",
899
+ disabled: o.disabled,
900
+ width: K.value,
901
+ "popper-class": fe.value
902
+ }, {
903
+ reference: O(() => [a("button", {
904
+ type: "button",
905
+ class: m(["ml-ribbon-gallery__collapsed-button", {
906
+ "is-selected": _.value === B.value.id,
907
+ "is-open": y.value
908
+ }]),
909
+ disabled: Y(B.value)
910
+ }, [be(B.value) ? (v(), n(C(be(B.value)), f({ key: 0 }, B.value.componentProps, {
911
+ item: B.value,
912
+ selected: _.value === B.value.id,
913
+ disabled: Y(B.value)
914
+ }), null, 16, [
915
+ "item",
916
+ "selected",
917
+ "disabled"
918
+ ])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview ml-ribbon-gallery__collapsed-preview", {
919
+ "ml-ribbon-gallery__preview--icon": J(B.value) || X(B.value),
920
+ "ml-ribbon-gallery__preview--svg": Z(B.value)
921
+ }]) }, [J(B.value) ? (v(), n(E(L), {
922
+ key: 0,
923
+ class: "ml-ribbon-gallery__preview-icon"
924
+ }, {
925
+ default: O(() => [(v(), n(C(J(B.value))))]),
926
+ _: 1
927
+ })) : X(B.value) ? (v(), i("i", {
928
+ key: 1,
929
+ class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", X(B.value)]),
930
+ "aria-hidden": "true"
931
+ }, null, 2)) : Z(B.value) && Se(B.value) ? (v(), i("img", {
932
+ key: 2,
933
+ class: "ml-ribbon-gallery__preview-svg",
934
+ src: Z(B.value) ?? "",
935
+ alt: ""
936
+ }, null, 8, He)) : Z(B.value) ? (v(), i("svg", Ue, [a("use", { href: Z(B.value) ?? "" }, null, 8, We)])) : (v(), i(e, { key: 4 }, [s(w(Ce(B.value)), 1)], 64))], 2), a("div", Ge, w(B.value.label), 1)], 64))], 10, Ve)]),
937
+ default: O(() => [a("div", Ke, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
938
+ key: o.id,
939
+ class: "ml-ribbon-gallery__panel-category"
940
+ }, [q(o) ? (v(), i("h4", qe, w(o.title), 1)) : r("", !0), a("div", {
941
+ class: "ml-ribbon-gallery__panel-grid",
942
+ style: h(G.value)
943
+ }, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
944
+ key: r.id,
945
+ type: "button",
946
+ class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
947
+ disabled: Y(r),
948
+ onClick: (e) => Q(r)
949
+ }, [S(t.$slots, "item", {
950
+ item: r,
951
+ category: o,
952
+ selected: _.value === r.id,
953
+ disabled: Y(r),
954
+ select: () => Q(r)
955
+ }, () => [be(r) ? (v(), n(C(be(r)), f({
956
+ key: 0,
957
+ ref_for: !0
958
+ }, r.componentProps, {
959
+ item: r,
960
+ category: o,
961
+ selected: _.value === r.id,
962
+ disabled: Y(r)
963
+ }), null, 16, [
964
+ "item",
965
+ "category",
966
+ "selected",
967
+ "disabled"
968
+ ])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
969
+ "ml-ribbon-gallery__preview--icon": J(r) || X(r),
970
+ "ml-ribbon-gallery__preview--svg": Z(r)
971
+ }]) }, [J(r) ? (v(), n(E(L), {
972
+ key: 0,
973
+ class: "ml-ribbon-gallery__preview-icon"
974
+ }, {
975
+ default: O(() => [(v(), n(C(J(r))))]),
976
+ _: 2
977
+ }, 1024)) : X(r) ? (v(), i("i", {
978
+ key: 1,
979
+ class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", X(r)]),
980
+ "aria-hidden": "true"
981
+ }, null, 2)) : Z(r) && Se(r) ? (v(), i("img", {
982
+ key: 2,
983
+ class: "ml-ribbon-gallery__preview-svg",
984
+ src: Z(r) ?? "",
985
+ alt: ""
986
+ }, null, 8, Ye)) : Z(r) ? (v(), i("svg", Xe, [a("use", { href: Z(r) ?? "" }, null, 8, Ze)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", $, w(r.label), 1)], 64))])], 10, Je))), 128))], 4)]))), 128))])]),
987
+ _: 3
988
+ }, 8, [
989
+ "visible",
990
+ "disabled",
991
+ "width",
992
+ "popper-class"
993
+ ])) : r("", !0),
994
+ !o.collapsed && I.value ? (v(), i("div", Qe, w(I.value), 1)) : r("", !0),
995
+ o.collapsed ? r("", !0) : (v(), i("div", $e, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
996
+ key: o.id,
997
+ class: "ml-ribbon-gallery__category"
998
+ }, [I.value && q(o) ? (v(), i("h4", et, w(o.title), 1)) : r("", !0), a("div", {
999
+ class: "ml-ribbon-gallery__grid",
1000
+ style: h({ "--ml-ribbon-gallery-inline-columns": String(V.value) })
1001
+ }, [(v(!0), i(e, null, x(he(o), (r) => (v(), i("button", {
1002
+ key: r.id,
1003
+ type: "button",
1004
+ class: m(["ml-ribbon-gallery__item", { "is-selected": _.value === r.id }]),
1005
+ disabled: Y(r),
1006
+ onClick: (e) => Q(r)
1007
+ }, [S(t.$slots, "item", {
1008
+ item: r,
1009
+ category: o,
1010
+ selected: _.value === r.id,
1011
+ disabled: Y(r),
1012
+ select: () => Q(r)
1013
+ }, () => [be(r) ? (v(), n(C(be(r)), f({
1014
+ key: 0,
1015
+ ref_for: !0
1016
+ }, r.componentProps, {
1017
+ item: r,
1018
+ category: o,
1019
+ selected: _.value === r.id,
1020
+ disabled: Y(r)
1021
+ }), null, 16, [
1022
+ "item",
1023
+ "category",
1024
+ "selected",
1025
+ "disabled"
1026
+ ])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
1027
+ "ml-ribbon-gallery__preview--icon": J(r) || X(r),
1028
+ "ml-ribbon-gallery__preview--svg": Z(r)
1029
+ }]) }, [J(r) ? (v(), n(E(L), {
1030
+ key: 0,
1031
+ class: "ml-ribbon-gallery__preview-icon"
1032
+ }, {
1033
+ default: O(() => [(v(), n(C(J(r))))]),
1034
+ _: 2
1035
+ }, 1024)) : X(r) ? (v(), i("i", {
1036
+ key: 1,
1037
+ class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", X(r)]),
1038
+ "aria-hidden": "true"
1039
+ }, null, 2)) : Z(r) && Se(r) ? (v(), i("img", {
1040
+ key: 2,
1041
+ class: "ml-ribbon-gallery__preview-svg",
1042
+ src: Z(r) ?? "",
1043
+ alt: ""
1044
+ }, null, 8, nt)) : Z(r) ? (v(), i("svg", rt, [a("use", { href: Z(r) ?? "" }, null, 8, it)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", at, w(r.label), 1)], 64))])], 10, tt))), 128))], 4)]))), 128)), W.value ? (v(), i("div", ot, [
1045
+ a("button", {
1046
+ type: "button",
1047
+ class: "ml-ribbon-gallery__control-button",
1048
+ disabled: o.disabled || !oe.value,
1049
+ "aria-label": "Show previous gallery row",
1050
+ onClick: l[1] ||= (e) => ge(-1)
1051
+ }, [c(E(L), null, {
1052
+ default: O(() => [c(E(se))]),
1053
+ _: 1
1054
+ })], 8, st),
1055
+ a("button", {
1056
+ type: "button",
1057
+ class: "ml-ribbon-gallery__control-button",
1058
+ disabled: o.disabled || !ce.value,
1059
+ "aria-label": "Show next gallery row",
1060
+ onClick: l[2] ||= (e) => ge(1)
1061
+ }, [c(E(L), null, {
1062
+ default: O(() => [c(E(U))]),
1063
+ _: 1
1064
+ })], 8, ct),
1065
+ c(E(z), {
1066
+ visible: y.value,
1067
+ "onUpdate:visible": l[3] ||= (e) => y.value = e,
1068
+ trigger: "click",
1069
+ placement: "bottom-start",
1070
+ disabled: o.disabled,
1071
+ width: K.value,
1072
+ "popper-class": fe.value,
1073
+ "popper-options": pe.value
1074
+ }, {
1075
+ reference: O(() => [a("button", {
1076
+ ref_key: "inlineMoreButtonRef",
1077
+ ref: A,
1078
+ type: "button",
1079
+ class: m(["ml-ribbon-gallery__control-button ml-ribbon-gallery__more-button", { "is-open": y.value }]),
1080
+ disabled: o.disabled,
1081
+ "aria-label": "Show more gallery items",
1082
+ onClick: ve
1083
+ }, [c(E(L), null, {
1084
+ default: O(() => [c(E(le))]),
1085
+ _: 1
1086
+ })], 10, lt)]),
1087
+ default: O(() => [a("div", {
1088
+ ref_key: "inlinePanelRef",
1089
+ ref: j,
1090
+ class: "ml-ribbon-gallery__panel"
1091
+ }, [(v(!0), i(e, null, x(o.categories, (o) => (v(), i("section", {
1092
+ key: o.id,
1093
+ class: "ml-ribbon-gallery__panel-category"
1094
+ }, [q(o) ? (v(), i("h4", ut, w(o.title), 1)) : r("", !0), a("div", {
1095
+ class: "ml-ribbon-gallery__panel-grid",
1096
+ style: h(G.value)
1097
+ }, [(v(!0), i(e, null, x(o.items, (r) => (v(), i("button", {
1098
+ key: r.id,
1099
+ type: "button",
1100
+ class: m(["ml-ribbon-gallery__item ml-ribbon-gallery__panel-item", { "is-selected": _.value === r.id }]),
1101
+ "data-gallery-row-index": _e(r),
1102
+ disabled: Y(r),
1103
+ onClick: (e) => Q(r)
1104
+ }, [S(t.$slots, "item", {
1105
+ item: r,
1106
+ category: o,
1107
+ selected: _.value === r.id,
1108
+ disabled: Y(r),
1109
+ select: () => Q(r)
1110
+ }, () => [be(r) ? (v(), n(C(be(r)), f({
1111
+ key: 0,
1112
+ ref_for: !0
1113
+ }, r.componentProps, {
1114
+ item: r,
1115
+ category: o,
1116
+ selected: _.value === r.id,
1117
+ disabled: Y(r)
1118
+ }), null, 16, [
1119
+ "item",
1120
+ "category",
1121
+ "selected",
1122
+ "disabled"
1123
+ ])) : (v(), i(e, { key: 1 }, [a("div", { class: m(["ml-ribbon-gallery__preview", {
1124
+ "ml-ribbon-gallery__preview--icon": J(r) || X(r),
1125
+ "ml-ribbon-gallery__preview--svg": Z(r)
1126
+ }]) }, [J(r) ? (v(), n(E(L), {
1127
+ key: 0,
1128
+ class: "ml-ribbon-gallery__preview-icon"
1129
+ }, {
1130
+ default: O(() => [(v(), n(C(J(r))))]),
1131
+ _: 2
1132
+ }, 1024)) : X(r) ? (v(), i("i", {
1133
+ key: 1,
1134
+ class: m(["ml-ribbon-gallery__preview-icon ml-ribbon-gallery__preview-icon--class", X(r)]),
1135
+ "aria-hidden": "true"
1136
+ }, null, 2)) : Z(r) && Se(r) ? (v(), i("img", {
1137
+ key: 2,
1138
+ class: "ml-ribbon-gallery__preview-svg",
1139
+ src: Z(r) ?? "",
1140
+ alt: ""
1141
+ }, null, 8, ft)) : Z(r) ? (v(), i("svg", pt, [a("use", { href: Z(r) ?? "" }, null, 8, mt)])) : (v(), i(e, { key: 4 }, [s(w(Ce(r)), 1)], 64))], 2), a("div", ht, w(r.label), 1)], 64))])], 10, dt))), 128))], 4)]))), 128))], 512)]),
1142
+ _: 3
1143
+ }, 8, [
1144
+ "visible",
1145
+ "disabled",
1146
+ "width",
1147
+ "popper-class",
1148
+ "popper-options"
1149
+ ])
1150
+ ])) : r("", !0)]))
1151
+ ], 2));
1152
+ }
1153
+ }), Ct = ["data-id", "onKeydown"], wt = {
1154
+ key: 0,
1155
+ class: "ml-ribbon-input-number__prefix"
1156
+ }, Tt = {
1157
+ key: 2,
1158
+ class: "ml-ribbon-input-number__prefix-label"
1159
+ }, Et = /* @__PURE__ */ l({
1160
+ name: "MlRibbonInputNumber",
1161
+ __name: "RibbonInputNumber",
1162
+ props: {
1163
+ id: {},
1164
+ modelValue: { default: void 0 },
1165
+ width: { default: "96px" },
1166
+ prefixLabel: { default: void 0 },
1167
+ prefixIcon: { default: void 0 },
1168
+ prefixIconClass: { default: void 0 },
1169
+ controlProps: { default: () => ({}) },
1170
+ disabled: {
1171
+ type: Boolean,
1172
+ default: !1
1173
+ }
1174
+ },
1175
+ emits: ["change"],
1176
+ setup(e, { emit: a }) {
1177
+ let o = e, s = a, l = t(() => ne(o.width, "96px")), u = t(() => l.value === "100%"), d = t(() => u.value ? { width: "100%" } : {}), p = t(() => u.value ? {} : { width: l.value }), g = t(() => M(o.prefixLabel)), _ = t(() => !o.prefixIcon || typeof o.prefixIcon == "string" ? null : o.prefixIcon), y = t(() => M(o.prefixIconClass ?? (typeof o.prefixIcon == "string" ? o.prefixIcon : void 0)) ?? null), x = t(() => !!(g.value || _.value || y.value)), S = t(() => g.value ?? o.id), T = b(void 0);
1178
+ function D(e) {
1179
+ j(e);
1180
+ }
1181
+ function A(e) {
1182
+ e.preventDefault(), e.stopPropagation();
1183
+ let t = e.target;
1184
+ if (!(t instanceof HTMLInputElement)) return;
1185
+ let n = te(t.value);
1186
+ n === void 0 && t.value.trim().length > 0 || j(n);
1187
+ }
1188
+ function j(e) {
1189
+ Object.is(T.value, e) || (T.value = e, s("change", e));
1190
+ }
1191
+ function te(e) {
1192
+ let t = e.trim();
1193
+ if (!t) return;
1194
+ let n = Number(t);
1195
+ return Number.isFinite(n) ? n : void 0;
1196
+ }
1197
+ function M(e) {
1198
+ if (typeof e != "string") return;
1199
+ let t = e.trim();
1200
+ return t.length > 0 ? t : void 0;
1201
+ }
1202
+ function ne(e, t) {
1203
+ if (typeof e == "number" && Number.isFinite(e) && e > 0) return `${e}px`;
1204
+ if (typeof e == "string") {
1205
+ let n = e.trim();
1206
+ return n ? n.toLowerCase() === "full" ? "100%" : n : t;
1207
+ }
1208
+ return t;
1209
+ }
1210
+ return (t, a) => (v(), i("div", {
1211
+ class: m(["ml-ribbon-input-number", {
1212
+ "has-prefix": x.value,
1213
+ "is-full": u.value
1214
+ }]),
1215
+ style: h(d.value),
1216
+ "data-id": e.id,
1217
+ onKeydown: k(ee(A, ["stop", "prevent"]), ["enter"])
1218
+ }, [x.value ? (v(), i("span", wt, [_.value ? (v(), n(E(L), {
1219
+ key: 0,
1220
+ class: "ml-ribbon-input-number__prefix-icon",
1221
+ "aria-hidden": "true"
1222
+ }, {
1223
+ default: O(() => [(v(), n(C(_.value)))]),
1224
+ _: 1
1225
+ })) : y.value ? (v(), i("i", {
1226
+ key: 1,
1227
+ class: m(["ml-ribbon-input-number__prefix-icon ml-ribbon-input-number__prefix-icon--class", y.value]),
1228
+ "aria-hidden": "true"
1229
+ }, null, 2)) : r("", !0), g.value ? (v(), i("span", Tt, w(g.value), 1)) : r("", !0)])) : r("", !0), c(E(re), f(e.controlProps, {
1230
+ "model-value": e.modelValue,
1231
+ disabled: e.disabled,
1232
+ style: p.value,
1233
+ "aria-label": S.value,
1234
+ onChange: D
1235
+ }), null, 16, [
1236
+ "model-value",
1237
+ "disabled",
1238
+ "style",
1239
+ "aria-label"
1240
+ ])], 46, Ct));
760
1241
  }
761
- }), qe = ["data-id"], Je = {
1242
+ }), Dt = ["data-id"], Ot = {
762
1243
  key: 0,
763
1244
  class: "ml-ribbon-segmented__label"
764
- }, Ye = ["data-option-value"], Xe = {
1245
+ }, kt = ["data-option-value"], At = {
765
1246
  key: 2,
766
1247
  class: "ml-ribbon-segmented__option-label"
767
- }, Ze = {
1248
+ }, jt = {
768
1249
  key: 3,
769
1250
  class: "ml-ribbon-segmented__option-sr-label"
770
- }, $ = /* @__PURE__ */ l({
1251
+ }, Mt = /* @__PURE__ */ l({
771
1252
  __name: "RibbonSegmented",
772
1253
  props: {
773
1254
  id: {},
@@ -823,7 +1304,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
823
1304
  return (t, o) => (v(), i("div", {
824
1305
  class: "ml-ribbon-segmented",
825
1306
  "data-id": e.id
826
- }, [d.value ? (v(), i("div", Je, w(u.value), 1)) : r("", !0), c(E(L), {
1307
+ }, [d.value ? (v(), i("div", Ot, w(u.value), 1)) : r("", !0), c(E(B), {
827
1308
  class: "ml-ribbon-segmented__control",
828
1309
  options: e.options,
829
1310
  "model-value": e.modelValue,
@@ -836,7 +1317,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
836
1317
  default: O(({ item: e }) => [a("span", {
837
1318
  class: "ml-ribbon-segmented__option",
838
1319
  "data-option-value": y(e)
839
- }, [h(e) ? (v(), n(E(F), {
1320
+ }, [h(e) ? (v(), n(E(L), {
840
1321
  key: 0,
841
1322
  class: "ml-ribbon-segmented__option-icon",
842
1323
  "aria-hidden": "true"
@@ -847,7 +1328,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
847
1328
  key: 1,
848
1329
  class: m(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", g(e)]),
849
1330
  "aria-hidden": "true"
850
- }, null, 2)) : r("", !0), _(e) ? (v(), i("span", Xe, w(p(e)), 1)) : (v(), i("span", Ze, w(p(e)), 1))], 8, Ye)]),
1331
+ }, null, 2)) : r("", !0), _(e) ? (v(), i("span", At, w(p(e)), 1)) : (v(), i("span", jt, w(p(e)), 1))], 8, kt)]),
851
1332
  _: 1
852
1333
  }, 8, [
853
1334
  "options",
@@ -856,9 +1337,9 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
856
1337
  "block",
857
1338
  "disabled",
858
1339
  "aria-label"
859
- ])], 8, qe));
1340
+ ])], 8, Dt));
860
1341
  }
861
- }), Qe = /* @__PURE__ */ l({
1342
+ }), Nt = /* @__PURE__ */ l({
862
1343
  __name: "RibbonToggleButton",
863
1344
  props: {
864
1345
  id: {},
@@ -913,7 +1394,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
913
1394
  "aria-pressed"
914
1395
  ]));
915
1396
  }
916
- }), $e = ["data-template-id", "aria-disabled"], et = /* @__PURE__ */ l({
1397
+ }), Pt = ["data-template-id", "aria-disabled"], Ft = /* @__PURE__ */ l({
917
1398
  __name: "RibbonTemplateItem",
918
1399
  props: {
919
1400
  id: {},
@@ -928,12 +1409,12 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
928
1409
  }, [S(t.$slots, "default", {
929
1410
  item: e.item,
930
1411
  disabled: e.disabled
931
- }, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8, $e));
1412
+ }, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8, Pt));
932
1413
  }
933
- }), tt = ["data-item-id"], nt = {
1414
+ }), It = ["data-item-id"], Lt = {
934
1415
  key: 0,
935
1416
  class: "ml-ribbon-item-host__keytip"
936
- }, rt = /* @__PURE__ */ l({
1417
+ }, Rt = /* @__PURE__ */ l({
937
1418
  __name: "RibbonItemHost",
938
1419
  props: {
939
1420
  id: {},
@@ -944,56 +1425,62 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
944
1425
  },
945
1426
  emits: ["item-click"],
946
1427
  setup(o, { emit: c }) {
947
- let l = o, p = c, g = u(fe, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y = se("size", ""), k = t(() => y.value || "default"), ee = t(() => je(g?.tooltipShowAfter.value, 1e3)), A = t(() => je(g?.tooltipHideAfter.value, 0)), re = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${k.value}`), j = t(() => l.item.props?.icon || l.item.icon), M = t(() => l.item.hideLabel !== !0), N = b(void 0), P = t(() => l.item.type === "dropdown" && N.value ? N.value : ke(l.item.tooltip) ?? ke(l.item.label) ?? Le(l.item) ?? Z(l.item.id)), F = t(() => l.item.type !== "buttonGroup"), ae = t(() => !F.value || !P.value), L = t(() => P.value ?? l.item.id), R = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), B = t(() => {
948
- if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !R.value) return !1;
1428
+ let l = o, p = c, g = u(fe, null), _ = t(() => Array.isArray(l.item.props?.options) ? l.item.props.options : []), y = ae("size", ""), k = t(() => y.value || "default"), ee = t(() => je(g?.tooltipShowAfter.value, 1e3)), A = t(() => je(g?.tooltipHideAfter.value, 0)), j = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${k.value}`), ne = t(() => l.item.props?.icon || l.item.icon), N = t(() => l.item.hideLabel !== !0), P = b(void 0), F = t(() => l.item.type === "dropdown" && P.value ? P.value : ke(l.item.tooltip) ?? ke(l.item.label) ?? Le(l.item) ?? Re(l.item.id)), I = t(() => l.item.type !== "buttonGroup"), L = t(() => !I.value || !F.value), re = t(() => F.value ?? l.item.id), z = t(() => l.item.keyTip?.trim().toUpperCase() ?? ""), B = t(() => {
1429
+ if (!g?.keyTipsOpen.value || g?.disabled.value || l.disabled === !0 || !z.value) return !1;
949
1430
  let e = g.keyTipsSequence.value.toLowerCase();
950
- return e ? R.value.toLowerCase().startsWith(e) : !0;
951
- }), V = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), H = t(() => l.item.props?.modelValue), ce = t(() => l.item.props?.activeLabel), le = t(() => l.item.props?.inactiveLabel), ue = t(() => {
1431
+ return e ? z.value.toLowerCase().startsWith(e) : !0;
1432
+ }), H = t(() => l.disabled === !0 || l.item.disabled === !0 || g?.disabled.value === !0), U = t(() => l.item.props?.modelValue), oe = t(() => l.item.props?.activeLabel), se = t(() => l.item.props?.inactiveLabel), ce = t(() => Array.isArray(l.item.props?.categories) ? l.item.props.categories : []), le = t(() => {
1433
+ let e = l.item.props?.modelValue;
1434
+ return typeof e == "string" ? e : void 0;
1435
+ }), ue = t(() => {
1436
+ let e = l.item.props?.inlineItemLimit;
1437
+ return typeof e == "number" ? e : void 0;
1438
+ }), de = t(() => {
952
1439
  let e = l.item.props?.component;
953
1440
  return !e || typeof e == "string" ? null : d(T(e));
954
- }), de = t(() => {
1441
+ }), W = t(() => {
955
1442
  let e = l.item.props?.componentProps;
956
1443
  return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
957
- }), U = t(() => l.item.props?.wrap !== !1), W = t(() => l.item.props?.equalWidth === !0), G = t(() => {
1444
+ }), G = t(() => l.item.props?.wrap !== !1), K = t(() => l.item.props?.equalWidth === !0), pe = t(() => {
958
1445
  let e = l.item.props?.buttonSize;
959
1446
  if (e === "large" || e === "default" || e === "small") return e;
960
- }), K = t(() => Fe(l.item.props?.iconSize)), pe = t(() => Me(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), me = t(() => l.item.props?.modelValue), q = t(() => Me(l.item.props?.width ?? l.item.props?.inputNumberWidth, "96px")), J = t(() => l.item.props?.modelValue), he = t(() => {
1447
+ }), me = t(() => Fe(l.item.props?.iconSize)), q = t(() => Me(l.item.props?.width ?? l.item.props?.comboWidth, "92px")), he = t(() => l.item.props?.modelValue), ge = t(() => Me(l.item.props?.width ?? l.item.props?.inputNumberWidth, "96px")), _e = t(() => l.item.props?.modelValue), ve = t(() => {
961
1448
  let e = { ...l.item.props ?? {} };
962
- return delete e.modelValue, delete e.width, delete e.inputNumberWidth, delete e.emitValueOnChange, delete e.options, delete e.component, delete e.componentProps, e;
963
- }), ge = t(() => Ie(l.item.props?.labelWrapLines)), _e = t(() => Ne(l.item.props?.labelWrapWidth)), ve = t(() => l.item.type === "button" && l.item.size === "large" && M.value && (ge.value ?? 0) > 1), ye = t(() => {
964
- if (!ve.value) return {};
965
- let e = { "--ml-rb-item-label-max-lines": String(ge.value ?? 2) };
966
- return _e.value && (e["--ml-rb-item-label-wrap-width"] = _e.value), e;
1449
+ return delete e.modelValue, delete e.width, delete e.inputNumberWidth, delete e.prefixLabel, delete e.prefixIcon, delete e.prefixIconClass, delete e.emitValueOnChange, delete e.valuePrefix, delete e.options, delete e.component, delete e.componentProps, e;
1450
+ }), ye = t(() => Ie(l.item.props?.labelWrapLines)), J = t(() => Ne(l.item.props?.labelWrapWidth)), be = t(() => l.item.type === "button" && l.item.size === "large" && N.value && (ye.value ?? 0) > 1), Y = t(() => {
1451
+ if (!be.value) return {};
1452
+ let e = { "--ml-rb-item-label-max-lines": String(ye.value ?? 2) };
1453
+ return J.value && (e["--ml-rb-item-label-wrap-width"] = J.value), e;
967
1454
  });
968
1455
  D(() => l.item.id, () => {
969
- N.value = void 0;
1456
+ P.value = void 0;
970
1457
  });
971
- function Y() {
972
- V.value || p("item-click", l.id);
1458
+ function X() {
1459
+ H.value || p("item-click", l.id);
973
1460
  }
974
- function be(e) {
975
- if (!V.value) {
1461
+ function Z(e) {
1462
+ if (!H.value) {
976
1463
  if (typeof e == "string" || typeof e == "number") {
977
1464
  p("item-click", String(e));
978
1465
  return;
979
1466
  }
980
- Y();
1467
+ X();
981
1468
  }
982
1469
  }
983
- function X(e) {
984
- N.value = e;
985
- }
986
1470
  function xe(e) {
987
- if (!V.value) {
1471
+ P.value = e;
1472
+ }
1473
+ function Se(e) {
1474
+ if (!H.value) {
988
1475
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
989
1476
  p("item-click", String(e));
990
1477
  return;
991
1478
  }
992
- Y();
1479
+ X();
993
1480
  }
994
1481
  }
995
- function Se(e) {
996
- if (V.value) return;
1482
+ function Ce(e) {
1483
+ if (H.value) return;
997
1484
  let t = e ? l.item.props?.activeValue : l.item.props?.inactiveValue;
998
1485
  if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
999
1486
  p("item-click", String(t));
@@ -1001,43 +1488,44 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1001
1488
  }
1002
1489
  p("item-click", String(e));
1003
1490
  }
1004
- function Ce(e) {
1005
- if (!V.value) {
1491
+ function Q(e) {
1492
+ if (!H.value) {
1006
1493
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
1007
1494
  p("item-click", String(e));
1008
1495
  return;
1009
1496
  }
1010
- Y();
1497
+ X();
1011
1498
  }
1012
1499
  }
1013
1500
  function we(e) {
1014
- V.value || p("item-click", e);
1501
+ H.value || p("item-click", e);
1015
1502
  }
1016
1503
  function Te(e) {
1017
- if (!V.value) {
1504
+ if (!H.value) {
1018
1505
  if (l.item.props?.emitValueOnChange === !0 && (typeof e == "string" || typeof e == "number" || typeof e == "boolean")) {
1019
1506
  p("item-click", String(e));
1020
1507
  return;
1021
1508
  }
1022
- Y();
1509
+ X();
1023
1510
  }
1024
1511
  }
1025
1512
  function Ee(e) {
1026
- if (!V.value) {
1513
+ if (!H.value) {
1027
1514
  if (l.item.props?.emitValueOnChange === !0 && typeof e == "number" && Number.isFinite(e)) {
1028
- p("item-click", String(e));
1515
+ let t = l.item.props?.valuePrefix;
1516
+ p("item-click", `${typeof t == "string" ? t : ""}${e}`);
1029
1517
  return;
1030
1518
  }
1031
- Y();
1519
+ X();
1032
1520
  }
1033
1521
  }
1034
1522
  function De(e) {
1035
- if (!V.value) {
1523
+ if (!H.value) {
1036
1524
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
1037
1525
  p("item-click", String(e));
1038
1526
  return;
1039
1527
  }
1040
- Y();
1528
+ X();
1041
1529
  }
1042
1530
  }
1043
1531
  function Oe(e) {
@@ -1081,13 +1569,13 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1081
1569
  let t = _.value.map((e) => Oe(e)).filter((e) => !!e);
1082
1570
  if (t.length) return e.type === "buttonGroup" ? t.join(" / ") : t[0];
1083
1571
  }
1084
- function Z(e) {
1572
+ function Re(e) {
1085
1573
  let t = e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
1086
1574
  return t ? t.replace(/\b\w/g, (e) => e.toUpperCase()) : e;
1087
1575
  }
1088
- return (t, c) => (v(), n(E(z), {
1089
- content: P.value,
1090
- disabled: ae.value,
1576
+ return (t, c) => (v(), n(E(ie), {
1577
+ content: F.value,
1578
+ disabled: L.value,
1091
1579
  "show-after": ee.value,
1092
1580
  "hide-after": A.value,
1093
1581
  placement: "top",
@@ -1099,26 +1587,26 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1099
1587
  `type-${o.item.type}`,
1100
1588
  {
1101
1589
  "is-label-hidden": o.item.hideLabel === !0,
1102
- "is-label-wrap": ve.value
1590
+ "is-label-wrap": be.value
1103
1591
  }
1104
1592
  ]]),
1105
- style: h(ye.value),
1593
+ style: h(Y.value),
1106
1594
  "data-item-id": o.id,
1107
1595
  role: "group"
1108
- }, [B.value ? (v(), i("span", nt, w(R.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Pe, {
1596
+ }, [B.value ? (v(), i("span", Lt, w(z.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (v(), n(Pe, {
1109
1597
  key: 1,
1110
1598
  id: o.item.id,
1111
1599
  label: o.item.label ?? "",
1112
1600
  options: o.item.props?.options ?? [],
1113
1601
  "hide-label": o.item.hideLabel === !0,
1114
- wrap: U.value,
1115
- "equal-width": W.value,
1116
- "button-size": G.value,
1117
- "icon-size": K.value,
1602
+ wrap: G.value,
1603
+ "equal-width": K.value,
1604
+ "button-size": pe.value,
1605
+ "icon-size": me.value,
1118
1606
  "tooltip-show-after": ee.value,
1119
1607
  "tooltip-hide-after": A.value,
1120
- disabled: V.value,
1121
- onChange: Ce
1608
+ disabled: H.value,
1609
+ onChange: Q
1122
1610
  }, null, 8, [
1123
1611
  "id",
1124
1612
  "label",
@@ -1131,7 +1619,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1131
1619
  "tooltip-show-after",
1132
1620
  "tooltip-hide-after",
1133
1621
  "disabled"
1134
- ])) : o.item.type === "segmented" ? (v(), n($, {
1622
+ ])) : o.item.type === "segmented" ? (v(), n(Mt, {
1135
1623
  key: 2,
1136
1624
  id: o.item.id,
1137
1625
  label: o.item.label ?? o.item.id,
@@ -1139,9 +1627,9 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1139
1627
  "model-value": o.item.props?.modelValue,
1140
1628
  direction: o.item.props?.direction ?? "horizontal",
1141
1629
  block: o.item.props?.block === !0,
1142
- disabled: V.value,
1630
+ disabled: H.value,
1143
1631
  "hide-label": o.item.hideLabel === !0,
1144
- onChange: xe
1632
+ onChange: Se
1145
1633
  }, null, 8, [
1146
1634
  "id",
1147
1635
  "label",
@@ -1151,18 +1639,18 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1151
1639
  "block",
1152
1640
  "disabled",
1153
1641
  "hide-label"
1154
- ])) : o.item.type === "toggle" ? (v(), n(Qe, {
1642
+ ])) : o.item.type === "toggle" ? (v(), n(Nt, {
1155
1643
  key: 3,
1156
1644
  id: o.item.id,
1157
1645
  label: o.item.label ?? o.item.id,
1158
- "model-value": H.value,
1646
+ "model-value": U.value,
1159
1647
  "active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
1160
1648
  "inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
1161
- "active-label": ce.value,
1162
- "inactive-label": le.value,
1163
- disabled: V.value,
1649
+ "active-label": oe.value,
1650
+ "inactive-label": se.value,
1651
+ disabled: H.value,
1164
1652
  "hide-label": o.item.hideLabel === !0,
1165
- onChange: Se
1653
+ onChange: Ce
1166
1654
  }, null, 8, [
1167
1655
  "id",
1168
1656
  "label",
@@ -1173,30 +1661,36 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1173
1661
  "inactive-label",
1174
1662
  "disabled",
1175
1663
  "hide-label"
1176
- ])) : o.item.type === "gallery" ? (v(), n(Ke, {
1664
+ ])) : o.item.type === "gallery" ? (v(), n(St, {
1177
1665
  key: 4,
1178
1666
  id: o.item.id,
1179
1667
  label: o.item.label ?? "",
1180
- categories: o.item.props?.categories ?? [],
1668
+ categories: ce.value,
1669
+ "model-value": le.value,
1670
+ collapsed: o.item.props?.collapsed === !0,
1671
+ "inline-item-limit": ue.value,
1181
1672
  "preview-fallback": l.galleryPreviewFallback,
1182
- disabled: V.value,
1673
+ disabled: H.value,
1183
1674
  onSelect: we
1184
1675
  }, null, 8, [
1185
1676
  "id",
1186
1677
  "label",
1187
1678
  "categories",
1679
+ "model-value",
1680
+ "collapsed",
1681
+ "inline-item-limit",
1188
1682
  "preview-fallback",
1189
1683
  "disabled"
1190
- ])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(et, {
1684
+ ])) : o.item.type === "custom" || o.item.type === "template" ? (v(), n(Ft, {
1191
1685
  key: 5,
1192
1686
  id: o.item.id,
1193
1687
  item: o.item,
1194
- disabled: V.value
1688
+ disabled: H.value
1195
1689
  }, {
1196
- default: O(() => [ue.value ? (v(), n(C(ue.value), f({ key: 0 }, de.value, {
1690
+ default: O(() => [de.value ? (v(), n(C(de.value), f({ key: 0 }, W.value, {
1197
1691
  item: o.item,
1198
1692
  "group-id": o.groupId,
1199
- disabled: V.value,
1693
+ disabled: H.value,
1200
1694
  "emit-item-click": De
1201
1695
  }), null, 16, [
1202
1696
  "item",
@@ -1205,29 +1699,29 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1205
1699
  ])) : S(t.$slots, "template", {
1206
1700
  key: 1,
1207
1701
  item: o.item,
1208
- disabled: V.value
1702
+ disabled: H.value
1209
1703
  })]),
1210
1704
  _: 3
1211
1705
  }, 8, [
1212
1706
  "id",
1213
1707
  "item",
1214
1708
  "disabled"
1215
- ])) : o.item.type === "dropdown" ? (v(), n(ze, {
1709
+ ])) : o.item.type === "dropdown" ? (v(), n(Be, {
1216
1710
  key: 6,
1217
1711
  id: o.item.id,
1218
1712
  label: o.item.label ?? o.item.id,
1219
1713
  tooltip: o.item.tooltip,
1220
- icon: j.value,
1714
+ icon: ne.value,
1221
1715
  options: o.item.props?.options ?? [],
1222
- disabled: V.value,
1716
+ disabled: H.value,
1223
1717
  "hide-label": o.item.hideLabel === !0,
1224
1718
  "item-size": o.item.size ?? "medium",
1225
1719
  "sync-label-with-selection": o.item.props?.syncLabelWithSelection === !0,
1226
1720
  "tooltip-show-after": ee.value,
1227
1721
  "tooltip-hide-after": A.value,
1228
- onCommand: be,
1229
- onTooltipChange: X,
1230
- onClick: Y
1722
+ onCommand: Z,
1723
+ onTooltipChange: xe,
1724
+ onClick: X
1231
1725
  }, null, 8, [
1232
1726
  "id",
1233
1727
  "label",
@@ -1242,24 +1736,24 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1242
1736
  "tooltip-hide-after"
1243
1737
  ])) : o.item.type === "checkbox" ? (v(), n(E(te), {
1244
1738
  key: 7,
1245
- disabled: V.value,
1246
- onChange: Y
1739
+ disabled: H.value,
1740
+ onChange: X
1247
1741
  }, {
1248
1742
  default: O(() => [s(w(o.item.label), 1)]),
1249
1743
  _: 1
1250
- }, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(ne), {
1744
+ }, 8, ["disabled"])) : o.item.type === "colorPicker" ? (v(), n(E(M), {
1251
1745
  key: 8,
1252
- disabled: V.value,
1253
- onChange: Y
1254
- }, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(oe), {
1746
+ disabled: H.value,
1747
+ onChange: X
1748
+ }, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (v(), n(E(V), {
1255
1749
  key: 9,
1256
- "model-value": me.value,
1257
- disabled: V.value,
1258
- "popper-class": re.value,
1259
- style: h({ width: pe.value }),
1750
+ "model-value": he.value,
1751
+ disabled: H.value,
1752
+ "popper-class": j.value,
1753
+ style: h({ width: q.value }),
1260
1754
  onChange: Te
1261
1755
  }, {
1262
- default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(ie), {
1756
+ default: O(() => [(v(!0), i(e, null, x(_.value, (e) => (v(), n(E(R), {
1263
1757
  key: String(e.value),
1264
1758
  label: String(e.label),
1265
1759
  value: e.value
@@ -1270,25 +1764,35 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1270
1764
  "disabled",
1271
1765
  "popper-class",
1272
1766
  "style"
1273
- ])) : o.item.type === "inputNumber" ? (v(), n(E(I), f({ key: 10 }, he.value, {
1274
- class: "ml-ribbon-input-number",
1275
- "model-value": J.value,
1276
- disabled: V.value,
1277
- style: { width: q.value },
1767
+ ])) : o.item.type === "inputNumber" ? (v(), n(Et, {
1768
+ key: 10,
1769
+ id: o.item.id,
1770
+ "model-value": _e.value,
1771
+ width: ge.value,
1772
+ "prefix-label": o.item.props?.prefixLabel,
1773
+ "prefix-icon": o.item.props?.prefixIcon ?? o.item.props?.icon ?? o.item.icon,
1774
+ "prefix-icon-class": o.item.props?.prefixIconClass,
1775
+ "control-props": ve.value,
1776
+ disabled: H.value,
1278
1777
  onChange: Ee
1279
- }), null, 16, [
1778
+ }, null, 8, [
1779
+ "id",
1280
1780
  "model-value",
1281
- "disabled",
1282
- "style"
1781
+ "width",
1782
+ "prefix-label",
1783
+ "prefix-icon",
1784
+ "prefix-icon-class",
1785
+ "control-props",
1786
+ "disabled"
1283
1787
  ])) : (v(), n(Ae, {
1284
1788
  key: 11,
1285
1789
  id: o.item.id,
1286
1790
  label: o.item.label ?? o.item.id,
1287
- icon: j.value,
1288
- disabled: V.value,
1289
- "hide-label": !M.value,
1290
- "aria-label": L.value,
1291
- onClick: Y
1791
+ icon: ne.value,
1792
+ disabled: H.value,
1793
+ "hide-label": !N.value,
1794
+ "aria-label": re.value,
1795
+ onClick: X
1292
1796
  }, null, 8, [
1293
1797
  "id",
1294
1798
  "label",
@@ -1296,7 +1800,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1296
1800
  "disabled",
1297
1801
  "hide-label",
1298
1802
  "aria-label"
1299
- ]))], 14, tt)]),
1803
+ ]))], 14, It)]),
1300
1804
  _: 3
1301
1805
  }, 8, [
1302
1806
  "content",
@@ -1305,7 +1809,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1305
1809
  "hide-after"
1306
1810
  ]));
1307
1811
  }
1308
- }), it = /* @__PURE__ */ l({
1812
+ }), zt = /* @__PURE__ */ l({
1309
1813
  __name: "RibbonGroupContent",
1310
1814
  props: {
1311
1815
  group: {},
@@ -1321,7 +1825,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1321
1825
  layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
1322
1826
  rows: t.rows
1323
1827
  }, {
1324
- default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(rt, {
1828
+ default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(Rt, {
1325
1829
  id: e.id,
1326
1830
  key: e.id,
1327
1831
  item: e,
@@ -1346,15 +1850,15 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1346
1850
  "rows"
1347
1851
  ]))), 128))], 2));
1348
1852
  }
1349
- }), at = ["data-priority"], ot = { class: "ml-ribbon-group__body" }, st = { class: "ml-ribbon-group__footer" }, ct = { class: "ml-ribbon-group__title" }, lt = [
1853
+ }), Bt = ["data-priority"], Vt = { class: "ml-ribbon-group__body" }, Ht = { class: "ml-ribbon-group__footer" }, Ut = { class: "ml-ribbon-group__title" }, Wt = [
1350
1854
  "aria-label",
1351
1855
  "aria-expanded",
1352
1856
  "disabled"
1353
- ], ut = { class: "ml-ribbon-group__overflow-content" }, dt = [
1857
+ ], Gt = { class: "ml-ribbon-group__overflow-content" }, Kt = [
1354
1858
  "aria-label",
1355
1859
  "aria-expanded",
1356
1860
  "disabled"
1357
- ], ft = { class: "ml-ribbon-group__overflow-content" }, pt = /* @__PURE__ */ l({
1861
+ ], qt = { class: "ml-ribbon-group__overflow-content" }, Jt = /* @__PURE__ */ l({
1358
1862
  __name: "RibbonGroup",
1359
1863
  props: {
1360
1864
  id: {},
@@ -1382,13 +1886,13 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1382
1886
  maxWidth: e,
1383
1887
  flex: `0 0 ${e}`
1384
1888
  };
1385
- }), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), A = b(null), te = b(null), ne = b(0), re = b(0), j = se("size", ""), M = t(() => j.value || "default"), N = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${M.value}`), P = t(() => ({ modifiers: [{
1889
+ }), x = t(() => s.disabled === !0 || d?.disabled.value === !0), T = b(null), k = b([]), ee = b(null), j = b(null), te = b(0), M = b(0), ne = ae("size", ""), N = t(() => ne.value || "default"), P = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${N.value}`), F = t(() => ({ modifiers: [{
1386
1890
  name: "offset",
1387
- options: { offset: [ne.value, 8] }
1891
+ options: { offset: [te.value, 8] }
1388
1892
  }] })), I = t(() => ({ modifiers: [{
1389
1893
  name: "offset",
1390
- options: { offset: [re.value, 8] }
1391
- }] })), ie = 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), z = b(!1), V = t(() => {
1894
+ options: { offset: [M.value, 8] }
1895
+ }] })), re = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), R = t(() => k.value.length > 0), B = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), V = b(!1), H = b(!1), ie = t(() => {
1392
1896
  if (!s.groupModel || !k.value.length) return null;
1393
1897
  let e = new Set(k.value), t = s.groupModel.collections?.map((t) => ({
1394
1898
  ...t,
@@ -1398,7 +1902,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1398
1902
  ...s.groupModel,
1399
1903
  collections: t
1400
1904
  } : null;
1401
- }), ce = t(() => s.groupModel?.footerMenuItems?.length ? {
1905
+ }), oe = t(() => s.groupModel?.footerMenuItems?.length ? {
1402
1906
  id: `${s.groupModel.id}-footer-menu`,
1403
1907
  title: "",
1404
1908
  orientation: "row",
@@ -1408,7 +1912,7 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1408
1912
  items: s.groupModel.footerMenuItems
1409
1913
  }]
1410
1914
  } : null);
1411
- function le() {
1915
+ function ce() {
1412
1916
  let e = T.value?.querySelector(".ml-ribbon-group__content");
1413
1917
  if (!e) {
1414
1918
  k.value.length > 0 && (k.value = []);
@@ -1427,55 +1931,55 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1427
1931
  (i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
1428
1932
  }), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
1429
1933
  }
1430
- function ue() {
1934
+ function le() {
1431
1935
  p(() => {
1432
- he(), U(), W(), le();
1936
+ ge(), ue(), de(), ce();
1433
1937
  });
1434
1938
  }
1435
- function U() {
1436
- let e = T.value?.getBoundingClientRect(), t = A.value?.getBoundingClientRect();
1939
+ function ue() {
1940
+ let e = T.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
1437
1941
  if (!e || !t) {
1438
- ne.value !== 0 && (ne.value = 0);
1942
+ te.value !== 0 && (te.value = 0);
1439
1943
  return;
1440
1944
  }
1441
1945
  let n = Math.round(e.left - t.left);
1442
- ne.value !== n && (ne.value = n);
1946
+ te.value !== n && (te.value = n);
1443
1947
  }
1444
- function W() {
1445
- let e = T.value?.getBoundingClientRect(), t = te.value?.getBoundingClientRect();
1948
+ function de() {
1949
+ let e = T.value?.getBoundingClientRect(), t = j.value?.getBoundingClientRect();
1446
1950
  if (!e || !t) {
1447
- re.value !== 0 && (re.value = 0);
1951
+ M.value !== 0 && (M.value = 0);
1448
1952
  return;
1449
1953
  }
1450
1954
  let n = Math.round(e.left - t.left);
1451
- re.value !== n && (re.value = n);
1955
+ M.value !== n && (M.value = n);
1452
1956
  }
1453
1957
  function G(e) {
1454
- R.value = e;
1958
+ V.value = e;
1455
1959
  }
1456
1960
  function K(e) {
1457
- z.value = e;
1961
+ H.value = e;
1458
1962
  }
1459
1963
  function pe() {
1460
- x.value || (R.value = !R.value);
1964
+ x.value || (V.value = !V.value);
1461
1965
  }
1462
1966
  function me() {
1463
- x.value || (z.value = !z.value);
1967
+ x.value || (H.value = !H.value);
1464
1968
  }
1465
- let q = null, J = null;
1466
- function he() {
1969
+ let q = null, he = null;
1970
+ function ge() {
1467
1971
  if (!q) return;
1468
1972
  let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
1469
- J !== e && (J && q.unobserve(J), e && q.observe(e), J = e);
1973
+ he !== e && (he && q.unobserve(he), e && q.observe(e), he = e);
1470
1974
  }
1471
1975
  return D(() => s.groupModel, () => {
1472
- ue();
1976
+ le();
1473
1977
  }, { deep: !0 }), D(x, (e) => {
1474
- e && (R.value = !1, z.value = !1);
1978
+ e && (V.value = !1, H.value = !1);
1475
1979
  }), g(() => {
1476
1980
  typeof ResizeObserver < "u" && (q = new ResizeObserver(() => {
1477
- U(), W(), le();
1478
- }), T.value && q.observe(T.value), he()), ue();
1981
+ ue(), de(), ce();
1982
+ }), T.value && q.observe(T.value), ge()), le();
1479
1983
  }), _(() => {
1480
1984
  q?.disconnect();
1481
1985
  }), (t, o) => (v(), i("section", {
@@ -1484,40 +1988,40 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1484
1988
  class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
1485
1989
  "data-priority": e.priority ?? 100,
1486
1990
  style: h(y.value)
1487
- }, [a("div", ot, [S(t.$slots, "default")]), a("footer", st, [
1488
- ie.value ? (v(), n(E(F), {
1991
+ }, [a("div", Vt, [S(t.$slots, "default")]), a("footer", Ht, [
1992
+ re.value ? (v(), n(E(L), {
1489
1993
  key: 0,
1490
1994
  class: "ml-ribbon-group__icon"
1491
1995
  }, {
1492
- default: O(() => [(v(), n(C(ie.value)))]),
1996
+ default: O(() => [(v(), n(C(re.value)))]),
1493
1997
  _: 1
1494
1998
  })) : r("", !0),
1495
- a("span", ct, w(e.title), 1),
1496
- oe.value && ce.value ? (v(), n(E(ae), {
1999
+ a("span", Ut, w(e.title), 1),
2000
+ B.value && oe.value ? (v(), n(E(z), {
1497
2001
  key: 1,
1498
2002
  trigger: "click",
1499
2003
  placement: "bottom-start",
1500
2004
  disabled: x.value,
1501
- "popper-class": N.value,
2005
+ "popper-class": P.value,
1502
2006
  "popper-options": I.value,
1503
2007
  onShow: o[1] ||= (e) => G(!0),
1504
2008
  onHide: o[2] ||= (e) => G(!1)
1505
2009
  }, {
1506
2010
  reference: O(() => [a("button", {
1507
2011
  ref_key: "footerTriggerRef",
1508
- ref: te,
2012
+ ref: j,
1509
2013
  type: "button",
1510
- class: m(["ml-ribbon-group__footer-trigger", { "is-open": R.value }]),
2014
+ class: m(["ml-ribbon-group__footer-trigger", { "is-open": V.value }]),
1511
2015
  "aria-label": e.overflowTriggerAriaLabel,
1512
- "aria-expanded": R.value,
2016
+ "aria-expanded": V.value,
1513
2017
  disabled: x.value,
1514
2018
  onClick: pe
1515
- }, [c(E(F), null, {
1516
- default: O(() => [(v(), n(C(R.value ? E(H) : E(B))))]),
2019
+ }, [c(E(L), null, {
2020
+ default: O(() => [(v(), n(C(V.value ? E(se) : E(U))))]),
1517
2021
  _: 1
1518
- })], 10, lt)]),
1519
- default: O(() => [a("div", ut, [c(it, {
1520
- group: ce.value,
2022
+ })], 10, Wt)]),
2023
+ default: O(() => [a("div", Gt, [c(zt, {
2024
+ group: oe.value,
1521
2025
  "gallery-preview-fallback": e.galleryPreviewFallback,
1522
2026
  disabled: x.value,
1523
2027
  onItemClick: o[0] ||= (e) => l("item-click", e)
@@ -1532,31 +2036,31 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1532
2036
  "popper-class",
1533
2037
  "popper-options"
1534
2038
  ])) : r("", !0),
1535
- L.value && V.value ? (v(), n(E(ae), {
2039
+ R.value && ie.value ? (v(), n(E(z), {
1536
2040
  key: 2,
1537
2041
  trigger: "click",
1538
2042
  placement: "bottom-start",
1539
2043
  disabled: x.value,
1540
- "popper-class": N.value,
1541
- "popper-options": P.value,
2044
+ "popper-class": P.value,
2045
+ "popper-options": F.value,
1542
2046
  onShow: o[4] ||= (e) => K(!0),
1543
2047
  onHide: o[5] ||= (e) => K(!1)
1544
2048
  }, {
1545
2049
  reference: O(() => [a("button", {
1546
2050
  ref_key: "overflowTriggerRef",
1547
- ref: A,
2051
+ ref: ee,
1548
2052
  type: "button",
1549
- class: m(["ml-ribbon-group__overflow-trigger", { "is-open": z.value }]),
2053
+ class: m(["ml-ribbon-group__overflow-trigger", { "is-open": H.value }]),
1550
2054
  "aria-label": e.overflowTriggerAriaLabel,
1551
- "aria-expanded": z.value,
2055
+ "aria-expanded": H.value,
1552
2056
  disabled: x.value,
1553
2057
  onClick: me
1554
- }, [c(E(F), null, {
1555
- default: O(() => [(v(), n(C(z.value ? E(H) : E(B))))]),
2058
+ }, [c(E(L), null, {
2059
+ default: O(() => [(v(), n(C(H.value ? E(se) : E(U))))]),
1556
2060
  _: 1
1557
- })], 10, dt)]),
1558
- default: O(() => [a("div", ft, [c(it, {
1559
- group: V.value,
2061
+ })], 10, Kt)]),
2062
+ default: O(() => [a("div", qt, [c(zt, {
2063
+ group: ie.value,
1560
2064
  "gallery-preview-fallback": e.galleryPreviewFallback,
1561
2065
  disabled: x.value,
1562
2066
  onItemClick: o[3] ||= (e) => l("item-click", e)
@@ -1571,30 +2075,30 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1571
2075
  "popper-class",
1572
2076
  "popper-options"
1573
2077
  ])) : r("", !0),
1574
- e.showLauncherIcon ?? e.launcher ? (v(), n(E(ee), {
2078
+ e.showLauncherIcon ?? e.launcher ? (v(), n(E(A), {
1575
2079
  key: 3,
1576
2080
  link: "",
1577
2081
  class: "ml-ribbon-group__launcher",
1578
2082
  disabled: x.value
1579
2083
  }, {
1580
- default: O(() => [c(E(F), null, {
1581
- default: O(() => [c(E(de))]),
2084
+ default: O(() => [c(E(L), null, {
2085
+ default: O(() => [c(E(W))]),
1582
2086
  _: 1
1583
2087
  })]),
1584
2088
  _: 1
1585
2089
  }, 8, ["disabled"])) : r("", !0)
1586
- ])], 14, at));
2090
+ ])], 14, Bt));
1587
2091
  }
1588
- }), mt = ["inert", "aria-disabled"], ht = { class: "ml-ribbon__head-left" }, gt = { class: "ml-ribbon__head-right" }, _t = {
2092
+ }), Yt = ["inert", "aria-disabled"], Xt = { class: "ml-ribbon__head-left" }, Zt = { class: "ml-ribbon__head-right" }, Qt = {
1589
2093
  key: 2,
1590
2094
  class: "ml-ribbon__tabs-extra"
1591
- }, vt = ["data-active-tab"], yt = {
2095
+ }, $t = ["data-active-tab"], en = {
1592
2096
  key: 0,
1593
2097
  class: "ml-ribbon-group ml-ribbon-group--overflow"
1594
- }, bt = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, xt = ["aria-label", "disabled"], St = { class: "ml-ribbon-overflow-list" }, Ct = { class: "ml-ribbon-overflow-group__header" }, wt = ["data-active-tab"], Tt = ["disabled"], Et = { class: "ml-ribbon-simplified-group__panel" }, Dt = ["data-active-tab"], Ot = {
2098
+ }, tn = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, nn = ["aria-label", "disabled"], rn = { class: "ml-ribbon-overflow-list" }, an = { class: "ml-ribbon-overflow-group__header" }, on = ["data-active-tab"], sn = ["disabled"], cn = { class: "ml-ribbon-simplified-group__panel" }, ln = ["data-active-tab"], un = {
1595
2099
  key: 0,
1596
2100
  class: "ml-ribbon-group ml-ribbon-group--overflow"
1597
- }, kt = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, At = ["aria-label", "disabled"], jt = { class: "ml-ribbon-overflow-list" }, Mt = { class: "ml-ribbon-overflow-group__header" }, Nt = ["data-active-tab"], Pt = ["disabled"], Ft = { class: "ml-ribbon-simplified-group__panel" }, It = 40, Lt = /* @__PURE__ */ l({
2101
+ }, dn = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, fn = ["aria-label", "disabled"], pn = { class: "ml-ribbon-overflow-list" }, mn = { class: "ml-ribbon-overflow-group__header" }, hn = ["data-active-tab"], gn = ["disabled"], _n = { class: "ml-ribbon-simplified-group__panel" }, vn = 40, yn = /* @__PURE__ */ l({
1598
2102
  __name: "Ribbon",
1599
2103
  props: {
1600
2104
  id: { default: "ml-ribbon-root" },
@@ -1663,36 +2167,52 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1663
2167
  ...t,
1664
2168
  icon: f(t.icon)
1665
2169
  } : t;
2170
+ })), Array.isArray(t.categories) && (t.categories = t.categories.map((e) => {
2171
+ if (!e || typeof e != "object") return e;
2172
+ let t = e;
2173
+ return {
2174
+ ...t,
2175
+ items: Array.isArray(t.items) ? t.items.map((e) => {
2176
+ if (!e || typeof e != "object") return e;
2177
+ let t = e;
2178
+ return {
2179
+ ...t,
2180
+ preview: f(t.preview),
2181
+ icon: f(t.icon),
2182
+ component: f(t.component)
2183
+ };
2184
+ }) : t.items
2185
+ };
1666
2186
  })), t;
1667
2187
  }
1668
- function A(e) {
2188
+ function ee(e) {
1669
2189
  return {
1670
2190
  ...e,
1671
2191
  icon: f(e.icon),
1672
2192
  props: k(e.props)
1673
2193
  };
1674
2194
  }
1675
- function te(e) {
2195
+ function j(e) {
1676
2196
  return {
1677
2197
  ...e,
1678
2198
  icon: f(e.icon),
1679
- footerMenuItems: e.footerMenuItems?.map(A),
2199
+ footerMenuItems: e.footerMenuItems?.map(ee),
1680
2200
  collections: e.collections?.map((e) => ({
1681
2201
  ...e,
1682
- items: e.items?.map(A)
2202
+ items: e.items?.map(ee)
1683
2203
  }))
1684
2204
  };
1685
2205
  }
1686
- function ne(e) {
2206
+ function te(e) {
1687
2207
  return e.map((e) => ({
1688
2208
  ...e,
1689
- groups: e.groups?.map(te)
2209
+ groups: e.groups?.map(j)
1690
2210
  }));
1691
2211
  }
1692
- function j(e, t) {
2212
+ function M(e, t) {
1693
2213
  return typeof e != "number" || Number.isNaN(e) || !Number.isFinite(e) ? t : Math.max(0, Math.round(e));
1694
2214
  }
1695
- let M = {
2215
+ let N = {
1696
2216
  layoutSwitcherTooltip: "Switch ribbon layout",
1697
2217
  minimizeTooltip: "Minimize ribbon",
1698
2218
  keyTipsToggleText: "Key Tips",
@@ -1707,69 +2227,69 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1707
2227
  keyTipsEmptySequence: "No key sequence",
1708
2228
  contextualTabDefaultTitle: "Contextual",
1709
2229
  galleryPreviewFallback: "Preview unavailable"
1710
- }, N = s, P = u, { context: I, visibleTabs: ie } = he(N.id, N.tabs, N.disabled, N.activeLayout ? String(N.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : N.layout, N.minimized, N.activeTab || N.tabs[0]?.id || "", j(N.tooltipShowAfter, 1e3), j(N.tooltipHideAfter, 0));
1711
- y(fe, I), D(() => N.tabs, (e) => {
1712
- I.tabs.value = ne(e), I.tabs.value.some((e) => e.id === I.activeTab.value) || (I.activeTab.value = I.tabs.value[0]?.id || "");
1713
- }, { deep: !0 }), D(() => N.layout, (e) => {
2230
+ }, P = s, F = u, { context: I, visibleTabs: re } = ve(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));
2231
+ y(fe, I), D(() => P.tabs, (e) => {
2232
+ I.tabs.value = te(e), I.tabs.value.some((e) => e.id === I.activeTab.value) || (I.activeTab.value = I.tabs.value[0]?.id || "");
2233
+ }, { deep: !0 }), D(() => P.layout, (e) => {
1714
2234
  e !== I.layout.value && (I.layout.value = e);
1715
- }), D(() => N.activeLayout, (e) => {
2235
+ }), D(() => P.activeLayout, (e) => {
1716
2236
  if (!e) return;
1717
2237
  let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
1718
2238
  t !== I.layout.value && (I.layout.value = t);
1719
- }), D(() => N.minimized, (e) => {
2239
+ }), D(() => P.minimized, (e) => {
1720
2240
  e !== I.minimized.value && (I.minimized.value = e);
1721
- }), D(() => N.disabled, (e) => {
2241
+ }), D(() => P.disabled, (e) => {
1722
2242
  e !== I.disabled.value && (I.disabled.value = e);
1723
- }), D(() => N.activeTab, (e) => {
2243
+ }), D(() => P.activeTab, (e) => {
1724
2244
  e && e !== I.activeTab.value && (I.activeTab.value = e);
1725
- }), D(() => N.tooltipShowAfter, (e) => {
1726
- let t = j(e, 1e3);
2245
+ }), D(() => P.tooltipShowAfter, (e) => {
2246
+ let t = M(e, 1e3);
1727
2247
  t !== I.tooltipShowAfter.value && (I.tooltipShowAfter.value = t);
1728
- }), D(() => N.tooltipHideAfter, (e) => {
1729
- let t = j(e, 0);
2248
+ }), D(() => P.tooltipHideAfter, (e) => {
2249
+ let t = M(e, 0);
1730
2250
  t !== I.tooltipHideAfter.value && (I.tooltipHideAfter.value = t);
1731
2251
  }), D(I.activeTab, (e) => {
1732
- P("update:activeTab", e), P("tabChange", e);
2252
+ F("update:activeTab", e), F("tabChange", e);
1733
2253
  }), D(I.layout, (e) => {
1734
- P("update:layout", e), P("layoutChange", e);
2254
+ F("update:layout", e), F("layoutChange", e);
1735
2255
  }), D(I.minimized, (e) => {
1736
- P("update:minimized", e);
2256
+ F("update:minimized", e);
1737
2257
  }), D(I.overflowOpen, (e) => {
1738
- P(e ? "overflowOpen" : "overflowClose");
2258
+ F(e ? "overflowOpen" : "overflowClose");
1739
2259
  }), D(I.backdropOpen, (e) => {
1740
- P(e ? "backstageOpen" : "backstageClose");
2260
+ F(e ? "backstageOpen" : "backstageClose");
1741
2261
  });
1742
- let L = t(() => ie.value.find((e) => e.id === I.activeTab.value)), oe = t(() => new Set(ie.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), B = t(() => Re(L.value)), H = t(() => L.value?.groups?.filter((e) => e.visible !== !1) ?? []), de = b(null), U = b(null), W = b(null), G = b(null), K = b(!1), pe = b(0), me = b({
2262
+ let R = t(() => re.value.find((e) => e.id === I.activeTab.value)), B = t(() => new Set(re.value.filter((e) => e.contextual && e.contextualMode === "exclusive").map((e) => e.id))), V = t(() => Le(R.value)), U = t(() => R.value?.groups?.filter((e) => e.visible !== !1) ?? []), se = b(null), le = b(null), W = b(null), G = b(null), K = b(!1), pe = b(0), me = b({
1743
2263
  left: "0px",
1744
2264
  top: "0px",
1745
2265
  width: "1px",
1746
2266
  height: "0px"
1747
- }), q = b(/* @__PURE__ */ new Set()), J = b({}), ge = se("size", ""), _e = t(() => N.size || ge.value || "default"), ve = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${_e.value}`), ye = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${_e.value}`), be = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${_e.value}`), X = t(() => ({
1748
- layoutSwitcherTooltip: N.texts.layoutSwitcherTooltip || M.layoutSwitcherTooltip,
1749
- minimizeTooltip: N.texts.minimizeTooltip || M.minimizeTooltip,
1750
- keyTipsToggleText: N.texts.keyTipsToggleText || M.keyTipsToggleText,
1751
- overflowTriggerAriaLabel: N.texts.overflowTriggerAriaLabel || M.overflowTriggerAriaLabel,
1752
- groupOverflowTriggerAriaLabel: N.texts.groupOverflowTriggerAriaLabel || M.groupOverflowTriggerAriaLabel,
1753
- fileMenuLabel: N.texts.fileMenuLabel || M.fileMenuLabel,
1754
- fileMenuOpenBackstageLabel: N.texts.fileMenuOpenBackstageLabel || M.fileMenuOpenBackstageLabel,
1755
- backstageBackLabel: N.texts.backstageBackLabel || M.backstageBackLabel,
1756
- backstageTitle: N.texts.backstageTitle || M.backstageTitle,
1757
- backstageDescription: N.texts.backstageDescription || M.backstageDescription,
1758
- keyTipsSequencePrefix: N.texts.keyTipsSequencePrefix || M.keyTipsSequencePrefix,
1759
- keyTipsEmptySequence: N.texts.keyTipsEmptySequence || M.keyTipsEmptySequence,
1760
- contextualTabDefaultTitle: N.texts.contextualTabDefaultTitle || M.contextualTabDefaultTitle,
1761
- galleryPreviewFallback: N.texts.galleryPreviewFallback || M.galleryPreviewFallback
1762
- })), xe = t(() => j(N.tooltipShowAfter, 1e3)), Se = t(() => j(N.tooltipHideAfter, 0)), Ce = t(() => I.minimized.value ? ce : V), we = t(() => H.value.filter((e) => !q.value.has(e.id))), Ee = t(() => H.value.filter((e) => q.value.has(e.id))), Oe = t(() => {
1763
- if (!Ee.value.length) return 220;
1764
- let e = Ee.value.reduce((e, t) => {
1765
- let n = J.value[t.id] ?? je(t);
2267
+ }), q = b(/* @__PURE__ */ new Set()), he = b({}), ge = ae("size", ""), _e = t(() => P.size || ge.value || "default"), ye = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${_e.value}`), J = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${_e.value}`), be = t(() => `ml-ribbon-tab-panel-popover ml-ribbon-tab-panel-popover--size-${_e.value}`), Y = t(() => ({
2268
+ layoutSwitcherTooltip: P.texts.layoutSwitcherTooltip || N.layoutSwitcherTooltip,
2269
+ minimizeTooltip: P.texts.minimizeTooltip || N.minimizeTooltip,
2270
+ keyTipsToggleText: P.texts.keyTipsToggleText || N.keyTipsToggleText,
2271
+ overflowTriggerAriaLabel: P.texts.overflowTriggerAriaLabel || N.overflowTriggerAriaLabel,
2272
+ groupOverflowTriggerAriaLabel: P.texts.groupOverflowTriggerAriaLabel || N.groupOverflowTriggerAriaLabel,
2273
+ fileMenuLabel: P.texts.fileMenuLabel || N.fileMenuLabel,
2274
+ fileMenuOpenBackstageLabel: P.texts.fileMenuOpenBackstageLabel || N.fileMenuOpenBackstageLabel,
2275
+ backstageBackLabel: P.texts.backstageBackLabel || N.backstageBackLabel,
2276
+ backstageTitle: P.texts.backstageTitle || N.backstageTitle,
2277
+ backstageDescription: P.texts.backstageDescription || N.backstageDescription,
2278
+ keyTipsSequencePrefix: P.texts.keyTipsSequencePrefix || N.keyTipsSequencePrefix,
2279
+ keyTipsEmptySequence: P.texts.keyTipsEmptySequence || N.keyTipsEmptySequence,
2280
+ contextualTabDefaultTitle: P.texts.contextualTabDefaultTitle || N.contextualTabDefaultTitle,
2281
+ galleryPreviewFallback: P.texts.galleryPreviewFallback || N.galleryPreviewFallback
2282
+ })), Z = t(() => M(P.tooltipShowAfter, 1e3)), xe = t(() => M(P.tooltipHideAfter, 0)), Se = t(() => I.minimized.value ? ce : oe), Ce = t(() => U.value.filter((e) => !q.value.has(e.id))), Q = t(() => U.value.filter((e) => q.value.has(e.id))), we = t(() => {
2283
+ if (!Q.value.length) return 220;
2284
+ let e = Q.value.reduce((e, t) => {
2285
+ let n = he.value[t.id] ?? ke(t);
1766
2286
  return Math.max(e, n);
1767
2287
  }, 0), t = Math.ceil(e + 40);
1768
2288
  return Math.max(220, Math.min(720, t));
1769
2289
  });
1770
- function ke(e) {
2290
+ function Ee(e) {
1771
2291
  let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
1772
- ...A(e),
2292
+ ...ee(e),
1773
2293
  size: "medium"
1774
2294
  })));
1775
2295
  return {
@@ -1782,13 +2302,13 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1782
2302
  }]
1783
2303
  };
1784
2304
  }
1785
- function Ae(e) {
2305
+ function Oe(e) {
1786
2306
  return e.priority ?? 100;
1787
2307
  }
1788
- function je(e) {
2308
+ function ke(e) {
1789
2309
  return typeof e.width == "number" && Number.isFinite(e.width) && e.width > 0 ? e.width : 140;
1790
2310
  }
1791
- function Me(e) {
2311
+ function Ae(e) {
1792
2312
  let t = {};
1793
2313
  return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
1794
2314
  let n = e.dataset.groupId;
@@ -1797,109 +2317,109 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1797
2317
  r > 0 && (t[n] = r);
1798
2318
  }), t;
1799
2319
  }
1800
- function Ne() {
1801
- let e = H.value.reduce((e, t) => {
1802
- let n = J.value[t.id] ?? je(t);
1803
- return e + Math.max(n, je(t));
2320
+ function je() {
2321
+ let e = U.value.reduce((e, t) => {
2322
+ let n = he.value[t.id] ?? ke(t);
2323
+ return e + Math.max(n, ke(t));
1804
2324
  }, 0);
1805
2325
  return Math.max(220, e);
1806
2326
  }
1807
- function Pe(e) {
2327
+ function Me(e) {
1808
2328
  let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
1809
- return Number.isFinite(t) && t > 0 ? t : It;
2329
+ return Number.isFinite(t) && t > 0 ? t : vn;
1810
2330
  }
1811
- function Fe() {
2331
+ function Ne() {
1812
2332
  if (I.layout.value !== "classic") {
1813
2333
  q.value = /* @__PURE__ */ new Set();
1814
2334
  return;
1815
2335
  }
1816
2336
  let e = I.minimized.value ? G.value : W.value;
1817
2337
  if (!e) return;
1818
- let t = H.value;
2338
+ let t = U.value;
1819
2339
  if (!t.length) {
1820
2340
  q.value = /* @__PURE__ */ new Set();
1821
2341
  return;
1822
2342
  }
1823
- let n = Math.round(e.getBoundingClientRect().width), r = Pe(e), i = Me(e);
1824
- J.value = {
1825
- ...J.value,
2343
+ let n = Math.round(e.getBoundingClientRect().width), r = Me(e), i = Ae(e);
2344
+ he.value = {
2345
+ ...he.value,
1826
2346
  ...i
1827
2347
  };
1828
2348
  let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
1829
2349
  group: e,
1830
2350
  index: t
1831
2351
  })), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
1832
- let n = Ae(t.group) - Ae(e.group);
2352
+ let n = Oe(t.group) - Oe(e.group);
1833
2353
  return n === 0 ? t.index - e.index : n;
1834
- }), l = (e) => i[e.id] ?? je(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;
2354
+ }), 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;
1835
2355
  for (; f(s) > n && p < c.length;) {
1836
2356
  let e = c[p].group;
1837
2357
  s.add(e.id), p += 1;
1838
2358
  }
1839
2359
  q.value = s;
1840
2360
  }
1841
- function Ie() {
2361
+ function Pe() {
1842
2362
  p(() => {
1843
2363
  if (I.layout.value !== "classic" || I.minimized.value) {
1844
- Fe();
2364
+ Ne();
1845
2365
  return;
1846
2366
  }
1847
2367
  if (q.value.size === 0) {
1848
- Fe();
2368
+ Ne();
1849
2369
  return;
1850
2370
  }
1851
2371
  q.value = /* @__PURE__ */ new Set(), p(() => {
1852
- Fe();
2372
+ Ne();
1853
2373
  });
1854
2374
  });
1855
2375
  }
1856
- function Le() {
1857
- let e = de.value, t = U.value;
2376
+ function Fe() {
2377
+ let e = se.value, t = le.value;
1858
2378
  if (!e || !t) return;
1859
2379
  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);
1860
- pe.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? Ne() : Math.max(360, H.value.length * 120)), me.value = {
2380
+ pe.value = Math.round(a > 0 ? a : I.layout.value === "classic" ? je() : Math.max(360, U.value.length * 120)), me.value = {
1861
2381
  left: `${Math.round(n.left - r.left + i)}px`,
1862
2382
  top: "0px",
1863
2383
  width: "1px",
1864
2384
  height: `${Math.round(r.height)}px`
1865
2385
  };
1866
2386
  }
1867
- function Z() {
2387
+ function Ie() {
1868
2388
  K.value = !1;
1869
2389
  }
1870
- function Re(e) {
1871
- return I.disabled.value ? !0 : !e || oe.value.size === 0 ? !1 : !oe.value.has(e.id);
2390
+ function Le(e) {
2391
+ return I.disabled.value ? !0 : !e || B.value.size === 0 ? !1 : !B.value.has(e.id);
1872
2392
  }
1873
- function ze(e) {
2393
+ function Re(e) {
1874
2394
  if (I.disabled.value) return;
1875
2395
  let t = I.activeTab.value === e.id;
1876
2396
  if (I.activeTab.value = e.id, !I.minimized.value) {
1877
- Z();
2397
+ Ie();
1878
2398
  return;
1879
2399
  }
1880
- Le(), K.value = t ? !K.value : !0;
2400
+ Fe(), K.value = t ? !K.value : !0;
1881
2401
  }
1882
- function Be() {
2402
+ function ze() {
1883
2403
  I.disabled.value || I.api.toggleSimplified();
1884
2404
  }
1885
- function Ve() {
1886
- I.disabled.value || (I.minimized.value || Z(), I.minimized.value = !I.minimized.value);
2405
+ function Be() {
2406
+ I.disabled.value || (I.minimized.value || Ie(), I.minimized.value = !I.minimized.value);
2407
+ }
2408
+ function Ve(e) {
2409
+ I.disabled.value || (Ie(), F("fileMenuSelect", e));
1887
2410
  }
1888
- function He(e) {
1889
- I.disabled.value || (Z(), P("fileMenuSelect", e));
2411
+ function He() {
2412
+ I.disabled.value || (Ie(), I.backdropOpen.value = !0);
1890
2413
  }
1891
2414
  function Ue() {
1892
- I.disabled.value || (Z(), I.backdropOpen.value = !0);
1893
- }
1894
- function We() {
1895
2415
  I.disabled.value || (I.backdropOpen.value = !1);
1896
2416
  }
1897
- function Q(e, t) {
1898
- B.value || (P("itemClick", {
2417
+ function We(e, t) {
2418
+ V.value || (F("itemClick", {
1899
2419
  tabId: I.activeTab.value,
1900
2420
  groupId: e,
1901
2421
  itemId: t
1902
- }), I.minimized.value && Z());
2422
+ }), I.minimized.value && Ie());
1903
2423
  }
1904
2424
  function Ge(e) {
1905
2425
  if (!(e instanceof HTMLElement)) return !1;
@@ -1908,11 +2428,11 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1908
2428
  return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
1909
2429
  }
1910
2430
  function Ke() {
1911
- if (B.value) {
2431
+ if (V.value) {
1912
2432
  I.keyTips.value = [];
1913
2433
  return;
1914
2434
  }
1915
- let e = L.value;
2435
+ let e = R.value;
1916
2436
  if (!e?.groups?.length) {
1917
2437
  I.keyTips.value = [];
1918
2438
  return;
@@ -1931,12 +2451,12 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1931
2451
  }
1932
2452
  function qe(e) {
1933
2453
  if (I.disabled.value) return;
1934
- let t = L.value;
2454
+ let t = R.value;
1935
2455
  if (t?.groups?.length) {
1936
2456
  for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
1937
2457
  let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
1938
2458
  if (r) {
1939
- Q(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
2459
+ We(n.id, r.id), I.keyTipsOpen.value = !1, I.keyTipsSequence.value = "";
1940
2460
  return;
1941
2461
  }
1942
2462
  }
@@ -1975,19 +2495,19 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1975
2495
  }
1976
2496
  }
1977
2497
  function Xe(e) {
1978
- return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? le : null;
2498
+ return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? ue : null;
1979
2499
  }
1980
2500
  function Ze(e) {
1981
2501
  K.value = e;
1982
2502
  }
1983
2503
  D([
1984
- H,
2504
+ U,
1985
2505
  () => I.layout.value,
1986
2506
  () => I.minimized.value
1987
2507
  ], () => {
1988
- Ie();
2508
+ Pe();
1989
2509
  }), D([
1990
- L,
2510
+ R,
1991
2511
  () => I.tabs.value,
1992
2512
  () => I.disabled.value
1993
2513
  ], () => {
@@ -1998,35 +2518,35 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
1998
2518
  }), D(() => I.keyTipsOpen.value, (e) => {
1999
2519
  e || Je();
2000
2520
  }), D(() => I.disabled.value, (e) => {
2001
- e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Z(), Je());
2521
+ e && (I.overflowOpen.value = !1, I.backdropOpen.value = !1, I.keyTipsOpen.value = !1, Ie(), Je());
2002
2522
  }), D([
2003
2523
  () => I.minimized.value,
2004
2524
  () => I.layout.value,
2005
- L
2525
+ R
2006
2526
  ], ([e, , t]) => {
2007
- (!e || !t) && Z();
2527
+ (!e || !t) && Ie();
2008
2528
  }), D([W, G], ([e, t], [n, r]) => {
2009
- n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Ie();
2529
+ n && $ && $.unobserve(n), r && $ && $.unobserve(r), e && $ && $.observe(e), t && $ && $.observe(t), (e || t) && Pe();
2010
2530
  }, { flush: "post" }), D(K, (e) => {
2011
2531
  e && p(() => {
2012
- Le(), Ie();
2532
+ Fe(), Pe();
2013
2533
  });
2014
2534
  });
2015
2535
  let $ = null;
2016
2536
  g(() => {
2017
2537
  window.addEventListener("keydown", Ye), window.addEventListener("resize", Qe), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
2018
- Le(), Ie();
2019
- }), W.value && $.observe(W.value), G.value && $.observe(G.value)), Le(), Ie();
2538
+ Fe(), Pe();
2539
+ }), W.value && $.observe(W.value), G.value && $.observe(G.value)), Fe(), Pe();
2020
2540
  }), _(() => {
2021
2541
  window.removeEventListener("keydown", Ye), window.removeEventListener("resize", Qe), $?.disconnect();
2022
2542
  });
2023
2543
  function Qe() {
2024
- K.value && Le();
2544
+ K.value && Fe();
2025
2545
  }
2026
- return l(I.api), (t, l) => (v(), n(E(re), { size: N.size }, {
2546
+ return l(I.api), (t, l) => (v(), n(E(ne), { size: P.size }, {
2027
2547
  default: O(() => [(v(), i("section", {
2028
2548
  ref_key: "ribbonRootRef",
2029
- ref: de,
2549
+ ref: se,
2030
2550
  key: E(I).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
2031
2551
  class: m(["ml-ribbon", [
2032
2552
  `ml-ribbon--${E(I).layout.value}`,
@@ -2042,19 +2562,19 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2042
2562
  }, [
2043
2563
  a("header", {
2044
2564
  ref_key: "ribbonHeaderRef",
2045
- ref: U,
2565
+ ref: le,
2046
2566
  class: "ml-ribbon__header"
2047
2567
  }, [
2048
- a("div", ht, [
2568
+ a("div", Xt, [
2049
2569
  s.showFileMenu ? (v(), n(De, {
2050
2570
  key: 0,
2051
2571
  items: s.fileMenuItems,
2052
2572
  disabled: E(I).disabled.value,
2053
- label: X.value.fileMenuLabel,
2054
- "open-backstage-label": X.value.fileMenuOpenBackstageLabel,
2573
+ label: Y.value.fileMenuLabel,
2574
+ "open-backstage-label": Y.value.fileMenuOpenBackstageLabel,
2055
2575
  "show-open-backstage": s.showOpenBackstage,
2056
- onSelect: He,
2057
- onOpenBackstage: Ue
2576
+ onSelect: Ve,
2577
+ onOpenBackstage: He
2058
2578
  }, null, 8, [
2059
2579
  "items",
2060
2580
  "disabled",
@@ -2063,32 +2583,32 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2063
2583
  "show-open-backstage"
2064
2584
  ])) : r("", !0),
2065
2585
  c(Te, {
2066
- tabs: E(ie),
2586
+ tabs: E(re),
2067
2587
  "active-tab": E(I).activeTab.value,
2068
2588
  disabled: E(I).disabled.value,
2069
- "default-contextual-title": X.value.contextualTabDefaultTitle,
2070
- onSelect: ze
2589
+ "default-contextual-title": Y.value.contextualTabDefaultTitle,
2590
+ onSelect: Re
2071
2591
  }, null, 8, [
2072
2592
  "tabs",
2073
2593
  "active-tab",
2074
2594
  "disabled",
2075
2595
  "default-contextual-title"
2076
2596
  ]),
2077
- N.hideMinimizeButton ? r("", !0) : (v(), n(E(z), {
2597
+ P.hideMinimizeButton ? r("", !0) : (v(), n(E(ie), {
2078
2598
  key: 1,
2079
- content: X.value.minimizeTooltip,
2080
- "show-after": xe.value,
2081
- "hide-after": Se.value
2599
+ content: Y.value.minimizeTooltip,
2600
+ "show-after": Z.value,
2601
+ "hide-after": xe.value
2082
2602
  }, {
2083
- default: O(() => [c(E(ee), {
2603
+ default: O(() => [c(E(A), {
2084
2604
  class: m([
2085
2605
  "ml-ribbon__control",
2086
2606
  "ml-ribbon__control--minimize",
2087
2607
  E(I).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
2088
2608
  ]),
2089
- icon: Ce.value,
2609
+ icon: Se.value,
2090
2610
  disabled: E(I).disabled.value,
2091
- onClick: Ve
2611
+ onClick: Be
2092
2612
  }, null, 8, [
2093
2613
  "class",
2094
2614
  "icon",
@@ -2101,19 +2621,19 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2101
2621
  "hide-after"
2102
2622
  ]))
2103
2623
  ]),
2104
- a("div", gt, [
2105
- N.hideLayoutSwitcher ? r("", !0) : (v(), n(E(z), {
2624
+ a("div", Zt, [
2625
+ P.hideLayoutSwitcher ? r("", !0) : (v(), n(E(ie), {
2106
2626
  key: 0,
2107
- content: X.value.layoutSwitcherTooltip,
2108
- "show-after": xe.value,
2109
- "hide-after": Se.value
2627
+ content: Y.value.layoutSwitcherTooltip,
2628
+ "show-after": Z.value,
2629
+ "hide-after": xe.value
2110
2630
  }, {
2111
- default: O(() => [c(E(ee), {
2631
+ default: O(() => [c(E(A), {
2112
2632
  circle: "",
2113
2633
  class: "ml-ribbon__control ml-ribbon__control--layout",
2114
- icon: E(ue),
2634
+ icon: E(de),
2115
2635
  disabled: E(I).disabled.value,
2116
- onClick: Be
2636
+ onClick: ze
2117
2637
  }, null, 8, ["icon", "disabled"])]),
2118
2638
  _: 1
2119
2639
  }, 8, [
@@ -2121,12 +2641,12 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2121
2641
  "show-after",
2122
2642
  "hide-after"
2123
2643
  ])),
2124
- N.hideKeyTipsToggle ? r("", !0) : (v(), n(E(R), {
2644
+ P.hideKeyTipsToggle ? r("", !0) : (v(), n(E(H), {
2125
2645
  key: 1,
2126
2646
  "inline-prompt": "",
2127
2647
  class: "ml-ribbon__control ml-ribbon__control--keytips",
2128
- "active-text": X.value.keyTipsToggleText,
2129
- "inactive-text": X.value.keyTipsToggleText,
2648
+ "active-text": Y.value.keyTipsToggleText,
2649
+ "inactive-text": Y.value.keyTipsToggleText,
2130
2650
  "model-value": E(I).keyTipsOpen.value,
2131
2651
  disabled: E(I).disabled.value,
2132
2652
  onChange: l[0] ||= (e) => E(I).keyTipsOpen.value = !E(I).keyTipsOpen.value
@@ -2136,14 +2656,14 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2136
2656
  "model-value",
2137
2657
  "disabled"
2138
2658
  ])),
2139
- t.$slots["tabs-extra"] ? (v(), i("div", _t, [S(t.$slots, "tabs-extra", {
2659
+ t.$slots["tabs-extra"] ? (v(), i("div", Qt, [S(t.$slots, "tabs-extra", {
2140
2660
  activeTab: E(I).activeTab.value,
2141
2661
  layout: E(I).layout.value,
2142
2662
  minimized: E(I).minimized.value,
2143
2663
  disabled: E(I).disabled.value
2144
2664
  })])) : r("", !0)
2145
2665
  ]),
2146
- L.value ? (v(), n(E(ae), {
2666
+ R.value ? (v(), n(E(z), {
2147
2667
  key: 0,
2148
2668
  placement: "bottom-start",
2149
2669
  visible: K.value,
@@ -2164,8 +2684,8 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2164
2684
  ref_key: "minimizedClassicPanelRef",
2165
2685
  ref: G,
2166
2686
  class: "ml-ribbon__panel ml-ribbon__panel--floating",
2167
- "data-active-tab": L.value.id
2168
- }, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(pt, {
2687
+ "data-active-tab": R.value.id
2688
+ }, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), n(Jt, {
2169
2689
  id: e.id,
2170
2690
  key: e.id,
2171
2691
  "data-group-id": e.id,
@@ -2178,16 +2698,16 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2178
2698
  launcher: e.launcher,
2179
2699
  "show-launcher-icon": e.showLauncherIcon,
2180
2700
  "group-model": e,
2181
- "overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
2182
- "gallery-preview-fallback": X.value.galleryPreviewFallback,
2183
- disabled: B.value,
2184
- onItemClick: l[2] ||= (e) => Q(e.groupId, e.itemId)
2701
+ "overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
2702
+ "gallery-preview-fallback": Y.value.galleryPreviewFallback,
2703
+ disabled: V.value,
2704
+ onItemClick: l[2] ||= (e) => We(e.groupId, e.itemId)
2185
2705
  }, {
2186
- default: O(() => [c(it, {
2706
+ default: O(() => [c(zt, {
2187
2707
  group: e,
2188
- "gallery-preview-fallback": X.value.galleryPreviewFallback,
2189
- disabled: B.value,
2190
- onItemClick: l[1] ||= (e) => Q(e.groupId, e.itemId)
2708
+ "gallery-preview-fallback": Y.value.galleryPreviewFallback,
2709
+ disabled: V.value,
2710
+ onItemClick: l[1] ||= (e) => We(e.groupId, e.itemId)
2191
2711
  }, null, 8, [
2192
2712
  "group",
2193
2713
  "gallery-preview-fallback",
@@ -2209,30 +2729,30 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2209
2729
  "overflow-trigger-aria-label",
2210
2730
  "gallery-preview-fallback",
2211
2731
  "disabled"
2212
- ]))), 128)), Ee.value.length ? (v(), i("section", yt, [a("div", bt, [c(E(ae), {
2732
+ ]))), 128)), Q.value.length ? (v(), i("section", en, [a("div", tn, [c(E(z), {
2213
2733
  trigger: "click",
2214
2734
  placement: "bottom-end",
2215
- width: Oe.value,
2216
- disabled: B.value,
2735
+ width: we.value,
2736
+ disabled: V.value,
2217
2737
  "show-arrow": !1,
2218
- "popper-class": ye.value,
2738
+ "popper-class": J.value,
2219
2739
  onShow: l[4] ||= (e) => E(I).overflowOpen.value = !0,
2220
2740
  onHide: l[5] ||= (e) => E(I).overflowOpen.value = !1
2221
2741
  }, {
2222
2742
  reference: O(() => [a("button", {
2223
2743
  type: "button",
2224
2744
  class: "ml-ribbon-overflow-trigger",
2225
- "aria-label": X.value.overflowTriggerAriaLabel,
2226
- disabled: B.value
2227
- }, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, xt)]),
2228
- default: O(() => [a("div", St, [(v(!0), i(e, null, x(Ee.value, (e) => (v(), i("section", {
2745
+ "aria-label": Y.value.overflowTriggerAriaLabel,
2746
+ disabled: V.value
2747
+ }, [...l[13] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, nn)]),
2748
+ default: O(() => [a("div", rn, [(v(!0), i(e, null, x(Q.value, (e) => (v(), i("section", {
2229
2749
  key: e.id,
2230
2750
  class: "ml-ribbon-overflow-group"
2231
- }, [a("header", Ct, w(e.title), 1), c(it, {
2751
+ }, [a("header", an, w(e.title), 1), c(zt, {
2232
2752
  group: e,
2233
- "gallery-preview-fallback": X.value.galleryPreviewFallback,
2234
- disabled: B.value,
2235
- onItemClick: l[3] ||= (e) => Q(e.groupId, e.itemId)
2753
+ "gallery-preview-fallback": Y.value.galleryPreviewFallback,
2754
+ disabled: V.value,
2755
+ onItemClick: l[3] ||= (e) => We(e.groupId, e.itemId)
2236
2756
  }, null, 8, [
2237
2757
  "group",
2238
2758
  "gallery-preview-fallback",
@@ -2243,42 +2763,42 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2243
2763
  "width",
2244
2764
  "disabled",
2245
2765
  "popper-class"
2246
- ])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, vt)) : (v(), i("main", {
2766
+ ])]), l[14] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, $t)) : (v(), i("main", {
2247
2767
  key: 1,
2248
2768
  class: "ml-ribbon__panel ml-ribbon__panel--simplified ml-ribbon__panel--floating",
2249
- "data-active-tab": L.value.id
2250
- }, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(ae), {
2769
+ "data-active-tab": R.value.id
2770
+ }, [(v(!0), i(e, null, x(U.value, (e) => (v(), n(E(z), {
2251
2771
  key: e.id,
2252
2772
  trigger: "click",
2253
2773
  placement: "bottom-start",
2254
2774
  width: 340,
2255
- disabled: B.value,
2775
+ disabled: V.value,
2256
2776
  "show-arrow": !1,
2257
- "popper-class": ve.value
2777
+ "popper-class": ye.value
2258
2778
  }, {
2259
2779
  reference: O(() => [a("button", {
2260
2780
  class: "ml-ribbon-simplified-group",
2261
2781
  type: "button",
2262
- disabled: B.value
2263
- }, [Xe(e) ? (v(), n(E(F), {
2782
+ disabled: V.value
2783
+ }, [Xe(e) ? (v(), n(E(L), {
2264
2784
  key: 0,
2265
2785
  class: "ml-ribbon-simplified-group__icon"
2266
2786
  }, {
2267
2787
  default: O(() => [(v(), n(C(Xe(e))))]),
2268
2788
  _: 2
2269
- }, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, Tt)]),
2270
- default: O(() => [a("div", Et, [c(it, {
2271
- group: ke(e),
2272
- "gallery-preview-fallback": X.value.galleryPreviewFallback,
2273
- disabled: B.value,
2274
- onItemClick: l[6] ||= (e) => Q(e.groupId, e.itemId)
2789
+ }, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, sn)]),
2790
+ default: O(() => [a("div", cn, [c(zt, {
2791
+ group: Ee(e),
2792
+ "gallery-preview-fallback": Y.value.galleryPreviewFallback,
2793
+ disabled: V.value,
2794
+ onItemClick: l[6] ||= (e) => We(e.groupId, e.itemId)
2275
2795
  }, null, 8, [
2276
2796
  "group",
2277
2797
  "gallery-preview-fallback",
2278
2798
  "disabled"
2279
2799
  ])])]),
2280
2800
  _: 2
2281
- }, 1032, ["disabled", "popper-class"]))), 128))], 8, wt))]),
2801
+ }, 1032, ["disabled", "popper-class"]))), 128))], 8, on))]),
2282
2802
  _: 1
2283
2803
  }, 8, [
2284
2804
  "visible",
@@ -2287,13 +2807,13 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2287
2807
  "popper-class"
2288
2808
  ])) : r("", !0)
2289
2809
  ], 512),
2290
- !E(I).minimized.value && L.value && E(I).layout.value === "classic" ? (v(), i("main", {
2810
+ !E(I).minimized.value && R.value && E(I).layout.value === "classic" ? (v(), i("main", {
2291
2811
  key: 0,
2292
2812
  class: "ml-ribbon__panel",
2293
- "data-active-tab": L.value.id,
2813
+ "data-active-tab": R.value.id,
2294
2814
  ref_key: "classicPanelRef",
2295
2815
  ref: W
2296
- }, [(v(!0), i(e, null, x(we.value, (e) => (v(), n(pt, {
2816
+ }, [(v(!0), i(e, null, x(Ce.value, (e) => (v(), n(Jt, {
2297
2817
  id: e.id,
2298
2818
  key: e.id,
2299
2819
  "data-group-id": e.id,
@@ -2306,16 +2826,16 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2306
2826
  launcher: e.launcher,
2307
2827
  "show-launcher-icon": e.showLauncherIcon,
2308
2828
  "group-model": e,
2309
- "overflow-trigger-aria-label": X.value.groupOverflowTriggerAriaLabel,
2310
- "gallery-preview-fallback": X.value.galleryPreviewFallback,
2311
- disabled: B.value,
2312
- onItemClick: l[8] ||= (e) => Q(e.groupId, e.itemId)
2829
+ "overflow-trigger-aria-label": Y.value.groupOverflowTriggerAriaLabel,
2830
+ "gallery-preview-fallback": Y.value.galleryPreviewFallback,
2831
+ disabled: V.value,
2832
+ onItemClick: l[8] ||= (e) => We(e.groupId, e.itemId)
2313
2833
  }, {
2314
- default: O(() => [c(it, {
2834
+ default: O(() => [c(zt, {
2315
2835
  group: e,
2316
- "gallery-preview-fallback": X.value.galleryPreviewFallback,
2317
- disabled: B.value,
2318
- onItemClick: l[7] ||= (e) => Q(e.groupId, e.itemId)
2836
+ "gallery-preview-fallback": Y.value.galleryPreviewFallback,
2837
+ disabled: V.value,
2838
+ onItemClick: l[7] ||= (e) => We(e.groupId, e.itemId)
2319
2839
  }, null, 8, [
2320
2840
  "group",
2321
2841
  "gallery-preview-fallback",
@@ -2337,29 +2857,29 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2337
2857
  "overflow-trigger-aria-label",
2338
2858
  "gallery-preview-fallback",
2339
2859
  "disabled"
2340
- ]))), 128)), Ee.value.length ? (v(), i("section", Ot, [a("div", kt, [c(E(ae), {
2860
+ ]))), 128)), Q.value.length ? (v(), i("section", un, [a("div", dn, [c(E(z), {
2341
2861
  trigger: "click",
2342
2862
  placement: "bottom-end",
2343
- width: Oe.value,
2344
- disabled: B.value,
2345
- "popper-class": ye.value,
2863
+ width: we.value,
2864
+ disabled: V.value,
2865
+ "popper-class": J.value,
2346
2866
  onShow: l[10] ||= (e) => E(I).overflowOpen.value = !0,
2347
2867
  onHide: l[11] ||= (e) => E(I).overflowOpen.value = !1
2348
2868
  }, {
2349
2869
  reference: O(() => [a("button", {
2350
2870
  type: "button",
2351
2871
  class: "ml-ribbon-overflow-trigger",
2352
- "aria-label": X.value.overflowTriggerAriaLabel,
2353
- disabled: B.value
2354
- }, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, At)]),
2355
- default: O(() => [a("div", jt, [(v(!0), i(e, null, x(Ee.value, (e) => (v(), i("section", {
2872
+ "aria-label": Y.value.overflowTriggerAriaLabel,
2873
+ disabled: V.value
2874
+ }, [...l[15] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, fn)]),
2875
+ default: O(() => [a("div", pn, [(v(!0), i(e, null, x(Q.value, (e) => (v(), i("section", {
2356
2876
  key: e.id,
2357
2877
  class: "ml-ribbon-overflow-group"
2358
- }, [a("header", Mt, w(e.title), 1), c(it, {
2878
+ }, [a("header", mn, w(e.title), 1), c(zt, {
2359
2879
  group: e,
2360
- "gallery-preview-fallback": X.value.galleryPreviewFallback,
2361
- disabled: B.value,
2362
- onItemClick: l[9] ||= (e) => Q(e.groupId, e.itemId)
2880
+ "gallery-preview-fallback": Y.value.galleryPreviewFallback,
2881
+ disabled: V.value,
2882
+ onItemClick: l[9] ||= (e) => We(e.groupId, e.itemId)
2363
2883
  }, null, 8, [
2364
2884
  "group",
2365
2885
  "gallery-preview-fallback",
@@ -2370,58 +2890,58 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2370
2890
  "width",
2371
2891
  "disabled",
2372
2892
  "popper-class"
2373
- ])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, Dt)) : r("", !0),
2374
- !E(I).minimized.value && L.value && E(I).layout.value === "simplified" ? (v(), i("main", {
2893
+ ])]), l[16] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, ln)) : r("", !0),
2894
+ !E(I).minimized.value && R.value && E(I).layout.value === "simplified" ? (v(), i("main", {
2375
2895
  key: 1,
2376
2896
  class: "ml-ribbon__panel ml-ribbon__panel--simplified",
2377
- "data-active-tab": L.value.id
2378
- }, [(v(!0), i(e, null, x(H.value, (e) => (v(), n(E(ae), {
2897
+ "data-active-tab": R.value.id
2898
+ }, [(v(!0), i(e, null, x(U.value, (e) => (v(), n(E(z), {
2379
2899
  key: e.id,
2380
2900
  trigger: "click",
2381
2901
  placement: "bottom-start",
2382
2902
  width: 340,
2383
- disabled: B.value,
2384
- "popper-class": ve.value
2903
+ disabled: V.value,
2904
+ "popper-class": ye.value
2385
2905
  }, {
2386
2906
  reference: O(() => [a("button", {
2387
2907
  class: "ml-ribbon-simplified-group",
2388
2908
  type: "button",
2389
- disabled: B.value
2390
- }, [Xe(e) ? (v(), n(E(F), {
2909
+ disabled: V.value
2910
+ }, [Xe(e) ? (v(), n(E(L), {
2391
2911
  key: 0,
2392
2912
  class: "ml-ribbon-simplified-group__icon"
2393
2913
  }, {
2394
2914
  default: O(() => [(v(), n(C(Xe(e))))]),
2395
2915
  _: 2
2396
- }, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, Pt)]),
2397
- default: O(() => [a("div", Ft, [c(it, {
2398
- group: ke(e),
2399
- "gallery-preview-fallback": X.value.galleryPreviewFallback,
2400
- disabled: B.value,
2401
- onItemClick: l[12] ||= (e) => Q(e.groupId, e.itemId)
2916
+ }, 1024)) : r("", !0), a("span", null, w(e.title), 1)], 8, gn)]),
2917
+ default: O(() => [a("div", _n, [c(zt, {
2918
+ group: Ee(e),
2919
+ "gallery-preview-fallback": Y.value.galleryPreviewFallback,
2920
+ disabled: V.value,
2921
+ onItemClick: l[12] ||= (e) => We(e.groupId, e.itemId)
2402
2922
  }, null, 8, [
2403
2923
  "group",
2404
2924
  "gallery-preview-fallback",
2405
2925
  "disabled"
2406
2926
  ])])]),
2407
2927
  _: 2
2408
- }, 1032, ["disabled", "popper-class"]))), 128))], 8, Nt)) : r("", !0),
2409
- c(Y, {
2928
+ }, 1032, ["disabled", "popper-class"]))), 128))], 8, hn)) : r("", !0),
2929
+ c(X, {
2410
2930
  open: E(I).backdropOpen.value,
2411
2931
  size: _e.value,
2412
- "back-label": X.value.backstageBackLabel,
2413
- title: X.value.backstageTitle,
2414
- description: X.value.backstageDescription,
2415
- onClose: We
2932
+ "back-label": Y.value.backstageBackLabel,
2933
+ title: Y.value.backstageTitle,
2934
+ description: Y.value.backstageDescription,
2935
+ onClose: Ue
2416
2936
  }, o({ _: 2 }, [t.$slots.backstage ? {
2417
2937
  name: "default",
2418
2938
  fn: O(() => [S(t.$slots, "backstage", {
2419
- close: We,
2939
+ close: Ue,
2420
2940
  open: E(I).backdropOpen.value,
2421
2941
  size: _e.value,
2422
- backLabel: X.value.backstageBackLabel,
2423
- title: X.value.backstageTitle,
2424
- description: X.value.backstageDescription,
2942
+ backLabel: Y.value.backstageBackLabel,
2943
+ title: Y.value.backstageTitle,
2944
+ description: Y.value.backstageDescription,
2425
2945
  disabled: E(I).disabled.value
2426
2946
  })]),
2427
2947
  key: "0"
@@ -2432,14 +2952,14 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2432
2952
  "title",
2433
2953
  "description"
2434
2954
  ])
2435
- ], 10, mt))]),
2955
+ ], 10, Yt))]),
2436
2956
  _: 3
2437
2957
  }, 8, ["size"]));
2438
2958
  }
2439
- }), Rt = {
2959
+ }), bn = {
2440
2960
  class: "ml-ribbon-tab-definition",
2441
2961
  hidden: ""
2442
- }, zt = /* @__PURE__ */ l({
2962
+ }, xn = /* @__PURE__ */ l({
2443
2963
  __name: "RibbonTab",
2444
2964
  props: {
2445
2965
  id: {},
@@ -2450,13 +2970,13 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2450
2970
  contextualTitle: {}
2451
2971
  },
2452
2972
  setup(e) {
2453
- return (e, t) => (v(), i("div", Rt, [S(e.$slots, "default")]));
2973
+ return (e, t) => (v(), i("div", bn, [S(e.$slots, "default")]));
2454
2974
  }
2455
- }), Bt = {
2975
+ }), Sn = {
2456
2976
  key: 0,
2457
2977
  class: "ml-ribbon-keytips",
2458
2978
  "aria-live": "polite"
2459
- }, Vt = { class: "ml-ribbon-keytips__hint" }, Ht = /* @__PURE__ */ l({
2979
+ }, Cn = { class: "ml-ribbon-keytips__hint" }, wn = /* @__PURE__ */ l({
2460
2980
  __name: "RibbonKeyTips",
2461
2981
  props: {
2462
2982
  open: { type: Boolean },
@@ -2491,11 +3011,11 @@ var ge = { class: "ml-ribbon-backstage__nav" }, _e = { class: "ml-ribbon-backsta
2491
3011
  }
2492
3012
  return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), D(() => s.open, (e) => {
2493
3013
  e || y();
2494
- }), (t, o) => n.open ? (v(), i("div", Bt, [a("div", Vt, w(f.value), 1), (v(!0), i(e, null, x(u.value, (e) => (v(), i("span", {
3014
+ }), (t, o) => n.open ? (v(), i("div", Sn, [a("div", Cn, w(f.value), 1), (v(!0), i(e, null, x(u.value, (e) => (v(), i("span", {
2495
3015
  key: e.id,
2496
3016
  class: "ml-ribbon-keytip"
2497
3017
  }, w(e.key), 1))), 128))])) : r("", !0);
2498
3018
  }
2499
3019
  });
2500
3020
  //#endregion
2501
- export { Lt as MlRibbon, Y as MlRibbonBackstage, Ae as MlRibbonButton, Pe as MlRibbonButtonGroup, Oe as MlRibbonCollection, Te as MlRibbonContextualTabs, ze as MlRibbonDropdown, De as MlRibbonFileMenu, Ke as MlRibbonGallery, pt as MlRibbonGroup, rt as MlRibbonItemHost, Ht as MlRibbonKeyTips, $ as MlRibbonSegmented, zt as MlRibbonTab, xe as MlRibbonTabs, et as MlRibbonTemplateItem, Qe as MlRibbonToggleButton };
3021
+ export { yn as MlRibbon, X as MlRibbonBackstage, Ae as MlRibbonButton, Pe as MlRibbonButtonGroup, Oe as MlRibbonCollection, Te as MlRibbonContextualTabs, Be as MlRibbonDropdown, De as MlRibbonFileMenu, St as MlRibbonGallery, Jt as MlRibbonGroup, Et as MlRibbonInputNumber, Rt as MlRibbonItemHost, wn as MlRibbonKeyTips, Mt as MlRibbonSegmented, xn as MlRibbonTab, Se as MlRibbonTabs, Ft as MlRibbonTemplateItem, Nt as MlRibbonToggleButton };