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.js
CHANGED
|
@@ -625,6 +625,18 @@ function ProfileIcon() {
|
|
|
625
625
|
}
|
|
626
626
|
);
|
|
627
627
|
}
|
|
628
|
+
function AvatarIcon({ size = 20 }) {
|
|
629
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
630
|
+
"svg",
|
|
631
|
+
{
|
|
632
|
+
width: size,
|
|
633
|
+
height: size,
|
|
634
|
+
viewBox: "0 0 24 24",
|
|
635
|
+
fill: "currentColor",
|
|
636
|
+
children: /* @__PURE__ */ jsxRuntime.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" })
|
|
637
|
+
}
|
|
638
|
+
);
|
|
639
|
+
}
|
|
628
640
|
function SidebarUserProfile({
|
|
629
641
|
user,
|
|
630
642
|
roleLabel,
|
|
@@ -640,11 +652,6 @@ function SidebarUserProfile({
|
|
|
640
652
|
}
|
|
641
653
|
return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
642
654
|
};
|
|
643
|
-
const getInitial = () => {
|
|
644
|
-
if (user.firstName) return user.firstName.substring(0, 2);
|
|
645
|
-
if (user.lastName) return user.lastName.substring(0, 2);
|
|
646
|
-
return "\u0E1C\u0E39\u0E49";
|
|
647
|
-
};
|
|
648
655
|
if (collapsed) {
|
|
649
656
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
650
657
|
padding: "12px 8px",
|
|
@@ -660,7 +667,7 @@ function SidebarUserProfile({
|
|
|
660
667
|
onClick: onProfile,
|
|
661
668
|
title: onProfile ? "\u0E14\u0E39\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C" : getFullName(),
|
|
662
669
|
style: { cursor: onProfile ? "pointer" : "default" },
|
|
663
|
-
children: user.pictureUrl
|
|
670
|
+
children: user.pictureUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
664
671
|
"img",
|
|
665
672
|
{
|
|
666
673
|
src: user.pictureUrl,
|
|
@@ -687,7 +694,7 @@ function SidebarUserProfile({
|
|
|
687
694
|
fontWeight: 700,
|
|
688
695
|
fontSize: "14px"
|
|
689
696
|
},
|
|
690
|
-
children:
|
|
697
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AvatarIcon, { size: 20 })
|
|
691
698
|
}
|
|
692
699
|
)
|
|
693
700
|
}
|
|
@@ -779,7 +786,7 @@ function SidebarUserProfile({
|
|
|
779
786
|
transition: "opacity 0.15s ease"
|
|
780
787
|
},
|
|
781
788
|
children: [
|
|
782
|
-
user.pictureUrl
|
|
789
|
+
user.pictureUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
783
790
|
"img",
|
|
784
791
|
{
|
|
785
792
|
src: user.pictureUrl,
|
|
@@ -808,7 +815,7 @@ function SidebarUserProfile({
|
|
|
808
815
|
fontSize: "16px",
|
|
809
816
|
flexShrink: 0
|
|
810
817
|
},
|
|
811
|
-
children:
|
|
818
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AvatarIcon, { size: 24 })
|
|
812
819
|
}
|
|
813
820
|
),
|
|
814
821
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -1102,6 +1109,9 @@ function HamburgerIcon() {
|
|
|
1102
1109
|
function MessageOutlinedIcon(props) {
|
|
1103
1110
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: /* @__PURE__ */ jsxRuntime.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" }) });
|
|
1104
1111
|
}
|
|
1112
|
+
function AvatarIcon2({ size = 20 }) {
|
|
1113
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.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" }) });
|
|
1114
|
+
}
|
|
1105
1115
|
function getNotifBg(type) {
|
|
1106
1116
|
const map = {
|
|
1107
1117
|
success: "#dcfce7",
|
|
@@ -1133,7 +1143,7 @@ function UserHeader({
|
|
|
1133
1143
|
className
|
|
1134
1144
|
}) {
|
|
1135
1145
|
const displayName = `${user?.firstName || ""} ${user?.lastName || ""}`.trim() || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
1136
|
-
|
|
1146
|
+
user?.firstName?.charAt(0) || "\u0E1C";
|
|
1137
1147
|
const [isNotifOpen, setIsNotifOpen] = react.useState(false);
|
|
1138
1148
|
const [activeFilter, setActiveFilter] = react.useState("all");
|
|
1139
1149
|
const notifRef = react.useRef(null);
|
|
@@ -1227,13 +1237,7 @@ function UserHeader({
|
|
|
1227
1237
|
justifyContent: "center",
|
|
1228
1238
|
boxShadow: "0 1px 3px rgba(0,0,0,0.1)"
|
|
1229
1239
|
},
|
|
1230
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1231
|
-
"span",
|
|
1232
|
-
{
|
|
1233
|
-
style: { color: "#fff", fontSize: "18px", fontWeight: 600 },
|
|
1234
|
-
children: firstChar
|
|
1235
|
-
}
|
|
1236
|
-
)
|
|
1240
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AvatarIcon2, { size: 24 })
|
|
1237
1241
|
}
|
|
1238
1242
|
),
|
|
1239
1243
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -1627,6 +1631,9 @@ function ProfileIcon2() {
|
|
|
1627
1631
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "7", r: "4" })
|
|
1628
1632
|
] });
|
|
1629
1633
|
}
|
|
1634
|
+
function AvatarIcon3({ size = 20 }) {
|
|
1635
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.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" }) });
|
|
1636
|
+
}
|
|
1630
1637
|
function UserSidebar({
|
|
1631
1638
|
user,
|
|
1632
1639
|
roleLabel,
|
|
@@ -1654,10 +1661,6 @@ function UserSidebar({
|
|
|
1654
1661
|
if (user.firstName && user.lastName) return `${user.firstName} ${user.lastName}`;
|
|
1655
1662
|
return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
|
|
1656
1663
|
};
|
|
1657
|
-
const getInitial = () => {
|
|
1658
|
-
if (!user) return "?";
|
|
1659
|
-
return user.firstName?.charAt(0) || user.lastName?.charAt(0) || "?";
|
|
1660
|
-
};
|
|
1661
1664
|
const handleMenuClick = (path) => {
|
|
1662
1665
|
onNavigate(path);
|
|
1663
1666
|
onClose();
|
|
@@ -1746,7 +1749,7 @@ function UserSidebar({
|
|
|
1746
1749
|
fontSize: "20px",
|
|
1747
1750
|
boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
|
|
1748
1751
|
},
|
|
1749
|
-
children:
|
|
1752
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AvatarIcon3, { size: 32 })
|
|
1750
1753
|
}
|
|
1751
1754
|
),
|
|
1752
1755
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|