maz-ui 3.22.4 → 3.23.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 (249) hide show
  1. package/components/MazAvatar.mjs +2 -2
  2. package/components/MazBackdrop.mjs +67 -107
  3. package/components/MazBadge.mjs +41 -50
  4. package/components/MazBottomSheet.mjs +2 -2
  5. package/components/MazBtn.mjs +2 -2
  6. package/components/MazCard.mjs +2 -2
  7. package/components/MazCarousel.mjs +2 -2
  8. package/components/MazChart.mjs +53 -63
  9. package/components/MazCheckbox.mjs +84 -128
  10. package/components/MazDialog.mjs +2 -2
  11. package/components/MazDialogPromise.mjs +3 -3
  12. package/components/MazDrawer.mjs +2 -2
  13. package/components/MazDropdown.mjs +2 -2
  14. package/components/MazDropzone.mjs +2 -2
  15. package/components/MazFullscreenLoader.mjs +14 -18
  16. package/components/MazGallery.mjs +352 -558
  17. package/components/MazIcon.mjs +76 -140
  18. package/components/MazInput.mjs +2 -2
  19. package/components/MazInputNumber.mjs +72 -99
  20. package/components/MazInputPrice.mjs +2 -2
  21. package/components/MazInputTags.mjs +2 -2
  22. package/components/MazLazyImg.mjs +2 -2
  23. package/components/MazPhoneNumberInput.mjs +2 -2
  24. package/components/MazPicker.mjs +2 -2
  25. package/components/MazRadio.mjs +65 -94
  26. package/components/MazRadioButtons.mjs +64 -78
  27. package/components/MazSelect.mjs +2 -2
  28. package/components/MazSlider.mjs +213 -325
  29. package/components/MazSpinner.mjs +25 -34
  30. package/components/MazStepper.mjs +2 -2
  31. package/components/MazSwitch.mjs +43 -60
  32. package/components/MazTabs.mjs +16 -25
  33. package/components/MazTabsBar.mjs +2 -2
  34. package/components/MazTabsContent.mjs +34 -43
  35. package/components/MazTabsContentItem.mjs +49 -63
  36. package/components/MazTextarea.mjs +124 -169
  37. package/components/MazTransitionExpand.mjs +36 -54
  38. package/components/assets/MazBackdrop.css +1 -1
  39. package/components/assets/MazBottomSheet.css +1 -1
  40. package/components/assets/MazDialog.css +1 -1
  41. package/components/assets/MazDialogPromise.css +1 -1
  42. package/components/assets/MazDrawer.css +1 -1
  43. package/components/assets/MazPhoneNumberInput.css +1 -1
  44. package/components/assets/MazSelect.css +1 -1
  45. package/components/chunks/MazAvatar-1636f58b.mjs +126 -0
  46. package/components/chunks/MazBottomSheet-c24f92f8.mjs +217 -0
  47. package/components/chunks/MazBtn-124f3700.mjs +153 -0
  48. package/components/chunks/MazBtn-1e61862b.mjs +153 -0
  49. package/components/chunks/MazBtn-2d1d1ba5.mjs +153 -0
  50. package/components/chunks/MazBtn-3d74f737.mjs +153 -0
  51. package/components/chunks/MazBtn-4a447126.mjs +153 -0
  52. package/components/chunks/MazBtn-555928ed.mjs +153 -0
  53. package/components/chunks/MazBtn-571454f6.mjs +153 -0
  54. package/components/chunks/MazBtn-5e426592.mjs +153 -0
  55. package/components/chunks/MazBtn-683effc1.mjs +153 -0
  56. package/components/chunks/MazBtn-6905cc39.mjs +153 -0
  57. package/components/chunks/MazBtn-6ce4cfd3.mjs +153 -0
  58. package/components/chunks/MazBtn-74656d5b.mjs +153 -0
  59. package/components/chunks/MazBtn-7706b2da.mjs +158 -0
  60. package/components/chunks/MazBtn-a7a913dd.mjs +153 -0
  61. package/components/chunks/MazBtn-fb3c7af8.mjs +153 -0
  62. package/components/chunks/MazCard-bcc36489.mjs +214 -0
  63. package/components/chunks/MazCarousel-6da75122.mjs +107 -0
  64. package/components/chunks/MazCheckbox-040dc2c4.mjs +117 -0
  65. package/components/chunks/MazCheckbox-3a2b48b4.mjs +117 -0
  66. package/components/chunks/MazDialog-44eda544.mjs +250 -0
  67. package/components/chunks/MazDialogPromise-eec5acde.mjs +419 -0
  68. package/components/chunks/MazDrawer-b628b37e.mjs +206 -0
  69. package/components/chunks/MazDropdown-6f2248b0.mjs +345 -0
  70. package/components/chunks/MazDropzone-8cac10a6.mjs +242 -0
  71. package/components/chunks/MazGallery-6b8ecedf.mjs +617 -0
  72. package/components/chunks/MazIcon-52a76873.mjs +101 -0
  73. package/components/chunks/MazIcon-95e31ff8.mjs +96 -0
  74. package/components/chunks/MazInput-1ed4f946.mjs +283 -0
  75. package/components/chunks/MazInput-8a217995.mjs +271 -0
  76. package/components/chunks/MazInput-c51881ea.mjs +278 -0
  77. package/components/chunks/MazInputPrice-cd348d46.mjs +392 -0
  78. package/components/chunks/MazInputTags-aa95fae7.mjs +446 -0
  79. package/components/chunks/MazLazyImg-0412ab38.mjs +259 -0
  80. package/components/chunks/MazLazyImg-47d3449a.mjs +254 -0
  81. package/components/chunks/MazPhoneNumberInput-e1bf46f9.mjs +1216 -0
  82. package/components/chunks/MazPicker-e4620d8b.mjs +1140 -0
  83. package/components/chunks/MazPickerCalendar-da62262c.mjs +535 -0
  84. package/components/chunks/MazPickerHeader-a2e041eb.mjs +186 -0
  85. package/components/chunks/MazPickerMonthSwitcher-5bf8bd08.mjs +97 -0
  86. package/components/chunks/MazPickerShortcuts-7f95430e.mjs +74 -0
  87. package/components/chunks/MazPickerTime-717402ae.mjs +219 -0
  88. package/components/chunks/MazPickerYearSwitcher-85f97b6d.mjs +106 -0
  89. package/components/chunks/MazSelect-6ff6bb96.mjs +652 -0
  90. package/components/chunks/MazSpinner-054f948c.mjs +39 -0
  91. package/components/chunks/MazSpinner-059ee1d2.mjs +39 -0
  92. package/components/chunks/MazSpinner-08ee440b.mjs +39 -0
  93. package/components/chunks/MazSpinner-13403729.mjs +39 -0
  94. package/components/chunks/MazSpinner-44011019.mjs +39 -0
  95. package/components/chunks/MazSpinner-452a1534.mjs +39 -0
  96. package/components/chunks/MazSpinner-4c02cfd2.mjs +39 -0
  97. package/components/chunks/MazSpinner-51aa73ca.mjs +39 -0
  98. package/components/chunks/MazSpinner-6d1d24d5.mjs +39 -0
  99. package/components/chunks/MazSpinner-6e7c4705.mjs +39 -0
  100. package/components/chunks/MazSpinner-7895f54f.mjs +39 -0
  101. package/components/chunks/MazSpinner-7eee202e.mjs +39 -0
  102. package/components/chunks/MazSpinner-805e14a6.mjs +39 -0
  103. package/components/chunks/MazSpinner-85080b43.mjs +39 -0
  104. package/components/chunks/MazSpinner-a13a50c9.mjs +39 -0
  105. package/components/chunks/MazSpinner-a6d61cee.mjs +43 -0
  106. package/components/chunks/MazSpinner-c67b05bb.mjs +39 -0
  107. package/components/chunks/MazSpinner-caa33afc.mjs +39 -0
  108. package/components/chunks/MazSpinner-cb8fbe9a.mjs +39 -0
  109. package/components/chunks/MazSpinner-d9ef329f.mjs +39 -0
  110. package/components/chunks/MazStepper-39f018f3.mjs +191 -0
  111. package/components/chunks/MazTabsBar-27965f16.mjs +132 -0
  112. package/components/chunks/MazTransitionExpand-55cfbecb.mjs +41 -0
  113. package/components/chunks/MazTransitionExpand-cd24498f.mjs +41 -0
  114. package/components/chunks/_plugin-vue_export-helper-dad06003.mjs +9 -0
  115. package/components/chunks/check-31d7ba2f.mjs +30 -0
  116. package/components/chunks/check-c9b483c0.mjs +30 -0
  117. package/components/chunks/{check-circle-7acfa4c4.mjs → check-circle-59c383ed.mjs} +10 -12
  118. package/components/chunks/chevron-down-2b60111a.mjs +30 -0
  119. package/components/chunks/chevron-left-39b4621e.mjs +30 -0
  120. package/components/chunks/chevron-right-949a60fa.mjs +30 -0
  121. package/components/chunks/debounce-19c516b6.mjs +11 -0
  122. package/components/chunks/examples.mobile.json-f63d22fb.mjs +4 -0
  123. package/components/chunks/{exclamation-circle-2e115536.mjs → exclamation-circle-e2620aab.mjs} +10 -12
  124. package/components/chunks/{exclamation-triangle-10eb48dc.mjs → exclamation-triangle-21bf116a.mjs} +10 -12
  125. package/components/chunks/{eye-fbb13657.mjs → eye-dc12ce09.mjs} +12 -15
  126. package/components/chunks/{eye-slash-342420ff.mjs → eye-slash-fa42a017.mjs} +10 -12
  127. package/components/chunks/{magnifying-glass-5dffa35e.mjs → magnifying-glass-908981c0.mjs} +10 -12
  128. package/components/chunks/minus-e71140e1.mjs +30 -0
  129. package/components/chunks/no-photography-4c6c77cf.mjs +4 -0
  130. package/components/chunks/{no-photography-b0d08d6f.mjs → no-photography-be94ddda.mjs} +12 -15
  131. package/components/chunks/{no-symbol-975ce547.mjs → no-symbol-87477ad0.mjs} +10 -12
  132. package/components/chunks/{pencil-2f766dc8.mjs → pencil-4c35b4e7.mjs} +10 -12
  133. package/components/chunks/plus-c20544c3.mjs +30 -0
  134. package/components/chunks/x-mark-35f2f1e7.mjs +30 -0
  135. package/components/chunks/x-mark-7761acf4.mjs +29 -0
  136. package/modules/chunks/MazBtn-2f302422.cjs +1 -0
  137. package/modules/chunks/MazBtn-760c3b29.mjs +153 -0
  138. package/modules/chunks/MazIcon-0bd6b78e.mjs +96 -0
  139. package/modules/chunks/MazIcon-599a907f.cjs +1 -0
  140. package/modules/chunks/MazSpinner-03bd76bd.mjs +39 -0
  141. package/modules/chunks/MazSpinner-6ffa8db1.cjs +1 -0
  142. package/modules/chunks/{arrow-top-right-on-square-32bbe5a1.mjs → arrow-top-right-on-square-15191934.mjs} +10 -12
  143. package/modules/chunks/arrow-top-right-on-square-8e4ea6e2.cjs +1 -0
  144. package/modules/chunks/chevron-left-36731110.cjs +1 -0
  145. package/modules/chunks/chevron-left-39b4621e.mjs +30 -0
  146. package/modules/chunks/index-6a90ef88.mjs +1618 -0
  147. package/modules/chunks/index-794680d2.cjs +124 -0
  148. package/modules/chunks/{link-4eb05848.mjs → link-bb14441d.mjs} +10 -12
  149. package/modules/chunks/link-c7791a2a.cjs +1 -0
  150. package/modules/chunks/no-photography-0f6fcaf4.cjs +1 -0
  151. package/modules/chunks/no-photography-4c6c77cf.mjs +4 -0
  152. package/modules/chunks/x-mark-35f2f1e7.mjs +30 -0
  153. package/modules/chunks/x-mark-a28deca5.cjs +1 -0
  154. package/modules/index.cjs +1 -0
  155. package/modules/index.mjs +42 -42
  156. package/nuxt/index.json +1 -1
  157. package/package.json +14 -4
  158. package/types/resolvers/index.d.ts +1 -0
  159. package/types/resolvers/unplugin-vue-components-resolver.d.ts +8 -0
  160. package/types/utils/index.d.ts +3 -0
  161. package/components/chunks/MazAvatar-358d78d4.mjs +0 -138
  162. package/components/chunks/MazBottomSheet-61090f4a.mjs +0 -267
  163. package/components/chunks/MazBtn-0e02f0da.mjs +0 -184
  164. package/components/chunks/MazBtn-1daf9063.mjs +0 -184
  165. package/components/chunks/MazBtn-2f4fa942.mjs +0 -184
  166. package/components/chunks/MazBtn-31c6b731.mjs +0 -184
  167. package/components/chunks/MazBtn-48382169.mjs +0 -184
  168. package/components/chunks/MazBtn-4e1e116e.mjs +0 -184
  169. package/components/chunks/MazBtn-50abc4c5.mjs +0 -184
  170. package/components/chunks/MazBtn-84e12b6a.mjs +0 -184
  171. package/components/chunks/MazBtn-b42e3575.mjs +0 -184
  172. package/components/chunks/MazBtn-b56a7278.mjs +0 -184
  173. package/components/chunks/MazBtn-bbd6e9c8.mjs +0 -184
  174. package/components/chunks/MazBtn-cf0c8fcb.mjs +0 -184
  175. package/components/chunks/MazBtn-d92908b2.mjs +0 -191
  176. package/components/chunks/MazBtn-f48da79c.mjs +0 -184
  177. package/components/chunks/MazBtn-fec4c3b7.mjs +0 -184
  178. package/components/chunks/MazCard-4331dca0.mjs +0 -237
  179. package/components/chunks/MazCarousel-7825c7c9.mjs +0 -133
  180. package/components/chunks/MazCheckbox-ab5ddda2.mjs +0 -153
  181. package/components/chunks/MazCheckbox-e0bbe6ec.mjs +0 -153
  182. package/components/chunks/MazDialog-83e54b8c.mjs +0 -290
  183. package/components/chunks/MazDialogPromise-6967e821.mjs +0 -474
  184. package/components/chunks/MazDrawer-d778b3d2.mjs +0 -256
  185. package/components/chunks/MazDropdown-6f4482d7.mjs +0 -426
  186. package/components/chunks/MazDropzone-d1bb62dc.mjs +0 -325
  187. package/components/chunks/MazGallery-b2dc4286.mjs +0 -821
  188. package/components/chunks/MazIcon-b779da0a.mjs +0 -159
  189. package/components/chunks/MazIcon-bda198b4.mjs +0 -165
  190. package/components/chunks/MazInput-713b00d0.mjs +0 -326
  191. package/components/chunks/MazInput-b9386887.mjs +0 -341
  192. package/components/chunks/MazInput-c33627dd.mjs +0 -334
  193. package/components/chunks/MazInputPrice-452297f5.mjs +0 -481
  194. package/components/chunks/MazInputTags-7a463b81.mjs +0 -526
  195. package/components/chunks/MazLazyImg-6e395356.mjs +0 -336
  196. package/components/chunks/MazLazyImg-e0d8b6d0.mjs +0 -329
  197. package/components/chunks/MazPhoneNumberInput-48fe2445.mjs +0 -1536
  198. package/components/chunks/MazPicker-50fc11d1.mjs +0 -1352
  199. package/components/chunks/MazPickerCalendar-cacb361c.mjs +0 -689
  200. package/components/chunks/MazPickerHeader-63d45179.mjs +0 -216
  201. package/components/chunks/MazPickerMonthSwitcher-913c6e2c.mjs +0 -110
  202. package/components/chunks/MazPickerShortcuts-c6fabfc6.mjs +0 -88
  203. package/components/chunks/MazPickerTime-5e4475da.mjs +0 -301
  204. package/components/chunks/MazPickerYearSwitcher-dd4fa89c.mjs +0 -125
  205. package/components/chunks/MazSelect-2e5cd411.mjs +0 -850
  206. package/components/chunks/MazSpinner-022d7bee.mjs +0 -46
  207. package/components/chunks/MazSpinner-100c99b8.mjs +0 -46
  208. package/components/chunks/MazSpinner-191ad23b.mjs +0 -46
  209. package/components/chunks/MazSpinner-3155378b.mjs +0 -46
  210. package/components/chunks/MazSpinner-339a9006.mjs +0 -46
  211. package/components/chunks/MazSpinner-53979e96.mjs +0 -46
  212. package/components/chunks/MazSpinner-68d2f2ac.mjs +0 -46
  213. package/components/chunks/MazSpinner-6b563b22.mjs +0 -46
  214. package/components/chunks/MazSpinner-7cdc13e7.mjs +0 -46
  215. package/components/chunks/MazSpinner-8859d658.mjs +0 -46
  216. package/components/chunks/MazSpinner-8e180605.mjs +0 -52
  217. package/components/chunks/MazSpinner-9950424b.mjs +0 -46
  218. package/components/chunks/MazSpinner-c8270a93.mjs +0 -46
  219. package/components/chunks/MazSpinner-cb491238.mjs +0 -46
  220. package/components/chunks/MazSpinner-cb6f99f3.mjs +0 -46
  221. package/components/chunks/MazSpinner-ce4be8f1.mjs +0 -46
  222. package/components/chunks/MazSpinner-e5a9f319.mjs +0 -46
  223. package/components/chunks/MazSpinner-e92bd359.mjs +0 -46
  224. package/components/chunks/MazSpinner-eea9056d.mjs +0 -46
  225. package/components/chunks/MazSpinner-f1e69f29.mjs +0 -46
  226. package/components/chunks/MazStepper-4c19dbfc.mjs +0 -255
  227. package/components/chunks/MazTabsBar-3c2e2d69.mjs +0 -157
  228. package/components/chunks/MazTransitionExpand-474b00d4.mjs +0 -57
  229. package/components/chunks/MazTransitionExpand-f9e5a2d6.mjs +0 -57
  230. package/components/chunks/_plugin-vue_export-helper-cc2b3d55.mjs +0 -10
  231. package/components/chunks/check-8da249b1.mjs +0 -32
  232. package/components/chunks/check-f2fcce10.mjs +0 -32
  233. package/components/chunks/chevron-down-a78b9604.mjs +0 -32
  234. package/components/chunks/chevron-left-3365d59b.mjs +0 -32
  235. package/components/chunks/chevron-right-02f9e837.mjs +0 -32
  236. package/components/chunks/debounce-7d66ffa9.mjs +0 -12
  237. package/components/chunks/examples.mobile.json-618ba782.mjs +0 -4
  238. package/components/chunks/minus-c9cdee90.mjs +0 -32
  239. package/components/chunks/no-photography-7f2be516.mjs +0 -4
  240. package/components/chunks/plus-b1b0a5a8.mjs +0 -32
  241. package/components/chunks/x-mark-3b05101b.mjs +0 -31
  242. package/components/chunks/x-mark-c6ff45dd.mjs +0 -32
  243. package/modules/chunks/MazBtn-90ffd148.mjs +0 -184
  244. package/modules/chunks/MazIcon-988edef7.mjs +0 -159
  245. package/modules/chunks/MazSpinner-a16a3d8f.mjs +0 -46
  246. package/modules/chunks/chevron-left-3365d59b.mjs +0 -32
  247. package/modules/chunks/index-b1625fc2.mjs +0 -2315
  248. package/modules/chunks/no-photography-7f2be516.mjs +0 -4
  249. package/modules/chunks/x-mark-c6ff45dd.mjs +0 -32
