pukaad-ui-lib 1.364.0 → 1.366.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 (37) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/button.d.vue.ts +1 -1
  3. package/dist/runtime/components/button.vue +13 -5
  4. package/dist/runtime/components/button.vue.d.ts +1 -1
  5. package/dist/runtime/components/drawer/drawer-notification.vue +146 -146
  6. package/dist/runtime/components/drawer/drawer-post-blog.d.vue.ts +2 -2
  7. package/dist/runtime/components/drawer/drawer-post-blog.vue.d.ts +2 -2
  8. package/dist/runtime/components/drawer/drawer-suggest-place/drawer-suggest-place.vue +2 -1
  9. package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-form.d.vue.ts +1 -0
  10. package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-form.vue +4 -1
  11. package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-form.vue.d.ts +1 -0
  12. package/dist/runtime/components/google-translate.client.vue +1 -1
  13. package/dist/runtime/components/input/input-autocomplete.d.vue.ts +1 -1
  14. package/dist/runtime/components/input/input-autocomplete.vue.d.ts +1 -1
  15. package/dist/runtime/components/input/input-combobox.d.vue.ts +1 -1
  16. package/dist/runtime/components/input/input-combobox.vue.d.ts +1 -1
  17. package/dist/runtime/components/input/input-link.d.vue.ts +3 -1
  18. package/dist/runtime/components/input/input-link.vue +2 -0
  19. package/dist/runtime/components/input/input-link.vue.d.ts +3 -1
  20. package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
  21. package/dist/runtime/components/input/input-localized-name.vue.d.ts +1 -1
  22. package/dist/runtime/components/input/input-suggest.d.vue.ts +1 -1
  23. package/dist/runtime/components/input/input-suggest.vue.d.ts +1 -1
  24. package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
  25. package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
  26. package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
  27. package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
  28. package/dist/runtime/components/modal/modal.vue +17 -6
  29. package/dist/runtime/components/ui/button/index.d.ts +1 -1
  30. package/dist/runtime/components/ui/button/index.js +32 -1
  31. package/dist/runtime/components/ui/chart/ChartTooltipContent.d.vue.ts +1 -1
  32. package/dist/runtime/components/ui/chart/ChartTooltipContent.vue.d.ts +1 -1
  33. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +2 -2
  34. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +2 -2
  35. package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +2 -2
  36. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +2 -2
  37. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.364.0",
4
+ "version": "1.366.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -2,7 +2,7 @@ import type { HTMLAttributes } from "vue";
2
2
  import type { ButtonVariants } from "./ui/button/index.js";
3
3
  export type ButtonType = "button" | "submit" | "reset";
4
4
  export type ButtonVariant = "default" | "outline" | "ghost" | "link" | "text" | "icon";
5
- export type ButtonColor = "default" | "primary" | "secondary" | "destructive" | "info";
5
+ export type ButtonColor = "default" | "primary" | "secondary" | "destructive" | "info" | "warning" | "success";
6
6
  export type ButtonSize = ButtonVariants["size"];
7
7
  export interface ButtonProps {
8
8
  type?: ButtonType;
@@ -1,14 +1,22 @@
1
1
  <template>
2
- <ShadButton :class="[
2
+ <ShadButton
3
+ :class="[
3
4
  'font-body-medium relative',
4
5
  props.variant === 'text' || props.variant === 'link' ? '!p-0 !h-auto' : '',
5
6
  props.circle && 'rounded-full aspect-square',
6
7
  props.class
7
- ]" :variant="props.variant" :color="props.color" :size="resolvedSize" :type="props.type"
8
- :disabled="props.loading || props.disabled">
8
+ ]"
9
+ :variant="props.variant"
10
+ :color="props.color"
11
+ :size="resolvedSize"
12
+ :type="props.type"
13
+ :disabled="props.loading || props.disabled"
14
+ >
9
15
  <span class="inline-grid place-items-center">
10
- <span class="inline-flex items-center justify-center gap-[8px] [grid-area:1/1]"
11
- :class="{ invisible: props.loading }">
16
+ <span
17
+ class="inline-flex items-center justify-center gap-[8px] [grid-area:1/1]"
18
+ :class="{ invisible: props.loading }"
19
+ >
12
20
  <slot />
13
21
  </span>
