@designa8/vibedesign-v6 1.10.2 → 1.10.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @plasma/vibedesign-v6
2
2
 
3
- Generated design system, version **1.10.2**.
3
+ Generated design system, version **1.10.4**.
4
4
 
5
5
  ## Local install (npm link)
6
6
 
package/dist/index.cjs CHANGED
@@ -2734,6 +2734,18 @@ var SidebarIcon = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", {
2734
2734
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
2735
2735
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "9", y1: "3", x2: "9", y2: "21" })
2736
2736
  ] });
2737
+ var SunIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, children: [
2738
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "12", cy: "12", r: "5" }),
2739
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
2740
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
2741
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }),
2742
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }),
2743
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "1", y1: "12", x2: "3", y2: "12" }),
2744
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "21", y1: "12", x2: "23", y2: "12" }),
2745
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
2746
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })
2747
+ ] });
2748
+ var MoonIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
2737
2749
  var AppSidebar = import_react10.default.forwardRef(
2738
2750
  ({
2739
2751
  brandName,
@@ -2748,6 +2760,9 @@ var AppSidebar = import_react10.default.forwardRef(
2748
2760
  showUpgradeCard = false,
2749
2761
  userInitials,
2750
2762
  onInboxClick,
2763
+ // dark mode toggle
2764
+ darkMode = false,
2765
+ onDarkModeToggle,
2751
2766
  // legacy compat
2752
2767
  activeItem,
2753
2768
  collapsed: collapsedProp,
@@ -2776,7 +2791,7 @@ var AppSidebar = import_react10.default.forwardRef(
2776
2791
  const resolvedActiveId = activeId ?? activeItem ?? "";
2777
2792
  const hasEntries = entries && entries.length > 0;
2778
2793
  const hasFooterPromoContent = showShareCard || showUpgradeCard;
2779
- const hasFooterBottomContent = !!(userInitials || onInboxClick);
2794
+ const hasFooterBottomContent = !!(userInitials || onInboxClick || onDarkModeToggle);
2780
2795
  const hasFooterContent = hasFooterPromoContent || hasFooterBottomContent;
2781
2796
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2782
2797
  "nav",
@@ -2909,7 +2924,7 @@ var AppSidebar = import_react10.default.forwardRef(
2909
2924
  {
2910
2925
  className: [
2911
2926
  "flex items-center pt-xs transition-all duration-300",
2912
- collapsed ? "justify-center" : "justify-between"
2927
+ collapsed ? "justify-center flex-col gap-xs" : "justify-between"
2913
2928
  ].join(" "),
2914
2929
  children: [
2915
2930
  userInitials && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -2948,6 +2963,17 @@ var AppSidebar = import_react10.default.forwardRef(
2948
2963
  }
2949
2964
  )
2950
2965
  }
2966
+ ),
2967
+ onDarkModeToggle && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2968
+ Button,
2969
+ {
2970
+ variant: "ghost",
2971
+ size: "sm",
2972
+ "aria-label": darkMode ? "Switch to light mode" : "Switch to dark mode",
2973
+ onClick: onDarkModeToggle,
2974
+ className: "!p-xs !rounded-sm flex-shrink-0",
2975
+ children: darkMode ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SunIcon2, {}) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MoonIcon2, {})
2976
+ }
2951
2977
  )
2952
2978
  ]
2953
2979
  }
@@ -2988,7 +3014,7 @@ var InboxIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { v
2988
3014
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12" }),
2989
3015
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" })
2990
3016
  ] });
2991
- var SunIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: [
3017
+ var SunIcon3 = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: [
2992
3018
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "12", cy: "12", r: "5" }),
2993
3019
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
2994
3020
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
@@ -2999,7 +3025,7 @@ var SunIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { vie
2999
3025
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
3000
3026
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })
3001
3027
  ] });
