morya-ui 0.5.0 → 0.5.1

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{Input-D2bee2LU.js → Input-BErawS7K.js} +1 -5
  3. package/dist/{Pagination-DpNOb0CS.js → Pagination-B8WYoL2a.js} +1 -1
  4. package/dist/{Popover-Bnz7KNZq.js → Popover-zQChu00_.js} +6 -1
  5. package/dist/{Select-q4X2ff_M.js → Select-BaFKBeIh.js} +2 -2
  6. package/dist/{Textarea-DsFOAtPd.js → Textarea-WCEgpzbq.js} +1 -5
  7. package/dist/calendar/index.js +1 -1
  8. package/dist/color-picker/index.js +4 -4
  9. package/dist/command-menu/index.js +73 -66
  10. package/dist/components/ColorPicker/ColorPicker.vue.d.ts +1 -1
  11. package/dist/components/ColorPicker/types.d.ts +1 -1
  12. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  13. package/dist/components/CommandMenu/CommandMenu.vue.d.ts.map +1 -1
  14. package/dist/components/ContextMenu/ContextMenuNodes.vue.d.ts.map +1 -1
  15. package/dist/components/Dock/Dock.vue.d.ts.map +1 -1
  16. package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
  17. package/dist/components/Input/Input.vue.d.ts +0 -1
  18. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  19. package/dist/components/Input/types.d.ts +0 -2
  20. package/dist/components/Input/types.d.ts.map +1 -1
  21. package/dist/components/InputPassword/InputPassword.vue.d.ts +0 -1
  22. package/dist/components/InputPassword/InputPassword.vue.d.ts.map +1 -1
  23. package/dist/components/InputPassword/types.d.ts +0 -2
  24. package/dist/components/InputPassword/types.d.ts.map +1 -1
  25. package/dist/components/MegaMenu/MegaMenu.vue.d.ts.map +1 -1
  26. package/dist/components/Mentions/Mentions.vue.d.ts +0 -1
  27. package/dist/components/Mentions/Mentions.vue.d.ts.map +1 -1
  28. package/dist/components/Mentions/types.d.ts +0 -2
  29. package/dist/components/Mentions/types.d.ts.map +1 -1
  30. package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
  31. package/dist/components/Menu/MenuNodes.vue.d.ts.map +1 -1
  32. package/dist/components/Menu/styles.css +45 -3
  33. package/dist/components/Menu/types.d.ts +3 -1
  34. package/dist/components/Menu/types.d.ts.map +1 -1
  35. package/dist/components/Menubar/Menubar.vue.d.ts +2 -2
  36. package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
  37. package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
  38. package/dist/components/Rating/Rating.vue.d.ts +1 -1
  39. package/dist/components/Rating/types.d.ts +2 -2
  40. package/dist/components/Rating/types.d.ts.map +1 -1
  41. package/dist/components/Select/Select.vue.d.ts +1 -1
  42. package/dist/components/Select/types.d.ts +1 -1
  43. package/dist/components/Select/types.d.ts.map +1 -1
  44. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  45. package/dist/components/SpeedDial/SpeedDial.vue.d.ts +3 -3
  46. package/dist/components/SpeedDial/SpeedDial.vue.d.ts.map +1 -1
  47. package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
  48. package/dist/components/Textarea/Textarea.vue.d.ts +0 -1
  49. package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
  50. package/dist/components/Textarea/types.d.ts +0 -2
  51. package/dist/components/Textarea/types.d.ts.map +1 -1
  52. package/dist/components/Tooltip/styles.css +15 -2
  53. package/dist/context-menu/index.js +92 -84
  54. package/dist/data-view/index.js +1 -1
  55. package/dist/dock/index.js +21 -18
  56. package/dist/dropdown/index.js +103 -95
  57. package/dist/{icon-H8prbteT.js → icon-CUrSaD8r.js} +4 -1
  58. package/dist/index.js +3464 -3391
  59. package/dist/input/index.js +1 -1
  60. package/dist/input-password/index.js +1 -5
  61. package/dist/list/index.js +1 -1
  62. package/dist/mega-menu/index.js +94 -87
  63. package/dist/mentions/index.js +35 -39
  64. package/dist/menu/index.js +235 -213
  65. package/dist/menu/style.css +60 -5
  66. package/dist/menubar/index.js +106 -98
  67. package/dist/pagination/index.js +1 -1
  68. package/dist/popover/index.js +1 -1
  69. package/dist/rating/index.js +2 -2
  70. package/dist/select/index.js +1 -1
  71. package/dist/shared/menu/icon.d.ts +3 -0
  72. package/dist/shared/menu/icon.d.ts.map +1 -1
  73. package/dist/shared/menu/index.d.ts +2 -2
  74. package/dist/shared/menu/index.d.ts.map +1 -1
  75. package/dist/shared/menu/types.d.ts +3 -1
  76. package/dist/shared/menu/types.d.ts.map +1 -1
  77. package/dist/sidebar/index.js +37 -29
  78. package/dist/speed-dial/index.js +101 -94
  79. package/dist/split-button/index.js +3 -3
  80. package/dist/styles.css +1 -1
  81. package/dist/table/index.js +3 -3
  82. package/dist/textarea/index.js +1 -1
  83. package/dist/toggle-button/index.js +1 -1
  84. package/dist/tooltip/style.css +15 -2
  85. package/dist/typography/index.js +1 -1
  86. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
