@wikicasa-dev/components 2.5.3-alpha.25 → 2.5.3-alpha.27

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