@wikicasa-dev/components 2.6.7-alpha.2 → 2.6.7-alpha.3
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/dist/assets/SwiperCarousel.css +1 -1
- package/dist/assets/SwiperPaginationPrimitive.css +1 -0
- package/dist/assets/SwiperRootPrimitive2.css +1 -1
- package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.js +1 -1
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.js +3 -3
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.vue.js +59 -56
- package/dist/components/carousel/SwiperCarousel.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/assets/SwiperCarousel2.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.no-transition[data-v-c4229b26]{transition-duration:0ms!important}.disable-select[data-v-c4229b26]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.swiper-button-disabled[data-v-c4229b26]{pointer-events:auto!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.swiper-pagination-bullet{--swiper-pagination-color: #ccc}.swiper-pagination-bullet-active{--swiper-pagination-color: #fff}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.swiper.uikit-carousel[data-v-
|
|
1
|
+
.swiper.uikit-carousel[data-v-689ffdff]{opacity:0}.swiper.uikit-carousel.is-initialized[data-v-689ffdff]{opacity:1}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import o from "./SwiperRootPrimitive.vue.js";
|
|
2
|
-
import { addModuleDescriptorKey as d, setLazyImagesLoaderKey as
|
|
2
|
+
import { addModuleDescriptorKey as d, setLazyImagesLoaderKey as s } from "./SwiperRootPrimitive.vue.js";
|
|
3
3
|
import '../../../assets/SwiperRootPrimitive2.css';import '../../../assets/SwiperRootPrimitive.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
6
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-689ffdff"]]);
|
|
7
7
|
export {
|
|
8
8
|
d as addModuleDescriptorKey,
|
|
9
9
|
m as default,
|
|
10
|
-
|
|
10
|
+
s as setLazyImagesLoaderKey
|
|
11
11
|
};
|
|
@@ -1,72 +1,75 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { createSwiper as
|
|
3
|
-
import { AutoplayModule as
|
|
4
|
-
import { KeyboardModule as
|
|
5
|
-
import { ZoomModule as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as x, shallowRef as y, useTemplateRef as I, onMounted as B, provide as h, openBlock as w, createElementBlock as P, createElementVNode as q, normalizeClass as D, renderSlot as k, createCommentVNode as K } from "vue";
|
|
2
|
+
import { createSwiper as R } from "../../../lazyModules/Swiper/factory.js";
|
|
3
|
+
import { AutoplayModule as $ } from "../../../lazyModules/Swiper/Autoplay/factory.js";
|
|
4
|
+
import { KeyboardModule as F } from "../../../lazyModules/Swiper/Keyboard/factory.js";
|
|
5
|
+
import { ZoomModule as H } from "../../../lazyModules/Swiper/Zoom/factory.js";
|
|
6
|
+
const U = { class: "uikit-relative" }, Z = {
|
|
7
7
|
key: 0,
|
|
8
|
+
ref: "placeholder",
|
|
8
9
|
class: "uikit-absolute uikit-inset-0"
|
|
9
|
-
},
|
|
10
|
+
}, j = /* @__PURE__ */ Symbol(), G = /* @__PURE__ */ Symbol(), ee = /* @__PURE__ */ x({
|
|
10
11
|
__name: "SwiperRootPrimitive",
|
|
11
12
|
props: {
|
|
12
13
|
rootClasses: {},
|
|
13
14
|
swiperOptions: {}
|
|
14
15
|
},
|
|
15
16
|
emits: ["moved", "click", "init"],
|
|
16
|
-
setup(a, { expose:
|
|
17
|
-
const d =
|
|
17
|
+
setup(a, { expose: S, emit: b }) {
|
|
18
|
+
const d = b, i = y(null), u = I("root"), T = I("placeholder"), n = y(!1), C = !!a.swiperOptions?.keyboard, E = !!a.swiperOptions?.autoplay, m = [];
|
|
18
19
|
let p = !1;
|
|
19
|
-
const
|
|
20
|
+
const g = (e) => {
|
|
20
21
|
"requestIdleCallback" in window ? requestIdleCallback(e) : setTimeout(e, 200);
|
|
21
|
-
}, v = (e,
|
|
22
|
+
}, v = (e, t = "img") => Array.from(e?.querySelectorAll(t) ?? []), c = (e) => {
|
|
22
23
|
e.src || (e.src = e.dataset.src || "", e.srcset = e.dataset.srcset || "", e.dataset.src = "", e.dataset.srcset = "", e.removeAttribute("lazy"));
|
|
23
|
-
}, f = (e,
|
|
24
|
-
const
|
|
25
|
-
for (let s =
|
|
26
|
-
s !==
|
|
24
|
+
}, f = (e, t) => {
|
|
25
|
+
const o = e.params.lazyPreloadPrevNext ?? 0, r = v(e.slides[t]), l = [];
|
|
26
|
+
for (let s = t - o; s <= t + o; s++)
|
|
27
|
+
s !== t && (!e.params.loop && (s < 0 || s >= e.slides.length) || l.push(
|
|
27
28
|
...v(e.slides[s], "img[data-src]")
|
|
28
29
|
));
|
|
29
30
|
return { visibleImages: r, preloadImages: l };
|
|
30
|
-
},
|
|
31
|
-
const
|
|
32
|
-
e.addEventListener("load", () =>
|
|
31
|
+
}, z = async (e) => {
|
|
32
|
+
const t = e.complete && e.src ? Promise.resolve() : new Promise((o) => {
|
|
33
|
+
e.addEventListener("load", () => o(), { once: !0 }), e.addEventListener("error", () => o(), {
|
|
33
34
|
once: !0
|
|
34
35
|
});
|
|
35
36
|
});
|
|
36
|
-
c(e), await
|
|
37
|
-
})
|
|
38
|
-
}, O = () => {
|
|
37
|
+
c(e), await t, await e.decode?.().catch(() => {
|
|
38
|
+
});
|
|
39
|
+
}, O = (e) => {
|
|
40
|
+
const t = T.value?.getBoundingClientRect().height ?? 0;
|
|
41
|
+
t > 0 && (e.style.minHeight = `${t}px`);
|
|
42
|
+
}, L = () => {
|
|
39
43
|
n.value = !0, d("init");
|
|
40
|
-
},
|
|
41
|
-
i.value = await
|
|
44
|
+
}, M = async (e) => {
|
|
45
|
+
O(e), i.value = await R(
|
|
42
46
|
e,
|
|
43
47
|
{
|
|
44
48
|
on: {
|
|
45
|
-
init: async (
|
|
46
|
-
const { visibleImages:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
init: async (t) => {
|
|
50
|
+
const { visibleImages: o, preloadImages: r } = f(
|
|
51
|
+
t,
|
|
52
|
+
t.activeIndex
|
|
49
53
|
);
|
|
50
|
-
console.log("DEBUG:", { visibleImages: t, preloadImages: r });
|
|
51
54
|
let l;
|
|
52
55
|
const s = new Promise(
|
|
53
|
-
(
|
|
54
|
-
),
|
|
55
|
-
|
|
56
|
+
(N) => l = setTimeout(N, 6e3)
|
|
57
|
+
), A = Promise.all(
|
|
58
|
+
o.map(z)
|
|
56
59
|
).finally(() => {
|
|
57
60
|
clearTimeout(l);
|
|
58
61
|
});
|
|
59
|
-
await Promise.race([
|
|
62
|
+
await Promise.race([A, s]), g(() => {
|
|
60
63
|
r.forEach(c);
|
|
61
|
-
}),
|
|
64
|
+
}), L();
|
|
62
65
|
},
|
|
63
|
-
slideChange: (
|
|
64
|
-
d("moved", { activeIndex:
|
|
65
|
-
const { visibleImages:
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
slideChange: (t) => {
|
|
67
|
+
d("moved", { activeIndex: t.activeIndex });
|
|
68
|
+
const { visibleImages: o, preloadImages: r } = f(
|
|
69
|
+
t,
|
|
70
|
+
t.activeIndex
|
|
68
71
|
);
|
|
69
|
-
[...
|
|
72
|
+
[...o, ...r].forEach(
|
|
70
73
|
c
|
|
71
74
|
);
|
|
72
75
|
}
|
|
@@ -74,41 +77,41 @@ const F = { class: "uikit-relative" }, G = {
|
|
|
74
77
|
...a.swiperOptions
|
|
75
78
|
},
|
|
76
79
|
[
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
H(a.swiperOptions?.zoom),
|
|
81
|
+
C ? F(a.swiperOptions?.keyboard) : void 0,
|
|
82
|
+
E ? $(a.swiperOptions.autoplay) : void 0,
|
|
80
83
|
...m
|
|
81
84
|
].filter(Boolean)
|
|
82
85
|
);
|
|
83
86
|
};
|
|
84
87
|
B(() => {
|
|
85
|
-
u.value && setTimeout(() =>
|
|
88
|
+
u.value && setTimeout(() => M(u.value));
|
|
86
89
|
});
|
|
87
|
-
const
|
|
90
|
+
const V = (e) => {
|
|
88
91
|
!i.value || i.value.params.slidesPerView === e || (i.value.params.slidesPerView = e, i.value.update());
|
|
89
92
|
};
|
|
90
|
-
return
|
|
93
|
+
return h(G, (e) => {
|
|
91
94
|
e && m.push(e);
|
|
92
|
-
}),
|
|
95
|
+
}), h(j, (e) => {
|
|
93
96
|
e !== p && (p = e);
|
|
94
|
-
}),
|
|
97
|
+
}), S({
|
|
95
98
|
swiper: i,
|
|
96
|
-
updateSlidesPerView:
|
|
97
|
-
}), (e,
|
|
98
|
-
|
|
99
|
+
updateSlidesPerView: V
|
|
100
|
+
}), (e, t) => (w(), P("div", U, [
|
|
101
|
+
q("div", {
|
|
99
102
|
ref: "root",
|
|
100
|
-
class:
|
|
103
|
+
class: D(["swiper uikit-carousel", [{ "is-initialized": n.value }, a.rootClasses]])
|
|
101
104
|
}, [
|
|
102
105
|
k(e.$slots, "default", {}, void 0, !0)
|
|
103
106
|
], 2),
|
|
104
|
-
n.value ?
|
|
107
|
+
n.value ? K("", !0) : (w(), P("div", Z, [
|
|
105
108
|
k(e.$slots, "placeholder", {}, void 0, !0)
|
|
106
|
-
]))
|
|
109
|
+
], 512))
|
|
107
110
|
]));
|
|
108
111
|
}
|
|
109
112
|
});
|
|
110
113
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
G as addModuleDescriptorKey,
|
|
115
|
+
ee as default,
|
|
116
|
+
j as setLazyImagesLoaderKey
|
|
114
117
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import o from "./SwiperCarousel.vue.js";
|
|
2
|
-
import '../../assets/
|
|
2
|
+
import '../../assets/SwiperCarousel.css';import '../../assets/SwiperPaginationPrimitive.css';/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c4229b26"]]);
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as P } from "./UIKit/Accordion/BaseAccordion.vue.js";
|
|
2
2
|
import { default as S } from "./UIKit/Accordion/BaseAccordionItem.vue.js";
|
|
3
|
-
import './assets/baseCard.css';import './assets/SwiperSlideImagePrimitive.css';import './assets/
|
|
3
|
+
import './assets/baseCard.css';import './assets/SwiperSlideImagePrimitive.css';import './assets/SwiperPaginationPrimitive.css';import './assets/BaseSnackbar.css';import './assets/baseModal.css';import './assets/BaseDropDown.css';import './assets/BaseBadge.css';import './assets/ClearableAutocomplete.css';import './assets/BaseAutocomplete.css';import './assets/baseAlert.css';import './assets/AccessibleSelect.css';import './assets/RadioButtonItem.css';import './assets/BaseTabsIndicator.css';import './assets/BaseTabs.css';import './assets/CheckboxBtn.css';import './assets/BaseAccordionItem.css';/* empty css */
|
|
4
4
|
import { default as I } from "./UIKit/Accordion/AccordionItemPrimitive.vue.js";
|
|
5
5
|
import { default as h } from "./UIKit/Accordion/AccordionHeaderPrimitive.vue.js";
|
|
6
6
|
import { default as w } from "./UIKit/Accordion/AccordionTriggerPrimitive.vue.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.no-transition[data-v-c4229b26]{transition-duration:0ms!important}.disable-select[data-v-c4229b26]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.swiper-button-disabled[data-v-c4229b26]{pointer-events:auto!important}
|