morya-ui 0.3.0 → 0.3.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 (205) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/{Button-B5X_R4Md.js → Button-smoDleh0.js} +1 -1
  3. package/dist/Icon-od9Ob-Ay.js +393 -0
  4. package/dist/Loading-BSsRs6v9.js +420 -0
  5. package/dist/{Pagination-CVrH8Ypi.js → Pagination-DrXmzcEy.js} +1 -1
  6. package/dist/accordion/style.css +4 -0
  7. package/dist/auto-complete/index.js +1 -1
  8. package/dist/auto-complete/style.css +18 -6
  9. package/dist/avatar/index.js +1 -1
  10. package/dist/avatar/style.css +4 -0
  11. package/dist/badge/style.css +4 -0
  12. package/dist/block-ui/style.css +4 -0
  13. package/dist/breadcrumb/style.css +4 -0
  14. package/dist/button/index.js +1 -1
  15. package/dist/button/style.css +4 -0
  16. package/dist/card/style.css +4 -0
  17. package/dist/carousel/index.js +72 -64
  18. package/dist/carousel/style.css +31 -10
  19. package/dist/cascade-select/index.js +1 -1
  20. package/dist/cascade-select/style.css +18 -6
  21. package/dist/checkbox/style.css +4 -0
  22. package/dist/chip/index.js +1 -1
  23. package/dist/chip/style.css +4 -0
  24. package/dist/command-menu/index.js +2 -2
  25. package/dist/command-menu/style.css +4 -0
  26. package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
  27. package/dist/components/Carousel/styles.css +27 -10
  28. package/dist/components/DataView/DataView.vue.d.ts +7 -7
  29. package/dist/components/DataView/DataView.vue.d.ts.map +1 -1
  30. package/dist/components/DataView/styles.css +0 -20
  31. package/dist/components/Dropdown/Dropdown.vue.d.ts +2 -2
  32. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  33. package/dist/components/Dropdown/DropdownNodes.vue.d.ts +8 -9
  34. package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
  35. package/dist/components/Dropdown/styles.css +24 -5
  36. package/dist/components/Icon/Icon.vue.d.ts.map +1 -1
  37. package/dist/components/Icon/icon-categories.d.ts.map +1 -1
  38. package/dist/components/Icon/icons-types.d.ts +4 -2
  39. package/dist/components/Icon/icons-types.d.ts.map +1 -1
  40. package/dist/components/Icon/icons.d.ts +250 -561
  41. package/dist/components/Icon/icons.d.ts.map +1 -1
  42. package/dist/components/Icon/index.d.ts +2 -2
  43. package/dist/components/Icon/index.d.ts.map +1 -1
  44. package/dist/components/Layout/styles.css +5 -2
  45. package/dist/components/Menu/styles.css +6 -0
  46. package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
  47. package/dist/components/Menubar/styles.css +4 -0
  48. package/dist/components/Scrollbar/Scrollbar.vue.d.ts +1 -1
  49. package/dist/components/Select/Select.vue.d.ts +9 -5
  50. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  51. package/dist/components/Select/styles.css +30 -1
  52. package/dist/components/Select/types.d.ts +11 -1
  53. package/dist/components/Select/types.d.ts.map +1 -1
  54. package/dist/components/Slider/styles.css +9 -0
  55. package/dist/components/SplitButton/styles.css +5 -0
  56. package/dist/components/Table/Table.vue.d.ts +26 -26
  57. package/dist/components/Table/Table.vue.d.ts.map +1 -1
  58. package/dist/components/Table/TableLoadingLine.vue.d.ts.map +1 -1
  59. package/dist/components/Table/styles.css +58 -38
  60. package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
  61. package/dist/components/TreeSelect/styles.css +1 -1
  62. package/dist/config-provider/style.css +4 -0
  63. package/dist/confirm-dialog/index.js +2 -2
  64. package/dist/confirm-dialog/style.css +4 -0
  65. package/dist/confirm-popup/index.js +2 -2
  66. package/dist/confirm-popup/style.css +4 -0
  67. package/dist/context-menu/index.js +2 -2
  68. package/dist/context-menu/style.css +4 -0
  69. package/dist/data-view/index.js +47 -47
  70. package/dist/data-view/style.css +399 -106
  71. package/dist/data-view/style.js +1 -1
  72. package/dist/date-picker/index.js +1 -1
  73. package/dist/date-picker/style.css +4 -0
  74. package/dist/dialog/index.js +2 -2
  75. package/dist/dialog/style.css +4 -0
  76. package/dist/divider/style.css +4 -0
  77. package/dist/dock/index.js +2 -2
  78. package/dist/dock/style.css +4 -0
  79. package/dist/drawer/index.js +1 -1
  80. package/dist/drawer/style.css +4 -0
  81. package/dist/dropdown/index.js +110 -91
  82. package/dist/dropdown/style.css +28 -5
  83. package/dist/empty/index.js +1 -1
  84. package/dist/empty/style.css +4 -0
  85. package/dist/fieldset/index.js +1 -1
  86. package/dist/fieldset/style.css +4 -0
  87. package/dist/file-upload/index.js +1 -1
  88. package/dist/file-upload/style.css +4 -0
  89. package/dist/flex/style.css +4 -0
  90. package/dist/float-label/style.css +4 -0
  91. package/dist/fluid/style.css +4 -0
  92. package/dist/form/style.css +4 -0
  93. package/dist/gallery/index.js +1 -1
  94. package/dist/gallery/style.css +4 -0
  95. package/dist/grid/style.css +4 -0
  96. package/dist/icon/index.js +93 -39
  97. package/dist/icon/style.css +4 -0
  98. package/dist/icon-COrt_N8A.js +18 -0
  99. package/dist/icon-field/style.css +4 -0
  100. package/dist/index.js +2733 -2801
  101. package/dist/inplace/style.css +4 -0
  102. package/dist/input/index.js +1 -1
  103. package/dist/input/style.css +4 -0
  104. package/dist/input-color/style.css +4 -0
  105. package/dist/input-group/style.css +4 -0
  106. package/dist/input-number/index.js +1 -1
  107. package/dist/input-number/style.css +4 -0
  108. package/dist/input-otp/style.css +4 -0
  109. package/dist/input-password/index.js +1 -1
  110. package/dist/input-password/style.css +4 -0
  111. package/dist/input-tags/index.js +1 -1
  112. package/dist/input-tags/style.css +4 -0
  113. package/dist/knob/style.css +4 -0
  114. package/dist/label/style.css +4 -0
  115. package/dist/layout/index.js +1 -1
  116. package/dist/layout/style.css +9 -2
  117. package/dist/listbox/style.css +4 -0
  118. package/dist/loading/index.js +32 -446
  119. package/dist/loading/style.css +4 -0
  120. package/dist/mega-menu/index.js +2 -2
  121. package/dist/mega-menu/style.css +4 -0
  122. package/dist/menu/index.js +2 -2
  123. package/dist/menu/style.css +10 -0
  124. package/dist/menubar/index.js +6 -3
  125. package/dist/menubar/style.css +8 -0
  126. package/dist/message/index.js +1 -1
  127. package/dist/message/style.css +4 -0
  128. package/dist/meter-group/style.css +4 -0
  129. package/dist/order-list/index.js +1 -1
  130. package/dist/order-list/style.css +4 -0
  131. package/dist/page/index.js +1 -1
  132. package/dist/page/style.css +4 -0
  133. package/dist/pagination/index.js +1 -1
  134. package/dist/pagination/style.css +4 -0
  135. package/dist/panel/index.js +1 -1
  136. package/dist/panel/style.css +4 -0
  137. package/dist/pick-list/index.js +1 -1
  138. package/dist/pick-list/style.css +4 -0
  139. package/dist/popover/style.css +4 -0
  140. package/dist/progress-bar/style.css +4 -0
  141. package/dist/progress-spinner/index.js +105 -2
  142. package/dist/progress-spinner/style.css +4 -0
  143. package/dist/radio/style.css +4 -0
  144. package/dist/rating/index.js +1 -1
  145. package/dist/rating/style.css +4 -0
  146. package/dist/result/index.js +1 -1
  147. package/dist/result/style.css +4 -0
  148. package/dist/scroll-top/index.js +1 -1
  149. package/dist/scroll-top/style.css +4 -0
  150. package/dist/scrollbar/style.css +4 -0
  151. package/dist/select/index.js +284 -217
  152. package/dist/select/style.css +48 -7
  153. package/dist/select-button/style.css +4 -0
  154. package/dist/shared/menu/icon.d.ts.map +1 -1
  155. package/dist/shared/styles/select-overlay.css +14 -6
  156. package/dist/sidebar/index.js +2 -2
  157. package/dist/sidebar/style.css +4 -0
  158. package/dist/skeleton/style.css +4 -0
  159. package/dist/slider/style.css +13 -0
  160. package/dist/space/style.css +4 -0
  161. package/dist/speed-dial/index.js +2 -2
  162. package/dist/speed-dial/style.css +4 -0
  163. package/dist/split-button/index.js +1 -1
  164. package/dist/split-button/style.css +9 -0
  165. package/dist/splitter/style.css +4 -0
  166. package/dist/status/index.js +1 -1
  167. package/dist/status/style.css +4 -0
  168. package/dist/stepper/index.js +1 -1
  169. package/dist/stepper/style.css +4 -0
  170. package/dist/styles/base.css +4 -0
  171. package/dist/styles.css +1 -1
  172. package/dist/switch/style.css +4 -0
  173. package/dist/table/index.js +344 -338
  174. package/dist/table/style.css +457 -124
  175. package/dist/table/style.js +1 -1
  176. package/dist/tabs/index.js +1 -1
  177. package/dist/tabs/style.css +4 -0
  178. package/dist/tag/index.js +1 -1
  179. package/dist/tag/style.css +4 -0
  180. package/dist/terminal/style.css +4 -0
  181. package/dist/textarea/index.js +1 -1
  182. package/dist/textarea/style.css +4 -0
  183. package/dist/tiered-menu/index.js +1 -1
  184. package/dist/tiered-menu/style.css +4 -0
  185. package/dist/timeline/index.js +1 -1
  186. package/dist/timeline/style.css +4 -0
  187. package/dist/toast/index.js +1 -1
  188. package/dist/toast/style.css +4 -0
  189. package/dist/toggle-button/index.js +2 -2
  190. package/dist/toggle-button/style.css +4 -0
  191. package/dist/toolbar/style.css +4 -0
  192. package/dist/tooltip/style.css +4 -0
  193. package/dist/tree/index.js +1 -1
  194. package/dist/tree/style.css +4 -0
  195. package/dist/tree-select/index.js +2 -1
  196. package/dist/tree-select/style.css +19 -7
  197. package/dist/tree-table/index.js +1 -1
  198. package/dist/tree-table/style.css +4 -0
  199. package/dist/virtual-scroller/style.css +4 -0
  200. package/package.json +1 -1
  201. package/dist/Icon-lcN1rS87.js +0 -610
  202. package/dist/ProgressSpinner-BeWVF6Jv.js +0 -105
  203. package/dist/components/Icon/icons-tabler.d.ts +0 -77
  204. package/dist/components/Icon/icons-tabler.d.ts.map +0 -1
  205. package/dist/icon-DWXkh-RM.js +0 -27
