@mlightcad/ribbon 0.0.6 → 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, nextTick as f, normalizeClass as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, provide as v, ref as y, renderList as b, renderSlot as x, resolveDynamicComponent as S, toDisplayString as C, toRaw as w, unref as T, watch as E, withCtx as D, withModifiers as ee } from "vue";
2
- import { ElButton as O, ElButtonGroup as k, ElCheckbox as A, ElColorPicker as j, ElConfigProvider as te, ElDrawer as M, ElDropdown as N, ElDropdownItem as P, ElDropdownMenu as F, ElIcon as I, ElOption as ne, ElPopover as re, ElSegmented as L, ElSelect as R, ElSwitch as z, ElTooltip as B, useGlobalConfig as ie } from "element-plus";
3
- import { ArrowDown as V, ArrowDownBold as ae, ArrowUp as H, ArrowUpBold as U, Grid as oe, Menu as se, Promotion as ce } from "@element-plus/icons-vue";
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 le = 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(w(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 ue(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 q(e) {
41
+ function fe(e) {
42
42
  return {
43
43
  ...e,
44
- groups: e.groups?.map(ue)
44
+ groups: e.groups?.map(K)
45
45
  };
46
46
  }
47
- function J(e) {
48
- return e.map(q);
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 de(e, n, r, i, a, o) {
65
- let s = y(r), c = y(i), l = y(a), u = y(o), d = y(J(n)), f = y(!1), p = y(!1), m = y(!1), h = y([]), g = y(""), _ = t(() => d.value.filter((e) => e.visible !== !1)), v = {
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(q(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(ue(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 fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backstage__content" }, me = { key: 0 }, he = { key: 1 }, ge = /* @__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 fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
168
170
  function d() {
169
171
  u("close");
170
172
  }
171
- return (t, o) => (_(), n(T(M), {
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: p(["ml-ribbon-backstage", `ml-ribbon-backstage--size-${l.size || "default"}`]) }, [t.$slots.default ? x(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
- }) : (_(), i(e, { key: 1 }, [a("aside", fe, [c(T(O), {
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(C(l.backLabel), 1)]),
191
+ default: O(() => [s(w(l.backLabel), 1)]),
190
192
  _: 1
191
- })]), a("section", pe, [l.title ? (_(), i("h2", me, C(l.title), 1)) : r("", !0), l.description ? (_(), i("p", he, C(l.description), 1)) : r("", !0)])], 64))], 2)]),
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
- }), _e = {
197
+ }), Z = {
196
198
  class: "ml-ribbon-tabs",
197
199
  role: "tablist"
198
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,17 +211,23 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { 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) => (_(), i("div", _e, [(_(!0), i(e, null, b(s.value, (e) => (_(), 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
- class: p(["ml-ribbon-tab", { "is-active": n.activeTab === e.id }]),
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
- }, C(e.title), 11, ve))), 128))]));
227
+ onClick: (t) => c(e.id, t)
228
+ }, w(e.title), 11, ve))), 128))]));
221
229
  }
