pukaad-ui-lib 1.410.0 → 1.412.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.410.0",
4
+ "version": "1.412.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -20,11 +20,22 @@
20
20
  @click="handleClickCard(item)"
21
21
  >
22
22
  <Image
23
+ v-if="item.image"
23
24
  :src="item.image"
24
25
  width="100"
25
26
  height="56"
26
27
  class="rounded-[4px]"
27
28
  />
29
+ <div
30
+ v-else
31
+ class="w-[100px] h-[56px] bg-cloud flex items-center justify-center rounded-[4px]"
32
+ >
33
+ <Icon
34
+ name="pukaad:map-location-dot"
35
+ size="24"
36
+ class="text-gray shrink-0"
37
+ />
38
+ </div>
28
39
  <div class="flex flex-col gap-[4px]">
29
40
  <div class="font-body-large w-[232px] truncate">
30
41
  {{ item.title }}
@@ -0,0 +1,17 @@
1
+ import type { CardContentItem } from "#pukaad-ui/types/components/card/card-content";
2
+ type __VLS_Props = {
3
+ title?: string;
4
+ items?: CardContentItem[];
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ "item-click": (item: CardContentItem) => any;
8
+ "view-all": () => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ "onItem-click"?: ((item: CardContentItem) => any) | undefined;
11
+ "onView-all"?: (() => any) | undefined;
12
+ }>, {
13
+ title: string;
14
+ items: CardContentItem[];
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <div v-if="visibleItems.length > 0" class="flex w-full flex-col gap-[8px]">
3
+ <div class="flex w-full items-center justify-between">
4
+ <div class="font-title-medium text-black">{{ title }}</div>
5
+ <Button variant="text" @click="emit('view-all')"
6
+ >ดูทั้งหมด
7
+ <Icon name="lucide:chevron-right" size="16" />
8
+ </Button>
9
+ </div>
10
+
11
+ <div class="grid grid-cols-4 gap-[12px]">
12
+ <CardContent
13
+ v-for="item in visibleItems"
14
+ :key="item.id"
15
+ :item="item"
16
+ @click="emit('item-click', item)"
17
+ />
18
+ </div>
19
+ </div>
20
+ </template>
21
+
22
+ <script setup>
23
+ import { computed } from "vue";
24
+ const props = defineProps({
25
+ title: { type: String, required: false, default: "\u0E2A\u0E1B\u0E2D\u0E15\u0E44\u0E25\u0E15\u0E4C" },
26
+ items: { type: Array, required: false, default: () => [] }
27
+ });
28
+ const emit = defineEmits(["item-click", "view-all"]);
29
+ const visibleItems = computed(() => props.items.slice(0, 4));
30
+ </script>
@@ -0,0 +1,17 @@
1
+ import type { CardContentItem } from "#pukaad-ui/types/components/card/card-content";
2
+ type __VLS_Props = {
3
+ title?: string;
4
+ items?: CardContentItem[];
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ "item-click": (item: CardContentItem) => any;
8
+ "view-all": () => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ "onItem-click"?: ((item: CardContentItem) => any) | undefined;
11
+ "onView-all"?: (() => any) | undefined;
12
+ }>, {
13
+ title: string;
14
+ items: CardContentItem[];
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.410.0",
3
+ "version": "1.412.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",