@bubo-squared/ui-framework 0.2.14 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1295 -724
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +113 -24
- package/dist/index.d.ts +113 -24
- package/dist/index.js +1282 -723
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/dist/index.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,
|
|
@@ -106,10 +118,10 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
106
118
|
]
|
|
107
119
|
},
|
|
108
120
|
size: {
|
|
109
|
-
sm: ["px-
|
|
110
|
-
md: ["px-2", "py-1", "gap-
|
|
111
|
-
lg: ["px-2.5", "py-1", "gap-
|
|
112
|
-
xl: ["px-3", "py-0.5", "gap-
|
|
121
|
+
sm: ["px-2", "py-1", "gap-2", "h-9"],
|
|
122
|
+
md: ["px-2", "py-1", "gap-2", "h-10"],
|
|
123
|
+
lg: ["px-2.5", "py-1", "gap-2.5", "h-11"],
|
|
124
|
+
xl: ["px-3", "py-0.5", "gap-3", "h-12"]
|
|
113
125
|
}
|
|
114
126
|
},
|
|
115
127
|
defaultVariants: {
|
|
@@ -122,19 +134,19 @@ var buttonIconVariants = (0, import_class_variance_authority.cva)("relative", {
|
|
|
122
134
|
variants: {
|
|
123
135
|
size: {
|
|
124
136
|
sm: ["size-5", "*:size-5"],
|
|
125
|
-
md: ["size-
|
|
137
|
+
md: ["size-5", "*:size-5"],
|
|
126
138
|
lg: ["size-6", "*:size-6"],
|
|
127
|
-
xl: ["size-
|
|
139
|
+
xl: ["size-7", "*:size-7"]
|
|
128
140
|
}
|
|
129
141
|
}
|
|
130
142
|
});
|
|
131
143
|
var buttonTextVariants = (0, import_class_variance_authority.cva)("flex text-center justify-center font-normal", {
|
|
132
144
|
variants: {
|
|
133
145
|
size: {
|
|
134
|
-
sm: ["
|
|
135
|
-
md: ["
|
|
136
|
-
lg: ["
|
|
137
|
-
xl: ["
|
|
146
|
+
sm: ["paragraph-sm"],
|
|
147
|
+
md: ["paragraph-md"],
|
|
148
|
+
lg: ["paragraph-lg"],
|
|
149
|
+
xl: ["subtitle"]
|
|
138
150
|
}
|
|
139
151
|
}
|
|
140
152
|
});
|
|
@@ -208,7 +220,7 @@ var import_react_slot2 = require("@radix-ui/react-slot");
|
|
|
208
220
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
209
221
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
210
222
|
var iconButtonVariants = (0, import_class_variance_authority3.cva)(
|
|
211
|
-
"inline-flex items-center justify-center whitespace-nowrap
|
|
223
|
+
"inline-flex items-center justify-center whitespace-nowrap transition-colors disabled:pointer-events-none overflow-hidden p-1.5 cursor-pointer",
|
|
212
224
|
{
|
|
213
225
|
variants: {
|
|
214
226
|
variant: {
|
|
@@ -250,13 +262,14 @@ var IconButton = React2.forwardRef(
|
|
|
250
262
|
size,
|
|
251
263
|
asChild = false,
|
|
252
264
|
icon,
|
|
265
|
+
round = false,
|
|
253
266
|
...rest
|
|
254
267
|
} = props;
|
|
255
268
|
const Comp = asChild ? import_react_slot2.Slot : "button";
|
|
256
269
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
257
270
|
Comp,
|
|
258
271
|
{
|
|
259
|
-
className: cn(iconButtonVariants({ variant, size }), className),
|
|
272
|
+
className: cn(iconButtonVariants({ variant, size }), round ? "rounded-full" : "rounded-4", className),
|
|
260
273
|
ref,
|
|
261
274
|
...rest,
|
|
262
275
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "buttonIcon flex items-center justify-center", children: icon })
|
|
@@ -446,12 +459,77 @@ var MessageButton = (props) => {
|
|
|
446
459
|
};
|
|
447
460
|
MessageButton.displayName = "MessageButton";
|
|
448
461
|
|
|
449
|
-
// src/components/Content/
|
|
462
|
+
// src/components/Content/Accordion.tsx
|
|
450
463
|
var React6 = __toESM(require("react"), 1);
|
|
451
|
-
var
|
|
452
|
-
var import_class_variance_authority6 = require("class-variance-authority");
|
|
464
|
+
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"), 1);
|
|
453
465
|
var import_icons = require("@bubo-squared/icons");
|
|
454
466
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
467
|
+
var Accordion = React6.forwardRef(
|
|
468
|
+
(props, ref) => {
|
|
469
|
+
const {
|
|
470
|
+
title,
|
|
471
|
+
expandIcon,
|
|
472
|
+
children,
|
|
473
|
+
className,
|
|
474
|
+
defaultOpen = false,
|
|
475
|
+
bordered = false,
|
|
476
|
+
...rootProps
|
|
477
|
+
} = props;
|
|
478
|
+
const {
|
|
479
|
+
value,
|
|
480
|
+
defaultValue,
|
|
481
|
+
onValueChange,
|
|
482
|
+
...restRootProps
|
|
483
|
+
} = rootProps;
|
|
484
|
+
const resolvedDefaultValue = value === void 0 && defaultValue === void 0 && defaultOpen ? "item" : defaultValue;
|
|
485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
486
|
+
AccordionPrimitive.Root,
|
|
487
|
+
{
|
|
488
|
+
ref,
|
|
489
|
+
type: "single",
|
|
490
|
+
collapsible: true,
|
|
491
|
+
className: cn("w-full", className),
|
|
492
|
+
value,
|
|
493
|
+
defaultValue: resolvedDefaultValue,
|
|
494
|
+
onValueChange,
|
|
495
|
+
...restRootProps,
|
|
496
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
497
|
+
AccordionPrimitive.Item,
|
|
498
|
+
{
|
|
499
|
+
value: "item",
|
|
500
|
+
className: cn(bordered ? "border rounded-4" : "border-b", "border-(--border-secondary) px-4"),
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
503
|
+
AccordionPrimitive.Trigger,
|
|
504
|
+
{
|
|
505
|
+
className: cn(
|
|
506
|
+
"flex w-full items-center justify-between gap-2 py-3 text-left",
|
|
507
|
+
"paragraph-md text-primary",
|
|
508
|
+
"[&[data-state=open]_.accordion-icon]:rotate-180",
|
|
509
|
+
"disabled:cursor-not-allowed disabled:text-primary-disabled cursor-pointer"
|
|
510
|
+
),
|
|
511
|
+
children: [
|
|
512
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "flex-1", children: title }),
|
|
513
|
+
/* @__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, {}) })
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
) }),
|
|
517
|
+
/* @__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 }) })
|
|
518
|
+
]
|
|
519
|
+
}
|
|
520
|
+
)
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
);
|
|
525
|
+
Accordion.displayName = "Accordion";
|
|
526
|
+
|
|
527
|
+
// src/components/Content/Avatar.tsx
|
|
528
|
+
var React7 = __toESM(require("react"), 1);
|
|
529
|
+
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
530
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
531
|
+
var import_icons2 = require("@bubo-squared/icons");
|
|
532
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
455
533
|
var avatarVariants = (0, import_class_variance_authority6.cva)(
|
|
456
534
|
"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
535
|
{
|
|
@@ -509,7 +587,7 @@ var avatarIconVariants = (0, import_class_variance_authority6.cva)(
|
|
|
509
587
|
}
|
|
510
588
|
}
|
|
511
589
|
);
|
|
512
|
-
var Avatar =
|
|
590
|
+
var Avatar = React7.forwardRef(
|
|
513
591
|
(props, ref) => {
|
|
514
592
|
const {
|
|
515
593
|
asChild = false,
|
|
@@ -523,14 +601,14 @@ var Avatar = React6.forwardRef(
|
|
|
523
601
|
} = props;
|
|
524
602
|
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
525
603
|
const hasImage = variant === "image" && typeof src === "string" && src.length > 0;
|
|
526
|
-
return /* @__PURE__ */ (0,
|
|
604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
527
605
|
Comp,
|
|
528
606
|
{
|
|
529
607
|
ref,
|
|
530
608
|
className: cn(avatarVariants({ size }), className),
|
|
531
609
|
...rest,
|
|
532
610
|
children: [
|
|
533
|
-
hasImage ? /* @__PURE__ */ (0,
|
|
611
|
+
hasImage ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
534
612
|
"img",
|
|
535
613
|
{
|
|
536
614
|
src,
|
|
@@ -538,8 +616,8 @@ var Avatar = React6.forwardRef(
|
|
|
538
616
|
className: "w-full h-full object-cover"
|
|
539
617
|
}
|
|
540
618
|
) : null,
|
|
541
|
-
!hasImage && variant === "initial" && /* @__PURE__ */ (0,
|
|
542
|
-
!hasImage && variant === "icon" && /* @__PURE__ */ (0,
|
|
619
|
+
!hasImage && variant === "initial" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn(avatarInitialsVariants({ size }), "relative bottom-px"), children: initials }),
|
|
620
|
+
!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
621
|
]
|
|
544
622
|
}
|
|
545
623
|
);
|
|
@@ -548,8 +626,8 @@ var Avatar = React6.forwardRef(
|
|
|
548
626
|
Avatar.displayName = "Avatar";
|
|
549
627
|
|
|
550
628
|
// src/components/Content/Typography.tsx
|
|
551
|
-
var
|
|
552
|
-
var
|
|
629
|
+
var React8 = require("react");
|
|
630
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
553
631
|
var mbCapableBaseClasses = /* @__PURE__ */ new Set([
|
|
554
632
|
"h1-intro",
|
|
555
633
|
"h2-intro",
|
|
@@ -585,7 +663,7 @@ var Typography = (props) => {
|
|
|
585
663
|
const Comp = as ?? "span";
|
|
586
664
|
const mbClassName = useMargin ? getMbClassName(variant) : null;
|
|
587
665
|
const weightClassName = weight === "regular" ? null : `${variant}-${weight}`;
|
|
588
|
-
return /* @__PURE__ */ (0,
|
|
666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
589
667
|
Comp,
|
|
590
668
|
{
|
|
591
669
|
className: cn("text-primary", variant, weightClassName, mbClassName, className),
|
|
@@ -597,10 +675,10 @@ var Typography = (props) => {
|
|
|
597
675
|
Typography.displayName = "Typography";
|
|
598
676
|
|
|
599
677
|
// src/components/Content/Badge.tsx
|
|
600
|
-
var
|
|
678
|
+
var React9 = __toESM(require("react"), 1);
|
|
601
679
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
602
680
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
603
|
-
var
|
|
681
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
604
682
|
var badgeVariants = (0, import_class_variance_authority7.cva)(
|
|
605
683
|
"inline-flex items-center justify-center rounded-4 leading-none whitespace-nowrap gap-1 px-1 py-0",
|
|
606
684
|
{
|
|
@@ -630,7 +708,7 @@ var badgeVariants = (0, import_class_variance_authority7.cva)(
|
|
|
630
708
|
}
|
|
631
709
|
}
|
|
632
710
|
);
|
|
633
|
-
var Badge =
|
|
711
|
+
var Badge = React9.forwardRef(
|
|
634
712
|
(props, ref) => {
|
|
635
713
|
const {
|
|
636
714
|
asChild = false,
|
|
@@ -642,17 +720,17 @@ var Badge = React8.forwardRef(
|
|
|
642
720
|
...rest
|
|
643
721
|
} = props;
|
|
644
722
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
645
|
-
return /* @__PURE__ */ (0,
|
|
723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
646
724
|
Comp,
|
|
647
725
|
{
|
|
648
726
|
ref,
|
|
649
727
|
className: cn(badgeVariants({ size, variant }), className),
|
|
650
728
|
...rest,
|
|
651
|
-
children: value ? /* @__PURE__ */ (0,
|
|
652
|
-
/* @__PURE__ */ (0,
|
|
653
|
-
/* @__PURE__ */ (0,
|
|
654
|
-
/* @__PURE__ */ (0,
|
|
655
|
-
] }) : /* @__PURE__ */ (0,
|
|
729
|
+
children: value ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
730
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-normal", children: label }),
|
|
731
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-normal", children: ":" }),
|
|
732
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-medium", children: value })
|
|
733
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-normal", children: label })
|
|
656
734
|
}
|
|
657
735
|
);
|
|
658
736
|
}
|
|
@@ -660,9 +738,9 @@ var Badge = React8.forwardRef(
|
|
|
660
738
|
Badge.displayName = "Badge";
|
|
661
739
|
|
|
662
740
|
// src/components/Content/BadgeDigit.tsx
|
|
663
|
-
var
|
|
741
|
+
var React10 = __toESM(require("react"), 1);
|
|
664
742
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
665
|
-
var
|
|
743
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
666
744
|
var badgeDigitVariants = (0, import_class_variance_authority8.cva)(
|
|
667
745
|
"inline-flex items-center justify-center leading-none whitespace-nowrap text-(--color-b-white)",
|
|
668
746
|
{
|
|
@@ -687,7 +765,7 @@ var badgeDigitVariants = (0, import_class_variance_authority8.cva)(
|
|
|
687
765
|
}
|
|
688
766
|
}
|
|
689
767
|
);
|
|
690
|
-
var BadgeDigit =
|
|
768
|
+
var BadgeDigit = React10.forwardRef(
|
|
691
769
|
(props, ref) => {
|
|
692
770
|
const {
|
|
693
771
|
value,
|
|
@@ -696,7 +774,7 @@ var BadgeDigit = React9.forwardRef(
|
|
|
696
774
|
className,
|
|
697
775
|
...rest
|
|
698
776
|
} = props;
|
|
699
|
-
return /* @__PURE__ */ (0,
|
|
777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
700
778
|
"div",
|
|
701
779
|
{
|
|
702
780
|
ref,
|
|
@@ -710,9 +788,9 @@ var BadgeDigit = React9.forwardRef(
|
|
|
710
788
|
BadgeDigit.displayName = "BadgeDigit";
|
|
711
789
|
|
|
712
790
|
// src/components/Content/BadgeDot.tsx
|
|
713
|
-
var
|
|
791
|
+
var React11 = require("react");
|
|
714
792
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
715
|
-
var
|
|
793
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
716
794
|
var badgeDotVariants = (0, import_class_variance_authority9.cva)("rounded-12 size-3", {
|
|
717
795
|
variants: {
|
|
718
796
|
status: {
|
|
@@ -728,14 +806,14 @@ var badgeDotVariants = (0, import_class_variance_authority9.cva)("rounded-12 siz
|
|
|
728
806
|
}
|
|
729
807
|
});
|
|
730
808
|
var BadgeDot = ({ status, className }) => {
|
|
731
|
-
return /* @__PURE__ */ (0,
|
|
809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn(badgeDotVariants({ status }), className) });
|
|
732
810
|
};
|
|
733
811
|
BadgeDot.displayName = "BadgeDot";
|
|
734
812
|
|
|
735
813
|
// src/components/Content/BadgeStatus.tsx
|
|
736
|
-
var
|
|
737
|
-
var
|
|
738
|
-
var BadgeStatus =
|
|
814
|
+
var React12 = __toESM(require("react"), 1);
|
|
815
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
816
|
+
var BadgeStatus = React12.forwardRef(
|
|
739
817
|
(props, ref) => {
|
|
740
818
|
const {
|
|
741
819
|
label,
|
|
@@ -746,14 +824,14 @@ var BadgeStatus = React11.forwardRef(
|
|
|
746
824
|
} = props;
|
|
747
825
|
const textClasses = active ? "caption-medium text-primary" : "caption-medium text-primary-disabled";
|
|
748
826
|
const dotClasses = active ? "bg-(--background-informal)" : "bg-(--background-primary)";
|
|
749
|
-
return /* @__PURE__ */ (0,
|
|
827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
750
828
|
"div",
|
|
751
829
|
{
|
|
752
830
|
ref,
|
|
753
831
|
className: cn("inline-flex items-center gap-2", className),
|
|
754
832
|
...rest,
|
|
755
833
|
children: [
|
|
756
|
-
/* @__PURE__ */ (0,
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
757
835
|
"span",
|
|
758
836
|
{
|
|
759
837
|
className: cn(
|
|
@@ -763,7 +841,7 @@ var BadgeStatus = React11.forwardRef(
|
|
|
763
841
|
)
|
|
764
842
|
}
|
|
765
843
|
),
|
|
766
|
-
/* @__PURE__ */ (0,
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: textClasses, children: label })
|
|
767
845
|
]
|
|
768
846
|
}
|
|
769
847
|
);
|
|
@@ -772,9 +850,9 @@ var BadgeStatus = React11.forwardRef(
|
|
|
772
850
|
BadgeStatus.displayName = "BadgeStatus";
|
|
773
851
|
|
|
774
852
|
// src/components/Content/Divider.tsx
|
|
775
|
-
var
|
|
776
|
-
var
|
|
777
|
-
var
|
|
853
|
+
var React13 = require("react");
|
|
854
|
+
var import_icons3 = require("@bubo-squared/icons");
|
|
855
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
778
856
|
var gapBySize = {
|
|
779
857
|
sm: "gap-2",
|
|
780
858
|
md: "gap-3",
|
|
@@ -809,14 +887,14 @@ var Divider = (props) => {
|
|
|
809
887
|
className: _className,
|
|
810
888
|
...divProps
|
|
811
889
|
} = props;
|
|
812
|
-
return /* @__PURE__ */ (0,
|
|
890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
813
891
|
"div",
|
|
814
892
|
{
|
|
815
893
|
className: wrapperClass,
|
|
816
894
|
role: "separator",
|
|
817
895
|
"aria-orientation": ariaOrientation,
|
|
818
896
|
...divProps,
|
|
819
|
-
children: /* @__PURE__ */ (0,
|
|
897
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
820
898
|
}
|
|
821
899
|
);
|
|
822
900
|
}
|
|
@@ -830,7 +908,7 @@ var Divider = (props) => {
|
|
|
830
908
|
...divProps
|
|
831
909
|
} = props;
|
|
832
910
|
const textLabel = label ? label : "OR";
|
|
833
|
-
return /* @__PURE__ */ (0,
|
|
911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
834
912
|
"div",
|
|
835
913
|
{
|
|
836
914
|
className: wrapperClass,
|
|
@@ -838,8 +916,8 @@ var Divider = (props) => {
|
|
|
838
916
|
"aria-orientation": ariaOrientation,
|
|
839
917
|
...divProps,
|
|
840
918
|
children: [
|
|
841
|
-
/* @__PURE__ */ (0,
|
|
842
|
-
/* @__PURE__ */ (0,
|
|
919
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass }),
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
843
921
|
"span",
|
|
844
922
|
{
|
|
845
923
|
className: cn(
|
|
@@ -849,7 +927,7 @@ var Divider = (props) => {
|
|
|
849
927
|
children: textLabel
|
|
850
928
|
}
|
|
851
929
|
),
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
930
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
853
931
|
]
|
|
854
932
|
}
|
|
855
933
|
);
|
|
@@ -866,7 +944,7 @@ var Divider = (props) => {
|
|
|
866
944
|
className: _className,
|
|
867
945
|
...divProps
|
|
868
946
|
} = props;
|
|
869
|
-
return /* @__PURE__ */ (0,
|
|
947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
870
948
|
"div",
|
|
871
949
|
{
|
|
872
950
|
className: wrapperClass,
|
|
@@ -874,18 +952,18 @@ var Divider = (props) => {
|
|
|
874
952
|
"aria-orientation": ariaOrientation,
|
|
875
953
|
...divProps,
|
|
876
954
|
children: [
|
|
877
|
-
/* @__PURE__ */ (0,
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass }),
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
879
957
|
IconButton,
|
|
880
958
|
{
|
|
881
959
|
variant: iconButtonVariant ?? "secondary",
|
|
882
960
|
size: resolvedSize,
|
|
883
961
|
"aria-label": ariaLabel ?? "More options",
|
|
884
|
-
icon: icon ?? /* @__PURE__ */ (0,
|
|
962
|
+
icon: icon ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons3.TargetIcon, {}),
|
|
885
963
|
onClick: onIconClick
|
|
886
964
|
}
|
|
887
965
|
),
|
|
888
|
-
/* @__PURE__ */ (0,
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
889
967
|
]
|
|
890
968
|
}
|
|
891
969
|
);
|
|
@@ -899,7 +977,7 @@ var Divider = (props) => {
|
|
|
899
977
|
className: _className,
|
|
900
978
|
...divProps
|
|
901
979
|
} = props;
|
|
902
|
-
return /* @__PURE__ */ (0,
|
|
980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
903
981
|
"div",
|
|
904
982
|
{
|
|
905
983
|
className: wrapperClass,
|
|
@@ -907,8 +985,8 @@ var Divider = (props) => {
|
|
|
907
985
|
"aria-orientation": ariaOrientation,
|
|
908
986
|
...divProps,
|
|
909
987
|
children: [
|
|
910
|
-
/* @__PURE__ */ (0,
|
|
911
|
-
/* @__PURE__ */ (0,
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass }),
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
912
990
|
IconButtonGroup,
|
|
913
991
|
{
|
|
914
992
|
className: resolvedOrientation === "vertical" ? "flex-col" : "flex-row",
|
|
@@ -916,7 +994,7 @@ var Divider = (props) => {
|
|
|
916
994
|
size: resolvedSize
|
|
917
995
|
}
|
|
918
996
|
),
|
|
919
|
-
/* @__PURE__ */ (0,
|
|
997
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
920
998
|
]
|
|
921
999
|
}
|
|
922
1000
|
);
|
|
@@ -932,7 +1010,7 @@ var Divider = (props) => {
|
|
|
932
1010
|
className: _className,
|
|
933
1011
|
...divProps
|
|
934
1012
|
} = props;
|
|
935
|
-
return /* @__PURE__ */ (0,
|
|
1013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
936
1014
|
"div",
|
|
937
1015
|
{
|
|
938
1016
|
className: wrapperClass,
|
|
@@ -940,8 +1018,8 @@ var Divider = (props) => {
|
|
|
940
1018
|
"aria-orientation": ariaOrientation,
|
|
941
1019
|
...divProps,
|
|
942
1020
|
children: [
|
|
943
|
-
/* @__PURE__ */ (0,
|
|
944
|
-
/* @__PURE__ */ (0,
|
|
1021
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass }),
|
|
1022
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
945
1023
|
Button,
|
|
946
1024
|
{
|
|
947
1025
|
variant: buttonVariant ?? "secondary",
|
|
@@ -950,7 +1028,7 @@ var Divider = (props) => {
|
|
|
950
1028
|
children: buttonLabel
|
|
951
1029
|
}
|
|
952
1030
|
),
|
|
953
|
-
/* @__PURE__ */ (0,
|
|
1031
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: lineClass })
|
|
954
1032
|
]
|
|
955
1033
|
}
|
|
956
1034
|
);
|
|
@@ -960,11 +1038,11 @@ var Divider = (props) => {
|
|
|
960
1038
|
Divider.displayName = "Divider";
|
|
961
1039
|
|
|
962
1040
|
// src/components/Content/Progress.tsx
|
|
963
|
-
var
|
|
1041
|
+
var React15 = __toESM(require("react"), 1);
|
|
964
1042
|
|
|
965
1043
|
// src/components/Inputs/Field.tsx
|
|
966
|
-
var
|
|
967
|
-
var
|
|
1044
|
+
var React14 = __toESM(require("react"), 1);
|
|
1045
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
968
1046
|
var fieldBase = "flex flex-col gap-2 items-start";
|
|
969
1047
|
var Field = (props) => {
|
|
970
1048
|
const {
|
|
@@ -977,18 +1055,18 @@ var Field = (props) => {
|
|
|
977
1055
|
className,
|
|
978
1056
|
children
|
|
979
1057
|
} = props;
|
|
980
|
-
const fieldId =
|
|
1058
|
+
const fieldId = React14.useId();
|
|
981
1059
|
const labelId = label ? `${fieldId}-label` : void 0;
|
|
982
1060
|
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
983
1061
|
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
984
1062
|
const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
|
|
985
|
-
return /* @__PURE__ */ (0,
|
|
986
|
-
label && /* @__PURE__ */ (0,
|
|
987
|
-
/* @__PURE__ */ (0,
|
|
1063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn(fieldBase, className), children: [
|
|
1064
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
1065
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { id: labelId, className: cn("paragraph-sm", labelColorClass), children: label }),
|
|
988
1066
|
labelRight
|
|
989
1067
|
] }),
|
|
990
|
-
/* @__PURE__ */ (0,
|
|
991
|
-
!hideHint && /* @__PURE__ */ (0,
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "relative w-full", children }),
|
|
1069
|
+
!hideHint && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
992
1070
|
"p",
|
|
993
1071
|
{
|
|
994
1072
|
id: hint ? hintId : void 0,
|
|
@@ -1001,13 +1079,13 @@ var Field = (props) => {
|
|
|
1001
1079
|
Field.displayName = "Field";
|
|
1002
1080
|
|
|
1003
1081
|
// src/components/Content/Progress.tsx
|
|
1004
|
-
var
|
|
1082
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1005
1083
|
var sizeToBarClasses = {
|
|
1006
1084
|
lg: "h-4 rounded-16",
|
|
1007
1085
|
md: "h-2 rounded-8",
|
|
1008
1086
|
sm: "h-1 rounded-4"
|
|
1009
1087
|
};
|
|
1010
|
-
var Progress =
|
|
1088
|
+
var Progress = React15.forwardRef(
|
|
1011
1089
|
(props, ref) => {
|
|
1012
1090
|
const {
|
|
1013
1091
|
value,
|
|
@@ -1024,17 +1102,17 @@ var Progress = React14.forwardRef(
|
|
|
1024
1102
|
const clamped = Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;
|
|
1025
1103
|
const percentageLabel = `${Math.round(clamped)}%`;
|
|
1026
1104
|
const barHeightClasses = sizeToBarClasses[size];
|
|
1027
|
-
return /* @__PURE__ */ (0,
|
|
1105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1028
1106
|
Field,
|
|
1029
1107
|
{
|
|
1030
1108
|
label,
|
|
1031
|
-
labelRight: showProgressLabel && label ? /* @__PURE__ */ (0,
|
|
1109
|
+
labelRight: showProgressLabel && label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
|
|
1032
1110
|
hint,
|
|
1033
1111
|
hideHint,
|
|
1034
1112
|
status,
|
|
1035
1113
|
disabled,
|
|
1036
1114
|
className: cn("w-full", className),
|
|
1037
|
-
children: /* @__PURE__ */ (0,
|
|
1115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1038
1116
|
"div",
|
|
1039
1117
|
{
|
|
1040
1118
|
ref,
|
|
@@ -1044,7 +1122,7 @@ var Progress = React14.forwardRef(
|
|
|
1044
1122
|
"aria-valuemax": 100,
|
|
1045
1123
|
"aria-label": label,
|
|
1046
1124
|
...rest,
|
|
1047
|
-
children: /* @__PURE__ */ (0,
|
|
1125
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1048
1126
|
"div",
|
|
1049
1127
|
{
|
|
1050
1128
|
className: cn(
|
|
@@ -1052,7 +1130,7 @@ var Progress = React14.forwardRef(
|
|
|
1052
1130
|
barHeightClasses,
|
|
1053
1131
|
disabled && "opacity-50"
|
|
1054
1132
|
),
|
|
1055
|
-
children: /* @__PURE__ */ (0,
|
|
1133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1056
1134
|
"div",
|
|
1057
1135
|
{
|
|
1058
1136
|
className: cn(
|
|
@@ -1073,10 +1151,10 @@ var Progress = React14.forwardRef(
|
|
|
1073
1151
|
Progress.displayName = "Progress";
|
|
1074
1152
|
|
|
1075
1153
|
// src/components/Content/StatusAvatar.tsx
|
|
1076
|
-
var
|
|
1154
|
+
var React16 = __toESM(require("react"), 1);
|
|
1077
1155
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1078
|
-
var
|
|
1079
|
-
var
|
|
1156
|
+
var import_icons4 = require("@bubo-squared/icons");
|
|
1157
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1080
1158
|
var iconStatusVariants = (0, import_class_variance_authority10.cva)(
|
|
1081
1159
|
"inline-flex size-5 items-center justify-center rounded-full border-1 border-(--color-primary-inverse) p-1",
|
|
1082
1160
|
{
|
|
@@ -1101,11 +1179,11 @@ var presenceDotByVariant = {
|
|
|
1101
1179
|
away: "bg-(--background-warning) border-1 border-(--color-primary-inverse)",
|
|
1102
1180
|
busy: "bg-(--background-error) border-1 border-(--color-primary-inverse)"
|
|
1103
1181
|
};
|
|
1104
|
-
var StatusAvatar =
|
|
1182
|
+
var StatusAvatar = React16.forwardRef((props, ref) => {
|
|
1105
1183
|
const { variant = "verified", className, ...rest } = props;
|
|
1106
1184
|
if (variant === "offline" || variant === "online" || variant === "away" || variant === "busy") {
|
|
1107
1185
|
const dotClasses = presenceDotByVariant[variant];
|
|
1108
|
-
return /* @__PURE__ */ (0,
|
|
1186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1109
1187
|
"div",
|
|
1110
1188
|
{
|
|
1111
1189
|
ref,
|
|
@@ -1114,23 +1192,23 @@ var StatusAvatar = React15.forwardRef((props, ref) => {
|
|
|
1114
1192
|
className
|
|
1115
1193
|
),
|
|
1116
1194
|
...rest,
|
|
1117
|
-
children: /* @__PURE__ */ (0,
|
|
1195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cn(dotClasses, "size-3.5 rounded-full") })
|
|
1118
1196
|
}
|
|
1119
1197
|
);
|
|
1120
1198
|
}
|
|
1121
1199
|
const iconVariant = variant;
|
|
1122
|
-
return /* @__PURE__ */ (0,
|
|
1200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1123
1201
|
"div",
|
|
1124
1202
|
{
|
|
1125
1203
|
ref,
|
|
1126
1204
|
className: cn(iconStatusVariants({ variant: iconVariant }), className),
|
|
1127
1205
|
...rest,
|
|
1128
1206
|
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,
|
|
1207
|
+
iconVariant === "verified" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.CheckIcon, { className: "size-3 text-button-white" }),
|
|
1208
|
+
iconVariant === "bookmark" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.BookmarkCheckIcon, { className: "size-3 text-button-white" }),
|
|
1209
|
+
iconVariant === "favorite" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.StarIcon, { className: "size-3 text-button-white" }),
|
|
1210
|
+
iconVariant === "add" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.PlusIcon, { className: "size-3 text-button-white" }),
|
|
1211
|
+
iconVariant === "remove" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons4.CrossIcon, { className: "size-3 text-button-white" })
|
|
1134
1212
|
]
|
|
1135
1213
|
}
|
|
1136
1214
|
);
|
|
@@ -1138,10 +1216,10 @@ var StatusAvatar = React15.forwardRef((props, ref) => {
|
|
|
1138
1216
|
StatusAvatar.displayName = "StatusAvatar";
|
|
1139
1217
|
|
|
1140
1218
|
// src/components/Content/Tag.tsx
|
|
1141
|
-
var
|
|
1219
|
+
var React17 = __toESM(require("react"), 1);
|
|
1142
1220
|
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
1143
1221
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1144
|
-
var
|
|
1222
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1145
1223
|
var tagVariants = (0, import_class_variance_authority11.cva)(
|
|
1146
1224
|
"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
1225
|
{
|
|
@@ -1158,7 +1236,7 @@ var tagVariants = (0, import_class_variance_authority11.cva)(
|
|
|
1158
1236
|
);
|
|
1159
1237
|
var disabledTag = "pointer-events-none border-(--border-secondary-disabled) bg-(--background-neutral-disabled) text-primary-disabled";
|
|
1160
1238
|
var iconClasses = "flex items-center justify-center w-5 h-5 [&>*]:w-5 [&>*]:h-5 shrink-0 text-primary";
|
|
1161
|
-
var Tag =
|
|
1239
|
+
var Tag = React17.forwardRef(
|
|
1162
1240
|
(props, ref) => {
|
|
1163
1241
|
const {
|
|
1164
1242
|
size = "sm",
|
|
@@ -1170,37 +1248,295 @@ var Tag = React16.forwardRef(
|
|
|
1170
1248
|
...rest
|
|
1171
1249
|
} = props;
|
|
1172
1250
|
const Comp = asChild ? import_react_slot6.Slot : "div";
|
|
1173
|
-
const leading = props.leadingIcon &&
|
|
1174
|
-
const trailing = props.trailingIcon &&
|
|
1175
|
-
return /* @__PURE__ */ (0,
|
|
1251
|
+
const leading = props.leadingIcon && React17.isValidElement(props.leadingIcon) ? React17.cloneElement(props.leadingIcon, { disabled, ...props.leadingIcon.props }) : null;
|
|
1252
|
+
const trailing = props.trailingIcon && React17.isValidElement(props.trailingIcon) ? React17.cloneElement(props.trailingIcon, { disabled, ...props.trailingIcon.props }) : null;
|
|
1253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1176
1254
|
Comp,
|
|
1177
1255
|
{
|
|
1178
1256
|
className: cn(tagVariants({ size }), disabled && disabledTag, className),
|
|
1179
1257
|
ref,
|
|
1180
1258
|
...rest,
|
|
1181
1259
|
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,
|
|
1260
|
+
leading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: iconClasses, children: leading }),
|
|
1261
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-row gap-1 items-center", children: [
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: label }),
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: ":" }),
|
|
1264
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg-medium mb-0! cursor-default font-medium", children: value })
|
|
1265
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default", children: label }),
|
|
1266
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: iconClasses, children: trailing })
|
|
1189
1267
|
]
|
|
1190
1268
|
}
|
|
1191
1269
|
);
|
|
1192
1270
|
}
|
|
1193
1271
|
);
|
|
1194
1272
|
|
|
1273
|
+
// src/components/Content/Menu.tsx
|
|
1274
|
+
var React19 = require("react");
|
|
1275
|
+
|
|
1276
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1277
|
+
var React18 = __toESM(require("react"), 1);
|
|
1278
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1279
|
+
var import_icons5 = require("@bubo-squared/icons");
|
|
1280
|
+
|
|
1281
|
+
// src/components/ui/dropdown-styles.ts
|
|
1282
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1283
|
+
var dropdownSurfaceClass = "z-50 rounded-4 border border-(--border-secondary-hover) bg-(--background-neutral) shadow-card-md";
|
|
1284
|
+
var dropdownScrollClass = "max-h-79 overflow-y-auto dropdown-scrollbar";
|
|
1285
|
+
var dropdownRowVariants = (0, import_class_variance_authority12.cva)(
|
|
1286
|
+
"flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left text-primary cursor-pointer hover:bg-(--background-secondary)",
|
|
1287
|
+
{
|
|
1288
|
+
variants: {
|
|
1289
|
+
size: {
|
|
1290
|
+
sm: "paragraph-sm py-(--space-4)",
|
|
1291
|
+
md: "paragraph-md py-(--space-6)",
|
|
1292
|
+
lg: "paragraph-lg py-(--space-8)",
|
|
1293
|
+
xl: "subtitle py-(--space-10)"
|
|
1294
|
+
},
|
|
1295
|
+
inset: {
|
|
1296
|
+
true: "pl-(--space-16)"
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
defaultVariants: {
|
|
1300
|
+
size: "lg"
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
);
|
|
1304
|
+
|
|
1305
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1306
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1307
|
+
var DropdownMenuSizeContext = React18.createContext("lg");
|
|
1308
|
+
function useDropdownMenuSize(explicitSize) {
|
|
1309
|
+
const contextSize = React18.useContext(DropdownMenuSizeContext);
|
|
1310
|
+
return explicitSize ?? contextSize;
|
|
1311
|
+
}
|
|
1312
|
+
function DropdownMenu({
|
|
1313
|
+
...props
|
|
1314
|
+
}) {
|
|
1315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1316
|
+
}
|
|
1317
|
+
function DropdownMenuPortal({
|
|
1318
|
+
...props
|
|
1319
|
+
}) {
|
|
1320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1321
|
+
}
|
|
1322
|
+
function DropdownMenuTrigger({
|
|
1323
|
+
...props
|
|
1324
|
+
}) {
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1326
|
+
DropdownMenuPrimitive.Trigger,
|
|
1327
|
+
{
|
|
1328
|
+
"data-slot": "dropdown-menu-trigger",
|
|
1329
|
+
...props
|
|
1330
|
+
}
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
function DropdownMenuContent({
|
|
1334
|
+
className,
|
|
1335
|
+
sideOffset = 4,
|
|
1336
|
+
size = "lg",
|
|
1337
|
+
...props
|
|
1338
|
+
}) {
|
|
1339
|
+
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)(
|
|
1340
|
+
DropdownMenuPrimitive.Content,
|
|
1341
|
+
{
|
|
1342
|
+
"data-slot": "dropdown-menu-content",
|
|
1343
|
+
sideOffset,
|
|
1344
|
+
className: cn(
|
|
1345
|
+
dropdownSurfaceClass,
|
|
1346
|
+
dropdownScrollClass,
|
|
1347
|
+
"min-w-37.5 p-0",
|
|
1348
|
+
className
|
|
1349
|
+
),
|
|
1350
|
+
...props
|
|
1351
|
+
}
|
|
1352
|
+
) }) });
|
|
1353
|
+
}
|
|
1354
|
+
function DropdownMenuGroup({
|
|
1355
|
+
...props
|
|
1356
|
+
}) {
|
|
1357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
1358
|
+
}
|
|
1359
|
+
function DropdownMenuItem({
|
|
1360
|
+
className,
|
|
1361
|
+
inset,
|
|
1362
|
+
size,
|
|
1363
|
+
variant = "default",
|
|
1364
|
+
...props
|
|
1365
|
+
}) {
|
|
1366
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1368
|
+
DropdownMenuPrimitive.Item,
|
|
1369
|
+
{
|
|
1370
|
+
"data-slot": "dropdown-menu-item",
|
|
1371
|
+
"data-inset": inset,
|
|
1372
|
+
"data-variant": variant,
|
|
1373
|
+
className: cn(
|
|
1374
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1375
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1376
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50 data-disabled:text-primary-disabled",
|
|
1377
|
+
variant === "destructive" ? "text-(--color-error)" : null,
|
|
1378
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1379
|
+
className
|
|
1380
|
+
),
|
|
1381
|
+
...props
|
|
1382
|
+
}
|
|
1383
|
+
);
|
|
1384
|
+
}
|
|
1385
|
+
function DropdownMenuLabel({
|
|
1386
|
+
className,
|
|
1387
|
+
inset,
|
|
1388
|
+
size,
|
|
1389
|
+
...props
|
|
1390
|
+
}) {
|
|
1391
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1393
|
+
DropdownMenuPrimitive.Label,
|
|
1394
|
+
{
|
|
1395
|
+
"data-slot": "dropdown-menu-label",
|
|
1396
|
+
"data-inset": inset,
|
|
1397
|
+
className: cn(
|
|
1398
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1399
|
+
"text-secondary cursor-default hover:bg-transparent caption",
|
|
1400
|
+
className
|
|
1401
|
+
),
|
|
1402
|
+
...props
|
|
1403
|
+
}
|
|
1404
|
+
);
|
|
1405
|
+
}
|
|
1406
|
+
function DropdownMenuSeparator({
|
|
1407
|
+
className,
|
|
1408
|
+
...props
|
|
1409
|
+
}) {
|
|
1410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1411
|
+
DropdownMenuPrimitive.Separator,
|
|
1412
|
+
{
|
|
1413
|
+
"data-slot": "dropdown-menu-separator",
|
|
1414
|
+
className: cn("my-1 h-px bg-(--border-secondary)", className),
|
|
1415
|
+
...props
|
|
1416
|
+
}
|
|
1417
|
+
);
|
|
1418
|
+
}
|
|
1419
|
+
function DropdownMenuShortcut({
|
|
1420
|
+
className,
|
|
1421
|
+
...props
|
|
1422
|
+
}) {
|
|
1423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1424
|
+
"span",
|
|
1425
|
+
{
|
|
1426
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1427
|
+
className: cn(
|
|
1428
|
+
"ml-auto paragraph-sm text-secondary",
|
|
1429
|
+
className
|
|
1430
|
+
),
|
|
1431
|
+
...props
|
|
1432
|
+
}
|
|
1433
|
+
);
|
|
1434
|
+
}
|
|
1435
|
+
function DropdownMenuSub({
|
|
1436
|
+
...props
|
|
1437
|
+
}) {
|
|
1438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1439
|
+
}
|
|
1440
|
+
function DropdownMenuSubTrigger({
|
|
1441
|
+
className,
|
|
1442
|
+
inset,
|
|
1443
|
+
size,
|
|
1444
|
+
children,
|
|
1445
|
+
...props
|
|
1446
|
+
}) {
|
|
1447
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1449
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1450
|
+
{
|
|
1451
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1452
|
+
"data-inset": inset,
|
|
1453
|
+
className: cn(
|
|
1454
|
+
dropdownRowVariants({ size: resolvedSize, inset }),
|
|
1455
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1456
|
+
"data-[state=open]:bg-(--background-secondary)",
|
|
1457
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50 data-disabled:text-primary-disabled",
|
|
1458
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1459
|
+
className
|
|
1460
|
+
),
|
|
1461
|
+
...props,
|
|
1462
|
+
children: [
|
|
1463
|
+
children,
|
|
1464
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons5.ChevronRightIcon, { className: "ml-auto size-4 text-(--icon-primary)" })
|
|
1465
|
+
]
|
|
1466
|
+
}
|
|
1467
|
+
);
|
|
1468
|
+
}
|
|
1469
|
+
function DropdownMenuSubContent({
|
|
1470
|
+
className,
|
|
1471
|
+
size,
|
|
1472
|
+
...props
|
|
1473
|
+
}) {
|
|
1474
|
+
const resolvedSize = useDropdownMenuSize(size);
|
|
1475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropdownMenuSizeContext.Provider, { value: resolvedSize, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1476
|
+
DropdownMenuPrimitive.SubContent,
|
|
1477
|
+
{
|
|
1478
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1479
|
+
className: cn(
|
|
1480
|
+
dropdownSurfaceClass,
|
|
1481
|
+
dropdownScrollClass,
|
|
1482
|
+
"min-w-37.5 p-0",
|
|
1483
|
+
className
|
|
1484
|
+
),
|
|
1485
|
+
...props
|
|
1486
|
+
}
|
|
1487
|
+
) });
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
// src/components/Content/Menu.tsx
|
|
1491
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1492
|
+
var Menu = (props) => {
|
|
1493
|
+
const {
|
|
1494
|
+
trigger,
|
|
1495
|
+
children,
|
|
1496
|
+
size = "lg",
|
|
1497
|
+
align = "start",
|
|
1498
|
+
side,
|
|
1499
|
+
offset = 4,
|
|
1500
|
+
className,
|
|
1501
|
+
open,
|
|
1502
|
+
onOpenChange,
|
|
1503
|
+
modal
|
|
1504
|
+
} = props;
|
|
1505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DropdownMenu, { open, onOpenChange, modal, children: [
|
|
1506
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenuTrigger, { asChild: true, children: trigger }),
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1508
|
+
DropdownMenuContent,
|
|
1509
|
+
{
|
|
1510
|
+
align,
|
|
1511
|
+
side,
|
|
1512
|
+
sideOffset: offset,
|
|
1513
|
+
size,
|
|
1514
|
+
className: cn(className),
|
|
1515
|
+
children
|
|
1516
|
+
}
|
|
1517
|
+
)
|
|
1518
|
+
] });
|
|
1519
|
+
};
|
|
1520
|
+
Menu.displayName = "Menu";
|
|
1521
|
+
var MenuGroup = DropdownMenuGroup;
|
|
1522
|
+
var MenuItem = DropdownMenuItem;
|
|
1523
|
+
var MenuLabel = DropdownMenuLabel;
|
|
1524
|
+
var MenuPortal = DropdownMenuPortal;
|
|
1525
|
+
var MenuSeparator = DropdownMenuSeparator;
|
|
1526
|
+
var MenuShortcut = DropdownMenuShortcut;
|
|
1527
|
+
var MenuSub = DropdownMenuSub;
|
|
1528
|
+
var MenuSubContent = DropdownMenuSubContent;
|
|
1529
|
+
var MenuSubTrigger = DropdownMenuSubTrigger;
|
|
1530
|
+
|
|
1195
1531
|
// src/components/Inputs/Checkbox.tsx
|
|
1196
|
-
var
|
|
1532
|
+
var React20 = require("react");
|
|
1197
1533
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
1198
|
-
var
|
|
1199
|
-
var
|
|
1200
|
-
var
|
|
1534
|
+
var import_icons6 = require("@bubo-squared/icons");
|
|
1535
|
+
var import_icons7 = require("@bubo-squared/icons");
|
|
1536
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1201
1537
|
function Checkbox({ label, className, ...props }) {
|
|
1202
|
-
return /* @__PURE__ */ (0,
|
|
1203
|
-
/* @__PURE__ */ (0,
|
|
1538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "inline-flex items-center gap-(--space-12) cursor-pointer select-none", children: [
|
|
1539
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1204
1540
|
CheckboxPrimitive.Root,
|
|
1205
1541
|
{
|
|
1206
1542
|
className: cn(
|
|
@@ -1216,23 +1552,385 @@ function Checkbox({ label, className, ...props }) {
|
|
|
1216
1552
|
className
|
|
1217
1553
|
),
|
|
1218
1554
|
...props,
|
|
1219
|
-
children: /* @__PURE__ */ (0,
|
|
1220
|
-
/* @__PURE__ */ (0,
|
|
1221
|
-
/* @__PURE__ */ (0,
|
|
1555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
|
|
1556
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons6.CheckIcon, { className: "h-5 w-5 hidden group-data-[state=checked]:block" }),
|
|
1557
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons7.MinusIcon, { className: "h-5 w-5 hidden group-data-[state=indeterminate]:block" })
|
|
1222
1558
|
] })
|
|
1223
1559
|
}
|
|
1224
1560
|
),
|
|
1225
|
-
label && /* @__PURE__ */ (0,
|
|
1226
|
-
] });
|
|
1227
|
-
}
|
|
1561
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "paragraph-md-medium text-primary", children: label })
|
|
1562
|
+
] });
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
// src/components/Inputs/Autocomplete.tsx
|
|
1566
|
+
var React23 = __toESM(require("react"), 1);
|
|
1567
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
1568
|
+
|
|
1569
|
+
// src/components/Inputs/InputShell.tsx
|
|
1570
|
+
var React21 = __toESM(require("react"), 1);
|
|
1571
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
1572
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1573
|
+
var inputShellVariants = (0, import_class_variance_authority13.cva)(
|
|
1574
|
+
"group flex w-full items-center rounded-4 border bg-(--background-primary) text-left cursor-text border-(--border-secondary)",
|
|
1575
|
+
{
|
|
1576
|
+
variants: {
|
|
1577
|
+
size: {
|
|
1578
|
+
sm: "gap-2 px-2 py-1 h-8",
|
|
1579
|
+
md: "gap-2 px-2 py-2 h-10",
|
|
1580
|
+
lg: "gap-2 px-2 py-2 h-11",
|
|
1581
|
+
xl: "gap-2 px-[10px] py-2 h-14"
|
|
1582
|
+
},
|
|
1583
|
+
status: {
|
|
1584
|
+
default: "input-default",
|
|
1585
|
+
success: "input-success",
|
|
1586
|
+
error: "input-error"
|
|
1587
|
+
},
|
|
1588
|
+
disabled: {
|
|
1589
|
+
true: "bg-(--background-primary-disabled) border-(--border-secondary-disabled) text-primary-disabled cursor-default"
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
defaultVariants: {
|
|
1593
|
+
size: "lg",
|
|
1594
|
+
status: "default"
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
);
|
|
1598
|
+
var InputShell = React21.forwardRef(
|
|
1599
|
+
({ size, status, disabled, className, ...rest }, ref) => {
|
|
1600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1601
|
+
"div",
|
|
1602
|
+
{
|
|
1603
|
+
ref,
|
|
1604
|
+
"aria-disabled": disabled || void 0,
|
|
1605
|
+
className: cn(
|
|
1606
|
+
inputShellVariants({ size, status, disabled }),
|
|
1607
|
+
className
|
|
1608
|
+
),
|
|
1609
|
+
...rest
|
|
1610
|
+
}
|
|
1611
|
+
);
|
|
1612
|
+
}
|
|
1613
|
+
);
|
|
1614
|
+
InputShell.displayName = "InputShell";
|
|
1615
|
+
|
|
1616
|
+
// src/components/ui/input.tsx
|
|
1617
|
+
var React22 = __toESM(require("react"), 1);
|
|
1618
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1619
|
+
var Input = React22.forwardRef(
|
|
1620
|
+
({ className, type, variant = "default", ...props }, ref) => {
|
|
1621
|
+
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";
|
|
1622
|
+
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";
|
|
1623
|
+
const bareStyles = "bg-transparent outline-none w-full";
|
|
1624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1625
|
+
"input",
|
|
1626
|
+
{
|
|
1627
|
+
ref,
|
|
1628
|
+
type,
|
|
1629
|
+
"data-slot": "input",
|
|
1630
|
+
className: cn(
|
|
1631
|
+
base,
|
|
1632
|
+
variant === "default" ? defaultStyles : bareStyles,
|
|
1633
|
+
className
|
|
1634
|
+
),
|
|
1635
|
+
...props
|
|
1636
|
+
}
|
|
1637
|
+
);
|
|
1638
|
+
}
|
|
1639
|
+
);
|
|
1640
|
+
Input.displayName = "Input";
|
|
1641
|
+
|
|
1642
|
+
// src/components/Inputs/Autocomplete.tsx
|
|
1643
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1644
|
+
var inputTextVariants = (0, import_class_variance_authority14.cva)("truncate", {
|
|
1645
|
+
variants: {
|
|
1646
|
+
size: {
|
|
1647
|
+
sm: "paragraph-md",
|
|
1648
|
+
md: "paragraph-lg",
|
|
1649
|
+
lg: "subtitle",
|
|
1650
|
+
xl: "h6-title"
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
defaultVariants: {
|
|
1654
|
+
size: "lg"
|
|
1655
|
+
}
|
|
1656
|
+
});
|
|
1657
|
+
var optionVariants = (0, import_class_variance_authority14.cva)(
|
|
1658
|
+
"w-full text-left hover:bg-(--background-secondary)",
|
|
1659
|
+
{
|
|
1660
|
+
variants: {
|
|
1661
|
+
size: {
|
|
1662
|
+
sm: "paragraph-sm py-(--space-4) ",
|
|
1663
|
+
md: "paragraph-md py-(--space-6) ",
|
|
1664
|
+
lg: "paragraph-lg py-(--space-8) ",
|
|
1665
|
+
xl: "subtitle py-(--space-10) "
|
|
1666
|
+
},
|
|
1667
|
+
active: {
|
|
1668
|
+
true: "bg-(--background-secondary)"
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
defaultVariants: {
|
|
1672
|
+
size: "lg",
|
|
1673
|
+
active: false
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
);
|
|
1677
|
+
var iconWrapperVariants = (0, import_class_variance_authority14.cva)(
|
|
1678
|
+
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
1679
|
+
{
|
|
1680
|
+
variants: {
|
|
1681
|
+
size: {
|
|
1682
|
+
sm: "size-4 [&>svg]:size-4",
|
|
1683
|
+
md: "size-5 [&>svg]:size-5",
|
|
1684
|
+
lg: "size-5 [&>svg]:size-5",
|
|
1685
|
+
xl: "size-6 [&>svg]:size-6"
|
|
1686
|
+
},
|
|
1687
|
+
disabled: {
|
|
1688
|
+
true: "text-(--icon-primary-disabled)"
|
|
1689
|
+
}
|
|
1690
|
+
},
|
|
1691
|
+
defaultVariants: {
|
|
1692
|
+
size: "lg"
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
);
|
|
1696
|
+
var Autocomplete = (props) => {
|
|
1697
|
+
const {
|
|
1698
|
+
label,
|
|
1699
|
+
hint,
|
|
1700
|
+
hideHint,
|
|
1701
|
+
status = "default",
|
|
1702
|
+
size = "lg",
|
|
1703
|
+
disabled,
|
|
1704
|
+
className,
|
|
1705
|
+
leadingIcon,
|
|
1706
|
+
trailingIcon,
|
|
1707
|
+
options,
|
|
1708
|
+
loading = false,
|
|
1709
|
+
loadingText = "Loading\u2026",
|
|
1710
|
+
noOptionsText = "No matches",
|
|
1711
|
+
value,
|
|
1712
|
+
defaultValue,
|
|
1713
|
+
onChange,
|
|
1714
|
+
inputValue,
|
|
1715
|
+
defaultInputValue,
|
|
1716
|
+
onInputChange,
|
|
1717
|
+
dropdownClassName,
|
|
1718
|
+
listboxClassName,
|
|
1719
|
+
placeholder = "Search\u2026",
|
|
1720
|
+
onKeyDown,
|
|
1721
|
+
onFocus,
|
|
1722
|
+
onBlur,
|
|
1723
|
+
id,
|
|
1724
|
+
...inputProps
|
|
1725
|
+
} = props;
|
|
1726
|
+
const isValueControlled = value !== void 0;
|
|
1727
|
+
const [internalValue, setInternalValue] = React23.useState(
|
|
1728
|
+
defaultValue ?? ""
|
|
1729
|
+
);
|
|
1730
|
+
const isInputControlled = inputValue !== void 0;
|
|
1731
|
+
const [internalInputValue, setInternalInputValue] = React23.useState(
|
|
1732
|
+
defaultInputValue ?? ""
|
|
1733
|
+
);
|
|
1734
|
+
const [isFocused, setIsFocused] = React23.useState(false);
|
|
1735
|
+
const [activeIndex, setActiveIndex] = React23.useState(-1);
|
|
1736
|
+
const inputRef = React23.useRef(null);
|
|
1737
|
+
const baseId = React23.useId();
|
|
1738
|
+
const inputId = id ?? baseId;
|
|
1739
|
+
const listboxId = `${inputId}-listbox`;
|
|
1740
|
+
const currentValue = (isValueControlled ? value : internalValue) ?? "";
|
|
1741
|
+
const currentInput = (isInputControlled ? inputValue : internalInputValue) ?? "";
|
|
1742
|
+
React23.useEffect(() => {
|
|
1743
|
+
if (isFocused) return;
|
|
1744
|
+
if (isInputControlled) return;
|
|
1745
|
+
if (!isValueControlled) return;
|
|
1746
|
+
setInternalInputValue(currentValue);
|
|
1747
|
+
}, [currentValue, isFocused, isInputControlled, isValueControlled]);
|
|
1748
|
+
const showDropdown = isFocused && (loading || options.length > 0 || currentInput.trim().length > 0);
|
|
1749
|
+
const setInputText = (next) => {
|
|
1750
|
+
if (!isInputControlled) {
|
|
1751
|
+
setInternalInputValue(next);
|
|
1752
|
+
}
|
|
1753
|
+
onInputChange?.(next);
|
|
1754
|
+
};
|
|
1755
|
+
const commitValue = (next) => {
|
|
1756
|
+
if (!isValueControlled) {
|
|
1757
|
+
setInternalValue(next);
|
|
1758
|
+
}
|
|
1759
|
+
onChange?.(next);
|
|
1760
|
+
setInputText(next);
|
|
1761
|
+
setActiveIndex(-1);
|
|
1762
|
+
};
|
|
1763
|
+
const handleContainerClick = () => {
|
|
1764
|
+
if (disabled) return;
|
|
1765
|
+
inputRef.current?.focus();
|
|
1766
|
+
};
|
|
1767
|
+
const handleInputChange = (event) => {
|
|
1768
|
+
const next = event.target.value;
|
|
1769
|
+
setInputText(next);
|
|
1770
|
+
setActiveIndex(-1);
|
|
1771
|
+
};
|
|
1772
|
+
const handleFocus = (event) => {
|
|
1773
|
+
setIsFocused(true);
|
|
1774
|
+
onFocus?.(event);
|
|
1775
|
+
};
|
|
1776
|
+
const handleBlur = (event) => {
|
|
1777
|
+
setIsFocused(false);
|
|
1778
|
+
setActiveIndex(-1);
|
|
1779
|
+
onBlur?.(event);
|
|
1780
|
+
};
|
|
1781
|
+
const handleKeyDown = (event) => {
|
|
1782
|
+
onKeyDown?.(event);
|
|
1783
|
+
if (event.defaultPrevented) return;
|
|
1784
|
+
if (!showDropdown && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
1785
|
+
setIsFocused(true);
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
switch (event.key) {
|
|
1789
|
+
case "ArrowDown": {
|
|
1790
|
+
event.preventDefault();
|
|
1791
|
+
setActiveIndex((prev) => {
|
|
1792
|
+
if (options.length === 0) return -1;
|
|
1793
|
+
const next = prev < 0 ? 0 : Math.min(prev + 1, options.length - 1);
|
|
1794
|
+
return next;
|
|
1795
|
+
});
|
|
1796
|
+
break;
|
|
1797
|
+
}
|
|
1798
|
+
case "ArrowUp": {
|
|
1799
|
+
event.preventDefault();
|
|
1800
|
+
setActiveIndex((prev) => {
|
|
1801
|
+
if (options.length === 0) return -1;
|
|
1802
|
+
const next = prev <= 0 ? 0 : prev - 1;
|
|
1803
|
+
return next;
|
|
1804
|
+
});
|
|
1805
|
+
break;
|
|
1806
|
+
}
|
|
1807
|
+
case "Enter": {
|
|
1808
|
+
if (activeIndex >= 0 && activeIndex < options.length) {
|
|
1809
|
+
event.preventDefault();
|
|
1810
|
+
commitValue(options[activeIndex]);
|
|
1811
|
+
setIsFocused(false);
|
|
1812
|
+
}
|
|
1813
|
+
break;
|
|
1814
|
+
}
|
|
1815
|
+
case "Escape": {
|
|
1816
|
+
event.preventDefault();
|
|
1817
|
+
setIsFocused(false);
|
|
1818
|
+
setActiveIndex(-1);
|
|
1819
|
+
break;
|
|
1820
|
+
}
|
|
1821
|
+
default:
|
|
1822
|
+
break;
|
|
1823
|
+
}
|
|
1824
|
+
};
|
|
1825
|
+
const handleOptionMouseDown = (event) => {
|
|
1826
|
+
event.preventDefault();
|
|
1827
|
+
};
|
|
1828
|
+
const handleOptionClick = (option) => {
|
|
1829
|
+
commitValue(option);
|
|
1830
|
+
setIsFocused(false);
|
|
1831
|
+
};
|
|
1832
|
+
const activeDescendantId = activeIndex >= 0 ? `${inputId}-option-${activeIndex}` : void 0;
|
|
1833
|
+
const showLeadingIcon = !!leadingIcon;
|
|
1834
|
+
const showTrailingIcon = !!trailingIcon;
|
|
1835
|
+
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: [
|
|
1836
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1837
|
+
InputShell,
|
|
1838
|
+
{
|
|
1839
|
+
size,
|
|
1840
|
+
status,
|
|
1841
|
+
disabled,
|
|
1842
|
+
className,
|
|
1843
|
+
onClick: handleContainerClick,
|
|
1844
|
+
children: [
|
|
1845
|
+
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: cn(iconWrapperVariants({ size, disabled: !!disabled })), children: leadingIcon }),
|
|
1846
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1847
|
+
Input,
|
|
1848
|
+
{
|
|
1849
|
+
ref: inputRef,
|
|
1850
|
+
id: inputId,
|
|
1851
|
+
type: "text",
|
|
1852
|
+
disabled: disabled ?? void 0,
|
|
1853
|
+
placeholder,
|
|
1854
|
+
value: currentInput,
|
|
1855
|
+
onChange: handleInputChange,
|
|
1856
|
+
onFocus: handleFocus,
|
|
1857
|
+
onBlur: handleBlur,
|
|
1858
|
+
onKeyDown: handleKeyDown,
|
|
1859
|
+
role: "combobox",
|
|
1860
|
+
"aria-autocomplete": "list",
|
|
1861
|
+
"aria-controls": listboxId,
|
|
1862
|
+
"aria-expanded": showDropdown,
|
|
1863
|
+
"aria-activedescendant": activeDescendantId,
|
|
1864
|
+
variant: "bare",
|
|
1865
|
+
className: cn(inputTextVariants({ size }), "bg-transparent outline-none w-full"),
|
|
1866
|
+
...inputProps
|
|
1867
|
+
}
|
|
1868
|
+
),
|
|
1869
|
+
showTrailingIcon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: cn(iconWrapperVariants({ size, disabled: !!disabled })), children: trailingIcon })
|
|
1870
|
+
]
|
|
1871
|
+
}
|
|
1872
|
+
),
|
|
1873
|
+
showDropdown && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1874
|
+
"div",
|
|
1875
|
+
{
|
|
1876
|
+
className: cn(
|
|
1877
|
+
"absolute left-0 right-0 mt-1",
|
|
1878
|
+
dropdownSurfaceClass,
|
|
1879
|
+
dropdownScrollClass,
|
|
1880
|
+
dropdownClassName
|
|
1881
|
+
),
|
|
1882
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1883
|
+
"div",
|
|
1884
|
+
{
|
|
1885
|
+
className: cn(optionVariants({ size }), "px-(--space-8) pr-(--space-16) text-secondary"),
|
|
1886
|
+
"aria-live": "polite",
|
|
1887
|
+
children: loadingText
|
|
1888
|
+
}
|
|
1889
|
+
) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1890
|
+
"div",
|
|
1891
|
+
{
|
|
1892
|
+
className: cn(optionVariants({ size }), "px-(--space-8) pr-(--space-16) text-secondary"),
|
|
1893
|
+
"aria-live": "polite",
|
|
1894
|
+
children: noOptionsText
|
|
1895
|
+
}
|
|
1896
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1897
|
+
"ul",
|
|
1898
|
+
{
|
|
1899
|
+
id: listboxId,
|
|
1900
|
+
role: "listbox",
|
|
1901
|
+
className: cn("flex flex-col", listboxClassName),
|
|
1902
|
+
children: options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1903
|
+
"li",
|
|
1904
|
+
{
|
|
1905
|
+
id: `${inputId}-option-${index}`,
|
|
1906
|
+
role: "option",
|
|
1907
|
+
"aria-selected": index === activeIndex,
|
|
1908
|
+
className: cn(
|
|
1909
|
+
optionVariants({ size, active: index === activeIndex }),
|
|
1910
|
+
"px-(--space-8) pr-(--space-16) text-primary cursor-pointer"
|
|
1911
|
+
),
|
|
1912
|
+
onMouseDown: handleOptionMouseDown,
|
|
1913
|
+
onMouseEnter: () => setActiveIndex(index),
|
|
1914
|
+
onClick: () => handleOptionClick(option),
|
|
1915
|
+
children: option
|
|
1916
|
+
},
|
|
1917
|
+
`${option}-${index}`
|
|
1918
|
+
))
|
|
1919
|
+
}
|
|
1920
|
+
)
|
|
1921
|
+
}
|
|
1922
|
+
)
|
|
1923
|
+
] }) });
|
|
1924
|
+
};
|
|
1925
|
+
Autocomplete.displayName = "Autocomplete";
|
|
1228
1926
|
|
|
1229
1927
|
// src/components/Inputs/Select.tsx
|
|
1230
|
-
var
|
|
1928
|
+
var React24 = __toESM(require("react"), 1);
|
|
1231
1929
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
1232
|
-
var
|
|
1233
|
-
var
|
|
1234
|
-
var
|
|
1235
|
-
var selectTriggerVariants = (0,
|
|
1930
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
1931
|
+
var import_icons8 = require("@bubo-squared/icons");
|
|
1932
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1933
|
+
var selectTriggerVariants = (0, import_class_variance_authority15.cva)(
|
|
1236
1934
|
"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
1935
|
{
|
|
1238
1936
|
variants: {
|
|
@@ -1254,7 +1952,7 @@ var selectTriggerVariants = (0, import_class_variance_authority12.cva)(
|
|
|
1254
1952
|
}
|
|
1255
1953
|
}
|
|
1256
1954
|
);
|
|
1257
|
-
var textVariants = (0,
|
|
1955
|
+
var textVariants = (0, import_class_variance_authority15.cva)("truncate", {
|
|
1258
1956
|
variants: {
|
|
1259
1957
|
size: {
|
|
1260
1958
|
sm: "paragraph-md",
|
|
@@ -1275,7 +1973,7 @@ var textVariants = (0, import_class_variance_authority12.cva)("truncate", {
|
|
|
1275
1973
|
hasValue: false
|
|
1276
1974
|
}
|
|
1277
1975
|
});
|
|
1278
|
-
var selectIconVariants = (0,
|
|
1976
|
+
var selectIconVariants = (0, import_class_variance_authority15.cva)("flex items-center justify-center shrink-0", {
|
|
1279
1977
|
variants: {
|
|
1280
1978
|
size: {
|
|
1281
1979
|
sm: "size-4",
|
|
@@ -1293,7 +1991,7 @@ var selectIconVariants = (0, import_class_variance_authority12.cva)("flex items-
|
|
|
1293
1991
|
disabled: false
|
|
1294
1992
|
}
|
|
1295
1993
|
});
|
|
1296
|
-
var selectButtonVariants = (0,
|
|
1994
|
+
var selectButtonVariants = (0, import_class_variance_authority15.cva)(
|
|
1297
1995
|
"flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left paragraph-lg text-primary hover:bg-(--background-secondary)",
|
|
1298
1996
|
{
|
|
1299
1997
|
variants: {
|
|
@@ -1327,10 +2025,10 @@ var Select = (props) => {
|
|
|
1327
2025
|
} = props;
|
|
1328
2026
|
const isControlled = value !== void 0;
|
|
1329
2027
|
const controlledValue = value ?? "";
|
|
1330
|
-
const [internalValue, setInternalValue] =
|
|
2028
|
+
const [internalValue, setInternalValue] = React24.useState(
|
|
1331
2029
|
defaultValue ?? ""
|
|
1332
2030
|
);
|
|
1333
|
-
const [open, setOpen] =
|
|
2031
|
+
const [open, setOpen] = React24.useState(false);
|
|
1334
2032
|
const rawValue = isControlled ? controlledValue : internalValue;
|
|
1335
2033
|
const selectedOption = options.find((opt) => opt.value === rawValue);
|
|
1336
2034
|
const currentValue = selectedOption ? selectedOption.value : "";
|
|
@@ -1359,7 +2057,7 @@ var Select = (props) => {
|
|
|
1359
2057
|
setOpen(false);
|
|
1360
2058
|
}
|
|
1361
2059
|
};
|
|
1362
|
-
return /* @__PURE__ */ (0,
|
|
2060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1363
2061
|
Field,
|
|
1364
2062
|
{
|
|
1365
2063
|
label,
|
|
@@ -1367,7 +2065,7 @@ var Select = (props) => {
|
|
|
1367
2065
|
hideHint,
|
|
1368
2066
|
status,
|
|
1369
2067
|
disabled,
|
|
1370
|
-
children: /* @__PURE__ */ (0,
|
|
2068
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1371
2069
|
SelectPrimitive.Root,
|
|
1372
2070
|
{
|
|
1373
2071
|
value: currentValue,
|
|
@@ -1378,7 +2076,7 @@ var Select = (props) => {
|
|
|
1378
2076
|
name,
|
|
1379
2077
|
required,
|
|
1380
2078
|
children: [
|
|
1381
|
-
/* @__PURE__ */ (0,
|
|
2079
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1382
2080
|
"button",
|
|
1383
2081
|
{
|
|
1384
2082
|
type: "button",
|
|
@@ -1398,30 +2096,31 @@ var Select = (props) => {
|
|
|
1398
2096
|
"data-open": isOpen || void 0,
|
|
1399
2097
|
...buttonProps,
|
|
1400
2098
|
children: [
|
|
1401
|
-
/* @__PURE__ */ (0,
|
|
1402
|
-
/* @__PURE__ */ (0,
|
|
2099
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Value, { placeholder }),
|
|
2100
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1403
2101
|
"span",
|
|
1404
2102
|
{
|
|
1405
2103
|
className: cn(selectIconVariants({ size, disabled: !!disabled })),
|
|
1406
|
-
children: /* @__PURE__ */ (0,
|
|
2104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_icons8.ChevronDownIcon, {})
|
|
1407
2105
|
}
|
|
1408
2106
|
) })
|
|
1409
2107
|
]
|
|
1410
2108
|
}
|
|
1411
2109
|
) }),
|
|
1412
|
-
/* @__PURE__ */ (0,
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1413
2111
|
SelectPrimitive.Content,
|
|
1414
2112
|
{
|
|
1415
2113
|
position: "popper",
|
|
1416
2114
|
align: "start",
|
|
1417
2115
|
sideOffset: 4,
|
|
1418
2116
|
className: cn(
|
|
1419
|
-
|
|
2117
|
+
dropdownSurfaceClass,
|
|
2118
|
+
dropdownScrollClass,
|
|
1420
2119
|
"min-w-343"
|
|
1421
2120
|
),
|
|
1422
2121
|
style: { minWidth: "var(--radix-select-trigger-width)" },
|
|
1423
|
-
children: /* @__PURE__ */ (0,
|
|
1424
|
-
hasValue && /* @__PURE__ */ (0,
|
|
2122
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.Viewport, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col", children: [
|
|
2123
|
+
hasValue && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: cn("bg-(--background-neutral)"), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1425
2124
|
"button",
|
|
1426
2125
|
{
|
|
1427
2126
|
type: "button",
|
|
@@ -1433,16 +2132,16 @@ var Select = (props) => {
|
|
|
1433
2132
|
children: "Clear"
|
|
1434
2133
|
}
|
|
1435
2134
|
) }),
|
|
1436
|
-
options.map((opt) => /* @__PURE__ */ (0,
|
|
2135
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1437
2136
|
SelectPrimitive.Item,
|
|
1438
2137
|
{
|
|
1439
2138
|
value: opt.value,
|
|
1440
2139
|
className: cn(
|
|
1441
|
-
"bg-(--background-neutral)
|
|
1442
|
-
"data-highlighted:bg-(--background-secondary) data-highlighted:
|
|
2140
|
+
"bg-(--background-neutral)",
|
|
2141
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:outline-none",
|
|
1443
2142
|
"data-[state=checked]:bg-(--background-secondary)"
|
|
1444
2143
|
),
|
|
1445
|
-
children: /* @__PURE__ */ (0,
|
|
2144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: selectButtonVariants({ size }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectPrimitive.ItemText, { children: opt.label }) })
|
|
1446
2145
|
},
|
|
1447
2146
|
opt.value
|
|
1448
2147
|
))
|
|
@@ -1458,86 +2157,11 @@ var Select = (props) => {
|
|
|
1458
2157
|
Select.displayName = "Select";
|
|
1459
2158
|
|
|
1460
2159
|
// 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", {
|
|
2160
|
+
var React25 = __toESM(require("react"), 1);
|
|
2161
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
2162
|
+
var import_icons9 = require("@bubo-squared/icons");
|
|
2163
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2164
|
+
var passwordTextVariants = (0, import_class_variance_authority16.cva)("truncate", {
|
|
1541
2165
|
variants: {
|
|
1542
2166
|
size: {
|
|
1543
2167
|
sm: "paragraph-md",
|
|
@@ -1555,7 +2179,7 @@ var passwordTextVariants = (0, import_class_variance_authority14.cva)("truncate"
|
|
|
1555
2179
|
disabled: false
|
|
1556
2180
|
}
|
|
1557
2181
|
});
|
|
1558
|
-
var
|
|
2182
|
+
var iconWrapperVariants2 = (0, import_class_variance_authority16.cva)(
|
|
1559
2183
|
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
1560
2184
|
{
|
|
1561
2185
|
variants: {
|
|
@@ -1574,7 +2198,7 @@ var iconWrapperVariants = (0, import_class_variance_authority14.cva)(
|
|
|
1574
2198
|
}
|
|
1575
2199
|
}
|
|
1576
2200
|
);
|
|
1577
|
-
var actionButtonVariants = (0,
|
|
2201
|
+
var actionButtonVariants = (0, import_class_variance_authority16.cva)(
|
|
1578
2202
|
"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
2203
|
{
|
|
1580
2204
|
variants: {
|
|
@@ -1611,12 +2235,12 @@ var PasswordInput = (props) => {
|
|
|
1611
2235
|
...inputProps
|
|
1612
2236
|
} = props;
|
|
1613
2237
|
const isControlled = value !== void 0;
|
|
1614
|
-
const [internalValue, setInternalValue] =
|
|
2238
|
+
const [internalValue, setInternalValue] = React25.useState(
|
|
1615
2239
|
defaultValue ?? ""
|
|
1616
2240
|
);
|
|
1617
|
-
const [isRevealed, setIsRevealed] =
|
|
2241
|
+
const [isRevealed, setIsRevealed] = React25.useState(false);
|
|
1618
2242
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
1619
|
-
const inputRef =
|
|
2243
|
+
const inputRef = React25.useRef(null);
|
|
1620
2244
|
const showLeadingIcon = !!leadingIcon;
|
|
1621
2245
|
const handleContainerClick = () => {
|
|
1622
2246
|
if (disabled) return;
|
|
@@ -1628,7 +2252,7 @@ var PasswordInput = (props) => {
|
|
|
1628
2252
|
}
|
|
1629
2253
|
onChange?.(event);
|
|
1630
2254
|
};
|
|
1631
|
-
return /* @__PURE__ */ (0,
|
|
2255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1632
2256
|
Field,
|
|
1633
2257
|
{
|
|
1634
2258
|
label,
|
|
@@ -1636,7 +2260,7 @@ var PasswordInput = (props) => {
|
|
|
1636
2260
|
hideHint,
|
|
1637
2261
|
status,
|
|
1638
2262
|
disabled,
|
|
1639
|
-
children: /* @__PURE__ */ (0,
|
|
2263
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1640
2264
|
InputShell,
|
|
1641
2265
|
{
|
|
1642
2266
|
size,
|
|
@@ -1645,16 +2269,16 @@ var PasswordInput = (props) => {
|
|
|
1645
2269
|
className,
|
|
1646
2270
|
onClick: handleContainerClick,
|
|
1647
2271
|
children: [
|
|
1648
|
-
showLeadingIcon && /* @__PURE__ */ (0,
|
|
2272
|
+
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1649
2273
|
"span",
|
|
1650
2274
|
{
|
|
1651
2275
|
className: cn(
|
|
1652
|
-
|
|
2276
|
+
iconWrapperVariants2({ size, disabled: !!disabled })
|
|
1653
2277
|
),
|
|
1654
2278
|
children: leadingIcon
|
|
1655
2279
|
}
|
|
1656
2280
|
),
|
|
1657
|
-
/* @__PURE__ */ (0,
|
|
2281
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1658
2282
|
Input,
|
|
1659
2283
|
{
|
|
1660
2284
|
ref: inputRef,
|
|
@@ -1669,7 +2293,7 @@ var PasswordInput = (props) => {
|
|
|
1669
2293
|
...inputProps
|
|
1670
2294
|
}
|
|
1671
2295
|
),
|
|
1672
|
-
/* @__PURE__ */ (0,
|
|
2296
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1673
2297
|
"button",
|
|
1674
2298
|
{
|
|
1675
2299
|
type: "button",
|
|
@@ -1682,9 +2306,9 @@ var PasswordInput = (props) => {
|
|
|
1682
2306
|
"aria-label": isRevealed ? "Hide password" : "Show password",
|
|
1683
2307
|
className: cn(
|
|
1684
2308
|
"cursor-pointer",
|
|
1685
|
-
variant === "text" ? actionButtonVariants({ size, disabled: !!disabled }) :
|
|
2309
|
+
variant === "text" ? actionButtonVariants({ size, disabled: !!disabled }) : iconWrapperVariants2({ size, disabled: !!disabled })
|
|
1686
2310
|
),
|
|
1687
|
-
children: variant === "icon" ? isRevealed ? /* @__PURE__ */ (0,
|
|
2311
|
+
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
2312
|
}
|
|
1689
2313
|
)
|
|
1690
2314
|
]
|
|
@@ -1696,17 +2320,17 @@ var PasswordInput = (props) => {
|
|
|
1696
2320
|
PasswordInput.displayName = "PasswordInput";
|
|
1697
2321
|
|
|
1698
2322
|
// src/components/Inputs/PhoneInput.tsx
|
|
1699
|
-
var
|
|
1700
|
-
var
|
|
2323
|
+
var React31 = __toESM(require("react"), 1);
|
|
2324
|
+
var import_icons11 = require("@bubo-squared/icons");
|
|
1701
2325
|
var RPNInput = __toESM(require("react-phone-number-input"), 1);
|
|
1702
2326
|
var import_flags = __toESM(require("react-phone-number-input/flags"), 1);
|
|
1703
2327
|
|
|
1704
2328
|
// src/components/ui/button.tsx
|
|
1705
|
-
var
|
|
2329
|
+
var React26 = require("react");
|
|
1706
2330
|
var import_react_slot7 = require("@radix-ui/react-slot");
|
|
1707
|
-
var
|
|
1708
|
-
var
|
|
1709
|
-
var buttonVariants2 = (0,
|
|
2331
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
2332
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2333
|
+
var buttonVariants2 = (0, import_class_variance_authority17.cva)(
|
|
1710
2334
|
"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
2335
|
{
|
|
1712
2336
|
variants: {
|
|
@@ -1741,7 +2365,7 @@ function Button2({
|
|
|
1741
2365
|
...props
|
|
1742
2366
|
}) {
|
|
1743
2367
|
const Comp = asChild ? import_react_slot7.Slot : "button";
|
|
1744
|
-
return /* @__PURE__ */ (0,
|
|
2368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1745
2369
|
Comp,
|
|
1746
2370
|
{
|
|
1747
2371
|
"data-slot": "button",
|
|
@@ -1754,12 +2378,12 @@ function Button2({
|
|
|
1754
2378
|
}
|
|
1755
2379
|
|
|
1756
2380
|
// src/components/ui/command.tsx
|
|
1757
|
-
var
|
|
2381
|
+
var React28 = require("react");
|
|
1758
2382
|
var import_cmdk = require("cmdk");
|
|
1759
|
-
var
|
|
2383
|
+
var import_icons10 = require("@bubo-squared/icons");
|
|
1760
2384
|
|
|
1761
2385
|
// src/components/ui/dialog.tsx
|
|
1762
|
-
var
|
|
2386
|
+
var React27 = require("react");
|
|
1763
2387
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1764
2388
|
|
|
1765
2389
|
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
@@ -1864,15 +2488,15 @@ var __iconNode2 = [
|
|
|
1864
2488
|
var Ellipsis = createLucideIcon("ellipsis", __iconNode2);
|
|
1865
2489
|
|
|
1866
2490
|
// src/components/ui/dialog.tsx
|
|
1867
|
-
var
|
|
2491
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1868
2492
|
|
|
1869
2493
|
// src/components/ui/command.tsx
|
|
1870
|
-
var
|
|
2494
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1871
2495
|
function Command({
|
|
1872
2496
|
className,
|
|
1873
2497
|
...props
|
|
1874
2498
|
}) {
|
|
1875
|
-
return /* @__PURE__ */ (0,
|
|
2499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1876
2500
|
import_cmdk.Command,
|
|
1877
2501
|
{
|
|
1878
2502
|
"data-slot": "command",
|
|
@@ -1888,14 +2512,14 @@ function CommandInput({
|
|
|
1888
2512
|
className,
|
|
1889
2513
|
...props
|
|
1890
2514
|
}) {
|
|
1891
|
-
return /* @__PURE__ */ (0,
|
|
2515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1892
2516
|
"div",
|
|
1893
2517
|
{
|
|
1894
2518
|
"data-slot": "command-input-wrapper",
|
|
1895
2519
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1896
2520
|
children: [
|
|
1897
|
-
/* @__PURE__ */ (0,
|
|
1898
|
-
/* @__PURE__ */ (0,
|
|
2521
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons10.SearchIcon, { className: "size-4 shrink-0 opacity-50 text-(--color-secondary)" }),
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1899
2523
|
import_cmdk.Command.Input,
|
|
1900
2524
|
{
|
|
1901
2525
|
"data-slot": "command-input",
|
|
@@ -1914,7 +2538,7 @@ function CommandList({
|
|
|
1914
2538
|
className,
|
|
1915
2539
|
...props
|
|
1916
2540
|
}) {
|
|
1917
|
-
return /* @__PURE__ */ (0,
|
|
2541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1918
2542
|
import_cmdk.Command.List,
|
|
1919
2543
|
{
|
|
1920
2544
|
"data-slot": "command-list",
|
|
@@ -1929,7 +2553,7 @@ function CommandList({
|
|
|
1929
2553
|
function CommandEmpty({
|
|
1930
2554
|
...props
|
|
1931
2555
|
}) {
|
|
1932
|
-
return /* @__PURE__ */ (0,
|
|
2556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1933
2557
|
import_cmdk.Command.Empty,
|
|
1934
2558
|
{
|
|
1935
2559
|
"data-slot": "command-empty",
|
|
@@ -1942,7 +2566,7 @@ function CommandGroup({
|
|
|
1942
2566
|
className,
|
|
1943
2567
|
...props
|
|
1944
2568
|
}) {
|
|
1945
|
-
return /* @__PURE__ */ (0,
|
|
2569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1946
2570
|
import_cmdk.Command.Group,
|
|
1947
2571
|
{
|
|
1948
2572
|
"data-slot": "command-group",
|
|
@@ -1958,7 +2582,7 @@ function CommandItem({
|
|
|
1958
2582
|
className,
|
|
1959
2583
|
...props
|
|
1960
2584
|
}) {
|
|
1961
|
-
return /* @__PURE__ */ (0,
|
|
2585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1962
2586
|
import_cmdk.Command.Item,
|
|
1963
2587
|
{
|
|
1964
2588
|
"data-slot": "command-item",
|
|
@@ -1972,18 +2596,18 @@ function CommandItem({
|
|
|
1972
2596
|
}
|
|
1973
2597
|
|
|
1974
2598
|
// src/components/ui/popover.tsx
|
|
1975
|
-
var
|
|
2599
|
+
var React29 = require("react");
|
|
1976
2600
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1977
|
-
var
|
|
2601
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1978
2602
|
function Popover({
|
|
1979
2603
|
...props
|
|
1980
2604
|
}) {
|
|
1981
|
-
return /* @__PURE__ */ (0,
|
|
2605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1982
2606
|
}
|
|
1983
2607
|
function PopoverTrigger({
|
|
1984
2608
|
...props
|
|
1985
2609
|
}) {
|
|
1986
|
-
return /* @__PURE__ */ (0,
|
|
2610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1987
2611
|
}
|
|
1988
2612
|
function PopoverContent({
|
|
1989
2613
|
className,
|
|
@@ -1991,7 +2615,7 @@ function PopoverContent({
|
|
|
1991
2615
|
sideOffset = 4,
|
|
1992
2616
|
...props
|
|
1993
2617
|
}) {
|
|
1994
|
-
return /* @__PURE__ */ (0,
|
|
2618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1995
2619
|
PopoverPrimitive.Content,
|
|
1996
2620
|
{
|
|
1997
2621
|
"data-slot": "popover-content",
|
|
@@ -2007,22 +2631,22 @@ function PopoverContent({
|
|
|
2007
2631
|
}
|
|
2008
2632
|
|
|
2009
2633
|
// src/components/ui/scroll-area.tsx
|
|
2010
|
-
var
|
|
2634
|
+
var React30 = require("react");
|
|
2011
2635
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
2012
|
-
var
|
|
2636
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2013
2637
|
function ScrollArea({
|
|
2014
2638
|
className,
|
|
2015
2639
|
children,
|
|
2016
2640
|
...props
|
|
2017
2641
|
}) {
|
|
2018
|
-
return /* @__PURE__ */ (0,
|
|
2642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2019
2643
|
ScrollAreaPrimitive.Root,
|
|
2020
2644
|
{
|
|
2021
2645
|
"data-slot": "scroll-area",
|
|
2022
2646
|
className: cn("relative", className),
|
|
2023
2647
|
...props,
|
|
2024
2648
|
children: [
|
|
2025
|
-
/* @__PURE__ */ (0,
|
|
2649
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2026
2650
|
ScrollAreaPrimitive.Viewport,
|
|
2027
2651
|
{
|
|
2028
2652
|
"data-slot": "scroll-area-viewport",
|
|
@@ -2030,8 +2654,8 @@ function ScrollArea({
|
|
|
2030
2654
|
children
|
|
2031
2655
|
}
|
|
2032
2656
|
),
|
|
2033
|
-
/* @__PURE__ */ (0,
|
|
2034
|
-
/* @__PURE__ */ (0,
|
|
2657
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ScrollBar, {}),
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
2035
2659
|
]
|
|
2036
2660
|
}
|
|
2037
2661
|
);
|
|
@@ -2041,7 +2665,7 @@ function ScrollBar({
|
|
|
2041
2665
|
orientation = "vertical",
|
|
2042
2666
|
...props
|
|
2043
2667
|
}) {
|
|
2044
|
-
return /* @__PURE__ */ (0,
|
|
2668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2045
2669
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2046
2670
|
{
|
|
2047
2671
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -2054,7 +2678,7 @@ function ScrollBar({
|
|
|
2054
2678
|
className
|
|
2055
2679
|
),
|
|
2056
2680
|
...props,
|
|
2057
|
-
children: /* @__PURE__ */ (0,
|
|
2681
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2058
2682
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2059
2683
|
{
|
|
2060
2684
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2066,10 +2690,10 @@ function ScrollBar({
|
|
|
2066
2690
|
}
|
|
2067
2691
|
|
|
2068
2692
|
// src/components/Inputs/PhoneInput.tsx
|
|
2069
|
-
var
|
|
2070
|
-
var
|
|
2693
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
2694
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2071
2695
|
var inputBase = "h-full rounded-4 border-(--border-secondary) bg-(--background-primary) hover:border-(--border-secondary-hover)";
|
|
2072
|
-
var sizeBase = (0,
|
|
2696
|
+
var sizeBase = (0, import_class_variance_authority18.cva)(
|
|
2073
2697
|
"flex w-full",
|
|
2074
2698
|
{
|
|
2075
2699
|
variants: {
|
|
@@ -2082,7 +2706,7 @@ var sizeBase = (0, import_class_variance_authority16.cva)(
|
|
|
2082
2706
|
}
|
|
2083
2707
|
}
|
|
2084
2708
|
);
|
|
2085
|
-
var
|
|
2709
|
+
var inputTextVariants2 = (0, import_class_variance_authority18.cva)("", {
|
|
2086
2710
|
variants: {
|
|
2087
2711
|
size: {
|
|
2088
2712
|
sm: "paragraph-md",
|
|
@@ -2098,12 +2722,41 @@ var inputTextVariants = (0, import_class_variance_authority16.cva)("", {
|
|
|
2098
2722
|
size: "lg"
|
|
2099
2723
|
}
|
|
2100
2724
|
});
|
|
2725
|
+
var dropdownWidthVariants = (0, import_class_variance_authority18.cva)("", {
|
|
2726
|
+
variants: {
|
|
2727
|
+
size: {
|
|
2728
|
+
sm: "min-w-70",
|
|
2729
|
+
md: "min-w-72",
|
|
2730
|
+
lg: "min-w-80",
|
|
2731
|
+
xl: "min-w-96"
|
|
2732
|
+
}
|
|
2733
|
+
},
|
|
2734
|
+
defaultVariants: {
|
|
2735
|
+
size: "lg"
|
|
2736
|
+
}
|
|
2737
|
+
});
|
|
2101
2738
|
var wrapperStatusClass = {
|
|
2102
2739
|
default: "input-default-nested",
|
|
2103
2740
|
success: "input-success-nested",
|
|
2104
2741
|
error: "input-error-nested"
|
|
2105
2742
|
};
|
|
2106
|
-
var
|
|
2743
|
+
var countryOptionVariants = (0, import_class_variance_authority18.cva)(
|
|
2744
|
+
"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",
|
|
2745
|
+
{
|
|
2746
|
+
variants: {
|
|
2747
|
+
size: {
|
|
2748
|
+
sm: "paragraph-sm py-(--space-4)",
|
|
2749
|
+
md: "paragraph-md py-(--space-6)",
|
|
2750
|
+
lg: "paragraph-lg py-(--space-8)",
|
|
2751
|
+
xl: "subtitle py-(--space-10)"
|
|
2752
|
+
}
|
|
2753
|
+
},
|
|
2754
|
+
defaultVariants: {
|
|
2755
|
+
size: "lg"
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2758
|
+
);
|
|
2759
|
+
var PhoneInput = React31.forwardRef(
|
|
2107
2760
|
(props, ref) => {
|
|
2108
2761
|
const {
|
|
2109
2762
|
className,
|
|
@@ -2118,7 +2771,7 @@ var PhoneInput = React27.forwardRef(
|
|
|
2118
2771
|
status = "default",
|
|
2119
2772
|
...rest
|
|
2120
2773
|
} = props;
|
|
2121
|
-
return /* @__PURE__ */ (0,
|
|
2774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2122
2775
|
Field,
|
|
2123
2776
|
{
|
|
2124
2777
|
label,
|
|
@@ -2127,16 +2780,16 @@ var PhoneInput = React27.forwardRef(
|
|
|
2127
2780
|
status,
|
|
2128
2781
|
disabled,
|
|
2129
2782
|
className,
|
|
2130
|
-
children: /* @__PURE__ */ (0,
|
|
2783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("w-full", wrapperStatusClass[status]), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2131
2784
|
RPNInput.default,
|
|
2132
2785
|
{
|
|
2133
2786
|
ref,
|
|
2134
2787
|
className: cn(
|
|
2135
2788
|
sizeBase({ size }),
|
|
2136
|
-
|
|
2789
|
+
inputTextVariants2({ size, disabled })
|
|
2137
2790
|
),
|
|
2138
2791
|
flagComponent: FlagComponent,
|
|
2139
|
-
countrySelectComponent: CountrySelect,
|
|
2792
|
+
countrySelectComponent: (countrySelectProps) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CountrySelect, { ...countrySelectProps, size }),
|
|
2140
2793
|
inputComponent: InputComponent,
|
|
2141
2794
|
smartCaret: false,
|
|
2142
2795
|
value: value || void 0,
|
|
@@ -2153,9 +2806,9 @@ var PhoneInput = React27.forwardRef(
|
|
|
2153
2806
|
}
|
|
2154
2807
|
);
|
|
2155
2808
|
PhoneInput.displayName = "PhoneInput";
|
|
2156
|
-
var InputComponent =
|
|
2809
|
+
var InputComponent = React31.forwardRef((props, ref) => {
|
|
2157
2810
|
const { className, ...rest } = props;
|
|
2158
|
-
return /* @__PURE__ */ (0,
|
|
2811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2159
2812
|
Input,
|
|
2160
2813
|
{
|
|
2161
2814
|
ref,
|
|
@@ -2170,12 +2823,13 @@ var CountrySelect = ({
|
|
|
2170
2823
|
disabled,
|
|
2171
2824
|
value: selectedCountry,
|
|
2172
2825
|
options: countryList,
|
|
2173
|
-
onChange
|
|
2826
|
+
onChange,
|
|
2827
|
+
size = "lg"
|
|
2174
2828
|
}) => {
|
|
2175
|
-
const scrollAreaRef =
|
|
2176
|
-
const [searchValue, setSearchValue] =
|
|
2177
|
-
const [isOpen, setIsOpen] =
|
|
2178
|
-
return /* @__PURE__ */ (0,
|
|
2829
|
+
const scrollAreaRef = React31.useRef(null);
|
|
2830
|
+
const [searchValue, setSearchValue] = React31.useState("");
|
|
2831
|
+
const [isOpen, setIsOpen] = React31.useState(false);
|
|
2832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2179
2833
|
Popover,
|
|
2180
2834
|
{
|
|
2181
2835
|
open: isOpen,
|
|
@@ -2187,7 +2841,7 @@ var CountrySelect = ({
|
|
|
2187
2841
|
}
|
|
2188
2842
|
},
|
|
2189
2843
|
children: [
|
|
2190
|
-
/* @__PURE__ */ (0,
|
|
2844
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2191
2845
|
Button2,
|
|
2192
2846
|
{
|
|
2193
2847
|
type: "button",
|
|
@@ -2195,15 +2849,15 @@ var CountrySelect = ({
|
|
|
2195
2849
|
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
2850
|
disabled,
|
|
2197
2851
|
children: [
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2852
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2199
2853
|
FlagComponent,
|
|
2200
2854
|
{
|
|
2201
2855
|
country: selectedCountry,
|
|
2202
2856
|
countryName: selectedCountry
|
|
2203
2857
|
}
|
|
2204
2858
|
),
|
|
2205
|
-
/* @__PURE__ */ (0,
|
|
2206
|
-
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2860
|
+
import_icons11.CodeIcon,
|
|
2207
2861
|
{
|
|
2208
2862
|
className: cn(
|
|
2209
2863
|
"-mr-2 size-4 opacity-50 rotate-90",
|
|
@@ -2214,13 +2868,17 @@ var CountrySelect = ({
|
|
|
2214
2868
|
]
|
|
2215
2869
|
}
|
|
2216
2870
|
) }),
|
|
2217
|
-
/* @__PURE__ */ (0,
|
|
2871
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2218
2872
|
PopoverContent,
|
|
2219
2873
|
{
|
|
2220
2874
|
align: "start",
|
|
2221
|
-
className:
|
|
2222
|
-
|
|
2223
|
-
|
|
2875
|
+
className: cn(
|
|
2876
|
+
"p-0 **:data-[slot='command-input-wrapper']:border-b-(--border-secondary)",
|
|
2877
|
+
dropdownWidthVariants({ size }),
|
|
2878
|
+
dropdownSurfaceClass
|
|
2879
|
+
),
|
|
2880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Command, { className: "bg-transparent", children: [
|
|
2881
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2224
2882
|
CommandInput,
|
|
2225
2883
|
{
|
|
2226
2884
|
value: searchValue,
|
|
@@ -2240,17 +2898,18 @@ var CountrySelect = ({
|
|
|
2240
2898
|
placeholder: "Search country..."
|
|
2241
2899
|
}
|
|
2242
2900
|
),
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2244
|
-
/* @__PURE__ */ (0,
|
|
2245
|
-
/* @__PURE__ */ (0,
|
|
2246
|
-
({ value, label }) => value ? /* @__PURE__ */ (0,
|
|
2901
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandList, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(ScrollArea, { ref: scrollAreaRef, className: "max-h-79", children: [
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandEmpty, { children: "No country found." }),
|
|
2903
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CommandGroup, { className: "p-0", children: countryList.map(
|
|
2904
|
+
({ value, label }) => value ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2247
2905
|
CountrySelectOption,
|
|
2248
2906
|
{
|
|
2249
2907
|
country: value,
|
|
2250
2908
|
countryName: label,
|
|
2251
2909
|
selectedCountry,
|
|
2252
2910
|
onChange,
|
|
2253
|
-
onSelectComplete: () => setIsOpen(false)
|
|
2911
|
+
onSelectComplete: () => setIsOpen(false),
|
|
2912
|
+
size
|
|
2254
2913
|
},
|
|
2255
2914
|
value
|
|
2256
2915
|
) : null
|
|
@@ -2269,23 +2928,24 @@ var CountrySelectOption = (props) => {
|
|
|
2269
2928
|
countryName,
|
|
2270
2929
|
selectedCountry,
|
|
2271
2930
|
onChange,
|
|
2272
|
-
onSelectComplete
|
|
2931
|
+
onSelectComplete,
|
|
2932
|
+
size = "lg"
|
|
2273
2933
|
} = props;
|
|
2274
2934
|
const handleSelect = () => {
|
|
2275
2935
|
onChange(country);
|
|
2276
2936
|
onSelectComplete();
|
|
2277
2937
|
};
|
|
2278
|
-
return /* @__PURE__ */ (0,
|
|
2938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2279
2939
|
CommandItem,
|
|
2280
2940
|
{
|
|
2281
|
-
className:
|
|
2941
|
+
className: cn(countryOptionVariants({ size })),
|
|
2282
2942
|
onSelect: handleSelect,
|
|
2283
2943
|
children: [
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2286
|
-
/* @__PURE__ */ (0,
|
|
2287
|
-
/* @__PURE__ */ (0,
|
|
2288
|
-
|
|
2944
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FlagComponent, { country, countryName }),
|
|
2945
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "flex-1", children: countryName }),
|
|
2946
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-foreground/50", children: `+${RPNInput.getCountryCallingCode(country)}` }),
|
|
2947
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2948
|
+
import_icons11.CheckIcon,
|
|
2289
2949
|
{
|
|
2290
2950
|
className: `ml-auto size-4 ${country === selectedCountry ? "opacity-100" : "opacity-0"}`
|
|
2291
2951
|
}
|
|
@@ -2296,13 +2956,13 @@ var CountrySelectOption = (props) => {
|
|
|
2296
2956
|
};
|
|
2297
2957
|
var FlagComponent = ({ country, countryName }) => {
|
|
2298
2958
|
const Flag = import_flags.default[country];
|
|
2299
|
-
return /* @__PURE__ */ (0,
|
|
2959
|
+
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
2960
|
};
|
|
2301
2961
|
|
|
2302
2962
|
// src/components/Inputs/RadioGroup.tsx
|
|
2303
|
-
var
|
|
2963
|
+
var React32 = __toESM(require("react"), 1);
|
|
2304
2964
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
2305
|
-
var
|
|
2965
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2306
2966
|
var RadioGroup = ({
|
|
2307
2967
|
label,
|
|
2308
2968
|
hint,
|
|
@@ -2316,20 +2976,20 @@ var RadioGroup = ({
|
|
|
2316
2976
|
className,
|
|
2317
2977
|
...rootProps
|
|
2318
2978
|
}) => {
|
|
2319
|
-
const groupId =
|
|
2979
|
+
const groupId = React32.useId();
|
|
2320
2980
|
const hintId = hint ? `${groupId}-hint` : void 0;
|
|
2321
2981
|
const handleValueChange = (next) => {
|
|
2322
2982
|
onValueChange?.(next);
|
|
2323
2983
|
};
|
|
2324
2984
|
const isHorizontal = orientation === "horizontal";
|
|
2325
|
-
return /* @__PURE__ */ (0,
|
|
2985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2326
2986
|
Field,
|
|
2327
2987
|
{
|
|
2328
2988
|
label,
|
|
2329
2989
|
hint,
|
|
2330
2990
|
hideHint,
|
|
2331
2991
|
disabled,
|
|
2332
|
-
children: /* @__PURE__ */ (0,
|
|
2992
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2333
2993
|
RadioGroupPrimitive.Root,
|
|
2334
2994
|
{
|
|
2335
2995
|
...rootProps,
|
|
@@ -2343,7 +3003,7 @@ var RadioGroup = ({
|
|
|
2343
3003
|
isHorizontal ? "flex-row gap-6" : "flex-col gap-2",
|
|
2344
3004
|
className
|
|
2345
3005
|
),
|
|
2346
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
3006
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "relative inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2347
3007
|
RadioGroupPrimitive.Item,
|
|
2348
3008
|
{
|
|
2349
3009
|
value: option.value,
|
|
@@ -2354,7 +3014,7 @@ var RadioGroup = ({
|
|
|
2354
3014
|
disabled || option.disabled ? "cursor-default" : "cursor-pointer"
|
|
2355
3015
|
),
|
|
2356
3016
|
children: [
|
|
2357
|
-
/* @__PURE__ */ (0,
|
|
3017
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2358
3018
|
"span",
|
|
2359
3019
|
{
|
|
2360
3020
|
className: cn(
|
|
@@ -2380,7 +3040,7 @@ var RadioGroup = ({
|
|
|
2380
3040
|
"group-[&[data-disabled][data-state=checked]]:border-(--border-primary-disabled)",
|
|
2381
3041
|
"group-[&[data-disabled][data-state=checked]]:bg-(--background-primary-disabled)"
|
|
2382
3042
|
),
|
|
2383
|
-
children: /* @__PURE__ */ (0,
|
|
3043
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2384
3044
|
"span",
|
|
2385
3045
|
{
|
|
2386
3046
|
className: cn(
|
|
@@ -2395,7 +3055,7 @@ var RadioGroup = ({
|
|
|
2395
3055
|
)
|
|
2396
3056
|
}
|
|
2397
3057
|
),
|
|
2398
|
-
/* @__PURE__ */ (0,
|
|
3058
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2399
3059
|
"span",
|
|
2400
3060
|
{
|
|
2401
3061
|
className: cn(
|
|
@@ -2415,11 +3075,11 @@ var RadioGroup = ({
|
|
|
2415
3075
|
};
|
|
2416
3076
|
|
|
2417
3077
|
// src/components/Inputs/SearchInput.tsx
|
|
2418
|
-
var
|
|
2419
|
-
var
|
|
2420
|
-
var
|
|
2421
|
-
var
|
|
2422
|
-
var searchTextVariants = (0,
|
|
3078
|
+
var React33 = __toESM(require("react"), 1);
|
|
3079
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
3080
|
+
var import_icons12 = require("@bubo-squared/icons");
|
|
3081
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3082
|
+
var searchTextVariants = (0, import_class_variance_authority19.cva)("truncate", {
|
|
2423
3083
|
variants: {
|
|
2424
3084
|
size: {
|
|
2425
3085
|
sm: "paragraph-md",
|
|
@@ -2432,7 +3092,7 @@ var searchTextVariants = (0, import_class_variance_authority17.cva)("truncate",
|
|
|
2432
3092
|
size: "lg"
|
|
2433
3093
|
}
|
|
2434
3094
|
});
|
|
2435
|
-
var
|
|
3095
|
+
var iconWrapperVariants3 = (0, import_class_variance_authority19.cva)("flex items-center justify-center shrink-0 text-(--icon-primary)", {
|
|
2436
3096
|
variants: {
|
|
2437
3097
|
size: {
|
|
2438
3098
|
sm: "size-4 [&>svg]:size-4",
|
|
@@ -2459,13 +3119,13 @@ var SearchInput = (props) => {
|
|
|
2459
3119
|
trailingIcon,
|
|
2460
3120
|
...inputProps
|
|
2461
3121
|
} = props;
|
|
2462
|
-
const inputRef =
|
|
3122
|
+
const inputRef = React33.useRef(null);
|
|
2463
3123
|
const handleContainerClick = () => {
|
|
2464
3124
|
if (disabled) return;
|
|
2465
3125
|
inputRef.current?.focus();
|
|
2466
3126
|
};
|
|
2467
3127
|
const showTrailingIcon = !!trailingIcon;
|
|
2468
|
-
return /* @__PURE__ */ (0,
|
|
3128
|
+
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
3129
|
InputShell,
|
|
2470
3130
|
{
|
|
2471
3131
|
size,
|
|
@@ -2474,31 +3134,118 @@ var SearchInput = (props) => {
|
|
|
2474
3134
|
className,
|
|
2475
3135
|
onClick: handleContainerClick,
|
|
2476
3136
|
children: [
|
|
2477
|
-
showLeadingIcon && /* @__PURE__ */ (0,
|
|
2478
|
-
/* @__PURE__ */ (0,
|
|
2479
|
-
Input,
|
|
3137
|
+
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, {}) }),
|
|
3138
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3139
|
+
Input,
|
|
3140
|
+
{
|
|
3141
|
+
ref: inputRef,
|
|
3142
|
+
type: "search",
|
|
3143
|
+
placeholder,
|
|
3144
|
+
disabled: disabled ?? void 0,
|
|
3145
|
+
variant: "bare",
|
|
3146
|
+
className: cn(
|
|
3147
|
+
searchTextVariants({ size })
|
|
3148
|
+
),
|
|
3149
|
+
...inputProps
|
|
3150
|
+
}
|
|
3151
|
+
),
|
|
3152
|
+
showTrailingIcon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn("cursor-pointer", iconWrapperVariants3({ size, disabled: !!disabled })), children: trailingIcon })
|
|
3153
|
+
]
|
|
3154
|
+
}
|
|
3155
|
+
) }) });
|
|
3156
|
+
};
|
|
3157
|
+
SearchInput.displayName = "SearchInput";
|
|
3158
|
+
|
|
3159
|
+
// src/components/Inputs/Slider.tsx
|
|
3160
|
+
var React35 = __toESM(require("react"), 1);
|
|
3161
|
+
|
|
3162
|
+
// src/components/Feedback/Tooltip.tsx
|
|
3163
|
+
var React34 = require("react");
|
|
3164
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3165
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3166
|
+
var TooltipArrow = TooltipPrimitive.Arrow;
|
|
3167
|
+
var mapPlacementToSideAndAlign = (placement) => {
|
|
3168
|
+
switch (placement) {
|
|
3169
|
+
case "top":
|
|
3170
|
+
return { side: "top", align: "center" };
|
|
3171
|
+
case "topLeft":
|
|
3172
|
+
return { side: "top", align: "start" };
|
|
3173
|
+
case "topRight":
|
|
3174
|
+
return { side: "top", align: "end" };
|
|
3175
|
+
case "bottom":
|
|
3176
|
+
return { side: "bottom", align: "center" };
|
|
3177
|
+
case "bottomLeft":
|
|
3178
|
+
return { side: "bottom", align: "start" };
|
|
3179
|
+
case "bottomRight":
|
|
3180
|
+
return { side: "bottom", align: "end" };
|
|
3181
|
+
case "left":
|
|
3182
|
+
return { side: "left", align: "center" };
|
|
3183
|
+
case "leftTop":
|
|
3184
|
+
return { side: "left", align: "start" };
|
|
3185
|
+
case "leftBottom":
|
|
3186
|
+
return { side: "left", align: "end" };
|
|
3187
|
+
case "right":
|
|
3188
|
+
return { side: "right", align: "center" };
|
|
3189
|
+
case "rightTop":
|
|
3190
|
+
return { side: "right", align: "start" };
|
|
3191
|
+
case "rightBottom":
|
|
3192
|
+
return { side: "right", align: "end" };
|
|
3193
|
+
default:
|
|
3194
|
+
return { side: "top", align: "center" };
|
|
3195
|
+
}
|
|
3196
|
+
};
|
|
3197
|
+
var Tooltip = (props) => {
|
|
3198
|
+
const {
|
|
3199
|
+
strapline,
|
|
3200
|
+
title,
|
|
3201
|
+
description,
|
|
3202
|
+
showArrow = true,
|
|
3203
|
+
className,
|
|
3204
|
+
placement = "top",
|
|
3205
|
+
offset = 10,
|
|
3206
|
+
disableHoverableContent,
|
|
3207
|
+
open,
|
|
3208
|
+
defaultOpen,
|
|
3209
|
+
onOpenChange,
|
|
3210
|
+
children
|
|
3211
|
+
} = props;
|
|
3212
|
+
const { side, align } = mapPlacementToSideAndAlign(placement);
|
|
3213
|
+
const tooltipClasses = "group bg-(--background-tooltip) max-w-[calc(100vw-2rem)] shadow-card-md border-none rounded-4 p-4 [&>span]:scale-200 data-[state=delayed-open]:animate-in data-[state=instant-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=instant-open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
3214
|
+
const tooltipArrowClasses = "relative fill-(--background-tooltip) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=bottom]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=left]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=right]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)]";
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3216
|
+
TooltipPrimitive.Root,
|
|
3217
|
+
{
|
|
3218
|
+
open,
|
|
3219
|
+
defaultOpen,
|
|
3220
|
+
onOpenChange,
|
|
3221
|
+
disableHoverableContent,
|
|
3222
|
+
children: [
|
|
3223
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
3224
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3225
|
+
TooltipPrimitive.Content,
|
|
2480
3226
|
{
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
3227
|
+
side,
|
|
3228
|
+
align,
|
|
3229
|
+
sideOffset: offset,
|
|
3230
|
+
className: cn(tooltipClasses, className),
|
|
3231
|
+
children: [
|
|
3232
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipArrow, { className: tooltipArrowClasses }),
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "grid gap-2", children: [
|
|
3234
|
+
(strapline ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "caption text-secondary", children: strapline }),
|
|
3235
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
3236
|
+
(description ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "paragraph-sm text-primary", children: description })
|
|
3237
|
+
] })
|
|
3238
|
+
]
|
|
2490
3239
|
}
|
|
2491
|
-
)
|
|
2492
|
-
showTrailingIcon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: cn("cursor-pointer", iconWrapperVariants2({ size, disabled: !!disabled })), children: trailingIcon })
|
|
3240
|
+
) })
|
|
2493
3241
|
]
|
|
2494
3242
|
}
|
|
2495
|
-
)
|
|
3243
|
+
);
|
|
2496
3244
|
};
|
|
2497
|
-
|
|
3245
|
+
Tooltip.displayName = "Tooltip";
|
|
2498
3246
|
|
|
2499
3247
|
// src/components/Inputs/Slider.tsx
|
|
2500
|
-
var
|
|
2501
|
-
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3248
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2502
3249
|
var wrapperBase = "flex flex-col gap-2 items-start";
|
|
2503
3250
|
var isRangeProps = (props) => {
|
|
2504
3251
|
return Array.isArray(props.value) || Array.isArray(props.defaultValue);
|
|
@@ -2525,7 +3272,7 @@ var Slider = (props) => {
|
|
|
2525
3272
|
const isRange = isRangeProps(props);
|
|
2526
3273
|
const isControlled = value !== void 0;
|
|
2527
3274
|
const expectedLength = isRange ? 2 : 1;
|
|
2528
|
-
const normalizeArray =
|
|
3275
|
+
const normalizeArray = React35.useCallback(
|
|
2529
3276
|
(arr, fallback) => {
|
|
2530
3277
|
if (!arr || arr.length === 0) return fallback;
|
|
2531
3278
|
if (arr.length === expectedLength) return arr;
|
|
@@ -2537,16 +3284,16 @@ var Slider = (props) => {
|
|
|
2537
3284
|
},
|
|
2538
3285
|
[expectedLength, max]
|
|
2539
3286
|
);
|
|
2540
|
-
const defaultInternal =
|
|
3287
|
+
const defaultInternal = React35.useMemo(() => {
|
|
2541
3288
|
const defaultValueArray = toArray(defaultValue);
|
|
2542
3289
|
if (defaultValueArray) return normalizeArray(defaultValueArray, []);
|
|
2543
3290
|
if (isRange) return [min, Math.min(min + (max - min) / 4, max)];
|
|
2544
3291
|
return [min + (max - min) / 3];
|
|
2545
3292
|
}, [defaultValue, min, max, isRange, normalizeArray]);
|
|
2546
|
-
const [internalValue, setInternalValue] =
|
|
3293
|
+
const [internalValue, setInternalValue] = React35.useState(
|
|
2547
3294
|
() => normalizeArray(isControlled ? toArray(value) : defaultInternal, defaultInternal)
|
|
2548
3295
|
);
|
|
2549
|
-
|
|
3296
|
+
React35.useEffect(() => {
|
|
2550
3297
|
if (isControlled) {
|
|
2551
3298
|
setInternalValue(
|
|
2552
3299
|
(current2) => normalizeArray(toArray(value), current2.length ? current2 : defaultInternal)
|
|
@@ -2554,15 +3301,16 @@ var Slider = (props) => {
|
|
|
2554
3301
|
}
|
|
2555
3302
|
}, [isControlled, value, normalizeArray, defaultInternal]);
|
|
2556
3303
|
const current = internalValue;
|
|
2557
|
-
const trackRef =
|
|
2558
|
-
const [draggingThumbIndex, setDraggingThumbIndex] =
|
|
2559
|
-
const [hoveredThumbIndex, setHoveredThumbIndex] =
|
|
2560
|
-
const
|
|
3304
|
+
const trackRef = React35.useRef(null);
|
|
3305
|
+
const [draggingThumbIndex, setDraggingThumbIndex] = React35.useState(null);
|
|
3306
|
+
const [hoveredThumbIndex, setHoveredThumbIndex] = React35.useState(null);
|
|
3307
|
+
const [focusedThumbIndex, setFocusedThumbIndex] = React35.useState(null);
|
|
3308
|
+
const clamp = React35.useCallback((val) => {
|
|
2561
3309
|
if (val < min) return min;
|
|
2562
3310
|
if (val > max) return max;
|
|
2563
3311
|
return val;
|
|
2564
3312
|
}, [min, max]);
|
|
2565
|
-
const enforceMinGap =
|
|
3313
|
+
const enforceMinGap = React35.useCallback((next, prev) => {
|
|
2566
3314
|
if (!isRange || next.length !== 2 || step <= 0) return next;
|
|
2567
3315
|
let [low, high] = next;
|
|
2568
3316
|
const [prevLow, prevHigh] = prev.length === 2 ? prev : next;
|
|
@@ -2586,7 +3334,7 @@ var Slider = (props) => {
|
|
|
2586
3334
|
}
|
|
2587
3335
|
return [low, high];
|
|
2588
3336
|
}, [isRange, step, clamp]);
|
|
2589
|
-
|
|
3337
|
+
React35.useEffect(() => {
|
|
2590
3338
|
if (!isControlled) {
|
|
2591
3339
|
setInternalValue((prev) => {
|
|
2592
3340
|
const clamped = prev.map((v) => clamp(v));
|
|
@@ -2720,7 +3468,6 @@ var Slider = (props) => {
|
|
|
2720
3468
|
const secondaryPercent = valueToPercent(secondary);
|
|
2721
3469
|
const showNumeric = display === "numeric";
|
|
2722
3470
|
const showTooltip = display === "tooltip";
|
|
2723
|
-
const isTooltipAbove = tooltipPlacement === "top";
|
|
2724
3471
|
const isDecimalDomain = !Number.isInteger(step) || !Number.isInteger(min) || !Number.isInteger(max);
|
|
2725
3472
|
const formatNumber = (num) => {
|
|
2726
3473
|
if (!isDecimalDomain) {
|
|
@@ -2755,55 +3502,11 @@ var Slider = (props) => {
|
|
|
2755
3502
|
const trackHeight = 32;
|
|
2756
3503
|
const thumbWidth = 18;
|
|
2757
3504
|
const thumbRadius = thumbWidth / 2;
|
|
2758
|
-
const renderTooltipBubble = (key, percent, labelText, isVisible) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2759
|
-
"div",
|
|
2760
|
-
{
|
|
2761
|
-
className: cn(
|
|
2762
|
-
"absolute -translate-x-1/2 flex flex-col items-center",
|
|
2763
|
-
"transition-[opacity,transform] duration-150",
|
|
2764
|
-
isVisible ? "opacity-100 scale-100 pointer-events-auto" : "opacity-0 scale-95 pointer-events-none"
|
|
2765
|
-
),
|
|
2766
|
-
style: {
|
|
2767
|
-
left: `${percent}%`,
|
|
2768
|
-
bottom: isTooltipAbove ? "100%" : void 0,
|
|
2769
|
-
top: isTooltipAbove ? void 0 : "100%",
|
|
2770
|
-
marginBottom: isTooltipAbove ? 8 : void 0,
|
|
2771
|
-
marginTop: isTooltipAbove ? void 0 : 8
|
|
2772
|
-
},
|
|
2773
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2774
|
-
"div",
|
|
2775
|
-
{
|
|
2776
|
-
className: cn("relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4) bg-(--background-tooltip)"),
|
|
2777
|
-
children: [
|
|
2778
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2779
|
-
"p",
|
|
2780
|
-
{
|
|
2781
|
-
className: cn(
|
|
2782
|
-
"paragraph-sm",
|
|
2783
|
-
disabled ? "text-secondary" : "text-primary"
|
|
2784
|
-
),
|
|
2785
|
-
children: labelText
|
|
2786
|
-
}
|
|
2787
|
-
),
|
|
2788
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2789
|
-
"div",
|
|
2790
|
-
{
|
|
2791
|
-
className: cn(
|
|
2792
|
-
"absolute left-1/2 -translate-x-1/2 w-2 h-2 rotate-45 bg-(--background-tooltip)",
|
|
2793
|
-
isTooltipAbove ? "-bottom-1" : "-top-1"
|
|
2794
|
-
)
|
|
2795
|
-
}
|
|
2796
|
-
)
|
|
2797
|
-
]
|
|
2798
|
-
}
|
|
2799
|
-
)
|
|
2800
|
-
},
|
|
2801
|
-
key
|
|
2802
|
-
);
|
|
2803
3505
|
const renderHandle = (index, percent, ariaValueText) => {
|
|
2804
3506
|
const val = index === 0 ? primary : secondary;
|
|
2805
3507
|
const isDragging = draggingThumbIndex === index;
|
|
2806
|
-
|
|
3508
|
+
const isTooltipVisible = showTooltip && (hoveredThumbIndex === index || draggingThumbIndex === index || focusedThumbIndex === index);
|
|
3509
|
+
const handle = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2807
3510
|
"button",
|
|
2808
3511
|
{
|
|
2809
3512
|
type: "button",
|
|
@@ -2832,6 +3535,12 @@ var Slider = (props) => {
|
|
|
2832
3535
|
onPointerLeave: () => {
|
|
2833
3536
|
setHoveredThumbIndex((prev) => prev === index ? null : prev);
|
|
2834
3537
|
},
|
|
3538
|
+
onFocus: () => {
|
|
3539
|
+
setFocusedThumbIndex(index);
|
|
3540
|
+
},
|
|
3541
|
+
onBlur: () => {
|
|
3542
|
+
setFocusedThumbIndex((prev) => prev === index ? null : prev);
|
|
3543
|
+
},
|
|
2835
3544
|
onPointerDown: (event) => {
|
|
2836
3545
|
if (disabled) return;
|
|
2837
3546
|
if (event.button !== 0) return;
|
|
@@ -2842,15 +3551,28 @@ var Slider = (props) => {
|
|
|
2842
3551
|
},
|
|
2843
3552
|
index
|
|
2844
3553
|
);
|
|
3554
|
+
if (!showTooltip) return handle;
|
|
3555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3556
|
+
Tooltip,
|
|
3557
|
+
{
|
|
3558
|
+
title: ariaValueText,
|
|
3559
|
+
placement: tooltipPlacement === "top" ? "top" : "bottom",
|
|
3560
|
+
offset: 8,
|
|
3561
|
+
open: isTooltipVisible,
|
|
3562
|
+
disableHoverableContent: true,
|
|
3563
|
+
className: "z-50",
|
|
3564
|
+
children: handle
|
|
3565
|
+
}
|
|
3566
|
+
);
|
|
2845
3567
|
};
|
|
2846
|
-
return /* @__PURE__ */ (0,
|
|
3568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2847
3569
|
"div",
|
|
2848
3570
|
{
|
|
2849
3571
|
className: wrapperBase,
|
|
2850
3572
|
style: { marginInline: `${thumbRadius}px` },
|
|
2851
3573
|
children: [
|
|
2852
|
-
name && /* @__PURE__ */ (0,
|
|
2853
|
-
/* @__PURE__ */ (0,
|
|
3574
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
3575
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2854
3576
|
"input",
|
|
2855
3577
|
{
|
|
2856
3578
|
type: "hidden",
|
|
@@ -2859,7 +3581,7 @@ var Slider = (props) => {
|
|
|
2859
3581
|
disabled
|
|
2860
3582
|
}
|
|
2861
3583
|
),
|
|
2862
|
-
isRange && secondary !== void 0 && /* @__PURE__ */ (0,
|
|
3584
|
+
isRange && secondary !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2863
3585
|
"input",
|
|
2864
3586
|
{
|
|
2865
3587
|
type: "hidden",
|
|
@@ -2869,51 +3591,37 @@ var Slider = (props) => {
|
|
|
2869
3591
|
}
|
|
2870
3592
|
)
|
|
2871
3593
|
] }),
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2873
|
-
/* @__PURE__ */ (0,
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
ref: trackRef,
|
|
2895
|
-
onPointerDown: handleTrackPointerDown,
|
|
2896
|
-
children: [
|
|
2897
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2898
|
-
"div",
|
|
2899
|
-
{
|
|
2900
|
-
className: cn(
|
|
2901
|
-
"absolute h-full rounded-4",
|
|
2902
|
-
disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-secondary)"
|
|
2903
|
-
),
|
|
2904
|
-
style: {
|
|
2905
|
-
width: `calc(100% + ${thumbWidth}px)`,
|
|
2906
|
-
left: `-${thumbRadius}px`
|
|
2907
|
-
}
|
|
3594
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("w-full flex flex-col gap-1", className), children: [
|
|
3595
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "relative w-full", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3596
|
+
"div",
|
|
3597
|
+
{
|
|
3598
|
+
className: cn(
|
|
3599
|
+
"relative w-full flex items-center rounded-4",
|
|
3600
|
+
disabled ? "bg-(--background-slider-track-disabled) cursor-default" : "bg-(--background-slider-track) cursor-pointer"
|
|
3601
|
+
),
|
|
3602
|
+
style: { height: `${trackHeight}px` },
|
|
3603
|
+
ref: trackRef,
|
|
3604
|
+
onPointerDown: handleTrackPointerDown,
|
|
3605
|
+
children: [
|
|
3606
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3607
|
+
"div",
|
|
3608
|
+
{
|
|
3609
|
+
className: cn(
|
|
3610
|
+
"absolute h-full rounded-4",
|
|
3611
|
+
disabled ? "bg-(--background-slider-track-disabled)" : "bg-(--background-slider-track)"
|
|
3612
|
+
),
|
|
3613
|
+
style: {
|
|
3614
|
+
width: `calc(100% + ${thumbWidth}px)`,
|
|
3615
|
+
left: `-${thumbRadius}px`
|
|
2908
3616
|
}
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
showNumeric && /* @__PURE__ */ (0,
|
|
3617
|
+
}
|
|
3618
|
+
),
|
|
3619
|
+
renderHandle(0, primaryPercent, formatDisplayValue(primary)),
|
|
3620
|
+
isRange && secondary !== void 0 && renderHandle(1, secondaryPercent, formatDisplayValue(secondary))
|
|
3621
|
+
]
|
|
3622
|
+
}
|
|
3623
|
+
) }),
|
|
3624
|
+
showNumeric && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2917
3625
|
"p",
|
|
2918
3626
|
{
|
|
2919
3627
|
className: cn(
|
|
@@ -2931,9 +3639,9 @@ var Slider = (props) => {
|
|
|
2931
3639
|
Slider.displayName = "Slider";
|
|
2932
3640
|
|
|
2933
3641
|
// src/components/Inputs/TextArea.tsx
|
|
2934
|
-
var
|
|
2935
|
-
var
|
|
2936
|
-
var
|
|
3642
|
+
var React36 = __toESM(require("react"), 1);
|
|
3643
|
+
var import_icons13 = require("@bubo-squared/icons");
|
|
3644
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2937
3645
|
var TextArea = (props) => {
|
|
2938
3646
|
const {
|
|
2939
3647
|
label,
|
|
@@ -2953,7 +3661,7 @@ var TextArea = (props) => {
|
|
|
2953
3661
|
...textareaProps
|
|
2954
3662
|
} = props;
|
|
2955
3663
|
const isControlled = value !== void 0;
|
|
2956
|
-
const [internalValue, setInternalValue] =
|
|
3664
|
+
const [internalValue, setInternalValue] = React36.useState(
|
|
2957
3665
|
defaultValue ?? ""
|
|
2958
3666
|
);
|
|
2959
3667
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
@@ -2961,10 +3669,10 @@ var TextArea = (props) => {
|
|
|
2961
3669
|
const currentLength = currentValue.length;
|
|
2962
3670
|
const effectiveMaxLength = type === "character-limit" ? maxLength ?? 144 : void 0;
|
|
2963
3671
|
const showCharacterLimit = type === "character-limit" && typeof effectiveMaxLength === "number";
|
|
2964
|
-
const textareaRef =
|
|
2965
|
-
const containerRef =
|
|
2966
|
-
const [height, setHeight] =
|
|
2967
|
-
const [width, setWidth] =
|
|
3672
|
+
const textareaRef = React36.useRef(null);
|
|
3673
|
+
const containerRef = React36.useRef(null);
|
|
3674
|
+
const [height, setHeight] = React36.useState(void 0);
|
|
3675
|
+
const [width, setWidth] = React36.useState(void 0);
|
|
2968
3676
|
const minHeight = 80;
|
|
2969
3677
|
const minWidth = 240;
|
|
2970
3678
|
const handleContainerClick = () => {
|
|
@@ -2977,7 +3685,7 @@ var TextArea = (props) => {
|
|
|
2977
3685
|
}
|
|
2978
3686
|
onChange?.(event);
|
|
2979
3687
|
};
|
|
2980
|
-
const generatedId =
|
|
3688
|
+
const generatedId = React36.useId();
|
|
2981
3689
|
const textareaId = id ?? generatedId;
|
|
2982
3690
|
const statusBorderClass = {
|
|
2983
3691
|
default: "",
|
|
@@ -3014,7 +3722,7 @@ var TextArea = (props) => {
|
|
|
3014
3722
|
window.addEventListener("pointermove", handlePointerMove);
|
|
3015
3723
|
window.addEventListener("pointerup", handlePointerUp);
|
|
3016
3724
|
};
|
|
3017
|
-
return /* @__PURE__ */ (0,
|
|
3725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3018
3726
|
Field,
|
|
3019
3727
|
{
|
|
3020
3728
|
className: "w-full",
|
|
@@ -3023,7 +3731,7 @@ var TextArea = (props) => {
|
|
|
3023
3731
|
hideHint,
|
|
3024
3732
|
status,
|
|
3025
3733
|
disabled,
|
|
3026
|
-
children: /* @__PURE__ */ (0,
|
|
3734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3027
3735
|
"div",
|
|
3028
3736
|
{
|
|
3029
3737
|
className: cn(
|
|
@@ -3042,7 +3750,7 @@ var TextArea = (props) => {
|
|
|
3042
3750
|
onClick: handleContainerClick,
|
|
3043
3751
|
"aria-disabled": disabled || void 0,
|
|
3044
3752
|
children: [
|
|
3045
|
-
/* @__PURE__ */ (0,
|
|
3753
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3046
3754
|
"textarea",
|
|
3047
3755
|
{
|
|
3048
3756
|
id: textareaId,
|
|
@@ -3062,7 +3770,7 @@ var TextArea = (props) => {
|
|
|
3062
3770
|
...textareaProps
|
|
3063
3771
|
}
|
|
3064
3772
|
),
|
|
3065
|
-
showCharacterLimit && /* @__PURE__ */ (0,
|
|
3773
|
+
showCharacterLimit && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3066
3774
|
"span",
|
|
3067
3775
|
{
|
|
3068
3776
|
className: cn(
|
|
@@ -3076,19 +3784,19 @@ var TextArea = (props) => {
|
|
|
3076
3784
|
]
|
|
3077
3785
|
}
|
|
3078
3786
|
),
|
|
3079
|
-
type === "responsive" && /* @__PURE__ */ (0,
|
|
3787
|
+
type === "responsive" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3080
3788
|
"div",
|
|
3081
3789
|
{
|
|
3082
3790
|
className: "absolute bottom-1 right-1 h-3 w-3 " + (disabled ? "cursor-auto" : "cursor-nwse-resize"),
|
|
3083
3791
|
onPointerDown: disabled ? void 0 : handleResizePointerDown,
|
|
3084
|
-
children: /* @__PURE__ */ (0,
|
|
3792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3085
3793
|
"span",
|
|
3086
3794
|
{
|
|
3087
3795
|
className: cn(
|
|
3088
3796
|
"absolute bottom-0 right-0 flex h-4 w-4 items-center justify-center text-(--icon-primary)",
|
|
3089
3797
|
disabled && "text-(--icon-primary-disabled)"
|
|
3090
3798
|
),
|
|
3091
|
-
children: /* @__PURE__ */ (0,
|
|
3799
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons13.MaximizeIcon, {})
|
|
3092
3800
|
}
|
|
3093
3801
|
)
|
|
3094
3802
|
}
|
|
@@ -3102,10 +3810,10 @@ var TextArea = (props) => {
|
|
|
3102
3810
|
TextArea.displayName = "TextArea";
|
|
3103
3811
|
|
|
3104
3812
|
// src/components/Inputs/TextInput.tsx
|
|
3105
|
-
var
|
|
3106
|
-
var
|
|
3107
|
-
var
|
|
3108
|
-
var
|
|
3813
|
+
var React37 = __toESM(require("react"), 1);
|
|
3814
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
3815
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3816
|
+
var inputTextVariants3 = (0, import_class_variance_authority20.cva)("truncate", {
|
|
3109
3817
|
variants: {
|
|
3110
3818
|
size: {
|
|
3111
3819
|
sm: "paragraph-md",
|
|
@@ -3118,7 +3826,7 @@ var inputTextVariants2 = (0, import_class_variance_authority18.cva)("truncate",
|
|
|
3118
3826
|
size: "lg"
|
|
3119
3827
|
}
|
|
3120
3828
|
});
|
|
3121
|
-
var
|
|
3829
|
+
var iconWrapperVariants4 = (0, import_class_variance_authority20.cva)(
|
|
3122
3830
|
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
3123
3831
|
{
|
|
3124
3832
|
variants: {
|
|
@@ -3155,11 +3863,11 @@ var TextInput = (props) => {
|
|
|
3155
3863
|
...inputProps
|
|
3156
3864
|
} = props;
|
|
3157
3865
|
const isControlled = value !== void 0;
|
|
3158
|
-
const [internalValue, setInternalValue] =
|
|
3866
|
+
const [internalValue, setInternalValue] = React37.useState(
|
|
3159
3867
|
defaultValue ?? ""
|
|
3160
3868
|
);
|
|
3161
3869
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
3162
|
-
const inputRef =
|
|
3870
|
+
const inputRef = React37.useRef(null);
|
|
3163
3871
|
const handleContainerClick = () => {
|
|
3164
3872
|
if (disabled) return;
|
|
3165
3873
|
inputRef.current?.focus();
|
|
@@ -3172,7 +3880,7 @@ var TextInput = (props) => {
|
|
|
3172
3880
|
};
|
|
3173
3881
|
const showLeadingIcon = !!leadingIcon;
|
|
3174
3882
|
const showTrailingIcon = !!trailingIcon;
|
|
3175
|
-
return /* @__PURE__ */ (0,
|
|
3883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3176
3884
|
Field,
|
|
3177
3885
|
{
|
|
3178
3886
|
label,
|
|
@@ -3180,7 +3888,7 @@ var TextInput = (props) => {
|
|
|
3180
3888
|
hideHint,
|
|
3181
3889
|
status,
|
|
3182
3890
|
disabled,
|
|
3183
|
-
children: /* @__PURE__ */ (0,
|
|
3891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3184
3892
|
InputShell,
|
|
3185
3893
|
{
|
|
3186
3894
|
size,
|
|
@@ -3189,16 +3897,16 @@ var TextInput = (props) => {
|
|
|
3189
3897
|
className,
|
|
3190
3898
|
onClick: handleContainerClick,
|
|
3191
3899
|
children: [
|
|
3192
|
-
showLeadingIcon && /* @__PURE__ */ (0,
|
|
3900
|
+
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3193
3901
|
"span",
|
|
3194
3902
|
{
|
|
3195
3903
|
className: cn(
|
|
3196
|
-
|
|
3904
|
+
iconWrapperVariants4({ size, disabled })
|
|
3197
3905
|
),
|
|
3198
3906
|
children: leadingIcon
|
|
3199
3907
|
}
|
|
3200
3908
|
),
|
|
3201
|
-
/* @__PURE__ */ (0,
|
|
3909
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3202
3910
|
Input,
|
|
3203
3911
|
{
|
|
3204
3912
|
ref: inputRef,
|
|
@@ -3210,17 +3918,17 @@ var TextInput = (props) => {
|
|
|
3210
3918
|
onChange: handleChange,
|
|
3211
3919
|
variant: "bare",
|
|
3212
3920
|
className: cn(
|
|
3213
|
-
|
|
3921
|
+
inputTextVariants3({ size }),
|
|
3214
3922
|
"bg-transparent outline-none w-full"
|
|
3215
3923
|
),
|
|
3216
3924
|
...inputProps
|
|
3217
3925
|
}
|
|
3218
3926
|
),
|
|
3219
|
-
showTrailingIcon && /* @__PURE__ */ (0,
|
|
3927
|
+
showTrailingIcon && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3220
3928
|
"span",
|
|
3221
3929
|
{
|
|
3222
3930
|
className: cn(
|
|
3223
|
-
|
|
3931
|
+
iconWrapperVariants4({ size, disabled: !!disabled })
|
|
3224
3932
|
),
|
|
3225
3933
|
children: trailingIcon
|
|
3226
3934
|
}
|
|
@@ -3234,11 +3942,11 @@ var TextInput = (props) => {
|
|
|
3234
3942
|
TextInput.displayName = "TextInput";
|
|
3235
3943
|
|
|
3236
3944
|
// src/components/Inputs/Toggle.tsx
|
|
3237
|
-
var
|
|
3238
|
-
var
|
|
3945
|
+
var React38 = require("react");
|
|
3946
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3239
3947
|
var Toggle = (props) => {
|
|
3240
3948
|
const { label, className, disabled, ...inputProps } = props;
|
|
3241
|
-
return /* @__PURE__ */ (0,
|
|
3949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3242
3950
|
"label",
|
|
3243
3951
|
{
|
|
3244
3952
|
className: cn(
|
|
@@ -3246,8 +3954,8 @@ var Toggle = (props) => {
|
|
|
3246
3954
|
disabled ? "cursor-default" : "cursor-pointer"
|
|
3247
3955
|
),
|
|
3248
3956
|
children: [
|
|
3249
|
-
/* @__PURE__ */ (0,
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3957
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "relative inline-flex items-center", children: [
|
|
3958
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3251
3959
|
"input",
|
|
3252
3960
|
{
|
|
3253
3961
|
type: "checkbox",
|
|
@@ -3256,7 +3964,7 @@ var Toggle = (props) => {
|
|
|
3256
3964
|
...inputProps
|
|
3257
3965
|
}
|
|
3258
3966
|
),
|
|
3259
|
-
/* @__PURE__ */ (0,
|
|
3967
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3260
3968
|
"span",
|
|
3261
3969
|
{
|
|
3262
3970
|
className: cn(
|
|
@@ -3296,7 +4004,7 @@ var Toggle = (props) => {
|
|
|
3296
4004
|
"peer-disabled:[&>.knob]:peer-checked:bg-(--background-primary-hover)",
|
|
3297
4005
|
className
|
|
3298
4006
|
),
|
|
3299
|
-
children: /* @__PURE__ */ (0,
|
|
4007
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3300
4008
|
"span",
|
|
3301
4009
|
{
|
|
3302
4010
|
className: cn(
|
|
@@ -3308,7 +4016,7 @@ var Toggle = (props) => {
|
|
|
3308
4016
|
}
|
|
3309
4017
|
)
|
|
3310
4018
|
] }),
|
|
3311
|
-
label && /* @__PURE__ */ (0,
|
|
4019
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3312
4020
|
"span",
|
|
3313
4021
|
{
|
|
3314
4022
|
className: cn(
|
|
@@ -3325,8 +4033,8 @@ var Toggle = (props) => {
|
|
|
3325
4033
|
Toggle.displayName = "Toggle";
|
|
3326
4034
|
|
|
3327
4035
|
// src/components/Inputs/WebsiteInput.tsx
|
|
3328
|
-
var
|
|
3329
|
-
var
|
|
4036
|
+
var React39 = require("react");
|
|
4037
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3330
4038
|
var WebsiteInput = (props) => {
|
|
3331
4039
|
const {
|
|
3332
4040
|
hierarchy = "leading",
|
|
@@ -3363,15 +4071,15 @@ var WebsiteInput = (props) => {
|
|
|
3363
4071
|
size === "xl" ? "[&>svg]:w-6 [&>svg]:h-6" : size === "sm" ? "[&>svg]:w-4 [&>svg]:h-4" : "[&>svg]:w-5 [&>svg]:h-5",
|
|
3364
4072
|
disabled ? "text-(--icon-primary-disabled)" : "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-within:text-(--icon-primary-focus)"
|
|
3365
4073
|
);
|
|
3366
|
-
const leadingAddon = /* @__PURE__ */ (0,
|
|
3367
|
-
/* @__PURE__ */ (0,
|
|
3368
|
-
icon != null && /* @__PURE__ */ (0,
|
|
4074
|
+
const leadingAddon = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: baseAddonClass, children: [
|
|
4075
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: addonTextClass, children: protocolLabel }),
|
|
4076
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: iconWrapperClass, children: icon })
|
|
3369
4077
|
] });
|
|
3370
|
-
const trailingAddon = /* @__PURE__ */ (0,
|
|
3371
|
-
icon != null && /* @__PURE__ */ (0,
|
|
3372
|
-
/* @__PURE__ */ (0,
|
|
4078
|
+
const trailingAddon = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: baseAddonClass, children: [
|
|
4079
|
+
icon != null && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: iconWrapperClass, children: icon }),
|
|
4080
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: addonTextClass, children: protocolLabel })
|
|
3373
4081
|
] });
|
|
3374
|
-
return /* @__PURE__ */ (0,
|
|
4082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3375
4083
|
TextInput,
|
|
3376
4084
|
{
|
|
3377
4085
|
...rest,
|
|
@@ -3386,9 +4094,9 @@ var WebsiteInput = (props) => {
|
|
|
3386
4094
|
WebsiteInput.displayName = "WebsiteInput";
|
|
3387
4095
|
|
|
3388
4096
|
// src/components/Feedback/Popover.tsx
|
|
3389
|
-
var
|
|
4097
|
+
var React40 = __toESM(require("react"), 1);
|
|
3390
4098
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
3391
|
-
var
|
|
4099
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3392
4100
|
var PopoverArrow = PopoverPrimitive2.Arrow;
|
|
3393
4101
|
var Popover2 = (props) => {
|
|
3394
4102
|
const {
|
|
@@ -3405,7 +4113,7 @@ var Popover2 = (props) => {
|
|
|
3405
4113
|
offset = 10,
|
|
3406
4114
|
children
|
|
3407
4115
|
} = props;
|
|
3408
|
-
const [open, setOpen] =
|
|
4116
|
+
const [open, setOpen] = React40.useState(false);
|
|
3409
4117
|
const handleCancel = () => {
|
|
3410
4118
|
onCancel?.();
|
|
3411
4119
|
setOpen(false);
|
|
@@ -3447,9 +4155,9 @@ var Popover2 = (props) => {
|
|
|
3447
4155
|
}
|
|
3448
4156
|
};
|
|
3449
4157
|
const { side, align } = mapPlacementToSideAndAlign2(placement);
|
|
3450
|
-
return /* @__PURE__ */ (0,
|
|
3451
|
-
/* @__PURE__ */ (0,
|
|
3452
|
-
/* @__PURE__ */ (0,
|
|
4158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
4159
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopoverTrigger, { asChild: true, children }),
|
|
4160
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3453
4161
|
PopoverContent,
|
|
3454
4162
|
{
|
|
3455
4163
|
side,
|
|
@@ -3457,16 +4165,16 @@ var Popover2 = (props) => {
|
|
|
3457
4165
|
sideOffset: offset,
|
|
3458
4166
|
className: cn(popoverClasses, className),
|
|
3459
4167
|
children: [
|
|
3460
|
-
showArrow && /* @__PURE__ */ (0,
|
|
3461
|
-
/* @__PURE__ */ (0,
|
|
3462
|
-
/* @__PURE__ */ (0,
|
|
3463
|
-
/* @__PURE__ */ (0,
|
|
3464
|
-
/* @__PURE__ */ (0,
|
|
3465
|
-
/* @__PURE__ */ (0,
|
|
4168
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopoverArrow, { className: popoverArrowClasses }),
|
|
4169
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "grid gap-4", children: [
|
|
4170
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "space-y-2", children: [
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "caption text-secondary", children: strapline }),
|
|
4172
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
4173
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "paragraph-sm text-primary", children: description })
|
|
3466
4174
|
] }),
|
|
3467
|
-
/* @__PURE__ */ (0,
|
|
3468
|
-
/* @__PURE__ */ (0,
|
|
3469
|
-
/* @__PURE__ */ (0,
|
|
4175
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-start items-center gap-4 flex-wrap", children: [
|
|
4176
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),
|
|
4177
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { size: "sm", variant: "primary", onClick: handleOk, children: okText || "Ok" })
|
|
3470
4178
|
] })
|
|
3471
4179
|
] })
|
|
3472
4180
|
]
|
|
@@ -3476,95 +4184,10 @@ var Popover2 = (props) => {
|
|
|
3476
4184
|
};
|
|
3477
4185
|
Popover2.displayName = "Popover";
|
|
3478
4186
|
|
|
3479
|
-
// src/components/Feedback/Tooltip.tsx
|
|
3480
|
-
var React36 = require("react");
|
|
3481
|
-
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3482
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3483
|
-
var TooltipArrow = TooltipPrimitive.Arrow;
|
|
3484
|
-
var mapPlacementToSideAndAlign = (placement) => {
|
|
3485
|
-
switch (placement) {
|
|
3486
|
-
case "top":
|
|
3487
|
-
return { side: "top", align: "center" };
|
|
3488
|
-
case "topLeft":
|
|
3489
|
-
return { side: "top", align: "start" };
|
|
3490
|
-
case "topRight":
|
|
3491
|
-
return { side: "top", align: "end" };
|
|
3492
|
-
case "bottom":
|
|
3493
|
-
return { side: "bottom", align: "center" };
|
|
3494
|
-
case "bottomLeft":
|
|
3495
|
-
return { side: "bottom", align: "start" };
|
|
3496
|
-
case "bottomRight":
|
|
3497
|
-
return { side: "bottom", align: "end" };
|
|
3498
|
-
case "left":
|
|
3499
|
-
return { side: "left", align: "center" };
|
|
3500
|
-
case "leftTop":
|
|
3501
|
-
return { side: "left", align: "start" };
|
|
3502
|
-
case "leftBottom":
|
|
3503
|
-
return { side: "left", align: "end" };
|
|
3504
|
-
case "right":
|
|
3505
|
-
return { side: "right", align: "center" };
|
|
3506
|
-
case "rightTop":
|
|
3507
|
-
return { side: "right", align: "start" };
|
|
3508
|
-
case "rightBottom":
|
|
3509
|
-
return { side: "right", align: "end" };
|
|
3510
|
-
default:
|
|
3511
|
-
return { side: "top", align: "center" };
|
|
3512
|
-
}
|
|
3513
|
-
};
|
|
3514
|
-
var Tooltip = (props) => {
|
|
3515
|
-
const {
|
|
3516
|
-
strapline,
|
|
3517
|
-
title,
|
|
3518
|
-
description,
|
|
3519
|
-
showArrow = true,
|
|
3520
|
-
className,
|
|
3521
|
-
placement = "top",
|
|
3522
|
-
offset = 10,
|
|
3523
|
-
disableHoverableContent,
|
|
3524
|
-
open,
|
|
3525
|
-
defaultOpen,
|
|
3526
|
-
onOpenChange,
|
|
3527
|
-
children
|
|
3528
|
-
} = props;
|
|
3529
|
-
const { side, align } = mapPlacementToSideAndAlign(placement);
|
|
3530
|
-
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
|
-
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, import_jsx_runtime38.jsxs)(
|
|
3533
|
-
TooltipPrimitive.Root,
|
|
3534
|
-
{
|
|
3535
|
-
open,
|
|
3536
|
-
defaultOpen,
|
|
3537
|
-
onOpenChange,
|
|
3538
|
-
disableHoverableContent,
|
|
3539
|
-
children: [
|
|
3540
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
3541
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3542
|
-
TooltipPrimitive.Content,
|
|
3543
|
-
{
|
|
3544
|
-
side,
|
|
3545
|
-
align,
|
|
3546
|
-
sideOffset: offset,
|
|
3547
|
-
className: cn(tooltipClasses, className),
|
|
3548
|
-
children: [
|
|
3549
|
-
showArrow && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipArrow, { className: tooltipArrowClasses }),
|
|
3550
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid gap-2", children: [
|
|
3551
|
-
(strapline ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "caption text-secondary", children: strapline }),
|
|
3552
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
3553
|
-
(description ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "paragraph-sm text-primary", children: description })
|
|
3554
|
-
] })
|
|
3555
|
-
]
|
|
3556
|
-
}
|
|
3557
|
-
) })
|
|
3558
|
-
]
|
|
3559
|
-
}
|
|
3560
|
-
);
|
|
3561
|
-
};
|
|
3562
|
-
Tooltip.displayName = "Tooltip";
|
|
3563
|
-
|
|
3564
4187
|
// src/components/Feedback/TooltipProvider.tsx
|
|
3565
|
-
var
|
|
4188
|
+
var React41 = require("react");
|
|
3566
4189
|
var TooltipPrimitive2 = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3567
|
-
var
|
|
4190
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3568
4191
|
var TooltipProvider = (props) => {
|
|
3569
4192
|
const {
|
|
3570
4193
|
children,
|
|
@@ -3572,7 +4195,7 @@ var TooltipProvider = (props) => {
|
|
|
3572
4195
|
skipDelayDuration = 300,
|
|
3573
4196
|
disableHoverableContent = false
|
|
3574
4197
|
} = props;
|
|
3575
|
-
return /* @__PURE__ */ (0,
|
|
4198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3576
4199
|
TooltipPrimitive2.Provider,
|
|
3577
4200
|
{
|
|
3578
4201
|
delayDuration,
|
|
@@ -3585,19 +4208,19 @@ var TooltipProvider = (props) => {
|
|
|
3585
4208
|
TooltipProvider.displayName = "TooltipProvider";
|
|
3586
4209
|
|
|
3587
4210
|
// src/components/Navigation/Breadcrumbs.tsx
|
|
3588
|
-
var
|
|
4211
|
+
var React43 = __toESM(require("react"), 1);
|
|
3589
4212
|
|
|
3590
4213
|
// src/components/ui/breadcrumb.tsx
|
|
3591
|
-
var
|
|
4214
|
+
var React42 = require("react");
|
|
3592
4215
|
var import_react_slot8 = require("@radix-ui/react-slot");
|
|
3593
|
-
var
|
|
4216
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3594
4217
|
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
4218
|
var disabledItemClasses = "text-primary-disabled cursor-default pointer-events-none";
|
|
3596
4219
|
function Breadcrumb({ ...props }) {
|
|
3597
|
-
return /* @__PURE__ */ (0,
|
|
4220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
3598
4221
|
}
|
|
3599
4222
|
function BreadcrumbList({ className, ...props }) {
|
|
3600
|
-
return /* @__PURE__ */ (0,
|
|
4223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3601
4224
|
"ol",
|
|
3602
4225
|
{
|
|
3603
4226
|
"data-slot": "breadcrumb-list",
|
|
@@ -3610,7 +4233,7 @@ function BreadcrumbList({ className, ...props }) {
|
|
|
3610
4233
|
);
|
|
3611
4234
|
}
|
|
3612
4235
|
function BreadcrumbItem({ className, disabled, ...props }) {
|
|
3613
|
-
return /* @__PURE__ */ (0,
|
|
4236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3614
4237
|
"li",
|
|
3615
4238
|
{
|
|
3616
4239
|
"data-slot": "breadcrumb-item",
|
|
@@ -3621,7 +4244,7 @@ function BreadcrumbItem({ className, disabled, ...props }) {
|
|
|
3621
4244
|
);
|
|
3622
4245
|
}
|
|
3623
4246
|
function BreadcrumbPage({ className, ...props }) {
|
|
3624
|
-
return /* @__PURE__ */ (0,
|
|
4247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3625
4248
|
"span",
|
|
3626
4249
|
{
|
|
3627
4250
|
"data-slot": "breadcrumb-page",
|
|
@@ -3638,7 +4261,7 @@ function BreadcrumbSeparator({
|
|
|
3638
4261
|
className,
|
|
3639
4262
|
...props
|
|
3640
4263
|
}) {
|
|
3641
|
-
return /* @__PURE__ */ (0,
|
|
4264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3642
4265
|
"li",
|
|
3643
4266
|
{
|
|
3644
4267
|
"data-slot": "breadcrumb-separator",
|
|
@@ -3646,7 +4269,7 @@ function BreadcrumbSeparator({
|
|
|
3646
4269
|
"aria-hidden": "true",
|
|
3647
4270
|
className: cn("[&>svg]:size-6 [&>svg]:text-(--color-secondary)", className),
|
|
3648
4271
|
...props,
|
|
3649
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
4272
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ChevronRight, {})
|
|
3650
4273
|
}
|
|
3651
4274
|
);
|
|
3652
4275
|
}
|
|
@@ -3654,7 +4277,7 @@ function BreadcrumbEllipsis({
|
|
|
3654
4277
|
className,
|
|
3655
4278
|
...props
|
|
3656
4279
|
}) {
|
|
3657
|
-
return /* @__PURE__ */ (0,
|
|
4280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3658
4281
|
"span",
|
|
3659
4282
|
{
|
|
3660
4283
|
"data-slot": "breadcrumb-ellipsis",
|
|
@@ -3663,112 +4286,48 @@ function BreadcrumbEllipsis({
|
|
|
3663
4286
|
className: cn("flex size-9 items-center justify-center", className),
|
|
3664
4287
|
...props,
|
|
3665
4288
|
children: [
|
|
3666
|
-
/* @__PURE__ */ (0,
|
|
3667
|
-
/* @__PURE__ */ (0,
|
|
4289
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Ellipsis, { className: "size-4" }),
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "sr-only", children: "More" })
|
|
3668
4291
|
]
|
|
3669
4292
|
}
|
|
3670
4293
|
);
|
|
3671
4294
|
}
|
|
3672
4295
|
|
|
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
4296
|
// src/components/Navigation/Breadcrumbs.tsx
|
|
3738
|
-
var
|
|
4297
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3739
4298
|
var breadcrumbSeparatorVariants = "size-5 relative bottom-1 [&>svg]:text-secondary group-disabled:text-secondary";
|
|
3740
4299
|
var breadcrumbItemBase = "h6-title text-secondary hover:text-primary-hover";
|
|
3741
|
-
var Breadcrumbs =
|
|
4300
|
+
var Breadcrumbs = React43.forwardRef(
|
|
3742
4301
|
(props, ref) => {
|
|
3743
4302
|
const { separator, ellipsis, children, className, ...rest } = props;
|
|
3744
|
-
const items =
|
|
4303
|
+
const items = React43.Children.toArray(children).filter(Boolean);
|
|
3745
4304
|
const shouldCollapse = Boolean(ellipsis) && items.length >= 5;
|
|
3746
4305
|
const hiddenItems = shouldCollapse ? items.slice(1, -2) : [];
|
|
3747
4306
|
const displayItems = shouldCollapse ? [items[0], "__ELLIPSIS__", items[items.length - 2], items[items.length - 1]] : items;
|
|
3748
|
-
return /* @__PURE__ */ (0,
|
|
4307
|
+
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
4308
|
const isEllipsis = child === "__ELLIPSIS__";
|
|
3750
|
-
const key = isEllipsis ? "__ellipsis" :
|
|
4309
|
+
const key = isEllipsis ? "__ellipsis" : React43.isValidElement(child) && child.key != null ? String(child.key) : String(index);
|
|
3751
4310
|
const isLast = index === displayItems.length - 1;
|
|
3752
|
-
return /* @__PURE__ */ (0,
|
|
3753
|
-
isEllipsis ? /* @__PURE__ */ (0,
|
|
3754
|
-
/* @__PURE__ */ (0,
|
|
4311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(React43.Fragment, { children: [
|
|
4312
|
+
isEllipsis ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(DropdownMenu, { children: [
|
|
4313
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3755
4314
|
"button",
|
|
3756
4315
|
{
|
|
3757
4316
|
type: "button",
|
|
3758
4317
|
className: "inline-flex size-8 items-center justify-center rounded-4 hover:bg-(--background-secondary) focus-ring-primary text-secondary",
|
|
3759
4318
|
"aria-label": "Open breadcrumb menu",
|
|
3760
|
-
children: /* @__PURE__ */ (0,
|
|
4319
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbEllipsis, {})
|
|
3761
4320
|
}
|
|
3762
4321
|
) }),
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
4322
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3764
4323
|
DropdownMenuContent,
|
|
3765
4324
|
{
|
|
3766
4325
|
align: "start",
|
|
3767
4326
|
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,
|
|
4327
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuGroup, { children: hiddenItems.map((hidden, hiddenIndex) => {
|
|
4328
|
+
const hiddenKey = React43.isValidElement(hidden) && hidden.key != null ? String(hidden.key) : `hidden-${hiddenIndex}`;
|
|
4329
|
+
if (React43.isValidElement(hidden)) {
|
|
4330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3772
4331
|
DropdownMenuItem,
|
|
3773
4332
|
{
|
|
3774
4333
|
asChild: true,
|
|
@@ -3778,7 +4337,7 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3778
4337
|
hiddenKey
|
|
3779
4338
|
);
|
|
3780
4339
|
}
|
|
3781
|
-
return /* @__PURE__ */ (0,
|
|
4340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3782
4341
|
DropdownMenuItem,
|
|
3783
4342
|
{
|
|
3784
4343
|
className: "cursor-pointer paragraph-md text-primary focus:bg-(--background-secondary)",
|
|
@@ -3789,14 +4348,14 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3789
4348
|
}) })
|
|
3790
4349
|
}
|
|
3791
4350
|
)
|
|
3792
|
-
] }) }) : isLast ? /* @__PURE__ */ (0,
|
|
4351
|
+
] }) }) : isLast ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3793
4352
|
BreadcrumbPage,
|
|
3794
4353
|
{
|
|
3795
4354
|
className: cn("h6-title-medium cursor-pointer", props.breadcrumbPageClassName),
|
|
3796
4355
|
children: child
|
|
3797
4356
|
}
|
|
3798
|
-
) }) : /* @__PURE__ */ (0,
|
|
3799
|
-
!isLast && /* @__PURE__ */ (0,
|
|
4357
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: child }),
|
|
4358
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(BreadcrumbSeparator, { className: cn(breadcrumbSeparatorVariants, props.separatorClassName), children: separator })
|
|
3800
4359
|
] }, key);
|
|
3801
4360
|
}) }) });
|
|
3802
4361
|
}
|
|
@@ -3804,16 +4363,16 @@ var Breadcrumbs = React40.forwardRef(
|
|
|
3804
4363
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
3805
4364
|
|
|
3806
4365
|
// 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,
|
|
4366
|
+
var import_class_variance_authority21 = require("class-variance-authority");
|
|
4367
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4368
|
+
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: [
|
|
4369
|
+
/* @__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" }),
|
|
4370
|
+
/* @__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" }),
|
|
4371
|
+
/* @__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" }),
|
|
4372
|
+
/* @__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" }),
|
|
4373
|
+
/* @__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
4374
|
] });
|
|
3816
|
-
var logoIconVariants = (0,
|
|
4375
|
+
var logoIconVariants = (0, import_class_variance_authority21.cva)(
|
|
3817
4376
|
"relative bg-linear-to-t from-gray-800 to-gray-950 overflow-hidden flex justify-center items-center",
|
|
3818
4377
|
{
|
|
3819
4378
|
variants: {
|
|
@@ -3838,28 +4397,28 @@ var logoIconSizeClass = {
|
|
|
3838
4397
|
xl: "size-96"
|
|
3839
4398
|
};
|
|
3840
4399
|
var LogoIcon = ({ className, size = "md" }) => {
|
|
3841
|
-
return /* @__PURE__ */ (0,
|
|
4400
|
+
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
4401
|
};
|
|
3843
4402
|
|
|
3844
4403
|
// 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,
|
|
4404
|
+
var import_class_variance_authority22 = require("class-variance-authority");
|
|
4405
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4406
|
+
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: [
|
|
4407
|
+
/* @__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" }),
|
|
4408
|
+
/* @__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" }),
|
|
4409
|
+
/* @__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" }),
|
|
4410
|
+
/* @__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" }),
|
|
4411
|
+
/* @__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
4412
|
] });
|
|
3854
|
-
var LogoTextSvg = (props) => /* @__PURE__ */ (0,
|
|
3855
|
-
/* @__PURE__ */ (0,
|
|
3856
|
-
/* @__PURE__ */ (0,
|
|
3857
|
-
/* @__PURE__ */ (0,
|
|
3858
|
-
/* @__PURE__ */ (0,
|
|
3859
|
-
/* @__PURE__ */ (0,
|
|
3860
|
-
/* @__PURE__ */ (0,
|
|
4413
|
+
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: [
|
|
4414
|
+
/* @__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" }),
|
|
4415
|
+
/* @__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" }),
|
|
4416
|
+
/* @__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" }),
|
|
4417
|
+
/* @__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" }),
|
|
4418
|
+
/* @__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" }),
|
|
4419
|
+
/* @__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
4420
|
] });
|
|
3862
|
-
var logoWrapperVariants = (0,
|
|
4421
|
+
var logoWrapperVariants = (0, import_class_variance_authority22.cva)("inline-flex", {
|
|
3863
4422
|
variants: {
|
|
3864
4423
|
variant: {
|
|
3865
4424
|
inline: ["w-44", "h-12", "justify-start", "items-center", "gap-4"],
|
|
@@ -3871,7 +4430,7 @@ var logoWrapperVariants = (0, import_class_variance_authority20.cva)("inline-fle
|
|
|
3871
4430
|
variant: "inline"
|
|
3872
4431
|
}
|
|
3873
4432
|
});
|
|
3874
|
-
var logoIconSizeVariants = (0,
|
|
4433
|
+
var logoIconSizeVariants = (0, import_class_variance_authority22.cva)("", {
|
|
3875
4434
|
variants: {
|
|
3876
4435
|
variant: {
|
|
3877
4436
|
inline: "size-12",
|
|
@@ -3883,7 +4442,7 @@ var logoIconSizeVariants = (0, import_class_variance_authority20.cva)("", {
|
|
|
3883
4442
|
variant: "inline"
|
|
3884
4443
|
}
|
|
3885
4444
|
});
|
|
3886
|
-
var logoTextSizeVariants = (0,
|
|
4445
|
+
var logoTextSizeVariants = (0, import_class_variance_authority22.cva)("", {
|
|
3887
4446
|
variants: {
|
|
3888
4447
|
variant: {
|
|
3889
4448
|
inline: "h-8 w-27.5",
|
|
@@ -3897,13 +4456,15 @@ var logoTextSizeVariants = (0, import_class_variance_authority20.cva)("", {
|
|
|
3897
4456
|
});
|
|
3898
4457
|
var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
3899
4458
|
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,
|
|
4459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn(logoWrapperVariants({ variant }), className), children: [
|
|
4460
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LogoIconSvg2, { className: logoIconSizeVariants({ variant }) }),
|
|
4461
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LogoTextSvg, { className: cn(logoTextSizeVariants({ variant }), textColorClass) })
|
|
3903
4462
|
] });
|
|
3904
4463
|
};
|
|
3905
4464
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3906
4465
|
0 && (module.exports = {
|
|
4466
|
+
Accordion,
|
|
4467
|
+
Autocomplete,
|
|
3907
4468
|
Avatar,
|
|
3908
4469
|
Badge,
|
|
3909
4470
|
BadgeDigit,
|
|
@@ -3920,6 +4481,16 @@ var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
|
3920
4481
|
LinkButton,
|
|
3921
4482
|
Logo,
|
|
3922
4483
|
LogoIcon,
|
|
4484
|
+
Menu,
|
|
4485
|
+
MenuGroup,
|
|
4486
|
+
MenuItem,
|
|
4487
|
+
MenuLabel,
|
|
4488
|
+
MenuPortal,
|
|
4489
|
+
MenuSeparator,
|
|
4490
|
+
MenuShortcut,
|
|
4491
|
+
MenuSub,
|
|
4492
|
+
MenuSubContent,
|
|
4493
|
+
MenuSubTrigger,
|
|
3923
4494
|
MessageButton,
|
|
3924
4495
|
PasswordInput,
|
|
3925
4496
|
PhoneInput,
|