virtual-ui-lib 1.0.78 → 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 +85 -0
- package/dist/index.mjs +84 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __export(index_exports, {
|
|
|
32
32
|
AnimatedForm: () => AnimatedForm,
|
|
33
33
|
AvatarCard: () => AvatarCard,
|
|
34
34
|
BackgoundImageSlider: () => BackgoundImageSlider,
|
|
35
|
+
Button: () => Button,
|
|
35
36
|
Card: () => Card,
|
|
36
37
|
Charts: () => Charts,
|
|
37
38
|
ColorPicker: () => ColorPicker,
|
|
@@ -3857,11 +3858,95 @@ var Card = ({
|
|
|
3857
3858
|
} }, "\u2192"))
|
|
3858
3859
|
);
|
|
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
|
+
};
|
|
3860
3944
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3861
3945
|
0 && (module.exports = {
|
|
3862
3946
|
AnimatedForm,
|
|
3863
3947
|
AvatarCard,
|
|
3864
3948
|
BackgoundImageSlider,
|
|
3949
|
+
Button,
|
|
3865
3950
|
Card,
|
|
3866
3951
|
Charts,
|
|
3867
3952
|
ColorPicker,
|
package/dist/index.mjs
CHANGED
|
@@ -3800,10 +3800,94 @@ var Card = ({
|
|
|
3800
3800
|
} }, "\u2192"))
|
|
3801
3801
|
);
|
|
3802
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
|
+
};
|
|
3803
3886
|
export {
|
|
3804
3887
|
AnimatedForm,
|
|
3805
3888
|
AvatarCard,
|
|
3806
3889
|
BackgoundImageSlider,
|
|
3890
|
+
Button,
|
|
3807
3891
|
Card,
|
|
3808
3892
|
Charts,
|
|
3809
3893
|
ColorPicker,
|