chordia-ui 3.2.5 → 3.2.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chordia-ui",
3
- "version": "3.2.5",
3
+ "version": "3.2.7",
4
4
  "description": "Chordia Design System - UI components, tokens, and Tailwind preset",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -0,0 +1,256 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import { FolderCheck } from "lucide-react";
5
+
6
+ /**
7
+ * ThreeCirclesSpinner — animated concentric spinner matching the Figma asset.
8
+ * Three arcs (outer gold, middle green, inner gold) rotating at different speeds.
9
+ */
10
+ function ThreeCirclesSpinner({ size = 48 }) {
11
+ return (
12
+ <svg
13
+ width={size}
14
+ height={size}
15
+ viewBox="0 0 48 48"
16
+ fill="none"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ style={{ animation: "file-upload-spin 1.2s linear infinite" }}
19
+ >
20
+ <path
21
+ d="M43 24C43 26.4951 42.5086 28.9658 41.5537 31.271C40.5989 33.5762 39.1993 35.6707 37.435 37.435C35.6707 39.1993 33.5762 40.5989 31.271 41.5537C28.9658 42.5086 26.4951 43 24 43C21.5049 43 19.0342 42.5086 16.729 41.5537C14.4238 40.5989 12.3293 39.1993 10.565 37.435C8.80066 35.6707 7.40113 33.5762 6.44629 31.271C5.49145 28.9658 5 26.4951 5 24"
22
+ stroke="#F3E7C7"
23
+ strokeWidth="4"
24
+ strokeLinecap="round"
25
+ />
26
+ <path
27
+ d="M12 24C12 22.4241 12.3104 20.8637 12.9134 19.4078C13.5165 17.9519 14.4004 16.629 15.5147 15.5147C16.629 14.4004 17.9519 13.5165 19.4078 12.9134C20.8637 12.3104 22.4241 12 24 12C25.5759 12 27.1363 12.3104 28.5922 12.9134C30.0481 13.5165 31.371 14.4004 32.4853 15.5147C33.5996 16.629 34.4835 17.9519 35.0866 19.4078C35.6896 20.8637 36 22.4241 36 24"
28
+ stroke="#00A66E"
29
+ strokeWidth="4"
30
+ strokeLinecap="round"
31
+ />
32
+ <path
33
+ d="M20 24C20 24.5253 20.1035 25.0454 20.3045 25.5307C20.5055 26.016 20.8001 26.457 21.1716 26.8284C21.543 27.1999 21.984 27.4945 22.4693 27.6955C22.9546 27.8965 23.4747 28 24 28C24.5253 28 25.0454 27.8965 25.5307 27.6955C26.016 27.4945 26.457 27.1999 26.8284 26.8284C27.1999 26.457 27.4945 26.016 27.6955 25.5307C27.8965 25.0454 28 24.5253 28 24"
34
+ stroke="#F3E7C7"
35
+ strokeWidth="4"
36
+ strokeLinecap="round"
37
+ />
38
+ </svg>
39
+ );
40
+ }
41
+
42
+ /**
43
+ * FileUploadingState — shows file upload progress with spinner.
44
+ *
45
+ * Props:
46
+ * - title string Main message (default "Uploading your file...")
47
+ * - subtitle string Secondary message (default "Please wait while we process your file")
48
+ * - progress number Optional progress percentage (0-100)
49
+ * - width number|string Container width (default 648)
50
+ * - height number|string Container height (default 281)
51
+ */
52
+ export default function FileUploadingState({
53
+ title = "Uploading your file...",
54
+ subtitle = "Please wait while we process your file",
55
+ progress,
56
+ width = 648,
57
+ height = 281,
58
+ }) {
59
+ return (
60
+ <>
61
+ <style>{`
62
+ @keyframes file-upload-spin {
63
+ from { transform: rotate(0deg); }
64
+ to { transform: rotate(360deg); }
65
+ }
66
+ `}</style>
67
+
68
+ <div
69
+ style={{
70
+ display: "flex",
71
+ width,
72
+ height,
73
+ padding: "88px 64px 64px 64px",
74
+ flexDirection: "column",
75
+ justifyContent: "center",
76
+ alignItems: "center",
77
+ gap: "8px",
78
+ borderRadius: "12px",
79
+ border: "2px dashed #D9D9D9",
80
+ background: "var(--Grey-White, #FFF)",
81
+ boxSizing: "border-box",
82
+ }}
83
+ >
84
+ {/* Spinner */}
85
+ <ThreeCirclesSpinner size={48} />
86
+
87
+ {/* Title */}
88
+ <p
89
+ style={{
90
+ fontSize: "16px",
91
+ fontWeight: 600,
92
+ color: "var(--Base-Strong, #2E3236)",
93
+ margin: 0,
94
+ lineHeight: "normal",
95
+ textAlign: "center",
96
+ }}
97
+ >
98
+ {title}
99
+ </p>
100
+
101
+ {/* Subtitle */}
102
+ <p
103
+ style={{
104
+ fontSize: "13px",
105
+ fontWeight: 400,
106
+ color: "var(--Grey-Strong, #808183)",
107
+ margin: 0,
108
+ lineHeight: "140%",
109
+ textAlign: "center",
110
+ }}
111
+ >
112
+ {subtitle}
113
+ </p>
114
+
115
+ {/* Optional progress bar */}
116
+ {progress !== undefined && (
117
+ <div
118
+ style={{
119
+ width: "200px",
120
+ height: "4px",
121
+ borderRadius: "2px",
122
+ background: "#ECEEF2",
123
+ marginTop: "8px",
124
+ overflow: "hidden",
125
+ }}
126
+ >
127
+ <div
128
+ style={{
129
+ width: `${Math.min(100, Math.max(0, progress))}%`,
130
+ height: "100%",
131
+ borderRadius: "2px",
132
+ background: "var(--Green-Primary, #00A66E)",
133
+ transition: "width 0.3s ease",
134
+ }}
135
+ />
136
+ </div>
137
+ )}
138
+ </div>
139
+ </>
140
+ );
141
+ }
142
+
143
+ /**
144
+ * FileUploadSuccessState — shows upload complete with folder-check icon.
145
+ *
146
+ * Props:
147
+ * - title string Main message (default "File uploaded successfully!")
148
+ * - subtitle string Secondary message (default "13 files have been uploaded to your project")
149
+ * - actionLabel string Button label (default "Add more files")
150
+ * - onAction function Button click callback
151
+ * - width number|string Container width (default 648)
152
+ * - height number|string Container height (default 281)
153
+ */
154
+ export function FileUploadSuccessState({
155
+ title = "File uploaded successfully!",
156
+ subtitle = "13 files have been uploaded to your project",
157
+ actionLabel = "Add more files",
158
+ onAction,
159
+ width = 648,
160
+ height = 281,
161
+ }) {
162
+ return (
163
+ <div
164
+ style={{
165
+ display: "flex",
166
+ width,
167
+ height,
168
+ padding: "88px 64px 64px 64px",
169
+ flexDirection: "column",
170
+ justifyContent: "center",
171
+ alignItems: "center",
172
+ gap: "8px",
173
+ borderRadius: "12px",
174
+ border: "1px solid #D9D9D9",
175
+ background: "var(--Grey-White, #FFF)",
176
+ boxSizing: "border-box",
177
+ }}
178
+ >
179
+ {/* Icon circle */}
180
+ <div
181
+ style={{
182
+ display: "flex",
183
+ width: "64px",
184
+ height: "64px",
185
+ justifyContent: "center",
186
+ alignItems: "center",
187
+ borderRadius: "9999px",
188
+ background: "var(--Focus-2, #FAF5E9)",
189
+ flexShrink: 0,
190
+ marginBottom: "8px",
191
+ }}
192
+ >
193
+ <FolderCheck size={24} strokeWidth={2} color="var(--Base-Strong, #2E3236)" />
194
+ </div>
195
+
196
+ {/* Title */}
197
+ <p
198
+ style={{
199
+ fontSize: "16px",
200
+ fontWeight: 600,
201
+ color: "var(--Base-Strong, #2E3236)",
202
+ margin: 0,
203
+ lineHeight: "normal",
204
+ textAlign: "center",
205
+ }}
206
+ >
207
+ {title}
208
+ </p>
209
+
210
+ {/* Subtitle */}
211
+ <p
212
+ style={{
213
+ fontSize: "13px",
214
+ fontWeight: 400,
215
+ color: "var(--Grey-Strong, #808183)",
216
+ margin: 0,
217
+ lineHeight: "140%",
218
+ textAlign: "center",
219
+ }}
220
+ >
221
+ {/* {subtitle} */}
222
+ </p>
223
+
224
+ {/* Action button */}
225
+ {actionLabel && onAction && (
226
+ <button
227
+ onClick={onAction}
228
+ style={{
229
+ display: "flex",
230
+ padding: "8px 20px",
231
+ justifyContent: "center",
232
+ alignItems: "center",
233
+ gap: "8px",
234
+ borderRadius: "6px",
235
+ border: "1px solid #D9D9D9",
236
+ background: "var(--Base-White, #FFF)",
237
+ color: "var(--Grey-Strong, #808183)",
238
+ fontSize: "14px",
239
+ fontWeight: 500,
240
+ cursor: "pointer",
241
+ marginTop: "8px",
242
+ transition: "all 0.15s ease",
243
+ }}
244
+ onMouseEnter={(e) => {
245
+ e.currentTarget.style.background = "#ECEEF2";
246
+ }}
247
+ onMouseLeave={(e) => {
248
+ e.currentTarget.style.background = "var(--Base-White, #FFF)";
249
+ }}
250
+ >
251
+ {actionLabel}
252
+ </button>
253
+ )}
254
+ </div>
255
+ );
256
+ }
@@ -93,11 +93,12 @@ export default function SideDrawer({
93
93
  >
94
94
  <h2
95
95
  style={{
96
- fontSize: "20px",
97
- fontWeight: 700,
98
- color: "var(--Base-Strong, #0B0B0B)",
96
+ fontSize: "24px",
97
+ fontWeight: 600,
98
+ fontStyle: "normal",
99
+ color: "var(--Grey-3, #252525)",
99
100
  margin: 0,
100
- lineHeight: 1.3,
101
+ lineHeight: "normal",
101
102
  }}
102
103
  >
103
104
  {title}
@@ -154,8 +155,10 @@ export default function SideDrawer({
154
155
  <p
155
156
  style={{
156
157
  fontSize: "13px",
157
- lineHeight: 1.5,
158
- color: "var(--Grey-Strong, #808183)",
158
+ fontStyle: "normal",
159
+ fontWeight: 400,
160
+ lineHeight: "140%",
161
+ color: "#0B0B0B",
159
162
  margin: 0,
160
163
  flex: 1,
161
164
  }}
@@ -298,7 +301,7 @@ export function DrawerButton({
298
301
  ? "var(--Base-Strong, #0B0B0B)"
299
302
  : "var(--Base-White, #FFF)",
300
303
  color: isPrimary ? "#FFF" : "var(--Base-Strong, #1E1E1E)",
301
- fontSize: "14px",
304
+ fontSize: "16px",
302
305
  fontWeight: 600,
303
306
  cursor: disabled ? "default" : "pointer",
304
307
  opacity: disabled ? 0.5 : 1,
@@ -319,3 +322,67 @@ export function DrawerButton({
319
322
  </button>
320
323
  );
321
324
  }
325
+
326
+ /**
327
+ * DrawerLabel — form label for use inside SideDrawer.
328
+ *
329
+ * Props:
330
+ * - children ReactNode
331
+ * - htmlFor string
332
+ */
333
+ export function DrawerLabel({ children, htmlFor }) {
334
+ return (
335
+ <label
336
+ htmlFor={htmlFor}
337
+ style={{
338
+ display: "block",
339
+ color: "var(--Base-Strong, #2E3236)",
340
+ fontSize: "16px",
341
+ fontStyle: "normal",
342
+ fontWeight: 400,
343
+ lineHeight: "normal",
344
+ marginBottom: "6px",
345
+ }}
346
+ >
347
+ {children}
348
+ </label>
349
+ );
350
+ }
351
+
352
+ /**
353
+ * DrawerInput — text input for use inside SideDrawer.
354
+ *
355
+ * Props:
356
+ * - All standard <input> props (type, placeholder, value, onChange, etc.)
357
+ */
358
+ export function DrawerInput(props) {
359
+ return (
360
+ <input
361
+ {...props}
362
+ style={{
363
+ width: "100%",
364
+ padding: "10px 12px",
365
+ borderRadius: "6px",
366
+ border: "1px solid #D9D9D9",
367
+ color: "var(--Base-Strong, #2E3236)",
368
+ fontSize: "16px",
369
+ fontStyle: "normal",
370
+ fontWeight: 400,
371
+ lineHeight: "normal",
372
+ outline: "none",
373
+ boxSizing: "border-box",
374
+ background: "#FFF",
375
+ transition: "border-color 0.15s ease",
376
+ ...props.style,
377
+ }}
378
+ onFocus={(e) => {
379
+ e.currentTarget.style.borderColor = "#808183";
380
+ props.onFocus?.(e);
381
+ }}
382
+ onBlur={(e) => {
383
+ e.currentTarget.style.borderColor = "#D9D9D9";
384
+ props.onBlur?.(e);
385
+ }}
386
+ />
387
+ );
388
+ }
@@ -11,4 +11,5 @@ 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';
14
+ export { default as SideDrawer, DrawerButton, DrawerLabel, DrawerInput } from './SideDrawer.jsx';
15
+ export { default as FileUploadingState, FileUploadSuccessState } from './FileUploadingState.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, SideDrawer, DrawerButton } from './common';
29
+ export { SignalCard, ObservationCard, SmallObservationCard, ScoreDriverCard, ScoreDriverCardVariant, ConditionCard, ModelScoreCard, SummarySection, AutoSearch, SideDrawer, DrawerButton, DrawerLabel, DrawerInput, FileUploadingState, FileUploadSuccessState } from './common';
30
30
 
31
31
  // Media / transcript
32
32
  export { TranscriptCard, Timeline, ConversationTurn, InteractionSummaryCard } from './media';
@@ -31,8 +31,9 @@ export default function IntegrationCard({
31
31
  const statusConfig = {
32
32
  connected: {
33
33
  label: "Connected",
34
- color: "var(--Grey-Strong, #808183)",
35
- icon: <CheckCircle2 size={16} strokeWidth={2} />,
34
+ color: "var(--Grey-White, #FFF)",
35
+ bgColor: "var(--Green-Primary, #00A66E)",
36
+ icon: <CheckCircle2 size={16} strokeWidth={2} color="#FFF" />,
36
37
  actionLabel: "Disconnect",
37
38
  actionFilled: false,
38
39
  },
@@ -122,10 +123,15 @@ export default function IntegrationCard({
122
123
  <div
123
124
  style={{
124
125
  display: "flex",
126
+ padding: config.bgColor ? "4px 8px 4px 6px" : "0",
125
127
  alignItems: "center",
126
- gap: "6px",
127
- fontSize: "13px",
128
+ gap: "4px",
129
+ borderRadius: config.bgColor ? "16px" : "0",
130
+ background: config.bgColor || "transparent",
131
+ fontSize: "12px",
132
+ fontStyle: "normal",
128
133
  fontWeight: 400,
134
+ lineHeight: "16px",
129
135
  color: config.color,
130
136
  }}
131
137
  >
@@ -101,7 +101,7 @@ function NavRow({ text, linkText, onClick }) {
101
101
 
102
102
  function TermsFooter({ onTerms, onPrivacyPolicy, paddingTop }) {
103
103
  return (
104
- <div style={{ display: 'flex', justifyContent: 'center', width: '100%', position: 'absolute', bottom: 40, left: 0, right: 0 }}>
104
+ <div style={{ display: 'flex', justifyContent: 'center', width: '100%', marginTop: 'auto', paddingTop: paddingTop || 40, flexShrink: 0 }}>
105
105
  <span style={{ fontSize: 15, fontWeight: 400, lineHeight: '22px', color: 'var(--color-text)', fontFamily: FF, textAlign: 'center', whiteSpace: 'nowrap' }}>
106
106
  By continuing, you agree to our{' '}
107
107
  <a href="https://pages.chordia.ai/terms-of-use/" target="_blank" rel="noopener noreferrer"
@@ -462,7 +462,7 @@ export default function LoginPage({
462
462
  </div>
463
463
 
464
464
  {/* Dots */}
465
- <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 8, height: 4, position: 'absolute', bottom: 40, left: 48 }}>
465
+ <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 8, height: 4, marginTop: 'auto', flexShrink: 0 }}>
466
466
  {Array.from({ length: SLIDE_COUNT }).map((_, i) => (
467
467
  <button key={i} onClick={() => setActiveSlide(i)}
468
468
  style={{
@@ -250,9 +250,12 @@ function SidebarItem({ item, active, onNavigate, collapsed }) {
250
250
  borderBottom: "none",
251
251
  borderLeft: "none",
252
252
  background: active ? "var(--Background-MonoPressed, #323232)" : "transparent",
253
- color: active ? "#00A66E" : "var(--Content-TertiaryInverse, #B2AEA8)",
254
- fontWeight: active ? 550 : 400,
255
- fontSize: "var(--text-sm)",
253
+ color: active ? "var(--Brand-400, #33B88B)" : "var(--Content-TertiaryInverse, #B2AEA8)",
254
+ fontWeight: 500,
255
+ fontSize: "12px",
256
+ fontStyle: "normal",
257
+ lineHeight: "120%",
258
+ textTransform: "uppercase",
256
259
  fontFamily: "var(--font-sans)",
257
260
  cursor: "pointer",
258
261
  textAlign: "left",
@@ -262,7 +265,7 @@ function SidebarItem({ item, active, onNavigate, collapsed }) {
262
265
  onMouseEnter={(e) => {
263
266
  if (!active) {
264
267
  e.currentTarget.style.background = "var(--Background-MonoPressed, #323232)";
265
- e.currentTarget.style.color = "#00A66E";
268
+ e.currentTarget.style.color = "var(--Brand-400, #33B88B)";
266
269
  }
267
270
  }}
268
271
  onMouseLeave={(e) => {
@@ -317,7 +320,7 @@ function SidebarGroup({ item, activeId, expanded, onToggle, onNavigate, collapse
317
320
  borderRadius: "4px",
318
321
  border: "none",
319
322
  background: hasActiveChild ? "var(--Background-MonoPressed, #323232)" : "transparent",
320
- color: hasActiveChild ? "#00A66E" : "var(--Content-TertiaryInverse, #B2AEA8)",
323
+ color: hasActiveChild ? "var(--Brand-400, #33B88B)" : "var(--Content-TertiaryInverse, #B2AEA8)",
321
324
  cursor: "pointer",
322
325
  marginBottom: 2,
323
326
  transition: "background 0.15s ease",
@@ -325,7 +328,7 @@ function SidebarGroup({ item, activeId, expanded, onToggle, onNavigate, collapse
325
328
  onMouseEnter={(e) => {
326
329
  if (!hasActiveChild) {
327
330
  e.currentTarget.style.background = "var(--Background-MonoPressed, #323232)";
328
- e.currentTarget.style.color = "#00A66E";
331
+ e.currentTarget.style.color = "var(--Brand-400, #33B88B)";
329
332
  }
330
333
  }}
331
334
  onMouseLeave={(e) => {
@@ -357,9 +360,12 @@ function SidebarGroup({ item, activeId, expanded, onToggle, onNavigate, collapse
357
360
  borderRadius: "4px",
358
361
  border: "none",
359
362
  background: "transparent",
360
- color: hasActiveChild ? "#00A66E" : "var(--Content-TertiaryInverse, #B2AEA8)",
361
- fontWeight: hasActiveChild ? 550 : 400,
362
- fontSize: "var(--text-sm)",
363
+ color: hasActiveChild ? "var(--Brand-400, #33B88B)" : "var(--Content-TertiaryInverse, #B2AEA8)",
364
+ fontWeight: 700,
365
+ fontSize: "12px",
366
+ fontStyle: "normal",
367
+ lineHeight: "120%",
368
+ textTransform: "uppercase",
363
369
  fontFamily: "var(--font-sans)",
364
370
  cursor: "pointer",
365
371
  textAlign: "left",
@@ -367,12 +373,12 @@ function SidebarGroup({ item, activeId, expanded, onToggle, onNavigate, collapse
367
373
  }}
368
374
  onMouseEnter={(e) => {
369
375
  e.currentTarget.style.background = "var(--Background-MonoPressed, #323232)";
370
- e.currentTarget.style.color = "#00A66E";
376
+ e.currentTarget.style.color = "var(--Brand-400, #33B88B)";
371
377
  }}
372
378
  onMouseLeave={(e) => {
373
379
  e.currentTarget.style.background = "transparent";
374
380
  if (!hasActiveChild) e.currentTarget.style.color = "var(--Content-TertiaryInverse, #B2AEA8)";
375
- else e.currentTarget.style.color = "#00A66E";
381
+ else e.currentTarget.style.color = "var(--Brand-400, #33B88B)";
376
382
  }}
377
383
  >
378
384
  <Icon
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),f=require("react"),b=require("lucide-react"),z=require("./TextInput.cjs.js"),k=require("./SmallButton.cjs.js"),L=({options:c=[],value:a=null,onChange:n,placeholder:o="Search...",disabled:d=!1,showSuggestions:l=!0,styling:y,isAddNew:p=!1})=>{const[s,u]=f.useState(""),[h,x]=f.useState(!1),[i,m]=f.useState(null),v=f.useRef(null),w=f.useMemo(()=>{if(!l)return[];const t=s.toLowerCase();return c.filter(r=>{if(!r)return!1;const g=r.label||"",j=r.value||"";return(g.toLowerCase().includes(t)||j.toLowerCase().includes(t))&&(!i||r.value!==i.value)})},[s,c,l,i]),S=f.useMemo(()=>{if(!p)return!1;const t=s.toLowerCase();return c.some(r=>{if(!r)return!1;const g=r.label||"",j=r.value||"";return g.toLowerCase()===t||j.toLowerCase()===t})},[c,s,p]);f.useEffect(()=>{if(!h)return;const t=r=>{v.current&&!v.current.contains(r.target)&&x(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[h]);const E=t=>{n==null||n(t),u(""),x(!1),m(null)},F=()=>{const t={label:s,value:s};m(t),n==null||n(t),x(!1),u("")},B=()=>{n==null||n(null),u(""),x(!1),m(null)},D=t=>{const r=t.target.value;l?(u(r),x(!0)):p?(u(r),x(r.length>=3)):n==null||n(r)},I=()=>{(l||p)&&x(!0)},R=h&&!a&&s.length>=3;return e.jsxs("div",{className:"relative w-full",ref:v,children:[e.jsxs("div",{className:y||"flex items-center gap-2 border rounded-md px-3 py-2 bg-white shadow-sm",children:[e.jsx(b.Search,{className:"w-4 h-4 text-gray-400"}),e.jsx("div",{className:"flex-1",children:l&&a?e.jsx("div",{className:"text-gray-800 truncate",title:a.label,style:{fontSize:"var(--text-sm)",fontWeight:"var(--font-medium)",letterSpacing:"var(--tracking-normal)",lineHeight:"var(--leading-normal)",textTransform:"none",textDecoration:"none",fontFamily:"var(--font-sans)"},children:a.label}):e.jsx(z.TextInput,{value:l||p?s:a||"",onChange:t=>D({target:{value:t}}),placeholder:o,disabled:d,style:{border:"none",boxShadow:"none",padding:0,backgroundColor:"transparent"},onFocus:I})}),(a||i)&&e.jsx(k.SmallButton,{type:"button",variant:"ghost",size:"sm",onClick:B,style:{padding:0,width:20,height:20,border:"none",backgroundColor:"transparent",color:"rgba(107,114,128,1)"},children:e.jsx(b.X,{className:"w-3 h-3"})})]}),R&&e.jsxs("div",{className:"absolute w-full rounded-md border border-gray-300 bg-white shadow-lg custom-thin-scrollbar-library",style:{maxHeight:240,overflowY:"auto",zIndex:30},children:[w.length>0&&e.jsx("ul",{className:"m-0 p-0 list-none",children:w.map(t=>e.jsx("li",{onClick:()=>E(t),onMouseEnter:r=>{r.currentTarget.style.backgroundColor="var(--hover-warm)"},onMouseLeave:r=>{r.currentTarget.style.backgroundColor="transparent"},className:"cursor-pointer px-4 py-2",title:t.label,children:e.jsx("span",{className:"truncate block w-full",style:{fontFamily:"var(--font-sans)",color:"var(--text-base)",fontSize:"var(--text-sm)",fontWeight:"var(--font-medium)",letterSpacing:"var(--tracking-normal)",lineHeight:"var(--leading-normal)",textTransform:"none",textDecoration:"none"},children:t.label})},t.value))}),p&&!S&&!i&&s.length>=3&&e.jsxs(k.SmallButton,{type:"button",variant:"secondary",onClick:F,style:{width:"100%",justifyContent:"space-between",padding:"8px 10px",border:"none",borderTop:"1px solid rgba(229, 231, 235, 1)",borderRadius:0,backgroundColor:"transparent",color:"rgba(107,114,128,1)"},children:[e.jsx("span",{children:`Add "${s}"`}),e.jsx(b.PlusCircle,{className:"w-5 h-5 text-green-500"})]})]})]})};function M({open:c,onClose:a,title:n,subtitle:o,children:d,footer:l,width:y=515,height:p=762,toggleLabel:s,toggleChecked:u,onToggle:h}){const x=f.useRef(null);return f.useEffect(()=>{if(!c)return;const i=m=>{m.key==="Escape"&&(a==null||a())};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[c,a]),c?e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:a,style:{position:"fixed",inset:0,zIndex:1200,background:"rgba(0, 0, 0, 0.20)"}}),e.jsxs("div",{ref:x,style:{position:"fixed",top:"50%",right:0,transform:"translateY(-50%)",zIndex:1201,display:"flex",width:y,height:p,maxHeight:"100vh",padding:"20px",flexDirection:"column",alignItems:"flex-start",gap:"20px",borderRadius:"12px 0 0 12px",background:"#FFF",boxShadow:"648px 0 100px 0 rgba(0, 0, 0, 0.20)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",flexShrink:0},children:[e.jsx("h2",{style:{fontSize:"20px",fontWeight:700,color:"var(--Base-Strong, #0B0B0B)",margin:0,lineHeight:1.3},children:n}),e.jsx("button",{onClick:a,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",border:"none",background:"transparent",color:"var(--Grey-Strong, #808183)",cursor:"pointer",borderRadius:"4px",transition:"background 0.15s ease"},onMouseEnter:i=>{i.currentTarget.style.background="#ECEEF2"},onMouseLeave:i=>{i.currentTarget.style.background="transparent"},children:e.jsx(b.X,{size:20,strokeWidth:2})})]}),e.jsx("div",{style:{width:"100%",height:"1px",background:"#ECEEF2",flexShrink:0}}),(o||s)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:"12px",flexShrink:0},children:[o&&e.jsx("p",{style:{fontSize:"13px",lineHeight:1.5,color:"var(--Grey-Strong, #808183)",margin:0,flex:1},children:o}),s&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[e.jsx("button",{onClick:()=>h==null?void 0:h(!u),style:{position:"relative",width:"40px",height:"22px",borderRadius:"11px",border:"none",background:u?"var(--Base-Strong, #0B0B0B)":"var(--Base-Faint, #D9D9D9)",cursor:"pointer",transition:"background 0.2s ease",padding:0,flexShrink:0},children:e.jsx("div",{style:{position:"absolute",top:"2px",left:u?"20px":"2px",width:"18px",height:"18px",borderRadius:"50%",background:"#FFF",transition:"left 0.2s ease",boxShadow:"0 1px 3px rgba(0,0,0,0.15)"}})}),e.jsx("span",{style:{fontSize:"13px",fontWeight:500,color:"var(--Base-Strong, #1E1E1E)",lineHeight:1.4},children:s})]})]}),e.jsx("div",{style:{flex:1,width:"100%",overflowY:"auto",display:"flex",flexDirection:"column",gap:"16px",minHeight:0},children:d}),l&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:"100%",height:"1px",background:"#ECEEF2",flexShrink:0}}),e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"12px",width:"100%",flexShrink:0},children:l})]})]})]}):null}function H({label:c,variant:a="secondary",onClick:n,disabled:o}){const d=a==="primary";return e.jsx("button",{onClick:n,disabled:o,style:{display:"flex",height:"36px",padding:"0 20px",justifyContent:"center",alignItems:"center",gap:"8px",borderRadius:"6px",border:d?"none":"1px solid #D9D9D9",background:d?"var(--Base-Strong, #0B0B0B)":"var(--Base-White, #FFF)",color:d?"#FFF":"var(--Base-Strong, #1E1E1E)",fontSize:"14px",fontWeight:600,cursor:o?"default":"pointer",opacity:o?.5:1,transition:"all 0.15s ease"},onMouseEnter:l=>{!o&&!d&&(l.currentTarget.style.background="#ECEEF2")},onMouseLeave:l=>{!o&&!d&&(l.currentTarget.style.background="var(--Base-White, #FFF)")},children:c})}exports.AutoSearch=L;exports.DrawerButton=H;exports.SideDrawer=M;
2
- //# sourceMappingURL=SideDrawer.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SideDrawer.cjs.js","sources":["../src/components/common/AutoSearch.jsx","../src/components/common/SideDrawer.jsx"],"sourcesContent":["\"use client\";\n\nimport React, { useState, useMemo, useRef, useEffect } from \"react\";\nimport { X, Search, PlusCircle } from \"lucide-react\";\nimport TextInput from \"../primitives/TextInput\";\nimport SmallButton from \"../primitives/SmallButton\";\n\nconst AutoSearch = ({\n options = [],\n value = null,\n onChange,\n placeholder = \"Search...\",\n disabled = false,\n showSuggestions = true,\n styling,\n isAddNew = false,\n}) => {\n const [search, setSearch] = useState(\"\");\n const [isOpen, setIsOpen] = useState(false);\n const [addedOption, setAddedOption] = useState(null);\n\n const containerRef = useRef(null);\n\n const filteredOptions = useMemo(() => {\n if (!showSuggestions) return [];\n const lower = search.toLowerCase();\n\n return options.filter((opt) => {\n if (!opt) return false;\n const label = opt.label || \"\";\n const val = opt.value || \"\";\n return (\n (label.toLowerCase().includes(lower) ||\n val.toLowerCase().includes(lower)) &&\n (!addedOption || opt.value !== addedOption.value)\n );\n });\n }, [search, options, showSuggestions, addedOption]);\n\n const exactMatchExists = useMemo(() => {\n if (!isAddNew) return false;\n const lower = search.toLowerCase();\n return options.some((opt) => {\n if (!opt) return false;\n const label = opt.label || \"\";\n const val = opt.value || \"\";\n return label.toLowerCase() === lower || val.toLowerCase() === lower;\n });\n }, [options, search, isAddNew]);\n\n // Close dropdown on outside click\n useEffect(() => {\n if (!isOpen) return;\n const handleClickOutside = (event) => {\n if (\n containerRef.current &&\n !containerRef.current.contains(event.target)\n ) {\n setIsOpen(false);\n }\n };\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => document.removeEventListener(\"mousedown\", handleClickOutside);\n }, [isOpen]);\n\n const handleSelect = (opt) => {\n onChange?.(opt);\n setSearch(\"\");\n setIsOpen(false);\n setAddedOption(null);\n };\n\n const handleAddNew = () => {\n const newOpt = { label: search, value: search };\n setAddedOption(newOpt);\n onChange?.(newOpt);\n setIsOpen(false);\n setSearch(\"\");\n };\n\n const handleClear = () => {\n onChange?.(null);\n setSearch(\"\");\n setIsOpen(false);\n setAddedOption(null);\n };\n\n const handleInputChange = (e) => {\n const newValue = e.target.value;\n if (showSuggestions) {\n setSearch(newValue);\n setIsOpen(true);\n } else if (isAddNew) {\n setSearch(newValue);\n setIsOpen(newValue.length >= 3);\n } else {\n onChange?.(newValue);\n }\n };\n\n const handleInputFocus = () => {\n if (showSuggestions || isAddNew) {\n setIsOpen(true);\n }\n };\n\n const shouldShowDropdown =\n isOpen && !value && (showSuggestions ? search.length >= 3 : search.length >= 3);\n\n return (\n <div className=\"relative w-full\" ref={containerRef}>\n <div\n className={\n styling\n ? styling\n : \"flex items-center gap-2 border rounded-md px-3 py-2 bg-white shadow-sm\"\n }\n >\n <Search className=\"w-4 h-4 text-gray-400\" />\n <div className=\"flex-1\">\n {showSuggestions && value ? (\n <div\n className=\"text-gray-800 truncate\"\n title={value.label}\n style={{\n fontSize: 'var(--text-sm)',\n fontWeight: 'var(--font-medium)',\n letterSpacing: 'var(--tracking-normal)',\n lineHeight: 'var(--leading-normal)',\n textTransform: 'none',\n textDecoration: 'none',\n fontFamily: 'var(--font-sans)',\n }}\n >\n {value.label}\n </div>\n ) : (\n <TextInput\n value={showSuggestions || isAddNew ? search : value || \"\"}\n onChange={(val) =>\n handleInputChange({ target: { value: val } })\n }\n placeholder={placeholder}\n disabled={disabled}\n style={{\n border: \"none\",\n boxShadow: \"none\",\n padding: 0,\n backgroundColor: \"transparent\",\n }}\n onFocus={handleInputFocus}\n />\n )}\n </div>\n {(value || addedOption) && (\n <SmallButton\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={handleClear}\n style={{\n padding: 0,\n width: 20,\n height: 20,\n border: \"none\",\n backgroundColor: \"transparent\",\n color: \"rgba(107,114,128,1)\",\n }}\n >\n <X className=\"w-3 h-3\" />\n </SmallButton>\n )}\n </div>\n\n {shouldShowDropdown && (\n <div\n className=\"absolute w-full rounded-md border border-gray-300 bg-white shadow-lg custom-thin-scrollbar-library\"\n style={{\n maxHeight: 240,\n overflowY: \"auto\",\n zIndex: 30,\n }}\n >\n {filteredOptions.length > 0 && (\n <ul className=\"m-0 p-0 list-none\">\n {filteredOptions.map((opt) => (\n <li\n key={opt.value}\n onClick={() => handleSelect(opt)}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor = \"var(--hover-warm)\";\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = \"transparent\";\n }}\n className=\"cursor-pointer px-4 py-2\"\n title={opt.label}\n >\n <span\n className=\"truncate block w-full\"\n style={{\n fontFamily: \"var(--font-sans)\",\n color: \"var(--text-base)\",\n fontSize: \"var(--text-sm)\",\n fontWeight: \"var(--font-medium)\",\n letterSpacing: \"var(--tracking-normal)\",\n lineHeight: \"var(--leading-normal)\",\n textTransform: \"none\",\n textDecoration: \"none\",\n }}\n >\n {opt.label}\n </span>\n </li>\n ))}\n </ul>\n )}\n\n {isAddNew &&\n !exactMatchExists &&\n !addedOption &&\n search.length >= 3 && (\n <SmallButton\n type=\"button\"\n variant=\"secondary\"\n onClick={handleAddNew}\n style={{\n width: \"100%\",\n justifyContent: \"space-between\",\n padding: \"8px 10px\",\n border: \"none\",\n borderTop: \"1px solid rgba(229, 231, 235, 1)\",\n borderRadius: 0,\n backgroundColor: \"transparent\",\n color: \"rgba(107,114,128,1)\",\n }}\n >\n <span>{`Add \"${search}\"`}</span>\n <PlusCircle className=\"w-5 h-5 text-green-500\" />\n </SmallButton>\n )}\n </div>\n )}\n </div>\n );\n};\n\nexport default AutoSearch;\n\n","\"use client\";\n\nimport React, { useEffect, useRef } from \"react\";\nimport { X } from \"lucide-react\";\n\n/**\n * SideDrawer — slide-in panel from the right edge.\n *\n * Props:\n * - open boolean Whether the drawer is visible\n * - onClose function Close callback\n * - title string Header title\n * - subtitle string Optional description below the divider\n * - children ReactNode Drawer body content\n * - footer ReactNode Optional fixed footer (e.g. Cancel/Save buttons)\n * - width number|string Drawer width (default 515)\n * - height number|string Drawer height (default 762)\n * - toggleLabel string Optional toggle label (right side of subtitle row)\n * - toggleChecked boolean Toggle state\n * - onToggle function Toggle callback\n */\nexport default function SideDrawer({\n open,\n onClose,\n title,\n subtitle,\n children,\n footer,\n width = 515,\n height = 762,\n toggleLabel,\n toggleChecked,\n onToggle,\n}) {\n const drawerRef = useRef(null);\n\n // Close on Escape key\n useEffect(() => {\n if (!open) return;\n const handleKey = (e) => {\n if (e.key === \"Escape\") onClose?.();\n };\n document.addEventListener(\"keydown\", handleKey);\n return () => document.removeEventListener(\"keydown\", handleKey);\n }, [open, onClose]);\n\n if (!open) return null;\n\n return (\n <>\n {/* Backdrop */}\n <div\n onClick={onClose}\n style={{\n position: \"fixed\",\n inset: 0,\n zIndex: 1200,\n background: \"rgba(0, 0, 0, 0.20)\",\n }}\n />\n\n {/* Drawer panel */}\n <div\n ref={drawerRef}\n style={{\n position: \"fixed\",\n top: \"50%\",\n right: 0,\n transform: \"translateY(-50%)\",\n zIndex: 1201,\n display: \"flex\",\n width,\n height,\n maxHeight: \"100vh\",\n padding: \"20px\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: \"20px\",\n borderRadius: \"12px 0 0 12px\",\n background: \"#FFF\",\n boxShadow: \"648px 0 100px 0 rgba(0, 0, 0, 0.20)\",\n }}\n >\n {/* Header: Title + Close */}\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n <h2\n style={{\n fontSize: \"20px\",\n fontWeight: 700,\n color: \"var(--Base-Strong, #0B0B0B)\",\n margin: 0,\n lineHeight: 1.3,\n }}\n >\n {title}\n </h2>\n <button\n onClick={onClose}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"28px\",\n height: \"28px\",\n border: \"none\",\n background: \"transparent\",\n color: \"var(--Grey-Strong, #808183)\",\n cursor: \"pointer\",\n borderRadius: \"4px\",\n transition: \"background 0.15s ease\",\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.background = \"#ECEEF2\";\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.background = \"transparent\";\n }}\n >\n <X size={20} strokeWidth={2} />\n </button>\n </div>\n\n {/* Divider */}\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n\n {/* Subtitle row with optional toggle */}\n {(subtitle || toggleLabel) && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n width: \"100%\",\n gap: \"12px\",\n flexShrink: 0,\n }}\n >\n {subtitle && (\n <p\n style={{\n fontSize: \"13px\",\n lineHeight: 1.5,\n color: \"var(--Grey-Strong, #808183)\",\n margin: 0,\n flex: 1,\n }}\n >\n {subtitle}\n </p>\n )}\n {toggleLabel && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: \"8px\",\n flexShrink: 0,\n }}\n >\n {/* Toggle switch */}\n <button\n onClick={() => onToggle?.(!toggleChecked)}\n style={{\n position: \"relative\",\n width: \"40px\",\n height: \"22px\",\n borderRadius: \"11px\",\n border: \"none\",\n background: toggleChecked\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-Faint, #D9D9D9)\",\n cursor: \"pointer\",\n transition: \"background 0.2s ease\",\n padding: 0,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n top: \"2px\",\n left: toggleChecked ? \"20px\" : \"2px\",\n width: \"18px\",\n height: \"18px\",\n borderRadius: \"50%\",\n background: \"#FFF\",\n transition: \"left 0.2s ease\",\n boxShadow: \"0 1px 3px rgba(0,0,0,0.15)\",\n }}\n />\n </button>\n <span\n style={{\n fontSize: \"13px\",\n fontWeight: 500,\n color: \"var(--Base-Strong, #1E1E1E)\",\n lineHeight: 1.4,\n }}\n >\n {toggleLabel}\n </span>\n </div>\n )}\n </div>\n )}\n\n {/* Body content — scrollable */}\n <div\n style={{\n flex: 1,\n width: \"100%\",\n overflowY: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"16px\",\n minHeight: 0,\n }}\n >\n {children}\n </div>\n\n {/* Footer */}\n {footer && (\n <>\n <div\n style={{\n width: \"100%\",\n height: \"1px\",\n background: \"#ECEEF2\",\n flexShrink: 0,\n }}\n />\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: \"12px\",\n width: \"100%\",\n flexShrink: 0,\n }}\n >\n {footer}\n </div>\n </>\n )}\n </div>\n </>\n );\n}\n\n/**\n * DrawerButton — standard button for use in SideDrawer footer.\n *\n * Props:\n * - label string\n * - variant \"primary\" | \"secondary\" (default \"secondary\")\n * - onClick function\n * - disabled boolean\n */\nexport function DrawerButton({\n label,\n variant = \"secondary\",\n onClick,\n disabled,\n}) {\n const isPrimary = variant === \"primary\";\n\n return (\n <button\n onClick={onClick}\n disabled={disabled}\n style={{\n display: \"flex\",\n height: \"36px\",\n padding: \"0 20px\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"8px\",\n borderRadius: \"6px\",\n border: isPrimary ? \"none\" : \"1px solid #D9D9D9\",\n background: isPrimary\n ? \"var(--Base-Strong, #0B0B0B)\"\n : \"var(--Base-White, #FFF)\",\n color: isPrimary ? \"#FFF\" : \"var(--Base-Strong, #1E1E1E)\",\n fontSize: \"14px\",\n fontWeight: 600,\n cursor: disabled ? \"default\" : \"pointer\",\n opacity: disabled ? 0.5 : 1,\n transition: \"all 0.15s ease\",\n }}\n onMouseEnter={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"#ECEEF2\";\n }\n }}\n onMouseLeave={(e) => {\n if (!disabled && !isPrimary) {\n e.currentTarget.style.background = \"var(--Base-White, #FFF)\";\n }\n }}\n >\n {label}\n </button>\n );\n}\n"],"names":["AutoSearch","options","value","onChange","placeholder","disabled","showSuggestions","styling","isAddNew","search","setSearch","useState","isOpen","setIsOpen","addedOption","setAddedOption","containerRef","useRef","filteredOptions","useMemo","lower","opt","label","val","exactMatchExists","useEffect","handleClickOutside","event","handleSelect","handleAddNew","newOpt","handleClear","handleInputChange","e","newValue","handleInputFocus","shouldShowDropdown","jsxs","jsx","Search","TextInput","SmallButton","X","PlusCircle","SideDrawer","open","onClose","title","subtitle","children","footer","width","height","toggleLabel","toggleChecked","onToggle","drawerRef","handleKey","Fragment","DrawerButton","variant","onClick","isPrimary"],"mappings":"iKAOMA,EAAa,CAAC,CAClB,QAAAC,EAAU,CAAC,EACX,MAAAC,EAAQ,KACR,SAAAC,EACA,YAAAC,EAA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