pukaad-ui-lib 1.68.0 → 1.70.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/json/social-icon.json +3 -3
- package/dist/runtime/components/card/card-profile-about.d.vue.ts +27 -1
- package/dist/runtime/components/card/card-profile-about.vue +80 -24
- package/dist/runtime/components/card/card-profile-about.vue.d.ts +27 -1
- package/dist/runtime/components/card/card.vue +1 -0
- package/dist/runtime/components/dialog/dialog-phone-OTP.d.vue.ts +1 -1
- package/dist/runtime/components/dialog/dialog-phone-OTP.vue.d.ts +1 -1
- package/dist/runtime/components/drawer/drawer-profile-about.d.vue.ts +37 -1
- package/dist/runtime/components/drawer/drawer-profile-about.vue +84 -24
- package/dist/runtime/components/drawer/drawer-profile-about.vue.d.ts +37 -1
- package/dist/runtime/components/drawer/drawer.d.vue.ts +1 -0
- package/dist/runtime/components/drawer/drawer.vue +4 -0
- package/dist/runtime/components/drawer/drawer.vue.d.ts +1 -0
- package/dist/runtime/components/input/input-link.vue +1 -1
- package/dist/runtime/components/modal/modal-phone-OTP.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-phone-OTP.vue.d.ts +1 -1
- package/dist/runtime/components/ui/card/CardHeader.d.vue.ts +4 -1
- package/dist/runtime/components/ui/card/CardHeader.vue +4 -2
- package/dist/runtime/components/ui/card/CardHeader.vue.d.ts +4 -1
- package/dist/runtime/components/ui/sheet/SheetContent.vue +3 -2
- package/dist/runtime/plugins/alert.d.ts +1 -1
- package/dist/runtime/plugins/alert.js +1 -1
- package/package.json +1 -1
- /package/dist/runtime/assets/svg/socials/{Tiktok.svg → TikTok.svg} +0 -0
package/dist/module.json
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
export interface CardProfileAboutLink {
|
|
2
|
+
name: string;
|
|
3
|
+
link: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Address {
|
|
6
|
+
province_id?: number;
|
|
7
|
+
amphur_id?: number;
|
|
8
|
+
tambon_id?: number;
|
|
9
|
+
zipcode?: number;
|
|
10
|
+
detail_address?: string;
|
|
11
|
+
full_address?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CardProfileAboutItem {
|
|
14
|
+
description: string;
|
|
15
|
+
category: number;
|
|
16
|
+
address: Address;
|
|
17
|
+
phone: string;
|
|
18
|
+
links: CardProfileAboutLink[];
|
|
19
|
+
}
|
|
20
|
+
type __VLS_Props = {
|
|
21
|
+
edit?: boolean;
|
|
22
|
+
item?: CardProfileAboutItem;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
25
|
+
item: CardProfileAboutItem;
|
|
26
|
+
edit: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
28
|
declare const _default: typeof __VLS_export;
|
|
3
29
|
export default _default;
|
|
@@ -1,35 +1,62 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
<template #header>
|
|
2
|
+
<Card title="ข้อมูลทั่วไป" class="flex-col flex gap-[16px]">
|
|
3
|
+
<template v-if="props.edit && !isEmpty" #header>
|
|
4
4
|
<div class="flex justify-between items-center">
|
|
5
|
-
<div class="font-title-medium-prominent"
|
|
6
|
-
<Button
|
|
7
|
-
|
|
8
|
-
variant="text"
|
|
9
|
-
color="primary"
|
|
10
|
-
prependIcon="lucide:square-pen"
|
|
11
|
-
:iconSize="20"
|
|
12
|
-
@click="isShowEdit = true"
|
|
13
|
-
>
|
|
5
|
+
<div class="font-title-medium-prominent">ข้อมูลทั่วไป</div>
|
|
6
|
+
<Button variant="text" color="primary" @click="isShowEdit = true">
|
|
7
|
+
<Icon name="lucide:square-pen" :size="20" class="text-primary" />
|
|
14
8
|
แก้ไข
|
|
15
9
|
</Button>
|
|
16
10
|
</div>
|
|
17
11
|
</template>
|
|
18
|
-
<div
|
|
19
|
-
|
|
12
|
+
<div
|
|
13
|
+
v-if="props.edit && isEmpty"
|
|
14
|
+
class="flex flex-col gap-[8px] font-body-large"
|
|
15
|
+
>
|
|
16
|
+
<Button class="w-full" @click="isShowEdit = true">
|
|
17
|
+
<Icon name="lucide:plus" :size="20" />
|
|
18
|
+
เพิ่มข้อมูลทั่วไป
|
|
19
|
+
</Button>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-else class="flex flex-col gap-[8px] font-body-large">
|
|
22
|
+
<div class="flex gap-[8px]">
|
|
20
23
|
<div class="pt-[3px]">
|
|
21
|
-
<Icon
|
|
24
|
+
<Icon name="lucide:circle-alert" :size="20" class="text-primary" />
|
|
22
25
|
</div>
|
|
23
|
-
<div :class="item.
|
|
24
|
-
{{ item.
|
|
26
|
+
<div :class="!item.description ? 'text-cloud' : ''">
|
|
27
|
+
{{ item.description || "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22" }}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="flex gap-[8px]">
|
|
31
|
+
<div class="pt-[3px]">
|
|
32
|
+
<Icon name="lucide:book-user" :size="20" class="text-primary" />
|
|
33
|
+
</div>
|
|
34
|
+
<div :class="!item.category ? 'text-cloud' : ''">
|
|
35
|
+
{{ item.category || "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17" }}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="flex gap-[8px]">
|
|
39
|
+
<div class="pt-[3px]">
|
|
40
|
+
<Icon name="lucide:map-pin" :size="20" class="text-primary" />
|
|
41
|
+
</div>
|
|
42
|
+
<div :class="!item.address.full_address ? 'text-cloud' : ''">
|
|
43
|
+
{{ item.address.full_address || "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48" }}
|
|
25
44
|
</div>
|
|
26
45
|
</div>
|
|
27
46
|
|
|
47
|
+
<div class="flex gap-[8px]">
|
|
48
|
+
<div class="pt-[3px]">
|
|
49
|
+
<Icon name="lucide:phone" :size="20" class="text-primary" />
|
|
50
|
+
</div>
|
|
51
|
+
<div :class="!item.phone ? 'text-cloud' : ''">
|
|
52
|
+
{{ item.phone || "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C" }}
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
28
55
|
<div
|
|
29
|
-
v-for="(linkItem, i) in
|
|
56
|
+
v-for="(linkItem, i) in item.links"
|
|
30
57
|
:key="i"
|
|
31
58
|
class="flex gap-[8px]"
|
|
32
|
-
v-if="
|
|
59
|
+
v-if="item.links.length > 0"
|
|
33
60
|
>
|
|
34
61
|
<div class="pt-[3px]">
|
|
35
62
|
<Icon
|
|
@@ -38,19 +65,48 @@
|
|
|
38
65
|
class="text-primary"
|
|
39
66
|
/>
|
|
40
67
|
</div>
|
|
41
|
-
<
|
|
68
|
+
<a
|
|
69
|
+
:href="linkItem.link"
|
|
70
|
+
target="_blank"
|
|
42
71
|
class="cursor-pointer hover:underline"
|
|
43
|
-
@click="onClickLink(linkItem.link)"
|
|
44
72
|
>
|
|
45
73
|
{{ linkItem.link }}
|
|
46
|
-
</
|
|
74
|
+
</a>
|
|
47
75
|
</div>
|
|
48
76
|
</div>
|
|
49
77
|
</Card>
|
|
50
|
-
|
|
51
|
-
|
|
78
|
+
<DrawerProfileAbout
|
|
79
|
+
:item="item"
|
|
80
|
+
v-model="isShowEdit"
|
|
81
|
+
@submit="onUpdateAbout"
|
|
82
|
+
/>
|
|
52
83
|
</template>
|
|
53
84
|
|
|
54
85
|
<script setup>
|
|
55
|
-
|
|
86
|
+
import { ref, computed } from "vue";
|
|
87
|
+
const props = defineProps({
|
|
88
|
+
edit: { type: Boolean, required: false, default: false },
|
|
89
|
+
item: { type: Object, required: false, default: () => ({
|
|
90
|
+
description: "",
|
|
91
|
+
category: 0,
|
|
92
|
+
address: {
|
|
93
|
+
province_id: 0,
|
|
94
|
+
amphur_id: 0,
|
|
95
|
+
tambon_id: 0,
|
|
96
|
+
zipcode: 0,
|
|
97
|
+
detail_address: "",
|
|
98
|
+
full_address: ""
|
|
99
|
+
},
|
|
100
|
+
phone: "",
|
|
101
|
+
links: []
|
|
102
|
+
}) }
|
|
103
|
+
});
|
|
104
|
+
const isShowEdit = ref(false);
|
|
105
|
+
const item = ref({ ...props.item });
|
|
106
|
+
const isEmpty = computed(() => {
|
|
107
|
+
return !item.value.description && !item.value.address?.full_address && !item.value.phone;
|
|
108
|
+
});
|
|
109
|
+
const onUpdateAbout = (val) => {
|
|
110
|
+
item.value = val;
|
|
111
|
+
};
|
|
56
112
|
</script>
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
export interface CardProfileAboutLink {
|
|
2
|
+
name: string;
|
|
3
|
+
link: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Address {
|
|
6
|
+
province_id?: number;
|
|
7
|
+
amphur_id?: number;
|
|
8
|
+
tambon_id?: number;
|
|
9
|
+
zipcode?: number;
|
|
10
|
+
detail_address?: string;
|
|
11
|
+
full_address?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CardProfileAboutItem {
|
|
14
|
+
description: string;
|
|
15
|
+
category: number;
|
|
16
|
+
address: Address;
|
|
17
|
+
phone: string;
|
|
18
|
+
links: CardProfileAboutLink[];
|
|
19
|
+
}
|
|
20
|
+
type __VLS_Props = {
|
|
21
|
+
edit?: boolean;
|
|
22
|
+
item?: CardProfileAboutItem;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
25
|
+
item: CardProfileAboutItem;
|
|
26
|
+
edit: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
28
|
declare const _default: typeof __VLS_export;
|
|
3
29
|
export default _default;
|
|
@@ -14,8 +14,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
14
14
|
onComplete?: ((value: string) => any) | undefined;
|
|
15
15
|
onClose?: (() => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
confirmedText: string;
|
|
18
17
|
phone: string;
|
|
18
|
+
confirmedText: string;
|
|
19
19
|
phoneLabel: string;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -14,8 +14,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
14
14
|
onComplete?: ((value: string) => any) | undefined;
|
|
15
15
|
onClose?: (() => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
confirmedText: string;
|
|
18
17
|
phone: string;
|
|
18
|
+
confirmedText: string;
|
|
19
19
|
phoneLabel: string;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,3 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
export interface InputLinkItem {
|
|
2
|
+
name: string;
|
|
3
|
+
link?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Address {
|
|
6
|
+
province_id?: number;
|
|
7
|
+
amphur_id?: number;
|
|
8
|
+
tambon_id?: number;
|
|
9
|
+
zipcode?: number;
|
|
10
|
+
detail_address?: string;
|
|
11
|
+
full_address?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DrawerProfileAboutItem {
|
|
14
|
+
description: string;
|
|
15
|
+
category: string;
|
|
16
|
+
address: Address;
|
|
17
|
+
phone: string;
|
|
18
|
+
links: InputLinkItem[];
|
|
19
|
+
}
|
|
20
|
+
export interface DrawerProfileAboutProps {
|
|
21
|
+
item?: DrawerProfileAboutItem;
|
|
22
|
+
}
|
|
23
|
+
type __VLS_Props = DrawerProfileAboutProps;
|
|
24
|
+
type __VLS_ModelProps = {
|
|
25
|
+
modelValue?: boolean;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
28
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
"update:modelValue": (value: boolean) => any;
|
|
30
|
+
} & {
|
|
31
|
+
submit: (data: DrawerProfileAboutItem) => any;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
33
|
+
onSubmit?: ((data: DrawerProfileAboutItem) => any) | undefined;
|
|
34
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
item: DrawerProfileAboutItem;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
38
|
declare const _default: typeof __VLS_export;
|
|
3
39
|
export default _default;
|
|
@@ -1,44 +1,104 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
<Drawer
|
|
3
|
+
class="w-[748px]"
|
|
4
4
|
title="เกี่ยวกับ"
|
|
5
5
|
@close="onClose"
|
|
6
|
+
disabled-auto-close
|
|
6
7
|
@submit="onSubmit"
|
|
7
8
|
v-model="isDrawerOpen"
|
|
8
9
|
>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
<div class="flex flex-col gap-[16px]">
|
|
11
|
+
<InputTextarea
|
|
12
|
+
name="description"
|
|
13
|
+
placeholder="เพิ่มคำอธิบายที่จะช่วยให้ค้นพบและติดตามคุณได้ง่ายขึ้น (สูงสุด 220 ตัวอักษร)"
|
|
14
|
+
label="คำอธิบาย"
|
|
15
|
+
show-counter
|
|
16
|
+
:limit="220"
|
|
17
|
+
v-model="form.description"
|
|
18
|
+
class="min-h-[120px]"
|
|
19
|
+
/>
|
|
20
|
+
<InputAddress
|
|
21
|
+
name="address"
|
|
22
|
+
v-model="form.address"
|
|
23
|
+
required
|
|
24
|
+
requiredDetail
|
|
25
|
+
/>
|
|
26
|
+
<div class="flex flex-col gap-[8px]">
|
|
22
27
|
<InputTextField
|
|
23
28
|
name="phone"
|
|
24
29
|
placeholder="กรอกเบอร์โทรศัพท์"
|
|
25
30
|
label="เบอร์โทรศัพท์สำหรับติดต่อ"
|
|
26
|
-
|
|
27
|
-
hint="เบอร์โทรศัพท์นี้จะแสดงในโปรไฟล์ของคุณ และสามารถมองเห็นได้โดยสาธารณะ"
|
|
28
|
-
v-model="formState.phone"
|
|
31
|
+
v-model="form.phone"
|
|
29
32
|
/>
|
|
30
|
-
<
|
|
33
|
+
<div class="font-body-small text-gray">
|
|
34
|
+
เบอร์โทรศัพท์นี้จะแสดงในโปรไฟล์ของคุณ และสามารถมองเห็นได้โดยสาธารณะ
|
|
35
|
+
</div>
|
|
31
36
|
</div>
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
<InputLink name="links" v-model="form.links" />
|
|
38
|
+
</div>
|
|
39
|
+
<template #footer="{ meta }">
|
|
34
40
|
<div class="flex justify-end gap-[16px] items-center">
|
|
35
41
|
<Button type="outline" @click="onClose"> ยกเลิก </Button>
|
|
36
|
-
<Button
|
|
42
|
+
<Button type="submit" color="primary" :disabled="!meta.valid">
|
|
43
|
+
ยืนยัน
|
|
44
|
+
</Button>
|
|
37
45
|
</div>
|
|
38
46
|
</template>
|
|
39
|
-
</Drawer>
|
|
47
|
+
</Drawer>
|
|
40
48
|
</template>
|
|
41
49
|
|
|
42
50
|
<script setup>
|
|
43
|
-
|
|
51
|
+
import { useNuxtApp } from "nuxt/app";
|
|
52
|
+
const { $alert } = useNuxtApp();
|
|
53
|
+
import { ref, watch } from "vue";
|
|
54
|
+
const emit = defineEmits(["submit"]);
|
|
55
|
+
const props = defineProps({
|
|
56
|
+
item: { type: Object, required: false, default: () => ({
|
|
57
|
+
description: "",
|
|
58
|
+
category: "",
|
|
59
|
+
address: {
|
|
60
|
+
province_id: 0,
|
|
61
|
+
amphur_id: 0,
|
|
62
|
+
tambon_id: 0,
|
|
63
|
+
zipcode: 0,
|
|
64
|
+
detail_address: "",
|
|
65
|
+
full_address: ""
|
|
66
|
+
},
|
|
67
|
+
phone: "",
|
|
68
|
+
links: []
|
|
69
|
+
}) }
|
|
70
|
+
});
|
|
71
|
+
const form = ref(
|
|
72
|
+
JSON.parse(JSON.stringify(props.item))
|
|
73
|
+
);
|
|
74
|
+
const isDrawerOpen = defineModel({ type: Boolean, ...{
|
|
75
|
+
default: false
|
|
76
|
+
} });
|
|
77
|
+
watch(isDrawerOpen, (newVal) => {
|
|
78
|
+
if (newVal) {
|
|
79
|
+
form.value = JSON.parse(JSON.stringify(props.item));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const onClose = async () => {
|
|
83
|
+
const isModified = JSON.stringify(form.value) !== JSON.stringify(props.item);
|
|
84
|
+
if (isModified) {
|
|
85
|
+
const { isConfirmed } = await $alert.show({
|
|
86
|
+
type: "warning",
|
|
87
|
+
title: "\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48 ?",
|
|
88
|
+
description: "\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01 \u0E04\u0E38\u0E13\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E25\u0E30\u0E17\u0E34\u0E49\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48 ?",
|
|
89
|
+
confirmText: "\u0E25\u0E30\u0E17\u0E34\u0E49\u0E07",
|
|
90
|
+
cancelText: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E15\u0E48\u0E2D",
|
|
91
|
+
showCancelBtn: true
|
|
92
|
+
});
|
|
93
|
+
if (isConfirmed) {
|
|
94
|
+
isDrawerOpen.value = false;
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
isDrawerOpen.value = false;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const onSubmit = () => {
|
|
101
|
+
emit("submit", form.value);
|
|
102
|
+
isDrawerOpen.value = false;
|
|
103
|
+
};
|
|
44
104
|
</script>
|
|
@@ -1,3 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
export interface InputLinkItem {
|
|
2
|
+
name: string;
|
|
3
|
+
link?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Address {
|
|
6
|
+
province_id?: number;
|
|
7
|
+
amphur_id?: number;
|
|
8
|
+
tambon_id?: number;
|
|
9
|
+
zipcode?: number;
|
|
10
|
+
detail_address?: string;
|
|
11
|
+
full_address?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DrawerProfileAboutItem {
|
|
14
|
+
description: string;
|
|
15
|
+
category: string;
|
|
16
|
+
address: Address;
|
|
17
|
+
phone: string;
|
|
18
|
+
links: InputLinkItem[];
|
|
19
|
+
}
|
|
20
|
+
export interface DrawerProfileAboutProps {
|
|
21
|
+
item?: DrawerProfileAboutItem;
|
|
22
|
+
}
|
|
23
|
+
type __VLS_Props = DrawerProfileAboutProps;
|
|
24
|
+
type __VLS_ModelProps = {
|
|
25
|
+
modelValue?: boolean;
|
|
26
|
+
};
|
|
27
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
28
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
29
|
+
"update:modelValue": (value: boolean) => any;
|
|
30
|
+
} & {
|
|
31
|
+
submit: (data: DrawerProfileAboutItem) => any;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
33
|
+
onSubmit?: ((data: DrawerProfileAboutItem) => any) | undefined;
|
|
34
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
item: DrawerProfileAboutItem;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
38
|
declare const _default: typeof __VLS_export;
|
|
3
39
|
export default _default;
|
|
@@ -31,6 +31,7 @@ const props = defineProps({
|
|
|
31
31
|
description: { type: String, required: false },
|
|
32
32
|
loading: { type: Boolean, required: false },
|
|
33
33
|
loadingText: { type: String, required: false },
|
|
34
|
+
disabledAutoClose: { type: Boolean, required: false },
|
|
34
35
|
class: { type: null, required: false },
|
|
35
36
|
side: { type: String, required: false },
|
|
36
37
|
forceMount: { type: Boolean, required: false },
|
|
@@ -47,5 +48,8 @@ const onSubmit = (e) => {
|
|
|
47
48
|
};
|
|
48
49
|
const onClose = () => {
|
|
49
50
|
emits("close");
|
|
51
|
+
if (!props.disabledAutoClose) {
|
|
52
|
+
isOpen.value = false;
|
|
53
|
+
}
|
|
50
54
|
};
|
|
51
55
|
</script>
|
|
@@ -14,8 +14,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
14
14
|
onComplete?: ((value: string) => any) | undefined;
|
|
15
15
|
onClose?: (() => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
confirmedText: string;
|
|
18
17
|
phone: string;
|
|
18
|
+
confirmedText: string;
|
|
19
19
|
phoneLabel: string;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -14,8 +14,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
14
14
|
onComplete?: ((value: string) => any) | undefined;
|
|
15
15
|
onClose?: (() => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
confirmedText: string;
|
|
18
17
|
phone: string;
|
|
18
|
+
confirmedText: string;
|
|
19
19
|
phoneLabel: string;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "vue";
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
class?: HTMLAttributes["class"];
|
|
4
|
+
hasGap?: boolean;
|
|
4
5
|
};
|
|
5
6
|
declare var __VLS_1: {};
|
|
6
7
|
type __VLS_Slots = {} & {
|
|
7
8
|
default?: (props: typeof __VLS_1) => any;
|
|
8
9
|
};
|
|
9
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
hasGap: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { cn } from "@/runtime/plugins/shadcn";
|
|
3
3
|
const props = defineProps({
|
|
4
|
-
class: { type: null, required: false }
|
|
4
|
+
class: { type: null, required: false },
|
|
5
|
+
hasGap: { type: Boolean, required: false, default: true }
|
|
5
6
|
});
|
|
6
7
|
</script>
|
|
7
8
|
|
|
@@ -10,7 +11,8 @@ const props = defineProps({
|
|
|
10
11
|
data-slot="card-header"
|
|
11
12
|
:class="
|
|
12
13
|
cn(
|
|
13
|
-
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start
|
|
14
|
+
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
|
|
15
|
+
props.hasGap && 'gap-1.5',
|
|
14
16
|
props.class
|
|
15
17
|
)
|
|
16
18
|
"
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { HTMLAttributes } from "vue";
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
class?: HTMLAttributes["class"];
|
|
4
|
+
hasGap?: boolean;
|
|
4
5
|
};
|
|
5
6
|
declare var __VLS_1: {};
|
|
6
7
|
type __VLS_Slots = {} & {
|
|
7
8
|
default?: (props: typeof __VLS_1) => any;
|
|
8
9
|
};
|
|
9
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
hasGap: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
20
20
|
>
|
|
21
21
|
<slot :meta="meta" />
|
|
22
|
-
<
|
|
22
|
+
<button
|
|
23
|
+
type="button"
|
|
23
24
|
class="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none cursor-pointer"
|
|
24
25
|
@click="onClose"
|
|
25
26
|
>
|
|
26
27
|
<Icon name="lucide:x" :size="24" />
|
|
27
28
|
<span class="sr-only">Closed</span>
|
|
28
|
-
</
|
|
29
|
+
</button>
|
|
29
30
|
</DialogContent>
|
|
30
31
|
</Form>
|
|
31
32
|
</DialogPortal>
|
|
@@ -11,7 +11,7 @@ export interface AlertResponse {
|
|
|
11
11
|
isCanceled: boolean;
|
|
12
12
|
isConfirmed: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare class Alert {
|
|
14
|
+
export declare class Alert {
|
|
15
15
|
show(options?: AlertOptions): Promise<AlertResponse>;
|
|
16
16
|
}
|
|
17
17
|
declare const _default: import("nuxt/app").Plugin<{
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "@/runtime/components/ui/alert-dialog";
|
|
13
13
|
import { buttonVariants } from "@/runtime/components/ui/button";
|
|
14
14
|
import Icon from "@/runtime/components/icons.vue";
|
|
15
|
-
class Alert {
|
|
15
|
+
export class Alert {
|
|
16
16
|
show(options = {}) {
|
|
17
17
|
const response = {
|
|
18
18
|
isCanceled: false,
|
package/package.json
CHANGED
|
File without changes
|