virtual-ui-lib 1.0.78 → 1.0.80

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 CHANGED
@@ -29,9 +29,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/index.js
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
+ AnimatedButton: () => AnimatedButton,
32
33
  AnimatedForm: () => AnimatedForm,
33
34
  AvatarCard: () => AvatarCard,
34
35
  BackgoundImageSlider: () => BackgoundImageSlider,
36
+ Button: () => Button,
35
37
  Card: () => Card,
36
38
  Charts: () => Charts,
37
39
  ColorPicker: () => ColorPicker,
@@ -3857,11 +3859,142 @@ var Card = ({
3857
3859
  } }, "\u2192"))
3858
3860
  );
3859
3861
  };
3862
+
3863
+ // src/components/Button/Button.jsx
3864
+ var import_react24 = __toESM(require("react"));
3865
+ var Button = ({
3866
+ text = "Click Me",
3867
+ variant = "gradient",
3868
+ // primary | outline | ghost | gradient
3869
+ size = "md",
3870
+ // sm | md | lg
3871
+ icon,
3872
+ loading = false,
3873
+ disabled = false,
3874
+ onClick
3875
+ }) => {
3876
+ const [hovered, setHovered] = (0, import_react24.useState)(false);
3877
+ const variants = {
3878
+ primary: {
3879
+ background: "#2563eb",
3880
+ color: "#fff",
3881
+ border: "none"
3882
+ },
3883
+ outline: {
3884
+ background: "transparent",
3885
+ color: "#2563eb",
3886
+ border: "1px solid #2563eb"
3887
+ },
3888
+ ghost: {
3889
+ background: "transparent",
3890
+ color: "#111",
3891
+ border: "none"
3892
+ },
3893
+ gradient: {
3894
+ background: "linear-gradient(135deg, #6366f1, #06b6d4)",
3895
+ color: "#fff",
3896
+ border: "none"
3897
+ }
3898
+ };
3899
+ const sizes = {
3900
+ sm: { padding: "6px 12px", fontSize: "12px" },
3901
+ md: { padding: "10px 18px", fontSize: "14px" },
3902
+ lg: { padding: "14px 24px", fontSize: "16px" }
3903
+ };
3904
+ return /* @__PURE__ */ import_react24.default.createElement(
3905
+ "button",
3906
+ {
3907
+ onClick,
3908
+ disabled: disabled || loading,
3909
+ onMouseEnter: () => setHovered(true),
3910
+ onMouseLeave: () => setHovered(false),
3911
+ style: {
3912
+ ...variants[variant],
3913
+ ...sizes[size],
3914
+ borderRadius: "10px",
3915
+ cursor: disabled ? "not-allowed" : "pointer",
3916
+ display: "flex",
3917
+ alignItems: "center",
3918
+ gap: "8px",
3919
+ fontWeight: 600,
3920
+ fontFamily: "sans-serif",
3921
+ // 🔥 Animation
3922
+ transform: hovered ? "translateY(-2px) scale(1.02)" : "scale(1)",
3923
+ boxShadow: hovered ? "0 10px 20px rgba(0,0,0,0.15)" : "0 2px 6px rgba(0,0,0,0.1)",
3924
+ transition: "all 0.2s ease",
3925
+ opacity: disabled ? 0.6 : 1,
3926
+ position: "relative",
3927
+ overflow: "hidden"
3928
+ }
3929
+ },
3930
+ /* @__PURE__ */ import_react24.default.createElement(
3931
+ "span",
3932
+ {
3933
+ style: {
3934
+ position: "absolute",
3935
+ inset: 0,
3936
+ background: "rgba(255,255,255,0.2)",
3937
+ opacity: hovered ? 1 : 0,
3938
+ transition: "opacity 0.3s"
3939
+ }
3940
+ }
3941
+ ),
3942
+ 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))
3943
+ );
3944
+ };
3945
+
3946
+ // src/components/AnimatedButton/AnimatedButton.jsx
3947
+ var import_react25 = __toESM(require("react"));
3948
+ var AnimatedButton = ({
3949
+ text = "Click Me!",
3950
+ bg = "#7c3aed",
3951
+ color = "white",
3952
+ size = "md",
3953
+ width = "auto",
3954
+ radius = "12px",
3955
+ border = "none",
3956
+ weight = "600",
3957
+ shadow = "0 4px 14px rgba(124,58,237,0.4)",
3958
+ onClick
3959
+ }) => {
3960
+ const sizes = { sm: "8px 16px", md: "12px 24px", lg: "16px 32px" };
3961
+ const [hovered, setHovered] = (0, import_react25.useState)(false);
3962
+ return /* @__PURE__ */ import_react25.default.createElement(
3963
+ "button",
3964
+ {
3965
+ onClick,
3966
+ onMouseEnter: () => setHovered(true),
3967
+ onMouseLeave: () => setHovered(false),
3968
+ style: {
3969
+ background: hovered ? "#6b21a8" : bg,
3970
+ color,
3971
+ padding: sizes[size],
3972
+ width,
3973
+ border,
3974
+ borderRadius: radius,
3975
+ cursor: "pointer",
3976
+ fontWeight: weight,
3977
+ fontSize: "15px",
3978
+ boxShadow: shadow,
3979
+ transform: hovered ? "scale(1.05)" : "scale(1)",
3980
+ transition: "transform 0.2s ease, background 0.2s ease",
3981
+ display: "flex",
3982
+ alignItems: "center",
3983
+ justifyContent: "center",
3984
+ fontFamily: "system-ui, sans-serif",
3985
+ letterSpacing: "0.02em"
3986
+ }
3987
+ },
3988
+ text
3989
+ );
3990
+ };
3860
3991
  // Annotate the CommonJS export names for ESM import in node:
