pukaad-ui-lib 1.227.1 → 1.227.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.227.1",
4
+ "version": "1.227.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -57,13 +57,7 @@ const module$1 = defineNuxtModule({
57
57
  },
58
58
  format: ["webp"]
59
59
  });
60
- await installModule("nuxt-google-translate", {
61
- defaultLanguage: "th",
62
- supportedLanguages: ["en", "th"]
63
- });
64
60
  await installModule("nuxt-rating");
65
- await installModule("@pinia/nuxt");
66
- await installModule("pinia-plugin-persistedstate/nuxt");
67
61
  await installModule("shadcn-nuxt", {
68
62
  prefix: "shad",
69
63
  componentDir: resolver.resolve("./runtime/components/ui")
@@ -1,6 +1,5 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
- import { UserIcon } from "lucide-vue-next";
4
3
  import { cn } from "@/runtime/plugins/shadcn";
5
4
  const props = defineProps({
6
5
  size: { type: [Number, String], required: false, default: 40 },
@@ -2,11 +2,13 @@ type __VLS_Props = {
2
2
  photos?: string[];
3
3
  videos?: string[];
4
4
  variant?: "featured" | "album";
5
+ state?: "personal" | "office" | "business";
5
6
  title?: string;
6
7
  };
7
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
9
  title: string;
9
10
  variant: "featured" | "album";
11
+ state: "personal" | "office" | "business";
10
12
  photos: string[];
11
13
  videos: string[];
12
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <!-- Featured variant -->
3
- <div v-if="variant === 'featured'" class="flex gap-[8px] h-[360px]">
2
+ <!-- Personal state → Featured layout -->
3
+ <div v-if="layoutMode === 'featured'" class="flex gap-[8px] h-[360px]">
4
4
  <div v-if="photos[0]" class="w-[620px] shrink-0 rounded-[8px] overflow-hidden cursor-pointer"
5
5
  @click="openLightbox('photo', 0)">
6
6
  <Image :src="photos[0]" class="w-full h-full object-cover" width="auto" height="auto" />
@@ -11,16 +11,23 @@
11
11
  </div>
12
12
 
13
13
  <div class="w-[306px] shrink-0 flex flex-col gap-[8px]">
14
+ <!-- photos[2] — top-right slot
15
+ มีวิดีโอ: overlay ถ้า photos.length > 3 (photos[3+] ถูกซ่อน)
16
+ ไม่มีวิดีโอ: โชว์สะอาดเสมอ (photos[3] ไปโชว์ที่ slot ล่าง) -->
14
17
  <div v-if="photos[2]" class="flex-1 min-h-0 relative rounded-[8px] overflow-hidden cursor-pointer"
15
18
  @click="openLightbox('photo', 2)">
16
19
  <Image :src="photos[2]" class="w-full h-full object-cover" width="auto" height="auto" />
17
- <div v-if="photos.length > 3"
20
+ <div v-if="featuredPhoto2Overflow > 0"
18
21
  class="absolute inset-0 bg-black/50 flex flex-col items-center justify-center text-white gap-[6px]">
19
22
  <Icon name="fa6-solid:image" :size="42" />
20
- <span class="font-body-large">รูปภาพ ({{ convertNumber(photos.length - 3) }})</span>
23
+ <span class="font-body-large">รูปภาพ ({{ convertNumber(featuredPhoto2Overflow) }})</span>
21
24
  </div>
22
25
  </div>
23
26
 
27
+ <!-- bottom-right slot
28
+ มีวิดีโอ : videos[0] thumbnail + overlay วิดีโอ
29
+ ไม่มีวิดีโอ : photos[3] — overlay "รูปภาพ (N)" เมื่อ photos.length > 4
30
+ (N = photos.length - 3 นับรวม photos[3] ด้วย) -->
24
31
  <div v-if="videos[0]" class="flex-1 min-h-0 relative rounded-[8px] overflow-hidden cursor-pointer"
25
32
  @click="openLightbox('video', 0)">
26
33
  <Image :src="videos[0]" class="w-full h-full object-cover" width="auto" height="auto" />
@@ -29,11 +36,20 @@
29
36
  <span class="font-body-large">วิดีโอ ({{ videos.length }})</span>
30
37
  </div>
31
38
  </div>
39
+ <div v-else-if="photos[3]" class="flex-1 min-h-0 relative rounded-[8px] overflow-hidden cursor-pointer"
40
+ @click="openLightbox('photo', 3)">
41
+ <Image :src="photos[3]" class="w-full h-full object-cover" width="auto" height="auto" />
42
+ <div v-if="featuredPhoto3Overflow > 0"
43
+ class="absolute inset-0 bg-black/50 flex flex-col items-center justify-center text-white gap-[6px]">
44
+ <Icon name="fa6-solid:image" :size="42" />
45
+ <span class="font-body-large">รูปภาพ ({{ convertNumber(featuredPhoto3Overflow) }})</span>
46
+ </div>
47
+ </div>
32
48
  </div>
33
49
  </div>
34
50
 
35
- <!-- Album variant -->
36
- <div v-else-if="variant === 'album'" class="grid grid-cols-5 gap-[10px] w-[700px]">
51
+ <!-- Office / Business state → Album layout -->
52
+ <div v-else-if="layoutMode === 'album'" class="grid grid-cols-5 gap-[10px]">
37
53
  <!-- Row 1: photos[0..3] -->
38
54
  <div v-for="(photo, i) in galleryRow1" :key="`g1-${i}`"
39
55
  class="w-[132px] h-[132px] rounded-[8px] overflow-hidden cursor-pointer" @click="openLightbox('photo', i)">
@@ -81,10 +97,26 @@ const props = defineProps({
81
97
  photos: { type: Array, required: false, default: () => [] },
82
98
  videos: { type: Array, required: false, default: () => [] },
83
99
  variant: { type: String, required: false, default: "featured" },
100
+ state: { type: String, required: false, default: "personal" },
84
101
  title: { type: String, required: false, default: "" }
85
102
  });
103
+ const layoutMode = computed(() => {
104
+ if (props.state === "office" || props.state === "business") return "album";
105
+ if (props.state === "personal") return "featured";
106
+ return props.variant;
107
+ });
86
108
  const photos = computed(() => props.photos.filter(Boolean));
87
109
  const videos = computed(() => props.videos.filter(Boolean));
110
+ const featuredPhoto2Overflow = computed(() => {
111
+ if (videos.value.length === 0) return 0;
112
+ if (photos.value.length <= 3) return 0;
113
+ return photos.value.length - 2;
114
+ });
115
+ const featuredPhoto3Overflow = computed(() => {
116
+ if (videos.value.length > 0) return 0;
117
+ if (photos.value.length <= 4) return 0;
118
+ return photos.value.length - 3;
119
+ });
88
120
  const galleryRow1 = computed(() => photos.value.slice(0, 4));
89
121
  const galleryRow2 = computed(() => photos.value.slice(4, 8));
90
122
  const galleryCountPhoto = computed(
@@ -2,11 +2,13 @@ type __VLS_Props = {
2
2
  photos?: string[];
3
3
  videos?: string[];
4
4
  variant?: "featured" | "album";
5
+ state?: "personal" | "office" | "business";
5
6
  title?: string;
6
7
  };
7
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
9
  title: string;
9
10
  variant: "featured" | "album";
11
+ state: "personal" | "office" | "business";
10
12
  photos: string[];
11
13
  videos: string[];
12
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -64,15 +64,15 @@ 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
+ background: boolean;
68
+ modal: boolean;
67
69
  responsive: boolean;
68
70
  restore: boolean;
69
71
  checkCrossOrigin: boolean;
70
72
  checkOrientation: boolean;
71
73
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
74
  guides: boolean;
74
75
  highlight: boolean;
75
- background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -64,15 +64,15 @@ 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
+ background: boolean;
68
+ modal: boolean;
67
69
  responsive: boolean;
68
70
  restore: boolean;
69
71
  checkCrossOrigin: boolean;
70
72
  checkOrientation: boolean;
71
73
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
74
  guides: boolean;
74
75
  highlight: boolean;
75
- background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  }>, {
23
23
  id: string;
24
24
  name: string;
25
- disabledForgotPassword: boolean;
26
25
  new: boolean;
26
+ disabledForgotPassword: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  }>, {
23
23
  id: string;
24
24
  name: string;
25
- disabledForgotPassword: boolean;
26
25
  new: boolean;
26
+ disabledForgotPassword: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -13,8 +13,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
13
13
  color: InputSliderColor;
14
14
  fullWidth: boolean;
15
15
  step: number;
16
- max: number;
17
16
  min: number;
17
+ max: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -13,8 +13,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
13
13
  color: InputSliderColor;
14
14
  fullWidth: boolean;
15
15
  step: number;
16
- max: number;
17
16
  min: number;
17
+ max: number;
18
18
  lineHeight: number | string;
19
19
  appearance: boolean;
20
20
  thumbSize: number | string;
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
24
24
  }) => any) | undefined;
25
25
  }>, {
26
26
  title: string;
27
- confirmText: string;
28
27
  disabledForgotPassword: boolean;
28
+ confirmText: string;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
24
24
  }) => any) | undefined;