3002
- var MoonIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
3028
+ var MoonIcon3 = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
3003
3029
  var AppSidebarMobile = import_react11.default.forwardRef(
3004
3030
  ({
3005
3031
  brandName = "Atoms",
@@ -3230,7 +3256,7 @@ var AppSidebarMobile = import_react11.default.forwardRef(
3230
3256
  "aria-label": darkMode ? "Switch to light mode" : "Switch to dark mode",
3231
3257
  onClick: onDarkModeToggle,
3232
3258
  className: "!p-xs !rounded-sm",
3233
- children: darkMode ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SunIcon2, {}) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MoonIcon2, {})
3259
+ children: darkMode ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SunIcon3, {}) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MoonIcon3, {})
3234
3260
  }
3235
3261
  ),
3236
3262
  onInboxClick && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
@@ -3801,6 +3827,8 @@ var HomePageTemplate = import_react16.default.forwardRef(
3801
3827
  onSelect,
3802
3828
  activeSubId,
3803
3829
  onSubSelect,
3830
+ darkMode,
3831
+ onDarkModeToggle,
3804
3832
  className,
3805
3833
  style
3806
3834
  }, ref) => {
@@ -3847,6 +3875,8 @@ var HomePageTemplate = import_react16.default.forwardRef(
3847
3875
  userInitials,
3848
3876
  onInboxClick: () => {
3849
3877
  },
3878
+ darkMode,
3879
+ onDarkModeToggle,
3850
3880
  style: { height: "100%" }
3851
3881
  }
3852
3882
  ) }),
@@ -3879,7 +3909,9 @@ var HomePageTemplate = import_react16.default.forwardRef(
3879
3909
  showUpgradeCard: true,
3880
3910
  userInitials,
3881
3911
  onInboxClick: () => {
3882
- }
3912
+ },
3913
+ darkMode,
3914
+ onDarkModeToggle
3883
3915
  }
3884
3916
  ),
3885
3917
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-xs", children: [
@@ -4108,7 +4140,7 @@ var InspectIcon = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", {
4108
4140
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M12 8v4l3 3" }),
4109
4141
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
4110
4142
  ] });
4111
- var MoonIcon3 = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
4143
+ var MoonIcon4 = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
4112
4144
  var FullscreenIcon = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4113
4145
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("polyline", { points: "15 3 21 3 21 9" }),
4114
4146
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("polyline", { points: "9 21 3 21 3 15" }),
@@ -4225,7 +4257,7 @@ var PreviewToolbar = import_react18.default.forwardRef(
4225
4257
  onClick: onDarkToggle,
4226
4258
  className: "gap-xs rounded-xl",
4227
4259
  children: [
4228
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MoonIcon3, {}),
4260
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MoonIcon4, {}),
4229
4261
  "Dark"
4230
4262
  ]
4231
4263
  }
package/dist/index.js CHANGED
@@ -2683,6 +2683,18 @@ var SidebarIcon = () => /* @__PURE__ */ jsxs10("svg", { viewBox: "0 0 24 24", fi
2683
2683
  /* @__PURE__ */ jsx10("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
2684
2684
  /* @__PURE__ */ jsx10("line", { x1: "9", y1: "3", x2: "9", y2: "21" })
2685
2685
  ] });
