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.
Files changed (87) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/assets/svg/id-card-selfie-guideline.svg +15 -0
  3. package/dist/runtime/assets/svg/passport-guideline.svg +6 -0
  4. package/dist/runtime/components/badge/badge-count.d.vue.ts +28 -0
  5. package/dist/runtime/components/badge/badge-count.vue +45 -0
  6. package/dist/runtime/components/badge/badge-count.vue.d.ts +28 -0
  7. package/dist/runtime/components/card/card-blog.d.vue.ts +1 -1
  8. package/dist/runtime/components/card/card-blog.vue.d.ts +1 -1
  9. package/dist/runtime/components/card/card-file.d.vue.ts +15 -0
  10. package/dist/runtime/components/card/card-file.vue +67 -0
  11. package/dist/runtime/components/card/card-file.vue.d.ts +15 -0
  12. package/dist/runtime/components/card/card-profile/card-profile-header.d.vue.ts +1 -1
  13. package/dist/runtime/components/card/card-profile/card-profile-header.vue.d.ts +1 -1
  14. package/dist/runtime/components/chat/chat-conversation-item.d.vue.ts +1 -1
  15. package/dist/runtime/components/chat/chat-conversation-item.vue +2 -11
  16. package/dist/runtime/components/chat/chat-conversation-item.vue.d.ts +1 -1
  17. package/dist/runtime/components/drawer/drawer-notification.d.vue.ts +1 -20
  18. package/dist/runtime/components/drawer/drawer-notification.vue +114 -217
  19. package/dist/runtime/components/drawer/drawer-notification.vue.d.ts +1 -20
  20. package/dist/runtime/components/image/image-cropper.d.vue.ts +1 -1
  21. package/dist/runtime/components/image/image-cropper.vue.d.ts +1 -1
  22. package/dist/runtime/components/input/input-address.d.vue.ts +1 -1
  23. package/dist/runtime/components/input/input-address.vue +1 -3
  24. package/dist/runtime/components/input/input-address.vue.d.ts +1 -1
  25. package/dist/runtime/components/input/input-autocomplete.d.vue.ts +1 -1
  26. package/dist/runtime/components/input/input-autocomplete.vue.d.ts +1 -1
  27. package/dist/runtime/components/input/input-birth-date.d.vue.ts +1 -1
  28. package/dist/runtime/components/input/input-birth-date.vue.d.ts +1 -1
  29. package/dist/runtime/components/input/input-date-picker.d.vue.ts +1 -1
  30. package/dist/runtime/components/input/input-date-picker.vue.d.ts +1 -1
  31. package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
  32. package/dist/runtime/components/input/input-localized-name.vue.d.ts +1 -1
  33. package/dist/runtime/components/input/input-radio.d.vue.ts +1 -1
  34. package/dist/runtime/components/input/input-radio.vue.d.ts +1 -1
  35. package/dist/runtime/components/input/input-search.d.vue.ts +1 -1
  36. package/dist/runtime/components/input/input-search.vue.d.ts +1 -1
  37. package/dist/runtime/components/input/input-slider.d.vue.ts +1 -1
  38. package/dist/runtime/components/input/input-slider.vue.d.ts +1 -1
  39. package/dist/runtime/components/input/input-tag-modal.d.vue.ts +1 -1
  40. package/dist/runtime/components/input/input-tag-modal.vue.d.ts +1 -1
  41. package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
  42. package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
  43. package/dist/runtime/components/input/input-text-field.d.vue.ts +1 -1
  44. package/dist/runtime/components/input/input-text-field.vue.d.ts +1 -1
  45. package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
  46. package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
  47. package/dist/runtime/components/modal/modal-passport.d.vue.ts +17 -0
  48. package/dist/runtime/components/modal/modal-passport.vue +279 -0
  49. package/dist/runtime/components/modal/modal-passport.vue.d.ts +17 -0
  50. package/dist/runtime/components/modal/modal-personal-card-ID-selfie.d.vue.ts +17 -0
  51. package/dist/runtime/components/modal/modal-personal-card-ID-selfie.vue +196 -0
  52. package/dist/runtime/components/modal/modal-personal-card-ID-selfie.vue.d.ts +17 -0
  53. package/dist/runtime/components/modal/modal-province-domain.d.vue.ts +1 -1
  54. package/dist/runtime/components/modal/modal-province-domain.vue +1 -3
  55. package/dist/runtime/components/modal/modal-province-domain.vue.d.ts +1 -1
  56. package/dist/runtime/components/modal/modal-secure.d.vue.ts +1 -1
  57. package/dist/runtime/components/modal/modal-secure.vue.d.ts +1 -1
  58. package/dist/runtime/components/ui/alert-dialog/AlertDialogContent.d.vue.ts +4 -4
  59. package/dist/runtime/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +4 -4
  60. package/dist/runtime/components/ui/dialog/DialogContent.d.vue.ts +4 -4
  61. package/dist/runtime/components/ui/dialog/DialogContent.vue.d.ts +4 -4
  62. package/dist/runtime/components/ui/dialog/DialogScrollContent.d.vue.ts +4 -4
  63. package/dist/runtime/components/ui/dialog/DialogScrollContent.vue.d.ts +4 -4
  64. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +2 -2
  65. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +2 -2
  66. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +4 -4
  67. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +4 -4
  68. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +4 -4
  69. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +4 -4
  70. package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +4 -4
  71. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +4 -4
  72. package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +4 -4
  73. package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +4 -4
  74. package/dist/runtime/components/ui/select/SelectContent.d.vue.ts +2 -2
  75. package/dist/runtime/components/ui/select/SelectContent.vue.d.ts +2 -2
  76. package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +4 -4
  77. package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +4 -4
  78. package/dist/runtime/composables/store-notification.d.ts +189 -2
  79. package/dist/runtime/composables/store-notification.js +164 -16
  80. package/dist/runtime/composables/useProvinceRedirect.d.ts +1 -1
  81. package/dist/runtime/composables/useRealtime.js +0 -7
  82. package/dist/runtime/composables/useThaiAddress.d.ts +1 -29
  83. package/dist/runtime/types/notification.d.ts +44 -0
  84. package/dist/runtime/types/notification.js +0 -0
  85. package/dist/runtime/types/thai-address.d.ts +29 -0
  86. package/dist/runtime/types/thai-address.js +0 -0
  87. package/package.json +1 -1
