@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.
@@ -1 +1 @@
1
- .swiper-pagination-bullet{--swiper-pagination-color: #ccc}.swiper-pagination-bullet-active{--swiper-pagination-color: #fff}
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-594f03a7]{opacity:0}.swiper.uikit-carousel.is-initialized[data-v-594f03a7]{opacity:1}
1
+ .swiper.uikit-carousel[data-v-689ffdff]{opacity:0}.swiper.uikit-carousel.is-initialized[data-v-689ffdff]{opacity:1}
@@ -1,5 +1,5 @@
1
1
  import o from "./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 "./SwiperRootPrimitive.vue.js";
2
- import { addModuleDescriptorKey as d, setLazyImagesLoaderKey as f } from "./SwiperRootPrimitive.vue.js";
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-594f03a7"]]);
6
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-689ffdff"]]);
7
7
  export {
8
8
  d as addModuleDescriptorKey,
9
9
  m as default,
10
- f as setLazyImagesLoaderKey
10
+ s as setLazyImagesLoaderKey
11
11
  };
@@ -1,72 +1,75 @@
1
- import { defineComponent as V, shallowRef as I, useTemplateRef as A, onMounted as B, provide as y, openBlock as w, createElementBlock as P, createElementVNode as D, normalizeClass as N, renderSlot as k, createCommentVNode as U } from "vue";
2
- import { createSwiper as q } from "../../../lazyModules/Swiper/factory.js";
3
- import { AutoplayModule as x } from "../../../lazyModules/Swiper/Autoplay/factory.js";
4
- import { KeyboardModule as K } from "../../../lazyModules/Swiper/Keyboard/factory.js";
5
- import { ZoomModule as R } from "../../../lazyModules/Swiper/Zoom/factory.js";
6
- const F = { class: "uikit-relative" }, G = {
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
- }, $ = /* @__PURE__ */ Symbol(), Z = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ V({
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: b, emit: h }) {
17
- const d = h, i = I(null), u = A("root"), n = I(!1), E = !!a.swiperOptions?.keyboard, S = !!a.swiperOptions?.autoplay, m = [];
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 T = (e) => {
20
+ const g = (e) => {
20
21
  "requestIdleCallback" in window ? requestIdleCallback(e) : setTimeout(e, 200);
21
- }, v = (e, o = "img") => Array.from(e?.querySelectorAll(o) ?? []), c = (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, o) => {
24
- const t = e.params.lazyPreloadPrevNext ?? 0, r = v(e.slides[o]), l = [];
25
- for (let s = o - t; s <= o + t; s++)
26
- s !== o && (!e.params.loop && (s < 0 || s >= e.slides.length) || l.push(
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
- }, C = async (e) => {
31
- const o = e.complete && e.src ? Promise.resolve() : new Promise((t) => {
32
- e.addEventListener("load", () => t(), { once: !0 }), e.addEventListener("error", () => t(), {
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 o, await e.decode?.().catch(() => {
37
- }), console.log("DEBUG:waitForImageLoad", { img: e.src });
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
- }, z = async (e) => {
41
- i.value = await q(
44
+ }, M = async (e) => {
45
+ O(e), i.value = await R(
42
46
  e,
43
47
  {
44
48
  on: {
45
- init: async (o) => {
46
- const { visibleImages: t, preloadImages: r } = f(
47
- o,
48
- o.activeIndex
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
- (M) => l = setTimeout(M, 6e3)
54
- ), g = Promise.all(
55
- t.map(C)
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([g, s]), T(() => {
62
+ await Promise.race([A, s]), g(() => {
60
63
  r.forEach(c);
61
- }), O();
64
+ }), L();
62
65
  },
63
- slideChange: (o) => {
64
- d("moved", { activeIndex: o.activeIndex });
65
- const { visibleImages: t, preloadImages: r } = f(
66
- o,
67
- o.activeIndex
66
+ slideChange: (t) => {
67
+ d("moved", { activeIndex: t.activeIndex });
68
+ const { visibleImages: o, preloadImages: r } = f(
69
+ t,
70
+ t.activeIndex
68
71
  );
69
- [...t, ...r].forEach(
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
- R(a.swiperOptions?.zoom),
78
- E ? K(a.swiperOptions?.keyboard) : void 0,
79
- S ? x(a.swiperOptions.autoplay) : void 0,
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(() => z(u.value));
88
+ u.value && setTimeout(() => M(u.value));
86
89
  });
87
- const L = (e) => {
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 y(Z, (e) => {
93
+ return h(G, (e) => {
91
94
  e && m.push(e);
92
- }), y($, (e) => {
95
+ }), h(j, (e) => {
93
96
  e !== p && (p = e);
94
- }), b({
97
+ }), S({
95
98
  swiper: i,
96
- updateSlidesPerView: L
97
- }), (e, o) => (w(), P("div", F, [
98
- D("div", {
99
+ updateSlidesPerView: V
100
+ }), (e, t) => (w(), P("div", U, [
101
+ q("div", {
99
102
  ref: "root",
100
- class: N(["swiper uikit-carousel", [{ "is-initialized": n.value }, a.rootClasses]])
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 ? U("", !0) : (w(), P("div", G, [
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
- Z as addModuleDescriptorKey,
112
- Y as default,
113
- $ as setLazyImagesLoaderKey
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/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 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/SwiperCarousel.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 */
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.6.7-alpha.2",
3
+ "version": "2.6.7-alpha.3",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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}