@wikicasa-dev/components 2.5.4 → 2.5.6-alpha.0
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.
- package/dist/Swiper/Autoplay/index.js +1 -1
- package/dist/Swiper/Controller/index.js +1 -1
- package/dist/Swiper/Keyboard/index.js +1 -1
- package/dist/Swiper/Thumbs/index.js +1 -1
- package/dist/assets/SwiperCarousel.css +1 -1
- package/dist/assets/SwiperPaginationPrimitive.css +1 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.d.ts +29 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.js +8 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.d.ts +22 -0
- package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.js +4 -0
- package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.js +1 -1
- package/dist/components/carousel/SwiperCarousel.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +57 -53
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +6 -6
- package/dist/packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js +48 -0
- package/dist/packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverTarget.vue.js +21 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/assets/SwiperCarousel2.css +0 -1
- /package/dist/assets/{swiper-autoplay.css → swiper-thumbs.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
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}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InjectionKey, ShallowRef } from 'vue';
|
|
2
|
+
export declare const ObserverOnceKey: InjectionKey<boolean>;
|
|
3
|
+
export declare const ObserverKey: InjectionKey<ShallowRef<IntersectionObserver | undefined>>;
|
|
4
|
+
export declare const IsVisibleKey: InjectionKey<ShallowRef<boolean>>;
|
|
5
|
+
export interface IntersectionObserverProviderProps {
|
|
6
|
+
observeOnce?: boolean;
|
|
7
|
+
skip?: boolean;
|
|
8
|
+
threshold?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<IntersectionObserverProviderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
intersection: () => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<IntersectionObserverProviderProps> & Readonly<{
|
|
13
|
+
onIntersection?: (() => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
15
|
+
default?(_: {
|
|
16
|
+
observer: IntersectionObserver | undefined;
|
|
17
|
+
isVisible: boolean;
|
|
18
|
+
}): any;
|
|
19
|
+
default?(_: {
|
|
20
|
+
observer: IntersectionObserver | undefined;
|
|
21
|
+
isVisible: boolean;
|
|
22
|
+
}): any;
|
|
23
|
+
}>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import r from "../../../packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js";
|
|
2
|
+
import { IsVisibleKey as f, ObserverKey as i, ObserverOnceKey as m } from "../../../packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js";
|
|
3
|
+
export {
|
|
4
|
+
f as IsVisibleKey,
|
|
5
|
+
i as ObserverKey,
|
|
6
|
+
m as ObserverOnceKey,
|
|
7
|
+
r as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {
|
|
8
|
+
root: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
rootEl: any;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
14
|
+
root: HTMLDivElement;
|
|
15
|
+
}, any>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import o from "../../../packages/components/lib/components/carousel/Primitive/SwiperPaginationPrimitive.vue.js";
|
|
2
|
-
import '../../../assets/
|
|
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/
|
|
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.d.ts
CHANGED
|
@@ -51,6 +51,8 @@ export { default as SimpleSlider } from './UIKit/Slider/SimpleSlider';
|
|
|
51
51
|
export { default as BaseSnackbar } from './UIKit/BaseSnackbar';
|
|
52
52
|
export { default as IntersectionObservable } from './components/IntersectionObserver/IntersectionObservable';
|
|
53
53
|
export { default as IntersectionObserver } from './components/IntersectionObserver/IntersectionObserver';
|
|
54
|
+
export { default as IntersectionObserverProvider } from './components/IntersectionObserver/v2/IntersectionObserverProvider';
|
|
55
|
+
export { default as IntersectionObserverTarget } from './components/IntersectionObserver/v2/IntersectionObserverTarget';
|
|
54
56
|
export { default as SwiperCarousel } from './components/carousel/SwiperCarousel';
|
|
55
57
|
export { default as SwiperSlide } from './components/carousel/SwiperSlide';
|
|
56
58
|
export { default as SwiperRootPrimitive } from './components/carousel/Primitive/SwiperRootPrimitive';
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import './assets/SwiperSlideImagePrimitive.css';import './assets/
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
1
|
+
import { default as v } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
|
|
2
|
+
import { default as S } from "./packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js";
|
|
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
|
+
import { default as I } from "./packages/components/lib/UIKit/Accordion/AccordionItemPrimitive.vue.js";
|
|
5
|
+
import { default as C } from "./packages/components/lib/UIKit/Accordion/AccordionHeaderPrimitive.vue.js";
|
|
6
6
|
import { default as A } from "./packages/components/lib/UIKit/Accordion/AccordionTriggerPrimitive.vue.js";
|
|
7
7
|
import { default as G } from "./packages/components/lib/UIKit/Accordion/AccordionContentPrimitive.vue.js";
|
|
8
8
|
import { default as k } from "./packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
9
|
+
import { default as O } from "./packages/components/lib/UIKit/ProgressBar/ProgressRootPrimitive.vue.js";
|
|
10
|
+
import { default as F } from "./packages/components/lib/UIKit/ProgressBar/ProgressIndicatorPrimitive.vue.js";
|
|
11
11
|
import { default as H } from "./packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
import { default as U } from "./packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js";
|
|
@@ -23,29 +23,29 @@ import { default as ee } from "./packages/components/lib/UIKit/Tab/v2/BaseTabsIn
|
|
|
23
23
|
/* empty css */
|
|
24
24
|
import { default as oe } from "./packages/components/lib/UIKit/Tab/v2/BaseTabsList.vue.js";
|
|
25
25
|
import { default as ae } from "./packages/components/lib/UIKit/Tab/v2/BaseTabsTrigger.vue.js";
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
26
|
+
import { default as se } from "./packages/components/lib/UIKit/Radio/RadioButton.vue.js";
|
|
27
|
+
import { default as me } from "./packages/components/lib/UIKit/Radio/RadioGroup.vue.js";
|
|
28
|
+
import { default as de } from "./packages/components/lib/UIKit/Radio/v2/RadioButtonGroup.vue.js";
|
|
29
29
|
import { default as ue } from "./packages/components/lib/UIKit/Radio/v2/RadioButtonItem.vue.js";
|
|
30
30
|
/* empty css */
|
|
31
31
|
import { default as ne } from "./packages/components/lib/UIKit/Radio/v2/RadioGroupItemPrimitive.vue.js";
|
|
32
32
|
import { default as ce } from "./packages/components/lib/UIKit/AccessibleSelect.vue.js";
|
|
33
33
|
/* empty css */
|
|
34
|
-
import { default as
|
|
34
|
+
import { default as ve } from "./packages/components/lib/UIKit/BaseAlert.vue.js";
|
|
35
35
|
/* empty css */
|
|
36
|
-
import { default as
|
|
36
|
+
import { default as Se } from "./packages/components/lib/UIKit/BaseAutocomplete.vue.js";
|
|
37
37
|
/* empty css */
|
|
38
|
-
import { default as
|
|
38
|
+
import { default as Ie } from "./packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js";
|
|
39
39
|
/* empty css */
|
|
40
|
-
import { default as
|
|
40
|
+
import { default as Ce } from "./packages/components/lib/UIKit/BaseBadge.vue.js";
|
|
41
41
|
/* empty css */
|
|
42
42
|
import { default as Ae } from "./packages/components/lib/UIKit/BaseButton.vue.js";
|
|
43
43
|
import { default as Ge } from "./packages/components/lib/UIKit/BaseCard.vue.js";
|
|
44
44
|
/* empty css */
|
|
45
45
|
import { default as ke } from "./UIKit/BaseComplexToggle.js";
|
|
46
|
-
import { default as
|
|
46
|
+
import { default as Oe } from "./packages/components/lib/UIKit/BaseDropDown.vue.js";
|
|
47
47
|
/* empty css */
|
|
48
|
-
import { default as
|
|
48
|
+
import { default as Fe } from "./UIKit/BaseFloatingLabel.js";
|
|
49
49
|
import { default as He } from "./UIKit/BaseInput.js";
|
|
50
50
|
import { default as Ue } from "./packages/components/lib/UIKit/BasePagination.vue.js";
|
|
51
51
|
import { default as je } from "./UIKit/BaseSlider.js";
|
|
@@ -59,45 +59,47 @@ import { default as _e } from "./UIKit/StaticSpinner.js";
|
|
|
59
59
|
import { default as er } from "./UIKit/ShimmerLoader/BaseShimmerLoader.js";
|
|
60
60
|
import { default as or } from "./packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js";
|
|
61
61
|
import { default as ar } from "./packages/components/lib/chart/DoughnutChart.vue.js";
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
62
|
+
import { default as sr } from "./packages/components/lib/chart/LineChart.vue.js";
|
|
63
|
+
import { default as mr } from "./UIKit/Slider/SimpleSlider.js";
|
|
64
|
+
import { default as dr } from "./packages/components/lib/UIKit/BaseSnackbar.vue.js";
|
|
65
65
|
/* empty css */
|
|
66
66
|
import { default as ur } from "./packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js";
|
|
67
67
|
import { default as nr } from "./packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js";
|
|
68
|
-
import { default as cr } from "./components/
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
68
|
+
import { default as cr } from "./packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js";
|
|
69
|
+
import { default as vr } from "./packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverTarget.vue.js";
|
|
70
|
+
import { default as Sr } from "./components/carousel/SwiperCarousel.js";
|
|
71
|
+
import { default as Ir } from "./components/carousel/SwiperSlide.js";
|
|
72
|
+
import { default as Cr } from "./components/carousel/Primitive/SwiperRootPrimitive.js";
|
|
73
|
+
import { default as Ar } from "./packages/components/lib/components/carousel/Primitive/SwiperPrimitive.vue.js";
|
|
74
|
+
import { default as Gr } from "./packages/components/lib/components/carousel/Primitive/SwiperPaginationPrimitive.vue.js";
|
|
73
75
|
/* empty css */
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
76
|
+
import { default as kr } from "./packages/components/lib/components/carousel/Primitive/SwiperNavigationPrimitive.vue.js";
|
|
77
|
+
import { default as Or } from "./packages/components/lib/components/carousel/Primitive/SwiperSlideImagePrimitive.vue.js";
|
|
76
78
|
/* empty css */
|
|
77
|
-
import { default as
|
|
79
|
+
import { default as Fr } from "./packages/components/lib/UIKit/BaseBreadcrumb.vue.js";
|
|
78
80
|
export {
|
|
79
81
|
ce as AccessibleSelect,
|
|
80
82
|
G as AccordionContentPrimitive,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
C as AccordionHeaderPrimitive,
|
|
84
|
+
I as AccordionItemPrimitive,
|
|
83
85
|
A as AccordionTriggerPrimitive,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
v as BaseAccordion,
|
|
87
|
+
S as BaseAccordionItem,
|
|
88
|
+
ve as BaseAlert,
|
|
89
|
+
Se as BaseAutocomplete,
|
|
90
|
+
Ce as BaseBadge,
|
|
91
|
+
Fr as BaseBreadcrumb,
|
|
90
92
|
Ae as BaseButton,
|
|
91
93
|
Ge as BaseCard,
|
|
92
94
|
ke as BaseComplexToggle,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
Oe as BaseDropDown,
|
|
96
|
+
Fe as BaseFloatingLabel,
|
|
95
97
|
He as BaseInput,
|
|
96
98
|
Ye as BaseModal,
|
|
97
99
|
Ue as BasePagination,
|
|
98
100
|
er as BaseShimmerLoader,
|
|
99
101
|
je as BaseSlider,
|
|
100
|
-
|
|
102
|
+
dr as BaseSnackbar,
|
|
101
103
|
W as BaseTab,
|
|
102
104
|
K as BaseTabView,
|
|
103
105
|
Y as BaseTabs,
|
|
@@ -114,27 +116,29 @@ export {
|
|
|
114
116
|
U as CheckboxGroup,
|
|
115
117
|
E as CheckboxGroupItemPrimitive,
|
|
116
118
|
y as CheckboxGroupPrimitive,
|
|
117
|
-
|
|
119
|
+
Ie as ClearableAutocomplete,
|
|
118
120
|
ar as DoughnutChart,
|
|
119
121
|
ur as IntersectionObservable,
|
|
120
122
|
nr as IntersectionObserver,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
cr as IntersectionObserverProvider,
|
|
124
|
+
vr as IntersectionObserverTarget,
|
|
125
|
+
sr as LineChart,
|
|
126
|
+
F as ProgressIndicatorPrimitive,
|
|
127
|
+
O as ProgressRootPrimitive,
|
|
128
|
+
se as RadioButton,
|
|
129
|
+
de as RadioButtonGroup,
|
|
126
130
|
ue as RadioButtonItem,
|
|
127
|
-
|
|
131
|
+
me as RadioGroup,
|
|
128
132
|
ne as RadioGroupItemPrimitive,
|
|
129
133
|
k as SelectItem,
|
|
130
134
|
or as ShimmerMultiLine,
|
|
131
|
-
|
|
135
|
+
mr as SimpleSlider,
|
|
132
136
|
_e as StaticSpinner,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
Sr as SwiperCarousel,
|
|
138
|
+
kr as SwiperNavigationPrimitive,
|
|
139
|
+
Gr as SwiperPaginationPrimitive,
|
|
140
|
+
Ar as SwiperPrimitive,
|
|
141
|
+
Cr as SwiperRootPrimitive,
|
|
142
|
+
Ir as SwiperSlide,
|
|
143
|
+
Or as SwiperSlideImagePrimitive
|
|
140
144
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as A, mergeModels as h, useModel as F, useTemplateRef as y, shallowRef as C, onUnmounted as K, createBlock as N, openBlock as k, Teleport as S, createVNode as w, Transition as V, unref as p, withCtx as P, withDirectives as R, createElementVNode as l, normalizeClass as i, createElementBlock as x, createCommentVNode as g, renderSlot as d, withModifiers as U, vShow as j } from "vue";
|
|
2
2
|
import { CloseIcon as q } from "@wikicasa-dev/svg-icons";
|
|
3
|
-
const G = ["
|
|
3
|
+
const G = ["id", "data-cy", "data-state"], J = ["innerHTML"], X = /* @__PURE__ */ A({
|
|
4
4
|
__name: "BaseModal",
|
|
5
5
|
props: /* @__PURE__ */ h({
|
|
6
6
|
id: { default: "base-bt-modal" },
|
|
@@ -96,7 +96,6 @@ const G = ["data-state"], J = ["id", "data-cy"], Q = ["innerHTML"], Y = /* @__PU
|
|
|
96
96
|
{ "uikit-bg-transparent": !o.value },
|
|
97
97
|
{ "sm:uikit-pt-[30px]": !e.centered }
|
|
98
98
|
]]),
|
|
99
|
-
"data-state": o.value ? "open" : "closed",
|
|
100
99
|
onClick: H,
|
|
101
100
|
onMousedown: $,
|
|
102
101
|
onMouseup: D
|
|
@@ -115,6 +114,7 @@ const G = ["data-state"], J = ["id", "data-cy"], Q = ["innerHTML"], Y = /* @__PU
|
|
|
115
114
|
e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
|
|
116
115
|
]]),
|
|
117
116
|
tabindex: "-1",
|
|
117
|
+
"data-state": o.value ? "open" : "closed",
|
|
118
118
|
onClick: n[1] || (n[1] = (v) => r("dialogClick", v)),
|
|
119
119
|
onFocusin: O
|
|
120
120
|
}, [
|
|
@@ -140,7 +140,7 @@ const G = ["data-state"], J = ["id", "data-cy"], Q = ["innerHTML"], Y = /* @__PU
|
|
|
140
140
|
l("span", {
|
|
141
141
|
class: i(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
|
|
142
142
|
innerHTML: e.headerTitle
|
|
143
|
-
}, null, 10,
|
|
143
|
+
}, null, 10, J)
|
|
144
144
|
])
|
|
145
145
|
], 2),
|
|
146
146
|
l("div", {
|
|
@@ -155,8 +155,8 @@ const G = ["data-state"], J = ["id", "data-cy"], Q = ["innerHTML"], Y = /* @__PU
|
|
|
155
155
|
d(t.$slots, "footer", { closeModal: a })
|
|
156
156
|
], 2)) : g("", !0),
|
|
157
157
|
d(t.$slots, "fixed-bottom")
|
|
158
|
-
], 42,
|
|
159
|
-
],
|
|
158
|
+
], 42, G)
|
|
159
|
+
], 34), [
|
|
160
160
|
[j, o.value]
|
|
161
161
|
])
|
|
162
162
|
]),
|
|
@@ -166,5 +166,5 @@ const G = ["data-state"], J = ["id", "data-cy"], Q = ["innerHTML"], Y = /* @__PU
|
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
export {
|
|
169
|
-
|
|
169
|
+
X as default
|
|
170
170
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as d, shallowRef as i, provide as t, onBeforeMount as m, onBeforeUnmount as O, createElementBlock as y, renderSlot as a, openBlock as h, normalizeClass as k } from "vue";
|
|
2
|
+
const B = /* @__PURE__ */ Symbol(), p = /* @__PURE__ */ Symbol(), S = /* @__PURE__ */ Symbol(), E = /* @__PURE__ */ d({
|
|
3
|
+
__name: "IntersectionObserverProvider",
|
|
4
|
+
props: {
|
|
5
|
+
observeOnce: { type: Boolean, default: !0 },
|
|
6
|
+
skip: { type: Boolean, default: !1 },
|
|
7
|
+
threshold: { default: 0 }
|
|
8
|
+
},
|
|
9
|
+
emits: ["intersection"],
|
|
10
|
+
setup(s, { emit: c }) {
|
|
11
|
+
const u = c, r = i(!1), e = i(), v = (o) => {
|
|
12
|
+
s.skip || o.forEach(({ target: n, isIntersecting: l }) => {
|
|
13
|
+
r.value = l, l && (u("intersection"), s.observeOnce && b(n));
|
|
14
|
+
});
|
|
15
|
+
}, b = (o) => {
|
|
16
|
+
e.value && e.value.unobserve(o);
|
|
17
|
+
}, f = () => {
|
|
18
|
+
e.value && e.value.disconnect();
|
|
19
|
+
};
|
|
20
|
+
return t(B, s.observeOnce), t(p, e), t(S, r), m(() => {
|
|
21
|
+
e.value = new IntersectionObserver(v, {
|
|
22
|
+
root: null,
|
|
23
|
+
//if the root is null, then we will check if the target is visible in the doc root!
|
|
24
|
+
threshold: s.threshold
|
|
25
|
+
});
|
|
26
|
+
}), O(() => {
|
|
27
|
+
f();
|
|
28
|
+
}), (o, n) => s.observeOnce ? a(o.$slots, "default", {
|
|
29
|
+
key: 1,
|
|
30
|
+
observer: e.value,
|
|
31
|
+
isVisible: r.value
|
|
32
|
+
}) : (h(), y("div", {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: k(o.$attrs["root-classes"])
|
|
35
|
+
}, [
|
|
36
|
+
a(o.$slots, "default", {
|
|
37
|
+
observer: e.value,
|
|
38
|
+
isVisible: r.value
|
|
39
|
+
})
|
|
40
|
+
], 2));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
S as IsVisibleKey,
|
|
45
|
+
p as ObserverKey,
|
|
46
|
+
B as ObserverOnceKey,
|
|
47
|
+
E as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as i, useTemplateRef as c, inject as r, onMounted as u, createElementBlock as v, renderSlot as t, unref as n, openBlock as f, normalizeClass as d } from "vue";
|
|
2
|
+
import { ObserverOnceKey as m, ObserverKey as p, IsVisibleKey as b } from "./IntersectionObserverProvider.vue.js";
|
|
3
|
+
const K = /* @__PURE__ */ i({
|
|
4
|
+
__name: "IntersectionObserverTarget",
|
|
5
|
+
setup(y) {
|
|
6
|
+
const e = c("root"), l = r(m, void 0), s = r(p, void 0), a = r(b, void 0);
|
|
7
|
+
return u(() => {
|
|
8
|
+
!s?.value || !e.value || s?.value.observe(e.value);
|
|
9
|
+
}), (o, _) => !n(l) || !n(a) ? (f(), v("div", {
|
|
10
|
+
key: 0,
|
|
11
|
+
ref_key: "root",
|
|
12
|
+
ref: e,
|
|
13
|
+
class: d(o.$attrs["root-classes"])
|
|
14
|
+
}, [
|
|
15
|
+
t(o.$slots, "default")
|
|
16
|
+
], 2)) : t(o.$slots, "default", { key: 1 });
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
K as default
|
|
21
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -28,3 +28,4 @@ export type { SwiperRootPrimitiveProps } from '../components/carousel/Primitive/
|
|
|
28
28
|
export type { SwiperPaginationPrimitiveProps } from '../components/carousel/Primitive/SwiperPaginationPrimitive';
|
|
29
29
|
export type { SwiperNavigationPrimitiveProps } from '../components/carousel/Primitive/SwiperNavigationPrimitive';
|
|
30
30
|
export type { SwiperSlideImagePrimitiveProps } from '../components/carousel/Primitive/SwiperSlideImagePrimitive';
|
|
31
|
+
export type { IntersectionObserverProviderProps } from '../components/IntersectionObserver/v2/IntersectionObserverProvider';
|
package/package.json
CHANGED
|
@@ -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}
|
|
File without changes
|