gov-layout 1.3.0 → 1.3.1

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.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,9 @@ function SidebarUserProfile({
650
638
  }
651
639
  return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
652
640
  };
641
+ const getInitial = () => {
642
+ return user.firstName?.charAt(0) || user.lastName?.charAt(0) || "?";
643
+ };
653
644
  if (collapsed) {
654
645
  return /* @__PURE__ */ jsxs("div", { style: {
655
646
  padding: "12px 8px",
@@ -692,7 +683,7 @@ function SidebarUserProfile({
692
683
  fontWeight: 700,
693
684
  fontSize: "14px"
694
685
  },
695
- children: /* @__PURE__ */ jsx(AvatarIcon, { size: 20 })
686
+ children: getInitial()
696
687
  }
697
688
  )
698
689
  }
@@ -813,7 +804,7 @@ function SidebarUserProfile({
813
804
  fontSize: "16px",
814
805
  flexShrink: 0
815
806
  },
816
- children: /* @__PURE__ */ jsx(AvatarIcon, { size: 24 })
807
+ children: getInitial()
817
808
  }
818
809
  ),
819
810
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
@@ -1107,9 +1098,6 @@ function HamburgerIcon() {
1107
1098
  function MessageOutlinedIcon(props) {
1108
1099
  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" }) });
1109
1100
  }
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
- }
1113
1101
  function getNotifBg(type) {
1114
1102
  const map = {
1115
1103
  success: "#dcfce7",
@@ -1141,7 +1129,7 @@ function UserHeader({
1141
1129
  className
1142
1130
  }) {
1143
1131
  const displayName = `${user?.firstName || ""} ${user?.lastName || ""}`.trim() || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
1144
- user?.firstName?.charAt(0) || "\u0E1C";
1132
+ const firstChar = user?.firstName?.charAt(0) || "\u0E1C";
1145
1133
  const [isNotifOpen, setIsNotifOpen] = useState(false);
1146
1134
  const [activeFilter, setActiveFilter] = useState("all");
1147
1135
  const notifRef = useRef(null);
@@ -1235,7 +1223,13 @@ function UserHeader({
1235
1223
  justifyContent: "center",
1236
1224
  boxShadow: "0 1px 3px rgba(0,0,0,0.1)"
1237
1225
  },
1238
- children: /* @__PURE__ */ jsx(AvatarIcon2, { size: 24 })
1226
+ children: /* @__PURE__ */ jsx(
1227
+ "span",
1228
+ {
1229
+ style: { color: "#fff", fontSize: "18px", fontWeight: 600 },
1230
+ children: firstChar
1231
+ }
1232
+ )
1239
1233
  }
1240
1234
  ),
1241
1235
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
@@ -1629,9 +1623,6 @@ function ProfileIcon2() {
1629
1623
  /* @__PURE__ */ jsx("circle", { cx: "12", cy: "7", r: "4" })
1630
1624
  ] });
1631
1625
  }
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
- }
1635
1626
  function UserSidebar({
1636
1627
  user,
1637
1628
  roleLabel,
@@ -1659,6 +1650,10 @@ function UserSidebar({
1659
1650
  if (user.firstName && user.lastName) return `${user.firstName} ${user.lastName}`;
1660
1651
  return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
1661
1652
  };
1653
+ const getInitial = () => {
1654
+ if (!user) return "?";
1655
+ return user.firstName?.charAt(0) || user.lastName?.charAt(0) || "?";
1656
+ };
1662
1657
  const handleMenuClick = (path) => {
1663
1658
  onNavigate(path);
1664
1659
  onClose();
@@ -1747,7 +1742,7 @@ function UserSidebar({
1747
1742
  fontSize: "20px",
1748
1743
  boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
1749
1744
  },
1750
- children: /* @__PURE__ */ jsx(AvatarIcon3, { size: 32 })
1745
+ children: getInitial()
1751
1746
  }
1752
1747
  ),
1753
1748
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [