gov-layout 1.2.2 → 1.2.4

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
@@ -59,7 +59,7 @@ function SidebarHeader({ orgLogo, orgName, orgSubtitle, collapsed }) {
59
59
  fontWeight: 700,
60
60
  fontSize: "16px",
61
61
  lineHeight: "22px",
62
- color: "var(--color-alias-color-brand-text-dark, #05010e)",
62
+ color: "var(--gov-text-primary, #05010e)",
63
63
  margin: 0,
64
64
  overflow: "hidden",
65
65
  textOverflow: "ellipsis",
@@ -428,6 +428,8 @@ function MenuItemComponent({
428
428
  const handleClick = () => {
429
429
  if (hasChildren) {
430
430
  if (collapsed) {
431
+ setUserToggled(true);
432
+ setIsOpen(true);
431
433
  onExpandRequest?.();
432
434
  } else {
433
435
  setUserToggled(true);
@@ -855,7 +857,7 @@ function StaffSidebar({
855
857
  left: 0,
856
858
  height: "100vh",
857
859
  width: currentWidth,
858
- background: "#fff",
860
+ background: "var(--gov-bg-surface, #fff)",
859
861
  borderRight: "1px solid var(--color-border-colors-neutral, #c8cedd)",
860
862
  display: "flex",
861
863
  flexDirection: "column",
@@ -923,7 +925,7 @@ function StaffSidebar({
923
925
  e.currentTarget.style.backgroundColor = "#f3f4f6";
924
926
  },
925
927
  onMouseLeave: (e) => {
926
- e.currentTarget.style.backgroundColor = "#fff";
928
+ e.currentTarget.style.backgroundColor = "";
927
929
  },
928
930
  style: {
929
931
  position: "fixed",
@@ -935,7 +937,7 @@ function StaffSidebar({
935
937
  borderRadius: "0 6px 6px 0",
936
938
  border: "1px solid var(--color-border-colors-neutral, #c8cedd)",
937
939
  borderLeft: "none",
938
- background: "#fff",
940
+ background: "var(--gov-bg-surface, #fff)",
939
941
  cursor: "pointer",
940
942
  display: "flex",
941
943
  alignItems: "center",
@@ -954,7 +956,7 @@ function BellIcon2() {
954
956
  "path",
955
957
  {
956
958
  d: "M21.2321 13.4463L19.3618 6.71712C18.8136 4.74574 17.6222 3.01418 15.9769 1.79767C14.3316 0.581165 12.3269 -0.0504751 10.2814 0.00315377C8.23593 0.0567826 6.26708 0.792603 4.6878 2.09365C3.10852 3.3947 2.00945 5.18632 1.5653 7.18371L0.11728 13.6954C-0.0426654 14.4149 -0.0389674 15.1611 0.128101 15.879C0.29517 16.5969 0.621344 17.2681 1.08254 17.8431C1.54374 18.418 2.12818 18.8821 2.79272 19.2009C3.45727 19.5198 4.18494 19.6853 4.92202 19.6853H6.01861C6.24454 20.7979 6.84817 21.7982 7.72723 22.5167C8.60629 23.2352 9.70671 23.6277 10.842 23.6277C11.9774 23.6277 13.0778 23.2352 13.9569 22.5167C14.8359 21.7982 15.4396 20.7979 15.6655 19.6853H16.4904C17.2492 19.6853 17.9977 19.5099 18.6774 19.1728C19.3572 18.8357 19.9498 18.346 20.409 17.742C20.8682 17.1379 21.1815 16.4359 21.3245 15.6907C21.4674 14.9455 21.4352 14.1774 21.2321 13.4463ZM10.842 21.654C10.2334 21.6515 9.64049 21.461 9.1443 21.1086C8.6481 20.7562 8.27291 20.2591 8.07005 19.6853H13.614C13.4112 20.2591 13.036 20.7562 12.5398 21.1086C12.0436 21.461 11.4506 21.6515 10.842 21.654ZM18.8411 16.55C18.5668 16.9139 18.2114 17.2088 17.8032 17.4113C17.3949 17.6138 16.9451 17.7183 16.4894 17.7165H4.92202C4.47982 17.7164 4.04328 17.6171 3.64463 17.4257C3.24598 17.2344 2.89539 16.9559 2.61874 16.611C2.34208 16.266 2.14643 15.8633 2.04622 15.4326C1.94602 15.0019 1.94381 14.5542 2.03977 14.1226L3.4868 7.60994C3.83561 6.04105 4.69886 4.63379 5.93932 3.61186C7.17978 2.58992 8.72625 2.01197 10.3329 1.96988C11.9395 1.92779 13.5142 2.42398 14.8064 3.37956C16.0987 4.33515 17.0344 5.69528 17.4649 7.24376L19.3352 13.9729C19.4588 14.4114 19.4785 14.8725 19.3927 15.3199C19.3069 15.7672 19.1181 16.1884 18.8411 16.55Z",
957
- fill: "var(--color-alias-color-brand-text-dark, #05010e)"
959
+ fill: "var(--gov-text-primary, #05010e)"
958
960
  }
959
961
  ) });
960
962
  }
@@ -963,7 +965,7 @@ function HamburgerIcon() {
963
965
  "path",
964
966
  {
965
967
  d: "M1.1875 17.8426C0.851042 17.8426 0.569077 17.7287 0.341604 17.501C0.113868 17.2735 0 16.9914 0 16.6547C0 16.3182 0.113868 16.0363 0.341604 15.8088C0.569077 15.5816 0.851042 15.468 1.1875 15.468H25.7292C26.0656 15.468 26.3476 15.5817 26.5751 15.8092C26.8028 16.0369 26.9167 16.3192 26.9167 16.6559C26.9167 16.9923 26.8028 17.2743 26.5751 17.5018C26.3476 17.729 26.0656 17.8426 25.7292 17.8426H1.1875ZM1.1875 10.1088C0.851042 10.1088 0.569077 9.99492 0.341604 9.76719C0.113868 9.53945 0 9.25735 0 8.9209C0 8.58417 0.113868 8.30221 0.341604 8.075C0.569077 7.84753 0.851042 7.73379 1.1875 7.73379H25.7292C26.0656 7.73379 26.3476 7.84766 26.5751 8.0754C26.8028 8.30313 26.9167 8.58523 26.9167 8.92169C26.9167 9.25841 26.8028 9.54037 26.5751 9.76758C26.3476 9.99506 26.0656 10.1088 25.7292 10.1088H1.1875ZM1.1875 2.3746C0.851042 2.3746 0.569077 2.26087 0.341604 2.0334C0.113868 1.80566 0 1.52343 0 1.18671C0 0.850249 0.113868 0.568284 0.341604 0.340812C0.569077 0.113604 0.851042 0 1.1875 0H25.7292C26.0656 0 26.3476 0.113868 26.5751 0.341604C26.8028 0.569077 26.9167 0.851174 26.9167 1.1879C26.9167 1.52435 26.8028 1.80632 26.5751 2.03379C26.3476 2.261 26.0656 2.3746 25.7292 2.3746H1.1875Z",
966
- fill: "var(--color-alias-color-brand-text-dark, #05010e)"
968
+ fill: "var(--gov-text-primary, #05010e)"
967
969
  }
968
970
  ) });
969
971
  }
@@ -1015,7 +1017,7 @@ function UserHeader({
1015
1017
  {
1016
1018
  className,
1017
1019
  style: {
1018
- background: "#fff",
1020
+ background: "var(--gov-bg-surface, #fff)",
1019
1021
  boxShadow: "0 1px 3px rgba(0,0,0,0.08)",
1020
1022
  position: "sticky",
1021
1023
  top: 0,
@@ -1073,7 +1075,7 @@ function UserHeader({
1073
1075
  style: {
1074
1076
  fontSize: "14px",
1075
1077
  fontWeight: 600,
1076
- color: "var(--color-alias-color-brand-text-dark, #05010e)",
1078
+ color: "var(--gov-text-primary, #05010e)",
1077
1079
  margin: 0
1078
1080
  },
1079
1081
  children: [
@@ -1145,12 +1147,12 @@ function UserHeader({
1145
1147
  right: 0,
1146
1148
  marginTop: "8px",
1147
1149
  width: "360px",
1148
- background: "#fff",
1150
+ background: "var(--gov-bg-surface, #fff)",
1149
1151
  borderRadius: "12px",
1150
1152
  boxShadow: "0 10px 40px rgba(0,0,0,0.12)",
1151
1153
  zIndex: 50,
1152
1154
  overflow: "hidden",
1153
- border: "1px solid #e5e7eb"
1155
+ border: "1px solid var(--color-border-colors-neutral, #e5e7eb)"
1154
1156
  },
1155
1157
  children: [
1156
1158
  /* @__PURE__ */ jsxs(
@@ -1162,10 +1164,10 @@ function UserHeader({
1162
1164
  display: "flex",
1163
1165
  alignItems: "center",
1164
1166
  justifyContent: "space-between",
1165
- background: "#fafafa"
1167
+ background: "var(--gov-bg-surface, #fff)"
1166
1168
  },
1167
1169
  children: [
1168
- /* @__PURE__ */ jsx("span", { style: { fontWeight: 600, fontSize: "14px", color: "#111" }, children: "\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19" }),
1170
+ /* @__PURE__ */ jsx("span", { style: { fontWeight: 600, fontSize: "14px", color: "var(--gov-text-primary, #05010e)" }, children: "\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19" }),
1169
1171
  onMarkAllRead && /* @__PURE__ */ jsx(
1170
1172
  "button",
1171
1173
  {
@@ -1254,7 +1256,7 @@ function UserHeader({
1254
1256
  style: {
1255
1257
  fontSize: "13px",
1256
1258
  fontWeight: !item.isRead ? 600 : 500,
1257
- color: "#111",
1259
+ color: "var(--gov-text-primary, #05010e)",
1258
1260
  margin: "0 0 2px"
1259
1261
  },
1260
1262
  children: item.title
@@ -1296,7 +1298,7 @@ function UserHeader({
1296
1298
  padding: "10px",
1297
1299
  borderTop: "1px solid #f3f4f6",
1298
1300
  textAlign: "center",
1299
- background: "#fafafa"
1301
+ background: "var(--gov-bg-surface, #fff)"
1300
1302
  },
1301
1303
  children: /* @__PURE__ */ jsx(
1302
1304
  "button",
@@ -1419,7 +1421,7 @@ function UserSidebar({
1419
1421
  height: "100%",
1420
1422
  width: "80vw",
1421
1423
  maxWidth: "320px",
1422
- background: "#fff",
1424
+ background: "var(--gov-bg-surface, #fff)",
1423
1425
  boxShadow: "-4px 0 24px rgba(0,0,0,0.12)",
1424
1426
  zIndex: 50,
1425
1427
  transform: isOpen ? "translateX(0)" : "translateX(100%)",