virtual-ui-lib 1.0.9 → 1.0.11
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 +68 -20
- package/dist/index.mjs +67 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var index_exports = {};
|
|
31
31
|
__export(index_exports, {
|
|
32
32
|
Alert: () => Alert,
|
|
33
|
+
AnimatedButton: () => AnimatedButton,
|
|
33
34
|
Avatar: () => Avatar,
|
|
34
35
|
Badge: () => Badge,
|
|
35
36
|
Button: () => Button,
|
|
@@ -171,27 +172,22 @@ var Input = ({
|
|
|
171
172
|
// src/components/Badge/Badge.jsx
|
|
172
173
|
var import_react4 = __toESM(require("react"));
|
|
173
174
|
var Badge = ({
|
|
174
|
-
text = "
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
radius = "12px"
|
|
178
|
-
padding = "4px 10px",
|
|
179
|
-
size = "12px"
|
|
175
|
+
text = "NEW",
|
|
176
|
+
color = "#ffffff",
|
|
177
|
+
bgColor = "#2563eb",
|
|
178
|
+
radius = "12px"
|
|
180
179
|
}) => {
|
|
181
|
-
return /* @__PURE__ */ import_react4.default.createElement(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
text
|
|
194
|
-
);
|
|
180
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
181
|
+
background: bgColor,
|
|
182
|
+
color,
|
|
183
|
+
borderRadius: radius,
|
|
184
|
+
padding: "8px 12px",
|
|
185
|
+
fontSize: "14px",
|
|
186
|
+
fontWeight: "600",
|
|
187
|
+
display: "inline-block",
|
|
188
|
+
boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
|
|
189
|
+
fontFamily: "system-ui, sans-serif"
|
|
190
|
+
} }, text);
|
|
195
191
|
};
|
|
196
192
|
|
|
197
193
|
// src/components/Alert/Alert.jsx
|
|
@@ -335,9 +331,61 @@ var ProgressBar = ({
|
|
|
335
331
|
position: "relative"
|
|
336
332
|
} }, /* @__PURE__ */ import_react9.default.createElement("span", { style: { color: textColor, fontWeight: "600", fontSize: "14px" } }, label, ": ", progress, "%")));
|
|
337
333
|
};
|
|
334
|
+
|
|
335
|
+
// src/components/AnimatedButton/AnimatedButton.jsx
|
|
336
|
+
var import_react10 = __toESM(require("react"));
|
|
337
|
+
var AnimatedButton = ({
|
|
338
|
+
text = "Click Me",
|
|
339
|
+
gradient = "linear-gradient(45deg, #2563eb, #7c3aed)",
|
|
340
|
+
color = "white",
|
|
341
|
+
size = "md",
|
|
342
|
+
width = "auto",
|
|
343
|
+
radius = "12px",
|
|
344
|
+
shadow = "0 4px 14px rgba(0, 0, 0, 0.2)",
|
|
345
|
+
loading = false,
|
|
346
|
+
onClick
|
|
347
|
+
}) => {
|
|
348
|
+
const sizes = { sm: "8px 16px", md: "12px 24px", lg: "16px 32px" };
|
|
349
|
+
const handleMouseEnter = (e) => {
|
|
350
|
+
e.target.style.transform = "scale(1.05)";
|
|
351
|
+
};
|
|
352
|
+
const handleMouseLeave = (e) => {
|
|
353
|
+
e.target.style.transform = "scale(1)";
|
|
354
|
+
};
|
|
355
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
356
|
+
"button",
|
|
357
|
+
{
|
|
358
|
+
onClick,
|
|
359
|
+
onMouseEnter: handleMouseEnter,
|
|
360
|
+
onMouseLeave: handleMouseLeave,
|
|
361
|
+
disabled: loading,
|
|
362
|
+
style: {
|
|
363
|
+
background: gradient,
|
|
364
|
+
color,
|
|
365
|
+
padding: sizes[size],
|
|
366
|
+
width,
|
|
367
|
+
border: "none",
|
|
368
|
+
borderRadius: radius,
|
|
369
|
+
boxShadow: shadow,
|
|
370
|
+
cursor: loading ? "not-allowed" : "pointer",
|
|
371
|
+
fontWeight: "600",
|
|
372
|
+
fontSize: "15px",
|
|
373
|
+
transition: "transform 0.3s, box-shadow 0.3s",
|
|
374
|
+
fontFamily: "system-ui, sans-serif",
|
|
375
|
+
opacity: loading ? 0.6 : 1,
|
|
376
|
+
display: "flex",
|
|
377
|
+
alignItems: "center",
|
|
378
|
+
justifyContent: "center",
|
|
379
|
+
gap: "8px"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
loading ? "Loading..." : text
|
|
383
|
+
);
|
|
384
|
+
};
|
|
338
385
|
// Annotate the CommonJS export names for ESM import in node:
|
|
339
386
|
0 && (module.exports = {
|
|
340
387
|
Alert,
|
|
388
|
+
AnimatedButton,
|
|
341
389
|
Avatar,
|
|
342
390
|
Badge,
|
|
343
391
|
Button,
|
package/dist/index.mjs
CHANGED
|
@@ -128,27 +128,22 @@ var Input = ({
|
|
|
128
128
|
// src/components/Badge/Badge.jsx
|
|
129
129
|
import React4 from "react";
|
|
130
130
|
var Badge = ({
|
|
131
|
-
text = "
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
radius = "12px"
|
|
135
|
-
padding = "4px 10px",
|
|
136
|
-
size = "12px"
|
|
131
|
+
text = "NEW",
|
|
132
|
+
color = "#ffffff",
|
|
133
|
+
bgColor = "#2563eb",
|
|
134
|
+
radius = "12px"
|
|
137
135
|
}) => {
|
|
138
|
-
return /* @__PURE__ */ React4.createElement(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
text
|
|
151
|
-
);
|
|
136
|
+
return /* @__PURE__ */ React4.createElement("div", { style: {
|
|
137
|
+
background: bgColor,
|
|
138
|
+
color,
|
|
139
|
+
borderRadius: radius,
|
|
140
|
+
padding: "8px 12px",
|
|
141
|
+
fontSize: "14px",
|
|
142
|
+
fontWeight: "600",
|
|
143
|
+
display: "inline-block",
|
|
144
|
+
boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
|
|
145
|
+
fontFamily: "system-ui, sans-serif"
|
|
146
|
+
} }, text);
|
|
152
147
|
};
|
|
153
148
|
|
|
154
149
|
// src/components/Alert/Alert.jsx
|
|
@@ -292,8 +287,60 @@ var ProgressBar = ({
|
|
|
292
287
|
position: "relative"
|
|
293
288
|
} }, /* @__PURE__ */ React9.createElement("span", { style: { color: textColor, fontWeight: "600", fontSize: "14px" } }, label, ": ", progress, "%")));
|
|
294
289
|
};
|
|
290
|
+
|
|
291
|
+
// src/components/AnimatedButton/AnimatedButton.jsx
|
|
292
|
+
import React10 from "react";
|
|
293
|
+
var AnimatedButton = ({
|
|
294
|
+
text = "Click Me",
|
|
295
|
+
gradient = "linear-gradient(45deg, #2563eb, #7c3aed)",
|
|
296
|
+
color = "white",
|
|
297
|
+
size = "md",
|
|
298
|
+
width = "auto",
|
|
299
|
+
radius = "12px",
|
|
300
|
+
shadow = "0 4px 14px rgba(0, 0, 0, 0.2)",
|
|
301
|
+
loading = false,
|
|
302
|
+
onClick
|
|
303
|
+
}) => {
|
|
304
|
+
const sizes = { sm: "8px 16px", md: "12px 24px", lg: "16px 32px" };
|
|
305
|
+
const handleMouseEnter = (e) => {
|
|
306
|
+
e.target.style.transform = "scale(1.05)";
|
|
307
|
+
};
|
|
308
|
+
const handleMouseLeave = (e) => {
|
|
309
|
+
e.target.style.transform = "scale(1)";
|
|
310
|
+
};
|
|
311
|
+
return /* @__PURE__ */ React10.createElement(
|
|
312
|
+
"button",
|
|
313
|
+
{
|
|
314
|
+
onClick,
|
|
315
|
+
onMouseEnter: handleMouseEnter,
|
|
316
|
+
onMouseLeave: handleMouseLeave,
|
|
317
|
+
disabled: loading,
|
|
318
|
+
style: {
|
|
319
|
+
background: gradient,
|
|
320
|
+
color,
|
|
321
|
+
padding: sizes[size],
|
|
322
|
+
width,
|
|
323
|
+
border: "none",
|
|
324
|
+
borderRadius: radius,
|
|
325
|
+
boxShadow: shadow,
|
|
326
|
+
cursor: loading ? "not-allowed" : "pointer",
|
|
327
|
+
fontWeight: "600",
|
|
328
|
+
fontSize: "15px",
|
|
329
|
+
transition: "transform 0.3s, box-shadow 0.3s",
|
|
330
|
+
fontFamily: "system-ui, sans-serif",
|
|
331
|
+
opacity: loading ? 0.6 : 1,
|
|
332
|
+
display: "flex",
|
|
333
|
+
alignItems: "center",
|
|
334
|
+
justifyContent: "center",
|
|
335
|
+
gap: "8px"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
loading ? "Loading..." : text
|
|
339
|
+
);
|
|
340
|
+
};
|
|
295
341
|
export {
|
|
296
342
|
Alert,
|
|
343
|
+
AnimatedButton,
|
|
297
344
|
Avatar,
|
|
298
345
|
Badge,
|
|
299
346
|
Button,
|