@vifui/core 0.4.0-alpha.6
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 +204 -0
- package/dist/components/accordion/accordion-body.vue.d.ts +29 -0
- package/dist/components/accordion/accordion-body.vue.js +27 -0
- package/dist/components/accordion/accordion-body.vue2.js +5 -0
- package/dist/components/accordion/accordion-content.vue.d.ts +29 -0
- package/dist/components/accordion/accordion-content.vue.js +26 -0
- package/dist/components/accordion/accordion-content.vue2.js +5 -0
- package/dist/components/accordion/accordion-header.vue.d.ts +30 -0
- package/dist/components/accordion/accordion-header.vue.js +28 -0
- package/dist/components/accordion/accordion-header.vue2.js +5 -0
- package/dist/components/accordion/accordion-indicator.vue.d.ts +32 -0
- package/dist/components/accordion/accordion-indicator.vue.js +22 -0
- package/dist/components/accordion/accordion-indicator.vue2.js +5 -0
- package/dist/components/accordion/accordion-item.vue.d.ts +54 -0
- package/dist/components/accordion/accordion-item.vue.js +30 -0
- package/dist/components/accordion/accordion-item.vue2.js +5 -0
- package/dist/components/accordion/accordion-root.vue.d.ts +94 -0
- package/dist/components/accordion/accordion-root.vue.js +55 -0
- package/dist/components/accordion/accordion-root.vue2.js +5 -0
- package/dist/components/accordion/accordion-trigger.vue.d.ts +44 -0
- package/dist/components/accordion/accordion-trigger.vue.js +30 -0
- package/dist/components/accordion/accordion-trigger.vue2.js +5 -0
- package/dist/components/accordion/accordion.styles.d.ts +99 -0
- package/dist/components/accordion/accordion.styles.js +42 -0
- package/dist/components/accordion/index.d.ts +15 -0
- package/dist/components/accordion/index.js +8 -0
- package/dist/components/alert/alert-body.vue.d.ts +16 -0
- package/dist/components/alert/alert-body.vue.js +54 -0
- package/dist/components/alert/alert-body.vue2.js +5 -0
- package/dist/components/alert/alert-close.vue.d.ts +12 -0
- package/dist/components/alert/alert-close.vue.js +38 -0
- package/dist/components/alert/alert-close.vue2.js +5 -0
- package/dist/components/alert/alert-content.vue.d.ts +28 -0
- package/dist/components/alert/alert-content.vue.js +54 -0
- package/dist/components/alert/alert-content.vue2.js +5 -0
- package/dist/components/alert/alert-description.vue.d.ts +16 -0
- package/dist/components/alert/alert-description.vue.js +41 -0
- package/dist/components/alert/alert-description.vue2.js +5 -0
- package/dist/components/alert/alert-footer.vue.d.ts +16 -0
- package/dist/components/alert/alert-footer.vue.js +54 -0
- package/dist/components/alert/alert-footer.vue2.js +5 -0
- package/dist/components/alert/alert-header.vue.d.ts +16 -0
- package/dist/components/alert/alert-header.vue.js +54 -0
- package/dist/components/alert/alert-header.vue2.js +5 -0
- package/dist/components/alert/alert-icon.vue.d.ts +8 -0
- package/dist/components/alert/alert-icon.vue.js +43 -0
- package/dist/components/alert/alert-icon.vue2.js +5 -0
- package/dist/components/alert/alert-root.vue.d.ts +48 -0
- package/dist/components/alert/alert-root.vue.js +57 -0
- package/dist/components/alert/alert-root.vue2.js +5 -0
- package/dist/components/alert/alert-title.vue.d.ts +16 -0
- package/dist/components/alert/alert-title.vue.js +41 -0
- package/dist/components/alert/alert-title.vue2.js +5 -0
- package/dist/components/alert/alert.styles.d.ts +96 -0
- package/dist/components/alert/alert.styles.js +147 -0
- package/dist/components/alert/index.d.ts +19 -0
- package/dist/components/alert/index.js +10 -0
- package/dist/components/avatar/avatar-fallback.vue.d.ts +14 -0
- package/dist/components/avatar/avatar-fallback.vue.js +35 -0
- package/dist/components/avatar/avatar-fallback.vue2.js +5 -0
- package/dist/components/avatar/avatar-group.vue.d.ts +20 -0
- package/dist/components/avatar/avatar-group.vue.js +101 -0
- package/dist/components/avatar/avatar-group.vue2.js +5 -0
- package/dist/components/avatar/avatar-image.vue.d.ts +14 -0
- package/dist/components/avatar/avatar-image.vue.js +37 -0
- package/dist/components/avatar/avatar-image.vue2.js +5 -0
- package/dist/components/avatar/avatar-root.vue.d.ts +57 -0
- package/dist/components/avatar/avatar-root.vue.js +102 -0
- package/dist/components/avatar/avatar-root.vue2.js +5 -0
- package/dist/components/avatar/avatar.styles.d.ts +209 -0
- package/dist/components/avatar/avatar.styles.js +50 -0
- package/dist/components/avatar/index.d.ts +9 -0
- package/dist/components/avatar/index.js +5 -0
- package/dist/components/badge/badge.styles.d.ts +87 -0
- package/dist/components/badge/badge.styles.js +41 -0
- package/dist/components/badge/badge.vue.d.ts +116 -0
- package/dist/components/badge/badge.vue.js +79 -0
- package/dist/components/badge/badge.vue2.js +5 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue.d.ts +29 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue.js +28 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue.js +27 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +53 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue.js +30 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue.js +27 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +78 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue.js +39 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +41 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue.js +32 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts +144 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +58 -0
- package/dist/components/breadcrumb/index.d.ts +13 -0
- package/dist/components/breadcrumb/index.js +7 -0
- package/dist/components/button/button.styles.d.ts +90 -0
- package/dist/components/button/button.styles.js +41 -0
- package/dist/components/button/button.vue.d.ts +144 -0
- package/dist/components/button/button.vue.js +131 -0
- package/dist/components/button/button.vue2.js +5 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/card/card-body.vue.d.ts +29 -0
- package/dist/components/card/card-body.vue.js +27 -0
- package/dist/components/card/card-body.vue2.js +5 -0
- package/dist/components/card/card-footer.vue.d.ts +29 -0
- package/dist/components/card/card-footer.vue.js +27 -0
- package/dist/components/card/card-footer.vue2.js +5 -0
- package/dist/components/card/card-header.vue.d.ts +29 -0
- package/dist/components/card/card-header.vue.js +27 -0
- package/dist/components/card/card-header.vue2.js +5 -0
- package/dist/components/card/card-media.vue.d.ts +44 -0
- package/dist/components/card/card-media.vue.js +56 -0
- package/dist/components/card/card-media.vue2.js +5 -0
- package/dist/components/card/card-root.vue.d.ts +128 -0
- package/dist/components/card/card-root.vue.js +58 -0
- package/dist/components/card/card-root.vue2.js +5 -0
- package/dist/components/card/card.styles.d.ts +216 -0
- package/dist/components/card/card.styles.js +86 -0
- package/dist/components/card/index.d.ts +11 -0
- package/dist/components/card/index.js +6 -0
- package/dist/components/checkbox/checkbox-group-item.vue.d.ts +22 -0
- package/dist/components/checkbox/checkbox-group-item.vue.js +27 -0
- package/dist/components/checkbox/checkbox-group-item.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-group.vue.d.ts +35 -0
- package/dist/components/checkbox/checkbox-group.vue.js +53 -0
- package/dist/components/checkbox/checkbox-group.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-indicator.vue.d.ts +40 -0
- package/dist/components/checkbox/checkbox-indicator.vue.js +58 -0
- package/dist/components/checkbox/checkbox-indicator.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-label.vue.d.ts +27 -0
- package/dist/components/checkbox/checkbox-label.vue.js +24 -0
- package/dist/components/checkbox/checkbox-label.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-root.vue.d.ts +42 -0
- package/dist/components/checkbox/checkbox-root.vue.js +51 -0
- package/dist/components/checkbox/checkbox-root.vue2.js +5 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +155 -0
- package/dist/components/checkbox/checkbox.styles.js +66 -0
- package/dist/components/checkbox/index.d.ts +11 -0
- package/dist/components/checkbox/index.js +6 -0
- package/dist/components/divider/divider.styles.d.ts +93 -0
- package/dist/components/divider/divider.styles.js +43 -0
- package/dist/components/divider/divider.vue.d.ts +89 -0
- package/dist/components/divider/divider.vue.js +51 -0
- package/dist/components/divider/divider.vue2.js +5 -0
- package/dist/components/divider/index.d.ts +3 -0
- package/dist/components/divider/index.js +2 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/spinner/spinner.styles.d.ts +112 -0
- package/dist/components/spinner/spinner.styles.js +47 -0
- package/dist/components/spinner/spinner.vue.d.ts +31 -0
- package/dist/components/spinner/spinner.vue.js +102 -0
- package/dist/components/spinner/spinner.vue2.js +5 -0
- package/dist/components/types/shared-types.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +54 -0
- package/package.json +94 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { Colors, Sizes } from "../types/shared-types";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the VifUI Divider component.
|
|
4
|
+
* Provides configuration for orientation, variant, size, color, and label.
|
|
5
|
+
*/
|
|
6
|
+
export interface DividerProps {
|
|
7
|
+
/**
|
|
8
|
+
* Defines the orientation of the divider.
|
|
9
|
+
*
|
|
10
|
+
* @type {"horizontal" | "vertical"}
|
|
11
|
+
* @default "horizontal"
|
|
12
|
+
* @example
|
|
13
|
+
* ```vue
|
|
14
|
+
* <Divider orientation="vertical" />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
orientation?: "horizontal" | "vertical";
|
|
18
|
+
/**
|
|
19
|
+
* Defines the visual style of the divider.
|
|
20
|
+
*
|
|
21
|
+
* @type {"solid" | "dashed" | "dotted"}
|
|
22
|
+
* @default "solid"
|
|
23
|
+
* @example
|
|
24
|
+
* ```vue
|
|
25
|
+
* <Divider variant="dashed" />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
variant?: "solid" | "dashed" | "dotted";
|
|
29
|
+
/**
|
|
30
|
+
* Controls the thickness of the divider.
|
|
31
|
+
*
|
|
32
|
+
* @type {"xs" | "sm" | "md" | "lg"}
|
|
33
|
+
* @default "sm"
|
|
34
|
+
* @example
|
|
35
|
+
* ```vue
|
|
36
|
+
* <Divider size="lg" />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
size?: Exclude<Sizes, "xl">;
|
|
40
|
+
/**
|
|
41
|
+
* Defines the divider color scheme.
|
|
42
|
+
*
|
|
43
|
+
* @type {"neutral" | "brand" | "success" | "warning" | "danger"}
|
|
44
|
+
* @default "neutral"
|
|
45
|
+
* @example
|
|
46
|
+
* ```vue
|
|
47
|
+
* <Divider color="brand" />
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
color?: Colors;
|
|
51
|
+
/**
|
|
52
|
+
* Position of the label/content.
|
|
53
|
+
*
|
|
54
|
+
* @type {"start" | "center" | "end"}
|
|
55
|
+
* @default "center"
|
|
56
|
+
* @example
|
|
57
|
+
* ```vue
|
|
58
|
+
* <Divider label-position="start">Label</Divider>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
labelPosition?: "start" | "center" | "end";
|
|
62
|
+
/**
|
|
63
|
+
* Custom class names for extending or overriding styles.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```vue
|
|
67
|
+
* <Divider class="my-8" />
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
class?: string;
|
|
71
|
+
}
|
|
72
|
+
declare var __VLS_1: {};
|
|
73
|
+
type __VLS_Slots = {} & {
|
|
74
|
+
default?: (props: typeof __VLS_1) => any;
|
|
75
|
+
};
|
|
76
|
+
declare const __VLS_component: import("vue").DefineComponent<DividerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DividerProps> & Readonly<{}>, {
|
|
77
|
+
size: Exclude<Sizes, "xl">;
|
|
78
|
+
variant: "solid" | "dashed" | "dotted";
|
|
79
|
+
color: Colors;
|
|
80
|
+
orientation: "horizontal" | "vertical";
|
|
81
|
+
labelPosition: "start" | "center" | "end";
|
|
82
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
83
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
84
|
+
export default _default;
|
|
85
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
86
|
+
new (): {
|
|
87
|
+
$slots: S;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent, useSlots, computed, createElementBlock, openBlock, normalizeClass, createCommentVNode, renderSlot } from 'vue';
|
|
2
|
+
import { dividerVariants } from './divider.styles.js';
|
|
3
|
+
|
|
4
|
+
const _hoisted_1 = ["aria-orientation", "aria-label"];
|
|
5
|
+
const _hoisted_2 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "vif-divider__label"
|
|
8
|
+
};
|
|
9
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "divider",
|
|
11
|
+
props: {
|
|
12
|
+
orientation: { type: String, required: false, default: "horizontal" },
|
|
13
|
+
variant: { type: String, required: false, default: "solid" },
|
|
14
|
+
size: { type: String, required: false, default: "sm" },
|
|
15
|
+
color: { type: String, required: false, default: "neutral" },
|
|
16
|
+
labelPosition: { type: String, required: false, default: "center" },
|
|
17
|
+
class: { type: String, required: false }
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const slots = useSlots();
|
|
22
|
+
const hasLabel = computed(() => !!slots["default"]);
|
|
23
|
+
const classes = computed(
|
|
24
|
+
() => dividerVariants({
|
|
25
|
+
orientation: props.orientation,
|
|
26
|
+
variant: props.variant,
|
|
27
|
+
size: props.size,
|
|
28
|
+
color: props.color,
|
|
29
|
+
labelPosition: hasLabel.value ? props.labelPosition : void 0,
|
|
30
|
+
class: props.class
|
|
31
|
+
})
|
|
32
|
+
);
|
|
33
|
+
const ariaOrientation = computed(
|
|
34
|
+
() => props.orientation === "vertical" ? "vertical" : "horizontal"
|
|
35
|
+
);
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
return openBlock(), createElementBlock("div", {
|
|
38
|
+
class: normalizeClass(classes.value),
|
|
39
|
+
role: "separator",
|
|
40
|
+
"aria-orientation": ariaOrientation.value,
|
|
41
|
+
"aria-label": hasLabel.value ? void 0 : "Divider"
|
|
42
|
+
}, [
|
|
43
|
+
hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
44
|
+
renderSlot(_ctx.$slots, "default")
|
|
45
|
+
])) : createCommentVNode("v-if", true)
|
|
46
|
+
], 10, _hoisted_1);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./avatar";
|
|
2
|
+
export * from "./accordion";
|
|
3
|
+
export * from "./badge";
|
|
4
|
+
export * from "./breadcrumb";
|
|
5
|
+
export * from "./button";
|
|
6
|
+
export * from "./card";
|
|
7
|
+
export * from "./checkbox";
|
|
8
|
+
export * from "./divider";
|
|
9
|
+
export * from "./spinner";
|
|
10
|
+
export * from "./alert";
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
/**
|
|
3
|
+
* Spinner component variant mapper
|
|
4
|
+
*
|
|
5
|
+
* Maps variant props to @vifui/styles CSS classes
|
|
6
|
+
* Inspired by Vuesax's loading architecture
|
|
7
|
+
* Supports all 11 spinner types from original Vuesax
|
|
8
|
+
*/
|
|
9
|
+
export declare const spinnerVariants: import("tailwind-variants").TVReturnType<{
|
|
10
|
+
size: {
|
|
11
|
+
xs: string;
|
|
12
|
+
sm: string;
|
|
13
|
+
md: string;
|
|
14
|
+
lg: string;
|
|
15
|
+
xl: string;
|
|
16
|
+
};
|
|
17
|
+
color: {
|
|
18
|
+
current: string;
|
|
19
|
+
primary: string;
|
|
20
|
+
secondary: string;
|
|
21
|
+
success: string;
|
|
22
|
+
warning: string;
|
|
23
|
+
danger: string;
|
|
24
|
+
white: string;
|
|
25
|
+
};
|
|
26
|
+
type: {
|
|
27
|
+
default: string;
|
|
28
|
+
border: string;
|
|
29
|
+
point: string;
|
|
30
|
+
points: string;
|
|
31
|
+
radius: string;
|
|
32
|
+
corners: string;
|
|
33
|
+
sound: string;
|
|
34
|
+
scale: string;
|
|
35
|
+
waves: string;
|
|
36
|
+
square: string;
|
|
37
|
+
gradient: string;
|
|
38
|
+
rectangle: string;
|
|
39
|
+
circles: string;
|
|
40
|
+
"square-rotate": string;
|
|
41
|
+
material: string;
|
|
42
|
+
};
|
|
43
|
+
}, undefined, "vif-spinner", {
|
|
44
|
+
size: {
|
|
45
|
+
xs: string;
|
|
46
|
+
sm: string;
|
|
47
|
+
md: string;
|
|
48
|
+
lg: string;
|
|
49
|
+
xl: string;
|
|
50
|
+
};
|
|
51
|
+
color: {
|
|
52
|
+
current: string;
|
|
53
|
+
primary: string;
|
|
54
|
+
secondary: string;
|
|
55
|
+
success: string;
|
|
56
|
+
warning: string;
|
|
57
|
+
danger: string;
|
|
58
|
+
white: string;
|
|
59
|
+
};
|
|
60
|
+
type: {
|
|
61
|
+
default: string;
|
|
62
|
+
border: string;
|
|
63
|
+
point: string;
|
|
64
|
+
points: string;
|
|
65
|
+
radius: string;
|
|
66
|
+
corners: string;
|
|
67
|
+
sound: string;
|
|
68
|
+
scale: string;
|
|
69
|
+
waves: string;
|
|
70
|
+
square: string;
|
|
71
|
+
gradient: string;
|
|
72
|
+
rectangle: string;
|
|
73
|
+
circles: string;
|
|
74
|
+
"square-rotate": string;
|
|
75
|
+
material: string;
|
|
76
|
+
};
|
|
77
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
78
|
+
size: {
|
|
79
|
+
xs: string;
|
|
80
|
+
sm: string;
|
|
81
|
+
md: string;
|
|
82
|
+
lg: string;
|
|
83
|
+
xl: string;
|
|
84
|
+
};
|
|
85
|
+
color: {
|
|
86
|
+
current: string;
|
|
87
|
+
primary: string;
|
|
88
|
+
secondary: string;
|
|
89
|
+
success: string;
|
|
90
|
+
warning: string;
|
|
91
|
+
danger: string;
|
|
92
|
+
white: string;
|
|
93
|
+
};
|
|
94
|
+
type: {
|
|
95
|
+
default: string;
|
|
96
|
+
border: string;
|
|
97
|
+
point: string;
|
|
98
|
+
points: string;
|
|
99
|
+
radius: string;
|
|
100
|
+
corners: string;
|
|
101
|
+
sound: string;
|
|
102
|
+
scale: string;
|
|
103
|
+
waves: string;
|
|
104
|
+
square: string;
|
|
105
|
+
gradient: string;
|
|
106
|
+
rectangle: string;
|
|
107
|
+
circles: string;
|
|
108
|
+
"square-rotate": string;
|
|
109
|
+
material: string;
|
|
110
|
+
};
|
|
111
|
+
}, undefined, "vif-spinner", unknown, unknown, undefined>>;
|
|
112
|
+
export type SpinnerVariantProps = VariantProps<typeof spinnerVariants>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
|
|
3
|
+
const spinnerVariants = tv({
|
|
4
|
+
base: "vif-spinner",
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
xs: "vif-spinner--xs",
|
|
8
|
+
sm: "vif-spinner--xs",
|
|
9
|
+
md: "vif-spinner--sm",
|
|
10
|
+
lg: "vif-spinner--md",
|
|
11
|
+
xl: "vif-spinner--md"
|
|
12
|
+
},
|
|
13
|
+
color: {
|
|
14
|
+
current: "vif-spinner--current",
|
|
15
|
+
primary: "vif-spinner--primary",
|
|
16
|
+
secondary: "vif-spinner--secondary",
|
|
17
|
+
success: "vif-spinner--success",
|
|
18
|
+
warning: "vif-spinner--warning",
|
|
19
|
+
danger: "vif-spinner--danger",
|
|
20
|
+
white: "vif-spinner--white"
|
|
21
|
+
},
|
|
22
|
+
type: {
|
|
23
|
+
default: "vif-spinner--default",
|
|
24
|
+
border: "vif-spinner--border",
|
|
25
|
+
point: "vif-spinner--point",
|
|
26
|
+
points: "vif-spinner--points",
|
|
27
|
+
radius: "vif-spinner--radius",
|
|
28
|
+
corners: "vif-spinner--corners",
|
|
29
|
+
sound: "vif-spinner--sound",
|
|
30
|
+
scale: "vif-spinner--scale",
|
|
31
|
+
waves: "vif-spinner--waves",
|
|
32
|
+
square: "vif-spinner--square",
|
|
33
|
+
gradient: "vif-spinner--gradient",
|
|
34
|
+
rectangle: "vif-spinner--rectangle",
|
|
35
|
+
circles: "vif-spinner--circles",
|
|
36
|
+
"square-rotate": "vif-spinner--square-rotate",
|
|
37
|
+
material: "vif-spinner--material"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
size: "sm",
|
|
42
|
+
color: "primary",
|
|
43
|
+
type: "default"
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { spinnerVariants };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Sizes } from "../types/shared-types";
|
|
2
|
+
export interface SpinnerProps {
|
|
3
|
+
/**
|
|
4
|
+
* Spinner size
|
|
5
|
+
*/
|
|
6
|
+
size?: Sizes;
|
|
7
|
+
/**
|
|
8
|
+
* Spinner color
|
|
9
|
+
*/
|
|
10
|
+
color?: "current" | "primary" | "secondary" | "success" | "warning" | "danger" | "white";
|
|
11
|
+
/**
|
|
12
|
+
* Spinner animation type (Vuesax-inspired)
|
|
13
|
+
* All 11 types from original Vuesax
|
|
14
|
+
*/
|
|
15
|
+
type?: "default" | "border" | "point" | "points" | "radius" | "corners" | "sound" | "scale" | "waves" | "square" | "gradient" | "rectangle" | "circles" | "square-rotate" | "material";
|
|
16
|
+
/**
|
|
17
|
+
* Custom CSS class
|
|
18
|
+
*/
|
|
19
|
+
class?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Accessible label for screen readers
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const _default: import("vue").DefineComponent<SpinnerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SpinnerProps> & Readonly<{}>, {
|
|
26
|
+
size: Sizes;
|
|
27
|
+
color: "current" | "primary" | "secondary" | "success" | "warning" | "danger" | "white";
|
|
28
|
+
type: "default" | "border" | "point" | "points" | "radius" | "corners" | "sound" | "scale" | "waves" | "square" | "gradient" | "rectangle" | "circles" | "square-rotate" | "material";
|
|
29
|
+
label: string;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, Fragment, createCommentVNode, normalizeClass, createElementVNode } from 'vue';
|
|
2
|
+
import { spinnerVariants } from './spinner.styles.js';
|
|
3
|
+
|
|
4
|
+
const _hoisted_1 = ["aria-label"];
|
|
5
|
+
const _hoisted_2 = ["aria-label"];
|
|
6
|
+
const _hoisted_3 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "vif-spinner__effect vif-spinner__effect-2"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "vif-spinner__effect vif-spinner__effect-3"
|
|
13
|
+
};
|
|
14
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
__name: "spinner",
|
|
16
|
+
props: {
|
|
17
|
+
size: { type: String, required: false, default: "md" },
|
|
18
|
+
color: { type: String, required: false, default: "primary" },
|
|
19
|
+
type: { type: String, required: false, default: "default" },
|
|
20
|
+
class: { type: String, required: false },
|
|
21
|
+
label: { type: String, required: false, default: "Loading..." }
|
|
22
|
+
},
|
|
23
|
+
setup(__props) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const classes = computed(
|
|
26
|
+
() => spinnerVariants({
|
|
27
|
+
size: props.size,
|
|
28
|
+
color: props.color,
|
|
29
|
+
type: props.type,
|
|
30
|
+
class: props.class
|
|
31
|
+
})
|
|
32
|
+
);
|
|
33
|
+
const singleEffectTypes = ["corners", "gradient", "square-rotate"];
|
|
34
|
+
const doubleEffectTypes = ["square"];
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return openBlock(), createElementBlock(
|
|
37
|
+
Fragment,
|
|
38
|
+
null,
|
|
39
|
+
[
|
|
40
|
+
createCommentVNode(" Material type uses SVG "),
|
|
41
|
+
__props.type === "material" ? (openBlock(), createElementBlock("svg", {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: normalizeClass(classes.value),
|
|
44
|
+
viewBox: "0 0 50 50",
|
|
45
|
+
"aria-label": __props.label,
|
|
46
|
+
role: "status"
|
|
47
|
+
}, [..._cache[0] || (_cache[0] = [
|
|
48
|
+
createElementVNode(
|
|
49
|
+
"circle",
|
|
50
|
+
{
|
|
51
|
+
class: "vif-spinner__track",
|
|
52
|
+
cx: "25",
|
|
53
|
+
cy: "25",
|
|
54
|
+
r: "20",
|
|
55
|
+
fill: "none",
|
|
56
|
+
"stroke-width": "5"
|
|
57
|
+
},
|
|
58
|
+
null,
|
|
59
|
+
-1
|
|
60
|
+
/* CACHED */
|
|
61
|
+
),
|
|
62
|
+
createElementVNode(
|
|
63
|
+
"circle",
|
|
64
|
+
{
|
|
65
|
+
class: "vif-spinner__path",
|
|
66
|
+
cx: "25",
|
|
67
|
+
cy: "25",
|
|
68
|
+
r: "20",
|
|
69
|
+
fill: "none",
|
|
70
|
+
"stroke-width": "5",
|
|
71
|
+
"stroke-dasharray": "1, 150",
|
|
72
|
+
"stroke-dashoffset": "0"
|
|
73
|
+
},
|
|
74
|
+
null,
|
|
75
|
+
-1
|
|
76
|
+
/* CACHED */
|
|
77
|
+
)
|
|
78
|
+
])], 10, _hoisted_1)) : (openBlock(), createElementBlock("div", {
|
|
79
|
+
key: 1,
|
|
80
|
+
class: normalizeClass(classes.value),
|
|
81
|
+
"aria-label": __props.label,
|
|
82
|
+
role: "status"
|
|
83
|
+
}, [
|
|
84
|
+
_cache[1] || (_cache[1] = createElementVNode(
|
|
85
|
+
"div",
|
|
86
|
+
{ class: "vif-spinner__effect vif-spinner__effect-1" },
|
|
87
|
+
null,
|
|
88
|
+
-1
|
|
89
|
+
/* CACHED */
|
|
90
|
+
)),
|
|
91
|
+
!singleEffectTypes.includes(__props.type) ? (openBlock(), createElementBlock("div", _hoisted_3)) : createCommentVNode("v-if", true),
|
|
92
|
+
!singleEffectTypes.includes(__props.type) && !doubleEffectTypes.includes(__props.type) ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("v-if", true)
|
|
93
|
+
], 10, _hoisted_2))
|
|
94
|
+
],
|
|
95
|
+
2112
|
|
96
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type Sizes = "xs" | "sm" | "md" | "lg" | "xl";
|
|
2
|
+
export type Variants = "primary" | "secondary" | "soft" | "ghost" | "outline" | "danger" | "shadow";
|
|
3
|
+
export type Spinners = "default" | "border" | "point" | "points" | "radius" | "corners" | "sound" | "scale" | "waves" | "square" | "gradient" | "rectangle" | "circles" | "square-rotate" | "material";
|
|
4
|
+
export type Colors = "neutral" | "brand" | "success" | "warning" | "danger";
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export { default as AvatarRoot } from './components/avatar/avatar-root.vue.js';
|
|
2
|
+
export { default as AvatarImage } from './components/avatar/avatar-image.vue.js';
|
|
3
|
+
export { default as AvatarFallback } from './components/avatar/avatar-fallback.vue.js';
|
|
4
|
+
export { default as AvatarGroup } from './components/avatar/avatar-group.vue.js';
|
|
5
|
+
export { default as AccordionRoot } from './components/accordion/accordion-root.vue.js';
|
|
6
|
+
export { default as AccordionItem } from './components/accordion/accordion-item.vue.js';
|
|
7
|
+
export { default as AccordionHeader } from './components/accordion/accordion-header.vue.js';
|
|
8
|
+
export { default as AccordionTrigger } from './components/accordion/accordion-trigger.vue.js';
|
|
9
|
+
export { default as AccordionContent } from './components/accordion/accordion-content.vue.js';
|
|
10
|
+
export { default as AccordionIndicator } from './components/accordion/accordion-indicator.vue.js';
|
|
11
|
+
export { default as AccordionBody } from './components/accordion/accordion-body.vue.js';
|
|
12
|
+
export { default as Badge } from './components/badge/badge.vue.js';
|
|
13
|
+
export { default as BreadcrumbRoot } from './components/breadcrumb/breadcrumb-root.vue.js';
|
|
14
|
+
export { default as BreadcrumbList } from './components/breadcrumb/breadcrumb-list.vue.js';
|
|
15
|
+
export { default as BreadcrumbItem } from './components/breadcrumb/breadcrumb-item.vue.js';
|
|
16
|
+
export { default as BreadcrumbLink } from './components/breadcrumb/breadcrumb-link.vue.js';
|
|
17
|
+
export { default as BreadcrumbCurrentLink } from './components/breadcrumb/breadcrumb-current-link.vue.js';
|
|
18
|
+
export { default as BreadcrumbSeparator } from './components/breadcrumb/breadcrumb-separator.vue.js';
|
|
19
|
+
export { default as Button } from './components/button/button.vue.js';
|
|
20
|
+
export { default as CardRoot } from './components/card/card-root.vue.js';
|
|
21
|
+
export { default as CardHeader } from './components/card/card-header.vue.js';
|
|
22
|
+
export { default as CardBody } from './components/card/card-body.vue.js';
|
|
23
|
+
export { default as CardFooter } from './components/card/card-footer.vue.js';
|
|
24
|
+
export { default as CardMedia } from './components/card/card-media.vue.js';
|
|
25
|
+
export { default as CheckboxRoot } from './components/checkbox/checkbox-root.vue.js';
|
|
26
|
+
export { default as CheckboxIndicator } from './components/checkbox/checkbox-indicator.vue.js';
|
|
27
|
+
export { default as CheckboxLabel } from './components/checkbox/checkbox-label.vue.js';
|
|
28
|
+
export { default as CheckboxGroup } from './components/checkbox/checkbox-group.vue.js';
|
|
29
|
+
export { default as CheckboxGroupItem } from './components/checkbox/checkbox-group-item.vue.js';
|
|
30
|
+
export { default as Divider } from './components/divider/divider.vue.js';
|
|
31
|
+
export { default as Spinner } from './components/spinner/spinner.vue.js';
|
|
32
|
+
export { default as AlertRoot } from './components/alert/alert-root.vue.js';
|
|
33
|
+
export { default as AlertIcon } from './components/alert/alert-icon.vue.js';
|
|
34
|
+
export { default as AlertContent } from './components/alert/alert-content.vue.js';
|
|
35
|
+
export { default as AlertHeader } from './components/alert/alert-header.vue.js';
|
|
36
|
+
export { default as AlertTitle } from './components/alert/alert-title.vue.js';
|
|
37
|
+
export { default as AlertDescription } from './components/alert/alert-description.vue.js';
|
|
38
|
+
export { default as AlertBody } from './components/alert/alert-body.vue.js';
|
|
39
|
+
export { default as AlertFooter } from './components/alert/alert-footer.vue.js';
|
|
40
|
+
export { default as AlertClose } from './components/alert/alert-close.vue.js';
|
|
41
|
+
export { avatarVariants } from './components/avatar/avatar.styles.js';
|
|
42
|
+
export { accordionVariants } from './components/accordion/accordion.styles.js';
|
|
43
|
+
export { badgeVariants } from './components/badge/badge.styles.js';
|
|
44
|
+
export { breadcrumbVariants } from './components/breadcrumb/breadcrumb.styles.js';
|
|
45
|
+
export { buttonVariants } from './components/button/button.styles.js';
|
|
46
|
+
export { cardVariants } from './components/card/card.styles.js';
|
|
47
|
+
export { checkboxGroupVariants, checkboxVariants } from './components/checkbox/checkbox.styles.js';
|
|
48
|
+
export { dividerVariants } from './components/divider/divider.styles.js';
|
|
49
|
+
export { spinnerVariants } from './components/spinner/spinner.styles.js';
|
|
50
|
+
export { alertVariants } from './components/alert/alert.styles.js';
|
|
51
|
+
|
|
52
|
+
const version = "__VIFUI_VERSION__";
|
|
53
|
+
|
|
54
|
+
export { version };
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vifui/core",
|
|
3
|
+
"version": "0.4.0-alpha.6",
|
|
4
|
+
"description": "🚀 Beautiful and modern Vue UI library built with Tailwind CSS 4.0.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"author": "AbdulAzeez Olamide",
|
|
9
|
+
"homepage": "https://github.com/I-am-abdulazeez/vifui#readme",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"vifui",
|
|
12
|
+
"vue",
|
|
13
|
+
"vue3",
|
|
14
|
+
"components",
|
|
15
|
+
"ui",
|
|
16
|
+
"tailwind",
|
|
17
|
+
"vuesax",
|
|
18
|
+
"design-system"
|
|
19
|
+
],
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"module": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./styles": {
|
|
34
|
+
"default": "./dist/styles.css",
|
|
35
|
+
"style": "./dist/styles.css"
|
|
36
|
+
},
|
|
37
|
+
"./package.json": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/I-am-abdulazeez/vifui.git",
|
|
42
|
+
"directory": "packages/core"
|
|
43
|
+
},
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/I-am-abdulazeez/vifui/issues"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"dev": "rollup -c rollup.config.mjs --watch",
|
|
49
|
+
"build": "node scripts/build.mjs --tsc",
|
|
50
|
+
"build:fast": "node scripts/build.mjs",
|
|
51
|
+
"add:component": "node scripts/add-component.mjs",
|
|
52
|
+
"lint": "eslint .",
|
|
53
|
+
"typecheck": "tsc --noEmit",
|
|
54
|
+
"prepublishOnly": "pnpm build"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@internationalized/date": "3.10.0",
|
|
58
|
+
"clsx": "2.1.1",
|
|
59
|
+
"reka-ui": "2.6.0",
|
|
60
|
+
"tailwind-merge": "3.3.1",
|
|
61
|
+
"tailwind-variants": "3.1.1"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@iconify/vue": "^4.1.2",
|
|
65
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
66
|
+
"@vifui/tooling": "workspace:*",
|
|
67
|
+
"@vitejs/plugin-vue": "6.0.1",
|
|
68
|
+
"@vue/test-utils": "^2.4.6",
|
|
69
|
+
"fs-extra": "11.3.2",
|
|
70
|
+
"glob": "11.0.3",
|
|
71
|
+
"rollup": "^4.30.1",
|
|
72
|
+
"rollup-plugin-esbuild": "^6.1.1",
|
|
73
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
74
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
75
|
+
"tailwindcss": "4.1.13",
|
|
76
|
+
"vite": "^7.1.12",
|
|
77
|
+
"vue": "^3.5.13",
|
|
78
|
+
"vue-tsc": "^2.2.0"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"@vifui/styles": "^0.4.0",
|
|
82
|
+
"vue": ">=3.4.0",
|
|
83
|
+
"tailwindcss": ">=4.0.0",
|
|
84
|
+
"@iconify/vue": ">=4.0.0"
|
|
85
|
+
},
|
|
86
|
+
"peerDependenciesMeta": {
|
|
87
|
+
"@iconify/vue": {
|
|
88
|
+
"optional": true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public"
|
|
93
|
+
}
|
|
94
|
+
}
|