@bubo-squared/ui-framework 0.2.14 → 0.2.15
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 +1140 -544
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +107 -24
- package/dist/index.d.ts +107 -24
- package/dist/index.js +1129 -545
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
Accordion: () => Accordion,
|
|
34
|
+
Autocomplete: () => Autocomplete,
|
|
33
35
|
Avatar: () => Avatar,
|
|
34
36
|
Badge: () => Badge,
|
|
35
37
|
BadgeDigit: () => BadgeDigit,
|
|
@@ -46,6 +48,16 @@ __export(index_exports, {
|
|
|
46
48
|
LinkButton: () => LinkButton,
|
|
47
49
|
Logo: () => Logo,
|
|
48
50
|
LogoIcon: () => LogoIcon,
|
|
51
|
+
Menu: () => Menu,
|
|
52
|
+
MenuGroup: () => MenuGroup,
|
|
53
|
+
MenuItem: () => MenuItem,
|
|
54
|
+
MenuLabel: () => MenuLabel,
|
|
55
|
+
MenuPortal: () => MenuPortal,
|
|
56
|
+
MenuSeparator: () => MenuSeparator,
|
|
57
|
+
MenuShortcut: () => MenuShortcut,
|
|
58
|
+
MenuSub: () => MenuSub,
|
|
59
|
+
MenuSubContent: () => MenuSubContent,
|
|
60
|
+
MenuSubTrigger: () => MenuSubTrigger,
|
|
49
61
|
MessageButton: () => MessageButton,
|
|
50
62
|
PasswordInput: () => PasswordInput,
|
|
51
63
|
PhoneInput: () => PhoneInput,
|
|
@@ -446,12 +458,77 @@ var MessageButton = (props) => {
|
|
|
446
458
|
};
|
|
447
459
|
MessageButton.displayName = "MessageButton";
|
|
448
460
|
|
|
449
|
-
// src/components/Content/
|
|
461
|
+
// src/components/Content/Accordion.tsx
|
|
450
462
|
var React6 = __toESM(require("react"), 1);
|
|
451
|
-
var
|
|
452
|
-
var import_class_variance_authority6 = require("class-variance-authority");
|
|
463
|
+
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"), 1);
|
|
453
464
|
var import_icons = require("@bubo-squared/icons");
|
|
454
465
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
466
|
+
var Accordion = React6.forwardRef(
|
|
467
|
+
(props, ref) => {
|
|
468
|
+
const {
|
|
469
|
+
title,
|
|
470
|
+
expandIcon,
|
|
471
|
+
children,
|
|
472
|
+
className,
|
|
473
|
+
defaultOpen = false,
|
|
474
|
+
bordered = false,
|
|
475
|
+
...rootProps
|
|
476
|
+
} = props;
|
|
477
|
+
const {
|
|
478
|
+
value,
|
|
479
|
+
defaultValue,
|
|
480
|
+
onValueChange,
|
|
481
|
+
...restRootProps
|
|
482
|
+
} = rootProps;
|
|
483
|
+
const resolvedDefaultValue = value === void 0 && defaultValue === void 0 && defaultOpen ? "item" : defaultValue;
|
|
484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
485
|
+
AccordionPrimitive.Root,
|
|
486
|
+
{
|
|
487
|
+
ref,
|
|
488
|
+
type: "single",
|
|
489
|
+
collapsible: true,
|
|
490
|
+
className: cn("w-full", className),
|
|
491
|
+
value,
|
|
492
|
+
defaultValue: resolvedDefaultValue,
|
|
493
|
+
onValueChange,
|
|
494
|
+
...restRootProps,
|
|
495
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
496
|
+
AccordionPrimitive.Item,
|
|
497
|
+
{
|
|
498
|
+
value: "item",
|
|
499
|
+
className: cn(bordered ? "border rounded-4" : "border-b", "border-(--border-secondary) px-4"),
|
|
500
|
+
children: [
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
502
|
+
AccordionPrimitive.Trigger,
|
|
503
|
+
{
|
|
504
|
+
className: cn(
|
|
505
|
+
"flex w-full items-center justify-between gap-2 py-3 text-left",
|
|
506
|
+
"paragraph-md text-primary",
|
|
507
|
+
"[&[data-state=open]_.accordion-icon]:rotate-180",
|
|
508
|
+
"disabled:cursor-not-allowed disabled:text-primary-disabled cursor-pointer"
|
|
509
|
+
),
|
|
510
|
+
children: [
|
|
511
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "flex-1", children: title }),
|
|
512
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "accordion-icon inline-flex shrink-0 transition-transform duration-200 [&>svg]:size-5", children: expandIcon ?? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons.ChevronDownIcon, {}) })
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
) }),
|
|
516
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AccordionPrimitive.Content, { className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "pb-3", children }) })
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
)
|
|
520
|
+
}
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
Accordion.displayName = "Accordion";
|
|
525
|
+
|
|
526
|
+
// src/components/Content/Avatar.tsx
|
|
527
|
+
var React7 = __toESM(require("react"), 1);
|
|
528
|
+
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
529
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
530
|
+
var import_icons2 = require("@bubo-squared/icons");
|
|
531
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
455
532
|
var avatarVariants = (0, import_class_variance_authority6.cva)(
|
|
456
533
|
"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",
|
|
457
534
|
{
|
|
@@ -509,7 +586,7 @@ var avatarIconVariants = (0, import_class_variance_authority6.cva)(
|
|
|
509
586
|
}
|
|
510
587
|
}
|
|
511
588
|
);
|
|
512
|
-
var Avatar =
|
|
589
|
+
var Avatar = React7.forwardRef(
|
|
513
590
|
(props, ref) => {
|
|
514
591
|
const {
|
|
515
592
|
asChild = false,
|
|
@@ -523,14 +600,14 @@ var Avatar = React6.forwardRef(
|
|
|
523
600
|
} = props;
|
|
524
601
|
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
525
602
|
const hasImage = variant === "image" && typeof src === "string" && src.length > 0;
|
|
526
|
-
return /* @__PURE__ */ (0,
|
|
603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
527
604
|
Comp,
|
|
528
605
|
{
|
|
529
606
|
ref,
|
|
530
607
|
className: cn(avatarVariants({ size }), className),
|
|
531
608
|
...rest,
|
|
532
609
|
children: [
|
|
533
|
-
hasImage ? /* @__PURE__ */ (0,
|
|
610
|
+
hasImage ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
534
611
|
"img",
|
|
535
612
|
{
|
|
536
613
|
src,
|
|
@@ -538,8 +615,8 @@ var Avatar = React6.forwardRef(
|
|
|
538
615
|
className: "w-full h-full object-cover"
|
|
539
616
|
}
|
|
540
617
|
) : null,
|
|
541
|
-
!hasImage && variant === "initial" && /* @__PURE__ */ (0,
|
|
542
|
-
!hasImage && variant === "icon" && /* @__PURE__ */ (0,
|
|
618
|
+
!hasImage && variant === "initial" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(avatarInitialsVariants({ size }), "relative bottom-px"), children: initials }),
|
|
619
|
+
!hasImage && variant === "icon" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(avatarIconVariants({ size })), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons2.UserIcon, {}) })
|
|
543
620
|
]
|
|
544
621
|
}
|
|
545
622
|
);
|
|
@@ -548,8 +625,8 @@ var Avatar = React6.forwardRef(
|
|
|
548
625
|
Avatar.displayName = "Avatar";
|
|
549
626
|
|
|
550
627
|
// src/components/Content/Typography.tsx
|
|
551
|
-
var
|
|
552
|
-
var
|
|
628
|
+
var React8 = require("react");
|
|
629
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
553
630
|
var mbCapableBaseClasses = /* @__PURE__ */ new Set([
|
|
554
631
|
"h1-intro",
|
|
555
632
|
"h2-intro",
|
|
@@ -585,7 +662,7 @@ var Typography = (props) => {
|
|
|
585
662
|
const Comp = as ?? "span";
|
|
586
663
|
const mbClassName = useMargin ? getMbClassName(variant) : null;
|
|
587
664
|
const weightClassName = weight === "regular" ? null : `${variant}-${weight}`;
|
|
588
|
-
return /* @__PURE__ */ (0,
|
|
665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
589
666
|
Comp,
|
|
590
667
|
{
|
|
591
668
|
className: cn("text-primary", variant, weightClassName, mbClassName, className),
|
|
@@ -597,10 +674,10 @@ var Typography = (props) => {
|
|
|
597
674
|
Typography.displayName = "Typography";
|
|
598
675
|
|
|
599
676
|
// src/components/Content/Badge.tsx
|
|
600
|
-
var
|
|
677
|
+
var React9 = __toESM(require("react"), 1);
|
|
601
678
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
602
679
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
603
|
-
var
|
|
680
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
604
681
|
var badgeVariants = (0, import_class_variance_authority7.cva)(
|
|
605
682
|
"inline-flex items-center justify-center rounded-4 leading-none whitespace-nowrap gap-1 px-1 py-0",
|
|
606
683
|
{
|
|
@@ -630,7 +707,7 @@ var badgeVariants = (0, import_class_variance_authority7.cva)(
|
|
|
630
707
|
}
|
|
631
708
|
}
|
|
632
709
|
);
|
|
633
|
-
var Badge =
|
|
710
|
+
var Badge = React9.forwardRef(
|
|
634
711
|
(props, ref) => {
|
|
635
712
|
const {
|
|
636
713
|
asChild = false,
|
|
@@ -642,17 +719,17 @@ var Badge = React8.forwardRef(
|
|
|
642
719
|
...rest
|
|
643
720
|
} = props;
|
|
644
721
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
645
|
-
return /* @__PURE__ */ (0,
|
|
722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
646
723
|
Comp,
|
|
647
724
|
{
|
|
648
725
|
ref,
|
|
649
726
|
className: cn(badgeVariants({ size, variant }), className),
|
|
650
727
|
...rest,
|
|
651
|
-
children: value ? /* @__PURE__ */ (0,
|
|
652
|
-
/* @__PURE__ */ (0,
|
|
653
|
-
/* @__PURE__ */ (0,
|
|
654
|
-
/* @__PURE__ */ (0,
|
|
655
|
-
] }) : /* @__PURE__ */ (0,
|
|
728
|
+
children: value ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
729
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-normal", children: label }),
|
|
730
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-normal", children: ":" }),
|
|
731
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-medium", children: value })
|
|
732
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-normal", children: label })
|
|
656
733
|
}
|
|
657
734
|
);
|
|
658
735
|
}
|
|
@@ -660,9 +737,9 @@ var Badge = React8.forwardRef(
|
|
|
660
737
|
Badge.displayName = "Badge";
|
|
661
738
|
|
|
662
739
|
// src/components/Content/BadgeDigit.tsx
|
|
663
|
-
var
|
|
740
|
+
var React10 = __toESM(require("react"), 1);
|
|
664
741
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
665
|
-
var
|
|
742
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
666
743
|
var badgeDigitVariants = (0, import_class_variance_authority8.cva)(
|
|
667
744
|
"inline-flex items-center justify-center leading-none whitespace-nowrap text-(--color-b-white)",
|
|
668
745
|
{
|
|
@@ -687,7 +764,7 @@ var badgeDigitVariants = (0, import_class_variance_authority8.cva)(
|
|
|
687
764
|
}
|
|
688
765
|
}
|
|
689
766
|
);
|
|
690
|
-
var BadgeDigit =
|
|
767
|
+
var BadgeDigit = React10.forwardRef(
|
|
691
768
|
(props, ref) => {
|
|
692
769
|
const {
|
|
693
770
|
value,
|
|
@@ -696,7 +773,7 @@ var BadgeDigit = React9.forwardRef(
|
|
|
696
773
|
className,
|
|
697
774
|
...rest
|
|
698
775
|
} = props;
|
|
699
|
-
return /* @__PURE__ */ (0,
|
|
776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
700
777
|
"div",
|
|
701
778
|
{
|
|
702
779
|
ref,
|
|
@@ -710,9 +787,9 @@ var BadgeDigit = React9.forwardRef(
|
|
|
710
787
|
BadgeDigit.displayName = "BadgeDigit";
|
|
711
788
|
|
|
712
789
|
// src/components/Content/BadgeDot.tsx
|
|
713
|
-
var
|
|
790
|
+
var React11 = require("react");
|
|
714
791
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
715
|
-
var
|
|
792
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
716
793
|
var badgeDotVariants = (0, import_class_variance_authority9.cva)("rounded-12 size-3", {
|
|
717
794
|
variants: {
|
|
718
795
|
status: {
|
|
@@ -728,14 +805,14 @@ var badgeDotVariants = (0, import_class_variance_authority9.cva)("rounded-12 siz
|
|
|
728
805
|
}
|
|
729
806
|
});
|
|
730
807
|
var BadgeDot = ({ status, className }) => {
|
|
731
|
-
return /* @__PURE__ */ (0,
|
|
808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn(badgeDotVariants({ status }), className) });
|
|
732
809
|
};
|
|
733
810
|
BadgeDot.displayName = "BadgeDot";
|
|
734
811
|
|
|
735
812
|
// src/components/Content/BadgeStatus.tsx
|
|
736
|
-
var
|
|
737
|
-
var
|
|
738
|
-
var BadgeStatus =
|
|
813
|
+
var React12 = __toESM(require("react"), 1);
|
|
814
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
815
|
+
var BadgeStatus = React12.forwardRef(
|
|
739
816
|
(props, ref) => {
|
|
740
817
|
const {
|
|
741
818
|
label,
|
|
@@ -746,14 +823,14 @@ var BadgeStatus = React11.forwardRef(
|
|
|
746
823
|
} = props;
|
|
747
824
|
const textClasses = active ? "caption-medium text-primary" : "caption-medium text-primary-disabled";
|
|
748
825
|
const dotClasses = active ? "bg-(--background-informal)" : "bg-(--background-primary)";
|
|
749
|
-
return /* @__PURE__ */ (0,
|
|
826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
750
827
|
"div",
|
|
751
828
|
{
|
|
752
829
|
ref,
|
|
753
830
|
className: cn("inline-flex items-center gap-2", className),
|
|
754
831
|
...rest,
|
|
755
832
|
children: [
|
|
756
|
-
/* @__PURE__ */ (0,
|
|
833
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
757
834
|
"span",
|
|
758
835
|
{
|
|
759
836
|
className: cn(
|
|
@@ -763,7 +840,7 @@ var BadgeStatus = React11.forwardRef(
|
|
|
763
840
|
)
|
|
764
841
|
}
|
|
765
842
|
),
|
|
766
|
-
/* @__PURE__ */ (0,
|
|
843
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: textClasses, children: label })
|
|
767
844
|
]
|
|
768
845
|
}
|
|
769
846
|
);
|
|
@@ -772,9 +849,9 @@ var BadgeStatus = React11.forwardRef(
|
|
|
772
849
|
BadgeStatus.displayName = "BadgeStatus";
|
|
773
850
|
|
|
774
851
|
// src/components/Content/Divider.tsx
|
|
775
|
-
var
|
|
776
|
-
var
|
|
777
|
-
var
|
|
852
|
+
var React13 = require("react");
|
|
853
|
+
var import_icons3 = require("@bubo-squared/icons");
|
|
854
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
778
855
|
var gapBySize = {
|
|
779
856
|
sm: "gap-2",
|
|
780
857
|
md: "gap-3",
|
|
@@ -809,14 +886,14 @@ var Divider = (props) => {
|
|
|
809
886
|
className: _className,
|
|
810
887
|
...divProps
|
|
811
888
|
} = props;
|
|
812
|
-
return /* @__PURE__ */ (0,
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
813
890
|
"div",
|
|
814
891
|
{
|
|
815
892
|
className: wrapperClass,
|
|
816
893
|
role: "separator",
|
|
817
894
|
"aria-orientation": ariaOrientation,
|
|
818
895
|
...divProps,
|
|
819
|
-
children: /* @__PURE__ */ (0,
|
|
896
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
820
897
|
}
|
|
821
898
|
);
|
|
822
899
|
}
|
|
@@ -830,7 +907,7 @@ var Divider = (props) => {
|
|
|
830
907
|
...divProps
|
|
831
908
|
} = props;
|
|
832
909
|
const textLabel = label ? label : "OR";
|
|
833
|
-
return /* @__PURE__ */ (0,
|
|
910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
834
911
|
"div",
|
|
835
912
|
{
|
|
836
913
|
className: wrapperClass,
|
|
@@ -838,8 +915,8 @@ var Divider = (props) => {
|
|
|
838
915
|
"aria-orientation": ariaOrientation,
|
|
839
916
|
...divProps,
|
|
840
917
|
children: [
|
|
841
|
-
/* @__PURE__ */ (0,
|
|
842
|
-
/* @__PURE__ */ (0,
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass }),
|
|
919
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
843
920
|
"span",
|
|
844
921
|
{
|
|
845
922
|
className: cn(
|
|
@@ -849,7 +926,7 @@ var Divider = (props) => {
|
|
|
849
926
|
children: textLabel
|
|
850
927
|
}
|
|
851
928
|
),
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
929
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
853
930
|
]
|
|
854
931
|
}
|
|
855
932
|
);
|
|
@@ -866,7 +943,7 @@ var Divider = (props) => {
|
|
|
866
943
|
className: _className,
|
|
867
944
|
...divProps
|
|
868
945
|
} = props;
|
|
869
|
-
return /* @__PURE__ */ (0,
|
|
946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
870
947
|
"div",
|
|
871
948
|
{
|
|
872
949
|
className: wrapperClass,
|
|
@@ -874,18 +951,18 @@ var Divider = (props) => {
|
|
|
874
951
|
"aria-orientation": ariaOrientation,
|
|
875
952
|
...divProps,
|
|
876
953
|
children: [
|
|
877
|
-
/* @__PURE__ */ (0,
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass }),
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
879
956
|
IconButton,
|
|
880
957
|
{
|
|
881
958
|
variant: iconButtonVariant ?? "secondary",
|
|
882
959
|
size: resolvedSize,
|
|
883
960
|
"aria-label": ariaLabel ?? "More options",
|
|
884
|
-
icon: icon ?? /* @__PURE__ */ (0,
|
|
961
|
+
icon: icon ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons3.TargetIcon, {}),
|
|
885
962
|
onClick: onIconClick
|
|
886
963
|
}
|
|
887
964
|
),
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
889
966
|
]
|
|
890
967
|
}
|
|
891
968
|
);
|
|
@@ -899,7 +976,7 @@ var Divider = (props) => {
|
|
|
899
976
|
className: _className,
|
|
900
977
|
...divProps
|
|
901
978
|
} = props;
|
|
902
|
-
return /* @__PURE__ */ (0,
|
|
979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
903
980
|
"div",
|
|
904
981
|
{
|
|
905
982
|
className: wrapperClass,
|
|
@@ -907,8 +984,8 @@ var Divider = (props) => {
|
|
|
907
984
|
"aria-orientation": ariaOrientation,
|
|
908
985
|
...divProps,
|
|
909
986
|
children: [
|
|
910
|
-
/* @__PURE__ */ (0,
|
|
911
|
-
/* @__PURE__ */ (0,
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass }),
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
912
989
|
IconButtonGroup,
|
|
913
990
|
{
|
|
914
991
|
className: resolvedOrientation === "vertical" ? "flex-col" : "flex-row",
|
|
@@ -916,7 +993,7 @@ var Divider = (props) => {
|
|
|
916
993
|
size: resolvedSize
|
|
917
994
|
}
|
|
918
995
|
),
|
|
919
|
-
/* @__PURE__ */ (0,
|
|
996
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
920
997
|
]
|
|
921
998
|
}
|
|
922
999
|
);
|
|
@@ -932,7 +1009,7 @@ var Divider = (props) => {
|
|
|
932
1009
|
className: _className,
|
|
933
1010
|
...divProps
|
|
934
1011
|
} = props;
|
|
935
|
-
return /* @__PURE__ */ (0,
|
|
1012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
936
1013
|
"div",
|
|
937
1014
|
{
|
|
938
1015
|
className: wrapperClass,
|
|
@@ -940,8 +1017,8 @@ var Divider = (props) => {
|
|
|
940
1017
|
"aria-orientation": ariaOrientation,
|
|
941
1018
|
...divProps,
|
|
942
1019
|
children: [
|
|
943
|
-
/* @__PURE__ */ (0,
|
|
944
|
-
/* @__PURE__ */ (0,
|
|
1020
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass }),
|
|
1021
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
945
1022
|
Button,
|
|
946
1023
|
{
|
|
947
1024
|
variant: buttonVariant ?? "secondary",
|
|
@@ -950,7 +1027,7 @@ var Divider = (props) => {
|
|
|
950
1027
|
children: buttonLabel
|
|
951
1028
|
}
|
|
952
1029
|
),
|
|
953
|
-
/* @__PURE__ */ (0,
|
|
1030
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
954
1031
|
]
|
|
955
1032
|
}
|
|
956
1033
|
);
|
|
@@ -960,11 +1037,11 @@ var Divider = (props) => {
|
|
|
960
1037
|
Divider.displayName = "Divider";
|
|
961
1038
|
|
|
962
1039
|
// src/components/Content/Progress.tsx
|
|
963
|
-
var
|
|
1040
|
+
var React15 = __toESM(require("react"), 1);
|
|
964
1041
|
|
|
965
1042
|
// src/components/Inputs/Field.tsx
|
|
966
|
-
var
|
|
967
|
-
var
|
|
1043
|
+
var React14 = __toESM(require("react"), 1);
|
|
1044
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
968
1045
|
var fieldBase = "flex flex-col gap-2 items-start";
|
|
969
1046
|
var Field = (props) => {
|
|
970
1047
|
const {
|
|
@@ -977,18 +1054,18 @@ var Field = (props) => {
|
|
|
977
1054
|
className,
|
|
978
1055
|
children
|
|
979
1056
|
} = props;
|
|
980
|
-
const fieldId =
|
|
1057
|
+
const fieldId = React14.useId();
|
|
981
1058
|
const labelId = label ? `${fieldId}-label` : void 0;
|
|
982
1059
|
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
983
1060
|
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
984
1061
|
const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
|
|
985
|
-
return /* @__PURE__ */ (0,
|
|
986
|
-
label && /* @__PURE__ */ (0,
|
|
987
|
-
/* @__PURE__ */ (0,
|
|
1062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn(fieldBase, className), children: [
|
|
1063
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { id: labelId, className: cn("paragraph-sm", labelColorClass), children: label }),
|
|
988
1065
|
labelRight
|
|
989
1066
|
] }),
|
|
990
|
-
/* @__PURE__ */ (0,
|
|
991
|
-
!hideHint && /* @__PURE__ */ (0,
|
|
1067
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "relative w-full", children }),
|
|
1068
|
+
!hideHint && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
992
1069
|
"p",
|
|
993
1070
|
{
|
|
994
1071
|
id: hint ? hintId : void 0,
|
|
@@ -1001,13 +1078,13 @@ var Field = (props) => {
|
|
|
1001
1078
|
Field.displayName = "Field";
|
|
1002
1079
|
|
|
1003
1080
|
// src/components/Content/Progress.tsx
|
|
1004
|
-
var
|
|
1081
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1005
1082
|
var sizeToBarClasses = {
|
|
1006
1083
|
lg: "h-4 rounded-16",
|
|
1007
1084
|
md: "h-2 rounded-8",
|
|
1008
1085
|
sm: "h-1 rounded-4"
|
|
1009
1086
|
};
|
|
1010
|
-
var Progress =
|
|
1087
|
+
var Progress = React15.forwardRef(
|
|
1011
1088
|
(props, ref) => {
|
|
1012
1089
|
const {
|
|
1013
1090
|
value,
|
|
@@ -1024,17 +1101,17 @@ var Progress = React14.forwardRef(
|
|
|
1024
1101
|
const clamped = Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;
|
|
1025
1102
|
const percentageLabel = `${Math.round(clamped)}%`;
|
|
1026
1103
|
const barHeightClasses = sizeToBarClasses[size];
|
|
1027
|
-
return /* @__PURE__ */ (0,
|
|
1104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1028
1105
|
Field,
|
|
1029
1106
|
{
|
|
1030
1107
|
label,
|
|
1031
|
-
labelRight: showProgressLabel && label ? /* @__PURE__ */ (0,
|
|
1108
|
+
labelRight: showProgressLabel && label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
|
|
1032
1109
|
hint,
|
|
1033
1110
|
hideHint,
|
|
1034
1111
|
status,
|
|
1035
1112
|
disabled,
|
|
1036
1113
|
className: cn("w-full", className),
|
|
1037
|
-
children: /* @__PURE__ */ (0,
|
|
1114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1038
1115
|
"div",
|
|
1039
1116
|
{
|
|
1040
1117
|
ref,
|
|
@@ -1044,7 +1121,7 @@ var Progress = React14.forwardRef(
|
|
|
1044
1121
|
"aria-valuemax": 100,
|
|
1045
1122
|
"aria-label": label,
|
|
1046
1123
|
...rest,
|
|
1047
|
-
children: /* @__PURE__ */ (0,
|
|
1124
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1048
1125
|
"div",
|
|
1049
1126
|
{
|
|
1050
1127
|
className: cn(
|
|
@@ -1052,7 +1129,7 @@ var Progress = React14.forwardRef(
|
|
|
1052
1129
|
barHeightClasses,
|
|
1053
1130
|
disabled && "opacity-50"
|
|
1054
1131
|
),
|
|
1055
|
-
children: /* @__PURE__ */ (0,
|
|
1132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1056
1133
|
"div",
|
|
1057
1134
|
{
|
|
1058
1135
|
className: cn(
|
|
@@ -1073,10 +1150,10 @@ var Progress = React14.forwardRef(
|
|
|
1073
1150
|
Progress.displayName = "Progress";
|
|
1074
1151
|
|
|
1075
1152
|
// src/components/Content/StatusAvatar.tsx
|
|
1076
|
-
var
|
|
1153
|
+
var React16 = __toESM(require("react"), 1);
|
|
1077
1154
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1078
|
-
var
|
|
1079
|
-
var
|
|
1155
|
+
var import_icons4 = require("@bubo-squared/icons");
|
|
1156
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1080
1157
|
var iconStatusVariants = (0, import_class_variance_authority10.cva)(
|
|
1081
1158
|
"inline-flex size-5 items-center justify-center rounded-full border-1 border-(--color-primary-inverse) p-1",
|
|
1082
1159
|
{
|
|
@@ -1101,11 +1178,11 @@ var presenceDotByVariant = {
|
|
|
1101
1178
|
away: "bg-(--background-warning) border-1 border-(--color-primary-inverse)",
|
|
1102
1179
|
busy: "bg-(--background-error) border-1 border-(--color-primary-inverse)"
|
|
1103
1180
|
};
|
|
1104
|
-
var StatusAvatar =
|
|
1181
|
+
var StatusAvatar = React16.forwardRef((props, ref) => {
|
|
1105
1182
|
const { variant = "verified", className, ...rest } = props;
|
|
1106
1183
|
if (variant === "offline" || variant === "online" || variant === "away" || variant === "busy") {
|
|
1107
1184
|
const dotClasses = presenceDotByVariant[variant];
|
|
1108
|
-
return /* @__PURE__ */ (0,
|
|
1185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1109
1186
|
"div",
|
|
1110
1187
|
{
|
|
1111
1188
|
ref,
|
|
@@ -1114,23 +1191,23 @@ var StatusAvatar = React15.forwardRef((props, ref) => {
|
|
|
1114
1191
|
className
|
|
1115
1192
|
),
|
|
1116
1193
|
...rest,
|
|
1117
|
-
children: /* @__PURE__ */ (0,
|
|
1194
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cn(dotClasses, "size-3.5 rounded-full") })
|
|
1118
1195
|
}
|
|
1119
1196
|
);
|
|
1120
1197
|
}
|
|
1121
1198
|
const iconVariant = variant;
|
|
1122
|
-
return /* @__PURE__ */ (0,
|
|
1199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1123
1200
|
"div",
|
|
1124
1201
|
{
|
|
1125
1202
|
ref,
|
|
1126
1203
|
className: cn(iconStatusVariants({ variant: iconVariant }), className),
|
|
1127
1204
|
...rest,
|
|
1128
1205
|
children: [
|
|
1129
|
-
iconVariant === "verified" && /* @__PURE__ */ (0,
|
|
1130
|
-
iconVariant === "bookmark" && /* @__PURE__ */ (0,
|
|
1131
|
-
iconVariant === "favorite" && /* @__PURE__ */ (0,
|
|
1132
|
-
iconVariant === "add" && /* @__PURE__ */ (0,
|
|
1133
|
-
iconVariant === "remove" && /* @__PURE__ */ (0,
|
|
1206
|
+
iconVariant === "verified" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.CheckIcon, { className: "size-3 text-button-white" }),
|
|
1207
|
+
iconVariant === "bookmark" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.BookmarkCheckIcon, { className: "size-3 text-button-white" }),
|
|
1208
|
+
iconVariant === "favorite" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.StarIcon, { className: "size-3 text-button-white" }),
|
|
1209
|
+
iconVariant === "add" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.PlusIcon, { className: "size-3 text-button-white" }),
|
|
1210
|
+
iconVariant === "remove" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.CrossIcon, { className: "size-3 text-button-white" })
|
|
1134
1211
|
]
|
|
1135
1212
|
}
|
|
1136
1213
|
);
|
|
@@ -1138,10 +1215,10 @@ var StatusAvatar = React15.forwardRef((props, ref) => {
|
|
|
1138
1215
|
StatusAvatar.displayName = "StatusAvatar";
|
|
1139
1216
|
|
|
1140
1217
|
// src/components/Content/Tag.tsx
|
|
1141
|
-
var
|
|
1218
|
+
var React17 = __toESM(require("react"), 1);
|
|
1142
1219
|
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
1143
1220
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1144
|
-
var
|
|
1221
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1145
1222
|
var tagVariants = (0, import_class_variance_authority11.cva)(
|
|
1146
1223
|
"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 ",
|
|
1147
1224
|
{
|
|
@@ -1158,7 +1235,7 @@ var tagVariants = (0, import_class_variance_authority11.cva)(
|
|
|
1158
1235
|
);
|
|
1159
1236
|
var disabledTag = "pointer-events-none border-(--border-secondary-disabled) bg-(--background-neutral-disabled) text-primary-disabled";
|
|
1160
1237
|
var iconClasses = "flex items-center justify-center w-5 h-5 [&>*]:w-5 [&>*]:h-5 shrink-0 text-primary";
|
|
1161
|
-
var Tag =
|
|
1238
|
+
var Tag = React17.forwardRef(
|
|
1162
1239
|
(props, ref) => {
|
|
1163
1240
|
const {
|
|
1164
1241
|
size = "sm",
|
|
@@ -1170,37 +1247,295 @@ var Tag = React16.forwardRef(
|
|
|
1170
1247
|
...rest
|
|
1171
1248
|
} = props;
|
|
1172
1249
|
const Comp = asChild ? import_react_slot6.Slot : "div";
|
|
1173
|
-
const leading = props.leadingIcon &&
|
|
1174
|
-
const trailing = props.trailingIcon &&
|
|
1175
|
-
return /* @__PURE__ */ (0,
|
|
1250
|
+
const leading = props.leadingIcon && React17.isValidElement(props.leadingIcon) ? React17.cloneElement(props.leadingIcon, { disabled, ...props.leadingIcon.props }) : null;
|
|
1251
|
+
const trailing = props.trailingIcon && React17.isValidElement(props.trailingIcon) ? React17.cloneElement(props.trailingIcon, { disabled, ...props.trailingIcon.props }) : null;
|
|
1252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1176
1253
|
Comp,
|
|
1177
1254
|
{
|
|
1178
1255
|
className: cn(tagVariants({ size }), disabled && disabledTag, className),
|
|
1179
1256
|
ref,
|
|
1180
1257
|
...rest,
|
|
1181
1258
|
children: [
|
|
1182
|
-
leading && /* @__PURE__ */ (0,
|
|
1183
|
-
value ? /* @__PURE__ */ (0,
|
|
1184
|
-
/* @__PURE__ */ (0,
|
|
1185
|
-
/* @__PURE__ */ (0,
|
|
1186
|
-
/* @__PURE__ */ (0,
|
|
1187
|
-
] }) : /* @__PURE__ */ (0,
|
|
1188
|
-
trailing && /* @__PURE__ */ (0,
|
|
1259
|
+
leading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: iconClasses, children: leading }),
|
|
1260
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-row gap-1 items-center", children: [
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: label }),
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: ":" }),
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg-medium mb-0! cursor-default font-medium", children: value })
|
|
1264
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default", children: label }),
|
|
1265
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: iconClasses, children: trailing })
|
|
1189
1266
|
]
|
|
1190
1267
|
}
|
|
1191
1268
|
);
|
|
1192
1269
|
}
|
|
1193
1270
|
);
|
|
1194
1271
|
|
|
1272
|
+
// src/components/Content/Menu.tsx
|
|
1273
|
+
var React19 = require("react");
|
|
1274
|
+
|
|
1275
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1276
|
+
var React18 = __toESM(require("react"), 1);
|
|
1277
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1278
|
+
var import_icons5 = require("@bubo-squared/icons");
|
|
1279
|
+
|
|
1280
|
+
// src/components/ui/dropdown-styles.ts
|
|
1281
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1282
|
+
var dropdownSurfaceClass = "z-50 rounded-4 border border-(--border-secondary-hover) bg-(--background-neutral) shadow-card-md";
|
|
1283
|
+
var dropdownScrollClass = "max-h-79 overflow-y-auto dropdown-scrollbar";
|
|
1284
|
+
var dropdownRowVariants = (0, import_class_variance_authority12.cva)(
|
|
1285
|
+
"flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left text-primary cursor-pointer hover:bg-(--background-secondary)",
|
|
1286
|
+
{
|
|
1287
|
+
variants: {
|
|
1288
|
+
size: {
|
|
1289
|
+
sm: "paragraph-sm py-(--space-4)",
|
|
1290
|
+
md: "paragraph-md py-(--space-6)",
|
|
1291
|
+
lg: "paragraph-lg py-(--space-8)",
|
|
1292
|
+
xl: "subtitle py-(--space-10)"
|
|
1293
|
+
},
|
|
1294
|
+
inset: {
|
|
1295
|
+
true: "pl-(--space-16)"
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
defaultVariants: {
|
|
1299
|
+
size: "lg"
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
|
|
1304
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1305
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1306
|
+
var DropdownMenuSizeContext = React18.createContext("lg");
|
|
1307
|
+
function useDropdownMenuSize(explicitSize) {
|
|
1308
|
+
const contextSize = React18.useContext(DropdownMenuSizeContext);
|
|
1309
|
+
return explicitSize ?? contextSize;
|
|
1310
|
+
}
|
|
1311
|
+
function DropdownMenu({
|
|
1312
|
+
...props
|
|
1313
|
+
}) {
|
|
1314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1315
|
+
}
|
|
1316
|
+
function DropdownMenuPortal({
|
|
1317
|
+
...props
|
|
1318
|
+
}) {
|
|
1319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1320
|
+
}
|
|
1321
|
+
function DropdownMenuTrigger({
|
|
1322
|
+
...props
|
|
1323
|
+
}) {
|
|
1324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1325
|
+
DropdownMenuPrimitive.Trigger,
|
|
1326
|
+
{
|
|
1327
|
+
"data-slot": "dropdown-menu-trigger",
|
|
1328
|
+
...props
|
|
1329
|
+
}
|
|
1330
|
+
);
|
|
1331
|
+
}
|
|
1332
|
+
function DropdownMenuContent({
|
|
1333
|
+
className,
|
|
1334
|
+
sideOffset = 4,
|
|
1335
|
+
size = "lg",
|
|
1336
|
+
...props
|
|
1337
|
+
}) {
|
|
1338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1339
|
+
DropdownMenuPrimitive.Content,
|
|
1340
|
+
{
|
|
1341
|
+
"data-slot": "dropdown-menu-content",
|
|
1342
|
+
sideOffset,
|
|
1343
|
+
className: cn(
|
|
1344
|
+
dropdownSurfaceClass,
|
|
1345
|
+
dropdownScrollClass,
|
|
1346
|
+
"min-w-37.5 p-0",
|
|
1347
|
+
className
|
|
1348
|
+
),
|
|
1349
|
+
...props
|
|
1350
|
+
}
|
|
1351
|
+
) }) });
|
|
1352
|
+
}
|
|
1353
|
+
function DropdownMenuGroup({
|
|
1354
|
+
...props
|
|
1355
|
+
}) {
|
|
1356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
1357
|
+
}
|
|
1358
|
+
function DropdownMenuItem({
|
|
1359
|
+
className,
|
|
1360
|
+
inset,
|
|
1361
|
+
size,
|
|
1362
|
+
variant = "default",
|
|
1363
|
+
...props
|
|
1364
|
+
}) {
|
|
1365
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1367
|
+
DropdownMenuPrimitive.Item,
|
|
1368
|
+
{
|
|
1369
|
+
"data-slot": "dropdown-menu-item",
|
|
1370
|
+
"data-inset": inset,
|
|
1371
|
+
"data-variant": variant,
|
|
1372
|
+
className: cn(
|
|
1373
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1374
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1375
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50 data-disabled:text-primary-disabled",
|
|
1376
|
+
variant === "destructive" ? "text-(--color-error)" : null,
|
|
1377
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1378
|
+
className
|
|
1379
|
+
),
|
|
1380
|
+
...props
|
|
1381
|
+
}
|
|
1382
|
+
);
|
|
1383
|
+
}
|
|
1384
|
+
function DropdownMenuLabel({
|
|
1385
|
+
className,
|
|
1386
|
+
inset,
|
|
1387
|
+
size,
|
|
1388
|
+
...props
|
|
1389
|
+
}) {
|
|
1390
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1392
|
+
DropdownMenuPrimitive.Label,
|
|
1393
|
+
{
|
|
1394
|
+
"data-slot": "dropdown-menu-label",
|
|
1395
|
+
"data-inset": inset,
|
|
1396
|
+
className: cn(
|
|
1397
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1398
|
+
"text-secondary cursor-default hover:bg-transparent caption",
|
|
1399
|
+
className
|
|
1400
|
+
),
|
|
1401
|
+
...props
|
|
1402
|
+
}
|
|
1403
|
+
);
|
|
1404
|
+
}
|
|
1405
|
+
function DropdownMenuSeparator({
|
|
1406
|
+
className,
|
|
1407
|
+
...props
|
|
1408
|
+
}) {
|
|
1409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1410
|
+
DropdownMenuPrimitive.Separator,
|
|
1411
|
+
{
|
|
1412
|
+
"data-slot": "dropdown-menu-separator",
|
|
1413
|
+
className: cn("my-1 h-px bg-(--border-secondary)", className),
|
|
1414
|
+
...props
|
|
1415
|
+
}
|
|
1416
|
+
);
|
|
1417
|
+
}
|
|
1418
|
+
function DropdownMenuShortcut({
|
|
1419
|
+
className,
|
|
1420
|
+
...props
|
|
1421
|
+
}) {
|
|
1422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1423
|
+
"span",
|
|
1424
|
+
{
|
|
1425
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1426
|
+
className: cn(
|
|
1427
|
+
"ml-auto paragraph-sm text-secondary",
|
|
1428
|
+
className
|
|
1429
|
+
),
|
|
1430
|
+
...props
|
|
1431
|
+
}
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
function DropdownMenuSub({
|
|
1435
|
+
...props
|
|
1436
|
+
}) {
|
|
1437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1438
|
+
}
|
|
1439
|
+
function DropdownMenuSubTrigger({
|
|
1440
|
+
className,
|
|
1441
|
+
inset,
|
|
1442
|
+
size,
|
|
1443
|
+
children,
|
|
1444
|
+
...props
|
|
1445
|
+
}) {
|
|
1446
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1448
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1449
|
+
{
|
|
1450
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1451
|
+
"data-inset": inset,
|
|
1452
|
+
className: cn(
|
|
1453
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1454
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1455
|
+
"data-[state=open]:bg-(--background-secondary)",
|
|
1456
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50 data-disabled:text-primary-disabled",
|
|
1457
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1458
|
+
className
|
|
1459
|
+
),
|
|
1460
|
+
...props,
|
|
1461
|
+
children: [
|
|
1462
|
+
children,
|
|
1463
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons5.ChevronRightIcon, { className: "ml-auto size-4 text-(--icon-primary)" })
|
|
1464
|
+
]
|
|
1465
|
+
}
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
function DropdownMenuSubContent({
|
|
1469
|
+
className,
|
|
1470
|
+
size,
|
|
1471
|
+
...props
|
|
1472
|
+
}) {
|
|
1473
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuSizeContext.Provider, { value: resolvedSize, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1475
|
+
DropdownMenuPrimitive.SubContent,
|
|
1476
|
+
{
|
|
1477
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1478
|
+
className: cn(
|
|
1479
|
+
dropdownSurfaceClass,
|
|
1480
|
+
dropdownScrollClass,
|
|
1481
|
+
"min-w-37.5 p-0",
|
|
1482
|
+
className
|
|
1483
|
+
),
|
|
1484
|
+
...props
|
|
1485
|
+
}
|
|
1486
|
+
) });
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
// src/components/Content/Menu.tsx
|
|
1490
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1491
|
+
var Menu = (props) => {
|
|
1492
|
+
const {
|
|
1493
|
+
trigger,
|
|
1494
|
+
children,
|
|
1495
|
+
size = "lg",
|
|
1496
|
+
align = "start",
|
|
1497
|
+
side,
|
|
1498
|
+
offset = 4,
|
|
1499
|
+
className,
|
|
1500
|
+
open,
|
|
1501
|
+
onOpenChange,
|
|
1502
|
+
modal
|
|
1503
|
+
} = props;
|
|
1504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DropdownMenu, { open, onOpenChange, modal, children: [
|
|
1505
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenuTrigger, { asChild: true, children: trigger }),
|
|
1506
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1507
|
+
DropdownMenuContent,
|
|
1508
|
+
{
|
|
1509
|
+
align,
|
|
1510
|
+
side,
|
|
1511
|
+
sideOffset: offset,
|
|
1512
|
+
size,
|
|
1513
|
+
className: cn(className),
|
|
1514
|
+
children
|
|
1515
|
+
}
|
|
1516
|
+
)
|
|
1517
|
+
] });
|
|
1518
|
+
};
|
|
1519
|
+
Menu.displayName = "Menu";
|
|
1520
|
+
var MenuGroup = DropdownMenuGroup;
|
|
1521
|
+
var MenuItem = DropdownMenuItem;
|
|
1522
|
+
var MenuLabel = DropdownMenuLabel;
|
|
1523
|
+
var MenuPortal = DropdownMenuPortal;
|
|
1524
|
+
var MenuSeparator = DropdownMenuSeparator;
|
|
1525
|
+
var MenuShortcut = DropdownMenuShortcut;
|
|
1526
|
+
var MenuSub = DropdownMenuSub;
|
|
1527
|
+
var MenuSubContent = DropdownMenuSubContent;
|
|
1528
|
+
var MenuSubTrigger = DropdownMenuSubTrigger;
|
|
1529
|
+
|
|
1195
1530
|
// src/components/Inputs/Checkbox.tsx
|
|
1196
|
-
var
|
|
1531
|
+
var React20 = require("react");
|
|
1197
1532
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
1198
|
-
var
|
|
1199
|
-
var
|
|
1200
|
-
var
|
|
1533
|
+
var import_icons6 = require("@bubo-squared/icons");
|
|
1534
|
+
var import_icons7 = require("@bubo-squared/icons");
|
|
1535
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1201
1536
|
function Checkbox({ label, className, ...props }) {
|
|
1202
|
-
return /* @__PURE__ */ (0,
|
|
1203
|
-
/* @__PURE__ */ (0,
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "inline-flex items-center gap-(--space-12) cursor-pointer select-none", children: [
|
|
1538
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1204
1539
|
CheckboxPrimitive.Root,
|
|
1205
1540
|
{
|
|
1206
1541
|
className: cn(
|
|
@@ -1216,23 +1551,374 @@ function Checkbox({ label, className, ...props }) {
|
|
|
1216
1551
|
className
|
|
1217
1552
|
),
|
|
1218
1553
|
...props,
|
|
1219
|
-
children: /* @__PURE__ */ (0,
|
|
1220
|
-
/* @__PURE__ */ (0,
|
|
1221
|
-
/* @__PURE__ */ (0,
|
|
1554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
|
|
1555
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons6.CheckIcon, { className: "h-5 w-5 hidden group-data-[state=checked]:block" }),
|
|
1556
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons7.MinusIcon, { className: "h-5 w-5 hidden group-data-[state=indeterminate]:block" })
|
|
1222
1557
|
] })
|
|
1223
1558
|
}
|
|
1224
|
-
),
|
|
1225
|
-
label && /* @__PURE__ */ (0,
|
|
1226
|
-
] });
|
|
1227
|
-
}
|
|
1559
|
+
),
|
|
1560
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "paragraph-md-medium text-primary", children: label })
|
|
1561
|
+
] });
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
// src/components/Inputs/Autocomplete.tsx
|
|
1565
|
+
var React23 = __toESM(require("react"), 1);
|
|
1566
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
1567
|
+
|
|
1568
|
+
// src/components/Inputs/InputShell.tsx
|
|
1569
|
+
var React21 = __toESM(require("react"), 1);
|
|
1570
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
1571
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1572
|
+
var inputShellVariants = (0, import_class_variance_authority13.cva)(
|
|
1573
|
+
"group flex w-full items-center rounded-4 border bg-(--background-primary) text-left cursor-text border-(--border-secondary)",
|
|
1574
|
+
{
|
|
1575
|
+
variants: {
|
|
1576
|
+
size: {
|
|
1577
|
+
sm: "gap-2 px-2 py-1 h-8",
|
|
1578
|
+
md: "gap-2 px-2 py-2 h-10",
|
|
1579
|
+
lg: "gap-2 px-2 py-2 h-11",
|
|
1580
|
+
xl: "gap-2 px-[10px] py-2 h-14"
|
|
1581
|
+
},
|
|
1582
|
+
status: {
|
|
1583
|
+
default: "input-default",
|
|
1584
|
+
success: "input-success",
|
|
1585
|
+
error: "input-error"
|
|
1586
|
+
},
|
|
1587
|
+
disabled: {
|
|
1588
|
+
true: "bg-(--background-primary-disabled) border-(--border-secondary-disabled) text-primary-disabled cursor-default"
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1591
|
+
defaultVariants: {
|
|
1592
|
+
size: "lg",
|
|
1593
|
+
status: "default"
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
);
|
|
1597
|
+
var InputShell = React21.forwardRef(
|
|
1598
|
+
({ size, status, disabled, className, ...rest }, ref) => {
|
|
1599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1600
|
+
"div",
|
|
1601
|
+
{
|
|
1602
|
+
ref,
|
|
1603
|
+
"aria-disabled": disabled || void 0,
|
|
1604
|
+
className: cn(
|
|
1605
|
+
inputShellVariants({ size, status, disabled }),
|
|
1606
|
+
className
|
|
1607
|
+
),
|
|
1608
|
+
...rest
|
|
1609
|
+
}
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
1612
|
+
);
|
|
1613
|
+
InputShell.displayName = "InputShell";
|
|
1614
|
+
|
|
1615
|
+
// src/components/ui/input.tsx
|
|
1616
|
+
var React22 = __toESM(require("react"), 1);
|
|
1617
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1618
|
+
var Input = React22.forwardRef(
|
|
1619
|
+
({ className, type, variant = "default", ...props }, ref) => {
|
|
1620
|
+
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";
|
|
1621
|
+
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";
|
|
1622
|
+
const bareStyles = "bg-transparent outline-none w-full";
|
|
1623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1624
|
+
"input",
|
|
1625
|
+
{
|
|
1626
|
+
ref,
|
|
1627
|
+
type,
|
|
1628
|
+
"data-slot": "input",
|
|
1629
|
+
className: cn(
|
|
1630
|
+
base,
|
|
1631
|
+
variant === "default" ? defaultStyles : bareStyles,
|
|
1632
|
+
className
|
|
1633
|
+
),
|
|
1634
|
+
...props
|
|
1635
|
+
}
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1638
|
+
);
|
|
1639
|
+
Input.displayName = "Input";
|
|
1640
|
+
|
|
1641
|
+
// src/components/Inputs/Autocomplete.tsx
|
|
1642
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1643
|
+
var inputTextVariants = (0, import_class_variance_authority14.cva)("truncate", {
|
|
1644
|
+
variants: {
|
|
1645
|
+
size: {
|
|
1646
|
+
sm: "paragraph-md",
|
|
1647
|
+
md: "paragraph-lg",
|
|
1648
|
+
lg: "subtitle",
|
|
1649
|
+
xl: "h6-title"
|
|
1650
|
+
}
|
|
1651
|
+
},
|
|
1652
|
+
defaultVariants: {
|
|
1653
|
+
size: "lg"
|
|
1654
|
+
}
|
|
1655
|
+
});
|
|
1656
|
+
var optionVariants = (0, import_class_variance_authority14.cva)(
|
|
1657
|
+
"w-full text-left hover:bg-(--background-secondary)",
|
|
1658
|
+
{
|
|
1659
|
+
variants: {
|
|
1660
|
+
size: {
|
|
1661
|
+
sm: "paragraph-sm py-(--space-4) ",
|
|
1662
|
+
md: "paragraph-md py-(--space-6) ",
|
|
1663
|
+
lg: "paragraph-lg py-(--space-8) ",
|
|
1664
|
+
xl: "subtitle py-(--space-10) "
|
|
1665
|
+
},
|
|
1666
|
+
active: {
|
|
1667
|
+
true: "bg-(--background-secondary)"
|
|
1668
|
+
}
|
|
1669
|
+
},
|
|
1670
|
+
defaultVariants: {
|
|
1671
|
+
size: "lg",
|
|
1672
|
+
active: false
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
);
|
|
1676
|
+
var iconWrapperVariants = (0, import_class_variance_authority14.cva)(
|
|
1677
|
+
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
1678
|
+
{
|
|
1679
|
+
variants: {
|
|
1680
|
+
size: {
|
|
1681
|
+
sm: "size-4 [&>svg]:size-4",
|
|
1682
|
+
md: "size-5 [&>svg]:size-5",
|
|
1683
|
+
lg: "size-5 [&>svg]:size-5",
|
|
1684
|
+
xl: "size-6 [&>svg]:size-6"
|
|
1685
|
+
},
|
|
1686
|
+
disabled: {
|
|
1687
|
+
true: "text-(--icon-primary-disabled)"
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
defaultVariants: {
|
|
1691
|
+
size: "lg"
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
);
|
|
1695
|
+
var Autocomplete = (props) => {
|
|
1696
|
+
const {
|
|
1697
|
+
label,
|
|
1698
|
+
hint,
|
|
1699
|
+
hideHint,
|
|
1700
|
+
status = "default",
|
|
1701
|
+
size = "lg",
|
|
1702
|
+
disabled,
|
|
1703
|
+
className,
|
|
1704
|
+
leadingIcon,
|
|
1705
|
+
trailingIcon,
|
|
1706
|
+
options,
|
|
1707
|
+
loading = false,
|
|
1708
|
+
loadingText = "Loading\u2026",
|
|
1709
|
+
noOptionsText = "No matches",
|
|
1710
|
+
value,
|
|
1711
|
+
defaultValue,
|
|
1712
|
+
onChange,
|
|
1713
|
+
inputValue,
|
|
1714
|
+
defaultInputValue,
|
|
1715
|
+
onInputChange,
|
|
1716
|
+
placeholder = "Search\u2026",
|
|
1717
|
+
onKeyDown,
|
|
1718
|
+
onFocus,
|
|
1719
|
+
onBlur,
|
|
1720
|
+
id,
|
|
1721
|
+
...inputProps
|
|
1722
|
+
} = props;
|
|
1723
|
+
const isValueControlled = value !== void 0;
|
|
1724
|
+
const [internalValue, setInternalValue] = React23.useState(
|
|
1725
|
+
defaultValue ?? ""
|
|
1726
|
+
);
|
|
1727
|
+
const isInputControlled = inputValue !== void 0;
|
|
1728
|
+
const [internalInputValue, setInternalInputValue] = React23.useState(
|
|
1729
|
+
defaultInputValue ?? ""
|
|
1730
|
+
);
|
|
1731
|
+
const [isFocused, setIsFocused] = React23.useState(false);
|
|
1732
|
+
const [activeIndex, setActiveIndex] = React23.useState(-1);
|
|
1733
|
+
const inputRef = React23.useRef(null);
|
|
1734
|
+
const baseId = React23.useId();
|
|
1735
|
+
const inputId = id ?? baseId;
|
|
1736
|
+
const listboxId = `${inputId}-listbox`;
|
|
1737
|
+
const currentValue = (isValueControlled ? value : internalValue) ?? "";
|
|
1738
|
+
const currentInput = (isInputControlled ? inputValue : internalInputValue) ?? "";
|
|
1739
|
+
React23.useEffect(() => {
|
|
1740
|
+
if (isFocused) return;
|
|
1741
|
+
if (isInputControlled) return;
|
|
1742
|
+
if (!isValueControlled) return;
|
|
1743
|
+
setInternalInputValue(currentValue);
|
|
1744
|
+
}, [currentValue, isFocused, isInputControlled, isValueControlled]);
|
|
1745
|
+
const showDropdown = isFocused && (loading || options.length > 0 || currentInput.trim().length > 0);
|
|
1746
|
+
const setInputText = (next) => {
|
|
1747
|
+
if (!isInputControlled) {
|
|
1748
|
+
setInternalInputValue(next);
|
|
1749
|
+
}
|
|
1750
|
+
onInputChange?.(next);
|
|
1751
|
+
};
|
|
1752
|
+
const commitValue = (next) => {
|
|
1753
|
+
if (!isValueControlled) {
|
|
1754
|
+
setInternalValue(next);
|
|
1755
|
+
}
|
|
1756
|
+
onChange?.(next);
|
|
1757
|
+
setInputText(next);
|
|
1758
|
+
setActiveIndex(-1);
|
|
1759
|
+
};
|
|
1760
|
+
const handleContainerClick = () => {
|
|
1761
|
+
if (disabled) return;
|
|
1762
|
+
inputRef.current?.focus();
|
|
1763
|
+
};
|
|
1764
|
+
const handleInputChange = (event) => {
|
|
1765
|
+
const next = event.target.value;
|
|
1766
|
+
setInputText(next);
|
|
1767
|
+
setActiveIndex(-1);
|
|
1768
|
+
};
|
|
1769
|
+
const handleFocus = (event) => {
|
|
1770
|
+
setIsFocused(true);
|
|
1771
|
+
onFocus?.(event);
|
|
1772
|
+
};
|
|
1773
|
+
const handleBlur = (event) => {
|
|
1774
|
+
setIsFocused(false);
|
|
1775
|
+
setActiveIndex(-1);
|
|
1776
|
+
onBlur?.(event);
|
|
1777
|
+
};
|
|
1778
|
+
const handleKeyDown = (event) => {
|
|
1779
|
+
onKeyDown?.(event);
|
|
1780
|
+
if (event.defaultPrevented) return;
|
|
1781
|
+
if (!showDropdown && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
1782
|
+
setIsFocused(true);
|
|
1783
|
+
return;
|
|
1784
|
+
}
|
|
1785
|
+
switch (event.key) {
|
|
1786
|
+
case "ArrowDown": {
|
|
1787
|
+
event.preventDefault();
|
|
1788
|
+
setActiveIndex((prev) => {
|
|
1789
|
+
if (options.length === 0) return -1;
|
|
1790
|
+
const next = prev < 0 ? 0 : Math.min(prev + 1, options.length - 1);
|
|
1791
|
+
return next;
|
|
1792
|
+
});
|
|
1793
|
+
break;
|
|
1794
|
+
}
|
|
1795
|
+
case "ArrowUp": {
|
|
1796
|
+
event.preventDefault();
|
|
1797
|
+
setActiveIndex((prev) => {
|
|
1798
|
+
if (options.length === 0) return -1;
|
|
1799
|
+
const next = prev <= 0 ? 0 : prev - 1;
|
|
1800
|
+
return next;
|
|
1801
|
+
});
|
|
1802
|
+
break;
|
|
1803
|
+
}
|
|
1804
|
+
case "Enter": {
|
|
1805
|
+
if (activeIndex >= 0 && activeIndex < options.length) {
|
|
1806
|
+
event.preventDefault();
|
|
1807
|
+
commitValue(options[activeIndex]);
|
|
1808
|
+
setIsFocused(false);
|
|
1809
|
+
}
|
|
1810
|
+
break;
|
|
1811
|
+
}
|
|
1812
|
+
case "Escape": {
|
|
1813
|
+
event.preventDefault();
|
|
1814
|
+
setIsFocused(false);
|
|
1815
|
+
setActiveIndex(-1);
|
|
1816
|
+
break;
|
|
1817
|
+
}
|
|
1818
|
+
default:
|
|
1819
|
+
break;
|
|
1820
|
+
}
|
|
1821
|
+
};
|
|
1822
|
+
const handleOptionMouseDown = (event) => {
|
|
1823
|
+
event.preventDefault();
|
|
1824
|
+
};
|
|
1825
|
+
const handleOptionClick = (option) => {
|
|
1826
|
+
commitValue(option);
|
|
1827
|
+
setIsFocused(false);
|
|
1828
|
+
};
|
|
1829
|
+
const activeDescendantId = activeIndex >= 0 ? `${inputId}-option-${activeIndex}` : void 0;
|
|
1830
|
+
const showLeadingIcon = !!leadingIcon;
|
|
1831
|
+
const showTrailingIcon = !!trailingIcon;
|
|
1832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Field, { label, hint, hideHint, status, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative w-full", children: [
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1834
|
+
InputShell,
|
|
1835
|
+
{
|
|
1836
|
+
size,
|
|
1837
|
+
status,
|
|
1838
|
+
disabled,
|
|
1839
|
+
className,
|
|
1840
|
+
onClick: handleContainerClick,
|
|
1841
|
+
children: [
|
|
1842
|
+
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: cn(iconWrapperVariants({ size, disabled: !!disabled })), children: leadingIcon }),
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1844
|
+
Input,
|
|
1845
|
+
{
|
|
1846
|
+
ref: inputRef,
|
|
1847
|
+
id: inputId,
|
|
1848
|
+
type: "text",
|
|
1849
|
+
disabled: disabled ?? void 0,
|
|
1850
|
+
placeholder,
|
|
1851
|
+
value: currentInput,
|
|
1852
|
+
onChange: handleInputChange,
|
|
1853
|
+
onFocus: handleFocus,
|
|
1854
|
+
onBlur: handleBlur,
|
|
1855
|
+
onKeyDown: handleKeyDown,
|
|
1856
|
+
role: "combobox",
|
|
1857
|
+
"aria-autocomplete": "list",
|
|
1858
|
+
"aria-controls": listboxId,
|
|
1859
|
+
"aria-expanded": showDropdown,
|
|
1860
|
+
"aria-activedescendant": activeDescendantId,
|
|
1861
|
+
variant: "bare",
|
|
1862
|
+
className: cn(inputTextVariants({ size }), "bg-transparent outline-none w-full"),
|
|
1863
|
+
...inputProps
|
|
1864
|
+
}
|
|
1865
|
+
),
|
|
1866
|
+
showTrailingIcon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: cn(iconWrapperVariants({ size, disabled: !!disabled })), children: trailingIcon })
|
|
1867
|
+
]
|
|
1868
|
+
}
|
|
1869
|
+
),
|
|
1870
|
+
showDropdown && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1871
|
+
"div",
|
|
1872
|
+
{
|
|
1873
|
+
className: cn(
|
|
1874
|
+
"absolute left-0 right-0 mt-1",
|
|
1875
|
+
dropdownSurfaceClass,
|
|
1876
|
+
dropdownScrollClass
|
|
1877
|
+
),
|
|
1878
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1879
|
+
"div",
|
|
1880
|
+
{
|
|
1881
|
+
className: cn(optionVariants({ size }), "px-(--space-8) pr-(--space-16) text-secondary"),
|
|
1882
|
+
"aria-live": "polite",
|
|
1883
|
+
children: loadingText
|
|
1884
|
+
}
|
|
1885
|
+
) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1886
|
+
"div",
|
|
1887
|
+
{
|
|
1888
|
+
className: cn(optionVariants({ size }), "px-(--space-8) pr-(--space-16) text-secondary"),
|
|
1889
|
+
"aria-live": "polite",
|
|
1890
|
+
children: noOptionsText
|
|
1891
|
+
}
|
|
1892
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ul", { id: listboxId, role: "listbox", className: "flex flex-col", children: options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1893
|
+
"li",
|
|
1894
|
+
{
|
|
1895
|
+
id: `${inputId}-option-${index}`,
|
|
1896
|
+
role: "option",
|
|
1897
|
+
"aria-selected": index === activeIndex,
|
|
1898
|
+
className: cn(
|
|
1899
|
+
optionVariants({ size, active: index === activeIndex }),
|
|
1900
|
+
"px-(--space-8) pr-(--space-16) text-primary cursor-pointer"
|
|
1901
|
+
),
|
|
1902
|
+
onMouseDown: handleOptionMouseDown,
|
|
1903
|
+
onMouseEnter: () => setActiveIndex(index),
|
|
1904
|
+
onClick: () => handleOptionClick(option),
|
|
1905
|
+
children: option
|
|
1906
|
+
},
|
|
1907
|
+
`${option}-${index}`
|
|
1908
|
+
)) })
|
|
1909
|
+
}
|
|
1910
|
+
)
|
|
1911
|
+
] }) });
|
|
1912
|
+
};
|
|
1913
|
+
Autocomplete.displayName = "Autocomplete";
|
|
1228
1914
|
|
|
1229
1915
|
// src/components/Inputs/Select.tsx
|
|
1230
|
-
var
|
|
1916
|
+
var React24 = __toESM(require("react"), 1);
|
|
1231
1917
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
1232
|
-
var
|
|
1233
|
-
var
|
|
1234
|
-
var
|
|
1235
|
-
var selectTriggerVariants = (0,
|
|
1918
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
1919
|
+
var import_icons8 = require("@bubo-squared/icons");
|
|
1920
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1921
|
+
var selectTriggerVariants = (0, import_class_variance_authority15.cva)(
|
|
1236
1922
|
"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",
|
|
1237
1923
|
{
|
|
1238
1924
|
variants: {
|
|
@@ -1254,7 +1940,7 @@ var selectTriggerVariants = (0, import_class_variance_authority12.cva)(
|
|
|
1254
1940
|
}
|
|
1255
1941
|
}
|
|
1256
1942
|
);
|
|
1257
|
-
var textVariants = (0,
|
|
1943
|
+
var textVariants = (0, import_class_variance_authority15.cva)("truncate", {
|
|
1258
1944
|
variants: {
|
|
1259
1945
|
size: {
|
|
1260
1946
|
sm: "paragraph-md",
|
|
@@ -1275,7 +1961,7 @@ var textVariants = (0, import_class_variance_authority12.cva)("truncate", {
|
|
|
1275
1961
|
hasValue: false
|
|
1276
1962
|
}
|
|
1277
1963
|
});
|
|
1278
|
-
var selectIconVariants = (0,
|
|
1964
|
+
var selectIconVariants = (0, import_class_variance_authority15.cva)("flex items-center justify-center shrink-0", {
|
|
1279
1965
|
variants: {
|
|
1280
1966
|
size: {
|
|
1281
1967
|
sm: "size-4",
|
|
@@ -1293,7 +1979,7 @@ var selectIconVariants = (0, import_class_variance_authority12.cva)("flex items-
|
|
|
1293
1979
|
disabled: false
|
|
1294
1980
|
}
|
|
1295
1981
|
});
|
|
1296
|
-
var selectButtonVariants = (0,
|
|
1982
|
+
var selectButtonVariants = (0, import_class_variance_authority15.cva)(
|
|
1297
1983
|
"flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left paragraph-lg text-primary hover:bg-(--background-secondary)",
|
|
1298
1984
|
{
|
|
1299
1985
|
variants: {
|
|
@@ -1327,10 +2013,10 @@ var Select = (props) => {
|
|
|
1327
2013
|
} = props;
|
|
1328
2014
|
const isControlled = value !== void 0;
|
|
1329
2015
|
const controlledValue = value ?? "";
|
|
1330
|
-
const [internalValue, setInternalValue] =
|
|
2016
|
+
const [internalValue, setInternalValue] = React24.useState(
|
|
1331
2017
|
defaultValue ?? ""
|
|
1332
2018
|
);
|
|
1333
|
-
const [open, setOpen] =
|
|
2019
|
+
const [open, setOpen] = React24.useState(false);
|
|
1334
2020
|
const rawValue = isControlled ? controlledValue : internalValue;
|
|
1335
2021
|
const selectedOption = options.find((opt) => opt.value === rawValue);
|
|
1336
2022
|
const currentValue = selectedOption ? selectedOption.value : "";
|
|
@@ -1359,7 +2045,7 @@ var Select = (props) => {
|
|
|
1359
2045
|
setOpen(false);
|
|
1360
2046
|
}
|
|
1361
2047
|
};
|
|
1362
|
-
return /* @__PURE__ */ (0,
|
|
2048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1363
2049
|
Field,
|
|
1364
2050
|
{
|
|
1365
2051
|
label,
|
|
@@ -1367,7 +2053,7 @@ var Select = (props) => {
|
|
|
1367
2053
|
hideHint,
|
|
1368
2054
|
status,
|
|
1369
2055
|
disabled,
|
|
1370
|
-
children: /* @__PURE__ */ (0,
|
|
2056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1371
2057
|
SelectPrimitive.Root,
|
|
1372
2058
|
{
|
|
1373
2059
|
value: currentValue,
|
|
@@ -1378,7 +2064,7 @@ var Select = (props) => {
|
|
|
1378
2064
|
name,
|
|
1379
2065
|
required,
|
|
1380
2066
|
children: [
|
|
1381
|
-
/* @__PURE__ */ (0,
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1382
2068
|
"button",
|
|
1383
2069
|
{
|
|
1384
2070
|
type: "button",
|
|
@@ -1398,30 +2084,31 @@ var Select = (props) => {
|
|
|
1398
2084
|
"data-open": isOpen || void 0,
|
|
1399
2085
|
...buttonProps,
|
|
1400
2086
|
children: [
|
|
1401
|
-
/* @__PURE__ */ (0,
|
|
1402
|
-
/* @__PURE__ */ (0,
|
|
2087
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Value, { placeholder }),
|
|
2088
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1403
2089
|
"span",
|
|
1404
2090
|
{
|
|
1405
2091
|
className: cn(selectIconVariants({ size, disabled: !!disabled })),
|
|
1406
|
-
children: /* @__PURE__ */ (0,
|
|
2092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_icons8.ChevronDownIcon, {})
|
|
1407
2093
|
}
|
|
1408
2094
|
) })
|
|
1409
2095
|
]
|
|
1410
2096
|
}
|
|
1411
2097
|
) }),
|
|
1412
|
-
/* @__PURE__ */ (0,
|
|
2098
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1413
2099
|
SelectPrimitive.Content,
|
|
1414
2100
|
{
|
|
1415
2101
|
position: "popper",
|
|
1416
2102
|
align: "start",
|
|
1417
2103
|
sideOffset: 4,
|
|
1418
2104
|
className: cn(
|
|
1419
|
-
|
|
2105
|
+
dropdownSurfaceClass,
|
|
2106
|
+
dropdownScrollClass,
|
|
1420
2107
|
"min-w-343"
|
|
1421
2108
|
),
|
|
1422
2109
|
style: { minWidth: "var(--radix-select-trigger-width)" },
|
|
1423
|
-
children: /* @__PURE__ */ (0,
|
|
1424
|
-
hasValue && /* @__PURE__ */ (0,
|
|
2110
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Viewport, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col", children: [
|
|
2111
|
+
hasValue && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: cn("bg-(--background-neutral)"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1425
2112
|
"button",
|
|
1426
2113
|
{
|
|
1427
2114
|
type: "button",
|
|
@@ -1433,16 +2120,16 @@ var Select = (props) => {
|
|
|
1433
2120
|
children: "Clear"
|
|
1434
2121
|
}
|
|
1435
2122
|
) }),
|
|
1436
|
-
options.map((opt) => /* @__PURE__ */ (0,
|
|
2123
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1437
2124
|
SelectPrimitive.Item,
|
|
1438
2125
|
{
|
|
1439
2126
|
value: opt.value,
|
|
1440
2127
|
className: cn(
|
|
1441
|
-
"bg-(--background-neutral)
|
|
1442
|
-
"data-highlighted:bg-(--background-secondary) data-highlighted:
|
|
2128
|
+
"bg-(--background-neutral)",
|
|
2129
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1443
2130
|
"data-[state=checked]:bg-(--background-secondary)"
|
|
1444
2131
|
),
|
|
1445
|
-
children: /* @__PURE__ */ (0,
|
|
2132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: selectButtonVariants({ size }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.ItemText, { children: opt.label }) })
|
|
1446
2133
|
},
|
|
1447
2134
|
opt.value
|
|
1448
2135
|
))
|
|
@@ -1458,86 +2145,11 @@ var Select = (props) => {
|
|
|
1458
2145
|
Select.displayName = "Select";
|
|
1459
2146
|
|
|
1460
2147
|
// src/components/Inputs/PasswordInput.tsx
|
|
1461
|
-
var
|
|
1462
|
-
var
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
var
|
|
1466
|
-
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1467
|
-
var Input = React19.forwardRef(
|
|
1468
|
-
({ className, type, variant = "default", ...props }, ref) => {
|
|
1469
|
-
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";
|
|
1470
|
-
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";
|
|
1471
|
-
const bareStyles = "bg-transparent outline-none w-full";
|
|
1472
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1473
|
-
"input",
|
|
1474
|
-
{
|
|
1475
|
-
ref,
|
|
1476
|
-
type,
|
|
1477
|
-
"data-slot": "input",
|
|
1478
|
-
className: cn(
|
|
1479
|
-
base,
|
|
1480
|
-
variant === "default" ? defaultStyles : bareStyles,
|
|
1481
|
-
className
|
|
1482
|
-
),
|
|
1483
|
-
...props
|
|
1484
|
-
}
|
|
1485
|
-
);
|
|
1486
|
-
}
|
|
1487
|
-
);
|
|
1488
|
-
Input.displayName = "Input";
|
|
1489
|
-
|
|
1490
|
-
// src/components/Inputs/InputShell.tsx
|
|
1491
|
-
var React20 = __toESM(require("react"), 1);
|
|
1492
|
-
var import_class_variance_authority13 = require("class-variance-authority");
|
|
1493
|
-
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1494
|
-
var inputShellVariants = (0, import_class_variance_authority13.cva)(
|
|
1495
|
-
"group flex w-full items-center rounded-4 border bg-(--background-primary) text-left cursor-text border-(--border-secondary)",
|
|
1496
|
-
{
|
|
1497
|
-
variants: {
|
|
1498
|
-
size: {
|
|
1499
|
-
sm: "gap-2 px-2 py-1 h-8",
|
|
1500
|
-
md: "gap-2 px-2 py-2 h-10",
|
|
1501
|
-
lg: "gap-2 px-2 py-2 h-11",
|
|
1502
|
-
xl: "gap-2 px-[10px] py-2 h-14"
|
|
1503
|
-
},
|
|
1504
|
-
status: {
|
|
1505
|
-
default: "input-default",
|
|
1506
|
-
success: "input-success",
|
|
1507
|
-
error: "input-error"
|
|
1508
|
-
},
|
|
1509
|
-
disabled: {
|
|
1510
|
-
true: "bg-(--background-primary-disabled) border-(--border-secondary-disabled) text-primary-disabled cursor-default"
|
|
1511
|
-
}
|
|
1512
|
-
},
|
|
1513
|
-
defaultVariants: {
|
|
1514
|
-
size: "lg",
|
|
1515
|
-
status: "default"
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
);
|
|
1519
|
-
var InputShell = React20.forwardRef(
|
|
1520
|
-
({ size, status, disabled, className, ...rest }, ref) => {
|
|
1521
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1522
|
-
"div",
|
|
1523
|
-
{
|
|
1524
|
-
ref,
|
|
1525
|
-
"aria-disabled": disabled || void 0,
|
|
1526
|
-
className: cn(
|
|
1527
|
-
inputShellVariants({ size, status, disabled }),
|
|
1528
|
-
className
|
|
1529
|
-
),
|
|
1530
|
-
...rest
|
|
1531
|
-
}
|
|
1532
|
-
);
|
|
1533
|
-
}
|
|
1534
|
-
);
|
|
1535
|
-
InputShell.displayName = "InputShell";
|
|
1536
|
-
|
|
1537
|
-
// src/components/Inputs/PasswordInput.tsx
|
|
1538
|
-
var import_icons7 = require("@bubo-squared/icons");
|
|
1539
|
-
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1540
|
-
var passwordTextVariants = (0, import_class_variance_authority14.cva)("truncate", {
|
|
2148
|
+
var React25 = __toESM(require("react"), 1);
|
|
2149
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
2150
|
+
var import_icons9 = require("@bubo-squared/icons");
|
|
2151
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2152
|
+
var passwordTextVariants = (0, import_class_variance_authority16.cva)("truncate", {
|
|
1541
2153
|
variants: {
|
|
1542
2154
|
size: {
|
|
1543
2155
|
sm: "paragraph-md",
|
|
@@ -1555,7 +2167,7 @@ var passwordTextVariants = (0, import_class_variance_authority14.cva)("truncate"
|
|
|
1555
2167
|
disabled: false
|
|
1556
2168
|
}
|
|
1557
2169
|
});
|
|
1558
|
-
var
|
|
2170
|
+
var iconWrapperVariants2 = (0, import_class_variance_authority16.cva)(
|
|
1559
2171
|
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
1560
2172
|
{
|
|
1561
2173
|
variants: {
|
|
@@ -1574,7 +2186,7 @@ var iconWrapperVariants = (0, import_class_variance_authority14.cva)(
|
|
|
1574
2186
|
}
|
|
1575
2187
|
}
|
|
1576
2188
|
);
|
|
1577
|
-
var actionButtonVariants = (0,
|
|
2189
|
+
var actionButtonVariants = (0, import_class_variance_authority16.cva)(
|
|
1578
2190
|
"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 ",
|
|
1579
2191
|
{
|
|
1580
2192
|
variants: {
|
|
@@ -1611,12 +2223,12 @@ var PasswordInput = (props) => {
|
|
|
1611
2223
|
...inputProps
|
|
1612
2224
|
} = props;
|
|
1613
2225
|
const isControlled = value !== void 0;
|
|
1614
|
-
const [internalValue, setInternalValue] =
|
|
2226
|
+
const [internalValue, setInternalValue] = React25.useState(
|
|
1615
2227
|
defaultValue ?? ""
|
|
1616
2228
|
);
|
|
1617
|
-
const [isRevealed, setIsRevealed] =
|
|
2229
|
+
const [isRevealed, setIsRevealed] = React25.useState(false);
|
|
1618
2230
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
1619
|
-
const inputRef =
|
|
2231
|
+
const inputRef = React25.useRef(null);
|
|
1620
2232
|
const showLeadingIcon = !!leadingIcon;
|
|
1621
2233
|
const handleContainerClick = () => {
|
|
1622
2234
|
if (disabled) return;
|
|
@@ -1628,7 +2240,7 @@ var PasswordInput = (props) => {
|
|
|
1628
2240
|
}
|
|
1629
2241
|
onChange?.(event);
|
|
1630
2242
|
};
|
|
1631
|
-
return /* @__PURE__ */ (0,
|
|
2243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1632
2244
|
Field,
|
|
1633
2245
|
{
|
|
1634
2246
|
label,
|
|
@@ -1636,7 +2248,7 @@ var PasswordInput = (props) => {
|
|
|
1636
2248
|
hideHint,
|
|
1637
2249
|
status,
|
|
1638
2250
|
disabled,
|
|
1639
|
-
children: /* @__PURE__ */ (0,
|
|
2251
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1640
2252
|
InputShell,
|
|
1641
2253
|
{
|
|
1642
2254
|
size,
|
|
@@ -1645,16 +2257,16 @@ var PasswordInput = (props) => {
|
|
|
1645
2257
|
className,
|
|
1646
2258
|
onClick: handleContainerClick,
|
|
1647
2259
|
children: [
|
|
1648
|
-
showLeadingIcon && /* @__PURE__ */ (0,
|
|
2260
|
+
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1649
2261
|
"span",
|
|
1650
2262
|
{
|
|
1651
2263
|
className: cn(
|
|
1652
|
-
|
|
2264
|
+
iconWrapperVariants2({ size, disabled: !!disabled })
|
|
1653
2265
|
),
|
|
1654
2266
|
children: leadingIcon
|
|
1655
2267
|
}
|
|
1656
2268
|
),
|
|
1657
|
-
/* @__PURE__ */ (0,
|
|
2269
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1658
2270
|
Input,
|
|
1659
2271
|
{
|
|
1660
2272
|
ref: inputRef,
|
|
@@ -1669,7 +2281,7 @@ var PasswordInput = (props) => {
|
|
|
1669
2281
|
...inputProps
|
|
1670
2282
|
}
|
|
1671
2283
|
),
|
|
1672
|
-
/* @__PURE__ */ (0,
|
|
2284
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1673
2285
|
"button",
|
|
1674
2286
|
{
|
|
1675
2287
|
type: "button",
|
|
@@ -1682,9 +2294,9 @@ var PasswordInput = (props) => {
|
|
|
1682
2294
|
"aria-label": isRevealed ? "Hide password" : "Show password",
|
|
1683
2295
|
className: cn(
|
|
1684
2296
|
"cursor-pointer",
|
|
1685
|
-
variant === "text" ? actionButtonVariants({ size, disabled: !!disabled }) :
|
|
2297
|
+
variant === "text" ? actionButtonVariants({ size, disabled: !!disabled }) : iconWrapperVariants2({ size, disabled: !!disabled })
|
|
1686
2298
|
),
|
|
1687
|
-
children: variant === "icon" ? isRevealed ? /* @__PURE__ */ (0,
|
|
2299
|
+
children: variant === "icon" ? isRevealed ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_icons9.EyeSlashIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_icons9.EyeIcon, {}) : isRevealed ? "Hide" : "Show"
|
|
1688
2300
|
}
|
|
1689
2301
|
)
|
|
1690
2302
|
]
|
|
@@ -1696,17 +2308,17 @@ var PasswordInput = (props) => {
|
|
|
1696
2308
|
PasswordInput.displayName = "PasswordInput";
|
|
1697
2309
|
|
|
1698
2310
|
// src/components/Inputs/PhoneInput.tsx
|
|
1699
|
-
var
|
|
1700
|
-
var
|
|
2311
|
+
var React31 = __toESM(require("react"), 1);
|
|
2312
|
+
var import_icons11 = require("@bubo-squared/icons");
|
|
1701
2313
|
var RPNInput = __toESM(require("react-phone-number-input"), 1);
|
|
1702
2314
|
var import_flags = __toESM(require("react-phone-number-input/flags"), 1);
|
|
1703
2315
|
|
|
1704
2316
|
// src/components/ui/button.tsx
|
|
1705
|
-
var
|
|
2317
|
+
var React26 = require("react");
|
|
1706
2318
|
var import_react_slot7 = require("@radix-ui/react-slot");
|
|
1707
|
-
var
|
|
1708
|
-
var
|
|
1709
|
-
var buttonVariants2 = (0,
|
|
2319
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
2320
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2321
|
+
var buttonVariants2 = (0, import_class_variance_authority17.cva)(
|
|
1710
2322
|
"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",
|
|
1711
2323
|
{
|
|
1712
2324
|
variants: {
|
|
@@ -1741,7 +2353,7 @@ function Button2({
|
|
|
1741
2353
|
...props
|
|
1742
2354
|
}) {
|
|
1743
2355
|
const Comp = asChild ? import_react_slot7.Slot : "button";
|
|
1744
|
-
return /* @__PURE__ */ (0,
|
|
2356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1745
2357
|
Comp,
|
|
1746
2358
|
{
|
|
1747
2359
|
"data-slot": "button",
|
|
@@ -1754,12 +2366,12 @@ function Button2({
|
|
|
1754
2366
|
}
|
|
1755
2367
|
|
|
1756
2368
|
// src/components/ui/command.tsx
|
|
1757
|
-
var
|
|
2369
|
+
var React28 = require("react");
|
|
1758
2370
|
var import_cmdk = require("cmdk");
|
|
1759
|
-
var
|
|
2371
|
+
var import_icons10 = require("@bubo-squared/icons");
|
|
1760
2372
|
|
|
1761
2373
|
// src/components/ui/dialog.tsx
|
|
1762
|
-
var
|
|
2374
|
+
var React27 = require("react");
|
|
1763
2375
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1764
2376
|
|
|
1765
2377
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
@@ -1864,15 +2476,15 @@ var __iconNode2 = [
|
|
|
1864
2476
|
var Ellipsis = createLucideIcon("ellipsis", __iconNode2);
|
|
1865
2477
|
|
|
1866
2478
|
// src/components/ui/dialog.tsx
|
|
1867
|
-
var
|
|
2479
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1868
2480
|
|
|
1869
2481
|
// src/components/ui/command.tsx
|
|
1870
|
-
var
|
|
2482
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1871
2483
|
function Command({
|
|
1872
2484
|
className,
|
|
1873
2485
|
...props
|
|
1874
2486
|
}) {
|
|
1875
|
-
return /* @__PURE__ */ (0,
|
|
2487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1876
2488
|
import_cmdk.Command,
|
|
1877
2489
|
{
|
|
1878
2490
|
"data-slot": "command",
|
|
@@ -1888,14 +2500,14 @@ function CommandInput({
|
|
|
1888
2500
|
className,
|
|
1889
2501
|
...props
|
|
1890
2502
|
}) {
|
|
1891
|
-
return /* @__PURE__ */ (0,
|
|
2503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1892
2504
|
"div",
|
|
1893
2505
|
{
|
|
1894
2506
|
"data-slot": "command-input-wrapper",
|
|
1895
2507
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1896
2508
|
children: [
|
|
1897
|
-
/* @__PURE__ */ (0,
|
|
1898
|
-
/* @__PURE__ */ (0,
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.SearchIcon, { className: "size-4 shrink-0 opacity-50 text-(--color-secondary)" }),
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1899
2511
|
import_cmdk.Command.Input,
|
|
1900
2512
|
{
|
|
1901
2513
|
"data-slot": "command-input",
|
|
@@ -1914,7 +2526,7 @@ function CommandList({
|
|
|
1914
2526
|
className,
|
|
1915
2527
|
...props
|
|
1916
2528
|
}) {
|
|
1917
|
-
return /* @__PURE__ */ (0,
|
|
2529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1918
2530
|
import_cmdk.Command.List,
|
|
1919
2531
|
{
|
|
1920
2532
|
"data-slot": "command-list",
|
|
@@ -1929,7 +2541,7 @@ function CommandList({
|
|
|
1929
2541
|
function CommandEmpty({
|
|
1930
2542
|
...props
|
|
1931
2543
|
}) {
|
|
1932
|
-
return /* @__PURE__ */ (0,
|
|
2544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1933
2545
|
import_cmdk.Command.Empty,
|
|
1934
2546
|
{
|
|
1935
2547
|
"data-slot": "command-empty",
|
|
@@ -1942,7 +2554,7 @@ function CommandGroup({
|
|
|
1942
2554
|
className,
|
|
1943
2555
|
...props
|
|
1944
2556
|
}) {
|
|
1945
|
-
return /* @__PURE__ */ (0,
|
|
2557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1946
2558
|
import_cmdk.Command.Group,
|
|
1947
2559
|
{
|
|
1948
2560
|
"data-slot": "command-group",
|
|
@@ -1958,7 +2570,7 @@ function CommandItem({
|
|
|
1958
2570
|
className,
|
|
1959
2571
|
...props
|
|
1960
2572
|
}) {
|
|
1961
|
-
return /* @__PURE__ */ (0,
|
|
2573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1962
2574
|
import_cmdk.Command.Item,
|
|
1963
2575
|
{
|
|
1964
2576
|
"data-slot": "command-item",
|
|
@@ -1972,18 +2584,18 @@ function CommandItem({
|
|
|
1972
2584
|
}
|
|
1973
2585
|
|
|
1974
2586
|
// src/components/ui/popover.tsx
|
|
1975
|
-
var
|
|
2587
|
+
var React29 = require("react");
|
|
1976
2588
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1977
|
-
var
|
|
2589
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1978
2590
|
function Popover({
|
|
1979
2591
|
...props
|
|
1980
2592
|
}) {
|
|
1981
|
-
return /* @__PURE__ */ (0,
|
|
2593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1982
2594
|
}
|
|
1983
2595
|
function PopoverTrigger({
|
|
1984
2596
|
...props
|
|
1985
2597
|
}) {
|
|
1986
|
-
return /* @__PURE__ */ (0,
|
|
2598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1987
2599
|
}
|
|
1988
2600
|
function PopoverContent({
|
|
1989
2601
|
className,
|
|
@@ -1991,7 +2603,7 @@ function PopoverContent({
|
|
|
1991
2603
|
sideOffset = 4,
|
|
1992
2604
|
...props
|
|
1993
2605
|
}) {
|
|
1994
|
-
return /* @__PURE__ */ (0,
|
|
2606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1995
2607
|
PopoverPrimitive.Content,
|
|
1996
2608
|
{
|
|
1997
2609
|
"data-slot": "popover-content",
|
|
@@ -2007,22 +2619,22 @@ function PopoverContent({
|
|
|
2007
2619
|
}
|
|
2008
2620
|
|
|
2009
2621
|
// src/components/ui/scroll-area.tsx
|
|
2010
|
-
var
|
|
2622
|
+
var React30 = require("react");
|
|
2011
2623
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
2012
|
-
var
|
|
2624
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2013
2625
|
function ScrollArea({
|
|
2014
2626
|
className,
|
|
2015
2627
|
children,
|
|
2016
2628
|
...props
|
|
2017
2629
|
}) {
|
|
2018
|
-
return /* @__PURE__ */ (0,
|
|
2630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2019
2631
|
ScrollAreaPrimitive.Root,
|
|
2020
2632
|
{
|
|
2021
2633
|
"data-slot": "scroll-area",
|
|
2022
2634
|
className: cn("relative", className),
|
|
2023
2635
|
...props,
|
|
2024
2636
|
children: [
|
|
2025
|
-
/* @__PURE__ */ (0,
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2026
2638
|
ScrollAreaPrimitive.Viewport,
|
|
2027
2639
|
{
|
|
2028
2640
|
"data-slot": "scroll-area-viewport",
|
|
@@ -2030,8 +2642,8 @@ function ScrollArea({
|
|
|
2030
2642
|
children
|
|
2031
2643
|
}
|
|
2032
2644
|
),
|
|
2033
|
-
/* @__PURE__ */ (0,
|
|
2034
|
-
/* @__PURE__ */ (0,
|
|
2645
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ScrollBar, {}),
|
|
2646
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
2035
2647
|
]
|
|
2036
2648
|
}
|
|
2037
2649
|
);
|
|
@@ -2041,7 +2653,7 @@ function ScrollBar({
|
|
|
2041
2653
|
orientation = "vertical",
|
|
2042
2654
|
...props
|
|
2043
2655
|
}) {
|
|
2044
|
-
return /* @__PURE__ */ (0,
|
|
2656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2045
2657
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2046
2658
|
{
|
|
2047
2659
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -2054,7 +2666,7 @@ function ScrollBar({
|
|
|
2054
2666
|
className
|
|
2055
2667
|
),
|
|
2056
2668
|
...props,
|
|
2057
|
-
children: /* @__PURE__ */ (0,
|
|
2669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2058
2670
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2059
2671
|
{
|
|
2060
2672
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2066,10 +2678,10 @@ function ScrollBar({
|
|
|
2066
2678
|
}
|
|
2067
2679
|
|
|
2068
2680
|
// src/components/Inputs/PhoneInput.tsx
|
|
2069
|
-
var
|
|
2070
|
-
var
|
|
2681
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
2682
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2071
2683
|
var inputBase = "h-full rounded-4 border-(--border-secondary) bg-(--background-primary) hover:border-(--border-secondary-hover)";
|
|
2072
|
-
var sizeBase = (0,
|
|
2684
|
+
var sizeBase = (0, import_class_variance_authority18.cva)(
|
|
2073
2685
|
"flex w-full",
|
|
2074
2686
|
{
|
|
2075
2687
|
variants: {
|
|
@@ -2082,7 +2694,7 @@ var sizeBase = (0, import_class_variance_authority16.cva)(
|
|
|
2082
2694
|
}
|
|
2083
2695
|
}
|
|
2084
2696
|
);
|
|
2085
|
-
var
|
|
2697
|
+
var inputTextVariants2 = (0, import_class_variance_authority18.cva)("", {
|
|
2086
2698
|
variants: {
|
|
2087
2699
|
size: {
|
|
2088
2700
|
sm: "paragraph-md",
|
|
@@ -2098,12 +2710,41 @@ var inputTextVariants = (0, import_class_variance_authority16.cva)("", {
|
|
|
2098
2710
|
size: "lg"
|
|
2099
2711
|
}
|
|
2100
2712
|
});
|
|
2713
|
+
var dropdownWidthVariants = (0, import_class_variance_authority18.cva)("", {
|
|
2714
|
+
variants: {
|
|
2715
|
+
size: {
|
|
2716
|
+
sm: "min-w-70",
|
|
2717
|
+
md: "min-w-72",
|
|
2718
|
+
lg: "min-w-80",
|
|
2719
|
+
xl: "min-w-96"
|
|
2720
|
+
}
|
|
2721
|
+
},
|
|
2722
|
+
defaultVariants: {
|
|
2723
|
+
size: "lg"
|
|
2724
|
+
}
|
|
2725
|
+
});
|
|
2101
2726
|
var wrapperStatusClass = {
|
|
2102
2727
|
default: "input-default-nested",
|
|
2103
2728
|
success: "input-success-nested",
|
|
2104
2729
|
error: "input-error-nested"
|
|
2105
2730
|
};
|
|
2106
|
-
var
|
|
2731
|
+
var countryOptionVariants = (0, import_class_variance_authority18.cva)(
|
|
2732
|
+
"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",
|
|
2733
|
+
{
|
|
2734
|
+
variants: {
|
|
2735
|
+
size: {
|
|
2736
|
+
sm: "paragraph-sm py-(--space-4)",
|
|
2737
|
+
md: "paragraph-md py-(--space-6)",
|
|
2738
|
+
lg: "paragraph-lg py-(--space-8)",
|
|
2739
|
+
xl: "subtitle py-(--space-10)"
|
|
2740
|
+
}
|
|
2741
|
+
},
|
|
2742
|
+
defaultVariants: {
|
|
2743
|
+
size: "lg"
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
);
|
|
2747
|
+
var PhoneInput = React31.forwardRef(
|
|
2107
2748
|
(props, ref) => {
|
|
2108
2749
|
const {
|
|
2109
2750
|
className,
|
|
@@ -2118,7 +2759,7 @@ var PhoneInput = React27.forwardRef(
|
|
|
2118
2759
|
status = "default",
|
|
2119
2760
|
...rest
|
|
2120
2761
|
} = props;
|
|
2121
|
-
return /* @__PURE__ */ (0,
|
|
2762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2122
2763
|
Field,
|
|
2123
2764
|
{
|
|
2124
2765
|
label,
|
|
@@ -2127,16 +2768,16 @@ var PhoneInput = React27.forwardRef(
|
|
|
2127
2768
|
status,
|
|
2128
2769
|
disabled,
|
|
2129
2770
|
className,
|
|
2130
|
-
children: /* @__PURE__ */ (0,
|
|
2771
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("w-full", wrapperStatusClass[status]), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2131
2772
|
RPNInput.default,
|
|
2132
2773
|
{
|
|
2133
2774
|
ref,
|
|
2134
2775
|
className: cn(
|
|
2135
2776
|
sizeBase({ size }),
|
|
2136
|
-
|
|
2777
|
+
inputTextVariants2({ size, disabled })
|
|
2137
2778
|
),
|
|
2138
2779
|
flagComponent: FlagComponent,
|
|
2139
|
-
countrySelectComponent: CountrySelect,
|
|
2780
|
+
countrySelectComponent: (countrySelectProps) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CountrySelect, { ...countrySelectProps, size }),
|
|
2140
2781
|
inputComponent: InputComponent,
|
|
2141
2782
|
smartCaret: false,
|
|
2142
2783
|
value: value || void 0,
|
|
@@ -2153,9 +2794,9 @@ var PhoneInput = React27.forwardRef(
|
|
|
2153
2794
|
}
|
|
2154
2795
|
);
|
|
2155
2796
|
PhoneInput.displayName = "PhoneInput";
|
|
2156
|
-
var InputComponent =
|
|
2797
|
+
var InputComponent = React31.forwardRef((props, ref) => {
|
|
2157
2798
|
const { className, ...rest } = props;
|
|
2158
|
-
return /* @__PURE__ */ (0,
|
|
2799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2159
2800
|
Input,
|
|
2160
2801
|
{
|
|
2161
2802
|
ref,
|
|
@@ -2170,12 +2811,13 @@ var CountrySelect = ({
|
|
|
2170
2811
|
disabled,
|
|
2171
2812
|
value: selectedCountry,
|
|
2172
2813
|
options: countryList,
|
|
2173
|
-
onChange
|
|
2814
|
+
onChange,
|
|
2815
|
+
size = "lg"
|
|
2174
2816
|
}) => {
|
|
2175
|
-
const scrollAreaRef =
|
|
2176
|
-
const [searchValue, setSearchValue] =
|
|
2177
|
-
const [isOpen, setIsOpen] =
|
|
2178
|
-
return /* @__PURE__ */ (0,
|
|
2817
|
+
const scrollAreaRef = React31.useRef(null);
|
|
2818
|
+
const [searchValue, setSearchValue] = React31.useState("");
|
|
2819
|
+
const [isOpen, setIsOpen] = React31.useState(false);
|
|
2820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2179
2821
|
Popover,
|
|
2180
2822
|
{
|
|
2181
2823
|
open: isOpen,
|
|
@@ -2187,7 +2829,7 @@ var CountrySelect = ({
|
|
|
2187
2829
|
}
|
|
2188
2830
|
},
|
|
2189
2831
|
children: [
|
|
2190
|
-
/* @__PURE__ */ (0,
|
|
2832
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2191
2833
|
Button2,
|
|
2192
2834
|
{
|
|
2193
2835
|
type: "button",
|
|
@@ -2195,15 +2837,15 @@ var CountrySelect = ({
|
|
|
2195
2837
|
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)"),
|
|
2196
2838
|
disabled,
|
|
2197
2839
|
children: [
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2840
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2199
2841
|
FlagComponent,
|
|
2200
2842
|
{
|
|
2201
2843
|
country: selectedCountry,
|
|
2202
2844
|
countryName: selectedCountry
|
|
2203
2845
|
}
|
|
2204
2846
|
),
|
|
2205
|
-
/* @__PURE__ */ (0,
|
|
2206
|
-
|
|
2847
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2848
|
+
import_icons11.CodeIcon,
|
|
2207
2849
|
{
|
|
2208
2850
|
className: cn(
|
|
2209
2851
|
"-mr-2 size-4 opacity-50 rotate-90",
|
|
@@ -2214,13 +2856,17 @@ var CountrySelect = ({
|
|
|
2214
2856
|
]
|
|
2215
2857
|
}
|
|
2216
2858
|
) }),
|
|
2217
|
-
/* @__PURE__ */ (0,
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2218
2860
|
PopoverContent,
|
|
2219
2861
|
{
|
|
2220
2862
|
align: "start",
|
|
2221
|
-
className:
|
|
2222
|
-
|
|
2223
|
-
|
|
2863
|
+
className: cn(
|
|
2864
|
+
"p-0 **:data-[slot='command-input-wrapper']:border-b-(--border-secondary)",
|
|
2865
|
+
dropdownWidthVariants({ size }),
|
|
2866
|
+
dropdownSurfaceClass
|
|
2867
|
+
),
|
|
2868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Command, { className: "bg-transparent", children: [
|
|
2869
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2224
2870
|
CommandInput,
|
|
2225
2871
|
{
|
|
2226
2872
|
value: searchValue,
|
|
@@ -2240,17 +2886,18 @@ var CountrySelect = ({
|
|
|
2240
2886
|
placeholder: "Search country..."
|
|
2241
2887
|
}
|
|
2242
2888
|
),
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2244
|
-
/* @__PURE__ */ (0,
|
|
2245
|
-
/* @__PURE__ */ (0,
|
|
2246
|
-
({ value, label }) => value ? /* @__PURE__ */ (0,
|
|
2889
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandList, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(ScrollArea, { ref: scrollAreaRef, className: "max-h-79", children: [
|
|
2890
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandEmpty, { children: "No country found." }),
|
|
2891
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandGroup, { className: "p-0", children: countryList.map(
|
|
2892
|
+
({ value, label }) => value ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2247
2893
|
CountrySelectOption,
|
|
2248
2894
|
{
|
|
2249
2895
|
country: value,
|
|
2250
2896
|
countryName: label,
|
|
2251
2897
|
selectedCountry,
|
|
2252
2898
|
onChange,
|
|
2253
|
-
onSelectComplete: () => setIsOpen(false)
|
|
2899
|
+
onSelectComplete: () => setIsOpen(false),
|
|
2900
|
+
size
|
|
2254
2901
|
},
|
|
2255
2902
|
value
|
|
2256
2903
|
) : null
|
|
@@ -2269,23 +2916,24 @@ var CountrySelectOption = (props) => {
|
|
|
2269
2916
|
countryName,
|
|
2270
2917
|
selectedCountry,
|
|
2271
2918
|
onChange,
|
|
2272
|
-
onSelectComplete
|
|
2919
|
+
onSelectComplete,
|
|
2920
|
+
size = "lg"
|
|
2273
2921
|
} = props;
|
|
2274
2922
|
const handleSelect = () => {
|
|
2275
2923
|
onChange(country);
|
|
2276
2924
|
onSelectComplete();
|
|
2277
2925
|
};
|
|
2278
|
-
return /* @__PURE__ */ (0,
|
|
2926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2279
2927
|
CommandItem,
|
|
2280
2928
|
{
|
|
2281
|
-
className:
|
|
2929
|
+
className: cn(countryOptionVariants({ size })),
|
|
2282
2930
|
onSelect: handleSelect,
|
|
2283
2931
|
children: [
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2287
|
-
/* @__PURE__ */ (0,
|
|
2288
|
-
|
|
2932
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FlagComponent, { country, countryName }),
|
|
2933
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "flex-1", children: countryName }),
|
|
2934
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-foreground/50", children: `+${RPNInput.getCountryCallingCode(country)}` }),
|
|
2935
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2936
|
+
import_icons11.CheckIcon,
|
|
2289
2937
|
{
|
|
2290
2938
|
className: `ml-auto size-4 ${country === selectedCountry ? "opacity-100" : "opacity-0"}`
|
|
2291
2939
|
}
|
|
@@ -2296,13 +2944,13 @@ var CountrySelectOption = (props) => {
|
|
|
2296
2944
|
};
|
|
2297
2945
|
var FlagComponent = ({ country, countryName }) => {
|
|
2298
2946
|
const Flag = import_flags.default[country];
|
|
2299
|
-
return /* @__PURE__ */ (0,
|
|
2947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "flex h-4 w-6 overflow-hidden rounded-2 bg-foreground/20 [&_svg:not([class*='size-'])]:size-full", children: Flag && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Flag, { title: countryName }) });
|
|
2300
2948
|
};
|
|
2301
2949
|
|
|
2302
2950
|
// src/components/Inputs/RadioGroup.tsx
|
|
2303
|
-
var
|
|
2951
|
+
var React32 = __toESM(require("react"), 1);
|
|
2304
2952
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
2305
|
-
var
|
|
2953
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2306
2954
|
var RadioGroup = ({
|
|
2307
2955
|
label,
|
|
2308
2956
|
hint,
|
|
@@ -2316,20 +2964,20 @@ var RadioGroup = ({
|
|
|
2316
2964
|
className,
|
|
2317
2965
|
...rootProps
|
|
2318
2966
|
}) => {
|
|
2319
|
-
const groupId =
|
|
2967
|
+
const groupId = React32.useId();
|
|
2320
2968
|
const hintId = hint ? `${groupId}-hint` : void 0;
|
|
2321
2969
|
const handleValueChange = (next) => {
|
|
2322
2970
|
onValueChange?.(next);
|
|
2323
2971
|
};
|
|
2324
2972
|
const isHorizontal = orientation === "horizontal";
|
|
2325
|
-
return /* @__PURE__ */ (0,
|
|
2973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2326
2974
|
Field,
|
|
2327
2975
|
{
|
|
2328
2976
|
label,
|
|
2329
2977
|
hint,
|
|
2330
2978
|
hideHint,
|
|
2331
2979
|
disabled,
|
|
2332
|
-
children: /* @__PURE__ */ (0,
|
|
2980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2333
2981
|
RadioGroupPrimitive.Root,
|
|
2334
2982
|
{
|
|
2335
2983
|
...rootProps,
|
|
@@ -2343,7 +2991,7 @@ var RadioGroup = ({
|
|
|
2343
2991
|
isHorizontal ? "flex-row gap-6" : "flex-col gap-2",
|
|
2344
2992
|
className
|
|
2345
2993
|
),
|
|
2346
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
2994
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "relative inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2347
2995
|
RadioGroupPrimitive.Item,
|
|
2348
2996
|
{
|
|
2349
2997
|
value: option.value,
|
|
@@ -2354,7 +3002,7 @@ var RadioGroup = ({
|
|
|
2354
3002
|
disabled || option.disabled ? "cursor-default" : "cursor-pointer"
|
|
2355
3003
|
),
|
|
2356
3004
|
children: [
|
|
2357
|
-
/* @__PURE__ */ (0,
|
|
3005
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2358
3006
|
"span",
|
|
2359
3007
|
{
|
|
2360
3008
|
className: cn(
|
|
@@ -2380,7 +3028,7 @@ var RadioGroup = ({
|
|
|
2380
3028
|
"group-[&[data-disabled][data-state=checked]]:border-(--border-primary-disabled)",
|
|
2381
3029
|
"group-[&[data-disabled][data-state=checked]]:bg-(--background-primary-disabled)"
|
|
2382
3030
|
),
|
|
2383
|
-
children: /* @__PURE__ */ (0,
|
|
3031
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2384
3032
|
"span",
|
|
2385
3033
|
{
|
|
2386
3034
|
className: cn(
|
|
@@ -2395,7 +3043,7 @@ var RadioGroup = ({
|
|
|
2395
3043
|
)
|
|
2396
3044
|
}
|
|
2397
3045
|
),
|
|
2398
|
-
/* @__PURE__ */ (0,
|
|
3046
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2399
3047
|
"span",
|
|
2400
3048
|
{
|
|
2401
3049
|
className: cn(
|
|
@@ -2415,11 +3063,11 @@ var RadioGroup = ({
|
|
|
2415
3063
|
};
|
|
2416
3064
|
|
|
2417
3065
|
// src/components/Inputs/SearchInput.tsx
|
|
2418
|
-
var
|
|
2419
|
-
var
|
|
2420
|
-
var
|
|
2421
|
-
var
|
|
2422
|
-
var searchTextVariants = (0,
|
|
3066
|
+
var React33 = __toESM(require("react"), 1);
|
|
3067
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
3068
|
+
var import_icons12 = require("@bubo-squared/icons");
|
|
3069
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3070
|
+
var searchTextVariants = (0, import_class_variance_authority19.cva)("truncate", {
|
|
2423
3071
|
variants: {
|
|
2424
3072
|
size: {
|
|
2425
3073
|
sm: "paragraph-md",
|
|
@@ -2432,7 +3080,7 @@ var searchTextVariants = (0, import_class_variance_authority17.cva)("truncate",
|
|
|
2432
3080
|
size: "lg"
|
|
2433
3081
|
}
|
|
2434
3082
|
});
|
|
2435
|
-
var
|
|
3083
|
+
var iconWrapperVariants3 = (0, import_class_variance_authority19.cva)("flex items-center justify-center shrink-0 text-(--icon-primary)", {
|
|
2436
3084
|
variants: {
|
|
2437
3085
|
size: {
|
|
2438
3086
|
sm: "size-4 [&>svg]:size-4",
|
|
@@ -2459,13 +3107,13 @@ var SearchInput = (props) => {
|
|
|
2459
3107
|
trailingIcon,
|
|
2460
3108
|
...inputProps
|
|
2461
3109
|
} = props;
|
|
2462
|
-
const inputRef =
|
|
3110
|
+
const inputRef = React33.useRef(null);
|
|
2463
3111
|
const handleContainerClick = () => {
|
|
2464
3112
|
if (disabled) return;
|
|
2465
3113
|
inputRef.current?.focus();
|
|
2466
3114
|
};
|
|
2467
3115
|
const showTrailingIcon = !!trailingIcon;
|
|
2468
|
-
return /* @__PURE__ */ (0,
|
|
3116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col gap-2 items-start w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "relative w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2469
3117
|
InputShell,
|
|
2470
3118
|
{
|
|
2471
3119
|
size,
|
|
@@ -2474,8 +3122,8 @@ var SearchInput = (props) => {
|
|
|
2474
3122
|
className,
|
|
2475
3123
|
onClick: handleContainerClick,
|
|
2476
3124
|
children: [
|
|
2477
|
-
showLeadingIcon && /* @__PURE__ */ (0,
|
|
2478
|
-
/* @__PURE__ */ (0,
|
|
3125
|
+
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn(iconWrapperVariants3({ size, disabled: !!disabled })), children: leadingIcon ?? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons12.SearchIcon, {}) }),
|
|
3126
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2479
3127
|
Input,
|
|
2480
3128
|
{
|
|
2481
3129
|
ref: inputRef,
|
|
@@ -2489,7 +3137,7 @@ var SearchInput = (props) => {
|
|
|
2489
3137
|
...inputProps
|
|
2490
3138
|
}
|
|
2491
3139
|
),
|
|
2492
|
-
showTrailingIcon && /* @__PURE__ */ (0,
|
|
3140
|
+
showTrailingIcon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn("cursor-pointer", iconWrapperVariants3({ size, disabled: !!disabled })), children: trailingIcon })
|
|
2493
3141
|
]
|
|
2494
3142
|
}
|
|
2495
3143
|
) }) });
|
|
@@ -2497,8 +3145,8 @@ var SearchInput = (props) => {
|
|
|
2497
3145
|
SearchInput.displayName = "SearchInput";
|
|
2498
3146
|
|
|
2499
3147
|
// src/components/Inputs/Slider.tsx
|
|
2500
|
-
var
|
|
2501
|
-
var
|
|
3148
|
+
var React34 = __toESM(require("react"), 1);
|
|
3149
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2502
3150
|
var wrapperBase = "flex flex-col gap-2 items-start";
|
|
2503
3151
|
var isRangeProps = (props) => {
|
|
2504
3152
|
return Array.isArray(props.value) || Array.isArray(props.defaultValue);
|
|
@@ -2525,7 +3173,7 @@ var Slider = (props) => {
|
|
|
2525
3173
|
const isRange = isRangeProps(props);
|
|
2526
3174
|
const isControlled = value !== void 0;
|
|
2527
3175
|
const expectedLength = isRange ? 2 : 1;
|
|
2528
|
-
const normalizeArray =
|
|
3176
|
+
const normalizeArray = React34.useCallback(
|
|
2529
3177
|
(arr, fallback) => {
|
|
2530
3178
|
if (!arr || arr.length === 0) return fallback;
|
|
2531
3179
|
if (arr.length === expectedLength) return arr;
|
|
@@ -2537,16 +3185,16 @@ var Slider = (props) => {
|
|
|
2537
3185
|
},
|
|
2538
3186
|
[expectedLength, max]
|
|
2539
3187
|
);
|
|
2540
|
-
const defaultInternal =
|
|
3188
|
+
const defaultInternal = React34.useMemo(() => {
|
|
2541
3189
|
const defaultValueArray = toArray(defaultValue);
|
|
2542
3190
|
if (defaultValueArray) return normalizeArray(defaultValueArray, []);
|
|
2543
3191
|
if (isRange) return [min, Math.min(min + (max - min) / 4, max)];
|
|
2544
3192
|
return [min + (max - min) / 3];
|
|
2545
3193
|
}, [defaultValue, min, max, isRange, normalizeArray]);
|
|
2546
|
-
const [internalValue, setInternalValue] =
|
|
3194
|
+
const [internalValue, setInternalValue] = React34.useState(
|
|
2547
3195
|
() => normalizeArray(isControlled ? toArray(value) : defaultInternal, defaultInternal)
|
|
2548
3196
|
);
|
|
2549
|
-
|
|
3197
|
+
React34.useEffect(() => {
|
|
2550
3198
|
if (isControlled) {
|
|
2551
3199
|
setInternalValue(
|
|
2552
3200
|
(current2) => normalizeArray(toArray(value), current2.length ? current2 : defaultInternal)
|
|
@@ -2554,15 +3202,15 @@ var Slider = (props) => {
|
|
|
2554
3202
|
}
|
|
2555
3203
|
}, [isControlled, value, normalizeArray, defaultInternal]);
|
|
2556
3204
|
const current = internalValue;
|
|
2557
|
-
const trackRef =
|
|
2558
|
-
const [draggingThumbIndex, setDraggingThumbIndex] =
|
|
2559
|
-
const [hoveredThumbIndex, setHoveredThumbIndex] =
|
|
2560
|
-
const clamp =
|
|
3205
|
+
const trackRef = React34.useRef(null);
|
|
3206
|
+
const [draggingThumbIndex, setDraggingThumbIndex] = React34.useState(null);
|
|
3207
|
+
const [hoveredThumbIndex, setHoveredThumbIndex] = React34.useState(null);
|
|
3208
|
+
const clamp = React34.useCallback((val) => {
|
|
2561
3209
|
if (val < min) return min;
|
|
2562
3210
|
if (val > max) return max;
|
|
2563
3211
|
return val;
|
|
2564
3212
|
}, [min, max]);
|
|
2565
|
-
const enforceMinGap =
|
|
3213
|
+
const enforceMinGap = React34.useCallback((next, prev) => {
|
|
2566
3214
|
if (!isRange || next.length !== 2 || step <= 0) return next;
|
|
2567
3215
|
let [low, high] = next;
|
|
2568
3216
|
const [prevLow, prevHigh] = prev.length === 2 ? prev : next;
|
|
@@ -2586,7 +3234,7 @@ var Slider = (props) => {
|
|
|
2586
3234
|
}
|
|
2587
3235
|
return [low, high];
|
|
2588
3236
|
}, [isRange, step, clamp]);
|
|
2589
|
-
|
|
3237
|
+
React34.useEffect(() => {
|
|
2590
3238
|
if (!isControlled) {
|
|
2591
3239
|
setInternalValue((prev) => {
|
|
2592
3240
|
const clamped = prev.map((v) => clamp(v));
|
|
@@ -2755,7 +3403,7 @@ var Slider = (props) => {
|
|
|
2755
3403
|
const trackHeight = 32;
|
|
2756
3404
|
const thumbWidth = 18;
|
|
2757
3405
|
const thumbRadius = thumbWidth / 2;
|
|
2758
|
-
const renderTooltipBubble = (key, percent, labelText, isVisible) => /* @__PURE__ */ (0,
|
|
3406
|
+
const renderTooltipBubble = (key, percent, labelText, isVisible) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2759
3407
|
"div",
|
|
2760
3408
|
{
|
|
2761
3409
|
className: cn(
|
|
@@ -2770,12 +3418,12 @@ var Slider = (props) => {
|
|
|
2770
3418
|
marginBottom: isTooltipAbove ? 8 : void 0,
|
|
2771
3419
|
marginTop: isTooltipAbove ? void 0 : 8
|
|
2772
3420
|
},
|
|
2773
|
-
children: /* @__PURE__ */ (0,
|
|
3421
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2774
3422
|
"div",
|
|
2775
3423
|
{
|
|
2776
3424
|
className: cn("relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4) bg-(--background-tooltip)"),
|
|
2777
3425
|
children: [
|
|
2778
|
-
/* @__PURE__ */ (0,
|
|
3426
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2779
3427
|
"p",
|
|
2780
3428
|
{
|
|
2781
3429
|
className: cn(
|
|
@@ -2785,7 +3433,7 @@ var Slider = (props) => {
|
|
|
2785
3433
|
children: labelText
|
|
2786
3434
|
}
|
|
2787
3435
|
),
|
|
2788
|
-
/* @__PURE__ */ (0,
|
|
3436
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2789
3437
|
"div",
|
|
2790
3438
|
{
|
|
2791
3439
|
className: cn(
|
|
@@ -2803,7 +3451,7 @@ var Slider = (props) => {
|
|
|
2803
3451
|
const renderHandle = (index, percent, ariaValueText) => {
|
|
2804
3452
|
const val = index === 0 ? primary : secondary;
|
|
2805
3453
|
const isDragging = draggingThumbIndex === index;
|
|
2806
|
-
return /* @__PURE__ */ (0,
|
|
3454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2807
3455
|
"button",
|
|
2808
3456
|
{
|
|
2809
3457
|
type: "button",
|
|
@@ -2843,14 +3491,14 @@ var Slider = (props) => {
|
|
|
2843
3491
|
index
|
|
2844
3492
|
);
|
|
2845
3493
|
};
|
|
2846
|
-
return /* @__PURE__ */ (0,
|
|
3494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2847
3495
|
"div",
|
|
2848
3496
|
{
|
|
2849
3497
|
className: wrapperBase,
|
|
2850
3498
|
style: { marginInline: `${thumbRadius}px` },
|
|
2851
3499
|
children: [
|
|
2852
|
-
name && /* @__PURE__ */ (0,
|
|
2853
|
-
/* @__PURE__ */ (0,
|
|
3500
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3501
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2854
3502
|
"input",
|
|
2855
3503
|
{
|
|
2856
3504
|
type: "hidden",
|
|
@@ -2859,7 +3507,7 @@ var Slider = (props) => {
|
|
|
2859
3507
|
disabled
|
|
2860
3508
|
}
|
|
2861
3509
|
),
|
|
2862
|
-
isRange && secondary !== void 0 && /* @__PURE__ */ (0,
|
|
3510
|
+
isRange && secondary !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2863
3511
|
"input",
|
|
2864
3512
|
{
|
|
2865
3513
|
type: "hidden",
|
|
@@ -2869,8 +3517,8 @@ var Slider = (props) => {
|
|
|
2869
3517
|
}
|
|
2870
3518
|
)
|
|
2871
3519
|
] }),
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2873
|
-
/* @__PURE__ */ (0,
|
|
3520
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: cn("w-full flex flex-col gap-1", className), children: [
|
|
3521
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "relative w-full", children: [
|
|
2874
3522
|
showTooltip && primary !== void 0 && renderTooltipBubble(
|
|
2875
3523
|
"primary",
|
|
2876
3524
|
primaryPercent,
|
|
@@ -2883,7 +3531,7 @@ var Slider = (props) => {
|
|
|
2883
3531
|
formatDisplayValue(secondary),
|
|
2884
3532
|
hoveredThumbIndex === 1 || draggingThumbIndex === 1
|
|
2885
3533
|
),
|
|
2886
|
-
/* @__PURE__ */ (0,
|
|
3534
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2887
3535
|
"div",
|
|
2888
3536
|
{
|
|
2889
3537
|
className: cn(
|
|
@@ -2894,7 +3542,7 @@ var Slider = (props) => {
|
|
|
2894
3542
|
ref: trackRef,
|
|
2895
3543
|
onPointerDown: handleTrackPointerDown,
|
|
2896
3544
|
children: [
|
|
2897
|
-
/* @__PURE__ */ (0,
|
|
3545
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2898
3546
|
"div",
|
|
2899
3547
|
{
|
|
2900
3548
|
className: cn(
|
|
@@ -2913,7 +3561,7 @@ var Slider = (props) => {
|
|
|
2913
3561
|
}
|
|
2914
3562
|
)
|
|
2915
3563
|
] }),
|
|
2916
|
-
showNumeric && /* @__PURE__ */ (0,
|
|
3564
|
+
showNumeric && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2917
3565
|
"p",
|
|
2918
3566
|
{
|
|
2919
3567
|
className: cn(
|
|
@@ -2931,9 +3579,9 @@ var Slider = (props) => {
|
|
|
2931
3579
|
Slider.displayName = "Slider";
|
|
2932
3580
|
|
|
2933
3581
|
// src/components/Inputs/TextArea.tsx
|
|
2934
|
-
var
|
|
2935
|
-
var
|
|
2936
|
-
var
|
|
3582
|
+
var React35 = __toESM(require("react"), 1);
|
|
3583
|
+
var import_icons13 = require("@bubo-squared/icons");
|
|
3584
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2937
3585
|
var TextArea = (props) => {
|
|
2938
3586
|
const {
|
|
2939
3587
|
label,
|
|
@@ -2953,7 +3601,7 @@ var TextArea = (props) => {
|
|
|
2953
3601
|
...textareaProps
|
|
2954
3602
|
} = props;
|
|
2955
3603
|
const isControlled = value !== void 0;
|
|
2956
|
-
const [internalValue, setInternalValue] =
|
|
3604
|
+
const [internalValue, setInternalValue] = React35.useState(
|
|
2957
3605
|
defaultValue ?? ""
|
|
2958
3606
|
);
|
|
2959
3607
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
@@ -2961,10 +3609,10 @@ var TextArea = (props) => {
|
|
|
2961
3609
|
const currentLength = currentValue.length;
|
|
2962
3610
|
const effectiveMaxLength = type === "character-limit" ? maxLength ?? 144 : void 0;
|
|
2963
3611
|
const showCharacterLimit = type === "character-limit" && typeof effectiveMaxLength === "number";
|
|
2964
|
-
const textareaRef =
|
|
2965
|
-
const containerRef =
|
|
2966
|
-
const [height, setHeight] =
|
|
2967
|
-
const [width, setWidth] =
|
|
3612
|
+
const textareaRef = React35.useRef(null);
|
|
3613
|
+
const containerRef = React35.useRef(null);
|
|
3614
|
+
const [height, setHeight] = React35.useState(void 0);
|
|
3615
|
+
const [width, setWidth] = React35.useState(void 0);
|
|
2968
3616
|
const minHeight = 80;
|
|
2969
3617
|
const minWidth = 240;
|
|
2970
3618
|
const handleContainerClick = () => {
|
|
@@ -2977,7 +3625,7 @@ var TextArea = (props) => {
|
|
|
2977
3625
|
}
|
|
2978
3626
|
onChange?.(event);
|
|
2979
3627
|
};
|
|
2980
|
-
const generatedId =
|
|
3628
|
+
const generatedId = React35.useId();
|
|
2981
3629
|
const textareaId = id ?? generatedId;
|
|
2982
3630
|
const statusBorderClass = {
|
|
2983
3631
|
default: "",
|
|
@@ -3014,7 +3662,7 @@ var TextArea = (props) => {
|
|
|
3014
3662
|
window.addEventListener("pointermove", handlePointerMove);
|
|
3015
3663
|
window.addEventListener("pointerup", handlePointerUp);
|
|
3016
3664
|
};
|
|
3017
|
-
return /* @__PURE__ */ (0,
|
|
3665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3018
3666
|
Field,
|
|
3019
3667
|
{
|
|
3020
3668
|
className: "w-full",
|
|
@@ -3023,7 +3671,7 @@ var TextArea = (props) => {
|
|
|
3023
3671
|
hideHint,
|
|
3024
3672
|
status,
|
|
3025
3673
|
disabled,
|
|
3026
|
-
children: /* @__PURE__ */ (0,
|
|
3674
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3027
3675
|
"div",
|
|
3028
3676
|
{
|
|
3029
3677
|
className: cn(
|
|
@@ -3042,7 +3690,7 @@ var TextArea = (props) => {
|
|
|
3042
3690
|
onClick: handleContainerClick,
|
|
3043
3691
|
"aria-disabled": disabled || void 0,
|
|
3044
3692
|
children: [
|
|
3045
|
-
/* @__PURE__ */ (0,
|
|
3693
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3046
3694
|
"textarea",
|
|
3047
3695
|
{
|
|
3048
3696
|
id: textareaId,
|
|
@@ -3062,7 +3710,7 @@ var TextArea = (props) => {
|
|
|
3062
3710
|
...textareaProps
|
|
3063
3711
|
}
|
|
3064
3712
|
),
|
|
3065
|
-
showCharacterLimit && /* @__PURE__ */ (0,
|
|
3713
|
+
showCharacterLimit && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3066
3714
|
"span",
|
|
3067
3715
|
{
|
|
3068
3716
|
className: cn(
|
|
@@ -3076,19 +3724,19 @@ var TextArea = (props) => {
|
|
|
3076
3724
|
]
|
|
3077
3725
|
}
|
|
3078
3726
|
),
|
|
3079
|
-
type === "responsive" && /* @__PURE__ */ (0,
|
|
3727
|
+
type === "responsive" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3080
3728
|
"div",
|
|
3081
3729
|
{
|
|
3082
3730
|
className: "absolute bottom-1 right-1 h-3 w-3 " + (disabled ? "cursor-auto" : "cursor-nwse-resize"),
|
|
3083
3731
|
onPointerDown: disabled ? void 0 : handleResizePointerDown,
|
|
3084
|
-
children: /* @__PURE__ */ (0,
|
|
3732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3085
3733
|
"span",
|
|
3086
3734
|
{
|
|
3087
3735
|
className: cn(
|
|
3088
3736
|
"absolute bottom-0 right-0 flex h-4 w-4 items-center justify-center text-(--icon-primary)",
|
|
3089
3737
|
disabled && "text-(--icon-primary-disabled)"
|
|
3090
3738
|
),
|
|
3091
|
-
children: /* @__PURE__ */ (0,
|
|
3739
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons13.MaximizeIcon, {})
|
|
3092
3740
|
}
|
|
3093
3741
|
)
|
|
3094
3742
|
}
|
|
@@ -3102,10 +3750,10 @@ var TextArea = (props) => {
|
|
|
3102
3750
|
TextArea.displayName = "TextArea";
|
|
3103
3751
|
|
|
3104
3752
|
// src/components/Inputs/TextInput.tsx
|
|
3105
|
-
var
|
|
3106
|
-
var
|
|
3107
|
-
var
|
|
3108
|
-
var
|
|
3753
|
+
var React36 = __toESM(require("react"), 1);
|
|
3754
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
3755
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3756
|
+
var inputTextVariants3 = (0, import_class_variance_authority20.cva)("truncate", {
|
|
3109
3757
|
variants: {
|
|
3110
3758
|
size: {
|
|
3111
3759
|
sm: "paragraph-md",
|
|
@@ -3118,7 +3766,7 @@ var inputTextVariants2 = (0, import_class_variance_authority18.cva)("truncate",
|
|
|
3118
3766
|
size: "lg"
|
|
3119
3767
|
}
|
|
3120
3768
|
});
|
|
3121
|
-
var
|
|
3769
|
+
var iconWrapperVariants4 = (0, import_class_variance_authority20.cva)(
|
|
3122
3770
|
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
3123
3771
|
{
|
|
3124
3772
|
variants: {
|
|
@@ -3155,11 +3803,11 @@ var TextInput = (props) => {
|
|
|
3155
3803
|
...inputProps
|
|
3156
3804
|
} = props;
|
|
3157
3805
|
const isControlled = value !== void 0;
|
|
3158
|
-
const [internalValue, setInternalValue] =
|
|
3806
|
+
const [internalValue, setInternalValue] = React36.useState(
|
|
3159
3807
|
defaultValue ?? ""
|
|
3160
3808
|
);
|
|
3161
3809
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
3162
|
-
const inputRef =
|
|
3810
|
+
const inputRef = React36.useRef(null);
|
|
3163
3811
|
const handleContainerClick = () => {
|
|
3164
3812
|
if (disabled) return;
|
|
3165
3813
|
inputRef.current?.focus();
|
|
@@ -3172,7 +3820,7 @@ var TextInput = (props) => {
|
|
|
3172
3820
|
};
|
|
3173
3821
|
const showLeadingIcon = !!leadingIcon;
|
|
3174
3822
|
const showTrailingIcon = !!trailingIcon;
|
|
3175
|
-
return /* @__PURE__ */ (0,
|
|
3823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3176
3824
|
Field,
|
|
3177
3825
|
{
|
|
3178
3826
|
label,
|
|
@@ -3180,7 +3828,7 @@ var TextInput = (props) => {
|
|
|
3180
3828
|
hideHint,
|
|
3181
3829
|
status,
|
|
3182
3830
|
disabled,
|
|
3183
|
-
children: /* @__PURE__ */ (0,
|
|
3831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3184
3832
|
InputShell,
|
|
3185
3833
|
{
|
|
3186
3834
|
size,
|
|
@@ -3189,16 +3837,16 @@ var TextInput = (props) => {
|
|
|
3189
3837
|
className,
|
|
3190
3838
|
onClick: handleContainerClick,
|
|
3191
3839
|
children: [
|
|
3192
|
-
showLeadingIcon && /* @__PURE__ */ (0,
|
|
3840
|
+
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3193
3841
|
"span",
|
|
3194
3842
|
{
|
|
3195
3843
|
className: cn(
|
|
3196
|
-
|
|
3844
|
+
iconWrapperVariants4({ size, disabled })
|
|
3197
3845
|
),
|
|
3198
3846
|
children: leadingIcon
|
|
3199
3847
|
}
|
|
3200
3848
|
),
|
|
3201
|
-
/* @__PURE__ */ (0,
|
|
3849
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3202
3850
|
Input,
|
|
3203
3851
|
{
|
|
3204
3852
|
ref: inputRef,
|
|
@@ -3210,17 +3858,17 @@ var TextInput = (props) => {
|
|
|
3210
3858
|
onChange: handleChange,
|
|
3211
3859
|
variant: "bare",
|
|
3212
3860
|
className: cn(
|
|
3213
|
-
|
|
3861
|
+
inputTextVariants3({ size }),
|
|
3214
3862
|
"bg-transparent outline-none w-full"
|
|
3215
3863
|
),
|
|
3216
3864
|
...inputProps
|
|
3217
3865
|
}
|
|
3218
3866
|
),
|
|
3219
|
-
showTrailingIcon && /* @__PURE__ */ (0,
|
|
3867
|
+
showTrailingIcon && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3220
3868
|
"span",
|
|
3221
3869
|
{
|
|
3222
3870
|
className: cn(
|
|
3223
|
-
|
|
3871
|
+
iconWrapperVariants4({ size, disabled: !!disabled })
|
|
3224
3872
|
),
|
|
3225
3873
|
children: trailingIcon
|
|
3226
3874
|
}
|
|
@@ -3234,11 +3882,11 @@ var TextInput = (props) => {
|
|
|
3234
3882
|
TextInput.displayName = "TextInput";
|
|
3235
3883
|
|
|
3236
3884
|
// src/components/Inputs/Toggle.tsx
|
|
3237
|
-
var
|
|
3238
|
-
var
|
|
3885
|
+
var React37 = require("react");
|
|
3886
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3239
3887
|
var Toggle = (props) => {
|
|
3240
3888
|
const { label, className, disabled, ...inputProps } = props;
|
|
3241
|
-
return /* @__PURE__ */ (0,
|
|
3889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3242
3890
|
"label",
|
|
3243
3891
|
{
|
|
3244
3892
|
className: cn(
|
|
@@ -3246,8 +3894,8 @@ var Toggle = (props) => {
|
|
|
3246
3894
|
disabled ? "cursor-default" : "cursor-pointer"
|
|
3247
3895
|
),
|
|
3248
3896
|
children: [
|
|
3249
|
-
/* @__PURE__ */ (0,
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "relative inline-flex items-center", children: [
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3251
3899
|
"input",
|
|
3252
3900
|
{
|
|
3253
3901
|
type: "checkbox",
|
|
@@ -3256,7 +3904,7 @@ var Toggle = (props) => {
|
|
|
3256
3904
|
...inputProps
|
|
3257
3905
|
}
|
|
3258
3906
|
),
|
|
3259
|
-
/* @__PURE__ */ (0,
|
|
3907
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3260
3908
|
"span",
|
|
3261
3909
|
{
|
|
3262
3910
|
className: cn(
|
|
@@ -3296,7 +3944,7 @@ var Toggle = (props) => {
|
|
|
3296
3944
|
"peer-disabled:[&>.knob]:peer-checked:bg-(--background-primary-hover)",
|
|
3297
3945
|
className
|
|
3298
3946
|
),
|
|
3299
|
-
children: /* @__PURE__ */ (0,
|
|
3947
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3300
3948
|
"span",
|
|
3301
3949
|
{
|
|
3302
3950
|
className: cn(
|
|
@@ -3308,7 +3956,7 @@ var Toggle = (props) => {
|
|
|
3308
3956
|
}
|
|
3309
3957
|
)
|
|
3310
3958
|
] }),
|
|
3311
|
-
label && /* @__PURE__ */ (0,
|
|
3959
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3312
3960
|
"span",
|
|
3313
3961
|
{
|
|
3314
3962
|
className: cn(
|
|
@@ -3325,8 +3973,8 @@ var Toggle = (props) => {
|
|
|
3325
3973
|
Toggle.displayName = "Toggle";
|
|
3326
3974
|
|
|
3327
3975
|
// src/components/Inputs/WebsiteInput.tsx
|
|
3328
|
-
var
|
|
3329
|
-
var
|
|
3976
|
+
var React38 = require("react");
|
|
3977
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3330
3978
|
var WebsiteInput = (props) => {
|
|
3331
3979
|
const {
|
|
3332
3980
|
hierarchy = "leading",
|
|
@@ -3363,15 +4011,15 @@ var WebsiteInput = (props) => {
|
|
|
3363
4011
|
size === "xl" ? "[&>svg]:w-6 [&>svg]:h-6" : size === "sm" ? "[&>svg]:w-4 [&>svg]:h-4" : "[&>svg]:w-5 [&>svg]:h-5",
|
|
3364
4012
|
disabled ? "text-(--icon-primary-disabled)" : "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-within:text-(--icon-primary-focus)"
|
|
3365
4013
|
);
|
|
3366
|
-
const leadingAddon = /* @__PURE__ */ (0,
|
|
3367
|
-
/* @__PURE__ */ (0,
|
|
3368
|
-
icon != null && /* @__PURE__ */ (0,
|
|
4014
|
+
const leadingAddon = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: baseAddonClass, children: [
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: addonTextClass, children: protocolLabel }),
|
|
4016
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: iconWrapperClass, children: icon })
|
|
3369
4017
|
] });
|
|
3370
|
-
const trailingAddon = /* @__PURE__ */ (0,
|
|
3371
|
-
icon != null && /* @__PURE__ */ (0,
|
|
3372
|
-
/* @__PURE__ */ (0,
|
|
4018
|
+
const trailingAddon = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: baseAddonClass, children: [
|
|
4019
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: iconWrapperClass, children: icon }),
|
|
4020
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: addonTextClass, children: protocolLabel })
|
|
3373
4021
|
] });
|
|
3374
|
-
return /* @__PURE__ */ (0,
|
|
4022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3375
4023
|
TextInput,
|
|
3376
4024
|
{
|
|
3377
4025
|
...rest,
|
|
@@ -3386,9 +4034,9 @@ var WebsiteInput = (props) => {
|
|
|
3386
4034
|
WebsiteInput.displayName = "WebsiteInput";
|
|
3387
4035
|
|
|
3388
4036
|
// src/components/Feedback/Popover.tsx
|
|
3389
|
-
var
|
|
4037
|
+
var React39 = __toESM(require("react"), 1);
|
|
3390
4038
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
3391
|
-
var
|
|
4039
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3392
4040
|
var PopoverArrow = PopoverPrimitive2.Arrow;
|
|
3393
4041
|
var Popover2 = (props) => {
|
|
3394
4042
|
const {
|
|
@@ -3405,7 +4053,7 @@ var Popover2 = (props) => {
|
|
|
3405
4053
|
offset = 10,
|
|
3406
4054
|
children
|
|
3407
4055
|
} = props;
|
|
3408
|
-
const [open, setOpen] =
|
|
4056
|
+
const [open, setOpen] = React39.useState(false);
|
|
3409
4057
|
const handleCancel = () => {
|
|
3410
4058
|
onCancel?.();
|
|
3411
4059
|
setOpen(false);
|
|
@@ -3447,9 +4095,9 @@ var Popover2 = (props) => {
|
|
|
3447
4095
|
}
|
|
3448
4096
|
};
|
|
3449
4097
|
const { side, align } = mapPlacementToSideAndAlign2(placement);
|
|
3450
|
-
return /* @__PURE__ */ (0,
|
|
3451
|
-
/* @__PURE__ */ (0,
|
|
3452
|
-
/* @__PURE__ */ (0,
|
|
4098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
4099
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverTrigger, { asChild: true, children }),
|
|
4100
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3453
4101
|
PopoverContent,
|
|
3454
4102
|
{
|
|
3455
4103
|
side,
|
|
@@ -3457,16 +4105,16 @@ var Popover2 = (props) => {
|
|
|
3457
4105
|
sideOffset: offset,
|
|
3458
4106
|
className: cn(popoverClasses, className),
|
|
3459
4107
|
children: [
|
|
3460
|
-
showArrow && /* @__PURE__ */ (0,
|
|
3461
|
-
/* @__PURE__ */ (0,
|
|
3462
|
-
/* @__PURE__ */ (0,
|
|
3463
|
-
/* @__PURE__ */ (0,
|
|
3464
|
-
/* @__PURE__ */ (0,
|
|
3465
|
-
/* @__PURE__ */ (0,
|
|
4108
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverArrow, { className: popoverArrowClasses }),
|
|
4109
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "grid gap-4", children: [
|
|
4110
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "space-y-2", children: [
|
|
4111
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "caption text-secondary", children: strapline }),
|
|
4112
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
4113
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "paragraph-sm text-primary", children: description })
|
|
3466
4114
|
] }),
|
|
3467
|
-
/* @__PURE__ */ (0,
|
|
3468
|
-
/* @__PURE__ */ (0,
|
|
3469
|
-
/* @__PURE__ */ (0,
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-start items-center gap-4 flex-wrap", children: [
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),
|
|
4117
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Button, { size: "sm", variant: "primary", onClick: handleOk, children: okText || "Ok" })
|
|
3470
4118
|
] })
|
|
3471
4119
|
] })
|
|
3472
4120
|
]
|
|
@@ -3477,9 +4125,9 @@ var Popover2 = (props) => {
|
|
|
3477
4125
|
Popover2.displayName = "Popover";
|
|
3478
4126
|
|
|
3479
4127
|
// src/components/Feedback/Tooltip.tsx
|
|
3480
|
-
var
|
|
4128
|
+
var React40 = require("react");
|
|
3481
4129
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3482
|
-
var
|
|
4130
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3483
4131
|
var TooltipArrow = TooltipPrimitive.Arrow;
|
|
3484
4132
|
var mapPlacementToSideAndAlign = (placement) => {
|
|
3485
4133
|
switch (placement) {
|
|
@@ -3529,7 +4177,7 @@ var Tooltip = (props) => {
|
|
|
3529
4177
|
const { side, align } = mapPlacementToSideAndAlign(placement);
|
|
3530
4178
|
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";
|
|
3531
4179
|
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)]";
|
|
3532
|
-
return /* @__PURE__ */ (0,
|
|
4180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3533
4181
|
TooltipPrimitive.Root,
|
|
3534
4182
|
{
|
|
3535
4183
|
open,
|
|
@@ -3537,8 +4185,8 @@ var Tooltip = (props) => {
|
|
|
3537
4185
|
onOpenChange,
|
|
3538
4186
|
disableHoverableContent,
|
|
3539
4187
|
children: [
|
|
3540
|
-
/* @__PURE__ */ (0,
|
|
3541
|
-
/* @__PURE__ */ (0,
|
|
4188
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
4189
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3542
4190
|
TooltipPrimitive.Content,
|
|
3543
4191
|
{
|
|
3544
4192
|
side,
|
|
@@ -3546,11 +4194,11 @@ var Tooltip = (props) => {
|
|
|
3546
4194
|
sideOffset: offset,
|
|
3547
4195
|
className: cn(tooltipClasses, className),
|
|
3548
4196
|
children: [
|
|
3549
|
-
showArrow && /* @__PURE__ */ (0,
|
|
3550
|
-
/* @__PURE__ */ (0,
|
|
3551
|
-
(strapline ?? "") !== "" && /* @__PURE__ */ (0,
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3553
|
-
(description ?? "") !== "" && /* @__PURE__ */ (0,
|
|
4197
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipArrow, { className: tooltipArrowClasses }),
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "grid gap-2", children: [
|
|
4199
|
+
(strapline ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "caption text-secondary", children: strapline }),
|
|
4200
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
4201
|
+
(description ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "paragraph-sm text-primary", children: description })
|
|
3554
4202
|
] })
|
|
3555
4203
|
]
|
|
3556
4204
|
}
|
|
@@ -3562,9 +4210,9 @@ var Tooltip = (props) => {
|
|
|
3562
4210
|
Tooltip.displayName = "Tooltip";
|
|
3563
4211
|
|
|
3564
4212
|
// src/components/Feedback/TooltipProvider.tsx
|
|
3565
|
-
var
|
|
4213
|
+
var React41 = require("react");
|
|
3566
4214
|
var TooltipPrimitive2 = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3567
|
-
var
|
|
4215
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3568
4216
|
var TooltipProvider = (props) => {
|
|
3569
4217
|
const {
|
|
3570
4218
|
children,
|
|
@@ -3572,7 +4220,7 @@ var TooltipProvider = (props) => {
|
|
|
3572
4220
|
skipDelayDuration = 300,
|
|
3573
4221
|
disableHoverableContent = false
|
|
3574
4222
|
} = props;
|
|
3575
|
-
return /* @__PURE__ */ (0,
|
|
4223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3576
4224
|
TooltipPrimitive2.Provider,
|
|
3577
4225
|
{
|
|
3578
4226
|
delayDuration,
|
|
@@ -3585,19 +4233,19 @@ var TooltipProvider = (props) => {
|
|
|
3585
4233
|
TooltipProvider.displayName = "TooltipProvider";
|
|
3586
4234
|
|
|
3587
4235
|
// src/components/Navigation/Breadcrumbs.tsx
|
|
3588
|
-
var
|
|
4236
|
+
var React43 = __toESM(require("react"), 1);
|
|
3589
4237
|
|
|
3590
4238
|
// src/components/ui/breadcrumb.tsx
|
|
3591
|
-
var
|
|
4239
|
+
var React42 = require("react");
|
|
3592
4240
|
var import_react_slot8 = require("@radix-ui/react-slot");
|
|
3593
|
-
var
|
|
4241
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3594
4242
|
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";
|
|
3595
4243
|
var disabledItemClasses = "text-primary-disabled cursor-default pointer-events-none";
|
|
3596
4244
|
function Breadcrumb({ ...props }) {
|
|
3597
|
-
return /* @__PURE__ */ (0,
|
|
4245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
3598
4246
|
}
|
|
3599
4247
|
function BreadcrumbList({ className, ...props }) {
|
|
3600
|
-
return /* @__PURE__ */ (0,
|
|
4248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3601
4249
|
"ol",
|
|
3602
4250
|
{
|
|
3603
4251
|
"data-slot": "breadcrumb-list",
|
|
@@ -3610,7 +4258,7 @@ function BreadcrumbList({ className, ...props }) {
|
|
|
3610
4258
|
);
|
|
3611
4259
|
}
|
|
3612
4260
|
function BreadcrumbItem({ className, disabled, ...props }) {
|
|
3613
|
-
return /* @__PURE__ */ (0,
|
|
4261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3614
4262
|
"li",
|
|
3615
4263
|
{
|
|
3616
4264
|
"data-slot": "breadcrumb-item",
|
|
@@ -3621,7 +4269,7 @@ function BreadcrumbItem({ className, disabled, ...props }) {
|
|
|
3621
4269
|
);
|
|
3622
4270
|
}
|
|
3623
4271
|
function BreadcrumbPage({ className, ...props }) {
|
|
3624
|
-
return /* @__PURE__ */ (0,
|
|
4272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3625
4273
|
"span",
|
|
3626
4274
|
{
|
|
3627
4275
|
"data-slot": "breadcrumb-page",
|
|
@@ -3638,7 +4286,7 @@ function BreadcrumbSeparator({
|
|
|
3638
4286
|
className,
|
|
3639
4287
|
...props
|
|
3640
4288
|
}) {
|
|
3641
|
-
return /* @__PURE__ */ (0,
|
|
4289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3642
4290
|
"li",
|
|
3643
4291
|
{
|
|
3644
4292
|
"data-slot": "breadcrumb-separator",
|
|
@@ -3646,7 +4294,7 @@ function BreadcrumbSeparator({
|
|
|
3646
4294
|
"aria-hidden": "true",
|
|
3647
4295
|
className: cn("[&>svg]:size-6 [&>svg]:text-(--color-secondary)", className),
|
|
3648
4296
|
...props,
|
|
3649
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
4297
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ChevronRight, {})
|
|
3650
4298
|
}
|
|
3651
4299
|
);
|
|
3652
4300
|
}
|
|
@@ -3654,7 +4302,7 @@ function BreadcrumbEllipsis({
|
|
|
3654
4302
|
className,
|
|
3655
4303
|
...props
|
|
3656
4304
|
}) {
|
|
3657
|
-
return /* @__PURE__ */ (0,
|
|
4305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3658
4306
|
"span",
|
|
3659
4307
|
{
|
|
3660
4308
|
"data-slot": "breadcrumb-ellipsis",
|
|
@@ -3663,112 +4311,48 @@ function BreadcrumbEllipsis({
|
|
|
3663
4311
|
className: cn("flex size-9 items-center justify-center", className),
|
|
3664
4312
|
...props,
|
|
3665
4313
|
children: [
|
|
3666
|
-
/* @__PURE__ */ (0,
|
|
3667
|
-
/* @__PURE__ */ (0,
|
|
4314
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Ellipsis, { className: "size-4" }),
|
|
4315
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "sr-only", children: "More" })
|
|
3668
4316
|
]
|
|
3669
4317
|
}
|
|
3670
4318
|
);
|
|
3671
4319
|
}
|
|
3672
4320
|
|
|
3673
|
-
// src/components/ui/dropdown-menu.tsx
|
|
3674
|
-
var React39 = require("react");
|
|
3675
|
-
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
3676
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3677
|
-
function DropdownMenu({
|
|
3678
|
-
...props
|
|
3679
|
-
}) {
|
|
3680
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
3681
|
-
}
|
|
3682
|
-
function DropdownMenuTrigger({
|
|
3683
|
-
...props
|
|
3684
|
-
}) {
|
|
3685
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3686
|
-
DropdownMenuPrimitive.Trigger,
|
|
3687
|
-
{
|
|
3688
|
-
"data-slot": "dropdown-menu-trigger",
|
|
3689
|
-
...props
|
|
3690
|
-
}
|
|
3691
|
-
);
|
|
3692
|
-
}
|
|
3693
|
-
function DropdownMenuContent({
|
|
3694
|
-
className,
|
|
3695
|
-
sideOffset = 4,
|
|
3696
|
-
...props
|
|
3697
|
-
}) {
|
|
3698
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3699
|
-
DropdownMenuPrimitive.Content,
|
|
3700
|
-
{
|
|
3701
|
-
"data-slot": "dropdown-menu-content",
|
|
3702
|
-
sideOffset,
|
|
3703
|
-
className: cn(
|
|
3704
|
-
"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",
|
|
3705
|
-
className
|
|
3706
|
-
),
|
|
3707
|
-
...props
|
|
3708
|
-
}
|
|
3709
|
-
) });
|
|
3710
|
-
}
|
|
3711
|
-
function DropdownMenuGroup({
|
|
3712
|
-
...props
|
|
3713
|
-
}) {
|
|
3714
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
3715
|
-
}
|
|
3716
|
-
function DropdownMenuItem({
|
|
3717
|
-
className,
|
|
3718
|
-
inset,
|
|
3719
|
-
variant = "default",
|
|
3720
|
-
...props
|
|
3721
|
-
}) {
|
|
3722
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3723
|
-
DropdownMenuPrimitive.Item,
|
|
3724
|
-
{
|
|
3725
|
-
"data-slot": "dropdown-menu-item",
|
|
3726
|
-
"data-inset": inset,
|
|
3727
|
-
"data-variant": variant,
|
|
3728
|
-
className: cn(
|
|
3729
|
-
"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",
|
|
3730
|
-
className
|
|
3731
|
-
),
|
|
3732
|
-
...props
|
|
3733
|
-
}
|
|
3734
|
-
);
|
|
3735
|
-
}
|
|
3736
|
-
|
|
3737
4321
|
// src/components/Navigation/Breadcrumbs.tsx
|
|
3738
|
-
var
|
|
4322
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3739
4323
|
var breadcrumbSeparatorVariants = "size-5 relative bottom-1 [&>svg]:text-secondary group-disabled:text-secondary";
|
|
3740
4324
|
var breadcrumbItemBase = "h6-title text-secondary hover:text-primary-hover";
|
|
3741
|
-
var Breadcrumbs =
|
|
4325
|
+
var Breadcrumbs = React43.forwardRef(
|
|
3742
4326
|
(props, ref) => {
|
|
3743
4327
|
const { separator, ellipsis, children, className, ...rest } = props;
|
|
3744
|
-
const items =
|
|
4328
|
+
const items = React43.Children.toArray(children).filter(Boolean);
|
|
3745
4329
|
const shouldCollapse = Boolean(ellipsis) && items.length >= 5;
|
|
3746
4330
|
const hiddenItems = shouldCollapse ? items.slice(1, -2) : [];
|
|
3747
4331
|
const displayItems = shouldCollapse ? [items[0], "__ELLIPSIS__", items[items.length - 2], items[items.length - 1]] : items;
|
|
3748
|
-
return /* @__PURE__ */ (0,
|
|
4332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Breadcrumb, { ref, className, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbList, { children: displayItems.map((child, index) => {
|
|
3749
4333
|
const isEllipsis = child === "__ELLIPSIS__";
|
|
3750
|
-
const key = isEllipsis ? "__ellipsis" :
|
|
4334
|
+
const key = isEllipsis ? "__ellipsis" : React43.isValidElement(child) && child.key != null ? String(child.key) : String(index);
|
|
3751
4335
|
const isLast = index === displayItems.length - 1;
|
|
3752
|
-
return /* @__PURE__ */ (0,
|
|
3753
|
-
isEllipsis ? /* @__PURE__ */ (0,
|
|
3754
|
-
/* @__PURE__ */ (0,
|
|
4336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(React43.Fragment, { children: [
|
|
4337
|
+
isEllipsis ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenu, { children: [
|
|
4338
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3755
4339
|
"button",
|
|
3756
4340
|
{
|
|
3757
4341
|
type: "button",
|
|
3758
4342
|
className: "inline-flex size-8 items-center justify-center rounded-4 hover:bg-(--background-secondary) focus-ring-primary text-secondary",
|
|
3759
4343
|
"aria-label": "Open breadcrumb menu",
|
|
3760
|
-
children: /* @__PURE__ */ (0,
|
|
4344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbEllipsis, {})
|
|
3761
4345
|
}
|
|
3762
4346
|
) }),
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
4347
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3764
4348
|
DropdownMenuContent,
|
|
3765
4349
|
{
|
|
3766
4350
|
align: "start",
|
|
3767
4351
|
className: "bg-(--background-neutral) border-(--border-secondary-hover) shadow-card-md rounded-4",
|
|
3768
|
-
children: /* @__PURE__ */ (0,
|
|
3769
|
-
const hiddenKey =
|
|
3770
|
-
if (
|
|
3771
|
-
return /* @__PURE__ */ (0,
|
|
4352
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuGroup, { children: hiddenItems.map((hidden, hiddenIndex) => {
|
|
4353
|
+
const hiddenKey = React43.isValidElement(hidden) && hidden.key != null ? String(hidden.key) : `hidden-${hiddenIndex}`;
|
|
4354
|
+
if (React43.isValidElement(hidden)) {
|
|
4355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3772
4356
|
DropdownMenuItem,
|
|
3773
4357
|
{
|
|
3774
4358
|
asChild: true,
|
|
@@ -3778,7 +4362,7 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3778
4362
|
hiddenKey
|
|
3779
4363
|
);
|
|
3780
4364
|
}
|
|
3781
|
-
return /* @__PURE__ */ (0,
|
|
4365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3782
4366
|
DropdownMenuItem,
|
|
3783
4367
|
{
|
|
3784
4368
|
className: "cursor-pointer paragraph-md text-primary focus:bg-(--background-secondary)",
|
|
@@ -3789,14 +4373,14 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3789
4373
|
}) })
|
|
3790
4374
|
}
|
|
3791
4375
|
)
|
|
3792
|
-
] }) }) : isLast ? /* @__PURE__ */ (0,
|
|
4376
|
+
] }) }) : isLast ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3793
4377
|
BreadcrumbPage,
|
|
3794
4378
|
{
|
|
3795
4379
|
className: cn("h6-title-medium cursor-pointer", props.breadcrumbPageClassName),
|
|
3796
4380
|
children: child
|
|
3797
4381
|
}
|
|
3798
|
-
) }) : /* @__PURE__ */ (0,
|
|
3799
|
-
!isLast && /* @__PURE__ */ (0,
|
|
4382
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: child }),
|
|
4383
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbSeparator, { className: cn(breadcrumbSeparatorVariants, props.separatorClassName), children: separator })
|
|
3800
4384
|
] }, key);
|
|
3801
4385
|
}) }) });
|
|
3802
4386
|
}
|
|
@@ -3804,16 +4388,16 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3804
4388
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
3805
4389
|
|
|
3806
4390
|
// src/components/Logo/LogoIcon.tsx
|
|
3807
|
-
var
|
|
3808
|
-
var
|
|
3809
|
-
var LogoIconSvg = (props) => /* @__PURE__ */ (0,
|
|
3810
|
-
/* @__PURE__ */ (0,
|
|
3811
|
-
/* @__PURE__ */ (0,
|
|
3812
|
-
/* @__PURE__ */ (0,
|
|
3813
|
-
/* @__PURE__ */ (0,
|
|
3814
|
-
/* @__PURE__ */ (0,
|
|
4391
|
+
var import_class_variance_authority21 = require("class-variance-authority");
|
|
4392
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4393
|
+
var LogoIconSvg = (props) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
4394
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("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" }),
|
|
4395
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("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" }),
|
|
4396
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("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" }),
|
|
4397
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("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" }),
|
|
4398
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("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" })
|
|
3815
4399
|
] });
|
|
3816
|
-
var logoIconVariants = (0,
|
|
4400
|
+
var logoIconVariants = (0, import_class_variance_authority21.cva)(
|
|
3817
4401
|
"relative bg-linear-to-t from-gray-800 to-gray-950 overflow-hidden flex justify-center items-center",
|
|
3818
4402
|
{
|
|
3819
4403
|
variants: {
|
|
@@ -3838,28 +4422,28 @@ var logoIconSizeClass = {
|
|
|
3838
4422
|
xl: "size-96"
|
|
3839
4423
|
};
|
|
3840
4424
|
var LogoIcon = ({ className, size = "md" }) => {
|
|
3841
|
-
return /* @__PURE__ */ (0,
|
|
4425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: cn(logoIconVariants({ size }), className), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LogoIconSvg, { className: logoIconSizeClass[size] }) });
|
|
3842
4426
|
};
|
|
3843
4427
|
|
|
3844
4428
|
// src/components/Logo/Logo.tsx
|
|
3845
|
-
var
|
|
3846
|
-
var
|
|
3847
|
-
var LogoIconSvg2 = (props) => /* @__PURE__ */ (0,
|
|
3848
|
-
/* @__PURE__ */ (0,
|
|
3849
|
-
/* @__PURE__ */ (0,
|
|
3850
|
-
/* @__PURE__ */ (0,
|
|
3851
|
-
/* @__PURE__ */ (0,
|
|
3852
|
-
/* @__PURE__ */ (0,
|
|
4429
|
+
var import_class_variance_authority22 = require("class-variance-authority");
|
|
4430
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4431
|
+
var LogoIconSvg2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
4432
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4433
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4434
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4435
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4436
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" })
|
|
3853
4437
|
] });
|
|
3854
|
-
var LogoTextSvg = (props) => /* @__PURE__ */ (0,
|
|
3855
|
-
/* @__PURE__ */ (0,
|
|
3856
|
-
/* @__PURE__ */ (0,
|
|
3857
|
-
/* @__PURE__ */ (0,
|
|
3858
|
-
/* @__PURE__ */ (0,
|
|
3859
|
-
/* @__PURE__ */ (0,
|
|
3860
|
-
/* @__PURE__ */ (0,
|
|
4438
|
+
var LogoTextSvg = (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("svg", { width: "111", height: "32", viewBox: "0 0 111 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
4439
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4440
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4441
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4442
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4443
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" }),
|
|
4444
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("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" })
|
|
3861
4445
|
] });
|
|
3862
|
-
var logoWrapperVariants = (0,
|
|
4446
|
+
var logoWrapperVariants = (0, import_class_variance_authority22.cva)("inline-flex", {
|
|
3863
4447
|
variants: {
|
|
3864
4448
|
variant: {
|
|
3865
4449
|
inline: ["w-44", "h-12", "justify-start", "items-center", "gap-4"],
|
|
@@ -3871,7 +4455,7 @@ var logoWrapperVariants = (0, import_class_variance_authority20.cva)("inline-fle
|
|
|
3871
4455
|
variant: "inline"
|
|
3872
4456
|
}
|
|
3873
4457
|
});
|
|
3874
|
-
var logoIconSizeVariants = (0,
|
|
4458
|
+
var logoIconSizeVariants = (0, import_class_variance_authority22.cva)("", {
|
|
3875
4459
|
variants: {
|
|
3876
4460
|
variant: {
|
|
3877
4461
|
inline: "size-12",
|
|
@@ -3883,7 +4467,7 @@ var logoIconSizeVariants = (0, import_class_variance_authority20.cva)("", {
|
|
|
3883
4467
|
variant: "inline"
|
|
3884
4468
|
}
|
|
3885
4469
|
});
|
|
3886
|
-
var logoTextSizeVariants = (0,
|
|
4470
|
+
var logoTextSizeVariants = (0, import_class_variance_authority22.cva)("", {
|
|
3887
4471
|
variants: {
|
|
3888
4472
|
variant: {
|
|
3889
4473
|
inline: "h-8 w-27.5",
|
|
@@ -3897,13 +4481,15 @@ var logoTextSizeVariants = (0, import_class_variance_authority20.cva)("", {
|
|
|
3897
4481
|
});
|
|
3898
4482
|
var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
3899
4483
|
const textColorClass = textColor === "light" ? "text-(--color-b-white)" : textColor === "dark" ? "text-(--color-b-black)" : "text-primary";
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
3901
|
-
/* @__PURE__ */ (0,
|
|
3902
|
-
/* @__PURE__ */ (0,
|
|
4484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn(logoWrapperVariants({ variant }), className), children: [
|
|
4485
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LogoIconSvg2, { className: logoIconSizeVariants({ variant }) }),
|
|
4486
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LogoTextSvg, { className: cn(logoTextSizeVariants({ variant }), textColorClass) })
|
|
3903
4487
|
] });
|
|
3904
4488
|
};
|
|
3905
4489
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3906
4490
|
0 && (module.exports = {
|
|
4491
|
+
Accordion,
|
|
4492
|
+
Autocomplete,
|
|
3907
4493
|
Avatar,
|
|
3908
4494
|
Badge,
|
|
3909
4495
|
BadgeDigit,
|
|
@@ -3920,6 +4506,16 @@ var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
|
3920
4506
|
LinkButton,
|
|
3921
4507
|
Logo,
|
|
3922
4508
|
LogoIcon,
|
|
4509
|
+
Menu,
|
|
4510
|
+
MenuGroup,
|
|
4511
|
+
MenuItem,
|
|
4512
|
+
MenuLabel,
|
|
4513
|
+
MenuPortal,
|
|
4514
|
+
MenuSeparator,
|
|
4515
|
+
MenuShortcut,
|
|
4516
|
+
MenuSub,
|
|
4517
|
+
MenuSubContent,
|
|
4518
|
+
MenuSubTrigger,
|
|
3923
4519
|
MessageButton,
|
|
3924
4520
|
PasswordInput,
|
|
3925
4521
|
PhoneInput,
|