@@ -1,254 +1,151 @@
1
1
  <template>
2
2
  <Drawer v-model="modelValue" title="การแจ้งเตือน" class="w-[748px]">
3
- <div class="flex justify-between items-center mb-[16px]">
4
- <ShadTabs v-model="selectedTab" class="w-full">
5
- <div class="flex justify-between items-center w-full">
6
- <ShadTabsList>
7
- <ShadTabsTrigger
8
- v-for="tab in tabs"
9
- :key="tab.value"
10
- :value="tab.value"
11
- class="px-4 py-2"
12
- >
13
- <Icon name="lucide:layers" />
14
- <div class="flex">
15
- {{ tab.label }}
16
- <div
17
- v-if="
18
- tab.value === 'general' ? hasUnreadGeneral : hasUnreadSystem
19
- "
20
- class="bg-destructive rounded-full w-[10px] h-[10px] m-[2px] shrink-0"
21
- />
22
- </div>
23
- </ShadTabsTrigger>
24
- </ShadTabsList>
25
-
26
- <div
27
- v-if="notifications.length > 0"
28
- class="text-primary font-body-medium cursor-pointer"
29
- @click="markAllRead"
3
+ <ShadTabs v-model="notificationStore.activeTab" class="w-full">
4
+ <div class="flex justify-between items-center w-full mb-[16px]">
5
+ <ShadTabsList>
6
+ <ShadTabsTrigger
7
+ v-for="tab in tabs"
8
+ :key="tab.value"
9
+ :value="tab.value"
10
+ class="px-4 py-2"
30
11
  >
31
- อ่านทั้งหมด
32
- </div>
33
- </div>
34
-
35
- <ShadTabsContent value="general" class="flex flex-col gap-[8px]">
36
- <template v-if="isLoading && notifications.length === 0">
37
- <div class="flex justify-center py-[40px]">
38
- <Icon
39
- name="lucide:loader-2"
40
- size="24"
41
- class="animate-spin text-gray"
12
+ <Icon name="lucide:layers" />
13
+ <div class="flex">
14
+ {{ tab.label }}
15
+ <div
16
+ v-if="notificationStore.unreadByTab[tab.value] > 0"
17
+ class="bg-destructive rounded-full w-[10px] h-[10px] m-[2px] shrink-0"
42
18
  />
