maz-ui 3.28.4 → 3.28.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { a as f } from "./chunks/MazInputNumber-OAPwOzCG.mjs";
1
+ import { a as f } from "./chunks/MazInputNumber-m-H5m2ud.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import "../assets/MazInputNumber.css";
2
- import { defineComponent as O, defineAsyncComponent as B, useAttrs as te, useSlots as F, onBeforeMount as ne, computed as l, openBlock as r, createBlock as I, resolveDynamicComponent as ae, normalizeClass as p, withCtx as N, createElementBlock as v, renderSlot as w, unref as d, createCommentVNode as c, createElementVNode as V, ref as T, getCurrentInstance as le, onMounted as oe, normalizeStyle as R, createVNode as z, withDirectives as ie, mergeProps as U, toHandlers as re, vModelDynamic as ue, createTextVNode as se, toDisplayString as de, withModifiers as D, withKeys as q } from "vue";
2
+ import { defineComponent as O, defineAsyncComponent as B, useAttrs as te, useSlots as F, onBeforeMount as ne, computed as l, openBlock as u, createBlock as x, resolveDynamicComponent as ae, normalizeClass as p, withCtx as N, createElementBlock as v, renderSlot as w, unref as d, createCommentVNode as c, createElementVNode as V, ref as T, getCurrentInstance as le, onMounted as oe, normalizeStyle as R, createVNode as z, withDirectives as ie, mergeProps as U, toHandlers as re, vModelDynamic as ue, createTextVNode as se, toDisplayString as de, withModifiers as D, withKeys as q } from "vue";
3
3
  const ce = /* @__PURE__ */ O({
4
4
  __name: "MazBtn",
5
5
  props: {
@@ -39,22 +39,22 @@ const ce = /* @__PURE__ */ O({
39
39
  noElevation: { type: Boolean, default: !1 }
40
40
  },
41
41
  setup(e) {
42
- const s = B(() => import("./MazSpinner-RwIjv6Xr.mjs")), n = B(() => import("./MazIcon-RrJDzX3V.mjs")), { href: b, to: u } = te(), $ = F(), i = e;
42
+ const s = B(() => import("./MazSpinner-mURNBzAj.mjs")), n = B(() => import("./MazIcon-RrJDzX3V.mjs")), { href: b, to: r } = te(), $ = F(), i = e;
43
43
  ne(() => {
44
44
  i.icon && !i.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
45
45
  });
46
- const t = l(() => b ? "a" : u ? "router-link" : "button"), m = l(
46
+ const t = l(() => b ? "a" : r ? "router-link" : "button"), m = l(
47
47
  () => i.pastel ? `--${i.color}-pastel` : i.outline ? `--${i.color}-outline` : `--${i.color}`
48
48
  ), f = l(
49
49
  () => (i.loading || i.disabled) && t.value === "button"
50
- ), y = l(() => f.value ? "--cursor-default" : "--cursor-pointer"), x = l(() => `--is-${i.variant}`), g = l(() => i.loading && i.variant === "button"), o = l(() => !!$["left-icon"] || i.leftIcon), k = l(() => !!$["right-icon"] || i.rightIcon), C = l(() => o.value || k.value), P = l(() => i.fab && i.icon), M = l(() => t.value === "button" ? i.type : void 0);
51
- return (S, j) => (r(), I(ae(t.value), {
50
+ ), y = l(() => f.value ? "--cursor-default" : "--cursor-pointer"), I = l(() => `--is-${i.variant}`), g = l(() => i.loading && i.variant === "button"), o = l(() => !!$["left-icon"] || i.leftIcon), k = l(() => !!$["right-icon"] || i.rightIcon), C = l(() => o.value || k.value), P = l(() => i.fab && i.icon), M = l(() => t.value === "button" ? i.type : void 0);
51
+ return (S, j) => (u(), x(ae(t.value), {
52
52
  disabled: f.value,
53
53
  class: p(["m-btn", [
54
54
  `--${e.size}`,
55
55
  m.value,
56
56
  y.value,
57
- x.value,
57
+ I.value,
58
58
  {
59
59
  "--block": e.block,
60
60
  "--no-underline": e.noUnderline,
@@ -72,7 +72,7 @@ const ce = /* @__PURE__ */ O({
72
72
  type: M.value
73
73
  }, {
74
74
  default: N(() => [
75
- o.value ? (r(), v(
75
+ o.value ? (u(), v(
76
76
  "div",
77
77
  {
78
78
  key: 0,
@@ -80,7 +80,7 @@ const ce = /* @__PURE__ */ O({
80
80
  },
81
81
  [
82
82
  w(S.$slots, "left-icon", {}, () => [
83
- e.leftIcon ? (r(), I(d(n), {
83
+ e.leftIcon ? (u(), x(d(n), {
84
84
  key: 0,
85
85
  name: e.leftIcon
86
86
  }, null, 8, ["name"])) : c("v-if", !0)
@@ -89,7 +89,7 @@ const ce = /* @__PURE__ */ O({
89
89
  2
90
90
  /* CLASS */
91
91
  )) : c("v-if", !0),
92
- P.value ? (r(), v(
92
+ P.value ? (u(), v(
93
93
  "div",
94
94
  {
95
95
  key: 1,
@@ -97,7 +97,7 @@ const ce = /* @__PURE__ */ O({
97
97
  },
98
98
  [
99
99
  w(S.$slots, "icon", {}, () => [
100
- e.icon ? (r(), I(d(n), {
100
+ e.icon ? (u(), x(d(n), {
101
101
  key: 0,
102
102
  name: e.icon
103
103
  }, null, 8, ["name"])) : c("v-if", !0)
@@ -117,7 +117,7 @@ const ce = /* @__PURE__ */ O({
117
117
  2
118
118
  /* CLASS */
119
119
  ),
120
- k.value ? (r(), v(
120
+ k.value ? (u(), v(
121
121
  "div",
122
122
  {
123
123
  key: 2,
@@ -125,7 +125,7 @@ const ce = /* @__PURE__ */ O({
125
125
  },
126
126
  [
127
127
  w(S.$slots, "right-icon", {}, () => [
128
- e.rightIcon ? (r(), I(d(n), {
128
+ e.rightIcon ? (u(), x(d(n), {
129
129
  key: 0,
130
130
  name: e.rightIcon
131
131
  }, null, 8, ["name"])) : c("v-if", !0)
@@ -134,7 +134,7 @@ const ce = /* @__PURE__ */ O({
134
134
  2
135
135
  /* CLASS */
136
136
  )) : c("v-if", !0),
137
- g.value ? (r(), I(d(s), {
137
+ g.value ? (u(), x(d(s), {
138
138
  key: 3,
139
139
  size: "2em",
140
140
  color: e.color,
@@ -147,8 +147,8 @@ const ce = /* @__PURE__ */ O({
147
147
  }
148
148
  }), K = (e, s) => {
149
149
  const n = e.__vccOpts || e;
150
- for (const [b, u] of s)
151
- n[b] = u;
150
+ for (const [b, r] of s)
151
+ n[b] = r;
152
152
  return n;
153
153
  }, E = /* @__PURE__ */ K(ce, [["__scopeId", "data-v-3f2db58e"]]), me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
154
154
  __proto__: null,
@@ -239,14 +239,14 @@ const fe = ({
239
239
  },
240
240
  emits: ["focus", "blur", "update:model-value", "click", "change", "update"],
241
241
  setup(e, { emit: s }) {
242
- const n = B(() => Promise.resolve().then(() => me)), b = B(() => import("./MazIcon-RrJDzX3V.mjs")), u = B(() => import("./eye-slash-UoWe3WK1.mjs")), $ = B(() => import("./eye-3jm1b22X.mjs")), i = B(() => import("./check-JxWJRZYz.mjs")), t = e, m = s, f = T(!1), y = T(!1), x = T(), g = le(), o = fe({
242
+ const n = B(() => Promise.resolve().then(() => me)), b = B(() => import("./MazIcon-RrJDzX3V.mjs")), r = B(() => import("./eye-slash-UoWe3WK1.mjs")), $ = B(() => import("./eye-3jm1b22X.mjs")), i = B(() => import("./check-JxWJRZYz.mjs")), t = e, m = s, f = T(!1), y = T(!1), I = T(), g = le(), o = fe({
243
243
  componentName: "MazInput",
244
244
  instance: g,
245
245
  providedId: t.id
246
246
  });
247
247
  oe(() => {
248
248
  var a;
249
- t.autoFocus && ((a = x.value) == null || a.focus());
249
+ t.autoFocus && ((a = I.value) == null || a.focus());
250
250
  });
251
251
  const k = l(() => t.type === "password"), C = l(() => f.value ? "text" : t.type), P = l(() => {
252
252
  if (!t.noBorder) {
@@ -294,7 +294,7 @@ const fe = ({
294
294
  return _(a);
295
295
  m("update:model-value", a);
296
296
  };
297
- return (a, h) => (r(), v(
297
+ return (a, h) => (u(), v(
298
298
  "div",
299
299
  {
300
300
  class: p(["m-input", [
@@ -320,7 +320,7 @@ const fe = ({
320
320
  class: p(["m-input-wrapper", [e.inputClasses, P.value, { "maz-rounded": !e.noRadius }]])
321
321
  },
322
322
  [
323
- Q() ? (r(), v("div", ve, [
323
+ Q() ? (u(), v("div", ve, [
324
324
  a.$slots["left-icon"] || e.leftIcon ? w(a.$slots, "left-icon", { key: 0 }, () => [
325
325
  z(d(b), {
326
326
  name: e.leftIcon,
@@ -332,7 +332,7 @@ const fe = ({
332
332
  ie(V("input", U({
333
333
  id: d(o),
334
334
  ref_key: "input",
335
- ref: x,
335
+ ref: I,
336
336
  "onUpdate:modelValue": h[0] || (h[0] = (A) => L.value = A),
337
337
  type: C.value,
338
338
  name: e.name
@@ -352,7 +352,7 @@ const fe = ({
352
352
  }), null, 16, ye), [
353
353
  [ue, L.value]
354
354
  ]),
355
- e.label || e.hint ? (r(), v(
355
+ e.label || e.hint ? (u(), v(
356
356
  "span",
357
357
  {
358
358
  key: 0,
@@ -371,20 +371,20 @@ const fe = ({
371
371
  1
372
372
  /* TEXT */
373
373
  ),
374
- e.required ? (r(), v("sup", ge, "*")) : c("v-if", !0)
374
+ e.required ? (u(), v("sup", ge, "*")) : c("v-if", !0)
375
375
  ],
376
376
  2
377
377
  /* CLASS */
378
378
  )) : c("v-if", !0)
379
379
  ]),
380
- J() ? (r(), v("div", he, [
380
+ J() ? (u(), v("div", he, [
381
381
  a.$slots["right-icon"] || e.rightIcon ? w(a.$slots, "right-icon", { key: 0 }, () => [
382
382
  z(d(b), {
383
383
  name: e.rightIcon,
384
384
  class: "maz-text-xl maz-text-muted"
385
385
  }, null, 8, ["name"])
386
386
  ], !0) : c("v-if", !0),
387
- k.value ? (r(), I(d(n), {
387
+ k.value ? (u(), x(d(n), {
388
388
  key: 1,
389
389
  color: "transparent",
390
390
  tabindex: "-1",
@@ -392,10 +392,10 @@ const fe = ({
392
392
  onClick: h[2] || (h[2] = D((A) => f.value = !f.value, ["stop"]))
393
393
  }, {
394
394
  default: N(() => [
395
- f.value ? (r(), I(d(u), {
395
+ f.value ? (u(), x(d(r), {
396
396
  key: 0,
397
397
  class: "maz-text-xl maz-text-muted"
398
- })) : (r(), I(d($), {
398
+ })) : (u(), x(d($), {
399
399
  key: 1,
400
400
  class: "maz-text-xl maz-text-muted"
401
401
  }))
@@ -436,7 +436,7 @@ const fe = ({
436
436
  height: "1em",
437
437
  fill: "none",
438
438
  viewBox: "0 0 24 24"
439
- }, Ie = /* @__PURE__ */ V(
439
+ }, xe = /* @__PURE__ */ V(
440
440
  "path",
441
441
  {
442
442
  stroke: "currentColor",
@@ -448,11 +448,11 @@ const fe = ({
448
448
  null,
449
449
  -1
450
450
  /* HOISTED */
451
- ), xe = [
452
- Ie
451
+ ), Ie = [
452
+ xe
453
453
  ];
454
454
  function Be(e, s) {
455
- return r(), v("svg", ke, [...xe]);
455
+ return u(), v("svg", ke, [...Ie]);
456
456
  }
457
457
  const we = { render: Be }, $e = {
458
458
  xmlns: "http://www.w3.org/2000/svg",
@@ -476,7 +476,7 @@ const we = { render: Be }, $e = {
476
476
  Se
477
477
  ];
478
478
  function Ce(e, s) {
479
- return r(), v("svg", $e, [...Ve]);
479
+ return u(), v("svg", $e, [...Ve]);
480
480
  }
481
481
  const Me = { render: Ce }, Pe = /* @__PURE__ */ O({
482
482
  inheritAttrs: !1,
@@ -503,7 +503,7 @@ const Me = { render: Ce }, Pe = /* @__PURE__ */ O({
503
503
  },
504
504
  emits: ["update:model-value"],
505
505
  setup(e, { emit: s }) {
506
- const n = e, b = s, u = l({
506
+ const n = e, b = s, r = l({
507
507
  get: () => n.modelValue,
508
508
  set: (o) => m(o)
509
509
  });
@@ -514,27 +514,27 @@ const Me = { render: Ce }, Pe = /* @__PURE__ */ O({
514
514
  if (typeof o == "number")
515
515
  return o <= n.min ? n.min : o >= n.max ? n.max : $(o);
516
516
  }, t = Y((o) => m(o), 300), m = (o) => {
517
- o = i(o), u.value !== o && b("update:model-value", o);
517
+ o = i(o), r.value !== o && b("update:model-value", o);
518
518
  };
519
- m(u.value);
520
- const f = l(() => n.modelValue && n.modelValue >= n.max), y = l(() => n.modelValue && n.modelValue <= n.min), x = () => {
519
+ m(r.value);
520
+ const f = l(() => n.modelValue && n.modelValue >= n.max), y = l(() => n.modelValue && n.modelValue <= n.min), I = () => {
521
521
  if (!(n.disabled || f.value)) {
522
- if (!u.value) {
523
- u.value = 1 * n.step;
522
+ if (r.value === void 0 || r.value === null) {
523
+ r.value = n.min;
524
524
  return;
525
525
  }
526
- u.value = u.value + 1 * n.step;
526
+ r.value = r.value + 1 * n.step;
527
527
  }
528
528
  }, g = () => {
529
529
  if (!(n.disabled || y.value)) {
530
- if (!u.value) {
531
- u.value = -(1 * n.step);
530
+ if (r.value === void 0 || r.value === null) {
531
+ r.value = n.min;
532
532
  return;
533
533
  }
534
- u.value = u.value - 1 * n.step;
534
+ r.value = r.value - 1 * n.step;
535
535
  }
536
536
  };
537
- return (o, k) => (r(), v(
537
+ return (o, k) => (u(), v(
538
538
  "div",
539
539
  {
540
540
  class: p(["m-input-number maz-align-center", [`m-input-number--${e.size}`, n.class]]),
@@ -544,6 +544,7 @@ const Me = { render: Ce }, Pe = /* @__PURE__ */ O({
544
544
  z(E, {
545
545
  color: "transparent",
546
546
  size: e.size,
547
+ tabindex: "-1",
547
548
  class: "m-input-number__button m-input-number__decrement-button",
548
549
  disabled: y.value || e.disabled,
549
550
  onClick: g
@@ -555,7 +556,7 @@ const Me = { render: Ce }, Pe = /* @__PURE__ */ O({
555
556
  /* STABLE */
556
557
  }, 8, ["size", "disabled"]),
557
558
  z(ze, U({
558
- "model-value": u.value,
559
+ "model-value": r.value,
559
560
  type: "number",
560
561
  class: "m-input-number__input maz-flex-1",
561
562
  disabled: e.disabled,
@@ -565,7 +566,7 @@ const Me = { render: Ce }, Pe = /* @__PURE__ */ O({
565
566
  }, o.$attrs, {
566
567
  size: e.size,
567
568
  onKeydown: [
568
- q(D(x, ["prevent"]), ["up"]),
569
+ q(D(I, ["prevent"]), ["up"]),
569
570
  q(D(g, ["prevent"]), ["down"])
570
571
  ],
571
572
  "onUpdate:modelValue": k[0] || (k[0] = (C) => d(t)(C))
@@ -573,10 +574,11 @@ const Me = { render: Ce }, Pe = /* @__PURE__ */ O({
573
574
  z(E, {
574
575
  color: "transparent",
575
576
  "no-shadow": "",
577
+ tabindex: "-1",
576
578
  size: e.size,
577
579
  class: "m-input-number__button m-input-number__increment-button",
578
580
  disabled: f.value || e.disabled,
579
- onClick: x
581
+ onClick: I
580
582
  }, {
581
583
  default: N(() => [
582
584
  z(d(we), { class: "m-input-number__button__icon" })
@@ -1,6 +1,6 @@
1
1
  import "../assets/MazSpinner.css";
2
2
  import { defineComponent as t, openBlock as o, createElementBlock as c, normalizeClass as n, pushScopeId as s, popScopeId as r, createElementVNode as i } from "vue";
3
- import { _ as p } from "./MazInputNumber-OAPwOzCG.mjs";
3
+ import { _ as p } from "./MazInputNumber-m-H5m2ud.mjs";
4
4
  const a = (e) => (s("data-v-c67298ec"), e = e(), r(), e), d = ["width", "height"], l = /* @__PURE__ */ a(() => /* @__PURE__ */ i(
5
5
  "path",
6
6
  { d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" },
package/nuxt/index.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "3.28.4"
7
+ "version": "3.28.6"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maz-ui",
3
- "version": "3.28.4",
3
+ "version": "3.28.6",
4
4
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
5
5
  "author": "Louis Mazel <me@loicmazuel.com>",
6
6
  "main": "./modules/index.cjs",