@bubo-squared/ui-framework 0.2.14 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1295 -724
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +113 -24
- package/dist/index.d.ts +113 -24
- package/dist/index.js +1282 -723
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -36,10 +36,10 @@ var buttonVariants = cva(
|
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
38
|
size: {
|
|
39
|
-
sm: ["px-
|
|
40
|
-
md: ["px-2", "py-1", "gap-
|
|
41
|
-
lg: ["px-2.5", "py-1", "gap-
|
|
42
|
-
xl: ["px-3", "py-0.5", "gap-
|
|
39
|
+
sm: ["px-2", "py-1", "gap-2", "h-9"],
|
|
40
|
+
md: ["px-2", "py-1", "gap-2", "h-10"],
|
|
41
|
+
lg: ["px-2.5", "py-1", "gap-2.5", "h-11"],
|
|
42
|
+
xl: ["px-3", "py-0.5", "gap-3", "h-12"]
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
defaultVariants: {
|
|
@@ -52,19 +52,19 @@ var buttonIconVariants = cva("relative", {
|
|
|
52
52
|
variants: {
|
|
53
53
|
size: {
|
|
54
54
|
sm: ["size-5", "*:size-5"],
|
|
55
|
-
md: ["size-
|
|
55
|
+
md: ["size-5", "*:size-5"],
|
|
56
56
|
lg: ["size-6", "*:size-6"],
|
|
57
|
-
xl: ["size-
|
|
57
|
+
xl: ["size-7", "*:size-7"]
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
var buttonTextVariants = cva("flex text-center justify-center font-normal", {
|
|
62
62
|
variants: {
|
|
63
63
|
size: {
|
|
64
|
-
sm: ["
|
|
65
|
-
md: ["
|
|
66
|
-
lg: ["
|
|
67
|
-
xl: ["
|
|
64
|
+
sm: ["paragraph-sm"],
|
|
65
|
+
md: ["paragraph-md"],
|
|
66
|
+
lg: ["paragraph-lg"],
|
|
67
|
+
xl: ["subtitle"]
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -138,7 +138,7 @@ import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
|
138
138
|
import { cva as cva3 } from "class-variance-authority";
|
|
139
139
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
140
140
|
var iconButtonVariants = cva3(
|
|
141
|
-
"inline-flex items-center justify-center whitespace-nowrap
|
|
141
|
+
"inline-flex items-center justify-center whitespace-nowrap transition-colors disabled:pointer-events-none overflow-hidden p-1.5 cursor-pointer",
|
|
142
142
|
{
|
|
143
143
|
variants: {
|
|
144
144
|
variant: {
|
|
@@ -180,13 +180,14 @@ var IconButton = React2.forwardRef(
|
|
|
180
180
|
size,
|
|
181
181
|
asChild = false,
|
|
182
182
|
icon,
|
|
183
|
+
round = false,
|
|
183
184
|
...rest
|
|
184
185
|
} = props;
|
|
185
186
|
const Comp = asChild ? Slot2 : "button";
|
|
186
187
|
return /* @__PURE__ */ jsx4(
|
|
187
188
|
Comp,
|
|
188
189
|
{
|
|
189
|
-
className: cn(iconButtonVariants({ variant, size }), className),
|
|
190
|
+
className: cn(iconButtonVariants({ variant, size }), round ? "rounded-full" : "rounded-4", className),
|
|
190
191
|
ref,
|
|
191
192
|
...rest,
|
|
192
193
|
children: /* @__PURE__ */ jsx4("div", { className: "buttonIcon flex items-center justify-center", children: icon })
|
|
@@ -376,12 +377,77 @@ var MessageButton = (props) => {
|
|
|
376
377
|
};
|
|
377
378
|
MessageButton.displayName = "MessageButton";
|
|
378
379
|
|
|
379
|
-
// src/components/Content/
|
|
380
|
+
// src/components/Content/Accordion.tsx
|
|
380
381
|
import * as React6 from "react";
|
|
382
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
383
|
+
import { ChevronDownIcon } from "@bubo-squared/icons";
|
|
384
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
385
|
+
var Accordion = React6.forwardRef(
|
|
386
|
+
(props, ref) => {
|
|
387
|
+
const {
|
|
388
|
+
title,
|
|
389
|
+
expandIcon,
|
|
390
|
+
children,
|
|
391
|
+
className,
|
|
392
|
+
defaultOpen = false,
|
|
393
|
+
bordered = false,
|
|
394
|
+
...rootProps
|
|
395
|
+
} = props;
|
|
396
|
+
const {
|
|
397
|
+
value,
|
|
398
|
+
defaultValue,
|
|
399
|
+
onValueChange,
|
|
400
|
+
...restRootProps
|
|
401
|
+
} = rootProps;
|
|
402
|
+
const resolvedDefaultValue = value === void 0 && defaultValue === void 0 && defaultOpen ? "item" : defaultValue;
|
|
403
|
+
return /* @__PURE__ */ jsx8(
|
|
404
|
+
AccordionPrimitive.Root,
|
|
405
|
+
{
|
|
406
|
+
ref,
|
|
407
|
+
type: "single",
|
|
408
|
+
collapsible: true,
|
|
409
|
+
className: cn("w-full", className),
|
|
410
|
+
value,
|
|
411
|
+
defaultValue: resolvedDefaultValue,
|
|
412
|
+
onValueChange,
|
|
413
|
+
...restRootProps,
|
|
414
|
+
children: /* @__PURE__ */ jsxs4(
|
|
415
|
+
AccordionPrimitive.Item,
|
|
416
|
+
{
|
|
417
|
+
value: "item",
|
|
418
|
+
className: cn(bordered ? "border rounded-4" : "border-b", "border-(--border-secondary) px-4"),
|
|
419
|
+
children: [
|
|
420
|
+
/* @__PURE__ */ jsx8(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs4(
|
|
421
|
+
AccordionPrimitive.Trigger,
|
|
422
|
+
{
|
|
423
|
+
className: cn(
|
|
424
|
+
"flex w-full items-center justify-between gap-2 py-3 text-left",
|
|
425
|
+
"paragraph-md text-primary",
|
|
426
|
+
"[&[data-state=open]_.accordion-icon]:rotate-180",
|
|
427
|
+
"disabled:cursor-not-allowed disabled:text-primary-disabled cursor-pointer"
|
|
428
|
+
),
|
|
429
|
+
children: [
|
|
430
|
+
/* @__PURE__ */ jsx8("span", { className: "flex-1", children: title }),
|
|
431
|
+
/* @__PURE__ */ jsx8("span", { className: "accordion-icon inline-flex shrink-0 transition-transform duration-200 [&>svg]:size-5", children: expandIcon ?? /* @__PURE__ */ jsx8(ChevronDownIcon, {}) })
|
|
432
|
+
]
|
|
433
|
+
}
|
|
434
|
+
) }),
|
|
435
|
+
/* @__PURE__ */ jsx8(AccordionPrimitive.Content, { className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden", children: /* @__PURE__ */ jsx8("div", { className: "pb-3", children }) })
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
}
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
);
|
|
443
|
+
Accordion.displayName = "Accordion";
|
|
444
|
+
|
|
445
|
+
// src/components/Content/Avatar.tsx
|
|
446
|
+
import * as React7 from "react";
|
|
381
447
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
382
448
|
import { cva as cva6 } from "class-variance-authority";
|
|
383
449
|
import { UserIcon } from "@bubo-squared/icons";
|
|
384
|
-
import { jsx as
|
|
450
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
385
451
|
var avatarVariants = cva6(
|
|
386
452
|
"relative inline-flex items-center justify-center rounded-full border-(--border-secondary) border-1 bg-(--background-primary) text-primary overflow-hidden hover:border-(--focus-secondary) focus-visible:border-(--focus-primary) focus-visible:outline-none",
|
|
387
453
|
{
|
|
@@ -439,7 +505,7 @@ var avatarIconVariants = cva6(
|
|
|
439
505
|
}
|
|
440
506
|
}
|
|
441
507
|
);
|
|
442
|
-
var Avatar =
|
|
508
|
+
var Avatar = React7.forwardRef(
|
|
443
509
|
(props, ref) => {
|
|
444
510
|
const {
|
|
445
511
|
asChild = false,
|
|
@@ -453,14 +519,14 @@ var Avatar = React6.forwardRef(
|
|
|
453
519
|
} = props;
|
|
454
520
|
const Comp = asChild ? Slot4 : "button";
|
|
455
521
|
const hasImage = variant === "image" && typeof src === "string" && src.length > 0;
|
|
456
|
-
return /* @__PURE__ */
|
|
522
|
+
return /* @__PURE__ */ jsxs5(
|
|
457
523
|
Comp,
|
|
458
524
|
{
|
|
459
525
|
ref,
|
|
460
526
|
className: cn(avatarVariants({ size }), className),
|
|
461
527
|
...rest,
|
|
462
528
|
children: [
|
|
463
|
-
hasImage ? /* @__PURE__ */
|
|
529
|
+
hasImage ? /* @__PURE__ */ jsx9(
|
|
464
530
|
"img",
|
|
465
531
|
{
|
|
466
532
|
src,
|
|
@@ -468,8 +534,8 @@ var Avatar = React6.forwardRef(
|
|
|
468
534
|
className: "w-full h-full object-cover"
|
|
469
535
|
}
|
|
470
536
|
) : null,
|
|
471
|
-
!hasImage && variant === "initial" && /* @__PURE__ */
|
|
472
|
-
!hasImage && variant === "icon" && /* @__PURE__ */
|
|
537
|
+
!hasImage && variant === "initial" && /* @__PURE__ */ jsx9("span", { className: cn(avatarInitialsVariants({ size }), "relative bottom-px"), children: initials }),
|
|
538
|
+
!hasImage && variant === "icon" && /* @__PURE__ */ jsx9("span", { className: cn(avatarIconVariants({ size })), children: /* @__PURE__ */ jsx9(UserIcon, {}) })
|
|
473
539
|
]
|
|
474
540
|
}
|
|
475
541
|
);
|
|
@@ -479,7 +545,7 @@ Avatar.displayName = "Avatar";
|
|
|
479
545
|
|
|
480
546
|
// src/components/Content/Typography.tsx
|
|
481
547
|
import "react";
|
|
482
|
-
import { jsx as
|
|
548
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
483
549
|
var mbCapableBaseClasses = /* @__PURE__ */ new Set([
|
|
484
550
|
"h1-intro",
|
|
485
551
|
"h2-intro",
|
|
@@ -515,7 +581,7 @@ var Typography = (props) => {
|
|
|
515
581
|
const Comp = as ?? "span";
|
|
516
582
|
const mbClassName = useMargin ? getMbClassName(variant) : null;
|
|
517
583
|
const weightClassName = weight === "regular" ? null : `${variant}-${weight}`;
|
|
518
|
-
return /* @__PURE__ */
|
|
584
|
+
return /* @__PURE__ */ jsx10(
|
|
519
585
|
Comp,
|
|
520
586
|
{
|
|
521
587
|
className: cn("text-primary", variant, weightClassName, mbClassName, className),
|
|
@@ -527,10 +593,10 @@ var Typography = (props) => {
|
|
|
527
593
|
Typography.displayName = "Typography";
|
|
528
594
|
|
|
529
595
|
// src/components/Content/Badge.tsx
|
|
530
|
-
import * as
|
|
596
|
+
import * as React9 from "react";
|
|
531
597
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
532
598
|
import { cva as cva7 } from "class-variance-authority";
|
|
533
|
-
import { Fragment, jsx as
|
|
599
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
534
600
|
var badgeVariants = cva7(
|
|
535
601
|
"inline-flex items-center justify-center rounded-4 leading-none whitespace-nowrap gap-1 px-1 py-0",
|
|
536
602
|
{
|
|
@@ -560,7 +626,7 @@ var badgeVariants = cva7(
|
|
|
560
626
|
}
|
|
561
627
|
}
|
|
562
628
|
);
|
|
563
|
-
var Badge =
|
|
629
|
+
var Badge = React9.forwardRef(
|
|
564
630
|
(props, ref) => {
|
|
565
631
|
const {
|
|
566
632
|
asChild = false,
|
|
@@ -572,17 +638,17 @@ var Badge = React8.forwardRef(
|
|
|
572
638
|
...rest
|
|
573
639
|
} = props;
|
|
574
640
|
const Comp = asChild ? Slot5 : "div";
|
|
575
|
-
return /* @__PURE__ */
|
|
641
|
+
return /* @__PURE__ */ jsx11(
|
|
576
642
|
Comp,
|
|
577
643
|
{
|
|
578
644
|
ref,
|
|
579
645
|
className: cn(badgeVariants({ size, variant }), className),
|
|
580
646
|
...rest,
|
|
581
|
-
children: value ? /* @__PURE__ */
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
] }) : /* @__PURE__ */
|
|
647
|
+
children: value ? /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
648
|
+
/* @__PURE__ */ jsx11("span", { className: "font-normal", children: label }),
|
|
649
|
+
/* @__PURE__ */ jsx11("span", { className: "font-normal", children: ":" }),
|
|
650
|
+
/* @__PURE__ */ jsx11("span", { className: "font-medium", children: value })
|
|
651
|
+
] }) : /* @__PURE__ */ jsx11("span", { className: "font-normal", children: label })
|
|
586
652
|
}
|
|
587
653
|
);
|
|
588
654
|
}
|
|
@@ -590,9 +656,9 @@ var Badge = React8.forwardRef(
|
|
|
590
656
|
Badge.displayName = "Badge";
|
|
591
657
|
|
|
592
658
|
// src/components/Content/BadgeDigit.tsx
|
|
593
|
-
import * as
|
|
659
|
+
import * as React10 from "react";
|
|
594
660
|
import { cva as cva8 } from "class-variance-authority";
|
|
595
|
-
import { jsx as
|
|
661
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
596
662
|
var badgeDigitVariants = cva8(
|
|
597
663
|
"inline-flex items-center justify-center leading-none whitespace-nowrap text-(--color-b-white)",
|
|
598
664
|
{
|
|
@@ -617,7 +683,7 @@ var badgeDigitVariants = cva8(
|
|
|
617
683
|
}
|
|
618
684
|
}
|
|
619
685
|
);
|
|
620
|
-
var BadgeDigit =
|
|
686
|
+
var BadgeDigit = React10.forwardRef(
|
|
621
687
|
(props, ref) => {
|
|
622
688
|
const {
|
|
623
689
|
value,
|
|
@@ -626,7 +692,7 @@ var BadgeDigit = React9.forwardRef(
|
|
|
626
692
|
className,
|
|
627
693
|
...rest
|
|
628
694
|
} = props;
|
|
629
|
-
return /* @__PURE__ */
|
|
695
|
+
return /* @__PURE__ */ jsx12(
|
|
630
696
|
"div",
|
|
631
697
|
{
|
|
632
698
|
ref,
|
|
@@ -642,7 +708,7 @@ BadgeDigit.displayName = "BadgeDigit";
|
|
|
642
708
|
// src/components/Content/BadgeDot.tsx
|
|
643
709
|
import "react";
|
|
644
710
|
import { cva as cva9 } from "class-variance-authority";
|
|
645
|
-
import { jsx as
|
|
711
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
646
712
|
var badgeDotVariants = cva9("rounded-12 size-3", {
|
|
647
713
|
variants: {
|
|
648
714
|
status: {
|
|
@@ -658,14 +724,14 @@ var badgeDotVariants = cva9("rounded-12 size-3", {
|
|
|
658
724
|
}
|
|
659
725
|
});
|
|
660
726
|
var BadgeDot = ({ status, className }) => {
|
|
661
|
-
return /* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ jsx13("div", { className: cn(badgeDotVariants({ status }), className) });
|
|
662
728
|
};
|
|
663
729
|
BadgeDot.displayName = "BadgeDot";
|
|
664
730
|
|
|
665
731
|
// src/components/Content/BadgeStatus.tsx
|
|
666
|
-
import * as
|
|
667
|
-
import { jsx as
|
|
668
|
-
var BadgeStatus =
|
|
732
|
+
import * as React12 from "react";
|
|
733
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
734
|
+
var BadgeStatus = React12.forwardRef(
|
|
669
735
|
(props, ref) => {
|
|
670
736
|
const {
|
|
671
737
|
label,
|
|
@@ -676,14 +742,14 @@ var BadgeStatus = React11.forwardRef(
|
|
|
676
742
|
} = props;
|
|
677
743
|
const textClasses = active ? "caption-medium text-primary" : "caption-medium text-primary-disabled";
|
|
678
744
|
const dotClasses = active ? "bg-(--background-informal)" : "bg-(--background-primary)";
|
|
679
|
-
return /* @__PURE__ */
|
|
745
|
+
return /* @__PURE__ */ jsxs7(
|
|
680
746
|
"div",
|
|
681
747
|
{
|
|
682
748
|
ref,
|
|
683
749
|
className: cn("inline-flex items-center gap-2", className),
|
|
684
750
|
...rest,
|
|
685
751
|
children: [
|
|
686
|
-
/* @__PURE__ */
|
|
752
|
+
/* @__PURE__ */ jsx14(
|
|
687
753
|
"span",
|
|
688
754
|
{
|
|
689
755
|
className: cn(
|
|
@@ -693,7 +759,7 @@ var BadgeStatus = React11.forwardRef(
|
|
|
693
759
|
)
|
|
694
760
|
}
|
|
695
761
|
),
|
|
696
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ jsx14("span", { className: textClasses, children: label })
|
|
697
763
|
]
|
|
698
764
|
}
|
|
699
765
|
);
|
|
@@ -704,7 +770,7 @@ BadgeStatus.displayName = "BadgeStatus";
|
|
|
704
770
|
// src/components/Content/Divider.tsx
|
|
705
771
|
import "react";
|
|
706
772
|
import { TargetIcon } from "@bubo-squared/icons";
|
|
707
|
-
import { jsx as
|
|
773
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
708
774
|
var gapBySize = {
|
|
709
775
|
sm: "gap-2",
|
|
710
776
|
md: "gap-3",
|
|
@@ -739,14 +805,14 @@ var Divider = (props) => {
|
|
|
739
805
|
className: _className,
|
|
740
806
|
...divProps
|
|
741
807
|
} = props;
|
|
742
|
-
return /* @__PURE__ */
|
|
808
|
+
return /* @__PURE__ */ jsx15(
|
|
743
809
|
"div",
|
|
744
810
|
{
|
|
745
811
|
className: wrapperClass,
|
|
746
812
|
role: "separator",
|
|
747
813
|
"aria-orientation": ariaOrientation,
|
|
748
814
|
...divProps,
|
|
749
|
-
children: /* @__PURE__ */
|
|
815
|
+
children: /* @__PURE__ */ jsx15("div", { className: lineClass })
|
|
750
816
|
}
|
|
751
817
|
);
|
|
752
818
|
}
|
|
@@ -760,7 +826,7 @@ var Divider = (props) => {
|
|
|
760
826
|
...divProps
|
|
761
827
|
} = props;
|
|
762
828
|
const textLabel = label ? label : "OR";
|
|
763
|
-
return /* @__PURE__ */
|
|
829
|
+
return /* @__PURE__ */ jsxs8(
|
|
764
830
|
"div",
|
|
765
831
|
{
|
|
766
832
|
className: wrapperClass,
|
|
@@ -768,8 +834,8 @@ var Divider = (props) => {
|
|
|
768
834
|
"aria-orientation": ariaOrientation,
|
|
769
835
|
...divProps,
|
|
770
836
|
children: [
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ jsx15("div", { className: lineClass }),
|
|
838
|
+
/* @__PURE__ */ jsx15(
|
|
773
839
|
"span",
|
|
774
840
|
{
|
|
775
841
|
className: cn(
|
|
@@ -779,7 +845,7 @@ var Divider = (props) => {
|
|
|
779
845
|
children: textLabel
|
|
780
846
|
}
|
|
781
847
|
),
|
|
782
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ jsx15("div", { className: lineClass })
|
|
783
849
|
]
|
|
784
850
|
}
|
|
785
851
|
);
|
|
@@ -796,7 +862,7 @@ var Divider = (props) => {
|
|
|
796
862
|
className: _className,
|
|
797
863
|
...divProps
|
|
798
864
|
} = props;
|
|
799
|
-
return /* @__PURE__ */
|
|
865
|
+
return /* @__PURE__ */ jsxs8(
|
|
800
866
|
"div",
|
|
801
867
|
{
|
|
802
868
|
className: wrapperClass,
|
|
@@ -804,18 +870,18 @@ var Divider = (props) => {
|
|
|
804
870
|
"aria-orientation": ariaOrientation,
|
|
805
871
|
...divProps,
|
|
806
872
|
children: [
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ jsx15("div", { className: lineClass }),
|
|
874
|
+
/* @__PURE__ */ jsx15(
|
|
809
875
|
IconButton,
|
|
810
876
|
{
|
|
811
877
|
variant: iconButtonVariant ?? "secondary",
|
|
812
878
|
size: resolvedSize,
|
|
813
879
|
"aria-label": ariaLabel ?? "More options",
|
|
814
|
-
icon: icon ?? /* @__PURE__ */
|
|
880
|
+
icon: icon ?? /* @__PURE__ */ jsx15(TargetIcon, {}),
|
|
815
881
|
onClick: onIconClick
|
|
816
882
|
}
|
|
817
883
|
),
|
|
818
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ jsx15("div", { className: lineClass })
|
|
819
885
|
]
|
|
820
886
|
}
|
|
821
887
|
);
|
|
@@ -829,7 +895,7 @@ var Divider = (props) => {
|
|
|
829
895
|
className: _className,
|
|
830
896
|
...divProps
|
|
831
897
|
} = props;
|
|
832
|
-
return /* @__PURE__ */
|
|
898
|
+
return /* @__PURE__ */ jsxs8(
|
|
833
899
|
"div",
|
|
834
900
|
{
|
|
835
901
|
className: wrapperClass,
|
|
@@ -837,8 +903,8 @@ var Divider = (props) => {
|
|
|
837
903
|
"aria-orientation": ariaOrientation,
|
|
838
904
|
...divProps,
|
|
839
905
|
children: [
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ jsx15("div", { className: lineClass }),
|
|
907
|
+
/* @__PURE__ */ jsx15(
|
|
842
908
|
IconButtonGroup,
|
|
843
909
|
{
|
|
844
910
|
className: resolvedOrientation === "vertical" ? "flex-col" : "flex-row",
|
|
@@ -846,7 +912,7 @@ var Divider = (props) => {
|
|
|
846
912
|
size: resolvedSize
|
|
847
913
|
}
|
|
848
914
|
),
|
|
849
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ jsx15("div", { className: lineClass })
|
|
850
916
|
]
|
|
851
917
|
}
|
|
852
918
|
);
|
|
@@ -862,7 +928,7 @@ var Divider = (props) => {
|
|
|
862
928
|
className: _className,
|
|
863
929
|
...divProps
|
|
864
930
|
} = props;
|
|
865
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ jsxs8(
|
|
866
932
|
"div",
|
|
867
933
|
{
|
|
868
934
|
className: wrapperClass,
|
|
@@ -870,8 +936,8 @@ var Divider = (props) => {
|
|
|
870
936
|
"aria-orientation": ariaOrientation,
|
|
871
937
|
...divProps,
|
|
872
938
|
children: [
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
/* @__PURE__ */
|
|
939
|
+
/* @__PURE__ */ jsx15("div", { className: lineClass }),
|
|
940
|
+
/* @__PURE__ */ jsx15(
|
|
875
941
|
Button,
|
|
876
942
|
{
|
|
877
943
|
variant: buttonVariant ?? "secondary",
|
|
@@ -880,7 +946,7 @@ var Divider = (props) => {
|
|
|
880
946
|
children: buttonLabel
|
|
881
947
|
}
|
|
882
948
|
),
|
|
883
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ jsx15("div", { className: lineClass })
|
|
884
950
|
]
|
|
885
951
|
}
|
|
886
952
|
);
|
|
@@ -890,11 +956,11 @@ var Divider = (props) => {
|
|
|
890
956
|
Divider.displayName = "Divider";
|
|
891
957
|
|
|
892
958
|
// src/components/Content/Progress.tsx
|
|
893
|
-
import * as
|
|
959
|
+
import * as React15 from "react";
|
|
894
960
|
|
|
895
961
|
// src/components/Inputs/Field.tsx
|
|
896
|
-
import * as
|
|
897
|
-
import { jsx as
|
|
962
|
+
import * as React14 from "react";
|
|
963
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
898
964
|
var fieldBase = "flex flex-col gap-2 items-start";
|
|
899
965
|
var Field = (props) => {
|
|
900
966
|
const {
|
|
@@ -907,18 +973,18 @@ var Field = (props) => {
|
|
|
907
973
|
className,
|
|
908
974
|
children
|
|
909
975
|
} = props;
|
|
910
|
-
const fieldId =
|
|
976
|
+
const fieldId = React14.useId();
|
|
911
977
|
const labelId = label ? `${fieldId}-label` : void 0;
|
|
912
978
|
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
913
979
|
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
914
980
|
const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
|
|
915
|
-
return /* @__PURE__ */
|
|
916
|
-
label && /* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
981
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn(fieldBase, className), children: [
|
|
982
|
+
label && /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between", children: [
|
|
983
|
+
/* @__PURE__ */ jsx16("label", { id: labelId, className: cn("paragraph-sm", labelColorClass), children: label }),
|
|
918
984
|
labelRight
|
|
919
985
|
] }),
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
!hideHint && /* @__PURE__ */
|
|
986
|
+
/* @__PURE__ */ jsx16("div", { className: "relative w-full", children }),
|
|
987
|
+
!hideHint && /* @__PURE__ */ jsx16(
|
|
922
988
|
"p",
|
|
923
989
|
{
|
|
924
990
|
id: hint ? hintId : void 0,
|
|
@@ -931,13 +997,13 @@ var Field = (props) => {
|
|
|
931
997
|
Field.displayName = "Field";
|
|
932
998
|
|
|
933
999
|
// src/components/Content/Progress.tsx
|
|
934
|
-
import { jsx as
|
|
1000
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
935
1001
|
var sizeToBarClasses = {
|
|
936
1002
|
lg: "h-4 rounded-16",
|
|
937
1003
|
md: "h-2 rounded-8",
|
|
938
1004
|
sm: "h-1 rounded-4"
|
|
939
1005
|
};
|
|
940
|
-
var Progress =
|
|
1006
|
+
var Progress = React15.forwardRef(
|
|
941
1007
|
(props, ref) => {
|
|
942
1008
|
const {
|
|
943
1009
|
value,
|
|
@@ -954,17 +1020,17 @@ var Progress = React14.forwardRef(
|
|
|
954
1020
|
const clamped = Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;
|
|
955
1021
|
const percentageLabel = `${Math.round(clamped)}%`;
|
|
956
1022
|
const barHeightClasses = sizeToBarClasses[size];
|
|
957
|
-
return /* @__PURE__ */
|
|
1023
|
+
return /* @__PURE__ */ jsx17(
|
|
958
1024
|
Field,
|
|
959
1025
|
{
|
|
960
1026
|
label,
|
|
961
|
-
labelRight: showProgressLabel && label ? /* @__PURE__ */
|
|
1027
|
+
labelRight: showProgressLabel && label ? /* @__PURE__ */ jsx17("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
|
|
962
1028
|
hint,
|
|
963
1029
|
hideHint,
|
|
964
1030
|
status,
|
|
965
1031
|
disabled,
|
|
966
1032
|
className: cn("w-full", className),
|
|
967
|
-
children: /* @__PURE__ */
|
|
1033
|
+
children: /* @__PURE__ */ jsx17(
|
|
968
1034
|
"div",
|
|
969
1035
|
{
|
|
970
1036
|
ref,
|
|
@@ -974,7 +1040,7 @@ var Progress = React14.forwardRef(
|
|
|
974
1040
|
"aria-valuemax": 100,
|
|
975
1041
|
"aria-label": label,
|
|
976
1042
|
...rest,
|
|
977
|
-
children: /* @__PURE__ */
|
|
1043
|
+
children: /* @__PURE__ */ jsx17(
|
|
978
1044
|
"div",
|
|
979
1045
|
{
|
|
980
1046
|
className: cn(
|
|
@@ -982,7 +1048,7 @@ var Progress = React14.forwardRef(
|
|
|
982
1048
|
barHeightClasses,
|
|
983
1049
|
disabled && "opacity-50"
|
|
984
1050
|
),
|
|
985
|
-
children: /* @__PURE__ */
|
|
1051
|
+
children: /* @__PURE__ */ jsx17(
|
|
986
1052
|
"div",
|
|
987
1053
|
{
|
|
988
1054
|
className: cn(
|
|
@@ -1003,7 +1069,7 @@ var Progress = React14.forwardRef(
|
|
|
1003
1069
|
Progress.displayName = "Progress";
|
|
1004
1070
|
|
|
1005
1071
|
// src/components/Content/StatusAvatar.tsx
|
|
1006
|
-
import * as
|
|
1072
|
+
import * as React16 from "react";
|
|
1007
1073
|
import { cva as cva10 } from "class-variance-authority";
|
|
1008
1074
|
import {
|
|
1009
1075
|
BookmarkCheckIcon,
|
|
@@ -1012,7 +1078,7 @@ import {
|
|
|
1012
1078
|
PlusIcon,
|
|
1013
1079
|
StarIcon
|
|
1014
1080
|
} from "@bubo-squared/icons";
|
|
1015
|
-
import { jsx as
|
|
1081
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1016
1082
|
var iconStatusVariants = cva10(
|
|
1017
1083
|
"inline-flex size-5 items-center justify-center rounded-full border-1 border-(--color-primary-inverse) p-1",
|
|
1018
1084
|
{
|
|
@@ -1037,11 +1103,11 @@ var presenceDotByVariant = {
|
|
|
1037
1103
|
away: "bg-(--background-warning) border-1 border-(--color-primary-inverse)",
|
|
1038
1104
|
busy: "bg-(--background-error) border-1 border-(--color-primary-inverse)"
|
|
1039
1105
|
};
|
|
1040
|
-
var StatusAvatar =
|
|
1106
|
+
var StatusAvatar = React16.forwardRef((props, ref) => {
|
|
1041
1107
|
const { variant = "verified", className, ...rest } = props;
|
|
1042
1108
|
if (variant === "offline" || variant === "online" || variant === "away" || variant === "busy") {
|
|
1043
1109
|
const dotClasses = presenceDotByVariant[variant];
|
|
1044
|
-
return /* @__PURE__ */
|
|
1110
|
+
return /* @__PURE__ */ jsx18(
|
|
1045
1111
|
"div",
|
|
1046
1112
|
{
|
|
1047
1113
|
ref,
|
|
@@ -1050,23 +1116,23 @@ var StatusAvatar = React15.forwardRef((props, ref) => {
|
|
|
1050
1116
|
className
|
|
1051
1117
|
),
|
|
1052
1118
|
...rest,
|
|
1053
|
-
children: /* @__PURE__ */
|
|
1119
|
+
children: /* @__PURE__ */ jsx18("div", { className: cn(dotClasses, "size-3.5 rounded-full") })
|
|
1054
1120
|
}
|
|
1055
1121
|
);
|
|
1056
1122
|
}
|
|
1057
1123
|
const iconVariant = variant;
|
|
1058
|
-
return /* @__PURE__ */
|
|
1124
|
+
return /* @__PURE__ */ jsxs10(
|
|
1059
1125
|
"div",
|
|
1060
1126
|
{
|
|
1061
1127
|
ref,
|
|
1062
1128
|
className: cn(iconStatusVariants({ variant: iconVariant }), className),
|
|
1063
1129
|
...rest,
|
|
1064
1130
|
children: [
|
|
1065
|
-
iconVariant === "verified" && /* @__PURE__ */
|
|
1066
|
-
iconVariant === "bookmark" && /* @__PURE__ */
|
|
1067
|
-
iconVariant === "favorite" && /* @__PURE__ */
|
|
1068
|
-
iconVariant === "add" && /* @__PURE__ */
|
|
1069
|
-
iconVariant === "remove" && /* @__PURE__ */
|
|
1131
|
+
iconVariant === "verified" && /* @__PURE__ */ jsx18(CheckIcon, { className: "size-3 text-button-white" }),
|
|
1132
|
+
iconVariant === "bookmark" && /* @__PURE__ */ jsx18(BookmarkCheckIcon, { className: "size-3 text-button-white" }),
|
|
1133
|
+
iconVariant === "favorite" && /* @__PURE__ */ jsx18(StarIcon, { className: "size-3 text-button-white" }),
|
|
1134
|
+
iconVariant === "add" && /* @__PURE__ */ jsx18(PlusIcon, { className: "size-3 text-button-white" }),
|
|
1135
|
+
iconVariant === "remove" && /* @__PURE__ */ jsx18(CrossIcon, { className: "size-3 text-button-white" })
|
|
1070
1136
|
]
|
|
1071
1137
|
}
|
|
1072
1138
|
);
|
|
@@ -1074,10 +1140,10 @@ var StatusAvatar = React15.forwardRef((props, ref) => {
|
|
|
1074
1140
|
StatusAvatar.displayName = "StatusAvatar";
|
|
1075
1141
|
|
|
1076
1142
|
// src/components/Content/Tag.tsx
|
|
1077
|
-
import * as
|
|
1143
|
+
import * as React17 from "react";
|
|
1078
1144
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
1079
1145
|
import { cva as cva11 } from "class-variance-authority";
|
|
1080
|
-
import { jsx as
|
|
1146
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1081
1147
|
var tagVariants = cva11(
|
|
1082
1148
|
"inline-flex flex-row items-center justify-center rounded-6 gap-2 px-3 overflow-hidden border-1 border-(--border-secondary) bg-(--background-neutral) hover:border-(--border-secondary-hover) focus:border-(--border-brand) focus-ring-primary ",
|
|
1083
1149
|
{
|
|
@@ -1094,7 +1160,7 @@ var tagVariants = cva11(
|
|
|
1094
1160
|
);
|
|
1095
1161
|
var disabledTag = "pointer-events-none border-(--border-secondary-disabled) bg-(--background-neutral-disabled) text-primary-disabled";
|
|
1096
1162
|
var iconClasses = "flex items-center justify-center w-5 h-5 [&>*]:w-5 [&>*]:h-5 shrink-0 text-primary";
|
|
1097
|
-
var Tag =
|
|
1163
|
+
var Tag = React17.forwardRef(
|
|
1098
1164
|
(props, ref) => {
|
|
1099
1165
|
const {
|
|
1100
1166
|
size = "sm",
|
|
@@ -1106,37 +1172,295 @@ var Tag = React16.forwardRef(
|
|
|
1106
1172
|
...rest
|
|
1107
1173
|
} = props;
|
|
1108
1174
|
const Comp = asChild ? Slot6 : "div";
|
|
1109
|
-
const leading = props.leadingIcon &&
|
|
1110
|
-
const trailing = props.trailingIcon &&
|
|
1111
|
-
return /* @__PURE__ */
|
|
1175
|
+
const leading = props.leadingIcon && React17.isValidElement(props.leadingIcon) ? React17.cloneElement(props.leadingIcon, { disabled, ...props.leadingIcon.props }) : null;
|
|
1176
|
+
const trailing = props.trailingIcon && React17.isValidElement(props.trailingIcon) ? React17.cloneElement(props.trailingIcon, { disabled, ...props.trailingIcon.props }) : null;
|
|
1177
|
+
return /* @__PURE__ */ jsxs11(
|
|
1112
1178
|
Comp,
|
|
1113
1179
|
{
|
|
1114
1180
|
className: cn(tagVariants({ size }), disabled && disabledTag, className),
|
|
1115
1181
|
ref,
|
|
1116
1182
|
...rest,
|
|
1117
1183
|
children: [
|
|
1118
|
-
leading && /* @__PURE__ */
|
|
1119
|
-
value ? /* @__PURE__ */
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */
|
|
1123
|
-
] }) : /* @__PURE__ */
|
|
1124
|
-
trailing && /* @__PURE__ */
|
|
1184
|
+
leading && /* @__PURE__ */ jsx19("div", { className: iconClasses, children: leading }),
|
|
1185
|
+
value ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-row gap-1 items-center", children: [
|
|
1186
|
+
/* @__PURE__ */ jsx19("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: label }),
|
|
1187
|
+
/* @__PURE__ */ jsx19("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: ":" }),
|
|
1188
|
+
/* @__PURE__ */ jsx19("span", { className: "text-primary paragraph-lg-medium mb-0! cursor-default font-medium", children: value })
|
|
1189
|
+
] }) : /* @__PURE__ */ jsx19("span", { className: "text-primary paragraph-lg mb-0! cursor-default", children: label }),
|
|
1190
|
+
trailing && /* @__PURE__ */ jsx19("div", { className: iconClasses, children: trailing })
|
|
1125
1191
|
]
|
|
1126
1192
|
}
|
|
1127
1193
|
);
|
|
1128
1194
|
}
|
|
1129
1195
|
);
|
|
1130
1196
|
|
|
1197
|
+
// src/components/Content/Menu.tsx
|
|
1198
|
+
import "react";
|
|
1199
|
+
|
|
1200
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1201
|
+
import * as React18 from "react";
|
|
1202
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1203
|
+
import { ChevronRightIcon } from "@bubo-squared/icons";
|
|
1204
|
+
|
|
1205
|
+
// src/components/ui/dropdown-styles.ts
|
|
1206
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
1207
|
+
var dropdownSurfaceClass = "z-50 rounded-4 border border-(--border-secondary-hover) bg-(--background-neutral) shadow-card-md";
|
|
1208
|
+
var dropdownScrollClass = "max-h-79 overflow-y-auto dropdown-scrollbar";
|
|
1209
|
+
var dropdownRowVariants = cva12(
|
|
1210
|
+
"flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left text-primary cursor-pointer hover:bg-(--background-secondary)",
|
|
1211
|
+
{
|
|
1212
|
+
variants: {
|
|
1213
|
+
size: {
|
|
1214
|
+
sm: "paragraph-sm py-(--space-4)",
|
|
1215
|
+
md: "paragraph-md py-(--space-6)",
|
|
1216
|
+
lg: "paragraph-lg py-(--space-8)",
|
|
1217
|
+
xl: "subtitle py-(--space-10)"
|
|
1218
|
+
},
|
|
1219
|
+
inset: {
|
|
1220
|
+
true: "pl-(--space-16)"
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
defaultVariants: {
|
|
1224
|
+
size: "lg"
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
);
|
|
1228
|
+
|
|
1229
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1230
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1231
|
+
var DropdownMenuSizeContext = React18.createContext("lg");
|
|
1232
|
+
function useDropdownMenuSize(explicitSize) {
|
|
1233
|
+
const contextSize = React18.useContext(DropdownMenuSizeContext);
|
|
1234
|
+
return explicitSize ?? contextSize;
|
|
1235
|
+
}
|
|
1236
|
+
function DropdownMenu({
|
|
1237
|
+
...props
|
|
1238
|
+
}) {
|
|
1239
|
+
return /* @__PURE__ */ jsx20(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1240
|
+
}
|
|
1241
|
+
function DropdownMenuPortal({
|
|
1242
|
+
...props
|
|
1243
|
+
}) {
|
|
1244
|
+
return /* @__PURE__ */ jsx20(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1245
|
+
}
|
|
1246
|
+
function DropdownMenuTrigger({
|
|
1247
|
+
...props
|
|
1248
|
+
}) {
|
|
1249
|
+
return /* @__PURE__ */ jsx20(
|
|
1250
|
+
DropdownMenuPrimitive.Trigger,
|
|
1251
|
+
{
|
|
1252
|
+
"data-slot": "dropdown-menu-trigger",
|
|
1253
|
+
...props
|
|
1254
|
+
}
|
|
1255
|
+
);
|
|
1256
|
+
}
|
|
1257
|
+
function DropdownMenuContent({
|
|
1258
|
+
className,
|
|
1259
|
+
sideOffset = 4,
|
|
1260
|
+
size = "lg",
|
|
1261
|
+
...props
|
|
1262
|
+
}) {
|
|
1263
|
+
return /* @__PURE__ */ jsx20(DropdownMenuSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx20(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx20(
|
|
1264
|
+
DropdownMenuPrimitive.Content,
|
|
1265
|
+
{
|
|
1266
|
+
"data-slot": "dropdown-menu-content",
|
|
1267
|
+
sideOffset,
|
|
1268
|
+
className: cn(
|
|
1269
|
+
dropdownSurfaceClass,
|
|
1270
|
+
dropdownScrollClass,
|
|
1271
|
+
"min-w-37.5 p-0",
|
|
1272
|
+
className
|
|
1273
|
+
),
|
|
1274
|
+
...props
|
|
1275
|
+
}
|
|
1276
|
+
) }) });
|
|
1277
|
+
}
|
|
1278
|
+
function DropdownMenuGroup({
|
|
1279
|
+
...props
|
|
1280
|
+
}) {
|
|
1281
|
+
return /* @__PURE__ */ jsx20(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
1282
|
+
}
|
|
1283
|
+
function DropdownMenuItem({
|
|
1284
|
+
className,
|
|
1285
|
+
inset,
|
|
1286
|
+
size,
|
|
1287
|
+
variant = "default",
|
|
1288
|
+
...props
|
|
1289
|
+
}) {
|
|
1290
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1291
|
+
return /* @__PURE__ */ jsx20(
|
|
1292
|
+
DropdownMenuPrimitive.Item,
|
|
1293
|
+
{
|
|
1294
|
+
"data-slot": "dropdown-menu-item",
|
|
1295
|
+
"data-inset": inset,
|
|
1296
|
+
"data-variant": variant,
|
|
1297
|
+
className: cn(
|
|
1298
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1299
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1300
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50 data-disabled:text-primary-disabled",
|
|
1301
|
+
variant === "destructive" ? "text-(--color-error)" : null,
|
|
1302
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1303
|
+
className
|
|
1304
|
+
),
|
|
1305
|
+
...props
|
|
1306
|
+
}
|
|
1307
|
+
);
|
|
1308
|
+
}
|
|
1309
|
+
function DropdownMenuLabel({
|
|
1310
|
+
className,
|
|
1311
|
+
inset,
|
|
1312
|
+
size,
|
|
1313
|
+
...props
|
|
1314
|
+
}) {
|
|
1315
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1316
|
+
return /* @__PURE__ */ jsx20(
|
|
1317
|
+
DropdownMenuPrimitive.Label,
|
|
1318
|
+
{
|
|
1319
|
+
"data-slot": "dropdown-menu-label",
|
|
1320
|
+
"data-inset": inset,
|
|
1321
|
+
className: cn(
|
|
1322
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1323
|
+
"text-secondary cursor-default hover:bg-transparent caption",
|
|
1324
|
+
className
|
|
1325
|
+
),
|
|
1326
|
+
...props
|
|
1327
|
+
}
|
|
1328
|
+
);
|
|
1329
|
+
}
|
|
1330
|
+
function DropdownMenuSeparator({
|
|
1331
|
+
className,
|
|
1332
|
+
...props
|
|
1333
|
+
}) {
|
|
1334
|
+
return /* @__PURE__ */ jsx20(
|
|
1335
|
+
DropdownMenuPrimitive.Separator,
|
|
1336
|
+
{
|
|
1337
|
+
"data-slot": "dropdown-menu-separator",
|
|
1338
|
+
className: cn("my-1 h-px bg-(--border-secondary)", className),
|
|
1339
|
+
...props
|
|
1340
|
+
}
|
|
1341
|
+
);
|
|
1342
|
+
}
|
|
1343
|
+
function DropdownMenuShortcut({
|
|
1344
|
+
className,
|
|
1345
|
+
...props
|
|
1346
|
+
}) {
|
|
1347
|
+
return /* @__PURE__ */ jsx20(
|
|
1348
|
+
"span",
|
|
1349
|
+
{
|
|
1350
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1351
|
+
className: cn(
|
|
1352
|
+
"ml-auto paragraph-sm text-secondary",
|
|
1353
|
+
className
|
|
1354
|
+
),
|
|
1355
|
+
...props
|
|
1356
|
+
}
|
|
1357
|
+
);
|
|
1358
|
+
}
|
|
1359
|
+
function DropdownMenuSub({
|
|
1360
|
+
...props
|
|
1361
|
+
}) {
|
|
1362
|
+
return /* @__PURE__ */ jsx20(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1363
|
+
}
|
|
1364
|
+
function DropdownMenuSubTrigger({
|
|
1365
|
+
className,
|
|
1366
|
+
inset,
|
|
1367
|
+
size,
|
|
1368
|
+
children,
|
|
1369
|
+
...props
|
|
1370
|
+
}) {
|
|
1371
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1372
|
+
return /* @__PURE__ */ jsxs12(
|
|
1373
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1374
|
+
{
|
|
1375
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1376
|
+
"data-inset": inset,
|
|
1377
|
+
className: cn(
|
|
1378
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1379
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1380
|
+
"data-[state=open]:bg-(--background-secondary)",
|
|
1381
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50 data-disabled:text-primary-disabled",
|
|
1382
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1383
|
+
className
|
|
1384
|
+
),
|
|
1385
|
+
...props,
|
|
1386
|
+
children: [
|
|
1387
|
+
children,
|
|
1388
|
+
/* @__PURE__ */ jsx20(ChevronRightIcon, { className: "ml-auto size-4 text-(--icon-primary)" })
|
|
1389
|
+
]
|
|
1390
|
+
}
|
|
1391
|
+
);
|
|
1392
|
+
}
|
|
1393
|
+
function DropdownMenuSubContent({
|
|
1394
|
+
className,
|
|
1395
|
+
size,
|
|
1396
|
+
...props
|
|
1397
|
+
}) {
|
|
1398
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1399
|
+
return /* @__PURE__ */ jsx20(DropdownMenuSizeContext.Provider, { value: resolvedSize, children: /* @__PURE__ */ jsx20(
|
|
1400
|
+
DropdownMenuPrimitive.SubContent,
|
|
1401
|
+
{
|
|
1402
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1403
|
+
className: cn(
|
|
1404
|
+
dropdownSurfaceClass,
|
|
1405
|
+
dropdownScrollClass,
|
|
1406
|
+
"min-w-37.5 p-0",
|
|
1407
|
+
className
|
|
1408
|
+
),
|
|
1409
|
+
...props
|
|
1410
|
+
}
|
|
1411
|
+
) });
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
// src/components/Content/Menu.tsx
|
|
1415
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1416
|
+
var Menu = (props) => {
|
|
1417
|
+
const {
|
|
1418
|
+
trigger,
|
|
1419
|
+
children,
|
|
1420
|
+
size = "lg",
|
|
1421
|
+
align = "start",
|
|
1422
|
+
side,
|
|
1423
|
+
offset = 4,
|
|
1424
|
+
className,
|
|
1425
|
+
open,
|
|
1426
|
+
onOpenChange,
|
|
1427
|
+
modal
|
|
1428
|
+
} = props;
|
|
1429
|
+
return /* @__PURE__ */ jsxs13(DropdownMenu, { open, onOpenChange, modal, children: [
|
|
1430
|
+
/* @__PURE__ */ jsx21(DropdownMenuTrigger, { asChild: true, children: trigger }),
|
|
1431
|
+
/* @__PURE__ */ jsx21(
|
|
1432
|
+
DropdownMenuContent,
|
|
1433
|
+
{
|
|
1434
|
+
align,
|
|
1435
|
+
side,
|
|
1436
|
+
sideOffset: offset,
|
|
1437
|
+
size,
|
|
1438
|
+
className: cn(className),
|
|
1439
|
+
children
|
|
1440
|
+
}
|
|
1441
|
+
)
|
|
1442
|
+
] });
|
|
1443
|
+
};
|
|
1444
|
+
Menu.displayName = "Menu";
|
|
1445
|
+
var MenuGroup = DropdownMenuGroup;
|
|
1446
|
+
var MenuItem = DropdownMenuItem;
|
|
1447
|
+
var MenuLabel = DropdownMenuLabel;
|
|
1448
|
+
var MenuPortal = DropdownMenuPortal;
|
|
1449
|
+
var MenuSeparator = DropdownMenuSeparator;
|
|
1450
|
+
var MenuShortcut = DropdownMenuShortcut;
|
|
1451
|
+
var MenuSub = DropdownMenuSub;
|
|
1452
|
+
var MenuSubContent = DropdownMenuSubContent;
|
|
1453
|
+
var MenuSubTrigger = DropdownMenuSubTrigger;
|
|
1454
|
+
|
|
1131
1455
|
// src/components/Inputs/Checkbox.tsx
|
|
1132
1456
|
import "react";
|
|
1133
1457
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
1134
1458
|
import { CheckIcon as CheckIcon2 } from "@bubo-squared/icons";
|
|
1135
1459
|
import { MinusIcon } from "@bubo-squared/icons";
|
|
1136
|
-
import { jsx as
|
|
1460
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1137
1461
|
function Checkbox({ label, className, ...props }) {
|
|
1138
|
-
return /* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1462
|
+
return /* @__PURE__ */ jsxs14("label", { className: "inline-flex items-center gap-(--space-12) cursor-pointer select-none", children: [
|
|
1463
|
+
/* @__PURE__ */ jsx22(
|
|
1140
1464
|
CheckboxPrimitive.Root,
|
|
1141
1465
|
{
|
|
1142
1466
|
className: cn(
|
|
@@ -1152,36 +1476,41 @@ function Checkbox({ label, className, ...props }) {
|
|
|
1152
1476
|
className
|
|
1153
1477
|
),
|
|
1154
1478
|
...props,
|
|
1155
|
-
children: /* @__PURE__ */
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */
|
|
1479
|
+
children: /* @__PURE__ */ jsxs14(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
|
|
1480
|
+
/* @__PURE__ */ jsx22(CheckIcon2, { className: "h-5 w-5 hidden group-data-[state=checked]:block" }),
|
|
1481
|
+
/* @__PURE__ */ jsx22(MinusIcon, { className: "h-5 w-5 hidden group-data-[state=indeterminate]:block" })
|
|
1158
1482
|
] })
|
|
1159
1483
|
}
|
|
1160
1484
|
),
|
|
1161
|
-
label && /* @__PURE__ */
|
|
1485
|
+
label && /* @__PURE__ */ jsx22("span", { className: "paragraph-md-medium text-primary", children: label })
|
|
1162
1486
|
] });
|
|
1163
1487
|
}
|
|
1164
1488
|
|
|
1165
|
-
// src/components/Inputs/
|
|
1166
|
-
import * as
|
|
1167
|
-
import
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
import
|
|
1171
|
-
|
|
1172
|
-
|
|
1489
|
+
// src/components/Inputs/Autocomplete.tsx
|
|
1490
|
+
import * as React23 from "react";
|
|
1491
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
1492
|
+
|
|
1493
|
+
// src/components/Inputs/InputShell.tsx
|
|
1494
|
+
import * as React21 from "react";
|
|
1495
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
1496
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1497
|
+
var inputShellVariants = cva13(
|
|
1498
|
+
"group flex w-full items-center rounded-4 border bg-(--background-primary) text-left cursor-text border-(--border-secondary)",
|
|
1173
1499
|
{
|
|
1174
1500
|
variants: {
|
|
1175
1501
|
size: {
|
|
1176
|
-
sm: "
|
|
1177
|
-
md: "
|
|
1178
|
-
lg: "h-11",
|
|
1179
|
-
xl: "h-14"
|
|
1502
|
+
sm: "gap-2 px-2 py-1 h-8",
|
|
1503
|
+
md: "gap-2 px-2 py-2 h-10",
|
|
1504
|
+
lg: "gap-2 px-2 py-2 h-11",
|
|
1505
|
+
xl: "gap-2 px-[10px] py-2 h-14"
|
|
1180
1506
|
},
|
|
1181
1507
|
status: {
|
|
1182
|
-
default: "
|
|
1183
|
-
success: "
|
|
1184
|
-
error: "
|
|
1508
|
+
default: "input-default",
|
|
1509
|
+
success: "input-success",
|
|
1510
|
+
error: "input-error"
|
|
1511
|
+
},
|
|
1512
|
+
disabled: {
|
|
1513
|
+
true: "bg-(--background-primary-disabled) border-(--border-secondary-disabled) text-primary-disabled cursor-default"
|
|
1185
1514
|
}
|
|
1186
1515
|
},
|
|
1187
1516
|
defaultVariants: {
|
|
@@ -1190,8 +1519,365 @@ var selectTriggerVariants = cva12(
|
|
|
1190
1519
|
}
|
|
1191
1520
|
}
|
|
1192
1521
|
);
|
|
1193
|
-
var
|
|
1194
|
-
|
|
1522
|
+
var InputShell = React21.forwardRef(
|
|
1523
|
+
({ size, status, disabled, className, ...rest }, ref) => {
|
|
1524
|
+
return /* @__PURE__ */ jsx23(
|
|
1525
|
+
"div",
|
|
1526
|
+
{
|
|
1527
|
+
ref,
|
|
1528
|
+
"aria-disabled": disabled || void 0,
|
|
1529
|
+
className: cn(
|
|
1530
|
+
inputShellVariants({ size, status, disabled }),
|
|
1531
|
+
className
|
|
1532
|
+
),
|
|
1533
|
+
...rest
|
|
1534
|
+
}
|
|
1535
|
+
);
|
|
1536
|
+
}
|
|
1537
|
+
);
|
|
1538
|
+
InputShell.displayName = "InputShell";
|
|
1539
|
+
|
|
1540
|
+
// src/components/ui/input.tsx
|
|
1541
|
+
import * as React22 from "react";
|
|
1542
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1543
|
+
var Input = React22.forwardRef(
|
|
1544
|
+
({ className, type, variant = "default", ...props }, ref) => {
|
|
1545
|
+
const base = "text-primary placeholder:text-(--color-secondary) disabled:text-primary-disabled disabled:placeholder:text-primary-disabled selection:bg-primary selection:text-primary-foreground file:text-foreground";
|
|
1546
|
+
const defaultStyles = "dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:border-ring focus-visible:ring-0 focus-visible:shadow-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive";
|
|
1547
|
+
const bareStyles = "bg-transparent outline-none w-full";
|
|
1548
|
+
return /* @__PURE__ */ jsx24(
|
|
1549
|
+
"input",
|
|
1550
|
+
{
|
|
1551
|
+
ref,
|
|
1552
|
+
type,
|
|
1553
|
+
"data-slot": "input",
|
|
1554
|
+
className: cn(
|
|
1555
|
+
base,
|
|
1556
|
+
variant === "default" ? defaultStyles : bareStyles,
|
|
1557
|
+
className
|
|
1558
|
+
),
|
|
1559
|
+
...props
|
|
1560
|
+
}
|
|
1561
|
+
);
|
|
1562
|
+
}
|
|
1563
|
+
);
|
|
1564
|
+
Input.displayName = "Input";
|
|
1565
|
+
|
|
1566
|
+
// src/components/Inputs/Autocomplete.tsx
|
|
1567
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1568
|
+
var inputTextVariants = cva14("truncate", {
|
|
1569
|
+
variants: {
|
|
1570
|
+
size: {
|
|
1571
|
+
sm: "paragraph-md",
|
|
1572
|
+
md: "paragraph-lg",
|
|
1573
|
+
lg: "subtitle",
|
|
1574
|
+
xl: "h6-title"
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
defaultVariants: {
|
|
1578
|
+
size: "lg"
|
|
1579
|
+
}
|
|
1580
|
+
});
|
|
1581
|
+
var optionVariants = cva14(
|
|
1582
|
+
"w-full text-left hover:bg-(--background-secondary)",
|
|
1583
|
+
{
|
|
1584
|
+
variants: {
|
|
1585
|
+
size: {
|
|
1586
|
+
sm: "paragraph-sm py-(--space-4) ",
|
|
1587
|
+
md: "paragraph-md py-(--space-6) ",
|
|
1588
|
+
lg: "paragraph-lg py-(--space-8) ",
|
|
1589
|
+
xl: "subtitle py-(--space-10) "
|
|
1590
|
+
},
|
|
1591
|
+
active: {
|
|
1592
|
+
true: "bg-(--background-secondary)"
|
|
1593
|
+
}
|
|
1594
|
+
},
|
|
1595
|
+
defaultVariants: {
|
|
1596
|
+
size: "lg",
|
|
1597
|
+
active: false
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
);
|
|
1601
|
+
var iconWrapperVariants = cva14(
|
|
1602
|
+
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
1603
|
+
{
|
|
1604
|
+
variants: {
|
|
1605
|
+
size: {
|
|
1606
|
+
sm: "size-4 [&>svg]:size-4",
|
|
1607
|
+
md: "size-5 [&>svg]:size-5",
|
|
1608
|
+
lg: "size-5 [&>svg]:size-5",
|
|
1609
|
+
xl: "size-6 [&>svg]:size-6"
|
|
1610
|
+
},
|
|
1611
|
+
disabled: {
|
|
1612
|
+
true: "text-(--icon-primary-disabled)"
|
|
1613
|
+
}
|
|
1614
|
+
},
|
|
1615
|
+
defaultVariants: {
|
|
1616
|
+
size: "lg"
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
);
|
|
1620
|
+
var Autocomplete = (props) => {
|
|
1621
|
+
const {
|
|
1622
|
+
label,
|
|
1623
|
+
hint,
|
|
1624
|
+
hideHint,
|
|
1625
|
+
status = "default",
|
|
1626
|
+
size = "lg",
|
|
1627
|
+
disabled,
|
|
1628
|
+
className,
|
|
1629
|
+
leadingIcon,
|
|
1630
|
+
trailingIcon,
|
|
1631
|
+
options,
|
|
1632
|
+
loading = false,
|
|
1633
|
+
loadingText = "Loading\u2026",
|
|
1634
|
+
noOptionsText = "No matches",
|
|
1635
|
+
value,
|
|
1636
|
+
defaultValue,
|
|
1637
|
+
onChange,
|
|
1638
|
+
inputValue,
|
|
1639
|
+
defaultInputValue,
|
|
1640
|
+
onInputChange,
|
|
1641
|
+
dropdownClassName,
|
|
1642
|
+
listboxClassName,
|
|
1643
|
+
placeholder = "Search\u2026",
|
|
1644
|
+
onKeyDown,
|
|
1645
|
+
onFocus,
|
|
1646
|
+
onBlur,
|
|
1647
|
+
id,
|
|
1648
|
+
...inputProps
|
|
1649
|
+
} = props;
|
|
1650
|
+
const isValueControlled = value !== void 0;
|
|
1651
|
+
const [internalValue, setInternalValue] = React23.useState(
|
|
1652
|
+
defaultValue ?? ""
|
|
1653
|
+
);
|
|
1654
|
+
const isInputControlled = inputValue !== void 0;
|
|
1655
|
+
const [internalInputValue, setInternalInputValue] = React23.useState(
|
|
1656
|
+
defaultInputValue ?? ""
|
|
1657
|
+
);
|
|
1658
|
+
const [isFocused, setIsFocused] = React23.useState(false);
|
|
1659
|
+
const [activeIndex, setActiveIndex] = React23.useState(-1);
|
|
1660
|
+
const inputRef = React23.useRef(null);
|
|
1661
|
+
const baseId = React23.useId();
|
|
1662
|
+
const inputId = id ?? baseId;
|
|
1663
|
+
const listboxId = `${inputId}-listbox`;
|
|
1664
|
+
const currentValue = (isValueControlled ? value : internalValue) ?? "";
|
|
1665
|
+
const currentInput = (isInputControlled ? inputValue : internalInputValue) ?? "";
|
|
1666
|
+
React23.useEffect(() => {
|
|
1667
|
+
if (isFocused) return;
|
|
1668
|
+
if (isInputControlled) return;
|
|
1669
|
+
if (!isValueControlled) return;
|
|
1670
|
+
setInternalInputValue(currentValue);
|
|
1671
|
+
}, [currentValue, isFocused, isInputControlled, isValueControlled]);
|
|
1672
|
+
const showDropdown = isFocused && (loading || options.length > 0 || currentInput.trim().length > 0);
|
|
1673
|
+
const setInputText = (next) => {
|
|
1674
|
+
if (!isInputControlled) {
|
|
1675
|
+
setInternalInputValue(next);
|
|
1676
|
+
}
|
|
1677
|
+
onInputChange?.(next);
|
|
1678
|
+
};
|
|
1679
|
+
const commitValue = (next) => {
|
|
1680
|
+
if (!isValueControlled) {
|
|
1681
|
+
setInternalValue(next);
|
|
1682
|
+
}
|
|
1683
|
+
onChange?.(next);
|
|
1684
|
+
setInputText(next);
|
|
1685
|
+
setActiveIndex(-1);
|
|
1686
|
+
};
|
|
1687
|
+
const handleContainerClick = () => {
|
|
1688
|
+
if (disabled) return;
|
|
1689
|
+
inputRef.current?.focus();
|
|
1690
|
+
};
|
|
1691
|
+
const handleInputChange = (event) => {
|
|
1692
|
+
const next = event.target.value;
|
|
1693
|
+
setInputText(next);
|
|
1694
|
+
setActiveIndex(-1);
|
|
1695
|
+
};
|
|
1696
|
+
const handleFocus = (event) => {
|
|
1697
|
+
setIsFocused(true);
|
|
1698
|
+
onFocus?.(event);
|
|
1699
|
+
};
|
|
1700
|
+
const handleBlur = (event) => {
|
|
1701
|
+
setIsFocused(false);
|
|
1702
|
+
setActiveIndex(-1);
|
|
1703
|
+
onBlur?.(event);
|
|
1704
|
+
};
|
|
1705
|
+
const handleKeyDown = (event) => {
|
|
1706
|
+
onKeyDown?.(event);
|
|
1707
|
+
if (event.defaultPrevented) return;
|
|
1708
|
+
if (!showDropdown && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
1709
|
+
setIsFocused(true);
|
|
1710
|
+
return;
|
|
1711
|
+
}
|
|
1712
|
+
switch (event.key) {
|
|
1713
|
+
case "ArrowDown": {
|
|
1714
|
+
event.preventDefault();
|
|
1715
|
+
setActiveIndex((prev) => {
|
|
1716
|
+
if (options.length === 0) return -1;
|
|
1717
|
+
const next = prev < 0 ? 0 : Math.min(prev + 1, options.length - 1);
|
|
1718
|
+
return next;
|
|
1719
|
+
});
|
|
1720
|
+
break;
|
|
1721
|
+
}
|
|
1722
|
+
case "ArrowUp": {
|
|
1723
|
+
event.preventDefault();
|
|
1724
|
+
setActiveIndex((prev) => {
|
|
1725
|
+
if (options.length === 0) return -1;
|
|
1726
|
+
const next = prev <= 0 ? 0 : prev - 1;
|
|
1727
|
+
return next;
|
|
1728
|
+
});
|
|
1729
|
+
break;
|
|
1730
|
+
}
|
|
1731
|
+
case "Enter": {
|
|
1732
|
+
if (activeIndex >= 0 && activeIndex < options.length) {
|
|
1733
|
+
event.preventDefault();
|
|
1734
|
+
commitValue(options[activeIndex]);
|
|
1735
|
+
setIsFocused(false);
|
|
1736
|
+
}
|
|
1737
|
+
break;
|
|
1738
|
+
}
|
|
1739
|
+
case "Escape": {
|
|
1740
|
+
event.preventDefault();
|
|
1741
|
+
setIsFocused(false);
|
|
1742
|
+
setActiveIndex(-1);
|
|
1743
|
+
break;
|
|
1744
|
+
}
|
|
1745
|
+
default:
|
|
1746
|
+
break;
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
const handleOptionMouseDown = (event) => {
|
|
1750
|
+
event.preventDefault();
|
|
1751
|
+
};
|
|
1752
|
+
const handleOptionClick = (option) => {
|
|
1753
|
+
commitValue(option);
|
|
1754
|
+
setIsFocused(false);
|
|
1755
|
+
};
|
|
1756
|
+
const activeDescendantId = activeIndex >= 0 ? `${inputId}-option-${activeIndex}` : void 0;
|
|
1757
|
+
const showLeadingIcon = !!leadingIcon;
|
|
1758
|
+
const showTrailingIcon = !!trailingIcon;
|
|
1759
|
+
return /* @__PURE__ */ jsx25(Field, { label, hint, hideHint, status, disabled, children: /* @__PURE__ */ jsxs15("div", { className: "relative w-full", children: [
|
|
1760
|
+
/* @__PURE__ */ jsxs15(
|
|
1761
|
+
InputShell,
|
|
1762
|
+
{
|
|
1763
|
+
size,
|
|
1764
|
+
status,
|
|
1765
|
+
disabled,
|
|
1766
|
+
className,
|
|
1767
|
+
onClick: handleContainerClick,
|
|
1768
|
+
children: [
|
|
1769
|
+
showLeadingIcon && /* @__PURE__ */ jsx25("span", { className: cn(iconWrapperVariants({ size, disabled: !!disabled })), children: leadingIcon }),
|
|
1770
|
+
/* @__PURE__ */ jsx25(
|
|
1771
|
+
Input,
|
|
1772
|
+
{
|
|
1773
|
+
ref: inputRef,
|
|
1774
|
+
id: inputId,
|
|
1775
|
+
type: "text",
|
|
1776
|
+
disabled: disabled ?? void 0,
|
|
1777
|
+
placeholder,
|
|
1778
|
+
value: currentInput,
|
|
1779
|
+
onChange: handleInputChange,
|
|
1780
|
+
onFocus: handleFocus,
|
|
1781
|
+
onBlur: handleBlur,
|
|
1782
|
+
onKeyDown: handleKeyDown,
|
|
1783
|
+
role: "combobox",
|
|
1784
|
+
"aria-autocomplete": "list",
|
|
1785
|
+
"aria-controls": listboxId,
|
|
1786
|
+
"aria-expanded": showDropdown,
|
|
1787
|
+
"aria-activedescendant": activeDescendantId,
|
|
1788
|
+
variant: "bare",
|
|
1789
|
+
className: cn(inputTextVariants({ size }), "bg-transparent outline-none w-full"),
|
|
1790
|
+
...inputProps
|
|
1791
|
+
}
|
|
1792
|
+
),
|
|
1793
|
+
showTrailingIcon && /* @__PURE__ */ jsx25("span", { className: cn(iconWrapperVariants({ size, disabled: !!disabled })), children: trailingIcon })
|
|
1794
|
+
]
|
|
1795
|
+
}
|
|
1796
|
+
),
|
|
1797
|
+
showDropdown && /* @__PURE__ */ jsx25(
|
|
1798
|
+
"div",
|
|
1799
|
+
{
|
|
1800
|
+
className: cn(
|
|
1801
|
+
"absolute left-0 right-0 mt-1",
|
|
1802
|
+
dropdownSurfaceClass,
|
|
1803
|
+
dropdownScrollClass,
|
|
1804
|
+
dropdownClassName
|
|
1805
|
+
),
|
|
1806
|
+
children: loading ? /* @__PURE__ */ jsx25(
|
|
1807
|
+
"div",
|
|
1808
|
+
{
|
|
1809
|
+
className: cn(optionVariants({ size }), "px-(--space-8) pr-(--space-16) text-secondary"),
|
|
1810
|
+
"aria-live": "polite",
|
|
1811
|
+
children: loadingText
|
|
1812
|
+
}
|
|
1813
|
+
) : options.length === 0 ? /* @__PURE__ */ jsx25(
|
|
1814
|
+
"div",
|
|
1815
|
+
{
|
|
1816
|
+
className: cn(optionVariants({ size }), "px-(--space-8) pr-(--space-16) text-secondary"),
|
|
1817
|
+
"aria-live": "polite",
|
|
1818
|
+
children: noOptionsText
|
|
1819
|
+
}
|
|
1820
|
+
) : /* @__PURE__ */ jsx25(
|
|
1821
|
+
"ul",
|
|
1822
|
+
{
|
|
1823
|
+
id: listboxId,
|
|
1824
|
+
role: "listbox",
|
|
1825
|
+
className: cn("flex flex-col", listboxClassName),
|
|
1826
|
+
children: options.map((option, index) => /* @__PURE__ */ jsx25(
|
|
1827
|
+
"li",
|
|
1828
|
+
{
|
|
1829
|
+
id: `${inputId}-option-${index}`,
|
|
1830
|
+
role: "option",
|
|
1831
|
+
"aria-selected": index === activeIndex,
|
|
1832
|
+
className: cn(
|
|
1833
|
+
optionVariants({ size, active: index === activeIndex }),
|
|
1834
|
+
"px-(--space-8) pr-(--space-16) text-primary cursor-pointer"
|
|
1835
|
+
),
|
|
1836
|
+
onMouseDown: handleOptionMouseDown,
|
|
1837
|
+
onMouseEnter: () => setActiveIndex(index),
|
|
1838
|
+
onClick: () => handleOptionClick(option),
|
|
1839
|
+
children: option
|
|
1840
|
+
},
|
|
1841
|
+
`${option}-${index}`
|
|
1842
|
+
))
|
|
1843
|
+
}
|
|
1844
|
+
)
|
|
1845
|
+
}
|
|
1846
|
+
)
|
|
1847
|
+
] }) });
|
|
1848
|
+
};
|
|
1849
|
+
Autocomplete.displayName = "Autocomplete";
|
|
1850
|
+
|
|
1851
|
+
// src/components/Inputs/Select.tsx
|
|
1852
|
+
import * as React24 from "react";
|
|
1853
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1854
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
1855
|
+
import { ChevronDownIcon as ChevronDownIcon2 } from "@bubo-squared/icons";
|
|
1856
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1857
|
+
var selectTriggerVariants = cva15(
|
|
1858
|
+
"group flex w-full items-center justify-between rounded-4 border bg-(--background-primary) p-2 text-left transition-colors cursor-pointer focus-ring-primary focus:border-(--border-brand) hover:bg-(--background-primary-hover) disabled:bg-(--background-primary) disabled:border-(--border-secondary-disabled) disabled:text-primary-disabled disabled:cursor-default",
|
|
1859
|
+
{
|
|
1860
|
+
variants: {
|
|
1861
|
+
size: {
|
|
1862
|
+
sm: "h-8 py-1",
|
|
1863
|
+
md: "h-10 py-2",
|
|
1864
|
+
lg: "h-11",
|
|
1865
|
+
xl: "h-14"
|
|
1866
|
+
},
|
|
1867
|
+
status: {
|
|
1868
|
+
default: "border-(--border-secondary)",
|
|
1869
|
+
success: "border-(--border-success)",
|
|
1870
|
+
error: "border-(--border-error)"
|
|
1871
|
+
}
|
|
1872
|
+
},
|
|
1873
|
+
defaultVariants: {
|
|
1874
|
+
size: "lg",
|
|
1875
|
+
status: "default"
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
);
|
|
1879
|
+
var textVariants = cva15("truncate", {
|
|
1880
|
+
variants: {
|
|
1195
1881
|
size: {
|
|
1196
1882
|
sm: "paragraph-md",
|
|
1197
1883
|
md: "paragraph-lg",
|
|
@@ -1211,7 +1897,7 @@ var textVariants = cva12("truncate", {
|
|
|
1211
1897
|
hasValue: false
|
|
1212
1898
|
}
|
|
1213
1899
|
});
|
|
1214
|
-
var selectIconVariants =
|
|
1900
|
+
var selectIconVariants = cva15("flex items-center justify-center shrink-0", {
|
|
1215
1901
|
variants: {
|
|
1216
1902
|
size: {
|
|
1217
1903
|
sm: "size-4",
|
|
@@ -1229,7 +1915,7 @@ var selectIconVariants = cva12("flex items-center justify-center shrink-0", {
|
|
|
1229
1915
|
disabled: false
|
|
1230
1916
|
}
|
|
1231
1917
|
});
|
|
1232
|
-
var selectButtonVariants =
|
|
1918
|
+
var selectButtonVariants = cva15(
|
|
1233
1919
|
"flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left paragraph-lg text-primary hover:bg-(--background-secondary)",
|
|
1234
1920
|
{
|
|
1235
1921
|
variants: {
|
|
@@ -1263,10 +1949,10 @@ var Select = (props) => {
|
|
|
1263
1949
|
} = props;
|
|
1264
1950
|
const isControlled = value !== void 0;
|
|
1265
1951
|
const controlledValue = value ?? "";
|
|
1266
|
-
const [internalValue, setInternalValue] =
|
|
1952
|
+
const [internalValue, setInternalValue] = React24.useState(
|
|
1267
1953
|
defaultValue ?? ""
|
|
1268
1954
|
);
|
|
1269
|
-
const [open, setOpen] =
|
|
1955
|
+
const [open, setOpen] = React24.useState(false);
|
|
1270
1956
|
const rawValue = isControlled ? controlledValue : internalValue;
|
|
1271
1957
|
const selectedOption = options.find((opt) => opt.value === rawValue);
|
|
1272
1958
|
const currentValue = selectedOption ? selectedOption.value : "";
|
|
@@ -1295,7 +1981,7 @@ var Select = (props) => {
|
|
|
1295
1981
|
setOpen(false);
|
|
1296
1982
|
}
|
|
1297
1983
|
};
|
|
1298
|
-
return /* @__PURE__ */
|
|
1984
|
+
return /* @__PURE__ */ jsx26(
|
|
1299
1985
|
Field,
|
|
1300
1986
|
{
|
|
1301
1987
|
label,
|
|
@@ -1303,7 +1989,7 @@ var Select = (props) => {
|
|
|
1303
1989
|
hideHint,
|
|
1304
1990
|
status,
|
|
1305
1991
|
disabled,
|
|
1306
|
-
children: /* @__PURE__ */
|
|
1992
|
+
children: /* @__PURE__ */ jsxs16(
|
|
1307
1993
|
SelectPrimitive.Root,
|
|
1308
1994
|
{
|
|
1309
1995
|
value: currentValue,
|
|
@@ -1314,7 +2000,7 @@ var Select = (props) => {
|
|
|
1314
2000
|
name,
|
|
1315
2001
|
required,
|
|
1316
2002
|
children: [
|
|
1317
|
-
/* @__PURE__ */
|
|
2003
|
+
/* @__PURE__ */ jsx26(SelectPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs16(
|
|
1318
2004
|
"button",
|
|
1319
2005
|
{
|
|
1320
2006
|
type: "button",
|
|
@@ -1334,30 +2020,31 @@ var Select = (props) => {
|
|
|
1334
2020
|
"data-open": isOpen || void 0,
|
|
1335
2021
|
...buttonProps,
|
|
1336
2022
|
children: [
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ jsx26(SelectPrimitive.Value, { placeholder }),
|
|
2024
|
+
/* @__PURE__ */ jsx26(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx26(
|
|
1339
2025
|
"span",
|
|
1340
2026
|
{
|
|
1341
2027
|
className: cn(selectIconVariants({ size, disabled: !!disabled })),
|
|
1342
|
-
children: /* @__PURE__ */
|
|
2028
|
+
children: /* @__PURE__ */ jsx26(ChevronDownIcon2, {})
|
|
1343
2029
|
}
|
|
1344
2030
|
) })
|
|
1345
2031
|
]
|
|
1346
2032
|
}
|
|
1347
2033
|
) }),
|
|
1348
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ jsx26(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx26(
|
|
1349
2035
|
SelectPrimitive.Content,
|
|
1350
2036
|
{
|
|
1351
2037
|
position: "popper",
|
|
1352
2038
|
align: "start",
|
|
1353
2039
|
sideOffset: 4,
|
|
1354
2040
|
className: cn(
|
|
1355
|
-
|
|
2041
|
+
dropdownSurfaceClass,
|
|
2042
|
+
dropdownScrollClass,
|
|
1356
2043
|
"min-w-343"
|
|
1357
2044
|
),
|
|
1358
2045
|
style: { minWidth: "var(--radix-select-trigger-width)" },
|
|
1359
|
-
children: /* @__PURE__ */
|
|
1360
|
-
hasValue && /* @__PURE__ */
|
|
2046
|
+
children: /* @__PURE__ */ jsx26(SelectPrimitive.Viewport, { children: /* @__PURE__ */ jsxs16("div", { className: "flex flex-col", children: [
|
|
2047
|
+
hasValue && /* @__PURE__ */ jsx26("div", { className: cn("bg-(--background-neutral)"), children: /* @__PURE__ */ jsx26(
|
|
1361
2048
|
"button",
|
|
1362
2049
|
{
|
|
1363
2050
|
type: "button",
|
|
@@ -1369,16 +2056,16 @@ var Select = (props) => {
|
|
|
1369
2056
|
children: "Clear"
|
|
1370
2057
|
}
|
|
1371
2058
|
) }),
|
|
1372
|
-
options.map((opt) => /* @__PURE__ */
|
|
2059
|
+
options.map((opt) => /* @__PURE__ */ jsx26(
|
|
1373
2060
|
SelectPrimitive.Item,
|
|
1374
2061
|
{
|
|
1375
2062
|
value: opt.value,
|
|
1376
2063
|
className: cn(
|
|
1377
|
-
"bg-(--background-neutral)
|
|
1378
|
-
"data-highlighted:bg-(--background-secondary) data-highlighted:
|
|
2064
|
+
"bg-(--background-neutral)",
|
|
2065
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1379
2066
|
"data-[state=checked]:bg-(--background-secondary)"
|
|
1380
2067
|
),
|
|
1381
|
-
children: /* @__PURE__ */
|
|
2068
|
+
children: /* @__PURE__ */ jsx26("div", { className: selectButtonVariants({ size }), children: /* @__PURE__ */ jsx26(SelectPrimitive.ItemText, { children: opt.label }) })
|
|
1382
2069
|
},
|
|
1383
2070
|
opt.value
|
|
1384
2071
|
))
|
|
@@ -1394,86 +2081,11 @@ var Select = (props) => {
|
|
|
1394
2081
|
Select.displayName = "Select";
|
|
1395
2082
|
|
|
1396
2083
|
// src/components/Inputs/PasswordInput.tsx
|
|
1397
|
-
import * as
|
|
1398
|
-
import { cva as
|
|
1399
|
-
|
|
1400
|
-
// src/components/ui/input.tsx
|
|
1401
|
-
import * as React19 from "react";
|
|
1402
|
-
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1403
|
-
var Input = React19.forwardRef(
|
|
1404
|
-
({ className, type, variant = "default", ...props }, ref) => {
|
|
1405
|
-
const base = "text-primary placeholder:text-(--color-secondary) disabled:text-primary-disabled disabled:placeholder:text-primary-disabled selection:bg-primary selection:text-primary-foreground file:text-foreground";
|
|
1406
|
-
const defaultStyles = "dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:border-ring focus-visible:ring-0 focus-visible:shadow-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive";
|
|
1407
|
-
const bareStyles = "bg-transparent outline-none w-full";
|
|
1408
|
-
return /* @__PURE__ */ jsx21(
|
|
1409
|
-
"input",
|
|
1410
|
-
{
|
|
1411
|
-
ref,
|
|
1412
|
-
type,
|
|
1413
|
-
"data-slot": "input",
|
|
1414
|
-
className: cn(
|
|
1415
|
-
base,
|
|
1416
|
-
variant === "default" ? defaultStyles : bareStyles,
|
|
1417
|
-
className
|
|
1418
|
-
),
|
|
1419
|
-
...props
|
|
1420
|
-
}
|
|
1421
|
-
);
|
|
1422
|
-
}
|
|
1423
|
-
);
|
|
1424
|
-
Input.displayName = "Input";
|
|
1425
|
-
|
|
1426
|
-
// src/components/Inputs/InputShell.tsx
|
|
1427
|
-
import * as React20 from "react";
|
|
1428
|
-
import { cva as cva13 } from "class-variance-authority";
|
|
1429
|
-
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1430
|
-
var inputShellVariants = cva13(
|
|
1431
|
-
"group flex w-full items-center rounded-4 border bg-(--background-primary) text-left cursor-text border-(--border-secondary)",
|
|
1432
|
-
{
|
|
1433
|
-
variants: {
|
|
1434
|
-
size: {
|
|
1435
|
-
sm: "gap-2 px-2 py-1 h-8",
|
|
1436
|
-
md: "gap-2 px-2 py-2 h-10",
|
|
1437
|
-
lg: "gap-2 px-2 py-2 h-11",
|
|
1438
|
-
xl: "gap-2 px-[10px] py-2 h-14"
|
|
1439
|
-
},
|
|
1440
|
-
status: {
|
|
1441
|
-
default: "input-default",
|
|
1442
|
-
success: "input-success",
|
|
1443
|
-
error: "input-error"
|
|
1444
|
-
},
|
|
1445
|
-
disabled: {
|
|
1446
|
-
true: "bg-(--background-primary-disabled) border-(--border-secondary-disabled) text-primary-disabled cursor-default"
|
|
1447
|
-
}
|
|
1448
|
-
},
|
|
1449
|
-
defaultVariants: {
|
|
1450
|
-
size: "lg",
|
|
1451
|
-
status: "default"
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
);
|
|
1455
|
-
var InputShell = React20.forwardRef(
|
|
1456
|
-
({ size, status, disabled, className, ...rest }, ref) => {
|
|
1457
|
-
return /* @__PURE__ */ jsx22(
|
|
1458
|
-
"div",
|
|
1459
|
-
{
|
|
1460
|
-
ref,
|
|
1461
|
-
"aria-disabled": disabled || void 0,
|
|
1462
|
-
className: cn(
|
|
1463
|
-
inputShellVariants({ size, status, disabled }),
|
|
1464
|
-
className
|
|
1465
|
-
),
|
|
1466
|
-
...rest
|
|
1467
|
-
}
|
|
1468
|
-
);
|
|
1469
|
-
}
|
|
1470
|
-
);
|
|
1471
|
-
InputShell.displayName = "InputShell";
|
|
1472
|
-
|
|
1473
|
-
// src/components/Inputs/PasswordInput.tsx
|
|
2084
|
+
import * as React25 from "react";
|
|
2085
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
1474
2086
|
import { EyeIcon, EyeSlashIcon } from "@bubo-squared/icons";
|
|
1475
|
-
import { jsx as
|
|
1476
|
-
var passwordTextVariants =
|
|
2087
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2088
|
+
var passwordTextVariants = cva16("truncate", {
|
|
1477
2089
|
variants: {
|
|
1478
2090
|
size: {
|
|
1479
2091
|
sm: "paragraph-md",
|
|
@@ -1491,7 +2103,7 @@ var passwordTextVariants = cva14("truncate", {
|
|
|
1491
2103
|
disabled: false
|
|
1492
2104
|
}
|
|
1493
2105
|
});
|
|
1494
|
-
var
|
|
2106
|
+
var iconWrapperVariants2 = cva16(
|
|
1495
2107
|
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
1496
2108
|
{
|
|
1497
2109
|
variants: {
|
|
@@ -1510,7 +2122,7 @@ var iconWrapperVariants = cva14(
|
|
|
1510
2122
|
}
|
|
1511
2123
|
}
|
|
1512
2124
|
);
|
|
1513
|
-
var actionButtonVariants =
|
|
2125
|
+
var actionButtonVariants = cva16(
|
|
1514
2126
|
"flex items-center justify-center shrink-0 cursor-pointer bg-transparent border-0 p-0 text-left paragraph-sm text-(--icon-primary) hover:text-(--icon-primary-hover) focus:outline-none ",
|
|
1515
2127
|
{
|
|
1516
2128
|
variants: {
|
|
@@ -1547,12 +2159,12 @@ var PasswordInput = (props) => {
|
|
|
1547
2159
|
...inputProps
|
|
1548
2160
|
} = props;
|
|
1549
2161
|
const isControlled = value !== void 0;
|
|
1550
|
-
const [internalValue, setInternalValue] =
|
|
2162
|
+
const [internalValue, setInternalValue] = React25.useState(
|
|
1551
2163
|
defaultValue ?? ""
|
|
1552
2164
|
);
|
|
1553
|
-
const [isRevealed, setIsRevealed] =
|
|
2165
|
+
const [isRevealed, setIsRevealed] = React25.useState(false);
|
|
1554
2166
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
1555
|
-
const inputRef =
|
|
2167
|
+
const inputRef = React25.useRef(null);
|
|
1556
2168
|
const showLeadingIcon = !!leadingIcon;
|
|
1557
2169
|
const handleContainerClick = () => {
|
|
1558
2170
|
if (disabled) return;
|
|
@@ -1564,7 +2176,7 @@ var PasswordInput = (props) => {
|
|
|
1564
2176
|
}
|
|
1565
2177
|
onChange?.(event);
|
|
1566
2178
|
};
|
|
1567
|
-
return /* @__PURE__ */
|
|
2179
|
+
return /* @__PURE__ */ jsx27(
|
|
1568
2180
|
Field,
|
|
1569
2181
|
{
|
|
1570
2182
|
label,
|
|
@@ -1572,7 +2184,7 @@ var PasswordInput = (props) => {
|
|
|
1572
2184
|
hideHint,
|
|
1573
2185
|
status,
|
|
1574
2186
|
disabled,
|
|
1575
|
-
children: /* @__PURE__ */
|
|
2187
|
+
children: /* @__PURE__ */ jsxs17(
|
|
1576
2188
|
InputShell,
|
|
1577
2189
|
{
|
|
1578
2190
|
size,
|
|
@@ -1581,16 +2193,16 @@ var PasswordInput = (props) => {
|
|
|
1581
2193
|
className,
|
|
1582
2194
|
onClick: handleContainerClick,
|
|
1583
2195
|
children: [
|
|
1584
|
-
showLeadingIcon && /* @__PURE__ */
|
|
2196
|
+
showLeadingIcon && /* @__PURE__ */ jsx27(
|
|
1585
2197
|
"span",
|
|
1586
2198
|
{
|
|
1587
2199
|
className: cn(
|
|
1588
|
-
|
|
2200
|
+
iconWrapperVariants2({ size, disabled: !!disabled })
|
|
1589
2201
|
),
|
|
1590
2202
|
children: leadingIcon
|
|
1591
2203
|
}
|
|
1592
2204
|
),
|
|
1593
|
-
/* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ jsx27(
|
|
1594
2206
|
Input,
|
|
1595
2207
|
{
|
|
1596
2208
|
ref: inputRef,
|
|
@@ -1605,7 +2217,7 @@ var PasswordInput = (props) => {
|
|
|
1605
2217
|
...inputProps
|
|
1606
2218
|
}
|
|
1607
2219
|
),
|
|
1608
|
-
/* @__PURE__ */
|
|
2220
|
+
/* @__PURE__ */ jsx27(
|
|
1609
2221
|
"button",
|
|
1610
2222
|
{
|
|
1611
2223
|
type: "button",
|
|
@@ -1618,9 +2230,9 @@ var PasswordInput = (props) => {
|
|
|
1618
2230
|
"aria-label": isRevealed ? "Hide password" : "Show password",
|
|
1619
2231
|
className: cn(
|
|
1620
2232
|
"cursor-pointer",
|
|
1621
|
-
variant === "text" ? actionButtonVariants({ size, disabled: !!disabled }) :
|
|
2233
|
+
variant === "text" ? actionButtonVariants({ size, disabled: !!disabled }) : iconWrapperVariants2({ size, disabled: !!disabled })
|
|
1622
2234
|
),
|
|
1623
|
-
children: variant === "icon" ? isRevealed ? /* @__PURE__ */
|
|
2235
|
+
children: variant === "icon" ? isRevealed ? /* @__PURE__ */ jsx27(EyeSlashIcon, {}) : /* @__PURE__ */ jsx27(EyeIcon, {}) : isRevealed ? "Hide" : "Show"
|
|
1624
2236
|
}
|
|
1625
2237
|
)
|
|
1626
2238
|
]
|
|
@@ -1632,7 +2244,7 @@ var PasswordInput = (props) => {
|
|
|
1632
2244
|
PasswordInput.displayName = "PasswordInput";
|
|
1633
2245
|
|
|
1634
2246
|
// src/components/Inputs/PhoneInput.tsx
|
|
1635
|
-
import * as
|
|
2247
|
+
import * as React31 from "react";
|
|
1636
2248
|
import { CheckIcon as CheckIcon3, CodeIcon } from "@bubo-squared/icons";
|
|
1637
2249
|
import * as RPNInput from "react-phone-number-input";
|
|
1638
2250
|
import flags from "react-phone-number-input/flags";
|
|
@@ -1640,9 +2252,9 @@ import flags from "react-phone-number-input/flags";
|
|
|
1640
2252
|
// src/components/ui/button.tsx
|
|
1641
2253
|
import "react";
|
|
1642
2254
|
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
1643
|
-
import { cva as
|
|
1644
|
-
import { jsx as
|
|
1645
|
-
var buttonVariants2 =
|
|
2255
|
+
import { cva as cva17 } from "class-variance-authority";
|
|
2256
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2257
|
+
var buttonVariants2 = cva17(
|
|
1646
2258
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-0 focus-visible:shadow-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
1647
2259
|
{
|
|
1648
2260
|
variants: {
|
|
@@ -1677,7 +2289,7 @@ function Button2({
|
|
|
1677
2289
|
...props
|
|
1678
2290
|
}) {
|
|
1679
2291
|
const Comp = asChild ? Slot7 : "button";
|
|
1680
|
-
return /* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ jsx28(
|
|
1681
2293
|
Comp,
|
|
1682
2294
|
{
|
|
1683
2295
|
"data-slot": "button",
|
|
@@ -1699,7 +2311,7 @@ import "react";
|
|
|
1699
2311
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1700
2312
|
|
|
1701
2313
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1702
|
-
import { forwardRef as
|
|
2314
|
+
import { forwardRef as forwardRef15, createElement as createElement2 } from "react";
|
|
1703
2315
|
|
|
1704
2316
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
1705
2317
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -1723,7 +2335,7 @@ var hasA11yProp = (props) => {
|
|
|
1723
2335
|
};
|
|
1724
2336
|
|
|
1725
2337
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
1726
|
-
import { forwardRef as
|
|
2338
|
+
import { forwardRef as forwardRef14, createElement } from "react";
|
|
1727
2339
|
|
|
1728
2340
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
1729
2341
|
var defaultAttributes = {
|
|
@@ -1739,7 +2351,7 @@ var defaultAttributes = {
|
|
|
1739
2351
|
};
|
|
1740
2352
|
|
|
1741
2353
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
1742
|
-
var Icon2 =
|
|
2354
|
+
var Icon2 = forwardRef14(
|
|
1743
2355
|
({
|
|
1744
2356
|
color = "currentColor",
|
|
1745
2357
|
size = 24,
|
|
@@ -1771,7 +2383,7 @@ var Icon2 = forwardRef13(
|
|
|
1771
2383
|
|
|
1772
2384
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1773
2385
|
var createLucideIcon = (iconName, iconNode) => {
|
|
1774
|
-
const Component =
|
|
2386
|
+
const Component = forwardRef15(
|
|
1775
2387
|
({ className, ...props }, ref) => createElement2(Icon2, {
|
|
1776
2388
|
ref,
|
|
1777
2389
|
iconNode,
|
|
@@ -1800,15 +2412,15 @@ var __iconNode2 = [
|
|
|
1800
2412
|
var Ellipsis = createLucideIcon("ellipsis", __iconNode2);
|
|
1801
2413
|
|
|
1802
2414
|
// src/components/ui/dialog.tsx
|
|
1803
|
-
import { jsx as
|
|
2415
|
+
import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1804
2416
|
|
|
1805
2417
|
// src/components/ui/command.tsx
|
|
1806
|
-
import { jsx as
|
|
2418
|
+
import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1807
2419
|
function Command({
|
|
1808
2420
|
className,
|
|
1809
2421
|
...props
|
|
1810
2422
|
}) {
|
|
1811
|
-
return /* @__PURE__ */
|
|
2423
|
+
return /* @__PURE__ */ jsx30(
|
|
1812
2424
|
CommandPrimitive,
|
|
1813
2425
|
{
|
|
1814
2426
|
"data-slot": "command",
|
|
@@ -1824,14 +2436,14 @@ function CommandInput({
|
|
|
1824
2436
|
className,
|
|
1825
2437
|
...props
|
|
1826
2438
|
}) {
|
|
1827
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ jsxs19(
|
|
1828
2440
|
"div",
|
|
1829
2441
|
{
|
|
1830
2442
|
"data-slot": "command-input-wrapper",
|
|
1831
2443
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1832
2444
|
children: [
|
|
1833
|
-
/* @__PURE__ */
|
|
1834
|
-
/* @__PURE__ */
|
|
2445
|
+
/* @__PURE__ */ jsx30(SearchIcon, { className: "size-4 shrink-0 opacity-50 text-(--color-secondary)" }),
|
|
2446
|
+
/* @__PURE__ */ jsx30(
|
|
1835
2447
|
CommandPrimitive.Input,
|
|
1836
2448
|
{
|
|
1837
2449
|
"data-slot": "command-input",
|
|
@@ -1850,7 +2462,7 @@ function CommandList({
|
|
|
1850
2462
|
className,
|
|
1851
2463
|
...props
|
|
1852
2464
|
}) {
|
|
1853
|
-
return /* @__PURE__ */
|
|
2465
|
+
return /* @__PURE__ */ jsx30(
|
|
1854
2466
|
CommandPrimitive.List,
|
|
1855
2467
|
{
|
|
1856
2468
|
"data-slot": "command-list",
|
|
@@ -1865,7 +2477,7 @@ function CommandList({
|
|
|
1865
2477
|
function CommandEmpty({
|
|
1866
2478
|
...props
|
|
1867
2479
|
}) {
|
|
1868
|
-
return /* @__PURE__ */
|
|
2480
|
+
return /* @__PURE__ */ jsx30(
|
|
1869
2481
|
CommandPrimitive.Empty,
|
|
1870
2482
|
{
|
|
1871
2483
|
"data-slot": "command-empty",
|
|
@@ -1878,7 +2490,7 @@ function CommandGroup({
|
|
|
1878
2490
|
className,
|
|
1879
2491
|
...props
|
|
1880
2492
|
}) {
|
|
1881
|
-
return /* @__PURE__ */
|
|
2493
|
+
return /* @__PURE__ */ jsx30(
|
|
1882
2494
|
CommandPrimitive.Group,
|
|
1883
2495
|
{
|
|
1884
2496
|
"data-slot": "command-group",
|
|
@@ -1894,7 +2506,7 @@ function CommandItem({
|
|
|
1894
2506
|
className,
|
|
1895
2507
|
...props
|
|
1896
2508
|
}) {
|
|
1897
|
-
return /* @__PURE__ */
|
|
2509
|
+
return /* @__PURE__ */ jsx30(
|
|
1898
2510
|
CommandPrimitive.Item,
|
|
1899
2511
|
{
|
|
1900
2512
|
"data-slot": "command-item",
|
|
@@ -1910,16 +2522,16 @@ function CommandItem({
|
|
|
1910
2522
|
// src/components/ui/popover.tsx
|
|
1911
2523
|
import "react";
|
|
1912
2524
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1913
|
-
import { jsx as
|
|
2525
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1914
2526
|
function Popover({
|
|
1915
2527
|
...props
|
|
1916
2528
|
}) {
|
|
1917
|
-
return /* @__PURE__ */
|
|
2529
|
+
return /* @__PURE__ */ jsx31(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1918
2530
|
}
|
|
1919
2531
|
function PopoverTrigger({
|
|
1920
2532
|
...props
|
|
1921
2533
|
}) {
|
|
1922
|
-
return /* @__PURE__ */
|
|
2534
|
+
return /* @__PURE__ */ jsx31(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1923
2535
|
}
|
|
1924
2536
|
function PopoverContent({
|
|
1925
2537
|
className,
|
|
@@ -1927,7 +2539,7 @@ function PopoverContent({
|
|
|
1927
2539
|
sideOffset = 4,
|
|
1928
2540
|
...props
|
|
1929
2541
|
}) {
|
|
1930
|
-
return /* @__PURE__ */
|
|
2542
|
+
return /* @__PURE__ */ jsx31(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx31(
|
|
1931
2543
|
PopoverPrimitive.Content,
|
|
1932
2544
|
{
|
|
1933
2545
|
"data-slot": "popover-content",
|
|
@@ -1945,20 +2557,20 @@ function PopoverContent({
|
|
|
1945
2557
|
// src/components/ui/scroll-area.tsx
|
|
1946
2558
|
import "react";
|
|
1947
2559
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
1948
|
-
import { jsx as
|
|
2560
|
+
import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1949
2561
|
function ScrollArea({
|
|
1950
2562
|
className,
|
|
1951
2563
|
children,
|
|
1952
2564
|
...props
|
|
1953
2565
|
}) {
|
|
1954
|
-
return /* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ jsxs20(
|
|
1955
2567
|
ScrollAreaPrimitive.Root,
|
|
1956
2568
|
{
|
|
1957
2569
|
"data-slot": "scroll-area",
|
|
1958
2570
|
className: cn("relative", className),
|
|
1959
2571
|
...props,
|
|
1960
2572
|
children: [
|
|
1961
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ jsx32(
|
|
1962
2574
|
ScrollAreaPrimitive.Viewport,
|
|
1963
2575
|
{
|
|
1964
2576
|
"data-slot": "scroll-area-viewport",
|
|
@@ -1966,8 +2578,8 @@ function ScrollArea({
|
|
|
1966
2578
|
children
|
|
1967
2579
|
}
|
|
1968
2580
|
),
|
|
1969
|
-
/* @__PURE__ */
|
|
1970
|
-
/* @__PURE__ */
|
|
2581
|
+
/* @__PURE__ */ jsx32(ScrollBar, {}),
|
|
2582
|
+
/* @__PURE__ */ jsx32(ScrollAreaPrimitive.Corner, {})
|
|
1971
2583
|
]
|
|
1972
2584
|
}
|
|
1973
2585
|
);
|
|
@@ -1977,7 +2589,7 @@ function ScrollBar({
|
|
|
1977
2589
|
orientation = "vertical",
|
|
1978
2590
|
...props
|
|
1979
2591
|
}) {
|
|
1980
|
-
return /* @__PURE__ */
|
|
2592
|
+
return /* @__PURE__ */ jsx32(
|
|
1981
2593
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1982
2594
|
{
|
|
1983
2595
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -1990,7 +2602,7 @@ function ScrollBar({
|
|
|
1990
2602
|
className
|
|
1991
2603
|
),
|
|
1992
2604
|
...props,
|
|
1993
|
-
children: /* @__PURE__ */
|
|
2605
|
+
children: /* @__PURE__ */ jsx32(
|
|
1994
2606
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
1995
2607
|
{
|
|
1996
2608
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2002,10 +2614,10 @@ function ScrollBar({
|
|
|
2002
2614
|
}
|
|
2003
2615
|
|
|
2004
2616
|
// src/components/Inputs/PhoneInput.tsx
|
|
2005
|
-
import { cva as
|
|
2006
|
-
import { jsx as
|
|
2617
|
+
import { cva as cva18 } from "class-variance-authority";
|
|
2618
|
+
import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2007
2619
|
var inputBase = "h-full rounded-4 border-(--border-secondary) bg-(--background-primary) hover:border-(--border-secondary-hover)";
|
|
2008
|
-
var sizeBase =
|
|
2620
|
+
var sizeBase = cva18(
|
|
2009
2621
|
"flex w-full",
|
|
2010
2622
|
{
|
|
2011
2623
|
variants: {
|
|
@@ -2018,7 +2630,7 @@ var sizeBase = cva16(
|
|
|
2018
2630
|
}
|
|
2019
2631
|
}
|
|
2020
2632
|
);
|
|
2021
|
-
var
|
|
2633
|
+
var inputTextVariants2 = cva18("", {
|
|
2022
2634
|
variants: {
|
|
2023
2635
|
size: {
|
|
2024
2636
|
sm: "paragraph-md",
|
|
@@ -2034,12 +2646,41 @@ var inputTextVariants = cva16("", {
|
|
|
2034
2646
|
size: "lg"
|
|
2035
2647
|
}
|
|
2036
2648
|
});
|
|
2649
|
+
var dropdownWidthVariants = cva18("", {
|
|
2650
|
+
variants: {
|
|
2651
|
+
size: {
|
|
2652
|
+
sm: "min-w-70",
|
|
2653
|
+
md: "min-w-72",
|
|
2654
|
+
lg: "min-w-80",
|
|
2655
|
+
xl: "min-w-96"
|
|
2656
|
+
}
|
|
2657
|
+
},
|
|
2658
|
+
defaultVariants: {
|
|
2659
|
+
size: "lg"
|
|
2660
|
+
}
|
|
2661
|
+
});
|
|
2037
2662
|
var wrapperStatusClass = {
|
|
2038
2663
|
default: "input-default-nested",
|
|
2039
2664
|
success: "input-success-nested",
|
|
2040
2665
|
error: "input-error-nested"
|
|
2041
2666
|
};
|
|
2042
|
-
var
|
|
2667
|
+
var countryOptionVariants = cva18(
|
|
2668
|
+
"gap-2 pl-(--space-8) pr-(--space-16) text-left text-primary cursor-pointer hover:bg-(--background-secondary) data-[selected=true]:bg-(--background-secondary) data-[selected=true]:text-primary",
|
|
2669
|
+
{
|
|
2670
|
+
variants: {
|
|
2671
|
+
size: {
|
|
2672
|
+
sm: "paragraph-sm py-(--space-4)",
|
|
2673
|
+
md: "paragraph-md py-(--space-6)",
|
|
2674
|
+
lg: "paragraph-lg py-(--space-8)",
|
|
2675
|
+
xl: "subtitle py-(--space-10)"
|
|
2676
|
+
}
|
|
2677
|
+
},
|
|
2678
|
+
defaultVariants: {
|
|
2679
|
+
size: "lg"
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
);
|
|
2683
|
+
var PhoneInput = React31.forwardRef(
|
|
2043
2684
|
(props, ref) => {
|
|
2044
2685
|
const {
|
|
2045
2686
|
className,
|
|
@@ -2054,7 +2695,7 @@ var PhoneInput = React27.forwardRef(
|
|
|
2054
2695
|
status = "default",
|
|
2055
2696
|
...rest
|
|
2056
2697
|
} = props;
|
|
2057
|
-
return /* @__PURE__ */
|
|
2698
|
+
return /* @__PURE__ */ jsx33(
|
|
2058
2699
|
Field,
|
|
2059
2700
|
{
|
|
2060
2701
|
label,
|
|
@@ -2063,16 +2704,16 @@ var PhoneInput = React27.forwardRef(
|
|
|
2063
2704
|
status,
|
|
2064
2705
|
disabled,
|
|
2065
2706
|
className,
|
|
2066
|
-
children: /* @__PURE__ */
|
|
2707
|
+
children: /* @__PURE__ */ jsx33("div", { className: cn("w-full", wrapperStatusClass[status]), children: /* @__PURE__ */ jsx33(
|
|
2067
2708
|
RPNInput.default,
|
|
2068
2709
|
{
|
|
2069
2710
|
ref,
|
|
2070
2711
|
className: cn(
|
|
2071
2712
|
sizeBase({ size }),
|
|
2072
|
-
|
|
2713
|
+
inputTextVariants2({ size, disabled })
|
|
2073
2714
|
),
|
|
2074
2715
|
flagComponent: FlagComponent,
|
|
2075
|
-
countrySelectComponent: CountrySelect,
|
|
2716
|
+
countrySelectComponent: (countrySelectProps) => /* @__PURE__ */ jsx33(CountrySelect, { ...countrySelectProps, size }),
|
|
2076
2717
|
inputComponent: InputComponent,
|
|
2077
2718
|
smartCaret: false,
|
|
2078
2719
|
value: value || void 0,
|
|
@@ -2089,9 +2730,9 @@ var PhoneInput = React27.forwardRef(
|
|
|
2089
2730
|
}
|
|
2090
2731
|
);
|
|
2091
2732
|
PhoneInput.displayName = "PhoneInput";
|
|
2092
|
-
var InputComponent =
|
|
2733
|
+
var InputComponent = React31.forwardRef((props, ref) => {
|
|
2093
2734
|
const { className, ...rest } = props;
|
|
2094
|
-
return /* @__PURE__ */
|
|
2735
|
+
return /* @__PURE__ */ jsx33(
|
|
2095
2736
|
Input,
|
|
2096
2737
|
{
|
|
2097
2738
|
ref,
|
|
@@ -2106,12 +2747,13 @@ var CountrySelect = ({
|
|
|
2106
2747
|
disabled,
|
|
2107
2748
|
value: selectedCountry,
|
|
2108
2749
|
options: countryList,
|
|
2109
|
-
onChange
|
|
2750
|
+
onChange,
|
|
2751
|
+
size = "lg"
|
|
2110
2752
|
}) => {
|
|
2111
|
-
const scrollAreaRef =
|
|
2112
|
-
const [searchValue, setSearchValue] =
|
|
2113
|
-
const [isOpen, setIsOpen] =
|
|
2114
|
-
return /* @__PURE__ */
|
|
2753
|
+
const scrollAreaRef = React31.useRef(null);
|
|
2754
|
+
const [searchValue, setSearchValue] = React31.useState("");
|
|
2755
|
+
const [isOpen, setIsOpen] = React31.useState(false);
|
|
2756
|
+
return /* @__PURE__ */ jsxs21(
|
|
2115
2757
|
Popover,
|
|
2116
2758
|
{
|
|
2117
2759
|
open: isOpen,
|
|
@@ -2123,7 +2765,7 @@ var CountrySelect = ({
|
|
|
2123
2765
|
}
|
|
2124
2766
|
},
|
|
2125
2767
|
children: [
|
|
2126
|
-
/* @__PURE__ */
|
|
2768
|
+
/* @__PURE__ */ jsx33(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs21(
|
|
2127
2769
|
Button2,
|
|
2128
2770
|
{
|
|
2129
2771
|
type: "button",
|
|
@@ -2131,14 +2773,14 @@ var CountrySelect = ({
|
|
|
2131
2773
|
className: cn(inputBase, "flex gap-1 rounded-4 px-3 focus:z-10 mr-(--space-12) text-primary-disabled hover:text-(--color-primary-hover) focus:text-(--color-primary-focus)"),
|
|
2132
2774
|
disabled,
|
|
2133
2775
|
children: [
|
|
2134
|
-
/* @__PURE__ */
|
|
2776
|
+
/* @__PURE__ */ jsx33(
|
|
2135
2777
|
FlagComponent,
|
|
2136
2778
|
{
|
|
2137
2779
|
country: selectedCountry,
|
|
2138
2780
|
countryName: selectedCountry
|
|
2139
2781
|
}
|
|
2140
2782
|
),
|
|
2141
|
-
/* @__PURE__ */
|
|
2783
|
+
/* @__PURE__ */ jsx33(
|
|
2142
2784
|
CodeIcon,
|
|
2143
2785
|
{
|
|
2144
2786
|
className: cn(
|
|
@@ -2150,13 +2792,17 @@ var CountrySelect = ({
|
|
|
2150
2792
|
]
|
|
2151
2793
|
}
|
|
2152
2794
|
) }),
|
|
2153
|
-
/* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ jsx33(
|
|
2154
2796
|
PopoverContent,
|
|
2155
2797
|
{
|
|
2156
2798
|
align: "start",
|
|
2157
|
-
className:
|
|
2158
|
-
|
|
2159
|
-
|
|
2799
|
+
className: cn(
|
|
2800
|
+
"p-0 **:data-[slot='command-input-wrapper']:border-b-(--border-secondary)",
|
|
2801
|
+
dropdownWidthVariants({ size }),
|
|
2802
|
+
dropdownSurfaceClass
|
|
2803
|
+
),
|
|
2804
|
+
children: /* @__PURE__ */ jsxs21(Command, { className: "bg-transparent", children: [
|
|
2805
|
+
/* @__PURE__ */ jsx33(
|
|
2160
2806
|
CommandInput,
|
|
2161
2807
|
{
|
|
2162
2808
|
value: searchValue,
|
|
@@ -2176,17 +2822,18 @@ var CountrySelect = ({
|
|
|
2176
2822
|
placeholder: "Search country..."
|
|
2177
2823
|
}
|
|
2178
2824
|
),
|
|
2179
|
-
/* @__PURE__ */
|
|
2180
|
-
/* @__PURE__ */
|
|
2181
|
-
/* @__PURE__ */
|
|
2182
|
-
({ value, label }) => value ? /* @__PURE__ */
|
|
2825
|
+
/* @__PURE__ */ jsx33(CommandList, { children: /* @__PURE__ */ jsxs21(ScrollArea, { ref: scrollAreaRef, className: "max-h-79", children: [
|
|
2826
|
+
/* @__PURE__ */ jsx33(CommandEmpty, { children: "No country found." }),
|
|
2827
|
+
/* @__PURE__ */ jsx33(CommandGroup, { className: "p-0", children: countryList.map(
|
|
2828
|
+
({ value, label }) => value ? /* @__PURE__ */ jsx33(
|
|
2183
2829
|
CountrySelectOption,
|
|
2184
2830
|
{
|
|
2185
2831
|
country: value,
|
|
2186
2832
|
countryName: label,
|
|
2187
2833
|
selectedCountry,
|
|
2188
2834
|
onChange,
|
|
2189
|
-
onSelectComplete: () => setIsOpen(false)
|
|
2835
|
+
onSelectComplete: () => setIsOpen(false),
|
|
2836
|
+
size
|
|
2190
2837
|
},
|
|
2191
2838
|
value
|
|
2192
2839
|
) : null
|
|
@@ -2205,22 +2852,23 @@ var CountrySelectOption = (props) => {
|
|
|
2205
2852
|
countryName,
|
|
2206
2853
|
selectedCountry,
|
|
2207
2854
|
onChange,
|
|
2208
|
-
onSelectComplete
|
|
2855
|
+
onSelectComplete,
|
|
2856
|
+
size = "lg"
|
|
2209
2857
|
} = props;
|
|
2210
2858
|
const handleSelect = () => {
|
|
2211
2859
|
onChange(country);
|
|
2212
2860
|
onSelectComplete();
|
|
2213
2861
|
};
|
|
2214
|
-
return /* @__PURE__ */
|
|
2862
|
+
return /* @__PURE__ */ jsxs21(
|
|
2215
2863
|
CommandItem,
|
|
2216
2864
|
{
|
|
2217
|
-
className:
|
|
2865
|
+
className: cn(countryOptionVariants({ size })),
|
|
2218
2866
|
onSelect: handleSelect,
|
|
2219
2867
|
children: [
|
|
2220
|
-
/* @__PURE__ */
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */
|
|
2868
|
+
/* @__PURE__ */ jsx33(FlagComponent, { country, countryName }),
|
|
2869
|
+
/* @__PURE__ */ jsx33("span", { className: "flex-1", children: countryName }),
|
|
2870
|
+
/* @__PURE__ */ jsx33("span", { className: "text-foreground/50", children: `+${RPNInput.getCountryCallingCode(country)}` }),
|
|
2871
|
+
/* @__PURE__ */ jsx33(
|
|
2224
2872
|
CheckIcon3,
|
|
2225
2873
|
{
|
|
2226
2874
|
className: `ml-auto size-4 ${country === selectedCountry ? "opacity-100" : "opacity-0"}`
|
|
@@ -2232,13 +2880,13 @@ var CountrySelectOption = (props) => {
|
|
|
2232
2880
|
};
|
|
2233
2881
|
var FlagComponent = ({ country, countryName }) => {
|
|
2234
2882
|
const Flag = flags[country];
|
|
2235
|
-
return /* @__PURE__ */
|
|
2883
|
+
return /* @__PURE__ */ jsx33("span", { className: "flex h-4 w-6 overflow-hidden rounded-2 bg-foreground/20 [&_svg:not([class*='size-'])]:size-full", children: Flag && /* @__PURE__ */ jsx33(Flag, { title: countryName }) });
|
|
2236
2884
|
};
|
|
2237
2885
|
|
|
2238
2886
|
// src/components/Inputs/RadioGroup.tsx
|
|
2239
|
-
import * as
|
|
2887
|
+
import * as React32 from "react";
|
|
2240
2888
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2241
|
-
import { jsx as
|
|
2889
|
+
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2242
2890
|
var RadioGroup = ({
|
|
2243
2891
|
label,
|
|
2244
2892
|
hint,
|
|
@@ -2252,20 +2900,20 @@ var RadioGroup = ({
|
|
|
2252
2900
|
className,
|
|
2253
2901
|
...rootProps
|
|
2254
2902
|
}) => {
|
|
2255
|
-
const groupId =
|
|
2903
|
+
const groupId = React32.useId();
|
|
2256
2904
|
const hintId = hint ? `${groupId}-hint` : void 0;
|
|
2257
2905
|
const handleValueChange = (next) => {
|
|
2258
2906
|
onValueChange?.(next);
|
|
2259
2907
|
};
|
|
2260
2908
|
const isHorizontal = orientation === "horizontal";
|
|
2261
|
-
return /* @__PURE__ */
|
|
2909
|
+
return /* @__PURE__ */ jsx34(
|
|
2262
2910
|
Field,
|
|
2263
2911
|
{
|
|
2264
2912
|
label,
|
|
2265
2913
|
hint,
|
|
2266
2914
|
hideHint,
|
|
2267
2915
|
disabled,
|
|
2268
|
-
children: /* @__PURE__ */
|
|
2916
|
+
children: /* @__PURE__ */ jsx34(
|
|
2269
2917
|
RadioGroupPrimitive.Root,
|
|
2270
2918
|
{
|
|
2271
2919
|
...rootProps,
|
|
@@ -2279,7 +2927,7 @@ var RadioGroup = ({
|
|
|
2279
2927
|
isHorizontal ? "flex-row gap-6" : "flex-col gap-2",
|
|
2280
2928
|
className
|
|
2281
2929
|
),
|
|
2282
|
-
children: options.map((option) => /* @__PURE__ */
|
|
2930
|
+
children: options.map((option) => /* @__PURE__ */ jsx34("div", { className: "relative inline-flex", children: /* @__PURE__ */ jsxs22(
|
|
2283
2931
|
RadioGroupPrimitive.Item,
|
|
2284
2932
|
{
|
|
2285
2933
|
value: option.value,
|
|
@@ -2290,7 +2938,7 @@ var RadioGroup = ({
|
|
|
2290
2938
|
disabled || option.disabled ? "cursor-default" : "cursor-pointer"
|
|
2291
2939
|
),
|
|
2292
2940
|
children: [
|
|
2293
|
-
/* @__PURE__ */
|
|
2941
|
+
/* @__PURE__ */ jsx34(
|
|
2294
2942
|
"span",
|
|
2295
2943
|
{
|
|
2296
2944
|
className: cn(
|
|
@@ -2316,7 +2964,7 @@ var RadioGroup = ({
|
|
|
2316
2964
|
"group-[&[data-disabled][data-state=checked]]:border-(--border-primary-disabled)",
|
|
2317
2965
|
"group-[&[data-disabled][data-state=checked]]:bg-(--background-primary-disabled)"
|
|
2318
2966
|
),
|
|
2319
|
-
children: /* @__PURE__ */
|
|
2967
|
+
children: /* @__PURE__ */ jsx34(
|
|
2320
2968
|
"span",
|
|
2321
2969
|
{
|
|
2322
2970
|
className: cn(
|
|
@@ -2331,7 +2979,7 @@ var RadioGroup = ({
|
|
|
2331
2979
|
)
|
|
2332
2980
|
}
|
|
2333
2981
|
),
|
|
2334
|
-
/* @__PURE__ */
|
|
2982
|
+
/* @__PURE__ */ jsx34(
|
|
2335
2983
|
"span",
|
|
2336
2984
|
{
|
|
2337
2985
|
className: cn(
|
|
@@ -2351,11 +2999,11 @@ var RadioGroup = ({
|
|
|
2351
2999
|
};
|
|
2352
3000
|
|
|
2353
3001
|
// src/components/Inputs/SearchInput.tsx
|
|
2354
|
-
import * as
|
|
2355
|
-
import { cva as
|
|
3002
|
+
import * as React33 from "react";
|
|
3003
|
+
import { cva as cva19 } from "class-variance-authority";
|
|
2356
3004
|
import { SearchIcon as SearchIcon2 } from "@bubo-squared/icons";
|
|
2357
|
-
import { jsx as
|
|
2358
|
-
var searchTextVariants =
|
|
3005
|
+
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3006
|
+
var searchTextVariants = cva19("truncate", {
|
|
2359
3007
|
variants: {
|
|
2360
3008
|
size: {
|
|
2361
3009
|
sm: "paragraph-md",
|
|
@@ -2368,7 +3016,7 @@ var searchTextVariants = cva17("truncate", {
|
|
|
2368
3016
|
size: "lg"
|
|
2369
3017
|
}
|
|
2370
3018
|
});
|
|
2371
|
-
var
|
|
3019
|
+
var iconWrapperVariants3 = cva19("flex items-center justify-center shrink-0 text-(--icon-primary)", {
|
|
2372
3020
|
variants: {
|
|
2373
3021
|
size: {
|
|
2374
3022
|
sm: "size-4 [&>svg]:size-4",
|
|
@@ -2395,46 +3043,133 @@ var SearchInput = (props) => {
|
|
|
2395
3043
|
trailingIcon,
|
|
2396
3044
|
...inputProps
|
|
2397
3045
|
} = props;
|
|
2398
|
-
const inputRef =
|
|
2399
|
-
const handleContainerClick = () => {
|
|
2400
|
-
if (disabled) return;
|
|
2401
|
-
inputRef.current?.focus();
|
|
2402
|
-
};
|
|
2403
|
-
const showTrailingIcon = !!trailingIcon;
|
|
2404
|
-
return /* @__PURE__ */
|
|
2405
|
-
InputShell,
|
|
3046
|
+
const inputRef = React33.useRef(null);
|
|
3047
|
+
const handleContainerClick = () => {
|
|
3048
|
+
if (disabled) return;
|
|
3049
|
+
inputRef.current?.focus();
|
|
3050
|
+
};
|
|
3051
|
+
const showTrailingIcon = !!trailingIcon;
|
|
3052
|
+
return /* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-2 items-start w-full", children: /* @__PURE__ */ jsx35("div", { className: "relative w-full", children: /* @__PURE__ */ jsxs23(
|
|
3053
|
+
InputShell,
|
|
3054
|
+
{
|
|
3055
|
+
size,
|
|
3056
|
+
status: "default",
|
|
3057
|
+
disabled,
|
|
3058
|
+
className,
|
|
3059
|
+
onClick: handleContainerClick,
|
|
3060
|
+
children: [
|
|
3061
|
+
showLeadingIcon && /* @__PURE__ */ jsx35("span", { className: cn(iconWrapperVariants3({ size, disabled: !!disabled })), children: leadingIcon ?? /* @__PURE__ */ jsx35(SearchIcon2, {}) }),
|
|
3062
|
+
/* @__PURE__ */ jsx35(
|
|
3063
|
+
Input,
|
|
3064
|
+
{
|
|
3065
|
+
ref: inputRef,
|
|
3066
|
+
type: "search",
|
|
3067
|
+
placeholder,
|
|
3068
|
+
disabled: disabled ?? void 0,
|
|
3069
|
+
variant: "bare",
|
|
3070
|
+
className: cn(
|
|
3071
|
+
searchTextVariants({ size })
|
|
3072
|
+
),
|
|
3073
|
+
...inputProps
|
|
3074
|
+
}
|
|
3075
|
+
),
|
|
3076
|
+
showTrailingIcon && /* @__PURE__ */ jsx35("span", { className: cn("cursor-pointer", iconWrapperVariants3({ size, disabled: !!disabled })), children: trailingIcon })
|
|
3077
|
+
]
|
|
3078
|
+
}
|
|
3079
|
+
) }) });
|
|
3080
|
+
};
|
|
3081
|
+
SearchInput.displayName = "SearchInput";
|
|
3082
|
+
|
|
3083
|
+
// src/components/Inputs/Slider.tsx
|
|
3084
|
+
import * as React35 from "react";
|
|
3085
|
+
|
|
3086
|
+
// src/components/Feedback/Tooltip.tsx
|
|
3087
|
+
import "react";
|
|
3088
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3089
|
+
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3090
|
+
var TooltipArrow = TooltipPrimitive.Arrow;
|
|
3091
|
+
var mapPlacementToSideAndAlign = (placement) => {
|
|
3092
|
+
switch (placement) {
|
|
3093
|
+
case "top":
|
|
3094
|
+
return { side: "top", align: "center" };
|
|
3095
|
+
case "topLeft":
|
|
3096
|
+
return { side: "top", align: "start" };
|
|
3097
|
+
case "topRight":
|
|
3098
|
+
return { side: "top", align: "end" };
|
|
3099
|
+
case "bottom":
|
|
3100
|
+
return { side: "bottom", align: "center" };
|
|
3101
|
+
case "bottomLeft":
|
|
3102
|
+
return { side: "bottom", align: "start" };
|
|
3103
|
+
case "bottomRight":
|
|
3104
|
+
return { side: "bottom", align: "end" };
|
|
3105
|
+
case "left":
|
|
3106
|
+
return { side: "left", align: "center" };
|
|
3107
|
+
case "leftTop":
|
|
3108
|
+
return { side: "left", align: "start" };
|
|
3109
|
+
case "leftBottom":
|
|
3110
|
+
return { side: "left", align: "end" };
|
|
3111
|
+
case "right":
|
|
3112
|
+
return { side: "right", align: "center" };
|
|
3113
|
+
case "rightTop":
|
|
3114
|
+
return { side: "right", align: "start" };
|
|
3115
|
+
case "rightBottom":
|
|
3116
|
+
return { side: "right", align: "end" };
|
|
3117
|
+
default:
|
|
3118
|
+
return { side: "top", align: "center" };
|
|
3119
|
+
}
|
|
3120
|
+
};
|
|
3121
|
+
var Tooltip = (props) => {
|
|
3122
|
+
const {
|
|
3123
|
+
strapline,
|
|
3124
|
+
title,
|
|
3125
|
+
description,
|
|
3126
|
+
showArrow = true,
|
|
3127
|
+
className,
|
|
3128
|
+
placement = "top",
|
|
3129
|
+
offset = 10,
|
|
3130
|
+
disableHoverableContent,
|
|
3131
|
+
open,
|
|
3132
|
+
defaultOpen,
|
|
3133
|
+
onOpenChange,
|
|
3134
|
+
children
|
|
3135
|
+
} = props;
|
|
3136
|
+
const { side, align } = mapPlacementToSideAndAlign(placement);
|
|
3137
|
+
const tooltipClasses = "group bg-(--background-tooltip) max-w-[calc(100vw-2rem)] shadow-card-md border-none rounded-4 p-4 [&>span]:scale-200 data-[state=delayed-open]:animate-in data-[state=instant-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=instant-open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
3138
|
+
const tooltipArrowClasses = "relative fill-(--background-tooltip) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=bottom]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=left]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=right]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)]";
|
|
3139
|
+
return /* @__PURE__ */ jsxs24(
|
|
3140
|
+
TooltipPrimitive.Root,
|
|
2406
3141
|
{
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
onClick: handleContainerClick,
|
|
3142
|
+
open,
|
|
3143
|
+
defaultOpen,
|
|
3144
|
+
onOpenChange,
|
|
3145
|
+
disableHoverableContent,
|
|
2412
3146
|
children: [
|
|
2413
|
-
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
|
|
3147
|
+
/* @__PURE__ */ jsx36(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
3148
|
+
/* @__PURE__ */ jsx36(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs24(
|
|
3149
|
+
TooltipPrimitive.Content,
|
|
2416
3150
|
{
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
3151
|
+
side,
|
|
3152
|
+
align,
|
|
3153
|
+
sideOffset: offset,
|
|
3154
|
+
className: cn(tooltipClasses, className),
|
|
3155
|
+
children: [
|
|
3156
|
+
showArrow && /* @__PURE__ */ jsx36(TooltipArrow, { className: tooltipArrowClasses }),
|
|
3157
|
+
/* @__PURE__ */ jsxs24("div", { className: "grid gap-2", children: [
|
|
3158
|
+
(strapline ?? "") !== "" && /* @__PURE__ */ jsx36("span", { className: "caption text-secondary", children: strapline }),
|
|
3159
|
+
/* @__PURE__ */ jsx36("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
3160
|
+
(description ?? "") !== "" && /* @__PURE__ */ jsx36("p", { className: "paragraph-sm text-primary", children: description })
|
|
3161
|
+
] })
|
|
3162
|
+
]
|
|
2426
3163
|
}
|
|
2427
|
-
)
|
|
2428
|
-
showTrailingIcon && /* @__PURE__ */ jsx31("span", { className: cn("cursor-pointer", iconWrapperVariants2({ size, disabled: !!disabled })), children: trailingIcon })
|
|
3164
|
+
) })
|
|
2429
3165
|
]
|
|
2430
3166
|
}
|
|
2431
|
-
)
|
|
3167
|
+
);
|
|
2432
3168
|
};
|
|
2433
|
-
|
|
3169
|
+
Tooltip.displayName = "Tooltip";
|
|
2434
3170
|
|
|
2435
3171
|
// src/components/Inputs/Slider.tsx
|
|
2436
|
-
import
|
|
2437
|
-
import { Fragment as Fragment2, jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3172
|
+
import { Fragment as Fragment2, jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2438
3173
|
var wrapperBase = "flex flex-col gap-2 items-start";
|
|
2439
3174
|
var isRangeProps = (props) => {
|
|
2440
3175
|
return Array.isArray(props.value) || Array.isArray(props.defaultValue);
|
|
@@ -2461,7 +3196,7 @@ var Slider = (props) => {
|
|
|
2461
3196
|
const isRange = isRangeProps(props);
|
|
2462
3197
|
const isControlled = value !== void 0;
|
|
2463
3198
|
const expectedLength = isRange ? 2 : 1;
|
|
2464
|
-
const normalizeArray =
|
|
3199
|
+
const normalizeArray = React35.useCallback(
|
|
2465
3200
|
(arr, fallback) => {
|
|
2466
3201
|
if (!arr || arr.length === 0) return fallback;
|
|
2467
3202
|
if (arr.length === expectedLength) return arr;
|
|
@@ -2473,16 +3208,16 @@ var Slider = (props) => {
|
|
|
2473
3208
|
},
|
|
2474
3209
|
[expectedLength, max]
|
|
2475
3210
|
);
|
|
2476
|
-
const defaultInternal =
|
|
3211
|
+
const defaultInternal = React35.useMemo(() => {
|
|
2477
3212
|
const defaultValueArray = toArray(defaultValue);
|
|
2478
3213
|
if (defaultValueArray) return normalizeArray(defaultValueArray, []);
|
|
2479
3214
|
if (isRange) return [min, Math.min(min + (max - min) / 4, max)];
|
|
2480
3215
|
return [min + (max - min) / 3];
|
|
2481
3216
|
}, [defaultValue, min, max, isRange, normalizeArray]);
|
|
2482
|
-
const [internalValue, setInternalValue] =
|
|
3217
|
+
const [internalValue, setInternalValue] = React35.useState(
|
|
2483
3218
|
() => normalizeArray(isControlled ? toArray(value) : defaultInternal, defaultInternal)
|
|
2484
3219
|
);
|
|
2485
|
-
|
|
3220
|
+
React35.useEffect(() => {
|
|
2486
3221
|
if (isControlled) {
|
|
2487
3222
|
setInternalValue(
|
|
2488
3223
|
(current2) => normalizeArray(toArray(value), current2.length ? current2 : defaultInternal)
|
|
@@ -2490,15 +3225,16 @@ var Slider = (props) => {
|
|
|
2490
3225
|
}
|
|
2491
3226
|
}, [isControlled, value, normalizeArray, defaultInternal]);
|
|
2492
3227
|
const current = internalValue;
|
|
2493
|
-
const trackRef =
|
|
2494
|
-
const [draggingThumbIndex, setDraggingThumbIndex] =
|
|
2495
|
-
const [hoveredThumbIndex, setHoveredThumbIndex] =
|
|
2496
|
-
const
|
|
3228
|
+
const trackRef = React35.useRef(null);
|
|
3229
|
+
const [draggingThumbIndex, setDraggingThumbIndex] = React35.useState(null);
|
|
3230
|
+
const [hoveredThumbIndex, setHoveredThumbIndex] = React35.useState(null);
|
|
3231
|
+
const [focusedThumbIndex, setFocusedThumbIndex] = React35.useState(null);
|
|
3232
|
+
const clamp = React35.useCallback((val) => {
|
|
2497
3233
|
if (val < min) return min;
|
|
2498
3234
|
if (val > max) return max;
|
|
2499
3235
|
return val;
|
|
2500
3236
|
}, [min, max]);
|
|
2501
|
-
const enforceMinGap =
|
|
3237
|
+
const enforceMinGap = React35.useCallback((next, prev) => {
|
|
2502
3238
|
if (!isRange || next.length !== 2 || step <= 0) return next;
|
|
2503
3239
|
let [low, high] = next;
|
|
2504
3240
|
const [prevLow, prevHigh] = prev.length === 2 ? prev : next;
|
|
@@ -2522,7 +3258,7 @@ var Slider = (props) => {
|
|
|
2522
3258
|
}
|
|
2523
3259
|
return [low, high];
|
|
2524
3260
|
}, [isRange, step, clamp]);
|
|
2525
|
-
|
|
3261
|
+
React35.useEffect(() => {
|
|
2526
3262
|
if (!isControlled) {
|
|
2527
3263
|
setInternalValue((prev) => {
|
|
2528
3264
|
const clamped = prev.map((v) => clamp(v));
|
|
@@ -2656,7 +3392,6 @@ var Slider = (props) => {
|
|
|
2656
3392
|
const secondaryPercent = valueToPercent(secondary);
|
|
2657
3393
|
const showNumeric = display === "numeric";
|
|
2658
3394
|
const showTooltip = display === "tooltip";
|
|
2659
|
-
const isTooltipAbove = tooltipPlacement === "top";
|
|
2660
3395
|
const isDecimalDomain = !Number.isInteger(step) || !Number.isInteger(min) || !Number.isInteger(max);
|
|
2661
3396
|
const formatNumber = (num) => {
|
|
2662
3397
|
if (!isDecimalDomain) {
|
|
@@ -2691,55 +3426,11 @@ var Slider = (props) => {
|
|
|
2691
3426
|
const trackHeight = 32;
|
|
2692
3427
|
const thumbWidth = 18;
|
|
2693
3428
|
const thumbRadius = thumbWidth / 2;
|
|
2694
|
-
const renderTooltipBubble = (key, percent, labelText, isVisible) => /* @__PURE__ */ jsx32(
|
|
2695
|
-
"div",
|
|
2696
|
-
{
|
|
2697
|
-
className: cn(
|
|
2698
|
-
"absolute -translate-x-1/2 flex flex-col items-center",
|
|
2699
|
-
"transition-[opacity,transform] duration-150",
|
|
2700
|
-
isVisible ? "opacity-100 scale-100 pointer-events-auto" : "opacity-0 scale-95 pointer-events-none"
|
|
2701
|
-
),
|
|
2702
|
-
style: {
|
|
2703
|
-
left: `${percent}%`,
|
|
2704
|
-
bottom: isTooltipAbove ? "100%" : void 0,
|
|
2705
|
-
top: isTooltipAbove ? void 0 : "100%",
|
|
2706
|
-
marginBottom: isTooltipAbove ? 8 : void 0,
|
|
2707
|
-
marginTop: isTooltipAbove ? void 0 : 8
|
|
2708
|
-
},
|
|
2709
|
-
children: /* @__PURE__ */ jsxs20(
|
|
2710
|
-
"div",
|
|
2711
|
-
{
|
|
2712
|
-
className: cn("relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4) bg-(--background-tooltip)"),
|
|
2713
|
-
children: [
|
|
2714
|
-
/* @__PURE__ */ jsx32(
|
|
2715
|
-
"p",
|
|
2716
|
-
{
|
|
2717
|
-
className: cn(
|
|
2718
|
-
"paragraph-sm",
|
|
2719
|
-
disabled ? "text-secondary" : "text-primary"
|
|
2720
|
-
),
|
|
2721
|
-
children: labelText
|
|
2722
|
-
}
|
|
2723
|
-
),
|
|
2724
|
-
/* @__PURE__ */ jsx32(
|
|
2725
|
-
"div",
|
|
2726
|
-
{
|
|
2727
|
-
className: cn(
|
|
2728
|
-
"absolute left-1/2 -translate-x-1/2 w-2 h-2 rotate-45 bg-(--background-tooltip)",
|
|
2729
|
-
isTooltipAbove ? "-bottom-1" : "-top-1"
|
|
2730
|
-
)
|
|
2731
|
-
}
|
|
2732
|
-
)
|
|
2733
|
-
]
|
|
2734
|
-
}
|
|
2735
|
-
)
|
|
2736
|
-
},
|
|
2737
|
-
key
|
|
2738
|
-
);
|
|
2739
3429
|
const renderHandle = (index, percent, ariaValueText) => {
|
|
2740
3430
|
const val = index === 0 ? primary : secondary;
|
|
2741
3431
|
const isDragging = draggingThumbIndex === index;
|
|
2742
|
-
|
|
3432
|
+
const isTooltipVisible = showTooltip && (hoveredThumbIndex === index || draggingThumbIndex === index || focusedThumbIndex === index);
|
|
3433
|
+
const handle = /* @__PURE__ */ jsx37(
|
|
2743
3434
|
"button",
|
|
2744
3435
|
{
|
|
2745
3436
|
type: "button",
|
|
@@ -2768,6 +3459,12 @@ var Slider = (props) => {
|
|
|
2768
3459
|
onPointerLeave: () => {
|
|
2769
3460
|
setHoveredThumbIndex((prev) => prev === index ? null : prev);
|
|
2770
3461
|
},
|
|
3462
|
+
onFocus: () => {
|
|
3463
|
+
setFocusedThumbIndex(index);
|
|
3464
|
+
},
|
|
3465
|
+
onBlur: () => {
|
|
3466
|
+
setFocusedThumbIndex((prev) => prev === index ? null : prev);
|
|
3467
|
+
},
|
|
2771
3468
|
onPointerDown: (event) => {
|
|
2772
3469
|
if (disabled) return;
|
|
2773
3470
|
if (event.button !== 0) return;
|
|
@@ -2778,15 +3475,28 @@ var Slider = (props) => {
|
|
|
2778
3475
|
},
|
|
2779
3476
|
index
|
|
2780
3477
|
);
|
|
3478
|
+
if (!showTooltip) return handle;
|
|
3479
|
+
return /* @__PURE__ */ jsx37(
|
|
3480
|
+
Tooltip,
|
|
3481
|
+
{
|
|
3482
|
+
title: ariaValueText,
|
|
3483
|
+
placement: tooltipPlacement === "top" ? "top" : "bottom",
|
|
3484
|
+
offset: 8,
|
|
3485
|
+
open: isTooltipVisible,
|
|
3486
|
+
disableHoverableContent: true,
|
|
3487
|
+
className: "z-50",
|
|
3488
|
+
children: handle
|
|
3489
|
+
}
|
|
3490
|
+
);
|
|
2781
3491
|
};
|
|
2782
|
-
return /* @__PURE__ */
|
|
3492
|
+
return /* @__PURE__ */ jsxs25(
|
|
2783
3493
|
"div",
|
|
2784
3494
|
{
|
|
2785
3495
|
className: wrapperBase,
|
|
2786
3496
|
style: { marginInline: `${thumbRadius}px` },
|
|
2787
3497
|
children: [
|
|
2788
|
-
name && /* @__PURE__ */
|
|
2789
|
-
/* @__PURE__ */
|
|
3498
|
+
name && /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
3499
|
+
/* @__PURE__ */ jsx37(
|
|
2790
3500
|
"input",
|
|
2791
3501
|
{
|
|
2792
3502
|
type: "hidden",
|
|
@@ -2795,7 +3505,7 @@ var Slider = (props) => {
|
|
|
2795
3505
|
disabled
|
|
2796
3506
|
}
|
|
2797
3507
|
),
|
|
2798
|
-
isRange && secondary !== void 0 && /* @__PURE__ */
|
|
3508
|
+
isRange && secondary !== void 0 && /* @__PURE__ */ jsx37(
|
|
2799
3509
|
"input",
|
|
2800
3510
|
{
|
|
2801
3511
|
type: "hidden",
|
|
@@ -2805,51 +3515,37 @@ var Slider = (props) => {
|
|
|
2805
3515
|
}
|
|
2806
3516
|
)
|
|
2807
3517
|
] }),
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
ref: trackRef,
|
|
2831
|
-
onPointerDown: handleTrackPointerDown,
|
|
2832
|
-
children: [
|
|
2833
|
-
/* @__PURE__ */ jsx32(
|
|
2834
|
-
"div",
|
|
2835
|
-
{
|
|
2836
|
-
className: cn(
|
|
2837
|
-
"absolute h-full rounded-4",
|
|
2838
|
-
disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-secondary)"
|
|
2839
|
-
),
|
|
2840
|
-
style: {
|
|
2841
|
-
width: `calc(100% + ${thumbWidth}px)`,
|
|
2842
|
-
left: `-${thumbRadius}px`
|
|
2843
|
-
}
|
|
3518
|
+
/* @__PURE__ */ jsxs25("div", { className: cn("w-full flex flex-col gap-1", className), children: [
|
|
3519
|
+
/* @__PURE__ */ jsx37("div", { className: "relative w-full", children: /* @__PURE__ */ jsxs25(
|
|
3520
|
+
"div",
|
|
3521
|
+
{
|
|
3522
|
+
className: cn(
|
|
3523
|
+
"relative w-full flex items-center rounded-4",
|
|
3524
|
+
disabled ? "bg-(--background-slider-track-disabled) cursor-default" : "bg-(--background-slider-track) cursor-pointer"
|
|
3525
|
+
),
|
|
3526
|
+
style: { height: `${trackHeight}px` },
|
|
3527
|
+
ref: trackRef,
|
|
3528
|
+
onPointerDown: handleTrackPointerDown,
|
|
3529
|
+
children: [
|
|
3530
|
+
/* @__PURE__ */ jsx37(
|
|
3531
|
+
"div",
|
|
3532
|
+
{
|
|
3533
|
+
className: cn(
|
|
3534
|
+
"absolute h-full rounded-4",
|
|
3535
|
+
disabled ? "bg-(--background-slider-track-disabled)" : "bg-(--background-slider-track)"
|
|
3536
|
+
),
|
|
3537
|
+
style: {
|
|
3538
|
+
width: `calc(100% + ${thumbWidth}px)`,
|
|
3539
|
+
left: `-${thumbRadius}px`
|
|
2844
3540
|
}
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
showNumeric && /* @__PURE__ */
|
|
3541
|
+
}
|
|
3542
|
+
),
|
|
3543
|
+
renderHandle(0, primaryPercent, formatDisplayValue(primary)),
|
|
3544
|
+
isRange && secondary !== void 0 && renderHandle(1, secondaryPercent, formatDisplayValue(secondary))
|
|
3545
|
+
]
|
|
3546
|
+
}
|
|
3547
|
+
) }),
|
|
3548
|
+
showNumeric && /* @__PURE__ */ jsx37(
|
|
2853
3549
|
"p",
|
|
2854
3550
|
{
|
|
2855
3551
|
className: cn(
|
|
@@ -2867,9 +3563,9 @@ var Slider = (props) => {
|
|
|
2867
3563
|
Slider.displayName = "Slider";
|
|
2868
3564
|
|
|
2869
3565
|
// src/components/Inputs/TextArea.tsx
|
|
2870
|
-
import * as
|
|
3566
|
+
import * as React36 from "react";
|
|
2871
3567
|
import { MaximizeIcon } from "@bubo-squared/icons";
|
|
2872
|
-
import { jsx as
|
|
3568
|
+
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2873
3569
|
var TextArea = (props) => {
|
|
2874
3570
|
const {
|
|
2875
3571
|
label,
|
|
@@ -2889,7 +3585,7 @@ var TextArea = (props) => {
|
|
|
2889
3585
|
...textareaProps
|
|
2890
3586
|
} = props;
|
|
2891
3587
|
const isControlled = value !== void 0;
|
|
2892
|
-
const [internalValue, setInternalValue] =
|
|
3588
|
+
const [internalValue, setInternalValue] = React36.useState(
|
|
2893
3589
|
defaultValue ?? ""
|
|
2894
3590
|
);
|
|
2895
3591
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
@@ -2897,10 +3593,10 @@ var TextArea = (props) => {
|
|
|
2897
3593
|
const currentLength = currentValue.length;
|
|
2898
3594
|
const effectiveMaxLength = type === "character-limit" ? maxLength ?? 144 : void 0;
|
|
2899
3595
|
const showCharacterLimit = type === "character-limit" && typeof effectiveMaxLength === "number";
|
|
2900
|
-
const textareaRef =
|
|
2901
|
-
const containerRef =
|
|
2902
|
-
const [height, setHeight] =
|
|
2903
|
-
const [width, setWidth] =
|
|
3596
|
+
const textareaRef = React36.useRef(null);
|
|
3597
|
+
const containerRef = React36.useRef(null);
|
|
3598
|
+
const [height, setHeight] = React36.useState(void 0);
|
|
3599
|
+
const [width, setWidth] = React36.useState(void 0);
|
|
2904
3600
|
const minHeight = 80;
|
|
2905
3601
|
const minWidth = 240;
|
|
2906
3602
|
const handleContainerClick = () => {
|
|
@@ -2913,7 +3609,7 @@ var TextArea = (props) => {
|
|
|
2913
3609
|
}
|
|
2914
3610
|
onChange?.(event);
|
|
2915
3611
|
};
|
|
2916
|
-
const generatedId =
|
|
3612
|
+
const generatedId = React36.useId();
|
|
2917
3613
|
const textareaId = id ?? generatedId;
|
|
2918
3614
|
const statusBorderClass = {
|
|
2919
3615
|
default: "",
|
|
@@ -2950,7 +3646,7 @@ var TextArea = (props) => {
|
|
|
2950
3646
|
window.addEventListener("pointermove", handlePointerMove);
|
|
2951
3647
|
window.addEventListener("pointerup", handlePointerUp);
|
|
2952
3648
|
};
|
|
2953
|
-
return /* @__PURE__ */
|
|
3649
|
+
return /* @__PURE__ */ jsx38(
|
|
2954
3650
|
Field,
|
|
2955
3651
|
{
|
|
2956
3652
|
className: "w-full",
|
|
@@ -2959,7 +3655,7 @@ var TextArea = (props) => {
|
|
|
2959
3655
|
hideHint,
|
|
2960
3656
|
status,
|
|
2961
3657
|
disabled,
|
|
2962
|
-
children: /* @__PURE__ */
|
|
3658
|
+
children: /* @__PURE__ */ jsxs26(
|
|
2963
3659
|
"div",
|
|
2964
3660
|
{
|
|
2965
3661
|
className: cn(
|
|
@@ -2978,7 +3674,7 @@ var TextArea = (props) => {
|
|
|
2978
3674
|
onClick: handleContainerClick,
|
|
2979
3675
|
"aria-disabled": disabled || void 0,
|
|
2980
3676
|
children: [
|
|
2981
|
-
/* @__PURE__ */
|
|
3677
|
+
/* @__PURE__ */ jsx38(
|
|
2982
3678
|
"textarea",
|
|
2983
3679
|
{
|
|
2984
3680
|
id: textareaId,
|
|
@@ -2998,7 +3694,7 @@ var TextArea = (props) => {
|
|
|
2998
3694
|
...textareaProps
|
|
2999
3695
|
}
|
|
3000
3696
|
),
|
|
3001
|
-
showCharacterLimit && /* @__PURE__ */
|
|
3697
|
+
showCharacterLimit && /* @__PURE__ */ jsxs26(
|
|
3002
3698
|
"span",
|
|
3003
3699
|
{
|
|
3004
3700
|
className: cn(
|
|
@@ -3012,19 +3708,19 @@ var TextArea = (props) => {
|
|
|
3012
3708
|
]
|
|
3013
3709
|
}
|
|
3014
3710
|
),
|
|
3015
|
-
type === "responsive" && /* @__PURE__ */
|
|
3711
|
+
type === "responsive" && /* @__PURE__ */ jsx38(
|
|
3016
3712
|
"div",
|
|
3017
3713
|
{
|
|
3018
3714
|
className: "absolute bottom-1 right-1 h-3 w-3 " + (disabled ? "cursor-auto" : "cursor-nwse-resize"),
|
|
3019
3715
|
onPointerDown: disabled ? void 0 : handleResizePointerDown,
|
|
3020
|
-
children: /* @__PURE__ */
|
|
3716
|
+
children: /* @__PURE__ */ jsx38(
|
|
3021
3717
|
"span",
|
|
3022
3718
|
{
|
|
3023
3719
|
className: cn(
|
|
3024
3720
|
"absolute bottom-0 right-0 flex h-4 w-4 items-center justify-center text-(--icon-primary)",
|
|
3025
3721
|
disabled && "text-(--icon-primary-disabled)"
|
|
3026
3722
|
),
|
|
3027
|
-
children: /* @__PURE__ */
|
|
3723
|
+
children: /* @__PURE__ */ jsx38(MaximizeIcon, {})
|
|
3028
3724
|
}
|
|
3029
3725
|
)
|
|
3030
3726
|
}
|
|
@@ -3038,10 +3734,10 @@ var TextArea = (props) => {
|
|
|
3038
3734
|
TextArea.displayName = "TextArea";
|
|
3039
3735
|
|
|
3040
3736
|
// src/components/Inputs/TextInput.tsx
|
|
3041
|
-
import * as
|
|
3042
|
-
import { cva as
|
|
3043
|
-
import { jsx as
|
|
3044
|
-
var
|
|
3737
|
+
import * as React37 from "react";
|
|
3738
|
+
import { cva as cva20 } from "class-variance-authority";
|
|
3739
|
+
import { jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3740
|
+
var inputTextVariants3 = cva20("truncate", {
|
|
3045
3741
|
variants: {
|
|
3046
3742
|
size: {
|
|
3047
3743
|
sm: "paragraph-md",
|
|
@@ -3054,7 +3750,7 @@ var inputTextVariants2 = cva18("truncate", {
|
|
|
3054
3750
|
size: "lg"
|
|
3055
3751
|
}
|
|
3056
3752
|
});
|
|
3057
|
-
var
|
|
3753
|
+
var iconWrapperVariants4 = cva20(
|
|
3058
3754
|
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
3059
3755
|
{
|
|
3060
3756
|
variants: {
|
|
@@ -3091,11 +3787,11 @@ var TextInput = (props) => {
|
|
|
3091
3787
|
...inputProps
|
|
3092
3788
|
} = props;
|
|
3093
3789
|
const isControlled = value !== void 0;
|
|
3094
|
-
const [internalValue, setInternalValue] =
|
|
3790
|
+
const [internalValue, setInternalValue] = React37.useState(
|
|
3095
3791
|
defaultValue ?? ""
|
|
3096
3792
|
);
|
|
3097
3793
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
3098
|
-
const inputRef =
|
|
3794
|
+
const inputRef = React37.useRef(null);
|
|
3099
3795
|
const handleContainerClick = () => {
|
|
3100
3796
|
if (disabled) return;
|
|
3101
3797
|
inputRef.current?.focus();
|
|
@@ -3108,7 +3804,7 @@ var TextInput = (props) => {
|
|
|
3108
3804
|
};
|
|
3109
3805
|
const showLeadingIcon = !!leadingIcon;
|
|
3110
3806
|
const showTrailingIcon = !!trailingIcon;
|
|
3111
|
-
return /* @__PURE__ */
|
|
3807
|
+
return /* @__PURE__ */ jsx39(
|
|
3112
3808
|
Field,
|
|
3113
3809
|
{
|
|
3114
3810
|
label,
|
|
@@ -3116,7 +3812,7 @@ var TextInput = (props) => {
|
|
|
3116
3812
|
hideHint,
|
|
3117
3813
|
status,
|
|
3118
3814
|
disabled,
|
|
3119
|
-
children: /* @__PURE__ */
|
|
3815
|
+
children: /* @__PURE__ */ jsxs27(
|
|
3120
3816
|
InputShell,
|
|
3121
3817
|
{
|
|
3122
3818
|
size,
|
|
@@ -3125,16 +3821,16 @@ var TextInput = (props) => {
|
|
|
3125
3821
|
className,
|
|
3126
3822
|
onClick: handleContainerClick,
|
|
3127
3823
|
children: [
|
|
3128
|
-
showLeadingIcon && /* @__PURE__ */
|
|
3824
|
+
showLeadingIcon && /* @__PURE__ */ jsx39(
|
|
3129
3825
|
"span",
|
|
3130
3826
|
{
|
|
3131
3827
|
className: cn(
|
|
3132
|
-
|
|
3828
|
+
iconWrapperVariants4({ size, disabled })
|
|
3133
3829
|
),
|
|
3134
3830
|
children: leadingIcon
|
|
3135
3831
|
}
|
|
3136
3832
|
),
|
|
3137
|
-
/* @__PURE__ */
|
|
3833
|
+
/* @__PURE__ */ jsx39(
|
|
3138
3834
|
Input,
|
|
3139
3835
|
{
|
|
3140
3836
|
ref: inputRef,
|
|
@@ -3146,17 +3842,17 @@ var TextInput = (props) => {
|
|
|
3146
3842
|
onChange: handleChange,
|
|
3147
3843
|
variant: "bare",
|
|
3148
3844
|
className: cn(
|
|
3149
|
-
|
|
3845
|
+
inputTextVariants3({ size }),
|
|
3150
3846
|
"bg-transparent outline-none w-full"
|
|
3151
3847
|
),
|
|
3152
3848
|
...inputProps
|
|
3153
3849
|
}
|
|
3154
3850
|
),
|
|
3155
|
-
showTrailingIcon && /* @__PURE__ */
|
|
3851
|
+
showTrailingIcon && /* @__PURE__ */ jsx39(
|
|
3156
3852
|
"span",
|
|
3157
3853
|
{
|
|
3158
3854
|
className: cn(
|
|
3159
|
-
|
|
3855
|
+
iconWrapperVariants4({ size, disabled: !!disabled })
|
|
3160
3856
|
),
|
|
3161
3857
|
children: trailingIcon
|
|
3162
3858
|
}
|
|
@@ -3171,10 +3867,10 @@ TextInput.displayName = "TextInput";
|
|
|
3171
3867
|
|
|
3172
3868
|
// src/components/Inputs/Toggle.tsx
|
|
3173
3869
|
import "react";
|
|
3174
|
-
import { jsx as
|
|
3870
|
+
import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3175
3871
|
var Toggle = (props) => {
|
|
3176
3872
|
const { label, className, disabled, ...inputProps } = props;
|
|
3177
|
-
return /* @__PURE__ */
|
|
3873
|
+
return /* @__PURE__ */ jsxs28(
|
|
3178
3874
|
"label",
|
|
3179
3875
|
{
|
|
3180
3876
|
className: cn(
|
|
@@ -3182,8 +3878,8 @@ var Toggle = (props) => {
|
|
|
3182
3878
|
disabled ? "cursor-default" : "cursor-pointer"
|
|
3183
3879
|
),
|
|
3184
3880
|
children: [
|
|
3185
|
-
/* @__PURE__ */
|
|
3186
|
-
/* @__PURE__ */
|
|
3881
|
+
/* @__PURE__ */ jsxs28("span", { className: "relative inline-flex items-center", children: [
|
|
3882
|
+
/* @__PURE__ */ jsx40(
|
|
3187
3883
|
"input",
|
|
3188
3884
|
{
|
|
3189
3885
|
type: "checkbox",
|
|
@@ -3192,7 +3888,7 @@ var Toggle = (props) => {
|
|
|
3192
3888
|
...inputProps
|
|
3193
3889
|
}
|
|
3194
3890
|
),
|
|
3195
|
-
/* @__PURE__ */
|
|
3891
|
+
/* @__PURE__ */ jsx40(
|
|
3196
3892
|
"span",
|
|
3197
3893
|
{
|
|
3198
3894
|
className: cn(
|
|
@@ -3232,7 +3928,7 @@ var Toggle = (props) => {
|
|
|
3232
3928
|
"peer-disabled:[&>.knob]:peer-checked:bg-(--background-primary-hover)",
|
|
3233
3929
|
className
|
|
3234
3930
|
),
|
|
3235
|
-
children: /* @__PURE__ */
|
|
3931
|
+
children: /* @__PURE__ */ jsx40(
|
|
3236
3932
|
"span",
|
|
3237
3933
|
{
|
|
3238
3934
|
className: cn(
|
|
@@ -3244,7 +3940,7 @@ var Toggle = (props) => {
|
|
|
3244
3940
|
}
|
|
3245
3941
|
)
|
|
3246
3942
|
] }),
|
|
3247
|
-
label && /* @__PURE__ */
|
|
3943
|
+
label && /* @__PURE__ */ jsx40(
|
|
3248
3944
|
"span",
|
|
3249
3945
|
{
|
|
3250
3946
|
className: cn(
|
|
@@ -3262,7 +3958,7 @@ Toggle.displayName = "Toggle";
|
|
|
3262
3958
|
|
|
3263
3959
|
// src/components/Inputs/WebsiteInput.tsx
|
|
3264
3960
|
import "react";
|
|
3265
|
-
import { jsx as
|
|
3961
|
+
import { jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3266
3962
|
var WebsiteInput = (props) => {
|
|
3267
3963
|
const {
|
|
3268
3964
|
hierarchy = "leading",
|
|
@@ -3299,15 +3995,15 @@ var WebsiteInput = (props) => {
|
|
|
3299
3995
|
size === "xl" ? "[&>svg]:w-6 [&>svg]:h-6" : size === "sm" ? "[&>svg]:w-4 [&>svg]:h-4" : "[&>svg]:w-5 [&>svg]:h-5",
|
|
3300
3996
|
disabled ? "text-(--icon-primary-disabled)" : "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-within:text-(--icon-primary-focus)"
|
|
3301
3997
|
);
|
|
3302
|
-
const leadingAddon = /* @__PURE__ */
|
|
3303
|
-
/* @__PURE__ */
|
|
3304
|
-
icon != null && /* @__PURE__ */
|
|
3998
|
+
const leadingAddon = /* @__PURE__ */ jsxs29("div", { className: baseAddonClass, children: [
|
|
3999
|
+
/* @__PURE__ */ jsx41("div", { className: addonTextClass, children: protocolLabel }),
|
|
4000
|
+
icon != null && /* @__PURE__ */ jsx41("span", { className: iconWrapperClass, children: icon })
|
|
3305
4001
|
] });
|
|
3306
|
-
const trailingAddon = /* @__PURE__ */
|
|
3307
|
-
icon != null && /* @__PURE__ */
|
|
3308
|
-
/* @__PURE__ */
|
|
4002
|
+
const trailingAddon = /* @__PURE__ */ jsxs29("div", { className: baseAddonClass, children: [
|
|
4003
|
+
icon != null && /* @__PURE__ */ jsx41("span", { className: iconWrapperClass, children: icon }),
|
|
4004
|
+
/* @__PURE__ */ jsx41("div", { className: addonTextClass, children: protocolLabel })
|
|
3309
4005
|
] });
|
|
3310
|
-
return /* @__PURE__ */
|
|
4006
|
+
return /* @__PURE__ */ jsx41(
|
|
3311
4007
|
TextInput,
|
|
3312
4008
|
{
|
|
3313
4009
|
...rest,
|
|
@@ -3322,9 +4018,9 @@ var WebsiteInput = (props) => {
|
|
|
3322
4018
|
WebsiteInput.displayName = "WebsiteInput";
|
|
3323
4019
|
|
|
3324
4020
|
// src/components/Feedback/Popover.tsx
|
|
3325
|
-
import * as
|
|
4021
|
+
import * as React40 from "react";
|
|
3326
4022
|
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
3327
|
-
import { jsx as
|
|
4023
|
+
import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3328
4024
|
var PopoverArrow = PopoverPrimitive2.Arrow;
|
|
3329
4025
|
var Popover2 = (props) => {
|
|
3330
4026
|
const {
|
|
@@ -3341,7 +4037,7 @@ var Popover2 = (props) => {
|
|
|
3341
4037
|
offset = 10,
|
|
3342
4038
|
children
|
|
3343
4039
|
} = props;
|
|
3344
|
-
const [open, setOpen] =
|
|
4040
|
+
const [open, setOpen] = React40.useState(false);
|
|
3345
4041
|
const handleCancel = () => {
|
|
3346
4042
|
onCancel?.();
|
|
3347
4043
|
setOpen(false);
|
|
@@ -3383,9 +4079,9 @@ var Popover2 = (props) => {
|
|
|
3383
4079
|
}
|
|
3384
4080
|
};
|
|
3385
4081
|
const { side, align } = mapPlacementToSideAndAlign2(placement);
|
|
3386
|
-
return /* @__PURE__ */
|
|
3387
|
-
/* @__PURE__ */
|
|
3388
|
-
/* @__PURE__ */
|
|
4082
|
+
return /* @__PURE__ */ jsxs30(Popover, { open, onOpenChange: setOpen, children: [
|
|
4083
|
+
/* @__PURE__ */ jsx42(PopoverTrigger, { asChild: true, children }),
|
|
4084
|
+
/* @__PURE__ */ jsxs30(
|
|
3389
4085
|
PopoverContent,
|
|
3390
4086
|
{
|
|
3391
4087
|
side,
|
|
@@ -3393,16 +4089,16 @@ var Popover2 = (props) => {
|
|
|
3393
4089
|
sideOffset: offset,
|
|
3394
4090
|
className: cn(popoverClasses, className),
|
|
3395
4091
|
children: [
|
|
3396
|
-
showArrow && /* @__PURE__ */
|
|
3397
|
-
/* @__PURE__ */
|
|
3398
|
-
/* @__PURE__ */
|
|
3399
|
-
/* @__PURE__ */
|
|
3400
|
-
/* @__PURE__ */
|
|
3401
|
-
/* @__PURE__ */
|
|
4092
|
+
showArrow && /* @__PURE__ */ jsx42(PopoverArrow, { className: popoverArrowClasses }),
|
|
4093
|
+
/* @__PURE__ */ jsxs30("div", { className: "grid gap-4", children: [
|
|
4094
|
+
/* @__PURE__ */ jsxs30("div", { className: "space-y-2", children: [
|
|
4095
|
+
/* @__PURE__ */ jsx42("span", { className: "caption text-secondary", children: strapline }),
|
|
4096
|
+
/* @__PURE__ */ jsx42("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
4097
|
+
/* @__PURE__ */ jsx42("p", { className: "paragraph-sm text-primary", children: description })
|
|
3402
4098
|
] }),
|
|
3403
|
-
/* @__PURE__ */
|
|
3404
|
-
/* @__PURE__ */
|
|
3405
|
-
/* @__PURE__ */
|
|
4099
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex justify-start items-center gap-4 flex-wrap", children: [
|
|
4100
|
+
/* @__PURE__ */ jsx42(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),
|
|
4101
|
+
/* @__PURE__ */ jsx42(Button, { size: "sm", variant: "primary", onClick: handleOk, children: okText || "Ok" })
|
|
3406
4102
|
] })
|
|
3407
4103
|
] })
|
|
3408
4104
|
]
|
|
@@ -3412,95 +4108,10 @@ var Popover2 = (props) => {
|
|
|
3412
4108
|
};
|
|
3413
4109
|
Popover2.displayName = "Popover";
|
|
3414
4110
|
|
|
3415
|
-
// src/components/Feedback/Tooltip.tsx
|
|
3416
|
-
import "react";
|
|
3417
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3418
|
-
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3419
|
-
var TooltipArrow = TooltipPrimitive.Arrow;
|
|
3420
|
-
var mapPlacementToSideAndAlign = (placement) => {
|
|
3421
|
-
switch (placement) {
|
|
3422
|
-
case "top":
|
|
3423
|
-
return { side: "top", align: "center" };
|
|
3424
|
-
case "topLeft":
|
|
3425
|
-
return { side: "top", align: "start" };
|
|
3426
|
-
case "topRight":
|
|
3427
|
-
return { side: "top", align: "end" };
|
|
3428
|
-
case "bottom":
|
|
3429
|
-
return { side: "bottom", align: "center" };
|
|
3430
|
-
case "bottomLeft":
|
|
3431
|
-
return { side: "bottom", align: "start" };
|
|
3432
|
-
case "bottomRight":
|
|
3433
|
-
return { side: "bottom", align: "end" };
|
|
3434
|
-
case "left":
|
|
3435
|
-
return { side: "left", align: "center" };
|
|
3436
|
-
case "leftTop":
|
|
3437
|
-
return { side: "left", align: "start" };
|
|
3438
|
-
case "leftBottom":
|
|
3439
|
-
return { side: "left", align: "end" };
|
|
3440
|
-
case "right":
|
|
3441
|
-
return { side: "right", align: "center" };
|
|
3442
|
-
case "rightTop":
|
|
3443
|
-
return { side: "right", align: "start" };
|
|
3444
|
-
case "rightBottom":
|
|
3445
|
-
return { side: "right", align: "end" };
|
|
3446
|
-
default:
|
|
3447
|
-
return { side: "top", align: "center" };
|
|
3448
|
-
}
|
|
3449
|
-
};
|
|
3450
|
-
var Tooltip = (props) => {
|
|
3451
|
-
const {
|
|
3452
|
-
strapline,
|
|
3453
|
-
title,
|
|
3454
|
-
description,
|
|
3455
|
-
showArrow = true,
|
|
3456
|
-
className,
|
|
3457
|
-
placement = "top",
|
|
3458
|
-
offset = 10,
|
|
3459
|
-
disableHoverableContent,
|
|
3460
|
-
open,
|
|
3461
|
-
defaultOpen,
|
|
3462
|
-
onOpenChange,
|
|
3463
|
-
children
|
|
3464
|
-
} = props;
|
|
3465
|
-
const { side, align } = mapPlacementToSideAndAlign(placement);
|
|
3466
|
-
const tooltipClasses = "group bg-(--background-popover) max-w-[calc(100vw-2rem)] shadow-card-md border-none rounded-4 p-4 [&>span]:scale-200 data-[state=delayed-open]:animate-in data-[state=instant-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=instant-open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
3467
|
-
const tooltipArrowClasses = "relative fill-(--background-popover) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=bottom]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=left]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=right]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)]";
|
|
3468
|
-
return /* @__PURE__ */ jsxs26(
|
|
3469
|
-
TooltipPrimitive.Root,
|
|
3470
|
-
{
|
|
3471
|
-
open,
|
|
3472
|
-
defaultOpen,
|
|
3473
|
-
onOpenChange,
|
|
3474
|
-
disableHoverableContent,
|
|
3475
|
-
children: [
|
|
3476
|
-
/* @__PURE__ */ jsx38(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
3477
|
-
/* @__PURE__ */ jsx38(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs26(
|
|
3478
|
-
TooltipPrimitive.Content,
|
|
3479
|
-
{
|
|
3480
|
-
side,
|
|
3481
|
-
align,
|
|
3482
|
-
sideOffset: offset,
|
|
3483
|
-
className: cn(tooltipClasses, className),
|
|
3484
|
-
children: [
|
|
3485
|
-
showArrow && /* @__PURE__ */ jsx38(TooltipArrow, { className: tooltipArrowClasses }),
|
|
3486
|
-
/* @__PURE__ */ jsxs26("div", { className: "grid gap-2", children: [
|
|
3487
|
-
(strapline ?? "") !== "" && /* @__PURE__ */ jsx38("span", { className: "caption text-secondary", children: strapline }),
|
|
3488
|
-
/* @__PURE__ */ jsx38("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
3489
|
-
(description ?? "") !== "" && /* @__PURE__ */ jsx38("p", { className: "paragraph-sm text-primary", children: description })
|
|
3490
|
-
] })
|
|
3491
|
-
]
|
|
3492
|
-
}
|
|
3493
|
-
) })
|
|
3494
|
-
]
|
|
3495
|
-
}
|
|
3496
|
-
);
|
|
3497
|
-
};
|
|
3498
|
-
Tooltip.displayName = "Tooltip";
|
|
3499
|
-
|
|
3500
4111
|
// src/components/Feedback/TooltipProvider.tsx
|
|
3501
4112
|
import "react";
|
|
3502
4113
|
import * as TooltipPrimitive2 from "@radix-ui/react-tooltip";
|
|
3503
|
-
import { jsx as
|
|
4114
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3504
4115
|
var TooltipProvider = (props) => {
|
|
3505
4116
|
const {
|
|
3506
4117
|
children,
|
|
@@ -3508,7 +4119,7 @@ var TooltipProvider = (props) => {
|
|
|
3508
4119
|
skipDelayDuration = 300,
|
|
3509
4120
|
disableHoverableContent = false
|
|
3510
4121
|
} = props;
|
|
3511
|
-
return /* @__PURE__ */
|
|
4122
|
+
return /* @__PURE__ */ jsx43(
|
|
3512
4123
|
TooltipPrimitive2.Provider,
|
|
3513
4124
|
{
|
|
3514
4125
|
delayDuration,
|
|
@@ -3521,19 +4132,19 @@ var TooltipProvider = (props) => {
|
|
|
3521
4132
|
TooltipProvider.displayName = "TooltipProvider";
|
|
3522
4133
|
|
|
3523
4134
|
// src/components/Navigation/Breadcrumbs.tsx
|
|
3524
|
-
import * as
|
|
4135
|
+
import * as React43 from "react";
|
|
3525
4136
|
|
|
3526
4137
|
// src/components/ui/breadcrumb.tsx
|
|
3527
4138
|
import "react";
|
|
3528
4139
|
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
3529
|
-
import { jsx as
|
|
4140
|
+
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3530
4141
|
var breadcrumbItemClasses = "h6-title inline-flex items-center gap-1.5 text-(--color-secondary) hover:text-(--color-primary-hover) focus-within:text-(--color-secondary-focus) [&_[aria-current=page]]:font-medium [&_[aria-current=page]]:text-primary";
|
|
3531
4142
|
var disabledItemClasses = "text-primary-disabled cursor-default pointer-events-none";
|
|
3532
4143
|
function Breadcrumb({ ...props }) {
|
|
3533
|
-
return /* @__PURE__ */
|
|
4144
|
+
return /* @__PURE__ */ jsx44("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
3534
4145
|
}
|
|
3535
4146
|
function BreadcrumbList({ className, ...props }) {
|
|
3536
|
-
return /* @__PURE__ */
|
|
4147
|
+
return /* @__PURE__ */ jsx44(
|
|
3537
4148
|
"ol",
|
|
3538
4149
|
{
|
|
3539
4150
|
"data-slot": "breadcrumb-list",
|
|
@@ -3546,7 +4157,7 @@ function BreadcrumbList({ className, ...props }) {
|
|
|
3546
4157
|
);
|
|
3547
4158
|
}
|
|
3548
4159
|
function BreadcrumbItem({ className, disabled, ...props }) {
|
|
3549
|
-
return /* @__PURE__ */
|
|
4160
|
+
return /* @__PURE__ */ jsx44(
|
|
3550
4161
|
"li",
|
|
3551
4162
|
{
|
|
3552
4163
|
"data-slot": "breadcrumb-item",
|
|
@@ -3557,7 +4168,7 @@ function BreadcrumbItem({ className, disabled, ...props }) {
|
|
|
3557
4168
|
);
|
|
3558
4169
|
}
|
|
3559
4170
|
function BreadcrumbPage({ className, ...props }) {
|
|
3560
|
-
return /* @__PURE__ */
|
|
4171
|
+
return /* @__PURE__ */ jsx44(
|
|
3561
4172
|
"span",
|
|
3562
4173
|
{
|
|
3563
4174
|
"data-slot": "breadcrumb-page",
|
|
@@ -3574,7 +4185,7 @@ function BreadcrumbSeparator({
|
|
|
3574
4185
|
className,
|
|
3575
4186
|
...props
|
|
3576
4187
|
}) {
|
|
3577
|
-
return /* @__PURE__ */
|
|
4188
|
+
return /* @__PURE__ */ jsx44(
|
|
3578
4189
|
"li",
|
|
3579
4190
|
{
|
|
3580
4191
|
"data-slot": "breadcrumb-separator",
|
|
@@ -3582,7 +4193,7 @@ function BreadcrumbSeparator({
|
|
|
3582
4193
|
"aria-hidden": "true",
|
|
3583
4194
|
className: cn("[&>svg]:size-6 [&>svg]:text-(--color-secondary)", className),
|
|
3584
4195
|
...props,
|
|
3585
|
-
children: children ?? /* @__PURE__ */
|
|
4196
|
+
children: children ?? /* @__PURE__ */ jsx44(ChevronRight, {})
|
|
3586
4197
|
}
|
|
3587
4198
|
);
|
|
3588
4199
|
}
|
|
@@ -3590,7 +4201,7 @@ function BreadcrumbEllipsis({
|
|
|
3590
4201
|
className,
|
|
3591
4202
|
...props
|
|
3592
4203
|
}) {
|
|
3593
|
-
return /* @__PURE__ */
|
|
4204
|
+
return /* @__PURE__ */ jsxs31(
|
|
3594
4205
|
"span",
|
|
3595
4206
|
{
|
|
3596
4207
|
"data-slot": "breadcrumb-ellipsis",
|
|
@@ -3599,112 +4210,48 @@ function BreadcrumbEllipsis({
|
|
|
3599
4210
|
className: cn("flex size-9 items-center justify-center", className),
|
|
3600
4211
|
...props,
|
|
3601
4212
|
children: [
|
|
3602
|
-
/* @__PURE__ */
|
|
3603
|
-
/* @__PURE__ */
|
|
4213
|
+
/* @__PURE__ */ jsx44(Ellipsis, { className: "size-4" }),
|
|
4214
|
+
/* @__PURE__ */ jsx44("span", { className: "sr-only", children: "More" })
|
|
3604
4215
|
]
|
|
3605
4216
|
}
|
|
3606
4217
|
);
|
|
3607
4218
|
}
|
|
3608
4219
|
|
|
3609
|
-
// src/components/ui/dropdown-menu.tsx
|
|
3610
|
-
import "react";
|
|
3611
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3612
|
-
import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3613
|
-
function DropdownMenu({
|
|
3614
|
-
...props
|
|
3615
|
-
}) {
|
|
3616
|
-
return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
3617
|
-
}
|
|
3618
|
-
function DropdownMenuTrigger({
|
|
3619
|
-
...props
|
|
3620
|
-
}) {
|
|
3621
|
-
return /* @__PURE__ */ jsx41(
|
|
3622
|
-
DropdownMenuPrimitive.Trigger,
|
|
3623
|
-
{
|
|
3624
|
-
"data-slot": "dropdown-menu-trigger",
|
|
3625
|
-
...props
|
|
3626
|
-
}
|
|
3627
|
-
);
|
|
3628
|
-
}
|
|
3629
|
-
function DropdownMenuContent({
|
|
3630
|
-
className,
|
|
3631
|
-
sideOffset = 4,
|
|
3632
|
-
...props
|
|
3633
|
-
}) {
|
|
3634
|
-
return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx41(
|
|
3635
|
-
DropdownMenuPrimitive.Content,
|
|
3636
|
-
{
|
|
3637
|
-
"data-slot": "dropdown-menu-content",
|
|
3638
|
-
sideOffset,
|
|
3639
|
-
className: cn(
|
|
3640
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
3641
|
-
className
|
|
3642
|
-
),
|
|
3643
|
-
...props
|
|
3644
|
-
}
|
|
3645
|
-
) });
|
|
3646
|
-
}
|
|
3647
|
-
function DropdownMenuGroup({
|
|
3648
|
-
...props
|
|
3649
|
-
}) {
|
|
3650
|
-
return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
3651
|
-
}
|
|
3652
|
-
function DropdownMenuItem({
|
|
3653
|
-
className,
|
|
3654
|
-
inset,
|
|
3655
|
-
variant = "default",
|
|
3656
|
-
...props
|
|
3657
|
-
}) {
|
|
3658
|
-
return /* @__PURE__ */ jsx41(
|
|
3659
|
-
DropdownMenuPrimitive.Item,
|
|
3660
|
-
{
|
|
3661
|
-
"data-slot": "dropdown-menu-item",
|
|
3662
|
-
"data-inset": inset,
|
|
3663
|
-
"data-variant": variant,
|
|
3664
|
-
className: cn(
|
|
3665
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3666
|
-
className
|
|
3667
|
-
),
|
|
3668
|
-
...props
|
|
3669
|
-
}
|
|
3670
|
-
);
|
|
3671
|
-
}
|
|
3672
|
-
|
|
3673
4220
|
// src/components/Navigation/Breadcrumbs.tsx
|
|
3674
|
-
import { jsx as
|
|
4221
|
+
import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3675
4222
|
var breadcrumbSeparatorVariants = "size-5 relative bottom-1 [&>svg]:text-secondary group-disabled:text-secondary";
|
|
3676
4223
|
var breadcrumbItemBase = "h6-title text-secondary hover:text-primary-hover";
|
|
3677
|
-
var Breadcrumbs =
|
|
4224
|
+
var Breadcrumbs = React43.forwardRef(
|
|
3678
4225
|
(props, ref) => {
|
|
3679
4226
|
const { separator, ellipsis, children, className, ...rest } = props;
|
|
3680
|
-
const items =
|
|
4227
|
+
const items = React43.Children.toArray(children).filter(Boolean);
|
|
3681
4228
|
const shouldCollapse = Boolean(ellipsis) && items.length >= 5;
|
|
3682
4229
|
const hiddenItems = shouldCollapse ? items.slice(1, -2) : [];
|
|
3683
4230
|
const displayItems = shouldCollapse ? [items[0], "__ELLIPSIS__", items[items.length - 2], items[items.length - 1]] : items;
|
|
3684
|
-
return /* @__PURE__ */
|
|
4231
|
+
return /* @__PURE__ */ jsx45(Breadcrumb, { ref, className, ...rest, children: /* @__PURE__ */ jsx45(BreadcrumbList, { children: displayItems.map((child, index) => {
|
|
3685
4232
|
const isEllipsis = child === "__ELLIPSIS__";
|
|
3686
|
-
const key = isEllipsis ? "__ellipsis" :
|
|
4233
|
+
const key = isEllipsis ? "__ellipsis" : React43.isValidElement(child) && child.key != null ? String(child.key) : String(index);
|
|
3687
4234
|
const isLast = index === displayItems.length - 1;
|
|
3688
|
-
return /* @__PURE__ */
|
|
3689
|
-
isEllipsis ? /* @__PURE__ */
|
|
3690
|
-
/* @__PURE__ */
|
|
4235
|
+
return /* @__PURE__ */ jsxs32(React43.Fragment, { children: [
|
|
4236
|
+
isEllipsis ? /* @__PURE__ */ jsx45(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ jsxs32(DropdownMenu, { children: [
|
|
4237
|
+
/* @__PURE__ */ jsx45(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx45(
|
|
3691
4238
|
"button",
|
|
3692
4239
|
{
|
|
3693
4240
|
type: "button",
|
|
3694
4241
|
className: "inline-flex size-8 items-center justify-center rounded-4 hover:bg-(--background-secondary) focus-ring-primary text-secondary",
|
|
3695
4242
|
"aria-label": "Open breadcrumb menu",
|
|
3696
|
-
children: /* @__PURE__ */
|
|
4243
|
+
children: /* @__PURE__ */ jsx45(BreadcrumbEllipsis, {})
|
|
3697
4244
|
}
|
|
3698
4245
|
) }),
|
|
3699
|
-
/* @__PURE__ */
|
|
4246
|
+
/* @__PURE__ */ jsx45(
|
|
3700
4247
|
DropdownMenuContent,
|
|
3701
4248
|
{
|
|
3702
4249
|
align: "start",
|
|
3703
4250
|
className: "bg-(--background-neutral) border-(--border-secondary-hover) shadow-card-md rounded-4",
|
|
3704
|
-
children: /* @__PURE__ */
|
|
3705
|
-
const hiddenKey =
|
|
3706
|
-
if (
|
|
3707
|
-
return /* @__PURE__ */
|
|
4251
|
+
children: /* @__PURE__ */ jsx45(DropdownMenuGroup, { children: hiddenItems.map((hidden, hiddenIndex) => {
|
|
4252
|
+
const hiddenKey = React43.isValidElement(hidden) && hidden.key != null ? String(hidden.key) : `hidden-${hiddenIndex}`;
|
|
4253
|
+
if (React43.isValidElement(hidden)) {
|
|
4254
|
+
return /* @__PURE__ */ jsx45(
|
|
3708
4255
|
DropdownMenuItem,
|
|
3709
4256
|
{
|
|
3710
4257
|
asChild: true,
|
|
@@ -3714,7 +4261,7 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3714
4261
|
hiddenKey
|
|
3715
4262
|
);
|
|
3716
4263
|
}
|
|
3717
|
-
return /* @__PURE__ */
|
|
4264
|
+
return /* @__PURE__ */ jsx45(
|
|
3718
4265
|
DropdownMenuItem,
|
|
3719
4266
|
{
|
|
3720
4267
|
className: "cursor-pointer paragraph-md text-primary focus:bg-(--background-secondary)",
|
|
@@ -3725,14 +4272,14 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3725
4272
|
}) })
|
|
3726
4273
|
}
|
|
3727
4274
|
)
|
|
3728
|
-
] }) }) : isLast ? /* @__PURE__ */
|
|
4275
|
+
] }) }) : isLast ? /* @__PURE__ */ jsx45(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ jsx45(
|
|
3729
4276
|
BreadcrumbPage,
|
|
3730
4277
|
{
|
|
3731
4278
|
className: cn("h6-title-medium cursor-pointer", props.breadcrumbPageClassName),
|
|
3732
4279
|
children: child
|
|
3733
4280
|
}
|
|
3734
|
-
) }) : /* @__PURE__ */
|
|
3735
|
-
!isLast && /* @__PURE__ */
|
|
4281
|
+
) }) : /* @__PURE__ */ jsx45(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: child }),
|
|
4282
|
+
!isLast && /* @__PURE__ */ jsx45(BreadcrumbSeparator, { className: cn(breadcrumbSeparatorVariants, props.separatorClassName), children: separator })
|
|
3736
4283
|
] }, key);
|
|
3737
4284
|
}) }) });
|
|
3738
4285
|
}
|
|
@@ -3740,16 +4287,16 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3740
4287
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
3741
4288
|
|
|
3742
4289
|
// src/components/Logo/LogoIcon.tsx
|
|
3743
|
-
import { cva as
|
|
3744
|
-
import { jsx as
|
|
3745
|
-
var LogoIconSvg = (props) => /* @__PURE__ */
|
|
3746
|
-
/* @__PURE__ */
|
|
3747
|
-
/* @__PURE__ */
|
|
3748
|
-
/* @__PURE__ */
|
|
3749
|
-
/* @__PURE__ */
|
|
3750
|
-
/* @__PURE__ */
|
|
4290
|
+
import { cva as cva21 } from "class-variance-authority";
|
|
4291
|
+
import { jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4292
|
+
var LogoIconSvg = (props) => /* @__PURE__ */ jsxs33("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
4293
|
+
/* @__PURE__ */ jsx46("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M83.7156 3.88535C78.5352 -1.29512 70.136 -1.29512 64.9555 3.88535L43.9999 24.8409L43.9995 24.8405L62.3536 6.48637C52.2379 16.5949 35.8584 16.6179 25.7142 6.55523L23.4434 4.28438C18.2629 -0.896082 9.86373 -0.89608 4.68327 4.28438C-0.497191 9.46484 -0.49719 17.864 4.68327 23.0445L6.88526 25.2465C17.0191 35.3875 17.0168 51.8235 6.87859 61.9618L25.2395 43.6008L25.2398 43.601L3.88534 64.9555C-1.29512 70.136 -1.29511 78.5351 3.88535 83.7156C9.06581 88.8961 17.465 88.8961 22.6455 83.7156L25.6458 80.7151L25.6864 80.6747C35.7981 70.6137 52.1313 70.597 62.2636 80.6248L65.7534 84.1146C70.9339 89.2951 79.3331 89.2951 84.5135 84.1146C89.694 78.9342 89.694 70.535 84.5135 65.3545L62.76 43.601L62.7602 43.6009L81.1144 61.9552C70.9806 51.8142 70.9829 35.3782 81.1211 25.24L83.7156 22.6455C88.8961 17.465 88.8961 9.06581 83.7156 3.88535Z", fill: "#1685FF" }),
|
|
4294
|
+
/* @__PURE__ */ jsx46("path", { d: "M44.0667 50.4863C44.1213 50.4317 44.21 50.4317 44.2646 50.4863L48.6465 54.8682C48.6942 54.9158 48.7011 54.9907 48.663 55.0463L44.2812 61.4453C44.2256 61.5265 44.1057 61.5265 44.0501 61.4453L39.6683 55.0463C39.6302 54.9907 39.6371 54.9158 39.6848 54.8682L44.0667 50.4863Z", fill: "white" }),
|
|
4295
|
+
/* @__PURE__ */ jsx46("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M44.107 45.3938C44.0536 45.289 43.9013 45.289 43.8479 45.3938C41.8622 49.293 37.8104 51.9638 33.1347 51.9638C26.4991 51.9638 21.1199 46.5846 21.1199 39.9489C21.1199 33.3133 26.4991 27.9341 33.1347 27.9341C37.8104 27.9341 41.8622 30.6049 43.8479 34.5041C43.9013 34.6089 44.0536 34.6089 44.107 34.5041C46.0926 30.6049 50.1445 27.9341 54.8201 27.9341C61.4558 27.9341 66.835 33.3133 66.835 39.9489C66.835 46.5846 61.4558 51.9638 54.8201 51.9638C50.1445 51.9638 46.0926 49.293 44.107 45.3938Z", fill: "white" }),
|
|
4296
|
+
/* @__PURE__ */ jsx46("path", { d: "M60.1113 40.0006C60.1113 43.052 57.6377 45.5256 54.5863 45.5256C51.535 45.5256 49.0614 43.052 49.0614 40.0006C49.0614 36.9493 51.535 34.4757 54.5863 34.4757C57.6377 34.4757 60.1113 36.9493 60.1113 40.0006Z", fill: "#1685FF" }),
|
|
4297
|
+
/* @__PURE__ */ jsx46("path", { d: "M38.8954 40.0006C38.8954 43.052 36.4218 45.5256 33.3705 45.5256C30.3192 45.5256 27.8456 43.052 27.8456 40.0006C27.8456 36.9493 30.3192 34.4757 33.3705 34.4757C36.4218 34.4757 38.8954 36.9493 38.8954 40.0006Z", fill: "#1685FF" })
|
|
3751
4298
|
] });
|
|
3752
|
-
var logoIconVariants =
|
|
4299
|
+
var logoIconVariants = cva21(
|
|
3753
4300
|
"relative bg-linear-to-t from-gray-800 to-gray-950 overflow-hidden flex justify-center items-center",
|
|
3754
4301
|
{
|
|
3755
4302
|
variants: {
|
|
@@ -3774,28 +4321,28 @@ var logoIconSizeClass = {
|
|
|
3774
4321
|
xl: "size-96"
|
|
3775
4322
|
};
|
|
3776
4323
|
var LogoIcon = ({ className, size = "md" }) => {
|
|
3777
|
-
return /* @__PURE__ */
|
|
4324
|
+
return /* @__PURE__ */ jsx46("div", { className: cn(logoIconVariants({ size }), className), children: /* @__PURE__ */ jsx46(LogoIconSvg, { className: logoIconSizeClass[size] }) });
|
|
3778
4325
|
};
|
|
3779
4326
|
|
|
3780
4327
|
// src/components/Logo/Logo.tsx
|
|
3781
|
-
import { cva as
|
|
3782
|
-
import { jsx as
|
|
3783
|
-
var LogoIconSvg2 = (props) => /* @__PURE__ */
|
|
3784
|
-
/* @__PURE__ */
|
|
3785
|
-
/* @__PURE__ */
|
|
3786
|
-
/* @__PURE__ */
|
|
3787
|
-
/* @__PURE__ */
|
|
3788
|
-
/* @__PURE__ */
|
|
4328
|
+
import { cva as cva22 } from "class-variance-authority";
|
|
4329
|
+
import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4330
|
+
var LogoIconSvg2 = (props) => /* @__PURE__ */ jsxs34("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
4331
|
+
/* @__PURE__ */ jsx47("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M83.7156 3.88535C78.5352 -1.29512 70.136 -1.29512 64.9555 3.88535L43.9999 24.8409L43.9995 24.8405L62.3536 6.48637C52.2379 16.5949 35.8584 16.6179 25.7142 6.55523L23.4434 4.28438C18.2629 -0.896082 9.86373 -0.89608 4.68327 4.28438C-0.497191 9.46484 -0.49719 17.864 4.68327 23.0445L6.88526 25.2465C17.0191 35.3875 17.0168 51.8235 6.87859 61.9618L25.2395 43.6008L25.2398 43.601L3.88534 64.9555C-1.29512 70.136 -1.29511 78.5351 3.88535 83.7156C9.06581 88.8961 17.465 88.8961 22.6455 83.7156L25.6458 80.7151L25.6864 80.6747C35.7981 70.6137 52.1313 70.597 62.2636 80.6248L65.7534 84.1146C70.9339 89.2951 79.3331 89.2951 84.5135 84.1146C89.694 78.9342 89.694 70.535 84.5135 65.3545L62.76 43.601L62.7602 43.6009L81.1144 61.9552C70.9806 51.8142 70.9829 35.3782 81.1211 25.24L83.7156 22.6455C88.8961 17.465 88.8961 9.06581 83.7156 3.88535Z", fill: "#1685FF" }),
|
|
4332
|
+
/* @__PURE__ */ jsx47("path", { d: "M44.0667 50.4863C44.1213 50.4317 44.21 50.4317 44.2646 50.4863L48.6465 54.8682C48.6942 54.9158 48.7011 54.9907 48.663 55.0463L44.2812 61.4453C44.2256 61.5265 44.1057 61.5265 44.0501 61.4453L39.6683 55.0463C39.6302 54.9907 39.6371 54.9158 39.6848 54.8682L44.0667 50.4863Z", fill: "white" }),
|
|
4333
|
+
/* @__PURE__ */ jsx47("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M44.107 45.3938C44.0536 45.289 43.9013 45.289 43.8479 45.3938C41.8622 49.293 37.8104 51.9638 33.1347 51.9638C26.4991 51.9638 21.1199 46.5846 21.1199 39.9489C21.1199 33.3133 26.4991 27.9341 33.1347 27.9341C37.8104 27.9341 41.8622 30.6049 43.8479 34.5041C43.9013 34.6089 44.0536 34.6089 44.107 34.5041C46.0926 30.6049 50.1445 27.9341 54.8201 27.9341C61.4558 27.9341 66.835 33.3133 66.835 39.9489C66.835 46.5846 61.4558 51.9638 54.8201 51.9638C50.1445 51.9638 46.0926 49.293 44.107 45.3938Z", fill: "white" }),
|
|
4334
|
+
/* @__PURE__ */ jsx47("path", { d: "M60.1113 40.0006C60.1113 43.052 57.6377 45.5256 54.5863 45.5256C51.535 45.5256 49.0614 43.052 49.0614 40.0006C49.0614 36.9493 51.535 34.4757 54.5863 34.4757C57.6377 34.4757 60.1113 36.9493 60.1113 40.0006Z", fill: "#1685FF" }),
|
|
4335
|
+
/* @__PURE__ */ jsx47("path", { d: "M38.8954 40.0006C38.8954 43.052 36.4218 45.5256 33.3705 45.5256C30.3192 45.5256 27.8456 43.052 27.8456 40.0006C27.8456 36.9493 30.3192 34.4757 33.3705 34.4757C36.4218 34.4757 38.8954 36.9493 38.8954 40.0006Z", fill: "#1685FF" })
|
|
3789
4336
|
] });
|
|
3790
|
-
var LogoTextSvg = (props) => /* @__PURE__ */
|
|
3791
|
-
/* @__PURE__ */
|
|
3792
|
-
/* @__PURE__ */
|
|
3793
|
-
/* @__PURE__ */
|
|
3794
|
-
/* @__PURE__ */
|
|
3795
|
-
/* @__PURE__ */
|
|
3796
|
-
/* @__PURE__ */
|
|
4337
|
+
var LogoTextSvg = (props) => /* @__PURE__ */ jsxs34("svg", { width: "111", height: "32", viewBox: "0 0 111 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
4338
|
+
/* @__PURE__ */ jsx47("path", { d: "M72.7324 20.9658C72.7324 14.4559 77.4246 9.9751 83.8922 9.9751C90.3598 9.9751 95.052 14.4559 95.052 20.9658C95.052 27.4757 90.3598 31.9565 83.8922 31.9565C77.4246 31.9565 72.7324 27.4757 72.7324 20.9658ZM77.8896 20.9658C77.8896 24.7703 80.3414 27.3489 83.8922 27.3489C87.4431 27.3489 89.8948 24.7703 89.8948 20.9658C89.8948 17.1613 87.4431 14.5827 83.8922 14.5827C80.3414 14.5827 77.8896 17.1613 77.8896 20.9658Z", fill: "currentColor" }),
|
|
4339
|
+
/* @__PURE__ */ jsx47("path", { d: "M53.4056 31.4503H48.6289V0H53.7861V13.6116C55.1388 11.2866 57.9287 9.89163 61.0991 9.89163C67.0595 9.89163 70.6949 14.5415 70.6949 21.136C70.6949 27.5613 66.7636 31.9998 60.761 31.9998C57.6328 31.9998 54.9697 30.6049 53.7438 28.1954L53.4056 31.4503ZM53.8284 20.9246C53.8284 24.6868 56.1533 27.2654 59.7042 27.2654C63.3395 27.2654 65.4954 24.6445 65.4954 20.9246C65.4954 17.2047 63.3395 14.5415 59.7042 14.5415C56.1533 14.5415 53.8284 17.1624 53.8284 20.9246Z", fill: "currentColor" }),
|
|
4340
|
+
/* @__PURE__ */ jsx47("path", { d: "M38.9929 10.5681H44.15V31.4504H39.3733L38.9929 28.6605C37.7247 30.6473 35.0193 32 32.2293 32C27.4103 32 24.5781 28.745 24.5781 23.6301V10.5681H29.7353V21.8124C29.7353 25.786 31.2994 27.3923 34.1739 27.3923C37.4288 27.3923 38.9929 25.4901 38.9929 21.5165V10.5681Z", fill: "currentColor" }),
|
|
4341
|
+
/* @__PURE__ */ jsx47("path", { d: "M4.77673 31.4503H0V0H5.15718V13.6116C6.50988 11.2866 9.29983 9.89163 12.4702 9.89163C18.4306 9.89163 22.066 14.5415 22.066 21.136C22.066 27.5613 18.1347 31.9998 12.132 31.9998C9.00392 31.9998 6.34079 30.6049 5.1149 28.1954L4.77673 31.4503ZM5.19945 20.9246C5.19945 24.6868 7.52441 27.2654 11.0752 27.2654C14.7106 27.2654 16.8665 24.6445 16.8665 20.9246C16.8665 17.2047 14.7106 14.5415 11.0752 14.5415C7.52441 14.5415 5.19945 17.1624 5.19945 20.9246Z", fill: "currentColor" }),
|
|
4342
|
+
/* @__PURE__ */ jsx47("path", { d: "M103.555 0.5C107.084 0.5 109.944 3.36029 109.944 6.88867C109.944 10.4172 107.084 13.2773 103.555 13.2773C100.027 13.2772 97.1667 10.4171 97.1667 6.88867C97.1669 3.36036 100.027 0.500118 103.555 0.5Z", stroke: "currentColor" }),
|
|
4343
|
+
/* @__PURE__ */ jsx47("path", { d: "M105.778 9.98355L101.687 10.0001V9.00978L103.578 7.33457C104.19 6.79817 104.445 6.41856 104.445 5.91517C104.445 5.29625 104.159 4.96616 103.647 4.96616C103.113 4.96616 102.803 5.35402 102.803 6.03896H101.556C101.556 4.66908 102.377 3.77783 103.64 3.77783C104.949 3.77783 105.731 4.52879 105.731 5.83265C105.731 6.66613 105.259 7.34282 104.546 7.97825L103.686 8.74571H105.778V9.98355Z", fill: "currentColor" })
|
|
3797
4344
|
] });
|
|
3798
|
-
var logoWrapperVariants =
|
|
4345
|
+
var logoWrapperVariants = cva22("inline-flex", {
|
|
3799
4346
|
variants: {
|
|
3800
4347
|
variant: {
|
|
3801
4348
|
inline: ["w-44", "h-12", "justify-start", "items-center", "gap-4"],
|
|
@@ -3807,7 +4354,7 @@ var logoWrapperVariants = cva20("inline-flex", {
|
|
|
3807
4354
|
variant: "inline"
|
|
3808
4355
|
}
|
|
3809
4356
|
});
|
|
3810
|
-
var logoIconSizeVariants =
|
|
4357
|
+
var logoIconSizeVariants = cva22("", {
|
|
3811
4358
|
variants: {
|
|
3812
4359
|
variant: {
|
|
3813
4360
|
inline: "size-12",
|
|
@@ -3819,7 +4366,7 @@ var logoIconSizeVariants = cva20("", {
|
|
|
3819
4366
|
variant: "inline"
|
|
3820
4367
|
}
|
|
3821
4368
|
});
|
|
3822
|
-
var logoTextSizeVariants =
|
|
4369
|
+
var logoTextSizeVariants = cva22("", {
|
|
3823
4370
|
variants: {
|
|
3824
4371
|
variant: {
|
|
3825
4372
|
inline: "h-8 w-27.5",
|
|
@@ -3833,12 +4380,14 @@ var logoTextSizeVariants = cva20("", {
|
|
|
3833
4380
|
});
|
|
3834
4381
|
var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
3835
4382
|
const textColorClass = textColor === "light" ? "text-(--color-b-white)" : textColor === "dark" ? "text-(--color-b-black)" : "text-primary";
|
|
3836
|
-
return /* @__PURE__ */
|
|
3837
|
-
/* @__PURE__ */
|
|
3838
|
-
/* @__PURE__ */
|
|
4383
|
+
return /* @__PURE__ */ jsxs34("div", { className: cn(logoWrapperVariants({ variant }), className), children: [
|
|
4384
|
+
/* @__PURE__ */ jsx47(LogoIconSvg2, { className: logoIconSizeVariants({ variant }) }),
|
|
4385
|
+
/* @__PURE__ */ jsx47(LogoTextSvg, { className: cn(logoTextSizeVariants({ variant }), textColorClass) })
|
|
3839
4386
|
] });
|
|
3840
4387
|
};
|
|
3841
4388
|
export {
|
|
4389
|
+
Accordion,
|
|
4390
|
+
Autocomplete,
|
|
3842
4391
|
Avatar,
|
|
3843
4392
|
Badge,
|
|
3844
4393
|
BadgeDigit,
|
|
@@ -3855,6 +4404,16 @@ export {
|
|
|
3855
4404
|
LinkButton,
|
|
3856
4405
|
Logo,
|
|
3857
4406
|
LogoIcon,
|
|
4407
|
+
Menu,
|
|
4408
|
+
MenuGroup,
|
|
4409
|
+
MenuItem,
|
|
4410
|
+
MenuLabel,
|
|
4411
|
+
MenuPortal,
|
|
4412
|
+
MenuSeparator,
|
|
4413
|
+
MenuShortcut,
|
|
4414
|
+
MenuSub,
|
|
4415
|
+
MenuSubContent,
|
|
4416
|
+
MenuSubTrigger,
|
|
3858
4417
|
MessageButton,
|
|
3859
4418
|
PasswordInput,
|
|
3860
4419
|
PhoneInput,
|