maz-ui 3.37.0 → 3.37.2

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 (74) hide show
  1. package/components/MazCheckbox.d.ts +4 -0
  2. package/components/MazCheckbox.mjs +31 -24
  3. package/components/MazInput.d.ts +2 -0
  4. package/components/MazInput.mjs +1 -1
  5. package/components/MazInputNumber.d.ts +2 -0
  6. package/components/MazInputNumber.mjs +1 -1
  7. package/components/MazInputPrice.d.ts +8 -0
  8. package/components/MazInputPrice.mjs +1 -1
  9. package/components/MazInputTags.d.ts +2 -0
  10. package/components/MazInputTags.mjs +1 -1
  11. package/components/MazPhoneNumberInput.d.ts +2 -0
  12. package/components/MazPhoneNumberInput.mjs +1 -1
  13. package/components/MazPicker.d.ts +2 -0
  14. package/components/MazPicker.mjs +1 -1
  15. package/components/MazRadio.d.ts +9 -0
  16. package/components/MazRadio.mjs +44 -37
  17. package/components/MazSelect.d.ts +2 -0
  18. package/components/MazSelect.mjs +1 -1
  19. package/components/MazTable.mjs +1 -1
  20. package/components/MazTextarea.mjs +1 -1
  21. package/components/assets/MazCheckbox.css +1 -1
  22. package/components/assets/MazInput.css +1 -1
  23. package/components/assets/MazInputNumber.css +1 -1
  24. package/components/assets/MazInputPrice.css +1 -1
  25. package/components/assets/MazInputTags.css +1 -1
  26. package/components/assets/MazPhoneNumberInput.css +1 -1
  27. package/components/assets/MazPicker.css +1 -1
  28. package/components/assets/MazRadio.css +1 -1
  29. package/components/assets/MazSelect.css +1 -1
  30. package/components/assets/MazTable.css +1 -1
  31. package/components/assets/MazTextarea.css +1 -1
  32. package/components/chunks/{MazBtn-C3z_znl5.mjs → MazBtn-Bo51KtKY.mjs} +2 -2
  33. package/components/chunks/{MazBtn-CuYCQCM2.mjs → MazBtn-CDQAW3fg.mjs} +2 -2
  34. package/components/chunks/MazBtn-D-Axz-X0.mjs +151 -0
  35. package/components/chunks/{MazBtn-D7b2VFGB.mjs → MazBtn-Koayc6g_.mjs} +2 -2
  36. package/components/chunks/{MazBtn-CS2F1-mC.mjs → MazBtn-pLRsSxug.mjs} +2 -2
  37. package/components/chunks/{MazCheckbox-BTM3Xpxz.mjs → MazCheckbox-CXVe5vda.mjs} +30 -23
  38. package/components/chunks/{MazCheckbox-COTppi08.mjs → MazCheckbox-DBlQwP82.mjs} +30 -23
  39. package/components/chunks/{MazIcon-Bspx_Ojq.mjs → MazIcon-BTsi1M-S.mjs} +1 -1
  40. package/components/chunks/{MazInput-C1r0b8BB.mjs → MazInput-Caas-0Nk.mjs} +19 -17
  41. package/components/chunks/{MazInputNumber-DJWxTvJ0.mjs → MazInputNumber-CnoCQQzg.mjs} +85 -81
  42. package/components/chunks/{MazInputPrice-CmX_rC0L.mjs → MazInputPrice---5nCUKm.mjs} +57 -53
  43. package/components/chunks/{MazInputTags-pm_5HtHM.mjs → MazInputTags-CipoVBP2.mjs} +83 -79
  44. package/components/chunks/{MazPhoneNumberInput-CVz5eTvG.mjs → MazPhoneNumberInput-CsX6Kqob.mjs} +402 -395
  45. package/components/chunks/{MazPicker-DP1zd8tt.mjs → MazPicker-CfhI75aw.mjs} +67 -62
  46. package/components/chunks/{MazPickerCalendar-qjcDNw86.mjs → MazPickerCalendar-DnkNE-Am.mjs} +3 -3
  47. package/components/chunks/{MazPickerHeader-CozeYkFf.mjs → MazPickerHeader-Vt86yzXS.mjs} +1 -1
  48. package/components/chunks/{MazPickerMonthSwitcher-aaUELZpE.mjs → MazPickerMonthSwitcher-zfKhsjW1.mjs} +2 -2
  49. package/components/chunks/{MazPickerShortcuts-ppox8lXf.mjs → MazPickerShortcuts-DUIKfOO8.mjs} +2 -2
  50. package/components/chunks/{MazPickerTime-DmpypIWr.mjs → MazPickerTime-B2znRxr2.mjs} +2 -2
  51. package/components/chunks/{MazPickerYearSwitcher-BNBvipzs.mjs → MazPickerYearSwitcher-CB339kof.mjs} +3 -3
  52. package/components/chunks/{MazSelect-DGEof7R3.mjs → MazSelect-DZeXglR8.mjs} +117 -109
  53. package/components/chunks/{MazSpinner-CTdeHHNH.mjs → MazSpinner-BAhgxOgg.mjs} +1 -1
  54. package/components/chunks/{MazSpinner-DmFFdtxB.mjs → MazSpinner-CJaSrYbQ.mjs} +1 -1
  55. package/components/chunks/{MazSpinner-KKcK5-QF.mjs → MazSpinner-CORsBFCP.mjs} +1 -1
  56. package/components/chunks/{MazSpinner-DTZHIIMh.mjs → MazSpinner-CVBVegaS.mjs} +1 -1
  57. package/components/chunks/MazSpinner-CkdjTE0y.mjs +38 -0
  58. package/components/chunks/{MazSpinner-DZTqt2Yn.mjs → MazSpinner-DECa8Pby.mjs} +1 -1
  59. package/components/chunks/{MazSpinner-DUVEeU4h.mjs → MazSpinner-Dq4o-_GM.mjs} +1 -1
  60. package/components/chunks/{MazSpinner-CiPbsWOG.mjs → MazSpinner-DqXjnLKa.mjs} +1 -1
  61. package/components/chunks/{MazTable-BhDfeDU1.mjs → MazTable-DrFqDO-J.mjs} +214 -199
  62. package/nuxt/index.json +1 -1
  63. package/package.json +1 -1
  64. package/types/components/MazCheckbox.vue.d.ts +4 -0
  65. package/types/components/MazInput.vue.d.ts +2 -0
  66. package/types/components/MazInputNumber.vue.d.ts +2 -0
  67. package/types/components/MazInputPrice.vue.d.ts +8 -0
  68. package/types/components/MazInputTags.vue.d.ts +2 -0
  69. package/types/components/MazPhoneNumberInput.vue.d.ts +2 -0
  70. package/types/components/MazPicker.vue.d.ts +2 -0
  71. package/types/components/MazRadio.vue.d.ts +9 -0
  72. package/types/components/MazSelect.vue.d.ts +2 -0
  73. package/components/chunks/MazBtn-OUDBhJKd.mjs +0 -151
  74. package/components/chunks/MazSpinner-yPD_Biya.mjs +0 -38
