@cytario/design 2.1.1 → 2.3.0
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.d.ts +2 -1
- package/dist/index.js +545 -538
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/styles/tailwind.css +6 -0
package/dist/index.js
CHANGED
|
@@ -12,46 +12,46 @@ import { twMerge } from "tailwind-merge";
|
|
|
12
12
|
// src/components/_shared/styles.ts
|
|
13
13
|
var variantStyles = {
|
|
14
14
|
primary: [
|
|
15
|
-
"bg-
|
|
16
|
-
"hover:bg-
|
|
17
|
-
"pressed:bg-
|
|
15
|
+
"bg-(--color-action-primary) text-(--color-text-inverse)",
|
|
16
|
+
"hover:bg-(--color-action-primary-hover)",
|
|
17
|
+
"pressed:bg-(--color-action-primary-active)"
|
|
18
18
|
].join(" "),
|
|
19
19
|
secondary: [
|
|
20
|
-
"bg-transparent text-
|
|
21
|
-
"border border-
|
|
22
|
-
"hover:bg-
|
|
23
|
-
"pressed:bg-
|
|
20
|
+
"bg-transparent text-(--color-action-secondary)",
|
|
21
|
+
"border border-(--color-border-brand)",
|
|
22
|
+
"hover:bg-purple-50",
|
|
23
|
+
"pressed:bg-purple-100"
|
|
24
24
|
].join(" "),
|
|
25
25
|
ghost: [
|
|
26
|
-
"bg-transparent text-
|
|
27
|
-
"hover:bg-
|
|
28
|
-
"pressed:bg-
|
|
26
|
+
"bg-transparent text-(--color-text-primary)",
|
|
27
|
+
"hover:bg-(--color-surface-hover)",
|
|
28
|
+
"pressed:bg-(--color-surface-pressed)"
|
|
29
29
|
].join(" "),
|
|
30
30
|
destructive: [
|
|
31
|
-
"bg-
|
|
32
|
-
"hover:bg-
|
|
33
|
-
"pressed:bg-
|
|
31
|
+
"bg-(--color-action-danger) text-(--color-text-inverse)",
|
|
32
|
+
"hover:bg-(--color-action-danger-hover)",
|
|
33
|
+
"pressed:bg-(--color-action-danger-hover)"
|
|
34
34
|
].join(" "),
|
|
35
35
|
default: [
|
|
36
|
-
"bg-
|
|
37
|
-
"hover:bg-
|
|
38
|
-
"pressed:bg-
|
|
36
|
+
"bg-(--color-action-default) text-(--color-text-inverse)",
|
|
37
|
+
"hover:bg-(--color-action-default-hover)",
|
|
38
|
+
"pressed:bg-slate-600"
|
|
39
39
|
].join(" "),
|
|
40
40
|
success: [
|
|
41
|
-
"bg-
|
|
42
|
-
"hover:bg-
|
|
43
|
-
"pressed:bg-
|
|
41
|
+
"bg-(--color-action-success) text-(--color-text-inverse)",
|
|
42
|
+
"hover:bg-(--color-action-success-hover)",
|
|
43
|
+
"pressed:bg-green-800"
|
|
44
44
|
].join(" "),
|
|
45
45
|
info: [
|
|
46
|
-
"bg-
|
|
47
|
-
"hover:bg-
|
|
48
|
-
"pressed:bg-
|
|
46
|
+
"bg-(--color-action-info) text-(--color-text-inverse)",
|
|
47
|
+
"hover:bg-(--color-action-info-hover)",
|
|
48
|
+
"pressed:bg-slate-800"
|
|
49
49
|
].join(" "),
|
|
50
50
|
neutral: [
|
|
51
|
-
"bg-
|
|
52
|
-
"border border-
|
|
53
|
-
"hover:bg-
|
|
54
|
-
"pressed:bg-
|
|
51
|
+
"bg-(--color-surface-default) text-(--color-text-primary)",
|
|
52
|
+
"border border-(--color-border-default)",
|
|
53
|
+
"hover:bg-(--color-surface-subtle)",
|
|
54
|
+
"pressed:bg-(--color-surface-muted)"
|
|
55
55
|
].join(" ")
|
|
56
56
|
};
|
|
57
57
|
var sizeStyles = {
|
|
@@ -156,13 +156,13 @@ var iconSizeMap = {
|
|
|
156
156
|
function groupRadiusClass(position) {
|
|
157
157
|
switch (position) {
|
|
158
158
|
case "start":
|
|
159
|
-
return "rounded-l-
|
|
159
|
+
return "rounded-l-(--border-radius-md) rounded-r-none";
|
|
160
160
|
case "middle":
|
|
161
161
|
return "rounded-none";
|
|
162
162
|
case "end":
|
|
163
|
-
return "rounded-r-
|
|
163
|
+
return "rounded-r-(--border-radius-md) rounded-l-none";
|
|
164
164
|
default:
|
|
165
|
-
return "rounded-
|
|
165
|
+
return "rounded-md";
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
function Button({
|
|
@@ -177,10 +177,10 @@ function Button({
|
|
|
177
177
|
...props
|
|
178
178
|
}) {
|
|
179
179
|
const { inGroup, position } = useInputGroup();
|
|
180
|
-
const groupGhost = inGroup && variant === "ghost" ? "bg-
|
|
181
|
-
const radiusClass = inGroup ? groupRadiusClass(position) : "rounded-
|
|
180
|
+
const groupGhost = inGroup && variant === "ghost" ? "bg-(--color-surface-default) text-(--color-text-secondary) border border-(--color-border-default) hover:bg-(--color-surface-hover) hover:text-(--color-text-primary) hover:border-(--color-border-strong) pressed:bg-(--color-surface-pressed) pressed:text-(--color-text-primary)" : "";
|
|
181
|
+
const radiusClass = inGroup ? groupRadiusClass(position) : "rounded-md";
|
|
182
182
|
const marginClass = inGroup && position !== "start" && position !== "standalone" ? "-ml-px" : "";
|
|
183
|
-
const focusRing = inGroup ? "focus-visible:ring-2 focus-visible:ring-
|
|
183
|
+
const focusRing = inGroup ? "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-0 focus-visible:z-10" : "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2";
|
|
184
184
|
return /* @__PURE__ */ jsxs2(
|
|
185
185
|
AriaButton,
|
|
186
186
|
{
|
|
@@ -189,8 +189,8 @@ function Button({
|
|
|
189
189
|
className: twMerge(
|
|
190
190
|
"inline-flex items-center justify-center gap-2 shrink-0",
|
|
191
191
|
radiusClass,
|
|
192
|
-
"font-
|
|
193
|
-
"leading-
|
|
192
|
+
"font-medium",
|
|
193
|
+
"leading-tight",
|
|
194
194
|
"outline-none transition-colors",
|
|
195
195
|
focusRing,
|
|
196
196
|
"disabled:opacity-50 disabled:pointer-events-none",
|
|
@@ -230,10 +230,10 @@ function Tooltip({
|
|
|
230
230
|
{
|
|
231
231
|
placement,
|
|
232
232
|
className: [
|
|
233
|
-
"bg-
|
|
234
|
-
"text-
|
|
233
|
+
"bg-(--color-surface-overlay) backdrop-blur-sm",
|
|
234
|
+
"text-(--color-text-inverse) text-sm",
|
|
235
235
|
"px-3 py-1.5",
|
|
236
|
-
"rounded-
|
|
236
|
+
"rounded-md",
|
|
237
237
|
"max-w-xs",
|
|
238
238
|
"entering:animate-in entering:fade-in entering:duration-150",
|
|
239
239
|
"exiting:animate-out exiting:fade-out exiting:duration-100",
|
|
@@ -272,13 +272,13 @@ var iconSizeMap2 = {
|
|
|
272
272
|
function groupRadiusClass2(position) {
|
|
273
273
|
switch (position) {
|
|
274
274
|
case "start":
|
|
275
|
-
return "rounded-l-
|
|
275
|
+
return "rounded-l-(--border-radius-md) rounded-r-none";
|
|
276
276
|
case "middle":
|
|
277
277
|
return "rounded-none";
|
|
278
278
|
case "end":
|
|
279
|
-
return "rounded-r-
|
|
279
|
+
return "rounded-r-(--border-radius-md) rounded-l-none";
|
|
280
280
|
default:
|
|
281
|
-
return "rounded-
|
|
281
|
+
return "rounded-md";
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
function IconButton({
|
|
@@ -294,10 +294,10 @@ function IconButton({
|
|
|
294
294
|
...props
|
|
295
295
|
}) {
|
|
296
296
|
const { inGroup, position } = useInputGroup();
|
|
297
|
-
const groupGhost = inGroup && variant === "ghost" ? "bg-
|
|
298
|
-
const radiusClass = inGroup ? groupRadiusClass2(position) : "rounded-
|
|
297
|
+
const groupGhost = inGroup && variant === "ghost" ? "bg-(--color-surface-default) text-(--color-text-secondary) border border-(--color-border-default) hover:bg-(--color-surface-hover) hover:text-(--color-text-primary) hover:border-(--color-border-strong) pressed:bg-(--color-surface-pressed) pressed:text-(--color-text-primary)" : "";
|
|
298
|
+
const radiusClass = inGroup ? groupRadiusClass2(position) : "rounded-md";
|
|
299
299
|
const marginClass = inGroup && position !== "start" && position !== "standalone" ? "-ml-px" : "";
|
|
300
|
-
const focusRing = inGroup ? "focus-visible:ring-2 focus-visible:ring-
|
|
300
|
+
const focusRing = inGroup ? "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-0 focus-visible:z-10" : "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2";
|
|
301
301
|
const button = /* @__PURE__ */ jsx5(
|
|
302
302
|
AriaButton2,
|
|
303
303
|
{
|
|
@@ -351,13 +351,13 @@ var alignClasses = {
|
|
|
351
351
|
function groupRadiusClasses(position) {
|
|
352
352
|
switch (position) {
|
|
353
353
|
case "start":
|
|
354
|
-
return "rounded-l-
|
|
354
|
+
return "rounded-l-(--border-radius-md) rounded-r-none";
|
|
355
355
|
case "middle":
|
|
356
356
|
return "rounded-none";
|
|
357
357
|
case "end":
|
|
358
|
-
return "rounded-r-
|
|
358
|
+
return "rounded-r-(--border-radius-md) rounded-l-none";
|
|
359
359
|
default:
|
|
360
|
-
return "rounded-
|
|
360
|
+
return "rounded-md";
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
function Input({
|
|
@@ -376,8 +376,8 @@ function Input({
|
|
|
376
376
|
}) {
|
|
377
377
|
const isInvalid = !!errorMessage;
|
|
378
378
|
const { inGroup, position } = useInputGroup();
|
|
379
|
-
const borderColor = isInvalid ? "border-
|
|
380
|
-
const radiusClass = inGroup ? groupRadiusClasses(position) : "rounded-
|
|
379
|
+
const borderColor = isInvalid ? "border-(--color-border-danger)" : "border-(--color-border-default) hover:border-(--color-border-strong)";
|
|
380
|
+
const radiusClass = inGroup ? groupRadiusClasses(position) : "rounded-md";
|
|
381
381
|
const marginClass = inGroup && position !== "start" && position !== "standalone" ? "-ml-px" : "";
|
|
382
382
|
return /* @__PURE__ */ jsxs4(
|
|
383
383
|
TextField,
|
|
@@ -388,7 +388,7 @@ function Input({
|
|
|
388
388
|
isRequired,
|
|
389
389
|
isInvalid,
|
|
390
390
|
className: [
|
|
391
|
-
"flex flex-col gap-
|
|
391
|
+
"flex flex-col gap-1",
|
|
392
392
|
inGroup ? "min-w-0 flex-1" : "",
|
|
393
393
|
marginClass,
|
|
394
394
|
className
|
|
@@ -398,9 +398,9 @@ function Input({
|
|
|
398
398
|
Label,
|
|
399
399
|
{
|
|
400
400
|
className: [
|
|
401
|
-
"text-
|
|
402
|
-
"font-
|
|
403
|
-
"text-
|
|
401
|
+
"text-sm",
|
|
402
|
+
"font-medium",
|
|
403
|
+
"text-(--color-text-primary)"
|
|
404
404
|
].join(" "),
|
|
405
405
|
children: [
|
|
406
406
|
label,
|
|
@@ -408,7 +408,7 @@ function Input({
|
|
|
408
408
|
"span",
|
|
409
409
|
{
|
|
410
410
|
"aria-hidden": "true",
|
|
411
|
-
className: "ml-0.5 text-
|
|
411
|
+
className: "ml-0.5 text-(--color-text-danger)",
|
|
412
412
|
children: "*"
|
|
413
413
|
}
|
|
414
414
|
)
|
|
@@ -422,10 +422,10 @@ function Input({
|
|
|
422
422
|
"flex items-center overflow-hidden",
|
|
423
423
|
radiusClass,
|
|
424
424
|
"border",
|
|
425
|
-
"bg-
|
|
425
|
+
"bg-(--color-surface-default)",
|
|
426
426
|
"outline-none transition-colors",
|
|
427
427
|
borderColor,
|
|
428
|
-
"focus-within:ring-2 focus-within:ring-
|
|
428
|
+
"focus-within:ring-2 focus-within:ring-(--color-border-focus) focus-within:border-(--color-border-focus)",
|
|
429
429
|
inGroup ? "focus-within:z-10" : "",
|
|
430
430
|
isDisabled ? "opacity-50 pointer-events-none" : ""
|
|
431
431
|
].filter(Boolean).join(" "),
|
|
@@ -435,9 +435,9 @@ function Input({
|
|
|
435
435
|
{
|
|
436
436
|
className: [
|
|
437
437
|
"self-stretch flex items-center shrink-0 select-none",
|
|
438
|
-
"bg-
|
|
439
|
-
"border-r border-r-
|
|
440
|
-
"text-
|
|
438
|
+
"bg-(--color-surface-subtle)",
|
|
439
|
+
"border-r border-r-(--color-border-default)",
|
|
440
|
+
"text-(--color-text-secondary)",
|
|
441
441
|
prefixSizeClasses[size]
|
|
442
442
|
].join(" "),
|
|
443
443
|
children: prefix
|
|
@@ -451,8 +451,8 @@ function Input({
|
|
|
451
451
|
"w-full bg-transparent",
|
|
452
452
|
sizeClasses[size],
|
|
453
453
|
alignClasses[align],
|
|
454
|
-
"text-
|
|
455
|
-
"placeholder:text-
|
|
454
|
+
"text-(--color-text-primary)",
|
|
455
|
+
"placeholder:text-(--color-text-tertiary)",
|
|
456
456
|
"outline-none border-none"
|
|
457
457
|
].join(" ")
|
|
458
458
|
}
|
|
@@ -469,12 +469,12 @@ function Input({
|
|
|
469
469
|
alignClasses[align],
|
|
470
470
|
radiusClass,
|
|
471
471
|
"border",
|
|
472
|
-
"text-
|
|
473
|
-
"bg-
|
|
474
|
-
"placeholder:text-
|
|
472
|
+
"text-(--color-text-primary)",
|
|
473
|
+
"bg-(--color-surface-default)",
|
|
474
|
+
"placeholder:text-(--color-text-tertiary)",
|
|
475
475
|
"outline-none transition-colors",
|
|
476
476
|
borderColor,
|
|
477
|
-
"focus:ring-2 focus:ring-
|
|
477
|
+
"focus:ring-2 focus:ring-(--color-border-focus) focus:border-(--color-border-focus)",
|
|
478
478
|
inGroup ? "focus:z-10" : "",
|
|
479
479
|
"disabled:opacity-50 disabled:pointer-events-none"
|
|
480
480
|
].join(" ")
|
|
@@ -484,7 +484,7 @@ function Input({
|
|
|
484
484
|
Text,
|
|
485
485
|
{
|
|
486
486
|
slot: "description",
|
|
487
|
-
className: "text-
|
|
487
|
+
className: "text-sm text-(--color-text-secondary)",
|
|
488
488
|
children: description
|
|
489
489
|
}
|
|
490
490
|
),
|
|
@@ -492,7 +492,7 @@ function Input({
|
|
|
492
492
|
Text,
|
|
493
493
|
{
|
|
494
494
|
slot: "errorMessage",
|
|
495
|
-
className: "text-
|
|
495
|
+
className: "text-sm text-(--color-text-danger)",
|
|
496
496
|
children: errorMessage
|
|
497
497
|
}
|
|
498
498
|
)
|
|
@@ -517,7 +517,7 @@ function ChevronDown() {
|
|
|
517
517
|
"svg",
|
|
518
518
|
{
|
|
519
519
|
"aria-hidden": "true",
|
|
520
|
-
className: "h-4 w-4 text-
|
|
520
|
+
className: "h-4 w-4 text-(--color-text-secondary)",
|
|
521
521
|
viewBox: "0 0 16 16",
|
|
522
522
|
fill: "none",
|
|
523
523
|
stroke: "currentColor",
|
|
@@ -533,7 +533,7 @@ function CheckIcon() {
|
|
|
533
533
|
"svg",
|
|
534
534
|
{
|
|
535
535
|
"aria-hidden": "true",
|
|
536
|
-
className: "h-4 w-4 text-
|
|
536
|
+
className: "h-4 w-4 text-(--color-action-primary)",
|
|
537
537
|
viewBox: "0 0 16 16",
|
|
538
538
|
fill: "none",
|
|
539
539
|
stroke: "currentColor",
|
|
@@ -563,13 +563,13 @@ function Select({
|
|
|
563
563
|
isDisabled,
|
|
564
564
|
isRequired,
|
|
565
565
|
isInvalid: hasError,
|
|
566
|
-
className: ["flex flex-col gap-
|
|
566
|
+
className: ["flex flex-col gap-1", className].filter(Boolean).join(" "),
|
|
567
567
|
children: [
|
|
568
568
|
/* @__PURE__ */ jsxs5(
|
|
569
569
|
Label2,
|
|
570
570
|
{
|
|
571
571
|
className: [
|
|
572
|
-
"text-
|
|
572
|
+
"text-sm font-medium text-(--color-text-primary)",
|
|
573
573
|
hideLabel && "sr-only"
|
|
574
574
|
].filter(Boolean).join(" "),
|
|
575
575
|
children: [
|
|
@@ -578,7 +578,7 @@ function Select({
|
|
|
578
578
|
"span",
|
|
579
579
|
{
|
|
580
580
|
"aria-hidden": "true",
|
|
581
|
-
className: "ml-0.5 text-
|
|
581
|
+
className: "ml-0.5 text-(--color-text-danger)",
|
|
582
582
|
children: "*"
|
|
583
583
|
}
|
|
584
584
|
)
|
|
@@ -590,29 +590,29 @@ function Select({
|
|
|
590
590
|
{
|
|
591
591
|
className: [
|
|
592
592
|
"inline-flex items-center justify-between",
|
|
593
|
-
"w-full rounded-
|
|
593
|
+
"w-full rounded-md px-4 py-2",
|
|
594
594
|
"text-base text-left",
|
|
595
595
|
"border outline-none transition-colors",
|
|
596
|
-
hasError ? "border-
|
|
597
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
596
|
+
hasError ? "border-(--color-border-danger)" : "border-(--color-border-default)",
|
|
597
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2",
|
|
598
598
|
"disabled:opacity-50 disabled:pointer-events-none",
|
|
599
|
-
"bg-
|
|
599
|
+
"bg-(--color-surface-default)"
|
|
600
600
|
].join(" "),
|
|
601
601
|
children: [
|
|
602
|
-
/* @__PURE__ */ jsx7(SelectValue, { className: "truncate data-[placeholder]:text-
|
|
602
|
+
/* @__PURE__ */ jsx7(SelectValue, { className: "truncate data-[placeholder]:text-(--color-text-tertiary)", children: ({ selectedText }) => selectedText || placeholder }),
|
|
603
603
|
/* @__PURE__ */ jsx7(ChevronDown, {})
|
|
604
604
|
]
|
|
605
605
|
}
|
|
606
606
|
),
|
|
607
|
-
hasError && /* @__PURE__ */ jsx7("span", { className: "text-
|
|
607
|
+
hasError && /* @__PURE__ */ jsx7("span", { className: "text-sm text-(--color-text-danger)", children: errorMessage }),
|
|
608
608
|
/* @__PURE__ */ jsx7(
|
|
609
609
|
Popover,
|
|
610
610
|
{
|
|
611
611
|
className: [
|
|
612
|
-
"w-
|
|
613
|
-
"rounded-
|
|
614
|
-
"border border-
|
|
615
|
-
"bg-
|
|
612
|
+
"w-(--trigger-width)",
|
|
613
|
+
"rounded-md",
|
|
614
|
+
"border border-(--color-border-default)",
|
|
615
|
+
"bg-(--color-surface-default)",
|
|
616
616
|
"shadow-lg",
|
|
617
617
|
"overflow-auto",
|
|
618
618
|
"entering:animate-in entering:fade-in entering:slide-in-from-top-1",
|
|
@@ -625,12 +625,12 @@ function Select({
|
|
|
625
625
|
textValue: item.name,
|
|
626
626
|
className: [
|
|
627
627
|
"flex items-center justify-between gap-2",
|
|
628
|
-
"px-4 py-2 rounded-
|
|
629
|
-
"text-base text-
|
|
628
|
+
"px-4 py-2 rounded-sm",
|
|
629
|
+
"text-base text-(--color-text-primary)",
|
|
630
630
|
"cursor-pointer outline-none",
|
|
631
|
-
"hover:bg-
|
|
632
|
-
"focus:bg-
|
|
633
|
-
"selected:text-
|
|
631
|
+
"hover:bg-(--color-surface-muted)",
|
|
632
|
+
"focus:bg-(--color-surface-muted)",
|
|
633
|
+
"selected:text-(--color-action-primary) selected:font-medium"
|
|
634
634
|
].join(" "),
|
|
635
635
|
children: ({ isSelected }) => /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
636
636
|
/* @__PURE__ */ jsx7("span", { className: "truncate", children: item.name }),
|
|
@@ -665,7 +665,7 @@ function Table({ size = "comfortable", className, ...props }) {
|
|
|
665
665
|
{
|
|
666
666
|
...props,
|
|
667
667
|
className: [
|
|
668
|
-
"w-full border-collapse text-
|
|
668
|
+
"w-full border-collapse text-(--font-size-sm) text-(--color-text-primary)",
|
|
669
669
|
tableSizeClass[size],
|
|
670
670
|
className
|
|
671
671
|
].filter(Boolean).join(" ")
|
|
@@ -681,14 +681,14 @@ function Column(props) {
|
|
|
681
681
|
{
|
|
682
682
|
...props,
|
|
683
683
|
className: [
|
|
684
|
-
"px-3 py-2 text-left font-
|
|
685
|
-
"border-b-2 border-
|
|
684
|
+
"px-3 py-2 text-left font-semibold text-(--color-text-secondary)",
|
|
685
|
+
"border-b-2 border-(--color-border-default)",
|
|
686
686
|
"cursor-default select-none outline-none",
|
|
687
|
-
"focus-visible:outline-2 focus-visible:outline-
|
|
687
|
+
"focus-visible:outline-2 focus-visible:outline-(--color-border-focus) focus-visible:outline-offset-[-2px]"
|
|
688
688
|
].join(" "),
|
|
689
689
|
children: ({ allowsSorting, sortDirection }) => /* @__PURE__ */ jsxs6("span", { className: "inline-flex items-center gap-1", children: [
|
|
690
690
|
props.children,
|
|
691
|
-
allowsSorting && /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "text-
|
|
691
|
+
allowsSorting && /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: "text-(--color-text-tertiary)", children: sortDirection === "ascending" ? "\u25B2" : sortDirection === "descending" ? "\u25BC" : "\u25B4" })
|
|
692
692
|
] })
|
|
693
693
|
}
|
|
694
694
|
);
|
|
@@ -702,11 +702,11 @@ function Row(props) {
|
|
|
702
702
|
{
|
|
703
703
|
...props,
|
|
704
704
|
className: [
|
|
705
|
-
"border-b border-
|
|
706
|
-
"even:bg-
|
|
707
|
-
"hover:bg-
|
|
705
|
+
"border-b border-(--color-border-default)",
|
|
706
|
+
"even:bg-(--color-surface-subtle)",
|
|
707
|
+
"hover:bg-(--color-surface-muted)",
|
|
708
708
|
"outline-none",
|
|
709
|
-
"focus-visible:outline-2 focus-visible:outline-
|
|
709
|
+
"focus-visible:outline-2 focus-visible:outline-(--color-border-focus) focus-visible:outline-offset-[-2px]",
|
|
710
710
|
"transition-colors"
|
|
711
711
|
].join(" ")
|
|
712
712
|
}
|
|
@@ -718,10 +718,10 @@ function Cell(props) {
|
|
|
718
718
|
{
|
|
719
719
|
...props,
|
|
720
720
|
className: [
|
|
721
|
-
"px-3 py-
|
|
722
|
-
"text-
|
|
721
|
+
"px-3 py-(--table-row-py)",
|
|
722
|
+
"text-(--color-text-primary)",
|
|
723
723
|
"outline-none",
|
|
724
|
-
"focus-visible:outline-2 focus-visible:outline-
|
|
724
|
+
"focus-visible:outline-2 focus-visible:outline-(--color-border-focus) focus-visible:outline-offset-[-2px]"
|
|
725
725
|
].join(" ")
|
|
726
726
|
}
|
|
727
727
|
);
|
|
@@ -758,7 +758,7 @@ function Dialog({
|
|
|
758
758
|
onOpenChange,
|
|
759
759
|
isDismissable,
|
|
760
760
|
className: [
|
|
761
|
-
"fixed inset-0 z-50 bg-
|
|
761
|
+
"fixed inset-0 z-50 bg-(--color-overlay-backdrop) backdrop-blur-sm",
|
|
762
762
|
"flex items-center justify-center",
|
|
763
763
|
"data-[entering]:animate-in data-[entering]:fade-in",
|
|
764
764
|
"data-[exiting]:animate-out data-[exiting]:fade-out"
|
|
@@ -769,18 +769,18 @@ function Dialog({
|
|
|
769
769
|
className: [
|
|
770
770
|
"w-full mx-4",
|
|
771
771
|
sizeStyles2[size],
|
|
772
|
-
"bg-
|
|
772
|
+
"bg-(--color-surface-default) rounded-lg shadow-xl max-h-[85vh] flex flex-col",
|
|
773
773
|
"data-[entering]:animate-in data-[entering]:zoom-in-95 data-[entering]:fade-in",
|
|
774
774
|
"data-[exiting]:animate-out data-[exiting]:zoom-out-95 data-[exiting]:fade-out",
|
|
775
775
|
className
|
|
776
776
|
].filter(Boolean).join(" "),
|
|
777
777
|
children: /* @__PURE__ */ jsx9(AriaDialog, { className: "outline-none flex flex-col max-h-[85vh]", children: ({ close }) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
778
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between px-6 py-4 border-b border-
|
|
778
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between px-6 py-4 border-b border-(--color-border-default)", children: [
|
|
779
779
|
/* @__PURE__ */ jsx9(
|
|
780
780
|
Heading,
|
|
781
781
|
{
|
|
782
782
|
slot: "title",
|
|
783
|
-
className: "text-
|
|
783
|
+
className: "text-lg font-semibold text-(--color-text-primary)",
|
|
784
784
|
children: title
|
|
785
785
|
}
|
|
786
786
|
),
|
|
@@ -790,9 +790,9 @@ function Dialog({
|
|
|
790
790
|
type: "button",
|
|
791
791
|
onClick: close,
|
|
792
792
|
className: [
|
|
793
|
-
"inline-flex items-center justify-center rounded-
|
|
794
|
-
"text-
|
|
795
|
-
"outline-none focus-visible:ring-2 focus-visible:ring-
|
|
793
|
+
"inline-flex items-center justify-center rounded-sm p-1",
|
|
794
|
+
"text-(--color-text-secondary) hover:text-(--color-text-primary) hover:bg-(--color-surface-muted)",
|
|
795
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2",
|
|
796
796
|
"transition-colors"
|
|
797
797
|
].join(" "),
|
|
798
798
|
"aria-label": "Close",
|
|
@@ -808,6 +808,9 @@ function Dialog({
|
|
|
808
808
|
);
|
|
809
809
|
}
|
|
810
810
|
|
|
811
|
+
// src/components/Dialog/DialogFooter.tsx
|
|
812
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
813
|
+
|
|
811
814
|
// src/components/Toast/Toast.tsx
|
|
812
815
|
import {
|
|
813
816
|
createContext as createContext2,
|
|
@@ -819,7 +822,7 @@ import {
|
|
|
819
822
|
} from "react";
|
|
820
823
|
import { createPortal } from "react-dom";
|
|
821
824
|
import { CheckCircle, XCircle, Info, X as X2 } from "lucide-react";
|
|
822
|
-
import { jsx as
|
|
825
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
823
826
|
var ToastContext = createContext2(null);
|
|
824
827
|
var toastCounter = 0;
|
|
825
828
|
var defaultDuration = {
|
|
@@ -830,18 +833,18 @@ var defaultDuration = {
|
|
|
830
833
|
var variantConfig = {
|
|
831
834
|
success: {
|
|
832
835
|
icon: CheckCircle,
|
|
833
|
-
containerClass: "bg-
|
|
834
|
-
iconClass: "text-
|
|
836
|
+
containerClass: "bg-(--color-surface-success) border-(--color-border-success) text-(--color-text-success)",
|
|
837
|
+
iconClass: "text-(--color-action-success)"
|
|
835
838
|
},
|
|
836
839
|
error: {
|
|
837
840
|
icon: XCircle,
|
|
838
|
-
containerClass: "bg-
|
|
839
|
-
iconClass: "text-
|
|
841
|
+
containerClass: "bg-(--color-surface-danger) border-(--color-border-danger) text-(--color-text-danger)",
|
|
842
|
+
iconClass: "text-(--color-action-danger)"
|
|
840
843
|
},
|
|
841
844
|
info: {
|
|
842
845
|
icon: Info,
|
|
843
|
-
containerClass: "bg-
|
|
844
|
-
iconClass: "text-
|
|
846
|
+
containerClass: "bg-(--color-surface-info) border-(--color-border-info) text-(--color-text-info)",
|
|
847
|
+
iconClass: "text-(--color-text-info)"
|
|
845
848
|
}
|
|
846
849
|
};
|
|
847
850
|
var PlacementContext = createContext2("bottom-right");
|
|
@@ -883,23 +886,23 @@ function ToastItem({
|
|
|
883
886
|
role: "status",
|
|
884
887
|
"aria-live": "polite",
|
|
885
888
|
className: [
|
|
886
|
-
"flex items-start gap-
|
|
889
|
+
"flex items-start gap-3 rounded-lg border px-4 py-3 shadow-md",
|
|
887
890
|
"min-w-[320px] max-w-[420px]",
|
|
888
891
|
"transition-all duration-200",
|
|
889
892
|
isExiting ? exitAnimationByPlacement[placement] : enterAnimationByPlacement[placement],
|
|
890
893
|
config.containerClass
|
|
891
894
|
].join(" "),
|
|
892
895
|
children: [
|
|
893
|
-
/* @__PURE__ */
|
|
894
|
-
/* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ jsx11(IconComponent, { size: 20, className: ["shrink-0 mt-0.5", config.iconClass].join(" "), "aria-hidden": "true" }),
|
|
897
|
+
/* @__PURE__ */ jsx11("p", { className: "flex-1 text-sm font-medium", children: toast.message }),
|
|
898
|
+
/* @__PURE__ */ jsx11(
|
|
896
899
|
"button",
|
|
897
900
|
{
|
|
898
901
|
type: "button",
|
|
899
902
|
onClick: dismiss,
|
|
900
|
-
className: "shrink-0 rounded-
|
|
903
|
+
className: "shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-opacity outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
901
904
|
"aria-label": "Dismiss",
|
|
902
|
-
children: /* @__PURE__ */
|
|
905
|
+
children: /* @__PURE__ */ jsx11(X2, { size: 16, "aria-hidden": "true" })
|
|
903
906
|
}
|
|
904
907
|
)
|
|
905
908
|
]
|
|
@@ -919,7 +922,7 @@ function ToastContainer({
|
|
|
919
922
|
}) {
|
|
920
923
|
if (toasts.length === 0) return null;
|
|
921
924
|
return createPortal(
|
|
922
|
-
/* @__PURE__ */
|
|
925
|
+
/* @__PURE__ */ jsx11(PlacementContext.Provider, { value: placement, children: /* @__PURE__ */ jsx11("div", { className: containerPositionStyles[placement], children: toasts.map((toast) => /* @__PURE__ */ jsx11(ToastItem, { toast, onRemove: removeToast }, toast.id)) }) }),
|
|
923
926
|
document.body
|
|
924
927
|
);
|
|
925
928
|
}
|
|
@@ -952,7 +955,7 @@ function ToastProvider({ children, bridge, placement = "bottom-right" }) {
|
|
|
952
955
|
}, [bridge, addToast]);
|
|
953
956
|
return /* @__PURE__ */ jsxs8(ToastContext.Provider, { value: { toasts, addToast, removeToast }, children: [
|
|
954
957
|
children,
|
|
955
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ jsx11(ToastContainer, { toasts, removeToast, placement })
|
|
956
959
|
] });
|
|
957
960
|
}
|
|
958
961
|
function useToast() {
|
|
@@ -968,7 +971,7 @@ function useToast() {
|
|
|
968
971
|
}
|
|
969
972
|
|
|
970
973
|
// src/components/EmptyState/EmptyState.tsx
|
|
971
|
-
import { jsx as
|
|
974
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
972
975
|
function EmptyState({
|
|
973
976
|
icon,
|
|
974
977
|
title,
|
|
@@ -980,14 +983,14 @@ function EmptyState({
|
|
|
980
983
|
"div",
|
|
981
984
|
{
|
|
982
985
|
className: [
|
|
983
|
-
"flex flex-col items-center text-center py-
|
|
986
|
+
"flex flex-col items-center text-center py-12 px-6",
|
|
984
987
|
className
|
|
985
988
|
].filter(Boolean).join(" "),
|
|
986
989
|
children: [
|
|
987
|
-
icon && /* @__PURE__ */
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
description && /* @__PURE__ */
|
|
990
|
-
action && /* @__PURE__ */
|
|
990
|
+
icon && /* @__PURE__ */ jsx12(Icon, { icon, size: "xl", className: "text-(--color-text-tertiary)" }),
|
|
991
|
+
/* @__PURE__ */ jsx12("h3", { className: "text-lg font-semibold text-(--color-text-primary) mt-4", children: title }),
|
|
992
|
+
description && /* @__PURE__ */ jsx12("p", { className: "text-sm text-(--color-text-secondary) mt-2 max-w-sm", children: description }),
|
|
993
|
+
action && /* @__PURE__ */ jsx12("div", { className: "mt-6", children: action })
|
|
991
994
|
]
|
|
992
995
|
}
|
|
993
996
|
);
|
|
@@ -998,14 +1001,14 @@ import {
|
|
|
998
1001
|
Checkbox as AriaCheckbox
|
|
999
1002
|
} from "react-aria-components";
|
|
1000
1003
|
import { Check } from "lucide-react";
|
|
1001
|
-
import { Fragment as Fragment3, jsx as
|
|
1004
|
+
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1002
1005
|
function Checkbox({ children, className, ...props }) {
|
|
1003
|
-
return /* @__PURE__ */
|
|
1006
|
+
return /* @__PURE__ */ jsx13(
|
|
1004
1007
|
AriaCheckbox,
|
|
1005
1008
|
{
|
|
1006
1009
|
...props,
|
|
1007
1010
|
className: [
|
|
1008
|
-
"group flex items-center gap-2 text-
|
|
1011
|
+
"group flex items-center gap-2 text-sm text-(--color-text-primary) cursor-pointer",
|
|
1009
1012
|
"disabled:opacity-50 disabled:cursor-default",
|
|
1010
1013
|
className
|
|
1011
1014
|
].filter(Boolean).join(" "),
|
|
@@ -1015,17 +1018,17 @@ function Checkbox({ children, className, ...props }) {
|
|
|
1015
1018
|
{
|
|
1016
1019
|
className: [
|
|
1017
1020
|
"flex items-center justify-center w-6 h-6 shrink-0",
|
|
1018
|
-
"rounded-
|
|
1019
|
-
"group-focus-visible:ring-2 group-focus-visible:ring-
|
|
1020
|
-
isSelected || isIndeterminate ? "bg-
|
|
1021
|
+
"rounded-sm border transition-colors",
|
|
1022
|
+
"group-focus-visible:ring-2 group-focus-visible:ring-(--color-border-focus) group-focus-visible:ring-offset-2",
|
|
1023
|
+
isSelected || isIndeterminate ? "bg-(--color-action-primary) border-(--color-action-primary)" : "bg-(--color-surface-default) border-(--color-border-default) group-hover:border-(--color-border-strong)"
|
|
1021
1024
|
].join(" "),
|
|
1022
1025
|
children: [
|
|
1023
|
-
isSelected && /* @__PURE__ */
|
|
1024
|
-
isIndeterminate && /* @__PURE__ */
|
|
1026
|
+
isSelected && /* @__PURE__ */ jsx13(Check, { className: "w-4 h-4 text-(--color-text-inverse)", strokeWidth: 3 }),
|
|
1027
|
+
isIndeterminate && /* @__PURE__ */ jsx13("div", { className: "w-3 h-0.5 bg-(--color-text-inverse) rounded-full" })
|
|
1025
1028
|
]
|
|
1026
1029
|
}
|
|
1027
1030
|
),
|
|
1028
|
-
children && /* @__PURE__ */
|
|
1031
|
+
children && /* @__PURE__ */ jsx13("span", { children })
|
|
1029
1032
|
] })
|
|
1030
1033
|
}
|
|
1031
1034
|
);
|
|
@@ -1035,11 +1038,11 @@ function Checkbox({ children, className, ...props }) {
|
|
|
1035
1038
|
import {
|
|
1036
1039
|
Switch as AriaSwitch
|
|
1037
1040
|
} from "react-aria-components";
|
|
1038
|
-
import { Fragment as Fragment4, jsx as
|
|
1041
|
+
import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1039
1042
|
var trackColorMap = {
|
|
1040
|
-
primary: "bg-
|
|
1041
|
-
success: "bg-
|
|
1042
|
-
destructive: "bg-
|
|
1043
|
+
primary: "bg-(--color-action-primary)",
|
|
1044
|
+
success: "bg-(--color-action-success)",
|
|
1045
|
+
destructive: "bg-(--color-action-danger)"
|
|
1043
1046
|
};
|
|
1044
1047
|
var presetColors = new Set(Object.keys(trackColorMap));
|
|
1045
1048
|
function isPresetColor(color) {
|
|
@@ -1052,37 +1055,37 @@ function Switch({
|
|
|
1052
1055
|
...props
|
|
1053
1056
|
}) {
|
|
1054
1057
|
const isPreset = isPresetColor(color);
|
|
1055
|
-
return /* @__PURE__ */
|
|
1058
|
+
return /* @__PURE__ */ jsx14(
|
|
1056
1059
|
AriaSwitch,
|
|
1057
1060
|
{
|
|
1058
1061
|
...props,
|
|
1059
1062
|
className: [
|
|
1060
|
-
"group flex items-center gap-2 text-
|
|
1063
|
+
"group flex items-center gap-2 text-sm text-(--color-text-primary) cursor-pointer",
|
|
1061
1064
|
"disabled:opacity-50 disabled:cursor-default",
|
|
1062
1065
|
className
|
|
1063
1066
|
].filter(Boolean).join(" "),
|
|
1064
1067
|
children: ({ isSelected }) => /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
1065
|
-
/* @__PURE__ */
|
|
1068
|
+
/* @__PURE__ */ jsx14(
|
|
1066
1069
|
"div",
|
|
1067
1070
|
{
|
|
1068
1071
|
className: [
|
|
1069
1072
|
"w-9 h-5 rounded-full transition-colors shrink-0 p-0.5",
|
|
1070
|
-
"group-focus-visible:ring-2 group-focus-visible:ring-
|
|
1071
|
-
isSelected && isPreset ? trackColorMap[color] : !isSelected ? "bg-
|
|
1073
|
+
"group-focus-visible:ring-2 group-focus-visible:ring-(--color-border-focus) group-focus-visible:ring-offset-2",
|
|
1074
|
+
isSelected && isPreset ? trackColorMap[color] : !isSelected ? "bg-(--color-border-strong)" : ""
|
|
1072
1075
|
].join(" "),
|
|
1073
1076
|
style: isSelected && !isPreset ? { backgroundColor: color } : void 0,
|
|
1074
|
-
children: /* @__PURE__ */
|
|
1077
|
+
children: /* @__PURE__ */ jsx14(
|
|
1075
1078
|
"div",
|
|
1076
1079
|
{
|
|
1077
1080
|
className: [
|
|
1078
|
-
"w-4 h-4 rounded-full bg-
|
|
1081
|
+
"w-4 h-4 rounded-full bg-(--color-surface-default) transition-transform shadow-sm",
|
|
1079
1082
|
isSelected ? "translate-x-4" : "translate-x-0"
|
|
1080
1083
|
].join(" ")
|
|
1081
1084
|
}
|
|
1082
1085
|
)
|
|
1083
1086
|
}
|
|
1084
1087
|
),
|
|
1085
|
-
children && /* @__PURE__ */
|
|
1088
|
+
children && /* @__PURE__ */ jsx14("span", { children })
|
|
1086
1089
|
] })
|
|
1087
1090
|
}
|
|
1088
1091
|
);
|
|
@@ -1093,9 +1096,9 @@ import {
|
|
|
1093
1096
|
RadioGroup as AriaRadioGroup,
|
|
1094
1097
|
Radio as AriaRadio
|
|
1095
1098
|
} from "react-aria-components";
|
|
1096
|
-
import { Fragment as Fragment5, jsx as
|
|
1099
|
+
import { Fragment as Fragment5, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1097
1100
|
function RadioGroup({ children, className, ...props }) {
|
|
1098
|
-
return /* @__PURE__ */
|
|
1101
|
+
return /* @__PURE__ */ jsx15(
|
|
1099
1102
|
AriaRadioGroup,
|
|
1100
1103
|
{
|
|
1101
1104
|
...props,
|
|
@@ -1109,35 +1112,35 @@ function RadioGroup({ children, className, ...props }) {
|
|
|
1109
1112
|
);
|
|
1110
1113
|
}
|
|
1111
1114
|
function Radio({ children, className, ...props }) {
|
|
1112
|
-
return /* @__PURE__ */
|
|
1115
|
+
return /* @__PURE__ */ jsx15(
|
|
1113
1116
|
AriaRadio,
|
|
1114
1117
|
{
|
|
1115
1118
|
...props,
|
|
1116
1119
|
className: [
|
|
1117
|
-
"group flex items-center gap-2 text-
|
|
1120
|
+
"group flex items-center gap-2 text-sm text-(--color-text-primary) cursor-pointer",
|
|
1118
1121
|
"disabled:opacity-50 disabled:cursor-default",
|
|
1119
1122
|
className
|
|
1120
1123
|
].filter(Boolean).join(" "),
|
|
1121
1124
|
children: ({ isSelected }) => /* @__PURE__ */ jsxs12(Fragment5, { children: [
|
|
1122
|
-
/* @__PURE__ */
|
|
1125
|
+
/* @__PURE__ */ jsx15(
|
|
1123
1126
|
"div",
|
|
1124
1127
|
{
|
|
1125
1128
|
className: [
|
|
1126
1129
|
"flex items-center justify-center w-5 h-5 shrink-0",
|
|
1127
1130
|
"rounded-full border-2 transition-colors",
|
|
1128
|
-
"group-focus-visible:ring-2 group-focus-visible:ring-
|
|
1129
|
-
isSelected ? "border-
|
|
1131
|
+
"group-focus-visible:ring-2 group-focus-visible:ring-(--color-border-focus) group-focus-visible:ring-offset-2",
|
|
1132
|
+
isSelected ? "border-(--color-action-primary)" : "border-(--color-border-default) group-hover:border-(--color-border-strong)"
|
|
1130
1133
|
].join(" "),
|
|
1131
|
-
children: isSelected && /* @__PURE__ */
|
|
1134
|
+
children: isSelected && /* @__PURE__ */ jsx15("div", { className: "w-2.5 h-2.5 rounded-full bg-(--color-action-primary)" })
|
|
1132
1135
|
}
|
|
1133
1136
|
),
|
|
1134
|
-
children && /* @__PURE__ */
|
|
1137
|
+
children && /* @__PURE__ */ jsx15("span", { children })
|
|
1135
1138
|
] })
|
|
1136
1139
|
}
|
|
1137
1140
|
);
|
|
1138
1141
|
}
|
|
1139
1142
|
function RadioButton({ children, className, ...props }) {
|
|
1140
|
-
return /* @__PURE__ */
|
|
1143
|
+
return /* @__PURE__ */ jsx15(
|
|
1141
1144
|
AriaRadio,
|
|
1142
1145
|
{
|
|
1143
1146
|
...props,
|
|
@@ -1146,14 +1149,14 @@ function RadioButton({ children, className, ...props }) {
|
|
|
1146
1149
|
"disabled:opacity-50 disabled:cursor-default",
|
|
1147
1150
|
className
|
|
1148
1151
|
].filter(Boolean).join(" "),
|
|
1149
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
1152
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsx15(
|
|
1150
1153
|
"div",
|
|
1151
1154
|
{
|
|
1152
1155
|
className: [
|
|
1153
|
-
"px-4 py-2 text-
|
|
1154
|
-
"rounded-
|
|
1155
|
-
"group-focus-visible:ring-2 group-focus-visible:ring-
|
|
1156
|
-
isSelected ? "bg-
|
|
1156
|
+
"px-4 py-2 text-sm font-medium",
|
|
1157
|
+
"rounded-md border transition-colors text-center",
|
|
1158
|
+
"group-focus-visible:ring-2 group-focus-visible:ring-(--color-border-focus) group-focus-visible:ring-offset-2",
|
|
1159
|
+
isSelected ? "bg-(--color-action-primary) border-(--color-action-primary) text-(--color-text-inverse)" : "bg-(--color-surface-default) border-(--color-border-default) text-(--color-text-primary) hover:border-(--color-border-strong)"
|
|
1157
1160
|
].join(" "),
|
|
1158
1161
|
children
|
|
1159
1162
|
}
|
|
@@ -1166,25 +1169,25 @@ function RadioButton({ children, className, ...props }) {
|
|
|
1166
1169
|
import {
|
|
1167
1170
|
Label as AriaLabel
|
|
1168
1171
|
} from "react-aria-components";
|
|
1169
|
-
import { jsx as
|
|
1172
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1170
1173
|
function Label3({ isRequired, children, className, ...props }) {
|
|
1171
1174
|
return /* @__PURE__ */ jsxs13(
|
|
1172
1175
|
AriaLabel,
|
|
1173
1176
|
{
|
|
1174
1177
|
...props,
|
|
1175
1178
|
className: [
|
|
1176
|
-
"text-
|
|
1177
|
-
"font-
|
|
1178
|
-
"text-
|
|
1179
|
+
"text-sm",
|
|
1180
|
+
"font-medium",
|
|
1181
|
+
"text-(--color-text-primary)",
|
|
1179
1182
|
className
|
|
1180
1183
|
].filter(Boolean).join(" "),
|
|
1181
1184
|
children: [
|
|
1182
1185
|
children,
|
|
1183
|
-
isRequired && /* @__PURE__ */
|
|
1186
|
+
isRequired && /* @__PURE__ */ jsx16(
|
|
1184
1187
|
"span",
|
|
1185
1188
|
{
|
|
1186
1189
|
"aria-hidden": "true",
|
|
1187
|
-
className: "ml-0.5 text-
|
|
1190
|
+
className: "ml-0.5 text-(--color-text-danger)",
|
|
1188
1191
|
children: "*"
|
|
1189
1192
|
}
|
|
1190
1193
|
)
|
|
@@ -1194,7 +1197,7 @@ function Label3({ isRequired, children, className, ...props }) {
|
|
|
1194
1197
|
}
|
|
1195
1198
|
|
|
1196
1199
|
// src/components/Field/Field.tsx
|
|
1197
|
-
import { jsx as
|
|
1200
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1198
1201
|
function getErrorMessage(error) {
|
|
1199
1202
|
if (!error) return void 0;
|
|
1200
1203
|
if (typeof error === "string") return error;
|
|
@@ -1212,36 +1215,36 @@ function Field({
|
|
|
1212
1215
|
return /* @__PURE__ */ jsxs14(
|
|
1213
1216
|
"div",
|
|
1214
1217
|
{
|
|
1215
|
-
className: ["flex flex-col gap-
|
|
1218
|
+
className: ["flex flex-col gap-1", className].filter(Boolean).join(" "),
|
|
1216
1219
|
children: [
|
|
1217
|
-
label && /* @__PURE__ */
|
|
1220
|
+
label && /* @__PURE__ */ jsx17(Label3, { isRequired, children: label }),
|
|
1218
1221
|
children,
|
|
1219
|
-
description && !errorMessage && /* @__PURE__ */
|
|
1220
|
-
errorMessage && /* @__PURE__ */
|
|
1222
|
+
description && !errorMessage && /* @__PURE__ */ jsx17("p", { className: "text-sm text-(--color-text-secondary)", children: description }),
|
|
1223
|
+
errorMessage && /* @__PURE__ */ jsx17("p", { className: "text-sm text-(--color-text-danger)", children: errorMessage })
|
|
1221
1224
|
]
|
|
1222
1225
|
}
|
|
1223
1226
|
);
|
|
1224
1227
|
}
|
|
1225
1228
|
|
|
1226
1229
|
// src/components/Fieldset/Fieldset.tsx
|
|
1227
|
-
import { jsx as
|
|
1230
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1228
1231
|
function Fieldset({ legend, children, className }) {
|
|
1229
1232
|
return /* @__PURE__ */ jsxs15(
|
|
1230
1233
|
"fieldset",
|
|
1231
1234
|
{
|
|
1232
1235
|
className: [
|
|
1233
|
-
"flex flex-col gap-
|
|
1236
|
+
"flex flex-col gap-8",
|
|
1234
1237
|
"border-none p-0 m-0",
|
|
1235
1238
|
className
|
|
1236
1239
|
].filter(Boolean).join(" "),
|
|
1237
1240
|
children: [
|
|
1238
|
-
legend && /* @__PURE__ */
|
|
1241
|
+
legend && /* @__PURE__ */ jsx18(
|
|
1239
1242
|
"legend",
|
|
1240
1243
|
{
|
|
1241
1244
|
className: [
|
|
1242
|
-
"text-
|
|
1243
|
-
"font-
|
|
1244
|
-
"text-
|
|
1245
|
+
"text-lg",
|
|
1246
|
+
"font-semibold",
|
|
1247
|
+
"text-(--color-text-primary)",
|
|
1245
1248
|
"p-0"
|
|
1246
1249
|
].join(" "),
|
|
1247
1250
|
children: legend
|
|
@@ -1255,18 +1258,18 @@ function Fieldset({ legend, children, className }) {
|
|
|
1255
1258
|
|
|
1256
1259
|
// src/components/InputGroup/InputGroup.tsx
|
|
1257
1260
|
import React from "react";
|
|
1258
|
-
import { jsx as
|
|
1261
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1259
1262
|
function InputGroup({ children, className }) {
|
|
1260
1263
|
const childArray = React.Children.toArray(children).filter(
|
|
1261
1264
|
React.isValidElement
|
|
1262
1265
|
);
|
|
1263
|
-
return /* @__PURE__ */
|
|
1266
|
+
return /* @__PURE__ */ jsx19(
|
|
1264
1267
|
"div",
|
|
1265
1268
|
{
|
|
1266
1269
|
className: ["flex items-stretch", className].filter(Boolean).join(" "),
|
|
1267
1270
|
children: childArray.map((child, index) => {
|
|
1268
1271
|
const position = childArray.length === 1 ? "standalone" : index === 0 ? "start" : index === childArray.length - 1 ? "end" : "middle";
|
|
1269
|
-
return /* @__PURE__ */
|
|
1272
|
+
return /* @__PURE__ */ jsx19(
|
|
1270
1273
|
InputGroupContext.Provider,
|
|
1271
1274
|
{
|
|
1272
1275
|
value: { inGroup: true, position },
|
|
@@ -1280,32 +1283,32 @@ function InputGroup({ children, className }) {
|
|
|
1280
1283
|
}
|
|
1281
1284
|
|
|
1282
1285
|
// src/components/InputAddon/InputAddon.tsx
|
|
1283
|
-
import { jsx as
|
|
1286
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1284
1287
|
function groupRadiusClass3(position) {
|
|
1285
1288
|
switch (position) {
|
|
1286
1289
|
case "start":
|
|
1287
|
-
return "rounded-l-
|
|
1290
|
+
return "rounded-l-(--border-radius-md) rounded-r-none";
|
|
1288
1291
|
case "middle":
|
|
1289
1292
|
return "rounded-none";
|
|
1290
1293
|
case "end":
|
|
1291
|
-
return "rounded-r-
|
|
1294
|
+
return "rounded-r-(--border-radius-md) rounded-l-none";
|
|
1292
1295
|
default:
|
|
1293
|
-
return "rounded-
|
|
1296
|
+
return "rounded-md";
|
|
1294
1297
|
}
|
|
1295
1298
|
}
|
|
1296
1299
|
function InputAddon({ children, className }) {
|
|
1297
1300
|
const { inGroup, position } = useInputGroup();
|
|
1298
|
-
const radiusClass = inGroup ? groupRadiusClass3(position) : "rounded-
|
|
1301
|
+
const radiusClass = inGroup ? groupRadiusClass3(position) : "rounded-md";
|
|
1299
1302
|
const marginClass = inGroup && position !== "start" && position !== "standalone" ? "-ml-px" : "";
|
|
1300
|
-
return /* @__PURE__ */
|
|
1303
|
+
return /* @__PURE__ */ jsx20(
|
|
1301
1304
|
"div",
|
|
1302
1305
|
{
|
|
1303
1306
|
className: [
|
|
1304
1307
|
"flex items-center self-stretch shrink-0 select-none",
|
|
1305
1308
|
"px-3 py-2 text-base",
|
|
1306
|
-
"bg-
|
|
1307
|
-
"text-
|
|
1308
|
-
"border border-
|
|
1309
|
+
"bg-(--color-surface-subtle)",
|
|
1310
|
+
"text-(--color-text-secondary)",
|
|
1311
|
+
"border border-(--color-border-default)",
|
|
1309
1312
|
radiusClass,
|
|
1310
1313
|
marginClass,
|
|
1311
1314
|
className
|
|
@@ -1317,7 +1320,7 @@ function InputAddon({ children, className }) {
|
|
|
1317
1320
|
|
|
1318
1321
|
// src/components/Heading/Heading.tsx
|
|
1319
1322
|
import { twMerge as twMerge2 } from "tailwind-merge";
|
|
1320
|
-
import { jsx as
|
|
1323
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1321
1324
|
var defaultSizeMap = {
|
|
1322
1325
|
h1: "2xl",
|
|
1323
1326
|
h2: "xl",
|
|
@@ -1327,17 +1330,17 @@ var defaultSizeMap = {
|
|
|
1327
1330
|
h6: "xs"
|
|
1328
1331
|
};
|
|
1329
1332
|
var sizeStyles3 = {
|
|
1330
|
-
xs: "text-
|
|
1331
|
-
sm: "text-
|
|
1332
|
-
md: "text-
|
|
1333
|
-
lg: "text-
|
|
1334
|
-
xl: "text-
|
|
1335
|
-
"2xl": "text-
|
|
1336
|
-
"3xl": "text-
|
|
1333
|
+
xs: "text-sm",
|
|
1334
|
+
sm: "text-base",
|
|
1335
|
+
md: "text-lg",
|
|
1336
|
+
lg: "text-xl",
|
|
1337
|
+
xl: "text-2xl",
|
|
1338
|
+
"2xl": "text-3xl",
|
|
1339
|
+
"3xl": "text-4xl"
|
|
1337
1340
|
};
|
|
1338
1341
|
var weightStyles = {
|
|
1339
|
-
semibold: "font-
|
|
1340
|
-
bold: "font-
|
|
1342
|
+
semibold: "font-semibold",
|
|
1343
|
+
bold: "font-bold"
|
|
1341
1344
|
};
|
|
1342
1345
|
function Heading2({
|
|
1343
1346
|
as: Tag = "h2",
|
|
@@ -1347,12 +1350,12 @@ function Heading2({
|
|
|
1347
1350
|
children
|
|
1348
1351
|
}) {
|
|
1349
1352
|
const resolvedSize = size ?? defaultSizeMap[Tag];
|
|
1350
|
-
return /* @__PURE__ */
|
|
1353
|
+
return /* @__PURE__ */ jsx21(
|
|
1351
1354
|
Tag,
|
|
1352
1355
|
{
|
|
1353
1356
|
className: twMerge2(
|
|
1354
1357
|
weightStyles[weight],
|
|
1355
|
-
"text-
|
|
1358
|
+
"text-(--color-text-primary)",
|
|
1356
1359
|
sizeStyles3[resolvedSize],
|
|
1357
1360
|
className
|
|
1358
1361
|
),
|
|
@@ -1361,7 +1364,7 @@ function Heading2({
|
|
|
1361
1364
|
);
|
|
1362
1365
|
}
|
|
1363
1366
|
function H1(props) {
|
|
1364
|
-
return /* @__PURE__ */
|
|
1367
|
+
return /* @__PURE__ */ jsx21(
|
|
1365
1368
|
Heading2,
|
|
1366
1369
|
{
|
|
1367
1370
|
...props,
|
|
@@ -1372,25 +1375,25 @@ function H1(props) {
|
|
|
1372
1375
|
);
|
|
1373
1376
|
}
|
|
1374
1377
|
function H2(props) {
|
|
1375
|
-
return /* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ jsx21(Heading2, { ...props, as: "h2", size: props.size ?? "xl" });
|
|
1376
1379
|
}
|
|
1377
1380
|
function H3(props) {
|
|
1378
|
-
return /* @__PURE__ */
|
|
1381
|
+
return /* @__PURE__ */ jsx21(Heading2, { ...props, as: "h3", size: props.size ?? "lg" });
|
|
1379
1382
|
}
|
|
1380
1383
|
|
|
1381
1384
|
// src/components/Link/Link.tsx
|
|
1382
1385
|
import {
|
|
1383
1386
|
Link as AriaLink
|
|
1384
1387
|
} from "react-aria-components";
|
|
1385
|
-
import { jsx as
|
|
1388
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1386
1389
|
var variantStyles2 = {
|
|
1387
1390
|
default: [
|
|
1388
|
-
"text-
|
|
1389
|
-
"hover:text-
|
|
1391
|
+
"text-teal-700 underline",
|
|
1392
|
+
"hover:text-teal-800"
|
|
1390
1393
|
].join(" "),
|
|
1391
1394
|
subtle: [
|
|
1392
|
-
"text-
|
|
1393
|
-
"hover:underline hover:text-
|
|
1395
|
+
"text-(--color-text-secondary) no-underline",
|
|
1396
|
+
"hover:underline hover:text-(--color-text-primary)"
|
|
1394
1397
|
].join(" ")
|
|
1395
1398
|
};
|
|
1396
1399
|
function Link({
|
|
@@ -1398,13 +1401,13 @@ function Link({
|
|
|
1398
1401
|
className,
|
|
1399
1402
|
...props
|
|
1400
1403
|
}) {
|
|
1401
|
-
return /* @__PURE__ */
|
|
1404
|
+
return /* @__PURE__ */ jsx22(
|
|
1402
1405
|
AriaLink,
|
|
1403
1406
|
{
|
|
1404
1407
|
...props,
|
|
1405
1408
|
className: [
|
|
1406
1409
|
"outline-none transition-colors",
|
|
1407
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
1410
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 focus-visible:rounded-sm",
|
|
1408
1411
|
variantStyles2[variant],
|
|
1409
1412
|
className
|
|
1410
1413
|
].filter(Boolean).join(" ")
|
|
@@ -1419,20 +1422,20 @@ import {
|
|
|
1419
1422
|
Link as Link2
|
|
1420
1423
|
} from "react-aria-components";
|
|
1421
1424
|
import { ChevronRight } from "lucide-react";
|
|
1422
|
-
import { Fragment as Fragment6, jsx as
|
|
1425
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1423
1426
|
function Breadcrumbs({ items, className }) {
|
|
1424
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ jsx23(
|
|
1425
1428
|
"nav",
|
|
1426
1429
|
{
|
|
1427
1430
|
"aria-label": "Breadcrumb",
|
|
1428
1431
|
className,
|
|
1429
|
-
children: /* @__PURE__ */
|
|
1432
|
+
children: /* @__PURE__ */ jsx23(
|
|
1430
1433
|
AriaBreadcrumbs,
|
|
1431
1434
|
{
|
|
1432
1435
|
className: "flex items-center gap-1 text-sm min-w-0",
|
|
1433
1436
|
children: items.map((item, index) => {
|
|
1434
1437
|
const isLast = index === items.length - 1;
|
|
1435
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ jsx23(
|
|
1436
1439
|
AriaBreadcrumb,
|
|
1437
1440
|
{
|
|
1438
1441
|
id: item.id,
|
|
@@ -1440,19 +1443,19 @@ function Breadcrumbs({ items, className }) {
|
|
|
1440
1443
|
"flex items-center gap-1",
|
|
1441
1444
|
isLast ? "min-w-0" : "shrink-0"
|
|
1442
1445
|
].join(" "),
|
|
1443
|
-
children: isLast ? /* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */
|
|
1446
|
+
children: isLast ? /* @__PURE__ */ jsx23("span", { className: "font-medium text-(--color-text-primary) truncate", children: item.label }) : /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
1447
|
+
/* @__PURE__ */ jsx23(
|
|
1445
1448
|
Link2,
|
|
1446
1449
|
{
|
|
1447
1450
|
href: item.href,
|
|
1448
|
-
className: "whitespace-nowrap text-
|
|
1451
|
+
className: "whitespace-nowrap text-(--color-text-secondary) outline-none transition-colors hover:text-(--color-text-primary) focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 focus-visible:rounded-sm",
|
|
1449
1452
|
children: item.label
|
|
1450
1453
|
}
|
|
1451
1454
|
),
|
|
1452
|
-
/* @__PURE__ */
|
|
1455
|
+
/* @__PURE__ */ jsx23(
|
|
1453
1456
|
ChevronRight,
|
|
1454
1457
|
{
|
|
1455
|
-
className: "shrink-0 text-
|
|
1458
|
+
className: "shrink-0 text-neutral-400",
|
|
1456
1459
|
size: 16,
|
|
1457
1460
|
"aria-hidden": "true"
|
|
1458
1461
|
}
|
|
@@ -1473,7 +1476,7 @@ import {
|
|
|
1473
1476
|
Link as AriaLink2
|
|
1474
1477
|
} from "react-aria-components";
|
|
1475
1478
|
import { twMerge as twMerge3 } from "tailwind-merge";
|
|
1476
|
-
import { jsx as
|
|
1479
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1477
1480
|
var iconSizeMap3 = {
|
|
1478
1481
|
sm: "sm",
|
|
1479
1482
|
md: "sm",
|
|
@@ -1494,19 +1497,19 @@ function ButtonLink({
|
|
|
1494
1497
|
...props,
|
|
1495
1498
|
className: twMerge3(
|
|
1496
1499
|
"inline-flex items-center justify-center gap-2",
|
|
1497
|
-
"rounded-
|
|
1498
|
-
"font-
|
|
1499
|
-
"leading-
|
|
1500
|
+
"rounded-md",
|
|
1501
|
+
"font-medium",
|
|
1502
|
+
"leading-tight",
|
|
1500
1503
|
"outline-none transition-colors no-underline",
|
|
1501
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
1504
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2",
|
|
1502
1505
|
variantStyles[variant],
|
|
1503
1506
|
sizeStyles[size],
|
|
1504
1507
|
className
|
|
1505
1508
|
),
|
|
1506
1509
|
children: [
|
|
1507
|
-
iconLeft && /* @__PURE__ */
|
|
1510
|
+
iconLeft && /* @__PURE__ */ jsx24(Icon, { icon: iconLeft, size: iconSizeMap3[size] }),
|
|
1508
1511
|
children,
|
|
1509
|
-
iconRight && /* @__PURE__ */
|
|
1512
|
+
iconRight && /* @__PURE__ */ jsx24(Icon, { icon: iconRight, size: iconSizeMap3[size] })
|
|
1510
1513
|
]
|
|
1511
1514
|
}
|
|
1512
1515
|
);
|
|
@@ -1526,25 +1529,25 @@ function IconButtonLink({
|
|
|
1526
1529
|
className,
|
|
1527
1530
|
...props
|
|
1528
1531
|
}) {
|
|
1529
|
-
const link = /* @__PURE__ */
|
|
1532
|
+
const link = /* @__PURE__ */ jsx24(
|
|
1530
1533
|
AriaLink2,
|
|
1531
1534
|
{
|
|
1532
1535
|
...props,
|
|
1533
1536
|
"aria-label": ariaLabel,
|
|
1534
1537
|
className: twMerge3(
|
|
1535
1538
|
"inline-flex items-center justify-center",
|
|
1536
|
-
"rounded-
|
|
1539
|
+
"rounded-md",
|
|
1537
1540
|
"outline-none transition-colors no-underline",
|
|
1538
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
1541
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2",
|
|
1539
1542
|
variantStyles[variant],
|
|
1540
1543
|
squareSizeStyles2[size],
|
|
1541
1544
|
className
|
|
1542
1545
|
),
|
|
1543
|
-
children: /* @__PURE__ */
|
|
1546
|
+
children: /* @__PURE__ */ jsx24(Icon, { icon, size: iconSizeMap3[size] })
|
|
1544
1547
|
}
|
|
1545
1548
|
);
|
|
1546
1549
|
if (showTooltip) {
|
|
1547
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ jsx24(Tooltip, { content: ariaLabel, placement: tooltipPlacement, children: link });
|
|
1548
1551
|
}
|
|
1549
1552
|
return link;
|
|
1550
1553
|
}
|
|
@@ -1554,7 +1557,7 @@ import {
|
|
|
1554
1557
|
ToggleButton as AriaToggleButton
|
|
1555
1558
|
} from "react-aria-components";
|
|
1556
1559
|
import { twMerge as twMerge4 } from "tailwind-merge";
|
|
1557
|
-
import { jsx as
|
|
1560
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1558
1561
|
var sizeStyles4 = {
|
|
1559
1562
|
sm: "px-3 py-1.5 text-sm",
|
|
1560
1563
|
md: "px-4 py-2 text-base",
|
|
@@ -1568,30 +1571,30 @@ var squareSizeStyles3 = {
|
|
|
1568
1571
|
var variantStyles3 = {
|
|
1569
1572
|
default: {
|
|
1570
1573
|
base: [
|
|
1571
|
-
"bg-transparent text-
|
|
1572
|
-
"hover:bg-
|
|
1573
|
-
"pressed:bg-
|
|
1574
|
+
"bg-transparent text-(--color-text-primary)",
|
|
1575
|
+
"hover:bg-(--color-surface-hover)",
|
|
1576
|
+
"pressed:bg-(--color-surface-pressed)"
|
|
1574
1577
|
].join(" "),
|
|
1575
|
-
selected: "bg-
|
|
1578
|
+
selected: "bg-(--color-surface-pressed) text-(--color-text-primary)"
|
|
1576
1579
|
},
|
|
1577
1580
|
primary: {
|
|
1578
1581
|
base: [
|
|
1579
|
-
"bg-transparent text-
|
|
1580
|
-
"hover:bg-
|
|
1581
|
-
"pressed:bg-
|
|
1582
|
+
"bg-transparent text-(--color-text-primary)",
|
|
1583
|
+
"hover:bg-(--color-surface-hover)",
|
|
1584
|
+
"pressed:bg-(--color-surface-pressed)"
|
|
1582
1585
|
].join(" "),
|
|
1583
|
-
selected: "bg-
|
|
1586
|
+
selected: "bg-(--color-action-primary-active) text-(--color-text-inverse)"
|
|
1584
1587
|
},
|
|
1585
1588
|
outlined: {
|
|
1586
1589
|
base: [
|
|
1587
|
-
"bg-
|
|
1588
|
-
"border border-
|
|
1589
|
-
"hover:bg-
|
|
1590
|
-
"pressed:bg-
|
|
1590
|
+
"bg-(--color-surface-default) text-(--color-text-primary)",
|
|
1591
|
+
"border border-(--color-border-default)",
|
|
1592
|
+
"hover:bg-(--color-surface-subtle)",
|
|
1593
|
+
"pressed:bg-(--color-surface-muted)"
|
|
1591
1594
|
].join(" "),
|
|
1592
1595
|
selected: [
|
|
1593
|
-
"bg-
|
|
1594
|
-
"border border-
|
|
1596
|
+
"bg-neutral-800 text-(--color-text-inverse)",
|
|
1597
|
+
"border border-neutral-800"
|
|
1595
1598
|
].join(" ")
|
|
1596
1599
|
}
|
|
1597
1600
|
};
|
|
@@ -1603,17 +1606,17 @@ function ToggleButton({
|
|
|
1603
1606
|
...props
|
|
1604
1607
|
}) {
|
|
1605
1608
|
const styles = variantStyles3[variant];
|
|
1606
|
-
return /* @__PURE__ */
|
|
1609
|
+
return /* @__PURE__ */ jsx25(
|
|
1607
1610
|
AriaToggleButton,
|
|
1608
1611
|
{
|
|
1609
1612
|
...props,
|
|
1610
1613
|
className: ({ isSelected }) => twMerge4(
|
|
1611
1614
|
"inline-flex items-center justify-center gap-2",
|
|
1612
|
-
isSquare ? "rounded-none" : "rounded-
|
|
1613
|
-
"font-
|
|
1614
|
-
"leading-
|
|
1615
|
+
isSquare ? "rounded-none" : "rounded-md",
|
|
1616
|
+
"font-medium",
|
|
1617
|
+
"leading-tight",
|
|
1615
1618
|
"outline-none transition-colors",
|
|
1616
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
1619
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2",
|
|
1617
1620
|
"disabled:opacity-50 disabled:pointer-events-none",
|
|
1618
1621
|
isSquare ? squareSizeStyles3[size] : sizeStyles4[size],
|
|
1619
1622
|
isSelected ? styles.selected : styles.base,
|
|
@@ -1630,7 +1633,7 @@ import {
|
|
|
1630
1633
|
RadioGroup as AriaRadioGroup2,
|
|
1631
1634
|
Radio as AriaRadio2
|
|
1632
1635
|
} from "react-aria-components";
|
|
1633
|
-
import { jsx as
|
|
1636
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1634
1637
|
var ToggleButtonGroupContext = createContext3({
|
|
1635
1638
|
size: "md"
|
|
1636
1639
|
});
|
|
@@ -1650,13 +1653,13 @@ function ToggleButtonGroup({
|
|
|
1650
1653
|
children,
|
|
1651
1654
|
...props
|
|
1652
1655
|
}) {
|
|
1653
|
-
return /* @__PURE__ */
|
|
1656
|
+
return /* @__PURE__ */ jsx26(ToggleButtonGroupContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx26(
|
|
1654
1657
|
AriaRadioGroup2,
|
|
1655
1658
|
{
|
|
1656
1659
|
...props,
|
|
1657
1660
|
orientation: "horizontal",
|
|
1658
1661
|
className: twMerge5(
|
|
1659
|
-
"inline-flex items-center rounded-
|
|
1662
|
+
"inline-flex items-center rounded-lg border border-(--color-border-default) bg-(--color-surface-muted) p-0.5 gap-0.5",
|
|
1660
1663
|
className
|
|
1661
1664
|
),
|
|
1662
1665
|
children
|
|
@@ -1670,24 +1673,24 @@ function ToggleButtonGroupItem({
|
|
|
1670
1673
|
...props
|
|
1671
1674
|
}) {
|
|
1672
1675
|
const { size } = useContext3(ToggleButtonGroupContext);
|
|
1673
|
-
return /* @__PURE__ */
|
|
1676
|
+
return /* @__PURE__ */ jsx26(
|
|
1674
1677
|
AriaRadio2,
|
|
1675
1678
|
{
|
|
1676
1679
|
...props,
|
|
1677
1680
|
className: ({ isSelected, isHovered, isPressed, isDisabled }) => twMerge5(
|
|
1678
1681
|
// Base layout
|
|
1679
1682
|
"inline-flex items-center justify-center",
|
|
1680
|
-
"rounded-
|
|
1681
|
-
"font-
|
|
1683
|
+
"rounded-md",
|
|
1684
|
+
"font-medium",
|
|
1682
1685
|
"outline-none transition-colors cursor-pointer",
|
|
1683
1686
|
// Focus ring
|
|
1684
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
1687
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-1",
|
|
1685
1688
|
// Disabled
|
|
1686
1689
|
isDisabled && "opacity-50 pointer-events-none",
|
|
1687
1690
|
// Size
|
|
1688
1691
|
isIconOnly ? iconOnlySizeStyles[size] : sizeStyles5[size],
|
|
1689
1692
|
// Selected state
|
|
1690
|
-
isSelected ? "bg-
|
|
1693
|
+
isSelected ? "bg-(--color-surface-default) text-(--color-text-primary) shadow-sm font-semibold" : isPressed ? "bg-(--color-surface-subtle) text-(--color-text-primary)" : isHovered ? "bg-(--color-surface-subtle) text-(--color-text-primary)" : "bg-transparent text-(--color-text-secondary)",
|
|
1691
1694
|
className
|
|
1692
1695
|
),
|
|
1693
1696
|
children
|
|
@@ -1702,10 +1705,10 @@ import {
|
|
|
1702
1705
|
MenuItem as AriaMenuItem,
|
|
1703
1706
|
Popover as Popover2
|
|
1704
1707
|
} from "react-aria-components";
|
|
1705
|
-
import { jsx as
|
|
1708
|
+
import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1706
1709
|
var popoverStyles = [
|
|
1707
|
-
"bg-
|
|
1708
|
-
"shadow-lg border border-
|
|
1710
|
+
"bg-(--color-surface-default) rounded-md",
|
|
1711
|
+
"shadow-lg border border-(--color-border-default)",
|
|
1709
1712
|
"py-1 min-w-48",
|
|
1710
1713
|
"entering:animate-in entering:fade-in entering:zoom-in-95",
|
|
1711
1714
|
"exiting:animate-out exiting:fade-out exiting:zoom-out-95"
|
|
@@ -1724,11 +1727,11 @@ function Menu({
|
|
|
1724
1727
|
const selectionProps = selectionMode && selectionMode !== "none" ? { selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange } : {};
|
|
1725
1728
|
return /* @__PURE__ */ jsxs18(MenuTrigger, { children: [
|
|
1726
1729
|
children,
|
|
1727
|
-
/* @__PURE__ */
|
|
1730
|
+
/* @__PURE__ */ jsx27(
|
|
1728
1731
|
Popover2,
|
|
1729
1732
|
{
|
|
1730
1733
|
className: [popoverStyles, className].filter(Boolean).join(" "),
|
|
1731
|
-
children: items ? /* @__PURE__ */
|
|
1734
|
+
children: items ? /* @__PURE__ */ jsx27(
|
|
1732
1735
|
AriaMenu,
|
|
1733
1736
|
{
|
|
1734
1737
|
items,
|
|
@@ -1749,20 +1752,20 @@ function Menu({
|
|
|
1749
1752
|
className: [
|
|
1750
1753
|
"flex items-center gap-2 px-3 py-2 text-sm outline-none cursor-default",
|
|
1751
1754
|
"transition-colors",
|
|
1752
|
-
"focus:bg-
|
|
1753
|
-
"hover:bg-
|
|
1755
|
+
"focus:bg-(--color-surface-muted)",
|
|
1756
|
+
"hover:bg-(--color-surface-muted)",
|
|
1754
1757
|
"disabled:opacity-50 disabled:pointer-events-none",
|
|
1755
|
-
item.isDanger ? "text-
|
|
1758
|
+
item.isDanger ? "text-(--color-text-danger)" : "text-(--color-text-primary)"
|
|
1756
1759
|
].filter(Boolean).join(" "),
|
|
1757
1760
|
children: [
|
|
1758
|
-
item.icon && /* @__PURE__ */
|
|
1759
|
-
/* @__PURE__ */
|
|
1760
|
-
item.endContent && /* @__PURE__ */
|
|
1761
|
+
item.icon && /* @__PURE__ */ jsx27(Icon, { icon: item.icon, size: "sm" }),
|
|
1762
|
+
/* @__PURE__ */ jsx27("span", { className: "flex-1", children: item.label }),
|
|
1763
|
+
item.endContent && /* @__PURE__ */ jsx27("span", { className: "ml-auto flex items-center", children: item.endContent })
|
|
1761
1764
|
]
|
|
1762
1765
|
}
|
|
1763
1766
|
)
|
|
1764
1767
|
}
|
|
1765
|
-
) : /* @__PURE__ */
|
|
1768
|
+
) : /* @__PURE__ */ jsx27(
|
|
1766
1769
|
AriaMenu,
|
|
1767
1770
|
{
|
|
1768
1771
|
onAction: (key) => onAction?.(key),
|
|
@@ -1778,7 +1781,7 @@ function Menu({
|
|
|
1778
1781
|
|
|
1779
1782
|
// src/components/Menu/MenuItem.tsx
|
|
1780
1783
|
import { MenuItem as AriaMenuItem2 } from "react-aria-components";
|
|
1781
|
-
import { jsx as
|
|
1784
|
+
import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1782
1785
|
function MenuItem({
|
|
1783
1786
|
id,
|
|
1784
1787
|
children,
|
|
@@ -1804,16 +1807,16 @@ function MenuItem({
|
|
|
1804
1807
|
className: [
|
|
1805
1808
|
"flex items-center gap-2 px-3 py-2 text-sm outline-none cursor-default",
|
|
1806
1809
|
"transition-colors",
|
|
1807
|
-
"focus:bg-
|
|
1808
|
-
"hover:bg-
|
|
1810
|
+
"focus:bg-(--color-surface-muted)",
|
|
1811
|
+
"hover:bg-(--color-surface-muted)",
|
|
1809
1812
|
"disabled:opacity-50 disabled:pointer-events-none",
|
|
1810
|
-
isDanger ? "text-
|
|
1813
|
+
isDanger ? "text-(--color-text-danger)" : "text-(--color-text-primary)",
|
|
1811
1814
|
className
|
|
1812
1815
|
].filter(Boolean).join(" "),
|
|
1813
1816
|
children: [
|
|
1814
|
-
icon && /* @__PURE__ */
|
|
1815
|
-
/* @__PURE__ */
|
|
1816
|
-
endContent && /* @__PURE__ */
|
|
1817
|
+
icon && /* @__PURE__ */ jsx28(Icon, { icon, size: "sm" }),
|
|
1818
|
+
/* @__PURE__ */ jsx28("span", { className: "flex-1", children }),
|
|
1819
|
+
endContent && /* @__PURE__ */ jsx28("span", { className: "ml-auto flex items-center", children: endContent })
|
|
1817
1820
|
]
|
|
1818
1821
|
}
|
|
1819
1822
|
);
|
|
@@ -1822,7 +1825,7 @@ function MenuItem({
|
|
|
1822
1825
|
// src/components/Menu/MenuCheckboxItem.tsx
|
|
1823
1826
|
import { MenuItem as AriaMenuItem3 } from "react-aria-components";
|
|
1824
1827
|
import { Check as Check2 } from "lucide-react";
|
|
1825
|
-
import { Fragment as Fragment7, jsx as
|
|
1828
|
+
import { Fragment as Fragment7, jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1826
1829
|
function MenuCheckboxItem({
|
|
1827
1830
|
id,
|
|
1828
1831
|
children,
|
|
@@ -1830,7 +1833,7 @@ function MenuCheckboxItem({
|
|
|
1830
1833
|
isDisabled,
|
|
1831
1834
|
className
|
|
1832
1835
|
}) {
|
|
1833
|
-
return /* @__PURE__ */
|
|
1836
|
+
return /* @__PURE__ */ jsx29(
|
|
1834
1837
|
AriaMenuItem3,
|
|
1835
1838
|
{
|
|
1836
1839
|
id,
|
|
@@ -1839,16 +1842,16 @@ function MenuCheckboxItem({
|
|
|
1839
1842
|
className: ({ isSelected }) => [
|
|
1840
1843
|
"flex items-center gap-2 px-3 py-2 text-sm outline-none cursor-default",
|
|
1841
1844
|
"transition-colors",
|
|
1842
|
-
"focus:bg-
|
|
1843
|
-
"hover:bg-
|
|
1845
|
+
"focus:bg-(--color-surface-muted)",
|
|
1846
|
+
"hover:bg-(--color-surface-muted)",
|
|
1844
1847
|
"disabled:opacity-50 disabled:pointer-events-none",
|
|
1845
|
-
"text-
|
|
1846
|
-
isSelected ? "font-
|
|
1848
|
+
"text-(--color-text-primary)",
|
|
1849
|
+
isSelected ? "font-medium" : "",
|
|
1847
1850
|
className
|
|
1848
1851
|
].filter(Boolean).join(" "),
|
|
1849
1852
|
children: ({ isSelected }) => /* @__PURE__ */ jsxs20(Fragment7, { children: [
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ jsx29("span", { className: "flex items-center justify-center w-4 h-4 shrink-0", children: isSelected && /* @__PURE__ */ jsx29(Check2, { size: 14, className: "text-(--color-action-primary)", "aria-hidden": "true" }) }),
|
|
1854
|
+
/* @__PURE__ */ jsx29("span", { className: "flex-1", children })
|
|
1852
1855
|
] })
|
|
1853
1856
|
}
|
|
1854
1857
|
);
|
|
@@ -1859,7 +1862,7 @@ import {
|
|
|
1859
1862
|
MenuSection as AriaMenuSection,
|
|
1860
1863
|
Header
|
|
1861
1864
|
} from "react-aria-components";
|
|
1862
|
-
import { jsx as
|
|
1865
|
+
import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1863
1866
|
function MenuSection({
|
|
1864
1867
|
header,
|
|
1865
1868
|
children,
|
|
@@ -1867,13 +1870,13 @@ function MenuSection({
|
|
|
1867
1870
|
className
|
|
1868
1871
|
}) {
|
|
1869
1872
|
return /* @__PURE__ */ jsxs21(AriaMenuSection, { className, "aria-label": ariaLabel, children: [
|
|
1870
|
-
header && /* @__PURE__ */
|
|
1873
|
+
header && /* @__PURE__ */ jsx30(
|
|
1871
1874
|
Header,
|
|
1872
1875
|
{
|
|
1873
1876
|
className: [
|
|
1874
1877
|
"px-3 py-1.5",
|
|
1875
|
-
"text-
|
|
1876
|
-
"text-
|
|
1878
|
+
"text-xs font-semibold",
|
|
1879
|
+
"text-(--color-text-secondary)",
|
|
1877
1880
|
"uppercase tracking-wider",
|
|
1878
1881
|
"select-none"
|
|
1879
1882
|
].join(" "),
|
|
@@ -1886,20 +1889,20 @@ function MenuSection({
|
|
|
1886
1889
|
|
|
1887
1890
|
// src/components/Menu/MenuHeader.tsx
|
|
1888
1891
|
import { Header as Header2 } from "react-aria-components";
|
|
1889
|
-
import { jsx as
|
|
1892
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1890
1893
|
function MenuHeader({ children, className }) {
|
|
1891
|
-
return /* @__PURE__ */
|
|
1894
|
+
return /* @__PURE__ */ jsx31(Header2, { className, children });
|
|
1892
1895
|
}
|
|
1893
1896
|
|
|
1894
1897
|
// src/components/Menu/MenuSeparator.tsx
|
|
1895
1898
|
import { Separator } from "react-aria-components";
|
|
1896
|
-
import { jsx as
|
|
1899
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1897
1900
|
function MenuSeparator({ className }) {
|
|
1898
|
-
return /* @__PURE__ */
|
|
1901
|
+
return /* @__PURE__ */ jsx32(
|
|
1899
1902
|
Separator,
|
|
1900
1903
|
{
|
|
1901
1904
|
className: [
|
|
1902
|
-
"border-t border-
|
|
1905
|
+
"border-t border-(--color-border-default) my-1",
|
|
1903
1906
|
className
|
|
1904
1907
|
].filter(Boolean).join(" ")
|
|
1905
1908
|
}
|
|
@@ -1913,17 +1916,17 @@ import {
|
|
|
1913
1916
|
Dialog as AriaDialog2,
|
|
1914
1917
|
Button as AriaButton3
|
|
1915
1918
|
} from "react-aria-components";
|
|
1916
|
-
import { Fragment as Fragment8, jsx as
|
|
1919
|
+
import { Fragment as Fragment8, jsx as jsx33 } from "react/jsx-runtime";
|
|
1917
1920
|
function Popover3({ children, isOpen, onOpenChange }) {
|
|
1918
|
-
return /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ jsx33(DialogTrigger, { isOpen, onOpenChange, children });
|
|
1919
1922
|
}
|
|
1920
1923
|
function PopoverTrigger({ children, className }) {
|
|
1921
|
-
return /* @__PURE__ */
|
|
1924
|
+
return /* @__PURE__ */ jsx33(
|
|
1922
1925
|
AriaButton3,
|
|
1923
1926
|
{
|
|
1924
1927
|
className: [
|
|
1925
1928
|
"inline-flex items-center bg-transparent border-none p-0 outline-none cursor-pointer",
|
|
1926
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
1929
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:rounded-sm",
|
|
1927
1930
|
className
|
|
1928
1931
|
].filter(Boolean).join(" "),
|
|
1929
1932
|
children
|
|
@@ -1936,15 +1939,15 @@ function PopoverContent({
|
|
|
1936
1939
|
className,
|
|
1937
1940
|
children
|
|
1938
1941
|
}) {
|
|
1939
|
-
return /* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ jsx33(
|
|
1940
1943
|
AriaPopover,
|
|
1941
1944
|
{
|
|
1942
1945
|
placement,
|
|
1943
1946
|
offset: offsetPx,
|
|
1944
1947
|
className: [
|
|
1945
1948
|
"z-50",
|
|
1946
|
-
"bg-
|
|
1947
|
-
"rounded-
|
|
1949
|
+
"bg-(--color-surface-default) border border-(--color-border-default)",
|
|
1950
|
+
"rounded-md shadow-lg",
|
|
1948
1951
|
"entering:animate-in entering:fade-in entering:duration-150",
|
|
1949
1952
|
"exiting:animate-out exiting:fade-out exiting:duration-100",
|
|
1950
1953
|
"entering:placement-top:slide-in-from-bottom-1",
|
|
@@ -1953,7 +1956,7 @@ function PopoverContent({
|
|
|
1953
1956
|
"entering:placement-right:slide-in-from-left-1",
|
|
1954
1957
|
className
|
|
1955
1958
|
].filter(Boolean).join(" "),
|
|
1956
|
-
children: /* @__PURE__ */
|
|
1959
|
+
children: /* @__PURE__ */ jsx33(AriaDialog2, { className: "outline-none", children: ({ close }) => /* @__PURE__ */ jsx33(Fragment8, { children: typeof children === "function" ? children({ close }) : children }) })
|
|
1957
1960
|
}
|
|
1958
1961
|
);
|
|
1959
1962
|
}
|
|
@@ -1967,7 +1970,7 @@ import {
|
|
|
1967
1970
|
Tab as AriaTab,
|
|
1968
1971
|
TabPanel as AriaTabPanel
|
|
1969
1972
|
} from "react-aria-components";
|
|
1970
|
-
import { jsx as
|
|
1973
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1971
1974
|
var TabsContext = createContext4({
|
|
1972
1975
|
variant: "underline",
|
|
1973
1976
|
size: "md"
|
|
@@ -1985,7 +1988,7 @@ function Tabs({
|
|
|
1985
1988
|
children,
|
|
1986
1989
|
...props
|
|
1987
1990
|
}) {
|
|
1988
|
-
return /* @__PURE__ */
|
|
1991
|
+
return /* @__PURE__ */ jsx34(TabsContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx34(
|
|
1989
1992
|
AriaTabs,
|
|
1990
1993
|
{
|
|
1991
1994
|
...props,
|
|
@@ -2003,9 +2006,9 @@ function TabList({
|
|
|
2003
2006
|
...props
|
|
2004
2007
|
}) {
|
|
2005
2008
|
const { variant } = useContext4(TabsContext);
|
|
2006
|
-
const baseStyles = variant === "unstyled" ? "flex items-center" : variant === "underline" ? "flex items-center border-b border-
|
|
2007
|
-
const verticalStyles = variant === "unstyled" ? "flex-col" : variant === "underline" ? "flex-col border-b-0 border-r border-
|
|
2008
|
-
return /* @__PURE__ */
|
|
2009
|
+
const baseStyles = variant === "unstyled" ? "flex items-center" : variant === "underline" ? "flex items-center border-b border-(--color-border-default)" : "inline-flex items-center bg-(--color-surface-muted) rounded-lg p-1 gap-1";
|
|
2010
|
+
const verticalStyles = variant === "unstyled" ? "flex-col" : variant === "underline" ? "flex-col border-b-0 border-r border-(--color-border-default)" : "flex-col";
|
|
2011
|
+
return /* @__PURE__ */ jsx34(
|
|
2009
2012
|
AriaTabList,
|
|
2010
2013
|
{
|
|
2011
2014
|
...props,
|
|
@@ -2019,7 +2022,7 @@ function TabList({
|
|
|
2019
2022
|
}
|
|
2020
2023
|
function Tab({ className, ...props }) {
|
|
2021
2024
|
const { variant, size } = useContext4(TabsContext);
|
|
2022
|
-
return /* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ jsx34(
|
|
2023
2026
|
AriaTab,
|
|
2024
2027
|
{
|
|
2025
2028
|
...props,
|
|
@@ -2027,7 +2030,7 @@ function Tab({ className, ...props }) {
|
|
|
2027
2030
|
if (variant === "unstyled") {
|
|
2028
2031
|
return twMerge6(
|
|
2029
2032
|
"cursor-pointer outline-none",
|
|
2030
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
2033
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2",
|
|
2031
2034
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
2032
2035
|
className
|
|
2033
2036
|
);
|
|
@@ -2035,9 +2038,9 @@ function Tab({ className, ...props }) {
|
|
|
2035
2038
|
return twMerge6(
|
|
2036
2039
|
// Base
|
|
2037
2040
|
"cursor-pointer outline-none transition-colors",
|
|
2038
|
-
"font-
|
|
2041
|
+
"font-medium",
|
|
2039
2042
|
// Focus ring
|
|
2040
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
2043
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2",
|
|
2041
2044
|
// Disabled
|
|
2042
2045
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
2043
2046
|
// Size
|
|
@@ -2058,25 +2061,25 @@ function getTabVariantStyles(variant, state) {
|
|
|
2058
2061
|
if (variant === "underline") {
|
|
2059
2062
|
return [
|
|
2060
2063
|
// Shape
|
|
2061
|
-
"relative rounded-t-
|
|
2064
|
+
"relative rounded-t-(--border-radius-sm)",
|
|
2062
2065
|
// Color states
|
|
2063
2066
|
state.isSelected ? [
|
|
2064
|
-
"text-
|
|
2067
|
+
"text-teal-700 font-semibold",
|
|
2065
2068
|
// Bottom indicator via pseudo-element
|
|
2066
|
-
"after:absolute after:bottom-[-1px] after:left-0 after:right-0 after:h-0.5 after:bg-
|
|
2067
|
-
].join(" ") : state.isPressed ? "text-
|
|
2069
|
+
"after:absolute after:bottom-[-1px] after:left-0 after:right-0 after:h-0.5 after:bg-teal-600"
|
|
2070
|
+
].join(" ") : state.isPressed ? "text-(--color-text-primary) bg-(--color-surface-muted)" : state.isHovered ? "text-(--color-text-primary) bg-(--color-surface-subtle)" : "text-(--color-text-secondary) bg-transparent"
|
|
2068
2071
|
];
|
|
2069
2072
|
}
|
|
2070
2073
|
return [
|
|
2071
2074
|
// Shape
|
|
2072
|
-
"rounded-
|
|
2075
|
+
"rounded-md",
|
|
2073
2076
|
// Color states
|
|
2074
|
-
state.isSelected ? "text-
|
|
2077
|
+
state.isSelected ? "text-(--color-text-primary) font-semibold bg-(--color-surface-default) shadow-sm" : state.isPressed ? "text-(--color-text-primary) bg-(--color-surface-subtle) shadow-none" : state.isHovered ? "text-(--color-text-primary) bg-(--color-surface-pressed)" : "text-(--color-text-secondary) bg-transparent"
|
|
2075
2078
|
];
|
|
2076
2079
|
}
|
|
2077
2080
|
function TabPanel({ className, ...props }) {
|
|
2078
2081
|
const { variant } = useContext4(TabsContext);
|
|
2079
|
-
return /* @__PURE__ */
|
|
2082
|
+
return /* @__PURE__ */ jsx34(
|
|
2080
2083
|
AriaTabPanel,
|
|
2081
2084
|
{
|
|
2082
2085
|
...props,
|
|
@@ -2101,7 +2104,7 @@ import { useCallback as useCallback2, useImperativeHandle, useRef as useRef2, us
|
|
|
2101
2104
|
import { Tree as ArboristTree } from "react-arborist";
|
|
2102
2105
|
import { ChevronRight as ChevronRight2, Folder, File } from "lucide-react";
|
|
2103
2106
|
import { Check as Check3 } from "lucide-react";
|
|
2104
|
-
import { jsx as
|
|
2107
|
+
import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2105
2108
|
var rowHeightMap = {
|
|
2106
2109
|
compact: 32,
|
|
2107
2110
|
comfortable: 40
|
|
@@ -2116,7 +2119,8 @@ function NodeRenderer({
|
|
|
2116
2119
|
selectionMode,
|
|
2117
2120
|
size,
|
|
2118
2121
|
onHover,
|
|
2119
|
-
onHoverEnd
|
|
2122
|
+
onHoverEnd,
|
|
2123
|
+
onToggle
|
|
2120
2124
|
}) {
|
|
2121
2125
|
const data = node.data;
|
|
2122
2126
|
const isCheckbox = selectionMode === "checkbox";
|
|
@@ -2132,12 +2136,12 @@ function NodeRenderer({
|
|
|
2132
2136
|
className: [
|
|
2133
2137
|
"relative flex items-center cursor-default select-none",
|
|
2134
2138
|
isCompact ? "gap-0.5 px-2" : "gap-1 px-3",
|
|
2135
|
-
"text-
|
|
2139
|
+
"text-sm text-(--color-text-primary)",
|
|
2136
2140
|
"outline-none",
|
|
2137
2141
|
// Full-width background via pseudo-element
|
|
2138
2142
|
"before:absolute before:inset-y-0 before:left-[-100vw] before:right-0 before:-z-10 before:transition-colors",
|
|
2139
|
-
isSelected ? "before:bg-
|
|
2140
|
-
node.isFocused ? "outline-2 outline-
|
|
2143
|
+
isSelected ? "before:bg-(--color-surface-selected) hover:before:bg-(--color-surface-selected-hover) border-l-2 border-l-(--color-brand-accent)" : "hover:before:bg-(--color-surface-hover)",
|
|
2144
|
+
node.isFocused ? "outline-2 outline-(--color-border-focus) outline-offset-[-2px]" : ""
|
|
2141
2145
|
].filter(Boolean).join(" "),
|
|
2142
2146
|
role: "treeitem",
|
|
2143
2147
|
"aria-selected": isCheckbox ? isChecked : node.isSelected,
|
|
@@ -2159,25 +2163,26 @@ function NodeRenderer({
|
|
|
2159
2163
|
}
|
|
2160
2164
|
},
|
|
2161
2165
|
children: [
|
|
2162
|
-
/* @__PURE__ */
|
|
2166
|
+
/* @__PURE__ */ jsx35(
|
|
2163
2167
|
"button",
|
|
2164
2168
|
{
|
|
2165
2169
|
type: "button",
|
|
2166
2170
|
className: [
|
|
2167
2171
|
"flex items-center justify-center w-6 h-6 shrink-0",
|
|
2168
|
-
"rounded-
|
|
2169
|
-
"text-
|
|
2170
|
-
"hover:text-
|
|
2172
|
+
"rounded-sm",
|
|
2173
|
+
"text-(--color-text-secondary)",
|
|
2174
|
+
"hover:text-(--color-text-primary)",
|
|
2171
2175
|
"transition-transform",
|
|
2172
2176
|
node.isInternal ? "visible" : "invisible"
|
|
2173
2177
|
].filter(Boolean).join(" "),
|
|
2174
2178
|
onClick: (e) => {
|
|
2175
2179
|
e.stopPropagation();
|
|
2176
2180
|
node.toggle();
|
|
2181
|
+
onToggle?.(node.data);
|
|
2177
2182
|
},
|
|
2178
2183
|
tabIndex: -1,
|
|
2179
2184
|
"aria-label": node.isOpen ? "Collapse" : "Expand",
|
|
2180
|
-
children: /* @__PURE__ */
|
|
2185
|
+
children: /* @__PURE__ */ jsx35(
|
|
2181
2186
|
ChevronRight2,
|
|
2182
2187
|
{
|
|
2183
2188
|
size: 14,
|
|
@@ -2189,35 +2194,35 @@ function NodeRenderer({
|
|
|
2189
2194
|
)
|
|
2190
2195
|
}
|
|
2191
2196
|
),
|
|
2192
|
-
isCheckbox && /* @__PURE__ */
|
|
2197
|
+
isCheckbox && /* @__PURE__ */ jsx35(
|
|
2193
2198
|
"div",
|
|
2194
2199
|
{
|
|
2195
2200
|
className: [
|
|
2196
2201
|
"flex items-center justify-center w-5 h-5 shrink-0",
|
|
2197
|
-
"rounded-
|
|
2198
|
-
isChecked ? "bg-
|
|
2202
|
+
"rounded-sm border transition-colors",
|
|
2203
|
+
isChecked ? "bg-(--color-action-primary) border-(--color-action-primary)" : "bg-(--color-surface-default) border-(--color-border-default) hover:border-(--color-border-strong)"
|
|
2199
2204
|
].join(" "),
|
|
2200
2205
|
role: "checkbox",
|
|
2201
2206
|
"aria-checked": isChecked,
|
|
2202
2207
|
"aria-label": `Select ${data.name}`,
|
|
2203
|
-
children: isChecked && /* @__PURE__ */
|
|
2208
|
+
children: isChecked && /* @__PURE__ */ jsx35(
|
|
2204
2209
|
Check3,
|
|
2205
2210
|
{
|
|
2206
|
-
className: "w-3 h-3 text-
|
|
2211
|
+
className: "w-3 h-3 text-(--color-text-inverse)",
|
|
2207
2212
|
strokeWidth: 3
|
|
2208
2213
|
}
|
|
2209
2214
|
)
|
|
2210
2215
|
}
|
|
2211
2216
|
),
|
|
2212
|
-
/* @__PURE__ */
|
|
2217
|
+
/* @__PURE__ */ jsx35(
|
|
2213
2218
|
IconComponent,
|
|
2214
2219
|
{
|
|
2215
2220
|
size: 16,
|
|
2216
|
-
className: "shrink-0 text-
|
|
2221
|
+
className: "shrink-0 text-(--color-text-secondary)",
|
|
2217
2222
|
"aria-hidden": "true"
|
|
2218
2223
|
}
|
|
2219
2224
|
),
|
|
2220
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ jsx35("span", { className: "truncate", children: data.name })
|
|
2221
2226
|
]
|
|
2222
2227
|
}
|
|
2223
2228
|
);
|
|
@@ -2230,6 +2235,7 @@ function Tree({
|
|
|
2230
2235
|
selectedIds,
|
|
2231
2236
|
onSelectionChange,
|
|
2232
2237
|
onActivate,
|
|
2238
|
+
onToggle,
|
|
2233
2239
|
onHover,
|
|
2234
2240
|
onHoverEnd,
|
|
2235
2241
|
openByDefault = false,
|
|
@@ -2283,13 +2289,13 @@ function Tree({
|
|
|
2283
2289
|
);
|
|
2284
2290
|
const arboristSearchMatch = searchMatch ? (node, term) => searchMatch(node.data, term) : void 0;
|
|
2285
2291
|
const selectionProp = selectionMode === "single" && selectedIds && selectedIds.size > 0 ? [...selectedIds][0] : void 0;
|
|
2286
|
-
return /* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ jsx35(
|
|
2287
2293
|
"div",
|
|
2288
2294
|
{
|
|
2289
2295
|
role: "tree",
|
|
2290
2296
|
"aria-label": ariaLabel,
|
|
2291
2297
|
className: ["outline-none overflow-hidden", className].filter(Boolean).join(" "),
|
|
2292
|
-
children: /* @__PURE__ */
|
|
2298
|
+
children: /* @__PURE__ */ jsx35(
|
|
2293
2299
|
ArboristTree,
|
|
2294
2300
|
{
|
|
2295
2301
|
ref: internalRef,
|
|
@@ -2308,7 +2314,7 @@ function Tree({
|
|
|
2308
2314
|
onSelect: handleSelect,
|
|
2309
2315
|
onActivate: handleActivate,
|
|
2310
2316
|
disableEdit: true,
|
|
2311
|
-
children: (props) => /* @__PURE__ */
|
|
2317
|
+
children: (props) => /* @__PURE__ */ jsx35(
|
|
2312
2318
|
NodeRenderer,
|
|
2313
2319
|
{
|
|
2314
2320
|
...props,
|
|
@@ -2317,7 +2323,8 @@ function Tree({
|
|
|
2317
2323
|
selectionMode,
|
|
2318
2324
|
size,
|
|
2319
2325
|
onHover,
|
|
2320
|
-
onHoverEnd
|
|
2326
|
+
onHoverEnd,
|
|
2327
|
+
onToggle
|
|
2321
2328
|
}
|
|
2322
2329
|
)
|
|
2323
2330
|
}
|
|
@@ -2333,7 +2340,7 @@ import {
|
|
|
2333
2340
|
ToggleButtonGroup as AriaToggleButtonGroup,
|
|
2334
2341
|
ToggleButton as AriaToggleButton2
|
|
2335
2342
|
} from "react-aria-components";
|
|
2336
|
-
import { jsx as
|
|
2343
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2337
2344
|
var SegmentedControlContext = createContext5({
|
|
2338
2345
|
size: "md"
|
|
2339
2346
|
});
|
|
@@ -2353,7 +2360,7 @@ function SegmentedControl({
|
|
|
2353
2360
|
...props
|
|
2354
2361
|
}) {
|
|
2355
2362
|
const isNoneMode = selectionMode === "none";
|
|
2356
|
-
return /* @__PURE__ */
|
|
2363
|
+
return /* @__PURE__ */ jsx36(SegmentedControlContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx36(
|
|
2357
2364
|
AriaToggleButtonGroup,
|
|
2358
2365
|
{
|
|
2359
2366
|
...props,
|
|
@@ -2362,7 +2369,7 @@ function SegmentedControl({
|
|
|
2362
2369
|
defaultSelectedKeys: isNoneMode ? void 0 : defaultSelectedKeys,
|
|
2363
2370
|
onSelectionChange: isNoneMode ? void 0 : onSelectionChange,
|
|
2364
2371
|
className: twMerge7(
|
|
2365
|
-
"inline-flex items-center rounded-
|
|
2372
|
+
"inline-flex items-center rounded-lg border border-(--color-border-default) bg-(--color-surface-muted) p-0.5 gap-0.5",
|
|
2366
2373
|
className
|
|
2367
2374
|
),
|
|
2368
2375
|
children
|
|
@@ -2374,24 +2381,24 @@ function SegmentedControlItem({
|
|
|
2374
2381
|
...props
|
|
2375
2382
|
}) {
|
|
2376
2383
|
const { size } = useContext5(SegmentedControlContext);
|
|
2377
|
-
return /* @__PURE__ */
|
|
2384
|
+
return /* @__PURE__ */ jsx36(
|
|
2378
2385
|
AriaToggleButton2,
|
|
2379
2386
|
{
|
|
2380
2387
|
...props,
|
|
2381
2388
|
className: ({ isSelected, isHovered, isPressed, isDisabled }) => twMerge7(
|
|
2382
2389
|
// Base layout
|
|
2383
2390
|
"inline-flex items-center justify-center",
|
|
2384
|
-
"rounded-
|
|
2385
|
-
"font-
|
|
2391
|
+
"rounded-md",
|
|
2392
|
+
"font-medium",
|
|
2386
2393
|
"outline-none transition-colors cursor-pointer",
|
|
2387
2394
|
// Focus ring
|
|
2388
|
-
"focus-visible:ring-2 focus-visible:ring-
|
|
2395
|
+
"focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-1",
|
|
2389
2396
|
// Disabled
|
|
2390
2397
|
isDisabled && "opacity-50 pointer-events-none",
|
|
2391
2398
|
// Size
|
|
2392
2399
|
sizeStyles7[size],
|
|
2393
2400
|
// Selected state
|
|
2394
|
-
isSelected ? "bg-
|
|
2401
|
+
isSelected ? "bg-(--color-surface-default) text-(--color-text-primary) shadow-sm font-semibold" : isPressed ? "bg-(--color-surface-subtle) text-(--color-text-primary)" : isHovered ? "bg-(--color-surface-subtle) text-(--color-text-primary)" : "bg-transparent text-(--color-text-secondary)",
|
|
2395
2402
|
className
|
|
2396
2403
|
)
|
|
2397
2404
|
}
|
|
@@ -2408,7 +2415,7 @@ import {
|
|
|
2408
2415
|
Info as Info2,
|
|
2409
2416
|
Microscope
|
|
2410
2417
|
} from "lucide-react";
|
|
2411
|
-
import { Fragment as Fragment9, jsx as
|
|
2418
|
+
import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2412
2419
|
function getFileIcon(type, extension) {
|
|
2413
2420
|
if (type === "directory") return Folder2;
|
|
2414
2421
|
const ext = (extension ?? "").toLowerCase();
|
|
@@ -2434,11 +2441,11 @@ function FileIcon({
|
|
|
2434
2441
|
size = 16
|
|
2435
2442
|
}) {
|
|
2436
2443
|
const IconComponent = getFileIcon(type, extension);
|
|
2437
|
-
return /* @__PURE__ */
|
|
2444
|
+
return /* @__PURE__ */ jsx37(
|
|
2438
2445
|
IconComponent,
|
|
2439
2446
|
{
|
|
2440
2447
|
size,
|
|
2441
|
-
className: "shrink-0 text-
|
|
2448
|
+
className: "shrink-0 text-(--color-text-secondary)"
|
|
2442
2449
|
}
|
|
2443
2450
|
);
|
|
2444
2451
|
}
|
|
@@ -2455,11 +2462,11 @@ function FileCard({
|
|
|
2455
2462
|
className
|
|
2456
2463
|
}) {
|
|
2457
2464
|
const isInteractive = !!href || !!onPress;
|
|
2458
|
-
const radius = compact ? "rounded-
|
|
2465
|
+
const radius = compact ? "rounded-md" : "rounded-lg";
|
|
2459
2466
|
const IconComponent = getFileIcon(type, extension);
|
|
2460
2467
|
const iconSize = compact ? 24 : 32;
|
|
2461
|
-
const iconColor = type === "directory" ? "text-
|
|
2462
|
-
const thumbnailClass = compact ? "aspect-square rounded-t-
|
|
2468
|
+
const iconColor = type === "directory" ? "text-(--color-text-tertiary)" : "text-(--color-text-secondary)";
|
|
2469
|
+
const thumbnailClass = compact ? "aspect-square rounded-t-(--border-radius-md)" : "aspect-[4/3] rounded-t-(--border-radius-lg)";
|
|
2463
2470
|
const handleInfoClick = useCallback3(
|
|
2464
2471
|
(e) => {
|
|
2465
2472
|
if (isInteractive) {
|
|
@@ -2480,26 +2487,26 @@ function FileCard({
|
|
|
2480
2487
|
[onPress]
|
|
2481
2488
|
);
|
|
2482
2489
|
const cardContent = /* @__PURE__ */ jsxs23(Fragment9, { children: [
|
|
2483
|
-
/* @__PURE__ */
|
|
2490
|
+
/* @__PURE__ */ jsx37(
|
|
2484
2491
|
"div",
|
|
2485
2492
|
{
|
|
2486
|
-
className: `shrink-0 overflow-hidden bg-
|
|
2487
|
-
children: children ? /* @__PURE__ */
|
|
2493
|
+
className: `shrink-0 overflow-hidden bg-neutral-900 ${thumbnailClass}`,
|
|
2494
|
+
children: children ? /* @__PURE__ */ jsx37("div", { className: "h-full w-full overflow-hidden", children }) : /* @__PURE__ */ jsx37("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx37(IconComponent, { size: iconSize, className: iconColor }) })
|
|
2488
2495
|
}
|
|
2489
2496
|
),
|
|
2490
|
-
/* @__PURE__ */
|
|
2497
|
+
/* @__PURE__ */ jsx37(
|
|
2491
2498
|
"div",
|
|
2492
2499
|
{
|
|
2493
2500
|
className: [
|
|
2494
|
-
"flex flex-col border-t border-
|
|
2495
|
-
"bg-
|
|
2496
|
-
compact ? "px-2 py-1.5 rounded-b-
|
|
2501
|
+
"flex flex-col border-t border-(--color-border-default)",
|
|
2502
|
+
"bg-(--color-surface-default)",
|
|
2503
|
+
compact ? "px-2 py-1.5 rounded-b-(--border-radius-md)" : "gap-0.5 px-3 py-2 rounded-b-(--border-radius-lg)"
|
|
2497
2504
|
].join(" "),
|
|
2498
|
-
children: compact ? /* @__PURE__ */
|
|
2505
|
+
children: compact ? /* @__PURE__ */ jsx37("span", { className: "text-xs font-medium text-(--color-text-primary) truncate", children: name }) : /* @__PURE__ */ jsxs23(Fragment9, { children: [
|
|
2499
2506
|
/* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-1.5", children: [
|
|
2500
|
-
/* @__PURE__ */
|
|
2501
|
-
/* @__PURE__ */
|
|
2502
|
-
onInfo && /* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ jsx37(FileIcon, { type, extension, size: 16 }),
|
|
2508
|
+
/* @__PURE__ */ jsx37("span", { className: "min-w-0 flex-1 text-sm font-medium text-(--color-text-primary) truncate", children: name }),
|
|
2509
|
+
onInfo && /* @__PURE__ */ jsx37(
|
|
2503
2510
|
"span",
|
|
2504
2511
|
{
|
|
2505
2512
|
onClick: handleInfoClick,
|
|
@@ -2509,7 +2516,7 @@ function FileCard({
|
|
|
2509
2516
|
}
|
|
2510
2517
|
},
|
|
2511
2518
|
role: "presentation",
|
|
2512
|
-
children: /* @__PURE__ */
|
|
2519
|
+
children: /* @__PURE__ */ jsx37(
|
|
2513
2520
|
IconButton,
|
|
2514
2521
|
{
|
|
2515
2522
|
icon: Info2,
|
|
@@ -2523,7 +2530,7 @@ function FileCard({
|
|
|
2523
2530
|
}
|
|
2524
2531
|
)
|
|
2525
2532
|
] }),
|
|
2526
|
-
size && /* @__PURE__ */
|
|
2533
|
+
size && /* @__PURE__ */ jsx37("span", { className: "text-xs text-(--color-text-secondary) tabular-nums pl-[22px]", children: size })
|
|
2527
2534
|
] })
|
|
2528
2535
|
}
|
|
2529
2536
|
)
|
|
@@ -2531,15 +2538,15 @@ function FileCard({
|
|
|
2531
2538
|
const baseStyles = [
|
|
2532
2539
|
"group flex flex-col overflow-hidden",
|
|
2533
2540
|
radius,
|
|
2534
|
-
"border border-
|
|
2541
|
+
"border border-(--color-border-default)",
|
|
2535
2542
|
"shadow-sm",
|
|
2536
2543
|
"transition-all",
|
|
2537
|
-
isInteractive && "hover:border-
|
|
2538
|
-
isInteractive && "focus-visible:ring-2 focus-visible:ring-
|
|
2544
|
+
isInteractive && "hover:border-(--color-border-focus) hover:shadow-md cursor-pointer",
|
|
2545
|
+
isInteractive && "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
2539
2546
|
className
|
|
2540
2547
|
].filter(Boolean).join(" ");
|
|
2541
2548
|
if (href) {
|
|
2542
|
-
return /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ jsx37(
|
|
2543
2550
|
"a",
|
|
2544
2551
|
{
|
|
2545
2552
|
href,
|
|
@@ -2550,7 +2557,7 @@ function FileCard({
|
|
|
2550
2557
|
);
|
|
2551
2558
|
}
|
|
2552
2559
|
if (onPress) {
|
|
2553
|
-
return /* @__PURE__ */
|
|
2560
|
+
return /* @__PURE__ */ jsx37(
|
|
2554
2561
|
"div",
|
|
2555
2562
|
{
|
|
2556
2563
|
role: "button",
|
|
@@ -2563,7 +2570,7 @@ function FileCard({
|
|
|
2563
2570
|
}
|
|
2564
2571
|
);
|
|
2565
2572
|
}
|
|
2566
|
-
return /* @__PURE__ */
|
|
2573
|
+
return /* @__PURE__ */ jsx37("div", { className: baseStyles, children: cardContent });
|
|
2567
2574
|
}
|
|
2568
2575
|
|
|
2569
2576
|
// src/components/StorageConnectionCard/StorageConnectionCard.tsx
|
|
@@ -2573,7 +2580,7 @@ import { twMerge as twMerge10 } from "tailwind-merge";
|
|
|
2573
2580
|
|
|
2574
2581
|
// src/components/Pill/Pill.tsx
|
|
2575
2582
|
import { twMerge as twMerge8 } from "tailwind-merge";
|
|
2576
|
-
import { jsx as
|
|
2583
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2577
2584
|
var HASH_PALETTE = [
|
|
2578
2585
|
"teal",
|
|
2579
2586
|
// sky
|
|
@@ -2600,22 +2607,22 @@ function pillColorFromName(name) {
|
|
|
2600
2607
|
return HASH_PALETTE[Math.abs(hash) % HASH_PALETTE.length];
|
|
2601
2608
|
}
|
|
2602
2609
|
var colorStyles = {
|
|
2603
|
-
neutral: "bg-
|
|
2604
|
-
purple: "bg-
|
|
2605
|
-
teal: "bg-
|
|
2606
|
-
rose: "bg-
|
|
2607
|
-
slate: "bg-
|
|
2608
|
-
green: "bg-
|
|
2609
|
-
amber: "bg-
|
|
2610
|
+
neutral: "bg-(--color-badge-neutral-bg) text-(--color-badge-neutral-text)",
|
|
2611
|
+
purple: "bg-(--color-badge-purple-bg) text-(--color-badge-purple-text)",
|
|
2612
|
+
teal: "bg-(--color-badge-teal-bg) text-(--color-badge-teal-text)",
|
|
2613
|
+
rose: "bg-(--color-badge-rose-bg) text-(--color-badge-rose-text)",
|
|
2614
|
+
slate: "bg-(--color-badge-slate-bg) text-(--color-badge-slate-text)",
|
|
2615
|
+
green: "bg-(--color-badge-green-bg) text-(--color-badge-green-text)",
|
|
2616
|
+
amber: "bg-(--color-badge-amber-bg) text-(--color-badge-amber-text)"
|
|
2610
2617
|
};
|
|
2611
2618
|
var dotColorStyles = {
|
|
2612
|
-
neutral: "bg-
|
|
2613
|
-
purple: "bg-
|
|
2614
|
-
teal: "bg-
|
|
2615
|
-
rose: "bg-
|
|
2616
|
-
slate: "bg-
|
|
2617
|
-
green: "bg-
|
|
2618
|
-
amber: "bg-
|
|
2619
|
+
neutral: "bg-(--color-badge-neutral-text)",
|
|
2620
|
+
purple: "bg-(--color-badge-purple-text)",
|
|
2621
|
+
teal: "bg-(--color-badge-teal-text)",
|
|
2622
|
+
rose: "bg-(--color-badge-rose-text)",
|
|
2623
|
+
slate: "bg-(--color-badge-slate-text)",
|
|
2624
|
+
green: "bg-(--color-badge-green-text)",
|
|
2625
|
+
amber: "bg-(--color-badge-amber-text)"
|
|
2619
2626
|
};
|
|
2620
2627
|
function resolveColor(color, name) {
|
|
2621
2628
|
if (color && color !== "auto") return color;
|
|
@@ -2624,13 +2631,13 @@ function resolveColor(color, name) {
|
|
|
2624
2631
|
}
|
|
2625
2632
|
function Pill({ children, color, name, className }) {
|
|
2626
2633
|
const resolved = resolveColor(color, name);
|
|
2627
|
-
return /* @__PURE__ */
|
|
2634
|
+
return /* @__PURE__ */ jsx38(
|
|
2628
2635
|
"span",
|
|
2629
2636
|
{
|
|
2630
2637
|
className: twMerge8(
|
|
2631
2638
|
"inline-flex items-center rounded-full",
|
|
2632
2639
|
"px-2 py-0.5",
|
|
2633
|
-
"text-
|
|
2640
|
+
"text-xs font-medium leading-tight",
|
|
2634
2641
|
colorStyles[resolved],
|
|
2635
2642
|
className
|
|
2636
2643
|
),
|
|
@@ -2641,7 +2648,7 @@ function Pill({ children, color, name, className }) {
|
|
|
2641
2648
|
|
|
2642
2649
|
// src/components/Pill/GroupPill.tsx
|
|
2643
2650
|
import { twMerge as twMerge9 } from "tailwind-merge";
|
|
2644
|
-
import { jsx as
|
|
2651
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2645
2652
|
function GroupPill({
|
|
2646
2653
|
path,
|
|
2647
2654
|
visibleCount = 3,
|
|
@@ -2663,7 +2670,7 @@ function GroupPill({
|
|
|
2663
2670
|
children: [
|
|
2664
2671
|
hiddenSegments.map((segment, index) => {
|
|
2665
2672
|
const color = pillColorFromName(segment);
|
|
2666
|
-
return /* @__PURE__ */
|
|
2673
|
+
return /* @__PURE__ */ jsx39(
|
|
2667
2674
|
"span",
|
|
2668
2675
|
{
|
|
2669
2676
|
className: twMerge9(
|
|
@@ -2676,18 +2683,18 @@ function GroupPill({
|
|
|
2676
2683
|
`dot-${index}-${segment}`
|
|
2677
2684
|
);
|
|
2678
2685
|
}),
|
|
2679
|
-
visibleSegments.map((segment, index) => /* @__PURE__ */
|
|
2686
|
+
visibleSegments.map((segment, index) => /* @__PURE__ */ jsx39(Pill, { name: segment, children: segment }, `pill-${index}-${segment}`))
|
|
2680
2687
|
]
|
|
2681
2688
|
}
|
|
2682
2689
|
);
|
|
2683
2690
|
}
|
|
2684
2691
|
|
|
2685
2692
|
// src/components/StorageConnectionCard/StorageConnectionCard.tsx
|
|
2686
|
-
import { Fragment as Fragment10, jsx as
|
|
2693
|
+
import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2687
2694
|
var statusDotStyles = {
|
|
2688
|
-
connected: "bg-
|
|
2689
|
-
error: "border-2 border-
|
|
2690
|
-
loading: "bg-
|
|
2695
|
+
connected: "bg-(--color-status-success)",
|
|
2696
|
+
error: "border-2 border-(--color-status-danger) bg-transparent",
|
|
2697
|
+
loading: "bg-(--color-status-warning) animate-pulse"
|
|
2691
2698
|
};
|
|
2692
2699
|
var providerConfig = {
|
|
2693
2700
|
aws: { label: "AWS", color: "purple" },
|
|
@@ -2699,7 +2706,7 @@ function ProviderBadge({ provider }) {
|
|
|
2699
2706
|
const config = providerConfig[provider.toLowerCase()];
|
|
2700
2707
|
const label = config?.label ?? provider;
|
|
2701
2708
|
const color = config?.color ?? "neutral";
|
|
2702
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ jsx40(Pill, { color, children: label });
|
|
2703
2710
|
}
|
|
2704
2711
|
function PreviewArea({
|
|
2705
2712
|
status = "connected",
|
|
@@ -2707,30 +2714,30 @@ function PreviewArea({
|
|
|
2707
2714
|
children
|
|
2708
2715
|
}) {
|
|
2709
2716
|
if (status === "loading") {
|
|
2710
|
-
return /* @__PURE__ */
|
|
2717
|
+
return /* @__PURE__ */ jsx40("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx40(Spinner, { size: "lg", "aria-label": "Loading connection" }) });
|
|
2711
2718
|
}
|
|
2712
2719
|
if (status === "error") {
|
|
2713
|
-
return /* @__PURE__ */ jsxs25("div", { className: "flex h-full flex-col items-center justify-center gap-2 bg-
|
|
2714
|
-
/* @__PURE__ */
|
|
2720
|
+
return /* @__PURE__ */ jsxs25("div", { className: "flex h-full flex-col items-center justify-center gap-2 bg-(--color-surface-danger) px-4", children: [
|
|
2721
|
+
/* @__PURE__ */ jsx40(
|
|
2715
2722
|
Icon,
|
|
2716
2723
|
{
|
|
2717
2724
|
icon: AlertCircle,
|
|
2718
2725
|
size: "lg",
|
|
2719
|
-
className: "text-
|
|
2726
|
+
className: "text-(--color-text-danger)"
|
|
2720
2727
|
}
|
|
2721
2728
|
),
|
|
2722
|
-
errorMessage && /* @__PURE__ */
|
|
2729
|
+
errorMessage && /* @__PURE__ */ jsx40("p", { className: "text-center text-xs text-(--color-text-danger)", children: errorMessage })
|
|
2723
2730
|
] });
|
|
2724
2731
|
}
|
|
2725
2732
|
if (children) {
|
|
2726
|
-
return /* @__PURE__ */
|
|
2733
|
+
return /* @__PURE__ */ jsx40("div", { className: "h-full w-full overflow-hidden", children });
|
|
2727
2734
|
}
|
|
2728
|
-
return /* @__PURE__ */
|
|
2735
|
+
return /* @__PURE__ */ jsx40("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx40(
|
|
2729
2736
|
Icon,
|
|
2730
2737
|
{
|
|
2731
2738
|
icon: Database,
|
|
2732
2739
|
size: "xl",
|
|
2733
|
-
className: "text-
|
|
2740
|
+
className: "text-(--color-text-secondary)"
|
|
2734
2741
|
}
|
|
2735
2742
|
) });
|
|
2736
2743
|
}
|
|
@@ -2768,10 +2775,10 @@ function StorageConnectionCard({
|
|
|
2768
2775
|
[onPress]
|
|
2769
2776
|
);
|
|
2770
2777
|
const cardContent = /* @__PURE__ */ jsxs25(Fragment10, { children: [
|
|
2771
|
-
/* @__PURE__ */
|
|
2772
|
-
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1.5 border-t border-
|
|
2778
|
+
/* @__PURE__ */ jsx40("div", { className: "aspect-[4/3] bg-neutral-900 overflow-hidden rounded-t-(--border-radius-lg)", children: /* @__PURE__ */ jsx40(PreviewArea, { status, errorMessage, children }) }),
|
|
2779
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1.5 border-t border-(--color-border-default) bg-(--color-surface-default) px-3 py-2.5 rounded-b-(--border-radius-lg)", children: [
|
|
2773
2780
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-start gap-2", children: [
|
|
2774
|
-
status && /* @__PURE__ */
|
|
2781
|
+
status && /* @__PURE__ */ jsx40(
|
|
2775
2782
|
"span",
|
|
2776
2783
|
{
|
|
2777
2784
|
className: twMerge10(
|
|
@@ -2781,8 +2788,8 @@ function StorageConnectionCard({
|
|
|
2781
2788
|
"aria-label": `Status: ${status}`
|
|
2782
2789
|
}
|
|
2783
2790
|
),
|
|
2784
|
-
/* @__PURE__ */
|
|
2785
|
-
onInfo && /* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ jsx40("span", { className: "min-w-0 flex-1 line-clamp-2 text-sm font-medium text-(--color-text-primary)", children: name }),
|
|
2792
|
+
onInfo && /* @__PURE__ */ jsx40(
|
|
2786
2793
|
"span",
|
|
2787
2794
|
{
|
|
2788
2795
|
onClick: handleInfoPress,
|
|
@@ -2792,7 +2799,7 @@ function StorageConnectionCard({
|
|
|
2792
2799
|
}
|
|
2793
2800
|
},
|
|
2794
2801
|
role: "presentation",
|
|
2795
|
-
children: /* @__PURE__ */
|
|
2802
|
+
children: /* @__PURE__ */ jsx40(
|
|
2796
2803
|
IconButton,
|
|
2797
2804
|
{
|
|
2798
2805
|
icon: Info3,
|
|
@@ -2807,9 +2814,9 @@ function StorageConnectionCard({
|
|
|
2807
2814
|
)
|
|
2808
2815
|
] }),
|
|
2809
2816
|
(provider || imageCount != null && (!status || status === "connected")) && /* @__PURE__ */ jsxs25("div", { className: twMerge10("flex items-center gap-2", status && "pl-4"), children: [
|
|
2810
|
-
provider && /* @__PURE__ */
|
|
2811
|
-
provider && region && /* @__PURE__ */
|
|
2812
|
-
imageCount != null && (!status || status === "connected") && /* @__PURE__ */ jsxs25("span", { className: "ml-auto shrink-0 text-xs tabular-nums text-
|
|
2817
|
+
provider && /* @__PURE__ */ jsx40(ProviderBadge, { provider }),
|
|
2818
|
+
provider && region && /* @__PURE__ */ jsx40("span", { className: "shrink-0 text-xs text-(--color-text-secondary)", children: region }),
|
|
2819
|
+
imageCount != null && (!status || status === "connected") && /* @__PURE__ */ jsxs25("span", { className: "ml-auto shrink-0 text-xs tabular-nums text-(--color-text-secondary)", children: [
|
|
2813
2820
|
imageCount,
|
|
2814
2821
|
" ",
|
|
2815
2822
|
imageCount === 1 ? "image" : "images"
|
|
@@ -2818,18 +2825,18 @@ function StorageConnectionCard({
|
|
|
2818
2825
|
] })
|
|
2819
2826
|
] });
|
|
2820
2827
|
const baseStyles = twMerge10(
|
|
2821
|
-
"flex flex-col overflow-hidden rounded-
|
|
2822
|
-
"border border-
|
|
2828
|
+
"flex flex-col overflow-hidden rounded-lg",
|
|
2829
|
+
"border border-(--color-border-default)",
|
|
2823
2830
|
"shadow-sm transition-all",
|
|
2824
|
-
isInteractive && "hover:border-
|
|
2825
|
-
isInteractive && "focus-visible:ring-2 focus-visible:ring-
|
|
2831
|
+
isInteractive && "hover:border-(--color-border-focus) hover:shadow-md cursor-pointer",
|
|
2832
|
+
isInteractive && "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
2826
2833
|
className
|
|
2827
2834
|
);
|
|
2828
2835
|
if (href) {
|
|
2829
|
-
return /* @__PURE__ */
|
|
2836
|
+
return /* @__PURE__ */ jsx40("a", { href, className: twMerge10(baseStyles, "no-underline"), children: cardContent });
|
|
2830
2837
|
}
|
|
2831
2838
|
if (onPress) {
|
|
2832
|
-
return /* @__PURE__ */
|
|
2839
|
+
return /* @__PURE__ */ jsx40(
|
|
2833
2840
|
"div",
|
|
2834
2841
|
{
|
|
2835
2842
|
role: "button",
|
|
@@ -2841,20 +2848,20 @@ function StorageConnectionCard({
|
|
|
2841
2848
|
}
|
|
2842
2849
|
);
|
|
2843
2850
|
}
|
|
2844
|
-
return /* @__PURE__ */
|
|
2851
|
+
return /* @__PURE__ */ jsx40("div", { className: baseStyles, children: cardContent });
|
|
2845
2852
|
}
|
|
2846
2853
|
|
|
2847
2854
|
// src/components/Badge/Badge.tsx
|
|
2848
2855
|
import { twMerge as twMerge11 } from "tailwind-merge";
|
|
2849
|
-
import { jsx as
|
|
2856
|
+
import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2850
2857
|
var variantStyles4 = {
|
|
2851
|
-
neutral: "bg-
|
|
2852
|
-
purple: "bg-
|
|
2853
|
-
teal: "bg-
|
|
2854
|
-
rose: "bg-
|
|
2855
|
-
slate: "bg-
|
|
2856
|
-
green: "bg-
|
|
2857
|
-
amber: "bg-
|
|
2858
|
+
neutral: "bg-(--color-badge-neutral-bg) text-(--color-badge-neutral-text)",
|
|
2859
|
+
purple: "bg-(--color-badge-purple-bg) text-(--color-badge-purple-text)",
|
|
2860
|
+
teal: "bg-(--color-badge-teal-bg) text-(--color-badge-teal-text)",
|
|
2861
|
+
rose: "bg-(--color-badge-rose-bg) text-(--color-badge-rose-text)",
|
|
2862
|
+
slate: "bg-(--color-badge-slate-bg) text-(--color-badge-slate-text)",
|
|
2863
|
+
green: "bg-(--color-badge-green-bg) text-(--color-badge-green-text)",
|
|
2864
|
+
amber: "bg-(--color-badge-amber-bg) text-(--color-badge-amber-text)"
|
|
2858
2865
|
};
|
|
2859
2866
|
var sizeStyles8 = {
|
|
2860
2867
|
sm: "px-1.5 py-0.5",
|
|
@@ -2875,14 +2882,14 @@ function Badge({
|
|
|
2875
2882
|
"span",
|
|
2876
2883
|
{
|
|
2877
2884
|
className: twMerge11(
|
|
2878
|
-
"inline-flex items-center gap-1 rounded-
|
|
2879
|
-
"text-
|
|
2885
|
+
"inline-flex items-center gap-1 rounded-full",
|
|
2886
|
+
"text-xs font-medium leading-tight",
|
|
2880
2887
|
variantStyles4[variant],
|
|
2881
2888
|
sizeStyles8[size],
|
|
2882
2889
|
className
|
|
2883
2890
|
),
|
|
2884
2891
|
children: [
|
|
2885
|
-
IconComponent && /* @__PURE__ */
|
|
2892
|
+
IconComponent && /* @__PURE__ */ jsx41(IconComponent, { size: iconSizeMap4[size], "aria-hidden": "true" }),
|
|
2886
2893
|
children
|
|
2887
2894
|
]
|
|
2888
2895
|
}
|
|
@@ -2892,7 +2899,7 @@ function Badge({
|
|
|
2892
2899
|
// src/components/Card/Card.tsx
|
|
2893
2900
|
import { useCallback as useCallback5 } from "react";
|
|
2894
2901
|
import { twMerge as twMerge12 } from "tailwind-merge";
|
|
2895
|
-
import { Fragment as Fragment11, jsx as
|
|
2902
|
+
import { Fragment as Fragment11, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2896
2903
|
var paddingStyles = {
|
|
2897
2904
|
none: "p-0",
|
|
2898
2905
|
sm: "p-3",
|
|
@@ -2911,9 +2918,9 @@ function Card({
|
|
|
2911
2918
|
}) {
|
|
2912
2919
|
const isInteractive = interactive || !!href || !!onPress;
|
|
2913
2920
|
const containerClass = twMerge12(
|
|
2914
|
-
"bg-
|
|
2915
|
-
isInteractive && "transition-all hover:shadow-md hover:border-
|
|
2916
|
-
(href || onPress) && "block focus-visible:ring-2 focus-visible:ring-
|
|
2921
|
+
"bg-(--color-surface-default) border border-(--color-border-default) rounded-lg overflow-hidden shadow-sm",
|
|
2922
|
+
isInteractive && "transition-all hover:shadow-md hover:border-(--color-border-focus) cursor-pointer",
|
|
2923
|
+
(href || onPress) && "block focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
2917
2924
|
className
|
|
2918
2925
|
);
|
|
2919
2926
|
const handleKeyDown = useCallback5(
|
|
@@ -2926,22 +2933,22 @@ function Card({
|
|
|
2926
2933
|
[onPress]
|
|
2927
2934
|
);
|
|
2928
2935
|
const content = /* @__PURE__ */ jsxs27(Fragment11, { children: [
|
|
2929
|
-
header && /* @__PURE__ */
|
|
2936
|
+
header && /* @__PURE__ */ jsx42(
|
|
2930
2937
|
"div",
|
|
2931
2938
|
{
|
|
2932
2939
|
className: twMerge12(
|
|
2933
|
-
"border-b border-
|
|
2940
|
+
"border-b border-(--color-border-default)",
|
|
2934
2941
|
paddingStyles[padding]
|
|
2935
2942
|
),
|
|
2936
2943
|
children: header
|
|
2937
2944
|
}
|
|
2938
2945
|
),
|
|
2939
|
-
/* @__PURE__ */
|
|
2940
|
-
footer && /* @__PURE__ */
|
|
2946
|
+
/* @__PURE__ */ jsx42("div", { className: paddingStyles[padding], children }),
|
|
2947
|
+
footer && /* @__PURE__ */ jsx42(
|
|
2941
2948
|
"div",
|
|
2942
2949
|
{
|
|
2943
2950
|
className: twMerge12(
|
|
2944
|
-
"border-t border-
|
|
2951
|
+
"border-t border-(--color-border-default)",
|
|
2945
2952
|
paddingStyles[padding]
|
|
2946
2953
|
),
|
|
2947
2954
|
children: footer
|
|
@@ -2949,10 +2956,10 @@ function Card({
|
|
|
2949
2956
|
)
|
|
2950
2957
|
] });
|
|
2951
2958
|
if (href) {
|
|
2952
|
-
return /* @__PURE__ */
|
|
2959
|
+
return /* @__PURE__ */ jsx42("a", { href, className: containerClass, children: content });
|
|
2953
2960
|
}
|
|
2954
2961
|
if (onPress) {
|
|
2955
|
-
return /* @__PURE__ */
|
|
2962
|
+
return /* @__PURE__ */ jsx42(
|
|
2956
2963
|
"div",
|
|
2957
2964
|
{
|
|
2958
2965
|
role: "button",
|
|
@@ -2964,13 +2971,13 @@ function Card({
|
|
|
2964
2971
|
}
|
|
2965
2972
|
);
|
|
2966
2973
|
}
|
|
2967
|
-
return /* @__PURE__ */
|
|
2974
|
+
return /* @__PURE__ */ jsx42("div", { className: containerClass, children: content });
|
|
2968
2975
|
}
|
|
2969
2976
|
|
|
2970
2977
|
// src/components/DeltaIndicator/DeltaIndicator.tsx
|
|
2971
2978
|
import { ArrowUp, ArrowDown, Minus } from "lucide-react";
|
|
2972
2979
|
import { twMerge as twMerge13 } from "tailwind-merge";
|
|
2973
|
-
import { jsx as
|
|
2980
|
+
import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2974
2981
|
function getDirection(current, previous) {
|
|
2975
2982
|
const diff = current - previous;
|
|
2976
2983
|
if (diff > 0) return "increase";
|
|
@@ -2992,14 +2999,14 @@ function formatPercentage(current, previous) {
|
|
|
2992
2999
|
return `${sign}${pct.toFixed(1)}%`;
|
|
2993
3000
|
}
|
|
2994
3001
|
var directionColors = {
|
|
2995
|
-
increase: "text-
|
|
2996
|
-
decrease: "text-
|
|
2997
|
-
flat: "text-
|
|
3002
|
+
increase: "text-(--color-delta-increase-text)",
|
|
3003
|
+
decrease: "text-(--color-delta-decrease-text)",
|
|
3004
|
+
flat: "text-(--color-delta-flat-text)"
|
|
2998
3005
|
};
|
|
2999
3006
|
var reverseDirectionColors = {
|
|
3000
|
-
increase: "text-
|
|
3001
|
-
decrease: "text-
|
|
3002
|
-
flat: "text-
|
|
3007
|
+
increase: "text-(--color-delta-decrease-text)",
|
|
3008
|
+
decrease: "text-(--color-delta-increase-text)",
|
|
3009
|
+
flat: "text-(--color-delta-flat-text)"
|
|
3003
3010
|
};
|
|
3004
3011
|
var directionIcons = {
|
|
3005
3012
|
increase: ArrowUp,
|
|
@@ -3007,9 +3014,9 @@ var directionIcons = {
|
|
|
3007
3014
|
flat: Minus
|
|
3008
3015
|
};
|
|
3009
3016
|
var directionBgColors = {
|
|
3010
|
-
increase: "bg-
|
|
3011
|
-
decrease: "bg-
|
|
3012
|
-
flat: "bg-
|
|
3017
|
+
increase: "bg-(--color-delta-increase-bg)",
|
|
3018
|
+
decrease: "bg-(--color-delta-decrease-bg)",
|
|
3019
|
+
flat: "bg-(--color-delta-flat-bg)"
|
|
3013
3020
|
};
|
|
3014
3021
|
function DeltaIndicator({
|
|
3015
3022
|
current,
|
|
@@ -3027,12 +3034,12 @@ function DeltaIndicator({
|
|
|
3027
3034
|
"span",
|
|
3028
3035
|
{
|
|
3029
3036
|
className: twMerge13(
|
|
3030
|
-
"inline-flex items-center gap-1 font-
|
|
3031
|
-
"text-
|
|
3037
|
+
"inline-flex items-center gap-1 font-medium",
|
|
3038
|
+
"text-(--color-text-tertiary)",
|
|
3032
3039
|
className
|
|
3033
3040
|
),
|
|
3034
3041
|
children: [
|
|
3035
|
-
label && /* @__PURE__ */
|
|
3042
|
+
label && /* @__PURE__ */ jsx43("span", { className: "text-sm text-(--color-text-secondary) mr-1", children: label }),
|
|
3036
3043
|
unavailableText
|
|
3037
3044
|
]
|
|
3038
3045
|
}
|
|
@@ -3066,18 +3073,18 @@ function DeltaIndicator({
|
|
|
3066
3073
|
"span",
|
|
3067
3074
|
{
|
|
3068
3075
|
className: twMerge13(
|
|
3069
|
-
"inline-flex items-center gap-1 font-
|
|
3076
|
+
"inline-flex items-center gap-1 font-medium",
|
|
3070
3077
|
colorStyles2,
|
|
3071
3078
|
isPill && [
|
|
3072
|
-
"rounded-
|
|
3073
|
-
"text-
|
|
3079
|
+
"rounded-full px-2 py-0.5",
|
|
3080
|
+
"text-xs",
|
|
3074
3081
|
directionBgColors[direction]
|
|
3075
3082
|
],
|
|
3076
3083
|
className
|
|
3077
3084
|
),
|
|
3078
3085
|
children: [
|
|
3079
|
-
label && /* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
3086
|
+
label && /* @__PURE__ */ jsx43("span", { className: "text-sm text-(--color-text-secondary) mr-1", children: label }),
|
|
3087
|
+
/* @__PURE__ */ jsx43(IconComponent, { size: 14, "aria-hidden": true }),
|
|
3081
3088
|
valueText
|
|
3082
3089
|
]
|
|
3083
3090
|
}
|
|
@@ -3086,13 +3093,13 @@ function DeltaIndicator({
|
|
|
3086
3093
|
|
|
3087
3094
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
3088
3095
|
import { twMerge as twMerge14 } from "tailwind-merge";
|
|
3089
|
-
import { jsx as
|
|
3096
|
+
import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3090
3097
|
var fillStyles = {
|
|
3091
|
-
brand: "bg-
|
|
3092
|
-
success: "bg-
|
|
3093
|
-
warning: "bg-
|
|
3094
|
-
danger: "bg-
|
|
3095
|
-
neutral: "bg-
|
|
3098
|
+
brand: "bg-(--color-progress-fill)",
|
|
3099
|
+
success: "bg-(--color-progress-fill-success)",
|
|
3100
|
+
warning: "bg-(--color-progress-fill-warning)",
|
|
3101
|
+
danger: "bg-(--color-progress-fill-danger)",
|
|
3102
|
+
neutral: "bg-(--color-text-secondary)"
|
|
3096
3103
|
};
|
|
3097
3104
|
var sizeStyles9 = {
|
|
3098
3105
|
sm: "h-1.5",
|
|
@@ -3111,10 +3118,10 @@ function ProgressBar({
|
|
|
3111
3118
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
3112
3119
|
return /* @__PURE__ */ jsxs29("div", { className: twMerge14("w-full", className), children: [
|
|
3113
3120
|
(label || description || showValue) && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between mb-2", children: [
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3121
|
+
/* @__PURE__ */ jsx44("span", { className: "text-sm font-medium text-(--color-text-primary)", children: label }),
|
|
3122
|
+
/* @__PURE__ */ jsx44("span", { className: "text-sm text-(--color-text-secondary)", children: description ?? (showValue ? `${clampedValue}%` : null) })
|
|
3116
3123
|
] }),
|
|
3117
|
-
/* @__PURE__ */
|
|
3124
|
+
/* @__PURE__ */ jsx44(
|
|
3118
3125
|
"div",
|
|
3119
3126
|
{
|
|
3120
3127
|
role: "progressbar",
|
|
@@ -3123,14 +3130,14 @@ function ProgressBar({
|
|
|
3123
3130
|
"aria-valuemax": 100,
|
|
3124
3131
|
"aria-label": label ?? "Progress",
|
|
3125
3132
|
className: twMerge14(
|
|
3126
|
-
"w-full rounded-
|
|
3133
|
+
"w-full rounded-full bg-(--color-progress-track)",
|
|
3127
3134
|
sizeStyles9[size]
|
|
3128
3135
|
),
|
|
3129
|
-
children: /* @__PURE__ */
|
|
3136
|
+
children: /* @__PURE__ */ jsx44(
|
|
3130
3137
|
"div",
|
|
3131
3138
|
{
|
|
3132
3139
|
className: twMerge14(
|
|
3133
|
-
"h-full rounded-
|
|
3140
|
+
"h-full rounded-full transition-all duration-300",
|
|
3134
3141
|
fillStyles[variant]
|
|
3135
3142
|
),
|
|
3136
3143
|
style: { width: `${clampedValue}%` }
|
|
@@ -3151,30 +3158,30 @@ import {
|
|
|
3151
3158
|
X as X3
|
|
3152
3159
|
} from "lucide-react";
|
|
3153
3160
|
import { twMerge as twMerge15 } from "tailwind-merge";
|
|
3154
|
-
import { jsx as
|
|
3161
|
+
import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3155
3162
|
var variantConfig2 = {
|
|
3156
3163
|
info: {
|
|
3157
3164
|
icon: Info4,
|
|
3158
|
-
containerClass: "bg-
|
|
3159
|
-
iconClass: "text-
|
|
3165
|
+
containerClass: "bg-(--color-banner-info-bg) border-(--color-banner-info-border) text-(--color-banner-info-text)",
|
|
3166
|
+
iconClass: "text-(--color-banner-info-icon)",
|
|
3160
3167
|
role: "status"
|
|
3161
3168
|
},
|
|
3162
3169
|
warning: {
|
|
3163
3170
|
icon: AlertTriangle,
|
|
3164
|
-
containerClass: "bg-
|
|
3165
|
-
iconClass: "text-
|
|
3171
|
+
containerClass: "bg-(--color-banner-warning-bg) border-(--color-banner-warning-border) text-(--color-banner-warning-text)",
|
|
3172
|
+
iconClass: "text-(--color-banner-warning-icon)",
|
|
3166
3173
|
role: "alert"
|
|
3167
3174
|
},
|
|
3168
3175
|
danger: {
|
|
3169
3176
|
icon: AlertCircle2,
|
|
3170
|
-
containerClass: "bg-
|
|
3171
|
-
iconClass: "text-
|
|
3177
|
+
containerClass: "bg-(--color-banner-danger-bg) border-(--color-banner-danger-border) text-(--color-banner-danger-text)",
|
|
3178
|
+
iconClass: "text-(--color-banner-danger-icon)",
|
|
3172
3179
|
role: "alert"
|
|
3173
3180
|
},
|
|
3174
3181
|
success: {
|
|
3175
3182
|
icon: CheckCircle2,
|
|
3176
|
-
containerClass: "bg-
|
|
3177
|
-
iconClass: "text-
|
|
3183
|
+
containerClass: "bg-(--color-banner-success-bg) border-(--color-banner-success-border) text-(--color-banner-success-text)",
|
|
3184
|
+
iconClass: "text-(--color-banner-success-icon)",
|
|
3178
3185
|
role: "status"
|
|
3179
3186
|
}
|
|
3180
3187
|
};
|
|
@@ -3200,13 +3207,13 @@ function Banner({
|
|
|
3200
3207
|
{
|
|
3201
3208
|
role: config.role,
|
|
3202
3209
|
className: twMerge15(
|
|
3203
|
-
"flex items-start gap-
|
|
3204
|
-
"text-
|
|
3210
|
+
"flex items-start gap-3 rounded-lg border px-4 py-3",
|
|
3211
|
+
"text-sm",
|
|
3205
3212
|
config.containerClass,
|
|
3206
3213
|
className
|
|
3207
3214
|
),
|
|
3208
3215
|
children: [
|
|
3209
|
-
/* @__PURE__ */
|
|
3216
|
+
/* @__PURE__ */ jsx45(
|
|
3210
3217
|
IconComponent,
|
|
3211
3218
|
{
|
|
3212
3219
|
size: 20,
|
|
@@ -3215,20 +3222,20 @@ function Banner({
|
|
|
3215
3222
|
}
|
|
3216
3223
|
),
|
|
3217
3224
|
/* @__PURE__ */ jsxs30("div", { className: "flex-1", children: [
|
|
3218
|
-
title && /* @__PURE__ */ jsxs30("span", { className: "font-
|
|
3225
|
+
title && /* @__PURE__ */ jsxs30("span", { className: "font-medium", children: [
|
|
3219
3226
|
title,
|
|
3220
3227
|
" \u2014 "
|
|
3221
3228
|
] }),
|
|
3222
3229
|
children
|
|
3223
3230
|
] }),
|
|
3224
|
-
dismissible && /* @__PURE__ */
|
|
3231
|
+
dismissible && /* @__PURE__ */ jsx45(
|
|
3225
3232
|
"button",
|
|
3226
3233
|
{
|
|
3227
3234
|
type: "button",
|
|
3228
3235
|
onClick: handleDismiss,
|
|
3229
|
-
className: "shrink-0 rounded-
|
|
3236
|
+
className: "shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-opacity outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
3230
3237
|
"aria-label": "Dismiss",
|
|
3231
|
-
children: /* @__PURE__ */
|
|
3238
|
+
children: /* @__PURE__ */ jsx45(X3, { size: 16, "aria-hidden": "true" })
|
|
3232
3239
|
}
|
|
3233
3240
|
)
|
|
3234
3241
|
]
|
|
@@ -3238,17 +3245,17 @@ function Banner({
|
|
|
3238
3245
|
|
|
3239
3246
|
// src/components/MetricCard/MetricCard.tsx
|
|
3240
3247
|
import { twMerge as twMerge16 } from "tailwind-merge";
|
|
3241
|
-
import { Fragment as Fragment12, jsx as
|
|
3248
|
+
import { Fragment as Fragment12, jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3242
3249
|
var sizeConfig = {
|
|
3243
3250
|
sm: {
|
|
3244
3251
|
padding: "p-3",
|
|
3245
|
-
labelClass: "text-
|
|
3246
|
-
valueClass: "text-
|
|
3252
|
+
labelClass: "text-xs",
|
|
3253
|
+
valueClass: "text-xl"
|
|
3247
3254
|
},
|
|
3248
3255
|
md: {
|
|
3249
3256
|
padding: "p-4",
|
|
3250
|
-
labelClass: "text-
|
|
3251
|
-
valueClass: "text-
|
|
3257
|
+
labelClass: "text-sm",
|
|
3258
|
+
valueClass: "text-2xl"
|
|
3252
3259
|
}
|
|
3253
3260
|
};
|
|
3254
3261
|
function MetricCard({
|
|
@@ -3261,34 +3268,34 @@ function MetricCard({
|
|
|
3261
3268
|
}) {
|
|
3262
3269
|
const config = sizeConfig[size];
|
|
3263
3270
|
const containerClass = twMerge16(
|
|
3264
|
-
"bg-
|
|
3271
|
+
"bg-(--color-surface-default) border border-(--color-border-default) rounded-lg shadow-sm",
|
|
3265
3272
|
config.padding,
|
|
3266
|
-
href && "block transition-shadow hover:shadow-md hover:border-
|
|
3273
|
+
href && "block transition-shadow hover:shadow-md hover:border-(--color-border-focus) focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
3267
3274
|
className
|
|
3268
3275
|
);
|
|
3269
3276
|
const content = /* @__PURE__ */ jsxs31(Fragment12, { children: [
|
|
3270
|
-
/* @__PURE__ */
|
|
3271
|
-
/* @__PURE__ */
|
|
3277
|
+
/* @__PURE__ */ jsx46("div", { className: twMerge16(config.labelClass, "text-(--color-text-secondary)"), children: label }),
|
|
3278
|
+
/* @__PURE__ */ jsx46(
|
|
3272
3279
|
"div",
|
|
3273
3280
|
{
|
|
3274
3281
|
className: twMerge16(
|
|
3275
3282
|
config.valueClass,
|
|
3276
|
-
"font-
|
|
3283
|
+
"font-semibold text-(--color-text-primary) mt-1 tabular-nums"
|
|
3277
3284
|
),
|
|
3278
3285
|
children: value
|
|
3279
3286
|
}
|
|
3280
3287
|
),
|
|
3281
|
-
secondary && /* @__PURE__ */
|
|
3288
|
+
secondary && /* @__PURE__ */ jsx46("div", { className: "mt-1 text-sm", children: secondary })
|
|
3282
3289
|
] });
|
|
3283
3290
|
if (href) {
|
|
3284
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsx46("a", { href, className: containerClass, children: content });
|
|
3285
3292
|
}
|
|
3286
|
-
return /* @__PURE__ */
|
|
3293
|
+
return /* @__PURE__ */ jsx46("div", { className: containerClass, children: content });
|
|
3287
3294
|
}
|
|
3288
3295
|
|
|
3289
3296
|
// src/components/SectionHeader/SectionHeader.tsx
|
|
3290
3297
|
import { twMerge as twMerge17 } from "tailwind-merge";
|
|
3291
|
-
import { jsx as
|
|
3298
|
+
import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3292
3299
|
function SectionHeader({
|
|
3293
3300
|
title,
|
|
3294
3301
|
children,
|
|
@@ -3298,12 +3305,12 @@ function SectionHeader({
|
|
|
3298
3305
|
"div",
|
|
3299
3306
|
{
|
|
3300
3307
|
className: twMerge17(
|
|
3301
|
-
"flex flex-wrap items-center gap-
|
|
3308
|
+
"flex flex-wrap items-center gap-3 py-4",
|
|
3302
3309
|
className
|
|
3303
3310
|
),
|
|
3304
3311
|
children: [
|
|
3305
|
-
/* @__PURE__ */
|
|
3306
|
-
children && /* @__PURE__ */
|
|
3312
|
+
/* @__PURE__ */ jsx47(H2, { children: title }),
|
|
3313
|
+
children && /* @__PURE__ */ jsx47("div", { className: "ml-auto flex flex-wrap items-center gap-2", children })
|
|
3307
3314
|
]
|
|
3308
3315
|
}
|
|
3309
3316
|
);
|
|
@@ -3311,7 +3318,7 @@ function SectionHeader({
|
|
|
3311
3318
|
|
|
3312
3319
|
// src/components/FormWizard/FormWizard.tsx
|
|
3313
3320
|
import { createContext as createContext6, useContext as useContext6, useCallback as useCallback6, useMemo } from "react";
|
|
3314
|
-
import { jsx as
|
|
3321
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3315
3322
|
var FormWizardContext = createContext6({
|
|
3316
3323
|
currentStep: 0,
|
|
3317
3324
|
totalSteps: 1,
|
|
@@ -3346,30 +3353,30 @@ function FormWizard({
|
|
|
3346
3353
|
}),
|
|
3347
3354
|
[currentStep, totalSteps, canGoBack, goBack, isLastStep]
|
|
3348
3355
|
);
|
|
3349
|
-
return /* @__PURE__ */
|
|
3356
|
+
return /* @__PURE__ */ jsx48(FormWizardContext.Provider, { value, children });
|
|
3350
3357
|
}
|
|
3351
3358
|
|
|
3352
3359
|
// src/components/FormWizard/FormWizardProgress.tsx
|
|
3353
|
-
import { jsx as
|
|
3360
|
+
import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3354
3361
|
function CheckIcon2() {
|
|
3355
|
-
return /* @__PURE__ */
|
|
3362
|
+
return /* @__PURE__ */ jsx49(
|
|
3356
3363
|
"svg",
|
|
3357
3364
|
{
|
|
3358
3365
|
"aria-hidden": "true",
|
|
3359
|
-
className: "h-4 w-4 text-
|
|
3366
|
+
className: "h-4 w-4 text-(--color-text-inverse)",
|
|
3360
3367
|
viewBox: "0 0 16 16",
|
|
3361
3368
|
fill: "none",
|
|
3362
3369
|
stroke: "currentColor",
|
|
3363
3370
|
strokeWidth: "2",
|
|
3364
3371
|
strokeLinecap: "round",
|
|
3365
3372
|
strokeLinejoin: "round",
|
|
3366
|
-
children: /* @__PURE__ */
|
|
3373
|
+
children: /* @__PURE__ */ jsx49("path", { d: "M3 8.5l3.5 3.5 6.5-7" })
|
|
3367
3374
|
}
|
|
3368
3375
|
);
|
|
3369
3376
|
}
|
|
3370
3377
|
function FormWizardProgress({ labels }) {
|
|
3371
3378
|
const { currentStep, totalSteps } = useFormWizard();
|
|
3372
|
-
return /* @__PURE__ */
|
|
3379
|
+
return /* @__PURE__ */ jsx49("nav", { "aria-label": "Form progress", children: /* @__PURE__ */ jsx49("ol", { className: "flex items-start", role: "list", children: labels.map((label, index) => {
|
|
3373
3380
|
const isCompleted = index < currentStep;
|
|
3374
3381
|
const isCurrent = index === currentStep;
|
|
3375
3382
|
const isFuture = index > currentStep;
|
|
@@ -3380,48 +3387,48 @@ function FormWizardProgress({ labels }) {
|
|
|
3380
3387
|
"aria-current": isCurrent ? "step" : void 0,
|
|
3381
3388
|
children: [
|
|
3382
3389
|
/* @__PURE__ */ jsxs33("div", { className: "flex w-full items-center", children: [
|
|
3383
|
-
index > 0 ? /* @__PURE__ */
|
|
3390
|
+
index > 0 ? /* @__PURE__ */ jsx49(
|
|
3384
3391
|
"div",
|
|
3385
3392
|
{
|
|
3386
3393
|
"aria-hidden": "true",
|
|
3387
3394
|
className: [
|
|
3388
3395
|
"h-0.5 flex-1",
|
|
3389
|
-
index <= currentStep ? "bg-
|
|
3396
|
+
index <= currentStep ? "bg-(--color-brand-primary)" : "bg-(--color-border-default)"
|
|
3390
3397
|
].join(" ")
|
|
3391
3398
|
}
|
|
3392
|
-
) : /* @__PURE__ */
|
|
3393
|
-
/* @__PURE__ */
|
|
3399
|
+
) : /* @__PURE__ */ jsx49("div", { className: "flex-1", "aria-hidden": "true" }),
|
|
3400
|
+
/* @__PURE__ */ jsx49(
|
|
3394
3401
|
"div",
|
|
3395
3402
|
{
|
|
3396
3403
|
className: [
|
|
3397
3404
|
"flex h-8 w-8 shrink-0 items-center justify-center rounded-full",
|
|
3398
|
-
"text-
|
|
3405
|
+
"text-sm font-medium",
|
|
3399
3406
|
"transition-colors",
|
|
3400
|
-
isCompleted ? "bg-
|
|
3401
|
-
isCurrent ? "border-2 border-
|
|
3402
|
-
isFuture ? "border-2 border-
|
|
3407
|
+
isCompleted ? "bg-(--color-brand-primary) text-(--color-text-inverse)" : "",
|
|
3408
|
+
isCurrent ? "border-2 border-(--color-brand-primary) bg-(--color-surface-default) text-(--color-brand-primary)" : "",
|
|
3409
|
+
isFuture ? "border-2 border-(--color-border-default) bg-(--color-surface-default) text-(--color-text-tertiary)" : ""
|
|
3403
3410
|
].join(" "),
|
|
3404
3411
|
"aria-hidden": "true",
|
|
3405
|
-
children: isCompleted ? /* @__PURE__ */
|
|
3412
|
+
children: isCompleted ? /* @__PURE__ */ jsx49(CheckIcon2, {}) : index + 1
|
|
3406
3413
|
}
|
|
3407
3414
|
),
|
|
3408
|
-
index < totalSteps - 1 ? /* @__PURE__ */
|
|
3415
|
+
index < totalSteps - 1 ? /* @__PURE__ */ jsx49(
|
|
3409
3416
|
"div",
|
|
3410
3417
|
{
|
|
3411
3418
|
"aria-hidden": "true",
|
|
3412
3419
|
className: [
|
|
3413
3420
|
"h-0.5 flex-1",
|
|
3414
|
-
index < currentStep ? "bg-
|
|
3421
|
+
index < currentStep ? "bg-(--color-brand-primary)" : "bg-(--color-border-default)"
|
|
3415
3422
|
].join(" ")
|
|
3416
3423
|
}
|
|
3417
|
-
) : /* @__PURE__ */
|
|
3424
|
+
) : /* @__PURE__ */ jsx49("div", { className: "flex-1", "aria-hidden": "true" })
|
|
3418
3425
|
] }),
|
|
3419
|
-
/* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ jsx49(
|
|
3420
3427
|
"span",
|
|
3421
3428
|
{
|
|
3422
3429
|
className: [
|
|
3423
|
-
"mt-
|
|
3424
|
-
isCurrent ? "font-
|
|
3430
|
+
"mt-2 text-center text-sm",
|
|
3431
|
+
isCurrent ? "font-semibold text-(--color-text-primary)" : "font-normal text-(--color-text-secondary)"
|
|
3425
3432
|
].join(" "),
|
|
3426
3433
|
children: label
|
|
3427
3434
|
}
|
|
@@ -3434,15 +3441,15 @@ function FormWizardProgress({ labels }) {
|
|
|
3434
3441
|
}
|
|
3435
3442
|
|
|
3436
3443
|
// src/components/FormWizard/FormWizardNav.tsx
|
|
3437
|
-
import { jsx as
|
|
3444
|
+
import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3438
3445
|
function FormWizardNav({
|
|
3439
3446
|
onNext,
|
|
3440
3447
|
isSubmitting = false,
|
|
3441
3448
|
submitLabel = "Submit"
|
|
3442
3449
|
}) {
|
|
3443
3450
|
const { canGoBack, goBack, isLastStep } = useFormWizard();
|
|
3444
|
-
return /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-end gap-
|
|
3445
|
-
canGoBack && /* @__PURE__ */
|
|
3451
|
+
return /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-end gap-3", children: [
|
|
3452
|
+
canGoBack && /* @__PURE__ */ jsx50(
|
|
3446
3453
|
Button,
|
|
3447
3454
|
{
|
|
3448
3455
|
variant: "secondary",
|
|
@@ -3452,7 +3459,7 @@ function FormWizardNav({
|
|
|
3452
3459
|
children: "Back"
|
|
3453
3460
|
}
|
|
3454
3461
|
),
|
|
3455
|
-
/* @__PURE__ */
|
|
3462
|
+
/* @__PURE__ */ jsx50(
|
|
3456
3463
|
Button,
|
|
3457
3464
|
{
|
|
3458
3465
|
variant: "primary",
|