maz-ui 4.6.1 → 4.6.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.
@@ -1,7 +1,26 @@
1
1
  import { capitalize } from "@maz-ui/utils/helpers/capitalize";
2
2
  import { formatDate } from "@maz-ui/utils/helpers/formatDate";
3
3
  import dayjs from "dayjs";
4
- import weekday from "dayjs/plugin/weekday";
4
+ function getDefaultExportFromCjs(x) {
5
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x.default : x;
6
+ }
7
+ var weekday$2 = { exports: {} }, weekday$1 = weekday$2.exports, hasRequiredWeekday;
8
+ function requireWeekday() {
9
+ return hasRequiredWeekday || (hasRequiredWeekday = 1, (function(module, exports$1) {
10
+ (function(e, t) {
11
+ module.exports = t();
12
+ })(weekday$1, (function() {
13
+ return function(e, t) {
14
+ t.prototype.weekday = function(e2) {
15
+ var t2 = this.$locale().weekStart || 0, i = this.$W, n = (i < t2 ? i + 7 : i) - t2;
16
+ return this.$utils().u(e2) ? n : this.subtract(n, "day").add(e2, "day");
17
+ };
18
+ };
19
+ }));
20
+ })(weekday$2)), weekday$2.exports;
21
+ }
22
+ var weekdayExports = /* @__PURE__ */ requireWeekday();
23
+ const weekday = /* @__PURE__ */ getDefaultExportFromCjs(weekdayExports);
5
24
  dayjs.extend(weekday);