- import { t as e } from "../Input-D2bee2LU.js";
1
+ import { t as e } from "../Input-BErawS7K.js";
2
2
  import "./style.js";
3
3
  export { e as MInput };
@@ -70,10 +70,6 @@ var w = ["for"], T = [
70
70
  type: Boolean,
71
71
  default: void 0
72
72
  },
73
- allowClear: {
74
- type: Boolean,
75
- default: void 0
76
- },
77
73
  maxlength: {},
78
74
  showCount: {
79
75
  type: Boolean,
@@ -96,7 +92,7 @@ var w = ["for"], T = [
96
92
  "change"
97
93
  ],
98
94
  setup(m, { expose: E, emit: le }) {
99
- let D = m, O = le, ue = C(), { rootAttrs: de, controlAttrs: fe } = e(ue, () => D.pt), k = i("InputPassword"), pe = ne(r, null), A = s(), j = v(!1), M = v(null), N = t("m-password"), P = c(() => D.id ?? N), F = c(() => D.invalid || D.status === "error"), I = c(() => D.status === "warning" && !F.value), L = a("InputPassword", () => D.size ?? pe?.value.size), R = c(() => ee(L.value)), z = o("InputPassword", () => D.variant), B = c(() => D.fluid ?? k.value.fluid ?? !1), me = c(() => D.clearable ?? D.allowClear ?? k.value.clearable ?? k.value.allowClear ?? !1), V = c(() => D.showCount ?? k.value.showCount ?? !1), H = c(() => D.showPasswordOn ?? k.value.showPasswordOn ?? "click"), U = c(() => typeof D.showIcon == "string" ? D.showIcon : void 0), W = c(() => typeof D.showIcon == "string" || !D.showIcon ? void 0 : D.showIcon), G = c(() => typeof D.hideIcon == "string" ? D.hideIcon : void 0), K = c(() => typeof D.hideIcon == "string" || !D.hideIcon ? void 0 : D.hideIcon), q = c(() => {
95
+ let D = m, O = le, ue = C(), { rootAttrs: de, controlAttrs: fe } = e(ue, () => D.pt), k = i("InputPassword"), pe = ne(r, null), A = s(), j = v(!1), M = v(null), N = t("m-password"), P = c(() => D.id ?? N), F = c(() => D.invalid || D.status === "error"), I = c(() => D.status === "warning" && !F.value), L = a("InputPassword", () => D.size ?? pe?.value.size), R = c(() => ee(L.value)), z = o("InputPassword", () => D.variant), B = c(() => D.fluid ?? k.value.fluid ?? !1), me = c(() => D.clearable ?? k.value.clearable ?? !1), V = c(() => D.showCount ?? k.value.showCount ?? !1), H = c(() => D.showPasswordOn ?? k.value.showPasswordOn ?? "click"), U = c(() => typeof D.showIcon == "string" ? D.showIcon : void 0), W = c(() => typeof D.showIcon == "string" || !D.showIcon ? void 0 : D.showIcon), G = c(() => typeof D.hideIcon == "string" ? D.hideIcon : void 0), K = c(() => typeof D.hideIcon == "string" || !D.hideIcon ? void 0 : D.hideIcon), q = c(() => {
100
96
  let e = D.modelValue ?? "";
101
97
  if (!e) return "empty";
102
98
  let t = 0;
@@ -1,6 +1,6 @@
1
1
  import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
2
2
  import { t } from "../Loading-DE9Iaiao.js";
3
- import { t as n } from "../Pagination-DpNOb0CS.js";
3
+ import { t as n } from "../Pagination-B8WYoL2a.js";
4
4
  import { t as r } from "../Empty-By1qe-ew.js";
5
5
  import { o as i } from "../config-Cd20zAyW.js";
6
6
  import "./style.js";
@@ -2,31 +2,31 @@ import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
2
2
  import { n as t, t as n } from "../overlay-oR-5MDuE.js";
3
3
  import { t as r } from "../overlayPlacement-qwEJPVS4.js";
4
4
  import { t as ee } from "../useFloatingViewportSync-wLLKIGUA.js";
5
- import { t as te } from "../useMotionTransition-DohkfWRB.js";
6
- import { t as i } from "../Icon-CmHjx7W8.js";
5
+ import { t as i } from "../useMotionTransition-DohkfWRB.js";
6
+ import { t as te } from "../Icon-CmHjx7W8.js";
7
7
  import { t as a } from "../useMenuKeyboard-BedmYE4W.js";
8
- import { t as ne } from "../icon-H8prbteT.js";
9
- import { l as re } from "../config-Cd20zAyW.js";
10
- import { n as ie } from "../locale-BcxMPufl.js";
8
+ import { n as o, t as s } from "../icon-CUrSaD8r.js";
9
+ import { l as ne } from "../config-Cd20zAyW.js";
10
+ import { n as re } from "../locale-BcxMPufl.js";
11
11
  import "./style.js";
12
- import { Fragment as o, Teleport as s, Transition as ae, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as oe, createTextVNode as se, createVNode as f, defineComponent as p, mergeProps as ce, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as le, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, useAttrs as C, watch as w, withCtx as ue, withModifiers as T } from "vue";
12
+ import { Fragment as c, Teleport as ie, Transition as ae, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as oe, createVNode as se, defineComponent as m, mergeProps as ce, nextTick as h, normalizeClass as g, normalizeStyle as le, onBeforeUnmount as ue, onMounted as de, openBlock as _, ref as v, renderList as y, resolveDynamicComponent as fe, toDisplayString as b, unref as x, useAttrs as pe, watch as S, withCtx as me, withModifiers as C } from "vue";
13
13
  //#region src/components/MegaMenu/MegaMenu.vue?vue&type=script&setup=true&lang.ts
14
- var de = ["aria-label"], fe = [
14
+ var he = ["aria-label"], ge = [
15
15
  "disabled",
16
16
  "tabindex",
17
17
  "aria-expanded",
18
18
  "aria-haspopup",
19
19
  "onClick",
20
20
  "onFocus"
21
- ], pe = {
21
+ ], _e = {
22
22
  key: 0,
23
23
  class: "m-megamenu__icon",
24
24
  "aria-hidden": "true"
25
- }, me = [
25
+ }, ve = [
26
26
  "disabled",
27
27
  "tabindex",
28
28
  "onClick"
29
- ], E = /* @__PURE__ */ p({
29
+ ], w = /* @__PURE__ */ m({
30
30
  inheritAttrs: !1,
31
31
  __name: "MegaMenu",
32
32
  props: {
@@ -44,34 +44,40 @@ var de = ["aria-label"], fe = [
44
44
  }
45
45
  },
46
46
  emits: ["update:selectedKey", "select"],
47
- setup(p, { emit: E }) {
48
- let D = p, O = E, he = C(), { rootAttrs: ge } = e(he, () => D.pt), k = re(), { transitionName: _e, transitionCss: A } = te({
47
+ setup(m, { emit: w }) {
48
+ let T = m, E = w, ye = pe(), { rootAttrs: be } = e(ye, () => T.pt), D = ne(), { transitionName: O, transitionCss: k } = i({
49
49
  role: "popup",
50
- local: () => D.transition,
50
+ local: () => T.transition,
51
51
  componentName: "MegaMenu",
52
52
  fallback: "scale-fade"
53
- }), j = ie(), M = y(null), N = y(null), P = y([]), F = y({}), I = c(() => t(D, k.value.appendTo)), L = c(() => n(D, k.value.appendTo));
54
- function ve(e, t) {
55
- P.value[t] = e instanceof HTMLElement ? e : null;
53
+ }), A = re(), j = v(null), M = v(null), N = v([]), P = v({}), F = l(() => t(T, D.value.appendTo)), I = l(() => n(T, D.value.appendTo));
54
+ function xe(e, t) {
55
+ N.value[t] = e instanceof HTMLElement ? e : null;
56
56
  }
57
- function R() {
58
- if (!L.value || M.value == null) return;
59
- let e = P.value[M.value];
57
+ function L() {
58
+ if (!I.value || j.value == null) return;
59
+ let e = N.value[j.value];
60
60
  if (!e) return;
61
61
  let t = e.getBoundingClientRect();
62
- F.value = r(t, "bottom-start", { gap: 4 });
62
+ P.value = r(t, "bottom-start", { gap: 4 });
63
63
  }
64
- function z(e) {
64
+ function R(e) {
65
65
  return e.key ?? e.label;
66
66
  }
67
+ function z(e) {
68
+ return !!(T.selectedKey && R(e) === T.selectedKey);
69
+ }
67
70
  function B(e) {
68
- return !!(D.selectedKey && z(e) === D.selectedKey);
71
+ return typeof e.icon == "string" ? s(e.icon) : void 0;
69
72
  }
70
73
  function V(e) {
71
- return ne(e.icon);
74
+ return o(e.icon);
75
+ }
76
+ function Se(e) {
77
+ return !!(B(e) || V(e));
72
78
  }
73
79
  function H(e) {
74
- e.disabled || (e.command?.(), O("update:selectedKey", z(e)), O("select", e));
80
+ e.disabled || (e.command?.(), E("update:selectedKey", R(e)), E("select", e));
75
81
  }
76
82
  function U(e, t) {
77
83
  if (!t.disabled) {
@@ -79,64 +85,64 @@ var de = ["aria-label"], fe = [
79
85
  H(t), Y();
80
86
  return;
81
87
  }
82
- M.value = M.value === e ? null : e, M.value != null && m(() => R());
88
+ j.value = j.value === e ? null : e, j.value != null && h(() => L());
83
89
  }
84
90
  }
85
- let W = c(() => M.value == null ? [] : (D.model[M.value]?.items ?? []).flat()), G = a({
86
- itemCount: () => D.model.length,
87
- isItemDisabled: (e) => !!D.model[e]?.disabled,
91
+ let W = l(() => j.value == null ? [] : (T.model[j.value]?.items ?? []).flat()), G = a({
92
+ itemCount: () => T.model.length,
93
+ isItemDisabled: (e) => !!T.model[e]?.disabled,
88
94
  orientation: "horizontal",
89
95
  initialActiveIndex: 0,
90
96
  onActivate: (e) => {
91
- let t = D.model[e];
97
+ let t = T.model[e];
92
98
  t && U(e, t);
93
99
  }
94
100
  }), K = a({
95
101
  itemCount: () => W.value.length,
96
102
  isItemDisabled: (e) => !!W.value[e]?.disabled,
97
- enabled: () => M.value != null,
103
+ enabled: () => j.value != null,
98
104
  onActivate: (e) => {
99
105
  let t = W.value[e];
100
106
  t && Q(t);
101
107
  }
102
108
  });
103
109
  function q(e) {
104
- P.value[e]?.focus({ preventScroll: !0 });
110
+ N.value[e]?.focus({ preventScroll: !0 });
105
111
  }
106
- function ye() {
107
- return N.value?.querySelector(".m-megamenu__panel") || document.querySelector(".m-megamenu__panel--teleported");
112
+ function Ce() {
113
+ return M.value?.querySelector(".m-megamenu__panel") || document.querySelector(".m-megamenu__panel--teleported");
108
114
  }
109
115
  function J() {
110
116
  let e = K.activeIndex.value;
111
- e < 0 || ye()?.querySelectorAll(".m-megamenu__link")[e]?.focus({ preventScroll: !0 });
117
+ e < 0 || Ce()?.querySelectorAll(".m-megamenu__link")[e]?.focus({ preventScroll: !0 });
112
118
  }
113
- function be(e, t) {
114
- let n = M.value == null ? [] : D.model[M.value]?.items ?? [], r = t;
119
+ function we(e, t) {
120
+ let n = j.value == null ? [] : T.model[j.value]?.items ?? [], r = t;
115
121
  for (let t = 0; t < e; t++) r += n[t]?.length ?? 0;
116
122
  return K.tabindexFor(r);
117
123
  }
118
124
  function Y(e = !1) {
119
- let t = M.value;
120
- M.value = null, K.reset(), e && t != null && q(t);
125
+ let t = j.value;
126
+ j.value = null, K.reset(), e && t != null && q(t);
121
127
  }
122
128
  function X(e, t = !1) {
123
- M.value = e, G.setActive(e), m(() => {
124
- R(), t && (K.moveFirst(), J());
129
+ j.value = e, G.setActive(e), h(() => {
130
+ L(), t && (K.moveFirst(), J());
125
131
  });
126
132
  }
127
133
  function Z(e) {
128
134
  G.move(e);
129
- let t = G.activeIndex.value, n = D.model[t];
130
- M.value != null && (n?.items?.length ? X(t, !0) : Y()), q(t);
135
+ let t = G.activeIndex.value, n = T.model[t];
136
+ j.value != null && (n?.items?.length ? X(t, !0) : Y()), q(t);
131
137
  }
132
- function xe(e) {
138
+ function Te(e) {
133
139
  if (e.key === "Escape") {
134
- M.value != null && (e.preventDefault(), Y(!0));
140
+ j.value != null && (e.preventDefault(), Y(!0));
135
141
  return;
136
142
  }
137
143
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
138
144
  e.preventDefault();
139
- let t = G.activeIndex.value, n = D.model[t];
145
+ let t = G.activeIndex.value, n = T.model[t];
140
146
  n?.items?.length && !n.disabled && X(t, !0);
141
147
  return;
142
148
  }
@@ -146,7 +152,7 @@ var de = ["aria-label"], fe = [
146
152
  }
147
153
  G.onKeydown(e);
148
154
  }
149
- function Se(e) {
155
+ function Ee(e) {
150
156
  if (e.stopPropagation(), e.key === "Escape") {
151
157
  e.preventDefault(), Y(!0);
152
158
  return;
@@ -160,71 +166,72 @@ var de = ["aria-label"], fe = [
160
166
  function Q(e) {
161
167
  e.disabled || (H(e), Y(!0));
162
168
  }
163
- w(G.activeIndex, (e) => {
164
- e >= 0 && M.value == null && q(e);
165
- }), w(K.activeIndex, () => {
166
- M.value != null && J();
169
+ S(G.activeIndex, (e) => {
170
+ e >= 0 && j.value == null && q(e);
171
+ }), S(K.activeIndex, () => {
172
+ j.value != null && J();
167
173
  });
168
174
  function $(e) {
169
175
  let t = e.target;
170
- N.value?.contains(t) || document.querySelector(".m-megamenu__panel--teleported")?.contains(t) || Y();
176
+ M.value?.contains(t) || document.querySelector(".m-megamenu__panel--teleported")?.contains(t) || Y();
171
177
  }
172
- function Ce() {
173
- M.value != null && R();
178
+ function De() {
179
+ j.value != null && L();
174
180
  }
175
- return ee(() => M.value != null && L.value, Ce), le(() => document.addEventListener("click", $)), _(() => {
181
+ return ee(() => j.value != null && I.value, De), de(() => document.addEventListener("click", $)), ue(() => {
176
182
  document.removeEventListener("click", $);
177
- }), (e, t) => (v(), d("nav", ce(S(ge), {
183
+ }), (e, t) => (_(), f("nav", ce(x(be), {
178
184
  ref_key: "root",
179
- ref: N,
185
+ ref: M,
180
186
  class: "m-megamenu",
181
- "aria-label": S(j).megaMenu,
182
- onKeydown: xe
183
- }), [(v(!0), d(o, null, b(p.model, (e, t) => (v(), d("div", {
187
+ "aria-label": x(A).megaMenu,
188
+ onKeydown: Te
189
+ }), [(_(!0), f(c, null, y(m.model, (e, t) => (_(), f("div", {
184
190
  key: `${e.label}-${t}`,
185
- class: h(["m-megamenu__item", { "m-megamenu__item--open": M.value === t }])
186
- }, [oe("button", {
191
+ class: g(["m-megamenu__item", { "m-megamenu__item--open": j.value === t }])
192
+ }, [p("button", {
187
193
  ref_for: !0,
188
- ref: (e) => ve(e, t),
194
+ ref: (e) => xe(e, t),
189
195
  type: "button",
190
- class: h(["m-megamenu__trigger", { "m-megamenu__trigger--selected": B(e) }]),
196
+ class: g(["m-megamenu__trigger", { "m-megamenu__trigger--selected": z(e) }]),
191
197
  disabled: e.disabled,
192
- tabindex: S(G).tabindexFor(t),
193
- "aria-expanded": e.items?.length ? M.value === t : void 0,
198
+ tabindex: x(G).tabindexFor(t),
199
+ "aria-expanded": e.items?.length ? j.value === t : void 0,
194
200
  "aria-haspopup": e.items?.length ? "menu" : void 0,
195
- onClick: T((n) => U(t, e), ["stop"]),
196
- onFocus: (e) => S(G).setActive(t)
197
- }, [V(e) ? (v(), d("span", pe, [f(i, {
198
- name: V(e),
201
+ onClick: C((n) => U(t, e), ["stop"]),
202
+ onFocus: (e) => x(G).setActive(t)
203
+ }, [Se(e) ? (_(), f("span", _e, [B(e) ? (_(), u(te, {
204
+ key: 0,
205
+ name: B(e),
199
206
  size: "sm"
200
- }, null, 8, ["name"])])) : u("", !0), se(" " + x(e.label), 1)], 42, fe), (v(), l(s, {
201
- to: I.value.to,
202
- disabled: I.value.disabled
203
- }, [f(ae, {
204
- name: S(_e),
205
- css: S(A)
207
+ }, null, 8, ["name"])) : V(e) ? (_(), u(fe(V(e)), { key: 1 })) : d("", !0)])) : d("", !0), oe(" " + b(e.label), 1)], 42, ge), (_(), u(ie, {
208
+ to: F.value.to,
209
+ disabled: F.value.disabled
210
+ }, [se(ae, {
211
+ name: x(O),
212
+ css: x(k)
206
213
  }, {
207
- default: ue(() => [e.items?.length && M.value === t ? (v(), d("div", {
214
+ default: me(() => [e.items?.length && j.value === t ? (_(), f("div", {
208
215
  key: 0,
209
- class: h(["m-megamenu__panel", { "m-megamenu__panel--teleported": L.value }]),
210
- style: g(L.value ? F.value : void 0),
216
+ class: g(["m-megamenu__panel", { "m-megamenu__panel--teleported": I.value }]),
217
+ style: le(I.value ? P.value : void 0),
211
218
  role: "menu",
212
- onKeydown: Se
213
- }, [(v(!0), d(o, null, b(e.items, (e, t) => (v(), d("div", {
219
+ onKeydown: Ee
220
+ }, [(_(!0), f(c, null, y(e.items, (e, t) => (_(), f("div", {
214
221
  key: t,
215
222
  class: "m-megamenu__column"
216
- }, [(v(!0), d(o, null, b(e, (e, n) => (v(), d("button", {
223
+ }, [(_(!0), f(c, null, y(e, (e, n) => (_(), f("button", {
217
224
  key: `${e.label}-${n}`,
218
225
  type: "button",
219
- class: h(["m-megamenu__link", { "m-megamenu__link--selected": B(e) }]),
226
+ class: g(["m-megamenu__link", { "m-megamenu__link--selected": z(e) }]),
220
227
  role: "menuitem",
221
228
  disabled: e.disabled,
222
- tabindex: be(t, n),
223
- onClick: T((t) => Q(e), ["stop"])
224
- }, x(e.label), 11, me))), 128))]))), 128))], 38)) : u("", !0)]),
229
+ tabindex: we(t, n),
230
+ onClick: C((t) => Q(e), ["stop"])
231
+ }, b(e.label), 11, ve))), 128))]))), 128))], 38)) : d("", !0)]),
225
232
  _: 2
226
- }, 1032, ["name", "css"])], 8, ["to", "disabled"]))], 2))), 128))], 16, de));
233
+ }, 1032, ["name", "css"])], 8, ["to", "disabled"]))], 2))), 128))], 16, he));
227
234
  }
228
235
  });
229
236
  //#endregion
230
- export { E as MMegaMenu };
237
+ export { w as MMegaMenu };
@@ -4,15 +4,15 @@ import { t as n } from "../Icon-CmHjx7W8.js";
4
4
  import { t as r } from "../useMenuKeyboard-BedmYE4W.js";
5
5
  import { n as i } from "../context-CIx8fy-I.js";
6
6
  import { t as a } from "../ProgressSpinner-vBXGvQ92.js";
7
- import { i as ee, o as te, s as o } from "../config-Cd20zAyW.js";
8
- import { n as s } from "../locale-BcxMPufl.js";
7
+ import { i as ee, o, s } from "../config-Cd20zAyW.js";
8
+ import { n as c } from "../locale-BcxMPufl.js";
9
9
  import "./style.js";
10
- import { Fragment as ne, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, inject as m, mergeProps as h, nextTick as g, normalizeClass as _, openBlock as v, ref as y, renderList as re, toDisplayString as b, unref as x, useAttrs as S, watch as C, withModifiers as w } from "vue";
10
+ import { Fragment as te, computed as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, inject as h, mergeProps as g, nextTick as _, normalizeClass as v, openBlock as y, ref as b, renderList as ne, toDisplayString as x, unref as S, useAttrs as re, watch as C, withModifiers as w } from "vue";
11
11
  //#region src/components/Mentions/mentionUtils.ts
12
12
  function ie(e) {
13
13
  return e === void 0 ? ["@"] : Array.isArray(e) ? e : [e];
14
14
  }
15
- function ae(e, t, n, r) {
15
+ function T(e, t, n, r) {
16
16
  let i = e.slice(0, t), a = null;
17
17
  for (let e of n) {
18
18
  let t = i.lastIndexOf(e);
@@ -26,7 +26,7 @@ function ae(e, t, n, r) {
26
26
  }
27
27
  return a;
28
28
  }
29
- function oe(e) {
29
+ function E(e) {
30
30
  return typeof e == "string" ? {
31
31
  value: e,
32
32
  label: e
@@ -35,13 +35,13 @@ function oe(e) {
35
35
  label: e.label ?? e.value
36
36
  };
37
37
  }
38
- function T(e, t) {
38
+ function D(e, t) {
39
39
  let n = t.toLowerCase();
40
40
  return n ? e.filter((e) => e.value.toLowerCase().includes(n) || e.label.toLowerCase().includes(n)) : e;
41
41
  }
42
42
  //#endregion
43
43
  //#region src/components/Mentions/Mentions.vue?vue&type=script&setup=true&lang.ts
44
- var se = [
44
+ var O = [
45
45
  "id",
46
46
  "value",
47
47
  "rows",
@@ -54,14 +54,14 @@ var se = [
54
54
  "aria-busy",
55
55
  "aria-controls",
56
56
  "aria-autocomplete"
57
- ], ce = ["aria-label"], le = ["id"], E = ["id"], D = ["aria-selected", "onMousedown"], O = { class: "m-mentions__option-value" }, ue = {
57
+ ], ae = ["aria-label"], oe = ["id"], se = ["id"], ce = ["aria-selected", "onMousedown"], le = { class: "m-mentions__option-value" }, ue = {
58
58
  key: 0,
59
59
  class: "m-mentions__option-label"
60
60
  }, de = {
61
61
  key: 3,
62
62
  class: "m-mentions__empty",
63
63
  role: "status"
64
- }, fe = ["id"], k = /* @__PURE__ */ p({
64
+ }, fe = ["id"], k = /* @__PURE__ */ m({
65
65
  inheritAttrs: !1,
66
66
  __name: "Mentions",
67
67
  props: {
@@ -99,10 +99,6 @@ var se = [
99
99
  type: Boolean,
100
100
  default: void 0
101
101
  },
102
- allowClear: {
103
- type: Boolean,
104
- default: void 0
105
- },
106
102
  loading: {
107
103
  type: Boolean,
108
104
  default: !1
@@ -115,8 +111,8 @@ var se = [
115
111
  "change",
116
112
  "select"
117
113
  ],
118
- setup(p, { emit: k }) {
119
- let A = p, j = k, M = S(), { rootAttrs: N, controlAttrs: P } = e(M, () => A.pt), F = ee("Mentions"), I = m(i, null), L = s(), R = y(null), z = t("m-mentions"), B = c(() => A.id ?? z), V = y(!1), H = y(0), U = c(() => A.invalid || A.status === "error" || !!A.errorMessage), pe = c(() => A.status === "warning" && !U.value), me = te("Mentions", () => A.size ?? I?.value.size), he = o("Mentions", () => A.variant), ge = c(() => A.fluid ?? F.value.fluid ?? !1), _e = c(() => A.rows ?? F.value.rows ?? 3), W = c(() => (A.clearable ?? A.allowClear ?? F.value.clearable ?? F.value.allowClear ?? !1) && !!A.modelValue && !A.disabled && !A.readonly), G = c(() => V.value && !!q.value), ve = c(() => ie(A.prefix)), K = c(() => A.split ?? " "), ye = c(() => A.options.map(oe)), q = c(() => ae(A.modelValue ?? "", H.value, ve.value, K.value)), J = c(() => q.value ? T(ye.value, q.value.query) : []), be = c(() => A.emptyMessage ?? L.value.emptyOptions), Y = c(() => A.errorMessage || A.helpText), xe = c(() => !!A.errorMessage || U.value && !!A.helpText), Se = c(() => Y.value ? `${B.value}-help` : void 0), Ce = c(() => [
114
+ setup(m, { emit: k }) {
115
+ let A = m, j = k, M = re(), { rootAttrs: N, controlAttrs: P } = e(M, () => A.pt), F = ee("Mentions"), I = h(i, null), L = c(), R = b(null), z = t("m-mentions"), B = l(() => A.id ?? z), V = b(!1), H = b(0), U = l(() => A.invalid || A.status === "error" || !!A.errorMessage), pe = l(() => A.status === "warning" && !U.value), me = o("Mentions", () => A.size ?? I?.value.size), he = s("Mentions", () => A.variant), ge = l(() => A.fluid ?? F.value.fluid ?? !1), _e = l(() => A.rows ?? F.value.rows ?? 3), W = l(() => (A.clearable ?? F.value.clearable ?? !1) && !!A.modelValue && !A.disabled && !A.readonly), G = l(() => V.value && !!q.value), ve = l(() => ie(A.prefix)), K = l(() => A.split ?? " "), ye = l(() => A.options.map(E)), q = l(() => T(A.modelValue ?? "", H.value, ve.value, K.value)), J = l(() => q.value ? D(ye.value, q.value.query) : []), be = l(() => A.emptyMessage ?? L.value.emptyOptions), Y = l(() => A.errorMessage || A.helpText), xe = l(() => !!A.errorMessage || U.value && !!A.helpText), Se = l(() => Y.value ? `${B.value}-help` : void 0), Ce = l(() => [
120
116
  "m-mentions",
121
117
  `m-mentions--${me.value}`,
122
118
  {
@@ -128,7 +124,7 @@ var se = [
128
124
  "m-mentions--invalid": U.value,
129
125
  "m-mentions--warning": pe.value
130
126
  }
131
- ]), we = c(() => ["m-mentions__textarea", { "m-mentions__textarea--filled": he.value === "filled" }]), X = c(() => `${B.value}-suggestions`), Z = r({
127
+ ]), we = l(() => ["m-mentions__textarea", { "m-mentions__textarea--filled": he.value === "filled" }]), X = l(() => `${B.value}-suggestions`), Z = r({
132
128
  itemCount: () => J.value.length,
133
129
  orientation: "vertical",
134
130
  enabled: () => V.value && J.value.length > 0,
@@ -162,7 +158,7 @@ var se = [
162
158
  let n = A.modelValue ?? "", r = `${t.prefix}${e.value}${K.value}`, i = n.slice(0, t.start) + r + n.slice(H.value);
163
159
  j("update:modelValue", i), j("select", e), V.value = !1, Z.reset();
164
160
  let a = t.start + r.length;
165
- g(() => {
161
+ _(() => {
166
162
  let e = R.value;
167
163
  e && (e.focus(), e.setSelectionRange(a, a), H.value = a);
168
164
  });
@@ -186,23 +182,23 @@ var se = [
186
182
  j("change", e.target.value);
187
183
  }
188
184
  function je() {
189
- A.disabled || A.readonly || (j("update:modelValue", ""), V.value = !1, Z.reset(), g(() => R.value?.focus()));
185
+ A.disabled || A.readonly || (j("update:modelValue", ""), V.value = !1, Z.reset(), _(() => R.value?.focus()));
190
186
  }
191
- return (e, t) => (v(), u("div", h(x(N), { class: Ce.value }), [d("div", { class: _(["m-mentions__control", { "m-mentions__control--clearable": W.value }]) }, [
192
- d("textarea", h(x(P), {
187
+ return (e, t) => (y(), d("div", g(S(N), { class: Ce.value }), [f("div", { class: v(["m-mentions__control", { "m-mentions__control--clearable": W.value }]) }, [
188
+ f("textarea", g(S(P), {
193
189
  id: B.value,
194
190
  ref_key: "textareaRef",
195
191
  ref: R,
196
192
  class: we.value,
197
- value: p.modelValue,
193
+ value: m.modelValue,
198
194
  rows: _e.value,
199
- placeholder: p.placeholder,
200
- disabled: p.disabled,
201
- readonly: p.readonly,
195
+ placeholder: m.placeholder,
196
+ disabled: m.disabled,
197
+ readonly: m.readonly,
202
198
  "aria-invalid": U.value || void 0,
203
199
  "aria-describedby": Se.value,
204
200
  "aria-expanded": G.value,
205
- "aria-busy": p.loading || void 0,
201
+ "aria-busy": m.loading || void 0,
206
202
  "aria-controls": G.value ? X.value : void 0,
207
203
  "aria-autocomplete": V.value ? "list" : void 0,
208
204
  role: "combobox",
@@ -214,44 +210,44 @@ var se = [
214
210
  onFocus: Oe,
215
211
  onBlur: ke,
216
212
  onChange: Ae
217
- }), null, 16, se),
218
- W.value ? (v(), u("button", {
213
+ }), null, 16, O),
214
+ W.value ? (y(), d("button", {
219
215
  key: 0,
220
216
  type: "button",
221
217
  class: "m-mentions__clear",
222
- "aria-label": x(L).clearInput,
218
+ "aria-label": S(L).clearInput,
223
219
  onMousedown: t[0] ||= w(() => {}, ["prevent"]),
224
220
  onClick: je
225
- }, [f(n, {
221
+ }, [p(n, {
226
222
  name: "close",
227
223
  size: "sm"
228
- })], 40, ce)) : l("", !0),
229
- G.value && p.loading ? (v(), u("div", {
224
+ })], 40, ae)) : u("", !0),
225
+ G.value && m.loading ? (y(), d("div", {
230
226
  key: 1,
231
227
  id: X.value,
232
228
  class: "m-mentions__dropdown m-mentions__dropdown--loading",
233
229
  role: "listbox",
234
230
  "aria-busy": "true",
235
231
  "aria-label": "Suggestions"
236
- }, [f(a, { size: "small" })], 8, le)) : G.value && J.value.length ? (v(), u("ul", {
232
+ }, [p(a, { size: "small" })], 8, oe)) : G.value && J.value.length ? (y(), d("ul", {
237
233
  key: 2,
238
234
  id: X.value,
239
235
  class: "m-mentions__dropdown",
240
236
  role: "listbox",
241
237
  "aria-label": "Suggestions"
242
- }, [(v(!0), u(ne, null, re(J.value, (e, t) => (v(), u("li", {
238
+ }, [(y(!0), d(te, null, ne(J.value, (e, t) => (y(), d("li", {
243
239
  key: e.value,
244
240
  role: "option",
245
- class: _(["m-mentions__option", { "m-mentions__option--active": x(Z).activeIndex.value === t }]),
246
- "aria-selected": x(Z).activeIndex.value === t,
241
+ class: v(["m-mentions__option", { "m-mentions__option--active": S(Z).activeIndex.value === t }]),
242
+ "aria-selected": S(Z).activeIndex.value === t,
247
243
  onMousedown: w((e) => De(t), ["prevent"])
248
- }, [d("span", O, b(e.value), 1), e.label === e.value ? l("", !0) : (v(), u("span", ue, b(e.label), 1))], 42, D))), 128))], 8, E)) : G.value && q.value && !p.loading && !J.value.length ? (v(), u("p", de, b(be.value), 1)) : l("", !0)
249
- ], 2), Y.value ? (v(), u("p", {
244
+ }, [f("span", le, x(e.value), 1), e.label === e.value ? u("", !0) : (y(), d("span", ue, x(e.label), 1))], 42, ce))), 128))], 8, se)) : G.value && q.value && !m.loading && !J.value.length ? (y(), d("p", de, x(be.value), 1)) : u("", !0)
245
+ ], 2), Y.value ? (y(), d("p", {
250
246
  key: 0,
251
247
  id: `${B.value}-help`,
252
- class: _(["m-mentions__feedback", { "m-mentions__feedback--error": xe.value }]),
248
+ class: v(["m-mentions__feedback", { "m-mentions__feedback--error": xe.value }]),
253
249
  role: "alert"
254
- }, b(Y.value), 11, fe)) : l("", !0)], 16));
250
+ }, x(Y.value), 11, fe)) : u("", !0)], 16));
255
251
  }
256
252
  });
257
253
  //#endregion