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