pukaad-ui-lib 1.386.0 → 1.389.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.386.0",
4
+ "version": "1.389.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -2,7 +2,6 @@ import type { CardContentMenuState } from "#pukaad-ui/types/components/card/card
2
2
  type __VLS_Props = {
3
3
  state?: CardContentMenuState;
4
4
  isPinned?: boolean;
5
- isLiked?: boolean;
6
5
  isBookmarked?: boolean;
7
6
  isShow?: boolean;
8
7
  };
@@ -12,7 +11,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
12
11
  onAction?: ((name: string) => any) | undefined;
13
12
  }>, {
14
13
  isPinned: boolean;
15
- isLiked: boolean;
16
14
  isBookmarked: boolean;
17
15
  isShow: boolean;
18
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -19,7 +19,6 @@ import { computed } from "vue";
19
19
  const props = defineProps({
20
20
  state: { type: String, required: false },
21
21
  isPinned: { type: Boolean, required: false, default: false },
22
- isLiked: { type: Boolean, required: false, default: false },
23
22
  isBookmarked: { type: Boolean, required: false, default: false },
24
23
  isShow: { type: Boolean, required: false, default: false }
25
24
  });
@@ -39,8 +38,11 @@ const actions = computed(() => {
39
38
  }
40
39
  if (props.state === "content") {
41
40
  return [
42
- { name: "like", icon: "lucide:heart", isActive: props.isLiked },
43
- { name: "bookmark", icon: "lucide:bookmark", isActive: props.isBookmarked },
41
+ {
42
+ name: "bookmark",
43
+ icon: "lucide:bookmark",
44
+ isActive: props.isBookmarked
45
+ },
44
46
  { name: "preview", icon: "lucide:tv-minimal-play" }
45
47
  ];
46
48
  }
@@ -2,7 +2,6 @@ import type { CardContentMenuState } from "#pukaad-ui/types/components/card/card
2
2
  type __VLS_Props = {
3
3
  state?: CardContentMenuState;
4
4
  isPinned?: boolean;
5
- isLiked?: boolean;
6
5
  isBookmarked?: boolean;
7
6
  isShow?: boolean;
8
7
  };
@@ -12,7 +11,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
12
11
  onAction?: ((name: string) => any) | undefined;
13
12
  }>, {
14
13
  isPinned: boolean;
15
- isLiked: boolean;
16
14
  isBookmarked: boolean;
17
15
  isShow: boolean;
18
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -16,6 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
16
16
  onAction?: ((name: string, item: CardContentItem) => any) | undefined;
17
17
  }>, {
18
18
  selectable: boolean;
19
+ disabledNavigate: boolean;
19
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
21
  declare const _default: typeof __VLS_export;
21
22
  export default _default;
@@ -7,7 +7,8 @@
7
7
  -->
8
8
  <div
9
9
  :class="[
10
- 'relative h-[345px] w-[194px] cursor-pointer overflow-hidden rounded-[4px] bg-white outline outline-offset-0',
10
+ 'relative h-[345px] w-[194px] overflow-hidden rounded-[4px] bg-white outline outline-offset-0',
11
+ props.disabledNavigate && !props.selectable ? 'cursor-default' : 'cursor-pointer',
11
12
  props.selectable || selected ? 'outline-2 outline-gray' : 'outline-1 outline-silver'
12
13
  ]"
13
14
  @mouseenter="hovering = true"
@@ -24,7 +25,6 @@
24
25
  <CardContentMenu
25
26
  :state="props.state"
26
27
  :is-pinned="!!props.item.pinned"
27
- :is-liked="!!props.item.liked"
28
28
  :is-bookmarked="!!props.item.bookmarked"
29
29
  :is-show="hovering"
30
30
  @action="onMenuAction"
@@ -42,24 +42,32 @@
42
42
 
43
43
  <script setup>
44
44
  import { computed, ref } from "vue";
45
+ import { useRouter } from "vue-router";
45
46
  import CardContentPostIt from "./card-content-post-it.vue";
46
47
  import CardContentImage from "./card-content-image.vue";
47
48
  import CardContentVideo from "./card-content-video.vue";
48
49
  import CardContentTime from "./card-content-time.vue";
49
50
  import CardContentMenu from "./card-content-menu.vue";
50
51
  import CardContentSelect from "./card-content-select.vue";
52
+ const router = useRouter();
51
53
  const props = defineProps({
52
54
  item: { type: Object, required: true },
53
55
  state: { type: String, required: false },
54
- selectable: { type: Boolean, required: false, default: false }
56
+ selectable: { type: Boolean, required: false, default: false },
57
+ disabledNavigate: { type: Boolean, required: false, default: false }
55
58
  });
56
59
  const emit = defineEmits(["click", "action"]);
57
60
  const selected = defineModel("selected", { type: Boolean, ...{ default: false } });
58
61
  const handleClick = () => {
59
62
  if (props.selectable) {
60
63
  selected.value = !selected.value;
64
+ emit("click", props.item);
65
+ return;
61
66
  }
62
67
  emit("click", props.item);
68
+ if (!props.disabledNavigate && props.item?.id) {
69
+ router.push(`/content/${props.item.id}`);
70
+ }
63
71
  };
64
72
  const hovering = ref(false);
65
73
  const BODY = {
@@ -16,6 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
16
16
  onAction?: ((name: string, item: CardContentItem) => any) | undefined;
17
17
  }>, {
18
18
  selectable: boolean;
19
+ disabledNavigate: boolean;
19
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
21
  declare const _default: typeof __VLS_export;
21
22
  export default _default;
@@ -118,7 +118,7 @@
118
118
  <CardContent
119
119
  v-if="previewItem"
120
120
  :item="previewItem"
121
- class="cursor-default"
121
+ disabled-navigate
122
122
  />
123
123
  <div
124
124
  v-else
@@ -49,9 +49,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
49
49
  name: string;
50
50
  required: boolean;
51
51
  description: string;
52
- options: AutocompleteOption[] | string[] | number[];
53
52
  labelKey: string;
54
53
  placeholder: string;
54
+ options: AutocompleteOption[] | string[] | number[];
55
55
  limit: number;
56
56
  disabledErrorMessage: boolean;
57
57
  disabledBorder: boolean;
@@ -49,9 +49,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
49
49
  name: string;
50
50
  required: boolean;
51
51
  description: string;
52
- options: AutocompleteOption[] | string[] | number[];
53
52
  labelKey: string;
54
53
  placeholder: string;
54
+ options: AutocompleteOption[] | string[] | number[];
55
55
  limit: number;
56
56
  disabledErrorMessage: boolean;
57
57
  disabledBorder: boolean;
@@ -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
- options: InputSelectItem[];
15
14
  placeholder: string;
15
+ options: InputSelectItem[];
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
- options: InputSelectItem[];
15
14
  placeholder: string;
15
+ options: InputSelectItem[];
16
16
  limit: number;
17
17
  showCounter: boolean;
18
18
  addLabel: string;
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
25
25
  "onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
26
26
  }>, {
27
27
  name: string;
28
- state: "user" | "admin";
29
28
  placeholder: string;
29
+ state: "user" | "admin";
30
30
  limit: number;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
25
25
  "onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
26
26
  }>, {
27
27
  name: string;
28
- state: "user" | "admin";
29
28
  placeholder: string;
29
+ state: "user" | "admin";
30
30
  limit: number;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.386.0",
3
+ "version": "1.389.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",