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.js CHANGED
@@ -61,7 +61,7 @@ function SidebarHeader({ orgLogo, orgName, orgSubtitle, collapsed }) {
61
61
  fontWeight: 700,
62
62
  fontSize: "16px",
63
63
  lineHeight: "22px",
64
- color: "var(--color-alias-color-brand-text-dark, #05010e)",
64
+ color: "var(--gov-text-primary, #05010e)",
65
65
  margin: 0,
66
66
  overflow: "hidden",
67
67
  textOverflow: "ellipsis",
@@ -430,6 +430,8 @@ function MenuItemComponent({
430
430
  const handleClick = () => {
431
431
  if (hasChildren) {
432
432
  if (collapsed) {
433
+ setUserToggled(true);
434
+ setIsOpen(true);
433
435
  onExpandRequest?.();
434
436
  } else {
435
437
  setUserToggled(true);
@@ -857,7 +859,7 @@ function StaffSidebar({
857
859
  left: 0,
858
860
  height: "100vh",
859
861
  width: currentWidth,
860
- background: "#fff",
862
+ background: "var(--gov-bg-surface, #fff)",
861
863
  borderRight: "1px solid var(--color-border-colors-neutral, #c8cedd)",
862
864
  display: "flex",
863
865
  flexDirection: "column",
@@ -925,7 +927,7 @@ function StaffSidebar({
925
927
  e.currentTarget.style.backgroundColor = "#f3f4f6";
926
928
  },
927
929
  onMouseLeave: (e) => {
928
- e.currentTarget.style.backgroundColor = "#fff";
930
+ e.currentTarget.style.backgroundColor = "";
929
931
  },
930
932
  style: {
931
933
  position: "fixed",
@@ -937,7 +939,7 @@ function StaffSidebar({
937
939
  borderRadius: "0 6px 6px 0",
938
940
  border: "1px solid var(--color-border-colors-neutral, #c8cedd)",
939
941
  borderLeft: "none",
940
- background: "#fff",
942
+ background: "var(--gov-bg-surface, #fff)",
941
943
  cursor: "pointer",
942
944
  display: "flex",
943
945
  alignItems: "center",
@@ -956,7 +958,7 @@ function BellIcon2() {
956
958
  "path",
957
959
  {
958
960
  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",
959
- fill: "var(--color-alias-color-brand-text-dark, #05010e)"
961
+ fill: "var(--gov-text-primary, #05010e)"
960
962
  }
961
963
  ) });
962
964
  }
@@ -965,7 +967,7 @@ function HamburgerIcon() {
965
967
  "path",
966
968
  {
967
969
  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",
968
- fill: "var(--color-alias-color-brand-text-dark, #05010e)"
970
+ fill: "var(--gov-text-primary, #05010e)"
969
971
  }
970
972
  ) });
971
973
  }
@@ -1017,7 +1019,7 @@ function UserHeader({
1017
1019
  {
1018
1020
  className,
1019
1021
  style: {
1020
- background: "#fff",
1022
+ background: "var(--gov-bg-surface, #fff)",
1021
1023
  boxShadow: "0 1px 3px rgba(0,0,0,0.08)",
1022
1024
  position: "sticky",
1023
1025
  top: 0,
@@ -1075,7 +1077,7 @@ function UserHeader({
1075
1077
  style: {
1076
1078
  fontSize: "14px",
1077
1079
  fontWeight: 600,
1078
- color: "var(--color-alias-color-brand-text-dark, #05010e)",
1080
+ color: "var(--gov-text-primary, #05010e)",
1079
1081
  margin: 0
1080
1082
  },
1081
1083
  children: [
@@ -1147,12 +1149,12 @@ function UserHeader({
1147
1149
  right: 0,
1148
1150
  marginTop: "8px",
1149
1151
  width: "360px",
1150
- background: "#fff",
1152
+ background: "var(--gov-bg-surface, #fff)",
1151
1153
  borderRadius: "12px",
1152
1154
  boxShadow: "0 10px 40px rgba(0,0,0,0.12)",
1153
1155
  zIndex: 50,
1154
1156
  overflow: "hidden",
1155
- border: "1px solid #e5e7eb"
1157
+ border: "1px solid var(--color-border-colors-neutral, #e5e7eb)"
1156
1158
  },
1157
1159
  children: [
1158
1160
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1164,10 +1166,10 @@ function UserHeader({
1164
1166
  display: "flex",
1165
1167
  alignItems: "center",
1166
1168
  justifyContent: "space-between",
1167
- background: "#fafafa"
1169
+ background: "var(--gov-bg-surface, #fff)"
1168
1170
  },
1169
1171
  children: [
1170
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 600, fontSize: "14px", color: "#111" }, children: "\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19" }),
1172
+ /* @__PURE__ */ jsxRuntime.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" }),
1171
1173
  onMarkAllRead && /* @__PURE__ */ jsxRuntime.jsx(
1172
1174
  "button",
1173
1175
  {
@@ -1256,7 +1258,7 @@ function UserHeader({
1256
1258
  style: {
1257
1259
  fontSize: "13px",
1258
1260
  fontWeight: !item.isRead ? 600 : 500,
1259
- color: "#111",
1261
+ color: "var(--gov-text-primary, #05010e)",
1260
1262
  margin: "0 0 2px"
1261
1263
  },
1262
1264
  children: item.title
@@ -1298,7 +1300,7 @@ function UserHeader({
1298
1300
  padding: "10px",
1299
1301
  borderTop: "1px solid #f3f4f6",
1300
1302
  textAlign: "center",
1301
- background: "#fafafa"
1303
+ background: "var(--gov-bg-surface, #fff)"
1302
1304
  },
1303
1305
  children: /* @__PURE__ */ jsxRuntime.jsx(
1304
1306
  "button",
@@ -1421,7 +1423,7 @@ function UserSidebar({
1421
1423
  height: "100%",
1422
1424
  width: "80vw",
1423
1425
  maxWidth: "320px",
1424
- background: "#fff",
1426
+ background: "var(--gov-bg-surface, #fff)",
1425
1427
  boxShadow: "-4px 0 24px rgba(0,0,0,0.12)",
1426
1428
  zIndex: 50,
1427
1429
  transform: isOpen ? "translateX(0)" : "translateX(100%)",