@northslopetech/altitude-ui 3.0.0-alpha.2 → 3.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.mts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +249 -245
- package/dist/index.mjs +554 -550
- package/package.json +12 -4
package/dist/index.mjs
CHANGED
|
@@ -12,74 +12,68 @@ function cn(...inputs) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// src/components/ui/button.tsx
|
|
15
|
-
import {
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
16
|
var buttonVariants = cva2(
|
|
17
17
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
18
18
|
{
|
|
19
19
|
variants: {
|
|
20
20
|
variant: {
|
|
21
|
-
default: "
|
|
22
|
-
|
|
23
|
-
destructive: "
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
link: "bg-light text-dark underline underline-offset-4 hover:cursor-pointer active:text-info"
|
|
21
|
+
default: "interactive-default interactive-default-fg border border-default shadow-sm hover:brightness-[90%] dark:hover:brightness-[130%] active:brightness-[80%] dark:active:brightness-[120%] focus-visible:ring-2 focus-visible:ring-focus-default focus-visible:border-strong",
|
|
22
|
+
primary: "interactive-accent interactive-accent-fg hover:brightness-[90%] dark:hover:brightness-[130%] active:brightness-[80%] dark:active:brightness-[120%] focus-visible:ring-2 focus-visible:ring-focus-default",
|
|
23
|
+
destructive: "interactive-destructive interactive-destructive-fg hover:brightness-[90%] dark:hover:brightness-[130%] active:brightness-[80%] dark:active:brightness-[120%] focus-visible:ring-3 focus-visible:ring-focus-error",
|
|
24
|
+
ghost: "interactive-default interactive-default-fg hover:brightness-[90%] dark:hover:brightness-[130%] active:brightness-[80%] dark:active:brightness-[120%] focus-visible:ring-2 focus-visible:ring-focus-default",
|
|
25
|
+
link: "h-6 px-0 py-0 rounded-sm text-default underline underline-offset-2 focus-visible:ring-2 focus-visible:ring-focus-default"
|
|
27
26
|
},
|
|
28
27
|
size: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
default: "h-9 rounded-md px-4 py-2 type-label-sm-medium",
|
|
29
|
+
lg: "h-10 rounded-md px-4 py-2.5 type-label-md-medium",
|
|
30
|
+
sm: "h-8 rounded-sm px-3 py-1.5 type-label-sm-medium",
|
|
31
|
+
mini: "h-6 rounded-sm px-2 py-1 type-label-xs-medium"
|
|
33
32
|
}
|
|
34
33
|
},
|
|
35
|
-
compoundVariants: [
|
|
34
|
+
compoundVariants: [
|
|
35
|
+
{
|
|
36
|
+
variant: "link",
|
|
37
|
+
size: ["default", "sm"],
|
|
38
|
+
className: "type-body-sm-regular hover:type-body-sm-semibold active:type-body-sm-semibold"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
variant: "link",
|
|
42
|
+
size: "lg",
|
|
43
|
+
className: "type-body-md-regular hover:type-body-md-semibold active:type-body-md-semibold"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
variant: "link",
|
|
47
|
+
size: "mini",
|
|
48
|
+
className: "type-body-xs-regular hover:type-body-xs-semibold active:type-body-xs-semibold"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
36
51
|
defaultVariants: {
|
|
37
52
|
variant: "default",
|
|
38
53
|
size: "default"
|
|
39
54
|
}
|
|
40
55
|
}
|
|
41
56
|
);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return { font: "var(--typography-label-sm-bold)" };
|
|
46
|
-
case "lg":
|
|
47
|
-
return { font: "var(--typography-label-lg-bold)" };
|
|
48
|
-
case "icon":
|
|
49
|
-
case "default":
|
|
50
|
-
default:
|
|
51
|
-
return { font: "var(--typography-label-md-bold)" };
|
|
52
|
-
}
|
|
53
|
-
}
|
|
57
|
+
var hasTextChildren = (children) => React.Children.toArray(children).some(
|
|
58
|
+
(child) => typeof child === "string" && child.trim().length > 0
|
|
59
|
+
);
|
|
54
60
|
var Button = React.forwardRef(
|
|
55
|
-
({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
size,
|
|
60
|
-
icon,
|
|
61
|
-
iconPosition = "left",
|
|
62
|
-
children,
|
|
63
|
-
...props
|
|
64
|
-
}, ref) => {
|
|
65
|
-
const typographyStyles = getButtonTypographyStyles(size);
|
|
66
|
-
const tokenStyles = {
|
|
67
|
-
...typographyStyles,
|
|
68
|
-
...style
|
|
69
|
-
};
|
|
70
|
-
return /* @__PURE__ */ jsxs(
|
|
61
|
+
({ className, style, variant, size, children, ...props }, ref) => {
|
|
62
|
+
const isIconOnly = !hasTextChildren(children);
|
|
63
|
+
const iconOnlyClasses = isIconOnly ? "aspect-square px-0 py-0" : void 0;
|
|
64
|
+
return /* @__PURE__ */ jsx(
|
|
71
65
|
ButtonPrimitive,
|
|
72
66
|
{
|
|
73
67
|
"data-slot": "button",
|
|
74
|
-
className: cn(
|
|
75
|
-
|
|
68
|
+
className: cn(
|
|
69
|
+
buttonVariants({ variant, size }),
|
|
70
|
+
iconOnlyClasses,
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
style,
|
|
76
74
|
ref,
|
|
77
75
|
...props,
|
|
78
|
-
children
|
|
79
|
-
icon && iconPosition === "left" && icon,
|
|
80
|
-
children,
|
|
81
|
-
icon && iconPosition === "right" && icon
|
|
82
|
-
]
|
|
76
|
+
children
|
|
83
77
|
}
|
|
84
78
|
);
|
|
85
79
|
}
|
|
@@ -89,7 +83,7 @@ Button.displayName = "Button";
|
|
|
89
83
|
// src/components/ui/text.tsx
|
|
90
84
|
import * as React2 from "react";
|
|
91
85
|
import { cva as cva3 } from "class-variance-authority";
|
|
92
|
-
import { jsx } from "react/jsx-runtime";
|
|
86
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
93
87
|
var textVariants = cva3("", {
|
|
94
88
|
variants: {
|
|
95
89
|
variant: {
|
|
@@ -144,7 +138,7 @@ function getDefaultElement(variant) {
|
|
|
144
138
|
var Text = React2.forwardRef(
|
|
145
139
|
({ className, variant, as, style, ...props }, ref) => {
|
|
146
140
|
const Component = as || getDefaultElement(variant);
|
|
147
|
-
return /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ jsx2(
|
|
148
142
|
Component,
|
|
149
143
|
{
|
|
150
144
|
className: cn(textVariants({ variant }), className),
|
|
@@ -159,9 +153,9 @@ Text.displayName = "Text";
|
|
|
159
153
|
|
|
160
154
|
// src/components/ui/card.tsx
|
|
161
155
|
import * as React3 from "react";
|
|
162
|
-
import { jsx as
|
|
156
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
163
157
|
var Card = React3.forwardRef(
|
|
164
|
-
({ className, size = "default", ...props }, ref) => /* @__PURE__ */
|
|
158
|
+
({ className, size = "default", ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
165
159
|
"div",
|
|
166
160
|
{
|
|
167
161
|
ref,
|
|
@@ -177,7 +171,7 @@ var Card = React3.forwardRef(
|
|
|
177
171
|
);
|
|
178
172
|
Card.displayName = "Card";
|
|
179
173
|
var CardHeader = React3.forwardRef(
|
|
180
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
174
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
181
175
|
"div",
|
|
182
176
|
{
|
|
183
177
|
ref,
|
|
@@ -192,7 +186,7 @@ var CardHeader = React3.forwardRef(
|
|
|
192
186
|
);
|
|
193
187
|
CardHeader.displayName = "CardHeader";
|
|
194
188
|
var CardTitle = React3.forwardRef(
|
|
195
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
189
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
196
190
|
Text,
|
|
197
191
|
{
|
|
198
192
|
ref,
|
|
@@ -205,7 +199,7 @@ var CardTitle = React3.forwardRef(
|
|
|
205
199
|
);
|
|
206
200
|
CardTitle.displayName = "CardTitle";
|
|
207
201
|
var CardDescription = React3.forwardRef(
|
|
208
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
202
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
209
203
|
Text,
|
|
210
204
|
{
|
|
211
205
|
ref,
|
|
@@ -218,7 +212,7 @@ var CardDescription = React3.forwardRef(
|
|
|
218
212
|
);
|
|
219
213
|
CardDescription.displayName = "CardDescription";
|
|
220
214
|
var CardAction = React3.forwardRef(
|
|
221
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
215
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
222
216
|
"div",
|
|
223
217
|
{
|
|
224
218
|
ref,
|
|
@@ -233,7 +227,7 @@ var CardAction = React3.forwardRef(
|
|
|
233
227
|
);
|
|
234
228
|
CardAction.displayName = "CardAction";
|
|
235
229
|
var CardContent = React3.forwardRef(
|
|
236
|
-
({ className, bleed, ...props }, ref) => /* @__PURE__ */
|
|
230
|
+
({ className, bleed, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
237
231
|
"div",
|
|
238
232
|
{
|
|
239
233
|
ref,
|
|
@@ -248,7 +242,7 @@ var CardContent = React3.forwardRef(
|
|
|
248
242
|
);
|
|
249
243
|
CardContent.displayName = "CardContent";
|
|
250
244
|
var CardFooter = React3.forwardRef(
|
|
251
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
245
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
252
246
|
"div",
|
|
253
247
|
{
|
|
254
248
|
ref,
|
|
@@ -266,7 +260,7 @@ CardFooter.displayName = "CardFooter";
|
|
|
266
260
|
// src/components/ui/typography.tsx
|
|
267
261
|
import * as React4 from "react";
|
|
268
262
|
import { cva as cva4 } from "class-variance-authority";
|
|
269
|
-
import { jsx as
|
|
263
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
270
264
|
var typographyVariants = cva4("", {
|
|
271
265
|
variants: {
|
|
272
266
|
variant: {
|
|
@@ -311,7 +305,7 @@ function getDefaultElement2(variant) {
|
|
|
311
305
|
var Typography = React4.forwardRef(
|
|
312
306
|
({ className, variant, as, style, ...props }, ref) => {
|
|
313
307
|
const Component = as || getDefaultElement2(variant);
|
|
314
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ jsx4(
|
|
315
309
|
Component,
|
|
316
310
|
{
|
|
317
311
|
className: cn(typographyVariants({ variant }), className),
|
|
@@ -389,7 +383,7 @@ import { SquaresFourIcon as PhosphorSquaresFour } from "@phosphor-icons/react/Sq
|
|
|
389
383
|
import { MagnifyingGlassPlusIcon as PhosphorMagnifyingGlassPlus } from "@phosphor-icons/react/MagnifyingGlassPlus";
|
|
390
384
|
import { MagnifyingGlassMinusIcon as PhosphorMagnifyingGlassMinus } from "@phosphor-icons/react/MagnifyingGlassMinus";
|
|
391
385
|
import { SidebarSimpleIcon as PhosphorSidebarSimple } from "@phosphor-icons/react/SidebarSimple";
|
|
392
|
-
import { jsx as
|
|
386
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
393
387
|
var getVariantStyles = (variant = "dark") => {
|
|
394
388
|
const variants = {
|
|
395
389
|
dark: "text-dark",
|
|
@@ -402,7 +396,7 @@ var getVariantStyles = (variant = "dark") => {
|
|
|
402
396
|
};
|
|
403
397
|
function createIcon(PhosphorIcon) {
|
|
404
398
|
const Wrapped = React5.forwardRef(
|
|
405
|
-
({ className, variant = "dark", size, weight = "regular", ...props }, ref) => /* @__PURE__ */
|
|
399
|
+
({ className, variant = "dark", size, weight = "regular", ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
406
400
|
PhosphorIcon,
|
|
407
401
|
{
|
|
408
402
|
ref,
|
|
@@ -476,7 +470,7 @@ var ZoomInIcon = createIcon(PhosphorMagnifyingGlassPlus);
|
|
|
476
470
|
var ZoomOutIcon = createIcon(PhosphorMagnifyingGlassMinus);
|
|
477
471
|
|
|
478
472
|
// src/components/ui/select.tsx
|
|
479
|
-
import { jsx as
|
|
473
|
+
import { jsx as jsx6, jsxs } from "react/jsx-runtime";
|
|
480
474
|
var selectTriggerVariants = cva5(
|
|
481
475
|
"flex items-center justify-between border bg-light text-dark focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 transition-colors rounded-md px-3 border-secondary focus-visible:border-2 focus-visible:border-strong aria-invalid:border-error aria-invalid:focus-visible:border-error",
|
|
482
476
|
{
|
|
@@ -517,7 +511,7 @@ var SelectTrigger = React6.forwardRef(({ className, children, style, width, ...p
|
|
|
517
511
|
font: "var(--typography-label-md-regular)",
|
|
518
512
|
...style
|
|
519
513
|
};
|
|
520
|
-
return /* @__PURE__ */
|
|
514
|
+
return /* @__PURE__ */ jsxs(
|
|
521
515
|
SelectPrimitive.Trigger,
|
|
522
516
|
{
|
|
523
517
|
ref,
|
|
@@ -529,8 +523,8 @@ var SelectTrigger = React6.forwardRef(({ className, children, style, width, ...p
|
|
|
529
523
|
style: tokenStyles,
|
|
530
524
|
...props,
|
|
531
525
|
children: [
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
/* @__PURE__ */
|
|
526
|
+
/* @__PURE__ */ jsx6("span", { className: "flex-1 text-left truncate", children }),
|
|
527
|
+
/* @__PURE__ */ jsx6(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx6(
|
|
534
528
|
CaretDownIcon,
|
|
535
529
|
{
|
|
536
530
|
size: 20,
|
|
@@ -542,7 +536,7 @@ var SelectTrigger = React6.forwardRef(({ className, children, style, width, ...p
|
|
|
542
536
|
);
|
|
543
537
|
});
|
|
544
538
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
545
|
-
var SelectScrollUpButton = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
539
|
+
var SelectScrollUpButton = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
546
540
|
SelectPrimitive.ScrollUpButton,
|
|
547
541
|
{
|
|
548
542
|
ref,
|
|
@@ -551,11 +545,11 @@ var SelectScrollUpButton = React6.forwardRef(({ className, ...props }, ref) => /
|
|
|
551
545
|
className
|
|
552
546
|
),
|
|
553
547
|
...props,
|
|
554
|
-
children: /* @__PURE__ */
|
|
548
|
+
children: /* @__PURE__ */ jsx6(CaretUpIcon, {})
|
|
555
549
|
}
|
|
556
550
|
));
|
|
557
551
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
558
|
-
var SelectScrollDownButton = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
552
|
+
var SelectScrollDownButton = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
559
553
|
SelectPrimitive.ScrollDownButton,
|
|
560
554
|
{
|
|
561
555
|
ref,
|
|
@@ -564,13 +558,13 @@ var SelectScrollDownButton = React6.forwardRef(({ className, ...props }, ref) =>
|
|
|
564
558
|
className
|
|
565
559
|
),
|
|
566
560
|
...props,
|
|
567
|
-
children: /* @__PURE__ */
|
|
561
|
+
children: /* @__PURE__ */ jsx6(CaretDownIcon, {})
|
|
568
562
|
}
|
|
569
563
|
));
|
|
570
564
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
571
565
|
var SelectContent = React6.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
572
566
|
const contentPosition = position || "popper";
|
|
573
|
-
return /* @__PURE__ */
|
|
567
|
+
return /* @__PURE__ */ jsx6(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
574
568
|
SelectPrimitive.Content,
|
|
575
569
|
{
|
|
576
570
|
ref,
|
|
@@ -581,8 +575,8 @@ var SelectContent = React6.forwardRef(({ className, children, position = "popper
|
|
|
581
575
|
position: contentPosition,
|
|
582
576
|
...props,
|
|
583
577
|
children: [
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ jsx6(SelectScrollUpButton, {}),
|
|
579
|
+
/* @__PURE__ */ jsx6(
|
|
586
580
|
SelectPrimitive.Viewport,
|
|
587
581
|
{
|
|
588
582
|
className: cn(
|
|
@@ -592,13 +586,13 @@ var SelectContent = React6.forwardRef(({ className, children, position = "popper
|
|
|
592
586
|
children
|
|
593
587
|
}
|
|
594
588
|
),
|
|
595
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ jsx6(SelectScrollDownButton, {})
|
|
596
590
|
]
|
|
597
591
|
}
|
|
598
592
|
) });
|
|
599
593
|
});
|
|
600
594
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
601
|
-
var SelectLabel = React6.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */
|
|
595
|
+
var SelectLabel = React6.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
602
596
|
SelectPrimitive.Label,
|
|
603
597
|
{
|
|
604
598
|
ref,
|
|
@@ -609,7 +603,7 @@ var SelectLabel = React6.forwardRef(({ className, children, style, ...props }, r
|
|
|
609
603
|
}
|
|
610
604
|
));
|
|
611
605
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
612
|
-
var SelectItem = React6.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */
|
|
606
|
+
var SelectItem = React6.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
613
607
|
SelectPrimitive.Item,
|
|
614
608
|
{
|
|
615
609
|
ref,
|
|
@@ -624,13 +618,13 @@ var SelectItem = React6.forwardRef(({ className, children, style, ...props }, re
|
|
|
624
618
|
style: { font: "var(--typography-label-md-regular)", ...style },
|
|
625
619
|
...props,
|
|
626
620
|
children: [
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ jsx6(SelectPrimitive.ItemText, { className: "flex-1 truncate", children }),
|
|
622
|
+
/* @__PURE__ */ jsx6(SelectPrimitive.ItemIndicator, { className: "flex h-4 w-4 items-center justify-center ml-auto", children: /* @__PURE__ */ jsx6(CheckIcon, { className: "text-strong" }) })
|
|
629
623
|
]
|
|
630
624
|
}
|
|
631
625
|
));
|
|
632
626
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
633
|
-
var SelectSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
627
|
+
var SelectSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
634
628
|
SelectPrimitive.Separator,
|
|
635
629
|
{
|
|
636
630
|
ref,
|
|
@@ -645,31 +639,30 @@ import { useMemo } from "react";
|
|
|
645
639
|
import { cva as cva6 } from "class-variance-authority";
|
|
646
640
|
|
|
647
641
|
// src/components/ui/label.tsx
|
|
648
|
-
import * as
|
|
649
|
-
import { jsx as
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
...props
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}
|
|
642
|
+
import * as React7 from "react";
|
|
643
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
644
|
+
var labelClasses = "type-label-sm-medium flex flex-row items-center gap-2 text-default select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50";
|
|
645
|
+
var Label2 = React7.forwardRef(
|
|
646
|
+
({ className, ...props }, ref) => {
|
|
647
|
+
return /* @__PURE__ */ jsx7(
|
|
648
|
+
"label",
|
|
649
|
+
{
|
|
650
|
+
ref,
|
|
651
|
+
"data-slot": "label",
|
|
652
|
+
className: cn(labelClasses, className),
|
|
653
|
+
...props
|
|
654
|
+
}
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
);
|
|
658
|
+
Label2.displayName = "Label";
|
|
666
659
|
|
|
667
660
|
// src/components/ui/separator.tsx
|
|
668
|
-
import * as
|
|
661
|
+
import * as React8 from "react";
|
|
669
662
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
670
|
-
import { jsx as
|
|
671
|
-
var Separator2 =
|
|
672
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */
|
|
663
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
664
|
+
var Separator2 = React8.forwardRef(
|
|
665
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
673
666
|
SeparatorPrimitive,
|
|
674
667
|
{
|
|
675
668
|
ref,
|
|
@@ -686,9 +679,9 @@ var Separator2 = React7.forwardRef(
|
|
|
686
679
|
Separator2.displayName = "Separator";
|
|
687
680
|
|
|
688
681
|
// src/components/ui/field.tsx
|
|
689
|
-
import { jsx as
|
|
682
|
+
import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
690
683
|
function FieldSet({ className, ...props }) {
|
|
691
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ jsx9(
|
|
692
685
|
"fieldset",
|
|
693
686
|
{
|
|
694
687
|
"data-slot": "field-set",
|
|
@@ -706,7 +699,7 @@ function FieldLegend({
|
|
|
706
699
|
variant = "legend",
|
|
707
700
|
...props
|
|
708
701
|
}) {
|
|
709
|
-
return /* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ jsx9(
|
|
710
703
|
"legend",
|
|
711
704
|
{
|
|
712
705
|
"data-slot": "field-legend",
|
|
@@ -722,7 +715,7 @@ function FieldLegend({
|
|
|
722
715
|
);
|
|
723
716
|
}
|
|
724
717
|
function FieldGroup({ className, ...props }) {
|
|
725
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ jsx9(
|
|
726
719
|
"div",
|
|
727
720
|
{
|
|
728
721
|
"data-slot": "field-group",
|
|
@@ -762,7 +755,7 @@ function Field({
|
|
|
762
755
|
orientation = "vertical",
|
|
763
756
|
...props
|
|
764
757
|
}) {
|
|
765
|
-
return /* @__PURE__ */
|
|
758
|
+
return /* @__PURE__ */ jsx9(
|
|
766
759
|
"div",
|
|
767
760
|
{
|
|
768
761
|
role: "group",
|
|
@@ -774,7 +767,7 @@ function Field({
|
|
|
774
767
|
);
|
|
775
768
|
}
|
|
776
769
|
function FieldContent({ className, ...props }) {
|
|
777
|
-
return /* @__PURE__ */
|
|
770
|
+
return /* @__PURE__ */ jsx9(
|
|
778
771
|
"div",
|
|
779
772
|
{
|
|
780
773
|
"data-slot": "field-content",
|
|
@@ -790,7 +783,7 @@ function FieldLabel({
|
|
|
790
783
|
className,
|
|
791
784
|
...props
|
|
792
785
|
}) {
|
|
793
|
-
return /* @__PURE__ */
|
|
786
|
+
return /* @__PURE__ */ jsx9(
|
|
794
787
|
Label2,
|
|
795
788
|
{
|
|
796
789
|
"data-slot": "field-label",
|
|
@@ -805,7 +798,7 @@ function FieldLabel({
|
|
|
805
798
|
);
|
|
806
799
|
}
|
|
807
800
|
function FieldTitle({ className, ...props }) {
|
|
808
|
-
return /* @__PURE__ */
|
|
801
|
+
return /* @__PURE__ */ jsx9(
|
|
809
802
|
"div",
|
|
810
803
|
{
|
|
811
804
|
"data-slot": "field-label",
|
|
@@ -818,7 +811,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
818
811
|
);
|
|
819
812
|
}
|
|
820
813
|
function FieldDescription({ className, ...props }) {
|
|
821
|
-
return /* @__PURE__ */
|
|
814
|
+
return /* @__PURE__ */ jsx9(
|
|
822
815
|
"p",
|
|
823
816
|
{
|
|
824
817
|
"data-slot": "field-description",
|
|
@@ -837,7 +830,7 @@ function FieldSeparator({
|
|
|
837
830
|
className,
|
|
838
831
|
...props
|
|
839
832
|
}) {
|
|
840
|
-
return /* @__PURE__ */
|
|
833
|
+
return /* @__PURE__ */ jsxs2(
|
|
841
834
|
"div",
|
|
842
835
|
{
|
|
843
836
|
"data-slot": "field-separator",
|
|
@@ -848,8 +841,8 @@ function FieldSeparator({
|
|
|
848
841
|
),
|
|
849
842
|
...props,
|
|
850
843
|
children: [
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
children && /* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ jsx9(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
845
|
+
children && /* @__PURE__ */ jsx9(
|
|
853
846
|
"span",
|
|
854
847
|
{
|
|
855
848
|
className: "bg-light text-secondary relative mx-auto block w-fit px-2",
|
|
@@ -877,14 +870,14 @@ function FieldError({
|
|
|
877
870
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
878
871
|
return errors[0].message;
|
|
879
872
|
}
|
|
880
|
-
return /* @__PURE__ */
|
|
881
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
873
|
+
return /* @__PURE__ */ jsx9("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
874
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx9("li", { children: error.message }, index)
|
|
882
875
|
) });
|
|
883
876
|
}, [children, errors]);
|
|
884
877
|
if (!content) {
|
|
885
878
|
return null;
|
|
886
879
|
}
|
|
887
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ jsx9(
|
|
888
881
|
"div",
|
|
889
882
|
{
|
|
890
883
|
role: "alert",
|
|
@@ -897,12 +890,12 @@ function FieldError({
|
|
|
897
890
|
}
|
|
898
891
|
|
|
899
892
|
// src/components/ui/breadcrumb.tsx
|
|
900
|
-
import * as
|
|
893
|
+
import * as React9 from "react";
|
|
901
894
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
902
895
|
import { useRender } from "@base-ui/react/use-render";
|
|
903
|
-
import { jsx as
|
|
904
|
-
var Breadcrumb =
|
|
905
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
896
|
+
import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
897
|
+
var Breadcrumb = React9.forwardRef(
|
|
898
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
906
899
|
"nav",
|
|
907
900
|
{
|
|
908
901
|
"aria-label": "breadcrumb",
|
|
@@ -914,8 +907,8 @@ var Breadcrumb = React8.forwardRef(
|
|
|
914
907
|
)
|
|
915
908
|
);
|
|
916
909
|
Breadcrumb.displayName = "Breadcrumb";
|
|
917
|
-
var BreadcrumbList =
|
|
918
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
910
|
+
var BreadcrumbList = React9.forwardRef(
|
|
911
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
919
912
|
"ol",
|
|
920
913
|
{
|
|
921
914
|
"data-slot": "breadcrumb-list",
|
|
@@ -929,8 +922,8 @@ var BreadcrumbList = React8.forwardRef(
|
|
|
929
922
|
)
|
|
930
923
|
);
|
|
931
924
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
932
|
-
var BreadcrumbItem =
|
|
933
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
925
|
+
var BreadcrumbItem = React9.forwardRef(
|
|
926
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
934
927
|
"li",
|
|
935
928
|
{
|
|
936
929
|
"data-slot": "breadcrumb-item",
|
|
@@ -941,7 +934,7 @@ var BreadcrumbItem = React8.forwardRef(
|
|
|
941
934
|
)
|
|
942
935
|
);
|
|
943
936
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
944
|
-
var BreadcrumbLink =
|
|
937
|
+
var BreadcrumbLink = React9.forwardRef(
|
|
945
938
|
({ className, render, ...props }, ref) => useRender({
|
|
946
939
|
ref,
|
|
947
940
|
defaultTagName: "a",
|
|
@@ -958,8 +951,8 @@ var BreadcrumbLink = React8.forwardRef(
|
|
|
958
951
|
})
|
|
959
952
|
);
|
|
960
953
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
961
|
-
var BreadcrumbPage =
|
|
962
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
954
|
+
var BreadcrumbPage = React9.forwardRef(
|
|
955
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
963
956
|
"span",
|
|
964
957
|
{
|
|
965
958
|
"data-slot": "breadcrumb-page",
|
|
@@ -973,7 +966,7 @@ var BreadcrumbPage = React8.forwardRef(
|
|
|
973
966
|
)
|
|
974
967
|
);
|
|
975
968
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
976
|
-
var BreadcrumbSeparator =
|
|
969
|
+
var BreadcrumbSeparator = React9.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
977
970
|
"li",
|
|
978
971
|
{
|
|
979
972
|
"data-slot": "breadcrumb-separator",
|
|
@@ -982,11 +975,11 @@ var BreadcrumbSeparator = React8.forwardRef(({ children, className, ...props },
|
|
|
982
975
|
className: cn("[&>svg]:size-3.5", className),
|
|
983
976
|
ref,
|
|
984
977
|
...props,
|
|
985
|
-
children: children ?? /* @__PURE__ */
|
|
978
|
+
children: children ?? /* @__PURE__ */ jsx10(CaretRightIcon, { className: "cn-rtl-flip" })
|
|
986
979
|
}
|
|
987
980
|
));
|
|
988
981
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
989
|
-
var BreadcrumbEllipsis =
|
|
982
|
+
var BreadcrumbEllipsis = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs3(
|
|
990
983
|
"span",
|
|
991
984
|
{
|
|
992
985
|
"data-slot": "breadcrumb-ellipsis",
|
|
@@ -999,22 +992,22 @@ var BreadcrumbEllipsis = React8.forwardRef(({ className, ...props }, ref) => /*
|
|
|
999
992
|
ref,
|
|
1000
993
|
...props,
|
|
1001
994
|
children: [
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ jsx10(MoreMenuIcon, {}),
|
|
996
|
+
/* @__PURE__ */ jsx10("span", { className: "sr-only", children: "More" })
|
|
1004
997
|
]
|
|
1005
998
|
}
|
|
1006
999
|
));
|
|
1007
1000
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
1008
1001
|
|
|
1009
1002
|
// src/components/ui/tooltip.tsx
|
|
1010
|
-
import * as
|
|
1003
|
+
import * as React10 from "react";
|
|
1011
1004
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
1012
|
-
import { jsx as
|
|
1005
|
+
import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1013
1006
|
function TooltipProvider({
|
|
1014
1007
|
delayDuration = 0,
|
|
1015
1008
|
...props
|
|
1016
1009
|
}) {
|
|
1017
|
-
return /* @__PURE__ */
|
|
1010
|
+
return /* @__PURE__ */ jsx11(
|
|
1018
1011
|
TooltipPrimitive.Provider,
|
|
1019
1012
|
{
|
|
1020
1013
|
"data-slot": "tooltip-provider",
|
|
@@ -1025,11 +1018,11 @@ function TooltipProvider({
|
|
|
1025
1018
|
}
|
|
1026
1019
|
TooltipProvider.displayName = "TooltipProvider";
|
|
1027
1020
|
function Tooltip({ delayDuration, ...props }) {
|
|
1028
|
-
return /* @__PURE__ */
|
|
1021
|
+
return /* @__PURE__ */ jsx11(TooltipProvider, { delayDuration, children: /* @__PURE__ */ jsx11(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
1029
1022
|
}
|
|
1030
1023
|
Tooltip.displayName = "Tooltip";
|
|
1031
|
-
var TooltipTrigger =
|
|
1032
|
-
return /* @__PURE__ */
|
|
1024
|
+
var TooltipTrigger = React10.forwardRef(({ ...props }, ref) => {
|
|
1025
|
+
return /* @__PURE__ */ jsx11(
|
|
1033
1026
|
TooltipPrimitive.Trigger,
|
|
1034
1027
|
{
|
|
1035
1028
|
ref,
|
|
@@ -1039,8 +1032,8 @@ var TooltipTrigger = React9.forwardRef(({ ...props }, ref) => {
|
|
|
1039
1032
|
);
|
|
1040
1033
|
});
|
|
1041
1034
|
TooltipTrigger.displayName = "TooltipTrigger";
|
|
1042
|
-
var TooltipContent =
|
|
1043
|
-
return /* @__PURE__ */
|
|
1035
|
+
var TooltipContent = React10.forwardRef(({ className, sideOffset = 2, children, ...props }, ref) => {
|
|
1036
|
+
return /* @__PURE__ */ jsx11(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs4(
|
|
1044
1037
|
TooltipPrimitive.Content,
|
|
1045
1038
|
{
|
|
1046
1039
|
ref,
|
|
@@ -1052,7 +1045,7 @@ var TooltipContent = React9.forwardRef(({ className, sideOffset = 2, children, .
|
|
|
1052
1045
|
),
|
|
1053
1046
|
...props,
|
|
1054
1047
|
children: [
|
|
1055
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ jsx11(TooltipPrimitive.Arrow, { className: "fill-dark", width: 10, height: 9 }),
|
|
1056
1049
|
children
|
|
1057
1050
|
]
|
|
1058
1051
|
}
|
|
@@ -1061,21 +1054,21 @@ var TooltipContent = React9.forwardRef(({ className, sideOffset = 2, children, .
|
|
|
1061
1054
|
TooltipContent.displayName = "TooltipContent";
|
|
1062
1055
|
|
|
1063
1056
|
// src/components/ui/sidebar.tsx
|
|
1064
|
-
import * as
|
|
1065
|
-
import { jsx as
|
|
1057
|
+
import * as React11 from "react";
|
|
1058
|
+
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1066
1059
|
var SIDEBAR_CONSTANTS = {
|
|
1067
1060
|
WIDTH: "144px",
|
|
1068
1061
|
WIDTH_ICON: "48px"
|
|
1069
1062
|
};
|
|
1070
|
-
var SidebarContext =
|
|
1063
|
+
var SidebarContext = React11.createContext(null);
|
|
1071
1064
|
function useSidebar() {
|
|
1072
|
-
const context =
|
|
1065
|
+
const context = React11.useContext(SidebarContext);
|
|
1073
1066
|
if (!context) {
|
|
1074
1067
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1075
1068
|
}
|
|
1076
1069
|
return context;
|
|
1077
1070
|
}
|
|
1078
|
-
var SidebarProvider =
|
|
1071
|
+
var SidebarProvider = React11.forwardRef(
|
|
1079
1072
|
({
|
|
1080
1073
|
defaultOpen = true,
|
|
1081
1074
|
open: openProp,
|
|
@@ -1085,9 +1078,9 @@ var SidebarProvider = React10.forwardRef(
|
|
|
1085
1078
|
children,
|
|
1086
1079
|
...props
|
|
1087
1080
|
}, ref) => {
|
|
1088
|
-
const [_open, _setOpen] =
|
|
1081
|
+
const [_open, _setOpen] = React11.useState(defaultOpen);
|
|
1089
1082
|
const open = openProp ?? _open;
|
|
1090
|
-
const setOpen =
|
|
1083
|
+
const setOpen = React11.useCallback(
|
|
1091
1084
|
(value) => {
|
|
1092
1085
|
const openState = typeof value === "function" ? value(open) : value;
|
|
1093
1086
|
if (setOpenProp) {
|
|
@@ -1098,11 +1091,11 @@ var SidebarProvider = React10.forwardRef(
|
|
|
1098
1091
|
},
|
|
1099
1092
|
[setOpenProp, open]
|
|
1100
1093
|
);
|
|
1101
|
-
const toggleSidebar =
|
|
1094
|
+
const toggleSidebar = React11.useCallback(() => {
|
|
1102
1095
|
return setOpen((open2) => !open2);
|
|
1103
1096
|
}, [setOpen]);
|
|
1104
1097
|
const state = open ? "expanded" : "collapsed";
|
|
1105
|
-
const contextValue =
|
|
1098
|
+
const contextValue = React11.useMemo(
|
|
1106
1099
|
() => ({
|
|
1107
1100
|
state,
|
|
1108
1101
|
open,
|
|
@@ -1111,7 +1104,7 @@ var SidebarProvider = React10.forwardRef(
|
|
|
1111
1104
|
}),
|
|
1112
1105
|
[state, open, setOpen, toggleSidebar]
|
|
1113
1106
|
);
|
|
1114
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ jsx12(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx12(
|
|
1115
1108
|
"div",
|
|
1116
1109
|
{
|
|
1117
1110
|
style: {
|
|
@@ -1131,10 +1124,10 @@ var SidebarProvider = React10.forwardRef(
|
|
|
1131
1124
|
}
|
|
1132
1125
|
);
|
|
1133
1126
|
SidebarProvider.displayName = "SidebarProvider";
|
|
1134
|
-
var Sidebar =
|
|
1127
|
+
var Sidebar = React11.forwardRef(
|
|
1135
1128
|
({ collapsible = "icon", className, children, ...props }, ref) => {
|
|
1136
1129
|
const { state } = useSidebar();
|
|
1137
|
-
return /* @__PURE__ */
|
|
1130
|
+
return /* @__PURE__ */ jsxs5(
|
|
1138
1131
|
"aside",
|
|
1139
1132
|
{
|
|
1140
1133
|
ref,
|
|
@@ -1145,7 +1138,7 @@ var Sidebar = React10.forwardRef(
|
|
|
1145
1138
|
"aria-expanded": state === "expanded",
|
|
1146
1139
|
role: "navigation",
|
|
1147
1140
|
children: [
|
|
1148
|
-
/* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ jsx12(
|
|
1149
1142
|
"div",
|
|
1150
1143
|
{
|
|
1151
1144
|
className: cn(
|
|
@@ -1154,7 +1147,7 @@ var Sidebar = React10.forwardRef(
|
|
|
1154
1147
|
)
|
|
1155
1148
|
}
|
|
1156
1149
|
),
|
|
1157
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ jsx12(
|
|
1158
1151
|
"div",
|
|
1159
1152
|
{
|
|
1160
1153
|
className: cn(
|
|
@@ -1163,7 +1156,7 @@ var Sidebar = React10.forwardRef(
|
|
|
1163
1156
|
className
|
|
1164
1157
|
),
|
|
1165
1158
|
...props,
|
|
1166
|
-
children: /* @__PURE__ */
|
|
1159
|
+
children: /* @__PURE__ */ jsx12(
|
|
1167
1160
|
"div",
|
|
1168
1161
|
{
|
|
1169
1162
|
"data-sidebar": "sidebar",
|
|
@@ -1179,9 +1172,9 @@ var Sidebar = React10.forwardRef(
|
|
|
1179
1172
|
}
|
|
1180
1173
|
);
|
|
1181
1174
|
Sidebar.displayName = "Sidebar";
|
|
1182
|
-
var SidebarInset =
|
|
1175
|
+
var SidebarInset = React11.forwardRef(
|
|
1183
1176
|
({ className, ...props }, ref) => {
|
|
1184
|
-
return /* @__PURE__ */
|
|
1177
|
+
return /* @__PURE__ */ jsx12(
|
|
1185
1178
|
"main",
|
|
1186
1179
|
{
|
|
1187
1180
|
ref,
|
|
@@ -1195,9 +1188,9 @@ var SidebarInset = React10.forwardRef(
|
|
|
1195
1188
|
}
|
|
1196
1189
|
);
|
|
1197
1190
|
SidebarInset.displayName = "SidebarInset";
|
|
1198
|
-
var SidebarHeader =
|
|
1191
|
+
var SidebarHeader = React11.forwardRef(
|
|
1199
1192
|
({ className, ...props }, ref) => {
|
|
1200
|
-
return /* @__PURE__ */
|
|
1193
|
+
return /* @__PURE__ */ jsx12(
|
|
1201
1194
|
"div",
|
|
1202
1195
|
{
|
|
1203
1196
|
ref,
|
|
@@ -1213,9 +1206,9 @@ var SidebarHeader = React10.forwardRef(
|
|
|
1213
1206
|
}
|
|
1214
1207
|
);
|
|
1215
1208
|
SidebarHeader.displayName = "SidebarHeader";
|
|
1216
|
-
var SidebarFooter =
|
|
1209
|
+
var SidebarFooter = React11.forwardRef(
|
|
1217
1210
|
({ className, ...props }, ref) => {
|
|
1218
|
-
return /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ jsx12(
|
|
1219
1212
|
"div",
|
|
1220
1213
|
{
|
|
1221
1214
|
ref,
|
|
@@ -1227,9 +1220,9 @@ var SidebarFooter = React10.forwardRef(
|
|
|
1227
1220
|
}
|
|
1228
1221
|
);
|
|
1229
1222
|
SidebarFooter.displayName = "SidebarFooter";
|
|
1230
|
-
var SidebarContent =
|
|
1223
|
+
var SidebarContent = React11.forwardRef(
|
|
1231
1224
|
({ className, ...props }, ref) => {
|
|
1232
|
-
return /* @__PURE__ */
|
|
1225
|
+
return /* @__PURE__ */ jsx12(
|
|
1233
1226
|
"div",
|
|
1234
1227
|
{
|
|
1235
1228
|
ref,
|
|
@@ -1244,9 +1237,9 @@ var SidebarContent = React10.forwardRef(
|
|
|
1244
1237
|
}
|
|
1245
1238
|
);
|
|
1246
1239
|
SidebarContent.displayName = "SidebarContent";
|
|
1247
|
-
var SidebarGroup =
|
|
1240
|
+
var SidebarGroup = React11.forwardRef(
|
|
1248
1241
|
({ className, ...props }, ref) => {
|
|
1249
|
-
return /* @__PURE__ */
|
|
1242
|
+
return /* @__PURE__ */ jsx12(
|
|
1250
1243
|
"div",
|
|
1251
1244
|
{
|
|
1252
1245
|
ref,
|
|
@@ -1258,7 +1251,7 @@ var SidebarGroup = React10.forwardRef(
|
|
|
1258
1251
|
}
|
|
1259
1252
|
);
|
|
1260
1253
|
SidebarGroup.displayName = "SidebarGroup";
|
|
1261
|
-
var SidebarGroupContent =
|
|
1254
|
+
var SidebarGroupContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
1262
1255
|
"div",
|
|
1263
1256
|
{
|
|
1264
1257
|
ref,
|
|
@@ -1268,8 +1261,8 @@ var SidebarGroupContent = React10.forwardRef(({ className, ...props }, ref) => /
|
|
|
1268
1261
|
}
|
|
1269
1262
|
));
|
|
1270
1263
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
1271
|
-
var SidebarMenu =
|
|
1272
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1264
|
+
var SidebarMenu = React11.forwardRef(
|
|
1265
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
1273
1266
|
"ul",
|
|
1274
1267
|
{
|
|
1275
1268
|
ref,
|
|
@@ -1280,8 +1273,8 @@ var SidebarMenu = React10.forwardRef(
|
|
|
1280
1273
|
)
|
|
1281
1274
|
);
|
|
1282
1275
|
SidebarMenu.displayName = "SidebarMenu";
|
|
1283
|
-
var SidebarMenuItem =
|
|
1284
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1276
|
+
var SidebarMenuItem = React11.forwardRef(
|
|
1277
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
1285
1278
|
"li",
|
|
1286
1279
|
{
|
|
1287
1280
|
ref,
|
|
@@ -1292,9 +1285,9 @@ var SidebarMenuItem = React10.forwardRef(
|
|
|
1292
1285
|
)
|
|
1293
1286
|
);
|
|
1294
1287
|
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
1295
|
-
var SidebarMenuButton =
|
|
1288
|
+
var SidebarMenuButton = React11.forwardRef(({ isActive = false, tooltip, className, children, ...props }, ref) => {
|
|
1296
1289
|
const { state } = useSidebar();
|
|
1297
|
-
const button = /* @__PURE__ */
|
|
1290
|
+
const button = /* @__PURE__ */ jsx12(
|
|
1298
1291
|
"button",
|
|
1299
1292
|
{
|
|
1300
1293
|
ref,
|
|
@@ -1313,22 +1306,22 @@ var SidebarMenuButton = React10.forwardRef(({ isActive = false, tooltip, classNa
|
|
|
1313
1306
|
return button;
|
|
1314
1307
|
}
|
|
1315
1308
|
const tooltipProps = typeof tooltip === "string" ? { children: tooltip } : tooltip;
|
|
1316
|
-
return /* @__PURE__ */
|
|
1317
|
-
/* @__PURE__ */
|
|
1318
|
-
/* @__PURE__ */
|
|
1309
|
+
return /* @__PURE__ */ jsxs5(Tooltip, { delayDuration: 0, children: [
|
|
1310
|
+
/* @__PURE__ */ jsx12(TooltipTrigger, { asChild: true, children: button }),
|
|
1311
|
+
/* @__PURE__ */ jsx12(TooltipContent, { side: "right", align: "center", ...tooltipProps })
|
|
1319
1312
|
] });
|
|
1320
1313
|
});
|
|
1321
1314
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
1322
1315
|
|
|
1323
1316
|
// src/components/ui/date-picker.tsx
|
|
1324
|
-
import * as
|
|
1317
|
+
import * as React13 from "react";
|
|
1325
1318
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1326
1319
|
|
|
1327
1320
|
// src/components/ui/input.tsx
|
|
1328
|
-
import * as
|
|
1329
|
-
import { jsx as
|
|
1321
|
+
import * as React12 from "react";
|
|
1322
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1330
1323
|
var inputBaseStyles = "flex h-10 py-2 w-full border bg-light text-dark focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 transition-colors rounded-md px-3 min-w-80 placeholder:text-secondary read-only:bg-gray read-only:cursor-default read-only:border-transparent read-only:text-secondary read-only:focus-visible:border-transparent border-secondary focus-visible:border-2 focus-visible:border-strong disabled:border-secondary aria-invalid:border-error aria-invalid:focus-visible:border-error";
|
|
1331
|
-
var Input =
|
|
1324
|
+
var Input = React12.forwardRef(
|
|
1332
1325
|
({
|
|
1333
1326
|
className,
|
|
1334
1327
|
style,
|
|
@@ -1339,7 +1332,7 @@ var Input = React11.forwardRef(
|
|
|
1339
1332
|
readOnly,
|
|
1340
1333
|
...props
|
|
1341
1334
|
}, ref) => {
|
|
1342
|
-
const [internalValue, setInternalValue] =
|
|
1335
|
+
const [internalValue, setInternalValue] = React12.useState(value || "");
|
|
1343
1336
|
const isControlled = value !== void 0;
|
|
1344
1337
|
const currentValue = isControlled ? value : internalValue;
|
|
1345
1338
|
const showClear = showClearProp !== false && currentValue && currentValue.toString().length > 0 && !readOnly;
|
|
@@ -1369,8 +1362,8 @@ var Input = React11.forwardRef(
|
|
|
1369
1362
|
}
|
|
1370
1363
|
onClear?.();
|
|
1371
1364
|
};
|
|
1372
|
-
return /* @__PURE__ */
|
|
1373
|
-
/* @__PURE__ */
|
|
1365
|
+
return /* @__PURE__ */ jsxs6("div", { className: "relative", children: [
|
|
1366
|
+
/* @__PURE__ */ jsx13(
|
|
1374
1367
|
"input",
|
|
1375
1368
|
{
|
|
1376
1369
|
className: cn(
|
|
@@ -1386,23 +1379,23 @@ var Input = React11.forwardRef(
|
|
|
1386
1379
|
...props
|
|
1387
1380
|
}
|
|
1388
1381
|
),
|
|
1389
|
-
showClear && /* @__PURE__ */
|
|
1382
|
+
showClear && /* @__PURE__ */ jsx13(
|
|
1390
1383
|
"button",
|
|
1391
1384
|
{
|
|
1392
1385
|
type: "button",
|
|
1393
1386
|
onClick: handleClear,
|
|
1394
1387
|
className: "absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-secondary hover:text-dark transition-colors",
|
|
1395
|
-
children: /* @__PURE__ */
|
|
1388
|
+
children: /* @__PURE__ */ jsx13(CloseIcon, {})
|
|
1396
1389
|
}
|
|
1397
1390
|
),
|
|
1398
|
-
showLock && /* @__PURE__ */
|
|
1391
|
+
showLock && /* @__PURE__ */ jsx13(LockIcon, { className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-secondary" })
|
|
1399
1392
|
] });
|
|
1400
1393
|
}
|
|
1401
1394
|
);
|
|
1402
1395
|
Input.displayName = "Input";
|
|
1403
1396
|
|
|
1404
1397
|
// src/components/ui/date-picker.tsx
|
|
1405
|
-
import { jsx as
|
|
1398
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1406
1399
|
var getDayNames = () => {
|
|
1407
1400
|
const days = [];
|
|
1408
1401
|
for (let i = 0; i < 7; i++) {
|
|
@@ -1438,7 +1431,7 @@ var formatDateInput = (date) => {
|
|
|
1438
1431
|
day: "2-digit"
|
|
1439
1432
|
});
|
|
1440
1433
|
};
|
|
1441
|
-
var DatePicker =
|
|
1434
|
+
var DatePicker = React13.forwardRef(
|
|
1442
1435
|
({
|
|
1443
1436
|
value,
|
|
1444
1437
|
onValueChange,
|
|
@@ -1457,19 +1450,19 @@ var DatePicker = React12.forwardRef(
|
|
|
1457
1450
|
if (isNaN(parsed.getTime())) return void 0;
|
|
1458
1451
|
return parsed;
|
|
1459
1452
|
};
|
|
1460
|
-
const [selectedDate, setSelectedDate] =
|
|
1453
|
+
const [selectedDate, setSelectedDate] = React13.useState(
|
|
1461
1454
|
value || parseDate(defaultValue)
|
|
1462
1455
|
);
|
|
1463
|
-
const [currentMonth, setCurrentMonth] =
|
|
1456
|
+
const [currentMonth, setCurrentMonth] = React13.useState(() => {
|
|
1464
1457
|
const date = value || parseDate(defaultValue) || /* @__PURE__ */ new Date();
|
|
1465
1458
|
return new Date(date.getFullYear(), date.getMonth());
|
|
1466
1459
|
});
|
|
1467
|
-
const [open, setOpen] =
|
|
1468
|
-
const [inputValue, setInputValue] =
|
|
1460
|
+
const [open, setOpen] = React13.useState(false);
|
|
1461
|
+
const [inputValue, setInputValue] = React13.useState(() => {
|
|
1469
1462
|
const initialDate = value || parseDate(defaultValue);
|
|
1470
1463
|
return initialDate ? formatDateInput(initialDate) : "";
|
|
1471
1464
|
});
|
|
1472
|
-
|
|
1465
|
+
React13.useEffect(() => {
|
|
1473
1466
|
setSelectedDate(value);
|
|
1474
1467
|
if (value) {
|
|
1475
1468
|
setCurrentMonth(new Date(value.getFullYear(), value.getMonth()));
|
|
@@ -1480,7 +1473,7 @@ var DatePicker = React12.forwardRef(
|
|
|
1480
1473
|
setInputValue("");
|
|
1481
1474
|
}
|
|
1482
1475
|
}, [value]);
|
|
1483
|
-
|
|
1476
|
+
React13.useEffect(() => {
|
|
1484
1477
|
if (value) return;
|
|
1485
1478
|
const parsedDefault = parseDate(defaultValue);
|
|
1486
1479
|
if (!parsedDefault) return;
|
|
@@ -1603,14 +1596,14 @@ var DatePicker = React12.forwardRef(
|
|
|
1603
1596
|
const months = getMonthNames();
|
|
1604
1597
|
const dayNames = getDayNames();
|
|
1605
1598
|
const years = generateYears();
|
|
1606
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ jsxs7(
|
|
1607
1600
|
PopoverPrimitive.Root,
|
|
1608
1601
|
{
|
|
1609
1602
|
open: disabled ? false : open,
|
|
1610
1603
|
onOpenChange: disabled ? void 0 : setOpen,
|
|
1611
1604
|
children: [
|
|
1612
|
-
/* @__PURE__ */
|
|
1613
|
-
/* @__PURE__ */
|
|
1605
|
+
/* @__PURE__ */ jsxs7("div", { className: "relative", children: [
|
|
1606
|
+
/* @__PURE__ */ jsx14(
|
|
1614
1607
|
Input,
|
|
1615
1608
|
{
|
|
1616
1609
|
ref,
|
|
@@ -1623,7 +1616,7 @@ var DatePicker = React12.forwardRef(
|
|
|
1623
1616
|
...props
|
|
1624
1617
|
}
|
|
1625
1618
|
),
|
|
1626
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ jsx14(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx14("button", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 hover:bg-gray rounded p-0.5 transition-colors", children: /* @__PURE__ */ jsx14(
|
|
1627
1620
|
CalendarIcon,
|
|
1628
1621
|
{
|
|
1629
1622
|
size: 20,
|
|
@@ -1634,7 +1627,7 @@ var DatePicker = React12.forwardRef(
|
|
|
1634
1627
|
}
|
|
1635
1628
|
) }) })
|
|
1636
1629
|
] }),
|
|
1637
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ jsx14(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx14(
|
|
1638
1631
|
PopoverPrimitive.Content,
|
|
1639
1632
|
{
|
|
1640
1633
|
className: "z-50 w-80 rounded-lg border border-secondary bg-light text-dark shadow-lg animate-in fade-in-0 zoom-in-95 duration-200",
|
|
@@ -1643,51 +1636,51 @@ var DatePicker = React12.forwardRef(
|
|
|
1643
1636
|
alignOffset: -12,
|
|
1644
1637
|
side: "bottom",
|
|
1645
1638
|
sticky: "always",
|
|
1646
|
-
children: /* @__PURE__ */
|
|
1647
|
-
/* @__PURE__ */
|
|
1648
|
-
/* @__PURE__ */
|
|
1639
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "p-4", children: [
|
|
1640
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between mb-4 gap-1", children: [
|
|
1641
|
+
/* @__PURE__ */ jsx14(
|
|
1649
1642
|
"button",
|
|
1650
1643
|
{
|
|
1651
1644
|
onClick: () => handleMonthChange("prev"),
|
|
1652
1645
|
className: "p-1 hover:bg-gray rounded transition-colors flex-shrink-0",
|
|
1653
|
-
children: /* @__PURE__ */
|
|
1646
|
+
children: /* @__PURE__ */ jsx14(ArrowLeftIcon, {})
|
|
1654
1647
|
}
|
|
1655
1648
|
),
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
/* @__PURE__ */
|
|
1649
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex gap-1 flex-1 min-w-0", children: [
|
|
1650
|
+
/* @__PURE__ */ jsxs7(
|
|
1658
1651
|
Select,
|
|
1659
1652
|
{
|
|
1660
1653
|
value: currentMonth.getMonth().toString(),
|
|
1661
1654
|
onValueChange: handleMonthSelect,
|
|
1662
1655
|
children: [
|
|
1663
|
-
/* @__PURE__ */
|
|
1664
|
-
/* @__PURE__ */
|
|
1656
|
+
/* @__PURE__ */ jsx14(SelectTrigger, { className: "min-w-fit h-8 text-sm", children: /* @__PURE__ */ jsx14(SelectValue, {}) }),
|
|
1657
|
+
/* @__PURE__ */ jsx14(SelectContent, { children: months.map((month, index) => /* @__PURE__ */ jsx14(SelectItem, { value: index.toString(), children: month }, month)) })
|
|
1665
1658
|
]
|
|
1666
1659
|
}
|
|
1667
1660
|
),
|
|
1668
|
-
/* @__PURE__ */
|
|
1661
|
+
/* @__PURE__ */ jsxs7(
|
|
1669
1662
|
Select,
|
|
1670
1663
|
{
|
|
1671
1664
|
value: currentMonth.getFullYear().toString(),
|
|
1672
1665
|
onValueChange: handleYearSelect,
|
|
1673
1666
|
children: [
|
|
1674
|
-
/* @__PURE__ */
|
|
1675
|
-
/* @__PURE__ */
|
|
1667
|
+
/* @__PURE__ */ jsx14(SelectTrigger, { className: "min-w-fit h-8 text-sm", children: /* @__PURE__ */ jsx14(SelectValue, {}) }),
|
|
1668
|
+
/* @__PURE__ */ jsx14(SelectContent, { children: years.map((year) => /* @__PURE__ */ jsx14(SelectItem, { value: year.toString(), children: year }, year)) })
|
|
1676
1669
|
]
|
|
1677
1670
|
}
|
|
1678
1671
|
)
|
|
1679
1672
|
] }),
|
|
1680
|
-
/* @__PURE__ */
|
|
1673
|
+
/* @__PURE__ */ jsx14(
|
|
1681
1674
|
"button",
|
|
1682
1675
|
{
|
|
1683
1676
|
onClick: () => handleMonthChange("next"),
|
|
1684
1677
|
className: "p-1 hover:bg-gray rounded transition-colors flex-shrink-0",
|
|
1685
|
-
children: /* @__PURE__ */
|
|
1678
|
+
children: /* @__PURE__ */ jsx14(ArrowRightIcon, {})
|
|
1686
1679
|
}
|
|
1687
1680
|
)
|
|
1688
1681
|
] }),
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
-
/* @__PURE__ */
|
|
1682
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-1", children: [
|
|
1683
|
+
/* @__PURE__ */ jsx14("div", { className: "grid grid-cols-7 gap-1 mb-2", children: dayNames.map((day) => /* @__PURE__ */ jsx14(
|
|
1691
1684
|
Typography,
|
|
1692
1685
|
{
|
|
1693
1686
|
variant: "label-xs-bold",
|
|
@@ -1697,11 +1690,11 @@ var DatePicker = React12.forwardRef(
|
|
|
1697
1690
|
},
|
|
1698
1691
|
day
|
|
1699
1692
|
)) }),
|
|
1700
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ jsx14("div", { className: "grid grid-cols-7 gap-1", children: days.map((date, index) => /* @__PURE__ */ jsx14(
|
|
1701
1694
|
"div",
|
|
1702
1695
|
{
|
|
1703
1696
|
className: "h-8 w-8 flex items-center justify-center",
|
|
1704
|
-
children: date && /* @__PURE__ */
|
|
1697
|
+
children: date && /* @__PURE__ */ jsx14(
|
|
1705
1698
|
"button",
|
|
1706
1699
|
{
|
|
1707
1700
|
onClick: () => handleDateSelect(date),
|
|
@@ -1715,7 +1708,7 @@ var DatePicker = React12.forwardRef(
|
|
|
1715
1708
|
isToday(date) && !isDateSelected(date) && !isDateDisabled(date) && "text-blue-600 after:content-[''] after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:w-1 after:h-1 after:bg-blue-600 after:rounded-full",
|
|
1716
1709
|
isDateDisabled(date) && "text-secondary/40 cursor-not-allowed opacity-50"
|
|
1717
1710
|
),
|
|
1718
|
-
children: /* @__PURE__ */
|
|
1711
|
+
children: /* @__PURE__ */ jsx14(Typography, { variant: "label-sm", as: "span", children: date.getDate() })
|
|
1719
1712
|
}
|
|
1720
1713
|
)
|
|
1721
1714
|
},
|
|
@@ -1733,9 +1726,9 @@ var DatePicker = React12.forwardRef(
|
|
|
1733
1726
|
DatePicker.displayName = "DatePicker";
|
|
1734
1727
|
|
|
1735
1728
|
// src/components/ui/upload.tsx
|
|
1736
|
-
import * as
|
|
1729
|
+
import * as React14 from "react";
|
|
1737
1730
|
import { cva as cva7 } from "class-variance-authority";
|
|
1738
|
-
import { jsx as
|
|
1731
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1739
1732
|
var DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
1740
1733
|
var uploadVariants = cva7(
|
|
1741
1734
|
"relative flex flex-col items-center justify-center rounded-lg transition-all duration-200 ease-in-out overflow-hidden",
|
|
@@ -1759,7 +1752,7 @@ var uploadVariants = cva7(
|
|
|
1759
1752
|
}
|
|
1760
1753
|
}
|
|
1761
1754
|
);
|
|
1762
|
-
var Upload =
|
|
1755
|
+
var Upload = React14.forwardRef(
|
|
1763
1756
|
({
|
|
1764
1757
|
className,
|
|
1765
1758
|
onFileSelect,
|
|
@@ -1772,8 +1765,8 @@ var Upload = React13.forwardRef(
|
|
|
1772
1765
|
selectedFiles = [],
|
|
1773
1766
|
...props
|
|
1774
1767
|
}, ref) => {
|
|
1775
|
-
const fileInputRef =
|
|
1776
|
-
const [isDragOver, setIsDragOver] =
|
|
1768
|
+
const fileInputRef = React14.useRef(null);
|
|
1769
|
+
const [isDragOver, setIsDragOver] = React14.useState(false);
|
|
1777
1770
|
const getFileTypeDisplay = () => {
|
|
1778
1771
|
const typeMap = {
|
|
1779
1772
|
"application/pdf": "PDF",
|
|
@@ -1837,17 +1830,17 @@ var Upload = React13.forwardRef(
|
|
|
1837
1830
|
const renderContent = () => {
|
|
1838
1831
|
switch (effectiveState) {
|
|
1839
1832
|
case "error":
|
|
1840
|
-
return /* @__PURE__ */
|
|
1833
|
+
return /* @__PURE__ */ jsxs8(
|
|
1841
1834
|
"div",
|
|
1842
1835
|
{
|
|
1843
1836
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
1844
1837
|
style: { gap: "32px" },
|
|
1845
1838
|
children: [
|
|
1846
|
-
/* @__PURE__ */
|
|
1847
|
-
/* @__PURE__ */
|
|
1848
|
-
/* @__PURE__ */
|
|
1839
|
+
/* @__PURE__ */ jsxs8("div", { className: "space-y-4", children: [
|
|
1840
|
+
/* @__PURE__ */ jsx15(Typography, { variant: "heading-lg", children: "Upload fail" }),
|
|
1841
|
+
/* @__PURE__ */ jsx15(Typography, { variant: "body-md", className: "text-error", children: errorMessage })
|
|
1849
1842
|
] }),
|
|
1850
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ jsx15(
|
|
1851
1844
|
Button,
|
|
1852
1845
|
{
|
|
1853
1846
|
variant: "destructive",
|
|
@@ -1861,22 +1854,22 @@ var Upload = React13.forwardRef(
|
|
|
1861
1854
|
}
|
|
1862
1855
|
);
|
|
1863
1856
|
case "uploading":
|
|
1864
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ jsxs8(
|
|
1865
1858
|
"div",
|
|
1866
1859
|
{
|
|
1867
1860
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
1868
1861
|
style: { gap: "32px" },
|
|
1869
1862
|
children: [
|
|
1870
|
-
/* @__PURE__ */
|
|
1871
|
-
/* @__PURE__ */
|
|
1872
|
-
/* @__PURE__ */
|
|
1863
|
+
/* @__PURE__ */ jsx15(Typography, { variant: "heading-lg", className: "text-dark", children: "Uploading files" }),
|
|
1864
|
+
/* @__PURE__ */ jsxs8("div", { className: "w-full max-w-[720px] space-y-2", children: [
|
|
1865
|
+
/* @__PURE__ */ jsx15("div", { className: "w-full bg-gray rounded-full h-2", children: /* @__PURE__ */ jsx15(
|
|
1873
1866
|
"div",
|
|
1874
1867
|
{
|
|
1875
1868
|
className: "bg-canvas-primary h-2 rounded-full transition-all duration-300 ease-in-out",
|
|
1876
1869
|
style: { width: `${progress}%` }
|
|
1877
1870
|
}
|
|
1878
1871
|
) }),
|
|
1879
|
-
/* @__PURE__ */
|
|
1872
|
+
/* @__PURE__ */ jsxs8(
|
|
1880
1873
|
Typography,
|
|
1881
1874
|
{
|
|
1882
1875
|
variant: "body-sm",
|
|
@@ -1892,29 +1885,29 @@ var Upload = React13.forwardRef(
|
|
|
1892
1885
|
}
|
|
1893
1886
|
);
|
|
1894
1887
|
case "success":
|
|
1895
|
-
return /* @__PURE__ */
|
|
1888
|
+
return /* @__PURE__ */ jsx15(
|
|
1896
1889
|
"div",
|
|
1897
1890
|
{
|
|
1898
1891
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
1899
1892
|
style: { gap: "32px" },
|
|
1900
|
-
children: /* @__PURE__ */
|
|
1901
|
-
/* @__PURE__ */
|
|
1902
|
-
selectedFiles.length > 0 && /* @__PURE__ */
|
|
1893
|
+
children: /* @__PURE__ */ jsxs8("div", { className: "space-y-4", children: [
|
|
1894
|
+
/* @__PURE__ */ jsx15(Typography, { variant: "heading-lg", className: "text-success", children: "Upload successful!" }),
|
|
1895
|
+
selectedFiles.length > 0 && /* @__PURE__ */ jsx15("div", { className: "text-center", children: selectedFiles.map((file, index) => /* @__PURE__ */ jsx15(Typography, { variant: "body-sm", children: file.name }, index)) })
|
|
1903
1896
|
] })
|
|
1904
1897
|
}
|
|
1905
1898
|
);
|
|
1906
1899
|
default:
|
|
1907
|
-
return /* @__PURE__ */
|
|
1900
|
+
return /* @__PURE__ */ jsxs8(
|
|
1908
1901
|
"div",
|
|
1909
1902
|
{
|
|
1910
1903
|
className: "flex flex-col items-center text-center max-w-[289px]",
|
|
1911
1904
|
style: { gap: "32px" },
|
|
1912
1905
|
children: [
|
|
1913
|
-
/* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
/* @__PURE__ */
|
|
1906
|
+
/* @__PURE__ */ jsxs8("div", { className: "space-y-4", children: [
|
|
1907
|
+
/* @__PURE__ */ jsx15(Typography, { variant: "heading-lg", className: "text-dark", children: "Drag & drop files here" }),
|
|
1908
|
+
/* @__PURE__ */ jsx15(Typography, { variant: "body-md", className: "text-secondary", children: "or click to browse from your computer" })
|
|
1916
1909
|
] }),
|
|
1917
|
-
/* @__PURE__ */
|
|
1910
|
+
/* @__PURE__ */ jsx15(
|
|
1918
1911
|
Button,
|
|
1919
1912
|
{
|
|
1920
1913
|
variant: "default",
|
|
@@ -1928,10 +1921,10 @@ var Upload = React13.forwardRef(
|
|
|
1928
1921
|
children: "Choose files"
|
|
1929
1922
|
}
|
|
1930
1923
|
),
|
|
1931
|
-
/* @__PURE__ */
|
|
1924
|
+
/* @__PURE__ */ jsxs8(Typography, { variant: "body-sm", className: "text-secondary", children: [
|
|
1932
1925
|
"Supported file: ",
|
|
1933
1926
|
getFileTypeDisplay(),
|
|
1934
|
-
/* @__PURE__ */
|
|
1927
|
+
/* @__PURE__ */ jsx15("br", {}),
|
|
1935
1928
|
"Max: ",
|
|
1936
1929
|
Math.round(maxFileSize / 1024 / 1024),
|
|
1937
1930
|
" MB each"
|
|
@@ -1941,7 +1934,7 @@ var Upload = React13.forwardRef(
|
|
|
1941
1934
|
);
|
|
1942
1935
|
}
|
|
1943
1936
|
};
|
|
1944
|
-
return /* @__PURE__ */
|
|
1937
|
+
return /* @__PURE__ */ jsxs8(
|
|
1945
1938
|
"div",
|
|
1946
1939
|
{
|
|
1947
1940
|
ref,
|
|
@@ -1965,7 +1958,7 @@ var Upload = React13.forwardRef(
|
|
|
1965
1958
|
"aria-disabled": disabled,
|
|
1966
1959
|
...props,
|
|
1967
1960
|
children: [
|
|
1968
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ jsx15(
|
|
1969
1962
|
"input",
|
|
1970
1963
|
{
|
|
1971
1964
|
ref: fileInputRef,
|
|
@@ -1985,29 +1978,29 @@ var Upload = React13.forwardRef(
|
|
|
1985
1978
|
Upload.displayName = "Upload";
|
|
1986
1979
|
|
|
1987
1980
|
// src/components/ui/checkbox.tsx
|
|
1988
|
-
import * as
|
|
1981
|
+
import * as React15 from "react";
|
|
1989
1982
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
1990
1983
|
import { cva as cva8 } from "class-variance-authority";
|
|
1991
|
-
import { jsx as
|
|
1984
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1992
1985
|
var checkboxVariants = cva8(
|
|
1993
1986
|
"peer size-4 shrink-0 rounded-[4px] border bg-light hover:bg-info-subtle transition-colors focus-visible:outline-none focus-visible:border-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-light [&_svg]:pointer-events-none [&_svg]:shrink-0 border-strong focus-visible:border-interactive aria-invalid:border-error aria-invalid:focus-visible:border-error"
|
|
1994
1987
|
);
|
|
1995
|
-
var Checkbox =
|
|
1988
|
+
var Checkbox = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
1996
1989
|
CheckboxPrimitive.Root,
|
|
1997
1990
|
{
|
|
1998
1991
|
ref,
|
|
1999
1992
|
className: cn(checkboxVariants(), className),
|
|
2000
1993
|
...props,
|
|
2001
|
-
children: /* @__PURE__ */
|
|
1994
|
+
children: /* @__PURE__ */ jsx16(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsx16(CheckIcon, { variant: "light", size: 14 }) })
|
|
2002
1995
|
}
|
|
2003
1996
|
));
|
|
2004
1997
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
2005
1998
|
|
|
2006
1999
|
// src/components/ui/switch.tsx
|
|
2007
|
-
import * as
|
|
2000
|
+
import * as React16 from "react";
|
|
2008
2001
|
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
2009
2002
|
import { cva as cva9 } from "class-variance-authority";
|
|
2010
|
-
import { jsx as
|
|
2003
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2011
2004
|
var switchVariants = cva9(
|
|
2012
2005
|
"peer inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 relative focus-visible:ring-3 focus-visible:ring-focus-default aria-invalid:border-error aria-invalid:ring-3 aria-invalid:ring-focus-error data-checked:interactive-accent data-unchecked:interactive-secondary data-unchecked:border-default data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
2013
2006
|
{
|
|
@@ -2036,16 +2029,16 @@ var switchThumbVariants = cva9(
|
|
|
2036
2029
|
}
|
|
2037
2030
|
}
|
|
2038
2031
|
);
|
|
2039
|
-
var Switch =
|
|
2032
|
+
var Switch = React16.forwardRef(
|
|
2040
2033
|
({ className, size, ...props }, ref) => {
|
|
2041
|
-
return /* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ jsx17(
|
|
2042
2035
|
SwitchPrimitive.Root,
|
|
2043
2036
|
{
|
|
2044
2037
|
ref,
|
|
2045
2038
|
"data-slot": "switch",
|
|
2046
2039
|
className: cn(switchVariants({ size }), className),
|
|
2047
2040
|
...props,
|
|
2048
|
-
children: /* @__PURE__ */
|
|
2041
|
+
children: /* @__PURE__ */ jsx17(
|
|
2049
2042
|
SwitchPrimitive.Thumb,
|
|
2050
2043
|
{
|
|
2051
2044
|
"data-slot": "switch-thumb",
|
|
@@ -2059,22 +2052,18 @@ var Switch = React15.forwardRef(
|
|
|
2059
2052
|
Switch.displayName = "Switch";
|
|
2060
2053
|
|
|
2061
2054
|
// src/components/ui/textarea.tsx
|
|
2062
|
-
import * as
|
|
2063
|
-
import { jsx as
|
|
2064
|
-
var Textarea =
|
|
2055
|
+
import * as React17 from "react";
|
|
2056
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2057
|
+
var Textarea = React17.forwardRef(
|
|
2065
2058
|
({ className, style, ...props }, ref) => {
|
|
2066
|
-
|
|
2067
|
-
font: "var(--typography-label-md-regular)",
|
|
2068
|
-
...style
|
|
2069
|
-
};
|
|
2070
|
-
return /* @__PURE__ */ jsx17(
|
|
2059
|
+
return /* @__PURE__ */ jsx18(
|
|
2071
2060
|
"textarea",
|
|
2072
2061
|
{
|
|
2073
2062
|
className: cn(
|
|
2074
|
-
"flex min-h-
|
|
2063
|
+
"type-body-sm-regular flex min-h-20 w-full rounded-md border surface-default text-default px-3 pt-3 pb-2 shadow-xs placeholder:text-secondary focus:outline-none disabled:cursor-not-allowed disabled:opacity-30 transition-colors resize-y border-secondary read-only:surface-muted read-only:cursor-default read-only:border-transparent read-only:text-secondary read-only:resize-none focus-visible:ring-2 focus-visible:ring-focus-default focus-visible:border-strong disabled:border-secondary aria-invalid:border-error aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-focus-error",
|
|
2075
2064
|
className
|
|
2076
2065
|
),
|
|
2077
|
-
style
|
|
2066
|
+
style,
|
|
2078
2067
|
ref,
|
|
2079
2068
|
...props
|
|
2080
2069
|
}
|
|
@@ -2084,52 +2073,67 @@ var Textarea = React16.forwardRef(
|
|
|
2084
2073
|
Textarea.displayName = "Textarea";
|
|
2085
2074
|
|
|
2086
2075
|
// src/components/ui/badge.tsx
|
|
2087
|
-
import * as
|
|
2076
|
+
import * as React18 from "react";
|
|
2088
2077
|
import { cva as cva10 } from "class-variance-authority";
|
|
2089
|
-
import { jsx as
|
|
2078
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2090
2079
|
var badgeVariants = cva10(
|
|
2091
|
-
"inline-flex items-center justify-center gap-1 whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
2080
|
+
"px-2 py-1 inline-flex items-center justify-center gap-1 whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-default",
|
|
2092
2081
|
{
|
|
2093
2082
|
variants: {
|
|
2094
2083
|
variant: {
|
|
2095
|
-
primary: "
|
|
2096
|
-
secondary: "
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2084
|
+
primary: "interactive-accent interactive-accent-fg type-label-xs-medium",
|
|
2085
|
+
secondary: "interactive-secondary interactive-secondary-fg type-label-xs-medium",
|
|
2086
|
+
outline: "interactive-default interactive-default-fg border border-default type-label-xs-medium",
|
|
2087
|
+
ghost: "interactive-default interactive-default-fg type-label-xs-medium",
|
|
2088
|
+
destructive: "interactive-destructive interactive-destructive-fg type-label-xs-medium focus-visible:ring-3 focus-visible:ring-focus-error"
|
|
2089
|
+
},
|
|
2090
|
+
rounded: {
|
|
2091
|
+
true: "rounded-full",
|
|
2092
|
+
false: "rounded-md"
|
|
2102
2093
|
}
|
|
2103
2094
|
},
|
|
2104
2095
|
defaultVariants: {
|
|
2105
|
-
variant: "primary"
|
|
2096
|
+
variant: "primary",
|
|
2097
|
+
rounded: false
|
|
2106
2098
|
}
|
|
2107
2099
|
}
|
|
2108
2100
|
);
|
|
2109
|
-
function
|
|
2110
|
-
|
|
2101
|
+
function isSingleDisplayCharacter(node) {
|
|
2102
|
+
if (node == null || typeof node === "boolean") return false;
|
|
2103
|
+
if (typeof node === "string" || typeof node === "number") {
|
|
2104
|
+
const trimmed = String(node).trim();
|
|
2105
|
+
return trimmed.length === 1;
|
|
2106
|
+
}
|
|
2107
|
+
if (Array.isArray(node)) {
|
|
2108
|
+
const parts = node.filter((x) => x != null && typeof x !== "boolean");
|
|
2109
|
+
if (parts.length !== 1) return false;
|
|
2110
|
+
return isSingleDisplayCharacter(parts[0]);
|
|
2111
|
+
}
|
|
2112
|
+
if (React18.isValidElement(node)) {
|
|
2113
|
+
return isSingleDisplayCharacter(
|
|
2114
|
+
node.props.children
|
|
2115
|
+
);
|
|
2116
|
+
}
|
|
2117
|
+
return false;
|
|
2111
2118
|
}
|
|
2112
|
-
var Badge =
|
|
2113
|
-
({ className, variant, style, ...props }, ref) => {
|
|
2119
|
+
var Badge = React18.forwardRef(
|
|
2120
|
+
({ className, variant, rounded, style, children, ...props }, ref) => {
|
|
2114
2121
|
if (!variant) {
|
|
2115
2122
|
return null;
|
|
2116
2123
|
}
|
|
2117
|
-
const
|
|
2118
|
-
|
|
2119
|
-
...typographyStyles,
|
|
2120
|
-
...style
|
|
2121
|
-
};
|
|
2122
|
-
return /* @__PURE__ */ jsx18(
|
|
2124
|
+
const circle = isSingleDisplayCharacter(children);
|
|
2125
|
+
return /* @__PURE__ */ jsx19(
|
|
2123
2126
|
"span",
|
|
2124
2127
|
{
|
|
2125
2128
|
className: cn(
|
|
2126
|
-
badgeVariants({ variant }),
|
|
2127
|
-
"
|
|
2129
|
+
badgeVariants({ variant, rounded }),
|
|
2130
|
+
circle ? "size-5 shrink-0 p-0" : "",
|
|
2128
2131
|
className
|
|
2129
2132
|
),
|
|
2130
|
-
style
|
|
2133
|
+
style,
|
|
2131
2134
|
ref,
|
|
2132
|
-
...props
|
|
2135
|
+
...props,
|
|
2136
|
+
children
|
|
2133
2137
|
}
|
|
2134
2138
|
);
|
|
2135
2139
|
}
|
|
@@ -2137,12 +2141,12 @@ var Badge = React17.forwardRef(
|
|
|
2137
2141
|
Badge.displayName = "Badge";
|
|
2138
2142
|
|
|
2139
2143
|
// src/components/pdf-viewer/index.tsx
|
|
2140
|
-
import * as
|
|
2144
|
+
import * as React28 from "react";
|
|
2141
2145
|
import "react-pdf/dist/Page/TextLayer.css";
|
|
2142
2146
|
|
|
2143
2147
|
// src/components/pdf-viewer/components/CustomScrollbar.tsx
|
|
2144
|
-
import * as
|
|
2145
|
-
import { Fragment, jsx as
|
|
2148
|
+
import * as React19 from "react";
|
|
2149
|
+
import { Fragment, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2146
2150
|
var scrollbarStyles = `
|
|
2147
2151
|
.custom-scrollbar-content {
|
|
2148
2152
|
overflow: auto;
|
|
@@ -2210,15 +2214,15 @@ function CustomScrollbar({
|
|
|
2210
2214
|
backgroundColor = "#F5F5F5",
|
|
2211
2215
|
className
|
|
2212
2216
|
}) {
|
|
2213
|
-
const internalContainerRef =
|
|
2217
|
+
const internalContainerRef = React19.useRef(null);
|
|
2214
2218
|
const containerRef = externalContainerRef || internalContainerRef;
|
|
2215
|
-
const wrapperRef =
|
|
2216
|
-
const thumbVerticalRef =
|
|
2217
|
-
const thumbHorizontalRef =
|
|
2218
|
-
const lastScrollPosRef =
|
|
2219
|
-
const scrollTimeoutsRef =
|
|
2219
|
+
const wrapperRef = React19.useRef(null);
|
|
2220
|
+
const thumbVerticalRef = React19.useRef(null);
|
|
2221
|
+
const thumbHorizontalRef = React19.useRef(null);
|
|
2222
|
+
const lastScrollPosRef = React19.useRef({ top: 0, left: 0 });
|
|
2223
|
+
const scrollTimeoutsRef = React19.useRef({ vertical: null, horizontal: null });
|
|
2220
2224
|
const WHEEL_LINE_HEIGHT_PX = 16;
|
|
2221
|
-
const showScrollbar =
|
|
2225
|
+
const showScrollbar = React19.useCallback(
|
|
2222
2226
|
(direction) => {
|
|
2223
2227
|
const wrapper = wrapperRef.current;
|
|
2224
2228
|
if (!wrapper) return;
|
|
@@ -2232,7 +2236,7 @@ function CustomScrollbar({
|
|
|
2232
2236
|
},
|
|
2233
2237
|
[autoHideDelay]
|
|
2234
2238
|
);
|
|
2235
|
-
const updateScrollbarThumbPosition =
|
|
2239
|
+
const updateScrollbarThumbPosition = React19.useCallback(() => {
|
|
2236
2240
|
const container = containerRef.current;
|
|
2237
2241
|
const thumbVertical = thumbVerticalRef.current;
|
|
2238
2242
|
const thumbHorizontal = thumbHorizontalRef.current;
|
|
@@ -2270,7 +2274,7 @@ function CustomScrollbar({
|
|
|
2270
2274
|
}
|
|
2271
2275
|
}
|
|
2272
2276
|
}, [containerRef]);
|
|
2273
|
-
|
|
2277
|
+
React19.useEffect(() => {
|
|
2274
2278
|
const container = containerRef.current;
|
|
2275
2279
|
if (!container) return;
|
|
2276
2280
|
lastScrollPosRef.current = {
|
|
@@ -2303,7 +2307,7 @@ function CustomScrollbar({
|
|
|
2303
2307
|
if (rafId) cancelAnimationFrame(rafId);
|
|
2304
2308
|
};
|
|
2305
2309
|
}, [containerRef, showScrollbar, updateScrollbarThumbPosition]);
|
|
2306
|
-
|
|
2310
|
+
React19.useEffect(() => {
|
|
2307
2311
|
const container = containerRef.current;
|
|
2308
2312
|
if (!container) return;
|
|
2309
2313
|
const normalizeWheelDelta = (delta, deltaMode, axisSize) => {
|
|
@@ -2359,7 +2363,7 @@ function CustomScrollbar({
|
|
|
2359
2363
|
container.removeEventListener("wheel", handleWheel);
|
|
2360
2364
|
};
|
|
2361
2365
|
}, [containerRef, showScrollbar]);
|
|
2362
|
-
|
|
2366
|
+
React19.useEffect(() => {
|
|
2363
2367
|
const thumbVertical = thumbVerticalRef.current;
|
|
2364
2368
|
const thumbHorizontal = thumbHorizontalRef.current;
|
|
2365
2369
|
const container = containerRef.current;
|
|
@@ -2419,19 +2423,19 @@ function CustomScrollbar({
|
|
|
2419
2423
|
document.removeEventListener("mouseup", handleMouseUp);
|
|
2420
2424
|
};
|
|
2421
2425
|
}, [containerRef, showScrollbar]);
|
|
2422
|
-
|
|
2426
|
+
React19.useEffect(() => {
|
|
2423
2427
|
updateScrollbarThumbPosition();
|
|
2424
2428
|
}, [children, updateScrollbarThumbPosition]);
|
|
2425
|
-
return /* @__PURE__ */
|
|
2426
|
-
/* @__PURE__ */
|
|
2427
|
-
/* @__PURE__ */
|
|
2429
|
+
return /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
2430
|
+
/* @__PURE__ */ jsx20("style", { children: scrollbarStyles }),
|
|
2431
|
+
/* @__PURE__ */ jsxs9(
|
|
2428
2432
|
"div",
|
|
2429
2433
|
{
|
|
2430
2434
|
ref: wrapperRef,
|
|
2431
2435
|
className: `flex-1 min-w-0 custom-scrollbar-wrapper ${className || ""}`,
|
|
2432
2436
|
style: { background: backgroundColor },
|
|
2433
2437
|
children: [
|
|
2434
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ jsx20(
|
|
2435
2439
|
"div",
|
|
2436
2440
|
{
|
|
2437
2441
|
ref: containerRef,
|
|
@@ -2440,8 +2444,8 @@ function CustomScrollbar({
|
|
|
2440
2444
|
children
|
|
2441
2445
|
}
|
|
2442
2446
|
),
|
|
2443
|
-
/* @__PURE__ */
|
|
2444
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ jsx20("div", { className: "scrollbar-track-vertical", children: /* @__PURE__ */ jsx20("div", { ref: thumbVerticalRef, className: "scrollbar-thumb-vertical" }) }),
|
|
2448
|
+
/* @__PURE__ */ jsx20("div", { className: "scrollbar-track-horizontal", children: /* @__PURE__ */ jsx20(
|
|
2445
2449
|
"div",
|
|
2446
2450
|
{
|
|
2447
2451
|
ref: thumbHorizontalRef,
|
|
@@ -2455,7 +2459,7 @@ function CustomScrollbar({
|
|
|
2455
2459
|
}
|
|
2456
2460
|
|
|
2457
2461
|
// src/components/pdf-viewer/components/PdfControls.tsx
|
|
2458
|
-
import * as
|
|
2462
|
+
import * as React20 from "react";
|
|
2459
2463
|
|
|
2460
2464
|
// src/components/pdf-viewer/utils/types.ts
|
|
2461
2465
|
var DEFAULT_BOUNDING_BOX_STYLE = {
|
|
@@ -2471,7 +2475,7 @@ var PDF_ZOOM = {
|
|
|
2471
2475
|
};
|
|
2472
2476
|
|
|
2473
2477
|
// src/components/pdf-viewer/components/PdfControls.tsx
|
|
2474
|
-
import { jsx as
|
|
2478
|
+
import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2475
2479
|
var PdfControls = ({
|
|
2476
2480
|
currentPage,
|
|
2477
2481
|
totalPages,
|
|
@@ -2485,11 +2489,11 @@ var PdfControls = ({
|
|
|
2485
2489
|
const canGoNext = currentPage < totalPages;
|
|
2486
2490
|
const canZoomIn = zoom < PDF_ZOOM.MAX;
|
|
2487
2491
|
const canZoomOut = zoom > PDF_ZOOM.MIN;
|
|
2488
|
-
const [pageInputValue, setPageInputValue] =
|
|
2492
|
+
const [pageInputValue, setPageInputValue] = React20.useState(
|
|
2489
2493
|
String(currentPage)
|
|
2490
2494
|
);
|
|
2491
|
-
const isEscapeRef =
|
|
2492
|
-
|
|
2495
|
+
const isEscapeRef = React20.useRef(false);
|
|
2496
|
+
React20.useEffect(() => {
|
|
2493
2497
|
setPageInputValue(String(currentPage));
|
|
2494
2498
|
}, [currentPage]);
|
|
2495
2499
|
const handlePageInputChange = (e) => {
|
|
@@ -2525,14 +2529,14 @@ var PdfControls = ({
|
|
|
2525
2529
|
const newZoom = Math.max(zoom - PDF_ZOOM.STEP, PDF_ZOOM.MIN);
|
|
2526
2530
|
onZoomChange(newZoom);
|
|
2527
2531
|
};
|
|
2528
|
-
return /* @__PURE__ */
|
|
2532
|
+
return /* @__PURE__ */ jsxs10(
|
|
2529
2533
|
"div",
|
|
2530
2534
|
{
|
|
2531
2535
|
className: "flex flex-col items-center justify-end py-2 px-1 gap-4",
|
|
2532
2536
|
style: { background: "#DEDEDE" },
|
|
2533
2537
|
children: [
|
|
2534
|
-
/* @__PURE__ */
|
|
2535
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center gap-1", children: [
|
|
2539
|
+
/* @__PURE__ */ jsx21(
|
|
2536
2540
|
"button",
|
|
2537
2541
|
{
|
|
2538
2542
|
onClick: onPreviousPage,
|
|
@@ -2540,10 +2544,10 @@ var PdfControls = ({
|
|
|
2540
2544
|
className: "p-1.5 rounded transition-colors hover:bg-neutral-400 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
2541
2545
|
"aria-label": "Previous page",
|
|
2542
2546
|
type: "button",
|
|
2543
|
-
children: /* @__PURE__ */
|
|
2547
|
+
children: /* @__PURE__ */ jsx21(CaretUpIcon, { size: 16, style: { color: "#666666" } })
|
|
2544
2548
|
}
|
|
2545
2549
|
),
|
|
2546
|
-
/* @__PURE__ */
|
|
2550
|
+
/* @__PURE__ */ jsx21("div", { className: "flex flex-col items-center", children: totalPages > 0 ? /* @__PURE__ */ jsx21(
|
|
2547
2551
|
"input",
|
|
2548
2552
|
{
|
|
2549
2553
|
type: "text",
|
|
@@ -2559,8 +2563,8 @@ var PdfControls = ({
|
|
|
2559
2563
|
},
|
|
2560
2564
|
"aria-label": "Current page"
|
|
2561
2565
|
}
|
|
2562
|
-
) : /* @__PURE__ */
|
|
2563
|
-
/* @__PURE__ */
|
|
2566
|
+
) : /* @__PURE__ */ jsx21("span", { className: "text-sm", style: { color: "#666666" }, children: "-" }) }),
|
|
2567
|
+
/* @__PURE__ */ jsx21(
|
|
2564
2568
|
"button",
|
|
2565
2569
|
{
|
|
2566
2570
|
onClick: onNextPage,
|
|
@@ -2568,12 +2572,12 @@ var PdfControls = ({
|
|
|
2568
2572
|
className: "p-1.5 rounded transition-colors hover:bg-neutral-400 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
2569
2573
|
"aria-label": "Next page",
|
|
2570
2574
|
type: "button",
|
|
2571
|
-
children: /* @__PURE__ */
|
|
2575
|
+
children: /* @__PURE__ */ jsx21(CaretDownIcon, { size: 16, style: { color: "#666666" } })
|
|
2572
2576
|
}
|
|
2573
2577
|
)
|
|
2574
2578
|
] }),
|
|
2575
|
-
/* @__PURE__ */
|
|
2576
|
-
/* @__PURE__ */
|
|
2579
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center gap-1", children: [
|
|
2580
|
+
/* @__PURE__ */ jsx21(
|
|
2577
2581
|
"button",
|
|
2578
2582
|
{
|
|
2579
2583
|
onClick: handleZoomIn,
|
|
@@ -2581,10 +2585,10 @@ var PdfControls = ({
|
|
|
2581
2585
|
className: "p-1.5 rounded transition-colors hover:bg-neutral-400 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
2582
2586
|
"aria-label": "Zoom in",
|
|
2583
2587
|
type: "button",
|
|
2584
|
-
children: /* @__PURE__ */
|
|
2588
|
+
children: /* @__PURE__ */ jsx21(ZoomInIcon, { size: 16, style: { color: "#666666" } })
|
|
2585
2589
|
}
|
|
2586
2590
|
),
|
|
2587
|
-
/* @__PURE__ */
|
|
2591
|
+
/* @__PURE__ */ jsx21(
|
|
2588
2592
|
"button",
|
|
2589
2593
|
{
|
|
2590
2594
|
onClick: handleZoomOut,
|
|
@@ -2592,7 +2596,7 @@ var PdfControls = ({
|
|
|
2592
2596
|
className: "p-1.5 rounded transition-colors hover:bg-neutral-400 disabled:opacity-40 disabled:cursor-not-allowed",
|
|
2593
2597
|
"aria-label": "Zoom out",
|
|
2594
2598
|
type: "button",
|
|
2595
|
-
children: /* @__PURE__ */
|
|
2599
|
+
children: /* @__PURE__ */ jsx21(ZoomOutIcon, { size: 16, style: { color: "#666666" } })
|
|
2596
2600
|
}
|
|
2597
2601
|
)
|
|
2598
2602
|
] })
|
|
@@ -2603,7 +2607,7 @@ var PdfControls = ({
|
|
|
2603
2607
|
PdfControls.displayName = "PdfControls";
|
|
2604
2608
|
|
|
2605
2609
|
// src/components/pdf-viewer/components/PdfDocument.tsx
|
|
2606
|
-
import * as
|
|
2610
|
+
import * as React22 from "react";
|
|
2607
2611
|
import { Document, Page } from "react-pdf";
|
|
2608
2612
|
|
|
2609
2613
|
// src/components/pdf-viewer/utils/constants.ts
|
|
@@ -2629,7 +2633,7 @@ var INTERSECTION_OBSERVER_CONFIG = {
|
|
|
2629
2633
|
};
|
|
2630
2634
|
|
|
2631
2635
|
// src/components/pdf-viewer/components/BoundingBoxOverlay.tsx
|
|
2632
|
-
import * as
|
|
2636
|
+
import * as React21 from "react";
|
|
2633
2637
|
|
|
2634
2638
|
// src/components/pdf-viewer/utils/boundingBoxUtils.ts
|
|
2635
2639
|
function clamp01(value) {
|
|
@@ -2656,7 +2660,7 @@ function normalizeBoundingBox(box) {
|
|
|
2656
2660
|
}
|
|
2657
2661
|
|
|
2658
2662
|
// src/components/pdf-viewer/components/BoundingBoxOverlay.tsx
|
|
2659
|
-
import { jsx as
|
|
2663
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
2660
2664
|
var BoundingBoxOverlayInner = ({
|
|
2661
2665
|
boxes,
|
|
2662
2666
|
highlightedIds,
|
|
@@ -2666,11 +2670,11 @@ var BoundingBoxOverlayInner = ({
|
|
|
2666
2670
|
onBoxMouseEnter,
|
|
2667
2671
|
onBoxMouseLeave
|
|
2668
2672
|
}) => {
|
|
2669
|
-
const validBoxes =
|
|
2673
|
+
const validBoxes = React21.useMemo(
|
|
2670
2674
|
() => boxes.map(normalizeBoundingBox).filter((b) => b !== null),
|
|
2671
2675
|
[boxes]
|
|
2672
2676
|
);
|
|
2673
|
-
const sortedBoxes =
|
|
2677
|
+
const sortedBoxes = React21.useMemo(
|
|
2674
2678
|
() => [...validBoxes].sort((a, b) => {
|
|
2675
2679
|
const aHighlighted = highlightedIds.has(a.id);
|
|
2676
2680
|
const bHighlighted = highlightedIds.has(b.id);
|
|
@@ -2681,7 +2685,7 @@ var BoundingBoxOverlayInner = ({
|
|
|
2681
2685
|
[validBoxes, highlightedIds]
|
|
2682
2686
|
);
|
|
2683
2687
|
if (sortedBoxes.length === 0) return null;
|
|
2684
|
-
return /* @__PURE__ */
|
|
2688
|
+
return /* @__PURE__ */ jsx22(
|
|
2685
2689
|
"svg",
|
|
2686
2690
|
{
|
|
2687
2691
|
viewBox: "0 0 1 1",
|
|
@@ -2701,7 +2705,7 @@ var BoundingBoxOverlayInner = ({
|
|
|
2701
2705
|
const baseStyle = isHighlighted ? { ...DEFAULT_BOUNDING_BOX_STYLE, ...highlightStyle } : { ...DEFAULT_BOUNDING_BOX_STYLE, ...defaultStyle };
|
|
2702
2706
|
const style = { ...baseStyle, ...box.style };
|
|
2703
2707
|
const isInteractive = !!(onBoxClick || onBoxMouseEnter);
|
|
2704
|
-
return /* @__PURE__ */
|
|
2708
|
+
return /* @__PURE__ */ jsx22(
|
|
2705
2709
|
"rect",
|
|
2706
2710
|
{
|
|
2707
2711
|
x: box.x1,
|
|
@@ -2721,7 +2725,7 @@ var BoundingBoxOverlayInner = ({
|
|
|
2721
2725
|
onMouseLeave: onBoxMouseLeave ? (e) => onBoxMouseLeave(box, e) : void 0,
|
|
2722
2726
|
"aria-label": box.label,
|
|
2723
2727
|
role: onBoxClick ? "button" : void 0,
|
|
2724
|
-
children: box.label && /* @__PURE__ */
|
|
2728
|
+
children: box.label && /* @__PURE__ */ jsx22("title", { children: box.label })
|
|
2725
2729
|
},
|
|
2726
2730
|
box.id
|
|
2727
2731
|
);
|
|
@@ -2729,11 +2733,11 @@ var BoundingBoxOverlayInner = ({
|
|
|
2729
2733
|
}
|
|
2730
2734
|
);
|
|
2731
2735
|
};
|
|
2732
|
-
var BoundingBoxOverlay =
|
|
2736
|
+
var BoundingBoxOverlay = React21.memo(BoundingBoxOverlayInner);
|
|
2733
2737
|
BoundingBoxOverlay.displayName = "BoundingBoxOverlay";
|
|
2734
2738
|
|
|
2735
2739
|
// src/components/pdf-viewer/components/PdfDocument.tsx
|
|
2736
|
-
import { jsx as
|
|
2740
|
+
import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2737
2741
|
var PdfDocument = ({
|
|
2738
2742
|
file,
|
|
2739
2743
|
pageWidth,
|
|
@@ -2755,14 +2759,14 @@ var PdfDocument = ({
|
|
|
2755
2759
|
onBoxMouseEnter,
|
|
2756
2760
|
onBoxMouseLeave
|
|
2757
2761
|
}) => {
|
|
2758
|
-
const mountedRef =
|
|
2759
|
-
|
|
2762
|
+
const mountedRef = React22.useRef(true);
|
|
2763
|
+
React22.useEffect(() => {
|
|
2760
2764
|
mountedRef.current = true;
|
|
2761
2765
|
return () => {
|
|
2762
2766
|
mountedRef.current = false;
|
|
2763
2767
|
};
|
|
2764
2768
|
}, []);
|
|
2765
|
-
const boxesByPage =
|
|
2769
|
+
const boxesByPage = React22.useMemo(() => {
|
|
2766
2770
|
const map = /* @__PURE__ */ new Map();
|
|
2767
2771
|
boundingBoxes?.forEach((box) => {
|
|
2768
2772
|
const pageBoxes = map.get(box.page) || [];
|
|
@@ -2771,7 +2775,7 @@ var PdfDocument = ({
|
|
|
2771
2775
|
});
|
|
2772
2776
|
return map;
|
|
2773
2777
|
}, [boundingBoxes]);
|
|
2774
|
-
const highlightedIdsSet =
|
|
2778
|
+
const highlightedIdsSet = React22.useMemo(
|
|
2775
2779
|
() => new Set(highlightedBoxIds),
|
|
2776
2780
|
[highlightedBoxIds]
|
|
2777
2781
|
);
|
|
@@ -2810,14 +2814,14 @@ var PdfDocument = ({
|
|
|
2810
2814
|
function renderCurrentPage() {
|
|
2811
2815
|
const placeholderHeight = getPlaceholderHeight(currentPage);
|
|
2812
2816
|
const boxesForPage = boxesByPage.get(currentPage) ?? [];
|
|
2813
|
-
return /* @__PURE__ */
|
|
2817
|
+
return /* @__PURE__ */ jsx23(
|
|
2814
2818
|
"div",
|
|
2815
2819
|
{
|
|
2816
2820
|
ref: (el) => registerPageRef(currentPage, el),
|
|
2817
2821
|
"data-page-num": currentPage,
|
|
2818
2822
|
className: "flex justify-center",
|
|
2819
|
-
children: /* @__PURE__ */
|
|
2820
|
-
/* @__PURE__ */
|
|
2823
|
+
children: /* @__PURE__ */ jsxs11("div", { style: { position: "relative" }, children: [
|
|
2824
|
+
/* @__PURE__ */ jsx23(
|
|
2821
2825
|
Page,
|
|
2822
2826
|
{
|
|
2823
2827
|
pageNumber: currentPage,
|
|
@@ -2825,12 +2829,12 @@ var PdfDocument = ({
|
|
|
2825
2829
|
className: "shadow-sm",
|
|
2826
2830
|
renderTextLayer: enableTextLayer,
|
|
2827
2831
|
renderAnnotationLayer: false,
|
|
2828
|
-
loading: /* @__PURE__ */
|
|
2832
|
+
loading: /* @__PURE__ */ jsx23(
|
|
2829
2833
|
"div",
|
|
2830
2834
|
{
|
|
2831
2835
|
className: "flex items-center justify-center bg-white",
|
|
2832
2836
|
style: { width: pageWidth, height: placeholderHeight },
|
|
2833
|
-
children: /* @__PURE__ */
|
|
2837
|
+
children: /* @__PURE__ */ jsxs11(Typography, { variant: "body-sm", className: "text-secondary", children: [
|
|
2834
2838
|
"Loading page ",
|
|
2835
2839
|
currentPage,
|
|
2836
2840
|
"..."
|
|
@@ -2839,7 +2843,7 @@ var PdfDocument = ({
|
|
|
2839
2843
|
)
|
|
2840
2844
|
}
|
|
2841
2845
|
),
|
|
2842
|
-
/* @__PURE__ */
|
|
2846
|
+
/* @__PURE__ */ jsx23(
|
|
2843
2847
|
BoundingBoxOverlay,
|
|
2844
2848
|
{
|
|
2845
2849
|
boxes: boxesForPage,
|
|
@@ -2862,7 +2866,7 @@ var PdfDocument = ({
|
|
|
2862
2866
|
const shouldRender = visiblePages.has(pageNum);
|
|
2863
2867
|
const placeholderHeight = getPlaceholderHeight(pageNum);
|
|
2864
2868
|
const boxesForPage = boxesByPage.get(pageNum) ?? [];
|
|
2865
|
-
return /* @__PURE__ */
|
|
2869
|
+
return /* @__PURE__ */ jsx23(
|
|
2866
2870
|
"div",
|
|
2867
2871
|
{
|
|
2868
2872
|
ref: (el) => registerPageRef(pageNum, el),
|
|
@@ -2871,8 +2875,8 @@ var PdfDocument = ({
|
|
|
2871
2875
|
style: {
|
|
2872
2876
|
minHeight: shouldRender ? void 0 : placeholderHeight
|
|
2873
2877
|
},
|
|
2874
|
-
children: shouldRender ? /* @__PURE__ */
|
|
2875
|
-
/* @__PURE__ */
|
|
2878
|
+
children: shouldRender ? /* @__PURE__ */ jsxs11("div", { style: { position: "relative" }, children: [
|
|
2879
|
+
/* @__PURE__ */ jsx23(
|
|
2876
2880
|
Page,
|
|
2877
2881
|
{
|
|
2878
2882
|
pageNumber: pageNum,
|
|
@@ -2880,12 +2884,12 @@ var PdfDocument = ({
|
|
|
2880
2884
|
className: "shadow-sm",
|
|
2881
2885
|
renderTextLayer: enableTextLayer,
|
|
2882
2886
|
renderAnnotationLayer: false,
|
|
2883
|
-
loading: /* @__PURE__ */
|
|
2887
|
+
loading: /* @__PURE__ */ jsx23(
|
|
2884
2888
|
"div",
|
|
2885
2889
|
{
|
|
2886
2890
|
className: "flex items-center justify-center bg-white",
|
|
2887
2891
|
style: { width: pageWidth, height: placeholderHeight },
|
|
2888
|
-
children: /* @__PURE__ */
|
|
2892
|
+
children: /* @__PURE__ */ jsxs11(Typography, { variant: "body-sm", className: "text-secondary", children: [
|
|
2889
2893
|
"Loading page ",
|
|
2890
2894
|
pageNum,
|
|
2891
2895
|
"..."
|
|
@@ -2894,7 +2898,7 @@ var PdfDocument = ({
|
|
|
2894
2898
|
)
|
|
2895
2899
|
}
|
|
2896
2900
|
),
|
|
2897
|
-
/* @__PURE__ */
|
|
2901
|
+
/* @__PURE__ */ jsx23(
|
|
2898
2902
|
BoundingBoxOverlay,
|
|
2899
2903
|
{
|
|
2900
2904
|
boxes: boxesForPage,
|
|
@@ -2906,7 +2910,7 @@ var PdfDocument = ({
|
|
|
2906
2910
|
onBoxMouseLeave
|
|
2907
2911
|
}
|
|
2908
2912
|
)
|
|
2909
|
-
] }) : /* @__PURE__ */
|
|
2913
|
+
] }) : /* @__PURE__ */ jsx23(
|
|
2910
2914
|
"div",
|
|
2911
2915
|
{
|
|
2912
2916
|
className: "flex items-center justify-center bg-white shadow-sm",
|
|
@@ -2914,7 +2918,7 @@ var PdfDocument = ({
|
|
|
2914
2918
|
width: pageWidth,
|
|
2915
2919
|
height: placeholderHeight
|
|
2916
2920
|
},
|
|
2917
|
-
children: /* @__PURE__ */
|
|
2921
|
+
children: /* @__PURE__ */ jsxs11(Typography, { variant: "body-sm", className: "text-secondary", children: [
|
|
2918
2922
|
"Page ",
|
|
2919
2923
|
pageNum
|
|
2920
2924
|
] })
|
|
@@ -2926,16 +2930,16 @@ var PdfDocument = ({
|
|
|
2926
2930
|
});
|
|
2927
2931
|
}
|
|
2928
2932
|
if (!file) {
|
|
2929
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ jsx23("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx23(Typography, { variant: "body-md", className: "text-secondary", children: "No PDF available" }) });
|
|
2930
2934
|
}
|
|
2931
|
-
return /* @__PURE__ */
|
|
2935
|
+
return /* @__PURE__ */ jsx23(
|
|
2932
2936
|
Document,
|
|
2933
2937
|
{
|
|
2934
2938
|
file,
|
|
2935
2939
|
onLoadSuccess: handleDocumentLoadSuccess,
|
|
2936
2940
|
onLoadError,
|
|
2937
|
-
loading: /* @__PURE__ */
|
|
2938
|
-
error: /* @__PURE__ */
|
|
2941
|
+
loading: /* @__PURE__ */ jsx23("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx23(Typography, { variant: "body-md", className: "text-secondary", children: "Rendering PDF..." }) }),
|
|
2942
|
+
error: /* @__PURE__ */ jsx23("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsx23(Typography, { variant: "body-md", className: "text-error", children: "Failed to render PDF" }) }),
|
|
2939
2943
|
className: "flex flex-col items-center p-4 min-w-fit",
|
|
2940
2944
|
children: numPages > 0 && pageWidth > 0 && (viewMode === "single" ? renderCurrentPage() : renderPagesWithVirtualization())
|
|
2941
2945
|
}
|
|
@@ -2944,19 +2948,19 @@ var PdfDocument = ({
|
|
|
2944
2948
|
PdfDocument.displayName = "PdfDocument";
|
|
2945
2949
|
|
|
2946
2950
|
// src/components/pdf-viewer/components/PdfHeader.tsx
|
|
2947
|
-
import { jsx as
|
|
2951
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2948
2952
|
var PdfHeader = ({
|
|
2949
2953
|
title,
|
|
2950
2954
|
onDownload,
|
|
2951
2955
|
onPrint
|
|
2952
2956
|
}) => {
|
|
2953
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsxs12(
|
|
2954
2958
|
"div",
|
|
2955
2959
|
{
|
|
2956
2960
|
className: "flex items-center justify-between gap-4 px-4 py-1",
|
|
2957
2961
|
style: { background: "#B5B5B5" },
|
|
2958
2962
|
children: [
|
|
2959
|
-
/* @__PURE__ */
|
|
2963
|
+
/* @__PURE__ */ jsx24("div", { className: "flex-shrink min-w-0", children: /* @__PURE__ */ jsx24(
|
|
2960
2964
|
Typography,
|
|
2961
2965
|
{
|
|
2962
2966
|
variant: "label-md-bold",
|
|
@@ -2965,25 +2969,25 @@ var PdfHeader = ({
|
|
|
2965
2969
|
children: title || "Untitled Document"
|
|
2966
2970
|
}
|
|
2967
2971
|
) }),
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
2972
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
2973
|
+
/* @__PURE__ */ jsx24(
|
|
2970
2974
|
"button",
|
|
2971
2975
|
{
|
|
2972
2976
|
onClick: onDownload,
|
|
2973
2977
|
className: "p-1 hover:bg-neutral-500 rounded transition-colors",
|
|
2974
2978
|
"aria-label": "Download PDF",
|
|
2975
2979
|
type: "button",
|
|
2976
|
-
children: /* @__PURE__ */
|
|
2980
|
+
children: /* @__PURE__ */ jsx24(DownloadIcon, { variant: "dark", size: 16 })
|
|
2977
2981
|
}
|
|
2978
2982
|
),
|
|
2979
|
-
/* @__PURE__ */
|
|
2983
|
+
/* @__PURE__ */ jsx24(
|
|
2980
2984
|
"button",
|
|
2981
2985
|
{
|
|
2982
2986
|
onClick: onPrint,
|
|
2983
2987
|
className: "p-1 hover:bg-neutral-500 rounded transition-colors",
|
|
2984
2988
|
"aria-label": "Print PDF",
|
|
2985
2989
|
type: "button",
|
|
2986
|
-
children: /* @__PURE__ */
|
|
2990
|
+
children: /* @__PURE__ */ jsx24(PrintIcon, { variant: "dark", size: 16 })
|
|
2987
2991
|
}
|
|
2988
2992
|
)
|
|
2989
2993
|
] })
|
|
@@ -2994,12 +2998,12 @@ var PdfHeader = ({
|
|
|
2994
2998
|
PdfHeader.displayName = "PdfHeader";
|
|
2995
2999
|
|
|
2996
3000
|
// src/components/pdf-viewer/hooks/useContainerWidth.ts
|
|
2997
|
-
import * as
|
|
3001
|
+
import * as React23 from "react";
|
|
2998
3002
|
function useContainerWidth(padding = 32) {
|
|
2999
|
-
const [containerWidth, setContainerWidth] =
|
|
3000
|
-
const containerRef =
|
|
3001
|
-
const lastWidthRef =
|
|
3002
|
-
|
|
3003
|
+
const [containerWidth, setContainerWidth] = React23.useState(0);
|
|
3004
|
+
const containerRef = React23.useRef(null);
|
|
3005
|
+
const lastWidthRef = React23.useRef(0);
|
|
3006
|
+
React23.useEffect(() => {
|
|
3003
3007
|
const element = containerRef.current;
|
|
3004
3008
|
if (!element) return;
|
|
3005
3009
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -3023,9 +3027,9 @@ function useContainerWidth(padding = 32) {
|
|
|
3023
3027
|
}
|
|
3024
3028
|
|
|
3025
3029
|
// src/components/pdf-viewer/hooks/usePdfDownload.ts
|
|
3026
|
-
import * as
|
|
3030
|
+
import * as React24 from "react";
|
|
3027
3031
|
function usePdfDownload(file, title) {
|
|
3028
|
-
const download =
|
|
3032
|
+
const download = React24.useCallback(async () => {
|
|
3029
3033
|
if (!file) return;
|
|
3030
3034
|
try {
|
|
3031
3035
|
let blob;
|
|
@@ -3057,11 +3061,11 @@ function usePdfDownload(file, title) {
|
|
|
3057
3061
|
}
|
|
3058
3062
|
|
|
3059
3063
|
// src/components/pdf-viewer/hooks/usePdfPrint.ts
|
|
3060
|
-
import * as
|
|
3064
|
+
import * as React25 from "react";
|
|
3061
3065
|
function usePdfPrint(file) {
|
|
3062
|
-
const [printBlobUrl, setPrintBlobUrl] =
|
|
3063
|
-
const printFrameRef =
|
|
3064
|
-
const preparePrint =
|
|
3066
|
+
const [printBlobUrl, setPrintBlobUrl] = React25.useState(null);
|
|
3067
|
+
const printFrameRef = React25.useRef(null);
|
|
3068
|
+
const preparePrint = React25.useCallback(async () => {
|
|
3065
3069
|
if (!file) return;
|
|
3066
3070
|
try {
|
|
3067
3071
|
let blob;
|
|
@@ -3077,14 +3081,14 @@ function usePdfPrint(file) {
|
|
|
3077
3081
|
console.error("Failed to prepare PDF for printing:", error);
|
|
3078
3082
|
}
|
|
3079
3083
|
}, [file]);
|
|
3080
|
-
|
|
3084
|
+
React25.useEffect(() => {
|
|
3081
3085
|
return () => {
|
|
3082
3086
|
if (printBlobUrl) {
|
|
3083
3087
|
URL.revokeObjectURL(printBlobUrl);
|
|
3084
3088
|
}
|
|
3085
3089
|
};
|
|
3086
3090
|
}, [printBlobUrl]);
|
|
3087
|
-
const print =
|
|
3091
|
+
const print = React25.useCallback(() => {
|
|
3088
3092
|
if (printFrameRef.current?.contentWindow) {
|
|
3089
3093
|
printFrameRef.current.contentWindow.print();
|
|
3090
3094
|
}
|
|
@@ -3093,7 +3097,7 @@ function usePdfPrint(file) {
|
|
|
3093
3097
|
}
|
|
3094
3098
|
|
|
3095
3099
|
// src/components/pdf-viewer/hooks/usePdfScroll.ts
|
|
3096
|
-
import * as
|
|
3100
|
+
import * as React26 from "react";
|
|
3097
3101
|
function usePdfScroll({
|
|
3098
3102
|
containerRef,
|
|
3099
3103
|
numPages,
|
|
@@ -3104,30 +3108,30 @@ function usePdfScroll({
|
|
|
3104
3108
|
effectiveWidth,
|
|
3105
3109
|
viewportBuffer
|
|
3106
3110
|
}) {
|
|
3107
|
-
const [internalPage, setInternalPage] =
|
|
3111
|
+
const [internalPage, setInternalPage] = React26.useState(1);
|
|
3108
3112
|
const isControlled = scrollTo !== void 0;
|
|
3109
3113
|
const currentPage = isControlled ? scrollTo.page : internalPage;
|
|
3110
|
-
const scrollOperationRef =
|
|
3114
|
+
const scrollOperationRef = React26.useRef({
|
|
3111
3115
|
isProgrammatic: false,
|
|
3112
3116
|
targetPage: null,
|
|
3113
3117
|
lastReportedPage: 1,
|
|
3114
3118
|
notifyOnComplete: false
|
|
3115
3119
|
});
|
|
3116
|
-
const [visibleRange, setVisibleRange] =
|
|
3120
|
+
const [visibleRange, setVisibleRange] = React26.useState({
|
|
3117
3121
|
start: 1,
|
|
3118
3122
|
end: Math.min(1 + viewportBuffer, numPages || 1 + viewportBuffer)
|
|
3119
3123
|
});
|
|
3120
|
-
const visiblePages =
|
|
3124
|
+
const visiblePages = React26.useMemo(() => {
|
|
3121
3125
|
const pages = /* @__PURE__ */ new Set();
|
|
3122
3126
|
for (let i = visibleRange.start; i <= visibleRange.end; i++) {
|
|
3123
3127
|
pages.add(i);
|
|
3124
3128
|
}
|
|
3125
3129
|
return pages;
|
|
3126
3130
|
}, [visibleRange.start, visibleRange.end]);
|
|
3127
|
-
const observerRef =
|
|
3128
|
-
const intersectionRatiosRef =
|
|
3129
|
-
const pageRefsMapRef =
|
|
3130
|
-
const cumulativeOffsets =
|
|
3131
|
+
const observerRef = React26.useRef(null);
|
|
3132
|
+
const intersectionRatiosRef = React26.useRef(/* @__PURE__ */ new Map());
|
|
3133
|
+
const pageRefsMapRef = React26.useRef(/* @__PURE__ */ new Map());
|
|
3134
|
+
const cumulativeOffsets = React26.useMemo(() => {
|
|
3131
3135
|
if (!pageDimensions?.size) return null;
|
|
3132
3136
|
const offsets = [CONTAINER_PADDING];
|
|
3133
3137
|
let cumulative = CONTAINER_PADDING;
|
|
@@ -3139,7 +3143,7 @@ function usePdfScroll({
|
|
|
3139
3143
|
}
|
|
3140
3144
|
return offsets;
|
|
3141
3145
|
}, [pageDimensions, effectiveWidth]);
|
|
3142
|
-
const calculatePageOffset =
|
|
3146
|
+
const calculatePageOffset = React26.useCallback(
|
|
3143
3147
|
(pageNum) => {
|
|
3144
3148
|
if (cumulativeOffsets && pageNum <= cumulativeOffsets.length) {
|
|
3145
3149
|
return cumulativeOffsets[pageNum - 1];
|
|
@@ -3154,11 +3158,11 @@ function usePdfScroll({
|
|
|
3154
3158
|
},
|
|
3155
3159
|
[cumulativeOffsets, pageDimensions, effectiveWidth]
|
|
3156
3160
|
);
|
|
3157
|
-
const onPageChangeRef =
|
|
3158
|
-
|
|
3161
|
+
const onPageChangeRef = React26.useRef(onPageChange);
|
|
3162
|
+
React26.useEffect(() => {
|
|
3159
3163
|
onPageChangeRef.current = onPageChange;
|
|
3160
3164
|
}, [onPageChange]);
|
|
3161
|
-
const updatePage =
|
|
3165
|
+
const updatePage = React26.useCallback(
|
|
3162
3166
|
(pageNum) => {
|
|
3163
3167
|
scrollOperationRef.current.lastReportedPage = pageNum;
|
|
3164
3168
|
if (isControlled) {
|
|
@@ -3170,7 +3174,7 @@ function usePdfScroll({
|
|
|
3170
3174
|
[isControlled]
|
|
3171
3175
|
// Removed onPageChange - now uses ref
|
|
3172
3176
|
);
|
|
3173
|
-
const onProgrammaticScrollComplete =
|
|
3177
|
+
const onProgrammaticScrollComplete = React26.useCallback((pageNum) => {
|
|
3174
3178
|
const shouldNotify = scrollOperationRef.current.notifyOnComplete;
|
|
3175
3179
|
scrollOperationRef.current.isProgrammatic = false;
|
|
3176
3180
|
scrollOperationRef.current.targetPage = null;
|
|
@@ -3180,7 +3184,7 @@ function usePdfScroll({
|
|
|
3180
3184
|
onPageChangeRef.current?.(pageNum);
|
|
3181
3185
|
}
|
|
3182
3186
|
}, []);
|
|
3183
|
-
const scrollToPage =
|
|
3187
|
+
const scrollToPage = React26.useCallback(
|
|
3184
3188
|
(pageNum) => {
|
|
3185
3189
|
const container = containerRef.current;
|
|
3186
3190
|
if (!container || !pageDimensions?.size) return;
|
|
@@ -3211,7 +3215,7 @@ function usePdfScroll({
|
|
|
3211
3215
|
onProgrammaticScrollComplete
|
|
3212
3216
|
]
|
|
3213
3217
|
);
|
|
3214
|
-
const scrollToPosition =
|
|
3218
|
+
const scrollToPosition = React26.useCallback(
|
|
3215
3219
|
(target) => {
|
|
3216
3220
|
const container = containerRef.current;
|
|
3217
3221
|
if (!container || !pageDimensions?.size) return;
|
|
@@ -3252,7 +3256,7 @@ function usePdfScroll({
|
|
|
3252
3256
|
onProgrammaticScrollComplete
|
|
3253
3257
|
]
|
|
3254
3258
|
);
|
|
3255
|
-
const handlePageChange =
|
|
3259
|
+
const handlePageChange = React26.useCallback(
|
|
3256
3260
|
(pageNum) => {
|
|
3257
3261
|
const clampedPage = Math.max(1, Math.min(pageNum, numPages));
|
|
3258
3262
|
scrollOperationRef.current.lastReportedPage = clampedPage;
|
|
@@ -3266,12 +3270,12 @@ function usePdfScroll({
|
|
|
3266
3270
|
},
|
|
3267
3271
|
[numPages, scrollToPage, isControlled, onPageChange]
|
|
3268
3272
|
);
|
|
3269
|
-
const updatePageRef =
|
|
3270
|
-
|
|
3273
|
+
const updatePageRef = React26.useRef(updatePage);
|
|
3274
|
+
React26.useEffect(() => {
|
|
3271
3275
|
updatePageRef.current = updatePage;
|
|
3272
3276
|
}, [updatePage]);
|
|
3273
|
-
const lastBufferRef =
|
|
3274
|
-
|
|
3277
|
+
const lastBufferRef = React26.useRef({ start: 1, end: 1 + viewportBuffer });
|
|
3278
|
+
React26.useEffect(() => {
|
|
3275
3279
|
const container = containerRef.current;
|
|
3276
3280
|
if (!container) return;
|
|
3277
3281
|
const observer = new IntersectionObserver(
|
|
@@ -3331,7 +3335,7 @@ function usePdfScroll({
|
|
|
3331
3335
|
ratiosMap.clear();
|
|
3332
3336
|
};
|
|
3333
3337
|
}, [containerRef, numPages, viewportBuffer]);
|
|
3334
|
-
const observePage =
|
|
3338
|
+
const observePage = React26.useCallback(
|
|
3335
3339
|
(pageNum, element) => {
|
|
3336
3340
|
const prevElement = pageRefsMapRef.current.get(pageNum);
|
|
3337
3341
|
if (element) {
|
|
@@ -3352,7 +3356,7 @@ function usePdfScroll({
|
|
|
3352
3356
|
},
|
|
3353
3357
|
[]
|
|
3354
3358
|
);
|
|
3355
|
-
|
|
3359
|
+
React26.useEffect(() => {
|
|
3356
3360
|
const container = containerRef.current;
|
|
3357
3361
|
if (!container) return;
|
|
3358
3362
|
const handleUserScroll = () => {
|
|
@@ -3410,9 +3414,9 @@ function usePdfScroll({
|
|
|
3410
3414
|
}
|
|
3411
3415
|
};
|
|
3412
3416
|
}, [containerRef, onProgrammaticScrollComplete]);
|
|
3413
|
-
const lastScrollTargetRef =
|
|
3414
|
-
const prevEffectiveWidthRef =
|
|
3415
|
-
|
|
3417
|
+
const lastScrollTargetRef = React26.useRef(null);
|
|
3418
|
+
const prevEffectiveWidthRef = React26.useRef(effectiveWidth);
|
|
3419
|
+
React26.useEffect(() => {
|
|
3416
3420
|
if (prevEffectiveWidthRef.current !== effectiveWidth) {
|
|
3417
3421
|
prevEffectiveWidthRef.current = effectiveWidth;
|
|
3418
3422
|
const lastScrollTarget = lastScrollTargetRef.current;
|
|
@@ -3421,7 +3425,7 @@ function usePdfScroll({
|
|
|
3421
3425
|
}
|
|
3422
3426
|
}
|
|
3423
3427
|
}, [effectiveWidth]);
|
|
3424
|
-
|
|
3428
|
+
React26.useEffect(() => {
|
|
3425
3429
|
if (!isControlled || !scrollTo || numPages <= 0) return;
|
|
3426
3430
|
if (!pageDimensions?.size) return;
|
|
3427
3431
|
const lastScrollTarget = lastScrollTargetRef.current;
|
|
@@ -3454,7 +3458,7 @@ function usePdfScroll({
|
|
|
3454
3458
|
pageDimensions,
|
|
3455
3459
|
effectiveWidth
|
|
3456
3460
|
]);
|
|
3457
|
-
|
|
3461
|
+
React26.useEffect(() => {
|
|
3458
3462
|
const pageRefs = pageRefsMapRef.current;
|
|
3459
3463
|
const ratios = intersectionRatiosRef.current;
|
|
3460
3464
|
for (const pageNum of pageRefs.keys()) {
|
|
@@ -3478,14 +3482,14 @@ function usePdfScroll({
|
|
|
3478
3482
|
}
|
|
3479
3483
|
|
|
3480
3484
|
// src/components/pdf-viewer/hooks/useZoomControl.ts
|
|
3481
|
-
import * as
|
|
3485
|
+
import * as React27 from "react";
|
|
3482
3486
|
function useZoomControl({
|
|
3483
3487
|
containerRef,
|
|
3484
3488
|
initialZoom = PDF_ZOOM.DEFAULT
|
|
3485
3489
|
}) {
|
|
3486
|
-
const [zoom, setZoom] =
|
|
3487
|
-
const scrollRatioRef =
|
|
3488
|
-
const handleZoomChange =
|
|
3490
|
+
const [zoom, setZoom] = React27.useState(initialZoom);
|
|
3491
|
+
const scrollRatioRef = React27.useRef({ x: 0.5, y: 0 });
|
|
3492
|
+
const handleZoomChange = React27.useCallback(
|
|
3489
3493
|
(newZoom) => {
|
|
3490
3494
|
const container = containerRef.current;
|
|
3491
3495
|
if (container) {
|
|
@@ -3506,7 +3510,7 @@ function useZoomControl({
|
|
|
3506
3510
|
},
|
|
3507
3511
|
[containerRef]
|
|
3508
3512
|
);
|
|
3509
|
-
|
|
3513
|
+
React27.useEffect(() => {
|
|
3510
3514
|
const container = containerRef.current;
|
|
3511
3515
|
if (!container) return;
|
|
3512
3516
|
requestAnimationFrame(() => {
|
|
@@ -3531,9 +3535,9 @@ function initializePdfWorker(workerUrl) {
|
|
|
3531
3535
|
}
|
|
3532
3536
|
|
|
3533
3537
|
// src/components/pdf-viewer/index.tsx
|
|
3534
|
-
import { jsx as
|
|
3538
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3535
3539
|
var DEFAULT_VIEWPORT_BUFFER = 1;
|
|
3536
|
-
var PdfViewer =
|
|
3540
|
+
var PdfViewer = React28.forwardRef(
|
|
3537
3541
|
({
|
|
3538
3542
|
file,
|
|
3539
3543
|
title,
|
|
@@ -3560,15 +3564,15 @@ var PdfViewer = React27.forwardRef(
|
|
|
3560
3564
|
className,
|
|
3561
3565
|
...props
|
|
3562
3566
|
}, ref) => {
|
|
3563
|
-
const [numPages, setNumPages] =
|
|
3564
|
-
const [pageDimensions, setPageDimensions] =
|
|
3567
|
+
const [numPages, setNumPages] = React28.useState(0);
|
|
3568
|
+
const [pageDimensions, setPageDimensions] = React28.useState(null);
|
|
3565
3569
|
const { containerWidth, containerRef } = useContainerWidth();
|
|
3566
3570
|
const { zoom, handleZoomChange } = useZoomControl({ containerRef });
|
|
3567
3571
|
const { printFrameRef, printBlobUrl, preparePrint, print } = usePdfPrint(file);
|
|
3568
3572
|
const download = usePdfDownload(file, title);
|
|
3569
3573
|
const baseWidth = Math.min(pageWidth || containerWidth, 800);
|
|
3570
3574
|
const effectiveWidth = Math.round(baseWidth * (zoom / 100));
|
|
3571
|
-
const handleDimensionsLoaded =
|
|
3575
|
+
const handleDimensionsLoaded = React28.useCallback(
|
|
3572
3576
|
(dimensions) => {
|
|
3573
3577
|
setPageDimensions(dimensions);
|
|
3574
3578
|
onDimensionsReady?.(dimensions);
|
|
@@ -3585,7 +3589,7 @@ var PdfViewer = React27.forwardRef(
|
|
|
3585
3589
|
effectiveWidth,
|
|
3586
3590
|
viewportBuffer
|
|
3587
3591
|
});
|
|
3588
|
-
const handleLoadSuccess =
|
|
3592
|
+
const handleLoadSuccess = React28.useCallback(
|
|
3589
3593
|
async (pages) => {
|
|
3590
3594
|
setNumPages(pages);
|
|
3591
3595
|
onLoadSuccess?.(pages);
|
|
@@ -3593,28 +3597,28 @@ var PdfViewer = React27.forwardRef(
|
|
|
3593
3597
|
},
|
|
3594
3598
|
[onLoadSuccess, preparePrint]
|
|
3595
3599
|
);
|
|
3596
|
-
const handleDownload =
|
|
3600
|
+
const handleDownload = React28.useCallback(() => {
|
|
3597
3601
|
if (onDownload) {
|
|
3598
3602
|
onDownload();
|
|
3599
3603
|
return;
|
|
3600
3604
|
}
|
|
3601
3605
|
download();
|
|
3602
3606
|
}, [onDownload, download]);
|
|
3603
|
-
const handlePrint =
|
|
3607
|
+
const handlePrint = React28.useCallback(() => {
|
|
3604
3608
|
if (onPrint) {
|
|
3605
3609
|
onPrint();
|
|
3606
3610
|
return;
|
|
3607
3611
|
}
|
|
3608
3612
|
print();
|
|
3609
3613
|
}, [onPrint, print]);
|
|
3610
|
-
return /* @__PURE__ */
|
|
3614
|
+
return /* @__PURE__ */ jsxs13(
|
|
3611
3615
|
"div",
|
|
3612
3616
|
{
|
|
3613
3617
|
ref,
|
|
3614
3618
|
className: cn("h-full flex flex-col", className),
|
|
3615
3619
|
...props,
|
|
3616
3620
|
children: [
|
|
3617
|
-
printBlobUrl && /* @__PURE__ */
|
|
3621
|
+
printBlobUrl && /* @__PURE__ */ jsx25(
|
|
3618
3622
|
"iframe",
|
|
3619
3623
|
{
|
|
3620
3624
|
ref: printFrameRef,
|
|
@@ -3623,7 +3627,7 @@ var PdfViewer = React27.forwardRef(
|
|
|
3623
3627
|
title: "PDF for printing"
|
|
3624
3628
|
}
|
|
3625
3629
|
),
|
|
3626
|
-
/* @__PURE__ */
|
|
3630
|
+
/* @__PURE__ */ jsx25(
|
|
3627
3631
|
PdfHeader,
|
|
3628
3632
|
{
|
|
3629
3633
|
title,
|
|
@@ -3631,8 +3635,8 @@ var PdfViewer = React27.forwardRef(
|
|
|
3631
3635
|
onPrint: handlePrint
|
|
3632
3636
|
}
|
|
3633
3637
|
),
|
|
3634
|
-
/* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3638
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex-1 flex overflow-hidden min-h-0", children: [
|
|
3639
|
+
/* @__PURE__ */ jsx25(CustomScrollbar, { containerRef, children: /* @__PURE__ */ jsx25(
|
|
3636
3640
|
PdfDocument,
|
|
3637
3641
|
{
|
|
3638
3642
|
file,
|
|
@@ -3656,7 +3660,7 @@ var PdfViewer = React27.forwardRef(
|
|
|
3656
3660
|
onBoxMouseLeave
|
|
3657
3661
|
}
|
|
3658
3662
|
) }),
|
|
3659
|
-
showControls && /* @__PURE__ */
|
|
3663
|
+
showControls && /* @__PURE__ */ jsx25(
|
|
3660
3664
|
PdfControls,
|
|
3661
3665
|
{
|
|
3662
3666
|
currentPage,
|
|
@@ -3677,9 +3681,9 @@ var PdfViewer = React27.forwardRef(
|
|
|
3677
3681
|
PdfViewer.displayName = "PdfViewer";
|
|
3678
3682
|
|
|
3679
3683
|
// src/components/ui/tabs.tsx
|
|
3680
|
-
import * as
|
|
3684
|
+
import * as React29 from "react";
|
|
3681
3685
|
import { cva as cva11 } from "class-variance-authority";
|
|
3682
|
-
import { jsx as
|
|
3686
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3683
3687
|
var tabsVariants = cva11(
|
|
3684
3688
|
"inline-flex items-center justify-start whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-interactive focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 h-10",
|
|
3685
3689
|
{
|
|
@@ -3693,17 +3697,17 @@ var tabsVariants = cva11(
|
|
|
3693
3697
|
}
|
|
3694
3698
|
}
|
|
3695
3699
|
);
|
|
3696
|
-
var TabsContext =
|
|
3700
|
+
var TabsContext = React29.createContext(
|
|
3697
3701
|
void 0
|
|
3698
3702
|
);
|
|
3699
3703
|
function useTabsContext() {
|
|
3700
|
-
const context =
|
|
3704
|
+
const context = React29.useContext(TabsContext);
|
|
3701
3705
|
if (!context) {
|
|
3702
3706
|
throw new Error("Tabs components must be used within a Tabs provider");
|
|
3703
3707
|
}
|
|
3704
3708
|
return context;
|
|
3705
3709
|
}
|
|
3706
|
-
var Tabs =
|
|
3710
|
+
var Tabs = React29.forwardRef((props, ref) => {
|
|
3707
3711
|
const {
|
|
3708
3712
|
className,
|
|
3709
3713
|
value,
|
|
@@ -3712,7 +3716,7 @@ var Tabs = React28.forwardRef((props, ref) => {
|
|
|
3712
3716
|
children,
|
|
3713
3717
|
...restProps
|
|
3714
3718
|
} = props;
|
|
3715
|
-
const contextValue =
|
|
3719
|
+
const contextValue = React29.useMemo(
|
|
3716
3720
|
() => ({
|
|
3717
3721
|
activeTab: value,
|
|
3718
3722
|
setActiveTab: onValueChange,
|
|
@@ -3720,13 +3724,13 @@ var Tabs = React28.forwardRef((props, ref) => {
|
|
|
3720
3724
|
}),
|
|
3721
3725
|
[value, onValueChange, variant]
|
|
3722
3726
|
);
|
|
3723
|
-
return /* @__PURE__ */
|
|
3727
|
+
return /* @__PURE__ */ jsx26(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx26("div", { ref, className: cn("w-full", className), ...restProps, children }) });
|
|
3724
3728
|
});
|
|
3725
3729
|
Tabs.displayName = "Tabs";
|
|
3726
|
-
var TabsList =
|
|
3730
|
+
var TabsList = React29.forwardRef(
|
|
3727
3731
|
(props, ref) => {
|
|
3728
3732
|
const { className, children, ...restProps } = props;
|
|
3729
|
-
return /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ jsx26(
|
|
3730
3734
|
"div",
|
|
3731
3735
|
{
|
|
3732
3736
|
ref,
|
|
@@ -3742,7 +3746,7 @@ TabsList.displayName = "TabsList";
|
|
|
3742
3746
|
var getTabTypographyStyles = (isActive) => ({
|
|
3743
3747
|
font: isActive ? "var(--typography-label-sm-bold)" : "var(--typography-label-sm-regular)"
|
|
3744
3748
|
});
|
|
3745
|
-
var TabsTrigger =
|
|
3749
|
+
var TabsTrigger = React29.forwardRef(
|
|
3746
3750
|
(props, ref) => {
|
|
3747
3751
|
const { className, value, disabled, style, children, ...restProps } = props;
|
|
3748
3752
|
const { activeTab, setActiveTab, variant } = useTabsContext();
|
|
@@ -3750,22 +3754,22 @@ var TabsTrigger = React28.forwardRef(
|
|
|
3750
3754
|
throw new Error("TabsTrigger must have a value prop");
|
|
3751
3755
|
}
|
|
3752
3756
|
const isActive = activeTab === value;
|
|
3753
|
-
const tokenStyles =
|
|
3757
|
+
const tokenStyles = React29.useMemo(
|
|
3754
3758
|
() => ({
|
|
3755
3759
|
...getTabTypographyStyles(isActive),
|
|
3756
3760
|
...style
|
|
3757
3761
|
}),
|
|
3758
3762
|
[isActive, style]
|
|
3759
3763
|
);
|
|
3760
|
-
const triggerClassName =
|
|
3764
|
+
const triggerClassName = React29.useMemo(
|
|
3761
3765
|
() => cn(tabsVariants({ variant }), className),
|
|
3762
3766
|
[variant, className]
|
|
3763
3767
|
);
|
|
3764
|
-
const handleClick =
|
|
3768
|
+
const handleClick = React29.useCallback(() => {
|
|
3765
3769
|
if (disabled) return;
|
|
3766
3770
|
setActiveTab(value);
|
|
3767
3771
|
}, [disabled, setActiveTab, value]);
|
|
3768
|
-
return /* @__PURE__ */
|
|
3772
|
+
return /* @__PURE__ */ jsx26(
|
|
3769
3773
|
"button",
|
|
3770
3774
|
{
|
|
3771
3775
|
ref,
|
|
@@ -3779,13 +3783,13 @@ var TabsTrigger = React28.forwardRef(
|
|
|
3779
3783
|
disabled,
|
|
3780
3784
|
onClick: handleClick,
|
|
3781
3785
|
...restProps,
|
|
3782
|
-
children: /* @__PURE__ */
|
|
3786
|
+
children: /* @__PURE__ */ jsx26("span", { className: "pl-3 pr-6 py-2", children })
|
|
3783
3787
|
}
|
|
3784
3788
|
);
|
|
3785
3789
|
}
|
|
3786
3790
|
);
|
|
3787
3791
|
TabsTrigger.displayName = "TabsTrigger";
|
|
3788
|
-
var TabsContent =
|
|
3792
|
+
var TabsContent = React29.forwardRef(
|
|
3789
3793
|
(props, ref) => {
|
|
3790
3794
|
const { className, value, children, ...restProps } = props;
|
|
3791
3795
|
const { activeTab } = useTabsContext();
|
|
@@ -3796,7 +3800,7 @@ var TabsContent = React28.forwardRef(
|
|
|
3796
3800
|
if (!isActive) {
|
|
3797
3801
|
return null;
|
|
3798
3802
|
}
|
|
3799
|
-
return /* @__PURE__ */
|
|
3803
|
+
return /* @__PURE__ */ jsx26(
|
|
3800
3804
|
"div",
|
|
3801
3805
|
{
|
|
3802
3806
|
ref,
|
|
@@ -3814,11 +3818,11 @@ var TabsContent = React28.forwardRef(
|
|
|
3814
3818
|
TabsContent.displayName = "TabsContent";
|
|
3815
3819
|
|
|
3816
3820
|
// src/components/ui/dropdown-menu.tsx
|
|
3817
|
-
import * as
|
|
3821
|
+
import * as React30 from "react";
|
|
3818
3822
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3819
|
-
import { jsx as
|
|
3823
|
+
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3820
3824
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
3821
|
-
var DropdownMenuTrigger =
|
|
3825
|
+
var DropdownMenuTrigger = React30.forwardRef(({ className, icon, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
3822
3826
|
DropdownMenuPrimitive.Trigger,
|
|
3823
3827
|
{
|
|
3824
3828
|
ref,
|
|
@@ -3828,7 +3832,7 @@ var DropdownMenuTrigger = React29.forwardRef(({ className, icon, children, ...pr
|
|
|
3828
3832
|
),
|
|
3829
3833
|
...props,
|
|
3830
3834
|
children: [
|
|
3831
|
-
icon || /* @__PURE__ */
|
|
3835
|
+
icon || /* @__PURE__ */ jsx27(MoreMenuIcon, {}),
|
|
3832
3836
|
children
|
|
3833
3837
|
]
|
|
3834
3838
|
}
|
|
@@ -3838,7 +3842,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
3838
3842
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
3839
3843
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
3840
3844
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
3841
|
-
var DropdownMenuSubTrigger =
|
|
3845
|
+
var DropdownMenuSubTrigger = React30.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
3842
3846
|
DropdownMenuPrimitive.SubTrigger,
|
|
3843
3847
|
{
|
|
3844
3848
|
ref,
|
|
@@ -3851,12 +3855,12 @@ var DropdownMenuSubTrigger = React29.forwardRef(({ className, inset, children, .
|
|
|
3851
3855
|
...props,
|
|
3852
3856
|
children: [
|
|
3853
3857
|
children,
|
|
3854
|
-
/* @__PURE__ */
|
|
3858
|
+
/* @__PURE__ */ jsx27(ArrowRightIcon, { className: "ml-auto" })
|
|
3855
3859
|
]
|
|
3856
3860
|
}
|
|
3857
3861
|
));
|
|
3858
3862
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
3859
|
-
var DropdownMenuSubContent =
|
|
3863
|
+
var DropdownMenuSubContent = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
3860
3864
|
DropdownMenuPrimitive.SubContent,
|
|
3861
3865
|
{
|
|
3862
3866
|
ref,
|
|
@@ -3868,7 +3872,7 @@ var DropdownMenuSubContent = React29.forwardRef(({ className, ...props }, ref) =
|
|
|
3868
3872
|
}
|
|
3869
3873
|
));
|
|
3870
3874
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
3871
|
-
var DropdownMenuContent =
|
|
3875
|
+
var DropdownMenuContent = React30.forwardRef(({ className, sideOffset = 4, align = "end", ...props }, ref) => /* @__PURE__ */ jsx27(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx27(
|
|
3872
3876
|
DropdownMenuPrimitive.Content,
|
|
3873
3877
|
{
|
|
3874
3878
|
ref,
|
|
@@ -3882,7 +3886,7 @@ var DropdownMenuContent = React29.forwardRef(({ className, sideOffset = 4, align
|
|
|
3882
3886
|
}
|
|
3883
3887
|
) }));
|
|
3884
3888
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3885
|
-
var DropdownMenuItem =
|
|
3889
|
+
var DropdownMenuItem = React30.forwardRef(({ className, inset, style, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
3886
3890
|
DropdownMenuPrimitive.Item,
|
|
3887
3891
|
{
|
|
3888
3892
|
ref,
|
|
@@ -3899,7 +3903,7 @@ var DropdownMenuItem = React29.forwardRef(({ className, inset, style, ...props }
|
|
|
3899
3903
|
}
|
|
3900
3904
|
));
|
|
3901
3905
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
3902
|
-
var DropdownMenuCheckboxItem =
|
|
3906
|
+
var DropdownMenuCheckboxItem = React30.forwardRef(({ className, children, style, checked, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
3903
3907
|
DropdownMenuPrimitive.CheckboxItem,
|
|
3904
3908
|
{
|
|
3905
3909
|
ref,
|
|
@@ -3914,7 +3918,7 @@ var DropdownMenuCheckboxItem = React29.forwardRef(({ className, children, style,
|
|
|
3914
3918
|
},
|
|
3915
3919
|
...props,
|
|
3916
3920
|
children: [
|
|
3917
|
-
/* @__PURE__ */
|
|
3921
|
+
/* @__PURE__ */ jsx27(
|
|
3918
3922
|
Checkbox,
|
|
3919
3923
|
{
|
|
3920
3924
|
checked: checked === true,
|
|
@@ -3922,12 +3926,12 @@ var DropdownMenuCheckboxItem = React29.forwardRef(({ className, children, style,
|
|
|
3922
3926
|
"aria-hidden": "true"
|
|
3923
3927
|
}
|
|
3924
3928
|
),
|
|
3925
|
-
/* @__PURE__ */
|
|
3929
|
+
/* @__PURE__ */ jsx27("span", { className: "flex-1", children })
|
|
3926
3930
|
]
|
|
3927
3931
|
}
|
|
3928
3932
|
));
|
|
3929
3933
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
3930
|
-
var DropdownMenuRadioItem =
|
|
3934
|
+
var DropdownMenuRadioItem = React30.forwardRef(({ className, children, style, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
3931
3935
|
DropdownMenuPrimitive.RadioItem,
|
|
3932
3936
|
{
|
|
3933
3937
|
ref,
|
|
@@ -3941,13 +3945,13 @@ var DropdownMenuRadioItem = React29.forwardRef(({ className, children, style, ..
|
|
|
3941
3945
|
},
|
|
3942
3946
|
...props,
|
|
3943
3947
|
children: [
|
|
3944
|
-
/* @__PURE__ */
|
|
3948
|
+
/* @__PURE__ */ jsx27("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx27(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx27("span", { className: "h-2 w-2 rounded-full bg-current" }) }) }),
|
|
3945
3949
|
children
|
|
3946
3950
|
]
|
|
3947
3951
|
}
|
|
3948
3952
|
));
|
|
3949
3953
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
3950
|
-
var DropdownMenuLabel =
|
|
3954
|
+
var DropdownMenuLabel = React30.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
3951
3955
|
DropdownMenuPrimitive.Label,
|
|
3952
3956
|
{
|
|
3953
3957
|
ref,
|
|
@@ -3960,7 +3964,7 @@ var DropdownMenuLabel = React29.forwardRef(({ className, inset, ...props }, ref)
|
|
|
3960
3964
|
}
|
|
3961
3965
|
));
|
|
3962
3966
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
3963
|
-
var DropdownMenuSeparator =
|
|
3967
|
+
var DropdownMenuSeparator = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
3964
3968
|
DropdownMenuPrimitive.Separator,
|
|
3965
3969
|
{
|
|
3966
3970
|
ref,
|
|
@@ -3973,7 +3977,7 @@ var DropdownMenuShortcut = ({
|
|
|
3973
3977
|
className,
|
|
3974
3978
|
...props
|
|
3975
3979
|
}) => {
|
|
3976
|
-
return /* @__PURE__ */
|
|
3980
|
+
return /* @__PURE__ */ jsx27(
|
|
3977
3981
|
"span",
|
|
3978
3982
|
{
|
|
3979
3983
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -3984,21 +3988,21 @@ var DropdownMenuShortcut = ({
|
|
|
3984
3988
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
3985
3989
|
|
|
3986
3990
|
// src/components/ui/charts/chart-legend.tsx
|
|
3987
|
-
import { jsx as
|
|
3991
|
+
import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3988
3992
|
function ChartLegend({
|
|
3989
3993
|
items,
|
|
3990
3994
|
x = 0,
|
|
3991
3995
|
y = 550,
|
|
3992
3996
|
className = ""
|
|
3993
3997
|
}) {
|
|
3994
|
-
return /* @__PURE__ */
|
|
3998
|
+
return /* @__PURE__ */ jsx28("foreignObject", { x, y, width: "100%", height: "40", children: /* @__PURE__ */ jsx28(
|
|
3995
3999
|
"div",
|
|
3996
4000
|
{
|
|
3997
4001
|
className: `flex justify-center items-center gap-6 ${className}`,
|
|
3998
4002
|
style: { height: "100%" },
|
|
3999
|
-
children: items.map(({ key, color, label }) => /* @__PURE__ */
|
|
4000
|
-
/* @__PURE__ */
|
|
4001
|
-
/* @__PURE__ */
|
|
4003
|
+
children: items.map(({ key, color, label }) => /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
4004
|
+
/* @__PURE__ */ jsx28("div", { className: "w-3 h-3", style: { backgroundColor: color } }),
|
|
4005
|
+
/* @__PURE__ */ jsx28(Typography, { variant: "body-xs", children: label || key })
|
|
4002
4006
|
] }, key))
|
|
4003
4007
|
}
|
|
4004
4008
|
) });
|
|
@@ -4116,12 +4120,12 @@ var formatLargeNumber = (value) => {
|
|
|
4116
4120
|
};
|
|
4117
4121
|
|
|
4118
4122
|
// src/components/ui/charts/chart-labels.tsx
|
|
4119
|
-
import { jsx as
|
|
4123
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4120
4124
|
var createCustomXAxisLabel = (text, yOffset = 40) => {
|
|
4121
4125
|
const CustomXAxisLabel = ({ viewBox }) => {
|
|
4122
4126
|
if (!viewBox) return null;
|
|
4123
4127
|
const { x, y, width } = viewBox;
|
|
4124
|
-
return /* @__PURE__ */
|
|
4128
|
+
return /* @__PURE__ */ jsx29("g", { children: /* @__PURE__ */ jsx29("foreignObject", { x, y: y + yOffset, width, height: 20, children: /* @__PURE__ */ jsx29("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ jsx29(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
4125
4129
|
};
|
|
4126
4130
|
CustomXAxisLabel.displayName = "CustomXAxisLabel";
|
|
4127
4131
|
return CustomXAxisLabel;
|
|
@@ -4131,7 +4135,7 @@ var createCustomYAxisLabel = (text, leftMargin) => {
|
|
|
4131
4135
|
if (!viewBox) return null;
|
|
4132
4136
|
const { x, y, height } = viewBox;
|
|
4133
4137
|
const offset = leftMargin ? leftMargin + 10 : 110;
|
|
4134
|
-
return /* @__PURE__ */
|
|
4138
|
+
return /* @__PURE__ */ jsx29("g", { children: /* @__PURE__ */ jsx29("foreignObject", { x: x - offset, y, width: 100, height, children: /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center h-full transform -rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx29(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
4135
4139
|
};
|
|
4136
4140
|
CustomYAxisLabel.displayName = "CustomYAxisLabel";
|
|
4137
4141
|
return CustomYAxisLabel;
|
|
@@ -4140,14 +4144,14 @@ var createCustomYAxisRightLabel = (text) => {
|
|
|
4140
4144
|
const CustomYAxisRightLabel = ({ viewBox }) => {
|
|
4141
4145
|
if (!viewBox) return null;
|
|
4142
4146
|
const { x, y, width, height } = viewBox;
|
|
4143
|
-
return /* @__PURE__ */
|
|
4147
|
+
return /* @__PURE__ */ jsx29("g", { children: /* @__PURE__ */ jsx29("foreignObject", { x: x + width - 70, y, width: 120, height, children: /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center h-full transform rotate-90 whitespace-nowrap", children: /* @__PURE__ */ jsx29(Typography, { variant: "label-xs-bold", className: "text-secondary", children: text }) }) }) });
|
|
4144
4148
|
};
|
|
4145
4149
|
CustomYAxisRightLabel.displayName = "CustomYAxisRightLabel";
|
|
4146
4150
|
return CustomYAxisRightLabel;
|
|
4147
4151
|
};
|
|
4148
4152
|
var customXAxisTick = (props) => {
|
|
4149
4153
|
const { x, y, payload } = props;
|
|
4150
|
-
return /* @__PURE__ */
|
|
4154
|
+
return /* @__PURE__ */ jsx29("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx29(
|
|
4151
4155
|
"foreignObject",
|
|
4152
4156
|
{
|
|
4153
4157
|
x: -20,
|
|
@@ -4155,12 +4159,12 @@ var customXAxisTick = (props) => {
|
|
|
4155
4159
|
width: 40,
|
|
4156
4160
|
height: 20,
|
|
4157
4161
|
style: { overflow: "visible" },
|
|
4158
|
-
children: /* @__PURE__ */
|
|
4162
|
+
children: /* @__PURE__ */ jsx29(
|
|
4159
4163
|
"div",
|
|
4160
4164
|
{
|
|
4161
4165
|
className: "flex items-start justify-center h-full",
|
|
4162
4166
|
style: { overflow: "visible" },
|
|
4163
|
-
children: /* @__PURE__ */
|
|
4167
|
+
children: /* @__PURE__ */ jsx29(
|
|
4164
4168
|
Typography,
|
|
4165
4169
|
{
|
|
4166
4170
|
variant: "body-xs",
|
|
@@ -4175,7 +4179,7 @@ var customXAxisTick = (props) => {
|
|
|
4175
4179
|
};
|
|
4176
4180
|
var customXAxisTickRotated = (props) => {
|
|
4177
4181
|
const { x, y, payload } = props;
|
|
4178
|
-
return /* @__PURE__ */
|
|
4182
|
+
return /* @__PURE__ */ jsx29("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx29(
|
|
4179
4183
|
"text",
|
|
4180
4184
|
{
|
|
4181
4185
|
x: 0,
|
|
@@ -4194,25 +4198,25 @@ var customYAxisTick = (props) => {
|
|
|
4194
4198
|
const { x, y, payload } = props;
|
|
4195
4199
|
const text = String(payload.value);
|
|
4196
4200
|
const estimatedWidth = Math.max(text.length * 8, 80);
|
|
4197
|
-
return /* @__PURE__ */
|
|
4201
|
+
return /* @__PURE__ */ jsx29(
|
|
4198
4202
|
"foreignObject",
|
|
4199
4203
|
{
|
|
4200
4204
|
x: x - estimatedWidth + 5,
|
|
4201
4205
|
y: y - 6,
|
|
4202
4206
|
width: estimatedWidth,
|
|
4203
4207
|
height: 15,
|
|
4204
|
-
children: /* @__PURE__ */
|
|
4208
|
+
children: /* @__PURE__ */ jsx29("div", { className: "flex justify-end w-full", children: /* @__PURE__ */ jsx29(Typography, { variant: "body-xs", className: "text-secondary", children: payload.value }) })
|
|
4205
4209
|
}
|
|
4206
4210
|
);
|
|
4207
4211
|
};
|
|
4208
4212
|
|
|
4209
4213
|
// src/components/ui/charts/chart-tooltip.tsx
|
|
4210
|
-
import { Fragment as Fragment2, jsx as
|
|
4214
|
+
import { Fragment as Fragment2, jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4211
4215
|
function TooltipContainer({
|
|
4212
4216
|
children,
|
|
4213
4217
|
className = ""
|
|
4214
4218
|
}) {
|
|
4215
|
-
return /* @__PURE__ */
|
|
4219
|
+
return /* @__PURE__ */ jsx30(
|
|
4216
4220
|
"div",
|
|
4217
4221
|
{
|
|
4218
4222
|
className: `bg-light border border-subtle rounded p-2.5 text-dark ${className}`,
|
|
@@ -4226,10 +4230,10 @@ function TooltipItem({
|
|
|
4226
4230
|
value,
|
|
4227
4231
|
className = ""
|
|
4228
4232
|
}) {
|
|
4229
|
-
return /* @__PURE__ */
|
|
4230
|
-
/* @__PURE__ */
|
|
4231
|
-
/* @__PURE__ */
|
|
4232
|
-
/* @__PURE__ */
|
|
4233
|
+
return /* @__PURE__ */ jsxs16(Fragment2, { children: [
|
|
4234
|
+
/* @__PURE__ */ jsx30("br", {}),
|
|
4235
|
+
/* @__PURE__ */ jsxs16(Typography, { variant: "label-sm", className, children: [
|
|
4236
|
+
/* @__PURE__ */ jsx30(
|
|
4233
4237
|
"span",
|
|
4234
4238
|
{
|
|
4235
4239
|
className: "inline-block w-3 h-3 mr-1.5",
|
|
@@ -4247,9 +4251,9 @@ function GenericTooltip({
|
|
|
4247
4251
|
items,
|
|
4248
4252
|
className = ""
|
|
4249
4253
|
}) {
|
|
4250
|
-
return /* @__PURE__ */
|
|
4251
|
-
title && /* @__PURE__ */
|
|
4252
|
-
items.map((item, index) => /* @__PURE__ */
|
|
4254
|
+
return /* @__PURE__ */ jsxs16(TooltipContainer, { className, children: [
|
|
4255
|
+
title && /* @__PURE__ */ jsx30(Typography, { variant: "label-sm-bold", children: title }),
|
|
4256
|
+
items.map((item, index) => /* @__PURE__ */ jsx30(
|
|
4253
4257
|
TooltipItem,
|
|
4254
4258
|
{
|
|
4255
4259
|
color: item.color,
|
|
@@ -4262,7 +4266,7 @@ function GenericTooltip({
|
|
|
4262
4266
|
}
|
|
4263
4267
|
|
|
4264
4268
|
// src/components/ui/charts/bar-chart.tsx
|
|
4265
|
-
import { forwardRef as
|
|
4269
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
4266
4270
|
import {
|
|
4267
4271
|
BarChart as RechartsBarChart,
|
|
4268
4272
|
Bar,
|
|
@@ -4271,8 +4275,8 @@ import {
|
|
|
4271
4275
|
Tooltip as Tooltip2,
|
|
4272
4276
|
ResponsiveContainer
|
|
4273
4277
|
} from "recharts";
|
|
4274
|
-
import { jsx as
|
|
4275
|
-
var BarChart =
|
|
4278
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4279
|
+
var BarChart = forwardRef22(
|
|
4276
4280
|
({
|
|
4277
4281
|
data,
|
|
4278
4282
|
xAxisKey,
|
|
@@ -4298,19 +4302,19 @@ var BarChart = forwardRef21(
|
|
|
4298
4302
|
};
|
|
4299
4303
|
const defaultLegendItems = showLegend && legendItems.length === 0 ? [{ key: yAxisKey, color: barColor, label: yAxisKey }] : legendItems;
|
|
4300
4304
|
const hasData = data && data.length > 0;
|
|
4301
|
-
return /* @__PURE__ */
|
|
4305
|
+
return /* @__PURE__ */ jsxs17(
|
|
4302
4306
|
"div",
|
|
4303
4307
|
{
|
|
4304
4308
|
ref,
|
|
4305
4309
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
4306
4310
|
children: [
|
|
4307
|
-
/* @__PURE__ */
|
|
4308
|
-
/* @__PURE__ */
|
|
4311
|
+
/* @__PURE__ */ jsx31("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx31(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
4312
|
+
/* @__PURE__ */ jsx31("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx31(
|
|
4309
4313
|
ResponsiveContainer,
|
|
4310
4314
|
{
|
|
4311
4315
|
width: "100%",
|
|
4312
4316
|
height: CHART_CONSTANTS.STANDARD_HEIGHT,
|
|
4313
|
-
children: /* @__PURE__ */
|
|
4317
|
+
children: /* @__PURE__ */ jsxs17(
|
|
4314
4318
|
RechartsBarChart,
|
|
4315
4319
|
{
|
|
4316
4320
|
data,
|
|
@@ -4322,7 +4326,7 @@ var BarChart = forwardRef21(
|
|
|
4322
4326
|
onClick: handleClick,
|
|
4323
4327
|
layout,
|
|
4324
4328
|
children: [
|
|
4325
|
-
/* @__PURE__ */
|
|
4329
|
+
/* @__PURE__ */ jsx31(
|
|
4326
4330
|
XAxis,
|
|
4327
4331
|
{
|
|
4328
4332
|
dataKey: xAxisKey,
|
|
@@ -4336,7 +4340,7 @@ var BarChart = forwardRef21(
|
|
|
4336
4340
|
label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel, 80) : void 0
|
|
4337
4341
|
}
|
|
4338
4342
|
),
|
|
4339
|
-
/* @__PURE__ */
|
|
4343
|
+
/* @__PURE__ */ jsx31(
|
|
4340
4344
|
YAxis,
|
|
4341
4345
|
{
|
|
4342
4346
|
axisLine: false,
|
|
@@ -4347,7 +4351,7 @@ var BarChart = forwardRef21(
|
|
|
4347
4351
|
type: yAxisType
|
|
4348
4352
|
}
|
|
4349
4353
|
),
|
|
4350
|
-
/* @__PURE__ */
|
|
4354
|
+
/* @__PURE__ */ jsx31(
|
|
4351
4355
|
Tooltip2,
|
|
4352
4356
|
{
|
|
4353
4357
|
content: ({
|
|
@@ -4356,7 +4360,7 @@ var BarChart = forwardRef21(
|
|
|
4356
4360
|
label
|
|
4357
4361
|
}) => {
|
|
4358
4362
|
if (active && payload && payload.length) {
|
|
4359
|
-
return /* @__PURE__ */
|
|
4363
|
+
return /* @__PURE__ */ jsx31(
|
|
4360
4364
|
GenericTooltip,
|
|
4361
4365
|
{
|
|
4362
4366
|
title: label?.toString(),
|
|
@@ -4372,7 +4376,7 @@ var BarChart = forwardRef21(
|
|
|
4372
4376
|
}
|
|
4373
4377
|
}
|
|
4374
4378
|
),
|
|
4375
|
-
/* @__PURE__ */
|
|
4379
|
+
/* @__PURE__ */ jsx31(
|
|
4376
4380
|
Bar,
|
|
4377
4381
|
{
|
|
4378
4382
|
dataKey: barDataKey || yAxisKey,
|
|
@@ -4380,12 +4384,12 @@ var BarChart = forwardRef21(
|
|
|
4380
4384
|
name: barDataKey || yAxisKey
|
|
4381
4385
|
}
|
|
4382
4386
|
),
|
|
4383
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
4387
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx31(ChartLegend, { items: defaultLegendItems })
|
|
4384
4388
|
]
|
|
4385
4389
|
}
|
|
4386
4390
|
)
|
|
4387
4391
|
}
|
|
4388
|
-
) : /* @__PURE__ */
|
|
4392
|
+
) : /* @__PURE__ */ jsx31("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx31(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
4389
4393
|
]
|
|
4390
4394
|
}
|
|
4391
4395
|
);
|
|
@@ -4394,7 +4398,7 @@ var BarChart = forwardRef21(
|
|
|
4394
4398
|
BarChart.displayName = "BarChart";
|
|
4395
4399
|
|
|
4396
4400
|
// src/components/ui/charts/line-chart.tsx
|
|
4397
|
-
import { forwardRef as
|
|
4401
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
4398
4402
|
import {
|
|
4399
4403
|
LineChart as RechartsLineChart,
|
|
4400
4404
|
Line,
|
|
@@ -4403,8 +4407,8 @@ import {
|
|
|
4403
4407
|
Tooltip as Tooltip3,
|
|
4404
4408
|
ResponsiveContainer as ResponsiveContainer2
|
|
4405
4409
|
} from "recharts";
|
|
4406
|
-
import { jsx as
|
|
4407
|
-
var LineChart =
|
|
4410
|
+
import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4411
|
+
var LineChart = forwardRef23(
|
|
4408
4412
|
({
|
|
4409
4413
|
data,
|
|
4410
4414
|
xAxisKey,
|
|
@@ -4432,19 +4436,19 @@ var LineChart = forwardRef22(
|
|
|
4432
4436
|
)
|
|
4433
4437
|
);
|
|
4434
4438
|
const hasData = data && data.length > 0;
|
|
4435
|
-
return /* @__PURE__ */
|
|
4439
|
+
return /* @__PURE__ */ jsxs18(
|
|
4436
4440
|
"div",
|
|
4437
4441
|
{
|
|
4438
4442
|
ref,
|
|
4439
4443
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
4440
4444
|
children: [
|
|
4441
|
-
/* @__PURE__ */
|
|
4442
|
-
/* @__PURE__ */
|
|
4445
|
+
/* @__PURE__ */ jsx32("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx32(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
4446
|
+
/* @__PURE__ */ jsx32("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx32(
|
|
4443
4447
|
ResponsiveContainer2,
|
|
4444
4448
|
{
|
|
4445
4449
|
width: "100%",
|
|
4446
4450
|
height: CHART_CONSTANTS.STANDARD_HEIGHT,
|
|
4447
|
-
children: /* @__PURE__ */
|
|
4451
|
+
children: /* @__PURE__ */ jsxs18(
|
|
4448
4452
|
RechartsLineChart,
|
|
4449
4453
|
{
|
|
4450
4454
|
data,
|
|
@@ -4455,7 +4459,7 @@ var LineChart = forwardRef22(
|
|
|
4455
4459
|
},
|
|
4456
4460
|
onClick: handleClick,
|
|
4457
4461
|
children: [
|
|
4458
|
-
/* @__PURE__ */
|
|
4462
|
+
/* @__PURE__ */ jsx32(
|
|
4459
4463
|
XAxis2,
|
|
4460
4464
|
{
|
|
4461
4465
|
dataKey: xAxisKey,
|
|
@@ -4467,7 +4471,7 @@ var LineChart = forwardRef22(
|
|
|
4467
4471
|
label: xAxisLabel ? createCustomXAxisLabel(xAxisLabel) : void 0
|
|
4468
4472
|
}
|
|
4469
4473
|
),
|
|
4470
|
-
/* @__PURE__ */
|
|
4474
|
+
/* @__PURE__ */ jsx32(
|
|
4471
4475
|
YAxis2,
|
|
4472
4476
|
{
|
|
4473
4477
|
axisLine: false,
|
|
@@ -4476,7 +4480,7 @@ var LineChart = forwardRef22(
|
|
|
4476
4480
|
label: yAxisLabel ? createCustomYAxisLabel(yAxisLabel, 40) : void 0
|
|
4477
4481
|
}
|
|
4478
4482
|
),
|
|
4479
|
-
/* @__PURE__ */
|
|
4483
|
+
/* @__PURE__ */ jsx32(
|
|
4480
4484
|
Tooltip3,
|
|
4481
4485
|
{
|
|
4482
4486
|
content: ({
|
|
@@ -4485,7 +4489,7 @@ var LineChart = forwardRef22(
|
|
|
4485
4489
|
label
|
|
4486
4490
|
}) => {
|
|
4487
4491
|
if (active && payload && payload.length) {
|
|
4488
|
-
return /* @__PURE__ */
|
|
4492
|
+
return /* @__PURE__ */ jsx32(
|
|
4489
4493
|
GenericTooltip,
|
|
4490
4494
|
{
|
|
4491
4495
|
title: label?.toString(),
|
|
@@ -4501,7 +4505,7 @@ var LineChart = forwardRef22(
|
|
|
4501
4505
|
}
|
|
4502
4506
|
}
|
|
4503
4507
|
),
|
|
4504
|
-
series.map((s, index) => /* @__PURE__ */
|
|
4508
|
+
series.map((s, index) => /* @__PURE__ */ jsx32(
|
|
4505
4509
|
Line,
|
|
4506
4510
|
{
|
|
4507
4511
|
type: "monotone",
|
|
@@ -4513,12 +4517,12 @@ var LineChart = forwardRef22(
|
|
|
4513
4517
|
},
|
|
4514
4518
|
s.dataKey
|
|
4515
4519
|
)),
|
|
4516
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
4520
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx32(ChartLegend, { items: defaultLegendItems })
|
|
4517
4521
|
]
|
|
4518
4522
|
}
|
|
4519
4523
|
)
|
|
4520
4524
|
}
|
|
4521
|
-
) : /* @__PURE__ */
|
|
4525
|
+
) : /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx32(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
4522
4526
|
]
|
|
4523
4527
|
}
|
|
4524
4528
|
);
|
|
@@ -4527,10 +4531,10 @@ var LineChart = forwardRef22(
|
|
|
4527
4531
|
LineChart.displayName = "LineChart";
|
|
4528
4532
|
|
|
4529
4533
|
// src/components/ui/charts/pie-chart.tsx
|
|
4530
|
-
import { forwardRef as
|
|
4534
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
4531
4535
|
import { PieChart as RechartsPieChart, Pie, Cell, Tooltip as Tooltip4 } from "recharts";
|
|
4532
|
-
import { jsx as
|
|
4533
|
-
var PieChart =
|
|
4536
|
+
import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4537
|
+
var PieChart = forwardRef24(
|
|
4534
4538
|
({
|
|
4535
4539
|
data,
|
|
4536
4540
|
title,
|
|
@@ -4557,20 +4561,20 @@ var PieChart = forwardRef23(
|
|
|
4557
4561
|
)
|
|
4558
4562
|
);
|
|
4559
4563
|
const hasData = data && data.length > 0;
|
|
4560
|
-
return /* @__PURE__ */
|
|
4564
|
+
return /* @__PURE__ */ jsxs19(
|
|
4561
4565
|
"div",
|
|
4562
4566
|
{
|
|
4563
4567
|
ref,
|
|
4564
4568
|
className: `bg-light border border-subtle mx-6 ${className}`,
|
|
4565
4569
|
children: [
|
|
4566
|
-
/* @__PURE__ */
|
|
4567
|
-
/* @__PURE__ */
|
|
4570
|
+
/* @__PURE__ */ jsx33("div", { className: "flex items-center justify-between px-3 py-2 border-b border-subtle", children: /* @__PURE__ */ jsx33(Typography, { variant: "label-sm-bold", children: title }) }),
|
|
4571
|
+
/* @__PURE__ */ jsx33("div", { className: "pt-2 px-2", children: hasData ? /* @__PURE__ */ jsx33("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs19(
|
|
4568
4572
|
RechartsPieChart,
|
|
4569
4573
|
{
|
|
4570
4574
|
width: 600,
|
|
4571
4575
|
height: CHART_CONSTANTS.LARGE_HEIGHT,
|
|
4572
4576
|
children: [
|
|
4573
|
-
/* @__PURE__ */
|
|
4577
|
+
/* @__PURE__ */ jsx33(
|
|
4574
4578
|
Pie,
|
|
4575
4579
|
{
|
|
4576
4580
|
data,
|
|
@@ -4582,7 +4586,7 @@ var PieChart = forwardRef23(
|
|
|
4582
4586
|
label: showLabels,
|
|
4583
4587
|
labelLine: false,
|
|
4584
4588
|
onClick: handleClick,
|
|
4585
|
-
children: data.map((entry, index) => /* @__PURE__ */
|
|
4589
|
+
children: data.map((entry, index) => /* @__PURE__ */ jsx33(
|
|
4586
4590
|
Cell,
|
|
4587
4591
|
{
|
|
4588
4592
|
fill: entry.color || getSeriesColor(index)
|
|
@@ -4591,7 +4595,7 @@ var PieChart = forwardRef23(
|
|
|
4591
4595
|
))
|
|
4592
4596
|
}
|
|
4593
4597
|
),
|
|
4594
|
-
/* @__PURE__ */
|
|
4598
|
+
/* @__PURE__ */ jsx33(
|
|
4595
4599
|
Tooltip4,
|
|
4596
4600
|
{
|
|
4597
4601
|
content: ({
|
|
@@ -4600,7 +4604,7 @@ var PieChart = forwardRef23(
|
|
|
4600
4604
|
}) => {
|
|
4601
4605
|
if (active && payload && payload.length && payload[0]) {
|
|
4602
4606
|
const data2 = payload[0].payload;
|
|
4603
|
-
return /* @__PURE__ */
|
|
4607
|
+
return /* @__PURE__ */ jsx33(
|
|
4604
4608
|
GenericTooltip,
|
|
4605
4609
|
{
|
|
4606
4610
|
title: data2.name,
|
|
@@ -4618,10 +4622,10 @@ var PieChart = forwardRef23(
|
|
|
4618
4622
|
}
|
|
4619
4623
|
}
|
|
4620
4624
|
),
|
|
4621
|
-
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */
|
|
4625
|
+
showLegend && defaultLegendItems.length > 0 && /* @__PURE__ */ jsx33(ChartLegend, { items: defaultLegendItems, y: 400 })
|
|
4622
4626
|
]
|
|
4623
4627
|
}
|
|
4624
|
-
) }) : /* @__PURE__ */
|
|
4628
|
+
) }) : /* @__PURE__ */ jsx33("div", { className: "flex items-center justify-center h-[500px]", children: /* @__PURE__ */ jsx33(Typography, { variant: "body-md", className: "text-secondary", children: "No data is available" }) }) })
|
|
4625
4629
|
]
|
|
4626
4630
|
}
|
|
4627
4631
|
);
|
|
@@ -4634,7 +4638,7 @@ import { useCallback as useCallback9 } from "react";
|
|
|
4634
4638
|
import {
|
|
4635
4639
|
flexRender
|
|
4636
4640
|
} from "@tanstack/react-table";
|
|
4637
|
-
import { Fragment as Fragment3, jsx as
|
|
4641
|
+
import { Fragment as Fragment3, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4638
4642
|
function Table({
|
|
4639
4643
|
table,
|
|
4640
4644
|
className,
|
|
@@ -4664,15 +4668,15 @@ function Table({
|
|
|
4664
4668
|
},
|
|
4665
4669
|
[table]
|
|
4666
4670
|
);
|
|
4667
|
-
return /* @__PURE__ */
|
|
4668
|
-
/* @__PURE__ */
|
|
4669
|
-
/* @__PURE__ */
|
|
4671
|
+
return /* @__PURE__ */ jsxs20("div", { children: [
|
|
4672
|
+
/* @__PURE__ */ jsx34("div", { className: cn("overflow-x-auto", className), children: /* @__PURE__ */ jsxs20("table", { className: "min-w-full divide-y divide-border", children: [
|
|
4673
|
+
/* @__PURE__ */ jsx34("thead", { className: "bg-dark text-light", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx34("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx34("th", { className: "px-6 py-3 text-left", children: /* @__PURE__ */ jsxs20(
|
|
4670
4674
|
"div",
|
|
4671
4675
|
{
|
|
4672
4676
|
className: `flex items-center space-x-1 ${header.column.getCanSort() ? "cursor-pointer select-none" : ""}`,
|
|
4673
4677
|
onClick: header.column.getToggleSortingHandler(),
|
|
4674
4678
|
children: [
|
|
4675
|
-
/* @__PURE__ */
|
|
4679
|
+
/* @__PURE__ */ jsx34(
|
|
4676
4680
|
Typography,
|
|
4677
4681
|
{
|
|
4678
4682
|
variant: "label-xs",
|
|
@@ -4683,19 +4687,19 @@ function Table({
|
|
|
4683
4687
|
)
|
|
4684
4688
|
}
|
|
4685
4689
|
),
|
|
4686
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
4687
|
-
header.column.getIsSorted() === "asc" && /* @__PURE__ */
|
|
4688
|
-
header.column.getIsSorted() === "desc" && /* @__PURE__ */
|
|
4690
|
+
header.column.getCanSort() && /* @__PURE__ */ jsxs20("span", { className: "ml-1", children: [
|
|
4691
|
+
header.column.getIsSorted() === "asc" && /* @__PURE__ */ jsx34(CaretUpIcon, { className: "text-light" }),
|
|
4692
|
+
header.column.getIsSorted() === "desc" && /* @__PURE__ */ jsx34(CaretDownIcon, { className: "text-light" })
|
|
4689
4693
|
] })
|
|
4690
4694
|
]
|
|
4691
4695
|
}
|
|
4692
4696
|
) }, header.id)) }, headerGroup.id)) }),
|
|
4693
|
-
/* @__PURE__ */
|
|
4697
|
+
/* @__PURE__ */ jsx34("tbody", { className: "bg-light divide-y divide-border", children: table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx34("tr", { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx34("td", { className: "px-6 py-4 whitespace-nowrap", children: /* @__PURE__ */ jsx34(Typography, { variant: "body-sm", children: flexRender(
|
|
4694
4698
|
cell.column.columnDef.cell,
|
|
4695
4699
|
cell.getContext()
|
|
4696
4700
|
) }) }, cell.id)) }, row.id)) })
|
|
4697
4701
|
] }) }),
|
|
4698
|
-
showPagination && /* @__PURE__ */
|
|
4702
|
+
showPagination && /* @__PURE__ */ jsxs20(
|
|
4699
4703
|
"div",
|
|
4700
4704
|
{
|
|
4701
4705
|
className: cn(
|
|
@@ -4703,9 +4707,9 @@ function Table({
|
|
|
4703
4707
|
paginationClassName
|
|
4704
4708
|
),
|
|
4705
4709
|
children: [
|
|
4706
|
-
/* @__PURE__ */
|
|
4707
|
-
/* @__PURE__ */
|
|
4708
|
-
/* @__PURE__ */
|
|
4710
|
+
/* @__PURE__ */ jsx34("div", { className: "flex items-center", children: /* @__PURE__ */ jsx34(Typography, { variant: "body-sm", className: "text-secondary", children: showingText }) }),
|
|
4711
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center space-x-1", children: [
|
|
4712
|
+
/* @__PURE__ */ jsx34(
|
|
4709
4713
|
Button,
|
|
4710
4714
|
{
|
|
4711
4715
|
variant: "ghost",
|
|
@@ -4713,7 +4717,7 @@ function Table({
|
|
|
4713
4717
|
onClick: handlePreviousPage,
|
|
4714
4718
|
disabled: !table.getCanPreviousPage(),
|
|
4715
4719
|
className: "p-2",
|
|
4716
|
-
children: /* @__PURE__ */
|
|
4720
|
+
children: /* @__PURE__ */ jsx34(ArrowLeftIcon, {})
|
|
4717
4721
|
}
|
|
4718
4722
|
),
|
|
4719
4723
|
Array.from(
|
|
@@ -4730,7 +4734,7 @@ function Table({
|
|
|
4730
4734
|
pageNumber = currentPage - 2 + i;
|
|
4731
4735
|
}
|
|
4732
4736
|
const isActive = pageNumber === currentPage;
|
|
4733
|
-
return /* @__PURE__ */
|
|
4737
|
+
return /* @__PURE__ */ jsx34(
|
|
4734
4738
|
Button,
|
|
4735
4739
|
{
|
|
4736
4740
|
variant: isActive ? "default" : "ghost",
|
|
@@ -4743,11 +4747,11 @@ function Table({
|
|
|
4743
4747
|
);
|
|
4744
4748
|
}
|
|
4745
4749
|
),
|
|
4746
|
-
table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */
|
|
4747
|
-
/* @__PURE__ */
|
|
4748
|
-
/* @__PURE__ */
|
|
4750
|
+
table.getPageCount() > 5 && currentPage < totalPages - 3 && /* @__PURE__ */ jsxs20(Fragment3, { children: [
|
|
4751
|
+
/* @__PURE__ */ jsx34("span", { className: "px-1 text-secondary", children: "..." }),
|
|
4752
|
+
/* @__PURE__ */ jsx34(Typography, { variant: "body-sm", className: "text-secondary", children: totalPages })
|
|
4749
4753
|
] }),
|
|
4750
|
-
/* @__PURE__ */
|
|
4754
|
+
/* @__PURE__ */ jsx34(
|
|
4751
4755
|
Button,
|
|
4752
4756
|
{
|
|
4753
4757
|
variant: "ghost",
|
|
@@ -4755,12 +4759,12 @@ function Table({
|
|
|
4755
4759
|
onClick: handleNextPage,
|
|
4756
4760
|
disabled: !table.getCanNextPage(),
|
|
4757
4761
|
className: "p-2",
|
|
4758
|
-
children: /* @__PURE__ */
|
|
4762
|
+
children: /* @__PURE__ */ jsx34(ArrowRightIcon, {})
|
|
4759
4763
|
}
|
|
4760
4764
|
)
|
|
4761
4765
|
] }),
|
|
4762
|
-
/* @__PURE__ */
|
|
4763
|
-
/* @__PURE__ */
|
|
4766
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-3 w-48", children: [
|
|
4767
|
+
/* @__PURE__ */ jsx34(
|
|
4764
4768
|
Typography,
|
|
4765
4769
|
{
|
|
4766
4770
|
variant: "body-sm",
|
|
@@ -4768,14 +4772,14 @@ function Table({
|
|
|
4768
4772
|
children: "Rows per page:"
|
|
4769
4773
|
}
|
|
4770
4774
|
),
|
|
4771
|
-
/* @__PURE__ */
|
|
4775
|
+
/* @__PURE__ */ jsxs20(
|
|
4772
4776
|
Select,
|
|
4773
4777
|
{
|
|
4774
4778
|
value: table.getState().pagination.pageSize.toString(),
|
|
4775
4779
|
onValueChange: handlePageSizeChange,
|
|
4776
4780
|
children: [
|
|
4777
|
-
/* @__PURE__ */
|
|
4778
|
-
/* @__PURE__ */
|
|
4781
|
+
/* @__PURE__ */ jsx34(SelectTrigger, { className: "min-w-0 h-8", children: /* @__PURE__ */ jsx34(SelectValue, {}) }),
|
|
4782
|
+
/* @__PURE__ */ jsx34(SelectContent, { children: [10, 20, 50, 100].map((size) => /* @__PURE__ */ jsx34(SelectItem, { value: size.toString(), children: size }, size)) })
|
|
4779
4783
|
]
|
|
4780
4784
|
}
|
|
4781
4785
|
)
|