maz-ui 3.22.4 → 3.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MazAvatar.mjs +2 -2
- package/components/MazBackdrop.mjs +67 -107
- package/components/MazBadge.mjs +41 -50
- package/components/MazBottomSheet.mjs +2 -2
- package/components/MazBtn.mjs +2 -2
- package/components/MazCard.mjs +2 -2
- package/components/MazCarousel.mjs +2 -2
- package/components/MazChart.mjs +53 -63
- package/components/MazCheckbox.mjs +84 -128
- package/components/MazDialog.mjs +2 -2
- package/components/MazDialogPromise.mjs +3 -3
- package/components/MazDrawer.mjs +2 -2
- package/components/MazDropdown.mjs +2 -2
- package/components/MazDropzone.mjs +2 -2
- package/components/MazFullscreenLoader.mjs +14 -18
- package/components/MazGallery.mjs +352 -558
- package/components/MazIcon.mjs +76 -140
- package/components/MazInput.mjs +2 -2
- package/components/MazInputNumber.mjs +72 -99
- package/components/MazInputPrice.mjs +2 -2
- package/components/MazInputTags.mjs +2 -2
- package/components/MazLazyImg.mjs +2 -2
- package/components/MazPhoneNumberInput.mjs +2 -2
- package/components/MazPicker.mjs +2 -2
- package/components/MazRadio.mjs +65 -94
- package/components/MazRadioButtons.mjs +64 -78
- package/components/MazSelect.mjs +2 -2
- package/components/MazSlider.mjs +213 -325
- package/components/MazSpinner.mjs +25 -34
- package/components/MazStepper.mjs +2 -2
- package/components/MazSwitch.mjs +43 -60
- package/components/MazTabs.mjs +16 -25
- package/components/MazTabsBar.mjs +2 -2
- package/components/MazTabsContent.mjs +34 -43
- package/components/MazTabsContentItem.mjs +49 -63
- package/components/MazTextarea.mjs +124 -169
- package/components/MazTransitionExpand.mjs +36 -54
- package/components/assets/MazBackdrop.css +1 -1
- package/components/assets/MazBottomSheet.css +1 -1
- package/components/assets/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazDrawer.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/chunks/MazAvatar-1636f58b.mjs +126 -0
- package/components/chunks/MazBottomSheet-c24f92f8.mjs +217 -0
- package/components/chunks/MazBtn-124f3700.mjs +153 -0
- package/components/chunks/MazBtn-1e61862b.mjs +153 -0
- package/components/chunks/MazBtn-2d1d1ba5.mjs +153 -0
- package/components/chunks/MazBtn-3d74f737.mjs +153 -0
- package/components/chunks/MazBtn-4a447126.mjs +153 -0
- package/components/chunks/MazBtn-555928ed.mjs +153 -0
- package/components/chunks/MazBtn-571454f6.mjs +153 -0
- package/components/chunks/MazBtn-5e426592.mjs +153 -0
- package/components/chunks/MazBtn-683effc1.mjs +153 -0
- package/components/chunks/MazBtn-6905cc39.mjs +153 -0
- package/components/chunks/MazBtn-6ce4cfd3.mjs +153 -0
- package/components/chunks/MazBtn-74656d5b.mjs +153 -0
- package/components/chunks/MazBtn-7706b2da.mjs +158 -0
- package/components/chunks/MazBtn-a7a913dd.mjs +153 -0
- package/components/chunks/MazBtn-fb3c7af8.mjs +153 -0
- package/components/chunks/MazCard-bcc36489.mjs +214 -0
- package/components/chunks/MazCarousel-6da75122.mjs +107 -0
- package/components/chunks/MazCheckbox-040dc2c4.mjs +117 -0
- package/components/chunks/MazCheckbox-3a2b48b4.mjs +117 -0
- package/components/chunks/MazDialog-44eda544.mjs +250 -0
- package/components/chunks/MazDialogPromise-eec5acde.mjs +419 -0
- package/components/chunks/MazDrawer-b628b37e.mjs +206 -0
- package/components/chunks/MazDropdown-6f2248b0.mjs +345 -0
- package/components/chunks/MazDropzone-8cac10a6.mjs +242 -0
- package/components/chunks/MazGallery-6b8ecedf.mjs +617 -0
- package/components/chunks/MazIcon-52a76873.mjs +101 -0
- package/components/chunks/MazIcon-95e31ff8.mjs +96 -0
- package/components/chunks/MazInput-1ed4f946.mjs +283 -0
- package/components/chunks/MazInput-8a217995.mjs +271 -0
- package/components/chunks/MazInput-c51881ea.mjs +278 -0
- package/components/chunks/MazInputPrice-cd348d46.mjs +392 -0
- package/components/chunks/MazInputTags-aa95fae7.mjs +446 -0
- package/components/chunks/MazLazyImg-0412ab38.mjs +259 -0
- package/components/chunks/MazLazyImg-47d3449a.mjs +254 -0
- package/components/chunks/MazPhoneNumberInput-e1bf46f9.mjs +1216 -0
- package/components/chunks/MazPicker-e4620d8b.mjs +1140 -0
- package/components/chunks/MazPickerCalendar-da62262c.mjs +535 -0
- package/components/chunks/MazPickerHeader-a2e041eb.mjs +186 -0
- package/components/chunks/MazPickerMonthSwitcher-5bf8bd08.mjs +97 -0
- package/components/chunks/MazPickerShortcuts-7f95430e.mjs +74 -0
- package/components/chunks/MazPickerTime-717402ae.mjs +219 -0
- package/components/chunks/MazPickerYearSwitcher-85f97b6d.mjs +106 -0
- package/components/chunks/MazSelect-6ff6bb96.mjs +652 -0
- package/components/chunks/MazSpinner-054f948c.mjs +39 -0
- package/components/chunks/MazSpinner-059ee1d2.mjs +39 -0
- package/components/chunks/MazSpinner-08ee440b.mjs +39 -0
- package/components/chunks/MazSpinner-13403729.mjs +39 -0
- package/components/chunks/MazSpinner-44011019.mjs +39 -0
- package/components/chunks/MazSpinner-452a1534.mjs +39 -0
- package/components/chunks/MazSpinner-4c02cfd2.mjs +39 -0
- package/components/chunks/MazSpinner-51aa73ca.mjs +39 -0
- package/components/chunks/MazSpinner-6d1d24d5.mjs +39 -0
- package/components/chunks/MazSpinner-6e7c4705.mjs +39 -0
- package/components/chunks/MazSpinner-7895f54f.mjs +39 -0
- package/components/chunks/MazSpinner-7eee202e.mjs +39 -0
- package/components/chunks/MazSpinner-805e14a6.mjs +39 -0
- package/components/chunks/MazSpinner-85080b43.mjs +39 -0
- package/components/chunks/MazSpinner-a13a50c9.mjs +39 -0
- package/components/chunks/MazSpinner-a6d61cee.mjs +43 -0
- package/components/chunks/MazSpinner-c67b05bb.mjs +39 -0
- package/components/chunks/MazSpinner-caa33afc.mjs +39 -0
- package/components/chunks/MazSpinner-cb8fbe9a.mjs +39 -0
- package/components/chunks/MazSpinner-d9ef329f.mjs +39 -0
- package/components/chunks/MazStepper-39f018f3.mjs +191 -0
- package/components/chunks/MazTabsBar-27965f16.mjs +132 -0
- package/components/chunks/MazTransitionExpand-55cfbecb.mjs +41 -0
- package/components/chunks/MazTransitionExpand-cd24498f.mjs +41 -0
- package/components/chunks/_plugin-vue_export-helper-dad06003.mjs +9 -0
- package/components/chunks/check-31d7ba2f.mjs +30 -0
- package/components/chunks/check-c9b483c0.mjs +30 -0
- package/components/chunks/{check-circle-7acfa4c4.mjs → check-circle-59c383ed.mjs} +10 -12
- package/components/chunks/chevron-down-2b60111a.mjs +30 -0
- package/components/chunks/chevron-left-39b4621e.mjs +30 -0
- package/components/chunks/chevron-right-949a60fa.mjs +30 -0
- package/components/chunks/debounce-19c516b6.mjs +11 -0
- package/components/chunks/examples.mobile.json-f63d22fb.mjs +4 -0
- package/components/chunks/{exclamation-circle-2e115536.mjs → exclamation-circle-e2620aab.mjs} +10 -12
- package/components/chunks/{exclamation-triangle-10eb48dc.mjs → exclamation-triangle-21bf116a.mjs} +10 -12
- package/components/chunks/{eye-fbb13657.mjs → eye-dc12ce09.mjs} +12 -15
- package/components/chunks/{eye-slash-342420ff.mjs → eye-slash-fa42a017.mjs} +10 -12
- package/components/chunks/{magnifying-glass-5dffa35e.mjs → magnifying-glass-908981c0.mjs} +10 -12
- package/components/chunks/minus-e71140e1.mjs +30 -0
- package/components/chunks/no-photography-4c6c77cf.mjs +4 -0
- package/components/chunks/{no-photography-b0d08d6f.mjs → no-photography-be94ddda.mjs} +12 -15
- package/components/chunks/{no-symbol-975ce547.mjs → no-symbol-87477ad0.mjs} +10 -12
- package/components/chunks/{pencil-2f766dc8.mjs → pencil-4c35b4e7.mjs} +10 -12
- package/components/chunks/plus-c20544c3.mjs +30 -0
- package/components/chunks/x-mark-35f2f1e7.mjs +30 -0
- package/components/chunks/x-mark-7761acf4.mjs +29 -0
- package/modules/chunks/MazBtn-2f302422.cjs +1 -0
- package/modules/chunks/MazBtn-760c3b29.mjs +153 -0
- package/modules/chunks/MazIcon-0bd6b78e.mjs +96 -0
- package/modules/chunks/MazIcon-599a907f.cjs +1 -0
- package/modules/chunks/MazSpinner-03bd76bd.mjs +39 -0
- package/modules/chunks/MazSpinner-6ffa8db1.cjs +1 -0
- package/modules/chunks/{arrow-top-right-on-square-32bbe5a1.mjs → arrow-top-right-on-square-15191934.mjs} +10 -12
- package/modules/chunks/arrow-top-right-on-square-8e4ea6e2.cjs +1 -0
- package/modules/chunks/chevron-left-36731110.cjs +1 -0
- package/modules/chunks/chevron-left-39b4621e.mjs +30 -0
- package/modules/chunks/index-6a90ef88.mjs +1618 -0
- package/modules/chunks/index-794680d2.cjs +124 -0
- package/modules/chunks/{link-4eb05848.mjs → link-bb14441d.mjs} +10 -12
- package/modules/chunks/link-c7791a2a.cjs +1 -0
- package/modules/chunks/no-photography-0f6fcaf4.cjs +1 -0
- package/modules/chunks/no-photography-4c6c77cf.mjs +4 -0
- package/modules/chunks/x-mark-35f2f1e7.mjs +30 -0
- package/modules/chunks/x-mark-a28deca5.cjs +1 -0
- package/modules/index.cjs +1 -0
- package/modules/index.mjs +42 -42
- package/nuxt/index.json +1 -1
- package/package.json +14 -4
- package/types/resolvers/index.d.ts +1 -0
- package/types/resolvers/unplugin-vue-components-resolver.d.ts +8 -0
- package/types/utils/index.d.ts +3 -0
- package/components/chunks/MazAvatar-358d78d4.mjs +0 -138
- package/components/chunks/MazBottomSheet-61090f4a.mjs +0 -267
- package/components/chunks/MazBtn-0e02f0da.mjs +0 -184
- package/components/chunks/MazBtn-1daf9063.mjs +0 -184
- package/components/chunks/MazBtn-2f4fa942.mjs +0 -184
- package/components/chunks/MazBtn-31c6b731.mjs +0 -184
- package/components/chunks/MazBtn-48382169.mjs +0 -184
- package/components/chunks/MazBtn-4e1e116e.mjs +0 -184
- package/components/chunks/MazBtn-50abc4c5.mjs +0 -184
- package/components/chunks/MazBtn-84e12b6a.mjs +0 -184
- package/components/chunks/MazBtn-b42e3575.mjs +0 -184
- package/components/chunks/MazBtn-b56a7278.mjs +0 -184
- package/components/chunks/MazBtn-bbd6e9c8.mjs +0 -184
- package/components/chunks/MazBtn-cf0c8fcb.mjs +0 -184
- package/components/chunks/MazBtn-d92908b2.mjs +0 -191
- package/components/chunks/MazBtn-f48da79c.mjs +0 -184
- package/components/chunks/MazBtn-fec4c3b7.mjs +0 -184
- package/components/chunks/MazCard-4331dca0.mjs +0 -237
- package/components/chunks/MazCarousel-7825c7c9.mjs +0 -133
- package/components/chunks/MazCheckbox-ab5ddda2.mjs +0 -153
- package/components/chunks/MazCheckbox-e0bbe6ec.mjs +0 -153
- package/components/chunks/MazDialog-83e54b8c.mjs +0 -290
- package/components/chunks/MazDialogPromise-6967e821.mjs +0 -474
- package/components/chunks/MazDrawer-d778b3d2.mjs +0 -256
- package/components/chunks/MazDropdown-6f4482d7.mjs +0 -426
- package/components/chunks/MazDropzone-d1bb62dc.mjs +0 -325
- package/components/chunks/MazGallery-b2dc4286.mjs +0 -821
- package/components/chunks/MazIcon-b779da0a.mjs +0 -159
- package/components/chunks/MazIcon-bda198b4.mjs +0 -165
- package/components/chunks/MazInput-713b00d0.mjs +0 -326
- package/components/chunks/MazInput-b9386887.mjs +0 -341
- package/components/chunks/MazInput-c33627dd.mjs +0 -334
- package/components/chunks/MazInputPrice-452297f5.mjs +0 -481
- package/components/chunks/MazInputTags-7a463b81.mjs +0 -526
- package/components/chunks/MazLazyImg-6e395356.mjs +0 -336
- package/components/chunks/MazLazyImg-e0d8b6d0.mjs +0 -329
- package/components/chunks/MazPhoneNumberInput-48fe2445.mjs +0 -1536
- package/components/chunks/MazPicker-50fc11d1.mjs +0 -1352
- package/components/chunks/MazPickerCalendar-cacb361c.mjs +0 -689
- package/components/chunks/MazPickerHeader-63d45179.mjs +0 -216
- package/components/chunks/MazPickerMonthSwitcher-913c6e2c.mjs +0 -110
- package/components/chunks/MazPickerShortcuts-c6fabfc6.mjs +0 -88
- package/components/chunks/MazPickerTime-5e4475da.mjs +0 -301
- package/components/chunks/MazPickerYearSwitcher-dd4fa89c.mjs +0 -125
- package/components/chunks/MazSelect-2e5cd411.mjs +0 -850
- package/components/chunks/MazSpinner-022d7bee.mjs +0 -46
- package/components/chunks/MazSpinner-100c99b8.mjs +0 -46
- package/components/chunks/MazSpinner-191ad23b.mjs +0 -46
- package/components/chunks/MazSpinner-3155378b.mjs +0 -46
- package/components/chunks/MazSpinner-339a9006.mjs +0 -46
- package/components/chunks/MazSpinner-53979e96.mjs +0 -46
- package/components/chunks/MazSpinner-68d2f2ac.mjs +0 -46
- package/components/chunks/MazSpinner-6b563b22.mjs +0 -46
- package/components/chunks/MazSpinner-7cdc13e7.mjs +0 -46
- package/components/chunks/MazSpinner-8859d658.mjs +0 -46
- package/components/chunks/MazSpinner-8e180605.mjs +0 -52
- package/components/chunks/MazSpinner-9950424b.mjs +0 -46
- package/components/chunks/MazSpinner-c8270a93.mjs +0 -46
- package/components/chunks/MazSpinner-cb491238.mjs +0 -46
- package/components/chunks/MazSpinner-cb6f99f3.mjs +0 -46
- package/components/chunks/MazSpinner-ce4be8f1.mjs +0 -46
- package/components/chunks/MazSpinner-e5a9f319.mjs +0 -46
- package/components/chunks/MazSpinner-e92bd359.mjs +0 -46
- package/components/chunks/MazSpinner-eea9056d.mjs +0 -46
- package/components/chunks/MazSpinner-f1e69f29.mjs +0 -46
- package/components/chunks/MazStepper-4c19dbfc.mjs +0 -255
- package/components/chunks/MazTabsBar-3c2e2d69.mjs +0 -157
- package/components/chunks/MazTransitionExpand-474b00d4.mjs +0 -57
- package/components/chunks/MazTransitionExpand-f9e5a2d6.mjs +0 -57
- package/components/chunks/_plugin-vue_export-helper-cc2b3d55.mjs +0 -10
- package/components/chunks/check-8da249b1.mjs +0 -32
- package/components/chunks/check-f2fcce10.mjs +0 -32
- package/components/chunks/chevron-down-a78b9604.mjs +0 -32
- package/components/chunks/chevron-left-3365d59b.mjs +0 -32
- package/components/chunks/chevron-right-02f9e837.mjs +0 -32
- package/components/chunks/debounce-7d66ffa9.mjs +0 -12
- package/components/chunks/examples.mobile.json-618ba782.mjs +0 -4
- package/components/chunks/minus-c9cdee90.mjs +0 -32
- package/components/chunks/no-photography-7f2be516.mjs +0 -4
- package/components/chunks/plus-b1b0a5a8.mjs +0 -32
- package/components/chunks/x-mark-3b05101b.mjs +0 -31
- package/components/chunks/x-mark-c6ff45dd.mjs +0 -32
- package/modules/chunks/MazBtn-90ffd148.mjs +0 -184
- package/modules/chunks/MazIcon-988edef7.mjs +0 -159
- package/modules/chunks/MazSpinner-a16a3d8f.mjs +0 -46
- package/modules/chunks/chevron-left-3365d59b.mjs +0 -32
- package/modules/chunks/index-b1625fc2.mjs +0 -2315
- package/modules/chunks/no-photography-7f2be516.mjs +0 -4
- package/modules/chunks/x-mark-c6ff45dd.mjs +0 -32
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var H = (o, e, t) => e in o ? _(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var i = (o, e, t) => (H(o, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import "../assets/MazGallery.css";
|
|
5
|
+
import { defineComponent as B, useCssVars as S, defineAsyncComponent as O, onBeforeMount as M, computed as p, openBlock as u, createElementBlock as g, normalizeClass as y, normalizeStyle as E, createElementVNode as b, Fragment as x, renderList as C, withDirectives as w, unref as v, toDisplayString as T, createCommentVNode as L, createVNode as N } from "vue";
|
|
6
|
+
import { _ as R } from "./MazCard-bcc36489.mjs";
|
|
7
|
+
const U = `
|
|
8
|
+
.maz-zoom-img {
|
|
9
|
+
position: fixed;
|
|
10
|
+
top: 0;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
right: 0;
|
|
14
|
+
padding: 1rem;
|
|
15
|
+
z-index: 1050;
|
|
16
|
+
background-color: hsla(238, 15%, 40%, 0.7);
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.maz-zoom-img,
|
|
24
|
+
.maz-zoom-img * {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.maz-zoom-img .maz-zoom-img__wrapper {
|
|
29
|
+
position: relative;
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
align-items: center;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
min-height: 0;
|
|
35
|
+
max-width: 100%;
|
|
36
|
+
max-height: 100%;
|
|
37
|
+
transition: all 300ms ease-in-out;
|
|
38
|
+
opacity: 0;
|
|
39
|
+
transform: scale(0.5);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.maz-zoom-img.maz-animate .maz-zoom-img__wrapper {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transform: scale(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.maz-zoom-img.maz-animate .maz-zoom-img__loader {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
bottom: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
right: 0;
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
background-color: hsla(238, 15%, 40%, 0.7);
|
|
57
|
+
border-radius: 1rem;
|
|
58
|
+
z-index: 2;
|
|
59
|
+
min-width: 60px;
|
|
60
|
+
min-height: 60px;
|
|
61
|
+
}
|
|
62
|
+
.maz-zoom-img.maz-animate .maz-zoom-img__loader[hidden] {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@-webkit-keyframes spin {
|
|
67
|
+
0% { transform: rotate(0deg); }
|
|
68
|
+
100% { transform: rotate(360deg); }
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@keyframes spin {
|
|
72
|
+
0% { transform: rotate(0deg); }
|
|
73
|
+
100% { transform: rotate(360deg); }
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.maz-zoom-img.maz-animate .maz-zoom-img__loader__svg {
|
|
77
|
+
animation: spin .6s linear infinite;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.maz-zoom-img img {
|
|
81
|
+
max-width: 100%;
|
|
82
|
+
max-height: 100%;
|
|
83
|
+
min-width: 0;
|
|
84
|
+
border-radius: 1rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.maz-zoom-img .maz-zoom-btn {
|
|
88
|
+
margin: 0 auto;
|
|
89
|
+
border: none;
|
|
90
|
+
background-color: hsla(0, 0%, 7%, 0.5);
|
|
91
|
+
box-shadow: 0 0 0.5rem 0 hsla(0, 0%, 0%, 0.2);
|
|
92
|
+
height: 2.2rem;
|
|
93
|
+
min-height: 2.2rem;
|
|
94
|
+
width: 2.2rem;
|
|
95
|
+
min-width: 2.2rem;
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
border-radius: 2.2rem;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
flex: 0 0 auto;
|
|
102
|
+
outline: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.maz-zoom-img .maz-zoom-btn svg {
|
|
106
|
+
fill: white;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--close {
|
|
110
|
+
position: absolute;
|
|
111
|
+
top: 0.5rem;
|
|
112
|
+
right: 0.5rem;
|
|
113
|
+
z-index: 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--previous {
|
|
117
|
+
position: absolute;
|
|
118
|
+
left: 0.5rem;
|
|
119
|
+
z-index: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.maz-zoom-img .maz-zoom-btn.maz-zoom-btn--next {
|
|
123
|
+
position: absolute;
|
|
124
|
+
right: 0.5rem;
|
|
125
|
+
z-index: 1;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.maz-zoom-img .maz-zoom-btn:hover {
|
|
129
|
+
background-color: hsl(0, 0%, 0%);
|
|
130
|
+
}`, P = {
|
|
131
|
+
close: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',
|
|
132
|
+
next: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',
|
|
133
|
+
previous: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',
|
|
134
|
+
spinner: '<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><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"></path></svg>'
|
|
135
|
+
};
|
|
136
|
+
class $ {
|
|
137
|
+
constructor(e) {
|
|
138
|
+
i(this, "options");
|
|
139
|
+
i(this, "loader");
|
|
140
|
+
i(this, "wrapper");
|
|
141
|
+
i(this, "img");
|
|
142
|
+
i(this, "keydownHandler");
|
|
143
|
+
i(this, "onImgLoadedCallback");
|
|
144
|
+
i(this, "buttonsAdded");
|
|
145
|
+
i(this, "defaultOptions", {
|
|
146
|
+
scale: !0,
|
|
147
|
+
blur: !0,
|
|
148
|
+
disabled: !1
|
|
149
|
+
});
|
|
150
|
+
i(this, "mouseEnterListener");
|
|
151
|
+
i(this, "mouseLeaveListener");
|
|
152
|
+
i(this, "renderPreviewListener");
|
|
153
|
+
if (!e.value)
|
|
154
|
+
throw new Error(
|
|
155
|
+
'[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`'
|
|
156
|
+
);
|
|
157
|
+
if (typeof e.value == "object" && !e.value.src)
|
|
158
|
+
throw new Error("[maz-ui](zoom-img) src of image must be provided");
|
|
159
|
+
this.buttonsAdded = !1, this.options = this.buildOptions(e), this.keydownHandler = this.keydownLister.bind(this), this.loader = this.getLoader(), this.wrapper = document.createElement("div"), this.wrapper.classList.add("maz-zoom-img__wrapper"), this.wrapper.prepend(this.loader), this.img = document.createElement("img"), this.onImgLoadedCallback = this.onImgLoaded.bind(this), this.imgEventHandler(!0);
|
|
160
|
+
}
|
|
161
|
+
buildOptions(e) {
|
|
162
|
+
return {
|
|
163
|
+
...this.defaultOptions,
|
|
164
|
+
...typeof e.value == "object" ? e.value : { src: e.value }
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
get allInstances() {
|
|
168
|
+
return [...document.querySelectorAll(".maz-zoom-img-instance")];
|
|
169
|
+
}
|
|
170
|
+
create(e) {
|
|
171
|
+
this.options.disabled || (e.style.cursor = "pointer", setTimeout(() => e.classList.add("maz-zoom-img-instance")), e.setAttribute("data-zoom-src", this.options.src), this.options.alt && e.setAttribute("data-zoom-alt", this.options.alt), e.style.transition = "all 300ms ease-in-out", this.mouseEnterListener = () => this.mouseEnter(e), this.mouseLeaveListener = () => this.mouseLeave(e), this.renderPreviewListener = () => this.renderPreview(e, this.options), e.addEventListener("mouseenter", this.mouseEnterListener), e.addEventListener("mouseleave", this.mouseLeaveListener), e.addEventListener("click", this.renderPreviewListener));
|
|
172
|
+
}
|
|
173
|
+
update(e) {
|
|
174
|
+
this.options = this.buildOptions(e);
|
|
175
|
+
}
|
|
176
|
+
remove(e) {
|
|
177
|
+
this.imgEventHandler(!1), e.removeEventListener("mouseenter", this.mouseEnterListener), e.removeEventListener("mouseleave", this.mouseLeaveListener), e.removeEventListener("click", this.renderPreviewListener), e.classList.remove("maz-zoom-img-instance"), e.removeAttribute("data-zoom-src"), e.removeAttribute("data-zoom-alt"), e.style.cursor = "";
|
|
178
|
+
}
|
|
179
|
+
renderPreview(e, t) {
|
|
180
|
+
e.classList.add(
|
|
181
|
+
"maz-is-open"
|
|
182
|
+
/* OPEN */
|
|
183
|
+
), this.addStyle(U);
|
|
184
|
+
const s = document.createElement("div");
|
|
185
|
+
s.classList.add("maz-zoom-img"), s.setAttribute("id", "MazImgPreviewFullsize"), s.addEventListener("click", (a) => {
|
|
186
|
+
s.isEqualNode(a.target) && this.closePreview();
|
|
187
|
+
}), typeof t == "object" && (this.img.setAttribute("src", t.src), t.alt && this.img.setAttribute("alt", t.alt), this.img.id = "MazImgElement"), this.wrapper.append(this.img), s.append(this.wrapper), document.body.append(s), this.keyboardEventHandler(!0), setTimeout(() => {
|
|
188
|
+
s && s.classList.add("maz-animate");
|
|
189
|
+
}, 100);
|
|
190
|
+
}
|
|
191
|
+
onImgLoaded() {
|
|
192
|
+
this.wrapper.style.width = `${this.img.width}px`, this.wrapper.style.minWidth = "200px", this.loader.hidden = !0;
|
|
193
|
+
const e = this.getButton(), t = [], s = this.allInstances.length > 1;
|
|
194
|
+
if (!this.buttonsAdded) {
|
|
195
|
+
if (this.buttonsAdded = !0, s) {
|
|
196
|
+
const a = this.getButton("previous"), l = this.getButton("next");
|
|
197
|
+
t.push(a, l);
|
|
198
|
+
}
|
|
199
|
+
this.wrapper.append(e), s && (this.wrapper.prepend(t[0]), this.wrapper.append(t[1]));
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
getLoader() {
|
|
203
|
+
const e = document.createElement("div");
|
|
204
|
+
return e.classList.add("maz-zoom-img__loader"), e.innerHTML = P.spinner, e;
|
|
205
|
+
}
|
|
206
|
+
mouseLeave(e) {
|
|
207
|
+
this.options.scale && (e.style.transform = ""), this.options.blur && (e.style.filter = ""), e.style.zIndex = "";
|
|
208
|
+
}
|
|
209
|
+
mouseEnter(e) {
|
|
210
|
+
e.style.zIndex = "1", this.options.scale && (e.style.transform = "scale(1.1)"), this.options.blur && (e.style.filter = "blur(2px)");
|
|
211
|
+
}
|
|
212
|
+
keydownLister(e) {
|
|
213
|
+
e.preventDefault(), (e.key === "Escape" || e.key === " ") && this.closePreview(), (e.key === "ArrowLeft" || e.key === "ArrowRight") && this.nextPreviousImage(e.key === "ArrowRight");
|
|
214
|
+
}
|
|
215
|
+
getButton(e = "close") {
|
|
216
|
+
const t = document.createElement("button");
|
|
217
|
+
return t.innerHTML = P[e], t.addEventListener("click", () => {
|
|
218
|
+
e === "close" ? this.closePreview() : this.allInstances && this.nextPreviousImage(e === "next");
|
|
219
|
+
}), t.classList.add("maz-zoom-btn"), t.classList.add(`maz-zoom-btn--${e}`), t;
|
|
220
|
+
}
|
|
221
|
+
closePreview() {
|
|
222
|
+
const e = document.querySelector("#MazImgPreviewFullsize"), t = document.querySelector("#MazPreviewStyle"), s = document.querySelector(
|
|
223
|
+
".maz-zoom-img-instance.maz-is-open"
|
|
224
|
+
);
|
|
225
|
+
s && s.classList.remove(
|
|
226
|
+
"maz-is-open"
|
|
227
|
+
/* OPEN */
|
|
228
|
+
), e && e.classList.remove("maz-animate"), this.keyboardEventHandler(!1), setTimeout(() => {
|
|
229
|
+
e && e.remove(), t && t.remove();
|
|
230
|
+
}, 300);
|
|
231
|
+
}
|
|
232
|
+
getNewInstanceIndex(e) {
|
|
233
|
+
return e < 0 ? this.allInstances.length - 1 : e >= this.allInstances.length ? 0 : e;
|
|
234
|
+
}
|
|
235
|
+
nextPreviousImage(e) {
|
|
236
|
+
const t = e, s = document.querySelector(
|
|
237
|
+
".maz-zoom-img-instance.maz-is-open"
|
|
238
|
+
);
|
|
239
|
+
if (s) {
|
|
240
|
+
const a = this.allInstances.indexOf(s), l = t ? a + 1 : a - 1, m = this.allInstances[this.getNewInstanceIndex(l)];
|
|
241
|
+
m && this.useNextInstance(s, m);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
useNextInstance(e, t) {
|
|
245
|
+
e.classList.remove(
|
|
246
|
+
"maz-is-open"
|
|
247
|
+
/* OPEN */
|
|
248
|
+
), t.classList.add(
|
|
249
|
+
"maz-is-open"
|
|
250
|
+
/* OPEN */
|
|
251
|
+
);
|
|
252
|
+
const s = t.getAttribute("data-zoom-src"), a = t.getAttribute("data-zoom-alt");
|
|
253
|
+
this.wrapper.style.width = "", this.loader.hidden = !1, s && this.img.setAttribute("src", s), a && this.img.setAttribute("alt", a);
|
|
254
|
+
}
|
|
255
|
+
addStyle(e) {
|
|
256
|
+
const t = document.createElement("style");
|
|
257
|
+
t.id = "MazPreviewStyle", t.textContent = e, document.head.append(t);
|
|
258
|
+
}
|
|
259
|
+
keyboardEventHandler(e) {
|
|
260
|
+
if (e)
|
|
261
|
+
return document.addEventListener("keydown", this.keydownHandler);
|
|
262
|
+
document.removeEventListener("keydown", this.keydownHandler);
|
|
263
|
+
}
|
|
264
|
+
imgEventHandler(e) {
|
|
265
|
+
if (e)
|
|
266
|
+
return this.img.addEventListener("load", this.onImgLoadedCallback);
|
|
267
|
+
this.img.removeEventListener("load", this.onImgLoadedCallback);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
let z;
|
|
271
|
+
const I = {
|
|
272
|
+
created(o, e) {
|
|
273
|
+
z = new $(e), z.create(o);
|
|
274
|
+
},
|
|
275
|
+
updated(o, e) {
|
|
276
|
+
z.update(e);
|
|
277
|
+
},
|
|
278
|
+
unmounted(o) {
|
|
279
|
+
z.remove(o);
|
|
280
|
+
}
|
|
281
|
+
}, j = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", q = {
|
|
282
|
+
baseClass: "m-lazy-img",
|
|
283
|
+
loadedClass: "m-lazy-loaded",
|
|
284
|
+
loadingClass: "m-lazy-loading",
|
|
285
|
+
errorClass: "m-lazy-error",
|
|
286
|
+
noPhotoClass: "m-lazy-no-photo",
|
|
287
|
+
noPhoto: !1,
|
|
288
|
+
observerOnce: !0,
|
|
289
|
+
loadOnce: !1,
|
|
290
|
+
noUseErrorPhoto: !1,
|
|
291
|
+
observerOptions: {
|
|
292
|
+
threshold: 0.1
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
class D {
|
|
296
|
+
constructor(e = {}) {
|
|
297
|
+
i(this, "observers", []);
|
|
298
|
+
i(this, "defaultOptions", q);
|
|
299
|
+
i(this, "options");
|
|
300
|
+
i(this, "onImgLoadedCallback");
|
|
301
|
+
i(this, "onImgErrorCallback");
|
|
302
|
+
i(this, "hasImgLoaded", !1);
|
|
303
|
+
this.options = this.buildOptions(e), this.onImgLoadedCallback = this.imageIsLoaded.bind(this), this.onImgErrorCallback = this.imageHasError.bind(this);
|
|
304
|
+
}
|
|
305
|
+
async loadErrorPhoto() {
|
|
306
|
+
const { default: e } = await import("./no-photography-4c6c77cf.mjs");
|
|
307
|
+
return e;
|
|
308
|
+
}
|
|
309
|
+
buildOptions(e) {
|
|
310
|
+
return {
|
|
311
|
+
...this.defaultOptions,
|
|
312
|
+
...e,
|
|
313
|
+
observerOptions: {
|
|
314
|
+
...this.defaultOptions.observerOptions,
|
|
315
|
+
...e.observerOptions
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
removeClass(e, t) {
|
|
320
|
+
e.classList.remove(t);
|
|
321
|
+
}
|
|
322
|
+
addClass(e, t) {
|
|
323
|
+
e.classList.add(t);
|
|
324
|
+
}
|
|
325
|
+
removeAllStateClasses(e) {
|
|
326
|
+
this.removeClass(e, this.options.loadedClass), this.removeClass(e, this.options.loadingClass), this.removeClass(e, this.options.errorClass), this.removeClass(e, this.options.noPhotoClass);
|
|
327
|
+
}
|
|
328
|
+
setBaseClass(e) {
|
|
329
|
+
this.addClass(e, this.options.baseClass);
|
|
330
|
+
}
|
|
331
|
+
imageIsLoading(e) {
|
|
332
|
+
var t, s;
|
|
333
|
+
this.addClass(e, this.options.loadingClass), (s = (t = this.options).onLoading) == null || s.call(t, e);
|
|
334
|
+
}
|
|
335
|
+
imageHasNoPhoto(e) {
|
|
336
|
+
this.removeClass(e, this.options.loadingClass), this.addClass(e, this.options.noPhotoClass), this.setDefaultPhoto(e);
|
|
337
|
+
}
|
|
338
|
+
imageIsLoaded(e) {
|
|
339
|
+
var t, s;
|
|
340
|
+
this.hasImgLoaded = !0, this.removeClass(e, this.options.loadingClass), this.addClass(e, this.options.loadedClass), (s = (t = this.options).onLoaded) == null || s.call(t, e);
|
|
341
|
+
}
|
|
342
|
+
imageHasError(e, t) {
|
|
343
|
+
var s, a;
|
|
344
|
+
console.warn("[maz-ui][MazLazyImg] Error while loading image", t), this.removeClass(e, this.options.loadingClass), this.addClass(e, this.options.errorClass), (a = (s = this.options).onError) == null || a.call(s, e), this.setDefaultPhoto(e);
|
|
345
|
+
}
|
|
346
|
+
getImageUrl(e, t) {
|
|
347
|
+
const s = this.getImgElement(e).getAttribute("data-lazy-src");
|
|
348
|
+
if (s)
|
|
349
|
+
return s;
|
|
350
|
+
t.value;
|
|
351
|
+
const a = typeof t.value == "object" ? t.value.src : t.value;
|
|
352
|
+
return a || console.warn("[maz-ui][MazLazyImg] src url is not defined"), a;
|
|
353
|
+
}
|
|
354
|
+
async setPictureSourceUrls(e) {
|
|
355
|
+
const t = e.querySelectorAll("source");
|
|
356
|
+
if (t.length > 0)
|
|
357
|
+
for await (const s of t) {
|
|
358
|
+
const a = s.getAttribute("data-lazy-srcset");
|
|
359
|
+
a ? s.srcset = a : console.warn(
|
|
360
|
+
'[maz-ui][MazLazyImg] the "[data-lazy-srcset]" attribute is not provided on "<source />"'
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
else
|
|
364
|
+
console.warn(
|
|
365
|
+
'[maz-ui][MazLazyImg] No "<source />" elements provided into the "<picture />" element'
|
|
366
|
+
), this.imageHasError(e);
|
|
367
|
+
}
|
|
368
|
+
hasBgImgMode(e) {
|
|
369
|
+
return e.arg === "bg-image";
|
|
370
|
+
}
|
|
371
|
+
isPictureElement(e) {
|
|
372
|
+
return e instanceof HTMLPictureElement;
|
|
373
|
+
}
|
|
374
|
+
getImgElement(e) {
|
|
375
|
+
return this.isPictureElement(e) ? e.querySelector("img") : e;
|
|
376
|
+
}
|
|
377
|
+
async setDefaultPhoto(e) {
|
|
378
|
+
if (this.options.noUseErrorPhoto)
|
|
379
|
+
return;
|
|
380
|
+
const t = this.options.errorPhoto ?? await this.loadErrorPhoto(), s = e.querySelectorAll("source");
|
|
381
|
+
if (s.length > 0)
|
|
382
|
+
for await (const a of s)
|
|
383
|
+
a.srcset = t;
|
|
384
|
+
else
|
|
385
|
+
this.setImgSrc(e, t);
|
|
386
|
+
}
|
|
387
|
+
addEventListenerToImg(e) {
|
|
388
|
+
const t = this.getImgElement(e);
|
|
389
|
+
t.addEventListener("load", () => this.onImgLoadedCallback(e), {
|
|
390
|
+
once: !0
|
|
391
|
+
}), t.addEventListener("error", (s) => this.onImgErrorCallback(e, s), { once: !0 });
|
|
392
|
+
}
|
|
393
|
+
async loadImage(e, t) {
|
|
394
|
+
if (this.imageIsLoading(e), this.isPictureElement(e))
|
|
395
|
+
this.addEventListenerToImg(e), await this.setPictureSourceUrls(e);
|
|
396
|
+
else {
|
|
397
|
+
const s = this.getImageUrl(e, t);
|
|
398
|
+
if (!s)
|
|
399
|
+
return this.imageHasError(e);
|
|
400
|
+
this.hasBgImgMode(t) ? (e.style.backgroundImage = `url('${s}')`, this.imageIsLoaded(e)) : (this.addEventListenerToImg(e), this.setImgSrc(e, s));
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
setImgSrc(e, t) {
|
|
404
|
+
const s = this.getImgElement(e);
|
|
405
|
+
s.src = t;
|
|
406
|
+
}
|
|
407
|
+
handleIntersectionObserver(e, t, s, a) {
|
|
408
|
+
var l, m;
|
|
409
|
+
this.observers.push(a);
|
|
410
|
+
for (const c of s)
|
|
411
|
+
if (c.isIntersecting) {
|
|
412
|
+
if ((m = (l = this.options).onIntersecting) == null || m.call(l, c.target), this.options.observerOnce && a.unobserve(e), this.options.loadOnce && this.hasImgLoaded)
|
|
413
|
+
return;
|
|
414
|
+
this.loadImage(e, t);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
createObserver(e, t) {
|
|
418
|
+
const s = (m, c) => {
|
|
419
|
+
this.handleIntersectionObserver(e, t, m, c);
|
|
420
|
+
}, a = this.options.observerOptions;
|
|
421
|
+
new IntersectionObserver(s, a).observe(e);
|
|
422
|
+
}
|
|
423
|
+
async imageHandler(e, t, s) {
|
|
424
|
+
if (s === "update")
|
|
425
|
+
for await (const a of this.observers)
|
|
426
|
+
a.unobserve(e);
|
|
427
|
+
window.IntersectionObserver ? this.createObserver(e, t) : this.loadImage(e, t);
|
|
428
|
+
}
|
|
429
|
+
async bindUpdateHandler(e, t, s) {
|
|
430
|
+
if (this.options.noPhoto)
|
|
431
|
+
return this.imageHasNoPhoto(e);
|
|
432
|
+
await this.imageHandler(e, t, s);
|
|
433
|
+
}
|
|
434
|
+
async add(e, t) {
|
|
435
|
+
if (this.hasBgImgMode(t) && this.isPictureElement(e))
|
|
436
|
+
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
437
|
+
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e, j), await this.bindUpdateHandler(e, t, "bind");
|
|
438
|
+
}
|
|
439
|
+
async update(e, t) {
|
|
440
|
+
t.value !== t.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(e), await this.bindUpdateHandler(e, t, "update"));
|
|
441
|
+
}
|
|
442
|
+
remove(e, t) {
|
|
443
|
+
this.hasImgLoaded = !1, this.hasBgImgMode(t) && (e.style.backgroundImage = ""), this.removeAllStateClasses(e);
|
|
444
|
+
for (const s of this.observers)
|
|
445
|
+
s.unobserve(e);
|
|
446
|
+
this.observers = [];
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
let f;
|
|
450
|
+
const G = {
|
|
451
|
+
created(o, e) {
|
|
452
|
+
const t = typeof e.value == "object" ? e.value : {};
|
|
453
|
+
f = new D(t), f.add(o, e);
|
|
454
|
+
},
|
|
455
|
+
updated(o, e) {
|
|
456
|
+
f.update(o, e);
|
|
457
|
+
},
|
|
458
|
+
unmounted(o, e) {
|
|
459
|
+
f.remove(o, e);
|
|
460
|
+
}
|
|
461
|
+
}, V = { class: "m-gallery__wrapper maz-flex maz-flex-1" }, Z = ["alt"], F = {
|
|
462
|
+
key: 0,
|
|
463
|
+
class: "m-gallery__remaining-layer maz-flex maz-bg-overlay maz-flex-center"
|
|
464
|
+
}, W = { class: "maz-text-2xl maz-text-white" }, Q = /* @__PURE__ */ B({
|
|
465
|
+
__name: "MazGallery",
|
|
466
|
+
props: {
|
|
467
|
+
/**
|
|
468
|
+
* Array of string or object: `['https://via.placeholder.com/500', 'https://via.placeholder.com/600']` or `[{ slug: 'https://via.placeholder.com/500', alt: 'image descripton' }, { slug: 'https://via.placeholder.com/600', alt: 'image descripton' }]`
|
|
469
|
+
* */
|
|
470
|
+
images: {
|
|
471
|
+
type: Array,
|
|
472
|
+
default: () => []
|
|
473
|
+
},
|
|
474
|
+
/** Images count shown (max: 5) */
|
|
475
|
+
imagesShownCount: { type: Number, default: 5 },
|
|
476
|
+
/** Remove transparent layer with the remain count (ex: +2) */
|
|
477
|
+
noRemaining: { type: Boolean, default: !1 },
|
|
478
|
+
/** Height of gallery */
|
|
479
|
+
height: { type: [Number, String], default: 150 },
|
|
480
|
+
/** Remove default height */
|
|
481
|
+
noHeight: { type: Boolean, default: !1 },
|
|
482
|
+
/** Width of gallery */
|
|
483
|
+
width: { type: [Number, String], default: "100%" },
|
|
484
|
+
/** Remove default width */
|
|
485
|
+
noWidth: { type: Boolean, default: !1 },
|
|
486
|
+
/** Disable the border radius of the gallery */
|
|
487
|
+
noRadius: { type: Boolean, default: !1 },
|
|
488
|
+
/** Disable full size display when clicking on image */
|
|
489
|
+
noZoom: { type: Boolean, default: !1 },
|
|
490
|
+
/** Layer with photography icon when no images is provided */
|
|
491
|
+
hasEmptyLayer: { type: Boolean, default: !0 },
|
|
492
|
+
/** Lazy load image - if false, images are directly loaded */
|
|
493
|
+
lazy: { type: Boolean, default: !0 },
|
|
494
|
+
/** Disable blur effect on image hover */
|
|
495
|
+
blur: { type: Boolean, default: !0 },
|
|
496
|
+
/** Disable scale animation effect on image hover */
|
|
497
|
+
scale: { type: Boolean, default: !0 },
|
|
498
|
+
/** Choose color of borders between images - Should be a CSS color or CSS variable - Ex: `#000` or `var(--maz-color-bg-light)` */
|
|
499
|
+
separatorColor: { type: String, default: "transparent" }
|
|
500
|
+
},
|
|
501
|
+
setup(o) {
|
|
502
|
+
S((n) => ({
|
|
503
|
+
"7a2c056e": o.separatorColor
|
|
504
|
+
}));
|
|
505
|
+
const e = O(() => import("./no-photography-be94ddda.mjs")), t = o;
|
|
506
|
+
M(() => {
|
|
507
|
+
t.imagesShownCount > 5 && console.warn('[MazUI](m-gallery) The maximum of "images-shown-count" is 5');
|
|
508
|
+
});
|
|
509
|
+
const s = p(() => {
|
|
510
|
+
const n = t.noWidth, h = t.width, d = t.noHeight, r = t.height;
|
|
511
|
+
return {
|
|
512
|
+
...n ? {} : {
|
|
513
|
+
flex: "0 0 " + typeof h == "number" ? `${h}px` : h,
|
|
514
|
+
width: typeof h == "number" ? `${h}px` : h
|
|
515
|
+
},
|
|
516
|
+
...d ? {} : {
|
|
517
|
+
height: typeof r == "number" ? `${r}px` : `${r}`,
|
|
518
|
+
minHeight: typeof r == "number" ? `${r}px` : `${r}`
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
}), a = p(() => t.imagesShownCount <= 5 ? t.imagesShownCount : 5), l = p(() => t.images.length - (t.images.length < a.value ? t.images.length : a.value)), m = p(() => t.images.map(
|
|
522
|
+
(n) => typeof n == "object" ? { ...n, thumbnail: n.thumbnail ?? n.src } : { src: n, thumbnail: n, alt: void 0 }
|
|
523
|
+
)), c = p(() => m.value.slice(0, a.value)), k = p(() => m.value.slice(a.value, t.images.length)), A = (n) => l.value && n + 1 === c.value.length && !t.noRemaining;
|
|
524
|
+
return (n, h) => o.images.length > 0 || o.hasEmptyLayer ? (u(), g(
|
|
525
|
+
"div",
|
|
526
|
+
{
|
|
527
|
+
key: 0,
|
|
528
|
+
class: y(["m-gallery maz-flex", { "maz-rounded": !o.noRadius }]),
|
|
529
|
+
style: E([s.value])
|
|
530
|
+
},
|
|
531
|
+
[
|
|
532
|
+
b("section", V, [
|
|
533
|
+
(u(!0), g(
|
|
534
|
+
x,
|
|
535
|
+
null,
|
|
536
|
+
C(c.value, (d, r) => (u(), g(
|
|
537
|
+
"figure",
|
|
538
|
+
{
|
|
539
|
+
key: r,
|
|
540
|
+
class: y(["m-gallery__item !maz-my-0 maz-flex maz-flex-center", [`m-gallery__item--${r + 1}`]])
|
|
541
|
+
},
|
|
542
|
+
[
|
|
543
|
+
w(b("img", {
|
|
544
|
+
class: "m-gallery__item__image maz-flex-1",
|
|
545
|
+
src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
|
546
|
+
alt: d.alt,
|
|
547
|
+
loading: "lazy"
|
|
548
|
+
}, null, 8, Z), [
|
|
549
|
+
[v(G), { src: d.thumbnail, disabled: !o.lazy }, "bg-image"],
|
|
550
|
+
[v(I), {
|
|
551
|
+
src: d.src,
|
|
552
|
+
alt: d.alt,
|
|
553
|
+
disabled: o.noZoom || A(r),
|
|
554
|
+
blur: o.blur,
|
|
555
|
+
scale: o.scale
|
|
556
|
+
}]
|
|
557
|
+
]),
|
|
558
|
+
A(r) ? w((u(), g("div", F, [
|
|
559
|
+
b(
|
|
560
|
+
"span",
|
|
561
|
+
W,
|
|
562
|
+
"+" + T(l.value),
|
|
563
|
+
1
|
|
564
|
+
/* TEXT */
|
|
565
|
+
)
|
|
566
|
+
])), [
|
|
567
|
+
[v(I), {
|
|
568
|
+
src: d.src,
|
|
569
|
+
alt: d.alt,
|
|
570
|
+
disabled: o.noZoom,
|
|
571
|
+
blur: !1,
|
|
572
|
+
scale: o.scale
|
|
573
|
+
}]
|
|
574
|
+
]) : L("v-if", !0)
|
|
575
|
+
],
|
|
576
|
+
2
|
|
577
|
+
/* CLASS */
|
|
578
|
+
))),
|
|
579
|
+
128
|
|
580
|
+
/* KEYED_FRAGMENT */
|
|
581
|
+
)),
|
|
582
|
+
o.hasEmptyLayer && o.images.length === 0 ? (u(), g(
|
|
583
|
+
"div",
|
|
584
|
+
{
|
|
585
|
+
key: 0,
|
|
586
|
+
class: y(["empty-layer maz-flex maz-w-full maz-bg-color-light maz-text-normal maz-flex-center", { "maz-rounded-xl": !o.noRadius }]),
|
|
587
|
+
style: E([s.value])
|
|
588
|
+
},
|
|
589
|
+
[
|
|
590
|
+
N(v(e), { class: "maz-h-8 maz-w-8" })
|
|
591
|
+
],
|
|
592
|
+
6
|
|
593
|
+
/* CLASS, STYLE */
|
|
594
|
+
)) : L("v-if", !0)
|
|
595
|
+
]),
|
|
596
|
+
(u(!0), g(
|
|
597
|
+
x,
|
|
598
|
+
null,
|
|
599
|
+
C(k.value, (d, r) => w((u(), g("div", {
|
|
600
|
+
key: r,
|
|
601
|
+
class: "m-gallery__hidden"
|
|
602
|
+
})), [
|
|
603
|
+
[v(I), { src: d.src, disabled: o.noZoom }]
|
|
604
|
+
])),
|
|
605
|
+
128
|
|
606
|
+
/* KEYED_FRAGMENT */
|
|
607
|
+
))
|
|
608
|
+
],
|
|
609
|
+
6
|
|
610
|
+
/* CLASS, STYLE */
|
|
611
|
+
)) : L("v-if", !0);
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
const ee = /* @__PURE__ */ R(Q, [["__scopeId", "data-v-4e6fbc0c"]]);
|
|
615
|
+
export {
|
|
616
|
+
ee as default
|
|
617
|
+
};
|