@umituz/web-dashboard 2.0.7 → 2.0.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.
Files changed (171) hide show
  1. package/package.json +35 -77
  2. package/src/domains/layouts/components/BrandLogo.tsx +83 -0
  3. package/src/domains/layouts/components/DashboardHeader.tsx +240 -0
  4. package/src/domains/layouts/components/DashboardLayout.tsx +155 -0
  5. package/src/domains/layouts/components/DashboardSidebar.tsx +152 -0
  6. package/src/domains/layouts/components/index.ts +8 -0
  7. package/src/domains/layouts/hooks/dashboard.ts +81 -0
  8. package/src/domains/layouts/hooks/index.ts +8 -0
  9. package/src/domains/layouts/index.ts +11 -0
  10. package/{dist/layouts/theme/default.js → src/domains/layouts/theme/default.ts} +18 -11
  11. package/src/domains/layouts/theme/index.ts +18 -0
  12. package/src/domains/layouts/theme/presets.ts +96 -0
  13. package/src/domains/layouts/theme/utils.ts +67 -0
  14. package/src/domains/layouts/types/index.ts +9 -0
  15. package/src/domains/layouts/types/layout.ts +43 -0
  16. package/src/domains/layouts/types/notification.ts +19 -0
  17. package/src/domains/layouts/types/sidebar.ts +35 -0
  18. package/src/domains/layouts/types/theme.ts +64 -0
  19. package/src/domains/layouts/types/user.ts +35 -0
  20. package/src/domains/layouts/utils/dashboard.ts +96 -0
  21. package/src/domains/layouts/utils/index.ts +11 -0
  22. package/src/domains/onboarding/components/AppFocusStep.tsx +113 -0
  23. package/src/domains/onboarding/components/OnboardingWizard.tsx +262 -0
  24. package/src/domains/onboarding/components/PlanStep.tsx +208 -0
  25. package/src/domains/onboarding/components/PlatformsStep.tsx +109 -0
  26. package/src/domains/onboarding/components/UserTypeStep.tsx +135 -0
  27. package/src/domains/onboarding/components/index.ts +9 -0
  28. package/src/domains/onboarding/hooks/index.ts +5 -0
  29. package/{dist/onboarding/hooks/index.js → src/domains/onboarding/hooks/useOnboarding.ts} +65 -19
  30. package/src/domains/onboarding/index.ts +35 -0
  31. package/src/domains/onboarding/types/index.ts +16 -0
  32. package/src/domains/onboarding/types/onboarding.ts +214 -0
  33. package/src/domains/onboarding/utils/index.ts +15 -0
  34. package/src/domains/onboarding/utils/onboarding.ts +166 -0
  35. package/src/domains/settings/components/SettingsLayout.tsx +144 -0
  36. package/src/domains/settings/components/SettingsSection.tsx +106 -0
  37. package/src/domains/settings/components/index.ts +6 -0
  38. package/src/domains/settings/hooks/index.ts +7 -0
  39. package/src/domains/settings/hooks/useSettings.ts +80 -0
  40. package/src/domains/settings/index.ts +22 -0
  41. package/src/domains/settings/types/index.ts +11 -0
  42. package/src/domains/settings/types/settings.ts +81 -0
  43. package/src/domains/settings/utils/index.ts +11 -0
  44. package/src/domains/settings/utils/settings.ts +80 -0
  45. package/dist/layouts/components/BrandLogo.d.ts +0 -18
  46. package/dist/layouts/components/BrandLogo.js +0 -88
  47. package/dist/layouts/components/BrandLogo.js.map +0 -1
  48. package/dist/layouts/components/DashboardHeader.d.ts +0 -36
  49. package/dist/layouts/components/DashboardHeader.js +0 -225
  50. package/dist/layouts/components/DashboardHeader.js.map +0 -1
  51. package/dist/layouts/components/DashboardLayout.d.ts +0 -45
  52. package/dist/layouts/components/DashboardLayout.js +0 -501
  53. package/dist/layouts/components/DashboardLayout.js.map +0 -1
  54. package/dist/layouts/components/DashboardSidebar.d.ts +0 -29
  55. package/dist/layouts/components/DashboardSidebar.js +0 -189
  56. package/dist/layouts/components/DashboardSidebar.js.map +0 -1
  57. package/dist/layouts/components/index.d.ts +0 -10
  58. package/dist/layouts/components/index.js +0 -502
  59. package/dist/layouts/components/index.js.map +0 -1
  60. package/dist/layouts/hooks/dashboard.d.ts +0 -35
  61. package/dist/layouts/hooks/dashboard.js +0 -57
  62. package/dist/layouts/hooks/dashboard.js.map +0 -1
  63. package/dist/layouts/hooks/index.d.ts +0 -3
  64. package/dist/layouts/hooks/index.js +0 -57
  65. package/dist/layouts/hooks/index.js.map +0 -1
  66. package/dist/layouts/index.d.ts +0 -17
  67. package/dist/layouts/index.js +0 -756
  68. package/dist/layouts/index.js.map +0 -1
  69. package/dist/layouts/theme/default.d.ts +0 -18
  70. package/dist/layouts/theme/default.js.map +0 -1
  71. package/dist/layouts/theme/index.d.ts +0 -4
  72. package/dist/layouts/theme/index.js +0 -184
  73. package/dist/layouts/theme/index.js.map +0 -1
  74. package/dist/layouts/theme/presets.d.ts +0 -14
  75. package/dist/layouts/theme/presets.js +0 -137
  76. package/dist/layouts/theme/presets.js.map +0 -1
  77. package/dist/layouts/theme/utils.d.ts +0 -22
  78. package/dist/layouts/theme/utils.js +0 -181
  79. package/dist/layouts/theme/utils.js.map +0 -1
  80. package/dist/layouts/types/index.d.ts +0 -6
  81. package/dist/layouts/types/index.js +0 -2
  82. package/dist/layouts/types/index.js.map +0 -1
  83. package/dist/layouts/types/layout.d.ts +0 -45
  84. package/dist/layouts/types/layout.js +0 -2
  85. package/dist/layouts/types/layout.js.map +0 -1
  86. package/dist/layouts/types/notification.d.ts +0 -20
  87. package/dist/layouts/types/notification.js +0 -2
  88. package/dist/layouts/types/notification.js.map +0 -1
  89. package/dist/layouts/types/sidebar.d.ts +0 -36
  90. package/dist/layouts/types/sidebar.js +0 -2
  91. package/dist/layouts/types/sidebar.js.map +0 -1
  92. package/dist/layouts/types/theme.d.ts +0 -64
  93. package/dist/layouts/types/theme.js +0 -2
  94. package/dist/layouts/types/theme.js.map +0 -1
  95. package/dist/layouts/types/user.d.ts +0 -37
  96. package/dist/layouts/types/user.js +0 -2
  97. package/dist/layouts/types/user.js.map +0 -1
  98. package/dist/layouts/utils/dashboard.d.ts +0 -57
  99. package/dist/layouts/utils/dashboard.js +0 -44
  100. package/dist/layouts/utils/dashboard.js.map +0 -1
  101. package/dist/layouts/utils/index.d.ts +0 -1
  102. package/dist/layouts/utils/index.js +0 -44
  103. package/dist/layouts/utils/index.js.map +0 -1
  104. package/dist/onboarding/components/AppFocusStep.d.ts +0 -26
  105. package/dist/onboarding/components/AppFocusStep.js +0 -86
  106. package/dist/onboarding/components/AppFocusStep.js.map +0 -1
  107. package/dist/onboarding/components/OnboardingWizard.d.ts +0 -13
  108. package/dist/onboarding/components/OnboardingWizard.js +0 -332
  109. package/dist/onboarding/components/OnboardingWizard.js.map +0 -1
  110. package/dist/onboarding/components/PlanStep.d.ts +0 -21
  111. package/dist/onboarding/components/PlanStep.js +0 -167
  112. package/dist/onboarding/components/PlanStep.js.map +0 -1
  113. package/dist/onboarding/components/PlatformsStep.d.ts +0 -26
  114. package/dist/onboarding/components/PlatformsStep.js +0 -86
  115. package/dist/onboarding/components/PlatformsStep.js.map +0 -1
  116. package/dist/onboarding/components/UserTypeStep.d.ts +0 -30
  117. package/dist/onboarding/components/UserTypeStep.js +0 -93
  118. package/dist/onboarding/components/UserTypeStep.js.map +0 -1
  119. package/dist/onboarding/components/index.d.ts +0 -9
  120. package/dist/onboarding/components/index.js +0 -738
  121. package/dist/onboarding/components/index.js.map +0 -1
  122. package/dist/onboarding/hooks/index.d.ts +0 -4
  123. package/dist/onboarding/hooks/index.js.map +0 -1
  124. package/dist/onboarding/hooks/useOnboarding.d.ts +0 -50
  125. package/dist/onboarding/hooks/useOnboarding.js +0 -100
  126. package/dist/onboarding/hooks/useOnboarding.js.map +0 -1
  127. package/dist/onboarding/index.d.ts +0 -11
  128. package/dist/onboarding/index.js +0 -913
  129. package/dist/onboarding/index.js.map +0 -1
  130. package/dist/onboarding/types/index.d.ts +0 -3
  131. package/dist/onboarding/types/index.js +0 -2
  132. package/dist/onboarding/types/index.js.map +0 -1
  133. package/dist/onboarding/types/onboarding.d.ts +0 -209
  134. package/dist/onboarding/types/onboarding.js +0 -2
  135. package/dist/onboarding/types/onboarding.js.map +0 -1
  136. package/dist/onboarding/utils/index.d.ts +0 -4
  137. package/dist/onboarding/utils/index.js +0 -83
  138. package/dist/onboarding/utils/index.js.map +0 -1
  139. package/dist/onboarding/utils/onboarding.d.ts +0 -106
  140. package/dist/onboarding/utils/onboarding.js +0 -83
  141. package/dist/onboarding/utils/onboarding.js.map +0 -1
  142. package/dist/settings/components/SettingsLayout.d.ts +0 -19
  143. package/dist/settings/components/SettingsLayout.js +0 -170
  144. package/dist/settings/components/SettingsLayout.js.map +0 -1
  145. package/dist/settings/components/SettingsSection.d.ts +0 -24
  146. package/dist/settings/components/SettingsSection.js +0 -73
  147. package/dist/settings/components/SettingsSection.js.map +0 -1
  148. package/dist/settings/components/index.d.ts +0 -5
  149. package/dist/settings/components/index.js +0 -169
  150. package/dist/settings/components/index.js.map +0 -1
  151. package/dist/settings/hooks/index.d.ts +0 -3
  152. package/dist/settings/hooks/index.js +0 -59
  153. package/dist/settings/hooks/index.js.map +0 -1
  154. package/dist/settings/hooks/useSettings.d.ts +0 -25
  155. package/dist/settings/hooks/useSettings.js +0 -59
  156. package/dist/settings/hooks/useSettings.js.map +0 -1
  157. package/dist/settings/index.d.ts +0 -7
  158. package/dist/settings/index.js +0 -259
  159. package/dist/settings/index.js.map +0 -1
  160. package/dist/settings/types/index.d.ts +0 -2
  161. package/dist/settings/types/index.js +0 -2
  162. package/dist/settings/types/index.js.map +0 -1
  163. package/dist/settings/types/settings.d.ts +0 -79
  164. package/dist/settings/types/settings.js +0 -2
  165. package/dist/settings/types/settings.js.map +0 -1
  166. package/dist/settings/utils/index.d.ts +0 -3
  167. package/dist/settings/utils/index.js +0 -39
  168. package/dist/settings/utils/index.js.map +0 -1
  169. package/dist/settings/utils/settings.d.ts +0 -50
  170. package/dist/settings/utils/settings.js +0 -39
  171. package/dist/settings/utils/settings.js.map +0 -1
