@dynamic-mockups/design-system 0.1.2 → 0.2.3

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.
@@ -0,0 +1,31 @@
1
+ /**
2
+ * OnboardingArtwork Component
3
+ * Full-screen artwork display with gradient background and grid pattern
4
+ */
5
+ import React from "react";
6
+ import "./OnboardingArtwork.scss";
7
+ export interface OnboardingArtworkProps {
8
+ /**
9
+ * Background gradient start color
10
+ * @default "#0292ff"
11
+ */
12
+ gradientStart?: string;
13
+ /**
14
+ * Background gradient end color
15
+ * @default "#cae8ff"
16
+ */
17
+ gradientEnd?: string;
18
+ /**
19
+ * Grid pattern image source
20
+ */
21
+ gridImageSrc?: string;
22
+ /**
23
+ * Main artwork image source
24
+ */
25
+ artworkImageSrc?: string;
26
+ /**
27
+ * Custom className
28
+ */
29
+ className?: string;
30
+ }
31
+ export declare const OnboardingArtwork: React.ForwardRefExoticComponent<OnboardingArtworkProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * OnboardingArtwork Stories
3
+ */
4
+ import type { StoryObj } from "@storybook/react-vite";
5
+ declare const meta: {
6
+ title: string;
7
+ component: import("react").ForwardRefExoticComponent<import("./OnboardingArtwork").OnboardingArtworkProps & import("react").RefAttributes<HTMLDivElement>>;
8
+ parameters: {
9
+ layout: string;
10
+ };
11
+ tags: string[];
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof meta>;
15
+ export declare const Default: Story;
16
+ export declare const CustomColors: Story;
@@ -0,0 +1,2 @@
1
+ export { OnboardingArtwork } from "./OnboardingArtwork";
2
+ export type { OnboardingArtworkProps } from "./OnboardingArtwork";
@@ -0,0 +1,34 @@
1
+ /**
2
+ * OnboardingFlow Configuration
3
+ * Complete data structure with REAL data extracted from Figma
4
+ */
5
+ import type { OnboardingFlowConfig } from "./OnboardingFlow.types";
6
+ /**
7
+ * Complete onboarding flow configuration with real Figma data
8
+ * Implements dynamic conditional flows based on user's journey stage and subsequent selections:
9
+ *
10
+ * EXPLORER PATH (exploring):
11
+ * 1. Journey stage → 2. Explorer result (2 steps total)
12
+ *
13
+ * GETTING STARTED PATH (getting-started):
14
+ * 1. Journey stage → 2. Currently selling? → Branch:
15
+ * - If "Yes": 3. Best sellers → 4. Personalization → 5. Active Seller result (5 steps)
16
+ * - If "No": 3. Products to sell → 4. Launcher result (4 steps)
17
+ *
18
+ * ESTABLISHED STORE PATH (established):
19
+ * 1. Journey stage → 2. Where you sell → 3. Advertising (Yes/No + conditional) → Branch:
20
+ * - If "Yes" + "Optimizing": Conversion Pro result (4 steps)
21
+ * - If "Yes" + "Scaling": Growth Accelerator result (4 steps)
22
+ * - If "Yes" + "Expanding": Empire Builder result (4 steps)
23
+ * - If "No": Organic Grower result (4 steps)
24
+ *
25
+ * API & INFRASTRUCTURE PATH (api):
26
+ * 1. Journey stage → 2. Business type → Branch:
27
+ * - If "Startup": 3. Role & Team size (combined) → 4. Startup Builder result (4 steps)
28
+ * - If "Established Company": 3. Role & Team size (combined) → 4. Enterprise Partner result (4 steps)
29
+ * - If "Agency/Automation/Solopreneur": 3. Integration type → Branch:
30
+ * * "Simple": Embed Builder result (4 steps)
31
+ * * "Automations": Workflow Automator result (4 steps)
32
+ * * "Custom": API Developer result (4 steps)
33
+ */
34
+ export declare const fullOnboardingFlowConfig: OnboardingFlowConfig;
@@ -0,0 +1,218 @@
1
+ /**
2
+ * OnboardingFlow Types
3
+ * Comprehensive type definitions for building complete onboarding flows
4
+ */
5
+ import type { OnboardingRadioOption } from "./OnboardingTemplate";
6
+ import type { CheckboxChipOption } from "../../molecules/CheckboxChip/CheckboxChipGroup";
7
+ import type { OnboardingInfoItem } from "../../organisms/OnboardingInfoBox/OnboardingInfoBox";
8
+ /**
9
+ * Type of onboarding step variation
10
+ */
11
+ export type OnboardingStepType = "radio" | "checkbox-no-icon" | "checkbox-with-icon" | "buttons-plus-radio" | "know-your-customer" | "double-radio" | "launcher" | "artwork" | "split-screen";
12
+ /**
13
+ * Base step configuration shared across all step types
14
+ */
15
+ export interface OnboardingStepBase {
16
+ /**
17
+ * Unique identifier for this step
18
+ */
19
+ id: string;
20
+ /**
21
+ * Step variation type
22
+ */
23
+ type: OnboardingStepType;
24
+ /**
25
+ * Welcome heading text
26
+ */
27
+ welcomeHeading?: string;
28
+ /**
29
+ * Welcome subtext
30
+ */
31
+ welcomeSubtext?: string;
32
+ /**
33
+ * Main headline question
34
+ */
35
+ headline?: string;
36
+ /**
37
+ * Optional validation function to determine if step is complete
38
+ */
39
+ validate?: (data: Record<string, any>) => boolean;
40
+ /**
41
+ * Optional callback when step is entered
42
+ */
43
+ onEnter?: () => void;
44
+ /**
45
+ * Optional callback when step is exited
46
+ */
47
+ onExit?: () => void;
48
+ }
49
+ /**
50
+ * Radio selection step configuration
51
+ */
52
+ export interface OnboardingRadioStep extends OnboardingStepBase {
53
+ type: "radio" | "split-screen";
54
+ radioOptions: OnboardingRadioOption[];
55
+ /**
56
+ * Optional second question text (for multi-question screens)
57
+ */
58
+ secondQuestion?: string;
59
+ /**
60
+ * Key in the data object where the selected value is stored
61
+ */
62
+ dataKey: string;
63
+ }
64
+ /**
65
+ * Checkbox selection step configuration
66
+ */
67
+ export interface OnboardingCheckboxStep extends OnboardingStepBase {
68
+ type: "checkbox-no-icon" | "checkbox-with-icon";
69
+ checkboxOptions: CheckboxChipOption[];
70
+ /**
71
+ * Key in the data object where the selected values array is stored
72
+ */
73
+ dataKey: string;
74
+ }
75
+ /**
76
+ * Yes/No with conditional radio step configuration
77
+ */
78
+ export interface OnboardingButtonsPlusRadioStep extends OnboardingStepBase {
79
+ type: "buttons-plus-radio";
80
+ yesNoQuestion: string;
81
+ secondQuestion: string;
82
+ radioOptions: OnboardingRadioOption[];
83
+ /**
84
+ * Key in the data object where yes/no answer is stored
85
+ */
86
+ yesNoDataKey: string;
87
+ /**
88
+ * Key in the data object where radio selection is stored
89
+ */
90
+ radioDataKey: string;
91
+ }
92
+ /**
93
+ * Know your customer (two sections) step configuration
94
+ */
95
+ export interface OnboardingKnowYourCustomerStep extends OnboardingStepBase {
96
+ type: "know-your-customer";
97
+ firstSectionQuestion: string;
98
+ firstSectionOptions: CheckboxChipOption[];
99
+ secondSectionQuestion: string;
100
+ secondSectionOptions: CheckboxChipOption[];
101
+ /**
102
+ * Key in the data object where first section value is stored
103
+ */
104
+ firstSectionDataKey: string;
105
+ /**
106
+ * Key in the data object where second section value is stored
107
+ */
108
+ secondSectionDataKey: string;
109
+ }
110
+ /**
111
+ * Double radio step configuration (two radio sections on one screen)
112
+ */
113
+ export interface OnboardingDoubleRadioStep extends OnboardingStepBase {
114
+ type: "double-radio";
115
+ firstQuestion: string;
116
+ firstRadioOptions: OnboardingRadioOption[];
117
+ secondQuestion: string;
118
+ secondRadioOptions: OnboardingRadioOption[];
119
+ /**
120
+ * Key in the data object where first radio selection is stored
121
+ */
122
+ firstDataKey: string;
123
+ /**
124
+ * Key in the data object where second radio selection is stored
125
+ */
126
+ secondDataKey: string;
127
+ }
128
+ /**
129
+ * Launcher step configuration (informational with CTA)
130
+ */
131
+ export interface OnboardingLauncherStep extends OnboardingStepBase {
132
+ type: "launcher";
133
+ launcherIcon: string;
134
+ launcherHeadline: string;
135
+ launcherText: string;
136
+ launcherSubtext: string;
137
+ infoBoxTitle: string;
138
+ infoBoxItems: OnboardingInfoItem[];
139
+ ctaLabel: string;
140
+ ctaHeading: string;
141
+ ctaDescription: string;
142
+ ctaButtonText: string;
143
+ /**
144
+ * Optional callback when CTA button is clicked
145
+ */
146
+ onCTAClick?: () => void;
147
+ }
148
+ /**
149
+ * Artwork step configuration (visual only)
150
+ */
151
+ export interface OnboardingArtworkStep extends OnboardingStepBase {
152
+ type: "artwork";
153
+ artworkBackgroundImage?: string;
154
+ artworkImage?: string;
155
+ }
156
+ /**
157
+ * Union type of all possible step configurations
158
+ */
159
+ export type OnboardingStep = OnboardingRadioStep | OnboardingCheckboxStep | OnboardingButtonsPlusRadioStep | OnboardingKnowYourCustomerStep | OnboardingDoubleRadioStep | OnboardingLauncherStep | OnboardingArtworkStep;
160
+ /**
161
+ * Complete onboarding flow configuration
162
+ */
163
+ export interface OnboardingFlowConfig {
164
+ /**
165
+ * Logo image source
166
+ */
167
+ logoSrc?: string;
168
+ /**
169
+ * Array of steps in the flow
170
+ */
171
+ steps: OnboardingStep[];
172
+ /**
173
+ * Initial data values
174
+ */
175
+ initialData?: Record<string, any>;
176
+ /**
177
+ * Artwork configuration for split-screen variation
178
+ */
179
+ artwork?: {
180
+ backgroundImage?: string;
181
+ artworkImage?: string;
182
+ };
183
+ /**
184
+ * Optional function to dynamically determine which steps to show based on collected data
185
+ * Returns array of step IDs to display
186
+ */
187
+ getFlowPath?: (data: Record<string, any>) => string[];
188
+ }
189
+ /**
190
+ * Collected data from the onboarding flow
191
+ */
192
+ export interface OnboardingFlowData {
193
+ /**
194
+ * Dynamic key-value pairs collected from each step
195
+ */
196
+ [key: string]: any;
197
+ }
198
+ /**
199
+ * Event callbacks for the onboarding flow
200
+ */
201
+ export interface OnboardingFlowCallbacks {
202
+ /**
203
+ * Called when the current step changes
204
+ */
205
+ onStepChange?: (stepIndex: number, stepId: string) => void;
206
+ /**
207
+ * Called when any data changes
208
+ */
209
+ onDataChange?: (data: OnboardingFlowData) => void;
210
+ /**
211
+ * Called when the entire flow is completed
212
+ */
213
+ onComplete?: (data: OnboardingFlowData) => void;
214
+ /**
215
+ * Called when user goes back from the first step
216
+ */
217
+ onCancel?: () => void;
218
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * OnboardingFlowManager
3
+ * Manages complete multi-step onboarding flows
4
+ */
5
+ import React from "react";
6
+ import type { OnboardingFlowConfig, OnboardingFlowCallbacks } from "./OnboardingFlow.types";
7
+ export interface OnboardingFlowManagerProps extends OnboardingFlowConfig, OnboardingFlowCallbacks {
8
+ /**
9
+ * Custom className
10
+ */
11
+ className?: string;
12
+ }
13
+ export declare const OnboardingFlowManager: React.FC<OnboardingFlowManagerProps>;
@@ -8,7 +8,7 @@ import type { OnboardingInfoItem } from "../../organisms/OnboardingInfoBox/Onboa
8
8
  import "./OnboardingTemplate.scss";
9
9
  export interface OnboardingRadioOption {
10
10
  value: string;
11
- icon: string;
11
+ icon?: string;
12
12
  title: string;
13
13
  description: string;
14
14
  }
@@ -16,7 +16,7 @@ export interface OnboardingTemplateProps {
16
16
  /**
17
17
  * Template variation type
18
18
  */
19
- variation: "radio" | "checkbox-no-icon" | "checkbox-with-icon" | "buttons-plus-radio" | "know-your-customer" | "launcher" | "artwork";
19
+ variation: "radio" | "checkbox-no-icon" | "checkbox-with-icon" | "buttons-plus-radio" | "know-your-customer" | "double-radio" | "launcher" | "artwork" | "split-screen";
20
20
  /**
21
21
  * Current step (1-based)
22
22
  */
@@ -113,6 +113,34 @@ export interface OnboardingTemplateProps {
113
113
  * Second section option change handler
114
114
  */
115
115
  onSecondOptionChange?: (value: string) => void;
116
+ /**
117
+ * First question text (for double-radio)
118
+ */
119
+ firstQuestion?: string;
120
+ /**
121
+ * First radio options (for double-radio)
122
+ */
123
+ firstRadioOptions?: OnboardingRadioOption[];
124
+ /**
125
+ * Selected first radio option value
126
+ */
127
+ selectedFirstRadioOption?: string;
128
+ /**
129
+ * First radio option change handler
130
+ */
131
+ onFirstRadioChange?: (value: string) => void;
132
+ /**
133
+ * Second radio options (for double-radio)
134
+ */
135
+ secondRadioOptions?: OnboardingRadioOption[];
136
+ /**
137
+ * Selected second radio option value
138
+ */
139
+ selectedSecondRadioOption?: string;
140
+ /**
141
+ * Second radio option change handler
142
+ */
143
+ onSecondRadioChange?: (value: string) => void;
116
144
  /**
117
145
  * Icon name for launcher variation (Solar icon)
118
146
  */
@@ -181,5 +209,25 @@ export interface OnboardingTemplateProps {
181
209
  * Custom className
182
210
  */
183
211
  className?: string;
212
+ /**
213
+ * Called when step changes (before onContinue or onBack)
214
+ */
215
+ onStepChange?: (newStep: number) => void;
216
+ /**
217
+ * Called when any form data changes
218
+ */
219
+ onDataChange?: (data: Record<string, any>) => void;
220
+ /**
221
+ * Step identifier for tracking
222
+ */
223
+ stepId?: string;
224
+ /**
225
+ * Called when entering this step
226
+ */
227
+ onStepEnter?: () => void;
228
+ /**
229
+ * Called when exiting this step
230
+ */
231
+ onStepExit?: () => void;
184
232
  }
185
233
  export declare const OnboardingTemplate: React.ForwardRefExoticComponent<OnboardingTemplateProps & React.RefAttributes<HTMLDivElement>>;
@@ -24,3 +24,14 @@ export declare const Variation5_NoSelection: Story;
24
24
  export declare const Variation5_PartialSelection: Story;
25
25
  export declare const Variation6_Launcher: Story;
26
26
  export declare const Variation7_Artwork: Story;
27
+ export declare const Variation8_SplitScreen: Story;
28
+ /**
29
+ * Full Version: Complete Onboarding Flow
30
+ * Demonstrates a fully working multi-step onboarding experience with:
31
+ * - Automatic step progression
32
+ * - Data collection across all steps
33
+ * - Event callbacks for tracking
34
+ * - Validation and error handling
35
+ * - Complete journey from start to finish
36
+ */
37
+ export declare const Variation9_FullVersion: Story;
@@ -4,3 +4,7 @@
4
4
  */
5
5
  export { OnboardingTemplate } from "./OnboardingTemplate/OnboardingTemplate";
6
6
  export type { OnboardingTemplateProps, OnboardingRadioOption, } from "./OnboardingTemplate/OnboardingTemplate";
7
+ export { OnboardingFlowManager } from "./OnboardingTemplate/OnboardingFlowManager";
8
+ export type { OnboardingFlowManagerProps } from "./OnboardingTemplate/OnboardingFlowManager";
9
+ export type { OnboardingStepType, OnboardingStepBase, OnboardingRadioStep, OnboardingCheckboxStep, OnboardingButtonsPlusRadioStep, OnboardingKnowYourCustomerStep, OnboardingLauncherStep, OnboardingArtworkStep, OnboardingStep, OnboardingFlowConfig, OnboardingFlowData, OnboardingFlowCallbacks, } from "./OnboardingTemplate/OnboardingFlow.types";
10
+ export { fullOnboardingFlowConfig } from "./OnboardingTemplate/OnboardingFlow.config";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-mockups/design-system",
3
- "version": "0.1.2",
3
+ "version": "0.2.3",
4
4
  "description": "A professional, scalable design system built with React 18, TypeScript, Radix UI, and Storybook",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -16,12 +16,12 @@
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git@gitlab.designcopilot.io:design-copilot/design-system.git"
19
+ "url": "https://dynamicmockups.com"
20
20
  },
21
21
  "bugs": {
22
- "url": "https://gitlab.designcopilot.io/design-copilot/design-system/-/issues"
22
+ "url": "https://dynamicmockups.com"
23
23
  },
24
- "homepage": "https://gitlab.designcopilot.io/design-copilot/design-system#readme",
24
+ "homepage": "https://dynamicmockups.com",
25
25
  "exports": {
26
26
  ".": {
27
27
  "types": "./dist/index.d.ts",