@dynamic-mockups/design-system 0.2.9 → 0.2.11
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/dist/design-system.css +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3907 -3596
- package/dist/index.mjs.map +1 -1
- package/dist/src/components/atoms/TextArea/TextArea.d.ts +62 -0
- package/dist/src/components/atoms/TextArea/TextArea.stories.d.ts +178 -0
- package/dist/src/components/atoms/TextArea/index.d.ts +1 -0
- package/dist/src/components/molecules/Modal/Modal.d.ts +97 -0
- package/dist/src/components/molecules/Modal/Modal.stories.d.ts +64 -0
- package/dist/src/components/molecules/Modal/index.d.ts +2 -0
- package/dist/src/components/molecules/index.d.ts +2 -0
- package/dist/src/components/organisms/FlagBadMockups/FlagBadMockups.d.ts +27 -0
- package/dist/src/components/organisms/FlagBadMockups/FlagBadMockups.stories.d.ts +46 -0
- package/dist/src/components/organisms/FlagBadMockups/index.d.ts +2 -0
- package/dist/src/components/organisms/index.d.ts +2 -0
- package/dist/src/components/templates/OnboardingTemplate/OnboardingFlow.config.d.ts +2 -2
- package/dist/src/components/templates/OnboardingTemplate/OnboardingFlow.types.d.ts +16 -2
- package/dist/src/components/templates/OnboardingTemplate/OnboardingTemplate.d.ts +13 -1
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextArea Component
|
|
3
|
+
* A textarea component that extends Radix UI TextArea
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { TextAreaProps as RadixTextAreaProps } from "@radix-ui/themes";
|
|
7
|
+
import { type ColorToken } from "../../../tokens";
|
|
8
|
+
import "./TextArea.scss";
|
|
9
|
+
export type { ColorToken } from "../../../tokens";
|
|
10
|
+
export type TextAreaSize = "1" | "2" | "3";
|
|
11
|
+
export type TextAreaColor = "primary" | "secondary" | "accent" | "success" | "error" | "warning";
|
|
12
|
+
export type TextAreaResize = "none" | "vertical" | "horizontal" | "both";
|
|
13
|
+
export interface TextAreaProps extends Omit<RadixTextAreaProps, "size" | "color" | "m" | "mx" | "my" | "mt" | "mr" | "mb" | "ml"> {
|
|
14
|
+
/**
|
|
15
|
+
* TextArea size
|
|
16
|
+
* @default '2'
|
|
17
|
+
*/
|
|
18
|
+
size?: TextAreaSize;
|
|
19
|
+
/**
|
|
20
|
+
* TextArea color
|
|
21
|
+
* @default 'primary'
|
|
22
|
+
*/
|
|
23
|
+
color?: TextAreaColor;
|
|
24
|
+
/**
|
|
25
|
+
* Label text for the textarea
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Helper text displayed below the textarea
|
|
30
|
+
*/
|
|
31
|
+
helperText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Error message - when provided, textarea shows error state
|
|
34
|
+
*/
|
|
35
|
+
error?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Resize behavior
|
|
38
|
+
* @default 'vertical'
|
|
39
|
+
*/
|
|
40
|
+
resize?: TextAreaResize;
|
|
41
|
+
/**
|
|
42
|
+
* Color token for the textarea background
|
|
43
|
+
*/
|
|
44
|
+
backgroundColorToken?: ColorToken;
|
|
45
|
+
/**
|
|
46
|
+
* Color token for the textarea border
|
|
47
|
+
*/
|
|
48
|
+
borderColorToken?: ColorToken;
|
|
49
|
+
/**
|
|
50
|
+
* Color token for the textarea text
|
|
51
|
+
*/
|
|
52
|
+
textColorToken?: ColorToken;
|
|
53
|
+
/**
|
|
54
|
+
* Color token for the placeholder text
|
|
55
|
+
*/
|
|
56
|
+
placeholderColorToken?: ColorToken;
|
|
57
|
+
/**
|
|
58
|
+
* Color token for the focus border
|
|
59
|
+
*/
|
|
60
|
+
focusBorderColorToken?: ColorToken;
|
|
61
|
+
}
|
|
62
|
+
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
import type { ColorToken } from "./TextArea";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./TextArea").TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
argTypes: {
|
|
12
|
+
label: {
|
|
13
|
+
control: "text";
|
|
14
|
+
description: string;
|
|
15
|
+
table: {
|
|
16
|
+
category: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
placeholder: {
|
|
20
|
+
control: "text";
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
category: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
helperText: {
|
|
27
|
+
control: "text";
|
|
28
|
+
description: string;
|
|
29
|
+
table: {
|
|
30
|
+
category: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
error: {
|
|
34
|
+
control: "text";
|
|
35
|
+
description: string;
|
|
36
|
+
table: {
|
|
37
|
+
category: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
size: {
|
|
41
|
+
control: "select";
|
|
42
|
+
options: string[];
|
|
43
|
+
description: string;
|
|
44
|
+
table: {
|
|
45
|
+
category: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
color: {
|
|
49
|
+
control: "select";
|
|
50
|
+
options: string[];
|
|
51
|
+
description: string;
|
|
52
|
+
table: {
|
|
53
|
+
category: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
variant: {
|
|
57
|
+
control: "select";
|
|
58
|
+
options: string[];
|
|
59
|
+
description: string;
|
|
60
|
+
table: {
|
|
61
|
+
category: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
resize: {
|
|
65
|
+
control: "select";
|
|
66
|
+
options: string[];
|
|
67
|
+
description: string;
|
|
68
|
+
table: {
|
|
69
|
+
category: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
disabled: {
|
|
73
|
+
control: "boolean";
|
|
74
|
+
description: string;
|
|
75
|
+
table: {
|
|
76
|
+
category: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
rows: {
|
|
80
|
+
control: "number";
|
|
81
|
+
description: string;
|
|
82
|
+
table: {
|
|
83
|
+
category: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
backgroundColorToken: {
|
|
87
|
+
control: "select";
|
|
88
|
+
options: ColorToken[];
|
|
89
|
+
description: string;
|
|
90
|
+
table: {
|
|
91
|
+
category: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
borderColorToken: {
|
|
95
|
+
control: "select";
|
|
96
|
+
options: ColorToken[];
|
|
97
|
+
description: string;
|
|
98
|
+
table: {
|
|
99
|
+
category: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
textColorToken: {
|
|
103
|
+
control: "select";
|
|
104
|
+
options: ColorToken[];
|
|
105
|
+
description: string;
|
|
106
|
+
table: {
|
|
107
|
+
category: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
placeholderColorToken: {
|
|
111
|
+
control: "select";
|
|
112
|
+
options: ColorToken[];
|
|
113
|
+
description: string;
|
|
114
|
+
table: {
|
|
115
|
+
category: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
focusBorderColorToken: {
|
|
119
|
+
control: "select";
|
|
120
|
+
options: ColorToken[];
|
|
121
|
+
description: string;
|
|
122
|
+
table: {
|
|
123
|
+
category: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
m: {
|
|
127
|
+
table: {
|
|
128
|
+
disable: boolean;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
mx: {
|
|
132
|
+
table: {
|
|
133
|
+
disable: boolean;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
my: {
|
|
137
|
+
table: {
|
|
138
|
+
disable: boolean;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
mt: {
|
|
142
|
+
table: {
|
|
143
|
+
disable: boolean;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
mr: {
|
|
147
|
+
table: {
|
|
148
|
+
disable: boolean;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
mb: {
|
|
152
|
+
table: {
|
|
153
|
+
disable: boolean;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
ml: {
|
|
157
|
+
table: {
|
|
158
|
+
disable: boolean;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
export default meta;
|
|
164
|
+
type Story = StoryObj<typeof meta>;
|
|
165
|
+
export declare const Default: Story;
|
|
166
|
+
export declare const WithLabel: Story;
|
|
167
|
+
export declare const WithHelperText: Story;
|
|
168
|
+
export declare const WithError: Story;
|
|
169
|
+
export declare const WithValue: Story;
|
|
170
|
+
export declare const Disabled: Story;
|
|
171
|
+
export declare const DisabledWithValue: Story;
|
|
172
|
+
export declare const Sizes: Story;
|
|
173
|
+
export declare const ResizeOptions: Story;
|
|
174
|
+
export declare const Colors: Story;
|
|
175
|
+
export declare const Variants: Story;
|
|
176
|
+
export declare const CustomRows: Story;
|
|
177
|
+
export declare const LongFormExample: Story;
|
|
178
|
+
export declare const InteractiveColorPicker: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TextArea";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal Component
|
|
3
|
+
* A modal dialog component with Header, Content, and Footer sections built on top of the Dialog atom
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import type { DialogProps as RadixDialogProps } from "@radix-ui/react-dialog";
|
|
7
|
+
import { type ColorToken } from "../../../tokens";
|
|
8
|
+
import "./Modal.scss";
|
|
9
|
+
export type { ColorToken } from "../../../tokens";
|
|
10
|
+
export interface ModalProps extends Omit<RadixDialogProps, "children"> {
|
|
11
|
+
/**
|
|
12
|
+
* Modal trigger element
|
|
13
|
+
*/
|
|
14
|
+
trigger?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Modal content (typically Modal.Header, Modal.Content, Modal.Footer)
|
|
17
|
+
*/
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Show close button
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showClose?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Color token for overlay background
|
|
26
|
+
*/
|
|
27
|
+
overlayColorToken?: ColorToken;
|
|
28
|
+
/**
|
|
29
|
+
* Color token for modal background
|
|
30
|
+
*/
|
|
31
|
+
backgroundColorToken?: ColorToken;
|
|
32
|
+
/**
|
|
33
|
+
* Custom className for content
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Modal width
|
|
38
|
+
* @default '405px'
|
|
39
|
+
*/
|
|
40
|
+
width?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ModalHeaderProps {
|
|
43
|
+
/**
|
|
44
|
+
* Header title
|
|
45
|
+
*/
|
|
46
|
+
title: string;
|
|
47
|
+
/**
|
|
48
|
+
* Header description/subtitle
|
|
49
|
+
*/
|
|
50
|
+
description?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Color token for title text
|
|
53
|
+
*/
|
|
54
|
+
titleColorToken?: ColorToken;
|
|
55
|
+
/**
|
|
56
|
+
* Color token for description text
|
|
57
|
+
*/
|
|
58
|
+
descriptionColorToken?: ColorToken;
|
|
59
|
+
/**
|
|
60
|
+
* Custom className
|
|
61
|
+
*/
|
|
62
|
+
className?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Children elements
|
|
65
|
+
*/
|
|
66
|
+
children?: React.ReactNode;
|
|
67
|
+
}
|
|
68
|
+
export interface ModalContentProps {
|
|
69
|
+
/**
|
|
70
|
+
* Content children
|
|
71
|
+
*/
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Maximum height for scrollable content
|
|
75
|
+
* @default '480px'
|
|
76
|
+
*/
|
|
77
|
+
maxHeight?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Custom className
|
|
80
|
+
*/
|
|
81
|
+
className?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ModalFooterProps {
|
|
84
|
+
/**
|
|
85
|
+
* Footer children (typically action buttons)
|
|
86
|
+
*/
|
|
87
|
+
children: React.ReactNode;
|
|
88
|
+
/**
|
|
89
|
+
* Custom className
|
|
90
|
+
*/
|
|
91
|
+
className?: string;
|
|
92
|
+
}
|
|
93
|
+
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>> & {
|
|
94
|
+
Header: React.ForwardRefExoticComponent<ModalHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
Content: React.ForwardRefExoticComponent<ModalContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
96
|
+
Footer: React.ForwardRefExoticComponent<ModalFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
97
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./Modal").ModalProps & React.RefAttributes<HTMLDivElement>> & {
|
|
6
|
+
Header: React.ForwardRefExoticComponent<import("./Modal").ModalHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Content: React.ForwardRefExoticComponent<import("./Modal").ModalContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Footer: React.ForwardRefExoticComponent<import("./Modal").ModalFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
};
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: string;
|
|
12
|
+
};
|
|
13
|
+
tags: string[];
|
|
14
|
+
argTypes: {
|
|
15
|
+
trigger: {
|
|
16
|
+
control: false;
|
|
17
|
+
description: string;
|
|
18
|
+
table: {
|
|
19
|
+
category: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
showClose: {
|
|
23
|
+
control: "boolean";
|
|
24
|
+
description: string;
|
|
25
|
+
table: {
|
|
26
|
+
category: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
overlayColorToken: {
|
|
30
|
+
control: "text";
|
|
31
|
+
description: string;
|
|
32
|
+
table: {
|
|
33
|
+
category: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
backgroundColorToken: {
|
|
37
|
+
control: "text";
|
|
38
|
+
description: string;
|
|
39
|
+
table: {
|
|
40
|
+
category: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
width: {
|
|
44
|
+
control: "text";
|
|
45
|
+
description: string;
|
|
46
|
+
table: {
|
|
47
|
+
category: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export default meta;
|
|
53
|
+
type Story = StoryObj<typeof meta>;
|
|
54
|
+
export declare const BasicModal: Story;
|
|
55
|
+
export declare const TwoActionButtons: Story;
|
|
56
|
+
export declare const ThreeActionButtons: Story;
|
|
57
|
+
export declare const FlagMockupModal: Story;
|
|
58
|
+
export declare const ScrollableContent: Story;
|
|
59
|
+
export declare const NoCloseButton: Story;
|
|
60
|
+
export declare const CustomWidth: Story;
|
|
61
|
+
export declare const NoDescription: Story;
|
|
62
|
+
export declare const FormModal: Story;
|
|
63
|
+
export declare const InfoModal: Story;
|
|
64
|
+
export declare const MinimalContent: Story;
|
|
@@ -8,3 +8,5 @@ export { CheckboxChip } from "./CheckboxChip/CheckboxChip";
|
|
|
8
8
|
export type { CheckboxChipProps } from "./CheckboxChip/CheckboxChip";
|
|
9
9
|
export { CheckboxChipGroup } from "./CheckboxChip/CheckboxChipGroup";
|
|
10
10
|
export type { CheckboxChipGroupProps, CheckboxChipOption, } from "./CheckboxChip/CheckboxChipGroup";
|
|
11
|
+
export { Modal } from "./Modal/Modal";
|
|
12
|
+
export type { ModalProps, ModalHeaderProps, ModalContentProps, ModalFooterProps, } from "./Modal/Modal";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlagBadMockups Organism
|
|
3
|
+
* A multi-step modal flow for flagging bad mockups
|
|
4
|
+
* Flow: Flag Modal → Form Modal (if "Something else") → Info Modal
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
import "./FlagBadMockups.scss";
|
|
8
|
+
export type { ColorToken } from "../../../tokens";
|
|
9
|
+
export interface FlagBadMockupsProps {
|
|
10
|
+
/**
|
|
11
|
+
* Trigger button element (optional, defaults to "Flag this mockup" button)
|
|
12
|
+
*/
|
|
13
|
+
trigger?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Callback when the flow is closed
|
|
16
|
+
*/
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Callback when feedback is submitted with selected reason and optional feedback text
|
|
20
|
+
*/
|
|
21
|
+
onSubmit?: (reason: string, feedback?: string) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Custom className
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const FlagBadMockups: React.ForwardRefExoticComponent<FlagBadMockupsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./FlagBadMockups").FlagBadMockupsProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
trigger: {
|
|
12
|
+
control: false;
|
|
13
|
+
description: string;
|
|
14
|
+
table: {
|
|
15
|
+
category: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
onClose: {
|
|
19
|
+
control: false;
|
|
20
|
+
description: string;
|
|
21
|
+
table: {
|
|
22
|
+
category: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
onSubmit: {
|
|
26
|
+
control: false;
|
|
27
|
+
description: string;
|
|
28
|
+
table: {
|
|
29
|
+
category: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
className: {
|
|
33
|
+
control: "text";
|
|
34
|
+
description: string;
|
|
35
|
+
table: {
|
|
36
|
+
category: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default meta;
|
|
42
|
+
type Story = StoryObj<typeof meta>;
|
|
43
|
+
export declare const Default: Story;
|
|
44
|
+
export declare const CustomTrigger: Story;
|
|
45
|
+
export declare const InteractiveDemo: Story;
|
|
46
|
+
export declare const FlowExample: Story;
|
|
@@ -6,3 +6,5 @@ export { OnboardingInfoBox } from "./OnboardingInfoBox/OnboardingInfoBox";
|
|
|
6
6
|
export type { OnboardingInfoBoxProps, OnboardingInfoItem, } from "./OnboardingInfoBox/OnboardingInfoBox";
|
|
7
7
|
export { CTABox } from "./CTABox/CTABox";
|
|
8
8
|
export type { CTABoxProps } from "./CTABox/CTABox";
|
|
9
|
+
export { FlagBadMockups } from "./FlagBadMockups/FlagBadMockups";
|
|
10
|
+
export type { FlagBadMockupsProps } from "./FlagBadMockups/FlagBadMockups";
|
|
@@ -24,8 +24,8 @@ import type { OnboardingFlowConfig } from "./OnboardingFlow.types";
|
|
|
24
24
|
*
|
|
25
25
|
* BUILDING PRODUCT/WORKFLOW PATH (building-product):
|
|
26
26
|
* 1. Journey stage → 2. Business type → Branch:
|
|
27
|
-
* - If "Startup": 3. Role & Team size (combined) → 4. Startup Builder result (
|
|
28
|
-
* - If "Established Company": 3. Role & Team size (combined) → 4. Enterprise Partner result (
|
|
27
|
+
* - If "Startup": 3. Role & Team size (combined) → 4. Website → 5. Startup Builder result (5 steps)
|
|
28
|
+
* - If "Established Company": 3. Role & Team size (combined) → 4. Website → 5. Enterprise Partner result (5 steps)
|
|
29
29
|
* - If "Agency/Automation/Solopreneur": 3. Integration type → Branch:
|
|
30
30
|
* * "Simple": Embed Builder result (4 steps)
|
|
31
31
|
* * "Automations": Workflow Automator result (4 steps)
|
|
@@ -8,7 +8,7 @@ import type { OnboardingInfoItem } from "../../organisms/OnboardingInfoBox/Onboa
|
|
|
8
8
|
/**
|
|
9
9
|
* Type of onboarding step variation
|
|
10
10
|
*/
|
|
11
|
-
export type OnboardingStepType = "radio" | "checkbox-no-icon" | "checkbox-with-icon" | "buttons-plus-radio" | "know-your-customer" | "double-radio" | "launcher" | "artwork" | "split-screen";
|
|
11
|
+
export type OnboardingStepType = "radio" | "checkbox-no-icon" | "checkbox-with-icon" | "buttons-plus-radio" | "know-your-customer" | "double-radio" | "text-input" | "launcher" | "artwork" | "split-screen";
|
|
12
12
|
/**
|
|
13
13
|
* Base step configuration shared across all step types
|
|
14
14
|
*/
|
|
@@ -117,6 +117,20 @@ export interface OnboardingDoubleRadioStep extends OnboardingStepBase {
|
|
|
117
117
|
*/
|
|
118
118
|
secondDataKey: string;
|
|
119
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Text input step configuration
|
|
122
|
+
*/
|
|
123
|
+
export interface OnboardingTextInputStep extends OnboardingStepBase {
|
|
124
|
+
type: "text-input";
|
|
125
|
+
/**
|
|
126
|
+
* Placeholder text for the input field
|
|
127
|
+
*/
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Key in the data object where the text value is stored
|
|
131
|
+
*/
|
|
132
|
+
dataKey: string;
|
|
133
|
+
}
|
|
120
134
|
/**
|
|
121
135
|
* Launcher step configuration (informational with CTA)
|
|
122
136
|
*/
|
|
@@ -152,7 +166,7 @@ export interface OnboardingArtworkStep extends OnboardingStepBase {
|
|
|
152
166
|
/**
|
|
153
167
|
* Union type of all possible step configurations
|
|
154
168
|
*/
|
|
155
|
-
export type OnboardingStep = OnboardingRadioStep | OnboardingCheckboxStep | OnboardingButtonsPlusRadioStep | OnboardingKnowYourCustomerStep | OnboardingDoubleRadioStep | OnboardingLauncherStep | OnboardingArtworkStep;
|
|
169
|
+
export type OnboardingStep = OnboardingRadioStep | OnboardingCheckboxStep | OnboardingButtonsPlusRadioStep | OnboardingKnowYourCustomerStep | OnboardingDoubleRadioStep | OnboardingTextInputStep | OnboardingLauncherStep | OnboardingArtworkStep;
|
|
156
170
|
/**
|
|
157
171
|
* Complete onboarding flow configuration
|
|
158
172
|
*/
|
|
@@ -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" | "double-radio" | "launcher" | "artwork" | "split-screen";
|
|
19
|
+
variation: "radio" | "checkbox-no-icon" | "checkbox-with-icon" | "buttons-plus-radio" | "know-your-customer" | "double-radio" | "text-input" | "launcher" | "artwork" | "split-screen";
|
|
20
20
|
/**
|
|
21
21
|
* Current step (1-based)
|
|
22
22
|
*/
|
|
@@ -129,6 +129,18 @@ export interface OnboardingTemplateProps {
|
|
|
129
129
|
* Second radio option change handler
|
|
130
130
|
*/
|
|
131
131
|
onSecondRadioChange?: (value: string) => void;
|
|
132
|
+
/**
|
|
133
|
+
* Text input value
|
|
134
|
+
*/
|
|
135
|
+
textInputValue?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Text input change handler
|
|
138
|
+
*/
|
|
139
|
+
onTextInputChange?: (value: string) => void;
|
|
140
|
+
/**
|
|
141
|
+
* Text input placeholder
|
|
142
|
+
*/
|
|
143
|
+
textInputPlaceholder?: string;
|
|
132
144
|
/**
|
|
133
145
|
* Icon name for launcher variation (Solar icon)
|
|
134
146
|
*/
|
package/package.json
CHANGED