43
19
  </div>
44
- </template>
20
+ </ShadTabsTrigger>
21
+ </ShadTabsList>
45
22
 
46
- <template v-else-if="notifications.length === 0">
47
- <div
48
- class="flex flex-col items-center justify-center py-[40px] gap-[8px]"
49
- >
50
- <Icon name="lucide:bell-off" size="40" class="text-gray" />
51
- <div class="font-body-medium text-gray">ยังไม่มีการแจ้งเตือน</div>
23
+ <div
24
+ v-if="notificationStore.unreadByTab[notificationStore.activeTab] > 0"
25
+ class="text-primary font-body-medium cursor-pointer"
26
+ @click="notificationStore.markAllRead()"
27
+ >
28
+ อ่านทั้งหมด
29
+ </div>
30
+ </div>
31
+
32
+ <ShadTabsContent
33
+ v-for="tab in tabs"
34
+ :key="tab.value"
35
+ :value="tab.value"
36
+ class="flex flex-col gap-[8px]"
37
+ >
38
+ <template v-if="notificationStore.isLoadingList[tab.value] && notificationStore.lists[tab.value].length === 0">
39
+ <div
40
+ v-for="n in 3"
41
+ :key="n"
42
+ class="flex gap-[8px] items-center p-[16px] rounded-[8px] border border-mercury animate-pulse"
43
+ >
44
+ <div class="size-[30px] rounded-full bg-mercury shrink-0" />
45
+ <div class="flex flex-col gap-[8px] w-full">
46
+ <div class="h-[12px] w-2/3 rounded bg-mercury" />
47
+ <div class="h-[10px] w-1/4 rounded bg-mercury" />
52
48
  </div>
53
- </template>
49
+ </div>
50
+ </template>
54
51
 
55
- <template v-else>
56
- <Card
57
- v-for="item in notifications"
58
- :key="item.id"
59
- variant="outline"
60
- class="cursor-pointer transition-colors"
61
- :class="{ 'bg-bright': !item.is_read }"
62
- @click="onClickNotification(item)"
63
- >
64
- <div class="flex gap-[8px] items-center">
65
- <div class="flex gap-[8px] items-center w-full">
66
- <Avatar :size="30" :src="item.actor?.avatar ?? void 0" />
67
- <div class="flex flex-col gap-[4px]">
68
- <div class="font-body-medium">
69
- <span
70
- v-if="item.actor && !isGrouped(item)"
71
- class="font-body-medium-prominent"
72
- >
73
- {{ item.actor.name }}
74
- </span>
75
- {{ item.message }}
76
- </div>
77
- <div class="text-gray font-body-small">
78
- {{ formatRelativeTime(item.created_at) }}
79
- </div>
52
+ <div
53
+ v-else-if="notificationStore.lists[tab.value].length === 0"
54
+ class="flex flex-col items-center justify-center py-[40px] gap-[8px]"
55
+ >
56
+ <Icon name="lucide:bell-off" size="40" class="text-gray" />
57
+ <div class="font-body-medium text-gray">{{ tab.empty }}</div>
58
+ </div>
59
+
60
+ <template v-else>
61
+ <Card
62
+ v-for="item in notificationStore.lists[tab.value]"
63
+ :key="item.id"
64
+ variant="outline"
65
+ class="cursor-pointer transition-colors"
66
+ :class="{ 'bg-bright': !item.is_read }"
67
+ @click="onClickNotification(item)"
68
+ >
69
+ <div class="flex gap-[8px] items-center">
70
+ <div class="flex gap-[8px] items-center w-full">
71
+ <Icon
72
+ v-if="item.tab === 'system'"
73
+ name="pukaad:memsg-square"
74
+ class="w-[40px] h-[40px] shrink-0"
75
+ />
76
+ <Avatar v-else :size="30" :src="item.actor?.avatar ?? void 0" />
77
+ <div class="flex flex-col gap-[4px]">
78
+ <div class="font-body-medium">
79
+ <span v-if="item.actor" class="font-body-medium-prominent">
80
+ {{ item.actor.name }}
81
+ </span>
82
+ {{ item.message }}
83
+ </div>
84
+ <div class="text-gray font-body-small">
85
+ {{ convertChatRelativeText(item.created_at) }}
80
86
  </div>