@@ -1,18 +1,18 @@
1
1
  import { i as e } from "../useComponentAttrs-e-5QAjdw.js";
2
- import { t } from "../Icon-lcN1rS87.js";
2
+ import { t } from "../Icon-od9Ob-Ay.js";
3
3
  import { t as n } from "../useMotionTransition-Bxnnb_9u.js";
4
- import { n as ee, t as te } from "../overlay-oR-5MDuE.js";
5
- import { t as ne } from "../overlayPlacement-Cd20JTD_.js";
6
- import { t as re } from "../useFloatingViewportSync-DZdJ7W8n.js";
7
- import { t as ie } from "../useMId-BXFYayPP.js";
8
- import { t as ae } from "../Scrollbar-DTeJ8P5b.js";
9
- import { t as oe } from "../VirtualScroller-CHoFCmpP.js";
10
- import { c as se, i as ce, o as le } from "../config-CapALqt3.js";
11
- import { n as ue, t as de } from "../locale-Bzm2nbEp.js";
4
+ import { n as r, t as ee } from "../overlay-oR-5MDuE.js";
5
+ import { t as te } from "../overlayPlacement-Cd20JTD_.js";
6
+ import { t as ne } from "../useFloatingViewportSync-DZdJ7W8n.js";
7
+ import { t as re } from "../useMId-BXFYayPP.js";
8
+ import { t as ie } from "../Scrollbar-DTeJ8P5b.js";
9
+ import { t as ae } from "../VirtualScroller-CHoFCmpP.js";
10
+ import { c as oe, i as se, o as ce } from "../config-CapALqt3.js";
11
+ import { n as le, t as ue } from "../locale-Bzm2nbEp.js";
12
12
  import "./style.js";
