pukaad-ui-lib 1.417.0 → 1.418.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 +1 -1
- package/dist/runtime/components/card/card-content/card-content-menu.d.vue.ts +4 -1
- package/dist/runtime/components/card/card-content/card-content-menu.vue +39 -13
- package/dist/runtime/components/card/card-content/card-content-menu.vue.d.ts +4 -1
- package/dist/runtime/components/card/card-content/card-content.vue +5 -6
- package/dist/runtime/components/image/image-cropper.d.vue.ts +2 -2
- package/dist/runtime/components/image/image-cropper.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { CardContentMenuState } from "#pukaad-ui/types/components/card/card-content";
|
|
1
|
+
import type { CardContentMenuState, CardContentItem } from "#pukaad-ui/types/components/card/card-content";
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
item?: CardContentItem;
|
|
3
4
|
state?: CardContentMenuState;
|
|
4
5
|
isPinned?: boolean;
|
|
6
|
+
isHidden?: boolean;
|
|
5
7
|
isBookmarked?: boolean;
|
|
6
8
|
isShow?: boolean;
|
|
7
9
|
hidePin?: boolean;
|
|
@@ -14,6 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
14
16
|
onAction?: ((name: string) => any) | undefined;
|
|
15
17
|
}>, {
|
|
16
18
|
isPinned: boolean;
|
|
19
|
+
isHidden: boolean;
|
|
17
20
|
isBookmarked: boolean;
|
|
18
21
|
isShow: boolean;
|
|
19
22
|
hidePin: boolean;
|
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
<script setup>
|
|
19
19
|
import { computed } from "vue";
|
|
20
20
|
const props = defineProps({
|
|
21
|
+
item: { type: Object, required: false },
|
|
21
22
|
state: { type: String, required: false },
|
|
22
23
|
isPinned: { type: Boolean, required: false, default: false },
|
|
24
|
+
isHidden: { type: Boolean, required: false, default: false },
|
|
23
25
|
isBookmarked: { type: Boolean, required: false, default: false },
|
|
24
26
|
isShow: { type: Boolean, required: false, default: false },
|
|
25
27
|
hidePin: { type: Boolean, required: false, default: false },
|
|
@@ -31,23 +33,47 @@ const onActionClick = (action) => {
|
|
|
31
33
|
if (action.clickable === false) return;
|
|
32
34
|
emit("action", action.name);
|
|
33
35
|
};
|
|
36
|
+
const isPinned = computed(() => props.item?.pinned ?? props.isPinned);
|
|
37
|
+
const isHidden = computed(() => props.item?.hidden ?? props.isHidden);
|
|
38
|
+
const isBookmarked = computed(() => props.item?.bookmarked ?? props.isBookmarked);
|
|
34
39
|
const actions = computed(() => {
|
|
35
40
|
if (props.state === "my-content") {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
const result = [];
|
|
42
|
+
if (!props.hidePin && !isHidden.value) {
|
|
43
|
+
result.push({
|
|
44
|
+
name: "pin",
|
|
45
|
+
icon: "lucide:pin",
|
|
46
|
+
isActive: isPinned.value
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (!isPinned.value) {
|
|
50
|
+
result.push({
|
|
51
|
+
name: "hide",
|
|
52
|
+
icon: isHidden.value ? "lucide:eye-off" : "lucide:eye",
|
|
53
|
+
isActive: isHidden.value
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (!props.hidePreview) {
|
|
57
|
+
result.push({
|
|
58
|
+
name: "preview",
|
|
59
|
+
icon: "lucide:tv-minimal-play"
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
result.push({
|
|
63
|
+
name: "renew",
|
|
64
|
+
icon: "lucide:history"
|
|
65
|
+
});
|
|
66
|
+
result.push({
|
|
67
|
+
name: "delete",
|
|
68
|
+
icon: "lucide:trash-2",
|
|
69
|
+
variant: "default",
|
|
70
|
+
color: "destructive"
|
|
71
|
+
});
|
|
72
|
+
return result;
|
|
47
73
|
}
|
|
48
74
|
if (props.state === "content") {
|
|
49
75
|
const result = [];
|
|
50
|
-
if (
|
|
76
|
+
if (isPinned.value) {
|
|
51
77
|
result.push({
|
|
52
78
|
name: "pin",
|
|
53
79
|
icon: "lucide:pin",
|
|
@@ -59,7 +85,7 @@ const actions = computed(() => {
|
|
|
59
85
|
result.push({
|
|
60
86
|
name: "bookmark",
|
|
61
87
|
icon: "lucide:bookmark",
|
|
62
|
-
isActive:
|
|
88
|
+
isActive: isBookmarked.value
|
|
63
89
|
});
|
|
64
90
|
}
|
|
65
91
|
if (!props.hideBookmark && !props.hidePreview) {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { CardContentMenuState } from "#pukaad-ui/types/components/card/card-content";
|
|
1
|
+
import type { CardContentMenuState, CardContentItem } from "#pukaad-ui/types/components/card/card-content";
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
item?: CardContentItem;
|
|
3
4
|
state?: CardContentMenuState;
|
|
4
5
|
isPinned?: boolean;
|
|
6
|
+
isHidden?: boolean;
|
|
5
7
|
isBookmarked?: boolean;
|
|
6
8
|
isShow?: boolean;
|
|
7
9
|
hidePin?: boolean;
|
|
@@ -14,6 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
14
16
|
onAction?: ((name: string) => any) | undefined;
|
|
15
17
|
}>, {
|
|
16
18
|
isPinned: boolean;
|
|
19
|
+
isHidden: boolean;
|
|
17
20
|
isBookmarked: boolean;
|
|
18
21
|
isShow: boolean;
|
|
19
22
|
hidePin: boolean;
|
|
@@ -25,13 +25,12 @@
|
|
|
25
25
|
|
|
26
26
|
<div v-if="hasMenu" class="absolute left-[146px] top-[8px] z-content">
|
|
27
27
|
<CardContentMenu
|
|
28
|
+
:item="props.item"
|
|
28
29
|
:state="props.state"
|
|
29
|
-
:is-pinned="!!props.item.pinned"
|
|
30
|
-
:is-bookmarked="!!props.item.bookmarked"
|
|
31
|
-
:hide-pin="!!props.hidePin"
|
|
32
|
-
:hide-preview="!!props.hidePreview"
|
|
33
|
-
:hide-bookmark="!!props.hideBookmark"
|
|
34
30
|
:is-show="isMenuShow"
|
|
31
|
+
:hide-pin="props.hidePin"
|
|
32
|
+
:hide-preview="props.hidePreview"
|
|
33
|
+
:hide-bookmark="props.hideBookmark"
|
|
35
34
|
@action="onMenuAction"
|
|
36
35
|
/>
|
|
37
36
|
</div>
|
|
@@ -104,7 +103,7 @@ const showTime = computed(() => !!props.item.expireAt);
|
|
|
104
103
|
const hasMenu = computed(() => {
|
|
105
104
|
if (props.selectable || !props.state) return false;
|
|
106
105
|
if (props.disable) {
|
|
107
|
-
return !!(props.item.pinned && !props.hidePin || props.item.bookmarked && !props.hideBookmark);
|
|
106
|
+
return !!(props.item.pinned && !props.hidePin || props.item.hidden || props.item.bookmarked && !props.hideBookmark);
|
|
108
107
|
}
|
|
109
108
|
return true;
|
|
110
109
|
});
|
|
@@ -65,14 +65,14 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
67
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
68
|
-
background: boolean;
|
|
69
|
-
modal: boolean;
|
|
70
68
|
responsive: boolean;
|
|
71
69
|
restore: boolean;
|
|
72
70
|
checkCrossOrigin: boolean;
|
|
73
71
|
checkOrientation: boolean;
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
|
@@ -65,14 +65,14 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
67
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
68
|
-
background: boolean;
|
|
69
|
-
modal: boolean;
|
|
70
68
|
responsive: boolean;
|
|
71
69
|
restore: boolean;
|
|
72
70
|
checkCrossOrigin: boolean;
|
|
73
71
|
checkOrientation: boolean;
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: 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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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
|
-
placeholder: string;
|
|
29
28
|
state: "user" | "admin";
|
|
29
|
+
placeholder: string;
|
|
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
|
-
placeholder: string;
|
|
29
28
|
state: "user" | "admin";
|
|
29
|
+
placeholder: string;
|
|
30
30
|
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|