gov-layout 1.2.29 → 1.3.1

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/README.md CHANGED
@@ -222,7 +222,6 @@ const menuItems: MenuItem[] = [
222
222
  - ✅ Default ตั้งค่าระบบ + ช่วยเหลือ (override ได้)
223
223
  - ✅ โปรไฟล์ + ออกจากระบบ ล่างสุดเสมอ
224
224
  - ✅ `dividerAfter` เส้นคั่นระหว่างกลุ่ม
225
- - ✅ แสดง Avatar Icon อัตโนมัติกรณีผู้ใช้ไม่มีรูปโปรไฟล์ (v1.2.28+) 🆕
226
225
 
227
226
  ---
228
227
 
package/dist/index.js CHANGED
@@ -641,9 +641,7 @@ function SidebarUserProfile({
641
641
  return user.firstName || user.lastName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49";
642
642
  };
643
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";
644
+ return user.firstName?.charAt(0) || user.lastName?.charAt(0) || "?";
647
645
  };
648
646
  if (collapsed) {
649
647
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
@@ -660,7 +658,7 @@ function SidebarUserProfile({
660
658
  onClick: onProfile,
661
659
  title: onProfile ? "\u0E14\u0E39\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C" : getFullName(),
662
660
  style: { cursor: onProfile ? "pointer" : "default" },
663
- children: user.pictureUrl && !user.pictureUrl.startsWith("/") ? /* @__PURE__ */ jsxRuntime.jsx(
661
+ children: user.pictureUrl ? /* @__PURE__ */ jsxRuntime.jsx(
664
662
  "img",
665
663
  {
666
664
  src: user.pictureUrl,
@@ -779,7 +777,7 @@ function SidebarUserProfile({
779
777
  transition: "opacity 0.15s ease"
780
778
  },
781
779
  children: [
782
- user.pictureUrl && !user.pictureUrl.startsWith("/") ? /* @__PURE__ */ jsxRuntime.jsx(
780
+ user.pictureUrl ? /* @__PURE__ */ jsxRuntime.jsx(
783
781
  "img",
784
782
  {
785
783
  src: user.pictureUrl,