chordia-ui 3.2.3 → 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/IntegrationCard.cjs.js +2 -0
  2. package/dist/IntegrationCard.cjs.js.map +1 -0
  3. package/dist/IntegrationCard.es.js +188 -0
  4. package/dist/IntegrationCard.es.js.map +1 -0
  5. package/dist/SideDrawer.cjs.js +2 -0
  6. package/dist/SideDrawer.cjs.js.map +1 -0
  7. package/dist/SideDrawer.es.js +486 -0
  8. package/dist/SideDrawer.es.js.map +1 -0
  9. package/dist/UploadInteraction.cjs.js +2 -0
  10. package/dist/UploadInteraction.cjs.js.map +1 -0
  11. package/dist/UploadInteraction.es.js +379 -0
  12. package/dist/UploadInteraction.es.js.map +1 -0
  13. package/dist/components/common.cjs.js +1 -1
  14. package/dist/components/common.es.js +13 -11
  15. package/dist/components/layout.cjs.js +2 -2
  16. package/dist/components/layout.cjs.js.map +1 -1
  17. package/dist/components/layout.es.js +202 -411
  18. package/dist/components/layout.es.js.map +1 -1
  19. package/dist/components/navigation.cjs.js +1 -1
  20. package/dist/components/navigation.cjs.js.map +1 -1
  21. package/dist/components/navigation.es.js +212 -203
  22. package/dist/components/navigation.es.js.map +1 -1
  23. package/dist/components/onboarding.cjs.js +2 -0
  24. package/dist/components/onboarding.cjs.js.map +1 -0
  25. package/dist/components/onboarding.es.js +712 -0
  26. package/dist/components/onboarding.es.js.map +1 -0
  27. package/dist/index.cjs.js +1 -1
  28. package/dist/index.cjs2.js +1 -1
  29. package/dist/index.cjs2.js.map +1 -1
  30. package/dist/index.es.js +74 -64
  31. package/dist/index.es.js.map +1 -1
  32. package/dist/index.es2.js +2 -2
  33. package/dist/index.es2.js.map +1 -1
  34. package/dist/pages/interactionDetails.cjs.js +1 -1
  35. package/dist/pages/interactionDetails.cjs.js.map +1 -1
  36. package/dist/pages/interactionDetails.es.js +16 -15
  37. package/dist/pages/interactionDetails.es.js.map +1 -1
  38. package/package.json +5 -1
  39. package/src/components/common/SideDrawer.jsx +321 -0
  40. package/src/components/common/index.js +1 -0
  41. package/src/components/index.js +4 -1
  42. package/src/components/layout/IntegrationCard.jsx +151 -141
  43. package/src/components/login/LoginPage.jsx +2 -2
  44. package/src/components/navigation/Sidebar.jsx +59 -39
  45. package/src/components/onboarding/AddTeammates.jsx +278 -0
  46. package/src/components/onboarding/GettingStarted.jsx +4 -0
  47. package/src/components/onboarding/UploadInteraction.jsx +3 -3
  48. package/src/components/onboarding/index.js +5 -0
  49. package/dist/AutoSearch.cjs.js +0 -2
  50. package/dist/AutoSearch.cjs.js.map +0 -1
  51. package/dist/AutoSearch.es.js +0 -190
  52. package/dist/AutoSearch.es.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chordia-ui",
3
- "version": "3.2.3",
3
+ "version": "3.2.5",
4
4
  "description": "Chordia Design System - UI components, tokens, and Tailwind preset",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -54,6 +54,10 @@
54
54
  "import": "./dist/components/login.es.js",
55
55
  "require": "./dist/components/login.cjs.js"
56
56
  },