2686
+ var SunIcon2 = () => /* @__PURE__ */ jsxs10("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, children: [
2687
+ /* @__PURE__ */ jsx10("circle", { cx: "12", cy: "12", r: "5" }),
2688
+ /* @__PURE__ */ jsx10("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
2689
+ /* @__PURE__ */ jsx10("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
2690
+ /* @__PURE__ */ jsx10("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }),
2691
+ /* @__PURE__ */ jsx10("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }),
2692
+ /* @__PURE__ */ jsx10("line", { x1: "1", y1: "12", x2: "3", y2: "12" }),
2693
+ /* @__PURE__ */ jsx10("line", { x1: "21", y1: "12", x2: "23", y2: "12" }),
2694
+ /* @__PURE__ */ jsx10("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
2695
+ /* @__PURE__ */ jsx10("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })
2696
+ ] });
2697
+ var MoonIcon2 = () => /* @__PURE__ */ jsx10("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, children: /* @__PURE__ */ jsx10("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
2686
2698
  var AppSidebar = React10.forwardRef(
2687
2699
  ({
2688
2700
  brandName,
@@ -2697,6 +2709,9 @@ var AppSidebar = React10.forwardRef(
2697
2709
  showUpgradeCard = false,
2698
2710
  userInitials,
2699
2711
  onInboxClick,
2712
+ // dark mode toggle
2713
+ darkMode = false,
2714
+ onDarkModeToggle,
2700
2715
  // legacy compat
2701
2716
  activeItem,
2702
2717
  collapsed: collapsedProp,
@@ -2725,7 +2740,7 @@ var AppSidebar = React10.forwardRef(
2725
2740
  const resolvedActiveId = activeId ?? activeItem ?? "";
2726
2741
  const hasEntries = entries && entries.length > 0;
2727
2742
  const hasFooterPromoContent = showShareCard || showUpgradeCard;
2728
- const hasFooterBottomContent = !!(userInitials || onInboxClick);
2743
+ const hasFooterBottomContent = !!(userInitials || onInboxClick || onDarkModeToggle);
2729
2744
  const hasFooterContent = hasFooterPromoContent || hasFooterBottomContent;
2730
2745
  return /* @__PURE__ */ jsxs10(
2731
2746
  "nav",
@@ -2858,7 +2873,7 @@ var AppSidebar = React10.forwardRef(
2858
2873
  {
2859
2874
  className: [
2860
2875
  "flex items-center pt-xs transition-all duration-300",
2861
- collapsed ? "justify-center" : "justify-between"
2876
+ collapsed ? "justify-center flex-col gap-xs" : "justify-between"
2862
2877
  ].join(" "),
2863
2878
  children: [
2864
2879
  userInitials && /* @__PURE__ */ jsx10(
@@ -2897,6 +2912,17 @@ var AppSidebar = React10.forwardRef(
2897
2912
  }
2898
2913
  )
2899
2914
  }
2915
+ ),
2916
+ onDarkModeToggle && /* @__PURE__ */ jsx10(
2917
+ Button,
2918
+ {
2919
+ variant: "ghost",
2920
+ size: "sm",
2921
+ "aria-label": darkMode ? "Switch to light mode" : "Switch to dark mode",
2922
+ onClick: onDarkModeToggle,
2923
+ className: "!p-xs !rounded-sm flex-shrink-0",
2924
+ children: darkMode ? /* @__PURE__ */ jsx10(SunIcon2, {}) : /* @__PURE__ */ jsx10(MoonIcon2, {})
2925
+ }
2900
2926
  )
2901
2927
  ]
2902
2928
  }
@@ -2937,7 +2963,7 @@ var InboxIcon2 = () => /* @__PURE__ */ jsxs11("svg", { viewBox: "0 0 24 24", fil
2937
2963
  /* @__PURE__ */ jsx11("polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12" }),
2938
2964
  /* @__PURE__ */ jsx11("path", { d: "M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" })
2939
2965
  ] });
2940
- var SunIcon2 = () => /* @__PURE__ */ jsxs11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: [
2966
+ var SunIcon3 = () => /* @__PURE__ */ jsxs11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: [
2941
2967
  /* @__PURE__ */ jsx11("circle", { cx: "12", cy: "12", r: "5" }),
2942
2968
  /* @__PURE__ */ jsx11("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
2943
2969
  /* @__PURE__ */ jsx11("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
@@ -2948,7 +2974,7 @@ var SunIcon2 = () => /* @__PURE__ */ jsxs11("svg", { viewBox: "0 0 24 24", fill:
2948
2974
  /* @__PURE__ */ jsx11("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
2949
2975
  /* @__PURE__ */ jsx11("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })
2950
2976
  ] });
2951
- var MoonIcon2 = () => /* @__PURE__ */ jsx11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx11("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
2977
+ var MoonIcon3 = () => /* @__PURE__ */ jsx11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "18px", height: "18px" }, "aria-hidden": "true", children: /* @__PURE__ */ jsx11("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
2952
2978
  var AppSidebarMobile = React11.forwardRef(
2953
2979
  ({
2954
2980
  brandName = "Atoms",
@@ -3179,7 +3205,7 @@ var AppSidebarMobile = React11.forwardRef(
3179
3205
  "aria-label": darkMode ? "Switch to light mode" : "Switch to dark mode",
3180
3206
  onClick: onDarkModeToggle,
3181
3207
  className: "!p-xs !rounded-sm",
3182
- children: darkMode ? /* @__PURE__ */ jsx11(SunIcon2, {}) : /* @__PURE__ */ jsx11(MoonIcon2, {})
3208
+ children: darkMode ? /* @__PURE__ */ jsx11(SunIcon3, {}) : /* @__PURE__ */ jsx11(MoonIcon3, {})
3183
3209
  }
3184
3210
  ),
3185
3211
  onInboxClick && /* @__PURE__ */ jsxs11(
@@ -3750,6 +3776,8 @@ var HomePageTemplate = React16.forwardRef(
3750
3776
  onSelect,
3751
3777
  activeSubId,
3752
3778
  onSubSelect,
3779
+ darkMode,
3780
+ onDarkModeToggle,
3753
3781
  className,
3754
3782
  style
3755
3783
  }, ref) => {
@@ -3796,6 +3824,8 @@ var HomePageTemplate = React16.forwardRef(
3796
3824
  userInitials,
3797
3825
  onInboxClick: () => {
3798
3826
  },
3827
+ darkMode,
3828
+ onDarkModeToggle,
3799
3829
  style: { height: "100%" }
3800
3830
  }
3801
3831
  ) }),
@@ -3828,7 +3858,9 @@ var HomePageTemplate = React16.forwardRef(
3828
3858
  showUpgradeCard: true,
3829
3859
  userInitials,
3830
3860
  onInboxClick: () => {
3831
- }
3861
+ },
3862
+ darkMode,
3863
+ onDarkModeToggle
3832
3864
  }
3833
3865
  ),
3834
3866
  /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-xs", children: [
@@ -4057,7 +4089,7 @@ var InspectIcon = () => /* @__PURE__ */ jsxs18("svg", { width: "15", height: "15
4057
4089
  /* @__PURE__ */ jsx18("path", { d: "M12 8v4l3 3" }),
4058
4090
  /* @__PURE__ */ jsx18("circle", { cx: "12", cy: "12", r: "1", fill: "currentColor", stroke: "none" })
4059
4091
  ] });
4060
- var MoonIcon3 = () => /* @__PURE__ */ jsx18("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
4092
+ var MoonIcon4 = () => /* @__PURE__ */ jsx18("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) });
4061
4093
  var FullscreenIcon = () => /* @__PURE__ */ jsxs18("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4062
4094
  /* @__PURE__ */ jsx18("polyline", { points: "15 3 21 3 21 9" }),
4063
4095
  /* @__PURE__ */ jsx18("polyline", { points: "9 21 3 21 3 15" }),
@@ -4174,7 +4206,7 @@ var PreviewToolbar = React18.forwardRef(
4174
4206
  onClick: onDarkToggle,
4175
4207
  className: "gap-xs rounded-xl",
4176
4208
  children: [
4177
- /* @__PURE__ */ jsx18(MoonIcon3, {}),
4209
+ /* @__PURE__ */ jsx18(MoonIcon4, {}),
4178
4210
  "Dark"
4179
4211
  ]
4180
4212
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-v6",
3
- "version": "1.10.2",
3
+ "version": "1.10.4",
4
4
  "description": "Design system \"Plasma Design System\" generated by atom-server.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -39,6 +39,26 @@ const SidebarIcon = () => (
39
39
  </svg>
40
40
  );
41
41
 
42
+ const SunIcon = () => (
43
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" style={{ width: "18px", height: "18px" }}>
44
+ <circle cx="12" cy="12" r="5" />
45
+ <line x1="12" y1="1" x2="12" y2="3" />
46
+ <line x1="12" y1="21" x2="12" y2="23" />
47
+ <line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
48
+ <line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
49
+ <line x1="1" y1="12" x2="3" y2="12" />
50
+ <line x1="21" y1="12" x2="23" y2="12" />
51
+ <line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
52
+ <line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
53
+ </svg>
54
+ );
55
+
56
+ const MoonIcon = () => (
57
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" style={{ width: "18px", height: "18px" }}>
58
+ <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
59
+ </svg>
60
+ );
61
+
42
62
  /* ─── Types ──────────────────────────────────────────────────────────────── */
43
63
 
44
64
  export interface NavSubItem {
@@ -114,6 +134,21 @@ export interface AppSidebarProps extends React.HTMLAttributes<HTMLElement> {
114
134
  */
115
135
  onInboxClick?: () => void;
116
136
 
137
+ // ── Dark mode toggle ─────────────────────────────────────────────────────
138
+
139
+ /**
140
+ * Whether dark mode is currently active. Controls which icon is shown
141
+ * (sun = dark mode on, moon = dark mode off).
142
+ */
143
+ darkMode?: boolean;
144
+
145
+ /**
146
+ * When provided, renders a dark/light mode toggle button in the footer row
147
+ * (last item, after the inbox button). Calls this when the user clicks it.
148
+ * If omitted the toggle button is not shown.
149
+ */
150
+ onDarkModeToggle?: () => void;
151
+
117
152
  // ── Legacy / backwards-compatible props ──────────────────────────────────
118
153
 
119
154
  /** @deprecated Use activeId instead. */
@@ -146,6 +181,9 @@ export const AppSidebar = React.forwardRef<HTMLElement, AppSidebarProps>(
146
181
  showUpgradeCard = false,
147
182
  userInitials,
148
183
  onInboxClick,
184
+ // dark mode toggle
185
+ darkMode = false,
186
+ onDarkModeToggle,
149
187
  // legacy compat
150
188
  activeItem,
151
189
  collapsed: collapsedProp,
@@ -186,7 +224,7 @@ export const AppSidebar = React.forwardRef<HTMLElement, AppSidebarProps>(
186
224
 
187
225
  /* ── Footer visibility ── */
188
226
  const hasFooterPromoContent = showShareCard || showUpgradeCard;
189
- const hasFooterBottomContent = !!(userInitials || onInboxClick);
227
+ const hasFooterBottomContent = !!(userInitials || onInboxClick || onDarkModeToggle);
190
228
  const hasFooterContent = hasFooterPromoContent || hasFooterBottomContent;
191
229
 
192
230
  return (
@@ -346,12 +384,12 @@ export const AppSidebar = React.forwardRef<HTMLElement, AppSidebarProps>(
346
384
  </div>
347
385
  )}
348
386
 
349
- {/* Bottom bar: user avatar + inbox — only when at least one is provided */}
387
+ {/* Bottom bar: user avatar + inbox + dark mode toggle */}
350
388
  {hasFooterBottomContent && (
351
389
  <div
352
390
  className={[
353
391
  "flex items-center pt-xs transition-all duration-300",
354
- collapsed ? "justify-center" : "justify-between",
392
+ collapsed ? "justify-center flex-col gap-xs" : "justify-between",
355
393
  ].join(" ")}
356
394
  >
357
395
  {/* User avatar — only when userInitials provided */}
@@ -387,6 +425,19 @@ export const AppSidebar = React.forwardRef<HTMLElement, AppSidebarProps>(
387
425
  </Button>
388
426
  </div>
389
427
  )}
428
+
429
+ {/* Dark mode toggle — only when onDarkModeToggle provided */}
430
+ {onDarkModeToggle && (
431
+ <Button
432
+ variant="ghost"
433
+ size="sm"
434
+ aria-label={darkMode ? "Switch to light mode" : "Switch to dark mode"}
435
+ onClick={onDarkModeToggle}
436
+ className="!p-xs !rounded-sm flex-shrink-0"
437
+ >
438
+ {darkMode ? <SunIcon /> : <MoonIcon />}
439
+ </Button>
440
+ )}
390
441
  </div>
391
442
  )}
392
443
  </div>
@@ -45,12 +45,13 @@ const SubFileIcon = () => (
45
45
  </svg>
46
46
  );
47
47
 
48
- /* ─── Scenario A: Full sidebar with deletable sub-items ─────────────────── */
48
+ /* ─── Scenario A: Full sidebar with dark mode toggle ────────────────────── */
49
49
 
50
50
  function FullSidebarDemo() {
51
51
  const [collapsed, setCollapsed] = React.useState(false);
52
52
  const [activeId, setActiveId] = React.useState("projects");
53
53
  const [activeSubId, setActiveSubId] = React.useState<string | undefined>("proj-alpha");
54
+ const [darkMode, setDarkMode] = React.useState(false);
54
55
  const [subItems, setSubItems] = React.useState([
55
56
  { id: "proj-alpha", label: "Alpha", icon: <SubFileIcon /> },
56
57
  { id: "proj-beta", label: "Beta", icon: <SubFileIcon /> },
@@ -78,7 +79,7 @@ function FullSidebarDemo() {
78
79
  return (
79
80
  <div>
80
81
  <p className="text-caption text-muted mb-sm">
81
- Full footer · deletable sub-items (hover a project row to reveal the trash icon)
82
+ Full footer · deletable sub-items · dark mode toggle (moon/sun icon, last in footer row)
82
83
  </p>
83
84
  <div
84
85
  className="relative flex bg-canvas rounded-xl border border-hairline shadow-card overflow-hidden"
@@ -97,12 +98,14 @@ function FullSidebarDemo() {
97
98
  showShareCard
98
99
  showUpgradeCard
99
100
  userInitials="O"
100
- onInboxClick={() => alert("Inbox clicked")}
101
+ onInboxClick={() => {}}
102
+ darkMode={darkMode}
103
+ onDarkModeToggle={() => setDarkMode((d) => !d)}
101
104
  />
102
105
 
103
106
  <div className="flex-1 flex flex-col items-center justify-center bg-surface-soft gap-md p-xl">
104
107
  <p className="text-body-sm text-muted text-center">
105
- {collapsed ? "Sidebar collapsed" : "Sidebar expanded"}
108
+ {collapsed ? "Sidebar collapsed" : "Sidebar expanded"} · {darkMode ? "Dark mode on" : "Dark mode off"}
106
109
  </p>
107
110
  <p className="text-caption text-muted-soft text-center">
108
111
  Active: <strong>{activeId}</strong>
@@ -166,9 +169,10 @@ function MinimalSidebarDemo() {
166
169
  );
167
170
  }
168
171
 
169
- /* ─── Scenario C: Partial footer — avatar + inbox only ─────────────────── */
172
+ /* ─── Scenario C: Partial footer — avatar + inbox + dark mode toggle only ─ */
170
173
 
171
174
  function PartialFooterDemo() {
175
+ const [darkMode, setDarkMode] = React.useState(false);
172
176
  const entries: NavEntry[] = [
173
177
  { id: "home", label: "Home", icon: <HomeIcon /> },
174
178
  { id: "starred", label: "Starred", icon: <StarIcon /> },
@@ -179,7 +183,7 @@ function PartialFooterDemo() {
179
183
  return (
180
184
  <div>
181
185
  <p className="text-caption text-muted mb-sm">
182
- Partial footer — only user avatar and inbox button (no promo cards)
186
+ Partial footer — user avatar, inbox, and dark mode toggle (no promo cards)
183
187
  </p>
184
188
  <div
185
189
  className="relative flex bg-canvas rounded-xl border border-hairline shadow-card overflow-hidden"
@@ -192,9 +196,11 @@ function PartialFooterDemo() {
192
196
  onSelect={setActiveId}
193
197
  userInitials="AJ"
194
198
  onInboxClick={() => {}}
199
+ darkMode={darkMode}
200
+ onDarkModeToggle={() => setDarkMode((d) => !d)}
195
201
  />
196
202
  <div className="flex-1 flex items-center justify-center bg-surface-soft">
197
- <p className="text-body-sm text-muted">Avatar + inbox only</p>
203
+ <p className="text-body-sm text-muted">{darkMode ? "Dark mode on" : "Dark mode off"}</p>
198
204
  </div>
199
205
  </div>
200
206
  </div>
@@ -93,6 +93,16 @@ export interface HomePageTemplateProps {
93
93
  activeSubId?: string;
94
94
  /** Forwarded to AppSidebar as `onSubSelect`. */
95
95
  onSubSelect?: (id: string) => void;
96
+ /**
97
+ * Whether dark mode is currently active. Forwarded to both AppSidebar and
98
+ * AppSidebarMobile so they can show the correct sun/moon icon.
99
+ */
100
+ darkMode?: boolean;
101
+ /**
102
+ * Called when the user clicks the dark/light mode toggle in either sidebar.
103
+ * Forwarded to both AppSidebar and AppSidebarMobile.
104
+ */
105
+ onDarkModeToggle?: () => void;
96
106
  className?: string;
97
107
  style?: React.CSSProperties;
98
108
  }
@@ -146,6 +156,8 @@ export const HomePageTemplate = React.forwardRef<HTMLDivElement, HomePageTemplat
146
156
  onSelect,
147
157
  activeSubId,
148
158
  onSubSelect,
159
+ darkMode,
160
+ onDarkModeToggle,
149
161
  className,
150
162
  style,
151
163
  },
@@ -204,6 +216,8 @@ export const HomePageTemplate = React.forwardRef<HTMLDivElement, HomePageTemplat
204
216
  showUpgradeCard={true}
205
217
  userInitials={userInitials}
206
218
  onInboxClick={() => {}}
219
+ darkMode={darkMode}
220
+ onDarkModeToggle={onDarkModeToggle}
207
221
  style={{ height: "100%" }}
208
222
  />
209
223
  </div>
@@ -234,6 +248,8 @@ export const HomePageTemplate = React.forwardRef<HTMLDivElement, HomePageTemplat
234
248
  showUpgradeCard={true}
235
249
  userInitials={userInitials}
236
250
  onInboxClick={() => {}}
251
+ darkMode={darkMode}
252
+ onDarkModeToggle={onDarkModeToggle}
237
253
  />
238
254
  <div className="flex items-center gap-xs">
239
255
  <LogoIcon />
@@ -2,6 +2,8 @@ import React from "react";
2
2
  import { HomePageTemplate } from "./HomePageTemplate";
3
3
 
4
4
  export default function Preview() {
5
+ const [darkMode, setDarkMode] = React.useState(false);
6
+
5
7
  return (
6
8
  /* w-full satisfies the linter; the inner style drives the true 100vh fill. */
7
9
  <div className="w-full" style={{ height: "100vh", overflow: "hidden" }}>
@@ -14,6 +16,8 @@ export default function Preview() {
14
16
  "Type scale",
15
17
  "Card molecule",
16
18
  ]}
19
+ darkMode={darkMode}
20
+ onDarkModeToggle={() => setDarkMode((d) => !d)}
17
21
  style={{ width: "100%", height: "100%" }}
18
22
  />
19
23
  </div>