virtual-ui-lib 1.0.77 → 1.0.79
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/index.js +162 -0
- package/dist/index.mjs +160 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,6 +32,8 @@ __export(index_exports, {
|
|
|
32
32
|
AnimatedForm: () => AnimatedForm,
|
|
33
33
|
AvatarCard: () => AvatarCard,
|
|
34
34
|
BackgoundImageSlider: () => BackgoundImageSlider,
|
|
35
|
+
Button: () => Button,
|
|
36
|
+
Card: () => Card,
|
|
35
37
|
Charts: () => Charts,
|
|
36
38
|
ColorPicker: () => ColorPicker,
|
|
37
39
|
EcommerceCard: () => EcommerceCard,
|
|
@@ -3781,11 +3783,171 @@ var ReviewCard = ({
|
|
|
3781
3783
|
};
|
|
3782
3784
|
return /* @__PURE__ */ import_react22.default.createElement("div", { style: { background: bg, borderRadius: "16px", padding: "16px", width: "320px", fontFamily: "system-ui,sans-serif", border: "1px solid rgba(255,255,255,0.08)", boxShadow: "0 4px 16px rgba(0,0,0,0.3)" } }, /* @__PURE__ */ import_react22.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "12px" } }, /* @__PURE__ */ import_react22.default.createElement("img", { src: avatar, alt: name, onClick: onProfileClick, style: { width: "40px", height: "40px", borderRadius: "50%", cursor: "pointer" } }), /* @__PURE__ */ import_react22.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "2px" } }, /* @__PURE__ */ import_react22.default.createElement("div", { style: { fontSize: "14px", fontWeight: "700", color: "#fff" } }, name), /* @__PURE__ */ import_react22.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "4px" } }, Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ import_react22.default.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: i < rating ? accent : "rgba(255,255,255,0.15)", stroke: "none" }, /* @__PURE__ */ import_react22.default.createElement("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" })))))), /* @__PURE__ */ import_react22.default.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.7)", lineHeight: 1.5, marginBottom: "12px" } }, review), /* @__PURE__ */ import_react22.default.createElement("div", { style: { fontSize: "11px", color: "rgba(255,255,255,0.4)" } }, date));
|
|
3783
3785
|
};
|
|
3786
|
+
|
|
3787
|
+
// src/components/Card/Card.jsx
|
|
3788
|
+
var import_react23 = __toESM(require("react"));
|
|
3789
|
+
var Card = ({
|
|
3790
|
+
title = "Performance",
|
|
3791
|
+
description = "Real-time metrics with live dashboard updates every second.",
|
|
3792
|
+
icon = "\u26A1",
|
|
3793
|
+
tag = "Active",
|
|
3794
|
+
onClick
|
|
3795
|
+
}) => {
|
|
3796
|
+
const [hovered, setHovered] = (0, import_react23.useState)(false);
|
|
3797
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
3798
|
+
"div",
|
|
3799
|
+
{
|
|
3800
|
+
onMouseEnter: () => setHovered(true),
|
|
3801
|
+
onMouseLeave: () => setHovered(false),
|
|
3802
|
+
onClick,
|
|
3803
|
+
style: {
|
|
3804
|
+
background: "#ffffff",
|
|
3805
|
+
border: `0.5px solid ${hovered ? "#00000033" : "#0000001a"}`,
|
|
3806
|
+
borderRadius: "12px",
|
|
3807
|
+
padding: "1.25rem",
|
|
3808
|
+
transition: "border-color 0.2s, transform 0.2s",
|
|
3809
|
+
transform: hovered ? "translateY(-2px)" : "translateY(0)",
|
|
3810
|
+
cursor: onClick ? "pointer" : "default",
|
|
3811
|
+
position: "relative",
|
|
3812
|
+
overflow: "hidden",
|
|
3813
|
+
fontFamily: "sans-serif",
|
|
3814
|
+
width: "260px"
|
|
3815
|
+
}
|
|
3816
|
+
},
|
|
3817
|
+
/* @__PURE__ */ import_react23.default.createElement("div", { style: {
|
|
3818
|
+
position: "absolute",
|
|
3819
|
+
top: 0,
|
|
3820
|
+
left: 0,
|
|
3821
|
+
right: 0,
|
|
3822
|
+
height: "3px",
|
|
3823
|
+
background: "#1D9E75",
|
|
3824
|
+
borderRadius: "12px 12px 0 0"
|
|
3825
|
+
} }),
|
|
3826
|
+
/* @__PURE__ */ import_react23.default.createElement("div", { style: {
|
|
3827
|
+
width: 40,
|
|
3828
|
+
height: 40,
|
|
3829
|
+
borderRadius: 8,
|
|
3830
|
+
background: "#E1F5EE",
|
|
3831
|
+
display: "flex",
|
|
3832
|
+
alignItems: "center",
|
|
3833
|
+
justifyContent: "center",
|
|
3834
|
+
fontSize: 18,
|
|
3835
|
+
marginBottom: 14
|
|
3836
|
+
} }, icon),
|
|
3837
|
+
/* @__PURE__ */ import_react23.default.createElement("p", { style: { fontSize: 15, fontWeight: 700, color: "#111", margin: "0 0 6px" } }, title),
|
|
3838
|
+
/* @__PURE__ */ import_react23.default.createElement("p", { style: { fontSize: 13, color: "#666", lineHeight: 1.6, margin: "0 0 16px" } }, description),
|
|
3839
|
+
/* @__PURE__ */ import_react23.default.createElement("div", { style: {
|
|
3840
|
+
display: "flex",
|
|
3841
|
+
alignItems: "center",
|
|
3842
|
+
justifyContent: "space-between",
|
|
3843
|
+
borderTop: "0.5px solid #0000001a",
|
|
3844
|
+
paddingTop: 12
|
|
3845
|
+
} }, /* @__PURE__ */ import_react23.default.createElement("span", { style: {
|
|
3846
|
+
fontSize: 11,
|
|
3847
|
+
fontWeight: 500,
|
|
3848
|
+
padding: "3px 9px",
|
|
3849
|
+
borderRadius: 20,
|
|
3850
|
+
background: "#E1F5EE",
|
|
3851
|
+
color: "#0F6E56"
|
|
3852
|
+
} }, tag), /* @__PURE__ */ import_react23.default.createElement("span", { style: {
|
|
3853
|
+
fontSize: 14,
|
|
3854
|
+
color: "#999",
|
|
3855
|
+
display: "inline-block",
|
|
3856
|
+
transition: "transform 0.2s",
|
|
3857
|
+
transform: hovered ? "translateX(3px)" : "translateX(0)"
|
|
3858
|
+
} }, "\u2192"))
|
|
3859
|
+
);
|
|
3860
|
+
};
|
|
3861
|
+
|
|
3862
|
+
// src/components/Button/Button.jsx
|
|
3863
|
+
var import_react24 = __toESM(require("react"));
|
|
3864
|
+
var Button = ({
|
|
3865
|
+
text = "Click Me",
|
|
3866
|
+
variant = "gradient",
|
|
3867
|
+
// primary | outline | ghost | gradient
|
|
3868
|
+
size = "md",
|
|
3869
|
+
// sm | md | lg
|
|
3870
|
+
icon,
|
|
3871
|
+
loading = false,
|
|
3872
|
+
disabled = false,
|
|
3873
|
+
onClick
|
|
3874
|
+
}) => {
|
|
3875
|
+
const [hovered, setHovered] = (0, import_react24.useState)(false);
|
|
3876
|
+
const variants = {
|
|
3877
|
+
primary: {
|
|
3878
|
+
background: "#2563eb",
|
|
3879
|
+
color: "#fff",
|
|
3880
|
+
border: "none"
|
|
3881
|
+
},
|
|
3882
|
+
outline: {
|
|
3883
|
+
background: "transparent",
|
|
3884
|
+
color: "#2563eb",
|
|
3885
|
+
border: "1px solid #2563eb"
|
|
3886
|
+
},
|
|
3887
|
+
ghost: {
|
|
3888
|
+
background: "transparent",
|
|
3889
|
+
color: "#111",
|
|
3890
|
+
border: "none"
|
|
3891
|
+
},
|
|
3892
|
+
gradient: {
|
|
3893
|
+
background: "linear-gradient(135deg, #6366f1, #06b6d4)",
|
|
3894
|
+
color: "#fff",
|
|
3895
|
+
border: "none"
|
|
3896
|
+
}
|
|
3897
|
+
};
|
|
3898
|
+
const sizes = {
|
|
3899
|
+
sm: { padding: "6px 12px", fontSize: "12px" },
|
|
3900
|
+
md: { padding: "10px 18px", fontSize: "14px" },
|
|
3901
|
+
lg: { padding: "14px 24px", fontSize: "16px" }
|
|
3902
|
+
};
|
|
3903
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
3904
|
+
"button",
|
|
3905
|
+
{
|
|
3906
|
+
onClick,
|
|
3907
|
+
disabled: disabled || loading,
|
|
3908
|
+
onMouseEnter: () => setHovered(true),
|
|
3909
|
+
onMouseLeave: () => setHovered(false),
|
|
3910
|
+
style: {
|
|
3911
|
+
...variants[variant],
|
|
3912
|
+
...sizes[size],
|
|
3913
|
+
borderRadius: "10px",
|
|
3914
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
3915
|
+
display: "flex",
|
|
3916
|
+
alignItems: "center",
|
|
3917
|
+
gap: "8px",
|
|
3918
|
+
fontWeight: 600,
|
|
3919
|
+
fontFamily: "sans-serif",
|
|
3920
|
+
// 🔥 Animation
|
|
3921
|
+
transform: hovered ? "translateY(-2px) scale(1.02)" : "scale(1)",
|
|
3922
|
+
boxShadow: hovered ? "0 10px 20px rgba(0,0,0,0.15)" : "0 2px 6px rgba(0,0,0,0.1)",
|
|
3923
|
+
transition: "all 0.2s ease",
|
|
3924
|
+
opacity: disabled ? 0.6 : 1,
|
|
3925
|
+
position: "relative",
|
|
3926
|
+
overflow: "hidden"
|
|
3927
|
+
}
|
|
3928
|
+
},
|
|
3929
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
3930
|
+
"span",
|
|
3931
|
+
{
|
|
3932
|
+
style: {
|
|
3933
|
+
position: "absolute",
|
|
3934
|
+
inset: 0,
|
|
3935
|
+
background: "rgba(255,255,255,0.2)",
|
|
3936
|
+
opacity: hovered ? 1 : 0,
|
|
3937
|
+
transition: "opacity 0.3s"
|
|
3938
|
+
}
|
|
3939
|
+
}
|
|
3940
|
+
),
|
|
3941
|
+
loading ? /* @__PURE__ */ import_react24.default.createElement("span", null, "Loading...") : /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, icon && /* @__PURE__ */ import_react24.default.createElement("span", null, icon), /* @__PURE__ */ import_react24.default.createElement("span", null, text))
|
|
3942
|
+
);
|
|
3943
|
+
};
|
|
3784
3944
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3785
3945
|
0 && (module.exports = {
|
|
3786
3946
|
AnimatedForm,
|
|
3787
3947
|
AvatarCard,
|
|
3788
3948
|
BackgoundImageSlider,
|
|
3949
|
+
Button,
|
|
3950
|
+
Card,
|
|
3789
3951
|
Charts,
|
|
3790
3952
|
ColorPicker,
|
|
3791
3953
|
EcommerceCard,
|
package/dist/index.mjs
CHANGED
|
@@ -3725,10 +3725,170 @@ var ReviewCard = ({
|
|
|
3725
3725
|
};
|
|
3726
3726
|
return /* @__PURE__ */ React22.createElement("div", { style: { background: bg, borderRadius: "16px", padding: "16px", width: "320px", fontFamily: "system-ui,sans-serif", border: "1px solid rgba(255,255,255,0.08)", boxShadow: "0 4px 16px rgba(0,0,0,0.3)" } }, /* @__PURE__ */ React22.createElement("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "12px" } }, /* @__PURE__ */ React22.createElement("img", { src: avatar, alt: name, onClick: onProfileClick, style: { width: "40px", height: "40px", borderRadius: "50%", cursor: "pointer" } }), /* @__PURE__ */ React22.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "2px" } }, /* @__PURE__ */ React22.createElement("div", { style: { fontSize: "14px", fontWeight: "700", color: "#fff" } }, name), /* @__PURE__ */ React22.createElement("div", { style: { display: "flex", alignItems: "center", gap: "4px" } }, Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ React22.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: i < rating ? accent : "rgba(255,255,255,0.15)", stroke: "none" }, /* @__PURE__ */ React22.createElement("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" })))))), /* @__PURE__ */ React22.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.7)", lineHeight: 1.5, marginBottom: "12px" } }, review), /* @__PURE__ */ React22.createElement("div", { style: { fontSize: "11px", color: "rgba(255,255,255,0.4)" } }, date));
|
|
3727
3727
|
};
|
|
3728
|
+
|
|
3729
|
+
// src/components/Card/Card.jsx
|
|
3730
|
+
import React23, { useState as useState20 } from "react";
|
|
3731
|
+
var Card = ({
|
|
3732
|
+
title = "Performance",
|
|
3733
|
+
description = "Real-time metrics with live dashboard updates every second.",
|
|
3734
|
+
icon = "\u26A1",
|
|
3735
|
+
tag = "Active",
|
|
3736
|
+
onClick
|
|
3737
|
+
}) => {
|
|
3738
|
+
const [hovered, setHovered] = useState20(false);
|
|
3739
|
+
return /* @__PURE__ */ React23.createElement(
|
|
3740
|
+
"div",
|
|
3741
|
+
{
|
|
3742
|
+
onMouseEnter: () => setHovered(true),
|
|
3743
|
+
onMouseLeave: () => setHovered(false),
|
|
3744
|
+
onClick,
|
|
3745
|
+
style: {
|
|
3746
|
+
background: "#ffffff",
|
|
3747
|
+
border: `0.5px solid ${hovered ? "#00000033" : "#0000001a"}`,
|
|
3748
|
+
borderRadius: "12px",
|
|
3749
|
+
padding: "1.25rem",
|
|
3750
|
+
transition: "border-color 0.2s, transform 0.2s",
|
|
3751
|
+
transform: hovered ? "translateY(-2px)" : "translateY(0)",
|
|
3752
|
+
cursor: onClick ? "pointer" : "default",
|
|
3753
|
+
position: "relative",
|
|
3754
|
+
overflow: "hidden",
|
|
3755
|
+
fontFamily: "sans-serif",
|
|
3756
|
+
width: "260px"
|
|
3757
|
+
}
|
|
3758
|
+
},
|
|
3759
|
+
/* @__PURE__ */ React23.createElement("div", { style: {
|
|
3760
|
+
position: "absolute",
|
|
3761
|
+
top: 0,
|
|
3762
|
+
left: 0,
|
|
3763
|
+
right: 0,
|
|
3764
|
+
height: "3px",
|
|
3765
|
+
background: "#1D9E75",
|
|
3766
|
+
borderRadius: "12px 12px 0 0"
|
|
3767
|
+
} }),
|
|
3768
|
+
/* @__PURE__ */ React23.createElement("div", { style: {
|
|
3769
|
+
width: 40,
|
|
3770
|
+
height: 40,
|
|
3771
|
+
borderRadius: 8,
|
|
3772
|
+
background: "#E1F5EE",
|
|
3773
|
+
display: "flex",
|
|
3774
|
+
alignItems: "center",
|
|
3775
|
+
justifyContent: "center",
|
|
3776
|
+
fontSize: 18,
|
|
3777
|
+
marginBottom: 14
|
|
3778
|
+
} }, icon),
|
|
3779
|
+
/* @__PURE__ */ React23.createElement("p", { style: { fontSize: 15, fontWeight: 700, color: "#111", margin: "0 0 6px" } }, title),
|
|
3780
|
+
/* @__PURE__ */ React23.createElement("p", { style: { fontSize: 13, color: "#666", lineHeight: 1.6, margin: "0 0 16px" } }, description),
|
|
3781
|
+
/* @__PURE__ */ React23.createElement("div", { style: {
|
|
3782
|
+
display: "flex",
|
|
3783
|
+
alignItems: "center",
|
|
3784
|
+
justifyContent: "space-between",
|
|
3785
|
+
borderTop: "0.5px solid #0000001a",
|
|
3786
|
+
paddingTop: 12
|
|
3787
|
+
} }, /* @__PURE__ */ React23.createElement("span", { style: {
|
|
3788
|
+
fontSize: 11,
|
|
3789
|
+
fontWeight: 500,
|
|
3790
|
+
padding: "3px 9px",
|
|
3791
|
+
borderRadius: 20,
|
|
3792
|
+
background: "#E1F5EE",
|
|
3793
|
+
color: "#0F6E56"
|
|
3794
|
+
} }, tag), /* @__PURE__ */ React23.createElement("span", { style: {
|
|
3795
|
+
fontSize: 14,
|
|
3796
|
+
color: "#999",
|
|
3797
|
+
display: "inline-block",
|
|
3798
|
+
transition: "transform 0.2s",
|
|
3799
|
+
transform: hovered ? "translateX(3px)" : "translateX(0)"
|
|
3800
|
+
} }, "\u2192"))
|
|
3801
|
+
);
|
|
3802
|
+
};
|
|
3803
|
+
|
|
3804
|
+
// src/components/Button/Button.jsx
|
|
3805
|
+
import React24, { useState as useState21 } from "react";
|
|
3806
|
+
var Button = ({
|
|
3807
|
+
text = "Click Me",
|
|
3808
|
+
variant = "gradient",
|
|
3809
|
+
// primary | outline | ghost | gradient
|
|
3810
|
+
size = "md",
|
|
3811
|
+
// sm | md | lg
|
|
3812
|
+
icon,
|
|
3813
|
+
loading = false,
|
|
3814
|
+
disabled = false,
|
|
3815
|
+
onClick
|
|
3816
|
+
}) => {
|
|
3817
|
+
const [hovered, setHovered] = useState21(false);
|
|
3818
|
+
const variants = {
|
|
3819
|
+
primary: {
|
|
3820
|
+
background: "#2563eb",
|
|
3821
|
+
color: "#fff",
|
|
3822
|
+
border: "none"
|
|
3823
|
+
},
|
|
3824
|
+
outline: {
|
|
3825
|
+
background: "transparent",
|
|
3826
|
+
color: "#2563eb",
|
|
3827
|
+
border: "1px solid #2563eb"
|
|
3828
|
+
},
|
|
3829
|
+
ghost: {
|
|
3830
|
+
background: "transparent",
|
|
3831
|
+
color: "#111",
|
|
3832
|
+
border: "none"
|
|
3833
|
+
},
|
|
3834
|
+
gradient: {
|
|
3835
|
+
background: "linear-gradient(135deg, #6366f1, #06b6d4)",
|
|
3836
|
+
color: "#fff",
|
|
3837
|
+
border: "none"
|
|
3838
|
+
}
|
|
3839
|
+
};
|
|
3840
|
+
const sizes = {
|
|
3841
|
+
sm: { padding: "6px 12px", fontSize: "12px" },
|
|
3842
|
+
md: { padding: "10px 18px", fontSize: "14px" },
|
|
3843
|
+
lg: { padding: "14px 24px", fontSize: "16px" }
|
|
3844
|
+
};
|
|
3845
|
+
return /* @__PURE__ */ React24.createElement(
|
|
3846
|
+
"button",
|
|
3847
|
+
{
|
|
3848
|
+
onClick,
|
|
3849
|
+
disabled: disabled || loading,
|
|
3850
|
+
onMouseEnter: () => setHovered(true),
|
|
3851
|
+
onMouseLeave: () => setHovered(false),
|
|
3852
|
+
style: {
|
|
3853
|
+
...variants[variant],
|
|
3854
|
+
...sizes[size],
|
|
3855
|
+
borderRadius: "10px",
|
|
3856
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
3857
|
+
display: "flex",
|
|
3858
|
+
alignItems: "center",
|
|
3859
|
+
gap: "8px",
|
|
3860
|
+
fontWeight: 600,
|
|
3861
|
+
fontFamily: "sans-serif",
|
|
3862
|
+
// 🔥 Animation
|
|
3863
|
+
transform: hovered ? "translateY(-2px) scale(1.02)" : "scale(1)",
|
|
3864
|
+
boxShadow: hovered ? "0 10px 20px rgba(0,0,0,0.15)" : "0 2px 6px rgba(0,0,0,0.1)",
|
|
3865
|
+
transition: "all 0.2s ease",
|
|
3866
|
+
opacity: disabled ? 0.6 : 1,
|
|
3867
|
+
position: "relative",
|
|
3868
|
+
overflow: "hidden"
|
|
3869
|
+
}
|
|
3870
|
+
},
|
|
3871
|
+
/* @__PURE__ */ React24.createElement(
|
|
3872
|
+
"span",
|
|
3873
|
+
{
|
|
3874
|
+
style: {
|
|
3875
|
+
position: "absolute",
|
|
3876
|
+
inset: 0,
|
|
3877
|
+
background: "rgba(255,255,255,0.2)",
|
|
3878
|
+
opacity: hovered ? 1 : 0,
|
|
3879
|
+
transition: "opacity 0.3s"
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
),
|
|
3883
|
+
loading ? /* @__PURE__ */ React24.createElement("span", null, "Loading...") : /* @__PURE__ */ React24.createElement(React24.Fragment, null, icon && /* @__PURE__ */ React24.createElement("span", null, icon), /* @__PURE__ */ React24.createElement("span", null, text))
|
|
3884
|
+
);
|
|
3885
|
+
};
|
|
3728
3886
|
export {
|
|
3729
3887
|
AnimatedForm,
|
|
3730
3888
|
AvatarCard,
|
|
3731
3889
|
BackgoundImageSlider,
|
|
3890
|
+
Button,
|
|
3891
|
+
Card,
|
|
3732
3892
|
Charts,
|
|
3733
3893
|
ColorPicker,
|
|
3734
3894
|
EcommerceCard,
|