virtual-ui-lib 1.0.25 → 1.0.26
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 +65 -2
- package/dist/index.mjs +63 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41,7 +41,8 @@ __export(index_exports, {
|
|
|
41
41
|
Loader: () => Loader,
|
|
42
42
|
Navbar: () => Navbar,
|
|
43
43
|
OTPInput: () => OTPInput,
|
|
44
|
-
RatingStars: () => RatingStars
|
|
44
|
+
RatingStars: () => RatingStars,
|
|
45
|
+
UserAvatar: () => UserAvatar
|
|
45
46
|
});
|
|
46
47
|
module.exports = __toCommonJS(index_exports);
|
|
47
48
|
|
|
@@ -764,6 +765,67 @@ var RatingStars = ({
|
|
|
764
765
|
/* @__PURE__ */ import_react13.default.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21 12 17.77 5.82 21 7 14.14 2 9.27 8.91 8.26 12 2" })
|
|
765
766
|
)));
|
|
766
767
|
};
|
|
768
|
+
|
|
769
|
+
// src/components/UserAvatar/UserAvatar.jsx
|
|
770
|
+
var import_react14 = __toESM(require("react"));
|
|
771
|
+
var UserAvatar = ({
|
|
772
|
+
size = "50px",
|
|
773
|
+
src = "",
|
|
774
|
+
initials = "AB",
|
|
775
|
+
online = false,
|
|
776
|
+
busy = false,
|
|
777
|
+
showStatus = true,
|
|
778
|
+
bgColor = "#1e293b",
|
|
779
|
+
textColor = "#f1f5f9",
|
|
780
|
+
statusColor = "#22c55e",
|
|
781
|
+
borderColor = "#7c3aed"
|
|
782
|
+
}) => {
|
|
783
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
784
|
+
"div",
|
|
785
|
+
{
|
|
786
|
+
style: {
|
|
787
|
+
position: "relative",
|
|
788
|
+
width: size,
|
|
789
|
+
height: size,
|
|
790
|
+
borderRadius: "50%",
|
|
791
|
+
backgroundColor: bgColor,
|
|
792
|
+
display: "flex",
|
|
793
|
+
alignItems: "center",
|
|
794
|
+
justifyContent: "center",
|
|
795
|
+
transition: "transform 0.2s",
|
|
796
|
+
cursor: "pointer",
|
|
797
|
+
overflow: "hidden",
|
|
798
|
+
boxShadow: "0 4px 14px rgba(0, 0, 0, 0.2)"
|
|
799
|
+
},
|
|
800
|
+
onMouseEnter: (e) => {
|
|
801
|
+
e.currentTarget.style.transform = "scale(1.1)";
|
|
802
|
+
},
|
|
803
|
+
onMouseLeave: (e) => {
|
|
804
|
+
e.currentTarget.style.transform = "scale(1)";
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
src ? /* @__PURE__ */ import_react14.default.createElement("img", { src, alt: initials, style: {
|
|
808
|
+
width: "100%",
|
|
809
|
+
height: "100%",
|
|
810
|
+
borderRadius: "50%",
|
|
811
|
+
objectFit: "cover"
|
|
812
|
+
} }) : /* @__PURE__ */ import_react14.default.createElement("span", { style: {
|
|
813
|
+
color: textColor,
|
|
814
|
+
fontSize: "20px",
|
|
815
|
+
fontWeight: "700"
|
|
816
|
+
} }, initials),
|
|
817
|
+
showStatus && /* @__PURE__ */ import_react14.default.createElement("span", { style: {
|
|
818
|
+
position: "absolute",
|
|
819
|
+
bottom: "0",
|
|
820
|
+
right: "0",
|
|
821
|
+
width: "12px",
|
|
822
|
+
height: "12px",
|
|
823
|
+
borderRadius: "50%",
|
|
824
|
+
backgroundColor: busy ? "#fbbf24" : online ? statusColor : "#9ca3af",
|
|
825
|
+
border: "2px solid " + borderColor
|
|
826
|
+
} })
|
|
827
|
+
);
|
|
828
|
+
};
|
|
767
829
|
// Annotate the CommonJS export names for ESM import in node:
|
|
768
830
|
0 && (module.exports = {
|
|
769
831
|
AlertBanner,
|
|
@@ -778,5 +840,6 @@ var RatingStars = ({
|
|
|
778
840
|
Loader,
|
|
779
841
|
Navbar,
|
|
780
842
|
OTPInput,
|
|
781
|
-
RatingStars
|
|
843
|
+
RatingStars,
|
|
844
|
+
UserAvatar
|
|
782
845
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -717,6 +717,67 @@ var RatingStars = ({
|
|
|
717
717
|
/* @__PURE__ */ React13.createElement("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21 12 17.77 5.82 21 7 14.14 2 9.27 8.91 8.26 12 2" })
|
|
718
718
|
)));
|
|
719
719
|
};
|
|
720
|
+
|
|
721
|
+
// src/components/UserAvatar/UserAvatar.jsx
|
|
722
|
+
import React14 from "react";
|
|
723
|
+
var UserAvatar = ({
|
|
724
|
+
size = "50px",
|
|
725
|
+
src = "",
|
|
726
|
+
initials = "AB",
|
|
727
|
+
online = false,
|
|
728
|
+
busy = false,
|
|
729
|
+
showStatus = true,
|
|
730
|
+
bgColor = "#1e293b",
|
|
731
|
+
textColor = "#f1f5f9",
|
|
732
|
+
statusColor = "#22c55e",
|
|
733
|
+
borderColor = "#7c3aed"
|
|
734
|
+
}) => {
|
|
735
|
+
return /* @__PURE__ */ React14.createElement(
|
|
736
|
+
"div",
|
|
737
|
+
{
|
|
738
|
+
style: {
|
|
739
|
+
position: "relative",
|
|
740
|
+
width: size,
|
|
741
|
+
height: size,
|
|
742
|
+
borderRadius: "50%",
|
|
743
|
+
backgroundColor: bgColor,
|
|
744
|
+
display: "flex",
|
|
745
|
+
alignItems: "center",
|
|
746
|
+
justifyContent: "center",
|
|
747
|
+
transition: "transform 0.2s",
|
|
748
|
+
cursor: "pointer",
|
|
749
|
+
overflow: "hidden",
|
|
750
|
+
boxShadow: "0 4px 14px rgba(0, 0, 0, 0.2)"
|
|
751
|
+
},
|
|
752
|
+
onMouseEnter: (e) => {
|
|
753
|
+
e.currentTarget.style.transform = "scale(1.1)";
|
|
754
|
+
},
|
|
755
|
+
onMouseLeave: (e) => {
|
|
756
|
+
e.currentTarget.style.transform = "scale(1)";
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
src ? /* @__PURE__ */ React14.createElement("img", { src, alt: initials, style: {
|
|
760
|
+
width: "100%",
|
|
761
|
+
height: "100%",
|
|
762
|
+
borderRadius: "50%",
|
|
763
|
+
objectFit: "cover"
|
|
764
|
+
} }) : /* @__PURE__ */ React14.createElement("span", { style: {
|
|
765
|
+
color: textColor,
|
|
766
|
+
fontSize: "20px",
|
|
767
|
+
fontWeight: "700"
|
|
768
|
+
} }, initials),
|
|
769
|
+
showStatus && /* @__PURE__ */ React14.createElement("span", { style: {
|
|
770
|
+
position: "absolute",
|
|
771
|
+
bottom: "0",
|
|
772
|
+
right: "0",
|
|
773
|
+
width: "12px",
|
|
774
|
+
height: "12px",
|
|
775
|
+
borderRadius: "50%",
|
|
776
|
+
backgroundColor: busy ? "#fbbf24" : online ? statusColor : "#9ca3af",
|
|
777
|
+
border: "2px solid " + borderColor
|
|
778
|
+
} })
|
|
779
|
+
);
|
|
780
|
+
};
|
|
720
781
|
export {
|
|
721
782
|
AlertBanner,
|
|
722
783
|
Button,
|
|
@@ -730,5 +791,6 @@ export {
|
|
|
730
791
|
Loader,
|
|
731
792
|
Navbar,
|
|
732
793
|
OTPInput,
|
|
733
|
-
RatingStars
|
|
794
|
+
RatingStars,
|
|
795
|
+
UserAvatar
|
|
734
796
|
};
|