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,216 +0,0 @@
1
- import "../assets/MazPickerHeader.css";
2
- import { defineComponent, computed, ref, watch, openBlock, createElementBlock, normalizeClass, createVNode, TransitionGroup, withCtx, Fragment, renderList, toDisplayString, createCommentVNode } from "vue";
3
- import { a as date, c as capitalize, d as dayjs, _ as _export_sfc } from "./MazPicker-50fc11d1.mjs";
4
- const _hoisted_1 = {
5
- key: 0,
6
- class: "m-picker-header__date"
7
- };
8
- const _sfc_main = /* @__PURE__ */ defineComponent({
9
- __name: "MazPickerHeader",
10
- props: {
11
- modelValue: {
12
- type: [String, Object],
13
- default: void 0
14
- },
15
- color: { type: String, required: true },
16
- locale: { type: String, required: true },
17
- noShortcuts: { type: Boolean, required: true },
18
- double: { type: Boolean, required: true },
19
- hasDate: { type: Boolean, required: true },
20
- hasTime: { type: Boolean, required: true },
21
- formatterOptions: {
22
- type: Object,
23
- required: true
24
- },
25
- calendarDate: { type: String, required: true }
26
- },
27
- setup(__props) {
28
- const props = __props;
29
- const refDate = computed(
30
- () => {
31
- var _a;
32
- return typeof props.modelValue === "string" ? props.modelValue : (_a = props.modelValue) == null ? void 0 : _a.start;
33
- }
34
- );
35
- const transitionName = ref("maz-slidevnext");
36
- const year = computed(() => {
37
- if (props.modelValue && typeof props.modelValue === "object") {
38
- return `${props.modelValue.start ? date(props.modelValue.start, props.locale, {
39
- year: "numeric",
40
- timeZone: props.formatterOptions.timeZone
41
- }) : "..."} - ${props.modelValue.end ? date(props.modelValue.end, props.locale, {
42
- year: "numeric",
43
- timeZone: props.formatterOptions.timeZone
44
- }) : "..."}`;
45
- } else if (typeof props.modelValue === "string") {
46
- return date(props.modelValue, props.locale, {
47
- year: "numeric",
48
- timeZone: props.formatterOptions.timeZone
49
- });
50
- }
51
- return "-";
52
- });
53
- const yearArray = computed(() => props.hasDate ? [year.value] : void 0);
54
- const dateString = computed(() => {
55
- if (props.modelValue && typeof props.modelValue === "object" && (props.modelValue.start || props.modelValue.end)) {
56
- const dateOption = props.noShortcuts && !props.double ? "short" : "long";
57
- return `${props.modelValue.start ? capitalize(
58
- date(props.modelValue.start, props.locale, {
59
- weekday: dateOption,
60
- month: dateOption,
61
- day: "numeric",
62
- timeZone: props.formatterOptions.timeZone
63
- })
64
- ) : "..."} - ${props.modelValue.end ? capitalize(
65
- date(props.modelValue.end, props.locale, {
66
- weekday: dateOption,
67
- month: dateOption,
68
- day: "numeric",
69
- timeZone: props.formatterOptions.timeZone
70
- })
71
- ) : "..."}`;
72
- } else if (typeof props.modelValue === "string") {
73
- return capitalize(
74
- date(props.modelValue, props.locale, {
75
- weekday: "long",
76
- month: "long",
77
- day: "numeric",
78
- timeZone: props.formatterOptions.timeZone
79
- })
80
- );
81
- }
82
- return "-";
83
- });
84
- const dateStringArray = computed(() => props.hasDate ? [dateString.value] : void 0);
85
- const timeValue = computed(() => {
86
- return refDate.value ? date(refDate.value, props.locale, {
87
- timeStyle: "short",
88
- timeZone: props.formatterOptions.timeZone,
89
- hour12: props.formatterOptions.hour12
90
- }) : void 0;
91
- });
92
- const timeArray = computed(() => props.hasTime ? [timeValue.value] : void 0);
93
- watch(
94
- () => props.modelValue,
95
- (modelValue, oldModelValue) => {
96
- const currentValue = typeof modelValue === "object" ? modelValue.start : modelValue;
97
- const oldValue = typeof oldModelValue === "object" ? oldModelValue.start : oldModelValue;
98
- transitionName.value = dayjs(currentValue).isAfter(oldValue, "date") || dayjs(currentValue).isSame(oldValue, "date") ? "maz-slidevnext" : "maz-slidevprev";
99
- }
100
- );
101
- return (_ctx, _cache) => {
102
- return openBlock(), createElementBlock(
103
- "div",
104
- {
105
- class: normalizeClass(["m-picker-header", [`--${__props.color}`]])
106
- },
107
- [
108
- __props.hasDate ? (openBlock(), createElementBlock("div", _hoisted_1, [
109
- createVNode(TransitionGroup, {
110
- name: transitionName.value,
111
- tag: "div",
112
- class: "m-picker-header__year-transition"
113
- }, {
114
- default: withCtx(() => [
115
- (openBlock(true), createElementBlock(
116
- Fragment,
117
- null,
118
- renderList(yearArray.value, (y, yi) => {
119
- return openBlock(), createElementBlock(
120
- "span",
121
- {
122
- key: `${y}-${yi}`,
123
- class: "m-picker-header__year-text"
124
- },
125
- toDisplayString(y),
126
- 1
127
- /* TEXT */
128
- );
129
- }),
130
- 128
131
- /* KEYED_FRAGMENT */
132
- ))
133
- ]),
134
- _: 1
135
- /* STABLE */
136
- }, 8, ["name"]),
137
- createVNode(TransitionGroup, {
138
- name: transitionName.value,
139
- tag: "div",
140
- class: "m-picker-header__date-transition"
141
- }, {
142
- default: withCtx(() => [
143
- (openBlock(true), createElementBlock(
144
- Fragment,
145
- null,
146
- renderList(dateStringArray.value, (d, di) => {
147
- return openBlock(), createElementBlock(
148
- "span",
149
- {
150
- key: `${d}-${di}`,
151
- class: "m-picker-header__date-text"
152
- },
153
- toDisplayString(d),
154
- 1
155
- /* TEXT */
156
- );
157
- }),
158
- 128
159
- /* KEYED_FRAGMENT */
160
- ))
161
- ]),
162
- _: 1
163
- /* STABLE */
164
- }, 8, ["name"])
165
- ])) : createCommentVNode("v-if", true),
166
- timeArray.value ? (openBlock(), createElementBlock(
167
- "div",
168
- {
169
- key: 1,
170
- class: normalizeClass(["m-picker-header__time", { "--has-date": __props.hasDate }])
171
- },
172
- [
173
- createVNode(TransitionGroup, {
174
- name: transitionName.value,
175
- tag: "div",
176
- class: "m-picker-header__time-transition"
177
- }, {
178
- default: withCtx(() => [
179
- (openBlock(true), createElementBlock(
180
- Fragment,
181
- null,
182
- renderList(timeArray.value, (t, ti) => {
183
- return openBlock(), createElementBlock(
184
- "span",
185
- {
186
- key: `${t}-${ti}`,
187
- class: "m-picker-header__time-text"
188
- },
189
- toDisplayString(t),
190
- 1
191
- /* TEXT */
192
- );
193
- }),
194
- 128
195
- /* KEYED_FRAGMENT */
196
- ))
197
- ]),
198
- _: 1
199
- /* STABLE */
200
- }, 8, ["name"])
201
- ],
202
- 2
203
- /* CLASS */
204
- )) : createCommentVNode("v-if", true)
205
- ],
206
- 2
207
- /* CLASS */
208
- );
209
- };
210
- }
211
- });
212
- const MazPickerHeader_vue_vue_type_style_index_0_scoped_fcf07ce1_lang = "";
213
- const MazPickerHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fcf07ce1"]]);
214
- export {
215
- MazPickerHeader as default
216
- };
@@ -1,110 +0,0 @@
1
- import "../assets/MazPickerMonthSwitcher.css";
2
- import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, createVNode, withModifiers, withCtx, unref, normalizeClass, Fragment, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
3
- import { d as dayjs, c as capitalize, a as date, i as isSameDate, _ as _export_sfc } from "./MazPicker-50fc11d1.mjs";
4
- import MazBtn from "./MazBtn-0e02f0da.mjs";
5
- import { X as XIcon } from "./x-mark-3b05101b.mjs";
6
- const _hoisted_1 = { class: "maz-picker-month-switcher" };
7
- const _hoisted_2 = { class: "maz-picker-month-switcher__header" };
8
- const _sfc_main = /* @__PURE__ */ defineComponent({
9
- __name: "MazPickerMonthSwitcher",
10
- props: {
11
- calendarDate: { type: String, required: true },
12
- color: { type: String, required: true },
13
- locale: { type: String, required: true },
14
- double: { type: Boolean, required: true }
15
- },
16
- emits: ["update:calendar-date", "close"],
17
- setup(__props, { emit: __emit }) {
18
- const props = __props;
19
- const emits = __emit;
20
- const months = computed(() => {
21
- return Array.from({ length: 12 }, (_v, i) => i).map((monthNumber) => {
22
- const monthDate = dayjs(props.calendarDate).set("month", monthNumber);
23
- return props.double ? {
24
- label: `${capitalize(
25
- date(monthDate.format(), props.locale, {
26
- month: "short"
27
- })
28
- )} - ${capitalize(
29
- date(monthDate.add(1, "month").format(), props.locale, {
30
- month: "short"
31
- })
32
- )}`,
33
- date: monthDate
34
- } : {
35
- label: capitalize(
36
- date(monthDate.format(), props.locale, {
37
- month: "long"
38
- })
39
- ),
40
- date: monthDate
41
- };
42
- });
43
- });
44
- const selectMonth = (date2) => {
45
- emits("update:calendar-date", date2.format());
46
- emits("close");
47
- };
48
- return (_ctx, _cache) => {
49
- return openBlock(), createElementBlock("div", _hoisted_1, [
50
- createElementVNode("div", _hoisted_2, [
51
- createVNode(MazBtn, {
52
- size: "xs",
53
- color: "transparent",
54
- type: "button",
55
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("close", $event), ["stop"]))
56
- }, {
57
- default: withCtx(() => [
58
- createVNode(unref(XIcon), { class: "maz-text-lg" })
59
- ]),
60
- _: 1
61
- /* STABLE */
62
- })
63
- ]),
64
- createElementVNode(
65
- "div",
66
- {
67
- class: normalizeClass(["maz-picker-month-switcher__main", { "--has-double": __props.double }])
68
- },
69
- [
70
- (openBlock(true), createElementBlock(
71
- Fragment,
72
- null,
73
- renderList(months.value, (month) => {
74
- return openBlock(), createBlock(MazBtn, {
75
- key: month.label,
76
- size: props.double ? "sm" : "xs",
77
- class: normalizeClass({
78
- "--is-selected": unref(isSameDate)(month.date, __props.calendarDate, "month")
79
- }),
80
- color: unref(isSameDate)(month.date, __props.calendarDate, "month") ? __props.color : "transparent",
81
- type: "button",
82
- onClick: withModifiers(($event) => selectMonth(month.date), ["stop"])
83
- }, {
84
- default: withCtx(() => [
85
- createTextVNode(
86
- toDisplayString(month.label),
87
- 1
88
- /* TEXT */
89
- )
90
- ]),
91
- _: 2
92
- /* DYNAMIC */
93
- }, 1032, ["size", "class", "color", "onClick"]);
94
- }),
95
- 128
96
- /* KEYED_FRAGMENT */
97
- ))
98
- ],
99
- 2
100
- /* CLASS */
101
- )
102
- ]);
103
- };
104
- }
105
- });
106
- const MazPickerMonthSwitcher_vue_vue_type_style_index_0_scoped_0730e711_lang = "";
107
- const MazPickerMonthSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0730e711"]]);
108
- export {
109
- MazPickerMonthSwitcher as default
110
- };
@@ -1,88 +0,0 @@
1
- import "../assets/MazPickerShortcuts.css";
2
- import { defineComponent, ref, watch, openBlock, createElementBlock, Fragment, renderList, createBlock, normalizeClass, withModifiers, withCtx, createTextVNode, toDisplayString } from "vue";
3
- import MazBtn from "./MazBtn-0e02f0da.mjs";
4
- import { _ as _export_sfc } from "./MazPicker-50fc11d1.mjs";
5
- const _hoisted_1 = { class: "maz-picker-shortcuts" };
6
- const _sfc_main = /* @__PURE__ */ defineComponent({
7
- __name: "MazPickerShortcuts",
8
- props: {
9
- color: { type: String, required: true },
10
- modelValue: {
11
- type: [String, Object],
12
- default: void 0
13
- },
14
- shortcuts: {
15
- type: Array,
16
- required: true
17
- },
18
- double: { type: Boolean, required: true },
19
- shortcut: { type: String, default: void 0 },
20
- disabled: { type: Boolean, required: true }
21
- },
22
- emits: ["update:model-value"],
23
- setup(__props, { emit: __emit }) {
24
- const props = __props;
25
- const emits = __emit;
26
- const selectedShortcut = ref(props.shortcut);
27
- const selectShortcut = (value, identifier) => {
28
- selectedShortcut.value = identifier;
29
- emits("update:model-value", value);
30
- };
31
- watch(
32
- () => props.modelValue,
33
- (value) => {
34
- const values = value;
35
- if (!(values == null ? void 0 : values.end)) {
36
- selectedShortcut.value = void 0;
37
- }
38
- }
39
- );
40
- watch(
41
- () => props.shortcut,
42
- (shortcut) => {
43
- const newShortcut = props.shortcuts.find(({ identifier }) => shortcut === identifier);
44
- if (newShortcut) {
45
- const { value, identifier } = newShortcut;
46
- selectShortcut(value, identifier);
47
- }
48
- },
49
- { immediate: true }
50
- );
51
- return (_ctx, _cache) => {
52
- return openBlock(), createElementBlock("div", _hoisted_1, [
53
- (openBlock(true), createElementBlock(
54
- Fragment,
55
- null,
56
- renderList(__props.shortcuts, ({ identifier, label, value }) => {
57
- return openBlock(), createBlock(MazBtn, {
58
- key: identifier,
59
- type: "button",
60
- size: "sm",
61
- disabled: __props.disabled,
62
- color: identifier === selectedShortcut.value ? props.color : "transparent",
63
- class: normalizeClass({ "--is-selected": identifier === selectedShortcut.value }),
64
- onClick: withModifiers(($event) => selectShortcut(value, identifier), ["stop"])
65
- }, {
66
- default: withCtx(() => [
67
- createTextVNode(
68
- toDisplayString(label),
69
- 1
70
- /* TEXT */
71
- )
72
- ]),
73
- _: 2
74
- /* DYNAMIC */
75
- }, 1032, ["disabled", "color", "class", "onClick"]);
76
- }),
77
- 128
78
- /* KEYED_FRAGMENT */
79
- ))
80
- ]);
81
- };
82
- }
83
- });
84
- const MazPickerShortcuts_vue_vue_type_style_index_0_scoped_e013a34a_lang = "";
85
- const MazPickerShortcuts = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e013a34a"]]);
86
- export {
87
- MazPickerShortcuts as default
88
- };