vft 0.0.252 → 0.0.253
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/index.css +1 -1
- package/es/components/carousel/carousel-item.vue.d.ts +1 -4
- package/es/components/carousel/carousel-item.vue2.js +43 -43
- package/es/components/carousel/carousel.vue.d.ts +7 -61
- package/es/components/carousel/carousel.vue2.js +158 -113
- package/es/components/carousel/constants.d.ts +7 -4
- package/es/components/carousel/constants.js +2 -1
- package/es/components/carousel/index.d.ts +69 -117
- package/es/components/carousel/index.js +8 -7
- package/es/components/carousel/types.d.ts +19 -0
- package/es/components/carousel/types.js +1 -0
- package/es/components/carousel/use-carousel-item.d.ts +2 -2
- package/es/components/carousel/use-carousel-item.js +53 -53
- package/es/components/carousel/use-carousel.d.ts +10 -1
- package/es/components/carousel/use-carousel.js +131 -112
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +2 -2
- package/es/components/date-picker/composables/use-range-picker.d.ts +2 -2
- package/es/components/index.js +55 -54
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +26 -26
- package/es/components/popover/popover.vue2.js +19 -19
- package/es/components/time-picker/composables/use-time-picker.d.ts +4 -4
- package/es/components/upload/use-handlers.d.ts +4 -4
- package/es/hooks/use-ordered-children/index.js +7 -7
- package/es/index.js +72 -71
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/carousel/carousel-item.vue.d.ts +1 -4
- package/lib/components/carousel/carousel-item.vue2.cjs +1 -1
- package/lib/components/carousel/carousel.vue.d.ts +7 -61
- package/lib/components/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/carousel/constants.cjs +1 -1
- package/lib/components/carousel/constants.d.ts +7 -4
- package/lib/components/carousel/index.cjs +1 -1
- package/lib/components/carousel/index.d.ts +69 -117
- package/lib/components/carousel/types.cjs +1 -0
- package/lib/components/carousel/types.d.ts +19 -0
- package/lib/components/carousel/use-carousel-item.cjs +1 -1
- package/lib/components/carousel/use-carousel-item.d.ts +2 -2
- package/lib/components/carousel/use-carousel.cjs +1 -1
- package/lib/components/carousel/use-carousel.d.ts +10 -1
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +2 -2
- package/lib/components/date-picker/composables/use-range-picker.d.ts +2 -2
- package/lib/components/index.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/time-picker/composables/use-time-picker.d.ts +4 -4
- package/lib/components/upload/use-handlers.d.ts +4 -4
- package/lib/hooks/use-ordered-children/index.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/carousel.scss +45 -31
- package/theme-style/vft-carousel.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { defineComponent as d, computed as
|
|
1
|
+
import { defineComponent as d, computed as m, unref as e, withDirectives as c, createElementBlock as u, openBlock as p, normalizeStyle as w, normalizeClass as v, createCommentVNode as x, renderSlot as z, vShow as f } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../../utils/ns-cover.js";
|
|
5
5
|
import "lodash-es";
|
|
6
|
-
import { useNamespace as
|
|
6
|
+
import { useNamespace as B } from "../../hooks/use-namespace/index.js";
|
|
7
7
|
import "../../hooks/use-model-toggle/index.js";
|
|
8
8
|
import "@popperjs/core";
|
|
9
9
|
import "../../hooks/use-z-index/index.js";
|
|
10
|
-
import { useCarouselItem as
|
|
11
|
-
const
|
|
10
|
+
import { useCarouselItem as N } from "./use-carousel-item.js";
|
|
11
|
+
const R = d({
|
|
12
12
|
name: "VftCarouselItem"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
13
|
+
}), H = /* @__PURE__ */ d({
|
|
14
|
+
...R,
|
|
15
15
|
props: {
|
|
16
16
|
name: {},
|
|
17
17
|
label: {}
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const C =
|
|
21
|
-
carouselItemRef:
|
|
19
|
+
setup(y) {
|
|
20
|
+
const C = y, t = B("carousel"), {
|
|
21
|
+
carouselItemRef: _,
|
|
22
22
|
active: o,
|
|
23
|
-
animating:
|
|
24
|
-
hover:
|
|
25
|
-
inStage:
|
|
26
|
-
isVertical:
|
|
27
|
-
translate:
|
|
28
|
-
isCardType:
|
|
29
|
-
scale:
|
|
30
|
-
ready:
|
|
31
|
-
handleItemClick:
|
|
32
|
-
} =
|
|
33
|
-
|
|
23
|
+
animating: k,
|
|
24
|
+
hover: I,
|
|
25
|
+
inStage: S,
|
|
26
|
+
isVertical: l,
|
|
27
|
+
translate: $,
|
|
28
|
+
isCardType: r,
|
|
29
|
+
scale: g,
|
|
30
|
+
ready: h,
|
|
31
|
+
handleItemClick: n
|
|
32
|
+
} = N(C), T = m(() => [
|
|
33
|
+
t.e("item"),
|
|
34
|
+
t.is("active", o.value),
|
|
35
|
+
t.is("in-stage", S.value),
|
|
36
|
+
t.is("hover", I.value),
|
|
37
|
+
t.is("animating", k.value),
|
|
38
|
+
{
|
|
39
|
+
[t.em("item", "card")]: r.value,
|
|
40
|
+
[t.em("item", "card-vertical")]: r.value && l.value
|
|
41
|
+
}
|
|
42
|
+
]), V = m(() => {
|
|
43
|
+
const a = `${`translate${e(l) ? "Y" : "X"}`}(${e($)}px)`, s = `scale(${e(g)})`;
|
|
34
44
|
return {
|
|
35
|
-
transform: [
|
|
45
|
+
transform: [a, s].join(" ")
|
|
36
46
|
};
|
|
37
47
|
});
|
|
38
|
-
return (
|
|
48
|
+
return (i, a) => c((p(), u("div", {
|
|
39
49
|
ref_key: "carouselItemRef",
|
|
40
|
-
ref:
|
|
41
|
-
class:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
e(t).is("hover", e(k)),
|
|
46
|
-
e(t).is("animating", e(_)),
|
|
47
|
-
{
|
|
48
|
-
[e(t).em("item", "card")]: e(a),
|
|
49
|
-
[e(t).em("item", "card-vertical")]: e(a) && e(n)
|
|
50
|
-
}
|
|
51
|
-
]),
|
|
52
|
-
style: T(g.value),
|
|
53
|
-
onClick: r[0] || (r[0] = //@ts-ignore
|
|
54
|
-
(...s) => e(i) && e(i)(...s))
|
|
50
|
+
ref: _,
|
|
51
|
+
class: v(T.value),
|
|
52
|
+
style: w(V.value),
|
|
53
|
+
onClick: a[0] || (a[0] = //@ts-ignore
|
|
54
|
+
(...s) => e(n) && e(n)(...s))
|
|
55
55
|
}, [
|
|
56
|
-
e(
|
|
56
|
+
e(r) ? c((p(), u("div", {
|
|
57
57
|
key: 0,
|
|
58
|
-
class:
|
|
58
|
+
class: v(e(t).e("mask"))
|
|
59
59
|
}, null, 2)), [
|
|
60
60
|
[f, !e(o)]
|
|
61
|
-
]) :
|
|
62
|
-
|
|
61
|
+
]) : x("", !0),
|
|
62
|
+
z(i.$slots, "default")
|
|
63
63
|
], 6)), [
|
|
64
|
-
[f, e(
|
|
64
|
+
[f, e(h)]
|
|
65
65
|
]);
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
H as default
|
|
70
70
|
};
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
initialIndex?: number | string;
|
|
3
|
-
height?: string;
|
|
4
|
-
trigger?: 'hover' | 'click';
|
|
5
|
-
autoplay?: boolean;
|
|
6
|
-
interval?: number;
|
|
7
|
-
indicatorPosition?: '' | 'none' | 'outside';
|
|
8
|
-
arrow?: 'always' | 'hover' | 'never';
|
|
9
|
-
type?: '' | 'card';
|
|
10
|
-
loop?: boolean;
|
|
11
|
-
direction?: 'horizontal' | 'vertical';
|
|
12
|
-
pauseOnHover?: boolean;
|
|
13
|
-
}
|
|
1
|
+
import type { CarouselProps } from './types';
|
|
14
2
|
declare function __VLS_template(): {
|
|
15
3
|
default?(_: {}): any;
|
|
16
4
|
};
|
|
17
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
autoplay: boolean;
|
|
22
|
-
interval: number;
|
|
23
|
-
indicatorPosition: string;
|
|
24
|
-
arrow: string;
|
|
25
|
-
type: string;
|
|
26
|
-
loop: boolean;
|
|
27
|
-
direction: string;
|
|
28
|
-
pauseOnHover: boolean;
|
|
29
|
-
}>>, {
|
|
30
|
-
/** @description manually switch slide */
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<CarouselProps>>, {
|
|
6
|
+
/** @description active slide index */
|
|
7
|
+
activeIndex: import("vue").Ref<number, number>;
|
|
8
|
+
/** @description manually switch slide, index of the slide to be switched to, starting from 0; or the `name` of corresponding `el-carousel-item` */
|
|
31
9
|
setActiveItem: (index: number | string) => void;
|
|
32
10
|
/** @description switch to the previous slide */
|
|
33
11
|
prev: () => void;
|
|
@@ -35,33 +13,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
35
13
|
next: () => void;
|
|
36
14
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
15
|
change: (current: number, prev: number) => void;
|
|
38
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
39
|
-
initialIndex: number;
|
|
40
|
-
height: string;
|
|
41
|
-
trigger: string;
|
|
42
|
-
autoplay: boolean;
|
|
43
|
-
interval: number;
|
|
44
|
-
indicatorPosition: string;
|
|
45
|
-
arrow: string;
|
|
46
|
-
type: string;
|
|
47
|
-
loop: boolean;
|
|
48
|
-
direction: string;
|
|
49
|
-
pauseOnHover: boolean;
|
|
50
|
-
}>>> & Readonly<{
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<CarouselProps>>> & Readonly<{
|
|
51
17
|
onChange?: ((current: number, prev: number) => any) | undefined;
|
|
52
|
-
}>, {
|
|
53
|
-
direction: "horizontal" | "vertical";
|
|
54
|
-
height: string;
|
|
55
|
-
type: "" | "card";
|
|
56
|
-
arrow: "always" | "hover" | "never";
|
|
57
|
-
trigger: "hover" | "click";
|
|
58
|
-
loop: boolean;
|
|
59
|
-
initialIndex: number | string;
|
|
60
|
-
interval: number;
|
|
61
|
-
autoplay: boolean;
|
|
62
|
-
indicatorPosition: "" | "none" | "outside";
|
|
63
|
-
pauseOnHover: boolean;
|
|
64
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
65
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
66
20
|
export default _default;
|
|
67
21
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -73,14 +27,6 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
73
27
|
required: true;
|
|
74
28
|
};
|
|
75
29
|
};
|
|
76
|
-
type __VLS_WithDefaults<P, D> = {
|
|
77
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
78
|
-
default: D[K];
|
|
79
|
-
}> : P[K];
|
|
80
|
-
};
|
|
81
|
-
type __VLS_Prettify<T> = {
|
|
82
|
-
[K in keyof T]: T[K];
|
|
83
|
-
} & {};
|
|
84
30
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
85
31
|
new (): {
|
|
86
32
|
$slots: S;
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftIcon as
|
|
1
|
+
import { defineComponent as E, getCurrentInstance as _, computed as T, unref as e, createElementBlock as u, openBlock as a, withModifiers as m, normalizeClass as s, createBlock as L, createCommentVNode as p, createElementVNode as i, createVNode as v, Transition as V, withCtx as y, withDirectives as g, vShow as h, normalizeStyle as ee, renderSlot as te, Fragment as oe, renderList as ne, toDisplayString as re } from "vue";
|
|
2
|
+
import { VftIcon as D } from "../icon/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
5
5
|
import "../../utils/ns-cover.js";
|
|
6
6
|
import "lodash-es";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as ie } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import { useCarousel as
|
|
12
|
-
const
|
|
11
|
+
import { useCarousel as ae } from "./use-carousel.js";
|
|
12
|
+
const se = ["onMouseenter", "onClick"], le = { key: 0 }, ue = {
|
|
13
|
+
key: 2,
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
version: "1.1",
|
|
16
|
+
style: { display: "none" }
|
|
17
|
+
}, de = E({
|
|
13
18
|
name: "vft-carousel"
|
|
14
|
-
}),
|
|
15
|
-
...
|
|
19
|
+
}), Be = /* @__PURE__ */ E({
|
|
20
|
+
...de,
|
|
16
21
|
props: {
|
|
17
22
|
initialIndex: { default: 0 },
|
|
18
23
|
height: { default: "" },
|
|
@@ -24,135 +29,175 @@ const te = ["onMouseenter", "onClick"], oe = { key: 0 }, re = N({
|
|
|
24
29
|
type: { default: "" },
|
|
25
30
|
loop: { type: Boolean, default: !0 },
|
|
26
31
|
direction: { default: "horizontal" },
|
|
27
|
-
pauseOnHover: { type: Boolean, default: !0 }
|
|
32
|
+
pauseOnHover: { type: Boolean, default: !0 },
|
|
33
|
+
motionBlur: { type: Boolean, default: !1 },
|
|
34
|
+
cardScale: { default: 0.83 }
|
|
28
35
|
},
|
|
29
36
|
emits: ["change"],
|
|
30
|
-
setup(
|
|
31
|
-
const t =
|
|
37
|
+
setup(d, { expose: z, emit: G }) {
|
|
38
|
+
const t = ie("carousel"), N = G, P = _(), {
|
|
32
39
|
root: H,
|
|
33
40
|
activeIndex: l,
|
|
34
|
-
arrowDisplay:
|
|
35
|
-
hasLabel:
|
|
36
|
-
hover:
|
|
37
|
-
isCardType:
|
|
38
|
-
items:
|
|
39
|
-
isVertical:
|
|
40
|
-
containerStyle:
|
|
41
|
-
handleButtonEnter:
|
|
42
|
-
handleButtonLeave:
|
|
43
|
-
handleIndicatorClick:
|
|
44
|
-
handleMouseEnter:
|
|
45
|
-
handleMouseLeave:
|
|
46
|
-
setActiveItem:
|
|
47
|
-
prev:
|
|
41
|
+
arrowDisplay: k,
|
|
42
|
+
hasLabel: C,
|
|
43
|
+
hover: B,
|
|
44
|
+
isCardType: A,
|
|
45
|
+
items: b,
|
|
46
|
+
isVertical: w,
|
|
47
|
+
containerStyle: F,
|
|
48
|
+
handleButtonEnter: M,
|
|
49
|
+
handleButtonLeave: f,
|
|
50
|
+
handleIndicatorClick: O,
|
|
51
|
+
handleMouseEnter: S,
|
|
52
|
+
handleMouseLeave: $,
|
|
53
|
+
setActiveItem: j,
|
|
54
|
+
prev: q,
|
|
48
55
|
next: J,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}),
|
|
55
|
-
const
|
|
56
|
-
return e(
|
|
56
|
+
PlaceholderItem: K,
|
|
57
|
+
isTwoLengthShow: Q,
|
|
58
|
+
ItemsSorter: R,
|
|
59
|
+
throttledArrowClick: I,
|
|
60
|
+
throttledIndicatorHover: U
|
|
61
|
+
} = ae(P.props, N, t.b()), W = T(() => {
|
|
62
|
+
const n = [t.b(), t.m(d.direction)];
|
|
63
|
+
return e(A) && n.push(t.m("card")), n;
|
|
64
|
+
}), X = T(() => {
|
|
65
|
+
const n = [t.e("indicators"), t.em("indicators", d.direction)];
|
|
66
|
+
return e(C) && n.push(t.em("indicators", "labels")), d.indicatorPosition === "outside" && n.push(t.em("indicators", "outside")), e(w) && n.push(t.em("indicators", "right")), n;
|
|
57
67
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
68
|
+
function Y(n) {
|
|
69
|
+
if (!d.motionBlur) return;
|
|
70
|
+
const o = e(w) ? `${t.namespace.value}-transitioning-vertical` : `${t.namespace.value}-transitioning`;
|
|
71
|
+
n.currentTarget.classList.add(o);
|
|
72
|
+
}
|
|
73
|
+
function Z(n) {
|
|
74
|
+
if (!d.motionBlur) return;
|
|
75
|
+
const o = e(w) ? `${t.namespace.value}-transitioning-vertical` : `${t.namespace.value}-transitioning`;
|
|
76
|
+
n.currentTarget.classList.remove(o);
|
|
77
|
+
}
|
|
78
|
+
return z({
|
|
79
|
+
/** @description active slide index */
|
|
80
|
+
activeIndex: l,
|
|
81
|
+
/** @description manually switch slide, index of the slide to be switched to, starting from 0; or the `name` of corresponding `el-carousel-item` */
|
|
82
|
+
setActiveItem: j,
|
|
61
83
|
/** @description switch to the previous slide */
|
|
62
|
-
prev:
|
|
84
|
+
prev: q,
|
|
63
85
|
/** @description switch to the next slide */
|
|
64
86
|
next: J
|
|
65
|
-
}), (
|
|
87
|
+
}), (n, o) => (a(), u("div", {
|
|
66
88
|
ref_key: "root",
|
|
67
89
|
ref: H,
|
|
68
|
-
class:
|
|
69
|
-
onMouseenter: o[6] || (o[6] =
|
|
90
|
+
class: s(W.value),
|
|
91
|
+
onMouseenter: o[6] || (o[6] = m(
|
|
70
92
|
//@ts-ignore
|
|
71
|
-
(...
|
|
93
|
+
(...r) => e(S) && e(S)(...r),
|
|
72
94
|
["stop"]
|
|
73
95
|
)),
|
|
74
|
-
onMouseleave: o[7] || (o[7] =
|
|
96
|
+
onMouseleave: o[7] || (o[7] = m(
|
|
75
97
|
//@ts-ignore
|
|
76
|
-
(...
|
|
98
|
+
(...r) => e($) && e($)(...r),
|
|
77
99
|
["stop"]
|
|
78
100
|
))
|
|
79
101
|
}, [
|
|
80
|
-
|
|
81
|
-
class: i(e(t).e("container")),
|
|
82
|
-
style: W(e(O))
|
|
83
|
-
}, [
|
|
84
|
-
e(v) ? (s(), B($, {
|
|
85
|
-
key: 0,
|
|
86
|
-
name: "carousel-arrow-left"
|
|
87
|
-
}, {
|
|
88
|
-
default: I(() => [
|
|
89
|
-
S(c("button", {
|
|
90
|
-
type: "button",
|
|
91
|
-
class: i([e(t).e("arrow"), e(t).em("arrow", "left")]),
|
|
92
|
-
onMouseenter: o[0] || (o[0] = (n) => e(k)("left")),
|
|
93
|
-
onMouseleave: o[1] || (o[1] = //@ts-ignore
|
|
94
|
-
(...n) => e(p) && e(p)(...n)),
|
|
95
|
-
onClick: o[2] || (o[2] = d((n) => e(b)(e(l) - 1), ["stop"]))
|
|
96
|
-
}, [
|
|
97
|
-
V(e(L), { icon: "ico-ep:arrow-left" })
|
|
98
|
-
], 34), [
|
|
99
|
-
[
|
|
100
|
-
E,
|
|
101
|
-
(r.arrow === "always" || e(w)) && (a.loop || e(l) > 0)
|
|
102
|
-
]
|
|
103
|
-
])
|
|
104
|
-
]),
|
|
105
|
-
_: 1
|
|
106
|
-
})) : f("", !0),
|
|
107
|
-
e(v) ? (s(), B($, {
|
|
108
|
-
key: 1,
|
|
109
|
-
name: "carousel-arrow-right"
|
|
110
|
-
}, {
|
|
111
|
-
default: I(() => [
|
|
112
|
-
S(c("button", {
|
|
113
|
-
type: "button",
|
|
114
|
-
class: i([e(t).e("arrow"), e(t).em("arrow", "right")]),
|
|
115
|
-
onMouseenter: o[3] || (o[3] = (n) => e(k)("right")),
|
|
116
|
-
onMouseleave: o[4] || (o[4] = //@ts-ignore
|
|
117
|
-
(...n) => e(p) && e(p)(...n)),
|
|
118
|
-
onClick: o[5] || (o[5] = d((n) => e(b)(e(l) + 1), ["stop"]))
|
|
119
|
-
}, [
|
|
120
|
-
V(e(L), { icon: "ico-ep:arrow-right" })
|
|
121
|
-
], 34), [
|
|
122
|
-
[
|
|
123
|
-
E,
|
|
124
|
-
(r.arrow === "always" || e(w)) && (a.loop || e(l) < e(h).length - 1)
|
|
125
|
-
]
|
|
126
|
-
])
|
|
127
|
-
]),
|
|
128
|
-
_: 1
|
|
129
|
-
})) : f("", !0),
|
|
130
|
-
X(r.$slots, "default")
|
|
131
|
-
], 6),
|
|
132
|
-
r.indicatorPosition !== "none" ? (s(), u("ul", {
|
|
102
|
+
e(k) ? (a(), L(V, {
|
|
133
103
|
key: 0,
|
|
134
|
-
|
|
104
|
+
name: "carousel-arrow-left"
|
|
105
|
+
}, {
|
|
106
|
+
default: y(() => [
|
|
107
|
+
g(i("button", {
|
|
108
|
+
type: "button",
|
|
109
|
+
class: s([e(t).e("arrow"), e(t).em("arrow", "left")]),
|
|
110
|
+
onMouseenter: o[0] || (o[0] = (r) => e(M)("left")),
|
|
111
|
+
onMouseleave: o[1] || (o[1] = //@ts-ignore
|
|
112
|
+
(...r) => e(f) && e(f)(...r)),
|
|
113
|
+
onClick: o[2] || (o[2] = m((r) => e(I)(e(l) - 1), ["stop"]))
|
|
114
|
+
}, [
|
|
115
|
+
v(e(D), { icon: "ico-ep:arrow-left" })
|
|
116
|
+
], 34), [
|
|
117
|
+
[h, (n.arrow === "always" || e(B)) && (n.loop || e(l) > 0)]
|
|
118
|
+
])
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
})) : p("", !0),
|
|
122
|
+
e(k) ? (a(), L(V, {
|
|
123
|
+
key: 1,
|
|
124
|
+
name: "carousel-arrow-right"
|
|
125
|
+
}, {
|
|
126
|
+
default: y(() => [
|
|
127
|
+
g(i("button", {
|
|
128
|
+
type: "button",
|
|
129
|
+
class: s([e(t).e("arrow"), e(t).em("arrow", "right")]),
|
|
130
|
+
onMouseenter: o[3] || (o[3] = (r) => e(M)("right")),
|
|
131
|
+
onMouseleave: o[4] || (o[4] = //@ts-ignore
|
|
132
|
+
(...r) => e(f) && e(f)(...r)),
|
|
133
|
+
onClick: o[5] || (o[5] = m((r) => e(I)(e(l) + 1), ["stop"]))
|
|
134
|
+
}, [
|
|
135
|
+
v(e(D), { icon: "ico-ep:arrow-right" })
|
|
136
|
+
], 34), [
|
|
137
|
+
[
|
|
138
|
+
h,
|
|
139
|
+
(n.arrow === "always" || e(B)) && (n.loop || e(l) < e(b).length - 1)
|
|
140
|
+
]
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
})) : p("", !0),
|
|
145
|
+
i("div", {
|
|
146
|
+
class: s(e(t).e("container")),
|
|
147
|
+
style: ee(e(F)),
|
|
148
|
+
onTransitionstart: Y,
|
|
149
|
+
onTransitionend: Z
|
|
135
150
|
}, [
|
|
136
|
-
(
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
onClick: d((U) => e(j)(m), ["stop"])
|
|
145
|
-
}, [
|
|
146
|
-
c("button", {
|
|
147
|
-
class: i(e(t).e("button"))
|
|
151
|
+
v(e(K)),
|
|
152
|
+
te(n.$slots, "default")
|
|
153
|
+
], 38),
|
|
154
|
+
v(e(R), null, {
|
|
155
|
+
default: y(() => [
|
|
156
|
+
n.indicatorPosition !== "none" ? (a(), u("ul", {
|
|
157
|
+
key: 0,
|
|
158
|
+
class: s(X.value)
|
|
148
159
|
}, [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
160
|
+
(a(!0), u(oe, null, ne(e(b), (r, c) => g((a(), u("li", {
|
|
161
|
+
key: c,
|
|
162
|
+
class: s([
|
|
163
|
+
e(t).e("indicator"),
|
|
164
|
+
e(t).em("indicator", n.direction),
|
|
165
|
+
e(t).is("active", c === e(l))
|
|
166
|
+
]),
|
|
167
|
+
onMouseenter: (x) => e(U)(c),
|
|
168
|
+
onClick: m((x) => e(O)(c), ["stop"])
|
|
169
|
+
}, [
|
|
170
|
+
i("button", {
|
|
171
|
+
class: s(e(t).e("button"))
|
|
172
|
+
}, [
|
|
173
|
+
e(C) ? (a(), u("span", le, re(r.label), 1)) : p("", !0)
|
|
174
|
+
], 2)
|
|
175
|
+
], 42, se)), [
|
|
176
|
+
[h, e(Q)(c)]
|
|
177
|
+
])), 128))
|
|
178
|
+
], 2)) : p("", !0)
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
}),
|
|
182
|
+
n.motionBlur ? (a(), u("svg", ue, o[8] || (o[8] = [
|
|
183
|
+
i("defs", null, [
|
|
184
|
+
i("filter", { id: "elCarouselHorizontal" }, [
|
|
185
|
+
i("feGaussianBlur", {
|
|
186
|
+
in: "SourceGraphic",
|
|
187
|
+
stdDeviation: "12,0"
|
|
188
|
+
})
|
|
189
|
+
]),
|
|
190
|
+
i("filter", { id: "elCarouselVertical" }, [
|
|
191
|
+
i("feGaussianBlur", {
|
|
192
|
+
in: "SourceGraphic",
|
|
193
|
+
stdDeviation: "0,10"
|
|
194
|
+
})
|
|
195
|
+
])
|
|
196
|
+
], -1)
|
|
197
|
+
]))) : p("", !0)
|
|
153
198
|
], 34));
|
|
154
199
|
}
|
|
155
200
|
});
|
|
156
201
|
export {
|
|
157
|
-
|
|
202
|
+
Be as default
|
|
158
203
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InjectionKey, Ref } from 'vue';
|
|
2
|
-
import type { CarouselItemProps } from './
|
|
1
|
+
import type { InjectionKey, Ref, VNode } from 'vue';
|
|
2
|
+
import type { CarouselItemProps } from './types';
|
|
3
3
|
export type CarouselItemStates = {
|
|
4
4
|
hover: boolean;
|
|
5
5
|
translate: number;
|
|
@@ -13,6 +13,7 @@ export type CarouselItemContext = {
|
|
|
13
13
|
props: CarouselItemProps;
|
|
14
14
|
states: CarouselItemStates;
|
|
15
15
|
uid: number;
|
|
16
|
+
getVnode: () => VNode;
|
|
16
17
|
translateItem: (index: number, activeIndex: number, oldIndex?: number) => void;
|
|
17
18
|
};
|
|
18
19
|
export type CarouselContext = {
|
|
@@ -20,10 +21,12 @@ export type CarouselContext = {
|
|
|
20
21
|
items: Ref<CarouselItemContext[]>;
|
|
21
22
|
isCardType: Ref<boolean>;
|
|
22
23
|
isVertical: Ref<boolean>;
|
|
23
|
-
loop
|
|
24
|
+
loop?: boolean;
|
|
25
|
+
cardScale: number;
|
|
24
26
|
addItem: (item: CarouselItemContext) => void;
|
|
25
|
-
removeItem: (
|
|
27
|
+
removeItem: (item: CarouselItemContext) => void;
|
|
26
28
|
setActiveItem: (index: number) => void;
|
|
27
29
|
setContainerHeight: (height: number) => void;
|
|
28
30
|
};
|
|
29
31
|
export declare const carouselContextKey: InjectionKey<CarouselContext>;
|
|
32
|
+
export declare const CAROUSEL_ITEM_NAME = "VftCarouselItem";
|