6
25
  function getFormattedDate({
7
26
  value,
@@ -167,21 +186,22 @@ function getDefaultsShortcuts(t) {
167
186
  ];
168
187
  }
169
188
  export {
170
- getRangeFormattedDate as a,
171
- getFormattedDate as b,
172
- getRangeISODate as c,
173
- getISODate as d,
174
- isValueDisabledWeekly as e,
175
- isValueDisabledDate as f,
176
- getDefaultsShortcuts as g,
177
- checkValueWithMinMaxDates as h,
178
- isRangeValue as i,
179
- isSameDate as j,
180
- findNearestNumberInList as k,
181
- getDaysOfWeek as l,
182
- getDaysInMonth as m,
183
- getFirstDayOfMonth as n,
184
- isValidDate as o,
185
- isSameDay as p,
189
+ getDaysInMonth as a,
190
+ getFirstDayOfMonth as b,
191
+ isRangeValue as c,
192
+ isValidDate as d,
193
+ isSameDay as e,
194
+ findNearestNumberInList as f,
195
+ getDaysOfWeek as g,
196
+ getDefaultExportFromCjs as h,
197
+ isSameDate as i,
198
+ getDefaultsShortcuts as j,
199
+ getRangeFormattedDate as k,
200
+ getFormattedDate as l,
201
+ getRangeISODate as m,
202
+ getISODate as n,
203
+ isValueDisabledWeekly as o,
204
+ isValueDisabledDate as p,
205
+ checkValueWithMinMaxDates as q,
186
206
  scrollToTarget as s
187
207
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, Fragment, renderList, toDisplayString } from "vue";
2
- import { l as getDaysOfWeek } from "../../../chunks/utils.CaVh3v2G.js";
2
+ import { g as getDaysOfWeek } from "../../../chunks/utils.D89Q5cCP.js";
3
3
  import { _ as _export_sfc } from "../../../chunks/_plugin-vue_export-helper.B--vMWp3.js";
4
4
  import '../../../assets/MazPickerCalendarDays.Cv_yUILr.css';const _hoisted_1 = { class: "maz-picker-calendar-days" }, _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "MazPickerCalendarDays",
@@ -2,7 +2,7 @@ import { defineComponent, useCssVars, computed, ref, watch, createElementBlock,
2
2
  import { debounce } from "@maz-ui/utils/helpers/debounce";
3
3
  import dayjs from "dayjs";
4
4
  import MazBtn from "../../MazBtn.js";
5
- import { m as getDaysInMonth, n as getFirstDayOfMonth, i as isRangeValue, j as isSameDate, o as isValidDate, p as isSameDay } from "../../../chunks/utils.CaVh3v2G.js";
5
+ import { a as getDaysInMonth, b as getFirstDayOfMonth, c as isRangeValue, i as isSameDate, d as isValidDate, e as isSameDay } from "../../../chunks/utils.D89Q5cCP.js";
6
6
  import { _ as _export_sfc } from "../../../chunks/_plugin-vue_export-helper.B--vMWp3.js";
7
7
  import '../../../assets/MazPickerCalendarGrid.Ba1xBVlX.css';const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "MazPickerCalendarGrid",
@@ -4,7 +4,7 @@ import { capitalize } from "@maz-ui/utils/helpers/capitalize";
4
4
  import { formatDate } from "@maz-ui/utils/helpers/formatDate";
5
5
  import dayjs from "dayjs";
6
6
  import MazBtn from "../MazBtn.js";
7
- import { j as isSameDate } from "../../chunks/utils.CaVh3v2G.js";
7
+ import { i as isSameDate } from "../../chunks/utils.D89Q5cCP.js";
8
8
  import { _ as _export_sfc } from "../../chunks/_plugin-vue_export-helper.B--vMWp3.js";
9
9
  import '../../assets/MazPickerMonthSwitcher.LvN0rqiy.css';const _hoisted_1 = { class: "maz-picker-month-switcher" }, _hoisted_2 = { class: "maz-picker-month-switcher__header" }, _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  __name: "MazPickerMonthSwitcher",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, ref, onMounted, watch, nextTick, createElementBlock, openBlock, normalizeClass, Fragment, renderList, createElementVNode, normalizeStyle, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString } from "vue";
2
2
  import dayjs from "dayjs";
3
3
  import MazBtn from "../MazBtn.js";
4
- import { k as findNearestNumberInList, s as scrollToTarget } from "../../chunks/utils.CaVh3v2G.js";
4
+ import { f as findNearestNumberInList, s as scrollToTarget } from "../../chunks/utils.D89Q5cCP.js";
5
5
  import { _ as _export_sfc } from "../../chunks/_plugin-vue_export-helper.B--vMWp3.js";
6
6
  import '../../assets/MazPickerTime.BpOWBzy_.css';const _hoisted_1 = { class: "m-date-picker-time__column__items" }, _sfc_main = /* @__PURE__ */ defineComponent({
7
7
  __name: "MazPickerTime",
@@ -3,7 +3,7 @@ import { MazChevronLeft, MazXMark } from "@maz-ui/icons";
3
3
  import { formatDate } from "@maz-ui/utils/helpers/formatDate";
4
4
  import dayjs from "dayjs";
5
5
  import MazBtn from "../MazBtn.js";
6
- import { j as isSameDate } from "../../chunks/utils.CaVh3v2G.js";
6
+ import { i as isSameDate } from "../../chunks/utils.D89Q5cCP.js";
7
7
  import { _ as _export_sfc } from "../../chunks/_plugin-vue_export-helper.B--vMWp3.js";
8
8
  import '../../assets/MazPickerYearSwitcher.CeQZat3v.css';const _hoisted_1 = { class: "maz-picker-year-switcher" }, _hoisted_2 = { class: "maz-picker-year-switcher__header" }, _hoisted_3 = { class: "maz-flex maz-space-x-2" }, _hoisted_4 = { class: "maz-picker-year-switcher__main" }, _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  __name: "MazPickerYearSwitcher",
@@ -3,14 +3,153 @@ import { MazChevronDown, MazCalendar, MazClock } from "@maz-ui/icons";
3
3
  import { useTranslations } from "@maz-ui/translations";
4
4
  import { formatDate } from "@maz-ui/utils/helpers/formatDate";
5
5
  import dayjs from "dayjs";
6
- import customParseFormat from "dayjs/plugin/customParseFormat";
7
- import isBetween from "dayjs/plugin/isBetween";
6
+ import { h as getDefaultExportFromCjs, j as getDefaultsShortcuts, c as isRangeValue, k as getRangeFormattedDate, l as getFormattedDate, m as getRangeISODate, n as getISODate, o as isValueDisabledWeekly, p as isValueDisabledDate, q as checkValueWithMinMaxDates } from "../chunks/utils.D89Q5cCP.js";
8
7
  import { useInstanceUniqId } from "../composables/useInstanceUniqId.js";
9
8
  import MazPickerContainer from "./MazDatePicker/MazPickerContainer.js";
10
- import { g as getDefaultsShortcuts, i as isRangeValue, a as getRangeFormattedDate, b as getFormattedDate, c as getRangeISODate, d as getISODate, e as isValueDisabledWeekly, f as isValueDisabledDate, h as checkValueWithMinMaxDates } from "../chunks/utils.CaVh3v2G.js";
11
9
  import MazPopover from "./MazPopover.js";
12
10
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper.B--vMWp3.js";
13
- import '../assets/MazDatePicker.CmfDI8so.css';const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ import '../assets/MazDatePicker.CmfDI8so.css';var customParseFormat$2 = { exports: {} }, customParseFormat$1 = customParseFormat$2.exports, hasRequiredCustomParseFormat;
12
+ function requireCustomParseFormat() {
13
+ return hasRequiredCustomParseFormat || (hasRequiredCustomParseFormat = 1, (function(module, exports$1) {
14
+ (function(e, t) {
15
+ module.exports = t();
16
+ })(customParseFormat$1, (function() {
17
+ var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
18
+ return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
19
+ }, f = function(e2) {
20
+ return function(t2) {
21
+ this[e2] = +t2;
22
+ };
23
+ }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
24
+ (this.zone || (this.zone = {})).offset = (function(e3) {
25
+ if (!e3 || e3 === "Z") return 0;
26
+ var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
27
+ return n2 === 0 ? 0 : t2[0] === "+" ? -n2 : n2;
28
+ })(e2);
29
+ }], u = function(e2) {
30
+ var t2 = s[e2];
31
+ return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
32
+ }, d = function(e2, t2) {
33
+ var n2, r2 = s.meridiem;
34
+ if (r2) {
35
+ for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
36
+ n2 = i2 > 12;
37
+ break;
38
+ }
39
+ } else n2 = e2 === (t2 ? "pm" : "PM");
40
+ return n2;
41
+ }, c = { A: [o, function(e2) {
42
+ this.afternoon = d(e2, !1);
43
+ }], a: [o, function(e2) {
44
+ this.afternoon = d(e2, !0);
45
+ }], Q: [n, function(e2) {
46
+ this.month = 3 * (e2 - 1) + 1;
47
+ }], S: [n, function(e2) {
48
+ this.milliseconds = 100 * +e2;
49
+ }], SS: [r, function(e2) {
50
+ this.milliseconds = 10 * +e2;
51
+ }], SSS: [/\d{3}/, function(e2) {
52
+ this.milliseconds = +e2;
53
+ }], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
54
+ var t2 = s.ordinal, n2 = e2.match(/\d+/);
55
+ if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
56
+ }], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
57
+ var t2 = u("months"), n2 = (u("monthsShort") || t2.map((function(e3) {
58
+ return e3.slice(0, 3);
59
+ }))).indexOf(e2) + 1;
60
+ if (n2 < 1) throw new Error();
61
+ this.month = n2 % 12 || n2;
62
+ }], MMMM: [o, function(e2) {
63
+ var t2 = u("months").indexOf(e2) + 1;
64
+ if (t2 < 1) throw new Error();
65
+ this.month = t2 % 12 || t2;
66
+ }], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
67
+ this.year = a(e2);
68
+ }], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
69
+ function l(n2) {
70
+ var r2, i2;
71
+ r2 = n2, i2 = s && s.formats;
72
+ for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t2, n3, r3) {
73
+ var o3 = r3 && r3.toUpperCase();
74
+ return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e2, t3, n4) {
75
+ return t3 || n4.slice(1);
76
+ }));
77
+ }))).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
78
+ var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
79
+ o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
80
+ }
81
+ return function(e2) {
82
+ for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
83
+ var i3 = o2[n3];
84
+ if (typeof i3 == "string") r3 += i3.length;
85
+ else {
86
+ var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
87
+ f3.call(t2, u3), e2 = e2.replace(u3, "");
88
+ }
89
+ }
90
+ return (function(e3) {
91
+ var t3 = e3.afternoon;
92
+ if (t3 !== void 0) {
93
+ var n4 = e3.hours;
94
+ t3 ? n4 < 12 && (e3.hours += 12) : n4 === 12 && (e3.hours = 0), delete e3.afternoon;
95
+ }
96
+ })(t2), t2;
97
+ };
98
+ }
99
+ return function(e2, t2, n2) {
100
+ n2.p.customParseFormat = !0, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
101
+ var r2 = t2.prototype, i2 = r2.parse;
102
+ r2.parse = function(e3) {
103
+ var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
104
+ this.$u = r3;
105
+ var a2 = o2[1];
106
+ if (typeof a2 == "string") {
107
+ var f2 = o2[2] === !0, h2 = o2[3] === !0, u2 = f2 || h2, d2 = o2[2];
108
+ h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = (function(e4, t4, n3, r4) {
109
+ try {
110
+ if (["x", "X"].indexOf(t4) > -1) return new Date((t4 === "X" ? 1e3 : 1) * e4);
111
+ var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
112
+ o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
113
+ var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
114
+ return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
115
+ } catch {
116
+ return /* @__PURE__ */ new Date("");
117
+ }
118
+ })(t3, a2, r3, n2), this.init(), d2 && d2 !== !0 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
119
+ } else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
120
+ o2[1] = a2[m - 1];
121
+ var M = n2.apply(this, o2);
122
+ if (M.isValid()) {
123
+ this.$d = M.$d, this.$L = M.$L, this.init();
124
+ break;
125
+ }
126
+ m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
127
+ }
128
+ else i2.call(this, e3);
129
+ };
130
+ };
131
+ }));
132
+ })(customParseFormat$2)), customParseFormat$2.exports;
133
+ }
134
+ var customParseFormatExports = /* @__PURE__ */ requireCustomParseFormat();
135
+ const customParseFormat = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports);
136
+ var isBetween$2 = { exports: {} }, isBetween$1 = isBetween$2.exports, hasRequiredIsBetween;
137
+ function requireIsBetween() {
138
+ return hasRequiredIsBetween || (hasRequiredIsBetween = 1, (function(module, exports$1) {
139
+ (function(e, i) {
140
+ module.exports = i();
141
+ })(isBetween$1, (function() {
142
+ return function(e, i, t) {
143
+ i.prototype.isBetween = function(e2, i2, s, f) {
144
+ var n = t(e2), o = t(i2), r = (f = f || "()")[0] === "(", u = f[1] === ")";
145
+ return (r ? this.isAfter(n, s) : !this.isBefore(n, s)) && (u ? this.isBefore(o, s) : !this.isAfter(o, s)) || (r ? this.isBefore(n, s) : !this.isAfter(n, s)) && (u ? this.isAfter(o, s) : !this.isBefore(o, s));
146
+ };
147
+ };
148
+ }));
149
+ })(isBetween$2)), isBetween$2.exports;
150
+ }
151
+ var isBetweenExports = /* @__PURE__ */ requireIsBetween();
152
+ const isBetween = /* @__PURE__ */ getDefaultExportFromCjs(isBetweenExports), _sfc_main = /* @__PURE__ */ defineComponent({
14
153
  inheritAttrs: !1,
15
154
  __name: "MazDatePicker",
16
155
  props: /* @__PURE__ */ mergeModels({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maz-ui",
3
3
  "type": "module",
4
- "version": "4.6.1",
4
+ "version": "4.6.2",
5
5
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -160,11 +160,11 @@
160
160
  "libphonenumber-js": "^1.12.36",
161
161
  "valibot": "^1.2.0",
162
162
  "vue-chartjs": "^5.3.3",
163
- "@maz-ui/cli": "4.6.1",
164
- "@maz-ui/icons": "4.6.1",
165
163
  "@maz-ui/themes": "4.6.1",
164
+ "@maz-ui/cli": "4.6.1",
165
+ "@maz-ui/utils": "4.6.1",
166
166
  "@maz-ui/translations": "4.6.1",
167
- "@maz-ui/utils": "4.6.1"
167
+ "@maz-ui/icons": "4.6.1"
168
168
  },
169
169
  "devDependencies": {
170
170
  "@vitejs/plugin-vue": "^6.0.3",
@@ -179,8 +179,8 @@
179
179
  "unplugin-auto-import": "^21.0.0",
180
180
  "unplugin-vue-components": "^31.0.0",
181
181
  "vue-router": "^5.0.1",
182
- "@maz-ui/node": "4.6.1",
183
- "@maz-ui/eslint-config": "4.6.1"
182
+ "@maz-ui/eslint-config": "4.6.1",
183
+ "@maz-ui/node": "4.6.1"
184
184
  },
185
185
  "lint-staged": {
186
186
  "*.{js,ts,vue,mjs,mts,cjs,md,yml,json}": "cross-env NODE_ENV=production eslint --fix",