pukaad-ui-lib 1.400.0 → 1.401.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/module.json +1 -1
- package/dist/runtime/components/card/card-content/card-content-close.d.vue.ts +7 -0
- package/dist/runtime/components/card/card-content/card-content-close.vue +15 -0
- package/dist/runtime/components/card/card-content/card-content-close.vue.d.ts +7 -0
- package/dist/runtime/components/card/card-content/card-content.d.vue.ts +3 -0
- package/dist/runtime/components/card/card-content/card-content.vue +10 -1
- package/dist/runtime/components/card/card-content/card-content.vue.d.ts +3 -0
- package/dist/runtime/components/display/display-video.vue +16 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
+
close: () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onClose?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Button
|
|
3
|
+
type="button"
|
|
4
|
+
circle
|
|
5
|
+
variant="ghost"
|
|
6
|
+
class="size-[24px] p-0 bg-white text-black hover:bg-white"
|
|
7
|
+
@click.stop="emit('close')"
|
|
8
|
+
>
|
|
9
|
+
<Icon name="lucide:x" size="16" />
|
|
10
|
+
</Button>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
const emit = defineEmits(["close"]);
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
+
close: () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onClose?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -9,12 +9,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
9
9
|
"update:selected": (value: boolean) => any;
|
|
10
10
|
} & {
|
|
11
11
|
click: (item: CardContentItem) => any;
|
|
12
|
+
close: (item: CardContentItem) => any;
|
|
12
13
|
action: (name: string, item: CardContentItem) => any;
|
|
13
14
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
15
|
onClick?: ((item: CardContentItem) => any) | undefined;
|
|
16
|
+
onClose?: ((item: CardContentItem) => any) | undefined;
|
|
15
17
|
"onUpdate:selected"?: ((value: boolean) => any) | undefined;
|
|
16
18
|
onAction?: ((name: string, item: CardContentItem) => any) | undefined;
|
|
17
19
|
}>, {
|
|
20
|
+
closable: boolean;
|
|
18
21
|
selectable: boolean;
|
|
19
22
|
disable: boolean;
|
|
20
23
|
disabledNavigate: boolean;
|
|
@@ -41,6 +41,13 @@
|
|
|
41
41
|
>
|
|
42
42
|
<CardContentSelect v-model="selected" />
|
|
43
43
|
</div>
|
|
44
|
+
|
|
45
|
+
<div
|
|
46
|
+
v-if="props.closable"
|
|
47
|
+
class="absolute right-[8px] top-[8px] z-content"
|
|
48
|
+
>
|
|
49
|
+
<CardContentClose @close="emit('close', props.item)" />
|
|
50
|
+
</div>
|
|
44
51
|
</div>
|
|
45
52
|
</template>
|
|
46
53
|
|
|
@@ -53,18 +60,20 @@ import CardContentVideo from "./card-content-video.vue";
|
|
|
53
60
|
import CardContentTime from "./card-content-time.vue";
|
|
54
61
|
import CardContentMenu from "./card-content-menu.vue";
|
|
55
62
|
import CardContentSelect from "./card-content-select.vue";
|
|
63
|
+
import CardContentClose from "./card-content-close.vue";
|
|
56
64
|
import CardContentDisable from "./card-content-disable.vue";
|
|
57
65
|
const router = useRouter();
|
|
58
66
|
const props = defineProps({
|
|
59
67
|
item: { type: Object, required: true },
|
|
60
68
|
state: { type: String, required: false },
|
|
61
69
|
selectable: { type: Boolean, required: false, default: false },
|
|
70
|
+
closable: { type: Boolean, required: false, default: false },
|
|
62
71
|
disabledNavigate: { type: Boolean, required: false, default: false },
|
|
63
72
|
disable: { type: Boolean, required: false, default: false },
|
|
64
73
|
hidePin: { type: Boolean, required: false },
|
|
65
74
|
hideBookmark: { type: Boolean, required: false }
|
|
66
75
|
});
|
|
67
|
-
const emit = defineEmits(["click", "action"]);
|
|
76
|
+
const emit = defineEmits(["click", "action", "close"]);
|
|
68
77
|
const selected = defineModel("selected", { type: Boolean, ...{ default: false } });
|
|
69
78
|
const handleClick = () => {
|
|
70
79
|
if (props.disable) return;
|
|
@@ -9,12 +9,15 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
9
9
|
"update:selected": (value: boolean) => any;
|
|
10
10
|
} & {
|
|
11
11
|
click: (item: CardContentItem) => any;
|
|
12
|
+
close: (item: CardContentItem) => any;
|
|
12
13
|
action: (name: string, item: CardContentItem) => any;
|
|
13
14
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
15
|
onClick?: ((item: CardContentItem) => any) | undefined;
|
|
16
|
+
onClose?: ((item: CardContentItem) => any) | undefined;
|
|
15
17
|
"onUpdate:selected"?: ((value: boolean) => any) | undefined;
|
|
16
18
|
onAction?: ((name: string, item: CardContentItem) => any) | undefined;
|
|
17
19
|
}>, {
|
|
20
|
+
closable: boolean;
|
|
18
21
|
selectable: boolean;
|
|
19
22
|
disable: boolean;
|
|
20
23
|
disabledNavigate: boolean;
|
|
@@ -186,11 +186,26 @@ const syncPlayback = () => {
|
|
|
186
186
|
el.volume = props.volume;
|
|
187
187
|
el.playbackRate = props.playbackRate;
|
|
188
188
|
};
|
|
189
|
+
const applyStartTime = () => {
|
|
190
|
+
const el = videoRef.value;
|
|
191
|
+
if (!el || !props.startTime) return;
|
|
192
|
+
if (el.readyState >= 1) {
|
|
193
|
+
el.currentTime = props.startTime;
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
el.addEventListener(
|
|
197
|
+
"loadedmetadata",
|
|
198
|
+
() => {
|
|
199
|
+
el.currentTime = props.startTime;
|
|
200
|
+
},
|
|
201
|
+
{ once: true }
|
|
202
|
+
);
|
|
203
|
+
};
|
|
189
204
|
onMounted(() => {
|
|
190
205
|
syncPlayback();
|
|
191
206
|
const el = videoRef.value;
|
|
192
207
|
if (!el) return;
|
|
193
|
-
|
|
208
|
+
applyStartTime();
|
|
194
209
|
onPaused(el.paused);
|
|
195
210
|
});
|
|
196
211
|
onBeforeUnmount(clearHideTimer);
|