@@ -1,689 +0,0 @@
1
- import "../assets/MazPickerCalendar.css";
2
- import { openBlock, createElementBlock, createElementVNode, defineComponent, computed, createVNode, withCtx, unref, createTextVNode, toDisplayString, useCssVars, ref, watch, TransitionGroup, Fragment, renderList, normalizeClass, createBlock, defineAsyncComponent, createCommentVNode, Transition } from "vue";
3
- import { d as dayjs, c as capitalize, a as date, _ as _export_sfc, g as getDaysInMonth, b as getFirstDayOfMonth, i as isSameDate, e as isToday, h as isSameDay, j as getDaysOfWeek } from "./MazPicker-50fc11d1.mjs";
4
- import MazBtn from "./MazBtn-0e02f0da.mjs";
5
- import { d as debounce } from "./debounce-7d66ffa9.mjs";
6
- const _hoisted_1$3 = {
7
- xmlns: "http://www.w3.org/2000/svg",
8
- width: "1em",
9
- height: "1em",
10
- fill: "none",
11
- viewBox: "0 0 24 24"
12
- };
13
- const _hoisted_2$1 = /* @__PURE__ */ createElementVNode(
14
- "path",
15
- {
16
- stroke: "currentColor",
17
- "stroke-linecap": "round",
18
- "stroke-linejoin": "round",
19
- "stroke-width": "1.5",
20
- d: "M15.75 19.5 8.25 12l7.5-7.5"
21
- },
22
- null,
23
- -1
24
- /* HOISTED */
25
- );
26
- const _hoisted_3 = [
27
- _hoisted_2$1
28
- ];
29
- function render(_ctx, _cache) {
30
- return openBlock(), createElementBlock("svg", _hoisted_1$3, [..._hoisted_3]);
31
- }
32
- const ChevronLeftIcon = { render };
33
- const _hoisted_1$2 = { class: "m-picker-calendar-switcher" };
34
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
35
- __name: "MazPickerCalendarSwitcher",
36
- props: {
37
- calendarDate: { type: String, default: void 0 },
38
- locale: { type: String, required: true },
39
- double: { type: Boolean, required: true }
40
- },
41
- emits: [
42
- "previous",
43
- "next",
44
- "open-month-switcher",
45
- "open-year-switcher",
46
- "update:calendar-date"
47
- ],
48
- setup(__props, { emit: __emit }) {
49
- const props = __props;
50
- const emits = __emit;
51
- const calendarDate2 = computed(() => dayjs(props.calendarDate));
52
- const monthLabel = computed(() => {
53
- return props.double ? `${capitalize(
54
- date(calendarDate2.value.format(), props.locale, { month: "long" })
55
- )} - ${capitalize(
56
- date(calendarDate2.value.add(1, "month").format(), props.locale, {
57
- month: "long"
58
- })
59
- )}` : capitalize(date(calendarDate2.value.format(), props.locale, { month: "long" }));
60
- });
61
- const yearLabel = computed(
62
- () => date(calendarDate2.value.format(), props.locale, { year: "numeric" })
63
- );
64
- const previousMonth = () => {
65
- emits("update:calendar-date", dayjs(props.calendarDate).subtract(1, "month").format());
66
- };
67
- const nextMonth = () => {
68
- emits("update:calendar-date", dayjs(props.calendarDate).add(1, "month").format());
69
- };
70
- return (_ctx, _cache) => {
71
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
72
- createVNode(MazBtn, {
73
- size: "xs",
74
- color: "transparent",
75
- type: "button",
76
- onClick: previousMonth
77
- }, {
78
- default: withCtx(() => [
79
- createVNode(unref(ChevronLeftIcon), { class: "maz-text-lg" })
80
- ]),
81
- _: 1
82
- /* STABLE */
83
- }),
84
- createVNode(MazBtn, {
85
- size: "sm",
86
- color: "transparent",
87
- type: "button",
88
- class: "m-picker-calendar-switcher__date",
89
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("open-month-switcher", $event))
90
- }, {
91
- default: withCtx(() => [
92
- createTextVNode(
93
- toDisplayString(monthLabel.value),
94
- 1
95
- /* TEXT */
96
- )
97
- ]),
98
- _: 1
99
- /* STABLE */
100
- }),
101
- createVNode(MazBtn, {
102
- size: "sm",
103
- color: "transparent",
104
- type: "button",
105
- class: "m-picker-calendar-switcher__date",
106
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("open-year-switcher", $event))
107
- }, {
108
- default: withCtx(() => [
109
- createTextVNode(
110
- toDisplayString(yearLabel.value),
111
- 1
112
- /* TEXT */
113
- )
114
- ]),
115
- _: 1
116
- /* STABLE */
117
- }),
118
- createVNode(MazBtn, {
119
- size: "xs",
120
- color: "transparent",
121
- type: "button",
122
- onClick: nextMonth
123
- }, {
124
- default: withCtx(() => [
125
- createVNode(unref(ChevronLeftIcon), { class: "maz-rotate-180 maz-text-lg" })
126
- ]),
127
- _: 1
128
- /* STABLE */
129
- })
130
- ]);
131
- };
132
- }
133
- });
134
- const MazPickerCalendarSwitcher_vue_vue_type_style_index_0_scoped_d8857bed_lang = "";
135
- const MazPickerCalendarSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-d8857bed"]]);
136
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
137
- __name: "MazPickerCalendarGrid",
138
- props: {
139
- modelValue: {
140
- type: [String, Object],
141
- default: void 0
142
- },
143
- calendarDate: { type: String, required: true },
144
- hasTime: { type: Boolean, required: true },
145
- locale: { type: String, required: true },
146
- firstDayOfWeek: { type: Number, required: true },
147
- color: { type: String, required: true },
148
- minDate: { type: String, default: void 0 },
149
- maxDate: { type: String, default: void 0 },
150
- disabledWeekly: { type: Array, required: true },
151
- disabledDates: { type: Array, required: true },
152
- hoverredDay: { type: Object, default: void 0 },
153
- disabled: { type: Boolean, required: true }
154
- },
155
- emits: ["update:model-value", "update:hoverred-day"],
156
- setup(__props, { emit: __emit }) {
157
- useCssVars((_ctx) => ({
158
- "dfa93530": hoverColor.value,
159
- "0e09463c": betweenColorAlpha.value,
160
- "7439addc": betweenColor.value
161
- }));
162
- const props = __props;
163
- const emits = __emit;
164
- const MazPickerGrid = ref();
165
- const transitionName = ref("maz-slidenext");
166
- const calendarDateArray = computed(() => [props.calendarDate]);
167
- const isRangeMode = computed(() => props.modelValue && typeof props.modelValue === "object");
168
- const hoverColor = computed(() => `var(--maz-color-${props.color}-alpha-20)`);
169
- const betweenColor = computed(() => `var(--maz-color-${props.color}-alpha)`);
170
- const betweenColorAlpha = computed(() => `var(--maz-color-${props.color}-alpha-20)`);
171
- const modelValue = computed({
172
- get: () => props.modelValue,
173
- set: (value) => emits("update:model-value", value)
174
- });
175
- const monthDays = computed(
176
- () => Array.from({ length: getDaysInMonth(props.calendarDate) }, (_v, i) => i + 1).map((day) => ({
177
- label: day,
178
- date: dayjs(props.calendarDate).set("date", day)
179
- }))
180
- );
181
- const emptyDaysCount = computed(() => {
182
- const firstDayMonth = getFirstDayOfMonth(props.calendarDate);
183
- return (firstDayMonth - props.firstDayOfWeek + 7) % 7;
184
- });
185
- const setHoverredDay = (day) => {
186
- const value = props.modelValue;
187
- if (value.start && !value.end && day && day.isAfter(value.start)) {
188
- emits("update:hoverred-day", day);
189
- } else {
190
- emits("update:hoverred-day");
191
- }
192
- };
193
- const isBetweenHoverred = (day) => {
194
- const value = props.modelValue;
195
- if (!value.start || !props.hoverredDay) {
196
- return void 0;
197
- }
198
- const isBetween = dayjs(day).isBetween(value.start, props.hoverredDay, "date", "(]");
199
- return isBetween ? 3 : void 0;
200
- };
201
- const isLastDayHoverred = (day) => {
202
- if (!props.hoverredDay) {
203
- return;
204
- }
205
- return dayjs(day).isSame(props.hoverredDay);
206
- };
207
- const isFirstDay = (day) => {
208
- var _a;
209
- if (!props.modelValue) {
210
- return false;
211
- }
212
- if (props.modelValue && typeof props.modelValue === "object" && ((_a = props.modelValue) == null ? void 0 : _a.start)) {
213
- return isSameDate(day, props.modelValue.start, "date");
214
- }
215
- return false;
216
- };
217
- const isLastDay = (day) => {
218
- var _a;
219
- if (!props.modelValue) {
220
- return false;
221
- }
222
- if (props.modelValue && typeof props.modelValue === "object" && ((_a = props.modelValue) == null ? void 0 : _a.end)) {
223
- return isSameDate(day, props.modelValue.end, "date");
224
- }
225
- return false;
226
- };
227
- const getDayButtonColor = (date2) => {
228
- const value = props.modelValue;
229
- if (typeof value === "object") {
230
- return (value.start ? isSameDate(date2, value.start, "date") : false) || (value.end ? isSameDate(date2, value.end, "date") : false) ? props.color : checkIsBetween(date2) ? props.color : "transparent";
231
- } else {
232
- return checkIsSameDate(date2) ? props.color : "transparent";
233
- }
234
- };
235
- const isSelectedOrBetween = (day) => {
236
- if (props.modelValue && typeof props.modelValue === "object") {
237
- if (props.modelValue.start && isSameDate(day, props.modelValue.start, "date")) {
238
- return 1;
239
- }
240
- if (props.modelValue.end) {
241
- if (isSameDate(day, props.modelValue.end, "date")) {
242
- return 1;
243
- }
244
- if (checkIsBetween(day)) {
245
- return 2;
246
- }
247
- }
248
- } else if (checkIsSameDate(day)) {
249
- return 1;
250
- }
251
- return 0;
252
- };
253
- const selectDay = (value) => {
254
- if (isRangeMode.value) {
255
- setHoverredDay();
256
- }
257
- const valueFormatted = value.format();
258
- if (typeof modelValue.value === "object") {
259
- let values = modelValue.value;
260
- if (values.start && values.end) {
261
- values = {
262
- start: void 0,
263
- end: void 0
264
- };
265
- }
266
- const isBeforeStartDate = dayjs(valueFormatted).isBefore(values.start, "date");
267
- modelValue.value = !values.start || isBeforeStartDate ? {
268
- start: valueFormatted,
269
- end: void 0
270
- } : {
271
- start: values.start,
272
- end: valueFormatted
273
- };
274
- } else {
275
- modelValue.value = valueFormatted;
276
- }
277
- };
278
- const checkIsToday = (day) => {
279
- return isToday(day);
280
- };
281
- const checkIsSameDate = (day) => {
282
- if (!props.modelValue) {
283
- return false;
284
- }
285
- const value = props.modelValue;
286
- return isSameDate(day, value, "date");
287
- };
288
- const checkIsBetween = (day) => {
289
- const value = props.modelValue;
290
- if (!value.start || !value.end) {
291
- return false;
292
- }
293
- return dayjs(day).isBetween(value.start, value.end, "date", "()");
294
- };
295
- const isSmallerMinDate = (day) => {
296
- if (!props.minDate) {
297
- return false;
298
- }
299
- return dayjs(day).isBefore(props.minDate, "date");
300
- };
301
- const isDisabledWeekly = (day) => {
302
- var _a;
303
- if (!((_a = props.disabledWeekly) == null ? void 0 : _a.length)) {
304
- return false;
305
- }
306
- return props.disabledWeekly.some((disabledDay) => isSameDay(day, disabledDay));
307
- };
308
- const isDisabledDate = (day) => {
309
- var _a;
310
- if (!((_a = props.disabledDates) == null ? void 0 : _a.length)) {
311
- return false;
312
- }
313
- return props.disabledDates.some((disabledDay) => isSameDate(day, disabledDay, "date"));
314
- };
315
- const isBiggerMaxDate = (day) => {
316
- if (!props.maxDate) {
317
- return false;
318
- }
319
- return dayjs(day).isAfter(props.maxDate, "date");
320
- };
321
- const removeContainerHeight = debounce(() => {
322
- if (MazPickerGrid.value) {
323
- MazPickerGrid.value.style.minHeight = "";
324
- }
325
- }, 400);
326
- const setContainerHeight = () => {
327
- var _a;
328
- if (MazPickerGrid.value) {
329
- MazPickerGrid.value.style.minHeight = `${((_a = MazPickerGrid.value) == null ? void 0 : _a.clientHeight) || 176}px`;
330
- removeContainerHeight();
331
- }
332
- };
333
- watch(
334
- () => props.calendarDate,
335
- (calendarDate, oldCalendarValue) => {
336
- transitionName.value = dayjs(calendarDate).isAfter(oldCalendarValue, "date") ? "maz-slidenext" : "maz-slideprev";
337
- setContainerHeight();
338
- }
339
- );
340
- return (_ctx, _cache) => {
341
- return openBlock(), createElementBlock(
342
- "div",
343
- {
344
- ref_key: "MazPickerGrid",
345
- ref: MazPickerGrid,
346
- class: "maz-picker-calendar-grid"
347
- },
348
- [
349
- createVNode(TransitionGroup, { name: transitionName.value }, {
350
- default: withCtx(() => [
351
- (openBlock(true), createElementBlock(
352
- Fragment,
353
- null,
354
- renderList([calendarDateArray.value], (dateArray, dateIndex) => {
355
- return openBlock(), createElementBlock(
356
- "div",
357
- {
358
- key: `${dateArray[dateIndex]}`,
359
- class: normalizeClass(["maz-picker-calendar-grid__container", { "--is-range": isRangeMode.value }])
360
- },
361
- [
362
- (openBlock(true), createElementBlock(
363
- Fragment,
364
- null,
365
- renderList(emptyDaysCount.value, (first) => {
366
- return openBlock(), createElementBlock("div", { key: first });
367
- }),
368
- 128
369
- /* KEYED_FRAGMENT */
370
- )),
371
- (openBlock(true), createElementBlock(
372
- Fragment,
373
- null,
374
- renderList(monthDays.value, ({ label, date: date2 }, i) => {
375
- return openBlock(), createBlock(MazBtn, {
376
- key: i,
377
- size: "mini",
378
- color: getDayButtonColor(date2),
379
- type: "button",
380
- disabled: __props.disabled || isSmallerMinDate(date2) || isBiggerMaxDate(date2) || isDisabledWeekly(date2) || isDisabledDate(date2),
381
- class: normalizeClass({
382
- "--is-today": checkIsToday(date2),
383
- "--is-first": isFirstDay(date2),
384
- "--is-last": isLastDay(date2) || isRangeMode.value && isLastDayHoverred(date2),
385
- "--is-selected": isSelectedOrBetween(date2) === 1,
386
- "--is-between": isSelectedOrBetween(date2) === 2,
387
- "--is-between-hoverred": isRangeMode.value ? isBetweenHoverred(date2) === 3 : void 0
388
- }),
389
- onClick: ($event) => selectDay(date2),
390
- onMouseover: ($event) => isRangeMode.value ? setHoverredDay(date2) : void 0,
391
- onMouseleave: _cache[0] || (_cache[0] = ($event) => isRangeMode.value ? setHoverredDay() : void 0),
392
- onFocus: ($event) => isRangeMode.value ? setHoverredDay(date2) : void 0,
393
- onBlur: _cache[1] || (_cache[1] = ($event) => isRangeMode.value ? setHoverredDay() : void 0)
394
- }, {
395
- default: withCtx(() => [
396
- createElementVNode(
397
- "span",
398
- null,
399
- toDisplayString(label),
400
- 1
401
- /* TEXT */
402
- )
403
- ]),
404
- _: 2
405
- /* DYNAMIC */
406
- }, 1032, ["color", "disabled", "class", "onClick", "onMouseover", "onFocus"]);
407
- }),
408
- 128
409
- /* KEYED_FRAGMENT */
410
- ))
411
- ],
412
- 2
413
- /* CLASS */
414
- );
415
- }),
416
- 128
417
- /* KEYED_FRAGMENT */
418
- ))
419
- ]),
420
- _: 1
421
- /* STABLE */
422
- }, 8, ["name"])
423
- ],
424
- 512
425
- /* NEED_PATCH */
426
- );
427
- };
428
- }
429
- });
430
- const MazPickerCalendarGrid_vue_vue_type_style_index_0_scoped_262d0b69_lang = "";
431
- const MazPickerCalendarGrid = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-262d0b69"]]);
432
- const _hoisted_1$1 = { class: "maz-picker-calendar-days" };
433
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
434
- __name: "MazPickerCalendarDays",
435
- props: {
436
- locale: { type: String, required: true },
437
- firstDayOfWeek: { type: Number, required: true }
438
- },
439
- setup(__props) {
440
- const props = __props;
441
- const days = computed(() => getDaysOfWeek(props.locale, props.firstDayOfWeek));
442
- return (_ctx, _cache) => {
443
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
444
- (openBlock(true), createElementBlock(
445
- Fragment,
446
- null,
447
- renderList(days.value, (label) => {
448
- return openBlock(), createElementBlock(
449
- "span",
450
- { key: label },
451
- toDisplayString(label),
452
- 1
453
- /* TEXT */
454
- );
455
- }),
456
- 128
457
- /* KEYED_FRAGMENT */
458
- ))
459
- ]);
460
- };
461
- }
462
- });
463
- const MazPickerCalendarDays_vue_vue_type_style_index_0_scoped_a7b7f610_lang = "";
464
- const MazPickerCalendarDays = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a7b7f610"]]);
465
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
466
- __name: "MazPickerCalendarMonth",
467
- props: {
468
- modelValue: {
469
- type: [String, Object],
470
- default: void 0
471
- },
472
- color: { type: String, required: true },
473
- locale: { type: String, required: true },
474
- hasTime: { type: Boolean, required: true },
475
- firstDayOfWeek: { type: Number, required: true },
476
- calendarDate: { type: String, required: true },
477
- offsetMonth: { type: Number, default: 0 },
478
- minDate: { type: String, default: void 0 },
479
- maxDate: { type: String, default: void 0 },
480
- disabledWeekly: { type: Array, required: true },
481
- disabledDates: { type: Array, required: true },
482
- hoverredDay: { type: Object, default: void 0 },
483
- disabled: { type: Boolean, required: true }
484
- },
485
- emits: ["update:model-value", "update:calendar-date", "update:hoverred-day"],
486
- setup(__props, { emit: __emit }) {
487
- const props = __props;
488
- const emits = __emit;
489
- const modelValue = computed({
490
- get: () => props.modelValue,
491
- set: (value) => emits("update:model-value", value)
492
- });
493
- const isRangeMode = computed(() => typeof modelValue.value === "object");
494
- const hoverredDay = computed({
495
- get: () => props.hoverredDay,
496
- set: (value) => emits("update:hoverred-day", value)
497
- });
498
- function getCalendarDateWithOffset(offset) {
499
- return dayjs(props.calendarDate).add(offset, "month").format();
500
- }
501
- const calendarDateWithOffset = computed({
502
- get: () => getCalendarDateWithOffset(props.offsetMonth),
503
- set: (calendarDate) => emits("update:calendar-date", calendarDate)
504
- });
505
- return (_ctx, _cache) => {
506
- return openBlock(), createElementBlock(
507
- "div",
508
- {
509
- class: normalizeClass(["maz-picker-calendar-month", { "--has-padding": !isRangeMode.value }])
510
- },
511
- [
512
- createVNode(MazPickerCalendarDays, {
513
- locale: __props.locale,
514
- "first-day-of-week": __props.firstDayOfWeek,
515
- class: "maz-picker-calendar-month__days"
516
- }, null, 8, ["locale", "first-day-of-week"]),
517
- createVNode(MazPickerCalendarGrid, {
518
- modelValue: modelValue.value,
519
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
520
- "hoverred-day": hoverredDay.value,
521
- "onUpdate:hoverredDay": _cache[1] || (_cache[1] = ($event) => hoverredDay.value = $event),
522
- locale: __props.locale,
523
- color: __props.color,
524
- "has-time": __props.hasTime,
525
- "calendar-date": calendarDateWithOffset.value,
526
- "first-day-of-week": __props.firstDayOfWeek,
527
- "min-date": __props.minDate,
528
- "max-date": __props.maxDate,
529
- "disabled-weekly": __props.disabledWeekly,
530
- "disabled-dates": __props.disabledDates,
531
- disabled: __props.disabled
532
- }, null, 8, ["modelValue", "hoverred-day", "locale", "color", "has-time", "calendar-date", "first-day-of-week", "min-date", "max-date", "disabled-weekly", "disabled-dates", "disabled"])
533
- ],
534
- 2
535
- /* CLASS */
536
- );
537
- };
538
- }
539
- });
540
- const MazPickerCalendarMonth_vue_vue_type_style_index_0_scoped_19c30331_lang = "";
541
- const MazPickerCalendarMonth = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-19c30331"]]);
542
- const _hoisted_1 = { class: "maz-picker-calendar flex" };
543
- const _hoisted_2 = { class: "maz-picker-calendar__months" };
544
- const _sfc_main = /* @__PURE__ */ defineComponent({
545
- __name: "MazPickerCalendar",
546
- props: {
547
- modelValue: {
548
- type: [String, Object],
549
- default: void 0
550
- },
551
- calendarDate: { type: String, required: true },
552
- color: { type: String, required: true },
553
- locale: { type: String, required: true },
554
- firstDayOfWeek: { type: Number, required: true },
555
- double: { type: Boolean, required: true },
556
- minDate: { type: String, default: void 0 },
557
- maxDate: { type: String, default: void 0 },
558
- disabledWeekly: { type: Array, required: true },
559
- disabledDates: { type: Array, required: true },
560
- shortcuts: {
561
- type: Array,
562
- required: true
563
- },
564
- noShortcuts: { type: Boolean, required: true },
565
- hasTime: { type: Boolean, required: true },
566
- shortcut: { type: String, default: void 0 },
567
- disabled: { type: Boolean, required: true }
568
- },
569
- emits: ["update:model-value", "update:calendar-date"],
570
- setup(__props, { emit: __emit }) {
571
- const MazPickerMonthSwitcher = defineAsyncComponent(() => import("./MazPickerMonthSwitcher-913c6e2c.mjs"));
572
- const MazPickerYearSwitcher = defineAsyncComponent(() => import("./MazPickerYearSwitcher-dd4fa89c.mjs"));
573
- const MazPickerShortcuts = defineAsyncComponent(() => import("./MazPickerShortcuts-c6fabfc6.mjs"));
574
- const props = __props;
575
- const emits = __emit;
576
- const hoverredDay = ref();
577
- const isRangeMode = computed(() => props.modelValue && typeof props.modelValue === "object");
578
- const hasShortcuts = computed(
579
- () => !props.noShortcuts && props.shortcuts.length > 0 && isRangeMode.value
580
- );
581
- const monthSwitcherOpen = ref(false);
582
- const yearSwitcherOpen = ref(false);
583
- const currentValue = computed({
584
- get: () => props.modelValue,
585
- set: (value) => emits("update:model-value", value)
586
- });
587
- const months = computed(() => Array.from({ length: props.double ? 2 : 1 }, (_v, i) => i));
588
- const calendarDate = computed({
589
- get: () => props.calendarDate,
590
- set: (calendarDate2) => emits("update:calendar-date", calendarDate2)
591
- });
592
- return (_ctx, _cache) => {
593
- return openBlock(), createElementBlock("div", _hoisted_1, [
594
- hasShortcuts.value ? (openBlock(), createBlock(unref(MazPickerShortcuts), {
595
- key: 0,
596
- modelValue: currentValue.value,
597
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentValue.value = $event),
598
- color: __props.color,
599
- shortcuts: __props.shortcuts,
600
- shortcut: __props.shortcut,
601
- double: __props.double,
602
- disabled: __props.disabled
603
- }, null, 8, ["modelValue", "color", "shortcuts", "shortcut", "double", "disabled"])) : createCommentVNode("v-if", true),
604
- createElementVNode(
605
- "div",
606
- {
607
- class: normalizeClass(["maz-picker-calendar__main", { "--has-double": __props.double }])
608
- },
609
- [
610
- createVNode(MazPickerCalendarSwitcher, {
611
- "calendar-date": calendarDate.value,
612
- "onUpdate:calendarDate": _cache[1] || (_cache[1] = ($event) => calendarDate.value = $event),
613
- locale: __props.locale,
614
- double: __props.double,
615
- onOpenMonthSwitcher: _cache[2] || (_cache[2] = ($event) => monthSwitcherOpen.value = true),
616
- onOpenYearSwitcher: _cache[3] || (_cache[3] = ($event) => yearSwitcherOpen.value = true)
617
- }, null, 8, ["calendar-date", "locale", "double"]),
618
- createVNode(Transition, { name: "maz-picker-slide" }, {
619
- default: withCtx(() => [
620
- monthSwitcherOpen.value ? (openBlock(), createBlock(unref(MazPickerMonthSwitcher), {
621
- key: 0,
622
- "calendar-date": calendarDate.value,
623
- "onUpdate:calendarDate": _cache[4] || (_cache[4] = ($event) => calendarDate.value = $event),
624
- color: __props.color,
625
- double: __props.double,
626
- locale: __props.locale,
627
- onClose: _cache[5] || (_cache[5] = ($event) => monthSwitcherOpen.value = false)
628
- }, null, 8, ["calendar-date", "color", "double", "locale"])) : createCommentVNode("v-if", true)
629
- ]),
630
- _: 1
631
- /* STABLE */
632
- }),
633
- createVNode(Transition, { name: "maz-picker-slide" }, {
634
- default: withCtx(() => [
635
- yearSwitcherOpen.value ? (openBlock(), createBlock(unref(MazPickerYearSwitcher), {
636
- key: 0,
637
- "calendar-date": calendarDate.value,
638
- "onUpdate:calendarDate": _cache[6] || (_cache[6] = ($event) => calendarDate.value = $event),
639
- color: __props.color,
640
- locale: __props.locale,
641
- onClose: _cache[7] || (_cache[7] = ($event) => yearSwitcherOpen.value = false)
642
- }, null, 8, ["calendar-date", "color", "locale"])) : createCommentVNode("v-if", true)
643
- ]),
644
- _: 1
645
- /* STABLE */
646
- }),
647
- createElementVNode("div", _hoisted_2, [
648
- (openBlock(true), createElementBlock(
649
- Fragment,
650
- null,
651
- renderList(months.value, (month) => {
652
- return openBlock(), createBlock(MazPickerCalendarMonth, {
653
- key: month,
654
- modelValue: currentValue.value,
655
- "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => currentValue.value = $event),
656
- "hoverred-day": hoverredDay.value,
657
- "onUpdate:hoverredDay": _cache[9] || (_cache[9] = ($event) => hoverredDay.value = $event),
658
- "calendar-date": calendarDate.value,
659
- locale: __props.locale,
660
- "has-time": __props.hasTime,
661
- color: __props.color,
662
- "offset-month": month,
663
- "first-day-of-week": __props.firstDayOfWeek,
664
- "min-date": __props.minDate,
665
- "max-date": __props.maxDate,
666
- disabled: __props.disabled,
667
- "disabled-weekly": __props.disabledWeekly,
668
- "disabled-dates": __props.disabledDates
669
- }, null, 8, ["modelValue", "hoverred-day", "calendar-date", "locale", "has-time", "color", "offset-month", "first-day-of-week", "min-date", "max-date", "disabled", "disabled-weekly", "disabled-dates"]);
670
- }),
671
- 128
672
- /* KEYED_FRAGMENT */
673
- ))
674
- ])
675
- ],
676
- 2
677
- /* CLASS */
678
- )
679
- ]);
680
- };
681
- }
682
- });
683
- const MazPickerCalendar_vue_vue_type_style_index_0_scoped_dd9f0175_lang = "";
684
- const MazPickerCalendar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dd9f0175"]]);
685
- const MazPickerCalendar$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: MazPickerCalendar }, Symbol.toStringTag, { value: "Module" }));
686
- export {
687
- ChevronLeftIcon as C,
688
- MazPickerCalendar$1 as M
689
- };