pukaad-ui-lib 1.331.0 → 1.333.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/button.vue +10 -10
- package/dist/runtime/components/carousel.vue +31 -31
- package/dist/runtime/components/chart/chart-approval-activity.d.vue.ts +35 -0
- package/dist/runtime/components/chart/chart-approval-activity.vue +152 -0
- package/dist/runtime/components/chart/chart-approval-activity.vue.d.ts +35 -0
- package/dist/runtime/components/display/display-image-place.vue +98 -98
- package/dist/runtime/components/drawer/drawer-suggest-place/drawer-suggest-place.vue +1 -0
- package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-form.d.vue.ts +1 -0
- package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-form.vue +3 -2
- package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-form.vue.d.ts +1 -0
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +2 -2
- 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-combobox.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-combobox.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-rating.vue +6 -6
- package/dist/runtime/components/input/input-suggest.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-suggest.vue.d.ts +2 -2
- 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-textarea.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-media-view.vue +136 -136
- package/dist/runtime/components/ui/alert-dialog/AlertDialog.vue +2 -1
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +1 -1
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +1 -1
- package/dist/runtime/components/ui/chart/ChartContainer.d.vue.ts +25 -0
- package/dist/runtime/components/ui/chart/ChartContainer.vue +49 -0
- package/dist/runtime/components/ui/chart/ChartContainer.vue.d.ts +25 -0
- package/dist/runtime/components/ui/chart/ChartLegendContent.d.vue.ts +12 -0
- package/dist/runtime/components/ui/chart/ChartLegendContent.vue +52 -0
- package/dist/runtime/components/ui/chart/ChartLegendContent.vue.d.ts +12 -0
- package/dist/runtime/components/ui/chart/ChartStyle.d.vue.ts +7 -0
- package/dist/runtime/components/ui/chart/ChartStyle.vue +32 -0
- package/dist/runtime/components/ui/chart/ChartStyle.vue.d.ts +7 -0
- package/dist/runtime/components/ui/chart/ChartTooltipContent.d.vue.ts +32 -0
- package/dist/runtime/components/ui/chart/ChartTooltipContent.vue +93 -0
- package/dist/runtime/components/ui/chart/ChartTooltipContent.vue.d.ts +32 -0
- package/dist/runtime/components/ui/chart/index.d.ts +27 -0
- package/dist/runtime/components/ui/chart/index.js +8 -0
- package/dist/runtime/components/ui/chart/utils.d.ts +11 -0
- package/dist/runtime/components/ui/chart/utils.js +24 -0
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +4 -2
- package/dist/runtime/components/ui/command/CommandDialog.vue +1 -0
- package/dist/runtime/components/ui/dialog/Dialog.vue +2 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue +1 -0
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +2 -2
- package/dist/runtime/components/ui/popover/PopoverContent.vue +2 -0
- package/dist/runtime/components/ui/select/Select.vue +1 -0
- package/dist/runtime/components/ui/select/SelectContent.vue +2 -0
- package/dist/runtime/components/ui/separator/Separator.d.vue.ts +1 -1
- package/dist/runtime/components/ui/separator/Separator.vue.d.ts +1 -1
- package/dist/runtime/components/ui/sheet/Sheet.vue +2 -1
- package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +2 -2
- package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +2 -2
- package/dist/runtime/components/ui/tooltip/TooltipProvider.vue +2 -1
- package/package.json +5 -3
- /package/dist/runtime/assets/svg/socials/{WhatsApp.svg → Whatsapp.svg} +0 -0
|
@@ -55,9 +55,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
55
55
|
}>, {
|
|
56
56
|
pageSize: number;
|
|
57
57
|
name: string;
|
|
58
|
+
labelKey: string;
|
|
58
59
|
limit: number;
|
|
59
60
|
valueKey: string;
|
|
60
|
-
labelKey: string;
|
|
61
61
|
multiple: boolean;
|
|
62
62
|
placeholderSearch: string;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -55,9 +55,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
55
55
|
}>, {
|
|
56
56
|
pageSize: number;
|
|
57
57
|
name: string;
|
|
58
|
+
labelKey: string;
|
|
58
59
|
limit: number;
|
|
59
60
|
valueKey: string;
|
|
60
|
-
labelKey: string;
|
|
61
61
|
multiple: boolean;
|
|
62
62
|
placeholderSearch: string;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -44,9 +44,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
44
44
|
id: string;
|
|
45
45
|
name: string;
|
|
46
46
|
required: boolean;
|
|
47
|
+
locale: string;
|
|
47
48
|
placeholder: string;
|
|
48
49
|
disabledErrorMessage: boolean;
|
|
49
|
-
locale: string;
|
|
50
50
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
51
51
|
dateFormat: string;
|
|
52
52
|
showTime: boolean;
|
|
@@ -44,9 +44,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
44
44
|
id: string;
|
|
45
45
|
name: string;
|
|
46
46
|
required: boolean;
|
|
47
|
+
locale: string;
|
|
47
48
|
placeholder: string;
|
|
48
49
|
disabledErrorMessage: boolean;
|
|
49
|
-
locale: string;
|
|
50
50
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
51
51
|
dateFormat: string;
|
|
52
52
|
showTime: boolean;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
14
|
options: InputSelectItem[];
|
|
15
|
-
limit: number;
|
|
16
15
|
placeholder: string;
|
|
16
|
+
limit: number;
|
|
17
17
|
showCounter: boolean;
|
|
18
18
|
addLabel: string;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
14
|
options: InputSelectItem[];
|
|
15
|
-
limit: number;
|
|
16
15
|
placeholder: string;
|
|
16
|
+
limit: number;
|
|
17
17
|
showCounter: boolean;
|
|
18
18
|
addLabel: string;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- v-html เพื่อหลีกเลี่ยง Vue patch SVG attributes เป็น DOM property (read-only getter bug) -->
|
|
3
|
-
<div
|
|
4
|
-
class="inline-flex items-center gap-0"
|
|
5
|
-
v-html="starsHtml"
|
|
6
|
-
@click="handleClick"
|
|
7
|
-
/>
|
|
2
|
+
<!-- v-html เพื่อหลีกเลี่ยง Vue patch SVG attributes เป็น DOM property (read-only getter bug) -->
|
|
3
|
+
<div
|
|
4
|
+
class="inline-flex items-center gap-0"
|
|
5
|
+
v-html="starsHtml"
|
|
6
|
+
@click="handleClick"
|
|
7
|
+
/>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script setup>
|
|
@@ -20,12 +20,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
22
|
description: string;
|
|
23
|
-
|
|
23
|
+
labelKey: string;
|
|
24
24
|
placeholder: string;
|
|
25
|
+
limit: number;
|
|
25
26
|
disabledErrorMessage: boolean;
|
|
26
27
|
disabledBorder: boolean;
|
|
27
28
|
showCounter: boolean;
|
|
28
|
-
labelKey: string;
|
|
29
29
|
descriptionKey: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -20,12 +20,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
22
|
description: string;
|
|
23
|
-
|
|
23
|
+
labelKey: string;
|
|
24
24
|
placeholder: string;
|
|
25
|
+
limit: number;
|
|
25
26
|
disabledErrorMessage: boolean;
|
|
26
27
|
disabledBorder: boolean;
|
|
27
28
|
showCounter: boolean;
|
|
28
|
-
labelKey: string;
|
|
29
29
|
descriptionKey: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
28
|
state: "user" | "admin";
|
|
29
|
-
limit: number;
|
|
30
29
|
placeholder: string;
|
|
30
|
+
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
28
|
state: "user" | "admin";
|
|
29
|
-
limit: number;
|
|
30
29
|
placeholder: string;
|
|
30
|
+
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -46,12 +46,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
46
46
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
|
+
rows: number;
|
|
49
50
|
limit: number;
|
|
50
51
|
disabledErrorMessage: boolean;
|
|
51
52
|
disabledBorder: boolean;
|
|
52
53
|
showCounter: boolean;
|
|
53
54
|
readonly: boolean;
|
|
54
|
-
rows: number;
|
|
55
55
|
heightScroll: boolean;
|
|
56
56
|
spaceToComma: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -46,12 +46,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
46
46
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
47
47
|
fullHeight: boolean;
|
|
48
48
|
fullWidth: boolean;
|
|
49
|
+
rows: number;
|
|
49
50
|
limit: number;
|
|
50
51
|
disabledErrorMessage: boolean;
|
|
51
52
|
disabledBorder: boolean;
|
|
52
53
|
showCounter: boolean;
|
|
53
54
|
readonly: boolean;
|
|
54
|
-
rows: number;
|
|
55
55
|
heightScroll: boolean;
|
|
56
56
|
spaceToComma: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,140 +1,140 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Modal v-model="isOpen" class="sm:max-w-[1280px]" disable-padding>
|
|
3
|
-
<template #header>
|
|
4
|
-
<ShadDialogTitle class="p-4">{{ props.title }}</ShadDialogTitle>
|
|
5
|
-
</template>
|
|
6
|
-
<div class="relative h-[824px] bg-black overflow-hidden">
|
|
7
|
-
<Carousel
|
|
8
|
-
:items="props.items"
|
|
9
|
-
:select-index="props.startIndex"
|
|
10
|
-
class="h-full"
|
|
11
|
-
@update:current-index="currentIndex = $event"
|
|
12
|
-
/>
|
|
13
|
-
|
|
14
|
-
<!-- description overlay (แสดงเฉพาะเมื่อ item ปัจจุบันมี description และไม่มี review) -->
|
|
15
|
-
<div
|
|
16
|
-
v-if="!props.review && currentItem?.description"
|
|
17
|
-
class="absolute bottom-0 w-full z-10"
|
|
18
|
-
style="background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);"
|
|
19
|
-
>
|
|
20
|
-
<div class="p-[16px] flex flex-col gap-[4px] text-white font-body-large">
|
|
21
|
-
<div class="font-body-large-prominent">ผู้ดูแลระบบ</div>
|
|
22
|
-
<div>{{ currentItem.description }}</div>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<!-- Review info overlay (แสดงเมื่อมีข้อมูล review) -->
|
|
27
|
-
<div
|
|
28
|
-
v-if="props.review"
|
|
29
|
-
class="absolute bottom-0 w-full z-10"
|
|
30
|
-
style="background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);"
|
|
31
|
-
>
|
|
32
|
-
<div class="flex flex-col w-full">
|
|
33
|
-
<div
|
|
34
|
-
v-if="!showMoreDescription"
|
|
35
|
-
class="flex gap-[16px] p-[16px] w-full text-white"
|
|
36
|
-
>
|
|
37
|
-
<Avatar
|
|
38
|
-
:src="props.review.user?.avatar"
|
|
39
|
-
:alt="props.review.user?.name"
|
|
40
|
-
:size="36"
|
|
41
|
-
class="shrink-0"
|
|
42
|
-
/>
|
|
43
|
-
<div class="flex flex-col gap-[8px] w-full">
|
|
44
|
-
<div class="flex flex-col gap-[8px]">
|
|
45
|
-
<div class="flex justify-between w-full">
|
|
46
|
-
<span class="font-body-large">
|
|
47
|
-
{{ props.review.user?.name }}
|
|
48
|
-
</span>
|
|
49
|
-
<Icon name="lucide:flag" />
|
|
50
|
-
</div>
|
|
51
|
-
<div class="flex flex-col">
|
|
52
|
-
<span class="font-body-small">
|
|
53
|
-
{{ convertNumber(props.review.user?.review_count ?? 0) }}
|
|
54
|
-
รีวิว •
|
|
55
|
-
{{ convertNumber(props.review.user?.like_count ?? 0) }}
|
|
56
|
-
ชื่นชอบรีวิว
|
|
57
|
-
</span>
|
|
58
|
-
<div
|
|
59
|
-
v-if="props.review.review"
|
|
60
|
-
class="flex items-center gap-[8px]"
|
|
61
|
-
>
|
|
62
|
-
<InputRating
|
|
63
|
-
:size="14"
|
|
64
|
-
readonly
|
|
65
|
-
:model-value="props.review.review.rating"
|
|
66
|
-
/>
|
|
67
|
-
<span class="font-body-small opacity-75">
|
|
68
|
-
{{ convertDateTorelativeText(props.review.review.created_at ?? "") }}
|
|
69
|
-
</span>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<p
|
|
74
|
-
v-if="props.review.review?.description"
|
|
75
|
-
class="font-body-large line-clamp-1 cursor-pointer"
|
|
76
|
-
@click="showMoreDescription = true"
|
|
77
|
-
>
|
|
78
|
-
{{ props.review.review.description }}
|
|
79
|
-
</p>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
<div
|
|
83
|
-
v-if="showMoreDescription"
|
|
84
|
-
class="flex gap-[16px] bg-white rounded-t-[16px] w-full p-[16px] max-h-[322px]"
|
|
85
|
-
>
|
|
86
|
-
<Avatar
|
|
87
|
-
:src="props.review.user?.avatar"
|
|
88
|
-
:alt="props.review.user?.name"
|
|
89
|
-
:size="36"
|
|
90
|
-
class="shrink-0"
|
|
91
|
-
/>
|
|
92
|
-
<div class="flex flex-col gap-[8px] w-full">
|
|
93
|
-
<div class="flex flex-col gap-[8px]">
|
|
94
|
-
<div class="flex justify-between w-full">
|
|
95
|
-
<span class="font-body-large">
|
|
96
|
-
{{ props.review.user?.name }}
|
|
97
|
-
</span>
|
|
98
|
-
<Icon
|
|
99
|
-
name="lucide:x"
|
|
100
|
-
class="cursor-pointer"
|
|
101
|
-
@click="showMoreDescription = false"
|
|
102
|
-
/>
|
|
103
|
-
</div>
|
|
104
|
-
<div class="flex flex-col">
|
|
105
|
-
<span class="font-body-small">
|
|
106
|
-
{{ convertNumber(props.review.user?.review_count ?? 0) }}
|
|
107
|
-
รีวิว •
|
|
108
|
-
{{ convertNumber(props.review.user?.like_count ?? 0) }}
|
|
109
|
-
ชื่นชอบรีวิว
|
|
110
|
-
</span>
|
|
111
|
-
<div
|
|
112
|
-
v-if="props.review.review"
|
|
113
|
-
class="flex items-center gap-[8px]"
|
|
114
|
-
>
|
|
115
|
-
<InputRating
|
|
116
|
-
:size="14"
|
|
117
|
-
readonly
|
|
118
|
-
:model-value="props.review.review.rating"
|
|
119
|
-
/>
|
|
120
|
-
<span class="font-body-small opacity-75">
|
|
121
|
-
{{ convertDateTorelativeText(props.review.review.created_at ?? "") }}
|
|
122
|
-
</span>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
<p
|
|
127
|
-
v-if="props.review.review?.description"
|
|
128
|
-
class="font-body-large max-h-[280px] overflow-y-auto"
|
|
129
|
-
>
|
|
130
|
-
{{ props.review.review.description }}
|
|
131
|
-
</p>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
</Modal>
|
|
2
|
+
<Modal v-model="isOpen" class="sm:max-w-[1280px]" disable-padding>
|
|
3
|
+
<template #header>
|
|
4
|
+
<ShadDialogTitle class="p-4">{{ props.title }}</ShadDialogTitle>
|
|
5
|
+
</template>
|
|
6
|
+
<div class="relative h-[824px] bg-black overflow-hidden">
|
|
7
|
+
<Carousel
|
|
8
|
+
:items="props.items"
|
|
9
|
+
:select-index="props.startIndex"
|
|
10
|
+
class="h-full"
|
|
11
|
+
@update:current-index="currentIndex = $event"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<!-- description overlay (แสดงเฉพาะเมื่อ item ปัจจุบันมี description และไม่มี review) -->
|
|
15
|
+
<div
|
|
16
|
+
v-if="!props.review && currentItem?.description"
|
|
17
|
+
class="absolute bottom-0 w-full z-10"
|
|
18
|
+
style="background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);"
|
|
19
|
+
>
|
|
20
|
+
<div class="p-[16px] flex flex-col gap-[4px] text-white font-body-large">
|
|
21
|
+
<div class="font-body-large-prominent">ผู้ดูแลระบบ</div>
|
|
22
|
+
<div>{{ currentItem.description }}</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<!-- Review info overlay (แสดงเมื่อมีข้อมูล review) -->
|
|
27
|
+
<div
|
|
28
|
+
v-if="props.review"
|
|
29
|
+
class="absolute bottom-0 w-full z-10"
|
|
30
|
+
style="background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);"
|
|
31
|
+
>
|
|
32
|
+
<div class="flex flex-col w-full">
|
|
33
|
+
<div
|
|
34
|
+
v-if="!showMoreDescription"
|
|
35
|
+
class="flex gap-[16px] p-[16px] w-full text-white"
|
|
36
|
+
>
|
|
37
|
+
<Avatar
|
|
38
|
+
:src="props.review.user?.avatar"
|
|
39
|
+
:alt="props.review.user?.name"
|
|
40
|
+
:size="36"
|
|
41
|
+
class="shrink-0"
|
|
42
|
+
/>
|
|
43
|
+
<div class="flex flex-col gap-[8px] w-full">
|
|
44
|
+
<div class="flex flex-col gap-[8px]">
|
|
45
|
+
<div class="flex justify-between w-full">
|
|
46
|
+
<span class="font-body-large">
|
|
47
|
+
{{ props.review.user?.name }}
|
|
48
|
+
</span>
|
|
49
|
+
<Icon name="lucide:flag" />
|
|
50
|
+
</div>
|
|
51
|
+
<div class="flex flex-col">
|
|
52
|
+
<span class="font-body-small">
|
|
53
|
+
{{ convertNumber(props.review.user?.review_count ?? 0) }}
|
|
54
|
+
รีวิว •
|
|
55
|
+
{{ convertNumber(props.review.user?.like_count ?? 0) }}
|
|
56
|
+
ชื่นชอบรีวิว
|
|
57
|
+
</span>
|
|
58
|
+
<div
|
|
59
|
+
v-if="props.review.review"
|
|
60
|
+
class="flex items-center gap-[8px]"
|
|
61
|
+
>
|
|
62
|
+
<InputRating
|
|
63
|
+
:size="14"
|
|
64
|
+
readonly
|
|
65
|
+
:model-value="props.review.review.rating"
|
|
66
|
+
/>
|
|
67
|
+
<span class="font-body-small opacity-75">
|
|
68
|
+
{{ convertDateTorelativeText(props.review.review.created_at ?? "") }}
|
|
69
|
+
</span>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<p
|
|
74
|
+
v-if="props.review.review?.description"
|
|
75
|
+
class="font-body-large line-clamp-1 cursor-pointer"
|
|
76
|
+
@click="showMoreDescription = true"
|
|
77
|
+
>
|
|
78
|
+
{{ props.review.review.description }}
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div
|
|
83
|
+
v-if="showMoreDescription"
|
|
84
|
+
class="flex gap-[16px] bg-white rounded-t-[16px] w-full p-[16px] max-h-[322px]"
|
|
85
|
+
>
|
|
86
|
+
<Avatar
|
|
87
|
+
:src="props.review.user?.avatar"
|
|
88
|
+
:alt="props.review.user?.name"
|
|
89
|
+
:size="36"
|
|
90
|
+
class="shrink-0"
|
|
91
|
+
/>
|
|
92
|
+
<div class="flex flex-col gap-[8px] w-full">
|
|
93
|
+
<div class="flex flex-col gap-[8px]">
|
|
94
|
+
<div class="flex justify-between w-full">
|
|
95
|
+
<span class="font-body-large">
|
|
96
|
+
{{ props.review.user?.name }}
|
|
97
|
+
</span>
|
|
98
|
+
<Icon
|
|
99
|
+
name="lucide:x"
|
|
100
|
+
class="cursor-pointer"
|
|
101
|
+
@click="showMoreDescription = false"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="flex flex-col">
|
|
105
|
+
<span class="font-body-small">
|
|
106
|
+
{{ convertNumber(props.review.user?.review_count ?? 0) }}
|
|
107
|
+
รีวิว •
|
|
108
|
+
{{ convertNumber(props.review.user?.like_count ?? 0) }}
|
|
109
|
+
ชื่นชอบรีวิว
|
|
110
|
+
</span>
|
|
111
|
+
<div
|
|
112
|
+
v-if="props.review.review"
|
|
113
|
+
class="flex items-center gap-[8px]"
|
|
114
|
+
>
|
|
115
|
+
<InputRating
|
|
116
|
+
:size="14"
|
|
117
|
+
readonly
|
|
118
|
+
:model-value="props.review.review.rating"
|
|
119
|
+
/>
|
|
120
|
+
<span class="font-body-small opacity-75">
|
|
121
|
+
{{ convertDateTorelativeText(props.review.review.created_at ?? "") }}
|
|
122
|
+
</span>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<p
|
|
127
|
+
v-if="props.review.review?.description"
|
|
128
|
+
class="font-body-large max-h-[280px] overflow-y-auto"
|
|
129
|
+
>
|
|
130
|
+
{{ props.review.review.description }}
|
|
131
|
+
</p>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</Modal>
|
|
138
138
|
</template>
|
|
139
139
|
|
|
140
140
|
<script setup>
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { AlertDialogRoot, useForwardPropsEmits } from "reka-ui";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
open: { type: Boolean, required: false },
|
|
5
|
-
defaultOpen: { type: Boolean, required: false }
|
|
5
|
+
defaultOpen: { type: Boolean, required: false },
|
|
6
|
+
unmountOnHide: { type: Boolean, required: false }
|
|
6
7
|
});
|
|
7
8
|
const emits = defineEmits(["update:open"]);
|
|
8
9
|
const forwarded = useForwardPropsEmits(props, emits);
|
|
@@ -30,7 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
30
30
|
"onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
31
31
|
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
|
-
modelValue: DateValue | DateValue[];
|
|
33
|
+
modelValue: DateValue | DateValue[] | null;
|
|
34
34
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
35
35
|
reverseYears: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -30,7 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
30
30
|
"onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
31
31
|
"onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
|
|
32
32
|
}>, {
|
|
33
|
-
modelValue: DateValue | DateValue[];
|
|
33
|
+
modelValue: DateValue | DateValue[] | null;
|
|
34
34
|
layout: "month-and-year" | "month-only" | "year-only";
|
|
35
35
|
reverseYears: boolean;
|
|
36
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
import type { ChartConfig } from ".";
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
6
|
+
id?: HTMLAttributes["id"];
|
|
7
|
+
class?: HTMLAttributes["class"];
|
|
8
|
+
config: ChartConfig;
|
|
9
|
+
cursor?: boolean;
|
|
10
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
11
|
+
id?: HTMLAttributes["id"];
|
|
12
|
+
class?: HTMLAttributes["class"];
|
|
13
|
+
config: ChartConfig;
|
|
14
|
+
cursor?: boolean;
|
|
15
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
16
|
+
default: {
|
|
17
|
+
id: string;
|
|
18
|
+
config: ChartConfig;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { useId } from "reka-ui";
|
|
3
|
+
import { computed, toRefs } from "vue";
|
|
4
|
+
import { cn } from "#pukaad-ui/runtime/plugins/shadcn";
|
|
5
|
+
import { provideChartContext } from ".";
|
|
6
|
+
import ChartStyle from "./ChartStyle.vue";
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
id: { type: null, required: false },
|
|
12
|
+
class: { type: null, required: false },
|
|
13
|
+
config: { type: null, required: true },
|
|
14
|
+
cursor: { type: Boolean, required: false }
|
|
15
|
+
});
|
|
16
|
+
defineSlots();
|
|
17
|
+
const { config } = toRefs(props);
|
|
18
|
+
const uniqueId = useId();
|
|
19
|
+
const chartId = computed(() => `chart-${props.id || uniqueId.replace(/:/g, "")}`);
|
|
20
|
+
provideChartContext({
|
|
21
|
+
id: uniqueId,
|
|
22
|
+
config
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div
|
|
28
|
+
data-slot="chart"
|
|
29
|
+
:data-chart="chartId"
|
|
30
|
+
:class="cn(
|
|
31
|
+
`[&_.tick_text]:!fill-muted-foreground [&_.tick_line]:!stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex flex-col aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden [&_[data-vis-xy-container]]:h-full [&_[data-vis-single-container]]:h-full h-full [&_[data-vis-xy-container]]:w-full [&_[data-vis-single-container]]:w-full w-full `,
|
|
32
|
+
props.class
|
|
33
|
+
)"
|
|
34
|
+
:style="{
|
|
35
|
+
'--vis-tooltip-padding': '0px',
|
|
36
|
+
'--vis-tooltip-background-color': 'transparent',
|
|
37
|
+
'--vis-tooltip-border-color': 'transparent',
|
|
38
|
+
'--vis-tooltip-text-color': 'none',
|
|
39
|
+
'--vis-tooltip-shadow-color': 'none',
|
|
40
|
+
'--vis-tooltip-backdrop-filter': 'none',
|
|
41
|
+
'--vis-crosshair-circle-stroke-color': '#0000',
|
|
42
|
+
'--vis-crosshair-line-stroke-width': cursor ? '1px' : '0px',
|
|
43
|
+
'--vis-font-family': 'var(--font-sans)'
|
|
44
|
+
}"
|
|
45
|
+
>
|
|
46
|
+
<slot :id="uniqueId" :config="config" />
|
|
47
|
+
<ChartStyle :id="chartId" />
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
import type { ChartConfig } from ".";
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
6
|
+
id?: HTMLAttributes["id"];
|
|
7
|
+
class?: HTMLAttributes["class"];
|
|
8
|
+
config: ChartConfig;
|
|
9
|
+
cursor?: boolean;
|
|
10
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
11
|
+
id?: HTMLAttributes["id"];
|
|
12
|
+
class?: HTMLAttributes["class"];
|
|
13
|
+
config: ChartConfig;
|
|
14
|
+
cursor?: boolean;
|
|
15
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
16
|
+
default: {
|
|
17
|
+
id: string;
|
|
18
|
+
config: ChartConfig;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
hideIcon?: boolean;
|
|
4
|
+
nameKey?: string;
|
|
5
|
+
verticalAlign?: "bottom" | "top";
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
verticalAlign: "bottom" | "top";
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
|
+
import { cn } from "#pukaad-ui/runtime/plugins/shadcn";
|
|
4
|
+
import { useChart } from ".";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
hideIcon: { type: Boolean, required: false },
|
|
7
|
+
nameKey: { type: String, required: false },
|
|
8
|
+
verticalAlign: { type: String, required: false, default: "bottom" },
|
|
9
|
+
class: { type: null, required: false }
|
|
10
|
+
});
|
|
11
|
+
const { id, config } = useChart();
|
|
12
|
+
const payload = computed(() => Object.entries(config.value).map(([key, value]) => {
|
|
13
|
+
return {
|
|
14
|
+
key: props.nameKey || key,
|
|
15
|
+
itemConfig: value
|
|
16
|
+
};
|
|
17
|
+
}));
|
|
18
|
+
const containerSelector = ref("");
|
|
19
|
+
onMounted(() => {
|
|
20
|
+
containerSelector.value = `[data-chart="chart-${id}"]>[data-vis-xy-container]`;
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div
|
|
26
|
+
v-if="containerSelector"
|
|
27
|
+
:class="cn(
|
|
28
|
+
'flex items-center justify-center gap-4',
|
|
29
|
+
verticalAlign === 'top' ? 'pb-3' : 'pt-3',
|
|
30
|
+
props.class
|
|
31
|
+
)"
|
|
32
|
+
>
|
|
33
|
+
<div
|
|
34
|
+
v-for="{ key, itemConfig } in payload"
|
|
35
|
+
:key="key"
|
|
36
|
+
:class="cn(
|
|
37
|
+
'[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3'
|
|
38
|
+
)"
|
|
39
|
+
>
|
|
40
|
+
<component :is="itemConfig.icon" v-if="itemConfig.icon" />
|
|
41
|
+
<div
|
|
42
|
+
v-else
|
|
43
|
+
class="h-2 w-2 shrink-0 rounded-xs"
|
|
44
|
+
:style="{
|
|
45
|
+
backgroundColor: itemConfig?.color
|
|
46
|
+
}"
|
|
47
|
+
/>
|
|
48
|
+
|
|
49
|
+
{{ itemConfig.label }}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|