gov-layout 1.2.27 → 1.2.29
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/README.md +1 -0
- package/dist/index.js +14 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -623,18 +623,6 @@ function ProfileIcon() {
|
|
|
623
623
|
}
|
|
624
624
|
);
|
|
625
625
|
}
|
|
626
|
-
function DefaultAvatarIcon() {
|
|
627
|
-
return /* @__PURE__ */ jsx(
|
|
628
|
-
"svg",
|
|
629
|
-
{
|
|
630
|
-
width: "20",
|
|
631
|
-
height: "20",
|
|
632
|
-
viewBox: "0 0 24 24",
|
|
633
|
-
fill: "currentColor",
|
|
634
|
-
children: /* @__PURE__ */ jsx("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" })
|
|
635
|
-
}
|
|
636
|
-
);
|
|
637
|
-
}
|
|
638
626
|
function SidebarUserProfile({
|
|
639
627
|
user,
|
|
640
628
|
roleLabel,
|
|
@@ -650,6 +638,11 @@ function SidebarUserProfile({
|
|
|
650
638
|
}
|
|
651
639
|
return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
652
640
|
};
|
|
641
|
+
const getInitial = () => {
|
|
642
|
+
if (user.firstName) return user.firstName.substring(0, 2);
|
|
643
|
+
if (user.lastName) return user.lastName.substring(0, 2);
|
|
644
|
+
return "\u0E1C\u0E39\u0E49";
|
|
645
|
+
};
|
|
653
646
|
if (collapsed) {
|
|
654
647
|
return /* @__PURE__ */ jsxs("div", { style: {
|
|
655
648
|
padding: "12px 8px",
|
|
@@ -665,7 +658,7 @@ function SidebarUserProfile({
|
|
|
665
658
|
onClick: onProfile,
|
|
666
659
|
title: onProfile ? "\u0E14\u0E39\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C" : getFullName(),
|
|
667
660
|
style: { cursor: onProfile ? "pointer" : "default" },
|
|
668
|
-
children: user.pictureUrl ? /* @__PURE__ */ jsx(
|
|
661
|
+
children: user.pictureUrl && !user.pictureUrl.startsWith("/") ? /* @__PURE__ */ jsx(
|
|
669
662
|
"img",
|
|
670
663
|
{
|
|
671
664
|
src: user.pictureUrl,
|
|
@@ -688,9 +681,11 @@ function SidebarUserProfile({
|
|
|
688
681
|
display: "flex",
|
|
689
682
|
alignItems: "center",
|
|
690
683
|
justifyContent: "center",
|
|
691
|
-
color: "#fff"
|
|
684
|
+
color: "#fff",
|
|
685
|
+
fontWeight: 700,
|
|
686
|
+
fontSize: "14px"
|
|
692
687
|
},
|
|
693
|
-
children:
|
|
688
|
+
children: getInitial()
|
|
694
689
|
}
|
|
695
690
|
)
|
|
696
691
|
}
|
|
@@ -782,7 +777,7 @@ function SidebarUserProfile({
|
|
|
782
777
|
transition: "opacity 0.15s ease"
|
|
783
778
|
},
|
|
784
779
|
children: [
|
|
785
|
-
user.pictureUrl ? /* @__PURE__ */ jsx(
|
|
780
|
+
user.pictureUrl && !user.pictureUrl.startsWith("/") ? /* @__PURE__ */ jsx(
|
|
786
781
|
"img",
|
|
787
782
|
{
|
|
788
783
|
src: user.pictureUrl,
|
|
@@ -807,9 +802,11 @@ function SidebarUserProfile({
|
|
|
807
802
|
alignItems: "center",
|
|
808
803
|
justifyContent: "center",
|
|
809
804
|
color: "#fff",
|
|
805
|
+
fontWeight: 700,
|
|
806
|
+
fontSize: "16px",
|
|
810
807
|
flexShrink: 0
|
|
811
808
|
},
|
|
812
|
-
children:
|
|
809
|
+
children: getInitial()
|
|
813
810
|
}
|
|
814
811
|
),
|
|
815
812
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|