13
- import { Fragment as r, Teleport as fe, Transition as pe, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as me, createVNode as l, defineComponent as u, mergeProps as he, nextTick as ge, normalizeClass as d, normalizeStyle as _e, onBeforeUnmount as ve, openBlock as f, ref as p, renderList as ye, renderSlot as be, toDisplayString as m, unref as h, useAttrs as xe, useSlots as Se, vModelText as Ce, watch as g, withCtx as _, withDirectives as we, withModifiers as Te } from "vue";
13
+ import { Fragment as i, Teleport as de, Transition as fe, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as pe, createVNode as u, defineComponent as d, mergeProps as me, nextTick as he, normalizeClass as f, normalizeStyle as ge, onBeforeUnmount as _e, openBlock as p, ref as m, renderList as ve, renderSlot as h, toDisplayString as g, unref as _, useAttrs as ye, useSlots as be, vModelText as xe, watch as Se, withCtx as v, withDirectives as Ce, withModifiers as we } from "vue";
14
14
  //#region src/components/Select/Select.vue?vue&type=script&setup=true&lang.ts
15
- var Ee = ["for"], De = [
15
+ var Te = ["for"], Ee = [
16
16
  "id",
17
17
  "tabindex",
18
18
  "aria-expanded",
@@ -22,55 +22,69 @@ var Ee = ["for"], De = [
22
22
  "aria-disabled",
23
23
  "aria-busy",
24
24
  "aria-multiselectable"
25
- ], Oe = {
25
+ ], De = {
26
26
  key: 0,
27
27
  class: "m-select__tags"
28
- }, ke = { class: "m-select__tag-label" }, Ae = [
28
+ }, Oe = { class: "m-select__tag-label" }, ke = [
29
29
  "aria-label",
30
30
  "disabled",
31
31
  "onClick"
32
- ], je = ["aria-label"], Me = {
32
+ ], Ae = ["aria-label"], je = {
33
33
  key: 1,
34
34
  class: "m-select__value"
35
- }, Ne = {
35
+ }, Me = {
36
36
  key: 2,
37
37
  class: "m-select__spinner",
38
38
  "aria-hidden": "true"
39
- }, Pe = { class: "m-select__suffix" }, Fe = ["aria-label"], Ie = [
39
+ }, Ne = { class: "m-select__suffix" }, Pe = ["aria-label"], Fe = [
40
40
  "id",
41
41
  "aria-multiselectable",
42
42
  "aria-label"
43
- ], Le = ["placeholder", "aria-label"], Re = [
43
+ ], Ie = {
44
+ key: 0,
45
+ class: "m-select__header"
46
+ }, Le = ["placeholder", "aria-label"], Re = {
47
+ key: 0,
48
+ class: "m-select__group-label",
49
+ role: "presentation"
50
+ }, ze = [
44
51
  "aria-selected",
45
52
  "disabled",
46
53
  "onMouseenter",
47
54
  "onClick"
48
- ], ze = {
55
+ ], Be = {
49
56
  key: 0,
50
57
  class: "m-select__empty",
51
58
  role: "status"
52
- }, Be = [
59
+ }, Ve = {
60
+ key: 0,
61
+ class: "m-select__group-label",
62
+ role: "presentation"
63
+ }, He = [
53
64
  "aria-selected",
54
65
  "disabled",
55
66
  "onMouseenter",
56
67
  "onClick"
57
- ], Ve = {
68
+ ], Ue = {
58
69
  key: 1,
59
70
  class: "m-select__empty",
60
71
  role: "status"
61
- }, He = {
62
- key: 3,
72
+ }, We = {
73
+ key: 4,
63
74
  class: "m-select__empty",
64
75
  role: "status"
65
- }, Ue = {
66
- key: 4,
76
+ }, Ge = {
77
+ key: 5,
67
78
  class: "m-select__empty",
68
79
  role: "status"
69
- }, We = [
80
+ }, Ke = {
81
+ key: 6,
82
+ class: "m-select__footer"
83
+ }, qe = [
70
84
  "name",
71
85
  "required",
72
86
  "value"
73
- ], Ge = ["id", "role"], Ke = 80, qe = /* @__PURE__ */ u({
87
+ ], Je = ["id", "role"], Ye = 80, Xe = /* @__PURE__ */ d({
74
88
  inheritAttrs: !1,
75
89
  __name: "Select",
76
90
  props: {
@@ -154,265 +168,317 @@ var Ee = ["for"], De = [
154
168
  "search",
155
169
  "create"
156
170
  ],
157
- setup(u, { emit: qe }) {
158
- let v = u, y = qe, Je = Se(), Ye = xe(), { rootAttrs: Xe, controlAttrs: Ze } = e(Ye, () => v.pt, { controlKey: "control" }), b = ce("Select"), Qe = se(), { transitionName: $e, transitionCss: et } = n({
171
+ setup(d, { emit: Xe }) {
172
+ let y = d, b = Xe;
173
+ function x(e) {
174
+ return Array.isArray(e.items);
175
+ }
176
+ let Ze = be(), Qe = ye(), { rootAttrs: $e, controlAttrs: et } = e(Qe, () => y.pt, { controlKey: "control" }), S = se("Select"), tt = oe(), { transitionName: nt, transitionCss: rt } = n({
159
177
  role: "popup",
160
- local: () => v.transition,
178
+ local: () => y.transition,
161
179
  componentName: "Select",
162
180
  fallback: "scale-fade"
163
- }), x = ue(), tt = p(null), S = p(null), C = p(null), w = p(null), T = p(!1), E = p(""), D = p(-1), nt = p({}), O = p([]), rt = ie("m-select"), k = i(() => v.id ?? rt), it = i(() => v.emptyMessage ?? x.value.emptyOptions), A = i(() => v.multiple ?? b.value.multiple ?? !1), at = i(() => v.tag ?? b.value.tag ?? !1), j = i(() => v.remote ?? b.value.remote ?? !1), M = i(() => v.loading ?? !1), ot = i(() => v.fluid ?? b.value.fluid ?? !1), st = i(() => v.showClear ?? v.clearable ?? b.value.showClear ?? b.value.clearable ?? !1), N = i(() => v.filter ?? b.value.filter ?? !1), P = le("Select", () => v.size), ct = i(() => ee(v, Qe.value.appendTo)), F = i(() => te(v, Qe.value.appendTo)), I = i(() => v.invalid || !!v.errorMessage), L = i(() => v.errorMessage || v.helpText), lt = i(() => !!v.errorMessage || I.value && !!v.helpText), R = i(() => A.value ? Array.isArray(v.modelValue) ? v.modelValue : v.modelValue == null ? [] : [v.modelValue] : v.modelValue == null || Array.isArray(v.modelValue) ? [] : [v.modelValue]), z = i(() => {
164
- let e = new Set(v.options.map((e) => String(e.value))), t = [];
165
- for (let n of O.value) e.has(String(n.value)) || (t.push(n), e.add(String(n.value)));
166
- for (let n of R.value) e.has(String(n)) || (t.push({
181
+ }), C = le(), it = m(null), w = m(null), T = m(null), E = m(null), D = m(!1), O = m(""), k = m(-1), at = m({}), A = m([]), ot = re("m-select"), j = a(() => y.id ?? ot), st = a(() => y.emptyMessage ?? C.value.emptyOptions), M = a(() => y.multiple ?? S.value.multiple ?? !1), ct = a(() => y.tag ?? S.value.tag ?? !1), N = a(() => y.remote ?? S.value.remote ?? !1), P = a(() => y.loading ?? !1), lt = a(() => y.fluid ?? S.value.fluid ?? !1), ut = a(() => y.showClear ?? y.clearable ?? S.value.showClear ?? S.value.clearable ?? !1), F = a(() => y.filter ?? S.value.filter ?? !1), I = ce("Select", () => y.size), dt = a(() => r(y, tt.value.appendTo)), L = a(() => ee(y, tt.value.appendTo)), R = a(() => y.invalid || !!y.errorMessage), z = a(() => y.errorMessage || y.helpText), ft = a(() => !!y.errorMessage || R.value && !!y.helpText), B = a(() => M.value ? Array.isArray(y.modelValue) ? y.modelValue : y.modelValue == null ? [] : [y.modelValue] : y.modelValue == null || Array.isArray(y.modelValue) ? [] : [y.modelValue]), V = a(() => y.options.flatMap((e) => x(e) ? e.items : [e])), pt = a(() => {
182
+ let e = new Set(V.value.map((e) => String(e.value))), t = [];
183
+ for (let n of A.value) e.has(String(n.value)) || (t.push(n), e.add(String(n.value)));
184
+ for (let n of B.value) e.has(String(n)) || (t.push({
167
185
  label: String(n),
168
186
  value: n
169
187
  }), e.add(String(n)));
170
- return [...v.options, ...t];
188
+ return [...V.value, ...t];
171
189
  });
172
- function ut(e) {
173
- return z.value.find((t) => t.value === e);
190
+ function mt(e) {
191
+ return pt.value.find((t) => t.value === e);
174
192
  }
175
- let B = i(() => R.value.map((e) => ut(e) ?? {
193
+ let H = a(() => B.value.map((e) => mt(e) ?? {
176
194
  label: String(e),
177
195
  value: e
178
- })), dt = i(() => {
179
- let e = B.value;
180
- return v.maxTagCount == null || e.length <= v.maxTagCount ? e : e.slice(0, v.maxTagCount);
181
- }), V = i(() => Math.max(0, B.value.length - dt.value.length)), H = i(() => A.value ? void 0 : B.value[0]), ft = i(() => H.value?.label ?? v.placeholder ?? x.value.selectPlaceholder), U = i(() => R.value.length > 0), pt = i(() => st.value && U.value && !v.disabled), W = i(() => E.value.trim()), mt = i(() => !at.value || !N.value || !W.value ? !1 : !z.value.some((e) => e.label.toLowerCase() === W.value.toLowerCase() || String(e.value) === W.value)), ht = i(() => {
182
- if (j.value) return v.options;
183
- let e = W.value.toLowerCase();
184
- return e ? z.value.filter((t) => t.label.toLowerCase().includes(e)) : z.value;
185
- }), G = i(() => mt.value ? [{
186
- label: W.value,
187
- value: W.value,
188
- created: !0
189
- }, ...ht.value] : ht.value), K = i(() => G.value.filter((e) => !e.disabled)), gt = i(() => de(x.value.createOption, { value: W.value })), _t = i(() => de(x.value.moreTags, { count: V.value })), q = i(() => v.virtual === !1 ? !1 : v.virtual === !0 || G.value.length >= Ke), vt = i(() => P.value === "small" ? 28 : P.value === "large" ? 40 : 34), yt = i(() => Math.min(240, Math.max(vt.value * 4, G.value.length * vt.value))), bt = p(null);
190
- function J(e) {
196
+ })), ht = a(() => {
197
+ let e = H.value;
198
+ return y.maxTagCount == null || e.length <= y.maxTagCount ? e : e.slice(0, y.maxTagCount);
199
+ }), gt = a(() => Math.max(0, H.value.length - ht.value.length)), _t = a(() => M.value ? void 0 : H.value[0]), vt = a(() => _t.value?.label ?? y.placeholder ?? C.value.selectPlaceholder), U = a(() => B.value.length > 0), yt = a(() => ut.value && U.value && !y.disabled), W = a(() => O.value.trim()), bt = a(() => !ct.value || !F.value || !W.value ? !1 : !pt.value.some((e) => e.label.toLowerCase() === W.value.toLowerCase() || String(e.value) === W.value)), xt = a(() => {
200
+ if (N.value) return y.options;
201
+ let e = new Set(V.value.map((e) => String(e.value))), t = [];
202
+ for (let n of A.value) e.has(String(n.value)) || (t.push(n), e.add(String(n.value)));
203
+ for (let n of B.value) e.has(String(n)) || (t.push({
204
+ label: String(n),
205
+ value: n
206
+ }), e.add(String(n)));
207
+ let n = [...y.options, ...t], r = W.value.toLowerCase();
208
+ return r ? n.flatMap((e) => {
209
+ if (x(e)) {
210
+ let t = e.items.filter((e) => e.label.toLowerCase().includes(r));
211
+ return t.length ? [{
212
+ ...e,
213
+ items: t
214
+ }] : [];
215
+ }
216
+ return e.label.toLowerCase().includes(r) ? [e] : [];
217
+ }) : n;
218
+ }), G = a(() => {
219
+ let e = [];
220
+ return bt.value && e.push({
221
+ type: "option",
222
+ option: {
223
+ label: W.value,
224
+ value: W.value,
225
+ created: !0
226
+ },
227
+ key: `__create:${W.value}`
228
+ }), xt.value.forEach((t, n) => {
229
+ if (x(t)) {
230
+ e.push({
231
+ type: "group",
232
+ label: t.label,
233
+ key: `__group:${n}:${t.label}`
234
+ });
235
+ for (let n of t.items) e.push({
236
+ type: "option",
237
+ option: n,
238
+ key: String(n.value)
239
+ });
240
+ } else e.push({
241
+ type: "option",
242
+ option: t,
243
+ key: String(t.value)
244
+ });
245
+ }), e;
246
+ }), K = a(() => G.value.flatMap((e) => e.type === "option" ? [e.option] : [])), q = a(() => K.value.filter((e) => !e.disabled)), St = a(() => ue(C.value.createOption, { value: W.value })), Ct = a(() => ue(C.value.moreTags, { count: gt.value })), J = a(() => y.virtual === !1 ? !1 : y.virtual === !0 || G.value.length >= Ye), wt = a(() => I.value === "small" ? 28 : I.value === "large" ? 40 : 34), Tt = a(() => Math.min(240, Math.max(wt.value * 4, G.value.length * wt.value))), Et = m(null);
247
+ function Dt(e) {
191
248
  return e;
192
249
  }
250
+ function Ot(e) {
251
+ return e.label;
252
+ }
193
253
  function Y(e) {
194
- return R.value.some((t) => t === e);
254
+ return e.option;
195
255
  }
196
256
  function X(e) {
197
- y("update:modelValue", e), y("change", e);
257
+ return B.value.some((t) => t === e);
198
258
  }
199
- function xt() {
200
- if (!F.value || !S.value) return;
201
- let e = S.value.getBoundingClientRect();
202
- nt.value = ne(e, v.placement === "bottom-end" ? "bottom-end" : "bottom-start", { minWidth: `${e.width}px` });
259
+ function Z(e) {
260
+ b("update:modelValue", e), b("change", e);
203
261
  }
204
- function Z(e, t = "none") {
205
- if (!(v.disabled || T.value === e)) {
206
- if (T.value = e, e) {
207
- if (E.value = "", t === "none") D.value = -1;
208
- else if (t === "last") D.value = Math.max(0, K.value.length - 1);
262
+ function kt() {
263
+ if (!L.value || !w.value) return;
264
+ let e = w.value.getBoundingClientRect();
265
+ at.value = te(e, y.placement === "bottom-end" ? "bottom-end" : "bottom-start", { minWidth: `${e.width}px` });
266
+ }
267
+ function Q(e, t = "none") {
268
+ if (!(y.disabled || D.value === e)) {
269
+ if (D.value = e, e) {
270
+ if (O.value = "", t === "none") k.value = -1;
271
+ else if (t === "last") k.value = Math.max(0, q.value.length - 1);
209
272
  else {
210
- let e = K.value.findIndex((e) => !e.created && Y(e.value));
211
- D.value = e >= 0 ? e : K.value.length ? 0 : -1;
273
+ let e = q.value.findIndex((e) => !e.created && X(e.value));
274
+ k.value = e >= 0 ? e : q.value.length ? 0 : -1;
212
275
  }
213
- y("show"), ge(() => {
214
- xt(), N.value ? w.value?.focus({ preventScroll: !0 }) : C.value?.focus({ preventScroll: !0 });
276
+ b("show"), he(() => {
277
+ kt(), F.value ? E.value?.focus({ preventScroll: !0 }) : T.value?.focus({ preventScroll: !0 });
215
278
  });
216
- } else E.value = "", y("hide");
279
+ } else O.value = "", b("hide");
217
280
  }
218
281
  }
219
- function Q(e) {
282
+ function $(e) {
220
283
  if (!e.disabled) {
221
284
  if (e.created) {
222
- St();
285
+ At();
223
286
  return;
224
287
  }
225
- if (A.value) {
226
- X(Y(e.value) ? R.value.filter((t) => t !== e.value) : [...R.value, e.value]);
288
+ if (M.value) {
289
+ Z(X(e.value) ? B.value.filter((t) => t !== e.value) : [...B.value, e.value]);
227
290
  return;
228
291
  }
229
- X(e.value), Z(!1), S.value?.focus({ preventScroll: !0 });
292
+ Z(e.value), Q(!1), w.value?.focus({ preventScroll: !0 });
230
293
  }
231
294
  }
232
- function St() {
295
+ function At() {
233
296
  let e = W.value;
234
- if (!e || !mt.value) return;
297
+ if (!e || !bt.value) return;
235
298
  let t = {
236
299
  label: e,
237
300
  value: e
238
301
  };
239
- O.value.some((e) => e.value === t.value) || (O.value = [...O.value, t]), y("create", t), Q({ ...t }), E.value = "";
302
+ A.value.some((e) => e.value === t.value) || (A.value = [...A.value, t]), b("create", t), $({ ...t }), O.value = "";
240
303
  }
241
- function Ct(e, t) {
242
- t.stopPropagation(), t.preventDefault(), !(v.disabled || !A.value) && X(R.value.filter((t) => t !== e));
304
+ function jt(e, t) {
305
+ t.stopPropagation(), t.preventDefault(), !(y.disabled || !M.value) && Z(B.value.filter((t) => t !== e));
243
306
  }
244
- function wt(e) {
245
- e?.stopPropagation(), e?.preventDefault(), !(v.disabled || !U.value) && (X(A.value ? [] : void 0), y("clear"), S.value?.focus({ preventScroll: !0 }));
307
+ function Mt(e) {
308
+ e?.stopPropagation(), e?.preventDefault(), !(y.disabled || !U.value) && (Z(M.value ? [] : void 0), b("clear"), w.value?.focus({ preventScroll: !0 }));
246
309
  }
247
- function Tt(e) {
248
- v.disabled || [
310
+ function Nt(e) {
311
+ y.disabled || [
249
312
  "Enter",
250
313
  " ",
251
314
  "ArrowDown",
252
315
  "ArrowUp"
253
- ].includes(e.key) && (e.preventDefault(), T.value || Z(!0, e.key === "ArrowUp" ? "last" : "selected"));
316
+ ].includes(e.key) && (e.preventDefault(), D.value || Q(!0, e.key === "ArrowUp" ? "last" : "selected"));
254
317
  }
255
- function Et(e) {
318
+ function Pt(e) {
256
319
  if (e.key === "Escape") {
257
- e.preventDefault(), Z(!1), S.value?.focus({ preventScroll: !0 });
320
+ e.preventDefault(), Q(!1), w.value?.focus({ preventScroll: !0 });
258
321
  return;
259
322
  }
260
- let t = K.value.length;
261
- if (t && ((e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), D.value < 0 ? D.value = e.key === "ArrowDown" ? 0 : t - 1 : D.value = (D.value + (e.key === "ArrowDown" ? 1 : -1) + t) % t), e.key === "Home" && (e.preventDefault(), D.value = 0), e.key === "End" && (e.preventDefault(), D.value = t - 1), e.key === "Enter" || e.key === " " && e.target !== w.value)) {
262
- let t = K.value[D.value];
263
- t && (e.preventDefault(), Q(t));
323
+ let t = q.value.length;
324
+ if (t && ((e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), k.value < 0 ? k.value = e.key === "ArrowDown" ? 0 : t - 1 : k.value = (k.value + (e.key === "ArrowDown" ? 1 : -1) + t) % t), e.key === "Home" && (e.preventDefault(), k.value = 0), e.key === "End" && (e.preventDefault(), k.value = t - 1), e.key === "Enter" || e.key === " " && e.target !== E.value)) {
325
+ let t = q.value[k.value];
326
+ t && (e.preventDefault(), $(t));
264
327
  }
265
328
  }
266
- function $(e) {
267
- T.value && !tt.value?.contains(e.target) && !C.value?.contains(e.target) && Z(!1);
329
+ function Ft(e) {
330
+ D.value && !it.value?.contains(e.target) && !T.value?.contains(e.target) && Q(!1);
268
331
  }
269
- function Dt() {
270
- T.value && xt();
332
+ function It() {
333
+ D.value && kt();
271
334
  }
272
- return re(() => T.value && F.value, Dt), g(D, (e) => {
273
- if (!q.value || e < 0) return;
274
- let t = K.value[e];
335
+ return ne(() => D.value && L.value, It), Se(k, (e) => {
336
+ if (!J.value || e < 0) return;
337
+ let t = q.value[e];
275
338
  if (!t) return;
276
- let n = G.value.findIndex((e) => e.value === t.value && !!e.created == !!t.created);
277
- n >= 0 && bt.value?.scrollToIndex(n);
278
- }), g(E, (e) => {
279
- D.value = K.value.length ? 0 : -1, T.value && (N.value || j.value) && y("search", e);
280
- }), g(T, (e) => {
281
- e && j.value && y("search", E.value), e ? document.addEventListener("click", $) : document.removeEventListener("click", $);
282
- }), ve(() => {
283
- document.removeEventListener("click", $);
284
- }), (e, n) => (f(), s("div", he({
339
+ let n = G.value.findIndex((e) => e.type === "option" && e.option.value === t.value && !!e.option.created == !!t.created);
340
+ n >= 0 && Et.value?.scrollToIndex(n);
341
+ }), Se(O, (e) => {
342
+ k.value = q.value.length ? 0 : -1, D.value && (F.value || N.value) && b("search", e);
343
+ }), Se(D, (e) => {
344
+ e && N.value && b("search", O.value), e ? document.addEventListener("click", Ft) : document.removeEventListener("click", Ft);
345
+ }), _e(() => {
346
+ document.removeEventListener("click", Ft);
347
+ }), (e, n) => (p(), c("div", me({
285
348
  ref_key: "root",
286
- ref: tt
287
- }, h(Xe), { class: ["m-select-field", { "m-select-field--fluid": ot.value }] }), [
288
- u.label ? (f(), s("label", {
349
+ ref: it
350
+ }, _($e), { class: ["m-select-field", { "m-select-field--fluid": lt.value }] }), [
351
+ d.label ? (p(), c("label", {
289
352
  key: 0,
290
353
  class: "m-select-field__label",
291
- for: k.value
292
- }, m(u.label), 9, Ee)) : o("", !0),
293
- c("div", { class: d(["m-select__control", {
294
- "m-select__control--clearable": pt.value,
295
- "m-select__control--open": T.value
296
- }]) }, [c("div", he(h(Ze), {
297
- id: k.value,
354
+ for: j.value
355
+ }, g(d.label), 9, Te)) : s("", !0),
356
+ l("div", { class: f(["m-select__control", {
357
+ "m-select__control--clearable": yt.value,
358
+ "m-select__control--open": D.value
359
+ }]) }, [l("div", me(_(et), {
360
+ id: j.value,
298
361
  ref_key: "trigger",
299
- ref: S,
300
- class: ["m-select", [`m-select--${h(P)}`, {
301
- "m-select--invalid": I.value,
302
- "m-select--open": T.value,
362
+ ref: w,
363
+ class: ["m-select", [`m-select--${_(I)}`, {
364
+ "m-select--invalid": R.value,
365
+ "m-select--open": D.value,
303
366
  "m-select--placeholder": !U.value,
304
- "m-select--fluid": ot.value,
305
- "m-select--multiple": A.value,
306
- "m-select--disabled": u.disabled,
307
- "m-select--loading": M.value
367
+ "m-select--fluid": lt.value,
368
+ "m-select--multiple": M.value,
369
+ "m-select--disabled": d.disabled,
370
+ "m-select--loading": P.value
308
371
  }]],
309
372
  role: "combobox",
310
- tabindex: u.disabled ? -1 : 0,
311
- "aria-expanded": T.value,
373
+ tabindex: d.disabled ? -1 : 0,
374
+ "aria-expanded": D.value,
312
375
  "aria-haspopup": "listbox",
313
- "aria-controls": `${k.value}-listbox`,
314
- "aria-invalid": I.value || void 0,
315
- "aria-describedby": L.value ? `${k.value}-help` : void 0,
316
- "aria-disabled": u.disabled || void 0,
317
- "aria-busy": M.value || void 0,
318
- "aria-multiselectable": A.value || void 0,
319
- onClick: n[0] ||= (e) => Z(!T.value),
320
- onKeydown: Tt
321
- }), [A.value && U.value ? (f(), s("div", Oe, [(f(!0), s(r, null, ye(dt.value, (e) => (f(), s("span", {
376
+ "aria-controls": `${j.value}-listbox`,
377
+ "aria-invalid": R.value || void 0,
378
+ "aria-describedby": z.value ? `${j.value}-help` : void 0,
379
+ "aria-disabled": d.disabled || void 0,
380
+ "aria-busy": P.value || void 0,
381
+ "aria-multiselectable": M.value || void 0,
382
+ onClick: n[0] ||= (e) => Q(!D.value),
383
+ onKeydown: Nt
384
+ }), [M.value && U.value ? (p(), c("div", De, [(p(!0), c(i, null, ve(ht.value, (e) => (p(), c("span", {
322
385
  key: String(e.value),
323
386
  class: "m-select__tag"
324
- }, [c("span", ke, m(e.label), 1), c("button", {
387
+ }, [l("span", Oe, g(e.label), 1), l("button", {
325
388
  class: "m-select__tag-remove",
326
389
  type: "button",
327
- "aria-label": h(x).removeTag,
328
- disabled: u.disabled,
329
- onClick: (t) => Ct(e.value, t)
330
- }, [l(t, {
390
+ "aria-label": _(C).removeTag,
391
+ disabled: d.disabled,
392
+ onClick: (t) => jt(e.value, t)
393
+ }, [u(t, {
331
394
  name: "close",
332
395
  size: "sm"
333
- })], 8, Ae)]))), 128)), V.value ? (f(), s("span", {
396
+ })], 8, ke)]))), 128)), gt.value ? (p(), c("span", {
334
397
  key: 0,
335
398
  class: "m-select__tag m-select__tag--more",
336
- "aria-label": _t.value
337
- }, " +" + m(V.value), 9, je)) : o("", !0)])) : (f(), s("span", Me, [h(Je).value && U.value && H.value ? be(e.$slots, "value", { option: H.value }, void 0, void 0, 0) : (f(), s(r, { key: 1 }, [me(m(ft.value), 1)], 64))])), M.value ? (f(), s("span", Ne)) : o("", !0)], 16, De), c("div", Pe, [pt.value ? (f(), s("button", {
399
+ "aria-label": Ct.value
400
+ }, " +" + g(gt.value), 9, Ae)) : s("", !0)])) : (p(), c("span", je, [_(Ze).value && U.value && _t.value ? h(e.$slots, "value", { option: _t.value }, void 0, void 0, 0) : (p(), c(i, { key: 1 }, [pe(g(vt.value), 1)], 64))])), P.value ? (p(), c("span", Me)) : s("", !0)], 16, Ee), l("div", Ne, [yt.value ? (p(), c("button", {
338
401
  key: 0,
339
402
  class: "m-select__clear",
340
403
  type: "button",
341
- "aria-label": h(x).clear,
342
- onClick: wt
343
- }, [l(t, {
404
+ "aria-label": _(C).clear,
405
+ onClick: Mt
406
+ }, [u(t, {
344
407
  name: "close",
345
408
  class: "m-control-affix-icon"
346
- })], 8, Fe)) : o("", !0), c("span", {
347
- class: d(["m-select__indicator", { "m-select__indicator--open": T.value }]),
409
+ })], 8, Pe)) : s("", !0), l("span", {
410
+ class: f(["m-select__indicator", { "m-select__indicator--open": D.value }]),
348
411
  "aria-hidden": "true"
349
- }, [l(t, {
412
+ }, [u(t, {
350
413
  name: "chevron-down",
351
414
  class: "m-control-affix-icon"
352
415
  })], 2)])], 2),
353
- (f(), a(fe, {
354
- to: ct.value.to,
355
- disabled: ct.value.disabled
356
- }, [l(pe, {
357
- name: h($e),
358
- css: h(et)
416
+ (p(), o(de, {
417
+ to: dt.value.to,
418
+ disabled: dt.value.disabled
419
+ }, [u(fe, {
420
+ name: _(nt),
421
+ css: _(rt)
359
422
  }, {
360
- default: _(() => [T.value ? (f(), s("div", {
423
+ default: v(() => [D.value ? (p(), c("div", {
361
424
  key: 0,
362
- id: `${k.value}-listbox`,
425
+ id: `${j.value}-listbox`,
363
426
  ref_key: "menu",
364
- ref: C,
365
- class: d(["m-select__menu", [`m-select__menu--${u.placement}`, { "m-select__menu--teleported": F.value }]]),
366
- style: _e(F.value ? nt.value : void 0),
427
+ ref: T,
428
+ class: f(["m-select__menu", [`m-select__menu--${d.placement}`, { "m-select__menu--teleported": L.value }]]),
429
+ style: ge(L.value ? at.value : void 0),
367
430
  role: "listbox",
368
431
  tabindex: "-1",
369
- "aria-multiselectable": A.value || void 0,
370
- "aria-label": u.label ?? u.placeholder ?? h(x).selectOption,
371
- onKeydown: Et
432
+ "aria-multiselectable": M.value || void 0,
433
+ "aria-label": d.label ?? d.placeholder ?? _(C).selectOption,
434
+ onKeydown: Pt
372
435
  }, [
373
- N.value ? we((f(), s("input", {
374
- key: 0,
436
+ e.$slots.header ? (p(), c("div", Ie, [h(e.$slots, "header")])) : s("", !0),
437
+ F.value ? Ce((p(), c("input", {
438
+ key: 1,
375
439
  ref_key: "filterInput",
376
- ref: w,
377
- "onUpdate:modelValue": n[1] ||= (e) => E.value = e,
440
+ ref: E,
441
+ "onUpdate:modelValue": n[1] ||= (e) => O.value = e,
378
442
  class: "m-select__filter",
379
443
  type: "search",
380
- placeholder: h(x).searchPlaceholder,
381
- "aria-label": h(x).filterOptions,
382
- onClick: n[2] ||= Te(() => {}, ["stop"]),
383
- onKeydown: Te(Et, ["stop"])
384
- }, null, 40, Le)), [[Ce, E.value]]) : o("", !0),
385
- q.value && !M.value && G.value.length ? (f(), a(oe, {
386
- key: 1,
387
- id: `${k.value}-listbox`,
444
+ size: "1",
445
+ placeholder: _(C).searchPlaceholder,
446
+ "aria-label": _(C).filterOptions,
447
+ onClick: n[2] ||= we(() => {}, ["stop"]),
448
+ onKeydown: we(Pt, ["stop"])
449
+ }, null, 40, Le)), [[xe, O.value]]) : s("", !0),
450
+ J.value && !P.value && K.value.length ? (p(), o(ae, {
451
+ key: 2,
452
+ id: `${j.value}-listbox`,
388
453
  ref_key: "virtualList",
389
- ref: bt,
454
+ ref: Et,
390
455
  class: "m-select__list m-select__list--virtual",
391
456
  role: "listbox",
392
- "aria-label": u.label ?? u.placeholder ?? h(x).selectOption,
457
+ "aria-label": d.label ?? d.placeholder ?? _(C).selectOption,
393
458
  items: G.value,
394
- "item-size": vt.value,
395
- height: yt.value,
459
+ "item-size": wt.value,
460
+ height: Tt.value,
396
461
  buffer: 4
397
462
  }, {
398
- item: _(({ item: n }) => [c("button", {
399
- class: d(["m-select__option", {
400
- "m-select__option--selected": !J(n).created && Y(J(n).value),
401
- "m-select__option--highlighted": K.value[D.value]?.value === J(n).value && !!K.value[D.value]?.created == !!J(n).created,
402
- "m-select__option--create": J(n).created
463
+ item: v(({ item: n }) => [Dt(n).type === "group" ? (p(), c("div", Re, g(Ot(n)), 1)) : (p(), c("button", {
464
+ key: 1,
465
+ class: f(["m-select__option", {
466
+ "m-select__option--selected": !Y(n).created && X(Y(n).value),
467
+ "m-select__option--highlighted": q.value[k.value]?.value === Y(n).value && !!q.value[k.value]?.created == !!Y(n).created,
468
+ "m-select__option--create": Y(n).created
403
469
  }]),
404
470
  type: "button",
405
471
  role: "option",
406
- "aria-selected": J(n).created ? void 0 : Y(J(n).value),
407
- disabled: J(n).disabled,
408
- onMouseenter: (e) => !J(n).disabled && (D.value = K.value.findIndex((e) => e.value === J(n).value && !!e.created == !!J(n).created)),
409
- onClick: (e) => Q(J(n))
410
- }, [be(e.$slots, "option", { option: J(n) }, () => [c("span", null, m(J(n).created ? gt.value : J(n).label), 1)]), !J(n).created && Y(J(n).value) ? (f(), a(t, {
472
+ "aria-selected": Y(n).created ? void 0 : X(Y(n).value),
473
+ disabled: Y(n).disabled,
474
+ onMouseenter: (e) => !Y(n).disabled && (k.value = q.value.findIndex((e) => e.value === Y(n).value && !!e.created == !!Y(n).created)),
475
+ onClick: (e) => $(Y(n))
476
+ }, [h(e.$slots, "option", { option: Y(n) }, () => [l("span", null, g(Y(n).created ? St.value : Y(n).label), 1)]), !Y(n).created && X(Y(n).value) ? (p(), o(t, {
411
477
  key: 0,
412
478
  class: "m-select__check",
413
479
  name: "check",
414
480
  size: "sm"
415
- })) : o("", !0)], 42, Re)]),
481
+ })) : s("", !0)], 42, ze))]),
416
482
  _: 3
417
483
  }, 8, [
418
484
  "id",
@@ -420,60 +486,61 @@ var Ee = ["for"], De = [
420
486
  "items",
421
487
  "item-size",
422
488
  "height"
423
- ])) : (f(), a(ae, {
424
- key: 2,
425
- id: `${k.value}-listbox`,
489
+ ])) : (p(), o(ie, {
490
+ key: 3,
491
+ id: `${j.value}-listbox`,
426
492
  class: "m-select__list",
427
493
  "fit-content": "",
428
494
  "wrap-class": "m-select__list-wrap",
429
495
  "view-class": "m-select__list-view"
430
496
  }, {
431
- default: _(() => [
432
- M.value ? (f(), s("div", ze, m(h(x).loading), 1)) : o("", !0),
433
- (f(!0), s(r, null, ye(G.value, (n) => (f(), s("button", {
434
- key: n.created ? `__create:${String(n.value)}` : String(n.value),
435
- class: d(["m-select__option", {
436
- "m-select__option--selected": !n.created && Y(n.value),
437
- "m-select__option--highlighted": K.value[D.value]?.value === n.value && !!K.value[D.value]?.created == !!n.created,
438
- "m-select__option--create": n.created
497
+ default: v(() => [
498
+ P.value ? (p(), c("div", Be, g(_(C).loading), 1)) : s("", !0),
499
+ (p(!0), c(i, null, ve(G.value, (n) => (p(), c(i, { key: n.key }, [n.type === "group" ? (p(), c("div", Ve, g(n.label), 1)) : (p(), c("button", {
500
+ key: 1,
501
+ class: f(["m-select__option", {
502
+ "m-select__option--selected": !n.option.created && X(n.option.value),
503
+ "m-select__option--highlighted": q.value[k.value]?.value === n.option.value && !!q.value[k.value]?.created == !!n.option.created,
504
+ "m-select__option--create": n.option.created
439
505
  }]),
440
506
  type: "button",
441
507
  role: "option",
442
- "aria-selected": n.created ? void 0 : Y(n.value),
443
- disabled: n.disabled,
444
- onMouseenter: (e) => !n.disabled && (D.value = K.value.findIndex((e) => e.value === n.value && !!e.created == !!n.created)),
445
- onClick: (e) => Q(n)
446
- }, [be(e.$slots, "option", { option: n }, () => [c("span", null, m(n.created ? gt.value : n.label), 1)]), !n.created && Y(n.value) ? (f(), a(t, {
508
+ "aria-selected": n.option.created ? void 0 : X(n.option.value),
509
+ disabled: n.option.disabled,
510
+ onMouseenter: (e) => !n.option.disabled && (k.value = q.value.findIndex((e) => e.value === n.option.value && !!e.created == !!n.option.created)),
511
+ onClick: (e) => $(n.option)
512
+ }, [h(e.$slots, "option", { option: n.option }, () => [l("span", null, g(n.option.created ? St.value : n.option.label), 1)]), !n.option.created && X(n.option.value) ? (p(), o(t, {
447
513
  key: 0,
448
514
  class: "m-select__check",
449
515
  name: "check",
450
516
  size: "sm"
451
- })) : o("", !0)], 42, Be))), 128)),
452
- !G.value.length && !M.value ? (f(), s("div", Ve, m(it.value), 1)) : o("", !0)
517
+ })) : s("", !0)], 42, He))], 64))), 128)),
518
+ !K.value.length && !P.value ? (p(), c("div", Ue, g(st.value), 1)) : s("", !0)
453
519
  ]),
454
520
  _: 3
455
521
  }, 8, ["id"])),
456
- q.value && M.value ? (f(), s("div", He, m(h(x).loading), 1)) : q.value && !G.value.length && !M.value ? (f(), s("div", Ue, m(it.value), 1)) : o("", !0)
457
- ], 46, Ie)) : o("", !0)]),
522
+ J.value && P.value ? (p(), c("div", We, g(_(C).loading), 1)) : J.value && !K.value.length && !P.value ? (p(), c("div", Ge, g(st.value), 1)) : s("", !0),
523
+ e.$slots.footer ? (p(), c("div", Ke, [h(e.$slots, "footer")])) : s("", !0)
524
+ ], 46, Fe)) : s("", !0)]),
458
525
  _: 3
459
526
  }, 8, ["name", "css"])], 8, ["to", "disabled"])),
460
- u.required ? (f(), s("input", {
527
+ d.required ? (p(), c("input", {
461
528
  key: 1,
462
529
  class: "m-select__required-input",
463
530
  tabindex: "-1",
464
531
  "aria-hidden": "true",
465
- name: u.name,
532
+ name: d.name,
466
533
  required: !U.value,
467
- value: A.value ? R.value.join(",") : R.value[0]
468
- }, null, 8, We)) : o("", !0),
469
- L.value ? (f(), s("span", {
534
+ value: M.value ? B.value.join(",") : B.value[0]
535
+ }, null, 8, qe)) : s("", !0),
536
+ z.value ? (p(), c("span", {
470
537
  key: 2,
471
- id: `${k.value}-help`,
472
- class: d(["m-select-field__help", { "m-select-field__help--invalid": lt.value }]),
473
- role: lt.value ? "alert" : void 0
474
- }, m(L.value), 11, Ge)) : o("", !0)
538
+ id: `${j.value}-help`,
539
+ class: f(["m-select-field__help", { "m-select-field__help--invalid": ft.value }]),
540
+ role: ft.value ? "alert" : void 0
541
+ }, g(z.value), 11, Je)) : s("", !0)
475
542
  ], 16));
476
543
  }
477
544
  });
478
545
  //#endregion
479
- export { qe as MSelect };
546
+ export { Xe as MSelect };