@wikicasa-dev/components 2.5.3-alpha.18 → 2.5.3-alpha.19

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-controller.css';/* empty css */
1
+ import '../../assets/swiper-autoplay.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-controller.css';/* empty css */
1
+ import '../../assets/swiper-autoplay.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-controller.css';/* empty css */
1
+ import '../../assets/swiper-autoplay.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-controller.css';/* empty css */
1
+ import '../../assets/swiper-autoplay.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,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
  };
@@ -2,10 +2,12 @@ import { Nullable } from '@wikicasa-dev/types';
2
2
  import { SwiperModuleDescriptor } from '../../../../lazyModules/Swiper/types';
3
3
  import { InjectionKey } from 'vue';
4
4
  import { Swiper, SwiperOptions } from 'swiper/types';
5
+ import { ClassTypeProp } from '../../../UIKit/types';
5
6
  export declare const setLazyImagesLoaderKey: InjectionKey<(v: boolean) => void>;
6
7
  export declare const addModuleDescriptorKey: InjectionKey<(m: Nullable<SwiperModuleDescriptor>) => void>;
7
8
  export type SwiperRootPrimitiveProps = Omit<SwiperOptions, "pagination" | "navigation">;
8
9
  declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
10
+ rootClasses?: ClassTypeProp;
9
11
  swiperOptions?: SwiperRootPrimitiveProps;
10
12
  }, {
11
13
  swiper: import('vue').ShallowRef<Nullable<Swiper>, Nullable<Swiper>>;
@@ -17,6 +19,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
17
19
  activeIndex: number;
18
20
  }) => any;
19
21
  }, string, import('vue').PublicProps, Readonly<{
22
+ rootClasses?: ClassTypeProp;
20
23
  swiperOptions?: SwiperRootPrimitiveProps;
21
24
  }> & Readonly<{
22
25
  onClick?: (() => any) | undefined;
@@ -26,7 +29,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
26
29
  }) => any) | undefined;
27
30
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
28
31
  root: HTMLDivElement;
29
- }, any>, {
32
+ }, HTMLDivElement>, {
30
33
  default?(_: {}): any;
31
34
  placeholder?(_: {}): any;
32
35
  }>;
@@ -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 P } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
2
2
  import { default as v } from "./packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js";
3
- import './assets/SwiperSlideImagePrimitive.css';import './assets/SwiperCarousel.css';import './assets/SwiperRootPrimitive.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/SwiperRootPrimitive.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 T } from "./packages/components/lib/UIKit/Accordion/AccordionItemPrimitive.vue.js";
5
5
  import { default as h } from "./packages/components/lib/UIKit/Accordion/AccordionHeaderPrimitive.vue.js";
6
6
  import { default as w } from "./packages/components/lib/UIKit/Accordion/AccordionTriggerPrimitive.vue.js";
