veload 0.0.0-stage → 0.1.1

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.
Files changed (31) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +138 -3
  3. package/dist/components/VLoader/index.vue.d.ts +12 -0
  4. package/dist/components/VLoader/loaders.d.ts +38 -0
  5. package/dist/components/VLoader/types.d.ts +28 -0
  6. package/dist/components/VLoading/index.vue.d.ts +21 -0
  7. package/dist/components/VLoading/types.d.ts +27 -0
  8. package/dist/components/VLoadingButton/index.vue.d.ts +21 -0
  9. package/dist/components/VLoadingButton/types.d.ts +29 -0
  10. package/dist/components/VPatternSkeleton/index.vue.d.ts +18 -0
  11. package/dist/components/VPatternSkeleton/presets.d.ts +26 -0
  12. package/dist/components/VPatternSkeleton/types.d.ts +48 -0
  13. package/dist/components/VProgress/index.vue.d.ts +10 -0
  14. package/dist/components/VProgress/types.d.ts +45 -0
  15. package/dist/components/VSkeleton/index.vue.d.ts +7 -0
  16. package/dist/components/VSkeleton/types.d.ts +37 -0
  17. package/dist/components/VSkeletonGroup/index.vue.d.ts +17 -0
  18. package/dist/components/VSkeletonGroup/types.d.ts +8 -0
  19. package/dist/components/VSkeletonSwitch/index.vue.d.ts +31 -0
  20. package/dist/components/VSkeletonSwitch/types.d.ts +5 -0
  21. package/dist/components/VSpinner/index.vue.d.ts +9 -0
  22. package/dist/components/VSpinner/types.d.ts +29 -0
  23. package/dist/composables/useDelayedLoading.d.ts +32 -0
  24. package/dist/composables/useLoading.d.ts +28 -0
  25. package/dist/composables/useLoadingGroup.d.ts +25 -0
  26. package/dist/index.cjs +1 -0
  27. package/dist/index.d.ts +24 -0
  28. package/dist/index.js +851 -0
  29. package/dist/style.css +2 -0
  30. package/dist/utils/css.d.ts +7 -0
  31. package/package.json +70 -6
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shehab Muhammed
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,138 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # Veload
2
+
3
+ Accessible loading UI for Vue 3: animated loaders, skeleton placeholders, progress indicators, and loading-state components with TypeScript support.
4
+
5
+ ## Key features
6
+
7
+ - `VSpinner`, `VLoader`, and 36 individually importable loader components.
8
+ - Skeleton primitives, patterns, and named layout presets.
9
+ - Determinate and indeterminate progress indicators.
10
+ - Loading overlays and a loading-aware button.
11
+ - Composables for tracking, delaying, and grouping async loading states.
12
+ - TypeScript declarations and a shared stylesheet.
13
+ - Accessible status and progress semantics, plus reduced-motion support.
14
+ - Vue components that can be rendered with Nuxt SSR.
15
+
16
+ ## Installation
17
+
18
+ Veload requires Vue `^3.5.2` as a peer dependency.
19
+
20
+ ```bash
21
+ npm install veload
22
+ ```
23
+
24
+ Import the stylesheet once in your application entry point:
25
+
26
+ ```ts
27
+ import "veload/style.css";
28
+ ```
29
+
30
+ ## Quick Start
31
+
32
+ Use Veload in a Vue 3 + TypeScript single-file component. This example simulates an async operation; replace it with your application’s work.
33
+
34
+ ```vue
35
+ <script setup lang="ts">
36
+ import { ref } from "vue";
37
+ import { VLoading, useLoading } from "veload";
38
+ import "veload/style.css";
39
+
40
+ const { isLoading, execute } = useLoading();
41
+ const message = ref("Not loaded yet");
42
+
43
+ async function load() {
44
+ await execute(async () => {
45
+ await new Promise<void>((resolve) => setTimeout(resolve, 400));
46
+ message.value = "Ready";
47
+ });
48
+ }
49
+ </script>
50
+
51
+ <template>
52
+ <VLoading :loading="isLoading" label="Loading message">
53
+ <button type="button" @click="load">Load message</button>
54
+ <p>{{ message }}</p>
55
+ </VLoading>
56
+ </template>
57
+ ```
58
+
59
+ ## Components and composables
60
+
61
+ All components and composables are named exports from `veload`; there is no plugin to register with `app.use()`.
62
+
63
+ **Loading and progress:** `VSpinner`, `VProgress`, `VLoading`, `VLoadingButton`.
64
+
65
+ **Loader collection:** `VLoader` selects a treatment with its `variant` prop. Individual loader components are also exported:
66
+
67
+ - **Motion:** `VBarsLoader`, `VBounceLoader`, `VDotsLoader`, `VDotSweepLoader`, `VEqualizerLoader`, `VSlidingBarsLoader`, `VSpinLoader`, `VSpinDotsLoader`, `VTypingLoader`, `VWaveLoader`.
68
+ - **Circular:** `VBreathingLoader`, `VDualArcLoader`, `VGradientRingLoader`, `VOrbitDotsLoader`, `VOrbitLoader`, `VProgressRingLoader`, `VPulseLoader`, `VRingLoader`, `VRippleLoader`, `VRotateLoader`, `VSignalLoader`, `VSnakeLoader`.
69
+ - **Geometric:** `VBlobLoader`, `VCardFlipLoader`, `VElementLoader`, `VFlowLoader`, `VGridLoader`, `VHashtagLoader`, `VHeatmapLoader`, `VLiquidLoader`, `VLogoSpinLoader`, `VMorphLoader`, `VPlaneLoader`, `VSquaresLoader`, `VStairLoader`.
70
+ - **Utility:** `VFallbackLoader`.
71
+
72
+ **Skeletons:** `VSkeleton` (`VSkeletonLoader` alias), `VPatternSkeleton`, `VSkeletonGroup`, `VSkeletonSwitch`, `VAutoSkeleton`, and the presets `VArticleSkeleton`, `VCardSkeleton`, `VDashboardSkeleton`, `VFeedSkeleton`, `VFormSkeleton`, `VListSkeleton`, `VMediaCardSkeleton`, `VProductCardSkeleton`, `VProfileSkeleton`, and `VTableSkeleton`.
73
+
74
+ **Composables:** `useLoading()`, `useDelayedLoading(options?)`, and `useLoadingGroup(sources)`.
75
+
76
+ ## Usage examples
77
+
78
+ ### Loader and skeleton
79
+
80
+ ```vue
81
+ <VSpinner :size="32" label="Loading products" />
82
+ <VLoader variant="wave" label="Loading results" />
83
+ <VSkeleton variant="rect" width="100%" height="8rem" />
84
+ <VCardSkeleton />
85
+ ```
86
+
87
+ ### Progress
88
+
89
+ ```vue
90
+ <VProgress :value="42" label="Uploading files" value-text="42%" />
91
+ <VProgress label="Preparing download" />
92
+ ```
93
+
94
+ Omit `value` for an indeterminate progress bar.
95
+
96
+ ### Loading-aware button
97
+
98
+ ```vue
99
+ <VLoadingButton :loading="isSaving" type="submit">
100
+ Save changes
101
+ </VLoadingButton>
102
+ ```
103
+
104
+ ### Delayed and grouped loading states
105
+
106
+ ```ts
107
+ import { useDelayedLoading, useLoading, useLoadingGroup } from "veload";
108
+
109
+ const search = useDelayedLoading({ delay: 200, minVisibleDuration: 300 });
110
+ const products = useLoading();
111
+ const categories = useLoading();
112
+ const catalogLoading = useLoadingGroup([
113
+ products.isLoading,
114
+ categories.isLoading,
115
+ ]);
116
+
117
+ await search.execute(() => fetchResults());
118
+ ```
119
+
120
+ `useLoading()` tracks overlapping promises and exposes `isLoading`, `pendingCount`, and `execute`. `useDelayedLoading()` provides the same API with optional display delay and minimum visible duration. `useLoadingGroup()` derives a combined state from reactive loading sources.
121
+
122
+ ## Accessibility and reduced motion
123
+
124
+ `VSpinner`, `VLoader`, and `VLoading` expose labeled status semantics. `VLoading` and `VLoadingButton` expose busy state, and determinate `VProgress` exposes its range and value. Skeletons are decorative and hidden from assistive technology by default, or can expose a status label. Loaders provide a `decorative` option when an ancestor already announces loading. Animations respect the user’s `prefers-reduced-motion` setting.
125
+
126
+ ## SSR compatibility
127
+
128
+ Veload components can render with Vue SSR and Nuxt; they do not require a client-only wrapper. Create composables inside component setup rather than at module scope so mutable state is not shared between server requests. Use your framework’s server-aware data-fetching APIs for initial data; loading composables track async work but do not replace data fetching or hydration.
129
+
130
+ ## Playground and documentation
131
+
132
+ Explore the components and examples in the [Veload playground](https://veload-playground.vercel.app). Browse the [installation guide](https://veload-playground.vercel.app/docs/installation), [API guide](https://veload-playground.vercel.app/docs/api), and [accessibility guide](https://veload-playground.vercel.app/docs/accessibility).
133
+
134
+ The source repository is [Shehab-Mo/veload](https://github.com/Shehab-Mo/veload).
135
+
136
+ ## License
137
+
138
+ [MIT](https://github.com/Shehab-Mo/veload/blob/main/pcakage/LICENSE)
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,38 @@
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>;
@@ -0,0 +1,28 @@
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
+ /** Visual treatment used by the loader. */
5
+ variant?: LoaderVariant;
6
+ /** Primary color. @default "currentColor" */
7
+ color?: string;
8
+ /** Base size in pixels; repeated treatments may grow to fit count. @default 40 */
9
+ size?: number;
10
+ /** Animation duration in milliseconds. @default 1000 */
11
+ duration?: number;
12
+ /** Accessible name announced by the status region. @default "Loading" */
13
+ label?: string;
14
+ /** Hides the loader from assistive technology. @default false */
15
+ decorative?: boolean;
16
+ /** Repeated marks, rounded and clamped to 1–12. Fixed-shape treatments ignore it. @default 4 */
17
+ count?: number;
18
+ /** Optional completion value for the progress-ring treatment, from 0 to 100. */
19
+ value?: number | null;
20
+ }
21
+ export type NamedLoaderProps = Omit<VLoaderProps, "variant">;
22
+ /** Props shared by treatments that render repeated marks. */
23
+ export type VMarkLoaderProps = Omit<NamedLoaderProps, "value">;
24
+ /** Props specific to the determinate or indeterminate progress-ring treatment. */
25
+ export interface VProgressRingLoaderProps extends Omit<NamedLoaderProps, "value"> {
26
+ /** Completion percentage from 0 to 100. Omit for an indeterminate ring. */
27
+ value?: number | null;
28
+ }
@@ -0,0 +1,21 @@
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
+ };
@@ -0,0 +1,27 @@
1
+ export interface VLoadingProps {
2
+ /**
3
+ * Whether the loading overlay is active.
4
+ *
5
+ * @default false
6
+ */
7
+ loading?: boolean;
8
+ /**
9
+ * Accessible loading message. The text is visually hidden by default.
10
+ *
11
+ * @default "Loading"
12
+ */
13
+ label?: string;
14
+ /**
15
+ * Makes the wrapped content inert while the overlay is active. This prevents
16
+ * pointer and keyboard interaction with content beneath the overlay.
17
+ *
18
+ * @default true
19
+ */
20
+ inertContent?: boolean;
21
+ /**
22
+ * Diameter of the default spinner in pixels.
23
+ *
24
+ * @default 28
25
+ */
26
+ indicatorSize?: number;
27
+ }
@@ -0,0 +1,21 @@
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
+ };
@@ -0,0 +1,29 @@
1
+ export type LoadingButtonType = "button" | "submit" | "reset";
2
+ export interface VLoadingButtonProps {
3
+ /**
4
+ * Whether the button is performing work. While loading, the button is
5
+ * disabled, exposes `aria-busy`, and shows an indicator.
6
+ *
7
+ * @default false
8
+ */
9
+ loading?: boolean;
10
+ /**
11
+ * Native disabled state. The button is also disabled while loading.
12
+ *
13
+ * @default false
14
+ */
15
+ disabled?: boolean;
16
+ /**
17
+ * Native button type. Defaults to `"button"` so the component does not
18
+ * accidentally submit a surrounding form.
19
+ *
20
+ * @default "button"
21
+ */
22
+ type?: LoadingButtonType;
23
+ /**
24
+ * Diameter of the default indicator in pixels.
25
+ *
26
+ * @default 16
27
+ */
28
+ indicatorSize?: number;
29
+ }
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1,26 @@
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
+ /**
19
+ * A safe content switcher for Vue skeleton states.
20
+ *
21
+ * Unlike React Loadly's experimental DOM-inference API, this component never
22
+ * executes or inspects slot content. It renders a supplied skeleton slot or a
23
+ * selected Veload pattern while loading, then renders the default slot.
24
+ */
25
+ export type VAutoSkeletonProps = VSkeletonSwitchProps;
26
+ export declare const VAutoSkeleton: DefineComponent<VAutoSkeletonProps>;
@@ -0,0 +1,48 @@
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
+ /** Layout pattern. @default "lines" */
10
+ pattern?: SkeletonPattern;
11
+ /** Repeated lines, items, fields, or data rows (1–12). Table/dashboard headers are separate; dashboard always includes one header. @default 3 */
12
+ rows?: number;
13
+ /** Table column count. @default 3 */
14
+ columns?: number;
15
+ /** Image or media height in pixels or a CSS length. */
16
+ mediaHeight?: number | string;
17
+ /** Avatar diameter in pixels. */
18
+ avatarSize?: number;
19
+ /** Enables optional media blocks where the pattern supports them. @default true */
20
+ showMedia?: boolean;
21
+ /** Enables optional avatar blocks where the pattern supports them. @default true */
22
+ showAvatar?: boolean;
23
+ /** Enables a table header. @default true */
24
+ showHeader?: boolean;
25
+ /** Enables the dashboard chart block. @default true */
26
+ showChart?: boolean;
27
+ /** Enables profile or dashboard statistic blocks. @default true */
28
+ showStats?: boolean;
29
+ /** Enables the form submit block. @default true */
30
+ showSubmit?: boolean;
31
+ /** Enables the product rating block. @default true */
32
+ showRating?: boolean;
33
+ /** Enables the product price block. @default true */
34
+ showPrice?: boolean;
35
+ /** Enables the product call-to-action block. @default true */
36
+ showCta?: boolean;
37
+ }
38
+ export type NamedSkeletonProps = Omit<VPatternSkeletonProps, "pattern">;
39
+ export type VArticleSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight" | "showMedia"> & SkeletonAppearanceProps;
40
+ export type VCardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight" | "showMedia" | "showAvatar"> & SkeletonAppearanceProps;
41
+ export type VDashboardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "columns" | "showChart" | "showStats"> & SkeletonAppearanceProps;
42
+ export type VFeedSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showAvatar"> & SkeletonAppearanceProps;
43
+ export type VFormSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showSubmit"> & SkeletonAppearanceProps;
44
+ export type VListSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showAvatar" | "avatarSize"> & SkeletonAppearanceProps;
45
+ export type VMediaCardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight"> & SkeletonAppearanceProps;
46
+ export type VProductCardSkeletonProps = Pick<NamedSkeletonProps, "mediaHeight" | "showRating" | "showPrice" | "showCta"> & SkeletonAppearanceProps;
47
+ export type VProfileSkeletonProps = Pick<NamedSkeletonProps, "rows" | "avatarSize" | "showStats"> & SkeletonAppearanceProps;
48
+ export type VTableSkeletonProps = Pick<NamedSkeletonProps, "rows" | "columns" | "showHeader"> & SkeletonAppearanceProps;
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,45 @@
1
+ export interface VProgressProps {
2
+ /**
3
+ * Current progress value. Omit, pass `null`, or pass a non-finite value to
4
+ * render an indeterminate progress bar.
5
+ */
6
+ value?: number | null;
7
+ /**
8
+ * Lower bound of the value range.
9
+ *
10
+ * @default 0
11
+ */
12
+ min?: number;
13
+ /**
14
+ * Upper bound of the value range. When `max` is not greater than `min`, the
15
+ * bar renders as indeterminate.
16
+ *
17
+ * @default 100
18
+ */
19
+ max?: number;
20
+ /**
21
+ * Accessible name for the progress bar.
22
+ *
23
+ * @default "Progress"
24
+ */
25
+ label?: string;
26
+ /**
27
+ * Optional human-readable value text, for example `"3 of 10 files"`.
28
+ * Only applied while determinate.
29
+ */
30
+ valueText?: string;
31
+ /**
32
+ * Thickness of the bar as a pixel number or any CSS length.
33
+ *
34
+ * @default 8
35
+ */
36
+ height?: number | string;
37
+ /**
38
+ * Color of the filled portion. Overrides `--v-progress-color`.
39
+ */
40
+ color?: string;
41
+ /**
42
+ * Color of the unfilled track. Overrides `--v-progress-track-color`.
43
+ */
44
+ trackColor?: string;
45
+ }
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,37 @@
1
+ export type SkeletonVariant = "text" | "rect" | "circle";
2
+ export interface VSkeletonProps {
3
+ /**
4
+ * Shape of the placeholder.
5
+ *
6
+ * @default "text"
7
+ */
8
+ variant?: SkeletonVariant;
9
+ /**
10
+ * Width as a pixel number or any CSS length. Defaults to `100%`, except for
11
+ * circular skeletons, which default to `40px`.
12
+ */
13
+ width?: number | string;
14
+ /**
15
+ * Height as a pixel number or any CSS length. Circular skeletons use a
16
+ * square aspect ratio when no height is supplied.
17
+ */
18
+ height?: number | string;
19
+ /**
20
+ * Border radius as a pixel number or any CSS length. When omitted, a shape
21
+ * appropriate default is used.
22
+ */
23
+ borderRadius?: number | string;
24
+ /**
25
+ * Enables the shimmer animation. Reduced-motion preferences always disable
26
+ * the animation in CSS.
27
+ *
28
+ * @default true
29
+ */
30
+ animated?: boolean;
31
+ /**
32
+ * Optional accessible name. When supplied, the skeleton becomes a
33
+ * `role="status"` placeholder. When omitted, it is decorative and hidden
34
+ * from assistive technology.
35
+ */
36
+ label?: string;
37
+ }
@@ -0,0 +1,17 @@
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
+ };
@@ -0,0 +1,8 @@
1
+ export interface VSkeletonGroupProps {
2
+ /** Accessible loading message for the complete group. */
3
+ label?: string;
4
+ /** CSS gap between child placeholders. @default "0.75rem" */
5
+ gap?: string;
6
+ /** Hides the entire group from assistive technology. @default false */
7
+ decorative?: boolean;
8
+ }
@@ -0,0 +1,31 @@
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
+ };
@@ -0,0 +1,5 @@
1
+ import type { VPatternSkeletonProps } from "../VPatternSkeleton/types";
2
+ export interface VSkeletonSwitchProps extends VPatternSkeletonProps {
3
+ /** Whether to show the skeleton slot or pattern. @default true */
4
+ loading?: boolean;
5
+ }
@@ -0,0 +1,9 @@
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;