virtuo-ui-library 1.0.10 → 1.0.12
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 +247 -0
- package/dist/index.mjs +245 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,8 +32,10 @@ __export(index_exports, {
|
|
|
32
32
|
Button: () => Button,
|
|
33
33
|
Card: () => Card,
|
|
34
34
|
EcommerceCard: () => EcommerceCard,
|
|
35
|
+
LoginForm: () => LoginForm,
|
|
35
36
|
NavBar: () => NavBar,
|
|
36
37
|
ProfileCard: () => ProfileCard,
|
|
38
|
+
SearchBar: () => SearchBar,
|
|
37
39
|
SideBar: () => SideBar
|
|
38
40
|
});
|
|
39
41
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -489,12 +491,257 @@ var SideBar = ({
|
|
|
489
491
|
background: "rgba(255,255,255,0.1)"
|
|
490
492
|
} }), /* @__PURE__ */ import_react6.default.createElement("div", null, /* @__PURE__ */ import_react6.default.createElement("div", { style: { color: "#fff", fontSize: "13px", fontWeight: "600" } }, "John Doe"), /* @__PURE__ */ import_react6.default.createElement("div", { style: { color: "rgba(255,255,255,0.4)", fontSize: "11px" } }, "Admin")))));
|
|
491
493
|
};
|
|
494
|
+
|
|
495
|
+
// src/components/LoginForm/LoginForm.jsx
|
|
496
|
+
var import_react7 = __toESM(require("react"));
|
|
497
|
+
var LoginForm = ({
|
|
498
|
+
title = "Welcome back",
|
|
499
|
+
subtitle = "Sign in to your account",
|
|
500
|
+
emailLabel = "Email address",
|
|
501
|
+
passwordLabel = "Password",
|
|
502
|
+
rememberLabel = "Remember me",
|
|
503
|
+
forgotLabel = "Forgot password?",
|
|
504
|
+
submitText = "Sign in",
|
|
505
|
+
noAccountText = "Don't have an account?",
|
|
506
|
+
signupText = "Sign up",
|
|
507
|
+
accent = "#6366f1",
|
|
508
|
+
bg = "#1e293b",
|
|
509
|
+
onSubmit = (email, password) => console.log(email, password),
|
|
510
|
+
onForgotClick = () => {
|
|
511
|
+
},
|
|
512
|
+
onSignupClick = () => {
|
|
513
|
+
}
|
|
514
|
+
}) => {
|
|
515
|
+
const [email, setEmail] = (0, import_react7.useState)("");
|
|
516
|
+
const [password, setPassword] = (0, import_react7.useState)("");
|
|
517
|
+
const [remember, setRemember] = (0, import_react7.useState)(false);
|
|
518
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react7.useState)(false);
|
|
519
|
+
const alpha = (hex, op) => {
|
|
520
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
521
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
522
|
+
};
|
|
523
|
+
const handleSubmit = (e) => {
|
|
524
|
+
e.preventDefault();
|
|
525
|
+
setIsSubmitting(true);
|
|
526
|
+
setTimeout(() => {
|
|
527
|
+
onSubmit(email, password);
|
|
528
|
+
setIsSubmitting(false);
|
|
529
|
+
}, 1e3);
|
|
530
|
+
};
|
|
531
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
532
|
+
background: bg,
|
|
533
|
+
borderRadius: "16px",
|
|
534
|
+
padding: "32px",
|
|
535
|
+
width: "360px",
|
|
536
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
537
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)",
|
|
538
|
+
fontFamily: "system-ui,sans-serif"
|
|
539
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: { marginBottom: "28px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { fontSize: "22px", fontWeight: "700", color: "#fff", margin: "0 0 6px" } }, title), /* @__PURE__ */ import_react7.default.createElement("p", { style: { fontSize: "14px", color: "rgba(255,255,255,0.5)", margin: 0 } }, subtitle)), /* @__PURE__ */ import_react7.default.createElement("form", { onSubmit: handleSubmit }, /* @__PURE__ */ import_react7.default.createElement("div", { style: { marginBottom: "18px" } }, /* @__PURE__ */ import_react7.default.createElement("label", { style: { display: "block", fontSize: "13px", fontWeight: "600", color: "rgba(255,255,255,0.7)", marginBottom: "8px" } }, emailLabel), /* @__PURE__ */ import_react7.default.createElement(
|
|
540
|
+
"input",
|
|
541
|
+
{
|
|
542
|
+
type: "email",
|
|
543
|
+
value: email,
|
|
544
|
+
onChange: (e) => setEmail(e.target.value),
|
|
545
|
+
required: true,
|
|
546
|
+
style: {
|
|
547
|
+
width: "100%",
|
|
548
|
+
padding: "12px 14px",
|
|
549
|
+
borderRadius: "10px",
|
|
550
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
551
|
+
background: "rgba(255,255,255,0.05)",
|
|
552
|
+
color: "#fff",
|
|
553
|
+
fontSize: "14px",
|
|
554
|
+
outline: "none",
|
|
555
|
+
transition: "border-color 0.2s",
|
|
556
|
+
boxSizing: "border-box"
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
)), /* @__PURE__ */ import_react7.default.createElement("div", { style: { marginBottom: "18px" } }, /* @__PURE__ */ import_react7.default.createElement("label", { style: { display: "block", fontSize: "13px", fontWeight: "600", color: "rgba(255,255,255,0.7)", marginBottom: "8px" } }, passwordLabel), /* @__PURE__ */ import_react7.default.createElement(
|
|
560
|
+
"input",
|
|
561
|
+
{
|
|
562
|
+
type: "password",
|
|
563
|
+
value: password,
|
|
564
|
+
onChange: (e) => setPassword(e.target.value),
|
|
565
|
+
required: true,
|
|
566
|
+
style: {
|
|
567
|
+
width: "100%",
|
|
568
|
+
padding: "12px 14px",
|
|
569
|
+
borderRadius: "10px",
|
|
570
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
571
|
+
background: "rgba(255,255,255,0.05)",
|
|
572
|
+
color: "#fff",
|
|
573
|
+
fontSize: "14px",
|
|
574
|
+
outline: "none",
|
|
575
|
+
transition: "border-color 0.2s",
|
|
576
|
+
boxSizing: "border-box"
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
)), /* @__PURE__ */ import_react7.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("label", { style: { display: "flex", alignItems: "center", gap: "8px", fontSize: "13px", color: "rgba(255,255,255,0.7)", cursor: "pointer" } }, /* @__PURE__ */ import_react7.default.createElement(
|
|
580
|
+
"input",
|
|
581
|
+
{
|
|
582
|
+
type: "checkbox",
|
|
583
|
+
checked: remember,
|
|
584
|
+
onChange: (e) => setRemember(e.target.checked),
|
|
585
|
+
style: {
|
|
586
|
+
width: "16px",
|
|
587
|
+
height: "16px",
|
|
588
|
+
borderRadius: "4px",
|
|
589
|
+
border: "1px solid " + alpha(accent, 0.5),
|
|
590
|
+
background: remember ? accent : "transparent",
|
|
591
|
+
cursor: "pointer"
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
), rememberLabel), /* @__PURE__ */ import_react7.default.createElement(
|
|
595
|
+
"button",
|
|
596
|
+
{
|
|
597
|
+
type: "button",
|
|
598
|
+
onClick: onForgotClick,
|
|
599
|
+
style: {
|
|
600
|
+
background: "none",
|
|
601
|
+
border: "none",
|
|
602
|
+
color: accent,
|
|
603
|
+
fontSize: "13px",
|
|
604
|
+
fontWeight: "600",
|
|
605
|
+
cursor: "pointer",
|
|
606
|
+
padding: 0
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
forgotLabel
|
|
610
|
+
)), /* @__PURE__ */ import_react7.default.createElement(
|
|
611
|
+
"button",
|
|
612
|
+
{
|
|
613
|
+
type: "submit",
|
|
614
|
+
disabled: isSubmitting,
|
|
615
|
+
style: {
|
|
616
|
+
width: "100%",
|
|
617
|
+
padding: "14px",
|
|
618
|
+
borderRadius: "10px",
|
|
619
|
+
border: "none",
|
|
620
|
+
background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.7) + ")",
|
|
621
|
+
color: "#fff",
|
|
622
|
+
fontSize: "14px",
|
|
623
|
+
fontWeight: "700",
|
|
624
|
+
cursor: "pointer",
|
|
625
|
+
opacity: isSubmitting ? 0.8 : 1,
|
|
626
|
+
transition: "opacity 0.2s",
|
|
627
|
+
marginBottom: "20px"
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
isSubmitting ? "Signing in..." : submitText
|
|
631
|
+
), /* @__PURE__ */ import_react7.default.createElement("div", { style: { textAlign: "center", fontSize: "13px", color: "rgba(255,255,255,0.5)" } }, noAccountText, /* @__PURE__ */ import_react7.default.createElement(
|
|
632
|
+
"button",
|
|
633
|
+
{
|
|
634
|
+
type: "button",
|
|
635
|
+
onClick: onSignupClick,
|
|
636
|
+
style: {
|
|
637
|
+
background: "none",
|
|
638
|
+
border: "none",
|
|
639
|
+
color: accent,
|
|
640
|
+
fontWeight: "600",
|
|
641
|
+
cursor: "pointer",
|
|
642
|
+
padding: 0,
|
|
643
|
+
fontSize: "inherit"
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
signupText
|
|
647
|
+
))));
|
|
648
|
+
};
|
|
649
|
+
|
|
650
|
+
// src/components/SearchBar/SearchBar.jsx
|
|
651
|
+
var import_react8 = __toESM(require("react"));
|
|
652
|
+
var SearchBar = ({
|
|
653
|
+
placeholder = "Search...",
|
|
654
|
+
accent = "#6366f1",
|
|
655
|
+
bg = "#0f172a",
|
|
656
|
+
width = "400px",
|
|
657
|
+
onSearch = (query) => {
|
|
658
|
+
},
|
|
659
|
+
debounceTime = 300
|
|
660
|
+
}) => {
|
|
661
|
+
const [query, setQuery] = (0, import_react8.useState)("");
|
|
662
|
+
const [isFocused, setIsFocused] = (0, import_react8.useState)(false);
|
|
663
|
+
const alpha = (hex, op) => {
|
|
664
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
665
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
666
|
+
};
|
|
667
|
+
const handleChange = (e) => {
|
|
668
|
+
setQuery(e.target.value);
|
|
669
|
+
};
|
|
670
|
+
const handleKeyDown = (e) => {
|
|
671
|
+
if (e.key === "Enter") {
|
|
672
|
+
onSearch(query);
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", { style: {
|
|
676
|
+
position: "relative",
|
|
677
|
+
width,
|
|
678
|
+
maxWidth: "100%"
|
|
679
|
+
} }, /* @__PURE__ */ import_react8.default.createElement(
|
|
680
|
+
"input",
|
|
681
|
+
{
|
|
682
|
+
type: "text",
|
|
683
|
+
value: query,
|
|
684
|
+
onChange: handleChange,
|
|
685
|
+
onKeyDown: handleKeyDown,
|
|
686
|
+
onFocus: () => setIsFocused(true),
|
|
687
|
+
onBlur: () => setIsFocused(false),
|
|
688
|
+
placeholder,
|
|
689
|
+
style: {
|
|
690
|
+
width: "100%",
|
|
691
|
+
padding: "12px 16px 12px 42px",
|
|
692
|
+
borderRadius: "12px",
|
|
693
|
+
border: "1px solid " + (isFocused ? alpha(accent, 0.4) : "rgba(255,255,255,0.1)"),
|
|
694
|
+
background: "rgba(255,255,255,0.03)",
|
|
695
|
+
color: "#fff",
|
|
696
|
+
fontSize: "14px",
|
|
697
|
+
fontFamily: "system-ui, sans-serif",
|
|
698
|
+
outline: "none",
|
|
699
|
+
transition: "border 0.2s, box-shadow 0.2s",
|
|
700
|
+
boxShadow: isFocused ? "0 0 0 3px " + alpha(accent, 0.15) : "none"
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
), /* @__PURE__ */ import_react8.default.createElement("div", { style: {
|
|
704
|
+
position: "absolute",
|
|
705
|
+
left: "16px",
|
|
706
|
+
top: "50%",
|
|
707
|
+
transform: "translateY(-50%)",
|
|
708
|
+
color: isFocused ? accent : "rgba(255,255,255,0.4)",
|
|
709
|
+
transition: "color 0.2s"
|
|
710
|
+
} }, /* @__PURE__ */ import_react8.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react8.default.createElement("circle", { cx: "11", cy: "11", r: "8" }), /* @__PURE__ */ import_react8.default.createElement("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }))), query && /* @__PURE__ */ import_react8.default.createElement(
|
|
711
|
+
"button",
|
|
712
|
+
{
|
|
713
|
+
onClick: () => {
|
|
714
|
+
setQuery("");
|
|
715
|
+
onSearch("");
|
|
716
|
+
},
|
|
717
|
+
style: {
|
|
718
|
+
position: "absolute",
|
|
719
|
+
right: "12px",
|
|
720
|
+
top: "50%",
|
|
721
|
+
transform: "translateY(-50%)",
|
|
722
|
+
background: "transparent",
|
|
723
|
+
border: "none",
|
|
724
|
+
color: "rgba(255,255,255,0.3)",
|
|
725
|
+
cursor: "pointer",
|
|
726
|
+
padding: "4px",
|
|
727
|
+
borderRadius: "50%",
|
|
728
|
+
display: "flex",
|
|
729
|
+
alignItems: "center",
|
|
730
|
+
justifyContent: "center",
|
|
731
|
+
transition: "color 0.2s"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
/* @__PURE__ */ import_react8.default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react8.default.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /* @__PURE__ */ import_react8.default.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))
|
|
735
|
+
));
|
|
736
|
+
};
|
|
492
737
|
// Annotate the CommonJS export names for ESM import in node:
|
|
493
738
|
0 && (module.exports = {
|
|
494
739
|
Button,
|
|
495
740
|
Card,
|
|
496
741
|
EcommerceCard,
|
|
742
|
+
LoginForm,
|
|
497
743
|
NavBar,
|
|
498
744
|
ProfileCard,
|
|
745
|
+
SearchBar,
|
|
499
746
|
SideBar
|
|
500
747
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -449,11 +449,256 @@ var SideBar = ({
|
|
|
449
449
|
background: "rgba(255,255,255,0.1)"
|
|
450
450
|
} }), /* @__PURE__ */ React6.createElement("div", null, /* @__PURE__ */ React6.createElement("div", { style: { color: "#fff", fontSize: "13px", fontWeight: "600" } }, "John Doe"), /* @__PURE__ */ React6.createElement("div", { style: { color: "rgba(255,255,255,0.4)", fontSize: "11px" } }, "Admin")))));
|
|
451
451
|
};
|
|
452
|
+
|
|
453
|
+
// src/components/LoginForm/LoginForm.jsx
|
|
454
|
+
import React7, { useState as useState6 } from "react";
|
|
455
|
+
var LoginForm = ({
|
|
456
|
+
title = "Welcome back",
|
|
457
|
+
subtitle = "Sign in to your account",
|
|
458
|
+
emailLabel = "Email address",
|
|
459
|
+
passwordLabel = "Password",
|
|
460
|
+
rememberLabel = "Remember me",
|
|
461
|
+
forgotLabel = "Forgot password?",
|
|
462
|
+
submitText = "Sign in",
|
|
463
|
+
noAccountText = "Don't have an account?",
|
|
464
|
+
signupText = "Sign up",
|
|
465
|
+
accent = "#6366f1",
|
|
466
|
+
bg = "#1e293b",
|
|
467
|
+
onSubmit = (email, password) => console.log(email, password),
|
|
468
|
+
onForgotClick = () => {
|
|
469
|
+
},
|
|
470
|
+
onSignupClick = () => {
|
|
471
|
+
}
|
|
472
|
+
}) => {
|
|
473
|
+
const [email, setEmail] = useState6("");
|
|
474
|
+
const [password, setPassword] = useState6("");
|
|
475
|
+
const [remember, setRemember] = useState6(false);
|
|
476
|
+
const [isSubmitting, setIsSubmitting] = useState6(false);
|
|
477
|
+
const alpha = (hex, op) => {
|
|
478
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
479
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
480
|
+
};
|
|
481
|
+
const handleSubmit = (e) => {
|
|
482
|
+
e.preventDefault();
|
|
483
|
+
setIsSubmitting(true);
|
|
484
|
+
setTimeout(() => {
|
|
485
|
+
onSubmit(email, password);
|
|
486
|
+
setIsSubmitting(false);
|
|
487
|
+
}, 1e3);
|
|
488
|
+
};
|
|
489
|
+
return /* @__PURE__ */ React7.createElement("div", { style: {
|
|
490
|
+
background: bg,
|
|
491
|
+
borderRadius: "16px",
|
|
492
|
+
padding: "32px",
|
|
493
|
+
width: "360px",
|
|
494
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
495
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)",
|
|
496
|
+
fontFamily: "system-ui,sans-serif"
|
|
497
|
+
} }, /* @__PURE__ */ React7.createElement("div", { style: { marginBottom: "28px" } }, /* @__PURE__ */ React7.createElement("h2", { style: { fontSize: "22px", fontWeight: "700", color: "#fff", margin: "0 0 6px" } }, title), /* @__PURE__ */ React7.createElement("p", { style: { fontSize: "14px", color: "rgba(255,255,255,0.5)", margin: 0 } }, subtitle)), /* @__PURE__ */ React7.createElement("form", { onSubmit: handleSubmit }, /* @__PURE__ */ React7.createElement("div", { style: { marginBottom: "18px" } }, /* @__PURE__ */ React7.createElement("label", { style: { display: "block", fontSize: "13px", fontWeight: "600", color: "rgba(255,255,255,0.7)", marginBottom: "8px" } }, emailLabel), /* @__PURE__ */ React7.createElement(
|
|
498
|
+
"input",
|
|
499
|
+
{
|
|
500
|
+
type: "email",
|
|
501
|
+
value: email,
|
|
502
|
+
onChange: (e) => setEmail(e.target.value),
|
|
503
|
+
required: true,
|
|
504
|
+
style: {
|
|
505
|
+
width: "100%",
|
|
506
|
+
padding: "12px 14px",
|
|
507
|
+
borderRadius: "10px",
|
|
508
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
509
|
+
background: "rgba(255,255,255,0.05)",
|
|
510
|
+
color: "#fff",
|
|
511
|
+
fontSize: "14px",
|
|
512
|
+
outline: "none",
|
|
513
|
+
transition: "border-color 0.2s",
|
|
514
|
+
boxSizing: "border-box"
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
)), /* @__PURE__ */ React7.createElement("div", { style: { marginBottom: "18px" } }, /* @__PURE__ */ React7.createElement("label", { style: { display: "block", fontSize: "13px", fontWeight: "600", color: "rgba(255,255,255,0.7)", marginBottom: "8px" } }, passwordLabel), /* @__PURE__ */ React7.createElement(
|
|
518
|
+
"input",
|
|
519
|
+
{
|
|
520
|
+
type: "password",
|
|
521
|
+
value: password,
|
|
522
|
+
onChange: (e) => setPassword(e.target.value),
|
|
523
|
+
required: true,
|
|
524
|
+
style: {
|
|
525
|
+
width: "100%",
|
|
526
|
+
padding: "12px 14px",
|
|
527
|
+
borderRadius: "10px",
|
|
528
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
529
|
+
background: "rgba(255,255,255,0.05)",
|
|
530
|
+
color: "#fff",
|
|
531
|
+
fontSize: "14px",
|
|
532
|
+
outline: "none",
|
|
533
|
+
transition: "border-color 0.2s",
|
|
534
|
+
boxSizing: "border-box"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
)), /* @__PURE__ */ React7.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "24px" } }, /* @__PURE__ */ React7.createElement("label", { style: { display: "flex", alignItems: "center", gap: "8px", fontSize: "13px", color: "rgba(255,255,255,0.7)", cursor: "pointer" } }, /* @__PURE__ */ React7.createElement(
|
|
538
|
+
"input",
|
|
539
|
+
{
|
|
540
|
+
type: "checkbox",
|
|
541
|
+
checked: remember,
|
|
542
|
+
onChange: (e) => setRemember(e.target.checked),
|
|
543
|
+
style: {
|
|
544
|
+
width: "16px",
|
|
545
|
+
height: "16px",
|
|
546
|
+
borderRadius: "4px",
|
|
547
|
+
border: "1px solid " + alpha(accent, 0.5),
|
|
548
|
+
background: remember ? accent : "transparent",
|
|
549
|
+
cursor: "pointer"
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
), rememberLabel), /* @__PURE__ */ React7.createElement(
|
|
553
|
+
"button",
|
|
554
|
+
{
|
|
555
|
+
type: "button",
|
|
556
|
+
onClick: onForgotClick,
|
|
557
|
+
style: {
|
|
558
|
+
background: "none",
|
|
559
|
+
border: "none",
|
|
560
|
+
color: accent,
|
|
561
|
+
fontSize: "13px",
|
|
562
|
+
fontWeight: "600",
|
|
563
|
+
cursor: "pointer",
|
|
564
|
+
padding: 0
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
forgotLabel
|
|
568
|
+
)), /* @__PURE__ */ React7.createElement(
|
|
569
|
+
"button",
|
|
570
|
+
{
|
|
571
|
+
type: "submit",
|
|
572
|
+
disabled: isSubmitting,
|
|
573
|
+
style: {
|
|
574
|
+
width: "100%",
|
|
575
|
+
padding: "14px",
|
|
576
|
+
borderRadius: "10px",
|
|
577
|
+
border: "none",
|
|
578
|
+
background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.7) + ")",
|
|
579
|
+
color: "#fff",
|
|
580
|
+
fontSize: "14px",
|
|
581
|
+
fontWeight: "700",
|
|
582
|
+
cursor: "pointer",
|
|
583
|
+
opacity: isSubmitting ? 0.8 : 1,
|
|
584
|
+
transition: "opacity 0.2s",
|
|
585
|
+
marginBottom: "20px"
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
isSubmitting ? "Signing in..." : submitText
|
|
589
|
+
), /* @__PURE__ */ React7.createElement("div", { style: { textAlign: "center", fontSize: "13px", color: "rgba(255,255,255,0.5)" } }, noAccountText, /* @__PURE__ */ React7.createElement(
|
|
590
|
+
"button",
|
|
591
|
+
{
|
|
592
|
+
type: "button",
|
|
593
|
+
onClick: onSignupClick,
|
|
594
|
+
style: {
|
|
595
|
+
background: "none",
|
|
596
|
+
border: "none",
|
|
597
|
+
color: accent,
|
|
598
|
+
fontWeight: "600",
|
|
599
|
+
cursor: "pointer",
|
|
600
|
+
padding: 0,
|
|
601
|
+
fontSize: "inherit"
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
signupText
|
|
605
|
+
))));
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
// src/components/SearchBar/SearchBar.jsx
|
|
609
|
+
import React8, { useState as useState7 } from "react";
|
|
610
|
+
var SearchBar = ({
|
|
611
|
+
placeholder = "Search...",
|
|
612
|
+
accent = "#6366f1",
|
|
613
|
+
bg = "#0f172a",
|
|
614
|
+
width = "400px",
|
|
615
|
+
onSearch = (query) => {
|
|
616
|
+
},
|
|
617
|
+
debounceTime = 300
|
|
618
|
+
}) => {
|
|
619
|
+
const [query, setQuery] = useState7("");
|
|
620
|
+
const [isFocused, setIsFocused] = useState7(false);
|
|
621
|
+
const alpha = (hex, op) => {
|
|
622
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
623
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
624
|
+
};
|
|
625
|
+
const handleChange = (e) => {
|
|
626
|
+
setQuery(e.target.value);
|
|
627
|
+
};
|
|
628
|
+
const handleKeyDown = (e) => {
|
|
629
|
+
if (e.key === "Enter") {
|
|
630
|
+
onSearch(query);
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
return /* @__PURE__ */ React8.createElement("div", { style: {
|
|
634
|
+
position: "relative",
|
|
635
|
+
width,
|
|
636
|
+
maxWidth: "100%"
|
|
637
|
+
} }, /* @__PURE__ */ React8.createElement(
|
|
638
|
+
"input",
|
|
639
|
+
{
|
|
640
|
+
type: "text",
|
|
641
|
+
value: query,
|
|
642
|
+
onChange: handleChange,
|
|
643
|
+
onKeyDown: handleKeyDown,
|
|
644
|
+
onFocus: () => setIsFocused(true),
|
|
645
|
+
onBlur: () => setIsFocused(false),
|
|
646
|
+
placeholder,
|
|
647
|
+
style: {
|
|
648
|
+
width: "100%",
|
|
649
|
+
padding: "12px 16px 12px 42px",
|
|
650
|
+
borderRadius: "12px",
|
|
651
|
+
border: "1px solid " + (isFocused ? alpha(accent, 0.4) : "rgba(255,255,255,0.1)"),
|
|
652
|
+
background: "rgba(255,255,255,0.03)",
|
|
653
|
+
color: "#fff",
|
|
654
|
+
fontSize: "14px",
|
|
655
|
+
fontFamily: "system-ui, sans-serif",
|
|
656
|
+
outline: "none",
|
|
657
|
+
transition: "border 0.2s, box-shadow 0.2s",
|
|
658
|
+
boxShadow: isFocused ? "0 0 0 3px " + alpha(accent, 0.15) : "none"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
), /* @__PURE__ */ React8.createElement("div", { style: {
|
|
662
|
+
position: "absolute",
|
|
663
|
+
left: "16px",
|
|
664
|
+
top: "50%",
|
|
665
|
+
transform: "translateY(-50%)",
|
|
666
|
+
color: isFocused ? accent : "rgba(255,255,255,0.4)",
|
|
667
|
+
transition: "color 0.2s"
|
|
668
|
+
} }, /* @__PURE__ */ React8.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React8.createElement("circle", { cx: "11", cy: "11", r: "8" }), /* @__PURE__ */ React8.createElement("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }))), query && /* @__PURE__ */ React8.createElement(
|
|
669
|
+
"button",
|
|
670
|
+
{
|
|
671
|
+
onClick: () => {
|
|
672
|
+
setQuery("");
|
|
673
|
+
onSearch("");
|
|
674
|
+
},
|
|
675
|
+
style: {
|
|
676
|
+
position: "absolute",
|
|
677
|
+
right: "12px",
|
|
678
|
+
top: "50%",
|
|
679
|
+
transform: "translateY(-50%)",
|
|
680
|
+
background: "transparent",
|
|
681
|
+
border: "none",
|
|
682
|
+
color: "rgba(255,255,255,0.3)",
|
|
683
|
+
cursor: "pointer",
|
|
684
|
+
padding: "4px",
|
|
685
|
+
borderRadius: "50%",
|
|
686
|
+
display: "flex",
|
|
687
|
+
alignItems: "center",
|
|
688
|
+
justifyContent: "center",
|
|
689
|
+
transition: "color 0.2s"
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
/* @__PURE__ */ React8.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React8.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /* @__PURE__ */ React8.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))
|
|
693
|
+
));
|
|
694
|
+
};
|
|
452
695
|
export {
|
|
453
696
|
Button,
|
|
454
697
|
Card,
|
|
455
698
|
EcommerceCard,
|
|
699
|
+
LoginForm,
|
|
456
700
|
NavBar,
|
|
457
701
|
ProfileCard,
|
|
702
|
+
SearchBar,
|
|
458
703
|
SideBar
|
|
459
704
|
};
|