3861
3992
  0 && (module.exports = {
3993
+ AnimatedButton,
3862
3994
  AnimatedForm,
3863
3995
  AvatarCard,
3864
3996
  BackgoundImageSlider,
3997
+ Button,
3865
3998
  Card,
3866
3999
  Charts,
3867
4000
  ColorPicker,
package/dist/index.mjs CHANGED
@@ -3800,10 +3800,141 @@ 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
+ };
3886
+
3887
+ // src/components/AnimatedButton/AnimatedButton.jsx
3888
+ import React25, { useState as useState22 } from "react";
3889
+ var AnimatedButton = ({
3890
+ text = "Click Me!",
3891
+ bg = "#7c3aed",
3892
+ color = "white",
3893
+ size = "md",
3894
+ width = "auto",
3895
+ radius = "12px",
3896
+ border = "none",
3897
+ weight = "600",
3898
+ shadow = "0 4px 14px rgba(124,58,237,0.4)",
3899
+ onClick
3900
+ }) => {
3901
+ const sizes = { sm: "8px 16px", md: "12px 24px", lg: "16px 32px" };
3902
+ const [hovered, setHovered] = useState22(false);
3903
+ return /* @__PURE__ */ React25.createElement(
3904
+ "button",
3905
+ {
3906
+ onClick,
3907
+ onMouseEnter: () => setHovered(true),
3908
+ onMouseLeave: () => setHovered(false),
3909
+ style: {
3910
+ background: hovered ? "#6b21a8" : bg,
3911
+ color,
3912
+ padding: sizes[size],
3913
+ width,
3914
+ border,
3915
+ borderRadius: radius,
3916
+ cursor: "pointer",
3917
+ fontWeight: weight,
3918
+ fontSize: "15px",
3919
+ boxShadow: shadow,
3920
+ transform: hovered ? "scale(1.05)" : "scale(1)",
3921
+ transition: "transform 0.2s ease, background 0.2s ease",
3922
+ display: "flex",
3923
+ alignItems: "center",
3924
+ justifyContent: "center",
3925
+ fontFamily: "system-ui, sans-serif",
3926
+ letterSpacing: "0.02em"
3927
+ }
3928
+ },
3929
+ text
3930
+ );
3931
+ };
3803
3932
  export {
3933
+ AnimatedButton,
3804
3934
  AnimatedForm,
3805
3935
  AvatarCard,
3806
3936
  BackgoundImageSlider,
3937
+ Button,
3807
3938
  Card,
3808
3939
  Charts,
3809
3940
  ColorPicker,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-ui-lib",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "author": "Ankush",
6
6
  "license": "ISC",