maz-ui 3.46.1-beta.5 → 3.46.1-beta.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.
Files changed (122) hide show
  1. package/components/MazBottomSheet.mjs +1 -1
  2. package/components/MazBtn.d.ts +5 -0
  3. package/components/MazBtn.mjs +1 -1
  4. package/components/MazCard.mjs +1 -1
  5. package/components/MazCarousel.mjs +1 -1
  6. package/components/MazDialog.mjs +1 -1
  7. package/components/MazDialogPromise.mjs +1 -1
  8. package/components/MazDrawer.mjs +1 -1
  9. package/components/MazDropdown.mjs +1 -1
  10. package/components/MazInput.mjs +1 -1
  11. package/components/MazInputNumber.mjs +1 -1
  12. package/components/MazInputPrice.mjs +1 -1
  13. package/components/MazInputTags.mjs +1 -1
  14. package/components/MazPagination.mjs +1 -1
  15. package/components/MazPhoneNumberInput.mjs +1 -1
  16. package/components/MazPicker.mjs +1 -1
  17. package/components/MazPullToRefresh.d.ts +2 -2
  18. package/components/MazSelect.mjs +1 -1
  19. package/components/MazTable.d.ts +2 -2
  20. package/components/MazTable.mjs +1 -1
  21. package/components/assets/MazBtn.css +1 -1
  22. package/components/assets/MazInputNumber.css +1 -1
  23. package/components/assets/MazInputTags.css +1 -1
  24. package/components/assets/MazPagination.css +1 -1
  25. package/components/assets/MazPicker.css +1 -1
  26. package/components/assets/MazSelect.css +1 -1
  27. package/components/assets/MazTable.css +1 -1
  28. package/components/chunks/{MazBottomSheet-s9lLaK1M.mjs → MazBottomSheet-DeAah_or.mjs} +1 -1
  29. package/components/chunks/MazBtn-BV212IYv.mjs +118 -0
  30. package/components/chunks/{MazBtn-CHABo63Y.mjs → MazBtn-BXvObcWn.mjs} +21 -19
  31. package/components/chunks/{MazBtn-BXdap6JU.mjs → MazBtn-C2dJYsnq.mjs} +21 -19
  32. package/components/chunks/MazBtn-C2htID_X.mjs +118 -0
  33. package/components/chunks/MazBtn-C4xZC-A2.mjs +118 -0
  34. package/components/chunks/{MazBtn-CVB5qDjV.mjs → MazBtn-C5IbN0rp.mjs} +34 -32
  35. package/components/chunks/MazBtn-CEFfMm7k.mjs +118 -0
  36. package/components/chunks/{MazBtn-BMmuCciQ.mjs → MazBtn-CESOVC-a.mjs} +20 -18
  37. package/components/chunks/MazBtn-CLFly8Ie.mjs +118 -0
  38. package/components/chunks/MazBtn-CRpqDW12.mjs +118 -0
  39. package/components/chunks/MazBtn-D2H26ExI.mjs +118 -0
  40. package/components/chunks/MazBtn-y4vRRWDg.mjs +118 -0
  41. package/components/chunks/{MazBtn-DarjZUV4.mjs → MazBtn-zMzxqcCs.mjs} +34 -32
  42. package/components/chunks/{MazCard-BaJ5Ee3I.mjs → MazCard-BF-2_gZV.mjs} +1 -1
  43. package/components/chunks/{MazCarousel-Bb4fpVqN.mjs → MazCarousel-DVBUt8NL.mjs} +1 -1
  44. package/components/chunks/{MazCheckbox-C4diNXJq.mjs → MazCheckbox-CEfJco3U.mjs} +1 -1
  45. package/components/chunks/MazCheckbox-CeVxgVY8.mjs +146 -0
  46. package/components/chunks/{MazCheckbox-8n6NtRBb.mjs → MazCheckbox-mgtQBs4K.mjs} +1 -1
  47. package/components/chunks/{MazDialog-Bv2PzQBz.mjs → MazDialog-fn7vXgBg.mjs} +1 -1
  48. package/components/chunks/{MazDialogPromise-BZLP9sXZ.mjs → MazDialogPromise-C8dpQb5k.mjs} +2 -2
  49. package/components/chunks/{MazGallery-C9secrXc.mjs → MazGallery-CXJsK5ve.mjs} +2 -2
  50. package/components/chunks/{MazIcon-CudB1a0D.mjs → MazIcon-BXX3RaoN.mjs} +1 -1
  51. package/components/chunks/{MazIcon-BaJm2s8_.mjs → MazIcon-DjMuw8Bz.mjs} +1 -1
  52. package/components/chunks/MazInput-AcA93-8Q.mjs +291 -0
  53. package/components/chunks/{MazInput-B3RzuuNv.mjs → MazInput-Dnwxraz4.mjs} +1 -1
  54. package/components/chunks/{MazInputNumber-mLgq5obR.mjs → MazInputNumber-OY_UqCMs.mjs} +173 -171
  55. package/components/chunks/{MazInputPrice-DhYRBqTS.mjs → MazInputPrice-DvVAZa12.mjs} +1 -1
  56. package/components/chunks/{MazInputTags-DinwbXaD.mjs → MazInputTags-DKlGT2IB.mjs} +170 -168
  57. package/components/chunks/MazLoadingBar-By1umvdC.mjs +32 -0
  58. package/components/chunks/{MazPagination-Cqnr19iI.mjs → MazPagination-BL9LU84U.mjs} +132 -130
  59. package/components/chunks/{MazPhoneNumberInput-C3GdtqN2.mjs → MazPhoneNumberInput-C7gUk5lg.mjs} +3 -3
  60. package/components/chunks/{MazPicker-DA92HhwS.mjs → MazPicker-Dhm3u2MN.mjs} +536 -534
  61. package/components/chunks/{MazPickerMonthSwitcher-CPWkw0Hq.mjs → MazPickerMonthSwitcher-ck8cl1-N.mjs} +1 -1
  62. package/components/chunks/{MazPickerShortcuts-Fwcoqg5M.mjs → MazPickerShortcuts-hEpUqVC-.mjs} +1 -1
  63. package/components/chunks/{MazPickerYearSwitcher-DfSXPGfT.mjs → MazPickerYearSwitcher-CmMxOc69.mjs} +1 -1
  64. package/components/chunks/MazSelect-CGsMRdr7.mjs +568 -0
  65. package/components/chunks/{MazSelect-DPTuyc26.mjs → MazSelect-ed445MXs.mjs} +2 -2
  66. package/components/chunks/{MazSpinner-BCQzF6j-.mjs → MazSpinner-Akyx5wgU.mjs} +1 -1
  67. package/components/chunks/{MazSpinner-B-mc1FWS.mjs → MazSpinner-B2dsE23u.mjs} +1 -1
  68. package/components/chunks/{MazSpinner-CVBz5HIx.mjs → MazSpinner-BCOeuzTB.mjs} +1 -1
  69. package/components/chunks/{MazSpinner-BpjK60ul.mjs → MazSpinner-BakExtKd.mjs} +1 -1
  70. package/components/chunks/{MazSpinner-CFJmcsGl.mjs → MazSpinner-C9meLNrb.mjs} +1 -1
  71. package/components/chunks/{MazSpinner-C2ok6AlJ.mjs → MazSpinner-CKOy0M1T.mjs} +1 -1
  72. package/components/chunks/MazSpinner-CL6orjX7.mjs +37 -0
  73. package/components/chunks/MazSpinner-CQTq0J6f.mjs +37 -0
  74. package/components/chunks/{MazSpinner-BEqvmPiV.mjs → MazSpinner-CeZk8jA9.mjs} +1 -1
  75. package/components/chunks/MazSpinner-CqS3onAE.mjs +37 -0
  76. package/components/chunks/MazSpinner-D1zj-581.mjs +37 -0
  77. package/components/chunks/MazSpinner-DJ2t85tY.mjs +37 -0
  78. package/components/chunks/{MazSpinner-DEdQlQr1.mjs → MazSpinner-DbaTlD5B.mjs} +1 -1
  79. package/components/chunks/MazSpinner-DgJ9tVv_.mjs +37 -0
  80. package/components/chunks/{MazSpinner-BCHAzmqS.mjs → MazSpinner-DoKvoICM.mjs} +1 -1
  81. package/components/chunks/MazSpinner-Oy4E193R.mjs +37 -0
  82. package/components/chunks/MazTable-QwG-Kh88.mjs +692 -0
  83. package/components/chunks/MazTableCell-BSNyqTSX.mjs +23 -0
  84. package/components/chunks/MazTableRow-CgubMdrX.mjs +30 -0
  85. package/components/chunks/MazTableTitle-h4dattYD.mjs +23 -0
  86. package/components/chunks/{MazTransitionExpand-BoTQeNNf.mjs → MazTransitionExpand-BvqRDM9d.mjs} +1 -1
  87. package/components/chunks/arrow-up-DjSlktWl.mjs +30 -0
  88. package/components/chunks/inject-strict-BmiaNiwC.mjs +10 -0
  89. package/components/chunks/useInstanceUniqId-DW9jO1Sz.mjs +11 -0
  90. package/css/main.css +1 -1
  91. package/modules/assets/MazBtn.css +1 -1
  92. package/modules/chunks/{MazBtn-BG2dUdHV.cjs → MazBtn-DeAZcD0R.cjs} +3 -3
  93. package/{components/chunks/MazBtn-CXxOU7fp.mjs → modules/chunks/MazBtn-DvffpPyV.mjs} +21 -19
  94. package/modules/chunks/{MazIcon-RkWxQ8JM.cjs → MazIcon-BiwOZEZl.cjs} +1 -1
  95. package/modules/chunks/{MazIcon-BqfELHOt.mjs → MazIcon-D2B0umvn.mjs} +1 -1
  96. package/modules/chunks/{MazSpinner-GfL807jq.cjs → MazSpinner-CZIYnX05.cjs} +1 -1
  97. package/modules/chunks/{MazSpinner-DgSRxVEo.mjs → MazSpinner-Csgl_Uho.mjs} +1 -1
  98. package/modules/chunks/index-B6Pf_QhC.cjs +149 -0
  99. package/modules/chunks/{index-aKGx1nxl.mjs → index-C34aEXzu.mjs} +319 -314
  100. package/modules/index.cjs +1 -1
  101. package/modules/index.mjs +1 -1
  102. package/nuxt/index.json +1 -1
  103. package/package.json +1 -1
  104. package/types/components/MazBtn.vue.d.ts +5 -0
  105. package/types/components/MazPullToRefresh.vue.d.ts +2 -2
  106. package/types/components/MazTable.vue.d.ts +2 -2
  107. package/components/chunks/MazBtn-CZSXnr3w.mjs +0 -116
  108. package/components/chunks/MazBtn-CwYBz6QO.mjs +0 -116
  109. package/components/chunks/MazBtn-DIE2eM-g.mjs +0 -116
  110. package/components/chunks/MazBtn-DKD-ZMaF.mjs +0 -116
  111. package/components/chunks/MazBtn-OKT5-Y4s.mjs +0 -116
  112. package/components/chunks/MazBtn-e3abHT2L.mjs +0 -116
  113. package/components/chunks/MazSpinner-BoG1T_ZX.mjs +0 -37
  114. package/components/chunks/MazSpinner-DhHVVBJE.mjs +0 -37
  115. package/components/chunks/MazSpinner-DuGaC-cw.mjs +0 -37
  116. package/components/chunks/MazSpinner-Iwon82He.mjs +0 -37
  117. package/components/chunks/MazSpinner-JbfjMNFL.mjs +0 -37
  118. package/components/chunks/MazSpinner-QgcgF5j5.mjs +0 -37
  119. package/components/chunks/MazSpinner-yQGVxaFm.mjs +0 -37
  120. package/components/chunks/MazTable-CrtVI-dp.mjs +0 -2015
  121. package/modules/chunks/MazBtn-BeqYSSYI.mjs +0 -116
  122. package/modules/chunks/index-CE2CsQsx.cjs +0 -149
