gov-layout 1.2.6 → 1.2.9

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
@@ -1491,7 +1491,7 @@ function LogoutIcon2() {
1491
1491
  ] });
1492
1492
  }
1493
1493
  function ProfileIcon2() {
1494
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1494
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
1495
1495
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
1496
1496
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "7", r: "4" })
1497
1497
  ] });
@@ -1567,162 +1567,117 @@ function UserSidebar({
1567
1567
  flexDirection: "column"
1568
1568
  },
1569
1569
  children: [
1570
- user && /* @__PURE__ */ jsxRuntime.jsxs(
1570
+ user && /* @__PURE__ */ jsxRuntime.jsx(
1571
1571
  "div",
1572
1572
  {
1573
1573
  style: {
1574
1574
  padding: "20px",
1575
1575
  borderBottom: "1px solid var(--color-border-colors-neutral, #e5e7eb)"
1576
1576
  },
1577
- children: [
1578
- /* @__PURE__ */ jsxRuntime.jsxs(
1579
- "div",
1580
- {
1581
- onClick: () => {
1582
- if (onProfile) {
1583
- onProfile();
1584
- onClose();
1577
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1578
+ "div",
1579
+ {
1580
+ style: {
1581
+ display: "flex",
1582
+ alignItems: "center",
1583
+ gap: "12px",
1584
+ padding: "8px"
1585
+ },
1586
+ children: [
1587
+ user.pictureUrl ? /* @__PURE__ */ jsxRuntime.jsx(
1588
+ "img",
1589
+ {
1590
+ src: user.pictureUrl,
1591
+ alt: getFullName(),
1592
+ style: {
1593
+ width: "56px",
1594
+ height: "56px",
1595
+ borderRadius: "50%",
1596
+ objectFit: "cover",
1597
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
1598
+ }
1585
1599
  }
1586
- },
1587
- onMouseEnter: (e) => {
1588
- if (onProfile) e.currentTarget.style.backgroundColor = "var(--color-alias-color-brand-surface, #f0fdf4)";
1589
- },
1590
- onMouseLeave: (e) => {
1591
- if (onProfile) e.currentTarget.style.backgroundColor = "transparent";
1592
- },
1593
- style: {
1594
- display: "flex",
1595
- alignItems: "center",
1596
- gap: "12px",
1597
- cursor: onProfile ? "pointer" : "default",
1598
- padding: "8px",
1599
- borderRadius: "12px",
1600
- transition: "background-color 0.15s ease"
1601
- },
1602
- children: [
1603
- user.pictureUrl ? /* @__PURE__ */ jsxRuntime.jsx(
1604
- "img",
1600
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1601
+ "div",
1602
+ {
1603
+ style: {
1604
+ width: "56px",
1605
+ height: "56px",
1606
+ borderRadius: "50%",
1607
+ background: "linear-gradient(135deg, var(--color-alias-color-brand-secondary, #80d897), var(--color-alias-color-brand-primary, #1e7d55))",
1608
+ display: "flex",
1609
+ alignItems: "center",
1610
+ justifyContent: "center",
1611
+ color: "#fff",
1612
+ fontWeight: 700,
1613
+ fontSize: "20px",
1614
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
1615
+ },
1616
+ children: getInitial()
1617
+ }
1618
+ ),
1619
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1620
+ /* @__PURE__ */ jsxRuntime.jsx(
1621
+ "p",
1605
1622
  {
1606
- src: user.pictureUrl,
1607
- alt: getFullName(),
1608
1623
  style: {
1609
- width: "56px",
1610
- height: "56px",
1611
- borderRadius: "50%",
1612
- objectFit: "cover",
1613
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
1614
- }
1624
+ fontWeight: 700,
1625
+ fontSize: "16px",
1626
+ color: "var(--color-alias-text-colors-primary, #060d26)",
1627
+ margin: 0,
1628
+ overflow: "hidden",
1629
+ textOverflow: "ellipsis",
1630
+ whiteSpace: "nowrap"
1631
+ },
1632
+ children: getFullName()
1615
1633
  }
1616
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1617
- "div",
1634
+ ),
1635
+ /* @__PURE__ */ jsxRuntime.jsxs(
1636
+ "p",
1618
1637
  {
1619
1638
  style: {
1620
- width: "56px",
1621
- height: "56px",
1622
- borderRadius: "50%",
1623
- background: "linear-gradient(135deg, var(--color-alias-color-brand-secondary, #80d897), var(--color-alias-color-brand-primary, #1e7d55))",
1639
+ fontSize: "13px",
1640
+ color: "var(--color-alias-text-colors-tertiary, #6b7280)",
1641
+ margin: "2px 0 0",
1624
1642
  display: "flex",
1625
1643
  alignItems: "center",
1626
- justifyContent: "center",
1627
- color: "#fff",
1628
- fontWeight: 700,
1629
- fontSize: "20px",
1630
- boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
1644
+ gap: "6px"
1631
1645
  },
1632
- children: getInitial()
1633
- }
1634
- ),
1635
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1636
- /* @__PURE__ */ jsxRuntime.jsx(
1637
- "p",
1638
- {
1639
- style: {
1640
- fontWeight: 700,
1641
- fontSize: "16px",
1642
- color: "var(--color-alias-text-colors-primary, #060d26)",
1643
- margin: 0,
1644
- overflow: "hidden",
1645
- textOverflow: "ellipsis",
1646
- whiteSpace: "nowrap"
1647
- },
1648
- children: getFullName()
1649
- }
1650
- ),
1651
- /* @__PURE__ */ jsxRuntime.jsxs(
1652
- "p",
1653
- {
1654
- style: {
1655
- fontSize: "13px",
1656
- color: "var(--color-alias-text-colors-tertiary, #6b7280)",
1657
- margin: "2px 0 0",
1658
- display: "flex",
1659
- alignItems: "center",
1660
- gap: "6px"
1661
- },
1662
- children: [
1663
- /* @__PURE__ */ jsxRuntime.jsx(
1664
- "span",
1665
- {
1666
- style: {
1667
- width: "8px",
1668
- height: "8px",
1669
- borderRadius: "50%",
1670
- background: roleColor,
1671
- display: "inline-block"
1672
- }
1646
+ children: [
1647
+ /* @__PURE__ */ jsxRuntime.jsx(
1648
+ "span",
1649
+ {
1650
+ style: {
1651
+ width: "8px",
1652
+ height: "8px",
1653
+ borderRadius: "50%",
1654
+ background: roleColor,
1655
+ display: "inline-block"
1673
1656
  }
1674
- ),
1675
- roleLabel
1676
- ]
1677
- }
1678
- )
1679
- ] })
1680
- ]
1681
- }
1682
- ),
1683
- onProfile && /* @__PURE__ */ jsxRuntime.jsxs(
1684
- "button",
1685
- {
1686
- onClick: () => {
1687
- onProfile();
1688
- onClose();
1689
- },
1690
- onMouseEnter: (e) => {
1691
- e.currentTarget.style.backgroundColor = "var(--color-alias-color-brand-surface, #f0fdf4)";
1692
- },
1693
- onMouseLeave: (e) => {
1694
- e.currentTarget.style.backgroundColor = "transparent";
1695
- },
1696
- style: {
1697
- width: "100%",
1698
- display: "flex",
1699
- alignItems: "center",
1700
- gap: "12px",
1701
- padding: "10px 12px",
1702
- marginTop: "8px",
1703
- borderRadius: "8px",
1704
- border: "none",
1705
- background: "transparent",
1706
- color: "var(--color-alias-color-brand-primary, #1e7d55)",
1707
- cursor: "pointer",
1708
- transition: "background-color 0.15s ease",
1709
- fontSize: "14px",
1710
- fontWeight: 500
1711
- },
1712
- children: [
1713
- /* @__PURE__ */ jsxRuntime.jsx(ProfileIcon2, {}),
1714
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19" })
1715
- ]
1716
- }
1717
- )
1718
- ]
1657
+ }
1658
+ ),
1659
+ roleLabel
1660
+ ]
1661
+ }
1662
+ )
1663
+ ] })
1664
+ ]
1665
+ }
1666
+ )
1719
1667
  }
1720
1668
  ),
1721
1669
  /* @__PURE__ */ jsxRuntime.jsx(
1722
1670
  SidebarMenu,
1723
1671
  {
1724
- menuItems,
1725
- onItemClick: handleMenuClick
1672
+ menuItems: onProfile ? [{ id: "__profile__", title: "\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C", icon: /* @__PURE__ */ jsxRuntime.jsx(ProfileIcon2, {}), path: "__profile__" }, ...menuItems] : menuItems,
1673
+ onItemClick: (path) => {
1674
+ if (path === "__profile__" && onProfile) {
1675
+ onProfile();
1676
+ onClose();
1677
+ } else {
1678
+ handleMenuClick(path);
1679
+ }
1680
+ }
1726
1681
  }
1727
1682
  ),
1728
1683
  /* @__PURE__ */ jsxRuntime.jsx(