@@ -1,47 +1,47 @@
1
1
  import '../assets/MazInputPrice.css';
2
- import { getCurrentInstance as J, computed as d, defineComponent as S, defineAsyncComponent as z, ref as B, onMounted as K, useSlots as Q, openBlock as s, createElementBlock as w, normalizeClass as C, normalizeStyle as W, createElementVNode as I, createCommentVNode as u, renderSlot as V, createBlock as y, unref as v, resolveDynamicComponent as E, withDirectives as X, mergeProps as Z, toHandlers as x, vModelDynamic as _, createTextVNode as ee, toDisplayString as te, withModifiers as oe, withCtx as F, createVNode as P, nextTick as re, onBeforeMount as ae } from "vue";
2
+ import { getCurrentInstance as J, computed as d, defineComponent as S, defineAsyncComponent as z, ref as B, onMounted as K, useSlots as Q, openBlock as s, createElementBlock as w, normalizeClass as C, normalizeStyle as W, createElementVNode as k, createCommentVNode as u, renderSlot as V, createBlock as y, unref as v, resolveDynamicComponent as E, withDirectives as X, mergeProps as Z, toHandlers as x, vModelDynamic as _, createTextVNode as ee, toDisplayString as te, withModifiers as oe, withCtx as F, createVNode as P, nextTick as re, onBeforeMount as ae } from "vue";
3
3
  const ne = {
4
4
  style: "currency",
5
5
  minimumFractionDigits: 2,
6
6
  round: !1
7
- }, le = (a, n, o) => {
8
- let i = Number(a);
9
- return o.round && (i = Math.floor(i), o.minimumFractionDigits = 0), new Intl.NumberFormat(n, o).format(i);
10
- }, ie = (a, n, o) => {
11
- if (a === void 0)
12
- throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
7
+ }, le = (n, l, o) => {
8
+ let i = Number(n);
9
+ return o.round && (i = Math.floor(i), o.minimumFractionDigits = 0), new Intl.NumberFormat(l, o).format(i);
10
+ }, ie = (n, l, o) => {
13
11
  if (n === void 0)
12
+ throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
13
+ if (l === void 0)
14
14
  throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute is required.");
15
- if (typeof n != "string")
15
+ if (typeof l != "string")
16
16
  throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute must be a string.");
17
17
  if (o.currency === void 0)
18
18
  throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
19
- }, ue = (a, n, o) => {
19
+ }, ue = (n, l, o) => {
20
20
  const i = {
21
21
  ...ne,
22
22
  ...o
23
23
  };
24
- ie(a, n, i);
24
+ ie(n, l, i);
25
25
  try {
26
- return le(a, n, i);
26
+ return le(n, l, i);
27
27
  } catch (f) {
28
28
  throw new Error(`[maz-ui](FilterCurrency) ${f}`);
29
29
  }
30
30
  };