@@ -1,16 +1,16 @@
1
- import { openBlock as r, createElementBlock as w, createElementVNode as E, defineComponent as q, defineAsyncComponent as S, useAttrs as le, useSlots as H, computed as i, createBlock as v, resolveDynamicComponent as F, normalizeClass as z, withCtx as D, createCommentVNode as s, renderSlot as M, unref as y, createVNode as L, useId as ae, ref as $, onMounted as re, normalizeStyle as K, withDirectives as se, mergeProps as G, toHandlers as ie, vModelDynamic as ue, createTextVNode as J, toDisplayString as Q, withModifiers as W, TransitionGroup as de, Fragment as ce, renderList as fe, withKeys as N } from "vue";
1
+ import { openBlock as s, createElementBlock as $, createElementVNode as E, defineComponent as q, defineAsyncComponent as S, useAttrs as ae, useSlots as H, computed as r, createBlock as v, resolveDynamicComponent as F, normalizeClass as k, withCtx as P, createCommentVNode as i, renderSlot as M, unref as b, createVNode as L, useId as le, ref as T, onMounted as re, normalizeStyle as K, withDirectives as se, mergeProps as G, toHandlers as ie, vModelDynamic as ue, createTextVNode as J, toDisplayString as Q, withModifiers as W, TransitionGroup as de, Fragment as ce, renderList as fe, withKeys as N } from "vue";
2
2
  import '../assets/MazInputTags.css';function U(f) {
3
3
  return !!f;
4
4
  }
