virtual-ui-component-own 1.0.0 → 1.0.1

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 CHANGED
@@ -1,8 +1,3 @@
1
- # 🌐 Live Demo
2
-
3
- 👉 https://virtual-ui-client.onrender.com
4
-
5
- ---
6
1
 
7
2
  # Virtual UI
8
3
 
@@ -13,7 +8,7 @@ A modern and customizable **React UI Component Library** designed for fast devel
13
8
  ## 📦 Install
14
9
 
15
10
  ```bash
16
- npm install virtual-ui-lib
11
+ npm i virtual-ui-component-own
17
12
  ```
18
13
 
19
14
  ---
package/dist/index.js CHANGED
@@ -3863,83 +3863,78 @@ var Card = ({
3863
3863
  // src/components/Button/Button.jsx
3864
3864
  var import_react24 = __toESM(require("react"));
3865
3865
  var Button = ({
3866
- text = "Click Me",
3867
- variant = "gradient",
3868
- // primary | outline | ghost | gradient
3866
+ text = "Click me",
3867
+ bg = "#6366f1",
3868
+ color = "#ffffff",
3869
3869
  size = "md",
3870
- // sm | md | lg
3871
- icon,
3872
- loading = false,
3870
+ rounded = "10px",
3873
3871
  disabled = false,
3874
- onClick
3872
+ loading = false,
3873
+ onClick = () => {
3874
+ },
3875
+ shadow = true
3875
3876
  }) => {
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
3877
  const sizes = {
3900
- sm: { padding: "6px 12px", fontSize: "12px" },
3901
- md: { padding: "10px 18px", fontSize: "14px" },
3902
- lg: { padding: "14px 24px", fontSize: "16px" }
3878
+ sm: { padding: "8px 16px", fontSize: "13px" },
3879
+ md: { padding: "12px 24px", fontSize: "15px" },
3880
+ lg: { padding: "16px 32px", fontSize: "17px" }
3881
+ };
3882
+ const alpha = (hex, op) => {
3883
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
3884
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
3903
3885
  };
3904
3886
  return /* @__PURE__ */ import_react24.default.createElement(
3905
3887
  "button",
3906
3888
  {
3907
3889
  onClick,
3908
3890
  disabled: disabled || loading,
3909
- onMouseEnter: () => setHovered(true),
3910
- onMouseLeave: () => setHovered(false),
3911
3891
  style: {
3912
- ...variants[variant],
3913
- ...sizes[size],
3914
- borderRadius: "10px",
3892
+ background: bg,
3893
+ color,
3894
+ padding: sizes[size].padding,
3895
+ borderRadius: rounded,
3896
+ border: "none",
3915
3897
  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)",
3898
+ fontWeight: "600",
3899
+ fontSize: sizes[size].fontSize,
3900
+ fontFamily: "system-ui, sans-serif",
3901
+ boxShadow: shadow ? "0 4px 14px " + alpha(bg, 0.4) : "none",
3902
+ opacity: disabled ? 0.7 : 1,
3924
3903
  transition: "all 0.2s ease",
3925
- opacity: disabled ? 0.6 : 1,
3926
3904
  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"
3905
+ overflow: "hidden",
3906
+ transform: "translateY(0)",
3907
+ display: "inline-flex",
3908
+ alignItems: "center",
3909
+ justifyContent: "center",
3910
+ gap: "8px"
3911
+ },
3912
+ onMouseDown: (e) => {
3913
+ if (!disabled && !loading) {
3914
+ e.currentTarget.style.transform = "translateY(2px)";
3915
+ }
3916
+ },
3917
+ onMouseUp: (e) => {
3918
+ if (!disabled && !loading) {
3919
+ e.currentTarget.style.transform = "translateY(0)";
3920
+ }
3921
+ },
3922
+ onMouseLeave: (e) => {
3923
+ if (!disabled && !loading) {
3924
+ e.currentTarget.style.transform = "translateY(0)";
3939
3925
  }
3940
3926
  }
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))
3927
+ },
3928
+ loading ? /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("span", { style: {
3929
+ width: "14px",
3930
+ height: "14px",
3931
+ border: "2px solid rgba(255,255,255,0.3)",
3932
+ borderTopColor: "#fff",
3933
+ borderRadius: "50%",
3934
+ animation: "spin 1s linear infinite",
3935
+ display: "inline-block"
3936
+ } }), /* @__PURE__ */ import_react24.default.createElement("style", null, `@keyframes spin { to { transform: rotate(360deg); } }`)) : null,
3937
+ loading ? "Processing..." : text
3943
3938
  );
3944
3939
  };
3945
3940
 
