@bubo-squared/ui-framework 0.1.94 → 0.1.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -47
- package/dist/index.cjs +187 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +187 -128
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/style.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -237,7 +237,7 @@ var IconButtonGroup = (props) => {
|
|
|
237
237
|
"aria-label": item.ariaLabel,
|
|
238
238
|
disabled: item.disabled,
|
|
239
239
|
className: cn(
|
|
240
|
-
"rounded-none border-1 border-(--border-secondary) text-
|
|
240
|
+
"rounded-none border-1 border-(--border-secondary) text-primary ",
|
|
241
241
|
index === 0 && "rounded-l-6",
|
|
242
242
|
index === items.length - 1 && "rounded-r-6",
|
|
243
243
|
index > 0 && "-ml-px"
|
|
@@ -383,7 +383,7 @@ import { cva as cva6 } from "class-variance-authority";
|
|
|
383
383
|
import { UserIcon } from "@bubo-squared/icons";
|
|
384
384
|
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
385
385
|
var avatarVariants = cva6(
|
|
386
|
-
"relative inline-flex items-center justify-center rounded-full border-(--border-secondary) border-1 bg-(--background-primary) text-
|
|
386
|
+
"relative inline-flex items-center justify-center rounded-full border-(--border-secondary) border-1 bg-(--background-primary) text-primary overflow-hidden hover:border-(--focus-secondary) focus-visible:border-(--focus-primary) focus-visible:outline-none",
|
|
387
387
|
{
|
|
388
388
|
variants: {
|
|
389
389
|
size: {
|
|
@@ -402,7 +402,7 @@ var avatarVariants = cva6(
|
|
|
402
402
|
}
|
|
403
403
|
);
|
|
404
404
|
var avatarInitialsVariants = cva6(
|
|
405
|
-
"flex items-center justify-center text-
|
|
405
|
+
"flex items-center justify-center text-primary leading-none ",
|
|
406
406
|
{
|
|
407
407
|
variants: {
|
|
408
408
|
size: {
|
|
@@ -493,16 +493,16 @@ var badgeVariants = cva7(
|
|
|
493
493
|
xl: "px-2 h6-title"
|
|
494
494
|
},
|
|
495
495
|
variant: {
|
|
496
|
-
primary: "bg-(--background-secondary) text-
|
|
497
|
-
secondary: "bg-(--background-primary) border-1 border-(--border-primary) text-
|
|
498
|
-
active: "bg-
|
|
499
|
-
informal: "bg-
|
|
500
|
-
success: "bg-
|
|
501
|
-
warning: "bg-
|
|
502
|
-
error: "bg-
|
|
503
|
-
disabled: "bg-(--background-primary-disabled) border-1 border-(--border-primary-disabled) text-
|
|
504
|
-
"double-default": "bg-(--background-secondary) text-
|
|
505
|
-
"double-current": "bg-
|
|
496
|
+
primary: "bg-(--background-secondary) text-primary",
|
|
497
|
+
secondary: "bg-(--background-primary) border-1 border-(--border-primary) text-primary",
|
|
498
|
+
active: "bg-ac-lilac text-badge-black",
|
|
499
|
+
informal: "bg-ac-neon-blue text-badge-black",
|
|
500
|
+
success: "bg-ac-neon-green text-badge-black",
|
|
501
|
+
warning: "bg-ac-light-orange text-badge-black",
|
|
502
|
+
error: "bg-s-error-300 text-badge-black",
|
|
503
|
+
disabled: "bg-(--background-primary-disabled) border-1 border-(--border-primary-disabled) text-primary-disabled",
|
|
504
|
+
"double-default": "bg-(--background-secondary) text-primary",
|
|
505
|
+
"double-current": "bg-color-ac-lilac text-badge-black"
|
|
506
506
|
}
|
|
507
507
|
},
|
|
508
508
|
defaultVariants: {
|
|
@@ -554,12 +554,12 @@ var badgeDigitVariants = cva8(
|
|
|
554
554
|
},
|
|
555
555
|
variant: {
|
|
556
556
|
primary: "bg-(--background-brand)",
|
|
557
|
-
secondary: "bg-(--background-primary) border-1 border-(--border-secondary) text-(--
|
|
557
|
+
secondary: "bg-(--background-primary) border-1 border-(--border-secondary) text-(--color-secondary)",
|
|
558
558
|
informal: "bg-(--background-informal)",
|
|
559
559
|
success: "bg-(--background-success)",
|
|
560
560
|
warning: "bg-(--background-warning)",
|
|
561
561
|
error: "bg-(--background-error)",
|
|
562
|
-
disabled: "bg-(--background-primary) border-1 border-(--border-primary-disabled) text-
|
|
562
|
+
disabled: "bg-(--background-primary) border-1 border-(--border-primary-disabled) text-primary-disabled"
|
|
563
563
|
}
|
|
564
564
|
},
|
|
565
565
|
defaultVariants: {
|
|
@@ -597,7 +597,7 @@ import { jsx as jsx11 } from "react/jsx-runtime";
|
|
|
597
597
|
var badgeDotVariants = cva9("rounded-12 size-3", {
|
|
598
598
|
variants: {
|
|
599
599
|
status: {
|
|
600
|
-
disabled: "bg-(--
|
|
600
|
+
disabled: "bg-(--color-primary)",
|
|
601
601
|
informal: "bg-(--background-informal)",
|
|
602
602
|
"success/online": "bg-(--background-success)",
|
|
603
603
|
warning: "bg-(--background-warning)",
|
|
@@ -625,7 +625,7 @@ var BadgeStatus = React10.forwardRef(
|
|
|
625
625
|
dotClassName,
|
|
626
626
|
...rest
|
|
627
627
|
} = props;
|
|
628
|
-
const textClasses = active ? "caption-medium text-
|
|
628
|
+
const textClasses = active ? "caption-medium text-primary" : "caption-medium text-primary-disabled";
|
|
629
629
|
const dotClasses = active ? "bg-(--background-informal)" : "bg-(--background-primary)";
|
|
630
630
|
return /* @__PURE__ */ jsxs6(
|
|
631
631
|
"div",
|
|
@@ -656,7 +656,6 @@ BadgeStatus.displayName = "BadgeStatus";
|
|
|
656
656
|
import "react";
|
|
657
657
|
import { TargetIcon } from "@bubo-squared/icons";
|
|
658
658
|
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
659
|
-
var lineClassBase = "flex-1 bg-(--border-secondary) h-px";
|
|
660
659
|
var gapBySize = {
|
|
661
660
|
sm: "gap-2",
|
|
662
661
|
md: "gap-3",
|
|
@@ -672,50 +671,74 @@ var textClassBySize = {
|
|
|
672
671
|
var Divider = (props) => {
|
|
673
672
|
const resolvedType = props.type ?? "default";
|
|
674
673
|
const resolvedSize = props.size ?? "sm";
|
|
674
|
+
const resolvedOrientation = props.orientation ?? "horizontal";
|
|
675
|
+
const ariaOrientation = resolvedOrientation === "vertical" ? "vertical" : "horizontal";
|
|
675
676
|
const showCenter = resolvedType !== "default";
|
|
676
|
-
const lineClass =
|
|
677
|
+
const lineClass = resolvedOrientation === "vertical" ? "flex-1 bg-(--border-secondary) w-px" : "flex-1 bg-(--border-secondary) h-px";
|
|
677
678
|
const wrapperClass = cn(
|
|
678
|
-
"flex
|
|
679
|
+
"flex items-center",
|
|
680
|
+
resolvedOrientation === "vertical" ? "h-full flex-col" : "w-full",
|
|
679
681
|
showCenter ? gapBySize[resolvedSize] : "gap-0",
|
|
680
682
|
props.className
|
|
681
683
|
);
|
|
682
684
|
if (props.type === void 0 || props.type === "default") {
|
|
683
685
|
const {
|
|
684
686
|
type: _type,
|
|
687
|
+
orientation: _orientation,
|
|
685
688
|
size: _size,
|
|
686
689
|
label: _label,
|
|
687
690
|
className: _className,
|
|
688
691
|
...divProps
|
|
689
692
|
} = props;
|
|
690
|
-
return /* @__PURE__ */ jsx13(
|
|
693
|
+
return /* @__PURE__ */ jsx13(
|
|
694
|
+
"div",
|
|
695
|
+
{
|
|
696
|
+
className: wrapperClass,
|
|
697
|
+
role: "separator",
|
|
698
|
+
"aria-orientation": ariaOrientation,
|
|
699
|
+
...divProps,
|
|
700
|
+
children: /* @__PURE__ */ jsx13("div", { className: lineClass })
|
|
701
|
+
}
|
|
702
|
+
);
|
|
691
703
|
}
|
|
692
704
|
if (props.type === "text") {
|
|
693
705
|
const {
|
|
694
706
|
type: _type,
|
|
707
|
+
orientation: _orientation,
|
|
695
708
|
size: _size,
|
|
696
709
|
label,
|
|
697
710
|
className: _className,
|
|
698
711
|
...divProps
|
|
699
712
|
} = props;
|
|
700
713
|
const textLabel = label ? label : "OR";
|
|
701
|
-
return /* @__PURE__ */ jsxs7(
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
714
|
+
return /* @__PURE__ */ jsxs7(
|
|
715
|
+
"div",
|
|
716
|
+
{
|
|
717
|
+
className: wrapperClass,
|
|
718
|
+
role: "separator",
|
|
719
|
+
"aria-orientation": ariaOrientation,
|
|
720
|
+
...divProps,
|
|
721
|
+
children: [
|
|
722
|
+
/* @__PURE__ */ jsx13("div", { className: lineClass }),
|
|
723
|
+
/* @__PURE__ */ jsx13(
|
|
724
|
+
"span",
|
|
725
|
+
{
|
|
726
|
+
className: cn(
|
|
727
|
+
textClassBySize[resolvedSize],
|
|
728
|
+
"text-(--color-secondary)"
|
|
729
|
+
),
|
|
730
|
+
children: textLabel
|
|
731
|
+
}
|
|
709
732
|
),
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
] });
|
|
733
|
+
/* @__PURE__ */ jsx13("div", { className: lineClass })
|
|
734
|
+
]
|
|
735
|
+
}
|
|
736
|
+
);
|
|
715
737
|
}
|
|
716
738
|
if (props.type === "iconButton") {
|
|
717
739
|
const {
|
|
718
740
|
type: _type,
|
|
741
|
+
orientation: _orientation,
|
|
719
742
|
size: _size,
|
|
720
743
|
icon,
|
|
721
744
|
iconButtonVariant,
|
|
@@ -724,38 +747,65 @@ var Divider = (props) => {
|
|
|
724
747
|
className: _className,
|
|
725
748
|
...divProps
|
|
726
749
|
} = props;
|
|
727
|
-
return /* @__PURE__ */ jsxs7(
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
750
|
+
return /* @__PURE__ */ jsxs7(
|
|
751
|
+
"div",
|
|
752
|
+
{
|
|
753
|
+
className: wrapperClass,
|
|
754
|
+
role: "separator",
|
|
755
|
+
"aria-orientation": ariaOrientation,
|
|
756
|
+
...divProps,
|
|
757
|
+
children: [
|
|
758
|
+
/* @__PURE__ */ jsx13("div", { className: lineClass }),
|
|
759
|
+
/* @__PURE__ */ jsx13(
|
|
760
|
+
IconButton,
|
|
761
|
+
{
|
|
762
|
+
variant: iconButtonVariant ?? "secondary",
|
|
763
|
+
size: resolvedSize,
|
|
764
|
+
"aria-label": ariaLabel ?? "More options",
|
|
765
|
+
icon: icon ?? /* @__PURE__ */ jsx13(TargetIcon, {}),
|
|
766
|
+
onClick: onIconClick
|
|
767
|
+
}
|
|
768
|
+
),
|
|
769
|
+
/* @__PURE__ */ jsx13("div", { className: lineClass })
|
|
770
|
+
]
|
|
771
|
+
}
|
|
772
|
+
);
|
|
741
773
|
}
|
|
742
774
|
if (props.type === "iconButtonGroup") {
|
|
743
775
|
const {
|
|
744
776
|
type: _type,
|
|
777
|
+
orientation: _orientation,
|
|
745
778
|
size: _size,
|
|
746
779
|
iconGroupItems,
|
|
747
780
|
className: _className,
|
|
748
781
|
...divProps
|
|
749
782
|
} = props;
|
|
750
|
-
return /* @__PURE__ */ jsxs7(
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
783
|
+
return /* @__PURE__ */ jsxs7(
|
|
784
|
+
"div",
|
|
785
|
+
{
|
|
786
|
+
className: wrapperClass,
|
|
787
|
+
role: "separator",
|
|
788
|
+
"aria-orientation": ariaOrientation,
|
|
789
|
+
...divProps,
|
|
790
|
+
children: [
|
|
791
|
+
/* @__PURE__ */ jsx13("div", { className: lineClass }),
|
|
792
|
+
/* @__PURE__ */ jsx13(
|
|
793
|
+
IconButtonGroup,
|
|
794
|
+
{
|
|
795
|
+
className: resolvedOrientation === "vertical" ? "flex-col" : "flex-row",
|
|
796
|
+
items: iconGroupItems,
|
|
797
|
+
size: resolvedSize
|
|
798
|
+
}
|
|
799
|
+
),
|
|
800
|
+
/* @__PURE__ */ jsx13("div", { className: lineClass })
|
|
801
|
+
]
|
|
802
|
+
}
|
|
803
|
+
);
|
|
755
804
|
}
|
|
756
805
|
if (props.type === "button") {
|
|
757
806
|
const {
|
|
758
807
|
type: _type,
|
|
808
|
+
orientation: _orientation,
|
|
759
809
|
size: _size,
|
|
760
810
|
buttonLabel,
|
|
761
811
|
onButtonClick,
|
|
@@ -763,19 +813,28 @@ var Divider = (props) => {
|
|
|
763
813
|
className: _className,
|
|
764
814
|
...divProps
|
|
765
815
|
} = props;
|
|
766
|
-
return /* @__PURE__ */ jsxs7(
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
816
|
+
return /* @__PURE__ */ jsxs7(
|
|
817
|
+
"div",
|
|
818
|
+
{
|
|
819
|
+
className: wrapperClass,
|
|
820
|
+
role: "separator",
|
|
821
|
+
"aria-orientation": ariaOrientation,
|
|
822
|
+
...divProps,
|
|
823
|
+
children: [
|
|
824
|
+
/* @__PURE__ */ jsx13("div", { className: lineClass }),
|
|
825
|
+
/* @__PURE__ */ jsx13(
|
|
826
|
+
Button,
|
|
827
|
+
{
|
|
828
|
+
variant: buttonVariant ?? "secondary",
|
|
829
|
+
size: resolvedSize,
|
|
830
|
+
onClick: onButtonClick,
|
|
831
|
+
children: buttonLabel
|
|
832
|
+
}
|
|
833
|
+
),
|
|
834
|
+
/* @__PURE__ */ jsx13("div", { className: lineClass })
|
|
835
|
+
]
|
|
836
|
+
}
|
|
837
|
+
);
|
|
779
838
|
}
|
|
780
839
|
return null;
|
|
781
840
|
};
|
|
@@ -817,8 +876,8 @@ var Progress = React12.forwardRef(
|
|
|
817
876
|
...rest,
|
|
818
877
|
children: [
|
|
819
878
|
showLabel && label && /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between", children: [
|
|
820
|
-
/* @__PURE__ */ jsx14("span", { className: "paragraph-s-bold text-
|
|
821
|
-
/* @__PURE__ */ jsx14("span", { className: "footnote text-(--
|
|
879
|
+
/* @__PURE__ */ jsx14("span", { className: "paragraph-s-bold text-primary", children: label }),
|
|
880
|
+
/* @__PURE__ */ jsx14("span", { className: "footnote text-(--color-secondary)", children: percentageLabel })
|
|
822
881
|
] }),
|
|
823
882
|
/* @__PURE__ */ jsx14("div", { className: cn("w-full bg-(--chart-mono) overflow-hidden", barHeightClasses), children: /* @__PURE__ */ jsx14(
|
|
824
883
|
"div",
|
|
@@ -830,7 +889,7 @@ var Progress = React12.forwardRef(
|
|
|
830
889
|
style: { width: `${clamped}%` }
|
|
831
890
|
}
|
|
832
891
|
) }),
|
|
833
|
-
showHint && hint && /* @__PURE__ */ jsx14("p", { className: "caption text-(--
|
|
892
|
+
showHint && hint && /* @__PURE__ */ jsx14("p", { className: "caption text-(--color-secondary)", children: hint })
|
|
834
893
|
]
|
|
835
894
|
}
|
|
836
895
|
);
|
|
@@ -850,7 +909,7 @@ import {
|
|
|
850
909
|
} from "@bubo-squared/icons";
|
|
851
910
|
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
852
911
|
var iconStatusVariants = cva10(
|
|
853
|
-
"inline-flex size-5 items-center justify-center rounded-full border-1 border-(--
|
|
912
|
+
"inline-flex size-5 items-center justify-center rounded-full border-1 border-(--color-primary-inverse) p-1",
|
|
854
913
|
{
|
|
855
914
|
variants: {
|
|
856
915
|
variant: {
|
|
@@ -868,10 +927,10 @@ var iconStatusVariants = cva10(
|
|
|
868
927
|
);
|
|
869
928
|
var presenceDotBase = "inline-flex h-5 w-5 items-center justify-center";
|
|
870
929
|
var presenceDotByVariant = {
|
|
871
|
-
offline: "bg-(--background-primary) border-1 border-(--
|
|
872
|
-
online: "bg-(--background-success) border-1 border-(--
|
|
873
|
-
away: "bg-(--background-warning) border-1 border-(--
|
|
874
|
-
busy: "bg-(--background-error) border-1 border-(--
|
|
930
|
+
offline: "bg-(--background-primary) border-1 border-(--color-primary-inverse)",
|
|
931
|
+
online: "bg-(--background-success) border-1 border-(--color-primary-inverse)",
|
|
932
|
+
away: "bg-(--background-warning) border-1 border-(--color-primary-inverse)",
|
|
933
|
+
busy: "bg-(--background-error) border-1 border-(--color-primary-inverse)"
|
|
875
934
|
};
|
|
876
935
|
var StatusAvatar = React13.forwardRef((props, ref) => {
|
|
877
936
|
const { variant = "verified", className, ...rest } = props;
|
|
@@ -898,11 +957,11 @@ var StatusAvatar = React13.forwardRef((props, ref) => {
|
|
|
898
957
|
className: cn(iconStatusVariants({ variant: iconVariant }), className),
|
|
899
958
|
...rest,
|
|
900
959
|
children: [
|
|
901
|
-
iconVariant === "verified" && /* @__PURE__ */ jsx15(CheckIcon, { className: "size-3 text-
|
|
902
|
-
iconVariant === "bookmark" && /* @__PURE__ */ jsx15(BookmarkCheckIcon, { className: "size-3 text-
|
|
903
|
-
iconVariant === "favorite" && /* @__PURE__ */ jsx15(StarIcon, { className: "size-3 text-
|
|
904
|
-
iconVariant === "add" && /* @__PURE__ */ jsx15(PlusIcon, { className: "size-3 text-
|
|
905
|
-
iconVariant === "remove" && /* @__PURE__ */ jsx15(CrossIcon, { className: "size-3 text-
|
|
960
|
+
iconVariant === "verified" && /* @__PURE__ */ jsx15(CheckIcon, { className: "size-3 text-button-white" }),
|
|
961
|
+
iconVariant === "bookmark" && /* @__PURE__ */ jsx15(BookmarkCheckIcon, { className: "size-3 text-button-white" }),
|
|
962
|
+
iconVariant === "favorite" && /* @__PURE__ */ jsx15(StarIcon, { className: "size-3 text-button-white" }),
|
|
963
|
+
iconVariant === "add" && /* @__PURE__ */ jsx15(PlusIcon, { className: "size-3 text-button-white" }),
|
|
964
|
+
iconVariant === "remove" && /* @__PURE__ */ jsx15(CrossIcon, { className: "size-3 text-button-white" })
|
|
906
965
|
]
|
|
907
966
|
}
|
|
908
967
|
);
|
|
@@ -928,8 +987,8 @@ var tagVariants = cva11(
|
|
|
928
987
|
}
|
|
929
988
|
}
|
|
930
989
|
);
|
|
931
|
-
var disabledTag = "pointer-events-none border-(--border-secondary-disabled) bg-(--background-neutral-disabled) text-
|
|
932
|
-
var iconClasses = "flex items-center justify-center w-5 h-5 [&>*]:w-5 [&>*]:h-5 shrink-0 text-
|
|
990
|
+
var disabledTag = "pointer-events-none border-(--border-secondary-disabled) bg-(--background-neutral-disabled) text-primary-disabled";
|
|
991
|
+
var iconClasses = "flex items-center justify-center w-5 h-5 [&>*]:w-5 [&>*]:h-5 shrink-0 text-primary";
|
|
933
992
|
var Tag = React14.forwardRef(
|
|
934
993
|
(props, ref) => {
|
|
935
994
|
const {
|
|
@@ -953,10 +1012,10 @@ var Tag = React14.forwardRef(
|
|
|
953
1012
|
children: [
|
|
954
1013
|
leading && /* @__PURE__ */ jsx16("div", { className: iconClasses, children: leading }),
|
|
955
1014
|
value ? /* @__PURE__ */ jsxs10("div", { className: "flex flex-row gap-1 items-center", children: [
|
|
956
|
-
/* @__PURE__ */ jsx16("span", { className: "text-
|
|
957
|
-
/* @__PURE__ */ jsx16("span", { className: "text-
|
|
958
|
-
/* @__PURE__ */ jsx16("span", { className: "text-
|
|
959
|
-
] }) : /* @__PURE__ */ jsx16("span", { className: "text-
|
|
1015
|
+
/* @__PURE__ */ jsx16("span", { className: "text-primary paragraph-l mb-0! cursor-default font-normal", children: label }),
|
|
1016
|
+
/* @__PURE__ */ jsx16("span", { className: "text-primary paragraph-l mb-0! cursor-default font-normal", children: ":" }),
|
|
1017
|
+
/* @__PURE__ */ jsx16("span", { className: "text-primary paragraph-l-medium mb-0! cursor-default font-medium", children: value })
|
|
1018
|
+
] }) : /* @__PURE__ */ jsx16("span", { className: "text-primary paragraph-l mb-0! cursor-default", children: label }),
|
|
960
1019
|
trailing && /* @__PURE__ */ jsx16("div", { className: iconClasses, children: trailing })
|
|
961
1020
|
]
|
|
962
1021
|
}
|
|
@@ -976,9 +1035,9 @@ function Checkbox({ label, className, ...props }) {
|
|
|
976
1035
|
CheckboxPrimitive.Root,
|
|
977
1036
|
{
|
|
978
1037
|
className: cn(
|
|
979
|
-
"group flex h-5 w-5 items-center justify-center rounded-2 border border-(--border-secondary) bg-(--background-neutral) text-
|
|
980
|
-
"data-[state=checked]:bg-(--background-brand) data-[state=checked]:text-
|
|
981
|
-
"data-[state=indeterminate]:bg-(--background-brand) data-[state=indeterminate]:text-
|
|
1038
|
+
"group flex h-5 w-5 items-center justify-center rounded-2 border border-(--border-secondary) bg-(--background-neutral) text-primary-inverse",
|
|
1039
|
+
"data-[state=checked]:bg-(--background-brand) data-[state=checked]:text-button-white data-[state=checked]:border-none",
|
|
1040
|
+
"data-[state=indeterminate]:bg-(--background-brand) data-[state=indeterminate]:text-button-white data-[state=indeterminate]:border-none",
|
|
982
1041
|
"data-[state=checked]:hover:bg-(--background-brand-hover) data-[state=indeterminate]:hover:bg-(--background-brand-hover)",
|
|
983
1042
|
"focus-visible:border-(--border-brand)",
|
|
984
1043
|
"disabled:bg-(--background-primary-disabled) disabled:border-none disabled:text-(--icon-primary-disabled)",
|
|
@@ -994,7 +1053,7 @@ function Checkbox({ label, className, ...props }) {
|
|
|
994
1053
|
] })
|
|
995
1054
|
}
|
|
996
1055
|
),
|
|
997
|
-
label && /* @__PURE__ */ jsx17("span", { className: "paragraph-m-medium text-
|
|
1056
|
+
label && /* @__PURE__ */ jsx17("span", { className: "paragraph-m-medium text-primary", children: label })
|
|
998
1057
|
] });
|
|
999
1058
|
}
|
|
1000
1059
|
|
|
@@ -1005,7 +1064,7 @@ import { ChevronDownIcon } from "@bubo-squared/icons";
|
|
|
1005
1064
|
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1006
1065
|
var dropdownWrapperBase = "flex flex-col gap-2 items-start";
|
|
1007
1066
|
var dropdownTriggerVariants = cva12(
|
|
1008
|
-
"group flex w-full items-center justify-between rounded-4 border bg-(--background-primary) px-3 py-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-
|
|
1067
|
+
"group flex w-full items-center justify-between rounded-4 border bg-(--background-primary) px-3 py-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",
|
|
1009
1068
|
{
|
|
1010
1069
|
variants: {
|
|
1011
1070
|
size: {
|
|
@@ -1031,11 +1090,11 @@ var dropdownTextVariants = cva12("truncate", {
|
|
|
1031
1090
|
"extra-large": "h6-title"
|
|
1032
1091
|
},
|
|
1033
1092
|
hasValue: {
|
|
1034
|
-
false: "text-(--
|
|
1035
|
-
true: "text-
|
|
1093
|
+
false: "text-(--color-secondary)",
|
|
1094
|
+
true: "text-primary"
|
|
1036
1095
|
},
|
|
1037
1096
|
disabled: {
|
|
1038
|
-
true: "text-
|
|
1097
|
+
true: "text-primary-disabled"
|
|
1039
1098
|
}
|
|
1040
1099
|
},
|
|
1041
1100
|
defaultVariants: {
|
|
@@ -1126,7 +1185,7 @@ var Dropdown = (props) => {
|
|
|
1126
1185
|
id: labelId,
|
|
1127
1186
|
className: cn(
|
|
1128
1187
|
"paragraph-s",
|
|
1129
|
-
disabled ? "text-
|
|
1188
|
+
disabled ? "text-primary-disabled" : "text-primary"
|
|
1130
1189
|
),
|
|
1131
1190
|
children: label
|
|
1132
1191
|
}
|
|
@@ -1188,7 +1247,7 @@ var Dropdown = (props) => {
|
|
|
1188
1247
|
"button",
|
|
1189
1248
|
{
|
|
1190
1249
|
type: "button",
|
|
1191
|
-
className: "flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) py-(--space-8) text-left paragraph-l text-
|
|
1250
|
+
className: "flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) py-(--space-8) text-left paragraph-l text-primary hover:bg-(--background-secondary)",
|
|
1192
1251
|
role: "option",
|
|
1193
1252
|
"aria-selected": selected,
|
|
1194
1253
|
onClick: () => handleSelect(opt.value),
|
|
@@ -1206,7 +1265,7 @@ var Dropdown = (props) => {
|
|
|
1206
1265
|
id: hintId,
|
|
1207
1266
|
className: cn(
|
|
1208
1267
|
"caption",
|
|
1209
|
-
disabled ? "text-
|
|
1268
|
+
disabled ? "text-primary-disabled" : "text-(--color-secondary)"
|
|
1210
1269
|
),
|
|
1211
1270
|
children: hint
|
|
1212
1271
|
}
|
|
@@ -1232,8 +1291,8 @@ var Field = (props) => {
|
|
|
1232
1291
|
const fieldId = React17.useId();
|
|
1233
1292
|
const labelId = label ? `${fieldId}-label` : void 0;
|
|
1234
1293
|
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
1235
|
-
const hintColorClass = disabled ? "text-
|
|
1236
|
-
const labelColorClass = disabled ? "text-
|
|
1294
|
+
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
1295
|
+
const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
|
|
1237
1296
|
return /* @__PURE__ */ jsxs13("div", { className: cn(fieldBase, className), children: [
|
|
1238
1297
|
label && /* @__PURE__ */ jsx19(
|
|
1239
1298
|
"label",
|
|
@@ -1265,7 +1324,7 @@ import * as React18 from "react";
|
|
|
1265
1324
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1266
1325
|
var Input = React18.forwardRef(
|
|
1267
1326
|
({ className, type, variant = "default", ...props }, ref) => {
|
|
1268
|
-
const base = "text-
|
|
1327
|
+
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";
|
|
1269
1328
|
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";
|
|
1270
1329
|
const bareStyles = "bg-transparent outline-none w-full";
|
|
1271
1330
|
return /* @__PURE__ */ jsx20(
|
|
@@ -1304,7 +1363,7 @@ var inputShellVariants = cva13(
|
|
|
1304
1363
|
error: "input-error"
|
|
1305
1364
|
},
|
|
1306
1365
|
disabled: {
|
|
1307
|
-
true: "bg-(--background-primary-disabled) border-(--border-secondary-disabled) text-
|
|
1366
|
+
true: "bg-(--background-primary-disabled) border-(--border-secondary-disabled) text-primary-disabled cursor-default"
|
|
1308
1367
|
}
|
|
1309
1368
|
},
|
|
1310
1369
|
defaultVariants: {
|
|
@@ -1340,8 +1399,8 @@ var passwordTextVariants = cva14("truncate", {
|
|
|
1340
1399
|
"extra-large": "h6-title"
|
|
1341
1400
|
},
|
|
1342
1401
|
disabled: {
|
|
1343
|
-
true: "text-
|
|
1344
|
-
false: "text-
|
|
1402
|
+
true: "text-primary-disabled",
|
|
1403
|
+
false: "text-primary"
|
|
1345
1404
|
}
|
|
1346
1405
|
},
|
|
1347
1406
|
defaultVariants: {
|
|
@@ -1375,7 +1434,7 @@ var actionButtonVariants = cva14(
|
|
|
1375
1434
|
"extra-large": "paragraph-m"
|
|
1376
1435
|
},
|
|
1377
1436
|
disabled: {
|
|
1378
|
-
true: "cursor-default text-
|
|
1437
|
+
true: "cursor-default text-primary-disabled hover:text-primary-disabled"
|
|
1379
1438
|
}
|
|
1380
1439
|
},
|
|
1381
1440
|
defaultVariants: {
|
|
@@ -1589,13 +1648,13 @@ function CommandInput({
|
|
|
1589
1648
|
"data-slot": "command-input-wrapper",
|
|
1590
1649
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1591
1650
|
children: [
|
|
1592
|
-
/* @__PURE__ */ jsx25(SearchIcon, { className: "size-4 shrink-0 opacity-50 text-(--
|
|
1651
|
+
/* @__PURE__ */ jsx25(SearchIcon, { className: "size-4 shrink-0 opacity-50 text-(--color-secondary)" }),
|
|
1593
1652
|
/* @__PURE__ */ jsx25(
|
|
1594
1653
|
CommandPrimitive.Input,
|
|
1595
1654
|
{
|
|
1596
1655
|
"data-slot": "command-input",
|
|
1597
1656
|
className: cn(
|
|
1598
|
-
"placeholder:text-(--
|
|
1657
|
+
"placeholder:text-(--color-secondary) text-primary flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
1599
1658
|
className
|
|
1600
1659
|
),
|
|
1601
1660
|
...props
|
|
@@ -1782,7 +1841,7 @@ var inputTextVariants = cva16("", {
|
|
|
1782
1841
|
"extra-large": "h6-title"
|
|
1783
1842
|
},
|
|
1784
1843
|
disabled: {
|
|
1785
|
-
true: "text-
|
|
1844
|
+
true: "text-primary-disabled border-(--border-secondary-disabled)"
|
|
1786
1845
|
}
|
|
1787
1846
|
},
|
|
1788
1847
|
defaultVariants: {
|
|
@@ -1881,7 +1940,7 @@ var CountrySelect = ({
|
|
|
1881
1940
|
{
|
|
1882
1941
|
type: "button",
|
|
1883
1942
|
variant: "outline",
|
|
1884
|
-
className: cn(inputBase, "flex gap-1 rounded-4 px-3 focus:z-10 mr-(--space-12) text-
|
|
1943
|
+
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)"),
|
|
1885
1944
|
disabled,
|
|
1886
1945
|
children: [
|
|
1887
1946
|
/* @__PURE__ */ jsx28(
|
|
@@ -1931,7 +1990,7 @@ var CountrySelect = ({
|
|
|
1931
1990
|
),
|
|
1932
1991
|
/* @__PURE__ */ jsx28(CommandList, { children: /* @__PURE__ */ jsxs18(ScrollArea, { ref: scrollAreaRef, className: "h-72", children: [
|
|
1933
1992
|
/* @__PURE__ */ jsx28(CommandEmpty, { children: "No country found." }),
|
|
1934
|
-
/* @__PURE__ */ jsx28(CommandGroup, { className: "[&>div>div]:pl-4 [&>div>div]:pr-2 [&>div>div]:py-2 [&>div>div]:border-b [&>div>div]:border-b-(--border-secondary) [&>div>div]:cursor-pointer [&>div>div]:hover:bg-(--background-primary-hover) [&>div>div]:text-
|
|
1993
|
+
/* @__PURE__ */ jsx28(CommandGroup, { className: "[&>div>div]:pl-4 [&>div>div]:pr-2 [&>div>div]:py-2 [&>div>div]:border-b [&>div>div]:border-b-(--border-secondary) [&>div>div]:cursor-pointer [&>div>div]:hover:bg-(--background-primary-hover) [&>div>div]:text-primary [&>div>div]:hover:text-primary p-0 pr-4", children: countryList.map(
|
|
1935
1994
|
({ value, label }) => value ? /* @__PURE__ */ jsx28(
|
|
1936
1995
|
CountrySelectOption,
|
|
1937
1996
|
{
|
|
@@ -1967,7 +2026,7 @@ var CountrySelectOption = (props) => {
|
|
|
1967
2026
|
return /* @__PURE__ */ jsxs18(
|
|
1968
2027
|
CommandItem,
|
|
1969
2028
|
{
|
|
1970
|
-
className: "gap-2 data-[selected=true]:text-
|
|
2029
|
+
className: "gap-2 data-[selected=true]:text-primary",
|
|
1971
2030
|
onSelect: handleSelect,
|
|
1972
2031
|
children: [
|
|
1973
2032
|
/* @__PURE__ */ jsx28(FlagComponent, { country, countryName }),
|
|
@@ -2017,8 +2076,8 @@ var RadioGroup = ({
|
|
|
2017
2076
|
"span",
|
|
2018
2077
|
{
|
|
2019
2078
|
className: cn(
|
|
2020
|
-
"paragraph-s text-
|
|
2021
|
-
disabled && "text-
|
|
2079
|
+
"paragraph-s text-primary",
|
|
2080
|
+
disabled && "text-primary-disabled"
|
|
2022
2081
|
),
|
|
2023
2082
|
children: label
|
|
2024
2083
|
}
|
|
@@ -2097,8 +2156,8 @@ var RadioGroup = ({
|
|
|
2097
2156
|
"span",
|
|
2098
2157
|
{
|
|
2099
2158
|
className: cn(
|
|
2100
|
-
"paragraph-s text-
|
|
2101
|
-
"group-data-[disabled]:text-
|
|
2159
|
+
"paragraph-s text-primary",
|
|
2160
|
+
"group-data-[disabled]:text-primary-disabled whitespace-nowrap"
|
|
2102
2161
|
),
|
|
2103
2162
|
children: option.label
|
|
2104
2163
|
}
|
|
@@ -2116,8 +2175,8 @@ var RadioGroup = ({
|
|
|
2116
2175
|
{
|
|
2117
2176
|
id: hintId,
|
|
2118
2177
|
className: cn(
|
|
2119
|
-
"caption text-(--
|
|
2120
|
-
disabled && "text-
|
|
2178
|
+
"caption text-(--color-secondary)",
|
|
2179
|
+
disabled && "text-primary-disabled"
|
|
2121
2180
|
),
|
|
2122
2181
|
children: hint ?? "\xA0"
|
|
2123
2182
|
}
|
|
@@ -2468,7 +2527,7 @@ var Slider = (props) => {
|
|
|
2468
2527
|
{
|
|
2469
2528
|
className: cn(
|
|
2470
2529
|
"paragraph-s",
|
|
2471
|
-
disabled ? "text-
|
|
2530
|
+
disabled ? "text-primary-disabled" : "text-primary"
|
|
2472
2531
|
),
|
|
2473
2532
|
children: labelText
|
|
2474
2533
|
}
|
|
@@ -2560,8 +2619,8 @@ var Slider = (props) => {
|
|
|
2560
2619
|
"p",
|
|
2561
2620
|
{
|
|
2562
2621
|
className: cn(
|
|
2563
|
-
"paragraph-s text-
|
|
2564
|
-
disabled && "text-
|
|
2622
|
+
"paragraph-s text-primary",
|
|
2623
|
+
disabled && "text-primary-disabled"
|
|
2565
2624
|
),
|
|
2566
2625
|
children: formatNumericLabel()
|
|
2567
2626
|
}
|
|
@@ -2629,8 +2688,8 @@ var TextArea = (props) => {
|
|
|
2629
2688
|
success: "focus-within:border-(--border-success) focus-within:hover:border-(--border-success) focus-within:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-success)]",
|
|
2630
2689
|
error: "focus-within:border-(--border-error) focus-within:hover:border-(--border-error) focus-within:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-error)]"
|
|
2631
2690
|
};
|
|
2632
|
-
const hintColorClass = disabled ? "text-
|
|
2633
|
-
const counterColorClass = disabled ? "text-
|
|
2691
|
+
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
2692
|
+
const counterColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-primary";
|
|
2634
2693
|
const handleResizePointerDown = (event) => {
|
|
2635
2694
|
if (disabled) return;
|
|
2636
2695
|
if (event.button !== 0) return;
|
|
@@ -2663,7 +2722,7 @@ var TextArea = (props) => {
|
|
|
2663
2722
|
id: labelId,
|
|
2664
2723
|
className: cn(
|
|
2665
2724
|
"paragraph-s",
|
|
2666
|
-
disabled ? "text-
|
|
2725
|
+
disabled ? "text-primary-disabled" : "text-primary"
|
|
2667
2726
|
),
|
|
2668
2727
|
children: label
|
|
2669
2728
|
}
|
|
@@ -2702,7 +2761,7 @@ var TextArea = (props) => {
|
|
|
2702
2761
|
maxLength: effectiveMaxLength,
|
|
2703
2762
|
className: cn(
|
|
2704
2763
|
"paragraph-m bg-transparent outline-none w-full h-full resize-none px-2 py-2 pr-8",
|
|
2705
|
-
disabled ? "text-
|
|
2764
|
+
disabled ? "text-primary-disabled" : hasValue ? "text-primary" : "text-(--color-secondary)",
|
|
2706
2765
|
showCharacterLimit && "pr-16"
|
|
2707
2766
|
),
|
|
2708
2767
|
...textareaProps
|
|
@@ -2961,8 +3020,8 @@ var Toggle = (props) => {
|
|
|
2961
3020
|
"span",
|
|
2962
3021
|
{
|
|
2963
3022
|
className: cn(
|
|
2964
|
-
"paragraph-s text-
|
|
2965
|
-
disabled && "text-
|
|
3023
|
+
"paragraph-s text-primary",
|
|
3024
|
+
disabled && "text-primary-disabled"
|
|
2966
3025
|
),
|
|
2967
3026
|
children: label
|
|
2968
3027
|
}
|
|
@@ -2996,7 +3055,7 @@ var WebsiteInput = (props) => {
|
|
|
2996
3055
|
const addonTextClass = cn(
|
|
2997
3056
|
"flex mb-0!",
|
|
2998
3057
|
size === "extra-large" ? "paragraph-m" : "paragraph-s",
|
|
2999
|
-
disabled ? "text-
|
|
3058
|
+
disabled ? "text-primary-disabled" : "text-primary group-hover:text-(--color-primary-hover) group-focus-within:text-(--color-primary-focus)"
|
|
3000
3059
|
);
|
|
3001
3060
|
const baseAddonClass = cn(
|
|
3002
3061
|
"flex items-center gap-2 px-2 h-full",
|
|
@@ -3150,8 +3209,8 @@ var breadcrumbTextVariants = cva19(
|
|
|
3150
3209
|
{
|
|
3151
3210
|
variants: {
|
|
3152
3211
|
variant: {
|
|
3153
|
-
colored: "text-(--
|
|
3154
|
-
flat: "text-
|
|
3212
|
+
colored: "text-(--color-brand) group-hover:text-(--color-brand-hover) group-focus-visible:text-(--color-brand-focus) group-disabled:text-(--color-brand-disabled)",
|
|
3213
|
+
flat: "text-primary group-hover:text-(--color-primary-hover) group-focus-visible:text-(--color-primary-focus) group-disabled:text-primary-disabled"
|
|
3155
3214
|
}
|
|
3156
3215
|
},
|
|
3157
3216
|
defaultVariants: {
|
|
@@ -3282,7 +3341,7 @@ var logoTextSizeVariants = cva21("", {
|
|
|
3282
3341
|
}
|
|
3283
3342
|
});
|
|
3284
3343
|
var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
3285
|
-
const textColorClass = textColor === "light" ? "text-(--color-b-white)" : textColor === "dark" ? "text-(--color-b-black)" : "text-
|
|
3344
|
+
const textColorClass = textColor === "light" ? "text-(--color-b-white)" : textColor === "dark" ? "text-(--color-b-black)" : "text-primary";
|
|
3286
3345
|
return /* @__PURE__ */ jsxs29("div", { className: cn(logoWrapperVariants({ variant }), className), children: [
|
|
3287
3346
|
/* @__PURE__ */ jsx39(LogoIconSvg2, { className: logoIconSizeVariants({ variant }) }),
|
|
3288
3347
|
/* @__PURE__ */ jsx39(LogoTextSvg, { className: cn(logoTextSizeVariants({ variant }), textColorClass) })
|