@mlightcad/ribbon 0.0.4 → 0.0.6

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