pukaad-ui-lib 1.36.0 → 1.38.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/drawer/drawer.d.vue.ts +7 -5
- package/dist/runtime/components/drawer/drawer.vue +3 -0
- package/dist/runtime/components/drawer/drawer.vue.d.ts +7 -5
- 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-date-picker.vue +1 -2
- package/dist/runtime/components/loading.d.vue.ts +10 -0
- package/dist/runtime/components/loading.vue +24 -0
- package/dist/runtime/components/loading.vue.d.ts +10 -0
- package/dist/runtime/components/modal/modal.d.vue.ts +9 -7
- package/dist/runtime/components/modal/modal.vue +4 -1
- package/dist/runtime/components/modal/modal.vue.d.ts +9 -7
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -2,23 +2,25 @@ import type { SheetContentProps } from "@/runtime/components/ui/sheet/SheetConte
|
|
|
2
2
|
export interface DrawerProps extends SheetContentProps {
|
|
3
3
|
title?: string;
|
|
4
4
|
description?: string;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
loadingText?: string;
|
|
5
7
|
}
|
|
6
8
|
type __VLS_Props = DrawerProps;
|
|
7
9
|
type __VLS_ModelProps = {
|
|
8
10
|
modelValue?: boolean;
|
|
9
11
|
};
|
|
10
12
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
-
declare var
|
|
13
|
+
declare var __VLS_27: {}, __VLS_41: {
|
|
12
14
|
meta: any;
|
|
13
|
-
},
|
|
15
|
+
}, __VLS_49: {
|
|
14
16
|
meta: any;
|
|
15
17
|
};
|
|
16
18
|
type __VLS_Slots = {} & {
|
|
17
|
-
header?: (props: typeof
|
|
19
|
+
header?: (props: typeof __VLS_27) => any;
|
|
18
20
|
} & {
|
|
19
|
-
default?: (props: typeof
|
|
21
|
+
default?: (props: typeof __VLS_41) => any;
|
|
20
22
|
} & {
|
|
21
|
-
footer?: (props: typeof
|
|
23
|
+
footer?: (props: typeof __VLS_49) => any;
|
|
22
24
|
};
|
|
23
25
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
26
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ShadSheet v-model:open="isOpen">
|
|
3
3
|
<ShadSheetContent v-bind="props" v-slot="{ meta }" @submit="onSubmit">
|
|
4
|
+
<Loading :is-loading="props.isLoading" :text="props.loadingText" />
|
|
4
5
|
<ShadSheetHeader class="flex-shrink-0">
|
|
5
6
|
<slot name="header">
|
|
6
7
|
<ShadSheetTitle>{{ props.title }}</ShadSheetTitle>
|
|
@@ -23,6 +24,8 @@
|
|
|
23
24
|
const props = defineProps({
|
|
24
25
|
title: { type: String, required: false },
|
|
25
26
|
description: { type: String, required: false },
|
|
27
|
+
isLoading: { type: Boolean, required: false },
|
|
28
|
+
loadingText: { type: String, required: false },
|
|
26
29
|
class: { type: null, required: false },
|
|
27
30
|
side: { type: String, required: false },
|
|
28
31
|
forceMount: { type: Boolean, required: false },
|
|
@@ -2,23 +2,25 @@ import type { SheetContentProps } from "@/runtime/components/ui/sheet/SheetConte
|
|
|
2
2
|
export interface DrawerProps extends SheetContentProps {
|
|
3
3
|
title?: string;
|
|
4
4
|
description?: string;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
loadingText?: string;
|
|
5
7
|
}
|
|
6
8
|
type __VLS_Props = DrawerProps;
|
|
7
9
|
type __VLS_ModelProps = {
|
|
8
10
|
modelValue?: boolean;
|
|
9
11
|
};
|
|
10
12
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
-
declare var
|
|
13
|
+
declare var __VLS_27: {}, __VLS_41: {
|
|
12
14
|
meta: any;
|
|
13
|
-
},
|
|
15
|
+
}, __VLS_49: {
|
|
14
16
|
meta: any;
|
|
15
17
|
};
|
|
16
18
|
type __VLS_Slots = {} & {
|
|
17
|
-
header?: (props: typeof
|
|
19
|
+
header?: (props: typeof __VLS_27) => any;
|
|
18
20
|
} & {
|
|
19
|
-
default?: (props: typeof
|
|
21
|
+
default?: (props: typeof __VLS_41) => any;
|
|
20
22
|
} & {
|
|
21
|
-
footer?: (props: typeof
|
|
23
|
+
footer?: (props: typeof __VLS_49) => any;
|
|
22
24
|
};
|
|
23
25
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
26
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -37,8 +37,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
37
37
|
name: string;
|
|
38
38
|
placeholder: string;
|
|
39
39
|
description: string;
|
|
40
|
-
limit: number;
|
|
41
40
|
options: AutocompleteOption[] | string[] | number[];
|
|
41
|
+
limit: number;
|
|
42
42
|
disabledErrorMessage: boolean;
|
|
43
43
|
disabledBorder: boolean;
|
|
44
44
|
showCounter: boolean;
|
|
@@ -37,8 +37,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
37
37
|
name: string;
|
|
38
38
|
placeholder: string;
|
|
39
39
|
description: string;
|
|
40
|
-
limit: number;
|
|
41
40
|
options: AutocompleteOption[] | string[] | number[];
|
|
41
|
+
limit: number;
|
|
42
42
|
disabledErrorMessage: boolean;
|
|
43
43
|
disabledBorder: boolean;
|
|
44
44
|
showCounter: boolean;
|
|
@@ -26,14 +26,13 @@
|
|
|
26
26
|
:class="
|
|
27
27
|
cn(
|
|
28
28
|
'w-full flex items-center justify-between gap-2 font-body-large',
|
|
29
|
-
!modelValue && 'text-cloud',
|
|
30
29
|
errorMessage && 'border-destructive',
|
|
31
30
|
props.class
|
|
32
31
|
)
|
|
33
32
|
"
|
|
34
33
|
>
|
|
35
34
|
<span v-if="modelValue">{{ formattedDate }}</span>
|
|
36
|
-
<span v-else>{{ placeholder }}</span>
|
|
35
|
+
<span v-else class="text-cloud">{{ placeholder }}</span>
|
|
37
36
|
<Icon name="lucide:calendar" :size="16" />
|
|
38
37
|
</Button>
|
|
39
38
|
</PopoverTrigger>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface LoadingProps {
|
|
2
|
+
isLoading?: boolean;
|
|
3
|
+
text?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<LoadingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LoadingProps> & Readonly<{}>, {
|
|
6
|
+
text: string;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Transition name="loading-fade">
|
|
3
|
+
<div
|
|
4
|
+
v-if="isLoading"
|
|
5
|
+
class="absolute inset-0 opacity-50 z-50 flex items-center justify-center backdrop-blur-2xl"
|
|
6
|
+
>
|
|
7
|
+
<div class="flex flex-col items-center gap-3">
|
|
8
|
+
<div class="loading-spinner"></div>
|
|
9
|
+
<span v-if="text" class="text-sm text-cloud">{{ text }}</span>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</Transition>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup>
|
|
16
|
+
defineProps({
|
|
17
|
+
isLoading: { type: Boolean, required: false, default: false },
|
|
18
|
+
text: { type: String, required: false, default: "" }
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
.loading-spinner{animation:spin .8s linear infinite;border:6px solid rgba(0,0,0,.1);border-radius:50%;border-top-color:#3b82f6;height:64px;width:64px}@keyframes spin{to{transform:rotate(1turn)}}.loading-fade-enter-active,.loading-fade-leave-active{transition:opacity .2s ease}.loading-fade-enter-from,.loading-fade-leave-to{opacity:0}
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface LoadingProps {
|
|
2
|
+
isLoading?: boolean;
|
|
3
|
+
text?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<LoadingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LoadingProps> & Readonly<{}>, {
|
|
6
|
+
text: string;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -5,27 +5,29 @@ export interface ModalProps {
|
|
|
5
5
|
description?: string;
|
|
6
6
|
footer?: string;
|
|
7
7
|
disabledCloseBtn?: boolean;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
loadingText?: string;
|
|
8
10
|
}
|
|
9
11
|
type __VLS_Props = ModalProps;
|
|
10
12
|
type __VLS_ModelProps = {
|
|
11
13
|
modelValue?: boolean;
|
|
12
14
|
};
|
|
13
15
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare var
|
|
16
|
+
declare var __VLS_28: {}, __VLS_36: {}, __VLS_44: {}, __VLS_46: {
|
|
15
17
|
meta: any;
|
|
16
|
-
},
|
|
18
|
+
}, __VLS_54: {
|
|
17
19
|
meta: any;
|
|
18
20
|
};
|
|
19
21
|
type __VLS_Slots = {} & {
|
|
20
|
-
header?: (props: typeof
|
|
22
|
+
header?: (props: typeof __VLS_28) => any;
|
|
21
23
|
} & {
|
|
22
|
-
title?: (props: typeof
|
|
24
|
+
title?: (props: typeof __VLS_36) => any;
|
|
23
25
|
} & {
|
|
24
|
-
description?: (props: typeof
|
|
26
|
+
description?: (props: typeof __VLS_44) => any;
|
|
25
27
|
} & {
|
|
26
|
-
default?: (props: typeof
|
|
28
|
+
default?: (props: typeof __VLS_46) => any;
|
|
27
29
|
} & {
|
|
28
|
-
footer?: (props: typeof
|
|
30
|
+
footer?: (props: typeof __VLS_54) => any;
|
|
29
31
|
};
|
|
30
32
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
33
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@submit="onSubmit"
|
|
8
8
|
@close="onClose"
|
|
9
9
|
>
|
|
10
|
+
<Loading :is-loading="props.isLoading" :text="props.loadingText" />
|
|
10
11
|
<ShadDialogHeader>
|
|
11
12
|
<slot name="header">
|
|
12
13
|
<ShadDialogTitle>
|
|
@@ -36,7 +37,9 @@ const props = defineProps({
|
|
|
36
37
|
title: { type: String, required: false },
|
|
37
38
|
description: { type: String, required: false },
|
|
38
39
|
footer: { type: String, required: false },
|
|
39
|
-
disabledCloseBtn: { type: Boolean, required: false, default: false }
|
|
40
|
+
disabledCloseBtn: { type: Boolean, required: false, default: false },
|
|
41
|
+
isLoading: { type: Boolean, required: false },
|
|
42
|
+
loadingText: { type: String, required: false }
|
|
40
43
|
});
|
|
41
44
|
const isOpen = defineModel({ type: Boolean, ...{
|
|
42
45
|
default: false
|
|
@@ -5,27 +5,29 @@ export interface ModalProps {
|
|
|
5
5
|
description?: string;
|
|
6
6
|
footer?: string;
|
|
7
7
|
disabledCloseBtn?: boolean;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
loadingText?: string;
|
|
8
10
|
}
|
|
9
11
|
type __VLS_Props = ModalProps;
|
|
10
12
|
type __VLS_ModelProps = {
|
|
11
13
|
modelValue?: boolean;
|
|
12
14
|
};
|
|
13
15
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare var
|
|
16
|
+
declare var __VLS_28: {}, __VLS_36: {}, __VLS_44: {}, __VLS_46: {
|
|
15
17
|
meta: any;
|
|
16
|
-
},
|
|
18
|
+
}, __VLS_54: {
|
|
17
19
|
meta: any;
|
|
18
20
|
};
|
|
19
21
|
type __VLS_Slots = {} & {
|
|
20
|
-
header?: (props: typeof
|
|
22
|
+
header?: (props: typeof __VLS_28) => any;
|
|
21
23
|
} & {
|
|
22
|
-
title?: (props: typeof
|
|
24
|
+
title?: (props: typeof __VLS_36) => any;
|
|
23
25
|
} & {
|
|
24
|
-
description?: (props: typeof
|
|
26
|
+
description?: (props: typeof __VLS_44) => any;
|
|
25
27
|
} & {
|
|
26
|
-
default?: (props: typeof
|
|
28
|
+
default?: (props: typeof __VLS_46) => any;
|
|
27
29
|
} & {
|
|
28
|
-
footer?: (props: typeof
|
|
30
|
+
footer?: (props: typeof __VLS_54) => any;
|
|
29
31
|
};
|
|
30
32
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
33
|
"update:modelValue": (value: boolean) => any;
|