31
- function se(a, n) {
31
+ function se(n, l) {
32
32
  let o;
33
33
  return function(...i) {
34
34
  clearTimeout(o), o = setTimeout(() => {
35
- a.apply(this, i);
36
- }, n);
35
+ n.apply(this, i);
36
+ }, l);
37
37
  };
38
38
  }
39
39
  const de = ({
40
- componentName: a,
41
- providedId: n
40
+ componentName: n,
41
+ providedId: l
42
42
  }) => {
43
43
  const o = J();
44
- return d(() => n ?? `${a}-${o == null ? void 0 : o.uid}`);
44
+ return d(() => l ?? `${n}-${o == null ? void 0 : o.uid}`);
45
45
  }, ce = {
46
46
  key: 0,
47
47
  class: "m-input-wrapper-left"
@@ -81,17 +81,18 @@ const de = ({
81
81
  borderActive: { type: Boolean, default: !1 },
82
82
  leftIcon: { default: void 0 },
83
83
  rightIcon: { default: void 0 },
84
- roundedSize: { default: void 0 }
84
+ roundedSize: { default: void 0 },
85
+ block: { type: Boolean }
85
86
  },
86
87
  emits: ["update:model-value", "focus", "blur", "click", "change"],
87
- setup(a, { emit: n }) {
88
- const o = z(() => import("./MazBtn-D7b2VFGB.mjs")), i = z(() => import("./MazIcon-Cxrv3_OK.mjs")), f = z(() => import("./eye-slash-tjfxO0LK.mjs")), N = z(() => import("./eye-DqO_Jx56.mjs")), T = z(() => import("./check-CL-vqe79.mjs")), t = a, c = n, b = B(!1), p = B(!1), l = B(), r = de({
88
+ setup(n, { emit: l }) {
89
+ const o = z(() => import("./MazBtn-Koayc6g_.mjs")), i = z(() => import("./MazIcon-Cxrv3_OK.mjs")), f = z(() => import("./eye-slash-tjfxO0LK.mjs")), N = z(() => import("./eye-DqO_Jx56.mjs")), T = z(() => import("./check-CL-vqe79.mjs")), t = n, c = l, b = B(!1), p = B(!1), a = B(), r = de({
89
90
  componentName: "MazInput",
90
91
  providedId: t.id
91
92
  });
92
93
  K(() => {
93
94
  var e;
94
- t.autoFocus && ((e = l.value) == null || e.focus());
95
+ t.autoFocus && ((e = a.value) == null || e.focus());
95
96
  });
96
97
  const h = d(() => t.type === "password"), M = d(() => b.value ? "text" : t.type), q = d(() => {
97
98
  if (!t.noBorder) {
@@ -164,7 +165,8 @@ const de = ({
164
165
  "--is-disabled": e.disabled,
165
166
  "--is-readonly": e.readonly,
166
167
  "--has-z-2": e.error || e.warning || e.success,
167
- "--has-state": e.error || e.warning || e.success
168
+ "--has-state": e.error || e.warning || e.success,
169
+ "--block": e.block
168
170
  },
169
171
  t.class,
170
172
  `--${e.color}`,
@@ -173,7 +175,7 @@ const de = ({
173
175
  style: W(e.style)
174
176
  },
175
177
  [
176
- I(
178
+ k(
177
179
  "div",
178
180
  {
179
181
  class: C(["m-input-wrapper", [
@@ -198,12 +200,12 @@ const de = ({
198
200
  })) : u("v-if", !0)
199
201
  ], !0) : u("v-if", !0)
200
202
  ])) : u("v-if", !0),
201
- I("div", me, [
202
- X(I("input", Z({
203
+ k("div", me, [
204
+ X(k("input", Z({
203
205
  id: v(r),
204
206
  ref_key: "input",
205
- ref: l,
206
- "onUpdate:modelValue": m[0] || (m[0] = (k) => g.value = k),
207
+ ref: a,
208
+ "onUpdate:modelValue": m[0] || (m[0] = (I) => g.value = I),
207
209
  type: M.value,
208
210
  name: e.name
209
211
  }, e.$attrs, {
@@ -219,7 +221,7 @@ const de = ({
219
221
  focus: H,
220
222
  change: G
221
223
  }, !0), {
222
- onClick: m[1] || (m[1] = (k) => e.$emit("click", k))
224
+ onClick: m[1] || (m[1] = (I) => e.$emit("click", I))
223
225
  }), null, 16, fe), [
224
226
  [_, g.value]
225
227
  ]),
@@ -267,7 +269,7 @@ const de = ({
267
269
  color: "transparent",
268
270
  tabindex: "-1",
269
271
  size: "mini",
270
- onClick: m[2] || (m[2] = oe((k) => b.value = !b.value, ["stop"]))
272
+ onClick: m[2] || (m[2] = oe((I) => b.value = !b.value, ["stop"]))
271
273
  }, {
272
274
  default: F(() => [
273
275
  b.value ? (s(), y(v(f), {
@@ -311,12 +313,12 @@ const de = ({
311
313
  /* CLASS, STYLE */
312
314
  ));
313
315
  }
314
- }), be = (a, n) => {
315
- const o = a.__vccOpts || a;
316
- for (const [i, f] of n)
316
+ }), be = (n, l) => {
317
+ const o = n.__vccOpts || n;
318
+ for (const [i, f] of l)
317
319
  o[i] = f;
318
320
  return o;
319
- }, he = /* @__PURE__ */ be(ye, [["__scopeId", "data-v-f1c52a34"]]), ge = /* @__PURE__ */ I(
321
+ }, he = /* @__PURE__ */ be(ye, [["__scopeId", "data-v-78090be8"]]), ge = /* @__PURE__ */ k(
320
322
  "svg",
321
323
  {
322
324
  xmlns: "http://www.w3.org/2000/svg",
@@ -327,7 +329,7 @@ const de = ({
327
329
  class: "maz-text-mute maz-ml-1 maz-h-6 maz-w-6"
328
330
  },
329
331
  [
330
- /* @__PURE__ */ I("path", {
332
+ /* @__PURE__ */ k("path", {
331
333
  "stroke-linecap": "round",
332
334
  "stroke-linejoin": "round",
333
335
  "stroke-width": "2",
@@ -336,7 +338,7 @@ const de = ({
336
338
  ],
337
339
  -1
338
340
  /* HOISTED */
339
- ), Ie = /* @__PURE__ */ S({
341
+ ), ke = /* @__PURE__ */ S({
340
342
  __name: "MazInputPrice",
341
343
  props: {
342
344
  modelValue: { default: void 0 },
@@ -344,20 +346,21 @@ const de = ({
344
346
  locale: { default: "fr-FR" },
345
347
  min: { default: 0 },
346
348
  max: { default: Number.POSITIVE_INFINITY },
347
- noIcon: { type: Boolean, default: !1 }
349
+ noIcon: { type: Boolean, default: !1 },
350
+ block: { type: Boolean }
348
351
  },
349
352
  emits: ["update:model-value", "formatted"],
350
- setup(a, { emit: n }) {
351
- const o = a, i = n, f = B(!1), N = d(() => c(o.modelValue).toString()), T = d(() => {
352
- const l = typeof o.modelValue == "string" ? Number(o.modelValue) : o.modelValue;
353
- return c(l);
353
+ setup(n, { emit: l }) {
354
+ const o = n, i = l, f = B(!1), N = d(() => c(o.modelValue).toString()), T = d(() => {
355
+ const a = typeof o.modelValue == "string" ? Number(o.modelValue) : o.modelValue;
356
+ return c(a);
354
357
  }), t = d(
355
358
  () => ue(T.value, o.locale, { currency: o.currency })
356
- ), c = (l) => {
357
- let r = typeof l == "string" ? Number.parseFloat(
359
+ ), c = (a) => {
360
+ let r = typeof a == "string" ? Number.parseFloat(
358
361
  // eslint-disable-next-line no-useless-escape
359
- l.replace(",", ".").replaceAll(/[^\d.]/g, "")
360
- ) : l;
362
+ a.replace(",", ".").replaceAll(/[^\d.]/g, "")
363
+ ) : a;
361
364
  return (!r || Number.isNaN(r)) && (r = 0), r < o.min && (r = o.min), r > o.max && (r = o.max), r;
362
365
  }, b = d({
363
366
  get: () => {
@@ -366,38 +369,39 @@ const de = ({
366
369
  if (typeof o.modelValue == "number")
367
370
  return t.value;
368
371
  },
369
- set: (l) => {
370
- if (Number.isNaN(l))
372
+ set: (a) => {
373
+ if (Number.isNaN(a))
371
374
  p();
372
375
  else {
373
- const r = c(l);
376
+ const r = c(a);
374
377
  p(r);
375
378
  }
376
379
  }
377
- }), p = async (l) => {
378
- const r = typeof l == "number" ? c(l) : void 0;
380
+ }), p = async (a) => {
381
+ const r = typeof a == "number" ? c(a) : void 0;
379
382
  i("update:model-value", r), await re(), i("formatted", t.value);
380
383
  };
381
384
  return ae(() => {
382
385
  p(c(o.modelValue));
383
- }), (l, r) => (s(), y(he, {
386
+ }), (a, r) => (s(), y(he, {
384
387
  modelValue: b.value,
385
388
  "onUpdate:modelValue": r[0] || (r[0] = (h) => b.value = h),
386
389
  class: "maz-input-price",
390
+ block: a.block,
387
391
  onFocus: r[1] || (r[1] = (h) => f.value = !0),
388
392
  onBlur: r[2] || (r[2] = (h) => f.value = !1)
389
393
  }, {
390
394
  "left-icon": F(() => [
391
- l.noIcon ? u("v-if", !0) : V(l.$slots, "left-icon", { key: 0 }, () => [
395
+ a.noIcon ? u("v-if", !0) : V(a.$slots, "left-icon", { key: 0 }, () => [
392
396
  ge
393
397
  ])
394
398
  ]),
395
399
  _: 3
396
400
  /* FORWARDED */
397
- }, 8, ["modelValue"]));
401
+ }, 8, ["modelValue", "block"]));
398
402
  }
399
403
  });
400
404
  export {
401
405
  be as _,
402
- Ie as a
406
+ ke as a
403
407
  };