pukaad-ui-lib 1.404.0 → 1.405.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/display/display-video.d.vue.ts +6 -0
- package/dist/runtime/components/display/display-video.vue +33 -6
- package/dist/runtime/components/display/display-video.vue.d.ts +6 -0
- package/dist/runtime/components/input/input-text-field.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-text-field.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
- package/dist/runtime/components/read-more-text.vue +4 -4
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -40,6 +40,8 @@ export interface DisplayVideoProps {
|
|
|
40
40
|
playButtonHideDelay?: number;
|
|
41
41
|
clickToPlay?: boolean;
|
|
42
42
|
navButton?: boolean;
|
|
43
|
+
prevDisabled?: boolean;
|
|
44
|
+
nextDisabled?: boolean;
|
|
43
45
|
}
|
|
44
46
|
type DisplayVideoAction = {
|
|
45
47
|
video: HTMLVideoElement | null;
|
|
@@ -56,6 +58,8 @@ declare var __VLS_1: {
|
|
|
56
58
|
}, __VLS_58: {
|
|
57
59
|
prev: () => void;
|
|
58
60
|
next: () => void;
|
|
61
|
+
prevDisabled: boolean;
|
|
62
|
+
nextDisabled: boolean;
|
|
59
63
|
}, __VLS_86: {};
|
|
60
64
|
type __VLS_Slots = {} & {
|
|
61
65
|
close?: (props: typeof __VLS_1) => any;
|
|
@@ -113,6 +117,8 @@ declare const __VLS_base: import("vue").DefineComponent<DisplayVideoProps, {
|
|
|
113
117
|
playButtonHideDelay: number;
|
|
114
118
|
clickToPlay: boolean;
|
|
115
119
|
navButton: boolean;
|
|
120
|
+
prevDisabled: boolean;
|
|
121
|
+
nextDisabled: boolean;
|
|
116
122
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
117
123
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
118
124
|
declare const _default: typeof __VLS_export;
|
|
@@ -72,13 +72,32 @@
|
|
|
72
72
|
</slot>
|
|
73
73
|
|
|
74
74
|
<!-- ปุ่มเลื่อนขึ้นลงวีดีโอ -->
|
|
75
|
-
<slot
|
|
75
|
+
<slot
|
|
76
|
+
v-if="props.navButton"
|
|
77
|
+
name="nav"
|
|
78
|
+
:prev="onPrev"
|
|
79
|
+
:next="onNext"
|
|
80
|
+
:prev-disabled="props.prevDisabled"
|
|
81
|
+
:next-disabled="props.nextDisabled"
|
|
82
|
+
>
|
|
76
83
|
<div class="absolute top-1/2 right-[16px] -translate-y-1/2 z-10">
|
|
77
84
|
<div class="flex flex-col gap-[32px] items-center">
|
|
78
|
-
<Button
|
|
85
|
+
<Button
|
|
86
|
+
circle
|
|
87
|
+
color="dark"
|
|
88
|
+
class="w-[50px] h-[50px]"
|
|
89
|
+
:disabled="props.prevDisabled"
|
|
90
|
+
@click="onPrev"
|
|
91
|
+
>
|
|
79
92
|
<Icon name="lucide:chevron-up" class="w-[32px] h-[32px]" />
|
|
80
93
|
</Button>
|
|
81
|
-
<Button
|
|
94
|
+
<Button
|
|
95
|
+
circle
|
|
96
|
+
color="dark"
|
|
97
|
+
class="w-[50px] h-[50px]"
|
|
98
|
+
:disabled="props.nextDisabled"
|
|
99
|
+
@click="onNext"
|
|
100
|
+
>
|
|
82
101
|
<Icon name="lucide:chevron-down" class="w-[32px] h-[32px]" />
|
|
83
102
|
</Button>
|
|
84
103
|
</div>
|
|
@@ -168,7 +187,9 @@ const props = defineProps({
|
|
|
168
187
|
playButtonAutoHide: { type: Boolean, required: false, default: true },
|
|
169
188
|
playButtonHideDelay: { type: Number, required: false, default: 600 },
|
|
170
189
|
clickToPlay: { type: Boolean, required: false, default: false },
|
|
171
|
-
navButton: { type: Boolean, required: false, default: false }
|
|
190
|
+
navButton: { type: Boolean, required: false, default: false },
|
|
191
|
+
prevDisabled: { type: Boolean, required: false, default: false },
|
|
192
|
+
nextDisabled: { type: Boolean, required: false, default: false }
|
|
172
193
|
});
|
|
173
194
|
const videoRef = ref(null);
|
|
174
195
|
const paused = ref(true);
|
|
@@ -245,8 +266,14 @@ const onPlayClick = () => {
|
|
|
245
266
|
};
|
|
246
267
|
const onFullscreen = () => emit("fullscreen", actionPayload());
|
|
247
268
|
const onClose = () => emit("close", actionPayload());
|
|
248
|
-
const onPrev = () =>
|
|
249
|
-
|
|
269
|
+
const onPrev = () => {
|
|
270
|
+
if (props.prevDisabled) return;
|
|
271
|
+
emit("prev", actionPayload());
|
|
272
|
+
};
|
|
273
|
+
const onNext = () => {
|
|
274
|
+
if (props.nextDisabled) return;
|
|
275
|
+
emit("next", actionPayload());
|
|
276
|
+
};
|
|
250
277
|
const play = () => videoRef.value?.play();
|
|
251
278
|
const pause = () => videoRef.value?.pause();
|
|
252
279
|
const load = () => videoRef.value?.load();
|
|
@@ -40,6 +40,8 @@ export interface DisplayVideoProps {
|
|
|
40
40
|
playButtonHideDelay?: number;
|
|
41
41
|
clickToPlay?: boolean;
|
|
42
42
|
navButton?: boolean;
|
|
43
|
+
prevDisabled?: boolean;
|
|
44
|
+
nextDisabled?: boolean;
|
|
43
45
|
}
|
|
44
46
|
type DisplayVideoAction = {
|
|
45
47
|
video: HTMLVideoElement | null;
|
|
@@ -56,6 +58,8 @@ declare var __VLS_1: {
|
|
|
56
58
|
}, __VLS_58: {
|
|
57
59
|
prev: () => void;
|
|
58
60
|
next: () => void;
|
|
61
|
+
prevDisabled: boolean;
|
|
62
|
+
nextDisabled: boolean;
|
|
59
63
|
}, __VLS_86: {};
|
|
60
64
|
type __VLS_Slots = {} & {
|
|
61
65
|
close?: (props: typeof __VLS_1) => any;
|
|
@@ -113,6 +117,8 @@ declare const __VLS_base: import("vue").DefineComponent<DisplayVideoProps, {
|
|
|
113
117
|
playButtonHideDelay: number;
|
|
114
118
|
clickToPlay: boolean;
|
|
115
119
|
navButton: boolean;
|
|
120
|
+
prevDisabled: boolean;
|
|
121
|
+
nextDisabled: boolean;
|
|
116
122
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
117
123
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
118
124
|
declare const _default: typeof __VLS_export;
|
|
@@ -59,8 +59,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
59
59
|
id: string;
|
|
60
60
|
name: string;
|
|
61
61
|
required: boolean;
|
|
62
|
-
limit: number;
|
|
63
62
|
readonly: boolean;
|
|
63
|
+
limit: number;
|
|
64
64
|
disabledErrorMessage: boolean;
|
|
65
65
|
disabledBorder: boolean;
|
|
66
66
|
showCounter: boolean;
|
|
@@ -59,8 +59,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
59
59
|
id: string;
|
|
60
60
|
name: string;
|
|
61
61
|
required: boolean;
|
|
62
|
-
limit: number;
|
|
63
62
|
readonly: boolean;
|
|
63
|
+
limit: number;
|
|
64
64
|
disabledErrorMessage: boolean;
|
|
65
65
|
disabledBorder: boolean;
|
|
66
66
|
showCounter: boolean;
|
|
@@ -47,8 +47,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
49
|
rows: number;
|
|
50
|
-
limit: number;
|
|
51
50
|
readonly: boolean;
|
|
51
|
+
limit: number;
|
|
52
52
|
disabledErrorMessage: boolean;
|
|
53
53
|
disabledBorder: boolean;
|
|
54
54
|
showCounter: boolean;
|
|
@@ -47,8 +47,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
49
|
rows: number;
|
|
50
|
-
limit: number;
|
|
51
50
|
readonly: boolean;
|
|
51
|
+
limit: number;
|
|
52
52
|
disabledErrorMessage: boolean;
|
|
53
53
|
disabledBorder: boolean;
|
|
54
54
|
showCounter: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div ref="container" class="whitespace-pre-wrap break-words">
|
|
3
|
-
<template v-if="expanded || !isTruncated">{{ props.text }}</template>
|
|
4
|
-
<template v-else>{{ displayText }}...<span class="text-primary cursor-pointer" @click="toggle">ดูเพิ่มเติม</span></template>
|
|
5
|
-
</div>
|
|
2
|
+
<div ref="container" class="whitespace-pre-wrap break-words">
|
|
3
|
+
<template v-if="expanded || !isTruncated">{{ props.text }}</template>
|
|
4
|
+
<template v-else>{{ displayText }}...<span class="text-primary cursor-pointer" @click="toggle">ดูเพิ่มเติม</span></template>
|
|
5
|
+
</div>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script setup>
|