pukaad-ui-lib 1.39.0 → 1.41.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/address/Amphur.json +7346 -0
- package/dist/runtime/assets/json/address/Province.json +762 -0
- package/dist/runtime/assets/json/address/Tambon.json +64775 -0
- package/dist/runtime/assets/json/address/Zipcode.json +17208 -0
- package/dist/runtime/components/button.vue +1 -1
- package/dist/runtime/components/collapse/collapse.vue +1 -1
- package/dist/runtime/components/drawer/drawer.d.vue.ts +1 -1
- package/dist/runtime/components/drawer/drawer.vue +2 -2
- package/dist/runtime/components/drawer/drawer.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-address.d.vue.ts +14 -32
- package/dist/runtime/components/input/input-address.vue +174 -360
- package/dist/runtime/components/input/input-address.vue.d.ts +14 -32
- package/dist/runtime/components/input/input-autocomplete.vue +2 -2
- package/dist/runtime/components/input/input-combobox.d.vue.ts +12 -5
- package/dist/runtime/components/input/input-combobox.vue +143 -121
- package/dist/runtime/components/input/input-combobox.vue.d.ts +12 -5
- package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-password.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-password.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-text-field.d.vue.ts +3 -1
- package/dist/runtime/components/input/input-text-field.vue +8 -2
- package/dist/runtime/components/input/input-text-field.vue.d.ts +3 -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/loading.d.vue.ts +2 -4
- package/dist/runtime/components/loading.vue +4 -8
- package/dist/runtime/components/loading.vue.d.ts +2 -4
- package/dist/runtime/components/modal/modal-share.vue +1 -1
- package/dist/runtime/components/modal/modal.d.vue.ts +2 -1
- package/dist/runtime/components/modal/modal.vue +2 -2
- package/dist/runtime/components/modal/modal.vue.d.ts +2 -1
- package/dist/runtime/components/ui/input-group/InputGroupButton.d.vue.ts +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupButton.vue.d.ts +1 -1
- package/dist/runtime/components/ui/input-group/index.d.ts +1 -1
- 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/tabs/TabsList.vue +6 -4
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue +6 -4
- package/dist/runtime/composables/useThaiAddress.d.ts +45 -0
- package/dist/runtime/composables/useThaiAddress.js +81 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import type { SheetContentProps } from "@/runtime/components/ui/sheet/SheetConte
|
|
|
2
2
|
export interface DrawerProps extends SheetContentProps {
|
|
3
3
|
title?: string;
|
|
4
4
|
description?: string;
|
|
5
|
-
|
|
5
|
+
loading?: boolean;
|
|
6
6
|
loadingText?: string;
|
|
7
7
|
}
|
|
8
8
|
type __VLS_Props = DrawerProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ShadSheet v-model:open="isOpen">
|
|
3
3
|
<ShadSheetContent v-bind="props" v-slot="{ meta }" @submit="onSubmit">
|
|
4
|
-
<Loading :
|
|
4
|
+
<Loading :loading="props.loading" :text="props.loadingText" />
|
|
5
5
|
<ShadSheetHeader class="flex-shrink-0">
|
|
6
6
|
<slot name="header">
|
|
7
7
|
<ShadSheetTitle>{{ props.title }}</ShadSheetTitle>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
const props = defineProps({
|
|
25
25
|
title: { type: String, required: false },
|
|
26
26
|
description: { type: String, required: false },
|
|
27
|
-
|
|
27
|
+
loading: { type: Boolean, required: false },
|
|
28
28
|
loadingText: { type: String, required: false },
|
|
29
29
|
class: { type: null, required: false },
|
|
30
30
|
side: { type: String, required: false },
|
|
@@ -2,7 +2,7 @@ import type { SheetContentProps } from "@/runtime/components/ui/sheet/SheetConte
|
|
|
2
2
|
export interface DrawerProps extends SheetContentProps {
|
|
3
3
|
title?: string;
|
|
4
4
|
description?: string;
|
|
5
|
-
|
|
5
|
+
loading?: boolean;
|
|
6
6
|
loadingText?: string;
|
|
7
7
|
}
|
|
8
8
|
type __VLS_Props = DrawerProps;
|
|
@@ -1,28 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
code: number;
|
|
3
|
-
name_th: string;
|
|
4
|
-
name_en: string;
|
|
5
|
-
}
|
|
6
|
-
interface District {
|
|
7
|
-
code: number;
|
|
8
|
-
name_th: string;
|
|
9
|
-
name_en: string;
|
|
10
|
-
province_code: number;
|
|
11
|
-
}
|
|
12
|
-
interface SubDistrict {
|
|
13
|
-
code: number;
|
|
14
|
-
name_th: string;
|
|
15
|
-
name_en: string;
|
|
16
|
-
district_code: number;
|
|
17
|
-
zip_code: number;
|
|
18
|
-
}
|
|
1
|
+
import { type Province, type Amphur, type Tambon } from "@/runtime/composables/useThaiAddress";
|
|
19
2
|
export interface InputAddressValue {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
3
|
+
province_id?: number;
|
|
4
|
+
amphur_id?: number;
|
|
5
|
+
tambon_id?: number;
|
|
6
|
+
zipcode?: number;
|
|
7
|
+
detail_address?: string;
|
|
8
|
+
full_address?: string;
|
|
26
9
|
}
|
|
27
10
|
export interface InputAddressProps {
|
|
28
11
|
name?: string;
|
|
@@ -33,9 +16,7 @@ export interface InputAddressProps {
|
|
|
33
16
|
required?: boolean;
|
|
34
17
|
requiredDetail?: boolean;
|
|
35
18
|
rules?: object | string | Function;
|
|
36
|
-
|
|
37
|
-
districts?: District[];
|
|
38
|
-
subDistricts?: SubDistrict[];
|
|
19
|
+
gap?: string;
|
|
39
20
|
}
|
|
40
21
|
type __VLS_Props = InputAddressProps;
|
|
41
22
|
type __VLS_ModelProps = {
|
|
@@ -46,28 +27,29 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
46
27
|
validate: () => Promise<boolean>;
|
|
47
28
|
setErrors: (errMsg: string[]) => void;
|
|
48
29
|
reset: () => void;
|
|
49
|
-
|
|
30
|
+
comboboxRef: import("vue").Ref<any, any>;
|
|
50
31
|
detailFieldRef: import("vue").Ref<any, any>;
|
|
51
32
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
52
33
|
"update:modelValue": (value: InputAddressValue) => any;
|
|
53
34
|
} & {
|
|
54
35
|
change: (value: InputAddressValue) => any;
|
|
55
36
|
selectProvince: (province: Province) => any;
|
|
56
|
-
selectDistrict: (district:
|
|
57
|
-
selectSubDistrict: (subDistrict:
|
|
37
|
+
selectDistrict: (district: Amphur) => any;
|
|
38
|
+
selectSubDistrict: (subDistrict: Tambon) => any;
|
|
58
39
|
selectZipCode: (zipCode: number) => any;
|
|
59
40
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
60
41
|
onChange?: ((value: InputAddressValue) => any) | undefined;
|
|
61
42
|
"onUpdate:modelValue"?: ((value: InputAddressValue) => any) | undefined;
|
|
62
43
|
onSelectProvince?: ((province: Province) => any) | undefined;
|
|
63
|
-
onSelectDistrict?: ((district:
|
|
64
|
-
onSelectSubDistrict?: ((subDistrict:
|
|
44
|
+
onSelectDistrict?: ((district: Amphur) => any) | undefined;
|
|
45
|
+
onSelectSubDistrict?: ((subDistrict: Tambon) => any) | undefined;
|
|
65
46
|
onSelectZipCode?: ((zipCode: number) => any) | undefined;
|
|
66
47
|
}>, {
|
|
67
48
|
label: string;
|
|
68
49
|
required: boolean;
|
|
69
50
|
name: string;
|
|
70
51
|
placeholder: string;
|
|
52
|
+
gap: string;
|
|
71
53
|
labelDetail: string;
|
|
72
54
|
placeholderDetail: string;
|
|
73
55
|
requiredDetail: boolean;
|