ui-library-raushan-ranjan 1.0.0
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 +218 -0
- package/dist/index.mjs +181 -0
- package/package.json +48 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/index.js
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
32
|
+
Button: () => Button,
|
|
33
|
+
Card: () => Card
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
|
+
|
|
37
|
+
// src/components/Button/Button.jsx
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
function Button({
|
|
40
|
+
variant = "primary",
|
|
41
|
+
disabled = false,
|
|
42
|
+
className = "",
|
|
43
|
+
children,
|
|
44
|
+
...rest
|
|
45
|
+
}) {
|
|
46
|
+
const variants = {
|
|
47
|
+
primary: {
|
|
48
|
+
background: "linear-gradient(135deg, #6366F1, #8B5CF6)",
|
|
49
|
+
color: "#ffffff"
|
|
50
|
+
},
|
|
51
|
+
secondary: {
|
|
52
|
+
background: "linear-gradient(135deg, #0EA5E9, #06B6D4)",
|
|
53
|
+
color: "#ffffff"
|
|
54
|
+
},
|
|
55
|
+
danger: {
|
|
56
|
+
background: "linear-gradient(135deg, #EF4444, #DC2626)",
|
|
57
|
+
color: "#ffffff"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
type: rest.type ?? "button",
|
|
64
|
+
disabled,
|
|
65
|
+
className: `vu-btn ${className}`,
|
|
66
|
+
...rest,
|
|
67
|
+
style: {
|
|
68
|
+
padding: "14px 24px",
|
|
69
|
+
border: "none",
|
|
70
|
+
borderRadius: "14px",
|
|
71
|
+
fontSize: "15px",
|
|
72
|
+
fontWeight: "700",
|
|
73
|
+
letterSpacing: "0.3px",
|
|
74
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
75
|
+
transition: "all 0.3s ease",
|
|
76
|
+
boxShadow: disabled ? "none" : "0 8px 20px rgba(0,0,0,0.15)",
|
|
77
|
+
opacity: disabled ? 0.6 : 1,
|
|
78
|
+
transform: "translateY(0px)",
|
|
79
|
+
...variants[variant]
|
|
80
|
+
},
|
|
81
|
+
onMouseEnter: (e) => {
|
|
82
|
+
if (!disabled) {
|
|
83
|
+
e.currentTarget.style.transform = "translateY(-3px)";
|
|
84
|
+
e.currentTarget.style.boxShadow = "0 14px 28px rgba(0,0,0,0.2)";
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
onMouseLeave: (e) => {
|
|
88
|
+
if (!disabled) {
|
|
89
|
+
e.currentTarget.style.transform = "translateY(0px)";
|
|
90
|
+
e.currentTarget.style.boxShadow = "0 8px 20px rgba(0,0,0,0.15)";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
children
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// src/components/Card/Card.jsx
|
|
99
|
+
var import_react2 = __toESM(require("react"));
|
|
100
|
+
function Card({
|
|
101
|
+
title,
|
|
102
|
+
subtitle,
|
|
103
|
+
image,
|
|
104
|
+
children,
|
|
105
|
+
className = "",
|
|
106
|
+
...rest
|
|
107
|
+
}) {
|
|
108
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
className: `vu-card ${className}`,
|
|
112
|
+
...rest,
|
|
113
|
+
style: {
|
|
114
|
+
width: "340px",
|
|
115
|
+
borderRadius: "24px",
|
|
116
|
+
overflow: "hidden",
|
|
117
|
+
background: "#ffffff",
|
|
118
|
+
boxShadow: "0 10px 30px rgba(0,0,0,0.12)",
|
|
119
|
+
transition: "all 0.3s ease",
|
|
120
|
+
cursor: "pointer",
|
|
121
|
+
fontFamily: "Arial, sans-serif"
|
|
122
|
+
},
|
|
123
|
+
onMouseEnter: (e) => {
|
|
124
|
+
e.currentTarget.style.transform = "translateY(-8px)";
|
|
125
|
+
e.currentTarget.style.boxShadow = "0 20px 40px rgba(0,0,0,0.18)";
|
|
126
|
+
},
|
|
127
|
+
onMouseLeave: (e) => {
|
|
128
|
+
e.currentTarget.style.transform = "translateY(0px)";
|
|
129
|
+
e.currentTarget.style.boxShadow = "0 10px 30px rgba(0,0,0,0.12)";
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
image && /* @__PURE__ */ import_react2.default.createElement(
|
|
133
|
+
"img",
|
|
134
|
+
{
|
|
135
|
+
src: image,
|
|
136
|
+
alt: title,
|
|
137
|
+
style: {
|
|
138
|
+
width: "100%",
|
|
139
|
+
height: "200px",
|
|
140
|
+
objectFit: "cover"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
style: {
|
|
148
|
+
padding: "22px"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
title && /* @__PURE__ */ import_react2.default.createElement(
|
|
152
|
+
"h2",
|
|
153
|
+
{
|
|
154
|
+
style: {
|
|
155
|
+
margin: 0,
|
|
156
|
+
fontSize: "24px",
|
|
157
|
+
fontWeight: "700",
|
|
158
|
+
color: "#111827"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
title
|
|
162
|
+
),
|
|
163
|
+
subtitle && /* @__PURE__ */ import_react2.default.createElement(
|
|
164
|
+
"p",
|
|
165
|
+
{
|
|
166
|
+
style: {
|
|
167
|
+
marginTop: "8px",
|
|
168
|
+
fontSize: "15px",
|
|
169
|
+
color: "#6B7280",
|
|
170
|
+
lineHeight: "1.6"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
subtitle
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
176
|
+
"div",
|
|
177
|
+
{
|
|
178
|
+
style: {
|
|
179
|
+
marginTop: "18px",
|
|
180
|
+
color: "#374151",
|
|
181
|
+
fontSize: "15px",
|
|
182
|
+
lineHeight: "1.7"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
children
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
188
|
+
"button",
|
|
189
|
+
{
|
|
190
|
+
style: {
|
|
191
|
+
marginTop: "20px",
|
|
192
|
+
padding: "12px 18px",
|
|
193
|
+
border: "none",
|
|
194
|
+
borderRadius: "12px",
|
|
195
|
+
background: "linear-gradient(135deg, #6366F1, #8B5CF6)",
|
|
196
|
+
color: "#fff",
|
|
197
|
+
fontWeight: "600",
|
|
198
|
+
fontSize: "14px",
|
|
199
|
+
cursor: "pointer",
|
|
200
|
+
transition: "0.3s"
|
|
201
|
+
},
|
|
202
|
+
onMouseEnter: (e) => {
|
|
203
|
+
e.currentTarget.style.opacity = "0.9";
|
|
204
|
+
},
|
|
205
|
+
onMouseLeave: (e) => {
|
|
206
|
+
e.currentTarget.style.opacity = "1";
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"Explore More"
|
|
210
|
+
)
|
|
211
|
+
)
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
215
|
+
0 && (module.exports = {
|
|
216
|
+
Button,
|
|
217
|
+
Card
|
|
218
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// src/components/Button/Button.jsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
function Button({
|
|
4
|
+
variant = "primary",
|
|
5
|
+
disabled = false,
|
|
6
|
+
className = "",
|
|
7
|
+
children,
|
|
8
|
+
...rest
|
|
9
|
+
}) {
|
|
10
|
+
const variants = {
|
|
11
|
+
primary: {
|
|
12
|
+
background: "linear-gradient(135deg, #6366F1, #8B5CF6)",
|
|
13
|
+
color: "#ffffff"
|
|
14
|
+
},
|
|
15
|
+
secondary: {
|
|
16
|
+
background: "linear-gradient(135deg, #0EA5E9, #06B6D4)",
|
|
17
|
+
color: "#ffffff"
|
|
18
|
+
},
|
|
19
|
+
danger: {
|
|
20
|
+
background: "linear-gradient(135deg, #EF4444, #DC2626)",
|
|
21
|
+
color: "#ffffff"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ React.createElement(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
type: rest.type ?? "button",
|
|
28
|
+
disabled,
|
|
29
|
+
className: `vu-btn ${className}`,
|
|
30
|
+
...rest,
|
|
31
|
+
style: {
|
|
32
|
+
padding: "14px 24px",
|
|
33
|
+
border: "none",
|
|
34
|
+
borderRadius: "14px",
|
|
35
|
+
fontSize: "15px",
|
|
36
|
+
fontWeight: "700",
|
|
37
|
+
letterSpacing: "0.3px",
|
|
38
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
39
|
+
transition: "all 0.3s ease",
|
|
40
|
+
boxShadow: disabled ? "none" : "0 8px 20px rgba(0,0,0,0.15)",
|
|
41
|
+
opacity: disabled ? 0.6 : 1,
|
|
42
|
+
transform: "translateY(0px)",
|
|
43
|
+
...variants[variant]
|
|
44
|
+
},
|
|
45
|
+
onMouseEnter: (e) => {
|
|
46
|
+
if (!disabled) {
|
|
47
|
+
e.currentTarget.style.transform = "translateY(-3px)";
|
|
48
|
+
e.currentTarget.style.boxShadow = "0 14px 28px rgba(0,0,0,0.2)";
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
onMouseLeave: (e) => {
|
|
52
|
+
if (!disabled) {
|
|
53
|
+
e.currentTarget.style.transform = "translateY(0px)";
|
|
54
|
+
e.currentTarget.style.boxShadow = "0 8px 20px rgba(0,0,0,0.15)";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
children
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// src/components/Card/Card.jsx
|
|
63
|
+
import React2 from "react";
|
|
64
|
+
function Card({
|
|
65
|
+
title,
|
|
66
|
+
subtitle,
|
|
67
|
+
image,
|
|
68
|
+
children,
|
|
69
|
+
className = "",
|
|
70
|
+
...rest
|
|
71
|
+
}) {
|
|
72
|
+
return /* @__PURE__ */ React2.createElement(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: `vu-card ${className}`,
|
|
76
|
+
...rest,
|
|
77
|
+
style: {
|
|
78
|
+
width: "340px",
|
|
79
|
+
borderRadius: "24px",
|
|
80
|
+
overflow: "hidden",
|
|
81
|
+
background: "#ffffff",
|
|
82
|
+
boxShadow: "0 10px 30px rgba(0,0,0,0.12)",
|
|
83
|
+
transition: "all 0.3s ease",
|
|
84
|
+
cursor: "pointer",
|
|
85
|
+
fontFamily: "Arial, sans-serif"
|
|
86
|
+
},
|
|
87
|
+
onMouseEnter: (e) => {
|
|
88
|
+
e.currentTarget.style.transform = "translateY(-8px)";
|
|
89
|
+
e.currentTarget.style.boxShadow = "0 20px 40px rgba(0,0,0,0.18)";
|
|
90
|
+
},
|
|
91
|
+
onMouseLeave: (e) => {
|
|
92
|
+
e.currentTarget.style.transform = "translateY(0px)";
|
|
93
|
+
e.currentTarget.style.boxShadow = "0 10px 30px rgba(0,0,0,0.12)";
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
image && /* @__PURE__ */ React2.createElement(
|
|
97
|
+
"img",
|
|
98
|
+
{
|
|
99
|
+
src: image,
|
|
100
|
+
alt: title,
|
|
101
|
+
style: {
|
|
102
|
+
width: "100%",
|
|
103
|
+
height: "200px",
|
|
104
|
+
objectFit: "cover"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ React2.createElement(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
style: {
|
|
112
|
+
padding: "22px"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
title && /* @__PURE__ */ React2.createElement(
|
|
116
|
+
"h2",
|
|
117
|
+
{
|
|
118
|
+
style: {
|
|
119
|
+
margin: 0,
|
|
120
|
+
fontSize: "24px",
|
|
121
|
+
fontWeight: "700",
|
|
122
|
+
color: "#111827"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
title
|
|
126
|
+
),
|
|
127
|
+
subtitle && /* @__PURE__ */ React2.createElement(
|
|
128
|
+
"p",
|
|
129
|
+
{
|
|
130
|
+
style: {
|
|
131
|
+
marginTop: "8px",
|
|
132
|
+
fontSize: "15px",
|
|
133
|
+
color: "#6B7280",
|
|
134
|
+
lineHeight: "1.6"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
subtitle
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ React2.createElement(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
style: {
|
|
143
|
+
marginTop: "18px",
|
|
144
|
+
color: "#374151",
|
|
145
|
+
fontSize: "15px",
|
|
146
|
+
lineHeight: "1.7"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
children
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ React2.createElement(
|
|
152
|
+
"button",
|
|
153
|
+
{
|
|
154
|
+
style: {
|
|
155
|
+
marginTop: "20px",
|
|
156
|
+
padding: "12px 18px",
|
|
157
|
+
border: "none",
|
|
158
|
+
borderRadius: "12px",
|
|
159
|
+
background: "linear-gradient(135deg, #6366F1, #8B5CF6)",
|
|
160
|
+
color: "#fff",
|
|
161
|
+
fontWeight: "600",
|
|
162
|
+
fontSize: "14px",
|
|
163
|
+
cursor: "pointer",
|
|
164
|
+
transition: "0.3s"
|
|
165
|
+
},
|
|
166
|
+
onMouseEnter: (e) => {
|
|
167
|
+
e.currentTarget.style.opacity = "0.9";
|
|
168
|
+
},
|
|
169
|
+
onMouseLeave: (e) => {
|
|
170
|
+
e.currentTarget.style.opacity = "1";
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"Explore More"
|
|
174
|
+
)
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
export {
|
|
179
|
+
Button,
|
|
180
|
+
Card
|
|
181
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ui-library-raushan-ranjan",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Virtual UI React Library",
|
|
5
|
+
"author": "Raushan Ranjan",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsup",
|
|
18
|
+
"dev": "tsup --watch",
|
|
19
|
+
"clean": "rm -rf dist"
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"keywords": [
|
|
23
|
+
"react",
|
|
24
|
+
"ui-library",
|
|
25
|
+
"components",
|
|
26
|
+
"virtualui"
|
|
27
|
+
],
|
|
28
|
+
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"react": ">=18",
|
|
31
|
+
"react-dom": ">=18"
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@reduxjs/toolkit": "^2.11.2",
|
|
36
|
+
"react-redux": "^9.2.0",
|
|
37
|
+
"redux": "^5.0.1"
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"typescript": "^6.0.3",
|
|
42
|
+
"tsup": "^8.5.1",
|
|
43
|
+
"express": "^5.2.1",
|
|
44
|
+
"nodemon": "^3.1.14",
|
|
45
|
+
"@types/react": "^19.2.2",
|
|
46
|
+
"@types/react-dom": "^19.2.2"
|
|
47
|
+
}
|
|
48
|
+
}
|