gov-layout 1.2.28 → 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 +9 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -16
- 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 AvatarIcon({ size = 20 }) {
|
|
627
|
-
return /* @__PURE__ */ jsx(
|
|
628
|
-
"svg",
|
|
629
|
-
{
|
|
630
|
-
width: size,
|
|
631
|
-
height: size,
|
|
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,
|
|
@@ -692,7 +685,7 @@ function SidebarUserProfile({
|
|
|
692
685
|
fontWeight: 700,
|
|
693
686
|
fontSize: "14px"
|
|
694
687
|
},
|
|
695
|
-
children:
|
|
688
|
+
children: getInitial()
|
|
696
689
|
}
|
|
697
690
|
)
|
|
698
691
|
}
|
|
@@ -784,7 +777,7 @@ function SidebarUserProfile({
|
|
|
784
777
|
transition: "opacity 0.15s ease"
|
|
785
778
|
},
|
|
786
779
|
children: [
|
|
787
|
-
user.pictureUrl ? /* @__PURE__ */ jsx(
|
|
780
|
+
user.pictureUrl && !user.pictureUrl.startsWith("/") ? /* @__PURE__ */ jsx(
|
|
788
781
|
"img",
|
|
789
782
|
{
|
|
790
783
|
src: user.pictureUrl,
|
|
@@ -813,7 +806,7 @@ function SidebarUserProfile({
|
|
|
813
806
|
fontSize: "16px",
|
|
814
807
|
flexShrink: 0
|
|
815
808
|
},
|
|
816
|
-
children:
|
|
809
|
+
children: getInitial()
|
|
817
810
|
}
|
|
818
811
|
),
|
|
819
812
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|