maz-ui 3.4.5 → 3.6.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 (176) hide show
  1. package/components/MazAvatar.d.ts +156 -149
  2. package/components/MazAvatar.mjs +656 -0
  3. package/components/MazAvatar.umd.js +2 -0
  4. package/components/MazBackdrop.d.ts +89 -89
  5. package/components/MazBackdrop.mjs +140 -0
  6. package/components/MazBackdrop.umd.js +2 -0
  7. package/components/MazBadge.d.ts +73 -68
  8. package/components/MazBadge.mjs +61 -0
  9. package/components/MazBadge.umd.js +2 -0
  10. package/components/MazBottomSheet.d.ts +36 -29
  11. package/components/MazBottomSheet.mjs +553 -0
  12. package/components/MazBottomSheet.umd.js +2 -0
  13. package/components/MazBtn.d.ts +178 -171
  14. package/components/MazBtn.mjs +371 -0
  15. package/components/MazBtn.umd.js +2 -0
  16. package/components/MazCard.d.ts +194 -183
  17. package/components/MazCard.mjs +1390 -0
  18. package/components/MazCard.umd.js +2 -0
  19. package/components/MazCarousel.d.ts +24 -16
  20. package/components/MazCarousel.mjs +469 -0
  21. package/components/MazCarousel.umd.js +2 -0
  22. package/components/MazChart/includes.d.ts +11 -11
  23. package/components/MazChart.d.ts +114 -114
  24. package/components/MazChart.mjs +135 -0
  25. package/components/MazChart.umd.js +2 -0
  26. package/components/MazCheckbox.d.ts +54 -49
  27. package/components/MazCheckbox.mjs +86 -0
  28. package/components/MazCheckbox.umd.js +2 -0
  29. package/components/MazDialog.d.ts +40 -29
  30. package/components/MazDialog.mjs +566 -0
  31. package/components/MazDialog.umd.js +2 -0
  32. package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +30 -30
  33. package/components/MazDialogPromise.d.ts +36 -28
  34. package/components/MazDialogPromise.mjs +692 -0
  35. package/components/MazDialogPromise.umd.js +2 -0
  36. package/components/MazDrawer.d.ts +69 -59
  37. package/components/MazDrawer.mjs +572 -0
  38. package/components/MazDrawer.umd.js +2 -0
  39. package/components/MazDropzone.d.ts +128 -128
  40. package/components/MazDropzone.mjs +369 -0
  41. package/components/MazDropzone.umd.js +2 -0
  42. package/components/MazGallery.d.ts +144 -144
  43. package/components/MazGallery.mjs +948 -0
  44. package/components/MazGallery.umd.js +2 -0
  45. package/components/MazIcon.d.ts +64 -66
  46. package/components/MazIcon.mjs +161 -0
  47. package/components/MazIcon.umd.js +2 -0
  48. package/components/MazInput.d.ts +276 -276
  49. package/components/MazInput.mjs +750 -0
  50. package/components/MazInput.umd.js +2 -0
  51. package/components/MazInputNumber.d.ts +65 -67
  52. package/components/MazInputNumber.mjs +857 -0
  53. package/components/MazInputNumber.umd.js +2 -0
  54. package/components/MazInputPrice.d.ts +69 -64
  55. package/components/MazInputPrice.mjs +889 -0
  56. package/components/MazInputPrice.umd.js +2 -0
  57. package/components/MazInputTags.d.ts +94 -96
  58. package/components/MazInputTags.mjs +904 -0
  59. package/components/MazInputTags.umd.js +2 -0
  60. package/components/MazLazyImg.d.ts +85 -80
  61. package/components/MazLazyImg.mjs +376 -0
  62. package/components/MazLazyImg.umd.js +2 -0
  63. package/components/MazPhoneNumberInput/constantes/locales.d.ts +12 -12
  64. package/components/MazPhoneNumberInput/types.d.ts +21 -21
  65. package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +2 -2
  66. package/components/MazPhoneNumberInput/utils/index.d.ts +12 -12
  67. package/components/MazPhoneNumberInput.d.ts +253 -255
  68. package/components/MazPhoneNumberInput.mjs +1904 -0
  69. package/components/MazPhoneNumberInput.umd.js +2 -0
  70. package/components/MazPicker/MazPickerCalendar.vue.d.ts +135 -137
  71. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +20 -22
  72. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +112 -114
  73. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +122 -124
  74. package/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +36 -38
  75. package/components/MazPicker/MazPickerContainer.vue.d.ts +210 -212
  76. package/components/MazPicker/MazPickerFooter.vue.d.ts +16 -0
  77. package/components/MazPicker/MazPickerHeader.vue.d.ts +82 -84
  78. package/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +41 -43
  79. package/components/MazPicker/MazPickerShortcuts.vue.d.ts +60 -62
  80. package/components/MazPicker/MazPickerTime.vue.d.ts +127 -129
  81. package/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +33 -35
  82. package/components/MazPicker/types.d.ts +15 -15
  83. package/components/MazPicker/utils.d.ts +54 -54
  84. package/components/MazPicker.d.ts +311 -313
  85. package/components/MazPicker.mjs +2942 -0
  86. package/components/MazPicker.umd.js +2 -0
  87. package/components/MazRadioButtons.d.ts +77 -69
  88. package/components/MazRadioButtons.mjs +80 -0
  89. package/components/MazRadioButtons.umd.js +2 -0
  90. package/components/MazSelect.d.ts +185 -176
  91. package/components/MazSelect.mjs +1082 -0
  92. package/components/MazSelect.umd.js +2 -0
  93. package/components/MazSlider/utils.d.ts +15 -15
  94. package/components/MazSlider.d.ts +94 -96
  95. package/components/MazSlider.mjs +377 -0
  96. package/components/MazSlider.umd.js +2 -0
  97. package/components/MazSpinner.d.ts +28 -30
  98. package/components/MazSpinner.mjs +59 -0
  99. package/components/MazSpinner.umd.js +2 -0
  100. package/components/MazStepper.d.ts +71 -73
  101. package/components/MazStepper.mjs +227 -0
  102. package/components/MazStepper.umd.js +2 -0
  103. package/components/MazSwitch.d.ts +54 -56
  104. package/components/MazSwitch.mjs +61 -0
  105. package/components/MazSwitch.umd.js +2 -0
  106. package/components/MazTabsBar.d.ts +47 -49
  107. package/components/MazTabsBar.mjs +470 -0
  108. package/components/MazTabsBar.umd.js +2 -0
  109. package/components/MazTabsContent.d.ts +21 -16
  110. package/components/MazTabsContent.mjs +89 -0
  111. package/components/MazTabsContent.umd.js +2 -0
  112. package/components/MazTabsContentItem.d.ts +19 -14
  113. package/components/MazTabsContentItem.mjs +61 -0
  114. package/components/MazTabsContentItem.umd.js +2 -0
  115. package/components/MazTextarea/textarea-autogrow.d.ts +9 -9
  116. package/components/MazTextarea.d.ts +123 -125
  117. package/components/MazTextarea.mjs +260 -0
  118. package/components/MazTextarea.umd.js +2 -0
  119. package/components/MazTransitionExpand.d.ts +9 -4
  120. package/components/MazTransitionExpand.mjs +62 -0
  121. package/components/MazTransitionExpand.umd.js +2 -0
  122. package/components/index.d.ts +33 -34
  123. package/components/index.mjs +35 -0
  124. package/components/index.umd.js +35 -0
  125. package/components/no_photo-410a8f01.mjs +4 -0
  126. package/components/types.d.ts +17 -17
  127. package/css/main.css +1 -1
  128. package/maz-ui.d.ts +234 -231
  129. package/modules/maz-ui.mjs +1892 -0
  130. package/modules/maz-ui.umd.js +2 -0
  131. package/modules/no_photo-410a8f01.mjs +4 -0
  132. package/package.json +45 -54
  133. package/tailwindcss/tailwind.config.js +6 -7
  134. package/tailwindcss/utils/colors.js +1 -3
  135. package/tailwindcss/variables/breakpoints.js +1 -2
  136. package/tailwindcss/variables/utilities.js +1 -2
  137. package/tailwindcss/variables/z-indexes.js +1 -1
  138. package/components/MazArrowIcon.d.ts +0 -43
  139. package/components/MazArrowIcon.js +0 -1
  140. package/components/MazAvatar.js +0 -3
  141. package/components/MazBackdrop.js +0 -3
  142. package/components/MazBadge.js +0 -1
  143. package/components/MazBottomSheet.js +0 -3
  144. package/components/MazBtn.js +0 -3
  145. package/components/MazCard.js +0 -3
  146. package/components/MazCarousel.js +0 -3
  147. package/components/MazChart.js +0 -1
  148. package/components/MazCheckbox.js +0 -1
  149. package/components/MazDialog.js +0 -3
  150. package/components/MazDialogPromise.js +0 -3
  151. package/components/MazDrawer.js +0 -3
  152. package/components/MazDropzone.js +0 -3
  153. package/components/MazGallery.js +0 -3
  154. package/components/MazIcon.js +0 -3
  155. package/components/MazInput.js +0 -3
  156. package/components/MazInputNumber.js +0 -3
  157. package/components/MazInputPrice.js +0 -3
  158. package/components/MazInputTags.js +0 -3
  159. package/components/MazLazyImg.js +0 -3
  160. package/components/MazPhoneNumberInput.js +0 -3
  161. package/components/MazPicker.js +0 -3
  162. package/components/MazRadioButtons.js +0 -1
  163. package/components/MazSelect.js +0 -3
  164. package/components/MazSlider.js +0 -3
  165. package/components/MazSpinner.js +0 -1
  166. package/components/MazStepper.js +0 -1
  167. package/components/MazSwitch.js +0 -1
  168. package/components/MazTabsBar.js +0 -3
  169. package/components/MazTabsContent.js +0 -1
  170. package/components/MazTabsContentItem.js +0 -3
  171. package/components/MazTextarea.js +0 -1
  172. package/components/MazTransitionExpand.js +0 -1
  173. package/components/index.js +0 -36
  174. package/components/no_photo-a72545e4.js +0 -1
  175. package/modules/index.js +0 -3
  176. package/modules/no_photo-a72545e4.js +0 -1
