@vifui/core 0.6.0-alpha.13 → 0.6.0-alpha.14
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/components/index.d.ts +1 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.js +2 -0
- package/dist/components/skeleton/skeleton.styles.d.ts +29 -0
- package/dist/components/skeleton/skeleton.styles.js +15 -0
- package/dist/components/skeleton/skeleton.vue.d.ts +28 -0
- package/dist/components/skeleton/skeleton.vue.js +34 -0
- package/dist/components/skeleton/skeleton.vue2.js +5 -0
- package/dist/components/spinner/spinner.vue.d.ts +4 -4
- package/dist/components/types/shared-types.d.ts +1 -1
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
/**
|
|
3
|
+
* Skeleton component variant mapper
|
|
4
|
+
*
|
|
5
|
+
* Maps variant props to @vifui/styles CSS classes
|
|
6
|
+
*/
|
|
7
|
+
export declare const skeletonVariants: import("tailwind-variants").TVReturnType<{
|
|
8
|
+
presets: {
|
|
9
|
+
default: string;
|
|
10
|
+
circle: string;
|
|
11
|
+
rectangle: string;
|
|
12
|
+
square: string;
|
|
13
|
+
};
|
|
14
|
+
}, undefined, "vif-skeleton__root", {
|
|
15
|
+
presets: {
|
|
16
|
+
default: string;
|
|
17
|
+
circle: string;
|
|
18
|
+
rectangle: string;
|
|
19
|
+
square: string;
|
|
20
|
+
};
|
|
21
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
22
|
+
presets: {
|
|
23
|
+
default: string;
|
|
24
|
+
circle: string;
|
|
25
|
+
rectangle: string;
|
|
26
|
+
square: string;
|
|
27
|
+
};
|
|
28
|
+
}, undefined, "vif-skeleton__root", unknown, unknown, undefined>>;
|
|
29
|
+
export type SkeletonVariantProps = VariantProps<typeof skeletonVariants>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
|
|
3
|
+
const skeletonVariants = tv({
|
|
4
|
+
base: "vif-skeleton__root",
|
|
5
|
+
variants: {
|
|
6
|
+
presets: {
|
|
7
|
+
default: "",
|
|
8
|
+
circle: "vif-skeleton__root--preset-circle",
|
|
9
|
+
rectangle: "vif-skeleton__root--preset-rectangle",
|
|
10
|
+
square: "vif-skeleton__root--preset-square"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { skeletonVariants };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type PrimitiveProps } from "reka-ui";
|
|
2
|
+
import { type HTMLAttributes } from "vue";
|
|
3
|
+
/** Skeleton component props */
|
|
4
|
+
export interface SkeletonProps extends PrimitiveProps {
|
|
5
|
+
/** Custom style classes */
|
|
6
|
+
class?: HTMLAttributes["class"];
|
|
7
|
+
/** Skeleton presets */
|
|
8
|
+
preset?: "default" | "circle" | "rectangle" | "square";
|
|
9
|
+
}
|
|
10
|
+
/** Skeleton component slots */
|
|
11
|
+
export interface SkeletonSlots {
|
|
12
|
+
default: () => void;
|
|
13
|
+
}
|
|
14
|
+
declare var __VLS_6: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
default?: (props: typeof __VLS_6) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_component: import("vue").DefineComponent<SkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {
|
|
19
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
20
|
+
preset: "default" | "circle" | "rectangle" | "square";
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent, computed, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { useForwardProps, Primitive } from 'reka-ui';
|
|
3
|
+
import { skeletonVariants } from './skeleton.styles.js';
|
|
4
|
+
|
|
5
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "skeleton",
|
|
7
|
+
props: {
|
|
8
|
+
class: { type: null, required: false },
|
|
9
|
+
preset: { type: String, required: false, default: "default" },
|
|
10
|
+
asChild: { type: Boolean, required: false },
|
|
11
|
+
as: { type: null, required: false, default: "div" }
|
|
12
|
+
},
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const props = __props;
|
|
15
|
+
const primitiveProps = useForwardProps(() => ({
|
|
16
|
+
as: props.as,
|
|
17
|
+
asChild: props.asChild
|
|
18
|
+
}));
|
|
19
|
+
const theme = computed(
|
|
20
|
+
() => skeletonVariants({ class: props.class, presets: props.preset })
|
|
21
|
+
);
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return openBlock(), createBlock(unref(Primitive), mergeProps({ "aria-hidden": "" }, unref(primitiveProps), { class: theme.value }), {
|
|
24
|
+
default: withCtx(() => [
|
|
25
|
+
renderSlot(_ctx.$slots, "default")
|
|
26
|
+
]),
|
|
27
|
+
_: 3
|
|
28
|
+
/* FORWARDED */
|
|
29
|
+
}, 16, ["class"]);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export { _sfc_main as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "vue";
|
|
2
|
-
import type { Sizes } from "../types/shared-types";
|
|
2
|
+
import type { Sizes, Spinners } from "../types/shared-types";
|
|
3
3
|
export interface SpinnerProps {
|
|
4
4
|
/**
|
|
5
5
|
* Spinner size
|
|
@@ -11,9 +11,9 @@ export interface SpinnerProps {
|
|
|
11
11
|
color?: "current" | "primary" | "secondary" | "success" | "warning" | "danger" | "white";
|
|
12
12
|
/**
|
|
13
13
|
* Spinner animation type (Vuesax-inspired)
|
|
14
|
-
* All
|
|
14
|
+
* All 13 types from original Vuesax
|
|
15
15
|
*/
|
|
16
|
-
type?:
|
|
16
|
+
type?: Spinners;
|
|
17
17
|
/**
|
|
18
18
|
* Custom CSS class
|
|
19
19
|
*/
|
|
@@ -25,7 +25,7 @@ export interface SpinnerProps {
|
|
|
25
25
|
}
|
|
26
26
|
declare const _default: import("vue").DefineComponent<SpinnerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SpinnerProps> & Readonly<{}>, {
|
|
27
27
|
size: Sizes;
|
|
28
|
-
type:
|
|
28
|
+
type: Spinners;
|
|
29
29
|
label: string;
|
|
30
30
|
color: "current" | "primary" | "secondary" | "success" | "warning" | "danger" | "white";
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type Sizes = "xs" | "sm" | "md" | "lg" | "xl";
|
|
2
2
|
export type Variants = "primary" | "secondary" | "soft" | "ghost" | "outline" | "danger" | "shadow";
|
|
3
|
-
export type Spinners = "default" | "border" | "
|
|
3
|
+
export type Spinners = "default" | "border" | "points" | "radius" | "corners" | "scale" | "waves" | "square" | "gradient" | "rectangle" | "circles" | "square-rotate" | "material";
|
|
4
4
|
export type Colors = "neutral" | "brand" | "success" | "warning" | "danger";
|
package/dist/index.js
CHANGED
|
@@ -71,6 +71,7 @@ export { default as TooltipPortal } from './components/tooltip/tooltip-portal.vu
|
|
|
71
71
|
export { default as TooltipContent } from './components/tooltip/tooltip-content.vue.js';
|
|
72
72
|
export { default as TooltipArrow } from './components/tooltip/tooltip-arrow.vue.js';
|
|
73
73
|
export { default as UploadRoot } from './components/upload/upload-root.vue.js';
|
|
74
|
+
export { default as Skeleton } from './components/skeleton/skeleton.vue.js';
|
|
74
75
|
export { accordionVariants } from './components/accordion/accordion.styles.js';
|
|
75
76
|
export { alertVariants } from './components/alert/alert.styles.js';
|
|
76
77
|
export { avatarVariants } from './components/avatar/avatar.styles.js';
|
|
@@ -87,6 +88,7 @@ export { tabsVariants } from './components/tabs/tabs.styles.js';
|
|
|
87
88
|
export { popoverVariants } from './components/popover/popover.styles.js';
|
|
88
89
|
export { tooltipVariants } from './components/tooltip/tooltip.styles.js';
|
|
89
90
|
export { uploadVariants } from './components/upload/upload.styles.js';
|
|
91
|
+
export { skeletonVariants } from './components/skeleton/skeleton.styles.js';
|
|
90
92
|
|
|
91
93
|
const version = "__VIFUI_VERSION__";
|
|
92
94
|
|