81
87
  </div>
82
- <div
83
- v-if="!item.is_read"
84
- class="bg-primary rounded-full w-[10px] h-[10px] shrink-0"
85
- />
86
88
  </div>
87
- </Card>
88
- </template>
89
- </ShadTabsContent>
90
-
91
- <ShadTabsContent value="system" class="flex flex-col gap-[8px]">
92
- <template v-if="isLoading && notifications.length === 0">
93
- <div class="flex justify-center py-[40px]">
94
- <Icon
95
- name="lucide:loader-2"
96
- size="24"
97
- class="animate-spin text-gray"
89
+ <div
90
+ v-if="!item.is_read"
91
+ class="bg-primary rounded-full w-[10px] h-[10px] shrink-0"
98
92
  />
99
93
  </div>
100
- </template>
94
+ </Card>
95
+ </template>
96
+ </ShadTabsContent>
97
+ </ShadTabs>
101
98
 
102
- <template v-else-if="notifications.length === 0">
103
- <div
104
- class="flex flex-col items-center justify-center py-[40px] gap-[8px]"
105
- >
106
- <Icon name="lucide:bell-off" size="40" class="text-gray" />
107
- <div class="font-body-medium text-gray">ยังไม่มีการแจ้งเตือนระบบ</div>
108
- </div>
109
- </template>
110
-
111
- <template v-else>
112
- <Card
113
- v-for="item in notifications"
114
- :key="item.id"
115
- variant="outline"
116
- class="cursor-pointer transition-colors"
117
- :class="{ 'bg-bright': !item.is_read }"
118
- @click="onClickNotification(item)"
119
- >
120
- <div class="flex gap-[8px] items-center">
121
- <div class="flex gap-[8px] items-center w-full">
122
- <Icon
123
- name="pukaad:memsg-square"
124
- class="w-[40px] h-[40px] shrink-0"
125
- />
126
- <div class="flex flex-col gap-[4px]">
127
- <div class="font-body-medium">{{ item.message }}</div>
128
- <div class="text-gray font-body-small">
129
- {{ formatRelativeTime(item.created_at) }}
130
- </div>
131
- </div>
132
- </div>
133
- <div
134
- v-if="!item.is_read"
135
- class="bg-primary rounded-full w-[10px] h-[10px] shrink-0"
136
- />
137
- </div>
138
- </Card>
139
- </template>
140
- </ShadTabsContent>
141
- </ShadTabs>
99
+ <div ref="sentinel" class="h-[1px]" />
100
+ <div
101
+ v-if="notificationStore.isLoadingMore[notificationStore.activeTab]"
102
+ class="flex justify-center py-[16px]"
103
+ >
104
+ <Icon name="lucide:loader-2" size="20" class="animate-spin text-gray" />
142
105
  </div>
143
106
  </Drawer>
144
107
  </template>
145
108
 
146
109
  <script setup>
147
- import { ref, computed, watch } from "vue";
148
- import { useApi } from "../../composables/useApi";
110
+ import { useTemplateRef, watch } from "vue";
111
+ import { useElementVisibility } from "@vueuse/core";
112
+ import { useConvert } from "../../composables/useConvert";
149
113
  import { useNotificationStore } from "../../composables/store-notification";
150
- const api = useApi();
151
114
  const modelValue = defineModel({ type: Boolean });
152
115
  const notificationStore = useNotificationStore();
116
+ const { convertChatRelativeText } = useConvert();
153
117
  const emit = defineEmits(["select"]);
