@efiche/design 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/index.js ADDED
@@ -0,0 +1,1656 @@
1
+ "use client";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp.call(b, prop))
12
+ __defNormalProp(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(b)) {
15
+ if (__propIsEnum.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
+ var __objRest = (source, exclude) => {
22
+ var target = {};
23
+ for (var prop in source)
24
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
+ target[prop] = source[prop];
26
+ if (source != null && __getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(source)) {
28
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
+ target[prop] = source[prop];
30
+ }
31
+ return target;
32
+ };
33
+
34
+ // src/components/ThemeProvider.tsx
35
+ import { createContext, useContext, useState } from "react";
36
+ import { jsx } from "react/jsx-runtime";
37
+ var ThemeContext = createContext(null);
38
+ var ThemeProvider = ({
39
+ children,
40
+ defaultTheme = "light"
41
+ }) => {
42
+ const [theme, setTheme] = useState(defaultTheme);
43
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: { theme, toggle: () => setTheme((t) => t === "light" ? "dark" : "light") }, children: /* @__PURE__ */ jsx("div", { className: theme === "dark" ? "ds-theme-dark" : void 0, children }) });
44
+ };
45
+ var useTheme = () => {
46
+ const ctx = useContext(ThemeContext);
47
+ if (!ctx) throw new Error("useTheme must be used inside <ThemeProvider>");
48
+ return ctx;
49
+ };
50
+
51
+ // src/components/Charts/LineChart.tsx
52
+ import { useEffect, useRef, useState as useState2 } from "react";
53
+ import {
54
+ LineChart as RechartsLineChart,
55
+ Line,
56
+ XAxis,
57
+ YAxis,
58
+ CartesianGrid,
59
+ Tooltip,
60
+ Legend
61
+ } from "recharts";
62
+
63
+ // src/components/Charts/chartUtils.ts
64
+ var CHART_COLORS = [
65
+ "#3b82f6",
66
+ // blue
67
+ "#22c55e",
68
+ // green
69
+ "#f59e0b",
70
+ // amber
71
+ "#ef4444",
72
+ // red
73
+ "#8b5cf6",
74
+ // violet
75
+ "#06b6d4",
76
+ // cyan
77
+ "#f97316",
78
+ // orange
79
+ "#ec4899"
80
+ // pink
81
+ ];
82
+ function getChartTheme(theme) {
83
+ const isDark = theme === "dark";
84
+ return {
85
+ gridColor: isDark ? "#334155" : "#e2e8f0",
86
+ axisStroke: isDark ? "#94a3b8" : "#64748b",
87
+ axisTick: { fill: isDark ? "#94a3b8" : "#64748b", fontSize: 12 },
88
+ primaryColor: isDark ? "#60a5fa" : "#3b82f6",
89
+ tooltipStyle: {
90
+ backgroundColor: isDark ? "#1e293b" : "#ffffff",
91
+ border: `1px solid ${isDark ? "#334155" : "#e2e8f0"}`,
92
+ borderRadius: "6px",
93
+ color: isDark ? "#f1f5f9" : "#0f172a",
94
+ fontSize: "0.8125rem"
95
+ }
96
+ };
97
+ }
98
+
99
+ // src/components/Charts/LineChart.tsx
100
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
101
+ var LineChart = ({
102
+ data,
103
+ xKey,
104
+ lines,
105
+ height = 250,
106
+ legend = false,
107
+ grid = true,
108
+ theme = "light",
109
+ className,
110
+ style
111
+ }) => {
112
+ const containerRef = useRef(null);
113
+ const [width, setWidth] = useState2(0);
114
+ const { gridColor, axisStroke, axisTick, tooltipStyle } = getChartTheme(theme);
115
+ useEffect(() => {
116
+ if (!containerRef.current) return;
117
+ const measure = () => setWidth(containerRef.current.offsetWidth);
118
+ measure();
119
+ const ro = new ResizeObserver(measure);
120
+ ro.observe(containerRef.current);
121
+ return () => ro.disconnect();
122
+ }, []);
123
+ return /* @__PURE__ */ jsx2("div", { ref: containerRef, className, style: __spreadValues({ minWidth: 250, width: "100%" }, style), children: width > 0 && /* @__PURE__ */ jsxs(RechartsLineChart, { width, height, data, children: [
124
+ grid && /* @__PURE__ */ jsx2(CartesianGrid, { strokeDasharray: "3 3", stroke: gridColor }),
125
+ /* @__PURE__ */ jsx2(XAxis, { dataKey: xKey, stroke: axisStroke, tick: axisTick }),
126
+ /* @__PURE__ */ jsx2(YAxis, { stroke: axisStroke, tick: axisTick }),
127
+ /* @__PURE__ */ jsx2(Tooltip, { contentStyle: tooltipStyle }),
128
+ legend && /* @__PURE__ */ jsx2(Legend, {}),
129
+ lines.map((line, i) => {
130
+ var _a, _b;
131
+ const color = (_a = line.color) != null ? _a : CHART_COLORS[i % CHART_COLORS.length];
132
+ return /* @__PURE__ */ jsx2(
133
+ Line,
134
+ {
135
+ type: "monotone",
136
+ dataKey: line.dataKey,
137
+ name: (_b = line.label) != null ? _b : line.dataKey,
138
+ stroke: color,
139
+ strokeWidth: 2,
140
+ dot: { fill: color, r: 4 },
141
+ activeDot: { r: 6 },
142
+ isAnimationActive: false
143
+ },
144
+ line.dataKey
145
+ );
146
+ })
147
+ ] }) });
148
+ };
149
+ var LineChart_default = LineChart;
150
+
151
+ // src/components/Charts/BarChart.tsx
152
+ import { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
153
+ import {
154
+ BarChart as RechartsBarChart,
155
+ Bar,
156
+ XAxis as XAxis2,
157
+ YAxis as YAxis2,
158
+ CartesianGrid as CartesianGrid2,
159
+ Tooltip as Tooltip2,
160
+ Legend as Legend2
161
+ } from "recharts";
162
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
163
+ var BarChart = ({
164
+ data,
165
+ xKey,
166
+ bars,
167
+ height = 250,
168
+ legend = false,
169
+ grid = true,
170
+ theme = "light",
171
+ className,
172
+ style
173
+ }) => {
174
+ const containerRef = useRef2(null);
175
+ const [width, setWidth] = useState3(0);
176
+ const { gridColor, axisStroke, axisTick, tooltipStyle } = getChartTheme(theme);
177
+ useEffect2(() => {
178
+ if (!containerRef.current) return;
179
+ const measure = () => setWidth(containerRef.current.offsetWidth);
180
+ measure();
181
+ const ro = new ResizeObserver(measure);
182
+ ro.observe(containerRef.current);
183
+ return () => ro.disconnect();
184
+ }, []);
185
+ return /* @__PURE__ */ jsx3("div", { ref: containerRef, className, style: __spreadValues({ minWidth: 250, width: "100%" }, style), children: width > 0 && /* @__PURE__ */ jsxs2(RechartsBarChart, { width, height, data, children: [
186
+ grid && /* @__PURE__ */ jsx3(CartesianGrid2, { strokeDasharray: "3 3", stroke: gridColor }),
187
+ /* @__PURE__ */ jsx3(XAxis2, { dataKey: xKey, stroke: axisStroke, tick: axisTick }),
188
+ /* @__PURE__ */ jsx3(YAxis2, { stroke: axisStroke, tick: axisTick }),
189
+ /* @__PURE__ */ jsx3(Tooltip2, { contentStyle: tooltipStyle }),
190
+ legend && /* @__PURE__ */ jsx3(Legend2, {}),
191
+ bars.map((bar, i) => {
192
+ var _a, _b;
193
+ const color = (_a = bar.color) != null ? _a : CHART_COLORS[i % CHART_COLORS.length];
194
+ const isLast = i === bars.length - 1;
195
+ return /* @__PURE__ */ jsx3(
196
+ Bar,
197
+ {
198
+ dataKey: bar.dataKey,
199
+ name: (_b = bar.label) != null ? _b : bar.dataKey,
200
+ fill: color,
201
+ stackId: bar.stackId,
202
+ radius: bar.stackId && !isLast ? [0, 0, 0, 0] : [4, 4, 0, 0],
203
+ isAnimationActive: false
204
+ },
205
+ bar.dataKey
206
+ );
207
+ })
208
+ ] }) });
209
+ };
210
+ var BarChart_default = BarChart;
211
+
212
+ // src/components/Charts/AreaChart.tsx
213
+ import { useEffect as useEffect3, useRef as useRef3, useState as useState4 } from "react";
214
+ import {
215
+ AreaChart as RechartsAreaChart,
216
+ Area,
217
+ XAxis as XAxis3,
218
+ YAxis as YAxis3,
219
+ CartesianGrid as CartesianGrid3,
220
+ Tooltip as Tooltip3,
221
+ Legend as Legend3
222
+ } from "recharts";
223
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
224
+ var AreaChart = ({
225
+ data,
226
+ xKey,
227
+ areas,
228
+ height = 250,
229
+ legend = false,
230
+ grid = true,
231
+ theme = "light",
232
+ className,
233
+ style
234
+ }) => {
235
+ const containerRef = useRef3(null);
236
+ const [width, setWidth] = useState4(0);
237
+ const { gridColor, axisStroke, axisTick, tooltipStyle } = getChartTheme(theme);
238
+ useEffect3(() => {
239
+ if (!containerRef.current) return;
240
+ const measure = () => setWidth(containerRef.current.offsetWidth);
241
+ measure();
242
+ const ro = new ResizeObserver(measure);
243
+ ro.observe(containerRef.current);
244
+ return () => ro.disconnect();
245
+ }, []);
246
+ return /* @__PURE__ */ jsx4("div", { ref: containerRef, className, style: __spreadValues({ minWidth: 250, width: "100%" }, style), children: width > 0 && /* @__PURE__ */ jsxs3(RechartsAreaChart, { width, height, data, children: [
247
+ grid && /* @__PURE__ */ jsx4(CartesianGrid3, { strokeDasharray: "3 3", stroke: gridColor }),
248
+ /* @__PURE__ */ jsx4(XAxis3, { dataKey: xKey, stroke: axisStroke, tick: axisTick }),
249
+ /* @__PURE__ */ jsx4(YAxis3, { stroke: axisStroke, tick: axisTick }),
250
+ /* @__PURE__ */ jsx4(Tooltip3, { contentStyle: tooltipStyle }),
251
+ legend && /* @__PURE__ */ jsx4(Legend3, {}),
252
+ areas.map((area, i) => {
253
+ var _a, _b, _c;
254
+ const color = (_a = area.color) != null ? _a : CHART_COLORS[i % CHART_COLORS.length];
255
+ const opacity = (_b = area.fillOpacity) != null ? _b : area.stackId ? 0.4 : 0.15;
256
+ return /* @__PURE__ */ jsx4(
257
+ Area,
258
+ {
259
+ type: "monotone",
260
+ dataKey: area.dataKey,
261
+ name: (_c = area.label) != null ? _c : area.dataKey,
262
+ stroke: color,
263
+ fill: color,
264
+ fillOpacity: opacity,
265
+ strokeWidth: 2,
266
+ stackId: area.stackId,
267
+ isAnimationActive: false
268
+ },
269
+ area.dataKey
270
+ );
271
+ })
272
+ ] }) });
273
+ };
274
+ var AreaChart_default = AreaChart;
275
+
276
+ // src/components/Charts/PieChart.tsx
277
+ import { useEffect as useEffect4, useRef as useRef4, useState as useState5 } from "react";
278
+ import {
279
+ PieChart as RechartsPieChart,
280
+ Pie,
281
+ Tooltip as Tooltip4,
282
+ Legend as Legend4
283
+ } from "recharts";
284
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
285
+ var PieChart = ({
286
+ data,
287
+ height = 250,
288
+ donut = false,
289
+ legend = false,
290
+ label = false,
291
+ theme = "light",
292
+ className,
293
+ style
294
+ }) => {
295
+ const containerRef = useRef4(null);
296
+ const [width, setWidth] = useState5(0);
297
+ const { tooltipStyle } = getChartTheme(theme);
298
+ useEffect4(() => {
299
+ if (!containerRef.current) return;
300
+ const measure = () => setWidth(containerRef.current.offsetWidth);
301
+ measure();
302
+ const ro = new ResizeObserver(measure);
303
+ ro.observe(containerRef.current);
304
+ return () => ro.disconnect();
305
+ }, []);
306
+ const dataWithColors = data.map((item, i) => {
307
+ var _a;
308
+ return __spreadProps(__spreadValues({}, item), {
309
+ fill: (_a = item.fill) != null ? _a : CHART_COLORS[i % CHART_COLORS.length]
310
+ });
311
+ });
312
+ const outerRadius = 90;
313
+ const innerRadius = donut ? 55 : 0;
314
+ return /* @__PURE__ */ jsx5("div", { ref: containerRef, className, style: __spreadValues({ minWidth: 250, width: "100%" }, style), children: width > 0 && /* @__PURE__ */ jsxs4(RechartsPieChart, { width, height, children: [
315
+ /* @__PURE__ */ jsx5(
316
+ Pie,
317
+ {
318
+ data: dataWithColors,
319
+ cx: "50%",
320
+ cy: "50%",
321
+ outerRadius,
322
+ innerRadius,
323
+ dataKey: "value",
324
+ label: label ? ({ name, percent }) => `${name} ${((percent != null ? percent : 0) * 100).toFixed(0)}%` : void 0,
325
+ labelLine: label,
326
+ isAnimationActive: false
327
+ }
328
+ ),
329
+ /* @__PURE__ */ jsx5(Tooltip4, { contentStyle: tooltipStyle }),
330
+ legend && /* @__PURE__ */ jsx5(Legend4, {})
331
+ ] }) });
332
+ };
333
+ var PieChart_default = PieChart;
334
+
335
+ // src/components/Accordion/Accordion.tsx
336
+ import { useState as useState6 } from "react";
337
+ import { ChevronDown } from "lucide-react";
338
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
339
+ var Accordion = ({ items, defaultValue, multiple = false }) => {
340
+ const [open, setOpen] = useState6(() => {
341
+ if (!defaultValue) return /* @__PURE__ */ new Set();
342
+ if (Array.isArray(defaultValue)) return new Set(defaultValue);
343
+ return /* @__PURE__ */ new Set([defaultValue]);
344
+ });
345
+ const [hovered, setHovered] = useState6(null);
346
+ const toggle = (value) => {
347
+ setOpen((prev) => {
348
+ const next = new Set(prev);
349
+ if (next.has(value)) {
350
+ next.delete(value);
351
+ } else {
352
+ if (!multiple) next.clear();
353
+ next.add(value);
354
+ }
355
+ return next;
356
+ });
357
+ };
358
+ return /* @__PURE__ */ jsx6("div", { style: {
359
+ border: "1px solid var(--ds-border, #e2e8f0)",
360
+ borderRadius: "0.5rem",
361
+ overflow: "hidden"
362
+ }, children: items.map((item, index) => {
363
+ const isOpen = open.has(item.value);
364
+ const isHovered = hovered === item.value;
365
+ const isLast = index === items.length - 1;
366
+ return /* @__PURE__ */ jsxs5(
367
+ "div",
368
+ {
369
+ style: {
370
+ borderBottom: isLast ? "none" : "1px solid var(--ds-border, #e2e8f0)"
371
+ },
372
+ children: [
373
+ /* @__PURE__ */ jsxs5(
374
+ "button",
375
+ {
376
+ style: {
377
+ display: "flex",
378
+ alignItems: "center",
379
+ justifyContent: "space-between",
380
+ width: "100%",
381
+ padding: "1rem",
382
+ fontSize: "0.875rem",
383
+ fontWeight: 500,
384
+ background: isHovered ? "var(--ds-muted, #f1f5f9)" : "transparent",
385
+ border: "none",
386
+ cursor: "pointer",
387
+ textAlign: "left",
388
+ color: "var(--ds-text-primary, #0f172a)",
389
+ transition: "background-color 0.15s"
390
+ },
391
+ onClick: () => toggle(item.value),
392
+ onMouseEnter: () => setHovered(item.value),
393
+ onMouseLeave: () => setHovered(null),
394
+ "aria-expanded": isOpen,
395
+ children: [
396
+ /* @__PURE__ */ jsx6("span", { children: item.trigger }),
397
+ /* @__PURE__ */ jsx6(
398
+ ChevronDown,
399
+ {
400
+ size: 16,
401
+ style: {
402
+ flexShrink: 0,
403
+ color: "var(--ds-text-secondary, #64748b)",
404
+ transition: "transform 0.2s ease",
405
+ transform: isOpen ? "rotate(180deg)" : "rotate(0deg)"
406
+ }
407
+ }
408
+ )
409
+ ]
410
+ }
411
+ ),
412
+ /* @__PURE__ */ jsx6("div", { style: {
413
+ maxHeight: isOpen ? "300px" : "0",
414
+ overflow: "hidden",
415
+ transition: "max-height 0.25s ease"
416
+ }, children: /* @__PURE__ */ jsx6("div", { style: {
417
+ padding: "0 1rem 1rem",
418
+ fontSize: "0.875rem",
419
+ color: "var(--ds-text-secondary, #64748b)"
420
+ }, children: item.content }) })
421
+ ]
422
+ },
423
+ item.value
424
+ );
425
+ }) });
426
+ };
427
+ var Accordion_default = Accordion;
428
+
429
+ // src/components/Alert/Alert.tsx
430
+ import { Info, CheckCircle2, AlertTriangle, AlertCircle } from "lucide-react";
431
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
432
+ var variantMap = {
433
+ info: { bg: "var(--ds-info-bg, #eff6ff)", border: "var(--ds-info, #3b82f6)", icon: "var(--ds-info, #3b82f6)", title: "var(--ds-info-title, #1e3a8a)", desc: "var(--ds-info-desc, #1e40af)" },
434
+ success: { bg: "var(--ds-success-bg, #f0fdf4)", border: "var(--ds-success, #22c55e)", icon: "var(--ds-success, #22c55e)", title: "var(--ds-success-title, #14532d)", desc: "var(--ds-success-desc, #166534)" },
435
+ warning: { bg: "var(--ds-warning-bg, #fffbeb)", border: "var(--ds-warning, #f59e0b)", icon: "var(--ds-warning, #f59e0b)", title: "var(--ds-warning-title, #78350f)", desc: "var(--ds-warning-desc, #92400e)" },
436
+ danger: { bg: "var(--ds-danger-bg, #fef2f2)", border: "var(--ds-danger, #ef4444)", icon: "var(--ds-danger, #ef4444)", title: "var(--ds-danger-title, #7f1d1d)", desc: "var(--ds-danger-desc, #991b1b)" }
437
+ };
438
+ var icons = {
439
+ info: /* @__PURE__ */ jsx7(Info, { size: 16 }),
440
+ success: /* @__PURE__ */ jsx7(CheckCircle2, { size: 16 }),
441
+ warning: /* @__PURE__ */ jsx7(AlertTriangle, { size: 16 }),
442
+ danger: /* @__PURE__ */ jsx7(AlertCircle, { size: 16 })
443
+ };
444
+ var Alert = ({ variant = "info", title, description }) => {
445
+ const v = variantMap[variant];
446
+ return /* @__PURE__ */ jsxs6("div", { role: "alert", style: {
447
+ display: "flex",
448
+ gap: "0.75rem",
449
+ padding: "1rem",
450
+ borderRadius: "0.5rem",
451
+ borderLeft: `4px solid ${v.border}`,
452
+ backgroundColor: v.bg
453
+ }, children: [
454
+ /* @__PURE__ */ jsx7("span", { style: { flexShrink: 0, marginTop: "0.125rem", color: v.icon }, children: icons[variant] }),
455
+ /* @__PURE__ */ jsxs6("div", { style: { flex: 1 }, children: [
456
+ /* @__PURE__ */ jsx7("p", { style: { fontWeight: 600, fontSize: "0.875rem", marginBottom: "0.25rem", marginTop: 0, color: v.title }, children: title }),
457
+ /* @__PURE__ */ jsx7("p", { style: { fontSize: "0.875rem", margin: 0, color: v.desc }, children: description })
458
+ ] })
459
+ ] });
460
+ };
461
+ var Alert_default = Alert;
462
+
463
+ // src/components/Avatar/Avatar.tsx
464
+ import { jsx as jsx8 } from "react/jsx-runtime";
465
+ var sizeMap = {
466
+ sm: { width: "2rem", height: "2rem", fontSize: "0.625rem" },
467
+ md: { width: "2.5rem", height: "2.5rem", fontSize: "0.875rem" },
468
+ lg: { width: "4rem", height: "4rem", fontSize: "1.25rem" }
469
+ };
470
+ var Avatar = ({ fallback, size = "md", style, className }) => /* @__PURE__ */ jsx8(
471
+ "div",
472
+ {
473
+ className,
474
+ "aria-label": fallback,
475
+ style: __spreadValues(__spreadValues({
476
+ display: "inline-flex",
477
+ alignItems: "center",
478
+ justifyContent: "center",
479
+ borderRadius: "9999px",
480
+ backgroundColor: "var(--ds-accent, #f1f5f9)",
481
+ color: "var(--ds-text-primary, #0f172a)",
482
+ fontWeight: 600,
483
+ flexShrink: 0,
484
+ userSelect: "none"
485
+ }, sizeMap[size]), style),
486
+ children: fallback
487
+ }
488
+ );
489
+ var Avatar_default = Avatar;
490
+
491
+ // src/components/Badge/Badge.tsx
492
+ import { jsx as jsx9 } from "react/jsx-runtime";
493
+ var variantMap2 = {
494
+ default: { backgroundColor: "var(--ds-primary, #3b82f6)", color: "#fff" },
495
+ secondary: { backgroundColor: "var(--ds-muted, #f1f5f9)", color: "var(--ds-text-secondary, #64748b)" },
496
+ outline: { backgroundColor: "transparent", border: "1px solid var(--ds-border, #e2e8f0)", color: "var(--ds-text-primary, #0f172a)" },
497
+ danger: { backgroundColor: "var(--ds-danger, #ef4444)", color: "#fff" },
498
+ success: { backgroundColor: "var(--ds-success, #22c55e)", color: "#fff" },
499
+ warning: { backgroundColor: "var(--ds-warning, #f59e0b)", color: "#fff" },
500
+ info: { backgroundColor: "var(--ds-info, #3b82f6)", color: "#fff" }
501
+ };
502
+ var sizeMap2 = {
503
+ sm: { padding: "0.125rem 0.5rem", fontSize: "0.625rem" },
504
+ md: { padding: "0.25rem 0.625rem", fontSize: "0.75rem" },
505
+ lg: { padding: "0.375rem 0.875rem", fontSize: "0.875rem" }
506
+ };
507
+ var Badge = ({ variant = "default", size = "md", children, style }) => /* @__PURE__ */ jsx9("span", { style: __spreadValues(__spreadValues(__spreadValues({
508
+ display: "inline-flex",
509
+ alignItems: "center",
510
+ gap: "0.25rem",
511
+ borderRadius: "9999px",
512
+ fontWeight: 500,
513
+ whiteSpace: "nowrap"
514
+ }, variantMap2[variant]), sizeMap2[size]), style), children });
515
+ var Badge_default = Badge;
516
+
517
+ // src/components/Breadcrumb/Breadcrumb.tsx
518
+ import { useState as useState7 } from "react";
519
+ import { ChevronRight } from "lucide-react";
520
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
521
+ var Breadcrumb = ({ items }) => {
522
+ const [hovered, setHovered] = useState7(null);
523
+ return /* @__PURE__ */ jsx10("nav", { "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx10("ol", { style: {
524
+ display: "flex",
525
+ flexWrap: "wrap",
526
+ alignItems: "center",
527
+ listStyle: "none",
528
+ padding: 0,
529
+ margin: 0,
530
+ fontSize: "0.875rem"
531
+ }, children: items.map((item, i) => {
532
+ const isLast = i === items.length - 1;
533
+ const isHovered = hovered === item.label;
534
+ return /* @__PURE__ */ jsxs7("li", { style: { display: "flex", alignItems: "center" }, children: [
535
+ i > 0 && /* @__PURE__ */ jsx10(
536
+ ChevronRight,
537
+ {
538
+ size: 14,
539
+ "aria-hidden": true,
540
+ style: { color: "var(--ds-text-secondary, #64748b)", margin: "0 0.25rem", flexShrink: 0 }
541
+ }
542
+ ),
543
+ isLast || !item.href ? /* @__PURE__ */ jsx10("span", { style: {
544
+ color: isLast ? "var(--ds-text-primary, #0f172a)" : "var(--ds-text-secondary, #64748b)",
545
+ fontWeight: isLast ? 500 : void 0,
546
+ cursor: isLast ? "default" : void 0
547
+ }, children: item.label }) : /* @__PURE__ */ jsx10(
548
+ "a",
549
+ {
550
+ href: item.href,
551
+ onMouseEnter: () => setHovered(item.label),
552
+ onMouseLeave: () => setHovered(null),
553
+ style: {
554
+ color: "var(--ds-text-secondary, #64748b)",
555
+ textDecoration: isHovered ? "underline" : "none",
556
+ transition: "color 0.15s"
557
+ },
558
+ children: item.label
559
+ }
560
+ )
561
+ ] }, item.label);
562
+ }) }) });
563
+ };
564
+ var Breadcrumb_default = Breadcrumb;
565
+
566
+ // src/components/Button/Button.tsx
567
+ import { LoaderCircle } from "lucide-react";
568
+ import { useState as useState8 } from "react";
569
+ import { Fragment, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
570
+ var variantStyles = {
571
+ solid: { backgroundColor: "var(--ds-primary, #3b82f6)", color: "#fff", borderColor: "transparent" },
572
+ outline: { backgroundColor: "transparent", color: "var(--ds-primary, #3b82f6)", borderColor: "var(--ds-primary, #3b82f6)" },
573
+ ghost: { backgroundColor: "var(--ds-muted, #f1f5f9)", color: "var(--ds-text-primary, #0f172a)", borderColor: "transparent" },
574
+ danger: { backgroundColor: "var(--ds-danger, #ef4444)", color: "#fff", borderColor: "transparent" },
575
+ warning: { backgroundColor: "var(--ds-warning, #f59e0b)", color: "#fff", borderColor: "transparent" },
576
+ info: { backgroundColor: "var(--ds-info, #3b82f6)", color: "#fff", borderColor: "transparent" },
577
+ success: { backgroundColor: "var(--ds-success, #22c55e)", color: "#fff", borderColor: "transparent" }
578
+ };
579
+ var variantHoverStyles = {
580
+ solid: { opacity: 0.88 },
581
+ outline: { backgroundColor: "var(--ds-muted, #f1f5f9)" },
582
+ ghost: { backgroundColor: "var(--ds-card, #ffffff)" },
583
+ danger: { opacity: 0.88 },
584
+ warning: { opacity: 0.88 },
585
+ info: { opacity: 0.88 },
586
+ success: { opacity: 0.88 }
587
+ };
588
+ var sizeStyles = {
589
+ sm: { padding: "0.25rem 0.625rem", fontSize: "0.8rem" },
590
+ md: { padding: "0.5rem 1rem", fontSize: "0.875rem" },
591
+ lg: { padding: "0.75rem 1.5rem", fontSize: "1rem" }
592
+ };
593
+ var Button = (_a) => {
594
+ var _b = _a, {
595
+ text,
596
+ children,
597
+ loading = false,
598
+ disabled = false,
599
+ icon,
600
+ iconPosition = "left",
601
+ outline = false,
602
+ ghost = false,
603
+ danger = false,
604
+ warning = false,
605
+ info = false,
606
+ success = false,
607
+ variant,
608
+ small = false,
609
+ large = false,
610
+ size,
611
+ style: styleProp
612
+ } = _b, props = __objRest(_b, [
613
+ "text",
614
+ "children",
615
+ "loading",
616
+ "disabled",
617
+ "icon",
618
+ "iconPosition",
619
+ "outline",
620
+ "ghost",
621
+ "danger",
622
+ "warning",
623
+ "info",
624
+ "success",
625
+ "variant",
626
+ "small",
627
+ "large",
628
+ "size",
629
+ "style"
630
+ ]);
631
+ const [hovered, setHovered] = useState8(false);
632
+ const resolvedVariant = variant != null ? variant : danger ? "danger" : warning ? "warning" : info ? "info" : success ? "success" : ghost ? "ghost" : outline ? "outline" : "solid";
633
+ const resolvedSize = size != null ? size : small ? "sm" : large ? "lg" : "md";
634
+ const isDisabled = disabled || loading;
635
+ const content = children != null ? children : text;
636
+ const showIcon = icon && !loading;
637
+ const computedStyle = __spreadValues(__spreadValues(__spreadValues(__spreadValues({
638
+ display: "inline-flex",
639
+ alignItems: "center",
640
+ gap: "0.5rem",
641
+ border: "1px solid transparent",
642
+ borderRadius: "0.375rem",
643
+ fontWeight: 500,
644
+ cursor: isDisabled ? "not-allowed" : "pointer",
645
+ transition: "opacity 0.15s, background-color 0.15s",
646
+ opacity: isDisabled ? 0.5 : 1,
647
+ pointerEvents: loading ? "none" : void 0
648
+ }, variantStyles[resolvedVariant]), sizeStyles[resolvedSize]), hovered && !isDisabled ? variantHoverStyles[resolvedVariant] : {}), styleProp);
649
+ return /* @__PURE__ */ jsxs8(Fragment, { children: [
650
+ /* @__PURE__ */ jsx11("style", { href: "ds-spin", precedence: "low", children: `@keyframes ds-spin { to { transform: rotate(360deg); } }` }),
651
+ /* @__PURE__ */ jsxs8(
652
+ "button",
653
+ __spreadProps(__spreadValues({
654
+ disabled: isDisabled,
655
+ style: computedStyle,
656
+ onMouseEnter: () => setHovered(true),
657
+ onMouseLeave: () => setHovered(false)
658
+ }, props), {
659
+ children: [
660
+ loading ? /* @__PURE__ */ jsx11(
661
+ LoaderCircle,
662
+ {
663
+ "aria-hidden": true,
664
+ style: { width: "1em", height: "1em", animation: "ds-spin 0.75s linear infinite" }
665
+ }
666
+ ) : null,
667
+ showIcon && iconPosition === "left" ? icon : null,
668
+ content,
669
+ showIcon && iconPosition === "right" ? icon : null
670
+ ]
671
+ })
672
+ )
673
+ ] });
674
+ };
675
+ var Button_default = Button;
676
+
677
+ // src/components/Card/Card.tsx
678
+ import { jsx as jsx12 } from "react/jsx-runtime";
679
+ var Card = (_a) => {
680
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
681
+ return /* @__PURE__ */ jsx12("div", __spreadValues({ style: __spreadValues({
682
+ border: "1px solid var(--ds-border, #e2e8f0)",
683
+ borderRadius: "0.5rem",
684
+ backgroundColor: "var(--ds-card, #ffffff)"
685
+ }, style) }, props));
686
+ };
687
+ var CardHeader = (_a) => {
688
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
689
+ return /* @__PURE__ */ jsx12("div", __spreadValues({ style: __spreadValues({
690
+ display: "flex",
691
+ flexDirection: "column",
692
+ gap: "0.375rem",
693
+ padding: "1.5rem 1.5rem 0"
694
+ }, style) }, props));
695
+ };
696
+ var CardTitle = (_a) => {
697
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
698
+ return /* @__PURE__ */ jsx12("h3", __spreadValues({ style: __spreadValues({
699
+ fontSize: "1rem",
700
+ fontWeight: 600,
701
+ color: "var(--ds-text-primary, #0f172a)",
702
+ margin: 0,
703
+ lineHeight: 1.4
704
+ }, style) }, props));
705
+ };
706
+ var CardDescription = (_a) => {
707
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
708
+ return /* @__PURE__ */ jsx12("p", __spreadValues({ style: __spreadValues({
709
+ fontSize: "0.875rem",
710
+ color: "var(--ds-text-secondary, #64748b)",
711
+ margin: 0
712
+ }, style) }, props));
713
+ };
714
+ var CardContent = (_a) => {
715
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
716
+ return /* @__PURE__ */ jsx12("div", __spreadValues({ style: __spreadValues({ padding: "1.5rem" }, style) }, props));
717
+ };
718
+ var CardFooter = (_a) => {
719
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
720
+ return /* @__PURE__ */ jsx12("div", __spreadValues({ style: __spreadValues({
721
+ display: "flex",
722
+ alignItems: "center",
723
+ padding: "0 1.5rem 1.5rem"
724
+ }, style) }, props));
725
+ };
726
+
727
+ // src/components/Checkbox/Checkbox.tsx
728
+ import { useState as useState9 } from "react";
729
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
730
+ var Checkbox = ({
731
+ label,
732
+ checked,
733
+ defaultChecked = false,
734
+ disabled,
735
+ id,
736
+ onChange
737
+ }) => {
738
+ const [internal, setInternal] = useState9(defaultChecked);
739
+ const isChecked = checked !== void 0 ? checked : internal;
740
+ const handleChange = () => {
741
+ if (disabled) return;
742
+ const next = !isChecked;
743
+ setInternal(next);
744
+ onChange == null ? void 0 : onChange(next);
745
+ };
746
+ return /* @__PURE__ */ jsxs9("label", { htmlFor: id, style: {
747
+ display: "inline-flex",
748
+ alignItems: "center",
749
+ gap: "0.5rem",
750
+ cursor: disabled ? "not-allowed" : "pointer",
751
+ userSelect: "none",
752
+ opacity: disabled ? 0.5 : 1
753
+ }, children: [
754
+ /* @__PURE__ */ jsx13(
755
+ "input",
756
+ {
757
+ type: "checkbox",
758
+ id,
759
+ checked: isChecked,
760
+ disabled,
761
+ onChange: handleChange,
762
+ style: { position: "absolute", opacity: 0, width: 0, height: 0 }
763
+ }
764
+ ),
765
+ /* @__PURE__ */ jsx13("span", { style: {
766
+ width: "1.125rem",
767
+ height: "1.125rem",
768
+ border: `2px solid ${isChecked ? "var(--ds-primary, #3b82f6)" : "var(--ds-border, #e2e8f0)"}`,
769
+ borderRadius: "0.25rem",
770
+ display: "flex",
771
+ alignItems: "center",
772
+ justifyContent: "center",
773
+ flexShrink: 0,
774
+ transition: "background-color 0.15s, border-color 0.15s",
775
+ backgroundColor: isChecked ? "var(--ds-primary, #3b82f6)" : "var(--ds-card, #fff)"
776
+ }, children: isChecked && /* @__PURE__ */ jsx13("svg", { viewBox: "0 0 12 10", fill: "none", style: { width: "0.625rem", height: "0.625rem" }, children: /* @__PURE__ */ jsx13("path", { d: "M1 5l3.5 3.5L11 1", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
777
+ label && /* @__PURE__ */ jsx13("span", { style: { fontSize: "0.875rem", color: "var(--ds-text-primary, #0f172a)" }, children: label })
778
+ ] });
779
+ };
780
+ var Checkbox_default = Checkbox;
781
+
782
+ // src/components/CopyButton/CopyButton.tsx
783
+ import { Check, Copy } from "lucide-react";
784
+ import { useState as useState10 } from "react";
785
+ import { jsx as jsx14 } from "react/jsx-runtime";
786
+ var CopyButton = ({ text }) => {
787
+ const [copied, setCopied] = useState10(false);
788
+ const [hovered, setHovered] = useState10(false);
789
+ const handleCopy = () => {
790
+ navigator.clipboard.writeText(text);
791
+ setCopied(true);
792
+ setTimeout(() => setCopied(false), 2e3);
793
+ };
794
+ return /* @__PURE__ */ jsx14(
795
+ "button",
796
+ {
797
+ onClick: handleCopy,
798
+ onMouseEnter: () => setHovered(true),
799
+ onMouseLeave: () => setHovered(false),
800
+ "aria-label": copied ? "Copied" : `Copy ${text}`,
801
+ style: {
802
+ display: "inline-flex",
803
+ alignItems: "center",
804
+ justifyContent: "center",
805
+ padding: "0.25rem",
806
+ border: "none",
807
+ borderRadius: "0.25rem",
808
+ backgroundColor: hovered ? "var(--ds-accent, #f1f5f9)" : "transparent",
809
+ color: hovered ? "var(--ds-text-primary, #0f172a)" : "var(--ds-text-secondary, #64748b)",
810
+ cursor: "pointer",
811
+ transition: "background-color 0.15s, color 0.15s"
812
+ },
813
+ children: copied ? /* @__PURE__ */ jsx14(Check, { style: { width: "1rem", height: "1rem" } }) : /* @__PURE__ */ jsx14(Copy, { style: { width: "1rem", height: "1rem" } })
814
+ }
815
+ );
816
+ };
817
+ var CopyButton_default = CopyButton;
818
+
819
+ // src/components/FileUpload/FileUpload.tsx
820
+ import { Upload } from "lucide-react";
821
+ import { useRef as useRef5, useState as useState11 } from "react";
822
+ import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
823
+ var FileUpload = ({ accept, multiple, disabled, onFileSelect }) => {
824
+ const [isDragging, setIsDragging] = useState11(false);
825
+ const [isHovered, setIsHovered] = useState11(false);
826
+ const [fileNames, setFileNames] = useState11([]);
827
+ const inputRef = useRef5(null);
828
+ const handleFiles = (list) => {
829
+ setFileNames(Array.from(list).map((f) => f.name));
830
+ onFileSelect == null ? void 0 : onFileSelect(list);
831
+ };
832
+ const isActive = isDragging || isHovered;
833
+ return /* @__PURE__ */ jsxs10(
834
+ "div",
835
+ {
836
+ onClick: () => {
837
+ var _a;
838
+ return !disabled && ((_a = inputRef.current) == null ? void 0 : _a.click());
839
+ },
840
+ onMouseEnter: () => !disabled && setIsHovered(true),
841
+ onMouseLeave: () => setIsHovered(false),
842
+ onDragOver: (e) => {
843
+ e.preventDefault();
844
+ setIsDragging(true);
845
+ },
846
+ onDragLeave: () => setIsDragging(false),
847
+ onDrop: (e) => {
848
+ e.preventDefault();
849
+ setIsDragging(false);
850
+ if (!disabled && e.dataTransfer.files.length) handleFiles(e.dataTransfer.files);
851
+ },
852
+ style: {
853
+ border: `2px dashed ${isActive ? "var(--ds-primary, #3b82f6)" : "var(--ds-border, #e2e8f0)"}`,
854
+ borderRadius: "0.5rem",
855
+ padding: "2rem",
856
+ display: "flex",
857
+ flexDirection: "column",
858
+ alignItems: "center",
859
+ gap: "0.5rem",
860
+ cursor: disabled ? "not-allowed" : "pointer",
861
+ backgroundColor: isActive ? "var(--ds-primary-50, #eff6ff)" : "var(--ds-muted, #f1f5f9)",
862
+ transition: "border-color 0.15s, background-color 0.15s",
863
+ textAlign: "center",
864
+ opacity: disabled ? 0.5 : 1
865
+ },
866
+ children: [
867
+ /* @__PURE__ */ jsx15(
868
+ "input",
869
+ {
870
+ ref: inputRef,
871
+ type: "file",
872
+ accept,
873
+ multiple,
874
+ disabled,
875
+ style: { display: "none" },
876
+ onChange: (e) => e.target.files && handleFiles(e.target.files)
877
+ }
878
+ ),
879
+ /* @__PURE__ */ jsx15(Upload, { size: 32, style: { color: "var(--ds-text-secondary, #64748b)" } }),
880
+ fileNames.length > 0 ? /* @__PURE__ */ jsx15("p", { style: { fontSize: "0.875rem", color: "var(--ds-primary, #3b82f6)", fontWeight: 500, margin: 0 }, children: fileNames.join(", ") }) : /* @__PURE__ */ jsxs10("p", { style: { fontSize: "0.875rem", color: "var(--ds-text-secondary, #64748b)", margin: 0 }, children: [
881
+ /* @__PURE__ */ jsx15("strong", { children: "Click to upload" }),
882
+ " or drag and drop"
883
+ ] })
884
+ ]
885
+ }
886
+ );
887
+ };
888
+ var FileUpload_default = FileUpload;
889
+
890
+ // src/components/Input/Input.tsx
891
+ import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
892
+ var inputCSS = `
893
+ [data-ds-input]::placeholder { color: var(--ds-text-secondary, #64748b); }
894
+ [data-ds-input]:focus { outline: none; border-color: var(--ds-primary, #3b82f6); box-shadow: 0 0 0 3px rgb(59 130 246 / 0.15); }
895
+ [data-ds-input]:disabled { opacity: 0.5; cursor: not-allowed; background-color: var(--ds-muted, #f1f5f9); }
896
+ [data-ds-input][data-error="true"]:focus { border-color: var(--ds-danger, #ef4444); box-shadow: 0 0 0 3px rgb(239 68 68 / 0.15); }
897
+ [data-ds-input][data-success="true"]:focus { border-color: var(--ds-success, #22c55e); box-shadow: 0 0 0 3px rgb(34 197 94 / 0.15); }
898
+ `;
899
+ var Input = (_a) => {
900
+ var _b = _a, { error, success, leftIcon, rightIcon, style } = _b, props = __objRest(_b, ["error", "success", "leftIcon", "rightIcon", "style"]);
901
+ return /* @__PURE__ */ jsxs11(Fragment2, { children: [
902
+ /* @__PURE__ */ jsx16("style", { href: "ds-input", precedence: "low", children: inputCSS }),
903
+ /* @__PURE__ */ jsxs11("div", { style: { position: "relative", display: "flex", alignItems: "center", width: "100%" }, children: [
904
+ leftIcon && /* @__PURE__ */ jsx16("span", { style: {
905
+ position: "absolute",
906
+ left: "0.625rem",
907
+ display: "flex",
908
+ alignItems: "center",
909
+ color: "var(--ds-text-secondary, #64748b)",
910
+ pointerEvents: "none"
911
+ }, children: leftIcon }),
912
+ /* @__PURE__ */ jsx16(
913
+ "input",
914
+ __spreadValues({
915
+ "data-ds-input": "",
916
+ "data-error": error ? "true" : void 0,
917
+ "data-success": success ? "true" : void 0,
918
+ style: __spreadValues({
919
+ width: "100%",
920
+ height: "2.25rem",
921
+ paddingTop: 0,
922
+ paddingBottom: 0,
923
+ paddingLeft: leftIcon ? "2.25rem" : "0.75rem",
924
+ paddingRight: rightIcon ? "2.25rem" : "0.75rem",
925
+ border: `1px solid ${error ? "var(--ds-danger, #ef4444)" : success ? "var(--ds-success, #22c55e)" : "var(--ds-border, #e2e8f0)"}`,
926
+ borderRadius: "0.375rem",
927
+ fontSize: "0.875rem",
928
+ backgroundColor: "var(--ds-card, #fff)",
929
+ color: "var(--ds-text-primary, #0f172a)",
930
+ fontFamily: "inherit",
931
+ transition: "border-color 0.15s, box-shadow 0.15s"
932
+ }, style)
933
+ }, props)
934
+ ),
935
+ rightIcon && /* @__PURE__ */ jsx16("span", { style: {
936
+ position: "absolute",
937
+ right: "0.625rem",
938
+ display: "flex",
939
+ alignItems: "center",
940
+ color: "var(--ds-text-secondary, #64748b)",
941
+ pointerEvents: "none"
942
+ }, children: rightIcon })
943
+ ] })
944
+ ] });
945
+ };
946
+ var Input_default = Input;
947
+
948
+ // src/components/Label/Label.tsx
949
+ import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
950
+ var Label = (_a) => {
951
+ var _b = _a, { children, required, style } = _b, props = __objRest(_b, ["children", "required", "style"]);
952
+ return /* @__PURE__ */ jsxs12("label", __spreadProps(__spreadValues({ style: __spreadValues({
953
+ display: "block",
954
+ fontSize: "0.875rem",
955
+ fontWeight: 500,
956
+ color: "var(--ds-text-primary, #0f172a)",
957
+ marginBottom: "0.375rem"
958
+ }, style) }, props), { children: [
959
+ children,
960
+ required && /* @__PURE__ */ jsx17("span", { style: { color: "var(--ds-danger, #ef4444)", marginLeft: "0.25rem" }, children: "*" })
961
+ ] }));
962
+ };
963
+ var Label_default = Label;
964
+
965
+ // src/components/PasswordInput/PasswordInput.tsx
966
+ import { Eye, EyeOff } from "lucide-react";
967
+ import { useState as useState12 } from "react";
968
+ import { jsx as jsx18 } from "react/jsx-runtime";
969
+ var PasswordInput = (props) => {
970
+ const [visible, setVisible] = useState12(false);
971
+ return /* @__PURE__ */ jsx18(
972
+ Input_default,
973
+ __spreadProps(__spreadValues({}, props), {
974
+ type: visible ? "text" : "password",
975
+ rightIcon: /* @__PURE__ */ jsx18(
976
+ "button",
977
+ {
978
+ type: "button",
979
+ onClick: () => setVisible((v) => !v),
980
+ style: { background: "none", border: "none", cursor: "pointer", padding: 0, display: "flex", pointerEvents: "all" },
981
+ tabIndex: -1,
982
+ children: visible ? /* @__PURE__ */ jsx18(EyeOff, { size: 16 }) : /* @__PURE__ */ jsx18(Eye, { size: 16 })
983
+ }
984
+ )
985
+ })
986
+ );
987
+ };
988
+ var PasswordInput_default = PasswordInput;
989
+
990
+ // src/components/Progress/Progress.tsx
991
+ import { jsx as jsx19 } from "react/jsx-runtime";
992
+ var Progress = ({ value = 0 }) => {
993
+ const pct = Math.min(100, Math.max(0, value));
994
+ return /* @__PURE__ */ jsx19(
995
+ "div",
996
+ {
997
+ role: "progressbar",
998
+ "aria-valuenow": pct,
999
+ "aria-valuemin": 0,
1000
+ "aria-valuemax": 100,
1001
+ style: {
1002
+ width: "100%",
1003
+ height: "0.5rem",
1004
+ backgroundColor: "var(--ds-border, #e2e8f0)",
1005
+ borderRadius: "9999px",
1006
+ overflow: "hidden"
1007
+ },
1008
+ children: /* @__PURE__ */ jsx19("div", { style: {
1009
+ height: "100%",
1010
+ width: `${pct}%`,
1011
+ backgroundColor: "var(--ds-primary, #3b82f6)",
1012
+ borderRadius: "9999px",
1013
+ transition: "width 0.3s ease"
1014
+ } })
1015
+ }
1016
+ );
1017
+ };
1018
+ var Progress_default = Progress;
1019
+
1020
+ // src/components/RadioGroup/RadioGroup.tsx
1021
+ import { useState as useState13 } from "react";
1022
+ import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
1023
+ var RadioGroup = ({
1024
+ options,
1025
+ name,
1026
+ value,
1027
+ defaultValue = "",
1028
+ disabled,
1029
+ onChange
1030
+ }) => {
1031
+ const [internal, setInternal] = useState13(defaultValue);
1032
+ const selected = value !== void 0 ? value : internal;
1033
+ const handleChange = (val) => {
1034
+ if (disabled) return;
1035
+ setInternal(val);
1036
+ onChange == null ? void 0 : onChange(val);
1037
+ };
1038
+ return /* @__PURE__ */ jsx20("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem" }, children: options.map((option) => {
1039
+ const isSelected = selected === option.value;
1040
+ return /* @__PURE__ */ jsxs13("label", { style: {
1041
+ display: "inline-flex",
1042
+ alignItems: "center",
1043
+ gap: "0.5rem",
1044
+ cursor: disabled ? "not-allowed" : "pointer",
1045
+ userSelect: "none",
1046
+ opacity: disabled ? 0.5 : 1
1047
+ }, children: [
1048
+ /* @__PURE__ */ jsx20(
1049
+ "input",
1050
+ {
1051
+ type: "radio",
1052
+ name,
1053
+ value: option.value,
1054
+ checked: isSelected,
1055
+ disabled,
1056
+ onChange: () => handleChange(option.value),
1057
+ style: { position: "absolute", opacity: 0, width: 0, height: 0 }
1058
+ }
1059
+ ),
1060
+ /* @__PURE__ */ jsx20("span", { style: {
1061
+ width: "1.125rem",
1062
+ height: "1.125rem",
1063
+ borderRadius: "9999px",
1064
+ border: `2px solid ${isSelected ? "var(--ds-primary, #3b82f6)" : "var(--ds-border, #e2e8f0)"}`,
1065
+ display: "flex",
1066
+ alignItems: "center",
1067
+ justifyContent: "center",
1068
+ flexShrink: 0,
1069
+ backgroundColor: "var(--ds-card, #fff)",
1070
+ transition: "border-color 0.15s"
1071
+ }, children: isSelected && /* @__PURE__ */ jsx20("span", { style: {
1072
+ width: "0.5rem",
1073
+ height: "0.5rem",
1074
+ borderRadius: "9999px",
1075
+ backgroundColor: "var(--ds-primary, #3b82f6)"
1076
+ } }) }),
1077
+ /* @__PURE__ */ jsx20("span", { style: { fontSize: "0.875rem", color: "var(--ds-text-primary, #0f172a)" }, children: option.label })
1078
+ ] }, option.value);
1079
+ }) });
1080
+ };
1081
+ var RadioGroup_default = RadioGroup;
1082
+
1083
+ // src/components/Select/Select.tsx
1084
+ import { Check as Check2, ChevronDown as ChevronDown2 } from "lucide-react";
1085
+ import { useEffect as useEffect5, useRef as useRef6, useState as useState14 } from "react";
1086
+ import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
1087
+ var selectCSS = `
1088
+ [data-ds-select-trigger]:focus { outline: none; border-color: var(--ds-primary, #3b82f6); box-shadow: 0 0 0 3px rgb(59 130 246 / 0.15); }
1089
+ `;
1090
+ var Select = ({
1091
+ options,
1092
+ value,
1093
+ defaultValue = "",
1094
+ placeholder = "Choose an option",
1095
+ disabled,
1096
+ onChange
1097
+ }) => {
1098
+ var _a;
1099
+ const [internal, setInternal] = useState14(defaultValue);
1100
+ const [open, setOpen] = useState14(false);
1101
+ const [hoveredOption, setHoveredOption] = useState14(null);
1102
+ const ref = useRef6(null);
1103
+ const selected = value !== void 0 ? value : internal;
1104
+ const selectedLabel = (_a = options.find((o) => o.value === selected)) == null ? void 0 : _a.label;
1105
+ const handleSelect = (val) => {
1106
+ setInternal(val);
1107
+ setOpen(false);
1108
+ onChange == null ? void 0 : onChange(val);
1109
+ };
1110
+ useEffect5(() => {
1111
+ const handleOutside = (e) => {
1112
+ if (ref.current && !ref.current.contains(e.target)) setOpen(false);
1113
+ };
1114
+ document.addEventListener("mousedown", handleOutside);
1115
+ return () => document.removeEventListener("mousedown", handleOutside);
1116
+ }, []);
1117
+ return /* @__PURE__ */ jsxs14(Fragment3, { children: [
1118
+ /* @__PURE__ */ jsx21("style", { href: "ds-select", precedence: "low", children: selectCSS }),
1119
+ /* @__PURE__ */ jsxs14("div", { ref, style: {
1120
+ position: "relative",
1121
+ width: "100%",
1122
+ opacity: disabled ? 0.5 : 1,
1123
+ pointerEvents: disabled ? "none" : void 0
1124
+ }, children: [
1125
+ /* @__PURE__ */ jsxs14(
1126
+ "button",
1127
+ {
1128
+ type: "button",
1129
+ "data-ds-select-trigger": "",
1130
+ onClick: () => !disabled && setOpen((o) => !o),
1131
+ disabled,
1132
+ style: {
1133
+ width: "100%",
1134
+ height: "2.25rem",
1135
+ padding: "0 0.75rem",
1136
+ border: `1px solid ${open ? "var(--ds-primary, #3b82f6)" : "var(--ds-border, #e2e8f0)"}`,
1137
+ borderRadius: "0.375rem",
1138
+ fontSize: "0.875rem",
1139
+ backgroundColor: "var(--ds-card, #fff)",
1140
+ cursor: "pointer",
1141
+ display: "flex",
1142
+ alignItems: "center",
1143
+ justifyContent: "space-between",
1144
+ gap: "0.5rem",
1145
+ boxShadow: open ? "0 0 0 3px rgb(59 130 246 / 0.15)" : "none",
1146
+ transition: "border-color 0.15s, box-shadow 0.15s",
1147
+ textAlign: "left",
1148
+ fontFamily: "inherit"
1149
+ },
1150
+ children: [
1151
+ /* @__PURE__ */ jsx21("span", { style: { color: selectedLabel ? "var(--ds-text-primary, #0f172a)" : "var(--ds-text-secondary, #64748b)" }, children: selectedLabel != null ? selectedLabel : placeholder }),
1152
+ /* @__PURE__ */ jsx21(
1153
+ ChevronDown2,
1154
+ {
1155
+ size: 16,
1156
+ style: {
1157
+ flexShrink: 0,
1158
+ color: "var(--ds-text-secondary, #64748b)",
1159
+ transition: "transform 0.15s",
1160
+ transform: open ? "rotate(180deg)" : "rotate(0deg)"
1161
+ }
1162
+ }
1163
+ )
1164
+ ]
1165
+ }
1166
+ ),
1167
+ open && /* @__PURE__ */ jsx21("div", { style: {
1168
+ position: "absolute",
1169
+ top: "calc(100% + 0.25rem)",
1170
+ left: 0,
1171
+ right: 0,
1172
+ zIndex: 50,
1173
+ backgroundColor: "var(--ds-card, #fff)",
1174
+ border: "1px solid var(--ds-border, #e2e8f0)",
1175
+ borderRadius: "0.375rem",
1176
+ boxShadow: "0 10px 15px -3px rgb(0 0 0 / 0.1)",
1177
+ overflow: "hidden"
1178
+ }, children: options.map((option) => {
1179
+ const isSelected = selected === option.value;
1180
+ const isHovered = hoveredOption === option.value;
1181
+ return /* @__PURE__ */ jsxs14(
1182
+ "div",
1183
+ {
1184
+ onClick: () => handleSelect(option.value),
1185
+ onMouseEnter: () => setHoveredOption(option.value),
1186
+ onMouseLeave: () => setHoveredOption(null),
1187
+ style: {
1188
+ padding: "0.5rem 0.75rem",
1189
+ fontSize: "0.875rem",
1190
+ cursor: "pointer",
1191
+ display: "flex",
1192
+ alignItems: "center",
1193
+ gap: "0.5rem",
1194
+ color: "var(--ds-text-primary, #0f172a)",
1195
+ backgroundColor: isSelected || isHovered ? "var(--ds-muted, #f1f5f9)" : "transparent",
1196
+ fontWeight: isSelected ? 500 : void 0,
1197
+ transition: "background-color 0.1s"
1198
+ },
1199
+ children: [
1200
+ isSelected ? /* @__PURE__ */ jsx21(Check2, { size: 14, style: { color: "var(--ds-primary, #3b82f6)", flexShrink: 0 } }) : /* @__PURE__ */ jsx21("span", { style: { width: 14, flexShrink: 0 } }),
1201
+ option.label
1202
+ ]
1203
+ },
1204
+ option.value
1205
+ );
1206
+ }) })
1207
+ ] })
1208
+ ] });
1209
+ };
1210
+ var Select_default = Select;
1211
+
1212
+ // src/components/Skeleton/Skeleton.tsx
1213
+ import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1214
+ var Skeleton = ({ height = "1rem", width = "100%", circle = false }) => /* @__PURE__ */ jsxs15(Fragment4, { children: [
1215
+ /* @__PURE__ */ jsx22("style", { href: "ds-skeleton", precedence: "low", children: `
1216
+ @keyframes ds-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
1217
+ [data-ds-skeleton] { animation: ds-pulse 1.5s ease-in-out infinite; }
1218
+ ` }),
1219
+ /* @__PURE__ */ jsx22(
1220
+ "div",
1221
+ {
1222
+ "data-ds-skeleton": "",
1223
+ "aria-hidden": "true",
1224
+ style: {
1225
+ height,
1226
+ width,
1227
+ backgroundColor: "var(--ds-muted, #f1f5f9)",
1228
+ borderRadius: circle ? "9999px" : "0.375rem"
1229
+ }
1230
+ }
1231
+ )
1232
+ ] });
1233
+ var Skeleton_default = Skeleton;
1234
+
1235
+ // src/components/Slider/Slider.tsx
1236
+ import { useState as useState15 } from "react";
1237
+ import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
1238
+ var sliderCSS = `
1239
+ [data-ds-slider] {
1240
+ -webkit-appearance: none;
1241
+ appearance: none;
1242
+ width: 100%;
1243
+ height: 0.375rem;
1244
+ border-radius: 9999px;
1245
+ outline: none;
1246
+ cursor: pointer;
1247
+ background: linear-gradient(
1248
+ to right,
1249
+ var(--ds-primary, #3b82f6) 0%,
1250
+ var(--ds-primary, #3b82f6) var(--fill, 50%),
1251
+ var(--ds-border, #e2e8f0) var(--fill, 50%),
1252
+ var(--ds-border, #e2e8f0) 100%
1253
+ );
1254
+ }
1255
+ [data-ds-slider]::-webkit-slider-thumb {
1256
+ -webkit-appearance: none;
1257
+ appearance: none;
1258
+ width: 1.125rem;
1259
+ height: 1.125rem;
1260
+ border-radius: 9999px;
1261
+ background-color: var(--ds-primary, #3b82f6);
1262
+ cursor: pointer;
1263
+ border: 2px solid #fff;
1264
+ box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.2);
1265
+ transition: transform 0.1s;
1266
+ }
1267
+ [data-ds-slider]::-webkit-slider-thumb:hover { transform: scale(1.2); }
1268
+ [data-ds-slider]::-moz-range-thumb {
1269
+ width: 1.125rem;
1270
+ height: 1.125rem;
1271
+ border-radius: 9999px;
1272
+ background-color: var(--ds-primary, #3b82f6);
1273
+ cursor: pointer;
1274
+ border: 2px solid #fff;
1275
+ box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.2);
1276
+ }
1277
+ [data-ds-slider]:disabled { cursor: not-allowed; }
1278
+ `;
1279
+ var Slider = ({
1280
+ value,
1281
+ defaultValue = 50,
1282
+ min = 0,
1283
+ max = 100,
1284
+ step = 1,
1285
+ disabled,
1286
+ onChange
1287
+ }) => {
1288
+ const [internal, setInternal] = useState15(defaultValue);
1289
+ const current = value !== void 0 ? value : internal;
1290
+ const fill = `${(current - min) / (max - min) * 100}%`;
1291
+ const handleChange = (e) => {
1292
+ const val = Number(e.target.value);
1293
+ setInternal(val);
1294
+ onChange == null ? void 0 : onChange(val);
1295
+ };
1296
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
1297
+ /* @__PURE__ */ jsx23("style", { href: "ds-slider", precedence: "low", children: sliderCSS }),
1298
+ /* @__PURE__ */ jsx23("div", { style: {
1299
+ width: "100%",
1300
+ padding: "0.25rem 0",
1301
+ opacity: disabled ? 0.5 : 1
1302
+ }, children: /* @__PURE__ */ jsx23(
1303
+ "input",
1304
+ {
1305
+ type: "range",
1306
+ "data-ds-slider": "",
1307
+ min,
1308
+ max,
1309
+ step,
1310
+ value: current,
1311
+ disabled,
1312
+ onChange: handleChange,
1313
+ style: { "--fill": fill }
1314
+ }
1315
+ ) })
1316
+ ] });
1317
+ };
1318
+ var Slider_default = Slider;
1319
+
1320
+ // src/components/Spinner/Spinner.tsx
1321
+ import { Loader2 } from "lucide-react";
1322
+ import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
1323
+ var sizePx = { sm: 16, md: 24, lg: 32 };
1324
+ var Spinner = ({ size = "md" }) => /* @__PURE__ */ jsxs17(Fragment6, { children: [
1325
+ /* @__PURE__ */ jsx24("style", { href: "ds-spin", precedence: "low", children: `@keyframes ds-spin { to { transform: rotate(360deg); } }` }),
1326
+ /* @__PURE__ */ jsx24(
1327
+ Loader2,
1328
+ {
1329
+ size: sizePx[size],
1330
+ "aria-label": "Loading",
1331
+ style: { color: "var(--ds-primary, #3b82f6)", animation: "ds-spin 0.75s linear infinite" }
1332
+ }
1333
+ )
1334
+ ] });
1335
+ var Spinner_default = Spinner;
1336
+
1337
+ // src/components/Switch/Switch.tsx
1338
+ import { useState as useState16 } from "react";
1339
+ import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
1340
+ var Switch = ({
1341
+ label,
1342
+ checked,
1343
+ defaultChecked = false,
1344
+ disabled,
1345
+ id,
1346
+ onChange
1347
+ }) => {
1348
+ const [internal, setInternal] = useState16(defaultChecked);
1349
+ const isOn = checked !== void 0 ? checked : internal;
1350
+ const handleToggle = () => {
1351
+ if (disabled) return;
1352
+ const next = !isOn;
1353
+ setInternal(next);
1354
+ onChange == null ? void 0 : onChange(next);
1355
+ };
1356
+ return /* @__PURE__ */ jsxs18("label", { htmlFor: id, style: {
1357
+ display: "inline-flex",
1358
+ alignItems: "center",
1359
+ gap: "0.625rem",
1360
+ cursor: disabled ? "not-allowed" : "pointer",
1361
+ userSelect: "none",
1362
+ opacity: disabled ? 0.5 : 1
1363
+ }, children: [
1364
+ /* @__PURE__ */ jsx25(
1365
+ "input",
1366
+ {
1367
+ type: "checkbox",
1368
+ id,
1369
+ checked: isOn,
1370
+ disabled,
1371
+ onChange: handleToggle,
1372
+ style: { position: "absolute", opacity: 0, width: 0, height: 0 }
1373
+ }
1374
+ ),
1375
+ /* @__PURE__ */ jsx25("span", { style: {
1376
+ width: "2.75rem",
1377
+ height: "1.5rem",
1378
+ borderRadius: "9999px",
1379
+ backgroundColor: isOn ? "var(--ds-primary, #3b82f6)" : "var(--ds-border, #e2e8f0)",
1380
+ position: "relative",
1381
+ transition: "background-color 0.2s",
1382
+ flexShrink: 0
1383
+ }, children: /* @__PURE__ */ jsx25("span", { style: {
1384
+ position: "absolute",
1385
+ top: "0.175rem",
1386
+ left: "0.175rem",
1387
+ width: "1.15rem",
1388
+ height: "1.15rem",
1389
+ borderRadius: "9999px",
1390
+ backgroundColor: "#fff",
1391
+ boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.15)",
1392
+ transition: "transform 0.2s",
1393
+ transform: isOn ? "translateX(1.25rem)" : "translateX(0)"
1394
+ } }) }),
1395
+ label && /* @__PURE__ */ jsx25("span", { style: { fontSize: "0.875rem", color: "var(--ds-text-primary, #0f172a)" }, children: label })
1396
+ ] });
1397
+ };
1398
+ var Switch_default = Switch;
1399
+
1400
+ // src/components/Table/Table.tsx
1401
+ import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
1402
+ var tableCSS = `
1403
+ [data-ds-table-row]:hover [data-ds-table-cell] { background-color: var(--ds-muted, #f1f5f9); }
1404
+ `;
1405
+ var Table = (_a) => {
1406
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
1407
+ return /* @__PURE__ */ jsxs19(Fragment7, { children: [
1408
+ /* @__PURE__ */ jsx26("style", { href: "ds-table", precedence: "low", children: tableCSS }),
1409
+ /* @__PURE__ */ jsx26("div", { style: {
1410
+ width: "100%",
1411
+ overflowX: "auto",
1412
+ border: "1px solid var(--ds-border, #e2e8f0)",
1413
+ borderRadius: "0.5rem"
1414
+ }, children: /* @__PURE__ */ jsx26("table", __spreadValues({ style: __spreadValues({
1415
+ width: "100%",
1416
+ borderCollapse: "collapse",
1417
+ fontSize: "0.875rem"
1418
+ }, style) }, props)) })
1419
+ ] });
1420
+ };
1421
+ var TableHead = (props) => /* @__PURE__ */ jsx26("thead", __spreadValues({}, props));
1422
+ var TableBody = (props) => /* @__PURE__ */ jsx26("tbody", __spreadValues({}, props));
1423
+ var TableRow = (_a) => {
1424
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
1425
+ return /* @__PURE__ */ jsx26("tr", __spreadValues({ "data-ds-table-row": "", style }, props));
1426
+ };
1427
+ var TableHeader = (_a) => {
1428
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
1429
+ return /* @__PURE__ */ jsx26("th", __spreadValues({ style: __spreadValues({
1430
+ padding: "0.75rem 1rem",
1431
+ textAlign: "left",
1432
+ fontWeight: 500,
1433
+ color: "var(--ds-text-secondary, #64748b)",
1434
+ backgroundColor: "var(--ds-muted, #f1f5f9)",
1435
+ borderBottom: "1px solid var(--ds-border, #e2e8f0)",
1436
+ whiteSpace: "nowrap"
1437
+ }, style) }, props));
1438
+ };
1439
+ var TableCell = (_a) => {
1440
+ var _b = _a, { style } = _b, props = __objRest(_b, ["style"]);
1441
+ return /* @__PURE__ */ jsx26(
1442
+ "td",
1443
+ __spreadValues({
1444
+ "data-ds-table-cell": "",
1445
+ style: __spreadValues({
1446
+ padding: "0.75rem 1rem",
1447
+ borderBottom: "1px solid var(--ds-border, #e2e8f0)",
1448
+ color: "var(--ds-text-primary, #0f172a)",
1449
+ transition: "background-color 0.1s"
1450
+ }, style)
1451
+ }, props)
1452
+ );
1453
+ };
1454
+
1455
+ // src/components/Tabs/Tabs.tsx
1456
+ import { useState as useState17 } from "react";
1457
+ import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
1458
+ var Tabs = ({ tabs, defaultValue }) => {
1459
+ var _a, _b;
1460
+ const [active, setActive] = useState17((_b = defaultValue != null ? defaultValue : (_a = tabs[0]) == null ? void 0 : _a.value) != null ? _b : "");
1461
+ const [hovered, setHovered] = useState17(null);
1462
+ const activeTab = tabs.find((t) => t.value === active);
1463
+ return /* @__PURE__ */ jsxs20("div", { style: { display: "flex", flexDirection: "column" }, children: [
1464
+ /* @__PURE__ */ jsx27("div", { role: "tablist", style: {
1465
+ display: "inline-flex",
1466
+ backgroundColor: "var(--ds-muted, #f1f5f9)",
1467
+ borderRadius: "0.5rem",
1468
+ padding: "0.25rem",
1469
+ gap: "0.125rem"
1470
+ }, children: tabs.map((tab) => {
1471
+ const isActive = active === tab.value;
1472
+ const isHovered = hovered === tab.value;
1473
+ return /* @__PURE__ */ jsxs20(
1474
+ "button",
1475
+ {
1476
+ role: "tab",
1477
+ "aria-selected": isActive,
1478
+ onClick: () => setActive(tab.value),
1479
+ onMouseEnter: () => setHovered(tab.value),
1480
+ onMouseLeave: () => setHovered(null),
1481
+ style: {
1482
+ display: "inline-flex",
1483
+ alignItems: "center",
1484
+ gap: "0.375rem",
1485
+ padding: "0.375rem 0.75rem",
1486
+ fontSize: "0.875rem",
1487
+ fontWeight: 500,
1488
+ borderRadius: "0.375rem",
1489
+ background: isActive ? "var(--ds-card, #ffffff)" : "transparent",
1490
+ border: "none",
1491
+ cursor: "pointer",
1492
+ color: isActive || isHovered ? "var(--ds-text-primary, #0f172a)" : "var(--ds-text-secondary, #64748b)",
1493
+ boxShadow: isActive ? "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)" : "none",
1494
+ transition: "color 0.15s, background-color 0.15s, box-shadow 0.15s",
1495
+ whiteSpace: "nowrap"
1496
+ },
1497
+ children: [
1498
+ tab.icon && /* @__PURE__ */ jsx27("span", { style: { display: "flex", alignItems: "center" }, children: tab.icon }),
1499
+ tab.label
1500
+ ]
1501
+ },
1502
+ tab.value
1503
+ );
1504
+ }) }),
1505
+ /* @__PURE__ */ jsx27("div", { role: "tabpanel", style: {
1506
+ paddingTop: "1rem",
1507
+ fontSize: "0.875rem",
1508
+ color: "var(--ds-text-secondary, #64748b)"
1509
+ }, children: activeTab == null ? void 0 : activeTab.content })
1510
+ ] });
1511
+ };
1512
+ var Tabs_default = Tabs;
1513
+
1514
+ // src/components/Textarea/Textarea.tsx
1515
+ import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
1516
+ var textareaCSS = `
1517
+ [data-ds-textarea]::placeholder { color: var(--ds-text-secondary, #64748b); }
1518
+ [data-ds-textarea]:focus { outline: none; border-color: var(--ds-primary, #3b82f6); box-shadow: 0 0 0 3px rgb(59 130 246 / 0.15); }
1519
+ [data-ds-textarea]:disabled { opacity: 0.5; cursor: not-allowed; background-color: var(--ds-muted, #f1f5f9); }
1520
+ [data-ds-textarea][data-error="true"] { border-color: var(--ds-danger, #ef4444); }
1521
+ [data-ds-textarea][data-error="true"]:focus { border-color: var(--ds-danger, #ef4444); box-shadow: 0 0 0 3px rgb(239 68 68 / 0.15); }
1522
+ `;
1523
+ var Textarea = (_a) => {
1524
+ var _b = _a, { error, style } = _b, props = __objRest(_b, ["error", "style"]);
1525
+ return /* @__PURE__ */ jsxs21(Fragment8, { children: [
1526
+ /* @__PURE__ */ jsx28("style", { href: "ds-textarea", precedence: "low", children: textareaCSS }),
1527
+ /* @__PURE__ */ jsx28(
1528
+ "textarea",
1529
+ __spreadValues({
1530
+ "data-ds-textarea": "",
1531
+ "data-error": error ? "true" : void 0,
1532
+ style: __spreadValues({
1533
+ width: "100%",
1534
+ padding: "0.5rem 0.75rem",
1535
+ border: `1px solid ${error ? "var(--ds-danger, #ef4444)" : "var(--ds-border, #e2e8f0)"}`,
1536
+ borderRadius: "0.375rem",
1537
+ fontSize: "0.875rem",
1538
+ backgroundColor: "var(--ds-card, #fff)",
1539
+ color: "var(--ds-text-primary, #0f172a)",
1540
+ fontFamily: "inherit",
1541
+ resize: "vertical",
1542
+ transition: "border-color 0.15s, box-shadow 0.15s",
1543
+ minHeight: "6rem",
1544
+ boxSizing: "border-box"
1545
+ }, style)
1546
+ }, props)
1547
+ )
1548
+ ] });
1549
+ };
1550
+ var Textarea_default = Textarea;
1551
+
1552
+ // src/components/Tooltip/Tooltip.tsx
1553
+ import { useState as useState18 } from "react";
1554
+ import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
1555
+ var positionStyle = {
1556
+ top: { bottom: "calc(100% + 8px)", left: "50%", transform: "translateX(-50%)" },
1557
+ bottom: { top: "calc(100% + 8px)", left: "50%", transform: "translateX(-50%)" },
1558
+ left: { right: "calc(100% + 8px)", top: "50%", transform: "translateY(-50%)" },
1559
+ right: { left: "calc(100% + 8px)", top: "50%", transform: "translateY(-50%)" }
1560
+ };
1561
+ var tooltipCSS = `
1562
+ [data-ds-tt]::before {
1563
+ content: '';
1564
+ position: absolute;
1565
+ border: 5px solid transparent;
1566
+ }
1567
+ [data-ds-tt="top"]::before { top: 100%; left: 50%; transform: translateX(-50%); border-top-color: var(--ds-tooltip-bg, #0f172a); }
1568
+ [data-ds-tt="bottom"]::before { bottom: 100%; left: 50%; transform: translateX(-50%); border-bottom-color: var(--ds-tooltip-bg, #0f172a); }
1569
+ [data-ds-tt="left"]::before { left: 100%; top: 50%; transform: translateY(-50%); border-left-color: var(--ds-tooltip-bg, #0f172a); }
1570
+ [data-ds-tt="right"]::before { right: 100%; top: 50%; transform: translateY(-50%); border-right-color: var(--ds-tooltip-bg, #0f172a); }
1571
+ `;
1572
+ var Tooltip5 = ({ content, children, position = "top" }) => {
1573
+ const [visible, setVisible] = useState18(false);
1574
+ return /* @__PURE__ */ jsxs22(Fragment9, { children: [
1575
+ /* @__PURE__ */ jsx29("style", { href: "ds-tooltip", precedence: "low", children: tooltipCSS }),
1576
+ /* @__PURE__ */ jsxs22(
1577
+ "span",
1578
+ {
1579
+ style: { position: "relative", display: "inline-flex" },
1580
+ onMouseEnter: () => setVisible(true),
1581
+ onMouseLeave: () => setVisible(false),
1582
+ onFocus: () => setVisible(true),
1583
+ onBlur: () => setVisible(false),
1584
+ children: [
1585
+ children,
1586
+ /* @__PURE__ */ jsx29(
1587
+ "span",
1588
+ {
1589
+ role: "tooltip",
1590
+ "data-ds-tt": position,
1591
+ style: __spreadValues({
1592
+ position: "absolute",
1593
+ zIndex: 50,
1594
+ padding: "0.375rem 0.625rem",
1595
+ backgroundColor: "var(--ds-tooltip-bg, #0f172a)",
1596
+ color: "var(--ds-tooltip-text, #ffffff)",
1597
+ fontSize: "0.75rem",
1598
+ lineHeight: 1.4,
1599
+ borderRadius: "0.375rem",
1600
+ whiteSpace: "nowrap",
1601
+ pointerEvents: "none",
1602
+ opacity: visible ? 1 : 0,
1603
+ transition: "opacity 0.15s"
1604
+ }, positionStyle[position]),
1605
+ children: content
1606
+ }
1607
+ )
1608
+ ]
1609
+ }
1610
+ )
1611
+ ] });
1612
+ };
1613
+ var Tooltip_default = Tooltip5;
1614
+ export {
1615
+ Accordion_default as Accordion,
1616
+ Alert_default as Alert,
1617
+ AreaChart_default as AreaChart,
1618
+ Avatar_default as Avatar,
1619
+ Badge_default as Badge,
1620
+ BarChart_default as BarChart,
1621
+ Breadcrumb_default as Breadcrumb,
1622
+ Button_default as Button,
1623
+ Card,
1624
+ CardContent,
1625
+ CardDescription,
1626
+ CardFooter,
1627
+ CardHeader,
1628
+ CardTitle,
1629
+ Checkbox_default as Checkbox,
1630
+ CopyButton_default as CopyButton,
1631
+ FileUpload_default as FileUpload,
1632
+ Input_default as Input,
1633
+ Label_default as Label,
1634
+ LineChart_default as LineChart,
1635
+ PasswordInput_default as PasswordInput,
1636
+ PieChart_default as PieChart,
1637
+ Progress_default as Progress,
1638
+ RadioGroup_default as RadioGroup,
1639
+ Select_default as Select,
1640
+ Skeleton_default as Skeleton,
1641
+ Slider_default as Slider,
1642
+ Spinner_default as Spinner,
1643
+ Switch_default as Switch,
1644
+ Table,
1645
+ TableBody,
1646
+ TableCell,
1647
+ TableHead,
1648
+ TableHeader,
1649
+ TableRow,
1650
+ Tabs_default as Tabs,
1651
+ Textarea_default as Textarea,
1652
+ ThemeProvider,
1653
+ Tooltip_default as Tooltip,
1654
+ useTheme
1655
+ };
1656
+ //# sourceMappingURL=index.js.map