package/dist/index.mjs CHANGED
@@ -3802,90 +3802,85 @@ var Card = ({
3802
3802
  };
3803
3803
 
3804
3804
  // src/components/Button/Button.jsx
3805
- import React24, { useState as useState21 } from "react";
3805
+ import React24 from "react";
3806
3806
  var Button = ({
3807
- text = "Click Me",
3808
- variant = "gradient",
3809
- // primary | outline | ghost | gradient
3807
+ text = "Click me",
3808
+ bg = "#6366f1",
3809
+ color = "#ffffff",
3810
3810
  size = "md",
3811
- // sm | md | lg
3812
- icon,
3813
- loading = false,
3811
+ rounded = "10px",
3814
3812
  disabled = false,
3815
- onClick
3813
+ loading = false,
3814
+ onClick = () => {
3815
+ },
3816
+ shadow = true
3816
3817
  }) => {
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
3818
  const sizes = {
3841
- sm: { padding: "6px 12px", fontSize: "12px" },
3842
- md: { padding: "10px 18px", fontSize: "14px" },
3843
- lg: { padding: "14px 24px", fontSize: "16px" }
3819
+ sm: { padding: "8px 16px", fontSize: "13px" },
3820
+ md: { padding: "12px 24px", fontSize: "15px" },
3821
+ lg: { padding: "16px 32px", fontSize: "17px" }
3822
+ };
3823
+ const alpha = (hex, op) => {
3824
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
3825
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
3844
3826
  };
3845
3827
  return /* @__PURE__ */ React24.createElement(
3846
3828
  "button",
3847
3829
  {
3848
3830
  onClick,
3849
3831
  disabled: disabled || loading,
3850
- onMouseEnter: () => setHovered(true),
3851
- onMouseLeave: () => setHovered(false),
3852
3832
  style: {
3853
- ...variants[variant],
3854
- ...sizes[size],
3855
- borderRadius: "10px",
3833
+ background: bg,
3834
+ color,
3835
+ padding: sizes[size].padding,
3836
+ borderRadius: rounded,
3837
+ border: "none",
3856
3838
  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)",
3839
+ fontWeight: "600",
3840
+ fontSize: sizes[size].fontSize,
3841
+ fontFamily: "system-ui, sans-serif",
3842
+ boxShadow: shadow ? "0 4px 14px " + alpha(bg, 0.4) : "none",
3843
+ opacity: disabled ? 0.7 : 1,
3865
3844
  transition: "all 0.2s ease",
3866
- opacity: disabled ? 0.6 : 1,
3867
3845
  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"
3846
+ overflow: "hidden",
3847
+ transform: "translateY(0)",
3848
+ display: "inline-flex",
3849
+ alignItems: "center",
3850
+ justifyContent: "center",
3851
+ gap: "8px"
3852
+ },
3853
+ onMouseDown: (e) => {
3854
+ if (!disabled && !loading) {
3855
+ e.currentTarget.style.transform = "translateY(2px)";
3856
+ }
3857
+ },
3858
+ onMouseUp: (e) => {
3859
+ if (!disabled && !loading) {
3860
+ e.currentTarget.style.transform = "translateY(0)";
3861
+ }
3862
+ },
3863
+ onMouseLeave: (e) => {
3864
+ if (!disabled && !loading) {
3865
+ e.currentTarget.style.transform = "translateY(0)";
3880
3866
  }
3881
3867
  }
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))
3868
+ },
3869
+ loading ? /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("span", { style: {
3870
+ width: "14px",
3871
+ height: "14px",
3872
+ border: "2px solid rgba(255,255,255,0.3)",
3873
+ borderTopColor: "#fff",
3874
+ borderRadius: "50%",
3875
+ animation: "spin 1s linear infinite",
3876
+ display: "inline-block"
3877
+ } }), /* @__PURE__ */ React24.createElement("style", null, `@keyframes spin { to { transform: rotate(360deg); } }`)) : null,
3878
+ loading ? "Processing..." : text
3884
3879
  );
3885
3880
  };
3886
3881
 
3887
3882
  // src/components/AnimatedButton/AnimatedButton.jsx
3888
- import React25, { useState as useState22 } from "react";
3883
+ import React25, { useState as useState21 } from "react";
3889
3884
  var AnimatedButton = ({
3890
3885
  text = "Click Me!",
3891
3886
  bg = "#7c3aed",
@@ -3899,7 +3894,7 @@ var AnimatedButton = ({
3899
3894
  onClick
3900
3895
  }) => {
3901
3896
  const sizes = { sm: "8px 16px", md: "12px 24px", lg: "16px 32px" };
3902
- const [hovered, setHovered] = useState22(false);
3897
+ const [hovered, setHovered] = useState21(false);
3903
3898
  return /* @__PURE__ */ React25.createElement(
3904
3899
  "button",
3905
3900
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-ui-component-own",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "author": "Ankush",
6
6
  "license": "ISC",