maz-ui 3.12.2 → 3.14.0
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.
- package/components/MazAvatar.d.ts +4 -4
- package/components/MazBackdrop.d.ts +1 -1
- package/components/MazBadge.d.ts +1 -1
- package/components/MazBottomSheet.mjs +5 -4
- package/components/MazBtn.d.ts +4 -4
- package/components/MazBtn.mjs +5 -4
- package/components/MazCard.d.ts +5 -5
- package/components/MazCard.mjs +5 -4
- package/components/MazCarousel.mjs +34 -33
- package/components/MazChart.d.ts +3 -3
- package/components/MazCheckbox.d.ts +1 -1
- package/components/MazCheckbox.mjs +7 -9
- package/components/MazDialog.mjs +5 -4
- package/components/MazDialogPromise.mjs +5 -4
- package/components/MazDrawer.d.ts +1 -1
- package/components/MazDrawer.mjs +5 -4
- package/components/MazDropzone.d.ts +2 -2
- package/components/MazFullscreenLoader.d.ts +31 -0
- package/components/MazFullscreenLoader.mjs +74 -0
- package/components/MazGallery.d.ts +4 -4
- package/components/MazIcon.d.ts +1 -1
- package/components/MazIcon.mjs +6 -4
- package/components/MazInput.d.ts +8 -8
- package/components/MazInput.mjs +18 -20
- package/components/MazInputNumber.d.ts +1 -1
- package/components/MazInputNumber.mjs +9 -11
- package/components/MazInputPrice.d.ts +1 -1
- package/components/MazInputPrice.mjs +57 -59
- package/components/MazInputTags.d.ts +3 -3
- package/components/MazInputTags.mjs +9 -11
- package/components/MazPhoneNumberInput.d.ts +3 -3
- package/components/MazPhoneNumberInput.mjs +23 -22
- package/components/MazPicker.d.ts +3 -3
- package/components/MazPicker.mjs +81 -83
- package/components/MazSelect.d.ts +7 -7
- package/components/MazSelect.mjs +27 -26
- package/components/MazSlider.d.ts +2 -2
- package/components/MazSpinner.d.ts +1 -1
- package/components/MazStepper.mjs +6 -4
- package/components/MazSwitch.d.ts +2 -2
- package/components/MazTabsBar.mjs +5 -4
- package/components/MazTabsContent.mjs +6 -4
- package/components/MazTabsContentItem.mjs +7 -5
- package/components/MazTextarea.d.ts +4 -4
- package/components/MazTextarea.mjs +13 -14
- package/components/component-list.mjs +1 -0
- package/components/index.d.ts +1 -0
- package/components/index.mjs +1 -0
- package/css/main.css +1 -1
- package/modules/index.mjs +590 -143
- package/nuxt/index.ts +133 -28
- package/nuxt/runtime/composables/use-theme-handler.ts +12 -0
- package/nuxt/runtime/plugins/aos.ts +14 -0
- package/nuxt/runtime/plugins/toaster.ts +5 -21
- package/nuxt/runtime/plugins/v-click-outside.ts +6 -0
- package/nuxt/runtime/plugins/v-fullscreen-img.ts +6 -0
- package/nuxt/runtime/plugins/v-lazy-img.ts +10 -0
- package/nuxt/runtime/plugins/v-zoom-img.ts +6 -0
- package/nuxt/runtime/plugins/wait.ts +6 -0
- package/package.json +22 -17
- package/types/components/MazAvatar.vue.d.ts +4 -4
- package/types/components/MazBackdrop.vue.d.ts +1 -1
- package/types/components/MazBadge.vue.d.ts +1 -1
- package/types/components/MazBtn.vue.d.ts +4 -4
- package/types/components/MazCard.vue.d.ts +5 -5
- package/types/components/MazChart.vue.d.ts +3 -3
- package/types/components/MazCheckbox.vue.d.ts +1 -1
- package/types/components/MazDrawer.vue.d.ts +1 -1
- package/types/components/MazDropzone.vue.d.ts +2 -2
- package/types/components/MazFullscreenLoader.vue.d.ts +31 -0
- package/types/components/MazGallery.vue.d.ts +4 -4
- package/types/components/MazIcon.vue.d.ts +1 -1
- package/types/components/MazInput.vue.d.ts +8 -8
- package/types/components/MazInputNumber.vue.d.ts +1 -1
- package/types/components/MazInputPrice.vue.d.ts +1 -1
- package/types/components/MazInputTags.vue.d.ts +3 -3
- package/types/components/MazPhoneNumberInput.vue.d.ts +3 -3
- package/types/components/MazPicker.vue.d.ts +3 -3
- package/types/components/MazSelect.vue.d.ts +7 -7
- package/types/components/MazSlider.vue.d.ts +2 -2
- package/types/components/MazSpinner.vue.d.ts +1 -1
- package/types/components/MazSwitch.vue.d.ts +2 -2
- package/types/components/MazTextarea.vue.d.ts +4 -4
- package/types/components/index.d.ts +1 -0
- package/types/modules/composables/index.d.ts +7 -7
- package/types/modules/composables/use-aos.d.ts +2 -0
- package/types/modules/composables/{idle-timeout.d.ts → use-idle-timeout.d.ts} +1 -4
- package/types/modules/composables/{instance-uniq-id.d.ts → use-instance-uniq-id.d.ts} +1 -3
- package/types/modules/composables/use-toast.d.ts +2 -0
- package/types/modules/composables/{user-visibilty.d.ts → use-user-visibilty.d.ts} +1 -4
- package/types/modules/composables/use-wait.d.ts +2 -0
- package/types/modules/directives/index.d.ts +2 -0
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +102 -0
- package/types/modules/directives/v-fullscreen-img/fullscreen-img.directive.d.ts +2 -0
- package/types/modules/directives/v-fullscreen-img/fullscreen-img.handler.d.ts +35 -0
- package/types/modules/directives/v-fullscreen-img/index.d.ts +7 -0
- package/types/modules/helpers/idle-timeout/types.d.ts +16 -1
- package/types/modules/helpers/mount-component.d.ts +2 -1
- package/types/modules/helpers/user-visibility/types.d.ts +12 -1
- package/types/modules/plugins/aos/index.d.ts +7 -6
- package/types/modules/plugins/index.d.ts +1 -1
- package/types/modules/plugins/toaster/MazToast.vue.d.ts +12 -12
- package/types/modules/plugins/toaster/index.d.ts +1 -1
- package/types/modules/plugins/toaster/toaster-handler.d.ts +2 -2
- package/types/modules/plugins/toaster/types.d.ts +5 -4
- package/types/nuxt/index.d.ts +55 -8
- package/types/nuxt/runtime/composables/use-theme-handler.d.ts +9 -0
- package/types/nuxt/runtime/plugins/aos.d.ts +2 -0
- package/types/nuxt/runtime/plugins/toaster.d.ts +1 -6
- package/types/nuxt/runtime/plugins/v-click-outside.d.ts +2 -0
- package/types/nuxt/runtime/plugins/v-fullscreen-img.d.ts +2 -0
- package/types/nuxt/runtime/plugins/v-lazy-img.d.ts +2 -0
- package/types/nuxt/runtime/plugins/v-zoom-img.d.ts +2 -0
- package/types/nuxt/runtime/plugins/wait.d.ts +2 -0
- package/nuxt/runtime/composables/use-toast.ts +0 -8
- package/types/modules/composables/aos.d.ts +0 -4
- package/types/modules/composables/toaster.d.ts +0 -4
- package/types/modules/composables/wait.d.ts +0 -4
- package/types/nuxt/runtime/composables/use-toast.d.ts +0 -2
- /package/types/modules/composables/{theme-handler.d.ts → use-theme-handler.d.ts} +0 -0
package/modules/index.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(".m-toast-container{-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.m-toast-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.m-toast-container{padding:1rem;z-index:1051}.m-toast-container.--top{top:0;display:-webkit-box;display:-ms-flexbox;display:flex}.m-toast-container.--center{width:100%}@media (min-width: 768px){.m-toast-container.--center{position:fixed;left:50%;width:auto;-webkit-transform:translate(-50%,0);transform:translate(-50%)}}.m-toast-container.--bottom{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.m-toast-container.--bottom>:not([hidden])~:not([hidden]){margin-bottom:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-top:calc(.5rem * var(--tw-space-y-reverse))}.m-toast-container.--right{right:0;width:100%}@media (min-width: 768px){.m-toast-container.--right{width:auto}}.m-toast-container.--left{left:0;width:100%}@media (min-width: 768px){.m-toast-container.--left{width:auto}}.m-toast[data-v-70723f14],.m-toast *[data-v-70723f14]{-webkit-box-sizing:border-box;box-sizing:border-box}.m-toast[data-v-70723f14]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:center;align-self:center;border-radius:var(--maz-border-radius);padding-left:.5rem;padding-right:.5rem;color:var(--maz-color-white);--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width: 768px){.m-toast.--left[data-v-70723f14],.m-toast.--right[data-v-70723f14]{width:20rem}.m-toast.--center[data-v-70723f14]{width:20rem;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}.m-toast__message-wrapper[data-v-70723f14]{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%;padding-top:.75rem;padding-bottom:.75rem}.m-toast__message[data-v-70723f14]{margin:0;font-weight:500}.m-toast .--close[data-v-70723f14]{margin-left:.25rem;display:-webkit-box;display:-ms-flexbox;display:flex;height:1.75rem;width:1.75rem;border-radius:var(--maz-border-radius);background-color:transparent;padding:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-toast .--close[data-v-70723f14]:hover{background-color:#11182733}.m-toast .--close .--icon[data-v-70723f14]{cursor:pointer}.m-toast.--info[data-v-70723f14]{background-color:var(--maz-color-info);color:var(--maz-color-info-contrast)}.m-toast.--info[data-v-70723f14]:hover{background-color:var(--maz-color-info-600)}.m-toast.--info .--close[data-v-70723f14]{color:var(--maz-color-info-contrast)}.m-toast.--success[data-v-70723f14]{background-color:var(--maz-color-success);color:var(--maz-color-success-contrast)}.m-toast.--success[data-v-70723f14]:hover{background-color:var(--maz-color-success-600)}.m-toast.--success .--close[data-v-70723f14]{color:var(--maz-color-success-contrast)}.m-toast.--warning[data-v-70723f14]{background-color:var(--maz-color-warning);color:var(--maz-color-warning-contrast)}.m-toast.--warning[data-v-70723f14]:hover{background-color:var(--maz-color-warning-600)}.m-toast.--warning .--close[data-v-70723f14]{color:var(--maz-color-warning-contrast)}.m-toast.--danger[data-v-70723f14]{background-color:var(--maz-color-danger);color:var(--maz-color-danger-contrast)}.m-toast.--danger[data-v-70723f14]:hover{background-color:var(--maz-color-danger-600)}.m-toast.--danger .--close[data-v-70723f14]{color:var(--maz-color-danger-contrast)}.m-slide-top-enter-active[data-v-70723f14],.m-slide-top-leave-active[data-v-70723f14]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateY(0);transform:translateY(0)}.m-slide-top-enter-from[data-v-70723f14],.m-slide-top-leave-to[data-v-70723f14]{opacity:0;-webkit-transform:translateY(-100%);transform:translateY(-100%)}.m-slide-bottom-enter-active[data-v-70723f14],.m-slide-bottom-leave-active[data-v-70723f14]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateY(0);transform:translateY(0)}.m-slide-bottom-enter-from[data-v-70723f14],.m-slide-bottom-leave-to[data-v-70723f14]{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}.m-slide-right-enter-active[data-v-70723f14],.m-slide-right-leave-active[data-v-70723f14]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateX(0);transform:translate(0)}.m-slide-right-enter-from[data-v-70723f14],.m-slide-right-leave-to[data-v-70723f14]{opacity:0;-webkit-transform:translateX(100%);transform:translate(100%)}.m-slide-left-enter-active[data-v-70723f14],.m-slide-left-leave-active[data-v-70723f14]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateX(0);transform:translate(0)}.m-slide-left-enter-from[data-v-70723f14],.m-slide-left-leave-to[data-v-70723f14]{opacity:0;-webkit-transform:translateX(-100%);transform:translate(-100%)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode("@-webkit-keyframes maz-spin-7a2b89c9{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes maz-spin-7a2b89c9{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.m-spinner[data-v-7a2b89c9]{-webkit-animation:maz-spin-7a2b89c9 1s linear infinite;animation:maz-spin-7a2b89c9 1s linear infinite;fill:currentColor;margin:0!important}.m-spinner--normal[data-v-7a2b89c9]{color:var(--maz-color-text)}.m-spinner--primary[data-v-7a2b89c9]{color:var(--maz-color-primary)}.m-spinner--secondary[data-v-7a2b89c9]{color:var(--maz-color-secondary)}.m-spinner--info[data-v-7a2b89c9]{color:var(--maz-color-info)}.m-spinner--warning[data-v-7a2b89c9]{color:var(--maz-color-warning)}.m-spinner--danger[data-v-7a2b89c9]{color:var(--maz-color-danger)}.m-spinner--success[data-v-7a2b89c9]{color:var(--maz-color-success)}.m-spinner--black[data-v-7a2b89c9]{color:var(--maz-color-black)}.m-spinner--white[data-v-7a2b89c9],.m-spinner--transparent[data-v-7a2b89c9]{color:var(--maz-color-white)}.m-spinner--theme[data-v-7a2b89c9]{color:var(--maz-color-bg-theme)}html.--m-fullscreen-open{height:100vh;overflow:hidden}.m-fullscreen-img[data-v-86a68575]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;height:100vh;width:100vw;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--maz-bg-overlay);--tw-bg-opacity: .8;outline:2px solid transparent;outline-offset:2px;--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.m-fullscreen-img .m-fullscreen-img-scroller[data-v-86a68575]{max-height:100vh;overflow:auto}.m-fullscreen-img.--animation-active .m-fullscreen-img-scroller[data-v-86a68575]{height:100vh;width:100vw}.m-fullscreen-img[data-v-86a68575]:not(.--animation-active){display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-fullscreen-img img[data-v-86a68575]{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position: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:linear;transition-timing-function:linear}.m-fullscreen-img .m-fullscreen-img-loader[data-v-86a68575]{position:absolute;left:50%;top:50%;z-index:10;--tw-translate-x: -50%;--tw-translate-y: -50%;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:3.75rem;line-height:1}.m-fullscreen-img .m-fullscreen-btn[data-v-86a68575]{position:absolute;z-index:10;display:-webkit-box;display:-ms-flexbox;display:flex;height:5rem;width:7%;min-width:5em;cursor:pointer;padding:1rem;-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;-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}.m-fullscreen-img .m-fullscreen-btn.--close[data-v-86a68575]{right:0;top:0;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.m-fullscreen-img .m-fullscreen-btn.--previous[data-v-86a68575]{left:0;top:50%;height:100vh;--tw-translate-y: -50%;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.m-fullscreen-img .m-fullscreen-btn.--next[data-v-86a68575]{right:0;top:50%;height:100vh;--tw-translate-y: -50%;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.maz-scale-fade-enter-from[data-v-86a68575],.maz-scale-fade-leave-to[data-v-86a68575]{--tw-scale-x: .5;--tw-scale-y: .5;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0}.maz-scale-fade-enter-active[data-v-86a68575],.maz-scale-fade-leave-active[data-v-86a68575]{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.2s;transition-duration:.2s}.m-toast-container{-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.m-toast-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.m-toast-container{padding:1rem;z-index:1051}.m-toast-container.--top{top:0;display:-webkit-box;display:-ms-flexbox;display:flex}.m-toast-container.--center{width:100%}@media (min-width: 768px){.m-toast-container.--center{position:fixed;left:50%;width:auto;-webkit-transform:translate(-50%,0);transform:translate(-50%)}}.m-toast-container.--bottom{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.m-toast-container.--bottom>:not([hidden])~:not([hidden]){margin-bottom:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-top:calc(.5rem * var(--tw-space-y-reverse))}.m-toast-container.--right{right:0;width:100%}@media (min-width: 768px){.m-toast-container.--right{width:auto}}.m-toast-container.--left{left:0;width:100%}@media (min-width: 768px){.m-toast-container.--left{width:auto}}.m-toast[data-v-6a8f0d79],.m-toast *[data-v-6a8f0d79]{-webkit-box-sizing:border-box;box-sizing:border-box}.m-toast[data-v-6a8f0d79]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:center;align-self:center;border-radius:var(--maz-border-radius);padding-left:.5rem;padding-right:.5rem;color:var(--maz-color-white);--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);-webkit-transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-box-shadow,-webkit-transform,-webkit-filter,-webkit-backdrop-filter;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width: 768px){.m-toast.--left[data-v-6a8f0d79],.m-toast.--right[data-v-6a8f0d79]{width:20rem}.m-toast.--center[data-v-6a8f0d79]{width:20rem;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}.m-toast__message-wrapper[data-v-6a8f0d79]{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%;padding-top:.75rem;padding-bottom:.75rem}.m-toast__message[data-v-6a8f0d79]{margin:0;font-weight:500}.m-toast .--close[data-v-6a8f0d79]{margin-left:.25rem;display:-webkit-box;display:-ms-flexbox;display:flex;height:1.75rem;width:1.75rem;border-radius:var(--maz-border-radius);background-color:transparent;padding:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.m-toast .--close[data-v-6a8f0d79]:hover{background-color:#11182733}.m-toast .--close .--icon[data-v-6a8f0d79]{cursor:pointer}.m-toast.--info[data-v-6a8f0d79]{background-color:var(--maz-color-info);color:var(--maz-color-info-contrast)}.m-toast.--info[data-v-6a8f0d79]:hover{background-color:var(--maz-color-info-600)}.m-toast.--info .--close[data-v-6a8f0d79]{color:var(--maz-color-info-contrast)}.m-toast.--success[data-v-6a8f0d79]{background-color:var(--maz-color-success);color:var(--maz-color-success-contrast)}.m-toast.--success[data-v-6a8f0d79]:hover{background-color:var(--maz-color-success-600)}.m-toast.--success .--close[data-v-6a8f0d79]{color:var(--maz-color-success-contrast)}.m-toast.--warning[data-v-6a8f0d79]{background-color:var(--maz-color-warning);color:var(--maz-color-warning-contrast)}.m-toast.--warning[data-v-6a8f0d79]:hover{background-color:var(--maz-color-warning-600)}.m-toast.--warning .--close[data-v-6a8f0d79]{color:var(--maz-color-warning-contrast)}.m-toast.--danger[data-v-6a8f0d79]{background-color:var(--maz-color-danger);color:var(--maz-color-danger-contrast)}.m-toast.--danger[data-v-6a8f0d79]:hover{background-color:var(--maz-color-danger-600)}.m-toast.--danger .--close[data-v-6a8f0d79]{color:var(--maz-color-danger-contrast)}.m-slide-top-enter-active[data-v-6a8f0d79],.m-slide-top-leave-active[data-v-6a8f0d79]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateY(0);transform:translateY(0)}.m-slide-top-enter-from[data-v-6a8f0d79],.m-slide-top-leave-to[data-v-6a8f0d79]{opacity:0;-webkit-transform:translateY(-100%);transform:translateY(-100%)}.m-slide-bottom-enter-active[data-v-6a8f0d79],.m-slide-bottom-leave-active[data-v-6a8f0d79]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateY(0);transform:translateY(0)}.m-slide-bottom-enter-from[data-v-6a8f0d79],.m-slide-bottom-leave-to[data-v-6a8f0d79]{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}.m-slide-right-enter-active[data-v-6a8f0d79],.m-slide-right-leave-active[data-v-6a8f0d79]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateX(0);transform:translate(0)}.m-slide-right-enter-from[data-v-6a8f0d79],.m-slide-right-leave-to[data-v-6a8f0d79]{opacity:0;-webkit-transform:translateX(100%);transform:translate(100%)}.m-slide-left-enter-active[data-v-6a8f0d79],.m-slide-left-leave-active[data-v-6a8f0d79]{opacity:1;-webkit-transition:all .3s;transition:all .3s;-webkit-transform:translateX(0);transform:translate(0)}.m-slide-left-enter-from[data-v-6a8f0d79],.m-slide-left-leave-to[data-v-6a8f0d79]{opacity:0;-webkit-transform:translateX(-100%);transform:translate(-100%)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => {
|
|
5
5
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
6
|
return value;
|
|
7
7
|
};
|
|
8
|
-
import { inject, createVNode, render as render$
|
|
8
|
+
import { inject, createVNode, render as render$2, nextTick, defineComponent, openBlock, createElementBlock, normalizeClass, pushScopeId, popScopeId, createElementVNode, ref, computed, onMounted as onMounted$1, onBeforeUnmount, withModifiers, withKeys, withDirectives, vShow, unref, createCommentVNode, Transition, withCtx, createBlock, toDisplayString } from "vue";
|
|
9
|
+
import vueScrollTo from "vue-scrollto";
|
|
9
10
|
function injectStrict(key, fallback) {
|
|
10
11
|
const resolved = inject(key, fallback);
|
|
11
12
|
if (!resolved) {
|
|
@@ -60,25 +61,29 @@ function debounce(fn, wait = 0, callFirst = false) {
|
|
|
60
61
|
function truthyFilter(value) {
|
|
61
62
|
return !!value;
|
|
62
63
|
}
|
|
63
|
-
function mount(component, {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
element,
|
|
67
|
-
app
|
|
68
|
-
} = {}) {
|
|
69
|
-
let el = element;
|
|
70
|
-
const vNode = createVNode(component, props, children);
|
|
71
|
-
if (app && app._context)
|
|
72
|
-
vNode.appContext = app._context;
|
|
73
|
-
if (el)
|
|
74
|
-
render$1(vNode, el);
|
|
75
|
-
else if (typeof document !== "undefined") {
|
|
76
|
-
render$1(vNode, el = document.createElement("div"));
|
|
77
|
-
}
|
|
78
|
-
const destroy = () => {
|
|
64
|
+
function mount(component, options) {
|
|
65
|
+
let el = options == null ? void 0 : options.element;
|
|
66
|
+
function destroy() {
|
|
79
67
|
if (el)
|
|
80
|
-
render$
|
|
81
|
-
}
|
|
68
|
+
render$2(null, el);
|
|
69
|
+
}
|
|
70
|
+
const vNode = createVNode(
|
|
71
|
+
component,
|
|
72
|
+
{ ...options == null ? void 0 : options.props, ...(options == null ? void 0 : options.addDestroyInProps) ? { destroy } : {} },
|
|
73
|
+
options == null ? void 0 : options.children
|
|
74
|
+
);
|
|
75
|
+
if (options == null ? void 0 : options.app) {
|
|
76
|
+
vNode.appContext = options.app._context;
|
|
77
|
+
if (el) {
|
|
78
|
+
render$2(vNode, el);
|
|
79
|
+
} else if (typeof document !== "undefined") {
|
|
80
|
+
el = document.createElement("div");
|
|
81
|
+
render$2(vNode, el);
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
el = el ?? document.body;
|
|
85
|
+
render$2(vNode, el);
|
|
86
|
+
}
|
|
82
87
|
return { vNode, destroy, el };
|
|
83
88
|
}
|
|
84
89
|
function isClient() {
|
|
@@ -91,8 +96,7 @@ class IdleTimeout {
|
|
|
91
96
|
timeout: 60 * 1e3 * 5,
|
|
92
97
|
// 5 minutes
|
|
93
98
|
once: false,
|
|
94
|
-
immediate: true
|
|
95
|
-
ssr: false
|
|
99
|
+
immediate: true
|
|
96
100
|
});
|
|
97
101
|
__publicField(this, "options");
|
|
98
102
|
__publicField(this, "timeoutHandler");
|
|
@@ -139,12 +143,8 @@ class IdleTimeout {
|
|
|
139
143
|
...this.defaultOptions,
|
|
140
144
|
...options
|
|
141
145
|
};
|
|
142
|
-
if (
|
|
146
|
+
if (isClient()) {
|
|
143
147
|
this.start();
|
|
144
|
-
} else if (!this.options.ssr && !isClient()) {
|
|
145
|
-
console.warn(
|
|
146
|
-
`[IdleTimeout](constructor) executed on server side - set immediate option to "false"`
|
|
147
|
-
);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
get element() {
|
|
@@ -251,8 +251,7 @@ class UserVisibility {
|
|
|
251
251
|
__publicField(this, "defaultOptions", {
|
|
252
252
|
timeout: 5e3,
|
|
253
253
|
once: false,
|
|
254
|
-
immediate: true
|
|
255
|
-
ssr: false
|
|
254
|
+
immediate: true
|
|
256
255
|
});
|
|
257
256
|
__publicField(this, "isVisible", false);
|
|
258
257
|
this.callback = callback;
|
|
@@ -261,12 +260,8 @@ class UserVisibility {
|
|
|
261
260
|
...options
|
|
262
261
|
};
|
|
263
262
|
this.eventHandlerFunction = this.eventHandler.bind(this);
|
|
264
|
-
if (
|
|
263
|
+
if (isClient()) {
|
|
265
264
|
this.start();
|
|
266
|
-
} else if (!this.options.ssr && !isClient()) {
|
|
267
|
-
console.warn(
|
|
268
|
-
`[UserVisibility](constructor) executed on server side - set "ssr" option to "false"`
|
|
269
|
-
);
|
|
270
265
|
}
|
|
271
266
|
}
|
|
272
267
|
start() {
|
|
@@ -317,7 +312,7 @@ class UserVisibility {
|
|
|
317
312
|
}
|
|
318
313
|
}
|
|
319
314
|
}
|
|
320
|
-
const sleep
|
|
315
|
+
const sleep = (duration) => {
|
|
321
316
|
return new Promise((resolve) => {
|
|
322
317
|
setTimeout(resolve, duration);
|
|
323
318
|
});
|
|
@@ -435,7 +430,7 @@ const plugin$5 = {
|
|
|
435
430
|
};
|
|
436
431
|
const handleOutsideClick = (event, element, binding, vnode) => {
|
|
437
432
|
event.stopPropagation();
|
|
438
|
-
const { handler
|
|
433
|
+
const { handler, exclude } = binding.value;
|
|
439
434
|
let clickedOnExcludedElement = false;
|
|
440
435
|
if (exclude && exclude.length > 0) {
|
|
441
436
|
for (const referenceName of exclude) {
|
|
@@ -446,7 +441,7 @@ const handleOutsideClick = (event, element, binding, vnode) => {
|
|
|
446
441
|
}
|
|
447
442
|
}
|
|
448
443
|
if (!element.contains(event.target) && !clickedOnExcludedElement) {
|
|
449
|
-
vnode.context[
|
|
444
|
+
vnode.context[handler]();
|
|
450
445
|
}
|
|
451
446
|
};
|
|
452
447
|
const getEventType = () => {
|
|
@@ -841,17 +836,17 @@ class VueZoomImg {
|
|
|
841
836
|
this.img.removeEventListener("load", this.onImgLoadedCallback);
|
|
842
837
|
}
|
|
843
838
|
}
|
|
844
|
-
let instance$
|
|
839
|
+
let instance$4;
|
|
845
840
|
const vZoomImg = {
|
|
846
841
|
created(el, binding) {
|
|
847
|
-
instance$
|
|
848
|
-
instance$
|
|
842
|
+
instance$4 = new VueZoomImg(binding);
|
|
843
|
+
instance$4.create(el);
|
|
849
844
|
},
|
|
850
845
|
updated(_el, binding) {
|
|
851
|
-
instance$
|
|
846
|
+
instance$4.update(binding);
|
|
852
847
|
},
|
|
853
848
|
unmounted(el) {
|
|
854
|
-
instance$
|
|
849
|
+
instance$4.remove(el);
|
|
855
850
|
}
|
|
856
851
|
};
|
|
857
852
|
const plugin$3 = {
|
|
@@ -860,7 +855,7 @@ const plugin$3 = {
|
|
|
860
855
|
}
|
|
861
856
|
};
|
|
862
857
|
const EMPTY_PHOTO = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
|
863
|
-
const DEFAULT_OPTIONS$
|
|
858
|
+
const DEFAULT_OPTIONS$6 = {
|
|
864
859
|
baseClass: "m-lazy-img",
|
|
865
860
|
loadedClass: "m-lazy-loaded",
|
|
866
861
|
loadingClass: "m-lazy-loading",
|
|
@@ -877,7 +872,7 @@ const DEFAULT_OPTIONS$5 = {
|
|
|
877
872
|
class LazyImg {
|
|
878
873
|
constructor(opts = {}) {
|
|
879
874
|
__publicField(this, "observers", []);
|
|
880
|
-
__publicField(this, "defaultOptions", DEFAULT_OPTIONS$
|
|
875
|
+
__publicField(this, "defaultOptions", DEFAULT_OPTIONS$6);
|
|
881
876
|
__publicField(this, "options");
|
|
882
877
|
__publicField(this, "onImgLoadedCallback");
|
|
883
878
|
__publicField(this, "onImgErrorCallback");
|
|
@@ -1087,28 +1082,28 @@ class LazyImg {
|
|
|
1087
1082
|
this.observers = [];
|
|
1088
1083
|
}
|
|
1089
1084
|
}
|
|
1090
|
-
let instance$
|
|
1085
|
+
let instance$3;
|
|
1091
1086
|
const vLazyImg = {
|
|
1092
1087
|
created(el, binding) {
|
|
1093
1088
|
const options = typeof binding.value === "object" ? binding.value : {};
|
|
1094
|
-
instance$
|
|
1095
|
-
instance$
|
|
1089
|
+
instance$3 = new LazyImg(options);
|
|
1090
|
+
instance$3.add(el, binding);
|
|
1096
1091
|
},
|
|
1097
1092
|
updated(el, binding) {
|
|
1098
|
-
instance$
|
|
1093
|
+
instance$3.update(el, binding);
|
|
1099
1094
|
},
|
|
1100
1095
|
unmounted(el, binding) {
|
|
1101
|
-
instance$
|
|
1096
|
+
instance$3.remove(el, binding);
|
|
1102
1097
|
}
|
|
1103
1098
|
};
|
|
1104
1099
|
const DIRECTIVE_NAME = "lazy-img";
|
|
1105
1100
|
const plugin$2 = {
|
|
1106
1101
|
install(app, opts = {}) {
|
|
1107
1102
|
const options = {
|
|
1108
|
-
...DEFAULT_OPTIONS$
|
|
1103
|
+
...DEFAULT_OPTIONS$6,
|
|
1109
1104
|
...opts,
|
|
1110
1105
|
observerOptions: {
|
|
1111
|
-
...DEFAULT_OPTIONS$
|
|
1106
|
+
...DEFAULT_OPTIONS$6.observerOptions,
|
|
1112
1107
|
...opts.observerOptions
|
|
1113
1108
|
}
|
|
1114
1109
|
};
|
|
@@ -1120,6 +1115,507 @@ const plugin$2 = {
|
|
|
1120
1115
|
});
|
|
1121
1116
|
}
|
|
1122
1117
|
};
|
|
1118
|
+
const _withScopeId = (n) => (pushScopeId("data-v-7a2b89c9"), n = n(), popScopeId(), n);
|
|
1119
|
+
const _hoisted_1$4 = ["width", "height"];
|
|
1120
|
+
const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
|
|
1121
|
+
"path",
|
|
1122
|
+
{ 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" },
|
|
1123
|
+
null,
|
|
1124
|
+
-1
|
|
1125
|
+
/* HOISTED */
|
|
1126
|
+
));
|
|
1127
|
+
const _hoisted_3$4 = [
|
|
1128
|
+
_hoisted_2$4
|
|
1129
|
+
];
|
|
1130
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1131
|
+
__name: "MazSpinner",
|
|
1132
|
+
props: {
|
|
1133
|
+
size: { type: String, default: "2em" },
|
|
1134
|
+
color: {
|
|
1135
|
+
type: String,
|
|
1136
|
+
default: "primary"
|
|
1137
|
+
}
|
|
1138
|
+
},
|
|
1139
|
+
setup(__props) {
|
|
1140
|
+
return (_ctx, _cache) => {
|
|
1141
|
+
return openBlock(), createElementBlock("svg", {
|
|
1142
|
+
width: __props.size,
|
|
1143
|
+
height: __props.size,
|
|
1144
|
+
version: "1.1",
|
|
1145
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1146
|
+
x: "0px",
|
|
1147
|
+
y: "0px",
|
|
1148
|
+
viewBox: "0 0 50 50",
|
|
1149
|
+
"xml:space": "preserve",
|
|
1150
|
+
class: normalizeClass(["m-spinner", `m-spinner--${__props.color}`]),
|
|
1151
|
+
style: { "enable-background": "new 0 0 50 50" }
|
|
1152
|
+
}, _hoisted_3$4, 10, _hoisted_1$4);
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
const MazSpinner_vue_vue_type_style_index_0_scoped_7a2b89c9_lang = "";
|
|
1157
|
+
const _export_sfc = (sfc, props) => {
|
|
1158
|
+
const target = sfc.__vccOpts || sfc;
|
|
1159
|
+
for (const [key, val] of props) {
|
|
1160
|
+
target[key] = val;
|
|
1161
|
+
}
|
|
1162
|
+
return target;
|
|
1163
|
+
};
|
|
1164
|
+
const MazSpinner = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-7a2b89c9"]]);
|
|
1165
|
+
const _hoisted_1$3 = {
|
|
1166
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1167
|
+
width: "1em",
|
|
1168
|
+
height: "1em",
|
|
1169
|
+
fill: "none",
|
|
1170
|
+
viewBox: "0 0 24 24"
|
|
1171
|
+
};
|
|
1172
|
+
const _hoisted_2$3 = /* @__PURE__ */ createElementVNode(
|
|
1173
|
+
"path",
|
|
1174
|
+
{
|
|
1175
|
+
stroke: "currentColor",
|
|
1176
|
+
"stroke-linecap": "round",
|
|
1177
|
+
"stroke-linejoin": "round",
|
|
1178
|
+
"stroke-width": "1.5",
|
|
1179
|
+
d: "M6 18 18 6M6 6l12 12"
|
|
1180
|
+
},
|
|
1181
|
+
null,
|
|
1182
|
+
-1
|
|
1183
|
+
/* HOISTED */
|
|
1184
|
+
);
|
|
1185
|
+
const _hoisted_3$3 = [
|
|
1186
|
+
_hoisted_2$3
|
|
1187
|
+
];
|
|
1188
|
+
function render$1(_ctx, _cache) {
|
|
1189
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$3);
|
|
1190
|
+
}
|
|
1191
|
+
const XIcon = { render: render$1 };
|
|
1192
|
+
const _hoisted_1$2 = {
|
|
1193
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1194
|
+
width: "1em",
|
|
1195
|
+
height: "1em",
|
|
1196
|
+
fill: "none",
|
|
1197
|
+
viewBox: "0 0 24 24"
|
|
1198
|
+
};
|
|
1199
|
+
const _hoisted_2$2 = /* @__PURE__ */ createElementVNode(
|
|
1200
|
+
"path",
|
|
1201
|
+
{
|
|
1202
|
+
stroke: "currentColor",
|
|
1203
|
+
"stroke-linecap": "round",
|
|
1204
|
+
"stroke-linejoin": "round",
|
|
1205
|
+
"stroke-width": "1.5",
|
|
1206
|
+
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
1207
|
+
},
|
|
1208
|
+
null,
|
|
1209
|
+
-1
|
|
1210
|
+
/* HOISTED */
|
|
1211
|
+
);
|
|
1212
|
+
const _hoisted_3$2 = [
|
|
1213
|
+
_hoisted_2$2
|
|
1214
|
+
];
|
|
1215
|
+
function render(_ctx, _cache) {
|
|
1216
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
|
|
1217
|
+
}
|
|
1218
|
+
const ChevronLeft = { render };
|
|
1219
|
+
const _hoisted_1$1 = ["onClick", "onKeypress"];
|
|
1220
|
+
const _hoisted_2$1 = { class: "m-fullscreen-img-scroller" };
|
|
1221
|
+
const _hoisted_3$1 = ["src", "alt"];
|
|
1222
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1223
|
+
__name: "MazFullscreenImg",
|
|
1224
|
+
props: {
|
|
1225
|
+
destroy: { type: Function, default: void 0 },
|
|
1226
|
+
src: {},
|
|
1227
|
+
alt: { default: void 0 },
|
|
1228
|
+
openInstanceClass: {},
|
|
1229
|
+
zoom: { type: Boolean, default: true },
|
|
1230
|
+
disabled: { type: Boolean },
|
|
1231
|
+
clickedElementBounds: {},
|
|
1232
|
+
clickedElement: {},
|
|
1233
|
+
animated: { type: Boolean, default: true },
|
|
1234
|
+
scaleAnimation: { type: Boolean }
|
|
1235
|
+
},
|
|
1236
|
+
emits: ["close", "previous", "next", "before-close"],
|
|
1237
|
+
setup(__props, { emit: emits }) {
|
|
1238
|
+
const props = __props;
|
|
1239
|
+
const showFullscreenImg = ref(false);
|
|
1240
|
+
const imageLoaded = ref(false);
|
|
1241
|
+
const showLoader = ref(false);
|
|
1242
|
+
const loadedOnce = ref(false);
|
|
1243
|
+
const hasMultipleInstances = ref(false);
|
|
1244
|
+
const isZoomed = ref(false);
|
|
1245
|
+
const animationActive = ref(false);
|
|
1246
|
+
const isImageElement = ref(props.clickedElement instanceof HTMLImageElement);
|
|
1247
|
+
const currentSrc = ref(props.src);
|
|
1248
|
+
const currentAlt = ref(props.alt);
|
|
1249
|
+
const FullscreenImgElement = ref();
|
|
1250
|
+
const ImgElement = ref();
|
|
1251
|
+
const hasAnimationBasedOnImageClicked = computed(
|
|
1252
|
+
() => isImageElement.value && props.animated && !props.scaleAnimation
|
|
1253
|
+
);
|
|
1254
|
+
const hasBasicScaleAnimation = computed(
|
|
1255
|
+
() => (isImageElement.value || !props.animated) && !props.scaleAnimation
|
|
1256
|
+
);
|
|
1257
|
+
const isLandscapeImage = ref(false);
|
|
1258
|
+
const imageZoomClasses = computed(() => {
|
|
1259
|
+
if (isZoomed.value) {
|
|
1260
|
+
return `--is-zoomed maz-cursor-zoom-in maz-max-w-[none] ${isLandscapeImage.value ? "maz-h-screen maz-w-auto" : "maz-h-auto maz-w-screen"}`;
|
|
1261
|
+
}
|
|
1262
|
+
return `cursor-zoom-out ${isLandscapeImage.value ? "maz-w-screen maz-h-screen --is-landscape" : "maz-h-screen maz-w-auto"}`;
|
|
1263
|
+
});
|
|
1264
|
+
function onImageLoaded() {
|
|
1265
|
+
imageLoaded.value = true;
|
|
1266
|
+
showLoader.value = false;
|
|
1267
|
+
loadedOnce.value = true;
|
|
1268
|
+
}
|
|
1269
|
+
function close() {
|
|
1270
|
+
emits("before-close");
|
|
1271
|
+
showFullscreenImg.value = false;
|
|
1272
|
+
}
|
|
1273
|
+
function keydownLister(e) {
|
|
1274
|
+
if (e.key === "Escape") {
|
|
1275
|
+
e.preventDefault();
|
|
1276
|
+
close();
|
|
1277
|
+
}
|
|
1278
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
1279
|
+
e.preventDefault();
|
|
1280
|
+
nextPreviousImage(e.key === "ArrowRight");
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
function addClassToDocument() {
|
|
1284
|
+
document.documentElement.classList.add("--m-fullscreen-open");
|
|
1285
|
+
}
|
|
1286
|
+
function removeClassFromDocument() {
|
|
1287
|
+
document.documentElement.classList.remove("--m-fullscreen-open");
|
|
1288
|
+
}
|
|
1289
|
+
function getAllInstances() {
|
|
1290
|
+
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
1291
|
+
}
|
|
1292
|
+
function getNewInstanceIndex(allInstances, newInstanceIndex) {
|
|
1293
|
+
return newInstanceIndex < 0 ? allInstances.length - 1 : newInstanceIndex >= allInstances.length ? 0 : newInstanceIndex;
|
|
1294
|
+
}
|
|
1295
|
+
async function useNextInstance(currentInstance, nextInstance) {
|
|
1296
|
+
currentInstance.classList.remove(props.openInstanceClass);
|
|
1297
|
+
nextInstance.classList.add(props.openInstanceClass);
|
|
1298
|
+
const src = nextInstance.getAttribute("data-src");
|
|
1299
|
+
const alt = nextInstance.getAttribute("data-alt");
|
|
1300
|
+
currentAlt.value = alt ?? void 0;
|
|
1301
|
+
if (src) {
|
|
1302
|
+
currentSrc.value = src;
|
|
1303
|
+
}
|
|
1304
|
+
imageLoaded.value = false;
|
|
1305
|
+
await sleep(300);
|
|
1306
|
+
if (!imageLoaded.value) {
|
|
1307
|
+
showLoader.value = true;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
function nextPreviousImage(isNext) {
|
|
1311
|
+
const currentInstance = document.querySelector(
|
|
1312
|
+
`.m-fullscreen-img-instance.${props.openInstanceClass}`
|
|
1313
|
+
);
|
|
1314
|
+
if (currentInstance) {
|
|
1315
|
+
const allInstances = getAllInstances();
|
|
1316
|
+
const currentInstanceIndex = allInstances.indexOf(currentInstance);
|
|
1317
|
+
const newInstanceIndex = isNext ? currentInstanceIndex + 1 : currentInstanceIndex - 1;
|
|
1318
|
+
const nextInstance = allInstances[getNewInstanceIndex(allInstances, newInstanceIndex)];
|
|
1319
|
+
if (nextInstance) {
|
|
1320
|
+
useNextInstance(currentInstance, nextInstance);
|
|
1321
|
+
}
|
|
1322
|
+
emits(isNext ? "next" : "previous");
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
async function toogleZoom(event) {
|
|
1326
|
+
const imgElement = event.target;
|
|
1327
|
+
imgElement.style.width = `${imgElement.clientWidth}px`;
|
|
1328
|
+
imgElement.style.height = `${imgElement.clientHeight}px`;
|
|
1329
|
+
await sleep(0);
|
|
1330
|
+
isZoomed.value = !isZoomed.value;
|
|
1331
|
+
imgElement.style.removeProperty("width");
|
|
1332
|
+
imgElement.style.removeProperty("height");
|
|
1333
|
+
await sleep(0);
|
|
1334
|
+
const zoomTargetRatio = imgElement.clientWidth / event.clientY;
|
|
1335
|
+
const height = window.innerWidth / zoomTargetRatio;
|
|
1336
|
+
const offset = height - window.innerHeight / 2;
|
|
1337
|
+
vueScrollTo.scrollTo(imgElement, 200, {
|
|
1338
|
+
container: imgElement.parentElement,
|
|
1339
|
+
easing: "linear",
|
|
1340
|
+
offset: isZoomed.value ? offset : 0
|
|
1341
|
+
});
|
|
1342
|
+
}
|
|
1343
|
+
onMounted$1(async () => {
|
|
1344
|
+
await nextTick();
|
|
1345
|
+
document.addEventListener("keydown", keydownLister);
|
|
1346
|
+
showFullscreenImg.value = true;
|
|
1347
|
+
showLoader.value = true;
|
|
1348
|
+
addClassToDocument();
|
|
1349
|
+
hasMultipleInstances.value = getAllInstances().length > 1;
|
|
1350
|
+
if (ImgElement.value) {
|
|
1351
|
+
isLandscapeImage.value = props.clickedElementBounds.height < props.clickedElementBounds.width;
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
function setClikedElementProperties() {
|
|
1355
|
+
if (ImgElement.value) {
|
|
1356
|
+
animationActive.value = true;
|
|
1357
|
+
ImgElement.value.style.removeProperty("margin-left");
|
|
1358
|
+
ImgElement.value.style.removeProperty("margin-right");
|
|
1359
|
+
ImgElement.value.style.opacity = "0.5";
|
|
1360
|
+
ImgElement.value.style.width = `${props.clickedElementBounds.width}px`;
|
|
1361
|
+
ImgElement.value.style.height = `${props.clickedElementBounds.height}px`;
|
|
1362
|
+
ImgElement.value.style.top = `${props.clickedElementBounds.top}px`;
|
|
1363
|
+
ImgElement.value.style.left = `${props.clickedElementBounds.left}px`;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
async function onAnimationEnter() {
|
|
1367
|
+
await sleep(0);
|
|
1368
|
+
if (ImgElement.value) {
|
|
1369
|
+
ImgElement.value.style.opacity = "1";
|
|
1370
|
+
ImgElement.value.style.removeProperty("height");
|
|
1371
|
+
ImgElement.value.style.removeProperty("width");
|
|
1372
|
+
ImgElement.value.style.removeProperty("transform");
|
|
1373
|
+
const windowWidth = window.innerWidth;
|
|
1374
|
+
const windowHeight = window.innerHeight;
|
|
1375
|
+
const initalElementHeight = props.clickedElementBounds.height;
|
|
1376
|
+
const initalElementWidth = props.clickedElementBounds.width;
|
|
1377
|
+
if (isLandscapeImage.value) {
|
|
1378
|
+
ImgElement.value.style.left = `0px`;
|
|
1379
|
+
const imageHeight = initalElementHeight * windowWidth / initalElementWidth;
|
|
1380
|
+
const top = (windowHeight - imageHeight) / 2;
|
|
1381
|
+
ImgElement.value.style.top = `${top <= 0 ? 0 : top}px`;
|
|
1382
|
+
} else {
|
|
1383
|
+
ImgElement.value.style.top = "0px";
|
|
1384
|
+
const imageWidth = initalElementWidth * windowHeight / initalElementHeight;
|
|
1385
|
+
const left = (windowWidth - imageWidth) / 2;
|
|
1386
|
+
ImgElement.value.style.left = `${left <= 0 ? 0 : left}px`;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
function onAnimationEnterFinish() {
|
|
1391
|
+
if (ImgElement.value) {
|
|
1392
|
+
ImgElement.value.style.removeProperty("top");
|
|
1393
|
+
ImgElement.value.style.removeProperty("left");
|
|
1394
|
+
ImgElement.value.style.marginLeft = "auto";
|
|
1395
|
+
ImgElement.value.style.marginRight = "auto";
|
|
1396
|
+
ImgElement.value.style.removeProperty("opacity");
|
|
1397
|
+
}
|
|
1398
|
+
animationActive.value = false;
|
|
1399
|
+
}
|
|
1400
|
+
function onAnimationBeforeLeave() {
|
|
1401
|
+
if (ImgElement.value) {
|
|
1402
|
+
const { left, top } = ImgElement.value.getBoundingClientRect();
|
|
1403
|
+
ImgElement.value.style.left = `${left}px`;
|
|
1404
|
+
ImgElement.value.style.top = `${top}px`;
|
|
1405
|
+
ImgElement.value.style.width = `${ImgElement.value.width}px`;
|
|
1406
|
+
ImgElement.value.style.height = `${ImgElement.value.height}px`;
|
|
1407
|
+
animationActive.value = true;
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
function onAnimationLeaveFinish() {
|
|
1411
|
+
var _a, _b;
|
|
1412
|
+
emits("close");
|
|
1413
|
+
(_a = FullscreenImgElement.value) == null ? void 0 : _a.remove();
|
|
1414
|
+
(_b = props.destroy) == null ? void 0 : _b.call(props);
|
|
1415
|
+
}
|
|
1416
|
+
onBeforeUnmount(() => {
|
|
1417
|
+
document.removeEventListener("keydown", keydownLister);
|
|
1418
|
+
removeClassFromDocument();
|
|
1419
|
+
});
|
|
1420
|
+
return (_ctx, _cache) => {
|
|
1421
|
+
return openBlock(), createElementBlock("div", {
|
|
1422
|
+
ref_key: "FullscreenImgElement",
|
|
1423
|
+
ref: FullscreenImgElement,
|
|
1424
|
+
role: "button",
|
|
1425
|
+
class: normalizeClass(["m-fullscreen-img", { "--animation-active": animationActive.value }]),
|
|
1426
|
+
tabindex: "0",
|
|
1427
|
+
onClick: withModifiers(close, ["self"]),
|
|
1428
|
+
onKeypress: withKeys(withModifiers(close, ["prevent"]), ["esc"])
|
|
1429
|
+
}, [
|
|
1430
|
+
withDirectives(createVNode(
|
|
1431
|
+
MazSpinner,
|
|
1432
|
+
{ class: "m-fullscreen-img-loader maz-h-16" },
|
|
1433
|
+
null,
|
|
1434
|
+
512
|
|
1435
|
+
/* NEED_PATCH */
|
|
1436
|
+
), [
|
|
1437
|
+
[vShow, showLoader.value]
|
|
1438
|
+
]),
|
|
1439
|
+
loadedOnce.value && hasMultipleInstances.value ? (openBlock(), createElementBlock("button", {
|
|
1440
|
+
key: 0,
|
|
1441
|
+
type: "button",
|
|
1442
|
+
class: "m-fullscreen-btn --next",
|
|
1443
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => nextPreviousImage(true), ["stop"]))
|
|
1444
|
+
}, [
|
|
1445
|
+
createVNode(unref(ChevronLeft), { class: "maz-rotate-90 maz-text-2xl" })
|
|
1446
|
+
])) : createCommentVNode("v-if", true),
|
|
1447
|
+
showFullscreenImg.value && loadedOnce.value && hasMultipleInstances.value ? (openBlock(), createElementBlock("button", {
|
|
1448
|
+
key: 1,
|
|
1449
|
+
type: "button",
|
|
1450
|
+
class: "m-fullscreen-btn --previous",
|
|
1451
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => nextPreviousImage(false), ["stop"]))
|
|
1452
|
+
}, [
|
|
1453
|
+
createVNode(unref(ChevronLeft), { class: "maz-text-2xl" })
|
|
1454
|
+
])) : createCommentVNode("v-if", true),
|
|
1455
|
+
createElementVNode("button", {
|
|
1456
|
+
type: "button",
|
|
1457
|
+
class: "m-fullscreen-btn --close",
|
|
1458
|
+
onClick: close
|
|
1459
|
+
}, [
|
|
1460
|
+
createVNode(unref(XIcon), { class: "maz-text-2xl" })
|
|
1461
|
+
]),
|
|
1462
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
1463
|
+
createVNode(Transition, {
|
|
1464
|
+
name: hasBasicScaleAnimation.value ? void 0 : "maz-scale-fade",
|
|
1465
|
+
onBeforeEnter: _cache[3] || (_cache[3] = ($event) => hasAnimationBasedOnImageClicked.value && setClikedElementProperties()),
|
|
1466
|
+
onEnter: _cache[4] || (_cache[4] = ($event) => hasAnimationBasedOnImageClicked.value && onAnimationEnter()),
|
|
1467
|
+
onAfterEnter: _cache[5] || (_cache[5] = ($event) => hasAnimationBasedOnImageClicked.value && onAnimationEnterFinish()),
|
|
1468
|
+
onBeforeLeave: _cache[6] || (_cache[6] = ($event) => hasAnimationBasedOnImageClicked.value && onAnimationBeforeLeave()),
|
|
1469
|
+
onLeave: _cache[7] || (_cache[7] = ($event) => hasAnimationBasedOnImageClicked.value && setClikedElementProperties()),
|
|
1470
|
+
onAfterLeave: onAnimationLeaveFinish,
|
|
1471
|
+
persisted: ""
|
|
1472
|
+
}, {
|
|
1473
|
+
default: withCtx(() => [
|
|
1474
|
+
withDirectives(createElementVNode("img", {
|
|
1475
|
+
id: "ZvImgElement",
|
|
1476
|
+
ref_key: "ImgElement",
|
|
1477
|
+
ref: ImgElement,
|
|
1478
|
+
src: currentSrc.value,
|
|
1479
|
+
alt: currentAlt.value,
|
|
1480
|
+
tabindex: "0",
|
|
1481
|
+
class: normalizeClass([{ zoomable: _ctx.zoom }, imageZoomClasses.value]),
|
|
1482
|
+
onLoad: onImageLoaded,
|
|
1483
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.zoom ? toogleZoom($event) : void 0)
|
|
1484
|
+
}, null, 42, _hoisted_3$1), [
|
|
1485
|
+
[vShow, showFullscreenImg.value]
|
|
1486
|
+
])
|
|
1487
|
+
]),
|
|
1488
|
+
_: 1
|
|
1489
|
+
/* STABLE */
|
|
1490
|
+
}, 8, ["name"])
|
|
1491
|
+
])
|
|
1492
|
+
], 42, _hoisted_1$1);
|
|
1493
|
+
};
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
const MazFullscreenImg_vue_vue_type_style_index_0_lang = "";
|
|
1497
|
+
const MazFullscreenImg_vue_vue_type_style_index_1_scoped_86a68575_lang = "";
|
|
1498
|
+
const MazFullscreenImg = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-86a68575"]]);
|
|
1499
|
+
const STATE_OPEN_CLASS = "m-fullscreen-is-open";
|
|
1500
|
+
class FullscreenImgHandler {
|
|
1501
|
+
constructor() {
|
|
1502
|
+
__publicField(this, "options");
|
|
1503
|
+
__publicField(this, "defaultOptions", {
|
|
1504
|
+
scaleOnHover: false,
|
|
1505
|
+
blurOnHover: false,
|
|
1506
|
+
disabled: false,
|
|
1507
|
+
animated: true,
|
|
1508
|
+
zoom: true,
|
|
1509
|
+
scaleAnimation: false
|
|
1510
|
+
});
|
|
1511
|
+
__publicField(this, "mouseEnterListener");
|
|
1512
|
+
__publicField(this, "mouseLeaveListener");
|
|
1513
|
+
__publicField(this, "renderPreviewListener");
|
|
1514
|
+
}
|
|
1515
|
+
buildOptions(el, binding) {
|
|
1516
|
+
const options = typeof binding.value === "object" ? binding.value : { src: binding.value, alt: void 0 };
|
|
1517
|
+
const src = (options == null ? void 0 : options.src) ?? this.getImgSrc(el);
|
|
1518
|
+
const alt = (options == null ? void 0 : options.alt) ?? this.getImgAlt(el);
|
|
1519
|
+
return {
|
|
1520
|
+
...this.defaultOptions,
|
|
1521
|
+
...options,
|
|
1522
|
+
src,
|
|
1523
|
+
alt
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
get allInstances() {
|
|
1527
|
+
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
1528
|
+
}
|
|
1529
|
+
getImgSrc(el) {
|
|
1530
|
+
var _a;
|
|
1531
|
+
const imgSrc = ((_a = this.options) == null ? void 0 : _a.src) || el.getAttribute("src") || el.getAttribute("data-src");
|
|
1532
|
+
if (!imgSrc) {
|
|
1533
|
+
throw new Error(
|
|
1534
|
+
'[maz-ui](fullscreen-img) src of image must be provided by `v-fullscreen=""`, `v-fullscreen="{ src: "" }"`, `src=""` or `data-src=""` atributes'
|
|
1535
|
+
);
|
|
1536
|
+
}
|
|
1537
|
+
return imgSrc;
|
|
1538
|
+
}
|
|
1539
|
+
getImgAlt(el) {
|
|
1540
|
+
var _a;
|
|
1541
|
+
return ((_a = this.options) == null ? void 0 : _a.alt) || el.getAttribute("alt") || el.getAttribute("data-alt");
|
|
1542
|
+
}
|
|
1543
|
+
create(el, binding) {
|
|
1544
|
+
this.options = this.buildOptions(el, binding);
|
|
1545
|
+
if (this.options.disabled)
|
|
1546
|
+
return;
|
|
1547
|
+
el.style.cursor = "move";
|
|
1548
|
+
if (this.options.scaleOnHover || this.options.blurOnHover) {
|
|
1549
|
+
el.style.transition = "all 300ms ease-in-out";
|
|
1550
|
+
}
|
|
1551
|
+
el.classList.add("m-fullscreen-img-instance");
|
|
1552
|
+
el.setAttribute("data-src", this.getImgSrc(el));
|
|
1553
|
+
const alt = this.getImgAlt(el);
|
|
1554
|
+
if (alt) {
|
|
1555
|
+
el.setAttribute("data-alt", alt);
|
|
1556
|
+
}
|
|
1557
|
+
this.mouseEnterListener = () => this.mouseEnter(el);
|
|
1558
|
+
this.mouseLeaveListener = () => this.mouseLeave(el);
|
|
1559
|
+
this.renderPreviewListener = () => this.renderPreview(el);
|
|
1560
|
+
el.addEventListener("mouseenter", this.mouseEnterListener);
|
|
1561
|
+
el.addEventListener("mouseleave", this.mouseLeaveListener);
|
|
1562
|
+
el.addEventListener("click", this.renderPreviewListener);
|
|
1563
|
+
}
|
|
1564
|
+
update(el, binding) {
|
|
1565
|
+
this.options = this.buildOptions(el, binding);
|
|
1566
|
+
}
|
|
1567
|
+
remove(el) {
|
|
1568
|
+
el.removeEventListener("mouseenter", this.mouseEnterListener);
|
|
1569
|
+
el.removeEventListener("mouseleave", this.mouseLeaveListener);
|
|
1570
|
+
el.removeEventListener("click", this.renderPreviewListener);
|
|
1571
|
+
el.classList.remove("m-fullscreen-img-instance");
|
|
1572
|
+
el.style.cursor = "";
|
|
1573
|
+
}
|
|
1574
|
+
renderPreview(el) {
|
|
1575
|
+
el.classList.add(STATE_OPEN_CLASS);
|
|
1576
|
+
return mount(MazFullscreenImg, {
|
|
1577
|
+
props: {
|
|
1578
|
+
...this.options,
|
|
1579
|
+
openInstanceClass: STATE_OPEN_CLASS,
|
|
1580
|
+
clickedElement: el,
|
|
1581
|
+
clickedElementBounds: el.getBoundingClientRect()
|
|
1582
|
+
},
|
|
1583
|
+
addDestroyInProps: true
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
mouseLeave(el) {
|
|
1587
|
+
if (this.options.scaleOnHover)
|
|
1588
|
+
el.style.transform = "";
|
|
1589
|
+
if (this.options.blurOnHover)
|
|
1590
|
+
el.style.filter = "";
|
|
1591
|
+
el.style.zIndex = "";
|
|
1592
|
+
}
|
|
1593
|
+
mouseEnter(el) {
|
|
1594
|
+
el.style.zIndex = "1";
|
|
1595
|
+
if (this.options.scaleOnHover)
|
|
1596
|
+
el.style.transform = "scale(1.05)";
|
|
1597
|
+
if (this.options.blurOnHover)
|
|
1598
|
+
el.style.filter = "blur(3px)";
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
let instance$2;
|
|
1602
|
+
const vFullscreenImg = {
|
|
1603
|
+
mounted(el, binding) {
|
|
1604
|
+
instance$2 = new FullscreenImgHandler();
|
|
1605
|
+
return instance$2.create(el, binding);
|
|
1606
|
+
},
|
|
1607
|
+
updated(el, binding) {
|
|
1608
|
+
return instance$2.update(el, binding);
|
|
1609
|
+
},
|
|
1610
|
+
unmounted(el) {
|
|
1611
|
+
return instance$2.remove(el);
|
|
1612
|
+
}
|
|
1613
|
+
};
|
|
1614
|
+
const vFullscreenImgInstall = {
|
|
1615
|
+
install(app) {
|
|
1616
|
+
app.directive("fullscreen-img", vFullscreenImg);
|
|
1617
|
+
}
|
|
1618
|
+
};
|
|
1123
1619
|
const directives = [
|
|
1124
1620
|
{
|
|
1125
1621
|
name: "click-outside",
|
|
@@ -1136,6 +1632,10 @@ const directives = [
|
|
|
1136
1632
|
{
|
|
1137
1633
|
name: "lazy-img",
|
|
1138
1634
|
directive: vLazyImg
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
name: "fullscreen-img",
|
|
1638
|
+
directive: vFullscreenImg
|
|
1139
1639
|
}
|
|
1140
1640
|
];
|
|
1141
1641
|
const installDirectives = {
|
|
@@ -1151,7 +1651,7 @@ const capitalize = (value) => {
|
|
|
1151
1651
|
value = value.toString();
|
|
1152
1652
|
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
1153
1653
|
};
|
|
1154
|
-
const DEFAULT_OPTIONS$
|
|
1654
|
+
const DEFAULT_OPTIONS$5 = {
|
|
1155
1655
|
style: "currency",
|
|
1156
1656
|
minimumFractionDigits: 2,
|
|
1157
1657
|
round: false
|
|
@@ -1176,7 +1676,7 @@ const validRequiredAttributes = (number2, locale, options) => {
|
|
|
1176
1676
|
};
|
|
1177
1677
|
const currency = (number2, locale, options) => {
|
|
1178
1678
|
const options_ = {
|
|
1179
|
-
...DEFAULT_OPTIONS$
|
|
1679
|
+
...DEFAULT_OPTIONS$5,
|
|
1180
1680
|
...options
|
|
1181
1681
|
};
|
|
1182
1682
|
validRequiredAttributes(number2, locale, options_);
|
|
@@ -1186,7 +1686,7 @@ const currency = (number2, locale, options) => {
|
|
|
1186
1686
|
throw new Error(`[maz-ui](FilterCurrency) ${error}`);
|
|
1187
1687
|
}
|
|
1188
1688
|
};
|
|
1189
|
-
const DEFAULT_OPTIONS$
|
|
1689
|
+
const DEFAULT_OPTIONS$4 = {
|
|
1190
1690
|
month: "short",
|
|
1191
1691
|
day: "numeric",
|
|
1192
1692
|
year: "numeric"
|
|
@@ -1198,7 +1698,7 @@ const date = (date2, locale, options) => {
|
|
|
1198
1698
|
if (typeof locale !== "string") {
|
|
1199
1699
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
|
|
1200
1700
|
}
|
|
1201
|
-
const opts = options ?? DEFAULT_OPTIONS$
|
|
1701
|
+
const opts = options ?? DEFAULT_OPTIONS$4;
|
|
1202
1702
|
try {
|
|
1203
1703
|
const usedDate = date2 instanceof Date ? date2 : new Date(date2);
|
|
1204
1704
|
return new Intl.DateTimeFormat(locale, opts).format(usedDate);
|
|
@@ -1206,12 +1706,12 @@ const date = (date2, locale, options) => {
|
|
|
1206
1706
|
throw new Error(`[maz-ui](FilterDate) ${error}`);
|
|
1207
1707
|
}
|
|
1208
1708
|
};
|
|
1209
|
-
const DEFAULT_OPTIONS$
|
|
1709
|
+
const DEFAULT_OPTIONS$3 = {
|
|
1210
1710
|
minimumFractionDigits: 2
|
|
1211
1711
|
};
|
|
1212
1712
|
const number = (number2, locale, options) => {
|
|
1213
1713
|
const filterOptions = {
|
|
1214
|
-
...DEFAULT_OPTIONS$
|
|
1714
|
+
...DEFAULT_OPTIONS$3,
|
|
1215
1715
|
...options
|
|
1216
1716
|
};
|
|
1217
1717
|
if (number2 === void 0) {
|
|
@@ -1266,33 +1766,6 @@ class ToasterTimer {
|
|
|
1266
1766
|
clearTimeout(this.timer);
|
|
1267
1767
|
}
|
|
1268
1768
|
}
|
|
1269
|
-
const _hoisted_1$1 = {
|
|
1270
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1271
|
-
width: "1em",
|
|
1272
|
-
height: "1em",
|
|
1273
|
-
fill: "none",
|
|
1274
|
-
viewBox: "0 0 24 24"
|
|
1275
|
-
};
|
|
1276
|
-
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode(
|
|
1277
|
-
"path",
|
|
1278
|
-
{
|
|
1279
|
-
stroke: "currentColor",
|
|
1280
|
-
"stroke-linecap": "round",
|
|
1281
|
-
"stroke-linejoin": "round",
|
|
1282
|
-
"stroke-width": "1.5",
|
|
1283
|
-
d: "M6 18 18 6M6 6l12 12"
|
|
1284
|
-
},
|
|
1285
|
-
null,
|
|
1286
|
-
-1
|
|
1287
|
-
/* HOISTED */
|
|
1288
|
-
);
|
|
1289
|
-
const _hoisted_3$1 = [
|
|
1290
|
-
_hoisted_2$1
|
|
1291
|
-
];
|
|
1292
|
-
function render(_ctx, _cache) {
|
|
1293
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
|
|
1294
|
-
}
|
|
1295
|
-
const XIcon = { render };
|
|
1296
1769
|
const _hoisted_1 = { class: "m-toast__message-wrapper" };
|
|
1297
1770
|
const _hoisted_2 = { class: "m-toast__message" };
|
|
1298
1771
|
const _hoisted_3 = {
|
|
@@ -1454,15 +1927,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1454
1927
|
}
|
|
1455
1928
|
});
|
|
1456
1929
|
const MazToast_vue_vue_type_style_index_0_lang = "";
|
|
1457
|
-
const
|
|
1458
|
-
const
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
return target;
|
|
1930
|
+
const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
|
|
1931
|
+
const MazToast = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6a8f0d79"]]);
|
|
1932
|
+
const DEFAULT_OPTIONS$2 = {
|
|
1933
|
+
position: "bottom-right",
|
|
1934
|
+
timeout: 1e4,
|
|
1935
|
+
persistent: false
|
|
1464
1936
|
};
|
|
1465
|
-
const MazToast = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70723f14"]]);
|
|
1466
1937
|
class ToasterHandler {
|
|
1467
1938
|
constructor(app, globalOptions) {
|
|
1468
1939
|
this.app = app;
|
|
@@ -1471,6 +1942,7 @@ class ToasterHandler {
|
|
|
1471
1942
|
show(message, options) {
|
|
1472
1943
|
const localOptions = { message, ...options };
|
|
1473
1944
|
const propsData = {
|
|
1945
|
+
...DEFAULT_OPTIONS$2,
|
|
1474
1946
|
...localOptions,
|
|
1475
1947
|
...this.globalOptions,
|
|
1476
1948
|
...options
|
|
@@ -1499,18 +1971,10 @@ class ToasterHandler {
|
|
|
1499
1971
|
return this.show(message, this.getLocalOptions("warning", options));
|
|
1500
1972
|
}
|
|
1501
1973
|
}
|
|
1502
|
-
const defaultOptions = {
|
|
1503
|
-
position: "bottom-right",
|
|
1504
|
-
timeout: 1e4,
|
|
1505
|
-
persistent: true
|
|
1506
|
-
};
|
|
1507
1974
|
let toastInstance;
|
|
1508
1975
|
const installToaster = {
|
|
1509
1976
|
install(app, options) {
|
|
1510
|
-
toastInstance = new ToasterHandler(app,
|
|
1511
|
-
...defaultOptions,
|
|
1512
|
-
...options
|
|
1513
|
-
});
|
|
1977
|
+
toastInstance = new ToasterHandler(app, options);
|
|
1514
1978
|
app.provide("toast", toastInstance);
|
|
1515
1979
|
}
|
|
1516
1980
|
};
|
|
@@ -1552,9 +2016,6 @@ const plugin$1 = {
|
|
|
1552
2016
|
app.provide("wait", instance$1);
|
|
1553
2017
|
}
|
|
1554
2018
|
};
|
|
1555
|
-
const sleep = (ms) => {
|
|
1556
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
1557
|
-
};
|
|
1558
2019
|
const DEFAULT_OPTIONS$1 = {
|
|
1559
2020
|
delay: 100,
|
|
1560
2021
|
observer: {
|
|
@@ -1564,7 +2025,8 @@ const DEFAULT_OPTIONS$1 = {
|
|
|
1564
2025
|
},
|
|
1565
2026
|
animation: {
|
|
1566
2027
|
once: true,
|
|
1567
|
-
duration: 300
|
|
2028
|
+
duration: 300,
|
|
2029
|
+
delay: 0
|
|
1568
2030
|
}
|
|
1569
2031
|
};
|
|
1570
2032
|
class AosHandler {
|
|
@@ -1582,13 +2044,6 @@ class AosHandler {
|
|
|
1582
2044
|
}
|
|
1583
2045
|
};
|
|
1584
2046
|
}
|
|
1585
|
-
runAnimations() {
|
|
1586
|
-
if (isClient()) {
|
|
1587
|
-
return this.handleObserver();
|
|
1588
|
-
} else {
|
|
1589
|
-
console.warn("[MazAos](runAnimations) should be executed on client side");
|
|
1590
|
-
}
|
|
1591
|
-
}
|
|
1592
2047
|
async handleObserver() {
|
|
1593
2048
|
await sleep(this.options.delay);
|
|
1594
2049
|
const observer = new IntersectionObserver(this.handleIntersect.bind(this), {
|
|
@@ -1609,6 +2064,13 @@ class AosHandler {
|
|
|
1609
2064
|
}
|
|
1610
2065
|
}
|
|
1611
2066
|
}
|
|
2067
|
+
runAnimations() {
|
|
2068
|
+
if (isClient()) {
|
|
2069
|
+
return this.handleObserver();
|
|
2070
|
+
} else {
|
|
2071
|
+
console.warn("[MazAos](runAnimations) should be executed on client side");
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
1612
2074
|
handleIntersect(entries, observer) {
|
|
1613
2075
|
for (const entry of entries) {
|
|
1614
2076
|
const target = entry.target;
|
|
@@ -1629,12 +2091,19 @@ class AosHandler {
|
|
|
1629
2091
|
const useOnce = typeof once === "string" ? once === "true" : this.options.animation.once;
|
|
1630
2092
|
if (typeof this.options.observer.threshold === "number" && entry.intersectionRatio > this.options.observer.threshold) {
|
|
1631
2093
|
const duration = element.getAttribute("data-maz-aos-duration");
|
|
2094
|
+
const delay = element.getAttribute("data-maz-aos-delay");
|
|
1632
2095
|
if (!duration) {
|
|
1633
2096
|
element.style.transitionDuration = `${this.options.animation.duration}ms`;
|
|
1634
2097
|
setTimeout(() => {
|
|
1635
2098
|
element.style.transitionDuration = "0";
|
|
1636
2099
|
}, 1e3);
|
|
1637
2100
|
}
|
|
2101
|
+
if (!delay) {
|
|
2102
|
+
element.style.transitionDelay = `${this.options.animation.delay}ms`;
|
|
2103
|
+
setTimeout(() => {
|
|
2104
|
+
element.style.transitionDelay = "0";
|
|
2105
|
+
}, 1e3);
|
|
2106
|
+
}
|
|
1638
2107
|
element.classList.add("maz-aos-animate");
|
|
1639
2108
|
if (useOnce) {
|
|
1640
2109
|
observer.unobserve(element);
|
|
@@ -1737,52 +2206,28 @@ const useInstanceUniqId = ({
|
|
|
1737
2206
|
instance: instance2,
|
|
1738
2207
|
providedId
|
|
1739
2208
|
}) => {
|
|
1740
|
-
|
|
1741
|
-
return {
|
|
1742
|
-
instanceId
|
|
1743
|
-
};
|
|
2209
|
+
return computed(() => providedId ?? `${componentName}-${instance2 == null ? void 0 : instance2.uid}`);
|
|
1744
2210
|
};
|
|
1745
2211
|
const useAos = () => {
|
|
1746
|
-
|
|
1747
|
-
return {
|
|
1748
|
-
aos
|
|
1749
|
-
};
|
|
2212
|
+
return injectStrict("aos");
|
|
1750
2213
|
};
|
|
1751
2214
|
const useWait = () => {
|
|
1752
|
-
|
|
1753
|
-
return {
|
|
1754
|
-
wait
|
|
1755
|
-
};
|
|
2215
|
+
return injectStrict("wait");
|
|
1756
2216
|
};
|
|
1757
2217
|
const useToast = () => {
|
|
1758
|
-
|
|
1759
|
-
return {
|
|
1760
|
-
toast
|
|
1761
|
-
};
|
|
2218
|
+
return injectStrict("toast");
|
|
1762
2219
|
};
|
|
1763
|
-
const handler$1 = ref();
|
|
1764
2220
|
const useIdleTimeout = ({
|
|
1765
2221
|
callback,
|
|
1766
2222
|
options
|
|
1767
2223
|
}) => {
|
|
1768
|
-
|
|
1769
|
-
handler$1.value = instance2;
|
|
1770
|
-
const idle = handler$1;
|
|
1771
|
-
return {
|
|
1772
|
-
idle
|
|
1773
|
-
};
|
|
2224
|
+
return new IdleTimeout(callback, options);
|
|
1774
2225
|
};
|
|
1775
|
-
const handler = ref();
|
|
1776
2226
|
const useUserVisibility = ({
|
|
1777
2227
|
callback,
|
|
1778
2228
|
options
|
|
1779
2229
|
}) => {
|
|
1780
|
-
|
|
1781
|
-
handler.value = instance2;
|
|
1782
|
-
const visibility = handler;
|
|
1783
|
-
return {
|
|
1784
|
-
visibility
|
|
1785
|
-
};
|
|
2230
|
+
return new UserVisibility(callback, options);
|
|
1786
2231
|
};
|
|
1787
2232
|
export {
|
|
1788
2233
|
AosHandler,
|
|
@@ -1805,7 +2250,7 @@ export {
|
|
|
1805
2250
|
isClient,
|
|
1806
2251
|
mount,
|
|
1807
2252
|
number,
|
|
1808
|
-
sleep
|
|
2253
|
+
sleep,
|
|
1809
2254
|
theme,
|
|
1810
2255
|
toastInstance,
|
|
1811
2256
|
truthyFilter,
|
|
@@ -1820,6 +2265,8 @@ export {
|
|
|
1820
2265
|
plugin$5 as vClickOutsideInstall,
|
|
1821
2266
|
directive as vClosable,
|
|
1822
2267
|
plugin$4 as vClosableInstall,
|
|
2268
|
+
vFullscreenImg,
|
|
2269
|
+
vFullscreenImgInstall,
|
|
1823
2270
|
vLazyImg,
|
|
1824
2271
|
plugin$2 as vLazyImgInstall,
|
|
1825
2272
|
vZoomImg,
|