@mlightcad/ribbon 0.0.7 → 0.0.8

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