5
- const pe = {
5
+ const me = {
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
7
  width: "1em",
8
8
  height: "1em",
9
9
  fill: "none",
10
10
  viewBox: "0 0 24 24"
11
11
  };
12
- function me(f, l) {
13
- return r(), w("svg", pe, l[0] || (l[0] = [
12
+ function pe(f, t) {
13
+ return s(), $("svg", me, t[0] || (t[0] = [
14
14
  E(
15
15
  "path",
16
16
  {
@@ -26,10 +26,10 @@ function me(f, l) {
26
26
  )
27
27
  ]));
28
28
  }
29
- const ve = { render: me }, be = {
29
+ const ve = { render: pe }, ye = {
30
30
  key: 2,
31
31
  class: "m-btn-loader-container"
32
- }, ye = /* @__PURE__ */ q({
32
+ }, be = /* @__PURE__ */ q({
33
33
  __name: "MazBtn",
34
34
  props: {
35
35
  variant: { default: "button" },
@@ -50,114 +50,116 @@ const ve = { render: me }, be = {
50
50
  leftIcon: { type: [String, Function, Object], default: void 0 },
51
51
  rightIcon: { type: [String, Function, Object], default: void 0 },
52
52
  noPadding: { type: Boolean },
53
- noElevation: { type: Boolean }
53
+ noElevation: { type: Boolean },
54
+ justify: { default: "center" }
54
55
  },
55
56
  setup(f) {
56
- const l = f, o = S(() => import("./MazSpinner-DhHVVBJE.mjs")), c = S(() => import("./MazIcon-BbvBov5G.mjs")), { href: k, to: h } = le(), g = H(), m = i(() => k ? "a" : h ? "router-link" : "button"), T = i(
57
- () => l.pastel ? `--${l.color}-pastel` : l.outline ? `--${l.color}-outline` : `--${l.color}`
58
- ), p = i(
59
- () => (l.loading || l.disabled) && m.value === "button"
60
- ), I = i(() => p.value ? "--cursor-default" : "--cursor-pointer"), V = i(() => `--is-${l.variant}`), O = i(() => l.loading && l.variant === "button"), C = i(() => !!g["left-icon"] || l.leftIcon), n = i(() => !!g["right-icon"] || l.rightIcon), a = i(() => C.value || n.value), u = i(() => l.icon || !!g.icon), d = i(() => m.value === "button" ? l.type : void 0), b = i(() => l.size === "xl" ? "maz-text-3xl" : l.size === "lg" ? "maz-text-2xl" : l.size === "md" ? "maz-text-xl" : l.size === "sm" ? "maz-text-lg" : l.size === "xs" ? "maz-text-base" : l.size === "mini" ? "maz-text-sm" : "md");
61
- return (t, P) => (r(), v(F(m.value), {
62
- disabled: p.value || void 0,
63
- class: z(["m-btn", [
64
- `--${t.size}`,
65
- !t.fab && !t.rounded && t.roundedSize && `--rounded-${t.roundedSize}`,
66
- T.value,
67
- I.value,
57
+ const t = f, o = S(() => import("./MazSpinner-D1zj-581.mjs")), c = S(() => import("./MazIcon-BbvBov5G.mjs")), { href: I, to: z } = ae(), g = H(), p = r(() => I ? "a" : z ? "router-link" : "button"), j = r(
58
+ () => t.pastel ? `--${t.color}-pastel` : t.outline ? `--${t.color}-outline` : `--${t.color}`
59
+ ), m = r(
60
+ () => (t.loading || t.disabled) && p.value === "button"
61
+ ), B = r(() => m.value ? "--cursor-default" : "--cursor-pointer"), V = r(() => `--is-${t.variant}`), O = r(() => t.loading && t.variant === "button"), C = r(() => !!g["left-icon"] || t.leftIcon), n = r(() => !!g["right-icon"] || t.rightIcon), l = r(() => C.value || n.value), u = r(() => t.icon || !!g.icon), d = r(() => p.value === "button" ? t.type : void 0), y = r(() => t.size === "xl" ? "maz-text-3xl" : t.size === "lg" ? "maz-text-2xl" : t.size === "md" ? "maz-text-xl" : t.size === "sm" ? "maz-text-lg" : t.size === "xs" ? "maz-text-base" : t.size === "mini" ? "maz-text-sm" : "md"), h = r(() => t.justify === "start" ? "maz-justify-start" : t.justify === "end" ? "maz-justify-end" : t.justify === "center" ? "maz-justify-center" : t.justify === "between" ? "maz-justify-between" : t.justify === "around" ? "maz-justify-around" : t.justify === "evenly" ? "maz-justify-evenly" : "maz-justify-center");
62
+ return (a, D) => (s(), v(F(p.value), {
63
+ disabled: m.value || void 0,
64
+ class: k(["m-btn", [
65
+ `--${a.size}`,
66
+ !a.fab && !a.rounded && a.roundedSize && `--rounded-${a.roundedSize}`,
67
+ j.value,
68
+ B.value,
68
69
  V.value,
70
+ h.value,
69
71
  {
70
- "--block": t.block,
71
- "--no-underline": t.noUnderline,
72
- "--fab": t.fab,
73
- "--loading": t.loading,
74
- "--disabled": p.value,
75
- "--icon": a.value,
76
- "--rounded": t.rounded,
77
- "--no-rounded": t.noRounded,
78
- "--no-padding": t.noPadding,
79
- "--no-elevation": t.noElevation
72
+ "--block": a.block,
73
+ "--no-underline": a.noUnderline,
74
+ "--fab": a.fab,
75
+ "--loading": a.loading,
76
+ "--disabled": m.value,
77
+ "--icon": l.value,
78
+ "--rounded": a.rounded,
79
+ "--no-rounded": a.noRounded,
80
+ "--no-padding": a.noPadding,
81
+ "--no-elevation": a.noElevation
80
82
  }
81
83
  ]]),
82
84
  type: d.value
83
85
  }, {
84
- default: D(() => [
85
- s(`
86
+ default: P(() => [
87
+ i(`
86
88
  @slot left-icon - The icon to display on the left of the button
87
89
  `),
88
- M(t.$slots, "left-icon", {}, () => [
89
- typeof t.leftIcon == "string" ? (r(), v(y(c), {
90
+ M(a.$slots, "left-icon", {}, () => [
91
+ typeof a.leftIcon == "string" ? (s(), v(b(c), {
90
92
  key: 0,
91
- name: t.leftIcon,
92
- class: z([b.value])
93
- }, null, 8, ["name", "class"])) : t.leftIcon ? (r(), v(F(t.leftIcon), {
93
+ name: a.leftIcon,
94
+ class: k([y.value])
95
+ }, null, 8, ["name", "class"])) : a.leftIcon ? (s(), v(F(a.leftIcon), {
94
96
  key: 1,
95
- class: z([b.value])
96
- }, null, 8, ["class"])) : s("v-if", !0)
97
+ class: k([y.value])
98
+ }, null, 8, ["class"])) : i("v-if", !0)
97
99
  ], !0),
98
- s(`
100
+ i(`
99
101
  @slot icon - The icon to display on the fab button
100
102
  `),
101
- u.value ? M(t.$slots, "icon", { key: 0 }, () => [
102
- typeof t.icon == "string" ? (r(), v(y(c), {
103
+ u.value ? M(a.$slots, "icon", { key: 0 }, () => [
104
+ typeof a.icon == "string" ? (s(), v(b(c), {
103
105
  key: 0,
104
- name: t.icon,
105
- class: z([b.value])
106
- }, null, 8, ["name", "class"])) : t.icon ? (r(), v(F(t.icon), {
106
+ name: a.icon,
107
+ class: k([y.value])
108
+ }, null, 8, ["name", "class"])) : a.icon ? (s(), v(F(a.icon), {
107
109
  key: 1,
108
- class: z([b.value])
109
- }, null, 8, ["class"])) : s("v-if", !0)
110
- ], !0) : s("v-if", !0),
111
- s(`
110
+ class: k([y.value])
111
+ }, null, 8, ["class"])) : i("v-if", !0)
112
+ ], !0) : i("v-if", !0),
113
+ i(`
112
114
  @slot default - The content of the button
113
115
  `),
114
- M(t.$slots, "default", {}, void 0, !0),
115
- s(`
116
+ M(a.$slots, "default", {}, void 0, !0),
117
+ i(`
116
118
  @slot left-icon - The icon to display on the left of the button
117
119
  `),
118
- n.value ? M(t.$slots, "right-icon", { key: 1 }, () => [
119
- typeof t.rightIcon == "string" ? (r(), v(y(c), {
120
+ n.value ? M(a.$slots, "right-icon", { key: 1 }, () => [
121
+ typeof a.rightIcon == "string" ? (s(), v(b(c), {
120
122
  key: 0,
121
- name: t.rightIcon,
122
- class: z([b.value])
123
- }, null, 8, ["name", "class"])) : t.rightIcon ? (r(), v(F(t.rightIcon), {
123
+ name: a.rightIcon,
124
+ class: k([y.value])
125
+ }, null, 8, ["name", "class"])) : a.rightIcon ? (s(), v(F(a.rightIcon), {
124
126
  key: 1,
125
- class: z([b.value])
126
- }, null, 8, ["class"])) : s("v-if", !0)
127
- ], !0) : s("v-if", !0),
128
- O.value ? (r(), w("div", be, [
129
- L(y(o), {
127
+ class: k([y.value])
128
+ }, null, 8, ["class"])) : i("v-if", !0)
129
+ ], !0) : i("v-if", !0),
130
+ O.value ? (s(), $("div", ye, [
131
+ L(b(o), {
130
132
  size: "2em",
131
- color: t.color
133
+ color: a.color
132
134
  }, null, 8, ["color"])
133
- ])) : s("v-if", !0)
135
+ ])) : i("v-if", !0)
134
136
  ]),
135
137
  _: 3
136
138
  /* FORWARDED */
137
139
  }, 8, ["disabled", "class", "type"]));
138
140
  }
139
- }), R = (f, l) => {
141
+ }), R = (f, t) => {
140
142
  const o = f.__vccOpts || f;
141
- for (const [c, k] of l)
142
- o[c] = k;
143
+ for (const [c, I] of t)
144
+ o[c] = I;
143
145
  return o;
144
- }, X = /* @__PURE__ */ R(ye, [["__scopeId", "data-v-8deef21f"]]), ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
146
+ }, X = /* @__PURE__ */ R(be, [["__scopeId", "data-v-5aedac30"]]), ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
145
147
  __proto__: null,
146
148
  default: X
147
149
  }, Symbol.toStringTag, { value: "Module" }));
148
- function he({
150
+ function ze({
149
151
  componentName: f,
150
- providedId: l
152
+ providedId: t
151
153
  }) {
152
- const o = ae();
153
- return i(() => l ?? `${f}-${o}`);
154
+ const o = le();
155
+ return r(() => t ?? `${f}-${o}`);
154
156
  }
155
- function ze(f, l) {
157
+ function he(f, t) {
156
158
  let o;
157
159
  return function(...c) {
158
160
  clearTimeout(o), o = setTimeout(() => {
159
161
  f.apply(this, c);
160
- }, l);
162
+ }, t);
161
163
  };
162
164
  }
163
165
  const ke = {
@@ -203,8 +205,8 @@ const ke = {
203
205
  block: { type: Boolean }
204
206
  },
205
207
  emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
206
- setup(f, { emit: l }) {
207
- const o = f, c = l, k = S(() => Promise.resolve().then(() => ge)), h = S(() => import("./MazIcon-BbvBov5G.mjs")), g = S(() => import("./eye-slash-BoO00xzs.mjs")), m = S(() => import("./eye-f8zAUc30.mjs")), T = S(() => import("./check-BmubdHc_.mjs")), p = $(!1), I = $(!1), V = $(), O = he({
208
+ setup(f, { emit: t }) {
209
+ const o = f, c = t, I = S(() => Promise.resolve().then(() => ge)), z = S(() => import("./MazIcon-BbvBov5G.mjs")), g = S(() => import("./eye-slash-BoO00xzs.mjs")), p = S(() => import("./eye-f8zAUc30.mjs")), j = S(() => import("./check-BmubdHc_.mjs")), m = T(!1), B = T(!1), V = T(), O = ze({
208
210
  componentName: "MazInput",
209
211
  providedId: o.id
210
212
  });
@@ -212,7 +214,7 @@ const ke = {
212
214
  var e;
213
215
  o.autoFocus && ((e = V.value) == null || e.focus());
214
216
  });
215
- const C = i(() => o.type === "password"), n = i(() => p.value ? "text" : o.type), a = i(() => {
217
+ const C = r(() => o.type === "password"), n = r(() => m.value ? "text" : o.type), l = r(() => {
216
218
  if (!o.noBorder) {
217
219
  if (o.error)
218
220
  return "maz-border-danger";
@@ -220,7 +222,7 @@ const ke = {
220
222
  return "maz-border-success";
221
223
  if (o.warning)
222
224
  return "maz-border-warning";
223
- if (I.value || o.borderActive) {
225
+ if (B.value || o.borderActive) {
224
226
  if (o.color === "black")
225
227
  return "maz-border-black";
226
228
  if (o.color === "danger")
@@ -240,25 +242,25 @@ const ke = {
240
242
  }
241
243
  return "--default-border";
242
244
  }
243
- }), u = H(), d = i(() => {
244
- const { required: e, placeholder: B } = o;
245
- if (B)
246
- return e ? `${B} *` : B;
247
- }), b = i(() => j.value !== void 0 && j.value !== ""), t = ze(
245
+ }), u = H(), d = r(() => {
246
+ const { required: e, placeholder: w } = o;
247
+ if (w)
248
+ return e ? `${w} *` : w;
249
+ }), y = r(() => D.value !== void 0 && D.value !== ""), h = he(
248
250
  (e) => {
249
251
  c("update:model-value", e);
250
252
  },
251
253
  typeof o.debounce == "number" ? o.debounce : o.debounceDelay ?? 500
252
254
  );
253
- function P(e) {
255
+ function a(e) {
254
256
  if (o.debounce)
255
- return t(e);
257
+ return h(e);
256
258
  c("update:model-value", e);
257
259
  }
258
- const j = i({
260
+ const D = r({
259
261
  get: () => o.modelValue,
260
- set: (e) => P(e)
261
- }), Y = i(() => (!!o.label || !!o.hint) && (I.value || !!b.value || !!o.placeholder || ["date", "month", "week"].includes(o.type))), Z = i(() => !!o.label || !!o.hint);
262
+ set: (e) => a(e)
263
+ }), Y = r(() => (!!o.label || !!o.hint) && (B.value || !!y.value || !!o.placeholder || ["date", "month", "week"].includes(o.type))), Z = r(() => !!o.label || !!o.hint);
262
264
  function x() {
263
265
  return !!u["right-icon"] || C.value || !!u["valid-button"] || o.validButton || !!o.rightIcon;
264
266
  }
@@ -266,10 +268,10 @@ const ke = {
266
268
  return !!u["left-icon"] || !!o.leftIcon;
267
269
  }
268
270
  function ee(e) {
269
- c("focus", e), I.value = !0;
271
+ c("focus", e), B.value = !0;
270
272
  }
271
273
  function oe(e) {
272
- c("blur", e), I.value = !1;
274
+ c("blur", e), B.value = !1;
273
275
  }
274
276
  function te(e) {
275
277
  return c("change", e);
@@ -277,12 +279,12 @@ const ke = {
277
279
  function ne(e) {
278
280
  return c("input", e);
279
281
  }
280
- return (e, B) => (r(), w(
282
+ return (e, w) => (s(), $(
281
283
  "div",
282
284
  {
283
- class: z(["m-input", [
285
+ class: k(["m-input", [
284
286
  {
285
- "--is-focused": I.value || e.borderActive,
287
+ "--is-focused": B.value || e.borderActive,
286
288
  "--should-up": Y.value,
287
289
  "--has-label": Z.value,
288
290
  "--is-disabled": e.disabled,
@@ -301,34 +303,34 @@ const ke = {
301
303
  E(
302
304
  "div",
303
305
  {
304
- class: z(["m-input-wrapper", [
306
+ class: k(["m-input-wrapper", [
305
307
  e.inputClasses,
306
- a.value,
308
+ l.value,
307
309
  e.roundedSize ? `--rounded-${e.roundedSize}` : { "maz-rounded": !e.noRadius }
308
310
  ]])
309
311
  },
310
312
  [
311
- _() ? (r(), w("div", ke, [
312
- s(`
313
+ _() ? (s(), $("div", ke, [
314
+ i(`
313
315
  @slot left-icon - The icon to display on the left of the input
314
316
  `),
315
317
  e.$slots["left-icon"] || e.leftIcon ? M(e.$slots, "left-icon", { key: 0 }, () => [
316
- typeof e.leftIcon == "string" ? (r(), v(y(h), {
318
+ typeof e.leftIcon == "string" ? (s(), v(b(z), {
317
319
  key: 0,
318
320
  name: e.leftIcon,
319
321
  class: "maz-text-xl maz-text-muted"
320
- }, null, 8, ["name"])) : e.leftIcon ? (r(), v(F(e.leftIcon), {
322
+ }, null, 8, ["name"])) : e.leftIcon ? (s(), v(F(e.leftIcon), {
321
323
  key: 1,
322
324
  class: "maz-text-xl maz-text-muted"
323
- })) : s("v-if", !0)
324
- ], !0) : s("v-if", !0)
325
- ])) : s("v-if", !0),
325
+ })) : i("v-if", !0)
326
+ ], !0) : i("v-if", !0)
327
+ ])) : i("v-if", !0),
326
328
  E("div", Ie, [
327
329
  se(E("input", G({
328
- id: y(O),
330
+ id: b(O),
329
331
  ref_key: "input",
330
332
  ref: V,
331
- "onUpdate:modelValue": B[0] || (B[0] = (A) => j.value = A),
333
+ "onUpdate:modelValue": w[0] || (w[0] = (A) => D.value = A),
332
334
  type: n.value,
333
335
  name: e.name
334
336
  }, e.$attrs, {
@@ -345,15 +347,15 @@ const ke = {
345
347
  change: te,
346
348
  input: ne
347
349
  }, !0), {
348
- onClick: B[1] || (B[1] = (A) => e.$emit("click", A))
350
+ onClick: w[1] || (w[1] = (A) => e.$emit("click", A))
349
351
  }), null, 16, Be), [
350
- [ue, j.value]
352
+ [ue, D.value]
351
353
  ]),
352
- e.label || e.hint ? (r(), w(
354
+ e.label || e.hint ? (s(), $(
353
355
  "span",
354
356
  {
355
357
  key: 0,
356
- class: z(["m-input-label", [
358
+ class: k(["m-input-label", [
357
359
  {
358
360
  "maz-text-danger-600": e.error,
359
361
  "maz-text-success-600": e.success,
@@ -367,50 +369,50 @@ const ke = {
367
369
  1
368
370
  /* TEXT */
369
371
  ),
370
- e.required ? (r(), w("sup", we, "*")) : s("v-if", !0)
372
+ e.required ? (s(), $("sup", we, "*")) : i("v-if", !0)
371
373
  ],
372
374
  2
373
375
  /* CLASS */
374
- )) : s("v-if", !0)
376
+ )) : i("v-if", !0)
375
377
  ]),
376
- x() ? (r(), w("div", $e, [
377
- s(`
378
+ x() ? (s(), $("div", $e, [
379
+ i(`
378
380
  @slot right-icon - The icon to display on the right of the input
379
381
  `),
380
382
  e.$slots["right-icon"] || e.rightIcon ? M(e.$slots, "right-icon", { key: 0 }, () => [
381
- typeof e.rightIcon == "string" ? (r(), v(y(h), {
383
+ typeof e.rightIcon == "string" ? (s(), v(b(z), {
382
384
  key: 0,
383
385
  name: e.rightIcon,
384
386
  class: "maz-text-xl maz-text-muted"
385
- }, null, 8, ["name"])) : e.rightIcon ? (r(), v(F(e.rightIcon), {
387
+ }, null, 8, ["name"])) : e.rightIcon ? (s(), v(F(e.rightIcon), {
386
388
  key: 1,
387
389
  class: "maz-text-xl maz-text-muted"
388
- })) : s("v-if", !0)
389
- ], !0) : s("v-if", !0),
390
- C.value ? (r(), v(y(k), {
390
+ })) : i("v-if", !0)
391
+ ], !0) : i("v-if", !0),
392
+ C.value ? (s(), v(b(I), {
391
393
  key: 1,
392
394
  color: "transparent",
393
395
  tabindex: "-1",
394
396
  size: "mini",
395
- onClick: B[2] || (B[2] = W((A) => p.value = !p.value, ["stop"]))
397
+ onClick: w[2] || (w[2] = W((A) => m.value = !m.value, ["stop"]))
396
398
  }, {
397
- default: D(() => [
398
- p.value ? (r(), v(y(g), {
399
+ default: P(() => [
400
+ m.value ? (s(), v(b(g), {
399
401
  key: 0,
400
402
  class: "maz-text-xl maz-text-muted"
401
- })) : (r(), v(y(m), {
403
+ })) : (s(), v(b(p), {
402
404
  key: 1,
403
405
  class: "maz-text-xl maz-text-muted"
404
406
  }))
405
407
  ]),
406
408
  _: 1
407
409
  /* STABLE */
408
- })) : s("v-if", !0),
409
- s(`
410
+ })) : i("v-if", !0),
411
+ i(`
410
412
  @slot valid-button - Replace the valid button by your own
411
413
  `),
412
414
  e.$slots["valid-button"] || e.validButton ? M(e.$slots, "valid-button", { key: 2 }, () => [
413
- L(y(k), {
415
+ L(b(I), {
414
416
  color: "transparent",
415
417
  disabled: e.disabled,
416
418
  tabindex: "-1",
@@ -419,14 +421,14 @@ const ke = {
419
421
  size: "mini",
420
422
  type: "submit"
421
423
  }, {
422
- default: D(() => [
423
- L(y(T), { class: "maz-text-2xl maz-text-normal" })
424
+ default: P(() => [
425
+ L(b(j), { class: "maz-text-2xl maz-text-normal" })
424
426
  ]),
425
427
  _: 1
426
428
  /* STABLE */
427
429
  }, 8, ["disabled", "loading"])
428
- ], !0) : s("v-if", !0)
429
- ])) : s("v-if", !0)
430
+ ], !0) : i("v-if", !0)
431
+ ])) : i("v-if", !0)
430
432
  ],
431
433
  2
432
434
  /* CLASS */
@@ -436,7 +438,7 @@ const ke = {
436
438
  /* CLASS, STYLE */
437
439
  ));
438
440
  }
439
- }), Ce = /* @__PURE__ */ R(Te, [["__scopeId", "data-v-b3e1e126"]]), Se = /* @__PURE__ */ q({
441
+ }), je = /* @__PURE__ */ R(Te, [["__scopeId", "data-v-b3e1e126"]]), Ce = /* @__PURE__ */ q({
440
442
  inheritAttrs: !1,
441
443
  __name: "MazInputTags",
442
444
  props: {
@@ -456,39 +458,39 @@ const ke = {
456
458
  hint: {}
457
459
  },
458
460
  emits: ["update:model-value"],
459
- setup(f, { emit: l }) {
460
- const o = f, c = l, k = $(!1), h = $(), g = $(), m = $(), T = $(), p = i(
461
+ setup(f, { emit: t }) {
462
+ const o = f, c = t, I = T(!1), z = T(), g = T(), p = T(), j = T(), m = r(
461
463
  () => {
462
464
  var n;
463
- return (n = o.modelValue) == null ? void 0 : n.map((a) => ({
464
- tag: a,
465
+ return (n = o.modelValue) == null ? void 0 : n.map((l) => ({
466
+ tag: l,
465
467
  id: Math.random().toString(36).slice(2, 11)
466
468
  }));
467
469
  }
468
470
  );
469
- function I(n) {
470
- if (h.value) {
471
- m.value = void 0, n.preventDefault();
472
- const u = h.value.trim().split(",").map((d) => d.trim() === "," ? void 0 : d.trim()).filter(U).filter(
471
+ function B(n) {
472
+ if (z.value) {
473
+ p.value = void 0, n.preventDefault();
474
+ const u = z.value.trim().split(",").map((d) => d.trim() === "," ? void 0 : d.trim()).filter(U).filter(
473
475
  (d) => {
474
- var b, t;
475
- return !((t = (b = o.modelValue) == null ? void 0 : b.filter(U)) != null && t.some((P) => P === d));
476
+ var y, h;
477
+ return !((h = (y = o.modelValue) == null ? void 0 : y.filter(U)) != null && h.some((a) => a === d));
476
478
  }
477
479
  );
478
480
  c(
479
481
  "update:model-value",
480
482
  o.modelValue ? [...o.modelValue, ...u] : [...u]
481
- ), h.value = void 0;
483
+ ), z.value = void 0;
482
484
  }
483
485
  }
484
- const V = i(() => {
486
+ const V = r(() => {
485
487
  if (o.error)
486
488
  return "maz-border-danger";
487
489
  if (o.success)
488
490
  return "maz-border-success";
489
491
  if (o.warning)
490
492
  return "maz-border-warning";
491
- if (k.value) {
493
+ if (I.value) {
492
494
  if (o.color === "primary")
493
495
  return "maz-border-primary";
494
496
  if (o.color === "secondary")
@@ -509,47 +511,47 @@ const ke = {
509
511
  return "maz-border-border dark:maz-border-color-lighter";
510
512
  });
511
513
  function O() {
512
- var n, a, u;
513
- h.value || p.value && ((n = p.value) == null ? void 0 : n.length) === 0 || (T.value && clearTimeout(T.value), m.value ? (C(m.value), m.value = void 0) : (m.value = (u = (a = p.value) == null ? void 0 : a[p.value.length - 1]) == null ? void 0 : u.id, T.value = setTimeout(() => {
514
- m.value = void 0;
514
+ var n, l, u;
515
+ z.value || m.value && ((n = m.value) == null ? void 0 : n.length) === 0 || (j.value && clearTimeout(j.value), p.value ? (C(p.value), p.value = void 0) : (p.value = (u = (l = m.value) == null ? void 0 : l[m.value.length - 1]) == null ? void 0 : u.id, j.value = setTimeout(() => {
516
+ p.value = void 0;
515
517
  }, 2e3)));
516
518
  }
517
519
  function C(n) {
518
520
  var u;
519
- const a = (u = p.value) == null ? void 0 : u.filter((d) => d.id !== n).map((d) => d.tag);
520
- c("update:model-value", a);
521
+ const l = (u = m.value) == null ? void 0 : u.filter((d) => d.id !== n).map((d) => d.tag);
522
+ c("update:model-value", l);
521
523
  }
522
- return (n, a) => (r(), w(
524
+ return (n, l) => (s(), $(
523
525
  "div",
524
526
  {
525
- class: z(["m-input-tags", [V.value, `--${n.color}`, `--${n.size}`, o.class, { "--block": n.block }]]),
527
+ class: k(["m-input-tags", [V.value, `--${n.color}`, `--${n.size}`, o.class, { "--block": n.block }]]),
526
528
  style: K(n.style),
527
- onFocusCapture: a[4] || (a[4] = (u) => k.value = !0),
528
- onBlurCapture: a[5] || (a[5] = (u) => k.value = !1)
529
+ onFocusCapture: l[4] || (l[4] = (u) => I.value = !0),
530
+ onBlurCapture: l[5] || (l[5] = (u) => I.value = !1)
529
531
  },
530
532
  [
531
533
  L(de, { name: "maz-tags" }, {
532
- default: D(() => [
533
- (r(!0), w(
534
+ default: P(() => [
535
+ (s(!0), $(
534
536
  ce,
535
537
  null,
536
- fe(p.value, ({ tag: u, id: d }, b) => (r(), w("div", {
537
- key: `tag-${b}`,
538
+ fe(m.value, ({ tag: u, id: d }, y) => (s(), $("div", {
539
+ key: `tag-${y}`,
538
540
  class: "m-input-tags__wrapper"
539
541
  }, [
540
542
  L(X, {
541
543
  class: "m-input-tags__tag",
542
544
  disabled: n.disabled,
543
545
  size: n.size,
544
- color: g.value === d || m.value === d ? "danger" : n.color,
545
- "right-icon": g.value === d || m.value === d ? y(ve) : void 0,
546
- onClick: W((t) => C(d), ["stop"]),
547
- onMouseenter: (t) => g.value = d,
548
- onFocus: (t) => g.value = d,
549
- onMouseleave: a[0] || (a[0] = (t) => g.value = void 0),
550
- onBlur: a[1] || (a[1] = (t) => g.value = void 0)
546
+ color: g.value === d || p.value === d ? "danger" : n.color,
547
+ "right-icon": g.value === d || p.value === d ? b(ve) : void 0,
548
+ onClick: W((h) => C(d), ["stop"]),
549
+ onMouseenter: (h) => g.value = d,
550
+ onFocus: (h) => g.value = d,
551
+ onMouseleave: l[0] || (l[0] = (h) => g.value = void 0),
552
+ onBlur: l[1] || (l[1] = (h) => g.value = void 0)
551
553
  }, {
552
- default: D(() => [
554
+ default: P(() => [
553
555
  J(
554
556
  Q(u),
555
557
  1
@@ -567,10 +569,10 @@ const ke = {
567
569
  _: 1
568
570
  /* STABLE */
569
571
  }),
570
- L(Ce, G({
572
+ L(je, G({
571
573
  key: "input-tags",
572
- modelValue: h.value,
573
- "onUpdate:modelValue": a[2] || (a[2] = (u) => h.value = u)
574
+ modelValue: z.value,
575
+ "onUpdate:modelValue": l[2] || (l[2] = (u) => z.value = u)
574
576
  }, n.$attrs, {
575
577
  placeholder: n.placeholder,
576
578
  label: n.label,
@@ -586,18 +588,18 @@ const ke = {
586
588
  "no-border": "",
587
589
  class: "m-input-tags__input",
588
590
  onKeydown: [
589
- N(I, ["enter"]),
591
+ N(B, ["enter"]),
590
592
  N(O, ["delete"])
591
593
  ],
592
- onBlur: a[3] || (a[3] = (u) => n.addTagsOnBlur ? I(u) : void 0)
594
+ onBlur: l[3] || (l[3] = (u) => n.addTagsOnBlur ? B(u) : void 0)
593
595
  }), null, 16, ["modelValue", "placeholder", "label", "aria-label", "error", "hint", "success", "warning", "disabled", "color", "block", "size"])
594
596
  ],
595
597
  38
596
598
  /* CLASS, STYLE, NEED_HYDRATION */
597
599
  ));
598
600
  }
599
- }), Ve = /* @__PURE__ */ R(Se, [["__scopeId", "data-v-f8b854e9"]]);
601
+ }), Me = /* @__PURE__ */ R(Ce, [["__scopeId", "data-v-f8b854e9"]]);
600
602
  export {
601
- Ve as M,
603
+ Me as M,
602
604
  R as _
603
605
  };