222
- }), ye = { class: "ml-ribbon-contextual-tabs" }, be = { class: "ml-ribbon-contextual-tabs__normal" }, xe = { class: "ml-ribbon-contextual-tabs__ctx" }, Se = /* @__PURE__ */ l({
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",
224
232
  props: {
225
233
  tabs: {},
@@ -230,7 +238,7 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { 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) => (_(), i("div", ye, [a("div", be, [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,
@@ -239,11 +247,11 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
239
247
  "tabs",
240
248
  "active-tab",
241
249
  "disabled"
242
- ])]), a("div", xe, [(_(!0), i(e, null, b(r.tabs.filter((e) => e.contextual), (e) => (_(), i("section", {
250
+ ])]), a("div", Se, [(v(!0), i(e, null, x(r.tabs.filter((e) => e.contextual), (e) => (v(), i("section", {
243
251
  key: e.id,
244
252
  class: "ml-ribbon-contextual-tabs__block",
245
- style: m({ "--ctx-color": e.contextualColor || "#67c23a" })
246
- }, [a("small", null, C(e.contextualTitle || r.defaultContextualTitle), 1), c(Z, {
253
+ style: h({ "--ctx-color": e.contextualColor || "#67c23a" })
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,
@@ -254,7 +262,7 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
254
262
  "disabled"
255
263
  ])], 4))), 128))])]));
256
264
  }
257
- }), Ce = ["disabled"], we = /* @__PURE__ */ l({
265
+ }), we = ["disabled"], Te = /* @__PURE__ */ l({
258
266
  __name: "RibbonFileMenu",
259
267
  props: {
260
268
  items: {},
@@ -265,40 +273,40 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { 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 = y(!1), m = ie("size", ""), h = t(() => m.value || "default"), g = t(() => `ml-ribbon-file-menu-dropdown ml-ribbon-popper ml-ribbon-popper--size-${h.value}`);
269
- function v(e) {
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}`);
277
+ function _(e) {
270
278
  f.value = e;
271
279
  }
272
- function x(e) {
280
+ function y(e) {
273
281
  if (e === "__backstage") {
274
282
  d("open-backstage");
275
283
  return;
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) => (_(), n(T(N), {
289
+ }), (t, o) => (v(), n(E(M), {
282
290
  trigger: "click",
283
291
  disabled: u.disabled,
284
292
  "popper-class": g.value,
285
- onCommand: x,
286
- onVisibleChange: v
293
+ onCommand: y,
294
+ onVisibleChange: _
287
295
  }, {
288
- dropdown: D(() => [c(T(F), null, {
289
- default: D(() => [u.showOpenBackstage === !1 ? r("", !0) : (_(), n(T(P), {
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(C(u.openBackstageLabel), 1)]),
301
+ default: O(() => [s(w(u.openBackstageLabel), 1)]),
294
302
  _: 1
295
- })), (_(!0), i(e, null, b(u.items, (e, t) => (_(), n(T(P), {
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(C(e.label), 1)]),
309
+ default: O(() => [s(w(e.label), 1)]),
302
310
  _: 2
303
311
  }, 1032, [
304
312
  "divided",
@@ -307,15 +315,15 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { 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
- class: p(["ml-ribbon-tab ml-ribbon-tab--file", { "is-active": f.value }]),
320
+ class: m(["ml-ribbon-tab ml-ribbon-tab--file", { "is-active": f.value }]),
313
321
  disabled: u.disabled
314
- }, C(u.label), 11, Ce)]),
322
+ }, w(u.label), 11, we)]),
315
323
  _: 1
316
324
  }, 8, ["disabled", "popper-class"]));
317
325
  }
318
- }), Te = /* @__PURE__ */ l({
326
+ }), Ee = /* @__PURE__ */ l({
319
327
  __name: "RibbonCollection",
320
328
  props: {
321
329
  id: {},
@@ -324,15 +332,15 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
324
332
  },
325
333
  setup(e) {
326
334
  let n = e, r = t(() => ({ "--ml-ribbon-collection-rows": String(n.rows) }));
327
- return (e, t) => (_(), i("div", {
328
- class: p(["ml-ribbon-collection", [`ml-ribbon-collection--${n.layout}`]]),
329
- style: m(r.value)
330
- }, [x(e.$slots, "default")], 6));
335
+ return (e, t) => (v(), i("div", {
336
+ class: m(["ml-ribbon-collection", [`ml-ribbon-collection--${n.layout}`]]),
337
+ style: h(r.value)
338
+ }, [S(e.$slots, "default")], 6));
331
339
  }
332
- }), Ee = {
340
+ }), De = {
333
341
  key: 0,
334
342
  class: "ml-ribbon-gallery__title"
335
- }, De = { class: "ml-ribbon-gallery__categories" }, Oe = { class: "ml-ribbon-gallery__category-title" }, ke = { class: "ml-ribbon-gallery__grid" }, Ae = ["disabled", "onClick"], je = { class: "ml-ribbon-gallery__preview" }, Q = { class: "ml-ribbon-gallery__label" }, Me = /* @__PURE__ */ l({
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: {},
@@ -346,22 +354,22 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
346
354
  },
347
355
  emits: ["select"],
348
356
  setup(t, { emit: n }) {
349
- let o = t, s = n, c = y("");
357
+ let o = t, s = n, c = b("");
350
358
  function l(e) {
351
359
  o.disabled || (c.value = e, s("select", e));
352
360
  }
353
- return (n, s) => (_(), i("div", { class: p(["ml-ribbon-gallery", { "is-disabled": t.disabled }]) }, [t.label ? (_(), i("div", Ee, C(t.label), 1)) : r("", !0), a("div", De, [(_(!0), i(e, null, b(t.categories, (n) => (_(), i("section", {
361
+ return (n, s) => (v(), i("div", { class: m(["ml-ribbon-gallery", { "is-disabled": t.disabled }]) }, [t.label ? (v(), i("div", De, w(t.label), 1)) : r("", !0), a("div", Oe, [(v(!0), i(e, null, x(t.categories, (n) => (v(), i("section", {
354
362
  key: n.id,
355
363
  class: "ml-ribbon-gallery__category"
356
- }, [a("h4", Oe, C(n.title), 1), a("div", ke, [(_(!0), i(e, null, b(n.items, (e) => (_(), i("button", {
364
+ }, [a("h4", ke, w(n.title), 1), a("div", Ae, [(v(!0), i(e, null, x(n.items, (e) => (v(), i("button", {
357
365
  key: e.id,
358
366
  type: "button",
359
- class: p(["ml-ribbon-gallery__item", { "is-selected": c.value === e.id }]),
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", je, C(e.preview ?? o.previewFallback), 1), a("div", Q, C(e.label), 1)], 10, Ae))), 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
- }), Ne = ["data-id"], $ = { class: "ml-ribbon-button-group__label" }, Pe = /* @__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: {},
@@ -378,38 +386,38 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
378
386
  function d(e) {
379
387
  l.disabled || u("change", e);
380
388
  }
381
- return (o, l) => (_(), i("div", {
389
+ return (o, l) => (v(), i("div", {
382
390
  class: "ml-ribbon-button-group",
383
391
  "data-id": t.id
384
- }, [a("div", $, C(t.label), 1), c(T(k), null, {
385
- default: D(() => [(_(!0), i(e, null, b(t.options, (e) => (_(), n(T(O), {
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 ? (_(), 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(() => [(_(), n(S(e.icon)))]),
403
+ default: O(() => [(v(), n(C(e.icon)))]),
396
404
  _: 2
397
- }, 1024)) : r("", !0), s(" " + C(e.label), 1)]),
405
+ }, 1024)) : r("", !0), s(" " + w(e.label), 1)]),
398
406
  _: 2
399
407
  }, 1032, ["disabled", "onClick"]))), 128))]),
400
408
  _: 1
401
- })], 8, Ne));
409
+ })], 8, Fe));
402
410
  }
403
- }), Fe = ["data-id"], Ie = {
411
+ }), Re = ["data-id"], ze = {
404
412
  key: 0,
405
413
  class: "ml-ribbon-segmented__label"
406
- }, Le = ["data-option-value"], Re = {
414
+ }, Be = ["data-option-value"], Ve = {
407
415
  key: 2,
408
416
  class: "ml-ribbon-segmented__option-label"
409
- }, ze = {
417
+ }, Q = {
410
418
  key: 3,
411
419
  class: "ml-ribbon-segmented__option-sr-label"
412
- }, Be = /* @__PURE__ */ l({
420
+ }, He = /* @__PURE__ */ l({
413
421
  __name: "RibbonSegmented",
414
422
  props: {
415
423
  id: {},
@@ -443,7 +451,7 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
443
451
  function f(e) {
444
452
  return e;
445
453
  }
446
- function m(e) {
454
+ function p(e) {
447
455
  let t = f(e);
448
456
  return t.label?.trim() || String(t.value);
449
457
  }
@@ -453,7 +461,7 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
453
461
  function g(e) {
454
462
  return f(e).iconClass ?? null;
455
463
  }
456
- function v(e) {
464
+ function _(e) {
457
465
  return !h(e) && !g(e);
458
466
  }
459
467
  function y(e) {
@@ -462,10 +470,10 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
462
470
  function b(e) {
463
471
  l("change", e);
464
472
  }
465
- return (t, o) => (_(), i("div", {
473
+ return (t, o) => (v(), i("div", {
466
474
  class: "ml-ribbon-segmented",
467
475
  "data-id": e.id
468
- }, [d.value ? (_(), i("div", Ie, C(u.value), 1)) : r("", !0), c(T(L), {
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 fe = { class: "ml-ribbon-backstage__nav" }, pe = { 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) ? (_(), 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(() => [(_(), n(S(h(e))))]),
494
+ default: O(() => [(v(), n(C(h(e))))]),
487
495
  _: 2
488
- }, 1024)) : g(e) ? (_(), i("i", {
496
+ }, 1024)) : g(e) ? (v(), i("i", {
489
497
  key: 1,
490
- class: p(["ml-ribbon-segmented__option-icon ml-ribbon-item-host__icon--class", g(e)]),
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), v(e) ? (_(), i("span", Re, C(m(e)), 1)) : (_(), i("span", ze, C(m(e)), 1))], 8, Le)]),
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 fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
498
506
  "block",
499
507
  "disabled",
500
508
  "aria-label"
501
- ])], 8, Fe));
509
+ ])], 8, Re));
502
510
  }
503
- }), Ve = {
511
+ }), Ue = {
504
512
  key: 2,
505
513
  class: "ml-ribbon-item-host__label"
506
- }, He = /* @__PURE__ */ l({
514
+ }, We = /* @__PURE__ */ l({
507
515
  __name: "RibbonToggleButton",
508
516
  props: {
509
517
  id: {},
@@ -533,35 +541,35 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
533
541
  function s(e) {
534
542
  return typeof e != "string" || e.trim().length === 0 ? null : e;
535
543
  }
536
- let c = e, l = a, u = y(!!c.modelValue);
537
- E(() => c.modelValue, (e) => {
544
+ let c = e, l = a, u = b(!!c.modelValue);
545
+ D(() => c.modelValue, (e) => {
538
546
  u.value = !!e;
539
547
  }, { immediate: !0 });
540
- let d = t(() => u.value), f = t(() => d.value ? c.activeIcon ?? c.inactiveIcon : c.inactiveIcon ?? c.activeIcon), m = t(() => o(f.value)), h = t(() => m.value ? null : s(f.value)), g = t(() => (d.value ? c.activeLabel?.trim() : c.inactiveLabel?.trim()) || c.label?.trim() || c.id), v = t(() => !c.hideLabel && g.value.length > 0);
541
- function b() {
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);
549
+ function y() {
542
550
  if (c.disabled) return;
543
551
  let e = !u.value;
544
552
  u.value = e, l("change", e);
545
553
  }
546
- return (t, a) => (_(), n(T(O), {
547
- class: p(["ml-ribbon-toggle", { "is-active": d.value }]),
554
+ return (t, a) => (v(), n(E(A), {
555
+ class: m(["ml-ribbon-toggle", { "is-active": d.value }]),
548
556
  type: "default",
549
557
  disabled: e.disabled,
550
558
  "aria-label": g.value,
551
559
  "aria-pressed": String(d.value),
552
- onClick: b
560
+ onClick: y
553
561
  }, {
554
- default: D(() => [m.value ? (_(), 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(() => [(_(), n(S(m.value)))]),
566
+ default: O(() => [(v(), n(C(p.value)))]),
559
567
  _: 1
560
- })) : h.value ? (_(), i("i", {
568
+ })) : h.value ? (v(), i("i", {
561
569
  key: 1,
562
- class: p(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", h.value]),
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), v.value ? (_(), i("span", Ve, C(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 fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
570
578
  "aria-pressed"
571
579
  ]));
572
580
  }
573
- }), Ue = ["data-template-id", "aria-disabled"], We = /* @__PURE__ */ l({
581
+ }), Ge = ["data-template-id", "aria-disabled"], Ke = /* @__PURE__ */ l({
574
582
  __name: "RibbonTemplateItem",
575
583
  props: {
576
584
  id: {},
@@ -578,25 +586,25 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
578
586
  disabled: { type: Boolean }
579
587
  },
580
588
  setup(e) {
581
- return (t, n) => (_(), i("div", {
589
+ return (t, n) => (v(), i("div", {
582
590
  class: "ml-ribbon-template-item",
583
591
  "data-template-id": e.id,
584
592
  "aria-disabled": e.disabled
585
- }, [x(t.$slots, "default", {
593
+ }, [S(t.$slots, "default", {
586
594
  item: e.item,
587
595
  disabled: e.disabled
588
- }, () => [a("span", null, C(e.item.label ?? e.item.id), 1)])], 8, Ue));
596
+ }, () => [a("span", null, w(e.item.label ?? e.item.id), 1)])], 8, Ge));
589
597
  }
590
- }), Ge = ["data-item-id"], Ke = {
598
+ }), qe = ["data-item-id"], Je = {
591
599
  key: 0,
592
600
  class: "ml-ribbon-item-host__keytip"
593
- }, qe = { class: "ml-ribbon-item-host__content" }, Je = { class: "ml-ribbon-item-host__text-row" }, Ye = {
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
- }, Xe = { class: "ml-ribbon-dropdown-item__content" }, Ze = { class: "ml-ribbon-dropdown-item__label" }, Qe = {
604
+ }, Ze = { class: "ml-ribbon-dropdown-item__content" }, Qe = { class: "ml-ribbon-dropdown-item__label" }, $e = {
597
605
  key: 2,
598
606
  class: "ml-ribbon-item-host__label"
599
- }, $e = /* @__PURE__ */ l({
607
+ }, et = /* @__PURE__ */ l({
600
608
  __name: "RibbonItemHost",
601
609
  props: {
602
610
  id: {},
@@ -606,301 +614,357 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
606
614
  },
607
615
  emits: ["item-click"],
608
616
  setup(o, { emit: l }) {
609
- let d = o, f = l, m = u(le, null), h = t(() => Array.isArray(d.item.props?.options) ? d.item.props.options : []), g = ie("size", ""), v = t(() => g.value || "default"), w = t(() => `ml-ribbon-dropdown-menu ml-ribbon-popper ml-ribbon-popper--size-${v.value}`), E = t(() => `ml-ribbon-select-dropdown ml-ribbon-popper ml-ribbon-popper--size-${v.value}`), k = t(() => d.item.props?.icon || (typeof d.item.icon == "string" || !d.item.icon ? null : d.item.icon)), te = t(() => {
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
- }), M = t(() => d.item.hideLabel !== !0), re = t(() => d.item.label || d.item.id), L = t(() => d.item.keyTip?.trim().toUpperCase() ?? ""), z = t(() => d.item.props?.syncLabelWithSelection === !0), B = y(!1), ae = y(void 0), U = t(() => h.value.find((e) => Z(e) === ae.value) ?? null), oe = t(() => {
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 && z.value) {
615
- let t = ye(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
- }), se = t(() => {
627
+ }), G = t(() => {
620
628
  if (U.value) {
621
- let e = _e(U.value);
629
+ let e = we(U.value);
622
630
  if (e) return e;
623
631
  }
624
- return k.value;
625
- }), ce = t(() => {
632
+ return j.value;
633
+ }), K = t(() => {
626
634
  if (U.value) {
627
- let e = ve(U.value);
635
+ let e = Te(U.value);
628
636
  if (e) return e;
629
637
  }
630
- return se.value ? null : te.value;
631
- }), W = t(() => {
632
- if (!m?.keyTipsOpen.value || m?.disabled.value || !L.value) return !1;
633
- let e = m.keyTipsSequence.value.toLowerCase();
634
- return e ? L.value.toLowerCase().startsWith(e) : !0;
635
- }), G = t(() => d.item.disabled === !0 || m?.disabled.value === !0), K = t(() => d.item.props?.modelValue), ue = t(() => d.item.props?.activeLabel), q = t(() => d.item.props?.inactiveLabel);
636
- function J() {
637
- G.value || f("item-click", d.id);
638
- }
639
- function Y(e) {
640
- if (G.value) {
641
- B.value = !1;
638
+ return G.value ? null : L.value;
639
+ }), fe = t(() => {
640
+ if (!h?.keyTipsOpen.value || h?.disabled.value || !ce.value) return !1;
641
+ let e = h.keyTipsSequence.value.toLowerCase();
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(() => {
644
+ let e = d.item.props?.component;
645
+ return !e || typeof e == "string" ? null : e;
646
+ }), he = t(() => {
647
+ let e = d.item.props?.componentProps;
648
+ return !e || typeof e != "object" || Array.isArray(e) ? {} : e;
649
+ });
650
+ function X() {
651
+ q.value || p("item-click", d.id);
652
+ }
653
+ function ge(e) {
654
+ if (q.value) {
655
+ H.value = !1;
642
656
  return;
643
657
  }
644
- B.value = e;
658
+ H.value = e;
645
659
  }
646
- function X(e) {
647
- G.value || (ae.value = e, pe(e), B.value = !1);
660
+ function _e(e) {
661
+ q.value || (ue.value = e, ye(e), H.value = !1);
648
662
  }
649
- function de() {
650
- G.value || (B.value = !B.value);
663
+ function Z() {
664
+ q.value || (H.value = !H.value);
651
665
  }
652
- function fe() {
653
- if (G.value) return;
666
+ function ve() {
667
+ if (q.value) return;
654
668
  let e = U.value;
655
669
  if (!e) {
656
- J();
670
+ X();
657
671
  return;
658
672
  }
659
- pe(Z(e));
673
+ ye(Ee(e));
660
674
  }
661
- function pe(e) {
675
+ function ye(e) {
662
676
  if (typeof e == "string" || typeof e == "number") {
663
- f("item-click", String(e));
677
+ p("item-click", String(e));
664
678
  return;
665
679
  }
666
- J();
680
+ X();
667
681
  }
668
- function me(e) {
669
- if (!G.value) {
682
+ function be(e) {
683
+ if (!q.value) {
670
684
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
671
- f("item-click", String(e));
685
+ p("item-click", String(e));
672
686
  return;
673
687
  }
674
- J();
688
+ X();
675
689
  }
676
690
  }
677
- function he(e) {
678
- if (G.value) return;
691
+ function xe(e) {
692
+ if (q.value) return;
679
693
  let t = e ? d.item.props?.activeValue : d.item.props?.inactiveValue;
680
694
  if (typeof t == "string" || typeof t == "number" || typeof t == "boolean") {
681
- f("item-click", String(t));
695
+ p("item-click", String(t));
682
696
  return;
683
697
  }
684
- f("item-click", String(e));
698
+ p("item-click", String(e));
685
699
  }
686
- function ge(e) {
687
- if (!G.value) {
700
+ function Se(e) {
701
+ if (!q.value) {
688
702
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
689
- f("item-click", String(e));
703
+ p("item-click", String(e));
690
704
  return;
691
705
  }
692
- J();
706
+ X();
693
707
  }
694
708
  }
695
- function _e(e) {
709
+ function Ce(e) {
710
+ if (!q.value) {
711
+ if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
712
+ p("item-click", String(e));
713
+ return;
714
+ }
715
+ X();
716
+ }
717
+ }
718
+ function we(e) {
696
719
  if (!e || typeof e != "object") return null;
697
720
  let t = e.icon;
698
721
  return !t || typeof t == "string" ? null : t;
699
722
  }
700
- function ve(e) {
723
+ function Te(e) {
701
724
  if (!e || typeof e != "object") return null;
702
725
  let t = e.icon;
703
726
  return typeof t != "string" || t.trim().length === 0 ? null : t;
704
727
  }
705
- function Z(e) {
728
+ function Ee(e) {
706
729
  if (!(!e || typeof e != "object")) return e.value;
707
730
  }
708
- function ye(e) {
731
+ function De(e) {
709
732
  if (!e || typeof e != "object") return;
710
733
  let t = e.label;
711
734
  return typeof t == "string" ? t : void 0;
712
735
  }
713
- return (t, l) => (_(), i("div", {
714
- class: p(["ml-ribbon-item-host", [
715
- `is-${o.item.size ?? "medium"}`,
716
- `type-${o.item.type}`,
717
- { "is-label-hidden": o.item.hideLabel === !0 }
718
- ]]),
719
- "data-item-id": o.id,
720
- role: "group"
721
- }, [W.value ? (_(), i("span", Ke, C(L.value), 1)) : r("", !0), o.item.type === "buttonGroup" ? (_(), n(Pe, {
722
- key: 1,
723
- id: o.item.id,
724
- label: o.item.label ?? "",
725
- options: o.item.props?.options ?? [],
726
- disabled: G.value,
727
- onChange: ge
728
- }, null, 8, [
729
- "id",
730
- "label",
731
- "options",
732
- "disabled"
733
- ])) : o.item.type === "segmented" ? (_(), n(Be, {
734
- key: 2,
735
- id: o.item.id,
736
- label: o.item.label ?? o.item.id,
737
- options: o.item.props?.options ?? [],
738
- "model-value": o.item.props?.modelValue,
739
- direction: o.item.props?.direction ?? "horizontal",
740
- block: o.item.props?.block === !0,
741
- disabled: G.value,
742
- "hide-label": o.item.hideLabel === !0,
743
- onChange: me
744
- }, null, 8, [
745
- "id",
746
- "label",
747
- "options",
748
- "model-value",
749
- "direction",
750
- "block",
751
- "disabled",
752
- "hide-label"
753
- ])) : o.item.type === "toggle" ? (_(), n(He, {
754
- key: 3,
755
- id: o.item.id,
756
- label: o.item.label ?? o.item.id,
757
- "model-value": K.value,
758
- "active-icon": o.item.props?.activeIcon ?? o.item.props?.icon ?? o.item.icon,
759
- "inactive-icon": o.item.props?.inactiveIcon ?? o.item.props?.icon ?? o.item.icon,
760
- "active-label": ue.value,
761
- "inactive-label": q.value,
762
- disabled: G.value,
763
- "hide-label": o.item.hideLabel === !0,
764
- onChange: he
765
- }, null, 8, [
766
- "id",
767
- "label",
768
- "model-value",
769
- "active-icon",
770
- "inactive-icon",
771
- "active-label",
772
- "inactive-label",
773
- "disabled",
774
- "hide-label"
775
- ])) : o.item.type === "gallery" ? (_(), n(Me, {
776
- key: 4,
777
- id: o.item.id,
778
- label: o.item.label ?? "",
779
- categories: o.item.props?.categories ?? [],
780
- "preview-fallback": d.galleryPreviewFallback,
781
- disabled: G.value,
782
- onSelect: J
783
- }, null, 8, [
784
- "id",
785
- "label",
786
- "categories",
787
- "preview-fallback",
788
- "disabled"
789
- ])) : o.item.type === "template" ? (_(), n(We, {
790
- key: 5,
791
- id: o.item.id,
792
- item: o.item,
793
- 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"
794
759
  }, {
795
- default: D(() => [x(t.$slots, "template", {
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,
796
839
  item: o.item,
797
- disabled: G.value
798
- })]),
799
- _: 3
800
- }, 8, [
801
- "id",
802
- "item",
803
- "disabled"
804
- ])) : o.item.type === "dropdown" ? (_(), n(T(N), {
805
- key: 6,
806
- trigger: "click",
807
- disabled: G.value,
808
- "popper-class": w.value,
809
- onVisibleChange: Y,
810
- onCommand: X
811
- }, {
812
- dropdown: D(() => [c(T(F), null, {
813
- default: D(() => [(_(!0), i(e, null, b(h.value, (e) => (_(), n(T(P), {
814
- key: String(e.value),
815
- command: e.value
816
- }, {
817
- default: D(() => [a("span", Xe, [_e(e) ? (_(), n(T(I), {
818
- key: 0,
819
- class: "ml-ribbon-dropdown-item__icon"
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",
859
+ "item",
860
+ "disabled"
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
820
873
  }, {
821
- default: D(() => [(_(), n(S(_e(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)])]),
822
885
  _: 2
823
- }, 1024)) : ve(e) ? (_(), 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", {
824
903
  key: 1,
825
- class: p(["ml-ribbon-dropdown-item__icon ml-ribbon-dropdown-item__icon--class", ve(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),
826
908
  "aria-hidden": "true"
827
- }, null, 2)) : r("", !0), a("span", Ze, C(e.label), 1)])]),
828
- _: 2
829
- }, 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"])]),
830
915
  _: 1
831
- })]),
832
- default: D(() => [c(T(O), {
833
- type: "default",
834
- disabled: G.value,
835
- "aria-label": re.value,
836
- onClick: de
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
837
933
  }, {
838
- default: D(() => [a("span", qe, [se.value ? (_(), 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), {
839
947
  key: 0,
840
- class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--dropdown-primary",
841
- onClick: ee(fe, ["stop"])
842
- }, [c(T(I), null, {
843
- default: D(() => [(_(), n(S(se.value)))]),
948
+ class: "ml-ribbon-item-host__icon"
949
+ }, {
950
+ default: O(() => [(v(), n(C(j.value)))]),
844
951
  _: 1
845
- })])) : ce.value ? (_(), i("span", {
952
+ })) : L.value ? (v(), i("i", {
846
953
  key: 1,
847
- class: "ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class ml-ribbon-item-host__icon--dropdown-primary",
848
- onClick: ee(fe, ["stop"])
849
- }, [a("i", {
850
- class: p(ce.value),
954
+ class: m(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", L.value]),
851
955
  "aria-hidden": "true"
852
- }, null, 2)])) : r("", !0), a("span", Je, [M.value ? (_(), i("span", Ye, C(oe.value), 1)) : r("", !0), c(T(I), { class: p(["ml-ribbon-item-host__dropdown-arrow", { "is-open": B.value }]) }, {
853
- default: D(() => [(_(), n(S(B.value ? T(H) : T(V))))]),
854
- _: 1
855
- }, 8, ["class"])])])]),
856
- _: 1
857
- }, 8, ["disabled", "aria-label"])]),
858
- _: 1
859
- }, 8, ["disabled", "popper-class"])) : o.item.type === "checkbox" ? (_(), n(T(A), {
860
- key: 7,
861
- disabled: G.value,
862
- onChange: J
863
- }, {
864
- default: D(() => [s(C(o.item.label), 1)]),
865
- _: 1
866
- }, 8, ["disabled"])) : o.item.type === "colorPicker" ? (_(), n(T(j), {
867
- key: 8,
868
- disabled: G.value,
869
- onChange: J
870
- }, null, 8, ["disabled"])) : o.item.type === "comboBox" ? (_(), n(T(R), {
871
- key: 9,
872
- disabled: G.value,
873
- "popper-class": E.value,
874
- style: { width: "92px" },
875
- onChange: J
876
- }, {
877
- default: D(() => [(_(!0), i(e, null, b(h.value, (e) => (_(), n(T(ne), {
878
- key: String(e.value),
879
- label: String(e.label),
880
- value: e.value
881
- }, null, 8, ["label", "value"]))), 128))]),
882
- _: 1
883
- }, 8, ["disabled", "popper-class"])) : (_(), n(T(O), {
884
- key: 10,
885
- disabled: G.value,
886
- "aria-label": re.value,
887
- onClick: J
888
- }, {
889
- default: D(() => [k.value ? (_(), n(T(I), {
890
- key: 0,
891
- class: "ml-ribbon-item-host__icon"
892
- }, {
893
- default: D(() => [(_(), n(S(k.value)))]),
956
+ }, null, 2)) : r("", !0), ie.value ? (v(), i("span", $e, w(o.item.label ?? o.item.id), 1)) : r("", !0)]),
894
957
  _: 1
895
- })) : te.value ? (_(), i("i", {
896
- key: 1,
897
- class: p(["ml-ribbon-item-host__icon ml-ribbon-item-host__icon--class", te.value]),
898
- "aria-hidden": "true"
899
- }, null, 2)) : r("", !0), M.value ? (_(), i("span", Qe, C(o.item.label ?? o.item.id), 1)) : r("", !0)]),
900
- _: 1
901
- }, 8, ["disabled", "aria-label"]))], 10, Ge));
958
+ }, 8, ["disabled", "aria-label"]))], 10, qe)]),
959
+ _: 3
960
+ }, 8, [
961
+ "content",
962
+ "disabled",
963
+ "show-after",
964
+ "hide-after"
965
+ ]));
902
966
  }
903
- }), et = /* @__PURE__ */ l({
967
+ }), tt = /* @__PURE__ */ l({
904
968
  __name: "RibbonGroupContent",
905
969
  props: {
906
970
  group: {},
@@ -909,13 +973,13 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
909
973
  emits: ["item-click"],
910
974
  setup(t, { emit: r }) {
911
975
  let a = t, o = r;
912
- return (t, r) => (_(), i("div", { class: p(["ml-ribbon-group__content", [`ml-ribbon-group__content--${a.group.orientation ?? "column"}`]]) }, [(_(!0), i(e, null, b(a.group.collections ?? [], (t) => (_(), n(Te, {
976
+ return (t, r) => (v(), i("div", { class: m(["ml-ribbon-group__content", [`ml-ribbon-group__content--${a.group.orientation ?? "column"}`]]) }, [(v(!0), i(e, null, x(a.group.collections ?? [], (t) => (v(), n(Ee, {
913
977
  id: t.id,
914
978
  key: t.id,
915
979
  layout: t.layout ?? (a.group.orientation === "row" ? "row" : "column"),
916
980
  rows: t.rows
917
981
  }, {
918
- default: D(() => [(_(!0), i(e, null, b(t.items, (e) => (_(), n($e, {
982
+ default: O(() => [(v(!0), i(e, null, x(t.items, (e) => (v(), n(et, {
919
983
  id: e.id,
920
984
  key: e.id,
921
985
  item: e,
@@ -938,15 +1002,15 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
938
1002
  "rows"
939
1003
  ]))), 128))], 2));
940
1004
  }
941
- }), tt = ["data-priority"], nt = { class: "ml-ribbon-group__body" }, rt = { class: "ml-ribbon-group__footer" }, it = { class: "ml-ribbon-group__title" }, at = [
1005
+ }), nt = ["data-priority"], rt = { class: "ml-ribbon-group__body" }, it = { class: "ml-ribbon-group__footer" }, at = { class: "ml-ribbon-group__title" }, ot = [
942
1006
  "aria-label",
943
1007
  "aria-expanded",
944
1008
  "disabled"
945
- ], ot = { class: "ml-ribbon-group__overflow-content" }, st = [
1009
+ ], st = { class: "ml-ribbon-group__overflow-content" }, ct = [
946
1010
  "aria-label",
947
1011
  "aria-expanded",
948
1012
  "disabled"
949
- ], ct = { class: "ml-ribbon-group__overflow-content" }, lt = /* @__PURE__ */ l({
1013
+ ], lt = { class: "ml-ribbon-group__overflow-content" }, ut = /* @__PURE__ */ l({
950
1014
  __name: "RibbonGroup",
951
1015
  props: {
952
1016
  id: {},
@@ -955,6 +1019,7 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
955
1019
  groupIconCss: {},
956
1020
  orientation: {},
957
1021
  autoWidth: { type: Boolean },
1022
+ width: {},
958
1023
  priority: {},
959
1024
  launcher: { type: Boolean },
960
1025
  showLauncherIcon: { type: Boolean },
@@ -964,15 +1029,24 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
964
1029
  },
965
1030
  emits: ["item-click"],
966
1031
  setup(e, { emit: o }) {
967
- let s = e, l = o, d = u(le, null), m = t(() => s.autoWidth !== !1), v = t(() => d?.disabled.value === !0), b = y(null), w = y([]), ee = y(null), k = y(null), A = y(0), j = y(0), te = ie("size", ""), M = t(() => te.value || "default"), N = t(() => `ml-ribbon-group__overflow-popover ml-ribbon-group__overflow-popover--size-${M.value}`), P = t(() => ({ modifiers: [{
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: [{
968
1042
  name: "offset",
969
- options: { offset: [A.value, 8] }
970
- }] })), F = t(() => ({ modifiers: [{
1043
+ options: { offset: [ne.value, 8] }
1044
+ }] })), I = t(() => ({ modifiers: [{
971
1045
  name: "offset",
972
- options: { offset: [j.value, 8] }
973
- }] })), ne = t(() => !s.icon || typeof s.icon == "string" ? null : s.icon), L = t(() => w.value.length > 0), R = t(() => (s.groupModel?.footerMenuItems?.length ?? 0) > 0), z = y(!1), B = y(!1), ae = t(() => {
974
- if (!s.groupModel || !w.value.length) return null;
975
- let e = new Set(w.value), t = s.groupModel.collections?.map((t) => ({
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) => ({
976
1050
  ...t,
977
1051
  items: t.items.filter((t) => e.has(t.id))
978
1052
  })).filter((e) => e.items.length > 0) ?? [];
@@ -980,7 +1054,7 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
980
1054
  ...s.groupModel,
981
1055
  collections: t
982
1056
  } : null;
983
- }), U = t(() => s.groupModel?.footerMenuItems?.length ? {
1057
+ }), le = t(() => s.groupModel?.footerMenuItems?.length ? {
984
1058
  id: `${s.groupModel.id}-footer-menu`,
985
1059
  title: "",
986
1060
  orientation: "row",
@@ -990,15 +1064,15 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
990
1064
  items: s.groupModel.footerMenuItems
991
1065
  }]
992
1066
  } : null);
993
- function oe() {
994
- let e = b.value?.querySelector(".ml-ribbon-group__content");
1067
+ function H() {
1068
+ let e = T.value?.querySelector(".ml-ribbon-group__content");
995
1069
  if (!e) {
996
- w.value.length > 0 && (w.value = []);
1070
+ k.value.length > 0 && (k.value = []);
997
1071
  return;
998
1072
  }
999
1073
  let t = e.getBoundingClientRect();
1000
1074
  if (t.width <= 0 || t.height <= 0) {
1001
- w.value.length > 0 && (w.value = []);
1075
+ k.value.length > 0 && (k.value = []);
1002
1076
  return;
1003
1077
  }
1004
1078
  let n = [];
@@ -1007,98 +1081,99 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1007
1081
  if (!r) return;
1008
1082
  let i = e.getBoundingClientRect();
1009
1083
  (i.right - t.right > .5 || i.bottom - t.bottom > .5 || t.left - i.left > .5 || t.top - i.top > .5) && n.push(r);
1010
- }), w.value.length === n.length && w.value.every((e, t) => e === n[t]) || (w.value = n);
1084
+ }), k.value.length === n.length && k.value.every((e, t) => e === n[t]) || (k.value = n);
1011
1085
  }
1012
- function se() {
1013
- f(() => {
1014
- de(), W(), G(), oe();
1086
+ function U() {
1087
+ p(() => {
1088
+ Y(), W(), G(), H();
1015
1089
  });
1016
1090
  }
1017
1091
  function W() {
1018
- let e = b.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
1092
+ let e = T.value?.getBoundingClientRect(), t = ee.value?.getBoundingClientRect();
1019
1093
  if (!e || !t) {
1020
- A.value !== 0 && (A.value = 0);
1094
+ ne.value !== 0 && (ne.value = 0);
1021
1095
  return;
1022
1096
  }
1023
1097
  let n = Math.round(e.left - t.left);
1024
- A.value !== n && (A.value = n);
1098
+ ne.value !== n && (ne.value = n);
1025
1099
  }
1026
1100
  function G() {
1027
- let e = b.value?.getBoundingClientRect(), t = k.value?.getBoundingClientRect();
1101
+ let e = T.value?.getBoundingClientRect(), t = te.value?.getBoundingClientRect();
1028
1102
  if (!e || !t) {
1029
- j.value !== 0 && (j.value = 0);
1103
+ re.value !== 0 && (re.value = 0);
1030
1104
  return;
1031
1105
  }
1032
1106
  let n = Math.round(e.left - t.left);
1033
- j.value !== n && (j.value = n);
1107
+ re.value !== n && (re.value = n);
1034
1108
  }
1035
1109
  function K(e) {
1036
1110
  z.value = e;
1037
1111
  }
1038
- function ue(e) {
1039
- B.value = e;
1112
+ function fe(e) {
1113
+ V.value = e;
1040
1114
  }
1041
1115
  function q() {
1042
- v.value || (z.value = !z.value);
1043
- }
1044
- function J() {
1045
- v.value || (B.value = !B.value);
1046
- }
1047
- let Y = null, X = null;
1048
- function de() {
1049
- if (!Y) return;
1050
- let e = b.value?.querySelector(".ml-ribbon-group__content") ?? null;
1051
- X !== e && (X && Y.unobserve(X), e && Y.observe(e), X = e);
1052
- }
1053
- return E(() => s.groupModel, () => {
1054
- se();
1055
- }, { deep: !0 }), E(v, (e) => {
1056
- e && (z.value = !1, B.value = !1);
1057
- }), h(() => {
1058
- typeof ResizeObserver < "u" && (Y = new ResizeObserver(() => {
1059
- W(), G(), oe();
1060
- }), b.value && Y.observe(b.value), de()), se();
1116
+ x.value || (z.value = !z.value);
1117
+ }
1118
+ function pe() {
1119
+ x.value || (V.value = !V.value);
1120
+ }
1121
+ let J = null, me = null;
1122
+ function Y() {
1123
+ if (!J) return;
1124
+ let e = T.value?.querySelector(".ml-ribbon-group__content") ?? null;
1125
+ me !== e && (me && J.unobserve(me), e && J.observe(e), me = e);
1126
+ }
1127
+ return D(() => s.groupModel, () => {
1128
+ U();
1129
+ }, { deep: !0 }), D(x, (e) => {
1130
+ e && (z.value = !1, V.value = !1);
1061
1131
  }), g(() => {
1062
- Y?.disconnect();
1063
- }), (t, o) => (_(), i("section", {
1132
+ typeof ResizeObserver < "u" && (J = new ResizeObserver(() => {
1133
+ W(), G(), H();
1134
+ }), T.value && J.observe(T.value), Y()), U();
1135
+ }), _(() => {
1136
+ J?.disconnect();
1137
+ }), (t, o) => (v(), i("section", {
1064
1138
  ref_key: "groupSectionRef",
1065
- ref: b,
1066
- class: p(["ml-ribbon-group", { "ml-ribbon-group--auto-width": m.value }]),
1067
- "data-priority": e.priority ?? 100
1068
- }, [a("div", nt, [x(t.$slots, "default")]), a("footer", rt, [
1069
- ne.value ? (_(), n(T(I), {
1139
+ ref: T,
1140
+ class: m(["ml-ribbon-group", { "ml-ribbon-group--auto-width": f.value }]),
1141
+ "data-priority": e.priority ?? 100,
1142
+ style: h(y.value)
1143
+ }, [a("div", rt, [S(t.$slots, "default")]), a("footer", it, [
1144
+ ie.value ? (v(), n(E(F), {
1070
1145
  key: 0,
1071
1146
  class: "ml-ribbon-group__icon"
1072
1147
  }, {
1073
- default: D(() => [(_(), n(S(ne.value)))]),
1148
+ default: O(() => [(v(), n(C(ie.value)))]),
1074
1149
  _: 1
1075
1150
  })) : r("", !0),
1076
- a("span", it, C(e.title), 1),
1077
- R.value && U.value ? (_(), n(T(re), {
1151
+ a("span", at, w(e.title), 1),
1152
+ ae.value && le.value ? (v(), n(E(L), {
1078
1153
  key: 1,
1079
1154
  trigger: "click",
1080
1155
  placement: "bottom-start",
1081
- disabled: v.value,
1156
+ disabled: x.value,
1082
1157
  "popper-class": N.value,
1083
- "popper-options": F.value,
1158
+ "popper-options": I.value,
1084
1159
  onShow: o[1] ||= (e) => K(!0),
1085
1160
  onHide: o[2] ||= (e) => K(!1)
1086
1161
  }, {
1087
- reference: D(() => [a("button", {
1162
+ reference: O(() => [a("button", {
1088
1163
  ref_key: "footerTriggerRef",
1089
- ref: k,
1164
+ ref: te,
1090
1165
  type: "button",
1091
- class: p(["ml-ribbon-group__footer-trigger", { "is-open": z.value }]),
1166
+ class: m(["ml-ribbon-group__footer-trigger", { "is-open": z.value }]),
1092
1167
  "aria-label": e.overflowTriggerAriaLabel,
1093
1168
  "aria-expanded": z.value,
1094
- disabled: v.value,
1169
+ disabled: x.value,
1095
1170
  onClick: q
1096
- }, [c(T(I), null, {
1097
- default: D(() => [(_(), n(S(z.value ? T(H) : T(V))))]),
1171
+ }, [c(E(F), null, {
1172
+ default: O(() => [(v(), n(C(z.value ? E(se) : E(B))))]),
1098
1173
  _: 1
1099
- })], 10, at)]),
1100
- default: D(() => [a("div", ot, [c(et, {
1101
- group: U.value,
1174
+ })], 10, ot)]),
1175
+ default: O(() => [a("div", st, [c(tt, {
1176
+ group: le.value,
1102
1177
  "gallery-preview-fallback": e.galleryPreviewFallback,
1103
1178
  onItemClick: o[0] ||= (e) => l("item-click", e)
1104
1179
  }, null, 8, ["group", "gallery-preview-fallback"])])]),
@@ -1108,31 +1183,31 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1108
1183
  "popper-class",
1109
1184
  "popper-options"
1110
1185
  ])) : r("", !0),
1111
- L.value && ae.value ? (_(), n(T(re), {
1186
+ R.value && ce.value ? (v(), n(E(L), {
1112
1187
  key: 2,
1113
1188
  trigger: "click",
1114
1189
  placement: "bottom-start",
1115
- disabled: v.value,
1190
+ disabled: x.value,
1116
1191
  "popper-class": N.value,
1117
1192
  "popper-options": P.value,
1118
- onShow: o[4] ||= (e) => ue(!0),
1119
- onHide: o[5] ||= (e) => ue(!1)
1193
+ onShow: o[4] ||= (e) => fe(!0),
1194
+ onHide: o[5] ||= (e) => fe(!1)
1120
1195
  }, {
1121
- reference: D(() => [a("button", {
1196
+ reference: O(() => [a("button", {
1122
1197
  ref_key: "overflowTriggerRef",
1123
1198
  ref: ee,
1124
1199
  type: "button",
1125
- class: p(["ml-ribbon-group__overflow-trigger", { "is-open": B.value }]),
1200
+ class: m(["ml-ribbon-group__overflow-trigger", { "is-open": V.value }]),
1126
1201
  "aria-label": e.overflowTriggerAriaLabel,
1127
- "aria-expanded": B.value,
1128
- disabled: v.value,
1129
- onClick: J
1130
- }, [c(T(I), null, {
1131
- default: D(() => [(_(), n(S(B.value ? T(H) : T(V))))]),
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))))]),
1132
1207
  _: 1
1133
- })], 10, st)]),
1134
- default: D(() => [a("div", ct, [c(et, {
1135
- group: ae.value,
1208
+ })], 10, ct)]),
1209
+ default: O(() => [a("div", lt, [c(tt, {
1210
+ group: ce.value,
1136
1211
  "gallery-preview-fallback": e.galleryPreviewFallback,
1137
1212
  onItemClick: o[3] ||= (e) => l("item-click", e)
1138
1213
  }, null, 8, ["group", "gallery-preview-fallback"])])]),
@@ -1142,27 +1217,30 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1142
1217
  "popper-class",
1143
1218
  "popper-options"
1144
1219
  ])) : r("", !0),
1145
- e.showLauncherIcon ?? e.launcher ? (_(), n(T(O), {
1220
+ e.showLauncherIcon ?? e.launcher ? (v(), n(E(A), {
1146
1221
  key: 3,
1147
1222
  link: "",
1148
1223
  class: "ml-ribbon-group__launcher",
1149
- disabled: v.value
1224
+ disabled: x.value
1150
1225
  }, {
1151
- default: D(() => [c(T(I), null, {
1152
- default: D(() => [c(T(ce))]),
1226
+ default: O(() => [c(E(F), null, {
1227
+ default: O(() => [c(E(ue))]),
1153
1228
  _: 1
1154
1229
  })]),
1155
1230
  _: 1
1156
1231
  }, 8, ["disabled"])) : r("", !0)
1157
- ])], 10, tt));
1232
+ ])], 14, nt));
1158
1233
  }
1159
- }), ut = ["inert", "aria-disabled"], dt = { class: "ml-ribbon__header" }, ft = { class: "ml-ribbon__head-left" }, pt = { class: "ml-ribbon__head-right" }, mt = {
1234
+ }), dt = ["inert", "aria-disabled"], ft = { class: "ml-ribbon__head-left" }, pt = { class: "ml-ribbon__head-right" }, mt = {
1160
1235
  key: 2,
1161
1236
  class: "ml-ribbon__tabs-extra"
1162
1237
  }, ht = ["data-active-tab"], gt = {
1163
1238
  key: 0,
1164
1239
  class: "ml-ribbon-group ml-ribbon-group--overflow"
1165
- }, _t = { class: "ml-ribbon-group__body ml-ribbon-group__body--overflow" }, vt = ["aria-label", "disabled"], yt = { class: "ml-ribbon-overflow-list" }, bt = { class: "ml-ribbon-overflow-group__header" }, xt = ["data-active-tab"], St = ["disabled"], Ct = { class: "ml-ribbon-simplified-group__panel" }, wt = 40, Tt = /* @__PURE__ */ l({
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 = {
1241
+ key: 0,
1242
+ class: "ml-ribbon-group ml-ribbon-group--overflow"
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({
1166
1244
  __name: "Ribbon",
1167
1245
  props: {
1168
1246
  id: { default: "ml-ribbon-root" },
@@ -1200,7 +1278,9 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1200
1278
  default: !0
1201
1279
  },
1202
1280
  fileMenuItems: { default: () => [] },
1203
- texts: { default: () => ({}) }
1281
+ texts: { default: () => ({}) },
1282
+ tooltipShowAfter: { default: 1e3 },
1283
+ tooltipHideAfter: { default: 0 }
1204
1284
  },
1205
1285
  emits: [
1206
1286
  "update:activeTab",
@@ -1216,45 +1296,48 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1216
1296
  "fileMenuSelect"
1217
1297
  ],
1218
1298
  setup(s, { expose: l, emit: u }) {
1219
- function m(e) {
1220
- return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(w(e)) : e;
1299
+ function f(e) {
1300
+ return e == null || typeof e == "string" ? e : typeof e == "object" || typeof e == "function" ? d(T(e)) : e;
1221
1301
  }
1222
- function ee(e) {
1302
+ function k(e) {
1223
1303
  if (!e) return;
1224
1304
  let t = { ...e };
1225
- return "icon" in t && (t.icon = m(t.icon)), "activeIcon" in t && (t.activeIcon = m(t.activeIcon)), "inactiveIcon" in t && (t.inactiveIcon = m(t.inactiveIcon)), Array.isArray(t.options) && (t.options = t.options.map((e) => {
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) => {
1226
1306
  if (!e || typeof e != "object") return e;
1227
1307
  let t = e;
1228
1308
  return "icon" in t ? {
1229
1309
  ...t,
1230
- icon: m(t.icon)
1310
+ icon: f(t.icon)
1231
1311
  } : t;
1232
1312
  })), t;
1233
1313
  }
1234
- function k(e) {
1314
+ function ee(e) {
1235
1315
  return {
1236
1316
  ...e,
1237
- icon: m(e.icon),
1238
- props: ee(e.props)
1317
+ icon: f(e.icon),
1318
+ props: k(e.props)
1239
1319
  };
1240
1320
  }
1241
- function A(e) {
1321
+ function te(e) {
1242
1322
  return {
1243
1323
  ...e,
1244
- icon: m(e.icon),
1245
- footerMenuItems: e.footerMenuItems?.map(k),
1324
+ icon: f(e.icon),
1325
+ footerMenuItems: e.footerMenuItems?.map(ee),
1246
1326
  collections: e.collections?.map((e) => ({
1247
1327
  ...e,
1248
- items: e.items?.map(k)
1328
+ items: e.items?.map(ee)
1249
1329
  }))
1250
1330
  };
1251
1331
  }
1252
- function j(e) {
1332
+ function ne(e) {
1253
1333
  return e.map((e) => ({
1254
1334
  ...e,
1255
- groups: e.groups?.map(A)
1335
+ groups: e.groups?.map(te)
1256
1336
  }));
1257
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
+ }
1258
1341
  let M = {
1259
1342
  layoutSwitcherTooltip: "Switch ribbon layout",
1260
1343
  minimizeTooltip: "Minimize ribbon",
@@ -1270,33 +1353,44 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1270
1353
  keyTipsEmptySequence: "No key sequence",
1271
1354
  contextualTabDefaultTitle: "Contextual",
1272
1355
  galleryPreviewFallback: "Preview unavailable"
1273
- }, N = s, P = u, { context: F, visibleTabs: ne } = de(N.id, N.tabs, N.disabled, N.activeLayout ? String(N.activeLayout).toLowerCase() === "simplified" ? "simplified" : "classic" : N.layout, N.minimized, N.activeTab || N.tabs[0]?.id || "");
1274
- v(le, F), E(() => N.tabs, (e) => {
1275
- F.tabs.value = j(e), F.tabs.value.some((e) => e.id === F.activeTab.value) || (F.activeTab.value = F.tabs.value[0]?.id || "");
1276
- }, { deep: !0 }), E(() => N.layout, (e) => {
1277
- e !== F.layout.value && (F.layout.value = e);
1278
- }), E(() => N.activeLayout, (e) => {
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) => {
1279
1362
  if (!e) return;
1280
1363
  let t = String(e).toLowerCase() === "simplified" ? "simplified" : "classic";
1281
- t !== F.layout.value && (F.layout.value = t);
1282
- }), E(() => N.minimized, (e) => {
1283
- e !== F.minimized.value && (F.minimized.value = e);
1284
- }), E(() => N.disabled, (e) => {
1285
- e !== F.disabled.value && (F.disabled.value = e);
1286
- }), E(() => N.activeTab, (e) => {
1287
- e && e !== F.activeTab.value && (F.activeTab.value = e);
1288
- }), E(F.activeTab, (e) => {
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) => {
1289
1378
  P("update:activeTab", e), P("tabChange", e);
1290
- }), E(F.layout, (e) => {
1379
+ }), D(I.layout, (e) => {
1291
1380
  P("update:layout", e), P("layoutChange", e);
1292
- }), E(F.minimized, (e) => {
1381
+ }), D(I.minimized, (e) => {
1293
1382
  P("update:minimized", e);
1294
- }), E(F.overflowOpen, (e) => {
1383
+ }), D(I.overflowOpen, (e) => {
1295
1384
  P(e ? "overflowOpen" : "overflowClose");
1296
- }), E(F.backdropOpen, (e) => {
1385
+ }), D(I.backdropOpen, (e) => {
1297
1386
  P(e ? "backstageOpen" : "backstageClose");
1298
1387
  });
1299
- let L = t(() => ne.value.find((e) => e.id === F.activeTab.value)), R = t(() => L.value?.groups?.filter((e) => e.visible !== !1) ?? []), V = y(null), H = y(/* @__PURE__ */ new Set()), ce = y({}), W = ie("size", ""), G = t(() => N.size || W.value || "default"), K = t(() => `ml-ribbon-group-popover ml-ribbon-group-popover--size-${G.value}`), ue = t(() => `ml-ribbon-overflow-popover ml-ribbon-overflow-popover--size-${G.value}`), q = t(() => ({
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(() => ({
1300
1394
  layoutSwitcherTooltip: N.texts.layoutSwitcherTooltip || M.layoutSwitcherTooltip,
1301
1395
  minimizeTooltip: N.texts.minimizeTooltip || M.minimizeTooltip,
1302
1396
  keyTipsToggleText: N.texts.keyTipsToggleText || M.keyTipsToggleText,
@@ -1311,17 +1405,17 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1311
1405
  keyTipsEmptySequence: N.texts.keyTipsEmptySequence || M.keyTipsEmptySequence,
1312
1406
  contextualTabDefaultTitle: N.texts.contextualTabDefaultTitle || M.contextualTabDefaultTitle,
1313
1407
  galleryPreviewFallback: N.texts.galleryPreviewFallback || M.galleryPreviewFallback
1314
- })), J = t(() => F.minimized.value ? U : ae), Y = t(() => R.value.filter((e) => !H.value.has(e.id))), X = t(() => R.value.filter((e) => H.value.has(e.id))), fe = t(() => {
1315
- if (!X.value.length) return 220;
1316
- let e = X.value.reduce((e, t) => {
1317
- let n = ce.value[t.id] ?? he(t);
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);
1318
1412
  return Math.max(e, n);
1319
1413
  }, 0), t = Math.ceil(e + 40);
1320
1414
  return Math.max(220, Math.min(720, t));
1321
1415
  });
1322
- function pe(e) {
1416
+ function Ee(e) {
1323
1417
  let t = (e.collections ?? []).flatMap((e) => (e.items ?? []).map((e) => ({
1324
- ...k(e),
1418
+ ...ee(e),
1325
1419
  size: "medium"
1326
1420
  })));
1327
1421
  return {
@@ -1334,13 +1428,13 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1334
1428
  }]
1335
1429
  };
1336
1430
  }
1337
- function me(e) {
1431
+ function De(e) {
1338
1432
  return e.priority ?? 100;
1339
1433
  }
1340
- function he(e) {
1341
- 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;
1342
1436
  }
1343
- function _e(e) {
1437
+ function ke(e) {
1344
1438
  let t = {};
1345
1439
  return e.querySelectorAll(".ml-ribbon-group").forEach((e) => {
1346
1440
  let n = e.dataset.groupId;
@@ -1349,94 +1443,121 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1349
1443
  r > 0 && (t[n] = r);
1350
1444
  }), t;
1351
1445
  }
1352
- 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) {
1353
1454
  let t = Number.parseFloat(getComputedStyle(e).getPropertyValue("--ml-rb-overflow-slot-width"));
1354
- return Number.isFinite(t) && t > 0 ? t : wt;
1455
+ return Number.isFinite(t) && t > 0 ? t : Nt;
1355
1456
  }
1356
- function Z() {
1357
- if (F.layout.value !== "classic") {
1358
- H.value = /* @__PURE__ */ new Set();
1457
+ function Me() {
1458
+ if (I.layout.value !== "classic") {
1459
+ q.value = /* @__PURE__ */ new Set();
1359
1460
  return;
1360
1461
  }
1361
- let e = V.value;
1462
+ let e = I.minimized.value ? W.value : U.value;
1362
1463
  if (!e) return;
1363
- let t = R.value;
1464
+ let t = B.value;
1364
1465
  if (!t.length) {
1365
- H.value = /* @__PURE__ */ new Set();
1466
+ q.value = /* @__PURE__ */ new Set();
1366
1467
  return;
1367
1468
  }
1368
- let n = Math.round(e.getBoundingClientRect().width), r = ve(e), i = _e(e);
1369
- ce.value = {
1370
- ...ce.value,
1469
+ let n = Math.round(e.getBoundingClientRect().width), r = je(e), i = ke(e);
1470
+ pe.value = {
1471
+ ...pe.value,
1371
1472
  ...i
1372
1473
  };
1373
1474
  let a = t.filter((e) => e.enableGroupOverflow === !1), o = t.filter((e) => e.enableGroupOverflow !== !1).map((e, t) => ({
1374
1475
  group: e,
1375
1476
  index: t
1376
1477
  })), s = /* @__PURE__ */ new Set(), c = [...o].sort((e, t) => {
1377
- let n = me(t.group) - me(e.group);
1478
+ let n = De(t.group) - De(e.group);
1378
1479
  return n === 0 ? t.index - e.index : n;
1379
- }), l = (e) => i[e.id] ?? he(e), u = a.reduce((e, t) => e + l(t), 0), d = (e) => o.filter(({ group: t }) => !e.has(t.id)).reduce((e, { group: t }) => e + l(t), 0), f = (e) => u + d(e) + (e.size > 0 ? r : 0), p = 0;
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;
1380
1481
  for (; f(s) > n && p < c.length;) {
1381
1482
  let e = c[p].group;
1382
1483
  s.add(e.id), p += 1;
1383
1484
  }
1384
- H.value = s;
1485
+ q.value = s;
1385
1486
  }
1386
- function ye() {
1387
- f(() => {
1388
- if (F.layout.value !== "classic" || F.minimized.value) {
1389
- Z();
1487
+ function Ne() {
1488
+ p(() => {
1489
+ if (I.layout.value !== "classic" || I.minimized.value) {
1490
+ Me();
1390
1491
  return;
1391
1492
  }
1392
- if (H.value.size === 0) {
1393
- Z();
1493
+ if (q.value.size === 0) {
1494
+ Me();
1394
1495
  return;
1395
1496
  }
1396
- H.value = /* @__PURE__ */ new Set(), f(() => {
1397
- Z();
1497
+ q.value = /* @__PURE__ */ new Set(), p(() => {
1498
+ Me();
1398
1499
  });
1399
1500
  });
1400
1501
  }
1401
- function be(e) {
1402
- 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
+ };
1512
+ }
1513
+ function Fe() {
1514
+ G.value = !1;
1515
+ }
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;
1403
1524
  }
1404
- function xe() {
1405
- F.disabled.value || F.api.toggleSimplified();
1525
+ function Le() {
1526
+ I.disabled.value || I.api.toggleSimplified();
1406
1527
  }
1407
- function Ce() {
1408
- F.disabled.value || (F.minimized.value = !F.minimized.value);
1528
+ function Re() {
1529
+ I.disabled.value || (I.minimized.value || Fe(), I.minimized.value = !I.minimized.value);
1409
1530
  }
1410
- function Te(e) {
1411
- F.disabled.value || P("fileMenuSelect", e);
1531
+ function ze(e) {
1532
+ I.disabled.value || (Fe(), P("fileMenuSelect", e));
1412
1533
  }
1413
- function Ee() {
1414
- F.disabled.value || (F.backdropOpen.value = !0);
1534
+ function Be() {
1535
+ I.disabled.value || (Fe(), I.backdropOpen.value = !0);
1415
1536
  }
1416
- function De() {
1417
- F.disabled.value || (F.backdropOpen.value = !1);
1537
+ function Ve() {
1538
+ I.disabled.value || (I.backdropOpen.value = !1);
1418
1539
  }
1419
- function Oe(e, t) {
1420
- F.disabled.value || P("itemClick", {
1421
- tabId: F.activeTab.value,
1540
+ function Q(e, t) {
1541
+ I.disabled.value || (P("itemClick", {
1542
+ tabId: I.activeTab.value,
1422
1543
  groupId: e,
1423
1544
  itemId: t
1424
- });
1545
+ }), I.minimized.value && Fe());
1425
1546
  }
1426
- function ke(e) {
1547
+ function He(e) {
1427
1548
  if (!(e instanceof HTMLElement)) return !1;
1428
1549
  if (e.isContentEditable) return !0;
1429
1550
  let t = e.tagName;
1430
1551
  return t === "INPUT" || t === "TEXTAREA" || t === "SELECT";
1431
1552
  }
1432
- function Ae() {
1433
- if (F.disabled.value) {
1434
- F.keyTips.value = [];
1553
+ function Ue() {
1554
+ if (I.disabled.value) {
1555
+ I.keyTips.value = [];
1435
1556
  return;
1436
1557
  }
1437
- let e = L.value;
1558
+ let e = R.value;
1438
1559
  if (!e?.groups?.length) {
1439
- F.keyTips.value = [];
1560
+ I.keyTips.value = [];
1440
1561
  return;
1441
1562
  }
1442
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) => {
@@ -1449,192 +1570,358 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1449
1570
  scope: "item"
1450
1571
  } : null;
1451
1572
  }).filter((e) => !!e)));
1452
- F.keyTips.value = t;
1573
+ I.keyTips.value = t;
1453
1574
  }
1454
- function je(e) {
1455
- if (F.disabled.value) return;
1456
- let t = L.value;
1575
+ function We(e) {
1576
+ if (I.disabled.value) return;
1577
+ let t = R.value;
1457
1578
  if (t?.groups?.length) {
1458
1579
  for (let n of t.groups) if (n.visible !== !1) for (let t of n.collections ?? []) {
1459
1580
  let r = t.items.find((t) => t.id === e.targetId && t.disabled !== !0);
1460
1581
  if (r) {
1461
- 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 = "";
1462
1583
  return;
1463
1584
  }
1464
1585
  }
1465
1586
  }
1466
1587
  }
1467
- function Q() {
1468
- F.keyTipsSequence.value = "";
1588
+ function Ge() {
1589
+ I.keyTipsSequence.value = "";
1469
1590
  }
1470
- function Me(e) {
1471
- if (!F.disabled.value && !ke(e.target)) {
1591
+ function Ke(e) {
1592
+ if (!I.disabled.value && !He(e.target)) {
1472
1593
  if (e.altKey && !e.ctrlKey && !e.metaKey && e.key === "Alt") {
1473
- 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();
1474
1595
  return;
1475
1596
  }
1476
- if (F.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
1597
+ if (I.keyTipsOpen.value && !(e.altKey || e.ctrlKey || e.metaKey)) {
1477
1598
  if (e.key === "Escape") {
1478
- e.preventDefault(), F.keyTipsOpen.value = !1, Q();
1599
+ e.preventDefault(), I.keyTipsOpen.value = !1, Ge();
1479
1600
  return;
1480
1601
  }
1481
1602
  if (e.key === "Backspace") {
1482
- e.preventDefault(), F.keyTipsSequence.value = F.keyTipsSequence.value.slice(0, -1);
1603
+ e.preventDefault(), I.keyTipsSequence.value = I.keyTipsSequence.value.slice(0, -1);
1483
1604
  return;
1484
1605
  }
1485
1606
  if (/^[a-z0-9]$/i.test(e.key)) {
1486
1607
  e.preventDefault();
1487
- let t = `${F.keyTipsSequence.value}${e.key.toUpperCase()}`;
1488
- F.keyTipsSequence.value = t;
1489
- let n = t.toLowerCase(), r = F.keyTips.value.find((e) => e.key.toLowerCase() === n);
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);
1490
1611
  if (r) {
1491
- je(r);
1612
+ We(r);
1492
1613
  return;
1493
1614
  }
1494
- F.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Q();
1615
+ I.keyTips.value.some((e) => e.key.toLowerCase().startsWith(n)) || Ge();
1495
1616
  }
1496
1617
  }
1497
1618
  }
1498
1619
  }
1499
- function Ne(e) {
1500
- return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? oe : null;
1620
+ function qe(e) {
1621
+ return e.icon && typeof e.icon != "string" ? e.icon : e.groupIconCss ? le : null;
1501
1622
  }
1502
- E([
1503
- R,
1504
- () => F.layout.value,
1505
- () => F.minimized.value
1623
+ function Je(e) {
1624
+ G.value = e;
1625
+ }
1626
+ D([
1627
+ B,
1628
+ () => I.layout.value,
1629
+ () => I.minimized.value
1506
1630
  ], () => {
1507
- ye();
1508
- }), E([
1509
- L,
1510
- () => F.tabs.value,
1511
- () => F.disabled.value
1631
+ Ne();
1632
+ }), D([
1633
+ R,
1634
+ () => I.tabs.value,
1635
+ () => I.disabled.value
1512
1636
  ], () => {
1513
- Ae(), Q();
1637
+ Ue(), Ge();
1514
1638
  }, {
1515
1639
  deep: !0,
1516
1640
  immediate: !0
1517
- }), E(() => F.keyTipsOpen.value, (e) => {
1518
- e || Q();
1519
- }), E(() => F.disabled.value, (e) => {
1520
- e && (F.overflowOpen.value = !1, F.backdropOpen.value = !1, F.keyTipsOpen.value = !1, Q());
1521
- }), E(V, (e, t) => {
1522
- t && $ && $.unobserve(t), e && $ && $.observe(e);
1523
- }, { 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
+ });
1524
1658
  let $ = null;
1525
- return h(() => {
1526
- window.addEventListener("keydown", Me), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
1527
- ye();
1528
- }), V.value && $.observe(V.value)), ye();
1529
- }), g(() => {
1530
- window.removeEventListener("keydown", Me), $?.disconnect();
1531
- }), l(F.api), (t, l) => (_(), n(T(te), { size: N.size }, {
1532
- default: D(() => [(_(), i("section", {
1533
- key: T(F).disabled.value ? "ml-ribbon-disabled" : "ml-ribbon-enabled",
1534
- class: p(["ml-ribbon", [
1535
- `ml-ribbon--${T(F).layout.value}`,
1536
- `ml-ribbon--size-${G.value}`,
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();
1663
+ }), _(() => {
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",
1674
+ class: m(["ml-ribbon", [
1675
+ `ml-ribbon--${E(I).layout.value}`,
1676
+ `ml-ribbon--size-${Y.value}`,
1537
1677
  {
1538
- "ml-ribbon--disabled": T(F).disabled.value,
1539
- "ml-ribbon--minimized": T(F).minimized.value,
1540
- "ml-ribbon--keytips-open": T(F).keyTipsOpen.value
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
1541
1681
  }
1542
1682
  ]]),
1543
- inert: T(F).disabled.value,
1544
- "aria-disabled": T(F).disabled.value
1683
+ inert: E(I).disabled.value,
1684
+ "aria-disabled": E(I).disabled.value
1545
1685
  }, [
1546
- a("header", dt, [a("div", ft, [
1547
- s.showFileMenu ? (_(), n(we, {
1548
- key: 0,
1549
- items: s.fileMenuItems,
1550
- disabled: T(F).disabled.value,
1551
- label: q.value.fileMenuLabel,
1552
- "open-backstage-label": q.value.fileMenuOpenBackstageLabel,
1553
- "show-open-backstage": s.showOpenBackstage,
1554
- onSelect: Te,
1555
- onOpenBackstage: Ee
1556
- }, null, 8, [
1557
- "items",
1558
- "disabled",
1559
- "label",
1560
- "open-backstage-label",
1561
- "show-open-backstage"
1562
- ])) : r("", !0),
1563
- c(Se, {
1564
- tabs: T(ne),
1565
- "active-tab": T(F).activeTab.value,
1566
- disabled: T(F).disabled.value,
1567
- "default-contextual-title": q.value.contextualTabDefaultTitle,
1568
- onSelect: be
1569
- }, null, 8, [
1570
- "tabs",
1571
- "active-tab",
1572
- "disabled",
1573
- "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
+ ]))
1574
1746
  ]),
1575
- N.hideMinimizeButton ? r("", !0) : (_(), n(T(B), {
1576
- key: 1,
1577
- content: q.value.minimizeTooltip
1578
- }, {
1579
- default: D(() => [c(T(O), {
1580
- class: p([
1581
- "ml-ribbon__control",
1582
- "ml-ribbon__control--minimize",
1583
- T(F).minimized.value ? "ml-ribbon__control--minimize-up" : "ml-ribbon__control--minimize-down"
1584
- ]),
1585
- icon: J.value,
1586
- disabled: T(F).disabled.value,
1587
- onClick: Ce
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
1588
1776
  }, null, 8, [
1589
- "class",
1590
- "icon",
1777
+ "active-text",
1778
+ "inactive-text",
1779
+ "model-value",
1591
1780
  "disabled"
1592
- ])]),
1593
- _: 1
1594
- }, 8, ["content"]))
1595
- ]), a("div", pt, [
1596
- N.hideLayoutSwitcher ? r("", !0) : (_(), n(T(B), {
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), {
1597
1790
  key: 0,
1598
- 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
1599
1799
  }, {
1600
- default: D(() => [c(T(O), {
1601
- circle: "",
1602
- class: "ml-ribbon__control ml-ribbon__control--layout",
1603
- icon: T(se),
1604
- disabled: T(F).disabled.value,
1605
- onClick: xe
1606
- }, 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))]),
1607
1910
  _: 1
1608
- }, 8, ["content"])),
1609
- N.hideKeyTipsToggle ? r("", !0) : (_(), n(T(z), {
1610
- key: 1,
1611
- "inline-prompt": "",
1612
- class: "ml-ribbon__control ml-ribbon__control--keytips",
1613
- "active-text": q.value.keyTipsToggleText,
1614
- "inactive-text": q.value.keyTipsToggleText,
1615
- "model-value": T(F).keyTipsOpen.value,
1616
- disabled: T(F).disabled.value,
1617
- onChange: l[0] ||= (e) => T(F).keyTipsOpen.value = !T(F).keyTipsOpen.value
1618
- }, null, 8, [
1619
- "active-text",
1620
- "inactive-text",
1621
- "model-value",
1622
- "disabled"
1623
- ])),
1624
- t.$slots["tabs-extra"] ? (_(), i("div", mt, [x(t.$slots, "tabs-extra", {
1625
- activeTab: T(F).activeTab.value,
1626
- layout: T(F).layout.value,
1627
- minimized: T(F).minimized.value,
1628
- disabled: T(F).disabled.value
1629
- })])) : r("", !0)
1630
- ])]),
1631
- !T(F).minimized.value && L.value && T(F).layout.value === "classic" ? (_(), 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", {
1632
1919
  key: 0,
1633
1920
  class: "ml-ribbon__panel",
1634
- "data-active-tab": L.value.id,
1921
+ "data-active-tab": R.value.id,
1635
1922
  ref_key: "classicPanelRef",
1636
- ref: V
1637
- }, [(_(!0), i(e, null, b(Y.value, (e) => (_(), n(lt, {
1923
+ ref: U
1924
+ }, [(v(!0), i(e, null, x(xe.value, (e) => (v(), n(ut, {
1638
1925
  id: e.id,
1639
1926
  key: e.id,
1640
1927
  "data-group-id": e.id,
@@ -1643,18 +1930,19 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1643
1930
  "group-icon-css": e.groupIconCss,
1644
1931
  orientation: e.orientation,
1645
1932
  "auto-width": e.autoWidth,
1933
+ width: e.width,
1646
1934
  priority: e.priority ?? 100,
1647
1935
  launcher: e.launcher,
1648
1936
  "show-launcher-icon": e.showLauncherIcon,
1649
1937
  "group-model": e,
1650
- "overflow-trigger-aria-label": q.value.groupOverflowTriggerAriaLabel,
1651
- "gallery-preview-fallback": q.value.galleryPreviewFallback,
1652
- onItemClick: l[2] ||= (e) => Oe(e.groupId, e.itemId)
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)
1653
1941
  }, {
1654
- default: D(() => [c(et, {
1942
+ default: O(() => [c(tt, {
1655
1943
  group: e,
1656
- "gallery-preview-fallback": q.value.galleryPreviewFallback,
1657
- 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)
1658
1946
  }, null, 8, ["group", "gallery-preview-fallback"])]),
1659
1947
  _: 2
1660
1948
  }, 1032, [
@@ -1665,88 +1953,89 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1665
1953
  "group-icon-css",
1666
1954
  "orientation",
1667
1955
  "auto-width",
1956
+ "width",
1668
1957
  "priority",
1669
1958
  "launcher",
1670
1959
  "show-launcher-icon",
1671
1960
  "group-model",
1672
1961
  "overflow-trigger-aria-label",
1673
1962
  "gallery-preview-fallback"
1674
- ]))), 128)), X.value.length ? (_(), i("section", gt, [a("div", _t, [c(T(re), {
1963
+ ]))), 128)), Se.value.length ? (v(), i("section", Tt, [a("div", Et, [c(E(L), {
1675
1964
  trigger: "click",
1676
1965
  placement: "bottom-end",
1677
- width: fe.value,
1678
- disabled: T(F).disabled.value,
1679
- "popper-class": ue.value,
1680
- onShow: l[4] ||= (e) => T(F).overflowOpen.value = !0,
1681
- onHide: l[5] ||= (e) => T(F).overflowOpen.value = !1
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
1682
1971
  }, {
1683
- reference: D(() => [a("button", {
1972
+ reference: O(() => [a("button", {
1684
1973
  type: "button",
1685
1974
  class: "ml-ribbon-overflow-trigger",
1686
- "aria-label": q.value.overflowTriggerAriaLabel,
1687
- disabled: T(F).disabled.value
1688
- }, [...l[7] ||= [a("span", { class: "ml-ribbon-overflow-trigger__dots" }, "...", -1)]], 8, vt)]),
1689
- default: D(() => [a("div", yt, [(_(!0), i(e, null, b(X.value, (e) => (_(), i("section", {
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", {
1690
1979
  key: e.id,
1691
1980
  class: "ml-ribbon-overflow-group"
1692
- }, [a("header", bt, C(e.title), 1), c(et, {
1981
+ }, [a("header", kt, w(e.title), 1), c(tt, {
1693
1982
  group: e,
1694
- "gallery-preview-fallback": q.value.galleryPreviewFallback,
1695
- 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)
1696
1985
  }, null, 8, ["group", "gallery-preview-fallback"])]))), 128))])]),
1697
1986
  _: 1
1698
1987
  }, 8, [
1699
1988
  "width",
1700
1989
  "disabled",
1701
1990
  "popper-class"
1702
- ])]), l[8] ||= a("footer", { class: "ml-ribbon-group__footer ml-ribbon-group__footer--overflow" }, null, -1)])) : r("", !0)], 8, ht)) : r("", !0),
1703
- !T(F).minimized.value && L.value && T(F).layout.value === "simplified" ? (_(), i("main", {
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", {
1704
1993
  key: 1,
1705
1994
  class: "ml-ribbon__panel ml-ribbon__panel--simplified",
1706
- "data-active-tab": L.value.id
1707
- }, [(_(!0), i(e, null, b(R.value, (e) => (_(), n(T(re), {
1995
+ "data-active-tab": R.value.id
1996
+ }, [(v(!0), i(e, null, x(B.value, (e) => (v(), n(E(L), {
1708
1997
  key: e.id,
1709
1998
  trigger: "click",
1710
1999
  placement: "bottom-start",
1711
2000
  width: 340,
1712
- disabled: T(F).disabled.value,
1713
- "popper-class": K.value
2001
+ disabled: E(I).disabled.value,
2002
+ "popper-class": he.value
1714
2003
  }, {
1715
- reference: D(() => [a("button", {
2004
+ reference: O(() => [a("button", {
1716
2005
  class: "ml-ribbon-simplified-group",
1717
2006
  type: "button",
1718
- disabled: T(F).disabled.value
1719
- }, [Ne(e) ? (_(), n(T(I), {
2007
+ disabled: E(I).disabled.value
2008
+ }, [qe(e) ? (v(), n(E(F), {
1720
2009
  key: 0,
1721
2010
  class: "ml-ribbon-simplified-group__icon"
1722
2011
  }, {
1723
- default: D(() => [(_(), n(S(Ne(e))))]),
2012
+ default: O(() => [(v(), n(C(qe(e))))]),
1724
2013
  _: 2
1725
- }, 1024)) : r("", !0), a("span", null, C(e.title), 1)], 8, St)]),
1726
- default: D(() => [a("div", Ct, [c(et, {
1727
- group: pe(e),
1728
- "gallery-preview-fallback": q.value.galleryPreviewFallback,
1729
- onItemClick: l[6] ||= (e) => Oe(e.groupId, e.itemId)
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)
1730
2019
  }, null, 8, ["group", "gallery-preview-fallback"])])]),
1731
2020
  _: 2
1732
- }, 1032, ["disabled", "popper-class"]))), 128))], 8, xt)) : r("", !0),
1733
- c(ge, {
1734
- open: T(F).backdropOpen.value,
1735
- size: G.value,
1736
- "back-label": q.value.backstageBackLabel,
1737
- title: q.value.backstageTitle,
1738
- description: q.value.backstageDescription,
1739
- onClose: De
2021
+ }, 1032, ["disabled", "popper-class"]))), 128))], 8, At)) : r("", !0),
2022
+ c(_e, {
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
1740
2029
  }, o({ _: 2 }, [t.$slots.backstage ? {
1741
2030
  name: "default",
1742
- fn: D(() => [x(t.$slots, "backstage", {
1743
- close: De,
1744
- open: T(F).backdropOpen.value,
1745
- size: G.value,
1746
- backLabel: q.value.backstageBackLabel,
1747
- title: q.value.backstageTitle,
1748
- description: q.value.backstageDescription,
1749
- disabled: T(F).disabled.value
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
1750
2039
  })]),
1751
2040
  key: "0"
1752
2041
  } : void 0]), 1032, [
@@ -1756,14 +2045,14 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1756
2045
  "title",
1757
2046
  "description"
1758
2047
  ])
1759
- ], 10, ut))]),
2048
+ ], 10, dt))]),
1760
2049
  _: 3
1761
2050
  }, 8, ["size"]));
1762
2051
  }
1763
- }), Et = {
2052
+ }), Ft = {
1764
2053
  class: "ml-ribbon-tab-definition",
1765
2054
  hidden: ""
1766
- }, Dt = /* @__PURE__ */ l({
2055
+ }, It = /* @__PURE__ */ l({
1767
2056
  __name: "RibbonTab",
1768
2057
  props: {
1769
2058
  id: {},
@@ -1774,13 +2063,13 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1774
2063
  contextualTitle: {}
1775
2064
  },
1776
2065
  setup(e) {
1777
- return (e, t) => (_(), i("div", Et, [x(e.$slots, "default")]));
2066
+ return (e, t) => (v(), i("div", Ft, [S(e.$slots, "default")]));
1778
2067
  }
1779
- }), Ot = {
2068
+ }), Lt = {
1780
2069
  key: 0,
1781
2070
  class: "ml-ribbon-keytips",
1782
2071
  "aria-live": "polite"
1783
- }, kt = { class: "ml-ribbon-keytips__hint" }, At = /* @__PURE__ */ l({
2072
+ }, Rt = { class: "ml-ribbon-keytips__hint" }, zt = /* @__PURE__ */ l({
1784
2073
  __name: "RibbonKeyTips",
1785
2074
  props: {
1786
2075
  open: { type: Boolean },
@@ -1790,14 +2079,14 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1790
2079
  },
1791
2080
  emits: ["activate", "close"],
1792
2081
  setup(n, { emit: o }) {
1793
- let s = n, c = o, l = y(""), u = t(() => l.value ? s.tips.filter((e) => e.key.toLowerCase().startsWith(l.value.toLowerCase())) : s.tips), d = t(() => l.value || s.emptySequenceText || ""), f = t(() => s.sequencePrefix ? `${s.sequencePrefix}${d.value}` : d.value), p = t(() => l.value.toLowerCase()), m = t(() => s.tips.filter((e) => e.key.toLowerCase() === p.value)), v = t(() => s.tips.some((e) => e.key.toLowerCase().startsWith(p.value)));
1794
- function x() {
2082
+ let s = n, c = o, l = b(""), u = t(() => l.value ? s.tips.filter((e) => e.key.toLowerCase().startsWith(l.value.toLowerCase())) : s.tips), d = t(() => l.value || s.emptySequenceText || ""), f = t(() => s.sequencePrefix ? `${s.sequencePrefix}${d.value}` : d.value), p = t(() => l.value.toLowerCase()), m = t(() => s.tips.filter((e) => e.key.toLowerCase() === p.value)), h = t(() => s.tips.some((e) => e.key.toLowerCase().startsWith(p.value)));
2083
+ function y() {
1795
2084
  l.value = "";
1796
2085
  }
1797
2086
  function S(e) {
1798
2087
  if (s.open && !(e.altKey || e.ctrlKey || e.metaKey)) {
1799
2088
  if (e.key === "Escape") {
1800
- e.preventDefault(), x(), c("close");
2089
+ e.preventDefault(), y(), c("close");
1801
2090
  return;
1802
2091
  }
1803
2092
  if (e.key === "Backspace") {
@@ -1806,20 +2095,20 @@ var fe = { class: "ml-ribbon-backstage__nav" }, pe = { class: "ml-ribbon-backsta
1806
2095
  }
1807
2096
  if (/^[a-z0-9]$/i.test(e.key)) {
1808
2097
  if (e.preventDefault(), l.value += e.key.toUpperCase(), m.value.length > 0) {
1809
- c("activate", m.value[0]), x();
2098
+ c("activate", m.value[0]), y();
1810
2099
  return;
1811
2100
  }
1812
- v.value || x();
2101
+ h.value || y();
1813
2102
  }
1814
2103
  }
1815
2104
  }
1816
- return h(() => window.addEventListener("keydown", S)), g(() => window.removeEventListener("keydown", S)), E(() => s.open, (e) => {
1817
- e || x();
1818
- }), (t, o) => n.open ? (_(), i("div", Ot, [a("div", kt, C(f.value), 1), (_(!0), i(e, null, b(u.value, (e) => (_(), i("span", {
2105
+ return g(() => window.addEventListener("keydown", S)), _(() => window.removeEventListener("keydown", S)), D(() => s.open, (e) => {
2106
+ e || y();
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", {
1819
2108
  key: e.id,
1820
2109
  class: "ml-ribbon-keytip"
1821
- }, C(e.key), 1))), 128))])) : r("", !0);
2110
+ }, w(e.key), 1))), 128))])) : r("", !0);
1822
2111
  }
1823
2112
  });
1824
2113
  //#endregion
1825
- export { Tt as MlRibbon, ge as MlRibbonBackstage, Pe as MlRibbonButtonGroup, Te as MlRibbonCollection, Se as MlRibbonContextualTabs, we as MlRibbonFileMenu, Me as MlRibbonGallery, lt as MlRibbonGroup, $e as MlRibbonItemHost, At as MlRibbonKeyTips, Be as MlRibbonSegmented, Dt as MlRibbonTab, Z as MlRibbonTabs, We as MlRibbonTemplateItem, He as MlRibbonToggleButton };
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 };