pukaad-ui-lib 1.29.0 → 1.30.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/data-list.d.vue.ts +55 -0
- package/dist/runtime/components/data-list.vue +78 -0
- package/dist/runtime/components/data-list.vue.d.ts +55 -0
- package/dist/runtime/components/data-table.d.vue.ts +2 -2
- package/dist/runtime/components/data-table.vue.d.ts +2 -2
- package/dist/runtime/components/image/image-cropper.d.vue.ts +1 -1
- package/dist/runtime/components/image/image-cropper.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-password.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-password.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-slider.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-slider.vue.d.ts +1 -1
- package/dist/runtime/components/table.d.vue.ts +1 -1
- package/dist/runtime/components/table.vue.d.ts +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface DataListProps {
|
|
2
|
+
items?: Record<string, any>[];
|
|
3
|
+
height?: number | string;
|
|
4
|
+
maxHeight?: number | string;
|
|
5
|
+
fullHeight?: boolean;
|
|
6
|
+
disabledPagination?: boolean;
|
|
7
|
+
totalPage?: number;
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Props = DataListProps;
|
|
10
|
+
type __VLS_ModelProps = {
|
|
11
|
+
"page"?: number;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare var __VLS_6: {
|
|
15
|
+
items: Record<string, any>[];
|
|
16
|
+
}, __VLS_26: {
|
|
17
|
+
item: Record<string, any>;
|
|
18
|
+
index: number;
|
|
19
|
+
}, __VLS_28: {}, __VLS_35: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
body?: (props: typeof __VLS_6) => any;
|
|
22
|
+
} & {
|
|
23
|
+
item?: (props: typeof __VLS_26) => any;
|
|
24
|
+
} & {
|
|
25
|
+
empty?: (props: typeof __VLS_28) => any;
|
|
26
|
+
} & {
|
|
27
|
+
'empty-content'?: (props: typeof __VLS_35) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
"update:page": (value: number) => any;
|
|
31
|
+
} & {
|
|
32
|
+
"select-page": (value: number) => any;
|
|
33
|
+
"change-page": (value: number) => any;
|
|
34
|
+
"click-row": (item: Record<string, any>, index: number) => any;
|
|
35
|
+
"change-item-per-page": (value: number) => any;
|
|
36
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
+
"onSelect-page"?: ((value: number) => any) | undefined;
|
|
38
|
+
"onChange-page"?: ((value: number) => any) | undefined;
|
|
39
|
+
"onClick-row"?: ((item: Record<string, any>, index: number) => any) | undefined;
|
|
40
|
+
"onChange-item-per-page"?: ((value: number) => any) | undefined;
|
|
41
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
items: Record<string, any>[];
|
|
44
|
+
fullHeight: boolean;
|
|
45
|
+
disabledPagination: boolean;
|
|
46
|
+
totalPage: number;
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
Table as ShadTable,
|
|
4
|
+
TableBody as ShadTableBody,
|
|
5
|
+
TableRow as ShadTableRow,
|
|
6
|
+
TableCell as ShadTableCell,
|
|
7
|
+
TableEmpty as ShadTableEmpty
|
|
8
|
+
} from "@/runtime/components/ui/table";
|
|
9
|
+
const emit = defineEmits(["select-page", "change-page", "click-row", "change-item-per-page"]);
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
items: { type: Array, required: false, default: () => [] },
|
|
12
|
+
height: { type: [Number, String], required: false },
|
|
13
|
+
maxHeight: { type: [Number, String], required: false },
|
|
14
|
+
fullHeight: { type: Boolean, required: false, default: false },
|
|
15
|
+
disabledPagination: { type: Boolean, required: false, default: false },
|
|
16
|
+
totalPage: { type: Number, required: false, default: 1 }
|
|
17
|
+
});
|
|
18
|
+
const page = defineModel("page", { type: Number, ...{
|
|
19
|
+
default: 1
|
|
20
|
+
} });
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div class="bg-white rounded-lg flex flex-col">
|
|
25
|
+
<!-- List Container -->
|
|
26
|
+
<div
|
|
27
|
+
class="flex-1 overflow-auto"
|
|
28
|
+
:style="{
|
|
29
|
+
height: props.fullHeight ? '100%' : props.height ? `${props.height}px` : 'auto',
|
|
30
|
+
maxHeight: props.maxHeight ? `${props.maxHeight}px` : void 0
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
33
|
+
<ShadTable>
|
|
34
|
+
<slot name="body" :items="props.items">
|
|
35
|
+
<ShadTableBody>
|
|
36
|
+
<template v-if="props.items.length > 0">
|
|
37
|
+
<ShadTableRow
|
|
38
|
+
v-for="(item, index) in props.items"
|
|
39
|
+
:key="index"
|
|
40
|
+
class="cursor-pointer"
|
|
41
|
+
@click="emit('click-row', item, index)"
|
|
42
|
+
>
|
|
43
|
+
<ShadTableCell class="w-full">
|
|
44
|
+
<slot name="item" :item="item" :index="index">
|
|
45
|
+
{{ item }}
|
|
46
|
+
</slot>
|
|
47
|
+
</ShadTableCell>
|
|
48
|
+
</ShadTableRow>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<!-- Empty State -->
|
|
52
|
+
<template v-else>
|
|
53
|
+
<slot name="empty">
|
|
54
|
+
<ShadTableEmpty :colspan="1">
|
|
55
|
+
<slot name="empty-content" />
|
|
56
|
+
</ShadTableEmpty>
|
|
57
|
+
</slot>
|
|
58
|
+
</template>
|
|
59
|
+
</ShadTableBody>
|
|
60
|
+
</slot>
|
|
61
|
+
</ShadTable>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<!-- Pagination -->
|
|
65
|
+
<div
|
|
66
|
+
v-if="props.items.length > 0 && !props.disabledPagination"
|
|
67
|
+
class="p-4 flex justify-center items-center border-t"
|
|
68
|
+
>
|
|
69
|
+
<Pagination
|
|
70
|
+
:totalPage="props.totalPage"
|
|
71
|
+
v-model="page"
|
|
72
|
+
@change-item-per-page="
|
|
73
|
+
(val) => emit('change-item-per-page', val)
|
|
74
|
+
"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface DataListProps {
|
|
2
|
+
items?: Record<string, any>[];
|
|
3
|
+
height?: number | string;
|
|
4
|
+
maxHeight?: number | string;
|
|
5
|
+
fullHeight?: boolean;
|
|
6
|
+
disabledPagination?: boolean;
|
|
7
|
+
totalPage?: number;
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Props = DataListProps;
|
|
10
|
+
type __VLS_ModelProps = {
|
|
11
|
+
"page"?: number;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare var __VLS_6: {
|
|
15
|
+
items: Record<string, any>[];
|
|
16
|
+
}, __VLS_26: {
|
|
17
|
+
item: Record<string, any>;
|
|
18
|
+
index: number;
|
|
19
|
+
}, __VLS_28: {}, __VLS_35: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
body?: (props: typeof __VLS_6) => any;
|
|
22
|
+
} & {
|
|
23
|
+
item?: (props: typeof __VLS_26) => any;
|
|
24
|
+
} & {
|
|
25
|
+
empty?: (props: typeof __VLS_28) => any;
|
|
26
|
+
} & {
|
|
27
|
+
'empty-content'?: (props: typeof __VLS_35) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
"update:page": (value: number) => any;
|
|
31
|
+
} & {
|
|
32
|
+
"select-page": (value: number) => any;
|
|
33
|
+
"change-page": (value: number) => any;
|
|
34
|
+
"click-row": (item: Record<string, any>, index: number) => any;
|
|
35
|
+
"change-item-per-page": (value: number) => any;
|
|
36
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
+
"onSelect-page"?: ((value: number) => any) | undefined;
|
|
38
|
+
"onChange-page"?: ((value: number) => any) | undefined;
|
|
39
|
+
"onClick-row"?: ((item: Record<string, any>, index: number) => any) | undefined;
|
|
40
|
+
"onChange-item-per-page"?: ((value: number) => any) | undefined;
|
|
41
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
items: Record<string, any>[];
|
|
44
|
+
fullHeight: boolean;
|
|
45
|
+
disabledPagination: boolean;
|
|
46
|
+
totalPage: number;
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -58,13 +58,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
58
58
|
}>, {
|
|
59
59
|
items: Record<string, any>[];
|
|
60
60
|
fullHeight: boolean;
|
|
61
|
+
disabledPagination: boolean;
|
|
62
|
+
totalPage: number;
|
|
61
63
|
itemHeader: TableHeader[];
|
|
62
64
|
headerAlinement: TableHeaderAlignment;
|
|
63
65
|
cellAlinement: TableHeaderAlignment;
|
|
64
66
|
disabledHeader: boolean;
|
|
65
67
|
disabledSort: boolean;
|
|
66
|
-
disabledPagination: boolean;
|
|
67
|
-
totalPage: number;
|
|
68
68
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
69
69
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
70
70
|
declare const _default: typeof __VLS_export;
|
|
@@ -58,13 +58,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
58
58
|
}>, {
|
|
59
59
|
items: Record<string, any>[];
|
|
60
60
|
fullHeight: boolean;
|
|
61
|
+
disabledPagination: boolean;
|
|
62
|
+
totalPage: number;
|
|
61
63
|
itemHeader: TableHeader[];
|
|
62
64
|
headerAlinement: TableHeaderAlignment;
|
|
63
65
|
cellAlinement: TableHeaderAlignment;
|
|
64
66
|
disabledHeader: boolean;
|
|
65
67
|
disabledSort: boolean;
|
|
66
|
-
disabledPagination: boolean;
|
|
67
|
-
totalPage: number;
|
|
68
68
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
69
69
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
70
70
|
declare const _default: typeof __VLS_export;
|
|
@@ -64,7 +64,6 @@ 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
|
center: boolean;
|
|
66
66
|
src: string;
|
|
67
|
-
background: boolean;
|
|
68
67
|
responsive: boolean;
|
|
69
68
|
restore: boolean;
|
|
70
69
|
checkCrossOrigin: boolean;
|
|
@@ -73,6 +72,7 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
73
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;
|
|
@@ -64,7 +64,6 @@ 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
|
center: boolean;
|
|
66
66
|
src: string;
|
|
67
|
-
background: boolean;
|
|
68
67
|
responsive: boolean;
|
|
69
68
|
restore: boolean;
|
|
70
69
|
checkCrossOrigin: boolean;
|
|
@@ -73,6 +72,7 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
73
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;
|
|
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
27
27
|
label: string;
|
|
28
28
|
name: string;
|
|
29
29
|
limit: number;
|
|
30
|
-
disabledErrorMessage: boolean;
|
|
31
30
|
accept: string;
|
|
31
|
+
disabledErrorMessage: boolean;
|
|
32
32
|
labelIcon: string;
|
|
33
33
|
disabledDrop: boolean;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
27
27
|
label: string;
|
|
28
28
|
name: string;
|
|
29
29
|
limit: number;
|
|
30
|
-
disabledErrorMessage: boolean;
|
|
31
30
|
accept: string;
|
|
31
|
+
disabledErrorMessage: boolean;
|
|
32
32
|
labelIcon: string;
|
|
33
33
|
disabledDrop: boolean;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
18
18
|
}>, {
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
|
-
new: boolean;
|
|
22
21
|
disabledForgotPassword: boolean;
|
|
22
|
+
new: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
25
25
|
export default _default;
|
|
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
18
18
|
}>, {
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
|
-
new: boolean;
|
|
22
21
|
disabledForgotPassword: boolean;
|
|
22
|
+
new: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
25
25
|
export default _default;
|
|
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
12
12
|
color: InputSliderColor;
|
|
13
13
|
fullWidth: boolean;
|
|
14
14
|
label: string;
|
|
15
|
+
step: number;
|
|
15
16
|
min: number;
|
|
16
17
|
max: number;
|
|
17
|
-
step: number;
|
|
18
18
|
lineHeight: number | string;
|
|
19
19
|
appearance: boolean;
|
|
20
20
|
thumbSize: number | string;
|
|
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
12
12
|
color: InputSliderColor;
|
|
13
13
|
fullWidth: boolean;
|
|
14
14
|
label: string;
|
|
15
|
+
step: number;
|
|
15
16
|
min: number;
|
|
16
17
|
max: number;
|
|
17
|
-
step: number;
|
|
18
18
|
lineHeight: number | string;
|
|
19
19
|
appearance: boolean;
|
|
20
20
|
thumbSize: number | string;
|
|
@@ -41,11 +41,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
41
41
|
}>, {
|
|
42
42
|
items: Record<string, any>[];
|
|
43
43
|
fullHeight: false;
|
|
44
|
+
totalPage: number;
|
|
44
45
|
itemHeader: TableHeader[];
|
|
45
46
|
headerAlinement: "start" | "center" | "end";
|
|
46
47
|
disabledHeader: false;
|
|
47
48
|
disabledSort: false;
|
|
48
|
-
totalPage: number;
|
|
49
49
|
paginationVisible: number;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
51
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -41,11 +41,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
41
41
|
}>, {
|
|
42
42
|
items: Record<string, any>[];
|
|
43
43
|
fullHeight: false;
|
|
44
|
+
totalPage: number;
|
|
44
45
|
itemHeader: TableHeader[];
|
|
45
46
|
headerAlinement: "start" | "center" | "end";
|
|
46
47
|
disabledHeader: false;
|
|
47
48
|
disabledSort: false;
|
|
48
|
-
totalPage: number;
|
|
49
49
|
paginationVisible: number;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
51
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|