@@ -0,0 +1,369 @@
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode("@-webkit-keyframes maz-spin-503fe527{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes maz-spin-503fe527{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.m-spinner[data-v-503fe527]{-webkit-animation:maz-spin-503fe527 1s linear infinite;animation:maz-spin-503fe527 1s linear infinite;fill:currentColor;color:var(--maz-color-white);margin:0!important}.m-spinner--primary[data-v-503fe527]{color:var(--maz-color-primary)}.m-spinner--secondary[data-v-503fe527]{color:var(--maz-color-secondary)}.m-spinner--info[data-v-503fe527]{color:var(--maz-color-info)}.m-spinner--warning[data-v-503fe527]{color:var(--maz-color-warning)}.m-spinner--danger[data-v-503fe527]{color:var(--maz-color-danger)}.m-spinner--success[data-v-503fe527]{color:var(--maz-color-success)}.m-spinner--black[data-v-503fe527]{color:var(--maz-color-black)}.m-spinner--white[data-v-503fe527],.m-spinner--transparent[data-v-503fe527]{color:var(--maz-color-white)}@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);transform:scale(1)}}.maz-dropzone{margin:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:auto;border-radius:var(--maz-border-radius);border-width:var(--maz-border-width);border-style:dashed;border-color:var(--maz-color-bg-light);background-color:var(--maz-color-bg);padding:1rem;text-align:center;outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:all;transition-property:all;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);min-height:245px}.maz-dropzone:not(.dz-clickable){background-color:var(--maz-color-bg-light)}.maz-dropzone.dz-clickable,.maz-dropzone.dz-clickable.dz-message,.maz-dropzone.dz-clickable.dz-message *{cursor:pointer}.maz-dropzone .dz-message{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.maz-dropzone.dz-clickable:hover,.maz-dropzone.dz-clickable:focus{border-color:var(--maz-color-bg-lighter);background-color:var(--maz-color-bg-light)}.maz-dropzone.dz-clickable:hover .maz-dropzone__main-icon,.maz-dropzone.dz-clickable:focus .maz-dropzone__main-icon{color:var(--maz-color-primary);-webkit-transition-property:all;transition-property:all;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.maz-dropzone.dz-started .dz-message{display:none}.maz-dropzone.dz-drag-hover{border-style:solid}.maz-dropzone.dz-drag-hover .dz-message{opacity:.5}.maz-dropzone .dz-message .dz-button{cursor:pointer;border-style:none;background-color:transparent;padding:0}.maz-dropzone .dz-details{position:absolute;top:0px;right:0px;bottom:0px;left:0px;z-index:20;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:var(--maz-border-radius);padding:2rem 1rem;text-align:center;line-height:2.5rem;color:var(--maz-color-white);opacity:0;background-color:var(--maz-color-primary-alpha);-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.maz-dropzone .dz-details .dz-size span{font-size:1rem;line-height:1.5rem;color:var(--maz-color-white)}.maz-dropzone .dz-details .dz-filename{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.maz-dropzone .dz-details .dz-filename span{color:#fff;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.maz-dropzone .dz-image{overflow:hidden;position:relative;display:block;z-index:10;width:100%;height:100%;margin:0 auto;border-radius:var(--maz-border-radius);border-color:var(--maz-color-bg-lighter)}.maz-dropzone .dz-image img{display:block}.maz-dropzone .dz-image>div[data-dz-thumbnail-bg]{width:inherit;height:inherit;background-size:cover;background-repeat:no-repeat;background-position:center}.maz-dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:0;min-height:auto;height:100%;background:transparent;max-width:200px;overflow:hidden}.maz-dropzone .dz-preview:not(:last-child){margin-right:.5rem}.maz-dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));background:linear-gradient(to bottom,#eee,#ddd)}.maz-dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.maz-dropzone .dz-preview.dz-image-preview{background-color:transparent}.maz-dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.maz-dropzone .dz-preview .dz-remove{text-align:center;display:block;cursor:pointer;position:absolute;z-index:30;color:#fff;top:inherit;left:5px;right:5px;bottom:5px;padding:10px 5px;border:2px white solid;text-decoration:none;text-transform:uppercase;font-size:.8rem;opacity:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-radius:var(--maz-border-radius)}.maz-dropzone .dz-preview .dz-remove:hover{background-color:var(--maz-color-white);color:var(--maz-color-primary)}.maz-dropzone .dz-preview:hover{z-index:1000}.maz-dropzone .dz-preview:hover .dz-details,.maz-dropzone .dz-preview:hover .dz-remove{opacity:1}.maz-dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05,1.05);transform:scale(1.05);-webkit-filter:blur(8px);filter:blur(8px)}.maz-dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease;border-radius:8px;top:130px;background:#be2626;background:-webkit-gradient(linear,left top,left bottom,from(#be2626),to(#a92222));background:linear-gradient(to bottom,#be2626,#a92222);padding:.5em 1.2em;color:#fff;margin-left:auto;margin-right:auto;left:0;width:100%;text-align:center}.maz-dropzone .dz-preview .dz-success-mark,.maz-dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;margin-left:auto;margin-top:auto;width:100%;top:30%;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.maz-dropzone .dz-preview .dz-success-mark .material-icons,.maz-dropzone .dz-preview .dz-error-mark .material-icons{background-color:var(--maz-color-success-alpha);border-radius:50%;color:#fff;font-size:70px}.maz-dropzone .dz-preview .dz-error-mark .material-icons{background-color:var(--maz-color-danger-alpha)}.maz-dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(.77,0,.175,1);animation:passing-through 3s cubic-bezier(.77,0,.175,1)}.maz-dropzone .dz-preview.dz-error .dz-error-message{display:block}.maz-dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(.77,0,.175,1);animation:slide-in 3s cubic-bezier(.77,0,.175,1)}.maz-dropzone .dz-preview.dz-error .dz-details{background-color:var(--maz-color-danger-alpha)}.maz-dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.maz-dropzone .dz-preview.dz-error .dz-remove:hover{color:var(--maz-color-danger)}.maz-dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:1rem;top:50%;margin-top:-.5rem;-webkit-transform:scale(1);transform:scale(1);overflow:visible;width:50%;left:25%;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.maz-dropzone .dz-preview .dz-progress .dz-upload{-webkit-transition:width .3s ease-in-out;transition:width .3s ease-in-out;position:absolute;top:0px;right:0px;bottom:0px;left:0px;width:0px;border-radius:9999px;background-color:var(--maz-color-success)}.maz-dropzone .dz-preview .dz-progress .progress-title{display:inline-block;position:relative;top:-30px}.maz-dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all .2s linear;transition:all .2s linear}.maz-dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.maz-dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, pushScopeId, popScopeId, createElementVNode, ref, computed, onMounted, onBeforeUnmount, resolveComponent, normalizeStyle, renderSlot, toDisplayString, createBlock } from "vue";
3
+ const _withScopeId = (n) => (pushScopeId("data-v-503fe527"), n = n(), popScopeId(), n);
4
+ const _hoisted_1$1 = ["width", "height"];
5
+ const _hoisted_2$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("path", { d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" }, null, -1));
6
+ const _hoisted_3$1 = [
7
+ _hoisted_2$1
8
+ ];
9
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
10
+ __name: "MazSpinner",
11
+ props: {
12
+ size: { type: String, default: "2em" },
13
+ color: {
14
+ type: String,
15
+ default: "primary",
16
+ validator: (value) => {
17
+ return [
18
+ "info",
19
+ "white",
20
+ "success",
21
+ "warning",
22
+ "danger",
23
+ "primary",
24
+ "black",
25
+ "secondary",
26
+ "transparent"
27
+ ].includes(value);
28
+ }
29
+ }
30
+ },
31
+ setup(__props) {
32
+ return (_ctx, _cache) => {
33
+ return openBlock(), createElementBlock("svg", {
34
+ width: __props.size,
35
+ height: __props.size,
36
+ version: "1.1",
37
+ xmlns: "http://www.w3.org/2000/svg",
38
+ x: "0px",
39
+ y: "0px",
40
+ viewBox: "0 0 50 50",
41
+ "xml:space": "preserve",
42
+ class: normalizeClass(["m-spinner", `m-spinner--${__props.color}`]),
43
+ style: { "enable-background": "new 0 0 50 50" }
44
+ }, _hoisted_3$1, 10, _hoisted_1$1);
45
+ };
46
+ }
47
+ });
48
+ const MazSpinner_vue_vue_type_style_index_0_scoped_503fe527_lang = "";
49
+ const _export_sfc = (sfc, props) => {
50
+ const target = sfc.__vccOpts || sfc;
51
+ for (const [key, val] of props) {
52
+ target[key] = val;
53
+ }
54
+ return target;
55
+ };
56
+ const MazSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-503fe527"]]);
57
+ const previewTemplate = `<div class="dz-preview dz-file-preview maz-flex-1">
58
+ <div class="dz-image">
59
+ <div data-dz-thumbnail-bg></div>
60
+ </div>
61
+ <div class="dz-details">
62
+ <div class="dz-filename"><span data-dz-name></span></div>
63
+ <div class="dz-size"><span data-dz-size></span></div>
64
+ </div>
65
+ <div class="dz-progress">
66
+ <span class="dz-upload" data-dz-uploadprogress></span>
67
+ </div>
68
+ <div class="dz-success-mark">
69
+ <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>
70
+ </div>
71
+ <div class="dz-error-mark">
72
+ <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>
73
+ </div>
74
+ </div>`;
75
+ const _sfc_main = defineComponent({
76
+ name: "MazDropzone",
77
+ components: { MazSpinner },
78
+ props: {
79
+ options: { type: Object, required: true },
80
+ height: {
81
+ type: [Number, String],
82
+ default: "245px"
83
+ },
84
+ width: {
85
+ type: [Number, String],
86
+ default: "100%"
87
+ },
88
+ noDestroyOnUnmount: { type: Boolean, default: false }
89
+ },
90
+ emits: [
91
+ "thumbnail",
92
+ "error",
93
+ "drop",
94
+ "dragstart",
95
+ "dragend",
96
+ "dragenter",
97
+ "dragover",
98
+ "dragleave",
99
+ "paste",
100
+ "addedfile",
101
+ "addedfiles",
102
+ "removedfile",
103
+ "success",
104
+ "processing",
105
+ "processingmultiple",
106
+ "uploadprogress",
107
+ "totaluploadprogress",
108
+ "sending",
109
+ "sendingmultiple",
110
+ "canceled",
111
+ "canceledmultiple",
112
+ "complete",
113
+ "completemultiple",
114
+ "maxfilesexceeded",
115
+ "maxfilesreached",
116
+ "queuecomplete",
117
+ "reset"
118
+ ],
119
+ setup(props, { emit }) {
120
+ const ButtonElement = ref();
121
+ const dropzoneReady = ref(false);
122
+ let dropzone;
123
+ const dropzoneOptions = ref();
124
+ const dropzoneStyle = computed(() => ({
125
+ width: Number.isInteger(props.width) ? `${props.width}px` : props.width,
126
+ height: Number.isInteger(props.height) ? `${props.height}px` : props.height
127
+ }));
128
+ const thumbnail = (file, dataUrl) => {
129
+ emit("thumbnail", { file, dataUrl });
130
+ let thumbnailElement;
131
+ file.previewElement.classList.remove("dz-file-preview");
132
+ const ref2 = file.previewElement.querySelectorAll(
133
+ "[data-dz-thumbnail-bg]"
134
+ );
135
+ ref2.forEach((r) => {
136
+ thumbnailElement = r;
137
+ thumbnailElement.alt = file.name;
138
+ thumbnailElement.style.backgroundImage = `url('${dataUrl}')`;
139
+ });
140
+ if (file.status === "success")
141
+ dropzone.emit("complete", file);
142
+ };
143
+ const error = (file, message, xhr) => {
144
+ emit("error", { file, message, xhr });
145
+ if (dropzone.options.autoRemoveOnError) {
146
+ setTimeout(() => dropzone.removeFile(file), 3e3);
147
+ }
148
+ };
149
+ const errorMultiple = (files, message, xhr) => {
150
+ emit("error", { files, message, xhr });
151
+ if (dropzone.options.autoRemoveOnError)
152
+ setTimeout(() => {
153
+ for (const file of files)
154
+ dropzone.removeFile(file);
155
+ }, 3e3);
156
+ };
157
+ onMounted(async () => {
158
+ const defaultOptions = {
159
+ parallelUploads: props.options.maxFiles,
160
+ previewTemplate,
161
+ addRemoveLinks: true
162
+ };
163
+ if (ButtonElement.value) {
164
+ const { default: DropzoneJs } = await import("dropzone");
165
+ dropzone = new DropzoneJs(ButtonElement.value, {
166
+ ...defaultOptions,
167
+ ...props.options
168
+ });
169
+ if (dropzone) {
170
+ dropzoneOptions.value = dropzone.options;
171
+ dropzoneReady.value = true;
172
+ dropzone.on("thumbnail", thumbnail);
173
+ dropzone.on("error", error);
174
+ dropzone.on("errormultiple", errorMultiple);
175
+ dropzone.on("drop", (e) => emit("drop", e));
176
+ dropzone.on("dragstart", (e) => emit("dragstart", e));
177
+ dropzone.on("dragend", (e) => emit("dragend", e));
178
+ dropzone.on("dragenter", (e) => emit("dragenter", e));
179
+ dropzone.on("dragover", (e) => emit("dragover", e));
180
+ dropzone.on("dragleave", (e) => emit("dragleave", e));
181
+ dropzone.on("paste", (e) => emit("paste", e));
182
+ dropzone.on(
183
+ "addedfile",
184
+ (file) => emit("addedfile", file)
185
+ );
186
+ dropzone.on(
187
+ "addedfiles",
188
+ (files) => emit("addedfiles", files)
189
+ );
190
+ dropzone.on(
191
+ "removedfile",
192
+ (file) => emit("removedfile", file)
193
+ );
194
+ dropzone.on(
195
+ "success",
196
+ (file, response) => emit("success", { file, response })
197
+ );
198
+ dropzone.on(
199
+ "successmultiple",
200
+ (files, responseText) => emit("success", { files, responseText })
201
+ );
202
+ dropzone.on(
203
+ "processing",
204
+ (file) => emit("processing", file)
205
+ );
206
+ dropzone.on(
207
+ "processingmultiple",
208
+ (files) => emit("processingmultiple", files)
209
+ );
210
+ dropzone.on(
211
+ "uploadprogress",
212
+ (file, progress, bytesSent) => emit("uploadprogress", { file, progress, bytesSent })
213
+ );
214
+ dropzone.on(
215
+ "totaluploadprogress",
216
+ (totalProgress, totalBytes, totalBytesSent) => emit("totaluploadprogress", {
217
+ totalProgress,
218
+ totalBytes,
219
+ totalBytesSent
220
+ })
221
+ );
222
+ dropzone.on(
223
+ "sending",
224
+ (file, xhr, formData) => emit("sending", { file, xhr, formData })
225
+ );
226
+ dropzone.on(
227
+ "sendingmultiple",
228
+ (files, xhr, formData) => emit("sendingmultiple", { files, xhr, formData })
229
+ );
230
+ dropzone.on(
231
+ "canceled",
232
+ (file) => emit("canceled", file)
233
+ );
234
+ dropzone.on(
235
+ "canceledmultiple",
236
+ (files) => emit("canceledmultiple", files)
237
+ );
238
+ dropzone.on(
239
+ "complete",
240
+ (file) => emit("complete", file)
241
+ );
242
+ dropzone.on(
243
+ "completemultiple",
244
+ (files) => emit("completemultiple", files)
245
+ );
246
+ dropzone.on(
247
+ "maxfilesexceeded",
248
+ (file) => emit("maxfilesexceeded", file)
249
+ );
250
+ dropzone.on(
251
+ "maxfilesreached",
252
+ (files) => emit("maxfilesreached", files)
253
+ );
254
+ dropzone.on("queuecomplete", () => {
255
+ if (getAcceptedFiles().every((file) => file.manuallyAdded))
256
+ return;
257
+ emit("queuecomplete");
258
+ });
259
+ dropzone.on("reset", () => emit("reset"));
260
+ }
261
+ }
262
+ });
263
+ const setOption = (option, value) => {
264
+ dropzone.options = {
265
+ ...dropzone.options,
266
+ [option]: value
267
+ };
268
+ return dropzone.options;
269
+ };
270
+ const manuallyAddFile = (file, fileUrl) => {
271
+ dropzone.emit("addedfile", file);
272
+ dropzone.emit("thumbnail", file, fileUrl);
273
+ dropzone.files.push(file);
274
+ };
275
+ const removeAllFiles = (shouldRemoveAllFiles) => dropzone.removeAllFiles(shouldRemoveAllFiles);
276
+ const processQueue = () => dropzone.processQueue();
277
+ const destroy = () => dropzone.destroy();
278
+ const disable = () => dropzone.disable();
279
+ const enable = () => dropzone.enable();
280
+ const accept = (file, done) => dropzone.accept(file, done);
281
+ const addFile = (file) => dropzone.addFile(file);
282
+ const resizeImage = (file, width, height, resizeMethod, callback) => dropzone.resizeImage(file, width, height, resizeMethod, callback);
283
+ const cancelUpload = (file) => dropzone.cancelUpload(file);
284
+ const getAcceptedFiles = () => dropzone.getAcceptedFiles();
285
+ const getRejectedFiles = () => dropzone.getRejectedFiles();
286
+ const getFilesWithStatus = () => dropzone.getFilesWithStatus(status);
287
+ const getQueuedFiles = () => dropzone.getQueuedFiles();
288
+ const getUploadingFiles = () => dropzone.getUploadingFiles();
289
+ const getAddedFiles = () => dropzone.getAddedFiles();
290
+ const getActiveFiles = () => dropzone.getActiveFiles();
291
+ onBeforeUnmount(() => {
292
+ if (!props.noDestroyOnUnmount)
293
+ dropzone.destroy();
294
+ });
295
+ return {
296
+ ButtonElement,
297
+ dropzoneReady,
298
+ dropzoneOptions,
299
+ dropzoneStyle,
300
+ setOption,
301
+ manuallyAddFile,
302
+ removeAllFiles,
303
+ processQueue,
304
+ destroy,
305
+ disable,
306
+ enable,
307
+ accept,
308
+ addFile,
309
+ resizeImage,
310
+ cancelUpload,
311
+ getAcceptedFiles,
312
+ getRejectedFiles,
313
+ getFilesWithStatus,
314
+ getQueuedFiles,
315
+ getUploadingFiles,
316
+ getAddedFiles,
317
+ getActiveFiles
318
+ };
319
+ }
320
+ });
321
+ const MazDropzone_vue_vue_type_style_index_0_lang = "";
322
+ const _hoisted_1 = { class: "dz-message" };
323
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("svg", {
324
+ xmlns: "http://www.w3.org/2000/svg",
325
+ height: "2em",
326
+ width: "2em",
327
+ viewBox: "0 0 24 24",
328
+ fill: "currentColor",
329
+ class: "maz-dropzone__main-icon maz-text-normal",
330
+ "aria-hidden": "true"
331
+ }, [
332
+ /* @__PURE__ */ createElementVNode("path", {
333
+ d: "M0 0h24v24H0V0z",
334
+ fill: "none"
335
+ }),
336
+ /* @__PURE__ */ createElementVNode("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" })
337
+ ], -1);
338
+ const _hoisted_3 = { class: "maz-my-2 maz-text-normal" };
339
+ const _hoisted_4 = { class: "maz-my-0 maz-text-muted" };
340
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
341
+ const _component_MazSpinner = resolveComponent("MazSpinner");
342
+ return openBlock(), createElementBlock("button", {
343
+ ref: "ButtonElement",
344
+ type: "button",
345
+ name: "maz-dropzone",
346
+ class: "maz-dropzone",
347
+ style: normalizeStyle([_ctx.dropzoneStyle])
348
+ }, [
349
+ _ctx.dropzoneReady ? renderSlot(_ctx.$slots, "default", {
350
+ key: 0,
351
+ options: _ctx.dropzoneOptions
352
+ }, () => {
353
+ var _a, _b;
354
+ return [
355
+ createElementVNode("div", _hoisted_1, [
356
+ renderSlot(_ctx.$slots, "icon", {}, () => [
357
+ _hoisted_2
358
+ ]),
359
+ createElementVNode("p", _hoisted_3, toDisplayString((_a = _ctx.dropzoneOptions) == null ? void 0 : _a.dictDefaultMessage), 1),
360
+ createElementVNode("p", _hoisted_4, toDisplayString((_b = _ctx.dropzoneOptions) == null ? void 0 : _b.dictFilesDescriptions), 1)
361
+ ])
362
+ ];
363
+ }) : (openBlock(), createBlock(_component_MazSpinner, { key: 1 }))
364
+ ], 4);
365
+ }
366
+ const MazDropzone = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
367
+ export {
368
+ MazDropzone as default
369
+ };
@@ -0,0 +1,2 @@
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode("@-webkit-keyframes maz-spin-503fe527{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes maz-spin-503fe527{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.m-spinner[data-v-503fe527]{-webkit-animation:maz-spin-503fe527 1s linear infinite;animation:maz-spin-503fe527 1s linear infinite;fill:currentColor;color:var(--maz-color-white);margin:0!important}.m-spinner--primary[data-v-503fe527]{color:var(--maz-color-primary)}.m-spinner--secondary[data-v-503fe527]{color:var(--maz-color-secondary)}.m-spinner--info[data-v-503fe527]{color:var(--maz-color-info)}.m-spinner--warning[data-v-503fe527]{color:var(--maz-color-warning)}.m-spinner--danger[data-v-503fe527]{color:var(--maz-color-danger)}.m-spinner--success[data-v-503fe527]{color:var(--maz-color-success)}.m-spinner--black[data-v-503fe527]{color:var(--maz-color-black)}.m-spinner--white[data-v-503fe527],.m-spinner--transparent[data-v-503fe527]{color:var(--maz-color-white)}@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}to{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);transform:scale(1)}}.maz-dropzone{margin:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;overflow:auto;border-radius:var(--maz-border-radius);border-width:var(--maz-border-width);border-style:dashed;border-color:var(--maz-color-bg-light);background-color:var(--maz-color-bg);padding:1rem;text-align:center;outline:2px solid transparent;outline-offset:2px;-webkit-transition-property:all;transition-property:all;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);min-height:245px}.maz-dropzone:not(.dz-clickable){background-color:var(--maz-color-bg-light)}.maz-dropzone.dz-clickable,.maz-dropzone.dz-clickable.dz-message,.maz-dropzone.dz-clickable.dz-message *{cursor:pointer}.maz-dropzone .dz-message{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.maz-dropzone.dz-clickable:hover,.maz-dropzone.dz-clickable:focus{border-color:var(--maz-color-bg-lighter);background-color:var(--maz-color-bg-light)}.maz-dropzone.dz-clickable:hover .maz-dropzone__main-icon,.maz-dropzone.dz-clickable:focus .maz-dropzone__main-icon{color:var(--maz-color-primary);-webkit-transition-property:all;transition-property:all;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.maz-dropzone.dz-started .dz-message{display:none}.maz-dropzone.dz-drag-hover{border-style:solid}.maz-dropzone.dz-drag-hover .dz-message{opacity:.5}.maz-dropzone .dz-message .dz-button{cursor:pointer;border-style:none;background-color:transparent;padding:0}.maz-dropzone .dz-details{position:absolute;top:0px;right:0px;bottom:0px;left:0px;z-index:20;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:var(--maz-border-radius);padding:2rem 1rem;text-align:center;line-height:2.5rem;color:var(--maz-color-white);opacity:0;background-color:var(--maz-color-primary-alpha);-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.maz-dropzone .dz-details .dz-size span{font-size:1rem;line-height:1.5rem;color:var(--maz-color-white)}.maz-dropzone .dz-details .dz-filename{width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.maz-dropzone .dz-details .dz-filename span{color:#fff;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.maz-dropzone .dz-image{overflow:hidden;position:relative;display:block;z-index:10;width:100%;height:100%;margin:0 auto;border-radius:var(--maz-border-radius);border-color:var(--maz-color-bg-lighter)}.maz-dropzone .dz-image img{display:block}.maz-dropzone .dz-image>div[data-dz-thumbnail-bg]{width:inherit;height:inherit;background-size:cover;background-repeat:no-repeat;background-position:center}.maz-dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:0;min-height:auto;height:100%;background:transparent;max-width:200px;overflow:hidden}.maz-dropzone .dz-preview:not(:last-child){margin-right:.5rem}.maz-dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));background:linear-gradient(to bottom,#eee,#ddd)}.maz-dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.maz-dropzone .dz-preview.dz-image-preview{background-color:transparent}.maz-dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.maz-dropzone .dz-preview .dz-remove{text-align:center;display:block;cursor:pointer;position:absolute;z-index:30;color:#fff;top:inherit;left:5px;right:5px;bottom:5px;padding:10px 5px;border:2px white solid;text-decoration:none;text-transform:uppercase;font-size:.8rem;opacity:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-radius:var(--maz-border-radius)}.maz-dropzone .dz-preview .dz-remove:hover{background-color:var(--maz-color-white);color:var(--maz-color-primary)}.maz-dropzone .dz-preview:hover{z-index:1000}.maz-dropzone .dz-preview:hover .dz-details,.maz-dropzone .dz-preview:hover .dz-remove{opacity:1}.maz-dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05,1.05);transform:scale(1.05);-webkit-filter:blur(8px);filter:blur(8px)}.maz-dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease;border-radius:8px;top:130px;background:#be2626;background:-webkit-gradient(linear,left top,left bottom,from(#be2626),to(#a92222));background:linear-gradient(to bottom,#be2626,#a92222);padding:.5em 1.2em;color:#fff;margin-left:auto;margin-right:auto;left:0;width:100%;text-align:center}.maz-dropzone .dz-preview .dz-success-mark,.maz-dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;margin-left:auto;margin-top:auto;width:100%;top:30%;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.maz-dropzone .dz-preview .dz-success-mark .material-icons,.maz-dropzone .dz-preview .dz-error-mark .material-icons{background-color:var(--maz-color-success-alpha);border-radius:50%;color:#fff;font-size:70px}.maz-dropzone .dz-preview .dz-error-mark .material-icons{background-color:var(--maz-color-danger-alpha)}.maz-dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(.77,0,.175,1);animation:passing-through 3s cubic-bezier(.77,0,.175,1)}.maz-dropzone .dz-preview.dz-error .dz-error-message{display:block}.maz-dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(.77,0,.175,1);animation:slide-in 3s cubic-bezier(.77,0,.175,1)}.maz-dropzone .dz-preview.dz-error .dz-details{background-color:var(--maz-color-danger-alpha)}.maz-dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.maz-dropzone .dz-preview.dz-error .dz-remove:hover{color:var(--maz-color-danger)}.maz-dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:1rem;top:50%;margin-top:-.5rem;-webkit-transform:scale(1);transform:scale(1);overflow:visible;width:50%;left:25%;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.maz-dropzone .dz-preview .dz-progress .dz-upload{-webkit-transition:width .3s ease-in-out;transition:width .3s ease-in-out;position:absolute;top:0px;right:0px;bottom:0px;left:0px;width:0px;border-radius:9999px;background-color:var(--maz-color-success)}.maz-dropzone .dz-preview .dz-progress .progress-title{display:inline-block;position:relative;top:-30px}.maz-dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all .2s linear;transition:all .2s linear}.maz-dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.maz-dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).MazDropzone=t(e.Vue)}(this,(function(e){"use strict";const t=["width","height"],o=[(t=>(e.pushScopeId("data-v-503fe527"),t=t(),e.popScopeId(),t))((()=>e.createElementVNode("path",{d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"},null,-1)))],s=(e,t)=>{const o=e.__vccOpts||e;for(const[s,n]of t)o[s]=n;return o},n=s(e.defineComponent({__name:"MazSpinner",props:{size:{type:String,default:"2em"},color:{type:String,default:"primary",validator:e=>["info","white","success","warning","danger","primary","black","secondary","transparent"].includes(e)}},setup:s=>(n,l)=>(e.openBlock(),e.createElementBlock("svg",{width:s.size,height:s.size,version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 50 50","xml:space":"preserve",class:e.normalizeClass(["m-spinner",`m-spinner--${s.color}`]),style:{"enable-background":"new 0 0 50 50"}},o,10,t))}),[["__scopeId","data-v-503fe527"]]),l=e.defineComponent({name:"MazDropzone",components:{MazSpinner:n},props:{options:{type:Object,required:!0},height:{type:[Number,String],default:"245px"},width:{type:[Number,String],default:"100%"},noDestroyOnUnmount:{type:Boolean,default:!1}},emits:["thumbnail","error","drop","dragstart","dragend","dragenter","dragover","dragleave","paste","addedfile","addedfiles","removedfile","success","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","canceled","canceledmultiple","complete","completemultiple","maxfilesexceeded","maxfilesreached","queuecomplete","reset"],setup(t,{emit:o}){const s=e.ref(),n=e.ref(!1);let l;const r=e.ref(),a=e.computed((()=>({width:Number.isInteger(t.width)?`${t.width}px`:t.width,height:Number.isInteger(t.height)?`${t.height}px`:t.height}))),i=(e,t)=>{let s;o("thumbnail",{file:e,dataUrl:t}),e.previewElement.classList.remove("dz-file-preview");e.previewElement.querySelectorAll("[data-dz-thumbnail-bg]").forEach((o=>{s=o,s.alt=e.name,s.style.backgroundImage=`url('${t}')`})),"success"===e.status&&l.emit("complete",e)},d=(e,t,s)=>{o("error",{file:e,message:t,xhr:s}),l.options.autoRemoveOnError&&setTimeout((()=>l.removeFile(e)),3e3)},p=(e,t,s)=>{o("error",{files:e,message:t,xhr:s}),l.options.autoRemoveOnError&&setTimeout((()=>{for(const t of e)l.removeFile(t)}),3e3)};e.onMounted((async()=>{const e={parallelUploads:t.options.maxFiles,previewTemplate:'<div class="dz-preview dz-file-preview maz-flex-1">\n <div class="dz-image">\n <div data-dz-thumbnail-bg></div>\n </div>\n <div class="dz-details">\n <div class="dz-filename"><span data-dz-name></span></div>\n <div class="dz-size"><span data-dz-size></span></div>\n </div>\n <div class="dz-progress">\n <span class="dz-upload" data-dz-uploadprogress></span>\n </div>\n <div class="dz-success-mark">\n <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>\n </div>\n <div class="dz-error-mark">\n <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>\n </div>\n</div>',addRemoveLinks:!0};if(s.value){const{default:a}=await import("dropzone");l=new a(s.value,{...e,...t.options}),l&&(r.value=l.options,n.value=!0,l.on("thumbnail",i),l.on("error",d),l.on("errormultiple",p),l.on("drop",(e=>o("drop",e))),l.on("dragstart",(e=>o("dragstart",e))),l.on("dragend",(e=>o("dragend",e))),l.on("dragenter",(e=>o("dragenter",e))),l.on("dragover",(e=>o("dragover",e))),l.on("dragleave",(e=>o("dragleave",e))),l.on("paste",(e=>o("paste",e))),l.on("addedfile",(e=>o("addedfile",e))),l.on("addedfiles",(e=>o("addedfiles",e))),l.on("removedfile",(e=>o("removedfile",e))),l.on("success",((e,t)=>o("success",{file:e,response:t}))),l.on("successmultiple",((e,t)=>o("success",{files:e,responseText:t}))),l.on("processing",(e=>o("processing",e))),l.on("processingmultiple",(e=>o("processingmultiple",e))),l.on("uploadprogress",((e,t,s)=>o("uploadprogress",{file:e,progress:t,bytesSent:s}))),l.on("totaluploadprogress",((e,t,s)=>o("totaluploadprogress",{totalProgress:e,totalBytes:t,totalBytesSent:s}))),l.on("sending",((e,t,s)=>o("sending",{file:e,xhr:t,formData:s}))),l.on("sendingmultiple",((e,t,s)=>o("sendingmultiple",{files:e,xhr:t,formData:s}))),l.on("canceled",(e=>o("canceled",e))),l.on("canceledmultiple",(e=>o("canceledmultiple",e))),l.on("complete",(e=>o("complete",e))),l.on("completemultiple",(e=>o("completemultiple",e))),l.on("maxfilesexceeded",(e=>o("maxfilesexceeded",e))),l.on("maxfilesreached",(e=>o("maxfilesreached",e))),l.on("queuecomplete",(()=>{c().every((e=>e.manuallyAdded))||o("queuecomplete")})),l.on("reset",(()=>o("reset"))))}}));const c=()=>l.getAcceptedFiles();return e.onBeforeUnmount((()=>{t.noDestroyOnUnmount||l.destroy()})),{ButtonElement:s,dropzoneReady:n,dropzoneOptions:r,dropzoneStyle:a,setOption:(e,t)=>(l.options={...l.options,[e]:t},l.options),manuallyAddFile:(e,t)=>{l.emit("addedfile",e),l.emit("thumbnail",e,t),l.files.push(e)},removeAllFiles:e=>l.removeAllFiles(e),processQueue:()=>l.processQueue(),destroy:()=>l.destroy(),disable:()=>l.disable(),enable:()=>l.enable(),accept:(e,t)=>l.accept(e,t),addFile:e=>l.addFile(e),resizeImage:(e,t,o,s,n)=>l.resizeImage(e,t,o,s,n),cancelUpload:e=>l.cancelUpload(e),getAcceptedFiles:c,getRejectedFiles:()=>l.getRejectedFiles(),getFilesWithStatus:()=>l.getFilesWithStatus(status),getQueuedFiles:()=>l.getQueuedFiles(),getUploadingFiles:()=>l.getUploadingFiles(),getAddedFiles:()=>l.getAddedFiles(),getActiveFiles:()=>l.getActiveFiles()}}}),r={class:"dz-message"},a=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",height:"2em",width:"2em",viewBox:"0 0 24 24",fill:"currentColor",class:"maz-dropzone__main-icon maz-text-normal","aria-hidden":"true"},[e.createElementVNode("path",{d:"M0 0h24v24H0V0z",fill:"none"}),e.createElementVNode("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"})],-1),i={class:"maz-my-2 maz-text-normal"},d={class:"maz-my-0 maz-text-muted"};return s(l,[["render",function(t,o,s,n,l,p){const c=e.resolveComponent("MazSpinner");return e.openBlock(),e.createElementBlock("button",{ref:"ButtonElement",type:"button",name:"maz-dropzone",class:"maz-dropzone",style:e.normalizeStyle([t.dropzoneStyle])},[t.dropzoneReady?e.renderSlot(t.$slots,"default",{key:0,options:t.dropzoneOptions},(()=>{var o,s;return[e.createElementVNode("div",r,[e.renderSlot(t.$slots,"icon",{},(()=>[a])),e.createElementVNode("p",i,e.toDisplayString(null==(o=t.dropzoneOptions)?void 0:o.dictDefaultMessage),1),e.createElementVNode("p",d,e.toDisplayString(null==(s=t.dropzoneOptions)?void 0:s.dictFilesDescriptions),1)])]})):(e.openBlock(),e.createBlock(c,{key:1}))],4)}]])}));