pukaad-ui-lib 1.431.0 → 1.433.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/assets/svg/id-card-selfie-guideline.svg +15 -0
- package/dist/runtime/assets/svg/passport-guideline.svg +6 -0
- package/dist/runtime/components/badge/badge-count.d.vue.ts +28 -0
- package/dist/runtime/components/badge/badge-count.vue +45 -0
- package/dist/runtime/components/badge/badge-count.vue.d.ts +28 -0
- package/dist/runtime/components/card/card-blog.d.vue.ts +1 -1
- package/dist/runtime/components/card/card-blog.vue.d.ts +1 -1
- package/dist/runtime/components/card/card-file.d.vue.ts +15 -0
- package/dist/runtime/components/card/card-file.vue +67 -0
- package/dist/runtime/components/card/card-file.vue.d.ts +15 -0
- package/dist/runtime/components/card/card-profile/card-profile-header.d.vue.ts +1 -1
- package/dist/runtime/components/card/card-profile/card-profile-header.vue.d.ts +1 -1
- package/dist/runtime/components/chat/chat-conversation-item.d.vue.ts +1 -1
- package/dist/runtime/components/chat/chat-conversation-item.vue +2 -11
- package/dist/runtime/components/chat/chat-conversation-item.vue.d.ts +1 -1
- package/dist/runtime/components/drawer/drawer-notification.d.vue.ts +1 -20
- package/dist/runtime/components/drawer/drawer-notification.vue +114 -217
- package/dist/runtime/components/drawer/drawer-notification.vue.d.ts +1 -20
- package/dist/runtime/components/image/image-cropper.d.vue.ts +1 -1
- package/dist/runtime/components/image/image-cropper.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-address.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-address.vue +1 -3
- package/dist/runtime/components/input/input-address.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-birth-date.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-birth-date.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-date-picker.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-date-picker.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-radio.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-radio.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-search.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-search.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-slider.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-slider.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-tag-modal.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-tag-modal.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
- 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/modal/modal-passport.d.vue.ts +17 -0
- package/dist/runtime/components/modal/modal-passport.vue +279 -0
- package/dist/runtime/components/modal/modal-passport.vue.d.ts +17 -0
- package/dist/runtime/components/modal/modal-personal-card-ID-selfie.d.vue.ts +17 -0
- package/dist/runtime/components/modal/modal-personal-card-ID-selfie.vue +196 -0
- package/dist/runtime/components/modal/modal-personal-card-ID-selfie.vue.d.ts +17 -0
- package/dist/runtime/components/modal/modal-province-domain.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-province-domain.vue +1 -3
- package/dist/runtime/components/modal/modal-province-domain.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-secure.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-secure.vue.d.ts +1 -1
- package/dist/runtime/components/ui/alert-dialog/AlertDialogContent.d.vue.ts +4 -4
- package/dist/runtime/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +4 -4
- package/dist/runtime/components/ui/dialog/DialogContent.d.vue.ts +4 -4
- package/dist/runtime/components/ui/dialog/DialogContent.vue.d.ts +4 -4
- package/dist/runtime/components/ui/dialog/DialogScrollContent.d.vue.ts +4 -4
- package/dist/runtime/components/ui/dialog/DialogScrollContent.vue.d.ts +4 -4
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +4 -4
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +4 -4
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +4 -4
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +4 -4
- package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +4 -4
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +4 -4
- package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +4 -4
- package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +4 -4
- package/dist/runtime/components/ui/select/SelectContent.d.vue.ts +2 -2
- package/dist/runtime/components/ui/select/SelectContent.vue.d.ts +2 -2
- package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +4 -4
- package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +4 -4
- package/dist/runtime/composables/store-notification.d.ts +189 -2
- package/dist/runtime/composables/store-notification.js +164 -16
- package/dist/runtime/composables/useProvinceRedirect.d.ts +1 -1
- package/dist/runtime/composables/useRealtime.js +0 -7
- package/dist/runtime/composables/useThaiAddress.d.ts +1 -29
- package/dist/runtime/types/notification.d.ts +44 -0
- package/dist/runtime/types/notification.js +0 -0
- package/dist/runtime/types/thai-address.d.ts +29 -0
- package/dist/runtime/types/thai-address.js +0 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="304.943" height="530" viewBox="0 0 304.943 530" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="ID Card Selfie Guideline">
|
|
3
|
+
<g id="Face">
|
|
4
|
+
<mask id="id-card-selfie-face-mask" fill="white">
|
|
5
|
+
<path d="M152.471 0C209.301 0 257.223 54.4901 272.03 128.893C273.567 128.534 275.145 128.347 276.755 128.347C292.323 128.347 304.943 145.777 304.943 167.278C304.943 188.78 292.323 206.21 276.755 206.21C276.216 206.21 275.68 206.187 275.148 206.146C265.574 290.604 214.295 355.092 152.471 355.092C90.6462 355.092 39.367 290.603 29.793 206.146C29.2617 206.187 28.7262 206.21 28.1875 206.21C12.6199 206.21 5.97154e-06 188.78 0 167.278C0 145.777 12.6199 128.347 28.1875 128.347C29.7971 128.347 31.3752 128.535 32.9111 128.893C47.7188 54.4902 95.6405 0.000256103 152.471 0Z"/>
|
|
6
|
+
</mask>
|
|
7
|
+
<path d="M152.471 0V-6H152.471L152.471 0ZM272.03 128.893L266.146 130.064L267.356 136.143L273.392 134.736L272.03 128.893ZM276.755 128.347V122.347V122.347V128.347ZM304.943 167.278H310.943V167.278H304.943ZM276.755 206.21V212.21V212.21V206.21ZM275.148 206.146L275.613 200.163L269.839 199.715L269.187 205.47L275.148 206.146ZM152.471 355.092L152.471 361.092H152.471V355.092ZM29.793 206.146L35.7548 205.47L35.1025 199.716L29.3291 200.163L29.793 206.146ZM28.1875 206.21L28.1874 212.21H28.1875V206.21ZM0 167.278H-6V167.278H0ZM28.1875 128.347V122.347H28.1874L28.1875 128.347ZM32.9111 128.893L31.5495 134.736L37.5859 136.143L38.7957 130.064L32.9111 128.893ZM152.471 0V6C205.088 6 251.582 56.8896 266.146 130.064L272.03 128.893L277.915 127.721C262.863 52.0906 213.514 -6 152.471 -6V0ZM272.03 128.893L273.392 134.736C274.493 134.479 275.614 134.347 276.755 134.347V128.347V122.347C274.675 122.347 272.64 122.59 270.668 123.049L272.03 128.893ZM276.755 128.347V134.347C282.134 134.347 287.54 137.347 291.827 143.268C296.109 149.183 298.943 157.652 298.943 167.278H304.943H310.943C310.943 155.403 307.467 144.407 301.547 136.231C295.632 128.062 286.943 122.347 276.755 122.347V128.347ZM304.943 167.278H298.943C298.943 176.905 296.109 185.374 291.827 191.288C287.54 197.21 282.134 200.21 276.755 200.21V206.21V212.21C286.943 212.21 295.632 206.495 301.547 198.326C307.467 190.15 310.943 179.153 310.943 167.278H304.943ZM276.755 206.21V200.21C276.387 200.21 276.008 200.194 275.613 200.163L275.148 206.146L274.684 212.128C275.353 212.179 276.044 212.21 276.755 212.21V206.21ZM275.148 206.146L269.187 205.47C264.509 246.73 249.668 282.838 228.753 308.5C207.845 334.152 181.15 349.092 152.471 349.092V355.092V361.092C185.616 361.092 215.473 343.787 238.054 316.081C260.628 288.384 276.213 250.019 281.11 206.821L275.148 206.146ZM152.471 355.092L152.471 349.092C123.792 349.092 97.0965 334.152 76.1888 308.5C55.2735 282.838 40.4319 246.73 35.7548 205.47L29.793 206.146L23.8312 206.821C28.728 250.019 44.3131 288.384 66.887 316.081C89.4686 343.787 119.325 361.092 152.471 361.092L152.471 355.092ZM29.793 206.146L29.3291 200.163C28.9337 200.194 28.5539 200.21 28.1875 200.21V206.21V212.21C28.8986 212.21 29.5897 212.179 30.2568 212.128L29.793 206.146ZM28.1875 206.21L28.1876 200.21C22.8082 200.21 17.4031 197.21 13.1158 191.288C8.8337 185.374 6 176.905 6 167.278H0H-6C-6 179.153 -2.52377 190.15 3.39597 198.326C9.31052 206.495 17.9992 212.21 28.1874 212.21L28.1875 206.21ZM0 167.278H6C6 157.652 8.8337 149.183 13.1158 143.268C17.4031 137.347 22.8081 134.347 28.1876 134.347L28.1875 128.347L28.1874 122.347C17.9992 122.347 9.31052 128.062 3.39597 136.231C-2.52378 144.407 -6 155.403 -6 167.278H0ZM28.1875 128.347V134.347C29.327 134.347 30.4484 134.479 31.5495 134.736L32.9111 128.893L34.2728 123.049C32.3021 122.59 30.2672 122.347 28.1875 122.347V128.347ZM32.9111 128.893L38.7957 130.064C53.3589 56.8897 99.8532 6.00024 152.471 6L152.471 0L152.471 -6C91.4278 -5.99972 42.0787 52.0907 27.0265 127.721L32.9111 128.893Z" fill="#1976B8" mask="url(#id-card-selfie-face-mask)"/>
|
|
8
|
+
</g>
|
|
9
|
+
<g id="ID Card">
|
|
10
|
+
<rect x="33.2661" y="377.608" width="226.398" height="149.392" rx="18" stroke="#1976B8" stroke-width="6"/>
|
|
11
|
+
<circle cx="55.7474" cy="400.116" r="11.3745" stroke="#1976B8" stroke-width="6"/>
|
|
12
|
+
<rect x="202.472" y="449" width="45.8508" height="66.3858" stroke="#1976B8" stroke-width="6"/>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="464" height="554" viewBox="0 0 464 554" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Passport Guideline">
|
|
3
|
+
<rect x="3" y="3" width="458" height="548" rx="18" stroke="#1976B8" stroke-width="6"/>
|
|
4
|
+
<rect x="30" y="320" width="133" height="137" stroke="#1976B8" stroke-width="6"/>
|
|
5
|
+
</g>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
export type BadgeCountColor = "destructive" | "primary";
|
|
3
|
+
export interface BadgeCountProps {
|
|
4
|
+
count?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
color?: BadgeCountColor;
|
|
7
|
+
disabledDot?: boolean;
|
|
8
|
+
class?: HTMLAttributes["class"];
|
|
9
|
+
}
|
|
10
|
+
declare var __VLS_1: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_1) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<BadgeCountProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeCountProps> & Readonly<{}>, {
|
|
15
|
+
class: HTMLAttributes["class"];
|
|
16
|
+
color: BadgeCountColor;
|
|
17
|
+
count: number;
|
|
18
|
+
max: number;
|
|
19
|
+
disabledDot: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span v-if="slots.default" :class="['relative inline-flex', props.class]">
|
|
3
|
+
<slot />
|
|
4
|
+
<span
|
|
5
|
+
v-if="mode !== 'none'"
|
|
6
|
+
:class="[badgeClass, 'absolute top-0 right-0 translate-x-1/2 -translate-y-1/2 pointer-events-none']"
|
|
7
|
+
:aria-label="ariaLabel"
|
|
8
|
+
>
|
|
9
|
+
{{ text }}
|
|
10
|
+
</span>
|
|
11
|
+
</span>
|
|
12
|
+
<span
|
|
13
|
+
v-else-if="mode !== 'none'"
|
|
14
|
+
:class="[badgeClass, props.class]"
|
|
15
|
+
:aria-label="ariaLabel"
|
|
16
|
+
>
|
|
17
|
+
{{ text }}
|
|
18
|
+
</span>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import { computed, useSlots } from "vue";
|
|
23
|
+
const props = defineProps({
|
|
24
|
+
count: { type: Number, required: false, default: 0 },
|
|
25
|
+
max: { type: Number, required: false, default: 99 },
|
|
26
|
+
color: { type: String, required: false, default: "destructive" },
|
|
27
|
+
disabledDot: { type: Boolean, required: false, default: false },
|
|
28
|
+
class: { type: null, required: false, default: void 0 }
|
|
29
|
+
});
|
|
30
|
+
const slots = useSlots();
|
|
31
|
+
const mode = computed(() => {
|
|
32
|
+
if (!Number.isFinite(props.count) || props.count <= 0) return "none";
|
|
33
|
+
if (props.count === 1 && !props.disabledDot) return "dot";
|
|
34
|
+
return "count";
|
|
35
|
+
});
|
|
36
|
+
const text = computed(() => {
|
|
37
|
+
if (mode.value !== "count") return "";
|
|
38
|
+
return props.count > props.max ? `${props.max}+` : String(props.count);
|
|
39
|
+
});
|
|
40
|
+
const badgeClass = computed(() => [
|
|
41
|
+
props.color === "primary" ? "bg-primary" : "bg-destructive",
|
|
42
|
+
mode.value === "dot" ? "inline-block size-[10px] rounded-full shrink-0" : "inline-flex items-center justify-center h-[18px] min-w-[18px] px-[4px] rounded-full text-white text-[10px] leading-none shrink-0"
|
|
43
|
+
]);
|
|
44
|
+
const ariaLabel = computed(() => `\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2D\u0E48\u0E32\u0E19 ${props.count}`);
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
export type BadgeCountColor = "destructive" | "primary";
|
|
3
|
+
export interface BadgeCountProps {
|
|
4
|
+
count?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
color?: BadgeCountColor;
|
|
7
|
+
disabledDot?: boolean;
|
|
8
|
+
class?: HTMLAttributes["class"];
|
|
9
|
+
}
|
|
10
|
+
declare var __VLS_1: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_1) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<BadgeCountProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeCountProps> & Readonly<{}>, {
|
|
15
|
+
class: HTMLAttributes["class"];
|
|
16
|
+
color: BadgeCountColor;
|
|
17
|
+
count: number;
|
|
18
|
+
max: number;
|
|
19
|
+
disabledDot: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -38,8 +38,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
38
38
|
"onBlog-updated"?: ((id: string, data: any) => any) | undefined;
|
|
39
39
|
"onBlog-deleted"?: ((id: string) => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
|
-
disabledMenu: boolean;
|
|
42
41
|
isMyProfile: boolean;
|
|
42
|
+
disabledMenu: boolean;
|
|
43
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
44
|
declare const _default: typeof __VLS_export;
|
|
45
45
|
export default _default;
|
|
@@ -38,8 +38,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
38
38
|
"onBlog-updated"?: ((id: string, data: any) => any) | undefined;
|
|
39
39
|
"onBlog-deleted"?: ((id: string) => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
|
-
disabledMenu: boolean;
|
|
42
41
|
isMyProfile: boolean;
|
|
42
|
+
disabledMenu: boolean;
|
|
43
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
44
|
declare const _default: typeof __VLS_export;
|
|
45
45
|
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
export interface CardFileProps {
|
|
3
|
+
class?: HTMLAttributes["class"];
|
|
4
|
+
fileName?: string;
|
|
5
|
+
/** bytes (number) หรือข้อความสำเร็จรูป เช่น "57KB" — แสดงเฉพาะ layout horizontal */
|
|
6
|
+
fileSize?: number | string;
|
|
7
|
+
layout?: "horizontal" | "vertical";
|
|
8
|
+
}
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<CardFileProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardFileProps> & Readonly<{}>, {
|
|
10
|
+
fileName: string;
|
|
11
|
+
fileSize: number | string;
|
|
12
|
+
layout: "horizontal" | "vertical";
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- vertical: กล่องไฟล์ในช่องอัปโหลด (Input - File) -->
|
|
3
|
+
<div
|
|
4
|
+
v-if="isVertical"
|
|
5
|
+
:class="
|
|
6
|
+
cn(
|
|
7
|
+
'bg-white border border-mercury rounded-[6px] size-[100px] p-[8px] flex flex-col items-center justify-center gap-[8px] cursor-pointer',
|
|
8
|
+
props.class
|
|
9
|
+
)
|
|
10
|
+
"
|
|
11
|
+
:title="props.fileName"
|
|
12
|
+
>
|
|
13
|
+
<div class="size-[32px] shrink-0 flex items-center justify-center">
|
|
14
|
+
<Icon name="pukaad:file-pdf" class="w-[24px] h-[32px]" />
|
|
15
|
+
</div>
|
|
16
|
+
<span class="font-body-small text-black text-center w-full truncate">
|
|
17
|
+
{{ props.fileName }}
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- horizontal: การ์ดไฟล์แนบ (Card FDF Chat) -->
|
|
22
|
+
<div
|
|
23
|
+
v-else
|
|
24
|
+
:class="
|
|
25
|
+
cn(
|
|
26
|
+
'bg-white shadow-sm flex items-center gap-[8px] p-[8px] rounded-[8px] w-fit cursor-pointer',
|
|
27
|
+
props.class
|
|
28
|
+
)
|
|
29
|
+
"
|
|
30
|
+
:title="props.fileName"
|
|
31
|
+
>
|
|
32
|
+
<div class="size-[40px] shrink-0 flex items-center justify-center">
|
|
33
|
+
<Icon name="pukaad:file-pdf" class="w-[30px] h-[40px]" />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="flex flex-col gap-[4px] items-start justify-center">
|
|
37
|
+
<span
|
|
38
|
+
class="font-body-medium-prominent text-black max-w-[300px] truncate"
|
|
39
|
+
>
|
|
40
|
+
{{ props.fileName }}
|
|
41
|
+
</span>
|
|
42
|
+
<span v-if="displaySize" class="font-body-small text-gray">
|
|
43
|
+
{{ displaySize }}
|
|
44
|
+
</span>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script setup>
|
|
50
|
+
import { computed } from "vue";
|
|
51
|
+
import { cn } from "#pukaad-ui/runtime/plugins/shadcn";
|
|
52
|
+
const props = defineProps({
|
|
53
|
+
class: { type: null, required: false },
|
|
54
|
+
fileName: { type: String, required: false, default: "" },
|
|
55
|
+
fileSize: { type: [Number, String], required: false, default: "" },
|
|
56
|
+
layout: { type: String, required: false, default: "horizontal" }
|
|
57
|
+
});
|
|
58
|
+
const isVertical = computed(() => props.layout === "vertical");
|
|
59
|
+
const displaySize = computed(() => {
|
|
60
|
+
const size = props.fileSize;
|
|
61
|
+
if (!size) return "";
|
|
62
|
+
if (typeof size === "string") return `\u0E02\u0E19\u0E32\u0E14 ${size}`;
|
|
63
|
+
if (size < 1024) return `\u0E02\u0E19\u0E32\u0E14 ${size}B`;
|
|
64
|
+
if (size < 1024 * 1024) return `\u0E02\u0E19\u0E32\u0E14 ${Math.round(size / 1024)}KB`;
|
|
65
|
+
return `\u0E02\u0E19\u0E32\u0E14 ${(size / (1024 * 1024)).toFixed(1)}MB`;
|
|
66
|
+
});
|
|
67
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
export interface CardFileProps {
|
|
3
|
+
class?: HTMLAttributes["class"];
|
|
4
|
+
fileName?: string;
|
|
5
|
+
/** bytes (number) หรือข้อความสำเร็จรูป เช่น "57KB" — แสดงเฉพาะ layout horizontal */
|
|
6
|
+
fileSize?: number | string;
|
|
7
|
+
layout?: "horizontal" | "vertical";
|
|
8
|
+
}
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<CardFileProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardFileProps> & Readonly<{}>, {
|
|
10
|
+
fileName: string;
|
|
11
|
+
fileSize: number | string;
|
|
12
|
+
layout: "horizontal" | "vertical";
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: import("vue").DefineComponent<CardProfileAboutProps,
|
|
|
7
7
|
onChat?: (() => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
type: "article" | "media" | "sale-info";
|
|
10
|
-
preview: boolean;
|
|
11
10
|
disabledPadding: boolean;
|
|
11
|
+
preview: boolean;
|
|
12
12
|
optionMenuButtonType: "solid" | "text";
|
|
13
13
|
actionsHidden: boolean;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: import("vue").DefineComponent<CardProfileAboutProps,
|
|
|
7
7
|
onChat?: (() => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
type: "article" | "media" | "sale-info";
|
|
10
|
-
preview: boolean;
|
|
11
10
|
disabledPadding: boolean;
|
|
11
|
+
preview: boolean;
|
|
12
12
|
optionMenuButtonType: "solid" | "text";
|
|
13
13
|
actionsHidden: boolean;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -26,13 +26,13 @@ declare const __VLS_export: import("vue").DefineComponent<ChatConversationItemPr
|
|
|
26
26
|
name: string;
|
|
27
27
|
avatar: string | null;
|
|
28
28
|
muted: boolean;
|
|
29
|
+
disabledMenu: boolean;
|
|
29
30
|
preview: string;
|
|
30
31
|
to: string;
|
|
31
32
|
active: boolean;
|
|
32
33
|
typing: boolean;
|
|
33
34
|
unreadCount: number;
|
|
34
35
|
pinned: boolean;
|
|
35
|
-
disabledMenu: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|
|
38
38
|
export default _default;
|
|
@@ -25,23 +25,14 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
<div
|
|
27
27
|
v-if="muted || unreadCount > 0"
|
|
28
|
-
:class="['shrink-0', menuVisibleClass && 'group-hover:invisible group-focus-within:invisible', isMenuOpen && 'invisible']"
|
|
28
|
+
:class="['flex shrink-0', menuVisibleClass && 'group-hover:invisible group-focus-within:invisible', isMenuOpen && 'invisible']"
|
|
29
29
|
>
|
|
30
30
|
<Icon
|
|
31
31
|
v-if="muted"
|
|
32
32
|
name="lucide:bell-off"
|
|
33
33
|
class="size-[18px] text-gray"
|
|
34
34
|
/>
|
|
35
|
-
<
|
|
36
|
-
v-else-if="unreadCount > 1"
|
|
37
|
-
class="flex items-center justify-center h-[18px] min-w-[18px] px-[4px] rounded-full bg-primary text-white text-[10px]"
|
|
38
|
-
>
|
|
39
|
-
{{ unreadCount > 99 ? "99+" : unreadCount }}
|
|
40
|
-
</div>
|
|
41
|
-
<div
|
|
42
|
-
v-else-if="unreadCount === 1"
|
|
43
|
-
class="bg-primary rounded-full w-[10px] h-[10px]"
|
|
44
|
-
/>
|
|
35
|
+
<BadgeCount v-else :count="unreadCount" color="primary" />
|
|
45
36
|
</div>
|
|
46
37
|
</component>
|
|
47
38
|
<div
|
|
@@ -26,13 +26,13 @@ declare const __VLS_export: import("vue").DefineComponent<ChatConversationItemPr
|
|
|
26
26
|
name: string;
|
|
27
27
|
avatar: string | null;
|
|
28
28
|
muted: boolean;
|
|
29
|
+
disabledMenu: boolean;
|
|
29
30
|
preview: string;
|
|
30
31
|
to: string;
|
|
31
32
|
active: boolean;
|
|
32
33
|
typing: boolean;
|
|
33
34
|
unreadCount: number;
|
|
34
35
|
pinned: boolean;
|
|
35
|
-
disabledMenu: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
37
|
declare const _default: typeof __VLS_export;
|
|
38
38
|
export default _default;
|
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
avatar: string | null;
|
|
5
|
-
}
|
|
6
|
-
export interface NotificationRef {
|
|
7
|
-
type: string;
|
|
8
|
-
id: string;
|
|
9
|
-
}
|
|
10
|
-
export interface NotificationItem {
|
|
11
|
-
id: string;
|
|
12
|
-
category: string;
|
|
13
|
-
action: string;
|
|
14
|
-
message: string;
|
|
15
|
-
ref?: NotificationRef;
|
|
16
|
-
is_read: boolean;
|
|
17
|
-
actor?: NotificationActor;
|
|
18
|
-
grouped_count?: number;
|
|
19
|
-
created_at: string;
|
|
20
|
-
}
|
|
1
|
+
import type { NotificationItem } from "../../types/notification.js";
|
|
21
2
|
declare const modelValue: import("vue").ModelRef<boolean | undefined, string, boolean | undefined, boolean | undefined>;
|
|
22
3
|
type __VLS_ModelProps = {
|
|
23
4
|
modelValue?: typeof modelValue['value'];
|