25
25
  }>, {
26
26
  title: string;
27
- confirmText: string;
28
27
  disabledForgotPassword: boolean;
28
+ confirmText: string;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
28
28
  }>, {
29
29
  title: string;
30
30
  mode: "login" | "secure";
31
- confirmText: string;
32
31
  disabledForgotPassword: boolean;
32
+ confirmText: string;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
34
  declare const _default: typeof __VLS_export;
35
35
  export default _default;
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
28
28
  }>, {
29
29
  title: string;
30
30
  mode: "login" | "secure";
31
- confirmText: string;
32
31
  disabledForgotPassword: boolean;
32
+ confirmText: string;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
34
  declare const _default: typeof __VLS_export;
35
35
  export default _default;
@@ -1,5 +1,4 @@
1
1
  <script setup>
2
- import { DotsHorizontalIcon } from "@radix-icons/vue";
3
2
  import { cn } from "@/runtime/plugins/shadcn";
4
3
  const props = defineProps({
5
4
  class: { type: null, required: false }
@@ -14,7 +13,7 @@ const props = defineProps({
14
13
  :class="cn('flex size-9 items-center justify-center', props.class)"
15
14
  >
16
15
  <slot>
17
- <DotsHorizontalIcon class="size-4" />
16
+ <Icon name="lucide:ellipsis" class="size-4" />
18
17
  </slot>
19
18
  <span class="sr-only">More</span>
20
19
  </span>
@@ -1,5 +1,4 @@
1
1
  <script setup>
2
- import { ChevronRightIcon } from "@radix-icons/vue";
3
2
  import { cn } from "@/runtime/plugins/shadcn";
4
3
  const props = defineProps({
5
4
  class: { type: null, required: false }
@@ -14,7 +13,7 @@ const props = defineProps({
14
13
  :class="cn('[&>svg]:size-3.5', props.class)"
15
14
  >
16
15
  <slot>
17
- <ChevronRightIcon />
16
+ <Icon name="lucide:chevron-right" />
18
17
  </slot>
19
18
  </li>
20
19
  </template>
@@ -1,6 +1,5 @@
1
1
  <script setup>
2
2
  import { reactiveOmit, useVModel } from "@vueuse/core";
3
- import { ChevronDownIcon } from "lucide-vue-next";
4
3
  import { cn } from "@/runtime/plugins/shadcn";
5
4
  defineOptions({
6
5
  inheritAttrs: false
@@ -35,7 +34,8 @@ const delegatedProps = reactiveOmit(props, "class");
35
34
  >
36
35
  <slot />
37
36
  </select>
38
- <ChevronDownIcon
37
+ <Icon
38
+ name="lucide:chevron-down"
39
39
  class="text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none"
40
40
  aria-hidden="true"
41
41
  data-slot="native-select-icon"
@@ -1,5 +1,4 @@
1
1
  <script setup>
2
- import { Loader2Icon } from "lucide-vue-next";
3
2
  import { cn } from "@/runtime/plugins/shadcn";
4
3
  const props = defineProps({
5
4
  class: { type: null, required: false }
@@ -7,7 +6,8 @@ const props = defineProps({
7
6
  </script>
8
7
 
9
8
  <template>
10
- <Loader2Icon
9
+ <Icon
10
+ name="lucide:loader-2"
11
11
  role="status"
12
12
  aria-label="Loading"
13
13
  :class="cn('size-4 animate-spin', props.class)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.227.1",
3
+ "version": "1.227.3",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,57 +34,41 @@
34
34
  "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
35
35
  },
36
36
  "dependencies": {
37
- "@cropper/element-canvas": "^2.0.0",
37
+ "@nuxt/fonts": "^0.13.0",
38
38
  "@nuxt/icon": "^1.10.3",
39
39
  "@nuxt/image": "^1.9.0",
40
- "@pinia/nuxt": "^0.11.1",
40
+ "@nuxt/kit": "^4.0.0",
41
41
  "@tailwindcss/vite": "4.0.7",
42
42
  "@tanstack/vue-table": "^8.21.3",
43
43
  "@vee-validate/nuxt": "^4.15.0",
44
- "@vee-validate/yup": "^4.15.0",
45
- "@vee-validate/zod": "^4.15.1",
46
- "@vueup/vue-quill": "^1.2.0",
47
44
  "@vueuse/core": "^14.2.1",
48
45
  "@vueuse/nuxt": "^12.7.0",
49
- "changelogen": "^0.5.7",
50
46
  "class-variance-authority": "^0.7.1",
51
47
  "clsx": "^2.1.1",
52
48
  "cropperjs": "^1.6.2",
53
49
  "dayjs": "^1.11.13",
54
50
  "embla-carousel-vue": "^8.6.0",
55
- "input-otp": "^1.4.2",
56
51
  "leaflet": "^1.9.4",
57
- "lodash": "^4.17.21",
58
- "nuxt": "^4.0.3",
59
- "nuxt-google-translate": "^1.2.0",
60
52
  "nuxt-rating": "^0.1.6",
61
- "pinia": "^3.0.3",
62
- "pinia-plugin-persistedstate": "^4.4.1",
63
53
  "quill": "^2.0.3",
64
- "quill-delta-to-html": "^0.12.1",
65
54
  "reka-ui": "^2.8.2",
66
55
  "shadcn-nuxt": "^2.3.3",
67
- "shadcn-vue": "^2.3.2",
68
56
  "tailwind-merge": "^3.4.0",
69
57
  "tailwind-variants": "^3.1.1",
70
58
  "tailwindcss": "4.0.7",
71
- "tailwindcss-animate": "^1.0.7",
72
59
  "tw-animate-css": "^1.4.0",
73
- "typescript": "^5.9.3",
74
60
  "vee-validate": "^4.15.1",
75
- "vitest": "^3.0.4",
76
- "vue-cropperjs": "^5.0.0",
77
- "vue-sfc-transformer": "^0.1.17",
78
- "vue-tsc": "^3.1.3",
79
- "vue3-recaptcha-v2": "^2.1.0",
80
- "zod": "^3.25.76"
61
+ "vue3-recaptcha-v2": "^2.1.0"
62
+ },
63
+ "peerDependencies": {
64
+ "nuxt": "^3.15.0 || ^4.0.0",
65
+ "vue": "^3.5.0"
81
66
  },
82
67
  "devDependencies": {
68
+ "@cropper/element-canvas": "^2.0.0",
83
69
  "@iconify-json/lucide": "^1.2.72",
84
70
  "@nuxt/devtools": "^1.7.0",
85
71
  "@nuxt/eslint-config": "^0.7.5",
86
- "@nuxt/fonts": "^0.13.0",
87
- "@nuxt/kit": "^4.0.0",
88
72
  "@nuxt/module-builder": "^1.0.1",
89
73
  "@nuxt/schema": "^4.0.0",
90
74
  "@nuxt/test-utils": "^3.15.4",
@@ -93,6 +77,21 @@
93
77
  "@types/leaflet": "^1.9.21",
94
78
  "@types/node": "^24.9.1",
95
79
  "@types/vue-cropperjs": "^4.1.6",
96
- "@vue/compiler-sfc": "^3.5.24"
80
+ "@vue/compiler-sfc": "^3.5.24",
81
+ "changelogen": "^0.5.7",
82
+ "input-otp": "^1.4.2",
83
+ "lodash": "^4.17.21",
84
+ "nuxt": "^4.0.3",
85
+ "pinia": "^3.0.3",
86
+ "pinia-plugin-persistedstate": "^4.4.1",
87
+ "quill-delta-to-html": "^0.12.1",
88
+ "shadcn-vue": "^2.3.2",
89
+ "tailwindcss-animate": "^1.0.7",
90
+ "typescript": "^5.9.3",
91
+ "vitest": "^3.0.4",
92
+ "vue-cropperjs": "^5.0.0",
93
+ "vue-sfc-transformer": "^0.1.17",
94
+ "vue-tsc": "^3.1.3",
95
+ "zod": "^3.25.76"
97
96
  }
98
- }
97
+ }