@salesmind-ai/design-system 0.3.4 → 0.3.5

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.
Files changed (197) hide show
  1. package/dist/admin/index.cjs +68 -2928
  2. package/dist/admin/index.cjs.map +1 -1
  3. package/dist/admin/index.js +5 -2915
  4. package/dist/admin/index.js.map +1 -1
  5. package/dist/blog/index.cjs +53 -1064
  6. package/dist/blog/index.cjs.map +1 -1
  7. package/dist/blog/index.js +8 -1054
  8. package/dist/blog/index.js.map +1 -1
  9. package/dist/charts/index.cjs +46 -2694
  10. package/dist/charts/index.cjs.map +1 -1
  11. package/dist/charts/index.js +3 -2680
  12. package/dist/charts/index.js.map +1 -1
  13. package/dist/chunk-2GARWEJK.js +17 -0
  14. package/dist/chunk-2GARWEJK.js.map +1 -0
  15. package/dist/chunk-2KQVZ5FB.js +485 -0
  16. package/dist/chunk-2KQVZ5FB.js.map +1 -0
  17. package/dist/chunk-2ZNR2F2V.cjs +194 -0
  18. package/dist/chunk-2ZNR2F2V.cjs.map +1 -0
  19. package/dist/chunk-3NKRFUAR.js +37 -0
  20. package/dist/chunk-3NKRFUAR.js.map +1 -0
  21. package/dist/chunk-3TGSIILM.cjs +201 -0
  22. package/dist/chunk-3TGSIILM.cjs.map +1 -0
  23. package/dist/chunk-4GM5BGBN.cjs +801 -0
  24. package/dist/chunk-4GM5BGBN.cjs.map +1 -0
  25. package/dist/chunk-5LGDEZWY.cjs +2434 -0
  26. package/dist/chunk-5LGDEZWY.cjs.map +1 -0
  27. package/dist/chunk-6H4DSTXR.js +786 -0
  28. package/dist/chunk-6H4DSTXR.js.map +1 -0
  29. package/dist/chunk-6HKQ5ILL.cjs +1624 -0
  30. package/dist/chunk-6HKQ5ILL.cjs.map +1 -0
  31. package/dist/chunk-6UNG76Y2.js +153 -0
  32. package/dist/chunk-6UNG76Y2.js.map +1 -0
  33. package/dist/chunk-7PX2AZ6Y.js +39 -0
  34. package/dist/chunk-7PX2AZ6Y.js.map +1 -0
  35. package/dist/chunk-B6AVAX4F.js +1415 -0
  36. package/dist/chunk-B6AVAX4F.js.map +1 -0
  37. package/dist/chunk-BILT5KD3.js +264 -0
  38. package/dist/chunk-BILT5KD3.js.map +1 -0
  39. package/dist/chunk-C2BCDNAV.js +24 -0
  40. package/dist/chunk-C2BCDNAV.js.map +1 -0
  41. package/dist/chunk-CH42VPWE.cjs +421 -0
  42. package/dist/chunk-CH42VPWE.cjs.map +1 -0
  43. package/dist/chunk-CJ2MKVAF.cjs +46 -0
  44. package/dist/chunk-CJ2MKVAF.cjs.map +1 -0
  45. package/dist/chunk-DP74LUXG.cjs +98 -0
  46. package/dist/chunk-DP74LUXG.cjs.map +1 -0
  47. package/dist/chunk-E7D6EKJ4.cjs +44 -0
  48. package/dist/chunk-E7D6EKJ4.cjs.map +1 -0
  49. package/dist/chunk-ECXBTUH6.cjs +584 -0
  50. package/dist/chunk-ECXBTUH6.cjs.map +1 -0
  51. package/dist/chunk-EFRAP5ES.js +157 -0
  52. package/dist/chunk-EFRAP5ES.js.map +1 -0
  53. package/dist/chunk-EM7JHRYW.cjs +69 -0
  54. package/dist/chunk-EM7JHRYW.cjs.map +1 -0
  55. package/dist/chunk-FAFAP4L5.js +183 -0
  56. package/dist/chunk-FAFAP4L5.js.map +1 -0
  57. package/dist/chunk-H2Y6BSTL.cjs +69 -0
  58. package/dist/chunk-H2Y6BSTL.cjs.map +1 -0
  59. package/dist/chunk-HN4PHABT.js +126 -0
  60. package/dist/chunk-HN4PHABT.js.map +1 -0
  61. package/dist/chunk-HRENHNDJ.js +211 -0
  62. package/dist/chunk-HRENHNDJ.js.map +1 -0
  63. package/dist/chunk-I75BFEYT.cjs +2561 -0
  64. package/dist/chunk-I75BFEYT.cjs.map +1 -0
  65. package/dist/chunk-IFRATNLU.js +562 -0
  66. package/dist/chunk-IFRATNLU.js.map +1 -0
  67. package/dist/chunk-JNASH4OQ.js +1022 -0
  68. package/dist/chunk-JNASH4OQ.js.map +1 -0
  69. package/dist/chunk-JPJN4YBC.js +409 -0
  70. package/dist/chunk-JPJN4YBC.js.map +1 -0
  71. package/dist/chunk-KCKUSU2M.cjs +166 -0
  72. package/dist/chunk-KCKUSU2M.cjs.map +1 -0
  73. package/dist/chunk-KDLH35OI.cjs +1042 -0
  74. package/dist/chunk-KDLH35OI.cjs.map +1 -0
  75. package/dist/chunk-KJ2OXQF4.js +287 -0
  76. package/dist/chunk-KJ2OXQF4.js.map +1 -0
  77. package/dist/chunk-KK5UO2P4.cjs +717 -0
  78. package/dist/chunk-KK5UO2P4.cjs.map +1 -0
  79. package/dist/chunk-KNQEIU7O.cjs +1202 -0
  80. package/dist/chunk-KNQEIU7O.cjs.map +1 -0
  81. package/dist/chunk-KVGSVGRK.cjs +569 -0
  82. package/dist/chunk-KVGSVGRK.cjs.map +1 -0
  83. package/dist/chunk-L352JRV6.cjs +105 -0
  84. package/dist/chunk-L352JRV6.cjs.map +1 -0
  85. package/dist/chunk-LGNMFBLF.cjs +502 -0
  86. package/dist/chunk-LGNMFBLF.cjs.map +1 -0
  87. package/dist/chunk-LJADZITX.cjs +298 -0
  88. package/dist/chunk-LJADZITX.cjs.map +1 -0
  89. package/dist/chunk-MDB2WCRQ.cjs +137 -0
  90. package/dist/chunk-MDB2WCRQ.cjs.map +1 -0
  91. package/dist/chunk-MQDEE7HC.cjs +283 -0
  92. package/dist/chunk-MQDEE7HC.cjs.map +1 -0
  93. package/dist/chunk-MQRB634A.cjs +34 -0
  94. package/dist/chunk-MQRB634A.cjs.map +1 -0
  95. package/dist/chunk-MU6GW5ZV.js +2317 -0
  96. package/dist/chunk-MU6GW5ZV.js.map +1 -0
  97. package/dist/chunk-NN3TUHIH.js +28 -0
  98. package/dist/chunk-NN3TUHIH.js.map +1 -0
  99. package/dist/chunk-NT4LBP7D.cjs +111 -0
  100. package/dist/chunk-NT4LBP7D.cjs.map +1 -0
  101. package/dist/chunk-OGKGIXFC.cjs +2162 -0
  102. package/dist/chunk-OGKGIXFC.cjs.map +1 -0
  103. package/dist/chunk-OXNXEQY7.js +2538 -0
  104. package/dist/chunk-OXNXEQY7.js.map +1 -0
  105. package/dist/chunk-P5BOFE5A.js +546 -0
  106. package/dist/chunk-P5BOFE5A.js.map +1 -0
  107. package/dist/chunk-PE2KJVRN.js +185 -0
  108. package/dist/chunk-PE2KJVRN.js.map +1 -0
  109. package/dist/chunk-Q2MFGYTE.cjs +1449 -0
  110. package/dist/chunk-Q2MFGYTE.cjs.map +1 -0
  111. package/dist/chunk-Q75DBVDY.cjs +68 -0
  112. package/dist/chunk-Q75DBVDY.cjs.map +1 -0
  113. package/dist/chunk-RQUFZAZ7.js +1608 -0
  114. package/dist/chunk-RQUFZAZ7.js.map +1 -0
  115. package/dist/chunk-SICKWUWB.js +62 -0
  116. package/dist/chunk-SICKWUWB.js.map +1 -0
  117. package/dist/chunk-T343CCH5.js +1190 -0
  118. package/dist/chunk-T343CCH5.js.map +1 -0
  119. package/dist/chunk-T5H5PNLN.js +701 -0
  120. package/dist/chunk-T5H5PNLN.js.map +1 -0
  121. package/dist/chunk-U3LK2GID.js +2122 -0
  122. package/dist/chunk-U3LK2GID.js.map +1 -0
  123. package/dist/chunk-UFAJY2DM.js +62 -0
  124. package/dist/chunk-UFAJY2DM.js.map +1 -0
  125. package/dist/chunk-VC5LMUVQ.cjs +20 -0
  126. package/dist/chunk-VC5LMUVQ.cjs.map +1 -0
  127. package/dist/chunk-VM7WFMKI.cjs +76 -0
  128. package/dist/chunk-VM7WFMKI.cjs.map +1 -0
  129. package/dist/chunk-W2WTP6HS.cjs +233 -0
  130. package/dist/chunk-W2WTP6HS.cjs.map +1 -0
  131. package/dist/chunk-WH7PYHZY.cjs +35 -0
  132. package/dist/chunk-WH7PYHZY.cjs.map +1 -0
  133. package/dist/chunk-XU3OMQ7V.js +98 -0
  134. package/dist/chunk-XU3OMQ7V.js.map +1 -0
  135. package/dist/chunk-XWPDRMZG.js +62 -0
  136. package/dist/chunk-XWPDRMZG.js.map +1 -0
  137. package/dist/chunk-Y3CPKNB7.js +67 -0
  138. package/dist/chunk-Y3CPKNB7.js.map +1 -0
  139. package/dist/chunk-YNVRDD2P.js +98 -0
  140. package/dist/chunk-YNVRDD2P.js.map +1 -0
  141. package/dist/chunk-YSYR54XR.js +92 -0
  142. package/dist/chunk-YSYR54XR.js.map +1 -0
  143. package/dist/chunk-YTYDQBVY.cjs +162 -0
  144. package/dist/chunk-YTYDQBVY.cjs.map +1 -0
  145. package/dist/core/index.cjs +807 -4333
  146. package/dist/core/index.cjs.map +1 -1
  147. package/dist/core/index.js +14 -4130
  148. package/dist/core/index.js.map +1 -1
  149. package/dist/i18n/index.cjs +86 -558
  150. package/dist/i18n/index.cjs.map +1 -1
  151. package/dist/i18n/index.js +1 -544
  152. package/dist/i18n/index.js.map +1 -1
  153. package/dist/index.cjs +1432 -17140
  154. package/dist/index.cjs.map +1 -1
  155. package/dist/index.js +31 -16785
  156. package/dist/index.js.map +1 -1
  157. package/dist/marketing/index.cjs +142 -3072
  158. package/dist/marketing/index.cjs.map +1 -1
  159. package/dist/marketing/index.js +11 -3042
  160. package/dist/marketing/index.js.map +1 -1
  161. package/dist/motion/index.cjs +26 -1222
  162. package/dist/motion/index.cjs.map +1 -1
  163. package/dist/motion/index.js +2 -1215
  164. package/dist/motion/index.js.map +1 -1
  165. package/dist/nav/index.cjs +101 -1518
  166. package/dist/nav/index.cjs.map +1 -1
  167. package/dist/nav/index.js +4 -1498
  168. package/dist/nav/index.js.map +1 -1
  169. package/dist/report/index.cjs +171 -2403
  170. package/dist/report/index.cjs.map +1 -1
  171. package/dist/report/index.js +3 -2363
  172. package/dist/report/index.js.map +1 -1
  173. package/dist/sections/index.cjs +22 -377
  174. package/dist/sections/index.cjs.map +1 -1
  175. package/dist/sections/index.js +6 -369
  176. package/dist/sections/index.js.map +1 -1
  177. package/dist/social-proof/index.cjs +53 -1250
  178. package/dist/social-proof/index.cjs.map +1 -1
  179. package/dist/social-proof/index.js +6 -1235
  180. package/dist/social-proof/index.js.map +1 -1
  181. package/dist/theme/index.cjs +38 -565
  182. package/dist/theme/index.cjs.map +1 -1
  183. package/dist/theme/index.js +2 -555
  184. package/dist/theme/index.js.map +1 -1
  185. package/dist/web/client/index.cjs +38 -491
  186. package/dist/web/client/index.cjs.map +1 -1
  187. package/dist/web/client/index.js +4 -483
  188. package/dist/web/client/index.js.map +1 -1
  189. package/dist/web/index.cjs +158 -1346
  190. package/dist/web/index.cjs.map +1 -1
  191. package/dist/web/index.js +9 -1305
  192. package/dist/web/index.js.map +1 -1
  193. package/dist/web/server/index.cjs +26 -563
  194. package/dist/web/server/index.cjs.map +1 -1
  195. package/dist/web/server/index.js +1 -560
  196. package/dist/web/server/index.js.map +1 -1
  197. package/package.json +1 -1
