virtual-ui-lib 1.0.53 → 1.0.55
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 +122 -2
- package/dist/index.mjs +173 -54
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36,13 +36,13 @@ __export(index_exports, {
|
|
|
36
36
|
FileUpload: () => FileUpload,
|
|
37
37
|
Loader: () => Loader,
|
|
38
38
|
LoadingSpinner: () => LoadingSpinner,
|
|
39
|
+
NotificationToast: () => NotificationToast,
|
|
39
40
|
OtpInput: () => OtpInput,
|
|
40
41
|
ResponsiveNavbar: () => ResponsiveNavbar,
|
|
41
42
|
SearchBar: () => SearchBar,
|
|
42
43
|
SkeletonLoader: () => SkeletonLoader,
|
|
43
44
|
SmartButton: () => SmartButton,
|
|
44
45
|
StatCard: () => StatCard,
|
|
45
|
-
Statscard: () => void 0,
|
|
46
46
|
Tabs: () => Tabs,
|
|
47
47
|
TextArea: () => TextArea,
|
|
48
48
|
ToastNotification: () => ToastNotification
|
|
@@ -698,6 +698,126 @@ var Tabs = ({
|
|
|
698
698
|
tab.label
|
|
699
699
|
))), /* @__PURE__ */ import_react16.default.createElement("div", { style: { padding: "16px", color: textColor } }, /* @__PURE__ */ import_react16.default.createElement("h4", { style: { margin: "0 0 8px", fontSize: "16px", fontWeight: "600" } }, tabs[activeTab].label), /* @__PURE__ */ import_react16.default.createElement("p", { style: { margin: "0", fontSize: "14px" } }, tabs[activeTab].content)));
|
|
700
700
|
};
|
|
701
|
+
|
|
702
|
+
// src/components/NotificationToast/NotificationToast.jsx
|
|
703
|
+
var import_react17 = __toESM(require("react"));
|
|
704
|
+
var NotificationToast = ({
|
|
705
|
+
title = "New Message",
|
|
706
|
+
message = "You have a new notification from the team.",
|
|
707
|
+
type = "success",
|
|
708
|
+
duration = 3e3,
|
|
709
|
+
accent = "#6366f1",
|
|
710
|
+
bg = "#0f172a",
|
|
711
|
+
radius = "14px",
|
|
712
|
+
showProgress = true
|
|
713
|
+
}) => {
|
|
714
|
+
const [visible, setVisible] = (0, import_react17.useState)(true);
|
|
715
|
+
const [progress, setProgress] = (0, import_react17.useState)(100);
|
|
716
|
+
const typeColors = {
|
|
717
|
+
success: "#10b981",
|
|
718
|
+
error: "#ef4444",
|
|
719
|
+
warning: "#f59e0b",
|
|
720
|
+
info: "#3b82f6"
|
|
721
|
+
};
|
|
722
|
+
const typeIcons = {
|
|
723
|
+
success: "M5 13l4 4L19 7",
|
|
724
|
+
error: "M6 18L18 6M6 6l12 12",
|
|
725
|
+
warning: "M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",
|
|
726
|
+
info: "M13 16h-1v-4h-1m1-4h.01M12 2a10 10 0 100 20A10 10 0 0012 2z"
|
|
727
|
+
};
|
|
728
|
+
const color = typeColors[type] || accent;
|
|
729
|
+
(0, import_react17.useEffect)(() => {
|
|
730
|
+
if (!showProgress) return;
|
|
731
|
+
const step = 100 / (duration / 50);
|
|
732
|
+
const timer = setInterval(() => {
|
|
733
|
+
setProgress((p) => {
|
|
734
|
+
if (p <= 0) {
|
|
735
|
+
clearInterval(timer);
|
|
736
|
+
setVisible(false);
|
|
737
|
+
return 0;
|
|
738
|
+
}
|
|
739
|
+
return p - step;
|
|
740
|
+
});
|
|
741
|
+
}, 50);
|
|
742
|
+
return () => clearInterval(timer);
|
|
743
|
+
}, [duration, showProgress]);
|
|
744
|
+
if (!visible) return null;
|
|
745
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
746
|
+
background: bg,
|
|
747
|
+
borderRadius: radius,
|
|
748
|
+
padding: "16px 18px",
|
|
749
|
+
width: "320px",
|
|
750
|
+
color: "white",
|
|
751
|
+
fontFamily: "system-ui, sans-serif",
|
|
752
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.5)",
|
|
753
|
+
border: `1px solid rgba(255,255,255,0.08)`,
|
|
754
|
+
position: "relative",
|
|
755
|
+
overflow: "hidden"
|
|
756
|
+
} }, /* @__PURE__ */ import_react17.default.createElement("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" } }, /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
757
|
+
width: 36,
|
|
758
|
+
height: 36,
|
|
759
|
+
borderRadius: "10px",
|
|
760
|
+
flexShrink: 0,
|
|
761
|
+
background: `${color}22`,
|
|
762
|
+
border: `1px solid ${color}44`,
|
|
763
|
+
display: "flex",
|
|
764
|
+
alignItems: "center",
|
|
765
|
+
justifyContent: "center"
|
|
766
|
+
} }, /* @__PURE__ */ import_react17.default.createElement(
|
|
767
|
+
"svg",
|
|
768
|
+
{
|
|
769
|
+
width: "16",
|
|
770
|
+
height: "16",
|
|
771
|
+
viewBox: "0 0 24 24",
|
|
772
|
+
fill: "none",
|
|
773
|
+
stroke: color,
|
|
774
|
+
strokeWidth: "2.5",
|
|
775
|
+
strokeLinecap: "round",
|
|
776
|
+
strokeLinejoin: "round"
|
|
777
|
+
},
|
|
778
|
+
/* @__PURE__ */ import_react17.default.createElement("path", { d: typeIcons[type] || typeIcons.info })
|
|
779
|
+
)), /* @__PURE__ */ import_react17.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react17.default.createElement("div", { style: { fontSize: "14px", fontWeight: "700", marginBottom: "3px" } }, title), /* @__PURE__ */ import_react17.default.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.5)", lineHeight: 1.5 } }, message)), /* @__PURE__ */ import_react17.default.createElement(
|
|
780
|
+
"button",
|
|
781
|
+
{
|
|
782
|
+
onClick: () => setVisible(false),
|
|
783
|
+
style: {
|
|
784
|
+
background: "transparent",
|
|
785
|
+
border: "none",
|
|
786
|
+
cursor: "pointer",
|
|
787
|
+
color: "rgba(255,255,255,0.3)",
|
|
788
|
+
padding: "2px",
|
|
789
|
+
flexShrink: 0,
|
|
790
|
+
lineHeight: 1
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
794
|
+
"svg",
|
|
795
|
+
{
|
|
796
|
+
width: "14",
|
|
797
|
+
height: "14",
|
|
798
|
+
viewBox: "0 0 24 24",
|
|
799
|
+
fill: "none",
|
|
800
|
+
stroke: "currentColor",
|
|
801
|
+
strokeWidth: "2.5",
|
|
802
|
+
strokeLinecap: "round"
|
|
803
|
+
},
|
|
804
|
+
/* @__PURE__ */ import_react17.default.createElement("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
805
|
+
)
|
|
806
|
+
)), showProgress && /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
807
|
+
position: "absolute",
|
|
808
|
+
bottom: 0,
|
|
809
|
+
left: 0,
|
|
810
|
+
right: 0,
|
|
811
|
+
height: "3px",
|
|
812
|
+
background: "rgba(255,255,255,0.07)"
|
|
813
|
+
} }, /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
814
|
+
height: "100%",
|
|
815
|
+
width: `${progress}%`,
|
|
816
|
+
background: color,
|
|
817
|
+
transition: "width 0.05s linear",
|
|
818
|
+
borderRadius: "0 2px 2px 0"
|
|
819
|
+
} })));
|
|
820
|
+
};
|
|
701
821
|
// Annotate the CommonJS export names for ESM import in node:
|
|
702
822
|
0 && (module.exports = {
|
|
703
823
|
Avatar,
|
|
@@ -707,13 +827,13 @@ var Tabs = ({
|
|
|
707
827
|
FileUpload,
|
|
708
828
|
Loader,
|
|
709
829
|
LoadingSpinner,
|
|
830
|
+
NotificationToast,
|
|
710
831
|
OtpInput,
|
|
711
832
|
ResponsiveNavbar,
|
|
712
833
|
SearchBar,
|
|
713
834
|
SkeletonLoader,
|
|
714
835
|
SmartButton,
|
|
715
836
|
StatCard,
|
|
716
|
-
Statscard,
|
|
717
837
|
Tabs,
|
|
718
838
|
TextArea,
|
|
719
839
|
ToastNotification
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/ToastNotification/ToastNotification.jsx
|
|
2
|
-
import
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
3
|
var ToastNotification = ({
|
|
4
4
|
type = "success",
|
|
5
5
|
title = "Success",
|
|
@@ -48,7 +48,7 @@ var ToastNotification = ({
|
|
|
48
48
|
}
|
|
49
49
|
return { background: bg, icon };
|
|
50
50
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ React.createElement("div", { style: {
|
|
52
52
|
position: "fixed",
|
|
53
53
|
bottom: "20px",
|
|
54
54
|
right: "20px",
|
|
@@ -62,7 +62,7 @@ var ToastNotification = ({
|
|
|
62
62
|
boxShadow: "0 4px 20px rgba(0,0,0,0.2)",
|
|
63
63
|
fontFamily: "system-ui, sans-serif",
|
|
64
64
|
zIndex: 9999
|
|
65
|
-
} }, /* @__PURE__ */
|
|
65
|
+
} }, /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", marginBottom: "8px" } }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
66
66
|
width: "24px",
|
|
67
67
|
height: "24px",
|
|
68
68
|
borderRadius: "50%",
|
|
@@ -71,20 +71,20 @@ var ToastNotification = ({
|
|
|
71
71
|
alignItems: "center",
|
|
72
72
|
justifyContent: "center",
|
|
73
73
|
marginRight: "8px"
|
|
74
|
-
} }, /* @__PURE__ */
|
|
74
|
+
} }, /* @__PURE__ */ React.createElement("span", { style: { color: getStyles().background, fontSize: "16px" } }, getStyles().icon)), /* @__PURE__ */ React.createElement("h4", { style: { margin: 0, fontSize: "16px", fontWeight: "600", color: "white" } }, title)), /* @__PURE__ */ React.createElement("p", { style: { margin: "0 0 12px", fontSize: "14px", color: "#f1f5f9" } }, message), /* @__PURE__ */ React.createElement("button", { onClick: onClose, style: {
|
|
75
75
|
background: "transparent",
|
|
76
76
|
color: "white",
|
|
77
77
|
border: "none",
|
|
78
78
|
cursor: "pointer",
|
|
79
79
|
fontSize: "14px",
|
|
80
80
|
fontWeight: "600"
|
|
81
|
-
} }, "Close"), /* @__PURE__ */
|
|
81
|
+
} }, "Close"), /* @__PURE__ */ React.createElement("div", { style: {
|
|
82
82
|
height: "4px",
|
|
83
83
|
background: "rgba(255, 255, 255, 0.3)",
|
|
84
84
|
borderRadius: "8px",
|
|
85
85
|
overflow: "hidden",
|
|
86
86
|
marginTop: "12px"
|
|
87
|
-
} }, /* @__PURE__ */
|
|
87
|
+
} }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
88
88
|
width: progress + "%",
|
|
89
89
|
height: "100%",
|
|
90
90
|
background: "white",
|
|
@@ -93,7 +93,7 @@ var ToastNotification = ({
|
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
// src/components/StatCard/StatCard.jsx
|
|
96
|
-
import
|
|
96
|
+
import React2, { useEffect as useEffect2, useState as useState2 } from "react";
|
|
97
97
|
var StatCard = ({
|
|
98
98
|
title = "Revenue",
|
|
99
99
|
metric = 1200,
|
|
@@ -116,7 +116,7 @@ var StatCard = ({
|
|
|
116
116
|
}, 30);
|
|
117
117
|
return () => clearInterval(interval);
|
|
118
118
|
}, [metric]);
|
|
119
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ React2.createElement("div", { style: { background: bg, borderRadius: radius, padding: "24px", width: "300px", color: "white", boxShadow: "0 10px 30px rgba(0,0,0,0.5)", fontFamily: "system-ui, sans-serif", textAlign: "center" } }, /* @__PURE__ */ React2.createElement("h3", { style: { margin: "0 0 10px", fontSize: "16px", fontWeight: "600" } }, title), /* @__PURE__ */ React2.createElement("div", { style: { fontSize: "40px", fontWeight: "700" } }, count), /* @__PURE__ */ React2.createElement("span", { style: {
|
|
120
120
|
display: "inline-block",
|
|
121
121
|
padding: "5px 12px",
|
|
122
122
|
borderRadius: "10px",
|
|
@@ -124,11 +124,11 @@ var StatCard = ({
|
|
|
124
124
|
color: "white",
|
|
125
125
|
fontSize: "14px",
|
|
126
126
|
margin: "10px 0"
|
|
127
|
-
} }, change >= 0 ? "+" + change + "%" : change + "%"), /* @__PURE__ */
|
|
127
|
+
} }, change >= 0 ? "+" + change + "%" : change + "%"), /* @__PURE__ */ React2.createElement("svg", { style: { marginTop: "12px" }, width: "100%", height: "30", viewBox: "0 0 100 30", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React2.createElement("polyline", { fill: "none", stroke: change >= 0 ? accent : negativeAccent, strokeWidth: "2", points: "0,15 10,10 20,20 30,15 40,22 50,8 60,18 70,15 80,18 90,10 100,15" })));
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
// src/components/OtpInput/OtpInput.jsx
|
|
131
|
-
import
|
|
131
|
+
import React3, { useEffect as useEffect3, useRef, useState as useState3 } from "react";
|
|
132
132
|
var OtpInput = ({
|
|
133
133
|
length = 6,
|
|
134
134
|
boxSize = "48px",
|
|
@@ -167,7 +167,7 @@ var OtpInput = ({
|
|
|
167
167
|
useEffect3(() => {
|
|
168
168
|
inputsRef.current[0].focus();
|
|
169
169
|
}, []);
|
|
170
|
-
return /* @__PURE__ */
|
|
170
|
+
return /* @__PURE__ */ React3.createElement("div", { style: { display: "flex", gap: "10px", justifyContent: "center", padding: "20px", background: bgColor, borderRadius: radius, border: "1px solid rgba(255,255,255,0.1)", boxShadow: "0 4px 20px rgba(0,0,0,0.6)" }, onPaste: handlePaste }, otp.map((value, index) => /* @__PURE__ */ React3.createElement(
|
|
171
171
|
"input",
|
|
172
172
|
{
|
|
173
173
|
key: index,
|
|
@@ -195,11 +195,11 @@ var OtpInput = ({
|
|
|
195
195
|
outline: "none"
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
)), otp.join("").length === length && /* @__PURE__ */
|
|
198
|
+
)), otp.join("").length === length && /* @__PURE__ */ React3.createElement("span", { style: { color: "#4ade80", fontSize: "20px" } }, "\u2705"));
|
|
199
199
|
};
|
|
200
200
|
|
|
201
201
|
// src/components/CodeBlock/CodeBlock.jsx
|
|
202
|
-
import
|
|
202
|
+
import React4, { useState as useState4 } from "react";
|
|
203
203
|
var CodeBlock = ({
|
|
204
204
|
code = "const hello = 'Hello, world!';\nconsole.log(hello);",
|
|
205
205
|
language = "JavaScript",
|
|
@@ -218,13 +218,13 @@ var CodeBlock = ({
|
|
|
218
218
|
});
|
|
219
219
|
};
|
|
220
220
|
const formatCode = () => {
|
|
221
|
-
return code.split("\n").map((line, index) => /* @__PURE__ */
|
|
221
|
+
return code.split("\n").map((line, index) => /* @__PURE__ */ React4.createElement("div", { key: index, style: { display: "flex" } }, showLineNumbers && /* @__PURE__ */ React4.createElement("span", { style: { marginRight: "10px", color: "#58a6ff" } }, index + 1), /* @__PURE__ */ React4.createElement("span", { style: { color: tokenColors.string } }, line.replace(/(\'.*?\')/g, (match) => `<span style='color:${tokenColors.string}'>${match}</span>`))));
|
|
222
222
|
};
|
|
223
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ React4.createElement("div", { style: { background: bg, borderRadius: "8px", padding: "16px", fontFamily: "monospace", position: "relative" } }, filename && /* @__PURE__ */ React4.createElement("div", { style: { color: textColor, fontWeight: "bold", marginBottom: "8px" } }, filename), /* @__PURE__ */ React4.createElement("div", { style: { overflowX: wrapWords ? "auto" : "hidden", whiteSpace: wrapWords ? "normal" : "pre" } }, formatCode()), /* @__PURE__ */ React4.createElement("button", { onClick: handleCopy, style: { position: "absolute", top: "10px", right: "10px", background: copied ? "#28a745" : "#58a6ff", color: "white", border: "none", borderRadius: "4px", padding: "8px 12px", cursor: "pointer", fontSize: "14px", marginLeft: "10px" } }, copied ? "\u2713 Copied" : "Copy"), /* @__PURE__ */ React4.createElement("button", { onClick: () => wrapWords = !wrapWords, style: { position: "absolute", top: "10px", right: "90px", background: "#58a6ff", color: "white", border: "none", borderRadius: "4px", padding: "8px 12px", cursor: "pointer", fontSize: "14px" } }, wrapWords ? "Wrap Off" : "Wrap On"));
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
// src/components/SmartButton/SmartButton.jsx
|
|
227
|
-
import
|
|
227
|
+
import React5 from "react";
|
|
228
228
|
var SmartButton = ({
|
|
229
229
|
buttonText = "Submit",
|
|
230
230
|
isLoading = false,
|
|
@@ -241,7 +241,7 @@ var SmartButton = ({
|
|
|
241
241
|
}) => {
|
|
242
242
|
const bgColor = success ? "#059669" : error ? "#ef4444" : bg;
|
|
243
243
|
const cursorStyle = isDisabled ? "not-allowed" : "pointer";
|
|
244
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ React5.createElement(
|
|
245
245
|
"button",
|
|
246
246
|
{
|
|
247
247
|
onClick: !isDisabled && !isLoading ? onClick : () => {
|
|
@@ -265,12 +265,12 @@ var SmartButton = ({
|
|
|
265
265
|
e.currentTarget.style.background = bgColor;
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
|
-
isLoading ? /* @__PURE__ */
|
|
268
|
+
isLoading ? /* @__PURE__ */ React5.createElement("span", null, "Loading...") : /* @__PURE__ */ React5.createElement(React5.Fragment, null, icon && /* @__PURE__ */ React5.createElement("span", { style: { marginRight: "8px" } }, icon), buttonText)
|
|
269
269
|
);
|
|
270
270
|
};
|
|
271
271
|
|
|
272
272
|
// src/components/CustomInputField/CustomInputField.jsx
|
|
273
|
-
import
|
|
273
|
+
import React6, { useState as useState5 } from "react";
|
|
274
274
|
var CustomInputField = ({
|
|
275
275
|
label = "Label",
|
|
276
276
|
placeholder = "Enter text...",
|
|
@@ -286,7 +286,7 @@ var CustomInputField = ({
|
|
|
286
286
|
}
|
|
287
287
|
}) => {
|
|
288
288
|
const [isFocused, setIsFocused] = useState5(false);
|
|
289
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ React6.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ React6.createElement("label", { style: { color: textColor, marginBottom: "4px", display: "block" } }, label), /* @__PURE__ */ React6.createElement(
|
|
290
290
|
"input",
|
|
291
291
|
{
|
|
292
292
|
type: "text",
|
|
@@ -305,11 +305,11 @@ var CustomInputField = ({
|
|
|
305
305
|
width: "100%"
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
), errorMessage && /* @__PURE__ */
|
|
308
|
+
), errorMessage && /* @__PURE__ */ React6.createElement("p", { style: { color: "red", margin: "4px 0 0 0" } }, errorMessage), helperText && /* @__PURE__ */ React6.createElement("p", { style: { color: textColor, margin: "4px 0 0 0" } }, helperText));
|
|
309
309
|
};
|
|
310
310
|
|
|
311
311
|
// src/components/TextArea/TextArea.jsx
|
|
312
|
-
import
|
|
312
|
+
import React7, { useState as useState6 } from "react";
|
|
313
313
|
var TextArea = ({
|
|
314
314
|
label = "Label",
|
|
315
315
|
placeholder = "Type here...",
|
|
@@ -328,7 +328,7 @@ var TextArea = ({
|
|
|
328
328
|
setCurrentValue(e.target.value);
|
|
329
329
|
onChange(e.target.value);
|
|
330
330
|
};
|
|
331
|
-
return /* @__PURE__ */
|
|
331
|
+
return /* @__PURE__ */ React7.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ React7.createElement("label", { style: { color: textColor, marginBottom: "8px", display: "block" } }, label), /* @__PURE__ */ React7.createElement(
|
|
332
332
|
"textarea",
|
|
333
333
|
{
|
|
334
334
|
value: currentValue,
|
|
@@ -347,11 +347,11 @@ var TextArea = ({
|
|
|
347
347
|
transition: "border-color 0.3s"
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
), /* @__PURE__ */
|
|
350
|
+
), /* @__PURE__ */ React7.createElement("div", { style: { color: textColor, marginTop: "8px" } }, currentValue.length, "/", maxLength));
|
|
351
351
|
};
|
|
352
352
|
|
|
353
353
|
// src/components/SearchBar/SearchBar.jsx
|
|
354
|
-
import
|
|
354
|
+
import React8, { useState as useState7 } from "react";
|
|
355
355
|
var SearchBar = ({
|
|
356
356
|
placeholder = "Search...",
|
|
357
357
|
bg = "#1e293b",
|
|
@@ -373,7 +373,7 @@ var SearchBar = ({
|
|
|
373
373
|
setQuery("");
|
|
374
374
|
onClear();
|
|
375
375
|
};
|
|
376
|
-
return /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ React8.createElement("div", { style: { position: "relative", width: "100%" } }, /* @__PURE__ */ React8.createElement(
|
|
377
377
|
"input",
|
|
378
378
|
{
|
|
379
379
|
value: query,
|
|
@@ -390,7 +390,7 @@ var SearchBar = ({
|
|
|
390
390
|
outline: "none"
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
), query && /* @__PURE__ */
|
|
393
|
+
), query && /* @__PURE__ */ React8.createElement("button", { onClick: handleClear, style: {
|
|
394
394
|
position: "absolute",
|
|
395
395
|
right: "10px",
|
|
396
396
|
top: "50%",
|
|
@@ -399,12 +399,12 @@ var SearchBar = ({
|
|
|
399
399
|
color: accent,
|
|
400
400
|
border: "none",
|
|
401
401
|
cursor: "pointer"
|
|
402
|
-
} }, "Clear"), loading && /* @__PURE__ */
|
|
402
|
+
} }, "Clear"), loading && /* @__PURE__ */ React8.createElement("div", { style: {
|
|
403
403
|
position: "absolute",
|
|
404
404
|
left: "10px",
|
|
405
405
|
top: "50%",
|
|
406
406
|
transform: "translateY(-50%)"
|
|
407
|
-
} }, "Loading..."), suggestions.length > 0 && !loading && /* @__PURE__ */
|
|
407
|
+
} }, "Loading..."), suggestions.length > 0 && !loading && /* @__PURE__ */ React8.createElement("ul", { style: {
|
|
408
408
|
listStyleType: "none",
|
|
409
409
|
margin: 0,
|
|
410
410
|
padding: "10px",
|
|
@@ -415,7 +415,7 @@ var SearchBar = ({
|
|
|
415
415
|
width: "100%",
|
|
416
416
|
maxHeight: "200px",
|
|
417
417
|
overflowY: "auto"
|
|
418
|
-
} }, suggestions.map((suggestion, index) => /* @__PURE__ */
|
|
418
|
+
} }, suggestions.map((suggestion, index) => /* @__PURE__ */ React8.createElement("li", { key: index, style: {
|
|
419
419
|
padding: "8px",
|
|
420
420
|
color: textColor,
|
|
421
421
|
cursor: "pointer",
|
|
@@ -427,13 +427,13 @@ var SearchBar = ({
|
|
|
427
427
|
};
|
|
428
428
|
|
|
429
429
|
// src/components/LoadingSpinner/LoadingSpinner.jsx
|
|
430
|
-
import
|
|
430
|
+
import React9 from "react";
|
|
431
431
|
var LoadingSpinner = ({ size = "40px", color = "#7c3aed", speed = "1s" }) => {
|
|
432
|
-
return /* @__PURE__ */
|
|
432
|
+
return /* @__PURE__ */ React9.createElement("div", { style: { border: `4px solid ${color}`, borderTop: `4px solid transparent`, borderRadius: "50%", width: size, height: size, animation: `spin ${speed} linear infinite` } });
|
|
433
433
|
};
|
|
434
434
|
|
|
435
435
|
// src/components/SkeletonLoader/SkeletonLoader.jsx
|
|
436
|
-
import
|
|
436
|
+
import React10 from "react";
|
|
437
437
|
var SkeletonLoader = ({ width = "100%", height = "20px", bg = "#1e293b", accent = "#7c3aed", radius = "12px", padding = "0" }) => {
|
|
438
438
|
const shimmerStyle = {
|
|
439
439
|
background: `linear-gradient(90deg, ${accent} 25%, ${bg} 50%, ${accent} 75%)`,
|
|
@@ -441,7 +441,7 @@ var SkeletonLoader = ({ width = "100%", height = "20px", bg = "#1e293b", accent
|
|
|
441
441
|
animation: "shimmer 1.5s infinite",
|
|
442
442
|
borderRadius: radius
|
|
443
443
|
};
|
|
444
|
-
return /* @__PURE__ */
|
|
444
|
+
return /* @__PURE__ */ React10.createElement("div", { style: { padding } }, /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height, marginBottom: "10px" } }), /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height, marginBottom: "10px" } }), /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height } }), /* @__PURE__ */ React10.createElement("style", null, `@keyframes shimmer {
|
|
445
445
|
0% {
|
|
446
446
|
background-position: 200% 0;
|
|
447
447
|
}
|
|
@@ -452,7 +452,7 @@ var SkeletonLoader = ({ width = "100%", height = "20px", bg = "#1e293b", accent
|
|
|
452
452
|
};
|
|
453
453
|
|
|
454
454
|
// src/components/ResponsiveNavbar/ResponsiveNavbar.jsx
|
|
455
|
-
import
|
|
455
|
+
import React11, { useState as useState8 } from "react";
|
|
456
456
|
var ResponsiveNavbar = ({
|
|
457
457
|
logo = "Logo",
|
|
458
458
|
navItems = [],
|
|
@@ -474,7 +474,7 @@ var ResponsiveNavbar = ({
|
|
|
474
474
|
setSearchValue(e.target.value);
|
|
475
475
|
onSearchChange(e.target.value);
|
|
476
476
|
};
|
|
477
|
-
return /* @__PURE__ */
|
|
477
|
+
return /* @__PURE__ */ React11.createElement("nav", { style: { background: bg, color: textColor, padding, borderRadius: radius, display: "flex", justifyContent: "space-between", alignItems: "center" } }, /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement("div", { style: { fontSize: "24px", fontWeight: "bold" } }, logo), /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", marginLeft: "20px" } }, navItems.map((item, index) => /* @__PURE__ */ React11.createElement("div", { key: index, onClick: () => onNavItemClick(item), style: { margin: "0 10px", cursor: "pointer", color: item.active ? accent : textColor } }, item.label)))), /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement(
|
|
478
478
|
"input",
|
|
479
479
|
{
|
|
480
480
|
type: "text",
|
|
@@ -483,11 +483,11 @@ var ResponsiveNavbar = ({
|
|
|
483
483
|
onChange: handleSearchChange,
|
|
484
484
|
style: { background: "#0f172a", color: textColor, border: "none", borderRadius: radius, padding: "8px", marginRight: "20px" }
|
|
485
485
|
}
|
|
486
|
-
), /* @__PURE__ */
|
|
486
|
+
), /* @__PURE__ */ React11.createElement("img", { src: profileAvatar, alt: "Profile", style: { borderRadius: "50%", width: "40px", height: "40px" } }), /* @__PURE__ */ React11.createElement("div", { onClick: () => setMenuActive(!menuActive), style: { cursor: "pointer", marginLeft: "20px" } }, "\u2630")), menuActive && /* @__PURE__ */ React11.createElement("div", { style: { position: "absolute", top: "60px", right: "20px", background: bg, borderRadius: radius, boxShadow: "0 4px 8px rgba(0,0,0,0.3)", zIndex: 1 } }, navItems.map((item, index) => /* @__PURE__ */ React11.createElement("div", { key: index, onClick: () => onNavItemClick(item), style: { padding: "10px", color: item.active ? accent : textColor } }, item.label))));
|
|
487
487
|
};
|
|
488
488
|
|
|
489
489
|
// src/components/FileUpload/FileUpload.jsx
|
|
490
|
-
import
|
|
490
|
+
import React12, { useState as useState9 } from "react";
|
|
491
491
|
var FileUpload = ({ bg = "#1e293b", textColor = "#f1f5f9", accent = "#7c3aed", radius = "12px", padding = "20px", placeholder = "Drag and drop files here or click to upload", onChange = () => {
|
|
492
492
|
} }) => {
|
|
493
493
|
const [file, setFile] = useState9(null);
|
|
@@ -525,7 +525,7 @@ var FileUpload = ({ bg = "#1e293b", textColor = "#f1f5f9", accent = "#7c3aed", r
|
|
|
525
525
|
setFile(null);
|
|
526
526
|
setProgress(0);
|
|
527
527
|
};
|
|
528
|
-
return /* @__PURE__ */
|
|
528
|
+
return /* @__PURE__ */ React12.createElement(
|
|
529
529
|
"div",
|
|
530
530
|
{
|
|
531
531
|
onDrop: handleDrop,
|
|
@@ -541,7 +541,7 @@ var FileUpload = ({ bg = "#1e293b", textColor = "#f1f5f9", accent = "#7c3aed", r
|
|
|
541
541
|
cursor: "pointer"
|
|
542
542
|
}
|
|
543
543
|
},
|
|
544
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ React12.createElement(
|
|
545
545
|
"input",
|
|
546
546
|
{
|
|
547
547
|
id: "fileInput",
|
|
@@ -550,7 +550,7 @@ var FileUpload = ({ bg = "#1e293b", textColor = "#f1f5f9", accent = "#7c3aed", r
|
|
|
550
550
|
onChange: handleFileChange
|
|
551
551
|
}
|
|
552
552
|
),
|
|
553
|
-
file ? /* @__PURE__ */
|
|
553
|
+
file ? /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("p", null, file.name), /* @__PURE__ */ React12.createElement(
|
|
554
554
|
"button",
|
|
555
555
|
{
|
|
556
556
|
onClick: handleRemove,
|
|
@@ -564,18 +564,18 @@ var FileUpload = ({ bg = "#1e293b", textColor = "#f1f5f9", accent = "#7c3aed", r
|
|
|
564
564
|
}
|
|
565
565
|
},
|
|
566
566
|
"Remove"
|
|
567
|
-
), /* @__PURE__ */
|
|
567
|
+
), /* @__PURE__ */ React12.createElement("div", { style: { background: "#e2e8f0", borderRadius: radius, overflow: "hidden", marginTop: "10px" } }, /* @__PURE__ */ React12.createElement("div", { style: { width: `${progress}%`, background: accent, height: "8px" } }))) : /* @__PURE__ */ React12.createElement("p", null, placeholder)
|
|
568
568
|
);
|
|
569
569
|
};
|
|
570
570
|
|
|
571
571
|
// src/components/Loader/Loader.jsx
|
|
572
|
-
import
|
|
572
|
+
import React13 from "react";
|
|
573
573
|
var Loader = ({ bg = "#0f172a", accent = "#7c3aed", size = "40px", borderRadius = "8px" }) => {
|
|
574
|
-
return /* @__PURE__ */
|
|
574
|
+
return /* @__PURE__ */ React13.createElement("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", background: bg, height: size, width: size, borderRadius } }, /* @__PURE__ */ React13.createElement("div", { style: { border: `4px solid ${bg}`, borderTop: `4px solid ${accent}`, borderRadius: "50%", width: "100%", height: "100%", animation: "spin 1s linear infinite" } }));
|
|
575
575
|
};
|
|
576
576
|
|
|
577
577
|
// src/components/Avatar/Avatar.jsx
|
|
578
|
-
import
|
|
578
|
+
import React14 from "react";
|
|
579
579
|
var Avatar = ({
|
|
580
580
|
image = "https://i.pravatar.cc/150?img=32",
|
|
581
581
|
alt = "User Avatar",
|
|
@@ -584,7 +584,7 @@ var Avatar = ({
|
|
|
584
584
|
borderWidth = "4px",
|
|
585
585
|
radius = "50%"
|
|
586
586
|
}) => {
|
|
587
|
-
return /* @__PURE__ */
|
|
587
|
+
return /* @__PURE__ */ React14.createElement("div", { style: {
|
|
588
588
|
width: size,
|
|
589
589
|
height: size,
|
|
590
590
|
borderRadius: radius,
|
|
@@ -594,7 +594,7 @@ var Avatar = ({
|
|
|
594
594
|
alignItems: "center",
|
|
595
595
|
justifyContent: "center",
|
|
596
596
|
background: "#f3f4f6"
|
|
597
|
-
} }, /* @__PURE__ */
|
|
597
|
+
} }, /* @__PURE__ */ React14.createElement("img", { src: image, alt, style: {
|
|
598
598
|
width: "100%",
|
|
599
599
|
height: "100%",
|
|
600
600
|
objectFit: "cover"
|
|
@@ -602,7 +602,7 @@ var Avatar = ({
|
|
|
602
602
|
};
|
|
603
603
|
|
|
604
604
|
// src/components/DividerLine/DividerLine.jsx
|
|
605
|
-
import
|
|
605
|
+
import React15 from "react";
|
|
606
606
|
var DividerLine = ({
|
|
607
607
|
text = "Section",
|
|
608
608
|
textColor = "#f1f5f9",
|
|
@@ -611,11 +611,11 @@ var DividerLine = ({
|
|
|
611
611
|
thickness = "2px",
|
|
612
612
|
borderRadius = "4px"
|
|
613
613
|
}) => {
|
|
614
|
-
return /* @__PURE__ */
|
|
614
|
+
return /* @__PURE__ */ React15.createElement("div", { style: { display: "flex", alignItems: "center", margin: spacing } }, /* @__PURE__ */ React15.createElement("div", { style: { flex: 1, height: thickness, background: lineColor, borderRadius } }), /* @__PURE__ */ React15.createElement("span", { style: { margin: "0 12px", color: textColor, fontSize: "14px", fontWeight: "600" } }, text), /* @__PURE__ */ React15.createElement("div", { style: { flex: 1, height: thickness, background: lineColor, borderRadius } }));
|
|
615
615
|
};
|
|
616
616
|
|
|
617
617
|
// src/components/Tabs/Tabs.jsx
|
|
618
|
-
import
|
|
618
|
+
import React16, { useState as useState10 } from "react";
|
|
619
619
|
var Tabs = ({
|
|
620
620
|
tabs = [
|
|
621
621
|
{ label: "Tab 1", content: "Content for Tab 1" },
|
|
@@ -628,7 +628,7 @@ var Tabs = ({
|
|
|
628
628
|
radius = "8px"
|
|
629
629
|
}) => {
|
|
630
630
|
const [activeTab, setActiveTab] = useState10(0);
|
|
631
|
-
return /* @__PURE__ */
|
|
631
|
+
return /* @__PURE__ */ React16.createElement("div", { style: { background: bg, borderRadius: radius, padding: "16px", boxShadow: "0 4px 20px rgba(0,0,0,0.5)", fontFamily: "system-ui, sans-serif" } }, /* @__PURE__ */ React16.createElement("div", { style: { display: "flex", borderBottom: `2px solid ${accent}` } }, tabs.map((tab, index) => /* @__PURE__ */ React16.createElement(
|
|
632
632
|
"button",
|
|
633
633
|
{
|
|
634
634
|
key: index,
|
|
@@ -645,9 +645,128 @@ var Tabs = ({
|
|
|
645
645
|
}
|
|
646
646
|
},
|
|
647
647
|
tab.label
|
|
648
|
-
))), /* @__PURE__ */
|
|
648
|
+
))), /* @__PURE__ */ React16.createElement("div", { style: { padding: "16px", color: textColor } }, /* @__PURE__ */ React16.createElement("h4", { style: { margin: "0 0 8px", fontSize: "16px", fontWeight: "600" } }, tabs[activeTab].label), /* @__PURE__ */ React16.createElement("p", { style: { margin: "0", fontSize: "14px" } }, tabs[activeTab].content)));
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
// src/components/NotificationToast/NotificationToast.jsx
|
|
652
|
+
import React17, { useState as useState11, useEffect as useEffect4 } from "react";
|
|
653
|
+
var NotificationToast = ({
|
|
654
|
+
title = "New Message",
|
|
655
|
+
message = "You have a new notification from the team.",
|
|
656
|
+
type = "success",
|
|
657
|
+
duration = 3e3,
|
|
658
|
+
accent = "#6366f1",
|
|
659
|
+
bg = "#0f172a",
|
|
660
|
+
radius = "14px",
|
|
661
|
+
showProgress = true
|
|
662
|
+
}) => {
|
|
663
|
+
const [visible, setVisible] = useState11(true);
|
|
664
|
+
const [progress, setProgress] = useState11(100);
|
|
665
|
+
const typeColors = {
|
|
666
|
+
success: "#10b981",
|
|
667
|
+
error: "#ef4444",
|
|
668
|
+
warning: "#f59e0b",
|
|
669
|
+
info: "#3b82f6"
|
|
670
|
+
};
|
|
671
|
+
const typeIcons = {
|
|
672
|
+
success: "M5 13l4 4L19 7",
|
|
673
|
+
error: "M6 18L18 6M6 6l12 12",
|
|
674
|
+
warning: "M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",
|
|
675
|
+
info: "M13 16h-1v-4h-1m1-4h.01M12 2a10 10 0 100 20A10 10 0 0012 2z"
|
|
676
|
+
};
|
|
677
|
+
const color = typeColors[type] || accent;
|
|
678
|
+
useEffect4(() => {
|
|
679
|
+
if (!showProgress) return;
|
|
680
|
+
const step = 100 / (duration / 50);
|
|
681
|
+
const timer = setInterval(() => {
|
|
682
|
+
setProgress((p) => {
|
|
683
|
+
if (p <= 0) {
|
|
684
|
+
clearInterval(timer);
|
|
685
|
+
setVisible(false);
|
|
686
|
+
return 0;
|
|
687
|
+
}
|
|
688
|
+
return p - step;
|
|
689
|
+
});
|
|
690
|
+
}, 50);
|
|
691
|
+
return () => clearInterval(timer);
|
|
692
|
+
}, [duration, showProgress]);
|
|
693
|
+
if (!visible) return null;
|
|
694
|
+
return /* @__PURE__ */ React17.createElement("div", { style: {
|
|
695
|
+
background: bg,
|
|
696
|
+
borderRadius: radius,
|
|
697
|
+
padding: "16px 18px",
|
|
698
|
+
width: "320px",
|
|
699
|
+
color: "white",
|
|
700
|
+
fontFamily: "system-ui, sans-serif",
|
|
701
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.5)",
|
|
702
|
+
border: `1px solid rgba(255,255,255,0.08)`,
|
|
703
|
+
position: "relative",
|
|
704
|
+
overflow: "hidden"
|
|
705
|
+
} }, /* @__PURE__ */ React17.createElement("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" } }, /* @__PURE__ */ React17.createElement("div", { style: {
|
|
706
|
+
width: 36,
|
|
707
|
+
height: 36,
|
|
708
|
+
borderRadius: "10px",
|
|
709
|
+
flexShrink: 0,
|
|
710
|
+
background: `${color}22`,
|
|
711
|
+
border: `1px solid ${color}44`,
|
|
712
|
+
display: "flex",
|
|
713
|
+
alignItems: "center",
|
|
714
|
+
justifyContent: "center"
|
|
715
|
+
} }, /* @__PURE__ */ React17.createElement(
|
|
716
|
+
"svg",
|
|
717
|
+
{
|
|
718
|
+
width: "16",
|
|
719
|
+
height: "16",
|
|
720
|
+
viewBox: "0 0 24 24",
|
|
721
|
+
fill: "none",
|
|
722
|
+
stroke: color,
|
|
723
|
+
strokeWidth: "2.5",
|
|
724
|
+
strokeLinecap: "round",
|
|
725
|
+
strokeLinejoin: "round"
|
|
726
|
+
},
|
|
727
|
+
/* @__PURE__ */ React17.createElement("path", { d: typeIcons[type] || typeIcons.info })
|
|
728
|
+
)), /* @__PURE__ */ React17.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React17.createElement("div", { style: { fontSize: "14px", fontWeight: "700", marginBottom: "3px" } }, title), /* @__PURE__ */ React17.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.5)", lineHeight: 1.5 } }, message)), /* @__PURE__ */ React17.createElement(
|
|
729
|
+
"button",
|
|
730
|
+
{
|
|
731
|
+
onClick: () => setVisible(false),
|
|
732
|
+
style: {
|
|
733
|
+
background: "transparent",
|
|
734
|
+
border: "none",
|
|
735
|
+
cursor: "pointer",
|
|
736
|
+
color: "rgba(255,255,255,0.3)",
|
|
737
|
+
padding: "2px",
|
|
738
|
+
flexShrink: 0,
|
|
739
|
+
lineHeight: 1
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
/* @__PURE__ */ React17.createElement(
|
|
743
|
+
"svg",
|
|
744
|
+
{
|
|
745
|
+
width: "14",
|
|
746
|
+
height: "14",
|
|
747
|
+
viewBox: "0 0 24 24",
|
|
748
|
+
fill: "none",
|
|
749
|
+
stroke: "currentColor",
|
|
750
|
+
strokeWidth: "2.5",
|
|
751
|
+
strokeLinecap: "round"
|
|
752
|
+
},
|
|
753
|
+
/* @__PURE__ */ React17.createElement("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
754
|
+
)
|
|
755
|
+
)), showProgress && /* @__PURE__ */ React17.createElement("div", { style: {
|
|
756
|
+
position: "absolute",
|
|
757
|
+
bottom: 0,
|
|
758
|
+
left: 0,
|
|
759
|
+
right: 0,
|
|
760
|
+
height: "3px",
|
|
761
|
+
background: "rgba(255,255,255,0.07)"
|
|
762
|
+
} }, /* @__PURE__ */ React17.createElement("div", { style: {
|
|
763
|
+
height: "100%",
|
|
764
|
+
width: `${progress}%`,
|
|
765
|
+
background: color,
|
|
766
|
+
transition: "width 0.05s linear",
|
|
767
|
+
borderRadius: "0 2px 2px 0"
|
|
768
|
+
} })));
|
|
649
769
|
};
|
|
650
|
-
var export_Statscard = void 0;
|
|
651
770
|
export {
|
|
652
771
|
Avatar,
|
|
653
772
|
CodeBlock,
|
|
@@ -656,13 +775,13 @@ export {
|
|
|
656
775
|
FileUpload,
|
|
657
776
|
Loader,
|
|
658
777
|
LoadingSpinner,
|
|
778
|
+
NotificationToast,
|
|
659
779
|
OtpInput,
|
|
660
780
|
ResponsiveNavbar,
|
|
661
781
|
SearchBar,
|
|
662
782
|
SkeletonLoader,
|
|
663
783
|
SmartButton,
|
|
664
784
|
StatCard,
|
|
665
|
-
export_Statscard as Statscard,
|
|
666
785
|
Tabs,
|
|
667
786
|
TextArea,
|
|
668
787
|
ToastNotification
|