@@ -1,738 +0,0 @@
1
- "use client";
2
-
3
- // src/domains/onboarding/components/OnboardingWizard.tsx
4
- import { useState as useState4, useCallback } from "react";
5
- import { useNavigate as useNavigate2 } from "react-router-dom";
6
- import { Check, Loader2 } from "lucide-react";
7
- import { cn as cn2 } from "@umituz/web-design-system/utils";
8
- import { Button as Button3 } from "@umituz/web-design-system/atoms";
9
-
10
- // src/domains/layouts/components/DashboardLayout.tsx
11
- import { useState as useState3, useEffect } from "react";
12
- import { useLocation as useLocation2, Outlet, Navigate } from "react-router-dom";
13
- import { Skeleton } from "@umituz/web-design-system/atoms";
14
-
15
- // src/domains/layouts/components/DashboardSidebar.tsx
16
- import { useState } from "react";
17
- import { Link, useLocation } from "react-router-dom";
18
- import { useTranslation } from "react-i18next";
19
- import { Button } from "@umituz/web-design-system/atoms";
20
-
21
- // src/domains/layouts/components/BrandLogo.tsx
22
- import { cn } from "@umituz/web-design-system/utils";
23
- import { jsx, jsxs } from "react/jsx-runtime";
24
- var BrandLogo = ({ className, size = 32 }) => {
25
- return /* @__PURE__ */ jsxs(
26
- "svg",
27
- {
28
- width: size,
29
- height: size,
30
- viewBox: "0 0 100 100",
31
- fill: "none",
32
- xmlns: "http://www.w3.org/2000/svg",
33
- className: cn("shrink-0", className),
34
- children: [
35
- /* @__PURE__ */ jsx(
36
- "rect",
37
- {
38
- x: "15",
39
- y: "65",
40
- width: "70",
41
- height: "15",
42
- rx: "4",
43
- fill: "hsl(var(--primary))"
44
- }
45
- ),
46
- /* @__PURE__ */ jsx(
47
- "rect",
48
- {
49
- x: "25",
50
- y: "25",
51
- width: "12",
52
- height: "40",
53
- rx: "2",
54
- fill: "hsl(var(--primary))"
55
- }
56
- ),
57
- /* @__PURE__ */ jsx(
58
- "rect",
59
- {
60
- x: "44",
61
- y: "35",
62
- width: "12",
63
- height: "30",
64
- rx: "2",
65
- fill: "hsl(var(--primary))"
66
- }
67
- ),
68
- /* @__PURE__ */ jsx(
69
- "rect",
70
- {
71
- x: "63",
72
- y: "20",
73
- width: "12",
74
- height: "45",
75
- rx: "2",
76
- fill: "hsl(var(--primary))"
77
- }
78
- ),
79
- /* @__PURE__ */ jsx(
80
- "rect",
81
- {
82
- x: "20",
83
- y: "45",
84
- width: "60",
85
- height: "10",
86
- rx: "2",
87
- fill: "hsl(var(--secondary))"
88
- }
89
- ),
90
- /* @__PURE__ */ jsx(
91
- "circle",
92
- {
93
- cx: "50",
94
- cy: "20",
95
- r: "5",
96
- fill: "hsl(var(--secondary))"
97
- }
98
- )
99
- ]
100
- }
101
- );
102
- };
103
-
104
- // src/domains/layouts/components/DashboardSidebar.tsx
105
- import { PenTool, Menu, ChevronLeft, ChevronDown, ChevronRight } from "lucide-react";
106
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
107
-
108
- // src/domains/layouts/components/DashboardHeader.tsx
109
- import React, { useState as useState2 } from "react";
110
- import {
111
- Bell,
112
- X,
113
- Sun,
114
- Moon,
115
- Menu as Menu2,
116
- User,
117
- Settings,
118
- LogOut,
119
- ChevronDown as ChevronDown2,
120
- CreditCard
121
- } from "lucide-react";
122
- import { Button as Button2 } from "@umituz/web-design-system/atoms";
123
- import { useNavigate } from "react-router-dom";
124
- import { useTranslation as useTranslation2 } from "react-i18next";
125
- import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
126
-
127
- // src/domains/layouts/components/DashboardLayout.tsx
128
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
129
-
130
- // src/domains/onboarding/components/OnboardingWizard.tsx
131
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
132
- var StepProgress = ({ currentStep, totalSteps, completedSteps = [] }) => {
133
- return /* @__PURE__ */ jsx5("div", { className: "flex items-center gap-0 flex-1 justify-center", children: Array.from({ length: totalSteps }, (_, i) => i + 1).map((step) => {
134
- const isCompleted = completedSteps.includes(step) || step < currentStep;
135
- const isCurrent = step === currentStep;
136
- return /* @__PURE__ */ jsxs5("div", { className: "flex items-center", children: [
137
- /* @__PURE__ */ jsx5(
138
- "div",
139
- {
140
- className: cn2(
141
- "w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold transition-colors",
142
- isCompleted || isCurrent ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
143
- ),
144
- children: isCompleted ? /* @__PURE__ */ jsx5(Check, { className: "h-4 w-4" }) : step
145
- }
146
- ),
147
- step < totalSteps && /* @__PURE__ */ jsx5(
148
- "div",
149
- {
150
- className: cn2(
151
- "w-12 h-0.5 mx-1",
152
- step < currentStep ? "bg-primary" : "bg-border"
153
- )
154
- }
155
- )
156
- ] }, step);
157
- }) });
158
- };
159
- var StepNavigation = ({
160
- currentStep,
161
- totalSteps,
162
- canGoNext,
163
- isSaving = false,
164
- nextLabel,
165
- prevLabel,
166
- onNext,
167
- onPrev,
168
- allowSkip = false,
169
- onSkip
170
- }) => {
171
- const t = (key) => key;
172
- return /* @__PURE__ */ jsxs5("footer", { className: "bg-background border-t border-border px-8 py-6 flex items-center justify-between", children: [
173
- currentStep > 1 ? /* @__PURE__ */ jsxs5(
174
- Button3,
175
- {
176
- variant: "ghost",
177
- onClick: onPrev,
178
- className: "rounded-full px-6",
179
- disabled: isSaving,
180
- children: [
181
- "\u2190 ",
182
- prevLabel || t("onboarding.buttons.back")
183
- ]
184
- }
185
- ) : /* @__PURE__ */ jsx5("div", {}),
186
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-3", children: [
187
- allowSkip && onSkip && currentStep < totalSteps && /* @__PURE__ */ jsx5(
188
- Button3,
189
- {
190
- variant: "ghost",
191
- onClick: onSkip,
192
- className: "rounded-full px-6",
193
- disabled: isSaving,
194
- children: t("onboarding.buttons.skip")
195
- }
196
- ),
197
- /* @__PURE__ */ jsx5(
198
- Button3,
199
- {
200
- onClick: onNext,
201
- className: "rounded-full px-12 h-12 text-base font-bold",
202
- disabled: !canGoNext || isSaving,
203
- children: isSaving ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
204
- /* @__PURE__ */ jsx5(Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
205
- t("onboarding.buttons.finalizing")
206
- ] }) : currentStep === totalSteps ? nextLabel || t("onboarding.buttons.getStarted") : t("onboarding.buttons.next")
207
- }
208
- )
209
- ] })
210
- ] });
211
- };
212
- var OnboardingWizard = ({
213
- config,
214
- initialState,
215
- onComplete,
216
- onCancel
217
- }) => {
218
- const navigate = useNavigate2();
219
- const [currentStep, setCurrentStep] = useState4(1);
220
- const [saving, setSaving] = useState4(false);
221
- const [completedSteps, setCompletedSteps] = useState4([]);
222
- const [state, setState] = useState4({
223
- currentStep: 1,
224
- connectedPlatforms: [],
225
- billingCycle: "monthly",
226
- stepData: {},
227
- ...initialState
228
- });
229
- const totalSteps = config.steps.length;
230
- const canGoNext = useCallback(() => {
231
- const currentStepConfig2 = config.steps[currentStep - 1];
232
- if (currentStepConfig2?.validate) {
233
- return currentStepConfig2.validate(state);
234
- }
235
- return true;
236
- }, [config.steps, currentStep, state]);
237
- const goToNext = useCallback(async () => {
238
- if (currentStep < totalSteps) {
239
- setCompletedSteps((prev) => [...prev, currentStep]);
240
- setCurrentStep((prev) => prev + 1);
241
- setState((prev) => ({ ...prev, currentStep: prev.currentStep + 1 }));
242
- } else {
243
- setSaving(true);
244
- try {
245
- await onComplete?.(state);
246
- navigate(config.completeRoute);
247
- } catch (error) {
248
- console.error("Onboarding completion error:", error);
249
- setSaving(false);
250
- }
251
- }
252
- }, [currentStep, totalSteps, state, onComplete, navigate, config.completeRoute]);
253
- const goToPrev = useCallback(() => {
254
- if (currentStep > 1) {
255
- setCurrentStep((prev) => prev - 1);
256
- setState((prev) => ({ ...prev, currentStep: prev.currentStep - 1 }));
257
- }
258
- }, [currentStep]);
259
- const goToStep = useCallback((step) => {
260
- if (step >= 1 && step <= totalSteps) {
261
- setCurrentStep(step);
262
- setState((prev) => ({ ...prev, currentStep: step }));
263
- }
264
- }, [totalSteps]);
265
- const updateState = useCallback((updates) => {
266
- setState((prev) => ({ ...prev, ...updates }));
267
- }, []);
268
- const handleCancel = useCallback(() => {
269
- onCancel?.();
270
- navigate(config.cancelRoute || "/");
271
- }, [onCancel, navigate, config.cancelRoute]);
272
- const handleSkip = useCallback(() => {
273
- if (currentStep < totalSteps) {
274
- goToNext();
275
- }
276
- }, [currentStep, totalSteps, goToNext]);
277
- const currentStepConfig = config.steps[currentStep - 1];
278
- const StepContent = currentStepConfig?.component;
279
- return /* @__PURE__ */ jsxs5("div", { className: "min-h-screen bg-secondary flex flex-col", children: [
280
- /* @__PURE__ */ jsxs5("header", { className: "bg-background border-b border-border px-6 py-3 flex items-center", children: [
281
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2 mr-8", children: [
282
- /* @__PURE__ */ jsx5(BrandLogo, { size: 28 }),
283
- /* @__PURE__ */ jsx5("span", { className: "font-bold text-foreground", children: config.brandName })
284
- ] }),
285
- config.showProgress !== false && /* @__PURE__ */ jsx5(
286
- StepProgress,
287
- {
288
- currentStep,
289
- totalSteps,
290
- completedSteps
291
- }
292
- ),
293
- /* @__PURE__ */ jsx5("div", { className: "w-24" })
294
- ] }),
295
- /* @__PURE__ */ jsx5("main", { className: "flex-1 flex flex-col items-center justify-center px-4 py-12", children: /* @__PURE__ */ jsx5("div", { className: "w-full max-w-4xl", children: StepContent ? (
296
- // Check if it's a function component (has call signature)
297
- typeof StepContent === "function" ? /* @__PURE__ */ jsx5(
298
- StepContent,
299
- {
300
- state,
301
- updateState,
302
- goToNext,
303
- goToPrev,
304
- goToStep,
305
- config
306
- }
307
- ) : (
308
- // Otherwise it's a ReactElement
309
- StepContent
310
- )
311
- ) : null }) }),
312
- /* @__PURE__ */ jsx5(
313
- StepNavigation,
314
- {
315
- currentStep,
316
- totalSteps,
317
- canGoNext: canGoNext(),
318
- isSaving: saving,
319
- onNext: goToNext,
320
- onPrev: goToPrev,
321
- allowSkip: config.allowSkip,
322
- onSkip: handleSkip
323
- }
324
- )
325
- ] });
326
- };
327
-
328
- // src/domains/onboarding/components/UserTypeStep.tsx
329
- import { Check as Check2 } from "lucide-react";
330
- import { cn as cn3 } from "@umituz/web-design-system/utils";
331
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
332
- var UserTypeStep = ({
333
- state,
334
- updateState,
335
- options = []
336
- }) => {
337
- const defaultOptions = [
338
- {
339
- id: "founder",
340
- label: "Founder",
341
- description: "Building your own startup or business"
342
- },
343
- {
344
- id: "creator",
345
- label: "Content Creator",
346
- description: "Creating content for social media and platforms"
347
- },
348
- {
349
- id: "agency",
350
- label: "Agency",
351
- description: "Managing multiple client accounts"
352
- },
353
- {
354
- id: "enterprise",
355
- label: "Enterprise",
356
- description: "Large scale organization with teams"
357
- },
358
- {
359
- id: "small-business",
360
- label: "Small Business",
361
- description: "Local or niche business owner"
362
- },
363
- {
364
- id: "personal",
365
- label: "Personal",
366
- description: "Individual looking to grow personal brand"
367
- }
368
- ];
369
- const userTypeOptions = options.length > 0 ? options : defaultOptions;
370
- return /* @__PURE__ */ jsxs6("div", { className: "w-full max-w-xl", children: [
371
- /* @__PURE__ */ jsxs6("div", { className: "text-center mb-10", children: [
372
- /* @__PURE__ */ jsx6("h1", { className: "text-3xl md:text-4xl font-extrabold text-foreground mb-3", children: "What describes you best?" }),
373
- /* @__PURE__ */ jsx6("p", { className: "text-muted-foreground", children: "Select the option that best describes your situation" })
374
- ] }),
375
- /* @__PURE__ */ jsx6("div", { className: "grid grid-cols-1 gap-3", children: userTypeOptions.map((option) => {
376
- const isSelected = state.selectedUserType === option.id;
377
- const hasBadge = option.badge != null;
378
- const hasIcon = option.icon != null;
379
- return /* @__PURE__ */ jsxs6(
380
- "button",
381
- {
382
- onClick: () => updateState({ selectedUserType: option.id }),
383
- className: cn3(
384
- "w-full flex items-center gap-4 p-5 rounded-2xl border bg-background text-left transition-all group",
385
- isSelected ? "border-primary ring-2 ring-primary/20 bg-primary/5" : "border-border hover:border-primary/40 hover:bg-muted/50"
386
- ),
387
- children: [
388
- /* @__PURE__ */ jsx6(
389
- "div",
390
- {
391
- className: cn3(
392
- "w-6 h-6 rounded-full border-2 flex items-center justify-center shrink-0 transition-colors",
393
- isSelected ? "border-primary bg-primary text-white" : "border-muted-foreground/30"
394
- ),
395
- children: isSelected && /* @__PURE__ */ jsx6(Check2, { className: "h-4 w-4" })
396
- }
397
- ),
398
- /* @__PURE__ */ jsxs6("div", { className: "flex-1", children: [
399
- /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
400
- /* @__PURE__ */ jsx6("p", { className: "font-bold text-foreground", children: option.label }),
401
- hasBadge && /* @__PURE__ */ jsx6("span", { className: "text-[10px] font-bold uppercase tracking-wider px-2 py-0.5 rounded-full bg-primary/10 text-primary", children: option.badge })
402
- ] }),
403
- /* @__PURE__ */ jsx6("p", { className: "text-sm text-muted-foreground mt-0.5", children: option.description })
404
- ] }),
405
- hasIcon && option.icon && /* @__PURE__ */ jsx6("div", { className: "w-10 h-10 rounded-xl bg-muted flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx6(option.icon, { className: "h-5 w-5 text-muted-foreground" }) })
406
- ]
407
- },
408
- option.id
409
- );
410
- }) })
411
- ] });
412
- };
413
-
414
- // src/domains/onboarding/components/AppFocusStep.tsx
415
- import { Check as Check3 } from "lucide-react";
416
- import { cn as cn4 } from "@umituz/web-design-system/utils";
417
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
418
- var AppFocusStep = ({
419
- state,
420
- updateState,
421
- appTypes
422
- }) => {
423
- const defaultAppTypes = [
424
- {
425
- id: "mobile",
426
- label: "Mobile App",
427
- description: "iOS or Android application",
428
- icon: "\u{1F4F1}"
429
- },
430
- {
431
- id: "web",
432
- label: "Web App",
433
- description: "Web application or website",
434
- icon: "\u{1F4BB}"
435
- }
436
- ];
437
- const types = appTypes || defaultAppTypes;
438
- return /* @__PURE__ */ jsxs7("div", { className: "w-full max-w-xl", children: [
439
- /* @__PURE__ */ jsxs7("div", { className: "text-center mb-10", children: [
440
- /* @__PURE__ */ jsx7("h1", { className: "text-3xl md:text-4xl font-extrabold text-foreground mb-3", children: "What type of app are you building?" }),
441
- /* @__PURE__ */ jsx7("p", { className: "text-muted-foreground", children: "Select all that apply - you can change this later" })
442
- ] }),
443
- /* @__PURE__ */ jsx7("div", { className: "grid grid-cols-1 gap-4", children: types.map((type) => {
444
- const isSelected = type.id === "mobile" ? state.hasMobileApp : state.hasWebApp;
445
- return /* @__PURE__ */ jsxs7(
446
- "button",
447
- {
448
- onClick: () => {
449
- if (type.id === "mobile") {
450
- updateState({ hasMobileApp: !state.hasMobileApp });
451
- } else {
452
- updateState({ hasWebApp: !state.hasWebApp });
453
- }
454
- },
455
- className: cn4(
456
- "w-full flex items-center gap-4 p-6 rounded-2xl border bg-background text-left transition-all",
457
- isSelected ? "border-primary ring-2 ring-primary/20 bg-primary/5" : "border-border hover:border-primary/40"
458
- ),
459
- children: [
460
- /* @__PURE__ */ jsx7(
461
- "div",
462
- {
463
- className: cn4(
464
- "w-12 h-12 rounded-2xl bg-muted flex items-center justify-center text-2xl shrink-0 transition-transform",
465
- isSelected && "scale-110"
466
- ),
467
- children: type.icon
468
- }
469
- ),
470
- /* @__PURE__ */ jsxs7("div", { className: "flex-1", children: [
471
- /* @__PURE__ */ jsx7("p", { className: "font-bold text-foreground text-lg", children: type.label }),
472
- /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: type.description })
473
- ] }),
474
- /* @__PURE__ */ jsx7(
475
- "div",
476
- {
477
- className: cn4(
478
- "w-6 h-6 rounded-full border-2 flex items-center justify-center shrink-0 transition-colors",
479
- isSelected ? "border-primary bg-primary text-white" : "border-muted-foreground/30"
480
- ),
481
- children: isSelected && /* @__PURE__ */ jsx7(Check3, { className: "h-4 w-4" })
482
- }
483
- )
484
- ]
485
- },
486
- type.id
487
- );
488
- }) }),
489
- (state.hasMobileApp || state.hasWebApp) && /* @__PURE__ */ jsx7("p", { className: "mt-8 text-center text-sm text-muted-foreground animate-in fade-in slide-in-from-bottom-2 duration-500", children: "\u2728 Great choice! We'll tailor your experience accordingly." })
490
- ] });
491
- };
492
-
493
- // src/domains/onboarding/components/PlatformsStep.tsx
494
- import { cn as cn5 } from "@umituz/web-design-system/utils";
495
- import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
496
- var PlatformsStep = ({
497
- state,
498
- updateState,
499
- platforms
500
- }) => {
501
- const defaultPlatforms = [
502
- { id: "instagram", name: "Instagram", icon: "\u{1F4F8}", color: "bg-gradient-to-br from-purple-500 to-pink-500" },
503
- { id: "twitter", name: "Twitter / X", icon: "\u{1F426}", color: "bg-black" },
504
- { id: "facebook", name: "Facebook", icon: "\u{1F44D}", color: "bg-blue-600" },
505
- { id: "linkedin", name: "LinkedIn", icon: "\u{1F4BC}", color: "bg-blue-700" },
506
- { id: "tiktok", name: "TikTok", icon: "\u{1F3B5}", color: "bg-black" },
507
- { id: "youtube", name: "YouTube", icon: "\u{1F4FA}", color: "bg-red-600" },
508
- { id: "pinterest", name: "Pinterest", icon: "\u{1F4CC}", color: "bg-red-700" },
509
- { id: "threads", name: "Threads", icon: "\u{1F9F5}", color: "bg-black" }
510
- ];
511
- const platformOptions = platforms || defaultPlatforms;
512
- const togglePlatform = (id) => {
513
- const isConnected = state.connectedPlatforms.includes(id);
514
- updateState({
515
- connectedPlatforms: isConnected ? state.connectedPlatforms.filter((p) => p !== id) : [...state.connectedPlatforms, id]
516
- });
517
- };
518
- return /* @__PURE__ */ jsxs8("div", { className: "w-full max-w-4xl", children: [
519
- /* @__PURE__ */ jsxs8("div", { className: "text-center mb-10", children: [
520
- /* @__PURE__ */ jsx8("h1", { className: "text-3xl md:text-4xl font-extrabold text-foreground mb-3", children: "Connect your platforms" }),
521
- /* @__PURE__ */ jsx8("p", { className: "text-muted-foreground", children: "Select the platforms you want to manage - you can add more later" })
522
- ] }),
523
- /* @__PURE__ */ jsx8("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4", children: platformOptions.map((platform) => {
524
- const isConnected = state.connectedPlatforms.includes(platform.id);
525
- return /* @__PURE__ */ jsxs8(
526
- "button",
527
- {
528
- onClick: () => togglePlatform(platform.id),
529
- className: cn5(
530
- "group bg-background border rounded-2xl p-6 flex flex-col items-center gap-4 transition-all hover:scale-[1.02]",
531
- isConnected ? "border-primary ring-2 ring-primary/20 bg-primary/5" : "border-border hover:border-primary/40"
532
- ),
533
- children: [
534
- /* @__PURE__ */ jsx8(
535
- "div",
536
- {
537
- className: cn5(
538
- "w-12 h-12 rounded-2xl bg-muted flex items-center justify-center text-2xl group-hover:scale-110 transition-transform",
539
- platform.color
540
- ),
541
- children: platform.icon
542
- }
543
- ),
544
- /* @__PURE__ */ jsxs8("div", { className: "flex flex-col items-center", children: [
545
- /* @__PURE__ */ jsx8("span", { className: "font-bold text-foreground text-sm", children: platform.name }),
546
- /* @__PURE__ */ jsx8(
547
- "span",
548
- {
549
- className: cn5(
550
- "text-[10px] font-bold uppercase tracking-wider mt-1 transition-colors",
551
- isConnected ? "text-primary" : "text-muted-foreground"
552
- ),
553
- children: isConnected ? "Connected" : "Connect"
554
- }
555
- )
556
- ] })
557
- ]
558
- },
559
- platform.id
560
- );
561
- }) }),
562
- state.connectedPlatforms.length > 0 && /* @__PURE__ */ jsxs8("p", { className: "mt-8 text-center text-sm text-muted-foreground animate-in fade-in", children: [
563
- "\u2728 ",
564
- state.connectedPlatforms.length,
565
- " platform",
566
- state.connectedPlatforms.length > 1 ? "s" : "",
567
- " selected"
568
- ] })
569
- ] });
570
- };
571
-
572
- // src/domains/onboarding/components/PlanStep.tsx
573
- import { Check as Check4 } from "lucide-react";
574
- import { cn as cn6 } from "@umituz/web-design-system/utils";
575
- import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
576
- var PlanStep = ({
577
- state,
578
- updateState,
579
- plans
580
- }) => {
581
- const defaultPlans = [
582
- {
583
- id: "standard",
584
- name: "Standard",
585
- badge: "Most Popular",
586
- badgeColor: "bg-muted text-muted-foreground",
587
- description: "Perfect for individuals and small businesses",
588
- price: 12,
589
- features: [
590
- { text: "3 Social Accounts", bold: true },
591
- "100 posts per month",
592
- "Basic Analytics",
593
- "Email Support"
594
- ]
595
- },
596
- {
597
- id: "pro",
598
- name: "Pro",
599
- badge: "Best Value",
600
- badgeColor: "bg-primary text-primary-foreground",
601
- description: "For growing businesses and teams",
602
- price: 29,
603
- features: [
604
- { text: "15 Social Accounts", bold: true },
605
- "Unlimited posts",
606
- "Advanced Analytics",
607
- "AI Caption Suggestions",
608
- { text: "5 Team Members", bold: true },
609
- "Priority Support"
610
- ],
611
- highlight: true
612
- },
613
- {
614
- id: "enterprise",
615
- name: "Enterprise",
616
- badge: "Custom",
617
- badgeColor: "bg-purple-600 text-white",
618
- description: "For large organizations with custom needs",
619
- price: 99,
620
- features: [
621
- { text: "Unlimited Accounts", bold: true },
622
- "Unlimited everything",
623
- "Custom Integrations",
624
- "Dedicated Account Manager",
625
- "24/7 Phone Support",
626
- "SLA Guarantee"
627
- ]
628
- }
629
- ];
630
- const planOptions = plans || defaultPlans;
631
- const getPlanPrice = (plan) => {
632
- const basePrice = plan.price;
633
- return state.billingCycle === "yearly" ? basePrice * 12 * 0.8 : basePrice;
634
- };
635
- return /* @__PURE__ */ jsxs9("div", { className: "w-full max-w-5xl", children: [
636
- /* @__PURE__ */ jsxs9("div", { className: "text-center mb-8", children: [
637
- /* @__PURE__ */ jsx9("h1", { className: "text-3xl md:text-4xl font-extrabold text-foreground mb-3", children: "Choose your plan" }),
638
- /* @__PURE__ */ jsx9("p", { className: "text-muted-foreground text-lg", children: "Start with a 14-day free trial - no credit card required" })
639
- ] }),
640
- /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-center gap-2 mb-12", children: /* @__PURE__ */ jsxs9("div", { className: "flex bg-muted rounded-full p-1.5 border border-border", children: [
641
- /* @__PURE__ */ jsx9(
642
- "button",
643
- {
644
- onClick: () => updateState({ billingCycle: "monthly" }),
645
- className: cn6(
646
- "px-6 py-2 rounded-full text-sm font-bold transition-all",
647
- state.billingCycle === "monthly" ? "bg-primary text-primary-foreground shadow-lg shadow-primary/20" : "text-muted-foreground hover:text-foreground"
648
- ),
649
- children: "Monthly"
650
- }
651
- ),
652
- /* @__PURE__ */ jsxs9(
653
- "button",
654
- {
655
- onClick: () => updateState({ billingCycle: "yearly" }),
656
- className: cn6(
657
- "px-6 py-2 rounded-full text-sm font-bold transition-all flex items-center gap-2",
658
- state.billingCycle === "yearly" ? "bg-primary text-primary-foreground shadow-lg shadow-primary/20" : "text-muted-foreground hover:text-foreground"
659
- ),
660
- children: [
661
- "Yearly",
662
- /* @__PURE__ */ jsx9(
663
- "span",
664
- {
665
- className: cn6(
666
- "text-[10px] px-1.5 py-0.5 rounded-full transition-colors",
667
- state.billingCycle === "yearly" ? "bg-white/20 text-white" : "bg-green-500/10 text-green-600"
668
- ),
669
- children: "Save 20%"
670
- }
671
- )
672
- ]
673
- }
674
- )
675
- ] }) }),
676
- /* @__PURE__ */ jsx9("div", { className: "grid md:grid-cols-3 gap-8", children: planOptions.map((plan) => {
677
- const isSelected = state.selectedPlan === plan.id;
678
- const planPrice = getPlanPrice(plan);
679
- return /* @__PURE__ */ jsxs9(
680
- "button",
681
- {
682
- onClick: () => updateState({ selectedPlan: plan.id }),
683
- className: cn6(
684
- "bg-background border-2 rounded-[32px] p-8 text-left transition-all hover:translate-y-[-4px] relative",
685
- isSelected ? "border-primary ring-4 ring-primary/10" : "border-border hover:border-primary/40",
686
- plan.highlight && "shadow-xl"
687
- ),
688
- children: [
689
- plan.highlight && /* @__PURE__ */ jsx9("div", { className: "absolute -top-3 left-1/2 -translate-x-1/2 bg-gradient-to-r from-primary to-purple-600 text-white text-[10px] font-black uppercase tracking-widest px-4 py-1 rounded-full", children: "Recommended" }),
690
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between mb-4", children: [
691
- /* @__PURE__ */ jsx9("h3", { className: "text-2xl font-black text-foreground", children: plan.name }),
692
- plan.badge && /* @__PURE__ */ jsx9(
693
- "div",
694
- {
695
- className: cn6(
696
- "text-[10px] font-black uppercase tracking-widest px-3 py-1 rounded-full",
697
- plan.badgeColor
698
- ),
699
- children: plan.badge
700
- }
701
- )
702
- ] }),
703
- /* @__PURE__ */ jsx9("p", { className: "text-muted-foreground mb-8 font-medium", children: plan.description }),
704
- /* @__PURE__ */ jsxs9("div", { className: "flex items-baseline gap-1 mb-8", children: [
705
- /* @__PURE__ */ jsxs9("span", { className: "text-5xl font-black text-foreground", children: [
706
- "$",
707
- Math.round(planPrice)
708
- ] }),
709
- /* @__PURE__ */ jsx9("span", { className: "text-lg font-bold text-muted-foreground", children: "/mo" })
710
- ] }),
711
- /* @__PURE__ */ jsx9("ul", { className: "space-y-4", children: plan.features.map((feature, i) => {
712
- const text = typeof feature === "string" ? feature : feature.text;
713
- const bold = typeof feature !== "string" && feature.bold;
714
- return /* @__PURE__ */ jsxs9("li", { className: "flex items-start gap-3 text-sm font-medium", children: [
715
- /* @__PURE__ */ jsx9("div", { className: "w-5 h-5 rounded-full bg-primary/10 flex items-center justify-center shrink-0 mt-0.5", children: /* @__PURE__ */ jsx9(Check4, { className: "h-3 w-3 text-primary" }) }),
716
- /* @__PURE__ */ jsx9("span", { className: cn6("text-foreground/90", bold && "font-black"), children: text })
717
- ] }, i);
718
- }) })
719
- ]
720
- },
721
- plan.id
722
- );
723
- }) }),
724
- state.selectedPlan && /* @__PURE__ */ jsxs9("p", { className: "mt-8 text-center text-sm text-muted-foreground animate-in fade-in", children: [
725
- "\u2728 Great choice! You selected the ",
726
- planOptions.find((p) => p.id === state.selectedPlan)?.name,
727
- " plan"
728
- ] })
729
- ] });
730
- };
731
- export {
732
- AppFocusStep,
733
- OnboardingWizard,
734
- PlanStep,
735
- PlatformsStep,
736
- UserTypeStep
737
- };
738
- //# sourceMappingURL=index.js.map