@@ -1,22 +1,22 @@
1
- import { defineComponent as A, useAttrs as N, shallowRef as w, useTemplateRef as g, onMounted as C, provide as P, createElementBlock as I, openBlock as k, createElementVNode as B, createCommentVNode as K, mergeProps as R, unref as D, renderSlot as T, nextTick as U } from "vue";
2
- import { createSwiper as $ } from "../../../../../../Swiper/factory.js";
3
- import { AutoplayModule as q } from "../../../../../../Swiper/Autoplay/factory.js";
4
- import { KeyboardModule as Z } from "../../../../../../Swiper/Keyboard/factory.js";
5
- import { ZoomModule as j } from "../../../../../../Swiper/Zoom/factory.js";
6
- const F = { class: "uikit-relative" }, G = {
1
+ import { defineComponent as V, shallowRef as w, useTemplateRef as x, onMounted as N, provide as I, createElementBlock as P, openBlock as k, createElementVNode as A, createCommentVNode as g, normalizeClass as B, renderSlot as T, nextTick as K } from "vue";
2
+ import { createSwiper as R } from "../../../../../../Swiper/factory.js";
3
+ import { AutoplayModule as D } from "../../../../../../Swiper/Autoplay/factory.js";
4
+ import { KeyboardModule as U } from "../../../../../../Swiper/Keyboard/factory.js";
5
+ import { ZoomModule as $ } from "../../../../../../Swiper/Zoom/factory.js";
6
+ const q = { class: "uikit-relative" }, Z = {
7
7
  key: 0,
8
8
  class: "uikit-absolute uikit-inset-0"
9
- }, H = /* @__PURE__ */ Symbol(), J = /* @__PURE__ */ Symbol(), te = /* @__PURE__ */ A({
10
- inheritAttrs: !1,
9
+ }, j = /* @__PURE__ */ Symbol(), F = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ V({
11
10
  __name: "SwiperRootPrimitive",
12
11
  props: {
12
+ rootClasses: {},
13
13
  swiperOptions: {}
14
14
  },
15
15
  emits: ["moved", "click", "init"],
16
- setup(o, { expose: h, emit: S }) {
17
- const d = S, E = N(), s = w(null), u = g("root"), l = w(!1), O = !!o.swiperOptions?.keyboard, b = !!o.swiperOptions?.autoplay, m = [];
16
+ setup(o, { expose: S, emit: h }) {
17
+ const d = h, s = w(null), u = x("root"), l = w(!1), E = !!o.swiperOptions?.keyboard, O = !!o.swiperOptions?.autoplay, m = [];
18
18
  let c = !1;
19
- const z = (e) => [
19
+ const b = (e) => [
20
20
  ...e?.querySelectorAll("img[data-src]") ?? []
21
21
  ], p = (e) => {
22
22
  e.src = e.dataset.src || "", e.srcset = e.dataset.srcset || "", e.dataset.src = "", e.dataset.srcset = "", e.removeAttribute("lazy");
@@ -24,14 +24,14 @@ const F = { class: "uikit-relative" }, G = {
24
24
  if (!c) return [];
25
25
  const i = e.params.lazyPreloadPrevNext ?? 0, a = [];
26
26
  for (let n = t - i; n <= t + i; n++)
27
- a.push(...z(e.slides[n]));
27
+ a.push(...b(e.slides[n]));
28
28
  return a;
29
29
  }, f = () => {
30
- U(() => {
30
+ K(() => {
31
31
  l.value = !0, d("init");
32
32
  });
33
- }, L = async (e) => {
34
- s.value = await $(
33
+ }, z = async (e) => {
34
+ s.value = await R(
35
35
  e,
36
36
  {
37
37
  on: {
@@ -44,19 +44,19 @@ const F = { class: "uikit-relative" }, G = {
44
44
  let a;
45
45
  const n = new Promise(
46
46
  (r) => a = setTimeout(r, 6e3)
47
- ), V = Promise.all(
47
+ ), L = Promise.all(
48
48
  i.map((r) => {
49
- const x = r.complete ? Promise.resolve() : new Promise((y) => {
49
+ const M = r.complete ? Promise.resolve() : new Promise((y) => {
50
50
  r.addEventListener("load", () => y(), { once: !0 }), r.addEventListener("error", () => y(), {
51
51
  once: !0
52
52
  });
53
53
  });
54
- return p(r), x;
54
+ return p(r), M;
55
55
  })
56
56
  ).finally(() => {
57
57
  clearTimeout(a);
58
58
  });
59
- await Promise.race([V, n]), f();
59
+ await Promise.race([L, n]), f();
60
60
  },
61
61
  slideChange: (t) => {
62
62
  d("moved", { activeIndex: t.activeIndex }), v(t, t.activeIndex).forEach(
@@ -67,40 +67,41 @@ const F = { class: "uikit-relative" }, G = {
67
67
  ...o.swiperOptions
68
68
  },
69
69
  [
70
- j(o.swiperOptions?.zoom),
71
- O ? Z(o.swiperOptions?.keyboard) : void 0,
72
- b ? q(o.swiperOptions.autoplay) : void 0,
70
+ $(o.swiperOptions?.zoom),
71
+ E ? U(o.swiperOptions?.keyboard) : void 0,
72
+ O ? D(o.swiperOptions.autoplay) : void 0,
73
73
  ...m
74
74
  ].filter(Boolean)
75
75
  );
76
76
  };
77
- C(() => {
78
- u.value && setTimeout(() => L(u.value));
77
+ N(() => {
78
+ u.value && setTimeout(() => z(u.value));
79
79
  });
80
- const M = (e) => {
80
+ const C = (e) => {
81
81
  !s.value || s.value.params.slidesPerView === e || (s.value.params.slidesPerView = e, s.value.update());
82
82
  };
83
- return P(J, (e) => {
83
+ return I(F, (e) => {
84
84
  e && m.push(e);
85
- }), P(H, (e) => {
85
+ }), I(j, (e) => {
86
86
  e !== c && (c = e);
87
- }), h({
87
+ }), S({
88
88
  swiper: s,
89
- updateSlidesPerView: M
90
- }), (e, t) => (k(), I("div", F, [
91
- B("div", R({ ref: "root" }, D(E), {
92
- class: ["swiper uikit-carousel", { "is-initialized": l.value }]
93
- }), [
89
+ updateSlidesPerView: C
90
+ }), (e, t) => (k(), P("div", q, [
91
+ A("div", {
92
+ ref: "root",
93
+ class: B(["swiper uikit-carousel", [{ "is-initialized": l.value }, o.rootClasses]])
94
+ }, [
94
95
  T(e.$slots, "default")
95
- ], 16),
96
- l.value ? K("", !0) : (k(), I("div", G, [
96
+ ], 2),
97
+ l.value ? g("", !0) : (k(), P("div", Z, [
97
98
  T(e.$slots, "placeholder")
98
99
  ]))
99
100
  ]));
100
101
  }
101
102
  });
102
103
  export {
103
- J as addModuleDescriptorKey,
104
- te as default,
105
- H as setLazyImagesLoaderKey
104
+ F as addModuleDescriptorKey,
105
+ Y as default,
106
+ j as setLazyImagesLoaderKey
106
107
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.5.3-alpha.18",
3
+ "version": "2.5.3-alpha.19",
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}