154
- const selectedTab = ref("general");
155
118
  const tabs = [
156
- { value: "general", label: "\u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B" },
157
- { value: "system", label: "\u0E23\u0E30\u0E1A\u0E1A" }
119
+ { value: "general", label: "\u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B", empty: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19" },
120
+ { value: "system", label: "\u0E23\u0E30\u0E1A\u0E1A", empty: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19\u0E23\u0E30\u0E1A\u0E1A" }
158
121
  ];
159
- const generalNotifications = ref([]);
160
- const systemNotifications = ref([]);
161
- const isLoading = ref(false);
162
- const notifications = computed(
163
- () => selectedTab.value === "system" ? systemNotifications.value : generalNotifications.value
164
- );
165
- const hasUnreadGeneral = computed(
166
- () => generalNotifications.value.some((n) => !n.is_read)
167
- );
168
- const hasUnreadSystem = computed(
169
- () => systemNotifications.value.some((n) => !n.is_read)
170
- );
171
- const fetchNotifications = async () => {
172
- try {
173
- isLoading.value = true;
174
- if (selectedTab.value === "system") {
175
- const response = await api(`/notifications`, {
176
- params: { page: 1, page_size: 50, category: "system" }
177
- });
178
- systemNotifications.value = response.data;
179
- } else {
180
- const response = await api(`/notifications`, {
181
- params: { page: 1, page_size: 50 }
182
- });
183
- generalNotifications.value = response.data.filter(
184
- (n) => n.category !== "system"
185
- );
186
- }
187
- } catch (err) {
188
- console.error("Fetch notifications error:", err);
189
- } finally {
190
- isLoading.value = false;
191
- }
192
- };
193
- const markAsRead = async (item) => {
194
- if (item.is_read) return;
195
- try {
196
- await api(`/notifications/${item.id}/read`, { method: "PATCH" });
197
- item.is_read = true;
198
- notificationStore.fetchUnreadCount();
199
- } catch {
200
- }
201
- };
202
- const markAllRead = async () => {
203
- try {
204
- await api(`/notifications/read-all`, { method: "PATCH" });
205
- generalNotifications.value.forEach((n) => n.is_read = true);
206
- systemNotifications.value.forEach((n) => n.is_read = true);
207
- notificationStore.setUnreadCount(0);
208
- } catch {
209
- }
210
- };
122
+ const sentinel = useTemplateRef("sentinel");
123
+ const isSentinelVisible = useElementVisibility(sentinel);
211
124
  const onClickNotification = (item) => {
212
- markAsRead(item);
125
+ notificationStore.markRead(item);
213
126
  emit("select", item);
214
127
  };
215
- const isGrouped = (item) => !!item.grouped_count && item.grouped_count > 1;
216
- const formatRelativeTime = (dateStr) => {
217
- const now = /* @__PURE__ */ new Date();
218
- const date = new Date(dateStr);
219
- const diffMs = now.getTime() - date.getTime();
220
- const diffSec = Math.floor(diffMs / 1e3);
221
- const diffMin = Math.floor(diffSec / 60);
222
- const diffHour = Math.floor(diffMin / 60);
223
- const diffDay = Math.floor(diffHour / 24);
224
- if (diffSec < 60) return "\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E0B\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48";
225
- if (diffMin < 60) return `${diffMin} \u0E19\u0E32\u0E17\u0E35\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27`;
226
- if (diffHour < 24) return `${diffHour} \u0E0A\u0E31\u0E48\u0E27\u0E42\u0E21\u0E07\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27`;
227
- if (diffDay < 7) return `${diffDay} \u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E25\u0E49\u0E27`;
228
- return date.toLocaleDateString("th-TH", {
229
- day: "numeric",
230
- month: "short",
231
- year: "numeric"
232
- });
233
- };
234
128
  watch(
235
129
  () => notificationStore.isOpenDrawer,
236
- (val) => {
237
- if (val) {
238
- fetchNotifications();
239
- }
130
+ (open) => {
131
+ if (open) notificationStore.fetchList(notificationStore.activeTab);
240
132
  }
241
133
  );
242
- watch(selectedTab, () => {
243
- if (notificationStore.isOpenDrawer) {
244
- fetchNotifications();
134
+ watch(
135
+ () => notificationStore.activeTab,
136
+ (tab) => {
137
+ if (notificationStore.isOpenDrawer) notificationStore.fetchList(tab);
245
138
  }
246
- });
139
+ );
247
140
  watch(
248
- () => notificationStore.unreadCount,
249
- () => {
250
- if (notificationStore.isOpenDrawer) {
251
- fetchNotifications();
141
+ [
142
+ isSentinelVisible,
143
+ () => notificationStore.hasMore[notificationStore.activeTab],
144
+ () => notificationStore.isLoadingMore[notificationStore.activeTab]
145
+ ],
146
+ ([visible, more, loading]) => {
147
+ if (visible && more && !loading && notificationStore.isOpenDrawer) {
148
+ notificationStore.loadMore(notificationStore.activeTab);
252
149
  }
253
150
  }
254
151
  );
@@ -1,23 +1,4 @@
1
- export interface NotificationActor {
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'];
@@ -64,11 +64,11 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
64
64
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
65
65
  src: string;
66
66
  center: boolean;
67
- crossorigin: "" | "anonymous" | "use-credentials";
68
67
  responsive: boolean;
69
68
  restore: boolean;
70
69
  checkCrossOrigin: boolean;
71
70
  checkOrientation: boolean;
71
+ crossorigin: "" | "anonymous" | "use-credentials";
72
72
  modal: boolean;
73
73
  guides: boolean;
74
74
  highlight: boolean;
@@ -64,11 +64,11 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
64
64
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
65
65
  src: string;
66
66
  center: boolean;
67
- crossorigin: "" | "anonymous" | "use-credentials";
68
67
  responsive: boolean;
69
68
  restore: boolean;
70
69
  checkCrossOrigin: boolean;
71
70
  checkOrientation: boolean;
71
+ crossorigin: "" | "anonymous" | "use-credentials";
72
72
  modal: boolean;
73
73
  guides: boolean;
74
74
  highlight: boolean;
@@ -1,4 +1,4 @@
1
- import { type Province, type Amphur, type Tambon } from "#pukaad-ui/runtime/composables/useThaiAddress";
1
+ import type { Province, Amphur, Tambon } from "#pukaad-ui/runtime/types/thai-address";
2
2
  export interface InputAddressValue {
3
3
  province_id?: number;
4
4
  amphur_id?: number;
@@ -150,9 +150,7 @@
150
150
 
151
151
  <script setup>
152
152
  import { ref, computed, watch, onMounted } from "vue";
153
- import {
154
- useThaiAddress
155
- } from "#pukaad-ui/runtime/composables/useThaiAddress";
153
+ import { useThaiAddress } from "#pukaad-ui/runtime/composables/useThaiAddress";
156
154
  const {
157
155
  loadProvinces,
158
156
  loadProvinceById,
@@ -1,4 +1,4 @@
1
- import { type Province, type Amphur, type Tambon } from "#pukaad-ui/runtime/composables/useThaiAddress";
1
+ import type { Province, Amphur, Tambon } from "#pukaad-ui/runtime/types/thai-address";
2
2
  export interface InputAddressValue {
3
3
  province_id?: number;
4
4
  amphur_id?: number;
@@ -69,9 +69,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
69
69
  name: string;
70
70
  required: boolean;
71
71
  description: string;
72
+ options: AutocompleteOption[] | string[] | number[];
72
73
  labelKey: string;
73
74
  placeholder: string;
74
- options: AutocompleteOption[] | string[] | number[];
75
75
  limit: number;
76
76
  disabledErrorMessage: boolean;
77
77
  disabledBorder: boolean;
@@ -69,9 +69,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
69
69
  name: string;
70
70
  required: boolean;
71
71
  description: string;
72
+ options: AutocompleteOption[] | string[] | number[];
72
73
  labelKey: string;
73
74
  placeholder: string;
74
- options: AutocompleteOption[] | string[] | number[];
75
75
  limit: number;
76
76
  disabledErrorMessage: boolean;
77
77
  disabledBorder: boolean;
@@ -30,10 +30,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
30
30
  id: string;
31
31
  name: string;
32
32
  required: boolean;
33
+ layout: "month-and-year" | "month-only" | "year-only";
33
34
  locale: string;
34
35
  placeholder: string;
35
36
  disabledErrorMessage: boolean;
36
- layout: "month-and-year" | "month-only" | "year-only";
37
37
  dateFormat: string;
38
38
  minAge: number;
39
39
  maxYearsBack: number;
@@ -30,10 +30,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
30
30
  id: string;
31
31
  name: string;
32
32
  required: boolean;
33
+ layout: "month-and-year" | "month-only" | "year-only";
33
34
  locale: string;
34
35
  placeholder: string;
35
36
  disabledErrorMessage: boolean;
36
- layout: "month-and-year" | "month-only" | "year-only";
37
37
  dateFormat: string;
38
38
  minAge: number;
39
39
  maxYearsBack: number;
@@ -44,10 +44,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
44
44
  id: string;
45
45
  name: string;
46
46
  required: boolean;
47
+ layout: "month-and-year" | "month-only" | "year-only";
47
48
  locale: string;
48
49
  placeholder: string;
49
50
  disabledErrorMessage: boolean;
50
- layout: "month-and-year" | "month-only" | "year-only";
51
51
  dateFormat: string;
52
52
  showTime: boolean;
53
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -44,10 +44,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
44
44
  id: string;
45
45
  name: string;
46
46
  required: boolean;
47
+ layout: "month-and-year" | "month-only" | "year-only";
47
48
  locale: string;
48
49
  placeholder: string;
49
50
  disabledErrorMessage: boolean;
50
- layout: "month-and-year" | "month-only" | "year-only";
51
51
  dateFormat: string;
52
52
  showTime: boolean;
53
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -11,8 +11,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
11
11
  label: string;
12
12
  name: string;
13
13
  modelValue: LocalizedNameItem[];
14
- placeholder: string;
15
14
  options: InputSelectItem[];
15
+ placeholder: string;
16
16
  limit: number;
17
17
  showCounter: boolean;
18
18
  addLabel: string;
@@ -11,8 +11,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
11
11
  label: string;
12
12
  name: string;
13
13
  modelValue: LocalizedNameItem[];
14
- placeholder: string;
15
14
  options: InputSelectItem[];
15
+ placeholder: string;
16
16
  limit: number;
17
17
  showCounter: boolean;
18
18
  addLabel: string;
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
35
35
  item: string | number;
36
36
  name: string;
37
37
  columnGap: number | string;
38
- disabledErrorMessage: boolean;
39
38
  layout: "vertical" | "horizontal";
39
+ disabledErrorMessage: boolean;
40
40
  labelPosition: "left" | "right";
41
41
  layoutGap: number | string;
42
42
  standalone: boolean;
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
35
35
  item: string | number;
36
36
  name: string;
37
37
  columnGap: number | string;
38
- disabledErrorMessage: boolean;
39
38
  layout: "vertical" | "horizontal";
39
+ disabledErrorMessage: boolean;
40
40
  labelPosition: "left" | "right";
41
41
  layoutGap: number | string;
42
42
  standalone: boolean;
@@ -37,10 +37,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
37
37
  name: string;
38
38
  required: boolean;
39
39
  placeholder: string;
40
+ readonly: boolean;
40
41
  disabledErrorMessage: boolean;
41
42
  iconPosition: import("#pukaad-ui/types/components/input/input-search").InputSearchIconPosition;
42
43
  disabledIcon: boolean;
43
- readonly: boolean;
44
44
  roundedFull: boolean;
45
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -37,10 +37,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
37
37
  name: string;
38
38
  required: boolean;
39
39
  placeholder: string;
40
+ readonly: boolean;
40
41
  disabledErrorMessage: boolean;
41
42
  iconPosition: import("#pukaad-ui/types/components/input/input-search").InputSearchIconPosition;
42
43
  disabledIcon: boolean;
43
- readonly: boolean;
44
44
  roundedFull: boolean;
45
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  label: string;
13
13
  color: InputSliderColor;
14
14
  fullWidth: boolean;
15
+ max: number;
15
16
  step: number;
16
17
  min: number;
17
- max: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
12
12
  label: string;
13
13
  color: InputSliderColor;
14
14
  fullWidth: boolean;
15
+ max: number;
15
16
  step: number;
16
17
  min: number;
17
- max: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -40,9 +40,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
40
40
  id: string;
41
41
  name: string;
42
42
  required: boolean;
43
+ options: InputTagModalOption[];
43
44
  labelKey: string;
44
45
  placeholder: string;
45
- options: InputTagModalOption[];
46
46
  disabledErrorMessage: boolean;
47
47
  valueKey: string;
48
48
  searchPlaceholder: string;
@@ -40,9 +40,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
40
40
  id: string;
41
41
  name: string;
42
42
  required: boolean;
43
+ options: InputTagModalOption[];
43
44
  labelKey: string;
44
45
  placeholder: string;
45
- options: InputTagModalOption[];
46
46
  disabledErrorMessage: boolean;
47
47
  valueKey: string;
48
48
  searchPlaceholder: string;