57
+ "./components/onboarding": {
58
+ "import": "./dist/components/onboarding.es.js",
59
+ "require": "./dist/components/onboarding.cjs.js"
60
+ },
57
61
  "./pages/interactionDetails": {
58
62
  "import": "./dist/pages/interactionDetails.es.js",
59
63
  "require": "./dist/pages/interactionDetails.cjs.js"
@@ -0,0 +1,321 @@
1
+ "use client";
2
+
3
+ import React, { useEffect, useRef } from "react";
4
+ import { X } from "lucide-react";
5
+
6
+ /**
7
+ * SideDrawer — slide-in panel from the right edge.
8
+ *
9
+ * Props:
10
+ * - open boolean Whether the drawer is visible
11
+ * - onClose function Close callback
12
+ * - title string Header title
13
+ * - subtitle string Optional description below the divider
14
+ * - children ReactNode Drawer body content
15
+ * - footer ReactNode Optional fixed footer (e.g. Cancel/Save buttons)
16
+ * - width number|string Drawer width (default 515)
17
+ * - height number|string Drawer height (default 762)
18
+ * - toggleLabel string Optional toggle label (right side of subtitle row)
19
+ * - toggleChecked boolean Toggle state
20
+ * - onToggle function Toggle callback
21
+ */
22
+ export default function SideDrawer({
23
+ open,
24
+ onClose,
25
+ title,
26
+ subtitle,
27
+ children,
28
+ footer,
29
+ width = 515,
30
+ height = 762,
31
+ toggleLabel,
32
+ toggleChecked,
33
+ onToggle,
34
+ }) {
35
+ const drawerRef = useRef(null);
36
+
37
+ // Close on Escape key
38
+ useEffect(() => {
39
+ if (!open) return;
40
+ const handleKey = (e) => {
41
+ if (e.key === "Escape") onClose?.();
42
+ };
43
+ document.addEventListener("keydown", handleKey);
44
+ return () => document.removeEventListener("keydown", handleKey);
45
+ }, [open, onClose]);
46
+
47
+ if (!open) return null;
48
+
49
+ return (
50
+ <>
51
+ {/* Backdrop */}
52
+ <div
53
+ onClick={onClose}
54
+ style={{
55
+ position: "fixed",
56
+ inset: 0,
57
+ zIndex: 1200,
58
+ background: "rgba(0, 0, 0, 0.20)",
59
+ }}
60
+ />
61
+
62
+ {/* Drawer panel */}
63
+ <div
64
+ ref={drawerRef}
65
+ style={{
66
+ position: "fixed",
67
+ top: "50%",
68
+ right: 0,
69
+ transform: "translateY(-50%)",
70
+ zIndex: 1201,
71
+ display: "flex",
72
+ width,
73
+ height,
74
+ maxHeight: "100vh",
75
+ padding: "20px",
76
+ flexDirection: "column",
77
+ alignItems: "flex-start",
78
+ gap: "20px",
79
+ borderRadius: "12px 0 0 12px",
80
+ background: "#FFF",
81
+ boxShadow: "648px 0 100px 0 rgba(0, 0, 0, 0.20)",
82
+ }}
83
+ >
84
+ {/* Header: Title + Close */}
85
+ <div
86
+ style={{
87
+ display: "flex",
88
+ alignItems: "center",
89
+ justifyContent: "space-between",
90
+ width: "100%",
91
+ flexShrink: 0,
92
+ }}
93
+ >
94
+ <h2
95
+ style={{
96
+ fontSize: "20px",
97
+ fontWeight: 700,
98
+ color: "var(--Base-Strong, #0B0B0B)",
99
+ margin: 0,
100
+ lineHeight: 1.3,
101
+ }}
102
+ >
103
+ {title}
104
+ </h2>
105
+ <button
106
+ onClick={onClose}
107
+ style={{
108
+ display: "flex",
109
+ alignItems: "center",
110
+ justifyContent: "center",
111
+ width: "28px",
112
+ height: "28px",
113
+ border: "none",
114
+ background: "transparent",
115
+ color: "var(--Grey-Strong, #808183)",
116
+ cursor: "pointer",
117
+ borderRadius: "4px",
118
+ transition: "background 0.15s ease",
119
+ }}
120
+ onMouseEnter={(e) => {
121
+ e.currentTarget.style.background = "#ECEEF2";
122
+ }}
123
+ onMouseLeave={(e) => {
124
+ e.currentTarget.style.background = "transparent";
125
+ }}
126
+ >
127
+ <X size={20} strokeWidth={2} />
128
+ </button>
129
+ </div>
130
+
131
+ {/* Divider */}
132
+ <div
133
+ style={{
134
+ width: "100%",
135
+ height: "1px",
136
+ background: "#ECEEF2",
137
+ flexShrink: 0,
138
+ }}
139
+ />
140
+
141
+ {/* Subtitle row with optional toggle */}
142
+ {(subtitle || toggleLabel) && (
143
+ <div
144
+ style={{
145
+ display: "flex",
146
+ alignItems: "center",
147
+ justifyContent: "space-between",
148
+ width: "100%",
149
+ gap: "12px",
150
+ flexShrink: 0,
151
+ }}
152
+ >
153
+ {subtitle && (
154
+ <p
155
+ style={{
156
+ fontSize: "13px",
157
+ lineHeight: 1.5,
158
+ color: "var(--Grey-Strong, #808183)",
159
+ margin: 0,
160
+ flex: 1,
161
+ }}
162
+ >
163
+ {subtitle}
164
+ </p>
165
+ )}
166
+ {toggleLabel && (
167
+ <div
168
+ style={{
169
+ display: "flex",
170
+ alignItems: "center",
171
+ gap: "8px",
172
+ flexShrink: 0,
173
+ }}
174
+ >
175
+ {/* Toggle switch */}
176
+ <button
177
+ onClick={() => onToggle?.(!toggleChecked)}
178
+ style={{
179
+ position: "relative",
180
+ width: "40px",
181
+ height: "22px",
182
+ borderRadius: "11px",
183
+ border: "none",
184
+ background: toggleChecked
185
+ ? "var(--Base-Strong, #0B0B0B)"
186
+ : "var(--Base-Faint, #D9D9D9)",
187
+ cursor: "pointer",
188
+ transition: "background 0.2s ease",
189
+ padding: 0,
190
+ flexShrink: 0,
191
+ }}
192
+ >
193
+ <div
194
+ style={{
195
+ position: "absolute",
196
+ top: "2px",
197
+ left: toggleChecked ? "20px" : "2px",
198
+ width: "18px",
199
+ height: "18px",
200
+ borderRadius: "50%",
201
+ background: "#FFF",
202
+ transition: "left 0.2s ease",
203
+ boxShadow: "0 1px 3px rgba(0,0,0,0.15)",
204
+ }}
205
+ />
206
+ </button>
207
+ <span
208
+ style={{
209
+ fontSize: "13px",
210
+ fontWeight: 500,
211
+ color: "var(--Base-Strong, #1E1E1E)",
212
+ lineHeight: 1.4,
213
+ }}
214
+ >
215
+ {toggleLabel}
216
+ </span>
217
+ </div>
218
+ )}
219
+ </div>
220
+ )}
221
+
222
+ {/* Body content — scrollable */}
223
+ <div
224
+ style={{
225
+ flex: 1,
226
+ width: "100%",
227
+ overflowY: "auto",
228
+ display: "flex",
229
+ flexDirection: "column",
230
+ gap: "16px",
231
+ minHeight: 0,
232
+ }}
233
+ >
234
+ {children}
235
+ </div>
236
+
237
+ {/* Footer */}
238
+ {footer && (
239
+ <>
240
+ <div
241
+ style={{
242
+ width: "100%",
243
+ height: "1px",
244
+ background: "#ECEEF2",
245
+ flexShrink: 0,
246
+ }}
247
+ />
248
+ <div
249
+ style={{
250
+ display: "flex",
251
+ alignItems: "center",
252
+ justifyContent: "flex-end",
253
+ gap: "12px",
254
+ width: "100%",
255
+ flexShrink: 0,
256
+ }}
257
+ >
258
+ {footer}
259
+ </div>
260
+ </>
261
+ )}
262
+ </div>
263
+ </>
264
+ );
265
+ }
266
+
267
+ /**
268
+ * DrawerButton — standard button for use in SideDrawer footer.
269
+ *
270
+ * Props:
271
+ * - label string
272
+ * - variant "primary" | "secondary" (default "secondary")
273
+ * - onClick function
274
+ * - disabled boolean
275
+ */
276
+ export function DrawerButton({
277
+ label,
278
+ variant = "secondary",
279
+ onClick,
280
+ disabled,
281
+ }) {
282
+ const isPrimary = variant === "primary";
283
+
284
+ return (
285
+ <button
286
+ onClick={onClick}
287
+ disabled={disabled}
288
+ style={{
289
+ display: "flex",
290
+ height: "36px",
291
+ padding: "0 20px",
292
+ justifyContent: "center",
293
+ alignItems: "center",
294
+ gap: "8px",
295
+ borderRadius: "6px",
296
+ border: isPrimary ? "none" : "1px solid #D9D9D9",
297
+ background: isPrimary
298
+ ? "var(--Base-Strong, #0B0B0B)"
299
+ : "var(--Base-White, #FFF)",
300
+ color: isPrimary ? "#FFF" : "var(--Base-Strong, #1E1E1E)",
301
+ fontSize: "14px",
302
+ fontWeight: 600,
303
+ cursor: disabled ? "default" : "pointer",
304
+ opacity: disabled ? 0.5 : 1,
305
+ transition: "all 0.15s ease",
306
+ }}
307
+ onMouseEnter={(e) => {
308
+ if (!disabled && !isPrimary) {
309
+ e.currentTarget.style.background = "#ECEEF2";
310
+ }
311
+ }}
312
+ onMouseLeave={(e) => {
313
+ if (!disabled && !isPrimary) {
314
+ e.currentTarget.style.background = "var(--Base-White, #FFF)";
315
+ }
316
+ }}
317
+ >
318
+ {label}
319
+ </button>
320
+ );
321
+ }
@@ -11,3 +11,4 @@ export { default as AgentLiftCard } from './AgentLiftCard.jsx';
11
11
  export { default as Pagination } from './Pagination.jsx';
12
12
  export { default as CustomFilterChips } from './CustomFilterChips.jsx';
13
13
  export { default as AutoSearch } from './AutoSearch.jsx';
14
+ export { default as SideDrawer, DrawerButton } from './SideDrawer.jsx';
@@ -26,7 +26,7 @@ export {
26
26
  export { DataTable, DataTableFilters, SummaryStatsPanel } from './data';
27
27
 
28
28
  // Compass evaluation
29
- export { SignalCard, ObservationCard, SmallObservationCard, ScoreDriverCard, ScoreDriverCardVariant, ConditionCard, ModelScoreCard, SummarySection, AutoSearch } from './common';
29
+ export { SignalCard, ObservationCard, SmallObservationCard, ScoreDriverCard, ScoreDriverCardVariant, ConditionCard, ModelScoreCard, SummarySection, AutoSearch, SideDrawer, DrawerButton } from './common';
30
30
 
31
31
  // Media / transcript
32
32
  export { TranscriptCard, Timeline, ConversationTurn, InteractionSummaryCard } from './media';
@@ -47,5 +47,8 @@ export { NotificationPanel, NotificationItem } from './notifications';
47
47
 
48
48
  export { OverlayPanel } from './models';
49
49
 
50
+ // Onboarding
51
+ export { UploadEvaluate, GettingStarted, UploadInteraction, ConnectData, AddTeammates } from './onboarding';
52
+
50
53
  // Login
51
54
  export { LoginPage } from './login';