veload 0.1.2 → 0.1.3
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/README.md +2 -2
- package/package.json +3 -2
- package/dist/components/VLoader/index.vue.d.ts +0 -12
- package/dist/components/VLoader/loaders.d.ts +0 -38
- package/dist/components/VLoader/types.d.ts +0 -17
- package/dist/components/VLoading/index.vue.d.ts +0 -21
- package/dist/components/VLoading/types.d.ts +0 -6
- package/dist/components/VLoadingButton/index.vue.d.ts +0 -21
- package/dist/components/VLoadingButton/types.d.ts +0 -7
- package/dist/components/VPatternSkeleton/index.vue.d.ts +0 -18
- package/dist/components/VPatternSkeleton/presets.d.ts +0 -19
- package/dist/components/VPatternSkeleton/types.d.ts +0 -34
- package/dist/components/VProgress/index.vue.d.ts +0 -10
- package/dist/components/VProgress/types.d.ts +0 -10
- package/dist/components/VSkeleton/index.vue.d.ts +0 -7
- package/dist/components/VSkeleton/types.d.ts +0 -9
- package/dist/components/VSkeletonGroup/index.vue.d.ts +0 -17
- package/dist/components/VSkeletonGroup/types.d.ts +0 -5
- package/dist/components/VSkeletonSwitch/index.vue.d.ts +0 -31
- package/dist/components/VSkeletonSwitch/types.d.ts +0 -4
- package/dist/components/VSpinner/index.vue.d.ts +0 -9
- package/dist/components/VSpinner/types.d.ts +0 -6
- package/dist/composables/useDelayedLoading.d.ts +0 -7
- package/dist/composables/useLoading.d.ts +0 -7
- package/dist/composables/useLoadingGroup.d.ts +0 -7
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -24
- package/dist/index.js +0 -851
- package/dist/style.css +0 -2
- package/dist/utils/css.d.ts +0 -7
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Veload
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/veload)
|
|
4
|
-
[](https://github.com/Shehab-Mu/veload/blob/main/
|
|
4
|
+
[](https://github.com/Shehab-Mu/veload/blob/main/package/LICENSE)
|
|
5
5
|
[](https://veload-playground.vercel.app)
|
|
6
6
|
|
|
7
7
|
Accessible loading UI for Vue 3: animated loaders, skeleton placeholders, progress indicators, and loading-state components with TypeScript support.
|
|
@@ -150,4 +150,4 @@ The source repository is [Shehab-Mu/veload](https://github.com/Shehab-Mu/veload)
|
|
|
150
150
|
|
|
151
151
|
## License
|
|
152
152
|
|
|
153
|
-
[MIT](https://github.com/Shehab-Mu/veload/blob/main/
|
|
153
|
+
[MIT](https://github.com/Shehab-Mu/veload/blob/main/package/LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veload",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Accessible Vue 3 loaders, skeletons, progress indicators, and loading-state composables.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"homepage": "https://veload-playground.vercel.app",
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/Shehab-Mu/veload.git"
|
|
27
|
+
"url": "git+https://github.com/Shehab-Mu/veload.git",
|
|
28
|
+
"directory": "package"
|
|
28
29
|
},
|
|
29
30
|
"bugs": {
|
|
30
31
|
"url": "https://github.com/Shehab-Mu/veload/issues"
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type VLoaderProps } from "./types";
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<VLoaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VLoaderProps> & Readonly<{}>, {
|
|
3
|
-
size: number;
|
|
4
|
-
color: string;
|
|
5
|
-
label: string;
|
|
6
|
-
decorative: boolean;
|
|
7
|
-
variant: "bars" | "blob" | "bounce" | "breathing" | "card-flip" | "dot-sweep" | "dots" | "dual-arc" | "element" | "equalizer" | "fallback" | "flow" | "gradient-ring" | "grid" | "hashtag" | "heatmap" | "liquid" | "logo-spin" | "morph" | "orbit-dots" | "orbit" | "plane" | "progress-ring" | "pulse" | "ring" | "ripple" | "rotate" | "signal" | "sliding-bars" | "snake" | "spin-dots" | "spin" | "squares" | "stair" | "typing" | "wave";
|
|
8
|
-
value: number | null;
|
|
9
|
-
duration: number;
|
|
10
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
-
declare const _default: typeof __VLS_export;
|
|
12
|
-
export default _default;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type DefineComponent } from "vue";
|
|
2
|
-
import type { NamedLoaderProps } from "./types";
|
|
3
|
-
export declare const VBarsLoader: DefineComponent<NamedLoaderProps>;
|
|
4
|
-
export declare const VBlobLoader: DefineComponent<NamedLoaderProps>;
|
|
5
|
-
export declare const VBounceLoader: DefineComponent<NamedLoaderProps>;
|
|
6
|
-
export declare const VBreathingLoader: DefineComponent<NamedLoaderProps>;
|
|
7
|
-
export declare const VCardFlipLoader: DefineComponent<NamedLoaderProps>;
|
|
8
|
-
export declare const VDotSweepLoader: DefineComponent<NamedLoaderProps>;
|
|
9
|
-
export declare const VDotsLoader: DefineComponent<NamedLoaderProps>;
|
|
10
|
-
export declare const VDualArcLoader: DefineComponent<NamedLoaderProps>;
|
|
11
|
-
export declare const VElementLoader: DefineComponent<NamedLoaderProps>;
|
|
12
|
-
export declare const VEqualizerLoader: DefineComponent<NamedLoaderProps>;
|
|
13
|
-
export declare const VFallbackLoader: DefineComponent<NamedLoaderProps>;
|
|
14
|
-
export declare const VFlowLoader: DefineComponent<NamedLoaderProps>;
|
|
15
|
-
export declare const VGradientRingLoader: DefineComponent<NamedLoaderProps>;
|
|
16
|
-
export declare const VGridLoader: DefineComponent<NamedLoaderProps>;
|
|
17
|
-
export declare const VHashtagLoader: DefineComponent<NamedLoaderProps>;
|
|
18
|
-
export declare const VHeatmapLoader: DefineComponent<NamedLoaderProps>;
|
|
19
|
-
export declare const VLiquidLoader: DefineComponent<NamedLoaderProps>;
|
|
20
|
-
export declare const VLogoSpinLoader: DefineComponent<NamedLoaderProps>;
|
|
21
|
-
export declare const VMorphLoader: DefineComponent<NamedLoaderProps>;
|
|
22
|
-
export declare const VOrbitDotsLoader: DefineComponent<NamedLoaderProps>;
|
|
23
|
-
export declare const VOrbitLoader: DefineComponent<NamedLoaderProps>;
|
|
24
|
-
export declare const VPlaneLoader: DefineComponent<NamedLoaderProps>;
|
|
25
|
-
export declare const VProgressRingLoader: DefineComponent<NamedLoaderProps>;
|
|
26
|
-
export declare const VPulseLoader: DefineComponent<NamedLoaderProps>;
|
|
27
|
-
export declare const VRingLoader: DefineComponent<NamedLoaderProps>;
|
|
28
|
-
export declare const VRippleLoader: DefineComponent<NamedLoaderProps>;
|
|
29
|
-
export declare const VRotateLoader: DefineComponent<NamedLoaderProps>;
|
|
30
|
-
export declare const VSignalLoader: DefineComponent<NamedLoaderProps>;
|
|
31
|
-
export declare const VSlidingBarsLoader: DefineComponent<NamedLoaderProps>;
|
|
32
|
-
export declare const VSnakeLoader: DefineComponent<NamedLoaderProps>;
|
|
33
|
-
export declare const VSpinDotsLoader: DefineComponent<NamedLoaderProps>;
|
|
34
|
-
export declare const VSpinLoader: DefineComponent<NamedLoaderProps>;
|
|
35
|
-
export declare const VSquaresLoader: DefineComponent<NamedLoaderProps>;
|
|
36
|
-
export declare const VStairLoader: DefineComponent<NamedLoaderProps>;
|
|
37
|
-
export declare const VTypingLoader: DefineComponent<NamedLoaderProps>;
|
|
38
|
-
export declare const VWaveLoader: DefineComponent<NamedLoaderProps>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const loaderVariants: readonly ["bars", "blob", "bounce", "breathing", "card-flip", "dot-sweep", "dots", "dual-arc", "element", "equalizer", "fallback", "flow", "gradient-ring", "grid", "hashtag", "heatmap", "liquid", "logo-spin", "morph", "orbit-dots", "orbit", "plane", "progress-ring", "pulse", "ring", "ripple", "rotate", "signal", "sliding-bars", "snake", "spin-dots", "spin", "squares", "stair", "typing", "wave"];
|
|
2
|
-
export type LoaderVariant = (typeof loaderVariants)[number];
|
|
3
|
-
export interface VLoaderProps {
|
|
4
|
-
variant?: LoaderVariant;
|
|
5
|
-
color?: string;
|
|
6
|
-
size?: number;
|
|
7
|
-
duration?: number;
|
|
8
|
-
label?: string;
|
|
9
|
-
decorative?: boolean;
|
|
10
|
-
count?: number;
|
|
11
|
-
value?: number | null;
|
|
12
|
-
}
|
|
13
|
-
export type NamedLoaderProps = Omit<VLoaderProps, "variant">;
|
|
14
|
-
export type VMarkLoaderProps = Omit<NamedLoaderProps, "value">;
|
|
15
|
-
export interface VProgressRingLoaderProps extends Omit<NamedLoaderProps, "value"> {
|
|
16
|
-
value?: number | null;
|
|
17
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { VLoadingProps } from "./types";
|
|
2
|
-
declare var __VLS_1: {}, __VLS_3: {};
|
|
3
|
-
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof __VLS_1) => any;
|
|
5
|
-
} & {
|
|
6
|
-
indicator?: (props: typeof __VLS_3) => any;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<VLoadingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VLoadingProps> & Readonly<{}>, {
|
|
9
|
-
label: string;
|
|
10
|
-
loading: boolean;
|
|
11
|
-
inertContent: boolean;
|
|
12
|
-
indicatorSize: number;
|
|
13
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
-
declare const _default: typeof __VLS_export;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
-
new (): {
|
|
19
|
-
$slots: S;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { LoadingButtonType, VLoadingButtonProps } from "./types";
|
|
2
|
-
declare var __VLS_1: {}, __VLS_3: {};
|
|
3
|
-
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof __VLS_1) => any;
|
|
5
|
-
} & {
|
|
6
|
-
indicator?: (props: typeof __VLS_3) => any;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<VLoadingButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VLoadingButtonProps> & Readonly<{}>, {
|
|
9
|
-
type: LoadingButtonType;
|
|
10
|
-
loading: boolean;
|
|
11
|
-
indicatorSize: number;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
-
declare const _default: typeof __VLS_export;
|
|
16
|
-
export default _default;
|
|
17
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
-
new (): {
|
|
19
|
-
$slots: S;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { SkeletonPattern, VPatternSkeletonProps } from "./types";
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<VPatternSkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VPatternSkeletonProps> & Readonly<{}>, {
|
|
3
|
-
pattern: SkeletonPattern;
|
|
4
|
-
animated: boolean;
|
|
5
|
-
rows: number;
|
|
6
|
-
columns: number;
|
|
7
|
-
showMedia: boolean;
|
|
8
|
-
showAvatar: boolean;
|
|
9
|
-
showHeader: boolean;
|
|
10
|
-
showChart: boolean;
|
|
11
|
-
showStats: boolean;
|
|
12
|
-
showSubmit: boolean;
|
|
13
|
-
showRating: boolean;
|
|
14
|
-
showPrice: boolean;
|
|
15
|
-
showCta: boolean;
|
|
16
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
declare const _default: typeof __VLS_export;
|
|
18
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type DefineComponent } from "vue";
|
|
2
|
-
import type { VSkeletonSwitchProps } from "../VSkeletonSwitch/types";
|
|
3
|
-
import type { VArticleSkeletonProps, VCardSkeletonProps, VDashboardSkeletonProps, VFeedSkeletonProps, VFormSkeletonProps, VListSkeletonProps, VMediaCardSkeletonProps, VProductCardSkeletonProps, VProfileSkeletonProps, VTableSkeletonProps } from "./types";
|
|
4
|
-
export declare const VSkeletonLoader: DefineComponent<import("../VSkeleton/types.js").VSkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("../VSkeleton/types.js").VSkeletonProps> & Readonly<{}>, {
|
|
5
|
-
variant: import("../VSkeleton/types.js").SkeletonVariant;
|
|
6
|
-
animated: boolean;
|
|
7
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
-
export declare const VArticleSkeleton: DefineComponent<VArticleSkeletonProps>;
|
|
9
|
-
export declare const VCardSkeleton: DefineComponent<VCardSkeletonProps>;
|
|
10
|
-
export declare const VDashboardSkeleton: DefineComponent<VDashboardSkeletonProps>;
|
|
11
|
-
export declare const VFeedSkeleton: DefineComponent<VFeedSkeletonProps>;
|
|
12
|
-
export declare const VFormSkeleton: DefineComponent<VFormSkeletonProps>;
|
|
13
|
-
export declare const VListSkeleton: DefineComponent<VListSkeletonProps>;
|
|
14
|
-
export declare const VMediaCardSkeleton: DefineComponent<VMediaCardSkeletonProps>;
|
|
15
|
-
export declare const VProductCardSkeleton: DefineComponent<VProductCardSkeletonProps>;
|
|
16
|
-
export declare const VProfileSkeleton: DefineComponent<VProfileSkeletonProps>;
|
|
17
|
-
export declare const VTableSkeleton: DefineComponent<VTableSkeletonProps>;
|
|
18
|
-
export type VAutoSkeletonProps = VSkeletonSwitchProps;
|
|
19
|
-
export declare const VAutoSkeleton: DefineComponent<VAutoSkeletonProps>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export type SkeletonPattern = "lines" | "article" | "card" | "profile" | "list" | "table" | "media" | "form" | "dashboard" | "feed" | "product";
|
|
2
|
-
export interface SkeletonAppearanceProps {
|
|
3
|
-
color?: string;
|
|
4
|
-
highlightColor?: string;
|
|
5
|
-
animated?: boolean;
|
|
6
|
-
label?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface VPatternSkeletonProps extends SkeletonAppearanceProps {
|
|
9
|
-
pattern?: SkeletonPattern;
|
|
10
|
-
rows?: number;
|
|
11
|
-
columns?: number;
|
|
12
|
-
mediaHeight?: number | string;
|
|
13
|
-
avatarSize?: number;
|
|
14
|
-
showMedia?: boolean;
|
|
15
|
-
showAvatar?: boolean;
|
|
16
|
-
showHeader?: boolean;
|
|
17
|
-
showChart?: boolean;
|
|
18
|
-
showStats?: boolean;
|
|
19
|
-
showSubmit?: boolean;
|
|
20
|
-
showRating?: boolean;
|
|
21
|
-
showPrice?: boolean;
|
|
22
|
-
showCta?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export type NamedSkeletonProps = Omit<VPatternSkeletonProps, "pattern">;
|
|
25
|
-
export type VArticleSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight" | "showMedia"> & SkeletonAppearanceProps;
|
|
26
|
-
export type VCardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight" | "showMedia" | "showAvatar"> & SkeletonAppearanceProps;
|
|
27
|
-
export type VDashboardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "columns" | "showChart" | "showStats"> & SkeletonAppearanceProps;
|
|
28
|
-
export type VFeedSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showAvatar"> & SkeletonAppearanceProps;
|
|
29
|
-
export type VFormSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showSubmit"> & SkeletonAppearanceProps;
|
|
30
|
-
export type VListSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showAvatar" | "avatarSize"> & SkeletonAppearanceProps;
|
|
31
|
-
export type VMediaCardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight"> & SkeletonAppearanceProps;
|
|
32
|
-
export type VProductCardSkeletonProps = Pick<NamedSkeletonProps, "mediaHeight" | "showRating" | "showPrice" | "showCta"> & SkeletonAppearanceProps;
|
|
33
|
-
export type VProfileSkeletonProps = Pick<NamedSkeletonProps, "rows" | "avatarSize" | "showStats"> & SkeletonAppearanceProps;
|
|
34
|
-
export type VTableSkeletonProps = Pick<NamedSkeletonProps, "rows" | "columns" | "showHeader"> & SkeletonAppearanceProps;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { VProgressProps } from "./types";
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<VProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VProgressProps> & Readonly<{}>, {
|
|
3
|
-
label: string;
|
|
4
|
-
height: string | number;
|
|
5
|
-
value: number | null;
|
|
6
|
-
min: number;
|
|
7
|
-
max: number;
|
|
8
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
declare const _default: typeof __VLS_export;
|
|
10
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SkeletonVariant, VSkeletonProps } from "./types";
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<VSkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VSkeletonProps> & Readonly<{}>, {
|
|
3
|
-
variant: SkeletonVariant;
|
|
4
|
-
animated: boolean;
|
|
5
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
-
declare const _default: typeof __VLS_export;
|
|
7
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { VSkeletonGroupProps } from "./types";
|
|
2
|
-
declare var __VLS_1: {};
|
|
3
|
-
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof __VLS_1) => any;
|
|
5
|
-
};
|
|
6
|
-
declare const __VLS_base: import("vue").DefineComponent<VSkeletonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VSkeletonGroupProps> & Readonly<{}>, {
|
|
7
|
-
decorative: boolean;
|
|
8
|
-
gap: string;
|
|
9
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
-
declare const _default: typeof __VLS_export;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
-
new (): {
|
|
15
|
-
$slots: S;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { VSkeletonSwitchProps } from "./types";
|
|
2
|
-
declare var __VLS_1: {}, __VLS_3: {};
|
|
3
|
-
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof __VLS_1) => any;
|
|
5
|
-
} & {
|
|
6
|
-
skeleton?: (props: typeof __VLS_3) => any;
|
|
7
|
-
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<VSkeletonSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VSkeletonSwitchProps> & Readonly<{}>, {
|
|
9
|
-
label: string;
|
|
10
|
-
pattern: import("../VPatternSkeleton/types.js").SkeletonPattern;
|
|
11
|
-
animated: boolean;
|
|
12
|
-
loading: boolean;
|
|
13
|
-
rows: number;
|
|
14
|
-
showMedia: boolean;
|
|
15
|
-
showAvatar: boolean;
|
|
16
|
-
showHeader: boolean;
|
|
17
|
-
showChart: boolean;
|
|
18
|
-
showStats: boolean;
|
|
19
|
-
showSubmit: boolean;
|
|
20
|
-
showRating: boolean;
|
|
21
|
-
showPrice: boolean;
|
|
22
|
-
showCta: boolean;
|
|
23
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
-
declare const _default: typeof __VLS_export;
|
|
26
|
-
export default _default;
|
|
27
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
-
new (): {
|
|
29
|
-
$slots: S;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { VSpinnerProps } from "./types";
|
|
2
|
-
declare const __VLS_export: import("vue").DefineComponent<VSpinnerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VSpinnerProps> & Readonly<{}>, {
|
|
3
|
-
size: number;
|
|
4
|
-
color: string;
|
|
5
|
-
label: string;
|
|
6
|
-
decorative: boolean;
|
|
7
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
-
declare const _default: typeof __VLS_export;
|
|
9
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { UseLoadingReturn } from "./useLoading";
|
|
2
|
-
export interface UseDelayedLoadingOptions {
|
|
3
|
-
delay?: number;
|
|
4
|
-
minVisibleDuration?: number;
|
|
5
|
-
}
|
|
6
|
-
export type UseDelayedLoadingReturn = UseLoadingReturn;
|
|
7
|
-
export declare function useDelayedLoading(options?: UseDelayedLoadingOptions | number): UseDelayedLoadingReturn;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ComputedRef, type Ref } from "vue";
|
|
2
|
-
export type LoadingSource = Readonly<Ref<boolean>> | (() => boolean);
|
|
3
|
-
export interface UseLoadingGroupReturn {
|
|
4
|
-
isLoading: ComputedRef<boolean>;
|
|
5
|
-
activeCount: ComputedRef<number>;
|
|
6
|
-
}
|
|
7
|
-
export declare function useLoadingGroup(sources: readonly LoadingSource[] | (() => readonly LoadingSource[])): UseLoadingGroupReturn;
|
package/dist/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("vue");var t=(0,e.defineComponent)({__name:`index`,props:{size:{default:24},color:{default:`currentColor`},label:{default:`Loading`},decorative:{type:Boolean,default:!1}},setup(t){let n=t,r=(0,e.computed)(()=>Number.isFinite(n.size)?Math.max(0,n.size):24),i=(0,e.computed)(()=>{let e=typeof n.color==`string`?n.color.trim():``;return e.length>0?e:`currentColor`}),a=(0,e.computed)(()=>typeof n.label==`string`?n.label.trim():``),o=(0,e.computed)(()=>n.decorative||a.value.length===0),s=(0,e.computed)(()=>o.value?{"aria-hidden":`true`}:{role:`status`,"aria-label":a.value});return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,(0,e.mergeProps)({class:`v-spinner`},s.value),[(0,e.createElementVNode)(`span`,{class:`v-spinner__indicator`,"aria-hidden":`true`,style:(0,e.normalizeStyle)({width:`${r.value}px`,height:`${r.value}px`,borderTopColor:i.value})},null,4)],16))}}),n=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},r=n(t,[[`__scopeId`,`data-v-b967b6f4`]]);function i(e,t){if(typeof e==`number`)return Number.isFinite(e)?`${Math.max(0,e)}px`:t;if(typeof e==`string`){let n=e.trim();return n.length>0?n:t}return t}var a=n((0,e.defineComponent)({__name:`index`,props:{variant:{default:`text`},width:{},height:{},borderRadius:{},animated:{type:Boolean,default:!0},label:{}},setup(t){let n=t,r=(0,e.computed)(()=>{let e=n.variant;return e===`rect`||e===`circle`?e:`text`}),a=(0,e.computed)(()=>i(n.width,r.value===`circle`?`40px`:`100%`)),o=(0,e.computed)(()=>{if(n.height!==void 0)return i(n.height,r.value===`text`?`1em`:`6rem`);if(r.value!==`circle`)return r.value===`text`?`1em`:`6rem`}),s=(0,e.computed)(()=>{if(n.borderRadius===void 0)return;if(typeof n.borderRadius==`number`)return Number.isFinite(n.borderRadius)?`${Math.max(0,n.borderRadius)}px`:void 0;let e=n.borderRadius.trim();return e.length>0?e:void 0}),c=(0,e.computed)(()=>({width:a.value,height:o.value,borderRadius:s.value,aspectRatio:r.value===`circle`&&n.height===void 0?`1 / 1`:void 0})),l=(0,e.computed)(()=>typeof n.label==`string`?n.label.trim():``),u=(0,e.computed)(()=>l.value.length>0?{role:`status`,"aria-label":l.value,"aria-busy":`true`}:{"aria-hidden":`true`});return(n,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,(0,e.mergeProps)({class:[`v-skeleton`,[`v-skeleton--${r.value}`,{"v-skeleton--animated":t.animated}]],style:c.value},u.value),null,16))}}),[[`__scopeId`,`data-v-9a8cf481`]]),o=[`aria-label`,`aria-valuemin`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`],s=n((0,e.defineComponent)({__name:`index`,props:{value:{default:null},min:{default:0},max:{default:100},label:{default:`Progress`},valueText:{},height:{default:8},color:{},trackColor:{}},setup(t){let n=t;function r(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}let a=(0,e.computed)(()=>Number.isFinite(n.min)&&Number.isFinite(n.max)&&n.max>n.min),s=(0,e.computed)(()=>a.value?n.min:0),c=(0,e.computed)(()=>a.value?n.max:100),l=(0,e.computed)(()=>typeof n.value==`number`&&Number.isFinite(n.value)&&a.value),u=(0,e.computed)(()=>!l.value||typeof n.value!=`number`?s.value:Math.min(c.value,Math.max(s.value,n.value))),d=(0,e.computed)(()=>{if(!l.value)return 0;let e=c.value-s.value;return(u.value-s.value)/e*100}),f=(0,e.computed)(()=>typeof n.label==`string`?n.label.trim():``),p=(0,e.computed)(()=>{if(!l.value)return;let e=typeof n.valueText==`string`?n.valueText.trim():``;return e.length>0?e:void 0}),m=(0,e.computed)(()=>({height:i(n.height,`8px`),backgroundColor:r(n.trackColor)})),h=(0,e.computed)(()=>({width:l.value?`${d.value}%`:void 0,backgroundColor:r(n.color)}));return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`v-progress`,{"v-progress--indeterminate":!l.value,"v-progress--determinate":l.value}]),role:`progressbar`,"aria-label":f.value.length>0?f.value:void 0,"aria-valuemin":l.value?s.value:void 0,"aria-valuemax":l.value?c.value:void 0,"aria-valuenow":l.value?u.value:void 0,"aria-valuetext":p.value,style:(0,e.normalizeStyle)(m.value)},[(0,e.createElementVNode)(`div`,{class:`v-progress__bar`,"aria-hidden":`true`,style:(0,e.normalizeStyle)(h.value)},null,4)],14,o))}}),[[`__scopeId`,`data-v-8a7154ed`]]),c=[`aria-busy`],l=[`inert`],u={key:0,class:`v-loading__label`},d=n((0,e.defineComponent)({__name:`index`,props:{loading:{type:Boolean,default:!1},label:{default:`Loading`},inertContent:{type:Boolean,default:!0},indicatorSize:{default:28}},setup(t){let n=t,i=(0,e.computed)(()=>typeof n.label==`string`?n.label.trim():``),a=(0,e.computed)(()=>Number.isFinite(n.indicatorSize)?Math.max(0,n.indicatorSize):28),o=(0,e.computed)(()=>n.loading&&n.inertContent),s=(0,e.computed)(()=>i.value.length>0?{role:`status`}:{"aria-hidden":`true`});return(n,d)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`v-loading`,{"v-loading--active":t.loading,"v-loading--blocking":o.value}]),"aria-busy":t.loading?`true`:void 0},[(0,e.createElementVNode)(`div`,{class:`v-loading__content`,inert:o.value||void 0},[(0,e.renderSlot)(n.$slots,`default`,{},void 0,!0)],8,l),t.loading?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({key:0,class:`v-loading__overlay`},s.value),[(0,e.renderSlot)(n.$slots,`indicator`,{},()=>[(0,e.createVNode)(r,{size:a.value,decorative:``},null,8,[`size`])],!0),i.value.length>0?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,u,(0,e.toDisplayString)(i.value),1)):(0,e.createCommentVNode)(``,!0)],16)):(0,e.createCommentVNode)(``,!0)],10,c))}}),[[`__scopeId`,`data-v-ac332306`]]),f=[`type`,`disabled`,`aria-busy`],p={key:0,class:`v-loading-button__indicator`,"aria-hidden":`true`},m=n((0,e.defineComponent)({__name:`index`,props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:`button`},indicatorSize:{default:16}},setup(t){let n=t,i=(0,e.computed)(()=>n.disabled||n.loading),a=(0,e.computed)(()=>{let e=n.type;return e===`submit`||e===`reset`?e:`button`}),o=(0,e.computed)(()=>Number.isFinite(n.indicatorSize)?Math.max(0,n.indicatorSize):16);return(n,s)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{class:(0,e.normalizeClass)([`v-loading-button`,{"v-loading-button--loading":t.loading}]),type:a.value,disabled:i.value,"aria-busy":t.loading?`true`:void 0},[(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`v-loading-button__content`,{"v-loading-button__content--hidden":t.loading}])},[(0,e.renderSlot)(n.$slots,`default`,{},void 0,!0)],2),t.loading?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,p,[(0,e.renderSlot)(n.$slots,`indicator`,{},()=>[(0,e.createVNode)(r,{size:o.value,decorative:``},null,8,[`size`])],!0)])):(0,e.createCommentVNode)(``,!0)],10,f))}}),[[`__scopeId`,`data-v-323480f1`]]),h=`bars.blob.bounce.breathing.card-flip.dot-sweep.dots.dual-arc.element.equalizer.fallback.flow.gradient-ring.grid.hashtag.heatmap.liquid.logo-spin.morph.orbit-dots.orbit.plane.progress-ring.pulse.ring.ripple.rotate.signal.sliding-bars.snake.spin-dots.spin.squares.stair.typing.wave`.split(`.`),g={class:`v-loader__visual`,"aria-hidden":`true`},_={key:0,class:`v-loader__value`},v=n((0,e.defineComponent)({__name:`index`,props:{variant:{default:`spin`},color:{default:`currentColor`},size:{default:40},duration:{default:1e3},label:{default:`Loading`},decorative:{type:Boolean,default:!1},count:{},value:{default:null}},setup(t){let n=t,r={breathing:2,"dual-arc":2},i={grid:4,heatmap:9,squares:9};function a(e,t=``){return typeof e==`string`&&e.trim().length>0?e.trim():t}function o(e,t,n,r){if(typeof e!=`number`||!Number.isFinite(e))return t;let i=Math.max(n,e);return r===void 0?i:Math.min(r,i)}let s=(0,e.computed)(()=>{let e=typeof n.variant==`string`?n.variant:``;return h.find(t=>t===e)??`spin`}),c=(0,e.computed)(()=>o(n.size,40,12)),l=(0,e.computed)(()=>o(n.duration,1e3,100)),u=(0,e.computed)(()=>r[s.value]??Math.round(o(n.count,i[s.value]??4,1,12))),d=(0,e.computed)(()=>a(n.color,`currentColor`)),f=(0,e.computed)(()=>a(n.label)),p=(0,e.computed)(()=>!!n.decorative||f.value.length===0),m=(0,e.computed)(()=>typeof n.value==`number`&&Number.isFinite(n.value)?Math.min(100,Math.max(0,n.value)):null),v=(0,e.computed)(()=>p.value?{"aria-hidden":`true`}:{role:`status`,"aria-label":f.value}),y=(0,e.computed)(()=>({"--vl-size":`${c.value}px`,"--vl-color":d.value,"--vl-duration":`${l.value}ms`,"--vl-value":`${m.value??72}%`,"--vl-total":String(u.value)})),b=(0,e.computed)(()=>Array.from({length:u.value}));return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,(0,e.mergeProps)({class:[`v-loader`,`v-loader--${s.value}`],style:y.value},v.value),[(0,e.createElementVNode)(`span`,g,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(b.value,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:n,class:`v-loader__mark`,style:(0,e.normalizeStyle)({"--vl-index":n})},null,4))),128)),s.value===`progress-ring`&&m.value!==null?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,_,(0,e.toDisplayString)(Math.round(m.value))+`%`,1)):(0,e.createCommentVNode)(``,!0)])],16))}}),[[`__scopeId`,`data-v-f38f76f8`]]);function y(t,n){return(0,e.defineComponent)({name:t,inheritAttrs:!1,setup(t,{attrs:r,slots:i}){return()=>(0,e.h)(v,{...r,variant:n},i)}})}var b=y(`VBarsLoader`,`bars`),ee=y(`VBlobLoader`,`blob`),te=y(`VBounceLoader`,`bounce`),ne=y(`VBreathingLoader`,`breathing`),re=y(`VCardFlipLoader`,`card-flip`),ie=y(`VDotSweepLoader`,`dot-sweep`),x=y(`VDotsLoader`,`dots`),S=y(`VDualArcLoader`,`dual-arc`),C=y(`VElementLoader`,`element`),w=y(`VEqualizerLoader`,`equalizer`),T=y(`VFallbackLoader`,`fallback`),E=y(`VFlowLoader`,`flow`),D=y(`VGradientRingLoader`,`gradient-ring`),O=y(`VGridLoader`,`grid`),k=y(`VHashtagLoader`,`hashtag`),A=y(`VHeatmapLoader`,`heatmap`),j=y(`VLiquidLoader`,`liquid`),M=y(`VLogoSpinLoader`,`logo-spin`),N=y(`VMorphLoader`,`morph`),P=y(`VOrbitDotsLoader`,`orbit-dots`),F=y(`VOrbitLoader`,`orbit`),I=y(`VPlaneLoader`,`plane`),L=y(`VProgressRingLoader`,`progress-ring`),R=y(`VPulseLoader`,`pulse`),z=y(`VRingLoader`,`ring`),B=y(`VRippleLoader`,`ripple`),V=y(`VRotateLoader`,`rotate`),H=y(`VSignalLoader`,`signal`),U=y(`VSlidingBarsLoader`,`sliding-bars`),W=y(`VSnakeLoader`,`snake`),G=y(`VSpinDotsLoader`,`spin-dots`),K=y(`VSpinLoader`,`spin`),q=y(`VSquaresLoader`,`squares`),J=y(`VStairLoader`,`stair`),ae=y(`VTypingLoader`,`typing`),oe=y(`VWaveLoader`,`wave`),se={class:`v-pattern-skeleton__body`},ce={key:1,class:`v-pattern-skeleton__stats`},le={class:`v-pattern-skeleton__body`},ue={class:`v-pattern-skeleton__body`},de={key:1,class:`v-pattern-skeleton__inline`},fe={key:0,class:`v-pattern-skeleton__stats`},pe={class:`v-pattern-skeleton__body`},Y=n((0,e.defineComponent)({__name:`index`,props:{pattern:{default:`lines`},rows:{default:3},columns:{default:3},mediaHeight:{},avatarSize:{},showMedia:{type:Boolean,default:!0},showAvatar:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showChart:{type:Boolean,default:!0},showStats:{type:Boolean,default:!0},showSubmit:{type:Boolean,default:!0},showRating:{type:Boolean,default:!0},showPrice:{type:Boolean,default:!0},showCta:{type:Boolean,default:!0},color:{},highlightColor:{},animated:{type:Boolean,default:!0},label:{}},setup(t){let n=t,r=[`lines`,`article`,`card`,`profile`,`list`,`table`,`media`,`form`,`dashboard`,`feed`,`product`];function i(e,t,n=12){return typeof e==`number`&&Number.isFinite(e)?Math.min(n,Math.max(1,Math.round(e))):t}function o(e){return typeof e==`string`&&e.trim()?e.trim():void 0}let s=(0,e.computed)(()=>r.includes(n.pattern)?n.pattern:`lines`),c=(0,e.computed)(()=>i(n.rows,3)),l=(0,e.computed)(()=>i(n.columns,3,6)),u=(0,e.computed)(()=>i(n.avatarSize,48,160)),d=(0,e.computed)(()=>o(n.label)??``),f=(0,e.computed)(()=>d.value?{role:`status`,"aria-label":d.value,"aria-busy":`true`}:{"aria-hidden":`true`}),p=(0,e.computed)(()=>({"--v-skeleton-base-color":o(n.color),"--v-skeleton-highlight-color":o(n.highlightColor)})),m=(0,e.computed)(()=>({gridTemplateColumns:`repeat(${l.value}, minmax(0, 1fr))`}));return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({class:[`v-pattern-skeleton`,`v-pattern-skeleton--${s.value}`],style:p.value},f.value),[s.value===`profile`?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[t.showAvatar?((0,e.openBlock)(),(0,e.createBlock)(a,{key:0,variant:`circle`,animated:t.animated,width:u.value},null,8,[`animated`,`width`])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,se,[(0,e.createVNode)(a,{animated:t.animated,width:`42%`,height:`1rem`},null,8,[`animated`]),(0,e.createVNode)(a,{animated:t.animated,width:`64%`,height:`.75rem`},null,8,[`animated`]),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,animated:t.animated,width:n===c.value?`62%`:`100%`,height:`.7rem`},null,8,[`animated`,`width`]))),128))]),t.showStats?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ce,[((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(3,n=>(0,e.createVNode)(a,{key:n,variant:`rect`,animated:t.animated,height:`2.5rem`},null,8,[`animated`])),64))])):(0,e.createCommentVNode)(``,!0)],64)):s.value===`feed`?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:1},(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:n,class:`v-pattern-skeleton__feed-item`},[t.showAvatar?((0,e.openBlock)(),(0,e.createBlock)(a,{key:0,variant:`circle`,animated:t.animated,width:u.value},null,8,[`animated`,`width`])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,le,[(0,e.createVNode)(a,{animated:t.animated,width:`40%`,height:`.85rem`},null,8,[`animated`]),(0,e.createVNode)(a,{animated:t.animated,width:`100%`,height:`.75rem`},null,8,[`animated`]),(0,e.createVNode)(a,{animated:t.animated,width:`72%`,height:`.75rem`},null,8,[`animated`])])]))),128)):s.value===`media`?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:2},[(0,e.createVNode)(a,{variant:`rect`,animated:t.animated,width:t.mediaHeight?t.mediaHeight:`7.5rem`,height:`5.5rem`},null,8,[`animated`,`width`]),(0,e.createElementVNode)(`div`,ue,[(0,e.createVNode)(a,{animated:t.animated,width:`36%`,height:`.7rem`},null,8,[`animated`]),(0,e.createVNode)(a,{animated:t.animated,width:`100%`,height:`1rem`},null,8,[`animated`]),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,animated:t.animated,width:n===c.value?`62%`:`86%`,height:`.7rem`},null,8,[`animated`,`width`]))),128))])],64)):s.value===`product`?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:3},[(0,e.createVNode)(a,{variant:`rect`,animated:t.animated,width:`100%`,height:t.mediaHeight??`10rem`},null,8,[`animated`,`height`]),(0,e.createVNode)(a,{animated:t.animated,width:`74%`,height:`1rem`},null,8,[`animated`]),t.showRating?((0,e.openBlock)(),(0,e.createBlock)(a,{key:0,variant:`rect`,animated:t.animated,width:`4.5rem`,height:`1.25rem`},null,8,[`animated`])):(0,e.createCommentVNode)(``,!0),t.showPrice?((0,e.openBlock)(),(0,e.createBlock)(a,{key:1,animated:t.animated,width:`35%`,height:`1.15rem`},null,8,[`animated`])):(0,e.createCommentVNode)(``,!0),t.showCta?((0,e.openBlock)(),(0,e.createBlock)(a,{key:2,variant:`rect`,animated:t.animated,width:`46%`,height:`2.25rem`},null,8,[`animated`])):(0,e.createCommentVNode)(``,!0)],64)):s.value===`card`?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:4},[t.showMedia?((0,e.openBlock)(),(0,e.createBlock)(a,{key:0,variant:`rect`,animated:t.animated,width:`100%`,height:t.mediaHeight??`6rem`},null,8,[`animated`,`height`])):(0,e.createCommentVNode)(``,!0),t.showAvatar?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,de,[(0,e.createVNode)(a,{variant:`circle`,animated:t.animated,width:u.value},null,8,[`animated`,`width`]),(0,e.createVNode)(a,{animated:t.animated,width:`45%`,height:`.8rem`},null,8,[`animated`])])):(0,e.createCommentVNode)(``,!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,animated:t.animated,width:n===c.value?`72%`:`100%`,height:`.75rem`},null,8,[`animated`,`width`]))),128))],64)):s.value===`table`?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:5},[t.showHeader?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:`v-pattern-skeleton__table-row v-pattern-skeleton__table-header`,style:(0,e.normalizeStyle)(m.value)},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(l.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,animated:t.animated,height:`.9rem`},null,8,[`animated`]))),128))],4)):(0,e.createCommentVNode)(``,!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:n,class:`v-pattern-skeleton__table-row v-pattern-skeleton__data-row`,style:(0,e.normalizeStyle)(m.value)},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(l.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,animated:t.animated,height:`.75rem`},null,8,[`animated`]))),128))],4))),128))],64)):s.value===`dashboard`?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:6},[t.showStats?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,fe,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(l.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,variant:`rect`,animated:t.animated,height:`4.5rem`},null,8,[`animated`]))),128))])):(0,e.createCommentVNode)(``,!0),t.showChart?((0,e.openBlock)(),(0,e.createBlock)(a,{key:1,variant:`rect`,animated:t.animated,width:`100%`,height:t.mediaHeight??`9rem`},null,8,[`animated`,`height`])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,{class:`v-pattern-skeleton__table-row v-pattern-skeleton__table-header`,style:(0,e.normalizeStyle)(m.value)},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(l.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,animated:t.animated,height:`.7rem`},null,8,[`animated`]))),128))],4),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:n,class:`v-pattern-skeleton__table-row v-pattern-skeleton__data-row`,style:(0,e.normalizeStyle)(m.value)},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(l.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,animated:t.animated,height:`.65rem`},null,8,[`animated`]))),128))],4))),128))],64)):s.value===`form`?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:7},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:n,class:`v-pattern-skeleton__field`},[(0,e.createVNode)(a,{animated:t.animated,width:`30%`,height:`.7rem`},null,8,[`animated`]),(0,e.createVNode)(a,{variant:`rect`,animated:t.animated,width:`100%`,height:`2.5rem`},null,8,[`animated`])]))),128)),t.showSubmit?((0,e.openBlock)(),(0,e.createBlock)(a,{key:0,variant:`rect`,animated:t.animated,width:`8rem`,height:`2.5rem`},null,8,[`animated`])):(0,e.createCommentVNode)(``,!0)],64)):s.value===`list`?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:8},(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:n,class:`v-pattern-skeleton__feed-item`},[t.showAvatar?((0,e.openBlock)(),(0,e.createBlock)(a,{key:0,variant:`circle`,animated:t.animated,width:u.value},null,8,[`animated`,`width`])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,pe,[(0,e.createVNode)(a,{animated:t.animated,width:`76%`,height:`.85rem`},null,8,[`animated`]),(0,e.createVNode)(a,{animated:t.animated,width:`54%`,height:`.7rem`},null,8,[`animated`])])]))),128)):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:9},[s.value===`article`&&t.showMedia?((0,e.openBlock)(),(0,e.createBlock)(a,{key:0,variant:`rect`,animated:t.animated,width:`100%`,height:t.mediaHeight??`10rem`},null,8,[`animated`,`height`])):(0,e.createCommentVNode)(``,!0),s.value===`article`?((0,e.openBlock)(),(0,e.createBlock)(a,{key:1,animated:t.animated,width:`72%`,height:`1.35rem`},null,8,[`animated`])):(0,e.createCommentVNode)(``,!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value,n=>((0,e.openBlock)(),(0,e.createBlock)(a,{key:n,animated:t.animated,width:n===c.value?`62%`:`100%`,height:`.8rem`},null,8,[`animated`,`width`]))),128))],64))],16))}}),[[`__scopeId`,`data-v-e1a021e1`]]),me=n((0,e.defineComponent)({__name:`index`,props:{label:{},gap:{default:`0.75rem`},decorative:{type:Boolean,default:!1}},setup(t){let n=t,r=(0,e.computed)(()=>typeof n.label==`string`?n.label.trim():``),i=(0,e.computed)(()=>n.decorative?{"aria-hidden":`true`}:r.value?{role:`status`,"aria-label":r.value,"aria-busy":`true`}:{});return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({class:`v-skeleton-group`,style:{gap:t.gap}},i.value),[(0,e.renderSlot)(n.$slots,`default`,{},void 0,!0)],16))}}),[[`__scopeId`,`data-v-6a86d8c9`]]),X=(0,e.defineComponent)({__name:`index`,props:{loading:{type:Boolean,default:!0},pattern:{default:`lines`},rows:{default:3},columns:{},mediaHeight:{},avatarSize:{},showMedia:{type:Boolean,default:!0},showAvatar:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showChart:{type:Boolean,default:!0},showStats:{type:Boolean,default:!0},showSubmit:{type:Boolean,default:!0},showRating:{type:Boolean,default:!0},showPrice:{type:Boolean,default:!0},showCta:{type:Boolean,default:!0},color:{},highlightColor:{},animated:{type:Boolean,default:!0},label:{default:`Loading content`}},setup(t){let n=t,r=(0,e.computed)(()=>({pattern:n.pattern,rows:n.rows,columns:n.columns,color:n.color,highlightColor:n.highlightColor,animated:n.animated,label:n.label,mediaHeight:n.mediaHeight,avatarSize:n.avatarSize,showMedia:n.showMedia,showAvatar:n.showAvatar,showHeader:n.showHeader,showChart:n.showChart,showStats:n.showStats,showSubmit:n.showSubmit,showRating:n.showRating,showPrice:n.showPrice,showCta:n.showCta}));return(n,i)=>t.loading?(0,e.renderSlot)(n.$slots,`skeleton`,{},()=>[(0,e.createVNode)(Y,(0,e.normalizeProps)((0,e.guardReactiveProps)(r.value)),null,16)],void 0,1):(0,e.renderSlot)(n.$slots,`default`,{},void 0,void 0,0)}}),he=a;function Z(t,n){return(0,e.defineComponent)({name:t,inheritAttrs:!1,setup(t,{attrs:r}){return()=>(0,e.h)(Y,{...r,pattern:n})}})}var ge=Z(`VArticleSkeleton`,`article`),_e=Z(`VCardSkeleton`,`card`),ve=Z(`VDashboardSkeleton`,`dashboard`),ye=Z(`VFeedSkeleton`,`feed`),be=Z(`VFormSkeleton`,`form`),xe=Z(`VListSkeleton`,`list`),Q=Z(`VMediaCardSkeleton`,`media`),Se=Z(`VProductCardSkeleton`,`product`),Ce=Z(`VProfileSkeleton`,`profile`),we=Z(`VTableSkeleton`,`table`),Te=(0,e.defineComponent)({name:`VAutoSkeleton`,inheritAttrs:!1,props:[`loading`,`pattern`,`rows`,`columns`,`color`,`highlightColor`,`animated`,`label`,`mediaHeight`,`avatarSize`,`showMedia`,`showAvatar`,`showHeader`,`showChart`,`showStats`,`showSubmit`,`showRating`,`showPrice`,`showCta`],setup(t,{attrs:n,slots:r}){return()=>(0,e.h)(X,{...n,...t},r)}});function Ee(){let t=(0,e.ref)(0),n=(0,e.computed)(()=>t.value>0),r=(0,e.readonly)(t);async function i(e){t.value++;try{return await e()}finally{t.value=Math.max(0,t.value-1)}}return{isLoading:n,pendingCount:r,execute:i}}var De=200;function $(e,t){return e===void 0||!Number.isFinite(e)?t:Math.max(0,e)}function Oe(t){let n=typeof t==`number`?t:t?.delay,r=typeof t==`number`?0:t?.minVisibleDuration,i=$(n,De),a=$(r,0),o=(0,e.ref)(0),s=(0,e.ref)(!1),c=(0,e.readonly)(s),l=(0,e.readonly)(o),u=null,d=null,f=null,p=!1;function m(){u!==null&&(clearTimeout(u),u=null)}function h(){d!==null&&(clearTimeout(d),d=null)}function g(){s.value=!0,f=Date.now()}function _(){p||s.value||u!==null||o.value===0||(i<=0?g():u=setTimeout(()=>{u=null,!p&&o.value>0&&g()},i))}function v(){if(m(),h(),!s.value){f=null;return}if(a<=0||f===null){s.value=!1,f=null;return}let e=a-(Date.now()-f);e<=0?(s.value=!1,f=null):d=setTimeout(()=>{d=null,!p&&o.value===0&&(s.value=!1,f=null)},e)}(0,e.getCurrentScope)()&&(0,e.onScopeDispose)(()=>{p=!0,m(),h(),s.value=!1,f=null});async function y(e){o.value++,h(),_();try{return await e()}finally{o.value=Math.max(0,o.value-1),o.value===0&&v()}}return{isLoading:c,pendingCount:l,execute:y}}function ke(t){let n=typeof t==`function`?t:()=>t,r=(0,e.computed)(()=>{let e=0;for(let t of n())(typeof t==`function`?t():t.value)&&e++;return e});return{isLoading:(0,e.computed)(()=>r.value>0),activeCount:r}}exports.VArticleSkeleton=ge,exports.VAutoSkeleton=Te,exports.VBarsLoader=b,exports.VBlobLoader=ee,exports.VBounceLoader=te,exports.VBreathingLoader=ne,exports.VCardFlipLoader=re,exports.VCardSkeleton=_e,exports.VDashboardSkeleton=ve,exports.VDotSweepLoader=ie,exports.VDotsLoader=x,exports.VDualArcLoader=S,exports.VElementLoader=C,exports.VEqualizerLoader=w,exports.VFallbackLoader=T,exports.VFeedSkeleton=ye,exports.VFlowLoader=E,exports.VFormSkeleton=be,exports.VGradientRingLoader=D,exports.VGridLoader=O,exports.VHashtagLoader=k,exports.VHeatmapLoader=A,exports.VLiquidLoader=j,exports.VListSkeleton=xe,exports.VLoader=v,exports.VLoading=d,exports.VLoadingButton=m,exports.VLogoSpinLoader=M,exports.VMediaCardSkeleton=Q,exports.VMorphLoader=N,exports.VOrbitDotsLoader=P,exports.VOrbitLoader=F,exports.VPatternSkeleton=Y,exports.VPlaneLoader=I,exports.VProductCardSkeleton=Se,exports.VProfileSkeleton=Ce,exports.VProgress=s,exports.VProgressRingLoader=L,exports.VPulseLoader=R,exports.VRingLoader=z,exports.VRippleLoader=B,exports.VRotateLoader=V,exports.VSignalLoader=H,exports.VSkeleton=a,exports.VSkeletonGroup=me,exports.VSkeletonLoader=he,exports.VSkeletonSwitch=X,exports.VSlidingBarsLoader=U,exports.VSnakeLoader=W,exports.VSpinDotsLoader=G,exports.VSpinLoader=K,exports.VSpinner=r,exports.VSquaresLoader=q,exports.VStairLoader=J,exports.VTableSkeleton=we,exports.VTypingLoader=ae,exports.VWaveLoader=oe,exports.useDelayedLoading=Oe,exports.useLoading=Ee,exports.useLoadingGroup=ke;
|
package/dist/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export { default as VSpinner } from "./components/VSpinner/index.vue";
|
|
2
|
-
export type { VSpinnerProps } from "./components/VSpinner/types";
|
|
3
|
-
export { default as VSkeleton } from "./components/VSkeleton/index.vue";
|
|
4
|
-
export type { VSkeletonProps, SkeletonVariant, } from "./components/VSkeleton/types";
|
|
5
|
-
export { default as VProgress } from "./components/VProgress/index.vue";
|
|
6
|
-
export type { VProgressProps } from "./components/VProgress/types";
|
|
7
|
-
export { default as VLoading } from "./components/VLoading/index.vue";
|
|
8
|
-
export type { VLoadingProps } from "./components/VLoading/types";
|
|
9
|
-
export { default as VLoadingButton } from "./components/VLoadingButton/index.vue";
|
|
10
|
-
export type { VLoadingButtonProps, LoadingButtonType, } from "./components/VLoadingButton/types";
|
|
11
|
-
export { default as VLoader } from "./components/VLoader/index.vue";
|
|
12
|
-
export { VBarsLoader, VBlobLoader, VBounceLoader, VBreathingLoader, VCardFlipLoader, VDotSweepLoader, VDotsLoader, VDualArcLoader, VElementLoader, VEqualizerLoader, VFallbackLoader, VFlowLoader, VGradientRingLoader, VGridLoader, VHashtagLoader, VHeatmapLoader, VLiquidLoader, VLogoSpinLoader, VMorphLoader, VOrbitDotsLoader, VOrbitLoader, VPlaneLoader, VProgressRingLoader, VPulseLoader, VRingLoader, VRippleLoader, VRotateLoader, VSignalLoader, VSlidingBarsLoader, VSnakeLoader, VSpinDotsLoader, VSpinLoader, VSquaresLoader, VStairLoader, VTypingLoader, VWaveLoader, } from "./components/VLoader/loaders";
|
|
13
|
-
export type { LoaderVariant, NamedLoaderProps, VLoaderProps, VMarkLoaderProps, VProgressRingLoaderProps } from "./components/VLoader/types";
|
|
14
|
-
export { default as VPatternSkeleton } from "./components/VPatternSkeleton/index.vue";
|
|
15
|
-
export { default as VSkeletonGroup } from "./components/VSkeletonGroup/index.vue";
|
|
16
|
-
export type { VSkeletonGroupProps } from "./components/VSkeletonGroup/types";
|
|
17
|
-
export { default as VSkeletonSwitch } from "./components/VSkeletonSwitch/index.vue";
|
|
18
|
-
export type { VSkeletonSwitchProps } from "./components/VSkeletonSwitch/types";
|
|
19
|
-
export { VAutoSkeleton, VArticleSkeleton, VCardSkeleton, VDashboardSkeleton, VFeedSkeleton, VFormSkeleton, VListSkeleton, VMediaCardSkeleton, VProductCardSkeleton, VProfileSkeleton, VSkeletonLoader, VTableSkeleton, } from "./components/VPatternSkeleton/presets";
|
|
20
|
-
export type { VAutoSkeletonProps } from "./components/VPatternSkeleton/presets";
|
|
21
|
-
export type { NamedSkeletonProps, SkeletonPattern, VArticleSkeletonProps, VCardSkeletonProps, VDashboardSkeletonProps, VFeedSkeletonProps, VFormSkeletonProps, VListSkeletonProps, VMediaCardSkeletonProps, VPatternSkeletonProps, VProductCardSkeletonProps, VProfileSkeletonProps, VTableSkeletonProps, } from "./components/VPatternSkeleton/types";
|
|
22
|
-
export { useLoading, type UseLoadingReturn } from "./composables/useLoading";
|
|
23
|
-
export { useDelayedLoading, type UseDelayedLoadingOptions, type UseDelayedLoadingReturn, } from "./composables/useDelayedLoading";
|
|
24
|
-
export { useLoadingGroup, type UseLoadingGroupReturn, type LoadingSource, } from "./composables/useLoadingGroup";
|