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