chordia-ui 3.2.2 → 3.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.
- package/README.md +61 -0
- package/dist/index.cjs2.js +2 -2
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.es2.js +869 -811
- package/dist/index.es2.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/login/LoginPage.jsx +107 -5
- package/src/components/onboarding/ConnectData.jsx +89 -0
- package/src/components/onboarding/GettingStarted.jsx +520 -0
- package/src/components/onboarding/UploadEvaluate.jsx +255 -0
- package/src/components/onboarding/UploadInteraction.jsx +186 -0
- package/src/tokens/colors.css +13 -0
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { MessageSquare, Database, Users, BookOpen, SlidersHorizontal, Briefcase } from 'lucide-react';
|
|
3
|
+
import UploadInteraction from './UploadInteraction';
|
|
4
|
+
import ConnectData from './ConnectData';
|
|
5
|
+
|
|
6
|
+
const FF = 'var(--font-sans)';
|
|
7
|
+
|
|
8
|
+
// ─── Steps Configuration ───
|
|
9
|
+
|
|
10
|
+
const DEFAULT_STEPS = [
|
|
11
|
+
{ id: 'workspace', label: 'Workspace Name', description: 'Give your project a title.', icon: Briefcase },
|
|
12
|
+
{ id: 'interaction', label: 'Add Interaction', description: 'Connect data to see patterns.', icon: MessageSquare },
|
|
13
|
+
{ id: 'connect', label: 'Connect Data', description: 'Link your platform for auto-evaluation.', icon: Database },
|
|
14
|
+
{ id: 'invite', label: 'Invite Team', description: 'Add members to collaborate.', icon: Users },
|
|
15
|
+
{ id: 'concepts', label: 'Learn Concepts', description: 'Explore conditions and evidence.', icon: BookOpen },
|
|
16
|
+
{ id: 'scope', label: 'Define Scope', description: 'Customize evaluation signals.', icon: SlidersHorizontal },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
// ─── Styles ───
|
|
20
|
+
|
|
21
|
+
const pageStyle = {
|
|
22
|
+
fontFamily: FF,
|
|
23
|
+
background: 'var(--grey-white)',
|
|
24
|
+
minHeight: '100vh',
|
|
25
|
+
boxSizing: 'border-box',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const headerStyle = {
|
|
29
|
+
padding: '24px 48px',
|
|
30
|
+
borderBottom: '1px solid var(--border)',
|
|
31
|
+
background: 'var(--grey-white)',
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const headerTopRow = {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
justifyContent: 'space-between',
|
|
38
|
+
marginBottom: 8,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const titleStyle = {
|
|
42
|
+
fontSize: 24,
|
|
43
|
+
fontWeight: 600,
|
|
44
|
+
fontStyle: 'normal',
|
|
45
|
+
fontFamily: FF,
|
|
46
|
+
color: 'var(--grey-strong)',
|
|
47
|
+
margin: 0,
|
|
48
|
+
lineHeight: 'normal',
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const subtitleStyle = {
|
|
52
|
+
fontSize: 14,
|
|
53
|
+
fontWeight: 400,
|
|
54
|
+
lineHeight: '140%',
|
|
55
|
+
color: 'var(--text-muted)',
|
|
56
|
+
margin: '4px 0 0',
|
|
57
|
+
fontFamily: FF,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const headerActions = {
|
|
61
|
+
display: 'flex',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
gap: 12,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const remindBtnStyle = {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
height: 36,
|
|
69
|
+
padding: '0 16px',
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
borderRadius: 10,
|
|
73
|
+
background: 'transparent',
|
|
74
|
+
border: '1px solid var(--border-strong)',
|
|
75
|
+
fontSize: 14,
|
|
76
|
+
fontWeight: 500,
|
|
77
|
+
fontFamily: FF,
|
|
78
|
+
color: 'var(--text-base)',
|
|
79
|
+
cursor: 'pointer',
|
|
80
|
+
transition: 'var(--transition-fast)',
|
|
81
|
+
outline: 'none',
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const saveBtnStyle = {
|
|
85
|
+
display: 'flex',
|
|
86
|
+
height: 36,
|
|
87
|
+
padding: '0 20px',
|
|
88
|
+
justifyContent: 'center',
|
|
89
|
+
alignItems: 'center',
|
|
90
|
+
borderRadius: 10,
|
|
91
|
+
background: 'var(--grey-strong)',
|
|
92
|
+
fontSize: 14,
|
|
93
|
+
fontWeight: 600,
|
|
94
|
+
fontFamily: FF,
|
|
95
|
+
color: 'var(--grey-white)',
|
|
96
|
+
border: 'none',
|
|
97
|
+
cursor: 'pointer',
|
|
98
|
+
transition: 'var(--transition-fast)',
|
|
99
|
+
outline: 'none',
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const progressBarBg = {
|
|
103
|
+
width: '100%',
|
|
104
|
+
height: 6,
|
|
105
|
+
borderRadius: 3,
|
|
106
|
+
background: 'var(--border)',
|
|
107
|
+
overflow: 'hidden',
|
|
108
|
+
marginTop: 12,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const progressBarFill = (pct) => ({
|
|
112
|
+
width: `${pct}%`,
|
|
113
|
+
height: '100%',
|
|
114
|
+
borderRadius: 3,
|
|
115
|
+
background: 'var(--color-green)',
|
|
116
|
+
transition: 'width 0.4s ease-out',
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const bodyStyle = {
|
|
120
|
+
display: 'flex',
|
|
121
|
+
flex: 1,
|
|
122
|
+
minHeight: 'calc(100vh - 140px)',
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// ─── Sidebar Styles ───
|
|
126
|
+
|
|
127
|
+
const sidebarStyle = {
|
|
128
|
+
width: 312,
|
|
129
|
+
minWidth: 312,
|
|
130
|
+
borderRight: '1px solid var(--border)',
|
|
131
|
+
padding: '24px 24px',
|
|
132
|
+
background: 'var(--grey-white)',
|
|
133
|
+
boxSizing: 'border-box',
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const stepsCountStyle = {
|
|
137
|
+
fontSize: 13,
|
|
138
|
+
fontWeight: 500,
|
|
139
|
+
color: 'var(--text-muted)',
|
|
140
|
+
fontFamily: FF,
|
|
141
|
+
margin: '0 0 12px',
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const stepsListStyle = {
|
|
145
|
+
display: 'flex',
|
|
146
|
+
width: 264,
|
|
147
|
+
flexDirection: 'column',
|
|
148
|
+
alignItems: 'flex-start',
|
|
149
|
+
gap: 8,
|
|
150
|
+
alignSelf: 'stretch',
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const stepItemStyle = (isActive) => ({
|
|
154
|
+
display: 'flex',
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
gap: 4,
|
|
157
|
+
padding: '8px 4px',
|
|
158
|
+
cursor: 'pointer',
|
|
159
|
+
transition: 'var(--transition-fast)',
|
|
160
|
+
background: isActive ? 'var(--hover-warm)' : 'var(--grey-white)',
|
|
161
|
+
borderRadius: 8,
|
|
162
|
+
alignSelf: 'stretch',
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
const stepIconWrap = {
|
|
166
|
+
width: 40,
|
|
167
|
+
height: 40,
|
|
168
|
+
flexShrink: 0,
|
|
169
|
+
display: 'flex',
|
|
170
|
+
alignItems: 'center',
|
|
171
|
+
justifyContent: 'center',
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const stepLabelStyle = {
|
|
175
|
+
fontSize: 14,
|
|
176
|
+
fontWeight: 600,
|
|
177
|
+
fontStyle: 'normal',
|
|
178
|
+
color: 'var(--grey-strong)',
|
|
179
|
+
fontFamily: FF,
|
|
180
|
+
margin: 0,
|
|
181
|
+
lineHeight: '120%',
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const stepDescStyle = {
|
|
185
|
+
fontSize: 12,
|
|
186
|
+
fontWeight: 400,
|
|
187
|
+
color: 'var(--text-muted)',
|
|
188
|
+
fontFamily: FF,
|
|
189
|
+
margin: '2px 0 0',
|
|
190
|
+
lineHeight: 1.3,
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
// ─── Content Styles ───
|
|
194
|
+
|
|
195
|
+
const contentStyle = {
|
|
196
|
+
flex: 1,
|
|
197
|
+
padding: '40px 48px',
|
|
198
|
+
background: 'var(--grey-white)',
|
|
199
|
+
boxSizing: 'border-box',
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const sectionTitleStyle = {
|
|
203
|
+
fontSize: 20,
|
|
204
|
+
fontWeight: 600,
|
|
205
|
+
fontStyle: 'normal',
|
|
206
|
+
fontFamily: FF,
|
|
207
|
+
color: 'var(--grey-strong)',
|
|
208
|
+
margin: 0,
|
|
209
|
+
lineHeight: 'normal',
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const sectionSubtitleStyle = {
|
|
213
|
+
fontSize: 13,
|
|
214
|
+
fontWeight: 400,
|
|
215
|
+
fontStyle: 'normal',
|
|
216
|
+
color: 'var(--color-text-secondary)',
|
|
217
|
+
fontFamily: FF,
|
|
218
|
+
margin: '4px 0 0',
|
|
219
|
+
lineHeight: '140%',
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const fieldLabelStyle = {
|
|
223
|
+
fontSize: 16,
|
|
224
|
+
fontWeight: 600,
|
|
225
|
+
fontStyle: 'normal',
|
|
226
|
+
color: 'var(--grey-strong)',
|
|
227
|
+
fontFamily: FF,
|
|
228
|
+
lineHeight: 'normal',
|
|
229
|
+
margin: 0,
|
|
230
|
+
display: 'block',
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const inputStyle = {
|
|
234
|
+
width: '100%',
|
|
235
|
+
height: 44,
|
|
236
|
+
padding: '0 14px',
|
|
237
|
+
borderRadius: 6,
|
|
238
|
+
border: '1px solid var(--color-input-border)',
|
|
239
|
+
fontSize: 16,
|
|
240
|
+
fontWeight: 400,
|
|
241
|
+
fontStyle: 'normal',
|
|
242
|
+
lineHeight: 'normal',
|
|
243
|
+
fontFamily: FF,
|
|
244
|
+
color: 'var(--color-text-secondary)',
|
|
245
|
+
background: 'var(--grey-white)',
|
|
246
|
+
boxSizing: 'border-box',
|
|
247
|
+
outline: 'none',
|
|
248
|
+
transition: 'var(--transition-fast)',
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
const textareaWrapStyle = {
|
|
252
|
+
position: 'relative',
|
|
253
|
+
marginTop: 8,
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
const textareaStyle = {
|
|
257
|
+
width: '100%',
|
|
258
|
+
minHeight: 160,
|
|
259
|
+
padding: '12px 14px 28px 14px',
|
|
260
|
+
borderRadius: 6,
|
|
261
|
+
border: '1px solid var(--color-input-border)',
|
|
262
|
+
fontSize: 16,
|
|
263
|
+
fontWeight: 400,
|
|
264
|
+
fontStyle: 'normal',
|
|
265
|
+
lineHeight: 'normal',
|
|
266
|
+
fontFamily: FF,
|
|
267
|
+
color: 'var(--color-text-secondary)',
|
|
268
|
+
background: 'var(--grey-white)',
|
|
269
|
+
boxSizing: 'border-box',
|
|
270
|
+
outline: 'none',
|
|
271
|
+
resize: 'vertical',
|
|
272
|
+
lineHeight: '140%',
|
|
273
|
+
transition: 'var(--transition-fast)',
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
const charCountStyle = {
|
|
277
|
+
position: 'absolute',
|
|
278
|
+
bottom: 10,
|
|
279
|
+
right: 14,
|
|
280
|
+
fontSize: 12,
|
|
281
|
+
fontWeight: 400,
|
|
282
|
+
color: 'var(--text-faint)',
|
|
283
|
+
fontFamily: FF,
|
|
284
|
+
margin: 0,
|
|
285
|
+
pointerEvents: 'none',
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
// ─── Step Indicator Icons ───
|
|
289
|
+
|
|
290
|
+
function CompletedIcon() {
|
|
291
|
+
return (
|
|
292
|
+
<div
|
|
293
|
+
style={{
|
|
294
|
+
width: 24,
|
|
295
|
+
height: 24,
|
|
296
|
+
borderRadius: 6,
|
|
297
|
+
background: 'var(--grey-strong)',
|
|
298
|
+
display: 'flex',
|
|
299
|
+
alignItems: 'center',
|
|
300
|
+
justifyContent: 'center',
|
|
301
|
+
flexShrink: 0,
|
|
302
|
+
}}
|
|
303
|
+
>
|
|
304
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
|
305
|
+
<path d="M2.5 7.5L5.5 10.5L11.5 4" stroke="var(--grey-white)" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
|
|
306
|
+
</svg>
|
|
307
|
+
</div>
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
function IncompleteIcon() {
|
|
312
|
+
return (
|
|
313
|
+
<div
|
|
314
|
+
style={{
|
|
315
|
+
width: 24,
|
|
316
|
+
height: 24,
|
|
317
|
+
borderRadius: '50%',
|
|
318
|
+
border: '2px solid var(--grey-muted)',
|
|
319
|
+
background: 'transparent',
|
|
320
|
+
display: 'flex',
|
|
321
|
+
alignItems: 'center',
|
|
322
|
+
justifyContent: 'center',
|
|
323
|
+
flexShrink: 0,
|
|
324
|
+
gap: 2,
|
|
325
|
+
boxSizing: 'border-box',
|
|
326
|
+
}}
|
|
327
|
+
>
|
|
328
|
+
<span style={{ width: 3, height: 3, borderRadius: '50%', background: 'var(--grey-muted)' }} />
|
|
329
|
+
<span style={{ width: 3, height: 3, borderRadius: '50%', background: 'var(--grey-muted)' }} />
|
|
330
|
+
<span style={{ width: 3, height: 3, borderRadius: '50%', background: 'var(--grey-muted)' }} />
|
|
331
|
+
</div>
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// ─── Step Item Component ───
|
|
336
|
+
|
|
337
|
+
function StepItem({ step, isCompleted, isActive, onClick }) {
|
|
338
|
+
const [hovered, setHovered] = useState(false);
|
|
339
|
+
|
|
340
|
+
return (
|
|
341
|
+
<div
|
|
342
|
+
style={{
|
|
343
|
+
...stepItemStyle(isActive),
|
|
344
|
+
...(hovered && !isActive ? { background: 'var(--hover-warm-subtle)' } : {}),
|
|
345
|
+
}}
|
|
346
|
+
onClick={onClick}
|
|
347
|
+
onMouseEnter={() => setHovered(true)}
|
|
348
|
+
onMouseLeave={() => setHovered(false)}
|
|
349
|
+
>
|
|
350
|
+
<div style={stepIconWrap}>
|
|
351
|
+
{isCompleted ? <CompletedIcon /> : <IncompleteIcon />}
|
|
352
|
+
</div>
|
|
353
|
+
<div>
|
|
354
|
+
<p style={stepLabelStyle}>{step.label}</p>
|
|
355
|
+
<p style={stepDescStyle}>{step.description}</p>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// ─── Workspace Name Step Content ───
|
|
362
|
+
|
|
363
|
+
function WorkspaceNameContent({ workspaceName, setWorkspaceName, description, setDescription, maxDescLength }) {
|
|
364
|
+
const [nameFocused, setNameFocused] = useState(false);
|
|
365
|
+
const [descFocused, setDescFocused] = useState(false);
|
|
366
|
+
|
|
367
|
+
return (
|
|
368
|
+
<div>
|
|
369
|
+
<h2 style={sectionTitleStyle}>Name of your workspace</h2>
|
|
370
|
+
<p style={sectionSubtitleStyle}>Tell us about the project or company you're organizing here.</p>
|
|
371
|
+
|
|
372
|
+
<div style={{ marginTop: 28 }}>
|
|
373
|
+
<label style={fieldLabelStyle}>Workspace Name</label>
|
|
374
|
+
<input
|
|
375
|
+
type="text"
|
|
376
|
+
placeholder="e.g. Acme Marketing"
|
|
377
|
+
value={workspaceName}
|
|
378
|
+
onChange={(e) => setWorkspaceName(e.target.value)}
|
|
379
|
+
onFocus={() => setNameFocused(true)}
|
|
380
|
+
onBlur={() => setNameFocused(false)}
|
|
381
|
+
style={{
|
|
382
|
+
...inputStyle,
|
|
383
|
+
marginTop: 8,
|
|
384
|
+
borderColor: nameFocused ? 'var(--color-green)' : 'var(--color-input-border)',
|
|
385
|
+
boxShadow: nameFocused ? '0 0 0 3px var(--color-green-ring)' : 'none',
|
|
386
|
+
}}
|
|
387
|
+
/>
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
<div style={{ marginTop: 24 }}>
|
|
391
|
+
<label style={fieldLabelStyle}>Description</label>
|
|
392
|
+
<div style={textareaWrapStyle}>
|
|
393
|
+
<textarea
|
|
394
|
+
placeholder="what's the goal of this workspace?"
|
|
395
|
+
value={description}
|
|
396
|
+
onChange={(e) => {
|
|
397
|
+
if (e.target.value.length <= maxDescLength) {
|
|
398
|
+
setDescription(e.target.value);
|
|
399
|
+
}
|
|
400
|
+
}}
|
|
401
|
+
onFocus={() => setDescFocused(true)}
|
|
402
|
+
onBlur={() => setDescFocused(false)}
|
|
403
|
+
style={{
|
|
404
|
+
...textareaStyle,
|
|
405
|
+
borderColor: descFocused ? 'var(--color-green)' : 'var(--color-input-border)',
|
|
406
|
+
boxShadow: descFocused ? '0 0 0 3px var(--color-green-ring)' : 'none',
|
|
407
|
+
}}
|
|
408
|
+
/>
|
|
409
|
+
<span style={charCountStyle}>{description.length}/{maxDescLength}</span>
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// ─── Main Component ───
|
|
417
|
+
|
|
418
|
+
const GettingStarted = ({
|
|
419
|
+
steps = DEFAULT_STEPS,
|
|
420
|
+
completedSteps = ['workspace', 'invite'],
|
|
421
|
+
initialActiveStep = 'workspace',
|
|
422
|
+
onSaveNext,
|
|
423
|
+
onRemindLater,
|
|
424
|
+
onStepChange,
|
|
425
|
+
}) => {
|
|
426
|
+
const [activeStepId, setActiveStepId] = useState(initialActiveStep);
|
|
427
|
+
const [workspaceName, setWorkspaceName] = useState('');
|
|
428
|
+
const [description, setDescription] = useState('');
|
|
429
|
+
const maxDescLength = 1000;
|
|
430
|
+
|
|
431
|
+
const completedCount = completedSteps.length;
|
|
432
|
+
const totalCount = steps.length;
|
|
433
|
+
const progressPct = (completedCount / totalCount) * 100;
|
|
434
|
+
|
|
435
|
+
const handleStepClick = (stepId) => {
|
|
436
|
+
setActiveStepId(stepId);
|
|
437
|
+
onStepChange?.(stepId);
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
const handleSaveNext = () => {
|
|
441
|
+
onSaveNext?.({ stepId: activeStepId, workspaceName, description });
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
return (
|
|
445
|
+
<div style={pageStyle}>
|
|
446
|
+
{/* Header */}
|
|
447
|
+
<div style={headerStyle}>
|
|
448
|
+
<div style={headerTopRow}>
|
|
449
|
+
<div>
|
|
450
|
+
<h1 style={titleStyle}>Getting started with Chordia</h1>
|
|
451
|
+
<p style={subtitleStyle}>Complete these steps to get the most out of Chordia.</p>
|
|
452
|
+
</div>
|
|
453
|
+
<div style={headerActions}>
|
|
454
|
+
<button
|
|
455
|
+
style={remindBtnStyle}
|
|
456
|
+
onClick={onRemindLater}
|
|
457
|
+
onMouseEnter={(e) => { e.currentTarget.style.background = 'var(--hover-warm-subtle)'; }}
|
|
458
|
+
onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; }}
|
|
459
|
+
>
|
|
460
|
+
Remind me Later
|
|
461
|
+
</button>
|
|
462
|
+
<button
|
|
463
|
+
style={saveBtnStyle}
|
|
464
|
+
onClick={handleSaveNext}
|
|
465
|
+
onMouseEnter={(e) => { e.currentTarget.style.opacity = '0.85'; }}
|
|
466
|
+
onMouseLeave={(e) => { e.currentTarget.style.opacity = '1'; }}
|
|
467
|
+
>
|
|
468
|
+
Save & Next
|
|
469
|
+
</button>
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
<div style={progressBarBg}>
|
|
473
|
+
<div style={progressBarFill(progressPct)} />
|
|
474
|
+
</div>
|
|
475
|
+
</div>
|
|
476
|
+
|
|
477
|
+
{/* Body */}
|
|
478
|
+
<div style={bodyStyle}>
|
|
479
|
+
{/* Sidebar */}
|
|
480
|
+
<div style={sidebarStyle}>
|
|
481
|
+
<p style={stepsCountStyle}>
|
|
482
|
+
{completedCount} of {totalCount} steps completed
|
|
483
|
+
</p>
|
|
484
|
+
<div style={stepsListStyle}>
|
|
485
|
+
{steps.map((step) => (
|
|
486
|
+
<StepItem
|
|
487
|
+
key={step.id}
|
|
488
|
+
step={step}
|
|
489
|
+
isCompleted={completedSteps.includes(step.id)}
|
|
490
|
+
isActive={activeStepId === step.id}
|
|
491
|
+
onClick={() => handleStepClick(step.id)}
|
|
492
|
+
/>
|
|
493
|
+
))}
|
|
494
|
+
</div>
|
|
495
|
+
</div>
|
|
496
|
+
|
|
497
|
+
{/* Content */}
|
|
498
|
+
<div style={contentStyle}>
|
|
499
|
+
{activeStepId === 'workspace' && (
|
|
500
|
+
<WorkspaceNameContent
|
|
501
|
+
workspaceName={workspaceName}
|
|
502
|
+
setWorkspaceName={setWorkspaceName}
|
|
503
|
+
description={description}
|
|
504
|
+
setDescription={setDescription}
|
|
505
|
+
maxDescLength={maxDescLength}
|
|
506
|
+
/>
|
|
507
|
+
)}
|
|
508
|
+
{activeStepId === 'interaction' && (
|
|
509
|
+
<UploadInteraction />
|
|
510
|
+
)}
|
|
511
|
+
{activeStepId === 'connect' && (
|
|
512
|
+
<ConnectData />
|
|
513
|
+
)}
|
|
514
|
+
</div>
|
|
515
|
+
</div>
|
|
516
|
+
</div>
|
|
517
|
+
);
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
export default GettingStarted;
|