@@ -1,558 +1,5 @@
1
1
  "use client";
2
- import React2, { createContext, useId, useContext, useState, useEffect, useCallback } from 'react';
3
- import { jsxs, jsx } from 'react/jsx-runtime';
4
- import { Sun, Moon } from 'lucide-react';
5
- import clsx2 from 'clsx';
6
-
7
- // src/theme/AppearanceProvider.tsx
8
- var STORAGE_KEY = "void-appearance-settings";
9
- var DEFAULT_SETTINGS = {
10
- theme: "dark",
11
- brand: "default",
12
- navPlacement: "left",
13
- density: "comfortable",
14
- radius: "playful",
15
- customColor: "#f97316"
16
- // Default orange as fallback
17
- };
18
- function hexToRgb(hex) {
19
- const cleanHex = hex.replace(/^#/, "");
20
- const r = parseInt(cleanHex.substring(0, 2), 16);
21
- const g = parseInt(cleanHex.substring(2, 4), 16);
22
- const b = parseInt(cleanHex.substring(4, 6), 16);
23
- if (isNaN(r) || isNaN(g) || isNaN(b)) {
24
- return "249, 115, 22";
25
- }
26
- return `${r}, ${g}, ${b}`;
27
- }
28
- function generateSecondaryColor(hex) {
29
- const cleanHex = hex.replace(/^#/, "");
30
- const r = parseInt(cleanHex.substring(0, 2), 16);
31
- const g = parseInt(cleanHex.substring(2, 4), 16);
32
- const b = parseInt(cleanHex.substring(4, 6), 16);
33
- if (isNaN(r) || isNaN(g) || isNaN(b)) {
34
- return "255, 208, 0";
35
- }
36
- const secondary = {
37
- r: Math.min(255, g + 50),
38
- g: Math.min(255, b + 100),
39
- b: Math.min(255, r)
40
- };
41
- return `${secondary.r}, ${secondary.g}, ${secondary.b}`;
42
- }
43
- function loadSettings() {
44
- if (typeof window === "undefined") return DEFAULT_SETTINGS;
45
- try {
46
- const stored = localStorage.getItem(STORAGE_KEY);
47
- if (stored) {
48
- const parsed = JSON.parse(stored);
49
- return {
50
- theme: parsed.theme || DEFAULT_SETTINGS.theme,
51
- brand: parsed.brand || DEFAULT_SETTINGS.brand,
52
- navPlacement: parsed.navPlacement || DEFAULT_SETTINGS.navPlacement,
53
- density: parsed.density || DEFAULT_SETTINGS.density,
54
- radius: parsed.radius || DEFAULT_SETTINGS.radius,
55
- customColor: parsed.customColor || DEFAULT_SETTINGS.customColor
56
- };
57
- }
58
- } catch {
59
- }
60
- return {
61
- ...DEFAULT_SETTINGS,
62
- theme: "dark"
63
- };
64
- }
65
- function saveSettings(settings) {
66
- if (typeof window === "undefined") return;
67
- try {
68
- localStorage.setItem(STORAGE_KEY, JSON.stringify(settings));
69
- } catch {
70
- }
71
- }
72
- function applySettings(settings) {
73
- if (typeof document === "undefined") return;
74
- const root = document.documentElement;
75
- root.setAttribute("data-theme", settings.theme);
76
- root.setAttribute("data-brand", settings.brand);
77
- root.setAttribute("data-nav", settings.navPlacement);
78
- root.setAttribute("data-density", settings.density);
79
- root.setAttribute("data-radius", settings.radius);
80
- if (settings.brand === "custom") {
81
- const primaryRgb = hexToRgb(settings.customColor);
82
- const secondaryRgb = generateSecondaryColor(settings.customColor);
83
- root.style.setProperty("--custom-accent-rgb", primaryRgb);
84
- root.style.setProperty("--custom-accent2-rgb", secondaryRgb);
85
- } else {
86
- root.style.removeProperty("--custom-accent-rgb");
87
- root.style.removeProperty("--custom-accent2-rgb");
88
- }
89
- }
90
- function prefersReducedMotion() {
91
- if (typeof window === "undefined") return false;
92
- return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
93
- }
94
- var AppearanceContext = createContext(null);
95
- function AppearanceProvider({
96
- initialSettings,
97
- disablePersistence = false,
98
- children
99
- }) {
100
- const [settings, setSettings] = useState(() => ({
101
- ...DEFAULT_SETTINGS,
102
- ...initialSettings
103
- }));
104
- const [hydrated, setHydrated] = useState(false);
105
- useEffect(() => {
106
- if (!disablePersistence) {
107
- const loaded = loadSettings();
108
- setSettings({
109
- ...loaded,
110
- // initialSettings still take priority over localStorage
111
- ...initialSettings
112
- });
113
- }
114
- setHydrated(true);
115
- }, []);
116
- useEffect(() => {
117
- applySettings(settings);
118
- if (!disablePersistence && hydrated) {
119
- saveSettings(settings);
120
- }
121
- }, [settings, disablePersistence, hydrated]);
122
- useEffect(() => {
123
- if (typeof window === "undefined") return;
124
- const mediaQuery = window.matchMedia("(prefers-color-scheme: light)");
125
- const handleChange = (e) => {
126
- setSettings((prev) => {
127
- if (prev.theme === "light-contrast" || prev.theme === "dark-contrast") {
128
- return prev;
129
- }
130
- return {
131
- ...prev,
132
- theme: e.matches ? "light" : "dark"
133
- };
134
- });
135
- };
136
- mediaQuery.addEventListener("change", handleChange);
137
- return () => mediaQuery.removeEventListener("change", handleChange);
138
- }, []);
139
- useEffect(() => {
140
- if (typeof window === "undefined") return;
141
- const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
142
- const handleChange = () => {
143
- applySettings(settings);
144
- };
145
- mediaQuery.addEventListener("change", handleChange);
146
- return () => mediaQuery.removeEventListener("change", handleChange);
147
- }, [settings]);
148
- const setTheme = useCallback((theme) => {
149
- setSettings((prev) => ({ ...prev, theme }));
150
- }, []);
151
- const setBrand = useCallback((brand) => {
152
- setSettings((prev) => ({ ...prev, brand }));
153
- }, []);
154
- const setNavPlacement = useCallback((navPlacement) => {
155
- setSettings((prev) => ({ ...prev, navPlacement }));
156
- }, []);
157
- const setDensity = useCallback((density) => {
158
- setSettings((prev) => ({ ...prev, density }));
159
- }, []);
160
- const setRadius = useCallback((radius) => {
161
- setSettings((prev) => ({ ...prev, radius }));
162
- }, []);
163
- const setCustomColor = useCallback((customColor) => {
164
- setSettings((prev) => ({ ...prev, customColor, brand: "custom" }));
165
- }, []);
166
- const setAppearance = useCallback((partial) => {
167
- setSettings((prev) => ({ ...prev, ...partial }));
168
- }, []);
169
- const resetToDefaults = useCallback(() => {
170
- setSettings(DEFAULT_SETTINGS);
171
- }, []);
172
- const contextValue = {
173
- ...settings,
174
- setTheme,
175
- setBrand,
176
- setNavPlacement,
177
- setDensity,
178
- setRadius,
179
- setCustomColor,
180
- setAppearance,
181
- resetToDefaults
182
- };
183
- return /* @__PURE__ */ jsx(AppearanceContext.Provider, { value: contextValue, children });
184
- }
185
- function useAppearance() {
186
- const context = useContext(AppearanceContext);
187
- if (!context) {
188
- throw new Error("useAppearance must be used within an AppearanceProvider");
189
- }
190
- return context;
191
- }
192
- function initializeAppearance(settings) {
193
- const loaded = loadSettings();
194
- const merged = { ...loaded, ...settings };
195
- applySettings(merged);
196
- }
197
- var ThemeSelector = ({ className, style }) => {
198
- const { theme, setTheme } = useAppearance();
199
- const handleThemeChange = (newTheme) => {
200
- setTheme(newTheme);
201
- };
202
- return /* @__PURE__ */ jsxs("div", { className: clsx2("ds-theme-selector", className), style, role: "group", "aria-label": "Theme Selector", children: [
203
- /* @__PURE__ */ jsxs(
204
- "button",
205
- {
206
- type: "button",
207
- className: clsx2("ds-theme-selector__btn", { "ds-theme-selector__btn--active": theme === "light" }),
208
- onClick: () => handleThemeChange("light"),
209
- "aria-pressed": theme === "light",
210
- children: [
211
- /* @__PURE__ */ jsx(Sun, { className: "ds-theme-selector__icon" }),
212
- /* @__PURE__ */ jsx("span", { className: "ds-theme-selector__label", children: "Light" })
213
- ]
214
- }
215
- ),
216
- /* @__PURE__ */ jsxs(
217
- "button",
218
- {
219
- type: "button",
220
- className: clsx2("ds-theme-selector__btn", { "ds-theme-selector__btn--active": theme === "light-contrast" }),
221
- onClick: () => handleThemeChange("light-contrast"),
222
- "aria-pressed": theme === "light-contrast",
223
- children: [
224
- /* @__PURE__ */ jsx(Sun, { className: "ds-theme-selector__icon" }),
225
- /* @__PURE__ */ jsx("span", { className: "ds-theme-selector__label", children: "Light HC" })
226
- ]
227
- }
228
- ),
229
- /* @__PURE__ */ jsxs(
230
- "button",
231
- {
232
- type: "button",
233
- className: clsx2("ds-theme-selector__btn", { "ds-theme-selector__btn--active": theme === "dark" }),
234
- onClick: () => handleThemeChange("dark"),
235
- "aria-pressed": theme === "dark",
236
- children: [
237
- /* @__PURE__ */ jsx(Moon, { className: "ds-theme-selector__icon" }),
238
- /* @__PURE__ */ jsx("span", { className: "ds-theme-selector__label", children: "Dark" })
239
- ]
240
- }
241
- ),
242
- /* @__PURE__ */ jsxs(
243
- "button",
244
- {
245
- type: "button",
246
- className: clsx2("ds-theme-selector__btn", { "ds-theme-selector__btn--active": theme === "dark-contrast" }),
247
- onClick: () => handleThemeChange("dark-contrast"),
248
- "aria-pressed": theme === "dark-contrast",
249
- children: [
250
- /* @__PURE__ */ jsx(Moon, { className: "ds-theme-selector__icon" }),
251
- /* @__PURE__ */ jsx("span", { className: "ds-theme-selector__label", children: "Dark HC" })
252
- ]
253
- }
254
- )
255
- ] });
256
- };
257
- ThemeSelector.displayName = "ThemeSelector";
258
- var AppearancePanel = React2.forwardRef(
259
- ({ className, labels: l }, ref) => {
260
- const {
261
- theme,
262
- brand,
263
- navPlacement,
264
- density,
265
- radius,
266
- customColor,
267
- setTheme,
268
- setBrand,
269
- setNavPlacement,
270
- setDensity,
271
- setRadius,
272
- setCustomColor,
273
- resetToDefaults
274
- } = useAppearance();
275
- const colorPickerId = useId();
276
- const themeOptions = [
277
- { value: "light", label: l?.themeLight ?? "Light" },
278
- { value: "light-contrast", label: l?.themeLightContrast ?? "Light (High Contrast)" },
279
- { value: "dark", label: l?.themeDark ?? "Dark" },
280
- { value: "dark-contrast", label: l?.themeDarkContrast ?? "Dark (High Contrast)" }
281
- ];
282
- const brandOptions = [
283
- { value: "default", label: l?.brandDefault ?? "Default", description: l?.brandDefaultDescription ?? "Warm Intelligence" },
284
- { value: "salesmind", label: l?.brandSalesmind ?? "SalesMind", description: l?.brandSalesmindDescription ?? "Pink-red + Gold" },
285
- { value: "custom", label: l?.brandCustom ?? "Custom", description: l?.brandCustomDescription ?? "Your color" }
286
- ];
287
- const navOptions = [
288
- { value: "left", label: l?.navLeft ?? "Left Sidebar" },
289
- { value: "right", label: l?.navRight ?? "Right Sidebar" },
290
- { value: "bottom", label: l?.navBottom ?? "Bottom Tabs" }
291
- ];
292
- const densityOptions = [
293
- { value: "comfortable", label: l?.densityComfortable ?? "Comfortable", description: l?.densityComfortableDescription ?? "Generous spacing" },
294
- { value: "compact", label: l?.densityCompact ?? "Compact", description: l?.densityCompactDescription ?? "Higher density" }
295
- ];
296
- const radiusOptions = [
297
- { value: "playful", label: l?.radiusPlayful ?? "Playful", description: l?.radiusPlayfulDescription ?? "Rounded corners" },
298
- { value: "sharp", label: l?.radiusSharp ?? "Sharp", description: l?.radiusSharpDescription ?? "Technical feel" }
299
- ];
300
- return /* @__PURE__ */ jsxs("div", { ref, className: clsx2("ds-appearance-panel", className), children: [
301
- /* @__PURE__ */ jsx("h3", { className: "ds-appearance-panel__title", children: l?.title ?? "Appearance Settings" }),
302
- /* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
303
- /* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.themeHeading ?? "Theme" }),
304
- /* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options", children: themeOptions.map((option) => /* @__PURE__ */ jsxs(
305
- "label",
306
- {
307
- className: clsx2(
308
- "ds-appearance-panel__option",
309
- theme === option.value && "ds-appearance-panel__option--active"
310
- ),
311
- children: [
312
- /* @__PURE__ */ jsx(
313
- "input",
314
- {
315
- type: "radio",
316
- name: "theme",
317
- value: option.value,
318
- checked: theme === option.value,
319
- onChange: () => setTheme(option.value),
320
- className: "ds-appearance-panel__radio"
321
- }
322
- ),
323
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label })
324
- ]
325
- },
326
- option.value
327
- )) })
328
- ] }),
329
- /* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
330
- /* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.brandHeading ?? "Brand" }),
331
- /* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options", children: brandOptions.map((option) => /* @__PURE__ */ jsxs(
332
- "label",
333
- {
334
- className: clsx2(
335
- "ds-appearance-panel__option",
336
- brand === option.value && "ds-appearance-panel__option--active"
337
- ),
338
- children: [
339
- /* @__PURE__ */ jsx(
340
- "input",
341
- {
342
- type: "radio",
343
- name: "brand",
344
- value: option.value,
345
- checked: brand === option.value,
346
- onChange: () => setBrand(option.value),
347
- className: "ds-appearance-panel__radio"
348
- }
349
- ),
350
- /* @__PURE__ */ jsxs("span", { className: "ds-appearance-panel__option-content", children: [
351
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label }),
352
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-description", children: option.description })
353
- ] })
354
- ]
355
- },
356
- option.value
357
- )) }),
358
- brand === "custom" && /* @__PURE__ */ jsxs("div", { className: "ds-appearance-panel__color-picker", children: [
359
- /* @__PURE__ */ jsx("label", { htmlFor: colorPickerId, className: "ds-appearance-panel__color-label", children: l?.accentColorLabel ?? "Accent Color" }),
360
- /* @__PURE__ */ jsxs("div", { className: "ds-appearance-panel__color-input-wrapper", children: [
361
- /* @__PURE__ */ jsx(
362
- "input",
363
- {
364
- type: "color",
365
- id: colorPickerId,
366
- value: customColor,
367
- onChange: (e) => setCustomColor(e.target.value),
368
- className: "ds-appearance-panel__color-input"
369
- }
370
- ),
371
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__color-value", children: customColor.toUpperCase() })
372
- ] })
373
- ] })
374
- ] }),
375
- /* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
376
- /* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.densityHeading ?? "Density" }),
377
- /* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options ds-appearance-panel__options--row", children: densityOptions.map((option) => /* @__PURE__ */ jsxs(
378
- "label",
379
- {
380
- className: clsx2(
381
- "ds-appearance-panel__option",
382
- "ds-appearance-panel__option--toggle",
383
- density === option.value && "ds-appearance-panel__option--active"
384
- ),
385
- children: [
386
- /* @__PURE__ */ jsx(
387
- "input",
388
- {
389
- type: "radio",
390
- name: "density",
391
- value: option.value,
392
- checked: density === option.value,
393
- onChange: () => setDensity(option.value),
394
- className: "ds-appearance-panel__radio"
395
- }
396
- ),
397
- /* @__PURE__ */ jsxs("span", { className: "ds-appearance-panel__option-content", children: [
398
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label }),
399
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-description", children: option.description })
400
- ] })
401
- ]
402
- },
403
- option.value
404
- )) })
405
- ] }),
406
- /* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
407
- /* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.geometryHeading ?? "Geometry" }),
408
- /* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options ds-appearance-panel__options--row", children: radiusOptions.map((option) => /* @__PURE__ */ jsxs(
409
- "label",
410
- {
411
- className: clsx2(
412
- "ds-appearance-panel__option",
413
- "ds-appearance-panel__option--toggle",
414
- radius === option.value && "ds-appearance-panel__option--active"
415
- ),
416
- children: [
417
- /* @__PURE__ */ jsx(
418
- "input",
419
- {
420
- type: "radio",
421
- name: "radius",
422
- value: option.value,
423
- checked: radius === option.value,
424
- onChange: () => setRadius(option.value),
425
- className: "ds-appearance-panel__radio"
426
- }
427
- ),
428
- /* @__PURE__ */ jsxs("span", { className: "ds-appearance-panel__option-content", children: [
429
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label }),
430
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-description", children: option.description })
431
- ] })
432
- ]
433
- },
434
- option.value
435
- )) })
436
- ] }),
437
- /* @__PURE__ */ jsxs("fieldset", { className: "ds-appearance-panel__section", children: [
438
- /* @__PURE__ */ jsx("legend", { className: "ds-appearance-panel__legend", children: l?.navHeading ?? "Navigation Layout" }),
439
- /* @__PURE__ */ jsx("div", { className: "ds-appearance-panel__options", children: navOptions.map((option) => /* @__PURE__ */ jsxs(
440
- "label",
441
- {
442
- className: clsx2(
443
- "ds-appearance-panel__option",
444
- navPlacement === option.value && "ds-appearance-panel__option--active"
445
- ),
446
- children: [
447
- /* @__PURE__ */ jsx(
448
- "input",
449
- {
450
- type: "radio",
451
- name: "nav",
452
- value: option.value,
453
- checked: navPlacement === option.value,
454
- onChange: () => setNavPlacement(option.value),
455
- className: "ds-appearance-panel__radio"
456
- }
457
- ),
458
- /* @__PURE__ */ jsx("span", { className: "ds-appearance-panel__option-label", children: option.label })
459
- ]
460
- },
461
- option.value
462
- )) })
463
- ] }),
464
- /* @__PURE__ */ jsx("button", { type: "button", onClick: resetToDefaults, className: "ds-appearance-panel__reset", children: l?.resetLabel ?? "Reset to Defaults" })
465
- ] });
466
- }
467
- );
468
- AppearancePanel.displayName = "AppearancePanel";
469
- var BRAND_PRESETS = [
470
- { value: "default", label: "Warm Intelligence", color: "#f97316" },
471
- { value: "salesmind", label: "SalesMind", color: "#ff005a" }
472
- ];
473
- var ColorPicker = React2.forwardRef(
474
- ({ className, style }, ref) => {
475
- const { brand, setBrand, customColor, setCustomColor } = useAppearance();
476
- return /* @__PURE__ */ jsxs(
477
- "div",
478
- {
479
- ref,
480
- className: clsx2("ds-color-picker", className),
481
- style,
482
- role: "group",
483
- "aria-label": "Brand Color",
484
- children: [
485
- BRAND_PRESETS.map(({ value, label, color }) => /* @__PURE__ */ jsx(
486
- "button",
487
- {
488
- type: "button",
489
- className: clsx2("ds-color-picker__swatch", {
490
- "ds-color-picker__swatch--active": brand === value
491
- }),
492
- onClick: () => setBrand(value),
493
- "aria-label": `Switch to ${label} color scheme`,
494
- "aria-pressed": brand === value,
495
- title: label,
496
- children: /* @__PURE__ */ jsx(
497
- "span",
498
- {
499
- className: "ds-color-picker__dot",
500
- style: { "--swatch-color": color }
501
- }
502
- )
503
- },
504
- value
505
- )),
506
- /* @__PURE__ */ jsxs(
507
- "label",
508
- {
509
- className: clsx2("ds-color-picker__swatch", "ds-color-picker__swatch--custom", {
510
- "ds-color-picker__swatch--active": brand === "custom"
511
- }),
512
- title: `Custom: ${customColor}`,
513
- children: [
514
- /* @__PURE__ */ jsx(
515
- "span",
516
- {
517
- className: "ds-color-picker__dot",
518
- style: { "--swatch-color": customColor }
519
- }
520
- ),
521
- /* @__PURE__ */ jsx(
522
- "input",
523
- {
524
- type: "color",
525
- value: customColor,
526
- onChange: (e) => setCustomColor(e.target.value),
527
- className: "ds-color-picker__native-input",
528
- "aria-label": "Pick a custom accent color"
529
- }
530
- )
531
- ]
532
- }
533
- )
534
- ]
535
- }
536
- );
537
- }
538
- );
539
- ColorPicker.displayName = "ColorPicker";
540
- var VoidBackground = React2.forwardRef(
541
- ({ showGrid = true, showGrain = true, className, children }, ref) => {
542
- return /* @__PURE__ */ jsxs("div", { ref, className: clsx2("void", className), children: [
543
- /* @__PURE__ */ jsx("div", { className: "void__base", "aria-hidden": "true" }),
544
- /* @__PURE__ */ jsxs("div", { className: "void__orbs", "aria-hidden": "true", children: [
545
- /* @__PURE__ */ jsx("div", { className: "void__orb void__orb--warm" }),
546
- /* @__PURE__ */ jsx("div", { className: "void__orb void__orb--purple" })
547
- ] }),
548
- showGrid && /* @__PURE__ */ jsx("div", { className: "void__grid", "aria-hidden": "true" }),
549
- showGrain && /* @__PURE__ */ jsx("div", { className: "void__grain", "aria-hidden": "true" }),
550
- children && /* @__PURE__ */ jsx("div", { className: "void__content", children })
551
- ] });
552
- }
553
- );
554
- VoidBackground.displayName = "VoidBackground";
555
-
556
- export { AppearancePanel, AppearanceProvider, ColorPicker, ThemeSelector, VoidBackground, hexToRgb, initializeAppearance, prefersReducedMotion, useAppearance };
2
+ export { ColorPicker, ThemeSelector, VoidBackground } from '../chunk-EFRAP5ES.js';
3
+ export { AppearancePanel, AppearanceProvider, hexToRgb, initializeAppearance, prefersReducedMotion, useAppearance } from '../chunk-JPJN4YBC.js';
557
4
  //# sourceMappingURL=out.js.map
558
5
  //# sourceMappingURL=index.js.map