@wikicasa-dev/components 2.5.6-alpha.7 → 2.5.6-alpha.8

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-keyboard.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-keyboard.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-keyboard.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-keyboard.css';/* empty css */
2
2
  import { Thumbs as t } from "swiper/modules";
3
3
  export {
4
4
  t as default
@@ -1,5 +1,5 @@
1
1
  import o from "../../packages/components/lib/UIKit/Card/BaseCard.vue.js";
2
- import '../../assets/BaseCard.css';/* empty css */
2
+ import '../../assets/CardRootPrimitive.css';/* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import o from "../../packages/components/lib/UIKit/Card/CardRootPrimitive.vue.js";
2
- import '../../assets/BaseCard.css';/* empty css */
2
+ import '../../assets/CardRootPrimitive.css';/* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -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
  export interface IntersectionObserverProviderProps {
2
- observeOnce?: boolean;
2
+ emitOnce?: boolean;
3
3
  skip?: boolean;
4
4
  threshold?: number;
5
5
  }
@@ -1,3 +1,6 @@
1
+ type __VLS_Props = {
2
+ observeOnce?: boolean;
3
+ };
1
4
  declare function __VLS_template(): {
2
5
  attrs: Partial<{}>;
3
6
  slots: {
@@ -14,7 +17,7 @@ declare function __VLS_template(): {
14
17
  rootEl: any;
15
18
  };
16
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
- declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
20
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
18
21
  root: HTMLDivElement;
19
22
  }, any>;
20
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,4 +1,4 @@
1
1
  import { InjectionKey, ShallowRef } from 'vue';
2
- export declare const ObserverOnceKey: InjectionKey<boolean>;
3
- export declare const ObserverKey: InjectionKey<ShallowRef<IntersectionObserver | undefined>>;
2
+ export declare const ObserveTargetKey: InjectionKey<(e: Element) => void>;
3
+ export declare const UnobserveTargetKey: InjectionKey<(e: Element) => void>;
4
4
  export declare const VisibleTargetsKey: InjectionKey<ShallowRef<Set<string>>>;
@@ -1,6 +1,6 @@
1
1
  const e = /* @__PURE__ */ Symbol(), o = /* @__PURE__ */ Symbol(), s = /* @__PURE__ */ Symbol();
2
2
  export {
3
- o as ObserverKey,
4
- e as ObserverOnceKey,
3
+ e as ObserveTargetKey,
4
+ o as UnobserveTargetKey,
5
5
  s as VisibleTargetsKey
6
6
  };
@@ -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,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 S } from "./packages/components/lib/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/CardRootPrimitive.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 "./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,45 +1,47 @@
1
- import { defineComponent as O, shallowRef as i, provide as a, onBeforeMount as h, onBeforeUnmount as y, createElementBlock as k, renderSlot as c, openBlock as B, normalizeClass as g } from "vue";
2
- import { ObserverOnceKey as p, ObserverKey as w, VisibleTargetsKey as E } from "../../../../../../components/IntersectionObserver/v2/types.js";
3
- const S = /* @__PURE__ */ O({
1
+ import { defineComponent as b, shallowRef as i, provide as l, onBeforeMount as h, onBeforeUnmount as p, createElementBlock as g, renderSlot as c, openBlock as y, normalizeClass as O } from "vue";
2
+ import { VisibleTargetsKey as k, ObserveTargetKey as B, UnobserveTargetKey as w } from "../../../../../../components/IntersectionObserver/v2/types.js";
3
+ const I = /* @__PURE__ */ b({
4
4
  __name: "IntersectionObserverProvider",
5
5
  props: {
6
- observeOnce: { type: Boolean, default: !0 },
6
+ emitOnce: { type: Boolean, default: !0 },
7
7
  skip: { type: Boolean, default: !1 },
8
8
  threshold: { default: 0 }
9
9
  },
10
10
  emits: ["intersection"],
11
11
  setup(r, { emit: u }) {
12
- const v = u, n = i(/* @__PURE__ */ new Set()), e = i(), d = (t) => {
13
- r.skip || t.forEach(({ target: o, isIntersecting: m }) => {
14
- const s = o.getAttribute("target-id");
12
+ const v = u, o = i(/* @__PURE__ */ new Set()), t = i(), d = (e) => {
13
+ r.skip || e.forEach(({ target: a, isIntersecting: m }) => {
14
+ const s = a.getAttribute("target-id");
15
15
  if (!s) return;
16
- const l = new Set(n.value);
17
- m ? (l.add(s), v("intersection"), r.observeOnce && f(o)) : l.delete(s), n.value = l;
16
+ const n = new Set(o.value);
17
+ m ? (n.add(s), v("intersection")) : n.delete(s), o.value = n;
18
18
  });
19
- }, f = (t) => {
20
- e.value && e.value.unobserve(t);
21
- }, b = () => {
22
- e.value && e.value.disconnect();
19
+ }, f = () => {
20
+ t.value?.disconnect();
23
21
  };
24
- return a(p, r.observeOnce), a(w, e), a(E, n), h(() => {
25
- e.value = new IntersectionObserver(d, {
22
+ return l(k, o), l(B, (e) => {
23
+ t.value?.observe(e);
24
+ }), l(w, (e) => {
25
+ t.value?.unobserve(e);
26
+ }), h(() => {
27
+ t.value = new IntersectionObserver(d, {
26
28
  root: null,
27
29
  //if the root is null, then we will check if the target is visible in the doc root!
28
30
  threshold: r.threshold
29
31
  });
30
- }), y(() => {
31
- b();
32
- }), (t, o) => r.observeOnce ? c(t.$slots, "default", {
32
+ }), p(() => {
33
+ f();
34
+ }), (e, a) => r.emitOnce ? c(e.$slots, "default", {
33
35
  key: 1,
34
- observer: e.value
35
- }) : (B(), k("div", {
36
+ observer: t.value
37
+ }) : (y(), g("div", {
36
38
  key: 0,
37
- class: g(t.$attrs["root-classes"])
39
+ class: O(e.$attrs["root-classes"])
38
40
  }, [
39
- c(t.$slots, "default", { observer: e.value })
41
+ c(e.$slots, "default", { observer: t.value })
40
42
  ], 2));
41
43
  }
42
44
  });
43
45
  export {
44
- S as default
46
+ I as default
45
47
  };
@@ -1,21 +1,26 @@
1
- import { defineComponent as v, useTemplateRef as c, useId as d, inject as o, computed as f, onMounted as b, createElementBlock as m, renderSlot as n, unref as a, openBlock as p } from "vue";
2
- import { ObserverOnceKey as _, ObserverKey as y, VisibleTargetsKey as g } from "../../../../../../components/IntersectionObserver/v2/types.js";
3
- const k = ["target-id"], K = /* @__PURE__ */ v({
1
+ import { defineComponent as v, useTemplateRef as c, useId as f, inject as o, computed as d, onMounted as b, watch as m, createElementBlock as g, renderSlot as n, openBlock as p, unref as T } from "vue";
2
+ import { VisibleTargetsKey as y, ObserveTargetKey as k, UnobserveTargetKey as O } from "../../../../../../components/IntersectionObserver/v2/types.js";
3
+ const _ = ["target-id"], K = /* @__PURE__ */ v({
4
4
  __name: "IntersectionObserverTarget",
5
- setup(O) {
6
- const e = c("root"), s = d(), l = o(_, void 0), r = o(y, void 0), u = o(g, void 0), t = f(
7
- () => (e.value ? u?.value.has(s) : !1) || !1
5
+ props: {
6
+ observeOnce: { type: Boolean, default: !0 }
7
+ },
8
+ setup(s) {
9
+ const e = c("root"), a = f(), i = o(y, void 0), l = o(k, void 0), u = o(O, void 0), t = d(
10
+ () => (e.value ? i?.value.has(a) : !1) || !1
8
11
  );
9
12
  return b(() => {
10
- !r?.value || !e.value || r?.value.observe(e.value);
11
- }), (i, T) => !a(l) || !t.value ? (p(), m("div", {
13
+ e.value && l?.(e.value);
14
+ }), m(t, (r) => {
15
+ s.observeOnce && r && e.value && u?.(e.value);
16
+ }), (r, h) => !s.observeOnce || !t.value ? (p(), g("div", {
12
17
  key: 0,
13
18
  ref_key: "root",
14
19
  ref: e,
15
- "target-id": a(s)
20
+ "target-id": T(a)
16
21
  }, [
17
- n(i.$slots, "default", { isVisible: t.value })
18
- ], 8, k)) : n(i.$slots, "default", {
22
+ n(r.$slots, "default", { isVisible: t.value })
23
+ ], 8, _)) : n(r.$slots, "default", {
19
24
  key: 1,
20
25
  isVisible: t.value
21
26
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.5.6-alpha.7",
3
+ "version": "2.5.6-alpha.8",
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}