@wikicasa-dev/components 2.6.7-alpha.1 → 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-f148fd97]{opacity:0}.swiper.uikit-carousel.is-initialized[data-v-f148fd97]{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 f, setLazyImagesLoaderKey as s } 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 p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f148fd97"]]);
6
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-689ffdff"]]);
7
7
  export {
8
- f as addModuleDescriptorKey,
9
- p as default,
8
+ d as addModuleDescriptorKey,
9
+ m as default,
10
10
  s as setLazyImagesLoaderKey
11
11
  };
@@ -1,24 +1,25 @@
1
- import { defineComponent as A, shallowRef as y, useTemplateRef as N, onMounted as g, provide as I, openBlock as w, createElementBlock as P, createElementVNode as q, normalizeClass as x, renderSlot as k, createCommentVNode as B } from "vue";
2
- import { createSwiper as D } from "../../../lazyModules/Swiper/factory.js";
3
- import { AutoplayModule as K } from "../../../lazyModules/Swiper/Autoplay/factory.js";
4
- import { KeyboardModule as R } from "../../../lazyModules/Swiper/Keyboard/factory.js";
5
- import { ZoomModule as U } from "../../../lazyModules/Swiper/Zoom/factory.js";
6
- const $ = { class: "uikit-relative" }, F = {
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
- }, Z = /* @__PURE__ */ Symbol(), j = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ A({
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 c = h, i = y(null), u = N("root"), n = y(!1), S = !!a.swiperOptions?.keyboard, T = !!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 E = (e) => {
20
+ const g = (e) => {
20
21
  "requestIdleCallback" in window ? requestIdleCallback(e) : setTimeout(e, 200);
21
- }, v = (e, t = "img") => Array.from(e?.querySelectorAll(t) ?? []), d = (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
24
  }, f = (e, t) => {
24
25
  const o = e.params.lazyPreloadPrevNext ?? 0, r = v(e.slides[t]), l = [];
@@ -27,18 +28,21 @@ const $ = { class: "uikit-relative" }, F = {
27
28
  ...v(e.slides[s], "img[data-src]")
28
29
  ));
29
30
  return { visibleImages: r, preloadImages: l };
30
- }, C = async (e) => {
31
+ }, z = async (e) => {
31
32
  const t = e.complete && e.src ? Promise.resolve() : new Promise((o) => {
32
33
  e.addEventListener("load", () => o(), { once: !0 }), e.addEventListener("error", () => o(), {
33
34
  once: !0
34
35
  });
35
36
  });
36
- d(e), await t, await e.decode?.().catch(() => {
37
+ c(e), await t, await e.decode?.().catch(() => {
37
38
  });
38
- }, O = () => {
39
- n.value = !0, c("init");
40
- }, z = async (e) => {
41
- i.value = await D(
39
+ }, O = (e) => {
40
+ const t = T.value?.getBoundingClientRect().height ?? 0;
41
+ t > 0 && (e.style.minHeight = `${t}px`);
42
+ }, L = () => {
43
+ n.value = !0, d("init");
44
+ }, M = async (e) => {
45
+ O(e), i.value = await R(
42
46
  e,
43
47
  {
44
48
  on: {
@@ -49,65 +53,65 @@ const $ = { class: "uikit-relative" }, F = {
49
53
  );
50
54
  let l;
51
55
  const s = new Promise(
52
- (V) => l = setTimeout(V, 6e3)
53
- ), M = Promise.all(
54
- o.map(C)
56
+ (N) => l = setTimeout(N, 6e3)
57
+ ), A = Promise.all(
58
+ o.map(z)
55
59
  ).finally(() => {
56
60
  clearTimeout(l);
57
61
  });
58
- await Promise.race([M, s]), E(() => {
59
- r.forEach(d);
60
- }), O();
62
+ await Promise.race([A, s]), g(() => {
63
+ r.forEach(c);
64
+ }), L();
61
65
  },
62
66
  slideChange: (t) => {
63
- c("moved", { activeIndex: t.activeIndex });
67
+ d("moved", { activeIndex: t.activeIndex });
64
68
  const { visibleImages: o, preloadImages: r } = f(
65
69
  t,
66
70
  t.activeIndex
67
71
  );
68
72
  [...o, ...r].forEach(
69
- d
73
+ c
70
74
  );
71
75
  }
72
76
  },
73
77
  ...a.swiperOptions
74
78
  },
75
79
  [
76
- U(a.swiperOptions?.zoom),
77
- S ? R(a.swiperOptions?.keyboard) : void 0,
78
- T ? K(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,
79
83
  ...m
80
84
  ].filter(Boolean)
81
85
  );
82
86
  };
83
- g(() => {
84
- u.value && setTimeout(() => z(u.value));
87
+ B(() => {
88
+ u.value && setTimeout(() => M(u.value));
85
89
  });
86
- const L = (e) => {
90
+ const V = (e) => {
87
91
  !i.value || i.value.params.slidesPerView === e || (i.value.params.slidesPerView = e, i.value.update());
88
92
  };
89
- return I(j, (e) => {
93
+ return h(G, (e) => {
90
94
  e && m.push(e);
91
- }), I(Z, (e) => {
95
+ }), h(j, (e) => {
92
96
  e !== p && (p = e);
93
- }), b({
97
+ }), S({
94
98
  swiper: i,
95
- updateSlidesPerView: L
96
- }), (e, t) => (w(), P("div", $, [
99
+ updateSlidesPerView: V
100
+ }), (e, t) => (w(), P("div", U, [
97
101
  q("div", {
98
102
  ref: "root",
99
- class: x(["swiper uikit-carousel", [{ "is-initialized": n.value }, a.rootClasses]])
103
+ class: D(["swiper uikit-carousel", [{ "is-initialized": n.value }, a.rootClasses]])
100
104
  }, [
101
105
  k(e.$slots, "default", {}, void 0, !0)
102
106
  ], 2),
103
- n.value ? B("", !0) : (w(), P("div", F, [
107
+ n.value ? K("", !0) : (w(), P("div", Z, [
104
108
  k(e.$slots, "placeholder", {}, void 0, !0)
105
- ]))
109
+ ], 512))
106
110
  ]));
107
111
  }
108
112
  });
109
113
  export {
110
- j as addModuleDescriptorKey,
111
- Y as default,
112
- Z as setLazyImagesLoaderKey
114
+ G as addModuleDescriptorKey,
115
+ ee as default,
116
+ j as setLazyImagesLoaderKey
113
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";
@@ -1,4 +1,4 @@
1
- import '../../../assets/swiper-thumbs.css';/* empty css */
1
+ import '../../../assets/swiper-keyboard.css';/* empty css */
2
2
  import "swiper/modules";
3
3
  import { Autoplay as m } from "swiper/modules";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import '../../../assets/swiper-thumbs.css';/* empty css */
1
+ import '../../../assets/swiper-keyboard.css';/* empty css */
2
2
  import "swiper/modules";
3
3
  import { Controller as m } from "swiper/modules";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import '../../../assets/swiper-thumbs.css';/* empty css */
1
+ import '../../../assets/swiper-keyboard.css';/* empty css */
2
2
  import "swiper/modules";
3
3
  import { Keyboard as t } from "swiper/modules";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import '../../../assets/swiper-thumbs.css';/* empty css */
1
+ import '../../../assets/swiper-keyboard.css';/* empty css */
2
2
  import "swiper/modules";
3
3
  import { Thumbs as p } from "swiper/modules";
4
4
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.6.7-alpha.1",
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}