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
@@ -0,0 +1,345 @@
1
+ import "../assets/MazDropdown.css";
2
+ import { defineComponent as N, defineAsyncComponent as S, useAttrs as V, useSlots as P, onBeforeMount as R, computed as r, openBlock as i, createBlock as w, resolveDynamicComponent as T, mergeProps as F, withCtx as I, createElementBlock as y, normalizeClass as z, renderSlot as g, unref as u, createCommentVNode as m, createElementVNode as j, getCurrentInstance as q, ref as A, watch as E, createVNode as L, withModifiers as O, Transition as H, Fragment as U, renderList as x, createTextVNode as K, toDisplayString as G } from "vue";
3
+ const J = /* @__PURE__ */ N({
4
+ __name: "MazBtn",
5
+ props: {
6
+ variant: {
7
+ type: String,
8
+ default: "button",
9
+ validator: (n) => ["button", "link"].includes(n)
10
+ },
11
+ size: {
12
+ type: String,
13
+ default: "md",
14
+ validator: (n) => ["mini", "xs", "sm", "md", "lg", "xl"].includes(n)
15
+ },
16
+ color: {
17
+ type: String,
18
+ default: "primary"
19
+ },
20
+ type: {
21
+ type: String,
22
+ default: "button",
23
+ validator: (n) => ["button", "submit", "reset"].includes(n)
24
+ },
25
+ rounded: { type: Boolean, default: !1 },
26
+ noRounded: { type: Boolean, default: !1 },
27
+ outline: { type: Boolean, default: !1 },
28
+ pastel: { type: Boolean, default: !1 },
29
+ block: { type: Boolean, default: !1 },
30
+ noUnderline: { type: Boolean, default: !1 },
31
+ noLeading: { type: Boolean, default: !1 },
32
+ loading: { type: Boolean, default: !1 },
33
+ disabled: { type: Boolean, default: !1 },
34
+ fab: { type: Boolean, default: !1 },
35
+ icon: { type: String, default: void 0 },
36
+ leftIcon: { type: String, default: void 0 },
37
+ rightIcon: { type: String, default: void 0 },
38
+ noPadding: { type: Boolean, default: !1 },
39
+ noElevation: { type: Boolean, default: !1 }
40
+ },
41
+ setup(n) {
42
+ const s = S(() => import("./MazSpinner-4c02cfd2.mjs")), a = S(() => import("./MazIcon-52a76873.mjs")), { href: p, to: k } = V(), d = P(), t = n;
43
+ R(() => {
44
+ t.icon && !t.fab && console.error('[maz-ui](MazBtn) the prop "icon" must be used only with "fab" props');
45
+ });
46
+ const $ = r(() => p ? "a" : k ? "router-link" : "button"), f = r(
47
+ () => t.pastel ? `--${t.color}-pastel` : t.outline ? `--${t.color}-outline` : `--${t.color}`
48
+ ), c = r(
49
+ () => (t.loading || t.disabled) && $.value === "button"
50
+ ), D = r(() => c.value ? "--cursor-default" : "--cursor-pointer"), h = r(() => `--is-${t.variant}`), b = r(() => t.loading && t.variant === "button"), B = r(() => !!d["left-icon"] || t.leftIcon), C = r(() => !!d["right-icon"] || t.rightIcon), e = r(() => B.value || C.value), l = r(() => t.fab && t.icon), o = r(() => $.value === "button" ? t.type : void 0);
51
+ return (v, M) => (i(), w(T($.value), F(v.$attrs, {
52
+ disabled: c.value,
53
+ class: ["m-btn", [
54
+ `--${n.size}`,
55
+ f.value,
56
+ D.value,
57
+ h.value,
58
+ {
59
+ "--block": n.block,
60
+ "--no-underline": n.noUnderline,
61
+ "--no-leading": n.noLeading,
62
+ "--fab": n.fab,
63
+ "--loading": n.loading,
64
+ "--disabled": c.value,
65
+ "--icon": e.value,
66
+ "--rounded": n.rounded,
67
+ "--no-rounded": n.noRounded,
68
+ "--no-padding": n.noPadding,
69
+ "--no-elevation": n.noElevation
70
+ }
71
+ ]],
72
+ type: o.value
73
+ }), {
74
+ default: I(() => [
75
+ B.value ? (i(), y(
76
+ "div",
77
+ {
78
+ key: 0,
79
+ class: z(["m-btn__icon-left maz-flex maz-flex-center", { "maz-invisible": b.value }])
80
+ },
81
+ [
82
+ g(v.$slots, "left-icon", {}, () => [
83
+ n.leftIcon ? (i(), w(u(a), {
84
+ key: 0,
85
+ name: n.leftIcon
86
+ }, null, 8, ["name"])) : m("v-if", !0)
87
+ ], !0)
88
+ ],
89
+ 2
90
+ /* CLASS */
91
+ )) : m("v-if", !0),
92
+ l.value ? (i(), y(
93
+ "div",
94
+ {
95
+ key: 1,
96
+ class: z(["m-btn__icon maz-flex maz-flex-center", { "maz-invisible": b.value }])
97
+ },
98
+ [
99
+ g(v.$slots, "icon", {}, () => [
100
+ n.icon ? (i(), w(u(a), {
101
+ key: 0,
102
+ name: n.icon
103
+ }, null, 8, ["name"])) : m("v-if", !0)
104
+ ], !0)
105
+ ],
106
+ 2
107
+ /* CLASS */
108
+ )) : m("v-if", !0),
109
+ j(
110
+ "span",
111
+ {
112
+ class: z(["maz-flex maz-flex-center", { "maz-invisible": b.value }])
113
+ },
114
+ [
115
+ g(v.$slots, "default", {}, void 0, !0)
116
+ ],
117
+ 2
118
+ /* CLASS */
119
+ ),
120
+ C.value ? (i(), y(
121
+ "div",
122
+ {
123
+ key: 2,
124
+ class: z(["m-btn__icon-right maz-flex maz-flex-center", { "maz-invisible": b.value }])
125
+ },
126
+ [
127
+ g(v.$slots, "right-icon", {}, () => [
128
+ n.rightIcon ? (i(), w(u(a), {
129
+ key: 0,
130
+ name: n.rightIcon
131
+ }, null, 8, ["name"])) : m("v-if", !0)
132
+ ], !0)
133
+ ],
134
+ 2
135
+ /* CLASS */
136
+ )) : m("v-if", !0),
137
+ b.value ? (i(), w(u(s), {
138
+ key: 3,
139
+ size: "2em",
140
+ color: n.color,
141
+ class: "maz-absolute"
142
+ }, null, 8, ["color"])) : m("v-if", !0)
143
+ ]),
144
+ _: 3
145
+ /* FORWARDED */
146
+ }, 16, ["disabled", "class", "type"]));
147
+ }
148
+ });
149
+ const Q = (n, s) => {
150
+ const a = n.__vccOpts || n;
151
+ for (const [p, k] of s)
152
+ a[p] = k;
153
+ return a;
154
+ }, W = /* @__PURE__ */ Q(J, [["__scopeId", "data-v-06ad874b"]]), X = ({
155
+ componentName: n,
156
+ instance: s,
157
+ providedId: a
158
+ }) => r(() => a ?? `${n}-${s == null ? void 0 : s.uid}`);
159
+ function Y(n, s) {
160
+ let a;
161
+ return function(...p) {
162
+ clearTimeout(a), a = setTimeout(() => {
163
+ n.apply(this, p);
164
+ }, s);
165
+ };
166
+ }
167
+ const Z = ["id"], ne = /* @__PURE__ */ N({
168
+ __name: "MazDropdown",
169
+ props: {
170
+ items: {},
171
+ open: { type: Boolean },
172
+ id: { default: "maz-dropdown" },
173
+ trigger: { default: "both" },
174
+ color: { default: "transparent" },
175
+ position: { default: "bottom left" },
176
+ noCloseOnClick: { type: Boolean },
177
+ disabled: { type: Boolean }
178
+ },
179
+ emits: [
180
+ /**
181
+ * emitted when a menu item is clicked
182
+ */
183
+ "menuitem-clicked",
184
+ /**
185
+ * Triggers when the number changes
186
+ *
187
+ * @property {boolean} open new value
188
+ */
189
+ "update:open"
190
+ ],
191
+ setup(n, { emit: s }) {
192
+ const a = n, p = s, k = X({
193
+ componentName: "MazCheckbox",
194
+ instance: q(),
195
+ providedId: a.id
196
+ }), d = A(a.open), t = A();
197
+ function $() {
198
+ f(!d.value);
199
+ }
200
+ const f = (e) => {
201
+ a.disabled || (d.value = e, p("update:open", e));
202
+ }, c = Y((e) => {
203
+ f(e);
204
+ }, 200);
205
+ async function D(e, l) {
206
+ var o;
207
+ p("menuitem-clicked", l), await ((o = e.action) == null ? void 0 : o.call(e)), h();
208
+ }
209
+ function h() {
210
+ a.noCloseOnClick === !1 && f(!1);
211
+ }
212
+ function b(e) {
213
+ e.key === "Escape" ? (e.preventDefault(), f(!1)) : ["ArrowDown", "ArrowUp"].includes(e.key) ? C(e) : e.key === "Enter" && typeof t.value == "number" && (e.preventDefault(), document.querySelectorAll(`#${k.value} .menuitem`)[t.value].click(), h());
214
+ }
215
+ function B(e) {
216
+ ["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && d.value === !1 && (e.preventDefault(), f(!0));
217
+ }
218
+ function C(e) {
219
+ var v;
220
+ e.preventDefault();
221
+ const l = e.key;
222
+ d.value || f(!0);
223
+ const o = (v = a.items) == null ? void 0 : v.length;
224
+ o && (typeof t.value == "number" ? t.value === o - 1 && l === "ArrowDown" ? t.value = 0 : t.value === 0 && l === "ArrowUp" ? t.value = o - 1 : t.value = l === "ArrowDown" ? t.value + 1 : t.value - 1 : t.value = l === "ArrowDown" ? 0 : o - 1);
225
+ }
226
+ return E(
227
+ () => d.value,
228
+ (e) => {
229
+ e ? document.addEventListener("keydown", b) : document.removeEventListener("keydown", b), t.value = void 0;
230
+ }
231
+ ), E(
232
+ () => a.open,
233
+ (e) => f(e)
234
+ ), (e, l) => (i(), y("div", {
235
+ id: u(k),
236
+ class: "m-dropdown"
237
+ }, [
238
+ L(W, F({
239
+ color: e.color,
240
+ size: "md",
241
+ "aria-expanded": d.value,
242
+ "aria-haspopup": "menu",
243
+ disabled: e.disabled
244
+ }, e.$attrs, {
245
+ onClick: l[0] || (l[0] = O((o) => ["click"].includes(e.trigger) ? $() : void 0, ["stop"])),
246
+ onFocus: l[1] || (l[1] = (o) => ["hover", "both"].includes(e.trigger) ? f(!0) : void 0),
247
+ onBlur: l[2] || (l[2] = (o) => u(c)(!1)),
248
+ onKeydown: B,
249
+ onMouseenter: l[3] || (l[3] = (o) => ["hover", "both"].includes(e.trigger) ? d.value === !1 ? f(!0) : u(c)(!0) : void 0),
250
+ onMouseleave: l[4] || (l[4] = (o) => ["hover", "both"].includes(e.trigger) ? u(c)(!1) : void 0)
251
+ }), {
252
+ default: I(() => [
253
+ m(" @slot Menu Label "),
254
+ g(e.$slots, "default")
255
+ ]),
256
+ _: 3
257
+ /* FORWARDED */
258
+ }, 16, ["color", "aria-expanded", "disabled"]),
259
+ L(H, { name: "maz-scale-fade" }, {
260
+ default: I(() => [
261
+ d.value ? (i(), y(
262
+ "div",
263
+ {
264
+ key: 0,
265
+ role: "menu",
266
+ "aria-label": "Menu",
267
+ class: z(["menu", {
268
+ "--top": e.position.includes("top"),
269
+ "--left": e.position.includes("left"),
270
+ "--right": e.position.includes("right"),
271
+ "--bottom": e.position.includes("bottom")
272
+ }]),
273
+ tabindex: "-1",
274
+ onFocus: l[5] || (l[5] = (o) => u(c)(!0)),
275
+ onBlur: l[6] || (l[6] = (o) => u(c)(!1)),
276
+ onMouseenter: l[7] || (l[7] = (o) => ["hover", "both"].includes(e.trigger) ? u(c)(!0) : void 0),
277
+ onMouseleave: l[8] || (l[8] = (o) => ["hover", "both"].includes(e.trigger) ? u(c)(!1) : void 0)
278
+ },
279
+ [
280
+ (i(!0), y(
281
+ U,
282
+ null,
283
+ x(e.items, (o, v) => (i(), y(
284
+ U,
285
+ null,
286
+ [
287
+ m(`
288
+ @slot Custom menu item
289
+ @binding {Object} item - menu item
290
+ `),
291
+ g(e.$slots, "menuitem", { item: o }, () => [
292
+ (i(), w(T(o.to ? "router-link" : o.action ? "button" : "a"), {
293
+ key: v,
294
+ href: o.href,
295
+ tabindex: "-1",
296
+ target: o.href ? o.target ?? "_self" : void 0,
297
+ type: o.action ? "button" : void 0,
298
+ class: z([[
299
+ {
300
+ "--is-keyboard-selected": t.value === v
301
+ },
302
+ o.class
303
+ ], "menuitem"]),
304
+ to: o.to,
305
+ onClick: O((M) => o.action ? D(o, M) : h(), ["stop"])
306
+ }, {
307
+ default: I(() => [
308
+ m(`
309
+ @slot Custom menu item label
310
+ @binding {Object} item - menu item
311
+ `),
312
+ g(e.$slots, "menuitem-label", { item: o }, () => [
313
+ K(
314
+ G(o.label),
315
+ 1
316
+ /* TEXT */
317
+ )
318
+ ])
319
+ ]),
320
+ _: 2
321
+ /* DYNAMIC */
322
+ }, 1032, ["href", "target", "type", "class", "to", "onClick"]))
323
+ ])
324
+ ],
325
+ 64
326
+ /* STABLE_FRAGMENT */
327
+ ))),
328
+ 256
329
+ /* UNKEYED_FRAGMENT */
330
+ ))
331
+ ],
332
+ 34
333
+ /* CLASS, HYDRATE_EVENTS */
334
+ )) : m("v-if", !0)
335
+ ]),
336
+ _: 3
337
+ /* FORWARDED */
338
+ })
339
+ ], 8, Z));
340
+ }
341
+ });
342
+ export {
343
+ Q as _,
344
+ ne as a
345
+ };
@@ -0,0 +1,242 @@
1
+ import "../assets/MazDropzone.css";
2
+ import { defineAsyncComponent as L, defineComponent as H, ref as v, computed as Q, onMounted as V, onBeforeUnmount as j, resolveComponent as I, openBlock as h, createElementBlock as N, normalizeStyle as T, renderSlot as f, createElementVNode as i, toDisplayString as y, createBlock as W } from "vue";
3
+ const J = L(() => import("./MazSpinner-08ee440b.mjs")), G = `<div class="dz-preview dz-file-preview maz-flex-1">
4
+ <div class="dz-image">
5
+ <div data-dz-thumbnail-bg></div>
6
+ </div>
7
+ <div class="dz-details">
8
+ <div class="dz-filename"><span data-dz-name></span></div>
9
+ <div class="dz-size"><span data-dz-size></span></div>
10
+ </div>
11
+ <div class="dz-progress">
12
+ <span class="dz-upload" data-dz-uploadprogress></span>
13
+ </div>
14
+ <div class="dz-success-mark">
15
+ <svg class="material-icons" xmlns="http://www.w3.org/2000/svg" height="6rem" viewBox="0 0 24 24" width="6rem" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></svg>
16
+ </div>
17
+ <div class="dz-error-mark">
18
+ <svg class="material-icons" xmlns="http://www.w3.org/2000/svg" height="6rem" viewBox="0 0 24 24" width="6rem" fill="currentColor"><path d="M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></svg>
19
+ </div>
20
+ </div>`, K = H({
21
+ name: "MazDropzone",
22
+ components: { MazSpinner: J },
23
+ props: {
24
+ options: { type: Object, required: !0 },
25
+ height: {
26
+ type: [Number, String],
27
+ default: "245px"
28
+ },
29
+ width: {
30
+ type: [Number, String],
31
+ default: "100%"
32
+ },
33
+ noDestroyOnUnmount: { type: Boolean, default: !1 }
34
+ },
35
+ emits: [
36
+ "thumbnail",
37
+ "error",
38
+ "drop",
39
+ "dragstart",
40
+ "dragend",
41
+ "dragenter",
42
+ "dragover",
43
+ "dragleave",
44
+ "paste",
45
+ "addedfile",
46
+ "addedfiles",
47
+ "removedfile",
48
+ "success",
49
+ "processing",
50
+ "processingmultiple",
51
+ "uploadprogress",
52
+ "totaluploadprogress",
53
+ "sending",
54
+ "sendingmultiple",
55
+ "canceled",
56
+ "canceledmultiple",
57
+ "complete",
58
+ "completemultiple",
59
+ "maxfilesexceeded",
60
+ "maxfilesreached",
61
+ "queuecomplete",
62
+ "reset"
63
+ ],
64
+ setup(n, { emit: t }) {
65
+ const r = v(), c = v(!1);
66
+ let e;
67
+ const m = v(), g = Q(() => ({
68
+ width: typeof n.width == "number" ? `${n.width}px` : n.width,
69
+ height: typeof n.height == "number" ? `${n.height}px` : n.height
70
+ })), p = (s, l) => {
71
+ t("thumbnail", { file: s, dataUrl: l });
72
+ let o;
73
+ s.previewElement.classList.remove("dz-file-preview"), s.previewElement.querySelectorAll("[data-dz-thumbnail-bg]").forEach((d) => {
74
+ o = d, o.alt = s.name, o.style.backgroundImage = `url('${l}')`;
75
+ }), s.status === "success" && e.emit("complete", s);
76
+ }, u = (s, l, o) => {
77
+ t("error", { file: s, message: l, xhr: o }), e.options.autoRemoveOnError && setTimeout(() => e.removeFile(s), 3e3);
78
+ }, w = (s, l, o) => {
79
+ t("error", { files: s, message: l, xhr: o }), e.options.autoRemoveOnError && setTimeout(() => {
80
+ for (const a of s)
81
+ e.removeFile(a);
82
+ }, 3e3);
83
+ };
84
+ V(async () => {
85
+ const s = {
86
+ parallelUploads: n.options.maxFiles,
87
+ previewTemplate: G,
88
+ addRemoveLinks: !0
89
+ };
90
+ if (r.value) {
91
+ const { default: l } = await import("dropzone");
92
+ e = new l(r.value, {
93
+ ...s,
94
+ ...n.options
95
+ }), e && (m.value = e.options, c.value = !0, e.on("thumbnail", p), e.on("error", u), e.on("errormultiple", w), e.on("drop", (o) => t("drop", o)), e.on("dragstart", (o) => t("dragstart", o)), e.on("dragend", (o) => t("dragend", o)), e.on("dragenter", (o) => t("dragenter", o)), e.on("dragover", (o) => t("dragover", o)), e.on("dragleave", (o) => t("dragleave", o)), e.on("paste", (o) => t("paste", o)), e.on("addedfile", (o) => t("addedfile", o)), e.on("addedfiles", (o) => t("addedfiles", o)), e.on("removedfile", (o) => t("removedfile", o)), e.on(
96
+ "success",
97
+ (o, a) => t("success", { file: o, response: a })
98
+ ), e.on(
99
+ "successmultiple",
100
+ (o, a) => t("success", { files: o, responseText: a })
101
+ ), e.on("processing", (o) => t("processing", o)), e.on(
102
+ "processingmultiple",
103
+ (o) => t("processingmultiple", o)
104
+ ), e.on(
105
+ "uploadprogress",
106
+ (o, a, d) => t("uploadprogress", { file: o, progress: a, bytesSent: d })
107
+ ), e.on(
108
+ "totaluploadprogress",
109
+ (o, a, d) => t("totaluploadprogress", {
110
+ totalProgress: o,
111
+ totalBytes: a,
112
+ totalBytesSent: d
113
+ })
114
+ ), e.on(
115
+ "sending",
116
+ (o, a, d) => t("sending", { file: o, xhr: a, formData: d })
117
+ ), e.on(
118
+ "sendingmultiple",
119
+ (o, a, d) => t("sendingmultiple", { files: o, xhr: a, formData: d })
120
+ ), e.on("canceled", (o) => t("canceled", o)), e.on(
121
+ "canceledmultiple",
122
+ (o) => t("canceledmultiple", o)
123
+ ), e.on("complete", (o) => t("complete", o)), e.on(
124
+ "completemultiple",
125
+ (o) => t("completemultiple", o)
126
+ ), e.on("maxfilesexceeded", (o) => t("maxfilesexceeded", o)), e.on(
127
+ "maxfilesreached",
128
+ (o) => t("maxfilesreached", o)
129
+ ), e.on("queuecomplete", () => {
130
+ z().every((o) => o.manuallyAdded) || t("queuecomplete");
131
+ }), e.on("reset", () => t("reset")));
132
+ }
133
+ });
134
+ const F = (s, l) => (e.options = {
135
+ ...e.options,
136
+ [s]: l
137
+ }, e.options), _ = (s, l) => {
138
+ e.emit("addedfile", s), e.emit("thumbnail", s, l), e.files.push(s);
139
+ }, b = (s) => e.removeAllFiles(s), x = () => e.processQueue(), M = () => e.destroy(), S = () => e.disable(), A = () => e.enable(), O = (s, l) => e.accept(s, l), k = (s) => e.addFile(s), B = (s, l, o, a, d) => e.resizeImage(s, l, o, a, d), C = (s) => e.cancelUpload(s), z = () => e.getAcceptedFiles(), E = () => e.getRejectedFiles(), D = () => e.getFilesWithStatus(status), $ = () => e.getQueuedFiles(), R = () => e.getUploadingFiles(), U = () => e.getAddedFiles(), q = () => e.getActiveFiles();
140
+ return j(() => {
141
+ n.noDestroyOnUnmount || e.destroy();
142
+ }), {
143
+ ButtonElement: r,
144
+ dropzoneReady: c,
145
+ dropzoneOptions: m,
146
+ dropzoneStyle: g,
147
+ setOption: F,
148
+ manuallyAddFile: _,
149
+ removeAllFiles: b,
150
+ processQueue: x,
151
+ destroy: M,
152
+ disable: S,
153
+ enable: A,
154
+ accept: O,
155
+ addFile: k,
156
+ resizeImage: B,
157
+ cancelUpload: C,
158
+ getAcceptedFiles: z,
159
+ getRejectedFiles: E,
160
+ getFilesWithStatus: D,
161
+ getQueuedFiles: $,
162
+ getUploadingFiles: R,
163
+ getAddedFiles: U,
164
+ getActiveFiles: q
165
+ };
166
+ }
167
+ });
168
+ const P = (n, t) => {
169
+ const r = n.__vccOpts || n;
170
+ for (const [c, e] of t)
171
+ r[c] = e;
172
+ return r;
173
+ }, X = { class: "dz-message" }, Y = /* @__PURE__ */ i(
174
+ "svg",
175
+ {
176
+ xmlns: "http://www.w3.org/2000/svg",
177
+ height: "2em",
178
+ width: "2em",
179
+ viewBox: "0 0 24 24",
180
+ fill: "currentColor",
181
+ class: "maz-dropzone__main-icon maz-text-normal",
182
+ "aria-hidden": "true"
183
+ },
184
+ [
185
+ /* @__PURE__ */ i("path", {
186
+ d: "M0 0h24v24H0V0z",
187
+ fill: "none"
188
+ }),
189
+ /* @__PURE__ */ i("path", { d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z" })
190
+ ],
191
+ -1
192
+ /* HOISTED */
193
+ ), Z = { class: "maz-my-2 maz-text-normal" }, ee = { class: "maz-my-0 maz-text-muted" };
194
+ function oe(n, t, r, c, e, m) {
195
+ const g = I("MazSpinner");
196
+ return h(), N(
197
+ "button",
198
+ {
199
+ ref: "ButtonElement",
200
+ type: "button",
201
+ name: "maz-dropzone",
202
+ class: "maz-dropzone",
203
+ style: T([n.dropzoneStyle])
204
+ },
205
+ [
206
+ n.dropzoneReady ? f(n.$slots, "default", {
207
+ key: 0,
208
+ options: n.dropzoneOptions
209
+ }, () => {
210
+ var p, u;
211
+ return [
212
+ i("div", X, [
213
+ f(n.$slots, "icon", {}, () => [
214
+ Y
215
+ ]),
216
+ i(
217
+ "p",
218
+ Z,
219
+ y((p = n.dropzoneOptions) == null ? void 0 : p.dictDefaultMessage),
220
+ 1
221
+ /* TEXT */
222
+ ),
223
+ i(
224
+ "p",
225
+ ee,
226
+ y((u = n.dropzoneOptions) == null ? void 0 : u.dictFilesDescriptions),
227
+ 1
228
+ /* TEXT */
229
+ )
230
+ ])
231
+ ];
232
+ }) : (h(), W(g, { key: 1 }))
233
+ ],
234
+ 4
235
+ /* STYLE */
236
+ );
237
+ }
238
+ const ne = /* @__PURE__ */ P(K, [["render", oe]]);
239
+ export {
240
+ ne as M,
241
+ P as _
242
+ };