14
22
  <ShadSpinner v-if="props.loading" class="[grid-area:1/1]" />
@@ -2,7 +2,7 @@ import type { HTMLAttributes } from "vue";
2
2
  import type { ButtonVariants } from "./ui/button/index.js";
3
3
  export type ButtonType = "button" | "submit" | "reset";
4
4
  export type ButtonVariant = "default" | "outline" | "ghost" | "link" | "text" | "icon";
5
- export type ButtonColor = "default" | "primary" | "secondary" | "destructive" | "info";
5
+ export type ButtonColor = "default" | "primary" | "secondary" | "destructive" | "info" | "warning" | "success";
6
6
  export type ButtonSize = ButtonVariants["size"];
7
7
  export interface ButtonProps {
8
8
  type?: ButtonType;
@@ -1,152 +1,152 @@
1
1
  <template>
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
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
17
  v-if="
18
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"
30
- >
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"
42
- />
43
- </div>
44
- </template>
45
-
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>
52
- </div>
53
- </template>
54
-
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"
71
- class="font-body-medium-prominent"
72
- >
73
- {{ item.actor.name }}
74
- </span>
75
- {{ item.message }}
76
- <span
77
- v-if="item.grouped_count && item.grouped_count > 1"
78
- class="text-gray font-body-small"
79
- >
80
- ({{ item.grouped_count }} คน)
81
- </span>
82
- </div>
83
- <div class="text-gray font-body-small">
84
- {{ formatRelativeTime(item.created_at) }}
85
- </div>
86
- </div>
87
- </div>
88
- <div
89
- v-if="!item.is_read"
90
- class="bg-primary rounded-full w-[10px] h-[10px] shrink-0"
91
- />
92
- </div>
93
- </Card>
94
- </template>
95
- </ShadTabsContent>
96
-
97
- <ShadTabsContent value="system" class="flex flex-col gap-[8px]">
98
- <template v-if="isLoading && notifications.length === 0">
99
- <div class="flex justify-center py-[40px]">
100
- <Icon
101
- name="lucide:loader-2"
102
- size="24"
103
- class="animate-spin text-gray"
104
- />
105
- </div>
106
- </template>
107
-
108
- <template v-else-if="notifications.length === 0">
109
- <div
110
- class="flex flex-col items-center justify-center py-[40px] gap-[8px]"
111
- >
112
- <Icon name="lucide:bell-off" size="40" class="text-gray" />
113
- <div class="font-body-medium text-gray">ยังไม่มีการแจ้งเตือนระบบ</div>
114
- </div>
115
- </template>
116
-
117
- <template v-else>
118
- <Card
119
- v-for="item in notifications"
120
- :key="item.id"
121
- variant="outline"
122
- class="cursor-pointer transition-colors"
123
- :class="{ 'bg-bright': !item.is_read }"
124
- @click="onClickNotification(item)"
125
- >
126
- <div class="flex gap-[8px] items-center">
127
- <div class="flex gap-[8px] items-center w-full">
128
- <Icon
129
- name="pukaad:memsg-square"
130
- class="w-[40px] h-[40px] shrink-0"
131
- />
132
- <div class="flex flex-col gap-[4px]">
133
- <div class="font-body-medium">{{ item.message }}</div>
134
- <div class="text-gray font-body-small">
135
- {{ formatRelativeTime(item.created_at) }}
136
- </div>
137
- </div>
138
- </div>
139
- <div
140
- v-if="!item.is_read"
141
- class="bg-primary rounded-full w-[10px] h-[10px] shrink-0"
142
- />
143
- </div>
144
- </Card>
145
- </template>
146
- </ShadTabsContent>
147
- </ShadTabs>
148
- </div>
149
- </Drawer>
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"
30
+ >
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"
42
+ />
43
+ </div>
44
+ </template>
45
+
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>
52
+ </div>
53
+ </template>
54
+
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"
71
+ class="font-body-medium-prominent"
72
+ >
73
+ {{ item.actor.name }}
74
+ </span>
75
+ {{ item.message }}
76
+ <span
77
+ v-if="item.grouped_count && item.grouped_count > 1"
78
+ class="text-gray font-body-small"
79
+ >
80
+ ({{ item.grouped_count }} คน)
81
+ </span>
82
+ </div>
83
+ <div class="text-gray font-body-small">
84
+ {{ formatRelativeTime(item.created_at) }}
85
+ </div>
86
+ </div>
87
+ </div>
88
+ <div
89
+ v-if="!item.is_read"
90
+ class="bg-primary rounded-full w-[10px] h-[10px] shrink-0"
91
+ />
92
+ </div>
93
+ </Card>
94
+ </template>
95
+ </ShadTabsContent>
96
+
97
+ <ShadTabsContent value="system" class="flex flex-col gap-[8px]">
98
+ <template v-if="isLoading && notifications.length === 0">
99
+ <div class="flex justify-center py-[40px]">
100
+ <Icon
101
+ name="lucide:loader-2"
102
+ size="24"
103
+ class="animate-spin text-gray"
104
+ />
105
+ </div>
106
+ </template>
107
+
108
+ <template v-else-if="notifications.length === 0">
109
+ <div
110
+ class="flex flex-col items-center justify-center py-[40px] gap-[8px]"
111
+ >
112
+ <Icon name="lucide:bell-off" size="40" class="text-gray" />
113
+ <div class="font-body-medium text-gray">ยังไม่มีการแจ้งเตือนระบบ</div>
114
+ </div>
115
+ </template>
116
+
117
+ <template v-else>
118
+ <Card
119
+ v-for="item in notifications"
120
+ :key="item.id"
121
+ variant="outline"
122
+ class="cursor-pointer transition-colors"
123
+ :class="{ 'bg-bright': !item.is_read }"
124
+ @click="onClickNotification(item)"
125
+ >
126
+ <div class="flex gap-[8px] items-center">
127
+ <div class="flex gap-[8px] items-center w-full">
128
+ <Icon
129
+ name="pukaad:memsg-square"
130
+ class="w-[40px] h-[40px] shrink-0"
131
+ />
132
+ <div class="flex flex-col gap-[4px]">
133
+ <div class="font-body-medium">{{ item.message }}</div>
134
+ <div class="text-gray font-body-small">
135
+ {{ formatRelativeTime(item.created_at) }}
136
+ </div>
137
+ </div>
138
+ </div>
139
+ <div
140
+ v-if="!item.is_read"
141
+ class="bg-primary rounded-full w-[10px] h-[10px] shrink-0"
142
+ />
143
+ </div>
144
+ </Card>
145
+ </template>
146
+ </ShadTabsContent>
147
+ </ShadTabs>
148
+ </div>
149
+ </Drawer>
150
150
  </template>
151
151
 
152
152
  <script setup>
@@ -21,12 +21,12 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
21
21
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
22
  "update:modelValue": (value: boolean) => any;
23
23
  } & {
24
- submit: (data: DrawerPostBlogItem) => any;
25
24
  success: (data: any) => any;
25
+ submit: (data: DrawerPostBlogItem) => any;
26
26
  saveDraft: (data: DrawerPostBlogItem) => any;
27
27
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
- onSubmit?: ((data: DrawerPostBlogItem) => any) | undefined;
29
28
  onSuccess?: ((data: any) => any) | undefined;
29
+ onSubmit?: ((data: DrawerPostBlogItem) => any) | undefined;
30
30
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
31
31
  onSaveDraft?: ((data: DrawerPostBlogItem) => any) | undefined;
32
32
  }>, {
@@ -21,12 +21,12 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
21
21
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
22
  "update:modelValue": (value: boolean) => any;
23
23
  } & {
24
- submit: (data: DrawerPostBlogItem) => any;
25
24
  success: (data: any) => any;
25
+ submit: (data: DrawerPostBlogItem) => any;
26
26
  saveDraft: (data: DrawerPostBlogItem) => any;
27
27
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
- onSubmit?: ((data: DrawerPostBlogItem) => any) | undefined;
29
28
  onSuccess?: ((data: any) => any) | undefined;
29
+ onSubmit?: ((data: DrawerPostBlogItem) => any) | undefined;
30
30
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
31
31
  onSaveDraft?: ((data: DrawerPostBlogItem) => any) | undefined;
32
32
  }>, {
@@ -180,7 +180,8 @@ const isFormValid = computed(() => {
180
180
  const hasLatLng = !!d.latLng;
181
181
  const hasBusinessName = !!d.businessName;
182
182
  const hasCategories = !!(d.categories && d.categories.length > 0);
183
- return addressComplete && hasLatLng && hasBusinessName && hasCategories;
183
+ const contactChannelsValid = !(formRef.value?.hasContactChannelsError?.() ?? false);
184
+ return addressComplete && hasLatLng && hasBusinessName && hasCategories && contactChannelsValid;
184
185
  });
185
186
  const endpointMap = {
186
187
  personal: "/personal/suggest-places",
@@ -46,6 +46,7 @@ type __VLS_ModelProps = {
46
46
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
47
47
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
48
48
  checkDuplicate: () => Promise<boolean>;
49
+ hasContactChannelsError: () => any;
49
50
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
50
51
  "update:modelValue": (value: SuggestPlaceData) => any;
51
52
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
@@ -81,6 +81,7 @@
81
81
  เพิ่มเบอร์โทรศัพท์
82
82
  </Button>
83
83
  <InputLink
84
+ ref="contactChannelsRef"
84
85
  name="contactChannels"
85
86
  format="contact_channel"
86
87
  default-first
@@ -165,6 +166,7 @@ const props = defineProps({
165
166
  });
166
167
  const api = useApi();
167
168
  const { $alert } = useNuxtApp();
169
+ const contactChannelsRef = ref(null);
168
170
  const _model = defineModel({ type: Object, ...{ default: () => ({}) } });
169
171
  const modelValue = reactive({
170
172
  address: {},
@@ -283,7 +285,8 @@ const checkDuplicate = async () => {
283
285
  }
284
286
  return false;
285
287
  };
286
- defineExpose({ checkDuplicate });
288
+ const hasContactChannelsError = () => contactChannelsRef.value?.hasError?.() ?? false;
289
+ defineExpose({ checkDuplicate, hasContactChannelsError });
287
290
  const categoryOptions = ref([]);
288
291
  onMounted(async () => {
289
292
  try {
@@ -46,6 +46,7 @@ type __VLS_ModelProps = {
46
46
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
47
47
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
48
48
  checkDuplicate: () => Promise<boolean>;
49
+ hasContactChannelsError: () => any;
49
50
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
50
51
  "update:modelValue": (value: SuggestPlaceData) => any;
51
52
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div id="google_translate_element" class="hidden" />
2
+ <div id="google_translate_element" class="hidden" />
3
3
  </template>
4
4
 
5
5
  <script setup>
@@ -50,9 +50,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
50
  required: boolean;
51
51
  options: AutocompleteOption[] | string[] | number[];
52
52
  description: string;
53
- limit: number;
54
53
  labelKey: string;
55
54
  placeholder: string;
55
+ limit: number;
56
56
  disabledErrorMessage: boolean;
57
57
  disabledBorder: boolean;
58
58
  showCounter: boolean;
@@ -50,9 +50,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
50
  required: boolean;
51
51
  options: AutocompleteOption[] | string[] | number[];
52
52
  description: string;
53
- limit: number;
54
53
  labelKey: string;
55
54
  placeholder: string;
55
+ limit: number;
56
56
  disabledErrorMessage: boolean;
57
57
  disabledBorder: boolean;
58
58
  showCounter: boolean;
@@ -55,8 +55,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
55
55
  }>, {
56
56
  pageSize: number;
57
57
  name: string;
58
- limit: number;
59
58
  labelKey: string;
59
+ limit: number;
60
60
  valueKey: string;
61
61
  multiple: boolean;
62
62
  placeholderSearch: string;
@@ -55,8 +55,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
55
55
  }>, {
56
56
  pageSize: number;
57
57
  name: string;
58
- limit: number;
59
58
  labelKey: string;
59
+ limit: number;
60
60
  valueKey: string;
61
61
  multiple: boolean;
62
62
  placeholderSearch: string;
@@ -5,7 +5,9 @@ type __VLS_Props = InputLinkProps & {
5
5
  showCounter?: boolean;
6
6
  limit?: number;
7
7
  };
8
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
9
+ hasError: () => boolean;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
11
  "update:modelValue": (value: InputLinkItem[] | ContactChannel[]) => any;
10
12
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
13
  "onUpdate:modelValue"?: ((value: InputLinkItem[] | ContactChannel[]) => any) | undefined;
@@ -214,4 +214,6 @@ const onChangeLink = (option, index) => {
214
214
  linkValue.value = linkValue.value.filter((_, i) => i !== index);
215
215
  }
216
216
  };
217
+ const hasError = () => linkValue.value.some((item) => rules(item.link ?? "", item.name) !== true);
218
+ defineExpose({ hasError });
217
219
  </script>
@@ -5,7 +5,9 @@ type __VLS_Props = InputLinkProps & {
5
5
  showCounter?: boolean;
6
6
  limit?: number;
7
7
  };
8
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
9
+ hasError: () => boolean;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
11
  "update:modelValue": (value: InputLinkItem[] | ContactChannel[]) => any;
10
12
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
13
  "onUpdate:modelValue"?: ((value: InputLinkItem[] | ContactChannel[]) => any) | undefined;
@@ -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>;
@@ -20,9 +20,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
20
20
  name: string;
21
21
  required: boolean;
22
22
  description: string;
23
- limit: number;
24
23
  labelKey: string;
25
24
  placeholder: string;
25
+ limit: number;
26
26
  disabledErrorMessage: boolean;
27
27
  disabledBorder: boolean;
28
28
  showCounter: boolean;
@@ -20,9 +20,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
20
20
  name: string;
21
21
  required: boolean;
22
22
  description: string;
23
- limit: number;
24
23
  labelKey: string;
25
24
  placeholder: string;
25
+ limit: number;
26
26
  disabledErrorMessage: boolean;
27
27
  disabledBorder: boolean;
28
28
  showCounter: boolean;
@@ -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,8 +46,8 @@ 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
- limit: number;
50
49
  rows: number;
50
+ limit: number;
51
51
  disabledErrorMessage: boolean;
52
52
  disabledBorder: boolean;
53
53
  showCounter: boolean;
@@ -46,8 +46,8 @@ 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
- limit: number;
50
49
  rows: number;
50
+ limit: number;
51
51
  disabledErrorMessage: boolean;
52
52
  disabledBorder: boolean;
53
53
  showCounter: boolean;
@@ -1,10 +1,18 @@
1
1
  <template>
2
2
  <ShadDialog v-model:open="isOpen">
3
- <ShadDialogContent :class="props.class" :disabled-close-btn="props.disabledCloseBtn"
4
- :no-padding="props.disablePadding" :disable-outside-pointer-events="false" v-slot="{ meta }" @submit="onSubmit"
5
- @close="onClose">
3
+ <ShadDialogContent
4
+ :class="props.class"
5
+ :disabled-close-btn="props.disabledCloseBtn"
6
+ :no-padding="props.disablePadding"
7
+ :disable-outside-pointer-events="false"
8
+ v-slot="{ meta }"
9
+ @submit="onSubmit"
10
+ @close="onClose"
11
+ >
6
12
  <Loading :loading="props.loading" :text="props.loadingText" />
7
- <ShadDialogHeader :class="props.disablePadding ? 'bg-background' : ''">
13
+ <ShadDialogHeader
14
+ :class="[props.disablePadding ? 'bg-background' : '', 'min-h-[58px]']"
15
+ >
8
16
  <slot name="header">
9
17
  <ShadDialogTitle>
10
18
  <slot name="title">
@@ -18,9 +26,12 @@
18
26
  </ShadDialogDescription>
19
27
  </slot>
20
28
  </ShadDialogHeader>
21
- <div :class="props.contentMaxHeight ? '-mx-6 px-6' : void 0" :style="
29
+ <div
30
+ :class="props.contentMaxHeight ? '-mx-6 px-6' : void 0"
31
+ :style="
22
32
  props.contentMaxHeight ? { maxHeight: `${props.contentMaxHeight}px`, overflowY: 'auto' } : void 0
23
- ">
33
+ "
34
+ >
24
35
  <slot name="default" :meta="meta" />
25
36
  </div>
26
37
  <ShadDialogFooter v-if="$slots.footer">
@@ -2,7 +2,7 @@ import type { VariantProps } from "class-variance-authority";
2
2
  export { default as Button } from "./Button.vue.js";
3
3
  export declare const buttonVariants: (props?: ({
4
4
  variant?: "link" | "text" | "default" | "outline" | "ghost" | "icon" | null | undefined;
5
- color?: "default" | "primary" | "secondary" | "destructive" | "info" | "warning" | null | undefined;
5
+ color?: "default" | "primary" | "secondary" | "destructive" | "info" | "warning" | "success" | null | undefined;
6
6
  size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-xs" | "icon-lg" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  export type ButtonVariants = VariantProps<typeof buttonVariants>;
@@ -18,7 +18,8 @@ export const buttonVariants = cva(
18
18
  secondary: "text-secondary ",
19
19
  destructive: "text-destructive",
20
20
  info: "text-info-foreground",
21
- warning: "text-warning"
21
+ warning: "text-warning",
22
+ success: "text-success"
22
23
  },
23
24
  size: {
24
25
  default: "h-9 px-4 py-2 has-[>svg]:px-3",
@@ -61,6 +62,11 @@ export const buttonVariants = cva(
61
62
  color: "warning",
62
63
  class: "bg-warning text-white hover:bg-warning/90"
63
64
  },
65
+ {
66
+ variant: "default",
67
+ color: "success",
68
+ class: "bg-success text-white hover:bg-success/90"
69
+ },
64
70
  {
65
71
  variant: "outline",
66
72
  color: "default",
@@ -91,6 +97,11 @@ export const buttonVariants = cva(
91
97
  color: "warning",
92
98
  class: "border border-warning text-warning hover:text-warning/90 bg-white"
93
99
  },
100
+ {
101
+ variant: "outline",
102
+ color: "success",
103
+ class: "border border-success text-success hover:text-success/90 bg-white"
104
+ },
94
105
  {
95
106
  variant: "ghost",
96
107
  color: "default",
@@ -121,6 +132,11 @@ export const buttonVariants = cva(
121
132
  color: "warning",
122
133
  class: "text-warning hover:bg-warning/90 hover:text-white"
123
134
  },
135
+ {
136
+ variant: "ghost",
137
+ color: "success",
138
+ class: "text-success hover:bg-success/90 hover:text-white"
139
+ },
124
140
  {
125
141
  variant: "icon",
126
142
  color: "default",
@@ -151,6 +167,11 @@ export const buttonVariants = cva(
151
167
  color: "warning",
152
168
  class: "text-warning hover:bg-warning/90 hover:text-white"
153
169
  },
170
+ {
171
+ variant: "icon",
172
+ color: "success",
173
+ class: "text-success hover:bg-success/90 hover:text-white"
174
+ },
154
175
  // text variant - just plain text with color, no background or hover effects
155
176
  {
156
177
  variant: "text",
@@ -182,6 +203,11 @@ export const buttonVariants = cva(
182
203
  color: "warning",
183
204
  class: "text-warning hover:opacity-80"
184
205
  },
206
+ {
207
+ variant: "text",
208
+ color: "success",
209
+ class: "text-success hover:opacity-80"
210
+ },
185
211
  // link variant - inline link style, primary blue by default, no padding
186
212
  {
187
213
  variant: "link",
@@ -212,6 +238,11 @@ export const buttonVariants = cva(
212
238
  variant: "link",
213
239
  color: "warning",
214
240
  class: "text-warning hover:opacity-80"
241
+ },
242
+ {
243
+ variant: "link",
244
+ color: "success",
245
+ class: "text-success hover:opacity-80"
215
246
  }
216
247
  ],
217
248
  defaultVariants: {
@@ -18,8 +18,8 @@ type __VLS_Slots = {} & {
18
18
  default?: (props: typeof __VLS_1) => any;
19
19
  };
20
20
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
21
- payload: Record<string, any>;
22
21
  config: ChartConfig;
22
+ payload: Record<string, any>;
23
23
  indicator: "line" | "dot" | "dashed";
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -18,8 +18,8 @@ type __VLS_Slots = {} & {
18
18
  default?: (props: typeof __VLS_1) => any;
19
19
  };
20
20
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
21
- payload: Record<string, any>;
22
21
  config: ChartConfig;
22
+ payload: Record<string, any>;
23
23
  indicator: "line" | "dot" | "dashed";
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -14,7 +14,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
14
14
  dir?: string | undefined | undefined;
15
15
  draggable?: (boolean | "true" | "false") | undefined;
16
16
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
17
- enterKeyHint?: "search" | "done" | "send" | "next" | "enter" | "go" | "previous" | undefined;
17
+ enterKeyHint?: "search" | "done" | "next" | "send" | "enter" | "go" | "previous" | undefined;
18
18
  hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
19
19
  id?: string | undefined | undefined;
20
20
  inert?: (boolean | "true" | "false") | undefined;
@@ -208,7 +208,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
208
208
  dir?: string | undefined | undefined;
209
209
  draggable?: (boolean | "true" | "false") | undefined;
210
210
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
211
- enterKeyHint?: "search" | "done" | "send" | "next" | "enter" | "go" | "previous" | undefined;
211
+ enterKeyHint?: "search" | "done" | "next" | "send" | "enter" | "go" | "previous" | undefined;
212
212
  hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
213
213
  id?: string | undefined | undefined;
214
214
  inert?: (boolean | "true" | "false") | undefined;
@@ -14,7 +14,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
14
14
  dir?: string | undefined | undefined;
15
15
  draggable?: (boolean | "true" | "false") | undefined;
16
16
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
17
- enterKeyHint?: "search" | "done" | "send" | "next" | "enter" | "go" | "previous" | undefined;
17
+ enterKeyHint?: "search" | "done" | "next" | "send" | "enter" | "go" | "previous" | undefined;
18
18
  hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
19
19
  id?: string | undefined | undefined;
20
20
  inert?: (boolean | "true" | "false") | undefined;
@@ -208,7 +208,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
208
208
  dir?: string | undefined | undefined;
209
209
  draggable?: (boolean | "true" | "false") | undefined;
210
210
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
211
- enterKeyHint?: "search" | "done" | "send" | "next" | "enter" | "go" | "previous" | undefined;
211
+ enterKeyHint?: "search" | "done" | "next" | "send" | "enter" | "go" | "previous" | undefined;
212
212
  hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
213
213
  id?: string | undefined | undefined;
214
214
  inert?: (boolean | "true" | "false") | undefined;
@@ -16,7 +16,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
16
16
  dir?: string | undefined | undefined;
17
17
  draggable?: (boolean | "true" | "false") | undefined;
18
18
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
19
- enterKeyHint?: "search" | "done" | "send" | "next" | "enter" | "go" | "previous" | undefined;
19
+ enterKeyHint?: "search" | "done" | "next" | "send" | "enter" | "go" | "previous" | undefined;
20
20
  hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
21
21
  id?: string | undefined | undefined;
22
22
  inert?: (boolean | "true" | "false") | undefined;
@@ -212,7 +212,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
212
212
  dir?: string | undefined | undefined;
213
213
  draggable?: (boolean | "true" | "false") | undefined;
214
214
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
215
- enterKeyHint?: "search" | "done" | "send" | "next" | "enter" | "go" | "previous" | undefined;
215
+ enterKeyHint?: "search" | "done" | "next" | "send" | "enter" | "go" | "previous" | undefined;
216
216
  hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
217
217
  id?: string | undefined | undefined;
218
218
  inert?: (boolean | "true" | "false") | undefined;
@@ -16,7 +16,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
16
16
  dir?: string | undefined | undefined;
17
17
  draggable?: (boolean | "true" | "false") | undefined;
18
18
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
19
- enterKeyHint?: "search" | "done" | "send" | "next" | "enter" | "go" | "previous" | undefined;
19
+ enterKeyHint?: "search" | "done" | "next" | "send" | "enter" | "go" | "previous" | undefined;
20
20
  hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
21
21
  id?: string | undefined | undefined;
22
22
  inert?: (boolean | "true" | "false") | undefined;
@@ -212,7 +212,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
212
212
  dir?: string | undefined | undefined;
213
213
  draggable?: (boolean | "true" | "false") | undefined;
214
214
  enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
215
- enterKeyHint?: "search" | "done" | "send" | "next" | "enter" | "go" | "previous" | undefined;
215
+ enterKeyHint?: "search" | "done" | "next" | "send" | "enter" | "go" | "previous" | undefined;
216
216
  hidden?: "" | (boolean | "true" | "false") | "hidden" | "until-found" | undefined;
217
217
  id?: string | undefined | undefined;
218
218
  inert?: (boolean | "true" | "false") | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.364.0",
3
+ "version": "1.366.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",