gov-layout 1.2.29 → 1.3.0
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 +25 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -623,6 +623,18 @@ 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
|
+
}
|
|
626
638
|
function SidebarUserProfile({
|
|
627
639
|
user,
|
|
628
640
|
roleLabel,
|
|
@@ -638,11 +650,6 @@ function SidebarUserProfile({
|
|
|
638
650
|
}
|
|
639
651
|
return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
640
652
|
};
|
|
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
|
-
};
|
|
646
653
|
if (collapsed) {
|
|
647
654
|
return /* @__PURE__ */ jsxs("div", { style: {
|
|
648
655
|
padding: "12px 8px",
|
|
@@ -658,7 +665,7 @@ function SidebarUserProfile({
|
|
|
658
665
|
onClick: onProfile,
|
|
659
666
|
title: onProfile ? "\u0E14\u0E39\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C" : getFullName(),
|
|
660
667
|
style: { cursor: onProfile ? "pointer" : "default" },
|
|
661
|
-
children: user.pictureUrl
|
|
668
|
+
children: user.pictureUrl ? /* @__PURE__ */ jsx(
|
|
662
669
|
"img",
|
|
663
670
|
{
|
|
664
671
|
src: user.pictureUrl,
|
|
@@ -685,7 +692,7 @@ function SidebarUserProfile({
|
|
|
685
692
|
fontWeight: 700,
|
|
686
693
|
fontSize: "14px"
|
|
687
694
|
},
|
|
688
|
-
children:
|
|
695
|
+
children: /* @__PURE__ */ jsx(AvatarIcon, { size: 20 })
|
|
689
696
|
}
|
|
690
697
|
)
|
|
691
698
|
}
|
|
@@ -777,7 +784,7 @@ function SidebarUserProfile({
|
|
|
777
784
|
transition: "opacity 0.15s ease"
|
|
778
785
|
},
|
|
779
786
|
children: [
|
|
780
|
-
user.pictureUrl
|
|
787
|
+
user.pictureUrl ? /* @__PURE__ */ jsx(
|
|
781
788
|
"img",
|
|
782
789
|
{
|
|
783
790
|
src: user.pictureUrl,
|
|
@@ -806,7 +813,7 @@ function SidebarUserProfile({
|
|
|
806
813
|
fontSize: "16px",
|
|
807
814
|
flexShrink: 0
|
|
808
815
|
},
|
|
809
|
-
children:
|
|
816
|
+
children: /* @__PURE__ */ jsx(AvatarIcon, { size: 24 })
|
|
810
817
|
}
|
|
811
818
|
),
|
|
812
819
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -1100,6 +1107,9 @@ function HamburgerIcon() {
|
|
|
1100
1107
|
function MessageOutlinedIcon(props) {
|
|
1101
1108
|
return /* @__PURE__ */ jsx("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsx("path", { d: "M4 4h16v12H5.17L4 17.17zm0-2c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm2 10h12v2H6zm0-3h12v2H6zm0-3h12v2H6z" }) });
|
|
1102
1109
|
}
|
|
1110
|
+
function AvatarIcon2({ size = 20 }) {
|
|
1111
|
+
return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "currentColor", 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" }) });
|
|
1112
|
+
}
|
|
1103
1113
|
function getNotifBg(type) {
|
|
1104
1114
|
const map = {
|
|
1105
1115
|
success: "#dcfce7",
|
|
@@ -1131,7 +1141,7 @@ function UserHeader({
|
|
|
1131
1141
|
className
|
|
1132
1142
|
}) {
|
|
1133
1143
|
const displayName = `${user?.firstName || ""} ${user?.lastName || ""}`.trim() || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
1134
|
-
|
|
1144
|
+
user?.firstName?.charAt(0) || "\u0E1C";
|
|
1135
1145
|
const [isNotifOpen, setIsNotifOpen] = useState(false);
|
|
1136
1146
|
const [activeFilter, setActiveFilter] = useState("all");
|
|
1137
1147
|
const notifRef = useRef(null);
|
|
@@ -1225,13 +1235,7 @@ function UserHeader({
|
|
|
1225
1235
|
justifyContent: "center",
|
|
1226
1236
|
boxShadow: "0 1px 3px rgba(0,0,0,0.1)"
|
|
1227
1237
|
},
|
|
1228
|
-
children: /* @__PURE__ */ jsx(
|
|
1229
|
-
"span",
|
|
1230
|
-
{
|
|
1231
|
-
style: { color: "#fff", fontSize: "18px", fontWeight: 600 },
|
|
1232
|
-
children: firstChar
|
|
1233
|
-
}
|
|
1234
|
-
)
|
|
1238
|
+
children: /* @__PURE__ */ jsx(AvatarIcon2, { size: 24 })
|
|
1235
1239
|
}
|
|
1236
1240
|
),
|
|
1237
1241
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -1625,6 +1629,9 @@ function ProfileIcon2() {
|
|
|
1625
1629
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "7", r: "4" })
|
|
1626
1630
|
] });
|
|
1627
1631
|
}
|
|
1632
|
+
function AvatarIcon3({ size = 20 }) {
|
|
1633
|
+
return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "currentColor", 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" }) });
|
|
1634
|
+
}
|
|
1628
1635
|
function UserSidebar({
|
|
1629
1636
|
user,
|
|
1630
1637
|
roleLabel,
|
|
@@ -1652,10 +1659,6 @@ function UserSidebar({
|
|
|
1652
1659
|
if (user.firstName && user.lastName) return `${user.firstName} ${user.lastName}`;
|
|
1653
1660
|
return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
1654
1661
|
};
|
|
1655
|
-
const getInitial = () => {
|
|
1656
|
-
if (!user) return "?";
|
|
1657
|
-
return user.firstName?.charAt(0) || user.lastName?.charAt(0) || "?";
|
|
1658
|
-
};
|
|
1659
1662
|
const handleMenuClick = (path) => {
|
|
1660
1663
|
onNavigate(path);
|
|
1661
1664
|
onClose();
|
|
@@ -1744,7 +1747,7 @@ function UserSidebar({
|
|
|
1744
1747
|
fontSize: "20px",
|
|
1745
1748
|
boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
|
|
1746
1749
|
},
|
|
1747
|
-
children:
|
|
1750
|
+
children: /* @__PURE__ */ jsx(AvatarIcon3, { size: 32 })
|
|
1748
1751
|
}
|
|
1749
1752
|
),
|
|
1750
1753
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|