cosey 0.5.15 → 0.6.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/components/audio-card/audio-card.api.d.ts +3 -6
- package/components/audio-card/audio-card.d.ts +6 -12
- package/components/audio-card/index.d.ts +9 -18
- package/components/audio-viewer/audio-viewer.api.d.ts +3 -6
- package/components/audio-viewer/audio-viewer.d.ts +6 -12
- package/components/audio-viewer/audio-viewer.js +12 -67
- package/components/audio-viewer/index.d.ts +9 -18
- package/components/close/close.js +5 -2
- package/components/components.d.ts +5 -1
- package/components/components.js +2 -0
- package/components/editor/components/toolbar/toolbar.js +1 -1
- package/components/field/components/number/number.vue.js +16 -3
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.vue.d.ts +11 -1
- package/components/icon/icon.vue.js +13 -8
- package/components/icon/index.d.ts +5 -1
- package/components/image-card/image-card.api.d.ts +131 -0
- package/components/image-card/image-card.api.js +17 -0
- package/components/image-card/image-card.d.ts +140 -16
- package/components/image-card/image-card.js +55 -11
- package/components/image-card/index.d.ts +25 -33
- package/components/image-card/index.js +2 -2
- package/components/index.js +1 -1
- package/components/input-number-range/input-number-range.vue.js +1 -1
- package/components/mask/mask.js +5 -2
- package/components/media-card/media-card.js +10 -5
- package/components/media-card/media-card.style.d.ts +1 -0
- package/components/media-card/media-card.style.js +12 -1
- package/components/media-viewer/index.d.ts +9 -18
- package/components/media-viewer/media-viewer-dialog.api.d.ts +21 -0
- package/components/media-viewer/media-viewer-dialog.api.js +17 -0
- package/components/media-viewer/media-viewer-dialog.d.ts +31 -0
- package/components/media-viewer/media-viewer-dialog.js +82 -0
- package/components/{video-viewer/video-viewer.style.js → media-viewer/media-viewer-dialog.style.js} +8 -6
- package/components/media-viewer/media-viewer.api.d.ts +6 -12
- package/components/media-viewer/media-viewer.api.js +4 -14
- package/components/media-viewer/media-viewer.d.ts +6 -12
- package/components/svga-card/index.d.ts +136 -0
- package/components/svga-card/index.js +8 -0
- package/components/svga-card/svga-card.api.d.ts +41 -0
- package/components/svga-card/svga-card.api.js +13 -0
- package/components/svga-card/svga-card.d.ts +73 -0
- package/components/svga-card/svga-card.js +56 -0
- package/components/svga-card/svga-card.style.js +17 -0
- package/components/svga-viewer/index.d.ts +80 -0
- package/components/svga-viewer/index.js +7 -0
- package/components/svga-viewer/svga-viewer.api.d.ts +25 -0
- package/components/svga-viewer/svga-viewer.api.js +11 -0
- package/components/svga-viewer/svga-viewer.d.ts +38 -0
- package/components/svga-viewer/svga-viewer.js +55 -0
- package/components/transition/index.d.ts +3 -3
- package/components/transition/transition.d.ts +1 -1
- package/components/transition-group/index.d.ts +9 -9
- package/components/transition-group/transition-group.api.d.ts +2 -2
- package/components/transition-group/transition-group.d.ts +5 -5
- package/components/upload/upload-item.d.ts +3 -0
- package/components/upload/upload-item.js +23 -4
- package/components/upload/upload.api.d.ts +1 -0
- package/components/upload/upload.api.js +2 -1
- package/components/upload/upload.style.js +19 -2
- package/components/video-card/index.d.ts +9 -18
- package/components/video-card/video-card.api.d.ts +3 -6
- package/components/video-card/video-card.d.ts +6 -12
- package/components/video-card/video-card.js +3 -2
- package/components/video-viewer/index.d.ts +9 -18
- package/components/video-viewer/video-viewer.api.d.ts +3 -6
- package/components/video-viewer/video-viewer.api.js +2 -2
- package/components/video-viewer/video-viewer.d.ts +6 -12
- package/components/video-viewer/video-viewer.js +13 -68
- package/layout/layout-tabbar/layout-tabbar.vue.js +1 -1
- package/package.json +3 -1
- package/components/audio-viewer/audio-viewer.style.js +0 -19
- package/components/image-card/image-card.vue.d.ts +0 -260
- package/components/image-card/image-card.vue.js +0 -64
- /package/components/{audio-viewer/audio-viewer.style.d.ts → media-viewer/media-viewer-dialog.style.d.ts} +0 -0
- /package/components/{video-viewer/video-viewer.style.d.ts → svga-card/svga-card.style.d.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const mediaViewerDialogProps: {
|
|
3
|
+
teleported: {
|
|
4
|
+
type: BooleanConstructor;
|
|
5
|
+
};
|
|
6
|
+
closeOnPressEscape: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
hideOnClickModal: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type MediaViewerDialogProps = ExtractPropTypes<typeof mediaViewerDialogProps>;
|
|
15
|
+
export type MediaViewerDialogSlots = {
|
|
16
|
+
default: {};
|
|
17
|
+
};
|
|
18
|
+
export declare const mediaViewerDialogEmits: {
|
|
19
|
+
close: () => boolean;
|
|
20
|
+
};
|
|
21
|
+
export type MediaViewerDialogEmits = typeof mediaViewerDialogEmits;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const mediaViewerDialogProps = {
|
|
2
|
+
teleported: {
|
|
3
|
+
type: Boolean
|
|
4
|
+
},
|
|
5
|
+
closeOnPressEscape: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: true
|
|
8
|
+
},
|
|
9
|
+
hideOnClickModal: {
|
|
10
|
+
type: Boolean
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const mediaViewerDialogEmits = {
|
|
14
|
+
close: () => true
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { mediaViewerDialogEmits, mediaViewerDialogProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const MediaViewerDialog: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
teleported: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
};
|
|
5
|
+
closeOnPressEscape: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
hideOnClickModal: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
12
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
close: () => boolean;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
teleported: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
};
|
|
18
|
+
closeOnPressEscape: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
hideOnClickModal: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{
|
|
26
|
+
onClose?: (() => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
teleported: boolean;
|
|
29
|
+
closeOnPressEscape: boolean;
|
|
30
|
+
hideOnClickModal: boolean;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent, ref, createVNode } from 'vue';
|
|
2
|
+
import ElTeleport from 'element-plus/es/components/teleport/index.mjs';
|
|
3
|
+
import ElFocusTrap from 'element-plus/es/components/focus-trap/index.mjs';
|
|
4
|
+
import stdin_default$2 from '../mask/mask.js';
|
|
5
|
+
import stdin_default$3 from '../close/close.js';
|
|
6
|
+
import stdin_default from './media-viewer-dialog.style.js';
|
|
7
|
+
import { useZIndex } from 'element-plus';
|
|
8
|
+
import { mediaViewerDialogEmits, mediaViewerDialogProps } from './media-viewer-dialog.api.js';
|
|
9
|
+
import stdin_default$1 from '../transition/transition.js';
|
|
10
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
11
|
+
|
|
12
|
+
const MediaViewerDialog = defineComponent({
|
|
13
|
+
name: "CoMediaViewerDialog",
|
|
14
|
+
props: mediaViewerDialogProps,
|
|
15
|
+
emits: mediaViewerDialogEmits,
|
|
16
|
+
setup(props, {
|
|
17
|
+
emit,
|
|
18
|
+
slots
|
|
19
|
+
}) {
|
|
20
|
+
const {
|
|
21
|
+
prefixCls
|
|
22
|
+
} = useComponentConfig("media-viewer-dialog", props);
|
|
23
|
+
const {
|
|
24
|
+
hashId
|
|
25
|
+
} = stdin_default(prefixCls);
|
|
26
|
+
const {
|
|
27
|
+
nextZIndex
|
|
28
|
+
} = useZIndex();
|
|
29
|
+
const wrapper = ref();
|
|
30
|
+
const zIndex = ref(nextZIndex());
|
|
31
|
+
function onFocusoutPrevented(event) {
|
|
32
|
+
if (event.detail?.focusReason === "pointer") {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function onCloseRequested() {
|
|
37
|
+
if (props.closeOnPressEscape) {
|
|
38
|
+
hide();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function hide() {
|
|
42
|
+
emit("close");
|
|
43
|
+
}
|
|
44
|
+
return () => {
|
|
45
|
+
return createVNode(ElTeleport, {
|
|
46
|
+
"to": "body",
|
|
47
|
+
"disabled": !props.teleported
|
|
48
|
+
}, {
|
|
49
|
+
default: () => [createVNode(stdin_default$1, {
|
|
50
|
+
"name": "fade",
|
|
51
|
+
"appear": true
|
|
52
|
+
}, {
|
|
53
|
+
default: () => [createVNode("div", {
|
|
54
|
+
"ref": "wrapper",
|
|
55
|
+
"tabindex": -1,
|
|
56
|
+
"class": [hashId.value, prefixCls.value],
|
|
57
|
+
"style": {
|
|
58
|
+
zIndex: zIndex.value
|
|
59
|
+
}
|
|
60
|
+
}, [createVNode(ElFocusTrap, {
|
|
61
|
+
"loop": true,
|
|
62
|
+
"trapped": true,
|
|
63
|
+
"focus-trap-el": wrapper.value,
|
|
64
|
+
"focus-start-el": "container",
|
|
65
|
+
"onFocusout-prevented": onFocusoutPrevented,
|
|
66
|
+
"onRelease-requested": onCloseRequested
|
|
67
|
+
}, {
|
|
68
|
+
default: () => [createVNode(stdin_default$2, {
|
|
69
|
+
"onClick": () => props.hideOnClickModal && hide()
|
|
70
|
+
}, null), createVNode(stdin_default$3, {
|
|
71
|
+
"onClick": () => hide()
|
|
72
|
+
}, null), createVNode("div", {
|
|
73
|
+
"class": `${prefixCls.value}-content`
|
|
74
|
+
}, [slots.default?.()])]
|
|
75
|
+
})])]
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export { MediaViewerDialog };
|
package/components/{video-viewer/video-viewer.style.js → media-viewer/media-viewer-dialog.style.js}
RENAMED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { getSimpleStyleHook } from '../theme/getSimpleStyleHook.js';
|
|
2
2
|
|
|
3
|
-
var stdin_default = getSimpleStyleHook("
|
|
3
|
+
var stdin_default = getSimpleStyleHook("CoMediaViewerDialog", (token) => {
|
|
4
4
|
const { componentCls } = token;
|
|
5
5
|
return {
|
|
6
6
|
[componentCls]: {
|
|
7
7
|
position: "fixed",
|
|
8
8
|
inset: 0,
|
|
9
|
-
display: "flex",
|
|
10
|
-
alignItems: "center",
|
|
11
|
-
justifyContent: "center",
|
|
12
9
|
"&:focus": {
|
|
13
10
|
outline: "none"
|
|
14
11
|
},
|
|
15
|
-
[`${componentCls}-
|
|
12
|
+
[`${componentCls}-content`]: {
|
|
13
|
+
position: "relative",
|
|
14
|
+
display: "flex",
|
|
15
|
+
justifyContent: "center",
|
|
16
|
+
alignItems: "center",
|
|
16
17
|
width: "100%",
|
|
17
18
|
height: "100%",
|
|
18
|
-
|
|
19
|
+
overflowY: "auto",
|
|
20
|
+
overflowX: "hidden"
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ExtractPropTypes } from 'vue';
|
|
2
2
|
export declare const mediaViewerBaseProps: {
|
|
3
|
+
src: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
3
6
|
teleported: {
|
|
4
7
|
type: BooleanConstructor;
|
|
5
8
|
};
|
|
6
|
-
zIndex: {
|
|
7
|
-
type: NumberConstructor;
|
|
8
|
-
};
|
|
9
9
|
closeOnPressEscape: {
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
default: boolean;
|
|
@@ -13,18 +13,15 @@ export declare const mediaViewerBaseProps: {
|
|
|
13
13
|
hideOnClickModal: {
|
|
14
14
|
type: BooleanConstructor;
|
|
15
15
|
};
|
|
16
|
-
src: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
};
|
|
19
16
|
};
|
|
20
17
|
export type MediaViewerBaseProps = ExtractPropTypes<typeof mediaViewerBaseProps>;
|
|
21
18
|
export declare const mediaViewerProps: {
|
|
19
|
+
src: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
22
|
teleported: {
|
|
23
23
|
type: BooleanConstructor;
|
|
24
24
|
};
|
|
25
|
-
zIndex: {
|
|
26
|
-
type: NumberConstructor;
|
|
27
|
-
};
|
|
28
25
|
closeOnPressEscape: {
|
|
29
26
|
type: BooleanConstructor;
|
|
30
27
|
default: boolean;
|
|
@@ -32,9 +29,6 @@ export declare const mediaViewerProps: {
|
|
|
32
29
|
hideOnClickModal: {
|
|
33
30
|
type: BooleanConstructor;
|
|
34
31
|
};
|
|
35
|
-
src: {
|
|
36
|
-
type: StringConstructor;
|
|
37
|
-
};
|
|
38
32
|
};
|
|
39
33
|
export type MediaViewerProps = ExtractPropTypes<typeof mediaViewerProps>;
|
|
40
34
|
export type MediaViewerSlots = {
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
+
import { mediaViewerDialogEmits, mediaViewerDialogProps } from './media-viewer-dialog.api.js';
|
|
2
|
+
|
|
1
3
|
const mediaViewerBaseProps = {
|
|
2
|
-
|
|
3
|
-
type: Boolean
|
|
4
|
-
},
|
|
5
|
-
zIndex: {
|
|
6
|
-
type: Number
|
|
7
|
-
},
|
|
8
|
-
closeOnPressEscape: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: true
|
|
11
|
-
},
|
|
12
|
-
hideOnClickModal: {
|
|
13
|
-
type: Boolean
|
|
14
|
-
},
|
|
4
|
+
...mediaViewerDialogProps,
|
|
15
5
|
src: {
|
|
16
6
|
type: String
|
|
17
7
|
}
|
|
18
8
|
};
|
|
19
9
|
const mediaViewerProps = mediaViewerBaseProps;
|
|
20
10
|
const mediaViewerBaseEmits = {
|
|
21
|
-
|
|
11
|
+
...mediaViewerDialogEmits
|
|
22
12
|
};
|
|
23
13
|
const mediaViewerEmits = {
|
|
24
14
|
...mediaViewerBaseEmits
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type SlotsType } from 'vue';
|
|
2
2
|
import { type MediaViewerSlots } from './media-viewer.api';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
src: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
4
7
|
teleported: {
|
|
5
8
|
type: BooleanConstructor;
|
|
6
9
|
};
|
|
7
|
-
zIndex: {
|
|
8
|
-
type: NumberConstructor;
|
|
9
|
-
};
|
|
10
10
|
closeOnPressEscape: {
|
|
11
11
|
type: BooleanConstructor;
|
|
12
12
|
default: boolean;
|
|
@@ -14,18 +14,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
14
14
|
hideOnClickModal: {
|
|
15
15
|
type: BooleanConstructor;
|
|
16
16
|
};
|
|
17
|
-
src: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
};
|
|
20
17
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
18
|
close: () => boolean;
|
|
22
19
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
src: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
};
|
|
23
23
|
teleported: {
|
|
24
24
|
type: BooleanConstructor;
|
|
25
25
|
};
|
|
26
|
-
zIndex: {
|
|
27
|
-
type: NumberConstructor;
|
|
28
|
-
};
|
|
29
26
|
closeOnPressEscape: {
|
|
30
27
|
type: BooleanConstructor;
|
|
31
28
|
default: boolean;
|
|
@@ -33,9 +30,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
33
30
|
hideOnClickModal: {
|
|
34
31
|
type: BooleanConstructor;
|
|
35
32
|
};
|
|
36
|
-
src: {
|
|
37
|
-
type: StringConstructor;
|
|
38
|
-
};
|
|
39
33
|
}>> & Readonly<{
|
|
40
34
|
onClose?: (() => any) | undefined;
|
|
41
35
|
}>, {
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export * from './svga-card.api';
|
|
2
|
+
declare const _SvgaCard: {
|
|
3
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
src: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
teleported: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
};
|
|
10
|
+
closeOnPressEscape: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
hideOnClickModal: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
};
|
|
17
|
+
size: {
|
|
18
|
+
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
name: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
};
|
|
24
|
+
type: {
|
|
25
|
+
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
26
|
+
};
|
|
27
|
+
title: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
srcList: {
|
|
31
|
+
type: import("vue").PropType<string[]>;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{
|
|
34
|
+
onOpen?: (() => any) | undefined;
|
|
35
|
+
onClose?: (() => any) | undefined;
|
|
36
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
open: () => boolean;
|
|
38
|
+
close: () => boolean;
|
|
39
|
+
}, import("vue").PublicProps, {
|
|
40
|
+
size: "large" | "small" | "middle" | "mini";
|
|
41
|
+
teleported: boolean;
|
|
42
|
+
closeOnPressEscape: boolean;
|
|
43
|
+
hideOnClickModal: boolean;
|
|
44
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
45
|
+
P: {};
|
|
46
|
+
B: {};
|
|
47
|
+
D: {};
|
|
48
|
+
C: {};
|
|
49
|
+
M: {};
|
|
50
|
+
Defaults: {};
|
|
51
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
52
|
+
src: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
};
|
|
55
|
+
teleported: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
};
|
|
58
|
+
closeOnPressEscape: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
};
|
|
62
|
+
hideOnClickModal: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
};
|
|
65
|
+
size: {
|
|
66
|
+
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
name: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
};
|
|
72
|
+
type: {
|
|
73
|
+
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
74
|
+
};
|
|
75
|
+
title: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
};
|
|
78
|
+
srcList: {
|
|
79
|
+
type: import("vue").PropType<string[]>;
|
|
80
|
+
};
|
|
81
|
+
}>> & Readonly<{
|
|
82
|
+
onOpen?: (() => any) | undefined;
|
|
83
|
+
onClose?: (() => any) | undefined;
|
|
84
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
85
|
+
size: "large" | "small" | "middle" | "mini";
|
|
86
|
+
teleported: boolean;
|
|
87
|
+
closeOnPressEscape: boolean;
|
|
88
|
+
hideOnClickModal: boolean;
|
|
89
|
+
}>;
|
|
90
|
+
__isFragment?: never;
|
|
91
|
+
__isTeleport?: never;
|
|
92
|
+
__isSuspense?: never;
|
|
93
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
94
|
+
src: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
};
|
|
97
|
+
teleported: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
};
|
|
100
|
+
closeOnPressEscape: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
default: boolean;
|
|
103
|
+
};
|
|
104
|
+
hideOnClickModal: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
};
|
|
107
|
+
size: {
|
|
108
|
+
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
name: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
};
|
|
114
|
+
type: {
|
|
115
|
+
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
116
|
+
};
|
|
117
|
+
title: {
|
|
118
|
+
type: StringConstructor;
|
|
119
|
+
};
|
|
120
|
+
srcList: {
|
|
121
|
+
type: import("vue").PropType<string[]>;
|
|
122
|
+
};
|
|
123
|
+
}>> & Readonly<{
|
|
124
|
+
onOpen?: (() => any) | undefined;
|
|
125
|
+
onClose?: (() => any) | undefined;
|
|
126
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
127
|
+
open: () => boolean;
|
|
128
|
+
close: () => boolean;
|
|
129
|
+
}, string, {
|
|
130
|
+
size: "large" | "small" | "middle" | "mini";
|
|
131
|
+
teleported: boolean;
|
|
132
|
+
closeOnPressEscape: boolean;
|
|
133
|
+
hideOnClickModal: boolean;
|
|
134
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
|
|
135
|
+
export { _SvgaCard as SvgaCard };
|
|
136
|
+
export default _SvgaCard;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { withInstall } from '../utils.js';
|
|
2
|
+
import stdin_default$1 from './svga-card.js';
|
|
3
|
+
export { svgaCardEmits, svgaCardProps } from './svga-card.api.js';
|
|
4
|
+
|
|
5
|
+
const _SvgaCard = withInstall(stdin_default$1);
|
|
6
|
+
var stdin_default = _SvgaCard;
|
|
7
|
+
|
|
8
|
+
export { _SvgaCard as SvgaCard, stdin_default as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const svgaCardProps: {
|
|
3
|
+
src: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
};
|
|
6
|
+
teleported: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
};
|
|
9
|
+
closeOnPressEscape: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
hideOnClickModal: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
name: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
};
|
|
23
|
+
type: {
|
|
24
|
+
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
25
|
+
};
|
|
26
|
+
title: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
srcList: {
|
|
30
|
+
type: import("vue").PropType<string[]>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type SvgaCardProps = ExtractPropTypes<typeof svgaCardProps>;
|
|
34
|
+
export declare const svgaCardEmits: {
|
|
35
|
+
open: () => boolean;
|
|
36
|
+
close: () => boolean;
|
|
37
|
+
};
|
|
38
|
+
export type SvgaCardEmits = typeof svgaCardEmits;
|
|
39
|
+
export interface SvgaCardExpose {
|
|
40
|
+
view: () => void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mediaCardBaseProps } from '../media-card/media-card.api.js';
|
|
2
|
+
import { svgaViewerProps } from '../svga-viewer/svga-viewer.api.js';
|
|
3
|
+
|
|
4
|
+
const svgaCardProps = {
|
|
5
|
+
...mediaCardBaseProps,
|
|
6
|
+
...svgaViewerProps
|
|
7
|
+
};
|
|
8
|
+
const svgaCardEmits = {
|
|
9
|
+
open: () => true,
|
|
10
|
+
close: () => true
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { svgaCardEmits, svgaCardProps };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
src: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
};
|
|
5
|
+
teleported: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
};
|
|
8
|
+
closeOnPressEscape: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
hideOnClickModal: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
};
|
|
15
|
+
size: {
|
|
16
|
+
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
name: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
type: {
|
|
23
|
+
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
24
|
+
};
|
|
25
|
+
title: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
srcList: {
|
|
29
|
+
type: import("vue").PropType<string[]>;
|
|
30
|
+
};
|
|
31
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
open: () => boolean;
|
|
33
|
+
close: () => boolean;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
|
+
src: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
38
|
+
teleported: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
};
|
|
41
|
+
closeOnPressEscape: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
hideOnClickModal: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
};
|
|
48
|
+
size: {
|
|
49
|
+
type: import("vue").PropType<"mini" | "small" | "middle" | "large">;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
name: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
};
|
|
55
|
+
type: {
|
|
56
|
+
type: import("vue").PropType<"image" | "video" | "audio" | (string & {})>;
|
|
57
|
+
};
|
|
58
|
+
title: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
};
|
|
61
|
+
srcList: {
|
|
62
|
+
type: import("vue").PropType<string[]>;
|
|
63
|
+
};
|
|
64
|
+
}>> & Readonly<{
|
|
65
|
+
onOpen?: (() => any) | undefined;
|
|
66
|
+
onClose?: (() => any) | undefined;
|
|
67
|
+
}>, {
|
|
68
|
+
size: "large" | "small" | "middle" | "mini";
|
|
69
|
+
teleported: boolean;
|
|
70
|
+
closeOnPressEscape: boolean;
|
|
71
|
+
hideOnClickModal: boolean;
|
|
72
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
73
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent, ref, createVNode, Fragment, mergeProps, createTextVNode } from 'vue';
|
|
2
|
+
import { useLockscreen } from 'element-plus';
|
|
3
|
+
import { svgaCardEmits, svgaCardProps } from './svga-card.api.js';
|
|
4
|
+
import stdin_default$2 from '../svga-viewer/svga-viewer.js';
|
|
5
|
+
import stdin_default$1 from './svga-card.style.js';
|
|
6
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
7
|
+
|
|
8
|
+
var stdin_default = defineComponent({
|
|
9
|
+
name: "CoSvgaCard",
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
props: svgaCardProps,
|
|
12
|
+
emits: svgaCardEmits,
|
|
13
|
+
setup(props, {
|
|
14
|
+
attrs,
|
|
15
|
+
emit,
|
|
16
|
+
expose
|
|
17
|
+
}) {
|
|
18
|
+
const {
|
|
19
|
+
prefixCls
|
|
20
|
+
} = useComponentConfig("svga-card", props);
|
|
21
|
+
const {
|
|
22
|
+
hashId
|
|
23
|
+
} = stdin_default$1(prefixCls);
|
|
24
|
+
const viewerVisible = ref(false);
|
|
25
|
+
useLockscreen(viewerVisible);
|
|
26
|
+
const openViewer = () => {
|
|
27
|
+
viewerVisible.value = true;
|
|
28
|
+
emit("open");
|
|
29
|
+
};
|
|
30
|
+
function closeViewer() {
|
|
31
|
+
viewerVisible.value = false;
|
|
32
|
+
emit("close");
|
|
33
|
+
}
|
|
34
|
+
expose({
|
|
35
|
+
view() {
|
|
36
|
+
openViewer();
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return () => {
|
|
40
|
+
return createVNode(Fragment, null, [createVNode("div", mergeProps(attrs, {
|
|
41
|
+
"class": [hashId.value, prefixCls.value, `is-${props.size}`],
|
|
42
|
+
"title": props.title || props.src,
|
|
43
|
+
"onClick": () => openViewer()
|
|
44
|
+
}), [createVNode("div", {
|
|
45
|
+
"class": `${prefixCls.value}-type`
|
|
46
|
+
}, [createTextVNode("svga")]), createVNode("div", {
|
|
47
|
+
"class": `${prefixCls.value}-filename`
|
|
48
|
+
}, [props.name])]), viewerVisible.value && createVNode(stdin_default$2, {
|
|
49
|
+
"src": props.src,
|
|
50
|
+
"onClose": () => closeViewer()
|
|
51
|
+
}, null)]);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export { stdin_default as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getSimpleStyleHook } from '../theme/getSimpleStyleHook.js';
|
|
2
|
+
import { getMediaCardFileTypeStyle, getMediaCardFileNameStyle, getMediaCardStyle } from '../media-card/media-card.style.js';
|
|
3
|
+
|
|
4
|
+
var stdin_default = getSimpleStyleHook("CoSvgaCard", (token) => {
|
|
5
|
+
const { componentCls } = token;
|
|
6
|
+
return {
|
|
7
|
+
[componentCls]: {
|
|
8
|
+
...getMediaCardStyle(token),
|
|
9
|
+
...getMediaCardFileNameStyle(token),
|
|
10
|
+
...getMediaCardFileTypeStyle(token),
|
|
11
|
+
cursor: "pointer",
|
|
12
|
+
background: token.colorFillTertiary
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export { stdin_default as default };
|